@extend-ai/react-xlsx 0.20.10 → 0.20.11

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.
@@ -10858,9 +10858,10 @@ function useXlsxViewerController(options) {
10858
10858
  activeCell,
10859
10859
  activeSheetIndex,
10860
10860
  bytes: createSavedWorkbookBytes(workbook),
10861
- selection
10861
+ selection,
10862
+ sortState
10862
10863
  };
10863
- }, [activeCell, activeSheetIndex, createSavedWorkbookBytes, selection, workbook]);
10864
+ }, [activeCell, activeSheetIndex, createSavedWorkbookBytes, selection, sortState, workbook]);
10864
10865
  const captureCellMutationState = _chunkOGZ6ROZCcjs.q.call(void 0, (cell) => {
10865
10866
  const worksheet = getActiveWorksheet();
10866
10867
  if (!worksheet) {
@@ -10900,6 +10901,7 @@ function useXlsxViewerController(options) {
10900
10901
  }
10901
10902
  setActiveCell(entry.activeCell);
10902
10903
  setSelection(entry.selection);
10904
+ setSortState(entry.sortState);
10903
10905
  selectionAnchorRef.current = entry.selection ? normalizeRange(entry.selection).start : entry.activeCell;
10904
10906
  setRevision((current) => current + 1);
10905
10907
  }, [setChartAssets, setImageAssets]);
@@ -10934,6 +10936,7 @@ function useXlsxViewerController(options) {
10934
10936
  for (const mutation of entry.mutations) {
10935
10937
  applyCellMutationState(worksheet, mutation.cell, direction === "undo" ? mutation.before : mutation.after);
10936
10938
  }
10939
+ setSortState(direction === "undo" ? entry.sortStateBefore : entry.sortStateAfter);
10937
10940
  maybeRecalculateWorkbook(workbook);
10938
10941
  refreshWorkbookState(workbook);
10939
10942
  const nextActiveCell = direction === "undo" ? entry.activeCellBefore : entry.activeCellAfter;
@@ -11071,8 +11074,8 @@ function useXlsxViewerController(options) {
11071
11074
  redoStackRef.current = [];
11072
11075
  setHistoryRevision((current) => current + 1);
11073
11076
  }, [activeCell, activeSheet, selection]);
11074
- const recordRangeEditHistory = _chunkOGZ6ROZCcjs.q.call(void 0, (mutations, selectionAfter, activeCellAfter) => {
11075
- if (!activeSheet || isApplyingHistoryRef.current || mutations.length === 0) {
11077
+ const recordRangeEditHistory = _chunkOGZ6ROZCcjs.q.call(void 0, (mutations, selectionAfter, activeCellAfter, sortStateAfter = sortState) => {
11078
+ if (!activeSheet || isApplyingHistoryRef.current || mutations.length === 0 && sortStateAfter === sortState) {
11076
11079
  return;
11077
11080
  }
11078
11081
  pushHistoryEntry(undoStackRef.current, {
@@ -11082,11 +11085,13 @@ function useXlsxViewerController(options) {
11082
11085
  mutations,
11083
11086
  selectionAfter,
11084
11087
  selectionBefore: selection,
11085
- sheetIndex: activeSheet.workbookSheetIndex
11088
+ sheetIndex: activeSheet.workbookSheetIndex,
11089
+ sortStateAfter,
11090
+ sortStateBefore: sortState
11086
11091
  });
11087
11092
  redoStackRef.current = [];
11088
11093
  setHistoryRevision((current) => current + 1);
11089
- }, [activeCell, activeSheet, selection]);
11094
+ }, [activeCell, activeSheet, selection, sortState]);
11090
11095
  const sortTable = _chunkOGZ6ROZCcjs.q.call(void 0, (tableName, columnIndex, direction) => {
11091
11096
  const worksheet = getActiveWorksheet();
11092
11097
  const targetTable = tables.find((table) => table.name === tableName || table.displayName === tableName);
@@ -11138,8 +11143,13 @@ function useXlsxViewerController(options) {
11138
11143
  const comparedText = left.sortText.localeCompare(right.sortText, void 0, { numeric: true, sensitivity: "base" });
11139
11144
  return direction === "ascending" ? comparedText : -comparedText;
11140
11145
  });
11146
+ const nextSortState = { columnIndex, direction, tableName: targetTable.name };
11141
11147
  if (sortedRows.every((row, index) => row.index === _optionalChain([rows, 'access', _1032 => _1032[index], 'optionalAccess', _1033 => _1033.index]))) {
11142
- setSortState({ columnIndex, direction, tableName: targetTable.name });
11148
+ if (_optionalChain([sortState, 'optionalAccess', _1034 => _1034.tableName]) === targetTable.name && sortState.columnIndex === columnIndex && sortState.direction === direction) {
11149
+ return;
11150
+ }
11151
+ setSortState(nextSortState);
11152
+ recordRangeEditHistory([], selection, activeCell, nextSortState);
11143
11153
  return;
11144
11154
  }
11145
11155
  const mutations = [];
@@ -11167,8 +11177,8 @@ function useXlsxViewerController(options) {
11167
11177
  }
11168
11178
  maybeRecalculateWorkbook(workbook);
11169
11179
  refreshWorkbookState(workbook);
11170
- setSortState({ columnIndex, direction, tableName: targetTable.name });
11171
- recordRangeEditHistory(mutations, selection, activeCell);
11180
+ setSortState(nextSortState);
11181
+ recordRangeEditHistory(mutations, selection, activeCell, nextSortState);
11172
11182
  }, [
11173
11183
  activeCell,
11174
11184
  activeSheet,
@@ -11178,6 +11188,7 @@ function useXlsxViewerController(options) {
11178
11188
  recordRangeEditHistory,
11179
11189
  refreshWorkbookState,
11180
11190
  selection,
11191
+ sortState,
11181
11192
  tables,
11182
11193
  workbook
11183
11194
  ]);
@@ -11207,9 +11218,9 @@ function useXlsxViewerController(options) {
11207
11218
  if (!workbook) {
11208
11219
  return;
11209
11220
  }
11210
- const activeSheetName = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1034 => _1034.name]), () => ( "sheet"));
11221
+ const activeSheetName = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1035 => _1035.name]), () => ( "sheet"));
11211
11222
  downloadText(workbook.saveCsvString(), `${fileStem(displayFileName)}-${activeSheetName}.csv`, CSV_MIME_TYPE);
11212
- }, [_optionalChain([activeSheet, 'optionalAccess', _1035 => _1035.name]), displayFileName, workbook]);
11223
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1036 => _1036.name]), displayFileName, workbook]);
11213
11224
  const recalculate = _chunkOGZ6ROZCcjs.q.call(void 0, () => {
11214
11225
  if (!workbook) {
11215
11226
  return;
@@ -11373,10 +11384,10 @@ function useXlsxViewerController(options) {
11373
11384
  const currentChart = getChartById(id);
11374
11385
  console.info("[react-xlsx debug] currentChart", {
11375
11386
  activeWorkbookSheetIndex: activeSheet.workbookSheetIndex,
11376
- editable: _optionalChain([currentChart, 'optionalAccess', _1036 => _1036.editable]),
11387
+ editable: _optionalChain([currentChart, 'optionalAccess', _1037 => _1037.editable]),
11377
11388
  found: Boolean(currentChart),
11378
11389
  originCount: hydratedChartAssets.chartOriginsById.size,
11379
- workbookSheetIndex: _optionalChain([currentChart, 'optionalAccess', _1037 => _1037.workbookSheetIndex])
11390
+ workbookSheetIndex: _optionalChain([currentChart, 'optionalAccess', _1038 => _1038.workbookSheetIndex])
11380
11391
  });
11381
11392
  if (!currentChart || currentChart.editable === false || currentChart.workbookSheetIndex !== activeSheet.workbookSheetIndex) {
11382
11393
  return;
@@ -11384,8 +11395,8 @@ function useXlsxViewerController(options) {
11384
11395
  const nextAnchor = rectToImageAnchor(rect, currentChart.anchor, {
11385
11396
  contentOffsetLeft: GRID_ROW_HEADER_WIDTH,
11386
11397
  contentOffsetTop: GRID_HEADER_HEIGHT,
11387
- getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _1038 => _1038.columnWidths, 'access', _1039 => _1039[col]]), () => ( getColumnWidthPx(worksheet, col))),
11388
- getRowHeightPx: (row) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _1040 => _1040.rowHeights, 'access', _1041 => _1041[row]]), () => ( getRowHeightPx(worksheet, row)))
11398
+ getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _1039 => _1039.columnWidths, 'access', _1040 => _1040[col]]), () => ( getColumnWidthPx(worksheet, col))),
11399
+ getRowHeightPx: (row) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _1041 => _1041.rowHeights, 'access', _1042 => _1042[row]]), () => ( getRowHeightPx(worksheet, row)))
11389
11400
  });
11390
11401
  recordHistoryBeforeMutation();
11391
11402
  const didUpdateAnchor = updateWorkbookChartAnchor(imageAssetsRef.current, hydratedChartAssets, id, nextAnchor);
@@ -11416,8 +11427,8 @@ function useXlsxViewerController(options) {
11416
11427
  const nextAnchor = rectToImageAnchor(rect, currentImage.anchor, {
11417
11428
  contentOffsetLeft: GRID_ROW_HEADER_WIDTH,
11418
11429
  contentOffsetTop: GRID_HEADER_HEIGHT,
11419
- getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _1042 => _1042.columnWidths, 'access', _1043 => _1043[col]]), () => ( getColumnWidthPx(worksheet, col))),
11420
- getRowHeightPx: (row) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _1044 => _1044.rowHeights, 'access', _1045 => _1045[row]]), () => ( getRowHeightPx(worksheet, row)))
11430
+ getColumnWidthPx: (col) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _1043 => _1043.columnWidths, 'access', _1044 => _1044[col]]), () => ( getColumnWidthPx(worksheet, col))),
11431
+ getRowHeightPx: (row) => _nullishCoalesce(_optionalChain([layout, 'optionalAccess', _1045 => _1045.rowHeights, 'access', _1046 => _1046[row]]), () => ( getRowHeightPx(worksheet, row)))
11421
11432
  });
11422
11433
  recordHistoryBeforeMutation();
11423
11434
  if (!updateWorkbookImageAnchor(imageAssetsRef.current, id, nextAnchor)) {
@@ -11596,7 +11607,7 @@ function useXlsxViewerController(options) {
11596
11607
  setSelectedChartElement(null);
11597
11608
  setSelectedImageId(null);
11598
11609
  setActiveCell(cell);
11599
- if (_optionalChain([options2, 'optionalAccess', _1046 => _1046.extend]) && selectionAnchorRef.current) {
11610
+ if (_optionalChain([options2, 'optionalAccess', _1047 => _1047.extend]) && selectionAnchorRef.current) {
11600
11611
  setSelection(normalizeRange({ start: selectionAnchorRef.current, end: cell }));
11601
11612
  return;
11602
11613
  }
@@ -11739,7 +11750,7 @@ function useXlsxViewerController(options) {
11739
11750
  setCellFormula(activeCell, formula);
11740
11751
  }, [activeCell, setCellFormula]);
11741
11752
  const setSelectedFormula = _chunkOGZ6ROZCcjs.q.call(void 0, (formula) => {
11742
- if (_optionalChain([selectedFormulaTarget, 'optionalAccess', _1047 => _1047.kind]) === "chartSeries") {
11753
+ if (_optionalChain([selectedFormulaTarget, 'optionalAccess', _1048 => _1048.kind]) === "chartSeries") {
11743
11754
  return setChartSeriesFormula(selectedFormulaTarget.chartId, selectedFormulaTarget.seriesIndex, formula);
11744
11755
  }
11745
11756
  if (!activeCell) {
@@ -11901,7 +11912,7 @@ function useXlsxViewerController(options) {
11901
11912
  return;
11902
11913
  }
11903
11914
  recordHistoryBeforeMutation();
11904
- const baseName = _optionalChain([name, 'optionalAccess', _1048 => _1048.trim, 'call', _1049 => _1049()]) || "Sheet";
11915
+ const baseName = _optionalChain([name, 'optionalAccess', _1049 => _1049.trim, 'call', _1050 => _1050()]) || "Sheet";
11905
11916
  let candidate = baseName;
11906
11917
  let counter = 2;
11907
11918
  while (workbook.sheetIndex(candidate) !== void 0) {
@@ -11921,11 +11932,11 @@ function useXlsxViewerController(options) {
11921
11932
  }
11922
11933
  const nextSheets = buildSheetList(
11923
11934
  workbook,
11924
- _optionalChain([imageAssetsRef, 'access', _1050 => _1050.current, 'optionalAccess', _1051 => _1051.sheetStatesByWorkbookSheetIndex]),
11925
- _optionalChain([imageAssetsRef, 'access', _1052 => _1052.current, 'optionalAccess', _1053 => _1053.themePalette]),
11926
- _optionalChain([imageAssetsRef, 'access', _1054 => _1054.current, 'optionalAccess', _1055 => _1055.styleById]),
11927
- _optionalChain([imageAssetsRef, 'access', _1056 => _1056.current, 'optionalAccess', _1057 => _1057.namedCellStyleByName]),
11928
- _optionalChain([imageAssetsRef, 'access', _1058 => _1058.current, 'optionalAccess', _1059 => _1059.tableStyleByName]),
11935
+ _optionalChain([imageAssetsRef, 'access', _1051 => _1051.current, 'optionalAccess', _1052 => _1052.sheetStatesByWorkbookSheetIndex]),
11936
+ _optionalChain([imageAssetsRef, 'access', _1053 => _1053.current, 'optionalAccess', _1054 => _1054.themePalette]),
11937
+ _optionalChain([imageAssetsRef, 'access', _1055 => _1055.current, 'optionalAccess', _1056 => _1056.styleById]),
11938
+ _optionalChain([imageAssetsRef, 'access', _1057 => _1057.current, 'optionalAccess', _1058 => _1058.namedCellStyleByName]),
11939
+ _optionalChain([imageAssetsRef, 'access', _1059 => _1059.current, 'optionalAccess', _1060 => _1060.tableStyleByName]),
11929
11940
  showHiddenSheets
11930
11941
  );
11931
11942
  setSheets(nextSheets);
@@ -11935,7 +11946,7 @@ function useXlsxViewerController(options) {
11935
11946
  }
11936
11947
  const nextIndex = nextSheets.findIndex((sheet) => sheet.name === candidate);
11937
11948
  setActiveSheetIndexState(nextIndex >= 0 ? nextIndex : 0);
11938
- const nextTabIndex = _nullishCoalesce(_optionalChain([nextChartAssets, 'optionalAccess', _1060 => _1060.tabs, 'access', _1061 => _1061.findIndex, 'call', _1062 => _1062((tab) => tab.kind === "sheet" && tab.name === candidate)]), () => ( -1));
11949
+ const nextTabIndex = _nullishCoalesce(_optionalChain([nextChartAssets, 'optionalAccess', _1061 => _1061.tabs, 'access', _1062 => _1062.findIndex, 'call', _1063 => _1063((tab) => tab.kind === "sheet" && tab.name === candidate)]), () => ( -1));
11939
11950
  if (nextTabIndex >= 0) {
11940
11951
  setActiveTabIndexState(nextTabIndex);
11941
11952
  }
@@ -11961,11 +11972,11 @@ function useXlsxViewerController(options) {
11961
11972
  }
11962
11973
  const nextSheets = buildSheetList(
11963
11974
  workbook,
11964
- _optionalChain([imageAssetsRef, 'access', _1063 => _1063.current, 'optionalAccess', _1064 => _1064.sheetStatesByWorkbookSheetIndex]),
11965
- _optionalChain([imageAssetsRef, 'access', _1065 => _1065.current, 'optionalAccess', _1066 => _1066.themePalette]),
11966
- _optionalChain([imageAssetsRef, 'access', _1067 => _1067.current, 'optionalAccess', _1068 => _1068.styleById]),
11967
- _optionalChain([imageAssetsRef, 'access', _1069 => _1069.current, 'optionalAccess', _1070 => _1070.namedCellStyleByName]),
11968
- _optionalChain([imageAssetsRef, 'access', _1071 => _1071.current, 'optionalAccess', _1072 => _1072.tableStyleByName]),
11975
+ _optionalChain([imageAssetsRef, 'access', _1064 => _1064.current, 'optionalAccess', _1065 => _1065.sheetStatesByWorkbookSheetIndex]),
11976
+ _optionalChain([imageAssetsRef, 'access', _1066 => _1066.current, 'optionalAccess', _1067 => _1067.themePalette]),
11977
+ _optionalChain([imageAssetsRef, 'access', _1068 => _1068.current, 'optionalAccess', _1069 => _1069.styleById]),
11978
+ _optionalChain([imageAssetsRef, 'access', _1070 => _1070.current, 'optionalAccess', _1071 => _1071.namedCellStyleByName]),
11979
+ _optionalChain([imageAssetsRef, 'access', _1072 => _1072.current, 'optionalAccess', _1073 => _1073.tableStyleByName]),
11969
11980
  showHiddenSheets
11970
11981
  );
11971
11982
  setSheets(nextSheets);
@@ -11993,7 +12004,7 @@ function useXlsxViewerController(options) {
11993
12004
  }, [readOnly, recordHistoryBeforeMutation, selection, workbook]);
11994
12005
  const pasteText = _chunkOGZ6ROZCcjs.q.call(void 0, (text) => {
11995
12006
  const worksheet = getActiveWorksheet();
11996
- const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _1073 => _1073.start]))), () => ( null));
12007
+ const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _1074 => _1074.start]))), () => ( null));
11997
12008
  if (readOnly || !worksheet || !workbook || !targetCell || !text) {
11998
12009
  return false;
11999
12010
  }
@@ -12061,7 +12072,7 @@ function useXlsxViewerController(options) {
12061
12072
  }, [activeCell, captureCellMutationState, getActiveWorksheet, locale, maybeRecalculateWorkbook, readOnly, recordRangeEditHistory, refreshWorkbookState, selection, workbook]);
12062
12073
  const pasteStructuredClipboardData = _chunkOGZ6ROZCcjs.q.call(void 0, (serializedPayload) => {
12063
12074
  const worksheet = getActiveWorksheet();
12064
- const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _1074 => _1074.start]))), () => ( null));
12075
+ const targetCell = _nullishCoalesce(_nullishCoalesce(activeCell, () => ( _optionalChain([selection, 'optionalAccess', _1075 => _1075.start]))), () => ( null));
12065
12076
  if (readOnly || !worksheet || !workbook || !targetCell || !serializedPayload) {
12066
12077
  return false;
12067
12078
  }
@@ -14138,8 +14149,8 @@ function CellEditor({
14138
14149
  const [bounds, setBounds] = _chunkOGZ6ROZCcjs.d.call(void 0, { width: 0, height: 0 });
14139
14150
  _chunkOGZ6ROZCcjs._.call(void 0, () => {
14140
14151
  const root = rootRef.current;
14141
- const anchor = _optionalChain([root, 'optionalAccess', _1075 => _1075.parentElement]);
14142
- const viewport = _optionalChain([root, 'optionalAccess', _1076 => _1076.closest, 'call', _1077 => _1077('[role="grid"]')]);
14152
+ const anchor = _optionalChain([root, 'optionalAccess', _1076 => _1076.parentElement]);
14153
+ const viewport = _optionalChain([root, 'optionalAccess', _1077 => _1077.closest, 'call', _1078 => _1078('[role="grid"]')]);
14143
14154
  if (!root || !anchor || !viewport) {
14144
14155
  return;
14145
14156
  }
@@ -14202,8 +14213,8 @@ function CellEditor({
14202
14213
  const canvas = canvasRef.current;
14203
14214
  if (canvas && paintCanvasText) {
14204
14215
  const dpr = window.devicePixelRatio || 1;
14205
- const offsetX = (_nullishCoalesce(_optionalChain([canvasOffset, 'optionalAccess', _1078 => _1078.left]), () => ( 0))) * dpr % 1 / dpr;
14206
- const offsetY = (_nullishCoalesce(_optionalChain([canvasOffset, 'optionalAccess', _1079 => _1079.top]), () => ( 0))) * dpr % 1 / dpr;
14216
+ const offsetX = (_nullishCoalesce(_optionalChain([canvasOffset, 'optionalAccess', _1079 => _1079.left]), () => ( 0))) * dpr % 1 / dpr;
14217
+ const offsetY = (_nullishCoalesce(_optionalChain([canvasOffset, 'optionalAccess', _1080 => _1080.top]), () => ( 0))) * dpr % 1 / dpr;
14207
14218
  const width = rootRect.width / scale;
14208
14219
  const height = rootRect.height / scale;
14209
14220
  canvas.width = Math.ceil((width + offsetX) * dpr);
@@ -14214,11 +14225,11 @@ function CellEditor({
14214
14225
  canvas.style.top = `${-offsetY}px`;
14215
14226
  const context = canvas.getContext("2d");
14216
14227
  if (context) {
14217
- const node = _optionalChain([plainTextRef, 'access', _1080 => _1080.current, 'optionalAccess', _1081 => _1081.firstChild]);
14228
+ const node = _optionalChain([plainTextRef, 'access', _1081 => _1081.current, 'optionalAccess', _1082 => _1082.firstChild]);
14218
14229
  const lines = [];
14219
14230
  if (node) {
14220
14231
  const range = document.createRange();
14221
- const length = _nullishCoalesce(_optionalChain([node, 'access', _1082 => _1082.textContent, 'optionalAccess', _1083 => _1083.length]), () => ( 0));
14232
+ const length = _nullishCoalesce(_optionalChain([node, 'access', _1083 => _1083.textContent, 'optionalAccess', _1084 => _1084.length]), () => ( 0));
14222
14233
  let start = 0;
14223
14234
  while (start < length) {
14224
14235
  range.setStart(node, start);
@@ -14402,11 +14413,11 @@ function createMergedRangeLookup(ranges) {
14402
14413
  bounds: {
14403
14414
  start: {
14404
14415
  row: normalizedRanges[start].start.row,
14405
- col: Math.min(range.start.col, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1084 => _1084.bounds, 'access', _1085 => _1085.start, 'access', _1086 => _1086.col]), () => ( Infinity)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1087 => _1087.bounds, 'access', _1088 => _1088.start, 'access', _1089 => _1089.col]), () => ( Infinity)))
14416
+ col: Math.min(range.start.col, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1085 => _1085.bounds, 'access', _1086 => _1086.start, 'access', _1087 => _1087.col]), () => ( Infinity)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1088 => _1088.bounds, 'access', _1089 => _1089.start, 'access', _1090 => _1090.col]), () => ( Infinity)))
14406
14417
  },
14407
14418
  end: {
14408
- row: Math.max(range.end.row, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1090 => _1090.bounds, 'access', _1091 => _1091.end, 'access', _1092 => _1092.row]), () => ( -1)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1093 => _1093.bounds, 'access', _1094 => _1094.end, 'access', _1095 => _1095.row]), () => ( -1))),
14409
- col: Math.max(range.end.col, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1096 => _1096.bounds, 'access', _1097 => _1097.end, 'access', _1098 => _1098.col]), () => ( -1)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1099 => _1099.bounds, 'access', _1100 => _1100.end, 'access', _1101 => _1101.col]), () => ( -1)))
14419
+ row: Math.max(range.end.row, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1091 => _1091.bounds, 'access', _1092 => _1092.end, 'access', _1093 => _1093.row]), () => ( -1)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1094 => _1094.bounds, 'access', _1095 => _1095.end, 'access', _1096 => _1096.row]), () => ( -1))),
14420
+ col: Math.max(range.end.col, _nullishCoalesce(_optionalChain([left, 'optionalAccess', _1097 => _1097.bounds, 'access', _1098 => _1098.end, 'access', _1099 => _1099.col]), () => ( -1)), _nullishCoalesce(_optionalChain([right, 'optionalAccess', _1100 => _1100.bounds, 'access', _1101 => _1101.end, 'access', _1102 => _1102.col]), () => ( -1)))
14410
14421
  }
14411
14422
  }
14412
14423
  };
@@ -14544,7 +14555,7 @@ function XlsxContextMenu({
14544
14555
  const [location, setLocation] = _chunkOGZ6ROZCcjs.d.call(void 0, position);
14545
14556
  const modifier = typeof navigator !== "undefined" && /Mac|iPhone|iPad/.test(navigator.platform) ? "\u2318" : "Ctrl+";
14546
14557
  const table = controller.tables.find(({ start, end }) => context.cell.row >= start.row && context.cell.row <= end.row && context.cell.col >= start.col && context.cell.col <= end.col);
14547
- const range = expandHighlightedRange(context.selection, _nullishCoalesce(_optionalChain([controller, 'access', _1102 => _1102.activeSheet, 'optionalAccess', _1103 => _1103.mergedRanges]), () => ( [])));
14558
+ const range = expandHighlightedRange(context.selection, _nullishCoalesce(_optionalChain([controller, 'access', _1103 => _1103.activeSheet, 'optionalAccess', _1104 => _1104.mergedRanges]), () => ( [])));
14548
14559
  const multiple = range.start.row !== range.end.row || range.start.col !== range.end.col;
14549
14560
  const actions = [
14550
14561
  ...!controller.readOnly ? [{ id: "cut", label: "Cut" }] : [],
@@ -14587,7 +14598,7 @@ function XlsxContextMenu({
14587
14598
  _chunkOGZ6ROZCcjs.h.call(void 0, () => {
14588
14599
  aliveRef.current = true;
14589
14600
  const outside = (event) => {
14590
- if (!_optionalChain([rootRef, 'access', _1104 => _1104.current, 'optionalAccess', _1105 => _1105.contains, 'call', _1106 => _1106(event.target)])) closeMenu(false);
14601
+ if (!_optionalChain([rootRef, 'access', _1105 => _1105.current, 'optionalAccess', _1106 => _1106.contains, 'call', _1107 => _1107(event.target)])) closeMenu(false);
14591
14602
  };
14592
14603
  const dismiss = () => closeMenu(false);
14593
14604
  document.addEventListener("pointerdown", outside, true);
@@ -14735,7 +14746,7 @@ function XlsxContextMenu({
14735
14746
  closeMenu();
14736
14747
  return;
14737
14748
  }
14738
- const items = Array.from(_nullishCoalesce(_optionalChain([rootRef, 'access', _1107 => _1107.current, 'optionalAccess', _1108 => _1108.querySelectorAll, 'call', _1109 => _1109('[role="menuitem"]:not(:disabled):not([aria-disabled="true"])')]), () => ( [])));
14749
+ const items = Array.from(_nullishCoalesce(_optionalChain([rootRef, 'access', _1108 => _1108.current, 'optionalAccess', _1109 => _1109.querySelectorAll, 'call', _1110 => _1110('[role="menuitem"]:not(:disabled):not([aria-disabled="true"])')]), () => ( [])));
14739
14750
  const current = items.indexOf(document.activeElement);
14740
14751
  let next;
14741
14752
  if (event.key === "ArrowDown") next = (current + 1) % items.length;
@@ -14744,7 +14755,7 @@ function XlsxContextMenu({
14744
14755
  if (event.key === "End") next = items.length - 1;
14745
14756
  if (next !== void 0) {
14746
14757
  event.preventDefault();
14747
- _optionalChain([items, 'access', _1110 => _1110[next], 'optionalAccess', _1111 => _1111.focus, 'call', _1112 => _1112()]);
14758
+ _optionalChain([items, 'access', _1111 => _1111[next], 'optionalAccess', _1112 => _1112.focus, 'call', _1113 => _1113()]);
14748
14759
  }
14749
14760
  },
14750
14761
  ref: rootRef,
@@ -14831,7 +14842,7 @@ function preloadChartRenderers(chartsBySheet, experimentalOfficeCharts) {
14831
14842
  for (const chart of charts) {
14832
14843
  const source = chart.renderSource;
14833
14844
  hasSharedCharts ||= Boolean(source && !source.experimental);
14834
- hasExtendedCharts ||= Boolean(_optionalChain([source, 'optionalAccess', _1113 => _1113.experimental]));
14845
+ hasExtendedCharts ||= Boolean(_optionalChain([source, 'optionalAccess', _1114 => _1114.experimental]));
14835
14846
  }
14836
14847
  }
14837
14848
  if (experimentalOfficeCharts && (hasExtendedCharts || hasSharedCharts)) void suppliedOfficeChartRenderer.load().catch(() => {
@@ -15527,7 +15538,7 @@ function parseCanvasGradientStops(value) {
15527
15538
  if (!match) {
15528
15539
  return null;
15529
15540
  }
15530
- const color = _optionalChain([match, 'access', _1114 => _1114[1], 'optionalAccess', _1115 => _1115.trim, 'call', _1116 => _1116()]);
15541
+ const color = _optionalChain([match, 'access', _1115 => _1115[1], 'optionalAccess', _1116 => _1116.trim, 'call', _1117 => _1117()]);
15531
15542
  const percent = match[2] ? Number.parseFloat(match[2]) : Number.NaN;
15532
15543
  if (!color) {
15533
15544
  return null;
@@ -15543,7 +15554,7 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
15543
15554
  if (linearMatch) {
15544
15555
  const parts = splitCssGradientArgs(_nullishCoalesce(linearMatch[1], () => ( "")));
15545
15556
  if (parts.length >= 2) {
15546
- const rawAngle = _nullishCoalesce(_optionalChain([parts, 'access', _1117 => _1117[0], 'optionalAccess', _1118 => _1118.trim, 'call', _1119 => _1119()]), () => ( "180deg"));
15557
+ const rawAngle = _nullishCoalesce(_optionalChain([parts, 'access', _1118 => _1118[0], 'optionalAccess', _1119 => _1119.trim, 'call', _1120 => _1120()]), () => ( "180deg"));
15547
15558
  const angleMatch = rawAngle.match(/(-?\d*\.?\d+)deg/i);
15548
15559
  const cssAngle = angleMatch ? Number.parseFloat(_nullishCoalesce(angleMatch[1], () => ( "180"))) : 180;
15549
15560
  const radians = (90 - cssAngle) * Math.PI / 180;
@@ -15573,7 +15584,7 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
15573
15584
  const radialMatch = backgroundImage.match(/^radial-gradient\((.*)\)$/i);
15574
15585
  if (radialMatch) {
15575
15586
  const parts = splitCssGradientArgs(_nullishCoalesce(radialMatch[1], () => ( "")));
15576
- const stopParts = _optionalChain([parts, 'access', _1120 => _1120[0], 'optionalAccess', _1121 => _1121.startsWith, 'call', _1122 => _1122("circle")]) ? parts.slice(1) : parts;
15587
+ const stopParts = _optionalChain([parts, 'access', _1121 => _1121[0], 'optionalAccess', _1122 => _1122.startsWith, 'call', _1123 => _1123("circle")]) ? parts.slice(1) : parts;
15577
15588
  const gradient = context.createRadialGradient(
15578
15589
  rect.left + rect.width / 2,
15579
15590
  rect.top + rect.height / 2,
@@ -15751,7 +15762,7 @@ function resolveDarkModeSurface(themePalette, palette) {
15751
15762
  return "hsl(225 4% 6%)";
15752
15763
  }
15753
15764
  function resolveSheetSurface(sheet, palette) {
15754
- return paletteIsDark(palette) ? resolveDarkModeSurface(_optionalChain([sheet, 'optionalAccess', _1123 => _1123.themePalette]), palette) : _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1124 => _1124.themePalette, 'access', _1125 => _1125.colorsByIndex, 'access', _1126 => _1126[0]]), () => ( SHEET_SURFACE));
15765
+ return paletteIsDark(palette) ? resolveDarkModeSurface(_optionalChain([sheet, 'optionalAccess', _1124 => _1124.themePalette]), palette) : _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1125 => _1125.themePalette, 'access', _1126 => _1126.colorsByIndex, 'access', _1127 => _1127[0]]), () => ( SHEET_SURFACE));
15755
15766
  }
15756
15767
  function normalizeRange2(range) {
15757
15768
  return {
@@ -15950,7 +15961,7 @@ function buildVisibleAxisIndices(precomputed, displayLimit, maxUsedIndex, hidden
15950
15961
  const visible2 = [];
15951
15962
  const usedLimit = Math.min(displayLimit, Math.max(0, maxUsedIndex + 1));
15952
15963
  for (let index = 0; index < usedLimit; index += 1) {
15953
- if (!_optionalChain([hiddenIndices, 'optionalAccess', _1127 => _1127.has, 'call', _1128 => _1128(index)])) {
15964
+ if (!_optionalChain([hiddenIndices, 'optionalAccess', _1128 => _1128.has, 'call', _1129 => _1129(index)])) {
15954
15965
  visible2.push(index);
15955
15966
  }
15956
15967
  }
@@ -15984,31 +15995,31 @@ function resolveAxisStartOffset(actualIndex, actualIndices, sizes, indexByActual
15984
15995
  if (actualPrefixSums && actualIndex >= 0 && actualIndex < actualPrefixSums.length) {
15985
15996
  return _nullishCoalesce(actualPrefixSums[actualIndex], () => ( 0));
15986
15997
  }
15987
- const visibleIndex = _optionalChain([indexByActual, 'optionalAccess', _1129 => _1129.get, 'call', _1130 => _1130(actualIndex)]);
15998
+ const visibleIndex = _optionalChain([indexByActual, 'optionalAccess', _1130 => _1130.get, 'call', _1131 => _1131(actualIndex)]);
15988
15999
  if (visibleIndex !== void 0 && prefixSums) {
15989
16000
  return _nullishCoalesce(prefixSums[visibleIndex], () => ( 0));
15990
16001
  }
15991
16002
  return sumBeforeActualIndex(actualIndices, sizes, actualIndex);
15992
16003
  }
15993
16004
  function resolveAnchoredRect(anchor, visibleRows, visibleCols, rowHeights, colWidths, options) {
15994
- const headerHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1131 => _1131.headerHeight]), () => ( HEADER_HEIGHT));
15995
- const rowHeaderWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1132 => _1132.rowHeaderWidth]), () => ( ROW_HEADER_WIDTH));
15996
- const anchorZoomFactor = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1133 => _1133.zoomFactor]), () => ( 1));
16005
+ const headerHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1132 => _1132.headerHeight]), () => ( HEADER_HEIGHT));
16006
+ const rowHeaderWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1133 => _1133.rowHeaderWidth]), () => ( ROW_HEADER_WIDTH));
16007
+ const anchorZoomFactor = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1134 => _1134.zoomFactor]), () => ( 1));
15997
16008
  const resolveMarkerLeft = (col, colOffsetEmu) => rowHeaderWidth + resolveAxisStartOffset(
15998
16009
  col,
15999
16010
  visibleCols,
16000
16011
  colWidths,
16001
- _optionalChain([options, 'optionalAccess', _1134 => _1134.colIndexByActual]),
16002
- _optionalChain([options, 'optionalAccess', _1135 => _1135.colPrefixSums]),
16003
- _optionalChain([options, 'optionalAccess', _1136 => _1136.actualColPrefixSums])
16012
+ _optionalChain([options, 'optionalAccess', _1135 => _1135.colIndexByActual]),
16013
+ _optionalChain([options, 'optionalAccess', _1136 => _1136.colPrefixSums]),
16014
+ _optionalChain([options, 'optionalAccess', _1137 => _1137.actualColPrefixSums])
16004
16015
  ) + emuToPixels(colOffsetEmu) * anchorZoomFactor;
