@pixerate/editor 0.166.0 → 0.167.0

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 (47) hide show
  1. package/THIRD_PARTY_NOTICES.md +11 -0
  2. package/dist/agent/index.cjs +34 -34
  3. package/dist/agent/index.js +5 -5
  4. package/dist/canvas/index.cjs +6 -6
  5. package/dist/canvas/index.js +2 -2
  6. package/dist/chart/index.cjs +236 -185
  7. package/dist/chart/index.d.cts +1 -0
  8. package/dist/chart/index.d.ts +1 -0
  9. package/dist/chart/index.js +57 -6
  10. package/dist/chart/layout-families.d.cts +8 -0
  11. package/dist/chart/layout-families.d.ts +8 -0
  12. package/dist/chart/maps.d.cts +43 -0
  13. package/dist/chart/maps.d.ts +43 -0
  14. package/dist/chart/spec.d.cts +1 -1
  15. package/dist/chart/spec.d.ts +1 -1
  16. package/dist/chart/types.d.cts +10 -2
  17. package/dist/chart/types.d.ts +10 -2
  18. package/dist/chart-maps/europe.d.cts +7 -0
  19. package/dist/chart-maps/europe.d.ts +7 -0
  20. package/dist/chart-maps/index.cjs +66 -0
  21. package/dist/chart-maps/index.d.cts +1 -0
  22. package/dist/chart-maps/index.d.ts +1 -0
  23. package/dist/chart-maps/index.js +66 -0
  24. package/dist/{chunk-V5L2G22R.cjs → chunk-2F4GAZL5.cjs} +109 -95
  25. package/dist/{chunk-5UNQDC3Q.js → chunk-34UCPHYO.js} +5 -2
  26. package/dist/{chunk-HXOBOHH2.cjs → chunk-E45AIIWY.cjs} +8 -8
  27. package/dist/{chunk-NQQDGGXY.js → chunk-FKYGM35R.js} +2 -2
  28. package/dist/{chunk-6FYIFGBW.cjs → chunk-GD34ICEX.cjs} +16 -16
  29. package/dist/{chunk-MZFZSVUJ.cjs → chunk-GTF4RYXJ.cjs} +25 -22
  30. package/dist/{chunk-ITANXMZD.js → chunk-M52UCHVZ.js} +127 -3
  31. package/dist/{chunk-YUFTVNLX.js → chunk-N3ACT6VJ.js} +16 -2
  32. package/dist/{chunk-XNU45TYA.js → chunk-OLCHKGGO.js} +4 -1
  33. package/dist/{chunk-FR432ROA.js → chunk-ORZF4JOO.js} +23 -4
  34. package/dist/{chunk-BPX4Z3N3.cjs → chunk-OUO3DSRT.cjs} +23 -4
  35. package/dist/{chunk-CHLV7UFP.cjs → chunk-SBAPXFPB.cjs} +51 -51
  36. package/dist/{chunk-VB2CY6EG.js → chunk-T62BRXMS.js} +3 -3
  37. package/dist/{chunk-SZWVMB3B.cjs → chunk-VKHJJUBK.cjs} +21 -18
  38. package/dist/{chunk-UUUTEVX6.cjs → chunk-WOIXNDHV.cjs} +172 -48
  39. package/dist/{chunk-DFCAR7AW.js → chunk-ZUPP4NKM.js} +3 -3
  40. package/dist/export/index.cjs +4 -4
  41. package/dist/export/index.js +3 -3
  42. package/dist/extensions/index.cjs +7 -7
  43. package/dist/extensions/index.js +6 -6
  44. package/dist/index.cjs +13 -13
  45. package/dist/index.js +7 -7
  46. package/package.json +11 -1
  47. package/skills/pixerate-chart/SKILL.md +18 -2
@@ -17,7 +17,7 @@
17
17
 
18
18
 
19
19
 
20
- var _chunkMZFZSVUJcjs = require('../chunk-MZFZSVUJ.cjs');
20
+ var _chunkGTF4RYXJcjs = require('../chunk-GTF4RYXJ.cjs');
21
21
 
22
22
 
23
23
 
@@ -25,7 +25,7 @@ var _chunkMZFZSVUJcjs = require('../chunk-MZFZSVUJ.cjs');
25
25
 
26
26
 
27
27
 
28
- var _chunkSZWVMB3Bcjs = require('../chunk-SZWVMB3B.cjs');
28
+ var _chunkVKHJJUBKcjs = require('../chunk-VKHJJUBK.cjs');
29
29
 
30
30
 
31
31
 
@@ -47,7 +47,7 @@ var _chunkSZWVMB3Bcjs = require('../chunk-SZWVMB3B.cjs');
47
47
 
48
48
 
49
49
 
50
- var _chunkV5L2G22Rcjs = require('../chunk-V5L2G22R.cjs');
50
+ var _chunk2F4GAZL5cjs = require('../chunk-2F4GAZL5.cjs');
51
51
  require('../chunk-TTCJPX4U.cjs');
52
52
 
53
53
 
@@ -91,7 +91,6 @@ require('../chunk-TTCJPX4U.cjs');
91
91
 
92
92
 
93
93
 
94
- var _chunkUUUTEVX6cjs = require('../chunk-UUUTEVX6.cjs');
95
94
 
96
95
 
97
96
 
@@ -99,6 +98,7 @@ var _chunkUUUTEVX6cjs = require('../chunk-UUUTEVX6.cjs');
99
98
 
100
99
 
101
100
 
101
+ var _chunkWOIXNDHVcjs = require('../chunk-WOIXNDHV.cjs');
102
102
 
103
103
 
104
104
 
@@ -185,7 +185,14 @@ var _chunkUUUTEVX6cjs = require('../chunk-UUUTEVX6.cjs');
185
185
 
186
186
 
187
187
 
188
- var _chunkBPX4Z3N3cjs = require('../chunk-BPX4Z3N3.cjs');
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ var _chunkOUO3DSRTcjs = require('../chunk-OUO3DSRT.cjs');
189
196
  require('../chunk-VU6WQSMB.cjs');
190
197
  require('../chunk-55AKPTLM.cjs');
191
198
 
@@ -320,7 +327,7 @@ function chartFileName(spec, extension) {
320
327
  }
321
328
  async function downloadChartPng(spec, options = {}) {
322
329
  const { width = 800, height = 450, filename = chartFileName(spec, "png"), theme, ...raster } = options;
323
- const svg = _chunkV5L2G22Rcjs.chartToSvg.call(void 0, spec, { width, height, theme });
330
+ const svg = _chunk2F4GAZL5cjs.chartToSvg.call(void 0, spec, { width, height, theme });
324
331
  const { url, width: w, height: h } = await svgToPngDataUrl(svg, { ...raster, width, height });
325
332
  const doc = _nullishCoalesce(raster.document, () => ( globalThis.document));
326
333
  const link = doc.createElement("a");
@@ -335,7 +342,7 @@ async function downloadChartPng(spec, options = {}) {
335
342
 
336
343
  // src/chart/recommend.ts
337
344
  var blank = (c) => c === null || c === void 0 || String(c).trim() === "";
338
- var isText = (c) => blank(c) || _chunkBPX4Z3N3cjs.parseChartValue.call(void 0, c) === void 0;
345
+ var isText = (c) => blank(c) || _chunkOUO3DSRTcjs.parseChartValue.call(void 0, c) === void 0;
339
346
  function analyzeChartTable(rows) {
340
347
  const grid = rows.filter((r) => r.some((c) => !blank(c)));
341
348
  const height = grid.length;
@@ -353,7 +360,7 @@ function analyzeChartTable(rows) {
353
360
  let anyPositive = false;
354
361
  for (let r = headerRow ? 1 : 0; r < height; r++)
355
362
  for (let c = labelColumn ? 1 : 0; c < width; c++) {
356
- const v = _chunkBPX4Z3N3cjs.parseChartValue.call(void 0, cell(r, c));
363
+ const v = _chunkOUO3DSRTcjs.parseChartValue.call(void 0, cell(r, c));
357
364
  if (typeof v !== "number") continue;
358
365
  anyNumber = true;
359
366
  if (v < 0) {
@@ -362,7 +369,7 @@ function analyzeChartTable(rows) {
362
369
  } else if (v > 0) anyPositive = true;
363
370
  }
364
371
  const labels = byRows ? _nullishCoalesce(_optionalChain([grid, 'access', _20 => _20[0], 'optionalAccess', _21 => _21.slice, 'call', _22 => _22(labelColumn ? 1 : 0)]), () => ( [])) : grid.slice(headerRow ? 1 : 0).map((r) => r[0]);
365
- const dates = (byRows ? headerRow : labelColumn) && labels.length > 1 && labels.filter((l) => !blank(l) && _chunkUUUTEVX6cjs.parseChartDate.call(void 0, String(l)) !== null).length >= labels.length * 0.8;
372
+ const dates = (byRows ? headerRow : labelColumn) && labels.length > 1 && labels.filter((l) => !blank(l) && _chunkWOIXNDHVcjs.parseChartDate.call(void 0, String(l)) !== null).length >= labels.length * 0.8;
366
373
  return {
367
374
  headerRow,
368
375
  labelColumn,
@@ -454,7 +461,7 @@ function chartFromTable(rows, options = {}) {
454
461
  if (xFromFirst) {
455
462
  table = table.map((r) => [r[1], ...r.slice(2)]);
456
463
  }
457
- const data = _chunkBPX4Z3N3cjs.chartDataFromTable.call(void 0, table, { seriesIn: shape.byRows ? "rows" : "columns", header: true, xFromFirstColumn: xFromFirst });
464
+ const data = _chunkOUO3DSRTcjs.chartDataFromTable.call(void 0, table, { seriesIn: shape.byRows ? "rows" : "columns", header: true, xFromFirstColumn: xFromFirst });
458
465
  return { type, stacking, categories: data.categories, series: data.series, issues: data.issues, shape };
459
466
  }
460
467
 
@@ -496,10 +503,10 @@ function createChartCommands(controller, options = {}) {
496
503
  readOnly: true,
497
504
  keywords: ["chart", "data", "spec", "get", "summary"],
498
505
  description: "Returns the chart spec, its data as a table (series names in the header row) and a summary: per-series min / max / mean / trend, axes as drawn, layout warnings and a colour check.",
499
- params: object({ width: _chunkMZFZSVUJcjs.WIDTH, height: _chunkMZFZSVUJcjs.HEIGHT }),
506
+ params: object({ width: _chunkGTF4RYXJcjs.WIDTH, height: _chunkGTF4RYXJcjs.HEIGHT }),
500
507
  run: (_ctx, params = {}) => {
501
508
  const spec = controller.getSpec();
502
- return { spec: controller.toJSON(), table: _chunkBPX4Z3N3cjs.chartDataToTable.call(void 0, spec), summary: _chunkV5L2G22Rcjs.summarizeChart.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _25 => _25.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _26 => _26.height]), () => ( 400)) }), issues: controller.getState().issues };
509
+ return { spec: controller.toJSON(), table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, spec), summary: _chunk2F4GAZL5cjs.summarizeChart.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _25 => _25.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _26 => _26.height]), () => ( 400)) }), issues: controller.getState().issues };
503
510
  }
504
511
  },
505
512
  {
@@ -508,7 +515,7 @@ function createChartCommands(controller, options = {}) {
508
515
  label: "Change Chart\u2026",
509
516
  keywords: ["chart", "title", "axis", "legend", "stack", "style", "format", "type"],
510
517
  description: 'Changes chart presentation as one undo step: type, titles, axes (xAxis = categories, yAxis = values, yAxis2 = secondary values; reverse, and scale "log" on value axes), legend, stacking, orientation, curve, points, data labels, palette, donut hole, bar spacing, histogram bins, waterfall total, or radar rings and grid shape, note, highlight, reference lines and bands, or colour by category (varyColors). Invalid values change nothing and return why.',
511
- params: object(_chunkMZFZSVUJcjs.CHART_UPDATE_PROPERTIES),
518
+ params: object(_chunkGTF4RYXJcjs.CHART_UPDATE_PROPERTIES),
512
519
  run: (_ctx, params) => {
513
520
  check(controller.update(params));
514
521
  return { spec: controller.toJSON() };
@@ -522,11 +529,11 @@ function createChartCommands(controller, options = {}) {
522
529
  description: "Replaces the categories and series as one undo step. Each series has one value per category (padded with gaps).",
523
530
  params: object({
524
531
  categories: { type: "array", items: { type: "string" }, description: "Category labels in order." },
525
- series: { type: "array", description: "The new series.", items: object({ id: { type: "string", description: "Stable id (optional)." }, ..._chunkMZFZSVUJcjs.SERIES_PROPS }, ["name", "values"]) }
532
+ series: { type: "array", description: "The new series.", items: object({ id: { type: "string", description: "Stable id (optional)." }, ..._chunkGTF4RYXJcjs.SERIES_PROPS }, ["name", "values"]) }
526
533
  }),
527
534
  run: (_ctx, params) => {
528
535
  check(controller.setData(params));
529
- return { table: _chunkBPX4Z3N3cjs.chartDataToTable.call(void 0, controller.getSpec()) };
536
+ return { table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()) };
530
537
  }
531
538
  },
532
539
  {
@@ -535,10 +542,10 @@ function createChartCommands(controller, options = {}) {
535
542
  label: "Set Chart Values\u2026",
536
543
  keywords: ["chart", "value", "cell", "edit"],
537
544
  description: "Sets individual values as one undo step. Series by id or name; category by index or label.",
538
- params: object({ cells: { type: "array", minItems: 1, description: "Values to set.", items: object({ series: _chunkMZFZSVUJcjs.SERIES_REF, category: _chunkMZFZSVUJcjs.CATEGORY_REF, value: _chunkMZFZSVUJcjs.VALUE }, ["series", "category", "value"]) } }, ["cells"]),
545
+ params: object({ cells: { type: "array", minItems: 1, description: "Values to set.", items: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, category: _chunkGTF4RYXJcjs.CATEGORY_REF, value: _chunkGTF4RYXJcjs.VALUE }, ["series", "category", "value"]) } }, ["cells"]),
539
546
  run: (_ctx, params) => {
540
547
  check(controller.setValues(params.cells.map((c) => ({ seriesId: resolveSeries(c.series).id, index: resolveCategory(c.category), value: c.value }))));
541
- return { table: _chunkBPX4Z3N3cjs.chartDataToTable.call(void 0, controller.getSpec()) };
548
+ return { table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()) };
542
549
  }
543
550
  },
