sheetjs/dist/xlsx.mini.min.js

8 lines
178 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.15.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 Sl(e){return String.fromCharCode(e)};var v=function Cl(e){return String.fromCharCode(e)};var m=null;var g=true;var b=function _l(){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 Al(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 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 T(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 El(e){e.version="0.10.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 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(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);Xr(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);Xr(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=[],E=[],T=[];k(s,C,S,A,n,_,E,l);d(E,T,A);A.shift();var F={FileIndex:E,FullPaths:T};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=Br(t,s*4)}if(i.length===0)return Yr(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=Br(s,o*4))===I)break;n.push(i)}v(Br(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=Br(e[c],f)}return{nodes:i,data:dr([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=[];for(h=u;h>=0;){s[h]=true;l[l.length]=h;o.push(e[h]);var p=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[p])break;h=Br(e[p],d)}i[u]={nodes:l,data:dr([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);Xr(v,64);u=v._R(2);d=vr(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="!StreamData"}else if(g.size>=4096){g.storage="fat";if(r[g.start]===undefin
for(var n=0;n<e.length;++n)a=a.replace(e[n][0],e[n][1]);return a}}();var Qe=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 er=/<\/?(?:vt:)?variant>/g,rr=/<(?:vt:)([^>]*)>([\s\S]*)</;function tr(e,r){var t=De(e);var a=e.match(Qe(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(er,"").match(rr);if(r)n.push({v:Xe(r[2]),t:r[1]})});return n}var ar=/(^\s|\s$|\n)/;function nr(e,r){return"<"+e+(r.match(ar)?' xml:space="preserve"':"")+">"+r+"</"+e+">"}function ir(e){return Y(e).map(function(r){return" "+r+'="'+e[r]+'"'}).join("")}function sr(e,r,t){return"<"+e+(t!=null?ir(t):"")+(r!=null?(r.match(ar)?' xml:space="preserve"':"")+">"+r+"</"+e:"/")+">"}function lr(e,r){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(r)throw t}return""}function or(e){switch(typeof e){case"string":return sr("vt:lpwstr",e);case"number":return sr((e|0)==e?"vt:i4":"vt:r8",String(e));case"boolean":return sr("vt:bool",e?"true":"false");}if(e instanceof Date)return sr("vt:filetime",lr(e));throw new Error("Unable to serialize "+e)}var fr={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"};fr.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 cr={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 hr(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 ur(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 dr=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 pr=dr;var vr=function(e,r,t){var a=[];for(var n=r;n<t;n+=2)a.push(String.fromCharCode(Nr(e,n)));return a.join("").replace(D,"")};var mr=vr;var gr=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 br=gr;var wr=function(e,r,t){var a=[];for(var n=r;n<t;n++)a.push(String.fromCharCode(Rr(e,n)));return a.join("")};var kr=wr;var yr=function(e,r){var t=Lr(e,r);return t>0?wr(e,r+4,r+4+t-1):""};var xr=yr;var Sr=function(e,r){var t=Lr(e,r);return t>0?wr(e,r+4,r+4+t-1):""};var Cr=Sr;var _r=function(e,r){var t=2*Lr(e,r);return t>0?wr(e,r+4,r+4+t-1):""};var Ar=_r;var Er,Tr;Er=Tr=function Ml(e,r){var t=Lr(e,r);return t>0?vr(e,r+4,r+4+t):""};var Fr=function(e,r){var t=Lr(e,r);return t>0?wr(e,r+4,r+4+t):""};var Or=Fr;var Dr,Mr;Dr=Mr=function(e,r){return hr(e,r)};var Pr=function Pl(e){return Array.isArray(e)};if(w){vr=function(e,r,t){if(!Buffer.isBuffer(e))return mr(e,r,t);return e.toString("utf16le",r,t).replace(D,"")};gr=function(e,r,t){return Buffer.isBuffer(e)?e.toString("hex",r,r+t):br(e,r,t)};yr=
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>"+Be(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("")}fr.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties";Kt.CUST_PROPS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";var ga=/<[^>]+>[^<]*/g;function ba(e,r){var t={},a="";var n=e.match(ga);if(n)for(var i=0;i!=n.length;++i){var s=n[i],l=De(s);switch(l[0]){case"<?xml":break;case"<Properties":break;case"<property":a=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]=Ne(c);break;case"bool":t[a]=Ve(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]=se(c);break;case"cy":;case"error":t[a]=Ne(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 wa=sr("Properties",null,{xmlns:fr.CUST_PROPS,"xmlns:vt":fr.vt});function ka(e){var r=[Ae,wa];if(!e)return r.join("");var t=1;Y(e).forEach(function a(n){++t;r[r.length]=sr("property",or(e[n]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:n})});if(r.length>2){r[r.length]="</Properties>";r[1]=r[1].replace("/>",">")}return r.join("")}function ya(e){var r={},t=e.match(Te),a=0;var n=false;if(t)for(;a!=t.length;++a){var s=De(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 xa=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:Ne(a[1])};var i=t.match(r);if(i)n.s=ya(i[1]);return n}var a=/<(?:\w+:)?r>/g,n=/<\/(?:\w+:)?r>/;return function i(e){return e.replace(a,"").split(n).map(t).filter(function(e){return e.v})}}();var Sa=function Ul(){var e=/(\r\n|\n)/g;function r(e,r,t){var a=[];if(e.u)a.push("text-decoration: underline;");if(e.uval)a.push("text-underline-style:"+e.uval+";");if(e.sz)a.push("font-size:"+e.sz+"pt;");if(e.outline)a.push("text-effect: outline;");if(e.shadow)a.push("text-shadow: auto;");r.push('<span style="'+a.join("")+'">');if(e.b){r.push("<b>");t.push("</b>")}if(e.i){r.push("<i>");t.push("</i>")}if(e.strike){r.push("<s>");t.push("</s>")}var n=e.valign||"";if(n=="superscript"||n=="super")n="sup";else if(n=="subscript")n="sub";if(n!=""){r.push("<
var l=ht(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]&&Ea(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 On=sr("comments",null,{xmlns:fr.main[0]});function Dn(e){var r=[Ae,On];var t=[];r.push("<authors>");e.forEach(function(e){e[1].forEach(function(e){var a=Be(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(Be(a.a))+'"><text>');r.push(nr("t",a.t==null?"":Be(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 Mn="application/vnd.ms-office.vbaProject";function Pn(e){var r=j.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*/,"");j.utils.cfb_add(r,n,e.FileIndex[a].content)});return j.write(r)}function Rn(e,r){r.FullPaths.forEach(function(t,a){if(a==0)return;var n=t.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");if(n.slice(-1)!=="/")j.utils.cfb_add(e,n,r.FileIndex[a].content)})}var Nn=["xlsb","xlsm","xlam","biff8","xla"];Kt.DS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet";Kt.MS="http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet";function In(){return{"!type":"dialog"}}function Ln(){return{"!type":"dialog"}}function Bn(){return{"!type":"macro"}}function zn(){return{"!type":"macro"}}var Wn=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?"":"$")+lt(o)+(s?"":"$")+at(l)}return function a(n,i){r=i;return n.replace(e,t)}}();var $n=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)([1-9]\d{0,5}|10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6])(?![_.\(A-Za-z0-9])/g;var Un=function(){return function e(r,t){return r.replace($n,function(e,r,a,n,i,s){var l=st(n)-(a?0:t.c);var o=tt(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 jn(e,r){return e.replace($n,function(e,t,a,n,i,s){return t+(a=="$"?a+n:lt(st(n)+r.c))+(i=="$"?i+s:at(tt(s)+r.r))})}function Hn(e,r,t){var a=dt(r),n=a.s,i=ht(t);var s={r:i.r-n.r,c:i.c-n.c};return jn(e,s)}function Vn(e){if(e.length==1)return false;return true}function Xn(e){return e.replace(/_xlfn\./g,"")}var Gn={};var Yn={};Kt.WS=["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"];var Jn=typeof Map!=="undefined";function Zn(e,r,t){var a=0,n=e.length;if(t){if(Jn?t.has(r):t.hasOwnProperty(r)){var i=Jn?t.get(r):t[r];for(;a<i.length;++a){if(e[i[a]].t===r){e.Count++;return i[a]}}}}else for(;a<n;++a){if(e[a].t===r){e.Count++;return a}}e[n]={t:r};e.Count++;e.Unique++;if(t){if(Jn){if(!t.has(r))t.set(r,[]);t.get(r).push(n)}else{if(!t.hasOwnProperty(r))t[r]=[];t[r].push(n)}}return n}function qn(e,r){var t={min:e+1,max:e+1};var a=-1;if(r.MDW)Ua=r.MDW;if(r.width!=null)t.customWidth=1;else if(r.wpx!=null)a=Ha(r.wpx);else if(r.wch!=null)a=r.wch;if(a>-1){t.width=Va(a);t.customWidth=1}else if(r.width!=null)t.width=r.width;if(r.hidden)t.hidden=true;return t}function Kn(e,r){if(!e)return;var t=[.7,.7,.75,.75,.3,.3];if(r=="xlml")t=[1,1,1,1,.5,.5];if(e.left==null)e.left=t[0];if(e.right==null)e.right=t[1];if(e.top==null)e.top=t[2];if(e.bottom==null)e.bottom=t[3];if(e.header==null)e.header=t[4];if(e.footer==null)e.footer=t[5]}function Qn(
}if(l.length)a["!merges"]=l;if(f.length)a["!rows"]=f;s.e.r=h-1;a["!ref"]=pt(s);if(h>=i)a["!fullref"]=pt((s.e.r=n.length-c+h-1,s));return a}function Ss(e,r){return bt(xs(e,r),r)}function Cs(e){var r="";var t=_s(e);if(t)r=t(e).getPropertyValue("display");if(!r)r=e.style.display;return r==="none"}function _s(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 As(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 Es(e){return function r(t,a){var n=As(t,a.sheet);return e.from_sheet(t.Sheets[t.SheetNames[n]],a,t)}}var Ts=Es(ys);var Fs=Es({from_sheet:gl});var Os=Es(typeof SYLK!=="undefined"?SYLK:{});var Ds=Es(typeof DIF!=="undefined"?DIF:{});var Ms=Es(typeof PRN!=="undefined"?PRN:{});var Ps=Es(typeof RTF!=="undefined"?RTF:{});var Rs=Es({from_sheet:bl});var Ns=Es(typeof DBF!=="undefined"?DBF:{});var Is=Es(typeof ETH!=="undefined"?ETH:{});function Ls(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 Bs=Ls([["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 zs=Ls([["cellDates",false],["bookSST",false],["bookType","xlsx"],["compression",false],["WTF",false]]);function Ws(e){if(Kt.WS.indexOf(e)>-1)return"sheet";if(Kt.CS&&e==Kt.CS)return"chart";if(Kt.DS&&e==Kt.DS)return"dialog";if(Kt.MS&&e==Kt.MS)return"macro";return e&&e.length?e:"sheet"}function $s(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,Ws(e["!id"][r.id].Type)]})}catch(t){return null}return!e||e.length===0?null:e}function Us(e,r,t,a,n,i,s,l,o,f,c,h){try{i[a]=ea(ke(e,t,true),r);var u=we(e,r);var d;switch(l){case"sheet":d=is(u,r,n,o,i[a],f,c,h);break;case"chart":d=ss(u,r,n,o,i[a],f,c,h);if(!d||!d["!drawel"])break;var p=_e(d["!drawel"].Target,r);var v=Qt(p);var m=_n(ke(e,p,true),ea(ke(e,v,true),p));var g=_e(m,p);var b=Qt(g);d=Ni(ke(e,g,true),g,o,ea(ke(e,b,true),g),f,d);break;case"macro":d=ls(u,r,n,o,i[a],f,c,h);break;case"dialog":d=os(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==Kt.CMNT){var n=_e(i[a][t].Target,r);w=us(we(e,n,true),n,o);if(!w||!w.length)return;Tn(d,w)}})}catch(k){if(o.WTF)throw k}}function js(e){return e.charAt(0)=="/"?e.slice(1):e}function Hs(e,r){R(P);r=r||{};Bs(r);if(ge(e,"META-INF/manifest.xml"))return parse_ods(e,r);if(ge(e,"objectdata.xml"))return parse_ods(e,r);if(ge(e,"Index/Document.iwa"))throw new Error("Unsupported NUMBERS file");var t=ye(e);var a=Yt(ke(e,"[Content_Types].xml"));var n=false;var i,s;if(a.workbooks.length===0){s="xl/workbook.xml";if(we(e,s,true))a.workbooks.push(s)}if(a.workbooks.length===0){s="xl/workbook.bin";if(!we(e,s,true))throw new Error("Could not find workbook");a.workbooks.push(s);n=true}if(a.workbooks[0].slice(-3)=="bin")n=true;var l={};var o={};if(!r.bookSheets&&!r.bookProps){Gn=[];if(a.sst)try{Gn=hs(we(e,js(a.sst)),a.sst,r)}catch(f){if(r.WTF)throw f}if(r.cellStyles&&a.themes.length)l=cs(ke(e,a.themes[0].replace(/^\//,""),true)||"",a.themes[0],r);if(a.style)o=fs(we(e,js(a.style)),a.style,l,r)}a.links.map(function(t){try{var a=ea(ke(e,Qt(js(t))),t);return ps(we(e,js(t)),a,t,r)}catch(n){}});var c=ns(we(e,js(a.workbooks[0])),a.workbooks[0],r);var h={},u="";if(a.coreprops.length){u=we(e,js(a.coreprops[0]),true);if(u)h=la(u);if(a.extprops.length!==0){u=we(e,js(a.extprops[0]),true);if(u)pa(u,h,r)}}var d={};if(!r.bookSheets||r.bookProps){if(a.custprops.length!==0){u=ke(e,js(a.custprops[0]),true);if(u)d=ba(u,r)}}var p={};if(r.bookSheets||r.bookProps){if(c.Sheets)i=c.Sheets.map(function T(e){ret