16005
16016
  const resolveMarkerTop = (row, rowOffsetEmu) => headerHeight + resolveAxisStartOffset(
16006
16017
  row,
16007
16018
  visibleRows,
16008
16019
  rowHeights,
16009
- _optionalChain([options, 'optionalAccess', _1137 => _1137.rowIndexByActual]),
16010
- _optionalChain([options, 'optionalAccess', _1138 => _1138.rowPrefixSums]),
16011
- _optionalChain([options, 'optionalAccess', _1139 => _1139.actualRowPrefixSums])
16020
+ _optionalChain([options, 'optionalAccess', _1138 => _1138.rowIndexByActual]),
16021
+ _optionalChain([options, 'optionalAccess', _1139 => _1139.rowPrefixSums]),
16022
+ _optionalChain([options, 'optionalAccess', _1140 => _1140.actualRowPrefixSums])
16012
16023
  ) + emuToPixels(rowOffsetEmu) * anchorZoomFactor;
16013
16024
  if (anchor.kind === "absolute") {
16014
16025
  return {
@@ -16095,15 +16106,15 @@ function rectIntersectsViewport(rect, viewport, overscan = 240) {
16095
16106
  return rectRight >= viewportLeft && rect.left <= viewportRight && rectBottom >= viewportTop && rect.top <= viewportBottom;
16096
16107
  }
16097
16108
  function resolveFrozenDrawingPane(rect, frozenRows, frozenCols, actualRowHeights, actualColWidths, freezePanes, stickyTopByRow, stickyLeftByCol, options) {
16098
- const headerHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1140 => _1140.headerHeight]), () => ( HEADER_HEIGHT));
16099
- const rowHeaderWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1141 => _1141.rowHeaderWidth]), () => ( ROW_HEADER_WIDTH));
16100
- const defaultRowHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1142 => _1142.defaultRowHeight]), () => ( DEFAULT_ROW_HEIGHT2));
16101
- const defaultColWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1143 => _1143.defaultColWidth]), () => ( DEFAULT_COL_WIDTH2));
16102
- const frozenPaneBottom = _optionalChain([freezePanes, 'optionalAccess', _1144 => _1144.row]) && freezePanes.row > 0 && frozenRows.length > 0 ? frozenRows.reduce(
16109
+ const headerHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1141 => _1141.headerHeight]), () => ( HEADER_HEIGHT));
16110
+ const rowHeaderWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1142 => _1142.rowHeaderWidth]), () => ( ROW_HEADER_WIDTH));
16111
+ const defaultRowHeight = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1143 => _1143.defaultRowHeight]), () => ( DEFAULT_ROW_HEIGHT2));
16112
+ const defaultColWidth = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1144 => _1144.defaultColWidth]), () => ( DEFAULT_COL_WIDTH2));
16113
+ const frozenPaneBottom = _optionalChain([freezePanes, 'optionalAccess', _1145 => _1145.row]) && freezePanes.row > 0 && frozenRows.length > 0 ? frozenRows.reduce(
16103
16114
  (max, row) => Math.max(max, (_nullishCoalesce(stickyTopByRow.get(row), () => ( headerHeight))) + (_nullishCoalesce(actualRowHeights[row], () => ( defaultRowHeight)))),
16104
16115
  headerHeight
16105
16116
  ) : null;
16106
- const frozenPaneRight = _optionalChain([freezePanes, 'optionalAccess', _1145 => _1145.col]) && freezePanes.col > 0 && frozenCols.length > 0 ? frozenCols.reduce(
16117
+ const frozenPaneRight = _optionalChain([freezePanes, 'optionalAccess', _1146 => _1146.col]) && freezePanes.col > 0 && frozenCols.length > 0 ? frozenCols.reduce(
16107
16118
  (max, col) => Math.max(max, (_nullishCoalesce(stickyLeftByCol.get(col), () => ( rowHeaderWidth))) + (_nullishCoalesce(actualColWidths[col], () => ( defaultColWidth)))),
16108
16119
  rowHeaderWidth
16109
16120
  ) : null;
@@ -16121,9 +16132,9 @@ function resolveFrozenDrawingPane(rect, frozenRows, frozenCols, actualRowHeights
16121
16132
  return "scroll";
16122
16133
  }
16123
16134
  function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
16124
- const borderWidth = _optionalChain([shape, 'access', _1146 => _1146.stroke, 'optionalAccess', _1147 => _1147.none]) ? 0 : Math.max(0, _nullishCoalesce(_optionalChain([shape, 'access', _1148 => _1148.stroke, 'optionalAccess', _1149 => _1149.widthPx]), () => ( 0))) * viewerScale;
16125
- const strokeColor = _nullishCoalesce(_optionalChain([shape, 'access', _1150 => _1150.stroke, 'optionalAccess', _1151 => _1151.color]), () => ( "transparent"));
16126
- const fillColor = _optionalChain([shape, 'access', _1152 => _1152.fill, 'optionalAccess', _1153 => _1153.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1154 => _1154.fill, 'optionalAccess', _1155 => _1155.color]), () => ( "transparent"));
16135
+ const borderWidth = _optionalChain([shape, 'access', _1147 => _1147.stroke, 'optionalAccess', _1148 => _1148.none]) ? 0 : Math.max(0, _nullishCoalesce(_optionalChain([shape, 'access', _1149 => _1149.stroke, 'optionalAccess', _1150 => _1150.widthPx]), () => ( 0))) * viewerScale;
16136
+ const strokeColor = _nullishCoalesce(_optionalChain([shape, 'access', _1151 => _1151.stroke, 'optionalAccess', _1152 => _1152.color]), () => ( "transparent"));
16137
+ const fillColor = _optionalChain([shape, 'access', _1153 => _1153.fill, 'optionalAccess', _1154 => _1154.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1155 => _1155.fill, 'optionalAccess', _1156 => _1156.color]), () => ( "transparent"));
16127
16138
  const hasVisibleText = shape.paragraphs.some((paragraph) => paragraph.runs.some((run) => run.text.trim().length > 0));
16128
16139
  const transformParts = [
16129
16140
  shape.rotationDeg ? `rotate(${shape.rotationDeg}deg)` : "",
@@ -16137,7 +16148,7 @@ function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
16137
16148
  borderRadius = 12 * viewerScale;
16138
16149
  }
16139
16150
  return {
16140
- alignItems: _optionalChain([shape, 'access', _1156 => _1156.textBox, 'optionalAccess', _1157 => _1157.verticalAlign]) === "middle" ? "center" : _optionalChain([shape, 'access', _1158 => _1158.textBox, 'optionalAccess', _1159 => _1159.verticalAlign]) === "bottom" ? "flex-end" : "flex-start",
16151
+ alignItems: _optionalChain([shape, 'access', _1157 => _1157.textBox, 'optionalAccess', _1158 => _1158.verticalAlign]) === "middle" ? "center" : _optionalChain([shape, 'access', _1159 => _1159.textBox, 'optionalAccess', _1160 => _1160.verticalAlign]) === "bottom" ? "flex-end" : "flex-start",
16141
16152
  backgroundColor: fillColor,
16142
16153
  border: borderWidth > 0 ? `${borderWidth}px solid ${strokeColor}` : "none",
16143
16154
  borderRadius,
@@ -16147,7 +16158,7 @@ function buildShapeContainerStyle(shape, rect, viewerScale = 1) {
16147
16158
  height: rect.height,
16148
16159
  justifyContent: "flex-start",
16149
16160
  left: rect.left,
16150
- opacity: Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _1160 => _1160.fill, 'optionalAccess', _1161 => _1161.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _1162 => _1162.stroke, 'optionalAccess', _1163 => _1163.opacity]), () => ( 1))),
16161
+ opacity: Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _1161 => _1161.fill, 'optionalAccess', _1162 => _1162.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _1163 => _1163.stroke, 'optionalAccess', _1164 => _1164.opacity]), () => ( 1))),
16151
16162
  overflow: hasVisibleText ? "hidden" : "visible",
16152
16163
  position: "absolute",
16153
16164
  top: rect.top,
@@ -16164,7 +16175,7 @@ function clampPercent(value, fallback) {
16164
16175
  return Math.max(0, Math.min(100, value));
16165
16176
  }
16166
16177
  function resolveShapeAdjustment(shape, name, fallback) {
16167
- const rawValue = _optionalChain([shape, 'access', _1164 => _1164.geometryAdjustments, 'optionalAccess', _1165 => _1165[name]]);
16178
+ const rawValue = _optionalChain([shape, 'access', _1165 => _1165.geometryAdjustments, 'optionalAccess', _1166 => _1166[name]]);
16168
16179
  if (typeof rawValue !== "number") {
16169
16180
  return fallback;
16170
16181
  }
@@ -17101,9 +17112,9 @@ function renderShapeParagraph(paragraph, index, fallbackAlign = "left", textScal
17101
17112
  );
17102
17113
  }
17103
17114
  function clampImageRect(rect, options) {
17104
- const contentOffsetLeft = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1166 => _1166.contentOffsetLeft]), () => ( ROW_HEADER_WIDTH));
17105
- const contentOffsetTop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1167 => _1167.contentOffsetTop]), () => ( HEADER_HEIGHT));
17106
- const minSizePx = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1168 => _1168.minSizePx]), () => ( IMAGE_MIN_SIZE_PX));
17115
+ const contentOffsetLeft = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1167 => _1167.contentOffsetLeft]), () => ( ROW_HEADER_WIDTH));
17116
+ const contentOffsetTop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1168 => _1168.contentOffsetTop]), () => ( HEADER_HEIGHT));
17117
+ const minSizePx = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1169 => _1169.minSizePx]), () => ( IMAGE_MIN_SIZE_PX));
17107
17118
  return {
17108
17119
  height: Math.max(minSizePx, rect.height),
17109
17120
  left: Math.max(contentOffsetLeft, rect.left),
@@ -17354,24 +17365,24 @@ function escapeCssFontFamily(name) {
17354
17365
  return /[\s"'(),]/.test(name) ? `"${name.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"` : name;
17355
17366
  }
17356
17367
  function resolveSpreadsheetThemeFont(font, themePalette) {
17357
- const scheme = typeof _optionalChain([font, 'optionalAccess', _1169 => _1169.scheme]) === "string" ? font.scheme : null;
17368
+ const scheme = typeof _optionalChain([font, 'optionalAccess', _1170 => _1170.scheme]) === "string" ? font.scheme : null;
17358
17369
  if (scheme === "major") {
17359
- return _optionalChain([themePalette, 'optionalAccess', _1170 => _1170.majorLatinFont]);
17370
+ return _optionalChain([themePalette, 'optionalAccess', _1171 => _1171.majorLatinFont]);
17360
17371
  }
17361
17372
  if (scheme === "minor") {
17362
- return _optionalChain([themePalette, 'optionalAccess', _1171 => _1171.minorLatinFont]);
17373
+ return _optionalChain([themePalette, 'optionalAccess', _1172 => _1172.minorLatinFont]);
17363
17374
  }
17364
17375
  return void 0;
17365
17376
  }
17366
17377
  function buildSpreadsheetFontFamily(font, themePalette) {
17367
17378
  const candidates = [
17368
- typeof _optionalChain([font, 'optionalAccess', _1172 => _1172.name]) === "string" ? font.name.trim() : "",
17369
- _nullishCoalesce(_optionalChain([resolveSpreadsheetThemeFont, 'call', _1173 => _1173(font, themePalette), 'optionalAccess', _1174 => _1174.trim, 'call', _1175 => _1175()]), () => ( ""))
17379
+ typeof _optionalChain([font, 'optionalAccess', _1173 => _1173.name]) === "string" ? font.name.trim() : "",
17380
+ _nullishCoalesce(_optionalChain([resolveSpreadsheetThemeFont, 'call', _1174 => _1174(font, themePalette), 'optionalAccess', _1175 => _1175.trim, 'call', _1176 => _1176()]), () => ( ""))
17370
17381
  ].filter((value, index, array) => value.length > 0 && array.indexOf(value) === index);
17371
17382
  if (candidates.length === 0) {
17372
17383
  return void 0;
17373
17384
  }
17374
- const primaryFont = _optionalChain([candidates, 'access', _1176 => _1176[0], 'optionalAccess', _1177 => _1177.toLowerCase, 'call', _1178 => _1178()]);
17385
+ const primaryFont = _optionalChain([candidates, 'access', _1177 => _1177[0], 'optionalAccess', _1178 => _1178.toLowerCase, 'call', _1179 => _1179()]);
17375
17386
  if (primaryFont === "calibri") {
17376
17387
  return [
17377
17388
  "Calibri",
@@ -17404,17 +17415,17 @@ function resolveSpreadsheetLineHeight(fontSizePt) {
17404
17415
  }
17405
17416
  function buildGridlineShadow(color, options) {
17406
17417
  const parts = [];
17407
- if (_optionalChain([options, 'optionalAccess', _1179 => _1179.right]) !== false) {
17418
+ if (_optionalChain([options, 'optionalAccess', _1180 => _1180.right]) !== false) {
17408
17419
  parts.push(`inset -1px 0 0 ${color}`);
17409
17420
  }
17410
- if (_optionalChain([options, 'optionalAccess', _1180 => _1180.bottom]) !== false) {
17421
+ if (_optionalChain([options, 'optionalAccess', _1181 => _1181.bottom]) !== false) {
17411
17422
  parts.push(`inset 0 -1px 0 ${color}`);
17412
17423
  }
17413
17424
  return parts.join(", ");
17414
17425
  }
17415
17426
  function buildCellStyle(style, palette, themePalette, options) {
17416
- const showGridLines = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1181 => _1181.showGridLines]), () => ( true));
17417
- const baseSurface = paletteIsDark(palette) ? resolveDarkModeSurface(themePalette, palette) : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _1182 => _1182.colorsByIndex, 'access', _1183 => _1183[0]]), () => ( SHEET_SURFACE));
17427
+ const showGridLines = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1182 => _1182.showGridLines]), () => ( true));
17428
+ const baseSurface = paletteIsDark(palette) ? resolveDarkModeSurface(themePalette, palette) : _nullishCoalesce(_optionalChain([themePalette, 'optionalAccess', _1183 => _1183.colorsByIndex, 'access', _1184 => _1184[0]]), () => ( SHEET_SURFACE));
17418
17429
  const gridlineShadow = showGridLines ? buildGridlineShadow(palette.border) : void 0;
17419
17430
  const css = {
17420
17431
  backgroundColor: baseSurface,
@@ -17427,7 +17438,7 @@ function buildCellStyle(style, palette, themePalette, options) {
17427
17438
  lineHeight: String(resolveSpreadsheetLineHeight(11)),
17428
17439
  overflow: "hidden",
17429
17440
  padding: DEFAULT_CELL_PADDING,
17430
- textAlign: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1184 => _1184.generalAlignment]), () => ( "left")),
17441
+ textAlign: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _1185 => _1185.generalAlignment]), () => ( "left")),
17431
17442
  textOverflow: "clip",
17432
17443
  verticalAlign: "bottom",
17433
17444
  whiteSpace: "nowrap"
@@ -17511,24 +17522,24 @@ function buildCellStyle(style, palette, themePalette, options) {
17511
17522
  }
17512
17523
  const border = style.border;
17513
17524
  if (border) {
17514
- const hasRightBorder = Boolean(_optionalChain([border, 'access', _1185 => _1185.right, 'optionalAccess', _1186 => _1186.style]) && border.right.style !== "none");
17515
- const hasBottomBorder = Boolean(_optionalChain([border, 'access', _1187 => _1187.bottom, 'optionalAccess', _1188 => _1188.style]) && border.bottom.style !== "none");
17525
+ const hasRightBorder = Boolean(_optionalChain([border, 'access', _1186 => _1186.right, 'optionalAccess', _1187 => _1187.style]) && border.right.style !== "none");
17526
+ const hasBottomBorder = Boolean(_optionalChain([border, 'access', _1188 => _1188.bottom, 'optionalAccess', _1189 => _1189.style]) && border.bottom.style !== "none");
17516
17527
  if (showGridLines && (hasRightBorder || hasBottomBorder)) {
17517
17528
  css.boxShadow = buildGridlineShadow(palette.border, {
17518
17529
  bottom: !hasBottomBorder,
17519
17530
  right: !hasRightBorder
17520
17531
  }) || void 0;
17521
17532
  }
17522
- if (_optionalChain([border, 'access', _1189 => _1189.top, 'optionalAccess', _1190 => _1190.style]) && border.top.style !== "none") {
17533
+ if (_optionalChain([border, 'access', _1190 => _1190.top, 'optionalAccess', _1191 => _1191.style]) && border.top.style !== "none") {
17523
17534
  css.borderTop = mapBorder2(border.top, themePalette);
17524
17535
  }
17525
- if (_optionalChain([border, 'access', _1191 => _1191.right, 'optionalAccess', _1192 => _1192.style]) && border.right.style !== "none") {
17536
+ if (_optionalChain([border, 'access', _1192 => _1192.right, 'optionalAccess', _1193 => _1193.style]) && border.right.style !== "none") {
17526
17537
  css.borderRight = mapBorder2(border.right, themePalette);
17527
17538
  }
17528
- if (_optionalChain([border, 'access', _1193 => _1193.bottom, 'optionalAccess', _1194 => _1194.style]) && border.bottom.style !== "none") {
17539
+ if (_optionalChain([border, 'access', _1194 => _1194.bottom, 'optionalAccess', _1195 => _1195.style]) && border.bottom.style !== "none") {
17529
17540
  css.borderBottom = mapBorder2(border.bottom, themePalette);
17530
17541
  }
17531
- if (_optionalChain([border, 'access', _1195 => _1195.left, 'optionalAccess', _1196 => _1196.style]) && border.left.style !== "none") {
17542
+ if (_optionalChain([border, 'access', _1196 => _1196.left, 'optionalAccess', _1197 => _1197.style]) && border.left.style !== "none") {
17532
17543
  css.borderLeft = mapBorder2(border.left, themePalette);
17533
17544
  }
17534
17545
  }
@@ -17607,7 +17618,7 @@ function canReceiveOverflowText(data) {
17607
17618
  }
17608
17619
  function getCellDisplayValue(worksheet, row, col, activeSheet, locale = "en-US") {
17609
17620
  const formula = worksheet.getFormulaAt(row, col);
17610
- const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _1197 => _1197.cachedFormulaValues, 'optionalAccess', _1198 => _1198[cellAddressToA12({ row, col })]]) : void 0;
17621
+ const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _1198 => _1198.cachedFormulaValues, 'optionalAccess', _1199 => _1199[cellAddressToA12({ row, col })]]) : void 0;
17611
17622
  const formatted = worksheet.getFormattedValueAt(row, col);
17612
17623
  if (formatted && !(formula && cachedFormulaValue !== void 0 && formatted.startsWith("#"))) {
17613
17624
  return localizeCellNumber(worksheet, row, col, decodeHtmlEntities2(formatted), locale);
@@ -17720,13 +17731,13 @@ function resolveChartFormulaRange(formula, fallbackSheetIndex, sheets, workbook)
17720
17731
  }
17721
17732
  }
17722
17733
  const split = splitSheetFormulaReference(reference);
17723
- const range = parseA1RangeReference3((_nullishCoalesce(_optionalChain([split, 'optionalAccess', _1199 => _1199.range]), () => ( reference))).replace(/\$/g, ""));
17734
+ const range = parseA1RangeReference3((_nullishCoalesce(_optionalChain([split, 'optionalAccess', _1200 => _1200.range]), () => ( reference))).replace(/\$/g, ""));
17724
17735
  if (!range) {
17725
17736
  return null;
17726
17737
  }
17727
17738
  let workbookSheetIndex = fallbackSheetIndex;
17728
- if (_optionalChain([split, 'optionalAccess', _1200 => _1200.sheetName])) {
17729
- const workbookResolvedIndex = _optionalChain([workbook, 'optionalAccess', _1201 => _1201.sheetIndex, 'call', _1202 => _1202(split.sheetName)]);
17739
+ if (_optionalChain([split, 'optionalAccess', _1201 => _1201.sheetName])) {
17740
+ const workbookResolvedIndex = _optionalChain([workbook, 'optionalAccess', _1202 => _1202.sheetIndex, 'call', _1203 => _1203(split.sheetName)]);
17730
17741
  if (typeof workbookResolvedIndex === "number" && Number.isInteger(workbookResolvedIndex) && workbookResolvedIndex >= 0) {
17731
17742
  workbookSheetIndex = workbookResolvedIndex;
17732
17743
  } else {
@@ -17747,26 +17758,26 @@ function collectChartRangeHighlights(chart, selectedElement, sheets, workbook, i
17747
17758
  }
17748
17759
  const highlights = [];
17749
17760
  const seenRanges = /* @__PURE__ */ new Set();
17750
- const selectedSeriesIndex = _optionalChain([selectedElement, 'optionalAccess', _1203 => _1203.chartId]) === chart.id && selectedElement.kind !== "chart" && selectedElement.kind !== "legend" ? selectedElement.seriesIndex : null;
17761
+ const selectedSeriesIndex = _optionalChain([selectedElement, 'optionalAccess', _1204 => _1204.chartId]) === chart.id && selectedElement.kind !== "chart" && selectedElement.kind !== "legend" ? selectedElement.seriesIndex : null;
17751
17762
  const seriesEntries = chart.series.map((series, seriesIndex) => ({ series, seriesIndex })).filter(({ series, seriesIndex }) => series.hidden !== true && (selectedSeriesIndex == null || seriesIndex === selectedSeriesIndex));
17752
17763
  const references = seriesEntries.flatMap(({ series, seriesIndex }) => [
17753
17764
  {
17754
- formula: typeof _optionalChain([series, 'access', _1204 => _1204.raw, 'optionalAccess', _1205 => _1205.name]) === "string" ? series.raw.name : void 0,
17765
+ formula: typeof _optionalChain([series, 'access', _1205 => _1205.raw, 'optionalAccess', _1206 => _1206.name]) === "string" ? series.raw.name : void 0,
17755
17766
  role: "name",
17756
17767
  seriesIndex
17757
17768
  },
17758
17769
  {
17759
- formula: _optionalChain([series, 'access', _1206 => _1206.categoriesRef, 'optionalAccess', _1207 => _1207.formula]),
17770
+ formula: _optionalChain([series, 'access', _1207 => _1207.categoriesRef, 'optionalAccess', _1208 => _1208.formula]),
17760
17771
  role: "category",
17761
17772
  seriesIndex
17762
17773
  },
17763
17774
  {
17764
- formula: _optionalChain([series, 'access', _1208 => _1208.valuesRef, 'optionalAccess', _1209 => _1209.formula]),
17775
+ formula: _optionalChain([series, 'access', _1209 => _1209.valuesRef, 'optionalAccess', _1210 => _1210.formula]),
17765
17776
  role: "value",
17766
17777
  seriesIndex
17767
17778
  },
17768
17779
  {
17769
- formula: _optionalChain([series, 'access', _1210 => _1210.bubbleSizeRef, 'optionalAccess', _1211 => _1211.formula]),
17780
+ formula: _optionalChain([series, 'access', _1211 => _1211.bubbleSizeRef, 'optionalAccess', _1212 => _1212.formula]),
17770
17781
  role: "bubble",
17771
17782
  seriesIndex
17772
17783
  }
@@ -17938,7 +17949,7 @@ function normalizeBatchedMergeSpan(value) {
17938
17949
  }
17939
17950
  function normalizeBatchedCellValue(rawValue, formula, row, col, activeSheet) {
17940
17951
  const value = typeof rawValue === "string" ? decodeHtmlEntities2(rawValue) : rawValue === null || rawValue === void 0 ? "" : String(rawValue);
17941
- const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _1212 => _1212.cachedFormulaValues, 'optionalAccess', _1213 => _1213[cellAddressToA12({ row, col })]]) : void 0;
17952
+ const cachedFormulaValue = formula ? _optionalChain([activeSheet, 'optionalAccess', _1213 => _1213.cachedFormulaValues, 'optionalAccess', _1214 => _1214[cellAddressToA12({ row, col })]]) : void 0;
17942
17953
  if (formula && cachedFormulaValue !== void 0 && value.startsWith("#")) {
17943
17954
  return cachedFormulaValue;
17944
17955
  }
@@ -17990,31 +18001,31 @@ function mergeResolvedCellStyle(base, overlay, options) {
17990
18001
  ..._nullishCoalesce(base, () => ( {})),
17991
18002
  ..._nullishCoalesce(overlay, () => ( {}))
17992
18003
  };
17993
- const baseAlignment = _optionalChain([base, 'optionalAccess', _1214 => _1214.alignment]);
17994
- const overlayAlignment = _optionalChain([overlay, 'optionalAccess', _1215 => _1215.alignment]);
18004
+ const baseAlignment = _optionalChain([base, 'optionalAccess', _1215 => _1215.alignment]);
18005
+ const overlayAlignment = _optionalChain([overlay, 'optionalAccess', _1216 => _1216.alignment]);
17995
18006
  if (baseAlignment || overlayAlignment) {
17996
18007
  nextStyle.alignment = {
17997
18008
  ..._nullishCoalesce(baseAlignment, () => ( {})),
17998
18009
  ..._nullishCoalesce(overlayAlignment, () => ( {}))
17999
18010
  };
18000
18011
  }
18001
- const baseBorder = _optionalChain([base, 'optionalAccess', _1216 => _1216.border]);
18002
- const overlayBorder = _optionalChain([overlay, 'optionalAccess', _1217 => _1217.border]);
18012
+ const baseBorder = _optionalChain([base, 'optionalAccess', _1217 => _1217.border]);
18013
+ const overlayBorder = _optionalChain([overlay, 'optionalAccess', _1218 => _1218.border]);
18003
18014
  if (baseBorder || overlayBorder) {
18004
- nextStyle.border = _optionalChain([options, 'optionalAccess', _1218 => _1218.replaceXfSubtrees]) && overlayBorder ? overlayBorder : {
18015
+ nextStyle.border = _optionalChain([options, 'optionalAccess', _1219 => _1219.replaceXfSubtrees]) && overlayBorder ? overlayBorder : {
18005
18016
  ..._nullishCoalesce(baseBorder, () => ( {})),
18006
18017
  ..._nullishCoalesce(overlayBorder, () => ( {}))
18007
18018
  };
18008
18019
  }
18009
- const baseFill = _optionalChain([base, 'optionalAccess', _1219 => _1219.fill]);
18010
- const overlayFill = _optionalChain([overlay, 'optionalAccess', _1220 => _1220.fill]);
18020
+ const baseFill = _optionalChain([base, 'optionalAccess', _1220 => _1220.fill]);
18021
+ const overlayFill = _optionalChain([overlay, 'optionalAccess', _1221 => _1221.fill]);
18011
18022
  if (baseFill || overlayFill) {
18012
- nextStyle.fill = _optionalChain([options, 'optionalAccess', _1221 => _1221.replaceXfSubtrees]) && overlayFill ? overlayFill : _nullishCoalesce(overlayFill, () => ( baseFill));
18023
+ nextStyle.fill = _optionalChain([options, 'optionalAccess', _1222 => _1222.replaceXfSubtrees]) && overlayFill ? overlayFill : _nullishCoalesce(overlayFill, () => ( baseFill));
18013
18024
  }
18014
- const baseFont = _optionalChain([base, 'optionalAccess', _1222 => _1222.font]);
18015
- const overlayFont = _optionalChain([overlay, 'optionalAccess', _1223 => _1223.font]);
18025
+ const baseFont = _optionalChain([base, 'optionalAccess', _1223 => _1223.font]);
18026
+ const overlayFont = _optionalChain([overlay, 'optionalAccess', _1224 => _1224.font]);
18016
18027
  if (baseFont || overlayFont) {
18017
- nextStyle.font = _optionalChain([options, 'optionalAccess', _1224 => _1224.replaceXfSubtrees]) && overlayFont ? overlayFont : {
18028
+ nextStyle.font = _optionalChain([options, 'optionalAccess', _1225 => _1225.replaceXfSubtrees]) && overlayFont ? overlayFont : {
18018
18029
  ..._nullishCoalesce(baseFont, () => ( {})),
18019
18030
  ..._nullishCoalesce(overlayFont, () => ( {}))
18020
18031
  };
@@ -18022,10 +18033,10 @@ function mergeResolvedCellStyle(base, overlay, options) {
18022
18033
  return nextStyle;
18023
18034
  }
18024
18035
  function resolveCellTableOverrides(rawStyle, sheet, row, col) {
18025
- const styleId = _nullishCoalesce(_nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1225 => _1225.cellStyleIds, 'optionalAccess', _1226 => _1226[cellAddressToA12({ row, col })]]), () => ( _optionalChain([sheet, 'optionalAccess', _1227 => _1227.rowStyleIds, 'access', _1228 => _1228[row]]))), () => ( _optionalChain([sheet, 'optionalAccess', _1229 => _1229.colStyleIds, 'access', _1230 => _1230[col]])));
18026
- const declared = styleId === void 0 ? void 0 : _optionalChain([sheet, 'optionalAccess', _1231 => _1231.styleById, 'access', _1232 => _1232[styleId], 'optionalAccess', _1233 => _1233.tableStyleOverrides]);
18036
+ const styleId = _nullishCoalesce(_nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1226 => _1226.cellStyleIds, 'optionalAccess', _1227 => _1227[cellAddressToA12({ row, col })]]), () => ( _optionalChain([sheet, 'optionalAccess', _1228 => _1228.rowStyleIds, 'access', _1229 => _1229[row]]))), () => ( _optionalChain([sheet, 'optionalAccess', _1230 => _1230.colStyleIds, 'access', _1231 => _1231[col]])));
18037
+ const declared = styleId === void 0 ? void 0 : _optionalChain([sheet, 'optionalAccess', _1232 => _1232.styleById, 'access', _1233 => _1233[styleId], 'optionalAccess', _1234 => _1234.tableStyleOverrides]);
18027
18038
  const overrides = {};
18028
- const font = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1234 => _1234.font]));
18039
+ const font = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1235 => _1235.font]));
18029
18040
  if (font) {
18030
18041
  const explicitFont = {};
18031
18042
  const fontDefaults = {
@@ -18038,28 +18049,28 @@ function resolveCellTableOverrides(rawStyle, sheet, row, col) {
18038
18049
  verticalAlign: "baseline"
18039
18050
  };
18040
18051
  for (const [key, value] of Object.entries(font)) {
18041
- const isExplicit = declared ? Object.hasOwn(_nullishCoalesce(declared.font, () => ( {})), key) : key === "color" ? _optionalChain([asRecord, 'call', _1235 => _1235(value), 'optionalAccess', _1236 => _1236.colorType]) !== "auto" : value !== fontDefaults[key];
18052
+ const isExplicit = declared ? Object.hasOwn(_nullishCoalesce(declared.font, () => ( {})), key) : key === "color" ? _optionalChain([asRecord, 'call', _1236 => _1236(value), 'optionalAccess', _1237 => _1237.colorType]) !== "auto" : value !== fontDefaults[key];
18042
18053
  if (isExplicit) {
18043
18054
  explicitFont[key] = value;
18044
18055
  }
18045
18056
  }
18046
18057
  overrides.font = explicitFont;
18047
18058
  }
18048
- const fill = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1237 => _1237.fill]));
18059
+ const fill = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1238 => _1238.fill]));
18049
18060
  if (fill && fill.fillType !== "none") {
18050
18061
  overrides.fill = fill;
18051
18062
  }
