@extend-ai/react-xlsx 0.16.2 → 0.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3114,6 +3114,17 @@ function applyChartOrigins(chartsByWorkbookSheetIndex, chartOriginsById, archive
3114
3114
  });
3115
3115
  }
3116
3116
  }
3117
+ function hydrateWorkbookChartStyles(chartsByWorkbookSheetIndex, imageAssets) {
3118
+ const chartOriginsById = /* @__PURE__ */ new Map();
3119
+ applyChartOrigins(chartsByWorkbookSheetIndex, chartOriginsById, imageAssets.archive, imageAssets.sheetOrigins);
3120
+ for (const charts of chartsByWorkbookSheetIndex) {
3121
+ for (const chart of charts) {
3122
+ applyChartStyleFromXml(chart, chart.chartPath, imageAssets.archive, imageAssets.themePalette);
3123
+ applyBuiltinChartDefaults(chart, imageAssets.themePalette);
3124
+ }
3125
+ }
3126
+ return chartOriginsById;
3127
+ }
3117
3128
  function loadWorkbookChartAssets(workbook, imageAssets, visibleSheetIndexByWorkbookSheetIndex, showHiddenSheets = false) {
3118
3129
  const excludedChartIds = /* @__PURE__ */ new Set();
3119
3130
  const chartsByWorkbookSheetIndex = Array.from({ length: workbook.sheetCount }, (_, workbookSheetIndex) => {
@@ -3214,21 +3225,14 @@ function loadWorkbookChartAssets(workbook, imageAssets, visibleSheetIndexByWorkb
3214
3225
  });
3215
3226
  const chartsheets = Array.isArray(workbook.chartsheets) ? workbook.chartsheets.map((entry, index) => normalizeChartsheet(entry, index)) : [];
3216
3227
  const tabs = buildTabs(workbook, chartsheets, visibleSheetIndexByWorkbookSheetIndex, showHiddenSheets);
3217
- const chartOriginsById = /* @__PURE__ */ new Map();
3228
+ const chartOriginsById = imageAssets ? hydrateWorkbookChartStyles(chartsByWorkbookSheetIndex, imageAssets) : /* @__PURE__ */ new Map();
3218
3229
  if (imageAssets) {
3219
- applyChartOrigins(chartsByWorkbookSheetIndex, chartOriginsById, imageAssets.archive, imageAssets.sheetOrigins);
3220
3230
  for (let index = 0; index < chartsByWorkbookSheetIndex.length; index += 1) {
3221
3231
  chartsByWorkbookSheetIndex[index] = (chartsByWorkbookSheetIndex[index] ?? []).filter((chart) => !excludedChartIds.has(chart.id));
3222
3232
  }
3223
3233
  for (const id of excludedChartIds) {
3224
3234
  chartOriginsById.delete(id);
3225
3235
  }
3226
- for (const charts of chartsByWorkbookSheetIndex) {
3227
- for (const chart of charts) {
3228
- applyChartStyleFromXml(chart, chart.chartPath, imageAssets.archive, imageAssets.themePalette);
3229
- applyBuiltinChartDefaults(chart, imageAssets.themePalette);
3230
- }
3231
- }
3232
3236
  } else {
3233
3237
  for (let index = 0; index < chartsByWorkbookSheetIndex.length; index += 1) {
3234
3238
  chartsByWorkbookSheetIndex[index] = (chartsByWorkbookSheetIndex[index] ?? []).filter((chart) => !excludedChartIds.has(chart.id));
@@ -4471,6 +4475,7 @@ function parseWorkbookStyles(archive) {
4471
4475
  const xml = readArchiveText2(archive, "xl/styles.xml");
4472
4476
  if (!xml) {
4473
4477
  return {
4478
+ differentialStyles: [],
4474
4479
  defaultFont: null,
4475
4480
  namedCellStyleByName: {},
4476
4481
  styleById: {},
@@ -4480,6 +4485,7 @@ function parseWorkbookStyles(archive) {
4480
4485
  const document2 = parseXml2(xml);
4481
4486
  if (!document2) {
4482
4487
  return {
4488
+ differentialStyles: [],
4483
4489
  defaultFont: null,
4484
4490
  namedCellStyleByName: {},
4485
4491
  styleById: {},
@@ -4496,6 +4502,7 @@ function parseWorkbookStyles(archive) {
4496
4502
  const tableStylesNode = getFirstDescendant(document2, "tableStyles");
4497
4503
  if (!cellXfsNode) {
4498
4504
  return {
4505
+ differentialStyles: [],
4499
4506
  defaultFont: null,
4500
4507
  namedCellStyleByName: {},
4501
4508
  styleById: {},
@@ -4552,6 +4559,7 @@ function parseWorkbookStyles(archive) {
4552
4559
  sizePt: typeof normalFont.size === "number" ? normalFont.size : void 0
4553
4560
  } : null;
4554
4561
  return {
4562
+ differentialStyles,
4555
4563
  defaultFont,
4556
4564
  namedCellStyleByName,
4557
4565
  styleById,
@@ -4592,10 +4600,11 @@ function parseSpreadsheetBooleanAttribute(node, name) {
4592
4600
  }
4593
4601
  return value !== "0" && value !== "false";
4594
4602
  }
4595
- function parseStandardConditionalFormatRule(cfRuleNode, ranges) {
4603
+ function parseStandardConditionalFormatRule(cfRuleNode, ranges, differentialStyles = []) {
4596
4604
  const type = cfRuleNode.getAttribute("type");
4597
4605
  const rawPriority = Number(cfRuleNode.getAttribute("priority") ?? Number.NaN);
4598
4606
  const priority = Number.isFinite(rawPriority) ? rawPriority : Number.MAX_SAFE_INTEGER;
4607
+ const formulas = getChildElements(cfRuleNode, "formula").map((formulaNode) => (formulaNode.textContent ?? "").trim()).filter((formula) => formula.length > 0);
4599
4608
  if (type === "colorScale") {
4600
4609
  const colorScaleNode = getFirstChild(cfRuleNode, "colorScale");
4601
4610
  if (!colorScaleNode) {
@@ -4656,7 +4665,34 @@ function parseStandardConditionalFormatRule(cfRuleNode, ranges) {
4656
4665
  showValue: parseSpreadsheetBooleanAttribute(iconSetNode, "showValue")
4657
4666
  };
4658
4667
  }
4659
- return null;
4668
+ const rawDxfId = Number(cfRuleNode.getAttribute("dxfId") ?? Number.NaN);
4669
+ if (!type || !Number.isFinite(rawDxfId)) {
4670
+ return null;
4671
+ }
4672
+ const style = differentialStyles[rawDxfId];
4673
+ if (!style) {
4674
+ return null;
4675
+ }
4676
+ const rawRank = Number(cfRuleNode.getAttribute("rank") ?? Number.NaN);
4677
+ const rawStdDev = Number(cfRuleNode.getAttribute("stdDev") ?? Number.NaN);
4678
+ return {
4679
+ aboveAverage: parseSpreadsheetBooleanAttribute(cfRuleNode, "aboveAverage"),
4680
+ bottom: parseSpreadsheetBooleanAttribute(cfRuleNode, "bottom"),
4681
+ equalAverage: parseSpreadsheetBooleanAttribute(cfRuleNode, "equalAverage"),
4682
+ formulas,
4683
+ kind: "styled",
4684
+ operator: cfRuleNode.getAttribute("operator") ?? void 0,
4685
+ percent: parseSpreadsheetBooleanAttribute(cfRuleNode, "percent"),
4686
+ priority,
4687
+ rank: Number.isFinite(rawRank) ? rawRank : void 0,
4688
+ ranges,
4689
+ ruleType: type,
4690
+ stdDev: Number.isFinite(rawStdDev) ? rawStdDev : void 0,
4691
+ stopIfTrue: parseSpreadsheetBooleanAttribute(cfRuleNode, "stopIfTrue"),
4692
+ style,
4693
+ text: cfRuleNode.getAttribute("text") ?? void 0,
4694
+ timePeriod: cfRuleNode.getAttribute("timePeriod") ?? void 0
4695
+ };
4660
4696
  }
4661
4697
  function parseExtendedConditionalFormatRule(cfRuleNode, ranges) {
4662
4698
  const type = cfRuleNode.getAttribute("type");
@@ -4767,14 +4803,14 @@ function mergeConditionalFormatRule(baseRule, extendedRule) {
4767
4803
  }
4768
4804
  return baseRule;
4769
4805
  }
4770
- function parseConditionalFormatRules(document2) {
4806
+ function parseConditionalFormatRules(document2, differentialStyles = []) {
4771
4807
  const standardRules = [];
4772
4808
  const extendedRules = [];
4773
4809
  getLocalElements(document2, "conditionalFormatting").forEach((conditionalFormattingNode) => {
4774
4810
  const isExtended = conditionalFormattingNode.namespaceURI !== SPREADSHEET_NS;
4775
4811
  const ranges = isExtended ? parseSqrefRanges(getFirstChild(conditionalFormattingNode, "sqref")?.textContent ?? "") : parseSqrefRanges(conditionalFormattingNode.getAttribute("sqref"));
4776
4812
  getChildElements(conditionalFormattingNode, "cfRule").forEach((cfRuleNode) => {
4777
- const parsedRule = isExtended ? parseExtendedConditionalFormatRule(cfRuleNode, ranges) : parseStandardConditionalFormatRule(cfRuleNode, ranges);
4813
+ const parsedRule = isExtended ? parseExtendedConditionalFormatRule(cfRuleNode, ranges) : parseStandardConditionalFormatRule(cfRuleNode, ranges, differentialStyles);
4778
4814
  if (parsedRule) {
4779
4815
  if (isExtended) {
4780
4816
  extendedRules.push(parsedRule);
@@ -4820,8 +4856,9 @@ function parseSheetState(archive, path, options) {
4820
4856
  return null;
4821
4857
  }
4822
4858
  const includeCachedFormulaValues = options?.includeCachedFormulaValues ?? true;
4859
+ const autoFilterRanges = parseSqrefRanges(getLocalElements(document2, "autoFilter")[0]?.getAttribute("ref"));
4823
4860
  const cachedFormulaValues = {};
4824
- const conditionalFormatRules = parseConditionalFormatRules(document2);
4861
+ const conditionalFormatRules = parseConditionalFormatRules(document2, options?.differentialStyles ?? []);
4825
4862
  const sparklines = parseSheetSparklines(document2, options?.themePalette);
4826
4863
  const sheetFormatNode = getLocalElements(document2, "sheetFormatPr")[0] ?? null;
4827
4864
  const sheetViewNode = getLocalElements(document2, "sheetView")[0] ?? null;
@@ -4913,6 +4950,7 @@ function parseSheetState(archive, path, options) {
4913
4950
  }
4914
4951
  });
4915
4952
  return {
4953
+ autoFilterRanges,
4916
4954
  cachedFormulaValues,
4917
4955
  columnWidthCharacterWidthPx,
4918
4956
  colWidthOverridesPx,
@@ -5908,11 +5946,11 @@ function parseShapeNode(shapeNode, fallbackAnchor, drawingRelationships, theme,
5908
5946
  zIndex
5909
5947
  };
5910
5948
  }
5911
- function parseAnchorContents(anchorNode, fallbackAnchor, drawingRelationships, archive, contentTypes, objectUrls, workbookSheetIndex, theme, ids, imageOriginsById, anchorIndex, sheetState, parentGroup = null) {
5949
+ function parseAnchorContents(anchorNode, fallbackAnchor, drawingRelationships, archive, contentTypes, objectUrls, workbookSheetIndex, theme, ids, imageOriginsById, anchorIndex, sheetState, drawingPath, parentGroup = null, picturePath = []) {
5912
5950
  const images = [];
5913
5951
  const shapes = [];
5914
5952
  const mediaPaths = /* @__PURE__ */ new Set();
5915
- Array.from(anchorNode.childNodes).filter(isElementNode2).forEach((child) => {
5953
+ Array.from(anchorNode.childNodes).filter(isElementNode2).forEach((child, childIndex) => {
5916
5954
  if (child.localName === "pic") {
5917
5955
  const imageId = `sheet-${workbookSheetIndex}-${ids.image}`;
5918
5956
  const parsed = parsePictureNode(
@@ -5933,6 +5971,8 @@ function parseAnchorContents(anchorNode, fallbackAnchor, drawingRelationships, a
5933
5971
  mediaPaths.add(parsed.mediaPath);
5934
5972
  imageOriginsById.set(imageId, {
5935
5973
  anchorIndex,
5974
+ drawingPath,
5975
+ picturePath: [...picturePath, childIndex],
5936
5976
  workbookSheetIndex
5937
5977
  });
5938
5978
  }
@@ -5992,7 +6032,9 @@ function parseAnchorContents(anchorNode, fallbackAnchor, drawingRelationships, a
5992
6032
  imageOriginsById,
5993
6033
  anchorIndex,
5994
6034
  sheetState,
5995
- nextGroup
6035
+ drawingPath,
6036
+ nextGroup,
6037
+ [...picturePath, childIndex]
5996
6038
  );
5997
6039
  parsedGroup.images.forEach((image) => images.push(image));
5998
6040
  parsedGroup.shapes.forEach((shape) => shapes.push(shape));
@@ -6048,7 +6090,8 @@ function parseDrawingObjects(archive, contentTypes, drawingPath, objectUrls, wor
6048
6090
  ids,
6049
6091
  imageOriginsById,
6050
6092
  anchorIndex,
6051
- sheetState
6093
+ sheetState,
6094
+ drawingPath
6052
6095
  );
6053
6096
  parsed.images.forEach((image) => images.push(image));
6054
6097
  parsed.shapes.forEach((shape) => shapes.push(shape));
@@ -6078,12 +6121,13 @@ function parseWorkbookStructureAssetsFromArchive(archive, options) {
6078
6121
  const workbookSheets = parseWorkbookSheets(archive);
6079
6122
  const theme = parseWorkbookTheme(archive);
6080
6123
  const themePalette = buildThemePalette(theme);
6081
- const { defaultFont, namedCellStyleByName, styleById, tableStyleByName } = parseWorkbookStyles(archive);
6124
+ const { defaultFont, differentialStyles, namedCellStyleByName, styleById, tableStyleByName } = parseWorkbookStyles(archive);
6082
6125
  return {
6083
6126
  contentTypes,
6084
6127
  namedCellStyleByName,
6085
6128
  sheetStatesByWorkbookSheetIndex: workbookSheets.map((sheet) => parseSheetState(archive, sheet.path, {
6086
6129
  ...options,
6130
+ differentialStyles,
6087
6131
  defaultFont,
6088
6132
  themePalette
6089
6133
  })),
@@ -6206,6 +6250,9 @@ function updateWorkbookImageAnchor(assets, imageId, anchor) {
6206
6250
  }
6207
6251
  const attachments = assets.sheetOrigins[origin.workbookSheetIndex]?.attachments ?? [];
6208
6252
  for (const attachment of attachments) {
6253
+ if (attachment.drawingPath !== origin.drawingPath) {
6254
+ continue;
6255
+ }
6209
6256
  const drawingXml = readArchiveText2(assets.archive, attachment.drawingPath);
6210
6257
  if (!drawingXml) {
6211
6258
  continue;
@@ -6216,10 +6263,45 @@ function updateWorkbookImageAnchor(assets, imageId, anchor) {
6216
6263
  }
6217
6264
  const anchorNodes = createImageAnchorNodes(drawingDocument);
6218
6265
  const anchorNode = anchorNodes[origin.anchorIndex];
6219
- if (!anchorNode || !getFirstChild(anchorNode, "pic")) {
6266
+ if (!anchorNode) {
6220
6267
  continue;
6221
6268
  }
6222
- updateAnchorNode2(anchorNode, anchor);
6269
+ let pictureNode = anchorNode;
6270
+ let parentGroup = null;
6271
+ let groupAnchor = parseAnchor(anchorNode);
6272
+ for (const childIndex of origin.picturePath) {
6273
+ const child = Array.from(pictureNode.childNodes).filter(isElementNode2)[childIndex];
6274
+ if (!child || !groupAnchor) {
6275
+ break;
6276
+ }
6277
+ pictureNode = child;
6278
+ if (child.localName === "grpSp") {
6279
+ parentGroup = parseGroupTransform(
6280
+ child,
6281
+ parentGroup,
6282
+ groupAnchor,
6283
+ assets.sheetStatesByWorkbookSheetIndex[origin.workbookSheetIndex] ?? null
6284
+ );
6285
+ groupAnchor = rectToAbsoluteAnchor(parentGroup);
6286
+ }
6287
+ }
6288
+ if (pictureNode.localName !== "pic") {
6289
+ continue;
6290
+ }
6291
+ if (parentGroup) {
6292
+ const transform = getFirstDescendant(pictureNode, "xfrm");
6293
+ const off = transform ? getFirstChild(transform, "off") : null;
6294
+ const ext = transform ? getFirstChild(transform, "ext") : null;
6295
+ if (anchor.kind !== "absolute" || !off || !ext || !parentGroup.scaleX || !parentGroup.scaleY) {
6296
+ continue;
6297
+ }
6298
+ off.setAttribute("x", String(Math.round(parentGroup.chX + (anchor.positionEmu.x - parentGroup.x) / parentGroup.scaleX)));
6299
+ off.setAttribute("y", String(Math.round(parentGroup.chY + (anchor.positionEmu.y - parentGroup.y) / parentGroup.scaleY)));
6300
+ ext.setAttribute("cx", String(Math.max(0, Math.round(anchor.sizeEmu.cx / parentGroup.scaleX))));
6301
+ ext.setAttribute("cy", String(Math.max(0, Math.round(anchor.sizeEmu.cy / parentGroup.scaleY))));
6302
+ } else {
6303
+ updateAnchorNode2(anchorNode, anchor);
6304
+ }
6223
6305
  assets.archive[attachment.drawingPath] = (0, import_fflate2.strToU8)(serializeXml2(drawingDocument));
6224
6306
  assets.dirtyArchivePaths.add(normalizeArchivePath2(attachment.drawingPath));
6225
6307
  const imageList = assets.imagesByWorkbookSheetIndex[origin.workbookSheetIndex] ?? [];
@@ -6330,15 +6412,21 @@ function appendSheetDrawingReference(sheetDocument, relationshipId) {
6330
6412
  }
6331
6413
  const drawingNode = sheetDocument.createElementNS(SPREADSHEET_NS, "drawing");
6332
6414
  drawingNode.setAttributeNS(REL_NS, "r:id", relationshipId);
6333
- const extLst = getFirstChild(worksheet, "extLst");
6334
- if (extLst) {
6335
- worksheet.insertBefore(drawingNode, extLst);
6336
- return;
6337
- }
6338
- worksheet.appendChild(drawingNode);
6415
+ const successorNames = /* @__PURE__ */ new Set([
6416
+ "legacyDrawing",
6417
+ "legacyDrawingHF",
6418
+ "picture",
6419
+ "oleObjects",
6420
+ "controls",
6421
+ "webPublishItems",
6422
+ "tableParts",
6423
+ "extLst"
6424
+ ]);
6425
+ const successor = Array.from(worksheet.childNodes).find((node) => isElementNode2(node) && node.namespaceURI === SPREADSHEET_NS && successorNames.has(node.localName));
6426
+ worksheet.insertBefore(drawingNode, successor ?? null);
6339
6427
  }
6340
6428
  function mergeWorkbookImageAssets(savedBytes, sourceAssets, sheetOrigins) {
6341
- if (!sourceAssets || sourceAssets.dirtyArchivePaths.size === 0) {
6429
+ if (!sourceAssets) {
6342
6430
  return cloneBytes(savedBytes);
6343
6431
  }
6344
6432
  try {
@@ -6349,9 +6437,31 @@ function mergeWorkbookImageAssets(savedBytes, sourceAssets, sheetOrigins) {
6349
6437
  if (!targetContentTypesDocument) {
6350
6438
  return cloneBytes(savedBytes);
6351
6439
  }
6440
+ const copiedParts = /* @__PURE__ */ new Set();
6441
+ const copyDrawingPart = (path) => {
6442
+ const normalizedPath = normalizeArchivePath2(path);
6443
+ const bytes = sourceAssets.archive[normalizedPath];
6444
+ if (!bytes || copiedParts.has(normalizedPath)) {
6445
+ return;
6446
+ }
6447
+ copiedParts.add(normalizedPath);
6448
+ archive[normalizedPath] = cloneBytes(bytes);
6449
+ mergeContentTypeForPath(targetContentTypesDocument, originalContentTypesDocument, normalizedPath);
6450
+ const relsPath = relsPathForDocument(normalizedPath);
6451
+ const relsBytes = sourceAssets.archive[relsPath];
6452
+ if (!relsBytes) {
6453
+ return;
6454
+ }
6455
+ archive[relsPath] = cloneBytes(relsBytes);
6456
+ mergeContentTypeForPath(targetContentTypesDocument, originalContentTypesDocument, relsPath);
6457
+ for (const relationship of parseRelationships(sourceAssets.archive, relsPath, normalizedPath).values()) {
6458
+ if (relationship.targetMode !== "External" && !relationship.type.endsWith("/hyperlink")) {
6459
+ copyDrawingPart(relationship.target);
6460
+ }
6461
+ }
6462
+ };
6352
6463
  sheetOrigins.forEach((origin, workbookSheetIndex) => {
6353
- const hasDirtyAttachment = origin?.attachments.some((attachment) => sourceAssets.dirtyArchivePaths.has(normalizeArchivePath2(attachment.drawingPath)) || attachment.drawingRelsPath && sourceAssets.dirtyArchivePaths.has(normalizeArchivePath2(attachment.drawingRelsPath)) || attachment.mediaPaths.some((path) => sourceAssets.dirtyArchivePaths.has(normalizeArchivePath2(path))));
6354
- if (!origin?.attachments.length || !hasDirtyAttachment) {
6464
+ if (!origin?.attachments.length) {
6355
6465
  return;
6356
6466
  }
6357
6467
  const currentSheet = workbookSheets[workbookSheetIndex];
@@ -6374,23 +6484,7 @@ function mergeWorkbookImageAssets(savedBytes, sourceAssets, sheetOrigins) {
6374
6484
  if (!drawingBytes) {
6375
6485
  return;
6376
6486
  }
6377
- archive[attachment.drawingPath] = cloneBytes(drawingBytes);
6378
- mergeContentTypeForPath(targetContentTypesDocument, originalContentTypesDocument, attachment.drawingPath);
6379
- if (attachment.drawingRelsPath) {
6380
- const drawingRelsBytes = sourceAssets.archive[attachment.drawingRelsPath];
6381
- if (drawingRelsBytes) {
6382
- archive[attachment.drawingRelsPath] = cloneBytes(drawingRelsBytes);
6383
- mergeContentTypeForPath(targetContentTypesDocument, originalContentTypesDocument, attachment.drawingRelsPath);
6384
- }
6385
- }
6386
- attachment.mediaPaths.forEach((mediaPath) => {
6387
- const mediaBytes = sourceAssets.archive[mediaPath];
6388
- if (!mediaBytes) {
6389
- return;
6390
- }
6391
- archive[mediaPath] = cloneBytes(mediaBytes);
6392
- mergeContentTypeForPath(targetContentTypesDocument, originalContentTypesDocument, mediaPath);
6393
- });
6487
+ copyDrawingPart(attachment.drawingPath);
6394
6488
  const relationshipId = nextRelationshipId(relDocument);
6395
6489
  const relationshipNode = relDocument.createElementNS(PKG_REL_NS, "Relationship");
6396
6490
  relationshipNode.setAttribute("Id", relationshipId);
@@ -6452,7 +6546,7 @@ function markerFromOffset(offsetPx, getSizePx) {
6452
6546
  let remaining = Math.max(0, offsetPx);
6453
6547
  let index = 0;
6454
6548
  while (remaining > 0) {
6455
- const size = Math.max(1, getSizePx(index));
6549
+ const size = Math.max(0, getSizePx(index));
6456
6550
  if (remaining < size) {
6457
6551
  break;
6458
6552
  }
@@ -7237,6 +7331,7 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
7237
7331
  const usedRange = worksheet.usedRange();
7238
7332
  if (!usedRange) {
7239
7333
  sheets.push({
7334
+ autoFilterRanges: sheetState?.autoFilterRanges ?? [],
7240
7335
  cachedFormulaValues: sheetState?.cachedFormulaValues ?? {},
7241
7336
  columnWidthCharacterWidthPx: sheetState?.columnWidthCharacterWidthPx,
7242
7337
  colWidthOverridesPx: sheetState?.colWidthOverridesPx ?? {},
@@ -7323,6 +7418,7 @@ function buildSheetList(workbook, sheetStatesByWorkbookSheetIndex, themePalette,
7323
7418
  return colWidthsCache;
7324
7419
  };
7325
7420
  const sheet = {
7421
+ autoFilterRanges: sheetState?.autoFilterRanges ?? [],
7326
7422
  cachedFormulaValues: sheetState?.cachedFormulaValues ?? {},
7327
7423
  columnWidthCharacterWidthPx: sheetState?.columnWidthCharacterWidthPx,
7328
7424
  colWidthOverridesPx: sheetState?.colWidthOverridesPx ?? {},
@@ -7703,9 +7799,9 @@ function rangeContainsCell(range, cell) {
7703
7799
  const normalized = normalizeRange(range);
7704
7800
  return cell.row >= normalized.start.row && cell.row <= normalized.end.row && cell.col >= normalized.start.col && cell.col <= normalized.end.col;
7705
7801
  }
7706
- function mapWorksheetTables(worksheet) {
7802
+ function mapWorksheetTables(worksheet, autoFilterRanges = []) {
7707
7803
  const rawTables = worksheet?.tables ?? [];
7708
- return rawTables.flatMap((table, index) => {
7804
+ const mappedTables = rawTables.flatMap((table, index) => {
7709
7805
  const rawColumns = Array.isArray(table.columns) ? table.columns : [];
7710
7806
  const rawName = typeof table.name === "string" ? table.name : `Table${index + 1}`;
7711
7807
  const rawDisplayName = typeof table.displayName === "string" ? table.displayName : typeof table.name === "string" ? table.name : `Table ${index + 1}`;
@@ -7733,6 +7829,34 @@ function mapWorksheetTables(worksheet) {
7733
7829
  totalsRowShown: resolveWorkbookTableBoolean(table.totalsRowShown)
7734
7830
  }];
7735
7831
  });
7832
+ const existingReferences = new Set(mappedTables.map((table) => table.reference));
7833
+ const mappedAutoFilterTables = autoFilterRanges.flatMap((range, index) => {
7834
+ const reference = rangeToA1(range);
7835
+ if (existingReferences.has(reference)) {
7836
+ return [];
7837
+ }
7838
+ const columnCount = Math.max(0, range.end.col - range.start.col + 1);
7839
+ const columns = Array.from({ length: columnCount }, (_, columnIndex) => {
7840
+ const headerValue = worksheet ? decodeHtmlEntities(worksheet.getFormattedValueAt(range.start.row, range.start.col + columnIndex) ?? "") : "";
7841
+ return {
7842
+ id: columnIndex + 1,
7843
+ index: columnIndex,
7844
+ name: headerValue.trim().length > 0 ? headerValue : `Column ${columnIndex + 1}`
7845
+ };
7846
+ });
7847
+ return [{
7848
+ columns,
7849
+ displayName: `AutoFilter ${index + 1}`,
7850
+ end: range.end,
7851
+ headerRowCount: 1,
7852
+ name: `__autofilter_${index + 1}_${reference}`,
7853
+ reference,
7854
+ start: range.start,
7855
+ totalsRowCount: 0,
7856
+ totalsRowShown: false
7857
+ }];
7858
+ });
7859
+ return [...mappedTables, ...mappedAutoFilterTables];
7736
7860
  }
7737
7861
  function resolveWorkbookTableCount(value, fallback) {
7738
7862
  if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
@@ -8459,6 +8583,10 @@ function useXlsxViewerController(options) {
8459
8583
  if (requestToken !== chartLoadRequestTokenRef.current) {
8460
8584
  return;
8461
8585
  }
8586
+ if (imageAssetsRef.current && !effectiveSkipXmlParsing) {
8587
+ const chartOriginsById = hydrateWorkbookChartStyles(result.chartsByWorkbookSheetIndex, imageAssetsRef.current);
8588
+ chartAssetsRef.current = { ...result, chartOriginsById };
8589
+ }
8462
8590
  setChartsByWorkbookSheetIndex(result.chartsByWorkbookSheetIndex);
8463
8591
  setChartsheets(result.chartsheets);
8464
8592
  setTabs(result.tabs);
@@ -8674,13 +8802,14 @@ function useXlsxViewerController(options) {
8674
8802
  return;
8675
8803
  }
8676
8804
  setImageAssets(workerImageAssets);
8805
+ const chartOriginsById = workerImageAssets ? hydrateWorkbookChartStyles(snapshot.chartsByWorkbookSheetIndex, workerImageAssets) : /* @__PURE__ */ new Map();
8677
8806
  setFormControlsByWorkbookSheetIndex(snapshot.formControlsByWorkbookSheetIndex);
8678
8807
  setWorkbook(null);
8679
8808
  setSheets(snapshot.sheets);
8680
8809
  setChartsByWorkbookSheetIndex(snapshot.chartsByWorkbookSheetIndex);
8681
8810
  setChartsheets(snapshot.chartsheets);
8682
8811
  setTabs(snapshot.tabs);
8683
- chartAssetsRef.current = null;
8812
+ chartAssetsRef.current = { ...snapshot, chartOriginsById };
8684
8813
  setWorkerTablesByWorkbookSheetIndex(snapshot.tablesByWorkbookSheetIndex);
8685
8814
  setShouldAutoCalculate(false);
8686
8815
  setIsWorkerBacked(true);
@@ -8892,6 +9021,9 @@ function useXlsxViewerController(options) {
8892
9021
  if (!effectiveSkipXmlParsing && hasIncompleteWorkerChartSnapshot(snapshot)) {
8893
9022
  throw new Error("Worker chart payload incomplete");
8894
9023
  }
9024
+ const workerImageAssets = effectiveSkipXmlParsing ? null : parseWorkbookImageAssets(new Uint8Array(deferredBuffer));
9025
+ setImageAssets(workerImageAssets);
9026
+ const chartOriginsById = workerImageAssets ? hydrateWorkbookChartStyles(snapshot.chartsByWorkbookSheetIndex, workerImageAssets) : /* @__PURE__ */ new Map();
8895
9027
  deferredBufferRef.current = null;
8896
9028
  setDeferredLoadFileSize(null);
8897
9029
  setWorkbook(null);
@@ -8899,7 +9031,7 @@ function useXlsxViewerController(options) {
8899
9031
  setChartsByWorkbookSheetIndex(snapshot.chartsByWorkbookSheetIndex);
8900
9032
  setChartsheets(snapshot.chartsheets);
8901
9033
  setTabs(snapshot.tabs);
8902
- chartAssetsRef.current = null;
9034
+ chartAssetsRef.current = { ...snapshot, chartOriginsById };
8903
9035
  setFormControlsByWorkbookSheetIndex(snapshot.formControlsByWorkbookSheetIndex);
8904
9036
  setWorkerTablesByWorkbookSheetIndex(snapshot.tablesByWorkbookSheetIndex);
8905
9037
  setShouldAutoCalculate(false);
@@ -9037,8 +9169,8 @@ function useXlsxViewerController(options) {
9037
9169
  }
9038
9170
  }, [activeSheetIndex, sheets, workbook]);
9039
9171
  const tables = React.useMemo(
9040
- () => isWorkerBacked ? workerTablesByWorkbookSheetIndex[activeSheet?.workbookSheetIndex ?? -1] ?? [] : mapWorksheetTables(getActiveWorksheet()),
9041
- [activeSheet?.workbookSheetIndex, getActiveWorksheet, isWorkerBacked, revision, workerTablesByWorkbookSheetIndex]
9172
+ () => isWorkerBacked ? workerTablesByWorkbookSheetIndex[activeSheet?.workbookSheetIndex ?? -1] ?? [] : mapWorksheetTables(getActiveWorksheet(), activeSheet?.autoFilterRanges ?? []),
9173
+ [activeSheet?.autoFilterRanges, activeSheet?.workbookSheetIndex, getActiveWorksheet, isWorkerBacked, revision, workerTablesByWorkbookSheetIndex]
9042
9174
  );
9043
9175
  const getCellSnapshotAsync = React.useCallback((workbookSheetIndex, row, col) => {
9044
9176
  if (!isWorkerBacked) {
@@ -9990,7 +10122,7 @@ function useXlsxViewerController(options) {
9990
10122
  width: Math.max(1, right - left)
9991
10123
  };
9992
10124
  }, [getColumnWidthPx, getRowHeightPx]);
9993
- const setChartRect = React.useCallback((id, rect) => {
10125
+ const setChartRect = React.useCallback((id, rect, layout) => {
9994
10126
  const hydratedChartAssets = ensureChartAssetsHydrated(workbook, sheets);
9995
10127
  console.info("[react-xlsx debug] setChartRect", {
9996
10128
  hasActiveSheet: Boolean(activeSheet),
@@ -10019,8 +10151,8 @@ function useXlsxViewerController(options) {
10019
10151
  const nextAnchor = rectToImageAnchor(rect, currentChart.anchor, {
10020
10152
  contentOffsetLeft: GRID_ROW_HEADER_WIDTH,
10021
10153
  contentOffsetTop: GRID_HEADER_HEIGHT,
10022
- getColumnWidthPx: (col) => getColumnWidthPx(worksheet, col),
10023
- getRowHeightPx: (row) => getRowHeightPx(worksheet, row)
10154
+ getColumnWidthPx: (col) => layout?.columnWidths[col] ?? getColumnWidthPx(worksheet, col),
10155
+ getRowHeightPx: (row) => layout?.rowHeights[row] ?? getRowHeightPx(worksheet, row)
10024
10156
  });
10025
10157
  recordHistoryBeforeMutation();
10026
10158
  const didUpdateAnchor = updateWorkbookChartAnchor(imageAssetsRef.current, hydratedChartAssets, id, nextAnchor);
@@ -10039,7 +10171,7 @@ function useXlsxViewerController(options) {
10039
10171
  sheets,
10040
10172
  workbook
10041
10173
  ]);
10042
- const setImageRect = React.useCallback((id, rect) => {
10174
+ const setImageRect = React.useCallback((id, rect, layout) => {
10043
10175
  if (readOnly || !workbook || !activeSheet || !imageAssetsRef.current) {
10044
10176
  return;
10045
10177
  }
@@ -10051,8 +10183,8 @@ function useXlsxViewerController(options) {
10051
10183
  const nextAnchor = rectToImageAnchor(rect, currentImage.anchor, {
10052
10184
  contentOffsetLeft: GRID_ROW_HEADER_WIDTH,
10053
10185
  contentOffsetTop: GRID_HEADER_HEIGHT,
10054
- getColumnWidthPx: (col) => getColumnWidthPx(worksheet, col),
10055
- getRowHeightPx: (row) => getRowHeightPx(worksheet, row)
10186
+ getColumnWidthPx: (col) => layout?.columnWidths[col] ?? getColumnWidthPx(worksheet, col),
10187
+ getRowHeightPx: (row) => layout?.rowHeights[row] ?? getRowHeightPx(worksheet, row)
10056
10188
  });
10057
10189
  recordHistoryBeforeMutation();
10058
10190
  if (!updateWorkbookImageAnchor(imageAssetsRef.current, id, nextAnchor)) {
@@ -11089,6 +11221,570 @@ function useXlsxViewerController(options) {
11089
11221
  var React4 = __toESM(require("react"), 1);
11090
11222
  var import_react_virtual = require("@tanstack/react-virtual");
11091
11223
 
11224
+ // src/builtin-table-styles.ts
11225
+ var BUILTIN_TABLE_STYLES = {
11226
+ TableStyleLight1: {
11227
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "thin" }, "bottom": { "color": { "theme": 1 }, "style": "thin" } } },
11228
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "bottom": { "color": { "theme": 1 }, "style": "thin" } } },
11229
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "thin" } } },
11230
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11231
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11232
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11233
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11234
+ },
11235
+ TableStyleLight2: {
11236
+ wholeTable: { "font": { "color": { "theme": 4, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 4 }, "style": "thin" }, "bottom": { "color": { "theme": 4 }, "style": "thin" } } },
11237
+ headerRow: { "font": { "bold": true, "color": { "theme": 4, "tint": -0.25 } }, "border": { "bottom": { "color": { "theme": 4 }, "style": "thin" } } },
11238
+ totalRow: { "font": { "bold": true, "color": { "theme": 4, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 4 }, "style": "thin" } } },
11239
+ firstColumn: { "font": { "bold": true, "color": { "theme": 4, "tint": -0.25 } } },
11240
+ lastColumn: { "font": { "bold": true, "color": { "theme": 4, "tint": -0.25 } } },
11241
+ firstRowStripe: { "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" } },
11242
+ firstColumnStripe: { "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" } }
11243
+ },
11244
+ TableStyleLight3: {
11245
+ wholeTable: { "font": { "color": { "theme": 5, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 5 }, "style": "thin" }, "bottom": { "color": { "theme": 5 }, "style": "thin" } } },
11246
+ headerRow: { "font": { "bold": true, "color": { "theme": 5, "tint": -0.25 } }, "border": { "bottom": { "color": { "theme": 5 }, "style": "thin" } } },
11247
+ totalRow: { "font": { "bold": true, "color": { "theme": 5, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 5 }, "style": "thin" } } },
11248
+ firstColumn: { "font": { "bold": true, "color": { "theme": 5, "tint": -0.25 } } },
11249
+ lastColumn: { "font": { "bold": true, "color": { "theme": 5, "tint": -0.25 } } },
11250
+ firstRowStripe: { "fill": { "color": { "theme": 5, "tint": 0.8 }, "fillType": "solid" } },
11251
+ firstColumnStripe: { "fill": { "color": { "theme": 5, "tint": 0.8 }, "fillType": "solid" } }
11252
+ },
11253
+ TableStyleLight4: {
11254
+ wholeTable: { "font": { "color": { "theme": 6, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 6 }, "style": "thin" }, "bottom": { "color": { "theme": 6 }, "style": "thin" } } },
11255
+ headerRow: { "font": { "bold": true, "color": { "theme": 6, "tint": -0.25 } }, "border": { "bottom": { "color": { "theme": 6 }, "style": "thin" } } },
11256
+ totalRow: { "font": { "bold": true, "color": { "theme": 6, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 6 }, "style": "thin" } } },
11257
+ firstColumn: { "font": { "bold": true, "color": { "theme": 6, "tint": -0.25 } } },
11258
+ lastColumn: { "font": { "bold": true, "color": { "theme": 6, "tint": -0.25 } } },
11259
+ firstRowStripe: { "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" } },
11260
+ firstColumnStripe: { "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" } }
11261
+ },
11262
+ TableStyleLight5: {
11263
+ wholeTable: { "font": { "color": { "theme": 7, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 7 }, "style": "thin" }, "bottom": { "color": { "theme": 7 }, "style": "thin" } } },
11264
+ headerRow: { "font": { "bold": true, "color": { "theme": 7, "tint": -0.25 } }, "border": { "bottom": { "color": { "theme": 7 }, "style": "thin" } } },
11265
+ totalRow: { "font": { "bold": true, "color": { "theme": 7, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 7 }, "style": "thin" } } },
11266
+ firstColumn: { "font": { "bold": true, "color": { "theme": 7, "tint": -0.25 } } },
11267
+ lastColumn: { "font": { "bold": true, "color": { "theme": 7, "tint": -0.25 } } },
11268
+ firstRowStripe: { "fill": { "color": { "theme": 7, "tint": 0.8 }, "fillType": "solid" } },
11269
+ firstColumnStripe: { "fill": { "color": { "theme": 7, "tint": 0.8 }, "fillType": "solid" } }
11270
+ },
11271
+ TableStyleLight6: {
11272
+ wholeTable: { "font": { "color": { "theme": 8, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 8 }, "style": "thin" }, "bottom": { "color": { "theme": 8 }, "style": "thin" } } },
11273
+ headerRow: { "font": { "bold": true, "color": { "theme": 8, "tint": -0.25 } }, "border": { "bottom": { "color": { "theme": 8 }, "style": "thin" } } },
11274
+ totalRow: { "font": { "bold": true, "color": { "theme": 8, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 8 }, "style": "thin" } } },
11275
+ firstColumn: { "font": { "bold": true, "color": { "theme": 8, "tint": -0.25 } } },
11276
+ lastColumn: { "font": { "bold": true, "color": { "theme": 8, "tint": -0.25 } } },
11277
+ firstRowStripe: { "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" } },
11278
+ firstColumnStripe: { "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" } }
11279
+ },
11280
+ TableStyleLight7: {
11281
+ wholeTable: { "font": { "color": { "theme": 9, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 9 }, "style": "thin" }, "bottom": { "color": { "theme": 9 }, "style": "thin" } } },
11282
+ headerRow: { "font": { "bold": true, "color": { "theme": 9, "tint": -0.25 } }, "border": { "bottom": { "color": { "theme": 9 }, "style": "thin" } } },
11283
+ totalRow: { "font": { "bold": true, "color": { "theme": 9, "tint": -0.25 } }, "border": { "top": { "color": { "theme": 9 }, "style": "thin" } } },
11284
+ firstColumn: { "font": { "bold": true, "color": { "theme": 9, "tint": -0.25 } } },
11285
+ lastColumn: { "font": { "bold": true, "color": { "theme": 9, "tint": -0.25 } } },
11286
+ firstRowStripe: { "fill": { "color": { "theme": 9, "tint": 0.8 }, "fillType": "solid" } },
11287
+ firstColumnStripe: { "fill": { "color": { "theme": 9, "tint": 0.8 }, "fillType": "solid" } }
11288
+ },
11289
+ TableStyleLight8: {
11290
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "thin" }, "right": { "color": { "theme": 1 }, "style": "thin" }, "bottom": { "color": { "theme": 1 }, "style": "thin" }, "left": { "color": { "theme": 1 }, "style": "thin" } } },
11291
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" } },
11292
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11293
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11294
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11295
+ firstRowStripe: { "border": { "top": { "color": { "theme": 1 }, "style": "thin" } } },
11296
+ secondRowStripe: { "border": { "top": { "color": { "theme": 1 }, "style": "thin" } } },
11297
+ firstColumnStripe: { "border": { "left": { "color": { "theme": 1 }, "style": "thin" } } },
11298
+ secondColumnStripe: { "border": { "left": { "color": { "theme": 1 }, "style": "thin" } } }
11299
+ },
11300
+ TableStyleLight9: {
11301
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 4 }, "style": "thin" }, "right": { "color": { "theme": 4 }, "style": "thin" }, "bottom": { "color": { "theme": 4 }, "style": "thin" }, "left": { "color": { "theme": 4 }, "style": "thin" } } },
11302
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" } },
11303
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 4 }, "style": "double" } } },
11304
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11305
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11306
+ firstRowStripe: { "border": { "top": { "color": { "theme": 4 }, "style": "thin" } } },
11307
+ secondRowStripe: { "border": { "top": { "color": { "theme": 4 }, "style": "thin" } } },
11308
+ firstColumnStripe: { "border": { "left": { "color": { "theme": 4 }, "style": "thin" } } },
11309
+ secondColumnStripe: { "border": { "left": { "color": { "theme": 4 }, "style": "thin" } } }
11310
+ },
11311
+ TableStyleLight10: {
11312
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 5 }, "style": "thin" }, "right": { "color": { "theme": 5 }, "style": "thin" }, "bottom": { "color": { "theme": 5 }, "style": "thin" }, "left": { "color": { "theme": 5 }, "style": "thin" } } },
11313
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" } },
11314
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 5 }, "style": "double" } } },
11315
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11316
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11317
+ firstRowStripe: { "border": { "top": { "color": { "theme": 5 }, "style": "thin" } } },
11318
+ secondRowStripe: { "border": { "top": { "color": { "theme": 5 }, "style": "thin" } } },
11319
+ firstColumnStripe: { "border": { "left": { "color": { "theme": 5 }, "style": "thin" } } },
11320
+ secondColumnStripe: { "border": { "left": { "color": { "theme": 5 }, "style": "thin" } } }
11321
+ },
11322
+ TableStyleLight11: {
11323
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 6 }, "style": "thin" }, "right": { "color": { "theme": 6 }, "style": "thin" }, "bottom": { "color": { "theme": 6 }, "style": "thin" }, "left": { "color": { "theme": 6 }, "style": "thin" } } },
11324
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" } },
11325
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 6 }, "style": "double" } } },
11326
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11327
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11328
+ firstRowStripe: { "border": { "top": { "color": { "theme": 6 }, "style": "thin" } } },
11329
+ secondRowStripe: { "border": { "top": { "color": { "theme": 6 }, "style": "thin" } } },
11330
+ firstColumnStripe: { "border": { "left": { "color": { "theme": 6 }, "style": "thin" } } },
11331
+ secondColumnStripe: { "border": { "left": { "color": { "theme": 6 }, "style": "thin" } } }
11332
+ },
11333
+ TableStyleLight12: {
11334
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 7 }, "style": "thin" }, "right": { "color": { "theme": 7 }, "style": "thin" }, "bottom": { "color": { "theme": 7 }, "style": "thin" }, "left": { "color": { "theme": 7 }, "style": "thin" } } },
11335
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" } },
11336
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 7 }, "style": "double" } } },
11337
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11338
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11339
+ firstRowStripe: { "border": { "top": { "color": { "theme": 7 }, "style": "thin" } } },
11340
+ secondRowStripe: { "border": { "top": { "color": { "theme": 7 }, "style": "thin" } } },
11341
+ firstColumnStripe: { "border": { "left": { "color": { "theme": 7 }, "style": "thin" } } },
11342
+ secondColumnStripe: { "border": { "left": { "color": { "theme": 7 }, "style": "thin" } } }
11343
+ },
11344
+ TableStyleLight13: {
11345
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 8 }, "style": "thin" }, "right": { "color": { "theme": 8 }, "style": "thin" }, "bottom": { "color": { "theme": 8 }, "style": "thin" }, "left": { "color": { "theme": 8 }, "style": "thin" } } },
11346
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" } },
11347
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 8 }, "style": "double" } } },
11348
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11349
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11350
+ firstRowStripe: { "border": { "top": { "color": { "theme": 8 }, "style": "thin" } } },
11351
+ secondRowStripe: { "border": { "top": { "color": { "theme": 8 }, "style": "thin" } } },
11352
+ firstColumnStripe: { "border": { "left": { "color": { "theme": 8 }, "style": "thin" } } },
11353
+ secondColumnStripe: { "border": { "left": { "color": { "theme": 8 }, "style": "thin" } } }
11354
+ },
11355
+ TableStyleLight14: {
11356
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 9 }, "style": "thin" }, "right": { "color": { "theme": 9 }, "style": "thin" }, "bottom": { "color": { "theme": 9 }, "style": "thin" }, "left": { "color": { "theme": 9 }, "style": "thin" } } },
11357
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" } },
11358
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 9 }, "style": "double" } } },
11359
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11360
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11361
+ firstRowStripe: { "border": { "top": { "color": { "theme": 9 }, "style": "thin" } } },
11362
+ secondRowStripe: { "border": { "top": { "color": { "theme": 9 }, "style": "thin" } } },
11363
+ firstColumnStripe: { "border": { "left": { "color": { "theme": 9 }, "style": "thin" } } },
11364
+ secondColumnStripe: { "border": { "left": { "color": { "theme": 9 }, "style": "thin" } } }
11365
+ },
11366
+ TableStyleLight15: {
11367
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "thin" }, "right": { "color": { "theme": 1 }, "style": "thin" }, "bottom": { "color": { "theme": 1 }, "style": "thin" }, "left": { "color": { "theme": 1 }, "style": "thin" }, "horizontal": { "color": { "theme": 1 }, "style": "thin" }, "vertical": { "color": { "theme": 1 }, "style": "thin" } } },
11368
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11369
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11370
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11371
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11372
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11373
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11374
+ },
11375
+ TableStyleLight16: {
11376
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 4 }, "style": "thin" }, "right": { "color": { "theme": 4 }, "style": "thin" }, "bottom": { "color": { "theme": 4 }, "style": "thin" }, "left": { "color": { "theme": 4 }, "style": "thin" }, "horizontal": { "color": { "theme": 4 }, "style": "thin" }, "vertical": { "color": { "theme": 4 }, "style": "thin" } } },
11377
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "bottom": { "color": { "theme": 4 }, "style": "medium" } } },
11378
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 4 }, "style": "double" } } },
11379
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11380
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11381
+ firstRowStripe: { "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" } },
11382
+ firstColumnStripe: { "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" } }
11383
+ },
11384
+ TableStyleLight17: {
11385
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 5 }, "style": "thin" }, "right": { "color": { "theme": 5 }, "style": "thin" }, "bottom": { "color": { "theme": 5 }, "style": "thin" }, "left": { "color": { "theme": 5 }, "style": "thin" }, "horizontal": { "color": { "theme": 5 }, "style": "thin" }, "vertical": { "color": { "theme": 5 }, "style": "thin" } } },
11386
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "bottom": { "color": { "theme": 5 }, "style": "medium" } } },
11387
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 5 }, "style": "double" } } },
11388
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11389
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11390
+ firstRowStripe: { "fill": { "color": { "theme": 5, "tint": 0.8 }, "fillType": "solid" } },
11391
+ firstColumnStripe: { "fill": { "color": { "theme": 5, "tint": 0.8 }, "fillType": "solid" } }
11392
+ },
11393
+ TableStyleLight18: {
11394
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 6 }, "style": "thin" }, "right": { "color": { "theme": 6 }, "style": "thin" }, "bottom": { "color": { "theme": 6 }, "style": "thin" }, "left": { "color": { "theme": 6 }, "style": "thin" }, "horizontal": { "color": { "theme": 6 }, "style": "thin" }, "vertical": { "color": { "theme": 6 }, "style": "thin" } } },
11395
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "bottom": { "color": { "theme": 6 }, "style": "medium" } } },
11396
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 6 }, "style": "double" } } },
11397
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11398
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11399
+ firstRowStripe: { "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" } },
11400
+ firstColumnStripe: { "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" } }
11401
+ },
11402
+ TableStyleLight19: {
11403
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 7 }, "style": "thin" }, "right": { "color": { "theme": 7 }, "style": "thin" }, "bottom": { "color": { "theme": 7 }, "style": "thin" }, "left": { "color": { "theme": 7 }, "style": "thin" }, "horizontal": { "color": { "theme": 7 }, "style": "thin" }, "vertical": { "color": { "theme": 7 }, "style": "thin" } } },
11404
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "bottom": { "color": { "theme": 7 }, "style": "medium" } } },
11405
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 7 }, "style": "double" } } },
11406
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11407
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11408
+ firstRowStripe: { "fill": { "color": { "theme": 7, "tint": 0.8 }, "fillType": "solid" } },
11409
+ firstColumnStripe: { "fill": { "color": { "theme": 7, "tint": 0.8 }, "fillType": "solid" } }
11410
+ },
11411
+ TableStyleLight20: {
11412
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 8 }, "style": "thin" }, "right": { "color": { "theme": 8 }, "style": "thin" }, "bottom": { "color": { "theme": 8 }, "style": "thin" }, "left": { "color": { "theme": 8 }, "style": "thin" }, "horizontal": { "color": { "theme": 8 }, "style": "thin" }, "vertical": { "color": { "theme": 8 }, "style": "thin" } } },
11413
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "bottom": { "color": { "theme": 8 }, "style": "medium" } } },
11414
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 8 }, "style": "double" } } },
11415
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11416
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11417
+ firstRowStripe: { "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" } },
11418
+ firstColumnStripe: { "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" } }
11419
+ },
11420
+ TableStyleLight21: {
11421
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 9 }, "style": "thin" }, "right": { "color": { "theme": 9 }, "style": "thin" }, "bottom": { "color": { "theme": 9 }, "style": "thin" }, "left": { "color": { "theme": 9 }, "style": "thin" }, "horizontal": { "color": { "theme": 9 }, "style": "thin" }, "vertical": { "color": { "theme": 9 }, "style": "thin" } } },
11422
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "bottom": { "color": { "theme": 9 }, "style": "medium" } } },
11423
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 9 }, "style": "double" } } },
11424
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11425
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11426
+ firstRowStripe: { "fill": { "color": { "theme": 9, "tint": 0.8 }, "fillType": "solid" } },
11427
+ firstColumnStripe: { "fill": { "color": { "theme": 9, "tint": 0.8 }, "fillType": "solid" } }
11428
+ },
11429
+ TableStyleMedium1: {
11430
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "thin" }, "right": { "color": { "theme": 1 }, "style": "thin" }, "bottom": { "color": { "theme": 1 }, "style": "thin" }, "left": { "color": { "theme": 1 }, "style": "thin" }, "horizontal": { "color": { "theme": 1 }, "style": "thin" } } },
11431
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" } },
11432
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11433
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11434
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11435
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11436
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11437
+ },
11438
+ TableStyleMedium2: {
11439
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" } } },
11440
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" } },
11441
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 4 }, "style": "double" } } },
11442
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11443
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11444
+ firstRowStripe: { "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" } },
11445
+ firstColumnStripe: { "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" } }
11446
+ },
11447
+ TableStyleMedium3: {
11448
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" } } },
11449
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" } },
11450
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 5 }, "style": "double" } } },
11451
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11452
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11453
+ firstRowStripe: { "fill": { "color": { "theme": 5, "tint": 0.8 }, "fillType": "solid" } },
11454
+ firstColumnStripe: { "fill": { "color": { "theme": 5, "tint": 0.8 }, "fillType": "solid" } }
11455
+ },
11456
+ TableStyleMedium4: {
11457
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" } } },
11458
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" } },
11459
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 6 }, "style": "double" } } },
11460
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11461
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11462
+ firstRowStripe: { "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" } },
11463
+ firstColumnStripe: { "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" } }
11464
+ },
11465
+ TableStyleMedium5: {
11466
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" } } },
11467
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" } },
11468
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 7 }, "style": "double" } } },
11469
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11470
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11471
+ firstRowStripe: { "fill": { "color": { "theme": 7, "tint": 0.8 }, "fillType": "solid" } },
11472
+ firstColumnStripe: { "fill": { "color": { "theme": 7, "tint": 0.8 }, "fillType": "solid" } }
11473
+ },
11474
+ TableStyleMedium6: {
11475
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" } } },
11476
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" } },
11477
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 8 }, "style": "double" } } },
11478
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11479
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11480
+ firstRowStripe: { "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" } },
11481
+ firstColumnStripe: { "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" } }
11482
+ },
11483
+ TableStyleMedium7: {
11484
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" } } },
11485
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" } },
11486
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 9 }, "style": "double" } } },
11487
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11488
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11489
+ firstRowStripe: { "fill": { "color": { "theme": 9, "tint": 0.8 }, "fillType": "solid" } },
11490
+ firstColumnStripe: { "fill": { "color": { "theme": 9, "tint": 0.8 }, "fillType": "solid" } }
11491
+ },
11492
+ TableStyleMedium8: {
11493
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" }, "border": { "horizontal": { "color": { "theme": 0 }, "style": "thin" }, "vertical": { "color": { "theme": 0 }, "style": "thin" } } },
11494
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "thick" } } },
11495
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "thick" } } },
11496
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" } },
11497
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" } },
11498
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.35 }, "fillType": "solid" } },
11499
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.35 }, "fillType": "solid" } }
11500
+ },
11501
+ TableStyleMedium9: {
11502
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" }, "border": { "horizontal": { "color": { "theme": 0 }, "style": "thin" }, "vertical": { "color": { "theme": 0 }, "style": "thin" } } },
11503
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "thick" } } },
11504
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "thick" } } },
11505
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" } },
11506
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" } },
11507
+ firstRowStripe: { "fill": { "color": { "theme": 4, "tint": 0.6 }, "fillType": "solid" } },
11508
+ firstColumnStripe: { "fill": { "color": { "theme": 4, "tint": 0.6 }, "fillType": "solid" } }
11509
+ },
11510
+ TableStyleMedium10: {
11511
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 5, "tint": 0.8 }, "fillType": "solid" }, "border": { "horizontal": { "color": { "theme": 0 }, "style": "thin" }, "vertical": { "color": { "theme": 0 }, "style": "thin" } } },
11512
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "thick" } } },
11513
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "thick" } } },
11514
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" } },
11515
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" } },
11516
+ firstRowStripe: { "fill": { "color": { "theme": 5, "tint": 0.6 }, "fillType": "solid" } },
11517
+ firstColumnStripe: { "fill": { "color": { "theme": 5, "tint": 0.6 }, "fillType": "solid" } }
11518
+ },
11519
+ TableStyleMedium11: {
11520
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" }, "border": { "horizontal": { "color": { "theme": 0 }, "style": "thin" }, "vertical": { "color": { "theme": 0 }, "style": "thin" } } },
11521
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "thick" } } },
11522
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "thick" } } },
11523
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" } },
11524
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" } },
11525
+ firstRowStripe: { "fill": { "color": { "theme": 6, "tint": 0.6 }, "fillType": "solid" } },
11526
+ firstColumnStripe: { "fill": { "color": { "theme": 6, "tint": 0.6 }, "fillType": "solid" } }
11527
+ },
11528
+ TableStyleMedium12: {
11529
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 7, "tint": 0.8 }, "fillType": "solid" }, "border": { "horizontal": { "color": { "theme": 0 }, "style": "thin" }, "vertical": { "color": { "theme": 0 }, "style": "thin" } } },
11530
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "thick" } } },
11531
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "thick" } } },
11532
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" } },
11533
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" } },
11534
+ firstRowStripe: { "fill": { "color": { "theme": 7, "tint": 0.6 }, "fillType": "solid" } },
11535
+ firstColumnStripe: { "fill": { "color": { "theme": 7, "tint": 0.6 }, "fillType": "solid" } }
11536
+ },
11537
+ TableStyleMedium13: {
11538
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" }, "border": { "horizontal": { "color": { "theme": 0 }, "style": "thin" }, "vertical": { "color": { "theme": 0 }, "style": "thin" } } },
11539
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "thick" } } },
11540
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "thick" } } },
11541
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" } },
11542
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" } },
11543
+ firstRowStripe: { "fill": { "color": { "theme": 8, "tint": 0.6 }, "fillType": "solid" } },
11544
+ firstColumnStripe: { "fill": { "color": { "theme": 8, "tint": 0.6 }, "fillType": "solid" } }
11545
+ },
11546
+ TableStyleMedium14: {
11547
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 9, "tint": 0.8 }, "fillType": "solid" }, "border": { "horizontal": { "color": { "theme": 0 }, "style": "thin" }, "vertical": { "color": { "theme": 0 }, "style": "thin" } } },
11548
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "thick" } } },
11549
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "thick" } } },
11550
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" } },
11551
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" } },
11552
+ firstRowStripe: { "fill": { "color": { "theme": 9, "tint": 0.6 }, "fillType": "solid" } },
11553
+ firstColumnStripe: { "fill": { "color": { "theme": 9, "tint": 0.6 }, "fillType": "solid" } }
11554
+ },
11555
+ TableStyleMedium15: {
11556
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "medium" }, "right": { "color": { "theme": 1 }, "style": "thin" }, "bottom": { "color": { "theme": 1 }, "style": "medium" }, "left": { "color": { "theme": 1 }, "style": "thin" }, "horizontal": { "color": { "theme": 1 }, "style": "thin" }, "vertical": { "color": { "theme": 1 }, "style": "thin" } } },
11557
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11558
+ totalRow: { "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11559
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" } },
11560
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" } },
11561
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11562
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11563
+ },
11564
+ TableStyleMedium16: {
11565
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "medium" }, "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11566
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11567
+ totalRow: { "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11568
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" } },
11569
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" } },
11570
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11571
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11572
+ },
11573
+ TableStyleMedium17: {
11574
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "medium" }, "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11575
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11576
+ totalRow: { "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11577
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" } },
11578
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" } },
11579
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11580
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11581
+ },
11582
+ TableStyleMedium18: {
11583
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "medium" }, "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11584
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11585
+ totalRow: { "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11586
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" } },
11587
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" } },
11588
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11589
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11590
+ },
11591
+ TableStyleMedium19: {
11592
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "medium" }, "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11593
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11594
+ totalRow: { "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11595
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" } },
11596
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" } },
11597
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11598
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11599
+ },
11600
+ TableStyleMedium20: {
11601
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "medium" }, "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11602
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11603
+ totalRow: { "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11604
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" } },
11605
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" } },
11606
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11607
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11608
+ },
11609
+ TableStyleMedium21: {
11610
+ wholeTable: { "font": { "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "medium" }, "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11611
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 1 }, "style": "medium" } } },
11612
+ totalRow: { "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11613
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" } },
11614
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" } },
11615
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11616
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } }
11617
+ },
11618
+ TableStyleMedium22: {
11619
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 1 }, "style": "thin" }, "right": { "color": { "theme": 1 }, "style": "thin" }, "bottom": { "color": { "theme": 1 }, "style": "thin" }, "left": { "color": { "theme": 1 }, "style": "thin" }, "horizontal": { "color": { "theme": 1 }, "style": "thin" }, "vertical": { "color": { "theme": 1 }, "style": "thin" } } },
11620
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } } },
11621
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "medium" } } },
11622
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11623
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11624
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.35 }, "fillType": "solid" } },
11625
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.35 }, "fillType": "solid" } }
11626
+ },
11627
+ TableStyleMedium23: {
11628
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" }, "vertical": { "color": { "theme": 4, "tint": 0.4 }, "style": "thin" } } },
11629
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } } },
11630
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 4 }, "style": "medium" } } },
11631
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11632
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11633
+ firstRowStripe: { "fill": { "color": { "theme": 4, "tint": 0.6 }, "fillType": "solid" } },
11634
+ firstColumnStripe: { "fill": { "color": { "theme": 4, "tint": 0.6 }, "fillType": "solid" } }
11635
+ },
11636
+ TableStyleMedium24: {
11637
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 5, "tint": 0.8 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" }, "vertical": { "color": { "theme": 5, "tint": 0.4 }, "style": "thin" } } },
11638
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } } },
11639
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 5 }, "style": "medium" } } },
11640
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11641
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11642
+ firstRowStripe: { "fill": { "color": { "theme": 5, "tint": 0.6 }, "fillType": "solid" } },
11643
+ firstColumnStripe: { "fill": { "color": { "theme": 5, "tint": 0.6 }, "fillType": "solid" } }
11644
+ },
11645
+ TableStyleMedium25: {
11646
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" }, "vertical": { "color": { "theme": 6, "tint": 0.4 }, "style": "thin" } } },
11647
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } } },
11648
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 6 }, "style": "medium" } } },
11649
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11650
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11651
+ firstRowStripe: { "fill": { "color": { "theme": 6, "tint": 0.6 }, "fillType": "solid" } },
11652
+ firstColumnStripe: { "fill": { "color": { "theme": 6, "tint": 0.6 }, "fillType": "solid" } }
11653
+ },
11654
+ TableStyleMedium26: {
11655
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 7, "tint": 0.8 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" }, "vertical": { "color": { "theme": 7, "tint": 0.4 }, "style": "thin" } } },
11656
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } } },
11657
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 7 }, "style": "medium" } } },
11658
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11659
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11660
+ firstRowStripe: { "fill": { "color": { "theme": 7, "tint": 0.6 }, "fillType": "solid" } },
11661
+ firstColumnStripe: { "fill": { "color": { "theme": 7, "tint": 0.6 }, "fillType": "solid" } }
11662
+ },
11663
+ TableStyleMedium27: {
11664
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" }, "vertical": { "color": { "theme": 8, "tint": 0.4 }, "style": "thin" } } },
11665
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } } },
11666
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 8 }, "style": "medium" } } },
11667
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11668
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11669
+ firstRowStripe: { "fill": { "color": { "theme": 8, "tint": 0.6 }, "fillType": "solid" } },
11670
+ firstColumnStripe: { "fill": { "color": { "theme": 8, "tint": 0.6 }, "fillType": "solid" } }
11671
+ },
11672
+ TableStyleMedium28: {
11673
+ wholeTable: { "font": { "color": { "theme": 1 } }, "fill": { "color": { "theme": 9, "tint": 0.8 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "right": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "bottom": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "left": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "horizontal": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" }, "vertical": { "color": { "theme": 9, "tint": 0.4 }, "style": "thin" } } },
11674
+ headerRow: { "font": { "bold": true, "color": { "theme": 1 } } },
11675
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 9 }, "style": "medium" } } },
11676
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11677
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11678
+ firstRowStripe: { "fill": { "color": { "theme": 9, "tint": 0.6 }, "fillType": "solid" } },
11679
+ firstColumnStripe: { "fill": { "color": { "theme": 9, "tint": 0.6 }, "fillType": "solid" } }
11680
+ },
11681
+ TableStyleDark1: {
11682
+ wholeTable: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 1, "tint": 0.45 }, "fillType": "solid" } },
11683
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "medium" } } },
11684
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1, "tint": 0.15 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "medium" } } },
11685
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1, "tint": 0.25 }, "fillType": "solid" }, "border": { "right": { "color": { "theme": 0 }, "style": "medium" } } },
11686
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1, "tint": 0.25 }, "fillType": "solid" }, "border": { "left": { "color": { "theme": 0 }, "style": "medium" } } },
11687
+ firstRowStripe: { "fill": { "color": { "theme": 1, "tint": 0.25 }, "fillType": "solid" } },
11688
+ firstColumnStripe: { "fill": { "color": { "theme": 1, "tint": 0.25 }, "fillType": "solid" } }
11689
+ },
11690
+ TableStyleDark2: {
11691
+ wholeTable: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 4 }, "fillType": "solid" } },
11692
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "medium" } } },
11693
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4, "tint": -0.5 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "medium" } } },
11694
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4, "tint": -0.25 }, "fillType": "solid" }, "border": { "right": { "color": { "theme": 0 }, "style": "medium" } } },
11695
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 4, "tint": -0.25 }, "fillType": "solid" }, "border": { "left": { "color": { "theme": 0 }, "style": "medium" } } },
11696
+ firstRowStripe: { "fill": { "color": { "theme": 4, "tint": -0.25 }, "fillType": "solid" } },
11697
+ firstColumnStripe: { "fill": { "color": { "theme": 4, "tint": -0.25 }, "fillType": "solid" } }
11698
+ },
11699
+ TableStyleDark3: {
11700
+ wholeTable: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" } },
11701
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "medium" } } },
11702
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5, "tint": -0.5 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "medium" } } },
11703
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5, "tint": -0.25 }, "fillType": "solid" }, "border": { "right": { "color": { "theme": 0 }, "style": "medium" } } },
11704
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 5, "tint": -0.25 }, "fillType": "solid" }, "border": { "left": { "color": { "theme": 0 }, "style": "medium" } } },
11705
+ firstRowStripe: { "fill": { "color": { "theme": 5, "tint": -0.25 }, "fillType": "solid" } },
11706
+ firstColumnStripe: { "fill": { "color": { "theme": 5, "tint": -0.25 }, "fillType": "solid" } }
11707
+ },
11708
+ TableStyleDark4: {
11709
+ wholeTable: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 6 }, "fillType": "solid" } },
11710
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "medium" } } },
11711
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6, "tint": -0.5 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "medium" } } },
11712
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6, "tint": -0.25 }, "fillType": "solid" }, "border": { "right": { "color": { "theme": 0 }, "style": "medium" } } },
11713
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 6, "tint": -0.25 }, "fillType": "solid" }, "border": { "left": { "color": { "theme": 0 }, "style": "medium" } } },
11714
+ firstRowStripe: { "fill": { "color": { "theme": 6, "tint": -0.25 }, "fillType": "solid" } },
11715
+ firstColumnStripe: { "fill": { "color": { "theme": 6, "tint": -0.25 }, "fillType": "solid" } }
11716
+ },
11717
+ TableStyleDark5: {
11718
+ wholeTable: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" } },
11719
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "medium" } } },
11720
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7, "tint": -0.5 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "medium" } } },
11721
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7, "tint": -0.25 }, "fillType": "solid" }, "border": { "right": { "color": { "theme": 0 }, "style": "medium" } } },
11722
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 7, "tint": -0.25 }, "fillType": "solid" }, "border": { "left": { "color": { "theme": 0 }, "style": "medium" } } },
11723
+ firstRowStripe: { "fill": { "color": { "theme": 7, "tint": -0.25 }, "fillType": "solid" } },
11724
+ firstColumnStripe: { "fill": { "color": { "theme": 7, "tint": -0.25 }, "fillType": "solid" } }
11725
+ },
11726
+ TableStyleDark6: {
11727
+ wholeTable: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 8 }, "fillType": "solid" } },
11728
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "medium" } } },
11729
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8, "tint": -0.5 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "medium" } } },
11730
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8, "tint": -0.25 }, "fillType": "solid" }, "border": { "right": { "color": { "theme": 0 }, "style": "medium" } } },
11731
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 8, "tint": -0.25 }, "fillType": "solid" }, "border": { "left": { "color": { "theme": 0 }, "style": "medium" } } },
11732
+ firstRowStripe: { "fill": { "color": { "theme": 8, "tint": -0.25 }, "fillType": "solid" } },
11733
+ firstColumnStripe: { "fill": { "color": { "theme": 8, "tint": -0.25 }, "fillType": "solid" } }
11734
+ },
11735
+ TableStyleDark7: {
11736
+ wholeTable: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" } },
11737
+ headerRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" }, "border": { "bottom": { "color": { "theme": 0 }, "style": "medium" } } },
11738
+ totalRow: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9, "tint": -0.5 }, "fillType": "solid" }, "border": { "top": { "color": { "theme": 0 }, "style": "medium" } } },
11739
+ firstColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9, "tint": -0.25 }, "fillType": "solid" }, "border": { "right": { "color": { "theme": 0 }, "style": "medium" } } },
11740
+ lastColumn: { "font": { "bold": true, "color": { "theme": 0 } }, "fill": { "color": { "theme": 9, "tint": -0.25 }, "fillType": "solid" }, "border": { "left": { "color": { "theme": 0 }, "style": "medium" } } },
11741
+ firstRowStripe: { "fill": { "color": { "theme": 9, "tint": -0.25 }, "fillType": "solid" } },
11742
+ firstColumnStripe: { "fill": { "color": { "theme": 9, "tint": -0.25 }, "fillType": "solid" } }
11743
+ },
11744
+ TableStyleDark8: {
11745
+ wholeTable: { "fill": { "color": { "theme": 0, "tint": -0.15 }, "fillType": "solid" } },
11746
+ headerRow: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 1 }, "fillType": "solid" } },
11747
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11748
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11749
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11750
+ firstRowStripe: { "fill": { "color": { "theme": 0, "tint": -0.35 }, "fillType": "solid" } },
11751
+ firstColumnStripe: { "fill": { "color": { "theme": 0, "tint": -0.35 }, "fillType": "solid" } }
11752
+ },
11753
+ TableStyleDark9: {
11754
+ wholeTable: { "fill": { "color": { "theme": 4, "tint": 0.8 }, "fillType": "solid" } },
11755
+ headerRow: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 5 }, "fillType": "solid" } },
11756
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11757
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11758
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11759
+ firstRowStripe: { "fill": { "color": { "theme": 4, "tint": 0.6 }, "fillType": "solid" } },
11760
+ firstColumnStripe: { "fill": { "color": { "theme": 4, "tint": 0.6 }, "fillType": "solid" } }
11761
+ },
11762
+ TableStyleDark10: {
11763
+ wholeTable: { "fill": { "color": { "theme": 6, "tint": 0.8 }, "fillType": "solid" } },
11764
+ headerRow: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 7 }, "fillType": "solid" } },
11765
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11766
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11767
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11768
+ firstRowStripe: { "fill": { "color": { "theme": 6, "tint": 0.6 }, "fillType": "solid" } },
11769
+ firstColumnStripe: { "fill": { "color": { "theme": 6, "tint": 0.6 }, "fillType": "solid" } }
11770
+ },
11771
+ TableStyleDark11: {
11772
+ wholeTable: { "fill": { "color": { "theme": 8, "tint": 0.8 }, "fillType": "solid" } },
11773
+ headerRow: { "font": { "color": { "theme": 0 } }, "fill": { "color": { "theme": 9 }, "fillType": "solid" } },
11774
+ totalRow: { "font": { "bold": true, "color": { "theme": 1 } }, "border": { "top": { "color": { "theme": 1 }, "style": "double" } } },
11775
+ firstColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11776
+ lastColumn: { "font": { "bold": true, "color": { "theme": 1 } } },
11777
+ firstRowStripe: { "fill": { "color": { "theme": 8, "tint": 0.6 }, "fillType": "solid" } },
11778
+ firstColumnStripe: { "fill": { "color": { "theme": 8, "tint": 0.6 }, "fillType": "solid" } }
11779
+ }
11780
+ };
11781
+ function resolveBuiltinTableStyle(name) {
11782
+ if (!name || !Object.prototype.hasOwnProperty.call(BUILTIN_TABLE_STYLES, name)) {
11783
+ return null;
11784
+ }
11785
+ return BUILTIN_TABLE_STYLES[name] ?? null;
11786
+ }
11787
+
11092
11788
  // src/cell-text-clip.ts
