schematex 0.9.2 → 0.9.3

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 (174) hide show
  1. package/README.md +21 -0
  2. package/dist/ai/ai-sdk.cjs +23 -23
  3. package/dist/ai/ai-sdk.d.cts +3 -3
  4. package/dist/ai/ai-sdk.d.ts +3 -3
  5. package/dist/ai/ai-sdk.js +18 -18
  6. package/dist/ai/index.cjs +32 -32
  7. package/dist/ai/index.d.cts +4 -4
  8. package/dist/ai/index.d.ts +4 -4
  9. package/dist/ai/index.js +19 -19
  10. package/dist/{api-OED2jUVj.d.ts → api-B7C7qGiG.d.cts} +2 -2
  11. package/dist/{api-BDMaX1cT.d.cts → api-DXOhuK3e.d.ts} +2 -2
  12. package/dist/browser.cjs +24 -24
  13. package/dist/browser.d.cts +3 -3
  14. package/dist/browser.d.ts +3 -3
  15. package/dist/browser.js +18 -18
  16. package/dist/{chunk-7SVB3XA7.js → chunk-4CLAD7VZ.js} +3 -3
  17. package/dist/{chunk-7SVB3XA7.js.map → chunk-4CLAD7VZ.js.map} +1 -1
  18. package/dist/{chunk-KR7PPCC4.js → chunk-6GHXO3WQ.js} +3 -3
  19. package/dist/{chunk-KR7PPCC4.js.map → chunk-6GHXO3WQ.js.map} +1 -1
  20. package/dist/{chunk-PSQGLE6U.cjs → chunk-6W6RFZND.cjs} +5 -5
  21. package/dist/{chunk-PSQGLE6U.cjs.map → chunk-6W6RFZND.cjs.map} +1 -1
  22. package/dist/{chunk-VMUNKEB2.js → chunk-7P4C5DMD.js} +3 -3
  23. package/dist/chunk-7P4C5DMD.js.map +1 -0
  24. package/dist/{chunk-GYTU7L4L.cjs → chunk-AEZVCGH4.cjs} +12 -12
  25. package/dist/{chunk-GYTU7L4L.cjs.map → chunk-AEZVCGH4.cjs.map} +1 -1
  26. package/dist/{chunk-NTQBNBBP.cjs → chunk-AHSSFGDJ.cjs} +2777 -273
  27. package/dist/chunk-AHSSFGDJ.cjs.map +1 -0
  28. package/dist/{chunk-XA6XIAMN.cjs → chunk-ATE7LD6I.cjs} +4 -4
  29. package/dist/{chunk-XA6XIAMN.cjs.map → chunk-ATE7LD6I.cjs.map} +1 -1
  30. package/dist/{chunk-TP7LQ5PF.js → chunk-BP6MLXJU.js} +2596 -93
  31. package/dist/chunk-BP6MLXJU.js.map +1 -0
  32. package/dist/{chunk-2A5HJFOX.cjs → chunk-BXS53MLV.cjs} +4 -4
  33. package/dist/{chunk-2A5HJFOX.cjs.map → chunk-BXS53MLV.cjs.map} +1 -1
  34. package/dist/{chunk-HILYXWGJ.cjs → chunk-C2BNO3CI.cjs} +12 -12
  35. package/dist/{chunk-HILYXWGJ.cjs.map → chunk-C2BNO3CI.cjs.map} +1 -1
  36. package/dist/{chunk-NT6VVMLW.cjs → chunk-CAAMBDEN.cjs} +60 -4
  37. package/dist/chunk-CAAMBDEN.cjs.map +1 -0
  38. package/dist/{chunk-TYEQC7PV.js → chunk-D4QZ6UDO.js} +59 -5
  39. package/dist/chunk-D4QZ6UDO.js.map +1 -0
  40. package/dist/{chunk-MYVY55DO.cjs → chunk-FFAJQ36U.cjs} +15 -15
  41. package/dist/{chunk-MYVY55DO.cjs.map → chunk-FFAJQ36U.cjs.map} +1 -1
  42. package/dist/{chunk-VYAUTNHC.cjs → chunk-IOD2EFMX.cjs} +4 -4
  43. package/dist/{chunk-VYAUTNHC.cjs.map → chunk-IOD2EFMX.cjs.map} +1 -1
  44. package/dist/{chunk-WFVRUUJW.cjs → chunk-IU26USXA.cjs} +4 -4
  45. package/dist/{chunk-WFVRUUJW.cjs.map → chunk-IU26USXA.cjs.map} +1 -1
  46. package/dist/{chunk-CURAZVOH.js → chunk-JCJWSW5Y.js} +406 -4
  47. package/dist/chunk-JCJWSW5Y.js.map +1 -0
  48. package/dist/{chunk-IQLZUCWI.js → chunk-JEQGWH5N.js} +3 -3
  49. package/dist/{chunk-IQLZUCWI.js.map → chunk-JEQGWH5N.js.map} +1 -1
  50. package/dist/{chunk-L2NY4XEY.cjs → chunk-JYAL26WQ.cjs} +4 -4
  51. package/dist/chunk-JYAL26WQ.cjs.map +1 -0
  52. package/dist/{chunk-3DSNGR26.cjs → chunk-LFJE64RD.cjs} +408 -6
  53. package/dist/chunk-LFJE64RD.cjs.map +1 -0
  54. package/dist/{chunk-7JJQEECD.cjs → chunk-MZWVJFTV.cjs} +15 -15
  55. package/dist/{chunk-7JJQEECD.cjs.map → chunk-MZWVJFTV.cjs.map} +1 -1
  56. package/dist/{chunk-2ASZMLC3.cjs → chunk-O6A2GJLI.cjs} +4 -4
  57. package/dist/{chunk-2ASZMLC3.cjs.map → chunk-O6A2GJLI.cjs.map} +1 -1
  58. package/dist/{chunk-VWIKDJNV.js → chunk-OND4N5ZZ.js} +3 -3
  59. package/dist/{chunk-VWIKDJNV.js.map → chunk-OND4N5ZZ.js.map} +1 -1
  60. package/dist/{chunk-7Z2GDS4G.js → chunk-PUD7PIY5.js} +3 -3
  61. package/dist/{chunk-7Z2GDS4G.js.map → chunk-PUD7PIY5.js.map} +1 -1
  62. package/dist/{chunk-2RFFCZ3I.js → chunk-PZCYFT2A.js} +3 -3
  63. package/dist/{chunk-2RFFCZ3I.js.map → chunk-PZCYFT2A.js.map} +1 -1
  64. package/dist/{chunk-MERU76LW.js → chunk-QHZEGWE7.js} +3 -3
  65. package/dist/{chunk-MERU76LW.js.map → chunk-QHZEGWE7.js.map} +1 -1
  66. package/dist/{chunk-56DSMSXK.js → chunk-TDSGQT7R.js} +3 -3
  67. package/dist/{chunk-56DSMSXK.js.map → chunk-TDSGQT7R.js.map} +1 -1
  68. package/dist/{chunk-MUE45N2A.cjs → chunk-TFNH2NLJ.cjs} +4 -4
  69. package/dist/{chunk-MUE45N2A.cjs.map → chunk-TFNH2NLJ.cjs.map} +1 -1
  70. package/dist/{chunk-JR6JNQEZ.js → chunk-U4AJLMHC.js} +3 -3
  71. package/dist/{chunk-JR6JNQEZ.js.map → chunk-U4AJLMHC.js.map} +1 -1
  72. package/dist/{chunk-TWTUIUNK.js → chunk-UNLLWCQK.js} +3 -3
  73. package/dist/{chunk-TWTUIUNK.js.map → chunk-UNLLWCQK.js.map} +1 -1
  74. package/dist/{chunk-4MGALM2C.cjs → chunk-VG5LP5A4.cjs} +4 -4
  75. package/dist/{chunk-4MGALM2C.cjs.map → chunk-VG5LP5A4.cjs.map} +1 -1
  76. package/dist/{chunk-6BJKQULN.cjs → chunk-VOFND6ZQ.cjs} +4 -4
  77. package/dist/{chunk-6BJKQULN.cjs.map → chunk-VOFND6ZQ.cjs.map} +1 -1
  78. package/dist/{chunk-VY4JOTM2.js → chunk-X3GEGVW2.js} +3 -3
  79. package/dist/{chunk-VY4JOTM2.js.map → chunk-X3GEGVW2.js.map} +1 -1
  80. package/dist/{chunk-TMAOPJCT.js → chunk-XAYD5NVJ.js} +3 -3
  81. package/dist/{chunk-TMAOPJCT.js.map → chunk-XAYD5NVJ.js.map} +1 -1
  82. package/dist/{chunk-V3JTVTPY.cjs → chunk-Y4OBXYGW.cjs} +12 -12
  83. package/dist/{chunk-V3JTVTPY.cjs.map → chunk-Y4OBXYGW.cjs.map} +1 -1
  84. package/dist/{chunk-VZVREOTM.js → chunk-ZQECHIBI.js} +3 -3
  85. package/dist/{chunk-VZVREOTM.js.map → chunk-ZQECHIBI.js.map} +1 -1
  86. package/dist/{chunk-HJA7MIMV.js → chunk-ZUK4BY55.js} +3 -3
  87. package/dist/{chunk-HJA7MIMV.js.map → chunk-ZUK4BY55.js.map} +1 -1
  88. package/dist/{diagnostics-hObcaaFC.d.ts → diagnostics-fyjWjeDa.d.cts} +1 -1
  89. package/dist/{diagnostics-hObcaaFC.d.cts → diagnostics-fyjWjeDa.d.ts} +1 -1
  90. package/dist/diagrams/blockdiagram/index.cjs +6 -6
  91. package/dist/diagrams/blockdiagram/index.d.cts +1 -1
  92. package/dist/diagrams/blockdiagram/index.d.ts +1 -1
  93. package/dist/diagrams/blockdiagram/index.js +2 -2
  94. package/dist/diagrams/circuit/index.cjs +9 -9
  95. package/dist/diagrams/circuit/index.d.cts +1 -1
  96. package/dist/diagrams/circuit/index.d.ts +1 -1
  97. package/dist/diagrams/circuit/index.js +2 -2
  98. package/dist/diagrams/ecomap/index.cjs +7 -7
  99. package/dist/diagrams/ecomap/index.d.cts +1 -1
  100. package/dist/diagrams/ecomap/index.d.ts +1 -1
  101. package/dist/diagrams/ecomap/index.js +2 -2
  102. package/dist/diagrams/entity/index.cjs +6 -6
  103. package/dist/diagrams/entity/index.d.cts +1 -1
  104. package/dist/diagrams/entity/index.d.ts +1 -1
  105. package/dist/diagrams/entity/index.js +2 -2
  106. package/dist/diagrams/fishbone/index.cjs +8 -8
  107. package/dist/diagrams/fishbone/index.d.cts +1 -1
  108. package/dist/diagrams/fishbone/index.d.ts +1 -1
  109. package/dist/diagrams/fishbone/index.js +2 -2
  110. package/dist/diagrams/flowchart/index.cjs +8 -8
  111. package/dist/diagrams/flowchart/index.d.cts +2 -2
  112. package/dist/diagrams/flowchart/index.d.ts +2 -2
  113. package/dist/diagrams/flowchart/index.js +2 -2
  114. package/dist/diagrams/genogram/index.cjs +9 -9
  115. package/dist/diagrams/genogram/index.d.cts +1 -1
  116. package/dist/diagrams/genogram/index.d.ts +1 -1
  117. package/dist/diagrams/genogram/index.js +2 -2
  118. package/dist/diagrams/ladder/index.cjs +6 -6
  119. package/dist/diagrams/ladder/index.d.cts +1 -1
  120. package/dist/diagrams/ladder/index.d.ts +1 -1
  121. package/dist/diagrams/ladder/index.js +2 -2
  122. package/dist/diagrams/logic/index.cjs +8 -8
  123. package/dist/diagrams/logic/index.d.cts +1 -1
  124. package/dist/diagrams/logic/index.d.ts +1 -1
  125. package/dist/diagrams/logic/index.js +2 -2
  126. package/dist/diagrams/orgchart/index.cjs +8 -8
  127. package/dist/diagrams/orgchart/index.d.cts +1 -1
  128. package/dist/diagrams/orgchart/index.d.ts +1 -1
  129. package/dist/diagrams/orgchart/index.js +2 -2
  130. package/dist/diagrams/pedigree/index.cjs +7 -7
  131. package/dist/diagrams/pedigree/index.d.cts +1 -1
  132. package/dist/diagrams/pedigree/index.d.ts +1 -1
  133. package/dist/diagrams/pedigree/index.js +2 -2
  134. package/dist/diagrams/phylo/index.cjs +7 -7
  135. package/dist/diagrams/phylo/index.d.cts +1 -1
  136. package/dist/diagrams/phylo/index.d.ts +1 -1
  137. package/dist/diagrams/phylo/index.js +2 -2
  138. package/dist/diagrams/sld/index.cjs +8 -8
  139. package/dist/diagrams/sld/index.d.cts +1 -1
  140. package/dist/diagrams/sld/index.d.ts +1 -1
  141. package/dist/diagrams/sld/index.js +2 -2
  142. package/dist/diagrams/sociogram/index.cjs +6 -6
  143. package/dist/diagrams/sociogram/index.d.cts +1 -1
  144. package/dist/diagrams/sociogram/index.d.ts +1 -1
  145. package/dist/diagrams/sociogram/index.js +2 -2
  146. package/dist/diagrams/timing/index.d.cts +1 -1
  147. package/dist/diagrams/timing/index.d.ts +1 -1
  148. package/dist/diagrams/venn/index.cjs +9 -9
  149. package/dist/diagrams/venn/index.d.cts +1 -1
  150. package/dist/diagrams/venn/index.d.ts +1 -1
  151. package/dist/diagrams/venn/index.js +2 -2
  152. package/dist/{index-Cq8y1aaa.d.ts → index-CFaKjWPy.d.ts} +1 -1
  153. package/dist/{index-BiXWjQht.d.cts → index-DZNmJWGg.d.cts} +1 -1
  154. package/dist/index.cjs +111 -85
  155. package/dist/index.cjs.map +1 -1
  156. package/dist/index.d.cts +4 -4
  157. package/dist/index.d.ts +4 -4
  158. package/dist/index.js +48 -22
  159. package/dist/index.js.map +1 -1
  160. package/dist/react.cjs +18 -18
  161. package/dist/react.d.cts +2 -2
  162. package/dist/react.d.ts +2 -2
  163. package/dist/react.js +17 -17
  164. package/dist/{tools-BbTuTWs_.d.ts → tools-BDNih0Mb.d.ts} +3 -3
  165. package/dist/{tools-D5dkAqNy.d.cts → tools-C23t_WeN.d.cts} +3 -3
  166. package/package.json +1 -1
  167. package/dist/chunk-3DSNGR26.cjs.map +0 -1
  168. package/dist/chunk-CURAZVOH.js.map +0 -1
  169. package/dist/chunk-L2NY4XEY.cjs.map +0 -1
  170. package/dist/chunk-NT6VVMLW.cjs.map +0 -1
  171. package/dist/chunk-NTQBNBBP.cjs.map +0 -1
  172. package/dist/chunk-TP7LQ5PF.js.map +0 -1
  173. package/dist/chunk-TYEQC7PV.js.map +0 -1
  174. package/dist/chunk-VMUNKEB2.js.map +0 -1
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
 
3
- var chunk6BJKQULN_cjs = require('./chunk-6BJKQULN.cjs');
4
- var chunkXA6XIAMN_cjs = require('./chunk-XA6XIAMN.cjs');
5
- var chunk2ASZMLC3_cjs = require('./chunk-2ASZMLC3.cjs');
6
- var chunkWFVRUUJW_cjs = require('./chunk-WFVRUUJW.cjs');
7
- var chunkL2NY4XEY_cjs = require('./chunk-L2NY4XEY.cjs');
8
- var chunkVYAUTNHC_cjs = require('./chunk-VYAUTNHC.cjs');
9
- var chunkPSQGLE6U_cjs = require('./chunk-PSQGLE6U.cjs');
10
- var chunk2A5HJFOX_cjs = require('./chunk-2A5HJFOX.cjs');
11
- var chunkMUE45N2A_cjs = require('./chunk-MUE45N2A.cjs');
12
- var chunk7JJQEECD_cjs = require('./chunk-7JJQEECD.cjs');
13
- var chunkV3JTVTPY_cjs = require('./chunk-V3JTVTPY.cjs');
14
- var chunkGYTU7L4L_cjs = require('./chunk-GYTU7L4L.cjs');
3
+ var chunkVOFND6ZQ_cjs = require('./chunk-VOFND6ZQ.cjs');
4
+ var chunkATE7LD6I_cjs = require('./chunk-ATE7LD6I.cjs');
5
+ var chunkO6A2GJLI_cjs = require('./chunk-O6A2GJLI.cjs');
6
+ var chunkIU26USXA_cjs = require('./chunk-IU26USXA.cjs');
7
+ var chunkJYAL26WQ_cjs = require('./chunk-JYAL26WQ.cjs');
8
+ var chunkIOD2EFMX_cjs = require('./chunk-IOD2EFMX.cjs');
9
+ var chunk6W6RFZND_cjs = require('./chunk-6W6RFZND.cjs');
10
+ var chunkBXS53MLV_cjs = require('./chunk-BXS53MLV.cjs');
11
+ var chunkTFNH2NLJ_cjs = require('./chunk-TFNH2NLJ.cjs');
12
+ var chunkMZWVJFTV_cjs = require('./chunk-MZWVJFTV.cjs');
13
+ var chunkY4OBXYGW_cjs = require('./chunk-Y4OBXYGW.cjs');
14
+ var chunkAEZVCGH4_cjs = require('./chunk-AEZVCGH4.cjs');
15
15
  var chunk3KRL2EGN_cjs = require('./chunk-3KRL2EGN.cjs');
16
- var chunkMYVY55DO_cjs = require('./chunk-MYVY55DO.cjs');
17
- var chunkHILYXWGJ_cjs = require('./chunk-HILYXWGJ.cjs');
16
+ var chunkFFAJQ36U_cjs = require('./chunk-FFAJQ36U.cjs');
17
+ var chunkC2BNO3CI_cjs = require('./chunk-C2BNO3CI.cjs');
18
18
  var chunkJHJJT5H5_cjs = require('./chunk-JHJJT5H5.cjs');
19
- var chunk4MGALM2C_cjs = require('./chunk-4MGALM2C.cjs');
20
- var chunkNT6VVMLW_cjs = require('./chunk-NT6VVMLW.cjs');
19
+ var chunkVG5LP5A4_cjs = require('./chunk-VG5LP5A4.cjs');
20
+ var chunkCAAMBDEN_cjs = require('./chunk-CAAMBDEN.cjs');
21
21
  var chunkVHDSPI6A_cjs = require('./chunk-VHDSPI6A.cjs');
22
22
  var chunk3WNW5Y7P_cjs = require('./chunk-3WNW5Y7P.cjs');
23
23
 
@@ -1211,7 +1211,7 @@ function round2(n) {
1211
1211
  return Math.round(n * 100) / 100;
1212
1212
  }