544
551
  {
@@ -547,7 +554,7 @@ function createChartCommands(controller, options = {}) {
547
554
  label: "Add Series",
548
555
  keywords: ["chart", "series", "new"],
549
556
  description: "Adds a series (default: an empty one at the end). Returns its id.",
550
- params: object({ ..._chunkMZFZSVUJcjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } }),
557
+ params: object({ ..._chunkGTF4RYXJcjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } }),
551
558
  run: (_ctx, params = {}) => {
552
559
  const { at, ...input } = _nullishCoalesce(params, () => ( {}));
553
560
  const clean = Object.fromEntries(Object.entries(input).filter(([, v]) => v !== null));
@@ -562,7 +569,7 @@ function createChartCommands(controller, options = {}) {
562
569
  label: "Change Series\u2026",
563
570
  keywords: ["chart", "series", "rename", "colour", "color", "hide", "axis", "marker"],
564
571
  description: "Renames, recolours, hides, moves to the secondary axis or changes how a series is drawn, including error bars (null resets a field).",
565
- params: object({ series: _chunkMZFZSVUJcjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkMZFZSVUJcjs.SERIES_PROPS).filter(([k]) => k !== "values")) }, ["series"]),
572
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkGTF4RYXJcjs.SERIES_PROPS).filter(([k]) => k !== "values")) }, ["series"]),
566
573
  run: (_ctx, params) => {
567
574
  const { series, ...patch } = params;
568
575
  const id = resolveSeries(series).id;
@@ -576,7 +583,7 @@ function createChartCommands(controller, options = {}) {
576
583
  label: "Delete Series",
577
584
  keywords: ["chart", "series", "remove"],
578
585
  description: "Deletes a series by id or name.",
579
- params: object({ series: _chunkMZFZSVUJcjs.SERIES_REF }, ["series"]),
586
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF }, ["series"]),
580
587
  run: (_ctx, params) => {
581
588
  check(controller.removeSeries(resolveSeries(params.series).id));
582
589
  return { series: seriesIds() };
@@ -601,7 +608,7 @@ function createChartCommands(controller, options = {}) {
601
608
  label: "Delete Category",
602
609
  keywords: ["chart", "category", "row", "remove"],
603
610
  description: "Deletes a category (and its values) by index or label.",
604
- params: object({ category: _chunkMZFZSVUJcjs.CATEGORY_REF }, ["category"]),
611
+ params: object({ category: _chunkGTF4RYXJcjs.CATEGORY_REF }, ["category"]),
605
612
  run: (_ctx, params) => {
606
613
  check(controller.removeCategory(resolveCategory(params.category)));
607
614
  return { categories: controller.getSpec().categories };
@@ -613,7 +620,7 @@ function createChartCommands(controller, options = {}) {
613
620
  label: "Add Trendline\u2026",
614
621
  keywords: ["chart", "trend", "regression", "fit", "forecast", "moving average"],
615
622
  description: "Fits a trendline to a series (linear, exponential, logarithmic, power, polynomial or moving average). Returns its index and the fit.",
616
- params: object({ series: _chunkMZFZSVUJcjs.SERIES_REF, ..._chunkMZFZSVUJcjs.TRENDLINE_PROPS }, ["series", "type"]),
623
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, ..._chunkGTF4RYXJcjs.TRENDLINE_PROPS }, ["series", "type"]),
617
624
  run: (_ctx, params) => {
618
625
  const { series, ...line } = params;
619
626
  const result = controller.addTrendline(resolveSeries(series).id, line);
@@ -628,7 +635,7 @@ function createChartCommands(controller, options = {}) {
628
635
  label: "Delete Trendline",
629
636
  keywords: ["chart", "trend", "remove"],
630
637
  description: "Deletes a trendline from a series.",
631
- params: object({ series: _chunkMZFZSVUJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index (0 = first)." } }, ["series", "index"]),
638
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index (0 = first)." } }, ["series", "index"]),
632
639
  run: (_ctx, params) => {
633
640
  check(controller.removeTrendline(resolveSeries(params.series).id, params.index));
634
641
  return { trendlines: _nullishCoalesce(_optionalChain([controller, 'access', _29 => _29.getSeries, 'call', _30 => _30(resolveSeries(params.series).id), 'optionalAccess', _31 => _31.trendlines]), () => ( [])) };
@@ -640,7 +647,7 @@ function createChartCommands(controller, options = {}) {
640
647
  label: "Add Reference Line\u2026",
641
648
  keywords: ["chart", "target", "goal", "threshold", "average", "reference", "line", "annotation"],
642
649
  description: "Draws a dashed line across the plot at one value (a target, floor or average). Returns its index.",
643
- params: object(_chunkMZFZSVUJcjs.REFERENCE_LINE_PROPS, ["value"]),
650
+ params: object(_chunkGTF4RYXJcjs.REFERENCE_LINE_PROPS, ["value"]),
644
651
  run: (_ctx, params) => {
645
652
  const result = controller.addReferenceLine(params);
646
653
  check(result);
@@ -653,7 +660,7 @@ function createChartCommands(controller, options = {}) {
653
660
  label: "Change Reference Line\u2026",
654
661
  keywords: ["chart", "target", "reference", "line", "annotation"],
655
662
  description: "Changes a reference line by index; label, axis and color take null to remove them.",
656
- params: object({ index: _chunkMZFZSVUJcjs.REFERENCE_INDEX.call(void 0, "Reference line"), ..._chunkMZFZSVUJcjs.REFERENCE_LINE_PATCH }, ["index"]),
663
+ params: object({ index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, "Reference line"), ..._chunkGTF4RYXJcjs.REFERENCE_LINE_PATCH }, ["index"]),
657
664
  run: (_ctx, params) => {
658
665
  const { index, ...patch } = params;
659
666
  check(controller.updateReferenceLine(index, patch));
@@ -666,7 +673,7 @@ function createChartCommands(controller, options = {}) {
666
673
  label: "Delete Reference Line",
667
674
  keywords: ["chart", "target", "reference", "line", "remove"],
668
675
  description: "Deletes a reference line by index.",
669
- params: object({ index: _chunkMZFZSVUJcjs.REFERENCE_INDEX.call(void 0, "Reference line") }, ["index"]),
676
+ params: object({ index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, "Reference line") }, ["index"]),
670
677
  run: (_ctx, params) => {
671
678
  check(controller.removeReferenceLine(params.index));
672
679
  return { referenceLines: controller.getSpec().referenceLines };
@@ -678,7 +685,7 @@ function createChartCommands(controller, options = {}) {
678
685
  label: "Add Reference Band\u2026",
679
686
  keywords: ["chart", "target", "range", "band", "reference", "shade", "annotation"],
680
687
  description: "Shades a band across the plot between two values (a target or normal range). Returns its index.",
681
- params: object(_chunkMZFZSVUJcjs.REFERENCE_BAND_PROPS, ["from", "to"]),
688
+ params: object(_chunkGTF4RYXJcjs.REFERENCE_BAND_PROPS, ["from", "to"]),
682
689
  run: (_ctx, params) => {
683
690
  const result = controller.addReferenceBand(params);
684
691
  check(result);
@@ -691,7 +698,7 @@ function createChartCommands(controller, options = {}) {
691
698
  label: "Change Reference Band\u2026",
692
699
  keywords: ["chart", "range", "band", "reference", "annotation"],
693
700
  description: "Changes a reference band by index; label, axis and color take null to remove them.",
694
- params: object({ index: _chunkMZFZSVUJcjs.REFERENCE_INDEX.call(void 0, "Reference band"), ..._chunkMZFZSVUJcjs.REFERENCE_BAND_PATCH }, ["index"]),
701
+ params: object({ index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, "Reference band"), ..._chunkGTF4RYXJcjs.REFERENCE_BAND_PATCH }, ["index"]),
695
702
  run: (_ctx, params) => {
696
703
  const { index, ...patch } = params;
697
704
  check(controller.updateReferenceBand(index, patch));
@@ -704,7 +711,7 @@ function createChartCommands(controller, options = {}) {
704
711
  label: "Delete Reference Band",
705
712
  keywords: ["chart", "range", "band", "reference", "remove"],
706
713
  description: "Deletes a reference band by index.",
707
- params: object({ index: _chunkMZFZSVUJcjs.REFERENCE_INDEX.call(void 0, "Reference band") }, ["index"]),
714
+ params: object({ index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, "Reference band") }, ["index"]),
708
715
  run: (_ctx, params) => {
709
716
  check(controller.removeReferenceBand(params.index));
710
717
  return { referenceBands: controller.getSpec().referenceBands };
@@ -716,7 +723,7 @@ function createChartCommands(controller, options = {}) {
716
723
  label: "Pin Label to Point\u2026",
717
724
  keywords: ["chart", "callout", "annotation", "label", "note", "point"],
718
725
  description: 'Pins a short label to one bar or point (label null or "" removes it).',
719
- params: object({ series: _chunkMZFZSVUJcjs.SERIES_REF, category: _chunkMZFZSVUJcjs.CATEGORY_REF, label: { type: ["string", "null"], description: "The label (a few words), or null to remove it." } }, ["series", "category", "label"]),
726
+ params: object({ series: _chunkGTF4RYXJcjs.SERIES_REF, category: _chunkGTF4RYXJcjs.CATEGORY_REF, label: { type: ["string", "null"], description: "The label (a few words), or null to remove it." } }, ["series", "category", "label"]),
720
727
  run: (_ctx, params) => {
721
728
  const series = resolveSeries(params.series);
722
729
  const index = resolveCategory(params.category);
@@ -744,10 +751,10 @@ function createChartCommands(controller, options = {}) {
744
751
  label: "Replace Grouped Data\u2026",
745
752
  keywords: ["chart", "tree", "hierarchy", "groups", "treemap", "sunburst", "nested"],
746
753
  description: "Replaces the data with groups of items (a tree) for treemaps and sunbursts; [] goes back to plain data.",
747
- params: { type: "object", properties: { tree: { type: "array", items: { $ref: "#/$defs/chartTreeNode" }, description: "The top-level nodes; [] removes the grouping." } }, required: ["tree"], additionalProperties: false, $defs: _chunkMZFZSVUJcjs.TREE_DEFS },
754
+ params: { type: "object", properties: { tree: { type: "array", items: { $ref: "#/$defs/chartTreeNode" }, description: "The top-level nodes; [] removes the grouping." } }, required: ["tree"], additionalProperties: false, $defs: _chunkGTF4RYXJcjs.TREE_DEFS },
748
755
  run: (_ctx, params) => {
749
756
  check(controller.setTree(params.tree));
750
- return { groups: controller.getSpec().tree.map((n) => ({ name: n.name, total: _chunkBPX4Z3N3cjs.chartTreeTotal.call(void 0, n) })) };
757
+ return { groups: controller.getSpec().tree.map((n) => ({ name: n.name, total: _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, n) })) };
751
758
  }
752
759
  },
753
760
  {
@@ -783,7 +790,7 @@ function createChartCommands(controller, options = {}) {
783
790
  },
784
791
  required: ["node"],
785
792
  additionalProperties: false,
786
- $defs: _chunkMZFZSVUJcjs.TREE_DEFS
793
+ $defs: _chunkGTF4RYXJcjs.TREE_DEFS
787
794
  },
788
795
  run: (_ctx, params) => {
789
796
  const result = controller.addTreeNode(_nullishCoalesce(params.parent, () => ( [])), params.node, { at: params.at });
@@ -799,7 +806,7 @@ function createChartCommands(controller, options = {}) {
799
806
  description: "Renames a node, sets an item's value or sets a node's colour (null for the palette).",
800
807
  params: object(
801
808
  {
802
- path: _chunkMZFZSVUJcjs.TREE_PATH,
809
+ path: _chunkGTF4RYXJcjs.TREE_PATH,
803
810
  name: { type: "string", description: "New name." },
804
811
  value: { type: "number", minimum: 0, description: "Items only: the new amount." },
805
812
  color: { type: ["string", "null"], description: "CSS colour, or null for the palette colour." }
@@ -819,10 +826,10 @@ function createChartCommands(controller, options = {}) {
819
826
  label: "Delete Item or Group",
820
827
  keywords: ["chart", "tree", "group", "item", "remove", "delete"],
821
828
  description: "Deletes a node of the grouped data with everything under it.",
822
- params: object({ path: _chunkMZFZSVUJcjs.TREE_PATH }, ["path"]),
829
+ params: object({ path: _chunkGTF4RYXJcjs.TREE_PATH }, ["path"]),
823
830
  run: (_ctx, params) => {
824
831
  check(controller.removeTreeNode(params.path));
825
- return { groups: controller.getSpec().tree.map((n) => ({ name: n.name, total: _chunkBPX4Z3N3cjs.chartTreeTotal.call(void 0, n) })) };
832
+ return { groups: controller.getSpec().tree.map((n) => ({ name: n.name, total: _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, n) })) };
826
833
  }
827
834
  },
828
835
  {
@@ -833,7 +840,7 @@ function createChartCommands(controller, options = {}) {
833
840
  description: "Replaces the data with flows between named nodes for a Sankey diagram; [] goes back to plain data.",
834
841
  params: object(
835
842
  {
836
- links: { type: "array", items: { type: "object", properties: _chunkMZFZSVUJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false }, description: "All the flows; [] removes them." },
843
+ links: { type: "array", items: { type: "object", properties: _chunkGTF4RYXJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false }, description: "All the flows; [] removes them." },
837
844
  nodes: { type: "array", items: { type: "string" }, description: "Node names in stacking order." }
838
845
  },
839
846
  ["links"]
@@ -867,7 +874,7 @@ function createChartCommands(controller, options = {}) {
867
874
  label: "Add Flow\u2026",
868
875
  keywords: ["chart", "sankey", "flow", "link", "add"],
869
876
  description: "Adds a flow between two nodes. Returns its index.",
870
- params: object(_chunkMZFZSVUJcjs.LINK_PROPS, ["source", "target", "value"]),
877
+ params: object(_chunkGTF4RYXJcjs.LINK_PROPS, ["source", "target", "value"]),
871
878
  run: (_ctx, params) => {
872
879
  const result = controller.addLink(params);
873
880
  check(result);
@@ -880,7 +887,7 @@ function createChartCommands(controller, options = {}) {
880
887
  label: "Change Flow\u2026",
881
888
  keywords: ["chart", "sankey", "flow", "link", "value"],
882
889
  description: "Changes a flow by index (color null for the default).",
883
- params: object({ index: _chunkMZFZSVUJcjs.LINK_INDEX, ..._chunkMZFZSVUJcjs.LINK_PROPS, color: { type: ["string", "null"], description: "CSS colour, or null for the default." } }, ["index"]),
890
+ params: object({ index: _chunkGTF4RYXJcjs.LINK_INDEX, ..._chunkGTF4RYXJcjs.LINK_PROPS, color: { type: ["string", "null"], description: "CSS colour, or null for the default." } }, ["index"]),
884
891
  run: (_ctx, params) => {
885
892
  const { index, ...patch } = params;
886
893
  check(controller.updateLink(index, patch));
@@ -893,12 +900,28 @@ function createChartCommands(controller, options = {}) {
893
900
  label: "Delete Flow",
894
901
  keywords: ["chart", "sankey", "flow", "link", "remove"],
895
902
  description: "Deletes a flow by index.",
896
- params: object({ index: _chunkMZFZSVUJcjs.LINK_INDEX }, ["index"]),
903
+ params: object({ index: _chunkGTF4RYXJcjs.LINK_INDEX }, ["index"]),
897
904
  run: (_ctx, params) => {
898
905
  check(controller.removeLink(params.index));
899
906
  return { links: controller.getSpec().links };
900
907
  }
901
908
  },
909
+ {
910
+ ...base,
911
+ id: `${prefix}mapRegions`,
912
+ label: "Map Regions",
913
+ readOnly: true,
914
+ keywords: ["chart", "map", "choropleth", "regions", "countries", "codes"],
915
+ description: "Lists the regions of the chart's map (or another registered map) and which categories match none.",
916
+ params: object({ map: { type: "string", description: "Map id (default: the chart's map)." } }),
917
+ run: (_ctx, params = {}) => {
918
+ const id = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _36 => _36.map]), () => ( controller.getSpec().map));
919
+ const geometry = _chunkWOIXNDHVcjs.getChartMap.call(void 0, id);
920
+ if (!geometry) fail(`There is no map "${id}"; register it with registerChartMap.`);
921
+ const matches = _chunkWOIXNDHVcjs.matchChartMapRegions.call(void 0, geometry, controller.getSpec().categories);
922
+ return { regions: geometry.regions.map((r) => ({ id: r.id, name: r.name })), unmatched: controller.getSpec().categories.filter((_, i) => !matches[i]) };
923
+ }
924
+ },
902
925
  {
903
926
  ...base,
904
927
  id: `${prefix}raceRanking`,
@@ -906,11 +929,11 @@ function createChartCommands(controller, options = {}) {
906
929
  readOnly: true,
907
930
  keywords: ["chart", "race", "ranking", "leader", "time"],
908
931
  description: "Returns the top names of a bar race at a moment (default: the one shown).",
909
- params: object({ time: _chunkMZFZSVUJcjs.RACE_TIME }),
932
+ params: object({ time: _chunkGTF4RYXJcjs.RACE_TIME }),
910
933
  run: (_ctx, params = {}) => {
911
934
  const spec = controller.getSpec();
912
- const frame = _optionalChain([params, 'optionalAccess', _36 => _36.time]) !== void 0 ? raceFrame(params.time) : _nullishCoalesce(controller.getState().raceFrame, () => ( spec.categories.length - 1));
913
- return { frame, ranking: _chunkUUUTEVX6cjs.chartRaceRanking.call(void 0, spec, frame).slice(0, spec.raceTopN).map((e) => ({ rank: e.rank + 1, series: e.seriesId, name: e.name, value: e.value })) };
935
+ const frame = _optionalChain([params, 'optionalAccess', _37 => _37.time]) !== void 0 ? raceFrame(params.time) : _nullishCoalesce(controller.getState().raceFrame, () => ( spec.categories.length - 1));
936
+ return { frame, ranking: _chunkWOIXNDHVcjs.chartRaceRanking.call(void 0, spec, frame).slice(0, spec.raceTopN).map((e) => ({ rank: e.rank + 1, series: e.seriesId, name: e.name, value: e.value })) };
914
937
  }
915
938
  },
916
939
  {
@@ -919,7 +942,7 @@ function createChartCommands(controller, options = {}) {
919
942
  label: "Show Bar Race Moment\u2026",
920
943
  keywords: ["chart", "race", "frame", "time", "scrub"],
921
944
  description: "Shows the bar race at a time point (null for the last) and stops playback. View state, not an undo step.",
922
- params: object({ time: { ..._chunkMZFZSVUJcjs.RACE_TIME, type: ["string", "number", "null"], description: `${_chunkMZFZSVUJcjs.RACE_TIME.description} null shows the last time point.` } }, ["time"]),
945
+ params: object({ time: { ..._chunkGTF4RYXJcjs.RACE_TIME, type: ["string", "number", "null"], description: `${_chunkGTF4RYXJcjs.RACE_TIME.description} null shows the last time point.` } }, ["time"]),
923
946
  run: (_ctx, params) => {
924
947
  const frame = params.time === null ? null : raceFrame(params.time);
925
948
  check(controller.setRaceFrame(frame));
@@ -934,7 +957,7 @@ function createChartCommands(controller, options = {}) {
934
957
  description: "Plays the bar race from the moment shown, one time point every msPerStep ms.",
935
958
  params: object({ msPerStep: { type: "number", minimum: 50, maximum: 1e4, description: "Milliseconds per time point (default 1000)." } }),
936
959
  run: (_ctx, params = {}) => {
937
- check(controller.playRace({ msPerStep: _optionalChain([params, 'optionalAccess', _37 => _37.msPerStep]) }));
960
+ check(controller.playRace({ msPerStep: _optionalChain([params, 'optionalAccess', _38 => _38.msPerStep]) }));
938
961
  return { playing: true };
939
962
  }
940
963
  },
@@ -957,8 +980,8 @@ function createChartCommands(controller, options = {}) {
957
980
  keywords: ["chart", "quick layout", "style", "colours", "colors", "monochrome", "theme"],
958
981
  description: "Applies a quick layout and / or colour scheme as one undo step.",
959
982
  params: object({
960
- layout: { type: "string", enum: _chunkV5L2G22Rcjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
961
- colors: { type: "string", enum: _chunkV5L2G22Rcjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
983
+ layout: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
984
+ colors: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
962
985
  }),
963
986
  run: (_ctx, params = {}) => {
964
987
  check(controller.applyPreset(_nullishCoalesce(params, () => ( {}))));
@@ -973,7 +996,7 @@ function createChartCommands(controller, options = {}) {
973
996
  description: "Swaps series and categories as one undo step.",
974
997
  run: () => {
975
998
  check(controller.transpose());
976
- return { table: _chunkBPX4Z3N3cjs.chartDataToTable.call(void 0, controller.getSpec()) };
999
+ return { table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()) };
977
1000
  }
978
1001
  },
979
1002
  {
@@ -993,7 +1016,7 @@ function createChartCommands(controller, options = {}) {
993
1016
  run: (_ctx, params) => {
994
1017
  const result = controller.importCsv(params.csv, { seriesIn: params.seriesIn, header: params.header });
995
1018
  check(result);
996
- return { table: _chunkBPX4Z3N3cjs.chartDataToTable.call(void 0, controller.getSpec()), issues: _nullishCoalesce(result.issues, () => ( [])) };
1019
+ return { table: _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()), issues: _nullishCoalesce(result.issues, () => ( [])) };
997
1020
  }
998
1021
  },
999
1022
  {
@@ -1004,7 +1027,7 @@ function createChartCommands(controller, options = {}) {
1004
1027
  description: "Replaces the chart with Mermaid xychart-beta, pie, radar-beta, sankey-beta or treemap-beta text (one undo step). Unreadable lines are listed with line numbers.",
1005
1028
  params: object({ mermaid: { type: "string", description: "Mermaid text." } }, ["mermaid"]),
1006
1029
  run: (_ctx, params) => {
1007
- const read = _chunkV5L2G22Rcjs.chartFromMermaid.call(void 0, params.mermaid);
1030
+ const read = _chunk2F4GAZL5cjs.chartFromMermaid.call(void 0, params.mermaid);
1008
1031
  if (!read.family) fail(read.issues.map((i) => i.message).join(" ") || "Expected Mermaid starting with xychart-beta, pie, radar-beta, sankey-beta or treemap-beta.");
1009
1032
  check(controller.update({ ...read.spec }, { label: "Import Mermaid chart" }));
1010
1033
  return { spec: controller.toJSON(), issues: read.issues };
@@ -1018,7 +1041,7 @@ function createChartCommands(controller, options = {}) {
1018
1041
  keywords: ["chart", "mermaid", "markdown", "export"],
1019
1042
  description: "Returns the chart as Mermaid text (with a round-trip comment unless meta is false).",
1020
1043
  params: object({ meta: { type: "boolean", description: "Include the %% @pixerate round-trip comment (default true)." } }),
1021
- run: (_ctx, params = {}) => ({ mermaid: _chunkV5L2G22Rcjs.chartToMermaid.call(void 0, controller.toJSON(), { meta: _optionalChain([params, 'optionalAccess', _38 => _38.meta]) }) })
1044
+ run: (_ctx, params = {}) => ({ mermaid: _chunk2F4GAZL5cjs.chartToMermaid.call(void 0, controller.toJSON(), { meta: _optionalChain([params, 'optionalAccess', _39 => _39.meta]) }) })
1022
1045
  },
1023
1046
  {
1024
1047
  ...base,
@@ -1027,7 +1050,7 @@ function createChartCommands(controller, options = {}) {
1027
1050
  readOnly: true,
1028
1051
  keywords: ["chart", "office", "word", "powerpoint", "docx", "pptx", "xml", "export"],
1029
1052
  description: "Returns the chart as a DrawingML chart part (c:chartSpace) and what could not be written.",
1030
- run: () => _chunkSZWVMB3Bcjs.chartToOoxml.call(void 0, controller.toJSON())
1053
+ run: () => _chunkVKHJJUBKcjs.chartToOoxml.call(void 0, controller.toJSON())
1031
1054
  },
1032
1055
  {
1033
1056
  ...base,
@@ -1036,9 +1059,9 @@ function createChartCommands(controller, options = {}) {
1036
1059
  readOnly: true,
1037
1060
  keywords: ["chart", "svg", "export", "image"],
1038
1061
  description: "Returns the chart drawn as a standalone, accessible SVG string (with <title> and <desc>).",
1039
- params: object({ width: _chunkMZFZSVUJcjs.WIDTH, height: _chunkMZFZSVUJcjs.HEIGHT }),
1062
+ params: object({ width: _chunkGTF4RYXJcjs.WIDTH, height: _chunkGTF4RYXJcjs.HEIGHT }),
1040
1063
  run: (_ctx, params = {}) => ({
1041
- svg: _chunkV5L2G22Rcjs.chartToSvg.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _39 => _39.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _40 => _40.height]), () => ( 400)) })
1064
+ svg: _chunk2F4GAZL5cjs.chartToSvg.call(void 0, controller.toJSON(), { width: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _40 => _40.width]), () => ( 640)), height: _nullishCoalesce(_optionalChain([params, 'optionalAccess', _41 => _41.height]), () => ( 400)) })
1042
1065
  })
1043
1066
  },
1044
1067
  {
@@ -1050,7 +1073,7 @@ function createChartCommands(controller, options = {}) {
1050
1073
  description: "Suggests chart types for the current data (or CSV), best first, each with a reason.",
1051
1074
  params: object({ csv: { type: "string", description: "CSV text to analyse instead of the current data." } }),
1052
1075
  run: (_ctx, params = {}) => ({
1053
- recommendations: recommendChartTypes(_optionalChain([params, 'optionalAccess', _41 => _41.csv]) !== void 0 ? _chunkN3KJFGXTcjs.parseCsv.call(void 0, params.csv) : _chunkBPX4Z3N3cjs.chartDataToTable.call(void 0, controller.getSpec()))
1076
+ recommendations: recommendChartTypes(_optionalChain([params, 'optionalAccess', _42 => _42.csv]) !== void 0 ? _chunkN3KJFGXTcjs.parseCsv.call(void 0, params.csv) : _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, controller.getSpec()))
1054
1077
  })
1055
1078
  },
1056
1079
  {
@@ -1063,8 +1086,8 @@ function createChartCommands(controller, options = {}) {
1063
1086
  run: () => {
1064
1087
  const s = controller.getSpec();
1065
1088
  const visible = s.series.filter((x) => !x.hidden);
1066
- const colors = _chunkBPX4Z3N3cjs.chartSpecColorsByCategory.call(void 0, s) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _42 => _42[0], 'optionalAccess', _43 => _43.pointColors, 'optionalAccess', _44 => _44[i]]) || _chunkBPX4Z3N3cjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkBPX4Z3N3cjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
1067
- return { colors, ..._chunkBPX4Z3N3cjs.checkChartColors.call(void 0, colors) };
1089
+ const colors = _chunkOUO3DSRTcjs.chartSpecColorsByCategory.call(void 0, s) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _43 => _43[0], 'optionalAccess', _44 => _44.pointColors, 'optionalAccess', _45 => _45[i]]) || _chunkOUO3DSRTcjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkOUO3DSRTcjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
1090
+ return { colors, ..._chunkOUO3DSRTcjs.checkChartColors.call(void 0, colors) };
1068
1091
  }
1069
1092
  },
1070
1093
  {
@@ -1093,9 +1116,9 @@ function chartClientToScene(scene, box, clientX, clientY) {
1093
1116
  return { x: (clientX - box.left) * sx, y: (clientY - box.top) * sy };
1094
1117
  }
1095
1118
  function canDragChartPoint(controller, scene, target) {
1096
- if (_optionalChain([target, 'optionalAccess', _45 => _45.kind]) !== "point" || !scene.valueScale || scene.percent) return false;
1119
+ if (_optionalChain([target, 'optionalAccess', _46 => _46.kind]) !== "point" || !scene.valueScale || scene.percent) return false;
1097
1120
  const spec = controller.getSpec();
1098
- const family = _chunkBPX4Z3N3cjs.chartFamily.call(void 0, spec);
1121
+ const family = _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec);
1099
1122
  if (family !== "cartesian" && family !== "xy" && family !== "waterfall") return false;
1100
1123
  const series = controller.getSeries(target.seriesId);
1101
1124
  return !!series && !series.hidden && series.values[target.index] !== null;
@@ -1104,7 +1127,7 @@ function snapChartDragValue(scene, value, options = {}) {
1104
1127
  const scale = _nullishCoalesce(options.scale, () => ( scene.valueScale));
1105
1128
  const tolerance = _nullishCoalesce(options.tolerancePx, () => ( 6));
1106
1129
  if (scale) {
1107
- const px = (v) => _chunkUUUTEVX6cjs.chartScaleToPixel.call(void 0, v, scale);
1130
+ const px = (v) => _chunkWOIXNDHVcjs.chartScaleToPixel.call(void 0, v, scale);
1108
1131
  const at = px(value);
1109
1132
  let best = null;
1110
1133
  let bestDist = tolerance;
@@ -1119,7 +1142,7 @@ function snapChartDragValue(scene, value, options = {}) {
1119
1142
  }
1120
1143
  if (best !== null) return best;
1121
1144
  }
1122
- return _chunkUUUTEVX6cjs.snapChartValue.call(void 0, scene, value, options.step, _optionalChain([scale, 'optionalAccess', _46 => _46.ticks]), _optionalChain([scale, 'optionalAccess', _47 => _47.logBase]));
1145
+ return _chunkWOIXNDHVcjs.snapChartValue.call(void 0, scene, value, options.step, _optionalChain([scale, 'optionalAccess', _47 => _47.ticks]), _optionalChain([scale, 'optionalAccess', _48 => _48.logBase]));
1123
1146
  }
1124
1147
  function startChartPointDrag(controller, scene, target, start, options = {}) {
1125
1148
  if (!canDragChartPoint(controller, scene, target)) return null;
@@ -1128,11 +1151,11 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1128
1151
  const series = controller.getSeries(seriesId);
1129
1152
  const secondary = series.axis === "secondary" && !!scene.valueScale2;
1130
1153
  const scale = secondary ? scene.valueScale2 : scene.valueScale;
1131
- const xy = _chunkBPX4Z3N3cjs.chartFamily.call(void 0, spec) === "xy" && !!scene.xScale;
1154
+ const xy = _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec) === "xy" && !!scene.xScale;
1132
1155
  const startValue = _nullishCoalesce(series.values[index], () => ( 0));
1133
- const startX = _nullishCoalesce(_optionalChain([series, 'access', _48 => _48.x, 'optionalAccess', _49 => _49[index]]), () => ( null));
1134
- const startAt = _chunkUUUTEVX6cjs.chartValueAtPoint.call(void 0, scene, start, secondary);
1135
- const startAtX = xy ? _chunkUUUTEVX6cjs.chartXAtPoint.call(void 0, scene, start) : void 0;
1156
+ const startX = _nullishCoalesce(_optionalChain([series, 'access', _49 => _49.x, 'optionalAccess', _50 => _50[index]]), () => ( null));
1157
+ const startAt = _chunkWOIXNDHVcjs.chartValueAtPoint.call(void 0, scene, start, secondary);
1158
+ const startAtX = xy ? _chunkWOIXNDHVcjs.chartXAtPoint.call(void 0, scene, start) : void 0;
1136
1159
  if (startAt === void 0) return null;
1137
1160
  const candidates = [0, startValue];
1138
1161
  if (!xy) {
@@ -1150,7 +1173,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1150
1173
  target: { seriesId, index },
1151
1174
  move(point, moveOptions = {}) {
1152
1175
  if (ended) return;
1153
- const at = _chunkUUUTEVX6cjs.chartValueAtPoint.call(void 0, scene, point, secondary);
1176
+ const at = _chunkWOIXNDHVcjs.chartValueAtPoint.call(void 0, scene, point, secondary);
1154
1177
  if (at === void 0) return;
1155
1178
  const factor = moveOptions.fine ? 0.1 : 1;
1156
1179
  const moved = (from, to, s, value) => s.logBase && value > 0 && from > 0 && to > 0 ? value * Math.pow(to / from, factor) : value + (to - from) * factor;
@@ -1158,7 +1181,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1158
1181
  let moveX = false;
1159
1182
  let atX;
1160
1183
  if (xy && startX !== null && startAtX !== void 0) {
1161
- atX = _chunkUUUTEVX6cjs.chartXAtPoint.call(void 0, scene, point);
1184
+ atX = _chunkWOIXNDHVcjs.chartXAtPoint.call(void 0, scene, point);
1162
1185
  moveX = atX !== void 0;
1163
1186
  if (moveOptions.lockAxis) {
1164
1187
  if (Math.abs(point.x - start.x) >= Math.abs(point.y - start.y)) moveY = false;
@@ -1170,7 +1193,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1170
1193
  if (moveOptions.fine) {
1171
1194
  if (s.logBase && !options.step) return v > 0 ? Number(v.toPrecision(3)) : v;
1172
1195
  const unit = options.step ? options.step / 10 : s.ticks.length > 1 ? (s.ticks[1] - s.ticks[0]) / 100 : void 0;
1173
- return _chunkUUUTEVX6cjs.snapChartValue.call(void 0, scene, v, unit, s.ticks);
1196
+ return _chunkWOIXNDHVcjs.snapChartValue.call(void 0, scene, v, unit, s.ticks);
1174
1197
  }
1175
1198
  return snapChartDragValue(scene, v, { candidates: c, tolerancePx: options.tolerancePx, step: options.step, scale: s });
1176
1199
  };
@@ -1181,7 +1204,7 @@ function startChartPointDrag(controller, scene, target, start, options = {}) {
1181
1204
  const xs = [..._nullishCoalesce(series.x, () => ( []))];
1182
1205
  xs[index] = x;
1183
1206
  controller.setValue(seriesId, index, y, { label });
1184
- if (x !== _optionalChain([controller, 'access', _50 => _50.getSeries, 'call', _51 => _51(seriesId), 'optionalAccess', _52 => _52.x, 'optionalAccess', _53 => _53[index]])) controller.updateSeries(seriesId, { x: xs });
1207
+ if (x !== _optionalChain([controller, 'access', _51 => _51.getSeries, 'call', _52 => _52(seriesId), 'optionalAccess', _53 => _53.x, 'optionalAccess', _54 => _54[index]])) controller.updateSeries(seriesId, { x: xs });
1185
1208
  } else controller.setValue(seriesId, index, y, { label });
1186
1209
  },
1187
1210
  end() {
@@ -1215,7 +1238,7 @@ function handleChartKey(controller, scene, event) {
1215
1238
  return true;
1216
1239
  case "ArrowLeft":
1217
1240
  case "ArrowRight": {
1218
- if (event.altKey || _optionalChain([selection, 'optionalAccess', _54 => _54.kind]) !== "point" && _optionalChain([selection, 'optionalAccess', _55 => _55.kind]) !== "category") return false;
1241
+ if (event.altKey || _optionalChain([selection, 'optionalAccess', _55 => _55.kind]) !== "point" && _optionalChain([selection, 'optionalAccess', _56 => _56.kind]) !== "category") return false;
1219
1242
  const n = spec.categories.length;
1220
1243
  const index = Math.max(0, Math.min(n - 1, selection.index + (event.key === "ArrowRight" ? 1 : -1)));
1221
1244
  controller.select({ ...selection, index });
@@ -1223,14 +1246,14 @@ function handleChartKey(controller, scene, event) {
1223
1246
  }
1224
1247
  case "ArrowUp":
1225
1248
  case "ArrowDown": {
1226
- if (_optionalChain([selection, 'optionalAccess', _56 => _56.kind]) !== "point" || _optionalChain([scene, 'optionalAccess', _57 => _57.percent])) return false;
1249
+ if (_optionalChain([selection, 'optionalAccess', _57 => _57.kind]) !== "point" || _optionalChain([scene, 'optionalAccess', _58 => _58.percent])) return false;
1227
1250
  const series = controller.getSeries(selection.seriesId);
1228
- const secondary = _optionalChain([series, 'optionalAccess', _58 => _58.axis]) === "secondary";
1229
- const scale = _nullishCoalesce((secondary ? _optionalChain([scene, 'optionalAccess', _59 => _59.valueScale2]) : null), () => ( _optionalChain([scene, 'optionalAccess', _60 => _60.valueScale])));
1230
- const ticks = _nullishCoalesce(_optionalChain([scale, 'optionalAccess', _61 => _61.ticks]), () => ( []));
1251
+ const secondary = _optionalChain([series, 'optionalAccess', _59 => _59.axis]) === "secondary";
1252
+ const scale = _nullishCoalesce((secondary ? _optionalChain([scene, 'optionalAccess', _60 => _60.valueScale2]) : null), () => ( _optionalChain([scene, 'optionalAccess', _61 => _61.valueScale])));
1253
+ const ticks = _nullishCoalesce(_optionalChain([scale, 'optionalAccess', _62 => _62.ticks]), () => ( []));
1231
1254
  const up = event.key === "ArrowUp";
1232
- const current = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _62 => _62.values, 'access', _63 => _63[selection.index]]), () => ( null));
1233
- if (_optionalChain([scale, 'optionalAccess', _64 => _64.logBase]) && current !== null && current > 0) {
1255
+ const current = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _63 => _63.values, 'access', _64 => _64[selection.index]]), () => ( null));
1256
+ if (_optionalChain([scale, 'optionalAccess', _65 => _65.logBase]) && current !== null && current > 0) {
1234
1257
  const power = event.shiftKey ? 1 : event.altKey ? 0.01 : 0.1;
1235
1258
  const next = Number((current * Math.pow(scale.logBase, up ? power : -power)).toPrecision(event.altKey ? 4 : 3));
1236
1259
  controller.nudgeValue(selection.seriesId, selection.index, next - current);
@@ -1258,22 +1281,22 @@ function describeChartSelection(controller, selection = controller.getState().se
1258
1281
  case "legend":
1259
1282
  return "Legend";
1260
1283
  case "axis":
1261
- return selection.axis === "x" ? _chunkBPX4Z3N3cjs.chartFamily.call(void 0, spec) === "xy" ? "X axis" : "Category axis" : selection.axis === "y" ? "Value axis" : "Secondary value axis";
1284
+ return selection.axis === "x" ? _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec) === "xy" ? "X axis" : "Category axis" : selection.axis === "y" ? "Value axis" : "Secondary value axis";
1262
1285
  case "series":
1263
- return `Series "${_nullishCoalesce(_optionalChain([controller, 'access', _65 => _65.getSeries, 'call', _66 => _66(selection.seriesId), 'optionalAccess', _67 => _67.name]), () => ( selection.seriesId))}"`;
1286
+ return `Series "${_nullishCoalesce(_optionalChain([controller, 'access', _66 => _66.getSeries, 'call', _67 => _67(selection.seriesId), 'optionalAccess', _68 => _68.name]), () => ( selection.seriesId))}"`;
1264
1287
  case "category":
1265
1288
  return `Category "${_nullishCoalesce(spec.categories[selection.index], () => ( selection.index))}"`;
1266
1289
  case "trendline": {
1267
1290
  const series = controller.getSeries(selection.seriesId);
1268
- const line = _optionalChain([series, 'optionalAccess', _68 => _68.trendlines, 'optionalAccess', _69 => _69[selection.index]]);
1269
- return `${line ? line.type.replace("-", " ") : "Trendline"} trendline on "${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _70 => _70.name]), () => ( selection.seriesId))}"`;
1291
+ const line = _optionalChain([series, 'optionalAccess', _69 => _69.trendlines, 'optionalAccess', _70 => _70[selection.index]]);
1292
+ return `${line ? line.type.replace("-", " ") : "Trendline"} trendline on "${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _71 => _71.name]), () => ( selection.seriesId))}"`;
1270
1293
  }
1271
1294
  case "point": {
1272
1295
  const series = controller.getSeries(selection.seriesId);
1273
- const value = _optionalChain([series, 'optionalAccess', _71 => _71.values, 'access', _72 => _72[selection.index]]);
1274
- const x = _optionalChain([series, 'optionalAccess', _73 => _73.x, 'optionalAccess', _74 => _74[selection.index]]);
1275
- if (x !== void 0 && x !== null && _chunkBPX4Z3N3cjs.chartFamily.call(void 0, spec) === "xy") return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _75 => _75.name]), () => ( selection.seriesId))}: (${x}, ${_nullishCoalesce(value, () => ( "blank"))})`;
1276
- return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _76 => _76.name]), () => ( selection.seriesId))} \xB7 ${_nullishCoalesce(spec.categories[selection.index], () => ( selection.index))}: ${_nullishCoalesce(value, () => ( "blank"))}`;
1296
+ const value = _optionalChain([series, 'optionalAccess', _72 => _72.values, 'access', _73 => _73[selection.index]]);
1297
+ const x = _optionalChain([series, 'optionalAccess', _74 => _74.x, 'optionalAccess', _75 => _75[selection.index]]);
1298
+ if (x !== void 0 && x !== null && _chunkOUO3DSRTcjs.chartFamily.call(void 0, spec) === "xy") return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _76 => _76.name]), () => ( selection.seriesId))}: (${x}, ${_nullishCoalesce(value, () => ( "blank"))})`;
1299
+ return `${_nullishCoalesce(_optionalChain([series, 'optionalAccess', _77 => _77.name]), () => ( selection.seriesId))} \xB7 ${_nullishCoalesce(spec.categories[selection.index], () => ( selection.index))}: ${_nullishCoalesce(value, () => ( "blank"))}`;
1277
1300
  }
1278
1301
  }
1279
1302
  }
@@ -1320,7 +1343,7 @@ var CHART_PRESENCE_COLORS = _chunkSWTUM32Hcjs.PRESENCE_COLORS;
1320
1343
  var realChartClock = _chunkSWTUM32Hcjs.realPresenceClock;
1321
1344
  var createInstantChartClock = _chunkSWTUM32Hcjs.createInstantPresenceClock;
1322
1345
  function chartPointAnchor(scene, seriesId, index) {
1323
- const mark = scene.marks.find((m) => (m.role === "bar" || m.role === "point") && _optionalChain([m, 'access', _77 => _77.target, 'optionalAccess', _78 => _78.kind]) === "point" && m.target.seriesId === seriesId && m.target.index === index);
1346
+ const mark = scene.marks.find((m) => (m.role === "bar" || m.role === "point") && _optionalChain([m, 'access', _78 => _78.target, 'optionalAccess', _79 => _79.kind]) === "point" && m.target.seriesId === seriesId && m.target.index === index);
1324
1347
  if (!mark) return null;
1325
1348
  if (mark.kind === "rect") return { x: mark.x + mark.width / 2, y: mark.y };
1326
1349
  if (mark.kind === "circle") return { x: mark.cx, y: mark.cy };
@@ -1346,10 +1369,10 @@ function planChartCommand(spec, scene, command, speed = 1) {
1346
1369
  case "setValue": {
1347
1370
  const at = chartPointAnchor(scene, command.seriesId, command.index);
1348
1371
  const series = spec.series.find((s) => s.id === command.seriesId);
1349
- const from = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _79 => _79.values, 'access', _80 => _80[command.index]]), () => ( 0));
1350
- const scale = _optionalChain([series, 'optionalAccess', _81 => _81.axis]) === "secondary" ? _nullishCoalesce(scene.valueScale2, () => ( scene.valueScale)) : scene.valueScale;
1372
+ const from = _nullishCoalesce(_optionalChain([series, 'optionalAccess', _80 => _80.values, 'access', _81 => _81[command.index]]), () => ( 0));
1373
+ const scale = _optionalChain([series, 'optionalAccess', _82 => _82.axis]) === "secondary" ? _nullishCoalesce(scene.valueScale2, () => ( scene.valueScale)) : scene.valueScale;
1351
1374
  if (at && scale) {
1352
- const px = _chunkUUUTEVX6cjs.linearMap.call(void 0, command.value, scale.domain, scale.range);
1375
+ const px = _chunkWOIXNDHVcjs.linearMap.call(void 0, command.value, scale.domain, scale.range);
1353
1376
  const to = scale.axis === "y" ? { x: at.x, y: px } : { x: px, y: at.y };
1354
1377
  steps.push({ type: "move", to: at, ms: ms(380) }, { type: "press" }, { type: "drag", to, ms: ms(520), from, value: command.value }, { type: "release" });
1355
1378
  } else steps.push({ type: "drag", to: { x: scene.plot.x + scene.plot.width / 2, y: scene.plot.y + scene.plot.height / 2 }, ms: ms(200), from, value: command.value });
@@ -1359,12 +1382,12 @@ function planChartCommand(spec, scene, command, speed = 1) {
1359
1382
  case "select": {
1360
1383
  const sel = command.selection;
1361
1384
  let to = null;
1362
- if (_optionalChain([sel, 'optionalAccess', _82 => _82.kind]) === "point") to = chartPointAnchor(scene, sel.seriesId, sel.index);
1385
+ if (_optionalChain([sel, 'optionalAccess', _83 => _83.kind]) === "point") to = chartPointAnchor(scene, sel.seriesId, sel.index);
1363
1386
  else if (sel) {
1364
1387
  const m = scene.marks.find((x) => x.target && JSON.stringify(x.target) === JSON.stringify(sel));
1365
- if (_optionalChain([m, 'optionalAccess', _83 => _83.kind]) === "text") to = { x: m.x, y: m.y };
1366
- else if (_optionalChain([m, 'optionalAccess', _84 => _84.kind]) === "rect") to = { x: m.x + m.width / 2, y: m.y + m.height / 2 };
1367
- else if (_optionalChain([m, 'optionalAccess', _85 => _85.kind]) === "circle") to = { x: m.cx, y: m.cy };
1388
+ if (_optionalChain([m, 'optionalAccess', _84 => _84.kind]) === "text") to = { x: m.x, y: m.y };
1389
+ else if (_optionalChain([m, 'optionalAccess', _85 => _85.kind]) === "rect") to = { x: m.x + m.width / 2, y: m.y + m.height / 2 };
1390
+ else if (_optionalChain([m, 'optionalAccess', _86 => _86.kind]) === "circle") to = { x: m.cx, y: m.cy };
1368
1391
  }
1369
1392
  if (to) steps.push({ type: "move", to, ms: ms(380) }, { type: "press" }, { type: "release" });
1370
1393
  steps.push({ type: "commit" });
@@ -1446,7 +1469,7 @@ var ChartDirector = class {
1446
1469
  if (command.kind !== "setValue") break;
1447
1470
  const stale2 = this.stale(command);
1448
1471
  if (stale2) return { ok: false, command, message: stale2 };
1449
- const label = `${_nullishCoalesce(_optionalChain([this, 'access', _86 => _86.presence, 'access', _87 => _87.getState, 'call', _88 => _88(), 'access', _89 => _89.actors, 'access', _90 => _90.find, 'call', _91 => _91((a) => a.id === id), 'optionalAccess', _92 => _92.name]), () => ( "Agent"))}: edit value`;
1472
+ const label = `${_nullishCoalesce(_optionalChain([this, 'access', _87 => _87.presence, 'access', _88 => _88.getState, 'call', _89 => _89(), 'access', _90 => _90.actors, 'access', _91 => _91.find, 'call', _92 => _92((a) => a.id === id), 'optionalAccess', _93 => _93.name]), () => ( "Agent"))}: edit value`;
1450
1473
  await this.move(id, where(), step.to, step.ms, (e) => {
1451
1474
  const v = step.from + (step.value - step.from) * e;
1452
1475
  this.controller.setValue(command.seriesId, command.index, Number(v.toPrecision(12)), { label });
@@ -1609,10 +1632,10 @@ function createChartToolProvider(controller, options = {}) {
1609
1632
  fail2(`There is no category ${JSON.stringify(ref)}; expected an index from 0 to ${categories.length - 1} or one of ${categories.slice(0, 20).map((c) => JSON.stringify(c)).join(", ")}.`);
1610
1633
  return index;
1611
1634
  };
1612
- const table = () => _chunkBPX4Z3N3cjs.chartDataToTable.call(void 0, spec());
1635
+ const table = () => _chunkOUO3DSRTcjs.chartDataToTable.call(void 0, spec());
1613
1636
  const treeTable = () => {
1614
- const rows = _chunkBPX4Z3N3cjs.chartTreeToRows.call(void 0, spec().tree);
1615
- const depth = _chunkBPX4Z3N3cjs.chartTreeDepth.call(void 0, spec().tree);
1637
+ const rows = _chunkOUO3DSRTcjs.chartTreeToRows.call(void 0, spec().tree);
1638
+ const depth = _chunkOUO3DSRTcjs.chartTreeDepth.call(void 0, spec().tree);
1616
1639
  return [[...Array.from({ length: depth }, (_, k) => k === 0 ? "Group" : k === depth - 1 ? "Item" : `Level ${k + 1}`), "Value"], ...rows.map((r) => [...r.path, ...Array(depth - r.path.length).fill(""), r.value])];
1617
1640
  };
1618
1641
  const raceFrameOf = (time) => {
@@ -1628,17 +1651,17 @@ function createChartToolProvider(controller, options = {}) {
1628
1651
  return {
1629
1652
  frame: at,
1630
1653
  time: _nullishCoalesce(s.categories[Math.round(at)], () => ( null)),
1631
- ranking: _chunkUUUTEVX6cjs.chartRaceRanking.call(void 0, s, at).slice(0, s.raceTopN).map((e) => ({ rank: e.rank + 1, series: e.seriesId, name: e.name, value: e.value }))
1654
+ ranking: _chunkWOIXNDHVcjs.chartRaceRanking.call(void 0, s, at).slice(0, s.raceTopN).map((e) => ({ rank: e.rank + 1, series: e.seriesId, name: e.name, value: e.value }))
1632
1655
  };
1633
1656
  };
1634
- const linksSummary = () => ({ links: spec().links, nodes: spec().sankeyNodes.map((name, i) => ({ name, value: _chunkBPX4Z3N3cjs.chartSankeyNodeValues.call(void 0, spec().links, spec().sankeyNodes)[i] })) });
1635
- const treeSummary = () => ({ tree: spec().tree, groups: spec().tree.map((n) => ({ name: n.name, total: _chunkBPX4Z3N3cjs.chartTreeTotal.call(void 0, n) })), depth: _chunkBPX4Z3N3cjs.chartTreeDepth.call(void 0, spec().tree) });
1657
+ const linksSummary = () => ({ links: spec().links, nodes: spec().sankeyNodes.map((name, i) => ({ name, value: _chunkOUO3DSRTcjs.chartSankeyNodeValues.call(void 0, spec().links, spec().sankeyNodes)[i] })) });
1658
+ const treeSummary = () => ({ tree: spec().tree, groups: spec().tree.map((n) => ({ name: n.name, total: _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, n) })), depth: _chunkOUO3DSRTcjs.chartTreeDepth.call(void 0, spec().tree) });
1636
1659
  const Parser = () => _nullishCoalesce(options.DOMParser, () => ( globalThis.DOMParser));
1637
1660
  const getChart = {
1638
1661
  name: "get_chart",
1639
1662
  title: "Read the chart",
1640
1663
  description: "Returns the chart spec (type, titles, axes, legend, series with ids and settings), its data as a table (header row of series names, then one row per category), grouped data as treeTable (path of names to each item, then its value) when the chart has a tree, the current selection, and a summary at the given size: per-series min / max / mean / trend, the axes as drawn, layout warnings (hidden labels, thinned lines), a colour check and a plain-language description. Use the series ids and category indexes it returns with the write tools.",
1641
- inputSchema: { type: "object", properties: { width: _chunkMZFZSVUJcjs.WIDTH, height: _chunkMZFZSVUJcjs.HEIGHT }, additionalProperties: false },
1664
+ inputSchema: { type: "object", properties: { width: _chunkGTF4RYXJcjs.WIDTH, height: _chunkGTF4RYXJcjs.HEIGHT }, additionalProperties: false },
1642
1665
  annotations: { title: "Read the chart", ...READ },
1643
1666
  handler: ({ width = size.width, height = size.height }) => {
1644
1667
  const reason = readOnlyReason();
@@ -1646,7 +1669,7 @@ function createChartToolProvider(controller, options = {}) {
1646
1669
  spec: controller.toJSON(),
1647
1670
  table: table(),
1648
1671
  selection: controller.getState().selection,
1649
- summary: _chunkV5L2G22Rcjs.summarizeChart.call(void 0, controller.toJSON(), { width, height }),
1672
+ summary: _chunk2F4GAZL5cjs.summarizeChart.call(void 0, controller.toJSON(), { width, height }),
1650
1673
  ...spec().tree.length ? { treeTable: treeTable() } : {},
1651
1674
  issues: controller.getState().issues,
1652
1675
  ...reason ? { readOnly: reason } : {}
@@ -1660,10 +1683,10 @@ function createChartToolProvider(controller, options = {}) {
1660
1683
  inputSchema: {
1661
1684
  type: "object",
1662
1685
  properties: {
1663
- width: _chunkMZFZSVUJcjs.WIDTH,
1664
- height: _chunkMZFZSVUJcjs.HEIGHT,
1686
+ width: _chunkGTF4RYXJcjs.WIDTH,
1687
+ height: _chunkGTF4RYXJcjs.HEIGHT,
1665
1688
  format: { type: "string", enum: ["svg", "png"], description: "svg (default): the SVG document as text. png: an image to look at (only when the host can rasterize; costs image tokens)." },
1666
- time: { ..._chunkMZFZSVUJcjs.RACE_TIME, description: `Bar race only: the moment to draw (default: the one shown). ${_chunkMZFZSVUJcjs.RACE_TIME.description}` }
1689
+ time: { ..._chunkGTF4RYXJcjs.RACE_TIME, description: `Bar race only: the moment to draw (default: the one shown). ${_chunkGTF4RYXJcjs.RACE_TIME.description}` }
1667
1690
  },
1668
1691
  additionalProperties: false
1669
1692
  },
@@ -1671,8 +1694,8 @@ function createChartToolProvider(controller, options = {}) {
1671
1694
  handler: async ({ width = size.width, height = size.height, format = "svg", time }) => {
1672
1695
  const json = controller.toJSON();
1673
1696
  const raceFrame = time !== void 0 ? raceFrameOf(time) : controller.getState().raceFrame;
1674
- const scene = _chunkUUUTEVX6cjs.layoutChart.call(void 0, json, { width, height, selection: null, raceFrame });
1675
- const svg = _chunkV5L2G22Rcjs.chartSceneToSvg.call(void 0, scene, { ariaLabel: json.title || void 0, description: _chunkV5L2G22Rcjs.describeChart.call(void 0, json) });
1697
+ const scene = _chunkWOIXNDHVcjs.layoutChart.call(void 0, json, { width, height, selection: null, raceFrame });
1698
+ const svg = _chunk2F4GAZL5cjs.chartSceneToSvg.call(void 0, scene, { ariaLabel: json.title || void 0, description: _chunk2F4GAZL5cjs.describeChart.call(void 0, json) });
1676
1699
  const warnings = scene.warnings;
1677
1700
  if (format === "png") {
1678
1701
  if (!options.rasterize) fail2('This host cannot rasterize charts; call render_chart with format "svg", or get_chart for the layout warnings.');
@@ -1706,8 +1729,8 @@ function createChartToolProvider(controller, options = {}) {
1706
1729
  handler: ({ colors, surface }) => {
1707
1730
  const s = spec();
1708
1731
  const visible = s.series.filter((x) => !x.hidden);
1709
- const own = _chunkBPX4Z3N3cjs.chartSpecColorsByCategory.call(void 0, s) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _93 => _93[0], 'optionalAccess', _94 => _94.pointColors, 'optionalAccess', _95 => _95[i]]) || _chunkBPX4Z3N3cjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkBPX4Z3N3cjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
1710
- return { colors: _nullishCoalesce(colors, () => ( own)), ..._chunkBPX4Z3N3cjs.checkChartColors.call(void 0, _nullishCoalesce(colors, () => ( own)), { surface }) };
1732
+ const own = _chunkOUO3DSRTcjs.chartSpecColorsByCategory.call(void 0, s) ? s.categories.map((_, i) => _optionalChain([visible, 'access', _94 => _94[0], 'optionalAccess', _95 => _95.pointColors, 'optionalAccess', _96 => _96[i]]) || _chunkOUO3DSRTcjs.chartSliceColor.call(void 0, s, i)) : visible.map((x) => _chunkOUO3DSRTcjs.chartSeriesColor.call(void 0, s, s.series.indexOf(x)));
1733
+ return { colors: _nullishCoalesce(colors, () => ( own)), ..._chunkOUO3DSRTcjs.checkChartColors.call(void 0, _nullishCoalesce(colors, () => ( own)), { surface }) };
1711
1734
  }
1712
1735
  };
1713
1736
  const recommend = {
@@ -1729,15 +1752,15 @@ function createChartToolProvider(controller, options = {}) {
1729
1752
  description: "Returns a trendline's fitted coefficients (in x for category charts, x = 1, 2, 3, \u2026), R\xB2, equation and the number of points, or the moving-average points.",
1730
1753
  inputSchema: {
1731
1754
  type: "object",
1732
- properties: { series: _chunkMZFZSVUJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
1755
+ properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
1733
1756
  required: ["series", "index"],
1734
1757
  additionalProperties: false
1735
1758
  },
1736
1759
  annotations: { title: "Read a trendline fit", ...READ },
1737
1760
  handler: ({ series, index }) => {
1738
1761
  const s = seriesById(series);
1739
- const line = _optionalChain([s, 'access', _96 => _96.trendlines, 'optionalAccess', _97 => _97[index]]);
1740
- if (!line) fail2(`"${s.name}" has no trendline ${index}; it has ${_nullishCoalesce(_optionalChain([s, 'access', _98 => _98.trendlines, 'optionalAccess', _99 => _99.length]), () => ( 0))}.`);
1762
+ const line = _optionalChain([s, 'access', _97 => _97.trendlines, 'optionalAccess', _98 => _98[index]]);
1763
+ if (!line) fail2(`"${s.name}" has no trendline ${index}; it has ${_nullishCoalesce(_optionalChain([s, 'access', _99 => _99.trendlines, 'optionalAccess', _100 => _100.length]), () => ( 0))}.`);
1741
1764
  if (line.type === "moving-average") return { trendline: line, points: controller.trendlineMovingAverage(s.id, index) };
1742
1765
  const fit = controller.trendlineFit(s.id, index);
1743
1766
  if (!fit) fail2(`The ${line.type} trendline on "${s.name}" cannot be fitted: it needs more points (and positive values for log, exponential and power fits).`);
@@ -1748,10 +1771,31 @@ function createChartToolProvider(controller, options = {}) {
1748
1771
  name: "get_chart_race_ranking",
1749
1772
  title: "Read a bar race ranking",
1750
1773
  description: "Returns who leads a bar race at a moment without changing what is shown: the top raceTopN names with their rank, series id and value (eased between time points). Defaults to the moment shown. Works for any chart, reading categories as time points and series as names.",
1751
- inputSchema: { type: "object", properties: { time: _chunkMZFZSVUJcjs.RACE_TIME }, additionalProperties: false },
1774
+ inputSchema: { type: "object", properties: { time: _chunkGTF4RYXJcjs.RACE_TIME }, additionalProperties: false },
1752
1775
  annotations: { title: "Read a bar race ranking", ...READ },
1753
1776
  handler: ({ time }) => raceAt(time !== void 0 ? raceFrameOf(time) : controller.getState().raceFrame)
1754
1777
  };
1778
+ const mapRegions = {
1779
+ name: "list_chart_map_regions",
1780
+ title: "List map regions",
1781
+ description: "Lists the maps a choropleth can draw and the regions of one (default: the chart's map), each with the id and name that categories may use, and how the chart's categories match them: matched (category \u2192 region id) and unmatched. Use it to pick category labels before set_chart_data, and to fix unmatched ones.",
1782
+ inputSchema: { type: "object", properties: { map: { type: "string", description: "Map id (default: the chart's map)." } }, additionalProperties: false },
1783
+ annotations: { title: "List map regions", ...READ },
1784
+ handler: ({ map }) => {
1785
+ const id = _nullishCoalesce(map, () => ( spec().map));
1786
+ const maps = _chunkWOIXNDHVcjs.listChartMaps.call(void 0, ).map((m) => ({ id: m.id, name: m.name, regions: m.regions.length }));
1787
+ const geometry = _chunkWOIXNDHVcjs.getChartMap.call(void 0, id);
1788
+ if (!geometry) fail2(maps.length ? `There is no map "${id}"; the host has ${maps.map((m) => `"${m.id}"`).join(", ")}.` : `There is no map "${id}": the host has not registered any maps (EUROPE_CHART_MAP in @pixerate/editor/chart-maps).`);
1789
+ const matches = _chunkWOIXNDHVcjs.matchChartMapRegions.call(void 0, geometry, spec().categories);
1790
+ return {
1791
+ maps,
1792
+ map: id,
1793
+ regions: geometry.regions.map((r) => ({ id: r.id, name: r.name })),
1794
+ matched: spec().categories.flatMap((c, i) => matches[i] ? [{ category: c, region: matches[i].id }] : []),
1795
+ unmatched: spec().categories.filter((_, i) => !matches[i])
1796
+ };
1797
+ }
1798
+ };
1755
1799
  const listPresets = {
1756
1800
  name: "list_chart_presets",
1757
1801
  title: "List chart presets",
@@ -1759,8 +1803,8 @@ function createChartToolProvider(controller, options = {}) {
1759
1803
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
1760
1804
  annotations: { title: "List chart presets", ...READ },
1761
1805
  handler: () => ({
1762
- layouts: _chunkV5L2G22Rcjs.CHART_LAYOUT_PRESETS.map(({ id, label, description }) => ({ id, label, description })),
1763
- colorSchemes: _chunkV5L2G22Rcjs.CHART_COLOR_SCHEMES.map(({ id, label, description, palette }) => ({ id, label, description, palette }))
1806
+ layouts: _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS.map(({ id, label, description }) => ({ id, label, description })),
1807
+ colorSchemes: _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES.map(({ id, label, description, palette }) => ({ id, label, description, palette }))
1764
1808
  })
1765
1809
  };
1766
1810
  const exportMermaid = {
@@ -1769,7 +1813,7 @@ function createChartToolProvider(controller, options = {}) {
1769
1813
  description: 'Returns the chart as Mermaid text for Markdown or chat: xychart-beta, pie or radar-beta, sankey-beta for Sankey diagrams with flows, treemap-beta for treemaps and sunbursts (with their levels). With meta (default true) one "%% @pixerate {\u2026}" comment keeps what Mermaid cannot express, so import_chart_mermaid gets the chart back exactly.',
1770
1814
  inputSchema: { type: "object", properties: { meta: { type: "boolean", description: "Include the round-trip comment (default true)." } }, additionalProperties: false },
1771
1815
  annotations: { title: "Export chart as Mermaid", ...READ },
1772
- handler: ({ meta = true }) => ({ mermaid: _chunkV5L2G22Rcjs.chartToMermaid.call(void 0, controller.toJSON(), { meta }) })
1816
+ handler: ({ meta = true }) => ({ mermaid: _chunk2F4GAZL5cjs.chartToMermaid.call(void 0, controller.toJSON(), { meta }) })
1773
1817
  };
1774
1818
  const exportOoxml = {
1775
1819
  name: "export_chart_ooxml",
@@ -1777,7 +1821,7 @@ function createChartToolProvider(controller, options = {}) {
1777
1821
  description: "Returns the chart as a DrawingML chart part (c:chartSpace) for Word or PowerPoint files, with what could not be written as sentences.",
1778
1822
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
1779
1823
  annotations: { title: "Export chart as Office XML", ...READ },
1780
- handler: () => _chunkSZWVMB3Bcjs.chartToOoxml.call(void 0, controller.toJSON())
1824
+ handler: () => _chunkVKHJJUBKcjs.chartToOoxml.call(void 0, controller.toJSON())
1781
1825
  };
1782
1826
  const updateChart = {
1783
1827
  name: "update_chart",
@@ -1785,7 +1829,7 @@ function createChartToolProvider(controller, options = {}) {
1785
1829
  description: 'Changes how the chart looks, as one undo step: type, titles, axes (xAxis = categories or numeric x, yAxis = values, yAxis2 = secondary values; each can be reversed, and value axes can be logarithmic with scale "log"), legend, stacking, orientation, curve, points, data labels and their position, palette, donut hole, bar spacing, histogram bins, waterfall total, radar rings (radarTicks) and grid shape (radarGraticule), note, highlight, reference lines and bands (whole lists), and varyColors. All-or-nothing: invalid values change nothing and come back as sentences. Returns the new spec.',
1786
1830
  inputSchema: {
1787
1831
  type: "object",
1788
- properties: _chunkMZFZSVUJcjs.CHART_UPDATE_PROPERTIES,
1832
+ properties: _chunkGTF4RYXJcjs.CHART_UPDATE_PROPERTIES,
1789
1833
  additionalProperties: false
1790
1834
  },
1791
1835
  annotations: { title: "Change chart presentation", ...WRITE_IDEMPOTENT },
@@ -1806,7 +1850,7 @@ function createChartToolProvider(controller, options = {}) {
1806
1850
  series: {
1807
1851
  type: "array",
1808
1852
  description: "The new series (replaces all).",
1809
- items: { type: "object", properties: { id: { type: "string", description: "Stable id (optional)." }, ..._chunkMZFZSVUJcjs.SERIES_PROPS }, required: ["name", "values"], additionalProperties: false }
1853
+ items: { type: "object", properties: { id: { type: "string", description: "Stable id (optional)." }, ..._chunkGTF4RYXJcjs.SERIES_PROPS }, required: ["name", "values"], additionalProperties: false }
1810
1854
  }
1811
1855
  },
1812
1856
  additionalProperties: false
@@ -1829,7 +1873,7 @@ function createChartToolProvider(controller, options = {}) {
1829
1873
  type: "array",
1830
1874
  minItems: 1,
1831
1875
  description: "Values to set.",
1832
- items: { type: "object", properties: { series: _chunkMZFZSVUJcjs.SERIES_REF, category: _chunkMZFZSVUJcjs.CATEGORY_REF, value: _chunkMZFZSVUJcjs.VALUE }, required: ["series", "category", "value"], additionalProperties: false }
1876
+ items: { type: "object", properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, category: _chunkGTF4RYXJcjs.CATEGORY_REF, value: _chunkGTF4RYXJcjs.VALUE }, required: ["series", "category", "value"], additionalProperties: false }
1833
1877
  }
1834
1878
  },
1835
1879
  required: ["cells"],
@@ -1838,7 +1882,7 @@ function createChartToolProvider(controller, options = {}) {
1838
1882
  annotations: { title: "Set chart values", ...WRITE_IDEMPOTENT },
1839
1883
  handler: async ({ cells }) => {
1840
1884
  const resolved = cells.map((c) => ({ seriesId: seriesById(c.series).id, index: categoryIndex(c.category), value: c.value }));
1841
- const parsed = resolved.map((c) => _chunkBPX4Z3N3cjs.parseChartValue.call(void 0, c.value));
1885
+ const parsed = resolved.map((c) => _chunkOUO3DSRTcjs.parseChartValue.call(void 0, c.value));
1842
1886
  const bad = resolved.find((_, i) => parsed[i] === void 0);
1843
1887
  if (bad) fail2(`"${String(bad.value)}" is not a number; pass a number, numeric text or null for a gap. Nothing was changed.`);
1844
1888
  if (options.director && parsed.every((v) => typeof v === "number")) {
@@ -1855,7 +1899,7 @@ function createChartToolProvider(controller, options = {}) {
1855
1899
  description: "Adds a series (values padded to the categories) and selects it. Returns its id and stored values.",
1856
1900
  inputSchema: {
1857
1901
  type: "object",
1858
- properties: { ..._chunkMZFZSVUJcjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default: series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } },
1902
+ properties: { ..._chunkGTF4RYXJcjs.SERIES_PROPS, id: { type: "string", description: "Id to use (default: series-N)." }, at: { type: "integer", minimum: 0, description: "Position (default: last)." } },
1859
1903
  required: ["name"],
1860
1904
  additionalProperties: false
1861
1905
  },
@@ -1873,7 +1917,7 @@ function createChartToolProvider(controller, options = {}) {
1873
1917
  description: "Renames, recolours, hides, moves to the secondary axis or changes how a series is drawn (marker, curve, labels, format, x values, bubble sizes, point colours, error bars). null resets a field. Values change with set_chart_values. Returns the series.",
1874
1918
  inputSchema: {
1875
1919
  type: "object",
1876
- properties: { series: _chunkMZFZSVUJcjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkMZFZSVUJcjs.SERIES_PROPS).filter(([k]) => k !== "values")) },
1920
+ properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, ...Object.fromEntries(Object.entries(_chunkGTF4RYXJcjs.SERIES_PROPS).filter(([k]) => k !== "values")) },
1877
1921
  required: ["series"],
1878
1922
  additionalProperties: false
1879
1923
  },
@@ -1889,7 +1933,7 @@ function createChartToolProvider(controller, options = {}) {
1889
1933
  name: "remove_chart_series",
1890
1934
  title: "Delete a series",
1891
1935
  description: "Deletes a series and its values. Returns the remaining series ids.",
1892
- inputSchema: { type: "object", properties: { series: _chunkMZFZSVUJcjs.SERIES_REF }, required: ["series"], additionalProperties: false },
1936
+ inputSchema: { type: "object", properties: { series: _chunkGTF4RYXJcjs.SERIES_REF }, required: ["series"], additionalProperties: false },
1893
1937
  annotations: { title: "Delete a series", ...DESTRUCTIVE },
1894
1938
  handler: ({ series }) => {
1895
1939
  resolve(controller.removeSeries(seriesById(series).id));
@@ -1915,7 +1959,7 @@ function createChartToolProvider(controller, options = {}) {
1915
1959
  name: "remove_chart_category",
1916
1960
  title: "Delete a category",
1917
1961
  description: "Deletes a category and its value in every series. Returns the remaining categories.",
1918
- inputSchema: { type: "object", properties: { category: _chunkMZFZSVUJcjs.CATEGORY_REF }, required: ["category"], additionalProperties: false },
1962
+ inputSchema: { type: "object", properties: { category: _chunkGTF4RYXJcjs.CATEGORY_REF }, required: ["category"], additionalProperties: false },
1919
1963
  annotations: { title: "Delete a category", ...DESTRUCTIVE },
1920
1964
  handler: ({ category }) => {
1921
1965
  resolve(controller.removeCategory(categoryIndex(category)));
@@ -1958,7 +2002,7 @@ function createChartToolProvider(controller, options = {}) {
1958
2002
  annotations: { title: "Import a Mermaid chart", ...DESTRUCTIVE },
1959
2003
  handler: ({ mermaid }) => {
1960
2004
  const fenced = /```(?:mermaid)?\s*\n([\s\S]*?)```/.exec(mermaid);
1961
- const read = _chunkV5L2G22Rcjs.chartFromMermaid.call(void 0, fenced ? fenced[1] : mermaid);
2005
+ const read = _chunk2F4GAZL5cjs.chartFromMermaid.call(void 0, fenced ? fenced[1] : mermaid);
1962
2006
  if (!read.family) fail2(read.issues.map((i) => i.message).join(" ") || "Expected Mermaid starting with xychart-beta, pie, radar-beta, sankey-beta or treemap-beta.");
1963
2007
  resolve(controller.update({ ...read.spec }, { label: "Import Mermaid chart" }));
1964
2008
  return { spec: controller.toJSON(), issues: read.issues };
@@ -1971,7 +2015,7 @@ function createChartToolProvider(controller, options = {}) {
1971
2015
  inputSchema: { type: "object", properties: { xml: { type: "string", description: "The chart part XML, e.g. word/charts/chart1.xml." } }, required: ["xml"], additionalProperties: false },
1972
2016
  annotations: { title: "Import an Office chart", ...DESTRUCTIVE },
1973
2017
  handler: ({ xml }) => {
1974
- const read = _chunkSZWVMB3Bcjs.chartFromOoxml.call(void 0, xml, { DOMParser: Parser() });
2018
+ const read = _chunkVKHJJUBKcjs.chartFromOoxml.call(void 0, xml, { DOMParser: Parser() });
1975
2019
  if (read.issues.some((i) => i.path === "" || i.path === "plotArea")) fail2(read.issues.map((i) => i.message).join(" "));
1976
2020
  resolve(controller.update({ ...read.spec }, { label: "Import Office chart" }));
1977
2021
  return { spec: controller.toJSON(), issues: read.issues.map((i) => i.message), unsupported: read.unsupported, lossless: read.lossless };
@@ -1981,7 +2025,7 @@ function createChartToolProvider(controller, options = {}) {
1981
2025
  name: "add_chart_trendline",
1982
2026
  title: "Add a trendline",
1983
2027
  description: "Fits a trendline to a series and draws it (unstacked bar, line, area, scatter and bubble charts). Returns its index and the fit: coefficients, R\xB2 and equation.",
1984
- inputSchema: { type: "object", properties: { series: _chunkMZFZSVUJcjs.SERIES_REF, ..._chunkMZFZSVUJcjs.TRENDLINE_PROPS }, required: ["series", "type"], additionalProperties: false },
2028
+ inputSchema: { type: "object", properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, ..._chunkGTF4RYXJcjs.TRENDLINE_PROPS }, required: ["series", "type"], additionalProperties: false },
1985
2029
  annotations: { title: "Add a trendline", ...WRITE },
1986
2030
  handler: ({ series, ...line }) => {
1987
2031
  const s = seriesById(series);
@@ -1995,7 +2039,7 @@ function createChartToolProvider(controller, options = {}) {
1995
2039
  description: "Deletes a trendline from a series. Returns the series' remaining trendlines.",
1996
2040
  inputSchema: {
1997
2041
  type: "object",
1998
- properties: { series: _chunkMZFZSVUJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
2042
+ properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, index: { type: "integer", minimum: 0, description: "Trendline index on the series (0 = first)." } },
1999
2043
  required: ["series", "index"],
2000
2044
  additionalProperties: false
2001
2045
  },
@@ -2003,7 +2047,7 @@ function createChartToolProvider(controller, options = {}) {
2003
2047
  handler: ({ series, index }) => {
2004
2048
  const s = seriesById(series);
2005
2049
  resolve(controller.removeTrendline(s.id, index));
2006
- return { series: s.id, trendlines: _nullishCoalesce(_optionalChain([controller, 'access', _100 => _100.getSeries, 'call', _101 => _101(s.id), 'optionalAccess', _102 => _102.trendlines]), () => ( [])) };
2050
+ return { series: s.id, trendlines: _nullishCoalesce(_optionalChain([controller, 'access', _101 => _101.getSeries, 'call', _102 => _102(s.id), 'optionalAccess', _103 => _103.trendlines]), () => ( [])) };
2007
2051
  }
2008
2052
  };
2009
2053
  const referenceTools = (what) => {
@@ -2014,7 +2058,7 @@ function createChartToolProvider(controller, options = {}) {
2014
2058
  name: `add_chart_reference_${what}`,
2015
2059
  title: `Add a reference ${what}`,
2016
2060
  description: what === "line" ? "Draws a dashed line across the plot at one value: a target, a floor, an average (bar, line, area, scatter and bubble charts). The axis grows to keep it in view. Returns its index and the reference lines." : "Shades a band across the plot between two values: a target or normal range (bar, line, area, scatter and bubble charts), drawn under the data. The axis grows to keep it in view. Returns its index and the reference bands.",
2017
- inputSchema: { type: "object", properties: what === "line" ? _chunkMZFZSVUJcjs.REFERENCE_LINE_PROPS : _chunkMZFZSVUJcjs.REFERENCE_BAND_PROPS, required: what === "line" ? ["value"] : ["from", "to"], additionalProperties: false },
2061
+ inputSchema: { type: "object", properties: what === "line" ? _chunkGTF4RYXJcjs.REFERENCE_LINE_PROPS : _chunkGTF4RYXJcjs.REFERENCE_BAND_PROPS, required: what === "line" ? ["value"] : ["from", "to"], additionalProperties: false },
2018
2062
  annotations: { title: `Add a reference ${what}`, ...WRITE },
2019
2063
  handler: (args) => {
2020
2064
  const result = resolve(what === "line" ? controller.addReferenceLine(args) : controller.addReferenceBand(args));
@@ -2025,7 +2069,7 @@ function createChartToolProvider(controller, options = {}) {
2025
2069
  name: `update_chart_reference_${what}`,
2026
2070
  title: `Change a reference ${what}`,
2027
2071
  description: `Changes a reference ${what} by index (all-or-nothing); label, axis and color take null to remove them. Returns the ${what} as stored.`,
2028
- inputSchema: { type: "object", properties: { index: _chunkMZFZSVUJcjs.REFERENCE_INDEX.call(void 0, Kind), ...what === "line" ? _chunkMZFZSVUJcjs.REFERENCE_LINE_PATCH : _chunkMZFZSVUJcjs.REFERENCE_BAND_PATCH }, required: ["index"], additionalProperties: false },
2072
+ inputSchema: { type: "object", properties: { index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, Kind), ...what === "line" ? _chunkGTF4RYXJcjs.REFERENCE_LINE_PATCH : _chunkGTF4RYXJcjs.REFERENCE_BAND_PATCH }, required: ["index"], additionalProperties: false },
2029
2073
  annotations: { title: `Change a reference ${what}`, ...WRITE_IDEMPOTENT },
2030
2074
  handler: ({ index, ...patch }) => {
2031
2075
  if (!Object.keys(patch).length) fail2(`Nothing to change: pass at least one field besides index, e.g. {"index": ${index}, "label": "Target"}.`);
@@ -2037,7 +2081,7 @@ function createChartToolProvider(controller, options = {}) {
2037
2081
  name: `remove_chart_reference_${what}`,
2038
2082
  title: `Delete a reference ${what}`,
2039
2083
  description: `Deletes a reference ${what} by index; the ones after it move up one. Returns the reference ${what}s left.`,
2040
- inputSchema: { type: "object", properties: { index: _chunkMZFZSVUJcjs.REFERENCE_INDEX.call(void 0, Kind) }, required: ["index"], additionalProperties: false },
2084
+ inputSchema: { type: "object", properties: { index: _chunkGTF4RYXJcjs.REFERENCE_INDEX.call(void 0, Kind) }, required: ["index"], additionalProperties: false },
2041
2085
  annotations: { title: `Delete a reference ${what}`, ...DESTRUCTIVE },
2042
2086
  handler: ({ index }) => {
2043
2087
  resolve(what === "line" ? controller.removeReferenceLine(index) : controller.removeReferenceBand(index));
@@ -2054,7 +2098,7 @@ function createChartToolProvider(controller, options = {}) {
2054
2098
  description: 'Pins a short label to one bar or point, with a leader line, to say why it matters ("Record quarter", "Launch"); label null or "" removes it. Bar, line, area, scatter and bubble charts; the point must have a value. Selects the point and returns the series id, category index and label.',
2055
2099
  inputSchema: {
2056
2100
  type: "object",
2057
- properties: { series: _chunkMZFZSVUJcjs.SERIES_REF, category: _chunkMZFZSVUJcjs.CATEGORY_REF, label: { type: ["string", "null"], description: "The label (keep it to a few words), or null to remove it." } },
2101
+ properties: { series: _chunkGTF4RYXJcjs.SERIES_REF, category: _chunkGTF4RYXJcjs.CATEGORY_REF, label: { type: ["string", "null"], description: "The label (keep it to a few words), or null to remove it." } },
2058
2102
  required: ["series", "category", "label"],
2059
2103
  additionalProperties: false
2060
2104
  },
@@ -2063,7 +2107,7 @@ function createChartToolProvider(controller, options = {}) {
2063
2107
  const s = seriesById(series);
2064
2108
  const index = categoryIndex(category);
2065
2109
  resolve(controller.setCallout(s.id, index, label));
2066
- return { series: s.id, index, category: spec().categories[index], label: _nullishCoalesce(_optionalChain([controller, 'access', _103 => _103.getSeries, 'call', _104 => _104(s.id), 'optionalAccess', _105 => _105.callouts, 'optionalAccess', _106 => _106[index]]), () => ( null)) };
2110
+ return { series: s.id, index, category: spec().categories[index], label: _nullishCoalesce(_optionalChain([controller, 'access', _104 => _104.getSeries, 'call', _105 => _105(s.id), 'optionalAccess', _106 => _106.callouts, 'optionalAccess', _107 => _107[index]]), () => ( null)) };
2067
2111
  }
2068
2112
  };
2069
2113
  const highlight = {
@@ -2087,7 +2131,7 @@ function createChartToolProvider(controller, options = {}) {
2087
2131
  name: "set_chart_tree",
2088
2132
  title: "Replace grouped data",
2089
2133
  description: `Replaces the chart's data with groups of items (a tree) for treemaps and sunbursts, as one undo step: items {"name", "value"} and groups {"name", "children"}, up to 6 levels, names unique among siblings. The top-level groups become the categories and their totals the first series, so other chart types draw the totals. [] goes back to plain data (the totals stay as values). Returns the tree, each group's total and the depth.`,
2090
- inputSchema: { type: "object", properties: { tree: { type: "array", items: { $ref: "#/$defs/chartTreeNode" }, description: "The top-level nodes; [] removes the grouping." } }, required: ["tree"], additionalProperties: false, $defs: _chunkMZFZSVUJcjs.TREE_DEFS },
2134
+ inputSchema: { type: "object", properties: { tree: { type: "array", items: { $ref: "#/$defs/chartTreeNode" }, description: "The top-level nodes; [] removes the grouping." } }, required: ["tree"], additionalProperties: false, $defs: _chunkGTF4RYXJcjs.TREE_DEFS },
2091
2135
  annotations: { title: "Replace grouped data", ...WRITE_IDEMPOTENT },
2092
2136
  handler: ({ tree }) => {
2093
2137
  resolve(controller.setTree(tree));
@@ -2126,13 +2170,13 @@ function createChartToolProvider(controller, options = {}) {
2126
2170
  },
2127
2171
  required: ["node"],
2128
2172
  additionalProperties: false,
2129
- $defs: _chunkMZFZSVUJcjs.TREE_DEFS
2173
+ $defs: _chunkGTF4RYXJcjs.TREE_DEFS
2130
2174
  },
2131
2175
  annotations: { title: "Add an item or group", ...WRITE },
2132
2176
  handler: ({ parent = [], node, at }) => {
2133
2177
  const result = resolve(controller.addTreeNode(parent, node, { at }));
2134
- const group = parent.length ? _chunkBPX4Z3N3cjs.findChartTreeNode.call(void 0, spec().tree, parent) : null;
2135
- return { path: result.path, parentTotal: group ? _chunkBPX4Z3N3cjs.chartTreeTotal.call(void 0, group) : spec().tree.reduce((t, n) => t + _chunkBPX4Z3N3cjs.chartTreeTotal.call(void 0, n), 0) };
2178
+ const group = parent.length ? _chunkOUO3DSRTcjs.findChartTreeNode.call(void 0, spec().tree, parent) : null;
2179
+ return { path: result.path, parentTotal: group ? _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, group) : spec().tree.reduce((t, n) => t + _chunkOUO3DSRTcjs.chartTreeTotal.call(void 0, n), 0) };
2136
2180
  }
2137
2181
  };
2138
2182
  const updateTreeNode = {
@@ -2142,7 +2186,7 @@ function createChartToolProvider(controller, options = {}) {
2142
2186
  inputSchema: {
2143
2187
  type: "object",
2144
2188
  properties: {
2145
- path: _chunkMZFZSVUJcjs.TREE_PATH,
2189
+ path: _chunkGTF4RYXJcjs.TREE_PATH,
2146
2190
  name: { type: "string", description: "New name (unique among its siblings)." },
2147
2191
  value: { type: "number", minimum: 0, description: "Items only: the new amount." },
2148
2192
  color: { type: ["string", "null"], description: "CSS colour, or null for the palette colour." }
@@ -2154,14 +2198,14 @@ function createChartToolProvider(controller, options = {}) {
2154
2198
  handler: ({ path, ...patch }) => {
2155
2199
  if (!Object.keys(patch).length) fail2("Nothing to change: pass name, value or color with the path.");
2156
2200
  const result = resolve(controller.updateTreeNode(path, patch));
2157
- return { path: result.path, node: _chunkBPX4Z3N3cjs.findChartTreeNode.call(void 0, spec().tree, result.path) };
2201
+ return { path: result.path, node: _chunkOUO3DSRTcjs.findChartTreeNode.call(void 0, spec().tree, result.path) };
2158
2202
  }
2159
2203
  };
2160
2204
  const removeTreeNode = {
2161
2205
  name: "remove_chart_tree_node",
2162
2206
  title: "Delete an item or group",
2163
2207
  description: "Deletes a node of the grouped data with everything under it (a group left empty becomes an item with value 0). Returns the group totals left.",
2164
- inputSchema: { type: "object", properties: { path: _chunkMZFZSVUJcjs.TREE_PATH }, required: ["path"], additionalProperties: false },
2208
+ inputSchema: { type: "object", properties: { path: _chunkGTF4RYXJcjs.TREE_PATH }, required: ["path"], additionalProperties: false },
2165
2209
  annotations: { title: "Delete an item or group", ...DESTRUCTIVE },
2166
2210
  handler: ({ path }) => {
2167
2211
  resolve(controller.removeTreeNode(path));
@@ -2175,7 +2219,7 @@ function createChartToolProvider(controller, options = {}) {
2175
2219
  inputSchema: {
2176
2220
  type: "object",
2177
2221
  properties: {
2178
- links: { type: "array", items: { type: "object", properties: _chunkMZFZSVUJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false }, description: "All the flows; [] removes them." },
2222
+ links: { type: "array", items: { type: "object", properties: _chunkGTF4RYXJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false }, description: "All the flows; [] removes them." },
2179
2223
  nodes: { type: "array", items: { type: "string" }, description: "Node names in stacking order (default: as the flows first name them)." }
2180
2224
  },
2181
2225
  required: ["links"],
@@ -2210,12 +2254,12 @@ function createChartToolProvider(controller, options = {}) {
2210
2254
  name: "add_chart_link",
2211
2255
  title: "Add a flow",
2212
2256
  description: "Adds a flow from one node to another (new names add nodes). Refused when the pair exists already or it would close a loop. Returns its index and the throughput of its two nodes.",
2213
- inputSchema: { type: "object", properties: _chunkMZFZSVUJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false },
2257
+ inputSchema: { type: "object", properties: _chunkGTF4RYXJcjs.LINK_PROPS, required: ["source", "target", "value"], additionalProperties: false },
2214
2258
  annotations: { title: "Add a flow", ...WRITE },
2215
2259
  handler: (args) => {
2216
2260
  const result = resolve(controller.addLink(args));
2217
2261
  const s = spec();
2218
- const through = (n) => _nullishCoalesce(_optionalChain([s, 'access', _107 => _107.series, 'access', _108 => _108[0], 'optionalAccess', _109 => _109.values, 'access', _110 => _110[s.sankeyNodes.indexOf(n)]]), () => ( 0));
2262
+ const through = (n) => _nullishCoalesce(_optionalChain([s, 'access', _108 => _108.series, 'access', _109 => _109[0], 'optionalAccess', _110 => _110.values, 'access', _111 => _111[s.sankeyNodes.indexOf(n)]]), () => ( 0));
2219
2263
  const link = s.links[result.index];
2220
2264
  return { index: result.index, link, nodes: [link.source, link.target].map((name) => ({ name, value: through(name) })) };
2221
2265
  }
@@ -2224,7 +2268,7 @@ function createChartToolProvider(controller, options = {}) {
2224
2268
  name: "update_chart_link",
2225
2269
  title: "Change a flow",
2226
2270
  description: "Changes a flow by index: its source, target, value or colour (null goes back to the default). Checked like a new flow. Returns the flow as stored.",
2227
- inputSchema: { type: "object", properties: { index: _chunkMZFZSVUJcjs.LINK_INDEX, ..._chunkMZFZSVUJcjs.LINK_PROPS, color: { type: ["string", "null"], description: "CSS colour, or null for the default." } }, required: ["index"], additionalProperties: false },
2271
+ inputSchema: { type: "object", properties: { index: _chunkGTF4RYXJcjs.LINK_INDEX, ..._chunkGTF4RYXJcjs.LINK_PROPS, color: { type: ["string", "null"], description: "CSS colour, or null for the default." } }, required: ["index"], additionalProperties: false },
2228
2272
  annotations: { title: "Change a flow", ...WRITE_IDEMPOTENT },
2229
2273
  handler: ({ index, ...patch }) => {
2230
2274
  if (!Object.keys(patch).length) fail2(`Nothing to change: pass source, target, value or color with the index, e.g. {"index": ${index}, "value": 40}.`);
@@ -2236,7 +2280,7 @@ function createChartToolProvider(controller, options = {}) {
2236
2280
  name: "remove_chart_link",
2237
2281
  title: "Delete a flow",
2238
2282
  description: "Deletes a flow by index; the ones after it move up one, and nodes no flow uses any more go. Returns the flows left.",
2239
- inputSchema: { type: "object", properties: { index: _chunkMZFZSVUJcjs.LINK_INDEX }, required: ["index"], additionalProperties: false },
2283
+ inputSchema: { type: "object", properties: { index: _chunkGTF4RYXJcjs.LINK_INDEX }, required: ["index"], additionalProperties: false },
2240
2284
  annotations: { title: "Delete a flow", ...DESTRUCTIVE },
2241
2285
  handler: ({ index }) => {
2242
2286
  resolve(controller.removeLink(index));
@@ -2247,7 +2291,7 @@ function createChartToolProvider(controller, options = {}) {
2247
2291
  name: "set_chart_race_frame",
2248
2292
  title: "Show a bar race moment",
2249
2293
  description: "Shows the bar race at a time point (or between two), and stops playback. This is view state like the selection: it is not an undo step and is not saved in the chart. Returns the moment and the ranking shown.",
2250
- inputSchema: { type: "object", properties: { time: { ..._chunkMZFZSVUJcjs.RACE_TIME, type: ["string", "number", "null"], description: `${_chunkMZFZSVUJcjs.RACE_TIME.description} null shows the last time point.` } }, required: ["time"], additionalProperties: false },
2294
+ inputSchema: { type: "object", properties: { time: { ..._chunkGTF4RYXJcjs.RACE_TIME, type: ["string", "number", "null"], description: `${_chunkGTF4RYXJcjs.RACE_TIME.description} null shows the last time point.` } }, required: ["time"], additionalProperties: false },
2251
2295
  annotations: { title: "Show a bar race moment", ...WRITE_IDEMPOTENT },
2252
2296
  handler: ({ time }) => {
2253
2297
  const frame = time === null ? null : raceFrameOf(time);
@@ -2274,8 +2318,8 @@ function createChartToolProvider(controller, options = {}) {
2274
2318
  inputSchema: {
2275
2319
  type: "object",
2276
2320
  properties: {
2277
- layout: { type: "string", enum: _chunkV5L2G22Rcjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
2278
- colors: { type: "string", enum: _chunkV5L2G22Rcjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
2321
+ layout: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS.map((p) => p.id), description: "Quick layout id." },
2322
+ colors: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES.map((p) => p.id), description: "Colour scheme id." }
2279
2323
  },
2280
2324
  additionalProperties: false
2281
2325
  },
@@ -2304,8 +2348,8 @@ function createChartToolProvider(controller, options = {}) {
2304
2348
  type: "object",
2305
2349
  properties: {
2306
2350
  kind: { type: "string", enum: ["none", "chart", "title", "subtitle", "legend", "axis", "series", "point", "category", "trendline"], description: "What to select." },
2307
- series: { ..._chunkMZFZSVUJcjs.SERIES_REF, description: "Series id or name (series, point, trendline)." },
2308
- category: { ..._chunkMZFZSVUJcjs.CATEGORY_REF, description: "Category index or label (point, category)." },
2351
+ series: { ..._chunkGTF4RYXJcjs.SERIES_REF, description: "Series id or name (series, point, trendline)." },
2352
+ category: { ..._chunkGTF4RYXJcjs.CATEGORY_REF, description: "Category index or label (point, category)." },
2309
2353
  axis: { type: "string", enum: ["x", "y", "y2"], description: "Axis (axis)." },
2310
2354
  index: { type: "integer", minimum: 0, description: "Trendline index (trendline)." }
2311
2355
  },
@@ -2363,20 +2407,20 @@ function createChartToolProvider(controller, options = {}) {
2363
2407
  to: { type: "object", description: "End, as fractions of the chart.", properties: { x: { type: "number", minimum: 0, maximum: 1, description: "Fraction of the width." }, y: { type: "number", minimum: 0, maximum: 1, description: "Fraction of the height." } }, required: ["x", "y"], additionalProperties: false },
2364
2408
  fine: { type: "boolean", description: "Move a tenth as far (Alt)." },
2365
2409
  lockAxis: { type: "boolean", description: "Scatter charts: change only the axis moved along most (Shift)." },
2366
- width: _chunkMZFZSVUJcjs.WIDTH,
2367
- height: _chunkMZFZSVUJcjs.HEIGHT
2410
+ width: _chunkGTF4RYXJcjs.WIDTH,
2411
+ height: _chunkGTF4RYXJcjs.HEIGHT
2368
2412
  },
2369
2413
  required: ["from", "to"],
2370
2414
  additionalProperties: false
2371
2415
  },
2372
2416
  annotations: { title: "Drag a chart point", ...WRITE },
2373
2417
  handler: ({ from, to, fine, lockAxis, width = size.width, height = size.height }) => {
2374
- const scene = _chunkUUUTEVX6cjs.layoutChart.call(void 0, controller.toJSON(), { width, height });
2418
+ const scene = _chunkWOIXNDHVcjs.layoutChart.call(void 0, controller.toJSON(), { width, height });
2375
2419
  const start = { x: from.x * width, y: from.y * height };
2376
2420
  const target = chartHitTest(scene, start);
2377
- if (_optionalChain([target, 'optionalAccess', _111 => _111.kind]) !== "point") fail2(`There is no bar or point at (${from.x}, ${from.y}); ${target ? `that is the ${target.kind}` : "that is outside the chart"}. Use render_chart to find marks.`);
2421
+ if (_optionalChain([target, 'optionalAccess', _112 => _112.kind]) !== "point") fail2(`There is no bar or point at (${from.x}, ${from.y}); ${target ? `that is the ${target.kind}` : "that is outside the chart"}. Use render_chart to find marks.`);
2378
2422
  const t = target;
2379
- const before = _nullishCoalesce(_optionalChain([controller, 'access', _112 => _112.getSeries, 'call', _113 => _113(t.seriesId), 'optionalAccess', _114 => _114.values, 'access', _115 => _115[t.index]]), () => ( null));
2423
+ const before = _nullishCoalesce(_optionalChain([controller, 'access', _113 => _113.getSeries, 'call', _114 => _114(t.seriesId), 'optionalAccess', _115 => _115.values, 'access', _116 => _116[t.index]]), () => ( null));
2380
2424
  const session = startChartPointDrag(controller, scene, t, start);
2381
2425
  if (!session) fail2("That point cannot be dragged here (percent-stacked charts, pies and gaps cannot be dragged).");
2382
2426
  session.move({ x: to.x * width, y: to.y * height }, { fine, lockAxis });
@@ -2401,10 +2445,10 @@ function createChartToolProvider(controller, options = {}) {
2401
2445
  },
2402
2446
  annotations: { title: "Press a key on the chart", ...DESTRUCTIVE },
2403
2447
  handler: ({ key: k, shift, alt }) => {
2404
- const scene = _chunkUUUTEVX6cjs.layoutChart.call(void 0, controller.toJSON(), size);
2448
+ const scene = _chunkWOIXNDHVcjs.layoutChart.call(void 0, controller.toJSON(), size);
2405
2449
  const used = handleChartKey(controller, scene, { key: k, shiftKey: shift, altKey: alt });
2406
2450
  const sel = controller.getState().selection;
2407
- const value = _optionalChain([sel, 'optionalAccess', _116 => _116.kind]) === "point" ? _nullishCoalesce(_optionalChain([controller, 'access', _117 => _117.getSeries, 'call', _118 => _118(sel.seriesId), 'optionalAccess', _119 => _119.values, 'access', _120 => _120[sel.index]]), () => ( null)) : void 0;
2451
+ const value = _optionalChain([sel, 'optionalAccess', _117 => _117.kind]) === "point" ? _nullishCoalesce(_optionalChain([controller, 'access', _118 => _118.getSeries, 'call', _119 => _119(sel.seriesId), 'optionalAccess', _120 => _120.values, 'access', _121 => _121[sel.index]]), () => ( null)) : void 0;
2408
2452
  return { used, selection: sel, ...value !== void 0 ? { value } : {} };
2409
2453
  }
2410
2454
  };
@@ -2432,7 +2476,7 @@ function createChartToolProvider(controller, options = {}) {
2432
2476
  return { redone, ...redone ? { label } : {} };
2433
2477
  }
2434
2478
  };
2435
- const reads = [getChart, renderChart, checkColors, recommend, getTrendline, raceRanking, listPresets, exportMermaid, exportOoxml];
2479
+ const reads = [getChart, renderChart, checkColors, recommend, getTrendline, raceRanking, mapRegions, listPresets, exportMermaid, exportOoxml];
2436
2480
  const writes = [
2437
2481
  updateChart,
2438
2482
  setData,
@@ -2552,12 +2596,12 @@ var ChartStream = (_class = class {
2552
2596
  if (format === "json") {
2553
2597
  const value = complete ? safeParse(text) : parsePartialChartJson(text);
2554
2598
  if (value !== void 0) {
2555
- const read = _chunkBPX4Z3N3cjs.normalizeChartSpec.call(void 0, value);
2599
+ const read = _chunkOUO3DSRTcjs.normalizeChartSpec.call(void 0, value);
2556
2600
  spec = read.spec;
2557
2601
  issues = complete ? read.issues : [];
2558
2602
  }
2559
2603
  } else {
2560
- const read = _chunkV5L2G22Rcjs.chartFromMermaid.call(void 0, text, { partial: !complete });
2604
+ const read = _chunk2F4GAZL5cjs.chartFromMermaid.call(void 0, text, { partial: !complete });
2561
2605
  if (read.family) {
2562
2606
  spec = read.spec;
2563
2607
  issues = complete ? read.issues : [];
@@ -2654,7 +2698,7 @@ function elements(root, localName) {
2654
2698
  }
2655
2699
  function relId(el, localName = "id") {
2656
2700
  for (const a of Array.from(el.attributes)) {
2657
- if (a.localName === localName && (_optionalChain([a, 'access', _121 => _121.namespaceURI, 'optionalAccess', _122 => _122.includes, 'call', _123 => _123("relationships")]) || a.prefix === "r")) return a.value;
2701
+ if (a.localName === localName && (_optionalChain([a, 'access', _122 => _122.namespaceURI, 'optionalAccess', _123 => _123.includes, 'call', _124 => _124("relationships")]) || a.prefix === "r")) return a.value;
2658
2702
  }
2659
2703
  return void 0;
2660
2704
  }
@@ -2673,17 +2717,17 @@ async function readRels(r, partPath) {
2673
2717
  const id = rel.getAttribute("Id");
2674
2718
  if (!id) continue;
2675
2719
  const target = _nullishCoalesce(rel.getAttribute("Target"), () => ( ""));
2676
- const external = _optionalChain([rel, 'access', _124 => _124.getAttribute, 'call', _125 => _125("TargetMode"), 'optionalAccess', _126 => _126.toLowerCase, 'call', _127 => _127()]) === "external";
2720
+ const external = _optionalChain([rel, 'access', _125 => _125.getAttribute, 'call', _126 => _126("TargetMode"), 'optionalAccess', _127 => _127.toLowerCase, 'call', _128 => _128()]) === "external";
2677
2721
  rels.set(id, { type: _nullishCoalesce(rel.getAttribute("Type"), () => ( "")), target: external ? target : resolvePartPath(dirname(partPath), target), external });
2678
2722
  }
2679
2723
  return rels;
2680
2724
  }
2681
- var isChartRef = (el) => el.localName === "chart" && (el.namespaceURI === _chunkSZWVMB3Bcjs.CHART_OOXML_NS || el.namespaceURI === STRICT_CHART_NS || el.namespaceURI === CHARTEX_NS);
2725
+ var isChartRef = (el) => el.localName === "chart" && (el.namespaceURI === _chunkVKHJJUBKcjs.CHART_OOXML_NS || el.namespaceURI === STRICT_CHART_NS || el.namespaceURI === CHARTEX_NS);
2682
2726
  function frameName(ref) {
2683
2727
  for (let el = ref.parentElement; el; el = el.parentElement) {
2684
2728
  if (el.localName === "graphicFrame") {
2685
2729
  const nv = elements(el, "cNvPr")[0];
2686
- return _optionalChain([nv, 'optionalAccess', _128 => _128.getAttribute, 'call', _129 => _129("name")]) || void 0;
2730
+ return _optionalChain([nv, 'optionalAccess', _129 => _129.getAttribute, 'call', _130 => _130("name")]) || void 0;
2687
2731
  }
2688
2732
  }
2689
2733
  return void 0;
@@ -2697,7 +2741,7 @@ async function chartsInPart(r, root, rels, place) {
2697
2741
  const entry = r.zip.get(rel.target);
2698
2742
  if (!entry) continue;
2699
2743
  r.seen.add(rel.target);
2700
- const read = _chunkSZWVMB3Bcjs.chartFromOoxml.call(void 0, await r.zip.readText(entry), { DOMParser: r.Parser });
2744
+ const read = _chunkVKHJJUBKcjs.chartFromOoxml.call(void 0, await r.zip.readText(entry), { DOMParser: r.Parser });
2701
2745
  const name = frameName(ref);
2702
2746
  r.charts.push({
2703
2747
  id: `chart-${r.charts.length + 1}`,
@@ -2719,8 +2763,8 @@ function columnName(index) {
2719
2763
  return name;
2720
2764
  }
2721
2765
  function anchorCell(marker) {
2722
- const col = Number(_optionalChain([firstChild, 'call', _130 => _130(marker, "col"), 'optionalAccess', _131 => _131.textContent]));
2723
- const row = Number(_optionalChain([firstChild, 'call', _132 => _132(marker, "row"), 'optionalAccess', _133 => _133.textContent]));
2766
+ const col = Number(_optionalChain([firstChild, 'call', _131 => _131(marker, "col"), 'optionalAccess', _132 => _132.textContent]));
2767
+ const row = Number(_optionalChain([firstChild, 'call', _133 => _133(marker, "row"), 'optionalAccess', _134 => _134.textContent]));
2724
2768
  return Number.isInteger(col) && Number.isInteger(row) && col >= 0 && row >= 0 ? `${columnName(col)}${row + 1}` : void 0;
2725
2769
  }
2726
2770
  function drawingPlace(ref) {
@@ -2883,7 +2927,7 @@ function createOfficeChartToolProvider(options = {}) {
2883
2927
  description: "Lists the Office files the user opened that charts can be read from. Returns their names and sizes in bytes.",
2884
2928
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
2885
2929
  annotations: { title: "List open files", ...READ2 },
2886
- handler: () => ({ files: (_nullishCoalesce(_optionalChain([options, 'access', _134 => _134.files, 'optionalCall', _135 => _135()]), () => ( []))).map((f) => ({ name: f.name, bytes: f.data.byteLength })) })
2930
+ handler: () => ({ files: (_nullishCoalesce(_optionalChain([options, 'access', _135 => _135.files, 'optionalCall', _136 => _136()]), () => ( []))).map((f) => ({ name: f.name, bytes: f.data.byteLength })) })
2887
2931
  };
2888
2932
  const listCharts = {
2889
2933
  name: "list_file_charts",
@@ -2968,17 +3012,17 @@ var COLOR = { type: "string", minLength: 1, description: 'A CSS colour (hex or r
2968
3012
  function chartColors(spec) {
2969
3013
  const out = [];
2970
3014
  const visible = spec.series.map((s, i) => ({ s, i })).filter(({ s }) => !s.hidden);
2971
- if (_chunkBPX4Z3N3cjs.chartColorsByCategory.call(void 0, spec.type)) {
3015
+ if (_chunkOUO3DSRTcjs.chartColorsByCategory.call(void 0, spec.type)) {
2972
3016
  const first = visible[0];
2973
3017
  spec.categories.forEach((name, index) => {
2974
- const color = _optionalChain([first, 'optionalAccess', _136 => _136.s, 'access', _137 => _137.pointColors, 'optionalAccess', _138 => _138[index]]) || _chunkBPX4Z3N3cjs.chartSliceColor.call(void 0, spec, index);
3018
+ const color = _optionalChain([first, 'optionalAccess', _137 => _137.s, 'access', _138 => _138.pointColors, 'optionalAccess', _139 => _139[index]]) || _chunkOUO3DSRTcjs.chartSliceColor.call(void 0, spec, index);
2975
3019
  out.push({ color, label: `Slice "${name}"`, target: first ? { kind: "point", seriesId: first.s.id, index } : { kind: "category", index } });
2976
3020
  });
2977
3021
  return out;
2978
3022
  }
2979
3023
  for (const { s, i } of visible) {
2980
- out.push({ color: _chunkBPX4Z3N3cjs.chartSeriesColor.call(void 0, spec, i), label: `Series "${s.name}"`, target: { kind: "series", seriesId: s.id } });
2981
- _optionalChain([s, 'access', _139 => _139.pointColors, 'optionalAccess', _140 => _140.forEach, 'call', _141 => _141((c, index) => {
3024
+ out.push({ color: _chunkOUO3DSRTcjs.chartSeriesColor.call(void 0, spec, i), label: `Series "${s.name}"`, target: { kind: "series", seriesId: s.id } });
3025
+ _optionalChain([s, 'access', _140 => _140.pointColors, 'optionalAccess', _141 => _141.forEach, 'call', _142 => _142((c, index) => {
2982
3026
  if (c) out.push({ color: c, label: `Point ${index + 1} of "${s.name}"`, target: { kind: "point", seriesId: s.id, index } });
2983
3027
  })]);
2984
3028
  }
@@ -2986,7 +3030,7 @@ function chartColors(spec) {
2986
3030
  }
2987
3031
  var paletteOf = (profile) => {
2988
3032
  const palette = profile.palette;
2989
- if (!_optionalChain([palette, 'optionalAccess', _142 => _142.length])) throw new Error("the profile has no palette.");
3033
+ if (!_optionalChain([palette, 'optionalAccess', _143 => _143.length])) throw new Error("the profile has no palette.");
2990
3034
  return palette;
2991
3035
  };
2992
3036
  var paletteOnly = {
@@ -2999,18 +3043,18 @@ var paletteOnly = {
2999
3043
  },
3000
3044
  run(spec, profile, { tolerance = 0.02 }) {
3001
3045
  const palette = paletteOf(profile);
3002
- const allowed = palette.flatMap((c) => _chunkBPX4Z3N3cjs.CHART_PALETTE_SHADES.map((t) => _chunkBPX4Z3N3cjs.shadeChartColor.call(void 0, c, t))).map((c) => ({ c, rgb: _chunkBPX4Z3N3cjs.parseChartColor.call(void 0, c) }));
3046
+ const allowed = palette.flatMap((c) => _chunkOUO3DSRTcjs.CHART_PALETTE_SHADES.map((t) => _chunkOUO3DSRTcjs.shadeChartColor.call(void 0, c, t))).map((c) => ({ c, rgb: _chunkOUO3DSRTcjs.parseChartColor.call(void 0, c) }));
3003
3047
  return chartColors(spec).flatMap(({ color, label, target }) => {
3004
- const rgb = _chunkBPX4Z3N3cjs.parseChartColor.call(void 0, color);
3048
+ const rgb = _chunkOUO3DSRTcjs.parseChartColor.call(void 0, color);
3005
3049
  if (!rgb) return [];
3006
3050
  let best = { c: palette[0], d: Infinity };
3007
3051
  for (const a of allowed) {
3008
3052
  if (!a.rgb) continue;
3009
- const d = _chunkBPX4Z3N3cjs.chartColorDistance.call(void 0, rgb, a.rgb);
3053
+ const d = _chunkOUO3DSRTcjs.chartColorDistance.call(void 0, rgb, a.rgb);
3010
3054
  if (d < best.d) best = { c: a.c, d };
3011
3055
  }
3012
3056
  if (best.d <= tolerance) return [];
3013
- const nearest = palette.map((c) => ({ c, d: _chunkBPX4Z3N3cjs.parseChartColor.call(void 0, c) ? _chunkBPX4Z3N3cjs.chartColorDistance.call(void 0, rgb, _chunkBPX4Z3N3cjs.parseChartColor.call(void 0, c)) : Infinity })).sort((a, b) => a.d - b.d)[0].c;
3057
+ const nearest = palette.map((c) => ({ c, d: _chunkOUO3DSRTcjs.parseChartColor.call(void 0, c) ? _chunkOUO3DSRTcjs.chartColorDistance.call(void 0, rgb, _chunkOUO3DSRTcjs.parseChartColor.call(void 0, c)) : Infinity })).sort((a, b) => a.d - b.d)[0].c;
3014
3058
  return [{ severity: "error", message: `${label} uses ${color}, which is not in the house palette; use ${nearest} or another palette colour (${palette.join(", ")}).`, target }];
3015
3059
  });
3016
3060
  }
@@ -3024,8 +3068,8 @@ var distinguishable = {
3024
3068
  additionalProperties: false
3025
3069
  },
3026
3070
  run(spec, _profile, { minDistance = 0.08 }) {
3027
- const colors = chartColors(spec).filter((c) => c.target.kind !== "point" || _chunkBPX4Z3N3cjs.chartColorsByCategory.call(void 0, spec.type));
3028
- const result = _chunkBPX4Z3N3cjs.checkChartColors.call(void 0, colors.map((c) => c.color), { minDistance, minContrast: 0 });
3071
+ const colors = chartColors(spec).filter((c) => c.target.kind !== "point" || _chunkOUO3DSRTcjs.chartColorsByCategory.call(void 0, spec.type));
3072
+ const result = _chunkOUO3DSRTcjs.checkChartColors.call(void 0, colors.map((c) => c.color), { minDistance, minContrast: 0 });
3029
3073
  const findings = [];
3030
3074
  for (const [vision, pair] of Object.entries(result.closest)) {
3031
3075
  if (!pair || pair.distance >= minDistance) continue;
@@ -3051,7 +3095,7 @@ var minContrast = {
3051
3095
  const theme = _nullishCoalesce(profile.theme, () => ( {}));
3052
3096
  const background = theme.background && theme.background !== "transparent" ? theme.background : _nullishCoalesce(theme.surface, () => ( "#ffffff"));
3053
3097
  return chartColors(spec).flatMap(({ color, label, target }) => {
3054
- const r = _chunkBPX4Z3N3cjs.chartContrastRatio.call(void 0, color, background);
3098
+ const r = _chunkOUO3DSRTcjs.chartContrastRatio.call(void 0, color, background);
3055
3099
  if (r === null || r >= ratio) return [];
3056
3100
  return [{ severity: "warning", message: `${label} (${color}) has contrast ${Math.round(r * 100) / 100}:1 against the background ${background}; want at least ${ratio}:1, so use a darker or lighter palette colour.`, target }];
3057
3101
  });
@@ -3080,8 +3124,8 @@ var chartStyleDomain = {
3080
3124
  type: "object",
3081
3125
  properties: {
3082
3126
  palette: { type: "array", items: COLOR, minItems: 1, description: "Series colours in order." },
3083
- colorSchemes: { type: "array", items: { type: "string", enum: _chunkV5L2G22Rcjs.CHART_COLOR_SCHEMES.map((s) => s.id) }, description: "Colour scheme ids allowed besides the palette (empty: none)." },
3084
- layouts: { type: "array", items: { type: "string", enum: _chunkV5L2G22Rcjs.CHART_LAYOUT_PRESETS.map((p) => p.id) }, description: "Layout preset ids allowed." },
3127
+ colorSchemes: { type: "array", items: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES.map((s) => s.id) }, description: "Colour scheme ids allowed besides the palette (empty: none)." },
3128
+ layouts: { type: "array", items: { type: "string", enum: _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS.map((p) => p.id) }, description: "Layout preset ids allowed." },
3085
3129
  theme: {
3086
3130
  type: "object",
3087
3131
  properties: {
@@ -3120,7 +3164,7 @@ var chartStyleDomain = {
3120
3164
  };
3121
3165
  function chartStylePatch(profile) {
3122
3166
  const p = profile;
3123
- return { ..._nullishCoalesce(p.defaults, () => ( {})), ..._optionalChain([p, 'access', _143 => _143.palette, 'optionalAccess', _144 => _144.length]) ? { palette: [...p.palette] } : {} };
3167
+ return { ..._nullishCoalesce(p.defaults, () => ( {})), ..._optionalChain([p, 'access', _144 => _144.palette, 'optionalAccess', _145 => _145.length]) ? { palette: [...p.palette] } : {} };
3124
3168
  }
3125
3169
  function createChartStyleToolProvider(controller, styles, options = {}) {
3126
3170
  if (!styles.domains.some((d) => d.id === "chart")) throw new Error('The style resolver has no "chart" domain; add chartStyleDomain to its domains.');
@@ -3356,4 +3400,11 @@ function createChartStyleToolProvider(controller, styles, options = {}) {
3356
3400
 
3357
3401
 
3358
3402
 
3359
- exports.CHART_AXIS_KINDS = _chunkBPX4Z3N3cjs.CHART_AXIS_KINDS; exports.CHART_AXIS_SCALES = _chunkBPX4Z3N3cjs.CHART_AXIS_SCALES; exports.CHART_COLOR_SCHEMES = _chunkV5L2G22Rcjs.CHART_COLOR_SCHEMES; exports.CHART_CURVES = _chunkBPX4Z3N3cjs.CHART_CURVES; exports.CHART_DATE_STEPS = _chunkUUUTEVX6cjs.CHART_DATE_STEPS; exports.CHART_ERROR_BAR_DIRECTIONS = _chunkBPX4Z3N3cjs.CHART_ERROR_BAR_DIRECTIONS; exports.CHART_ERROR_BAR_LABELS = _chunkBPX4Z3N3cjs.CHART_ERROR_BAR_LABELS; exports.CHART_ERROR_BAR_TYPES = _chunkBPX4Z3N3cjs.CHART_ERROR_BAR_TYPES; exports.CHART_LABEL_POSITIONS = _chunkBPX4Z3N3cjs.CHART_LABEL_POSITIONS; exports.CHART_LAYOUT_PRESETS = _chunkV5L2G22Rcjs.CHART_LAYOUT_PRESETS; exports.CHART_LEGEND_POSITIONS = _chunkBPX4Z3N3cjs.CHART_LEGEND_POSITIONS; exports.CHART_LIKERT_NEUTRALS = _chunkBPX4Z3N3cjs.CHART_LIKERT_NEUTRALS; exports.CHART_LIKERT_SORTS = _chunkBPX4Z3N3cjs.CHART_LIKERT_SORTS; exports.CHART_MARKERS = _chunkBPX4Z3N3cjs.CHART_MARKERS; exports.CHART_MERMAID_META_PREFIX = _chunkV5L2G22Rcjs.CHART_MERMAID_META_PREFIX; exports.CHART_NUMBER_STYLES = _chunkBPX4Z3N3cjs.CHART_NUMBER_STYLES; exports.CHART_OOXML_CONTENT_TYPE = _chunkSZWVMB3Bcjs.CHART_OOXML_CONTENT_TYPE; exports.CHART_OOXML_NS = _chunkSZWVMB3Bcjs.CHART_OOXML_NS; exports.CHART_OOXML_RELATIONSHIP = _chunkSZWVMB3Bcjs.CHART_OOXML_RELATIONSHIP; exports.CHART_ORIENTATIONS = _chunkBPX4Z3N3cjs.CHART_ORIENTATIONS; exports.CHART_PALETTE_SHADES = _chunkBPX4Z3N3cjs.CHART_PALETTE_SHADES; exports.CHART_PRESENCE_COLORS = CHART_PRESENCE_COLORS; exports.CHART_RADAR_GRATICULES = _chunkBPX4Z3N3cjs.CHART_RADAR_GRATICULES; exports.CHART_RASTER_MAX_SIZE = CHART_RASTER_MAX_SIZE; exports.CHART_REFERENCE_AXES = _chunkBPX4Z3N3cjs.CHART_REFERENCE_AXES; exports.CHART_SANKEY_LINK_COLORS = _chunkBPX4Z3N3cjs.CHART_SANKEY_LINK_COLORS; exports.CHART_SERIES_TYPES = _chunkBPX4Z3N3cjs.CHART_SERIES_TYPES; exports.CHART_STACKINGS = _chunkBPX4Z3N3cjs.CHART_STACKINGS; exports.CHART_TRENDLINE_TYPES = _chunkBPX4Z3N3cjs.CHART_TRENDLINE_TYPES; exports.CHART_TYPES = _chunkBPX4Z3N3cjs.CHART_TYPES; exports.CHART_TYPE_LABELS = _chunkBPX4Z3N3cjs.CHART_TYPE_LABELS; exports.CSS_VARIABLE_CHART_THEME = _chunkBPX4Z3N3cjs.CSS_VARIABLE_CHART_THEME; exports.ChartController = _chunkV5L2G22Rcjs.ChartController; exports.ChartDirector = ChartDirector; exports.ChartPresence = ChartPresence; exports.ChartStream = ChartStream; exports.DEFAULT_CHART_PALETTE = _chunkBPX4Z3N3cjs.DEFAULT_CHART_PALETTE; exports.DEFAULT_CHART_THEME = _chunkBPX4Z3N3cjs.DEFAULT_CHART_THEME; exports.MAX_CHART_DATA_LABELS = _chunkUUUTEVX6cjs.MAX_CHART_DATA_LABELS; exports.MAX_CHART_LINE_POINTS = _chunkUUUTEVX6cjs.MAX_CHART_LINE_POINTS; exports.MAX_CHART_LINKS = _chunkBPX4Z3N3cjs.MAX_CHART_LINKS; exports.MAX_CHART_MARKERS = _chunkUUUTEVX6cjs.MAX_CHART_MARKERS; exports.MAX_CHART_TREE_DEPTH = _chunkBPX4Z3N3cjs.MAX_CHART_TREE_DEPTH; exports.MAX_CHART_TREE_NODES = _chunkBPX4Z3N3cjs.MAX_CHART_TREE_NODES; exports.OfficeChartsError = OfficeChartsError; exports.RENDER_CHART_INSTRUCTIONS = RENDER_CHART_INSTRUCTIONS; exports.addChartLink = _chunkBPX4Z3N3cjs.addChartLink; exports.addChartTreeRow = _chunkBPX4Z3N3cjs.addChartTreeRow; exports.analyzeChartTable = analyzeChartTable; exports.blendChartScenes = blendChartScenes; exports.canDragChartPoint = canDragChartPoint; exports.chartBoxStats = _chunkUUUTEVX6cjs.chartBoxStats; exports.chartClientToScene = chartClientToScene; exports.chartColorDistance = _chunkBPX4Z3N3cjs.chartColorDistance; exports.chartColorInputValue = _chunkBPX4Z3N3cjs.chartColorInputValue; exports.chartColorsByCategory = _chunkBPX4Z3N3cjs.chartColorsByCategory; exports.chartContrastRatio = _chunkBPX4Z3N3cjs.chartContrastRatio; exports.chartDataFromTable = _chunkBPX4Z3N3cjs.chartDataFromTable; exports.chartDataToTable = _chunkBPX4Z3N3cjs.chartDataToTable; exports.chartDateLabels = _chunkUUUTEVX6cjs.chartDateLabels; exports.chartDateToSerial = _chunkUUUTEVX6cjs.chartDateToSerial; exports.chartErrorAmounts = _chunkBPX4Z3N3cjs.chartErrorAmounts; exports.chartErrorBarsOfType = _chunkBPX4Z3N3cjs.chartErrorBarsOfType; exports.chartFamily = _chunkBPX4Z3N3cjs.chartFamily; exports.chartFileName = chartFileName; exports.chartFormatToCode = _chunkSZWVMB3Bcjs.chartFormatToCode; exports.chartFromMermaid = _chunkV5L2G22Rcjs.chartFromMermaid; exports.chartFromOoxml = _chunkSZWVMB3Bcjs.chartFromOoxml; exports.chartFromTable = chartFromTable; exports.chartHistogram = _chunkUUUTEVX6cjs.chartHistogram; exports.chartHitTest = chartHitTest; exports.chartLikertColor = _chunkBPX4Z3N3cjs.chartLikertColor; exports.chartLinksFromTable = _chunkBPX4Z3N3cjs.chartLinksFromTable; exports.chartLuminance = _chunkBPX4Z3N3cjs.chartLuminance; exports.chartMermaidFamily = _chunkV5L2G22Rcjs.chartMermaidFamily; exports.chartMovingAverage = _chunkUUUTEVX6cjs.chartMovingAverage; exports.chartPointAnchor = chartPointAnchor; exports.chartPointColor = _chunkBPX4Z3N3cjs.chartPointColor; exports.chartPointRef = chartPointRef; exports.chartPresetPatch = _chunkV5L2G22Rcjs.chartPresetPatch; exports.chartQuantile = _chunkUUUTEVX6cjs.chartQuantile; exports.chartRaceMoment = _chunkUUUTEVX6cjs.chartRaceMoment; exports.chartRaceRanking = _chunkUUUTEVX6cjs.chartRaceRanking; exports.chartRaceValueAt = _chunkUUUTEVX6cjs.chartRaceValueAt; exports.chartRasterSize = chartRasterSize; exports.chartRgbToHex = _chunkBPX4Z3N3cjs.chartRgbToHex; exports.chartRgbToOklab = _chunkBPX4Z3N3cjs.chartRgbToOklab; exports.chartSankeyNodeValues = _chunkBPX4Z3N3cjs.chartSankeyNodeValues; exports.chartSankeyNodes = _chunkBPX4Z3N3cjs.chartSankeyNodes; exports.chartScaleFromPixel = _chunkUUUTEVX6cjs.chartScaleFromPixel; exports.chartScaleToPixel = _chunkUUUTEVX6cjs.chartScaleToPixel; exports.chartSceneToDomSpec = _chunkV5L2G22Rcjs.chartSceneToDomSpec; exports.chartSceneToSvg = _chunkV5L2G22Rcjs.chartSceneToSvg; exports.chartSerialToDate = _chunkUUUTEVX6cjs.chartSerialToDate; exports.chartSeriesColor = _chunkBPX4Z3N3cjs.chartSeriesColor; exports.chartSeriesType = _chunkBPX4Z3N3cjs.chartSeriesType; exports.chartSliceColor = _chunkBPX4Z3N3cjs.chartSliceColor; exports.chartSpecColorsByCategory = _chunkBPX4Z3N3cjs.chartSpecColorsByCategory; exports.chartSquarify = _chunkUUUTEVX6cjs.chartSquarify; exports.chartStyleDomain = chartStyleDomain; exports.chartStylePatch = chartStylePatch; exports.chartSupportsTrendlines = _chunkUUUTEVX6cjs.chartSupportsTrendlines; exports.chartTextBaseline = _chunkV5L2G22Rcjs.chartTextBaseline; exports.chartTextOn = _chunkBPX4Z3N3cjs.chartTextOn; exports.chartTextTransform = _chunkV5L2G22Rcjs.chartTextTransform; exports.chartToMermaid = _chunkV5L2G22Rcjs.chartToMermaid; exports.chartToOoxml = _chunkSZWVMB3Bcjs.chartToOoxml; exports.chartToSvg = _chunkV5L2G22Rcjs.chartToSvg; exports.chartTreeColumnLabels = _chunkBPX4Z3N3cjs.chartTreeColumnLabels; exports.chartTreeDepth = _chunkBPX4Z3N3cjs.chartTreeDepth; exports.chartTreeFromRows = _chunkBPX4Z3N3cjs.chartTreeFromRows; exports.chartTreeFromSeries = _chunkBPX4Z3N3cjs.chartTreeFromSeries; exports.chartTreeFromTable = _chunkBPX4Z3N3cjs.chartTreeFromTable; exports.chartTreeToRows = _chunkBPX4Z3N3cjs.chartTreeToRows; exports.chartTreeTotal = _chunkBPX4Z3N3cjs.chartTreeTotal; exports.chartTrendlineName = _chunkUUUTEVX6cjs.chartTrendlineName; exports.chartValueAtPoint = _chunkUUUTEVX6cjs.chartValueAtPoint; exports.chartVariesColors = _chunkBPX4Z3N3cjs.chartVariesColors; exports.chartXAtPoint = _chunkUUUTEVX6cjs.chartXAtPoint; exports.checkChartColors = _chunkBPX4Z3N3cjs.checkChartColors; exports.cloneChartSeries = _chunkBPX4Z3N3cjs.cloneChartSeries; exports.cloneChartSpec = _chunkBPX4Z3N3cjs.cloneChartSpec; exports.cloneChartTree = _chunkBPX4Z3N3cjs.cloneChartTree; exports.compileChartFormatCode = _chunkUUUTEVX6cjs.compileChartFormatCode; exports.contrastingTextColor = _chunkUUUTEVX6cjs.contrastingTextColor; exports.createChartCommands = createChartCommands; exports.createChartController = _chunkV5L2G22Rcjs.createChartController; exports.createChartEditorDocument = createChartEditorDocument; exports.createChartRasterizer = createChartRasterizer; exports.createChartSpec = _chunkBPX4Z3N3cjs.createChartSpec; exports.createChartStyleToolProvider = createChartStyleToolProvider; exports.createChartToolProvider = createChartToolProvider; exports.createInstantChartClock = createInstantChartClock; exports.createOfficeChartToolProvider = createOfficeChartToolProvider; exports.cyclePaletteColor = _chunkBPX4Z3N3cjs.cyclePaletteColor; exports.decimateChartPoints = _chunkUUUTEVX6cjs.decimateChartPoints; exports.defaultChartAxis = _chunkBPX4Z3N3cjs.defaultChartAxis; exports.defaultChartErrorBarValue = _chunkBPX4Z3N3cjs.defaultChartErrorBarValue; exports.describeChart = _chunkV5L2G22Rcjs.describeChart; exports.describeChartErrorBars = _chunkBPX4Z3N3cjs.describeChartErrorBars; exports.describeChartSelection = describeChartSelection; exports.describeOfficeChartPlace = describeOfficeChartPlace; exports.downloadChartPng = downloadChartPng; exports.easeChartTween = easeChartTween; exports.estimateChartTextWidth = _chunkUUUTEVX6cjs.estimateChartTextWidth; exports.extractDocxCharts = extractDocxCharts; exports.extractOfficeCharts = extractOfficeCharts; exports.extractPptxCharts = extractPptxCharts; exports.extractXlsxCharts = extractXlsxCharts; exports.findChartTreeNode = _chunkBPX4Z3N3cjs.findChartTreeNode; exports.findMermaidCharts = _chunkV5L2G22Rcjs.findMermaidCharts; exports.fitChartTrendline = _chunkUUUTEVX6cjs.fitChartTrendline; exports.formatChartAmountList = _chunkBPX4Z3N3cjs.formatChartAmountList; exports.formatChartDate = _chunkUUUTEVX6cjs.formatChartDate; exports.formatChartNumber = _chunkUUUTEVX6cjs.formatChartNumber; exports.formatChartValueWithCode = _chunkUUUTEVX6cjs.formatChartValueWithCode; exports.handleChartKey = handleChartKey; exports.isCartesianChart = _chunkBPX4Z3N3cjs.isCartesianChart; exports.isXyChart = _chunkBPX4Z3N3cjs.isXyChart; exports.layoutChart = _chunkUUUTEVX6cjs.layoutChart; exports.layoutSparkline = _chunkV5L2G22Rcjs.layoutSparkline; exports.linearMap = _chunkUUUTEVX6cjs.linearMap; exports.locateChartPoint = locateChartPoint; exports.monochromeChartPalette = _chunkV5L2G22Rcjs.monochromeChartPalette; exports.niceLogScale = _chunkUUUTEVX6cjs.niceLogScale; exports.niceScale = _chunkUUUTEVX6cjs.niceScale; exports.niceStep = _chunkUUUTEVX6cjs.niceStep; exports.normalizeChartAxis = _chunkBPX4Z3N3cjs.normalizeChartAxis; exports.normalizeChartErrorBars = _chunkBPX4Z3N3cjs.normalizeChartErrorBars; exports.normalizeChartLinks = _chunkBPX4Z3N3cjs.normalizeChartLinks; exports.normalizeChartReferenceBand = _chunkBPX4Z3N3cjs.normalizeChartReferenceBand; exports.normalizeChartReferenceLine = _chunkBPX4Z3N3cjs.normalizeChartReferenceLine; exports.normalizeChartSpec = _chunkBPX4Z3N3cjs.normalizeChartSpec; exports.normalizeChartTree = _chunkBPX4Z3N3cjs.normalizeChartTree; exports.normalizeChartTrendline = _chunkBPX4Z3N3cjs.normalizeChartTrendline; exports.normalizeChartValues = _chunkBPX4Z3N3cjs.normalizeChartValues; exports.parseChartAmountList = _chunkBPX4Z3N3cjs.parseChartAmountList; exports.parseChartColor = _chunkBPX4Z3N3cjs.parseChartColor; exports.parseChartDate = _chunkUUUTEVX6cjs.parseChartDate; exports.parseChartValue = _chunkBPX4Z3N3cjs.parseChartValue; exports.parsePartialChartJson = parsePartialChartJson; exports.planChartCommand = planChartCommand; exports.planChartToolPlayback = planChartToolPlayback; exports.rasterizeChartSvg = rasterizeChartSvg; exports.realChartClock = realChartClock; exports.recommendChartTypes = recommendChartTypes; exports.recommendForShape = recommendForShape; exports.removeChartTreeRow = _chunkBPX4Z3N3cjs.removeChartTreeRow; exports.resolveChartSvgPaints = resolveChartSvgPaints; exports.sameChartSelection = _chunkUUUTEVX6cjs.sameChartSelection; exports.setChartLinkField = _chunkBPX4Z3N3cjs.setChartLinkField; exports.setChartTreeRowName = _chunkBPX4Z3N3cjs.setChartTreeRowName; exports.setChartTreeRowValue = _chunkBPX4Z3N3cjs.setChartTreeRowValue; exports.shadeChartColor = _chunkBPX4Z3N3cjs.shadeChartColor; exports.simulateChartVision = _chunkBPX4Z3N3cjs.simulateChartVision; exports.snapChartDragValue = snapChartDragValue; exports.snapChartValue = _chunkUUUTEVX6cjs.snapChartValue; exports.sparklineToSvg = _chunkV5L2G22Rcjs.sparklineToSvg; exports.startChartPointDrag = startChartPointDrag; exports.stepDecimals = _chunkUUUTEVX6cjs.stepDecimals; exports.suggestChartReferences = _chunkUUUTEVX6cjs.suggestChartReferences; exports.summarizeChart = _chunkV5L2G22Rcjs.summarizeChart; exports.summarizeChartSeries = _chunkUUUTEVX6cjs.summarizeChartSeries; exports.trendNumberText = _chunkUUUTEVX6cjs.trendNumberText; exports.uniqueChartSeriesId = _chunkBPX4Z3N3cjs.uniqueChartSeriesId; exports.withChartPlayback = withChartPlayback;
3403
+
3404
+
3405
+
3406
+
3407
+
3408
+
3409
+
3410
+ exports.CHART_AXIS_KINDS = _chunkOUO3DSRTcjs.CHART_AXIS_KINDS; exports.CHART_AXIS_SCALES = _chunkOUO3DSRTcjs.CHART_AXIS_SCALES; exports.CHART_COLOR_SCHEMES = _chunk2F4GAZL5cjs.CHART_COLOR_SCHEMES; exports.CHART_CURVES = _chunkOUO3DSRTcjs.CHART_CURVES; exports.CHART_DATE_STEPS = _chunkWOIXNDHVcjs.CHART_DATE_STEPS; exports.CHART_ERROR_BAR_DIRECTIONS = _chunkOUO3DSRTcjs.CHART_ERROR_BAR_DIRECTIONS; exports.CHART_ERROR_BAR_LABELS = _chunkOUO3DSRTcjs.CHART_ERROR_BAR_LABELS; exports.CHART_ERROR_BAR_TYPES = _chunkOUO3DSRTcjs.CHART_ERROR_BAR_TYPES; exports.CHART_LABEL_POSITIONS = _chunkOUO3DSRTcjs.CHART_LABEL_POSITIONS; exports.CHART_LAYOUT_PRESETS = _chunk2F4GAZL5cjs.CHART_LAYOUT_PRESETS; exports.CHART_LEGEND_POSITIONS = _chunkOUO3DSRTcjs.CHART_LEGEND_POSITIONS; exports.CHART_LIKERT_NEUTRALS = _chunkOUO3DSRTcjs.CHART_LIKERT_NEUTRALS; exports.CHART_LIKERT_SORTS = _chunkOUO3DSRTcjs.CHART_LIKERT_SORTS; exports.CHART_MARKERS = _chunkOUO3DSRTcjs.CHART_MARKERS; exports.CHART_MERMAID_META_PREFIX = _chunk2F4GAZL5cjs.CHART_MERMAID_META_PREFIX; exports.CHART_NUMBER_STYLES = _chunkOUO3DSRTcjs.CHART_NUMBER_STYLES; exports.CHART_OOXML_CONTENT_TYPE = _chunkVKHJJUBKcjs.CHART_OOXML_CONTENT_TYPE; exports.CHART_OOXML_NS = _chunkVKHJJUBKcjs.CHART_OOXML_NS; exports.CHART_OOXML_RELATIONSHIP = _chunkVKHJJUBKcjs.CHART_OOXML_RELATIONSHIP; exports.CHART_ORIENTATIONS = _chunkOUO3DSRTcjs.CHART_ORIENTATIONS; exports.CHART_PALETTE_SHADES = _chunkOUO3DSRTcjs.CHART_PALETTE_SHADES; exports.CHART_PRESENCE_COLORS = CHART_PRESENCE_COLORS; exports.CHART_RADAR_GRATICULES = _chunkOUO3DSRTcjs.CHART_RADAR_GRATICULES; exports.CHART_RASTER_MAX_SIZE = CHART_RASTER_MAX_SIZE; exports.CHART_REFERENCE_AXES = _chunkOUO3DSRTcjs.CHART_REFERENCE_AXES; exports.CHART_SANKEY_LINK_COLORS = _chunkOUO3DSRTcjs.CHART_SANKEY_LINK_COLORS; exports.CHART_SERIES_TYPES = _chunkOUO3DSRTcjs.CHART_SERIES_TYPES; exports.CHART_STACKINGS = _chunkOUO3DSRTcjs.CHART_STACKINGS; exports.CHART_TRENDLINE_TYPES = _chunkOUO3DSRTcjs.CHART_TRENDLINE_TYPES; exports.CHART_TYPES = _chunkOUO3DSRTcjs.CHART_TYPES; exports.CHART_TYPE_LABELS = _chunkOUO3DSRTcjs.CHART_TYPE_LABELS; exports.CSS_VARIABLE_CHART_THEME = _chunkOUO3DSRTcjs.CSS_VARIABLE_CHART_THEME; exports.ChartController = _chunk2F4GAZL5cjs.ChartController; exports.ChartDirector = ChartDirector; exports.ChartPresence = ChartPresence; exports.ChartStream = ChartStream; exports.DEFAULT_CHART_PALETTE = _chunkOUO3DSRTcjs.DEFAULT_CHART_PALETTE; exports.DEFAULT_CHART_THEME = _chunkOUO3DSRTcjs.DEFAULT_CHART_THEME; exports.MAX_CHART_DATA_LABELS = _chunkWOIXNDHVcjs.MAX_CHART_DATA_LABELS; exports.MAX_CHART_LINE_POINTS = _chunkWOIXNDHVcjs.MAX_CHART_LINE_POINTS; exports.MAX_CHART_LINKS = _chunkOUO3DSRTcjs.MAX_CHART_LINKS; exports.MAX_CHART_MARKERS = _chunkWOIXNDHVcjs.MAX_CHART_MARKERS; exports.MAX_CHART_TREE_DEPTH = _chunkOUO3DSRTcjs.MAX_CHART_TREE_DEPTH; exports.MAX_CHART_TREE_NODES = _chunkOUO3DSRTcjs.MAX_CHART_TREE_NODES; exports.OfficeChartsError = OfficeChartsError; exports.RENDER_CHART_INSTRUCTIONS = RENDER_CHART_INSTRUCTIONS; exports.addChartLink = _chunkOUO3DSRTcjs.addChartLink; exports.addChartTreeRow = _chunkOUO3DSRTcjs.addChartTreeRow; exports.analyzeChartTable = analyzeChartTable; exports.blendChartScenes = blendChartScenes; exports.canDragChartPoint = canDragChartPoint; exports.chartBoxStats = _chunkWOIXNDHVcjs.chartBoxStats; exports.chartClientToScene = chartClientToScene; exports.chartColorDistance = _chunkOUO3DSRTcjs.chartColorDistance; exports.chartColorInputValue = _chunkOUO3DSRTcjs.chartColorInputValue; exports.chartColorsByCategory = _chunkOUO3DSRTcjs.chartColorsByCategory; exports.chartContrastRatio = _chunkOUO3DSRTcjs.chartContrastRatio; exports.chartDataFromTable = _chunkOUO3DSRTcjs.chartDataFromTable; exports.chartDataToTable = _chunkOUO3DSRTcjs.chartDataToTable; exports.chartDateLabels = _chunkWOIXNDHVcjs.chartDateLabels; exports.chartDateToSerial = _chunkWOIXNDHVcjs.chartDateToSerial; exports.chartErrorAmounts = _chunkOUO3DSRTcjs.chartErrorAmounts; exports.chartErrorBarsOfType = _chunkOUO3DSRTcjs.chartErrorBarsOfType; exports.chartFamily = _chunkOUO3DSRTcjs.chartFamily; exports.chartFileName = chartFileName; exports.chartFormatToCode = _chunkVKHJJUBKcjs.chartFormatToCode; exports.chartFromMermaid = _chunk2F4GAZL5cjs.chartFromMermaid; exports.chartFromOoxml = _chunkVKHJJUBKcjs.chartFromOoxml; exports.chartFromTable = chartFromTable; exports.chartHistogram = _chunkWOIXNDHVcjs.chartHistogram; exports.chartHitTest = chartHitTest; exports.chartLikertColor = _chunkOUO3DSRTcjs.chartLikertColor; exports.chartLinksFromTable = _chunkOUO3DSRTcjs.chartLinksFromTable; exports.chartLuminance = _chunkOUO3DSRTcjs.chartLuminance; exports.chartMapBreaks = _chunkWOIXNDHVcjs.chartMapBreaks; exports.chartMapClass = _chunkWOIXNDHVcjs.chartMapClass; exports.chartMapRamp = _chunkWOIXNDHVcjs.chartMapRamp; exports.chartMermaidFamily = _chunk2F4GAZL5cjs.chartMermaidFamily; exports.chartMovingAverage = _chunkWOIXNDHVcjs.chartMovingAverage; exports.chartPointAnchor = chartPointAnchor; exports.chartPointColor = _chunkOUO3DSRTcjs.chartPointColor; exports.chartPointRef = chartPointRef; exports.chartPresetPatch = _chunk2F4GAZL5cjs.chartPresetPatch; exports.chartQuantile = _chunkWOIXNDHVcjs.chartQuantile; exports.chartRaceMoment = _chunkWOIXNDHVcjs.chartRaceMoment; exports.chartRaceRanking = _chunkWOIXNDHVcjs.chartRaceRanking; exports.chartRaceValueAt = _chunkWOIXNDHVcjs.chartRaceValueAt; exports.chartRasterSize = chartRasterSize; exports.chartRgbToHex = _chunkOUO3DSRTcjs.chartRgbToHex; exports.chartRgbToOklab = _chunkOUO3DSRTcjs.chartRgbToOklab; exports.chartSankeyNodeValues = _chunkOUO3DSRTcjs.chartSankeyNodeValues; exports.chartSankeyNodes = _chunkOUO3DSRTcjs.chartSankeyNodes; exports.chartScaleFromPixel = _chunkWOIXNDHVcjs.chartScaleFromPixel; exports.chartScaleToPixel = _chunkWOIXNDHVcjs.chartScaleToPixel; exports.chartSceneToDomSpec = _chunk2F4GAZL5cjs.chartSceneToDomSpec; exports.chartSceneToSvg = _chunk2F4GAZL5cjs.chartSceneToSvg; exports.chartSerialToDate = _chunkWOIXNDHVcjs.chartSerialToDate; exports.chartSeriesColor = _chunkOUO3DSRTcjs.chartSeriesColor; exports.chartSeriesType = _chunkOUO3DSRTcjs.chartSeriesType; exports.chartSliceColor = _chunkOUO3DSRTcjs.chartSliceColor; exports.chartSpecColorsByCategory = _chunkOUO3DSRTcjs.chartSpecColorsByCategory; exports.chartSquarify = _chunkWOIXNDHVcjs.chartSquarify; exports.chartStyleDomain = chartStyleDomain; exports.chartStylePatch = chartStylePatch; exports.chartSupportsTrendlines = _chunkWOIXNDHVcjs.chartSupportsTrendlines; exports.chartTextBaseline = _chunk2F4GAZL5cjs.chartTextBaseline; exports.chartTextOn = _chunkOUO3DSRTcjs.chartTextOn; exports.chartTextTransform = _chunk2F4GAZL5cjs.chartTextTransform; exports.chartToMermaid = _chunk2F4GAZL5cjs.chartToMermaid; exports.chartToOoxml = _chunkVKHJJUBKcjs.chartToOoxml; exports.chartToSvg = _chunk2F4GAZL5cjs.chartToSvg; exports.chartTreeColumnLabels = _chunkOUO3DSRTcjs.chartTreeColumnLabels; exports.chartTreeDepth = _chunkOUO3DSRTcjs.chartTreeDepth; exports.chartTreeFromRows = _chunkOUO3DSRTcjs.chartTreeFromRows; exports.chartTreeFromSeries = _chunkOUO3DSRTcjs.chartTreeFromSeries; exports.chartTreeFromTable = _chunkOUO3DSRTcjs.chartTreeFromTable; exports.chartTreeToRows = _chunkOUO3DSRTcjs.chartTreeToRows; exports.chartTreeTotal = _chunkOUO3DSRTcjs.chartTreeTotal; exports.chartTrendlineName = _chunkWOIXNDHVcjs.chartTrendlineName; exports.chartValueAtPoint = _chunkWOIXNDHVcjs.chartValueAtPoint; exports.chartVariesColors = _chunkOUO3DSRTcjs.chartVariesColors; exports.chartXAtPoint = _chunkWOIXNDHVcjs.chartXAtPoint; exports.checkChartColors = _chunkOUO3DSRTcjs.checkChartColors; exports.cloneChartSeries = _chunkOUO3DSRTcjs.cloneChartSeries; exports.cloneChartSpec = _chunkOUO3DSRTcjs.cloneChartSpec; exports.cloneChartTree = _chunkOUO3DSRTcjs.cloneChartTree; exports.compileChartFormatCode = _chunkWOIXNDHVcjs.compileChartFormatCode; exports.contrastingTextColor = _chunkWOIXNDHVcjs.contrastingTextColor; exports.createChartCommands = createChartCommands; exports.createChartController = _chunk2F4GAZL5cjs.createChartController; exports.createChartEditorDocument = createChartEditorDocument; exports.createChartRasterizer = createChartRasterizer; exports.createChartSpec = _chunkOUO3DSRTcjs.createChartSpec; exports.createChartStyleToolProvider = createChartStyleToolProvider; exports.createChartToolProvider = createChartToolProvider; exports.createInstantChartClock = createInstantChartClock; exports.createOfficeChartToolProvider = createOfficeChartToolProvider; exports.cyclePaletteColor = _chunkOUO3DSRTcjs.cyclePaletteColor; exports.decimateChartPoints = _chunkWOIXNDHVcjs.decimateChartPoints; exports.defaultChartAxis = _chunkOUO3DSRTcjs.defaultChartAxis; exports.defaultChartErrorBarValue = _chunkOUO3DSRTcjs.defaultChartErrorBarValue; exports.describeChart = _chunk2F4GAZL5cjs.describeChart; exports.describeChartErrorBars = _chunkOUO3DSRTcjs.describeChartErrorBars; exports.describeChartSelection = describeChartSelection; exports.describeOfficeChartPlace = describeOfficeChartPlace; exports.downloadChartPng = downloadChartPng; exports.easeChartTween = easeChartTween; exports.estimateChartTextWidth = _chunkWOIXNDHVcjs.estimateChartTextWidth; exports.extractDocxCharts = extractDocxCharts; exports.extractOfficeCharts = extractOfficeCharts; exports.extractPptxCharts = extractPptxCharts; exports.extractXlsxCharts = extractXlsxCharts; exports.findChartTreeNode = _chunkOUO3DSRTcjs.findChartTreeNode; exports.findMermaidCharts = _chunk2F4GAZL5cjs.findMermaidCharts; exports.fitChartTrendline = _chunkWOIXNDHVcjs.fitChartTrendline; exports.formatChartAmountList = _chunkOUO3DSRTcjs.formatChartAmountList; exports.formatChartDate = _chunkWOIXNDHVcjs.formatChartDate; exports.formatChartNumber = _chunkWOIXNDHVcjs.formatChartNumber; exports.formatChartValueWithCode = _chunkWOIXNDHVcjs.formatChartValueWithCode; exports.getChartMap = _chunkWOIXNDHVcjs.getChartMap; exports.handleChartKey = handleChartKey; exports.isCartesianChart = _chunkOUO3DSRTcjs.isCartesianChart; exports.isXyChart = _chunkOUO3DSRTcjs.isXyChart; exports.layoutChart = _chunkWOIXNDHVcjs.layoutChart; exports.layoutSparkline = _chunk2F4GAZL5cjs.layoutSparkline; exports.linearMap = _chunkWOIXNDHVcjs.linearMap; exports.listChartMaps = _chunkWOIXNDHVcjs.listChartMaps; exports.locateChartPoint = locateChartPoint; exports.matchChartMapRegions = _chunkWOIXNDHVcjs.matchChartMapRegions; exports.monochromeChartPalette = _chunk2F4GAZL5cjs.monochromeChartPalette; exports.niceLogScale = _chunkWOIXNDHVcjs.niceLogScale; exports.niceScale = _chunkWOIXNDHVcjs.niceScale; exports.niceStep = _chunkWOIXNDHVcjs.niceStep; exports.normalizeChartAxis = _chunkOUO3DSRTcjs.normalizeChartAxis; exports.normalizeChartErrorBars = _chunkOUO3DSRTcjs.normalizeChartErrorBars; exports.normalizeChartLinks = _chunkOUO3DSRTcjs.normalizeChartLinks; exports.normalizeChartReferenceBand = _chunkOUO3DSRTcjs.normalizeChartReferenceBand; exports.normalizeChartReferenceLine = _chunkOUO3DSRTcjs.normalizeChartReferenceLine; exports.normalizeChartSpec = _chunkOUO3DSRTcjs.normalizeChartSpec; exports.normalizeChartTree = _chunkOUO3DSRTcjs.normalizeChartTree; exports.normalizeChartTrendline = _chunkOUO3DSRTcjs.normalizeChartTrendline; exports.normalizeChartValues = _chunkOUO3DSRTcjs.normalizeChartValues; exports.parseChartAmountList = _chunkOUO3DSRTcjs.parseChartAmountList; exports.parseChartColor = _chunkOUO3DSRTcjs.parseChartColor; exports.parseChartDate = _chunkWOIXNDHVcjs.parseChartDate; exports.parseChartValue = _chunkOUO3DSRTcjs.parseChartValue; exports.parsePartialChartJson = parsePartialChartJson; exports.planChartCommand = planChartCommand; exports.planChartToolPlayback = planChartToolPlayback; exports.rasterizeChartSvg = rasterizeChartSvg; exports.realChartClock = realChartClock; exports.recommendChartTypes = recommendChartTypes; exports.recommendForShape = recommendForShape; exports.registerChartMap = _chunkWOIXNDHVcjs.registerChartMap; exports.removeChartTreeRow = _chunkOUO3DSRTcjs.removeChartTreeRow; exports.resolveChartSvgPaints = resolveChartSvgPaints; exports.sameChartSelection = _chunkWOIXNDHVcjs.sameChartSelection; exports.setChartLinkField = _chunkOUO3DSRTcjs.setChartLinkField; exports.setChartTreeRowName = _chunkOUO3DSRTcjs.setChartTreeRowName; exports.setChartTreeRowValue = _chunkOUO3DSRTcjs.setChartTreeRowValue; exports.shadeChartColor = _chunkOUO3DSRTcjs.shadeChartColor; exports.simulateChartVision = _chunkOUO3DSRTcjs.simulateChartVision; exports.snapChartDragValue = snapChartDragValue; exports.snapChartValue = _chunkWOIXNDHVcjs.snapChartValue; exports.sparklineToSvg = _chunk2F4GAZL5cjs.sparklineToSvg; exports.startChartPointDrag = startChartPointDrag; exports.stepDecimals = _chunkWOIXNDHVcjs.stepDecimals; exports.suggestChartReferences = _chunkWOIXNDHVcjs.suggestChartReferences; exports.summarizeChart = _chunk2F4GAZL5cjs.summarizeChart; exports.summarizeChartSeries = _chunkWOIXNDHVcjs.summarizeChartSeries; exports.trendNumberText = _chunkWOIXNDHVcjs.trendNumberText; exports.uniqueChartSeriesId = _chunkOUO3DSRTcjs.uniqueChartSeriesId; exports.withChartPlayback = withChartPlayback;