18052
- const border = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1238 => _1238.border]));
18063
+ const border = asRecord(_optionalChain([rawStyle, 'optionalAccess', _1239 => _1239.border]));
18053
18064
  if (border) {
18054
18065
  overrides.border = Object.fromEntries(Object.entries(border).filter(([, edge]) => {
18055
- const style = _optionalChain([asRecord, 'call', _1239 => _1239(edge), 'optionalAccess', _1240 => _1240.style]);
18066
+ const style = _optionalChain([asRecord, 'call', _1240 => _1240(edge), 'optionalAccess', _1241 => _1241.style]);
18056
18067
  return typeof style === "string" && style !== "none";
18057
18068
  }));
18058
18069
  }
18059
18070
  return overrides;
18060
18071
  }
18061
18072
  function resolveBorderEdgePriority(edge) {
18062
- const style = typeof _optionalChain([edge, 'optionalAccess', _1241 => _1241.style]) === "string" ? edge.style : "none";
18073
+ const style = typeof _optionalChain([edge, 'optionalAccess', _1242 => _1242.style]) === "string" ? edge.style : "none";
18063
18074
  const stylePriority = {
18064
18075
  dashed: 2,
18065
18076
  dashDot: 3,
@@ -18093,8 +18104,8 @@ function resolvePreferredBorderEdge(current, candidate) {
18093
18104
  return current;
18094
18105
  }
18095
18106
  function resolveMergedRegionBorderOverlay(row, col, merge, resolveBaseCellStyle) {
18096
- const rowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1242 => _1242.rowSpan]), () => ( 1)));
18097
- const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1243 => _1243.colSpan]), () => ( 1)));
18107
+ const rowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1243 => _1243.rowSpan]), () => ( 1)));
18108
+ const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1244 => _1244.colSpan]), () => ( 1)));
18098
18109
  if (rowSpan === 1 && colSpan === 1) {
18099
18110
  return null;
18100
18111
  }
@@ -18106,19 +18117,19 @@ function resolveMergedRegionBorderOverlay(row, col, merge, resolveBaseCellStyle)
18106
18117
  let left = null;
18107
18118
  for (let targetCol = col; targetCol <= endCol; targetCol += 1) {
18108
18119
  const topStyle = resolveBaseCellStyle(row, targetCol);
18109
- const topBorder = _optionalChain([topStyle, 'optionalAccess', _1244 => _1244.border]);
18110
- top = resolvePreferredBorderEdge(top, _nullishCoalesce(_optionalChain([topBorder, 'optionalAccess', _1245 => _1245.top]), () => ( null)));
18120
+ const topBorder = _optionalChain([topStyle, 'optionalAccess', _1245 => _1245.border]);
18121
+ top = resolvePreferredBorderEdge(top, _nullishCoalesce(_optionalChain([topBorder, 'optionalAccess', _1246 => _1246.top]), () => ( null)));
18111
18122
  const bottomStyle = resolveBaseCellStyle(endRow, targetCol);
18112
- const bottomBorder = _optionalChain([bottomStyle, 'optionalAccess', _1246 => _1246.border]);
18113
- bottom = resolvePreferredBorderEdge(bottom, _nullishCoalesce(_optionalChain([bottomBorder, 'optionalAccess', _1247 => _1247.bottom]), () => ( null)));
18123
+ const bottomBorder = _optionalChain([bottomStyle, 'optionalAccess', _1247 => _1247.border]);
18124
+ bottom = resolvePreferredBorderEdge(bottom, _nullishCoalesce(_optionalChain([bottomBorder, 'optionalAccess', _1248 => _1248.bottom]), () => ( null)));
18114
18125
  }
18115
18126
  for (let targetRow = row; targetRow <= endRow; targetRow += 1) {
18116
18127
  const leftStyle = resolveBaseCellStyle(targetRow, col);
18117
- const leftBorder = _optionalChain([leftStyle, 'optionalAccess', _1248 => _1248.border]);
18118
- left = resolvePreferredBorderEdge(left, _nullishCoalesce(_optionalChain([leftBorder, 'optionalAccess', _1249 => _1249.left]), () => ( null)));
18128
+ const leftBorder = _optionalChain([leftStyle, 'optionalAccess', _1249 => _1249.border]);
18129
+ left = resolvePreferredBorderEdge(left, _nullishCoalesce(_optionalChain([leftBorder, 'optionalAccess', _1250 => _1250.left]), () => ( null)));
18119
18130
  const rightStyle = resolveBaseCellStyle(targetRow, endCol);
18120
- const rightBorder = _optionalChain([rightStyle, 'optionalAccess', _1250 => _1250.border]);
18121
- right = resolvePreferredBorderEdge(right, _nullishCoalesce(_optionalChain([rightBorder, 'optionalAccess', _1251 => _1251.right]), () => ( null)));
18131
+ const rightBorder = _optionalChain([rightStyle, 'optionalAccess', _1251 => _1251.border]);
18132
+ right = resolvePreferredBorderEdge(right, _nullishCoalesce(_optionalChain([rightBorder, 'optionalAccess', _1252 => _1252.right]), () => ( null)));
18122
18133
  }
18123
18134
  const border = {};
18124
18135
  if (top) {
@@ -18177,7 +18188,7 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
18177
18188
  if (!table || !activeSheet) {
18178
18189
  return null;
18179
18190
  }
18180
- const styleName = _optionalChain([table, 'access', _1252 => _1252.styleInfo, 'optionalAccess', _1253 => _1253.name]);
18191
+ const styleName = _optionalChain([table, 'access', _1253 => _1253.styleInfo, 'optionalAccess', _1254 => _1254.name]);
18181
18192
  if (!styleName) {
18182
18193
  return null;
18183
18194
  }
@@ -18216,7 +18227,7 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
18216
18227
  resolved = mergeResolvedCellStyle(resolved, nextStyle);
18217
18228
  };
18218
18229
  applyElement("wholeTable", tableRegion);
18219
- if (isBodyRow && _optionalChain([table, 'access', _1254 => _1254.styleInfo, 'optionalAccess', _1255 => _1255.showColumnStripes])) {
18230
+ if (isBodyRow && _optionalChain([table, 'access', _1255 => _1255.styleInfo, 'optionalAccess', _1256 => _1256.showColumnStripes])) {
18220
18231
  const isFirstStripe = (col - table.start.col) % 2 === 0;
18221
18232
  applyElement(isFirstStripe ? "firstColumnStripe" : "secondColumnStripe", {
18222
18233
  endCol: col,
@@ -18225,7 +18236,7 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
18225
18236
  startRow: bodyStartRow
18226
18237
  });
18227
18238
  }
18228
- if (isBodyRow && _optionalChain([table, 'access', _1256 => _1256.styleInfo, 'optionalAccess', _1257 => _1257.showRowStripes])) {
18239
+ if (isBodyRow && _optionalChain([table, 'access', _1257 => _1257.styleInfo, 'optionalAccess', _1258 => _1258.showRowStripes])) {
18229
18240
  const isFirstStripe = (row - bodyStartRow) % 2 === 0;
18230
18241
  applyElement(isFirstStripe ? "firstRowStripe" : "secondRowStripe", {
18231
18242
  ...tableRegion,
@@ -18233,8 +18244,8 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
18233
18244
  startRow: row
18234
18245
  });
18235
18246
  }
18236
- applyElement("lastColumn", { ...tableRegion, startCol: table.end.col }, Boolean(_optionalChain([table, 'access', _1258 => _1258.styleInfo, 'optionalAccess', _1259 => _1259.showLastColumn])) && isLastColumn);
18237
- applyElement("firstColumn", { ...tableRegion, endCol: table.start.col }, Boolean(_optionalChain([table, 'access', _1260 => _1260.styleInfo, 'optionalAccess', _1261 => _1261.showFirstColumn])) && isFirstColumn);
18247
+ applyElement("lastColumn", { ...tableRegion, startCol: table.end.col }, Boolean(_optionalChain([table, 'access', _1259 => _1259.styleInfo, 'optionalAccess', _1260 => _1260.showLastColumn])) && isLastColumn);
18248
+ applyElement("firstColumn", { ...tableRegion, endCol: table.start.col }, Boolean(_optionalChain([table, 'access', _1261 => _1261.styleInfo, 'optionalAccess', _1262 => _1262.showFirstColumn])) && isFirstColumn);
18238
18249
  applyElement("headerRow", headerRegion, isHeaderRow);
18239
18250
  if (isHeaderRow && table.headerRowCellStyle) {
18240
18251
  const namedHeaderStyle = activeSheet.namedCellStyleByName[table.headerRowCellStyle];
@@ -19102,11 +19113,11 @@ function resolveConditionalFormulaComparable(formula, worksheet, sheet, batchedC
19102
19113
  return literal;
19103
19114
  }
19104
19115
  const splitReference = splitSheetFormulaReference(normalized);
19105
- const targetSheetName = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _1262 => _1262.sheetName]), () => ( null));
19106
- if (targetSheetName && _optionalChain([sheet, 'optionalAccess', _1263 => _1263.name]) && targetSheetName !== sheet.name) {
19116
+ const targetSheetName = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _1263 => _1263.sheetName]), () => ( null));
19117
+ if (targetSheetName && _optionalChain([sheet, 'optionalAccess', _1264 => _1264.name]) && targetSheetName !== sheet.name) {
19107
19118
  return literal;
19108
19119
  }
19109
- const cellRef = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _1264 => _1264.range]), () => ( normalized));
19120
+ const cellRef = _nullishCoalesce(_optionalChain([splitReference, 'optionalAccess', _1265 => _1265.range]), () => ( normalized));
19110
19121
  const cell = parseA1CellReference3(cellRef.replace(/\$/g, ""));
19111
19122
  if (!cell) {
19112
19123
  return literal;
@@ -19138,8 +19149,8 @@ function normalizeConditionalTextOperand(value) {
19138
19149
  }
19139
19150
  function resolveConditionalStyledRuleMatch(rule, numericValue, textValue, worksheet, sheet, batchedCells) {
19140
19151
  const normalizedRuleType = rule.ruleType.trim().toLowerCase();
19141
- const left = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _1265 => _1265.formulas, 'optionalAccess', _1266 => _1266[0]]), () => ( "")), worksheet, sheet, batchedCells);
19142
- const right = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _1267 => _1267.formulas, 'optionalAccess', _1268 => _1268[1]]), () => ( "")), worksheet, sheet, batchedCells);
19152
+ const left = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _1266 => _1266.formulas, 'optionalAccess', _1267 => _1267[0]]), () => ( "")), worksheet, sheet, batchedCells);
19153
+ const right = resolveConditionalFormulaComparable(_nullishCoalesce(_optionalChain([rule, 'access', _1268 => _1268.formulas, 'optionalAccess', _1269 => _1269[1]]), () => ( "")), worksheet, sheet, batchedCells);
19143
19154
  if (normalizedRuleType === "cellis") {
19144
19155
  return resolveConditionalCellIsMatch(_nullishCoalesce(rule.operator, () => ( "equal")), left, right, numericValue, textValue);
19145
19156
  }
@@ -19170,7 +19181,7 @@ function getStyledConditionalRules(rules) {
19170
19181
  return styledRules;
19171
19182
  }
19172
19183
  function resolveConditionalCellStyleForCell(row, col, sheet, readNumericValue, readTextValue, worksheet, batchedCells) {
19173
- const rules = _optionalChain([sheet, 'optionalAccess', _1269 => _1269.conditionalFormatRules]);
19184
+ const rules = _optionalChain([sheet, 'optionalAccess', _1270 => _1270.conditionalFormatRules]);
19174
19185
  if (!sheet || !rules || rules.length === 0) {
19175
19186
  return null;
19176
19187
  }
@@ -19449,7 +19460,7 @@ function resolveFormControlLabel(control) {
19449
19460
  return label.replace(/\u00a0/g, " ").replace(/^\s+/, "");
19450
19461
  }
19451
19462
  function resolveConditionalDataBarForCell(row, col, worksheet, sheet, metricsCache) {
19452
- const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1270 => _1270.conditionalFormatRules]), () => ( []));
19463
+ const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1271 => _1271.conditionalFormatRules]), () => ( []));
19453
19464
  const matchingRule = rules.find(
19454
19465
  (rule) => rule.kind === "dataBar" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
19455
19466
  );
@@ -19487,23 +19498,23 @@ function resolveConditionalDataBarForCell(row, col, worksheet, sheet, metricsCac
19487
19498
  const span = maxValue - minValue;
19488
19499
  const ratio = span === 0 ? numericValue >= maxValue ? 1 : 0 : (numericValue - minValue) / span;
19489
19500
  const widthPercent = minLength + Math.max(0, Math.min(1, ratio)) * (maxLength - minLength);
19490
- const color = resolveWorkbookColor(matchingRule.color, _optionalChain([sheet, 'optionalAccess', _1271 => _1271.themePalette]));
19501
+ const color = resolveWorkbookColor(matchingRule.color, _optionalChain([sheet, 'optionalAccess', _1272 => _1272.themePalette]));
19491
19502
  if (!color || widthPercent <= 0) {
19492
19503
  return null;
19493
19504
  }
19494
19505
  return {
19495
- axisColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess', _1272 => _1272.themePalette])), () => ( void 0)),
19506
+ axisColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.axisColor, _optionalChain([sheet, 'optionalAccess', _1273 => _1273.themePalette])), () => ( void 0)),
19496
19507
  border: _nullishCoalesce(matchingRule.border, () => ( void 0)),
19497
- borderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess', _1273 => _1273.themePalette])), () => ( void 0)),
19508
+ borderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.borderColor, _optionalChain([sheet, 'optionalAccess', _1274 => _1274.themePalette])), () => ( void 0)),
19498
19509
  color,
19499
19510
  gradient: _nullishCoalesce(matchingRule.gradient, () => ( void 0)),
19500
- negativeBorderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess', _1274 => _1274.themePalette])), () => ( void 0)),
19501
- negativeFillColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess', _1275 => _1275.themePalette])), () => ( void 0)),
19511
+ negativeBorderColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeBorderColor, _optionalChain([sheet, 'optionalAccess', _1275 => _1275.themePalette])), () => ( void 0)),
19512
+ negativeFillColor: _nullishCoalesce(resolveWorkbookColor(matchingRule.negativeFillColor, _optionalChain([sheet, 'optionalAccess', _1276 => _1276.themePalette])), () => ( void 0)),
19502
19513
  widthPercent
19503
19514
  };
19504
19515
  }
19505
19516
  function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metricsCache) {
19506
- const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1276 => _1276.conditionalFormatRules]), () => ( []));
19517
+ const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1277 => _1277.conditionalFormatRules]), () => ( []));
19507
19518
  const matchingRule = rules.find(
19508
19519
  (rule) => rule.kind === "colorScale" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
19509
19520
  );
@@ -19531,7 +19542,7 @@ function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metrics
19531
19542
  });
19532
19543
  metricsCache.set(cacheKey, ruleValues);
19533
19544
  }
19534
- const colors = matchingRule.colors.map((color) => resolveWorkbookColor(color, _optionalChain([sheet, 'optionalAccess', _1277 => _1277.themePalette]))).filter((color) => typeof color === "string");
19545
+ const colors = matchingRule.colors.map((color) => resolveWorkbookColor(color, _optionalChain([sheet, 'optionalAccess', _1278 => _1278.themePalette]))).filter((color) => typeof color === "string");
19535
19546
  const thresholds = matchingRule.cfvos.map((threshold) => resolveConditionalRuleThreshold(threshold, ruleValues)).filter((value) => typeof value === "number" && Number.isFinite(value));
19536
19547
  if (colors.length < 2 || thresholds.length < 2) {
19537
19548
  return null;
@@ -19550,7 +19561,7 @@ function resolveConditionalColorScaleForCell(row, col, worksheet, sheet, metrics
19550
19561
  return { color: resolvedColor };
19551
19562
  }
19552
19563
  function resolveConditionalIconForCell(row, col, worksheet, sheet, metricsCache) {
19553
- const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1278 => _1278.conditionalFormatRules]), () => ( []));
19564
+ const rules = _nullishCoalesce(_optionalChain([sheet, 'optionalAccess', _1279 => _1279.conditionalFormatRules]), () => ( []));
19554
19565
  const matchingRule = rules.find(
19555
19566
  (rule) => rule.kind === "iconSet" && rule.ranges.some((range) => isCellInRange({ row, col }, range))
19556
19567
  );
@@ -19590,7 +19601,7 @@ function resolveConditionalIconForCell(row, col, worksheet, sheet, metricsCache)
19590
19601
  return icon ? buildConditionalIcon(icon.iconSet, icon.iconId) : null;
19591
19602
  }
19592
19603
  function resolveCellDataValidation(row, col, sheet) {
19593
- const validation = _optionalChain([sheet, 'optionalAccess', _1279 => _1279.dataValidations, 'access', _1280 => _1280.find, 'call', _1281 => _1281((entry) => entry.ranges.some((range) => isCellInRange({ row, col }, range)))]);
19604
+ const validation = _optionalChain([sheet, 'optionalAccess', _1280 => _1280.dataValidations, 'access', _1281 => _1281.find, 'call', _1282 => _1282((entry) => entry.ranges.some((range) => isCellInRange({ row, col }, range)))]);
19594
19605
  if (!validation) {
19595
19606
  return null;
19596
19607
  }
@@ -19881,7 +19892,7 @@ function GridRow({
19881
19892
  whiteSpace: "nowrap",
19882
19893
  width: "max-content"
19883
19894
  } : null;
19884
- const title = [_optionalChain([cellData, 'access', _1282 => _1282.hyperlink, 'optionalAccess', _1283 => _1283.tooltip]), _optionalChain([cellData, 'access', _1284 => _1284.validation, 'optionalAccess', _1285 => _1285.message]), cellData.value].filter((value, index, values) => typeof value === "string" && value.length > 0 && values.indexOf(value) === index).join("\n");
19895
+ const title = [_optionalChain([cellData, 'access', _1283 => _1283.hyperlink, 'optionalAccess', _1284 => _1284.tooltip]), _optionalChain([cellData, 'access', _1285 => _1285.validation, 'optionalAccess', _1286 => _1286.message]), cellData.value].filter((value, index, values) => typeof value === "string" && value.length > 0 && values.indexOf(value) === index).join("\n");
19885
19896
  return /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0,
19886
19897
  "td",
19887
19898
  {
@@ -20068,8 +20079,8 @@ var MemoGridRow = _chunkOGZ6ROZCcjs.N.call(void 0, GridRow, (prev, next) => {
20068
20079
  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) {
20069
20080
  return false;
20070
20081
  }
20071
- const prevEditingCol = _optionalChain([prev, 'access', _1286 => _1286.editingCell, 'optionalAccess', _1287 => _1287.row]) === prev.actualRow ? prev.editingCell.col : -1;
20072
- const nextEditingCol = _optionalChain([next, 'access', _1288 => _1288.editingCell, 'optionalAccess', _1289 => _1289.row]) === next.actualRow ? next.editingCell.col : -1;
20082
+ const prevEditingCol = _optionalChain([prev, 'access', _1287 => _1287.editingCell, 'optionalAccess', _1288 => _1288.row]) === prev.actualRow ? prev.editingCell.col : -1;
20083
+ const nextEditingCol = _optionalChain([next, 'access', _1289 => _1289.editingCell, 'optionalAccess', _1290 => _1290.row]) === next.actualRow ? next.editingCell.col : -1;
20073
20084
  if (prevEditingCol !== nextEditingCol) {
20074
20085
  return false;
20075
20086
  }
@@ -20297,9 +20308,9 @@ function XlsxGrid({
20297
20308
  const formulaReferences = _chunkOGZ6ROZCcjs.T.call(void 0,
20298
20309
  () => {
20299
20310
  const worksheet2 = getActiveWorksheet();
20300
- return editingCell && worksheet2 && !isTextCell(worksheet2, editingCell) ? getFormulaReferences(editingValue, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1290 => _1290.name]), () => ( ""))) : [];
20311
+ return editingCell && worksheet2 && !isTextCell(worksheet2, editingCell) ? getFormulaReferences(editingValue, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1291 => _1291.name]), () => ( ""))) : [];
20301
20312
  },
20302
- [_optionalChain([activeSheet, 'optionalAccess', _1291 => _1291.name]), editingCell, editingValue, getActiveWorksheet]
20313
+ [_optionalChain([activeSheet, 'optionalAccess', _1292 => _1292.name]), editingCell, editingValue, getActiveWorksheet]
20303
20314
  );
20304
20315
  const [openTableMenu, setOpenTableMenu] = _chunkOGZ6ROZCcjs.d.call(void 0, null);
20305
20316
  const [fillPreviewRange, setFillPreviewRange] = _chunkOGZ6ROZCcjs.d.call(void 0, null);
@@ -20364,13 +20375,13 @@ function XlsxGrid({
20364
20375
  );
20365
20376
  const mergedRegions = _chunkOGZ6ROZCcjs.T.call(void 0, () => {
20366
20377
  const regions = [];
20367
- const rawMergedRegions = Array.isArray(_optionalChain([worksheet, 'optionalAccess', _1292 => _1292.mergedRegions])) ? worksheet.mergedRegions : [];
20378
+ const rawMergedRegions = Array.isArray(_optionalChain([worksheet, 'optionalAccess', _1293 => _1293.mergedRegions])) ? worksheet.mergedRegions : [];
20368
20379
  for (const entry of rawMergedRegions) {
20369
20380
  const region = asRecord(entry);
20370
- const startRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1293 => _1293.startRow]));
20371
- const startCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1294 => _1294.startCol]));
20372
- const endRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1295 => _1295.endRow]));
20373
- const endCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1296 => _1296.endCol]));
20381
+ const startRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1294 => _1294.startRow]));
20382
+ const startCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1295 => _1295.startCol]));
20383
+ const endRow = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1296 => _1296.endRow]));
20384
+ const endCol = asNonNegativeInteger(_optionalChain([region, 'optionalAccess', _1297 => _1297.endCol]));
20374
20385
  if (startRow === null || startCol === null || endRow === null || endCol === null) {
20375
20386
  continue;
20376
20387
  }
@@ -20382,11 +20393,11 @@ function XlsxGrid({
20382
20393
  return regions;
20383
20394
  }, [worksheet]);
20384
20395
  const findMergedRange = _chunkOGZ6ROZCcjs.T.call(void 0,
20385
- () => createMergedRangeLookup(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1297 => _1297.mergedRanges]), () => ( mergedRegions))),
20386
- [_optionalChain([activeSheet, 'optionalAccess', _1298 => _1298.mergedRanges]), mergedRegions]
20396
+ () => createMergedRangeLookup(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1298 => _1298.mergedRanges]), () => ( mergedRegions))),
20397
+ [_optionalChain([activeSheet, 'optionalAccess', _1299 => _1299.mergedRanges]), mergedRegions]
20387
20398
  );
20388
20399
  const resolveMergeAnchorCell = _chunkOGZ6ROZCcjs.q.call(void 0, (cell) => {
20389
- return _nullishCoalesce(_optionalChain([findMergedRange, 'call', _1299 => _1299(cell), 'optionalAccess', _1300 => _1300.start]), () => ( cell));
20400
+ return _nullishCoalesce(_optionalChain([findMergedRange, 'call', _1300 => _1300(cell), 'optionalAccess', _1301 => _1301.start]), () => ( cell));
20390
20401
  }, [findMergedRange]);
20391
20402
  const resolveCellSelectionRange = _chunkOGZ6ROZCcjs.q.call(void 0, (range) => {
20392
20403
  const normalized = normalizeRange2(range);
@@ -20395,11 +20406,11 @@ function XlsxGrid({
20395
20406
  if (isSameCell(start, end)) {
20396
20407
  return { start, end };
20397
20408
  }
20398
- return expandHighlightedRange(normalized, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1301 => _1301.mergedRanges]), () => ( mergedRegions)));
20399
- }, [_optionalChain([activeSheet, 'optionalAccess', _1302 => _1302.mergedRanges]), mergedRegions, resolveMergeAnchorCell]);
20409
+ return expandHighlightedRange(normalized, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1302 => _1302.mergedRanges]), () => ( mergedRegions)));
20410
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1303 => _1303.mergedRanges]), mergedRegions, resolveMergeAnchorCell]);
20400
20411
  const highlightedCellRanges = _chunkOGZ6ROZCcjs.T.call(void 0,
20401
- () => highlightedRanges.flatMap((highlight, index) => _optionalChain([activeSheet, 'optionalAccess', _1303 => _1303.workbookSheetIndex]) === highlight.workbookSheetIndex ? [{ highlight, index, range: expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1304 => _1304.mergedRanges]), () => ( mergedRegions))) }] : []),
20402
- [_optionalChain([activeSheet, 'optionalAccess', _1305 => _1305.mergedRanges]), _optionalChain([activeSheet, 'optionalAccess', _1306 => _1306.workbookSheetIndex]), highlightedRanges, mergedRegions]
20412
+ () => highlightedRanges.flatMap((highlight, index) => _optionalChain([activeSheet, 'optionalAccess', _1304 => _1304.workbookSheetIndex]) === highlight.workbookSheetIndex ? [{ highlight, index, range: expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1305 => _1305.mergedRanges]), () => ( mergedRegions))) }] : []),
20413
+ [_optionalChain([activeSheet, 'optionalAccess', _1306 => _1306.mergedRanges]), _optionalChain([activeSheet, 'optionalAccess', _1307 => _1307.workbookSheetIndex]), highlightedRanges, mergedRegions]
20403
20414
  );
20404
20415
  const normalizedSelection = _chunkOGZ6ROZCcjs.T.call(void 0, () => selection ? normalizeRange2(selection) : null, [selection]);
20405
20416
  const zoomFactor = _chunkOGZ6ROZCcjs.T.call(void 0, () => Math.max(0.1, zoomScale / 100), [zoomScale]);
@@ -20407,7 +20418,7 @@ function XlsxGrid({
20407
20418
  const effectiveTables = tables;
20408
20419
  const [displayRowLimit, setDisplayRowLimit] = _chunkOGZ6ROZCcjs.d.call(void 0,
20409
20420
  () => resolveInitialDisplayExtent(
20410
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1307 => _1307.maxUsedRow]), () => ( -1)),
20421
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1308 => _1308.maxUsedRow]), () => ( -1)),
20411
20422
  MIN_OPEN_GRID_ROWS,
20412
20423
  OPEN_GRID_ROW_PADDING,
20413
20424
  Boolean(isWorkerBacked),