1213
1213
  function renderInfluence(ast, config) {
1214
- const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
1214
+ const t = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
1215
1215
  const layout = layoutInfluence(ast);
1216
1216
  const titleOffset = ast.title ? 36 : 10;
1217
1217
  const width = Math.ceil(layout.width);
@@ -1577,7 +1577,7 @@ function wrapText(text2, maxChars) {
1577
1577
  }
1578
1578
  function renderDecisionTree(ast, config) {
1579
1579
  if ("arcs" in ast) return renderInfluence(ast, config);
1580
- const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
1580
+ const t = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
1581
1581
  const layout = layoutDecisionTree(ast);
1582
1582
  const titleOffset = ast.title ? 36 : 10;
1583
1583
  const width = Math.ceil(layout.width);
@@ -2285,11 +2285,11 @@ function layoutSwimlane(ast) {
2285
2285
  ];
2286
2286
  let labelY = candidates[0];
2287
2287
  for (const y of candidates) {
2288
- const box = { x1: x - labelW / 2, x2: x + labelW / 2, y };
2289
- const collide = labelBoxes.some((b) => Math.abs(b.y - box.y) < 13 && b.x1 < box.x2 && b.x2 > box.x1);
2288
+ const box2 = { x1: x - labelW / 2, x2: x + labelW / 2, y };
2289
+ const collide = labelBoxes.some((b) => Math.abs(b.y - box2.y) < 13 && b.x1 < box2.x2 && b.x2 > box2.x1);
2290
2290
  if (!collide) {
2291
2291
  labelY = y;
2292
- labelBoxes.push(box);
2292
+ labelBoxes.push(box2);
2293
2293
  break;
2294
2294
  }
2295
2295
  }
@@ -2450,10 +2450,10 @@ function layoutGantt(ast) {
2450
2450
  let labelY = pinZoneTop + 12;
2451
2451
  let step = 0;
2452
2452
  while (step < 4) {
2453
- const box = { x1: x - labelW / 2, x2: x + labelW / 2, y: labelY };
2454
- const collide = pinBoxes.some((b) => Math.abs(b.y - box.y) < 14 && b.x1 < box.x2 && b.x2 > box.x1);
2453
+ const box2 = { x1: x - labelW / 2, x2: x + labelW / 2, y: labelY };
2454
+ const collide = pinBoxes.some((b) => Math.abs(b.y - box2.y) < 14 && b.x1 < box2.x2 && b.x2 > box2.x1);
2455
2455
  if (!collide) {
2456
- pinBoxes.push(box);
2456
+ pinBoxes.push(box2);
2457
2457
  break;
2458
2458
  }
2459
2459
  labelY += 16;
@@ -2650,7 +2650,7 @@ var ERA_ROW_GAP = 2;
2650
2650
  function renderTimeline(src, config) {
2651
2651
  const ast = parseTimeline(src);
2652
2652
  const layout = layoutTimeline(ast);
2653
- const theme = chunkNT6VVMLW_cjs.resolveTimelineTheme(config?.theme ?? "default");
2653
+ const theme = chunkCAAMBDEN_cjs.resolveTimelineTheme(config?.theme ?? "default");
2654
2654
  const styleBlock = styleForTheme(theme, config?.fontFamily);
2655
2655
  const children = [
2656
2656
  chunk3WNW5Y7P_cjs.title(ast.title ? `Timeline \u2014 ${ast.title}` : "Timeline"),
@@ -2695,7 +2695,7 @@ function renderTimeline(src, config) {
2695
2695
  function styleForTheme(theme, fontFamily) {
2696
2696
  const font = fontFamily ?? "system-ui, -apple-system, sans-serif";
2697
2697
  return `
2698
- .st-timeline { ${chunkNT6VVMLW_cjs.cssCustomProperties(theme)}
2698
+ .st-timeline { ${chunkCAAMBDEN_cjs.cssCustomProperties(theme)}
2699
2699
  --st-axis: ${theme.axis};
2700
2700
  --st-axis-label: ${theme.axisLabel};
2701
2701
  --st-era-label: ${theme.eraLabel};
@@ -3831,7 +3831,7 @@ function layoutStateDiagram(ast) {
3831
3831
  }
3832
3832
  return true;
3833
3833
  });
3834
- const fcResult = chunkMUE45N2A_cjs.layoutFlowchart(fcAst);
3834
+ const fcResult = chunkTFNH2NLJ_cjs.layoutFlowchart(fcAst);
3835
3835
  const stateById = /* @__PURE__ */ new Map();
3836
3836
  const collectStates = (s) => {
3837
3837
  stateById.set(s.id, s);
@@ -4406,7 +4406,7 @@ function renderNote(n) {
4406
4406
  }
4407
4407
  function renderStateDiagram(ast, config) {
4408
4408
  const layout = layoutStateDiagram(ast);
4409
- return renderLayout(layout, chunkNT6VVMLW_cjs.resolveStateTheme(config?.theme ?? "default"));
4409
+ return renderLayout(layout, chunkCAAMBDEN_cjs.resolveStateTheme(config?.theme ?? "default"));
4410
4410
  }
4411
4411
  function renderLayout(layout, t) {
4412
4412
  const titleNode = layout.title ? chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 22, class: "lt-title", "text-anchor": "middle" }, layout.title) : "";
@@ -7455,10 +7455,10 @@ function arrowMarker(t) {
7455
7455
  )
7456
7456
  ]);
7457
7457
  }
7458
- function classForBox(box) {
7459
- if (box.variant === "previous") return "prisma-stage-previous";
7460
- const base = box.variant === "exclusion" ? "prisma-exclusion" : "prisma-stage";
7461
- return `${base} prisma-stage-${box.stage}`;
7458
+ function classForBox(box2) {
7459
+ if (box2.variant === "previous") return "prisma-stage-previous";
7460
+ const base = box2.variant === "exclusion" ? "prisma-exclusion" : "prisma-stage";
7461
+ return `${base} prisma-stage-${box2.stage}`;
7462
7462
  }
7463
7463
  function classForLine(style) {
7464
7464
  switch (style) {
@@ -7542,22 +7542,22 @@ function renderHeader(h) {
7542
7542
  );
7543
7543
  return chunk3WNW5Y7P_cjs.group({ "data-header": h.column }, [r6, ...lines]);
7544
7544
  }
7545
- function renderBox(box) {
7545
+ function renderBox(box2) {
7546
7546
  const r6 = chunk3WNW5Y7P_cjs.rect({
7547
- x: box.x,
7548
- y: box.y,
7549
- width: box.width,
7550
- height: box.height,
7547
+ x: box2.x,
7548
+ y: box2.y,
7549
+ width: box2.width,
7550
+ height: box2.height,
7551
7551
  rx: PRISMA_CONST.BOX_RADIUS,
7552
7552
  ry: PRISMA_CONST.BOX_RADIUS,
7553
- class: classForBox(box),
7554
- "data-role": box.role
7553
+ class: classForBox(box2),
7554
+ "data-role": box2.role
7555
7555
  });
7556
- const innerLeft = box.x + PRISMA_CONST.BOX_PAD_X;
7557
- const innerRight = box.x + box.width - PRISMA_CONST.BOX_PAD_X;
7558
- const centerX = box.x + box.width / 2;
7556
+ const innerLeft = box2.x + PRISMA_CONST.BOX_PAD_X;
7557
+ const innerRight = box2.x + box2.width - PRISMA_CONST.BOX_PAD_X;
7558
+ const centerX = box2.x + box2.width / 2;
7559
7559
  let widestIndented = 0;
7560
- for (const line2 of box.lines) {
7560
+ for (const line2 of box2.lines) {
7561
7561
  if ((line2.indent ?? 0) > 0) {
7562
7562
  const w = approxLineWidth(line2);
7563
7563
  if (w > widestIndented) widestIndented = w;
@@ -7567,9 +7567,9 @@ function renderBox(box) {
7567
7567
  innerLeft,
7568
7568
  Math.min(centerX - widestIndented / 2, innerRight - widestIndented)
7569
7569
  );
7570
- let textY = box.y + PRISMA_CONST.BOX_PAD_Y;
7570
+ let textY = box2.y + PRISMA_CONST.BOX_PAD_Y;
7571
7571
  const textEls = [];
7572
- for (const line2 of box.lines) {
7572
+ for (const line2 of box2.lines) {
7573
7573
  const lh = lineHeightForLine(line2.style);
7574
7574
  const baseline = textY + Math.round(lh * 0.75);
7575
7575
  const indented = (line2.indent ?? 0) > 0;
@@ -7597,9 +7597,9 @@ function renderBox(box) {
7597
7597
  }
7598
7598
  return chunk3WNW5Y7P_cjs.group(
7599
7599
  {
7600
- "data-prisma-role": box.role,
7601
- "data-prisma-variant": box.variant,
7602
- "data-prisma-stage": box.stage
7600
+ "data-prisma-role": box2.role,
7601
+ "data-prisma-variant": box2.variant,
7602
+ "data-prisma-stage": box2.stage
7603
7603
  },
7604
7604
  [r6, ...textEls]
7605
7605
  );
@@ -7609,7 +7609,7 @@ function approxLineWidth(line2) {
7609
7609
  return line2.text.length * charW;
7610
7610
  }
7611
7611
  function renderPrismaLayout(layout, config) {
7612
- const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
7612
+ const t = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
7613
7613
  const children = [];
7614
7614
  children.push(chunk3WNW5Y7P_cjs.title(layout.title ?? "PRISMA 2020 flow diagram"));
7615
7615
  children.push(
@@ -8530,7 +8530,7 @@ function layoutUsecase(ast) {
8530
8530
  const y = cy - h / 2;
8531
8531
  const anchorX = side === "left" ? x + w : x;
8532
8532
  const anchorY = isRect ? cy : cy - 6;
8533
- const box = {
8533
+ const box2 = {
8534
8534
  actor: a,
8535
8535
  x,
8536
8536
  y,
@@ -8540,8 +8540,8 @@ function layoutUsecase(ast) {
8540
8540
  anchorX,
8541
8541
  anchorY
8542
8542
  };
8543
- actorBoxes.push(box);
8544
- actorById2.set(a.id, box);
8543
+ actorBoxes.push(box2);
8544
+ actorById2.set(a.id, box2);
8545
8545
  cy += C2.ACTOR_PITCH;
8546
8546
  }
8547
8547
  }
@@ -9080,7 +9080,7 @@ function renderTree(tr) {
9080
9080
  );
9081
9081
  }
9082
9082
  function renderUsecaseLayout(layout, config) {
9083
- const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
9083
+ const t = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
9084
9084
  const children = [];
9085
9085
  const nInclude = layout.ast.relations.filter((r6) => r6.kind === "include").length;
9086
9086
  const nExtend = layout.ast.relations.filter((r6) => r6.kind === "extend").length;
@@ -10128,7 +10128,7 @@ function layoutNetwork(ast, schedule) {
10128
10128
  y = cursor;
10129
10129
  cursor += C2.BOX_H + C2.V_GAP;
10130
10130
  }
10131
- const box = {
10131
+ const box2 = {
10132
10132
  id,
10133
10133
  task: t,
10134
10134
  computed,
@@ -10139,8 +10139,8 @@ function layoutNetwork(ast, schedule) {
10139
10139
  milestone: t.milestone,
10140
10140
  rank: r6
10141
10141
  };
10142
- boxes.push(box);
10143
- boxById.set(id, box);
10142
+ boxes.push(box2);
10143
+ boxById.set(id, box2);
10144
10144
  }
10145
10145
  }
10146
10146
  const edges = [];
@@ -10347,7 +10347,7 @@ function layoutSwimlane2(ast, schedule) {
10347
10347
  const w = t.milestone ? C2.MS_W : C2.BOX_W;
10348
10348
  const x = colX(r6) + (C2.BOX_W - w) / 2;
10349
10349
  const y = y0 + idx * (C2.BOX_H + C2.V_GAP);
10350
- const box = {
10350
+ const box2 = {
10351
10351
  id,
10352
10352
  task: t,
10353
10353
  computed: schedule.computed.get(id),
@@ -10358,8 +10358,8 @@ function layoutSwimlane2(ast, schedule) {
10358
10358
  milestone: t.milestone,
10359
10359
  rank: r6
10360
10360
  };
10361
- boxes.push(box);
10362
- boxById.set(id, box);
10361
+ boxes.push(box2);
10362
+ boxById.set(id, box2);
10363
10363
  });
10364
10364
  }
10365
10365
  }
@@ -10429,7 +10429,7 @@ function layoutTimescaled(ast, schedule) {
10429
10429
  const iv = intervalById.get(t.id);
10430
10430
  const lane = laneOf.get(t.id);
10431
10431
  const y = topPad + lane * (C2.TS_BOX_H + C2.TS_LANE_GAP);
10432
- const box = {
10432
+ const box2 = {
10433
10433
  id: t.id,
10434
10434
  task: t,
10435
10435
  computed: schedule.computed.get(t.id),
@@ -10440,8 +10440,8 @@ function layoutTimescaled(ast, schedule) {
10440
10440
  milestone: t.milestone,
10441
10441
  rank: 0
10442
10442
  };
10443
- boxes.push(box);
10444
- boxById.set(t.id, box);
10443
+ boxes.push(box2);
10444
+ boxById.set(t.id, box2);
10445
10445
  }
10446
10446
  const edges = [];
10447
10447
  for (const t of ast.tasks) {
@@ -10869,7 +10869,7 @@ function summaryText(summary) {
10869
10869
  return { plain, critPath };
10870
10870
  }
10871
10871
  function renderPertLayout(layout, config) {
10872
- const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
10872
+ const t = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
10873
10873
  const children = [];
10874
10874
  const cp = layout.summary.criticalPath;
10875
10875
  children.push(chunk3WNW5Y7P_cjs.title(`PERT network${layout.title ? " \u2014 " + layout.title : ""}`));
@@ -12078,7 +12078,7 @@ function renderDestroy(d) {
12078
12078
  ]);
12079
12079
  }
12080
12080
  function renderSequenceLayout(layout, config) {
12081
- const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
12081
+ const t = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
12082
12082
  const children = [];
12083
12083
  const nMsg = layout.messages.length;
12084
12084
  const nFrag = layout.fragments.length;
@@ -12933,7 +12933,7 @@ function renderArc2(ag) {
12933
12933
  );
12934
12934
  }
12935
12935
  function renderPetriLayout(layout, config) {
12936
- const t = chunkNT6VVMLW_cjs.resolvePetriTheme(config?.theme ?? "default");
12936
+ const t = chunkCAAMBDEN_cjs.resolvePetriTheme(config?.theme ?? "default");
12937
12937
  const children = [];
12938
12938
  const marking = layout.places.filter((p) => p.tokens > 0).map((p) => `${p.place.id}:${p.tokens}`).join(", ");
12939
12939
  const descParts = [
@@ -13866,26 +13866,26 @@ function labelText(d) {
13866
13866
  function deviceFootprint(d) {
13867
13867
  return iconSize(d.kind);
13868
13868
  }
13869
- function effBox(box) {
13870
- const labelW = Math.max(box.w, labelText(box.device).length * NET_CONST.CHAR_W + 6);
13869
+ function effBox(box2) {
13870
+ const labelW = Math.max(box2.w, labelText(box2.device).length * NET_CONST.CHAR_W + 6);
13871
13871
  const half = labelW / 2;
13872
13872
  return {
13873
- left: box.cx - half,
13874
- top: box.y,
13875
- right: box.cx + half,
13876
- bottom: box.y + box.h + labelExtra(box.device)
13877
- };
13878
- }
13879
- function edgePoint(box, tx, ty) {
13880
- const dx = tx - box.cx;
13881
- const dy = ty - box.cy;
13882
- if (dx === 0 && dy === 0) return { x: box.cx, y: box.cy };
13883
- const hw = box.w / 2;
13884
- const hh = box.h / 2;
13873
+ left: box2.cx - half,
13874
+ top: box2.y,
13875
+ right: box2.cx + half,
13876
+ bottom: box2.y + box2.h + labelExtra(box2.device)
13877
+ };
13878
+ }
13879
+ function edgePoint(box2, tx, ty) {
13880
+ const dx = tx - box2.cx;
13881
+ const dy = ty - box2.cy;
13882
+ if (dx === 0 && dy === 0) return { x: box2.cx, y: box2.cy };
13883
+ const hw = box2.w / 2;
13884
+ const hh = box2.h / 2;
13885
13885
  const sx = dx !== 0 ? hw / Math.abs(dx) : Infinity;
13886
13886
  const sy = dy !== 0 ? hh / Math.abs(dy) : Infinity;
13887
13887
  const s = Math.min(sx, sy);
13888
- return { x: box.cx + dx * s, y: box.cy + dy * s };
13888
+ return { x: box2.cx + dx * s, y: box2.cy + dy * s };
13889
13889
  }
13890
13890
  function placeBanded(ast, ranks) {
13891
13891
  const lr = ast.direction === "lr";
@@ -14450,7 +14450,7 @@ function renderDevice(b, t) {
14450
14450
  return chunk3WNW5Y7P_cjs.group(attrs, parts);
14451
14451
  }
14452
14452
  function renderNetworkLayout(layout, config) {
14453
- const t = chunkNT6VVMLW_cjs.resolveNetworkTheme(config?.theme ?? "default");
14453
+ const t = chunkCAAMBDEN_cjs.resolveNetworkTheme(config?.theme ?? "default");
14454
14454
  const children = [];
14455
14455
  const counts = /* @__PURE__ */ new Map();
14456
14456
  for (const b of layout.devices) counts.set(b.device.kind, (counts.get(b.device.kind) ?? 0) + 1);
@@ -16220,8 +16220,8 @@ function renderUmlClass(text2, config) {
16220
16220
  return renderUmlClassLayout(layout, config);
16221
16221
  }
16222
16222
  function renderUmlClassLayout(layout, config) {
16223
- const theme = chunkNT6VVMLW_cjs.resolveUmlClassTheme(config?.theme ?? "default");
16224
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
16223
+ const theme = chunkCAAMBDEN_cjs.resolveUmlClassTheme(config?.theme ?? "default");
16224
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
16225
16225
  const pad = config?.padding ?? 0;
16226
16226
  const width = layout.width + pad * 2;
16227
16227
  const height = layout.height + pad * 2;
@@ -16236,25 +16236,25 @@ function renderUmlClassLayout(layout, config) {
16236
16236
  .sx-umlclass-box-stroke { stroke: ${theme.classifierStroke}; stroke-width: ${BOX_STROKE_W}; fill: none; }
16237
16237
  .sx-umlclass-header-fill { fill: ${theme.headerFill}; }
16238
16238
  .sx-umlclass-divider { stroke: ${theme.classifierStroke}; stroke-width: ${DIVIDER_STROKE_W}; }
16239
- .sx-umlclass-classname { fill: ${theme.nameText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label + 1}px; font-weight: 700; letter-spacing: -0.01em; }
16239
+ .sx-umlclass-classname { fill: ${theme.nameText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label + 1}px; font-weight: 700; letter-spacing: -0.01em; }
16240
16240
  .sx-umlclass-classname[data-abstract="true"] { font-style: italic; }
16241
- .sx-umlclass-stereotype { fill: ${theme.stereotypeText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-style: italic; }
16242
- .sx-umlclass-member { fill: ${theme.memberText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 500; }
16241
+ .sx-umlclass-stereotype { fill: ${theme.stereotypeText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-style: italic; }
16242
+ .sx-umlclass-member { fill: ${theme.memberText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 500; }
16243
16243
  .sx-umlclass-member[data-static] { text-decoration: underline; }
16244
16244
  .sx-umlclass-member[data-abstract] { font-style: italic; }
16245
- .sx-umlclass-visibility { fill: ${theme.visibilityText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 500; }
16245
+ .sx-umlclass-visibility { fill: ${theme.visibilityText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 500; }
16246
16246
  .sx-umlclass-rel-line { stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; fill: none; }
16247
16247
  .sx-umlclass-rel-line[data-dashed="true"] { stroke-dasharray: 5 4; }
16248
16248
  .sx-umlclass-triangle { fill: ${theme.adornmentHollowFill}; stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; stroke-linejoin: miter; }
16249
16249
  .sx-umlclass-diamond-hollow { fill: ${theme.adornmentHollowFill}; stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; stroke-linejoin: miter; }
16250
16250
  .sx-umlclass-diamond-filled { fill: ${theme.adornmentFill}; stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; stroke-linejoin: miter; }
16251
16251
  .sx-umlclass-arrowhead { fill: none; stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; stroke-linejoin: miter; }
16252
- .sx-umlclass-edge-label { fill: ${theme.edgeLabel}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 500; }
16253
- .sx-umlclass-edge-name { fill: ${theme.edgeLabel}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-style: italic; }
16252
+ .sx-umlclass-edge-label { fill: ${theme.edgeLabel}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 500; }
16253
+ .sx-umlclass-edge-name { fill: ${theme.edgeLabel}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-style: italic; }
16254
16254
  .sx-umlclass-edge-name-halo { fill: ${theme.bg}; stroke: ${theme.bg}; stroke-width: ${UMLCLASS_CONST.EDGE_LABEL_HALO}; stroke-linejoin: round; }
16255
- .sx-umlclass-title { fill: ${theme.nameText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
16255
+ .sx-umlclass-title { fill: ${theme.nameText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
16256
16256
  .sx-umlclass-package { fill: ${theme.packageFill}; stroke: ${theme.packageStroke}; stroke-width: 1; }
16257
- .sx-umlclass-package-label { fill: ${theme.packageLabel}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
16257
+ .sx-umlclass-package-label { fill: ${theme.packageLabel}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 600; }
16258
16258
  `.trim()
16259
16259
  );
16260
16260
  const children = [
@@ -17560,7 +17560,7 @@ function layoutFaultTree(ast) {
17560
17560
  bump(g.cx + g.width / 2, g.cy + g.height / 2);
17561
17561
  if (g.cond) bump(g.cond.x + g.cond.w / 2, g.cond.y + g.cond.h / 2);
17562
17562
  }
17563
- for (const box of cutSetBoxes) bump(box.x + box.width, box.y + box.height);
17563
+ for (const box2 of cutSetBoxes) bump(box2.x + box2.width, box2.y + box2.height);
17564
17564
  for (const t of transfers) bump(t.x + 22, t.y + 30);
17565
17565
  if (ast.title) bump(C2.CANVAS_PAD + ast.title.length * 8.5, 0);
17566
17566
  if (ast.analysis.probability) {
@@ -17590,8 +17590,8 @@ function renderFaultTree(text2, config) {
17590
17590
  return renderFaultTreeLayout(layout, config);
17591
17591
  }
17592
17592
  function renderFaultTreeLayout(layout, config) {
17593
- const theme = chunkNT6VVMLW_cjs.resolveReliabilityTheme(config?.theme ?? "default");
17594
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
17593
+ const theme = chunkCAAMBDEN_cjs.resolveReliabilityTheme(config?.theme ?? "default");
17594
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
17595
17595
  const pad = config?.padding ?? 0;
17596
17596
  const { ast, analysis } = layout;
17597
17597
  const showProb = ast.analysis.probability;
@@ -17603,27 +17603,27 @@ function renderFaultTreeLayout(layout, config) {
17603
17603
  {},
17604
17604
  `
17605
17605
  .sx-ft-bg { fill: ${theme.bg}; }
17606
- .sx-ft-event { fill: ${theme.eventFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17606
+ .sx-ft-event { fill: ${theme.eventFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
17607
17607
  .sx-ft-event[data-role="top"] { stroke: ${theme.topEventStroke}; stroke-width: 2.25; }
17608
- .sx-ft-basic { fill: ${theme.basicFill}; stroke: ${theme.basicStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17609
- .sx-ft-undeveloped { fill: ${theme.undevelopedFill}; stroke: ${theme.basicStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17610
- .sx-ft-house { fill: ${theme.houseFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17611
- .sx-ft-gate { fill: ${theme.gateFill}; stroke: ${theme.gateStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
17612
- .sx-ft-cond { fill: ${theme.conditionFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
17613
- .sx-ft-pin, .sx-ft-edge { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17614
- .sx-ft-shared-mark { fill: none; stroke: ${theme.basicStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17615
- .sx-ft-label { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
17616
- .sx-ft-id { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
17617
- .sx-ft-cap { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
17618
- .sx-ft-prob { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 600; }
17619
- .sx-ft-gate-label { fill: ${theme.gateStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
17620
- .sx-ft-cond-text { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
17621
- .sx-ft-cutset { fill: ${theme.cutsetFill}; stroke: ${theme.cutsetStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17622
- .sx-ft-cutset[data-spof="true"] { stroke: ${theme.spofStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
17623
- .sx-ft-ptop { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }
17624
- .sx-ft-transfer { fill: ${theme.eventFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17625
- .sx-ft-transfer-label { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 600; }
17626
- .sx-ft-title { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
17608
+ .sx-ft-basic { fill: ${theme.basicFill}; stroke: ${theme.basicStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
17609
+ .sx-ft-undeveloped { fill: ${theme.undevelopedFill}; stroke: ${theme.basicStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
17610
+ .sx-ft-house { fill: ${theme.houseFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
17611
+ .sx-ft-gate { fill: ${theme.gateFill}; stroke: ${theme.gateStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
17612
+ .sx-ft-cond { fill: ${theme.conditionFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
17613
+ .sx-ft-pin, .sx-ft-edge { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
17614
+ .sx-ft-shared-mark { fill: none; stroke: ${theme.basicStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
17615
+ .sx-ft-label { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 600; }
17616
+ .sx-ft-id { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
17617
+ .sx-ft-cap { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
17618
+ .sx-ft-prob { fill: ${theme.probText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 600; }
17619
+ .sx-ft-gate-label { fill: ${theme.gateStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 700; }
17620
+ .sx-ft-cond-text { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
17621
+ .sx-ft-cutset { fill: ${theme.cutsetFill}; stroke: ${theme.cutsetStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
17622
+ .sx-ft-cutset[data-spof="true"] { stroke: ${theme.spofStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; }
17623
+ .sx-ft-ptop { fill: ${theme.probText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 700; }
17624
+ .sx-ft-transfer { fill: ${theme.eventFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
17625
+ .sx-ft-transfer-label { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 600; }
17626
+ .sx-ft-title { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
17627
17627
  `.trim()
17628
17628
  );
17629
17629
  const instById = new Map(layout.events.map((e) => [e.instanceId, e]));
@@ -17639,20 +17639,20 @@ function renderFaultTreeLayout(layout, config) {
17639
17639
  chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 22, class: "sx-ft-title", "font-family": fontFamily, "text-anchor": "middle" }, ast.title)
17640
17640
  );
17641
17641
  }
17642
- for (const box of layout.cutSetBoxes) {
17642
+ for (const box2 of layout.cutSetBoxes) {
17643
17643
  inner.push(
17644
17644
  chunk3WNW5Y7P_cjs.rect({
17645
- x: box.x,
17646
- y: box.y,
17647
- width: box.width,
17648
- height: box.height,
17645
+ x: box2.x,
17646
+ y: box2.y,
17647
+ width: box2.width,
17648
+ height: box2.height,
17649
17649
  rx: 6,
17650
17650
  class: "sx-ft-cutset",
17651
- "data-cutset": box.cutSet.events.join(","),
17652
- "data-cutset-index": String(box.index),
17653
- "data-order": String(box.cutSet.order),
17654
- ...box.cutSet.isSpof ? { "data-spof": "true" } : {},
17655
- ...box.cutSet.prob !== void 0 ? { "data-cutset-prob": String(box.cutSet.prob) } : {}
17651
+ "data-cutset": box2.cutSet.events.join(","),
17652
+ "data-cutset-index": String(box2.index),
17653
+ "data-order": String(box2.cutSet.order),
17654
+ ...box2.cutSet.isSpof ? { "data-spof": "true" } : {},
17655
+ ...box2.cutSet.prob !== void 0 ? { "data-cutset-prob": String(box2.cutSet.prob) } : {}
17656
17656
  })
17657
17657
  );
17658
17658
  }
@@ -18294,8 +18294,8 @@ function renderBowtie(text2, config) {
18294
18294
  }
18295
18295
  function renderBowtieLayout(layout, config) {
18296
18296
  const themeName = config?.theme ?? "default";
18297
- const theme = chunkNT6VVMLW_cjs.resolveBowtieTheme(themeName);
18298
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
18297
+ const theme = chunkCAAMBDEN_cjs.resolveBowtieTheme(themeName);
18298
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
18299
18299
  const pad = config?.padding ?? 0;
18300
18300
  const { ast, topEvent } = layout;
18301
18301
  const mono = themeName === "monochrome";
@@ -18307,22 +18307,22 @@ function renderBowtieLayout(layout, config) {
18307
18307
  {},
18308
18308
  `
18309
18309
  .sx-bowtie-bg { fill: ${theme.bg}; }
18310
- .sx-bowtie-line { fill: none; stroke: ${theme.lineStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18310
+ .sx-bowtie-line { fill: none; stroke: ${theme.lineStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
18311
18311
  .sx-bowtie-arrow { fill: ${theme.lineStroke}; stroke: none; }
18312
- .sx-bowtie-escalation-line { fill: none; stroke: ${theme.escalationLineStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin};${mono ? " stroke-dasharray: 4 3;" : ""} }
18313
- .sx-bowtie-hazard { fill: ${theme.hazardFill}; stroke: ${theme.hazardStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18314
- .sx-bowtie-topevent { fill: ${theme.topEventFill}; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
18315
- .sx-bowtie-topevent-ring { fill: none; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
18316
- .sx-bowtie-threat { fill: ${theme.threatFill}; stroke: ${theme.threatStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18317
- .sx-bowtie-barrier { fill: ${theme.barrierFill}; stroke: ${theme.barrierStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18318
- .sx-bowtie-consequence { fill: ${theme.consequenceFill}; stroke: ${theme.consequenceStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18319
- .sx-bowtie-escalation { fill: ${theme.escalationFill}; stroke: ${theme.escalationStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal};${mono ? " stroke-dasharray: 5 3;" : ""} }
18320
- .sx-bowtie-ef-barrier { fill: ${theme.efBarrierFill}; stroke: ${theme.barrierStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18321
- .sx-bowtie-label { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; }
18322
- .sx-bowtie-elabel { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
18312
+ .sx-bowtie-escalation-line { fill: none; stroke: ${theme.escalationLineStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin};${mono ? " stroke-dasharray: 4 3;" : ""} }
18313
+ .sx-bowtie-hazard { fill: ${theme.hazardFill}; stroke: ${theme.hazardStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
18314
+ .sx-bowtie-topevent { fill: ${theme.topEventFill}; stroke: ${theme.topEventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; }
18315
+ .sx-bowtie-topevent-ring { fill: none; stroke: ${theme.topEventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
18316
+ .sx-bowtie-threat { fill: ${theme.threatFill}; stroke: ${theme.threatStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
18317
+ .sx-bowtie-barrier { fill: ${theme.barrierFill}; stroke: ${theme.barrierStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
18318
+ .sx-bowtie-consequence { fill: ${theme.consequenceFill}; stroke: ${theme.consequenceStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
18319
+ .sx-bowtie-escalation { fill: ${theme.escalationFill}; stroke: ${theme.escalationStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal};${mono ? " stroke-dasharray: 5 3;" : ""} }
18320
+ .sx-bowtie-ef-barrier { fill: ${theme.efBarrierFill}; stroke: ${theme.barrierStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
18321
+ .sx-bowtie-label { fill: ${theme.labelText}; stroke: none; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; }
18322
+ .sx-bowtie-elabel { fill: ${theme.labelText}; stroke: none; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
18323
18323
  .sx-bowtie-topevent-label { fill: ${theme.labelText}; stroke: none; font-size: 11px; font-weight: 700; }
18324
- .sx-bowtie-title { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
18325
- .sx-bowtie-legend-label { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
18324
+ .sx-bowtie-title { fill: ${theme.labelText}; stroke: none; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
18325
+ .sx-bowtie-legend-label { fill: ${theme.labelText}; stroke: none; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
18326
18326
  `.trim()
18327
18327
  );
18328
18328
  const children = [
@@ -18920,8 +18920,8 @@ function renderEventTree(text2, config) {
18920
18920
  return renderEventTreeLayout(layout, config);
18921
18921
  }
18922
18922
  function renderEventTreeLayout(layout, config) {
18923
- const theme = chunkNT6VVMLW_cjs.resolveReliabilityTheme(config?.theme ?? "default");
18924
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
18923
+ const theme = chunkCAAMBDEN_cjs.resolveReliabilityTheme(config?.theme ?? "default");
18924
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
18925
18925
  const pad = config?.padding ?? 0;
18926
18926
  const { ast } = layout;
18927
18927
  const width = layout.width + pad * 2;
@@ -18932,22 +18932,22 @@ function renderEventTreeLayout(layout, config) {
18932
18932
  {},
18933
18933
  `
18934
18934
  .sx-et-bg { fill: ${theme.bg}; }
18935
- .sx-et-title { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
18936
- .sx-et-header { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }
18937
- .sx-et-grid { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; stroke-dasharray: 4 4; opacity: 0.5; }
18938
- .sx-et-headrule { fill: none; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
18939
- .sx-et-ie { fill: none; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
18940
- .sx-et-ie-label { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
18941
- .sx-et-ie-freq { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 600; }
18942
- .sx-et-edge { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18935
+ .sx-et-title { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
18936
+ .sx-et-header { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 700; }
18937
+ .sx-et-grid { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; stroke-dasharray: 4 4; opacity: 0.5; }
18938
+ .sx-et-headrule { fill: none; stroke: ${theme.eventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
18939
+ .sx-et-ie { fill: none; stroke: ${theme.topEventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; }
18940
+ .sx-et-ie-label { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
18941
+ .sx-et-ie-freq { fill: ${theme.probText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 600; }
18942
+ .sx-et-edge { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
18943
18943
  .sx-et-edge[data-leg="s"] {}
18944
- .sx-et-leg-label { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
18945
- .sx-et-leg-prob { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
18946
- .sx-et-outcome { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
18947
- .sx-et-freq { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
18948
- .sx-et-seqid { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; opacity: 0.7; }
18944
+ .sx-et-leg-label { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
18945
+ .sx-et-leg-prob { fill: ${theme.probText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
18946
+ .sx-et-outcome { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 600; }
18947
+ .sx-et-freq { fill: ${theme.probText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
18948
+ .sx-et-seqid { fill: ${theme.eventStroke}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; opacity: 0.7; }
18949
18949
  .sx-et-dot { fill: ${theme.basicStroke}; stroke: none; }
18950
- .sx-et-edge[data-dominant="true"] { stroke: ${theme.cutsetStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
18950
+ .sx-et-edge[data-dominant="true"] { stroke: ${theme.cutsetStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; }
18951
18951
  .sx-et-outcome[data-dominant="true"] { fill: ${theme.spofStroke}; }
18952
18952
  .sx-et-freq[data-dominant="true"] { fill: ${theme.spofStroke}; font-weight: 700; }
18953
18953
  .sx-et-dot[data-dominant="true"] { fill: ${theme.spofStroke}; }
@@ -20024,7 +20024,7 @@ function renderFmea(text2, config) {
20024
20024
  }
20025
20025
  function renderFmeaLayout(layout, config) {
20026
20026
  const p = resolvePalette(config?.theme ?? "default");
20027
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
20027
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
20028
20028
  const pad = config?.padding ?? 0;
20029
20029
  const { ast, analysis } = layout;
20030
20030
  const width = layout.width + pad * 2;
@@ -20205,25 +20205,25 @@ function buildCss9(p) {
20205
20205
  const isMono = p === PALETTE_MONO;
20206
20206
  return `
20207
20207
  .sx-fmea-bg { fill: ${p.bg}; }
20208
- .sx-fmea-border { fill: none; stroke: ${p.border}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
20209
- .sx-fmea-cell { fill: ${p.bg}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20208
+ .sx-fmea-border { fill: none; stroke: ${p.border}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
20209
+ .sx-fmea-cell { fill: ${p.bg}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20210
20210
  .sx-fmea-cell-alt { fill: ${p.cellAltFill}; }
20211
- .sx-fmea-headcell { fill: ${p.headerFill}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20212
- .sx-fmea-band { fill: ${p.bandFill}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20213
- .sx-fmea-band-text { fill: ${p.bandText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; letter-spacing: 0.06em; }
20214
- .sx-fmea-headtext { fill: ${p.headerText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
20215
- .sx-fmea-text { fill: ${p.cellText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
20216
- .sx-fmea-risk-text { fill: ${p.riskText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }
20217
- .sx-fmea-title { fill: ${p.cellText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
20218
- .sx-fmea-meta { fill: ${p.metaText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
20219
- .sx-fmea-legend { fill: ${p.metaText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
20220
- .sx-fmea-rpn-high { fill: ${p.rpnHigh}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20221
- .sx-fmea-rpn-mid { fill: ${p.rpnMid}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20222
- .sx-fmea-rpn-low { fill: ${p.rpnLow}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20223
- .sx-fmea-ap-high { fill: ${p.apHigh}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20224
- .sx-fmea-ap-mid { fill: ${p.apMid}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20225
- .sx-fmea-ap-low { fill: ${p.apLow}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20226
- .sx-fmea-flag { fill: none; stroke: ${p.flagStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; ${isMono ? "stroke-dasharray: 4 2;" : ""} }
20211
+ .sx-fmea-headcell { fill: ${p.headerFill}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20212
+ .sx-fmea-band { fill: ${p.bandFill}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20213
+ .sx-fmea-band-text { fill: ${p.bandText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 700; letter-spacing: 0.06em; }
20214
+ .sx-fmea-headtext { fill: ${p.headerText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
20215
+ .sx-fmea-text { fill: ${p.cellText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; }
20216
+ .sx-fmea-risk-text { fill: ${p.riskText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 700; }
20217
+ .sx-fmea-title { fill: ${p.cellText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
20218
+ .sx-fmea-meta { fill: ${p.metaText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; }
20219
+ .sx-fmea-legend { fill: ${p.metaText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
20220
+ .sx-fmea-rpn-high { fill: ${p.rpnHigh}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20221
+ .sx-fmea-rpn-mid { fill: ${p.rpnMid}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20222
+ .sx-fmea-rpn-low { fill: ${p.rpnLow}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20223
+ .sx-fmea-ap-high { fill: ${p.apHigh}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20224
+ .sx-fmea-ap-mid { fill: ${p.apMid}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20225
+ .sx-fmea-ap-low { fill: ${p.apLow}; stroke: ${p.grid}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
20226
+ .sx-fmea-flag { fill: none; stroke: ${p.flagStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; ${isMono ? "stroke-dasharray: 4 2;" : ""} }
20227
20227
  `.trim();
20228
20228
  }
20229
20229
 
@@ -20904,7 +20904,7 @@ function renderCausalLoop(text2, config) {
20904
20904
  }
20905
20905
  function renderCausalLoopLayout(layout, config) {
20906
20906
  const theme = resolveTokens(config?.theme ?? "default");
20907
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
20907
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
20908
20908
  const pad = config?.padding ?? 0;
20909
20909
  const { ast } = layout;
20910
20910
  const width = layout.width + pad * 2;
@@ -20915,17 +20915,17 @@ function renderCausalLoopLayout(layout, config) {
20915
20915
  {},
20916
20916
  `
20917
20917
  .sx-cld-bg { fill: ${theme.bg}; }
20918
- .sx-cld-link { fill: none; stroke: ${theme.ink}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
20918
+ .sx-cld-link { fill: none; stroke: ${theme.ink}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
20919
20919
  .sx-cld-arrow { fill: ${theme.ink}; stroke: none; }
20920
- .sx-cld-var { fill: ${theme.ink}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label + 1}px; font-weight: 600; }
20921
- .sx-cld-polarity { fill: ${theme.ink}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label + 2}px; font-weight: 700; }
20922
- .sx-cld-link-label { fill: ${theme.ink}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
20923
- .sx-cld-delay { stroke: ${theme.delay}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
20924
- .sx-cld-glyph { fill: none; stroke: ${theme.accent}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
20920
+ .sx-cld-var { fill: ${theme.ink}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label + 1}px; font-weight: 600; }
20921
+ .sx-cld-polarity { fill: ${theme.ink}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label + 2}px; font-weight: 700; }
20922
+ .sx-cld-link-label { fill: ${theme.ink}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
20923
+ .sx-cld-delay { stroke: ${theme.delay}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
20924
+ .sx-cld-glyph { fill: none; stroke: ${theme.accent}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
20925
20925
  .sx-cld-glyph-head { fill: ${theme.accent}; stroke: none; }
20926
- .sx-cld-glyph-label { fill: ${theme.accent}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }
20927
- .sx-cld-glyph-phrase { fill: ${theme.accent}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-style: italic; }
20928
- .sx-cld-title { fill: ${theme.ink}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
20926
+ .sx-cld-glyph-label { fill: ${theme.accent}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 700; }
20927
+ .sx-cld-glyph-phrase { fill: ${theme.accent}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-style: italic; }
20928
+ .sx-cld-title { fill: ${theme.ink}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
20929
20929
  `.trim()
20930
20930
  );
20931
20931
  const children = [
@@ -21737,16 +21737,16 @@ function layoutMarkov(ast) {
21737
21737
  const tag = classOf?.[st.id];
21738
21738
  const isAbsorbing = tag === "absorbing";
21739
21739
  const pi = piMap?.[st.id] ?? perClassPi[st.id];
21740
- const box = {
21740
+ const box2 = {
21741
21741
  state: st,
21742
21742
  cx: c.x,
21743
21743
  cy: c.y,
21744
21744
  r: C2.STATE_R,
21745
21745
  isAbsorbing
21746
21746
  };
21747
- if (tag) box.classTag = tag;
21748
- if (pi !== void 0) box.pi = pi;
21749
- return box;
21747
+ if (tag) box2.classTag = tag;
21748
+ if (pi !== void 0) box2.pi = pi;
21749
+ return box2;
21750
21750
  });
21751
21751
  const arcKey = (a, b) => `${a}\0${b}`;
21752
21752
  const present = /* @__PURE__ */ new Set();
@@ -21903,7 +21903,7 @@ function selfLoopGeom(tr, c, ringCenter, layout, C2) {
21903
21903
 
21904
21904
  // src/diagrams/markov/renderer.ts
21905
21905
  function palette(name) {
21906
- const b = chunkNT6VVMLW_cjs.resolveBaseTheme(name);
21906
+ const b = chunkCAAMBDEN_cjs.resolveBaseTheme(name);
21907
21907
  const mono = name === "monochrome";
21908
21908
  return {
21909
21909
  stateFill: b.fillMuted,
@@ -22759,7 +22759,7 @@ function renderGitGraph(text2, config) {
22759
22759
  }
22760
22760
  function renderGitGraphLayout(layout, config) {
22761
22761
  const pal = resolvePalette2(config?.theme);
22762
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
22762
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
22763
22763
  const pad = config?.padding ?? 0;
22764
22764
  const { ast } = layout;
22765
22765
  const width = layout.width + pad * 2;
@@ -22983,9 +22983,9 @@ function renderCommitLabel(id, x, y, rotate, fontFamily) {
22983
22983
  }
22984
22984
  function buildStyle2(pal, showBranches) {
22985
22985
  const laneStyle = showBranches ? `
22986
- .sx-gg-lane { stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; stroke-linecap: round; opacity: 0.9; }
22986
+ .sx-gg-lane { stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; stroke-linecap: round; opacity: 0.9; }
22987
22987
  .sx-gg-pill { stroke: none; }
22988
- .sx-gg-pill-text { font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }` : "";
22988
+ .sx-gg-pill-text { font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 700; }` : "";
22989
22989
  const laneRules = pal.lanes.map((col, i) => {
22990
22990
  const ink = pal.laneInk[i] ?? "#ffffff";
22991
22991
  return [
@@ -23000,17 +23000,17 @@ function buildStyle2(pal, showBranches) {
23000
23000
  {},
23001
23001
  `
23002
23002
  .sx-gg-bg { fill: ${pal.bg}; }${laneStyle}
23003
- .sx-gg-edge { fill: none; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23003
+ .sx-gg-edge { fill: none; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
23004
23004
  .sx-gg-edge-merge { stroke-dasharray: none; }
23005
- .sx-gg-node { stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23005
+ .sx-gg-node { stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
23006
23006
  .sx-gg-dot { stroke: none; }
23007
- .sx-gg-merge { fill: ${pal.mergeCenter}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
23008
- .sx-gg-highlight { fill: none; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
23009
- .sx-gg-reverse-mark { stroke: ${pal.mergeCenter}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; stroke-linecap: round; }
23010
- .sx-gg-cherry { fill: none; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23011
- .sx-gg-id { fill: ${pal.labelInk}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
23012
- .sx-gg-tag { fill: ${pal.tagFill}; stroke: ${pal.tagStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
23013
- .sx-gg-tag-text { fill: ${pal.tagInk}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
23007
+ .sx-gg-merge { fill: ${pal.mergeCenter}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; }
23008
+ .sx-gg-highlight { fill: none; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; }
23009
+ .sx-gg-reverse-mark { stroke: ${pal.mergeCenter}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; stroke-linecap: round; }
23010
+ .sx-gg-cherry { fill: none; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
23011
+ .sx-gg-id { fill: ${pal.labelInk}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
23012
+ .sx-gg-tag { fill: ${pal.tagFill}; stroke: ${pal.tagStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
23013
+ .sx-gg-tag-text { fill: ${pal.tagInk}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 700; }
23014
23014
  ${laneRules}
23015
23015
  `.trim()
23016
23016
  );
@@ -23770,7 +23770,7 @@ function borderPoint(from, to, _isLR) {
23770
23770
 
23771
23771
  // src/diagrams/epc/renderer.ts
23772
23772
  function epcPalette(themeName) {
23773
- const base = chunkNT6VVMLW_cjs.resolveBaseTheme(themeName);
23773
+ const base = chunkCAAMBDEN_cjs.resolveBaseTheme(themeName);
23774
23774
  if (themeName === "monochrome") {
23775
23775
  return {
23776
23776
  eventFill: "#ffffff",
@@ -23829,7 +23829,7 @@ function renderEpc(text2, config) {
23829
23829
  function renderEpcLayout(layout, config) {
23830
23830
  const themeName = config?.theme ?? "default";
23831
23831
  const pal = epcPalette(themeName);
23832
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
23832
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
23833
23833
  const pad = config?.padding ?? 0;
23834
23834
  const { ast } = layout;
23835
23835
  const width = layout.width + pad * 2;
@@ -23839,22 +23839,22 @@ function renderEpcLayout(layout, config) {
23839
23839
  "style",
23840
23840
  {},
23841
23841
  `
23842
- .sx-epc-bg { fill: ${chunkNT6VVMLW_cjs.resolveBaseTheme(themeName).bg}; }
23843
- .sx-epc-event { fill: ${pal.eventFill}; stroke: ${pal.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
23844
- .sx-epc-func { fill: ${pal.funcFill}; stroke: ${pal.funcStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23845
- .sx-epc-conn { fill: ${pal.connFill}; stroke: ${pal.connStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23842
+ .sx-epc-bg { fill: ${chunkCAAMBDEN_cjs.resolveBaseTheme(themeName).bg}; }
23843
+ .sx-epc-event { fill: ${pal.eventFill}; stroke: ${pal.eventStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
23844
+ .sx-epc-func { fill: ${pal.funcFill}; stroke: ${pal.funcStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
23845
+ .sx-epc-conn { fill: ${pal.connFill}; stroke: ${pal.connStroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
23846
23846
  .sx-epc-node[data-flagged="true"] .sx-epc-event,
23847
23847
  .sx-epc-node[data-flagged="true"] .sx-epc-func,
23848
- .sx-epc-node[data-flagged="true"] .sx-epc-conn { stroke: ${pal.flag}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
23849
- .sx-epc-flagring { fill: none; stroke: ${pal.flag}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; stroke-dasharray: 4 3; }
23850
- .sx-epc-label { fill: ${pal.labelText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
23848
+ .sx-epc-node[data-flagged="true"] .sx-epc-conn { stroke: ${pal.flag}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; }
23849
+ .sx-epc-flagring { fill: none; stroke: ${pal.flag}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; stroke-dasharray: 4 3; }
23850
+ .sx-epc-label { fill: ${pal.labelText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 600; }
23851
23851
  .sx-epc-glyph { fill: ${pal.connGlyph}; font-size: 17px; font-weight: 700; }
23852
- .sx-epc-edge { fill: none; stroke: ${pal.edge}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23852
+ .sx-epc-edge { fill: none; stroke: ${pal.edge}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
23853
23853
  .sx-epc-edge[data-back="true"] { stroke: ${pal.backEdge}; stroke-dasharray: 5 4; }
23854
23854
  .sx-epc-arrow { fill: ${pal.edge}; stroke: none; }
23855
23855
  .sx-epc-arrow-back { fill: ${pal.backEdge}; stroke: none; }
23856
- .sx-epc-edge-label { fill: ${pal.edgeLabel}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
23857
- .sx-epc-title { fill: ${pal.labelText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
23856
+ .sx-epc-edge-label { fill: ${pal.edgeLabel}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
23857
+ .sx-epc-title { fill: ${pal.labelText}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
23858
23858
  `.trim()
23859
23859
  );
23860
23860
  const children = [
@@ -24165,13 +24165,13 @@ function parseFunction2(ast, rest, lineNo) {
24165
24165
  ast.warnings.push(`Line ${lineNo}: box "${id}" redeclared \u2014 keeping first declaration.`);
24166
24166
  return;
24167
24167
  }
24168
- const box = {
24168
+ const box2 = {
24169
24169
  id,
24170
24170
  name,
24171
24171
  // analysis assigns the real number; explicit wins if given.
24172
24172
  number: explicitNumber ?? 0
24173
24173
  };
24174
- ast.boxes.push(box);
24174
+ ast.boxes.push(box2);
24175
24175
  }
24176
24176
  function parseRoleArrow(ast, role, rest, lineNo) {
24177
24177
  const idM = /^([A-Za-z_]\w*)/.exec(rest);
@@ -24443,8 +24443,8 @@ function layoutIdef0(astIn) {
24443
24443
  const C2 = IDEF0_CONST;
24444
24444
  const ox = C2.MARGIN;
24445
24445
  const oy = C2.MARGIN + C2.TITLE_H;
24446
- const boxes = ast.boxes.map((box, idx) => ({
24447
- box,
24446
+ const boxes = ast.boxes.map((box2, idx) => ({
24447
+ box: box2,
24448
24448
  x: ox + idx * C2.STEP_X,
24449
24449
  y: oy + idx * C2.STEP_Y,
24450
24450
  width: C2.BOX_W,
@@ -24584,8 +24584,8 @@ function renderIdef0(text2, config) {
24584
24584
  return renderIdef0Layout(layout, config);
24585
24585
  }
24586
24586
  function renderIdef0Layout(layout, config) {
24587
- const theme = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
24588
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
24587
+ const theme = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
24588
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
24589
24589
  const pad = config?.padding ?? 0;
24590
24590
  const { ast } = layout;
24591
24591
  const width = layout.width + pad * 2;
@@ -24596,22 +24596,22 @@ function renderIdef0Layout(layout, config) {
24596
24596
  {},
24597
24597
  `
24598
24598
  .sx-idef0-bg { fill: ${theme.bg}; }
24599
- .sx-idef0-frame { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
24600
- .sx-idef0-box { fill: ${theme.fillMuted}; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
24601
- .sx-idef0-box-name { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
24602
- .sx-idef0-box-num { fill: ${theme.textMuted}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
24603
- .sx-idef0-arrow { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
24599
+ .sx-idef0-frame { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
24600
+ .sx-idef0-box { fill: ${theme.fillMuted}; stroke: ${theme.stroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
24601
+ .sx-idef0-box-name { fill: ${theme.text}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 600; }
24602
+ .sx-idef0-box-num { fill: ${theme.textMuted}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
24603
+ .sx-idef0-arrow { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
24604
24604
  .sx-idef0-arrow[data-margin="true"] { stroke: ${theme.accent}; }
24605
24605
  .sx-idef0-arrow[data-tunneled="true"] { stroke-dasharray: 5 3; }
24606
24606
  .sx-idef0-head { fill: ${theme.stroke}; }
24607
24607
  .sx-idef0-arrow[data-margin="true"] + .sx-idef0-head, .sx-idef0-head[data-margin="true"] { fill: ${theme.accent}; }
24608
- .sx-idef0-label { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
24609
- .sx-idef0-icom { fill: ${theme.textMuted}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
24610
- .sx-idef0-title { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
24611
- .sx-idef0-meta { fill: ${theme.textMuted}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
24612
- .sx-idef0-tb { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
24613
- .sx-idef0-tb-text { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
24614
- .sx-idef0-tb-key { fill: ${theme.textMuted}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
24608
+ .sx-idef0-label { fill: ${theme.text}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; }
24609
+ .sx-idef0-icom { fill: ${theme.textMuted}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 700; }
24610
+ .sx-idef0-title { fill: ${theme.text}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
24611
+ .sx-idef0-meta { fill: ${theme.textMuted}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; }
24612
+ .sx-idef0-tb { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thin}; }
24613
+ .sx-idef0-tb-text { fill: ${theme.text}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small + 1}px; }
24614
+ .sx-idef0-tb-key { fill: ${theme.textMuted}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 700; }
24615
24615
  `.trim()
24616
24616
  );
24617
24617
  const children = [
@@ -25397,8 +25397,8 @@ function renderThreatModel(text2, config) {
25397
25397
  return renderThreatModelLayout(layout, config);
25398
25398
  }
25399
25399
  function renderThreatModelLayout(layout, config) {
25400
- const theme = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
25401
- const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
25400
+ const theme = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
25401
+ const fontFamily = config?.fontFamily ?? chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY;
25402
25402
  const pad = config?.padding ?? 0;
25403
25403
  const width = layout.width + pad * 2;
25404
25404
  const height = layout.height + pad * 2;
@@ -25409,24 +25409,24 @@ function renderThreatModelLayout(layout, config) {
25409
25409
  {},
25410
25410
  `
25411
25411
  .sx-tm-bg { fill: ${theme.bg}; }
25412
- .sx-tm-title { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
25413
- .sx-tm-external { fill: ${theme.fillMuted}; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
25414
- .sx-tm-process { fill: ${theme.fill}; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
25415
- .sx-tm-store-line { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
25412
+ .sx-tm-title { fill: ${theme.text}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.title}px; font-weight: 700; }
25413
+ .sx-tm-external { fill: ${theme.fillMuted}; stroke: ${theme.stroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
25414
+ .sx-tm-process { fill: ${theme.fill}; stroke: ${theme.stroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
25415
+ .sx-tm-store-line { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
25416
25416
  .sx-tm-store-bg { fill: ${theme.bg}; stroke: none; }
25417
- .sx-tm-label { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
25418
- .sx-tm-flow { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
25419
- .sx-tm-flow[data-crossing="true"] { stroke: ${danger}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
25417
+ .sx-tm-label { fill: ${theme.text}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.label}px; font-weight: 600; }
25418
+ .sx-tm-flow { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; }
25419
+ .sx-tm-flow[data-crossing="true"] { stroke: ${danger}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.thick}; }
25420
25420
  .sx-tm-arrow { fill: ${theme.stroke}; stroke: none; }
25421
25421
  .sx-tm-arrow[data-crossing="true"] { fill: ${danger}; }
25422
- .sx-tm-flow-label { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
25422
+ .sx-tm-flow-label { fill: ${theme.text}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; }
25423
25423
  .sx-tm-flow-label[data-crossing="true"] { fill: ${danger}; font-weight: 700; }
25424
25424
  .sx-tm-flow-halo { fill: ${theme.bg}; stroke: none; }
25425
- .sx-tm-boundary { fill: none; stroke: ${danger}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; stroke-dasharray: 6 4; }
25426
- .sx-tm-boundary-label { fill: ${danger}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
25425
+ .sx-tm-boundary { fill: none; stroke: ${danger}; stroke-width: ${chunkCAAMBDEN_cjs.STROKE_WIDTH.normal}; stroke-dasharray: 6 4; }
25426
+ .sx-tm-boundary-label { fill: ${danger}; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 700; }
25427
25427
  .sx-tm-badge { fill: ${theme.accent}; }
25428
25428
  .sx-tm-badge[data-cond-r="true"] { fill: ${danger}; }
25429
- .sx-tm-badge-text { fill: #ffffff; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
25429
+ .sx-tm-badge-text { fill: #ffffff; font-size: ${chunkCAAMBDEN_cjs.FONT_SIZE.small}px; font-weight: 700; }
25430
25430
  `.trim()
25431
25431
  );
25432
25432
  const markerDefs = chunk3WNW5Y7P_cjs.defs([
@@ -27303,7 +27303,7 @@ function renderNode5(n, color, theme, fontFamily, orderClass) {
27303
27303
  );
27304
27304
  }
27305
27305
  function renderMindmapAST(ast, themeName = "default", fontFamily = "system-ui, -apple-system, sans-serif") {
27306
- const theme = chunkNT6VVMLW_cjs.resolveMindmapTheme(ast.themeOverride ?? themeName);
27306
+ const theme = chunkCAAMBDEN_cjs.resolveMindmapTheme(ast.themeOverride ?? themeName);
27307
27307
  const mode = modeOf(ast);
27308
27308
  const isWheel = mode === "futureswheel";
27309
27309
  const layout = layoutMindmap(ast);
@@ -28377,7 +28377,7 @@ function layoutQfd(ast) {
28377
28377
  const weightW = QFD_WEIGHT_W;
28378
28378
  const maxHowW = Math.max(
28379
28379
  0,
28380
- ...(ast.qfd?.hows ?? []).map((h) => chunkV3JTVTPY_cjs.estimateTextWidth(h.label, QFD_HOW_FONT))
28380
+ ...(ast.qfd?.hows ?? []).map((h) => chunkY4OBXYGW_cjs.estimateTextWidth(h.label, QFD_HOW_FONT))
28381
28381
  );
28382
28382
  const howLabelH = Math.max(48, Math.min(220, Math.ceil(maxHowW * QFD_HOW_ANGLE_SIN) + 26));
28383
28383
  const footerH = QFD_FOOTER_H;
@@ -29387,7 +29387,7 @@ function wrapToLines(textStr, maxChars, maxLines) {
29387
29387
  return kept;
29388
29388
  }
29389
29389
  function renderSipocAST(ast, config) {
29390
- const t = chunkNT6VVMLW_cjs.resolveMatrixTheme(config?.theme ?? "default");
29390
+ const t = chunkCAAMBDEN_cjs.resolveMatrixTheme(config?.theme ?? "default");
29391
29391
  const sipoc = ast.sipoc ?? { suppliers: [], inputs: [], process: [], outputs: [], customers: [] };
29392
29392
  const lay = layoutSipoc(ast);
29393
29393
  const nodes = [];
@@ -29509,7 +29509,7 @@ function renderQfdRelationshipSymbol(strength, cx, cy, r6) {
29509
29509
  });
29510
29510
  }
29511
29511
  function renderQfdAST(ast, config) {
29512
- const t = chunkNT6VVMLW_cjs.resolveMatrixTheme(config?.theme ?? "default");
29512
+ const t = chunkCAAMBDEN_cjs.resolveMatrixTheme(config?.theme ?? "default");
29513
29513
  const qfd = ast.qfd ?? { whats: [], hows: [], relationships: [], roof: [], normalize: false };
29514
29514
  const lay = layoutQfd(ast);
29515
29515
  const importance = computeQfdImportance(qfd);
@@ -29714,7 +29714,7 @@ function genotypeText(parent, genes) {
29714
29714
  }).join("");
29715
29715
  }
29716
29716
  function renderPunnettAST(ast, config) {
29717
- const t = chunkNT6VVMLW_cjs.resolveMatrixTheme(config?.theme ?? "default");
29717
+ const t = chunkCAAMBDEN_cjs.resolveMatrixTheme(config?.theme ?? "default");
29718
29718
  const pd = ast.punnett;
29719
29719
  const lay = layoutPunnett(ast);
29720
29720
  const svgWrap = (body, descText2) => chunk3WNW5Y7P_cjs.svgRoot(
@@ -29829,7 +29829,7 @@ function renderMatrixAST(ast, config) {
29829
29829
  if (ast.mode === "sipoc") return renderSipocAST(ast, config);
29830
29830
  if (ast.mode === "qfd") return renderQfdAST(ast, config);
29831
29831
  if (ast.mode === "punnett") return renderPunnettAST(ast, config);
29832
- const t = chunkNT6VVMLW_cjs.resolveMatrixTheme(config?.theme ?? "default");
29832
+ const t = chunkCAAMBDEN_cjs.resolveMatrixTheme(config?.theme ?? "default");
29833
29833
  const lay = layoutMatrix(ast);
29834
29834
  const needsLegendSpace = lay.categories.length > 0 || ast.mode === "correlation";
29835
29835
  const extraWidth = needsLegendSpace && lay.plot.x0 + lay.plot.w + 140 > lay.canvasWidth ? 160 : 0;
@@ -31007,7 +31007,7 @@ function renderEdge7(edge) {
31007
31007
  return chunk3WNW5Y7P_cjs.group({ class: "lt-erd-edge-group" }, parts);
31008
31008
  }
31009
31009
  function renderErdAst(result, themeName = "default") {
31010
- const theme = chunkNT6VVMLW_cjs.resolveBaseTheme(themeName);
31010
+ const theme = chunkCAAMBDEN_cjs.resolveBaseTheme(themeName);
31011
31011
  const { entities, edges, width, height, ast } = result;
31012
31012
  const cssBlock = chunk3WNW5Y7P_cjs.el("style", {}, buildCss11(theme));
31013
31013
  const titleNode = chunk3WNW5Y7P_cjs.title(ast.title ?? "Schematex ERD");
@@ -32226,7 +32226,7 @@ function renderWire(lw) {
32226
32226
  return path2 + dot1 + dot2;
32227
32227
  }
32228
32228
  function renderBreadboardLayout(layout, config) {
32229
- const theme = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
32229
+ const theme = chunkCAAMBDEN_cjs.resolveBaseTheme(config?.theme ?? "default");
32230
32230
  const css = buildCss12(theme);
32231
32231
  const titleStr = layout.ast.title ?? "Breadboard";
32232
32232
  const titleNode = layout.ast.title ? chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 22, class: "lt-bb-title", "text-anchor": "middle" }, layout.ast.title) : "";
@@ -33099,7 +33099,7 @@ function renderBpmn(textInput, config) {
33099
33099
  }
33100
33100
  function renderBpmnLayout(layout, config) {
33101
33101
  const { width, height, ast } = layout;
33102
- const t = chunkNT6VVMLW_cjs.resolveBpmnTheme(config?.theme ?? "default");
33102
+ const t = chunkCAAMBDEN_cjs.resolveBpmnTheme(config?.theme ?? "default");
33103
33103
  const out = [];
33104
33104
  out.push(chunk3WNW5Y7P_cjs.title(ast.title ?? "BPMN diagram"));
33105
33105
  out.push(chunk3WNW5Y7P_cjs.desc(`BPMN ${ast.direction} \u2014 ${ast.pools.length} pool(s), ${layout.objects.length} flow object(s).`));
@@ -35973,26 +35973,2528 @@ var sfc = {
35973
35973
  }
35974
35974
  };
35975
35975
 
35976
+ // src/diagrams/floorplan/catalog.ts
35977
+ var CHAIR_W = 0.44;
35978
+ var CHAIR_D = 0.38;
35979
+ var CHAIR_GAP = 0.27;
35980
+ var CHAIR_OVERHANG = 0.5;
35981
+ var RING = 0.45;
35982
+ function chairAt(px, cx, cy, deg) {
35983
+ const body = chunk3WNW5Y7P_cjs.rect({
35984
+ class: "sx-fp-chair",
35985
+ x: px(-CHAIR_W / 2),
35986
+ y: px(-CHAIR_D / 2),
35987
+ width: px(CHAIR_W),
35988
+ height: px(CHAIR_D),
35989
+ rx: px(0.09)
35990
+ });
35991
+ const rot = Math.round(deg * 10) / 10;
35992
+ return chunk3WNW5Y7P_cjs.el("g", { transform: `translate(${px(cx)},${px(cy)}) rotate(${rot})` }, [body]);
35993
+ }
35994
+ function edgeChairs(c, top, bottom) {
35995
+ const n = Math.max(1, Math.round(c.w / 0.65));
35996
+ const out = [];
35997
+ for (let i = 0; i < n; i++) {
35998
+ const cx = (i + 0.5) / n * c.w;
35999
+ if (top) out.push(chairAt(c.px, cx, -CHAIR_GAP, 0));
36000
+ out.push(chairAt(c.px, cx, c.h + CHAIR_GAP, 180));
36001
+ }
36002
+ return out.join("");
36003
+ }
36004
+ function box(c, cls = "sx-fp-furn", rx = 0) {
36005
+ return chunk3WNW5Y7P_cjs.rect({ class: cls, x: 0, y: 0, width: c.px(c.w), height: c.px(c.h), rx: rx ? c.px(rx) : void 0 });
36006
+ }
36007
+ function glyphText(c, label) {
36008
+ return chunk3WNW5Y7P_cjs.text(
36009
+ {
36010
+ class: "sx-fp-furn-text",
36011
+ x: c.px(c.w / 2),
36012
+ y: c.px(c.h / 2),
36013
+ "text-anchor": "middle",
36014
+ "dominant-baseline": "central",
36015
+ "font-size": c.px(Math.min(0.24, c.h * 0.4))
36016
+ },
36017
+ label
36018
+ );
36019
+ }
36020
+ function bedDraw(pillows) {
36021
+ return (c) => {
36022
+ const parts = [box(c, "sx-fp-furn", 0.05)];
36023
+ const pw = pillows === 2 ? c.w / 2 - 0.18 : c.w - 0.24;
36024
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(0.12), y: c.px(0.1), width: c.px(pw), height: c.px(0.42), rx: c.px(0.06) }));
36025
+ if (pillows === 2) {
36026
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(c.w / 2 + 0.06), y: c.px(0.1), width: c.px(pw), height: c.px(0.42), rx: c.px(0.06) }));
36027
+ }
36028
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(0.72), x2: c.px(c.w), y2: c.px(0.72) }));
36029
+ return parts.join("");
36030
+ };
36031
+ }
36032
+ function sofaDraw(cushions) {
36033
+ return (c) => {
36034
+ const parts = [box(c, "sx-fp-furn", 0.08)];
36035
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(0.15), y: 0, width: c.px(c.w - 0.3), height: c.px(0.18), rx: c.px(0.05) }));
36036
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(0.15), y1: c.px(0.18), x2: c.px(0.15), y2: c.px(c.h - 0.05) }));
36037
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w - 0.15), y1: c.px(0.18), x2: c.px(c.w - 0.15), y2: c.px(c.h - 0.05) }));
36038
+ for (let i = 1; i < cushions; i++) {
36039
+ const x = c.px(0.15 + (c.w - 0.3) * i / cushions);
36040
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: x, y1: c.px(0.18), x2: x, y2: c.px(c.h - 0.08) }));
36041
+ }
36042
+ return parts.join("");
36043
+ };
36044
+ }
36045
+ function shelfDraw(c) {
36046
+ const parts = [box(c)];
36047
+ const n = Math.max(2, Math.round(c.w / 0.15));
36048
+ for (let i = 1; i < n; i++) {
36049
+ const x = c.px(c.w * i / n);
36050
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: x, y1: 0, x2: x, y2: c.px(c.h) }));
36051
+ }
36052
+ return parts.join("");
36053
+ }
36054
+ function boardDraw(c) {
36055
+ return [
36056
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h) }),
36057
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-board-inner", x: c.px(0.08), y: c.px(c.h * 0.2), width: c.px(c.w - 0.16), height: c.px(c.h * 0.6) })
36058
+ ].join("");
36059
+ }
36060
+ function applianceDraw(label, drum) {
36061
+ return (c) => {
36062
+ const parts = [box(c)];
36063
+ if (drum) {
36064
+ parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(Math.min(c.w, c.h) * 0.32) }));
36065
+ } else {
36066
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(0.12), x2: c.px(c.w), y2: c.px(0.12) }));
36067
+ }
36068
+ parts.push(glyphText(c, label));
36069
+ return parts.join("");
36070
+ };
36071
+ }
36072
+ function roundTable(seats, diaM) {
36073
+ const nominal = diaM + 2 * RING;
36074
+ return {
36075
+ w: nominal,
36076
+ h: nominal,
36077
+ draw: (c) => {
36078
+ const half = Math.min(c.w, c.h) / 2;
36079
+ const ring = Math.min(RING, half * 0.37);
36080
+ const r6 = half - ring;
36081
+ const cx = c.w / 2;
36082
+ const cy = c.h / 2;
36083
+ const parts = [chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(cx), cy: c.px(cy), r: c.px(r6) })];
36084
+ for (let i = 0; i < seats; i++) {
36085
+ const a = i / seats * 2 * Math.PI - Math.PI / 2;
36086
+ const px0 = cx + (r6 + ring * 0.55) * Math.cos(a);
36087
+ const py0 = cy + (r6 + ring * 0.55) * Math.sin(a);
36088
+ parts.push(chairAt(c.px, px0, py0, a * 180 / Math.PI + 90));
36089
+ }
36090
+ return parts.join("");
36091
+ }
36092
+ };
36093
+ }
36094
+ function tableDraw(top, bottom) {
36095
+ return (c) => box(c) + edgeChairs(c, top);
36096
+ }
36097
+ var TREAD = 0.28;
36098
+ function treadLines(c, vert, fixed0, fixed1, from, to, dashedFrom) {
36099
+ const parts = [];
36100
+ const dir = to >= from ? 1 : -1;
36101
+ for (let d = from; dir > 0 ? d <= to : d >= to; d += TREAD * dir) {
36102
+ const dashed = dashedFrom !== void 0 && (dir > 0 ? d > dashedFrom : d < dashedFrom);
36103
+ const cls = dashed ? "sx-fp-furn-dash" : "sx-fp-furn-line";
36104
+ if (vert) parts.push(chunk3WNW5Y7P_cjs.line({ class: cls, x1: c.px(fixed0), y1: c.px(d), x2: c.px(fixed1), y2: c.px(d) }));
36105
+ else parts.push(chunk3WNW5Y7P_cjs.line({ class: cls, x1: c.px(d), y1: c.px(fixed0), x2: c.px(d), y2: c.px(fixed1) }));
36106
+ }
36107
+ return parts.join("");
36108
+ }
36109
+ function breakLine(c, vert, lo, hi, at) {
36110
+ const span = hi - lo;
36111
+ const dz = Math.min(0.12, span * 0.18);
36112
+ const tilt = span * 0.18;
36113
+ const pts = vert ? [
36114
+ [lo, at + tilt],
36115
+ [lo + span * 0.4, at + tilt * 0.2],
36116
+ [lo + span * 0.5 - dz, at + tilt * 0.2 + dz],
36117
+ [lo + span * 0.5 + dz, at - tilt * 0.2 - dz],
36118
+ [lo + span * 0.6, at - tilt * 0.2],
36119
+ [hi, at - tilt]
36120
+ ] : [
36121
+ [at + tilt, lo],
36122
+ [at + tilt * 0.2, lo + span * 0.4],
36123
+ [at + tilt * 0.2 + dz, lo + span * 0.5 - dz],
36124
+ [at - tilt * 0.2 - dz, lo + span * 0.5 + dz],
36125
+ [at - tilt * 0.2, lo + span * 0.6],
36126
+ [at - tilt, hi]
36127
+ ];
36128
+ const d = pts.map(([a, b], i) => `${i === 0 ? "M" : "L"} ${c.px(vert ? a : a)} ${c.px(vert ? b : b)}`).join(" ");
36129
+ return chunk3WNW5Y7P_cjs.path({ class: "sx-fp-stair-break", d });
36130
+ }
36131
+ function dirArrow(c, points, labelText2) {
36132
+ const parts = [];
36133
+ const [sx, sy] = points[0];
36134
+ parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(sx), cy: c.px(sy), r: c.px(0.05) }));
36135
+ const d = points.map(([x, y], i) => `${i === 0 ? "M" : "L"} ${c.px(x)} ${c.px(y)}`).join(" ");
36136
+ parts.push(chunk3WNW5Y7P_cjs.path({ class: "sx-fp-furn-line", d }));
36137
+ const [ex, ey] = points[points.length - 1];
36138
+ const [px2, py2] = points[points.length - 2];
36139
+ const ang = Math.atan2(ey - py2, ex - px2);
36140
+ const hs = 0.11;
36141
+ const a1 = ang + Math.PI - 0.5;
36142
+ const a2 = ang + Math.PI + 0.5;
36143
+ parts.push(
36144
+ chunk3WNW5Y7P_cjs.polygon({
36145
+ class: "sx-fp-furn-dot",
36146
+ points: `${c.px(ex)},${c.px(ey)} ${c.px(ex + hs * Math.cos(a1))},${c.px(ey + hs * Math.sin(a1))} ${c.px(ex + hs * Math.cos(a2))},${c.px(ey + hs * Math.sin(a2))}`
36147
+ })
36148
+ );
36149
+ const [nx, ny] = points[1];
36150
+ const segLen = Math.hypot(nx - sx, ny - sy) || 1;
36151
+ const ux = (nx - sx) / segLen;
36152
+ const uy = (ny - sy) / segLen;
36153
+ const lx = sx + ux * 0.42 - uy * 0.16;
36154
+ const ly = sy + uy * 0.42 + ux * 0.16;
36155
+ parts.push(
36156
+ chunk3WNW5Y7P_cjs.text(
36157
+ {
36158
+ class: "sx-fp-furn-text",
36159
+ x: c.px(lx),
36160
+ y: c.px(ly),
36161
+ "text-anchor": "middle",
36162
+ "dominant-baseline": "central",
36163
+ "font-size": c.px(0.18)
36164
+ },
36165
+ labelText2
36166
+ )
36167
+ );
36168
+ return parts.join("");
36169
+ }
36170
+ function straightStairs(c) {
36171
+ const vert = c.h >= c.w;
36172
+ const len = vert ? c.h : c.w;
36173
+ const breakAt = Math.min(7 * TREAD, len * 0.62);
36174
+ const parts = [box(c, "sx-fp-furn-nofill")];
36175
+ if (vert) {
36176
+ parts.push(treadLines(c, true, 0, c.w, c.h - TREAD, 0.02, c.h - breakAt));
36177
+ parts.push(breakLine(c, true, 0, c.w, c.h - breakAt));
36178
+ parts.push(dirArrow(c, [[c.w / 2, c.h - 0.18], [c.w / 2, c.h - breakAt + 0.28]], c.label ?? "UP"));
36179
+ } else {
36180
+ parts.push(treadLines(c, false, 0, c.h, TREAD, c.w - 0.02, breakAt));
36181
+ parts.push(breakLine(c, false, 0, c.h, breakAt));
36182
+ parts.push(dirArrow(c, [[0.18, c.h / 2], [breakAt - 0.28, c.h / 2]], c.label ?? "UP"));
36183
+ }
36184
+ return parts.join("");
36185
+ }
36186
+ function lStairs(c) {
36187
+ const rw = Math.min(c.w, c.h) * 0.45;
36188
+ const parts = [
36189
+ chunk3WNW5Y7P_cjs.path({
36190
+ class: "sx-fp-furn-nofill",
36191
+ d: `M 0 0 L ${c.px(c.w)} 0 L ${c.px(c.w)} ${c.px(rw)} L ${c.px(rw)} ${c.px(rw)} L ${c.px(rw)} ${c.px(c.h)} L 0 ${c.px(c.h)} Z`
36192
+ })
36193
+ ];
36194
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(rw), y1: 0, x2: c.px(rw), y2: c.px(rw) }));
36195
+ parts.push(treadLines(c, true, 0, rw, c.h - TREAD, rw + 0.05));
36196
+ const breakAt = rw + (c.w - rw) * 0.55;
36197
+ parts.push(treadLines(c, false, 0, rw, rw + TREAD, c.w - 0.02, breakAt));
36198
+ parts.push(breakLine(c, false, 0, rw, breakAt));
36199
+ parts.push(
36200
+ dirArrow(
36201
+ c,
36202
+ [
36203
+ [rw / 2, c.h - 0.18],
36204
+ [rw / 2, rw / 2],
36205
+ [breakAt - 0.24, rw / 2]
36206
+ ],
36207
+ c.label ?? "UP"
36208
+ )
36209
+ );
36210
+ return parts.join("");
36211
+ }
36212
+ function uStairs(c) {
36213
+ const lh = Math.min(c.h * 0.3, Math.max(0.9, c.w / 2));
36214
+ const mid = c.w / 2;
36215
+ const parts = [box(c, "sx-fp-furn-nofill")];
36216
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(lh), x2: c.px(c.w), y2: c.px(lh) }));
36217
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(mid), y1: c.px(lh), x2: c.px(mid), y2: c.px(c.h) }));
36218
+ parts.push(treadLines(c, true, mid, c.w, c.h - TREAD, lh + 0.05));
36219
+ const breakAt = lh + (c.h - lh) * 0.4;
36220
+ parts.push(treadLines(c, true, 0, mid, lh + TREAD, c.h - 0.02, breakAt));
36221
+ parts.push(breakLine(c, true, 0, mid, breakAt));
36222
+ parts.push(
36223
+ dirArrow(
36224
+ c,
36225
+ [
36226
+ [mid + mid / 2, c.h - 0.18],
36227
+ [mid + mid / 2, lh / 2],
36228
+ [mid / 2, lh / 2],
36229
+ [mid / 2, breakAt - 0.24]
36230
+ ],
36231
+ c.label ?? "UP"
36232
+ )
36233
+ );
36234
+ return parts.join("");
36235
+ }
36236
+ function spiralStairs(c) {
36237
+ const r6 = Math.min(c.w, c.h) / 2 - 0.02;
36238
+ const cx = c.w / 2;
36239
+ const cy = c.h / 2;
36240
+ const parts = [
36241
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(cx), cy: c.px(cy), r: c.px(r6) }),
36242
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(cx), cy: c.px(cy), r: c.px(0.08) })
36243
+ ];
36244
+ for (let i = 0; i < 12; i++) {
36245
+ const a = i / 12 * 2 * Math.PI;
36246
+ parts.push(
36247
+ chunk3WNW5Y7P_cjs.line({
36248
+ class: "sx-fp-furn-line",
36249
+ x1: c.px(cx + 0.08 * Math.cos(a)),
36250
+ y1: c.px(cy + 0.08 * Math.sin(a)),
36251
+ x2: c.px(cx + r6 * Math.cos(a)),
36252
+ y2: c.px(cy + r6 * Math.sin(a))
36253
+ })
36254
+ );
36255
+ }
36256
+ const wr = r6 * 0.62;
36257
+ const a0 = Math.PI * 0.75;
36258
+ const a1 = Math.PI * 1.9;
36259
+ const steps = 5;
36260
+ const pts = [];
36261
+ for (let i = 0; i <= steps; i++) {
36262
+ const a = a0 + (a1 - a0) * i / steps;
36263
+ pts.push([cx + wr * Math.cos(a), cy + wr * Math.sin(a)]);
36264
+ }
36265
+ parts.push(dirArrow(c, pts, c.label ?? "UP"));
36266
+ return parts.join("");
36267
+ }
36268
+ var FLOORPLAN_SYMBOLS = {
36269
+ // ── residential / living ──
36270
+ "bed-double": { w: 1.6, h: 2, draw: bedDraw(2) },
36271
+ "bed-single": { w: 0.9, h: 2, draw: bedDraw(1) },
36272
+ "bed-queen": { w: 1.55, h: 2.05, draw: bedDraw(2) },
36273
+ "bed-king": { w: 1.95, h: 2.05, draw: bedDraw(2) },
36274
+ sofa: { w: 2.2, h: 0.9, draw: sofaDraw(3) },
36275
+ loveseat: { w: 1.5, h: 0.9, draw: sofaDraw(2) },
36276
+ armchair: { w: 0.9, h: 0.9, draw: sofaDraw(1) },
36277
+ "coffee-table": { w: 1, h: 0.5, draw: (c) => box(c, "sx-fp-furn", 0.06) },
36278
+ tv: { w: 1.4, h: 0.15, draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h) }) },
36279
+ rug: {
36280
+ w: 2,
36281
+ h: 1.4,
36282
+ underlay: true,
36283
+ draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-rug", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h), rx: c.px(0.1) })
36284
+ },
36285
+ wardrobe: {
36286
+ w: 1.8,
36287
+ h: 0.6,
36288
+ draw: (c) => {
36289
+ const parts = [box(c)];
36290
+ if (c.w >= c.h) {
36291
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h / 2), x2: c.px(c.w), y2: c.px(c.h / 2) }));
36292
+ const n = Math.max(2, Math.round(c.w / 0.15));
36293
+ for (let i = 0; i < n; i++) {
36294
+ const x = c.px((i + 0.5) / n * c.w);
36295
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: x, y1: c.px(c.h / 2 - 0.1), x2: x, y2: c.px(c.h / 2 + 0.1) }));
36296
+ }
36297
+ } else {
36298
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w / 2), y1: 0, x2: c.px(c.w / 2), y2: c.px(c.h) }));
36299
+ const n = Math.max(2, Math.round(c.h / 0.15));
36300
+ for (let i = 0; i < n; i++) {
36301
+ const y = c.px((i + 0.5) / n * c.h);
36302
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w / 2 - 0.1), y1: y, x2: c.px(c.w / 2 + 0.1), y2: y }));
36303
+ }
36304
+ }
36305
+ return parts.join("");
36306
+ }
36307
+ },
36308
+ dresser: {
36309
+ w: 1.2,
36310
+ h: 0.5,
36311
+ draw: (c) => [
36312
+ box(c),
36313
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h / 2), x2: c.px(c.w), y2: c.px(c.h / 2) }),
36314
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w * 0.3), cy: c.px(c.h * 0.25), r: c.px(0.03) }),
36315
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w * 0.7), cy: c.px(c.h * 0.25), r: c.px(0.03) })
36316
+ ].join("")
36317
+ },
36318
+ nightstand: {
36319
+ w: 0.5,
36320
+ h: 0.4,
36321
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(0.08) })
36322
+ },
36323
+ bookshelf: { w: 0.9, h: 0.3, draw: shelfDraw },
36324
+ plant: {
36325
+ w: 0.5,
36326
+ h: 0.5,
36327
+ draw: (c) => {
36328
+ const r6 = Math.min(c.w, c.h) / 2;
36329
+ const parts = [chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(r6) })];
36330
+ for (const a of [0, 60, 120, 180, 240, 300]) {
36331
+ const rad = a * Math.PI / 180;
36332
+ parts.push(
36333
+ chunk3WNW5Y7P_cjs.line({
36334
+ class: "sx-fp-furn-line",
36335
+ x1: c.px(c.w / 2),
36336
+ y1: c.px(c.h / 2),
36337
+ x2: c.px(c.w / 2 + (r6 - 0.03) * Math.cos(rad)),
36338
+ y2: c.px(c.h / 2 + (r6 - 0.03) * Math.sin(rad))
36339
+ })
36340
+ );
36341
+ }
36342
+ return parts.join("");
36343
+ }
36344
+ },
36345
+ "dining-table": { w: 1.6, h: 0.9, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true) },
36346
+ sectional: {
36347
+ w: 2.6,
36348
+ h: 2,
36349
+ draw: (c) => {
36350
+ const d = 0.9 * Math.min(c.h / 2, 1);
36351
+ const parts = [
36352
+ chunk3WNW5Y7P_cjs.path({
36353
+ class: "sx-fp-furn",
36354
+ d: `M 0 0 L ${c.px(c.w)} 0 L ${c.px(c.w)} ${c.px(d)} L ${c.px(d)} ${c.px(d)} L ${c.px(d)} ${c.px(c.h)} L 0 ${c.px(c.h)} Z`
36355
+ }),
36356
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(0.12), y: 0, width: c.px(c.w - 0.24), height: c.px(0.16), rx: c.px(0.05) }),
36357
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: 0, y: c.px(0.12), width: c.px(0.16), height: c.px(c.h - 0.24), rx: c.px(0.05) })
36358
+ ];
36359
+ for (const fx of [0.33, 0.66]) {
36360
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(d + (c.w - d) * fx), y1: c.px(0.16), x2: c.px(d + (c.w - d) * fx), y2: c.px(d - 0.05) }));
36361
+ }
36362
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(0.16), y1: c.px(c.h / 2 + d / 4), x2: c.px(d - 0.05), y2: c.px(c.h / 2 + d / 4) }));
36363
+ return parts.join("");
36364
+ }
36365
+ },
36366
+ "side-table": { w: 0.5, h: 0.5, draw: (c) => box(c, "sx-fp-furn", 0.06) },
36367
+ "tv-stand": {
36368
+ w: 1.6,
36369
+ h: 0.45,
36370
+ underlay: true,
36371
+ // a surface — the TV sits on it
36372
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h / 2), x2: c.px(c.w), y2: c.px(c.h / 2) })
36373
+ },
36374
+ fireplace: {
36375
+ w: 1.5,
36376
+ h: 0.5,
36377
+ draw: (c) => {
36378
+ const inset = Math.min(0.18, c.w * 0.15);
36379
+ return [
36380
+ box(c),
36381
+ // firebox opening toward the room (south edge)
36382
+ chunk3WNW5Y7P_cjs.rect({
36383
+ class: "sx-fp-furn-line",
36384
+ x: c.px(inset),
36385
+ y: c.px(c.h * 0.3),
36386
+ width: c.px(c.w - 2 * inset),
36387
+ height: c.px(c.h * 0.7 - 0.04)
36388
+ }),
36389
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h * 0.3), x2: c.px(inset), y2: 0 }),
36390
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w), y1: c.px(c.h * 0.3), x2: c.px(c.w - inset), y2: 0 })
36391
+ ].join("");
36392
+ }
36393
+ },
36394
+ "floor-lamp": {
36395
+ w: 0.35,
36396
+ h: 0.35,
36397
+ draw: (c) => {
36398
+ const r6 = Math.min(c.w, c.h) / 2;
36399
+ return [
36400
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(r6) }),
36401
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w / 2 - r6), y1: c.px(c.h / 2), x2: c.px(c.w / 2 + r6), y2: c.px(c.h / 2) }),
36402
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w / 2), y1: c.px(c.h / 2 - r6), x2: c.px(c.w / 2), y2: c.px(c.h / 2 + r6) })
36403
+ ].join("");
36404
+ }
36405
+ },
36406
+ ottoman: { w: 0.6, h: 0.45, draw: (c) => box(c, "sx-fp-furn", 0.12) },
36407
+ piano: {
36408
+ w: 1.5,
36409
+ h: 1.7,
36410
+ draw: (c) => {
36411
+ const X = (v) => c.px(v * (c.w / 1.5));
36412
+ const Y = (v) => c.px(v * (c.h / 1.7));
36413
+ const body = [
36414
+ `M ${X(0)} ${Y(0)}`,
36415
+ `L ${X(1.5)} ${Y(0)}`,
36416
+ `L ${X(1.5)} ${Y(0.75)}`,
36417
+ `C ${X(1.5)} ${Y(1.25)} ${X(1.25)} ${Y(1.7)} ${X(0.8)} ${Y(1.7)}`,
36418
+ `C ${X(0.45)} ${Y(1.7)} ${X(0.28)} ${Y(1.45)} ${X(0.28)} ${Y(1.1)}`,
36419
+ `C ${X(0.28)} ${Y(0.85)} ${X(0.14)} ${Y(0.72)} ${X(0)} ${Y(0.68)}`,
36420
+ "Z"
36421
+ ].join(" ");
36422
+ return chunk3WNW5Y7P_cjs.path({ class: "sx-fp-furn", d: body }) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: X(0), y1: Y(0.14), x2: X(1.5), y2: Y(0.14) }) + chairAt(c.px, c.w / 1.5 * 0.75, -0.25, 180);
36423
+ },
36424
+ envelope: [CHAIR_OVERHANG, 0, 0, 0]
36425
+ },
36426
+ "piano-upright": {
36427
+ w: 1.5,
36428
+ h: 0.6,
36429
+ envelope: [0, 0, CHAIR_OVERHANG, 0],
36430
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h * 0.55), x2: c.px(c.w), y2: c.px(c.h * 0.55) }) + chairAt(c.px, c.w / 2, c.h + CHAIR_GAP, 180)
36431
+ },
36432
+ "pool-table": {
36433
+ w: 2.54,
36434
+ h: 1.27,
36435
+ draw: (c) => {
36436
+ const rail = Math.min(0.12, c.h * 0.1);
36437
+ const parts = [
36438
+ box(c, "sx-fp-furn", 0.06),
36439
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(rail), y: c.px(rail), width: c.px(c.w - 2 * rail), height: c.px(c.h - 2 * rail) })
36440
+ ];
36441
+ for (const [px0, py0] of [
36442
+ [rail, rail],
36443
+ [c.w / 2, rail],
36444
+ [c.w - rail, rail],
36445
+ [rail, c.h - rail],
36446
+ [c.w / 2, c.h - rail],
36447
+ [c.w - rail, c.h - rail]
36448
+ ]) {
36449
+ parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(px0), cy: c.px(py0), r: c.px(0.045) }));
36450
+ }
36451
+ return parts.join("");
36452
+ }
36453
+ },
36454
+ crib: {
36455
+ w: 0.7,
36456
+ h: 1.3,
36457
+ draw: (c) => {
36458
+ const parts = [box(c, "sx-fp-furn", 0.05), chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(0.08), y: c.px(0.08), width: c.px(c.w - 0.16), height: c.px(c.h - 0.16), rx: c.px(0.04) })];
36459
+ const n = Math.max(3, Math.round(c.h / 0.18));
36460
+ for (let i = 1; i < n; i++) {
36461
+ const y = c.px(0.08 + (c.h - 0.16) * i / n);
36462
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(0.08), y1: y, x2: c.px(c.w - 0.08), y2: y }));
36463
+ }
36464
+ return parts.join("");
36465
+ }
36466
+ },
36467
+ "bunk-bed": {
36468
+ w: 0.95,
36469
+ h: 2,
36470
+ draw: (c) => bedDraw(1)(c) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-dash", x1: c.px(0.07), y1: c.px(0.07), x2: c.px(c.w - 0.07), y2: c.px(0.07) }) + [0.25, 0.45, 0.65].map((f) => chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w - 0.16), y1: c.px(c.h * f), x2: c.px(c.w), y2: c.px(c.h * f) })).join("")
36471
+ },
36472
+ "ceiling-fan": {
36473
+ w: 0.9,
36474
+ h: 0.9,
36475
+ underlay: true,
36476
+ // overhead fixture — never collides with floor furniture
36477
+ draw: (c) => {
36478
+ const r6 = Math.min(c.w, c.h) / 2;
36479
+ const cx = c.w / 2;
36480
+ const cy = c.h / 2;
36481
+ const parts = [
36482
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dash", cx: c.px(cx), cy: c.px(cy), r: c.px(r6) }),
36483
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(cx), cy: c.px(cy), r: c.px(r6 * 0.18) })
36484
+ ];
36485
+ for (const a of [20, 110, 200, 290]) {
36486
+ const rad = a * Math.PI / 180;
36487
+ parts.push(
36488
+ chunk3WNW5Y7P_cjs.el("ellipse", {
36489
+ class: "sx-fp-furn-line",
36490
+ cx: c.px(cx + r6 * 0.55 * Math.cos(rad)),
36491
+ cy: c.px(cy + r6 * 0.55 * Math.sin(rad)),
36492
+ rx: c.px(r6 * 0.42),
36493
+ ry: c.px(r6 * 0.15),
36494
+ transform: `rotate(${a} ${c.px(cx + r6 * 0.55 * Math.cos(rad))} ${c.px(cy + r6 * 0.55 * Math.sin(rad))})`
36495
+ })
36496
+ );
36497
+ }
36498
+ return parts.join("");
36499
+ }
36500
+ },
36501
+ // ── kitchen / bath ──
36502
+ counter: {
36503
+ w: 2,
36504
+ h: 0.6,
36505
+ underlay: true,
36506
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.line({
36507
+ class: "sx-fp-furn-dash",
36508
+ x1: c.px(0.05),
36509
+ y1: c.px(c.h - 0.06),
36510
+ x2: c.px(c.w - 0.05),
36511
+ y2: c.px(c.h - 0.06)
36512
+ })
36513
+ },
36514
+ "kitchen-sink": {
36515
+ w: 0.8,
36516
+ h: 0.6,
36517
+ draw: (c) => [
36518
+ box(c),
36519
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(0.07), y: c.px(0.1), width: c.px(c.w / 2 - 0.11), height: c.px(c.h - 0.2), rx: c.px(0.04) }),
36520
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(c.w / 2 + 0.04), y: c.px(0.1), width: c.px(c.w / 2 - 0.11), height: c.px(c.h - 0.2), rx: c.px(0.04) }),
36521
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(c.w / 2), cy: c.px(0.06), r: c.px(0.024) })
36522
+ ].join("")
36523
+ },
36524
+ stove: {
36525
+ w: 0.6,
36526
+ h: 0.6,
36527
+ draw: (c) => {
36528
+ const parts = [box(c)];
36529
+ const inset = 0.18;
36530
+ for (const [bx, by] of [
36531
+ [inset, inset],
36532
+ [c.w - inset, inset],
36533
+ [inset, c.h - inset],
36534
+ [c.w - inset, c.h - inset]
36535
+ ]) {
36536
+ parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(bx), cy: c.px(by), r: c.px(0.085) }));
36537
+ }
36538
+ return parts.join("");
36539
+ }
36540
+ },
36541
+ fridge: { w: 0.7, h: 0.7, draw: applianceDraw("REF", false) },
36542
+ dishwasher: { w: 0.6, h: 0.6, draw: applianceDraw("DW", false) },
36543
+ island: {
36544
+ w: 1.8,
36545
+ h: 0.9,
36546
+ underlay: true,
36547
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(0.08), y: c.px(0.08), width: c.px(c.w - 0.16), height: c.px(c.h - 0.16) })
36548
+ },
36549
+ toilet: {
36550
+ w: 0.5,
36551
+ h: 0.7,
36552
+ draw: (c) => [
36553
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: 0, y: 0, width: c.px(c.w), height: c.px(0.2), rx: c.px(0.04) }),
36554
+ chunk3WNW5Y7P_cjs.el("ellipse", {
36555
+ class: "sx-fp-furn",
36556
+ cx: c.px(c.w / 2),
36557
+ cy: c.px(0.2 + (c.h - 0.24) / 2),
36558
+ rx: c.px(c.w / 2 - 0.04),
36559
+ ry: c.px((c.h - 0.28) / 2)
36560
+ })
36561
+ ].join("")
36562
+ },
36563
+ sink: {
36564
+ w: 0.55,
36565
+ h: 0.45,
36566
+ draw: (c) => [
36567
+ box(c, "sx-fp-furn", 0.05),
36568
+ chunk3WNW5Y7P_cjs.el("ellipse", {
36569
+ class: "sx-fp-furn-line",
36570
+ cx: c.px(c.w / 2),
36571
+ cy: c.px(c.h / 2 + 0.02),
36572
+ rx: c.px(c.w / 2 - 0.08),
36573
+ ry: c.px(c.h / 2 - 0.1)
36574
+ }),
36575
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(c.w / 2), cy: c.px(0.07), r: c.px(0.024) })
36576
+ ].join("")
36577
+ },
36578
+ bathtub: {
36579
+ w: 0.8,
36580
+ h: 1.7,
36581
+ draw: (c) => [
36582
+ box(c, "sx-fp-furn", 0.08),
36583
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(0.09), y: c.px(0.09), width: c.px(c.w - 0.18), height: c.px(c.h - 0.18), rx: c.px(0.22) }),
36584
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(c.w / 2), cy: c.px(0.26), r: c.px(0.035) })
36585
+ ].join("")
36586
+ },
36587
+ shower: {
36588
+ w: 0.9,
36589
+ h: 0.9,
36590
+ draw: (c) => [
36591
+ box(c),
36592
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: 0, x2: c.px(c.w), y2: c.px(c.h) }),
36593
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w), y1: 0, x2: 0, y2: c.px(c.h) }),
36594
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(0.15), cy: c.px(0.15), r: c.px(0.06) })
36595
+ ].join("")
36596
+ },
36597
+ washer: { w: 0.6, h: 0.6, draw: applianceDraw("W", true) },
36598
+ dryer: { w: 0.6, h: 0.6, draw: applianceDraw("D", true) },
36599
+ "wall-cabinet": {
36600
+ w: 0.9,
36601
+ h: 0.35,
36602
+ underlay: true,
36603
+ // above the cut plane — drawn dashed over the base run
36604
+ draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-dash", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h) })
36605
+ },
36606
+ "range-hood": {
36607
+ w: 0.8,
36608
+ h: 0.55,
36609
+ underlay: true,
36610
+ // above the cut plane
36611
+ draw: (c) => chunk3WNW5Y7P_cjs.el("g", {}, [
36612
+ chunk3WNW5Y7P_cjs.polygon({
36613
+ class: "sx-fp-furn-dash",
36614
+ points: `${c.px(0.08)},0 ${c.px(c.w - 0.08)},0 ${c.px(c.w)},${c.px(c.h)} 0,${c.px(c.h)}`
36615
+ })
36616
+ ])
36617
+ },
36618
+ "bar-stool": {
36619
+ w: 0.35,
36620
+ h: 0.35,
36621
+ draw: (c) => chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-chair", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(Math.min(c.w, c.h) / 2) })
36622
+ },
36623
+ vanity: {
36624
+ w: 1.5,
36625
+ h: 0.55,
36626
+ draw: (c) => {
36627
+ const parts = [box(c)];
36628
+ for (const fx of [0.27, 0.73]) {
36629
+ parts.push(
36630
+ chunk3WNW5Y7P_cjs.el("ellipse", {
36631
+ class: "sx-fp-furn-line",
36632
+ cx: c.px(c.w * fx),
36633
+ cy: c.px(c.h / 2 + 0.02),
36634
+ rx: c.px(Math.min(0.22, c.w * 0.16)),
36635
+ ry: c.px(c.h / 2 - 0.12)
36636
+ })
36637
+ );
36638
+ parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(c.w * fx), cy: c.px(0.07), r: c.px(0.022) }));
36639
+ }
36640
+ return parts.join("");
36641
+ }
36642
+ },
36643
+ bidet: {
36644
+ w: 0.4,
36645
+ h: 0.6,
36646
+ draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(c.w * 0.15), y: 0, width: c.px(c.w * 0.7), height: c.px(0.12), rx: c.px(0.03) }) + chunk3WNW5Y7P_cjs.el("ellipse", {
36647
+ class: "sx-fp-furn",
36648
+ cx: c.px(c.w / 2),
36649
+ cy: c.px(0.12 + (c.h - 0.16) / 2),
36650
+ rx: c.px(c.w / 2 - 0.03),
36651
+ ry: c.px((c.h - 0.18) / 2)
36652
+ }) + chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w / 2), cy: c.px(c.h * 0.45), r: c.px(0.035) })
36653
+ },
36654
+ urinal: {
36655
+ w: 0.4,
36656
+ h: 0.35,
36657
+ draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: 0, y: 0, width: c.px(c.w), height: c.px(0.08) }) + chunk3WNW5Y7P_cjs.path({
36658
+ class: "sx-fp-furn",
36659
+ d: `M ${c.px(0.05)} ${c.px(0.08)} L ${c.px(c.w - 0.05)} ${c.px(0.08)} C ${c.px(c.w - 0.05)} ${c.px(c.h * 0.75)} ${c.px(c.w * 0.7)} ${c.px(c.h)} ${c.px(c.w / 2)} ${c.px(c.h)} C ${c.px(c.w * 0.3)} ${c.px(c.h)} ${c.px(0.05)} ${c.px(c.h * 0.75)} ${c.px(0.05)} ${c.px(0.08)} Z`
36660
+ })
36661
+ },
36662
+ // ── stairs & vertical circulation ──
36663
+ stairs: { w: 1, h: 3, consumesLabel: true, draw: straightStairs },
36664
+ "stairs-l": { w: 2.2, h: 2.2, consumesLabel: true, draw: lStairs },
36665
+ "stairs-u": { w: 2, h: 3, consumesLabel: true, draw: uStairs },
36666
+ "spiral-stairs": { w: 1.5, h: 1.5, consumesLabel: true, draw: spiralStairs },
36667
+ elevator: {
36668
+ w: 1.6,
36669
+ h: 1.5,
36670
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: 0, x2: c.px(c.w), y2: c.px(c.h) }) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(c.w), y1: 0, x2: 0, y2: c.px(c.h) })
36671
+ },
36672
+ // ── structural ──
36673
+ column: {
36674
+ w: 0.4,
36675
+ h: 0.4,
36676
+ draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h) })
36677
+ },
36678
+ // ── classroom / office ──
36679
+ "desk-chair": {
36680
+ w: 0.6,
36681
+ h: 0.75,
36682
+ draw: (c) => [
36683
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h * 0.58) }),
36684
+ chunk3WNW5Y7P_cjs.rect({
36685
+ class: "sx-fp-chair",
36686
+ x: c.px(c.w / 2 - c.w * 0.3),
36687
+ y: c.px(c.h * 0.66),
36688
+ width: c.px(c.w * 0.6),
36689
+ height: c.px(c.h * 0.32),
36690
+ rx: c.px(0.07)
36691
+ })
36692
+ ].join("")
36693
+ },
36694
+ desk: {
36695
+ w: 1.4,
36696
+ h: 0.7,
36697
+ envelope: [0, 0, CHAIR_OVERHANG, 0],
36698
+ draw: (c) => box(c) + chairAt(c.px, c.w / 2, c.h + CHAIR_GAP, 180)
36699
+ },
36700
+ chair: {
36701
+ w: 0.45,
36702
+ h: 0.45,
36703
+ draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-chair", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h), rx: c.px(0.1) }) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(0.06), x2: 0, y2: c.px(c.h - 0.06) })
36704
+ },
36705
+ whiteboard: { w: 3, h: 0.12, draw: boardDraw },
36706
+ smartboard: { w: 2, h: 0.12, draw: boardDraw },
36707
+ bookcase: { w: 0.9, h: 0.3, draw: shelfDraw },
36708
+ "desk-l": {
36709
+ w: 1.6,
36710
+ h: 1.6,
36711
+ draw: (c) => {
36712
+ const d = 0.7 * Math.min(c.w / 1.6, c.h / 1.6);
36713
+ return chunk3WNW5Y7P_cjs.path({
36714
+ class: "sx-fp-furn",
36715
+ d: `M 0 0 L ${c.px(c.w)} 0 L ${c.px(c.w)} ${c.px(d)} L ${c.px(d)} ${c.px(d)} L ${c.px(d)} ${c.px(c.h)} L 0 ${c.px(c.h)} Z`
36716
+ }) + chairAt(c.px, d + 0.32, d + 0.32, 315);
36717
+ }
36718
+ },
36719
+ "filing-cabinet": {
36720
+ w: 0.5,
36721
+ h: 0.6,
36722
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h / 3), x2: c.px(c.w), y2: c.px(c.h / 3) }) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(2 * c.h / 3), x2: c.px(c.w), y2: c.px(2 * c.h / 3) })
36723
+ },
36724
+ lockers: {
36725
+ w: 1.8,
36726
+ h: 0.45,
36727
+ draw: (c) => {
36728
+ const parts = [box(c)];
36729
+ const n = Math.max(2, Math.round(c.w / 0.3));
36730
+ for (let i = 1; i < n; i++) {
36731
+ const x = c.px(c.w * i / n);
36732
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: x, y1: 0, x2: x, y2: c.px(c.h) }));
36733
+ }
36734
+ for (let i = 0; i < n; i++) {
36735
+ parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px((i + 0.78) / n * c.w), cy: c.px(c.h / 2), r: c.px(0.02) }));
36736
+ }
36737
+ return parts.join("");
36738
+ }
36739
+ },
36740
+ cubbies: {
36741
+ w: 2,
36742
+ h: 0.4,
36743
+ draw: (c) => {
36744
+ const parts = [box(c)];
36745
+ const n = Math.max(2, Math.round(c.w / 0.3));
36746
+ for (let i = 1; i < n; i++) {
36747
+ const x = c.px(c.w * i / n);
36748
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: x, y1: 0, x2: x, y2: c.px(c.h) }));
36749
+ }
36750
+ return parts.join("");
36751
+ }
36752
+ },
36753
+ "kidney-table": {
36754
+ w: 1.8,
36755
+ h: 1.2,
36756
+ draw: (c) => {
36757
+ const sx = c.w / 1.8;
36758
+ const sy = c.h / 1.2;
36759
+ const X = (v) => c.px(v * sx);
36760
+ const Y = (v) => c.px(v * sy);
36761
+ const d = [
36762
+ `M ${X(0)} ${Y(0.55)}`,
36763
+ `C ${X(0)} ${Y(0.15)} ${X(0.35)} ${Y(0)} ${X(0.9)} ${Y(0)}`,
36764
+ `C ${X(1.45)} ${Y(0)} ${X(1.8)} ${Y(0.15)} ${X(1.8)} ${Y(0.55)}`,
36765
+ `C ${X(1.8)} ${Y(0.95)} ${X(1.5)} ${Y(1.2)} ${X(1.18)} ${Y(1.2)}`,
36766
+ `Q ${X(0.9)} ${Y(0.82)} ${X(0.62)} ${Y(1.2)}`,
36767
+ `C ${X(0.3)} ${Y(1.2)} ${X(0)} ${Y(0.95)} ${X(0)} ${Y(0.55)}`,
36768
+ "Z"
36769
+ ].join(" ");
36770
+ return chunk3WNW5Y7P_cjs.path({ class: "sx-fp-furn", d });
36771
+ }
36772
+ },
36773
+ "round-table-4": roundTable(4, 1.52),
36774
+ "round-table-6": roundTable(6, 1.52),
36775
+ "round-table-8": roundTable(8, 1.52),
36776
+ "round-table-10": roundTable(10, 1.83),
36777
+ "conference-table": { w: 2.4, h: 1.2, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true) },
36778
+ // ── event / banquet ──
36779
+ "banquet-table": { w: 2.44, h: 0.76, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true) },
36780
+ "head-table": { w: 3.7, h: 0.76, envelope: [0, 0, CHAIR_OVERHANG, 0], draw: tableDraw(false) },
36781
+ stage: {
36782
+ w: 4,
36783
+ h: 2,
36784
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.rect({
36785
+ class: "sx-fp-furn-dash",
36786
+ x: c.px(0.1),
36787
+ y: c.px(0.1),
36788
+ width: c.px(c.w - 0.2),
36789
+ height: c.px(c.h - 0.2)
36790
+ })
36791
+ },
36792
+ "dance-floor": {
36793
+ w: 4,
36794
+ h: 4,
36795
+ underlay: true,
36796
+ draw: (c) => {
36797
+ const parts = [];
36798
+ for (let d = 0.5; d < c.w + c.h; d += 0.5) {
36799
+ const x1 = Math.max(0, d - c.h);
36800
+ const y1 = Math.min(d, c.h);
36801
+ const x2 = Math.min(d, c.w);
36802
+ const y2 = Math.max(0, d - c.w);
36803
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-hatch", x1: c.px(x1), y1: c.px(y1), x2: c.px(x2), y2: c.px(y2) }));
36804
+ }
36805
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-nofill", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h) }));
36806
+ return parts.join("");
36807
+ }
36808
+ },
36809
+ bar: {
36810
+ w: 3,
36811
+ h: 0.7,
36812
+ draw: (c) => box(c) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h - 0.15), x2: c.px(c.w), y2: c.px(c.h - 0.15) })
36813
+ },
36814
+ "dj-booth": { w: 1.2, h: 0.8, draw: (c) => box(c) + glyphText(c, "DJ") },
36815
+ "cocktail-table": {
36816
+ w: 0.76,
36817
+ h: 0.76,
36818
+ draw: (c) => chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(Math.min(c.w, c.h) / 2) }) + chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(Math.min(c.w, c.h) / 6) })
36819
+ },
36820
+ podium: {
36821
+ w: 0.6,
36822
+ h: 0.5,
36823
+ draw: (c) => chunk3WNW5Y7P_cjs.polygon({
36824
+ class: "sx-fp-furn",
36825
+ points: `${c.px(c.w * 0.15)},0 ${c.px(c.w * 0.85)},0 ${c.px(c.w)},${c.px(c.h)} 0,${c.px(c.h)}`
36826
+ })
36827
+ },
36828
+ "row-chairs": {
36829
+ w: 2.2,
36830
+ h: 0.5,
36831
+ draw: (c) => {
36832
+ const n = Math.max(1, Math.floor(c.w / 0.55 + 1e-6));
36833
+ const parts = [];
36834
+ for (let i = 0; i < n; i++) {
36835
+ parts.push(chairAt(c.px, (i + 0.5) / n * c.w, c.h / 2, 0));
36836
+ }
36837
+ return parts.join("");
36838
+ }
36839
+ },
36840
+ // ── retail ──
36841
+ // Gondola run: a long fixture with a back-to-back spine and product bays.
36842
+ shelving: {
36843
+ w: 1.8,
36844
+ h: 0.6,
36845
+ draw: (c) => {
36846
+ const parts = [box(c)];
36847
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h / 2), x2: c.px(c.w), y2: c.px(c.h / 2) }));
36848
+ const n = Math.max(2, Math.round(c.w / 0.45));
36849
+ for (let i = 1; i < n; i++) {
36850
+ const x = c.px(c.w * i / n);
36851
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: x, y1: 0, x2: x, y2: c.px(c.h) }));
36852
+ }
36853
+ return parts.join("");
36854
+ }
36855
+ },
36856
+ // POS counter with a register block and a belt line.
36857
+ checkout: {
36858
+ w: 1.6,
36859
+ h: 0.7,
36860
+ draw: (c) => [
36861
+ box(c),
36862
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(c.w - 0.5), y: c.px(0.12), width: c.px(0.34), height: c.px(0.3), rx: c.px(0.04) }),
36863
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(0.12), y1: c.px(c.h * 0.6), x2: c.px(c.w - 0.62), y2: c.px(c.h * 0.6) })
36864
+ ].join("")
36865
+ },
36866
+ // Round garment rack: rail circle with radial hanger ticks.
36867
+ "clothing-rack": {
36868
+ w: 1,
36869
+ h: 1,
36870
+ draw: (c) => {
36871
+ const r6 = Math.min(c.w, c.h) / 2;
36872
+ const cx = c.w / 2;
36873
+ const cy = c.h / 2;
36874
+ const parts = [
36875
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-nofill", cx: c.px(cx), cy: c.px(cy), r: c.px(r6) }),
36876
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(cx), cy: c.px(cy), r: c.px(0.04) })
36877
+ ];
36878
+ for (const a of [0, 45, 90, 135, 180, 225, 270, 315]) {
36879
+ const rad = a * Math.PI / 180;
36880
+ parts.push(
36881
+ chunk3WNW5Y7P_cjs.line({
36882
+ class: "sx-fp-furn-line",
36883
+ x1: c.px(cx + (r6 - 0.09) * Math.cos(rad)),
36884
+ y1: c.px(cy + (r6 - 0.09) * Math.sin(rad)),
36885
+ x2: c.px(cx + r6 * Math.cos(rad)),
36886
+ y2: c.px(cy + r6 * Math.sin(rad))
36887
+ })
36888
+ );
36889
+ }
36890
+ return parts.join("");
36891
+ }
36892
+ },
36893
+ // Changing booth: bench at the back, a mirror strip, a dashed curtain at the opening.
36894
+ "fitting-room": {
36895
+ w: 1.1,
36896
+ h: 1.1,
36897
+ draw: (c) => [
36898
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-nofill", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h) }),
36899
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(0.12), y: c.px(0.12), width: c.px(c.w - 0.24), height: c.px(0.28), rx: c.px(0.04) }),
36900
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-dash", x1: 0, y1: c.px(c.h), x2: c.px(c.w), y2: c.px(c.h) }),
36901
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(c.w - 0.06), y: c.px(c.h * 0.5), width: c.px(0.04), height: c.px(c.h * 0.35) })
36902
+ ].join("")
36903
+ },
36904
+ // ── warehouse / industrial ──
36905
+ // Pallet racking: an open frame with bay dividers and cross-bracing.
36906
+ "pallet-rack": {
36907
+ w: 2.7,
36908
+ h: 1.1,
36909
+ draw: (c) => {
36910
+ const parts = [chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-nofill", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h) })];
36911
+ const bays = Math.max(2, Math.round(c.w / 1.35));
36912
+ for (let i = 0; i < bays; i++) {
36913
+ const x0 = c.w * i / bays;
36914
+ const x1 = c.w * (i + 1) / bays;
36915
+ if (i > 0) parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(x0), y1: 0, x2: c.px(x0), y2: c.px(c.h) }));
36916
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(x0), y1: 0, x2: c.px(x1), y2: c.px(c.h) }));
36917
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(x1), y1: 0, x2: c.px(x0), y2: c.px(c.h) }));
36918
+ }
36919
+ return parts.join("");
36920
+ }
36921
+ },
36922
+ // Dock door: roll-up door segments with two bumpers at the outer face.
36923
+ "loading-dock": {
36924
+ w: 3,
36925
+ h: 0.6,
36926
+ draw: (c) => {
36927
+ const parts = [box(c)];
36928
+ const n = Math.max(3, Math.round(c.w / 0.5));
36929
+ for (let i = 1; i < n; i++) {
36930
+ const x = c.px(c.w * i / n);
36931
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: x, y1: 0, x2: x, y2: c.px(c.h) }));
36932
+ }
36933
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(0.12), y: c.px(c.h - 0.12), width: c.px(0.3), height: c.px(0.1) }));
36934
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(c.w - 0.42), y: c.px(c.h - 0.12), width: c.px(0.3), height: c.px(0.1) }));
36935
+ return parts.join("");
36936
+ }
36937
+ },
36938
+ // Counterbalance forklift silhouette: body, mast forks at the front, operator seat.
36939
+ forklift: {
36940
+ w: 1.2,
36941
+ h: 2.2,
36942
+ draw: (c) => [
36943
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(0.15), y: c.px(0.42), width: c.px(c.w - 0.3), height: c.px(c.h - 0.72), rx: c.px(0.06) }),
36944
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(0.25), y: 0, width: c.px(0.12), height: c.px(0.42) }),
36945
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(c.w - 0.37), y: 0, width: c.px(0.12), height: c.px(0.42) }),
36946
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w / 2), cy: c.px(c.h - 0.62), r: c.px(0.18) })
36947
+ ].join("")
36948
+ },
36949
+ // ── salon / spa ──
36950
+ // Styling station: back counter with a mirror strip and a chair facing it.
36951
+ "salon-chair": {
36952
+ w: 0.8,
36953
+ h: 1.4,
36954
+ draw: (c) => [
36955
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: 0, y: 0, width: c.px(c.w), height: c.px(0.32), rx: c.px(0.03) }),
36956
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(0.08), y: c.px(0.05), width: c.px(c.w - 0.16), height: c.px(0.05) }),
36957
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(c.w / 2), cy: c.px(c.h * 0.64), r: c.px(Math.min(c.w, 0.62) / 2) }),
36958
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w / 2), cy: c.px(c.h * 0.64), r: c.px(0.08) })
36959
+ ].join("")
36960
+ },
36961
+ // Backwash unit: a reclining chair with a wash basin at the head end.
36962
+ "shampoo-bowl": {
36963
+ w: 0.9,
36964
+ h: 1.5,
36965
+ draw: (c) => [
36966
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(0.1), y: c.px(0.5), width: c.px(c.w - 0.2), height: c.px(c.h - 0.6), rx: c.px(0.08) }),
36967
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(c.w / 2), cy: c.px(0.4), r: c.px(0.32) }),
36968
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w / 2), cy: c.px(0.4), r: c.px(0.12) }),
36969
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(c.w / 2), cy: c.px(0.12), r: c.px(0.04) })
36970
+ ].join("")
36971
+ },
36972
+ // Manicure table: a small table with a client and a technician chair.
36973
+ "manicure-table": {
36974
+ w: 1,
36975
+ h: 0.5,
36976
+ envelope: [CHAIR_GAP + CHAIR_D, 0, CHAIR_GAP + CHAIR_D, 0],
36977
+ draw: (c) => [box(c), chairAt(c.px, c.w / 2, -CHAIR_GAP, 0), chairAt(c.px, c.w / 2, c.h + CHAIR_GAP, 180)].join("")
36978
+ },
36979
+ // ── gym / fitness ──
36980
+ // Treadmill: a deck with a running belt and a console at the front.
36981
+ treadmill: {
36982
+ w: 0.9,
36983
+ h: 2,
36984
+ draw: (c) => [
36985
+ box(c, "sx-fp-furn", 0.05),
36986
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(0.12), y: c.px(0.5), width: c.px(c.w - 0.24), height: c.px(c.h - 0.65), rx: c.px(0.04) }),
36987
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(0.1), y: c.px(0.08), width: c.px(c.w - 0.2), height: c.px(0.16), rx: c.px(0.03) })
36988
+ ].join("")
36989
+ },
36990
+ // Flat bench with upright posts and a loaded barbell crossing it.
36991
+ "weight-bench": {
36992
+ w: 0.6,
36993
+ h: 1.8,
36994
+ envelope: [0, 0.35, 0, 0.35],
36995
+ draw: (c) => [
36996
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(c.w / 2 - 0.12), y: c.px(0.3), width: c.px(0.24), height: c.px(c.h - 0.4), rx: c.px(0.05) }),
36997
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(0.06), y: c.px(0.18), width: c.px(0.1), height: c.px(0.1) }),
36998
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(c.w - 0.16), y: c.px(0.18), width: c.px(0.1), height: c.px(0.1) }),
36999
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(-0.3), y1: c.px(0.23), x2: c.px(c.w + 0.3), y2: c.px(0.23) })
37000
+ ].join("")
37001
+ },
37002
+ // Power rack: a square frame with four corner posts and a barbell.
37003
+ "power-rack": {
37004
+ w: 1.4,
37005
+ h: 1.4,
37006
+ envelope: [0, 0.3, 0, 0.3],
37007
+ draw: (c) => {
37008
+ const post = 0.14;
37009
+ const corners = [
37010
+ [0, 0],
37011
+ [c.w - post, 0],
37012
+ [0, c.h - post],
37013
+ [c.w - post, c.h - post]
37014
+ ];
37015
+ const parts = [chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-nofill", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h) })];
37016
+ for (const [px0, py0] of corners) {
37017
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(px0), y: c.px(py0), width: c.px(post), height: c.px(post) }));
37018
+ }
37019
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(-0.28), y1: c.px(c.h * 0.4), x2: c.px(c.w + 0.28), y2: c.px(c.h * 0.4) }));
37020
+ return parts.join("");
37021
+ }
37022
+ },
37023
+ // Exercise mat — an underlay surface, like a rug.
37024
+ "yoga-mat": {
37025
+ w: 0.6,
37026
+ h: 1.8,
37027
+ underlay: true,
37028
+ draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-dash", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h), rx: c.px(0.08) })
37029
+ },
37030
+ // ── site / outdoor ──
37031
+ // Tree in plan: a canopy disc with a foliage ring and a trunk dot.
37032
+ tree: {
37033
+ w: 2,
37034
+ h: 2,
37035
+ draw: (c) => {
37036
+ const r6 = Math.min(c.w, c.h) / 2;
37037
+ return [
37038
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(r6) }),
37039
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(r6 * 0.6) }),
37040
+ chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(c.w / 2), cy: c.px(c.h / 2), r: c.px(0.07) })
37041
+ ].join("");
37042
+ }
37043
+ },
37044
+ // Car in plan (parking-stall footprint): body, glazing lines, four wheels.
37045
+ car: {
37046
+ w: 1.8,
37047
+ h: 4.4,
37048
+ draw: (c) => {
37049
+ const parts = [chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn", x: c.px(0.12), y: c.px(0.1), width: c.px(c.w - 0.24), height: c.px(c.h - 0.2), rx: c.px(0.35) })];
37050
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(0.3), y1: c.px(c.h * 0.26), x2: c.px(c.w - 0.3), y2: c.px(c.h * 0.26) }));
37051
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: c.px(0.3), y1: c.px(c.h * 0.72), x2: c.px(c.w - 0.3), y2: c.px(c.h * 0.72) }));
37052
+ for (const wy of [c.h * 0.3, c.h * 0.7]) {
37053
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: 0, y: c.px(wy - 0.18), width: c.px(0.14), height: c.px(0.36), rx: c.px(0.03) }));
37054
+ parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px(c.w - 0.14), y: c.px(wy - 0.18), width: c.px(0.14), height: c.px(0.36), rx: c.px(0.03) }));
37055
+ }
37056
+ return parts.join("");
37057
+ }
37058
+ }
37059
+ };
37060
+ var FURNITURE_TYPES = Object.keys(FLOORPLAN_SYMBOLS);
37061
+
37062
+ // src/diagrams/floorplan/parser.ts
37063
+ var FloorplanParseError = class extends Error {
37064
+ line;
37065
+ constructor(message, line2) {
37066
+ super(`line ${line2}: ${message}`);
37067
+ this.name = "FloorplanParseError";
37068
+ this.line = line2;
37069
+ }
37070
+ };
37071
+ var isStr = (t) => t !== void 0 && "str" in t;
37072
+ var isWord = (t, w) => t !== void 0 && "word" in t && (w === void 0 || t.word === w);
37073
+ function normalizeQuotes3(line2) {
37074
+ return line2.replace(/[“”「」『』]/g, '"').replace(/[‘’]/g, "'");
37075
+ }
37076
+ function tokenize7(line2) {
37077
+ const out = [];
37078
+ const re = /"([^"]*)"|(\S+)/g;
37079
+ let m;
37080
+ while (m = re.exec(line2)) {
37081
+ if (m[1] !== void 0) out.push({ str: m[1] });
37082
+ else out.push({ word: m[2] });
37083
+ }
37084
+ return out;
37085
+ }
37086
+ function parseNum(t, what, ln) {
37087
+ if (!isWord(t)) throw new FloorplanParseError(`expected a number for ${what}`, ln);
37088
+ const v = Number(t.word);
37089
+ if (!Number.isFinite(v)) throw new FloorplanParseError(`expected a number for ${what}, got "${t.word}"`, ln);
37090
+ return v;
37091
+ }
37092
+ function parseCoord2(t, what, ln) {
37093
+ if (!isWord(t)) throw new FloorplanParseError(`expected "x,y" for ${what}`, ln);
37094
+ const m = /^(-?\d*\.?\d+),(-?\d*\.?\d+)$/.exec(t.word);
37095
+ if (!m) throw new FloorplanParseError(`expected "x,y" for ${what}, got "${t.word}"`, ln);
37096
+ return { x: Number(m[1]), y: Number(m[2]) };
37097
+ }
37098
+ function parseDims(t, what, ln) {
37099
+ if (!isWord(t)) throw new FloorplanParseError(`expected "WxH" for ${what}`, ln);
37100
+ const m = /^(\d*\.?\d+)x(\d*\.?\d+)$/i.exec(t.word);
37101
+ if (!m) throw new FloorplanParseError(`expected "WxH" for ${what}, got "${t.word}"`, ln);
37102
+ return { w: Number(m[1]), h: Number(m[2]) };
37103
+ }
37104
+ function parsePct(t, ln) {
37105
+ if (!isWord(t)) throw new FloorplanParseError(`expected a percentage for "at"`, ln);
37106
+ const v = Number(t.word.replace(/%$/, ""));
37107
+ if (!Number.isFinite(v)) throw new FloorplanParseError(`expected a percentage for "at", got "${t.word}"`, ln);
37108
+ return v;
37109
+ }
37110
+ function parseId(t, what, ln) {
37111
+ if (!isWord(t)) throw new FloorplanParseError(`expected ${what}`, ln);
37112
+ return t.word;
37113
+ }
37114
+ var SIDES = ["north", "south", "east", "west"];
37115
+ var REL_HOW = ["right-of", "left-of", "above", "below"];
37116
+ function parseFurnitureType(t, ln) {
37117
+ const word = isWord(t) ? t.word : "";
37118
+ if (!FURNITURE_TYPES.includes(word)) {
37119
+ throw new FloorplanParseError(
37120
+ `unknown furniture type "${word}". Valid types: ${FURNITURE_TYPES.join(", ")}`,
37121
+ ln
37122
+ );
37123
+ }
37124
+ return word;
37125
+ }
37126
+ function parseHeader3(tok, ast, ln) {
37127
+ while (tok.length) {
37128
+ const t = tok.shift();
37129
+ if (isStr(t)) ast.title = t.str;
37130
+ else if (t.word === "unit") {
37131
+ const u = parseId(tok.shift(), "unit (m|ft)", ln);
37132
+ if (u !== "m" && u !== "ft") throw new FloorplanParseError(`unit must be "m" or "ft", got "${u}"`, ln);
37133
+ ast.unit = u;
37134
+ } else throw new FloorplanParseError(`floorplan: unexpected token "${t.word}"`, ln);
37135
+ }
37136
+ }
37137
+ function parseRoom(tok, ast, ln) {
37138
+ const id = parseId(tok.shift(), "a room id", ln);
37139
+ if (ast.rooms.some((r6) => r6.id === id)) {
37140
+ throw new FloorplanParseError(`duplicate room id "${id}"`, ln);
37141
+ }
37142
+ const room = { id, label: id, w: 4, h: 3, line: ln };
37143
+ while (tok.length) {
37144
+ const t = tok.shift();
37145
+ if (isStr(t)) room.label = t.str;
37146
+ else if (t.word === "at") room.at = parseCoord2(tok.shift(), "at", ln);
37147
+ else if (REL_HOW.includes(t.word)) {
37148
+ room.rel = {
37149
+ how: t.word,
37150
+ ref: parseId(tok.shift(), `a room id after "${t.word}"`, ln),
37151
+ offset: void 0,
37152
+ align: void 0
37153
+ };
37154
+ } else if (t.word === "offset") {
37155
+ if (!room.rel) throw new FloorplanParseError(`"offset" requires a relative placement (right-of/left-of/above/below)`, ln);
37156
+ room.rel.offset = parseNum(tok.shift(), "offset", ln);
37157
+ } else if (t.word === "align") {
37158
+ if (!room.rel) throw new FloorplanParseError(`"align" requires a relative placement (right-of/left-of/above/below)`, ln);
37159
+ const a = parseId(tok.shift(), "align (start|center|end)", ln);
37160
+ if (a !== "start" && a !== "center" && a !== "end") {
37161
+ throw new FloorplanParseError(`align must be start|center|end, got "${a}"`, ln);
37162
+ }
37163
+ room.rel.align = a;
37164
+ } else if (t.word === "size") {
37165
+ const d = parseDims(tok.shift(), "size", ln);
37166
+ room.w = d.w;
37167
+ room.h = d.h;
37168
+ } else if (t.word === "fill") room.fill = parseId(tok.shift(), "a fill color", ln);
37169
+ else if (t.word === "nolabel") room.nolabel = true;
37170
+ else throw new FloorplanParseError(`room: unexpected token "${t.word}"`, ln);
37171
+ }
37172
+ ast.rooms.push(room);
37173
+ }
37174
+ function parseExtend(tok, ast, ln) {
37175
+ const room = parseId(tok.shift(), "a room id", ln);
37176
+ const ext = { room, w: 2, h: 2, line: ln };
37177
+ while (tok.length) {
37178
+ const t = tok.shift();
37179
+ if (!isWord(t)) throw new FloorplanParseError(`extend: unexpected string "${t.str}"`, ln);
37180
+ else if (t.word === "at") ext.at = parseCoord2(tok.shift(), "at", ln);
37181
+ else if (REL_HOW.includes(t.word)) {
37182
+ ext.rel = {
37183
+ how: t.word,
37184
+ ref: parseId(tok.shift(), `a room id after "${t.word}"`, ln),
37185
+ offset: void 0,
37186
+ align: void 0
37187
+ };
37188
+ } else if (t.word === "offset") {
37189
+ if (!ext.rel) throw new FloorplanParseError(`"offset" requires a relative placement (right-of/left-of/above/below)`, ln);
37190
+ ext.rel.offset = parseNum(tok.shift(), "offset", ln);
37191
+ } else if (t.word === "align") {
37192
+ if (!ext.rel) throw new FloorplanParseError(`"align" requires a relative placement (right-of/left-of/above/below)`, ln);
37193
+ const a = parseId(tok.shift(), "align (start|center|end)", ln);
37194
+ if (a !== "start" && a !== "center" && a !== "end") {
37195
+ throw new FloorplanParseError(`align must be start|center|end, got "${a}"`, ln);
37196
+ }
37197
+ ext.rel.align = a;
37198
+ } else if (t.word === "size") {
37199
+ const d = parseDims(tok.shift(), "size", ln);
37200
+ ext.w = d.w;
37201
+ ext.h = d.h;
37202
+ } else throw new FloorplanParseError(`extend: unexpected token "${t.word}"`, ln);
37203
+ }
37204
+ ast.extensions.push(ext);
37205
+ }
37206
+ var DOOR_TYPES = ["single", "double", "sliding", "pocket", "bifold"];
37207
+ var WINDOW_TYPES = ["fixed", "sliding", "casement", "bay"];
37208
+ function parseOpening(kind, tok, ast, ln) {
37209
+ const op = {
37210
+ kind,
37211
+ pct: 50,
37212
+ width: 0,
37213
+ // resolved after the form is known
37214
+ hinge: "left",
37215
+ swing: "in",
37216
+ doorType: "single",
37217
+ windowType: "fixed",
37218
+ line: ln
37219
+ };
37220
+ const t0 = tok.shift();
37221
+ if (isWord(t0, "between")) {
37222
+ op.between = [parseId(tok.shift(), "a room id", ln), parseId(tok.shift(), "a second room id", ln)];
37223
+ } else {
37224
+ op.room = parseId(t0, `a room id or "between"`, ln);
37225
+ const side = parseId(tok.shift(), "a wall side", ln);
37226
+ if (!SIDES.includes(side)) {
37227
+ throw new FloorplanParseError(`expected a wall side north|south|east|west, got "${side}"`, ln);
37228
+ }
37229
+ op.side = side;
37230
+ }
37231
+ while (tok.length) {
37232
+ const t = tok.shift();
37233
+ if (!isWord(t)) throw new FloorplanParseError(`${kind}: unexpected string "${t.str}"`, ln);
37234
+ else if (t.word === "at") op.pct = parsePct(tok.shift(), ln);
37235
+ else if (t.word === "width") op.width = parseNum(tok.shift(), "width", ln);
37236
+ else if (t.word === "hinge") {
37237
+ const h = parseId(tok.shift(), "hinge (left|right)", ln);
37238
+ if (h !== "left" && h !== "right") throw new FloorplanParseError(`hinge must be left|right, got "${h}"`, ln);
37239
+ op.hinge = h;
37240
+ } else if (t.word === "swing") {
37241
+ const s = parseId(tok.shift(), "swing (in|out)", ln);
37242
+ if (s !== "in" && s !== "out") throw new FloorplanParseError(`swing must be in|out, got "${s}"`, ln);
37243
+ op.swing = s;
37244
+ } else if (t.word === "type") {
37245
+ const d = parseId(tok.shift(), `${kind} type`, ln);
37246
+ if (kind === "window") {
37247
+ if (!WINDOW_TYPES.includes(d)) {
37248
+ throw new FloorplanParseError(`window type must be ${WINDOW_TYPES.join("|")}, got "${d}"`, ln);
37249
+ }
37250
+ op.windowType = d;
37251
+ } else {
37252
+ if (!DOOR_TYPES.includes(d)) {
37253
+ throw new FloorplanParseError(`door type must be ${DOOR_TYPES.join("|")}, got "${d}"`, ln);
37254
+ }
37255
+ op.doorType = d;
37256
+ }
37257
+ } else throw new FloorplanParseError(`${kind}: unexpected token "${t.word}"`, ln);
37258
+ }
37259
+ if (op.width === 0) {
37260
+ op.width = kind === "window" ? 1.2 : kind === "opening" ? 1 : op.between ? 0.8 : 0.9;
37261
+ }
37262
+ ast.openings.push(op);
37263
+ }
37264
+ function parseFurniture(tok, ast, ln) {
37265
+ const type = parseFurnitureType(tok.shift(), ln);
37266
+ const f = { type, x: 0, y: 0, rotate: 0, line: ln };
37267
+ while (tok.length) {
37268
+ const t = tok.shift();
37269
+ if (isStr(t)) f.label = t.str;
37270
+ else if (t.word === "in") f.room = parseId(tok.shift(), `a room id after "in"`, ln);
37271
+ else if (t.word === "at") {
37272
+ const c = parseCoord2(tok.shift(), "at", ln);
37273
+ f.x = c.x;
37274
+ f.y = c.y;
37275
+ } else if (t.word === "size") f.size = parseDims(tok.shift(), "size", ln);
37276
+ else if (t.word === "rotate") f.rotate = parseNum(tok.shift(), "rotate", ln);
37277
+ else throw new FloorplanParseError(`furniture: unexpected token "${t.word}"`, ln);
37278
+ }
37279
+ ast.furniture.push(f);
37280
+ }
37281
+ function parseArray(mode, tok, ast, ln) {
37282
+ const type = parseFurnitureType(tok.shift(), ln);
37283
+ const a = {
37284
+ mode,
37285
+ type,
37286
+ rows: 1,
37287
+ cols: 1,
37288
+ count: Infinity,
37289
+ rotate: 0,
37290
+ line: ln
37291
+ };
37292
+ while (tok.length) {
37293
+ const t = tok.shift();
37294
+ if (!isWord(t)) throw new FloorplanParseError(`${mode}: unexpected string "${t.str}"`, ln);
37295
+ else if (t.word === "in") a.room = parseId(tok.shift(), `a room id after "in"`, ln);
37296
+ else if (t.word === "rows") a.rows = parseNum(tok.shift(), "rows", ln);
37297
+ else if (t.word === "cols") a.cols = parseNum(tok.shift(), "cols", ln);
37298
+ else if (t.word === "count") a.count = parseNum(tok.shift(), "count", ln);
37299
+ else if (t.word === "area") {
37300
+ a.p1 = parseCoord2(tok.shift(), "area p1", ln);
37301
+ a.p2 = parseCoord2(tok.shift(), "area p2", ln);
37302
+ } else if (t.word === "itemsize") a.itemsize = parseDims(tok.shift(), "itemsize", ln);
37303
+ else if (t.word === "rotate") a.rotate = parseNum(tok.shift(), "rotate", ln);
37304
+ else if (t.word === "center") a.center = parseCoord2(tok.shift(), "center", ln);
37305
+ else if (t.word === "radius") a.radius = parseNum(tok.shift(), "radius", ln);
37306
+ else if (t.word === "from") a.fromDeg = parseNum(tok.shift(), "from", ln);
37307
+ else if (t.word === "to") a.toDeg = parseNum(tok.shift(), "to", ln);
37308
+ else throw new FloorplanParseError(`${mode}: unexpected token "${t.word}"`, ln);
37309
+ }
37310
+ ast.arrays.push(a);
37311
+ }
37312
+ function parseFloorplan(text2) {
37313
+ const ast = {
37314
+ type: "floorplan",
37315
+ title: "Floor Plan",
37316
+ unit: "m",
37317
+ rooms: [],
37318
+ extensions: [],
37319
+ openings: [],
37320
+ furniture: [],
37321
+ arrays: []
37322
+ };
37323
+ let sawHeader = false;
37324
+ const lines = text2.split(/\r?\n/);
37325
+ for (let i = 0; i < lines.length; i++) {
37326
+ const ln = i + 1;
37327
+ const raw = normalizeQuotes3(lines[i]).trim();
37328
+ if (!raw) continue;
37329
+ const all = tokenize7(raw);
37330
+ const tok = [];
37331
+ for (let k = 0; k < all.length; k++) {
37332
+ const t = all[k];
37333
+ if (isWord(t) && (t.word.startsWith("#") || t.word.startsWith("//"))) {
37334
+ const prev = all[k - 1];
37335
+ if (t.word.startsWith("#") && isWord(prev, "fill")) {
37336
+ tok.push(t);
37337
+ continue;
37338
+ }
37339
+ break;
37340
+ }
37341
+ tok.push(t);
37342
+ }
37343
+ if (tok.length === 0) continue;
37344
+ const head = tok.shift();
37345
+ if (!isWord(head)) throw new FloorplanParseError(`unexpected string at line start`, ln);
37346
+ const kw = head.word.toLowerCase();
37347
+ if (kw === "floorplan") {
37348
+ parseHeader3(tok, ast, ln);
37349
+ sawHeader = true;
37350
+ } else if (!sawHeader) {
37351
+ throw new FloorplanParseError(`the first statement must be the "floorplan" header`, ln);
37352
+ } else if (kw === "room") parseRoom(tok, ast, ln);
37353
+ else if (kw === "north") {
37354
+ ast.north = tok.length ? parseNum(tok.shift(), "north rotation (degrees)", ln) : 0;
37355
+ if (tok.length) throw new FloorplanParseError(`north: unexpected trailing tokens`, ln);
37356
+ } else if (kw === "extend") parseExtend(tok, ast, ln);
37357
+ else if (kw === "door" || kw === "window" || kw === "opening") parseOpening(kw, tok, ast, ln);
37358
+ else if (kw === "furniture") parseFurniture(tok, ast, ln);
37359
+ else if (kw === "grid" || kw === "row" || kw === "arc") parseArray(kw, tok, ast, ln);
37360
+ else {
37361
+ throw new FloorplanParseError(
37362
+ `unknown keyword "${kw}". Expected: floorplan, room, extend, door, window, opening, furniture, grid, row, arc`,
37363
+ ln
37364
+ );
37365
+ }
37366
+ }
37367
+ return ast;
37368
+ }
37369
+
37370
+ // src/diagrams/floorplan/layout.ts
37371
+ var FT = 0.3048;
37372
+ var FLOORPLAN_CONST = {
37373
+ /** Wall band thickness, meters (§5). */
37374
+ wallT: 0.2,
37375
+ /** Default render scale, px per meter (§4.1). */
37376
+ scale: 55,
37377
+ /** Jamb margin an opening keeps from the segment ends, meters (§4.3). */
37378
+ jamb: 0.05,
37379
+ /** Dimension band depth outside the plan, meters. */
37380
+ dimBand: 1,
37381
+ /** Outer padding, meters. */
37382
+ pad: 0.45,
37383
+ /** Offsets of the major / minor dimension rows from the plan edge, meters. */
37384
+ dimMajorOff: 0.62,
37385
+ dimMinorOff: 0.3
37386
+ };
37387
+ function formatLength(m, unit) {
37388
+ if (unit === "m") {
37389
+ const v = Math.round(m * 100) / 100;
37390
+ return `${v} m`;
37391
+ }
37392
+ const ftv = m / FT;
37393
+ let f = Math.floor(ftv + 1e-6);
37394
+ let inches = Math.round((ftv - f) * 12);
37395
+ if (inches >= 12) {
37396
+ f += 1;
37397
+ inches = 0;
37398
+ }
37399
+ return inches ? `${f}'${inches}"` : `${f}'`;
37400
+ }
37401
+ function formatArea(areaM2, unit) {
37402
+ if (unit === "m") return `${areaM2.toFixed(1)} m\xB2`;
37403
+ return `${Math.round(areaM2 / (FT * FT))} sq ft`;
37404
+ }
37405
+ var fmtNum = (v) => String(Math.round(v * 100) / 100);
37406
+ var snap = (v) => Math.round(v * 1e6) / 1e6;
37407
+ var ADJ_EPS = 0.051;
37408
+ var MIN_OVERLAP = 0.3;
37409
+ function rectSharedEdge(a, b) {
37410
+ if (Math.abs(a.x + a.w - b.x) < ADJ_EPS || Math.abs(b.x + b.w - a.x) < ADJ_EPS) {
37411
+ const along = Math.abs(a.x + a.w - b.x) < ADJ_EPS ? a.x + a.w : b.x + b.w;
37412
+ const lo = Math.max(a.y, b.y);
37413
+ const hi = Math.min(a.y + a.h, b.y + b.h);
37414
+ if (hi - lo >= MIN_OVERLAP) return { vertical: true, along, lo, hi };
37415
+ }
37416
+ if (Math.abs(a.y + a.h - b.y) < ADJ_EPS || Math.abs(b.y + b.h - a.y) < ADJ_EPS) {
37417
+ const along = Math.abs(a.y + a.h - b.y) < ADJ_EPS ? a.y + a.h : b.y + b.h;
37418
+ const lo = Math.max(a.x, b.x);
37419
+ const hi = Math.min(a.x + a.w, b.x + b.w);
37420
+ if (hi - lo >= MIN_OVERLAP) return { vertical: false, along, lo, hi };
37421
+ }
37422
+ return null;
37423
+ }
37424
+ function roomSharedEdge(a, b) {
37425
+ let best = null;
37426
+ for (const pa of a.parts) {
37427
+ for (const pb of b.parts) {
37428
+ const e = rectSharedEdge(pa, pb);
37429
+ if (e && (!best || e.hi - e.lo > best.edge.hi - best.edge.lo)) {
37430
+ best = { edge: e, aPart: pa, bPart: pb };
37431
+ }
37432
+ }
37433
+ }
37434
+ return best;
37435
+ }
37436
+ function rectOverlap(a, b) {
37437
+ return {
37438
+ ox: Math.min(a.x + a.w, b.x + b.w) - Math.max(a.x, b.x),
37439
+ oy: Math.min(a.y + a.h, b.y + b.h) - Math.max(a.y, b.y)
37440
+ };
37441
+ }
37442
+ function obbCorners(x, y, w, h, rotDeg, margins) {
37443
+ const [mt, mr, mb, ml] = margins;
37444
+ const cx = x + w / 2;
37445
+ const cy = y + h / 2;
37446
+ const corners = [
37447
+ [x - ml, y - mt],
37448
+ [x + w + mr, y - mt],
37449
+ [x + w + mr, y + h + mb],
37450
+ [x - ml, y + h + mb]
37451
+ ];
37452
+ if (!rotDeg) return corners;
37453
+ const rad = rotDeg * Math.PI / 180;
37454
+ const cos = Math.cos(rad);
37455
+ const sin = Math.sin(rad);
37456
+ return corners.map(([px, py]) => {
37457
+ const dx = px - cx;
37458
+ const dy = py - cy;
37459
+ return [cx + dx * cos - dy * sin, cy + dx * sin + dy * cos];
37460
+ });
37461
+ }
37462
+ function rotatedAabb(x, y, w, h, rotDeg, margins) {
37463
+ const corners = obbCorners(x, y, w, h, rotDeg, margins);
37464
+ let minX = Infinity;
37465
+ let minY = Infinity;
37466
+ let maxX = -Infinity;
37467
+ let maxY = -Infinity;
37468
+ for (const [px, py] of corners) {
37469
+ minX = Math.min(minX, px);
37470
+ minY = Math.min(minY, py);
37471
+ maxX = Math.max(maxX, px);
37472
+ maxY = Math.max(maxY, py);
37473
+ }
37474
+ return { minX, minY, maxX, maxY };
37475
+ }
37476
+ function obbPenetration(a, b) {
37477
+ let minPen = Infinity;
37478
+ for (const poly of [a, b]) {
37479
+ for (let i = 0; i < 4; i++) {
37480
+ const j = (i + 1) % 4;
37481
+ let ax = poly[j][1] - poly[i][1];
37482
+ let ay = poly[i][0] - poly[j][0];
37483
+ const len = Math.hypot(ax, ay);
37484
+ if (len < 1e-12) continue;
37485
+ ax /= len;
37486
+ ay /= len;
37487
+ let aLo = Infinity;
37488
+ let aHi = -Infinity;
37489
+ for (const [px, py] of a) {
37490
+ const v = px * ax + py * ay;
37491
+ aLo = Math.min(aLo, v);
37492
+ aHi = Math.max(aHi, v);
37493
+ }
37494
+ let bLo = Infinity;
37495
+ let bHi = -Infinity;
37496
+ for (const [px, py] of b) {
37497
+ const v = px * ax + py * ay;
37498
+ bLo = Math.min(bLo, v);
37499
+ bHi = Math.max(bHi, v);
37500
+ }
37501
+ const pen = Math.min(aHi, bHi) - Math.max(aLo, bLo);
37502
+ if (pen <= 0) return 0;
37503
+ minPen = Math.min(minPen, pen);
37504
+ }
37505
+ }
37506
+ return minPen === Infinity ? 0 : minPen;
37507
+ }
37508
+ function resolvePlacement(p, w, h, byId, rooms, u, who, errors) {
37509
+ if (p.at) return { x: snap(p.at.x * u), y: snap(p.at.y * u) };
37510
+ if (p.rel) {
37511
+ const refIdx = byId.get(p.rel.ref);
37512
+ if (refIdx === void 0) {
37513
+ errors.push(`${who}: unknown reference room "${p.rel.ref}" \u2014 declare it first`);
37514
+ return null;
37515
+ }
37516
+ const ref = rooms[refIdx];
37517
+ const off = (p.rel.offset ?? 0) * u;
37518
+ const alignPos = (refStart, refLen, len) => {
37519
+ if (p.rel.align === "center") return refStart + (refLen - len) / 2 + off;
37520
+ if (p.rel.align === "end") return refStart + refLen - len + off;
37521
+ return refStart + off;
37522
+ };
37523
+ let x = 0;
37524
+ let y = 0;
37525
+ switch (p.rel.how) {
37526
+ case "right-of":
37527
+ x = ref.x + ref.w;
37528
+ y = alignPos(ref.y, ref.h, h);
37529
+ break;
37530
+ case "left-of":
37531
+ x = ref.x - w;
37532
+ y = alignPos(ref.y, ref.h, h);
37533
+ break;
37534
+ case "below":
37535
+ y = ref.y + ref.h;
37536
+ x = alignPos(ref.x, ref.w, w);
37537
+ break;
37538
+ case "above":
37539
+ y = ref.y - h;
37540
+ x = alignPos(ref.x, ref.w, w);
37541
+ break;
37542
+ }
37543
+ return { x: snap(x), y: snap(y) };
37544
+ }
37545
+ return { x: 0, y: 0 };
37546
+ }
37547
+ function refreshRoomBounds(room, unit) {
37548
+ let minX = Infinity;
37549
+ let minY = Infinity;
37550
+ let maxX = -Infinity;
37551
+ let maxY = -Infinity;
37552
+ let area = 0;
37553
+ for (const p of room.parts) {
37554
+ minX = Math.min(minX, p.x);
37555
+ minY = Math.min(minY, p.y);
37556
+ maxX = Math.max(maxX, p.x + p.w);
37557
+ maxY = Math.max(maxY, p.y + p.h);
37558
+ area += p.w * p.h;
37559
+ }
37560
+ room.x = snap(minX);
37561
+ room.y = snap(minY);
37562
+ room.w = snap(maxX - minX);
37563
+ room.h = snap(maxY - minY);
37564
+ room.areaM2 = area;
37565
+ room.areaText = formatArea(area, unit);
37566
+ }
37567
+ function subtractIntervals(lo, hi, cuts) {
37568
+ let pieces = [[lo, hi]];
37569
+ for (const [cLo, cHi] of cuts) {
37570
+ const next = [];
37571
+ for (const [pLo, pHi] of pieces) {
37572
+ if (cHi <= pLo + 1e-9 || cLo >= pHi - 1e-9) {
37573
+ next.push([pLo, pHi]);
37574
+ continue;
37575
+ }
37576
+ if (cLo > pLo + 1e-9) next.push([pLo, Math.min(cLo, pHi)]);
37577
+ if (cHi < pHi - 1e-9) next.push([Math.max(cHi, pLo), pHi]);
37578
+ }
37579
+ pieces = next;
37580
+ }
37581
+ return pieces.filter(([a, b]) => b - a > 1e-9);
37582
+ }
37583
+ function sideSegments(room, side) {
37584
+ const segs = [];
37585
+ for (const p of room.parts) {
37586
+ const vertical = side === "west" || side === "east";
37587
+ const along = side === "north" ? p.y : side === "south" ? p.y + p.h : side === "west" ? p.x : p.x + p.w;
37588
+ const lo = vertical ? p.y : p.x;
37589
+ const hi = vertical ? p.y + p.h : p.x + p.w;
37590
+ const cuts = [];
37591
+ for (const q of room.parts) {
37592
+ if (q === p) continue;
37593
+ const qNear = side === "north" ? q.y + q.h : side === "south" ? q.y : side === "west" ? q.x + q.w : q.x;
37594
+ if (Math.abs(qNear - along) >= ADJ_EPS) continue;
37595
+ const cLo = vertical ? Math.max(lo, q.y) : Math.max(lo, q.x);
37596
+ const cHi = vertical ? Math.min(hi, q.y + q.h) : Math.min(hi, q.x + q.w);
37597
+ if (cHi > cLo) cuts.push([cLo, cHi]);
37598
+ }
37599
+ for (const [sLo, sHi] of subtractIntervals(lo, hi, cuts)) {
37600
+ if (sHi - sLo >= MIN_OVERLAP) segs.push({ along, lo: sLo, hi: sHi });
37601
+ }
37602
+ }
37603
+ return segs.sort((a, b) => a.lo - b.lo || a.along - b.along);
37604
+ }
37605
+ function layoutFloorplan(ast) {
37606
+ const u = ast.unit === "ft" ? FT : 1;
37607
+ const errors = [];
37608
+ const warnings = [];
37609
+ const rooms = [];
37610
+ const byId = /* @__PURE__ */ new Map();
37611
+ const stmts = [
37612
+ ...ast.rooms.map((room) => ({ line: room.line ?? 0, room })),
37613
+ ...ast.extensions.map((ext) => ({ line: ext.line ?? 0, ext }))
37614
+ ].sort((a, b) => a.line - b.line);
37615
+ for (const stmt of stmts) {
37616
+ if (stmt.room) {
37617
+ const r6 = stmt.room;
37618
+ const w = r6.w * u;
37619
+ const h = r6.h * u;
37620
+ const pos = resolvePlacement(r6, w, h, byId, rooms, u, `room "${r6.id}"`, errors) ?? { x: 0, y: 0 };
37621
+ const part = { x: pos.x, y: pos.y, w, h };
37622
+ const room = {
37623
+ id: r6.id,
37624
+ label: r6.label,
37625
+ x: part.x,
37626
+ y: part.y,
37627
+ w,
37628
+ h,
37629
+ parts: [part],
37630
+ areaM2: 0,
37631
+ areaText: "",
37632
+ fill: r6.fill,
37633
+ nolabel: r6.nolabel ?? false
37634
+ };
37635
+ refreshRoomBounds(room, ast.unit);
37636
+ byId.set(r6.id, rooms.length);
37637
+ rooms.push(room);
37638
+ } else if (stmt.ext) {
37639
+ const e = stmt.ext;
37640
+ const idx = byId.get(e.room);
37641
+ if (idx === void 0) {
37642
+ errors.push(`extend: unknown room "${e.room}" \u2014 declare it first`);
37643
+ continue;
37644
+ }
37645
+ const room = rooms[idx];
37646
+ const w = e.w * u;
37647
+ const h = e.h * u;
37648
+ const pos = resolvePlacement(e, w, h, byId, rooms, u, `extend "${e.room}"`, errors);
37649
+ if (!pos) continue;
37650
+ const part = { x: pos.x, y: pos.y, w, h };
37651
+ let touches = false;
37652
+ let overlaps = false;
37653
+ for (const p of room.parts) {
37654
+ const { ox, oy } = rectOverlap(p, part);
37655
+ if (ox > ADJ_EPS && oy > ADJ_EPS) overlaps = true;
37656
+ if (rectSharedEdge(p, part)) touches = true;
37657
+ }
37658
+ if (overlaps) {
37659
+ errors.push(`extend "${e.room}": extension overlaps the room's existing area \u2014 place it edge-to-edge`);
37660
+ continue;
37661
+ }
37662
+ if (!touches) {
37663
+ errors.push(`extend "${e.room}": extension does not touch the room \u2014 extensions must share an edge`);
37664
+ continue;
37665
+ }
37666
+ room.parts.push(part);
37667
+ refreshRoomBounds(room, ast.unit);
37668
+ }
37669
+ }
37670
+ for (let i = 0; i < rooms.length; i++) {
37671
+ for (let j = i + 1; j < rooms.length; j++) {
37672
+ const a = rooms[i];
37673
+ const b = rooms[j];
37674
+ let worst = null;
37675
+ for (const pa of a.parts) {
37676
+ for (const pb of b.parts) {
37677
+ const { ox, oy } = rectOverlap(pa, pb);
37678
+ if (ox > ADJ_EPS && oy > ADJ_EPS && (!worst || ox * oy > worst.ox * worst.oy)) {
37679
+ worst = { ox, oy };
37680
+ }
37681
+ }
37682
+ }
37683
+ if (worst) {
37684
+ errors.push(
37685
+ `rooms "${a.id}" and "${b.id}" overlap by ${worst.ox.toFixed(2)}\xD7${worst.oy.toFixed(2)} m \u2014 move "${b.id}" right-of "${a.id}" or shrink size`
37686
+ );
37687
+ }
37688
+ }
37689
+ }
37690
+ const seams = [];
37691
+ for (let ri = 0; ri < rooms.length; ri++) {
37692
+ const parts = rooms[ri].parts;
37693
+ for (let i = 0; i < parts.length; i++) {
37694
+ for (let j = i + 1; j < parts.length; j++) {
37695
+ const e = rectSharedEdge(parts[i], parts[j]);
37696
+ if (e) seams.push({ vertical: e.vertical, along: e.along, lo: e.lo, hi: e.hi, room: ri });
37697
+ }
37698
+ }
37699
+ }
37700
+ const openings = [];
37701
+ for (const op of ast.openings) {
37702
+ const geom = resolveOpening(op, rooms, byId, u, ast.unit, errors, warnings);
37703
+ if (geom) openings.push(geom);
37704
+ }
37705
+ const items = [];
37706
+ const seqByType = /* @__PURE__ */ new Map();
37707
+ const place = (type, roomIdx, localX, localY, w, h, rotate, label) => {
37708
+ const room = rooms[roomIdx];
37709
+ const seq = (seqByType.get(type) ?? 0) + 1;
37710
+ seqByType.set(type, seq);
37711
+ items.push({ type, x: room.x + localX, y: room.y + localY, w, h, rotate, label, roomId: room.id, seq });
37712
+ };
37713
+ const roomIdxOf = (stmt, roomId, line2) => {
37714
+ if (!roomId) {
37715
+ errors.push(`${stmt}${line2 ? ` (line ${line2})` : ""}: missing "in <room>"`);
37716
+ return void 0;
37717
+ }
37718
+ const idx = byId.get(roomId);
37719
+ if (idx === void 0) {
37720
+ errors.push(`${stmt}: unknown room "${roomId}"`);
37721
+ return void 0;
37722
+ }
37723
+ return idx;
37724
+ };
37725
+ for (const f of ast.furniture) {
37726
+ const def = FLOORPLAN_SYMBOLS[f.type];
37727
+ const idx = roomIdxOf(`furniture ${f.type}`, f.room, f.line);
37728
+ if (idx === void 0) continue;
37729
+ const w = f.size ? f.size.w * u : def.w;
37730
+ const h = f.size ? f.size.h * u : def.h;
37731
+ place(f.type, idx, f.x * u, f.y * u, w, h, f.rotate, f.label);
37732
+ }
37733
+ for (const a of ast.arrays) {
37734
+ const def = FLOORPLAN_SYMBOLS[a.type];
37735
+ const idx = roomIdxOf(`${a.mode} ${a.type}`, a.room, a.line);
37736
+ if (idx === void 0) continue;
37737
+ const room = rooms[idx];
37738
+ const iw = a.itemsize ? a.itemsize.w * u : def.w;
37739
+ const ih = a.itemsize ? a.itemsize.h * u : def.h;
37740
+ const p1 = a.p1 ? { x: a.p1.x * u, y: a.p1.y * u } : { x: 0.5 * u, y: 0.5 * u };
37741
+ const p2 = a.p2 ? { x: a.p2.x * u, y: a.p2.y * u } : { x: room.w - 0.5 * u, y: room.h - 0.5 * u };
37742
+ if (a.mode === "grid" || a.mode === "row") {
37743
+ const nRows = a.mode === "row" ? 1 : Math.max(1, Math.round(a.rows));
37744
+ const nCols = Math.max(1, Math.round(a.cols));
37745
+ const cap2 = Number.isFinite(a.count) ? a.count : nRows * nCols;
37746
+ const spanW = p2.x - p1.x;
37747
+ const spanH = p2.y - p1.y;
37748
+ let placed = 0;
37749
+ for (let r6 = 0; r6 < nRows && placed < cap2; r6++) {
37750
+ for (let col = 0; col < nCols && placed < cap2; col++) {
37751
+ const cx = p1.x + (nCols === 1 ? spanW / 2 : col * spanW / (nCols - 1));
37752
+ const cy = p1.y + (nRows === 1 ? spanH / 2 : r6 * spanH / (nRows - 1));
37753
+ place(a.type, idx, cx - iw / 2, cy - ih / 2, iw, ih, a.rotate);
37754
+ placed++;
37755
+ }
37756
+ }
37757
+ } else {
37758
+ const n = Math.max(1, Number.isFinite(a.count) ? a.count : Math.max(1, Math.round(a.cols)));
37759
+ const cen = a.center ? { x: a.center.x * u, y: a.center.y * u } : { x: room.w / 2, y: room.h * 0.6 };
37760
+ const radius = a.radius !== void 0 ? a.radius * u : Math.min(room.w, room.h) / 3;
37761
+ const a0 = (a.fromDeg ?? 200) * Math.PI / 180;
37762
+ const a1 = (a.toDeg ?? 340) * Math.PI / 180;
37763
+ for (let i = 0; i < n; i++) {
37764
+ const th = a0 + (a1 - a0) * i / Math.max(n - 1, 1);
37765
+ const cx = cen.x + radius * Math.cos(th);
37766
+ const cy = cen.y + radius * Math.sin(th);
37767
+ const facing = th * 180 / Math.PI + 270;
37768
+ place(a.type, idx, cx - iw / 2, cy - ih / 2, iw, ih, facing + a.rotate);
37769
+ }
37770
+ }
37771
+ }
37772
+ const roomOf = /* @__PURE__ */ new Map();
37773
+ for (const r6 of rooms) roomOf.set(r6.id, r6);
37774
+ const warnItems = /* @__PURE__ */ new Set();
37775
+ for (const it of items) {
37776
+ const room = roomOf.get(it.roomId);
37777
+ if (!room) continue;
37778
+ const bb = rotatedAabb(it.x, it.y, it.w, it.h, it.rotate, [0, 0, 0, 0]);
37779
+ const over = Math.max(
37780
+ room.x - bb.minX,
37781
+ bb.maxX - (room.x + room.w),
37782
+ room.y - bb.minY,
37783
+ bb.maxY - (room.y + room.h)
37784
+ );
37785
+ if (over > 0.011) {
37786
+ errors.push(
37787
+ `furniture ${it.type} #${it.seq} extends ${fmtNum(over)} m outside room "${it.roomId}" \u2014 move it or shrink size`
37788
+ );
37789
+ continue;
37790
+ }
37791
+ if (room.parts.length > 1) {
37792
+ const bw = bb.maxX - bb.minX;
37793
+ const bh = bb.maxY - bb.minY;
37794
+ let covered = 0;
37795
+ for (const p of room.parts) {
37796
+ const ox = Math.min(p.x + p.w, bb.maxX) - Math.max(p.x, bb.minX);
37797
+ const oy = Math.min(p.y + p.h, bb.maxY) - Math.max(p.y, bb.minY);
37798
+ if (ox > 0 && oy > 0) covered += ox * oy;
37799
+ }
37800
+ const uncovered = bw * bh - covered;
37801
+ if (uncovered > 0.01) {
37802
+ errors.push(
37803
+ `furniture ${it.type} #${it.seq} sits outside room "${it.roomId}"'s L-shape (${fmtNum(uncovered)} m\xB2 past the notch) \u2014 move it onto a room part`
37804
+ );
37805
+ }
37806
+ }
37807
+ }
37808
+ const envelopes = items.map((it) => {
37809
+ const def = FLOORPLAN_SYMBOLS[it.type];
37810
+ return obbCorners(it.x, it.y, it.w, it.h, it.rotate, def.envelope ?? [0, 0, 0, 0]);
37811
+ });
37812
+ for (let i = 0; i < items.length; i++) {
37813
+ const a = items[i];
37814
+ if (FLOORPLAN_SYMBOLS[a.type].underlay) continue;
37815
+ for (let j = i + 1; j < items.length; j++) {
37816
+ const b = items[j];
37817
+ if (FLOORPLAN_SYMBOLS[b.type].underlay) continue;
37818
+ const pen = obbPenetration(envelopes[i], envelopes[j]);
37819
+ if (pen > 0.011) {
37820
+ warnings.push(
37821
+ `${a.type} #${a.seq} overlaps ${b.type} #${b.seq} by ${fmtNum(pen)} m \u2014 increase spacing or reduce cols`
37822
+ );
37823
+ warnItems.add(i);
37824
+ warnItems.add(j);
37825
+ }
37826
+ }
37827
+ }
37828
+ let minX = Infinity;
37829
+ let minY = Infinity;
37830
+ let maxX = -Infinity;
37831
+ let maxY = -Infinity;
37832
+ for (const r6 of rooms) {
37833
+ minX = Math.min(minX, r6.x);
37834
+ minY = Math.min(minY, r6.y);
37835
+ maxX = Math.max(maxX, r6.x + r6.w);
37836
+ maxY = Math.max(maxY, r6.y + r6.h);
37837
+ }
37838
+ if (rooms.length === 0) {
37839
+ minX = minY = 0;
37840
+ maxX = maxY = 1;
37841
+ errors.push('no rooms defined \u2014 declare at least one: room id "Label" at 0,0 size 4x3');
37842
+ }
37843
+ const dims = [];
37844
+ if (rooms.length > 0) {
37845
+ dims.push({
37846
+ vertical: false,
37847
+ at: minY - FLOORPLAN_CONST.dimMajorOff,
37848
+ lo: minX,
37849
+ hi: maxX,
37850
+ label: formatLength(maxX - minX, ast.unit),
37851
+ minor: false
37852
+ });
37853
+ dims.push({
37854
+ vertical: true,
37855
+ at: minX - FLOORPLAN_CONST.dimMajorOff,
37856
+ lo: minY,
37857
+ hi: maxY,
37858
+ label: formatLength(maxY - minY, ast.unit),
37859
+ minor: false
37860
+ });
37861
+ const topSegs = [];
37862
+ for (const r6 of rooms) {
37863
+ for (const sg of sideSegments(r6, "north")) {
37864
+ if (Math.abs(sg.along - minY) < 0.01) topSegs.push({ lo: sg.lo, hi: sg.hi });
37865
+ }
37866
+ }
37867
+ if (topSegs.length > 1) {
37868
+ for (const sg of topSegs.sort((a, b) => a.lo - b.lo)) {
37869
+ dims.push({
37870
+ vertical: false,
37871
+ at: minY - FLOORPLAN_CONST.dimMinorOff,
37872
+ lo: sg.lo,
37873
+ hi: sg.hi,
37874
+ label: formatLength(sg.hi - sg.lo, ast.unit),
37875
+ minor: true
37876
+ });
37877
+ }
37878
+ }
37879
+ const leftSegs = [];
37880
+ for (const r6 of rooms) {
37881
+ for (const sg of sideSegments(r6, "west")) {
37882
+ if (Math.abs(sg.along - minX) < 0.01) leftSegs.push({ lo: sg.lo, hi: sg.hi });
37883
+ }
37884
+ }
37885
+ if (leftSegs.length > 1) {
37886
+ for (const sg of leftSegs.sort((a, b) => a.lo - b.lo)) {
37887
+ dims.push({
37888
+ vertical: true,
37889
+ at: minX - FLOORPLAN_CONST.dimMinorOff,
37890
+ lo: sg.lo,
37891
+ hi: sg.hi,
37892
+ label: formatLength(sg.hi - sg.lo, ast.unit),
37893
+ minor: true
37894
+ });
37895
+ }
37896
+ }
37897
+ }
37898
+ return {
37899
+ title: ast.title,
37900
+ unit: ast.unit,
37901
+ north: ast.north,
37902
+ rooms,
37903
+ seams,
37904
+ openings,
37905
+ items,
37906
+ dims,
37907
+ bounds: { minX, minY, maxX, maxY },
37908
+ wallT: FLOORPLAN_CONST.wallT,
37909
+ totalAreaM2: rooms.reduce((s, r6) => s + r6.areaM2, 0),
37910
+ errors,
37911
+ warnings,
37912
+ warnItems: [...warnItems]
37913
+ };
37914
+ }
37915
+ function resolveOpening(op, rooms, byId, u, unit, errors, warnings) {
37916
+ let seg = null;
37917
+ let owner = -1;
37918
+ let negRoom;
37919
+ let posRoom;
37920
+ let inward = 1;
37921
+ if (op.between) {
37922
+ const ia = byId.get(op.between[0]);
37923
+ const ib = byId.get(op.between[1]);
37924
+ if (ia === void 0 || ib === void 0) {
37925
+ errors.push(`${op.kind}: unknown room "${ia === void 0 ? op.between[0] : op.between[1]}"`);
37926
+ return null;
37927
+ }
37928
+ const a = rooms[ia];
37929
+ const b = rooms[ib];
37930
+ const found = roomSharedEdge(a, b);
37931
+ if (!found) {
37932
+ const gapX = Math.max(a.x, b.x) - Math.min(a.x + a.w, b.x + b.w);
37933
+ const gapY = Math.max(a.y, b.y) - Math.min(a.y + a.h, b.y + b.h);
37934
+ const axis = gapX >= gapY ? "x" : "y";
37935
+ const gap = Math.max(gapX, gapY);
37936
+ errors.push(
37937
+ gap > 0 ? `${op.kind} between "${a.id}" and "${b.id}": rooms share no wall (gap ${fmtNum(gap)} m on ${axis}-axis)` : `${op.kind} between "${a.id}" and "${b.id}": rooms share no wall`
37938
+ );
37939
+ return null;
37940
+ }
37941
+ seg = found.edge;
37942
+ owner = ia;
37943
+ if (seg.vertical) {
37944
+ const aIsNeg = found.aPart.x + found.aPart.w / 2 < seg.along;
37945
+ negRoom = aIsNeg ? ia : ib;
37946
+ posRoom = aIsNeg ? ib : ia;
37947
+ inward = aIsNeg ? -1 : 1;
37948
+ } else {
37949
+ const aIsNeg = found.aPart.y + found.aPart.h / 2 < seg.along;
37950
+ negRoom = aIsNeg ? ia : ib;
37951
+ posRoom = aIsNeg ? ib : ia;
37952
+ inward = aIsNeg ? -1 : 1;
37953
+ }
37954
+ } else {
37955
+ const idx = byId.get(op.room);
37956
+ if (idx === void 0) {
37957
+ errors.push(`${op.kind}: unknown room "${op.room}"`);
37958
+ return null;
37959
+ }
37960
+ owner = idx;
37961
+ const r6 = rooms[idx];
37962
+ const side = op.side;
37963
+ const segs = sideSegments(r6, side);
37964
+ if (segs.length === 0) {
37965
+ errors.push(`${op.kind} on "${r6.id}" ${side}: that side has no exterior wall segment`);
37966
+ return null;
37967
+ }
37968
+ const total = segs.reduce((s, sg) => s + (sg.hi - sg.lo), 0);
37969
+ const pct2 = Math.min(100, Math.max(0, op.pct));
37970
+ let target = total * pct2 / 100;
37971
+ let chosen = segs[segs.length - 1];
37972
+ for (const sg of segs) {
37973
+ const len = sg.hi - sg.lo;
37974
+ if (target <= len) {
37975
+ chosen = sg;
37976
+ break;
37977
+ }
37978
+ target -= len;
37979
+ }
37980
+ const within = Math.min(1, Math.max(0, target / (chosen.hi - chosen.lo)));
37981
+ op = { ...op, pct: within * 100 };
37982
+ seg = { vertical: side === "west" || side === "east", along: chosen.along, lo: chosen.lo, hi: chosen.hi };
37983
+ switch (side) {
37984
+ case "north":
37985
+ inward = 1;
37986
+ posRoom = idx;
37987
+ break;
37988
+ case "south":
37989
+ inward = -1;
37990
+ negRoom = idx;
37991
+ break;
37992
+ case "west":
37993
+ inward = 1;
37994
+ posRoom = idx;
37995
+ break;
37996
+ case "east":
37997
+ inward = -1;
37998
+ negRoom = idx;
37999
+ break;
38000
+ }
38001
+ }
38002
+ const jamb = FLOORPLAN_CONST.jamb;
38003
+ const segLen = seg.hi - seg.lo;
38004
+ const avail = segLen - 2 * jamb;
38005
+ let wd = op.width * u;
38006
+ if (wd > avail) {
38007
+ warnings.push(
38008
+ `${op.kind}${op.room ? ` on "${op.room}" ${op.side}` : op.between ? ` between "${op.between[0]}" and "${op.between[1]}"` : ""}: width ${formatLength(wd, unit)} clamped to ${formatLength(avail, unit)} to fit the wall segment`
38009
+ );
38010
+ wd = avail;
38011
+ }
38012
+ const pct = Math.min(100, Math.max(0, op.pct));
38013
+ const c = seg.lo + segLen * pct / 100;
38014
+ const lo = Math.max(seg.lo + jamb, Math.min(c - wd / 2, seg.hi - jamb - wd));
38015
+ const hi = lo + wd;
38016
+ const arcDir = op.kind === "door" && op.swing === "out" ? inward === 1 ? -1 : 1 : inward;
38017
+ return {
38018
+ kind: op.kind,
38019
+ doorType: op.doorType,
38020
+ windowType: op.windowType,
38021
+ vertical: seg.vertical,
38022
+ along: seg.along,
38023
+ lo,
38024
+ hi,
38025
+ inward: arcDir,
38026
+ hinge: op.hinge,
38027
+ negRoom,
38028
+ posRoom,
38029
+ owner
38030
+ };
38031
+ }
38032
+
38033
+ // src/diagrams/floorplan/renderer.ts
38034
+ var r24 = (n) => Math.round(n * 100) / 100;
38035
+ function buildCss13(t) {
38036
+ return `
38037
+ .sx-fp { font-family: ${chunkCAAMBDEN_cjs.DEFAULT_FONT_FAMILY}; }
38038
+ .sx-fp-title { font: ${chunkCAAMBDEN_cjs.TITLE.weight} ${chunkCAAMBDEN_cjs.TITLE.size}px sans-serif; fill: ${t.text}; }
38039
+ .sx-fp-wall { fill: ${t.wallFill}; stroke: none; }
38040
+ .sx-fp-furn { fill: ${t.furnFill}; stroke: ${t.furnStroke}; stroke-width: 1.2; }
38041
+ .sx-fp-furn-nofill { fill: none; stroke: ${t.furnStroke}; stroke-width: 1.2; }
38042
+ .sx-fp-furn-line { fill: none; stroke: ${t.furnStroke}; stroke-width: 1; }
38043
+ .sx-fp-furn-dash { fill: none; stroke: ${t.furnStroke}; stroke-width: 1; stroke-dasharray: 4 3; }
38044
+ .sx-fp-furn-dot { fill: ${t.furnStroke}; stroke: none; }
38045
+ .sx-fp-furn-solid { fill: ${t.furnSolid}; stroke: none; }
38046
+ .sx-fp-board-inner { fill: ${t.boardInner}; stroke: none; }
38047
+ .sx-fp-chair { fill: ${t.chairFill}; stroke: ${t.furnStroke}; stroke-width: 1; }
38048
+ .sx-fp-rug { fill: none; stroke: ${t.rugStroke}; stroke-width: 1.2; stroke-dasharray: 5 4; }
38049
+ .sx-fp-hatch { fill: none; stroke: ${t.hatchStroke}; stroke-width: 1; }
38050
+ .sx-fp-furn-text { font-weight: 600; font-family: sans-serif; fill: ${t.furnLabel}; paint-order: stroke; stroke: ${t.floorFill}; stroke-width: 2.5px; stroke-linejoin: round; }
38051
+ .sx-fp-furn-label { font: 11px sans-serif; fill: ${t.furnLabel}; paint-order: stroke; stroke: ${t.floorFill}; stroke-width: 3px; stroke-linejoin: round; }
38052
+ .sx-fp-door-leaf { fill: none; stroke: ${t.doorLeaf}; stroke-width: 1.6; }
38053
+ .sx-fp-door-arc { fill: none; stroke: ${t.doorArc}; stroke-width: 1; }
38054
+ .sx-fp-window { fill: none; stroke: ${t.windowStroke}; stroke-width: 1.3; }
38055
+ .sx-fp-jamb { fill: none; stroke: ${t.furnStroke}; stroke-width: 1.2; }
38056
+ .sx-fp-room-name { font: 600 13.5px sans-serif; fill: ${t.roomName}; paint-order: stroke; stroke: ${t.floorFill}; stroke-width: 3px; stroke-linejoin: round; }
38057
+ .sx-fp-room-area { font: 11px sans-serif; fill: ${t.roomArea}; paint-order: stroke; stroke: ${t.floorFill}; stroke-width: 3px; stroke-linejoin: round; }
38058
+ .sx-fp-stair-break { fill: none; stroke: ${t.furnStroke}; stroke-width: 1.6; }
38059
+ .sx-fp-compass { fill: none; stroke: ${t.dimStroke}; stroke-width: 1.2; }
38060
+ .sx-fp-compass-n { font: 700 11px sans-serif; fill: ${t.dimText}; }
38061
+ .sx-fp-dim { fill: none; stroke: ${t.dimStroke}; stroke-width: 1; }
38062
+ .sx-fp-dim-text { font: 10.5px sans-serif; fill: ${t.dimText}; }
38063
+ .sx-fp-dim-text-minor { font: 9px sans-serif; fill: ${t.dimText}; }
38064
+ .sx-fp-warn-item { fill: none; stroke: ${t.negative}; stroke-width: 1.5; stroke-dasharray: 4 3; }
38065
+ .sx-fp-warn { font: 11px ui-monospace, Menlo, monospace; fill: ${t.warn}; }
38066
+ .sx-fp-error-box { fill: ${t.bg}; stroke: ${t.negative}; stroke-width: 1.5; }
38067
+ .sx-fp-error-title { font: 700 13px ui-monospace, Menlo, monospace; fill: ${t.negative}; }
38068
+ .sx-fp-error-line { font: 12px ui-monospace, Menlo, monospace; fill: ${t.negative}; }
38069
+ `.trim();
38070
+ }
38071
+ function renderErrorPanel(lay, t) {
38072
+ const lines = lay.errors;
38073
+ const w = Math.max(560, ...lines.map((l) => l.length * 6.6 + 48));
38074
+ const h = 56 + lines.length * 19;
38075
+ return chunk3WNW5Y7P_cjs.svgRoot(
38076
+ { viewBox: `0 0 ${r24(w)} ${h}`, class: "sx-fp", role: "img" },
38077
+ [
38078
+ chunk3WNW5Y7P_cjs.title(lay.title),
38079
+ chunk3WNW5Y7P_cjs.desc(`Floor plan validation failed with ${lines.length} error${lines.length === 1 ? "" : "s"}.`),
38080
+ chunk3WNW5Y7P_cjs.el("style", {}, buildCss13(t)),
38081
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-error-box", x: 1, y: 1, width: r24(w - 2), height: h - 2, rx: 6 }),
38082
+ chunk3WNW5Y7P_cjs.text({ class: "sx-fp-error-title", x: 16, y: 26 }, `floorplan: ${lines.length} validation error${lines.length === 1 ? "" : "s"}`),
38083
+ ...lines.map((e, i) => chunk3WNW5Y7P_cjs.text({ class: "sx-fp-error-line", x: 16, y: 50 + i * 19 }, `\u26A0 ${e}`))
38084
+ ]
38085
+ );
38086
+ }
38087
+ function gapFill(lay, t, roomIdx) {
38088
+ if (roomIdx === void 0) return t.bg;
38089
+ return lay.rooms[roomIdx]?.fill ?? t.floorFill;
38090
+ }
38091
+ function punchGap(o, lay, c) {
38092
+ const tpx = c.px(c.wallT);
38093
+ const negFill = gapFill(lay, c.t, o.negRoom);
38094
+ const posFill = gapFill(lay, c.t, o.posRoom);
38095
+ if (o.vertical) {
38096
+ const x2 = c.X(o.along);
38097
+ const y2 = c.Y(o.lo);
38098
+ const h = c.px(o.hi - o.lo);
38099
+ return chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-gap", fill: negFill, x: r24(x2 - tpx / 2 - 0.5), y: y2, width: r24(tpx / 2 + 0.5), height: h }) + chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-gap", fill: posFill, x: x2, y: y2, width: r24(tpx / 2 + 0.5), height: h });
38100
+ }
38101
+ const y = c.Y(o.along);
38102
+ const x = c.X(o.lo);
38103
+ const w = c.px(o.hi - o.lo);
38104
+ return chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-gap", fill: negFill, x, y: r24(y - tpx / 2 - 0.5), width: w, height: r24(tpx / 2 + 0.5) }) + chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-gap", fill: posFill, x, y, width: w, height: r24(tpx / 2 + 0.5) });
38105
+ }
38106
+ function windowSymbol(o, c) {
38107
+ const tpx = c.px(c.wallT);
38108
+ const parts = [];
38109
+ const outward = o.inward === 1 ? -1 : 1;
38110
+ if (o.vertical) {
38111
+ const x = c.X(o.along);
38112
+ const mid = c.Y((o.lo + o.hi) / 2);
38113
+ if (o.windowType === "sliding") {
38114
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-window", x1: r24(x - tpx * 0.22), y1: c.Y(o.lo), x2: r24(x - tpx * 0.22), y2: mid }));
38115
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-window", x1: r24(x + tpx * 0.22), y1: mid, x2: r24(x + tpx * 0.22), y2: c.Y(o.hi) }));
38116
+ } else {
38117
+ for (const k of [-1, 0, 1]) {
38118
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-window", x1: r24(x + k * tpx * 0.38), y1: c.Y(o.lo), x2: r24(x + k * tpx * 0.38), y2: c.Y(o.hi) }));
38119
+ }
38120
+ }
38121
+ for (const yy of [o.lo, o.hi]) {
38122
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-window", x1: r24(x - tpx / 2), y1: c.Y(yy), x2: r24(x + tpx / 2), y2: c.Y(yy) }));
38123
+ }
38124
+ if (o.windowType === "casement") {
38125
+ const wd = c.px(o.hi - o.lo);
38126
+ const leafX = r24(x + outward * wd);
38127
+ const sweep = outward === 1 ? 1 : 0;
38128
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-door-leaf", x1: x, y1: c.Y(o.lo), x2: leafX, y2: c.Y(o.lo) }));
38129
+ parts.push(chunk3WNW5Y7P_cjs.path({ class: "sx-fp-door-arc", d: `M ${leafX} ${c.Y(o.lo)} A ${wd} ${wd} 0 0 ${sweep} ${x} ${r24(c.Y(o.lo) + wd)}` }));
38130
+ }
38131
+ if (o.windowType === "bay") {
38132
+ const proj = c.px(0.45) * outward;
38133
+ const splay = c.px(0.3);
38134
+ const x0 = r24(x + outward * tpx / 2);
38135
+ parts.push(
38136
+ chunk3WNW5Y7P_cjs.path({
38137
+ class: "sx-fp-window",
38138
+ d: `M ${x0} ${c.Y(o.lo)} L ${r24(x0 + proj)} ${r24(c.Y(o.lo) + splay)} L ${r24(x0 + proj)} ${r24(c.Y(o.hi) - splay)} L ${x0} ${c.Y(o.hi)}`
38139
+ })
38140
+ );
38141
+ }
38142
+ } else {
38143
+ const y = c.Y(o.along);
38144
+ const mid = c.X((o.lo + o.hi) / 2);
38145
+ if (o.windowType === "sliding") {
38146
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-window", x1: c.X(o.lo), y1: r24(y - tpx * 0.22), x2: mid, y2: r24(y - tpx * 0.22) }));
38147
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-window", x1: mid, y1: r24(y + tpx * 0.22), x2: c.X(o.hi), y2: r24(y + tpx * 0.22) }));
38148
+ } else {
38149
+ for (const k of [-1, 0, 1]) {
38150
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-window", x1: c.X(o.lo), y1: r24(y + k * tpx * 0.38), x2: c.X(o.hi), y2: r24(y + k * tpx * 0.38) }));
38151
+ }
38152
+ }
38153
+ for (const xx of [o.lo, o.hi]) {
38154
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-window", x1: c.X(xx), y1: r24(y - tpx / 2), x2: c.X(xx), y2: r24(y + tpx / 2) }));
38155
+ }
38156
+ if (o.windowType === "casement") {
38157
+ const wd = c.px(o.hi - o.lo);
38158
+ const leafY = r24(y + outward * wd);
38159
+ const sweep = outward === 1 ? 0 : 1;
38160
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-door-leaf", x1: c.X(o.lo), y1: y, x2: c.X(o.lo), y2: leafY }));
38161
+ parts.push(chunk3WNW5Y7P_cjs.path({ class: "sx-fp-door-arc", d: `M ${c.X(o.lo)} ${leafY} A ${wd} ${wd} 0 0 ${sweep} ${r24(c.X(o.lo) + wd)} ${y}` }));
38162
+ }
38163
+ if (o.windowType === "bay") {
38164
+ const proj = c.px(0.45) * outward;
38165
+ const splay = c.px(0.3);
38166
+ const y0 = r24(y + outward * tpx / 2);
38167
+ parts.push(
38168
+ chunk3WNW5Y7P_cjs.path({
38169
+ class: "sx-fp-window",
38170
+ d: `M ${c.X(o.lo)} ${y0} L ${r24(c.X(o.lo) + splay)} ${r24(y0 + proj)} L ${r24(c.X(o.hi) - splay)} ${r24(y0 + proj)} L ${c.X(o.hi)} ${y0}`
38171
+ })
38172
+ );
38173
+ }
38174
+ }
38175
+ return parts.join("");
38176
+ }
38177
+ function jambLines(o, c) {
38178
+ const tpx = c.px(c.wallT);
38179
+ if (o.vertical) {
38180
+ const x = c.X(o.along);
38181
+ return [o.lo, o.hi].map((yy) => chunk3WNW5Y7P_cjs.line({ class: "sx-fp-jamb", x1: r24(x - tpx / 2), y1: c.Y(yy), x2: r24(x + tpx / 2), y2: c.Y(yy) })).join("");
38182
+ }
38183
+ const y = c.Y(o.along);
38184
+ return [o.lo, o.hi].map((xx) => chunk3WNW5Y7P_cjs.line({ class: "sx-fp-jamb", x1: c.X(xx), y1: r24(y - tpx / 2), x2: c.X(xx), y2: r24(y + tpx / 2) })).join("");
38185
+ }
38186
+ function swingLeaf(o, c, hingeAtLo, widthM) {
38187
+ const dir = o.inward;
38188
+ const rpx = c.px(widthM);
38189
+ if (o.vertical) {
38190
+ const x = c.X(o.along);
38191
+ const hy = hingeAtLo ? c.Y(o.lo) : c.Y(o.hi);
38192
+ const sy = hingeAtLo ? 1 : -1;
38193
+ const leafX = r24(x + dir * rpx);
38194
+ const sweep2 = dir === 1 === hingeAtLo ? 1 : 0;
38195
+ return chunk3WNW5Y7P_cjs.line({ class: "sx-fp-door-leaf", x1: x, y1: hy, x2: leafX, y2: hy }) + chunk3WNW5Y7P_cjs.path({ class: "sx-fp-door-arc", d: `M ${leafX} ${hy} A ${rpx} ${rpx} 0 0 ${sweep2} ${x} ${r24(hy + sy * rpx)}` });
38196
+ }
38197
+ const y = c.Y(o.along);
38198
+ const hx = hingeAtLo ? c.X(o.lo) : c.X(o.hi);
38199
+ const sx = hingeAtLo ? 1 : -1;
38200
+ const leafY = r24(y + dir * rpx);
38201
+ const sweep = dir === 1 !== hingeAtLo ? 1 : 0;
38202
+ return chunk3WNW5Y7P_cjs.line({ class: "sx-fp-door-leaf", x1: hx, y1: y, x2: hx, y2: leafY }) + chunk3WNW5Y7P_cjs.path({ class: "sx-fp-door-arc", d: `M ${hx} ${leafY} A ${rpx} ${rpx} 0 0 ${sweep} ${r24(hx + sx * rpx)} ${y}` });
38203
+ }
38204
+ function doorSymbol(o, c) {
38205
+ const wd = o.hi - o.lo;
38206
+ if (o.doorType === "double") {
38207
+ const half = { ...o };
38208
+ const mid = (o.lo + o.hi) / 2;
38209
+ const left = { ...half, hi: mid };
38210
+ const right = { ...half, lo: mid };
38211
+ return jambLines(o, c) + swingLeaf(left, c, true, wd / 2) + swingLeaf(right, c, false, wd / 2);
38212
+ }
38213
+ if (o.doorType === "bifold") {
38214
+ const peak = c.px((o.hi - o.lo) * 0.22) * o.inward;
38215
+ const q1 = o.lo + (o.hi - o.lo) * 0.25;
38216
+ const mid = (o.lo + o.hi) / 2;
38217
+ const q3 = o.lo + (o.hi - o.lo) * 0.75;
38218
+ const parts = [jambLines(o, c)];
38219
+ if (o.vertical) {
38220
+ const x = c.X(o.along);
38221
+ parts.push(
38222
+ chunk3WNW5Y7P_cjs.path({
38223
+ class: "sx-fp-door-leaf",
38224
+ d: `M ${x} ${c.Y(o.lo)} L ${r24(x + peak)} ${c.Y(q1)} L ${x} ${c.Y(mid)} L ${r24(x + peak)} ${c.Y(q3)} L ${x} ${c.Y(o.hi)}`
38225
+ })
38226
+ );
38227
+ } else {
38228
+ const y = c.Y(o.along);
38229
+ parts.push(
38230
+ chunk3WNW5Y7P_cjs.path({
38231
+ class: "sx-fp-door-leaf",
38232
+ d: `M ${c.X(o.lo)} ${y} L ${c.X(q1)} ${r24(y + peak)} L ${c.X(mid)} ${y} L ${c.X(q3)} ${r24(y + peak)} L ${c.X(o.hi)} ${y}`
38233
+ })
38234
+ );
38235
+ }
38236
+ return parts.join("");
38237
+ }
38238
+ if (o.doorType === "sliding" || o.doorType === "pocket") {
38239
+ const off = c.px(c.wallT) * 0.28;
38240
+ const mid = (o.lo + o.hi) / 2;
38241
+ const parts = [jambLines(o, c)];
38242
+ if (o.vertical) {
38243
+ const x = c.X(o.along);
38244
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-door-leaf", x1: r24(x - off), y1: c.Y(o.lo), x2: r24(x - off), y2: c.Y(mid) }));
38245
+ if (o.doorType === "sliding") {
38246
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-door-leaf", x1: r24(x + off), y1: c.Y(mid), x2: r24(x + off), y2: c.Y(o.hi) }));
38247
+ }
38248
+ } else {
38249
+ const y = c.Y(o.along);
38250
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-door-leaf", x1: c.X(o.lo), y1: r24(y - off), x2: c.X(mid), y2: r24(y - off) }));
38251
+ if (o.doorType === "sliding") {
38252
+ parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-door-leaf", x1: c.X(mid), y1: r24(y + off), x2: c.X(o.hi), y2: r24(y + off) }));
38253
+ }
38254
+ }
38255
+ return parts.join("");
38256
+ }
38257
+ return jambLines(o, c) + swingLeaf(o, c, o.hinge !== "right", wd);
38258
+ }
38259
+ function renderDim(d, c) {
38260
+ const cls = d.minor ? "sx-fp-dim-text-minor" : "sx-fp-dim-text";
38261
+ const tick = 3.6;
38262
+ if (!d.vertical) {
38263
+ const y = c.Y(d.at);
38264
+ const x1 = c.X(d.lo);
38265
+ const x2 = c.X(d.hi);
38266
+ return chunk3WNW5Y7P_cjs.line({ class: "sx-fp-dim", x1, y1: y, x2, y2: y }) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-dim", x1: r24(x1 - tick), y1: r24(y + tick), x2: r24(x1 + tick), y2: r24(y - tick) }) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-dim", x1: r24(x2 - tick), y1: r24(y + tick), x2: r24(x2 + tick), y2: r24(y - tick) }) + chunk3WNW5Y7P_cjs.text({ class: cls, x: r24((x1 + x2) / 2), y: r24(y - 4), "text-anchor": "middle" }, d.label);
38267
+ }
38268
+ const x = c.X(d.at);
38269
+ const y1 = c.Y(d.lo);
38270
+ const y2 = c.Y(d.hi);
38271
+ const mid = r24((y1 + y2) / 2);
38272
+ return chunk3WNW5Y7P_cjs.line({ class: "sx-fp-dim", x1: x, y1, x2: x, y2 }) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-dim", x1: r24(x - tick), y1: r24(y1 + tick), x2: r24(x + tick), y2: r24(y1 - tick) }) + chunk3WNW5Y7P_cjs.line({ class: "sx-fp-dim", x1: r24(x - tick), y1: r24(y2 + tick), x2: r24(x + tick), y2: r24(y2 - tick) }) + chunk3WNW5Y7P_cjs.text(
38273
+ { class: cls, x: r24(x - 5), y: mid, "text-anchor": "middle", transform: `rotate(-90 ${r24(x - 5)} ${mid})` },
38274
+ d.label
38275
+ );
38276
+ }
38277
+ function renderFloorplanLayout(lay, config) {
38278
+ const t = chunkCAAMBDEN_cjs.resolveFloorplanTheme(config?.theme ?? "default");
38279
+ if (lay.errors.length > 0) return renderErrorPanel(lay, t);
38280
+ const scale = FLOORPLAN_CONST.scale;
38281
+ const px = (m) => r24(m * scale);
38282
+ const band = FLOORPLAN_CONST.dimBand + FLOORPLAN_CONST.pad;
38283
+ let outward = 0;
38284
+ for (const o of lay.openings) {
38285
+ if (o.kind !== "window") continue;
38286
+ if (o.windowType === "casement") outward = Math.max(outward, o.hi - o.lo + 0.1);
38287
+ if (o.windowType === "bay") outward = Math.max(outward, 0.6);
38288
+ }
38289
+ const tail = FLOORPLAN_CONST.pad + lay.wallT + outward;
38290
+ const ox = -lay.bounds.minX + band;
38291
+ const oy = -lay.bounds.minY + band;
38292
+ const X = (m) => px(m + ox);
38293
+ const Y = (m) => px(m + oy);
38294
+ const ctx = { X, Y, px, t, wallT: lay.wallT };
38295
+ const titleH = chunkCAAMBDEN_cjs.TITLE.bandH;
38296
+ const warnH = lay.warnings.length ? lay.warnings.length * 17 + 10 : 0;
38297
+ const W2 = px(lay.bounds.maxX - lay.bounds.minX + band + tail);
38298
+ const H2 = px(lay.bounds.maxY - lay.bounds.minY + band + tail) + titleH + warnH;
38299
+ const titleX = r24(X((lay.bounds.minX + lay.bounds.maxX) / 2));
38300
+ const floors = [];
38301
+ const furniture = [];
38302
+ const walls = [];
38303
+ const openings = [];
38304
+ const labels = [];
38305
+ const dims = [];
38306
+ for (const r6 of lay.rooms) {
38307
+ floors.push(
38308
+ chunk3WNW5Y7P_cjs.group(
38309
+ { class: "sx-fp-floor", "data-room": r6.id },
38310
+ r6.parts.map(
38311
+ (p) => chunk3WNW5Y7P_cjs.rect({
38312
+ fill: r6.fill ?? t.floorFill,
38313
+ x: X(p.x),
38314
+ y: Y(p.y),
38315
+ width: px(p.w),
38316
+ height: px(p.h)
38317
+ })
38318
+ )
38319
+ )
38320
+ );
38321
+ if (!r6.nolabel) {
38322
+ const main = r6.parts.reduce((a, b) => b.w * b.h > a.w * a.h ? b : a);
38323
+ const cx = X(main.x + main.w / 2);
38324
+ const cy = Y(main.y + main.h / 2);
38325
+ labels.push(chunk3WNW5Y7P_cjs.text({ class: "sx-fp-room-name", x: cx, y: r24(cy - 3), "text-anchor": "middle" }, r6.label));
38326
+ labels.push(chunk3WNW5Y7P_cjs.text({ class: "sx-fp-room-area", x: cx, y: r24(cy + 13), "text-anchor": "middle" }, r6.areaText));
38327
+ }
38328
+ }
38329
+ const warnSet = new Set(lay.warnItems);
38330
+ lay.items.forEach((it, idx) => {
38331
+ const def = FLOORPLAN_SYMBOLS[it.type];
38332
+ const wpx = px(it.w);
38333
+ const hpx = px(it.h);
38334
+ const cx = r24(X(it.x) + wpx / 2);
38335
+ const cy = r24(Y(it.y) + hpx / 2);
38336
+ const rot = Math.round(it.rotate * 10) / 10;
38337
+ const children = [def.draw({ w: it.w, h: it.h, px, label: it.label })];
38338
+ if (warnSet.has(idx)) {
38339
+ children.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-warn-item", x: -1, y: -1, width: r24(wpx + 2), height: r24(hpx + 2) }));
38340
+ }
38341
+ furniture.push(
38342
+ chunk3WNW5Y7P_cjs.group(
38343
+ {
38344
+ class: "sx-fp-item",
38345
+ "data-furniture": it.type,
38346
+ transform: `translate(${cx},${cy})${rot ? ` rotate(${rot})` : ""} translate(${r24(-wpx / 2)},${r24(-hpx / 2)})`
38347
+ },
38348
+ children
38349
+ )
38350
+ );
38351
+ if (it.label && !def.consumesLabel) {
38352
+ labels.push(chunk3WNW5Y7P_cjs.text({ class: "sx-fp-furn-label", x: cx, y: r24(cy + 4), "text-anchor": "middle" }, it.label));
38353
+ }
38354
+ });
38355
+ const tw = lay.wallT;
38356
+ for (const r6 of lay.rooms) {
38357
+ for (const p of r6.parts) {
38358
+ walls.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-wall", x: r24(X(p.x) - px(tw / 2)), y: r24(Y(p.y) - px(tw / 2)), width: r24(px(p.w + tw)), height: px(tw) }));
38359
+ walls.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-wall", x: r24(X(p.x) - px(tw / 2)), y: r24(Y(p.y + p.h) - px(tw / 2)), width: r24(px(p.w + tw)), height: px(tw) }));
38360
+ walls.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-wall", x: r24(X(p.x) - px(tw / 2)), y: r24(Y(p.y) - px(tw / 2)), width: px(tw), height: r24(px(p.h + tw)) }));
38361
+ walls.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-wall", x: r24(X(p.x + p.w) - px(tw / 2)), y: r24(Y(p.y) - px(tw / 2)), width: px(tw), height: r24(px(p.h + tw)) }));
38362
+ }
38363
+ }
38364
+ for (const s of lay.seams) {
38365
+ const fill = lay.rooms[s.room]?.fill ?? t.floorFill;
38366
+ const tpx = px(tw);
38367
+ if (s.vertical) {
38368
+ openings.push(
38369
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-gap", fill, x: r24(X(s.along) - tpx / 2 - 0.5), y: Y(s.lo), width: r24(tpx + 1), height: px(s.hi - s.lo) })
38370
+ );
38371
+ } else {
38372
+ openings.push(
38373
+ chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-gap", fill, x: X(s.lo), y: r24(Y(s.along) - tpx / 2 - 0.5), width: px(s.hi - s.lo), height: r24(tpx + 1) })
38374
+ );
38375
+ }
38376
+ }
38377
+ for (const o of lay.openings) {
38378
+ openings.push(punchGap(o, lay, ctx));
38379
+ if (o.kind === "window") openings.push(windowSymbol(o, ctx));
38380
+ else if (o.kind === "door") openings.push(doorSymbol(o, ctx));
38381
+ else openings.push(jambLines(o, ctx));
38382
+ }
38383
+ for (const d of lay.dims) dims.push(renderDim(d, ctx));
38384
+ if (lay.north !== void 0) {
38385
+ const ncx = r24(X(lay.bounds.maxX) + px(0.55));
38386
+ const ncy = r24(Y(lay.bounds.minY) - px(0.62));
38387
+ const rr = px(0.32);
38388
+ const rot = Math.round(lay.north * 10) / 10;
38389
+ dims.push(
38390
+ chunk3WNW5Y7P_cjs.group({ class: "sx-fp-compass-g", transform: rot ? `rotate(${rot} ${ncx} ${ncy})` : "" }, [
38391
+ chunk3WNW5Y7P_cjs.el("circle", { class: "sx-fp-compass", cx: ncx, cy: ncy, r: rr }),
38392
+ chunk3WNW5Y7P_cjs.line({ class: "sx-fp-compass", x1: ncx, y1: r24(ncy + rr * 0.7), x2: ncx, y2: r24(ncy - rr * 0.55) }),
38393
+ chunk3WNW5Y7P_cjs.el("polygon", {
38394
+ class: "sx-fp-compass",
38395
+ fill: t.dimText,
38396
+ points: `${ncx},${r24(ncy - rr * 0.85)} ${r24(ncx - rr * 0.22)},${r24(ncy - rr * 0.3)} ${r24(ncx + rr * 0.22)},${r24(ncy - rr * 0.3)}`
38397
+ }),
38398
+ chunk3WNW5Y7P_cjs.text({ class: "sx-fp-compass-n", x: r24(ncx + rr + 4), y: r24(ncy - rr * 0.45), "text-anchor": "start" }, "N")
38399
+ ])
38400
+ );
38401
+ }
38402
+ const warnBlock = [];
38403
+ if (lay.warnings.length) {
38404
+ const y0 = H2 - warnH + 4;
38405
+ lay.warnings.forEach((w, i) => {
38406
+ warnBlock.push(chunk3WNW5Y7P_cjs.text({ class: "sx-fp-warn", x: 10, y: r24(y0 + i * 17 + 10) }, `\u26A0 ${w}`));
38407
+ });
38408
+ }
38409
+ const nRooms = lay.rooms.length;
38410
+ const descText = `${nRooms} room${nRooms === 1 ? "" : "s"}, ${formatArea(lay.totalAreaM2, lay.unit)} total. ${lay.items.length} furniture item${lay.items.length === 1 ? "" : "s"}.` + (lay.warnings.length ? ` Warnings: ${lay.warnings.join("; ")}.` : "");
38411
+ return chunk3WNW5Y7P_cjs.svgRoot(
38412
+ { viewBox: `0 0 ${W2} ${H2}`, class: "sx-fp", role: "img" },
38413
+ [
38414
+ chunk3WNW5Y7P_cjs.title(lay.title),
38415
+ chunk3WNW5Y7P_cjs.desc(descText),
38416
+ chunk3WNW5Y7P_cjs.el("style", {}, buildCss13(t)),
38417
+ chunk3WNW5Y7P_cjs.rect({ fill: t.bg, x: 0, y: 0, width: W2, height: H2 }),
38418
+ chunk3WNW5Y7P_cjs.text({ class: "sx-fp-title", x: titleX, y: chunkCAAMBDEN_cjs.TITLE.y, "text-anchor": "middle" }, lay.title),
38419
+ chunk3WNW5Y7P_cjs.group({ transform: `translate(0,${titleH})` }, [
38420
+ chunk3WNW5Y7P_cjs.group({ class: "sx-fp-floors" }, floors),
38421
+ chunk3WNW5Y7P_cjs.group({ class: "sx-fp-furniture" }, furniture),
38422
+ chunk3WNW5Y7P_cjs.group({ class: "sx-fp-walls" }, walls),
38423
+ chunk3WNW5Y7P_cjs.group({ class: "sx-fp-openings" }, openings),
38424
+ chunk3WNW5Y7P_cjs.group({ class: "sx-fp-labels" }, labels),
38425
+ chunk3WNW5Y7P_cjs.group({ class: "sx-fp-dims" }, dims)
38426
+ ]),
38427
+ ...warnBlock
38428
+ ]
38429
+ );
38430
+ }
38431
+ function renderFloorplan(text2, config) {
38432
+ return renderFloorplanLayout(layoutFloorplan(parseFloorplan(text2)), config);
38433
+ }
38434
+
38435
+ // src/diagrams/floorplan/index.ts
38436
+ var floorplan = {
38437
+ type: "floorplan",
38438
+ detect(text2) {
38439
+ for (const raw of text2.split(/\r?\n/)) {
38440
+ const t = raw.trim();
38441
+ if (!t) continue;
38442
+ if (t.startsWith("#") || t.startsWith("//")) continue;
38443
+ return /^floorplan\b/i.test(t);
38444
+ }
38445
+ return false;
38446
+ },
38447
+ parse: parseFloorplan,
38448
+ render(text2, config) {
38449
+ return renderFloorplan(text2, config);
38450
+ },
38451
+ lint(text2) {
38452
+ try {
38453
+ const lay = layoutFloorplan(parseFloorplan(text2));
38454
+ return [
38455
+ ...lay.errors.map(
38456
+ (message) => ({
38457
+ severity: "error",
38458
+ code: "floorplan/validation",
38459
+ message,
38460
+ fatal: false
38461
+ })
38462
+ ),
38463
+ ...lay.warnings.map(
38464
+ (message) => ({
38465
+ severity: "warning",
38466
+ code: "floorplan/warning",
38467
+ message,
38468
+ fatal: false
38469
+ })
38470
+ )
38471
+ ];
38472
+ } catch {
38473
+ return [];
38474
+ }
38475
+ }
38476
+ };
38477
+
35976
38478
  // src/core/api.ts
