@extend-ai/react-xlsx 0.20.0 → 0.20.1

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.
Files changed (44) hide show
  1. package/README.md +1 -0
  2. package/dist/{chart-renderer-AAVZ34BF.cjs → chart-renderer-K2VM257E.cjs} +5 -5
  3. package/dist/{chart-renderer-AAVZ34BF.cjs.map → chart-renderer-K2VM257E.cjs.map} +1 -1
  4. package/dist/{chart-renderer-NM5UVCTO.cjs → chart-renderer-K6GORT3R.cjs} +5 -5
  5. package/dist/{chart-renderer-NM5UVCTO.cjs.map → chart-renderer-K6GORT3R.cjs.map} +1 -1
  6. package/dist/{chunk-MCFUTO4J.cjs → chunk-2MVEKDY2.cjs} +4 -4
  7. package/dist/{chunk-MCFUTO4J.cjs.map → chunk-2MVEKDY2.cjs.map} +1 -1
  8. package/dist/{chunk-6K3NSKDJ.cjs → chunk-54YBFWL3.cjs} +4 -4
  9. package/dist/{chunk-6K3NSKDJ.cjs.map → chunk-54YBFWL3.cjs.map} +1 -1
  10. package/dist/{chunk-T5WZHPIN.cjs → chunk-AD4CGQN2.cjs} +2 -2
  11. package/dist/{chunk-T5WZHPIN.cjs.map → chunk-AD4CGQN2.cjs.map} +1 -1
  12. package/dist/{chunk-QN3D3JS2.js → chunk-GXJO6CK6.js} +123 -29
  13. package/dist/chunk-GXJO6CK6.js.map +1 -0
  14. package/dist/{chunk-2YBG7XQ3.cjs → chunk-HAHCVXCU.cjs} +910 -816
  15. package/dist/chunk-HAHCVXCU.cjs.map +1 -0
  16. package/dist/index.cjs +605 -527
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +3 -0
  19. package/dist/index.d.ts +3 -0
  20. package/dist/index.js +102 -24
  21. package/dist/index.js.map +1 -1
  22. package/dist/{internal-DrXSHYJZ.d.cts → internal-trWFv9In.d.cts} +3 -0
  23. package/dist/{internal-DrXSHYJZ.d.ts → internal-trWFv9In.d.ts} +3 -0
  24. package/dist/internal.cjs +4 -4
  25. package/dist/internal.d.cts +1 -1
  26. package/dist/internal.d.ts +1 -1
  27. package/dist/internal.js +1 -1
  28. package/dist/{region-map-geography-6TGXBY3V.cjs → region-map-geography-VEN5CPRS.cjs} +2 -2
  29. package/dist/{region-map-geography-6TGXBY3V.cjs.map → region-map-geography-VEN5CPRS.cjs.map} +1 -1
  30. package/dist/{spreadsheet-font-assets-4AHYDTAQ.cjs → spreadsheet-font-assets-6FKCVICP.cjs} +2 -2
  31. package/dist/{spreadsheet-font-assets-4AHYDTAQ.cjs.map → spreadsheet-font-assets-6FKCVICP.cjs.map} +1 -1
  32. package/dist/{surface-regl-AY7JZVYY.cjs → surface-regl-2NNG62KS.cjs} +2 -2
  33. package/dist/{surface-regl-AY7JZVYY.cjs.map → surface-regl-2NNG62KS.cjs.map} +1 -1
  34. package/dist/{surface-regl-5Z6IVOID.cjs → surface-regl-SUJ2TFZA.cjs} +2 -2
  35. package/dist/{surface-regl-5Z6IVOID.cjs.map → surface-regl-SUJ2TFZA.cjs.map} +1 -1
  36. package/dist/vanilla.cjs +4 -4
  37. package/dist/vanilla.d.cts +2 -2
  38. package/dist/vanilla.d.ts +2 -2
  39. package/dist/vanilla.js +1 -1
  40. package/dist/xlsx-worker.js +67 -1
  41. package/dist/xlsx-worker.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/chunk-2YBG7XQ3.cjs.map +0 -1
  44. package/dist/chunk-QN3D3JS2.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;require('./chunk-6K3NSKDJ.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;require('./chunk-54YBFWL3.cjs');
2
2
 
3
3
 
4
4
 
@@ -6,7 +6,70 @@
6
6
  var _chunk5ERNVHSOcjs = require('./chunk-5ERNVHSO.cjs');
7
7
 
8
8
 
9
- var _chunkT5WZHPINcjs = require('./chunk-T5WZHPIN.cjs');
9
+ var _chunkAD4CGQN2cjs = require('./chunk-AD4CGQN2.cjs');
10
+
11
+ // src/number-locale.ts
12
+ var separators = /* @__PURE__ */ new Map();
13
+ function parseLocaleNumber(text, locale) {
14
+ if (locale === "en-US") return void 0;
15
+ const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);
16
+ const decimal = _nullishCoalesce(_optionalChain([parts, 'access', _2 => _2.find, 'call', _3 => _3((part) => part.type === "decimal"), 'optionalAccess', _4 => _4.value]), () => ( "."));
17
+ const group = _nullishCoalesce(_optionalChain([parts, 'access', _5 => _5.find, 'call', _6 => _6((part) => part.type === "group"), 'optionalAccess', _7 => _7.value]), () => ( ","));
18
+ let normalized = text.trim();
19
+ const percent = normalized.endsWith("%");
20
+ if (percent) normalized = normalized.slice(0, -1).trim();
21
+ normalized = group.trim() === "" ? normalized.replace(/[ \u00a0\u202f]/g, "") : normalized.split(group).join("");
22
+ normalized = normalized.replace(decimal, ".");
23
+ if (!/^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/.test(normalized)) return void 0;
24
+ const value = Number(normalized) / (percent ? 100 : 1);
25
+ return Number.isFinite(value) ? value : void 0;
26
+ }
27
+ function localizeCellNumber(worksheet, row, col, text, locale = "en-US") {
28
+ if (locale === "en-US" || !text) return text;
29
+ const value = worksheet.getCalculatedValueAt(row, col);
30
+ try {
31
+ if (!value.is_number) return text;
32
+ } finally {
33
+ value.free();
34
+ }
35
+ const style = worksheet.getCellStyleAt(row, col);
36
+ const format = _optionalChain([style, 'optionalAccess', _8 => _8.numberFormat]);
37
+ if (_optionalChain([format, 'optionalAccess', _9 => _9.isDateFormat])) return text;
38
+ let symbols = separators.get(locale);
39
+ if (!symbols) {
40
+ const parts = new Intl.NumberFormat(locale).formatToParts(12345.6);
41
+ symbols = {
42
+ decimal: _nullishCoalesce(_optionalChain([parts, 'access', _10 => _10.find, 'call', _11 => _11((part) => part.type === "decimal"), 'optionalAccess', _12 => _12.value]), () => ( ".")),
43
+ group: _nullishCoalesce(_optionalChain([parts, 'access', _13 => _13.find, 'call', _14 => _14((part) => part.type === "group"), 'optionalAccess', _15 => _15.value]), () => ( ","))
44
+ };
45
+ if (separators.size >= 100) separators.clear();
46
+ separators.set(locale, symbols);
47
+ }
48
+ if (symbols.decimal === "." && symbols.group === ",") return text;
49
+ const protectedPositions = /* @__PURE__ */ new Set();
50
+ const code = _nullishCoalesce(_optionalChain([format, 'optionalAccess', _16 => _16.formatString]), () => ( ""));
51
+ const literalPattern = /"[^"]*"|\\.|\[[^\]]*\]/g;
52
+ const firstPlaceholder = code.replace(literalPattern, (token) => " ".repeat(token.length)).search(/[0#?]/);
53
+ const literals = [...code.matchAll(literalPattern)];
54
+ let suffixEnd = text.length;
55
+ let prefixStart = 0;
56
+ const protect = (token, suffix) => {
57
+ const literal = token.startsWith('"') ? token.slice(1, -1) : token.startsWith("\\") ? token.slice(1) : token.startsWith("[$") ? token.slice(2, -1).split("-")[0] : "";
58
+ if (!literal) return;
59
+ const offset = suffix ? text.lastIndexOf(literal, suffixEnd - literal.length) : text.indexOf(literal, prefixStart);
60
+ if (offset >= 0) {
61
+ for (let i = offset; i < offset + literal.length; i++) protectedPositions.add(i);
62
+ if (suffix) suffixEnd = offset;
63
+ else prefixStart = offset + literal.length;
64
+ }
65
+ };
66
+ for (const token of literals.filter((token2) => token2.index < firstPlaceholder)) protect(token[0], false);
67
+ for (const token of literals.filter((token2) => token2.index >= firstPlaceholder).reverse()) protect(token[0], true);
68
+ return text.replace(
69
+ /\d[\d,]*(?:\.\d*)?|\.\d+/g,
70
+ (number, offset) => number.replace(/[.,]/g, (separator, index) => protectedPositions.has(offset + index) ? separator : separator === "." ? symbols.decimal : symbols.group)
71
+ );
72
+ }
10
73
 
11
74
  // src/spreadsheet-fonts.ts
12
75
  var fontLoadPromise;
@@ -15,7 +78,7 @@ function loadSpreadsheetFonts() {
15
78
  if (typeof document === "undefined" || typeof FontFace === "undefined") {
16
79
  return Promise.resolve();
17
80
  }
18
- return fontLoadPromise ??= Promise.resolve().then(() => _interopRequireWildcard(require("./spreadsheet-font-assets-4AHYDTAQ.cjs"))).then(async ({ spreadsheetFontFaces }) => {
81
+ return fontLoadPromise ??= Promise.resolve().then(() => _interopRequireWildcard(require("./spreadsheet-font-assets-6FKCVICP.cjs"))).then(async ({ spreadsheetFontFaces }) => {
19
82
  await Promise.allSettled(spreadsheetFontFaces.map(async ({ source, ...descriptors }) => {
20
83
  const face = new FontFace(SPREADSHEET_FALLBACK_FONT, `url(${JSON.stringify(source)})`, descriptors);
21
84
  await face.load();
@@ -122,19 +185,19 @@ function splitTopLevelSeriesArguments(value) {
122
185
  }
123
186
  function readSeriesNameFormula(series) {
124
187
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
125
- return typeof _optionalChain([raw, 'optionalAccess', _2 => _2.name]) === "string" && raw.name.length > 0 ? raw.name : null;
188
+ return typeof _optionalChain([raw, 'optionalAccess', _17 => _17.name]) === "string" && raw.name.length > 0 ? raw.name : null;
126
189
  }
127
190
  function buildChartSeriesFormula(chart, seriesIndex) {
128
- const series = _optionalChain([chart, 'optionalAccess', _3 => _3.series, 'access', _4 => _4[seriesIndex]]);
191
+ const series = _optionalChain([chart, 'optionalAccess', _18 => _18.series, 'access', _19 => _19[seriesIndex]]);
129
192
  if (!chart || !series) {
130
193
  return "";
131
194
  }
132
195
  const nameFormula = readSeriesNameFormula(series);
133
196
  const nameArgument = _nullishCoalesce(nameFormula, () => ( quoteSeriesFormulaString(_nullishCoalesce(series.name, () => ( `Series ${seriesIndex + 1}`)))));
134
- const categoryArgument = _nullishCoalesce(_optionalChain([series, 'access', _5 => _5.categoriesRef, 'optionalAccess', _6 => _6.formula]), () => ( ""));
135
- const valueArgument = _nullishCoalesce(_optionalChain([series, 'access', _7 => _7.valuesRef, 'optionalAccess', _8 => _8.formula]), () => ( ""));
197
+ const categoryArgument = _nullishCoalesce(_optionalChain([series, 'access', _20 => _20.categoriesRef, 'optionalAccess', _21 => _21.formula]), () => ( ""));
198
+ const valueArgument = _nullishCoalesce(_optionalChain([series, 'access', _22 => _22.valuesRef, 'optionalAccess', _23 => _23.formula]), () => ( ""));
136
199
  const orderArgument = String(seriesIndex + 1);
137
- const bubbleArgument = _optionalChain([series, 'access', _9 => _9.bubbleSizeRef, 'optionalAccess', _10 => _10.formula]);
200
+ const bubbleArgument = _optionalChain([series, 'access', _24 => _24.bubbleSizeRef, 'optionalAccess', _25 => _25.formula]);
138
201
  return [
139
202
  `=SERIES(${nameArgument}`,
140
203
  categoryArgument,
@@ -151,7 +214,7 @@ function parseChartSeriesFormula(formula, chart) {
151
214
  return null;
152
215
  }
153
216
  const args = splitTopLevelSeriesArguments(match[1]);
154
- const isBubble = _optionalChain([chart, 'optionalAccess', _11 => _11.chartType]) === "Bubble";
217
+ const isBubble = _optionalChain([chart, 'optionalAccess', _26 => _26.chartType]) === "Bubble";
155
218
  if (args.length < 4 || args.length > 5 || isBubble && args.length !== 5) {
156
219
  return null;
157
220
  }
@@ -202,7 +265,7 @@ function applyChartSeriesFormula(chart, seriesIndex, formula, workbook) {
202
265
  const nextSeries = {
203
266
  ...currentSeries,
204
267
  bubbleSizeRef,
205
- bubbleSizes: workbook && _optionalChain([bubbleSizeRef, 'optionalAccess', _12 => _12.formula]) ? resolveReferenceValues(workbook, chart.workbookSheetIndex, bubbleSizeRef, "value").map((value) => typeof value === "number" && Number.isFinite(value) ? value : null) : currentSeries.bubbleSizes,
268
+ bubbleSizes: workbook && _optionalChain([bubbleSizeRef, 'optionalAccess', _27 => _27.formula]) ? resolveReferenceValues(workbook, chart.workbookSheetIndex, bubbleSizeRef, "value").map((value) => typeof value === "number" && Number.isFinite(value) ? value : null) : currentSeries.bubbleSizes,
206
269
  categories: workbook ? resolveReferenceValues(workbook, chart.workbookSheetIndex, categoriesRef, "category") : currentSeries.categories,
207
270
  categoriesRef,
208
271
  name: _nullishCoalesce(parsed.nameLiteral, () => ( (parsed.nameFormula && workbook ? resolveSeriesName(workbook, chart.workbookSheetIndex, parsed.nameFormula) : _nullishCoalesce(parsed.nameFormula, () => ( currentSeries.name))))),
@@ -276,11 +339,11 @@ function resolveColorFromXmlFragment(fragment, themePalette) {
276
339
  return void 0;
277
340
  }
278
341
  const srgbMatch = fragment.match(/<a:srgbClr\b[^>]*\bval="([0-9a-fA-F]{6,8})"/i);
279
- if (_optionalChain([srgbMatch, 'optionalAccess', _13 => _13[1]])) {
342
+ if (_optionalChain([srgbMatch, 'optionalAccess', _28 => _28[1]])) {
280
343
  return _nullishCoalesce(normalizeHexColor(srgbMatch[1]), () => ( void 0));
281
344
  }
282
345
  const schemeMatch = _nullishCoalesce(fragment.match(/<a:schemeClr\b[^>]*\bval="([^"]+)"[^>]*>([\s\S]*?)<\/a:schemeClr>/i), () => ( fragment.match(/<a:schemeClr\b[^>]*\bval="([^"]+)"[^>]*/i)));
283
- if (!_optionalChain([schemeMatch, 'optionalAccess', _14 => _14[1]])) {
346
+ if (!_optionalChain([schemeMatch, 'optionalAccess', _29 => _29[1]])) {
284
347
  return void 0;
285
348
  }
286
349
  const baseColor = resolveThemeColor(schemeMatch[1], themePalette);
@@ -291,7 +354,7 @@ function resolveColorFromXmlFragment(fragment, themePalette) {
291
354
  let lightnessModifier = 1;
292
355
  let lightnessOffset = 0;
293
356
  for (const match of transforms.matchAll(/<a:(lumMod|lumOff|tint|shade)\b[^>]*\bval="(-?\d+(?:\.\d+)?)"/gi)) {
294
- const transform = _optionalChain([match, 'access', _15 => _15[1], 'optionalAccess', _16 => _16.toLowerCase, 'call', _17 => _17()]);
357
+ const transform = _optionalChain([match, 'access', _30 => _30[1], 'optionalAccess', _31 => _31.toLowerCase, 'call', _32 => _32()]);
295
358
  const rawValue = Number(_nullishCoalesce(match[2], () => ( Number.NaN)));
296
359
  if (!transform || !Number.isFinite(rawValue)) {
297
360
  continue;
@@ -309,7 +372,7 @@ function resolveColorFromXmlFragment(fragment, themePalette) {
309
372
  return _nullishCoalesce(applyLightnessTransform(baseColor, lightnessModifier, lightnessOffset), () => ( void 0));
310
373
  }
311
374
  function readHexColorFromXmlFragment(fragment, preferLine = false, themePalette) {
312
- const source = preferLine ? _nullishCoalesce(_optionalChain([fragment, 'access', _18 => _18.match, 'call', _19 => _19(/<a:ln\b[\s\S]*?<\/a:ln>/i), 'optionalAccess', _20 => _20[0]]), () => ( "")) : _nullishCoalesce(_optionalChain([fragment, 'access', _21 => _21.match, 'call', _22 => _22(/<a:solidFill\b[\s\S]*?<\/a:solidFill>/i), 'optionalAccess', _23 => _23[0]]), () => ( ""));
375
+ const source = preferLine ? _nullishCoalesce(_optionalChain([fragment, 'access', _33 => _33.match, 'call', _34 => _34(/<a:ln\b[\s\S]*?<\/a:ln>/i), 'optionalAccess', _35 => _35[0]]), () => ( "")) : _nullishCoalesce(_optionalChain([fragment, 'access', _36 => _36.match, 'call', _37 => _37(/<a:solidFill\b[\s\S]*?<\/a:solidFill>/i), 'optionalAccess', _38 => _38[0]]), () => ( ""));
313
376
  return resolveColorFromXmlFragment(source, themePalette);
314
377
  }
315
378
  function parseFallbackSeriesStylesFromChartXml(chartXml, themePalette) {
@@ -318,7 +381,7 @@ function parseFallbackSeriesStylesFromChartXml(chartXml, themePalette) {
318
381
  return [];
319
382
  }
320
383
  return seriesBlocks.map((seriesBlock) => {
321
- const shapeBlock = _nullishCoalesce(_optionalChain([seriesBlock, 'access', _24 => _24.match, 'call', _25 => _25(/<c:spPr\b[\s\S]*?<\/c:spPr>/i), 'optionalAccess', _26 => _26[0]]), () => ( ""));
384
+ const shapeBlock = _nullishCoalesce(_optionalChain([seriesBlock, 'access', _39 => _39.match, 'call', _40 => _40(/<c:spPr\b[\s\S]*?<\/c:spPr>/i), 'optionalAccess', _41 => _41[0]]), () => ( ""));
322
385
  return {
323
386
  color: readHexColorFromXmlFragment(shapeBlock, false, themePalette),
324
387
  lineColor: readHexColorFromXmlFragment(shapeBlock, true, themePalette)
@@ -362,12 +425,12 @@ function parseFallbackPointStylesFromChartXml(chartXml, themePalette) {
362
425
  const styles = [];
363
426
  for (const pointBlock of pointBlocks) {
364
427
  const indexMatch = pointBlock.match(/<c:idx\b[^>]*\bval="(-?\d+)"/i);
365
- const index = _optionalChain([indexMatch, 'optionalAccess', _27 => _27[1]]) ? Number(indexMatch[1]) : Number.NaN;
428
+ const index = _optionalChain([indexMatch, 'optionalAccess', _42 => _42[1]]) ? Number(indexMatch[1]) : Number.NaN;
366
429
  if (!Number.isFinite(index)) {
367
430
  continue;
368
431
  }
369
432
  const explosionMatch = pointBlock.match(/<c:explosion\b[^>]*\bval="(-?\d+(?:\.\d+)?)"/i);
370
- const explosionValue = _optionalChain([explosionMatch, 'optionalAccess', _28 => _28[1]]) ? Number(explosionMatch[1]) : Number.NaN;
433
+ const explosionValue = _optionalChain([explosionMatch, 'optionalAccess', _43 => _43[1]]) ? Number(explosionMatch[1]) : Number.NaN;
371
434
  styles.push({
372
435
  color: readHexColorFromXmlFragment(pointBlock, false, themePalette),
373
436
  explosion: Number.isFinite(explosionValue) ? explosionValue : void 0,
@@ -384,7 +447,7 @@ function parseNumericPointCacheFromXmlFragment(fragment) {
384
447
  return [];
385
448
  }
386
449
  const explicitPointCountMatch = fragment.match(/<c:ptCount\b[^>]*\bval="(\d+)"/i);
387
- const explicitPointCount = _optionalChain([explicitPointCountMatch, 'optionalAccess', _29 => _29[1]]) ? Number(explicitPointCountMatch[1]) : Number.NaN;
450
+ const explicitPointCount = _optionalChain([explicitPointCountMatch, 'optionalAccess', _44 => _44[1]]) ? Number(explicitPointCountMatch[1]) : Number.NaN;
388
451
  const maxIndex = pointMatches.reduce((max, match) => {
389
452
  const current = Number(_nullishCoalesce(match[1], () => ( Number.NaN)));
390
453
  return Number.isFinite(current) ? Math.max(max, current) : max;
@@ -412,7 +475,7 @@ function parseFallbackBubbleSizesFromChartXml(chartXml) {
412
475
  return [];
413
476
  }
414
477
  return seriesBlocks.map((seriesBlock) => {
415
- const bubbleSizeBlock = _nullishCoalesce(_optionalChain([seriesBlock, 'access', _30 => _30.match, 'call', _31 => _31(/<c:bubbleSize\b[\s\S]*?<\/c:bubbleSize>/i), 'optionalAccess', _32 => _32[0]]), () => ( ""));
478
+ const bubbleSizeBlock = _nullishCoalesce(_optionalChain([seriesBlock, 'access', _45 => _45.match, 'call', _46 => _46(/<c:bubbleSize\b[\s\S]*?<\/c:bubbleSize>/i), 'optionalAccess', _47 => _47[0]]), () => ( ""));
416
479
  if (!bubbleSizeBlock) {
417
480
  return [];
418
481
  }
@@ -534,17 +597,17 @@ function resolveThemeColor(name, themePalette) {
534
597
  return null;
535
598
  }
536
599
  const index = THEME_COLOR_INDEX_BY_NAME[name];
537
- return index === void 0 ? null : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _33 => _33.colorsByIndex, 'access', _34 => _34[index]]), () => ( null));
600
+ return index === void 0 ? null : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _48 => _48.colorsByIndex, 'access', _49 => _49[index]]), () => ( null));
538
601
  }
539
602
  function resolveThemeTypeface(typeface, themePalette) {
540
603
  if (!typeface) {
541
604
  return null;
542
605
  }
543
606
  if (typeface === "+mn-lt" || typeface === "+mn-ea" || typeface === "+mn-cs") {
544
- return _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _35 => _35.minorLatinFont]), () => ( null));
607
+ return _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _50 => _50.minorLatinFont]), () => ( null));
545
608
  }
546
609
  if (typeface === "+mj-lt" || typeface === "+mj-ea" || typeface === "+mj-cs") {
547
- return _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _36 => _36.majorLatinFont]), () => ( null));
610
+ return _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _51 => _51.majorLatinFont]), () => ( null));
548
611
  }
549
612
  return typeface;
550
613
  }
@@ -556,8 +619,8 @@ function readChartTextTypeface(textPropertiesNode, themePalette) {
556
619
  if (!defaultRunProperties) {
557
620
  return null;
558
621
  }
559
- const typeface = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _37 => _37(defaultRunProperties, "latin"), 'optionalAccess', _38 => _38.getAttribute, 'call', _39 => _39("typeface")]), () => ( _optionalChain([getFirstLocalChild, 'call', _40 => _40(defaultRunProperties, "ea"), 'optionalAccess', _41 => _41.getAttribute, 'call', _42 => _42("typeface")]))), () => ( _optionalChain([getFirstLocalChild, 'call', _43 => _43(defaultRunProperties, "cs"), 'optionalAccess', _44 => _44.getAttribute, 'call', _45 => _45("typeface")]))), () => ( null));
560
- const resolved = _nullishCoalesce(_optionalChain([resolveThemeTypeface, 'call', _46 => _46(typeface, themePalette), 'optionalAccess', _47 => _47.trim, 'call', _48 => _48()]), () => ( ""));
622
+ const typeface = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _52 => _52(defaultRunProperties, "latin"), 'optionalAccess', _53 => _53.getAttribute, 'call', _54 => _54("typeface")]), () => ( _optionalChain([getFirstLocalChild, 'call', _55 => _55(defaultRunProperties, "ea"), 'optionalAccess', _56 => _56.getAttribute, 'call', _57 => _57("typeface")]))), () => ( _optionalChain([getFirstLocalChild, 'call', _58 => _58(defaultRunProperties, "cs"), 'optionalAccess', _59 => _59.getAttribute, 'call', _60 => _60("typeface")]))), () => ( null));
623
+ const resolved = _nullishCoalesce(_optionalChain([resolveThemeTypeface, 'call', _61 => _61(typeface, themePalette), 'optionalAccess', _62 => _62.trim, 'call', _63 => _63()]), () => ( ""));
561
624
  return resolved.length > 0 ? resolved : null;
562
625
  }
563
626
  function resolveChartColorNode(node, themePalette) {
@@ -639,7 +702,7 @@ function resolveChartFillColor(shapeNode, themePalette) {
639
702
  return resolveChartColorNode(midpointStop.colorNode, themePalette);
640
703
  }
641
704
  function resolveChartLineStyle(shapeNode, themePalette) {
642
- const lineNode = _optionalChain([shapeNode, 'optionalAccess', _49 => _49.localName]) === "ln" ? shapeNode : shapeNode ? getFirstLocalChild(shapeNode, "ln") : null;
705
+ const lineNode = _optionalChain([shapeNode, 'optionalAccess', _64 => _64.localName]) === "ln" ? shapeNode : shapeNode ? getFirstLocalChild(shapeNode, "ln") : null;
643
706
  if (!lineNode) {
644
707
  return { color: null, hidden: false, widthPx: void 0 };
645
708
  }
@@ -685,7 +748,7 @@ function normalizeLegendPosition(position) {
685
748
  }
686
749
  function readChartNumericAttribute(parent, localName) {
687
750
  const node = parent ? getFirstLocalChild(parent, localName) : null;
688
- const value = Number(_nullishCoalesce(_optionalChain([node, 'optionalAccess', _50 => _50.getAttribute, 'call', _51 => _51("val")]), () => ( Number.NaN)));
751
+ const value = Number(_nullishCoalesce(_optionalChain([node, 'optionalAccess', _65 => _65.getAttribute, 'call', _66 => _66("val")]), () => ( Number.NaN)));
689
752
  return Number.isFinite(value) ? value : void 0;
690
753
  }
691
754
  function readChartBooleanAttribute(parent, localName) {
@@ -710,7 +773,7 @@ function readChartLabelFontSizePt(textPropertiesNode) {
710
773
  return void 0;
711
774
  }
712
775
  const runPropertiesNode = _nullishCoalesce(getFirstLocalDescendant(textPropertiesNode, "defRPr"), () => ( getFirstLocalDescendant(textPropertiesNode, "rPr")));
713
- const rawSize = Number(_nullishCoalesce(_optionalChain([runPropertiesNode, 'optionalAccess', _52 => _52.getAttribute, 'call', _53 => _53("sz")]), () => ( Number.NaN)));
776
+ const rawSize = Number(_nullishCoalesce(_optionalChain([runPropertiesNode, 'optionalAccess', _67 => _67.getAttribute, 'call', _68 => _68("sz")]), () => ( Number.NaN)));
714
777
  if (!Number.isFinite(rawSize) || rawSize <= 0) {
715
778
  return void 0;
716
779
  }
@@ -756,7 +819,7 @@ function parseChartDataLabelsFromXml(labelsNode) {
756
819
  showSeriesName: readChartBooleanAttribute(labelsNode, "showSerName"),
757
820
  showValue: readChartBooleanAttribute(labelsNode, "showVal")
758
821
  };
759
- const hasValue = labels.showBubbleSize !== void 0 || labels.showCategoryName !== void 0 || labels.showLegendKey !== void 0 || labels.showPercent !== void 0 || (_nullishCoalesce(_optionalChain([labels, 'access', _54 => _54.pointLabels, 'optionalAccess', _55 => _55.length]), () => ( 0))) > 0 || labels.showSeriesName !== void 0 || labels.showValue !== void 0;
822
+ const hasValue = labels.showBubbleSize !== void 0 || labels.showCategoryName !== void 0 || labels.showLegendKey !== void 0 || labels.showPercent !== void 0 || (_nullishCoalesce(_optionalChain([labels, 'access', _69 => _69.pointLabels, 'optionalAccess', _70 => _70.length]), () => ( 0))) > 0 || labels.showSeriesName !== void 0 || labels.showValue !== void 0;
760
823
  return hasValue ? labels : null;
761
824
  }
762
825
  function readChartRelationships(archive, chartPath) {
@@ -786,7 +849,7 @@ function readChartColorPalette(archive, colorStylePath, themePalette) {
786
849
  return [];
787
850
  }
788
851
  const colorStyleDocument = parseXml(colorStyleXml);
789
- if (!_optionalChain([colorStyleDocument, 'optionalAccess', _56 => _56.documentElement])) {
852
+ if (!_optionalChain([colorStyleDocument, 'optionalAccess', _71 => _71.documentElement])) {
790
853
  return [];
791
854
  }
792
855
  return Array.from(colorStyleDocument.documentElement.childNodes).filter((child) => isElementNode(child) && child.localName !== "variation").map((child) => _nullishCoalesce(resolveChartColorNode(child, themePalette), () => ( resolveChartColorNode(findFirstChartColorElement(child), themePalette)))).filter((color) => typeof color === "string");
@@ -802,7 +865,7 @@ function readChartStyleAppearance(archive, stylePath, themePalette) {
802
865
  }
803
866
  const dataPointNode = getFirstLocalDescendant(styleDocument, "dataPoint");
804
867
  const fillRefNode = dataPointNode ? getFirstLocalChild(dataPointNode, "fillRef") : null;
805
- const index = Number(_nullishCoalesce(_optionalChain([fillRefNode, 'optionalAccess', _57 => _57.getAttribute, 'call', _58 => _58("idx")]), () => ( Number.NaN)));
868
+ const index = Number(_nullishCoalesce(_optionalChain([fillRefNode, 'optionalAccess', _72 => _72.getAttribute, 'call', _73 => _73("idx")]), () => ( Number.NaN)));
806
869
  const chartAreaNode = getFirstLocalDescendant(styleDocument, "chartArea");
807
870
  const chartAreaShapeProperties = chartAreaNode ? getFirstLocalChild(chartAreaNode, "spPr") : null;
808
871
  const chartAreaFontRef = chartAreaNode ? getFirstLocalChild(chartAreaNode, "fontRef") : null;
@@ -826,29 +889,29 @@ function readChartStyleAppearance(archive, stylePath, themePalette) {
826
889
  };
827
890
  }
828
891
  function buildThemeSeriesPalette(themePalette) {
829
- const themeColors = [4, 5, 6, 7, 8, 9].map((index) => _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _59 => _59.colorsByIndex, 'access', _60 => _60[index]]), () => ( null))).filter((color) => Boolean(color));
892
+ const themeColors = [4, 5, 6, 7, 8, 9].map((index) => _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _74 => _74.colorsByIndex, 'access', _75 => _75[index]]), () => ( null))).filter((color) => Boolean(color));
830
893
  return themeColors.length > 0 ? themeColors : SERIES_COLORS;
831
894
  }
832
895
  function applyBuiltinSurfaceDefaults(chart, themePalette) {
833
896
  if (chart.chartType !== "Surface") {
834
897
  return;
835
898
  }
836
- const builtin = _optionalChain([chart, 'access', _61 => _61.raw, 'optionalAccess', _62 => _62.hasCustomChartColorStyle]) !== true ? _chunk5ERNVHSOcjs.getBuiltinChartSurfaceStyle.call(void 0, chart.chartStyleId) : void 0;
837
- const colors = _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _63 => _63.colorsByIndex]), () => ( {}));
838
- const wallFill = _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _64 => _64.wall, 'access', _65 => _65.fill]), colors), () => ( (chart.wireframe ? "#d0d0d0" : "#d9d9df")));
839
- const floorFill = _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _66 => _66.floor, 'access', _67 => _67.fill]), colors), () => ( wallFill));
840
- const gridlineColor = _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _68 => _68.majorGridline]), colors);
899
+ const builtin = _optionalChain([chart, 'access', _76 => _76.raw, 'optionalAccess', _77 => _77.hasCustomChartColorStyle]) !== true ? _chunk5ERNVHSOcjs.getBuiltinChartSurfaceStyle.call(void 0, chart.chartStyleId) : void 0;
900
+ const colors = _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _78 => _78.colorsByIndex]), () => ( {}));
901
+ const wallFill = _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _79 => _79.wall, 'access', _80 => _80.fill]), colors), () => ( (chart.wireframe ? "#d0d0d0" : "#d9d9df")));
902
+ const floorFill = _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _81 => _81.floor, 'access', _82 => _82.fill]), colors), () => ( wallFill));
903
+ const gridlineColor = _chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _optionalChain([builtin, 'optionalAccess', _83 => _83.majorGridline]), colors);
841
904
  for (const axis of [chart.categoryAxis, chart.valueAxis, chart.seriesAxis]) {
842
905
  if (axis && !axis.majorGridlineColor) axis.majorGridlineColor = gridlineColor;
843
906
  }
844
907
  const wallLine = chart.wireframe ? "#a6a6a6" : "#a8adb7";
845
- const previousDefaults = _optionalChain([chart, 'access', _69 => _69.raw, 'optionalAccess', _70 => _70.builtinSurfaceDefaults]);
908
+ const previousDefaults = _optionalChain([chart, 'access', _84 => _84.raw, 'optionalAccess', _85 => _85.builtinSurfaceDefaults]);
846
909
  const nextDefaults = {};
847
910
  for (const key of ["floor", "sideWall", "backWall"]) {
848
911
  const wall = _nullishCoalesce(chart[key], () => ( {}));
849
- const previous = _optionalChain([previousDefaults, 'optionalAccess', _71 => _71[key]]);
850
- const fillIsDefault = wall.fillColor === void 0 || wall.fillColor === _optionalChain([previous, 'optionalAccess', _72 => _72.fillColor]);
851
- const lineIsDefault = wall.lineColor === void 0 || wall.lineColor === _optionalChain([previous, 'optionalAccess', _73 => _73.lineColor]);
912
+ const previous = _optionalChain([previousDefaults, 'optionalAccess', _86 => _86[key]]);
913
+ const fillIsDefault = wall.fillColor === void 0 || wall.fillColor === _optionalChain([previous, 'optionalAccess', _87 => _87.fillColor]);
914
+ const lineIsDefault = wall.lineColor === void 0 || wall.lineColor === _optionalChain([previous, 'optionalAccess', _88 => _88.lineColor]);
852
915
  const fillColor = fillIsDefault ? key === "floor" ? floorFill : wallFill : wall.fillColor;
853
916
  const lineColor = lineIsDefault ? wallLine : wall.lineColor;
854
917
  chart[key] = { ...wall, fillColor, lineColor };
@@ -864,8 +927,8 @@ function applyBuiltinSurfaceDefaults(chart, themePalette) {
864
927
  }
865
928
  function applyBuiltinChartDefaults(chart, themePalette) {
866
929
  const darkBuiltInStyle = typeof chart.chartStyleId === "number" && chart.chartStyleId >= 140 && chart.chartStyleId < 150;
867
- const textColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _74 => _74.colorsByIndex, 'access', _75 => _75[1]]), () => ( _optionalChain([themePalette, 'optionalAccess', _76 => _76.colorsByIndex, 'access', _77 => _77[3]]))), () => ( null));
868
- const minorTypeface = _optionalChain([themePalette, 'optionalAccess', _78 => _78.minorLatinFont, 'optionalAccess', _79 => _79.trim, 'call', _80 => _80()]) || void 0;
930
+ const textColor = _nullishCoalesce(_nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _89 => _89.colorsByIndex, 'access', _90 => _90[1]]), () => ( _optionalChain([themePalette, 'optionalAccess', _91 => _91.colorsByIndex, 'access', _92 => _92[3]]))), () => ( null));
931
+ const minorTypeface = _optionalChain([themePalette, 'optionalAccess', _93 => _93.minorLatinFont, 'optionalAccess', _94 => _94.trim, 'call', _95 => _95()]) || void 0;
869
932
  const derivedAxisColor = textColor ? applyLightnessTransform(textColor, 0.35, 0.55) : null;
870
933
  const derivedBorderColor = textColor ? applyLightnessTransform(textColor, chart.is3d ? 0.28 : 0.22, chart.is3d ? 0.6 : 0.7) : null;
871
934
  if (darkBuiltInStyle) {
@@ -883,10 +946,10 @@ function applyBuiltinChartDefaults(chart, themePalette) {
883
946
  chart.axisLineColor = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(chart.axisLineColor, () => ( derivedAxisColor)), () => ( textColor)), () => ( void 0));
884
947
  chart.fontFamily = _nullishCoalesce(chart.fontFamily, () => ( minorTypeface));
885
948
  chart.titleFontFamily = _nullishCoalesce(_nullishCoalesce(chart.titleFontFamily, () => ( chart.fontFamily)), () => ( minorTypeface));
886
- const themeColors = _optionalChain([themePalette, 'optionalAccess', _81 => _81.colorsByIndex]);
887
- const useBuiltin = _optionalChain([chart, 'access', _82 => _82.raw, 'optionalAccess', _83 => _83.hasCustomChartColorStyle]) !== true && themeColors && _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, 0, 1) !== void 0;
888
- const colorCount = Math.max(1, chart.series.length, _nullishCoalesce(_optionalChain([chart, 'access', _84 => _84.typeGroups, 'optionalAccess', _85 => _85.reduce, 'call', _86 => _86((total, group) => total + group.series.length, 0)]), () => ( 0)));
889
- const seriesPalette = useBuiltin && chart.chartType !== "Surface" ? Array.from({ length: colorCount }, (_, index) => _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, index, colorCount), themeColors), () => ( SERIES_COLORS[index % SERIES_COLORS.length]))) : _optionalChain([chart, 'access', _87 => _87.chartColorPalette, 'optionalAccess', _88 => _88.length]) ? chart.chartColorPalette : buildThemeSeriesPalette(themePalette);
949
+ const themeColors = _optionalChain([themePalette, 'optionalAccess', _96 => _96.colorsByIndex]);
950
+ const useBuiltin = _optionalChain([chart, 'access', _97 => _97.raw, 'optionalAccess', _98 => _98.hasCustomChartColorStyle]) !== true && themeColors && _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, 0, 1) !== void 0;
951
+ const colorCount = Math.max(1, chart.series.length, _nullishCoalesce(_optionalChain([chart, 'access', _99 => _99.typeGroups, 'optionalAccess', _100 => _100.reduce, 'call', _101 => _101((total, group) => total + group.series.length, 0)]), () => ( 0)));
952
+ const seriesPalette = useBuiltin && chart.chartType !== "Surface" ? Array.from({ length: colorCount }, (_, index) => _nullishCoalesce(_chunk5ERNVHSOcjs.resolveBuiltinChartColor.call(void 0, _chunk5ERNVHSOcjs.getBuiltinChartColor.call(void 0, chart.chartStyleId, index, colorCount), themeColors), () => ( SERIES_COLORS[index % SERIES_COLORS.length]))) : _optionalChain([chart, 'access', _102 => _102.chartColorPalette, 'optionalAccess', _103 => _103.length]) ? chart.chartColorPalette : buildThemeSeriesPalette(themePalette);
890
953
  chart.chartColorPalette = seriesPalette;
891
954
  chart.raw = { ...chart.raw, builtinThemeColors: useBuiltin ? themeColors : void 0 };
892
955
  const applySeriesDefaults = (series, index) => {
@@ -896,7 +959,7 @@ function applyBuiltinChartDefaults(chart, themePalette) {
896
959
  const generated = {};
897
960
  const resolveColor = (key, explicit, fallback) => {
898
961
  const value = series[key];
899
- if (!explicit && (value == null || value === _optionalChain([previous, 'optionalAccess', _89 => _89[key]]) || (key === "color" || key === "lineColor") && useBuiltin && _optionalChain([chart, 'access', _90 => _90.raw, 'optionalAccess', _91 => _91.xmlChartType]))) {
962
+ if (!explicit && (value == null || value === _optionalChain([previous, 'optionalAccess', _104 => _104[key]]) || (key === "color" || key === "lineColor") && useBuiltin && _optionalChain([chart, 'access', _105 => _105.raw, 'optionalAccess', _106 => _106.xmlChartType]))) {
900
963
  generated[key] = fallback;
901
964
  return fallback;
902
965
  }
@@ -919,7 +982,7 @@ function applyBuiltinChartDefaults(chart, themePalette) {
919
982
  };
920
983
  chart.series = chart.series.map(applySeriesDefaults);
921
984
  let groupSeriesOffset = 0;
922
- chart.typeGroups = _optionalChain([chart, 'access', _92 => _92.typeGroups, 'optionalAccess', _93 => _93.map, 'call', _94 => _94((group) => {
985
+ chart.typeGroups = _optionalChain([chart, 'access', _107 => _107.typeGroups, 'optionalAccess', _108 => _108.map, 'call', _109 => _109((group) => {
923
986
  const series = group.series.map((entry, index) => applySeriesDefaults(entry, groupSeriesOffset + index));
924
987
  groupSeriesOffset += group.series.length;
925
988
  return { ...group, series };
@@ -973,7 +1036,7 @@ function parseChartCacheValues(parentNode, cacheName, mode) {
973
1036
  const rawIndex = Number(_nullishCoalesce(pointNode.getAttribute("idx"), () => ( Number.NaN)));
974
1037
  return {
975
1038
  index: Number.isFinite(rawIndex) ? rawIndex : 0,
976
- value: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _95 => _95(pointNode, "v"), 'optionalAccess', _96 => _96.textContent]), () => ( ""))
1039
+ value: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _110 => _110(pointNode, "v"), 'optionalAccess', _111 => _111.textContent]), () => ( ""))
977
1040
  };
978
1041
  }).sort((left, right) => left.index - right.index);
979
1042
  if (pointNodes.length === 0) {
@@ -1014,7 +1077,7 @@ function parseChartMultiLevelCacheValues(parentNode, mode) {
1014
1077
  const rawIndex = Number(_nullishCoalesce(pointNode.getAttribute("idx"), () => ( Number.NaN)));
1015
1078
  return {
1016
1079
  index: Number.isFinite(rawIndex) ? rawIndex : 0,
1017
- value: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _97 => _97(pointNode, "v"), 'optionalAccess', _98 => _98.textContent]), () => ( ""))
1080
+ value: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _112 => _112(pointNode, "v"), 'optionalAccess', _113 => _113.textContent]), () => ( ""))
1018
1081
  };
1019
1082
  }).sort((left, right) => left.index - right.index);
1020
1083
  if (pointNodes.length === 0) {
@@ -1051,7 +1114,7 @@ function applyChartSeriesStyleFromXml(chart, chartTypeNode, themePalette) {
1051
1114
  const fillColor = resolveChartFillColor(shapeProperties, themePalette);
1052
1115
  const markerSize = readChartNumericAttribute(markerNode, "size");
1053
1116
  const markerSymbolNode = markerNode ? getFirstLocalChild(markerNode, "symbol") : null;
1054
- const markerSymbol = _nullishCoalesce(_optionalChain([markerSymbolNode, 'optionalAccess', _99 => _99.getAttribute, 'call', _100 => _100("val")]), () => ( (markerNode || chart.chartType === "Scatter" || ["marker", "lineMarker", "smoothMarker"].includes(_nullishCoalesce(chart.scatterStyle, () => ( ""))) || readChartBooleanAttribute(chartTypeNode, "marker") === true ? "auto" : series.markerSymbol)));
1117
+ const markerSymbol = _nullishCoalesce(_optionalChain([markerSymbolNode, 'optionalAccess', _114 => _114.getAttribute, 'call', _115 => _115("val")]), () => ( (markerNode || chart.chartType === "Scatter" || ["marker", "lineMarker", "smoothMarker"].includes(_nullishCoalesce(chart.scatterStyle, () => ( ""))) || readChartBooleanAttribute(chartTypeNode, "marker") === true ? "auto" : series.markerSymbol)));
1055
1118
  const pointStyles = parseChartPointStyles(seriesNode, themePalette);
1056
1119
  const seriesExplosion = readChartNumericAttribute(seriesNode, "explosion");
1057
1120
  const invertNegativeStyle = parseInvertNegativeStyle(seriesNode, themePalette);
@@ -1061,12 +1124,12 @@ function applyChartSeriesStyleFromXml(chart, chartTypeNode, themePalette) {
1061
1124
  const cachedValues = isScatterChart ? parseChartCacheValues(getFirstLocalChild(seriesNode, "yVal"), "numCache", "value") : parseChartCacheValues(getFirstLocalChild(seriesNode, "val"), "numCache", "value");
1062
1125
  const cachedBubbleSizes = chart.chartType === "Bubble" ? parseChartCacheValues(getFirstLocalChild(seriesNode, "bubbleSize"), "numCache", "value") : null;
1063
1126
  const existingShapeProperties = series.shapeProperties && typeof series.shapeProperties === "object" ? series.shapeProperties : null;
1064
- const rawFillColor = typeof _optionalChain([existingShapeProperties, 'optionalAccess', _101 => _101.solidFillHex]) === "string" ? normalizeHexColor(existingShapeProperties.solidFillHex) : null;
1065
- const rawLineColor = typeof _optionalChain([existingShapeProperties, 'optionalAccess', _102 => _102.lineColorHex]) === "string" ? normalizeHexColor(existingShapeProperties.lineColorHex) : null;
1127
+ const rawFillColor = typeof _optionalChain([existingShapeProperties, 'optionalAccess', _116 => _116.solidFillHex]) === "string" ? normalizeHexColor(existingShapeProperties.solidFillHex) : null;
1128
+ const rawLineColor = typeof _optionalChain([existingShapeProperties, 'optionalAccess', _117 => _117.lineColorHex]) === "string" ? normalizeHexColor(existingShapeProperties.lineColorHex) : null;
1066
1129
  const resolvedLineColor = lineStyle.hidden ? void 0 : _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(rawLineColor, () => ( lineStyle.color)), () => ( rawFillColor)), () => ( fillColor)), () => ( series.lineColor)), () => ( series.color));
1067
- const hasCategoryReference = typeof _optionalChain([series, 'access', _103 => _103.categoriesRef, 'optionalAccess', _104 => _104.formula]) === "string" && series.categoriesRef.formula.length > 0;
1068
- const hasValueReference = typeof _optionalChain([series, 'access', _105 => _105.valuesRef, 'optionalAccess', _106 => _106.formula]) === "string" && series.valuesRef.formula.length > 0;
1069
- const hasBubbleSizeReference = typeof _optionalChain([series, 'access', _107 => _107.bubbleSizeRef, 'optionalAccess', _108 => _108.formula]) === "string" && series.bubbleSizeRef.formula.length > 0;
1130
+ const hasCategoryReference = typeof _optionalChain([series, 'access', _118 => _118.categoriesRef, 'optionalAccess', _119 => _119.formula]) === "string" && series.categoriesRef.formula.length > 0;
1131
+ const hasValueReference = typeof _optionalChain([series, 'access', _120 => _120.valuesRef, 'optionalAccess', _121 => _121.formula]) === "string" && series.valuesRef.formula.length > 0;
1132
+ const hasBubbleSizeReference = typeof _optionalChain([series, 'access', _122 => _122.bubbleSizeRef, 'optionalAccess', _123 => _123.formula]) === "string" && series.bubbleSizeRef.formula.length > 0;
1070
1133
  return {
1071
1134
  ...series,
1072
1135
  bubbleSizes: !hasBubbleSizeReference && cachedBubbleSizes ? cachedBubbleSizes.map((value) => typeof value === "number" && Number.isFinite(value) ? value : null) : series.bubbleSizes,
@@ -1143,10 +1206,10 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1143
1206
  for (const fallbackStyle of fallbackPointStyles) {
1144
1207
  const existing = existingByIndex.get(fallbackStyle.index);
1145
1208
  existingByIndex.set(fallbackStyle.index, {
1146
- color: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _109 => _109.color]), () => ( fallbackStyle.color)),
1147
- explosion: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _110 => _110.explosion]), () => ( fallbackStyle.explosion)),
1209
+ color: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _124 => _124.color]), () => ( fallbackStyle.color)),
1210
+ explosion: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _125 => _125.explosion]), () => ( fallbackStyle.explosion)),
1148
1211
  index: fallbackStyle.index,
1149
- lineColor: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _111 => _111.lineColor]), () => ( fallbackStyle.lineColor))
1212
+ lineColor: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _126 => _126.lineColor]), () => ( fallbackStyle.lineColor))
1150
1213
  });
1151
1214
  }
1152
1215
  return {
@@ -1174,7 +1237,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1174
1237
  };
1175
1238
  const applyRelationshipStyles = () => {
1176
1239
  chart.chartColorPalette = readChartColorPalette(archive, relationships.get(CHART_COLOR_STYLE_REL_TYPE), themePalette);
1177
- chart.raw = { ...chart.raw, hasCustomChartColorStyle: Boolean(_optionalChain([chart, 'access', _112 => _112.chartColorPalette, 'optionalAccess', _113 => _113.length])) };
1240
+ chart.raw = { ...chart.raw, hasCustomChartColorStyle: Boolean(_optionalChain([chart, 'access', _127 => _127.chartColorPalette, 'optionalAccess', _128 => _128.length])) };
1178
1241
  const styleAppearance2 = readChartStyleAppearance(
1179
1242
  archive,
1180
1243
  relationships.get(CHART_STYLE_REL_TYPE),
@@ -1190,7 +1253,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1190
1253
  return styleAppearance2;
1191
1254
  };
1192
1255
  const applyModernChartExStyles = () => {
1193
- const modernPlotAreaNode = _optionalChain([chartDocument, 'optionalAccess', _114 => _114.documentElement]) ? getFirstLocalDescendant(chartDocument.documentElement, "plotArea") : null;
1256
+ const modernPlotAreaNode = _optionalChain([chartDocument, 'optionalAccess', _129 => _129.documentElement]) ? getFirstLocalDescendant(chartDocument.documentElement, "plotArea") : null;
1194
1257
  if (!modernPlotAreaNode) {
1195
1258
  return;
1196
1259
  }
@@ -1272,12 +1335,12 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1272
1335
  const nextTypeGroups = chart.typeGroups.map((group) => ({ ...group, series: [...group.series] }));
1273
1336
  const columnGroupIndex = nextTypeGroups.findIndex((group) => group.chartType === "ColumnClustered");
1274
1337
  if (columnGroupIndex >= 0) {
1275
- const originalColumnSeries = _nullishCoalesce(_optionalChain([nextTypeGroups, 'access', _115 => _115[columnGroupIndex], 'optionalAccess', _116 => _116.series, 'access', _117 => _117[0]]), () => ( null));
1338
+ const originalColumnSeries = _nullishCoalesce(_optionalChain([nextTypeGroups, 'access', _130 => _130[columnGroupIndex], 'optionalAccess', _131 => _131.series, 'access', _132 => _132[0]]), () => ( null));
1276
1339
  const binnedColumnSeries = replaceColumnSeries(originalColumnSeries);
1277
1340
  if (binnedColumnSeries) {
1278
1341
  nextTypeGroups[columnGroupIndex].series = [binnedColumnSeries];
1279
1342
  const lineGroupIndex = nextTypeGroups.findIndex((group) => group.chartType === "Line");
1280
- if (lineGroupIndex >= 0 && _optionalChain([nextTypeGroups, 'access', _118 => _118[lineGroupIndex], 'optionalAccess', _119 => _119.series, 'access', _120 => _120[0]])) {
1343
+ if (lineGroupIndex >= 0 && _optionalChain([nextTypeGroups, 'access', _133 => _133[lineGroupIndex], 'optionalAccess', _134 => _134.series, 'access', _135 => _135[0]])) {
1281
1344
  const originalLineSeries = nextTypeGroups[lineGroupIndex].series[0];
1282
1345
  const recomputedLine = buildChartExParetoLineSeries(
1283
1346
  binnedColumnSeries,
@@ -1320,7 +1383,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1320
1383
  const chartDocument = parseXml(chartXml);
1321
1384
  const chartNode = chartDocument ? getFirstLocalDescendant(chartDocument, "chart") : null;
1322
1385
  const plotAreaNode = chartNode ? getFirstLocalChild(chartNode, "plotArea") : null;
1323
- const styleIdNode = _optionalChain([chartDocument, 'optionalAccess', _121 => _121.documentElement]) ? getFirstLocalDescendant(chartDocument.documentElement, "style") : null;
1386
+ const styleIdNode = _optionalChain([chartDocument, 'optionalAccess', _136 => _136.documentElement]) ? getFirstLocalDescendant(chartDocument.documentElement, "style") : null;
1324
1387
  const chartTypeNode = findPrimaryChartTypeNode(plotAreaNode);
1325
1388
  if (!chartNode || !chartTypeNode) {
1326
1389
  applyRelationshipStyles();
@@ -1343,8 +1406,8 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1343
1406
  switch (chartTypeNode.localName) {
1344
1407
  case "barChart":
1345
1408
  case "bar3DChart": {
1346
- const grouping = _optionalChain([getFirstLocalChild, 'call', _122 => _122(chartTypeNode, "grouping"), 'optionalAccess', _123 => _123.getAttribute, 'call', _124 => _124("val")]);
1347
- const barDir = _optionalChain([getFirstLocalChild, 'call', _125 => _125(chartTypeNode, "barDir"), 'optionalAccess', _126 => _126.getAttribute, 'call', _127 => _127("val")]);
1409
+ const grouping = _optionalChain([getFirstLocalChild, 'call', _137 => _137(chartTypeNode, "grouping"), 'optionalAccess', _138 => _138.getAttribute, 'call', _139 => _139("val")]);
1410
+ const barDir = _optionalChain([getFirstLocalChild, 'call', _140 => _140(chartTypeNode, "barDir"), 'optionalAccess', _141 => _141.getAttribute, 'call', _142 => _142("val")]);
1348
1411
  const isHorizontalBar = barDir === "bar";
1349
1412
  chart.is3d = chartTypeNode.localName === "bar3DChart" ? true : chart.is3d;
1350
1413
  if (grouping === "percentStacked") {
@@ -1358,7 +1421,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1358
1421
  }
1359
1422
  case "areaChart":
1360
1423
  case "area3DChart": {
1361
- const grouping = _optionalChain([getFirstLocalChild, 'call', _128 => _128(chartTypeNode, "grouping"), 'optionalAccess', _129 => _129.getAttribute, 'call', _130 => _130("val")]);
1424
+ const grouping = _optionalChain([getFirstLocalChild, 'call', _143 => _143(chartTypeNode, "grouping"), 'optionalAccess', _144 => _144.getAttribute, 'call', _145 => _145("val")]);
1362
1425
  chart.is3d = chartTypeNode.localName === "area3DChart" ? true : chart.is3d;
1363
1426
  if (grouping === "stacked") {
1364
1427
  chart.chartType = "AreaStacked";
@@ -1371,7 +1434,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1371
1434
  }
1372
1435
  case "lineChart":
1373
1436
  case "line3DChart": {
1374
- const grouping = _optionalChain([getFirstLocalChild, 'call', _131 => _131(chartTypeNode, "grouping"), 'optionalAccess', _132 => _132.getAttribute, 'call', _133 => _133("val")]);
1437
+ const grouping = _optionalChain([getFirstLocalChild, 'call', _146 => _146(chartTypeNode, "grouping"), 'optionalAccess', _147 => _147.getAttribute, 'call', _148 => _148("val")]);
1375
1438
  chart.is3d = chartTypeNode.localName === "line3DChart" ? true : chart.is3d;
1376
1439
  if (grouping === "stacked") {
1377
1440
  chart.chartType = "LineStacked";
@@ -1396,7 +1459,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1396
1459
  chart.chartType = "BarOfPie";
1397
1460
  break;
1398
1461
  case "scatterChart":
1399
- chart.chartType = resolveScatterChartType(_optionalChain([getFirstLocalChild, 'call', _134 => _134(chartTypeNode, "scatterStyle"), 'optionalAccess', _135 => _135.getAttribute, 'call', _136 => _136("val")]));
1462
+ chart.chartType = resolveScatterChartType(_optionalChain([getFirstLocalChild, 'call', _149 => _149(chartTypeNode, "scatterStyle"), 'optionalAccess', _150 => _150.getAttribute, 'call', _151 => _151("val")]));
1400
1463
  break;
1401
1464
  case "radarChart":
1402
1465
  chart.chartType = "Radar";
@@ -1419,19 +1482,19 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1419
1482
  break;
1420
1483
  }
1421
1484
  const legendNode = getFirstLocalChild(chartNode, "legend");
1422
- const legendPosition = legendNode ? _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _137 => _137(legendNode, "legendPos"), 'optionalAccess', _138 => _138.getAttribute, 'call', _139 => _139("val")]), () => ( void 0)) : void 0;
1423
- const legendOverlay = legendNode ? _optionalChain([getFirstLocalChild, 'call', _140 => _140(legendNode, "overlay"), 'optionalAccess', _141 => _141.getAttribute, 'call', _142 => _142("val")]) : void 0;
1485
+ const legendPosition = legendNode ? _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _152 => _152(legendNode, "legendPos"), 'optionalAccess', _153 => _153.getAttribute, 'call', _154 => _154("val")]), () => ( void 0)) : void 0;
1486
+ const legendOverlay = legendNode ? _optionalChain([getFirstLocalChild, 'call', _155 => _155(legendNode, "overlay"), 'optionalAccess', _156 => _156.getAttribute, 'call', _157 => _157("val")]) : void 0;
1424
1487
  chart.legend = legendNode ? {
1425
1488
  overlay: legendOverlay === "1",
1426
1489
  position: normalizeLegendPosition(legendPosition),
1427
- raw: _optionalChain([chart, 'access', _143 => _143.legend, 'optionalAccess', _144 => _144.raw])
1490
+ raw: _optionalChain([chart, 'access', _158 => _158.legend, 'optionalAccess', _159 => _159.raw])
1428
1491
  } : chart.legend;
1429
1492
  const plotVisibleOnly = readChartBooleanAttribute(chartNode, "plotVisOnly");
1430
1493
  if (plotVisibleOnly !== void 0) {
1431
1494
  chart.plotVisibleOnly = plotVisibleOnly;
1432
1495
  }
1433
- chart.displayBlanksAs = _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _145 => _145(chartNode, "dispBlanksAs"), 'optionalAccess', _146 => _146.getAttribute, 'call', _147 => _147("val")]), () => ( chart.displayBlanksAs));
1434
- const styleId = Number(_nullishCoalesce(_optionalChain([styleIdNode, 'optionalAccess', _148 => _148.getAttribute, 'call', _149 => _149("val")]), () => ( Number.NaN)));
1496
+ chart.displayBlanksAs = _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _160 => _160(chartNode, "dispBlanksAs"), 'optionalAccess', _161 => _161.getAttribute, 'call', _162 => _162("val")]), () => ( chart.displayBlanksAs));
1497
+ const styleId = Number(_nullishCoalesce(_optionalChain([styleIdNode, 'optionalAccess', _163 => _163.getAttribute, 'call', _164 => _164("val")]), () => ( Number.NaN)));
1435
1498
  chart.chartStyleId = Number.isFinite(styleId) ? styleId : chart.chartStyleId;
1436
1499
  chart.firstSliceAngle = _nullishCoalesce(readChartNumericAttribute(chartTypeNode, "firstSliceAng"), () => ( chart.firstSliceAngle));
1437
1500
  chart.gapWidth = _nullishCoalesce(readChartNumericAttribute(chartTypeNode, "gapWidth"), () => ( chart.gapWidth));
@@ -1441,9 +1504,9 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1441
1504
  const bubble3dNode = getFirstLocalChild(chartTypeNode, "bubble3D");
1442
1505
  chart.bubble3d = bubble3dNode ? bubble3dNode.getAttribute("val") !== "0" : chart.bubble3d;
1443
1506
  chart.holeSize = _nullishCoalesce(readChartNumericAttribute(chartTypeNode, "holeSize"), () => ( chart.holeSize));
1444
- chart.radarStyle = _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _150 => _150(chartTypeNode, "radarStyle"), 'optionalAccess', _151 => _151.getAttribute, 'call', _152 => _152("val")]), () => ( chart.radarStyle));
1445
- chart.scatterStyle = _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _153 => _153(chartTypeNode, "scatterStyle"), 'optionalAccess', _154 => _154.getAttribute, 'call', _155 => _155("val")]), () => ( chart.scatterStyle));
1446
- chart.shape3d = _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _156 => _156(chartTypeNode, "shape"), 'optionalAccess', _157 => _157.getAttribute, 'call', _158 => _158("val")]), () => ( chart.shape3d));
1507
+ chart.radarStyle = _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _165 => _165(chartTypeNode, "radarStyle"), 'optionalAccess', _166 => _166.getAttribute, 'call', _167 => _167("val")]), () => ( chart.radarStyle));
1508
+ chart.scatterStyle = _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _168 => _168(chartTypeNode, "scatterStyle"), 'optionalAccess', _169 => _169.getAttribute, 'call', _170 => _170("val")]), () => ( chart.scatterStyle));
1509
+ chart.shape3d = _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _171 => _171(chartTypeNode, "shape"), 'optionalAccess', _172 => _172.getAttribute, 'call', _173 => _173("val")]), () => ( chart.shape3d));
1447
1510
  const wireframeNode = getFirstLocalChild(chartTypeNode, "wireframe");
1448
1511
  chart.wireframe = wireframeNode ? wireframeNode.getAttribute("val") !== "0" : chart.wireframe;
1449
1512
  const chartTypeDataLabels = parseChartDataLabelsFromXml(getFirstLocalChild(chartTypeNode, "dLbls"));
@@ -1451,7 +1514,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1451
1514
  const seriesDataLabels = parseChartDataLabelsFromXml(getFirstLocalChild(firstSeriesNode, "dLbls"));
1452
1515
  chart.dataLabels = _nullishCoalesce(_nullishCoalesce(chartTypeDataLabels, () => ( seriesDataLabels)), () => ( chart.dataLabels));
1453
1516
  const seriesSp3dNode = firstSeriesNode ? getFirstLocalDescendant(firstSeriesNode, "sp3d") : null;
1454
- chart.surfaceMaterial = _nullishCoalesce(_optionalChain([seriesSp3dNode, 'optionalAccess', _159 => _159.getAttribute, 'call', _160 => _160("prstMaterial")]), () => ( chart.surfaceMaterial));
1517
+ chart.surfaceMaterial = _nullishCoalesce(_optionalChain([seriesSp3dNode, 'optionalAccess', _174 => _174.getAttribute, 'call', _175 => _175("prstMaterial")]), () => ( chart.surfaceMaterial));
1455
1518
  const bandFormatsNode = _nullishCoalesce(getLocalChildren(chartTypeNode, "bandFmts")[0], () => ( null));
1456
1519
  const bandFormatNodes = bandFormatsNode ? getLocalChildren(bandFormatsNode, "bandFmt") : [];
1457
1520
  const bandFormatColors = /* @__PURE__ */ Object.create(null);
@@ -1466,7 +1529,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1466
1529
  const fillColor = getFirstLocalChild(shapeProperties, "noFill") ? "transparent" : resolveChartFillColor(shapeProperties, themePalette);
1467
1530
  const lineStyle = resolveChartLineStyle(shapeProperties, themePalette);
1468
1531
  const lineColor = lineStyle.hidden ? "transparent" : lineStyle.color;
1469
- const lineWidth = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _161 => _161(shapeProperties, "ln"), 'optionalAccess', _162 => _162.getAttribute, 'call', _163 => _163("w")]), () => ( Number.NaN)));
1532
+ const lineWidth = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _176 => _176(shapeProperties, "ln"), 'optionalAccess', _177 => _177.getAttribute, 'call', _178 => _178("w")]), () => ( Number.NaN)));
1470
1533
  if (fillColor) bandFormatColors[index] = fillColor;
1471
1534
  if (lineColor) bandFormatLineColors[index] = lineColor;
1472
1535
  if (Number.isFinite(lineWidth) && lineWidth >= 0) bandFormatLineWidths[index] = lineWidth / EMU_PER_PIXEL;
@@ -1476,16 +1539,16 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1476
1539
  bandFormatColors: Object.keys(bandFormatColors).length > 0 ? bandFormatColors : void 0,
1477
1540
  bandFormatLineColors: Object.keys(bandFormatLineColors).length > 0 ? bandFormatLineColors : void 0,
1478
1541
  bandFormatLineWidths: Object.keys(bandFormatLineWidths).length > 0 ? bandFormatLineWidths : void 0,
1479
- date1904: readChartBooleanAttribute(_nullishCoalesce(_optionalChain([chartDocument, 'optionalAccess', _164 => _164.documentElement]), () => ( null)), "date1904"),
1542
+ date1904: readChartBooleanAttribute(_nullishCoalesce(_optionalChain([chartDocument, 'optionalAccess', _179 => _179.documentElement]), () => ( null)), "date1904"),
1480
1543
  titleOverlay: readChartBooleanAttribute(getFirstLocalChild(chartNode, "title"), "overlay"),
1481
1544
  bubble3d: chart.bubble3d,
1482
- grouping: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _165 => _165(chartTypeNode, "grouping"), 'optionalAccess', _166 => _166.getAttribute, 'call', _167 => _167("val")]), () => ( void 0)),
1483
- ofPieType: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _168 => _168(chartTypeNode, "ofPieType"), 'optionalAccess', _169 => _169.getAttribute, 'call', _170 => _170("val")]), () => ( void 0)),
1484
- shape: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _171 => _171(chartTypeNode, "shape"), 'optionalAccess', _172 => _172.getAttribute, 'call', _173 => _173("val")]), () => ( void 0)),
1545
+ grouping: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _180 => _180(chartTypeNode, "grouping"), 'optionalAccess', _181 => _181.getAttribute, 'call', _182 => _182("val")]), () => ( void 0)),
1546
+ ofPieType: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _183 => _183(chartTypeNode, "ofPieType"), 'optionalAccess', _184 => _184.getAttribute, 'call', _185 => _185("val")]), () => ( void 0)),
1547
+ shape: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _186 => _186(chartTypeNode, "shape"), 'optionalAccess', _187 => _187.getAttribute, 'call', _188 => _188("val")]), () => ( void 0)),
1485
1548
  secondPieSize: readChartNumericAttribute(chartTypeNode, "secondPieSize"),
1486
1549
  scatterStyle: chart.scatterStyle,
1487
1550
  splitPos: readChartNumericAttribute(chartTypeNode, "splitPos"),
1488
- splitType: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _174 => _174(chartTypeNode, "splitType"), 'optionalAccess', _175 => _175.getAttribute, 'call', _176 => _176("val")]), () => ( void 0)),
1551
+ splitType: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _189 => _189(chartTypeNode, "splitType"), 'optionalAccess', _190 => _190.getAttribute, 'call', _191 => _191("val")]), () => ( void 0)),
1489
1552
  xmlChartType: chartTypeNode.localName
1490
1553
  };
1491
1554
  const view3dNode = getFirstLocalDescendant(chartNode, "view3D");
@@ -1494,7 +1557,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1494
1557
  depthPercent: readChartNumericAttribute(view3dNode, "depthPercent"),
1495
1558
  heightPercent: readChartNumericAttribute(view3dNode, "hPercent"),
1496
1559
  perspective: readChartNumericAttribute(view3dNode, "perspective"),
1497
- rAngAx: _optionalChain([getFirstLocalChild, 'call', _177 => _177(view3dNode, "rAngAx"), 'optionalAccess', _178 => _178.getAttribute, 'call', _179 => _179("val")]) === "1",
1560
+ rAngAx: _optionalChain([getFirstLocalChild, 'call', _192 => _192(view3dNode, "rAngAx"), 'optionalAccess', _193 => _193.getAttribute, 'call', _194 => _194("val")]) === "1",
1498
1561
  rotX: readChartNumericAttribute(view3dNode, "rotX"),
1499
1562
  rotY: readChartNumericAttribute(view3dNode, "rotY")
1500
1563
  };
@@ -1503,7 +1566,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1503
1566
  const wall = readChartWallFromXml(getFirstLocalChild(chartNode, key), themePalette);
1504
1567
  if (wall) {
1505
1568
  chart[key] = wall;
1506
- const defaults = _optionalChain([chart, 'access', _180 => _180.raw, 'optionalAccess', _181 => _181.builtinSurfaceDefaults]);
1569
+ const defaults = _optionalChain([chart, 'access', _195 => _195.raw, 'optionalAccess', _196 => _196.builtinSurfaceDefaults]);
1507
1570
  if (defaults) chart.raw = { ...chart.raw, builtinSurfaceDefaults: { ...defaults, [key]: void 0 } };
1508
1571
  }
1509
1572
  }
@@ -1512,7 +1575,7 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1512
1575
  const titleTypeface = readChartTextTypeface(getFirstLocalDescendant(chartNode, "title"), themePalette);
1513
1576
  chart.fontFamily = _nullishCoalesce(chartTextTypeface, () => ( chart.fontFamily));
1514
1577
  chart.titleFontFamily = _nullishCoalesce(_nullishCoalesce(titleTypeface, () => ( chart.titleFontFamily)), () => ( chart.fontFamily));
1515
- const chartAreaShapeProperties = _optionalChain([chartDocument, 'optionalAccess', _182 => _182.documentElement]) ? getFirstLocalChild(chartDocument.documentElement, "spPr") : null;
1578
+ const chartAreaShapeProperties = _optionalChain([chartDocument, 'optionalAccess', _197 => _197.documentElement]) ? getFirstLocalChild(chartDocument.documentElement, "spPr") : null;
1516
1579
  const plotAreaShapeProperties = getFirstLocalChild(plotArea, "spPr");
1517
1580
  const chartAreaNoFill = chartAreaShapeProperties ? getFirstLocalChild(chartAreaShapeProperties, "noFill") != null : false;
1518
1581
  const plotAreaNoFill = plotAreaShapeProperties ? getFirstLocalChild(plotAreaShapeProperties, "noFill") != null : false;
@@ -1551,11 +1614,11 @@ function applyChartStyleFromXml(chart, chartPath, archive, themePalette) {
1551
1614
  let valueAxisNode = _nullishCoalesce(valueAxisNodes[0], () => ( null));
1552
1615
  if (!categoryAxisNode && isScatterLikeChart && valueAxisNodes.length >= 2) {
1553
1616
  categoryAxisNode = _nullishCoalesce(valueAxisNodes.find((axisNode) => {
1554
- const position = _optionalChain([getFirstLocalChild, 'call', _183 => _183(axisNode, "axPos"), 'optionalAccess', _184 => _184.getAttribute, 'call', _185 => _185("val")]);
1617
+ const position = _optionalChain([getFirstLocalChild, 'call', _198 => _198(axisNode, "axPos"), 'optionalAccess', _199 => _199.getAttribute, 'call', _200 => _200("val")]);
1555
1618
  return position === "b" || position === "t";
1556
1619
  }), () => ( valueAxisNodes[0]));
1557
1620
  valueAxisNode = _nullishCoalesce(_nullishCoalesce(valueAxisNodes.find((axisNode) => {
1558
- const position = _optionalChain([getFirstLocalChild, 'call', _186 => _186(axisNode, "axPos"), 'optionalAccess', _187 => _187.getAttribute, 'call', _188 => _188("val")]);
1621
+ const position = _optionalChain([getFirstLocalChild, 'call', _201 => _201(axisNode, "axPos"), 'optionalAccess', _202 => _202.getAttribute, 'call', _203 => _203("val")]);
1559
1622
  return position === "l" || position === "r";
1560
1623
  }), () => ( valueAxisNodes[1])), () => ( valueAxisNodes[0]));
1561
1624
  }
@@ -1636,15 +1699,15 @@ function serializeXml(document2) {
1636
1699
  return new XMLSerializer().serializeToString(document2);
1637
1700
  }
1638
1701
  function getLocalChildren(parent, localName) {
1639
- return Array.from(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _189 => _189.childNodes]), () => ( []))).filter(
1702
+ return Array.from(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _204 => _204.childNodes]), () => ( []))).filter(
1640
1703
  (node) => node.nodeType === Node.ELEMENT_NODE && node.localName === localName
1641
1704
  );
1642
1705
  }
1643
1706
  function removeLocalChildren(parent, localName) {
1644
- getLocalChildren(parent, localName).forEach((node) => _optionalChain([node, 'access', _190 => _190.parentNode, 'optionalAccess', _191 => _191.removeChild, 'call', _192 => _192(node)]));
1707
+ getLocalChildren(parent, localName).forEach((node) => _optionalChain([node, 'access', _205 => _205.parentNode, 'optionalAccess', _206 => _206.removeChild, 'call', _207 => _207(node)]));
1645
1708
  }
1646
1709
  function getLocalDescendants(parent, localName) {
1647
- return Array.from(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _193 => _193.getElementsByTagName, 'call', _194 => _194("*")]), () => ( []))).filter(
1710
+ return Array.from(_nullishCoalesce(_optionalChain([parent, 'optionalAccess', _208 => _208.getElementsByTagName, 'call', _209 => _209("*")]), () => ( []))).filter(
1648
1711
  (node) => node.localName === localName
1649
1712
  );
1650
1713
  }
@@ -1757,7 +1820,7 @@ function resolveReferenceSheet(workbook, fallbackSheetIndex, formula) {
1757
1820
  return {
1758
1821
  range: null,
1759
1822
  sheet: workbook.getSheet(fallbackSheetIndex),
1760
- sheetName: _nullishCoalesce(_optionalChain([workbook, 'access', _195 => _195.getSheet, 'call', _196 => _196(fallbackSheetIndex), 'optionalAccess', _197 => _197.name]), () => ( ""))
1823
+ sheetName: _nullishCoalesce(_optionalChain([workbook, 'access', _210 => _210.getSheet, 'call', _211 => _211(fallbackSheetIndex), 'optionalAccess', _212 => _212.name]), () => ( ""))
1761
1824
  };
1762
1825
  }
1763
1826
  const trimmedFormula = formula.trim();
@@ -1775,7 +1838,7 @@ function resolveReferenceSheet(workbook, fallbackSheetIndex, formula) {
1775
1838
  return {
1776
1839
  range: parseA1Range(trimmedFormula),
1777
1840
  sheet: workbook.getSheet(fallbackSheetIndex),
1778
- sheetName: _nullishCoalesce(_optionalChain([workbook, 'access', _198 => _198.getSheet, 'call', _199 => _199(fallbackSheetIndex), 'optionalAccess', _200 => _200.name]), () => ( ""))
1841
+ sheetName: _nullishCoalesce(_optionalChain([workbook, 'access', _213 => _213.getSheet, 'call', _214 => _214(fallbackSheetIndex), 'optionalAccess', _215 => _215.name]), () => ( ""))
1779
1842
  };
1780
1843
  }
1781
1844
  try {
@@ -1788,12 +1851,12 @@ function resolveReferenceSheet(workbook, fallbackSheetIndex, formula) {
1788
1851
  return {
1789
1852
  range: parseA1Range(split.range),
1790
1853
  sheet: workbook.getSheet(fallbackSheetIndex),
1791
- sheetName: _nullishCoalesce(_optionalChain([workbook, 'access', _201 => _201.getSheet, 'call', _202 => _202(fallbackSheetIndex), 'optionalAccess', _203 => _203.name]), () => ( ""))
1854
+ sheetName: _nullishCoalesce(_optionalChain([workbook, 'access', _216 => _216.getSheet, 'call', _217 => _217(fallbackSheetIndex), 'optionalAccess', _218 => _218.name]), () => ( ""))
1792
1855
  };
1793
1856
  }
1794
1857
  }
1795
1858
  function resolveChartReferenceLabel(workbook, fallbackSheetIndex, reference, fallbackLabel) {
1796
- if (!_optionalChain([reference, 'optionalAccess', _204 => _204.formula])) {
1859
+ if (!_optionalChain([reference, 'optionalAccess', _219 => _219.formula])) {
1797
1860
  return fallbackLabel;
1798
1861
  }
1799
1862
  const resolved = resolveReferenceSheet(workbook, fallbackSheetIndex, reference.formula);
@@ -1815,7 +1878,7 @@ function resolveChartReferenceLabel(workbook, fallbackSheetIndex, reference, fal
1815
1878
  return firstDisplay.length > 0 ? firstDisplay : fallbackLabel;
1816
1879
  }
1817
1880
  function resolveReferenceRowPaths(workbook, fallbackSheetIndex, reference) {
1818
- if (!_optionalChain([reference, 'optionalAccess', _205 => _205.formula])) {
1881
+ if (!_optionalChain([reference, 'optionalAccess', _220 => _220.formula])) {
1819
1882
  return [];
1820
1883
  }
1821
1884
  const resolved = resolveReferenceSheet(workbook, fallbackSheetIndex, reference.formula);
@@ -1869,11 +1932,11 @@ function normalizeChartExAxis(raw) {
1869
1932
  id: typeof axis.id === "number" && Number.isFinite(axis.id) ? axis.id : void 0,
1870
1933
  crossId: typeof axis.crossId === "number" && Number.isFinite(axis.crossId) ? axis.crossId : void 0,
1871
1934
  majorGridlines: axis.majorGridlines != null ? true : void 0,
1872
- majorUnit: typeof _optionalChain([scaling, 'optionalAccess', _206 => _206.majorUnit]) === "number" ? scaling.majorUnit : void 0,
1873
- max: typeof _optionalChain([scaling, 'optionalAccess', _207 => _207.max]) === "number" ? scaling.max : void 0,
1874
- min: typeof _optionalChain([scaling, 'optionalAccess', _208 => _208.min]) === "number" ? scaling.min : void 0,
1935
+ majorUnit: typeof _optionalChain([scaling, 'optionalAccess', _221 => _221.majorUnit]) === "number" ? scaling.majorUnit : void 0,
1936
+ max: typeof _optionalChain([scaling, 'optionalAccess', _222 => _222.max]) === "number" ? scaling.max : void 0,
1937
+ min: typeof _optionalChain([scaling, 'optionalAccess', _223 => _223.min]) === "number" ? scaling.min : void 0,
1875
1938
  minorGridlines: axis.minorGridlines != null ? true : void 0,
1876
- minorUnit: typeof _optionalChain([scaling, 'optionalAccess', _209 => _209.minorUnit]) === "number" ? scaling.minorUnit : void 0,
1939
+ minorUnit: typeof _optionalChain([scaling, 'optionalAccess', _224 => _224.minorUnit]) === "number" ? scaling.minorUnit : void 0,
1877
1940
  numberFormat: numberFormat ? {
1878
1941
  formatCode: typeof numberFormat.formatCode === "string" ? numberFormat.formatCode : void 0,
1879
1942
  sourceLinked: typeof numberFormat.sourceLinked === "boolean" ? numberFormat.sourceLinked : void 0
@@ -1965,13 +2028,13 @@ function buildChartExHistogramBins(values, rawSeries, sortByFrequency) {
1965
2028
  return [];
1966
2029
  }
1967
2030
  const rawRecord = rawSeries && typeof rawSeries === "object" ? rawSeries : null;
1968
- const layoutProperties = _optionalChain([rawRecord, 'optionalAccess', _210 => _210.layoutProperties]) && typeof rawRecord.layoutProperties === "object" ? rawRecord.layoutProperties : null;
1969
- const rawBinning = _optionalChain([layoutProperties, 'optionalAccess', _211 => _211.binning]) && typeof layoutProperties.binning === "object" ? layoutProperties.binning : null;
2031
+ const layoutProperties = _optionalChain([rawRecord, 'optionalAccess', _225 => _225.layoutProperties]) && typeof rawRecord.layoutProperties === "object" ? rawRecord.layoutProperties : null;
2032
+ const rawBinning = _optionalChain([layoutProperties, 'optionalAccess', _226 => _226.binning]) && typeof layoutProperties.binning === "object" ? layoutProperties.binning : null;
1970
2033
  const minValue = Math.min(...values);
1971
2034
  const maxValue = Math.max(...values);
1972
- const explicitWidth = typeof _optionalChain([rawBinning, 'optionalAccess', _212 => _212.binSize]) === "number" && Number.isFinite(rawBinning.binSize) && rawBinning.binSize > 0 ? rawBinning.binSize : void 0;
1973
- const explicitCount = typeof _optionalChain([rawBinning, 'optionalAccess', _213 => _213.binCount]) === "number" && Number.isFinite(rawBinning.binCount) && rawBinning.binCount > 0 ? rawBinning.binCount : typeof _optionalChain([rawBinning, 'optionalAccess', _214 => _214.count]) === "number" && Number.isFinite(rawBinning.count) && rawBinning.count > 0 ? rawBinning.count : void 0;
1974
- const closedRight = _optionalChain([rawBinning, 'optionalAccess', _215 => _215.intervalClosed]) === "r" || _optionalChain([rawBinning, 'optionalAccess', _216 => _216.intervalClosed]) === "right";
2035
+ const explicitWidth = typeof _optionalChain([rawBinning, 'optionalAccess', _227 => _227.binSize]) === "number" && Number.isFinite(rawBinning.binSize) && rawBinning.binSize > 0 ? rawBinning.binSize : void 0;
2036
+ const explicitCount = typeof _optionalChain([rawBinning, 'optionalAccess', _228 => _228.binCount]) === "number" && Number.isFinite(rawBinning.binCount) && rawBinning.binCount > 0 ? rawBinning.binCount : typeof _optionalChain([rawBinning, 'optionalAccess', _229 => _229.count]) === "number" && Number.isFinite(rawBinning.count) && rawBinning.count > 0 ? rawBinning.count : void 0;
2037
+ const closedRight = _optionalChain([rawBinning, 'optionalAccess', _230 => _230.intervalClosed]) === "r" || _optionalChain([rawBinning, 'optionalAccess', _231 => _231.intervalClosed]) === "right";
1975
2038
  const mean = values.reduce((sum, value) => sum + value, 0) / values.length;
1976
2039
  const variance = values.reduce((sum, value) => sum + (value - mean) ** 2, 0) / Math.max(1, values.length);
1977
2040
  const standardDeviation = Math.sqrt(Math.max(0, variance));
@@ -2022,7 +2085,7 @@ function buildChartExHistogramSeries(series, rawSeries, sortByFrequency) {
2022
2085
  const layout = resolveChartExSeriesLayout(rawSeries);
2023
2086
  const rawRecord = rawSeries && typeof rawSeries === "object" ? rawSeries : null;
2024
2087
  const hasBinning = Boolean(
2025
- layout === "clusteredColumn" && _optionalChain([rawRecord, 'optionalAccess', _217 => _217.layoutProperties]) && typeof rawRecord.layoutProperties === "object" && rawRecord.layoutProperties.binning != null
2088
+ layout === "clusteredColumn" && _optionalChain([rawRecord, 'optionalAccess', _232 => _232.layoutProperties]) && typeof rawRecord.layoutProperties === "object" && rawRecord.layoutProperties.binning != null
2026
2089
  );
2027
2090
  if (!hasBinning) {
2028
2091
  return series;
@@ -2063,7 +2126,7 @@ function buildChartExParetoLineSeries(series, sourceRaw, index) {
2063
2126
  markerLineColor: void 0,
2064
2127
  markerSize: 7,
2065
2128
  markerSymbol: "circle",
2066
- name: typeof _optionalChain([sourceRaw, 'optionalAccess', _218 => _218.text]) === "string" ? sourceRaw.text : "Pareto",
2129
+ name: typeof _optionalChain([sourceRaw, 'optionalAccess', _233 => _233.text]) === "string" ? sourceRaw.text : "Pareto",
2067
2130
  raw: {
2068
2131
  ..._nullishCoalesce(series.raw, () => ( {})),
2069
2132
  chartExLayout: "paretoLine",
@@ -2134,11 +2197,11 @@ function normalizeChartExSeries(workbook, workbookSheetIndex, chartId, raw, data
2134
2197
  const series = raw && typeof raw === "object" ? raw : {};
2135
2198
  const dataId = typeof series.dataId === "number" ? series.dataId : null;
2136
2199
  const dataEntry = dataId != null ? _nullishCoalesce(dataById.get(dataId), () => ( null)) : null;
2137
- const dimensions = Array.isArray(_optionalChain([dataEntry, 'optionalAccess', _219 => _219.dimensions])) ? dataEntry.dimensions.filter((value) => Boolean(value && typeof value === "object")) : [];
2200
+ const dimensions = Array.isArray(_optionalChain([dataEntry, 'optionalAccess', _234 => _234.dimensions])) ? dataEntry.dimensions.filter((value) => Boolean(value && typeof value === "object")) : [];
2138
2201
  const categoryDimension = _nullishCoalesce(_nullishCoalesce(dimensions.find((dimension) => dimension.dimType === "cat"), () => ( dimensions.find((dimension) => dimension.dimType === "name"))), () => ( null));
2139
2202
  const valueDimension = _nullishCoalesce(_nullishCoalesce(dimensions.find((dimension) => dimension.dimType === "val" || dimension.dimType === "y" || dimension.dimType === "colorVal" || dimension.dimType === "size"), () => ( dimensions.find((dimension) => dimension !== categoryDimension))), () => ( categoryDimension));
2140
- const categoryDimensionFormula = typeof _optionalChain([categoryDimension, 'optionalAccess', _220 => _220.formula]) === "string" ? categoryDimension.formula : void 0;
2141
- const valueDimensionFormula = typeof _optionalChain([valueDimension, 'optionalAccess', _221 => _221.formula]) === "string" ? valueDimension.formula : void 0;
2203
+ const categoryDimensionFormula = typeof _optionalChain([categoryDimension, 'optionalAccess', _235 => _235.formula]) === "string" ? categoryDimension.formula : void 0;
2204
+ const valueDimensionFormula = typeof _optionalChain([valueDimension, 'optionalAccess', _236 => _236.formula]) === "string" ? valueDimension.formula : void 0;
2142
2205
  const fallbackCategoryRef = (chartType === "Sunburst" || chartType === "Treemap") && !categoryDimension && typeof valueDimensionFormula === "string" ? resolveChartExFallbackCategoryReference(workbook, workbookSheetIndex, valueDimensionFormula) : null;
2143
2206
  const categoriesRef = categoryDimension ? normalizeChartReference({
2144
2207
  formula: categoryDimensionFormula
@@ -2146,7 +2209,7 @@ function normalizeChartExSeries(workbook, workbookSheetIndex, chartId, raw, data
2146
2209
  const valuesRef = valueDimension ? normalizeChartReference({
2147
2210
  formula: valueDimensionFormula
2148
2211
  }) : null;
2149
- const isCategoricalMap = chartType === "RegionMap" && _optionalChain([valueDimension, 'optionalAccess', _222 => _222.dimType]) === "colorStr";
2212
+ const isCategoricalMap = chartType === "RegionMap" && _optionalChain([valueDimension, 'optionalAccess', _237 => _237.dimType]) === "colorStr";
2150
2213
  const resolvedValueCells = resolveReferenceValues(workbook, workbookSheetIndex, valuesRef, isCategoricalMap ? "category" : "value");
2151
2214
  const values = resolvedValueCells.map((value) => typeof value === "number" && Number.isFinite(value) ? value : null);
2152
2215
  const colorStrings = isCategoricalMap ? resolvedValueCells.map((value) => {
@@ -2164,8 +2227,8 @@ function normalizeChartExSeries(workbook, workbookSheetIndex, chartId, raw, data
2164
2227
  const hierarchyCategories = chartType === "Sunburst" || chartType === "Treemap" ? resolveReferenceRowPaths(workbook, workbookSheetIndex, categoriesRef) : [];
2165
2228
  const seriesTextFormula = resolveChartExTextFormula(series.text);
2166
2229
  const shapeProperties = series.shapeProperties && typeof series.shapeProperties === "object" ? series.shapeProperties : void 0;
2167
- const rawFillColor = typeof _optionalChain([shapeProperties, 'optionalAccess', _223 => _223.solidFillHex]) === "string" ? normalizeHexColor(shapeProperties.solidFillHex) : null;
2168
- const rawLineColor = typeof _optionalChain([shapeProperties, 'optionalAccess', _224 => _224.lineColorHex]) === "string" ? normalizeHexColor(shapeProperties.lineColorHex) : null;
2230
+ const rawFillColor = typeof _optionalChain([shapeProperties, 'optionalAccess', _238 => _238.solidFillHex]) === "string" ? normalizeHexColor(shapeProperties.solidFillHex) : null;
2231
+ const rawLineColor = typeof _optionalChain([shapeProperties, 'optionalAccess', _239 => _239.lineColorHex]) === "string" ? normalizeHexColor(shapeProperties.lineColorHex) : null;
2169
2232
  return {
2170
2233
  bubbleSizeRef: null,
2171
2234
  bubbleSizes: [],
@@ -2179,7 +2242,7 @@ function normalizeChartExSeries(workbook, workbookSheetIndex, chartId, raw, data
2179
2242
  id: `${chartId}-series-${index}`,
2180
2243
  invertIfNegative: void 0,
2181
2244
  lineColor: _nullishCoalesce(_nullishCoalesce(rawLineColor, () => ( rawFillColor)), () => ( void 0)),
2182
- lineWidthPx: typeof _optionalChain([shapeProperties, 'optionalAccess', _225 => _225.lineWidth]) === "number" ? Math.max(1, Number(shapeProperties.lineWidth) / EMU_PER_PIXEL) : void 0,
2245
+ lineWidthPx: typeof _optionalChain([shapeProperties, 'optionalAccess', _240 => _240.lineWidth]) === "number" ? Math.max(1, Number(shapeProperties.lineWidth) / EMU_PER_PIXEL) : void 0,
2183
2246
  marker: void 0,
2184
2247
  markerColor: _nullishCoalesce(rawFillColor, () => ( void 0)),
2185
2248
  markerLineColor: _nullishCoalesce(_nullishCoalesce(rawLineColor, () => ( rawFillColor)), () => ( void 0)),
@@ -2193,7 +2256,7 @@ function normalizeChartExSeries(workbook, workbookSheetIndex, chartId, raw, data
2193
2256
  chartExColorStrings: colorStrings,
2194
2257
  chartExHierarchyCategories: hierarchyCategories,
2195
2258
  data: dataEntry,
2196
- dimType: typeof _optionalChain([valueDimension, 'optionalAccess', _226 => _226.dimType]) === "string" ? valueDimension.dimType : void 0
2259
+ dimType: typeof _optionalChain([valueDimension, 'optionalAccess', _241 => _241.dimType]) === "string" ? valueDimension.dimType : void 0
2197
2260
  },
2198
2261
  shapeProperties,
2199
2262
  smooth: void 0,
@@ -2205,7 +2268,7 @@ function collapseChartExPointSeries(chartType, series) {
2205
2268
  if (chartType !== "Funnel" && chartType !== "Waterfall") {
2206
2269
  if ((chartType === "Sunburst" || chartType === "Treemap") && series.length > 1 && series.every((entry) => {
2207
2270
  const raw = entry.raw && typeof entry.raw === "object" ? entry.raw : null;
2208
- return _optionalChain([raw, 'optionalAccess', _227 => _227.dimType]) === "size";
2271
+ return _optionalChain([raw, 'optionalAccess', _242 => _242.dimType]) === "size";
2209
2272
  })) {
2210
2273
  const primarySeries2 = _nullishCoalesce(_nullishCoalesce(series.find((entry) => entry.hidden !== true), () => ( series[0])), () => ( null));
2211
2274
  if (!primarySeries2) {
@@ -2425,8 +2488,8 @@ function cellValueToDisplay(value) {
2425
2488
  return String(value);
2426
2489
  }
2427
2490
  function resolveReferenceValues(workbook, fallbackSheetIndex, reference, mode) {
2428
- if (!_optionalChain([reference, 'optionalAccess', _228 => _228.formula])) {
2429
- return _nullishCoalesce(_optionalChain([reference, 'optionalAccess', _229 => _229.values]), () => ( []));
2491
+ if (!_optionalChain([reference, 'optionalAccess', _243 => _243.formula])) {
2492
+ return _nullishCoalesce(_optionalChain([reference, 'optionalAccess', _244 => _244.values]), () => ( []));
2430
2493
  }
2431
2494
  const resolved = resolveReferenceSheet(workbook, fallbackSheetIndex, reference.formula);
2432
2495
  if (!resolved.sheet || !resolved.range) {
@@ -2524,30 +2587,30 @@ function readChartAxisFromXml(axisNode, themePalette) {
2524
2587
  const scalingNode = getFirstLocalChild(axisNode, "scaling");
2525
2588
  return {
2526
2589
  crossId: readChartNumericAttribute(axisNode, "crossAx"),
2527
- crosses: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _230 => _230(axisNode, "crosses"), 'optionalAccess', _231 => _231.getAttribute, 'call', _232 => _232("val")]), () => ( void 0)),
2528
- crossBetween: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _233 => _233(axisNode, "crossBetween"), 'optionalAccess', _234 => _234.getAttribute, 'call', _235 => _235("val")]), () => ( void 0)),
2529
- delete: _optionalChain([getFirstLocalChild, 'call', _236 => _236(axisNode, "delete"), 'optionalAccess', _237 => _237.getAttribute, 'call', _238 => _238("val")]) === "1" ? true : _optionalChain([getFirstLocalChild, 'call', _239 => _239(axisNode, "delete"), 'optionalAccess', _240 => _240.getAttribute, 'call', _241 => _241("val")]) === "0" ? false : void 0,
2590
+ crosses: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _245 => _245(axisNode, "crosses"), 'optionalAccess', _246 => _246.getAttribute, 'call', _247 => _247("val")]), () => ( void 0)),
2591
+ crossBetween: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _248 => _248(axisNode, "crossBetween"), 'optionalAccess', _249 => _249.getAttribute, 'call', _250 => _250("val")]), () => ( void 0)),
2592
+ delete: _optionalChain([getFirstLocalChild, 'call', _251 => _251(axisNode, "delete"), 'optionalAccess', _252 => _252.getAttribute, 'call', _253 => _253("val")]) === "1" ? true : _optionalChain([getFirstLocalChild, 'call', _254 => _254(axisNode, "delete"), 'optionalAccess', _255 => _255.getAttribute, 'call', _256 => _256("val")]) === "0" ? false : void 0,
2530
2593
  id: readChartNumericAttribute(axisNode, "axId"),
2531
- labelPosition: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _242 => _242(axisNode, "tickLblPos"), 'optionalAccess', _243 => _243.getAttribute, 'call', _244 => _244("val")]), () => ( void 0)),
2594
+ labelPosition: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _257 => _257(axisNode, "tickLblPos"), 'optionalAccess', _258 => _258.getAttribute, 'call', _259 => _259("val")]), () => ( void 0)),
2532
2595
  logBase: readChartNumericAttribute(getFirstLocalChild(axisNode, "scaling"), "logBase"),
2533
- orientation: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _245 => _245(_nullishCoalesce(scalingNode, () => ( axisNode)), "orientation"), 'optionalAccess', _246 => _246.getAttribute, 'call', _247 => _247("val")]), () => ( void 0)),
2596
+ orientation: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _260 => _260(_nullishCoalesce(scalingNode, () => ( axisNode)), "orientation"), 'optionalAccess', _261 => _261.getAttribute, 'call', _262 => _262("val")]), () => ( void 0)),
2534
2597
  majorGridlines: Boolean(getFirstLocalChild(axisNode, "majorGridlines")),
2535
2598
  majorGridlineColor: (() => {
2536
2599
  const style = resolveChartLineStyle(getFirstLocalChild(getFirstLocalChild(axisNode, "majorGridlines"), "spPr"), themePalette);
2537
2600
  return style.hidden ? "transparent" : _nullishCoalesce(style.color, () => ( void 0));
2538
2601
  })(),
2539
- majorTickMark: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _248 => _248(axisNode, "majorTickMark"), 'optionalAccess', _249 => _249.getAttribute, 'call', _250 => _250("val")]), () => ( void 0)),
2602
+ majorTickMark: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _263 => _263(axisNode, "majorTickMark"), 'optionalAccess', _264 => _264.getAttribute, 'call', _265 => _265("val")]), () => ( void 0)),
2540
2603
  majorUnit: readChartNumericAttribute(axisNode, "majorUnit"),
2541
2604
  max: readChartNumericAttribute(scalingNode, "max"),
2542
2605
  min: readChartNumericAttribute(scalingNode, "min"),
2543
2606
  minorGridlines: Boolean(getFirstLocalChild(axisNode, "minorGridlines")),
2544
- minorTickMark: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _251 => _251(axisNode, "minorTickMark"), 'optionalAccess', _252 => _252.getAttribute, 'call', _253 => _253("val")]), () => ( void 0)),
2607
+ minorTickMark: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _266 => _266(axisNode, "minorTickMark"), 'optionalAccess', _267 => _267.getAttribute, 'call', _268 => _268("val")]), () => ( void 0)),
2545
2608
  minorUnit: readChartNumericAttribute(axisNode, "minorUnit"),
2546
2609
  numberFormat: numFmt ? {
2547
2610
  formatCode: _nullishCoalesce(numFmt.getAttribute("formatCode"), () => ( void 0)),
2548
2611
  sourceLinked: numFmt.getAttribute("sourceLinked") === "1" ? true : numFmt.getAttribute("sourceLinked") === "0" ? false : void 0
2549
2612
  } : void 0,
2550
- position: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _254 => _254(axisNode, "axPos"), 'optionalAccess', _255 => _255.getAttribute, 'call', _256 => _256("val")]), () => ( void 0)),
2613
+ position: _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _269 => _269(axisNode, "axPos"), 'optionalAccess', _270 => _270.getAttribute, 'call', _271 => _271("val")]), () => ( void 0)),
2551
2614
  tickLabelSkip: readChartNumericAttribute(axisNode, "tickLblSkip"),
2552
2615
  tickMarkSkip: readChartNumericAttribute(axisNode, "tickMarkSkip")
2553
2616
  };
@@ -2637,10 +2700,10 @@ function normalizeChartAnchor(raw) {
2637
2700
  if (anchor.type === "oneCell") {
2638
2701
  return {
2639
2702
  from: {
2640
- col: typeof _optionalChain([from, 'optionalAccess', _257 => _257.col]) === "number" ? from.col : 0,
2641
- colOffsetEmu: typeof _optionalChain([from, 'optionalAccess', _258 => _258.colOffsetEmu]) === "number" ? from.colOffsetEmu : 0,
2642
- row: typeof _optionalChain([from, 'optionalAccess', _259 => _259.row]) === "number" ? from.row : 0,
2643
- rowOffsetEmu: typeof _optionalChain([from, 'optionalAccess', _260 => _260.rowOffsetEmu]) === "number" ? from.rowOffsetEmu : 0
2703
+ col: typeof _optionalChain([from, 'optionalAccess', _272 => _272.col]) === "number" ? from.col : 0,
2704
+ colOffsetEmu: typeof _optionalChain([from, 'optionalAccess', _273 => _273.colOffsetEmu]) === "number" ? from.colOffsetEmu : 0,
2705
+ row: typeof _optionalChain([from, 'optionalAccess', _274 => _274.row]) === "number" ? from.row : 0,
2706
+ rowOffsetEmu: typeof _optionalChain([from, 'optionalAccess', _275 => _275.rowOffsetEmu]) === "number" ? from.rowOffsetEmu : 0
2644
2707
  },
2645
2708
  kind: "one-cell",
2646
2709
  sizeEmu: {
@@ -2663,14 +2726,14 @@ function normalizeChartAnchor(raw) {
2663
2726
  };
2664
2727
  }
2665
2728
  const to = anchor.to && typeof anchor.to === "object" ? anchor.to : null;
2666
- const fromColValue = _optionalChain([from, 'optionalAccess', _261 => _261.col]);
2667
- const fromColOffsetValue = _optionalChain([from, 'optionalAccess', _262 => _262.colOffsetEmu]);
2668
- const fromRowValue = _optionalChain([from, 'optionalAccess', _263 => _263.row]);
2669
- const fromRowOffsetValue = _optionalChain([from, 'optionalAccess', _264 => _264.rowOffsetEmu]);
2670
- const toColValue = _optionalChain([to, 'optionalAccess', _265 => _265.col]);
2671
- const toColOffsetValue = _optionalChain([to, 'optionalAccess', _266 => _266.colOffsetEmu]);
2672
- const toRowValue = _optionalChain([to, 'optionalAccess', _267 => _267.row]);
2673
- const toRowOffsetValue = _optionalChain([to, 'optionalAccess', _268 => _268.rowOffsetEmu]);
2729
+ const fromColValue = _optionalChain([from, 'optionalAccess', _276 => _276.col]);
2730
+ const fromColOffsetValue = _optionalChain([from, 'optionalAccess', _277 => _277.colOffsetEmu]);
2731
+ const fromRowValue = _optionalChain([from, 'optionalAccess', _278 => _278.row]);
2732
+ const fromRowOffsetValue = _optionalChain([from, 'optionalAccess', _279 => _279.rowOffsetEmu]);
2733
+ const toColValue = _optionalChain([to, 'optionalAccess', _280 => _280.col]);
2734
+ const toColOffsetValue = _optionalChain([to, 'optionalAccess', _281 => _281.colOffsetEmu]);
2735
+ const toRowValue = _optionalChain([to, 'optionalAccess', _282 => _282.row]);
2736
+ const toRowOffsetValue = _optionalChain([to, 'optionalAccess', _283 => _283.rowOffsetEmu]);
2674
2737
  const fromCol = typeof fromColValue === "number" ? fromColValue : 0;
2675
2738
  const fromColOffsetEmu = typeof fromColOffsetValue === "number" ? fromColOffsetValue : 0;
2676
2739
  const fromRow = typeof fromRowValue === "number" ? fromRowValue : 0;
@@ -2699,10 +2762,10 @@ function parseMarkerNode(node) {
2699
2762
  if (!node) {
2700
2763
  return null;
2701
2764
  }
2702
- const col = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _269 => _269(node, "col"), 'optionalAccess', _270 => _270.textContent]), () => ( Number.NaN)));
2703
- const row = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _271 => _271(node, "row"), 'optionalAccess', _272 => _272.textContent]), () => ( Number.NaN)));
2704
- const colOffsetEmu = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _273 => _273(node, "colOff"), 'optionalAccess', _274 => _274.textContent]), () => ( 0)));
2705
- const rowOffsetEmu = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _275 => _275(node, "rowOff"), 'optionalAccess', _276 => _276.textContent]), () => ( 0)));
2765
+ const col = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _284 => _284(node, "col"), 'optionalAccess', _285 => _285.textContent]), () => ( Number.NaN)));
2766
+ const row = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _286 => _286(node, "row"), 'optionalAccess', _287 => _287.textContent]), () => ( Number.NaN)));
2767
+ const colOffsetEmu = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _288 => _288(node, "colOff"), 'optionalAccess', _289 => _289.textContent]), () => ( 0)));
2768
+ const rowOffsetEmu = Number(_nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _290 => _290(node, "rowOff"), 'optionalAccess', _291 => _291.textContent]), () => ( 0)));
2706
2769
  if (!Number.isFinite(col) || !Number.isFinite(row)) {
2707
2770
  return null;
2708
2771
  }
@@ -2722,8 +2785,8 @@ function parseChartAnchorNode(anchorNode) {
2722
2785
  if (anchorNode.localName === "oneCellAnchor") {
2723
2786
  const from = parseMarkerNode(getFirstLocalChild(anchorNode, "from"));
2724
2787
  const ext2 = getFirstLocalChild(anchorNode, "ext");
2725
- const cx2 = Number(_nullishCoalesce(_optionalChain([ext2, 'optionalAccess', _277 => _277.getAttribute, 'call', _278 => _278("cx")]), () => ( Number.NaN)));
2726
- const cy2 = Number(_nullishCoalesce(_optionalChain([ext2, 'optionalAccess', _279 => _279.getAttribute, 'call', _280 => _280("cy")]), () => ( Number.NaN)));
2788
+ const cx2 = Number(_nullishCoalesce(_optionalChain([ext2, 'optionalAccess', _292 => _292.getAttribute, 'call', _293 => _293("cx")]), () => ( Number.NaN)));
2789
+ const cy2 = Number(_nullishCoalesce(_optionalChain([ext2, 'optionalAccess', _294 => _294.getAttribute, 'call', _295 => _295("cy")]), () => ( Number.NaN)));
2727
2790
  return from && Number.isFinite(cx2) && Number.isFinite(cy2) ? {
2728
2791
  from,
2729
2792
  kind: "one-cell",
@@ -2735,10 +2798,10 @@ function parseChartAnchorNode(anchorNode) {
2735
2798
  }
2736
2799
  const pos = getFirstLocalChild(anchorNode, "pos");
2737
2800
  const ext = getFirstLocalChild(anchorNode, "ext");
2738
- const x = Number(_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _281 => _281.getAttribute, 'call', _282 => _282("x")]), () => ( Number.NaN)));
2739
- const y = Number(_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _283 => _283.getAttribute, 'call', _284 => _284("y")]), () => ( Number.NaN)));
2740
- const cx = Number(_nullishCoalesce(_optionalChain([ext, 'optionalAccess', _285 => _285.getAttribute, 'call', _286 => _286("cx")]), () => ( Number.NaN)));
2741
- const cy = Number(_nullishCoalesce(_optionalChain([ext, 'optionalAccess', _287 => _287.getAttribute, 'call', _288 => _288("cy")]), () => ( Number.NaN)));
2801
+ const x = Number(_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _296 => _296.getAttribute, 'call', _297 => _297("x")]), () => ( Number.NaN)));
2802
+ const y = Number(_nullishCoalesce(_optionalChain([pos, 'optionalAccess', _298 => _298.getAttribute, 'call', _299 => _299("y")]), () => ( Number.NaN)));
2803
+ const cx = Number(_nullishCoalesce(_optionalChain([ext, 'optionalAccess', _300 => _300.getAttribute, 'call', _301 => _301("cx")]), () => ( Number.NaN)));
2804
+ const cy = Number(_nullishCoalesce(_optionalChain([ext, 'optionalAccess', _302 => _302.getAttribute, 'call', _303 => _303("cy")]), () => ( Number.NaN)));
2742
2805
  return Number.isFinite(x) && Number.isFinite(y) && Number.isFinite(cx) && Number.isFinite(cy) ? {
2743
2806
  kind: "absolute",
2744
2807
  positionEmu: {
@@ -2764,8 +2827,8 @@ function normalizeChartSeries(workbook, workbookSheetIndex, chartId, raw, index)
2764
2827
  const categoriesRef = normalizeChartReference(series.categories);
2765
2828
  const valuesRef = normalizeChartReference(series.values);
2766
2829
  const shapeProperties = series.shapeProperties && typeof series.shapeProperties === "object" ? series.shapeProperties : void 0;
2767
- const rawFillColor = typeof _optionalChain([shapeProperties, 'optionalAccess', _289 => _289.solidFillHex]) === "string" ? normalizeHexColor(shapeProperties.solidFillHex) : null;
2768
- const rawLineColor = typeof _optionalChain([shapeProperties, 'optionalAccess', _290 => _290.lineColorHex]) === "string" ? normalizeHexColor(shapeProperties.lineColorHex) : null;
2830
+ const rawFillColor = typeof _optionalChain([shapeProperties, 'optionalAccess', _304 => _304.solidFillHex]) === "string" ? normalizeHexColor(shapeProperties.solidFillHex) : null;
2831
+ const rawLineColor = typeof _optionalChain([shapeProperties, 'optionalAccess', _305 => _305.lineColorHex]) === "string" ? normalizeHexColor(shapeProperties.lineColorHex) : null;
2769
2832
  const bubbleSizeRef = normalizeChartReference(_nullishCoalesce(_nullishCoalesce(series.bubbleSize, () => ( series.bubbleSizes)), () => ( series.bubbles)));
2770
2833
  return {
2771
2834
  bubbleSizeRef,
@@ -2778,7 +2841,7 @@ function normalizeChartSeries(workbook, workbookSheetIndex, chartId, raw, index)
2778
2841
  id: `${chartId}-series-${index}`,
2779
2842
  invertIfNegative: typeof series.invertIfNegative === "boolean" ? series.invertIfNegative : void 0,
2780
2843
  lineColor: _nullishCoalesce(_nullishCoalesce(rawLineColor, () => ( rawFillColor)), () => ( void 0)),
2781
- lineWidthPx: typeof _optionalChain([shapeProperties, 'optionalAccess', _291 => _291.lineWidth]) === "number" ? Math.max(1, Number(shapeProperties.lineWidth) / EMU_PER_PIXEL) : void 0,
2844
+ lineWidthPx: typeof _optionalChain([shapeProperties, 'optionalAccess', _306 => _306.lineWidth]) === "number" ? Math.max(1, Number(shapeProperties.lineWidth) / EMU_PER_PIXEL) : void 0,
2782
2845
  marker: series.marker && typeof series.marker === "object" ? series.marker : void 0,
2783
2846
  markerColor: void 0,
2784
2847
  markerLineColor: void 0,
@@ -2908,7 +2971,7 @@ function collectChartOriginsForSheet(archive, origin) {
2908
2971
  for (const anchorNode of anchorNodes) {
2909
2972
  const graphicFrame = getFirstLocalDescendant(anchorNode, "graphicFrame");
2910
2973
  const chartNode = graphicFrame ? getFirstLocalDescendant(graphicFrame, "chart") : null;
2911
- const relationshipId = _nullishCoalesce(_nullishCoalesce(_optionalChain([chartNode, 'optionalAccess', _292 => _292.getAttributeNS, 'call', _293 => _293("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "id")]), () => ( _optionalChain([chartNode, 'optionalAccess', _294 => _294.getAttribute, 'call', _295 => _295("r:id")]))), () => ( _optionalChain([chartNode, 'optionalAccess', _296 => _296.getAttribute, 'call', _297 => _297("id")])));
2974
+ const relationshipId = _nullishCoalesce(_nullishCoalesce(_optionalChain([chartNode, 'optionalAccess', _307 => _307.getAttributeNS, 'call', _308 => _308("http://schemas.openxmlformats.org/officeDocument/2006/relationships", "id")]), () => ( _optionalChain([chartNode, 'optionalAccess', _309 => _309.getAttribute, 'call', _310 => _310("r:id")]))), () => ( _optionalChain([chartNode, 'optionalAccess', _311 => _311.getAttribute, 'call', _312 => _312("id")])));
2912
2975
  if (!relationshipId) {
2913
2976
  continue;
2914
2977
  }
@@ -3012,7 +3075,7 @@ function loadWorkbookChartAssets(workbook, imageAssets, visibleSheetIndexByWorkb
3012
3075
  is3d: typeof chart.is3D === "boolean" ? chart.is3D : void 0,
3013
3076
  legend: normalizeLegend(chart.legend) ? {
3014
3077
  ...normalizeLegend(chart.legend),
3015
- position: normalizeLegendPosition(_optionalChain([normalizeLegend, 'call', _298 => _298(chart.legend), 'optionalAccess', _299 => _299.position]))
3078
+ position: normalizeLegendPosition(_optionalChain([normalizeLegend, 'call', _313 => _313(chart.legend), 'optionalAccess', _314 => _314.position]))
3016
3079
  } : null,
3017
3080
  name: typeof drawing.name === "string" ? drawing.name : void 0,
3018
3081
  overlap: typeof chart.overlap === "number" ? chart.overlap : void 0,
@@ -3063,7 +3126,7 @@ function loadWorkbookChartAssets(workbook, imageAssets, visibleSheetIndexByWorkb
3063
3126
  visibleSheetIndex,
3064
3127
  rawChartEx,
3065
3128
  chartExIndex,
3066
- _nullishCoalesce(_optionalChain([imageAssets, 'optionalAccess', _300 => _300.themePalette]), () => ( null))
3129
+ _nullishCoalesce(_optionalChain([imageAssets, 'optionalAccess', _315 => _315.themePalette]), () => ( null))
3067
3130
  );
3068
3131
  });
3069
3132
  return [...classicCharts, ...modernCharts];
@@ -3141,7 +3204,7 @@ function updateAnchorNode(anchorNode, anchor) {
3141
3204
  function setChartTitle(chartNode, value) {
3142
3205
  const existing = getFirstLocalChild(chartNode, "title");
3143
3206
  if (!value) {
3144
- _optionalChain([existing, 'optionalAccess', _301 => _301.remove, 'call', _302 => _302()]);
3207
+ _optionalChain([existing, 'optionalAccess', _316 => _316.remove, 'call', _317 => _317()]);
3145
3208
  return;
3146
3209
  }
3147
3210
  const titleNode = _nullishCoalesce(existing, () => ( chartNode.insertBefore(
@@ -3175,7 +3238,7 @@ function setRefFormula(parent, refNodeName, formula) {
3175
3238
  }
3176
3239
  function setSeriesText(seriesNode, series) {
3177
3240
  const raw = series.raw && typeof series.raw === "object" ? series.raw : null;
3178
- const nameFormula = typeof _optionalChain([raw, 'optionalAccess', _303 => _303.name]) === "string" && raw.name.length > 0 ? raw.name : void 0;
3241
+ const nameFormula = typeof _optionalChain([raw, 'optionalAccess', _318 => _318.name]) === "string" && raw.name.length > 0 ? raw.name : void 0;
3179
3242
  if (!nameFormula && series.name === void 0) {
3180
3243
  return;
3181
3244
  }
@@ -3200,12 +3263,12 @@ function updateSeriesNodes(plotAreaNode, chart) {
3200
3263
  return;
3201
3264
  }
3202
3265
  setSeriesText(seriesNode, series);
3203
- if (_optionalChain([series, 'access', _304 => _304.categoriesRef, 'optionalAccess', _305 => _305.formula])) {
3266
+ if (_optionalChain([series, 'access', _319 => _319.categoriesRef, 'optionalAccess', _320 => _320.formula])) {
3204
3267
  const target = _nullishCoalesce(_nullishCoalesce(getFirstLocalChild(seriesNode, "xVal"), () => ( getFirstLocalChild(seriesNode, "cat"))), () => ( (chart.chartType === "Scatter" || chart.chartType === "ScatterLines" || chart.chartType === "ScatterSmooth" || chart.chartType === "Bubble" ? ensureChild(seriesNode, "xVal") : ensureChild(seriesNode, "cat"))));
3205
3268
  const categoryRefName = target.localName === "xVal" || getFirstLocalChild(target, "numRef") ? "numRef" : "strRef";
3206
3269
  setRefFormula(target, categoryRefName, series.categoriesRef.formula);
3207
3270
  }
3208
- if (_optionalChain([series, 'access', _306 => _306.valuesRef, 'optionalAccess', _307 => _307.formula])) {
3271
+ if (_optionalChain([series, 'access', _321 => _321.valuesRef, 'optionalAccess', _322 => _322.formula])) {
3209
3272
  const target = _nullishCoalesce(_nullishCoalesce(getFirstLocalChild(seriesNode, "yVal"), () => ( getFirstLocalChild(seriesNode, "val"))), () => ( (chart.chartType === "Scatter" || chart.chartType === "ScatterLines" || chart.chartType === "ScatterSmooth" || chart.chartType === "Bubble" ? ensureChild(seriesNode, "yVal") : ensureChild(seriesNode, "val"))));
3210
3273
  setRefFormula(target, "numRef", series.valuesRef.formula);
3211
3274
  }
@@ -3227,14 +3290,14 @@ function updateAxisNode(axisNode, axis) {
3227
3290
  }
3228
3291
  if (axis.position) {
3229
3292
  setLeafValue(ensureChild(axisNode, "axPos"), "val", axis.position);
3230
- _optionalChain([getFirstLocalChild, 'call', _308 => _308(axisNode, "axPos"), 'optionalAccess', _309 => _309.setAttribute, 'call', _310 => _310("val", axis.position)]);
3293
+ _optionalChain([getFirstLocalChild, 'call', _323 => _323(axisNode, "axPos"), 'optionalAccess', _324 => _324.setAttribute, 'call', _325 => _325("val", axis.position)]);
3231
3294
  }
3232
3295
  if (axis.majorGridlines !== void 0) {
3233
3296
  const gridlines = getFirstLocalChild(axisNode, "majorGridlines");
3234
3297
  if (axis.majorGridlines && !gridlines) {
3235
3298
  axisNode.appendChild(axisNode.ownerDocument.createElementNS(CHART_NS, "c:majorGridlines"));
3236
3299
  } else if (!axis.majorGridlines) {
3237
- _optionalChain([gridlines, 'optionalAccess', _311 => _311.remove, 'call', _312 => _312()]);
3300
+ _optionalChain([gridlines, 'optionalAccess', _326 => _326.remove, 'call', _327 => _327()]);
3238
3301
  }
3239
3302
  }
3240
3303
  if (axis.minorGridlines !== void 0) {
@@ -3242,28 +3305,28 @@ function updateAxisNode(axisNode, axis) {
3242
3305
  if (axis.minorGridlines && !gridlines) {
3243
3306
  axisNode.appendChild(axisNode.ownerDocument.createElementNS(CHART_NS, "c:minorGridlines"));
3244
3307
  } else if (!axis.minorGridlines) {
3245
- _optionalChain([gridlines, 'optionalAccess', _313 => _313.remove, 'call', _314 => _314()]);
3308
+ _optionalChain([gridlines, 'optionalAccess', _328 => _328.remove, 'call', _329 => _329()]);
3246
3309
  }
3247
3310
  }
3248
3311
  if (axis.majorTickMark) {
3249
- _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _315 => _315(axisNode, "majorTickMark"), 'optionalAccess', _316 => _316.setAttribute, 'call', _317 => _317("val", axis.majorTickMark)]), () => ( setBooleanValue(axisNode, "majorTickMark", false).setAttribute("val", axis.majorTickMark)));
3312
+ _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _330 => _330(axisNode, "majorTickMark"), 'optionalAccess', _331 => _331.setAttribute, 'call', _332 => _332("val", axis.majorTickMark)]), () => ( setBooleanValue(axisNode, "majorTickMark", false).setAttribute("val", axis.majorTickMark)));
3250
3313
  }
3251
3314
  if (axis.minorTickMark) {
3252
- _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _318 => _318(axisNode, "minorTickMark"), 'optionalAccess', _319 => _319.setAttribute, 'call', _320 => _320("val", axis.minorTickMark)]), () => ( setBooleanValue(axisNode, "minorTickMark", false).setAttribute("val", axis.minorTickMark)));
3315
+ _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _333 => _333(axisNode, "minorTickMark"), 'optionalAccess', _334 => _334.setAttribute, 'call', _335 => _335("val", axis.minorTickMark)]), () => ( setBooleanValue(axisNode, "minorTickMark", false).setAttribute("val", axis.minorTickMark)));
3253
3316
  }
3254
3317
  if (axis.labelPosition) {
3255
- _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _321 => _321(axisNode, "tickLblPos"), 'optionalAccess', _322 => _322.setAttribute, 'call', _323 => _323("val", axis.labelPosition)]), () => ( setBooleanValue(axisNode, "tickLblPos", false).setAttribute("val", axis.labelPosition)));
3318
+ _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _336 => _336(axisNode, "tickLblPos"), 'optionalAccess', _337 => _337.setAttribute, 'call', _338 => _338("val", axis.labelPosition)]), () => ( setBooleanValue(axisNode, "tickLblPos", false).setAttribute("val", axis.labelPosition)));
3256
3319
  }
3257
3320
  if (axis.crosses) {
3258
- _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _324 => _324(axisNode, "crosses"), 'optionalAccess', _325 => _325.setAttribute, 'call', _326 => _326("val", axis.crosses)]), () => ( setBooleanValue(axisNode, "crosses", false).setAttribute("val", axis.crosses)));
3321
+ _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _339 => _339(axisNode, "crosses"), 'optionalAccess', _340 => _340.setAttribute, 'call', _341 => _341("val", axis.crosses)]), () => ( setBooleanValue(axisNode, "crosses", false).setAttribute("val", axis.crosses)));
3259
3322
  }
3260
3323
  if (axis.crossBetween) {
3261
- _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _327 => _327(axisNode, "crossBetween"), 'optionalAccess', _328 => _328.setAttribute, 'call', _329 => _329("val", axis.crossBetween)]), () => ( setBooleanValue(axisNode, "crossBetween", false).setAttribute("val", axis.crossBetween)));
3324
+ _nullishCoalesce(_optionalChain([getFirstLocalChild, 'call', _342 => _342(axisNode, "crossBetween"), 'optionalAccess', _343 => _343.setAttribute, 'call', _344 => _344("val", axis.crossBetween)]), () => ( setBooleanValue(axisNode, "crossBetween", false).setAttribute("val", axis.crossBetween)));
3262
3325
  }
3263
3326
  if (axis.delete !== void 0) {
3264
3327
  setBooleanValue(axisNode, "delete", axis.delete);
3265
3328
  }
3266
- if (_optionalChain([axis, 'access', _330 => _330.numberFormat, 'optionalAccess', _331 => _331.formatCode])) {
3329
+ if (_optionalChain([axis, 'access', _345 => _345.numberFormat, 'optionalAccess', _346 => _346.formatCode])) {
3267
3330
  const numFmt = ensureChild(axisNode, "numFmt");
3268
3331
  numFmt.setAttribute("formatCode", axis.numberFormat.formatCode);
3269
3332
  if (axis.numberFormat.sourceLinked !== void 0) {
@@ -3319,7 +3382,7 @@ function updateWorkbookChartAnchor(imageAssets, chartAssets, chartId, anchor) {
3319
3382
  }
3320
3383
  function updateWorkbookChartDefinition(imageAssets, chartAssets, chartId, patch) {
3321
3384
  const origin = chartAssets.chartOriginsById.get(chartId);
3322
- if (!_optionalChain([origin, 'optionalAccess', _332 => _332.chartPath])) {
3385
+ if (!_optionalChain([origin, 'optionalAccess', _347 => _347.chartPath])) {
3323
3386
  return false;
3324
3387
  }
3325
3388
  const chartXml = readArchiveText(imageAssets.archive, origin.chartPath);
@@ -3478,7 +3541,7 @@ function resolveWorkbookColor(color, themePalette) {
3478
3541
  }
3479
3542
  const themeValue = _nullishCoalesce(color.theme, () => ( color.themeIndex));
3480
3543
  const numericTheme = typeof themeValue === "number" ? themeValue : typeof themeValue === "string" && themeValue.trim().length > 0 ? Number(themeValue) : Number.NaN;
3481
- const themeColor = Number.isFinite(numericTheme) ? _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _333 => _333.colorsByIndex, 'access', _334 => _334[numericTheme]]), () => ( null)) : null;
3544
+ const themeColor = Number.isFinite(numericTheme) ? _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _348 => _348.colorsByIndex, 'access', _349 => _349[numericTheme]]), () => ( null)) : null;
3482
3545
  if (!themeColor) {
3483
3546
  return null;
3484
3547
  }
@@ -3520,7 +3583,7 @@ function resolveWorkbookFillStyle(fill, themePalette) {
3520
3583
  if (stops.length > 0) {
3521
3584
  const gradientType = typeof fill.gradientType === "string" ? fill.gradientType : "linear";
3522
3585
  if (gradientType === "path") {
3523
- const backgroundColor = _nullishCoalesce(_optionalChain([stops, 'access', _335 => _335[stops.length - 1], 'optionalAccess', _336 => _336.color]), () => ( null));
3586
+ const backgroundColor = _nullishCoalesce(_optionalChain([stops, 'access', _350 => _350[stops.length - 1], 'optionalAccess', _351 => _351.color]), () => ( null));
3524
3587
  return {
3525
3588
  backgroundColor,
3526
3589
  backgroundImage: `radial-gradient(circle at center, ${stops.map((stop) => `${stop.color} ${Math.max(0, Math.min(100, stop.position * 100))}%`).join(", ")})`
@@ -3529,7 +3592,7 @@ function resolveWorkbookFillStyle(fill, themePalette) {
3529
3592
  const degree = typeof fill.degree === "number" ? fill.degree : Number(_nullishCoalesce(fill.degree, () => ( 0)));
3530
3593
  const cssAngle = Number.isFinite(degree) ? 90 - degree : 90;
3531
3594
  return {
3532
- backgroundColor: _nullishCoalesce(_optionalChain([stops, 'access', _337 => _337[stops.length - 1], 'optionalAccess', _338 => _338.color]), () => ( null)),
3595
+ backgroundColor: _nullishCoalesce(_optionalChain([stops, 'access', _352 => _352[stops.length - 1], 'optionalAccess', _353 => _353.color]), () => ( null)),
3533
3596
  backgroundImage: `linear-gradient(${cssAngle}deg, ${stops.map((stop) => `${stop.color} ${Math.max(0, Math.min(100, stop.position * 100))}%`).join(", ")})`
3534
3597
  };
3535
3598
  }
@@ -3826,7 +3889,7 @@ function readFeaturePropertyBagCheckboxComplements(archive) {
3826
3889
  return /* @__PURE__ */ new Set();
3827
3890
  }
3828
3891
  const document2 = parseXml2(xml);
3829
- if (!_optionalChain([document2, 'optionalAccess', _339 => _339.documentElement])) {
3892
+ if (!_optionalChain([document2, 'optionalAccess', _354 => _354.documentElement])) {
3830
3893
  return /* @__PURE__ */ new Set();
3831
3894
  }
3832
3895
  const bagNodes = getChildElements(document2.documentElement, "bag");
@@ -3911,7 +3974,7 @@ function resolveContentType(contentTypes, path) {
3911
3974
  if (override) {
3912
3975
  return override;
3913
3976
  }
3914
- const extension = _optionalChain([normalized, 'access', _340 => _340.split, 'call', _341 => _341("."), 'access', _342 => _342.pop, 'call', _343 => _343(), 'optionalAccess', _344 => _344.toLowerCase, 'call', _345 => _345()]);
3977
+ const extension = _optionalChain([normalized, 'access', _355 => _355.split, 'call', _356 => _356("."), 'access', _357 => _357.pop, 'call', _358 => _358(), 'optionalAccess', _359 => _359.toLowerCase, 'call', _360 => _360()]);
3915
3978
  if (!extension) {
3916
3979
  return "application/octet-stream";
3917
3980
  }
@@ -4008,15 +4071,15 @@ function parseWorkbookTheme(archive) {
4008
4071
  const key = colorNode.localName;
4009
4072
  const srgbNode = getFirstChild(colorNode, "srgbClr");
4010
4073
  const sysNode = getFirstChild(colorNode, "sysClr");
4011
- const hex = _nullishCoalesce(_optionalChain([srgbNode, 'optionalAccess', _346 => _346.getAttribute, 'call', _347 => _347("val")]), () => ( _optionalChain([sysNode, 'optionalAccess', _348 => _348.getAttribute, 'call', _349 => _349("lastClr")])));
4074
+ const hex = _nullishCoalesce(_optionalChain([srgbNode, 'optionalAccess', _361 => _361.getAttribute, 'call', _362 => _362("val")]), () => ( _optionalChain([sysNode, 'optionalAccess', _363 => _363.getAttribute, 'call', _364 => _364("lastClr")])));
4012
4075
  if (hex) {
4013
4076
  colors.set(key, normalizeHexColor3(hex));
4014
4077
  }
4015
4078
  }
4016
4079
  }
4017
4080
  const fontSchemeNode = _nullishCoalesce(getLocalElements(themeDocument, "fontScheme")[0], () => ( null));
4018
- const majorLatinFont = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _350 => _350(getFirstChild(fontSchemeNode, "majorFont"), "latin"), 'optionalAccess', _351 => _351.getAttribute, 'call', _352 => _352("typeface")]), () => ( null));
4019
- const minorLatinFont = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _353 => _353(getFirstChild(fontSchemeNode, "minorFont"), "latin"), 'optionalAccess', _354 => _354.getAttribute, 'call', _355 => _355("typeface")]), () => ( null));
4081
+ const majorLatinFont = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _365 => _365(getFirstChild(fontSchemeNode, "majorFont"), "latin"), 'optionalAccess', _366 => _366.getAttribute, 'call', _367 => _367("typeface")]), () => ( null));
4082
+ const minorLatinFont = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _368 => _368(getFirstChild(fontSchemeNode, "minorFont"), "latin"), 'optionalAccess', _369 => _369.getAttribute, 'call', _370 => _370("typeface")]), () => ( null));
4020
4083
  colors.set("bg1", _nullishCoalesce(_nullishCoalesce(colors.get("lt1"), () => ( defaultTheme.colors.get("bg1"))), () => ( "#ffffff")));
4021
4084
  colors.set("tx1", _nullishCoalesce(_nullishCoalesce(colors.get("dk1"), () => ( defaultTheme.colors.get("tx1"))), () => ( "#000000")));
4022
4085
  colors.set("bg2", _nullishCoalesce(_nullishCoalesce(colors.get("lt2"), () => ( defaultTheme.colors.get("bg2"))), () => ( "#e7e6e6")));
@@ -4076,8 +4139,8 @@ function parseSheetSparklines(document2, themePalette) {
4076
4139
  continue;
4077
4140
  }
4078
4141
  for (const sparklineNode of getChildElements(sparklineCollectionNode, "sparkline")) {
4079
- const formula = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _356 => _356(sparklineNode, "f"), 'optionalAccess', _357 => _357.textContent]), () => ( ""));
4080
- const targetReference = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _358 => _358(sparklineNode, "sqref"), 'optionalAccess', _359 => _359.textContent]), () => ( ""));
4142
+ const formula = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _371 => _371(sparklineNode, "f"), 'optionalAccess', _372 => _372.textContent]), () => ( ""));
4143
+ const targetReference = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _373 => _373(sparklineNode, "sqref"), 'optionalAccess', _374 => _374.textContent]), () => ( ""));
4081
4144
  const range = parseFormulaRangeReference(formula);
4082
4145
  const target = parseFormulaCellReference(targetReference);
4083
4146
  if (!range || !target) {
@@ -4112,15 +4175,15 @@ function parseSpreadsheetFont(node) {
4112
4175
  font[property] = hasEnabledSpreadsheetFlag(flag);
4113
4176
  }
4114
4177
  }
4115
- const size = _optionalChain([getFirstChild, 'call', _360 => _360(node, "sz"), 'optionalAccess', _361 => _361.getAttribute, 'call', _362 => _362("val")]);
4116
- const name = _optionalChain([getFirstChild, 'call', _363 => _363(node, "name"), 'optionalAccess', _364 => _364.getAttribute, 'call', _365 => _365("val")]);
4117
- const family = _optionalChain([getFirstChild, 'call', _366 => _366(node, "family"), 'optionalAccess', _367 => _367.getAttribute, 'call', _368 => _368("val")]);
4118
- const scheme = _optionalChain([getFirstChild, 'call', _369 => _369(node, "scheme"), 'optionalAccess', _370 => _370.getAttribute, 'call', _371 => _371("val")]);
4119
- const charset = _optionalChain([getFirstChild, 'call', _372 => _372(node, "charset"), 'optionalAccess', _373 => _373.getAttribute, 'call', _374 => _374("val")]);
4120
- const verticalAlign = _optionalChain([getFirstChild, 'call', _375 => _375(node, "vertAlign"), 'optionalAccess', _376 => _376.getAttribute, 'call', _377 => _377("val")]);
4178
+ const size = _optionalChain([getFirstChild, 'call', _375 => _375(node, "sz"), 'optionalAccess', _376 => _376.getAttribute, 'call', _377 => _377("val")]);
4179
+ const name = _optionalChain([getFirstChild, 'call', _378 => _378(node, "name"), 'optionalAccess', _379 => _379.getAttribute, 'call', _380 => _380("val")]);
4180
+ const family = _optionalChain([getFirstChild, 'call', _381 => _381(node, "family"), 'optionalAccess', _382 => _382.getAttribute, 'call', _383 => _383("val")]);
4181
+ const scheme = _optionalChain([getFirstChild, 'call', _384 => _384(node, "scheme"), 'optionalAccess', _385 => _385.getAttribute, 'call', _386 => _386("val")]);
4182
+ const charset = _optionalChain([getFirstChild, 'call', _387 => _387(node, "charset"), 'optionalAccess', _388 => _388.getAttribute, 'call', _389 => _389("val")]);
4183
+ const verticalAlign = _optionalChain([getFirstChild, 'call', _390 => _390(node, "vertAlign"), 'optionalAccess', _391 => _391.getAttribute, 'call', _392 => _392("val")]);
4121
4184
  const color = parseSpreadsheetColor(getFirstChild(node, "color"));
4122
4185
  if (getFirstChild(node, "u")) {
4123
- font.underline = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _378 => _378(node, "u"), 'optionalAccess', _379 => _379.getAttribute, 'call', _380 => _380("val")]), () => ( "single"));
4186
+ font.underline = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _393 => _393(node, "u"), 'optionalAccess', _394 => _394.getAttribute, 'call', _395 => _395("val")]), () => ( "single"));
4124
4187
  }
4125
4188
  if (size !== null && size !== void 0) {
4126
4189
  font.size = Number(size);
@@ -4311,8 +4374,8 @@ function parseResolvedXfStyle(xfNode, fonts, fills, borders, checkboxComplementI
4311
4374
  style.alignment = alignment;
4312
4375
  }
4313
4376
  const xfComplementNode = getFirstDescendant(xfNode, "xfComplement");
4314
- const xfComplementIndex = Number(_nullishCoalesce(_optionalChain([xfComplementNode, 'optionalAccess', _381 => _381.getAttribute, 'call', _382 => _382("i")]), () => ( Number.NaN)));
4315
- if (Number.isFinite(xfComplementIndex) && _optionalChain([checkboxComplementIndices, 'optionalAccess', _383 => _383.has, 'call', _384 => _384(xfComplementIndex)])) {
4377
+ const xfComplementIndex = Number(_nullishCoalesce(_optionalChain([xfComplementNode, 'optionalAccess', _396 => _396.getAttribute, 'call', _397 => _397("i")]), () => ( Number.NaN)));
4378
+ if (Number.isFinite(xfComplementIndex) && _optionalChain([checkboxComplementIndices, 'optionalAccess', _398 => _398.has, 'call', _399 => _399(xfComplementIndex)])) {
4316
4379
  style.cellControl = { kind: "checkbox" };
4317
4380
  }
4318
4381
  return style;
@@ -4406,7 +4469,7 @@ function parseWorkbookStyles(archive) {
4406
4469
  });
4407
4470
  tableStyleByName[name] = elements;
4408
4471
  });
4409
- const normalFont = _nullishCoalesce(_nullishCoalesce(_optionalChain([namedCellStyleByName, 'access', _385 => _385.Normal, 'optionalAccess', _386 => _386.font]), () => ( _optionalChain([styleById, 'access', _387 => _387[0], 'optionalAccess', _388 => _388.font]))), () => ( fonts[0]));
4472
+ const normalFont = _nullishCoalesce(_nullishCoalesce(_optionalChain([namedCellStyleByName, 'access', _400 => _400.Normal, 'optionalAccess', _401 => _401.font]), () => ( _optionalChain([styleById, 'access', _402 => _402[0], 'optionalAccess', _403 => _403.font]))), () => ( fonts[0]));
4410
4473
  const defaultFont = normalFont ? {
4411
4474
  family: typeof normalFont.name === "string" ? normalFont.name : void 0,
4412
4475
  sizePt: typeof normalFont.size === "number" ? normalFont.size : void 0
@@ -4436,7 +4499,7 @@ function parseConditionalFormatValueObject(node) {
4436
4499
  if (!type) {
4437
4500
  return null;
4438
4501
  }
4439
- const rawValue = _nullishCoalesce(_nullishCoalesce(node.getAttribute("val"), () => ( _optionalChain([getFirstChild, 'call', _389 => _389(node, "f"), 'optionalAccess', _390 => _390.textContent]))), () => ( void 0));
4502
+ const rawValue = _nullishCoalesce(_nullishCoalesce(node.getAttribute("val"), () => ( _optionalChain([getFirstChild, 'call', _404 => _404(node, "f"), 'optionalAccess', _405 => _405.textContent]))), () => ( void 0));
4440
4503
  const numericValue = rawValue !== void 0 ? Number(rawValue) : Number.NaN;
4441
4504
  return {
4442
4505
  type,
@@ -4485,7 +4548,7 @@ function parseStandardConditionalFormatRule(cfRuleNode, ranges, differentialStyl
4485
4548
  if (cfvos.length === 0) {
4486
4549
  return null;
4487
4550
  }
4488
- const extId = _optionalChain([getFirstDescendant, 'call', _391 => _391(cfRuleNode, "id"), 'optionalAccess', _392 => _392.textContent, 'optionalAccess', _393 => _393.trim, 'call', _394 => _394()]) || void 0;
4551
+ const extId = _optionalChain([getFirstDescendant, 'call', _406 => _406(cfRuleNode, "id"), 'optionalAccess', _407 => _407.textContent, 'optionalAccess', _408 => _408.trim, 'call', _409 => _409()]) || void 0;
4489
4552
  return {
4490
4553
  cfvos,
4491
4554
  color: parseSpreadsheetColor(getFirstChild(dataBarNode, "color")),
@@ -4661,7 +4724,7 @@ function parseConditionalFormatRules(document2, differentialStyles = []) {
4661
4724
  const extendedRules = [];
4662
4725
  getLocalElements(document2, "conditionalFormatting").forEach((conditionalFormattingNode) => {
4663
4726
  const isExtended = conditionalFormattingNode.namespaceURI !== SPREADSHEET_NS;
4664
- const ranges = isExtended ? parseSqrefRanges(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _395 => _395(conditionalFormattingNode, "sqref"), 'optionalAccess', _396 => _396.textContent]), () => ( ""))) : parseSqrefRanges(conditionalFormattingNode.getAttribute("sqref"));
4727
+ const ranges = isExtended ? parseSqrefRanges(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _410 => _410(conditionalFormattingNode, "sqref"), 'optionalAccess', _411 => _411.textContent]), () => ( ""))) : parseSqrefRanges(conditionalFormattingNode.getAttribute("sqref"));
4665
4728
  getChildElements(conditionalFormattingNode, "cfRule").forEach((cfRuleNode) => {
4666
4729
  const parsedRule = isExtended ? parseExtendedConditionalFormatRule(cfRuleNode, ranges) : parseStandardConditionalFormatRule(cfRuleNode, ranges, differentialStyles);
4667
4730
  if (parsedRule) {
@@ -4708,11 +4771,11 @@ function parseSheetState(archive, path, options) {
4708
4771
  if (!document2) {
4709
4772
  return null;
4710
4773
  }
4711
- const includeCachedFormulaValues = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _397 => _397.includeCachedFormulaValues]), () => ( true));
4712
- const autoFilterRanges = parseSqrefRanges(_optionalChain([getLocalElements, 'call', _398 => _398(document2, "autoFilter"), 'access', _399 => _399[0], 'optionalAccess', _400 => _400.getAttribute, 'call', _401 => _401("ref")]));
4774
+ const includeCachedFormulaValues = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _412 => _412.includeCachedFormulaValues]), () => ( true));
4775
+ const autoFilterRanges = parseSqrefRanges(_optionalChain([getLocalElements, 'call', _413 => _413(document2, "autoFilter"), 'access', _414 => _414[0], 'optionalAccess', _415 => _415.getAttribute, 'call', _416 => _416("ref")]));
4713
4776
  const cachedFormulaValues = {};
4714
- const conditionalFormatRules = parseConditionalFormatRules(document2, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _402 => _402.differentialStyles]), () => ( [])));
4715
- const sparklines = parseSheetSparklines(document2, _optionalChain([options, 'optionalAccess', _403 => _403.themePalette]));
4777
+ const conditionalFormatRules = parseConditionalFormatRules(document2, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _417 => _417.differentialStyles]), () => ( [])));
4778
+ const sparklines = parseSheetSparklines(document2, _optionalChain([options, 'optionalAccess', _418 => _418.themePalette]));
4716
4779
  const sheetFormatNode = _nullishCoalesce(getLocalElements(document2, "sheetFormatPr")[0], () => ( null));
4717
4780
  const sheetViewNode = _nullishCoalesce(getLocalElements(document2, "sheetView")[0], () => ( null));
4718
4781
  const rowHeightOverridesPx = {};
@@ -4725,15 +4788,15 @@ function parseSheetState(archive, path, options) {
4725
4788
  let maxContentCol = -1;
4726
4789
  let maxContentRow = -1;
4727
4790
  const columnWidthCharacterWidthPx = measureColumnCharacterWidthPx(
4728
- _optionalChain([options, 'optionalAccess', _404 => _404.defaultFont, 'optionalAccess', _405 => _405.family]),
4729
- _optionalChain([options, 'optionalAccess', _406 => _406.defaultFont, 'optionalAccess', _407 => _407.sizePt])
4791
+ _optionalChain([options, 'optionalAccess', _419 => _419.defaultFont, 'optionalAccess', _420 => _420.family]),
4792
+ _optionalChain([options, 'optionalAccess', _421 => _421.defaultFont, 'optionalAccess', _422 => _422.sizePt])
4730
4793
  );
4731
- const defaultRowHeight = Number(_nullishCoalesce(_optionalChain([sheetFormatNode, 'optionalAccess', _408 => _408.getAttribute, 'call', _409 => _409("defaultRowHeight")]), () => ( 15)));
4794
+ const defaultRowHeight = Number(_nullishCoalesce(_optionalChain([sheetFormatNode, 'optionalAccess', _423 => _423.getAttribute, 'call', _424 => _424("defaultRowHeight")]), () => ( 15)));
4732
4795
  const defaultColWidth = Number(
4733
- _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetFormatNode, 'optionalAccess', _410 => _410.getAttribute, 'call', _411 => _411("defaultColWidth")]), () => ( _optionalChain([sheetFormatNode, 'optionalAccess', _412 => _412.getAttribute, 'call', _413 => _413("baseColWidth")]))), () => ( 8.43))
4796
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetFormatNode, 'optionalAccess', _425 => _425.getAttribute, 'call', _426 => _426("defaultColWidth")]), () => ( _optionalChain([sheetFormatNode, 'optionalAccess', _427 => _427.getAttribute, 'call', _428 => _428("baseColWidth")]))), () => ( 8.43))
4734
4797
  );
4735
4798
  const rawZoomScale = Number(
4736
- _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetViewNode, 'optionalAccess', _414 => _414.getAttribute, 'call', _415 => _415("zoomScale")]), () => ( _optionalChain([sheetViewNode, 'optionalAccess', _416 => _416.getAttribute, 'call', _417 => _417("zoomScaleNormal")]))), () => ( Number.NaN))
4799
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetViewNode, 'optionalAccess', _429 => _429.getAttribute, 'call', _430 => _430("zoomScale")]), () => ( _optionalChain([sheetViewNode, 'optionalAccess', _431 => _431.getAttribute, 'call', _432 => _432("zoomScaleNormal")]))), () => ( Number.NaN))
4737
4800
  );
4738
4801
  const zoomScale = Number.isFinite(rawZoomScale) && rawZoomScale > 0 ? rawZoomScale : 100;
4739
4802
  const trackContentCell = (cellRef) => {
@@ -4829,7 +4892,7 @@ function parseSheetState(archive, path, options) {
4829
4892
  hiddenRows: [],
4830
4893
  rowHeightOverridesPx,
4831
4894
  rowStyleIds,
4832
- showGridLines: (_nullishCoalesce(_optionalChain([sheetViewNode, 'optionalAccess', _418 => _418.getAttribute, 'call', _419 => _419("showGridLines")]), () => ( "1"))) !== "0",
4895
+ showGridLines: (_nullishCoalesce(_optionalChain([sheetViewNode, 'optionalAccess', _433 => _433.getAttribute, 'call', _434 => _434("showGridLines")]), () => ( "1"))) !== "0",
4833
4896
  sparklines,
4834
4897
  zoomScale
4835
4898
  };
@@ -4964,9 +5027,9 @@ function resolvePreferredTextTypeface(node, theme) {
4964
5027
  if (!node) {
4965
5028
  return void 0;
4966
5029
  }
4967
- const latin = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _420 => _420(node, "latin"), 'optionalAccess', _421 => _421.getAttribute, 'call', _422 => _422("typeface")]), () => ( null));
4968
- const eastAsian = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _423 => _423(node, "ea"), 'optionalAccess', _424 => _424.getAttribute, 'call', _425 => _425("typeface")]), () => ( null));
4969
- const complexScript = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _426 => _426(node, "cs"), 'optionalAccess', _427 => _427.getAttribute, 'call', _428 => _428("typeface")]), () => ( null));
5030
+ const latin = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _435 => _435(node, "latin"), 'optionalAccess', _436 => _436.getAttribute, 'call', _437 => _437("typeface")]), () => ( null));
5031
+ const eastAsian = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _438 => _438(node, "ea"), 'optionalAccess', _439 => _439.getAttribute, 'call', _440 => _440("typeface")]), () => ( null));
5032
+ const complexScript = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _441 => _441(node, "cs"), 'optionalAccess', _442 => _442.getAttribute, 'call', _443 => _443("typeface")]), () => ( null));
4970
5033
  const candidates = [latin, eastAsian, complexScript];
4971
5034
  const explicit = candidates.find((candidate) => candidate && !isThemeTypeface(candidate));
4972
5035
  if (explicit) {
@@ -4977,14 +5040,14 @@ function resolvePreferredTextTypeface(node, theme) {
4977
5040
  function parseShapeTextStyle(node, theme, fallbackColor) {
4978
5041
  if (!node) {
4979
5042
  return {
4980
- color: _optionalChain([fallbackColor, 'optionalAccess', _429 => _429.color])
5043
+ color: _optionalChain([fallbackColor, 'optionalAccess', _444 => _444.color])
4981
5044
  };
4982
5045
  }
4983
5046
  const fillColor = _nullishCoalesce(_nullishCoalesce(resolveFillColor(node, theme), () => ( fallbackColor)), () => ( null));
4984
5047
  const underlineValue = node.getAttribute("u");
4985
5048
  return {
4986
5049
  bold: node.getAttribute("b") === "1" || void 0,
4987
- color: _optionalChain([fillColor, 'optionalAccess', _430 => _430.color]),
5050
+ color: _optionalChain([fillColor, 'optionalAccess', _445 => _445.color]),
4988
5051
  fontFamily: resolvePreferredTextTypeface(node, theme),
4989
5052
  fontSizePt: node.getAttribute("sz") ? Number(node.getAttribute("sz")) / 100 : void 0,
4990
5053
  italic: node.getAttribute("i") === "1" || void 0,
@@ -5010,10 +5073,10 @@ function parseMarker(node) {
5010
5073
  if (!node) {
5011
5074
  return null;
5012
5075
  }
5013
- const col = Number(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _431 => _431(node, "col"), 'optionalAccess', _432 => _432.textContent]), () => ( 0)));
5014
- const row = Number(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _433 => _433(node, "row"), 'optionalAccess', _434 => _434.textContent]), () => ( 0)));
5015
- const colOffsetEmu = Number(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _435 => _435(node, "colOff"), 'optionalAccess', _436 => _436.textContent]), () => ( 0)));
5016
- const rowOffsetEmu = Number(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _437 => _437(node, "rowOff"), 'optionalAccess', _438 => _438.textContent]), () => ( 0)));
5076
+ const col = Number(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _446 => _446(node, "col"), 'optionalAccess', _447 => _447.textContent]), () => ( 0)));
5077
+ const row = Number(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _448 => _448(node, "row"), 'optionalAccess', _449 => _449.textContent]), () => ( 0)));
5078
+ const colOffsetEmu = Number(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _450 => _450(node, "colOff"), 'optionalAccess', _451 => _451.textContent]), () => ( 0)));
5079
+ const rowOffsetEmu = Number(_nullishCoalesce(_optionalChain([getFirstChild, 'call', _452 => _452(node, "rowOff"), 'optionalAccess', _453 => _453.textContent]), () => ( 0)));
5017
5080
  return {
5018
5081
  col,
5019
5082
  colOffsetEmu,
@@ -5149,15 +5212,15 @@ function resolveDukeDrawingColor(color, themePalette) {
5149
5212
  function resolveDukeDrawingText(text, themePalette) {
5150
5213
  const caption = mapDukeDrawingText(text);
5151
5214
  const label = normalizeControlLabel(text.runs.map((run) => run.text).join(""));
5152
- const firstStyledRun = _optionalChain([text, 'access', _439 => _439.runs, 'access', _440 => _440.find, 'call', _441 => _441((run) => run.font), 'optionalAccess', _442 => _442.font]);
5215
+ const firstStyledRun = _optionalChain([text, 'access', _454 => _454.runs, 'access', _455 => _455.find, 'call', _456 => _456((run) => run.font), 'optionalAccess', _457 => _457.font]);
5153
5216
  const horizontalAlignment = text.horizontalAlignment;
5154
5217
  return {
5155
5218
  caption,
5156
- fontFamily: _optionalChain([firstStyledRun, 'optionalAccess', _443 => _443.name]),
5157
- fontSizePt: _optionalChain([firstStyledRun, 'optionalAccess', _444 => _444.size]),
5219
+ fontFamily: _optionalChain([firstStyledRun, 'optionalAccess', _458 => _458.name]),
5220
+ fontSizePt: _optionalChain([firstStyledRun, 'optionalAccess', _459 => _459.size]),
5158
5221
  label,
5159
5222
  textAlign: horizontalAlignment === "left" || horizontalAlignment === "center" || horizontalAlignment === "right" ? horizontalAlignment : void 0,
5160
- textColor: resolveDukeDrawingColor(_optionalChain([firstStyledRun, 'optionalAccess', _445 => _445.color]), themePalette)
5223
+ textColor: resolveDukeDrawingColor(_optionalChain([firstStyledRun, 'optionalAccess', _460 => _460.color]), themePalette)
5161
5224
  };
5162
5225
  }
5163
5226
  function mapDukeFormControlKind(kind, themePalette) {
@@ -5342,13 +5405,13 @@ function resolveSheetColumnWidthPx(sheetState, col) {
5342
5405
  if (col < 0) {
5343
5406
  return 0;
5344
5407
  }
5345
- return _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _446 => _446.colWidthOverridesPx, 'access', _447 => _447[col]]), () => ( _optionalChain([sheetState, 'optionalAccess', _448 => _448.defaultColWidthPx]))), () => ( emuToPixels(DEFAULT_COL_WIDTH_EMU)));
5408
+ return _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _461 => _461.colWidthOverridesPx, 'access', _462 => _462[col]]), () => ( _optionalChain([sheetState, 'optionalAccess', _463 => _463.defaultColWidthPx]))), () => ( emuToPixels(DEFAULT_COL_WIDTH_EMU)));
5346
5409
  }
5347
5410
  function resolveSheetRowHeightPx(sheetState, row) {
5348
5411
  if (row < 0) {
5349
5412
  return 0;
5350
5413
  }
5351
- return _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _449 => _449.rowHeightOverridesPx, 'access', _450 => _450[row]]), () => ( _optionalChain([sheetState, 'optionalAccess', _451 => _451.defaultRowHeightPx]))), () => ( emuToPixels(DEFAULT_ROW_HEIGHT_EMU)));
5414
+ return _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _464 => _464.rowHeightOverridesPx, 'access', _465 => _465[row]]), () => ( _optionalChain([sheetState, 'optionalAccess', _466 => _466.defaultRowHeightPx]))), () => ( emuToPixels(DEFAULT_ROW_HEIGHT_EMU)));
5352
5415
  }
5353
5416
  function sumSheetColumnWidthsEmu(sheetState, beforeCol) {
5354
5417
  let total = 0;
@@ -5438,10 +5501,10 @@ function parseGroupTransform(groupNode, parentGroup, fallbackAnchor, sheetState)
5438
5501
  const rootScaleY = rect.cy !== 0 ? anchorRect.cy / rect.cy : 1;
5439
5502
  const useRectFrameForRoot = !parentGroup && (rootScaleX < 0.85 || rootScaleX > 1.15 || rootScaleY < 0.85 || rootScaleY > 1.15);
5440
5503
  const absoluteRect = parentGroup ? applyGroupTransform(rect, parentGroup) : rootRectMatchesAnchorOrigin ? rect : anchorRect;
5441
- const childRectX = parentGroup ? Number(_nullishCoalesce(_optionalChain([chOffNode, 'optionalAccess', _452 => _452.getAttribute, 'call', _453 => _453("x")]), () => ( 0))) : useRectFrameForRoot ? rect.x : Number(_nullishCoalesce(_optionalChain([chOffNode, 'optionalAccess', _454 => _454.getAttribute, 'call', _455 => _455("x")]), () => ( 0)));
5442
- const childRectY = parentGroup ? Number(_nullishCoalesce(_optionalChain([chOffNode, 'optionalAccess', _456 => _456.getAttribute, 'call', _457 => _457("y")]), () => ( 0))) : useRectFrameForRoot ? rect.y : Number(_nullishCoalesce(_optionalChain([chOffNode, 'optionalAccess', _458 => _458.getAttribute, 'call', _459 => _459("y")]), () => ( 0)));
5443
- const childRectCx = parentGroup ? Number(_nullishCoalesce(_optionalChain([chExtNode, 'optionalAccess', _460 => _460.getAttribute, 'call', _461 => _461("cx")]), () => ( rect.cx))) : useRectFrameForRoot ? rect.cx : Number(_nullishCoalesce(_optionalChain([chExtNode, 'optionalAccess', _462 => _462.getAttribute, 'call', _463 => _463("cx")]), () => ( rect.cx)));
5444
- const childRectCy = parentGroup ? Number(_nullishCoalesce(_optionalChain([chExtNode, 'optionalAccess', _464 => _464.getAttribute, 'call', _465 => _465("cy")]), () => ( rect.cy))) : useRectFrameForRoot ? rect.cy : Number(_nullishCoalesce(_optionalChain([chExtNode, 'optionalAccess', _466 => _466.getAttribute, 'call', _467 => _467("cy")]), () => ( rect.cy)));
5504
+ const childRectX = parentGroup ? Number(_nullishCoalesce(_optionalChain([chOffNode, 'optionalAccess', _467 => _467.getAttribute, 'call', _468 => _468("x")]), () => ( 0))) : useRectFrameForRoot ? rect.x : Number(_nullishCoalesce(_optionalChain([chOffNode, 'optionalAccess', _469 => _469.getAttribute, 'call', _470 => _470("x")]), () => ( 0)));
5505
+ const childRectY = parentGroup ? Number(_nullishCoalesce(_optionalChain([chOffNode, 'optionalAccess', _471 => _471.getAttribute, 'call', _472 => _472("y")]), () => ( 0))) : useRectFrameForRoot ? rect.y : Number(_nullishCoalesce(_optionalChain([chOffNode, 'optionalAccess', _473 => _473.getAttribute, 'call', _474 => _474("y")]), () => ( 0)));
5506
+ const childRectCx = parentGroup ? Number(_nullishCoalesce(_optionalChain([chExtNode, 'optionalAccess', _475 => _475.getAttribute, 'call', _476 => _476("cx")]), () => ( rect.cx))) : useRectFrameForRoot ? rect.cx : Number(_nullishCoalesce(_optionalChain([chExtNode, 'optionalAccess', _477 => _477.getAttribute, 'call', _478 => _478("cx")]), () => ( rect.cx)));
5507
+ const childRectCy = parentGroup ? Number(_nullishCoalesce(_optionalChain([chExtNode, 'optionalAccess', _479 => _479.getAttribute, 'call', _480 => _480("cy")]), () => ( rect.cy))) : useRectFrameForRoot ? rect.cy : Number(_nullishCoalesce(_optionalChain([chExtNode, 'optionalAccess', _481 => _481.getAttribute, 'call', _482 => _482("cy")]), () => ( rect.cy)));
5445
5508
  return {
5446
5509
  chCx: childRectCx,
5447
5510
  chCy: childRectCy,
@@ -5449,8 +5512,8 @@ function parseGroupTransform(groupNode, parentGroup, fallbackAnchor, sheetState)
5449
5512
  chY: childRectY,
5450
5513
  cx: absoluteRect.cx,
5451
5514
  cy: absoluteRect.cy,
5452
- scaleX: childRectCx !== 0 ? absoluteRect.cx / childRectCx : _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _468 => _468.scaleX]), () => ( 1)),
5453
- scaleY: childRectCy !== 0 ? absoluteRect.cy / childRectCy : _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _469 => _469.scaleY]), () => ( 1)),
5515
+ scaleX: childRectCx !== 0 ? absoluteRect.cx / childRectCx : _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _483 => _483.scaleX]), () => ( 1)),
5516
+ scaleY: childRectCy !== 0 ? absoluteRect.cy / childRectCy : _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _484 => _484.scaleY]), () => ( 1)),
5454
5517
  x: absoluteRect.x,
5455
5518
  y: absoluteRect.y
5456
5519
  };
@@ -5459,8 +5522,8 @@ function anchorFromNodeOrFallback(node, fallbackAnchor, parentGroup) {
5459
5522
  const xfrmNode = getFirstDescendant(node, "xfrm");
5460
5523
  const rect = parseTransformRect(xfrmNode);
5461
5524
  if (rect) {
5462
- const scaleX = _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _470 => _470.scaleX]), () => ( 1));
5463
- const scaleY = _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _471 => _471.scaleY]), () => ( 1));
5525
+ const scaleX = _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _485 => _485.scaleX]), () => ( 1));
5526
+ const scaleY = _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _486 => _486.scaleY]), () => ( 1));
5464
5527
  return {
5465
5528
  anchor: parentGroup ? rectToAbsoluteAnchor(applyGroupTransform(rect, parentGroup)) : fallbackAnchor,
5466
5529
  flipH: rect.flipH,
@@ -5475,8 +5538,8 @@ function anchorFromNodeOrFallback(node, fallbackAnchor, parentGroup) {
5475
5538
  flipH: false,
5476
5539
  flipV: false,
5477
5540
  rotationDeg: 0,
5478
- scaleX: _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _472 => _472.scaleX]), () => ( 1)),
5479
- scaleY: _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _473 => _473.scaleY]), () => ( 1))
5541
+ scaleX: _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _487 => _487.scaleX]), () => ( 1)),
5542
+ scaleY: _nullishCoalesce(_optionalChain([parentGroup, 'optionalAccess', _488 => _488.scaleY]), () => ( 1))
5480
5543
  };
5481
5544
  }
5482
5545
  function mapParagraphAlign(value) {
@@ -5533,15 +5596,15 @@ function parseShapeStroke(node, styleNode, theme) {
5533
5596
  if (lineNode && getFirstChild(lineNode, "noFill")) {
5534
5597
  return { none: true };
5535
5598
  }
5536
- const color = _nullishCoalesce(resolveFillColor(lineNode, theme), () => ( resolveColorValue(_nullishCoalesce(Array.from(_nullishCoalesce(_optionalChain([lineRefNode, 'optionalAccess', _474 => _474.childNodes]), () => ( []))).filter(isElementNode2)[0], () => ( null)), theme)));
5537
- const widthEmu = Number(_nullishCoalesce(_optionalChain([lineNode, 'optionalAccess', _475 => _475.getAttribute, 'call', _476 => _476("w")]), () => ( 0)));
5599
+ const color = _nullishCoalesce(resolveFillColor(lineNode, theme), () => ( resolveColorValue(_nullishCoalesce(Array.from(_nullishCoalesce(_optionalChain([lineRefNode, 'optionalAccess', _489 => _489.childNodes]), () => ( []))).filter(isElementNode2)[0], () => ( null)), theme)));
5600
+ const widthEmu = Number(_nullishCoalesce(_optionalChain([lineNode, 'optionalAccess', _490 => _490.getAttribute, 'call', _491 => _491("w")]), () => ( 0)));
5538
5601
  return {
5539
- color: _optionalChain([color, 'optionalAccess', _477 => _477.color]),
5540
- dash: _nullishCoalesce(_optionalChain([getFirstChild, 'call', _478 => _478(_nullishCoalesce(lineNode, () => ( node)), "prstDash"), 'optionalAccess', _479 => _479.getAttribute, 'call', _480 => _480("val")]), () => ( void 0)),
5541
- headEndType: _nullishCoalesce(_optionalChain([getFirstChild, 'call', _481 => _481(_nullishCoalesce(lineNode, () => ( node)), "headEnd"), 'optionalAccess', _482 => _482.getAttribute, 'call', _483 => _483("type")]), () => ( void 0)),
5602
+ color: _optionalChain([color, 'optionalAccess', _492 => _492.color]),
5603
+ dash: _nullishCoalesce(_optionalChain([getFirstChild, 'call', _493 => _493(_nullishCoalesce(lineNode, () => ( node)), "prstDash"), 'optionalAccess', _494 => _494.getAttribute, 'call', _495 => _495("val")]), () => ( void 0)),
5604
+ headEndType: _nullishCoalesce(_optionalChain([getFirstChild, 'call', _496 => _496(_nullishCoalesce(lineNode, () => ( node)), "headEnd"), 'optionalAccess', _497 => _497.getAttribute, 'call', _498 => _498("type")]), () => ( void 0)),
5542
5605
  none: false,
5543
- opacity: _optionalChain([color, 'optionalAccess', _484 => _484.opacity]),
5544
- tailEndType: _nullishCoalesce(_optionalChain([getFirstChild, 'call', _485 => _485(_nullishCoalesce(lineNode, () => ( node)), "tailEnd"), 'optionalAccess', _486 => _486.getAttribute, 'call', _487 => _487("type")]), () => ( void 0)),
5606
+ opacity: _optionalChain([color, 'optionalAccess', _499 => _499.opacity]),
5607
+ tailEndType: _nullishCoalesce(_optionalChain([getFirstChild, 'call', _500 => _500(_nullishCoalesce(lineNode, () => ( node)), "tailEnd"), 'optionalAccess', _501 => _501.getAttribute, 'call', _502 => _502("type")]), () => ( void 0)),
5545
5608
  widthPx: widthEmu > 0 ? emuToPixels(widthEmu) : void 0
5546
5609
  };
5547
5610
  }
@@ -5555,7 +5618,7 @@ function parseShapeFill(node, styleNode, theme, geometry) {
5555
5618
  return { none: true };
5556
5619
  }
5557
5620
  const fillRefNode = styleNode ? getFirstChild(styleNode, "fillRef") : null;
5558
- const fillColor = _nullishCoalesce(resolveFillColor(shapePropsNode, theme), () => ( resolveColorValue(_nullishCoalesce(Array.from(_nullishCoalesce(_optionalChain([fillRefNode, 'optionalAccess', _488 => _488.childNodes]), () => ( []))).filter(isElementNode2)[0], () => ( null)), theme)));
5621
+ const fillColor = _nullishCoalesce(resolveFillColor(shapePropsNode, theme), () => ( resolveColorValue(_nullishCoalesce(Array.from(_nullishCoalesce(_optionalChain([fillRefNode, 'optionalAccess', _503 => _503.childNodes]), () => ( []))).filter(isElementNode2)[0], () => ( null)), theme)));
5559
5622
  if (!fillColor) {
5560
5623
  return void 0;
5561
5624
  }
@@ -5652,12 +5715,12 @@ function parseShapeParagraphs(shapeNode, styleNode, theme) {
5652
5715
  return [];
5653
5716
  }
5654
5717
  const defaultFontRef = styleNode ? getFirstChild(styleNode, "fontRef") : null;
5655
- const defaultFontColor = resolveColorValue(_nullishCoalesce(Array.from(_nullishCoalesce(_optionalChain([defaultFontRef, 'optionalAccess', _489 => _489.childNodes]), () => ( []))).filter(isElementNode2)[0], () => ( null)), theme);
5718
+ const defaultFontColor = resolveColorValue(_nullishCoalesce(Array.from(_nullishCoalesce(_optionalChain([defaultFontRef, 'optionalAccess', _504 => _504.childNodes]), () => ( []))).filter(isElementNode2)[0], () => ( null)), theme);
5656
5719
  const listStyleNode = getFirstChild(txBodyNode, "lstStyle");
5657
5720
  const paragraphs = [];
5658
5721
  getChildElements(txBodyNode, "p").forEach((paragraphNode) => {
5659
5722
  const paragraphProps = getFirstChild(paragraphNode, "pPr");
5660
- const paragraphLevel = Number(_nullishCoalesce(_optionalChain([paragraphProps, 'optionalAccess', _490 => _490.getAttribute, 'call', _491 => _491("lvl")]), () => ( 0)));
5723
+ const paragraphLevel = Number(_nullishCoalesce(_optionalChain([paragraphProps, 'optionalAccess', _505 => _505.getAttribute, 'call', _506 => _506("lvl")]), () => ( 0)));
5661
5724
  const listLevelProps = getFirstChild(_nullishCoalesce(listStyleNode, () => ( txBodyNode)), `lvl${paragraphLevel + 1}pPr`);
5662
5725
  const inheritedStyle = mergeShapeTextStyles(
5663
5726
  parseShapeTextStyle(getFirstChild(_nullishCoalesce(listLevelProps, () => ( txBodyNode)), "defRPr"), theme, defaultFontColor),
@@ -5675,7 +5738,7 @@ function parseShapeParagraphs(shapeNode, styleNode, theme) {
5675
5738
  return;
5676
5739
  }
5677
5740
  sawRenderableChild = true;
5678
- const text = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _492 => _492(child, "t"), 'optionalAccess', _493 => _493.textContent]), () => ( ""));
5741
+ const text = _nullishCoalesce(_optionalChain([getFirstChild, 'call', _507 => _507(child, "t"), 'optionalAccess', _508 => _508.textContent]), () => ( ""));
5679
5742
  const runProps = getFirstChild(child, "rPr");
5680
5743
  const runStyle = mergeShapeTextStyles(
5681
5744
  inheritedStyle,
@@ -5706,7 +5769,7 @@ function parseShapeParagraphs(shapeNode, styleNode, theme) {
5706
5769
  });
5707
5770
  }
5708
5771
  paragraphs.push({
5709
- align: mapParagraphAlign(_optionalChain([paragraphProps, 'optionalAccess', _494 => _494.getAttribute, 'call', _495 => _495("algn")])),
5772
+ align: mapParagraphAlign(_optionalChain([paragraphProps, 'optionalAccess', _509 => _509.getAttribute, 'call', _510 => _510("algn")])),
5710
5773
  runs
5711
5774
  });
5712
5775
  });
@@ -5718,26 +5781,26 @@ function parseTextBox(shapeNode) {
5718
5781
  return void 0;
5719
5782
  }
5720
5783
  const bodyProps = getFirstChild(txBodyNode, "bodyPr");
5721
- const leftInset = emuToPixels(Number(_nullishCoalesce(_optionalChain([bodyProps, 'optionalAccess', _496 => _496.getAttribute, 'call', _497 => _497("lIns")]), () => ( 91440))));
5722
- const rightInset = emuToPixels(Number(_nullishCoalesce(_optionalChain([bodyProps, 'optionalAccess', _498 => _498.getAttribute, 'call', _499 => _499("rIns")]), () => ( 91440))));
5723
- const topInset = emuToPixels(Number(_nullishCoalesce(_optionalChain([bodyProps, 'optionalAccess', _500 => _500.getAttribute, 'call', _501 => _501("tIns")]), () => ( 45720))));
5724
- const bottomInset = emuToPixels(Number(_nullishCoalesce(_optionalChain([bodyProps, 'optionalAccess', _502 => _502.getAttribute, 'call', _503 => _503("bIns")]), () => ( 45720))));
5784
+ const leftInset = emuToPixels(Number(_nullishCoalesce(_optionalChain([bodyProps, 'optionalAccess', _511 => _511.getAttribute, 'call', _512 => _512("lIns")]), () => ( 91440))));
5785
+ const rightInset = emuToPixels(Number(_nullishCoalesce(_optionalChain([bodyProps, 'optionalAccess', _513 => _513.getAttribute, 'call', _514 => _514("rIns")]), () => ( 91440))));
5786
+ const topInset = emuToPixels(Number(_nullishCoalesce(_optionalChain([bodyProps, 'optionalAccess', _515 => _515.getAttribute, 'call', _516 => _516("tIns")]), () => ( 45720))));
5787
+ const bottomInset = emuToPixels(Number(_nullishCoalesce(_optionalChain([bodyProps, 'optionalAccess', _517 => _517.getAttribute, 'call', _518 => _518("bIns")]), () => ( 45720))));
5725
5788
  return {
5726
- horizontalAlign: _optionalChain([bodyProps, 'optionalAccess', _504 => _504.getAttribute, 'call', _505 => _505("anchorCtr")]) === "1" ? "center" : "left",
5789
+ horizontalAlign: _optionalChain([bodyProps, 'optionalAccess', _519 => _519.getAttribute, 'call', _520 => _520("anchorCtr")]) === "1" ? "center" : "left",
5727
5790
  insetPx: {
5728
5791
  bottom: bottomInset,
5729
5792
  left: leftInset,
5730
5793
  right: rightInset,
5731
5794
  top: topInset
5732
5795
  },
5733
- verticalAlign: mapVerticalAnchor(_optionalChain([bodyProps, 'optionalAccess', _506 => _506.getAttribute, 'call', _507 => _507("anchor")]))
5796
+ verticalAlign: mapVerticalAnchor(_optionalChain([bodyProps, 'optionalAccess', _521 => _521.getAttribute, 'call', _522 => _522("anchor")]))
5734
5797
  };
5735
5798
  }
5736
5799
  function getHyperlinkTarget(node, drawingRelationships) {
5737
5800
  const hyperlinkNode = node ? getFirstDescendant(node, "hlinkClick") : null;
5738
5801
  const hyperlinkTargetNode = _nullishCoalesce(hyperlinkNode, () => ( node));
5739
5802
  const hyperlinkId = hyperlinkTargetNode ? getRelationshipId(hyperlinkTargetNode) : null;
5740
- return hyperlinkId ? _nullishCoalesce(_optionalChain([drawingRelationships, 'access', _508 => _508.get, 'call', _509 => _509(hyperlinkId), 'optionalAccess', _510 => _510.target]), () => ( void 0)) : void 0;
5803
+ return hyperlinkId ? _nullishCoalesce(_optionalChain([drawingRelationships, 'access', _523 => _523.get, 'call', _524 => _524(hyperlinkId), 'optionalAccess', _525 => _525.target]), () => ( void 0)) : void 0;
5741
5804
  }
5742
5805
  function parsePictureNode(pictureNode, fallbackAnchor, drawingRelationships, archive, contentTypes, objectUrls, workbookSheetIndex, imageId, zIndex, parentGroup) {
5743
5806
  const blipNode = getFirstDescendant(pictureNode, "blip");
@@ -5759,12 +5822,12 @@ function parsePictureNode(pictureNode, fallbackAnchor, drawingRelationships, arc
5759
5822
  return {
5760
5823
  image: {
5761
5824
  anchor: transform.anchor,
5762
- description: _nullishCoalesce(_optionalChain([nonVisualProps, 'optionalAccess', _511 => _511.getAttribute, 'call', _512 => _512("descr")]), () => ( void 0)),
5825
+ description: _nullishCoalesce(_optionalChain([nonVisualProps, 'optionalAccess', _526 => _526.getAttribute, 'call', _527 => _527("descr")]), () => ( void 0)),
5763
5826
  hyperlink: getHyperlinkTarget(_nullishCoalesce(nonVisualProps, () => ( pictureNode)), drawingRelationships),
5764
5827
  id: imageId,
5765
5828
  mediaPath: mediaRelationship.target,
5766
5829
  mimeType: resolveContentType(contentTypes, mediaRelationship.target),
5767
- name: _nullishCoalesce(_optionalChain([nonVisualProps, 'optionalAccess', _513 => _513.getAttribute, 'call', _514 => _514("name")]), () => ( void 0)),
5830
+ name: _nullishCoalesce(_optionalChain([nonVisualProps, 'optionalAccess', _528 => _528.getAttribute, 'call', _529 => _529("name")]), () => ( void 0)),
5768
5831
  sheetIndex: workbookSheetIndex,
5769
5832
  src: createImageSource(mediaBytes, resolveContentType(contentTypes, mediaRelationship.target), objectUrls),
5770
5833
  workbookSheetIndex,
@@ -5777,28 +5840,28 @@ function parseShapeNode(shapeNode, fallbackAnchor, drawingRelationships, theme,
5777
5840
  const nonVisualProps = getFirstDescendant(shapeNode, "cNvPr");
5778
5841
  const styleNode = getFirstChild(shapeNode, "style");
5779
5842
  const transform = anchorFromNodeOrFallback(shapeNode, fallbackAnchor, parentGroup);
5780
- const geometry = _nullishCoalesce(_optionalChain([getFirstDescendant, 'call', _515 => _515(shapeNode, "prstGeom"), 'optionalAccess', _516 => _516.getAttribute, 'call', _517 => _517("prst")]), () => ( (getFirstDescendant(shapeNode, "custGeom") ? "custom" : "rect")));
5843
+ const geometry = _nullishCoalesce(_optionalChain([getFirstDescendant, 'call', _530 => _530(shapeNode, "prstGeom"), 'optionalAccess', _531 => _531.getAttribute, 'call', _532 => _532("prst")]), () => ( (getFirstDescendant(shapeNode, "custGeom") ? "custom" : "rect")));
5781
5844
  const customPath = geometry === "custom" ? parseCustomGeometryPath(shapeNode) : void 0;
5782
5845
  const geometryAdjustments = parseShapeGeometryAdjustments(shapeNode);
5783
5846
  return {
5784
5847
  anchor: transform.anchor,
5785
- description: _nullishCoalesce(_optionalChain([nonVisualProps, 'optionalAccess', _518 => _518.getAttribute, 'call', _519 => _519("descr")]), () => ( void 0)),
5848
+ description: _nullishCoalesce(_optionalChain([nonVisualProps, 'optionalAccess', _533 => _533.getAttribute, 'call', _534 => _534("descr")]), () => ( void 0)),
5786
5849
  fill: parseShapeFill(shapeNode, styleNode, theme, geometry),
5787
5850
  flipH: transform.flipH,
5788
5851
  flipV: transform.flipV,
5789
5852
  geometry,
5790
5853
  geometryAdjustments,
5791
- hidden: _optionalChain([nonVisualProps, 'optionalAccess', _520 => _520.getAttribute, 'call', _521 => _521("hidden")]) === "1" || void 0,
5854
+ hidden: _optionalChain([nonVisualProps, 'optionalAccess', _535 => _535.getAttribute, 'call', _536 => _536("hidden")]) === "1" || void 0,
5792
5855
  hyperlink: getHyperlinkTarget(_nullishCoalesce(nonVisualProps, () => ( shapeNode)), drawingRelationships),
5793
5856
  id: shapeId,
5794
- name: _nullishCoalesce(_optionalChain([nonVisualProps, 'optionalAccess', _522 => _522.getAttribute, 'call', _523 => _523("name")]), () => ( void 0)),
5857
+ name: _nullishCoalesce(_optionalChain([nonVisualProps, 'optionalAccess', _537 => _537.getAttribute, 'call', _538 => _538("name")]), () => ( void 0)),
5795
5858
  paragraphs: parseShapeParagraphs(shapeNode, styleNode, theme),
5796
5859
  rotationDeg: transform.rotationDeg,
5797
5860
  scaleX: transform.scaleX,
5798
5861
  scaleY: transform.scaleY,
5799
5862
  sheetIndex: workbookSheetIndex,
5800
- svgPath: _optionalChain([customPath, 'optionalAccess', _524 => _524.path]),
5801
- svgViewBox: _optionalChain([customPath, 'optionalAccess', _525 => _525.viewBox]),
5863
+ svgPath: _optionalChain([customPath, 'optionalAccess', _539 => _539.path]),
5864
+ svgViewBox: _optionalChain([customPath, 'optionalAccess', _540 => _540.viewBox]),
5802
5865
  stroke: parseShapeStroke(shapeNode, styleNode, theme),
5803
5866
  textBox: parseTextBox(shapeNode),
5804
5867
  workbookSheetIndex,
@@ -6107,7 +6170,7 @@ function updateWorkbookImageAnchor(assets, imageId, anchor) {
6107
6170
  if (!origin) {
6108
6171
  return false;
6109
6172
  }
6110
- const attachments = _nullishCoalesce(_optionalChain([assets, 'access', _526 => _526.sheetOrigins, 'access', _527 => _527[origin.workbookSheetIndex], 'optionalAccess', _528 => _528.attachments]), () => ( []));
6173
+ const attachments = _nullishCoalesce(_optionalChain([assets, 'access', _541 => _541.sheetOrigins, 'access', _542 => _542[origin.workbookSheetIndex], 'optionalAccess', _543 => _543.attachments]), () => ( []));
6111
6174
  for (const attachment of attachments) {
6112
6175
  if (attachment.drawingPath !== origin.drawingPath) {
6113
6176
  continue;
@@ -6217,7 +6280,7 @@ function mergeContentTypeForPath(targetDocument, originalDocument, partPath) {
6217
6280
  return;
6218
6281
  }
6219
6282
  }
6220
- const extension = _optionalChain([normalizedPartName, 'access', _529 => _529.split, 'call', _530 => _530("."), 'access', _531 => _531.pop, 'call', _532 => _532(), 'optionalAccess', _533 => _533.toLowerCase, 'call', _534 => _534()]);
6283
+ const extension = _optionalChain([normalizedPartName, 'access', _544 => _544.split, 'call', _545 => _545("."), 'access', _546 => _546.pop, 'call', _547 => _547(), 'optionalAccess', _548 => _548.toLowerCase, 'call', _549 => _549()]);
6221
6284
  if (!extension) {
6222
6285
  return;
6223
6286
  }
@@ -6320,7 +6383,7 @@ function mergeWorkbookImageAssets(savedBytes, sourceAssets, sheetOrigins) {
6320
6383
  }
6321
6384
  };
6322
6385
  sheetOrigins.forEach((origin, workbookSheetIndex) => {
6323
- if (!_optionalChain([origin, 'optionalAccess', _535 => _535.attachments, 'access', _536 => _536.length])) {
6386
+ if (!_optionalChain([origin, 'optionalAccess', _550 => _550.attachments, 'access', _551 => _551.length])) {
6324
6387
  return;
6325
6388
  }
6326
6389
  const currentSheet = workbookSheets[workbookSheetIndex];
@@ -6349,7 +6412,7 @@ function mergeWorkbookImageAssets(savedBytes, sourceAssets, sheetOrigins) {
6349
6412
  relationshipNode.setAttribute("Id", relationshipId);
6350
6413
  relationshipNode.setAttribute("Type", DRAWING_REL_TYPE);
6351
6414
  relationshipNode.setAttribute("Target", relativeArchivePath(currentSheet.path, attachment.drawingPath));
6352
- _optionalChain([relDocument, 'access', _537 => _537.documentElement, 'optionalAccess', _538 => _538.appendChild, 'call', _539 => _539(relationshipNode)]);
6415
+ _optionalChain([relDocument, 'access', _552 => _552.documentElement, 'optionalAccess', _553 => _553.appendChild, 'call', _554 => _554(relationshipNode)]);
6353
6416
  appendSheetDrawingReference(sheetDocument, relationshipId);
6354
6417
  });
6355
6418
  archive[currentSheet.path] = _fflate.strToU8.call(void 0, serializeXml2(sheetDocument));
@@ -6520,7 +6583,7 @@ function collectReferencedSheetNames(workbook) {
6520
6583
  continue;
6521
6584
  }
6522
6585
  for (const cell of cells) {
6523
- const formula = _optionalChain([cell, 'optionalAccess', _540 => _540.formula]);
6586
+ const formula = _optionalChain([cell, 'optionalAccess', _555 => _555.formula]);
6524
6587
  if (!formula) {
6525
6588
  continue;
6526
6589
  }
@@ -6567,7 +6630,7 @@ function collectFormulaCellsWithSavedValues(workbook) {
6567
6630
  continue;
6568
6631
  }
6569
6632
  for (const cell of cells) {
6570
- if (typeof _optionalChain([cell, 'optionalAccess', _541 => _541.row]) !== "number" || typeof _optionalChain([cell, 'optionalAccess', _542 => _542.col]) !== "number") {
6633
+ if (typeof _optionalChain([cell, 'optionalAccess', _556 => _556.row]) !== "number" || typeof _optionalChain([cell, 'optionalAccess', _557 => _557.col]) !== "number") {
6571
6634
  continue;
6572
6635
  }
6573
6636
  let saved;
@@ -6777,7 +6840,7 @@ var XlsxWorkerClient = (_class = class {
6777
6840
  __init5() {this.startupTimer = null}
6778
6841
  constructor() {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);
6779
6842
  try {
6780
- this.worker = new Worker(new URL("./xlsx-worker.js", _chunkT5WZHPINcjs.importMetaUrl), { type: "module" });
6843
+ this.worker = new Worker(new URL("./xlsx-worker.js", _chunkAD4CGQN2cjs.importMetaUrl), { type: "module" });
6781
6844
  } catch (e12) {
6782
6845
  throw new XlsxWorkerUnavailableError("The workbook worker could not be started.");
6783
6846
  }
@@ -6821,10 +6884,10 @@ var XlsxWorkerClient = (_class = class {
6821
6884
  type: "load"
6822
6885
  }, [workerBuffer]);
6823
6886
  }
6824
- getCellSnapshot(workbookSheetIndex, row, col) {
6887
+ getCellSnapshot(workbookSheetIndex, row, col, locale) {
6825
6888
  return this.request({
6826
6889
  id: 0,
6827
- payload: { col, row, workbookSheetIndex },
6890
+ payload: { col, row, workbookSheetIndex, locale },
6828
6891
  type: "getCellSnapshot"
6829
6892
  });
6830
6893
  }
@@ -6841,10 +6904,10 @@ var XlsxWorkerClient = (_class = class {
6841
6904
  type: "parseCharts"
6842
6905
  }, [workerBuffer]);
6843
6906
  }
6844
- getRowsBatch(workbookSheetIndex, startRow, rowCount) {
6907
+ getRowsBatch(workbookSheetIndex, startRow, rowCount, locale) {
6845
6908
  return this.request({
6846
6909
  id: 0,
6847
- payload: { rowCount, startRow, workbookSheetIndex },
6910
+ payload: { rowCount, startRow, workbookSheetIndex, locale },
6848
6911
  type: "getRowsBatch"
6849
6912
  });
6850
6913
  }
@@ -7132,14 +7195,14 @@ function clampZoomScale(zoomScale) {
7132
7195
  return Math.min(MAX_ZOOM_SCALE, Math.max(MIN_ZOOM_SCALE, Math.round(zoomScale)));
7133
7196
  }
7134
7197
  function resolveDefaultZoomScale(activeTab, activeSheet) {
7135
- if (_optionalChain([activeTab, 'optionalAccess', _543 => _543.kind]) !== "sheet") {
7198
+ if (_optionalChain([activeTab, 'optionalAccess', _558 => _558.kind]) !== "sheet") {
7136
7199
  return DEFAULT_ZOOM_SCALE;
7137
7200
  }
7138
- return clampZoomScale(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _544 => _544.zoomScale]), () => ( DEFAULT_ZOOM_SCALE)));
7201
+ return clampZoomScale(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _559 => _559.zoomScale]), () => ( DEFAULT_ZOOM_SCALE)));
7139
7202
  }
7140
7203
  function resolveWorksheetZoomScale(worksheet, sheetState) {
7141
7204
  const candidates = [
7142
- typeof _optionalChain([sheetState, 'optionalAccess', _545 => _545.zoomScale]) === "number" ? sheetState.zoomScale : void 0,
7205
+ typeof _optionalChain([sheetState, 'optionalAccess', _560 => _560.zoomScale]) === "number" ? sheetState.zoomScale : void 0,
7143
7206
  typeof worksheet.zoomScale === "number" ? worksheet.zoomScale : void 0
7144
7207
  ];
7145
7208
  const value = candidates.find((entry) => typeof entry === "number" && Number.isFinite(entry) && entry > 0);
@@ -7258,18 +7321,18 @@ function resolveDisplayFileName(src, fileName) {
7258
7321
  }
7259
7322
  function resolveSheetDisplayUsedRange(usedRange, sheetState) {
7260
7323
  const [minRow, minCol, maxRow, maxCol] = usedRange;
7261
- const maxContentRow = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _546 => _546.maxContentRow]), () => ( -1));
7262
- const maxContentCol = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _547 => _547.maxContentCol]), () => ( -1));
7263
- const maxVerticalMergeEndRow = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _548 => _548.maxVerticalMergeEndRow]), () => ( -1));
7264
- const maxHorizontalMergeEndCol = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _549 => _549.maxHorizontalMergeEndCol]), () => ( -1));
7324
+ const maxContentRow = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _561 => _561.maxContentRow]), () => ( -1));
7325
+ const maxContentCol = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _562 => _562.maxContentCol]), () => ( -1));
7326
+ const maxVerticalMergeEndRow = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _563 => _563.maxVerticalMergeEndRow]), () => ( -1));
7327
+ const maxHorizontalMergeEndCol = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _564 => _564.maxHorizontalMergeEndCol]), () => ( -1));
7265
7328
  const maxMeaningfulRow = Math.max(maxContentRow, maxVerticalMergeEndRow);
7266
7329
  const maxMeaningfulCol = Math.max(maxContentCol, maxHorizontalMergeEndCol);
7267
7330
  if (maxMeaningfulRow < 0 && maxMeaningfulCol < 0) {
7268
7331
  return usedRange;
7269
7332
  }
7270
7333
  return [
7271
- _optionalChain([sheetState, 'optionalAccess', _550 => _550.minContentRow]) !== void 0 && sheetState.minContentRow >= 0 ? Math.min(minRow, sheetState.minContentRow) : minRow,
7272
- _optionalChain([sheetState, 'optionalAccess', _551 => _551.minContentCol]) !== void 0 && sheetState.minContentCol >= 0 ? Math.min(minCol, sheetState.minContentCol) : minCol,
7334
+ _optionalChain([sheetState, 'optionalAccess', _565 => _565.minContentRow]) !== void 0 && sheetState.minContentRow >= 0 ? Math.min(minRow, sheetState.minContentRow) : minRow,
7335
+ _optionalChain([sheetState, 'optionalAccess', _566 => _566.minContentCol]) !== void 0 && sheetState.minContentCol >= 0 ? Math.min(minCol, sheetState.minContentCol) : minCol,
7273
7336
  maxMeaningfulRow >= 0 ? maxContentRow >= 0 ? Math.min(maxRow, maxMeaningfulRow) : Math.max(maxRow, maxMeaningfulRow) : maxRow,
7274
7337
  maxMeaningfulCol >= 0 ? maxContentCol >= 0 ? Math.min(maxCol, maxMeaningfulCol) : Math.max(maxCol, maxMeaningfulCol) : maxCol
7275
7338
  ];
@@ -7278,18 +7341,18 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
7278
7341
  const sheets = [];
7279
7342
  for (let index = 0; index < workbook.sheetCount; index += 1) {
7280
7343
  const worksheet = workbook.getSheet(index);
7281
- const sheetState = _nullishCoalesce(_optionalChain([sheetStatesByWorkbookSheetIndex, 'optionalAccess', _552 => _552[index]]), () => ( null));
7344
+ const sheetState = _nullishCoalesce(_optionalChain([sheetStatesByWorkbookSheetIndex, 'optionalAccess', _567 => _567[index]]), () => ( null));
7282
7345
  const mergeMetadata = resolveWorksheetMergeMetadata(worksheet);
7283
7346
  const effectiveSheetState = {
7284
7347
  ...sheetState,
7285
7348
  ...mergeMetadata
7286
7349
  };
7287
- const defaultColWidthPx = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _553 => _553.defaultColWidthPx]), () => ( resolveWorksheetDefaultColumnWidthPixels(
7350
+ const defaultColWidthPx = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _568 => _568.defaultColWidthPx]), () => ( resolveWorksheetDefaultColumnWidthPixels(
7288
7351
  worksheet,
7289
- _optionalChain([sheetState, 'optionalAccess', _554 => _554.columnWidthCharacterWidthPx]),
7352
+ _optionalChain([sheetState, 'optionalAccess', _569 => _569.columnWidthCharacterWidthPx]),
7290
7353
  DEFAULT_COL_WIDTH
7291
7354
  )));
7292
- const defaultRowHeightPx = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _555 => _555.defaultRowHeightPx]), () => ( resolveWorksheetDefaultRowHeightPixels(
7355
+ const defaultRowHeightPx = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _570 => _570.defaultRowHeightPx]), () => ( resolveWorksheetDefaultRowHeightPixels(
7293
7356
  worksheet,
7294
7357
  DEFAULT_ROW_HEIGHT
7295
7358
  )));
@@ -7300,26 +7363,26 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
7300
7363
  const resolveColumnWidthPx = (col) => {
7301
7364
  const width = worksheet.getColumnWidth(col);
7302
7365
  if (width !== void 0 && width !== null) {
7303
- return resolveSheetColumnWidthPixels(width, _optionalChain([sheetState, 'optionalAccess', _556 => _556.columnWidthCharacterWidthPx]));
7366
+ return resolveSheetColumnWidthPixels(width, _optionalChain([sheetState, 'optionalAccess', _571 => _571.columnWidthCharacterWidthPx]));
7304
7367
  }
7305
- return _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _557 => _557.colWidthOverridesPx, 'optionalAccess', _558 => _558[col]]), () => ( defaultColWidthPx));
7368
+ return _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _572 => _572.colWidthOverridesPx, 'optionalAccess', _573 => _573[col]]), () => ( defaultColWidthPx));
7306
7369
  };
7307
7370
  const resolveRowHeightPx = (row) => {
7308
7371
  const height = worksheet.getRowHeight(row);
7309
7372
  if (height !== void 0 && height !== null) {
7310
7373
  return Math.max(Math.round(height * 1.33), MIN_ROW_HEIGHT_PX2);
7311
7374
  }
7312
- return _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _559 => _559.rowHeightOverridesPx, 'optionalAccess', _560 => _560[row]]), () => ( defaultRowHeightPx));
7375
+ return _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _574 => _574.rowHeightOverridesPx, 'optionalAccess', _575 => _575[row]]), () => ( defaultRowHeightPx));
7313
7376
  };
7314
7377
  const usedRange = worksheet.usedRange();
7315
7378
  if (!usedRange) {
7316
7379
  sheets.push({
7317
- autoFilterRanges: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _561 => _561.autoFilterRanges]), () => ( [])),
7318
- cachedFormulaValues: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _562 => _562.cachedFormulaValues]), () => ( {})),
7319
- columnWidthCharacterWidthPx: _optionalChain([sheetState, 'optionalAccess', _563 => _563.columnWidthCharacterWidthPx]),
7320
- colWidthOverridesPx: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _564 => _564.colWidthOverridesPx]), () => ( {})),
7321
- colStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _565 => _565.colStyleIds]), () => ( {})),
7322
- conditionalFormatRules: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _566 => _566.conditionalFormatRules]), () => ( [])),
7380
+ autoFilterRanges: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _576 => _576.autoFilterRanges]), () => ( [])),
7381
+ cachedFormulaValues: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _577 => _577.cachedFormulaValues]), () => ( {})),
7382
+ columnWidthCharacterWidthPx: _optionalChain([sheetState, 'optionalAccess', _578 => _578.columnWidthCharacterWidthPx]),
7383
+ colWidthOverridesPx: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _579 => _579.colWidthOverridesPx]), () => ( {})),
7384
+ colStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _580 => _580.colStyleIds]), () => ( {})),
7385
+ conditionalFormatRules: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _581 => _581.conditionalFormatRules]), () => ( [])),
7323
7386
  dataValidations: parseWorksheetDataValidations(worksheet),
7324
7387
  defaultColWidthPx,
7325
7388
  defaultRowHeightPx,
@@ -7340,17 +7403,17 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
7340
7403
  namedCellStyleByName: _nullishCoalesce(namedCellStyleByName, () => ( {})),
7341
7404
  rowCount: 0,
7342
7405
  colCount: 0,
7343
- rowHeightOverridesPx: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _567 => _567.rowHeightOverridesPx]), () => ( {})),
7344
- rowStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _568 => _568.rowStyleIds]), () => ( {})),
7345
- cellStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _569 => _569.cellStyleIds]), () => ( {})),
7406
+ rowHeightOverridesPx: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _582 => _582.rowHeightOverridesPx]), () => ( {})),
7407
+ rowStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _583 => _583.rowStyleIds]), () => ( {})),
7408
+ cellStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _584 => _584.cellStyleIds]), () => ( {})),
7346
7409
  styleById: _nullishCoalesce(styleById, () => ( {})),
7347
- sparklines: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _570 => _570.sparklines]), () => ( [])),
7410
+ sparklines: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _585 => _585.sparklines]), () => ( [])),
7348
7411
  tableStyleByName: _nullishCoalesce(tableStyleByName, () => ( {})),
7349
7412
  visibleRows: [],
7350
7413
  visibleCols: [],
7351
7414
  colWidths: [],
7352
7415
  rowHeights: [],
7353
- showGridLines: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _571 => _571.showGridLines]), () => ( true)),
7416
+ showGridLines: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _586 => _586.showGridLines]), () => ( true)),
7354
7417
  themePalette: _nullishCoalesce(themePalette, () => ( { colorsByIndex: {} })),
7355
7418
  workbookSheetIndex: index,
7356
7419
  zoomScale: resolveWorksheetZoomScale(worksheet, sheetState)
@@ -7403,12 +7466,12 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
7403
7466
  return colWidthsCache;
7404
7467
  };
7405
7468
  const sheet = {
7406
- autoFilterRanges: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _572 => _572.autoFilterRanges]), () => ( [])),
7407
- cachedFormulaValues: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _573 => _573.cachedFormulaValues]), () => ( {})),
7408
- columnWidthCharacterWidthPx: _optionalChain([sheetState, 'optionalAccess', _574 => _574.columnWidthCharacterWidthPx]),
7409
- colWidthOverridesPx: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _575 => _575.colWidthOverridesPx]), () => ( {})),
7410
- colStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _576 => _576.colStyleIds]), () => ( {})),
7411
- conditionalFormatRules: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _577 => _577.conditionalFormatRules]), () => ( [])),
7469
+ autoFilterRanges: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _587 => _587.autoFilterRanges]), () => ( [])),
7470
+ cachedFormulaValues: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _588 => _588.cachedFormulaValues]), () => ( {})),
7471
+ columnWidthCharacterWidthPx: _optionalChain([sheetState, 'optionalAccess', _589 => _589.columnWidthCharacterWidthPx]),
7472
+ colWidthOverridesPx: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _590 => _590.colWidthOverridesPx]), () => ( {})),
7473
+ colStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _591 => _591.colStyleIds]), () => ( {})),
7474
+ conditionalFormatRules: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _592 => _592.conditionalFormatRules]), () => ( [])),
7412
7475
  dataValidations: parseWorksheetDataValidations(worksheet),
7413
7476
  defaultColWidthPx,
7414
7477
  defaultRowHeightPx,
@@ -7427,12 +7490,12 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
7427
7490
  name: worksheet.name,
7428
7491
  visibility,
7429
7492
  namedCellStyleByName: _nullishCoalesce(namedCellStyleByName, () => ( {})),
7430
- rowHeightOverridesPx: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _578 => _578.rowHeightOverridesPx]), () => ( {})),
7431
- rowStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _579 => _579.rowStyleIds]), () => ( {})),
7432
- cellStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _580 => _580.cellStyleIds]), () => ( {})),
7433
- showGridLines: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _581 => _581.showGridLines]), () => ( true)),
7493
+ rowHeightOverridesPx: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _593 => _593.rowHeightOverridesPx]), () => ( {})),
7494
+ rowStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _594 => _594.rowStyleIds]), () => ( {})),
7495
+ cellStyleIds: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _595 => _595.cellStyleIds]), () => ( {})),
7496
+ showGridLines: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _596 => _596.showGridLines]), () => ( true)),
7434
7497
  styleById: _nullishCoalesce(styleById, () => ( {})),
7435
- sparklines: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _582 => _582.sparklines]), () => ( [])),
7498
+ sparklines: _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _597 => _597.sparklines]), () => ( [])),
7436
7499
  tableStyleByName: _nullishCoalesce(tableStyleByName, () => ( {})),
7437
7500
  themePalette: _nullishCoalesce(themePalette, () => ( { colorsByIndex: {} })),
7438
7501
  workbookSheetIndex: index,
@@ -7553,15 +7616,15 @@ function resolveWorkbookReference(workbook, defaultWorkbookSheetIndex, rawRefere
7553
7616
  }
7554
7617
  }
7555
7618
  function parseColorHex(hex) {
7556
- const normalized = _optionalChain([hex, 'optionalAccess', _583 => _583.replace, 'call', _584 => _584(/^#/, "")]);
7619
+ const normalized = _optionalChain([hex, 'optionalAccess', _598 => _598.replace, 'call', _599 => _599(/^#/, "")]);
7557
7620
  return normalized && /^[0-9a-f]{6}$/i.test(normalized) ? [0, 2, 4].map((offset) => Number.parseInt(normalized.slice(offset, offset + 2), 16)) : null;
7558
7621
  }
7559
7622
  function xlsxColorToDukeColor(color) {
7560
7623
  if (!color) {
7561
7624
  return void 0;
7562
7625
  }
7563
- const normalizedHex = _optionalChain([color, 'access', _585 => _585.hex, 'optionalAccess', _586 => _586.replace, 'call', _587 => _587(/^#/, "")]);
7564
- const colorType = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(color.colorType, () => ( (_optionalChain([normalizedHex, 'optionalAccess', _588 => _588.length]) === 8 ? "argb" : _optionalChain([normalizedHex, 'optionalAccess', _589 => _589.length]) === 6 ? "rgb" : void 0))), () => ( (color.r !== void 0 && color.g !== void 0 && color.b !== void 0 ? color.a !== void 0 ? "argb" : "rgb" : void 0))), () => ( (color.themeIndex !== void 0 ? "theme" : color.paletteIndex !== void 0 ? "indexed" : void 0)));
7626
+ const normalizedHex = _optionalChain([color, 'access', _600 => _600.hex, 'optionalAccess', _601 => _601.replace, 'call', _602 => _602(/^#/, "")]);
7627
+ const colorType = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(color.colorType, () => ( (_optionalChain([normalizedHex, 'optionalAccess', _603 => _603.length]) === 8 ? "argb" : _optionalChain([normalizedHex, 'optionalAccess', _604 => _604.length]) === 6 ? "rgb" : void 0))), () => ( (color.r !== void 0 && color.g !== void 0 && color.b !== void 0 ? color.a !== void 0 ? "argb" : "rgb" : void 0))), () => ( (color.themeIndex !== void 0 ? "theme" : color.paletteIndex !== void 0 ? "indexed" : void 0)));
7565
7628
  switch (colorType) {
7566
7629
  case "auto":
7567
7630
  return { colorType: "auto" };
@@ -7570,7 +7633,7 @@ function xlsxColorToDukeColor(color) {
7570
7633
  return channels ? { b: channels[2], colorType: "rgb", g: channels[1], r: channels[0] } : void 0;
7571
7634
  }
7572
7635
  case "argb": {
7573
- const normalized = _optionalChain([color, 'access', _590 => _590.hex, 'optionalAccess', _591 => _591.replace, 'call', _592 => _592(/^#/, "")]);
7636
+ const normalized = _optionalChain([color, 'access', _605 => _605.hex, 'optionalAccess', _606 => _606.replace, 'call', _607 => _607(/^#/, "")]);
7574
7637
  const channels = normalized && /^[0-9a-f]{8}$/i.test(normalized) ? [0, 2, 4, 6].map((offset) => Number.parseInt(normalized.slice(offset, offset + 2), 16)) : color.a !== void 0 && color.r !== void 0 && color.g !== void 0 && color.b !== void 0 ? [color.a, color.r, color.g, color.b] : null;
7575
7638
  return channels ? { a: channels[0], b: channels[3], colorType: "argb", g: channels[2], r: channels[1] } : void 0;
7576
7639
  }
@@ -7693,7 +7756,7 @@ function reconcileCheckedOptionButtons(worksheet) {
7693
7756
  const checkedPaths = worksheet.formControls.flatMap((control) => control.formControl.kind.kind === "optionButton" && control.formControl.kind.state === "checked" ? [control.drawingPath] : []);
7694
7757
  for (const path of checkedPaths) {
7695
7758
  const current = worksheet.formControls.find((control) => control.drawingPath.length === path.length && control.drawingPath.every((segment, index) => segment === path[index]));
7696
- if (_optionalChain([current, 'optionalAccess', _593 => _593.formControl, 'access', _594 => _594.kind, 'access', _595 => _595.kind]) === "optionButton" && current.formControl.kind.state === "checked") {
7759
+ if (_optionalChain([current, 'optionalAccess', _608 => _608.formControl, 'access', _609 => _609.kind, 'access', _610 => _610.kind]) === "optionButton" && current.formControl.kind.state === "checked") {
7697
7760
  worksheet.setFormControlCheckState(current.drawingPath, "checked");
7698
7761
  }
7699
7762
  }
@@ -7722,8 +7785,8 @@ function formControlInteractionChanged(current, next) {
7722
7785
  }
7723
7786
  function parseWorksheetFreezePanes(worksheet) {
7724
7787
  const rawFreezePanes = worksheet.freezePanes;
7725
- const row = typeof _optionalChain([rawFreezePanes, 'optionalAccess', _596 => _596.row]) === "number" && rawFreezePanes.row >= 0 ? rawFreezePanes.row : null;
7726
- const col = typeof _optionalChain([rawFreezePanes, 'optionalAccess', _597 => _597.col]) === "number" && rawFreezePanes.col >= 0 ? rawFreezePanes.col : null;
7788
+ const row = typeof _optionalChain([rawFreezePanes, 'optionalAccess', _611 => _611.row]) === "number" && rawFreezePanes.row >= 0 ? rawFreezePanes.row : null;
7789
+ const col = typeof _optionalChain([rawFreezePanes, 'optionalAccess', _612 => _612.col]) === "number" && rawFreezePanes.col >= 0 ? rawFreezePanes.col : null;
7727
7790
  if (row === null && col === null) {
7728
7791
  return null;
7729
7792
  }
@@ -7790,7 +7853,7 @@ function rangesIntersect(a, b) {
7790
7853
  return a.start.row <= b.end.row && a.end.row >= b.start.row && a.start.col <= b.end.col && a.end.col >= b.start.col;
7791
7854
  }
7792
7855
  function mapWorksheetTables(worksheet, autoFilterRanges = []) {
7793
- const rawTables = _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _598 => _598.tables]), () => ( []));
7856
+ const rawTables = _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _613 => _613.tables]), () => ( []));
7794
7857
  const mappedTables = rawTables.flatMap((table, index) => {
7795
7858
  const rawColumns = Array.isArray(table.columns) ? table.columns : [];
7796
7859
  const rawName = typeof table.name === "string" ? table.name : `Table${index + 1}`;
@@ -7887,7 +7950,7 @@ function pxToSheetRowHeight(heightPx) {
7887
7950
  return Math.max(heightPx, MIN_ROW_HEIGHT_PX2) / 1.33;
7888
7951
  }
7889
7952
  function cssColor(color) {
7890
- if (!_optionalChain([color, 'optionalAccess', _599 => _599.hex])) {
7953
+ if (!_optionalChain([color, 'optionalAccess', _614 => _614.hex])) {
7891
7954
  return null;
7892
7955
  }
7893
7956
  const hex = String(color.hex);
@@ -7968,7 +8031,7 @@ function cloneCellStyle(style) {
7968
8031
  return style;
7969
8032
  }
7970
8033
  }
7971
- function coerceUserEnteredValue(value) {
8034
+ function coerceUserEnteredValue(value, locale = "en-US") {
7972
8035
  const trimmed = value.trim();
7973
8036
  if (!trimmed) {
7974
8037
  return "";
@@ -7979,6 +8042,8 @@ function coerceUserEnteredValue(value) {
7979
8042
  if (/^(true|false)$/i.test(trimmed)) {
7980
8043
  return trimmed.toLowerCase() === "true";
7981
8044
  }
8045
+ const localizedNumber = parseLocaleNumber(trimmed, locale);
8046
+ if (localizedNumber !== void 0) return localizedNumber;
7982
8047
  if (/^[+-]?(?:\d+\.?\d*|\.\d+)$/.test(trimmed)) {
7983
8048
  const parsed = Number(trimmed);
7984
8049
  if (Number.isFinite(parsed)) {
@@ -8021,7 +8086,7 @@ function isAbortError(error) {
8021
8086
  }
8022
8087
  async function resolveWorkbookBuffer({ file, src }, signal) {
8023
8088
  let buffer;
8024
- if (_optionalChain([signal, 'optionalAccess', _600 => _600.aborted])) {
8089
+ if (_optionalChain([signal, 'optionalAccess', _615 => _615.aborted])) {
8025
8090
  throw createAbortError2();
8026
8091
  }
8027
8092
  if (file) {
@@ -8077,7 +8142,7 @@ function scheduleLowPriorityTask(task) {
8077
8142
  task();
8078
8143
  }, { timeout: 120 });
8079
8144
  return () => {
8080
- _optionalChain([idleWindow, 'access', _601 => _601.cancelIdleCallback, 'optionalCall', _602 => _602(idleHandle)]);
8145
+ _optionalChain([idleWindow, 'access', _616 => _616.cancelIdleCallback, 'optionalCall', _617 => _617(idleHandle)]);
8081
8146
  };
8082
8147
  }
8083
8148
  const timeoutHandle = window.setTimeout(task, 0);
@@ -8090,7 +8155,7 @@ function inferImageMimeType(source) {
8090
8155
  return source.slice(5, separatorIndex);
8091
8156
  }
8092
8157
  }
8093
- const normalized = _nullishCoalesce(_optionalChain([source, 'access', _603 => _603.split, 'call', _604 => _604("?"), 'access', _605 => _605[0], 'optionalAccess', _606 => _606.toLowerCase, 'call', _607 => _607()]), () => ( ""));
8158
+ const normalized = _nullishCoalesce(_optionalChain([source, 'access', _618 => _618.split, 'call', _619 => _619("?"), 'access', _620 => _620[0], 'optionalAccess', _621 => _621.toLowerCase, 'call', _622 => _622()]), () => ( ""));
8094
8159
  if (normalized.endsWith(".gif")) {
8095
8160
  return "image/gif";
8096
8161
  }
@@ -8243,7 +8308,7 @@ function mergeParsedAndApiImages(parsedImages, apiImages, hiddenAnchorKeys) {
8243
8308
  if (apiImages.length === 0) {
8244
8309
  return visibleParsedImages;
8245
8310
  }
8246
- const normalizeTextKey = (value) => _nullishCoalesce(_optionalChain([value, 'optionalAccess', _608 => _608.trim, 'call', _609 => _609(), 'access', _610 => _610.toLowerCase, 'call', _611 => _611()]), () => ( ""));
8311
+ const normalizeTextKey = (value) => _nullishCoalesce(_optionalChain([value, 'optionalAccess', _623 => _623.trim, 'call', _624 => _624(), 'access', _625 => _625.toLowerCase, 'call', _626 => _626()]), () => ( ""));
8247
8312
  const imageKeys = (image) => {
8248
8313
  const keys = [
8249
8314
  `${normalizeTextKey(image.mediaPath)}|${normalizeTextKey(image.name)}|${imageAnchorKey(image.anchor)}`,
@@ -8398,6 +8463,7 @@ function useXlsxViewerController(options) {
8398
8463
  deferLoadingAboveBytes = DEFAULT_DEFER_LOADING_ABOVE_BYTES,
8399
8464
  file,
8400
8465
  fileName,
8466
+ locale = "en-US",
8401
8467
  maxFileSizeBytes = DEFAULT_MAX_FILE_SIZE_BYTES,
8402
8468
  readOnly: requestedReadOnly = false,
8403
8469
  readOnlyAboveBytes = 0,
@@ -8456,7 +8522,7 @@ function useXlsxViewerController(options) {
8456
8522
  const shouldForceReadOnlyForBuffer = React.useCallback((bufferByteLength) => !requestedReadOnly && readOnlyAboveBytes > 0 && bufferByteLength > readOnlyAboveBytes, [readOnlyAboveBytes, requestedReadOnly]);
8457
8523
  const shouldUseWorkerForReadOnlyLoad = React.useCallback((willForceReadOnly) => workerSupported && (willForceReadOnly || canUseWorkerForRequestedReadOnly), [canUseWorkerForRequestedReadOnly, workerSupported]);
8458
8524
  const disposeWorkerClient = React.useCallback(() => {
8459
- _optionalChain([workerClientRef, 'access', _612 => _612.current, 'optionalAccess', _613 => _613.dispose, 'call', _614 => _614()]);
8525
+ _optionalChain([workerClientRef, 'access', _627 => _627.current, 'optionalAccess', _628 => _628.dispose, 'call', _629 => _629()]);
8460
8526
  workerClientRef.current = null;
8461
8527
  }, []);
8462
8528
  const getWorkerClient = React.useCallback(() => {
@@ -8475,7 +8541,7 @@ function useXlsxViewerController(options) {
8475
8541
  }, []);
8476
8542
  const clearChartAssets = React.useCallback(() => {
8477
8543
  chartLoadRequestTokenRef.current += 1;
8478
- _optionalChain([chartDisplayFallbackCleanupRef, 'access', _615 => _615.current, 'optionalCall', _616 => _616()]);
8544
+ _optionalChain([chartDisplayFallbackCleanupRef, 'access', _630 => _630.current, 'optionalCall', _631 => _631()]);
8479
8545
  chartDisplayFallbackCleanupRef.current = null;
8480
8546
  chartAssetsRef.current = null;
8481
8547
  setChartsByWorkbookSheetIndex([]);
@@ -8486,16 +8552,16 @@ function useXlsxViewerController(options) {
8486
8552
  const setImageAssets = React.useCallback((assets) => {
8487
8553
  revokeWorkbookImageAssets(imageAssetsRef.current);
8488
8554
  imageAssetsRef.current = assets;
8489
- sheetOriginsRef.current = _nullishCoalesce(_optionalChain([assets, 'optionalAccess', _617 => _617.sheetOrigins, 'access', _618 => _618.slice, 'call', _619 => _619()]), () => ( []));
8490
- setFormControlsByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _620 => _620.formControlsByWorkbookSheetIndex]), () => ( [])));
8491
- setImagesByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _621 => _621.imagesByWorkbookSheetIndex]), () => ( [])));
8492
- setShapesByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _622 => _622.shapesByWorkbookSheetIndex]), () => ( [])));
8555
+ sheetOriginsRef.current = _nullishCoalesce(_optionalChain([assets, 'optionalAccess', _632 => _632.sheetOrigins, 'access', _633 => _633.slice, 'call', _634 => _634()]), () => ( []));
8556
+ setFormControlsByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _635 => _635.formControlsByWorkbookSheetIndex]), () => ( [])));
8557
+ setImagesByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _636 => _636.imagesByWorkbookSheetIndex]), () => ( [])));
8558
+ setShapesByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _637 => _637.shapesByWorkbookSheetIndex]), () => ( [])));
8493
8559
  }, []);
8494
8560
  const setChartAssets = React.useCallback((assets) => {
8495
8561
  chartAssetsRef.current = assets;
8496
- setChartsByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _623 => _623.chartsByWorkbookSheetIndex]), () => ( [])));
8497
- setChartsheets(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _624 => _624.chartsheets]), () => ( [])));
8498
- setTabs(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _625 => _625.tabs]), () => ( [])));
8562
+ setChartsByWorkbookSheetIndex(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _638 => _638.chartsByWorkbookSheetIndex]), () => ( [])));
8563
+ setChartsheets(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _639 => _639.chartsheets]), () => ( [])));
8564
+ setTabs(_nullishCoalesce(_optionalChain([assets, 'optionalAccess', _640 => _640.tabs]), () => ( [])));
8499
8565
  setIsChartsLoading(false);
8500
8566
  }, []);
8501
8567
  const shouldFallbackFromWorkerError = React.useCallback((error2) => {
@@ -8557,7 +8623,7 @@ function useXlsxViewerController(options) {
8557
8623
  setIsChartsLoading(true);
8558
8624
  const requestToken = chartLoadRequestTokenRef.current + 1;
8559
8625
  chartLoadRequestTokenRef.current = requestToken;
8560
- _optionalChain([chartDisplayFallbackCleanupRef, 'access', _626 => _626.current, 'optionalCall', _627 => _627()]);
8626
+ _optionalChain([chartDisplayFallbackCleanupRef, 'access', _641 => _641.current, 'optionalCall', _642 => _642()]);
8561
8627
  chartDisplayFallbackCleanupRef.current = null;
8562
8628
  let fallbackTriggered = false;
8563
8629
  const triggerFallback = () => {
@@ -8656,11 +8722,11 @@ function useXlsxViewerController(options) {
8656
8722
  };
8657
8723
  }, [skipXmlParsing]);
8658
8724
  const refreshWorkbookState = React.useCallback((targetWorkbook) => {
8659
- const currentFormControls = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _628 => _628.current, 'optionalAccess', _629 => _629.formControlsByWorkbookSheetIndex]), () => ( []));
8725
+ const currentFormControls = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _643 => _643.current, 'optionalAccess', _644 => _644.formControlsByWorkbookSheetIndex]), () => ( []));
8660
8726
  const nextFormControls = refreshWorkbookFormControls(
8661
8727
  targetWorkbook,
8662
8728
  currentFormControls,
8663
- _optionalChain([imageAssetsRef, 'access', _630 => _630.current, 'optionalAccess', _631 => _631.themePalette])
8729
+ _optionalChain([imageAssetsRef, 'access', _645 => _645.current, 'optionalAccess', _646 => _646.themePalette])
8664
8730
  );
8665
8731
  if (imageAssetsRef.current) {
8666
8732
  imageAssetsRef.current.formControlsByWorkbookSheetIndex = nextFormControls;
@@ -8668,11 +8734,11 @@ function useXlsxViewerController(options) {
8668
8734
  setFormControlsByWorkbookSheetIndex(nextFormControls);
8669
8735
  const nextSheets = buildSheetList(
8670
8736
  targetWorkbook,
8671
- _optionalChain([imageAssetsRef, 'access', _632 => _632.current, 'optionalAccess', _633 => _633.sheetStatesByWorkbookSheetIndex]),
8672
- _optionalChain([imageAssetsRef, 'access', _634 => _634.current, 'optionalAccess', _635 => _635.themePalette]),
8673
- _optionalChain([imageAssetsRef, 'access', _636 => _636.current, 'optionalAccess', _637 => _637.styleById]),
8674
- _optionalChain([imageAssetsRef, 'access', _638 => _638.current, 'optionalAccess', _639 => _639.namedCellStyleByName]),
8675
- _optionalChain([imageAssetsRef, 'access', _640 => _640.current, 'optionalAccess', _641 => _641.tableStyleByName]),
8737
+ _optionalChain([imageAssetsRef, 'access', _647 => _647.current, 'optionalAccess', _648 => _648.sheetStatesByWorkbookSheetIndex]),
8738
+ _optionalChain([imageAssetsRef, 'access', _649 => _649.current, 'optionalAccess', _650 => _650.themePalette]),
8739
+ _optionalChain([imageAssetsRef, 'access', _651 => _651.current, 'optionalAccess', _652 => _652.styleById]),
8740
+ _optionalChain([imageAssetsRef, 'access', _653 => _653.current, 'optionalAccess', _654 => _654.namedCellStyleByName]),
8741
+ _optionalChain([imageAssetsRef, 'access', _655 => _655.current, 'optionalAccess', _656 => _656.tableStyleByName]),
8676
8742
  showHiddenSheets
8677
8743
  );
8678
8744
  setSheets(nextSheets);
@@ -8687,7 +8753,7 @@ function useXlsxViewerController(options) {
8687
8753
  setRevision((current) => current + 1);
8688
8754
  }, [setChartAssets, showHiddenSheets]);
8689
8755
  React.useEffect(() => () => {
8690
- _optionalChain([chartDisplayFallbackCleanupRef, 'access', _642 => _642.current, 'optionalCall', _643 => _643()]);
8756
+ _optionalChain([chartDisplayFallbackCleanupRef, 'access', _657 => _657.current, 'optionalCall', _658 => _658()]);
8691
8757
  chartDisplayFallbackCleanupRef.current = null;
8692
8758
  revokeWorkbookImageAssets(imageAssetsRef.current);
8693
8759
  disposeWorkerClient();
@@ -8768,7 +8834,7 @@ function useXlsxViewerController(options) {
8768
8834
  }
8769
8835
  buffer = normalizeWorkbookArrayBuffer(buffer);
8770
8836
  const preflight = preflightWorkbookBuffer(buffer);
8771
- if (_optionalChain([preflight, 'optionalAccess', _644 => _644.tooLarge])) {
8837
+ if (_optionalChain([preflight, 'optionalAccess', _659 => _659.tooLarge])) {
8772
8838
  throw createWorkbookTooLargeError(preflight);
8773
8839
  }
8774
8840
  const shouldForceReadOnly = shouldForceReadOnlyForBuffer(buffer.byteLength);
@@ -8888,10 +8954,10 @@ function useXlsxViewerController(options) {
8888
8954
  showHiddenSheets
8889
8955
  ]);
8890
8956
  const activeTab = _nullishCoalesce(tabs[activeTabIndex], () => ( null));
8891
- const activeSheet = _optionalChain([activeTab, 'optionalAccess', _645 => _645.kind]) === "sheet" ? _nullishCoalesce(sheets[_nullishCoalesce(activeTab.sheetIndex, () => ( -1))], () => ( null)) : null;
8957
+ const activeSheet = _optionalChain([activeTab, 'optionalAccess', _660 => _660.kind]) === "sheet" ? _nullishCoalesce(sheets[_nullishCoalesce(activeTab.sheetIndex, () => ( -1))], () => ( null)) : null;
8892
8958
  const deferredMetadataCell = React.useDeferredValue(activeCell);
8893
8959
  const deferredMetadataSheet = React.useDeferredValue(activeSheet);
8894
- const activeZoomTabKey = _nullishCoalesce(_optionalChain([activeTab, 'optionalAccess', _646 => _646.id]), () => ( DEFAULT_ZOOM_TAB_KEY));
8960
+ const activeZoomTabKey = _nullishCoalesce(_optionalChain([activeTab, 'optionalAccess', _661 => _661.id]), () => ( DEFAULT_ZOOM_TAB_KEY));
8895
8961
  const defaultZoomScale = React.useMemo(
8896
8962
  () => resolveDefaultZoomScale(activeTab, activeSheet),
8897
8963
  [activeSheet, activeTab]
@@ -8917,7 +8983,7 @@ function useXlsxViewerController(options) {
8917
8983
  return currentIndex;
8918
8984
  }
8919
8985
  const targetSheet = sheets[index];
8920
- const tabIndex = tabs.findIndex((tab) => tab.kind === "sheet" && tab.workbookSheetIndex === _optionalChain([targetSheet, 'optionalAccess', _647 => _647.workbookSheetIndex]));
8986
+ const tabIndex = tabs.findIndex((tab) => tab.kind === "sheet" && tab.workbookSheetIndex === _optionalChain([targetSheet, 'optionalAccess', _662 => _662.workbookSheetIndex]));
8921
8987
  if (tabIndex >= 0) {
8922
8988
  setActiveTabIndexState(tabIndex);
8923
8989
  }
@@ -8930,7 +8996,7 @@ function useXlsxViewerController(options) {
8930
8996
  return currentIndex;
8931
8997
  }
8932
8998
  const targetTab = tabs[index];
8933
- if (_optionalChain([targetTab, 'optionalAccess', _648 => _648.kind]) === "sheet" && typeof targetTab.sheetIndex === "number") {
8999
+ if (_optionalChain([targetTab, 'optionalAccess', _663 => _663.kind]) === "sheet" && typeof targetTab.sheetIndex === "number") {
8934
9000
  setActiveSheetIndexState(targetTab.sheetIndex);
8935
9001
  }
8936
9002
  return index;
@@ -8948,7 +9014,7 @@ function useXlsxViewerController(options) {
8948
9014
  if (!parsed) {
8949
9015
  return false;
8950
9016
  }
8951
- const requestedSheetName = _optionalChain([parsed, 'access', _649 => _649.sheetName, 'optionalAccess', _650 => _650.toLowerCase, 'call', _651 => _651()]);
9017
+ const requestedSheetName = _optionalChain([parsed, 'access', _664 => _664.sheetName, 'optionalAccess', _665 => _665.toLowerCase, 'call', _666 => _666()]);
8952
9018
  const sheetIndex = requestedSheetName === void 0 ? _nullishCoalesce(options2.sheetIndex, () => ( activeSheetIndex)) : sheets.findIndex((sheet2) => sheet2.name.toLowerCase() === requestedSheetName);
8953
9019
  const sheet = Number.isInteger(sheetIndex) ? sheets[sheetIndex] : void 0;
8954
9020
  if (!sheet) {
@@ -8965,7 +9031,7 @@ function useXlsxViewerController(options) {
8965
9031
  });
8966
9032
  }
8967
9033
  setHighlightedRanges(nextHighlights);
8968
- if (_optionalChain([nextHighlights, 'access', _652 => _652[0], 'optionalAccess', _653 => _653.autoScroll])) {
9034
+ if (_optionalChain([nextHighlights, 'access', _667 => _667[0], 'optionalAccess', _668 => _668.autoScroll])) {
8969
9035
  setActiveSheetIndex(firstSheetIndex);
8970
9036
  }
8971
9037
  return true;
@@ -9030,7 +9096,7 @@ function useXlsxViewerController(options) {
9030
9096
  return;
9031
9097
  }
9032
9098
  const preflight = preflightWorkbookBuffer(deferredBuffer);
9033
- if (_optionalChain([preflight, 'optionalAccess', _654 => _654.tooLarge])) {
9099
+ if (_optionalChain([preflight, 'optionalAccess', _669 => _669.tooLarge])) {
9034
9100
  deferredBufferRef.current = null;
9035
9101
  setDeferredLoadFileSize(null);
9036
9102
  setWorkbook(null);
@@ -9202,8 +9268,8 @@ function useXlsxViewerController(options) {
9202
9268
  }
9203
9269
  }, [activeSheetIndex, sheets, workbook]);
9204
9270
  const tables = React.useMemo(
9205
- () => isWorkerBacked ? _nullishCoalesce(workerTablesByWorkbookSheetIndex[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _655 => _655.workbookSheetIndex]), () => ( -1))], () => ( [])) : mapWorksheetTables(getActiveWorksheet(), _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _656 => _656.autoFilterRanges]), () => ( []))),
9206
- [_optionalChain([activeSheet, 'optionalAccess', _657 => _657.autoFilterRanges]), _optionalChain([activeSheet, 'optionalAccess', _658 => _658.workbookSheetIndex]), getActiveWorksheet, isWorkerBacked, revision, workerTablesByWorkbookSheetIndex]
9271
+ () => isWorkerBacked ? _nullishCoalesce(workerTablesByWorkbookSheetIndex[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _670 => _670.workbookSheetIndex]), () => ( -1))], () => ( [])) : mapWorksheetTables(getActiveWorksheet(), _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _671 => _671.autoFilterRanges]), () => ( []))),
9272
+ [_optionalChain([activeSheet, 'optionalAccess', _672 => _672.autoFilterRanges]), _optionalChain([activeSheet, 'optionalAccess', _673 => _673.workbookSheetIndex]), getActiveWorksheet, isWorkerBacked, revision, workerTablesByWorkbookSheetIndex]
9207
9273
  );
9208
9274
  const getCellSnapshotAsync = React.useCallback((workbookSheetIndex, row, col) => {
9209
9275
  if (!isWorkerBacked) {
@@ -9212,14 +9278,14 @@ function useXlsxViewerController(options) {
9212
9278
  formula: ""
9213
9279
  });
9214
9280
  }
9215
- return getWorkerClient().getCellSnapshot(workbookSheetIndex, row, col);
9216
- }, [getWorkerClient, isWorkerBacked]);
9281
+ return getWorkerClient().getCellSnapshot(workbookSheetIndex, row, col, locale);
9282
+ }, [getWorkerClient, isWorkerBacked, locale]);
9217
9283
  const getRowsBatchAsync = React.useCallback((workbookSheetIndex, startRow, rowCount) => {
9218
9284
  if (!isWorkerBacked) {
9219
9285
  return Promise.resolve(null);
9220
9286
  }
9221
- return getWorkerClient().getRowsBatch(workbookSheetIndex, startRow, rowCount);
9222
- }, [getWorkerClient, isWorkerBacked]);
9287
+ return getWorkerClient().getRowsBatch(workbookSheetIndex, startRow, rowCount, locale);
9288
+ }, [getWorkerClient, isWorkerBacked, locale]);
9223
9289
  const visibleSheetIndexByWorkbookSheetIndex = React.useMemo(
9224
9290
  () => new Map(sheets.map((sheet, index) => [sheet.workbookSheetIndex, index])),
9225
9291
  [sheets]
@@ -9270,9 +9336,9 @@ function useXlsxViewerController(options) {
9270
9336
  }, [publicChartById]);
9271
9337
  const getChartsheetById = React.useCallback((id) => _nullishCoalesce(chartsheets.find((chartsheet) => chartsheet.id === id), () => ( null)), [chartsheets]);
9272
9338
  const charts = React.useMemo(() => {
9273
- if (_optionalChain([activeTab, 'optionalAccess', _659 => _659.kind]) === "chartsheet" && typeof activeTab.chartsheetIndex === "number") {
9339
+ if (_optionalChain([activeTab, 'optionalAccess', _674 => _674.kind]) === "chartsheet" && typeof activeTab.chartsheetIndex === "number") {
9274
9340
  const chartsheet = chartsheets[activeTab.chartsheetIndex];
9275
- return (_nullishCoalesce(_optionalChain([chartsheet, 'optionalAccess', _660 => _660.chartIds]), () => ( []))).map((id) => getChartById(id)).filter((value) => Boolean(value));
9341
+ return (_nullishCoalesce(_optionalChain([chartsheet, 'optionalAccess', _675 => _675.chartIds]), () => ( []))).map((id) => getChartById(id)).filter((value) => Boolean(value));
9276
9342
  }
9277
9343
  return getSheetCharts(activeSheetIndex);
9278
9344
  }, [activeSheetIndex, activeTab, chartsheets, getChartById, getSheetCharts]);
@@ -9321,7 +9387,7 @@ function useXlsxViewerController(options) {
9321
9387
  }, [selectedChartId]);
9322
9388
  const selectChartElement = React.useCallback((selection2) => {
9323
9389
  setSelectedImageId(null);
9324
- setSelectedChartId(_nullishCoalesce(_optionalChain([selection2, 'optionalAccess', _661 => _661.chartId]), () => ( null)));
9390
+ setSelectedChartId(_nullishCoalesce(_optionalChain([selection2, 'optionalAccess', _676 => _676.chartId]), () => ( null)));
9325
9391
  setSelectedChartElement(selection2);
9326
9392
  }, []);
9327
9393
  const getSheetImages = React.useCallback((sheetIndex = activeSheetIndex) => {
@@ -9348,11 +9414,11 @@ function useXlsxViewerController(options) {
9348
9414
  return [];
9349
9415
  }
9350
9416
  const control2 = (_nullishCoalesce(formControlsByWorkbookSheetIndex[targetSheet.workbookSheetIndex], () => ( []))).find((entry) => entry.controlIndex === controlIndex);
9351
- return _nullishCoalesce(_optionalChain([control2, 'optionalAccess', _662 => _662.items, 'optionalAccess', _663 => _663.slice, 'call', _664 => _664()]), () => ( []));
9417
+ return _nullishCoalesce(_optionalChain([control2, 'optionalAccess', _677 => _677.items, 'optionalAccess', _678 => _678.slice, 'call', _679 => _679()]), () => ( []));
9352
9418
  }
9353
9419
  const control = target.worksheet.formControls[controlIndex];
9354
- const kind = _optionalChain([control, 'optionalAccess', _665 => _665.formControl, 'access', _666 => _666.kind]);
9355
- const inputRange = _optionalChain([kind, 'optionalAccess', _667 => _667.kind]) === "listBox" || _optionalChain([kind, 'optionalAccess', _668 => _668.kind]) === "dropdown" ? kind.inputRange : void 0;
9420
+ const kind = _optionalChain([control, 'optionalAccess', _680 => _680.formControl, 'access', _681 => _681.kind]);
9421
+ const inputRange = _optionalChain([kind, 'optionalAccess', _682 => _682.kind]) === "listBox" || _optionalChain([kind, 'optionalAccess', _683 => _683.kind]) === "dropdown" ? kind.inputRange : void 0;
9356
9422
  if (!inputRange) {
9357
9423
  return [];
9358
9424
  }
@@ -9384,7 +9450,7 @@ function useXlsxViewerController(options) {
9384
9450
  const shapes = React.useMemo(() => getSheetShapes(activeSheetIndex), [activeSheetIndex, getSheetShapes]);
9385
9451
  const getImageById = React.useCallback((id) => {
9386
9452
  for (const sheetImages of imagesByWorkbookSheetIndex) {
9387
- const match = _optionalChain([sheetImages, 'optionalAccess', _669 => _669.find, 'call', _670 => _670((image) => image.id === id)]);
9453
+ const match = _optionalChain([sheetImages, 'optionalAccess', _684 => _684.find, 'call', _685 => _685((image) => image.id === id)]);
9388
9454
  if (match) {
9389
9455
  return mapPublicImage(match);
9390
9456
  }
@@ -9404,35 +9470,35 @@ function useXlsxViewerController(options) {
9404
9470
  setSelectedImageId(null);
9405
9471
  }, []);
9406
9472
  const getColumnWidthPx = React.useCallback((worksheet, col) => {
9407
- const sheetState = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _671 => _671.current, 'optionalAccess', _672 => _672.sheetStatesByWorkbookSheetIndex, 'access', _673 => _673[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _674 => _674.workbookSheetIndex]), () => ( -1))]]), () => ( null));
9473
+ const sheetState = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _686 => _686.current, 'optionalAccess', _687 => _687.sheetStatesByWorkbookSheetIndex, 'access', _688 => _688[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _689 => _689.workbookSheetIndex]), () => ( -1))]]), () => ( null));
9408
9474
  const width = worksheet.getColumnWidth(col);
9409
- const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _675 => _675.showGridLines]), () => ( true));
9475
+ const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _690 => _690.showGridLines]), () => ( true));
9410
9476
  if (width !== void 0 && width !== null) {
9411
9477
  return resolveRenderedSheetAxisPixels(
9412
- resolveSheetColumnWidthPixels(width, _optionalChain([sheetState, 'optionalAccess', _676 => _676.columnWidthCharacterWidthPx])),
9478
+ resolveSheetColumnWidthPixels(width, _optionalChain([sheetState, 'optionalAccess', _691 => _691.columnWidthCharacterWidthPx])),
9413
9479
  showGridLines
9414
9480
  );
9415
9481
  }
9416
9482
  return resolveRenderedSheetAxisPixels(
9417
- _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _677 => _677.colWidthOverridesPx, 'optionalAccess', _678 => _678[col]]), () => ( _optionalChain([sheetState, 'optionalAccess', _679 => _679.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH)),
9483
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _692 => _692.colWidthOverridesPx, 'optionalAccess', _693 => _693[col]]), () => ( _optionalChain([sheetState, 'optionalAccess', _694 => _694.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH)),
9418
9484
  showGridLines
9419
9485
  );
9420
- }, [_optionalChain([activeSheet, 'optionalAccess', _680 => _680.showGridLines]), _optionalChain([activeSheet, 'optionalAccess', _681 => _681.workbookSheetIndex])]);
9486
+ }, [_optionalChain([activeSheet, 'optionalAccess', _695 => _695.showGridLines]), _optionalChain([activeSheet, 'optionalAccess', _696 => _696.workbookSheetIndex])]);
9421
9487
  const getRowHeightPx = React.useCallback((worksheet, row) => {
9422
- const sheetState = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _682 => _682.current, 'optionalAccess', _683 => _683.sheetStatesByWorkbookSheetIndex, 'access', _684 => _684[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _685 => _685.workbookSheetIndex]), () => ( -1))]]), () => ( null));
9488
+ const sheetState = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _697 => _697.current, 'optionalAccess', _698 => _698.sheetStatesByWorkbookSheetIndex, 'access', _699 => _699[_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _700 => _700.workbookSheetIndex]), () => ( -1))]]), () => ( null));
9423
9489
  const height = worksheet.getRowHeight(row);
9424
- const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _686 => _686.showGridLines]), () => ( true));
9490
+ const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _701 => _701.showGridLines]), () => ( true));
9425
9491
  if (height !== void 0 && height !== null) {
9426
9492
  return resolveRenderedSheetAxisPixels(resolveSheetRowHeightPixels(height), showGridLines);
9427
9493
  }
9428
9494
  return resolveRenderedSheetAxisPixels(
9429
- _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _687 => _687.rowHeightOverridesPx, 'optionalAccess', _688 => _688[row]]), () => ( _optionalChain([sheetState, 'optionalAccess', _689 => _689.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT)),
9495
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _702 => _702.rowHeightOverridesPx, 'optionalAccess', _703 => _703[row]]), () => ( _optionalChain([sheetState, 'optionalAccess', _704 => _704.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT)),
9430
9496
  showGridLines
9431
9497
  );
9432
- }, [_optionalChain([activeSheet, 'optionalAccess', _690 => _690.showGridLines]), _optionalChain([activeSheet, 'optionalAccess', _691 => _691.workbookSheetIndex])]);
9498
+ }, [_optionalChain([activeSheet, 'optionalAccess', _705 => _705.showGridLines]), _optionalChain([activeSheet, 'optionalAccess', _706 => _706.workbookSheetIndex])]);
9433
9499
  const getCellDisplayValue2 = React.useCallback((cell) => {
9434
9500
  if (cell && activeSheet) {
9435
- const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
9501
+ const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${locale}:${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
9436
9502
  if (workerSnapshot) {
9437
9503
  return workerSnapshot.displayValue;
9438
9504
  }
@@ -9442,10 +9508,10 @@ function useXlsxViewerController(options) {
9442
9508
  return "";
9443
9509
  }
9444
9510
  const formula = worksheet.getFormulaAt(cell.row, cell.col);
9445
- const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _692 => _692.cachedFormulaValues, 'optionalAccess', _693 => _693[cellAddressToA1(cell)]]) : void 0;
9511
+ const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _707 => _707.cachedFormulaValues, 'optionalAccess', _708 => _708[cellAddressToA1(cell)]]) : void 0;
9446
9512
  const formatted = worksheet.getFormattedValueAt(cell.row, cell.col);
9447
9513
  if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
9448
- return decodeHtmlEntities(formatted);
9514
+ return localizeCellNumber(worksheet, cell.row, cell.col, decodeHtmlEntities(formatted), locale);
9449
9515
  }
9450
9516
  const calculated = worksheet.getCalculatedValueAt(cell.row, cell.col);
9451
9517
  if (formula && cachedFormulaValue !== void 0 && calculated.is_error) {
@@ -9458,10 +9524,10 @@ function useXlsxViewerController(options) {
9458
9524
  return "";
9459
9525
  }
9460
9526
  return calculated.toString();
9461
- }, [activeSheet, getActiveWorksheet]);
9527
+ }, [activeSheet, getActiveWorksheet, locale]);
9462
9528
  const getCellFormula = React.useCallback((cell) => {
9463
9529
  if (cell && activeSheet) {
9464
- const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
9530
+ const workerSnapshot = workerCellSnapshotCacheRef.current.get(`${locale}:${activeSheet.workbookSheetIndex}:${cell.row}:${cell.col}`);
9465
9531
  if (workerSnapshot) {
9466
9532
  return workerSnapshot.formula;
9467
9533
  }
@@ -9471,7 +9537,7 @@ function useXlsxViewerController(options) {
9471
9537
  return "";
9472
9538
  }
9473
9539
  return _nullishCoalesce(worksheet.getFormulaAt(cell.row, cell.col), () => ( ""));
9474
- }, [activeSheet, getActiveWorksheet]);
9540
+ }, [activeSheet, getActiveWorksheet, locale]);
9475
9541
  const getClipboardData = React.useCallback(() => {
9476
9542
  const worksheet = getActiveWorksheet();
9477
9543
  const targetRange = _nullishCoalesce(selection, () => ( (activeCell ? { start: activeCell, end: activeCell } : null)));
@@ -9504,9 +9570,9 @@ function useXlsxViewerController(options) {
9504
9570
  "white-space:pre-wrap",
9505
9571
  "vertical-align:top"
9506
9572
  ];
9507
- const fill = _optionalChain([rawStyle, 'optionalAccess', _694 => _694.fill]);
9573
+ const fill = _optionalChain([rawStyle, 'optionalAccess', _709 => _709.fill]);
9508
9574
  if (fill) {
9509
- const fillStyle = resolveWorkbookFillStyle(fill, _optionalChain([activeSheet, 'optionalAccess', _695 => _695.themePalette]));
9575
+ const fillStyle = resolveWorkbookFillStyle(fill, _optionalChain([activeSheet, 'optionalAccess', _710 => _710.themePalette]));
9510
9576
  if (fillStyle.backgroundColor && fillStyle.backgroundColor.toLowerCase() !== "#ffffff") {
9511
9577
  cellStyles.push(`background-color:${fillStyle.backgroundColor}`);
9512
9578
  }
@@ -9514,7 +9580,7 @@ function useXlsxViewerController(options) {
9514
9580
  cellStyles.push(`background-image:${fillStyle.backgroundImage}`);
9515
9581
  }
9516
9582
  }
9517
- const font = _optionalChain([rawStyle, 'optionalAccess', _696 => _696.font]);
9583
+ const font = _optionalChain([rawStyle, 'optionalAccess', _711 => _711.font]);
9518
9584
  if (font) {
9519
9585
  if (font.bold) {
9520
9586
  cellStyles.push("font-weight:700");
@@ -9528,7 +9594,7 @@ function useXlsxViewerController(options) {
9528
9594
  if (font.strikethrough) {
9529
9595
  cellStyles.push("text-decoration:line-through");
9530
9596
  }
9531
- const fontColor = resolveWorkbookColor(font.color, _optionalChain([activeSheet, 'optionalAccess', _697 => _697.themePalette]));
9597
+ const fontColor = resolveWorkbookColor(font.color, _optionalChain([activeSheet, 'optionalAccess', _712 => _712.themePalette]));
9532
9598
  if (fontColor) {
9533
9599
  cellStyles.push(`color:${fontColor}`);
9534
9600
  }
@@ -9536,29 +9602,29 @@ function useXlsxViewerController(options) {
9536
9602
  cellStyles.push(`font-size:${font.size}pt`);
9537
9603
  }
9538
9604
  }
9539
- const alignment = _optionalChain([rawStyle, 'optionalAccess', _698 => _698.alignment]);
9540
- if (_optionalChain([alignment, 'optionalAccess', _699 => _699.horizontal]) && alignment.horizontal !== "general") {
9605
+ const alignment = _optionalChain([rawStyle, 'optionalAccess', _713 => _713.alignment]);
9606
+ if (_optionalChain([alignment, 'optionalAccess', _714 => _714.horizontal]) && alignment.horizontal !== "general") {
9541
9607
  cellStyles.push(`text-align:${String(alignment.horizontal)}`);
9542
9608
  }
9543
- if (_optionalChain([alignment, 'optionalAccess', _700 => _700.wrapText])) {
9609
+ if (_optionalChain([alignment, 'optionalAccess', _715 => _715.wrapText])) {
9544
9610
  cellStyles.push("white-space:pre-wrap");
9545
9611
  cellStyles.push("word-break:break-word");
9546
9612
  }
9547
- const border = _optionalChain([rawStyle, 'optionalAccess', _701 => _701.border]);
9548
- if (_optionalChain([border, 'optionalAccess', _702 => _702.top, 'optionalAccess', _703 => _703.style]) && border.top.style !== "none") {
9613
+ const border = _optionalChain([rawStyle, 'optionalAccess', _716 => _716.border]);
9614
+ if (_optionalChain([border, 'optionalAccess', _717 => _717.top, 'optionalAccess', _718 => _718.style]) && border.top.style !== "none") {
9549
9615
  cellStyles.push(`border-top:${mapBorder(border.top)}`);
9550
9616
  }
9551
- if (_optionalChain([border, 'optionalAccess', _704 => _704.right, 'optionalAccess', _705 => _705.style]) && border.right.style !== "none") {
9617
+ if (_optionalChain([border, 'optionalAccess', _719 => _719.right, 'optionalAccess', _720 => _720.style]) && border.right.style !== "none") {
9552
9618
  cellStyles.push(`border-right:${mapBorder(border.right)}`);
9553
9619
  }
9554
- if (_optionalChain([border, 'optionalAccess', _706 => _706.bottom, 'optionalAccess', _707 => _707.style]) && border.bottom.style !== "none") {
9620
+ if (_optionalChain([border, 'optionalAccess', _721 => _721.bottom, 'optionalAccess', _722 => _722.style]) && border.bottom.style !== "none") {
9555
9621
  cellStyles.push(`border-bottom:${mapBorder(border.bottom)}`);
9556
9622
  }
9557
- if (_optionalChain([border, 'optionalAccess', _708 => _708.left, 'optionalAccess', _709 => _709.style]) && border.left.style !== "none") {
9623
+ if (_optionalChain([border, 'optionalAccess', _723 => _723.left, 'optionalAccess', _724 => _724.style]) && border.left.style !== "none") {
9558
9624
  cellStyles.push(`border-left:${mapBorder(border.left)}`);
9559
9625
  }
9560
- const rowSpan = Math.min(_nullishCoalesce(_optionalChain([merge, 'optionalAccess', _710 => _710.rowSpan]), () => ( 1)), normalized.end.row - row + 1);
9561
- const colSpan = Math.min(_nullishCoalesce(_optionalChain([merge, 'optionalAccess', _711 => _711.colSpan]), () => ( 1)), normalized.end.col - col + 1);
9626
+ const rowSpan = Math.min(_nullishCoalesce(_optionalChain([merge, 'optionalAccess', _725 => _725.rowSpan]), () => ( 1)), normalized.end.row - row + 1);
9627
+ const colSpan = Math.min(_nullishCoalesce(_optionalChain([merge, 'optionalAccess', _726 => _726.colSpan]), () => ( 1)), normalized.end.col - col + 1);
9562
9628
  payload.cells.push({
9563
9629
  colOffset: col - normalized.start.col,
9564
9630
  formula,
@@ -9591,7 +9657,7 @@ function useXlsxViewerController(options) {
9591
9657
  if (!isWorkerBacked || !deferredMetadataSheet || !deferredMetadataCell) {
9592
9658
  return;
9593
9659
  }
9594
- const cacheKey = `${deferredMetadataSheet.workbookSheetIndex}:${deferredMetadataCell.row}:${deferredMetadataCell.col}`;
9660
+ const cacheKey = `${locale}:${deferredMetadataSheet.workbookSheetIndex}:${deferredMetadataCell.row}:${deferredMetadataCell.col}`;
9595
9661
  if (workerCellSnapshotCacheRef.current.has(cacheKey)) {
9596
9662
  return;
9597
9663
  }
@@ -9615,7 +9681,7 @@ function useXlsxViewerController(options) {
9615
9681
  return () => {
9616
9682
  isCurrent = false;
9617
9683
  };
9618
- }, [deferredMetadataCell, deferredMetadataSheet, getCellSnapshotAsync, isWorkerBacked]);
9684
+ }, [deferredMetadataCell, deferredMetadataSheet, getCellSnapshotAsync, isWorkerBacked, locale]);
9619
9685
  const activeCellAddress = React.useMemo(() => activeCell ? cellAddressToA1(activeCell) : null, [activeCell]);
9620
9686
  const selectedRangeAddress = React.useMemo(() => selection ? rangeToA1(selection) : null, [selection]);
9621
9687
  const selectedValue = React.useMemo(
@@ -9774,10 +9840,10 @@ function useXlsxViewerController(options) {
9774
9840
  target.worksheet.addDrawing(xlsxFormControlInputToDukeDrawing(input));
9775
9841
  const controlIndex = target.worksheet.formControlCount - 1;
9776
9842
  const addedControl = target.worksheet.formControls[controlIndex];
9777
- const addedKind = _optionalChain([addedControl, 'optionalAccess', _712 => _712.formControl, 'access', _713 => _713.kind]);
9778
- if (addedControl && (_optionalChain([addedKind, 'optionalAccess', _714 => _714.kind]) === "checkbox" || _optionalChain([addedKind, 'optionalAccess', _715 => _715.kind]) === "optionButton")) {
9843
+ const addedKind = _optionalChain([addedControl, 'optionalAccess', _727 => _727.formControl, 'access', _728 => _728.kind]);
9844
+ if (addedControl && (_optionalChain([addedKind, 'optionalAccess', _729 => _729.kind]) === "checkbox" || _optionalChain([addedKind, 'optionalAccess', _730 => _730.kind]) === "optionButton")) {
9779
9845
  target.worksheet.setFormControlCheckState(addedControl.drawingPath, addedKind.state);
9780
- } else if (_optionalChain([addedKind, 'optionalAccess', _716 => _716.kind]) === "groupBox") {
9846
+ } else if (_optionalChain([addedKind, 'optionalAccess', _731 => _731.kind]) === "groupBox") {
9781
9847
  reconcileCheckedOptionButtons(target.worksheet);
9782
9848
  } else if (addedKind && "cellLink" in addedKind && addedKind.cellLink) {
9783
9849
  workbook.syncFormControls();
@@ -9788,7 +9854,7 @@ function useXlsxViewerController(options) {
9788
9854
  }, [activeSheetIndex, getFormControlWorksheet, maybeRecalculateWorkbook, readOnly, recordHistoryBeforeMutation, refreshWorkbookState, workbook]);
9789
9855
  const updateFormControl = React.useCallback((controlIndex, patch, sheetIndex = activeSheetIndex) => {
9790
9856
  const target = getFormControlWorksheet(sheetIndex);
9791
- const currentControl = _optionalChain([target, 'optionalAccess', _717 => _717.worksheet, 'access', _718 => _718.formControls, 'access', _719 => _719[controlIndex]]);
9857
+ const currentControl = _optionalChain([target, 'optionalAccess', _732 => _732.worksheet, 'access', _733 => _733.formControls, 'access', _734 => _734[controlIndex]]);
9792
9858
  if (readOnly || !workbook || !target || !currentControl) {
9793
9859
  return false;
9794
9860
  }
@@ -9808,8 +9874,8 @@ function useXlsxViewerController(options) {
9808
9874
  legacyObjectType: _nullishCoalesce(nextKind.legacyObjectType, () => ( currentControl.formControl.kind.legacyObjectType))
9809
9875
  };
9810
9876
  }
9811
- const patchedRawObj = _optionalChain([patch, 'access', _720 => _720.kind, 'optionalAccess', _721 => _721.kind]) === "editbox" || _optionalChain([patch, 'access', _722 => _722.kind, 'optionalAccess', _723 => _723.kind]) === "unknown" ? patch.kind.rawObj : void 0;
9812
- const patchedRawProperties = _optionalChain([patch, 'access', _724 => _724.kind, 'optionalAccess', _725 => _725.kind]) === "editbox" || _optionalChain([patch, 'access', _726 => _726.kind, 'optionalAccess', _727 => _727.kind]) === "unknown" ? patch.kind.rawProperties : void 0;
9877
+ const patchedRawObj = _optionalChain([patch, 'access', _735 => _735.kind, 'optionalAccess', _736 => _736.kind]) === "editbox" || _optionalChain([patch, 'access', _737 => _737.kind, 'optionalAccess', _738 => _738.kind]) === "unknown" ? patch.kind.rawObj : void 0;
9878
+ const patchedRawProperties = _optionalChain([patch, 'access', _739 => _739.kind, 'optionalAccess', _740 => _740.kind]) === "editbox" || _optionalChain([patch, 'access', _741 => _741.kind, 'optionalAccess', _742 => _742.kind]) === "unknown" ? patch.kind.rawProperties : void 0;
9813
9879
  const nextInput = {
9814
9880
  altText: "altText" in patch ? patch.altText : currentControl.altText,
9815
9881
  anchor: nextAnchor,
@@ -9830,10 +9896,10 @@ function useXlsxViewerController(options) {
9830
9896
  };
9831
9897
  target.worksheet.setDrawing(currentControl.drawingPath, nextInput);
9832
9898
  const updatedControl = target.worksheet.formControls[controlIndex];
9833
- const updatedKind = _optionalChain([updatedControl, 'optionalAccess', _728 => _728.formControl, 'access', _729 => _729.kind]);
9899
+ const updatedKind = _optionalChain([updatedControl, 'optionalAccess', _743 => _743.formControl, 'access', _744 => _744.kind]);
9834
9900
  const interactionChanged = updatedKind ? formControlInteractionChanged(currentControl.formControl.kind, updatedKind) : false;
9835
9901
  const groupTopologyChanged = patch.anchor !== void 0 || updatedKind !== void 0 && updatedKind.kind !== currentControl.formControl.kind.kind && (updatedKind.kind === "groupBox" || currentControl.formControl.kind.kind === "groupBox");
9836
- if (interactionChanged && updatedControl && (_optionalChain([updatedKind, 'optionalAccess', _730 => _730.kind]) === "checkbox" || _optionalChain([updatedKind, 'optionalAccess', _731 => _731.kind]) === "optionButton")) {
9902
+ if (interactionChanged && updatedControl && (_optionalChain([updatedKind, 'optionalAccess', _745 => _745.kind]) === "checkbox" || _optionalChain([updatedKind, 'optionalAccess', _746 => _746.kind]) === "optionButton")) {
9837
9903
  target.worksheet.setFormControlCheckState(updatedControl.drawingPath, updatedKind.state);
9838
9904
  } else if (groupTopologyChanged) {
9839
9905
  reconcileCheckedOptionButtons(target.worksheet);
@@ -9945,7 +10011,7 @@ function useXlsxViewerController(options) {
9945
10011
  const comparedText = left.sortText.localeCompare(right.sortText, void 0, { numeric: true, sensitivity: "base" });
9946
10012
  return direction === "ascending" ? comparedText : -comparedText;
9947
10013
  });
9948
- if (sortedRows.every((row, index) => row.index === _optionalChain([rows, 'access', _732 => _732[index], 'optionalAccess', _733 => _733.index]))) {
10014
+ if (sortedRows.every((row, index) => row.index === _optionalChain([rows, 'access', _747 => _747[index], 'optionalAccess', _748 => _748.index]))) {
9949
10015
  setSortState({ columnIndex, direction, tableName: targetTable.name });
9950
10016
  return;
9951
10017
  }
@@ -10014,9 +10080,9 @@ function useXlsxViewerController(options) {
10014
10080
  if (!workbook) {
10015
10081
  return;
10016
10082
  }
10017
- const activeSheetName = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _734 => _734.name]), () => ( "sheet"));
10083
+ const activeSheetName = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _749 => _749.name]), () => ( "sheet"));
10018
10084
  downloadText(workbook.saveCsvString(), `${fileStem(displayFileName)}-${activeSheetName}.csv`, CSV_MIME_TYPE);
10019
- }, [_optionalChain([activeSheet, 'optionalAccess', _735 => _735.name]), displayFileName, workbook]);
10085
+ }, [_optionalChain([activeSheet, 'optionalAccess', _750 => _750.name]), displayFileName, workbook]);
10020
10086
  const recalculate = React.useCallback(() => {
10021
10087
  if (!workbook) {
10022
10088
  return;
@@ -10180,10 +10246,10 @@ function useXlsxViewerController(options) {
10180
10246
  const currentChart = getChartById(id);
10181
10247
  console.info("[react-xlsx debug] currentChart", {
10182
10248
  activeWorkbookSheetIndex: activeSheet.workbookSheetIndex,
10183
- editable: _optionalChain([currentChart, 'optionalAccess', _736 => _736.editable]),
10249
+ editable: _optionalChain([currentChart, 'optionalAccess', _751 => _751.editable]),
10184
10250
  found: Boolean(currentChart),
10185
10251
  originCount: hydratedChartAssets.chartOriginsById.size,
10186
- workbookSheetIndex: _optionalChain([currentChart, 'optionalAccess', _737 => _737.workbookSheetIndex])
10252
+ workbookSheetIndex: _optionalChain([currentChart, 'optionalAccess', _752 => _752.workbookSheetIndex])
10187
10253
  });
10188
10254
  if (!currentChart || currentChart.editable === false || currentChart.workbookSheetIndex !== activeSheet.workbookSheetIndex) {
10189
10255
  return;
@@ -10191,8 +10257,8 @@ function useXlsxViewerController(options) {
10191
10257
  const nextAnchor = rectToImageAnchor(rect, currentChart.anchor, {
10192
10258
  contentOffsetLeft: GRID_ROW_HEADER_WIDTH,
10193
10259
  contentOffsetTop: GRID_HEADER_HEIGHT,
10194
- getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _738 => _738.columnWidths, 'access', _739 => _739[col]]), () => ( getColumnWidthPx(worksheet, col))),
10195
- getRowHeightPx: (row) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _740 => _740.rowHeights, 'access', _741 => _741[row]]), () => ( getRowHeightPx(worksheet, row)))
10260
+ getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _753 => _753.columnWidths, 'access', _754 => _754[col]]), () => ( getColumnWidthPx(worksheet, col))),
10261
+ getRowHeightPx: (row) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _755 => _755.rowHeights, 'access', _756 => _756[row]]), () => ( getRowHeightPx(worksheet, row)))
10196
10262
  });
10197
10263
  recordHistoryBeforeMutation();
10198
10264
  const didUpdateAnchor = updateWorkbookChartAnchor(imageAssetsRef.current, hydratedChartAssets, id, nextAnchor);
@@ -10223,8 +10289,8 @@ function useXlsxViewerController(options) {
10223
10289
  const nextAnchor = rectToImageAnchor(rect, currentImage.anchor, {
10224
10290
  contentOffsetLeft: GRID_ROW_HEADER_WIDTH,
10225
10291
  contentOffsetTop: GRID_HEADER_HEIGHT,
10226
- getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _742 => _742.columnWidths, 'access', _743 => _743[col]]), () => ( getColumnWidthPx(worksheet, col))),
10227
- getRowHeightPx: (row) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _744 => _744.rowHeights, 'access', _745 => _745[row]]), () => ( getRowHeightPx(worksheet, row)))
10292
+ getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _757 => _757.columnWidths, 'access', _758 => _758[col]]), () => ( getColumnWidthPx(worksheet, col))),
10293
+ getRowHeightPx: (row) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _759 => _759.rowHeights, 'access', _760 => _760[row]]), () => ( getRowHeightPx(worksheet, row)))
10228
10294
  });
10229
10295
  recordHistoryBeforeMutation();
10230
10296
  if (!updateWorkbookImageAnchor(imageAssetsRef.current, id, nextAnchor)) {
@@ -10395,7 +10461,7 @@ function useXlsxViewerController(options) {
10395
10461
  setSelectedChartElement(null);
10396
10462
  setSelectedImageId(null);
10397
10463
  setActiveCell(cell);
10398
- if (_optionalChain([options2, 'optionalAccess', _746 => _746.extend]) && selectionAnchorRef.current) {
10464
+ if (_optionalChain([options2, 'optionalAccess', _761 => _761.extend]) && selectionAnchorRef.current) {
10399
10465
  setSelection(normalizeRange({ start: selectionAnchorRef.current, end: cell }));
10400
10466
  return;
10401
10467
  }
@@ -10472,7 +10538,8 @@ function useXlsxViewerController(options) {
10472
10538
  if (!before) {
10473
10539
  return;
10474
10540
  }
10475
- const nextValue = coerceUserEnteredValue(value);
10541
+ if (locale !== "en-US" && value === getCellDisplayValue2(cell)) return;
10542
+ const nextValue = coerceUserEnteredValue(value, locale);
10476
10543
  worksheet.setCell(cellAddressToA1(cell), nextValue);
10477
10544
  const after = captureCellMutationState(cell);
10478
10545
  if (!after) {
@@ -10481,7 +10548,7 @@ function useXlsxViewerController(options) {
10481
10548
  maybeRecalculateWorkbook(workbook);
10482
10549
  refreshWorkbookState(workbook);
10483
10550
  recordCellEditHistory(cell, before, after);
10484
- }, [captureCellMutationState, getActiveWorksheet, maybeRecalculateWorkbook, readOnly, recordCellEditHistory, refreshWorkbookState, workbook]);
10551
+ }, [captureCellMutationState, getActiveWorksheet, getCellDisplayValue2, locale, maybeRecalculateWorkbook, readOnly, recordCellEditHistory, refreshWorkbookState, workbook]);
10485
10552
  const setCellFormula = React.useCallback((cell, formula) => {
10486
10553
  const worksheet = getActiveWorksheet();
10487
10554
  if (readOnly || !worksheet || !workbook) {
@@ -10535,7 +10602,7 @@ function useXlsxViewerController(options) {
10535
10602
  setCellFormula(activeCell, formula);
10536
10603
  }, [activeCell, setCellFormula]);
10537
10604
  const setSelectedFormula = React.useCallback((formula) => {
10538
- if (_optionalChain([selectedFormulaTarget, 'optionalAccess', _747 => _747.kind]) === "chartSeries") {
10605
+ if (_optionalChain([selectedFormulaTarget, 'optionalAccess', _762 => _762.kind]) === "chartSeries") {
10539
10606
  return setChartSeriesFormula(selectedFormulaTarget.chartId, selectedFormulaTarget.seriesIndex, formula);
10540
10607
  }
10541
10608
  if (!activeCell) {
@@ -10697,7 +10764,7 @@ function useXlsxViewerController(options) {
10697
10764
  return;
10698
10765
  }
10699
10766
  recordHistoryBeforeMutation();
10700
- const baseName = _optionalChain([name, 'optionalAccess', _748 => _748.trim, 'call', _749 => _749()]) || "Sheet";
10767
+ const baseName = _optionalChain([name, 'optionalAccess', _763 => _763.trim, 'call', _764 => _764()]) || "Sheet";
10701
10768
  let candidate = baseName;
10702
10769
  let counter = 2;
10703
10770
  while (workbook.sheetIndex(candidate) !== void 0) {
@@ -10717,11 +10784,11 @@ function useXlsxViewerController(options) {
10717
10784
  }
10718
10785
  const nextSheets = buildSheetList(
10719
10786
  workbook,
10720
- _optionalChain([imageAssetsRef, 'access', _750 => _750.current, 'optionalAccess', _751 => _751.sheetStatesByWorkbookSheetIndex]),
10721
- _optionalChain([imageAssetsRef, 'access', _752 => _752.current, 'optionalAccess', _753 => _753.themePalette]),
10722
- _optionalChain([imageAssetsRef, 'access', _754 => _754.current, 'optionalAccess', _755 => _755.styleById]),
10723
- _optionalChain([imageAssetsRef, 'access', _756 => _756.current, 'optionalAccess', _757 => _757.namedCellStyleByName]),
10724
- _optionalChain([imageAssetsRef, 'access', _758 => _758.current, 'optionalAccess', _759 => _759.tableStyleByName]),
10787
+ _optionalChain([imageAssetsRef, 'access', _765 => _765.current, 'optionalAccess', _766 => _766.sheetStatesByWorkbookSheetIndex]),
10788
+ _optionalChain([imageAssetsRef, 'access', _767 => _767.current, 'optionalAccess', _768 => _768.themePalette]),
10789
+ _optionalChain([imageAssetsRef, 'access', _769 => _769.current, 'optionalAccess', _770 => _770.styleById]),
10790
+ _optionalChain([imageAssetsRef, 'access', _771 => _771.current, 'optionalAccess', _772 => _772.namedCellStyleByName]),
10791
+ _optionalChain([imageAssetsRef, 'access', _773 => _773.current, 'optionalAccess', _774 => _774.tableStyleByName]),
10725
10792
  showHiddenSheets
10726
10793
  );
10727
10794
  setSheets(nextSheets);
@@ -10731,7 +10798,7 @@ function useXlsxViewerController(options) {
10731
10798
  }
10732
10799
  const nextIndex = nextSheets.findIndex((sheet) => sheet.name === candidate);
10733
10800
  setActiveSheetIndexState(nextIndex >= 0 ? nextIndex : 0);
10734
- const nextTabIndex = _nullishCoalesce(_optionalChain([nextChartAssets, 'optionalAccess', _760 => _760.tabs, 'access', _761 => _761.findIndex, 'call', _762 => _762((tab) => tab.kind === "sheet" && tab.name === candidate)]), () => ( -1));
10801
+ const nextTabIndex = _nullishCoalesce(_optionalChain([nextChartAssets, 'optionalAccess', _775 => _775.tabs, 'access', _776 => _776.findIndex, 'call', _777 => _777((tab) => tab.kind === "sheet" && tab.name === candidate)]), () => ( -1));
10735
10802
  if (nextTabIndex >= 0) {
10736
10803
  setActiveTabIndexState(nextTabIndex);
10737
10804
  }
@@ -10757,11 +10824,11 @@ function useXlsxViewerController(options) {
10757
10824
  }
10758
10825
  const nextSheets = buildSheetList(
10759
10826
  workbook,
10760
- _optionalChain([imageAssetsRef, 'access', _763 => _763.current, 'optionalAccess', _764 => _764.sheetStatesByWorkbookSheetIndex]),
10761
- _optionalChain([imageAssetsRef, 'access', _765 => _765.current, 'optionalAccess', _766 => _766.themePalette]),
10762
- _optionalChain([imageAssetsRef, 'access', _767 => _767.current, 'optionalAccess', _768 => _768.styleById]),
10763
- _optionalChain([imageAssetsRef, 'access', _769 => _769.current, 'optionalAccess', _770 => _770.namedCellStyleByName]),
10764
- _optionalChain([imageAssetsRef, 'access', _771 => _771.current, 'optionalAccess', _772 => _772.tableStyleByName]),
10827
+ _optionalChain([imageAssetsRef, 'access', _778 => _778.current, 'optionalAccess', _779 => _779.sheetStatesByWorkbookSheetIndex]),
10828
+ _optionalChain([imageAssetsRef, 'access', _780 => _780.current, 'optionalAccess', _781 => _781.themePalette]),
10829
+ _optionalChain([imageAssetsRef, 'access', _782 => _782.current, 'optionalAccess', _783 => _783.styleById]),
10830
+ _optionalChain([imageAssetsRef, 'access', _784 => _784.current, 'optionalAccess', _785 => _785.namedCellStyleByName]),
10831
+ _optionalChain([imageAssetsRef, 'access', _786 => _786.current, 'optionalAccess', _787 => _787.tableStyleByName]),
10765
10832
  showHiddenSheets
10766
10833
  );
10767
10834
  setSheets(nextSheets);
@@ -10789,7 +10856,7 @@ function useXlsxViewerController(options) {
10789
10856
  }, [readOnly, recordHistoryBeforeMutation, selection, workbook]);
10790
10857
  const pasteText = React.useCallback((text) => {
10791
10858
  const worksheet = getActiveWorksheet();
10792
- const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _773 => _773.start]))), () => ( null));
10859
+ const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _788 => _788.start]))), () => ( null));
10793
10860
  if (readOnly || !worksheet || !workbook || !targetCell || !text) {
10794
10861
  return false;
10795
10862
  }
@@ -10822,7 +10889,7 @@ function useXlsxViewerController(options) {
10822
10889
  cell: nextCell
10823
10890
  });
10824
10891
  } else {
10825
- const nextValue = coerceUserEnteredValue(rawValue);
10892
+ const nextValue = coerceUserEnteredValue(rawValue, locale);
10826
10893
  worksheet.setCell(cellAddressToA1(nextCell), nextValue);
10827
10894
  const after = captureCellMutationState(nextCell);
10828
10895
  if (!after) {
@@ -10850,10 +10917,10 @@ function useXlsxViewerController(options) {
10850
10917
  selectionAnchorRef.current = targetCell;
10851
10918
  recordRangeEditHistory(mutations, nextRange, targetCell);
10852
10919
  return true;
10853
- }, [activeCell, captureCellMutationState, getActiveWorksheet, maybeRecalculateWorkbook, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
10920
+ }, [activeCell, captureCellMutationState, getActiveWorksheet, locale, maybeRecalculateWorkbook, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
10854
10921
  const pasteStructuredClipboardData = React.useCallback((serializedPayload) => {
10855
10922
  const worksheet = getActiveWorksheet();
10856
- const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _774 => _774.start]))), () => ( null));
10923
+ const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _789 => _789.start]))), () => ( null));
10857
10924
  if (readOnly || !worksheet || !workbook || !targetCell || !serializedPayload) {
10858
10925
  return false;
10859
10926
  }
@@ -11123,6 +11190,7 @@ function useXlsxViewerController(options) {
11123
11190
  deferredLoadFileSize,
11124
11191
  defineNamedRange,
11125
11192
  displayFileName,
11193
+ locale,
11126
11194
  download,
11127
11195
  exportCsv,
11128
11196
  exportXlsx,
@@ -11246,6 +11314,7 @@ function useXlsxViewerController(options) {
11246
11314
  deferredLoadFileSize,
11247
11315
  defineNamedRange,
11248
11316
  displayFileName,
11317
+ locale,
11249
11318
  download,
11250
11319
  error,
11251
11320
  exportCsv,
@@ -11926,7 +11995,7 @@ function parseCanvasGradientStops(value) {
11926
11995
  if (!match) {
11927
11996
  return null;
11928
11997
  }
11929
- const color = _optionalChain([match, 'access', _775 => _775[1], 'optionalAccess', _776 => _776.trim, 'call', _777 => _777()]);
11998
+ const color = _optionalChain([match, 'access', _790 => _790[1], 'optionalAccess', _791 => _791.trim, 'call', _792 => _792()]);
11930
11999
  const percent = match[2] ? Number.parseFloat(match[2]) : Number.NaN;
11931
12000
  if (!color) {
11932
12001
  return null;
@@ -11942,7 +12011,7 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
11942
12011
  if (linearMatch) {
11943
12012
  const parts = splitCssGradientArgs(_nullishCoalesce(linearMatch[1], () => ( "")));
11944
12013
  if (parts.length >= 2) {
11945
- const rawAngle = _nullishCoalesce(_optionalChain([parts, 'access', _778 => _778[0], 'optionalAccess', _779 => _779.trim, 'call', _780 => _780()]), () => ( "180deg"));
12014
+ const rawAngle = _nullishCoalesce(_optionalChain([parts, 'access', _793 => _793[0], 'optionalAccess', _794 => _794.trim, 'call', _795 => _795()]), () => ( "180deg"));
11946
12015
  const angleMatch = rawAngle.match(/(-?\d*\.?\d+)deg/i);
11947
12016
  const cssAngle = angleMatch ? Number.parseFloat(_nullishCoalesce(angleMatch[1], () => ( "180"))) : 180;
11948
12017
  const radians = (90 - cssAngle) * Math.PI / 180;
@@ -11972,7 +12041,7 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
11972
12041
  const radialMatch = backgroundImage.match(/^radial-gradient\((.*)\)$/i);
11973
12042
  if (radialMatch) {
11974
12043
  const parts = splitCssGradientArgs(_nullishCoalesce(radialMatch[1], () => ( "")));
11975
- const stopParts = _optionalChain([parts, 'access', _781 => _781[0], 'optionalAccess', _782 => _782.startsWith, 'call', _783 => _783("circle")]) ? parts.slice(1) : parts;
12044
+ const stopParts = _optionalChain([parts, 'access', _796 => _796[0], 'optionalAccess', _797 => _797.startsWith, 'call', _798 => _798("circle")]) ? parts.slice(1) : parts;
11976
12045
  const gradient = context.createRadialGradient(
11977
12046
  rect.left + rect.width / 2,
11978
12047
  rect.top + rect.height / 2,
@@ -12085,7 +12154,7 @@ function resolveDarkModeSurface(themePalette, palette) {
12085
12154
  return "hsl(225 4% 6%)";
12086
12155
  }
12087
12156
  function resolveSheetSurface(sheet, palette) {
12088
- return paletteIsDark(palette) ? resolveDarkModeSurface(_optionalChain([sheet, 'optionalAccess', _784 => _784.themePalette]), palette) : _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _785 => _785.themePalette, 'access', _786 => _786.colorsByIndex, 'access', _787 => _787[0]]), () => ( SHEET_SURFACE));
12157
+ return paletteIsDark(palette) ? resolveDarkModeSurface(_optionalChain([sheet, 'optionalAccess', _799 => _799.themePalette]), palette) : _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _800 => _800.themePalette, 'access', _801 => _801.colorsByIndex, 'access', _802 => _802[0]]), () => ( SHEET_SURFACE));
12089
12158
  }
12090
12159
  function normalizeRange2(range) {
12091
12160
  return {
@@ -12117,7 +12186,7 @@ function buildVisibleAxisIndices(precomputed, displayLimit, maxUsedIndex, hidden
12117
12186
  const visible2 = [];
12118
12187
  const usedLimit = Math.min(displayLimit, Math.max(0, maxUsedIndex + 1));
12119
12188
  for (let index = 0; index < usedLimit; index += 1) {
12120
- if (!_optionalChain([hiddenIndices, 'optionalAccess', _788 => _788.has, 'call', _789 => _789(index)])) {
12189
+ if (!_optionalChain([hiddenIndices, 'optionalAccess', _803 => _803.has, 'call', _804 => _804(index)])) {
12121
12190
  visible2.push(index);
12122
12191
  }
12123
12192
  }
@@ -12159,7 +12228,7 @@ function clampPercent(value, fallback) {
12159
12228
  return Math.max(0, Math.min(100, value));
12160
12229
  }
12161
12230
  function resolveShapeAdjustment(shape, name, fallback) {
12162
- const rawValue = _optionalChain([shape, 'access', _790 => _790.geometryAdjustments, 'optionalAccess', _791 => _791[name]]);
12231
+ const rawValue = _optionalChain([shape, 'access', _805 => _805.geometryAdjustments, 'optionalAccess', _806 => _806[name]]);
12163
12232
  if (typeof rawValue !== "number") {
12164
12233
  return fallback;
12165
12234
  }
@@ -13059,8 +13128,8 @@ function normalizeThumbnailResolution(resolution) {
13059
13128
  }
13060
13129
  const resolvedObject = typeof resolution === "object" && resolution ? resolution : void 0;
13061
13130
  return {
13062
- maxHeight: _optionalChain([resolvedObject, 'optionalAccess', _792 => _792.maxHeight]) && Number.isFinite(resolvedObject.maxHeight) && resolvedObject.maxHeight > 0 ? resolvedObject.maxHeight : THUMBNAIL_DEFAULT_MAX_DIMENSION,
13063
- maxWidth: _optionalChain([resolvedObject, 'optionalAccess', _793 => _793.maxWidth]) && Number.isFinite(resolvedObject.maxWidth) && resolvedObject.maxWidth > 0 ? resolvedObject.maxWidth : THUMBNAIL_DEFAULT_MAX_DIMENSION
13131
+ maxHeight: _optionalChain([resolvedObject, 'optionalAccess', _807 => _807.maxHeight]) && Number.isFinite(resolvedObject.maxHeight) && resolvedObject.maxHeight > 0 ? resolvedObject.maxHeight : THUMBNAIL_DEFAULT_MAX_DIMENSION,
13132
+ maxWidth: _optionalChain([resolvedObject, 'optionalAccess', _808 => _808.maxWidth]) && Number.isFinite(resolvedObject.maxWidth) && resolvedObject.maxWidth > 0 ? resolvedObject.maxWidth : THUMBNAIL_DEFAULT_MAX_DIMENSION
13064
13133
  };
13065
13134
  }
13066
13135
  function resolveThumbnailOutputSize(sourceWidth, sourceHeight, resolution) {
@@ -13379,24 +13448,24 @@ function escapeCssFontFamily(name) {
13379
13448
  return /[\s"'(),]/.test(name) ? `"${name.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"` : name;
13380
13449
  }
13381
13450
  function resolveSpreadsheetThemeFont(font, themePalette) {
13382
- const scheme = typeof _optionalChain([font, 'optionalAccess', _794 => _794.scheme]) === "string" ? font.scheme : null;
13451
+ const scheme = typeof _optionalChain([font, 'optionalAccess', _809 => _809.scheme]) === "string" ? font.scheme : null;
13383
13452
  if (scheme === "major") {
13384
- return _optionalChain([themePalette, 'optionalAccess', _795 => _795.majorLatinFont]);
13453
+ return _optionalChain([themePalette, 'optionalAccess', _810 => _810.majorLatinFont]);
13385
13454
  }
13386
13455
  if (scheme === "minor") {
13387
- return _optionalChain([themePalette, 'optionalAccess', _796 => _796.minorLatinFont]);
13456
+ return _optionalChain([themePalette, 'optionalAccess', _811 => _811.minorLatinFont]);
13388
13457
  }
13389
13458
  return void 0;
13390
13459
  }
13391
13460
  function buildSpreadsheetFontFamily(font, themePalette) {
13392
13461
  const candidates = [
13393
- typeof _optionalChain([font, 'optionalAccess', _797 => _797.name]) === "string" ? font.name.trim() : "",
13394
- _nullishCoalesce(_optionalChain([resolveSpreadsheetThemeFont, 'call', _798 => _798(font, themePalette), 'optionalAccess', _799 => _799.trim, 'call', _800 => _800()]), () => ( ""))
13462
+ typeof _optionalChain([font, 'optionalAccess', _812 => _812.name]) === "string" ? font.name.trim() : "",
13463
+ _nullishCoalesce(_optionalChain([resolveSpreadsheetThemeFont, 'call', _813 => _813(font, themePalette), 'optionalAccess', _814 => _814.trim, 'call', _815 => _815()]), () => ( ""))
13395
13464
  ].filter((value, index, array) => value.length > 0 && array.indexOf(value) === index);
13396
13465
  if (candidates.length === 0) {
13397
13466
  return void 0;
13398
13467
  }
13399
- const primaryFont = _optionalChain([candidates, 'access', _801 => _801[0], 'optionalAccess', _802 => _802.toLowerCase, 'call', _803 => _803()]);
13468
+ const primaryFont = _optionalChain([candidates, 'access', _816 => _816[0], 'optionalAccess', _817 => _817.toLowerCase, 'call', _818 => _818()]);
13400
13469
  if (primaryFont === "calibri") {
13401
13470
  return [
13402
13471
  "Calibri",
@@ -13429,17 +13498,17 @@ function resolveSpreadsheetLineHeight(fontSizePt) {
13429
13498
  }
13430
13499
  function buildGridlineShadow(color, options) {
13431
13500
  const parts = [];
13432
- if (_optionalChain([options, 'optionalAccess', _804 => _804.right]) !== false) {
13501
+ if (_optionalChain([options, 'optionalAccess', _819 => _819.right]) !== false) {
13433
13502
  parts.push(`inset -1px 0 0 ${color}`);
13434
13503
  }
13435
- if (_optionalChain([options, 'optionalAccess', _805 => _805.bottom]) !== false) {
13504
+ if (_optionalChain([options, 'optionalAccess', _820 => _820.bottom]) !== false) {
13436
13505
  parts.push(`inset 0 -1px 0 ${color}`);
13437
13506
  }
13438
13507
  return parts.join(", ");
13439
13508
  }
13440
13509
  function buildCellStyle(style, palette, themePalette, options) {
13441
- const showGridLines = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _806 => _806.showGridLines]), () => ( true));
13442
- const baseSurface = paletteIsDark(palette) ? resolveDarkModeSurface(themePalette, palette) : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _807 => _807.colorsByIndex, 'access', _808 => _808[0]]), () => ( SHEET_SURFACE));
13510
+ const showGridLines = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _821 => _821.showGridLines]), () => ( true));
13511
+ const baseSurface = paletteIsDark(palette) ? resolveDarkModeSurface(themePalette, palette) : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _822 => _822.colorsByIndex, 'access', _823 => _823[0]]), () => ( SHEET_SURFACE));
13443
13512
  const gridlineShadow = showGridLines ? buildGridlineShadow(palette.border) : void 0;
13444
13513
  const css = {
13445
13514
  backgroundColor: baseSurface,
@@ -13452,7 +13521,7 @@ function buildCellStyle(style, palette, themePalette, options) {
13452
13521
  lineHeight: String(resolveSpreadsheetLineHeight(11)),
13453
13522
  overflow: "hidden",
13454
13523
  padding: DEFAULT_CELL_PADDING,
13455
- textAlign: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _809 => _809.generalAlignment]), () => ( "left")),
13524
+ textAlign: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _824 => _824.generalAlignment]), () => ( "left")),
13456
13525
  textOverflow: "clip",
13457
13526
  verticalAlign: "bottom",
13458
13527
  whiteSpace: "nowrap"
@@ -13536,24 +13605,24 @@ function buildCellStyle(style, palette, themePalette, options) {
13536
13605
  }
13537
13606
  const border = style.border;
13538
13607
  if (border) {
13539
- const hasRightBorder = Boolean(_optionalChain([border, 'access', _810 => _810.right, 'optionalAccess', _811 => _811.style]) && border.right.style !== "none");
13540
- const hasBottomBorder = Boolean(_optionalChain([border, 'access', _812 => _812.bottom, 'optionalAccess', _813 => _813.style]) && border.bottom.style !== "none");
13608
+ const hasRightBorder = Boolean(_optionalChain([border, 'access', _825 => _825.right, 'optionalAccess', _826 => _826.style]) && border.right.style !== "none");
13609
+ const hasBottomBorder = Boolean(_optionalChain([border, 'access', _827 => _827.bottom, 'optionalAccess', _828 => _828.style]) && border.bottom.style !== "none");
13541
13610
  if (showGridLines && (hasRightBorder || hasBottomBorder)) {
13542
13611
  css.boxShadow = buildGridlineShadow(palette.border, {
13543
13612
  bottom: !hasBottomBorder,
13544
13613
  right: !hasRightBorder
13545
13614
  }) || void 0;
13546
13615
  }
13547
- if (_optionalChain([border, 'access', _814 => _814.top, 'optionalAccess', _815 => _815.style]) && border.top.style !== "none") {
13616
+ if (_optionalChain([border, 'access', _829 => _829.top, 'optionalAccess', _830 => _830.style]) && border.top.style !== "none") {
13548
13617
  css.borderTop = mapBorder2(border.top, themePalette);
13549
13618
  }
13550
- if (_optionalChain([border, 'access', _816 => _816.right, 'optionalAccess', _817 => _817.style]) && border.right.style !== "none") {
13619
+ if (_optionalChain([border, 'access', _831 => _831.right, 'optionalAccess', _832 => _832.style]) && border.right.style !== "none") {
13551
13620
  css.borderRight = mapBorder2(border.right, themePalette);
13552
13621
  }
13553
- if (_optionalChain([border, 'access', _818 => _818.bottom, 'optionalAccess', _819 => _819.style]) && border.bottom.style !== "none") {
13622
+ if (_optionalChain([border, 'access', _833 => _833.bottom, 'optionalAccess', _834 => _834.style]) && border.bottom.style !== "none") {
13554
13623
  css.borderBottom = mapBorder2(border.bottom, themePalette);
13555
13624
  }
13556
- if (_optionalChain([border, 'access', _820 => _820.left, 'optionalAccess', _821 => _821.style]) && border.left.style !== "none") {
13625
+ if (_optionalChain([border, 'access', _835 => _835.left, 'optionalAccess', _836 => _836.style]) && border.left.style !== "none") {
13557
13626
  css.borderLeft = mapBorder2(border.left, themePalette);
13558
13627
  }
13559
13628
  }
@@ -13578,12 +13647,12 @@ function measureTextWidth(value, style) {
13578
13647
  context.font = buildCanvasFont(style);
13579
13648
  return measureCanvasTextWidth(context, value);
13580
13649
  }
13581
- function getCellDisplayValue(worksheet, row, col, activeSheet) {
13650
+ function getCellDisplayValue(worksheet, row, col, activeSheet, locale = "en-US") {
13582
13651
  const formula = worksheet.getFormulaAt(row, col);
13583
- const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _822 => _822.cachedFormulaValues, 'optionalAccess', _823 => _823[cellAddressToA12({ row, col })]]) : void 0;
13652
+ const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _837 => _837.cachedFormulaValues, 'optionalAccess', _838 => _838[cellAddressToA12({ row, col })]]) : void 0;
13584
13653
  const formatted = worksheet.getFormattedValueAt(row, col);
13585
13654
  if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
13586
- return decodeHtmlEntities2(formatted);
13655
+ return localizeCellNumber(worksheet, row, col, decodeHtmlEntities2(formatted), locale);
13587
13656
  }
13588
13657
  const cellValue = worksheet.getCalculatedValueAt(row, col);
13589
13658
  if (formula && cachedFormulaValue !== void 0 && cellValue.is_error) {
@@ -13633,6 +13702,7 @@ function getBatchedCellNumericValue(cell) {
13633
13702
  if (!cell) {
13634
13703
  return null;
13635
13704
  }
13705
+ if (cell.numericValue !== void 0) return cell.numericValue;
13636
13706
  const text = cell.value.trim();
13637
13707
  if (text.length === 0) {
13638
13708
  return null;
@@ -13826,7 +13896,7 @@ function normalizeBatchedMergeSpan(value) {
13826
13896
  }
13827
13897
  function normalizeBatchedCellValue(rawValue, formula, row, col, activeSheet) {
13828
13898
  const value = typeof rawValue === "string" ? decodeHtmlEntities2(rawValue) : rawValue === null || rawValue === void 0 ? "" : String(rawValue);
13829
- const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _824 => _824.cachedFormulaValues, 'optionalAccess', _825 => _825[cellAddressToA12({ row, col })]]) : void 0;
13899
+ const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _839 => _839.cachedFormulaValues, 'optionalAccess', _840 => _840[cellAddressToA12({ row, col })]]) : void 0;
13830
13900
  if (formula && cachedFormulaValue !== void 0 && value.startsWith("#")) {
13831
13901
  return cachedFormulaValue;
13832
13902
  }
@@ -13848,6 +13918,7 @@ function buildWorksheetBatchWindow(rows, activeSheet, startRow, endRow) {
13848
13918
  const formula = typeof cellEntry.formula === "string" ? cellEntry.formula : null;
13849
13919
  cells.set(`${row}:${col}`, {
13850
13920
  formula,
13921
+ numericValue: typeof cellEntry.numericValue === "number" ? cellEntry.numericValue : cellEntry.numericValue === null ? null : void 0,
13851
13922
  generalAlignment: cellEntry.generalAlignment === "right" || cellEntry.generalAlignment === "center" ? cellEntry.generalAlignment : "left",
13852
13923
  hyperlink: normalizeBatchedHyperlink(cellEntry.hyperlink),
13853
13924
  isMergedSecondary: cellEntry.isMergedSecondary === true,
@@ -13872,31 +13943,31 @@ function mergeResolvedCellStyle(base, overlay, options) {
13872
13943
  ..._nullishCoalesce(base, () => ( {})),
13873
13944
  ..._nullishCoalesce(overlay, () => ( {}))
13874
13945
  };
13875
- const baseAlignment = _optionalChain([base, 'optionalAccess', _826 => _826.alignment]);
13876
- const overlayAlignment = _optionalChain([overlay, 'optionalAccess', _827 => _827.alignment]);
13946
+ const baseAlignment = _optionalChain([base, 'optionalAccess', _841 => _841.alignment]);
13947
+ const overlayAlignment = _optionalChain([overlay, 'optionalAccess', _842 => _842.alignment]);
13877
13948
  if (baseAlignment || overlayAlignment) {
13878
13949
  nextStyle.alignment = {
13879
13950
  ..._nullishCoalesce(baseAlignment, () => ( {})),
13880
13951
  ..._nullishCoalesce(overlayAlignment, () => ( {}))
13881
13952
  };
13882
13953
  }
13883
- const baseBorder = _optionalChain([base, 'optionalAccess', _828 => _828.border]);
13884
- const overlayBorder = _optionalChain([overlay, 'optionalAccess', _829 => _829.border]);
13954
+ const baseBorder = _optionalChain([base, 'optionalAccess', _843 => _843.border]);
13955
+ const overlayBorder = _optionalChain([overlay, 'optionalAccess', _844 => _844.border]);
13885
13956
  if (baseBorder || overlayBorder) {
13886
- nextStyle.border = _optionalChain([options, 'optionalAccess', _830 => _830.replaceXfSubtrees]) && overlayBorder ? overlayBorder : {
13957
+ nextStyle.border = _optionalChain([options, 'optionalAccess', _845 => _845.replaceXfSubtrees]) && overlayBorder ? overlayBorder : {
13887
13958
  ..._nullishCoalesce(baseBorder, () => ( {})),
13888
13959
  ..._nullishCoalesce(overlayBorder, () => ( {}))
13889
13960
  };
13890
13961
  }
13891
- const baseFill = _optionalChain([base, 'optionalAccess', _831 => _831.fill]);
13892
- const overlayFill = _optionalChain([overlay, 'optionalAccess', _832 => _832.fill]);
13962
+ const baseFill = _optionalChain([base, 'optionalAccess', _846 => _846.fill]);
13963
+ const overlayFill = _optionalChain([overlay, 'optionalAccess', _847 => _847.fill]);
13893
13964
  if (baseFill || overlayFill) {
13894
- nextStyle.fill = _optionalChain([options, 'optionalAccess', _833 => _833.replaceXfSubtrees]) && overlayFill ? overlayFill : _nullishCoalesce(overlayFill, () => ( baseFill));
13965
+ nextStyle.fill = _optionalChain([options, 'optionalAccess', _848 => _848.replaceXfSubtrees]) && overlayFill ? overlayFill : _nullishCoalesce(overlayFill, () => ( baseFill));
13895
13966
  }
13896
- const baseFont = _optionalChain([base, 'optionalAccess', _834 => _834.font]);
13897
- const overlayFont = _optionalChain([overlay, 'optionalAccess', _835 => _835.font]);
13967
+ const baseFont = _optionalChain([base, 'optionalAccess', _849 => _849.font]);
13968
+ const overlayFont = _optionalChain([overlay, 'optionalAccess', _850 => _850.font]);
13898
13969
  if (baseFont || overlayFont) {
13899
- nextStyle.font = _optionalChain([options, 'optionalAccess', _836 => _836.replaceXfSubtrees]) && overlayFont ? overlayFont : {
13970
+ nextStyle.font = _optionalChain([options, 'optionalAccess', _851 => _851.replaceXfSubtrees]) && overlayFont ? overlayFont : {
13900
13971
  ..._nullishCoalesce(baseFont, () => ( {})),
13901
13972
  ..._nullishCoalesce(overlayFont, () => ( {}))
13902
13973
  };
@@ -14252,11 +14323,11 @@ function resolveConditionalFormulaComparable(formula, worksheet, sheet, batchedC
14252
14323
  return literal;
14253
14324
  }
14254
14325
  const splitReference = splitSheetFormulaReference(normalized);
14255
- const targetSheetName = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _837 => _837.sheetName]), () => ( null));
14256
- if (targetSheetName && _optionalChain([sheet, 'optionalAccess', _838 => _838.name]) && targetSheetName !== sheet.name) {
14326
+ const targetSheetName = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _852 => _852.sheetName]), () => ( null));
14327
+ if (targetSheetName && _optionalChain([sheet, 'optionalAccess', _853 => _853.name]) && targetSheetName !== sheet.name) {
14257
14328
  return literal;
14258
14329
  }
14259
- const cellRef = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _839 => _839.range]), () => ( normalized));
14330
+ const cellRef = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _854 => _854.range]), () => ( normalized));
14260
14331
  const cell = parseA1CellReference3(cellRef.replace(/\$/g, ""));
14261
14332
  if (!cell) {
14262
14333
  return literal;
@@ -14288,8 +14359,8 @@ function normalizeConditionalTextOperand(value) {
14288
14359
  }
14289
14360
  function resolveConditionalStyledRuleMatch(rule, numericValue, textValue, worksheet, sheet, batchedCells) {
14290
14361
  const normalizedRuleType = rule.ruleType.trim().toLowerCase();
14291
- const left = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _840 => _840.formulas, 'optionalAccess', _841 => _841[0]]), () => ( "")), worksheet, sheet, batchedCells);
14292
- const right = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _842 => _842.formulas, 'optionalAccess', _843 => _843[1]]), () => ( "")), worksheet, sheet, batchedCells);
14362
+ const left = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _855 => _855.formulas, 'optionalAccess', _856 => _856[0]]), () => ( "")), worksheet, sheet, batchedCells);
14363
+ const right = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _857 => _857.formulas, 'optionalAccess', _858 => _858[1]]), () => ( "")), worksheet, sheet, batchedCells);
14293
14364
  if (normalizedRuleType === "cellis") {
14294
14365
  return resolveConditionalCellIsMatch(_nullishCoalesce(rule.operator, () => ( "equal")), left, right, numericValue, textValue);
14295
14366
  }
@@ -14320,7 +14391,7 @@ function getStyledConditionalRules(rules) {
14320
14391
  return styledRules;
14321
14392
  }
14322
14393
  function resolveConditionalCellStyleForCell(row, col, sheet, readNumericValue, readTextValue, worksheet, batchedCells) {
14323
- const rules = _optionalChain([sheet, 'optionalAccess', _844 => _844.conditionalFormatRules]);
14394
+ const rules = _optionalChain([sheet, 'optionalAccess', _859 => _859.conditionalFormatRules]);
14324
14395
  if (!sheet || !rules || rules.length === 0) {
14325
14396
  return null;
14326
14397
  }
@@ -14524,11 +14595,11 @@ function drawStaticShapeText(context, shape, left, top, width, height, zoomFacto
14524
14595
  if (shape.paragraphs.length === 0) {
14525
14596
  return;
14526
14597
  }
14527
- const inset = _optionalChain([shape, 'access', _845 => _845.textBox, 'optionalAccess', _846 => _846.insetPx]);
14528
- const paddingLeft = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _847 => _847.left]), () => ( 6))) * zoomFactor;
14529
- const paddingRight = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _848 => _848.right]), () => ( 6))) * zoomFactor;
14530
- const paddingTop = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _849 => _849.top]), () => ( 4))) * zoomFactor;
14531
- const paddingBottom = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _850 => _850.bottom]), () => ( 4))) * zoomFactor;
14598
+ const inset = _optionalChain([shape, 'access', _860 => _860.textBox, 'optionalAccess', _861 => _861.insetPx]);
14599
+ const paddingLeft = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _862 => _862.left]), () => ( 6))) * zoomFactor;
14600
+ const paddingRight = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _863 => _863.right]), () => ( 6))) * zoomFactor;
14601
+ const paddingTop = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _864 => _864.top]), () => ( 4))) * zoomFactor;
14602
+ const paddingBottom = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _865 => _865.bottom]), () => ( 4))) * zoomFactor;
14532
14603
  const textLeft = left + paddingLeft;
14533
14604
  const textTop = top + paddingTop;
14534
14605
  const textWidth = Math.max(0, width - paddingLeft - paddingRight);
@@ -14550,9 +14621,9 @@ function drawStaticShapeText(context, shape, left, top, width, height, zoomFacto
14550
14621
  });
14551
14622
  const totalTextHeight = lineMetrics.reduce((total, metric) => total + metric.lineHeight, 0);
14552
14623
  let y = textTop;
14553
- if (_optionalChain([shape, 'access', _851 => _851.textBox, 'optionalAccess', _852 => _852.verticalAlign]) === "middle") {
14624
+ if (_optionalChain([shape, 'access', _866 => _866.textBox, 'optionalAccess', _867 => _867.verticalAlign]) === "middle") {
14554
14625
  y = textTop + Math.max(0, (textHeight - totalTextHeight) / 2);
14555
- } else if (_optionalChain([shape, 'access', _853 => _853.textBox, 'optionalAccess', _854 => _854.verticalAlign]) === "bottom") {
14626
+ } else if (_optionalChain([shape, 'access', _868 => _868.textBox, 'optionalAccess', _869 => _869.verticalAlign]) === "bottom") {
14556
14627
  y = textTop + Math.max(0, textHeight - totalTextHeight);
14557
14628
  }
14558
14629
  context.save();
@@ -14563,7 +14634,7 @@ function drawStaticShapeText(context, shape, left, top, width, height, zoomFacto
14563
14634
  shape.paragraphs.forEach((paragraph, paragraphIndex) => {
14564
14635
  const metric = _nullishCoalesce(lineMetrics[paragraphIndex], () => ( { lineHeight: 14 * zoomFactor, widthPx: 0 }));
14565
14636
  let x = textLeft;
14566
- const align = _nullishCoalesce(_nullishCoalesce(paragraph.align, () => ( _optionalChain([shape, 'access', _855 => _855.textBox, 'optionalAccess', _856 => _856.horizontalAlign]))), () => ( "left"));
14637
+ const align = _nullishCoalesce(_nullishCoalesce(paragraph.align, () => ( _optionalChain([shape, 'access', _870 => _870.textBox, 'optionalAccess', _871 => _871.horizontalAlign]))), () => ( "left"));
14567
14638
  if (align === "center") {
14568
14639
  x = textLeft + Math.max(0, (textWidth - metric.widthPx) / 2);
14569
14640
  } else if (align === "right") {
@@ -14592,11 +14663,11 @@ function drawStaticShapeText(context, shape, left, top, width, height, zoomFacto
14592
14663
  context.restore();
14593
14664
  }
14594
14665
  function drawStaticShape(context, shape, rect, zoomFactor) {
14595
- const fillColor = _optionalChain([shape, 'access', _857 => _857.fill, 'optionalAccess', _858 => _858.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _859 => _859.fill, 'optionalAccess', _860 => _860.color]), () => ( "transparent"));
14596
- const strokeColor = _optionalChain([shape, 'access', _861 => _861.stroke, 'optionalAccess', _862 => _862.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _863 => _863.stroke, 'optionalAccess', _864 => _864.color]), () => ( "transparent"));
14597
- const lineWidth = Math.max(0, (_nullishCoalesce(_optionalChain([shape, 'access', _865 => _865.stroke, 'optionalAccess', _866 => _866.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * zoomFactor);
14666
+ const fillColor = _optionalChain([shape, 'access', _872 => _872.fill, 'optionalAccess', _873 => _873.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _874 => _874.fill, 'optionalAccess', _875 => _875.color]), () => ( "transparent"));
14667
+ const strokeColor = _optionalChain([shape, 'access', _876 => _876.stroke, 'optionalAccess', _877 => _877.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _878 => _878.stroke, 'optionalAccess', _879 => _879.color]), () => ( "transparent"));
14668
+ const lineWidth = Math.max(0, (_nullishCoalesce(_optionalChain([shape, 'access', _880 => _880.stroke, 'optionalAccess', _881 => _881.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * zoomFactor);
14598
14669
  const vectorShape = resolveShapeVector(shape);
14599
- const opacity = Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _867 => _867.fill, 'optionalAccess', _868 => _868.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _869 => _869.stroke, 'optionalAccess', _870 => _870.opacity]), () => ( 1)));
14670
+ const opacity = Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _882 => _882.fill, 'optionalAccess', _883 => _883.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _884 => _884.stroke, 'optionalAccess', _885 => _885.opacity]), () => ( 1)));
14600
14671
  context.save();
14601
14672
  context.translate(rect.left + rect.width / 2, rect.top + rect.height / 2);
14602
14673
  if (shape.rotationDeg) {
@@ -14607,7 +14678,7 @@ function drawStaticShape(context, shape, rect, zoomFactor) {
14607
14678
  context.lineWidth = lineWidth;
14608
14679
  context.strokeStyle = strokeColor;
14609
14680
  context.fillStyle = fillColor;
14610
- applyCanvasShapeDash(context, _optionalChain([shape, 'access', _871 => _871.stroke, 'optionalAccess', _872 => _872.dash]), lineWidth);
14681
+ applyCanvasShapeDash(context, _optionalChain([shape, 'access', _886 => _886.stroke, 'optionalAccess', _887 => _887.dash]), lineWidth);
14611
14682
  const localLeft = -rect.width / 2;
14612
14683
  const localTop = -rect.height / 2;
14613
14684
  if (vectorShape && typeof Path2D !== "undefined") {
@@ -14744,7 +14815,7 @@ function drawStaticFormControl(context, control, rect, palette, zoomFactor, shee
14744
14815
  context.restore();
14745
14816
  }
14746
14817
  function resolveConditionalDataBarForCell(row, col, worksheet, sheet, metricsCache) {
14747
- const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _873 => _873.conditionalFormatRules]), () => ( []));
14818
+ const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _888 => _888.conditionalFormatRules]), () => ( []));
14748
14819
  const matchingRule = rules.find(
14749
14820
  (rule) => rule.kind === "dataBar" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
14750
14821
  );
@@ -14782,23 +14853,23 @@ function resolveConditionalDataBarForCell(row, col, worksheet, sheet, metricsCac
14782
14853
  const span = maxValue - minValue;
14783
14854
  const ratio = span === 0 ? numericValue >= maxValue ? 1 : 0 : (numericValue - minValue) / span;
14784
14855
  const widthPercent = minLength + Math.max(0, Math.min(1, ratio)) * (maxLength - minLength);
14785
- const color = resolveWorkbookColor(matchingRule.color, _optionalChain([sheet, 'optionalAccess', _874 => _874.themePalette]));
14856
+ const color = resolveWorkbookColor(matchingRule.color, _optionalChain([sheet, 'optionalAccess', _889 => _889.themePalette]));
14786
14857
  if (!color || widthPercent <= 0) {
14787
14858
  return null;
14788
14859
  }
14789
14860
  return {
14790
- axisColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess', _875 => _875.themePalette])), () => ( void 0)),
14861
+ axisColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess', _890 => _890.themePalette])), () => ( void 0)),
14791
14862
  border: _nullishCoalesce(matchingRule.border, () => ( void 0)),
14792
- borderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess', _876 => _876.themePalette])), () => ( void 0)),
14863
+ borderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess', _891 => _891.themePalette])), () => ( void 0)),
14793
14864
  color,
14794
14865
  gradient: _nullishCoalesce(matchingRule.gradient, () => ( void 0)),
14795
- negativeBorderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess', _877 => _877.themePalette])), () => ( void 0)),
14796
- negativeFillColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess', _878 => _878.themePalette])), () => ( void 0)),
14866
+ negativeBorderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess', _892 => _892.themePalette])), () => ( void 0)),
14867
+ negativeFillColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess', _893 => _893.themePalette])), () => ( void 0)),
14797
14868
  widthPercent
14798
14869
  };
14799
14870
  }
14800
14871
  function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metricsCache) {
14801
- const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _879 => _879.conditionalFormatRules]), () => ( []));
14872
+ const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _894 => _894.conditionalFormatRules]), () => ( []));
14802
14873
  const matchingRule = rules.find(
14803
14874
  (rule) => rule.kind === "colorScale" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
14804
14875
  );
@@ -14826,7 +14897,7 @@ function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metrics
14826
14897
  });
14827
14898
  metricsCache.set(cacheKey, ruleValues);
14828
14899
  }
14829
- const colors = matchingRule.colors.map((color) => resolveWorkbookColor(color, _optionalChain([sheet, 'optionalAccess', _880 => _880.themePalette]))).filter((color) => typeof color === "string");
14900
+ const colors = matchingRule.colors.map((color) => resolveWorkbookColor(color, _optionalChain([sheet, 'optionalAccess', _895 => _895.themePalette]))).filter((color) => typeof color === "string");
14830
14901
  const thresholds = matchingRule.cfvos.map((threshold) => resolveConditionalRuleThreshold(threshold, ruleValues)).filter((value) => typeof value === "number" && Number.isFinite(value));
14831
14902
  if (colors.length < 2 || thresholds.length < 2) {
14832
14903
  return null;
@@ -14845,7 +14916,7 @@ function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metrics
14845
14916
  return { color: resolvedColor };
14846
14917
  }
14847
14918
  function resolveConditionalIconForCell(row, col, worksheet, sheet, metricsCache) {
14848
- const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _881 => _881.conditionalFormatRules]), () => ( []));
14919
+ const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _896 => _896.conditionalFormatRules]), () => ( []));
14849
14920
  const matchingRule = rules.find(
14850
14921
  (rule) => rule.kind === "iconSet" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
14851
14922
  );
@@ -15132,7 +15203,7 @@ function GridRow({
15132
15203
  whiteSpace: "nowrap",
15133
15204
  width: "max-content"
15134
15205
  } : null;
15135
- const title = [_optionalChain([cellData, 'access', _882 => _882.hyperlink, 'optionalAccess', _883 => _883.tooltip]), _optionalChain([cellData, 'access', _884 => _884.validation, 'optionalAccess', _885 => _885.message]), cellData.value].filter((value, index, values) => typeof value === "string" && value.length > 0 && values.indexOf(value) === index).join("\n");
15206
+ const title = [_optionalChain([cellData, 'access', _897 => _897.hyperlink, 'optionalAccess', _898 => _898.tooltip]), _optionalChain([cellData, 'access', _899 => _899.validation, 'optionalAccess', _900 => _900.message]), cellData.value].filter((value, index, values) => typeof value === "string" && value.length > 0 && values.indexOf(value) === index).join("\n");
15136
15207
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
15137
15208
  "td",
15138
15209
  {
@@ -15316,8 +15387,8 @@ var MemoGridRow = React4.memo(GridRow, (prev, next) => {
15316
15387
  if (prev.actualRow !== next.actualRow || prev.rowHeight !== next.rowHeight || prev.headerLabelLiveScale !== next.headerLabelLiveScale || prev.palette !== next.palette || prev.readOnly !== next.readOnly || prev.visibleCols !== next.visibleCols || prev.leadingSpacerWidth !== next.leadingSpacerWidth || prev.rowHeaderWidth !== next.rowHeaderWidth || prev.stickyLeftByCol !== next.stickyLeftByCol || prev.stickyTop !== next.stickyTop || prev.trailingSpacerWidth !== next.trailingSpacerWidth || prev.zoomFactor !== next.zoomFactor || prev.getCellData !== next.getCellData || prev.onCellClick !== next.onCellClick || prev.onCellDoubleClick !== next.onCellDoubleClick || prev.onCellPointerDown !== next.onCellPointerDown || prev.onEditingBlur !== next.onEditingBlur || prev.onEditingCancel !== next.onEditingCancel || prev.onEditingCommit !== next.onEditingCommit || prev.onEditingNavigate !== next.onEditingNavigate || prev.onEditingValueChange !== next.onEditingValueChange || prev.onRowHeaderRef !== next.onRowHeaderRef || prev.onRowPointerDown !== next.onRowPointerDown || prev.onRowResizePointerDown !== next.onRowResizePointerDown || prev.renderCellAdornment !== next.renderCellAdornment) {
15317
15388
  return false;
15318
15389
  }
15319
- const prevEditingCol = _optionalChain([prev, 'access', _886 => _886.editingCell, 'optionalAccess', _887 => _887.row]) === prev.actualRow ? prev.editingCell.col : -1;
15320
- const nextEditingCol = _optionalChain([next, 'access', _888 => _888.editingCell, 'optionalAccess', _889 => _889.row]) === next.actualRow ? next.editingCell.col : -1;
15390
+ const prevEditingCol = _optionalChain([prev, 'access', _901 => _901.editingCell, 'optionalAccess', _902 => _902.row]) === prev.actualRow ? prev.editingCell.col : -1;
15391
+ const nextEditingCol = _optionalChain([next, 'access', _903 => _903.editingCell, 'optionalAccess', _904 => _904.row]) === next.actualRow ? next.editingCell.col : -1;
15321
15392
  if (prevEditingCol !== nextEditingCol) {
15322
15393
  return false;
15323
15394
  }
@@ -15733,6 +15804,7 @@ function useXlsxViewerThumbnails(options = {}) {
15733
15804
  getSheetFormControls,
15734
15805
  getSheetImages,
15735
15806
  getSheetShapes,
15807
+ locale,
15736
15808
  workbook,
15737
15809
  sheets
15738
15810
  } = useXlsxViewer();
@@ -15754,6 +15826,11 @@ function useXlsxViewerThumbnails(options = {}) {
15754
15826
  isMountedRef.current = false;
15755
15827
  };
15756
15828
  }, []);
15829
+ React4.useEffect(() => {
15830
+ workerThumbnailRowBatchCacheRef.current.clear();
15831
+ workerThumbnailRowBatchRequestRef.current.clear();
15832
+ setWorkerThumbnailRowBatchVersion((version) => version + 1);
15833
+ }, [locale]);
15757
15834
  React4.useEffect(() => {
15758
15835
  const currentSheets = new Set(sheets);
15759
15836
  for (const sheet of workerThumbnailRowBatchCacheRef.current.keys()) {
@@ -15778,8 +15855,8 @@ function useXlsxViewerThumbnails(options = {}) {
15778
15855
  const pendingRequest = workerThumbnailRowBatchRequestRef.current.get(sheet);
15779
15856
  if (!pendingRequest) {
15780
15857
  const request = {
15781
- endRow: Math.max(endRow, _nullishCoalesce(_optionalChain([cachedBatch, 'optionalAccess', _890 => _890.endRow]), () => ( endRow))),
15782
- startRow: Math.min(startRow, _nullishCoalesce(_optionalChain([cachedBatch, 'optionalAccess', _891 => _891.startRow]), () => ( startRow)))
15858
+ endRow: Math.max(endRow, _nullishCoalesce(_optionalChain([cachedBatch, 'optionalAccess', _905 => _905.endRow]), () => ( endRow))),
15859
+ startRow: Math.min(startRow, _nullishCoalesce(_optionalChain([cachedBatch, 'optionalAccess', _906 => _906.startRow]), () => ( startRow)))
15783
15860
  };
15784
15861
  workerThumbnailRowBatchRequestRef.current.set(sheet, request);
15785
15862
  void getRowsBatchAsync(
@@ -15843,7 +15920,7 @@ function useXlsxViewerThumbnails(options = {}) {
15843
15920
  }, []);
15844
15921
  const thumbnails = React4.useMemo(() => {
15845
15922
  return sheets.map((sheet, sheetIndex) => {
15846
- const worksheet = _nullishCoalesce(_optionalChain([workbook, 'optionalAccess', _892 => _892.getSheet, 'call', _893 => _893(sheet.workbookSheetIndex)]), () => ( null));
15923
+ const worksheet = _nullishCoalesce(_optionalChain([workbook, 'optionalAccess', _907 => _907.getSheet, 'call', _908 => _908(sheet.workbookSheetIndex)]), () => ( null));
15847
15924
  const sheetImages = getSheetImages(sheetIndex).filter((image) => image.src).sort((left, right) => left.zIndex - right.zIndex);
15848
15925
  const sheetShapes = getSheetShapes(sheetIndex);
15849
15926
  const sheetFormControls = getSheetFormControls(sheetIndex).filter((control) => !control.hidden);
@@ -15859,18 +15936,18 @@ function useXlsxViewerThumbnails(options = {}) {
15859
15936
  minRow: 0
15860
15937
  }));
15861
15938
  return {
15862
- maxCol: Math.max(_nullishCoalesce(_optionalChain([bounds, 'optionalAccess', _894 => _894.maxCol]), () => ( drawingBound.maxCol)), drawingBound.maxCol),
15863
- maxRow: Math.max(_nullishCoalesce(_optionalChain([bounds, 'optionalAccess', _895 => _895.maxRow]), () => ( drawingBound.maxRow)), drawingBound.maxRow),
15864
- minCol: Math.min(_nullishCoalesce(_optionalChain([bounds, 'optionalAccess', _896 => _896.minCol]), () => ( drawingBound.minCol)), drawingBound.minCol),
15865
- minRow: Math.min(_nullishCoalesce(_optionalChain([bounds, 'optionalAccess', _897 => _897.minRow]), () => ( drawingBound.minRow)), drawingBound.minRow)
15939
+ maxCol: Math.max(_nullishCoalesce(_optionalChain([bounds, 'optionalAccess', _909 => _909.maxCol]), () => ( drawingBound.maxCol)), drawingBound.maxCol),
15940
+ maxRow: Math.max(_nullishCoalesce(_optionalChain([bounds, 'optionalAccess', _910 => _910.maxRow]), () => ( drawingBound.maxRow)), drawingBound.maxRow),
15941
+ minCol: Math.min(_nullishCoalesce(_optionalChain([bounds, 'optionalAccess', _911 => _911.minCol]), () => ( drawingBound.minCol)), drawingBound.minCol),
15942
+ minRow: Math.min(_nullishCoalesce(_optionalChain([bounds, 'optionalAccess', _912 => _912.minRow]), () => ( drawingBound.minRow)), drawingBound.minRow)
15866
15943
  };
15867
15944
  }, null);
15868
15945
  const sheetMinUsedRow = (_nullishCoalesce(sheet.maxUsedRow, () => ( -1))) >= (_nullishCoalesce(sheet.minUsedRow, () => ( 0))) ? _nullishCoalesce(sheet.minUsedRow, () => ( 0)) : void 0;
15869
15946
  const sheetMinUsedCol = (_nullishCoalesce(sheet.maxUsedCol, () => ( -1))) >= (_nullishCoalesce(sheet.minUsedCol, () => ( 0))) ? _nullishCoalesce(sheet.minUsedCol, () => ( 0)) : void 0;
15870
- const effectiveMinUsedRow = Math.max(0, Math.min(_nullishCoalesce(_nullishCoalesce(sheetMinUsedRow, () => ( _optionalChain([drawingBounds, 'optionalAccess', _898 => _898.minRow]))), () => ( 0)), _nullishCoalesce(_nullishCoalesce(_optionalChain([drawingBounds, 'optionalAccess', _899 => _899.minRow]), () => ( sheetMinUsedRow)), () => ( 0))));
15871
- const effectiveMinUsedCol = Math.max(0, Math.min(_nullishCoalesce(_nullishCoalesce(sheetMinUsedCol, () => ( _optionalChain([drawingBounds, 'optionalAccess', _900 => _900.minCol]))), () => ( 0)), _nullishCoalesce(_nullishCoalesce(_optionalChain([drawingBounds, 'optionalAccess', _901 => _901.minCol]), () => ( sheetMinUsedCol)), () => ( 0))));
15872
- const effectiveMaxUsedRow = Math.max(_nullishCoalesce(sheet.maxUsedRow, () => ( -1)), _nullishCoalesce(_optionalChain([drawingBounds, 'optionalAccess', _902 => _902.maxRow]), () => ( -1)));
15873
- const effectiveMaxUsedCol = Math.max(_nullishCoalesce(sheet.maxUsedCol, () => ( -1)), _nullishCoalesce(_optionalChain([drawingBounds, 'optionalAccess', _903 => _903.maxCol]), () => ( -1)));
15947
+ const effectiveMinUsedRow = Math.max(0, Math.min(_nullishCoalesce(_nullishCoalesce(sheetMinUsedRow, () => ( _optionalChain([drawingBounds, 'optionalAccess', _913 => _913.minRow]))), () => ( 0)), _nullishCoalesce(_nullishCoalesce(_optionalChain([drawingBounds, 'optionalAccess', _914 => _914.minRow]), () => ( sheetMinUsedRow)), () => ( 0))));
15948
+ const effectiveMinUsedCol = Math.max(0, Math.min(_nullishCoalesce(_nullishCoalesce(sheetMinUsedCol, () => ( _optionalChain([drawingBounds, 'optionalAccess', _915 => _915.minCol]))), () => ( 0)), _nullishCoalesce(_nullishCoalesce(_optionalChain([drawingBounds, 'optionalAccess', _916 => _916.minCol]), () => ( sheetMinUsedCol)), () => ( 0))));
15949
+ const effectiveMaxUsedRow = Math.max(_nullishCoalesce(sheet.maxUsedRow, () => ( -1)), _nullishCoalesce(_optionalChain([drawingBounds, 'optionalAccess', _917 => _917.maxRow]), () => ( -1)));
15950
+ const effectiveMaxUsedCol = Math.max(_nullishCoalesce(sheet.maxUsedCol, () => ( -1)), _nullishCoalesce(_optionalChain([drawingBounds, 'optionalAccess', _918 => _918.maxCol]), () => ( -1)));
15874
15951
  const showGridLines = _nullishCoalesce(sheet.showGridLines, () => ( true));
15875
15952
  const hiddenRowSet = new Set(_nullishCoalesce(sheet.hiddenRows, () => ( [])));
15876
15953
  const hiddenColSet = new Set(_nullishCoalesce(sheet.hiddenCols, () => ( [])));
@@ -16083,8 +16160,8 @@ function useXlsxViewerThumbnails(options = {}) {
16083
16160
  return cached;
16084
16161
  }
16085
16162
  const batchCoversRow = workerRowBatch ? row >= workerRowBatch.startRow && row <= workerRowBatch.endRow : false;
16086
- const batchedCell = batchCoversRow ? _optionalChain([workerRowBatch, 'optionalAccess', _904 => _904.cells, 'access', _905 => _905.get, 'call', _906 => _906(cacheKey)]) : void 0;
16087
- if (_optionalChain([batchedCell, 'optionalAccess', _907 => _907.isMergedSecondary]) || _optionalChain([worksheet, 'optionalAccess', _908 => _908.isMergedSecondary, 'call', _909 => _909(row, col)])) {
16163
+ const batchedCell = batchCoversRow ? _optionalChain([workerRowBatch, 'optionalAccess', _919 => _919.cells, 'access', _920 => _920.get, 'call', _921 => _921(cacheKey)]) : void 0;
16164
+ if (_optionalChain([batchedCell, 'optionalAccess', _922 => _922.isMergedSecondary]) || _optionalChain([worksheet, 'optionalAccess', _923 => _923.isMergedSecondary, 'call', _924 => _924(row, col)])) {
16088
16165
  const mergedSecondaryData = {
16089
16166
  isMergedSecondary: true,
16090
16167
  style: {},
@@ -16093,23 +16170,23 @@ function useXlsxViewerThumbnails(options = {}) {
16093
16170
  cellRenderCache.set(cacheKey, mergedSecondaryData);
16094
16171
  return mergedSecondaryData;
16095
16172
  }
16096
- const merge = worksheet ? worksheet.getMergeSpan(row, col) : _optionalChain([batchedCell, 'optionalAccess', _910 => _910.mergeSpan]);
16173
+ const merge = worksheet ? worksheet.getMergeSpan(row, col) : _optionalChain([batchedCell, 'optionalAccess', _925 => _925.mergeSpan]);
16097
16174
  const inheritedStyle = resolveInheritedCellStyle2(sheet, row, col);
16098
- const worksheetStyle = worksheet ? _nullishCoalesce(worksheet.getCellStyleAt(row, col), () => ( null)) : _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _911 => _911.style]), () => ( null));
16175
+ const worksheetStyle = worksheet ? _nullishCoalesce(worksheet.getCellStyleAt(row, col), () => ( null)) : _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _926 => _926.style]), () => ( null));
16099
16176
  const mergedStyle = mergeResolvedCellStyle(inheritedStyle, worksheetStyle, { replaceXfSubtrees: true });
16100
16177
  const conditionalCellStyle = resolveConditionalCellStyleForCell(
16101
16178
  row,
16102
16179
  col,
16103
16180
  sheet,
16104
16181
  () => worksheet ? getCellNumericValue(worksheet, row, col) : getBatchedCellNumericValue(batchedCell),
16105
- () => worksheet ? getCellDisplayValue(worksheet, row, col, sheet) : _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _912 => _912.value]), () => ( "")),
16182
+ () => worksheet ? getCellDisplayValue(worksheet, row, col, sheet, locale) : _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _927 => _927.value]), () => ( "")),
16106
16183
  worksheet,
16107
- _optionalChain([workerRowBatch, 'optionalAccess', _913 => _913.cells])
16184
+ _optionalChain([workerRowBatch, 'optionalAccess', _928 => _928.cells])
16108
16185
  );
16109
16186
  const finalResolvedStyle = mergeResolvedCellStyle(mergedStyle, conditionalCellStyle);
16110
- const alignment = _optionalChain([finalResolvedStyle, 'optionalAccess', _914 => _914.alignment]);
16187
+ const alignment = _optionalChain([finalResolvedStyle, 'optionalAccess', _929 => _929.alignment]);
16111
16188
  const sparkline = _nullishCoalesce(sparklineByCell.get(cacheKey), () => ( null));
16112
- const getNumericValue = (targetRow, targetCol) => worksheet ? getCellNumericValue(worksheet, targetRow, targetCol) : getBatchedCellNumericValue(_optionalChain([workerRowBatch, 'optionalAccess', _915 => _915.cells, 'access', _916 => _916.get, 'call', _917 => _917(`${targetRow}:${targetCol}`)]));
16189
+ const getNumericValue = (targetRow, targetCol) => worksheet ? getCellNumericValue(worksheet, targetRow, targetCol) : getBatchedCellNumericValue(_optionalChain([workerRowBatch, 'optionalAccess', _930 => _930.cells, 'access', _931 => _931.get, 'call', _932 => _932(`${targetRow}:${targetCol}`)]));
16113
16190
  const sparklineValues = sparkline ? sparkline.range.start.row === sparkline.range.end.row ? Array.from(
16114
16191
  { length: Math.abs(sparkline.range.end.col - sparkline.range.start.col) + 1 },
16115
16192
  (_, index) => getNumericValue(
@@ -16123,23 +16200,23 @@ function useXlsxViewerThumbnails(options = {}) {
16123
16200
  sparkline.range.start.col
16124
16201
  )
16125
16202
  ) : null;
16126
- const checkboxState = _optionalChain([finalResolvedStyle, 'optionalAccess', _918 => _918.cellControl]) ? worksheet ? getCellBooleanValue(worksheet, row, col) : getBatchedCellBooleanValue(batchedCell) : null;
16203
+ const checkboxState = _optionalChain([finalResolvedStyle, 'optionalAccess', _933 => _933.cellControl]) ? worksheet ? getCellBooleanValue(worksheet, row, col) : getBatchedCellBooleanValue(batchedCell) : null;
16127
16204
  const nextData = {
16128
16205
  canvas: void 0,
16129
16206
  checkboxState,
16130
- colSpan: _optionalChain([merge, 'optionalAccess', _919 => _919.colSpan]),
16207
+ colSpan: _optionalChain([merge, 'optionalAccess', _934 => _934.colSpan]),
16131
16208
  conditionalColorScale: worksheet ? resolveConditionalColorScaleForCell(row, col, worksheet, sheet, conditionalFormatMetricsCache) : null,
16132
16209
  conditionalDataBar: worksheet ? resolveConditionalDataBarForCell(row, col, worksheet, sheet, conditionalFormatMetricsCache) : null,
16133
16210
  conditionalIcon: worksheet ? resolveConditionalIconForCell(row, col, worksheet, sheet, conditionalFormatMetricsCache) : null,
16134
16211
  isMergedSecondary: false,
16135
- rowSpan: _optionalChain([merge, 'optionalAccess', _920 => _920.rowSpan]),
16212
+ rowSpan: _optionalChain([merge, 'optionalAccess', _935 => _935.rowSpan]),
16136
16213
  sparkline: sparkline && sparklineValues ? { config: sparkline, values: sparklineValues } : null,
16137
16214
  style: buildCellStyle(finalResolvedStyle, palette, sheet.themePalette, {
16138
- generalAlignment: worksheet ? getCellGeneralAlignment(worksheet, row, col) : _optionalChain([batchedCell, 'optionalAccess', _921 => _921.generalAlignment]),
16215
+ generalAlignment: worksheet ? getCellGeneralAlignment(worksheet, row, col) : _optionalChain([batchedCell, 'optionalAccess', _936 => _936.generalAlignment]),
16139
16216
  showGridLines
16140
16217
  }),
16141
- textRotationDeg: resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess', _922 => _922.rotation]), () => ( _optionalChain([alignment, 'optionalAccess', _923 => _923.textRotation])))),
16142
- value: sparkline ? "" : checkboxState !== null ? "" : worksheet ? getCellDisplayValue(worksheet, row, col, sheet) : _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _924 => _924.value]), () => ( ""))
16218
+ textRotationDeg: resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess', _937 => _937.rotation]), () => ( _optionalChain([alignment, 'optionalAccess', _938 => _938.textRotation])))),
16219
+ value: sparkline ? "" : checkboxState !== null ? "" : worksheet ? getCellDisplayValue(worksheet, row, col, sheet, locale) : _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _939 => _939.value]), () => ( ""))
16143
16220
  };
16144
16221
  nextData.canvas = buildCanvasCellStyleCache(nextData.style);
16145
16222
  cellRenderCache.set(cacheKey, nextData);
@@ -16157,11 +16234,11 @@ function useXlsxViewerThumbnails(options = {}) {
16157
16234
  let height = rowItem.size;
16158
16235
  for (let colOffset = 1; colOffset < colSpan; colOffset += 1) {
16159
16236
  const nextCol = colItemByActual.get(colItem.actualIndex + colOffset);
16160
- width += _nullishCoalesce(_optionalChain([nextCol, 'optionalAccess', _925 => _925.size]), () => ( 0));
16237
+ width += _nullishCoalesce(_optionalChain([nextCol, 'optionalAccess', _940 => _940.size]), () => ( 0));
16161
16238
  }
16162
16239
  for (let rowOffset = 1; rowOffset < rowSpan; rowOffset += 1) {
16163
16240
  const nextRow = rowItemByActual.get(rowItem.actualIndex + rowOffset);
16164
- height += _nullishCoalesce(_optionalChain([nextRow, 'optionalAccess', _926 => _926.size]), () => ( 0));
16241
+ height += _nullishCoalesce(_optionalChain([nextRow, 'optionalAccess', _941 => _941.size]), () => ( 0));
16165
16242
  }
16166
16243
  const rect = {
16167
16244
  height,
@@ -16171,7 +16248,7 @@ function useXlsxViewerThumbnails(options = {}) {
16171
16248
  };
16172
16249
  const canvasCellStyle = _nullishCoalesce(cellData.canvas, () => ( buildCanvasCellStyleCache(cellData.style)));
16173
16250
  const gradientFill = typeof cellData.style.backgroundImage === "string" ? resolveCanvasGradientFill(context, rect, cellData.style.backgroundImage) : null;
16174
- const fillColor = _nullishCoalesce(_optionalChain([cellData, 'access', _927 => _927.conditionalColorScale, 'optionalAccess', _928 => _928.color]), () => ( (typeof cellData.style.backgroundColor === "string" ? cellData.style.backgroundColor : thumbnailSheetSurface)));
16251
+ const fillColor = _nullishCoalesce(_optionalChain([cellData, 'access', _942 => _942.conditionalColorScale, 'optionalAccess', _943 => _943.color]), () => ( (typeof cellData.style.backgroundColor === "string" ? cellData.style.backgroundColor : thumbnailSheetSurface)));
16175
16252
  context.fillStyle = _nullishCoalesce(gradientFill, () => ( fillColor));
16176
16253
  context.fillRect(rect.left, rect.top, rect.width, rect.height);
16177
16254
  if (cellData.conditionalDataBar) {
@@ -16411,10 +16488,11 @@ function useXlsxViewerThumbnails(options = {}) {
16411
16488
  sheets,
16412
16489
  thumbnailImageLoadVersion,
16413
16490
  workerThumbnailRowBatchVersion,
16491
+ locale,
16414
16492
  workbook
16415
16493
  ]);
16416
16494
  const paintThumbnail = React4.useCallback(
16417
- (sheetIndex, canvas) => _nullishCoalesce(_optionalChain([thumbnails, 'access', _929 => _929[sheetIndex], 'optionalAccess', _930 => _930.paint, 'call', _931 => _931(canvas)]), () => ( false)),
16495
+ (sheetIndex, canvas) => _nullishCoalesce(_optionalChain([thumbnails, 'access', _944 => _944[sheetIndex], 'optionalAccess', _945 => _945.paint, 'call', _946 => _946(canvas)]), () => ( false)),
16418
16496
  [thumbnails]
16419
16497
  );
16420
16498
  return React4.useMemo(
@@ -16473,7 +16551,7 @@ var SlotStore = (_class2 = class {constructor() { _class2.prototype.__init8.call
16473
16551
  }
16474
16552
  destroy() {
16475
16553
  this.destroyed = true;
16476
- _optionalChain([this, 'access', _932 => _932.observer, 'optionalAccess', _933 => _933.disconnect, 'call', _934 => _934()]);
16554
+ _optionalChain([this, 'access', _947 => _947.observer, 'optionalAccess', _948 => _948.disconnect, 'call', _949 => _949()]);
16477
16555
  this.observer = null;
16478
16556
  this.slots.clear();
16479
16557
  this.listeners.clear();
@@ -16515,7 +16593,7 @@ function RuntimeContent({ content }) {
16515
16593
  };
16516
16594
  }, []);
16517
16595
  React5.useLayoutEffect(() => {
16518
- _optionalChain([rootRef, 'access', _935 => _935.current, 'optionalAccess', _936 => _936.update, 'call', _937 => _937(content)]);
16596
+ _optionalChain([rootRef, 'access', _950 => _950.current, 'optionalAccess', _951 => _951.update, 'call', _952 => _952(content)]);
16519
16597
  }, [content]);
16520
16598
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { ref: hostRef, style: { display: "contents" } });
16521
16599
  }
@@ -16577,7 +16655,7 @@ function BoundViewer({ props, controller }) {
16577
16655
  }, [slots]);
16578
16656
  React5.useLayoutEffect(() => {
16579
16657
  const host = hostRef.current;
16580
- if (host) _optionalChain([viewerRef, 'access', _938 => _938.current, 'optionalAccess', _939 => _939.update, 'call', _940 => _940(renderOptions(props, controller, slots, host.ownerDocument))]);
16658
+ if (host) _optionalChain([viewerRef, 'access', _953 => _953.current, 'optionalAccess', _954 => _954.update, 'call', _955 => _955(renderOptions(props, controller, slots, host.ownerDocument))]);
16581
16659
  }, [controller, props, slots]);
16582
16660
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ViewerAppearanceContext.Provider, { value: {
16583
16661
  headerBackgroundColor: props.headerBackgroundColor,