@@ -20416,15 +20427,15 @@ function XlsxGrid({
20416
20427
  );
20417
20428
  const [displayColLimit, setDisplayColLimit] = _chunkOGZ6ROZCcjs.d.call(void 0,
20418
20429
  () => resolveInitialDisplayExtent(
20419
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1308 => _1308.maxUsedCol]), () => ( -1)),
20430
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1309 => _1309.maxUsedCol]), () => ( -1)),
20420
20431
  MIN_OPEN_GRID_COLS,
20421
20432
  OPEN_GRID_COL_PADDING,
20422
20433
  Boolean(isWorkerBacked),
20423
20434
  INITIAL_WORKER_GRID_COLS
20424
20435
  )
20425
20436
  );
20426
- const hiddenRowSet = _chunkOGZ6ROZCcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1309 => _1309.hiddenRows]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _1310 => _1310.hiddenRows])]);
20427
- const hiddenColSet = _chunkOGZ6ROZCcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1311 => _1311.hiddenCols]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _1312 => _1312.hiddenCols])]);
20437
+ const hiddenRowSet = _chunkOGZ6ROZCcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1310 => _1310.hiddenRows]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _1311 => _1311.hiddenRows])]);
20438
+ const hiddenColSet = _chunkOGZ6ROZCcjs.T.call(void 0, () => new Set(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1312 => _1312.hiddenCols]), () => ( []))), [_optionalChain([activeSheet, 'optionalAccess', _1313 => _1313.hiddenCols])]);
20428
20439
  const displayDefaultRowHeight = DEFAULT_ROW_HEIGHT2 * zoomFactor;
20429
20440
  const displayDefaultColWidth = DEFAULT_COL_WIDTH2 * zoomFactor;
20430
20441
  const displayHeaderHeight = HEADER_HEIGHT * zoomFactor;
@@ -20460,27 +20471,27 @@ function XlsxGrid({
20460
20471
  const liveZoomAnchorX = resolveClampedLiveZoomAnchor(
20461
20472
  nextLiveViewport.left,
20462
20473
  nextLiveViewport.width,
20463
- _nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1313 => _1313.scrollWidth]), () => ( nextLiveViewport.width)),
20464
- _nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess', _1314 => _1314.anchor, 'access', _1315 => _1315.x]), () => ( 0))
20474
+ _nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1314 => _1314.scrollWidth]), () => ( nextLiveViewport.width)),
20475
+ _nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess', _1315 => _1315.anchor, 'access', _1316 => _1316.x]), () => ( 0))
20465
20476
  );
20466
20477
  const liveZoomAnchorY = resolveClampedLiveZoomAnchor(
20467
20478
  nextLiveViewport.top,
20468
20479
  nextLiveViewport.height,
20469
- _nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1316 => _1316.scrollHeight]), () => ( nextLiveViewport.height)),
20470
- _nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess', _1317 => _1317.anchor, 'access', _1318 => _1318.y]), () => ( 0))
20480
+ _nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1317 => _1317.scrollHeight]), () => ( nextLiveViewport.height)),
20481
+ _nullishCoalesce(_optionalChain([currentLiveGestureZoom, 'optionalAccess', _1318 => _1318.anchor, 'access', _1319 => _1319.y]), () => ( 0))
20471
20482
  );
20472
20483
  const applyElementTransform = (element, transform, willChange, transformOrigin = null) => {
20473
20484
  if (!element) {
20474
20485
  return;
20475
20486
  }
20476
20487
  const cached = canvasTransformStyleCacheRef.current.get(element);
20477
- if (_optionalChain([cached, 'optionalAccess', _1319 => _1319.transform]) !== transform || element.style.transform !== transform) {
20488
+ if (_optionalChain([cached, 'optionalAccess', _1320 => _1320.transform]) !== transform || element.style.transform !== transform) {
20478
20489
  element.style.transform = transform;
20479
20490
  }
20480
- if (_optionalChain([cached, 'optionalAccess', _1320 => _1320.willChange]) !== willChange || element.style.willChange !== willChange) {
20491
+ if (_optionalChain([cached, 'optionalAccess', _1321 => _1321.willChange]) !== willChange || element.style.willChange !== willChange) {
20481
20492
  element.style.willChange = willChange;
20482
20493
  }
20483
- if (transformOrigin !== null && (_optionalChain([cached, 'optionalAccess', _1321 => _1321.transformOrigin]) !== transformOrigin || element.style.transformOrigin !== transformOrigin)) {
20494
+ if (transformOrigin !== null && (_optionalChain([cached, 'optionalAccess', _1322 => _1322.transformOrigin]) !== transformOrigin || element.style.transformOrigin !== transformOrigin)) {
20484
20495
  element.style.transformOrigin = transformOrigin;
20485
20496
  }
20486
20497
  canvasTransformStyleCacheRef.current.set(element, {
@@ -20701,7 +20712,7 @@ function XlsxGrid({
20701
20712
  pendingLiveZoomCommitRef.current = null;
20702
20713
  updateLiveGestureZoomState((current) => ({
20703
20714
  anchor,
20704
- baseZoomScale: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _1322 => _1322.baseZoomScale]), () => ( committedZoomScaleRef.current)),
20715
+ baseZoomScale: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _1323 => _1323.baseZoomScale]), () => ( committedZoomScaleRef.current)),
20705
20716
  targetZoomScale: clampedZoomScale
20706
20717
  }));
20707
20718
  }, [maxZoomScale, minZoomScale, updateLiveGestureZoomState]);
@@ -20751,7 +20762,7 @@ function XlsxGrid({
20751
20762
  const matchesLiveViewport = liveViewport.left === nextViewport.left && liveViewport.top === nextViewport.top && liveViewport.width === nextViewport.width && liveViewport.height === nextViewport.height;
20752
20763
  liveDrawingViewportRef.current = nextViewport;
20753
20764
  applyCanvasViewportCompensation(nextViewport);
20754
- if (_optionalChain([options, 'optionalAccess', _1323 => _1323.immediate])) {
20765
+ if (_optionalChain([options, 'optionalAccess', _1324 => _1324.immediate])) {
20755
20766
  pendingDrawingViewportRef.current = null;
20756
20767
  if (drawingViewportFrameRef.current !== null) {
20757
20768
  window.cancelAnimationFrame(drawingViewportFrameRef.current);
@@ -20817,51 +20828,51 @@ function XlsxGrid({
20817
20828
  }, []);
20818
20829
  const visibleRows = _chunkOGZ6ROZCcjs.T.call(void 0, () => {
20819
20830
  return buildVisibleAxisIndices(
20820
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1324 => _1324.visibleRows]), () => ( [])),
20831
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1325 => _1325.visibleRows]), () => ( [])),
20821
20832
  displayRowLimit,
20822
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1325 => _1325.maxUsedRow]), () => ( -1)),
20833
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1326 => _1326.maxUsedRow]), () => ( -1)),
20823
20834
  hiddenRowSet
20824
20835
  );
20825
- }, [_optionalChain([activeSheet, 'optionalAccess', _1326 => _1326.maxUsedRow]), _optionalChain([activeSheet, 'optionalAccess', _1327 => _1327.visibleRows]), displayRowLimit, hiddenRowSet]);
20836
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1327 => _1327.maxUsedRow]), _optionalChain([activeSheet, 'optionalAccess', _1328 => _1328.visibleRows]), displayRowLimit, hiddenRowSet]);
20826
20837
  const visibleCols = _chunkOGZ6ROZCcjs.T.call(void 0, () => {
20827
20838
  return buildVisibleAxisIndices(
20828
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1328 => _1328.visibleCols]), () => ( [])),
20839
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1329 => _1329.visibleCols]), () => ( [])),
20829
20840
  displayColLimit,
20830
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1329 => _1329.maxUsedCol]), () => ( -1)),
20841
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1330 => _1330.maxUsedCol]), () => ( -1)),
20831
20842
  hiddenColSet
20832
20843
  );
20833
- }, [_optionalChain([activeSheet, 'optionalAccess', _1330 => _1330.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1331 => _1331.visibleCols]), displayColLimit, hiddenColSet]);
20844
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1331 => _1331.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1332 => _1332.visibleCols]), displayColLimit, hiddenColSet]);
20834
20845
  const frozenRows = _chunkOGZ6ROZCcjs.T.call(void 0, () => {
20835
- const freezeRow = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1332 => _1332.freezePanes, 'optionalAccess', _1333 => _1333.row]), () => ( 0));
20846
+ const freezeRow = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1333 => _1333.freezePanes, 'optionalAccess', _1334 => _1334.row]), () => ( 0));
20836
20847
  if (freezeRow <= 0) {
20837
20848
  return [];
20838
20849
  }
20839
20850
  return visibleRows.filter((row) => row < freezeRow);
20840
- }, [_optionalChain([activeSheet, 'optionalAccess', _1334 => _1334.freezePanes, 'optionalAccess', _1335 => _1335.row]), visibleRows]);
20851
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1335 => _1335.freezePanes, 'optionalAccess', _1336 => _1336.row]), visibleRows]);
20841
20852
  const frozenCols = _chunkOGZ6ROZCcjs.T.call(void 0, () => {
20842
- const freezeCol = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1336 => _1336.freezePanes, 'optionalAccess', _1337 => _1337.col]), () => ( 0));
20853
+ const freezeCol = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1337 => _1337.freezePanes, 'optionalAccess', _1338 => _1338.col]), () => ( 0));
20843
20854
  if (freezeCol <= 0) {
20844
20855
  return [];
20845
20856
  }
20846
20857
  return visibleCols.filter((col) => col < freezeCol);
20847
- }, [_optionalChain([activeSheet, 'optionalAccess', _1338 => _1338.freezePanes, 'optionalAccess', _1339 => _1339.col]), visibleCols]);
20858
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1339 => _1339.freezePanes, 'optionalAccess', _1340 => _1340.col]), visibleCols]);
20848
20859
  const actualColWidths = _chunkOGZ6ROZCcjs.T.call(void 0,
20849
20860
  () => {
20850
- const office = _optionalChain([activeSheet, 'optionalAccess', _1340 => _1340.officeLayout]);
20861
+ const office = _optionalChain([activeSheet, 'optionalAccess', _1341 => _1341.officeLayout]);
20851
20862
  if (office) {
20852
20863
  return Array.from({ length: displayColLimit }, (_2, index) => {
20853
20864
  if (hiddenColSet.has(index)) return 0;
20854
20865
  const original = office.columns[index];
20855
- const override = _optionalChain([activeSheet, 'optionalAccess', _1341 => _1341.colWidthOverridesPx, 'access', _1342 => _1342[index]]);
20856
- if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _1343 => _1343.sourcePx])) return override;
20857
- const width = _optionalChain([worksheet, 'optionalAccess', _1344 => _1344.getColumnWidth, 'call', _1345 => _1345(index)]);
20858
- return width !== void 0 && width !== null ? resolveOfficeColumnWidthPixels(width, office.columnDigitWidthPt) : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _1346 => _1346.sizePx]), () => ( office.defaultColumnPx));
20866
+ const override = _optionalChain([activeSheet, 'optionalAccess', _1342 => _1342.colWidthOverridesPx, 'access', _1343 => _1343[index]]);
20867
+ if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _1344 => _1344.sourcePx])) return override;
20868
+ const width = _optionalChain([worksheet, 'optionalAccess', _1345 => _1345.getColumnWidth, 'call', _1346 => _1346(index)]);
20869
+ return width !== void 0 && width !== null ? resolveOfficeColumnWidthPixels(width, office.columnDigitWidthPt) : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _1347 => _1347.sizePx]), () => ( office.defaultColumnPx));
20859
20870
  });
20860
20871
  }
20861
20872
  const widths = new Array(displayColLimit).fill(0);
20862
- const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1347 => _1347.showGridLines]), () => ( true));
20873
+ const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1348 => _1348.showGridLines]), () => ( true));
20863
20874
  const fallbackWidth = Math.max(
20864
- resolveRenderedSheetAxisPixels(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1348 => _1348.defaultColWidthPx]), () => ( DEFAULT_COL_WIDTH2)), showGridLines),
20875
+ resolveRenderedSheetAxisPixels(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1349 => _1349.defaultColWidthPx]), () => ( DEFAULT_COL_WIDTH2)), showGridLines),
20865
20876
  DEFAULT_COL_WIDTH2 / 2
20866
20877
  );
20867
20878
  if (worksheet) {
@@ -20873,7 +20884,7 @@ function XlsxGrid({
20873
20884
  if (width !== void 0 && width !== null) {
20874
20885
  widths[col] = Math.max(
20875
20886
  resolveRenderedSheetAxisPixels(
20876
- resolveSheetColumnWidthPixels(width, _optionalChain([activeSheet, 'optionalAccess', _1349 => _1349.columnWidthCharacterWidthPx])),
20887
+ resolveSheetColumnWidthPixels(width, _optionalChain([activeSheet, 'optionalAccess', _1350 => _1350.columnWidthCharacterWidthPx])),
20877
20888
  showGridLines
20878
20889
  ),
20879
20890
  DEFAULT_COL_WIDTH2 / 2
@@ -20882,7 +20893,7 @@ function XlsxGrid({
20882
20893
  }
20883
20894
  widths[col] = Math.max(
20884
20895
  resolveRenderedSheetAxisPixels(
20885
- _nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1350 => _1350.colWidthOverridesPx, 'access', _1351 => _1351[col]]), () => ( _optionalChain([activeSheet, 'optionalAccess', _1352 => _1352.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH2)),
20896
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1351 => _1351.colWidthOverridesPx, 'access', _1352 => _1352[col]]), () => ( _optionalChain([activeSheet, 'optionalAccess', _1353 => _1353.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH2)),
20886
20897
  showGridLines
20887
20898
  ),
20888
20899
  DEFAULT_COL_WIDTH2 / 2
@@ -20890,8 +20901,8 @@ function XlsxGrid({
20890
20901
  }
20891
20902
  return widths;
20892
20903
  }
20893
- const precomputedCols = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1353 => _1353.visibleCols]), () => ( []));
20894
- const precomputedWidths = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1354 => _1354.colWidths]), () => ( []));
20904
+ const precomputedCols = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1354 => _1354.visibleCols]), () => ( []));
20905
+ const precomputedWidths = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1355 => _1355.colWidths]), () => ( []));
20895
20906
  for (let index = 0; index < precomputedCols.length; index += 1) {
20896
20907
  const col = precomputedCols[index];
20897
20908
  if (col === void 0 || col >= displayColLimit) {
@@ -20899,27 +20910,27 @@ function XlsxGrid({
20899
20910
  }
20900
20911
  widths[col] = Math.max(
20901
20912
  resolveRenderedSheetAxisPixels(
20902
- _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1355 => _1355.colWidthOverridesPx, 'access', _1356 => _1356[col]]), () => ( precomputedWidths[index])), () => ( _optionalChain([activeSheet, 'optionalAccess', _1357 => _1357.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH2)),
20913
+ _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1356 => _1356.colWidthOverridesPx, 'access', _1357 => _1357[col]]), () => ( precomputedWidths[index])), () => ( _optionalChain([activeSheet, 'optionalAccess', _1358 => _1358.defaultColWidthPx]))), () => ( DEFAULT_COL_WIDTH2)),
20903
20914
  showGridLines
20904
20915
  ),
20905
20916
  DEFAULT_COL_WIDTH2 / 2
20906
20917
  );
20907
20918
  }
20908
- for (let col = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1358 => _1358.maxUsedCol]), () => ( -1))) + 1); col < displayColLimit; col += 1) {
20909
- const overrideWidth = _optionalChain([activeSheet, 'optionalAccess', _1359 => _1359.colWidthOverridesPx, 'access', _1360 => _1360[col]]);
20919
+ for (let col = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1359 => _1359.maxUsedCol]), () => ( -1))) + 1); col < displayColLimit; col += 1) {
20920
+ const overrideWidth = _optionalChain([activeSheet, 'optionalAccess', _1360 => _1360.colWidthOverridesPx, 'access', _1361 => _1361[col]]);
20910
20921
  widths[col] = overrideWidth === void 0 ? fallbackWidth : Math.max(resolveRenderedSheetAxisPixels(overrideWidth, showGridLines), DEFAULT_COL_WIDTH2 / 2);
20911
20922
  }
20912
20923
  return widths;
20913
20924
  },
20914
20925
  [
20915
20926
  hiddenColSet,
20916
- _optionalChain([activeSheet, 'optionalAccess', _1361 => _1361.officeLayout]),
20917
- _optionalChain([activeSheet, 'optionalAccess', _1362 => _1362.colWidthOverridesPx]),
20918
- _optionalChain([activeSheet, 'optionalAccess', _1363 => _1363.colWidths]),
20919
- _optionalChain([activeSheet, 'optionalAccess', _1364 => _1364.defaultColWidthPx]),
20920
- _optionalChain([activeSheet, 'optionalAccess', _1365 => _1365.maxUsedCol]),
20921
- _optionalChain([activeSheet, 'optionalAccess', _1366 => _1366.showGridLines]),
20922
- _optionalChain([activeSheet, 'optionalAccess', _1367 => _1367.visibleCols]),
20927
+ _optionalChain([activeSheet, 'optionalAccess', _1362 => _1362.officeLayout]),
20928
+ _optionalChain([activeSheet, 'optionalAccess', _1363 => _1363.colWidthOverridesPx]),
20929
+ _optionalChain([activeSheet, 'optionalAccess', _1364 => _1364.colWidths]),
20930
+ _optionalChain([activeSheet, 'optionalAccess', _1365 => _1365.defaultColWidthPx]),
20931
+ _optionalChain([activeSheet, 'optionalAccess', _1366 => _1366.maxUsedCol]),
20932
+ _optionalChain([activeSheet, 'optionalAccess', _1367 => _1367.showGridLines]),
20933
+ _optionalChain([activeSheet, 'optionalAccess', _1368 => _1368.visibleCols]),
20923
20934
  displayColLimit,
20924
20935
  worksheet,
20925
20936
  revision,
@@ -20928,21 +20939,21 @@ function XlsxGrid({
20928
20939
  );
20929
20940
  const actualRowHeights = _chunkOGZ6ROZCcjs.T.call(void 0,
20930
20941
  () => {
20931
- const office = _optionalChain([activeSheet, 'optionalAccess', _1368 => _1368.officeLayout]);
20942
+ const office = _optionalChain([activeSheet, 'optionalAccess', _1369 => _1369.officeLayout]);
20932
20943
  if (office) {
20933
20944
  return Array.from({ length: displayRowLimit }, (_2, index) => {
20934
20945
  if (hiddenRowSet.has(index)) return 0;
20935
20946
  const original = office.rows[index];
20936
- const override = _optionalChain([activeSheet, 'optionalAccess', _1369 => _1369.rowHeightOverridesPx, 'access', _1370 => _1370[index]]);
20937
- if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _1371 => _1371.sourcePx])) return override;
20938
- const height = _optionalChain([worksheet, 'optionalAccess', _1372 => _1372.getRowHeight, 'call', _1373 => _1373(index)]);
20939
- return height !== void 0 && height !== null ? Math.max(0, height * (4 / 3)) : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _1374 => _1374.sizePx]), () => ( office.defaultRowPx));
20947
+ const override = _optionalChain([activeSheet, 'optionalAccess', _1370 => _1370.rowHeightOverridesPx, 'access', _1371 => _1371[index]]);
20948
+ if (override !== void 0 && override !== _optionalChain([original, 'optionalAccess', _1372 => _1372.sourcePx])) return override;
20949
+ const height = _optionalChain([worksheet, 'optionalAccess', _1373 => _1373.getRowHeight, 'call', _1374 => _1374(index)]);
20950
+ return height !== void 0 && height !== null ? Math.max(0, height * (4 / 3)) : _nullishCoalesce(_optionalChain([original, 'optionalAccess', _1375 => _1375.sizePx]), () => ( office.defaultRowPx));
20940
20951
  });
20941
20952
  }
20942
20953
  const heights = new Array(displayRowLimit).fill(0);
20943
- const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1375 => _1375.showGridLines]), () => ( true));
20954
+ const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1376 => _1376.showGridLines]), () => ( true));
20944
20955
  const fallbackHeight = Math.max(
20945
- resolveRenderedSheetAxisPixels(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1376 => _1376.defaultRowHeightPx]), () => ( DEFAULT_ROW_HEIGHT2)), showGridLines),
20956
+ resolveRenderedSheetAxisPixels(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1377 => _1377.defaultRowHeightPx]), () => ( DEFAULT_ROW_HEIGHT2)), showGridLines),
20946
20957
  DEFAULT_ROW_HEIGHT2 / 1.5
20947
20958
  );
20948
20959
  if (worksheet) {
@@ -20958,7 +20969,7 @@ function XlsxGrid({
20958
20969
  );
20959
20970
  continue;
20960
20971
  }
20961
- const maxMeasuredCol = Math.min(displayColLimit - 1, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1377 => _1377.maxUsedCol]), () => ( -1)));
20972
+ const maxMeasuredCol = Math.min(displayColLimit - 1, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1378 => _1378.maxUsedCol]), () => ( -1)));
20962
20973
  let estimatedAutoHeight = 0;
20963
20974
  if (maxMeasuredCol >= 0) {
20964
20975
  for (let col = 0; col <= maxMeasuredCol; col += 1) {
@@ -20970,17 +20981,17 @@ function XlsxGrid({
20970
20981
  continue;
20971
20982
  }
20972
20983
  const rawStyle = _nullishCoalesce(worksheet.getCellStyleAt(row, col), () => ( null));
20973
- const cellStyle = buildCellStyle(rawStyle, palette, _optionalChain([activeSheet, 'optionalAccess', _1378 => _1378.themePalette]), {
20974
- showGridLines: _optionalChain([activeSheet, 'optionalAccess', _1379 => _1379.showGridLines])
20984
+ const cellStyle = buildCellStyle(rawStyle, palette, _optionalChain([activeSheet, 'optionalAccess', _1379 => _1379.themePalette]), {
20985
+ showGridLines: _optionalChain([activeSheet, 'optionalAccess', _1380 => _1380.showGridLines])
20975
20986
  });
20976
20987
  if (cellStyle.whiteSpace !== "pre-wrap" && !cellValue.includes("\n") && !cellValue.includes("\r")) {
20977
20988
  continue;
20978
20989
  }
20979
20990
  const merge = worksheet.getMergeSpan(row, col);
20980
- const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1380 => _1380.colSpan]), () => ( 1)));
20991
+ const colSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1381 => _1381.colSpan]), () => ( 1)));
20981
20992
  let cellWidth = 0;
20982
20993
  for (let spanCol = col; spanCol < Math.min(displayColLimit, col + colSpan); spanCol += 1) {
20983
- cellWidth += _nullishCoalesce(actualColWidths[spanCol], () => ( (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1381 => _1381.defaultColWidthPx]), () => ( DEFAULT_COL_WIDTH2)))));
20994
+ cellWidth += _nullishCoalesce(actualColWidths[spanCol], () => ( (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1382 => _1382.defaultColWidthPx]), () => ( DEFAULT_COL_WIDTH2)))));
20984
20995
  }
20985
20996
  estimatedAutoHeight = Math.max(
20986
20997
  estimatedAutoHeight,
@@ -20997,7 +21008,7 @@ function XlsxGrid({
20997
21008
  }
20998
21009
  heights[row] = Math.max(
20999
21010
  resolveRenderedSheetAxisPixels(
21000
- _nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1382 => _1382.rowHeightOverridesPx, 'access', _1383 => _1383[row]]), () => ( _optionalChain([activeSheet, 'optionalAccess', _1384 => _1384.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT2)),
21011
+ _nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1383 => _1383.rowHeightOverridesPx, 'access', _1384 => _1384[row]]), () => ( _optionalChain([activeSheet, 'optionalAccess', _1385 => _1385.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT2)),
21001
21012
  showGridLines
21002
21013
  ),
21003
21014
  DEFAULT_ROW_HEIGHT2 / 1.5
@@ -21005,8 +21016,8 @@ function XlsxGrid({
21005
21016
  }
21006
21017
  return heights;
21007
21018
  }
21008
- const precomputedRows = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1385 => _1385.visibleRows]), () => ( []));
21009
- const precomputedHeights = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1386 => _1386.rowHeights]), () => ( []));
21019
+ const precomputedRows = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1386 => _1386.visibleRows]), () => ( []));
21020
+ const precomputedHeights = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1387 => _1387.rowHeights]), () => ( []));
21010
21021
  for (let index = 0; index < precomputedRows.length; index += 1) {
21011
21022
  const row = precomputedRows[index];
21012
21023
  if (row === void 0 || row >= displayRowLimit) {
@@ -21014,29 +21025,29 @@ function XlsxGrid({
21014
21025
  }
21015
21026
  heights[row] = Math.max(
21016
21027
  resolveRenderedSheetAxisPixels(
21017
- _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1387 => _1387.rowHeightOverridesPx, 'access', _1388 => _1388[row]]), () => ( precomputedHeights[index])), () => ( _optionalChain([activeSheet, 'optionalAccess', _1389 => _1389.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT2)),
21028
+ _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1388 => _1388.rowHeightOverridesPx, 'access', _1389 => _1389[row]]), () => ( precomputedHeights[index])), () => ( _optionalChain([activeSheet, 'optionalAccess', _1390 => _1390.defaultRowHeightPx]))), () => ( DEFAULT_ROW_HEIGHT2)),
21018
21029
  showGridLines
21019
21030
  ),
21020
21031
  DEFAULT_ROW_HEIGHT2 / 1.5
21021
21032
  );
21022
21033
  }
21023
- for (let row = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1390 => _1390.maxUsedRow]), () => ( -1))) + 1); row < displayRowLimit; row += 1) {
21024
- const overrideHeight = _optionalChain([activeSheet, 'optionalAccess', _1391 => _1391.rowHeightOverridesPx, 'access', _1392 => _1392[row]]);
21034
+ for (let row = Math.max(0, (_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1391 => _1391.maxUsedRow]), () => ( -1))) + 1); row < displayRowLimit; row += 1) {
21035
+ const overrideHeight = _optionalChain([activeSheet, 'optionalAccess', _1392 => _1392.rowHeightOverridesPx, 'access', _1393 => _1393[row]]);
21025
21036
  heights[row] = overrideHeight === void 0 ? fallbackHeight : Math.max(resolveRenderedSheetAxisPixels(overrideHeight, showGridLines), DEFAULT_ROW_HEIGHT2 / 1.5);
21026
21037
  }
21027
21038
  return heights;
21028
21039
  },
21029
21040
  [
21030
21041
  hiddenRowSet,
21031
- _optionalChain([activeSheet, 'optionalAccess', _1393 => _1393.officeLayout]),
21032
- _optionalChain([activeSheet, 'optionalAccess', _1394 => _1394.defaultRowHeightPx]),
21033
- _optionalChain([activeSheet, 'optionalAccess', _1395 => _1395.maxUsedRow]),
21034
- _optionalChain([activeSheet, 'optionalAccess', _1396 => _1396.maxUsedCol]),
21035
- _optionalChain([activeSheet, 'optionalAccess', _1397 => _1397.rowHeightOverridesPx]),
21036
- _optionalChain([activeSheet, 'optionalAccess', _1398 => _1398.rowHeights]),
21037
- _optionalChain([activeSheet, 'optionalAccess', _1399 => _1399.showGridLines]),
21038
- _optionalChain([activeSheet, 'optionalAccess', _1400 => _1400.themePalette]),
21039
- _optionalChain([activeSheet, 'optionalAccess', _1401 => _1401.visibleRows]),
21042
+ _optionalChain([activeSheet, 'optionalAccess', _1394 => _1394.officeLayout]),
21043
+ _optionalChain([activeSheet, 'optionalAccess', _1395 => _1395.defaultRowHeightPx]),
21044
+ _optionalChain([activeSheet, 'optionalAccess', _1396 => _1396.maxUsedRow]),
21045
+ _optionalChain([activeSheet, 'optionalAccess', _1397 => _1397.maxUsedCol]),
21046
+ _optionalChain([activeSheet, 'optionalAccess', _1398 => _1398.rowHeightOverridesPx]),
21047
+ _optionalChain([activeSheet, 'optionalAccess', _1399 => _1399.rowHeights]),
21048
+ _optionalChain([activeSheet, 'optionalAccess', _1400 => _1400.showGridLines]),
21049
+ _optionalChain([activeSheet, 'optionalAccess', _1401 => _1401.themePalette]),
21050
+ _optionalChain([activeSheet, 'optionalAccess', _1402 => _1402.visibleRows]),
21040
21051
  actualColWidths,
21041
21052
  displayRowLimit,
21042
21053
  displayColLimit,
@@ -21235,19 +21246,19 @@ function XlsxGrid({
21235
21246
  [currentColVirtualItems]
21236
21247
  );
21237
21248
  const maxRowDisplayLimit = _chunkOGZ6ROZCcjs.T.call(void 0,
21238
- () => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1402 => _1402.maxUsedRow]), () => ( -1)), MIN_OPEN_GRID_ROWS, OPEN_GRID_ROW_PADDING),
21239
- [_optionalChain([activeSheet, 'optionalAccess', _1403 => _1403.maxUsedRow])]
21249
+ () => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1403 => _1403.maxUsedRow]), () => ( -1)), MIN_OPEN_GRID_ROWS, OPEN_GRID_ROW_PADDING),
21250
+ [_optionalChain([activeSheet, 'optionalAccess', _1404 => _1404.maxUsedRow])]
21240
21251
  );
21241
21252
  const maxColDisplayLimit = _chunkOGZ6ROZCcjs.T.call(void 0,
21242
- () => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1404 => _1404.maxUsedCol]), () => ( -1)), MIN_OPEN_GRID_COLS, OPEN_GRID_COL_PADDING),
21243
- [_optionalChain([activeSheet, 'optionalAccess', _1405 => _1405.maxUsedCol])]
21253
+ () => resolveOpenGridExtent(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1405 => _1405.maxUsedCol]), () => ( -1)), MIN_OPEN_GRID_COLS, OPEN_GRID_COL_PADDING),
21254
+ [_optionalChain([activeSheet, 'optionalAccess', _1406 => _1406.maxUsedCol])]
21244
21255
  );