35977
38479
  var plugins = [
35978
- chunk7JJQEECD_cjs.genogram,
35979
- chunkV3JTVTPY_cjs.ecomap,
35980
- chunkGYTU7L4L_cjs.pedigree,
35981
- chunkMYVY55DO_cjs.phylo,
35982
- chunkHILYXWGJ_cjs.sociogram,
38480
+ chunkMZWVJFTV_cjs.genogram,
38481
+ chunkY4OBXYGW_cjs.ecomap,
38482
+ chunkAEZVCGH4_cjs.pedigree,
38483
+ chunkFFAJQ36U_cjs.phylo,
38484
+ chunkC2BNO3CI_cjs.sociogram,
35983
38485
  chunkJHJJT5H5_cjs.timing,
35984
- chunk4MGALM2C_cjs.logic,
35985
- chunkXA6XIAMN_cjs.circuit,
35986
- chunk2ASZMLC3_cjs.blockdiagram,
35987
- chunkWFVRUUJW_cjs.ladder,
35988
- chunkL2NY4XEY_cjs.sld,
35989
- chunkVYAUTNHC_cjs.entity,
35990
- chunkPSQGLE6U_cjs.fishbone,
35991
- chunk2A5HJFOX_cjs.venn,
35992
- chunkMUE45N2A_cjs.flowchart,
38486
+ chunkVG5LP5A4_cjs.logic,
38487
+ chunkATE7LD6I_cjs.circuit,
38488
+ chunkO6A2GJLI_cjs.blockdiagram,
38489
+ chunkIU26USXA_cjs.ladder,
38490
+ chunkJYAL26WQ_cjs.sld,
38491
+ chunkIOD2EFMX_cjs.entity,
38492
+ chunk6W6RFZND_cjs.fishbone,
38493
+ chunkBXS53MLV_cjs.venn,
38494
+ chunkTFNH2NLJ_cjs.flowchart,
35993
38495
  mindmap,
35994
38496
  matrix,
35995
- chunk6BJKQULN_cjs.orgchart,
38497
+ chunkVOFND6ZQ_cjs.orgchart,
35996
38498
  decisiontree,
35997
38499
  timeline,
35998
38500
  state,
@@ -36019,7 +38521,8 @@ var plugins = [
36019
38521
  epc,
36020
38522
  idef0,
36021
38523
  threatmodel,
36022
- welding
38524
+ welding,
38525
+ floorplan
36023
38526
  ];
36024
38527
  function detectPlugin(text2, config) {
36025
38528
  if (config?.type) {
@@ -36030,7 +38533,7 @@ function detectPlugin(text2, config) {
36030
38533
  if (plugin.detect(text2)) return plugin;
36031
38534
  }
36032
38535
  throw new Error(
36033
- "Cannot detect diagram type. Start your text with 'genogram', 'ecomap', 'pedigree', 'phylo', 'sociogram', 'timing', 'logic', 'circuit', 'blockdiagram', 'ladder', 'sld', 'entity-structure', 'fishbone', 'venn', 'flowchart', 'mindmap', 'matrix', 'orgchart', 'state', 'pid', 'erd', 'breadboard', 'bpmn', 'fbd', 'sfc', 'prisma', 'usecase', 'pert', 'sequence', 'petri', 'network', 'umlclass', 'faulttree', or 'bowtie'."
38536
+ "Cannot detect diagram type. Start your text with 'genogram', 'ecomap', 'pedigree', 'phylo', 'sociogram', 'timing', 'logic', 'circuit', 'blockdiagram', 'ladder', 'sld', 'entity-structure', 'fishbone', 'venn', 'flowchart', 'mindmap', 'matrix', 'orgchart', 'state', 'pid', 'erd', 'breadboard', 'bpmn', 'fbd', 'sfc', 'prisma', 'usecase', 'pert', 'sequence', 'petri', 'network', 'umlclass', 'faulttree', 'bowtie', or 'floorplan'."
36034
38537
  );
36035
38538
  }
36036
38539
  function stripCodeFences(text2) {
@@ -36167,6 +38670,7 @@ function renderWithPlugin(prepared, plugin, config) {
36167
38670
  return plugin.render(prepared, renderConfig);
36168
38671
  }
36169
38672
 
38673
+ exports.FLOORPLAN_SYMBOLS = FLOORPLAN_SYMBOLS;
36170
38674
  exports.GEOMETRY = GEOMETRY;
36171
38675
  exports.bowtie = bowtie2;
36172
38676
  exports.causalloop = causalloop;
@@ -36198,5 +38702,5 @@ exports.timeline = timeline;
36198
38702
  exports.umlclass = umlclass;
36199
38703
  exports.usecase = usecase;
36200
38704
  exports.welding = welding;
36201
- //# sourceMappingURL=chunk-NTQBNBBP.cjs.map
36202
- //# sourceMappingURL=chunk-NTQBNBBP.cjs.map
38705
+ //# sourceMappingURL=chunk-AHSSFGDJ.cjs.map
38706
+ //# sourceMappingURL=chunk-AHSSFGDJ.cjs.map