pptx-react-viewer 3.19.1 → 3.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{AiChatPanel-DLADHD56.js → AiChatPanel-KILEXOPT.js} +24 -24
  3. package/dist/AiChatPanel-KILEXOPT.js.br +0 -0
  4. package/dist/AiChatPanel-KILEXOPT.js.gz +0 -0
  5. package/dist/{AiChatPanel-MSALNPYW.mjs → AiChatPanel-ZH52BQBE.mjs} +3 -3
  6. package/dist/AiChatPanel-ZH52BQBE.mjs.br +0 -0
  7. package/dist/AiChatPanel-ZH52BQBE.mjs.gz +0 -0
  8. package/dist/{Area3DChartScene-BQQHOYRS.js → Area3DChartScene-HS7EBQLQ.js} +2 -2
  9. package/dist/{Area3DChartScene-BQQHOYRS.js.br → Area3DChartScene-HS7EBQLQ.js.br} +0 -0
  10. package/dist/Area3DChartScene-HS7EBQLQ.js.gz +0 -0
  11. package/dist/{Area3DChartScene-53ZVPYKG.mjs → Area3DChartScene-UHN7ZOZT.mjs} +1 -1
  12. package/dist/Area3DChartScene-UHN7ZOZT.mjs.br +0 -0
  13. package/dist/Area3DChartScene-UHN7ZOZT.mjs.gz +0 -0
  14. package/dist/{Bar3DChartScene-PNQOIOIH.js → Bar3DChartScene-E57TRVUU.js} +2 -2
  15. package/dist/{Bar3DChartScene-PNQOIOIH.js.br → Bar3DChartScene-E57TRVUU.js.br} +0 -0
  16. package/dist/Bar3DChartScene-E57TRVUU.js.gz +0 -0
  17. package/dist/{Bar3DChartScene-IN67ZH3P.mjs → Bar3DChartScene-TFGSYASD.mjs} +1 -1
  18. package/dist/{Bar3DChartScene-IN67ZH3P.mjs.br → Bar3DChartScene-TFGSYASD.mjs.br} +0 -0
  19. package/dist/Bar3DChartScene-TFGSYASD.mjs.gz +0 -0
  20. package/dist/{Line3DChartScene-CFSTMTFH.js → Line3DChartScene-NM7YYLZD.js} +2 -2
  21. package/dist/{Line3DChartScene-CFSTMTFH.js.br → Line3DChartScene-NM7YYLZD.js.br} +0 -0
  22. package/dist/Line3DChartScene-NM7YYLZD.js.gz +0 -0
  23. package/dist/{Line3DChartScene-4SQUUAOW.mjs → Line3DChartScene-RES5D7W7.mjs} +1 -1
  24. package/dist/{Line3DChartScene-4SQUUAOW.mjs.br → Line3DChartScene-RES5D7W7.mjs.br} +0 -0
  25. package/dist/Line3DChartScene-RES5D7W7.mjs.gz +0 -0
  26. package/dist/{Model3DScene-TA55BJY7.mjs → Model3DScene-6CWFGE7M.mjs} +1 -1
  27. package/dist/Model3DScene-6CWFGE7M.mjs.br +0 -0
  28. package/dist/Model3DScene-6CWFGE7M.mjs.gz +0 -0
  29. package/dist/{Model3DScene-DXNAYZ6P.js → Model3DScene-SL3QF63O.js} +2 -2
  30. package/dist/Model3DScene-SL3QF63O.js.br +0 -0
  31. package/dist/Model3DScene-SL3QF63O.js.gz +0 -0
  32. package/dist/{PieChart3DScene-TQOCHJOY.mjs → PieChart3DScene-QYJUOYMB.mjs} +1 -1
  33. package/dist/{PieChart3DScene-TQOCHJOY.mjs.br → PieChart3DScene-QYJUOYMB.mjs.br} +0 -0
  34. package/dist/PieChart3DScene-QYJUOYMB.mjs.gz +0 -0
  35. package/dist/{PieChart3DScene-NCBKTWAO.js → PieChart3DScene-WIVYOQUQ.js} +2 -2
  36. package/dist/{PieChart3DScene-NCBKTWAO.js.br → PieChart3DScene-WIVYOQUQ.js.br} +0 -0
  37. package/dist/PieChart3DScene-WIVYOQUQ.js.gz +0 -0
  38. package/dist/{SurfaceChart3DScene-VA6IRLFG.js → SurfaceChart3DScene-QCUYYQBZ.js} +2 -2
  39. package/dist/{SurfaceChart3DScene-VA6IRLFG.js.br → SurfaceChart3DScene-QCUYYQBZ.js.br} +0 -0
  40. package/dist/SurfaceChart3DScene-QCUYYQBZ.js.gz +0 -0
  41. package/dist/{SurfaceChart3DScene-7CSF2GPT.mjs → SurfaceChart3DScene-Y2LF73QQ.mjs} +1 -1
  42. package/dist/{SurfaceChart3DScene-7CSF2GPT.mjs.br → SurfaceChart3DScene-Y2LF73QQ.mjs.br} +0 -0
  43. package/dist/SurfaceChart3DScene-Y2LF73QQ.mjs.gz +0 -0
  44. package/dist/{chunk-AZEDCITO.js → chunk-2LK3OHAN.js} +806 -802
  45. package/dist/chunk-2LK3OHAN.js.br +0 -0
  46. package/dist/chunk-2LK3OHAN.js.gz +0 -0
  47. package/dist/{chunk-RCUPQJVY.mjs → chunk-7XJ7I6TJ.mjs} +11 -6
  48. package/dist/chunk-7XJ7I6TJ.mjs.br +0 -0
  49. package/dist/chunk-7XJ7I6TJ.mjs.gz +0 -0
  50. package/dist/{chunk-Z3KMGLXL.mjs → chunk-ATKAU2J4.mjs} +6 -6
  51. package/dist/chunk-ATKAU2J4.mjs.br +0 -0
  52. package/dist/chunk-ATKAU2J4.mjs.gz +0 -0
  53. package/dist/{chunk-YVZKXCML.js → chunk-F7VYECOL.js} +5 -5
  54. package/dist/chunk-F7VYECOL.js.br +0 -0
  55. package/dist/chunk-F7VYECOL.js.gz +0 -0
  56. package/dist/{chunk-3KVLOKA6.mjs → chunk-GULL4H2I.mjs} +340 -206
  57. package/dist/chunk-GULL4H2I.mjs.br +0 -0
  58. package/dist/chunk-GULL4H2I.mjs.gz +0 -0
  59. package/dist/{chunk-DNQ3PGGU.mjs → chunk-M5BAPEQL.mjs} +31 -27
  60. package/dist/chunk-M5BAPEQL.mjs.br +0 -0
  61. package/dist/chunk-M5BAPEQL.mjs.gz +0 -0
  62. package/dist/{chunk-LBKKSCVS.mjs → chunk-NEMPFYZ5.mjs} +1 -1
  63. package/dist/chunk-NEMPFYZ5.mjs.br +0 -0
  64. package/dist/chunk-NEMPFYZ5.mjs.gz +0 -0
  65. package/dist/{chunk-ZHPBQVBK.js → chunk-RPPLJQ6R.js} +1044 -1044
  66. package/dist/chunk-RPPLJQ6R.js.br +0 -0
  67. package/dist/chunk-RPPLJQ6R.js.gz +0 -0
  68. package/dist/{chunk-4WUGOCYU.js → chunk-YH4ODPSH.js} +182 -177
  69. package/dist/chunk-YH4ODPSH.js.br +0 -0
  70. package/dist/chunk-YH4ODPSH.js.gz +0 -0
  71. package/dist/{chunk-EJSRXEXA.js → chunk-ZUIM5737.js} +341 -205
  72. package/dist/chunk-ZUIM5737.js.br +0 -0
  73. package/dist/chunk-ZUIM5737.js.gz +0 -0
  74. package/dist/index.d.ts +38 -0
  75. package/dist/index.js +46 -46
  76. package/dist/index.js.br +0 -0
  77. package/dist/index.js.gz +0 -0
  78. package/dist/index.mjs +5 -5
  79. package/dist/index.mjs.br +0 -0
  80. package/dist/index.mjs.gz +0 -0
  81. package/dist/internals.d.ts +38 -0
  82. package/dist/internals.js +104 -104
  83. package/dist/internals.js.br +0 -0
  84. package/dist/internals.js.gz +0 -0
  85. package/dist/internals.mjs +3 -3
  86. package/dist/internals.mjs.br +0 -0
  87. package/dist/internals.mjs.gz +0 -0
  88. package/dist/viewer/index.d.ts +38 -0
  89. package/dist/viewer/index.js +26 -26
  90. package/dist/viewer/index.js.br +0 -0
  91. package/dist/viewer/index.js.gz +0 -0
  92. package/dist/viewer/index.mjs +5 -5
  93. package/dist/viewer/index.mjs.br +0 -0
  94. package/dist/viewer/index.mjs.gz +0 -0
  95. package/package.json +1 -1
  96. package/dist/AiChatPanel-DLADHD56.js.br +0 -0
  97. package/dist/AiChatPanel-DLADHD56.js.gz +0 -0
  98. package/dist/AiChatPanel-MSALNPYW.mjs.br +0 -0
  99. package/dist/AiChatPanel-MSALNPYW.mjs.gz +0 -0
  100. package/dist/Area3DChartScene-53ZVPYKG.mjs.br +0 -0
  101. package/dist/Area3DChartScene-53ZVPYKG.mjs.gz +0 -0
  102. package/dist/Area3DChartScene-BQQHOYRS.js.gz +0 -0
  103. package/dist/Bar3DChartScene-IN67ZH3P.mjs.gz +0 -0
  104. package/dist/Bar3DChartScene-PNQOIOIH.js.gz +0 -0
  105. package/dist/Line3DChartScene-4SQUUAOW.mjs.gz +0 -0
  106. package/dist/Line3DChartScene-CFSTMTFH.js.gz +0 -0
  107. package/dist/Model3DScene-DXNAYZ6P.js.br +0 -0
  108. package/dist/Model3DScene-DXNAYZ6P.js.gz +0 -0
  109. package/dist/Model3DScene-TA55BJY7.mjs.br +0 -0
  110. package/dist/Model3DScene-TA55BJY7.mjs.gz +0 -0
  111. package/dist/PieChart3DScene-NCBKTWAO.js.gz +0 -0
  112. package/dist/PieChart3DScene-TQOCHJOY.mjs.gz +0 -0
  113. package/dist/SurfaceChart3DScene-7CSF2GPT.mjs.gz +0 -0
  114. package/dist/SurfaceChart3DScene-VA6IRLFG.js.gz +0 -0
  115. package/dist/chunk-3KVLOKA6.mjs.br +0 -0
  116. package/dist/chunk-3KVLOKA6.mjs.gz +0 -0
  117. package/dist/chunk-4WUGOCYU.js.br +0 -0
  118. package/dist/chunk-4WUGOCYU.js.gz +0 -0
  119. package/dist/chunk-AZEDCITO.js.br +0 -0
  120. package/dist/chunk-AZEDCITO.js.gz +0 -0
  121. package/dist/chunk-DNQ3PGGU.mjs.br +0 -0
  122. package/dist/chunk-DNQ3PGGU.mjs.gz +0 -0
  123. package/dist/chunk-EJSRXEXA.js.br +0 -0
  124. package/dist/chunk-EJSRXEXA.js.gz +0 -0
  125. package/dist/chunk-LBKKSCVS.mjs.br +0 -0
  126. package/dist/chunk-LBKKSCVS.mjs.gz +0 -0
  127. package/dist/chunk-RCUPQJVY.mjs.br +0 -0
  128. package/dist/chunk-RCUPQJVY.mjs.gz +0 -0
  129. package/dist/chunk-YVZKXCML.js.br +0 -0
  130. package/dist/chunk-YVZKXCML.js.gz +0 -0
  131. package/dist/chunk-Z3KMGLXL.mjs.br +0 -0
  132. package/dist/chunk-Z3KMGLXL.mjs.gz +0 -0
  133. package/dist/chunk-ZHPBQVBK.js.br +0 -0
  134. package/dist/chunk-ZHPBQVBK.js.gz +0 -0