21245
21256
  _chunkOGZ6ROZCcjs.h.call(void 0, () => {
21246
21257
  if (!isWorkerBacked) {
21247
21258
  return;
21248
21259
  }
21249
- const lastVirtualRowIndex = _nullishCoalesce(_optionalChain([currentRowVirtualItems, 'access', _1406 => _1406[currentRowVirtualItems.length - 1], 'optionalAccess', _1407 => _1407.index]), () => ( -1));
21250
- const lastVirtualColIndex = _nullishCoalesce(_optionalChain([currentColVirtualItems, 'access', _1408 => _1408[currentColVirtualItems.length - 1], 'optionalAccess', _1409 => _1409.index]), () => ( -1));
21260
+ const lastVirtualRowIndex = _nullishCoalesce(_optionalChain([currentRowVirtualItems, 'access', _1407 => _1407[currentRowVirtualItems.length - 1], 'optionalAccess', _1408 => _1408.index]), () => ( -1));
21261
+ const lastVirtualColIndex = _nullishCoalesce(_optionalChain([currentColVirtualItems, 'access', _1409 => _1409[currentColVirtualItems.length - 1], 'optionalAccess', _1410 => _1410.index]), () => ( -1));
21251
21262
  if (lastVirtualRowIndex >= visibleRows.length - WORKER_GRID_GROW_THRESHOLD_ROWS && displayRowLimit < maxRowDisplayLimit) {
21252
21263
  setDisplayRowLimit((current) => Math.min(maxRowDisplayLimit, current + WORKER_GRID_GROW_ROWS));
21253
21264
  }
@@ -21466,7 +21477,7 @@ function XlsxGrid({
21466
21477
  _chunkOGZ6ROZCcjs.h.call(void 0, () => {
21467
21478
  setDisplayRowLimit(
21468
21479
  resolveInitialDisplayExtent(
21469
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1410 => _1410.maxUsedRow]), () => ( -1)),
21480
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1411 => _1411.maxUsedRow]), () => ( -1)),
21470
21481
  MIN_OPEN_GRID_ROWS,
21471
21482
  OPEN_GRID_ROW_PADDING,
21472
21483
  Boolean(isWorkerBacked),
@@ -21475,38 +21486,38 @@ function XlsxGrid({
21475
21486
  );
21476
21487
  setDisplayColLimit(
21477
21488
  resolveInitialDisplayExtent(
21478
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1411 => _1411.maxUsedCol]), () => ( -1)),
21489
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1412 => _1412.maxUsedCol]), () => ( -1)),
21479
21490
  MIN_OPEN_GRID_COLS,
21480
21491
  OPEN_GRID_COL_PADDING,
21481
21492
  Boolean(isWorkerBacked),
21482
21493
  INITIAL_WORKER_GRID_COLS
21483
21494
  )
21484
21495
  );
21485
- }, [_optionalChain([activeSheet, 'optionalAccess', _1412 => _1412.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1413 => _1413.maxUsedRow]), activeSheetIndex, isWorkerBacked]);
21496
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1413 => _1413.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1414 => _1414.maxUsedRow]), activeSheetIndex, isWorkerBacked]);
21486
21497
  _chunkOGZ6ROZCcjs.h.call(void 0, () => {
21487
- const selectionEndRow = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1414 => _1414.end, 'access', _1415 => _1415.row]), () => ( -1));
21488
- const selectionEndCol = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1416 => _1416.end, 'access', _1417 => _1417.col]), () => ( -1));
21498
+ const selectionEndRow = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1415 => _1415.end, 'access', _1416 => _1416.row]), () => ( -1));
21499
+ const selectionEndCol = _nullishCoalesce(_optionalChain([normalizedSelection, 'optionalAccess', _1417 => _1417.end, 'access', _1418 => _1418.col]), () => ( -1));
21489
21500
  const nextRowLimit = Math.max(
21490
21501
  resolveInitialDisplayExtent(
21491
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1418 => _1418.maxUsedRow]), () => ( -1)),
21502
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1419 => _1419.maxUsedRow]), () => ( -1)),
21492
21503
  MIN_OPEN_GRID_ROWS,
21493
21504
  OPEN_GRID_ROW_PADDING,
21494
21505
  false,
21495
21506
  INITIAL_WORKER_GRID_ROWS
21496
21507
  ),
21497
- (_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess', _1419 => _1419.row]), () => ( -1))) + OPEN_GRID_ROW_PADDING + 1,
21508
+ (_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess', _1420 => _1420.row]), () => ( -1))) + OPEN_GRID_ROW_PADDING + 1,
21498
21509
  selectionEndRow + OPEN_GRID_ROW_PADDING + 1,
21499
21510
  drawingExtents.maxRow + OPEN_GRID_ROW_PADDING + 1
21500
21511
  );
21501
21512
  const nextColLimit = Math.max(
21502
21513
  resolveInitialDisplayExtent(
21503
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1420 => _1420.maxUsedCol]), () => ( -1)),
21514
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1421 => _1421.maxUsedCol]), () => ( -1)),
21504
21515
  MIN_OPEN_GRID_COLS,
21505
21516
  OPEN_GRID_COL_PADDING,
21506
21517
  false,
21507
21518
  INITIAL_WORKER_GRID_COLS
21508
21519
  ),
21509
- (_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess', _1421 => _1421.col]), () => ( -1))) + OPEN_GRID_COL_PADDING + 1,
21520
+ (_nullishCoalesce(_optionalChain([activeCell, 'optionalAccess', _1422 => _1422.col]), () => ( -1))) + OPEN_GRID_COL_PADDING + 1,
21510
21521
  selectionEndCol + OPEN_GRID_COL_PADDING + 1,
21511
21522
  drawingExtents.maxCol + OPEN_GRID_COL_PADDING + 1
21512
21523
  );
@@ -21514,28 +21525,28 @@ function XlsxGrid({
21514
21525
  setDisplayColLimit((current) => current < nextColLimit ? nextColLimit : current);
21515
21526
  }, [
21516
21527
  activeCell,
21517
- _optionalChain([activeSheet, 'optionalAccess', _1422 => _1422.maxUsedCol]),
21518
- _optionalChain([activeSheet, 'optionalAccess', _1423 => _1423.maxUsedRow]),
21528
+ _optionalChain([activeSheet, 'optionalAccess', _1423 => _1423.maxUsedCol]),
21529
+ _optionalChain([activeSheet, 'optionalAccess', _1424 => _1424.maxUsedRow]),
21519
21530
  drawingExtents.maxCol,
21520
21531
  drawingExtents.maxRow,
21521
- _optionalChain([normalizedSelection, 'optionalAccess', _1424 => _1424.end, 'access', _1425 => _1425.col]),
21522
- _optionalChain([normalizedSelection, 'optionalAccess', _1426 => _1426.end, 'access', _1427 => _1427.row])
21532
+ _optionalChain([normalizedSelection, 'optionalAccess', _1425 => _1425.end, 'access', _1426 => _1426.col]),
21533
+ _optionalChain([normalizedSelection, 'optionalAccess', _1427 => _1427.end, 'access', _1428 => _1428.row])
21523
21534
  ]);
21524
21535
  _chunkOGZ6ROZCcjs.h.call(void 0, () => {
21525
21536
  const initialScrollKey = [
21526
21537
  displayFileName,
21527
21538
  activeSheetIndex,
21528
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1428 => _1428.workbookSheetIndex]), () => ( -1)),
21529
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1429 => _1429.name]), () => ( "")),
21530
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1430 => _1430.minUsedRow]), () => ( -1)),
21531
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1431 => _1431.minUsedCol]), () => ( -1)),
21539
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1429 => _1429.workbookSheetIndex]), () => ( -1)),
21540
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1430 => _1430.name]), () => ( "")),
21541
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1431 => _1431.minUsedRow]), () => ( -1)),
21542
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1432 => _1432.minUsedCol]), () => ( -1)),
21532
21543
  isWorkerBacked ? "worker" : "main"
21533
21544
  ].join("|");
21534
21545
  if (initialScrollKeyRef.current === initialScrollKey) {
21535
21546
  return;
21536
21547
  }
21537
- const initialUsedRow = resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1432 => _1432.minUsedRow]), () => ( -1)));
21538
- const initialUsedCol = resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1433 => _1433.minUsedCol]), () => ( -1)));
21548
+ const initialUsedRow = resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1433 => _1433.minUsedRow]), () => ( -1)));
21549
+ const initialUsedCol = resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1434 => _1434.minUsedCol]), () => ( -1)));
21539
21550
  const initialScrollTop = initialUsedRow > 0 ? sumPrefixRange(actualRowPrefixSums, 0, initialUsedRow - 1) : 0;
21540
21551
  const initialScrollLeft = initialUsedCol > 0 ? sumPrefixRange(actualColPrefixSums, 0, initialUsedCol - 1) : 0;
21541
21552
  if (shouldUseDomVirtualizer && shouldVirtualizeRows) {
@@ -21554,10 +21565,10 @@ function XlsxGrid({
21554
21565
  }
21555
21566
  initialScrollKeyRef.current = initialScrollKey;
21556
21567
  }, [
21557
- _optionalChain([activeSheet, 'optionalAccess', _1434 => _1434.minUsedCol]),
21558
- _optionalChain([activeSheet, 'optionalAccess', _1435 => _1435.minUsedRow]),
21559
- _optionalChain([activeSheet, 'optionalAccess', _1436 => _1436.name]),
21560
- _optionalChain([activeSheet, 'optionalAccess', _1437 => _1437.workbookSheetIndex]),
21568
+ _optionalChain([activeSheet, 'optionalAccess', _1435 => _1435.minUsedCol]),
21569
+ _optionalChain([activeSheet, 'optionalAccess', _1436 => _1436.minUsedRow]),
21570
+ _optionalChain([activeSheet, 'optionalAccess', _1437 => _1437.name]),
21571
+ _optionalChain([activeSheet, 'optionalAccess', _1438 => _1438.workbookSheetIndex]),
21561
21572
  activeSheetIndex,
21562
21573
  actualColPrefixSums,
21563
21574
  actualRowPrefixSums,
@@ -21796,7 +21807,7 @@ function XlsxGrid({
21796
21807
  return;
21797
21808
  }
21798
21809
  function handlePointerDown(event) {
21799
- if (_optionalChain([tableMenuRef, 'access', _1438 => _1438.current, 'optionalAccess', _1439 => _1439.contains, 'call', _1440 => _1440(event.target)])) {
21810
+ if (_optionalChain([tableMenuRef, 'access', _1439 => _1439.current, 'optionalAccess', _1440 => _1440.contains, 'call', _1441 => _1441(event.target)])) {
21800
21811
  return;
21801
21812
  }
21802
21813
  setOpenTableMenu(null);
@@ -21863,7 +21874,7 @@ function XlsxGrid({
21863
21874
  if (!(element instanceof HTMLElement)) {
21864
21875
  continue;
21865
21876
  }
21866
- const cell = parseCellAddressAttribute(_nullishCoalesce(_optionalChain([element, 'access', _1441 => _1441.closest, 'call', _1442 => _1442("[data-xlsx-cell]"), 'optionalAccess', _1443 => _1443.getAttribute, 'call', _1444 => _1444("data-xlsx-cell")]), () => ( null)));
21877
+ const cell = parseCellAddressAttribute(_nullishCoalesce(_optionalChain([element, 'access', _1442 => _1442.closest, 'call', _1443 => _1443("[data-xlsx-cell]"), 'optionalAccess', _1444 => _1444.getAttribute, 'call', _1445 => _1445("data-xlsx-cell")]), () => ( null)));
21867
21878
  if (cell) {
21868
21879
  return cell;
21869
21880
  }
@@ -21895,8 +21906,8 @@ function XlsxGrid({
21895
21906
  const resolveDraggedSelectionCell = _chunkOGZ6ROZCcjs.q.call(void 0, (dragState, clientX, clientY) => {
21896
21907
  const geometryCell = resolvePointerCellFromGeometry(clientX, clientY);
21897
21908
  const hitCell = resolvePointerCellFromHitTest(clientX, clientY);
21898
- const actualRow = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1445 => _1445.row]), () => ( (hitCell && rowIndexByActual.has(hitCell.row) ? hitCell.row : void 0)));
21899
- const actualCol = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1446 => _1446.col]), () => ( _optionalChain([hitCell, 'optionalAccess', _1447 => _1447.col])));
21909
+ const actualRow = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1446 => _1446.row]), () => ( (hitCell && rowIndexByActual.has(hitCell.row) ? hitCell.row : void 0)));
21910
+ const actualCol = _nullishCoalesce(_optionalChain([geometryCell, 'optionalAccess', _1447 => _1447.col]), () => ( _optionalChain([hitCell, 'optionalAccess', _1448 => _1448.col])));
21900
21911
  if (actualRow === void 0 || actualCol === void 0) {
21901
21912
  return null;
21902
21913
  }
@@ -22002,18 +22013,18 @@ function XlsxGrid({
22002
22013
  }
22003
22014
  }, [displayDefaultColWidth, displayEffectiveColWidths, displayRowHeaderWidth, visibleCols]);
22004
22015
  const applyRowPreview = _chunkOGZ6ROZCcjs.q.call(void 0, (actualRow, heightPx) => {
22005
- const rowElement = _nullishCoalesce(_nullishCoalesce(rowElementRefs.current.get(actualRow), () => ( _optionalChain([wrapperRef, 'access', _1448 => _1448.current, 'optionalAccess', _1449 => _1449.querySelector, 'call', _1450 => _1450(`tr[data-xlsx-row="${actualRow}"]`)]))), () => ( null));
22016
+ const rowElement = _nullishCoalesce(_nullishCoalesce(rowElementRefs.current.get(actualRow), () => ( _optionalChain([wrapperRef, 'access', _1449 => _1449.current, 'optionalAccess', _1450 => _1450.querySelector, 'call', _1451 => _1451(`tr[data-xlsx-row="${actualRow}"]`)]))), () => ( null));
22006
22017
  if (rowElement) {
22007
22018
  rowElementRefs.current.set(actualRow, rowElement);
22008
22019
  rowElement.style.height = heightPx === null ? "" : `${heightPx}px`;
22009
22020
  }
22010
22021
  }, []);
22011
22022
  _chunkOGZ6ROZCcjs.h.call(void 0, () => {
22012
- _optionalChain([pendingSelectionDragCleanupRef, 'access', _1451 => _1451.current, 'optionalCall', _1452 => _1452()]);
22013
- _optionalChain([selectionDragCleanupRef, 'access', _1453 => _1453.current, 'optionalCall', _1454 => _1454()]);
22014
- _optionalChain([fillDragCleanupRef, 'access', _1455 => _1455.current, 'optionalCall', _1456 => _1456()]);
22015
- _optionalChain([chartInteractionCleanupRef, 'access', _1457 => _1457.current, 'optionalCall', _1458 => _1458()]);
22016
- _optionalChain([imageInteractionCleanupRef, 'access', _1459 => _1459.current, 'optionalCall', _1460 => _1460()]);
22023
+ _optionalChain([pendingSelectionDragCleanupRef, 'access', _1452 => _1452.current, 'optionalCall', _1453 => _1453()]);
22024
+ _optionalChain([selectionDragCleanupRef, 'access', _1454 => _1454.current, 'optionalCall', _1455 => _1455()]);
22025
+ _optionalChain([fillDragCleanupRef, 'access', _1456 => _1456.current, 'optionalCall', _1457 => _1457()]);
22026
+ _optionalChain([chartInteractionCleanupRef, 'access', _1458 => _1458.current, 'optionalCall', _1459 => _1459()]);
22027
+ _optionalChain([imageInteractionCleanupRef, 'access', _1460 => _1460.current, 'optionalCall', _1461 => _1461()]);
22017
22028
  pendingSelectionDragCleanupRef.current = null;
22018
22029
  selectionDragCleanupRef.current = null;
22019
22030
  fillDragCleanupRef.current = null;
@@ -22074,7 +22085,7 @@ function XlsxGrid({
22074
22085
  if (!scroller || interactiveTarget && interactiveTarget !== scroller) {
22075
22086
  return;
22076
22087
  }
22077
- _optionalChain([gridKeyboardHandlerRef, 'access', _1461 => _1461.current, 'optionalCall', _1462 => _1462(event)]);
22088
+ _optionalChain([gridKeyboardHandlerRef, 'access', _1462 => _1462.current, 'optionalCall', _1463 => _1463(event)]);
22078
22089
  };
22079
22090
  document.addEventListener("pointerdown", handleDocumentPointerDown, true);
22080
22091
  document.addEventListener("keydown", handleDocumentKeyDown);
@@ -22100,7 +22111,7 @@ function XlsxGrid({
22100
22111
  return;
22101
22112
  }
22102
22113
  }
22103
- const externalTarget = _optionalChain([target, 'optionalAccess', _1463 => _1463.trim, 'call', _1464 => _1464()]);
22114
+ const externalTarget = _optionalChain([target, 'optionalAccess', _1464 => _1464.trim, 'call', _1465 => _1465()]);
22104
22115
  if (!externalTarget || externalTarget.startsWith("#") || typeof window === "undefined") {
22105
22116
  return;
22106
22117
  }
@@ -22328,11 +22339,11 @@ function XlsxGrid({
22328
22339
  }, [activeSheetIndex, revision, locale]);
22329
22340
  const sparklinesByCell = _chunkOGZ6ROZCcjs.T.call(void 0, () => {
22330
22341
  const map = /* @__PURE__ */ new Map();
22331
- for (const sparkline of _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1465 => _1465.sparklines]), () => ( []))) {
22342
+ for (const sparkline of _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1466 => _1466.sparklines]), () => ( []))) {
22332
22343
  map.set(`${sparkline.target.row}:${sparkline.target.col}`, sparkline);
22333
22344
  }
22334
22345
  return map;
22335
- }, [_optionalChain([activeSheet, 'optionalAccess', _1466 => _1466.sparklines])]);
22346
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1467 => _1467.sparklines])]);
22336
22347
  const chartRangeHighlights = _chunkOGZ6ROZCcjs.T.call(void 0,
22337
22348
  () => collectChartRangeHighlights(selectedChart, selectedChartElement, sheets, workbook, paletteIsDark(palette)),
22338
22349
  [palette, selectedChart, selectedChartElement, sheets, workbook]
@@ -22387,8 +22398,8 @@ function XlsxGrid({
22387
22398
  return cached;
22388
22399
  }
22389
22400
  const batchCoversRow = viewportRowBatch ? row >= viewportRowBatch.startRow && row <= viewportRowBatch.endRow : false;
22390
- const batchedCell = batchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess', _1467 => _1467.cells, 'access', _1468 => _1468.get, 'call', _1469 => _1469(cacheKey)]) : void 0;
22391
- const worksheetMergedSecondary = _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _1470 => _1470.isMergedSecondary, 'call', _1471 => _1471(row, col)]), () => ( false));
22401
+ const batchedCell = batchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess', _1468 => _1468.cells, 'access', _1469 => _1469.get, 'call', _1470 => _1470(cacheKey)]) : void 0;
22402
+ const worksheetMergedSecondary = _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _1471 => _1471.isMergedSecondary, 'call', _1472 => _1472(row, col)]), () => ( false));
22392
22403
  if (!worksheet && !batchedCell) {
22393
22404
  const emptyData = {
22394
22405
  isMergedSecondary: false,
@@ -22396,7 +22407,7 @@ function XlsxGrid({
22396
22407
  backgroundColor: resolveSheetSurface(activeSheet, palette),
22397
22408
  borderBottom: "none",
22398
22409
  borderRight: "none",
22399
- boxShadow: _optionalChain([activeSheet, 'optionalAccess', _1472 => _1472.showGridLines]) ? buildGridlineShadow(palette.border) : void 0,
22410
+ boxShadow: _optionalChain([activeSheet, 'optionalAccess', _1473 => _1473.showGridLines]) ? buildGridlineShadow(palette.border) : void 0,
22400
22411
  padding: DEFAULT_CELL_PADDING,
22401
22412
  verticalAlign: "bottom",
22402
22413
  whiteSpace: "nowrap"
@@ -22406,7 +22417,7 @@ function XlsxGrid({
22406
22417
  cellRenderCacheRef.current.set(cacheKey, emptyData);
22407
22418
  return emptyData;
22408
22419
  }
22409
- if (_optionalChain([batchedCell, 'optionalAccess', _1473 => _1473.isMergedSecondary]) || worksheetMergedSecondary) {
22420
+ if (_optionalChain([batchedCell, 'optionalAccess', _1474 => _1474.isMergedSecondary]) || worksheetMergedSecondary) {
22410
22421
  const mergedSecondaryData = {
22411
22422
  isMergedSecondary: true,
22412
22423
  style: {},
@@ -22415,7 +22426,7 @@ function XlsxGrid({
22415
22426
  cellRenderCacheRef.current.set(cacheKey, mergedSecondaryData);
22416
22427
  return mergedSecondaryData;
22417
22428
  }
22418
- const merge = worksheet ? worksheet.getMergeSpan(row, col) : batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1474 => _1474.mergeSpan]) : null;
22429
+ const merge = worksheet ? worksheet.getMergeSpan(row, col) : batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1475 => _1475.mergeSpan]) : null;
22419
22430
  const resolveBaseResolvedStyle = (targetRow, targetCol) => {
22420
22431
  const targetCacheKey = `${targetRow}:${targetCol}`;
22421
22432
  const cachedBaseStyle = cellBaseRawStyleCacheRef.current.get(targetCacheKey);
@@ -22423,9 +22434,9 @@ function XlsxGrid({
22423
22434
  return cachedBaseStyle;
22424
22435
  }
22425
22436
  const targetBatchCoversRow = viewportRowBatch ? targetRow >= viewportRowBatch.startRow && targetRow <= viewportRowBatch.endRow : false;
22426
- const targetBatchedCell = targetBatchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess', _1475 => _1475.cells, 'access', _1476 => _1476.get, 'call', _1477 => _1477(targetCacheKey)]) : void 0;
22437
+ const targetBatchedCell = targetBatchCoversRow ? _optionalChain([viewportRowBatch, 'optionalAccess', _1476 => _1476.cells, 'access', _1477 => _1477.get, 'call', _1478 => _1478(targetCacheKey)]) : void 0;
22427
22438
  const targetInheritedStyle = resolveInheritedCellStyle2(activeSheet, targetRow, targetCol);
22428
- const targetWorksheetStyle = targetBatchCoversRow ? _nullishCoalesce(_optionalChain([targetBatchedCell, 'optionalAccess', _1478 => _1478.style]), () => ( null)) : _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _1479 => _1479.getCellStyleAt, 'call', _1480 => _1480(targetRow, targetCol)]), () => ( null));
22439
+ const targetWorksheetStyle = targetBatchCoversRow ? _nullishCoalesce(_optionalChain([targetBatchedCell, 'optionalAccess', _1479 => _1479.style]), () => ( null)) : _nullishCoalesce(_optionalChain([worksheet, 'optionalAccess', _1480 => _1480.getCellStyleAt, 'call', _1481 => _1481(targetRow, targetCol)]), () => ( null));
22429
22440
  const targetRawStyle = mergeResolvedCellStyle(targetInheritedStyle, targetWorksheetStyle, {
22430
22441
  replaceXfSubtrees: true
22431
22442
  });
@@ -22439,8 +22450,8 @@ function XlsxGrid({
22439
22450
  return resolvedStyle;
22440
22451
  };
22441
22452
  const table = getTableAtCell(effectiveTables, row, col);
22442
- const mergeRowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1481 => _1481.rowSpan]), () => ( 1)));
22443
- const mergeColSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1482 => _1482.colSpan]), () => ( 1)));
22453
+ const mergeRowSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1482 => _1482.rowSpan]), () => ( 1)));
22454
+ const mergeColSpan = Math.max(1, _nullishCoalesce(_optionalChain([merge, 'optionalAccess', _1483 => _1483.colSpan]), () => ( 1)));
22444
22455
  let mergedBorderOverlay = null;
22445
22456
  if (mergeRowSpan > 1 || mergeColSpan > 1) {
22446
22457
  const mergedBorderOverlayCacheKey = `${row}:${col}:${mergeRowSpan}:${mergeColSpan}`;
@@ -22462,7 +22473,7 @@ function XlsxGrid({
22462
22473
  let displayValue = null;
22463
22474
  const readDisplayValue = () => {
22464
22475
  if (displayValue === null) {
22465
- displayValue = batchCoversRow || !worksheet ? _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _1483 => _1483.value]), () => ( "")) : getCellDisplayValue(worksheet, row, col, activeSheet, locale);
22476
+ displayValue = batchCoversRow || !worksheet ? _nullishCoalesce(_optionalChain([batchedCell, 'optionalAccess', _1484 => _1484.value]), () => ( "")) : getCellDisplayValue(worksheet, row, col, activeSheet, locale);
22466
22477
  }
22467
22478
  return displayValue;
22468
22479
  };
@@ -22473,13 +22484,13 @@ function XlsxGrid({
22473
22484
  () => worksheet ? getCellNumericValue(worksheet, row, col) : getBatchedCellNumericValue(batchedCell),
22474
22485
  readDisplayValue,
22475
22486
  worksheet,
22476
- _optionalChain([viewportRowBatch, 'optionalAccess', _1484 => _1484.cells])
22487
+ _optionalChain([viewportRowBatch, 'optionalAccess', _1485 => _1485.cells])
22477
22488
  );
22478
22489
  const finalResolvedStyle = mergeResolvedCellStyle(resolvedMergedStyle, conditionalCellStyle);
22479
- const alignment = _optionalChain([finalResolvedStyle, 'optionalAccess', _1485 => _1485.alignment]);
22480
- const textRotationDeg = resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess', _1486 => _1486.rotation]), () => ( _optionalChain([alignment, 'optionalAccess', _1487 => _1487.textRotation]))));
22490
+ const alignment = _optionalChain([finalResolvedStyle, 'optionalAccess', _1486 => _1486.alignment]);
22491
+ const textRotationDeg = resolveSpreadsheetTextRotation(_nullishCoalesce(_optionalChain([alignment, 'optionalAccess', _1487 => _1487.rotation]), () => ( _optionalChain([alignment, 'optionalAccess', _1488 => _1488.textRotation]))));
22481
22492
  const headerRowCount = table ? Math.max(table.headerRowCount, 1) : 0;
22482
- const rawHyperlink = batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1488 => _1488.hyperlink]) : _optionalChain([worksheet, 'optionalAccess', _1489 => _1489.getHyperlinkAt, 'call', _1490 => _1490(row, col)]);
22493
+ const rawHyperlink = batchCoversRow ? _optionalChain([batchedCell, 'optionalAccess', _1489 => _1489.hyperlink]) : _optionalChain([worksheet, 'optionalAccess', _1490 => _1490.getHyperlinkAt, 'call', _1491 => _1491(row, col)]);
22483
22494
  const sparkline = _nullishCoalesce(sparklinesByCell.get(cacheKey), () => ( null));
22484
22495
  const sparklineValues = sparkline && worksheet ? sparkline.range.start.row === sparkline.range.end.row ? Array.from(
22485
22496
  { length: Math.abs(sparkline.range.end.col - sparkline.range.start.col) + 1 },
@@ -22496,13 +22507,13 @@ function XlsxGrid({
22496
22507
  sparkline.range.start.col
22497
22508
  )
22498
22509
  ) : null;
22499
- const checkboxState = _optionalChain([finalResolvedStyle, 'optionalAccess', _1491 => _1491.cellControl]) && worksheet ? getCellBooleanValue(worksheet, row, col) : null;
22510
+ const checkboxState = _optionalChain([finalResolvedStyle, 'optionalAccess', _1492 => _1492.cellControl]) && worksheet ? getCellBooleanValue(worksheet, row, col) : null;
22500
22511
  const chartHighlight = resolveCellChartHighlight({ row, col }, activeSheetChartHighlights);
22501
22512
  const nextData = {
22502
22513
  canvas: void 0,
22503
22514
  chartHighlight,
22504
22515
  checkboxState,
22505
- colSpan: _optionalChain([merge, 'optionalAccess', _1492 => _1492.colSpan]),
22516
+ colSpan: _optionalChain([merge, 'optionalAccess', _1493 => _1493.colSpan]),
22506
22517
  conditionalDataBar: worksheet ? resolveConditionalDataBarForCell(
22507
22518
  row,
22508
22519
  col,
@@ -22526,15 +22537,15 @@ function XlsxGrid({
22526
22537
  ) : null,
22527
22538
  hyperlink: _nullishCoalesce(rawHyperlink, () => ( null)),
22528
22539
  isMergedSecondary: false,
22529
- shrinkToFit: _optionalChain([alignment, 'optionalAccess', _1493 => _1493.shrinkToFit]) === true,
22540
+ shrinkToFit: _optionalChain([alignment, 'optionalAccess', _1494 => _1494.shrinkToFit]) === true,
22530
22541
  isTableHeader: Boolean(table && row >= table.start.row && row < table.start.row + headerRowCount),
22531
- rowSpan: _optionalChain([merge, 'optionalAccess', _1494 => _1494.rowSpan]),
22542
+ rowSpan: _optionalChain([merge, 'optionalAccess', _1495 => _1495.rowSpan]),
22532
22543
  sparkline: sparkline && sparklineValues ? { config: sparkline, values: sparklineValues } : null,
22533
- style: scaleCssProperties(buildCellStyle(finalResolvedStyle, palette, _optionalChain([activeSheet, 'optionalAccess', _1495 => _1495.themePalette]), {
22534
- generalAlignment: worksheet ? getCellGeneralAlignment(worksheet, row, col) : _optionalChain([batchedCell, 'optionalAccess', _1496 => _1496.generalAlignment]),
22535
- showGridLines: _optionalChain([activeSheet, 'optionalAccess', _1497 => _1497.showGridLines])
22544
+ style: scaleCssProperties(buildCellStyle(finalResolvedStyle, palette, _optionalChain([activeSheet, 'optionalAccess', _1496 => _1496.themePalette]), {
22545
+ generalAlignment: worksheet ? getCellGeneralAlignment(worksheet, row, col) : _optionalChain([batchedCell, 'optionalAccess', _1497 => _1497.generalAlignment]),
22546
+ showGridLines: _optionalChain([activeSheet, 'optionalAccess', _1498 => _1498.showGridLines])
22536
22547
  }), zoomFactor),
22537
- usesGeneralAlignment: !_optionalChain([alignment, 'optionalAccess', _1498 => _1498.horizontal]) || alignment.horizontal === "general",
22548
+ usesGeneralAlignment: !_optionalChain([alignment, 'optionalAccess', _1499 => _1499.horizontal]) || alignment.horizontal === "general",
22538
22549
  textRotationDeg,
22539
22550
  validation: resolveCellDataValidation(row, col, activeSheet),
22540
22551
  value: sparkline ? "" : checkboxState !== null ? "" : readDisplayValue()
@@ -22551,9 +22562,9 @@ function XlsxGrid({
22551
22562
  isMerged: Boolean(nextData.colSpan || nextData.rowSpan),
22552
22563
  isTableHeader: Boolean(nextData.isTableHeader),
22553
22564
  resolvedStyle: { ...nextData.style },
22554
- sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1499 => _1499.name]), () => ( "")),
22565
+ sheetName: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1500 => _1500.name]), () => ( "")),
22555
22566
  value: nextData.value,
22556
- workbookSheetIndex: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1500 => _1500.workbookSheetIndex]), () => ( -1))
22567
+ workbookSheetIndex: _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1501 => _1501.workbookSheetIndex]), () => ( -1))
22557
22568
  });