11093
11789
  function resolveCellTextClipOverscan(overscan, usesWrappedText) {
11094
11790
  return {
@@ -20721,7 +21417,7 @@ function canCellTextOverflow(data) {
20721
21417
  return false;
20722
21418
  }
20723
21419
  const textAlign = data.style.textAlign;
20724
- if (textAlign && textAlign !== "left" && textAlign !== "start" && textAlign !== "center") {
21420
+ if (textAlign && textAlign !== "left" && textAlign !== "start" && textAlign !== "center" && textAlign !== "right" && textAlign !== "end") {
20725
21421
  return false;
20726
21422
  }
20727
21423
  return true;
@@ -21197,7 +21893,87 @@ function mergeResolvedCellStyle(base, overlay, options) {
21197
21893
  }
21198
21894
  return nextStyle;
21199
21895
  }
21200
- function normalizeTableStyleEdges(style, table, row, col) {
21896
+ function resolveBorderEdgePriority(edge) {
21897
+ const style = typeof edge?.style === "string" ? edge.style : "none";
21898
+ const stylePriority = {
21899
+ dashed: 2,
21900
+ dashDot: 3,
21901
+ dashDotDot: 3,
21902
+ dotted: 1,
21903
+ double: 8,
21904
+ hair: 0,
21905
+ medium: 6,
21906
+ mediumDashDot: 5,
21907
+ mediumDashDotDot: 5,
21908
+ mediumDashed: 5,
21909
+ none: -1,
21910
+ slantDashDot: 4,
21911
+ thick: 7,
21912
+ thin: 4
21913
+ };
21914
+ return stylePriority[style] ?? -1;
21915
+ }
21916
+ function resolvePreferredBorderEdge(current, candidate) {
21917
+ if (!candidate || typeof candidate.style !== "string" || candidate.style === "none") {
21918
+ return current ?? null;
21919
+ }
21920
+ if (!current) {
21921
+ return candidate;
21922
+ }
21923
+ const currentPriority = resolveBorderEdgePriority(current);
21924
+ const candidatePriority = resolveBorderEdgePriority(candidate);
21925
+ if (candidatePriority > currentPriority) {
21926
+ return candidate;
21927
+ }
21928
+ return current;
21929
+ }
21930
+ function resolveMergedRegionBorderOverlay(row, col, merge, resolveBaseCellStyle) {
21931
+ const rowSpan = Math.max(1, merge?.rowSpan ?? 1);
21932
+ const colSpan = Math.max(1, merge?.colSpan ?? 1);
21933
+ if (rowSpan === 1 && colSpan === 1) {
21934
+ return null;
21935
+ }
21936
+ const endRow = row + rowSpan - 1;
21937
+ const endCol = col + colSpan - 1;
21938
+ let top = null;
21939
+ let right = null;
21940
+ let bottom = null;
21941
+ let left = null;
21942
+ for (let targetCol = col; targetCol <= endCol; targetCol += 1) {
21943
+ const topStyle = resolveBaseCellStyle(row, targetCol);
21944
+ const topBorder = topStyle?.border;
21945
+ top = resolvePreferredBorderEdge(top, topBorder?.top ?? null);
21946
+ const bottomStyle = resolveBaseCellStyle(endRow, targetCol);
21947
+ const bottomBorder = bottomStyle?.border;
21948
+ bottom = resolvePreferredBorderEdge(bottom, bottomBorder?.bottom ?? null);
21949
+ }
21950
+ for (let targetRow = row; targetRow <= endRow; targetRow += 1) {
21951
+ const leftStyle = resolveBaseCellStyle(targetRow, col);
21952
+ const leftBorder = leftStyle?.border;
21953
+ left = resolvePreferredBorderEdge(left, leftBorder?.left ?? null);
21954
+ const rightStyle = resolveBaseCellStyle(targetRow, endCol);
21955
+ const rightBorder = rightStyle?.border;
21956
+ right = resolvePreferredBorderEdge(right, rightBorder?.right ?? null);
21957
+ }
21958
+ const border = {};
21959
+ if (top) {
21960
+ border.top = top;
21961
+ }
21962
+ if (right) {
21963
+ border.right = right;
21964
+ }
21965
+ if (bottom) {
21966
+ border.bottom = bottom;
21967
+ }
21968
+ if (left) {
21969
+ border.left = left;
21970
+ }
21971
+ if (Object.keys(border).length === 0) {
21972
+ return null;
21973
+ }
21974
+ return { border };
21975
+ }
21976
+ function normalizeTableStyleEdges(style, region, row, col) {
21201
21977
  if (!style) {
21202
21978
  return null;
21203
21979
  }
@@ -21205,23 +21981,32 @@ function normalizeTableStyleEdges(style, table, row, col) {
21205
21981
  if (!border) {
21206
21982
  return style;
21207
21983
  }
21208
- const nextBorder = { ...border };
21209
- if (nextBorder.horizontal) {
21210
- if (row < table.end.row) {
21211
- nextBorder.bottom = nextBorder.bottom ?? nextBorder.horizontal;
21212
- }
21213
- delete nextBorder.horizontal;
21984
+ const nextBorder = {};
21985
+ if (border.top && row === region.startRow) {
21986
+ nextBorder.top = border.top;
21214
21987
  }
21215
- if (nextBorder.vertical) {
21216
- if (col < table.end.col) {
21217
- nextBorder.right = nextBorder.right ?? nextBorder.vertical;
21218
- }
21219
- delete nextBorder.vertical;
21988
+ if (border.bottom && row === region.endRow) {
21989
+ nextBorder.bottom = border.bottom;
21220
21990
  }
21221
- return {
21222
- ...style,
21223
- border: nextBorder
21224
- };
21991
+ if (border.left && col === region.startCol) {
21992
+ nextBorder.left = border.left;
21993
+ }
21994
+ if (border.right && col === region.endCol) {
21995
+ nextBorder.right = border.right;
21996
+ }
21997
+ if (border.horizontal && row < region.endRow) {
21998
+ nextBorder.bottom = nextBorder.bottom ?? border.horizontal;
21999
+ }
22000
+ if (border.vertical && col < region.endCol) {
22001
+ nextBorder.right = nextBorder.right ?? border.vertical;
22002
+ }
22003
+ const nextStyle = { ...style };
22004
+ if (Object.keys(nextBorder).length === 0) {
22005
+ delete nextStyle.border;
22006
+ } else {
22007
+ nextStyle.border = nextBorder;
22008
+ }
22009
+ return nextStyle;
21225
22010
  }
21226
22011
  function resolveTableCellStyle(table, row, col, activeSheet) {
21227
22012
  if (!table || !activeSheet) {
@@ -21231,37 +22016,72 @@ function resolveTableCellStyle(table, row, col, activeSheet) {
21231
22016
  if (!styleName) {
21232
22017
  return null;
21233
22018
  }
21234
- const tableStyle = activeSheet.tableStyleByName[styleName];
22019
+ const tableStyle = activeSheet.tableStyleByName[styleName] ?? resolveBuiltinTableStyle(styleName);
21235
22020
  if (!tableStyle) {
21236
22021
  return null;
21237
22022
  }
22023
+ const headerRowCount = Math.max(table.headerRowCount, 1);
22024
+ const totalsRowCount = table.totalsRowShown ? Math.max(table.totalsRowCount, 1) : 0;
22025
+ const headerEndRow = table.start.row + headerRowCount - 1;
22026
+ const totalsStartRow = table.end.row - totalsRowCount + 1;
22027
+ const bodyStartRow = headerEndRow + 1;
22028
+ const bodyEndRow = totalsStartRow - 1;
22029
+ const isHeaderRow = row >= table.start.row && row <= headerEndRow;
22030
+ const isTotalsRow = totalsRowCount > 0 && row >= totalsStartRow && row <= table.end.row;
22031
+ const isBodyRow = row >= bodyStartRow && row <= bodyEndRow;
22032
+ const isFirstColumn = col === table.start.col;
22033
+ const isLastColumn = col === table.end.col;
22034
+ const tableRegion = {
22035
+ endCol: table.end.col,
22036
+ endRow: table.end.row,
22037
+ startCol: table.start.col,
22038
+ startRow: table.start.row
22039
+ };
22040
+ const headerRegion = { ...tableRegion, endRow: headerEndRow };
22041
+ const totalsRegion = { ...tableRegion, startRow: totalsStartRow };
21238
22042
  let resolved = null;
21239
- const applyElement = (elementType, enabled = true) => {
22043
+ const applyElement = (elementType, region, enabled = true) => {
21240
22044
  if (!enabled) {
21241
22045
  return;
21242
22046
  }
21243
- const nextStyle = normalizeTableStyleEdges(tableStyle[elementType] ?? null, table, row, col);
22047
+ const nextStyle = normalizeTableStyleEdges(tableStyle[elementType] ?? null, region, row, col);
21244
22048
  if (!nextStyle) {
21245
22049
  return;
21246
22050
  }
21247
22051
  resolved = mergeResolvedCellStyle(resolved, nextStyle);
21248
22052
  };
21249
- applyElement("wholeTable");
21250
- applyElement("firstColumn", Boolean(table.styleInfo?.showFirstColumn) && col === table.start.col);
21251
- applyElement("lastColumn", Boolean(table.styleInfo?.showLastColumn) && col === table.end.col);
21252
- const headerRowCount = Math.max(table.headerRowCount, 1);
21253
- const isHeaderRow = row >= table.start.row && row < table.start.row + headerRowCount;
21254
- applyElement("headerRow", isHeaderRow);
22053
+ applyElement("wholeTable", tableRegion);
22054
+ if (isBodyRow && table.styleInfo?.showColumnStripes) {
22055
+ const isFirstStripe = (col - table.start.col) % 2 === 0;
22056
+ applyElement(isFirstStripe ? "firstColumnStripe" : "secondColumnStripe", {
22057
+ endCol: col,
22058
+ endRow: bodyEndRow,
22059
+ startCol: col,
22060
+ startRow: bodyStartRow
22061
+ });
22062
+ }
22063
+ if (isBodyRow && table.styleInfo?.showRowStripes) {
22064
+ const isFirstStripe = (row - bodyStartRow) % 2 === 0;
22065
+ applyElement(isFirstStripe ? "firstRowStripe" : "secondRowStripe", {
22066
+ ...tableRegion,
22067
+ endRow: row,
22068
+ startRow: row
22069
+ });
22070
+ }
22071
+ applyElement("lastColumn", { ...tableRegion, startCol: table.end.col }, Boolean(table.styleInfo?.showLastColumn) && isLastColumn);
22072
+ applyElement("firstColumn", { ...tableRegion, endCol: table.start.col }, Boolean(table.styleInfo?.showFirstColumn) && isFirstColumn);
22073
+ applyElement("headerRow", headerRegion, isHeaderRow);
21255
22074
  if (isHeaderRow && table.headerRowCellStyle) {
21256
22075
  const namedHeaderStyle = activeSheet.namedCellStyleByName[table.headerRowCellStyle];
21257
22076
  if (namedHeaderStyle) {
21258
22077
  resolved = mergeResolvedCellStyle(resolved, namedHeaderStyle);
21259
22078
  }
21260
22079
  }
21261
- if (table.totalsRowShown) {
21262
- const totalsRowCount = Math.max(table.totalsRowCount, 1);
21263
- applyElement("totalRow", row > table.end.row - totalsRowCount);
21264
- }
22080
+ applyElement("totalRow", totalsRegion, isTotalsRow);
22081
+ applyElement("firstHeaderCell", { ...headerRegion, endCol: table.start.col }, isHeaderRow && isFirstColumn);
22082
+ applyElement("lastHeaderCell", { ...headerRegion, startCol: table.end.col }, isHeaderRow && isLastColumn);
22083
+ applyElement("firstTotalCell", { ...totalsRegion, endCol: table.start.col }, isTotalsRow && isFirstColumn);
22084
+ applyElement("lastTotalCell", { ...totalsRegion, startCol: table.end.col }, isTotalsRow && isLastColumn);
21265
22085
  return resolved;
21266
22086
  }
21267
22087
  function getTableHeaderColumn(table, row, col) {
@@ -21968,7 +22788,8 @@ function resolveConditionalRuleThreshold(threshold, numericValues) {
21968
22788
  return null;
21969
22789
  }
21970
22790
  const fallbackValue = typeof threshold.value === "number" ? threshold.value : null;
21971
- if (threshold.type === "num" || threshold.type === "formula") {
22791
+ const thresholdType = threshold.type.trim().toLowerCase();
22792
+ if (thresholdType === "num" || thresholdType === "formula") {
21972
22793
  return fallbackValue;
21973
22794
  }
21974
22795
  if (numericValues.length === 0) {
@@ -21976,17 +22797,216 @@ function resolveConditionalRuleThreshold(threshold, numericValues) {
21976
22797
  }
21977
22798
  const minValue = Math.min(...numericValues);
21978
22799
  const maxValue = Math.max(...numericValues);
21979
- if (threshold.type === "min") {
22800
+ if (thresholdType === "min") {
21980
22801
  return minValue;
21981
22802
  }
21982
- if (threshold.type === "max") {
22803
+ if (thresholdType === "max") {
21983
22804
  return maxValue;
21984
22805
  }
21985
- if ((threshold.type === "percent" || threshold.type === "percentile") && fallbackValue !== null) {
22806
+ if (thresholdType === "automin" || thresholdType === "automaticmin") {
22807
+ return Math.min(0, minValue);
22808
+ }
22809
+ if (thresholdType === "automax" || thresholdType === "automaticmax") {
22810
+ return Math.max(0, maxValue);
22811
+ }
22812
+ if ((thresholdType === "percent" || thresholdType === "percentile") && fallbackValue !== null) {
21986
22813
  return minValue + (maxValue - minValue) * (fallbackValue / 100);
21987
22814
  }
21988
22815
  return fallbackValue;
21989
22816
  }
22817
+ function parseConditionalFormulaLiteral(formula) {
22818
+ const trimmed = formula.trim();
22819
+ if (trimmed.length === 0) {
22820
+ return null;
22821
+ }
22822
+ const withoutEquals = trimmed.startsWith("=") ? trimmed.slice(1).trim() : trimmed;
22823
+ if (withoutEquals.startsWith('"') && withoutEquals.endsWith('"') && withoutEquals.length >= 2) {
22824
+ return withoutEquals.slice(1, -1).replace(/\"\"/g, '"');
22825
+ }
22826
+ const numeric = Number(withoutEquals.replace(/,/g, ""));
22827
+ if (Number.isFinite(numeric)) {
22828
+ return numeric;
22829
+ }
22830
+ return withoutEquals;
22831
+ }
22832
+ function resolveConditionalCellIsMatch(operator, left, right, numericValue, textValue) {
22833
+ const normalizedOperator = operator.trim();
22834
+ const normalizedText = textValue.trim();
22835
+ const parsedNumericText = Number(normalizedText.replace(/,/g, ""));
22836
+ const effectiveNumericValue = numericValue ?? (Number.isFinite(parsedNumericText) ? parsedNumericText : null);
22837
+ const cellIsTextComparable = effectiveNumericValue === null && normalizedText.length > 0;
22838
+ const compareComparable = (literal, predicate) => {
22839
+ if (typeof literal !== "number") {
22840
+ return false;
22841
+ }
22842
+ if (effectiveNumericValue !== null) {
22843
+ return predicate(effectiveNumericValue, literal);
22844
+ }
22845
+ if (cellIsTextComparable) {
22846
+ return predicate(1, 0);
22847
+ }
22848
+ return false;
22849
+ };
22850
+ switch (normalizedOperator) {
22851
+ case "greaterThan":
22852
+ return compareComparable(left, (cell, value) => cell > value);
22853
+ case "greaterThanOrEqual":
22854
+ return compareComparable(left, (cell, value) => cell >= value);
22855
+ case "lessThan":
22856
+ return compareComparable(left, (cell, value) => cell < value);
22857
+ case "lessThanOrEqual":
22858
+ return compareComparable(left, (cell, value) => cell <= value);
22859
+ case "between":
22860
+ if (typeof left !== "number" || typeof right !== "number") {
22861
+ return false;
22862
+ }
22863
+ if (effectiveNumericValue === null) {
22864
+ return false;
22865
+ }
22866
+ return effectiveNumericValue >= left && effectiveNumericValue <= right;
22867
+ case "notBetween":
22868
+ if (typeof left !== "number" || typeof right !== "number") {
22869
+ return false;
22870
+ }
22871
+ if (effectiveNumericValue === null) {
22872
+ return cellIsTextComparable;
22873
+ }
22874
+ return effectiveNumericValue < left || effectiveNumericValue > right;
22875
+ case "notEqual":
22876
+ if (typeof left === "number") {
22877
+ if (effectiveNumericValue !== null) {
22878
+ return effectiveNumericValue !== left;
22879
+ }
22880
+ return cellIsTextComparable;
22881
+ }
22882
+ return left !== null && normalizedText.toLowerCase() !== String(left).toLowerCase();
22883
+ case "equal":
22884
+ default:
22885
+ if (typeof left === "number") {
22886
+ if (effectiveNumericValue !== null) {
22887
+ return effectiveNumericValue === left;
22888
+ }
22889
+ return false;
22890
+ }
22891
+ return left !== null && normalizedText.toLowerCase() === String(left).toLowerCase();
22892
+ }
22893
+ }
22894
+ function resolveConditionalFormulaComparable(formula, worksheet, sheet, batchedCells) {
22895
+ const literal = parseConditionalFormulaLiteral(formula);
22896
+ if (typeof literal === "number") {
22897
+ return literal;
22898
+ }
22899
+ const normalized = formula.trim().replace(/^=/, "").trim();
22900
+ if (normalized.length === 0) {
22901
+ return literal;
22902
+ }
22903
+ const splitReference = splitSheetFormulaReference(normalized);
22904
+ const targetSheetName = splitReference?.sheetName ?? null;
22905
+ if (targetSheetName && sheet?.name && targetSheetName !== sheet.name) {
22906
+ return literal;
22907
+ }
22908
+ const cellRef = splitReference?.range ?? normalized;
22909
+ const cell = parseA1CellReference3(cellRef.replace(/\$/g, ""));
22910
+ if (!cell) {
22911
+ return literal;
22912
+ }
22913
+ if (worksheet) {
22914
+ const numeric = getCellNumericValue(worksheet, cell.row, cell.col);
22915
+ if (numeric !== null) {
22916
+ return numeric;
22917
+ }
22918
+ return getCellDisplayValue(worksheet, cell.row, cell.col, sheet);
22919
+ }
22920
+ if (batchedCells) {
22921
+ const batched = batchedCells.get(`${cell.row}:${cell.col}`);
22922
+ if (batched) {
22923
+ const numeric = getBatchedCellNumericValue(batched);
22924
+ if (numeric !== null) {
22925
+ return numeric;
22926
+ }
22927
+ return batched.value;
22928
+ }
22929
+ }
22930
+ return literal;
22931
+ }
22932
+ function normalizeConditionalTextOperand(value) {
22933
+ if (value === null || value === void 0) {
22934
+ return "";
22935
+ }
22936
+ return String(value).trim().toLowerCase();
22937
+ }
22938
+ function resolveConditionalStyledRuleMatch(rule, numericValue, textValue, worksheet, sheet, batchedCells) {
22939
+ const normalizedRuleType = rule.ruleType.trim().toLowerCase();
22940
+ const left = resolveConditionalFormulaComparable(rule.formulas?.[0] ?? "", worksheet, sheet, batchedCells);
22941
+ const right = resolveConditionalFormulaComparable(rule.formulas?.[1] ?? "", worksheet, sheet, batchedCells);
22942
+ if (normalizedRuleType === "cellis") {
22943
+ return resolveConditionalCellIsMatch(rule.operator ?? "equal", left, right, numericValue, textValue);
22944
+ }
22945
+ const normalizedCellText = textValue.trim().toLowerCase();
22946
+ const normalizedOperand = normalizeConditionalTextOperand(rule.text) || normalizeConditionalTextOperand(left);
22947
+ switch (normalizedRuleType) {
22948
+ case "beginwith":
22949
+ case "beginswith":
22950
+ return normalizedOperand.length > 0 && normalizedCellText.startsWith(normalizedOperand);
22951
+ case "endwith":
22952
+ case "endswith":
22953
+ return normalizedOperand.length > 0 && normalizedCellText.endsWith(normalizedOperand);
22954
+ case "containstext":
22955
+ return normalizedOperand.length > 0 && normalizedCellText.includes(normalizedOperand);
22956
+ case "notcontainstext":
22957
+ return normalizedOperand.length > 0 && !normalizedCellText.includes(normalizedOperand);
22958
+ default:
22959
+ return false;
22960
+ }
22961
+ }
22962
+ var styledConditionalRulesByRuleList = /* @__PURE__ */ new WeakMap();
22963
+ function getStyledConditionalRules(rules) {
22964
+ let styledRules = styledConditionalRulesByRuleList.get(rules);
22965
+ if (!styledRules) {
22966
+ styledRules = rules.filter((rule) => rule.kind === "styled");
22967
+ styledConditionalRulesByRuleList.set(rules, styledRules);
22968
+ }
22969
+ return styledRules;
22970
+ }
22971
+ function resolveConditionalCellStyleForCell(row, col, sheet, readNumericValue, readTextValue, worksheet, batchedCells) {
22972
+ const rules = sheet?.conditionalFormatRules;
22973
+ if (!sheet || !rules || rules.length === 0) {
22974
+ return null;
22975
+ }
22976
+ const styledRules = getStyledConditionalRules(rules);
22977
+ if (styledRules.length === 0) {
22978
+ return null;
22979
+ }
22980
+ const matchedStyles = [];
22981
+ let numericValue;
22982
+ let textValue;
22983
+ for (const rule of styledRules) {
22984
+ if (!rule.ranges.some((range) => isCellInRange({ row, col }, range))) {
22985
+ continue;
22986
+ }
22987
+ if (numericValue === void 0) {
22988
+ numericValue = readNumericValue();
22989
+ }
22990
+ if (textValue === void 0) {
22991
+ textValue = readTextValue();
22992
+ }
22993
+ if (!resolveConditionalStyledRuleMatch(rule, numericValue, textValue, worksheet, sheet, batchedCells)) {
22994
+ continue;
22995
+ }
22996
+ matchedStyles.push(rule.style);
22997
+ if (rule.stopIfTrue) {
22998
+ break;
22999
+ }
23000
+ }
23001
+ if (matchedStyles.length === 0) {
23002
+ return null;
23003
+ }
23004
+ let resolved = null;
23005
+ for (let index = matchedStyles.length - 1; index >= 0; index -= 1) {
23006
+ resolved = mergeResolvedCellStyle(resolved, matchedStyles[index]);
23007
+ }
23008
+ return resolved;
23009
+ }
21990
23010
  function buildConditionalIcon(iconSet, iconId) {
21991
23011
  switch (iconSet) {
21992
23012
  case "NoIcons":
@@ -22994,6 +24014,7 @@ function GridRow({
22994
24014
  "div",
22995
24015
  {
22996
24016
  style: {
24017
+ left: cellData.spillOffsetX ?? 0,
22997
24018
  maxWidth: cellData.spillWidth,
22998
24019
  overflow: "visible",
22999
24020
  pointerEvents: "none",
@@ -23230,6 +24251,8 @@ function XlsxGrid({
23230
24251
  const firstVisibleRowRef = React4.useRef(void 0);
23231
24252
  const lastVisibleRowRef = React4.useRef(void 0);
23232
24253
  const cellRenderCacheRef = React4.useRef(/* @__PURE__ */ new Map());
24254
+ const cellBaseRawStyleCacheRef = React4.useRef(/* @__PURE__ */ new Map());
24255
+ const mergedBorderOverlayCacheRef = React4.useRef(/* @__PURE__ */ new Map());
23233
24256
  const conditionalFormatMetricsCacheRef = React4.useRef(/* @__PURE__ */ new Map());
23234
24257
  const resizeStateRef = React4.useRef(null);
23235
24258
  const resizeFrameRef = React4.useRef(null);
@@ -23241,6 +24264,8 @@ function XlsxGrid({
23241
24264
  const pendingSelectionDragCleanupRef = React4.useRef(null);
23242
24265
  const fillDragCleanupRef = React4.useRef(null);
23243
24266
  const cachedScrollerRectRef = React4.useRef(null);
24267
+ const installImageInteractionListenersRef = React4.useRef(installImageInteractionListeners);
24268
+ const installChartInteractionListenersRef = React4.useRef(installChartInteractionListeners);
23244
24269
  const imageInteractionCleanupRef = React4.useRef(null);
23245
24270
  const imageInteractionRef = React4.useRef(null);
23246
24271
  const chartInteractionCleanupRef = React4.useRef(null);
@@ -24228,6 +25253,10 @@ function XlsxGrid({
24228
25253
  React4.useEffect(() => {
24229
25254
  readOnlyRef.current = readOnly;
24230
25255
  }, [readOnly]);
25256
+ React4.useLayoutEffect(() => {
25257
+ installImageInteractionListenersRef.current = installImageInteractionListeners;
25258
+ installChartInteractionListenersRef.current = installChartInteractionListeners;
25259
+ });
24231
25260
  React4.useEffect(() => {
24232
25261
  chartPreviewRectRef.current = chartPreviewRect;
24233
25262
  }, [chartPreviewRect]);
@@ -25255,6 +26284,8 @@ function XlsxGrid({
25255
26284
  const cellRenderCacheInvalidationRef = React4.useRef(null);
25256
26285
  if (cellRenderCacheInvalidationRef.current !== cellRenderCacheInvalidationKey) {
25257
26286
  cellRenderCacheRef.current.clear();
26287
+ cellBaseRawStyleCacheRef.current.clear();
26288
+ mergedBorderOverlayCacheRef.current.clear();
25258
26289
  cellRenderCacheInvalidationRef.current = cellRenderCacheInvalidationKey;
25259
26290
  }
25260
26291
  const getCellData = React4.useCallback((row, col) => {
@@ -25293,13 +26324,64 @@ function XlsxGrid({
25293
26324
  return mergedSecondaryData;
25294
26325
  }
25295
26326
  const merge = worksheet ? worksheet.getMergeSpan(row, col) : batchCoversRow ? batchedCell?.mergeSpan : null;
25296
- const inheritedStyle = resolveInheritedCellStyle2(activeSheet, row, col);
25297
- const worksheetStyle = batchCoversRow ? batchedCell?.style ?? null : worksheet?.getCellStyleAt(row, col) ?? null;
25298
- const rawStyle = mergeResolvedCellStyle(inheritedStyle, worksheetStyle, { replaceXfSubtrees: true });
26327
+ const resolveBaseResolvedStyle = (targetRow, targetCol) => {
26328
+ const targetCacheKey = `${targetRow}:${targetCol}`;
26329
+ const cachedBaseStyle = cellBaseRawStyleCacheRef.current.get(targetCacheKey);
26330
+ if (cachedBaseStyle !== void 0) {
26331
+ return cachedBaseStyle;
26332
+ }
26333
+ const targetBatchCoversRow = viewportRowBatch ? targetRow >= viewportRowBatch.startRow && targetRow <= viewportRowBatch.endRow : false;
26334
+ const targetBatchedCell = targetBatchCoversRow ? viewportRowBatch?.cells.get(targetCacheKey) : void 0;
26335
+ const targetInheritedStyle = resolveInheritedCellStyle2(activeSheet, targetRow, targetCol);
26336
+ const targetWorksheetStyle = targetBatchCoversRow ? targetBatchedCell?.style ?? null : worksheet?.getCellStyleAt(targetRow, targetCol) ?? null;
26337
+ const targetRawStyle = mergeResolvedCellStyle(targetInheritedStyle, targetWorksheetStyle, {
26338
+ replaceXfSubtrees: true
26339
+ });
26340
+ const targetTable = getTableAtCell(effectiveTables, targetRow, targetCol);
26341
+ const targetTableStyle = resolveTableCellStyle(targetTable, targetRow, targetCol, activeSheet);
26342
+ const resolvedStyle = mergeResolvedCellStyle(targetRawStyle, targetTableStyle);
26343
+ cellBaseRawStyleCacheRef.current.set(targetCacheKey, resolvedStyle);
26344
+ return resolvedStyle;
26345
+ };
25299
26346
  const table = getTableAtCell(effectiveTables, row, col);
25300
- const tableStyle = resolveTableCellStyle(table, row, col, activeSheet);
25301
- const mergedStyle = mergeResolvedCellStyle(rawStyle, tableStyle);
25302
- const alignment = mergedStyle?.alignment;
26347
+ const mergeRowSpan = Math.max(1, merge?.rowSpan ?? 1);
26348
+ const mergeColSpan = Math.max(1, merge?.colSpan ?? 1);
26349
+ let mergedBorderOverlay = null;
26350
+ if (mergeRowSpan > 1 || mergeColSpan > 1) {
26351
+ const mergedBorderOverlayCacheKey = `${row}:${col}:${mergeRowSpan}:${mergeColSpan}`;
26352
+ const cachedOverlay = mergedBorderOverlayCacheRef.current.get(mergedBorderOverlayCacheKey);
26353
+ if (cachedOverlay !== void 0) {
26354
+ mergedBorderOverlay = cachedOverlay;
26355
+ } else {
26356
+ mergedBorderOverlay = resolveMergedRegionBorderOverlay(
26357
+ row,
26358
+ col,
26359
+ merge,
26360
+ (targetRow, targetCol) => resolveBaseResolvedStyle(targetRow, targetCol)
26361
+ );
26362
+ mergedBorderOverlayCacheRef.current.set(mergedBorderOverlayCacheKey, mergedBorderOverlay);
26363
+ }
26364
+ }
26365
+ const baseResolvedStyle = resolveBaseResolvedStyle(row, col);
26366
+ const resolvedMergedStyle = mergeResolvedCellStyle(baseResolvedStyle, mergedBorderOverlay);
26367
+ let displayValue = null;
26368
+ const readDisplayValue = () => {
26369
+ if (displayValue === null) {
26370
+ displayValue = batchCoversRow || !worksheet ? batchedCell?.value ?? "" : getCellDisplayValue(worksheet, row, col, activeSheet);
26371
+ }
26372
+ return displayValue;
26373
+ };
26374
+ const conditionalCellStyle = resolveConditionalCellStyleForCell(
26375
+ row,
26376
+ col,
26377
+ activeSheet,
26378
+ () => worksheet ? getCellNumericValue(worksheet, row, col) : getBatchedCellNumericValue(batchedCell),
26379
+ readDisplayValue,
26380
+ worksheet,
26381
+ viewportRowBatch?.cells
26382
+ );
26383
+ const finalResolvedStyle = mergeResolvedCellStyle(resolvedMergedStyle, conditionalCellStyle);
26384
+ const alignment = finalResolvedStyle?.alignment;
25303
26385
  const textRotationDeg = resolveSpreadsheetTextRotation(alignment?.textRotation);
25304
26386
  const headerRowCount = table ? Math.max(table.headerRowCount, 1) : 0;
25305
26387
  const rawHyperlink = batchCoversRow ? batchedCell?.hyperlink : worksheet?.getHyperlinkAt(row, col);
@@ -25319,7 +26401,7 @@ function XlsxGrid({
25319
26401
  sparkline.range.start.col
25320
26402
  )
25321
26403
  ) : null;
25322
- const checkboxState = mergedStyle?.cellControl && worksheet ? getCellBooleanValue(worksheet, row, col) : null;
26404
+ const checkboxState = finalResolvedStyle?.cellControl && worksheet ? getCellBooleanValue(worksheet, row, col) : null;
25323
26405
  const chartHighlight = resolveCellChartHighlight({ row, col }, activeSheetChartHighlights);
25324
26406
  const nextData = {
25325
26407
  canvas: void 0,
@@ -25353,12 +26435,12 @@ function XlsxGrid({
25353
26435
  isTableHeader: Boolean(table && row >= table.start.row && row < table.start.row + headerRowCount),
25354
26436
  rowSpan: merge?.rowSpan,
25355
26437
  sparkline: sparkline && sparklineValues ? { config: sparkline, values: sparklineValues } : null,
25356
- style: scaleCssProperties(buildCellStyle(mergedStyle, palette, activeSheet?.themePalette, {
26438
+ style: scaleCssProperties(buildCellStyle(finalResolvedStyle, palette, activeSheet?.themePalette, {
25357
26439
  showGridLines: activeSheet?.showGridLines
25358
26440
  }), zoomFactor),
25359
26441
  textRotationDeg,
25360
26442
  validation: resolveCellDataValidation(row, col, activeSheet),
25361
- value: sparkline ? "" : checkboxState !== null ? "" : batchCoversRow || !worksheet ? batchedCell?.value ?? "" : getCellDisplayValue(worksheet, row, col, activeSheet)
26443
+ value: sparkline ? "" : checkboxState !== null ? "" : readDisplayValue()
25362
26444
  };
25363
26445
  if (getCellStyle) {
25364
26446
  const styleOverrides = getCellStyle({
@@ -25384,6 +26466,7 @@ function XlsxGrid({
25384
26466
  }
25385
26467
  }
25386
26468
  nextData.canvas = buildCanvasCellStyleCache(nextData.style);
26469
+ cellRenderCacheRef.current.set(cacheKey, nextData);
25387
26470
  if (canCellTextOverflow(nextData)) {
25388
26471
  const startColIndex = colIndexByActual.get(col);
25389
26472
  if (startColIndex !== void 0) {
@@ -25396,9 +26479,13 @@ function XlsxGrid({
25396
26479
  displayEffectiveColWidths[startColIndex] ?? displayDefaultColWidth,
25397
26480
  sumPrefixRange(colPrefixSums, startColIndex, endColIndex)
25398
26481
  );
26482
+ const align = nextData.style.textAlign;
26483
+ const spillSide = align === "right" || align === "end" ? "left" : "right";
25399
26484
  let availableWidth = baseWidth;
25400
26485
  if (requiredWidth > availableWidth) {
25401
- for (let nextColIndex = endColIndex + 1; nextColIndex < visibleCols.length; nextColIndex += 1) {
26486
+ const nextColStep = spillSide === "left" ? -1 : 1;
26487
+ let nextColIndex = spillSide === "left" ? startColIndex - 1 : endColIndex + 1;
26488
+ while (nextColIndex >= 0 && nextColIndex < visibleCols.length) {
25402
26489
  const nextActualCol = visibleCols[nextColIndex];
25403
26490
  if (nextActualCol === void 0) {
25404
26491
  break;
@@ -25411,9 +26498,12 @@ function XlsxGrid({
25411
26498
  if (requiredWidth <= availableWidth) {
25412
26499
  break;
25413
26500
  }
26501
+ nextColIndex += nextColStep;
25414
26502
  }
25415
26503
  if (availableWidth > baseWidth) {
25416
26504
  nextData.spillWidth = Math.max(0, availableWidth - horizontalPadding);
26505
+ nextData.spillSide = spillSide;
26506
+ nextData.spillOffsetX = spillSide === "left" ? Math.min(0, baseWidth - availableWidth) : 0;
25417
26507
  }
25418
26508
  }
25419
26509
  }
@@ -25458,7 +26548,6 @@ function XlsxGrid({
25458
26548
  }
25459
26549
  }
25460
26550
  }
25461
- cellRenderCacheRef.current.set(cacheKey, nextData);
25462
26551
  return nextData;
25463
26552
  }, [
25464
26553
  activeSheet,
@@ -27628,11 +28717,13 @@ function XlsxGrid({
27628
28717
  top: (useFrozenVerticalPosition ? stickyTopByRow.get(drawCell.row) ?? baseTop - drawingViewport.top : baseTop - drawingViewport.top) - paneBoundsForCell.top,
27629
28718
  width: displayRect?.width ?? (displayEffectiveColWidths[drawColIndex] ?? colItem.size)
27630
28719
  };
28720
+ const spillOffsetX = Math.min(0, cellData.spillOffsetX ?? 0);
28721
+ const drawableLeft = localRect.left + spillOffsetX;
27631
28722
  const drawableWidth = Math.max(localRect.width, cellData.spillWidth ?? 0);
27632
- if (localRect.left + drawableWidth < 0 || localRect.top + localRect.height < 0 || localRect.left > paneBoundsForCell.width || localRect.top > paneBoundsForCell.height) {
28723
+ if (drawableLeft + drawableWidth < 0 || localRect.top + localRect.height < 0 || drawableLeft > paneBoundsForCell.width || localRect.top > paneBoundsForCell.height) {
27633
28724
  continue;
27634
28725
  }
27635
- if (!intersectsCanvasDirtyRects(localRect.left, localRect.top, drawableWidth, localRect.height, paneDirtyRects)) {
28726
+ if (!intersectsCanvasDirtyRects(drawableLeft, localRect.top, drawableWidth, localRect.height, paneDirtyRects)) {
27636
28727
  canvasProfileCulledCells += 1;
27637
28728
  continue;
27638
28729
  }
@@ -27682,11 +28773,27 @@ function XlsxGrid({
27682
28773
  const bottomBorder = canvasCellStyle.bottomBorder;
27683
28774
  const leftBorder = canvasCellStyle.leftBorder;
27684
28775
  const rightNeighborCol = visibleCols[drawColIndex + Math.max(1, cellData.colSpan ?? 1)];
27685
- const rightNeighborData = rightNeighborCol === void 0 ? null : getCellData(drawCell.row, rightNeighborCol);
27686
- const rightNeighborLeftBorder = rightNeighborData?.isMergedSecondary ? null : rightNeighborData?.canvas?.leftBorder ?? parseCanvasBorderDeclaration(rightNeighborData?.style.borderLeft);
28776
+ const rightNeighborCell = rightNeighborCol === void 0 ? null : { row: drawCell.row, col: rightNeighborCol };
28777
+ const rightNeighborData = rightNeighborCell ? getCellData(rightNeighborCell.row, rightNeighborCell.col) : null;
28778
+ let rightNeighborLeftBorder = rightNeighborData?.isMergedSecondary ? null : rightNeighborData?.canvas?.leftBorder ?? parseCanvasBorderDeclaration(rightNeighborData?.style.borderLeft);
28779
+ if (rightNeighborLeftBorder == null && rightNeighborCell && rightNeighborData?.isMergedSecondary) {
28780
+ const rightNeighborAnchorCell = resolveMergeAnchorCell(rightNeighborCell);
28781
+ if (rightNeighborAnchorCell.col === rightNeighborCell.col) {
28782
+ const rightNeighborAnchorData = getCellData(rightNeighborAnchorCell.row, rightNeighborAnchorCell.col);
28783
+ rightNeighborLeftBorder = rightNeighborAnchorData.isMergedSecondary ? null : rightNeighborAnchorData.canvas?.leftBorder ?? parseCanvasBorderDeclaration(rightNeighborAnchorData.style.borderLeft);
28784
+ }
28785
+ }
27687
28786
  const bottomNeighborRow = visibleRows[drawRowIndex + Math.max(1, cellData.rowSpan ?? 1)];
27688
- const bottomNeighborData = bottomNeighborRow === void 0 ? null : getCellData(bottomNeighborRow, drawCell.col);
27689
- const bottomNeighborTopBorder = bottomNeighborData?.isMergedSecondary ? null : bottomNeighborData?.canvas?.topBorder ?? parseCanvasBorderDeclaration(bottomNeighborData?.style.borderTop);
28787
+ const bottomNeighborCell = bottomNeighborRow === void 0 ? null : { row: bottomNeighborRow, col: drawCell.col };
28788
+ const bottomNeighborData = bottomNeighborCell ? getCellData(bottomNeighborCell.row, bottomNeighborCell.col) : null;
28789
+ let bottomNeighborTopBorder = bottomNeighborData?.isMergedSecondary ? null : bottomNeighborData?.canvas?.topBorder ?? parseCanvasBorderDeclaration(bottomNeighborData?.style.borderTop);
28790
+ if (bottomNeighborTopBorder == null && bottomNeighborCell && bottomNeighborData?.isMergedSecondary) {
28791
+ const bottomNeighborAnchorCell = resolveMergeAnchorCell(bottomNeighborCell);
28792
+ if (bottomNeighborAnchorCell.row === bottomNeighborCell.row) {
28793
+ const bottomNeighborAnchorData = getCellData(bottomNeighborAnchorCell.row, bottomNeighborAnchorCell.col);
28794
+ bottomNeighborTopBorder = bottomNeighborAnchorData.isMergedSecondary ? null : bottomNeighborAnchorData.canvas?.topBorder ?? parseCanvasBorderDeclaration(bottomNeighborAnchorData.style.borderTop);
28795
+ }
28796
+ }
27690
28797
  const resolvedRightBorder = resolveCanvasBoundaryBorder(rightBorder, rightNeighborLeftBorder);
27691
28798
  const resolvedBottomBorder = resolveCanvasBoundaryBorder(bottomBorder, bottomNeighborTopBorder);
27692
28799
  if (showGridLines && (!resolvedRightBorder || !resolvedBottomBorder)) {
@@ -27935,10 +29042,11 @@ function XlsxGrid({
27935
29042
  } else if (spillMaxWidth != null) {
27936
29043
  const text = shouldEllipsizeText ? truncateCanvasText(paneContext, rawText, maxTextWidth) : rawText;
27937
29044
  const textY = resolveCanvasTextMiddleY(cellStyle.verticalAlign, contentTop, contentHeight, singleLineHeight);
29045
+ const spillClipLeft = cellData.spillSide === "left" ? contentLeft + contentWidth - spillMaxWidth - textClipOverscan : contentLeft - textClipOverscan;
27938
29046
  deferredSpillTextsByPane[pane].push({
27939
29047
  align,
27940
29048
  clipHeight: contentHeight + textClipOverscan * 2,
27941
- clipLeft: contentLeft - textClipOverscan,
29049
+ clipLeft: spillClipLeft,
27942
29050
  clipTop: contentTop - textClipOverscan,
27943
29051
  clipWidth: spillMaxWidth + textClipOverscan * 2,
27944
29052
  color: textColor,
@@ -28262,7 +29370,7 @@ function XlsxGrid({
28262
29370
  setInteractionMode("select");
28263
29371
  document.body.style.cursor = "move";
28264
29372
  document.body.style.userSelect = "none";
28265
- installChartInteractionListeners(event.pointerId);
29373
+ installChartInteractionListenersRef.current(event.pointerId);
28266
29374
  }, [focusGrid, selectChart]);
28267
29375
  const startChartResize = React4.useCallback((event, chart, rect, handle) => {
28268
29376
  if (readOnlyRef.current || chart.editable === false || event.button !== 0) {
@@ -28288,7 +29396,7 @@ function XlsxGrid({
28288
29396
  setInteractionMode("select");
28289
29397
  document.body.style.cursor = String(IMAGE_HANDLE_CURSOR[handle]);
28290
29398
  document.body.style.userSelect = "none";
28291
- installChartInteractionListeners(event.pointerId);
29399
+ installChartInteractionListenersRef.current(event.pointerId);
28292
29400
  }, [focusGrid, selectChart]);
28293
29401
  const startImageMove = React4.useCallback((event, image, rect) => {
28294
29402
  if (event.button !== 0) {
@@ -28316,7 +29424,7 @@ function XlsxGrid({
28316
29424
  setInteractionMode("select");
28317
29425
  document.body.style.cursor = "move";
28318
29426
  document.body.style.userSelect = "none";
28319
- installImageInteractionListeners(event.pointerId);
29427
+ installImageInteractionListenersRef.current(event.pointerId);
28320
29428
  }, [focusGrid, selectImage]);
28321
29429
  const startImageResize = React4.useCallback((event, image, rect, handle) => {
28322
29430
  if (readOnlyRef.current || image.editable === false || event.button !== 0) {
@@ -28342,7 +29450,7 @@ function XlsxGrid({
28342
29450
  setInteractionMode("select");
28343
29451
  document.body.style.cursor = String(IMAGE_HANDLE_CURSOR[handle]);
28344
29452
  document.body.style.userSelect = "none";
28345
- installImageInteractionListeners(event.pointerId);
29453
+ installImageInteractionListenersRef.current(event.pointerId);
28346
29454
  }, [focusGrid, selectImage]);
28347
29455
  const handleImageClick = React4.useCallback((image) => {
28348
29456
  if (skipNextImageClickRef.current === image.id) {
@@ -29710,7 +30818,10 @@ function XlsxGrid({
29710
30818
  skipNextImageClickRef.current = interaction.imageId;
29711
30819
  }
29712
30820
  if (interaction.didMove && finalRect) {
29713
- setImageRect(interaction.imageId, toLogicalRect(finalRect));
30821
+ setImageRect(interaction.imageId, toLogicalRect(finalRect), {
30822
+ columnWidths: actualColWidths,
30823
+ rowHeights: actualRowHeights
30824
+ });
29714
30825
  }
29715
30826
  }
29716
30827
  imagePreviewRectRef.current = null;
@@ -29787,7 +30898,10 @@ function XlsxGrid({
29787
30898
  skipNextChartClickRef.current = interaction.chartId;
29788
30899
  }
29789
30900
  if (interaction.didMove && finalRect) {
29790
- setChartRect(interaction.chartId, toLogicalRect(finalRect));
30901
+ setChartRect(interaction.chartId, toLogicalRect(finalRect), {
30902
+ columnWidths: actualColWidths,
30903
+ rowHeights: actualRowHeights
30904
+ });
29791
30905
  }
29792
30906
  }
29793
30907
  chartPreviewRectRef.current = null;
@@ -31626,7 +32740,17 @@ function useXlsxViewerThumbnails(options = {}) {
31626
32740
  const inheritedStyle = resolveInheritedCellStyle2(sheet, row, col);
31627
32741
  const worksheetStyle = worksheet ? worksheet.getCellStyleAt(row, col) ?? null : batchedCell?.style ?? null;
31628
32742
  const mergedStyle = mergeResolvedCellStyle(inheritedStyle, worksheetStyle, { replaceXfSubtrees: true });
31629
- const alignment = mergedStyle?.alignment;
32743
+ const conditionalCellStyle = resolveConditionalCellStyleForCell(
32744
+ row,
32745
+ col,
32746
+ sheet,
32747
+ () => worksheet ? getCellNumericValue(worksheet, row, col) : getBatchedCellNumericValue(batchedCell),
32748
+ () => worksheet ? getCellDisplayValue(worksheet, row, col, sheet) : batchedCell?.value ?? "",
32749
+ worksheet,
32750
+ workerRowBatch?.cells
32751
+ );
32752
+ const finalResolvedStyle = mergeResolvedCellStyle(mergedStyle, conditionalCellStyle);
32753
+ const alignment = finalResolvedStyle?.alignment;
31630
32754
  const sparkline = sparklineByCell.get(cacheKey) ?? null;
31631
32755
  const getNumericValue = (targetRow, targetCol) => worksheet ? getCellNumericValue(worksheet, targetRow, targetCol) : getBatchedCellNumericValue(workerRowBatch?.cells.get(`${targetRow}:${targetCol}`));
31632
32756
  const sparklineValues = sparkline ? sparkline.range.start.row === sparkline.range.end.row ? Array.from(
@@ -31642,7 +32766,7 @@ function useXlsxViewerThumbnails(options = {}) {
31642
32766
  sparkline.range.start.col
31643
32767
  )
31644
32768
  ) : null;
31645
- const checkboxState = mergedStyle?.cellControl ? worksheet ? getCellBooleanValue(worksheet, row, col) : getBatchedCellBooleanValue(batchedCell) : null;
32769
+ const checkboxState = finalResolvedStyle?.cellControl ? worksheet ? getCellBooleanValue(worksheet, row, col) : getBatchedCellBooleanValue(batchedCell) : null;
31646
32770
  const nextData = {
31647
32771
  canvas: void 0,
31648
32772
  checkboxState,
@@ -31653,7 +32777,7 @@ function useXlsxViewerThumbnails(options = {}) {
31653
32777
  isMergedSecondary: false,
31654
32778
  rowSpan: merge?.rowSpan,
31655
32779
  sparkline: sparkline && sparklineValues ? { config: sparkline, values: sparklineValues } : null,
31656
- style: buildCellStyle(mergedStyle, palette, sheet.themePalette, {
32780
+ style: buildCellStyle(finalResolvedStyle, palette, sheet.themePalette, {
31657
32781
  showGridLines
31658
32782
  }),
31659
32783
  textRotationDeg: resolveSpreadsheetTextRotation(alignment?.textRotation),