sheetjs_sheetjs/dist/xlsx.mini.min.js

8 lines
180 KiB
JavaScript
Raw Normal View History

/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
2020-06-05 05:42:28 +00:00
var DO_NOT_EXPORT_CODEPAGE=true;var DO_NOT_EXPORT_JSZIP=true;var XLSX={};function make_xlsx_lib(e){e.version="0.16.2";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 f(){o(1200);l()}function c(e){var r=[];for(var t=0,a=e.length;t<a;++t)r[t]=e.charCodeAt(t);return r}function h(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 u(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 h(e.slice(2));if(r==254&&t==255)return u(e.slice(2));if(r==65279)return e.slice(1);return e};var p=function Al(e){return String.fromCharCode(e)};var v=function Tl(e){return String.fromCharCode(e)};var m=null;var g=true;var b=function El(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(r){var t="";var a=0,n=0,i=0,s=0,l=0,o=0,f=0;for(var c=0;c<r.length;){a=r.charCodeAt(c++);s=a>>2;n=r.charCodeAt(c++);l=(a&3)<<4|n>>4;i=r.charCodeAt(c++);o=(n&15)<<2|i>>6;f=i&63;if(isNaN(n)){o=f=64}else if(isNaN(i)){f=64}t+=e.charAt(s)+e.charAt(l)+e.charAt(o)+e.charAt(f)}return t},decode:function r(t){var a="";var n=0,i=0,s=0,l=0,o=0,f=0,c=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var h=0;h<t.length;){l=e.indexOf(t.charAt(h++));o=e.indexOf(t.charAt(h++));n=l<<2|o>>4;a+=String.fromCharCode(n);f=e.indexOf(t.charAt(h++));i=(o&15)<<4|f>>2;if(f!==64){a+=String.fromCharCode(i)}c=e.indexOf(t.charAt(h++));s=(f&3)<<6|c;if(c!==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 C(e){return w?Buffer.allocUnsafe(e):new Array(e)}var _=function Fl(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 _(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 T(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 E(e){if(typeof Uint8Array==="undefined")throw new Error("Unsupported");return new Uint8Array(e)}function F(e){if(typeof ArrayBuffer=="undefined")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return F(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 P={};var R=function Ol(e){e.version="0.10.3";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 f(e,r){if(e>o||e<-o)return s(e,r);var t=Math.round(e);return l(t,r)}function c(e,r){r=r||0;return e.length>=7+r&&(e.charCodeAt(r)|3
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 f(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 f=[];var p=e.slice(0,512);Yr(p,0);var m=c(p);t=m[0];switch(t){case 3:a=512;break;case 4:a=4096;break;case 0:if(m[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);h(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;f[x]=y}var S=u(e,a);v(o,i,S,a,f);var C=g(S,s,f,a);C[s].name="!Directory";if(n>0&&l!==I)C[l].name="!MiniFAT";C[f[0]].name="!FAT";C.fat_addrs=f;C.ssz=a;var _={},A=[],T=[],E=[];k(s,C,S,A,n,_,T,l);d(T,E,A);A.shift();var F={FileIndex:T,FullPaths:E};if(r&&r.raw)F.raw={header:b,sectors:S};return F}function c(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 h(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 u(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 f=[],c=[];for(;a<o;++a){f[a]=c[a]=a;r[a]=t[a]}for(;l<c.length;++l){a=c[l];n=e[a].L;i=e[a].R;s=e[a].C;if(f[a]===a){if(n!==-1&&f[n]!==n)f[a]=f[n];if(i!==-1&&f[i]!==i)f[a]=f[i]}if(s!==-1)f[s]=a;if(n!==-1&&a!=f[a]){f[n]=f[a];if(c.lastIndexOf(n)<l)c.push(n)}if(i!==-1&&a!=f[a]){f[i]=f[a];if(c.lastIndexOf(i)<l)c.push(i)}}for(a=1;a<o;++a)if(f[a]===a){if(i!==-1&&f[i]!==i)f[a]=f[i];else if(n!==-1&&f[n]!==n)f[a]=f[n]}for(a=1;a<o;++a){if(e[a].type===0)continue;l=a;if(l!=f[l])do{l=f[l];r[a]=r[l]+"/"+r[a]}while(l!==0&&-1!==f[l]&&l!=f[l]);f[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*N,s*N+N));n-=N;s=Wr(t,s*4)}if(i.length===0)return Zr(0);return O(i).slice(0,e.size)}function v(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)}v(Wr(s,a-4),r-1,t,a,n)}}function m(e,r,t,a,n){var i=[],s=[];if(!n)n=[];var l=a-1,o=0,f=0;for(o=r;o>=0;){n[o]=true;i[i.length]=o;s.push(e[o]);var c=t[Math.floor(o*4/a)];f=o*4&l;if(a<4+f)throw new Error("FAT boundary crossed: "+o+" 4 "+a);if(!e[c])break;o=Wr(e[c],f)}return{nodes:i,data:vr([s])}}function g(e,r,t,a){var n=e.length,i=[];var s=[],l=[],o=[];var f=a-1,c=0,h=0,u=0,d=0;for(c=0;c<n;++c){l=[];u=c+r;if(u>=n)u-=n;if(s[u])continue;o=[];var p=[];for(h=u;h>=0;){p[h]=true;s[h]=true;l[l.length]=h;o.push(e[h]);var v=t[Math.floor(h*4/a)];d=h*4&f;if(a<4+d)throw new Error("FAT boundary crossed: "+h+" 4 "+a);if(!e[v])break;h=Wr(e[v],d);if(p[h])break}i[u]={nodes:l,data:vr([o])}}return i}function k(e,r,t,a,n,i,s,l){var o=0,f=a.length?2:0;var c=r[e].data;var h=0,u=0,d;for(;h<c.length;h+=128){var v=c.slice(h,h+128);Yr(v,64);u=v._R(2);d=gr(v,0,u-f);a.push(d);var g={name:d,type:v._R(1),color:v._R(1),L:v._R(4,"i"),R:v._R(4,"i"),C:v._R(4,"i"),clsid:v._R(16),state:v._R(4,"i"),start:0,size:0};var b=v._R(2)+v._R(2)+v._R(2)+v._R(2);if(b!==0)g.ct=y(v,v.l-8);var w=v._R(2)+v._R(2)+v._R(2)+v._R(2);if(w!==0)g.mt=y(v,v.l-8);g.start=v._R(4,"i");g.size=v._R(4,"i");if(g.size<0&&g.start<0){g.size=g.type=0;g.start=I;g.name=""}if(g.type===5){o=g.start;if(n>0&&o!==I)r[o].name="!StreamDat
}}();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=Pe(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 fr(e,r){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throw t}return""}function cr(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",fr(e));throw new Error("Unable to serialize "+e)}var hr={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"};hr.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 ur={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-n);if(n<=-1023&&(!isFinite(i)||i<Math.pow(2,52))){n=-1022}else{i-=Math.pow(2,52);n+=1023}}for(var l=0;l<=5;++l,i/=256)e[t+l]=i&255;e[t+6]=(n&15)<<4|i&15;e[t+7]=n>>4|a}var vr=function(e){var r=[],t=10240;for(var a=0;a<e[0].length;++a)if(e[0][a])for(var n=0,i=e[0][a].length;n<i;n+=t)r.push.apply(r,e[0][a].slice(n,n+t));return r};var mr=vr;var gr=function(e,r,t){var a=[];for(var n=r;n<t;n+=2)a.push(String.fromCharCode(Lr(e,n)));return a.join("").replace(D,"")};var br=gr;var wr=function(e,r,t){var a=[];for(var n=r;n<r+t;++n)a.push(("0"+e[n].toString(16)).slice(-2));return a.join("")};var kr=wr;var yr=function(e,r,t){var a=[];for(var n=r;n<t;n++)a.push(String.fromCharCode(Ir(e,n)));return a.join("")};var xr=yr;var Sr=function(e,r){var t=Br(e,r);return t>0?yr(e,r+4,r+4+t-1):""};var Cr=Sr;var _r=function(e,r){var t=Br(e,r);return t>0?yr(e,r+4,r+4+t-1):""};var Ar=_r;var Tr=function(e,r){var t=2*Br(e,r);return t>0?yr(e,r+4,r+4+t-1):""};var Er
t.Chartsheets=o;t.ChartNames=s.slice(l,l+o);break;}l+=o}}function ma(e,r,t){var a={};if(!r)r={};e=Ye(e);da.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)va(a.HeadingPairs,a.TitlesOfParts,r,t);return r}var ga=or("Properties",null,{xmlns:hr.EXT_PROPS,"xmlns:vt":hr.vt});function ba(e){var r=[],t=or;if(!e)e={};e.Application="SheetJS";r[r.length]=Ee;r[r.length]=ga;da.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("")}hr.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties";ea.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";var wa=/<[^>]+>[^<]*/g;function ka(e,r){var t={},a="";var n=e.match(wa);if(n)for(var i=0;i!=n.length;++i){var s=n[i],l=Pe(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 f=o[0].slice(4),c=o[1];switch(f){case"lpstr":;case"bstr":;case"lpwstr":t[a]=Le(c);break;case"bool":t[a]=Ge(c);break;case"i1":;case"i2":;case"i4":;case"i8":;case"int":;case"uint":t[a]=parseInt(c,10);break;case"r4":;case"r8":;case"decimal":t[a]=parseFloat(c);break;case"filetime":;case"date":t[a]=oe(c);break;case"cy":;case"error":t[a]=Le(c);break;default:if(f.slice(-1)=="/")break;if(r.WTF&&typeof console!=="undefined")console.warn("Unexpected",s,f,o);}}else if(s.slice(0,2)==="</"){}else if(r.WTF)throw new Error(s);}}return t}var ya=or("Properties",null,{xmlns:hr.CUST_PROPS,"xmlns:vt":hr.vt});function xa(e){var r=[Ee,ya];if(!e)return r.join("");var t=1;Y(e).forEach(function a(n){++t;r[r.length]=or("property",cr(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("")}function Sa(e){var r={},t=e.match(Oe),a=0;var n=false;if(t)for(;a!=t.length;++a){var s=Pe(t[a]);switch(s[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!s.val)break;case"<shadow>":;case"<shadow/>":r.shadow=1;break;case"</shadow>":break;case"<charset":if(s.val=="1")break;r.cp=i[parseInt(s.val,10)];break;case"<outline":if(!s.val)break;case"<outline>":;case"<outline/>":r.outline=1;break;case"</outline>":break;case"<rFont":r.name=s.val;break;case"<sz":r.sz=s.val;break;case"<strike":if(!s.val)break;case"<strike>":;case"<strike/>":r.strike=1;break;case"</strike>":break;case"<u":if(!s.val)break;switch(s.val){case"double":r.uval="double";break;case"singleAccounting":r.uval="single-accounting";break;case"doubleAccounting":r.uval="double-accounting";break;};case"<u>":;case"<u/>":r.u=1;break;case"</u>":break;case"<b":if(s.val=="0")break;case"<b>":;case"<b/>":r.b=1;break;case"</b>":break;case"<i":if(s.val=="0")break;case"<i>":;case"<i/>":r.i=1;break;case"</i>":break;case"<color":if(s.rgb)r.color=s.rgb.slice(2,8);break;case"<family":r.family=s.val;break;case"<vertAlign":r.valign=s.val;break;case"<scheme":break;case"<extLst":;case"<extLst>":;case"</extLst>":break;case"<ext":n=true;break;case"</ext>":n=false;break;default:if(s[0].charCodeAt(1)!==47&&!n)throw new Error("Unrecognized rich format "+s[0]);}}return r}var Ca=function(){var e=Qe("t"),r=Qe("rPr");function t(t){var a=t.match(e);if(!a)return{t:"s",v:""};var n={t:"s",v:Le(a[1])};var i=t.
a={t:"z"};if(t)e[n.r][n.c]=a;else e[r.ref]=a;var i=gt(e["!ref"]||"BDWGO1000001:A1");if(i.s.r>n.r)i.s.r=n.r;if(i.e.r<n.r)i.e.r=n.r;if(i.s.c>n.c)i.s.c=n.c;if(i.e.c<n.c)i.e.c=n.c;var s=mt(i);if(s!==e["!ref"])e["!ref"]=s}if(!a.c)a.c=[];var l={a:r.author,t:r.t,r:r.r};if(r.h)l.h=r.h;a.c.push(l)})}function Mn(e,r){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var t=[];var a=[];var n=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;var r=e.match(/<(?:\w+:)?author[^>]*>(.*)/);if(r)t.push(r[1])});var i=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;var n=e.match(/<(?:\w+:)?comment[^>]*>/);if(!n)return;var i=Pe(n[0]);var s={author:i.authorId&&t[i.authorId]||"sheetjsghost",ref:i.ref,guid:i.guid};var l=dt(i.ref);if(r.sheetRows&&r.sheetRows<=l.r)return;var o=e.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/);var f=!!o&&!!o[1]&&Fa(o[1])||{r:"",t:"",h:""};s.r=f.r;if(f.r=="<t></t>")f.t=f.h="";s.t=f.t.replace(/\r\n/g,"\n").replace(/\r/g,"\n");if(r.cellHTML)s.h=f.h;a.push(s)});return a}var Pn=or("comments",null,{xmlns:hr.main[0]});function Rn(e){var r=[Ee,Pn];var t=[];r.push("<authors>");e.forEach(function(e){e[1].forEach(function(e){var a=We(e.a);if(t.indexOf(a)>-1)return;t.push(a);r.push("<author>"+a+"</author>")})});r.push("</authors>");r.push("<commentList>");e.forEach(function(e){e[1].forEach(function(a){r.push('<comment ref="'+e[0]+'" authorId="'+t.indexOf(We(a.a))+'"><text>');r.push(sr("t",a.t==null?"":We(a.t)));r.push("</text></comment>")})});r.push("</commentList>");if(r.length>2){r[r.length]="</comments>";r[1]=r[1].replace("/>",">")}return r.join("")}var Nn="application/vnd.ms-office.vbaProject";function In(e){var r=U.utils.cfb_new({root:"R"});e.FullPaths.forEach(function(t,a){if(t.slice(-1)==="/"||!t.match(/_VBA_PROJECT_CUR/))return;var n=t.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");U.utils.cfb_add(r,n,e.FileIndex[a].content)});return U.write(r)}function Ln(e,r){r.FullPaths.forEach(function(t,a){if(a==0)return;var n=t.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");if(n.slice(-1)!=="/")U.utils.cfb_add(e,n,r.FileIndex[a].content)})}var zn=["xlsb","xlsm","xlam","biff8","xla"];ea.DS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet";ea.MS="http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet";function Bn(){return{"!type":"dialog"}}function Wn(){return{"!type":"dialog"}}function $n(){return{"!type":"macro"}}function jn(){return{"!type":"macro"}}var Un=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g;var r={r:0,c:0};function t(e,t,a,n){var i=false,s=false;if(a.length==0)s=true;else if(a.charAt(0)=="["){s=true;a=a.slice(1,-1)}if(n.length==0)i=true;else if(n.charAt(0)=="["){i=true;n=n.slice(1,-1)}var l=a.length>0?parseInt(a,10)|0:0,o=n.length>0?parseInt(n,10)|0:0;if(i)o+=r.c;else--o;if(s)l+=r.r;else--l;return t+(i?"":"$")+ft(o)+(s?"":"$")+it(l)}return function a(n,i){r=i;return n.replace(e,t)}}();var Hn=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g;var Vn=function(){return function e(r,t){return r.replace(Hn,function(e,r,a,n,i,s){var l=ot(n)-(a?0:t.c);var o=nt(s)-(i?0:t.r);var f=o==0?"":!i?"["+o+"]":o+1;var c=l==0?"":!a?"["+l+"]":l+1;return r+"R"+f+"C"+c})}}();function Xn(e,r){return e.replace(Hn,function(e,t,a,n,i,s){return t+(a=="$"?a+n:ft(ot(n)+r.c))+(i=="$"?i+s:it(nt(s)+r.r))})}function Gn(e,r,t){var a=vt(r),n=a.s,i=dt(t);var s={r:i.r-n.r,c:i.c-n.c};return Xn(e,s)}function Yn(e){if(e.length==1)return false;return true}function Jn(e){return e.replace(/_xlfn\./g,"")}var Zn={};var qn={};ea.WS=["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"];var Kn=typeof Map!=="undefined";function Qn
var i=t.sheetRows||1e7;var s={s:{r:0,c:0},e:{r:0,c:0}};var l=[],o=0;var f=[];var c=0,h=0,u=0,d=0,p=0,v=0;for(;c<n.length&&h<i;++c){var g=n[c];if(Ts(g)){if(t.display)continue;f[h]={hidden:true}}var b=g.children;for(u=d=0;u<b.length;++u){var w=b[u];if(t.display&&Ts(w))continue;var k=w.hasAttribute("v")?w.getAttribute("v"):er(w.innerHTML);var y=w.getAttribute("z");for(o=0;o<l.length;++o){var x=l[o];if(x.s.c==d&&x.s.r<=h&&h<=x.e.r){d=x.e.c+1;o=-1}}v=+w.getAttribute("colspan")||1;if((p=+w.getAttribute("rowspan"))>0||v>1)l.push({s:{r:h,c:d},e:{r:h+(p||1)-1,c:d+v-1}});var S={t:"s",v:k};var C=w.getAttribute("t")||"";if(k!=null){if(k.length==0)S.t=C||"z";else if(t.raw||k.trim().length==0||C=="s"){}else if(k==="TRUE")S={t:"b",v:true};else if(k==="FALSE")S={t:"b",v:false};else if(!isNaN(ue(k)))S={t:"n",v:ue(k)};else if(!isNaN(de(k).getDate())){S={t:"d",v:oe(k)};if(!t.cellDates)S={t:"n",v:ee(S.v)};S.z=t.dateNF||P._table[14]}}if(S.z===undefined&&y!=null)S.z=y;if(t.dense){if(!a[h])a[h]=[];a[h][d]=S}else a[pt({c:d,r:h})]=S;if(s.e.c<d)s.e.c=d;d+=v}++h}if(l.length)a["!merges"]=l;if(f.length)a["!rows"]=f;s.e.r=h-1;a["!ref"]=mt(s);if(h>=i)a["!fullref"]=mt((s.e.r=n.length-c+h-1,s));return a}function As(e,r){return kt(_s(e,r),r)}function Ts(e){var r="";var t=Es(e);if(t)r=t(e).getPropertyValue("display");if(!r)r=e.style.display;return r==="none"}function Es(e){if(e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle==="function")return e.ownerDocument.defaultView.getComputedStyle;if(typeof getComputedStyle==="function")return getComputedStyle;return null}function Fs(e,r){if(!r)return 0;var t=e.SheetNames.indexOf(r);if(t==-1)throw new Error("Sheet not found: "+r);return t}function Os(e){return function r(t,a){var n=Fs(t,a.sheet);return e.from_sheet(t.Sheets[t.SheetNames[n]],a,t)}}var Ds=Os(Cs);var Ms=Os({from_sheet:kl});var Ps=Os(typeof SYLK!=="undefined"?SYLK:{});var Rs=Os(typeof DIF!=="undefined"?DIF:{});var Ns=Os(typeof PRN!=="undefined"?PRN:{});var Is=Os(typeof RTF!=="undefined"?RTF:{});var Ls=Os({from_sheet:yl});var zs=Os(typeof DBF!=="undefined"?DBF:{});var Bs=Os(typeof ETH!=="undefined"?ETH:{});function Ws(e){return function r(t){for(var a=0;a!=e.length;++a){var n=e[a];if(t[n[0]]===undefined)t[n[0]]=n[1];if(n[2]==="n")t[n[0]]=Number(t[n[0]])}}}var $s=Ws([["cellNF",false],["cellHTML",true],["cellFormula",true],["cellStyles",false],["cellText",true],["cellDates",false],["sheetStubs",false],["sheetRows",0,"n"],["bookDeps",false],["bookSheets",false],["bookProps",false],["bookFiles",false],["bookVBA",false],["password",""],["WTF",false]]);var js=Ws([["cellDates",false],["bookSST",false],["bookType","xlsx"],["compression",false],["WTF",false]]);function Us(e){if(ea.WS.indexOf(e)>-1)return"sheet";if(ea.CS&&e==ea.CS)return"chart";if(ea.DS&&e==ea.DS)return"dialog";if(ea.MS&&e==ea.MS)return"macro";return e&&e.length?e:"sheet"}function Hs(e,r){if(!e)return 0;try{e=r.map(function a(r){if(!r.id)r.id=r.strRelID;return[r.name,e["!id"][r.id].Target,Us(e["!id"][r.id].Type)]})}catch(t){return null}return!e||e.length===0?null:e}function Vs(e,r,t,a,n,i,s,l,o,f,c,h){try{i[a]=ta(xe(e,t,true),r);var u=ye(e,r);var d;switch(l){case"sheet":d=os(u,r,n,o,i[a],f,c,h);break;case"chart":d=fs(u,r,n,o,i[a],f,c,h);if(!d||!d["!drawel"])break;var p=Te(d["!drawel"].Target,r);var v=ra(p);var m=En(xe(e,p,true),ta(xe(e,v,true),p));var g=Te(m,p);var b=ra(g);d=zi(xe(e,g,true),g,o,ta(xe(e,b,true),g),f,d);break;case"macro":d=cs(u,r,n,o,i[a],f,c,h);break;case"dialog":d=hs(u,r,n,o,i[a],f,c,h);break;default:throw new Error("Unrecognized sheet type "+l);}s[a]=d;var w=[];if(i&&i[a])Y(i[a]).forEach(function(t){if(i[a][t].Type==ea.CMNT){var n=Te(i[a][t].Target,r);w=vs(ye(e,n,true),n,o);if(!w||!w.length)return;Dn(d,w)}})}catch(k){if(o.WTF)throw k}}function Xs(e){return e.charAt(0)=="/"?e.slice(1):e}function Gs(e,r){R(P);r=r||{};$s(r);if(we(e,"META-INF/manifest.xml"))return parse_ods(e,r);if(we(e,"objectdata.xml"))return parse_ods(e,r);if(we(e,"Index/Document.iwa"))throw new Error("Unsupported NUMBERS file");var t=Se(e);var a=Zt(xe(e,"[Content_Types].xml"));va