22558
22569
  if (styleOverrides) {
22559
22570
  nextData.style = { ...nextData.style, ...styleOverrides };
@@ -22673,7 +22684,7 @@ function XlsxGrid({
22673
22684
  ]);
22674
22685
  _chunkOGZ6ROZCcjs.h.call(void 0, () => {
22675
22686
  conditionalFormatMetricsCacheRef.current.clear();
22676
- }, [_optionalChain([activeSheet, 'optionalAccess', _1501 => _1501.conditionalFormatRules]), _optionalChain([activeSheet, 'optionalAccess', _1502 => _1502.workbookSheetIndex]), revision]);
22687
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1502 => _1502.conditionalFormatRules]), _optionalChain([activeSheet, 'optionalAccess', _1503 => _1503.workbookSheetIndex]), revision]);
22677
22688
  const selectionOverlay = _chunkOGZ6ROZCcjs.T.call(void 0, () => {
22678
22689
  if (!displayedSelection) {
22679
22690
  return null;
@@ -22722,11 +22733,11 @@ function XlsxGrid({
22722
22733
  }
22723
22734
  setDisplayRowLimit((current) => Math.max(current, requiredRows));
22724
22735
  setDisplayColLimit((current) => Math.max(current, requiredCols));
22725
- }, [_optionalChain([activeSheet, 'optionalAccess', _1503 => _1503.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1504 => _1504.maxUsedRow]), highlightedCellRanges, activeSheetIndex, isWorkerBacked]);
22736
+ }, [_optionalChain([activeSheet, 'optionalAccess', _1504 => _1504.maxUsedCol]), _optionalChain([activeSheet, 'optionalAccess', _1505 => _1505.maxUsedRow]), highlightedCellRanges, activeSheetIndex, isWorkerBacked]);
22726
22737
  _chunkOGZ6ROZCcjs.h.call(void 0, () => {
22727
22738
  const scroller = scrollRef.current;
22728
22739
  const target = rangeHighlightRects.find(({ highlight: highlight2 }) => highlight2.autoScroll);
22729
- if (!scroller || !_optionalChain([target, 'optionalAccess', _1505 => _1505.rect]) || scrolledHighlightRef.current === target.highlight || isLoading || scroller.clientWidth === 0 || scroller.clientHeight === 0 || target.highlight.kind !== "columns" && displayRowLimit <= target.range.end.row || target.highlight.kind !== "rows" && displayColLimit <= target.range.end.col) {
22740
+ if (!scroller || !_optionalChain([target, 'optionalAccess', _1506 => _1506.rect]) || scrolledHighlightRef.current === target.highlight || isLoading || scroller.clientWidth === 0 || scroller.clientHeight === 0 || target.highlight.kind !== "columns" && displayRowLimit <= target.range.end.row || target.highlight.kind !== "rows" && displayColLimit <= target.range.end.col) {
22730
22741
  return;
22731
22742
  }
22732
22743
  const { highlight, rect } = target;
@@ -22749,11 +22760,11 @@ function XlsxGrid({
22749
22760
  () => domExpandedWindow.colIndices.map((index) => {
22750
22761
  const virtualCol = colVirtualItemByIndex.get(index);
22751
22762
  return {
22752
- end: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1506 => _1506.end]), () => ( (_nullishCoalesce(colPrefixSums[index + 1], () => ( 0))))),
22763
+ end: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1507 => _1507.end]), () => ( (_nullishCoalesce(colPrefixSums[index + 1], () => ( 0))))),
22753
22764
  index,
22754
22765
  key: _nullishCoalesce(visibleCols[index], () => ( index)),
22755
- size: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1507 => _1507.size]), () => ( (_nullishCoalesce(displayEffectiveColWidths[index], () => ( displayDefaultColWidth))))),
22756
- start: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1508 => _1508.start]), () => ( (_nullishCoalesce(colPrefixSums[index], () => ( 0)))))
22766
+ size: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1508 => _1508.size]), () => ( (_nullishCoalesce(displayEffectiveColWidths[index], () => ( displayDefaultColWidth))))),
22767
+ start: _nullishCoalesce(_optionalChain([virtualCol, 'optionalAccess', _1509 => _1509.start]), () => ( (_nullishCoalesce(colPrefixSums[index], () => ( 0)))))
22757
22768
  };
22758
22769
  }),
22759
22770
  [colPrefixSums, colVirtualItemByIndex, displayDefaultColWidth, displayEffectiveColWidths, domExpandedWindow.colIndices, visibleCols]
@@ -22874,8 +22885,8 @@ function XlsxGrid({
22874
22885
  };
22875
22886
  }, [canvasVisibleColItems, canvasVisibleRowItems, colIndexByActual, frozenCols, frozenRows, rowIndexByActual]);
22876
22887
  const totalContentWidth = _nullishCoalesce(colPrefixSums[colPrefixSums.length - 1], () => ( 0));
