@cosmotech/core 1.6.1 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -11071,7 +11071,7 @@ module.exports = ZStream;
11071
11071
  /*global global, exports, module, require:false, process:false, Buffer:false, ArrayBuffer:false */
11072
11072
  var XLSX = {};
11073
11073
  function make_xlsx_lib(XLSX){
11074
- XLSX.version = '0.17.4';
11074
+ XLSX.version = '0.17.5';
11075
11075
  var current_codepage = 1200, current_ansi = 1252;
11076
11076
  /*global cptable:true, window */
11077
11077
  if(typeof commonjsRequire !== 'undefined') {
@@ -14761,7 +14761,8 @@ function safe_decode_range(range) {
14761
14761
  }
14762
14762
  o.s.r = --idx;
14763
14763
 
14764
- if(i === len || range.charCodeAt(++i) === 58) { o.e.c=o.s.c; o.e.r=o.s.r; return o; }
14764
+ if(i === len || cc != 10) { o.e.c=o.s.c; o.e.r=o.s.r; return o; }
14765
+ ++i;
14765
14766
 
14766
14767
  for(idx = 0; i != len; ++i) {
14767
14768
  if((cc=range.charCodeAt(i)-64) < 1 || cc > 26) break;
@@ -15802,7 +15803,7 @@ function parse_rels(data, currentFilePath) {
15802
15803
  var y = parsexmltag(x);
15803
15804
  /* 9.3.2.2 OPC_Relationships */
15804
15805
  if (y[0] === '<Relationship') {
15805
- var rel = {}; rel.Type = y.Type; rel.Target = y.Target; rel.Id = y.Id; rel.TargetMode = y.TargetMode;
15806
+ var rel = {}; rel.Type = y.Type; rel.Target = y.Target; rel.Id = y.Id; if(y.TargetMode) rel.TargetMode = y.TargetMode;
15806
15807
  var canonictarget = y.TargetMode === 'External' ? y.Target : resolve_path(y.Target, currentFilePath);
15807
15808
  rels[canonictarget] = rel;
15808
15809
  hash[y.Id] = rel;
@@ -17604,7 +17605,9 @@ function parse_Lbl(blob, length, opts) {
17604
17605
  var name = parse_XLUnicodeStringNoCch(blob, cch, opts);
17605
17606
  if(flags & 0x20) name = XLSLblBuiltIn[name.charCodeAt(0)];
17606
17607
  var npflen = target - blob.l; if(opts && opts.biff == 2) --npflen;
17608
+ /*jshint -W018 */
17607
17609
  var rgce = (target == blob.l || cce === 0 || !(npflen > 0)) ? [] : parse_NameParsedFormula(blob, npflen, opts, cce);
17610
+ /*jshint +W018 */
17608
17611
  return {
17609
17612
  chKey: chKey,
17610
17613
  Name: name,
@@ -19020,12 +19023,18 @@ var WK_ = (function() {
19020
19023
  function lotus_to_workbook_buf(d, opts) {
19021
19024
  if(!d) return d;
19022
19025
  var o = opts || {};
19023
- var s = ((o.dense ? [] : {})), n = "Sheet1", sidx = 0;
19024
- var sheets = {}, snames = [n], realnames = [];
19026
+ var s = ((o.dense ? [] : {})), n = "Sheet1", next_n = "", sidx = 0;
19027
+ var sheets = {}, snames = [], realnames = [];
19025
19028
 
19026
19029
  var refguess = {s: {r:0, c:0}, e: {r:0, c:0} };
19027
19030
  var sheetRows = o.sheetRows || 0;
19028
19031
 
19032
+ if(d[2] == 0x00) {
19033
+ if(d[3] == 0x08 || d[3] == 0x09) {
19034
+ if(d.length >= 16 && d[14] == 0x05 && d[15] === 0x6c) throw new Error("Unsupported Works 3 for Mac file");
19035
+ }
19036
+ }
19037
+
19029
19038
  if(d[2] == 0x02) {
19030
19039
  o.Enum = WK1Enum;
19031
19040
  lotushopper(d, function(val, R, RT) { switch(RT) {
@@ -19034,6 +19043,8 @@ var WK_ = (function() {
19034
19043
  if(val >= 0x1000) o.qpro = true;
19035
19044
  break;
19036
19045
  case 0x06: refguess = val; break; /* RANGE */
19046
+ case 0xCC: if(val) next_n = val; break; /* SHEETNAMECS */
19047
+ case 0xDE: next_n = val; break; /* SHEETNAMELP */
19037
19048
  case 0x0F: /* LABEL */
19038
19049
  case 0x33: /* STRING */
19039
19050
  if(!o.qpro) val[1].v = val[1].v.slice(1);
@@ -19046,6 +19057,18 @@ var WK_ = (function() {
19046
19057
  val[1].z = o.dateNF || SSF._table[14];
19047
19058
  if(o.cellDates) { val[1].t = 'd'; val[1].v = numdate(val[1].v); }
19048
19059
  }
19060
+
19061
+ if(o.qpro) {
19062
+ if(val[3] > sidx) {
19063
+ s["!ref"] = encode_range(refguess);
19064
+ sheets[n] = s;
19065
+ snames.push(n);
19066
+ s = (o.dense ? [] : {});
19067
+ refguess = {s: {r:0, c:0}, e: {r:0, c:0} };
19068
+ sidx = val[3]; n = next_n || "Sheet" + (sidx + 1); next_n = "";
19069
+ }
19070
+ }
19071
+
19049
19072
  var tmpcell = o.dense ? (s[val[0].r]||[])[val[0].c] : s[encode_cell(val[0])];
19050
19073
  if(tmpcell) {
19051
19074
  tmpcell.t = val[1].t; tmpcell.v = val[1].v;
@@ -19063,6 +19086,7 @@ var WK_ = (function() {
19063
19086
  o.Enum = WK3Enum;
19064
19087
  if(d[2] == 0x0E) { o.qpro = true; d.l = 0; }
19065
19088
  lotushopper(d, function(val, R, RT) { switch(RT) {
19089
+ case 0xCC: n = val; break; /* SHEETNAMECS */
19066
19090
  case 0x16: /* LABEL16 */
19067
19091
  val[1].v = val[1].v.slice(1);
19068
19092
  /* falls through */
@@ -19075,10 +19099,10 @@ var WK_ = (function() {
19075
19099
  if(val[3] > sidx) {
19076
19100
  s["!ref"] = encode_range(refguess);
19077
19101
  sheets[n] = s;
19102
+ snames.push(n);
19078
19103
  s = (o.dense ? [] : {});
19079
19104
  refguess = {s: {r:0, c:0}, e: {r:0, c:0} };
19080
19105
  sidx = val[3]; n = "Sheet" + (sidx + 1);
19081
- snames.push(n);
19082
19106
  }
19083
19107
  if(sheetRows > 0 && val[0].r >= sheetRows) break;
19084
19108
  if(o.dense) {
@@ -19091,16 +19115,22 @@ var WK_ = (function() {
19091
19115
  case 0x1B: /* XFORMAT */
19092
19116
  if(val[0x36b0]) realnames[val[0x36b0][0]] = val[0x36b0][1];
19093
19117
  break;
19118
+ case 0x0601: /* SHEETINFOQP */
19119
+ realnames[val[0]] = val[1]; if(val[0] == sidx) n = val[1]; break;
19094
19120
  }}, o);
19095
19121
  } else throw new Error("Unrecognized LOTUS BOF " + d[2]);
19096
-
19097
19122
  s["!ref"] = encode_range(refguess);
19098
- sheets[n] = s;
19123
+ sheets[next_n || n] = s;
19124
+ snames.push(next_n || n);
19099
19125
  if(!realnames.length) return { SheetNames: snames, Sheets: sheets };
19100
19126
  var osheets = {}, rnames = [];
19127
+ /* TODO: verify no collisions */
19101
19128
  for(var i = 0; i < realnames.length; ++i) if(sheets[snames[i]]) {
19129
+ rnames.push(realnames[i] || snames[i]);
19130
+ osheets[realnames[i]] = sheets[realnames[i]] || sheets[snames[i]];
19131
+ } else {
19102
19132
  rnames.push(realnames[i]);
19103
- osheets[realnames[i]] = sheets[snames[i]];
19133
+ osheets[realnames[i]] = ({ "!ref": "A1" });
19104
19134
  }
19105
19135
  return { SheetNames: rnames, Sheets: osheets };
19106
19136
  }
@@ -19116,7 +19146,8 @@ var WK_ = (function() {
19116
19146
 
19117
19147
  write_biff_rec(ba, 0x00, write_BOF_WK1(0x0406));
19118
19148
  write_biff_rec(ba, 0x06, write_RANGE(range));
19119
- for(var R = range.s.r; R <= range.e.r; ++R) {
19149
+ var max_R = Math.min(range.e.r, 8191);
19150
+ for(var R = range.s.r; R <= max_R; ++R) {
19120
19151
  var rr = encode_row(R);
19121
19152
  for(var C = range.s.c; C <= range.e.c; ++C) {
19122
19153
  if(R === range.s.r) cols[C] = encode_col(C);
@@ -19155,7 +19186,8 @@ var WK_ = (function() {
19155
19186
  var range = safe_decode_range(ws["!ref"]);
19156
19187
  var dense = Array.isArray(ws);
19157
19188
  var cols = [];
19158
- for(var R = range.s.r; R <= range.e.r; ++R) {
19189
+ var max_R = Math.min(range.e.r, 8191);
19190
+ for(var R = range.s.r; R <= max_R; ++R) {
19159
19191
  var rr = encode_row(R);
19160
19192
  for(var C = range.s.c; C <= range.e.c; ++C) {
19161
19193
  if(R === range.s.r) cols[C] = encode_col(C);
@@ -19201,6 +19233,7 @@ var WK_ = (function() {
19201
19233
  if(rows < range.e.r) rows = range.e.r;
19202
19234
  if(cols < range.e.c) cols = range.e.c;
19203
19235
  }
19236
+ if(rows > 8191) rows = 8191;
19204
19237
  out.write_shift(2, rows);
19205
19238
  out.write_shift(1, wscnt);
19206
19239
  out.write_shift(1, cols);
@@ -19213,12 +19246,23 @@ var WK_ = (function() {
19213
19246
  return out;
19214
19247
  }
19215
19248
 
19216
- function parse_RANGE(blob) {
19249
+ function parse_RANGE(blob, length, opts) {
19217
19250
  var o = {s:{c:0,r:0},e:{c:0,r:0}};
19251
+ if(length == 8 && opts.qpro) {
19252
+ o.s.c = blob.read_shift(1);
19253
+ blob.l++;
19254
+ o.s.r = blob.read_shift(2);
19255
+ o.e.c = blob.read_shift(1);
19256
+ blob.l++;
19257
+ o.e.r = blob.read_shift(2);
19258
+ return o;
19259
+ }
19218
19260
  o.s.c = blob.read_shift(2);
19219
19261
  o.s.r = blob.read_shift(2);
19262
+ if(length == 12 && opts.qpro) blob.l += 2;
19220
19263
  o.e.c = blob.read_shift(2);
19221
19264
  o.e.r = blob.read_shift(2);
19265
+ if(length == 12 && opts.qpro) blob.l += 2;
19222
19266
  if(o.s.c == 0xFFFF) o.s.c = o.e.c = o.s.r = o.e.r = 0;
19223
19267
  return o;
19224
19268
  }
@@ -19232,10 +19276,10 @@ var WK_ = (function() {
19232
19276
  }
19233
19277
 
19234
19278
  function parse_cell(blob, length, opts) {
19235
- var o = [{c:0,r:0}, {t:'n',v:0}, 0];
19279
+ var o = [{c:0,r:0}, {t:'n',v:0}, 0, 0];
19236
19280
  if(opts.qpro && opts.vers != 0x5120) {
19237
19281
  o[0].c = blob.read_shift(1);
19238
- blob.l++;
19282
+ o[3] = blob.read_shift(1);
19239
19283
  o[0].r = blob.read_shift(2);
19240
19284
  blob.l+=2;
19241
19285
  } else {
@@ -19343,7 +19387,7 @@ var WK_ = (function() {
19343
19387
 
19344
19388
  function wk1_fmla_to_csf(blob, o) {
19345
19389
  prep_blob(blob, 0);
19346
- var out = [], argc = 0, R = "", C = "";
19390
+ var out = [], argc = 0, R = "", C = "", argL = "", argR = "";
19347
19391
  while(blob.l < blob.length) {
19348
19392
  var cc = blob[blob.l++];
19349
19393
  switch(cc) {
@@ -19375,7 +19419,7 @@ var WK_ = (function() {
19375
19419
  case 0x16: out.push("NOT(" + out.pop() + ")"); break;
19376
19420
 
19377
19421
  case 0x14: case 0x15: {
19378
- var argR = out.pop(), argL = out.pop();
19422
+ argR = out.pop(); argL = out.pop();
19379
19423
  out.push(["AND", "OR"][cc - 0x14] + "(" + argL + "," + argR + ")");
19380
19424
  } break;
19381
19425
 
@@ -19521,6 +19565,27 @@ var WK_ = (function() {
19521
19565
  return o;
19522
19566
  }
19523
19567
 
19568
+ function parse_SHEETNAMECS(blob, length) {
19569
+ return blob[blob.l + length - 1] == 0 ? blob.read_shift(length, 'cstr') : "";
19570
+ }
19571
+
19572
+ function parse_SHEETNAMELP(blob, length) {
19573
+ var len = blob[blob.l++];
19574
+ if(len > length - 1) len = length - 1;
19575
+ var o = ""; while(o.length < len) o += String.fromCharCode(blob[blob.l++]);
19576
+ return o;
19577
+ }
19578
+
19579
+ function parse_SHEETINFOQP(blob, length, opts) {
19580
+ if(!opts.qpro || length < 21) return;
19581
+ var id = blob.read_shift(1);
19582
+ blob.l += 17;
19583
+ blob.read_shift(1);
19584
+ blob.l += 2;
19585
+ var nm = blob.read_shift(length - 21, 'cstr');
19586
+ return [id, nm];
19587
+ }
19588
+
19524
19589
  function parse_XFORMAT(blob, length) {
19525
19590
  var o = {}, tgt = blob.l + length;
19526
19591
  while(blob.l < tgt) {
@@ -19608,6 +19673,8 @@ var WK_ = (function() {
19608
19673
  0x0067: { n:"RRANGES??" },
19609
19674
  0x0068: { n:"FNAME??" },
19610
19675
  0x0069: { n:"MRANGES??" },
19676
+ 0x00CC: { n:"SHEETNAMECS", f:parse_SHEETNAMECS },
19677
+ 0x00DE: { n:"SHEETNAMELP", f:parse_SHEETNAMELP },
19611
19678
  0xFFFF: { n:"" }
19612
19679
  };
19613
19680
 
@@ -19673,6 +19740,7 @@ var WK_ = (function() {
19673
19740
  0x00BC: { n:"??" },
19674
19741
  0x00C3: { n:"??" },
19675
19742
  0x00C9: { n:"??" },
19743
+ 0x00CC: { n:"SHEETNAMECS", f:parse_SHEETNAMECS },
19676
19744
  0x00CD: { n:"??" },
19677
19745
  0x00CE: { n:"??" },
19678
19746
  0x00CF: { n:"??" },
@@ -19717,6 +19785,7 @@ var WK_ = (function() {
19717
19785
  0x029A: { n:"??" },
19718
19786
  0x0300: { n:"??" },
19719
19787
  0x0304: { n:"??" },
19788
+ 0x0601: { n:"SHEETINFOQP", f:parse_SHEETINFOQP },
19720
19789
  0x0640: { n:"??" },
19721
19790
  0x0642: { n:"??" },
19722
19791
  0x0701: { n:"??" },
@@ -27489,6 +27558,7 @@ function parse_xlml_xml(d, _opts) {
27489
27558
  else str = utf8read(str);
27490
27559
  }
27491
27560
  var opening = str.slice(0, 1024).toLowerCase(), ishtml = false;
27561
+ opening = opening.replace(/".*?"/g, "");
27492
27562
  if((opening.indexOf(">") & 1023) > Math.min((opening.indexOf(",") & 1023), (opening.indexOf(";")&1023))) { var _o = dup(opts); _o.type = "string"; return PRN.to_workbook(str, _o); }
27493
27563
  if(opening.indexOf("<?xml") == -1) ["html", "table", "head", "meta", "script", "style", "div"].forEach(function(tag) { if(opening.indexOf("<" + tag) >= 0) ishtml = true; });
27494
27564
  if(ishtml) return HTML_.to_workbook(str, opts);
@@ -29362,7 +29432,9 @@ if(!cur_sheet) Workbook.WBProps.CodeName = val || "ThisWorkbook";
29362
29432
  if(!options.bookSheets) wb.Sheets=Sheets;
29363
29433
  if(!wb.SheetNames.length && Preamble["!ref"]) {
29364
29434
  wb.SheetNames.push("Sheet1");
29435
+ /*jshint -W069 */
29365
29436
  if(wb.Sheets) wb.Sheets["Sheet1"] = Preamble;
29437
+ /*jshint +W069 */
29366
29438
  } else wb.Preamble=Preamble;
29367
29439
  if(wb.Sheets) FilterDatabases.forEach(function(r,i) { wb.Sheets[wb.SheetNames[i]]['!autofilter'] = r; });
29368
29440
  wb.Strings = sst;
@@ -29457,6 +29529,8 @@ else {
29457
29529
  else if((_data=CFB.find(cfb, 'PerfectOffice_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));
29458
29530
  /* Quattro Pro 9 */
29459
29531
  else if((_data=CFB.find(cfb, 'NativeContent_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));
29532
+ /* Works 4 for Mac */
29533
+ else if((_data=CFB.find(cfb, 'MN0')) && _data.content) throw new Error("Unsupported Works 4 for Mac file");
29460
29534
  else throw new Error("Cannot find Workbook stream");
29461
29535
  if(options.bookVBA && cfb.FullPaths && CFB.find(cfb, '/_VBA_PROJECT_CUR/VBA/dir')) WorkbookP.vbaraw = make_vba_xls(cfb);
29462
29536
  }
@@ -30334,7 +30408,9 @@ var XLSBRecordEnum = {
30334
30408
  };
30335
30409
 
30336
30410
  var XLSBRE = evert_key(XLSBRecordEnum, 'n');
30411
+ /*jshint -W069 */
30337
30412
  XLSBRE["BrtFRTArchID$"] = 0x0010;
30413
+ /*jshint +W069 */
30338
30414
 
30339
30415
  /* [MS-XLS] 2.3 Record Enumeration (and other sources) */
30340
30416
  var XLSRecordEnum = {
@@ -31182,6 +31258,15 @@ function write_biff8_buf(wb, opts) {
31182
31258
  }
31183
31259
 
31184
31260
  function write_biff_buf(wb, opts) {
31261
+ for(var i = 0; i <= wb.SheetNames.length; ++i) {
31262
+ var ws = wb.Sheets[wb.SheetNames[i]];
31263
+ if(!ws || !ws["!ref"]) continue;
31264
+ var range = decode_range(ws["!ref"]);
31265
+ if(range.e.c > 255) { // note: 255 is IV
31266
+ console.error("Worksheet '" + wb.SheetNames[i] + "' extends beyond column IV (255). Data may be lost.");
31267
+ }
31268
+ }
31269
+
31185
31270
  var o = opts || {};
31186
31271
  switch(o.biff || 2) {
31187
31272
  case 8: case 5: return write_biff8_buf(wb, opts);
@@ -31995,14 +32080,16 @@ function parse_fods(data, opts) {
31995
32080
 
31996
32081
  /* OpenDocument */
31997
32082
  var write_styles_ods = (function() {
31998
- var master_styles = '<office:master-styles>'
31999
- + '<style:master-page style:name="mp1" style:page-layout-name="mp1">'
32000
- + '<style:header/>'
32001
- + '<style:header-left style:display="false"/>'
32002
- + '<style:footer/>'
32003
- + '<style:footer-left style:display="false"/>'
32004
- + '</style:master-page>'
32005
- + '</office:master-styles>';
32083
+ var master_styles = [
32084
+ '<office:master-styles>',
32085
+ '<style:master-page style:name="mp1" style:page-layout-name="mp1">',
32086
+ '<style:header/>',
32087
+ '<style:header-left style:display="false"/>',
32088
+ '<style:footer/>',
32089
+ '<style:footer-left style:display="false"/>',
32090
+ '</style:master-page>',
32091
+ '</office:master-styles>'
32092
+ ].join("");
32006
32093
 
32007
32094
  var payload = '<office:document-styles ' + wxt_helper({
32008
32095
  'xmlns:office': "urn:oasis:names:tc:opendocument:xmlns:office:1.0",
@@ -32419,6 +32506,11 @@ function parse_zip(zip, opts) {
32419
32506
  if(safegetzipfile(zip, 'objectdata.xml')) return parse_ods(zip, opts);
32420
32507
  /* Numbers */
32421
32508
  if(safegetzipfile(zip, 'Index/Document.iwa')) throw new Error('Unsupported NUMBERS file');
32509
+ if(!safegetzipfile(zip, '[Content_Types].xml')) {
32510
+ if(safegetzipfile(zip, 'index.xml.gz')) throw new Error('Unsupported NUMBERS 08 file');
32511
+ if(safegetzipfile(zip, 'index.xml')) throw new Error('Unsupported NUMBERS 09 file');
32512
+ throw new Error('Unsupported ZIP file');
32513
+ }
32422
32514
 
32423
32515
  var entries = zipentries(zip);
32424
32516
  var dir = parse_ct((getzipstr(zip, '[Content_Types].xml')));
@@ -32836,12 +32928,20 @@ function readSync(data, opts) {
32836
32928
  case 0x54: if(n[1] === 0x41 && n[2] === 0x42 && n[3] === 0x4C) return DIF.to_workbook(d, o); break;
32837
32929
  case 0x50: return (n[1] === 0x4B && n[2] < 0x09 && n[3] < 0x09) ? read_zip(d, o) : read_prn(data, d, o, str);
32838
32930
  case 0xEF: return n[3] === 0x3C ? parse_xlml(d, o) : read_prn(data, d, o, str);
32839
- case 0xFF: if(n[1] === 0xFE) { return read_utf16(d, o); } break;
32840
- case 0x00: if(n[1] === 0x00 && n[2] >= 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o); break;
32931
+ case 0xFF:
32932
+ if(n[1] === 0xFE) { return read_utf16(d, o); }
32933
+ else if(n[1] === 0x00 && n[2] === 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);
32934
+ break;
32935
+ case 0x00:
32936
+ if(n[1] === 0x00) {
32937
+ if(n[2] >= 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);
32938
+ if(n[2] === 0x00 && (n[3] === 0x08 || n[3] === 0x09)) return WK_.to_workbook(d, o);
32939
+ }
32940
+ break;
32841
32941
  case 0x03: case 0x83: case 0x8B: case 0x8C: return DBF.to_workbook(d, o);
32842
32942
  case 0x7B: if(n[1] === 0x5C && n[2] === 0x72 && n[3] === 0x74) return RTF.to_workbook(d, o); break;
32843
32943
  case 0x0A: case 0x0D: case 0x20: return read_plaintext_raw(d, o);
32844
- case 0x89: if(n[1] === 0x50 && n[2] === 0x4E && n[3] === 0x47) throw new Error("PNG Image File is not a spreadsheet"); break;
32944
+ case 0x89: if(n[1] === 0x50 && n[2] === 0x4E && n[3] === 0x47) throw new Error("PNG Image File is not a spreadsheet"); break;
32845
32945
  }
32846
32946
  if(DBF.versions.indexOf(n[0]) > -1 && n[2] <= 12 && n[3] <= 31) return DBF.to_workbook(d, o);
32847
32947
  return read_prn(data, d, o, str);
@@ -33388,7 +33488,10 @@ return utils;
33388
33488
  })(utils);
33389
33489
 
33390
33490
  if(has_buf && typeof commonjsRequire != 'undefined') (function() {
33391
- var Readable = require$$0__default["default"].Readable;
33491
+ var strmod = require$$0__default["default"];
33492
+ if(!strmod) return;
33493
+ var Readable = strmod.Readable;
33494
+ if(!Readable) return;
33392
33495
 
33393
33496
  var write_csv_stream = function(sheet, opts) {
33394
33497
  var stream = Readable();
@@ -33525,7 +33628,7 @@ if(typeof CFB !== "undefined") XLSX.CFB = CFB;
33525
33628
  /*global define */
33526
33629
  make_xlsx_lib(exports);
33527
33630
  /* NOTE: the following extra line is needed for "Lightning Locker Service" */
33528
- if(typeof window !== 'undefined' && !window.XLSX) window.XLSX = XLSX;
33631
+ if(typeof window !== 'undefined' && !window.XLSX) try { window.XLSX = XLSX; } catch(e) {}
33529
33632
  }(xlsx, xlsx.exports));
33530
33633
 
33531
33634
  var _castCellValueToStr = cellValue => {
@@ -41273,101 +41376,6 @@ function subMilliseconds(dirtyDate, dirtyAmount) {
41273
41376
  return addMilliseconds(dirtyDate, -amount);
41274
41377
  }
41275
41378
 
41276
- function addLeadingZeros(number, targetLength) {
41277
- var sign = number < 0 ? '-' : '';
41278
- var output = Math.abs(number).toString();
41279
-
41280
- while (output.length < targetLength) {
41281
- output = '0' + output;
41282
- }
41283
-
41284
- return sign + output;
41285
- }
41286
-
41287
- /*
41288
- * | | Unit | | Unit |
41289
- * |-----|--------------------------------|-----|--------------------------------|
41290
- * | a | AM, PM | A* | |
41291
- * | d | Day of month | D | |
41292
- * | h | Hour [1-12] | H | Hour [0-23] |
41293
- * | m | Minute | M | Month |
41294
- * | s | Second | S | Fraction of second |
41295
- * | y | Year (abs) | Y | |
41296
- *
41297
- * Letters marked by * are not implemented but reserved by Unicode standard.
41298
- */
41299
-
41300
- var formatters$2 = {
41301
- // Year
41302
- y: function (date, token) {
41303
- // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
41304
- // | Year | y | yy | yyy | yyyy | yyyyy |
41305
- // |----------|-------|----|-------|-------|-------|
41306
- // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
41307
- // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
41308
- // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
41309
- // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
41310
- // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
41311
- var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
41312
-
41313
- var year = signedYear > 0 ? signedYear : 1 - signedYear;
41314
- return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
41315
- },
41316
- // Month
41317
- M: function (date, token) {
41318
- var month = date.getUTCMonth();
41319
- return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
41320
- },
41321
- // Day of the month
41322
- d: function (date, token) {
41323
- return addLeadingZeros(date.getUTCDate(), token.length);
41324
- },
41325
- // AM or PM
41326
- a: function (date, token) {
41327
- var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
41328
-
41329
- switch (token) {
41330
- case 'a':
41331
- case 'aa':
41332
- return dayPeriodEnumValue.toUpperCase();
41333
-
41334
- case 'aaa':
41335
- return dayPeriodEnumValue;
41336
-
41337
- case 'aaaaa':
41338
- return dayPeriodEnumValue[0];
41339
-
41340
- case 'aaaa':
41341
- default:
41342
- return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
41343
- }
41344
- },
41345
- // Hour [1-12]
41346
- h: function (date, token) {
41347
- return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
41348
- },
41349
- // Hour [0-23]
41350
- H: function (date, token) {
41351
- return addLeadingZeros(date.getUTCHours(), token.length);
41352
- },
41353
- // Minute
41354
- m: function (date, token) {
41355
- return addLeadingZeros(date.getUTCMinutes(), token.length);
41356
- },
41357
- // Second
41358
- s: function (date, token) {
41359
- return addLeadingZeros(date.getUTCSeconds(), token.length);
41360
- },
41361
- // Fraction of second
41362
- S: function (date, token) {
41363
- var numberOfDigits = token.length;
41364
- var milliseconds = date.getUTCMilliseconds();
41365
- var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
41366
- return addLeadingZeros(fractionalSeconds, token.length);
41367
- }
41368
- };
41369
- var formatters$3 = formatters$2;
41370
-
41371
41379
  var MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.
41372
41380
  // See issue: https://github.com/date-fns/date-fns/issues/376
41373
41381
 
@@ -41530,6 +41538,101 @@ function getUTCWeek(dirtyDate, options) {
41530
41538
  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
41531
41539
  }
41532
41540
 
41541
+ function addLeadingZeros(number, targetLength) {
41542
+ var sign = number < 0 ? '-' : '';
41543
+ var output = Math.abs(number).toString();
41544
+
41545
+ while (output.length < targetLength) {
41546
+ output = '0' + output;
41547
+ }
41548
+
41549
+ return sign + output;
41550
+ }
41551
+
41552
+ /*
41553
+ * | | Unit | | Unit |
41554
+ * |-----|--------------------------------|-----|--------------------------------|
41555
+ * | a | AM, PM | A* | |
41556
+ * | d | Day of month | D | |
41557
+ * | h | Hour [1-12] | H | Hour [0-23] |
41558
+ * | m | Minute | M | Month |
41559
+ * | s | Second | S | Fraction of second |
41560
+ * | y | Year (abs) | Y | |
41561
+ *
41562
+ * Letters marked by * are not implemented but reserved by Unicode standard.
41563
+ */
41564
+
41565
+ var formatters$2 = {
41566
+ // Year
41567
+ y: function (date, token) {
41568
+ // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
41569
+ // | Year | y | yy | yyy | yyyy | yyyyy |
41570
+ // |----------|-------|----|-------|-------|-------|
41571
+ // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
41572
+ // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
41573
+ // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
41574
+ // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
41575
+ // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
41576
+ var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
41577
+
41578
+ var year = signedYear > 0 ? signedYear : 1 - signedYear;
41579
+ return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
41580
+ },
41581
+ // Month
41582
+ M: function (date, token) {
41583
+ var month = date.getUTCMonth();
41584
+ return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);
41585
+ },
41586
+ // Day of the month
41587
+ d: function (date, token) {
41588
+ return addLeadingZeros(date.getUTCDate(), token.length);
41589
+ },
41590
+ // AM or PM
41591
+ a: function (date, token) {
41592
+ var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
41593
+
41594
+ switch (token) {
41595
+ case 'a':
41596
+ case 'aa':
41597
+ return dayPeriodEnumValue.toUpperCase();
41598
+
41599
+ case 'aaa':
41600
+ return dayPeriodEnumValue;
41601
+
41602
+ case 'aaaaa':
41603
+ return dayPeriodEnumValue[0];
41604
+
41605
+ case 'aaaa':
41606
+ default:
41607
+ return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
41608
+ }
41609
+ },
41610
+ // Hour [1-12]
41611
+ h: function (date, token) {
41612
+ return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);
41613
+ },
41614
+ // Hour [0-23]
41615
+ H: function (date, token) {
41616
+ return addLeadingZeros(date.getUTCHours(), token.length);
41617
+ },
41618
+ // Minute
41619
+ m: function (date, token) {
41620
+ return addLeadingZeros(date.getUTCMinutes(), token.length);
41621
+ },
41622
+ // Second
41623
+ s: function (date, token) {
41624
+ return addLeadingZeros(date.getUTCSeconds(), token.length);
41625
+ },
41626
+ // Fraction of second
41627
+ S: function (date, token) {
41628
+ var numberOfDigits = token.length;
41629
+ var milliseconds = date.getUTCMilliseconds();
41630
+ var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));
41631
+ return addLeadingZeros(fractionalSeconds, token.length);
41632
+ }
41633
+ };
41634
+ var formatters$3 = formatters$2;
41635
+
41533
41636
  var dayPeriodEnum = {
41534
41637
  am: 'am',
41535
41638
  pm: 'pm',
@@ -42356,7 +42459,7 @@ var formatters = {
42356
42459
  }
42357
42460
  };
42358
42461
 
42359
- function formatTimezoneShort(offset, delimiter) {
42462
+ function formatTimezoneShort(offset, dirtyDelimiter) {
42360
42463
  var sign = offset > 0 ? '-' : '+';
42361
42464
  var absOffset = Math.abs(offset);
42362
42465
  var hours = Math.floor(absOffset / 60);
@@ -42366,6 +42469,7 @@ function formatTimezoneShort(offset, delimiter) {
42366
42469
  return sign + String(hours);
42367
42470
  }
42368
42471
 
42472
+ var delimiter = dirtyDelimiter || '';
42369
42473
  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
42370
42474
  }
42371
42475
 
@@ -42771,7 +42875,7 @@ var unescapedLatinCharacterRegExp$1 = /[a-zA-Z]/;
42771
42875
  * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.
42772
42876
  * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr
42773
42877
  *
42774
- * 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.
42878
+ * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.
42775
42879
  * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr
42776
42880
  *
42777
42881
  * ### v2.0.0 breaking changes:
@@ -44143,7 +44247,7 @@ var parsers = {
44143
44247
  date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);
44144
44248
  return date;
44145
44249
  },
44146
- incompatibleTokens: ['b', 'B', 'H', 'K', 'k', 't', 'T']
44250
+ incompatibleTokens: ['b', 'B', 'H', 'k', 't', 'T']
44147
44251
  },
44148
44252
  // AM, PM, midnight
44149
44253
  b: {
@@ -44185,7 +44289,7 @@ var parsers = {
44185
44289
  date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);
44186
44290
  return date;
44187
44291
  },
44188
- incompatibleTokens: ['a', 'B', 'H', 'K', 'k', 't', 'T']
44292
+ incompatibleTokens: ['a', 'B', 'H', 'k', 't', 'T']
44189
44293
  },
44190
44294
  // in the morning, in the afternoon, in the evening, at night
44191
44295
  B: {
@@ -44321,7 +44425,7 @@ var parsers = {
44321
44425
 
44322
44426
  return date;
44323
44427
  },
44324
- incompatibleTokens: ['a', 'b', 'h', 'H', 'k', 't', 'T']
44428
+ incompatibleTokens: ['h', 'H', 'k', 't', 'T']
44325
44429
  },
44326
44430
  // Hour [1-24]
44327
44431
  k: {
@@ -44679,7 +44783,7 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
44679
44783
  * | | | tt | ... | 2 |
44680
44784
  * | Fraction of second | 30 | S | 0, 1, ..., 9 | |
44681
44785
  * | | | SS | 00, 01, ..., 99 | |
44682
- * | | | SSS | 000, 0001, ..., 999 | |
44786
+ * | | | SSS | 000, 001, ..., 999 | |
44683
44787
  * | | | SSSS | ... | 2 |
44684
44788
  * | Milliseconds timestamp | 20 | T | 512969520900 | |
44685
44789
  * | | | TT | ... | 2 |
@@ -45202,7 +45306,7 @@ function cleanEscapedString(input) {
45202
45306
  * | | | tt | ... | 2 |
45203
45307
  * | Fraction of second | 30 | S | 0, 1, ..., 9 | |
45204
45308
  * | | | SS | 00, 01, ..., 99 | |
45205
- * | | | SSS | 000, 0001, ..., 999 | |
45309
+ * | | | SSS | 000, 001, ..., 999 | |
45206
45310
  * | | | SSSS | ... | 2 |
45207
45311
  * | Milliseconds timestamp | 20 | T | 512969520900 | |
45208
45312
  * | | | TT | ... | 2 |