@extend-ai/react-xlsx 0.22.0 → 0.22.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 (46) hide show
  1. package/README.md +2 -2
  2. package/dist/{chunk-JOOWCDHK.js → chunk-CMI5MIZZ.js} +84 -102
  3. package/dist/chunk-CMI5MIZZ.js.map +1 -0
  4. package/dist/{chunk-OMKR4PZY.js → chunk-EDOXAWRE.js} +5 -3
  5. package/dist/chunk-EDOXAWRE.js.map +1 -0
  6. package/dist/{chunk-BVRJGSYM.cjs → chunk-J43N64B5.cjs} +5 -3
  7. package/dist/chunk-J43N64B5.cjs.map +1 -0
  8. package/dist/{chunk-FM2VAXTV.js → chunk-QSOAAYBJ.js} +5 -3
  9. package/dist/chunk-QSOAAYBJ.js.map +1 -0
  10. package/dist/{chunk-6N6KJKR5.cjs → chunk-WNFIRTYB.cjs} +5 -3
  11. package/dist/chunk-WNFIRTYB.cjs.map +1 -0
  12. package/dist/{chunk-BBF4GKSB.cjs → chunk-YCMFDK3C.cjs} +200 -218
  13. package/dist/chunk-YCMFDK3C.cjs.map +1 -0
  14. package/dist/duke-sheets-provenance.json +4 -4
  15. package/dist/duke_sheets_wasm_bg.wasm +0 -0
  16. package/dist/index.cjs +108 -109
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.js +15 -16
  19. package/dist/index.js.map +1 -1
  20. package/dist/internal.cjs +3 -3
  21. package/dist/internal.d.cts +1 -1
  22. package/dist/internal.d.ts +1 -1
  23. package/dist/internal.js +2 -2
  24. package/dist/vanilla.cjs +3 -3
  25. package/dist/vanilla.d.cts +2 -2
  26. package/dist/vanilla.d.ts +2 -2
  27. package/dist/vanilla.js +2 -2
  28. package/dist/{workbook-runtime-NUTDPW3M.js → workbook-runtime-4GBESX74.js} +2 -2
  29. package/dist/{workbook-runtime-N63M5KMU.cjs → workbook-runtime-ITKMDWLO.cjs} +33 -33
  30. package/dist/{workbook-runtime-N63M5KMU.cjs.map → workbook-runtime-ITKMDWLO.cjs.map} +1 -1
  31. package/dist/{workbook-runtime-UIWE4FQ7.js → workbook-runtime-MVU32DIU.js} +2 -2
  32. package/dist/{workbook-runtime-CXEHXA7S.cjs → workbook-runtime-PHL746NC.cjs} +35 -35
  33. package/dist/{workbook-runtime-CXEHXA7S.cjs.map → workbook-runtime-PHL746NC.cjs.map} +1 -1
  34. package/dist/xlsx-worker.js +4 -2
  35. package/dist/xlsx-worker.js.map +1 -1
  36. package/package.json +2 -2
  37. package/dist/chunk-6N6KJKR5.cjs.map +0 -1
  38. package/dist/chunk-BBF4GKSB.cjs.map +0 -1
  39. package/dist/chunk-BVRJGSYM.cjs.map +0 -1
  40. package/dist/chunk-FM2VAXTV.js.map +0 -1
  41. package/dist/chunk-JOOWCDHK.js.map +0 -1
  42. package/dist/chunk-OMKR4PZY.js.map +0 -1
  43. package/dist/{internal-Ba92VZGf.d.cts → internal-DVsk7L2M.d.cts} +31 -31
  44. package/dist/{internal-Ba92VZGf.d.ts → internal-DVsk7L2M.d.ts} +31 -31
  45. /package/dist/{workbook-runtime-NUTDPW3M.js.map → workbook-runtime-4GBESX74.js.map} +0 -0
  46. /package/dist/{workbook-runtime-UIWE4FQ7.js.map → workbook-runtime-MVU32DIU.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -36,7 +36,7 @@
36
36
 
37
37
 
38
38
 
39
- var _chunk6N6KJKR5cjs = require('./chunk-6N6KJKR5.cjs');
39
+ var _chunkWNFIRTYBcjs = require('./chunk-WNFIRTYB.cjs');
40
40
 
41
41
 
42
42
 
@@ -148,7 +148,7 @@ function getFormulaReferences(value, sheetName) {
148
148
  const end = index + match[0].length;
149
149
  const previous = value[index - 1];
150
150
  const next = value[end];
151
- const parsed = _chunk6N6KJKR5cjs.parseXlsxRange.call(void 0, match[0].replace(/\s*:\s*/g, ":"));
151
+ const parsed = _chunkWNFIRTYBcjs.parseXlsxRange.call(void 0, match[0].replace(/\s*:\s*/g, ":"));
152
152
  if (parsed && !NAME_CHARACTER.test(previous) && previous !== "]" && previous !== "!" && previous !== ":" && (!next || !NAME_CHARACTER.test(next) && !/[!\[]/.test(next)) && !/^\s*\(/.test(value.slice(end))) {
153
153
  const { range } = parsed;
154
154
  const key = `${(_nullishCoalesce(parsed.sheetName, () => ( sheetName))).toLowerCase()}:${range.start.row},${range.start.col}:${range.end.row},${range.end.col}`;
@@ -185,7 +185,7 @@ function coerceUserEnteredValue(value, locale = "en-US", source = "edit") {
185
185
  const trimmed = value.trim();
186
186
  if (!trimmed) return value;
187
187
  if (/^(true|false)$/i.test(trimmed)) return trimmed.toLowerCase() === "true";
188
- const localized = _chunk6N6KJKR5cjs.parseLocaleNumber.call(void 0, trimmed, locale);
188
+ const localized = _chunkWNFIRTYBcjs.parseLocaleNumber.call(void 0, trimmed, locale);
189
189
  if (localized !== void 0) return localized;
190
190
  if (/^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/.test(trimmed)) {
191
191
  const number = Number(trimmed);
@@ -347,7 +347,7 @@ var XlsxWorkerClient = (_class = class {
347
347
  type: "load"
348
348
  }, [workerBuffer]);
349
349
  }, () => this.loadOnMainThread());
350
- _chunk6N6KJKR5cjs.restoreWorkerImageBlobs.call(void 0, result.imageAssets, result.imageBlobs);
350
+ _chunkWNFIRTYBcjs.restoreWorkerImageBlobs.call(void 0, result.imageAssets, result.imageBlobs);
351
351
  delete result.imageBlobs;
352
352
  for (const [key, value] of result.columnFontMeasurements) columnFontMeasurements.set(key, value);
353
353
  while (columnFontMeasurements.size > 256) columnFontMeasurements.delete(columnFontMeasurements.keys().next().value);
@@ -386,7 +386,7 @@ var XlsxWorkerClient = (_class = class {
386
386
  }
387
387
  async getMainRuntime() {
388
388
  if (this.disposed) throw createAbortError();
389
- this.mainRuntime ??= Promise.resolve().then(() => _interopRequireWildcard(require("./workbook-runtime-N63M5KMU.cjs"))).then(({ createWorkbookRuntime }) => createWorkbookRuntime());
389
+ this.mainRuntime ??= Promise.resolve().then(() => _interopRequireWildcard(require("./workbook-runtime-ITKMDWLO.cjs"))).then(({ createWorkbookRuntime }) => createWorkbookRuntime());
390
390
  const runtime = await this.mainRuntime;
391
391
  if (this.disposed) {
392
392
  runtime.dispose();
@@ -564,17 +564,17 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
564
564
  for (let index = 0; index < workbook.sheetCount; index += 1) {
565
565
  const worksheet = workbook.getSheet(index);
566
566
  const sheetState = _nullishCoalesce(_optionalChain([sheetStatesByWorkbookSheetIndex, 'optionalAccess', _50 => _50[index]]), () => ( null));
567
- const mergeMetadata = _chunk6N6KJKR5cjs.resolveWorksheetMergeMetadata.call(void 0, worksheet);
567
+ const mergeMetadata = _chunkWNFIRTYBcjs.resolveWorksheetMergeMetadata.call(void 0, worksheet);
568
568
  const effectiveSheetState = {
569
569
  ...sheetState,
570
570
  ...mergeMetadata
571
571
  };
572
- const defaultColWidthPx = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _51 => _51.defaultColWidthPx]), () => ( _chunk6N6KJKR5cjs.resolveWorksheetDefaultColumnWidthPixels.call(void 0,
572
+ const defaultColWidthPx = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _51 => _51.defaultColWidthPx]), () => ( _chunkWNFIRTYBcjs.resolveWorksheetDefaultColumnWidthPixels.call(void 0,
573
573
  worksheet,
574
574
  _optionalChain([sheetState, 'optionalAccess', _52 => _52.columnWidthCharacterWidthPx]),
575
575
  DEFAULT_COL_WIDTH
576
576
  )));
577
- const defaultRowHeightPx = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _53 => _53.defaultRowHeightPx]), () => ( _chunk6N6KJKR5cjs.resolveWorksheetDefaultRowHeightPixels.call(void 0,
577
+ const defaultRowHeightPx = _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _53 => _53.defaultRowHeightPx]), () => ( _chunkWNFIRTYBcjs.resolveWorksheetDefaultRowHeightPixels.call(void 0,
578
578
  worksheet,
579
579
  DEFAULT_ROW_HEIGHT
580
580
  )));
@@ -585,7 +585,7 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
585
585
  const resolveColumnWidthPx = (col) => {
586
586
  const width = worksheet.getColumnWidth(col);
587
587
  if (width !== void 0 && width !== null) {
588
- return _chunk6N6KJKR5cjs.resolveSheetColumnWidthPixels.call(void 0, width, _optionalChain([sheetState, 'optionalAccess', _54 => _54.columnWidthCharacterWidthPx]));
588
+ return _chunkWNFIRTYBcjs.resolveSheetColumnWidthPixels.call(void 0, width, _optionalChain([sheetState, 'optionalAccess', _54 => _54.columnWidthCharacterWidthPx]));
589
589
  }
590
590
  return _nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _55 => _55.colWidthOverridesPx, 'optionalAccess', _56 => _56[col]]), () => ( defaultColWidthPx));
591
591
  };