22877
- const leadingColumnSpacerWidth = shouldVirtualizeCols ? _nullishCoalesce(_optionalChain([virtualCols, 'access', _1509 => _1509[0], 'optionalAccess', _1510 => _1510.start]), () => ( 0)) : 0;
22878
- const trailingColumnSpacerWidth = shouldVirtualizeCols ? totalContentWidth - (_nullishCoalesce(_optionalChain([virtualCols, 'access', _1511 => _1511[virtualCols.length - 1], 'optionalAccess', _1512 => _1512.end]), () => ( 0))) : 0;
22888
+ const leadingColumnSpacerWidth = shouldVirtualizeCols ? _nullishCoalesce(_optionalChain([virtualCols, 'access', _1510 => _1510[0], 'optionalAccess', _1511 => _1511.start]), () => ( 0)) : 0;
22889
+ const trailingColumnSpacerWidth = shouldVirtualizeCols ? totalContentWidth - (_nullishCoalesce(_optionalChain([virtualCols, 'access', _1512 => _1512[virtualCols.length - 1], 'optionalAccess', _1513 => _1513.end]), () => ( 0))) : 0;
22879
22890
  const imageRects = _chunkOGZ6ROZCcjs.T.call(void 0,
22880
22891
  () => showImages ? images.map((image) => ({
22881
22892
  image,
@@ -23079,8 +23090,8 @@ function XlsxGrid({
23079
23090
  const normalized = normalizeRange2(range);
23080
23091
  const isSingleCellSelection = normalized.start.row === normalized.end.row && normalized.start.col === normalized.end.col;
23081
23092
  const mergedRange = isSingleCellSelection ? findMergedRange(normalized.start) : null;
23082
- const startCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess', _1513 => _1513.start]), () => ( normalized.start));
23083
- const endCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess', _1514 => _1514.end]), () => ( normalized.end));
23093
+ const startCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess', _1514 => _1514.start]), () => ( normalized.start));
23094
+ const endCell = _nullishCoalesce(_optionalChain([mergedRange, 'optionalAccess', _1515 => _1515.end]), () => ( normalized.end));
23084
23095
  const startRowIndex = rowIndexByActual.get(startCell.row);
23085
23096
  const endRowIndex = rowIndexByActual.get(endCell.row);
23086
23097
  const startColIndex = colIndexByActual.get(startCell.col);
@@ -23315,14 +23326,14 @@ function XlsxGrid({
23315
23326
  const applyPreviewOverlay = _chunkOGZ6ROZCcjs.q.call(void 0, (range, options) => {
23316
23327
  const overlays = experimentalCanvas ? [...selectionPaneOverlayRefs.current.values()] : [selectionOverlayRef.current];
23317
23328
  if (!range) {
23318
- if (_optionalChain([options, 'optionalAccess', _1515 => _1515.updateHeaderSelection]) !== false) {
23329
+ if (_optionalChain([options, 'optionalAccess', _1516 => _1516.updateHeaderSelection]) !== false) {
23319
23330
  applyHeaderSelection(range);
23320
23331
  }
23321
23332
  return;
23322
23333
  }
23323
- const nextRect = experimentalCanvas || _optionalChain([options, 'optionalAccess', _1516 => _1516.preferGeometry]) ? _nullishCoalesce(resolveGeometryOverlayRect(range), () => ( resolveOverlayRect(range))) : _optionalChain([selectionDragRef, 'access', _1517 => _1517.current, 'optionalAccess', _1518 => _1518.didDrag]) || fillDragRef.current ? _nullishCoalesce(_nullishCoalesce(resolveDragPreviewRect(range), () => ( resolveGeometryOverlayRect(range))), () => ( resolveOverlayRect(range))) : resolveOverlayRect(range);
23334
+ const nextRect = experimentalCanvas || _optionalChain([options, 'optionalAccess', _1517 => _1517.preferGeometry]) ? _nullishCoalesce(resolveGeometryOverlayRect(range), () => ( resolveOverlayRect(range))) : _optionalChain([selectionDragRef, 'access', _1518 => _1518.current, 'optionalAccess', _1519 => _1519.didDrag]) || fillDragRef.current ? _nullishCoalesce(_nullishCoalesce(resolveDragPreviewRect(range), () => ( resolveGeometryOverlayRect(range))), () => ( resolveOverlayRect(range))) : resolveOverlayRect(range);
23324
23335
  if (!nextRect) {
23325
- if (_optionalChain([options, 'optionalAccess', _1519 => _1519.updateHeaderSelection]) !== false) {
23336
+ if (_optionalChain([options, 'optionalAccess', _1520 => _1520.updateHeaderSelection]) !== false) {
23326
23337
  applyHeaderSelection(range);
23327
23338
  }
23328
23339
  return;
@@ -23344,7 +23355,7 @@ function XlsxGrid({
23344
23355
  fillHandle.style.top = `${nextRect.top + nextRect.height - 4 * zoomFactor}px`;
23345
23356
  }
23346
23357
  }
23347
- if (_optionalChain([options, 'optionalAccess', _1520 => _1520.updateHeaderSelection]) !== false) {
23358
+ if (_optionalChain([options, 'optionalAccess', _1521 => _1521.updateHeaderSelection]) !== false) {
23348
23359
  applyHeaderSelection(range);
23349
23360
  }
23350
23361
  }, [applyHeaderSelection, experimentalCanvas, resolveDragPreviewRect, resolveGeometryOverlayRect, resolveOverlayRect, zoomFactor]);
@@ -23385,7 +23396,7 @@ function XlsxGrid({
23385
23396
  return;
23386
23397
  }
23387
23398
  const cellData = getCellData(cell.row, cell.col);
23388
- const shouldShow = _optionalChain([cellData, 'access', _1521 => _1521.validation, 'optionalAccess', _1522 => _1522.validationType]) === "list" && cellData.validation.showDropdown;
23399
+ const shouldShow = _optionalChain([cellData, 'access', _1522 => _1522.validation, 'optionalAccess', _1523 => _1523.validationType]) === "list" && cellData.validation.showDropdown;
23389
23400
  const rect = shouldShow ? resolveOverlayRect({ start: cell, end: cell }) : null;
23390
23401
  if (!rect) {
23391
23402
  overlay.style.opacity = "0";
@@ -23429,7 +23440,7 @@ function XlsxGrid({
23429
23440
  }, [applyPreviewOverlay]);
23430
23441
  const resolveResizeGuidePositionFromClient = _chunkOGZ6ROZCcjs.q.call(void 0, (type, clientPosition) => {
23431
23442
  const scroller = scrollRef.current;
23432
- const scrollerRect = _optionalChain([scroller, 'optionalAccess', _1523 => _1523.getBoundingClientRect, 'call', _1524 => _1524()]);
23443
+ const scrollerRect = _optionalChain([scroller, 'optionalAccess', _1524 => _1524.getBoundingClientRect, 'call', _1525 => _1525()]);
23433
23444
  if (!scroller || !scrollerRect) {
23434
23445
  return null;
23435
23446
  }
@@ -23481,7 +23492,7 @@ function XlsxGrid({
23481
23492
  });
23482
23493
  }
23483
23494
  function handlePointerUp(event) {
23484
- if (_optionalChain([resizeStateRef, 'access', _1525 => _1525.current, 'optionalAccess', _1526 => _1526.pointerId]) === event.pointerId) {
23495
+ if (_optionalChain([resizeStateRef, 'access', _1526 => _1526.current, 'optionalAccess', _1527 => _1527.pointerId]) === event.pointerId) {
23485
23496
  const resizeState = resizeStateRef.current;
23486
23497
  const preview = pendingResizePreviewRef.current;
23487
23498
  resizeStateRef.current = null;
@@ -23571,7 +23582,7 @@ function XlsxGrid({
23571
23582
  const cleanup = pendingSelectionDragCleanupRef.current;
23572
23583
  pendingSelectionDragCleanupRef.current = null;
23573
23584
  pendingSelectionDragRef.current = null;
23574
- _optionalChain([cleanup, 'optionalCall', _1527 => _1527()]);
23585
+ _optionalChain([cleanup, 'optionalCall', _1528 => _1528()]);
23575
23586
  }
23576
23587
  function finishPendingSelectionDrag() {
23577
23588
  const pendingState = pendingSelectionDragRef.current;
@@ -23586,7 +23597,7 @@ function XlsxGrid({
23586
23597
  return;
23587
23598
  }
23588
23599
  clearPendingSelectionDrag();
23589
- cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1528 => _1528.current, 'optionalAccess', _1529 => _1529.getBoundingClientRect, 'call', _1530 => _1530()]), () => ( null));
23600
+ cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1529 => _1529.current, 'optionalAccess', _1530 => _1530.getBoundingClientRect, 'call', _1531 => _1531()]), () => ( null));
23590
23601
  pendingState.didDrag = true;
23591
23602
  selectionDragRef.current = pendingState;
23592
23603
  selectionPreviewRangeRef.current = pendingState.previewRange;
@@ -23599,10 +23610,10 @@ function XlsxGrid({
23599
23610
  function installPendingSelectionDragListeners(pointerId, target) {
23600
23611
  const existingCleanup = pendingSelectionDragCleanupRef.current;
23601
23612
  pendingSelectionDragCleanupRef.current = null;
23602
- _optionalChain([existingCleanup, 'optionalCall', _1531 => _1531()]);
23613
+ _optionalChain([existingCleanup, 'optionalCall', _1532 => _1532()]);
23603
23614
  const pointerTarget = target;
23604
23615
  try {
23605
- _optionalChain([pointerTarget, 'access', _1532 => _1532.setPointerCapture, 'optionalCall', _1533 => _1533(pointerId)]);
23616
+ _optionalChain([pointerTarget, 'access', _1533 => _1533.setPointerCapture, 'optionalCall', _1534 => _1534(pointerId)]);
23606
23617
  } catch (e29) {
23607
23618
  }
23608
23619
  const handlePointerMove = (event) => {
@@ -23637,15 +23648,15 @@ function XlsxGrid({
23637
23648
  target.removeEventListener("pointerup", handlePointerEnd);
23638
23649
  target.removeEventListener("pointercancel", handlePointerEnd);
23639
23650
  try {
23640
- if (_optionalChain([pointerTarget, 'access', _1534 => _1534.hasPointerCapture, 'optionalCall', _1535 => _1535(pointerId)])) {
23641
- _optionalChain([pointerTarget, 'access', _1536 => _1536.releasePointerCapture, 'optionalCall', _1537 => _1537(pointerId)]);
23651
+ if (_optionalChain([pointerTarget, 'access', _1535 => _1535.hasPointerCapture, 'optionalCall', _1536 => _1536(pointerId)])) {
23652
+ _optionalChain([pointerTarget, 'access', _1537 => _1537.releasePointerCapture, 'optionalCall', _1538 => _1538(pointerId)]);
23642
23653
  }
23643
23654
  } catch (e30) {
23644
23655
  }
23645
23656
  };
23646
23657
  }
23647
23658
  function installSelectionDragListeners(pointerId) {
23648
- _optionalChain([selectionDragCleanupRef, 'access', _1538 => _1538.current, 'optionalCall', _1539 => _1539()]);
23659
+ _optionalChain([selectionDragCleanupRef, 'access', _1539 => _1539.current, 'optionalCall', _1540 => _1540()]);
23649
23660
  let pendingClientPoint = null;
23650
23661
  let pointerMoveFrame = null;
23651
23662
  const flushPointerMove = () => {
@@ -23690,23 +23701,23 @@ function XlsxGrid({
23690
23701
  pendingClientPoint = null;
23691
23702
  const dragState = selectionDragRef.current;
23692
23703
  const nextCell = dragState ? resolveDraggedSelectionCell(dragState, event.clientX, event.clientY) : null;
23693
- let nextRange = _nullishCoalesce(_optionalChain([dragState, 'optionalAccess', _1540 => _1540.previewRange]), () => ( null));
23694
- if (_optionalChain([dragState, 'optionalAccess', _1541 => _1541.didDrag]) && nextCell && dragState) {
23704
+ let nextRange = _nullishCoalesce(_optionalChain([dragState, 'optionalAccess', _1541 => _1541.previewRange]), () => ( null));
23705
+ if (_optionalChain([dragState, 'optionalAccess', _1542 => _1542.didDrag]) && nextCell && dragState) {
23695
23706
  nextRange = buildDraggedSelectionRange(dragState, nextCell);
23696
23707
  }
23697
23708
  selectionDragRef.current = null;
23698
23709
  cachedScrollerRectRef.current = null;
23699
- if (nextRange && (_optionalChain([dragState, 'optionalAccess', _1542 => _1542.didDrag]) || !_optionalChain([dragState, 'optionalAccess', _1543 => _1543.committedOnPointerDown]))) {
23710
+ if (nextRange && (_optionalChain([dragState, 'optionalAccess', _1543 => _1543.didDrag]) || !_optionalChain([dragState, 'optionalAccess', _1544 => _1544.committedOnPointerDown]))) {
23700
23711
  selectionPreviewRangeRef.current = nextRange;
23701
23712
  displayedSelectionRef.current = nextRange;
23702
- if (_optionalChain([dragState, 'optionalAccess', _1544 => _1544.axis]) === "column") {
23713
+ if (_optionalChain([dragState, 'optionalAccess', _1545 => _1545.axis]) === "column") {
23703
23714
  const normalized = normalizeRange2(nextRange);
23704
23715
  axisSelectionRef.current = {
23705
23716
  axis: "column",
23706
23717
  startCol: normalized.start.col,
23707
23718
  endCol: normalized.end.col
23708
23719
  };
23709
- } else if (_optionalChain([dragState, 'optionalAccess', _1545 => _1545.axis]) === "row") {
23720
+ } else if (_optionalChain([dragState, 'optionalAccess', _1546 => _1546.axis]) === "row") {
23710
23721
  const normalized = normalizeRange2(nextRange);
23711
23722
  axisSelectionRef.current = {
23712
23723
  axis: "row",
@@ -23723,7 +23734,7 @@ function XlsxGrid({
23723
23734
  setInteractionMode("idle");
23724
23735
  document.body.style.cursor = "";
23725
23736
  document.body.style.userSelect = "";
23726
- _optionalChain([selectionDragCleanupRef, 'access', _1546 => _1546.current, 'optionalCall', _1547 => _1547()]);
23737
+ _optionalChain([selectionDragCleanupRef, 'access', _1547 => _1547.current, 'optionalCall', _1548 => _1548()]);
23727
23738
  selectionDragCleanupRef.current = null;
23728
23739
  };
23729
23740
  window.addEventListener("pointermove", handlePointerMove);
@@ -23741,7 +23752,7 @@ function XlsxGrid({
23741
23752
  };
23742
23753
  }
23743
23754
  function installFillDragListeners(pointerId, sourceRange) {
23744
- _optionalChain([fillDragCleanupRef, 'access', _1548 => _1548.current, 'optionalCall', _1549 => _1549()]);
23755
+ _optionalChain([fillDragCleanupRef, 'access', _1549 => _1549.current, 'optionalCall', _1550 => _1550()]);
23745
23756
  let pendingClientPoint = null;
23746
23757
  let pointerMoveFrame = null;
23747
23758
  const flushPointerMove = () => {
@@ -23779,7 +23790,7 @@ function XlsxGrid({
23779
23790
  if (nextCell) {
23780
23791
  updateFillPreview(nextCell);
23781
23792
  }
23782
- const nextRange = _nullishCoalesce(_optionalChain([fillDragRef, 'access', _1550 => _1550.current, 'optionalAccess', _1551 => _1551.previewRange]), () => ( sourceRange));
23793
+ const nextRange = _nullishCoalesce(_optionalChain([fillDragRef, 'access', _1551 => _1551.current, 'optionalAccess', _1552 => _1552.previewRange]), () => ( sourceRange));
23783
23794
  fillDragRef.current = null;
23784
23795
  cachedScrollerRectRef.current = null;
23785
23796
  setInteractionMode("idle");
@@ -23787,7 +23798,7 @@ function XlsxGrid({
23787
23798
  document.body.style.cursor = "";
23788
23799
  document.body.style.userSelect = "";
23789
23800
  fillSelection(nextRange);
23790
- _optionalChain([fillDragCleanupRef, 'access', _1552 => _1552.current, 'optionalCall', _1553 => _1553()]);
23801
+ _optionalChain([fillDragCleanupRef, 'access', _1553 => _1553.current, 'optionalCall', _1554 => _1554()]);
23791
23802
  fillDragCleanupRef.current = null;
23792
23803
  };
23793
23804
  window.addEventListener("pointermove", handlePointerMove);
@@ -23850,7 +23861,7 @@ function XlsxGrid({
23850
23861
  const inside = current && cell.row >= current.start.row && cell.row <= current.end.row && cell.col >= current.start.col && cell.col <= current.end.col;
23851
23862
  let range = inside ? current : { start: cell, end: cell };
23852
23863
  if (kind !== "cell") {
23853
- const sameAxis = _optionalChain([axisSelectionRef, 'access', _1554 => _1554.current, 'optionalAccess', _1555 => _1555.axis]) === kind;
23864
+ const sameAxis = _optionalChain([axisSelectionRef, 'access', _1555 => _1555.current, 'optionalAccess', _1556 => _1556.axis]) === kind;
23854
23865
  range = getContextExtent(kind, sameAxis && inside ? range : { start: cell, end: cell });
23855
23866
  selectContextExtent(kind, range);
23856
23867
  } else if (!inside) {
@@ -24009,6 +24020,10 @@ function XlsxGrid({
24009
24020
  }
24010
24021
  const direction = sortState && sortState.tableName === table.name && sortState.columnIndex === tableColumn.index ? sortState.direction : null;
24011
24022
  const triggerIcon = direction === "ascending" ? "\u25B2" : direction === "descending" ? "\u25BC" : "\u25BE";
24023
+ const triggerStyle = {
24024
+ ...resolveTableHeaderTriggerStyle(palette, zoomFactor),
24025
+ ...experimentalCanvas ? { bottom: zoomFactor, right: zoomFactor, top: void 0, maxHeight: "100%", maxWidth: "100%" } : {}
24026
+ };
24012
24027
  if (renderTableHeaderMenu) {
24013
24028
  return renderTableHeaderMenu({
24014
24029
  cell,
@@ -24027,7 +24042,7 @@ function XlsxGrid({
24027
24042
  onPointerDown: (event) => {
24028
24043
  event.stopPropagation();
24029
24044
  },
24030
- style: resolveTableHeaderTriggerStyle(palette, zoomFactor),
24045
+ style: { ...triggerStyle, pointerEvents: "auto" },
24031
24046
  type: "button"
24032
24047
  }
24033
24048
  });
@@ -24037,7 +24052,7 @@ function XlsxGrid({
24037
24052
  {
24038
24053
  "aria-haspopup": "menu",
24039
24054
  "aria-label": `Open menu for ${tableColumn.name}`,
24040
- "aria-expanded": _optionalChain([openTableMenu, 'optionalAccess', _1556 => _1556.tableName]) === table.name && openTableMenu.col === cell.col && openTableMenu.row === cell.row,
24055
+ "aria-expanded": _optionalChain([openTableMenu, 'optionalAccess', _1557 => _1557.tableName]) === table.name && openTableMenu.col === cell.col && openTableMenu.row === cell.row,
24041
24056
  onPointerDown: (event) => {
24042
24057
  event.preventDefault();
24043
24058
  event.stopPropagation();
@@ -24049,10 +24064,7 @@ function XlsxGrid({
24049
24064
  (current) => current && current.tableName === table.name && current.row === cell.row && current.col === cell.col ? null : { col: cell.col, row: cell.row, tableName: table.name }
24050
24065
  );
24051
24066
  },
24052
- style: {
24053
- ...resolveTableHeaderTriggerStyle(palette, zoomFactor),
24054
- ...experimentalCanvas ? { bottom: zoomFactor, right: zoomFactor, top: void 0, maxHeight: "100%", maxWidth: "100%" } : {}
24055
- },
24067
+ style: triggerStyle,
24056
24068
  type: "button",
24057
24069
  children: experimentalCanvas ? null : triggerIcon
24058
24070
  }
@@ -24166,7 +24178,7 @@ function XlsxGrid({
24166
24178
  if (!canResizeHeaders) {
24167
24179
  return null;
24168
24180
  }
24169
- const scrollerRect = _optionalChain([scrollRef, 'access', _1557 => _1557.current, 'optionalAccess', _1558 => _1558.getBoundingClientRect, 'call', _1559 => _1559()]);
24181
+ const scrollerRect = _optionalChain([scrollRef, 'access', _1558 => _1558.current, 'optionalAccess', _1559 => _1559.getBoundingClientRect, 'call', _1560 => _1560()]);
24170
24182
  if (!scrollerRect) {
24171
24183
  return null;
24172
24184
  }
@@ -24179,7 +24191,7 @@ function XlsxGrid({
24179
24191
  return null;
24180
24192
  }, [canResizeHeaders, canvasColumnHeaderCells]);
24181
24193
  const resolveCanvasColumnHeaderTarget = _chunkOGZ6ROZCcjs.q.call(void 0, (clientX) => {
24182
- const scrollerRect = _optionalChain([scrollRef, 'access', _1560 => _1560.current, 'optionalAccess', _1561 => _1561.getBoundingClientRect, 'call', _1562 => _1562()]);
24194
+ const scrollerRect = _optionalChain([scrollRef, 'access', _1561 => _1561.current, 'optionalAccess', _1562 => _1562.getBoundingClientRect, 'call', _1563 => _1563()]);
24183
24195
  if (!scrollerRect) {
24184
24196
  return null;
24185
24197
  }
@@ -24195,7 +24207,7 @@ function XlsxGrid({
24195
24207
  if (!canResizeHeaders) {
24196
24208
  return null;
24197
24209
  }
24198
- const scrollerRect = _optionalChain([scrollRef, 'access', _1563 => _1563.current, 'optionalAccess', _1564 => _1564.getBoundingClientRect, 'call', _1565 => _1565()]);
24210
+ const scrollerRect = _optionalChain([scrollRef, 'access', _1564 => _1564.current, 'optionalAccess', _1565 => _1565.getBoundingClientRect, 'call', _1566 => _1566()]);
24199
24211
  if (!scrollerRect) {
24200
24212
  return null;
24201
24213
  }
@@ -24208,7 +24220,7 @@ function XlsxGrid({
24208
24220
  return null;
24209
24221
  }, [canResizeHeaders, canvasRowHeaderCells]);
24210
24222
  const resolveCanvasRowHeaderTarget = _chunkOGZ6ROZCcjs.q.call(void 0, (clientY) => {
24211
- const scrollerRect = _optionalChain([scrollRef, 'access', _1566 => _1566.current, 'optionalAccess', _1567 => _1567.getBoundingClientRect, 'call', _1568 => _1568()]);
24223
+ const scrollerRect = _optionalChain([scrollRef, 'access', _1567 => _1567.current, 'optionalAccess', _1568 => _1568.getBoundingClientRect, 'call', _1569 => _1569()]);
24212
24224
  if (!scrollerRect) {
24213
24225
  return null;
24214
24226
  }
@@ -24221,14 +24233,14 @@ function XlsxGrid({
24221
24233
  return null;
24222
24234
  }, [canvasRowHeaderCells]);
24223
24235
  const handleCanvasColumnHeaderPointerMove = _chunkOGZ6ROZCcjs.q.call(void 0, (event) => {
24224
- if (_optionalChain([resizeStateRef, 'access', _1569 => _1569.current, 'optionalAccess', _1570 => _1570.type]) === "column") {
24236
+ if (_optionalChain([resizeStateRef, 'access', _1570 => _1570.current, 'optionalAccess', _1571 => _1571.type]) === "column") {
24225
24237
  event.currentTarget.style.cursor = "col-resize";
24226
24238
  return;
24227
24239
  }
24228
24240
  event.currentTarget.style.cursor = resolveCanvasColumnResizeTarget(event.clientX) ? "col-resize" : "default";
24229
24241
  }, [resolveCanvasColumnResizeTarget]);
24230
24242
  const handleCanvasRowHeaderPointerMove = _chunkOGZ6ROZCcjs.q.call(void 0, (event) => {
24231
- if (_optionalChain([resizeStateRef, 'access', _1571 => _1571.current, 'optionalAccess', _1572 => _1572.type]) === "row") {
24243
+ if (_optionalChain([resizeStateRef, 'access', _1572 => _1572.current, 'optionalAccess', _1573 => _1573.type]) === "row") {
24232
24244
  event.currentTarget.style.cursor = "row-resize";
24233
24245
  return;
24234
24246
  }
@@ -24256,7 +24268,7 @@ function XlsxGrid({
24256
24268
  const column = getTableHeaderColumn(table, cell.row, cell.col);
24257
24269
  const columnRect = resolveCanvasColumnHeaderRect(cell.col);
24258
24270
  const rowRect = resolveCanvasRowHeaderRect(cell.row);
24259
- const viewportRect = _optionalChain([scrollRef, 'access', _1573 => _1573.current, 'optionalAccess', _1574 => _1574.getBoundingClientRect, 'call', _1575 => _1575()]);
24271
+ const viewportRect = _optionalChain([scrollRef, 'access', _1574 => _1574.current, 'optionalAccess', _1575 => _1575.getBoundingClientRect, 'call', _1576 => _1576()]);
24260
24272
  if (table && column && columnRect && rowRect && viewportRect) {
24261
24273
  const right = viewportRect.left + columnRect.left + columnRect.width - zoomFactor;
24262
24274
  const bottom = viewportRect.top + rowRect.top + rowRect.height - zoomFactor;
@@ -24266,7 +24278,6 @@ function XlsxGrid({
24266
24278
  if (editingCellRef.current) {
24267
24279
  commitEditingRef.current();
24268
24280
  }
24269
- commitSelectionRange({ start: cell, end: cell });
24270
24281
  setOpenTableMenu({ col: cell.col, row: cell.row, tableName: table.name });
24271
24282
  return;
24272
24283
  }
@@ -24525,7 +24536,7 @@ function XlsxGrid({
24525
24536
  return null;
24526
24537
  }
24527
24538
  context.setTransform(dpr, 0, 0, dpr, 0, 0);
24528
- if (_optionalChain([options, 'optionalAccess', _1576 => _1576.clear]) !== false) {
24539
+ if (_optionalChain([options, 'optionalAccess', _1577 => _1577.clear]) !== false) {
24529
24540
  context.clearRect(0, 0, width, height);
24530
24541
  }
24531
24542
  return context;
@@ -24639,7 +24650,7 @@ function XlsxGrid({
24639
24650
  if (shouldRepaintBody && (!bodyContexts.scroll || !bodyContexts.top || !bodyContexts.left || !bodyContexts.corner) || shouldRepaintHeaders && (!cornerContext || topFrozenHeaderCanvasWidth > 0 && !topHeaderContexts.frozen || topScrollHeaderCanvasWidth > 0 && !topHeaderContexts.scroll || leftFrozenHeaderCanvasHeight > 0 && !leftHeaderContexts.frozen || leftScrollHeaderCanvasHeight > 0 && !leftHeaderContexts.scroll)) {
24640
24651
  return;
24641
24652
  }
24642
- const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1577 => _1577.showGridLines]), () => ( true));
24653
+ const showGridLines = _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1578 => _1578.showGridLines]), () => ( true));
24643
24654
  const sheetSurface = resolveSheetSurface(activeSheet, palette);
24644
24655
  const deferredSpillTextsByPane = {
24645
24656
  corner: [],
@@ -24684,11 +24695,11 @@ function XlsxGrid({
24684
24695
  if (shape.paragraphs.length === 0) {
24685
24696
  return;
24686
24697
  }
24687
- const inset = _optionalChain([shape, 'access', _1578 => _1578.textBox, 'optionalAccess', _1579 => _1579.insetPx]);
24688
- const paddingLeft = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1580 => _1580.left]), () => ( 6))) * zoomFactor;
24689
- const paddingRight = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1581 => _1581.right]), () => ( 6))) * zoomFactor;
24690
- const paddingTop = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1582 => _1582.top]), () => ( 4))) * zoomFactor;
24691
- const paddingBottom = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1583 => _1583.bottom]), () => ( 4))) * zoomFactor;
24698
+ const inset = _optionalChain([shape, 'access', _1579 => _1579.textBox, 'optionalAccess', _1580 => _1580.insetPx]);
24699
+ const paddingLeft = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1581 => _1581.left]), () => ( 6))) * zoomFactor;
24700
+ const paddingRight = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1582 => _1582.right]), () => ( 6))) * zoomFactor;
24701
+ const paddingTop = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1583 => _1583.top]), () => ( 4))) * zoomFactor;
24702
+ const paddingBottom = (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1584 => _1584.bottom]), () => ( 4))) * zoomFactor;
24692
24703
  const textLeft = left + paddingLeft;
24693
24704
  const textTop = top + paddingTop;
24694
24705
  const textWidth = Math.max(0, width - paddingLeft - paddingRight);
@@ -24710,9 +24721,9 @@ function XlsxGrid({
24710
24721
  });
24711
24722
  const totalTextHeight = lineMetrics.reduce((total, metric) => total + metric.lineHeight, 0);
24712
24723
  let y2 = textTop;
24713
- if (_optionalChain([shape, 'access', _1584 => _1584.textBox, 'optionalAccess', _1585 => _1585.verticalAlign]) === "middle") {
24724
+ if (_optionalChain([shape, 'access', _1585 => _1585.textBox, 'optionalAccess', _1586 => _1586.verticalAlign]) === "middle") {
24714
24725
  y2 = textTop + Math.max(0, (textHeight - totalTextHeight) / 2);
24715
- } else if (_optionalChain([shape, 'access', _1586 => _1586.textBox, 'optionalAccess', _1587 => _1587.verticalAlign]) === "bottom") {
24726
+ } else if (_optionalChain([shape, 'access', _1587 => _1587.textBox, 'optionalAccess', _1588 => _1588.verticalAlign]) === "bottom") {
24716
24727
  y2 = textTop + Math.max(0, textHeight - totalTextHeight);
24717
24728
  }
24718
24729
  context.save();
@@ -24723,7 +24734,7 @@ function XlsxGrid({
24723
24734
  shape.paragraphs.forEach((paragraph, paragraphIndex) => {
24724
24735
  const metric = _nullishCoalesce(lineMetrics[paragraphIndex], () => ( { lineHeight: 14 * zoomFactor, widthPx: 0 }));
24725
24736
  let x2 = textLeft;
24726
- const align = _nullishCoalesce(_nullishCoalesce(paragraph.align, () => ( _optionalChain([shape, 'access', _1588 => _1588.textBox, 'optionalAccess', _1589 => _1589.horizontalAlign]))), () => ( "left"));
24737
+ const align = _nullishCoalesce(_nullishCoalesce(paragraph.align, () => ( _optionalChain([shape, 'access', _1589 => _1589.textBox, 'optionalAccess', _1590 => _1590.horizontalAlign]))), () => ( "left"));
24727
24738
  if (align === "center") {
24728
24739
  x2 = textLeft + Math.max(0, (textWidth - metric.widthPx) / 2);
24729
24740
  } else if (align === "right") {
@@ -24752,11 +24763,11 @@ function XlsxGrid({
24752
24763
  context.restore();
24753
24764
  };
24754
24765
  const drawBakedShape = (context, shape, rect) => {
24755
- const fillColor = _optionalChain([shape, 'access', _1590 => _1590.fill, 'optionalAccess', _1591 => _1591.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1592 => _1592.fill, 'optionalAccess', _1593 => _1593.color]), () => ( "transparent"));
24756
- const strokeColor = _optionalChain([shape, 'access', _1594 => _1594.stroke, 'optionalAccess', _1595 => _1595.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1596 => _1596.stroke, 'optionalAccess', _1597 => _1597.color]), () => ( "transparent"));
24757
- const lineWidth = Math.max(0, (_nullishCoalesce(_optionalChain([shape, 'access', _1598 => _1598.stroke, 'optionalAccess', _1599 => _1599.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * zoomFactor);
24766
+ const fillColor = _optionalChain([shape, 'access', _1591 => _1591.fill, 'optionalAccess', _1592 => _1592.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1593 => _1593.fill, 'optionalAccess', _1594 => _1594.color]), () => ( "transparent"));
24767
+ const strokeColor = _optionalChain([shape, 'access', _1595 => _1595.stroke, 'optionalAccess', _1596 => _1596.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1597 => _1597.stroke, 'optionalAccess', _1598 => _1598.color]), () => ( "transparent"));
24768
+ const lineWidth = Math.max(0, (_nullishCoalesce(_optionalChain([shape, 'access', _1599 => _1599.stroke, 'optionalAccess', _1600 => _1600.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * zoomFactor);
24758
24769
  const vectorShape = resolveShapeVector(shape);
24759
- const opacity = Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _1600 => _1600.fill, 'optionalAccess', _1601 => _1601.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _1602 => _1602.stroke, 'optionalAccess', _1603 => _1603.opacity]), () => ( 1)));
24770
+ const opacity = Math.min(_nullishCoalesce(_optionalChain([shape, 'access', _1601 => _1601.fill, 'optionalAccess', _1602 => _1602.opacity]), () => ( 1)), _nullishCoalesce(_optionalChain([shape, 'access', _1603 => _1603.stroke, 'optionalAccess', _1604 => _1604.opacity]), () => ( 1)));
24760
24771
  context.save();
24761
24772
  context.translate(rect.left + rect.width / 2, rect.top + rect.height / 2);
24762
24773
  if (shape.rotationDeg) {
@@ -24767,7 +24778,7 @@ function XlsxGrid({
24767
24778
  context.lineWidth = lineWidth;
24768
24779
  context.strokeStyle = strokeColor;
24769
24780
  context.fillStyle = fillColor;
24770
- applyCanvasShapeDash(context, _optionalChain([shape, 'access', _1604 => _1604.stroke, 'optionalAccess', _1605 => _1605.dash]), lineWidth);
24781
+ applyCanvasShapeDash(context, _optionalChain([shape, 'access', _1605 => _1605.stroke, 'optionalAccess', _1606 => _1606.dash]), lineWidth);
24771
24782
  const localLeft = -rect.width / 2;
24772
24783
  const localTop = -rect.height / 2;
24773
24784
  if (vectorShape && typeof Path2D !== "undefined") {
@@ -24953,13 +24964,13 @@ function XlsxGrid({
24953
24964
  drawnMergedAnchorKeys.add(anchorKey);
24954
24965
  }
24955
24966
  const displayRect = cellData.colSpan || cellData.rowSpan ? resolveCellDisplayRect(drawCell) : null;
24956
- const baseLeft = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1606 => _1606.left]), () => ( baseCellLeft));
24957
- const baseTop = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1607 => _1607.top]), () => ( baseCellTop));
24967
+ const baseLeft = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1607 => _1607.left]), () => ( baseCellLeft));
24968
+ const baseTop = _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1608 => _1608.top]), () => ( baseCellTop));
24958
24969
  const localRect = {
24959
- height: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1608 => _1608.height]), () => ( (_nullishCoalesce(displayEffectiveRowHeights[drawRowIndex], () => ( rowItem.size))))),
24970
+ height: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1609 => _1609.height]), () => ( (_nullishCoalesce(displayEffectiveRowHeights[drawRowIndex], () => ( rowItem.size))))),
24960
24971
  left: (useFrozenHorizontalPosition ? _nullishCoalesce(stickyLeftByCol.get(drawCell.col), () => ( baseLeft - drawingViewport.left)) : baseLeft - drawingViewport.left) - paneBoundsForCell.left,
24961
24972
  top: (useFrozenVerticalPosition ? _nullishCoalesce(stickyTopByRow.get(drawCell.row), () => ( baseTop - drawingViewport.top)) : baseTop - drawingViewport.top) - paneBoundsForCell.top,
24962
- width: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1609 => _1609.width]), () => ( (_nullishCoalesce(displayEffectiveColWidths[drawColIndex], () => ( colItem.size)))))
24973
+ width: _nullishCoalesce(_optionalChain([displayRect, 'optionalAccess', _1610 => _1610.width]), () => ( (_nullishCoalesce(displayEffectiveColWidths[drawColIndex], () => ( colItem.size)))))
24963
24974
  };
24964
24975
  const spillOffsetX = Math.min(0, _nullishCoalesce(cellData.spillOffsetX, () => ( 0)));
24965
24976
  const drawableLeft = localRect.left + spillOffsetX;
@@ -24974,7 +24985,7 @@ function XlsxGrid({
24974
24985
  canvasProfilePaintedCells += 1;
24975
24986
  const cellStyle = cellData.style;
24976
24987
  const canvasCellStyle = _nullishCoalesce(cellData.canvas, () => ( buildCanvasCellStyleCache(cellStyle)));
24977
- const fillColor = _nullishCoalesce(_optionalChain([cellData, 'access', _1610 => _1610.conditionalColorScale, 'optionalAccess', _1611 => _1611.color]), () => ( (typeof cellStyle.backgroundColor === "string" ? cellStyle.backgroundColor : sheetSurface)));
24988
+ const fillColor = _nullishCoalesce(_optionalChain([cellData, 'access', _1611 => _1611.conditionalColorScale, 'optionalAccess', _1612 => _1612.color]), () => ( (typeof cellStyle.backgroundColor === "string" ? cellStyle.backgroundColor : sheetSurface)));
24978
24989
  const gradientFill = !cellData.conditionalColorScale && typeof cellStyle.backgroundImage === "string" ? resolveCanvasGradientFill(paneContext, localRect, cellStyle.backgroundImage) : null;
24979
24990
  if (cellData.chartHighlight) {
24980
24991
  flushPendingGridlines();
@@ -25010,23 +25021,23 @@ function XlsxGrid({
25010
25021
  const rightNeighborCol = visibleCols[drawColIndex + Math.max(1, _nullishCoalesce(cellData.colSpan, () => ( 1)))];
25011
25022
  const rightNeighborCell = rightNeighborCol === void 0 ? null : { row: drawCell.row, col: rightNeighborCol };
25012
25023
  const rightNeighborData = rightNeighborCell ? getCellData(rightNeighborCell.row, rightNeighborCell.col) : null;
25013
- let rightNeighborLeftBorder = _optionalChain([rightNeighborData, 'optionalAccess', _1612 => _1612.isMergedSecondary]) ? null : _nullishCoalesce(_optionalChain([rightNeighborData, 'optionalAccess', _1613 => _1613.canvas, 'optionalAccess', _1614 => _1614.leftBorder]), () => ( parseCanvasBorderDeclaration(_optionalChain([rightNeighborData, 'optionalAccess', _1615 => _1615.style, 'access', _1616 => _1616.borderLeft]))));
25014
- if (rightNeighborLeftBorder == null && rightNeighborCell && _optionalChain([rightNeighborData, 'optionalAccess', _1617 => _1617.isMergedSecondary])) {
25024
+ let rightNeighborLeftBorder = _optionalChain([rightNeighborData, 'optionalAccess', _1613 => _1613.isMergedSecondary]) ? null : _nullishCoalesce(_optionalChain([rightNeighborData, 'optionalAccess', _1614 => _1614.canvas, 'optionalAccess', _1615 => _1615.leftBorder]), () => ( parseCanvasBorderDeclaration(_optionalChain([rightNeighborData, 'optionalAccess', _1616 => _1616.style, 'access', _1617 => _1617.borderLeft]))));
25025
+ if (rightNeighborLeftBorder == null && rightNeighborCell && _optionalChain([rightNeighborData, 'optionalAccess', _1618 => _1618.isMergedSecondary])) {
25015
25026
  const rightNeighborAnchorCell = resolveMergeAnchorCell(rightNeighborCell);
25016
25027
  if (rightNeighborAnchorCell.col === rightNeighborCell.col) {
25017
25028
  const rightNeighborAnchorData = getCellData(rightNeighborAnchorCell.row, rightNeighborAnchorCell.col);
25018
- rightNeighborLeftBorder = rightNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([rightNeighborAnchorData, 'access', _1618 => _1618.canvas, 'optionalAccess', _1619 => _1619.leftBorder]), () => ( parseCanvasBorderDeclaration(rightNeighborAnchorData.style.borderLeft)));
25029
+ rightNeighborLeftBorder = rightNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([rightNeighborAnchorData, 'access', _1619 => _1619.canvas, 'optionalAccess', _1620 => _1620.leftBorder]), () => ( parseCanvasBorderDeclaration(rightNeighborAnchorData.style.borderLeft)));
25019
25030
  }
25020
25031
  }
25021
25032
  const bottomNeighborRow = visibleRows[drawRowIndex + Math.max(1, _nullishCoalesce(cellData.rowSpan, () => ( 1)))];
25022
25033
  const bottomNeighborCell = bottomNeighborRow === void 0 ? null : { row: bottomNeighborRow, col: drawCell.col };
25023
25034
  const bottomNeighborData = bottomNeighborCell ? getCellData(bottomNeighborCell.row, bottomNeighborCell.col) : null;
25024
- let bottomNeighborTopBorder = _optionalChain([bottomNeighborData, 'optionalAccess', _1620 => _1620.isMergedSecondary]) ? null : _nullishCoalesce(_optionalChain([bottomNeighborData, 'optionalAccess', _1621 => _1621.canvas, 'optionalAccess', _1622 => _1622.topBorder]), () => ( parseCanvasBorderDeclaration(_optionalChain([bottomNeighborData, 'optionalAccess', _1623 => _1623.style, 'access', _1624 => _1624.borderTop]))));
25025
- if (bottomNeighborTopBorder == null && bottomNeighborCell && _optionalChain([bottomNeighborData, 'optionalAccess', _1625 => _1625.isMergedSecondary])) {
25035
+ let bottomNeighborTopBorder = _optionalChain([bottomNeighborData, 'optionalAccess', _1621 => _1621.isMergedSecondary]) ? null : _nullishCoalesce(_optionalChain([bottomNeighborData, 'optionalAccess', _1622 => _1622.canvas, 'optionalAccess', _1623 => _1623.topBorder]), () => ( parseCanvasBorderDeclaration(_optionalChain([bottomNeighborData, 'optionalAccess', _1624 => _1624.style, 'access', _1625 => _1625.borderTop]))));
25036
+ if (bottomNeighborTopBorder == null && bottomNeighborCell && _optionalChain([bottomNeighborData, 'optionalAccess', _1626 => _1626.isMergedSecondary])) {
25026
25037
  const bottomNeighborAnchorCell = resolveMergeAnchorCell(bottomNeighborCell);
25027
25038
  if (bottomNeighborAnchorCell.row === bottomNeighborCell.row) {
25028
25039
  const bottomNeighborAnchorData = getCellData(bottomNeighborAnchorCell.row, bottomNeighborAnchorCell.col);
25029
- bottomNeighborTopBorder = bottomNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([bottomNeighborAnchorData, 'access', _1626 => _1626.canvas, 'optionalAccess', _1627 => _1627.topBorder]), () => ( parseCanvasBorderDeclaration(bottomNeighborAnchorData.style.borderTop)));
25040
+ bottomNeighborTopBorder = bottomNeighborAnchorData.isMergedSecondary ? null : _nullishCoalesce(_optionalChain([bottomNeighborAnchorData, 'access', _1627 => _1627.canvas, 'optionalAccess', _1628 => _1628.topBorder]), () => ( parseCanvasBorderDeclaration(bottomNeighborAnchorData.style.borderTop)));
25030
25041
  }
25031
25042
  }
25032
25043
  const resolvedRightBorder = resolveCanvasBoundaryBorder(rightBorder, rightNeighborLeftBorder);
@@ -25313,10 +25324,10 @@ function XlsxGrid({
25313
25324
  drawCanvasConditionalIcon(paneContext, cellData.conditionalIcon, iconX + iconSize / 2, iconY, iconSize);
25314
25325
  }
25315
25326
  paneContext.restore();
25316
- if (cellData.isTableHeader && !(renderTableHeaderMenu && isSameCell(activeCell, drawCell))) {
25327
+ if (cellData.isTableHeader && !renderTableHeaderMenu) {
25317
25328
  const table = getTableAtCell(effectiveTables, drawCell.row, drawCell.col);
25318
25329
  const column = getTableHeaderColumn(table, drawCell.row, drawCell.col);
25319
- const direction = table && column && _optionalChain([sortState, 'optionalAccess', _1628 => _1628.tableName]) === table.name && sortState.columnIndex === column.index ? sortState.direction : null;
25330
+ const direction = table && column && _optionalChain([sortState, 'optionalAccess', _1629 => _1629.tableName]) === table.name && sortState.columnIndex === column.index ? sortState.direction : null;
25320
25331
  drawCanvasTableHeaderTrigger(paneContext, localRect, direction, palette, zoomFactor);
25321
25332
  }
25322
25333
  }
@@ -25594,7 +25605,7 @@ function XlsxGrid({
25594
25605
  if (readOnlyRef.current || chart.editable === false) {
25595
25606
  return;
25596
25607
  }
25597
- _optionalChain([event, 'access', _1629 => _1629.currentTarget, 'access', _1630 => _1630.setPointerCapture, 'optionalCall', _1631 => _1631(event.pointerId)]);
25608
+ _optionalChain([event, 'access', _1630 => _1630.currentTarget, 'access', _1631 => _1631.setPointerCapture, 'optionalCall', _1632 => _1632(event.pointerId)]);
25598
25609
  chartInteractionRef.current = {
25599
25610
  baseRect: rect,
25600
25611
  chartId: chart.id,
@@ -25619,7 +25630,7 @@ function XlsxGrid({
25619
25630
  event.stopPropagation();
25620
25631
  focusGrid();
25621
25632
  selectChart(chart.id);
25622
- _optionalChain([event, 'access', _1632 => _1632.currentTarget, 'access', _1633 => _1633.setPointerCapture, 'optionalCall', _1634 => _1634(event.pointerId)]);
25633
+ _optionalChain([event, 'access', _1633 => _1633.currentTarget, 'access', _1634 => _1634.setPointerCapture, 'optionalCall', _1635 => _1635(event.pointerId)]);
25623
25634
  chartInteractionRef.current = {
25624
25635
  baseRect: rect,
25625
25636
  chartId: chart.id,
@@ -25648,7 +25659,7 @@ function XlsxGrid({
25648
25659
  if (readOnlyRef.current || image.editable === false) {
25649
25660
  return;
25650
25661
  }
25651
- _optionalChain([event, 'access', _1635 => _1635.currentTarget, 'access', _1636 => _1636.setPointerCapture, 'optionalCall', _1637 => _1637(event.pointerId)]);
25662
+ _optionalChain([event, 'access', _1636 => _1636.currentTarget, 'access', _1637 => _1637.setPointerCapture, 'optionalCall', _1638 => _1638(event.pointerId)]);
25652
25663
  imageInteractionRef.current = {
25653
25664
  baseRect: rect,
25654
25665
  didMove: false,
@@ -25673,7 +25684,7 @@ function XlsxGrid({
25673
25684
  event.stopPropagation();
25674
25685
  focusGrid();
25675
25686
  selectImage(image.id);
25676
- _optionalChain([event, 'access', _1638 => _1638.currentTarget, 'access', _1639 => _1639.setPointerCapture, 'optionalCall', _1640 => _1640(event.pointerId)]);
25687
+ _optionalChain([event, 'access', _1639 => _1639.currentTarget, 'access', _1640 => _1640.setPointerCapture, 'optionalCall', _1641 => _1641(event.pointerId)]);
25677
25688
  imageInteractionRef.current = {
25678
25689
  baseRect: rect,
25679
25690
  didMove: false,
@@ -25739,7 +25750,7 @@ function XlsxGrid({
25739
25750
  }
25740
25751
  return /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, _chunkOGZ6ROZCcjs.S, { children: renderError(errorState, error, palette) });
25741
25752
  }
25742
- if (!activeSheet && _optionalChain([activeTab, 'optionalAccess', _1641 => _1641.kind]) === "chartsheet") {
25753
+ if (!activeSheet && _optionalChain([activeTab, 'optionalAccess', _1642 => _1642.kind]) === "chartsheet") {
25743
25754
  return /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0,
25744
25755
  "div",
25745
25756
  {
@@ -25769,10 +25780,10 @@ function XlsxGrid({
25769
25780
  children: charts.length > 0 ? charts.map((chart) => {
25770
25781
  const sourceSize = chart.anchor.kind !== "two-cell" ? chart.anchor.sizeEmu : void 0;
25771
25782
  const chartsheetRect = {
25772
- height: _optionalChain([sourceSize, 'optionalAccess', _1642 => _1642.cy]) ? emuToPixels(sourceSize.cy) : 320,
25783
+ height: _optionalChain([sourceSize, 'optionalAccess', _1643 => _1643.cy]) ? emuToPixels(sourceSize.cy) : 320,
25773
25784
  left: 0,
25774
25785
  top: 0,
25775
- width: _optionalChain([sourceSize, 'optionalAccess', _1643 => _1643.cx]) ? emuToPixels(sourceSize.cx) : 640
25786
+ width: _optionalChain([sourceSize, 'optionalAccess', _1644 => _1644.cx]) ? emuToPixels(sourceSize.cx) : 640
25776
25787
  };
25777
25788
  return /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "div", { style: {
25778
25789
  minHeight: sourceSize ? void 0 : 320,
@@ -25818,11 +25829,11 @@ function XlsxGrid({
25818
25829
  const virtualRows = domExpandedWindow.rowIndices.map((index) => {
25819
25830
  const virtualRow = rowVirtualItemByIndex.get(index);
25820
25831
  return {
25821
- end: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1644 => _1644.end]), () => ( (_nullishCoalesce(rowPrefixSums[index + 1], () => ( 0))))),
25832
+ end: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1645 => _1645.end]), () => ( (_nullishCoalesce(rowPrefixSums[index + 1], () => ( 0))))),
25822
25833
  index,
25823
25834
  key: _nullishCoalesce(visibleRows[index], () => ( index)),
25824
- size: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1645 => _1645.size]), () => ( (_nullishCoalesce(displayEffectiveRowHeights[index], () => ( displayDefaultRowHeight))))),
25825
- start: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1646 => _1646.start]), () => ( (_nullishCoalesce(rowPrefixSums[index], () => ( 0)))))
25835
+ size: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1646 => _1646.size]), () => ( (_nullishCoalesce(displayEffectiveRowHeights[index], () => ( displayDefaultRowHeight))))),
25836
+ start: _nullishCoalesce(_optionalChain([virtualRow, 'optionalAccess', _1647 => _1647.start]), () => ( (_nullishCoalesce(rowPrefixSums[index], () => ( 0)))))
25826
25837
  };
25827
25838
  });
25828
25839
  const totalHeight = shouldUseDomVirtualizer && shouldVirtualizeRows ? rowVirtualizer.getTotalSize() : _nullishCoalesce(rowPrefixSums[rowPrefixSums.length - 1], () => ( 0));
@@ -25830,8 +25841,8 @@ function XlsxGrid({
25830
25841
  const sheetContentHeight = displayHeaderHeight + totalHeight;
25831
25842
  const isLiveZooming = liveGestureZoom !== null && zoomScale === liveGestureZoom.baseZoomScale;
25832
25843
  const liveZoomScale = isLiveZooming ? Math.max(0.1, liveGestureZoom.targetZoomScale / liveGestureZoom.baseZoomScale) : 1;
25833
- const liveZoomScrollLeft = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1647 => _1647.current, 'optionalAccess', _1648 => _1648.scrollLeft]), () => ( drawingViewport.left));
25834
- const liveZoomScrollTop = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1649 => _1649.current, 'optionalAccess', _1650 => _1650.scrollTop]), () => ( drawingViewport.top));
25844
+ const liveZoomScrollLeft = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1648 => _1648.current, 'optionalAccess', _1649 => _1649.scrollLeft]), () => ( drawingViewport.left));
25845
+ const liveZoomScrollTop = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1650 => _1650.current, 'optionalAccess', _1651 => _1651.scrollTop]), () => ( drawingViewport.top));
25835
25846
  const liveZoomTranslateX = isLiveZooming ? (liveZoomScrollLeft + liveGestureZoom.anchor.x) * (1 - liveZoomScale) : 0;
25836
25847
  const liveZoomTranslateY = isLiveZooming ? (liveZoomScrollTop + liveGestureZoom.anchor.y) * (1 - liveZoomScale) : 0;
25837
25848
  const headerLabelLiveScale = isLiveZooming ? liveZoomScale : 1;
@@ -25980,11 +25991,25 @@ function XlsxGrid({
25980
25991
  zIndex: cornerHeaderOverlayZIndex
25981
25992
  };
25982
25993
  const editingOverlayRect = experimentalCanvas && editingCell ? resolveCellDisplayRect(editingCell) : null;
25983
- const activeCellAdornment = experimentalCanvas && activeCell ? renderCellAdornment(activeCell) : null;
25994
+ const activeCellAdornment = experimentalCanvas && !renderTableHeaderMenu && activeCell ? renderCellAdornment(activeCell) : null;
25984
25995
  const activeCellAdornmentRect = activeCell && activeCellAdornment ? resolveCellDisplayRect(activeCell) : null;
25996
+ const canvasTableHeaderAdornments = experimentalCanvas && renderTableHeaderMenu ? effectiveTables.flatMap((table) => {
25997
+ if (!canvasVisibleRowItems.some((row) => row.actualRow === table.start.row)) {
25998
+ return [];
25999
+ }
26000
+ return canvasVisibleColItems.flatMap((column) => {
26001
+ const cell = { row: table.start.row, col: column.actualCol };
26002
+ if (!getTableHeaderColumn(table, cell.row, cell.col)) {
26003
+ return [];
26004
+ }
26005
+ const rect = resolveCellDisplayRect(cell);
26006
+ const adornment = renderCellAdornment(cell);
26007
+ return rect && adornment ? [{ cell, rect, adornment }] : [];
26008
+ });
26009
+ }) : [];
25985
26010
  const activeCellOverlayCell = renderActiveCellOverlay && activeCell ? resolveMergeAnchorCell(activeCell) : null;
25986
26011
  const activeCellOverlayRect = activeCellOverlayCell ? resolveCellDisplayRect(activeCellOverlayCell) : null;
25987
- const activeCellOverlay = activeCellOverlayCell && activeCellOverlayRect ? _optionalChain([renderActiveCellOverlay, 'optionalCall', _1651 => _1651({ cell: activeCellOverlayCell, rect: activeCellOverlayRect })]) : null;
26012
+ const activeCellOverlay = activeCellOverlayCell && activeCellOverlayRect ? _optionalChain([renderActiveCellOverlay, 'optionalCall', _1652 => _1652({ cell: activeCellOverlayCell, rect: activeCellOverlayRect })]) : null;
25988
26013
  function drawingIntersectsPane(rect, pane) {
25989
26014
  if (experimentalCanvas) {
25990
26015
  const frozenX = pane === "left" || pane === "corner";
@@ -26001,7 +26026,7 @@ function XlsxGrid({
26001
26026
  frozenCols,
26002
26027
  displayActualRowHeights,
26003
26028
  displayActualColWidths,
26004
- _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1652 => _1652.freezePanes]), () => ( null)),
26029
+ _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1653 => _1653.freezePanes]), () => ( null)),
26005
26030
  stickyTopByRow,
26006
26031
  stickyLeftByCol,
26007
26032
  {
@@ -26021,7 +26046,7 @@ function XlsxGrid({
26021
26046
  return null;
26022
26047
  }
26023
26048
  const isFrozenDrawing = pane !== "scroll";
26024
- const inset = _optionalChain([shape, 'access', _1653 => _1653.textBox, 'optionalAccess', _1654 => _1654.insetPx]);
26049
+ const inset = _optionalChain([shape, 'access', _1654 => _1654.textBox, 'optionalAccess', _1655 => _1655.insetPx]);
26025
26050
  const groupScaleX = _nullishCoalesce(shape.scaleX, () => ( 1));
26026
26051
  const groupScaleY = _nullishCoalesce(shape.scaleY, () => ( 1));
26027
26052
  const strokeScale = Math.max(groupScaleX, groupScaleY);
@@ -26029,12 +26054,12 @@ function XlsxGrid({
26029
26054
  const textWidth = groupScaleX !== 0 ? rect.width / groupScaleX : rect.width;
26030
26055
  const textHeight = groupScaleY !== 0 ? rect.height / groupScaleY : rect.height;
26031
26056
  const vectorShape = resolveShapeVector(shape);
26032
- const strokeColor = _optionalChain([shape, 'access', _1655 => _1655.stroke, 'optionalAccess', _1656 => _1656.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1657 => _1657.stroke, 'optionalAccess', _1658 => _1658.color]), () => ( "transparent"));
26033
- const scaledStrokeWidth = (_nullishCoalesce(_optionalChain([shape, 'access', _1659 => _1659.stroke, 'optionalAccess', _1660 => _1660.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * strokeScale * zoomFactor;
26057
+ const strokeColor = _optionalChain([shape, 'access', _1656 => _1656.stroke, 'optionalAccess', _1657 => _1657.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1658 => _1658.stroke, 'optionalAccess', _1659 => _1659.color]), () => ( "transparent"));
26058
+ const scaledStrokeWidth = (_nullishCoalesce(_optionalChain([shape, 'access', _1660 => _1660.stroke, 'optionalAccess', _1661 => _1661.widthPx]), () => ( (shape.geometry === "line" ? 2 : 1)))) * strokeScale * zoomFactor;
26034
26059
  const headMarkerId = `${shape.id}-${pane}-head-marker`;
26035
26060
  const tailMarkerId = `${shape.id}-${pane}-tail-marker`;
26036
26061
  const headMarker = vectorShape ? resolveShapeLineEndMarker(
26037
- _optionalChain([shape, 'access', _1661 => _1661.stroke, 'optionalAccess', _1662 => _1662.headEndType]),
26062
+ _optionalChain([shape, 'access', _1662 => _1662.stroke, 'optionalAccess', _1663 => _1663.headEndType]),
26038
26063
  headMarkerId,
26039
26064
  strokeColor,
26040
26065
  scaledStrokeWidth,
@@ -26042,7 +26067,7 @@ function XlsxGrid({
26042
26067
  vectorShape.viewBox
26043
26068
  ) : null;
26044
26069
  const tailMarker = vectorShape ? resolveShapeLineEndMarker(
26045
- _optionalChain([shape, 'access', _1663 => _1663.stroke, 'optionalAccess', _1664 => _1664.tailEndType]),
26070
+ _optionalChain([shape, 'access', _1664 => _1664.stroke, 'optionalAccess', _1665 => _1665.tailEndType]),
26046
26071
  tailMarkerId,
26047
26072
  strokeColor,
26048
26073
  scaledStrokeWidth,
@@ -26092,12 +26117,12 @@ function XlsxGrid({
26092
26117
  "path",
26093
26118
  {
26094
26119
  d: vectorShape.path,
26095
- fill: _optionalChain([shape, 'access', _1665 => _1665.fill, 'optionalAccess', _1666 => _1666.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1667 => _1667.fill, 'optionalAccess', _1668 => _1668.color]), () => ( "transparent")),
26096
- fillOpacity: _nullishCoalesce(_optionalChain([shape, 'access', _1669 => _1669.fill, 'optionalAccess', _1670 => _1670.opacity]), () => ( 1)),
26120
+ fill: _optionalChain([shape, 'access', _1666 => _1666.fill, 'optionalAccess', _1667 => _1667.none]) ? "transparent" : _nullishCoalesce(_optionalChain([shape, 'access', _1668 => _1668.fill, 'optionalAccess', _1669 => _1669.color]), () => ( "transparent")),
26121
+ fillOpacity: _nullishCoalesce(_optionalChain([shape, 'access', _1670 => _1670.fill, 'optionalAccess', _1671 => _1671.opacity]), () => ( 1)),
26097
26122
  markerEnd: tailMarker ? `url(#${tailMarkerId})` : void 0,
26098
26123
  markerStart: headMarker ? `url(#${headMarkerId})` : void 0,
26099
26124
  stroke: strokeColor,
26100
- strokeOpacity: _nullishCoalesce(_optionalChain([shape, 'access', _1671 => _1671.stroke, 'optionalAccess', _1672 => _1672.opacity]), () => ( 1)),
26125
+ strokeOpacity: _nullishCoalesce(_optionalChain([shape, 'access', _1672 => _1672.stroke, 'optionalAccess', _1673 => _1673.opacity]), () => ( 1)),
26101
26126
  strokeWidth: scaledStrokeWidth,
26102
26127
  vectorEffect: "non-scaling-stroke"
26103
26128
  }
@@ -26115,11 +26140,11 @@ function XlsxGrid({
26115
26140
  flexDirection: "column",
26116
26141
  gap: 2 * zoomFactor,
26117
26142
  height: textHeight,
26118
- justifyContent: _optionalChain([shape, 'access', _1673 => _1673.textBox, 'optionalAccess', _1674 => _1674.verticalAlign]) === "middle" ? "center" : _optionalChain([shape, 'access', _1675 => _1675.textBox, 'optionalAccess', _1676 => _1676.verticalAlign]) === "bottom" ? "flex-end" : "flex-start",
26119
- paddingBottom: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1677 => _1677.bottom]), () => ( 4))) * zoomFactor,
26120
- paddingLeft: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1678 => _1678.left]), () => ( 6))) * zoomFactor,
26121
- paddingRight: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1679 => _1679.right]), () => ( 6))) * zoomFactor,
26122
- paddingTop: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1680 => _1680.top]), () => ( 4))) * zoomFactor,
26143
+ justifyContent: _optionalChain([shape, 'access', _1674 => _1674.textBox, 'optionalAccess', _1675 => _1675.verticalAlign]) === "middle" ? "center" : _optionalChain([shape, 'access', _1676 => _1676.textBox, 'optionalAccess', _1677 => _1677.verticalAlign]) === "bottom" ? "flex-end" : "flex-start",
26144
+ paddingBottom: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1678 => _1678.bottom]), () => ( 4))) * zoomFactor,
26145
+ paddingLeft: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1679 => _1679.left]), () => ( 6))) * zoomFactor,
26146
+ paddingRight: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1680 => _1680.right]), () => ( 6))) * zoomFactor,
26147
+ paddingTop: (_nullishCoalesce(_optionalChain([inset, 'optionalAccess', _1681 => _1681.top]), () => ( 4))) * zoomFactor,
26123
26148
  pointerEvents: "none",
26124
26149
  position: "relative",
26125
26150
  transform: groupScaleX !== 1 || groupScaleY !== 1 ? `scale(${groupScaleX}, ${groupScaleY})` : void 0,
@@ -26130,7 +26155,7 @@ function XlsxGrid({
26130
26155
  children: shape.paragraphs.map((paragraph, index) => renderShapeParagraph(
26131
26156
  paragraph,
26132
26157
  index,
26133
- _nullishCoalesce(_optionalChain([shape, 'access', _1681 => _1681.textBox, 'optionalAccess', _1682 => _1682.horizontalAlign]), () => ( "left")),
26158
+ _nullishCoalesce(_optionalChain([shape, 'access', _1682 => _1682.textBox, 'optionalAccess', _1683 => _1683.horizontalAlign]), () => ( "left")),
26134
26159
  textScale
26135
26160
  ))
26136
26161
  }
@@ -26194,7 +26219,7 @@ function XlsxGrid({
26194
26219
  }
26195
26220
  const didUpdate = updateFormControl(control.controlIndex, { kind }, control.sheetIndex);
26196
26221
  if (didUpdate) {
26197
- _optionalChain([onFormControlChange, 'optionalCall', _1683 => _1683({
26222
+ _optionalChain([onFormControlChange, 'optionalCall', _1684 => _1684({
26198
26223
  control: { ...control, ...nextControl },
26199
26224
  previousControl: control,
26200
26225
  type: "change"
@@ -26204,13 +26229,13 @@ function XlsxGrid({
26204
26229
  };
26205
26230
  const setControlState = (state = "unchecked") => {
26206
26231
  const kind = buildFormControlKindInput(control);
26207
- if (_optionalChain([kind, 'optionalAccess', _1684 => _1684.kind]) === "checkbox") {
26232
+ if (_optionalChain([kind, 'optionalAccess', _1685 => _1685.kind]) === "checkbox") {
26208
26233
  return commitControlKind(
26209
26234
  { ...kind, state },
26210
26235
  { checked: state === "checked", state }
26211
26236
  );
26212
26237
  }
26213
- if (_optionalChain([kind, 'optionalAccess', _1685 => _1685.kind]) === "optionButton" && state !== "mixed") {
26238
+ if (_optionalChain([kind, 'optionalAccess', _1686 => _1686.kind]) === "optionButton" && state !== "mixed") {
26214
26239
  return commitControlKind(
26215
26240
  { ...kind, state },
26216
26241
  { checked: state === "checked", state }
@@ -26220,14 +26245,14 @@ function XlsxGrid({
26220
26245
  };
26221
26246
  const setControlSelected = (selected) => {
26222
26247
  const kind = buildFormControlKindInput(control);
26223
- if (_optionalChain([kind, 'optionalAccess', _1686 => _1686.kind]) === "dropdown") {
26248
+ if (_optionalChain([kind, 'optionalAccess', _1687 => _1687.kind]) === "dropdown") {
26224
26249
  const nextSelected = typeof selected === "number" ? selected : void 0;
26225
26250
  return commitControlKind(
26226
26251
  { ...kind, selected: nextSelected },
26227
26252
  { selected: nextSelected }
26228
26253
  );
26229
26254
  }
26230
- if (_optionalChain([kind, 'optionalAccess', _1687 => _1687.kind]) === "listBox") {
26255
+ if (_optionalChain([kind, 'optionalAccess', _1688 => _1688.kind]) === "listBox") {
26231
26256
  const nextSelected = Array.isArray(selected) ? selected : typeof selected === "number" ? [selected] : [];
26232
26257
  return commitControlKind(
26233
26258
  { ...kind, selected: nextSelected },
@@ -26241,7 +26266,7 @@ function XlsxGrid({
26241
26266
  return false;
26242
26267
  }
26243
26268
  const kind = buildFormControlKindInput(control);
26244
- if (_optionalChain([kind, 'optionalAccess', _1688 => _1688.kind]) !== "scrollbar" && _optionalChain([kind, 'optionalAccess', _1689 => _1689.kind]) !== "spinner") {
26269
+ if (_optionalChain([kind, 'optionalAccess', _1689 => _1689.kind]) !== "scrollbar" && _optionalChain([kind, 'optionalAccess', _1690 => _1690.kind]) !== "spinner") {
26245
26270
  return false;
26246
26271
  }
26247
26272
  const nextValue = Math.max(kind.min, Math.min(kind.max, value));
@@ -26249,7 +26274,7 @@ function XlsxGrid({
26249
26274
  };
26250
26275
  const activateControl = () => {
26251
26276
  if (!readOnly && control.kind === "button") {
26252
- _optionalChain([onFormControlAction, 'optionalCall', _1690 => _1690({ control, type: "activate" })]);
26277
+ _optionalChain([onFormControlAction, 'optionalCall', _1691 => _1691({ control, type: "activate" })]);
26253
26278
  }
26254
26279
  };
26255
26280
  if (renderFormControl) {
@@ -27013,7 +27038,7 @@ function XlsxGrid({
27013
27038
  if (readOnly) {
27014
27039
  return;
27015
27040
  }
27016
- cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1691 => _1691.current, 'optionalAccess', _1692 => _1692.getBoundingClientRect, 'call', _1693 => _1693()]), () => ( null));
27041
+ cachedScrollerRectRef.current = _nullishCoalesce(_optionalChain([scrollRef, 'access', _1692 => _1692.current, 'optionalAccess', _1693 => _1693.getBoundingClientRect, 'call', _1694 => _1694()]), () => ( null));
27017
27042
  const normalizedSource = normalizeRange2(sourceRange);
27018
27043
  fillDragRef.current = {
27019
27044
  pointerId,
@@ -27036,7 +27061,7 @@ function XlsxGrid({
27036
27061
  applyPreviewOverlay(nextRange);
27037
27062
  }
27038
27063
  function installImageInteractionListeners(pointerId) {
27039
- _optionalChain([imageInteractionCleanupRef, 'access', _1694 => _1694.current, 'optionalCall', _1695 => _1695()]);
27064
+ _optionalChain([imageInteractionCleanupRef, 'access', _1695 => _1695.current, 'optionalCall', _1696 => _1696()]);
27040
27065
  const resolveInteractionRect = (interaction, clientX, clientY) => {
27041
27066
  const deltaX = clientX - interaction.startClientX;
27042
27067
  const deltaY = clientY - interaction.startClientY;
@@ -27116,7 +27141,7 @@ function XlsxGrid({
27116
27141
  imageInteractionCleanupRef.current = cleanup;
27117
27142
  }
27118
27143
  function installChartInteractionListeners(pointerId) {
27119
- _optionalChain([chartInteractionCleanupRef, 'access', _1696 => _1696.current, 'optionalCall', _1697 => _1697()]);
27144
+ _optionalChain([chartInteractionCleanupRef, 'access', _1697 => _1697.current, 'optionalCall', _1698 => _1698()]);
27120
27145
  const resolveInteractionRect = (interaction, clientX, clientY) => {
27121
27146
  const deltaX = clientX - interaction.startClientX;
27122
27147
  const deltaY = clientY - interaction.startClientY;
@@ -27263,7 +27288,7 @@ function XlsxGrid({
27263
27288
  const scroller = scrollRef.current;
27264
27289
  const viewportHeight = Math.max(
27265
27290
  displayDefaultRowHeight,
27266
- (_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1698 => _1698.clientHeight]), () => ( displayDefaultRowHeight * 20))) - frozenPaneBottom
27291
+ (_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1699 => _1699.clientHeight]), () => ( displayDefaultRowHeight * 20))) - frozenPaneBottom
27267
27292
  );
27268
27293
  const currentOffset = _nullishCoalesce(rowPrefixSums[currentRowIndex], () => ( 0));
27269
27294
  const targetOffset = direction > 0 ? currentOffset + viewportHeight : currentOffset - viewportHeight;
@@ -27273,7 +27298,7 @@ function XlsxGrid({
27273
27298
  const scroller = scrollRef.current;
27274
27299
  const viewportWidth = Math.max(
27275
27300
  displayDefaultColWidth,
27276
- (_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1699 => _1699.clientWidth]), () => ( displayDefaultColWidth * 8))) - frozenPaneRight
27301
+ (_nullishCoalesce(_optionalChain([scroller, 'optionalAccess', _1700 => _1700.clientWidth]), () => ( displayDefaultColWidth * 8))) - frozenPaneRight
27277
27302
  );
27278
27303
  const currentOffset = _nullishCoalesce(colPrefixSums[currentColIndex], () => ( 0));
27279
27304
  const targetOffset = direction > 0 ? currentOffset + viewportWidth : currentOffset - viewportWidth;
@@ -27281,7 +27306,7 @@ function XlsxGrid({
27281
27306
  }
27282
27307
  function resolveColumnSelectionNavigation(eventKey) {
27283
27308
  const axisSelection = axisSelectionRef.current;
27284
- if (_optionalChain([axisSelection, 'optionalAccess', _1700 => _1700.axis]) !== "column" || firstVisibleRow === void 0) {
27309
+ if (_optionalChain([axisSelection, 'optionalAccess', _1701 => _1701.axis]) !== "column" || firstVisibleRow === void 0) {
27285
27310
  return null;
27286
27311
  }
27287
27312
  const startCol = Math.min(axisSelection.startCol, axisSelection.endCol);
@@ -27299,7 +27324,7 @@ function XlsxGrid({
27299
27324
  }
27300
27325
  function resolveRowSelectionNavigation(eventKey) {
27301
27326
  const axisSelection = axisSelectionRef.current;
27302
- if (_optionalChain([axisSelection, 'optionalAccess', _1701 => _1701.axis]) !== "row" || firstVisibleCol === void 0) {
27327
+ if (_optionalChain([axisSelection, 'optionalAccess', _1702 => _1702.axis]) !== "row" || firstVisibleCol === void 0) {
27303
27328
  return null;
27304
27329
  }
27305
27330
  const startRow = Math.min(axisSelection.startRow, axisSelection.endRow);
@@ -27321,13 +27346,13 @@ function XlsxGrid({
27321
27346
  }
27322
27347
  if (enableContextMenu && (event.key === "ContextMenu" || event.shiftKey && event.key === "F10")) {
27323
27348
  const cell = resolveCurrentCell();
27324
- const rect = _optionalChain([scrollRef, 'access', _1702 => _1702.current, 'optionalAccess', _1703 => _1703.getBoundingClientRect, 'call', _1704 => _1704()]);
27349
+ const rect = _optionalChain([scrollRef, 'access', _1703 => _1703.current, 'optionalAccess', _1704 => _1704.getBoundingClientRect, 'call', _1705 => _1705()]);
27325
27350
  if (cell && rect) {
27326
27351
  event.preventDefault();
27327
27352
  const overlay = resolveOverlayRect({ start: cell, end: cell });
27328
27353
  openContextMenu(cell, "cell", {
27329
- x: rect.left + (_nullishCoalesce(_optionalChain([overlay, 'optionalAccess', _1705 => _1705.left]), () => ( displayRowHeaderWidth))) - (_nullishCoalesce(_optionalChain([scrollRef, 'access', _1706 => _1706.current, 'optionalAccess', _1707 => _1707.scrollLeft]), () => ( 0))),
27330
- y: rect.top + (overlay ? overlay.top + overlay.height : displayHeaderHeight) - (_nullishCoalesce(_optionalChain([scrollRef, 'access', _1708 => _1708.current, 'optionalAccess', _1709 => _1709.scrollTop]), () => ( 0)))
27354
+ x: rect.left + (_nullishCoalesce(_optionalChain([overlay, 'optionalAccess', _1706 => _1706.left]), () => ( displayRowHeaderWidth))) - (_nullishCoalesce(_optionalChain([scrollRef, 'access', _1707 => _1707.current, 'optionalAccess', _1708 => _1708.scrollLeft]), () => ( 0))),
27355
+ y: rect.top + (overlay ? overlay.top + overlay.height : displayHeaderHeight) - (_nullishCoalesce(_optionalChain([scrollRef, 'access', _1709 => _1709.current, 'optionalAccess', _1710 => _1710.scrollTop]), () => ( 0)))
27331
27356
  });
27332
27357
  }
27333
27358
  return;
@@ -27373,7 +27398,7 @@ function XlsxGrid({
27373
27398
  }
27374
27399
  }
27375
27400
  moveSelection(
27376
- isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1710 => _1710.maxUsedRow]), () => ( -1)))), () => ( visibleRows.length - 1)) : currentRowIndex + 1,
27401
+ isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1711 => _1711.maxUsedRow]), () => ( -1)))), () => ( visibleRows.length - 1)) : currentRowIndex + 1,
27377
27402
  currentColIndex,
27378
27403
  event.shiftKey
27379
27404
  );
@@ -27388,7 +27413,7 @@ function XlsxGrid({
27388
27413
  }
27389
27414
  }
27390
27415
  moveSelection(
27391
- isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1711 => _1711.minUsedRow]), () => ( -1)))), () => ( 0)) : currentRowIndex - 1,
27416
+ isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1712 => _1712.minUsedRow]), () => ( -1)))), () => ( 0)) : currentRowIndex - 1,
27392
27417
  currentColIndex,
27393
27418
  event.shiftKey
27394
27419
  );
@@ -27404,7 +27429,7 @@ function XlsxGrid({
27404
27429
  }
27405
27430
  moveSelection(
27406
27431
  currentRowIndex,
27407
- isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1712 => _1712.minUsedCol]), () => ( -1)))), () => ( 0)) : currentColIndex - 1,
27432
+ isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1713 => _1713.minUsedCol]), () => ( -1)))), () => ( 0)) : currentColIndex - 1,
27408
27433
  event.shiftKey
27409
27434
  );
27410
27435
  break;
@@ -27419,23 +27444,23 @@ function XlsxGrid({
27419
27444
  }
27420
27445
  moveSelection(
27421
27446
  currentRowIndex,
27422
- isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1713 => _1713.maxUsedCol]), () => ( -1)))), () => ( visibleCols.length - 1)) : currentColIndex + 1,
27447
+ isCommandNavigation ? _nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1714 => _1714.maxUsedCol]), () => ( -1)))), () => ( visibleCols.length - 1)) : currentColIndex + 1,
27423
27448
  event.shiftKey