@@ -46496,6 +46496,10 @@ function parseChartDataPointPicture(dPtNode, xmlLookup) {
46496
46496
  if (Number.isFinite(stackUnit)) {
46497
46497
  result.pictureStackUnit = stackUnit;
46498
46498
  }
46499
+ const opacity2 = parseBlipOpacity(dPtNode, xmlLookup);
46500
+ if (opacity2 !== void 0) {
46501
+ result.opacity = opacity2;
46502
+ }
46499
46503
  return Object.keys(result).length > 0 ? result : void 0;
46500
46504
  }
46501
46505
  function parseChartDataPointPictureBlipRel(dPtNode, xmlLookup) {
@@ -46505,6 +46509,26 @@ function parseChartDataPointPictureBlipRel(dPtNode, xmlLookup) {
46505
46509
  const relId = String(blip?.["@_r:embed"] ?? blip?.["@_r:link"] ?? "").trim();
46506
46510
  return relId.length > 0 ? relId : void 0;
46507
46511
  }
46512
+ function parseBlipOpacity(dPtOrSerNode, xmlLookup) {
46513
+ const spPr = xmlLookup.getChildByLocalName(dPtOrSerNode, "spPr");
46514
+ const blipFill = xmlLookup.getChildByLocalName(spPr, "blipFill");
46515
+ const blip = xmlLookup.getChildByLocalName(blipFill, "blip");
46516
+ const alphaModFix = xmlLookup.getChildByLocalName(blip, "alphaModFix");
46517
+ const amt = Number.parseFloat(String(alphaModFix?.["@_amt"] ?? ""));
46518
+ return Number.isFinite(amt) ? Math.min(Math.max(amt / 1e5, 0), 1) : void 0;
46519
+ }
46520
+ function parseImplicitBlipPictureFill(dPtOrSerNode, xmlLookup) {
46521
+ const pictureOptions = xmlLookup.getChildByLocalName(dPtOrSerNode, "pictureOptions");
46522
+ if (pictureOptions) {
46523
+ return void 0;
46524
+ }
46525
+ const relId = parseChartDataPointPictureBlipRel(dPtOrSerNode, xmlLookup);
46526
+ if (!relId) {
46527
+ return void 0;
46528
+ }
46529
+ const opacity2 = parseBlipOpacity(dPtOrSerNode, xmlLookup);
46530
+ return { pictureFormat: "stretch", ...opacity2 !== void 0 ? { opacity: opacity2 } : {} };
46531
+ }
46508
46532
  function buildDptPictureOptions(existing, picture) {
46509
46533
  if (picture === void 0) {
46510
46534
  return existing;
@@ -47078,6 +47102,11 @@ function parseSeriesDataPoints(seriesNode, xmlLookup, colorParser) {
47078
47102
  const picture = parseChartDataPointPicture(node, xmlLookup);
47079
47103
  if (picture) {
47080
47104
  result.picture = picture;
47105
+ } else {
47106
+ const impliedPicture = parseImplicitBlipPictureFill(node, xmlLookup);
47107
+ if (impliedPicture) {
47108
+ result.impliedPicture = impliedPicture;
47109
+ }
47081
47110
  }
47082
47111
  const explosionNode = xmlLookup.getChildByLocalName(node, "explosion");
47083
47112
  const explosion = safeUnsignedInt(explosionNode?.["@_val"]);
@@ -67430,6 +67459,12 @@ var init_PptxShapeStyleExtractor = __esm({
67430
67459
  style.fillMode = "image";
67431
67460
  style.fillColor = "transparent";
67432
67461
  style.fillOpacity = 0;
67462
+ const blipRotToken = String(blipFill["@_rotWithShape"] ?? "").trim().toLowerCase();
67463
+ if (blipRotToken === "1" || blipRotToken === "true") {
67464
+ style.fillImageRotWithShape = true;
67465
+ } else if (blipRotToken === "0" || blipRotToken === "false") {
67466
+ style.fillImageRotWithShape = false;
67467
+ }
67433
67468
  } else if (shapeProps["a:grpFill"] !== void 0) {
67434
67469
  style.fillMode = "group";
67435
67470
  } else if (styleNode?.["a:fillRef"]) {
@@ -80942,7 +80977,7 @@ async function resolveDataPointPictureImages(xmlLookup, readChartRels, resolveIm
80942
80977
  if (!seriesNode) {
80943
80978
  continue;
80944
80979
  }
80945
- const seriesPicture = series[si].picture;
80980
+ const seriesPicture = series[si].picture ?? series[si].impliedPicture;
80946
80981
  if (seriesPicture) {
80947
80982
  const seriesRelId = parseChartDataPointPictureBlipRel(seriesNode, xmlLookup);
80948
80983
  if (seriesRelId) {
@@ -80968,7 +81003,8 @@ async function resolveDataPointPictureImages(xmlLookup, readChartRels, resolveIm
80968
81003
  10
80969
81004
  );
80970
81005
  const dataPoint = dataPoints.find((dp) => dp.idx === idx);
80971
- if (!dataPoint?.picture) {
81006
+ const dataPointPicture = dataPoint?.picture ?? dataPoint?.impliedPicture;
81007
+ if (!dataPointPicture) {
80972
81008
  continue;
80973
81009
  }
80974
81010
  const relId = parseChartDataPointPictureBlipRel(dPtNode, xmlLookup);
@@ -80983,7 +81019,7 @@ async function resolveDataPointPictureImages(xmlLookup, readChartRels, resolveIm
80983
81019
  const imagePath = resolveImagePath(chartPartPath, rel.target);
80984
81020
  const imageUrl = await getImageData(imagePath);
80985
81021
  if (imageUrl) {
80986
- dataPoint.picture.imageUrl = imageUrl;
81022
+ dataPointPicture.imageUrl = imageUrl;
80987
81023
  }
80988
81024
  }
80989
81025
  }
@@ -122022,7 +122058,9 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
122022
122058
  });
122023
122059
  }
122024
122060
  }
122025
- if (finalSeries.some((s) => s.picture || s.dataPoints?.some((dp) => dp.picture))) {
122061
+ if (finalSeries.some(
122062
+ (s) => s.picture || s.impliedPicture || s.dataPoints?.some((dp) => dp.picture || dp.impliedPicture)
122063
+ )) {
122026
122064
  await resolveDataPointPictureImages(
122027
122065
  this.xmlLookupService,
122028
122066
  this.readChartRels.bind(this),
@@ -122337,6 +122375,7 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
122337
122375
  (key2) => this.compatibilityService.getXmlLocalName(key2)
122338
122376
  );
122339
122377
  const seriesPicture = parseChartDataPointPicture(seriesNode, this.xmlLookupService);
122378
+ const impliedSeriesPicture = seriesPicture ? void 0 : parseImplicitBlipPictureFill(seriesNode, this.xmlLookupService);
122340
122379
  const xValues = extractSeriesNumbersWithBlanks(
122341
122380
  this.xmlLookupService.getChildByLocalName(seriesNode, "xVal"),
122342
122381
  this.xmlLookupService
@@ -122382,6 +122421,7 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
122382
122421
  ...dataLabels.length > 0 ? { dataLabels } : {},
122383
122422
  ...explosion !== void 0 ? { explosion } : {},
122384
122423
  ...seriesPicture ? { picture: seriesPicture } : {},
122424
+ ...impliedSeriesPicture ? { impliedPicture: impliedSeriesPicture } : {},
122385
122425
  ...invertIfNegative !== void 0 ? { invertIfNegative } : {},
122386
122426
  ...smooth !== void 0 ? { smooth } : {},
122387
122427
  ...axisId !== void 0 ? { axisId } : {},
@@ -144129,6 +144169,28 @@ function resolveGroupChildFill(child27, parentGroupFill) {
144129
144169
  }
144130
144170
  return getComputedFillStyle(child27, parentGroupFill);
144131
144171
  }
144172
+ function getFrameInverseTransform(element) {
144173
+ const transforms = [];
144174
+ if (element.flipVertical) {
144175
+ transforms.push("scaleY(-1)");
144176
+ }
144177
+ if (element.flipHorizontal) {
144178
+ transforms.push("scaleX(-1)");
144179
+ }
144180
+ if (element.rotation) {
144181
+ transforms.push(`rotate(${-element.rotation}deg)`);
144182
+ }
144183
+ return transforms.length > 0 ? transforms.join(" ") : void 0;
144184
+ }
144185
+ function getImageFillCounterTransform(element, hasCompetingTransform = false) {
144186
+ if (hasCompetingTransform || !hasShapeProperties(element)) {
144187
+ return void 0;
144188
+ }
144189
+ if (element.shapeStyle?.fillImageRotWithShape !== false) {
144190
+ return void 0;
144191
+ }
144192
+ return getFrameInverseTransform(element);
144193
+ }
144132
144194
  var DEFAULT_SCHEME_COLOR_MAP2 = {
144133
144195
  dk1: "#000000",
144134
144196
  lt1: "#FFFFFF",
@@ -150961,7 +151023,7 @@ function resolve(fill, fallback) {
150961
151023
  return fill ?? fallback;
150962
151024
  }
150963
151025
  function chartAreaFill(chartData) {
150964
- return resolve(chartData?.style?.chartAreaFill, DEFAULT_CHART_AREA_FILL);
151026
+ return resolve(chartData?.style?.chartAreaFill, void 0);
150965
151027
  }
150966
151028
  function plotAreaFill(chartData) {
150967
151029
  return resolve(chartData?.style?.plotAreaFill, void 0);
@@ -151178,11 +151240,20 @@ function hasSecondaryValueAxis(axes) {
151178
151240
  }
151179
151241
  return axes.some((a) => a.axisType === "valAx" && a.axPos === "r");
151180
151242
  }
151243
+ function categoryAxes(axes) {
151244
+ return axes?.filter((a) => a.axisType === "catAx" || a.axisType === "dateAx") ?? [];
151245
+ }
151181
151246
  function hasSecondaryCategoryAxis(axes) {
151182
- if (!axes) {
151247
+ const cats = categoryAxes(axes);
151248
+ return cats.length > 1 && cats.some((a) => a.axPos === "t");
151249
+ }
151250
+ function isPrimaryCategoryAxisAtTop(axes) {
151251
+ const cats = categoryAxes(axes);
151252
+ if (cats.length === 0) {
151183
151253
  return false;
151184
151254
  }
151185
- return axes.some((a) => (a.axisType === "catAx" || a.axisType === "dateAx") && a.axPos === "t");
151255
+ const primary = cats.find((a) => a.axPos !== "t") ?? cats[0];
151256
+ return primary.axPos === "t";
151186
151257
  }
151187
151258
  function getSecondaryValueAxis(axes) {
151188
151259
  if (!axes) {
@@ -151194,6 +151265,7 @@ function computeLayoutOptions(axes, dataTable, seriesCount) {
151194
151265
  return {
151195
151266
  hasSecondaryValueAxis: hasSecondaryValueAxis(axes),
151196
151267
  hasSecondaryCategoryAxis: hasSecondaryCategoryAxis(axes),
151268
+ categoryAxisAtTop: isPrimaryCategoryAxisAtTop(axes),
151197
151269
  hasDataTable: Boolean(dataTable),
151198
151270
  dataTableRowCount: dataTable ? seriesCount : void 0
151199
151271
  };
@@ -151278,11 +151350,15 @@ function resolveDataPointMarker(series, pointIndex) {
151278
151350
  }
151279
151351
  var DEFAULT_PICTURE_FORMAT = "stretch";
151280
151352
  function resolveActiveDataPointPicture(series, pointIndex) {
151281
- const pointPicture = findDataPoint(series, pointIndex)?.picture;
151282
- if (pointPicture?.imageUrl) {
151353
+ const point = findDataPoint(series, pointIndex);
151354
+ const pointPicture = point?.picture?.imageUrl ? point.picture : point?.impliedPicture?.imageUrl ? point.impliedPicture : void 0;
151355
+ if (pointPicture) {
151283
151356
  return pointPicture;
151284
151357
  }
151285
- return series.picture?.imageUrl ? series.picture : void 0;
151358
+ if (series.picture?.imageUrl) {
151359
+ return series.picture;
151360
+ }
151361
+ return series.impliedPicture?.imageUrl ? series.impliedPicture : void 0;
151286
151362
  }
151287
151363
  function resolveBarFaceTargets(picture) {
151288
151364
  if (!picture) {
@@ -151311,7 +151387,8 @@ function resolveDataPointPictureFill(series, pointIndex, seriesIndex, face) {
151311
151387
  patternId: `chart-dpt-pic-${seriesIndex}-${pointIndex}${face && face !== "front" ? `-${face}` : ""}`,
151312
151388
  imageUrl: picture.imageUrl,
151313
151389
  format,
151314
- ...format !== "stretch" && picture.pictureStackUnit !== void 0 ? { tileHeightPx: chartFontPx(picture.pictureStackUnit) } : {}
151390
+ ...format !== "stretch" && picture.pictureStackUnit !== void 0 ? { tileHeightPx: chartFontPx(picture.pictureStackUnit) } : {},
151391
+ ...picture.opacity !== void 0 ? { opacity: picture.opacity } : {}
151315
151392
  };
151316
151393
  }
151317
151394
  function polygonBoundingBox2(points4) {
@@ -151368,7 +151445,11 @@ function applyDataPointPictureFills(chartData, elementId, primitives) {
151368
151445
  resolved.tileHeightPx
151369
151446
  )
151370
151447
  );
151371
- return { ...primitive, fill: `url(#${patternId})` };
151448
+ return {
151449
+ ...primitive,
151450
+ fill: `url(#${patternId})`,
151451
+ ...resolved.opacity !== void 0 ? { opacity: resolved.opacity } : {}
151452
+ };
151372
151453
  });
151373
151454
  return { primitives: next, defs };
151374
151455
  }
@@ -151523,10 +151604,136 @@ function computeChartLegendLayout(vm) {
151523
151604
  fill: textStyle?.color ?? DEFAULT_LEGEND_TEXT_COLOR,
151524
151605
  fontWeight: textStyle?.bold ? "bold" : "normal",
151525
151606
  fontStyle: textStyle?.italic ? "italic" : "normal",
151526
- fontFamily: textStyle?.fontFamily
151607
+ fontFamily: textStyle?.fontFamily,
151608
+ ...entry2.lineSwatch ? { lineSwatch: entry2.lineSwatch } : {}
151527
151609
  };
151528
151610
  });
151529
151611
  }
151612
+ function markerRadius(size, defaultRadius2) {
151613
+ if (size === void 0 || !Number.isFinite(size) || size <= 0) {
151614
+ return defaultRadius2;
151615
+ }
151616
+ return size / 2;
151617
+ }
151618
+ function polygonPoints(vertices) {
151619
+ return vertices.map(([x, y]) => `${x.toFixed(2)},${y.toFixed(2)}`).join(" ");
151620
+ }
151621
+ function starVertices(cx, cy, r) {
151622
+ const inner = r * 0.5;
151623
+ const out = [];
151624
+ for (let i2 = 0; i2 < 10; i2++) {
151625
+ const radius = i2 % 2 === 0 ? r : inner;
151626
+ const angle = -Math.PI / 2 + Math.PI * i2 / 5;
151627
+ out.push([cx + radius * Math.cos(angle), cy + radius * Math.sin(angle)]);
151628
+ }
151629
+ return out;
151630
+ }
151631
+ function buildMarkerPrimitive(input) {
151632
+ const { symbol, cx, cy, fill, part } = input;
151633
+ if (symbol === "none") {
151634
+ return null;
151635
+ }
151636
+ const r = markerRadius(input.size, input.defaultRadius);
151637
+ const stroke = fill;
151638
+ switch (symbol) {
151639
+ case "square":
151640
+ return { kind: "rect", x: cx - r, y: cy - r, w: r * 2, h: r * 2, fill, part };
151641
+ case "dash":
151642
+ return { kind: "rect", x: cx - r, y: cy - r * 0.32, w: r * 2, h: r * 0.64, fill, part };
151643
+ case "diamond":
151644
+ return {
151645
+ kind: "polygon",
151646
+ points: polygonPoints([
151647
+ [cx, cy - r],
151648
+ [cx + r, cy],
151649
+ [cx, cy + r],
151650
+ [cx - r, cy]
151651
+ ]),
151652
+ fill,
151653
+ stroke,
151654
+ strokeWidth: 0,
151655
+ part
151656
+ };
151657
+ case "triangle":
151658
+ return {
151659
+ kind: "polygon",
151660
+ points: polygonPoints([
151661
+ [cx, cy - r],
151662
+ [cx + r * 0.9, cy + r * 0.75],
151663
+ [cx - r * 0.9, cy + r * 0.75]
151664
+ ]),
151665
+ fill,
151666
+ stroke,
151667
+ strokeWidth: 0,
151668
+ part
151669
+ };
151670
+ case "star":
151671
+ return {
151672
+ kind: "polygon",
151673
+ points: polygonPoints(starVertices(cx, cy, r)),
151674
+ fill,
151675
+ stroke,
151676
+ strokeWidth: 0,
151677
+ part
151678
+ };
151679
+ case "plus":
151680
+ return {
151681
+ kind: "path",
151682
+ d: `M${(cx - r).toFixed(2)},${cy.toFixed(2)} L${(cx + r).toFixed(2)},${cy.toFixed(2)} M${cx.toFixed(2)},${(cy - r).toFixed(2)} L${cx.toFixed(2)},${(cy + r).toFixed(2)}`,
151683
+ fill: "none",
151684
+ stroke,
151685
+ strokeWidth: Math.max(1, r * 0.4),
151686
+ part
151687
+ };
151688
+ case "x":
151689
+ return {
151690
+ kind: "path",
151691
+ d: `M${(cx - r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx + r).toFixed(2)},${(cy + r).toFixed(2)} M${(cx + r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx - r).toFixed(2)},${(cy + r).toFixed(2)}`,
151692
+ fill: "none",
151693
+ stroke,
151694
+ strokeWidth: Math.max(1, r * 0.4),
151695
+ part
151696
+ };
151697
+ case "dot":
151698
+ return { kind: "circle", cx, cy, r: Math.max(r * 0.6, 1), fill, part };
151699
+ default:
151700
+ return { kind: "circle", cx, cy, r, fill, part };
151701
+ }
151702
+ }
151703
+ var LEGEND_LINE_SWATCH_WIDTH = 2;
151704
+ var LEGEND_MARKER_RADIUS = 3;
151705
+ var SWATCH_CENTER_Y = -2;
151706
+ var SWATCH_WIDTH = 10;
151707
+ function resolveLegendSwatchKind(kind) {
151708
+ return kind === "line" || kind === "scatter" ? "line" : "rect";
151709
+ }
151710
+ function buildLineLegendSwatch(series, color2) {
151711
+ const resolved = resolveDataPointMarker(series, -1), primitives = [];
151712
+ if (!series.lineNoFill) {
151713
+ primitives.push({
151714
+ kind: "line",
151715
+ x1: 0,
151716
+ y1: SWATCH_CENTER_Y,
151717
+ x2: SWATCH_WIDTH,
151718
+ y2: SWATCH_CENTER_Y,
151719
+ stroke: color2,
151720
+ strokeWidth: LEGEND_LINE_SWATCH_WIDTH
151721
+ });
151722
+ }
151723
+ const marker = buildMarkerPrimitive({
151724
+ symbol: resolved.symbol,
151725
+ // Deliberately ignore the series' authored size (see doc comment above).
151726
+ size: void 0,
151727
+ cx: SWATCH_WIDTH / 2,
151728
+ cy: SWATCH_CENTER_Y,
151729
+ fill: resolved.fill ?? color2,
151730
+ defaultRadius: LEGEND_MARKER_RADIUS
151731
+ });
151732
+ if (marker) {
151733
+ primitives.push(marker);
151734
+ }
151735
+ return { primitives };
151736
+ }
151530
151737
  var DEFAULT_COLOR2 = "#64748b";
151531
151738
  function dashArray(style, width) {
151532
151739
  if (!style || style === "solid") {
@@ -151685,6 +151892,30 @@ function buildMarkTooltip(seriesName, categoryLabel, value, numberFormat) {
151685
151892
  const label = [seriesName, categoryLabel].filter((part) => Boolean(part && part.length > 0)).join(", "), formatted = formatAxisValue2(value, numberFormat);
151686
151893
  return label.length > 0 ? `${label}: ${formatted}` : formatted;
151687
151894
  }
151895
+ function buildLegend(series, colorPalette, svgWidth, legendPos, svgHeight, plotTop, swatchKind = "rect") {
151896
+ const legend = series.map((s, i2) => {
151897
+ const color2 = seriesColor2(s, i2, colorPalette), kind = Array.isArray(swatchKind) ? swatchKind[i2] ?? "rect" : swatchKind;
151898
+ return {
151899
+ color: color2,
151900
+ label: s.name,
151901
+ ...kind === "line" ? { lineSwatch: buildLineLegendSwatch(s, color2) } : {}
151902
+ };
151903
+ });
151904
+ let legendX = svgWidth / 2, legendY = svgHeight - 8, legendAnchor = "middle";
151905
+ const side = resolveLegendPlacement(legendPos).side;
151906
+ if (side === "r") {
151907
+ legendX = svgWidth - 75;
151908
+ legendY = plotTop;
151909
+ legendAnchor = "start";
151910
+ } else if (side === "l") {
151911
+ legendX = 4;
151912
+ legendY = plotTop;
151913
+ legendAnchor = "start";
151914
+ } else if (side === "t") {
151915
+ legendY = 28;
151916
+ }
151917
+ return { legend, legendX, legendY, legendAnchor };
151918
+ }
151688
151919
  function computeBarRects(series, catCount, layout, range, colorPalette) {
151689
151920
  const rects = [], seriesCount = Math.max(series.length, 1), barGroupWidth = layout.plotWidth / Math.max(catCount, 1), singleBarWidth = barGroupWidth * 0.7 / seriesCount, groupOffset = (barGroupWidth - singleBarWidth * seriesCount) / 2;
151690
151921
  for (let ci = 0; ci < catCount; ci++) {
@@ -152357,97 +152588,6 @@ function smoothLinePath(points4) {
152357
152588
  }
152358
152589
  return d;
152359
152590
  }
152360
- function markerRadius(size, defaultRadius2) {
152361
- if (size === void 0 || !Number.isFinite(size) || size <= 0) {
152362
- return defaultRadius2;
152363
- }
152364
- return size / 2;
152365
- }
152366
- function polygonPoints(vertices) {
152367
- return vertices.map(([x, y]) => `${x.toFixed(2)},${y.toFixed(2)}`).join(" ");
152368
- }
152369
- function starVertices(cx, cy, r) {
152370
- const inner = r * 0.5;
152371
- const out = [];
152372
- for (let i2 = 0; i2 < 10; i2++) {
152373
- const radius = i2 % 2 === 0 ? r : inner;
152374
- const angle = -Math.PI / 2 + Math.PI * i2 / 5;
152375
- out.push([cx + radius * Math.cos(angle), cy + radius * Math.sin(angle)]);
152376
- }
152377
- return out;
152378
- }
152379
- function buildMarkerPrimitive(input) {
152380
- const { symbol, cx, cy, fill, part } = input;
152381
- if (symbol === "none") {
152382
- return null;
152383
- }
152384
- const r = markerRadius(input.size, input.defaultRadius);
152385
- const stroke = fill;
152386
- switch (symbol) {
152387
- case "square":
152388
- return { kind: "rect", x: cx - r, y: cy - r, w: r * 2, h: r * 2, fill, part };
152389
- case "dash":
152390
- return { kind: "rect", x: cx - r, y: cy - r * 0.32, w: r * 2, h: r * 0.64, fill, part };
152391
- case "diamond":
152392
- return {
152393
- kind: "polygon",
152394
- points: polygonPoints([
152395
- [cx, cy - r],
152396
- [cx + r, cy],
152397
- [cx, cy + r],
152398
- [cx - r, cy]
152399
- ]),
152400
- fill,
152401
- stroke,
152402
- strokeWidth: 0,
152403
- part
152404
- };
152405
- case "triangle":
152406
- return {
152407
- kind: "polygon",
152408
- points: polygonPoints([
152409
- [cx, cy - r],
152410
- [cx + r * 0.9, cy + r * 0.75],
152411
- [cx - r * 0.9, cy + r * 0.75]
152412
- ]),
152413
- fill,
152414
- stroke,
152415
- strokeWidth: 0,
152416
- part
152417
- };
152418
- case "star":
152419
- return {
152420
- kind: "polygon",
152421
- points: polygonPoints(starVertices(cx, cy, r)),
152422
- fill,
152423
- stroke,
152424
- strokeWidth: 0,
152425
- part
152426
- };
152427
- case "plus":
152428
- return {
152429
- kind: "path",
152430
- d: `M${(cx - r).toFixed(2)},${cy.toFixed(2)} L${(cx + r).toFixed(2)},${cy.toFixed(2)} M${cx.toFixed(2)},${(cy - r).toFixed(2)} L${cx.toFixed(2)},${(cy + r).toFixed(2)}`,
152431
- fill: "none",
152432
- stroke,
152433
- strokeWidth: Math.max(1, r * 0.4),
152434
- part
152435
- };
152436
- case "x":
152437
- return {
152438
- kind: "path",
152439
- d: `M${(cx - r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx + r).toFixed(2)},${(cy + r).toFixed(2)} M${(cx + r).toFixed(2)},${(cy - r).toFixed(2)} L${(cx - r).toFixed(2)},${(cy + r).toFixed(2)}`,
152440
- fill: "none",
152441
- stroke,
152442
- strokeWidth: Math.max(1, r * 0.4),
152443
- part
152444
- };
152445
- case "dot":
152446
- return { kind: "circle", cx, cy, r: Math.max(r * 0.6, 1), fill, part };
152447
- default:
152448
- return { kind: "circle", cx, cy, r, fill, part };
152449
- }
152450
- }
152451
152591
  function elementFrame(layout) {
152452
152592
  return { width: layout.svgWidth, height: layout.svgHeight };
152453
152593
  }
@@ -152959,7 +153099,7 @@ function invertNegativeFill(series, pointIndex, value, baseFill) {
152959
153099
  function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, secondaryIdx, grouping, sourceIndices2) {
152960
153100
  const primitives = [], dataLabels = [], series = chartData.series, palette = chartData.colorPalette, showLabels = chartData.style?.hasDataLabels, varyColorsSingle = chartData.varyColors === true && series.length === 1;
152961
153101
  if (grouping === "clustered") {
152962
- const seriesCount = Math.max(series.length, 1), barGroupWidth = layout.plotWidth / Math.max(catCount, 1), singleBarWidth = chartData.barGapWidth !== void 0 ? barGroupWidth / (seriesCount + Math.max(chartData.barGapWidth, 0) / 100) : barGroupWidth * 0.7 / seriesCount, overlap = chartData.barOverlap ?? 0, step = singleBarWidth * (1 - overlap / 100), clusterWidth = singleBarWidth + step * (seriesCount - 1), groupOffset = (barGroupWidth - clusterWidth) / 2;
153102
+ const seriesCount = Math.max(series.length, 1), barGroupWidth = layout.plotWidth / Math.max(catCount, 1), overlap = chartData.barOverlap ?? 0, overlapSpan = 1 + (seriesCount - 1) * (1 - overlap / 100), singleBarWidth = chartData.barGapWidth !== void 0 ? barGroupWidth / ((1 + Math.max(chartData.barGapWidth, 0) / 100) * overlapSpan) : barGroupWidth * 0.7 / seriesCount, step = singleBarWidth * (1 - overlap / 100), clusterWidth = singleBarWidth + step * (seriesCount - 1), groupOffset = (barGroupWidth - clusterWidth) / 2;
152963
153103
  for (let displayIndex = 0; displayIndex < catCount; displayIndex++) {
152964
153104
  const sourceIndex = sourceIndices2[displayIndex] ?? displayIndex;
152965
153105
  for (let si = 0; si < series.length; si++) {
@@ -153676,10 +153816,10 @@ function buildMultiLevelCategoryLabels(categoryLabels, categoryLevels, sourceInd
153676
153816
  });
153677
153817
  }
153678
153818
  function primaryCategoryAxis(axes) {
153679
- const categoryAxes = axes?.filter(
153819
+ const categoryAxes2 = axes?.filter(
153680
153820
  (axis) => axis.axisType === "catAx" || axis.axisType === "dateAx"
153681
153821
  );
153682
- return categoryAxes?.find((axis) => axis.axPos !== "t") ?? categoryAxes?.[0];
153822
+ return categoryAxes2?.find((axis) => axis.axPos !== "t") ?? categoryAxes2?.[0];
153683
153823
  }
153684
153824
  function tickLine(x, y, placement, topAxis, length, axis) {
153685
153825
  if (!placement || placement === "none") {
@@ -154231,7 +154371,7 @@ function buildHorizontalBarViewModel(element, chartData, categoryLabels) {
154231
154371
  strokeWidth: 1
154232
154372
  } : void 0, primitives = [], dataLabels = [], showLabels = chartData.style?.hasDataLabels, band = layout.plotHeight / catCount;
154233
154373
  if (!isStacked) {
154234
- const seriesCount = Math.max(series.length, 1), singleBarHeight = chartData.barGapWidth !== void 0 ? band / (seriesCount + Math.max(chartData.barGapWidth, 0) / 100) : band * 0.7 / seriesCount, overlap = chartData.barOverlap ?? 0, step = singleBarHeight * (1 - overlap / 100), clusterHeight = singleBarHeight + step * (seriesCount - 1), groupOffset = (band - clusterHeight) / 2;
154374
+ const seriesCount = Math.max(series.length, 1), overlap = chartData.barOverlap ?? 0, overlapSpan = 1 + (seriesCount - 1) * (1 - overlap / 100), singleBarHeight = chartData.barGapWidth !== void 0 ? band / ((1 + Math.max(chartData.barGapWidth, 0) / 100) * overlapSpan) : band * 0.7 / seriesCount, step = singleBarHeight * (1 - overlap / 100), clusterHeight = singleBarHeight + step * (seriesCount - 1), groupOffset = (band - clusterHeight) / 2;
154235
154375
  for (let ci = 0; ci < catCount; ci++) {
154236
154376
  for (let si = 0; si < series.length; si++) {
154237
154377
  const val2 = series[si].values[ci] ?? 0, y = layout.plotTop + band * ci + groupOffset + step * si, valX = valueToX(val2, range, layout.plotLeft, layout.plotRight), x = Math.min(zeroX, valX), w = Math.max(Math.abs(valX - zeroX), 1);
@@ -154860,7 +155000,8 @@ function buildCartesianViewModel(element, chartData, categoryLabels, kind) {
154860
155000
  layout.svgWidth,
154861
155001
  legendPos,
154862
155002
  layout.svgHeight,
154863
- layout.plotTop
155003
+ layout.plotTop,
155004
+ resolveLegendSwatchKind(kind)
154864
155005
  );
154865
155006
  let plot;
154866
155007
  if (kind === "bar") {
@@ -155149,13 +155290,17 @@ function buildComboViewModel(element, chartData, categoryLabels) {
155149
155290
  );
155150
155291
  const sourceIndices2 = horizontalAxis.sourceIndices;
155151
155292
  const legendPos = chartData.style?.legendPosition ?? "b";
155293
+ const comboSwatchKinds = chartData.series.map(
155294
+ (_s, i2) => i2 === 0 ? "rect" : "line"
155295
+ );
155152
155296
  const { legend, legendX, legendY, legendAnchor } = buildLegend(
155153
155297
  chartData.series,
155154
155298
  chartData.colorPalette,
155155
155299
  layout.svgWidth,
155156
155300
  legendPos,
155157
155301
  layout.svgHeight,
155158
- layout.plotTop
155302
+ layout.plotTop,
155303
+ comboSwatchKinds
155159
155304
  );
155160
155305
  const primitives = [];
155161
155306
  const dataLabels = [];
@@ -157408,6 +157553,10 @@ function categoryAxisBand(chartData) {
157408
157553
  function computePlotLayout(elementWidth, elementHeight, chartData, hasAxes, options) {
157409
157554
  const svgWidth = Math.max(1, elementWidth), svgHeight = Math.max(1, elementHeight);
157410
157555
  let plotLeft = hasAxes ? 48 : 8, plotTop = 8, plotRight = svgWidth - 8, plotBottom = svgHeight - (hasAxes ? categoryAxisBand(chartData) : 8);
157556
+ if (hasAxes && options?.categoryAxisAtTop) {
157557
+ plotBottom = svgHeight - 8;
157558
+ plotTop += categoryAxisBand(chartData);
157559
+ }
157411
157560
  const style = chartData.style, legendPos = style?.legendPosition ?? "b";
157412
157561
  if (style?.hasTitle) {
157413
157562
  plotTop += 20;
@@ -157457,101 +157606,6 @@ function computePlotLayout(elementWidth, elementHeight, chartData, hasAxes, opti
157457
157606
  plotHeight
157458
157607
  };
157459
157608
  }
157460
- var GRIDLINE_COLOR = "#e2e8f0";
157461
- var AXIS_LABEL_COLOR = "#64748b";
157462
- var ZERO_LINE_COLOR = "#94a3b8";
157463
- var TICK_COUNT = 5;
157464
- function axisTickValues(range) {
157465
- const unit = range.majorUnit;
157466
- if (unit !== void 0 && Number.isFinite(unit) && unit > 0 && !range.logScale) {
157467
- const steps = Math.round((range.max - range.min) / unit);
157468
- if (steps >= 1 && steps <= 100) {
157469
- return Array.from({ length: steps + 1 }, (_unused, index) => range.min + unit * index);
157470
- }
157471
- }
157472
- return Array.from(
157473
- { length: TICK_COUNT + 1 },
157474
- (_unused, index) => range.min + range.span / TICK_COUNT * index
157475
- );
157476
- }
157477
- function buildGridlinesAndLabels(range, layout, showMajorGridlines = true) {
157478
- const gridlines = [], axisLabels = [];
157479
- for (const val2 of axisTickValues(range)) {
157480
- const y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
157481
- if (showMajorGridlines) {
157482
- gridlines.push({
157483
- kind: "line",
157484
- x1: layout.plotLeft,
157485
- y1: y,
157486
- x2: layout.plotRight,
157487
- y2: y,
157488
- stroke: GRIDLINE_COLOR,
157489
- strokeWidth: 1
157490
- });
157491
- }
157492
- axisLabels.push({
157493
- kind: "text",
157494
- x: layout.plotLeft - 4,
157495
- y,
157496
- text: formatAxisValue2(val2),
157497
- fontSize: DEFAULT_CHART_TEXT_PX,
157498
- fill: AXIS_LABEL_COLOR,
157499
- textAnchor: "end",
157500
- dominantBaseline: "central"
157501
- });
157502
- }
157503
- return { gridlines, axisLabels };
157504
- }
157505
- function buildZeroLine(range, layout) {
157506
- if (range.min >= 0 || range.max <= 0) {
157507
- return void 0;
157508
- }
157509
- const y = valueToY2(0, range, layout.plotTop, layout.plotBottom);
157510
- return {
157511
- kind: "line",
157512
- x1: layout.plotLeft,
157513
- y1: y,
157514
- x2: layout.plotRight,
157515
- y2: y,
157516
- stroke: ZERO_LINE_COLOR,
157517
- strokeWidth: 1
157518
- };
157519
- }
157520
- function buildCategoryLabels(categoryLabels, layout, catSpacing) {
157521
- const catCount = Math.max(categoryLabels.length, 1);
157522
- return categoryLabels.map((label, i2) => {
157523
- const x = catSpacing === "bar" ? layout.plotLeft + layout.plotWidth / catCount * (i2 + 0.5) : catCount > 1 ? layout.plotLeft + layout.plotWidth / (catCount - 1) * i2 : layout.plotLeft + layout.plotWidth / 2;
157524
- return {
157525
- kind: "text",
157526
- x,
157527
- y: layout.plotBottom + 12,
157528
- text: label,
157529
- fontSize: DEFAULT_CHART_TEXT_PX,
157530
- fill: AXIS_LABEL_COLOR,
157531
- textAnchor: "middle"
157532
- };
157533
- });
157534
- }
157535
- function buildLegend(series, colorPalette, svgWidth, legendPos, svgHeight, plotTop) {
157536
- const legend = series.map((s, i2) => ({
157537
- color: seriesColor2(s, i2, colorPalette),
157538
- label: s.name
157539
- }));
157540
- let legendX = svgWidth / 2, legendY = svgHeight - 8, legendAnchor = "middle";
157541
- const side = resolveLegendPlacement(legendPos).side;
157542
- if (side === "r") {
157543
- legendX = svgWidth - 75;
157544
- legendY = plotTop;
157545
- legendAnchor = "start";
157546
- } else if (side === "l") {
157547
- legendX = 4;
157548
- legendY = plotTop;
157549
- legendAnchor = "start";
157550
- } else if (side === "t") {
157551
- legendY = 28;
157552
- }
157553
- return { legend, legendX, legendY, legendAnchor };
157554
- }
157555
157609
  var RADAR_RINGS = 4;
157556
157610
  var RADAR_RING_COLOR = "#cbd5e1";
157557
157611
  var RADAR_SPOKE_COLOR = "#94a3b8";
@@ -158635,6 +158689,81 @@ function buildFlatViewModel(element, chartData, categoryLabels, kind) {
158635
158689
  }
158636
158690
  return buildCartesianViewModel(element, chartData, categoryLabels, kind);
158637
158691
  }
158692
+ var GRIDLINE_COLOR = "#e2e8f0";
158693
+ var AXIS_LABEL_COLOR = "#64748b";
158694
+ var ZERO_LINE_COLOR = "#94a3b8";
158695
+ var TICK_COUNT = 5;
158696
+ function axisTickValues(range) {
158697
+ const unit = range.majorUnit;
158698
+ if (unit !== void 0 && Number.isFinite(unit) && unit > 0 && !range.logScale) {
158699
+ const steps = Math.round((range.max - range.min) / unit);
158700
+ if (steps >= 1 && steps <= 100) {
158701
+ return Array.from({ length: steps + 1 }, (_unused, index) => range.min + unit * index);
158702
+ }
158703
+ }
158704
+ return Array.from(
158705
+ { length: TICK_COUNT + 1 },
158706
+ (_unused, index) => range.min + range.span / TICK_COUNT * index
158707
+ );
158708
+ }
158709
+ function buildGridlinesAndLabels(range, layout, showMajorGridlines = true) {
158710
+ const gridlines = [], axisLabels = [];
158711
+ for (const val2 of axisTickValues(range)) {
158712
+ const y = valueToY2(val2, range, layout.plotTop, layout.plotBottom);
158713
+ if (showMajorGridlines) {
158714
+ gridlines.push({
158715
+ kind: "line",
158716
+ x1: layout.plotLeft,
158717
+ y1: y,
158718
+ x2: layout.plotRight,
158719
+ y2: y,
158720
+ stroke: GRIDLINE_COLOR,
158721
+ strokeWidth: 1
158722
+ });
158723
+ }
158724
+ axisLabels.push({
158725
+ kind: "text",
158726
+ x: layout.plotLeft - 4,
158727
+ y,
158728
+ text: formatAxisValue2(val2),
158729
+ fontSize: DEFAULT_CHART_TEXT_PX,
158730
+ fill: AXIS_LABEL_COLOR,
158731
+ textAnchor: "end",
158732
+ dominantBaseline: "central"
158733
+ });
158734
+ }
158735
+ return { gridlines, axisLabels };
158736
+ }
158737
+ function buildZeroLine(range, layout) {
158738
+ if (range.min >= 0 || range.max <= 0) {
158739
+ return void 0;
158740
+ }
158741
+ const y = valueToY2(0, range, layout.plotTop, layout.plotBottom);
158742
+ return {
158743
+ kind: "line",
158744
+ x1: layout.plotLeft,
158745
+ y1: y,
158746
+ x2: layout.plotRight,
158747
+ y2: y,
158748
+ stroke: ZERO_LINE_COLOR,
158749
+ strokeWidth: 1
158750
+ };
158751
+ }
158752
+ function buildCategoryLabels(categoryLabels, layout, catSpacing) {
158753
+ const catCount = Math.max(categoryLabels.length, 1);
158754
+ return categoryLabels.map((label, i2) => {
158755
+ const x = catSpacing === "bar" ? layout.plotLeft + layout.plotWidth / catCount * (i2 + 0.5) : catCount > 1 ? layout.plotLeft + layout.plotWidth / (catCount - 1) * i2 : layout.plotLeft + layout.plotWidth / 2;
158756
+ return {
158757
+ kind: "text",
158758
+ x,
158759
+ y: layout.plotBottom + 12,
158760
+ text: label,
158761
+ fontSize: DEFAULT_CHART_TEXT_PX,
158762
+ fill: AXIS_LABEL_COLOR,
158763
+ textAnchor: "middle"
158764
+ };
158765
+ });
158766
+ }
158638
158767
  var GRIDLINE_COLOR2 = "#e2e8f0";
158639
158768
  var SECONDARY_GRID_COLOR = "#e2e8f0";
158640
158769
  var TICK_COUNT2 = 5;
@@ -206700,6 +206829,11 @@ function segmentFrameCount(durationMs, fps) {
206700
206829
  }
206701
206830
  return Math.max(1, Math.ceil(durationMs / (1e3 / fps)));
206702
206831
  }
206832
+ function stopCaptureStream(stream) {
206833
+ for (const track of stream.getTracks()) {
206834
+ track.stop();
206835
+ }
206836
+ }
206703
206837
  var table;
206704
206838
  function getTable() {
206705
206839
  if (table) {
@@ -207837,6 +207971,7 @@ exports.getGroupChildParentFill = getGroupChildParentFill;
207837
207971
  exports.getImageColorWashStyle = getImageColorWashStyle;
207838
207972
  exports.getImageEffectsFilter = getImageEffectsFilter;
207839
207973
  exports.getImageEffectsOpacity = getImageEffectsOpacity;
207974
+ exports.getImageFillCounterTransform = getImageFillCounterTransform;
207840
207975
  exports.getImageFitStyle = getImageFitStyle;
207841
207976
  exports.getImageSvgFilters = getImageSvgFilters;
207842
207977
  exports.getImageTilingStyle = getImageTilingStyle;
@@ -208258,6 +208393,7 @@ exports.splitRunForMetrics = splitRunForMetrics;
208258
208393
  exports.splitWordsForUnderline = splitWordsForUnderline;
208259
208394
  exports.stepPresenterZoom = stepPresenterZoom;
208260
208395
  exports.stopAllPersistentAudio = stopAllPersistentAudio;
208396
+ exports.stopCaptureStream = stopCaptureStream;
208261
208397
  exports.storeAudienceContent = storeAudienceContent;
208262
208398
  exports.stripUnderlineDecoration = stripUnderlineDecoration;
208263
208399
  exports.strokeOutlineViewBox = strokeOutlineViewBox;