@@ -705,8 +705,8 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
705
705
  maxHorizontalMergeEndCol: mergeMetadata.maxHorizontalMergeEndCol,
706
706
  maxVerticalMergeEndRow: mergeMetadata.maxVerticalMergeEndRow,
707
707
  mergedRanges: mergeMetadata.mergedRanges,
708
- hiddenCols: _chunk6N6KJKR5cjs.resolveWorksheetHiddenCols.call(void 0, worksheet, maxCol),
709
- hiddenRows: _chunk6N6KJKR5cjs.resolveWorksheetHiddenRows.call(void 0, worksheet, maxRow),
708
+ hiddenCols: _chunkWNFIRTYBcjs.resolveWorksheetHiddenCols.call(void 0, worksheet, maxCol),
709
+ hiddenRows: _chunkWNFIRTYBcjs.resolveWorksheetHiddenRows.call(void 0, worksheet, maxRow),
710
710
  minUsedCol: minCol,
711
711
  minUsedRow: minRow,
712
712
  maxUsedCol: maxCol,
@@ -960,7 +960,7 @@ function formControlInputFromDukeControl(control2) {
960
960
  function xlsxFormControlInputToDukeDrawing(input) {
961
961
  return {
962
962
  altText: input.altText,
963
- anchor: _chunk6N6KJKR5cjs.xlsxAnchorToDukeDrawingAnchor.call(void 0, input.anchor, input.editAs),
963
+ anchor: _chunkWNFIRTYBcjs.xlsxAnchorToDukeDrawingAnchor.call(void 0, input.anchor, input.editAs),
964
964
  formControl: {
965
965
  kind: xlsxFormControlKindToDukeKind(input.kind),
966
966
  macroName: input.macroName,
@@ -1000,9 +1000,9 @@ function formControlLinkTouchesPivot(workbook, pivots, sourceSheetIndex, kind) {
1000
1000
  if (sheetIndex < 0) return false;
1001
1001
  address2 = address2.slice(separator + 1);
1002
1002
  }
1003
- const parsed = _chunk6N6KJKR5cjs.parseXlsxRange.call(void 0, address2);
1003
+ const parsed = _chunkWNFIRTYBcjs.parseXlsxRange.call(void 0, address2);
1004
1004
  if (_optionalChain([parsed, 'optionalAccess', _96 => _96.kind]) === "cells" && !parsed.sheetName && parsed.range.start.row === parsed.range.end.row && parsed.range.start.col === parsed.range.end.col) {
1005
- return Boolean(_chunk6N6KJKR5cjs.findIntersectingPivot.call(void 0, pivots, sheetNames[sheetIndex], parsed.range));
1005
+ return Boolean(_chunkWNFIRTYBcjs.findIntersectingPivot.call(void 0, pivots, sheetNames[sheetIndex], parsed.range));
1006
1006
  }
1007
1007
  const matching = names.filter((name) => name.name.toLowerCase() === address2.toLowerCase());
1008
1008
  const named = _nullishCoalesce(matching.find((name) => name.sheetIndex === sheetIndex), () => ( matching.find((name) => name.sheetIndex == null)));
@@ -1448,7 +1448,7 @@ function useXlsxViewerController(options) {
1448
1448
  releaseXmlRecordsRef.current = null;
1449
1449
  for (const url of retainedObjectUrlsRef.current) URL.revokeObjectURL(url);
1450
1450
  retainedObjectUrlsRef.current.clear();
1451
- _chunk6N6KJKR5cjs.revokeWorkbookImageAssets.call(void 0, imageAssetsRef.current);
1451
+ _chunkWNFIRTYBcjs.revokeWorkbookImageAssets.call(void 0, imageAssetsRef.current);
1452
1452
  imageAssetsRef.current = null;
1453
1453
  sheetOriginsRef.current = [];
1454
1454
  setFormControlsByWorkbookSheetIndex([]);
@@ -1488,7 +1488,7 @@ function useXlsxViewerController(options) {
1488
1488
  if (!targetWorkbook || !imageAssetsRef.current) {
1489
1489
  return chartAssetsRef.current;
1490
1490
  }
1491
- const assets = _chunk6N6KJKR5cjs.loadWorkbookChartAssets.call(void 0,
1491
+ const assets = _chunkWNFIRTYBcjs.loadWorkbookChartAssets.call(void 0,
1492
1492
  targetWorkbook,
1493
1493
  imageAssetsRef.current,
1494
1494
  buildVisibleSheetIndexMap(targetSheets),
@@ -1498,12 +1498,12 @@ function useXlsxViewerController(options) {
1498
1498
  return assets;
1499
1499
  }, [showHiddenSheets]);
1500
1500
  const loadPreparedWorkbook = React.useCallback(async (buffer, isCurrent = () => true) => {
1501
- const defaultFonts = _chunk6N6KJKR5cjs.loadSpreadsheetFonts.call(void 0, ["Calibri", "Arial"]);
1501
+ const defaultFonts = _chunkWNFIRTYBcjs.loadSpreadsheetFonts.call(void 0, ["Calibri", "Arial"]);
1502
1502
  const forced = shouldForceReadOnlyForBuffer(buffer.byteLength);
1503
1503
  const editable = !requestedReadOnly && !forced;
1504
1504
  const snapshot = await getWorkerClient().loadWorkbook(buffer, skipXmlParsing, showHiddenSheets, editable || !useWorker);
1505
1505
  if (!isCurrent()) return;
1506
- await Promise.all([defaultFonts, _chunk6N6KJKR5cjs.loadSpreadsheetFonts.call(void 0, snapshot.fontFamilies)]);
1506
+ await Promise.all([defaultFonts, _chunkWNFIRTYBcjs.loadSpreadsheetFonts.call(void 0, snapshot.fontFamilies)]);
1507
1507
  if (!isCurrent()) return;
1508
1508
  const nextWorkbook = snapshot.workbookSnapshot ? (await _internal.getSheetsWasmModule.call(void 0, )).Workbook.fromSnapshot(snapshot.workbookSnapshot) : null;
1509
1509
  if (!isCurrent()) {
@@ -1526,9 +1526,9 @@ function useXlsxViewerController(options) {
1526
1526
  setIsLoading(false);
1527
1527
  }, [getWorkerClient, requestedReadOnly, setChartAssets, setImageAssets, shouldForceReadOnlyForBuffer, showHiddenSheets, skipXmlParsing, useWorker]);
1528
1528
  const refreshWorkbookState = React.useCallback((targetWorkbook) => {
1529
- setPivotTables(_chunk6N6KJKR5cjs.readPivotTables.call(void 0, targetWorkbook));
1529
+ setPivotTables(_chunkWNFIRTYBcjs.readPivotTables.call(void 0, targetWorkbook));
1530
1530
  const currentFormControls = _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _128 => _128.current, 'optionalAccess', _129 => _129.formControlsByWorkbookSheetIndex]), () => ( []));
1531
- const nextFormControls = _chunk6N6KJKR5cjs.refreshWorkbookFormControls.call(void 0,
1531
+ const nextFormControls = _chunkWNFIRTYBcjs.refreshWorkbookFormControls.call(void 0,
1532
1532
  targetWorkbook,
1533
1533
  currentFormControls,
1534
1534
  _optionalChain([imageAssetsRef, 'access', _130 => _130.current, 'optionalAccess', _131 => _131.themePalette])
@@ -1548,7 +1548,7 @@ function useXlsxViewerController(options) {
1548
1548
  );
1549
1549
  setSheets(nextSheets);
1550
1550
  setChartAssets(
1551
- _chunk6N6KJKR5cjs.loadWorkbookChartAssets.call(void 0,
1551
+ _chunkWNFIRTYBcjs.loadWorkbookChartAssets.call(void 0,
1552
1552
  targetWorkbook,
1553
1553
  imageAssetsRef.current,
1554
1554
  buildVisibleSheetIndexMap(nextSheets),
@@ -1564,7 +1564,7 @@ function useXlsxViewerController(options) {
1564
1564
  chartDisplayFallbackCleanupRef.current = null;
1565
1565
  for (const url of retainedObjectUrlsRef.current) URL.revokeObjectURL(url);
1566
1566
  retainedObjectUrlsRef.current.clear();
1567
- _chunk6N6KJKR5cjs.revokeWorkbookImageAssets.call(void 0, imageAssetsRef.current);
1567
+ _chunkWNFIRTYBcjs.revokeWorkbookImageAssets.call(void 0, imageAssetsRef.current);
1568
1568
  disposeWorkerClient();
1569
1569
  }, [disposeWorkerClient]);
1570
1570
  React.useEffect(() => {
@@ -1745,7 +1745,7 @@ function useXlsxViewerController(options) {
1745
1745
  const nextHighlights = [];
1746
1746
  let firstSheetIndex = activeSheetIndex;
1747
1747
  for (const reference of inputs) {
1748
- const parsed = _chunk6N6KJKR5cjs.parseXlsxRange.call(void 0, reference);
1748
+ const parsed = _chunkWNFIRTYBcjs.parseXlsxRange.call(void 0, reference);
1749
1749
  if (!parsed) {
1750
1750
  return false;
1751
1751
  }
@@ -1839,7 +1839,7 @@ function useXlsxViewerController(options) {
1839
1839
  if (!shouldAutoCalculate) {
1840
1840
  return;
1841
1841
  }
1842
- const result = _chunk6N6KJKR5cjs.tryRecalculate.call(void 0, targetWorkbook);
1842
+ const result = _chunkWNFIRTYBcjs.tryRecalculate.call(void 0, targetWorkbook);
1843
1843
  if (!result.calculated) {
1844
1844
  setShouldAutoCalculate(false);
1845
1845
  }
@@ -2071,12 +2071,12 @@ function useXlsxViewerController(options) {
2071
2071
  const width = worksheet.getColumnWidth(col);
2072
2072
  const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _175 => _175.showGridLines]), () => ( true));
2073
2073
  if (width !== void 0 && width !== null) {
2074
- return _chunk6N6KJKR5cjs.resolveRenderedSheetAxisPixels.call(void 0,
2075
- _chunk6N6KJKR5cjs.resolveSheetColumnWidthPixels.call(void 0, width, _optionalChain([sheetState, 'optionalAccess', _176 => _176.columnWidthCharacterWidthPx])),
2074
+ return _chunkWNFIRTYBcjs.resolveRenderedSheetAxisPixels.call(void 0,
2075
+ _chunkWNFIRTYBcjs.resolveSheetColumnWidthPixels.call(void 0, width, _optionalChain([sheetState, 'optionalAccess', _176 => _176.columnWidthCharacterWidthPx])),
2076
2076
  showGridLines
2077
2077
  );
2078
2078
  }
2079
- return _chunk6N6KJKR5cjs.resolveRenderedSheetAxisPixels.call(void 0,
2079
+ return _chunkWNFIRTYBcjs.resolveRenderedSheetAxisPixels.call(void 0,
2080
2080
  _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _177 => _177.colWidthOverridesPx, 'optionalAccess', _178 => _178[col]]), () => ( _optionalChain([sheetState, 'optionalAccess', _179 => _179.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH)),
2081
2081
  showGridLines
2082
2082
  );
@@ -2086,9 +2086,9 @@ function useXlsxViewerController(options) {
2086
2086
  const height = worksheet.getRowHeight(row2);
2087
2087
  const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _186 => _186.showGridLines]), () => ( true));
2088
2088
  if (height !== void 0 && height !== null) {
2089
- return _chunk6N6KJKR5cjs.resolveRenderedSheetAxisPixels.call(void 0, _chunk6N6KJKR5cjs.resolveSheetRowHeightPixels.call(void 0, height), showGridLines);
2089
+ return _chunkWNFIRTYBcjs.resolveRenderedSheetAxisPixels.call(void 0, _chunkWNFIRTYBcjs.resolveSheetRowHeightPixels.call(void 0, height), showGridLines);
2090
2090
  }
2091
- return _chunk6N6KJKR5cjs.resolveRenderedSheetAxisPixels.call(void 0,
2091
+ return _chunkWNFIRTYBcjs.resolveRenderedSheetAxisPixels.call(void 0,
2092
2092
  _nullishCoalesce(_nullishCoalesce(_optionalChain([sheetState, 'optionalAccess', _187 => _187.rowHeightOverridesPx, 'optionalAccess', _188 => _188[row2]]), () => ( _optionalChain([sheetState, 'optionalAccess', _189 => _189.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT)),
2093
2093
  showGridLines
2094
2094
  );
@@ -2108,7 +2108,7 @@ function useXlsxViewerController(options) {
2108
2108
  const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _192 => _192.cachedFormulaValues, 'optionalAccess', _193 => _193[cellAddressToA1(cell)]]) : void 0;
2109
2109
  const formatted = worksheet.getFormattedValueAt(cell.row, cell.col);
2110
2110
  if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
2111
- return _chunk6N6KJKR5cjs.localizeCellNumber.call(void 0, worksheet, cell.row, cell.col, decodeHtmlEntities(formatted), locale);
2111
+ return _chunkWNFIRTYBcjs.localizeCellNumber.call(void 0, worksheet, cell.row, cell.col, decodeHtmlEntities(formatted), locale);
2112
2112
  }
2113
2113
  const calculated = worksheet.getCalculatedValueAt(cell.row, cell.col);
2114
2114
  if (formula && cachedFormulaValue !== void 0 && calculated.is_error) {
@@ -2169,7 +2169,7 @@ function useXlsxViewerController(options) {
2169
2169
  ];
2170
2170
  const fill = _optionalChain([rawStyle, 'optionalAccess', _194 => _194.fill]);
2171
2171
  if (fill) {
2172
- const fillStyle = _chunk6N6KJKR5cjs.resolveWorkbookFillStyle.call(void 0, fill, _optionalChain([activeSheet, 'optionalAccess', _195 => _195.themePalette]));
2172
+ const fillStyle = _chunkWNFIRTYBcjs.resolveWorkbookFillStyle.call(void 0, fill, _optionalChain([activeSheet, 'optionalAccess', _195 => _195.themePalette]));
2173
2173
  if (fillStyle.backgroundColor && fillStyle.backgroundColor.toLowerCase() !== "#ffffff") {
2174
2174
  cellStyles.push(`background-color:${fillStyle.backgroundColor}`);
2175
2175
  }
@@ -2191,7 +2191,7 @@ function useXlsxViewerController(options) {
2191
2191
  if (font.strikethrough) {
2192
2192
  cellStyles.push("text-decoration:line-through");
2193
2193
  }
2194
- const fontColor = _chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, font.color, _optionalChain([activeSheet, 'optionalAccess', _197 => _197.themePalette]));
2194
+ const fontColor = _chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, font.color, _optionalChain([activeSheet, 'optionalAccess', _197 => _197.themePalette]));
2195
2195
  if (fontColor) {
2196
2196
  cellStyles.push(`color:${fontColor}`);
2197
2197
  }
@@ -2289,7 +2289,7 @@ function useXlsxViewerController(options) {
2289
2289
  () => getCellFormula(deferredMetadataCell),
2290
2290
  [deferredMetadataCell, getCellFormula, revision, workerCellSnapshotRevision]
2291
2291
  );
2292
- const getChartSeriesFormula = React.useCallback((chartId, seriesIndex) => _chunk6N6KJKR5cjs.buildChartSeriesFormula.call(void 0, getChartById(chartId), seriesIndex), [getChartById]);
2292
+ const getChartSeriesFormula = React.useCallback((chartId, seriesIndex) => _chunkWNFIRTYBcjs.buildChartSeriesFormula.call(void 0, getChartById(chartId), seriesIndex), [getChartById]);
2293
2293
  const selectedChartFormula = React.useMemo(() => {
2294
2294
  if (!selectedChartElement || selectedChartElement.kind === "chart" || selectedChartElement.kind === "legend" || selectedChartElement.seriesIndex < 0) {
2295
2295
  return null;
@@ -2366,8 +2366,8 @@ function useXlsxViewerController(options) {
2366
2366
  sheetOriginsRef.current = structuredClone(entry.origins);
2367
2367
  setWorkbook(nextWorkbook);
2368
2368
  setSheets(nextSheets);
2369
- setPivotTables(_chunk6N6KJKR5cjs.readPivotTables.call(void 0, nextWorkbook));
2370
- const nextChartAssets = _chunk6N6KJKR5cjs.loadWorkbookChartAssets.call(void 0, nextWorkbook, nextImageAssets, buildVisibleSheetIndexMap(nextSheets), showHiddenSheets);
2369
+ setPivotTables(_chunkWNFIRTYBcjs.readPivotTables.call(void 0, nextWorkbook));
2370
+ const nextChartAssets = _chunkWNFIRTYBcjs.loadWorkbookChartAssets.call(void 0, nextWorkbook, nextImageAssets, buildVisibleSheetIndexMap(nextSheets), showHiddenSheets);
2371
2371
  setChartAssets(nextChartAssets);
2372
2372
  setActiveSheetIndexState(nextSheetIndex);
2373
2373
  const nextTabIndex = nextChartAssets.tabs.findIndex((tab) => tab.kind === "sheet" && tab.sheetIndex === nextSheetIndex);
@@ -2438,17 +2438,17 @@ function useXlsxViewerController(options) {
2438
2438
  }, [createHistoryEntry]);
2439
2439
  const getPivotSourceFields = React.useCallback((source) => {
2440
2440
  if (!workbook) throw new Error("Load an editable workbook to inspect a pivot source.");
2441
- return _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, workbook).getPivotSourceFields(source);
2441
+ return _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, workbook).getPivotSourceFields(source);
2442
2442
  }, [workbook]);
2443
- const getPivotTableAtCell = React.useCallback((cell, sheetName = _optionalChain([activeSheet, 'optionalAccess', _217 => _217.name])) => _chunk6N6KJKR5cjs.findIntersectingPivot.call(void 0, pivotTables, sheetName, { start: cell, end: cell }), [_optionalChain([activeSheet, 'optionalAccess', _218 => _218.name]), pivotTables]);
2443
+ const getPivotTableAtCell = React.useCallback((cell, sheetName = _optionalChain([activeSheet, 'optionalAccess', _217 => _217.name])) => _chunkWNFIRTYBcjs.findIntersectingPivot.call(void 0, pivotTables, sheetName, { start: cell, end: cell }), [_optionalChain([activeSheet, 'optionalAccess', _218 => _218.name]), pivotTables]);
2444
2444
  React.useEffect(() => {
2445
2445
  const insidePivot = activeCell && !selectedChartId && !selectedImageId && getPivotTableAtCell(activeCell);
2446
2446
  setPivotFieldListVisibleState(Boolean(pivotFieldListRequestedRef.current && insidePivot));
2447
2447
  }, [_optionalChain([activeCell, 'optionalAccess', _219 => _219.row]), _optionalChain([activeCell, 'optionalAccess', _220 => _220.col]), _optionalChain([activeSheet, 'optionalAccess', _221 => _221.name]), getPivotTableAtCell, selectedChartId, selectedImageId]);
2448
- const intersectsPivot = React.useCallback((range) => Boolean(_chunk6N6KJKR5cjs.findIntersectingPivot.call(void 0, pivotTables, _optionalChain([activeSheet, 'optionalAccess', _222 => _222.name]), range)), [_optionalChain([activeSheet, 'optionalAccess', _223 => _223.name]), pivotTables]);
2448
+ const intersectsPivot = React.useCallback((range) => Boolean(_chunkWNFIRTYBcjs.findIntersectingPivot.call(void 0, pivotTables, _optionalChain([activeSheet, 'optionalAccess', _222 => _222.name]), range)), [_optionalChain([activeSheet, 'optionalAccess', _223 => _223.name]), pivotTables]);
2449
2449
  const calculateForPivotMutation = React.useCallback((target, preserveSavedValues = true) => {
2450
2450
  const snapshot = preserveSavedValues ? target.exportSnapshot() : null;
2451
- const result = _chunk6N6KJKR5cjs.safeCalculate.call(void 0, target, snapshot ? { reparse: () => target.constructor.fromSnapshot(snapshot) } : {});
2451
+ const result = _chunkWNFIRTYBcjs.safeCalculate.call(void 0, target, snapshot ? { reparse: () => target.constructor.fromSnapshot(snapshot) } : {});
2452
2452
  if (!result.calculated) {
2453
2453
  if (result.workbook !== target) result.workbook.free();
2454
2454
  throw new Error("The workbook formulas could not be recalculated safely. The pivot table and existing values have been kept.");
@@ -2481,10 +2481,10 @@ function useXlsxViewerController(options) {
2481
2481
  return result;
2482
2482
  }, [calculateForPivotMutation, createHistoryEntry, readOnly, refreshWorkbookState, workbook]);
2483
2483
  const upsertPivotTable = React.useCallback((input) => {
2484
- return commitPivotMutation((target) => _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, target).upsertPivotTable(input));
2484
+ return commitPivotMutation((target) => _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, target).upsertPivotTable(input));
2485
2485
  }, [commitPivotMutation]);
2486
- const refreshPivotTable = React.useCallback((id) => commitPivotMutation((target) => _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, target).refreshPivotTable(id), true), [commitPivotMutation]);
2487
- const createPivotChart = React.useCallback((id, options2 = {}) => commitPivotMutation((target) => _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, target).createPivotChart(id, { ...options2, workbookName: `${fileStem(displayFileName)}.xlsx` }), false), [commitPivotMutation, displayFileName]);
2486
+ const refreshPivotTable = React.useCallback((id) => commitPivotMutation((target) => _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, target).refreshPivotTable(id), true), [commitPivotMutation]);
2487
+ const createPivotChart = React.useCallback((id, options2 = {}) => commitPivotMutation((target) => _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, target).createPivotChart(id, { ...options2, workbookName: `${fileStem(displayFileName)}.xlsx` }), false), [commitPivotMutation, displayFileName]);
2488
2488
  const togglePivotGroup = React.useCallback((id, toggle) => {
2489
2489
  const pivot = pivotTables.find((item) => item.id === id);
2490
2490
  if (!pivot) throw new Error("The pivot table no longer exists.");
@@ -2498,7 +2498,7 @@ function useXlsxViewerController(options) {
2498
2498
  }, [pivotTables, upsertPivotTable]);
2499
2499
  const removePivotTable = React.useCallback((id) => {
2500
2500
  if (!pivotTables.some((pivot) => pivot.id === id)) return false;
2501
- return commitPivotMutation((target) => _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, target).removePivotTable(id));
2501
+ return commitPivotMutation((target) => _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, target).removePivotTable(id));
2502
2502
  }, [commitPivotMutation, pivotTables]);
2503
2503
  const refreshAllPivotTables = React.useCallback(() => {
2504
2504
  if (readOnly) throw new Error("Enable editing to refresh pivot tables.");
@@ -2508,7 +2508,7 @@ function useXlsxViewerController(options) {
2508
2508
  const next = workbook.constructor.fromSnapshot(workbook.exportSnapshot());
2509
2509
  try {
2510
2510
  calculateForPivotMutation(next);
2511
- const engine = _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, next);
2511
+ const engine = _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, next);
2512
2512
  for (const pivot of engine.pivotTables) {
2513
2513
  engine.refreshPivotTable(pivot.id);
2514
2514
  calculateForPivotMutation(next, false);
@@ -2525,16 +2525,16 @@ function useXlsxViewerController(options) {
2525
2525
  for (const sheet of _nullishCoalesce(_optionalChain([imageAssetsRef, 'access', _227 => _227.current, 'optionalAccess', _228 => _228.sheetStatesByWorkbookSheetIndex]), () => ( []))) if (sheet) sheet.cachedFormulaValues = {};
2526
2526
  setWorkbook(next);
2527
2527
  refreshWorkbookState(next);
2528
- return _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, next).pivotTables;
2528
+ return _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, next).pivotTables;
2529
2529
  }, [calculateForPivotMutation, createHistoryEntry, pivotTables.length, readOnly, refreshWorkbookState, workbook]);
2530
2530
  const pivotDrillDown = React.useCallback((id, row2, col) => {
2531
2531
  if (!workbook) throw new Error("Load an editable workbook to inspect pivot details.");
2532
- return _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, workbook).pivotDrillDown(id, row2, col);
2532
+ return _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, workbook).pivotDrillDown(id, row2, col);
2533
2533
  }, [workbook]);
2534
2534
  const showPivotDetails = React.useCallback((id, row2, col) => {
2535
2535
  if (readOnly) throw new Error("Enable editing to create a details worksheet.");
2536
2536
  if (!workbook) throw new Error("Load a workbook before inspecting pivot details.");
2537
- const details = _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, workbook).pivotDrillDown(id, row2, col);
2537
+ const details = _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, workbook).pivotDrillDown(id, row2, col);
2538
2538
  if (!details.rows.length) throw new Error("This pivot cell has no source records to display.");
2539
2539
  const before = createHistoryEntry();
2540
2540
  const next = workbook.constructor.fromSnapshot(workbook.exportSnapshot());
@@ -2602,7 +2602,7 @@ function useXlsxViewerController(options) {
2602
2602
  if (currentInput.kind !== "formControl" || !currentControl.anchor) {
2603
2603
  return false;
2604
2604
  }
2605
- const nextAnchor = patch.anchor ? _chunk6N6KJKR5cjs.xlsxAnchorToDukeDrawingAnchor.call(void 0,
2605
+ const nextAnchor = patch.anchor ? _chunkWNFIRTYBcjs.xlsxAnchorToDukeDrawingAnchor.call(void 0,
2606
2606
  patch.anchor,
2607
2607
  _nullishCoalesce(patch.editAs, () => ( (currentControl.anchor.type === "twoCell" ? currentControl.anchor.editAs : void 0)))
2608
2608
  ) : patch.editAs !== void 0 && currentControl.anchor.type === "twoCell" ? { ...currentControl.anchor, editAs: patch.editAs } : currentControl.anchor;
@@ -2840,7 +2840,7 @@ function useXlsxViewerController(options) {
2840
2840
  if (!workbook) {
2841
2841
  return;
2842
2842
  }
2843
- const result = _chunk6N6KJKR5cjs.tryRecalculate.call(void 0, workbook);
2843
+ const result = _chunkWNFIRTYBcjs.tryRecalculate.call(void 0, workbook);
2844
2844
  if (result.calculated) {
2845
2845
  refreshWorkbookState(workbook);
2846
2846
  return;
@@ -2851,7 +2851,7 @@ function useXlsxViewerController(options) {
2851
2851
  if (!activeSheet) {
2852
2852
  return;
2853
2853
  }
2854
- const contentSizePx = activeSheet.officeLayout ? sizePx : _chunk6N6KJKR5cjs.resolveContentSheetAxisPixels.call(void 0, sizePx, activeSheet.showGridLines);
2854
+ const contentSizePx = activeSheet.officeLayout ? sizePx : _chunkWNFIRTYBcjs.resolveContentSheetAxisPixels.call(void 0, sizePx, activeSheet.showGridLines);
2855
2855
  const targetWorkbookSheetIndex = activeSheet.workbookSheetIndex;
2856
2856
  setSheets((currentSheets) => currentSheets.map((sheet) => {
2857
2857
  if (sheet.workbookSheetIndex !== targetWorkbookSheetIndex) {
@@ -2905,7 +2905,7 @@ function useXlsxViewerController(options) {
2905
2905
  const worksheet = workbook.getSheet(activeSheet.workbookSheetIndex);
2906
2906
  worksheet.setColumnWidth(
2907
2907
  col,
2908
- activeSheet.officeLayout ? _chunk6N6KJKR5cjs.pxToOfficeColumnWidth.call(void 0, widthPx, activeSheet.officeLayout.columnDigitWidthPt) : _chunk6N6KJKR5cjs.pxToSheetColumnWidth.call(void 0, _chunk6N6KJKR5cjs.resolveContentSheetAxisPixels.call(void 0, widthPx, activeSheet.showGridLines))
2908
+ activeSheet.officeLayout ? _chunkWNFIRTYBcjs.pxToOfficeColumnWidth.call(void 0, widthPx, activeSheet.officeLayout.columnDigitWidthPt) : _chunkWNFIRTYBcjs.pxToSheetColumnWidth.call(void 0, _chunkWNFIRTYBcjs.resolveContentSheetAxisPixels.call(void 0, widthPx, activeSheet.showGridLines))
2909
2909
  );
2910
2910
  refreshWorkbookState(workbook);
2911
2911
  }, [
@@ -2933,7 +2933,7 @@ function useXlsxViewerController(options) {
2933
2933
  const worksheet = workbook.getSheet(activeSheet.workbookSheetIndex);
2934
2934
  worksheet.setRowHeight(
2935
2935
  row2,
2936
- activeSheet.officeLayout ? Math.max(heightPx, MIN_ROW_HEIGHT_PX) * (3 / 4) : pxToSheetRowHeight(_chunk6N6KJKR5cjs.resolveContentSheetAxisPixels.call(void 0, heightPx, activeSheet.showGridLines))
2936
+ activeSheet.officeLayout ? Math.max(heightPx, MIN_ROW_HEIGHT_PX) * (3 / 4) : pxToSheetRowHeight(_chunkWNFIRTYBcjs.resolveContentSheetAxisPixels.call(void 0, heightPx, activeSheet.showGridLines))
2937
2937
  );
2938
2938
  refreshWorkbookState(workbook);
2939
2939
  }, [
@@ -3007,21 +3007,21 @@ function useXlsxViewerController(options) {
3007
3007
  if (!currentChart || currentChart.editable === false || currentChart.workbookSheetIndex !== activeSheet.workbookSheetIndex) {
3008
3008
  return;
3009
3009
  }
3010
- const nextAnchor = _chunk6N6KJKR5cjs.rectToImageAnchor.call(void 0, rect, currentChart.anchor, {
3010
+ const nextAnchor = _chunkWNFIRTYBcjs.rectToImageAnchor.call(void 0, rect, currentChart.anchor, {
3011
3011
  contentOffsetLeft: GRID_ROW_HEADER_WIDTH,
3012
3012
  contentOffsetTop: GRID_HEADER_HEIGHT,
3013
3013
  getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _258 => _258.columnWidths, 'access', _259 => _259[col]]), () => ( getColumnWidthPx(worksheet, col))),
3014
3014
  getRowHeightPx: (row2) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _260 => _260.rowHeights, 'access', _261 => _261[row2]]), () => ( getRowHeightPx(worksheet, row2)))
3015
3015
  });
3016
3016
  if (_optionalChain([currentChart, 'access', _262 => _262.raw, 'optionalAccess', _263 => _263.pivotSource]) && currentChart.name) {
3017
- commitPivotMutation((target) => _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, target).updatePivotChart(worksheet.name, currentChart.name, {
3018
- anchor: _chunk6N6KJKR5cjs.xlsxAnchorToDukeDrawingAnchor.call(void 0, nextAnchor)
3017
+ commitPivotMutation((target) => _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, target).updatePivotChart(worksheet.name, currentChart.name, {
3018
+ anchor: _chunkWNFIRTYBcjs.xlsxAnchorToDukeDrawingAnchor.call(void 0, nextAnchor)
3019
3019
  }), false);
3020
3020
  return;
3021
3021
  }
3022
3022
  if (!imageAssetsRef.current || !hydratedChartAssets) return;
3023
3023
  recordHistoryBeforeMutation();
3024
- const didUpdateAnchor = _chunk6N6KJKR5cjs.updateWorkbookChartAnchor.call(void 0, imageAssetsRef.current, hydratedChartAssets, id, nextAnchor);
3024
+ const didUpdateAnchor = _chunkWNFIRTYBcjs.updateWorkbookChartAnchor.call(void 0, imageAssetsRef.current, hydratedChartAssets, id, nextAnchor);
3025
3025
  console.info("[react-xlsx debug] updateWorkbookChartAnchor", { didUpdateAnchor, nextAnchor });
3026
3026
  hydratedChartAssets.chartsByWorkbookSheetIndex = hydratedChartAssets.chartsByWorkbookSheetIndex.map((sheetCharts) => sheetCharts.map((chart) => chart.id === id ? { ...chart, anchor: nextAnchor } : chart));
3027
3027
  setChartsByWorkbookSheetIndex((current) => current.map((sheetCharts) => sheetCharts.map((chart) => chart.id === id ? { ...chart, anchor: nextAnchor } : chart)));
@@ -3047,14 +3047,14 @@ function useXlsxViewerController(options) {
3047
3047
  if (!currentImage || currentImage.editable === false || currentImage.workbookSheetIndex !== activeSheet.workbookSheetIndex) {
3048
3048
  return;
3049
3049
  }
3050
- const nextAnchor = _chunk6N6KJKR5cjs.rectToImageAnchor.call(void 0, rect, currentImage.anchor, {
3050
+ const nextAnchor = _chunkWNFIRTYBcjs.rectToImageAnchor.call(void 0, rect, currentImage.anchor, {
3051
3051
  contentOffsetLeft: GRID_ROW_HEADER_WIDTH,
3052
3052
  contentOffsetTop: GRID_HEADER_HEIGHT,
3053
3053
  getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _264 => _264.columnWidths, 'access', _265 => _265[col]]), () => ( getColumnWidthPx(worksheet, col))),
3054
3054
  getRowHeightPx: (row2) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _266 => _266.rowHeights, 'access', _267 => _267[row2]]), () => ( getRowHeightPx(worksheet, row2)))
3055
3055
  });
3056
3056
  recordHistoryBeforeMutation();
3057
- if (!_chunk6N6KJKR5cjs.updateWorkbookImageAnchor.call(void 0, imageAssetsRef.current, id, nextAnchor)) {
3057
+ if (!_chunkWNFIRTYBcjs.updateWorkbookImageAnchor.call(void 0, imageAssetsRef.current, id, nextAnchor)) {
3058
3058
  return;
3059
3059
  }
3060
3060
  setImagesByWorkbookSheetIndex([...imageAssetsRef.current.imagesByWorkbookSheetIndex]);
@@ -3147,7 +3147,7 @@ function useXlsxViewerController(options) {
3147
3147
  return;
3148
3148
  }
3149
3149
  const currentRect = resolveAnchoredObjectRect(currentChart.anchor, worksheet);
3150
- setChartRect(id, _chunk6N6KJKR5cjs.resizeImageRect.call(void 0, currentRect, handle, deltaX, deltaY, 48));
3150
+ setChartRect(id, _chunkWNFIRTYBcjs.resizeImageRect.call(void 0, currentRect, handle, deltaX, deltaY, 48));
3151
3151
  }, [getActiveWorksheet, getChartById, resolveAnchoredObjectRect, setChartRect]);
3152
3152
  const resizeImageBy = React.useCallback((id, handle, deltaX, deltaY) => {
3153
3153
  const currentImage = getImageById(id);
@@ -3175,7 +3175,7 @@ function useXlsxViewerController(options) {
3175
3175
  1,
3176
3176
  GRID_HEADER_HEIGHT + resolveAxisSum(currentImage.anchor.to.row, (row2) => getRowHeightPx(worksheet, row2)) + currentImage.anchor.to.rowOffsetEmu / 9525 - top
3177
3177
  ) : currentImage.anchor.sizeEmu.cy / 9525;
3178
- const nextRect = _chunk6N6KJKR5cjs.resizeImageRect.call(void 0, { height, left, top, width }, handle, deltaX, deltaY);
3178
+ const nextRect = _chunkWNFIRTYBcjs.resizeImageRect.call(void 0, { height, left, top, width }, handle, deltaX, deltaY);
3179
3179
  setImageRect(id, nextRect);
3180
3180
  }, [getActiveWorksheet, getColumnWidthPx, getImageById, getRowHeightPx, setImageRect]);
3181
3181
  const updateChart = React.useCallback((id, patch) => {
@@ -3190,24 +3190,24 @@ function useXlsxViewerController(options) {
3190
3190
  throw new Error("Change PivotChart data through the pivot table field settings.");
3191
3191
  }
3192
3192
  const sheetName = workbook.getSheet(currentChart.workbookSheetIndex).name;
3193
- commitPivotMutation((target) => _chunk6N6KJKR5cjs.pivotWorkbook.call(void 0, target).updatePivotChart(sheetName, currentChart.name, {
3193
+ commitPivotMutation((target) => _chunkWNFIRTYBcjs.pivotWorkbook.call(void 0, target).updatePivotChart(sheetName, currentChart.name, {
3194
3194
  title: patch.title,
3195
3195
  chartType: patch.chartType,
3196
- anchor: patch.anchor ? _chunk6N6KJKR5cjs.xlsxAnchorToDukeDrawingAnchor.call(void 0, patch.anchor) : void 0
3196
+ anchor: patch.anchor ? _chunkWNFIRTYBcjs.xlsxAnchorToDukeDrawingAnchor.call(void 0, patch.anchor) : void 0
3197
3197
  }), false);
3198
3198
  return;
3199
3199
  }
3200
3200
  recordHistoryBeforeMutation();
3201
3201
  if (patch.anchor && imageAssetsRef.current && hydratedChartAssets) {
3202
- _chunk6N6KJKR5cjs.updateWorkbookChartAnchor.call(void 0, imageAssetsRef.current, hydratedChartAssets, id, patch.anchor);
3202
+ _chunkWNFIRTYBcjs.updateWorkbookChartAnchor.call(void 0, imageAssetsRef.current, hydratedChartAssets, id, patch.anchor);
3203
3203
  }
3204
3204
  if (imageAssetsRef.current && hydratedChartAssets) {
3205
- _chunk6N6KJKR5cjs.updateWorkbookChartDefinition.call(void 0, imageAssetsRef.current, hydratedChartAssets, id, patch);
3205
+ _chunkWNFIRTYBcjs.updateWorkbookChartDefinition.call(void 0, imageAssetsRef.current, hydratedChartAssets, id, patch);
3206
3206
  }
3207
3207
  setChartsByWorkbookSheetIndex((current) => current.map((sheetCharts) => sheetCharts.map((chart) => {
3208
3208
  if (chart.id !== id) return chart;
3209
3209
  const nextChart = { ...chart, ...patch, renderSource: _nullishCoalesce(patch.renderSource, () => ( chart.renderSource)) };
3210
- return imageAssetsRef.current ? _chunk6N6KJKR5cjs.refreshChartRenderSource.call(void 0, nextChart, imageAssetsRef.current, workbook) : nextChart;
3210
+ return imageAssetsRef.current ? _chunkWNFIRTYBcjs.refreshChartRenderSource.call(void 0, nextChart, imageAssetsRef.current, workbook) : nextChart;
3211
3211
  })));
3212
3212
  setRevision((current) => current + 1);
3213
3213
  }, [commitPivotMutation, ensureChartAssetsHydrated, getChartById, readOnly, recordHistoryBeforeMutation, sheets, workbook]);
@@ -3219,7 +3219,7 @@ function useXlsxViewerController(options) {
3219
3219
  if (!chart || chart.editable === false || _optionalChain([chart, 'access', _270 => _270.raw, 'optionalAccess', _271 => _271.pivotSource])) {
3220
3220
  return false;
3221
3221
  }
3222
- const nextChart = _chunk6N6KJKR5cjs.applyChartSeriesFormula.call(void 0, chart, seriesIndex, formula, workbook);
3222
+ const nextChart = _chunkWNFIRTYBcjs.applyChartSeriesFormula.call(void 0, chart, seriesIndex, formula, workbook);
3223
3223
  if (!nextChart) {
3224
3224
  return false;
3225
3225
  }
@@ -3528,7 +3528,7 @@ function useXlsxViewerController(options) {
3528
3528
  return;
3529
3529
  }
3530
3530
  if (intersectsPivot(selection)) return;
3531
- const mergedRanges = _chunk6N6KJKR5cjs.resolveWorksheetMergeMetadata.call(void 0, worksheet).mergedRanges;
3531
+ const mergedRanges = _chunkWNFIRTYBcjs.resolveWorksheetMergeMetadata.call(void 0, worksheet).mergedRanges;
3532
3532
  const range = expandHighlightedRange(normalizeRange(selection), mergedRanges);
3533
3533
  const isSingleCell = range.start.row === range.end.row && range.start.col === range.end.col;
3534
3534
  if (isSingleCell && mode !== "center" || mode === "across" && range.start.col === range.end.col) {
@@ -3565,7 +3565,7 @@ function useXlsxViewerController(options) {
3565
3565
  }
3566
3566
  const range = normalizeRange(selection);
3567
3567
  if (intersectsPivot(selection)) return;
3568
- const mergedRanges = _chunk6N6KJKR5cjs.resolveWorksheetMergeMetadata.call(void 0, worksheet).mergedRanges.filter((merged) => rangesIntersect(range, merged));
3568
+ const mergedRanges = _chunkWNFIRTYBcjs.resolveWorksheetMergeMetadata.call(void 0, worksheet).mergedRanges.filter((merged) => rangesIntersect(range, merged));
3569
3569
  if (mergedRanges.length === 0) return;
3570
3570
  recordHistoryBeforeMutation();
3571
3571
  for (const merged of mergedRanges) {
@@ -3606,7 +3606,7 @@ function useXlsxViewerController(options) {
3606
3606
  showHiddenSheets
3607
3607
  );
3608
3608
  setSheets(nextSheets);
3609
- const nextChartAssets = imageAssetsRef.current ? _chunk6N6KJKR5cjs.loadWorkbookChartAssets.call(void 0, workbook, imageAssetsRef.current, buildVisibleSheetIndexMap(nextSheets), showHiddenSheets) : null;
3609
+ const nextChartAssets = imageAssetsRef.current ? _chunkWNFIRTYBcjs.loadWorkbookChartAssets.call(void 0, workbook, imageAssetsRef.current, buildVisibleSheetIndexMap(nextSheets), showHiddenSheets) : null;
3610
3610
  if (imageAssetsRef.current) {
3611
3611
  setChartAssets(nextChartAssets);
3612
3612
  }
@@ -3624,7 +3624,7 @@ function useXlsxViewerController(options) {
3624
3624
  }
3625
3625
  recordHistoryBeforeMutation();
3626
3626
  workbook.removeSheet(activeSheet.workbookSheetIndex);
3627
- setPivotTables(_chunk6N6KJKR5cjs.readPivotTables.call(void 0, workbook));
3627
+ setPivotTables(_chunkWNFIRTYBcjs.readPivotTables.call(void 0, workbook));
3628
3628
  sheetOriginsRef.current = sheetOriginsRef.current.filter((_, index) => index !== activeSheet.workbookSheetIndex);
3629
3629
  setFormControlsByWorkbookSheetIndex((current) => current.filter((_, index) => index !== activeSheet.workbookSheetIndex));
3630
3630
  setImagesByWorkbookSheetIndex((current) => current.filter((_, index) => index !== activeSheet.workbookSheetIndex));
@@ -3648,7 +3648,7 @@ function useXlsxViewerController(options) {
3648
3648
  );
3649
3649
  setSheets(nextSheets);
3650
3650
  if (imageAssetsRef.current) {
3651
- setChartAssets(_chunk6N6KJKR5cjs.loadWorkbookChartAssets.call(void 0, workbook, imageAssetsRef.current, buildVisibleSheetIndexMap(nextSheets), showHiddenSheets));
3651
+ setChartAssets(_chunkWNFIRTYBcjs.loadWorkbookChartAssets.call(void 0, workbook, imageAssetsRef.current, buildVisibleSheetIndexMap(nextSheets), showHiddenSheets));
3652
3652
  }
3653
3653
  setActiveSheetIndexState((current) => Math.max(0, Math.min(current, nextSheets.length - 1)));
3654
3654
  setRevision((current) => current + 1);
@@ -4725,7 +4725,7 @@ function usePivotTableEditor(viewer, options = {}) {
4725
4725
  const focus = (pivot) => {
4726
4726
  const sheetIndex = viewer.sheets.findIndex((sheet) => sheet.name.toLowerCase() === pivot.target.sheet.toLowerCase());
4727
4727
  if (sheetIndex >= 0) viewer.setActiveSheetIndex(sheetIndex);
4728
- const parsed = _chunk6N6KJKR5cjs.parseXlsxRange.call(void 0, pivot.outputRange || pivot.target.cell);
4728
+ const parsed = _chunkWNFIRTYBcjs.parseXlsxRange.call(void 0, pivot.outputRange || pivot.target.cell);
4729
4729
  if (parsed) setPendingFocus({ sheet: pivot.target.sheet, ...parsed.range.start });
4730
4730
  };
4731
4731
  const select = (id) => run(() => {
@@ -6023,13 +6023,15 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
6023
6023
  }
6024
6024
  return null;
6025
6025
  }
6026
+ var DATA_BAR_INSET = 2;
6027
+ var DATA_BAR_GRADIENT_TINT = 0.85;
6026
6028
  function resolveCanvasDataBarFill(context, left, top, width, _height, dataBar) {
6027
6029
  if (dataBar.gradient === false) {
6028
6030
  return dataBar.color;
6029
6031
  }
6030
6032
  const gradient = context.createLinearGradient(left, top, left + width, top);
6031
- gradient.addColorStop(0, lightenColor(dataBar.color, 0.28));
6032
- gradient.addColorStop(1, dataBar.color);
6033
+ gradient.addColorStop(0, dataBar.color);
6034
+ gradient.addColorStop(1, lightenColor(dataBar.color, DATA_BAR_GRADIENT_TINT));
6033
6035
  return gradient;
6034
6036
  }
6035
6037
  function drawCanvasConditionalIcon(context, icon, centerX, centerY, size) {
@@ -7197,7 +7199,7 @@ function resolveThumbnailAxisMarkerOffset({
7197
7199
  offsetEmu,
7198
7200
  previewStartActualIndex
7199
7201
  }) {
7200
- return resolveThumbnailAxisAbsoluteOffset(actualIndices, getSizePx, actualIndex) - resolveThumbnailAxisAbsoluteOffset(actualIndices, getSizePx, previewStartActualIndex) + _chunk6N6KJKR5cjs.emuToPixels.call(void 0, offsetEmu);
7202
+ return resolveThumbnailAxisAbsoluteOffset(actualIndices, getSizePx, actualIndex) - resolveThumbnailAxisAbsoluteOffset(actualIndices, getSizePx, previewStartActualIndex) + _chunkWNFIRTYBcjs.emuToPixels.call(void 0, offsetEmu);
7201
7203
  }
7202
7204
  function resolveThumbnailAnchoredRect(anchor, visibleRows, visibleCols, getRowHeightPx, getColWidthPx, previewRows, previewCols, options) {
7203
7205
  const previewStartRow = _nullishCoalesce(previewRows[0], () => ( 0));
@@ -7220,18 +7222,18 @@ function resolveThumbnailAnchoredRect(anchor, visibleRows, visibleCols, getRowHe
7220
7222
  });
7221
7223
  if (anchor.kind === "absolute") {
7222
7224
  return {
7223
- height: Math.max(1, _chunk6N6KJKR5cjs.emuToPixels.call(void 0, anchor.sizeEmu.cy)),
7224
- left: options.rowHeaderWidth + _chunk6N6KJKR5cjs.emuToPixels.call(void 0, anchor.positionEmu.x) - previewOriginX,
7225
- top: options.headerHeight + _chunk6N6KJKR5cjs.emuToPixels.call(void 0, anchor.positionEmu.y) - previewOriginY,
7226
- width: Math.max(1, _chunk6N6KJKR5cjs.emuToPixels.call(void 0, anchor.sizeEmu.cx))
7225
+ height: Math.max(1, _chunkWNFIRTYBcjs.emuToPixels.call(void 0, anchor.sizeEmu.cy)),
7226
+ left: options.rowHeaderWidth + _chunkWNFIRTYBcjs.emuToPixels.call(void 0, anchor.positionEmu.x) - previewOriginX,
7227
+ top: options.headerHeight + _chunkWNFIRTYBcjs.emuToPixels.call(void 0, anchor.positionEmu.y) - previewOriginY,
7228
+ width: Math.max(1, _chunkWNFIRTYBcjs.emuToPixels.call(void 0, anchor.sizeEmu.cx))
7227
7229
  };
7228
7230
  }
7229
7231
  if (anchor.kind === "one-cell") {
7230
7232
  return {
7231
- height: Math.max(1, _chunk6N6KJKR5cjs.emuToPixels.call(void 0, anchor.sizeEmu.cy)),
7233
+ height: Math.max(1, _chunkWNFIRTYBcjs.emuToPixels.call(void 0, anchor.sizeEmu.cy)),
7232
7234
  left: resolveMarkerLeft(anchor.from.col, anchor.from.colOffsetEmu),
7233
7235
  top: resolveMarkerTop(anchor.from.row, anchor.from.rowOffsetEmu),
7234
- width: Math.max(1, _chunk6N6KJKR5cjs.emuToPixels.call(void 0, anchor.sizeEmu.cx))
7236
+ width: Math.max(1, _chunkWNFIRTYBcjs.emuToPixels.call(void 0, anchor.sizeEmu.cx))
7235
7237
  };
7236
7238
  }
7237
7239
  const left = resolveMarkerLeft(anchor.from.col, anchor.from.colOffsetEmu);
@@ -7286,7 +7288,7 @@ function decodeHtmlEntities2(value) {
7286
7288
  return value.replace(/&quot;/g, '"').replace(/&#34;/g, '"').replace(/&apos;/g, "'").replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
7287
7289
  }
7288
7290
  function mapBorder2(edge, themePalette) {
7289
- const color = _nullishCoalesce(_chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, edge.color, themePalette), () => ( "#000"));
7291
+ const color = _nullishCoalesce(_chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, edge.color, themePalette), () => ( "#000"));
7290
7292
  const widthMap = {
7291
7293
  dashed: "1px",
7292
7294
  dotted: "1px",
@@ -7503,7 +7505,7 @@ function buildCellStyle(style, palette, themePalette, options) {
7503
7505
  let resolvedFillColor = null;
7504
7506
  let hasExplicitFill = false;
7505
7507
  if (fill) {
7506
- const fillStyle = _chunk6N6KJKR5cjs.resolveWorkbookFillStyle.call(void 0, fill, themePalette);
7508
+ const fillStyle = _chunkWNFIRTYBcjs.resolveWorkbookFillStyle.call(void 0, fill, themePalette);
7507
7509
  if (fillStyle.backgroundColor || fillStyle.backgroundImage) {
7508
7510
  hasExplicitFill = true;
7509
7511
  resolvedFillColor = fillStyle.backgroundColor;
@@ -7531,7 +7533,7 @@ function buildCellStyle(style, palette, themePalette, options) {
7531
7533
  if (font.strikethrough) {
7532
7534
  css.textDecoration = `${_nullishCoalesce(css.textDecoration, () => ( ""))} line-through`.trim();
7533
7535
  }
7534
- const fontColor = _chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, font.color, themePalette);
7536
+ const fontColor = _chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, font.color, themePalette);
7535
7537
  if (fontColor) {
7536
7538
  resolvedFontColor = fontColor;
7537
7539
  css.color = fontColor;
@@ -7641,7 +7643,7 @@ function getCellDisplayValue(worksheet, row2, col, activeSheet, locale = "en-US"
7641
7643
  const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _485 => _485.cachedFormulaValues, 'optionalAccess', _486 => _486[cellAddressToA12({ row: row2, col })]]) : void 0;
7642
7644
  const formatted = worksheet.getFormattedValueAt(row2, col);
7643
7645
  if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
7644
- return _chunk6N6KJKR5cjs.localizeCellNumber.call(void 0, worksheet, row2, col, decodeHtmlEntities2(formatted), locale);
7646
+ return _chunkWNFIRTYBcjs.localizeCellNumber.call(void 0, worksheet, row2, col, decodeHtmlEntities2(formatted), locale);
7645
7647
  }
7646
7648
  const cellValue = worksheet.getCalculatedValueAt(row2, col);
7647
7649
  if (formula && cachedFormulaValue !== void 0 && cellValue.is_error) {
@@ -8226,7 +8228,7 @@ function resolveRichCellRuns(raw, value, base, theme, zoom) {
8226
8228
  if (typeof font.size === "number" && font.size > 0) style.fontSize = font.size * (4 / 3) * zoom;
8227
8229
  if (typeof font.bold === "boolean") style.fontWeight = font.bold ? "bold" : "normal";
8228
8230
  if (typeof font.italic === "boolean") style.fontStyle = font.italic ? "italic" : "normal";
8229
- const color = _chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, font.color, theme);
8231
+ const color = _chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, font.color, theme);
8230
8232
  if (color) style.color = color;
8231
8233
  const decorations = new Set(String(_nullishCoalesce(base.textDecoration, () => ( ""))).split(/\s+/).filter(Boolean));
8232
8234
  if (font.underline != null) {
@@ -8975,23 +8977,23 @@ function resolveConditionalDataBarForCell(row2, col, worksheet, sheet, metricsCa
8975
8977
  if (minValue === null || maxValue === null) {
8976
8978
  return null;
8977
8979
  }
8978
- const minLength = Number.isFinite(_nullishCoalesce(matchingRule.minLength, () => ( Number.NaN))) ? _nullishCoalesce(matchingRule.minLength, () => ( 0)) : 0;
8979
- const maxLength = Number.isFinite(_nullishCoalesce(matchingRule.maxLength, () => ( Number.NaN))) ? _nullishCoalesce(matchingRule.maxLength, () => ( 100)) : 100;
8980
+ const minLength = Number.isFinite(_nullishCoalesce(matchingRule.minLength, () => ( Number.NaN))) ? _nullishCoalesce(matchingRule.minLength, () => ( 10)) : 10;
8981
+ const maxLength = Number.isFinite(_nullishCoalesce(matchingRule.maxLength, () => ( Number.NaN))) ? _nullishCoalesce(matchingRule.maxLength, () => ( 90)) : 90;
8980
8982
  const span = maxValue - minValue;
8981
8983
  const ratio = span === 0 ? numericValue >= maxValue ? 1 : 0 : (numericValue - minValue) / span;
8982
8984
  const widthPercent = minLength + Math.max(0, Math.min(1, ratio)) * (maxLength - minLength);
8983
- const color = _chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, matchingRule.color, _optionalChain([sheet, 'optionalAccess', _537 => _537.themePalette]));
8985
+ const color = _chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, matchingRule.color, _optionalChain([sheet, 'optionalAccess', _537 => _537.themePalette]));
8984
8986
  if (!color || widthPercent <= 0) {
8985
8987
  return null;
8986
8988
  }
8987
8989
  return {
8988
- axisColor: _nullishCoalesce(_chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess', _538 => _538.themePalette])), () => ( void 0)),
8990
+ axisColor: _nullishCoalesce(_chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess', _538 => _538.themePalette])), () => ( void 0)),
8989
8991
  border: _nullishCoalesce(matchingRule.border, () => ( void 0)),
8990
- borderColor: _nullishCoalesce(_chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess', _539 => _539.themePalette])), () => ( void 0)),
8992
+ borderColor: _nullishCoalesce(_chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess', _539 => _539.themePalette])), () => ( void 0)),
8991
8993
  color,
8992
8994
  gradient: _nullishCoalesce(matchingRule.gradient, () => ( void 0)),
8993
- negativeBorderColor: _nullishCoalesce(_chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess', _540 => _540.themePalette])), () => ( void 0)),
8994
- negativeFillColor: _nullishCoalesce(_chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess', _541 => _541.themePalette])), () => ( void 0)),
8995
+ negativeBorderColor: _nullishCoalesce(_chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess', _540 => _540.themePalette])), () => ( void 0)),
8996
+ negativeFillColor: _nullishCoalesce(_chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess', _541 => _541.themePalette])), () => ( void 0)),
8995
8997
  widthPercent
8996
8998
  };
8997
8999
  }
@@ -9024,7 +9026,7 @@ function resolveConditionalColorScaleForCell(row2, col, worksheet, sheet, metric
9024
9026
  });
9025
9027
  metricsCache.set(cacheKey, ruleValues);
9026
9028
  }
9027
- const colors = matchingRule.colors.map((color) => _chunk6N6KJKR5cjs.resolveWorkbookColor.call(void 0, color, _optionalChain([sheet, 'optionalAccess', _543 => _543.themePalette]))).filter((color) => typeof color === "string");
9029
+ const colors = matchingRule.colors.map((color) => _chunkWNFIRTYBcjs.resolveWorkbookColor.call(void 0, color, _optionalChain([sheet, 'optionalAccess', _543 => _543.themePalette]))).filter((color) => typeof color === "string");
9028
9030
  const thresholds = matchingRule.cfvos.map((threshold) => resolveConditionalRuleThreshold(threshold, ruleValues)).filter((value) => typeof value === "number" && Number.isFinite(value));
9029
9031
  if (colors.length < 2 || thresholds.length < 2) {
9030
9032
  return null;
@@ -9390,22 +9392,19 @@ function GridRow({
9390
9392
  "aria-hidden": "true",
9391
9393
  style: {
9392
9394
  alignItems: "center",
9393
- bottom: 4 * zoomFactor,
9394
9395
  display: "flex",
9395
- left: 4 * zoomFactor,
9396
+ inset: DATA_BAR_INSET * zoomFactor,
9396
9397
  pointerEvents: "none",
9397
9398
  position: "absolute",
9398
- right: 4 * zoomFactor,
9399
- top: 4 * zoomFactor,
9400
9399
  zIndex: 0
9401
9400
  },
9402
9401
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
9403
9402
  "div",
9404
9403
  {
9405
9404
  style: {
9406
- background: cellData.conditionalDataBar.gradient === false ? cellData.conditionalDataBar.color : `linear-gradient(90deg, ${lightenColor(cellData.conditionalDataBar.color, 0.28)} 0%, ${cellData.conditionalDataBar.color} 100%)`,
9405
+ background: cellData.conditionalDataBar.gradient === false ? cellData.conditionalDataBar.color : `linear-gradient(90deg, ${cellData.conditionalDataBar.color} 0%, ${lightenColor(cellData.conditionalDataBar.color, DATA_BAR_GRADIENT_TINT)} 100%)`,
9407
9406
  border: cellData.conditionalDataBar.border !== false && cellData.conditionalDataBar.borderColor ? `1px solid ${cellData.conditionalDataBar.borderColor}` : "none",
9408
- borderRadius: 2,
9407
+ boxSizing: "border-box",
9409
9408
  height: "100%",
9410
9409
  opacity: 1,
9411
9410
  width: `${cellData.conditionalDataBar.widthPercent}%`
@@ -10136,13 +10135,13 @@ function useXlsxViewerThumbnails(options = {}) {
10136
10135
  const width = worksheet.getColumnWidth(actualCol);
10137
10136
  if (width !== void 0 && width !== null) {
10138
10137
  return Math.max(
10139
- _chunk6N6KJKR5cjs.resolveRenderedSheetAxisPixels.call(void 0, _chunk6N6KJKR5cjs.resolveSheetColumnWidthPixels.call(void 0, width, sheet.columnWidthCharacterWidthPx), showGridLines),
10138
+ _chunkWNFIRTYBcjs.resolveRenderedSheetAxisPixels.call(void 0, _chunkWNFIRTYBcjs.resolveSheetColumnWidthPixels.call(void 0, width, sheet.columnWidthCharacterWidthPx), showGridLines),
10140
10139
  DEFAULT_COL_WIDTH2 / 2
10141
10140
  );
10142
10141
  }
10143
10142
  }
10144
10143
  return Math.max(
10145
- _chunk6N6KJKR5cjs.resolveRenderedSheetAxisPixels.call(void 0,
10144
+ _chunkWNFIRTYBcjs.resolveRenderedSheetAxisPixels.call(void 0,
10146
10145
  _nullishCoalesce(_nullishCoalesce(sheet.colWidthOverridesPx[actualCol], () => ( sheet.defaultColWidthPx)), () => ( DEFAULT_COL_WIDTH2)),
10147
10146
  showGridLines
10148
10147
  ),
@@ -10154,13 +10153,13 @@ function useXlsxViewerThumbnails(options = {}) {
10154
10153
  const height = worksheet.getRowHeight(actualRow);
10155
10154
  if (height !== void 0 && height !== null) {
10156
10155
  return Math.max(
10157
- _chunk6N6KJKR5cjs.resolveRenderedSheetAxisPixels.call(void 0, _chunk6N6KJKR5cjs.resolveSheetRowHeightPixels.call(void 0, height), showGridLines),
10156
+ _chunkWNFIRTYBcjs.resolveRenderedSheetAxisPixels.call(void 0, _chunkWNFIRTYBcjs.resolveSheetRowHeightPixels.call(void 0, height), showGridLines),
10158
10157
  DEFAULT_ROW_HEIGHT2 / 1.5
10159
10158
  );
10160
10159
  }
10161
10160
  }
10162
10161
  return Math.max(
10163
- _chunk6N6KJKR5cjs.resolveRenderedSheetAxisPixels.call(void 0,
10162
+ _chunkWNFIRTYBcjs.resolveRenderedSheetAxisPixels.call(void 0,
10164
10163
  _nullishCoalesce(_nullishCoalesce(sheet.rowHeightOverridesPx[actualRow], () => ( sheet.defaultRowHeightPx)), () => ( DEFAULT_ROW_HEIGHT2)),
10165
10164
  showGridLines
10166
10165
  ),
@@ -10380,7 +10379,7 @@ function useXlsxViewerThumbnails(options = {}) {
10380
10379
  rowSpan: _optionalChain([merge, 'optionalAccess', _583 => _583.rowSpan]),
10381
10380
  sparkline: sparkline && sparklineValues ? { config: sparkline, values: sparklineValues } : null,
10382
10381
  style: buildCellStyle(finalResolvedStyle, palette, sheet.themePalette, {
10383
- generalAlignment: worksheet ? _chunk6N6KJKR5cjs.getCellGeneralAlignment.call(void 0, worksheet, row2, col) : _optionalChain([batchedCell, 'optionalAccess', _584 => _584.generalAlignment]),
10382
+ generalAlignment: worksheet ? _chunkWNFIRTYBcjs.getCellGeneralAlignment.call(void 0, worksheet, row2, col) : _optionalChain([batchedCell, 'optionalAccess', _584 => _584.generalAlignment]),
10384
10383
  showGridLines
10385
10384
  }),
10386
10385
  textRotationDeg: resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess', _585 => _585.rotation]), () => ( _optionalChain([alignment, 'optionalAccess', _586 => _586.textRotation])))),
@@ -10427,10 +10426,10 @@ function useXlsxViewerThumbnails(options = {}) {
10427
10426
  context.fillStyle = _nullishCoalesce(gradientFill, () => ( fillColor));
10428
10427
  context.fillRect(rect.left, rect.top, rect.width, rect.height);
10429
10428
  if (cellData.conditionalDataBar) {
10430
- const barLeft = rect.left + 4;
10431
- const barTop = rect.top + 4;
10432
- const barWidth = Math.max(0, (rect.width - 8) * (cellData.conditionalDataBar.widthPercent / 100));
10433
- const barHeight = Math.max(0, rect.height - 8);
10429
+ const barLeft = rect.left + DATA_BAR_INSET;
10430
+ const barTop = rect.top + DATA_BAR_INSET;
10431
+ const barWidth = Math.max(0, (rect.width - DATA_BAR_INSET * 2) * (cellData.conditionalDataBar.widthPercent / 100));
10432
+ const barHeight = Math.max(0, rect.height - DATA_BAR_INSET * 2);
10434
10433
  if (barWidth > 0 && barHeight > 0) {
10435
10434
  context.fillStyle = resolveCanvasDataBarFill(
10436
10435
  context,