27424
27449
  );
27425
27450
  break;
27426
27451
  case "Home":
27427
27452
  event.preventDefault();
27428
27453
  moveSelection(
27429
- isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1714 => _1714.minUsedRow]), () => ( -1)))), () => ( 0)) : currentRowIndex,
27430
- _nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1715 => _1715.minUsedCol]), () => ( -1)))), () => ( 0)),
27454
+ isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveFirstUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1715 => _1715.minUsedRow]), () => ( -1)))), () => ( 0)) : currentRowIndex,
27455
+ _nullishCoalesce(colIndexByActual.get(resolveFirstUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1716 => _1716.minUsedCol]), () => ( -1)))), () => ( 0)),
27431
27456
  event.shiftKey
27432
27457
  );
27433
27458
  break;
27434
27459
  case "End":
27435
27460
  event.preventDefault();
27436
27461
  moveSelection(
27437
- isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1716 => _1716.maxUsedRow]), () => ( -1)))), () => ( visibleRows.length - 1)) : currentRowIndex,
27438
- _nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1717 => _1717.maxUsedCol]), () => ( -1)))), () => ( visibleCols.length - 1)),
27462
+ isCommandNavigation ? _nullishCoalesce(rowIndexByActual.get(resolveLastUsedVisibleIndex(visibleRows, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1717 => _1717.maxUsedRow]), () => ( -1)))), () => ( visibleRows.length - 1)) : currentRowIndex,
27463
+ _nullishCoalesce(colIndexByActual.get(resolveLastUsedVisibleIndex(visibleCols, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1718 => _1718.maxUsedCol]), () => ( -1)))), () => ( visibleCols.length - 1)),
27439
27464
  event.shiftKey
27440
27465
  );
27441
27466
  break;
@@ -27502,11 +27527,11 @@ function XlsxGrid({
27502
27527
  gridKeyboardHandlerRef.current = handleGridKeyDown;
27503
27528
  const scrollerViewportProps = {
27504
27529
  ref: scrollRef,
27505
- "aria-colcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1718 => _1718.colCount]), () => ( 0)), displayColLimit),
27530
+ "aria-colcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1719 => _1719.colCount]), () => ( 0)), displayColLimit),
27506
27531
  "aria-keyshortcuts": "ArrowUp ArrowDown ArrowLeft ArrowRight Home End PageUp PageDown Control+Home Control+End",
27507
27532
  "aria-label": activeSheet ? `${activeSheet.name} worksheet grid` : "Workbook grid",
27508
27533
  "aria-readonly": readOnly,
27509
- "aria-rowcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1719 => _1719.rowCount]), () => ( 0)), displayRowLimit),
27534
+ "aria-rowcount": Math.max(_nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1720 => _1720.rowCount]), () => ( 0)), displayRowLimit),
27510
27535
  role: "grid",
27511
27536
  onScroll: handleScrollerScroll,
27512
27537
  onContextMenu: (event) => {
@@ -27589,7 +27614,7 @@ function XlsxGrid({
27589
27614
  ["--xlsx-selection-header"]: selectionHeaderSurface,
27590
27615
  backgroundColor: palette.canvas,
27591
27616
  color: palette.text,
27592
- cursor: _optionalChain([resizeGuide, 'optionalAccess', _1720 => _1720.type]) === "column" ? "col-resize" : _optionalChain([resizeGuide, 'optionalAccess', _1721 => _1721.type]) === "row" ? "row-resize" : void 0,
27617
+ cursor: _optionalChain([resizeGuide, 'optionalAccess', _1721 => _1721.type]) === "column" ? "col-resize" : _optionalChain([resizeGuide, 'optionalAccess', _1722 => _1722.type]) === "row" ? "row-resize" : void 0,
27593
27618
  flex: 1,
27594
27619
  height: "100%",
27595
27620
  minHeight: 0,
@@ -27620,7 +27645,7 @@ function XlsxGrid({
27620
27645
  )
27621
27646
  ] : []);
27622
27647
  const chartSourceHighlightNodes = (experimentalCanvas ? activeSheetChartHighlights : []).flatMap((highlight, index) => {
27623
- const range = expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1722 => _1722.mergedRanges]), () => ( mergedRegions)));
27648
+ const range = expandHighlightedRange(highlight.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1723 => _1723.mergedRanges]), () => ( mergedRegions)));
27624
27649
  const rows = getHighlightAxisExtent(visibleRows, rowPrefixSums, range.start.row, range.end.row);
27625
27650
  const cols = getHighlightAxisExtent(visibleCols, colPrefixSums, range.start.col, range.end.col);
27626
27651
  if (!rows || !cols) return [];
@@ -27644,8 +27669,8 @@ function XlsxGrid({
27644
27669
  ];
27645
27670
  });
27646
27671
  const formulaHighlightNodes = formulaReferences.flatMap((reference, index) => {
27647
- if (reference.sheetName && reference.sheetName.toLowerCase() !== _optionalChain([activeSheet, 'optionalAccess', _1723 => _1723.name, 'access', _1724 => _1724.toLowerCase, 'call', _1725 => _1725()])) return [];
27648
- const range = expandHighlightedRange(reference.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1726 => _1726.mergedRanges]), () => ( mergedRegions)));
27672
+ if (reference.sheetName && reference.sheetName.toLowerCase() !== _optionalChain([activeSheet, 'optionalAccess', _1724 => _1724.name, 'access', _1725 => _1725.toLowerCase, 'call', _1726 => _1726()])) return [];
27673
+ const range = expandHighlightedRange(reference.range, _nullishCoalesce(_optionalChain([activeSheet, 'optionalAccess', _1727 => _1727.mergedRanges]), () => ( mergedRegions)));
27649
27674
  const rows = getHighlightAxisExtent(visibleRows, rowPrefixSums, range.start.row, range.end.row);
27650
27675
  const cols = getHighlightAxisExtent(visibleCols, colPrefixSums, range.start.col, range.end.col);
27651
27676
  if (!rows || !cols) return [];
@@ -27686,16 +27711,16 @@ function XlsxGrid({
27686
27711
  boxSizing: "border-box",
27687
27712
  boxShadow: `inset 0 0 0 ${selectionBorderWidth}px ${selectionStroke}`,
27688
27713
  contain: "layout paint",
27689
- height: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1727 => _1727.height]), () => ( 0)),
27690
- left: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1728 => _1728.left]), () => ( 0)),
27714
+ height: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1728 => _1728.height]), () => ( 0)),
27715
+ left: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1729 => _1729.left]), () => ( 0)),
27691
27716
  opacity: resolvedSelectionOverlay ? 1 : 0,
27692
27717
  pointerEvents: "none",
27693
27718
  position: "absolute",
27694
- top: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1729 => _1729.top]), () => ( 0)),
27719
+ top: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1730 => _1730.top]), () => ( 0)),
27695
27720
  transition: canvasSelectionTransition,
27696
27721
  visibility: resolvedSelectionOverlay ? "visible" : "hidden",
27697
27722
  willChange: shouldAnimateCanvasSelectionGeometry ? "left, top, width, height" : void 0,
27698
- width: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1730 => _1730.width]), () => ( 0)),
27723
+ width: _nullishCoalesce(_optionalChain([resolvedSelectionOverlay, 'optionalAccess', _1731 => _1731.width]), () => ( 0)),
27699
27724
  zIndex: 24
27700
27725
  }
27701
27726
  }
@@ -27744,6 +27769,21 @@ function XlsxGrid({
27744
27769
  { pane: "left", style: canvasLeftOverlayPaneStyle, ref: canvasLeftOverlayContentRef, left: -displayRowHeaderWidth, top: -drawingViewport.top - frozenPaneBottom },
27745
27770
  { pane: "corner", style: canvasCornerOverlayPaneStyle, ref: canvasCornerOverlayContentRef, left: -displayRowHeaderWidth, top: -displayHeaderHeight }
27746
27771
  ];
27772
+ const tableHeaderOverlayPanes = canvasTableHeaderAdornments.length > 0 ? /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "div", { style: { ...canvasBodyViewportLayerStyle, zIndex: 27 }, children: overlayPanes.map(({ pane, style, left, top }) => /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "div", { style, children: canvasTableHeaderAdornments.map(({ cell, rect, adornment }) => drawingIntersectsPane(rect, pane) ? /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0,
27773
+ "div",
27774
+ {
27775
+ style: {
27776
+ height: rect.height,
27777
+ left: rect.left + left,
27778
+ pointerEvents: "none",
27779
+ position: "absolute",
27780
+ top: rect.top + top,
27781
+ width: rect.width
27782
+ },
27783
+ children: adornment
27784
+ },
27785
+ `${cell.row}:${cell.col}`
27786
+ ) : null) }, pane)) }) : null;
27747
27787
  const selectionOverlayPanes = experimentalCanvas ? /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "div", { style: { ...canvasBodyViewportLayerStyle, zIndex: 40 }, children: overlayPanes.map(({ pane, style, left, top }) => /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "div", { style, children: /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0,
27748
27788
  "div",
27749
27789
  {
@@ -27823,6 +27863,7 @@ function XlsxGrid({
27823
27863
  ] }) : null,
27824
27864
  drawingOverlayPanes,
27825
27865
  selectionOverlayPanes,
27866
+ tableHeaderOverlayPanes,
27826
27867
  experimentalCanvas ? /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, _chunkOGZ6ROZCcjs.S, { children: [
27827
27868
  /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "div", { style: canvasBodyViewportLayerStyle, children: [
27828
27869
  /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0,
@@ -28104,7 +28145,7 @@ function XlsxGrid({
28104
28145
  if (actualRow === void 0) {
28105
28146
  return null;
28106
28147
  }
28107
- const previousEnd = index === 0 ? 0 : _nullishCoalesce(_optionalChain([virtualRows, 'access', _1731 => _1731[index - 1], 'optionalAccess', _1732 => _1732.end]), () => ( 0));
28148
+ const previousEnd = index === 0 ? 0 : _nullishCoalesce(_optionalChain([virtualRows, 'access', _1732 => _1732[index - 1], 'optionalAccess', _1733 => _1733.end]), () => ( 0));
28108
28149
  const gapHeight = Math.max(0, virtualRow.start - previousEnd);
28109
28150
  return /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, _chunkOGZ6ROZCcjs.S, { children: [
28110
28151
  gapHeight > 0 ? /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "tr", { "aria-hidden": "true", style: { height: gapHeight }, children: /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "td", { colSpan: rowColSpan }) }) : null,
@@ -28147,11 +28188,11 @@ function XlsxGrid({
28147
28188
  )
28148
28189
  ] }, `row-fragment-${virtualRow.key}`);
28149
28190
  }),
28150
- virtualRows.length > 0 && totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1733 => _1733[virtualRows.length - 1], 'optionalAccess', _1734 => _1734.end]), () => ( totalHeight))) > 0 ? /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0,
28191
+ virtualRows.length > 0 && totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1734 => _1734[virtualRows.length - 1], 'optionalAccess', _1735 => _1735.end]), () => ( totalHeight))) > 0 ? /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0,
28151
28192
  "tr",
28152
28193
  {
28153
28194
  style: {
28154
- height: totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1735 => _1735[virtualRows.length - 1], 'optionalAccess', _1736 => _1736.end]), () => ( totalHeight)))
28195
+ height: totalHeight - (_nullishCoalesce(_optionalChain([virtualRows, 'access', _1736 => _1736[virtualRows.length - 1], 'optionalAccess', _1737 => _1737.end]), () => ( totalHeight)))
28155
28196
  },
28156
28197
  children: /* @__PURE__ */ _chunkOGZ6ROZCcjs.u.call(void 0, "td", { colSpan: rowColSpan })
28157
28198
  }
@@ -28650,4 +28691,4 @@ function __createContentRoot(container) {
28650
28691
 
28651
28692
 
28652
28693
  exports.parseXlsxRange = parseXlsxRange; exports.formatBinaryBytes = formatBinaryBytes; exports.XlsxFileSizeLimitExceededError = XlsxFileSizeLimitExceededError; exports.setWasmSource = setWasmSource; exports.initWasm = initWasm; exports.canUseConfiguredWasmSourceInWorker = canUseConfiguredWasmSourceInWorker; exports.getConfiguredWorkerWasmSource = getConfiguredWorkerWasmSource; exports.getSheetsWasmModule = getSheetsWasmModule; exports.XlsxViewer = XlsxViewer2; exports.createXlsxViewer = createXlsxViewer; exports.__createControlledViewer = __createControlledViewer; exports.__createContentNode = __createContentNode; exports.__createContentRoot = __createContentRoot;
28653
- //# sourceMappingURL=chunk-DWBPSBJ5.cjs.map
28694
+ //# sourceMappingURL=chunk-SXHHFUXA.cjs.map