@sentropic/h2a 0.98.6 → 0.98.7-rc.10

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 (253) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +2 -1
  3. package/dist/bin-routing.d.ts.map +1 -1
  4. package/dist/bin-routing.js +23 -3
  5. package/dist/bin-routing.js.map +1 -1
  6. package/dist/bin.js +51 -4
  7. package/dist/bin.js.map +1 -1
  8. package/dist/cli-command-map.d.ts.map +1 -1
  9. package/dist/cli-command-map.js +1 -0
  10. package/dist/cli-command-map.js.map +1 -1
  11. package/dist/cli-contract.js +2 -2
  12. package/dist/cli-contract.js.map +1 -1
  13. package/dist/cli.d.ts.map +1 -1
  14. package/dist/cli.js +270 -45
  15. package/dist/cli.js.map +1 -1
  16. package/dist/focus-build.d.ts +10 -0
  17. package/dist/focus-build.d.ts.map +1 -0
  18. package/dist/focus-build.js +202 -0
  19. package/dist/focus-build.js.map +1 -0
  20. package/dist/focus-feedback.d.ts +30 -0
  21. package/dist/focus-feedback.d.ts.map +1 -0
  22. package/dist/focus-feedback.js +133 -0
  23. package/dist/focus-feedback.js.map +1 -0
  24. package/dist/hosts/agy.js +1 -1
  25. package/dist/hosts/agy.js.map +1 -1
  26. package/dist/hosts/installation-doctor.d.ts +1 -0
  27. package/dist/hosts/installation-doctor.d.ts.map +1 -1
  28. package/dist/hosts/installation-doctor.js +1 -1
  29. package/dist/hosts/installation-doctor.js.map +1 -1
  30. package/dist/hosts/muse.d.ts.map +1 -1
  31. package/dist/hosts/muse.js +2 -4
  32. package/dist/hosts/muse.js.map +1 -1
  33. package/dist/hosts/native-artifacts.d.ts +33 -0
  34. package/dist/hosts/native-artifacts.d.ts.map +1 -0
  35. package/dist/hosts/native-artifacts.js +104 -0
  36. package/dist/hosts/native-artifacts.js.map +1 -0
  37. package/dist/hosts/native-catalog.d.ts +19 -0
  38. package/dist/hosts/native-catalog.d.ts.map +1 -0
  39. package/dist/hosts/native-catalog.js +14 -0
  40. package/dist/hosts/native-catalog.js.map +1 -0
  41. package/dist/hosts/native-convergence.d.ts +169 -0
  42. package/dist/hosts/native-convergence.d.ts.map +1 -0
  43. package/dist/hosts/native-convergence.js +152 -0
  44. package/dist/hosts/native-convergence.js.map +1 -0
  45. package/dist/hosts/native-files.d.ts +46 -0
  46. package/dist/hosts/native-files.d.ts.map +1 -0
  47. package/dist/hosts/native-files.js +136 -0
  48. package/dist/hosts/native-files.js.map +1 -0
  49. package/dist/hosts/native-inspection.d.ts +31 -0
  50. package/dist/hosts/native-inspection.d.ts.map +1 -0
  51. package/dist/hosts/native-inspection.js +79 -0
  52. package/dist/hosts/native-inspection.js.map +1 -0
  53. package/dist/hosts/native-paths.d.ts +11 -0
  54. package/dist/hosts/native-paths.d.ts.map +1 -0
  55. package/dist/hosts/native-paths.js +21 -0
  56. package/dist/hosts/native-paths.js.map +1 -0
  57. package/dist/hosts/native-proof.d.ts +32 -0
  58. package/dist/hosts/native-proof.d.ts.map +1 -0
  59. package/dist/hosts/native-proof.js +31 -0
  60. package/dist/hosts/native-proof.js.map +1 -0
  61. package/dist/hosts/native-questions.d.ts +2 -0
  62. package/dist/hosts/native-questions.d.ts.map +1 -0
  63. package/dist/hosts/native-questions.js +22 -0
  64. package/dist/hosts/native-questions.js.map +1 -0
  65. package/dist/hosts/native-runtime-record.d.ts +3 -0
  66. package/dist/hosts/native-runtime-record.d.ts.map +1 -0
  67. package/dist/hosts/native-runtime-record.js +60 -0
  68. package/dist/hosts/native-runtime-record.js.map +1 -0
  69. package/dist/hosts/native-skills.d.ts +24 -0
  70. package/dist/hosts/native-skills.d.ts.map +1 -0
  71. package/dist/hosts/native-skills.js +56 -0
  72. package/dist/hosts/native-skills.js.map +1 -0
  73. package/dist/hosts/native-toml.d.ts +18 -0
  74. package/dist/hosts/native-toml.d.ts.map +1 -0
  75. package/dist/hosts/native-toml.js +93 -0
  76. package/dist/hosts/native-toml.js.map +1 -0
  77. package/dist/hosts/operator-notices.d.ts +3 -0
  78. package/dist/hosts/operator-notices.d.ts.map +1 -0
  79. package/dist/hosts/operator-notices.js +31 -0
  80. package/dist/hosts/operator-notices.js.map +1 -0
  81. package/dist/hosts/plugin.d.ts +30 -0
  82. package/dist/hosts/plugin.d.ts.map +1 -1
  83. package/dist/hosts/plugin.js +56 -4
  84. package/dist/hosts/plugin.js.map +1 -1
  85. package/dist/hosts/upgrade-equipment.d.ts +42 -0
  86. package/dist/hosts/upgrade-equipment.d.ts.map +1 -0
  87. package/dist/hosts/upgrade-equipment.js +26 -0
  88. package/dist/hosts/upgrade-equipment.js.map +1 -0
  89. package/dist/hosts/vibe-discovery.d.ts +12 -0
  90. package/dist/hosts/vibe-discovery.d.ts.map +1 -0
  91. package/dist/hosts/vibe-discovery.js +33 -0
  92. package/dist/hosts/vibe-discovery.js.map +1 -0
  93. package/dist/hosts/vibe-equipment.d.ts +73 -0
  94. package/dist/hosts/vibe-equipment.d.ts.map +1 -0
  95. package/dist/hosts/vibe-equipment.js +179 -0
  96. package/dist/hosts/vibe-equipment.js.map +1 -0
  97. package/dist/hosts/vibe-mcp.d.ts +32 -0
  98. package/dist/hosts/vibe-mcp.d.ts.map +1 -0
  99. package/dist/hosts/vibe-mcp.js +210 -0
  100. package/dist/hosts/vibe-mcp.js.map +1 -0
  101. package/dist/hosts/vibe.d.ts +12 -3
  102. package/dist/hosts/vibe.d.ts.map +1 -1
  103. package/dist/hosts/vibe.js +15 -7
  104. package/dist/hosts/vibe.js.map +1 -1
  105. package/dist/identity-operator-break.d.ts +31 -0
  106. package/dist/identity-operator-break.d.ts.map +1 -0
  107. package/dist/identity-operator-break.js +77 -0
  108. package/dist/identity-operator-break.js.map +1 -0
  109. package/dist/index.d.ts +1 -1
  110. package/dist/index.d.ts.map +1 -1
  111. package/dist/index.js +1 -1
  112. package/dist/index.js.map +1 -1
  113. package/dist/runtime/agy-claude.d.ts +42 -0
  114. package/dist/runtime/agy-claude.d.ts.map +1 -0
  115. package/dist/runtime/agy-claude.js +140 -0
  116. package/dist/runtime/agy-claude.js.map +1 -0
  117. package/dist/runtime/focus/edit-receipts.d.ts +22 -0
  118. package/dist/runtime/focus/edit-receipts.d.ts.map +1 -0
  119. package/dist/runtime/focus/edit-receipts.js +46 -0
  120. package/dist/runtime/focus/edit-receipts.js.map +1 -0
  121. package/dist/runtime/live/contracts.d.ts +55 -0
  122. package/dist/runtime/live/contracts.d.ts.map +1 -0
  123. package/dist/runtime/live/contracts.js +59 -0
  124. package/dist/runtime/live/contracts.js.map +1 -0
  125. package/dist/runtime/local-files/identity-fence.d.ts.map +1 -1
  126. package/dist/runtime/local-files/identity-fence.js +2 -0
  127. package/dist/runtime/local-files/identity-fence.js.map +1 -1
  128. package/dist/runtime/local-files/orphan-gc.d.ts +3 -0
  129. package/dist/runtime/local-files/orphan-gc.d.ts.map +1 -0
  130. package/dist/runtime/local-files/orphan-gc.js +69 -0
  131. package/dist/runtime/local-files/orphan-gc.js.map +1 -0
  132. package/dist/runtime/local-files/presence.d.ts +5 -2
  133. package/dist/runtime/local-files/presence.d.ts.map +1 -1
  134. package/dist/runtime/local-files/presence.js +32 -29
  135. package/dist/runtime/local-files/presence.js.map +1 -1
  136. package/dist/runtime/local-files/recipient-hints.d.ts +10 -0
  137. package/dist/runtime/local-files/recipient-hints.d.ts.map +1 -0
  138. package/dist/runtime/local-files/recipient-hints.js +156 -0
  139. package/dist/runtime/local-files/recipient-hints.js.map +1 -0
  140. package/dist/runtime/local-files/store.d.ts.map +1 -1
  141. package/dist/runtime/local-files/store.js +22 -2
  142. package/dist/runtime/local-files/store.js.map +1 -1
  143. package/dist/runtime/loop/engine/adapters.d.ts.map +1 -1
  144. package/dist/runtime/loop/engine/adapters.js +7 -1
  145. package/dist/runtime/loop/engine/adapters.js.map +1 -1
  146. package/dist/runtime/mcp/agent-launch.d.ts +3 -0
  147. package/dist/runtime/mcp/agent-launch.d.ts.map +1 -1
  148. package/dist/runtime/mcp/agent-launch.js +93 -8
  149. package/dist/runtime/mcp/agent-launch.js.map +1 -1
  150. package/dist/runtime/mcp/handlers.d.ts +1 -0
  151. package/dist/runtime/mcp/handlers.d.ts.map +1 -1
  152. package/dist/runtime/mcp/handlers.js +7 -4
  153. package/dist/runtime/mcp/handlers.js.map +1 -1
  154. package/dist/runtime/mcp/notifications.d.ts +2 -1
  155. package/dist/runtime/mcp/notifications.d.ts.map +1 -1
  156. package/dist/runtime/mcp/notifications.js +16 -2
  157. package/dist/runtime/mcp/notifications.js.map +1 -1
  158. package/dist/runtime/mcp/server.d.ts +3 -0
  159. package/dist/runtime/mcp/server.d.ts.map +1 -1
  160. package/dist/runtime/mcp/server.js +19 -6
  161. package/dist/runtime/mcp/server.js.map +1 -1
  162. package/dist/runtime/mcp/sessions.d.ts +6 -6
  163. package/dist/runtime/mcp/sessions.d.ts.map +1 -1
  164. package/dist/runtime/mcp/sessions.js +18 -6
  165. package/dist/runtime/mcp/sessions.js.map +1 -1
  166. package/dist/runtime/mcp/stdio.d.ts.map +1 -1
  167. package/dist/runtime/mcp/stdio.js +11 -0
  168. package/dist/runtime/mcp/stdio.js.map +1 -1
  169. package/dist/runtime/mcp/tools.d.ts.map +1 -1
  170. package/dist/runtime/mcp/tools.js +11 -7
  171. package/dist/runtime/mcp/tools.js.map +1 -1
  172. package/dist/runtime/send.d.ts +10 -0
  173. package/dist/runtime/send.d.ts.map +1 -1
  174. package/dist/runtime/send.js +80 -5
  175. package/dist/runtime/send.js.map +1 -1
  176. package/dist/runtime/upgrade/index.d.ts +1 -0
  177. package/dist/runtime/upgrade/index.d.ts.map +1 -1
  178. package/dist/runtime/upgrade/index.js +1 -0
  179. package/dist/runtime/upgrade/index.js.map +1 -1
  180. package/dist/vendor/engram-live/contracts.d.ts +825 -0
  181. package/dist/vendor/engram-live/contracts.js +1734 -0
  182. package/fixtures/native-host-catalog.json +1 -0
  183. package/fixtures/native-host-history.json +1261 -0
  184. package/fixtures/native-host-renderers.json +1 -0
  185. package/focus-app/client/_app/immutable/chunks/{unQroC_0.js → BXS4ok-I.js} +2 -2
  186. package/focus-app/client/_app/immutable/chunks/BXS4ok-I.js.br +0 -0
  187. package/focus-app/client/_app/immutable/chunks/BXS4ok-I.js.gz +0 -0
  188. package/focus-app/client/_app/immutable/entry/{app.75Uzo4oj.js → app.BJwKYx8S.js} +2 -2
  189. package/focus-app/client/_app/immutable/entry/app.BJwKYx8S.js.br +0 -0
  190. package/focus-app/client/_app/immutable/entry/app.BJwKYx8S.js.gz +0 -0
  191. package/focus-app/client/_app/immutable/entry/start.to_m_bSO.js +1 -0
  192. package/focus-app/client/_app/immutable/entry/start.to_m_bSO.js.br +2 -0
  193. package/focus-app/client/_app/immutable/entry/start.to_m_bSO.js.gz +0 -0
  194. package/focus-app/client/_app/immutable/nodes/{1.hqfmE-jM.js → 1.CvN150m3.js} +1 -1
  195. package/focus-app/client/_app/immutable/nodes/1.CvN150m3.js.br +3 -0
  196. package/focus-app/client/_app/immutable/nodes/1.CvN150m3.js.gz +0 -0
  197. package/focus-app/client/_app/version.json +1 -1
  198. package/focus-app/client/_app/version.json.br +0 -0
  199. package/focus-app/client/_app/version.json.gz +0 -0
  200. package/focus-app/h2a-focus.json +29 -29
  201. package/focus-app/handler.js +4 -4
  202. package/focus-app/index.js +4 -4
  203. package/focus-app/server/chunks/chunks/{internal.js-vq85iWAx.js → internal.js-BORbEOh-.js} +2 -2
  204. package/focus-app/server/chunks/chunks/{internal.js-vq85iWAx.js.map → internal.js-BORbEOh-.js.map} +1 -1
  205. package/focus-app/server/chunks/{handler-f-0S9j72.js → handler-Ccwb0eyC.js} +3 -3
  206. package/focus-app/server/chunks/{handler-f-0S9j72.js.map → handler-Ccwb0eyC.js.map} +1 -1
  207. package/focus-app/server/chunks/{index.js-DlbaFcic.js → index.js-CzPOZLjV.js} +2 -2
  208. package/focus-app/server/chunks/{index.js-DlbaFcic.js.map → index.js-CzPOZLjV.js.map} +1 -1
  209. package/focus-app/server/chunks/{manifest.js-CxrShg-z.js → manifest.js-E-BEcOes.js} +3 -3
  210. package/focus-app/server/chunks/{manifest.js-CxrShg-z.js.map → manifest.js-E-BEcOes.js.map} +1 -1
  211. package/focus-app/server/chunks/nodes/{1.js-O2SZgyXK.js → 1.js-BJ_PpMI-.js} +2 -2
  212. package/focus-app/server/chunks/nodes/{1.js-O2SZgyXK.js.map → 1.js-BJ_PpMI-.js.map} +1 -1
  213. package/focus-kit/dossier.evidence.template.json +206 -0
  214. package/focus-kit/dossier.schema.json +193 -0
  215. package/focus-kit/dossier.template.json +39 -0
  216. package/focus-kit/dossier.v2.schema.json +925 -0
  217. package/focus-kit/ecosystem.json +853 -0
  218. package/focus-kit/renderer-manifest.json +48 -0
  219. package/focus-kit/renderer.html +278 -0
  220. package/focus-kit/validator.mjs +1128 -0
  221. package/hooks/deny-manual-h2a-cli.mjs +38 -0
  222. package/hooks/hooks.json +17 -0
  223. package/hooks/vibe-post-agent.mjs +29 -0
  224. package/hooks/vibe-pre-tool.mjs +40 -0
  225. package/hooks/workspace-scope-grant.mjs +22 -0
  226. package/hooks/workspace-scope-guard.mjs +277 -0
  227. package/hooks/workspace-scope-shell.mjs +564 -0
  228. package/hooks/workspace-scope-state.mjs +71 -0
  229. package/hooks/workspace-scope.opt-in.json +17 -0
  230. package/package.json +24 -8
  231. package/scripts/qualification-budget.mjs +56 -0
  232. package/scripts/qualification-cleanup.mjs +15 -0
  233. package/scripts/qualification-oracles.mjs +44 -0
  234. package/scripts/qualification-patch.mjs +21 -0
  235. package/scripts/qualification-poll-hosts.mjs +19 -0
  236. package/scripts/qualification-probe.mjs +63 -0
  237. package/scripts/qualification-rpc.mjs +59 -0
  238. package/scripts/qualification-vibe.mjs +159 -0
  239. package/scripts/qualify-host.mjs +143 -0
  240. package/skills/h2a/SKILL.md +25 -2
  241. package/skills/h2a-run/SKILL.md +20 -1
  242. package/skills/harness/SKILL.md +19 -0
  243. package/skills/harness/track-report/SKILL.md +78 -5
  244. package/skills/harness/using-harness/SKILL.md +19 -0
  245. package/focus-app/client/_app/immutable/chunks/unQroC_0.js.br +0 -0
  246. package/focus-app/client/_app/immutable/chunks/unQroC_0.js.gz +0 -0
  247. package/focus-app/client/_app/immutable/entry/app.75Uzo4oj.js.br +0 -0
  248. package/focus-app/client/_app/immutable/entry/app.75Uzo4oj.js.gz +0 -0
  249. package/focus-app/client/_app/immutable/entry/start.BmwiFFoe.js +0 -1
  250. package/focus-app/client/_app/immutable/entry/start.BmwiFFoe.js.br +0 -2
  251. package/focus-app/client/_app/immutable/entry/start.BmwiFFoe.js.gz +0 -0
  252. package/focus-app/client/_app/immutable/nodes/1.hqfmE-jM.js.br +0 -3
  253. package/focus-app/client/_app/immutable/nodes/1.hqfmE-jM.js.gz +0 -0
@@ -0,0 +1,278 @@
1
+ <!doctype html><html lang="fr"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:; font-src data:; connect-src 'none'; base-uri 'none'; form-action 'none'"><title><!--FOCUS_TITLE--></title><style>.st-badge.svelte-1b366fo{display:inline-flex;align-items:center;border-radius:var(--st-component-badge-radius, var(--st-radius-pill, 999px));font-size:var(--st-component-badge-fontSize, .75rem);font-weight:var(--st-component-badge-fontWeight, 650);letter-spacing:var(--st-component-badge-letterSpacing, normal);line-height:var(--st-component-badge-lineHeight, 1);min-height:var(--st-component-badge-minHeight, 0);padding:var(--st-component-badge-paddingBlock, .25rem) var(--st-component-badge-paddingInline, .5rem);text-transform:var(--st-component-badge-textTransform, none)}.st-badge--circle.svelte-1b366fo{border-radius:var(--st-component-badge-circle-radius, 50%);box-sizing:border-box;font-variant-numeric:tabular-nums;justify-content:center;min-width:var(--st-component-badge-circle-size, 1.25rem);min-height:var(--st-component-badge-circle-size, 1.25rem);padding:var(--st-component-badge-circle-padding, .125rem);text-align:center}.st-badge--sm.svelte-1b366fo{font-size:var(--st-component-badge-sm-fontSize, .6875rem)}.st-badge--neutral.svelte-1b366fo{background:var(--st-semantic-surface-subtle);color:var(--st-semantic-text-secondary)}.st-badge--success.svelte-1b366fo{background:color-mix(in srgb,var(--st-semantic-feedback-success) 14%,white);color:var(--st-semantic-feedback-success)}.st-badge--warning.svelte-1b366fo{background:color-mix(in srgb,var(--st-semantic-feedback-warning) 14%,white);color:var(--st-semantic-feedback-warning)}.st-badge--error.svelte-1b366fo{background:color-mix(in srgb,var(--st-semantic-feedback-error) 14%,white);color:var(--st-semantic-feedback-error)}.st-badge--info.svelte-1b366fo{background:var( --st-component-badge-infoBackground, color-mix(in srgb, var(--st-semantic-feedback-info) 14%, white) );color:var(--st-component-badge-infoText, var(--st-semantic-feedback-info))}.st-button.svelte-1xn14gj{border-width:var(--st-component-button-anatomy-shape-borderWidth, 1px);border-style:var(--st-component-button-anatomy-shape-borderStyle, solid);border-color:transparent;border-radius:var(--st-component-button-anatomy-shape-radius, .375rem);cursor:var(--st-cursor-interactive, pointer);display:inline-flex;align-items:center;justify-content:center;gap:var(--st-component-button-anatomy-icon-gap, var(--st-spacing-2, .5rem));font-family:var(--st-component-button-anatomy-typography-family, inherit);font-weight:var(--st-component-button-anatomy-typography-weight, 600);line-height:var(--st-component-button-anatomy-typography-lineHeight, 1.2);letter-spacing:var(--st-component-button-anatomy-typography-letterSpacing, 0);text-transform:var(--st-component-button-anatomy-typography-textTransform, none);transition:background var(--st-motion-fast, .12s) var(--st-motion-easing, ease),border-color var(--st-motion-fast, .12s) var(--st-motion-easing, ease),color var(--st-motion-fast, .12s) var(--st-motion-easing, ease),box-shadow var(--st-motion-fast, .12s) var(--st-motion-easing, ease)}.st-button--sm.svelte-1xn14gj{min-height:var(--st-component-button-anatomy-density-sm-controlHeight, 2rem);min-width:var(--st-component-button-anatomy-density-sm-minWidth, 2rem);padding:var(--st-component-button-anatomy-density-sm-paddingBlock, 0) var(--st-component-button-anatomy-density-sm-paddingInlineEnd, var(--st-component-button-anatomy-density-sm-paddingInline, .75rem)) var(--st-component-button-anatomy-density-sm-paddingBlock, 0) var(--st-component-button-anatomy-density-sm-paddingInline, .75rem);font-size:var(--st-component-button-anatomy-density-sm-fontSize, .875rem)}.st-button--md.svelte-1xn14gj{min-height:var(--st-component-button-anatomy-density-md-controlHeight, 2.5rem);min-width:var(--st-component-button-anatomy-density-md-minWidth, 2.5rem);padding:var(--st-component-button-anatomy-density-md-paddingBlock, 0) var(--st-component-button-anatomy-density-md-paddingInlineEnd, var(--st-component-button-anatomy-density-md-paddingInline, 1rem)) var(--st-component-button-anatomy-density-md-paddingBlock, 0) var(--st-component-button-anatomy-density-md-paddingInline, 1rem);font-size:var(--st-component-button-anatomy-density-md-fontSize, var(--st-component-button-anatomy-typography-size, .9375rem))}.st-button--lg.svelte-1xn14gj{min-height:var(--st-component-button-anatomy-density-lg-controlHeight, 3rem);min-width:var(--st-component-button-anatomy-density-lg-minWidth, 3rem);padding:var(--st-component-button-anatomy-density-lg-paddingBlock, 0) var(--st-component-button-anatomy-density-lg-paddingInlineEnd, var(--st-component-button-anatomy-density-lg-paddingInline, 1.25rem)) var(--st-component-button-anatomy-density-lg-paddingBlock, 0) var(--st-component-button-anatomy-density-lg-paddingInline, 1.25rem);font-size:var(--st-component-button-anatomy-density-lg-fontSize, 1rem)}.st-button--primary.svelte-1xn14gj{background:var(--st-component-button-primaryBackground, var(--st-semantic-action-primary));color:var(--st-component-button-primaryText, var(--st-semantic-action-primaryText))}.st-button--secondary.svelte-1xn14gj{background:var(--st-component-button-secondaryBackground, var(--st-semantic-action-secondary));color:var(--st-component-button-secondaryText, var(--st-semantic-action-secondaryText));border-color:var(--st-component-button-secondaryBorder, var(--st-semantic-border-subtle))}.st-button--primary.svelte-1xn14gj:not(:disabled):hover{background:var(--st-component-button-anatomy-states-hover-bg, var(--st-semantic-action-primary))}.st-button--secondary.svelte-1xn14gj:not(:disabled):hover{background:var(--st-component-button-secondaryHoverBackground, var(--st-semantic-action-secondaryHover, var(--st-semantic-action-secondary)))}.st-button--ghost.svelte-1xn14gj{background:transparent;color:var(--st-semantic-text-link)}.st-button--danger.svelte-1xn14gj{background:var(--st-semantic-action-danger);color:var(--st-semantic-text-inverse)}.st-button.svelte-1xn14gj:disabled{cursor:var(--st-cursor-disabled, not-allowed);opacity:var(--st-component-button-anatomy-states-disabled-opacity, .55)}.st-button.svelte-1xn14gj:focus-visible{outline:var(--st-component-button-anatomy-focus-outline, 2px solid var(--st-semantic-border-interactive));outline-offset:var(--st-component-button-anatomy-focus-offset, 2px);box-shadow:var(--st-component-button-anatomy-focus-boxShadow, none)}.st-card.svelte-ee68m1{background:var(--st-component-card-background, var(--st-semantic-surface-raised));border-width:var(--st-component-card-anatomy-shape-borderWidth, 1px);border-style:var(--st-component-card-anatomy-shape-borderStyle, solid);border-color:var(--st-component-card-border, var(--st-semantic-border-subtle));border-radius:var(--st-component-card-anatomy-shape-radius, .5rem);box-shadow:var(--st-component-card-shadow, 0 1px 2px rgb(15 23 42 / .08));color:var(--st-semantic-text-primary);font-size:var(--st-component-card-anatomy-typography-size, inherit);line-height:var(--st-component-card-anatomy-typography-lineHeight, normal);letter-spacing:var(--st-component-card-anatomy-typography-letterSpacing, normal);padding:var(--st-spacing-4, 1rem)}.st-card--interactive.svelte-ee68m1{cursor:var(--st-cursor-interactive, pointer);transition:background-color var(--st-motion-normal, .18s) var(--st-motion-easing, ease),box-shadow var(--st-motion-normal, .18s) var(--st-motion-easing, ease),transform var(--st-motion-normal, .18s) var(--st-motion-easing, ease)}.st-card--interactive.svelte-ee68m1:hover{background:var(--st-component-card-anatomy-states-hover-bg, var(--st-component-card-background, var(--st-semantic-surface-raised)));box-shadow:var(--st-shadow-medium, 0 8px 24px rgb(15 23 42 / .12));transform:var(--st-component-card-anatomy-states-hover-transform, translateY(-1px))}.st-container.svelte-129fa14{box-sizing:border-box;inline-size:100%;margin-inline:auto}.st-container--sm.svelte-129fa14{max-inline-size:var(--st-container-sm, 40rem)}.st-container--md.svelte-129fa14{max-inline-size:var(--st-container-md, 48rem)}.st-container--lg.svelte-129fa14{max-inline-size:var(--st-container-lg, 64rem)}.st-container--xl.svelte-129fa14{max-inline-size:var(--st-container-xl, 80rem)}.st-container--full.svelte-129fa14{max-inline-size:none}.st-container--padded.svelte-129fa14{padding-inline:var(--st-spacing-4, 1rem)}.transparent.svelte-qyfwwc{background:transparent}.a11y-hidden.svelte-i52n8g{display:none}.a11y-live-msg.svelte-i52n8g{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0px,0px,0px,0px);clip-path:inset(100%)}.svelte-flow__selection.svelte-vt0ypg{position:absolute;top:0;left:0}.svelte-flow__selection-wrapper.svelte-1n4hcy8{position:absolute;top:0;left:0;z-index:2000;pointer-events:all}.svelte-flow__selection-wrapper.svelte-1n4hcy8:focus,.svelte-flow__selection-wrapper.svelte-1n4hcy8:focus-visible{outline:none}.svelte-flow.svelte-1ca19db{width:100%;height:100%;overflow:hidden;position:relative;z-index:0}.svelte-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.svelte-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #555;--xy-background-pattern-lines-color-default: #333;--xy-background-pattern-cross-color-default: #333;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.svelte-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.svelte-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.svelte-flow__pane{z-index:1;touch-action:none}.svelte-flow__pane.draggable{cursor:grab}.svelte-flow__pane.dragging{cursor:grabbing}.svelte-flow__pane.selection{cursor:pointer}.svelte-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.svelte-flow__renderer{z-index:4}.svelte-flow__selection{z-index:6}.svelte-flow__nodesselection-rect:focus,.svelte-flow__nodesselection-rect:focus-visible{outline:none}.svelte-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.svelte-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.svelte-flow .svelte-flow__edges{position:absolute}.svelte-flow .svelte-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.svelte-flow__edge{pointer-events:visibleStroke}.svelte-flow__edge.selectable{cursor:pointer}.svelte-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.svelte-flow__edge.animated path.svelte-flow__edge-interaction{stroke-dasharray:none;animation:none}.svelte-flow__edge.inactive{pointer-events:none}.svelte-flow__edge.selected,.svelte-flow__edge:focus,.svelte-flow__edge:focus-visible{outline:none}.svelte-flow__edge.selected .svelte-flow__edge-path,.svelte-flow__edge.selectable:focus .svelte-flow__edge-path,.svelte-flow__edge.selectable:focus-visible .svelte-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.svelte-flow__edge-textwrapper{pointer-events:all}.svelte-flow__edge .svelte-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.svelte-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.svelte-flow__connection{pointer-events:none}.svelte-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.svelte-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.svelte-flow__nodes{pointer-events:none;transform-origin:0 0}.svelte-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.svelte-flow__node.selectable{cursor:pointer}.svelte-flow__node.draggable{cursor:grab;pointer-events:all}.svelte-flow__node.draggable.dragging{cursor:grabbing}.svelte-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.svelte-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.svelte-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.svelte-flow__handle.connectingfrom{pointer-events:all}.svelte-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.svelte-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.svelte-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.svelte-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.svelte-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.svelte-flow__edgeupdater{cursor:move;pointer-events:all}.svelte-flow__pane.selection .svelte-flow__panel{pointer-events:none}.svelte-flow__panel{position:absolute;z-index:5;margin:15px}.svelte-flow__panel.top{top:0}.svelte-flow__panel.bottom{bottom:0}.svelte-flow__panel.top.center,.svelte-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.svelte-flow__panel.left{left:0}.svelte-flow__panel.right{right:0}.svelte-flow__panel.left.center,.svelte-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.svelte-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.svelte-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.svelte-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.svelte-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.svelte-flow__minimap-svg{display:block}.svelte-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.svelte-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.svelte-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.svelte-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.svelte-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.svelte-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.svelte-flow__controls.horizontal{flex-direction:row}.svelte-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.svelte-flow__edge.updating .svelte-flow__edge-path{stroke:#777}.svelte-flow__edge-text{font-size:10px}.svelte-flow__node.selectable:focus,.svelte-flow__node.selectable:focus-visible{outline:none}.svelte-flow__node-input,.svelte-flow__node-default,.svelte-flow__node-output,.svelte-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.svelte-flow__node-input.selectable:hover,.svelte-flow__node-default.selectable:hover,.svelte-flow__node-output.selectable:hover,.svelte-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.svelte-flow__node-input.selectable.selected,.svelte-flow__node-input.selectable:focus,.svelte-flow__node-input.selectable:focus-visible,.svelte-flow__node-default.selectable.selected,.svelte-flow__node-default.selectable:focus,.svelte-flow__node-default.selectable:focus-visible,.svelte-flow__node-output.selectable.selected,.svelte-flow__node-output.selectable:focus,.svelte-flow__node-output.selectable:focus-visible,.svelte-flow__node-group.selectable.selected,.svelte-flow__node-group.selectable:focus,.svelte-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.svelte-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.svelte-flow__nodesselection-rect,.svelte-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.svelte-flow__nodesselection-rect:focus,.svelte-flow__nodesselection-rect:focus-visible,.svelte-flow__selection:focus,.svelte-flow__selection:focus-visible{outline:none}.svelte-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.svelte-flow__controls-button:disabled{pointer-events:none}.svelte-flow__controls-button:disabled svg{fill-opacity:.4}.svelte-flow__controls-button:last-child{border-bottom:none}.svelte-flow__controls.horizontal .svelte-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.svelte-flow__controls.horizontal .svelte-flow__controls-button:last-child{border-right:none}.svelte-flow__resize-control{position:absolute}.svelte-flow__resize-control.left,.svelte-flow__resize-control.right{cursor:ew-resize}.svelte-flow__resize-control.top,.svelte-flow__resize-control.bottom{cursor:ns-resize}.svelte-flow__resize-control.top.left,.svelte-flow__resize-control.bottom.right{cursor:nwse-resize}.svelte-flow__resize-control.bottom.left,.svelte-flow__resize-control.top.right{cursor:nesw-resize}.svelte-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.svelte-flow__resize-control.handle.left{left:0;top:50%}.svelte-flow__resize-control.handle.right{left:100%;top:50%}.svelte-flow__resize-control.handle.top{left:50%;top:0}.svelte-flow__resize-control.handle.bottom{left:50%;top:100%}.svelte-flow__resize-control.handle.top.left,.svelte-flow__resize-control.handle.bottom.left{left:0}.svelte-flow__resize-control.handle.top.right,.svelte-flow__resize-control.handle.bottom.right{left:100%}.svelte-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.svelte-flow__resize-control.line.left,.svelte-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.svelte-flow__resize-control.line.left{left:0;border-left-width:1px}.svelte-flow__resize-control.line.right{left:100%;border-right-width:1px}.svelte-flow__resize-control.line.top,.svelte-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.svelte-flow__resize-control.line.top{top:0;border-top-width:1px}.svelte-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.svelte-flow__edge-label{text-align:center;position:absolute;padding:2px;font-size:10px;color:var(--xy-edge-label-color, var(--xy-edge-label-color-default));background:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.svelte-flow__container{-webkit-user-select:none;-moz-user-select:none;user-select:none}*{box-sizing:border-box}body{margin:0;font:16px/1.5 system-ui,sans-serif}.focus-page{min-height:100vh;background:var(--st-semantic-surface-default);color:var(--st-semantic-text-primary);color-scheme:light}.focus-page[data-mode=dark]{color-scheme:dark}.title-band{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.5rem 1rem;border-bottom:1px solid var(--st-semantic-border-subtle)}h1{margin:0;font-size:1rem;font-weight:600;overflow-wrap:anywhere}h2{font-size:1.125rem;margin:.5rem 0}h3{font-size:1rem}main{max-width:72rem;margin:auto;padding:1rem 0 2rem}p,blockquote{margin:.5rem 0}blockquote{border-left:1px solid var(--st-semantic-border-strong);padding-left:1rem}.reading-meta{margin-bottom:1rem}.dossier-section{margin:1.25rem 0;overflow-wrap:anywhere}.prose{white-space:pre-wrap}.options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:.75rem}.option-card{appearance:none;padding:0;text-align:left;color:inherit;background:transparent;border:0;border-radius:.5rem;cursor:pointer;font:inherit}.option-card .st-card{height:100%;box-shadow:none;border-width:1px}.option-card.selected .st-card{border-color:var(--st-semantic-border-interactive);background:var(--st-semantic-surface-subtle)}.option-card:focus-visible,summary:focus-visible{outline:1px solid var(--st-semantic-border-interactive);outline-offset:3px}.option-card strong{display:block;margin-bottom:.5rem}.muted,.canvas-hint,footer{color:var(--st-semantic-text-secondary);font-size:.875rem}figure{margin:0}figcaption{font-weight:600}.canvas{height:480px;width:100%;border:1px solid var(--st-semantic-border-subtle);border-radius:.5rem;overflow:hidden}.ecosystem-node{width:240px;min-height:100px;box-shadow:none!important;border-width:1px!important}.ecosystem-node p{font-size:14px}.ecosystem-container{width:100%;height:100%;box-sizing:border-box;box-shadow:none!important;border-width:1px!important;background:var(--st-semantic-surface-default)!important}.svelte-flow__edge-path{stroke-width:1px!important}.svelte-flow__controls-button{min-width:40px;min-height:40px;border-width:0 0 1px}details{margin-top:.75rem}summary{cursor:pointer}dt{font-weight:600}dd{margin-left:1rem}footer{border-top:1px solid var(--st-semantic-border-subtle);padding-top:1rem}.evidence-index{border-top:1px solid var(--st-semantic-border-subtle);margin-top:1rem;overflow-wrap:anywhere}.evidence-index button,.citation-link{font:inherit;color:inherit;background:var(--st-semantic-surface-subtle);border:1px solid var(--st-semantic-border-subtle);border-radius:.25rem;padding:.4rem .6rem;min-height:44px;cursor:pointer}.evidence-index button:focus-visible,.citation-link:focus-visible,.evidence-index input:focus-visible{outline:2px solid var(--st-semantic-border-interactive);outline-offset:2px}.source-viewer{margin:1rem 0;padding:.75rem;border:1px solid var(--st-semantic-border-strong)}.evidence-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:.5rem 0}.source-viewer label{display:block;margin:.5rem 0}.source-viewer input{display:block;max-width:100%;font:inherit}.source-viewer img{max-width:100%;height:auto}.source-scroll{height:384px;overflow:auto;border:1px solid var(--st-semantic-border-subtle)}.source-line{font:14px/24px monospace;height:24px;white-space:pre;min-width:max-content}.source-line.cited{background:var(--st-semantic-surface-subtle);border-left:3px solid var(--st-semantic-border-interactive)}.line-number{display:inline-block;min-width:5em;color:var(--st-semantic-text-secondary)}.evidence-table,.evidence-index pre{overflow:auto;max-width:100%}@media(max-width:600px){.canvas{height:430px}.title-band{align-items:flex-start}main{padding-top:.75rem}}
2
+ </style></head><body><!--FOCUS_PAYLOAD--><div id="app"></div><noscript>Activez JavaScript pour lire le dossier interactif.</noscript><script type="text/plain" data-focus-licenses>@sentropic/design-system-svelte@0.34.69
3
+ License: see package metadata
4
+
5
+ @sentropic/design-system-themes@0.11.0
6
+ License: see package metadata
7
+
8
+ @sentropic/design-system-tokens@0.11.0
9
+ License: see package metadata
10
+
11
+ @svelte-put/shortcut@4.2.0
12
+ MIT License
13
+
14
+ Copyright (c) 2023-2024 Quang Phan
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining a copy
17
+ of this software and associated documentation files (the "Software"), to deal
18
+ in the Software without restriction, including without limitation the rights
19
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20
+ copies of the Software, and to permit persons to whom the Software is
21
+ furnished to do so, subject to the following conditions:
22
+
23
+ The above copyright notice and this permission notice shall be included in all
24
+ copies or substantial portions of the Software.
25
+
26
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32
+ SOFTWARE.
33
+
34
+
35
+ @xyflow/svelte@1.6.5
36
+ MIT License
37
+
38
+ Copyright (c) 2019-2025 webkid GmbH
39
+
40
+ Permission is hereby granted, free of charge, to any person obtaining a copy
41
+ of this software and associated documentation files (the "Software"), to deal
42
+ in the Software without restriction, including without limitation the rights
43
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
+ copies of the Software, and to permit persons to whom the Software is
45
+ furnished to do so, subject to the following conditions:
46
+
47
+ The above copyright notice and this permission notice shall be included in all
48
+ copies or substantial portions of the Software.
49
+
50
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
56
+ SOFTWARE.
57
+
58
+
59
+ @xyflow/system@0.0.81
60
+ MIT License
61
+
62
+ Copyright (c) 2019-2025 webkid GmbH
63
+
64
+ Permission is hereby granted, free of charge, to any person obtaining a copy
65
+ of this software and associated documentation files (the "Software"), to deal
66
+ in the Software without restriction, including without limitation the rights
67
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
68
+ copies of the Software, and to permit persons to whom the Software is
69
+ furnished to do so, subject to the following conditions:
70
+
71
+ The above copyright notice and this permission notice shall be included in all
72
+ copies or substantial portions of the Software.
73
+
74
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
75
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
76
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
77
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
78
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
79
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
80
+ SOFTWARE.
81
+
82
+
83
+ clsx@2.1.1
84
+ MIT License
85
+
86
+ Copyright (c) Luke Edwards &lt;luke.edwards05@gmail.com> (lukeed.com)
87
+
88
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
89
+
90
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
91
+
92
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
93
+
94
+
95
+ d3-color@3.1.0
96
+ Copyright 2010-2022 Mike Bostock
97
+
98
+ Permission to use, copy, modify, and/or distribute this software for any purpose
99
+ with or without fee is hereby granted, provided that the above copyright notice
100
+ and this permission notice appear in all copies.
101
+
102
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
103
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
104
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
105
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
106
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
107
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
108
+ THIS SOFTWARE.
109
+
110
+
111
+ d3-dispatch@3.0.1
112
+ Copyright 2010-2021 Mike Bostock
113
+
114
+ Permission to use, copy, modify, and/or distribute this software for any purpose
115
+ with or without fee is hereby granted, provided that the above copyright notice
116
+ and this permission notice appear in all copies.
117
+
118
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
119
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
120
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
121
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
122
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
123
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
124
+ THIS SOFTWARE.
125
+
126
+
127
+ d3-drag@3.0.0
128
+ Copyright 2010-2021 Mike Bostock
129
+
130
+ Permission to use, copy, modify, and/or distribute this software for any purpose
131
+ with or without fee is hereby granted, provided that the above copyright notice
132
+ and this permission notice appear in all copies.
133
+
134
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
135
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
136
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
137
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
138
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
139
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
140
+ THIS SOFTWARE.
141
+
142
+
143
+ d3-ease@3.0.1
144
+ Copyright 2010-2021 Mike Bostock
145
+ Copyright 2001 Robert Penner
146
+ All rights reserved.
147
+
148
+ Redistribution and use in source and binary forms, with or without modification,
149
+ are permitted provided that the following conditions are met:
150
+
151
+ * Redistributions of source code must retain the above copyright notice, this
152
+ list of conditions and the following disclaimer.
153
+
154
+ * Redistributions in binary form must reproduce the above copyright notice,
155
+ this list of conditions and the following disclaimer in the documentation
156
+ and/or other materials provided with the distribution.
157
+
158
+ * Neither the name of the author nor the names of contributors may be used to
159
+ endorse or promote products derived from this software without specific prior
160
+ written permission.
161
+
162
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
163
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
164
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
165
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
166
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
167
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
168
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
169
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
170
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
171
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
172
+
173
+
174
+ d3-interpolate@3.0.1
175
+ Copyright 2010-2021 Mike Bostock
176
+
177
+ Permission to use, copy, modify, and/or distribute this software for any purpose
178
+ with or without fee is hereby granted, provided that the above copyright notice
179
+ and this permission notice appear in all copies.
180
+
181
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
182
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
183
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
184
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
185
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
186
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
187
+ THIS SOFTWARE.
188
+
189
+
190
+ d3-selection@3.0.0
191
+ Copyright 2010-2021 Mike Bostock
192
+
193
+ Permission to use, copy, modify, and/or distribute this software for any purpose
194
+ with or without fee is hereby granted, provided that the above copyright notice
195
+ and this permission notice appear in all copies.
196
+
197
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
198
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
199
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
200
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
201
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
202
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
203
+ THIS SOFTWARE.
204
+
205
+
206
+ d3-timer@3.0.1
207
+ Copyright 2010-2021 Mike Bostock
208
+
209
+ Permission to use, copy, modify, and/or distribute this software for any purpose
210
+ with or without fee is hereby granted, provided that the above copyright notice
211
+ and this permission notice appear in all copies.
212
+
213
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
214
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
215
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
216
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
217
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
218
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
219
+ THIS SOFTWARE.
220
+
221
+
222
+ d3-transition@3.0.1
223
+ Copyright 2010-2021 Mike Bostock
224
+
225
+ Permission to use, copy, modify, and/or distribute this software for any purpose
226
+ with or without fee is hereby granted, provided that the above copyright notice
227
+ and this permission notice appear in all copies.
228
+
229
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
230
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
231
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
232
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
233
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
234
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
235
+ THIS SOFTWARE.
236
+
237
+
238
+ d3-zoom@3.0.0
239
+ Copyright 2010-2021 Mike Bostock
240
+
241
+ Permission to use, copy, modify, and/or distribute this software for any purpose
242
+ with or without fee is hereby granted, provided that the above copyright notice
243
+ and this permission notice appear in all copies.
244
+
245
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
246
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
247
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
248
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
249
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
250
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
251
+ THIS SOFTWARE.
252
+
253
+
254
+ esm-env@1.2.2
255
+ Copyright 2022 Benjamin McCann
256
+
257
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
258
+
259
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
260
+
261
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
262
+
263
+
264
+ svelte@5.56.4
265
+ Copyright (c) 2016-2025 [Svelte Contributors](https://github.com/sveltejs/svelte/graphs/contributors)
266
+
267
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
268
+
269
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
270
+
271
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
272
+ </script><script>(function(){"use strict";var Kr=Array.isArray,lu=Array.prototype.indexOf,Zr=Array.prototype.includes,Yr=Array.from,cu=Object.defineProperty,an=Object.getOwnPropertyDescriptor,Ms=Object.getOwnPropertyDescriptors,Is=Object.prototype,uu=Array.prototype,Xr=Object.getPrototypeOf,Ns=Object.isExtensible;function fr(e){return typeof e=="function"}const ct=()=>{};function du(e){return e()}function ei(e){for(var t=0;t<e.length;t++)e[t]()}function Ps(){var e,t,n=new Promise((r,o)=>{e=r,t=o});return{promise:n,resolve:e,reject:t}}function Fe(e,t,n=!1){return e===void 0?n?t():t:e}function hr(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}function fu(e,t){var n={};for(var r in e)t.includes(r)||(n[r]=e[r]);for(var o of Object.getOwnPropertySymbols(e))Object.propertyIsEnumerable.call(e,o)&&!t.includes(o)&&(n[o]=e[o]);return n}const He=2,Rn=4,gr=8,ti=1<<24,mt=16,pt=32,Zt=64,ni=128,ut=512,Oe=1024,Be=2048,At=4096,Ke=8192,tt=16384,Dn=32768,ri=1<<25,Yt=65536,jr=1<<17,zs=1<<18,pn=1<<19,Os=1<<20,Mt=1<<25,yn=65536,Gr=1<<21,Hn=1<<22,ln=1<<23,It=Symbol("$state"),Rs=Symbol("legacy props"),hu=Symbol(""),Ds=Symbol("attributes"),oi=Symbol("class"),ii=Symbol("style"),si=Symbol("text"),Ur=Symbol("form reset"),Qr=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ai=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function li(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function gu(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function vu(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function mu(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function pu(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function yu(e){throw new Error("https://svelte.dev/e/effect_orphan")}function bu(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function _u(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function wu(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function xu(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ku(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Su(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Eu=1,Tu=2,Hs=4,Cu=8,Au=16,Mu=1,Iu=2,Nu=4,Pu=8,zu=16,Bs=1,Ou=2,Pe=Symbol("uninitialized"),Ls="http://www.w3.org/1999/xhtml",qs="http://www.w3.org/2000/svg",Ru="http://www.w3.org/1998/Math/MathML",Du="@attach";function Hu(){console.warn("https://svelte.dev/e/derived_inert")}function Bu(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Lu(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Vs(e){return e===this.v}function Ws(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Fs(e){return!Ws(e,this.v)}let Bn=!1,Hb=!1;function qu(){Bn=!0}const Vu=[];function Ks(e,t=!1,n=!1){return Jr(e,new Map,"",Vu,null,n)}function Jr(e,t,n,r,o=null,i=!1){if(typeof e=="object"&&e!==null){var s=t.get(e);if(s!==void 0)return s;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(Kr(e)){var a=Array(e.length);t.set(e,a),o!==null&&t.set(o,a);for(var l=0;l<e.length;l+=1){var u=e[l];l in e&&(a[l]=Jr(u,t,n,r,null,i))}return a}if(Xr(e)===Is){a={},t.set(e,a),o!==null&&t.set(o,a);for(var d of Object.keys(e))a[d]=Jr(e[d],t,n,r,null,i);return a}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!i)return Jr(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}let Se=null;function Ln(e){Se=e}function ci(e){return ui().get(e)}function Zs(e,t){return ui().set(e,t),t}function Wu(e){return ui().has(e)}function se(e,t=!1,n){Se={p:Se,i:!1,c:null,e:null,s:e,x:null,r:ue,l:Bn&&!t?{s:null,u:null,$:[]}:null}}function ae(e){var t=Se,n=t.e;if(n!==null){t.e=null;for(var r of n)va(r)}return e!==void 0&&(t.x=e),t.i=!0,Se=t.p,e??{}}function qn(){return!Bn||Se!==null&&Se.l===null}function ui(e){return Se===null&&li(),Se.c??=new Map(Fu(Se)||void 0)}function Fu(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let bn=[];function Ys(){var e=bn;bn=[],ei(e)}function Xt(e){if(bn.length===0&&!mr){var t=bn;queueMicrotask(()=>{t===bn&&Ys()})}bn.push(e)}function Ku(){for(;bn.length>0;)Ys()}function Xs(e){var t=ue;if(t===null)return ve.f|=ln,e;if((t.f&Dn)===0&&(t.f&Rn)===0)throw e;cn(e,t)}function cn(e,t){if(!(t!==null&&(t.f&tt)!==0)){for(;t!==null;){if((t.f&ni)!==0){if((t.f&Dn)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}}const Zu=-7169;function Me(e,t){e.f=e.f&Zu|t}function di(e){(e.f&ut)!==0||e.deps===null?Me(e,Oe):Me(e,At)}function js(e){if(e!==null)for(const t of e)(t.f&He)===0||(t.f&yn)===0||(t.f^=yn,js(t.deps))}function Gs(e,t,n){(e.f&Be)!==0?t.add(e):(e.f&At)!==0&&n.add(e),js(e.deps),Me(e,Oe)}let $r=!1;function Yu(e){var t=$r;try{return $r=!1,[e(),$r]}finally{$r=t}}function Us(e){let t=0,n=Ut(0),r;return()=>{wi()&&(c(n),io(()=>(t===0&&(r=Ue(()=>e(()=>nt(n)))),t+=1,()=>{Xt(()=>{t-=1,t===0&&(r?.(),r=void 0,nt(n))})})))}}var Xu=Yt|pn;function ju(e,t,n,r){new Gu(e,t,n,r)}class Gu{parent;is_pending=!1;transform_error;#e;#n=null;#t;#s;#r;#o=null;#i=null;#l=null;#a=null;#g=0;#c=0;#u=!1;#f=new Set;#m=new Set;#d=null;#y=Us(()=>(this.#d=Ut(this.#g),()=>{this.#d=null}));constructor(t,n,r,o){this.#e=t,this.#t=n,this.#s=i=>{var s=ue;s.b=this,s.f|=ni,r(i)},this.parent=ue.b,this.transform_error=o??this.parent?.transform_error??(i=>i),this.#r=un(()=>{this.#b()},Xu)}#p(){try{this.#o=Ze(()=>this.#s(this.#e))}catch(t){this.error(t)}}#w(t){const n=this.#t.failed;n&&(this.#l=Ze(()=>{n(this.#e,()=>t,()=>()=>{})}))}#x(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#i=Ze(()=>t(this.#e)),Xt(()=>{var n=this.#a=document.createDocumentFragment(),r=bt();n.append(r),this.#o=this.#_(()=>Ze(()=>this.#s(r))),this.#c===0&&(this.#e.before(n),this.#a=null,wn(this.#i,()=>{this.#i=null}),this.#h(fe))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#g=0,this.#o=Ze(()=>{this.#s(this.#e)}),this.#c>0){var t=this.#a=document.createDocumentFragment();ki(this.#o,t);const n=this.#t.pending;this.#i=Ze(()=>n(this.#e))}else this.#h(fe)}catch(n){this.error(n)}}#h(t){this.is_pending=!1,t.transfer_effects(this.#f,this.#m)}defer_effect(t){Gs(t,this.#f,this.#m)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#_(t){var n=ue,r=ve,o=Se;Pt(this.#r),ft(this.#r),Ln(this.#r.ctx);try{return jt.ensure(),t()}catch(i){return Xs(i),null}finally{Pt(n),ft(r),Ln(o)}}#v(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#v(t,n);return}this.#c+=t,this.#c===0&&(this.#h(n),this.#i&&wn(this.#i,()=>{this.#i=null}),this.#a&&(this.#e.before(this.#a),this.#a=null))}update_pending_count(t,n){this.#v(t,n),this.#g+=t,!(!this.#d||this.#u)&&(this.#u=!0,Xt(()=>{this.#u=!1,this.#d&&Kn(this.#d,this.#g)}))}get_effect_pending(){return this.#y(),c(this.#d)}error(t){if(!this.#t.onerror&&!this.#t.failed)throw t;fe?.is_fork?(this.#o&&fe.skip_effect(this.#o),this.#i&&fe.skip_effect(this.#i),this.#l&&fe.skip_effect(this.#l),fe.oncommit(()=>{this.#k(t)})):this.#k(t)}#k(t){this.#o&&(De(this.#o),this.#o=null),this.#i&&(De(this.#i),this.#i=null),this.#l&&(De(this.#l),this.#l=null);var n=this.#t.onerror;let r=this.#t.failed;var o=!1,i=!1;const s=()=>{if(o){Lu();return}o=!0,i&&Su(),this.#l!==null&&wn(this.#l,()=>{this.#l=null}),this.#_(()=>{this.#b()})},a=l=>{try{i=!0,n?.(l,s),i=!1}catch(u){cn(u,this.#r&&this.#r.parent)}r&&(this.#l=this.#_(()=>{try{return Ze(()=>{var u=ue;u.b=this,u.f|=ni,r(this.#e,()=>l,()=>s)})}catch(u){return cn(u,this.#r.parent),null}}))};Xt(()=>{var l;try{l=this.transform_error(t)}catch(u){cn(u,this.#r&&this.#r.parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,u=>cn(u,this.#r&&this.#r.parent)):a(l)})}}function Qs(e,t,n,r){const o=qn()?Vn:fi;var i=e.filter(g=>!g.settled),s=t.map(o);if(n.length===0&&i.length===0){r(s);return}var a=ue,l=Uu(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(g=>g.promise)):null;function d(g){if((a.f&tt)===0){l();try{r([...s,...g])}catch(v){cn(v,a)}eo()}}var h=Js();if(n.length===0){u.then(()=>d([])).finally(h);return}function f(){Promise.all(n.map(g=>Qu(g))).then(d).catch(g=>cn(g,a)).finally(h)}u?u.then(()=>{l(),f(),eo()}):f()}function Uu(){var e=ue,t=ve,n=Se,r=fe;return function(i=!0){Pt(e),ft(t),Ln(n),i&&(e.f&tt)===0&&(r?.activate(),r?.apply())}}function eo(e=!0){Pt(null),ft(null),Ln(null),e&&fe?.deactivate()}function Js(){var e=ue,t=e.b,n=fe,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Vn(e){var t=He|Be;return ue!==null&&(ue.f|=pn),{ctx:Se,deps:null,effects:null,equals:Vs,f:t,fn:e,reactions:null,rv:0,v:Pe,wv:0,parent:ue,ac:null}}const vr=Symbol("obsolete");function Qu(e,t,n){let r=ue;r===null&&gu();var o=void 0,i=Ut(Pe),s=!ve,a=new Set;return gd(()=>{var l=ue,u=Ps();o=u.promise;try{Promise.resolve(e()).then(u.resolve,g=>{g!==Qr&&u.reject(g)}).finally(eo)}catch(g){u.reject(g),eo()}var d=fe;if(s){if((l.f&Dn)!==0)var h=Js();if(r.b?.is_rendered())d.async_deriveds.get(l)?.reject(vr);else for(const g of a.values())g.reject(vr);a.add(u),d.async_deriveds.set(l,u)}const f=(g,v=void 0)=>{h?.(),a.delete(u),v!==vr&&(d.activate(),v?(i.f|=ln,Kn(i,v)):((i.f&ln)!==0&&(i.f^=ln),Kn(i,g)),d.deactivate())};u.promise.then(f,g=>f(null,g||"unknown"))}),oo(()=>{for(const l of a)l.reject(vr)}),new Promise(l=>{function u(d){function h(){d===o?l(i):u(o)}d.then(h,h)}u(o)})}function _(e){const t=Vn(e);return Ea(t),t}function fi(e){const t=Vn(e);return t.equals=Fs,t}function Ju(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)De(t[n])}}function hi(e){var t,n=ue,r=e.parent;if(!Qt&&r!==null&&e.v!==Pe&&(r.f&(tt|Ke))!==0)return Hu(),e.v;Pt(r);try{e.f&=~yn,Ju(e),t=Ia(e)}finally{Pt(n)}return t}function $s(e){var t=hi(e);if(!e.equals(t)&&(e.wv=Aa(),(!fe?.is_fork||e.deps===null)&&(fe!==null?(fe.capture(e,t,!0),vi?.capture(e,t,!0)):e.v=t,e.deps===null))){Me(e,Oe);return}Qt||(yt!==null?(wi()||fe?.is_fork)&&yt.set(e,t):di(e))}function $u(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Qr),t.fn!==null&&(t.teardown=ct),t.ac=null,_r(t,0),xi(t))}function ea(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Zn(t)}let gi=null,Wn=null,fe=null,vi=null,yt=null,mi=null,mr=!1,pi=!1,Fn=null,to=null;var ta=0,Bb=new Set;let ed=1;class jt{id=ed++;#e=!1;linked=!0;#n=null;#t=null;async_deriveds=new Map;current=new Map;previous=new Map;#s=new Set;#r=new Set;#o=0;#i=new Map;#l=null;#a=[];#g=[];#c=new Set;#u=new Set;#f=new Map;#m=new Set;is_fork=!1;#d=!1;constructor(){Wn===null?gi=Wn=this:(Wn.#t=this,this.#n=Wn),Wn=this}#y(){if(this.is_fork)return!0;for(const r of this.#i.keys()){for(var t=r,n=!1;t.parent!==null;){if(this.#f.has(t)){n=!0;break}t=t.parent}if(!n)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]}),this.#m.delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=this.#f.get(t);if(r){this.#f.delete(t);for(var o of r.d)Me(o,Be),n(o);for(o of r.m)Me(o,At),n(o)}this.#m.add(t)}#p(){this.#e=!0,ta++>1e3&&(this.#v(),nd());for(const l of this.#c)this.#u.delete(l),Me(l,Be),this.schedule(l);for(const l of this.#u)Me(l,At),this.schedule(l);const t=this.#a;this.#a=[],this.apply();var n=Fn=[],r=[],o=to=[];for(const l of t)try{this.#w(l,n,r)}catch(u){throw ia(l),this.#y()||this.discard(),u}if(fe=null,o.length>0){var i=jt.ensure();for(const l of o)i.schedule(l)}if(Fn=null,to=null,this.#y()){this.#h(r),this.#h(n);for(const[l,u]of this.#f)oa(l,u);o.length>0&&fe.#p();return}const s=this.#x();if(s){this.#h(r),this.#h(n),s.#b(this);return}this.#c.clear(),this.#u.clear();for(const l of this.#s)l(this);this.#s.clear(),vi=this,na(r),na(n),vi=null,this.#l?.resolve();var a=fe;if(this.#o===0&&(this.#a.length===0||a!==null)&&this.#v(),this.#a.length>0)if(a!==null){const l=a;l.#a.push(...this.#a.filter(u=>!l.#a.includes(u)))}else a=this;a!==null&&a.#p()}#w(t,n,r){t.f^=Oe;for(var o=t.first;o!==null;){var i=o.f,s=(i&(pt|Zt))!==0,a=s&&(i&Oe)!==0,l=a||(i&Ke)!==0||this.#f.has(o);if(!l&&o.fn!==null){s?o.f^=Oe:(i&Rn)!==0?n.push(o):br(o)&&((i&mt)!==0&&this.#u.add(o),Zn(o));var u=o.first;if(u!==null){o=u;continue}}for(;o!==null;){var d=o.next;if(d!==null){o=d;break}o=o.parent}}}#x(){for(var t=this.#n;t!==null;){if(!t.is_fork){for(const[n,[,r]]of this.current)if(t.current.has(n)&&!r)return t}t=t.#n}return null}#b(t){for(const[r,o]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,o);for(const[r,o]of t.async_deriveds){const i=this.async_deriveds.get(r);i&&o.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(t.#c,t.#u);const n=r=>{var o=r.reactions;if(o!==null)for(const a of o){var i=a.f;if((i&He)!==0)n(a);else{var s=a;i&(Hn|mt)&&!this.async_deriveds.has(s)&&(this.#u.delete(s),Me(s,Be),this.schedule(s))}}};for(const r of this.current.keys())n(r);this.oncommit(()=>t.discard()),t.#v(),fe=this,this.#p()}#h(t){for(var n=0;n<t.length;n+=1)Gs(t[n],this.#c,this.#u)}capture(t,n,r=!1){t.v!==Pe&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&ln)===0&&(this.current.set(t,[n,r]),yt?.set(t,n)),this.is_fork||(t.v=n)}activate(){fe=this}deactivate(){fe=null,yt=null}flush(){try{pi=!0,fe=this,this.#p()}finally{ta=0,mi=null,Fn=null,to=null,pi=!1,fe=null,yt=null,_n.clear()}}discard(){for(const t of this.#r)t(this);this.#r.clear();for(const t of this.async_deriveds.values())t.reject(vr);this.#v(),this.#l?.resolve()}register_created_effect(t){this.#g.push(t)}#_(){for(let h=gi;h!==null;h=h.#t){var t=h.id<this.id,n=[];for(const[f,[g,v]]of this.current){if(h.current.has(f)){var r=h.current.get(f)[0];if(t&&g!==r)h.current.set(f,[g,v]);else continue}n.push(f)}if(t)for(const[f,g]of this.async_deriveds){const v=h.async_deriveds.get(f);v&&g.promise.then(v.resolve).catch(v.reject)}var o=[...h.current.keys()].filter(f=>!h.current.get(f)[1]);if(!(!h.#e||o.length===0)){var i=o.filter(f=>!this.current.has(f));if(i.length===0)t&&h.discard();else if(n.length>0){if(t)for(const f of this.#m)h.unskip_effect(f,g=>{(g.f&(mt|Hn))!==0?h.schedule(g):h.#h([g])});h.activate();var s=new Set,a=new Map;for(var l of n)ra(l,i,s,a);a=new Map;var u=[...h.current].filter(([f,g])=>{const v=this.current.get(f);return v?v[0]!==g[0]||v[1]!==g[1]:!0}).map(([f])=>f);if(u.length>0)for(const f of this.#g)(f.f&(tt|Ke|jr))===0&&yi(f,u,a)&&((f.f&(Hn|mt))!==0?(Me(f,Be),h.schedule(f)):h.#c.add(f));if(h.#a.length>0&&!h.#d){h.apply();for(var d of h.#a)h.#w(d,[],[]);h.#a=[]}h.deactivate()}}}}increment(t,n){if(this.#o+=1,t){let r=this.#i.get(n)??0;this.#i.set(n,r+1)}}decrement(t,n){if(this.#o-=1,t){let r=this.#i.get(n)??0;r===1?this.#i.delete(n):this.#i.set(n,r-1)}this.#d||(this.#d=!0,Xt(()=>{this.#d=!1,this.linked&&this.flush()}))}transfer_effects(t,n){for(const r of t)this.#c.add(r);for(const r of n)this.#u.add(r);t.clear(),n.clear()}oncommit(t){this.#s.add(t)}ondiscard(t){this.#r.add(t)}settled(){return(this.#l??=Ps()).promise}static ensure(){if(fe===null){const t=fe=new jt;!pi&&!mr&&Xt(()=>{t.#e||t.flush()})}return fe}apply(){{yt=null;return}}schedule(t){if(mi=t,t.b?.is_pending&&(t.f&(Rn|gr|ti))!==0&&(t.f&Dn)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Fn!==null&&n===ue&&(ve===null||(ve.f&He)===0))return;if((r&(Zt|pt))!==0){if((r&Oe)===0)return;n.f^=Oe}}this.#a.push(n)}#v(){if(this.linked){var t=this.#n,n=this.#t;t===null?gi=n:t.#t=n,n===null?Wn=t:n.#n=t,this.linked=!1}}}function td(e){var t=mr;mr=!0;try{for(var n;;){if(Ku(),fe===null)return n;fe.flush()}}finally{mr=t}}function nd(){try{bu()}catch(e){cn(e,mi)}}let Gt=null;function na(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(tt|Ke))===0&&br(r)&&(Gt=new Set,Zn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&wa(r),Gt?.size>0)){_n.clear();for(const o of Gt){if((o.f&(tt|Ke))!==0)continue;const i=[o];let s=o.parent;for(;s!==null;)Gt.has(s)&&(Gt.delete(s),i.push(s)),s=s.parent;for(let a=i.length-1;a>=0;a--){const l=i[a];(l.f&(tt|Ke))===0&&Zn(l)}}Gt.clear()}}Gt=null}}function ra(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const o of e.reactions){const i=o.f;(i&He)!==0?ra(o,t,n,r):(i&(Hn|mt))!==0&&(i&Be)===0&&yi(o,t,r)&&(Me(o,Be),bi(o))}}function yi(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const o of e.deps){if(Zr.call(t,o))return!0;if((o.f&He)!==0&&yi(o,t,n))return n.set(o,!0),!0}return n.set(e,!1),!1}function bi(e){fe.schedule(e)}function oa(e,t){if(!((e.f&pt)!==0&&(e.f&Oe)!==0)){(e.f&Be)!==0?t.d.push(e):(e.f&At)!==0&&t.m.push(e),Me(e,Oe);for(var n=e.first;n!==null;)oa(n,t),n=n.next}}function ia(e){Me(e,Oe);for(var t=e.first;t!==null;)ia(t),t=t.next}let no=new Set;const _n=new Map;let sa=!1;function Ut(e,t){var n={f:0,v:e,reactions:null,equals:Vs,rv:0,wv:0};return n}function oe(e,t){const n=Ut(e);return Ea(n),n}function rd(e,t=!1,n=!0){const r=Ut(e);return t||(r.equals=Fs),Bn&&n&&Se!==null&&Se.l!==null&&(Se.l.s??=[]).push(r),r}function B(e,t,n=!1){ve!==null&&(!_t||(ve.f&jr)!==0)&&qn()&&(ve.f&(He|mt|Hn|jr))!==0&&(zt===null||!zt.has(e))&&ku();let r=n?Nt(t):t;return Kn(e,r,to)}function Kn(e,t,n=null){if(!e.equals(t)){_n.set(e,Qt?t:e.v);var r=jt.ensure();if(r.capture(e,t),(e.f&He)!==0){const o=e;(e.f&Be)!==0&&hi(o),yt===null&&di(o)}e.wv=Aa(),aa(e,Be,n),qn()&&ue!==null&&(ue.f&Oe)!==0&&(ue.f&(pt|Zt))===0&&(ht===null?md([e]):ht.push(e)),!r.is_fork&&no.size>0&&!sa&&od()}return t}function od(){sa=!1;for(const e of no){(e.f&Oe)!==0&&Me(e,At);let t;try{t=br(e)}catch{t=!0}t&&Zn(e)}no.clear()}function id(e,t=1){var n=c(e),r=t===1?n++:n--;return B(e,n),r}function nt(e){B(e,e.v+1)}function aa(e,t,n){var r=e.reactions;if(r!==null)for(var o=qn(),i=r.length,s=0;s<i;s++){var a=r[s],l=a.f;if(!(!o&&a===ue)){var u=(l&Be)===0;if(u&&Me(a,t),(l&jr)!==0)no.add(a);else if((l&He)!==0){var d=a;yt?.delete(d),(l&yn)===0&&(l&ut&&(ue===null||(ue.f&Gr)===0)&&(a.f|=yn),aa(d,At,n))}else if(u){var h=a;(l&mt)!==0&&Gt!==null&&Gt.add(h),n!==null?n.push(h):bi(h)}}}}function Nt(e){if(typeof e!="object"||e===null||It in e)return e;const t=Xr(e);if(t!==Is&&t!==uu)return e;var n=new Map,r=Kr(e),o=oe(0),i=wt,s=a=>{if(wt===i)return a();var l=ve,u=wt;ft(null),Ca(i);var d=a();return ft(l),Ca(u),d};return r&&n.set("length",oe(e.length)),new Proxy(e,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&wu();var d=n.get(l);return d===void 0?s(()=>{var h=oe(u.value);return n.set(l,h),h}):B(d,u.value,!0),!0},deleteProperty(a,l){var u=n.get(l);if(u===void 0){if(l in a){const d=s(()=>oe(Pe));n.set(l,d),nt(o)}}else B(u,Pe),nt(o);return!0},get(a,l,u){if(l===It)return e;var d=n.get(l),h=l in a;if(d===void 0&&(!h||an(a,l)?.writable)&&(d=s(()=>{var g=Nt(h?a[l]:Pe),v=oe(g);return v}),n.set(l,d)),d!==void 0){var f=c(d);return f===Pe?void 0:f}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var d=n.get(l);d&&(u.value=c(d))}else if(u===void 0){var h=n.get(l),f=h?.v;if(h!==void 0&&f!==Pe)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return u},has(a,l){if(l===It)return!0;var u=n.get(l),d=u!==void 0&&u.v!==Pe||Reflect.has(a,l);if(u!==void 0||ue!==null&&(!d||an(a,l)?.writable)){u===void 0&&(u=s(()=>{var f=d?Nt(a[l]):Pe,g=oe(f);return g}),n.set(l,u));var h=c(u);if(h===Pe)return!1}return d},set(a,l,u,d){var h=n.get(l),f=l in a;if(r&&l==="length")for(var g=u;g<h.v;g+=1){var v=n.get(g+"");v!==void 0?B(v,Pe):g in a&&(v=s(()=>oe(Pe)),n.set(g+"",v))}if(h===void 0)(!f||an(a,l)?.writable)&&(h=s(()=>oe(void 0)),B(h,Nt(u)),n.set(l,h));else{f=h.v!==Pe;var p=s(()=>Nt(u));B(h,p)}var b=Reflect.getOwnPropertyDescriptor(a,l);if(b?.set&&b.set.call(d,u),!f){if(r&&typeof l=="string"){var S=n.get("length"),z=Number(l);Number.isInteger(z)&&z>=S.v&&B(S,z+1)}nt(o)}return!0},ownKeys(a){c(o);var l=Reflect.ownKeys(a).filter(h=>{var f=n.get(h);return f===void 0||f.v!==Pe});for(var[u,d]of n)d.v!==Pe&&!(u in a)&&l.push(u);return l},setPrototypeOf(){xu()}})}function la(e){try{if(e!==null&&typeof e=="object"&&It in e)return e[It]}catch{}return e}function sd(e,t){return Object.is(la(e),la(t))}var je,ca,ua,da;function ad(){if(je===void 0){je=window,ca=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;ua=an(t,"firstChild").get,da=an(t,"nextSibling").get,Ns(e)&&(e[oi]=void 0,e[Ds]=null,e[ii]=void 0,e.__e=void 0),Ns(n)&&(n[si]=void 0)}}function bt(e=""){return document.createTextNode(e)}function rt(e){return ua.call(e)}function pr(e){return da.call(e)}function V(e,t){return rt(e)}function ce(e,t=!1){{var n=rt(e);return n instanceof Comment&&n.data===""?pr(n):n}}function F(e,t=1,n=!1){let r=e;for(;t--;)r=pr(r);return r}function ld(e){e.textContent=""}function fa(){return!1}function _i(e,t,n){return t==null||t===Ls?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function cd(e,t){if(t){const n=document.body;e.autofocus=!0,Xt(()=>{document.activeElement===n&&e.focus()})}}let ha=!1;function ud(){ha||(ha=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[Ur]?.()})},{capture:!0}))}function ro(e){var t=ve,n=ue;ft(null),Pt(null);try{return e()}finally{ft(t),Pt(n)}}function dd(e,t,n,r=n){e.addEventListener(t,()=>ro(n));const o=e[Ur];o?e[Ur]=()=>{o(),r(!0)}:e[Ur]=()=>r(!0),ud()}function ga(e){ue===null&&(ve===null&&yu(),pu()),Qt&&mu()}function fd(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function dt(e,t){var n=ue;n!==null&&(n.f&Ke)!==0&&(e|=Ke);var r={ctx:Se,deps:null,nodes:null,f:e|Be|ut,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};fe?.register_created_effect(r);var o=r;if((e&Rn)!==0)Fn!==null?Fn.push(r):jt.ensure().schedule(r);else if(t!==null){try{Zn(r)}catch(s){throw De(r),s}o.deps===null&&o.teardown===null&&o.nodes===null&&o.first===o.last&&(o.f&pn)===0&&(o=o.first,(e&mt)!==0&&(e&Yt)!==0&&o!==null&&(o.f|=Yt))}if(o!==null&&(o.parent=n,n!==null&&fd(o,n),ve!==null&&(ve.f&He)!==0&&(e&Zt)===0)){var i=ve;(i.effects??=[]).push(o)}return r}function wi(){return ve!==null&&!_t}function oo(e){const t=dt(gr,null);return Me(t,Oe),t.teardown=e,t}function ot(e){ga();var t=ue.f,n=!ve&&(t&pt)!==0&&Se!==null&&!Se.i;if(n){var r=Se;(r.e??=[]).push(e)}else return va(e)}function va(e){return dt(Rn|Os,e)}function ma(e){return ga(),dt(gr|Os,e)}function pa(e){jt.ensure();const t=dt(Zt|pn,e);return()=>{De(t)}}function hd(e){jt.ensure();const t=dt(Zt|pn,e);return(n={})=>new Promise(r=>{n.outro?wn(t,()=>{De(t),r(void 0)}):(De(t),r(void 0))})}function yr(e){return dt(Rn,e)}function gd(e){return dt(Hn|pn,e)}function io(e,t=0){return dt(gr|t,e)}function J(e,t=[],n=[],r=[]){Qs(r,t,n,o=>{dt(gr,()=>{e(...o.map(c))})})}function un(e,t=0){var n=dt(mt|t,e);return n}function ya(e,t=0){var n=dt(ti|t,e);return n}function Ze(e){return dt(pt|pn,e)}function ba(e){var t=e.teardown;if(t!==null){const n=Qt,r=ve;Sa(!0),ft(null);try{t.call(null)}finally{Sa(n),ft(r)}}}function xi(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const o=n.ac;o!==null&&ro(()=>{o.abort(Qr)});var r=n.next;(n.f&Zt)!==0?n.parent=null:De(n,t),n=r}}function vd(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&pt)===0&&De(t),t=n}}function De(e,t=!0){var n=!1;(t||(e.f&zs)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(_a(e.nodes.start,e.nodes.end),n=!0),e.f|=ri,xi(e,t&&!n),_r(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();ba(e),e.f^=ri,e.f|=tt;var o=e.parent;o!==null&&o.first!==null&&wa(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function _a(e,t){for(;e!==null;){var n=e===t?null:pr(e);e.remove(),e=n}}function wa(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function wn(e,t,n=!0){var r=[];xa(e,r,!0);var o=()=>{n&&De(e),t&&t()},i=r.length;if(i>0){var s=()=>--i||o();for(var a of r)a.out(s)}else o()}function xa(e,t,n){if((e.f&Ke)===0){e.f^=Ke;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var o=e.first;o!==null;){var i=o.next;if((o.f&Zt)===0){var s=(o.f&Yt)!==0||(o.f&pt)!==0&&(e.f&mt)!==0;xa(o,t,s?n:!1)}o=i}}}function so(e){ka(e,!0)}function ka(e,t){if((e.f&Ke)!==0){e.f^=Ke,(e.f&Oe)===0&&(Me(e,Be),jt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,o=(n.f&Yt)!==0||(n.f&pt)!==0;ka(n,o?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const s of i)(s.is_global||t)&&s.in()}}function ki(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var o=n===r?null:pr(n);t.append(n),n=o}}let ao=!1,Qt=!1;function Sa(e){Qt=e}let ve=null,_t=!1;function ft(e){ve=e}let ue=null;function Pt(e){ue=e}let zt=null;function Ea(e){ve!==null&&(zt??=new Set).add(e)}let Ge=null,it=0,ht=null;function md(e){ht=e}let Ta=1,xn=0,wt=xn;function Ca(e){wt=e}function Aa(){return++Ta}function br(e){var t=e.f;if((t&Be)!==0)return!0;if(t&He&&(e.f&=~yn),(t&At)!==0){for(var n=e.deps,r=n.length,o=0;o<r;o++){var i=n[o];if(br(i)&&$s(i),i.wv>e.wv)return!0}(t&ut)!==0&&yt===null&&Me(e,Oe)}return!1}function Ma(e,t,n=!0){var r=e.reactions;if(r!==null&&!(zt!==null&&zt.has(e)))for(var o=0;o<r.length;o++){var i=r[o];(i.f&He)!==0?Ma(i,t,!1):t===i&&(n?Me(i,Be):(i.f&Oe)!==0&&Me(i,At),bi(i))}}function Ia(e){var t=Ge,n=it,r=ht,o=ve,i=zt,s=Se,a=_t,l=wt,u=e.f;Ge=null,it=0,ht=null,ve=(u&(pt|Zt))===0?e:null,zt=null,Ln(e.ctx),_t=!1,wt=++xn,e.ac!==null&&(ro(()=>{e.ac.abort(Qr)}),e.ac=null);try{e.f|=Gr;var d=e.fn,h=d();e.f|=Dn;var f=e.deps,g=fe?.is_fork;if(Ge!==null){var v;if(g||_r(e,it),f!==null&&it>0)for(f.length=it+Ge.length,v=0;v<Ge.length;v++)f[it+v]=Ge[v];else e.deps=f=Ge;if(wi()&&(e.f&ut)!==0)for(v=it;v<f.length;v++)(f[v].reactions??=[]).push(e)}else!g&&f!==null&&it<f.length&&(_r(e,it),f.length=it);if(qn()&&ht!==null&&!_t&&f!==null&&(e.f&(He|At|Be))===0)for(v=0;v<ht.length;v++)Ma(ht[v],e);if(o!==null&&o!==e){if(xn++,o.deps!==null)for(let p=0;p<n;p+=1)o.deps[p].rv=xn;if(t!==null)for(const p of t)p.rv=xn;ht!==null&&(r===null?r=ht:r.push(...ht))}return(e.f&ln)!==0&&(e.f^=ln),h}catch(p){return Xs(p)}finally{e.f^=Gr,Ge=t,it=n,ht=r,ve=o,zt=i,Ln(s),_t=a,wt=l}}function pd(e,t){let n=t.reactions;if(n!==null){var r=lu.call(n,e);if(r!==-1){var o=n.length-1;o===0?n=t.reactions=null:(n[r]=n[o],n.pop())}}if(n===null&&(t.f&He)!==0&&(Ge===null||!Zr.call(Ge,t))){var i=t;(i.f&ut)!==0&&(i.f^=ut,i.f&=~yn),i.v!==Pe&&di(i),$u(i),_r(i,0)}}function _r(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)pd(e,n[r])}function Zn(e){var t=e.f;if((t&tt)===0){Me(e,Oe);var n=ue,r=ao;ue=e,ao=!0;try{(t&(mt|ti))!==0?vd(e):xi(e),ba(e);var o=Ia(e);e.teardown=typeof o=="function"?o:null,e.wv=Ta;var i}finally{ao=r,ue=n}}}async function lo(){await Promise.resolve(),td()}function c(e){var t=e.f,n=(t&He)!==0;if(ve!==null&&!_t){var r=ue!==null&&(ue.f&tt)!==0;if(!r&&(zt===null||!zt.has(e))){var o=ve.deps;if((ve.f&Gr)!==0)e.rv<xn&&(e.rv=xn,Ge===null&&o!==null&&o[it]===e?it++:Ge===null?Ge=[e]:Ge.push(e));else{ve.deps??=[],Zr.call(ve.deps,e)||ve.deps.push(e);var i=e.reactions;i===null?e.reactions=[ve]:Zr.call(i,ve)||i.push(ve)}}}if(Qt&&_n.has(e))return _n.get(e);if(n){var s=e;if(Qt){var a=s.v;return((s.f&Oe)===0&&s.reactions!==null||Pa(s))&&(a=hi(s)),_n.set(s,a),a}var l=(s.f&ut)===0&&!_t&&ve!==null&&(ao||(ve.f&ut)!==0),u=(s.f&Dn)===0;br(s)&&(l&&(s.f|=ut),$s(s)),l&&!u&&(ea(s),Na(s))}if(yt?.has(e))return yt.get(e);if((e.f&ln)!==0)throw e.v;return e.v}function Na(e){if(e.f|=ut,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&He)!==0&&(t.f&ut)===0&&(ea(t),Na(t))}function Pa(e){if(e.v===Pe)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(_n.has(t)||(t.f&He)!==0&&Pa(t))return!0;return!1}function Ue(e){var t=_t;try{return _t=!0,e()}finally{_t=t}}function za(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(It in e)Si(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&It in n&&Si(n)}}}function Si(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Si(e[r],t)}catch{}const n=Xr(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Ms(n);for(let o in r){const i=r[o].get;if(i)try{i.call(e)}catch{}}}}}function yd(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const bd=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function _d(e){return bd.includes(e)}const wd={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function xd(e){return e=e.toLowerCase(),wd[e]??e}const kd=["touchstart","touchmove"];function Sd(e){return kd.includes(e)}const wr=Symbol("events"),Oa=new Set,Ei=new Set;function Ti(e,t,n,r={}){function o(i){if(r.capture||Ai.call(t,i),!i.cancelBubble)return ro(()=>n?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Xt(()=>{t.addEventListener(e,o,r)}):t.addEventListener(e,o,r),o}function Ci(e,t,n,r={}){var o=Ti(t,e,n,r);return()=>{e.removeEventListener(t,o,r)}}function kn(e,t,n,r,o){var i={capture:r,passive:o},s=Ti(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&oo(()=>{t.removeEventListener(e,s,i)})}function Ie(e,t,n){(t[wr]??={})[e]=n}function Yn(e){for(var t=0;t<e.length;t++)Oa.add(e[t]);for(var n of Ei)n(e)}let Ra=null;function Ai(e){var t=this,n=t.ownerDocument,r=e.type,o=e.composedPath?.()||[],i=o[0]||e.target;Ra=e;var s=0,a=Ra===e&&e[wr];if(a){var l=o.indexOf(a);if(l!==-1&&(t===document||t===window)){e[wr]=t;return}var u=o.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(i=o[s]||e.target,i!==t){cu(e,"currentTarget",{configurable:!0,get(){return i||n}});var d=ve,h=ue;ft(null),Pt(null);try{for(var f,g=[];i!==null&&i!==t;){try{var v=i[wr]?.[r];v!=null&&(!i.disabled||e.target===i)&&v.call(i,e)}catch(p){f?g.push(p):f=p}if(e.cancelBubble)break;s++,i=s<o.length?o[s]:null}if(f){for(let p of g)queueMicrotask(()=>{throw p});throw f}}finally{e[wr]=t,delete e.currentTarget,ft(d),Pt(h)}}}const Ed=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Td(e){return Ed?.createHTML(e)??e}function Da(e){var t=_i("template");return t.innerHTML=Td(e.replaceAll("<!>","<!---->")),t.content}function Jt(e,t){var n=ue;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function G(e,t){var n=(t&Bs)!==0,r=(t&Ou)!==0,o,i=!e.startsWith("<!>");return()=>{o===void 0&&(o=Da(i?e:"<!>"+e),n||(o=rt(o)));var s=r||ca?document.importNode(o,!0):o.cloneNode(!0);if(n){var a=rt(s),l=s.lastChild;Jt(a,l)}else Jt(s,s);return s}}function Cd(e,t,n="svg"){var r=!e.startsWith("<!>"),o=(t&Bs)!==0,i=`<${n}>${r?e:"<!>"+e}</${n}>`,s;return()=>{if(!s){var a=Da(i),l=rt(a);if(o)for(s=document.createDocumentFragment();rt(l);)s.appendChild(rt(l));else s=rt(l)}var u=s.cloneNode(!0);if(o){var d=rt(u),h=u.lastChild;Jt(d,h)}else Jt(u,u);return u}}function Le(e,t){return Cd(e,t,"svg")}function xr(e=""){{var t=bt(e+"");return Jt(t,t),t}}function Re(){var e=document.createDocumentFragment(),t=document.createComment(""),n=bt();return e.append(t,n),Jt(t,n),e}function L(e,t){e!==null&&e.before(t)}function $(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e[si]??=e.nodeValue)&&(e[si]=n,e.nodeValue=`${n}`)}function Ad(e,t){return Md(e,t)}const co=new Map;function Md(e,{target:t,anchor:n,props:r={},events:o,context:i,intro:s=!0,transformError:a}){ad();var l=void 0,u=hd(()=>{var d=n??t.appendChild(bt());ju(d,{pending:()=>{}},g=>{se({});var v=Se;i&&(v.c=i),o&&(r.$$events=o),l=e(g,r)||{},ae()},a);var h=new Set,f=g=>{for(var v=0;v<g.length;v++){var p=g[v];if(!h.has(p)){h.add(p);var b=Sd(p);for(const M of[t,document]){var S=co.get(M);S===void 0&&(S=new Map,co.set(M,S));var z=S.get(p);z===void 0?(M.addEventListener(p,Ai,{passive:b}),S.set(p,1)):S.set(p,z+1)}}}};return f(Yr(Oa)),Ei.add(f),()=>{for(var g of h)for(const b of[t,document]){var v=co.get(b),p=v.get(g);--p==0?(b.removeEventListener(g,Ai),v.delete(g),v.size===0&&co.delete(b)):v.set(g,p)}Ei.delete(f),d!==n&&d.parentNode?.removeChild(d)}});return Id.set(l,u),l}let Id=new WeakMap;class kr{anchor;#e=new Map;#n=new Map;#t=new Map;#s=new Set;#r=!0;constructor(t,n=!0){this.anchor=t,this.#r=n}#o=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)so(r),this.#s.delete(n);else{var o=this.#t.get(n);o&&(so(o.effect),this.#n.set(n,o.effect),this.#t.delete(n),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),r=o.effect)}for(const[i,s]of this.#e){if(this.#e.delete(i),i===t)break;const a=this.#t.get(s);a&&(De(a.effect),this.#t.delete(s))}for(const[i,s]of this.#n){if(i===n||this.#s.has(i))continue;const a=()=>{if(Array.from(this.#e.values()).includes(i)){var u=document.createDocumentFragment();ki(s,u),u.append(bt()),this.#t.set(i,{effect:s,fragment:u})}else De(s);this.#s.delete(i),this.#n.delete(i)};this.#r||!r?(this.#s.add(i),wn(s,a,!1)):a()}}};#i=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,o]of this.#t)n.includes(r)||(De(o.effect),this.#t.delete(r))};ensure(t,n){var r=fe,o=fa();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(o){var i=document.createDocumentFragment(),s=bt();i.append(s),this.#t.set(t,{effect:Ze(()=>n(s)),fragment:i})}else this.#n.set(t,Ze(()=>n(this.anchor)));if(this.#e.set(r,t),o){for(const[a,l]of this.#n)a===t?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of this.#t)a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(this.#o),r.ondiscard(this.#i)}else this.#o(r)}}function pe(e,t,n=!1){var r=new kr(e),o=n?Yt:0;function i(s,a){r.ensure(s,a)}un(()=>{var s=!1;t((a,l=0)=>{s=!0,i(l,a)}),s||i(-1,null)},o)}const Nd=Symbol("NaN");function Pd(e,t,n){var r=new kr(e),o=!qn();un(()=>{var i=t();i!==i&&(i=Nd),o&&i!==null&&typeof i=="object"&&(i={}),r.ensure(i,n)})}function Ne(e,t){return t}function zd(e,t,n){for(var r=[],o=t.length,i,s=t.length,a=0;a<o;a++){let h=t[a];wn(h,()=>{if(i){if(i.pending.delete(h),i.done.add(h),i.pending.size===0){var f=e.outrogroups;Mi(e,Yr(i.done)),f.delete(i),f.size===0&&(e.outrogroups=null)}}else s-=1},!1)}if(s===0){var l=r.length===0&&n!==null;if(l){var u=n,d=u.parentNode;ld(d),d.append(u),e.items.clear()}Mi(e,t,!l)}else i={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(i)}function Mi(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const s of e.pending.values())for(const a of s)r.add(e.items.get(a).e)}for(var o=0;o<t.length;o++){var i=t[o];if(r?.has(i)){i.f|=Mt;const s=document.createDocumentFragment();ki(i,s)}else De(t[o],n)}}var Ha;function Te(e,t,n,r,o,i=null){var s=e,a=new Map,l=(t&Hs)!==0;if(l){var u=e;s=u.appendChild(bt())}var d=null,h=fi(()=>{var M=n();return Kr(M)?M:M==null?[]:Yr(M)}),f,g=new Map,v=!0;function p(M){(z.effect.f&tt)===0&&(z.pending.delete(M),z.fallback=d,Od(z,f,s,t,r),d!==null&&(f.length===0?(d.f&Mt)===0?so(d):(d.f^=Mt,Er(d,null,s)):wn(d,()=>{d=null})))}function b(M){z.pending.delete(M)}var S=un(()=>{f=c(h);for(var M=f.length,m=new Set,x=fe,A=fa(),R=0;R<M;R+=1){var q=f[R],P=r(q,R),N=v?null:a.get(P);N?(N.v&&Kn(N.v,q),N.i&&Kn(N.i,R),A&&x.unskip_effect(N.e)):(N=Rd(a,v?s:Ha??=bt(),q,P,R,o,t,n),v||(N.e.f|=Mt),a.set(P,N)),m.add(P)}if(M===0&&i&&!d&&(v?d=Ze(()=>i(s)):(d=Ze(()=>i(Ha??=bt())),d.f|=Mt)),M>m.size&&vu(),!v)if(g.set(x,m),A){for(const[T,w]of a)m.has(T)||x.skip_effect(w.e);x.oncommit(p),x.ondiscard(b)}else p(x);c(h)}),z={effect:S,items:a,pending:g,outrogroups:null,fallback:d};v=!1}function Sr(e){for(;e!==null&&(e.f&pt)===0;)e=e.next;return e}function Od(e,t,n,r,o){var i=(r&Cu)!==0,s=t.length,a=e.items,l=Sr(e.effect.first),u,d=null,h,f=[],g=[],v,p,b,S;if(i)for(S=0;S<s;S+=1)v=t[S],p=o(v,S),b=a.get(p).e,(b.f&Mt)===0&&(b.nodes?.a?.measure(),(h??=new Set).add(b));for(S=0;S<s;S+=1){if(v=t[S],p=o(v,S),b=a.get(p).e,e.outrogroups!==null)for(const N of e.outrogroups)N.pending.delete(b),N.done.delete(b);if((b.f&Ke)!==0&&(so(b),i&&(b.nodes?.a?.unfix(),(h??=new Set).delete(b))),(b.f&Mt)!==0)if(b.f^=Mt,b===l)Er(b,null,n);else{var z=d?d.next:l;b===e.effect.last&&(e.effect.last=b.prev),b.prev&&(b.prev.next=b.next),b.next&&(b.next.prev=b.prev),dn(e,d,b),dn(e,b,z),Er(b,z,n),d=b,f=[],g=[],l=Sr(d.next);continue}if(b!==l){if(u!==void 0&&u.has(b)){if(f.length<g.length){var M=g[0],m;d=M.prev;var x=f[0],A=f[f.length-1];for(m=0;m<f.length;m+=1)Er(f[m],M,n);for(m=0;m<g.length;m+=1)u.delete(g[m]);dn(e,x.prev,A.next),dn(e,d,x),dn(e,A,M),l=M,d=A,S-=1,f=[],g=[]}else u.delete(b),Er(b,l,n),dn(e,b.prev,b.next),dn(e,b,d===null?e.effect.first:d.next),dn(e,d,b),d=b;continue}for(f=[],g=[];l!==null&&l!==b;)(u??=new Set).add(l),g.push(l),l=Sr(l.next);if(l===null)continue}(b.f&Mt)===0&&f.push(b),d=b,l=Sr(b.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(Mi(e,Yr(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var R=[];if(u!==void 0)for(b of u)(b.f&Ke)===0&&R.push(b);for(;l!==null;)(l.f&Ke)===0&&l!==e.fallback&&R.push(l),l=Sr(l.next);var q=R.length;if(q>0){var P=(r&Hs)!==0&&s===0?n:null;if(i){for(S=0;S<q;S+=1)R[S].nodes?.a?.measure();for(S=0;S<q;S+=1)R[S].nodes?.a?.fix()}zd(e,R,P)}}i&&Xt(()=>{if(h!==void 0)for(b of h)b.nodes?.a?.apply()})}function Rd(e,t,n,r,o,i,s,a){var l=(s&Eu)!==0?(s&Au)===0?rd(n,!1,!1):Ut(n):null,u=(s&Tu)!==0?Ut(o):null;return{v:l,i:u,e:Ze(()=>(i(t,l??n,u??o,a),()=>{e.delete(r)}))}}function Er(e,t,n){if(e.nodes)for(var r=e.nodes.start,o=e.nodes.end,i=t&&(t.f&Mt)===0?t.nodes.start:n;r!==null;){var s=pr(r);if(i.before(r),r===o)return;r=s}}function dn(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Dd(e,t,n=!1,r=!1,o=!1,i=!1){var s=e,a="";if(n)var l=e;J(()=>{var u=ue;if(a!==(a=t()??"")){if(n){u.nodes=null,l.innerHTML=a,a!==""&&Jt(rt(l),l.lastChild);return}if(u.nodes!==null&&(_a(u.nodes.start,u.nodes.end),u.nodes=null),a!==""){var d=r?qs:o?Ru:void 0,h=_i(r?"svg":o?"math":"template",d);h.innerHTML=a;var f=r||o?h:h.content;if(Jt(rt(f),f.lastChild),r||o)for(;rt(f);)s.before(rt(f));else s.before(f)}}})}function qe(e,t,...n){var r=new kr(e);un(()=>{const o=t()??null;r.ensure(o,o&&(i=>o(i,...n)))},Yt)}function Ii(e,t,n){var r=new kr(e);un(()=>{var o=t()??null;r.ensure(o,o&&(i=>n(i,o)))},Yt)}function Hd(e,t,n,r,o,i){var s=null,a=e,l=new kr(a,!1);un(()=>{const u=t()||null;var d=u==="svg"?qs:void 0;if(u===null){l.ensure(null,null);return}return l.ensure(u,h=>{if(u){if(s=_i(u,d),Jt(s,s),r){var f=null,g=s.appendChild(bt());r(s,g),f?.remove()}ue.nodes.end=s,h.before(s)}}),()=>{}},Yt),oo(()=>{})}function Bd(e,t){var n;n=document.head.appendChild(bt()),un(()=>{var r=Ze(()=>t(n));r.f|=zs})}function Qe(e,t,n){yr(()=>{var r=Ue(()=>t(e,n?.())||{});if(n&&r?.update){var o=!1,i={};io(()=>{var s=n();za(s),o&&Ws(i,s)&&(i=s,r.update(s))}),o=!0}if(r?.destroy)return()=>r.destroy()})}function Ld(e,t){var n=void 0,r;ya(()=>{n!==(n=t())&&(r&&(De(r),r=null),n&&(r=Ze(()=>{yr(()=>n(e))})))})}function Ba(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ba(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qd(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ba(e))&&(r&&(r+=" "),r+=t);return r}function Sn(e){return typeof e=="object"?qd(e):e??""}const La=[...`
273
+ \r\f \v\uFEFF`];function Vd(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var o of Object.keys(n))if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,s=0;(s=r.indexOf(o,s))>=0;){var a=s+i;(s===0||La.includes(r[s-1]))&&(a===r.length||La.includes(r[a]))?r=(s===0?"":r.substring(0,s))+r.substring(a+1):s=a}}return r===""?null:r}function qa(e,t=!1){var n=t?" !important;":";",r="";for(var o of Object.keys(e)){var i=e[o];i!=null&&i!==""&&(r+=" "+o+": "+i+n)}return r}function Ni(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function Wd(e,t){if(t){var n="",r,o;if(Array.isArray(t)?(r=t[0],o=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,a=!1,l=[];r&&l.push(...Object.keys(r).map(Ni)),o&&l.push(...Object.keys(o).map(Ni));var u=0,d=-1;const p=e.length;for(var h=0;h<p;h++){var f=e[h];if(a?f==="/"&&e[h-1]==="*"&&(a=!1):i?i===f&&(i=!1):f==="/"&&e[h+1]==="*"?a=!0:f==='"'||f==="'"?i=f:f==="("?s++:f===")"&&s--,!a&&i===!1&&s===0){if(f===":"&&d===-1)d=h;else if(f===";"||h===p-1){if(d!==-1){var g=Ni(e.substring(u,d).trim());if(!l.includes(g)){f!==";"&&h++;var v=e.substring(u,h).trim();n+=" "+v+";"}}u=h+1,d=-1}}}}return r&&(n+=qa(r)),o&&(n+=qa(o,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function Ot(e,t,n,r,o,i){var s=e[oi];if(s!==n||s===void 0){var a=Vd(n,r,i);a==null?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a),e[oi]=n}else if(i&&o!==i)for(var l in i){var u=!!i[l];(o==null||u!==!!o[l])&&e.classList.toggle(l,u)}return i}function Pi(e,t={},n,r){for(var o in n){var i=n[o];t[o]!==i&&(n[o]==null?e.style.removeProperty(o):e.style.setProperty(o,i,r))}}function st(e,t,n,r){var o=e[ii];if(o!==t){var i=Wd(t,r);i==null?e.removeAttribute("style"):e.style.cssText=i,e[ii]=t}else r&&(Array.isArray(r)?(Pi(e,n?.[0],r[0]),Pi(e,n?.[1],r[1],"important")):Pi(e,n,r));return r}function zi(e,t,n=!1){if(e.multiple){if(t==null)return;if(!Kr(t))return Bu();for(var r of e.options)r.selected=t.includes(Va(r));return}for(r of e.options){var o=Va(r);if(sd(o,t)){r.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Fd(e){var t=new MutationObserver(()=>{zi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),oo(()=>{t.disconnect()})}function Va(e){return"__value"in e?e.__value:e.value}const fn=Symbol("class"),$t=Symbol("style"),Wa=Symbol("is custom element"),Fa=Symbol("is html"),Kd=ai?"input":"INPUT",Zd=ai?"option":"OPTION",Yd=ai?"select":"SELECT";function Xd(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function ne(e,t,n,r){var o=Ka(e);o[t]!==(o[t]=n)&&(t==="loading"&&(e[hu]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Ya(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function jd(e,t,n,r,o=!1,i=!1){var s=Ka(e),a=s[Wa],l=!s[Fa],u=t||{},d=e.nodeName===Zd;for(var h in t)h in n||(n[h]=null);n.class?n.class=Sn(n.class):(r||n[fn])&&(n.class=null),n[$t]&&(n.style??=null);var f=Ya(e);if(e.nodeName===Kd&&"type"in n&&("value"in n||"__value"in n)){var g=n.type;(g!==u.type||g===void 0&&e.hasAttribute("type"))&&(u.type=g,ne(e,"type",g))}for(const m in n){let x=n[m];if(d&&m==="value"&&x==null){e.value=e.__value="",u[m]=x;continue}if(m==="class"){var v=e.namespaceURI==="http://www.w3.org/1999/xhtml";Ot(e,v,x,r,t?.[fn],n[fn]),u[m]=x,u[fn]=n[fn];continue}if(m==="style"){st(e,x,t?.[$t],n[$t]),u[m]=x,u[$t]=n[$t];continue}var p=u[m];if(!(x===p&&!(x===void 0&&e.hasAttribute(m)))){u[m]=x;var b=m[0]+m[1];if(b!=="$$")if(b==="on"){const A={},R="$$"+m;let q=m.slice(2);var S=_d(q);if(yd(q)&&(q=q.slice(0,-7),A.capture=!0),!S&&p){if(x!=null)continue;e.removeEventListener(q,u[R],A),u[R]=null}if(S)Ie(q,e,x),Yn([q]);else if(x!=null){let P=function(N){u[m].call(this,N)};u[R]=Ti(q,e,P,A)}}else if(m==="style")ne(e,m,x);else if(m==="autofocus")cd(e,!!x);else if(!a&&(m==="__value"||m==="value"&&x!=null))e.value=e.__value=x;else if(m==="selected"&&d)Xd(e,x);else{var z=m;l||(z=xd(z));var M=z==="defaultValue"||z==="defaultChecked";if(x==null&&!a&&!M)if(s[m]=null,z==="value"||z==="checked"){let A=e;const R=t===void 0;if(z==="value"){let q=A.defaultValue;A.removeAttribute(z),A.defaultValue=q,A.value=A.__value=R?q:null}else{let q=A.defaultChecked;A.removeAttribute(z),A.defaultChecked=q,A.checked=R?q:!1}}else e.removeAttribute(m);else M||f.includes(z)&&(a||typeof x!="string")?(e[z]=x,z in s&&(s[z]=Pe)):typeof x!="function"&&ne(e,z,x)}}}return u}function gt(e,t,n=[],r=[],o=[],i,s=!1,a=!1){Qs(o,n,r,l=>{var u=void 0,d={},h=e.nodeName===Yd,f=!1;if(ya(()=>{var v=t(...l.map(c)),p=jd(e,u,v,i,s,a);f&&h&&"value"in v&&zi(e,v.value);for(let S of Object.getOwnPropertySymbols(d))v[S]||De(d[S]);for(let S of Object.getOwnPropertySymbols(v)){var b=v[S];S.description===Du&&(!u||b!==u[S])&&(d[S]&&De(d[S]),d[S]=Ze(()=>Ld(e,()=>b))),p[S]=b}u=p}),h){var g=e;yr(()=>{zi(g,u.value,!0),Fd(g)})}f=!0})}function Ka(e){return e[Ds]??={[Wa]:e.nodeName.includes("-"),[Fa]:e.namespaceURI===Ls}}var Za=new Map;function Ya(e){var t=e.getAttribute("is")||e.nodeName,n=Za.get(t);if(n)return n;Za.set(t,n=[]);for(var r,o=e,i=Element.prototype;i!==o;){r=Ms(o);for(var s in r)r[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&n.push(s);o=Xr(o)}return n}function Xa(e,t,n=t){var r=new WeakSet;dd(e,"input",async o=>{var i=o?e.defaultValue:e.value;if(i=Oi(e)?Ri(i):i,n(i),fe!==null&&r.add(fe),await lo(),i!==(i=t())){var s=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=i??"",a!==null){var u=e.value.length;s===a&&a===l&&u>l?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=s,e.selectionEnd=Math.min(a,u))}}}),Ue(t)==null&&e.value&&(n(Oi(e)?Ri(e.value):e.value),fe!==null&&r.add(fe)),io(()=>{var o=t();if(e===document.activeElement){var i=fe;if(r.has(i))return}Oi(e)&&o===Ri(e.value)||e.type==="date"&&!o&&!e.value||o!==e.value&&(e.value=o??"")})}function Oi(e){var t=e.type;return t==="number"||t==="range"}function Ri(e){return e===""?null:+e}class Di{#e=new WeakMap;#n;#t;static entries=new WeakMap;constructor(t){this.#t=t}observe(t,n){var r=this.#e.get(t)||new Set;return r.add(n),this.#e.set(t,r),this.#s().observe(t,this.#t),()=>{var o=this.#e.get(t);o.delete(n),o.size===0&&(this.#e.delete(t),this.#n.unobserve(t))}}#s(){return this.#n??(this.#n=new ResizeObserver(t=>{for(var n of t){Di.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}}))}}var Gd=new Di({box:"border-box"});function ja(e,t,n){var r=Gd.observe(e,()=>n(e[t]));yr(()=>(Ue(()=>n(e[t])),r))}function Hi(e,t){return e===t||e?.[It]===t}function en(e={},t,n,r){var o=Se.r,i=ue;return yr(()=>{var s,a;return io(()=>{s=a,a=[],Ue(()=>{Hi(n(...a),e)||(t(e,...a),s&&Hi(n(...s),e)&&t(null,...s))})}),()=>{let l=i;for(;l!==o&&l.parent!==null&&l.parent.f&ri;)l=l.parent;const u=()=>{a&&Hi(n(...a),e)&&t(null,...a)},d=l.teardown;l.teardown=()=>{u(),d?.()}}}),e}function Ud(e=!1){const t=Se,n=t.l.u;if(!n)return;let r=()=>za(t.s);if(e){let o=0,i={};const s=Vn(()=>{let a=!1;const l=t.s;for(const u in l)l[u]!==i[u]&&(i[u]=l[u],a=!0);return a&&o++,o});r=()=>c(s)}n.b.length&&ma(()=>{Ga(t,r),ei(n.b)}),ot(()=>{const o=Ue(()=>n.m.map(du));return()=>{for(const i of o)typeof i=="function"&&i()}}),n.a.length&&ot(()=>{Ga(t,r),ei(n.a)})}function Ga(e,t){if(e.l.s)for(const n of e.l.s)c(n);t()}const Qd={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function xt(e,t,n){return new Proxy({props:e,exclude:t},Qd)}const Jd={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(fr(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let o=e.props[r];fr(o)&&(o=o());const i=an(o,t);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(fr(r)&&(r=r()),typeof r=="object"&&r!==null&&t in r){const o=an(r,t);return o&&!o.configurable&&(o.configurable=!0),o}}},has(e,t){if(t===It||t===Rs)return!1;for(let n of e.props)if(fr(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(fr(n)&&(n=n()),!!n){for(const r in n)t.includes(r)||t.push(r);for(const r of Object.getOwnPropertySymbols(n))t.includes(r)||t.push(r)}return t}};function Xn(...e){return new Proxy({props:e},Jd)}function Y(e,t,n,r){var o=!Bn||(n&Iu)!==0,i=(n&Pu)!==0,s=(n&zu)!==0,a=r,l=!0,u=void 0,d=()=>s&&o?(u??=Vn(r),c(u)):(l&&(l=!1,a=s?Ue(r):r),a);let h;if(i){var f=It in e||Rs in e;h=an(e,t)?.set??(f&&t in e?m=>e[t]=m:void 0)}var g,v=!1;i?[g,v]=Yu(()=>e[t]):g=e[t],g===void 0&&r!==void 0&&(g=d(),h&&(o&&_u(),h(g)));var p;if(o?p=()=>{var m=e[t];return m===void 0?d():(l=!0,m)}:p=()=>{var m=e[t];return m!==void 0&&(a=void 0),m===void 0?a:m},o&&(n&Nu)===0)return p;if(h){var b=e.$$legacy;return(function(m,x){return arguments.length>0?((!o||!x||b||v)&&h(x?p():m),m):p()})}var S=!1,z=((n&Mu)!==0?Vn:fi)(()=>(S=!1,p()));i&&c(z);var M=ue;return(function(m,x){if(arguments.length>0){const A=x?c(z):o&&i?Nt(m):m;return B(z,A),S=!0,a!==void 0&&(a=A),m}return Qt&&S||(M.f&tt)!==0?z.v:c(z)})}function Ua(e){Se===null&&li(),Bn&&Se.l!==null?$d(Se).m.push(e):ot(()=>{const t=Ue(e);if(typeof t=="function")return t})}function uo(e){Se===null&&li(),Ua(()=>()=>Ue(e))}function $d(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const ef="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ef);var tf=new Set(["$$slots","$$events","$$legacy","tone","shape","size","class","children"]),nf=G("<span><!></span>");function Bi(e,t){se(t,!0);let n=Y(t,"tone",3,"neutral"),r=Y(t,"shape",3,"pill"),o=Y(t,"size",3,"md"),i=xt(t,tf);const s=()=>["st-badge",`st-badge--${n()}`,`st-badge--${r()}`,`st-badge--${o()}`,t.class].filter(Boolean).join(" ");var a=nf();gt(a,u=>({...i,class:u}),[()=>s()],void 0,void 0,"svelte-1b366fo");var l=V(a);qe(l,()=>t.children??ct),L(e,a),ae()}var rf=new Set(["$$slots","$$events","$$legacy","variant","size","disabled","type","class","children"]),of=G("<button><!></button>");function sf(e,t){se(t,!0);let n=Y(t,"variant",3,"primary"),r=Y(t,"size",3,"md"),o=Y(t,"disabled",3,!1),i=Y(t,"type",3,"button"),s=xt(t,rf);const a=()=>["st-button",`st-button--${n()}`,`st-button--${r()}`,t.class].filter(Boolean).join(" ");var l=of();gt(l,d=>({...s,class:d,type:i(),disabled:o()}),[()=>a()],void 0,void 0,"svelte-1xn14gj");var u=V(l);qe(u,()=>t.children??ct),L(e,l),ae()}var af=new Set(["$$slots","$$events","$$legacy","interactive","class","children"]),lf=G("<section><!></section>");function fo(e,t){se(t,!0);let n=Y(t,"interactive",3,!1),r=xt(t,af);const o=()=>["st-card",n()&&"st-card--interactive",t.class].filter(Boolean).join(" ");var i=lf();gt(i,a=>({...r,class:a}),[()=>o()],void 0,void 0,"svelte-ee68m1");var s=V(i);qe(s,()=>t.children??ct),L(e,i),ae()}var cf=new Set(["$$slots","$$events","$$legacy","size","padding","as","class","children"]);function uf(e,t){se(t,!0);let n=Y(t,"size",3,"lg"),r=Y(t,"padding",3,!0),o=Y(t,"as",3,"div"),i=xt(t,cf);const s=_(()=>["st-container",`st-container--${n()}`,r()&&"st-container--padded",t.class].filter(Boolean).join(" "));var a=Re(),l=ce(a);Hd(l,o,!1,(u,d)=>{gt(u,()=>({...i,class:c(s)}),void 0,void 0,void 0,"svelte-129fa14");var h=Re(),f=ce(h);qe(f,()=>t.children??ct),L(d,h)}),L(e,a),ae()}const ke={color:{blue:{10:"oklch(97% 0.02 242)",60:"oklch(50% 0.134 242.749)",80:"oklch(32% 0.11 242)"},cyan:{10:"oklch(96% 0.04 195)",50:"oklch(70.4% 0.14 182.503)",70:"oklch(48% 0.12 190)"},slate:{0:"#ffffff",10:"#f8fafc",20:"#e2e8f0",60:"#475569",80:"#1e293b",90:"#0f172a"},feedback:{success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#2563eb"}},font:{sans:"Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",display:"Inter, system-ui, sans-serif",mono:"'SFMono-Regular', Consolas, 'Liberation Mono', monospace"},spacing:{0:"0",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",6:"1.5rem",8:"2rem",12:"3rem",16:"4rem"},radius:{none:"0",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",pill:"999px"},shadow:{subtle:"0 1px 2px rgb(15 23 42 / 0.08)",medium:"0 8px 24px rgb(15 23 42 / 0.12)",floating:"0 18px 45px rgb(15 23 42 / 0.18)"},motion:{fast:"120ms",normal:"180ms",slow:"280ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)"},z:{header:50,toast:60,overlay:80,modal:100,chat:110},borderWidth:{none:"0",thin:"1px",thick:"2px"},borderStyle:{solid:"solid"},density:{sm:{controlHeight:"2rem",paddingBlock:"0",paddingInline:"0.75rem",gap:"0.375rem",minWidth:"2rem"},md:{controlHeight:"2.5rem",paddingBlock:"0",paddingInline:"1rem",gap:"0.5rem",minWidth:"2.5rem"},lg:{controlHeight:"3rem",paddingBlock:"0",paddingInline:"1.25rem",gap:"0.5rem",minWidth:"3rem"}},typography:{control:{family:"var(--st-font-sans)",size:"0.9375rem",weight:"600",lineHeight:"1.2",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},field:{family:"var(--st-font-sans)",size:"1rem",weight:"400",lineHeight:"1.5",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},label:{family:"var(--st-font-sans)",size:"0.875rem",weight:"600",lineHeight:"1.4",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},link:{family:"inherit",size:"inherit",weight:"inherit",lineHeight:"inherit",letterSpacing:"0",textTransform:"none",textDecoration:"underline",decorationThickness:"auto",decorationOffset:"0.18em"}},disabledOpacity:"0.55",transition:{property:"background-color, border-color, color, box-shadow, outline-color",duration:"120ms",easing:"cubic-bezier(0.4, 0, 0.2, 1)"},cursor:{interactive:"pointer",disabled:"not-allowed",text:"text"},iconSize:{sm:"1rem",md:"1.125rem",lg:"1.25rem"},focus:{strategy:"outline",width:"2px",offset:"2px",color:"var(--st-semantic-border-interactive)",inset:"0"},field:{style:"outline",fillBg:"var(--st-semantic-surface-default)",underlineColor:"var(--st-semantic-border-strong)",underlineWidth:"1px"}},Tr={surface:{default:ke.color.slate[0],subtle:ke.color.slate[10],raised:ke.color.slate[0],inverse:ke.color.slate[90],overlay:"rgb(15 23 42 / 0.48)"},text:{primary:ke.color.slate[90],secondary:ke.color.slate[60],muted:"#64748b",inverse:ke.color.slate[0],link:ke.color.blue[60]},border:{subtle:ke.color.slate[20],strong:"#94a3b8",interactive:ke.color.blue[60]},action:{primary:ke.color.blue[60],primaryHover:ke.color.blue[80],primaryText:ke.color.slate[0],secondary:ke.color.slate[10],secondaryHover:ke.color.slate[20],secondaryText:ke.color.slate[90],danger:ke.color.feedback.error},feedback:{success:ke.color.feedback.success,warning:ke.color.feedback.warning,error:ke.color.feedback.error,info:ke.color.feedback.info},status:{pending:ke.color.feedback.warning,processing:ke.color.feedback.info,completed:ke.color.feedback.success,failed:ke.color.feedback.error},data:{category1:"#4E79A7",category2:"#F28E2B",category3:"#E15759",category4:"#76B7B2",category5:"#59A14F",category6:"#EDC948",category7:"#B07AA1",category8:"#FF9DA7"}},kt={borderWidth:{none:"0",thin:"1px",thick:"2px"},borderStyle:"solid",density:{sm:{controlHeight:"2rem",paddingBlock:"0",paddingInline:"0.75rem",gap:"0.375rem",minWidth:"2rem",fontSize:"0.875rem"},md:{controlHeight:"2.5rem",paddingBlock:"0",paddingInline:"1rem",gap:"0.5rem",minWidth:"2.5rem",fontSize:"0.9375rem"},lg:{controlHeight:"3rem",paddingBlock:"0",paddingInline:"1.25rem",gap:"0.5rem",minWidth:"3rem",fontSize:"1rem"}},typography:{control:{family:"var(--st-font-sans)",size:"0.9375rem",weight:"600",lineHeight:"1.2",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},field:{family:"var(--st-font-sans)",size:"1rem",weight:"400",lineHeight:"1.5",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},label:{family:"var(--st-font-sans)",size:"0.875rem",weight:"600",lineHeight:"1.4",letterSpacing:"0",textTransform:"none",textDecoration:"none",decorationThickness:"auto",decorationOffset:"auto"},link:{family:"inherit",size:"inherit",weight:"inherit",lineHeight:"inherit",letterSpacing:"0",textTransform:"none",textDecoration:"underline",decorationThickness:"auto",decorationOffset:"0.18em",decorationThicknessHover:"auto",decorationOffsetHover:"0.18em",textDecorationHover:"underline"}},disabledOpacity:"0.55",iconSize:{sm:"1rem",md:"1.125rem",lg:"1.25rem"},focus:{strategy:"outline",width:"2px",offset:"2px",color:"var(--st-semantic-border-interactive)",inset:"0"},field:{style:"outline",selectAppearance:"auto",selectChevron:"none",selectPaddingRight:"2rem"}};function jn(e,t){const n=kt.density[t],r=e.density?.[t]??{};return{controlHeight:r.controlHeight??n.controlHeight,paddingBlock:r.paddingBlock??n.paddingBlock,paddingInline:r.paddingInline??n.paddingInline,gap:r.gap??n.gap,minWidth:r.minWidth??n.minWidth,fontSize:r.fontSize??n.fontSize}}function Li(e,t){const n=jn(e,t),r=e.buttonDensity?.[t]??{},o=r.paddingInline??n.paddingInline;return{controlHeight:r.controlHeight??n.controlHeight,paddingBlock:r.paddingBlock??n.paddingBlock,paddingInline:o,gap:r.gap??n.gap,minWidth:r.minWidth??n.minWidth,fontSize:r.fontSize??n.fontSize,paddingInlineEnd:r.paddingInlineEnd??o}}function df(e,t,n,r,o){const i=e.tabs??{},s=i.indicatorSide??"bottom",a=i.indicatorMode??"border",l=s==="top",u=a==="shadow",d=l?n:`-${n}`;return{activeText:i.activeText||o,activeBackground:i.activeBackground||"transparent",inactiveBackground:i.inactiveBackground||"transparent",activeWeight:i.activeWeight??t.weight,paddingBlock:i.paddingBlock??"0.75rem",paddingInline:i.paddingInline??"0.25rem",fontSize:i.fontSize??"inherit",lineHeight:i.lineHeight??t.lineHeight,indicatorSide:s,activeBorderTopWidth:u?"0":l?n:"0",activeBorderBottomWidth:u||l?"0":n,activeShadow:u?`inset 0 ${d} 0 0 ${r}`:"none"}}function ff(e,t){const n=t.buttonSecondary??{};return{background:n.background||e.action.secondary,border:n.border||e.border.subtle,hoverBackground:n.hoverBackground||e.action.secondaryHover||e.action.secondary}}function hf(e,t,n,r){const o=t.pagination??{},i=o.border||e.border.subtle,s=o.borderWidth??n;return{background:o.background||e.surface.default,border:i,borderWidth:s,text:o.text||e.text.primary,radius:o.radius??r,activeBackground:o.activeBackground||e.action.primary,activeText:o.activeText||e.action.primaryText,activeBorder:o.activeBorder||i,activeBorderWidth:o.activeBorderWidth??s,activeWeight:o.activeWeight??"inherit",disabledText:o.disabledText||e.text.muted,paddingBlock:o.paddingBlock??"0",paddingInline:o.paddingInline??"0.75rem",minSize:o.minSize??"2.25rem",fontSize:o.fontSize??"inherit",lineHeight:o.lineHeight??"normal",letterSpacing:o.letterSpacing??"normal"}}function gf(e,t){const n=t.breadcrumb??{};return{text:n.text||e.text.secondary,linkText:n.linkText||e.text.link,currentText:n.currentText||e.text.primary,separator:n.separator||e.text.muted,fontSize:n.fontSize??"inherit",lineHeight:n.lineHeight??"normal",letterSpacing:n.letterSpacing??"normal",currentWeight:n.currentWeight??"600"}}function vf(e,t,n,r){const o=t.alert??{},i=`${n} ${r} ${e.border.subtle}`;return{background:o.background||e.surface.raised,text:o.text||e.text.primary,borderTop:o.borderTop||i,borderRight:o.borderRight||i,borderBottom:o.borderBottom||i,accentWidth:o.accentWidth??"0.25rem",filetWidth:o.filetWidth??"0",paddingTop:o.paddingTop??"1rem",paddingRight:o.paddingRight??"1rem",paddingBottom:o.paddingBottom??"1rem",paddingLeft:o.paddingLeft??"1rem",fontSize:o.fontSize??"inherit",lineHeight:o.lineHeight??"normal",letterSpacing:o.letterSpacing??"normal",accentInfo:o.accentInfo||e.feedback.info,accentSuccess:o.accentSuccess||e.feedback.success,accentWarning:o.accentWarning||e.feedback.warning,accentError:o.accentError||e.feedback.error}}function mf(e,t){const n=t.accordion??{};return{text:n.text||e.text.primary,paddingBlock:n.paddingBlock??"0.875rem",paddingInline:n.paddingInline??"0.5rem",fontSize:n.fontSize??"inherit",fontWeight:n.fontWeight??"600",lineHeight:n.lineHeight??"normal"}}function pf(e,t){const n=t.tag??{};return{radius:n.radius??"999px",paddingBlock:n.paddingBlock??"0.25rem",paddingInline:n.paddingInline??"0.625rem",fontSize:n.fontSize??"0.75rem",fontWeight:n.fontWeight??"600",lineHeight:n.lineHeight??"1",letterSpacing:n.letterSpacing??"normal",textTransform:n.textTransform??"none",minHeight:n.minHeight??"0",neutralBackground:n.neutralBackground||e.surface.subtle,neutralText:n.neutralText||e.text.secondary}}function yf(e,t){const n=t.badge??{};return{radius:n.radius??"999px",paddingBlock:n.paddingBlock??"0.25rem",paddingInline:n.paddingInline??"0.5rem",fontSize:n.fontSize??"0.75rem",fontWeight:n.fontWeight??"650",lineHeight:n.lineHeight??"1",letterSpacing:n.letterSpacing??"normal",textTransform:n.textTransform??"none",minHeight:n.minHeight??"0",infoBackground:n.infoBackground||`color-mix(in srgb, ${e.feedback.info} 14%, white)`,infoText:n.infoText||e.feedback.info}}function bf(e,t){const n=t.choice??{},r=n.labelLineHeight??"normal";return{labelFontSize:n.labelFontSize??"0.9375rem",labelLineHeight:r,radioLineHeight:n.radioLineHeight??r,labelLetterSpacing:n.labelLetterSpacing??"normal",labelColor:n.labelColor||e.text.primary}}function _f(e){const t=e.search??{},n=t.paddingInline??"0";return{paddingBlock:t.paddingBlock??"0",paddingInline:n,paddingLeft:t.paddingLeft??n,paddingRight:t.paddingRight??n,fontSize:t.fontSize??"1rem",lineHeight:t.lineHeight??"normal",letterSpacing:t.letterSpacing??"normal"}}function wf(e,t){const n=t.toggle??{};return{trackRadius:n.trackRadius??"999px",trackPadding:n.trackPadding??"0.125rem",trackWidth:n.trackWidth??"2.25rem",trackHeight:n.trackHeight??"1.25rem",thumbSize:n.thumbSize??"1rem",trackColor:n.trackColor||e.border.strong,trackCheckedColor:n.trackCheckedColor||e.action.primary,thumbColor:n.thumbColor||e.surface.default,fontSize:n.fontSize??"inherit",lineHeight:n.lineHeight??"normal",letterSpacing:n.letterSpacing??"normal",textColor:n.textColor||e.text.primary}}function xf(e,t){const n=t.selectableRow??{},r=e.action.primary;return{selectedBackground:n.selectedBackground||`color-mix(in oklch, ${r} 12%, transparent)`,selectedAccent:n.selectedAccent||r,selectedText:n.selectedText||`color-mix(in oklch, ${r} 78%, black)`,selectedBackgroundDark:n.selectedBackgroundDark||`color-mix(in oklch, ${r} 22%, transparent)`,selectedAccentDark:n.selectedAccentDark||r,selectedTextDark:n.selectedTextDark||`color-mix(in oklch, ${r} 70%, white)`}}function Gn(e,t){const n=kt.typography[t],r=e.typography?.[t]??{};return{family:r.family??n.family,size:r.size??n.size,weight:r.weight??n.weight,lineHeight:r.lineHeight??n.lineHeight,letterSpacing:r.letterSpacing??n.letterSpacing,textTransform:r.textTransform??n.textTransform,textDecoration:r.textDecoration??n.textDecoration,decorationThickness:r.decorationThickness??n.decorationThickness,decorationOffset:r.decorationOffset??n.decorationOffset,decorationThicknessHover:r.decorationThicknessHover??n.decorationThicknessHover,decorationOffsetHover:r.decorationOffsetHover??n.decorationOffsetHover,textDecorationHover:r.textDecorationHover??n.textDecorationHover}}function kf(e){const t=kt.focus,n=e.focus??{},r=n.strategy??t.strategy,o=n.width??t.width,i=n.offset??t.offset,s=n.color??t.color,a=n.inset??t.inset;let l="none",u="none";switch(r){case"outline":l=`${o} solid ${s}`;break;case"ring":u=`0 0 0 ${o} ${s}`;break;case"inset":u=`inset 0 0 0 ${o} ${s}`;break;case"double":l=`${o} solid ${s}`,u=`0 0 0 ${a} #ffffff`;break}return{strategy:r,width:o,offset:i,color:s,inset:a,outline:l,boxShadow:u}}function Sf(e,t,n,r,o,i){const s=t.field??{},a=s.style??kt.field.style,l=n.thin??"1px",u=s.selectAppearance??kt.field.selectAppearance,d=s.selectChevron??kt.field.selectChevron,h=s.selectPaddingRight??kt.field.selectPaddingRight,f={selectAppearance:u,selectChevron:d,selectPaddingRight:h},g=s.radiusTop||o,v=s.radiusBottom||o,p=z=>{const M=i&&i!=="none"?i:"";return z==="none"?M||"none":M?`${M}, ${z}`:z};if(a==="filled-underline"){const z=s.fillBg||e.surface.subtle,M=s.underlineColor||e.border.strong,m=s.underlineWidth||l;if(s.underlineMode==="shadow"){const x=`inset 0 -${m} 0 0 ${M}`;return{style:a,fillBg:z,borderTop:"none",borderRight:"none",borderBottom:"none",borderLeft:"none",radiusTop:g,radiusBottom:v,underline:x,focusShadow:p(x),...f}}return{style:a,fillBg:z,borderTop:"none",borderRight:"none",borderBottom:`${m} ${r} ${M}`,borderLeft:"none",radiusTop:g,radiusBottom:v,underline:"none",focusShadow:p("none"),...f}}const b=s.fillBg||e.surface.default,S=`${l} ${r} ${e.border.subtle}`;return{style:"outline",fillBg:b,borderTop:S,borderRight:S,borderBottom:S,borderLeft:S,radiusTop:g,radiusBottom:v,underline:"none",focusShadow:p("none"),...f}}function qi(e,t){const n={...kt.borderWidth,...t.borderWidth??{}},r=t.borderStyle?.solid??kt.borderStyle,o=t.disabledOpacity??kt.disabledOpacity;({...t.cursor??{}});const i={...kt.iconSize,...t.iconSize??{}},s=kf(t),a={shape:{radius:t.radius.md,borderWidth:n.thin,borderStyle:r},density:{sm:Li(t,"sm"),md:Li(t,"md"),lg:Li(t,"lg")},typography:Gn(t,"control"),focus:s,icon:{size:i.md,gap:jn(t,"md").gap},states:{hover:{bg:e.action.primaryHover??e.action.primary,transform:"none"},active:{transform:"none"},disabled:{opacity:o}}},l={shape:{radius:t.radius.md,borderWidth:n.thin,borderStyle:r},density:{sm:jn(t,"sm"),md:jn(t,"md"),lg:jn(t,"lg")},typography:Gn(t,"field"),focus:s,field:Sf(e,t,n,r,t.radius.md,s.boxShadow),states:{hover:{border:e.border.strong},focus:{border:e.border.interactive},disabled:{bg:e.surface.subtle,text:e.text.muted}}},u=Gn(t,"link"),d={shape:{radius:t.radius.sm??t.radius.md,borderWidth:n.none,borderStyle:r},typography:u,focus:s,states:{hover:{text:e.action.primary,decoration:u.textDecorationHover??"underline"},disabled:{text:e.text.muted,decoration:"none",opacity:o}}},h=t.card?.borderWidth??n.thin,f=t.card?.background||e.surface.raised,g=t.card?.hoverBackground||f,p={...Gn(t,"field"),size:t.card?.fontSize??"inherit",lineHeight:t.card?.lineHeight??"normal",letterSpacing:t.card?.letterSpacing??"normal"},b={shape:{radius:t.radius.lg,borderWidth:h,borderStyle:r},typography:p,focus:s,states:{hover:{bg:g,transform:"translateY(-1px)"}}},S=Gn(t,"control"),z={shape:{radius:t.radius.none??"0",borderWidth:n.thin,borderStyle:r},density:{md:jn(t,"md")},typography:S,focus:s,states:{hover:{text:e.text.primary},disabled:{opacity:o}}},M=df(t,S,n.thin,e.action.primary,e.text.primary),m=ff(e,t),x=hf(e,t,n.thin,t.radius.md),A=gf(e,t),R=vf(e,t,n.thin,r),q=mf(e,t),P=pf(e,t),N=yf(e,t),T=bf(e,t),w=_f(t),C=wf(e,t),y=xf(e,t);return{button:{radius:t.radius.md,primaryBackground:e.action.primary,primaryText:e.action.primaryText,secondaryBackground:m.background,secondaryBorder:m.border,secondaryHoverBackground:m.hoverBackground,secondaryText:e.action.secondaryText,anatomy:a},link:{text:e.text.link,hoverText:e.action.primary,disabledText:e.text.muted,focusRing:e.border.interactive,anatomy:d},alert:{background:R.background,text:R.text,border:e.border.subtle,infoBorder:R.accentInfo,successBorder:R.accentSuccess,warningBorder:R.accentWarning,errorBorder:R.accentError,radius:t.radius.lg,borderTop:R.borderTop,borderRight:R.borderRight,borderBottom:R.borderBottom,accentWidth:R.accentWidth,filetWidth:R.filetWidth,paddingTop:R.paddingTop,paddingRight:R.paddingRight,paddingBottom:R.paddingBottom,paddingLeft:R.paddingLeft,fontSize:R.fontSize,lineHeight:R.lineHeight,letterSpacing:R.letterSpacing},accordion:{text:q.text,paddingBlock:q.paddingBlock,paddingInline:q.paddingInline,fontSize:q.fontSize,fontWeight:q.fontWeight,lineHeight:q.lineHeight},tag:{radius:P.radius,paddingBlock:P.paddingBlock,paddingInline:P.paddingInline,fontSize:P.fontSize,fontWeight:P.fontWeight,lineHeight:P.lineHeight,letterSpacing:P.letterSpacing,textTransform:P.textTransform,minHeight:P.minHeight,neutralBackground:P.neutralBackground,neutralText:P.neutralText},badge:{radius:N.radius,paddingBlock:N.paddingBlock,paddingInline:N.paddingInline,fontSize:N.fontSize,fontWeight:N.fontWeight,lineHeight:N.lineHeight,letterSpacing:N.letterSpacing,textTransform:N.textTransform,minHeight:N.minHeight,infoBackground:N.infoBackground,infoText:N.infoText},card:{background:f,border:e.border.subtle,radius:t.radius.lg,shadow:t.shadow.subtle,anatomy:b},menu:{background:e.surface.raised,border:e.border.subtle,text:e.text.primary,itemHoverBackground:e.surface.subtle,dangerText:e.feedback.error,dangerHoverBackground:"rgba(185, 28, 28, 0.08)",disabledText:e.text.muted,radius:t.radius.md,shadow:t.shadow.medium},popover:{background:e.surface.raised,border:e.border.subtle,text:e.text.primary,shadow:t.shadow.floating,radius:t.radius.lg,zIndex:t.z.overlay},dropdown:{background:e.surface.default,border:e.border.subtle,text:e.text.primary,optionHoverBackground:e.surface.subtle,selectedBackground:e.action.primary,selectedText:e.action.primaryText,radius:t.radius.md,shadow:t.shadow.medium},input:{background:e.surface.default,border:e.border.subtle,focusRing:e.border.interactive,radius:t.radius.md},field:{labelText:e.text.primary,helpText:e.text.secondary,errorText:e.feedback.error,gap:t.spacing[2],maxWidth:"28rem",labelTypography:Gn(t,"label")},control:{background:e.surface.default,text:e.text.primary,placeholderText:e.text.muted,border:e.border.subtle,hoverBorder:e.border.strong,hoverBackground:e.surface.subtle,focusRing:e.border.interactive,invalidBorder:e.feedback.error,disabledBackground:e.surface.subtle,disabledText:e.text.muted,radius:t.radius.md,smHeight:"2rem",mdHeight:"2.5rem",lgHeight:"3rem",anatomy:l},selection:{checkedBackground:e.action.primary,checkedText:e.action.primaryText,border:e.border.subtle,switchTrack:C.trackColor,switchTrackChecked:C.trackCheckedColor,switchThumb:C.thumbColor,choiceLabelFontSize:T.labelFontSize,choiceLabelLineHeight:T.labelLineHeight,choiceRadioLineHeight:T.radioLineHeight,choiceLabelLetterSpacing:T.labelLetterSpacing,choiceLabelColor:T.labelColor,toggleTrackRadius:C.trackRadius,toggleTrackPadding:C.trackPadding,toggleTrackWidth:C.trackWidth,toggleTrackHeight:C.trackHeight,toggleThumbSize:C.thumbSize,toggleFontSize:C.fontSize,toggleLineHeight:C.lineHeight,toggleLetterSpacing:C.letterSpacing,toggleTextColor:C.textColor},search:{paddingBlock:w.paddingBlock,paddingInline:w.paddingInline,paddingLeft:w.paddingLeft,paddingRight:w.paddingRight,fontSize:w.fontSize,lineHeight:w.lineHeight,letterSpacing:w.letterSpacing},overlay:{backdrop:e.surface.overlay,surface:e.surface.raised,border:e.border.subtle,shadow:t.shadow.floating,radius:t.radius.lg,zIndex:t.z.modal},drawer:{backdrop:e.surface.overlay,surface:e.surface.raised,border:e.border.subtle,shadow:t.shadow.floating,width:"24rem",zIndex:t.z.modal},emptyState:{background:e.surface.subtle,border:e.border.subtle,titleText:e.text.primary,messageText:e.text.secondary,radius:t.radius.lg},loadingState:{indicator:e.action.primary,track:e.surface.subtle,text:e.text.secondary,radius:t.radius.pill},tooltip:{background:e.surface.inverse,text:e.text.inverse,radius:t.radius.md,shadow:t.shadow.medium,zIndex:t.z.overlay},toast:{background:e.surface.raised,text:e.text.primary,border:e.border.subtle,shadow:t.shadow.floating,radius:t.radius.lg,infoBorder:e.feedback.info,successBorder:e.feedback.success,warningBorder:e.feedback.warning,errorBorder:e.feedback.error,zIndex:t.z.toast},dataTable:{headerBackground:e.surface.subtle,rowBackground:e.surface.default,rowHoverBackground:e.surface.subtle,border:e.border.subtle,text:e.text.primary,captionText:e.text.secondary,radius:t.radius.lg},tabs:{activeText:M.activeText,activeBackground:M.activeBackground,inactiveBackground:M.inactiveBackground,activeWeight:M.activeWeight,inactiveText:e.text.secondary,border:e.border.subtle,indicator:e.action.primary,panelBackground:e.surface.default,tabPaddingBlock:M.paddingBlock,tabPaddingInline:M.paddingInline,tabFontSize:M.fontSize,tabLineHeight:M.lineHeight,activeBorderTopWidth:M.activeBorderTopWidth,activeBorderBottomWidth:M.activeBorderBottomWidth,activeShadow:M.activeShadow,anatomy:z},pagination:{background:x.background,border:x.border,text:x.text,activeBackground:x.activeBackground,activeText:x.activeText,disabledText:x.disabledText,radius:x.radius,borderWidth:x.borderWidth,activeBorder:x.activeBorder,activeBorderWidth:x.activeBorderWidth,activeWeight:x.activeWeight,paddingBlock:x.paddingBlock,paddingInline:x.paddingInline,minSize:x.minSize,fontSize:x.fontSize,lineHeight:x.lineHeight,letterSpacing:x.letterSpacing},paginationNav:{background:x.background,border:x.border,radius:x.radius,text:x.text,hoverBackground:e.surface.subtle,activeBackground:x.activeBackground,activeText:x.activeText,disabledText:x.disabledText,ellipsisText:e.text.muted},breadcrumb:{text:A.text,currentText:A.currentText,separator:A.separator,linkText:A.linkText,fontSize:A.fontSize,lineHeight:A.lineHeight,letterSpacing:A.letterSpacing,currentWeight:A.currentWeight},sideNav:{background:e.surface.default,border:e.border.subtle,itemText:e.text.secondary,activeBackground:e.surface.subtle,activeText:e.text.primary,width:"16rem"},selectableRow:{selectedBackground:y.selectedBackground,selectedAccent:y.selectedAccent,selectedText:y.selectedText,selectedBackgroundDark:y.selectedBackgroundDark,selectedAccentDark:y.selectedAccentDark,selectedTextDark:y.selectedTextDark},chat:{userBubbleBackground:e.action.primary,userBubbleText:e.action.primaryText,assistantBubbleBackground:e.surface.subtle,assistantBubbleText:e.text.primary,composerSurface:e.surface.raised,toolCallSurface:e.surface.subtle},graph:{panelBackground:e.surface.inverse,panelText:e.text.inverse,edgeDefault:"rgb(226 232 240 / 0.56)",community1:e.data.category1,community2:e.data.category2,community3:e.data.category3,community4:e.data.category4}}}const Ef=qi(Tr,ke);function Qa(e,t=[]){const n={};for(const[r,o]of Object.entries(e)){if(o===void 0)continue;const i=[...t,r];typeof o=="object"&&o!==null?Object.assign(n,Qa(o,i)):n[i.join("-")]=o}return n}function Tf(e,t=":root",n="st"){const r=Object.entries(Qa(e)),o=[];for(const[i,s]of r)if(o.push(` --${n}-${i}: ${String(s)};`),i.startsWith("foundation-")){const a=i.slice(11);o.push(` --${n}-${a}: ${String(s)};`),a.startsWith("z-")&&o.push(` --${n}-zindex-${a.slice(2)}: ${String(s)};`)}return`${t} {
274
+ ${o.join(`
275
+ `)}
276
+ }
277
+ `}function Cf(e){if(!e||typeof e!="object")throw new Error("Theme must be an object");const t=e;if(typeof t.id!="string"||t.id.trim().length===0)throw new Error("Theme id is required");if(typeof t.label!="string"||t.label.trim().length===0)throw new Error("Theme label is required");if(t.mode!=="light"&&t.mode!=="dark")throw new Error("Theme mode must be light or dark");if(!t.tokens||typeof t.tokens!="object")throw new Error("Theme tokens are required")}function Af(e,t={}){Cf(e);const n=e,r=t.selector??`[data-st-theme="${n.id}"]`,o=t.namespace??"st";return Tf(n.tokens,r,o)}const Mf={id:"sent-tech",label:"Sent Tech",mode:"light",tokens:{foundation:ke,semantic:Tr,component:Ef}},ho={...Tr,action:{...Tr.action,primary:"oklch(50% 0.134 242.749)",primaryText:Tr.action.primaryText}},Ja=qi(ho,ke),Un={id:"entropic",label:"Entropic",mode:"light",tokens:{foundation:ke,semantic:ho,component:{...Ja,chat:{...Ja.chat,composerSurface:ho.surface.raised,toolCallSurface:ho.surface.subtle}}}};var If=G("<div><!></div>");function Nf(e,t){se(t,!0);let n=Y(t,"theme",3,Mf),r=Y(t,"namespace",3,"st"),o=_(()=>Af(n(),{selector:`[data-st-theme="${n().id}"]`,namespace:r()}));var i=If();Bd("g0j4y7",a=>{var l=Re(),u=ce(l);Dd(u,()=>`<style data-st-theme-provider="${n().id}">${c(o)}</style>`),L(a,l)});var s=V(i);qe(s,()=>t.children??ct),J(()=>ne(i,"data-st-theme",n().id)),L(e,i),ae()}var Pf=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],zf=["difference","intersection","symmetricDifference","union"],$a=!1;class go extends Set{#e=new Map;#n=oe(0);#t=oe(0);#s=wt||-1;constructor(t){if(super(),t){for(var n of t)super.add(n);this.#t.v=super.size}$a||this.#o()}#r(t){return wt===this.#s?oe(t):Ut(t)}#o(){$a=!0;var t=go.prototype,n=Set.prototype;for(const r of Pf)t[r]=function(...o){return c(this.#n),n[r].apply(this,o)};for(const r of zf)t[r]=function(...o){c(this.#n);var i=n[r].apply(this,o);return new go(i)}}has(t){var n=super.has(t),r=this.#e,o=r.get(t);if(o===void 0){if(!n)return c(this.#n),!1;o=this.#r(!0),r.set(t,o)}return c(o),n}add(t){return super.has(t)||(super.add(t),B(this.#t,super.size),nt(this.#n)),this}delete(t){var n=super.delete(t),r=this.#e,o=r.get(t);return o!==void 0&&(r.delete(t),B(o,!1)),n&&(B(this.#t,super.size),nt(this.#n)),n}clear(){if(super.size!==0){super.clear();var t=this.#e;for(var n of t.values())B(n,!1);t.clear(),B(this.#t,0),nt(this.#n)}}keys(){return this.values()}values(){return c(this.#n),super.values()}entries(){return c(this.#n),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return c(this.#t)}}class Of extends Map{#e=new Map;#n=oe(0);#t=oe(0);#s=wt||-1;constructor(t){if(super(),t){for(var[n,r]of t)super.set(n,r);this.#t.v=super.size}}#r(t){return wt===this.#s?oe(t):Ut(t)}has(t){var n=this.#e,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#r(0),n.set(t,r);else return c(this.#n),!1;return c(r),!0}forEach(t,n){this.#o(),super.forEach(t,n)}get(t){var n=this.#e,r=n.get(t);if(r===void 0)if(super.has(t))r=this.#r(0),n.set(t,r);else{c(this.#n);return}return c(r),super.get(t)}set(t,n){var r=this.#e,o=r.get(t),i=super.get(t),s=super.set(t,n),a=this.#n;if(o===void 0)o=this.#r(0),r.set(t,o),B(this.#t,super.size),nt(a);else if(i!==n){nt(o);var l=a.reactions===null?null:new Set(a.reactions),u=l===null||!o.reactions?.every(d=>l.has(d));u&&nt(a)}return s}delete(t){var n=this.#e,r=n.get(t),o=super.delete(t);return r!==void 0&&(n.delete(t),B(r,-1)),o&&(B(this.#t,super.size),nt(this.#n)),o}clear(){if(super.size!==0){super.clear();var t=this.#e;B(this.#t,0);for(var n of t.values())B(n,-1);nt(this.#n),t.clear()}}#o(){c(this.#n);var t=this.#e;if(this.#t.v!==t.size){for(var n of super.keys())if(!t.has(n)){var r=this.#r(0);t.set(n,r)}}for([,r]of this.#e)c(r)}keys(){return c(this.#n),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return c(this.#t),super.size}}class Rf{#e;#n;constructor(t,n){this.#e=t,this.#n=Us(n)}get current(){return this.#n(),this.#e()}}const Df=/\(.+\)/,Hf=new Set(["all","print","screen","and","or","not","only"]);class Bf extends Rf{constructor(t,n){let r=Df.test(t)||t.split(/[\s,]+/).some(i=>Hf.has(i.trim()))?t:`(${t})`;const o=window.matchMedia(r);super(()=>o.matches,i=>Ci(o,"change",i))}}const el={...Un.tokens.semantic,surface:{default:"#0f172a",subtle:"#172033",raised:"#1e293b",inverse:"#f8fafc",overlay:"rgb(0 0 0 / 0.5)"},text:{primary:"#f1f5f9",secondary:"#cbd5e1",muted:"#94a3b8",inverse:"#0f172a",link:"#93c5fd"},border:{subtle:"#475569",strong:"#94a3b8",interactive:"#93c5fd"},action:{...Un.tokens.semantic.action,primary:"#2563eb",primaryHover:"#1d4ed8",secondary:"#1e293b",secondaryHover:"#334155",secondaryText:"#f1f5f9"}},Lf=Un,qf={...Un,id:"entropic-dark",label:"Entropic sombre",mode:"dark",tokens:{...Un.tokens,semantic:el,component:qi(el,Un.tokens.foundation)}};var Vf={value:()=>{}};function vo(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new mo(n)}function mo(e){this._=e}function Wf(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}mo.prototype=vo.prototype={constructor:mo,on:function(e,t){var n=this._,r=Wf(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=Ff(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=tl(n[o],e.name,t);else if(t==null)for(o in n)n[o]=tl(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new mo(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function Ff(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function tl(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Vf,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Vi="http://www.w3.org/1999/xhtml";const nl={svg:"http://www.w3.org/2000/svg",xhtml:Vi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function po(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nl.hasOwnProperty(t)?{space:nl[t],local:e}:e}function Kf(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Vi&&t.documentElement.namespaceURI===Vi?t.createElement(e):t.createElementNS(n,e)}}function Zf(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rl(e){var t=po(e);return(t.local?Zf:Kf)(t)}function Yf(){}function Wi(e){return e==null?Yf:function(){return this.querySelector(e)}}function Xf(e){typeof e!="function"&&(e=Wi(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=new Array(s),l,u,d=0;d<s;++d)(l=i[d])&&(u=e.call(l,l.__data__,d,i))&&("__data__"in l&&(u.__data__=l.__data__),a[d]=u);return new at(r,this._parents)}function jf(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Gf(){return[]}function ol(e){return e==null?Gf:function(){return this.querySelectorAll(e)}}function Uf(e){return function(){return jf(e.apply(this,arguments))}}function Qf(e){typeof e=="function"?e=Uf(e):e=ol(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],a=s.length,l,u=0;u<a;++u)(l=s[u])&&(r.push(e.call(l,l.__data__,u,s)),o.push(l));return new at(r,o)}function il(e){return function(){return this.matches(e)}}function sl(e){return function(t){return t.matches(e)}}var Jf=Array.prototype.find;function $f(e){return function(){return Jf.call(this.children,e)}}function eh(){return this.firstElementChild}function th(e){return this.select(e==null?eh:$f(typeof e=="function"?e:sl(e)))}var nh=Array.prototype.filter;function rh(){return Array.from(this.children)}function oh(e){return function(){return nh.call(this.children,e)}}function ih(e){return this.selectAll(e==null?rh:oh(typeof e=="function"?e:sl(e)))}function sh(e){typeof e!="function"&&(e=il(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,u=0;u<s;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&a.push(l);return new at(r,this._parents)}function al(e){return new Array(e.length)}function ah(){return new at(this._enter||this._groups.map(al),this._parents)}function yo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}yo.prototype={constructor:yo,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function lh(e){return function(){return e}}function ch(e,t,n,r,o,i){for(var s=0,a,l=t.length,u=i.length;s<u;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new yo(e,i[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function uh(e,t,n,r,o,i,s){var a,l,u=new Map,d=t.length,h=i.length,f=new Array(d),g;for(a=0;a<d;++a)(l=t[a])&&(f[a]=g=s.call(l,l.__data__,a,t)+"",u.has(g)?o[a]=l:u.set(g,l));for(a=0;a<h;++a)g=s.call(e,i[a],a,i)+"",(l=u.get(g))?(r[a]=l,l.__data__=i[a],u.delete(g)):n[a]=new yo(e,i[a]);for(a=0;a<d;++a)(l=t[a])&&u.get(f[a])===l&&(o[a]=l)}function dh(e){return e.__data__}function fh(e,t){if(!arguments.length)return Array.from(this,dh);var n=t?uh:ch,r=this._parents,o=this._groups;typeof e!="function"&&(e=lh(e));for(var i=o.length,s=new Array(i),a=new Array(i),l=new Array(i),u=0;u<i;++u){var d=r[u],h=o[u],f=h.length,g=hh(e.call(d,d&&d.__data__,u,r)),v=g.length,p=a[u]=new Array(v),b=s[u]=new Array(v),S=l[u]=new Array(f);n(d,h,p,b,S,g,t);for(var z=0,M=0,m,x;z<v;++z)if(m=p[z]){for(z>=M&&(M=z+1);!(x=b[M])&&++M<v;);m._next=x||null}}return s=new at(s,r),s._enter=a,s._exit=l,s}function hh(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function gh(){return new at(this._exit||this._groups.map(al),this._parents)}function vh(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function mh(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var u=n[l],d=r[l],h=u.length,f=a[l]=new Array(h),g,v=0;v<h;++v)(g=u[v]||d[v])&&(f[v]=g);for(;l<o;++l)a[l]=n[l];return new at(a,this._parents)}function ph(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function yh(e){e||(e=bh);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],a=s.length,l=o[i]=new Array(a),u,d=0;d<a;++d)(u=s[d])&&(l[d]=u);l.sort(t)}return new at(o,this._parents).order()}function bh(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function _h(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function wh(){return Array.from(this)}function xh(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function kh(){let e=0;for(const t of this)++e;return e}function Sh(){return!this.node()}function Eh(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this}function Th(e){return function(){this.removeAttribute(e)}}function Ch(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ah(e,t){return function(){this.setAttribute(e,t)}}function Mh(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ih(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Nh(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Ph(e,t){var n=po(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Ch:Th:typeof t=="function"?n.local?Nh:Ih:n.local?Mh:Ah)(n,t))}function ll(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zh(e){return function(){this.style.removeProperty(e)}}function Oh(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Rh(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Dh(e,t,n){return arguments.length>1?this.each((t==null?zh:typeof t=="function"?Rh:Oh)(e,t,n??"")):Qn(this.node(),e)}function Qn(e,t){return e.style.getPropertyValue(t)||ll(e).getComputedStyle(e,null).getPropertyValue(t)}function Hh(e){return function(){delete this[e]}}function Bh(e,t){return function(){this[e]=t}}function Lh(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function qh(e,t){return arguments.length>1?this.each((t==null?Hh:typeof t=="function"?Lh:Bh)(e,t)):this.node()[e]}function cl(e){return e.trim().split(/^|\s+/)}function Fi(e){return e.classList||new ul(e)}function ul(e){this._node=e,this._names=cl(e.getAttribute("class")||"")}ul.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function dl(e,t){for(var n=Fi(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function fl(e,t){for(var n=Fi(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Vh(e){return function(){dl(this,e)}}function Wh(e){return function(){fl(this,e)}}function Fh(e,t){return function(){(t.apply(this,arguments)?dl:fl)(this,e)}}function Kh(e,t){var n=cl(e+"");if(arguments.length<2){for(var r=Fi(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Fh:t?Vh:Wh)(n,t))}function Zh(){this.textContent=""}function Yh(e){return function(){this.textContent=e}}function Xh(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function jh(e){return arguments.length?this.each(e==null?Zh:(typeof e=="function"?Xh:Yh)(e)):this.node().textContent}function Gh(){this.innerHTML=""}function Uh(e){return function(){this.innerHTML=e}}function Qh(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Jh(e){return arguments.length?this.each(e==null?Gh:(typeof e=="function"?Qh:Uh)(e)):this.node().innerHTML}function $h(){this.nextSibling&&this.parentNode.appendChild(this)}function eg(){return this.each($h)}function tg(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ng(){return this.each(tg)}function rg(e){var t=typeof e=="function"?e:rl(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function og(){return null}function ig(e,t){var n=typeof e=="function"?e:rl(e),r=t==null?og:typeof t=="function"?t:Wi(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function sg(){var e=this.parentNode;e&&e.removeChild(this)}function ag(){return this.each(sg)}function lg(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function cg(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ug(e){return this.select(e?cg:lg)}function dg(e){return arguments.length?this.property("__data__",e):this.node().__data__}function fg(e){return function(t){e.call(this,t,this.__data__)}}function hg(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function gg(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function vg(e,t,n){return function(){var r=this.__on,o,i=fg(t);if(r){for(var s=0,a=r.length;s<a;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function mg(e,t,n){var r=hg(e+""),o,i=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,d;l<u;++l)for(o=0,d=a[l];o<i;++o)if((s=r[o]).type===d.type&&s.name===d.name)return d.value}return}for(a=t?vg:gg,o=0;o<i;++o)this.each(a(r[o],t,n));return this}function hl(e,t,n){var r=ll(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function pg(e,t){return function(){return hl(this,e,t)}}function yg(e,t){return function(){return hl(this,e,t.apply(this,arguments))}}function bg(e,t){return this.each((typeof t=="function"?yg:pg)(e,t))}function*_g(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var gl=[null];function at(e,t){this._groups=e,this._parents=t}function Cr(){return new at([[document.documentElement]],gl)}function wg(){return this}at.prototype=Cr.prototype={constructor:at,select:Xf,selectAll:Qf,selectChild:th,selectChildren:ih,filter:sh,data:fh,enter:ah,exit:gh,join:vh,merge:mh,selection:wg,order:ph,sort:yh,call:_h,nodes:wh,node:xh,size:kh,empty:Sh,each:Eh,attr:Ph,style:Dh,property:qh,classed:Kh,text:jh,html:Jh,raise:eg,lower:ng,append:rg,insert:ig,remove:ag,clone:ug,datum:dg,on:mg,dispatch:bg,[Symbol.iterator]:_g};function St(e){return typeof e=="string"?new at([[document.querySelector(e)]],[document.documentElement]):new at([[e]],gl)}function xg(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Rt(e,t){if(e=xg(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const kg={passive:!1},Ar={capture:!0,passive:!1};function Ki(e){e.stopImmediatePropagation()}function Jn(e){e.preventDefault(),e.stopImmediatePropagation()}function vl(e){var t=e.document.documentElement,n=St(e).on("dragstart.drag",Jn,Ar);"onselectstart"in t?n.on("selectstart.drag",Jn,Ar):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ml(e,t){var n=e.document.documentElement,r=St(e).on("dragstart.drag",null);t&&(r.on("click.drag",Jn,Ar),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const bo=e=>()=>e;function Zi(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Zi.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Sg(e){return!e.ctrlKey&&!e.button}function Eg(){return this.parentNode}function Tg(e,t){return t??{x:e.x,y:e.y}}function Cg(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ag(){var e=Sg,t=Eg,n=Tg,r=Cg,o={},i=vo("start","drag","end"),s=0,a,l,u,d,h=0;function f(m){m.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",S,kg).on("touchend.drag touchcancel.drag",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(m,x){if(!(d||!e.call(this,m,x))){var A=M(this,t.call(this,m,x),m,x,"mouse");A&&(St(m.view).on("mousemove.drag",v,Ar).on("mouseup.drag",p,Ar),vl(m.view),Ki(m),u=!1,a=m.clientX,l=m.clientY,A("start",m))}}function v(m){if(Jn(m),!u){var x=m.clientX-a,A=m.clientY-l;u=x*x+A*A>h}o.mouse("drag",m)}function p(m){St(m.view).on("mousemove.drag mouseup.drag",null),ml(m.view,u),Jn(m),o.mouse("end",m)}function b(m,x){if(e.call(this,m,x)){var A=m.changedTouches,R=t.call(this,m,x),q=A.length,P,N;for(P=0;P<q;++P)(N=M(this,R,m,x,A[P].identifier,A[P]))&&(Ki(m),N("start",m,A[P]))}}function S(m){var x=m.changedTouches,A=x.length,R,q;for(R=0;R<A;++R)(q=o[x[R].identifier])&&(Jn(m),q("drag",m,x[R]))}function z(m){var x=m.changedTouches,A=x.length,R,q;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),R=0;R<A;++R)(q=o[x[R].identifier])&&(Ki(m),q("end",m,x[R]))}function M(m,x,A,R,q,P){var N=i.copy(),T=Rt(P||A,x),w,C,y;if((y=n.call(m,new Zi("beforestart",{sourceEvent:A,target:f,identifier:q,active:s,x:T[0],y:T[1],dx:0,dy:0,dispatch:N}),R))!=null)return w=y.x-T[0]||0,C=y.y-T[1]||0,function E(I,k,O){var D=T,H;switch(I){case"start":o[q]=E,H=s++;break;case"end":delete o[q],--s;case"drag":T=Rt(O||k,x),H=s;break}N.call(I,m,new Zi(I,{sourceEvent:k,subject:y,target:f,identifier:q,active:H,x:T[0]+w,y:T[1]+C,dx:T[0]-D[0],dy:T[1]-D[1],dispatch:N}),R)}}return f.filter=function(m){return arguments.length?(e=typeof m=="function"?m:bo(!!m),f):e},f.container=function(m){return arguments.length?(t=typeof m=="function"?m:bo(m),f):t},f.subject=function(m){return arguments.length?(n=typeof m=="function"?m:bo(m),f):n},f.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:bo(!!m),f):r},f.on=function(){var m=i.on.apply(i,arguments);return m===i?f:m},f.clickDistance=function(m){return arguments.length?(h=(m=+m)*m,f):Math.sqrt(h)},f}function Yi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pl(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Mr(){}var Ir=.7,_o=1/Ir,$n="\\s*([+-]?\\d+)\\s*",Nr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Dt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mg=/^#([0-9a-f]{3,8})$/,Ig=new RegExp(`^rgb\\(${$n},${$n},${$n}\\)$`),Ng=new RegExp(`^rgb\\(${Dt},${Dt},${Dt}\\)$`),Pg=new RegExp(`^rgba\\(${$n},${$n},${$n},${Nr}\\)$`),zg=new RegExp(`^rgba\\(${Dt},${Dt},${Dt},${Nr}\\)$`),Og=new RegExp(`^hsl\\(${Nr},${Dt},${Dt}\\)$`),Rg=new RegExp(`^hsla\\(${Nr},${Dt},${Dt},${Nr}\\)$`),yl={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Yi(Mr,En,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bl,formatHex:bl,formatHex8:Dg,formatHsl:Hg,formatRgb:_l,toString:_l});function bl(){return this.rgb().formatHex()}function Dg(){return this.rgb().formatHex8()}function Hg(){return El(this).formatHsl()}function _l(){return this.rgb().formatRgb()}function En(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Mg.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?wl(t):n===3?new Je(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ig.exec(e))?new Je(t[1],t[2],t[3],1):(t=Ng.exec(e))?new Je(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Pg.exec(e))?wo(t[1],t[2],t[3],t[4]):(t=zg.exec(e))?wo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Og.exec(e))?Sl(t[1],t[2]/100,t[3]/100,1):(t=Rg.exec(e))?Sl(t[1],t[2]/100,t[3]/100,t[4]):yl.hasOwnProperty(e)?wl(yl[e]):e==="transparent"?new Je(NaN,NaN,NaN,0):null}function wl(e){return new Je(e>>16&255,e>>8&255,e&255,1)}function wo(e,t,n,r){return r<=0&&(e=t=n=NaN),new Je(e,t,n,r)}function Bg(e){return e instanceof Mr||(e=En(e)),e?(e=e.rgb(),new Je(e.r,e.g,e.b,e.opacity)):new Je}function Xi(e,t,n,r){return arguments.length===1?Bg(e):new Je(e,t,n,r??1)}function Je(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Yi(Je,Xi,pl(Mr,{brighter(e){return e=e==null?_o:Math.pow(_o,e),new Je(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ir:Math.pow(Ir,e),new Je(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Je(Tn(this.r),Tn(this.g),Tn(this.b),xo(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xl,formatHex:xl,formatHex8:Lg,formatRgb:kl,toString:kl}));function xl(){return`#${Cn(this.r)}${Cn(this.g)}${Cn(this.b)}`}function Lg(){return`#${Cn(this.r)}${Cn(this.g)}${Cn(this.b)}${Cn((isNaN(this.opacity)?1:this.opacity)*255)}`}function kl(){const e=xo(this.opacity);return`${e===1?"rgb(":"rgba("}${Tn(this.r)}, ${Tn(this.g)}, ${Tn(this.b)}${e===1?")":`, ${e})`}`}function xo(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Tn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cn(e){return e=Tn(e),(e<16?"0":"")+e.toString(16)}function Sl(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Et(e,t,n,r)}function El(e){if(e instanceof Et)return new Et(e.h,e.s,e.l,e.opacity);if(e instanceof Mr||(e=En(e)),!e)return new Et;if(e instanceof Et)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(t===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-t)/a+2:s=(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new Et(s,a,l,e.opacity)}function qg(e,t,n,r){return arguments.length===1?El(e):new Et(e,t,n,r??1)}function Et(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Yi(Et,qg,pl(Mr,{brighter(e){return e=e==null?_o:Math.pow(_o,e),new Et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ir:Math.pow(Ir,e),new Et(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Je(ji(e>=240?e-240:e+120,o,r),ji(e,o,r),ji(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Et(Tl(this.h),ko(this.s),ko(this.l),xo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=xo(this.opacity);return`${e===1?"hsl(":"hsla("}${Tl(this.h)}, ${ko(this.s)*100}%, ${ko(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Tl(e){return e=(e||0)%360,e<0?e+360:e}function ko(e){return Math.max(0,Math.min(1,e||0))}function ji(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Gi=e=>()=>e;function Vg(e,t){return function(n){return e+n*t}}function Wg(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Fg(e){return(e=+e)==1?Cl:function(t,n){return n-t?Wg(t,n,e):Gi(isNaN(t)?n:t)}}function Cl(e,t){var n=t-e;return n?Vg(e,n):Gi(isNaN(e)?t:e)}const So=(function e(t){var n=Fg(t);function r(o,i){var s=n((o=Xi(o)).r,(i=Xi(i)).r),a=n(o.g,i.g),l=n(o.b,i.b),u=Cl(o.opacity,i.opacity);return function(d){return o.r=s(d),o.g=a(d),o.b=l(d),o.opacity=u(d),o+""}}return r.gamma=e,r})(1);function Kg(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function Zg(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Yg(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=Pr(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(a){for(s=0;s<r;++s)i[s]=o[s](a);return i}}function Xg(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ht(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function jg(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Pr(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Ui=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qi=new RegExp(Ui.source,"g");function Gg(e){return function(){return e}}function Ug(e){return function(t){return e(t)+""}}function Al(e,t){var n=Ui.lastIndex=Qi.lastIndex=0,r,o,i,s=-1,a=[],l=[];for(e=e+"",t=t+"";(r=Ui.exec(e))&&(o=Qi.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,l.push({i:s,x:Ht(r,o)})),n=Qi.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?Ug(l[0].x):Gg(t):(t=l.length,function(u){for(var d=0,h;d<t;++d)a[(h=l[d]).i]=h.x(u);return a.join("")})}function Pr(e,t){var n=typeof t,r;return t==null||n==="boolean"?Gi(t):(n==="number"?Ht:n==="string"?(r=En(t))?(t=r,So):Al:t instanceof En?So:t instanceof Date?Xg:Zg(t)?Kg:Array.isArray(t)?Yg:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?jg:Ht)(e,t)}var Ml=180/Math.PI,Ji={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Il(e,t,n,r,o,i){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Ml,skewX:Math.atan(l)*Ml,scaleX:s,scaleY:a}}var Eo;function Qg(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ji:Il(t.a,t.b,t.c,t.d,t.e,t.f)}function Jg(e){return e==null||(Eo||(Eo=document.createElementNS("http://www.w3.org/2000/svg","g")),Eo.setAttribute("transform",e),!(e=Eo.transform.baseVal.consolidate()))?Ji:(e=e.matrix,Il(e.a,e.b,e.c,e.d,e.e,e.f))}function Nl(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,d,h,f,g,v){if(u!==h||d!==f){var p=g.push("translate(",null,t,null,n);v.push({i:p-4,x:Ht(u,h)},{i:p-2,x:Ht(d,f)})}else(h||f)&&g.push("translate("+h+t+f+n)}function s(u,d,h,f){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),f.push({i:h.push(o(h)+"rotate(",null,r)-2,x:Ht(u,d)})):d&&h.push(o(h)+"rotate("+d+r)}function a(u,d,h,f){u!==d?f.push({i:h.push(o(h)+"skewX(",null,r)-2,x:Ht(u,d)}):d&&h.push(o(h)+"skewX("+d+r)}function l(u,d,h,f,g,v){if(u!==h||d!==f){var p=g.push(o(g)+"scale(",null,",",null,")");v.push({i:p-4,x:Ht(u,h)},{i:p-2,x:Ht(d,f)})}else(h!==1||f!==1)&&g.push(o(g)+"scale("+h+","+f+")")}return function(u,d){var h=[],f=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,h,f),s(u.rotate,d.rotate,h,f),a(u.skewX,d.skewX,h,f),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,h,f),u=d=null,function(g){for(var v=-1,p=f.length,b;++v<p;)h[(b=f[v]).i]=b.x(g);return h.join("")}}}var $g=Nl(Qg,"px, ","px)","deg)"),ev=Nl(Jg,", ",")",")"),tv=1e-12;function Pl(e){return((e=Math.exp(e))+1/e)/2}function nv(e){return((e=Math.exp(e))-1/e)/2}function rv(e){return((e=Math.exp(2*e))-1)/(e+1)}const To=(function e(t,n,r){function o(i,s){var a=i[0],l=i[1],u=i[2],d=s[0],h=s[1],f=s[2],g=d-a,v=h-l,p=g*g+v*v,b,S;if(p<tv)S=Math.log(f/u)/t,b=function(R){return[a+R*g,l+R*v,u*Math.exp(t*R*S)]};else{var z=Math.sqrt(p),M=(f*f-u*u+r*p)/(2*u*n*z),m=(f*f-u*u-r*p)/(2*f*n*z),x=Math.log(Math.sqrt(M*M+1)-M),A=Math.log(Math.sqrt(m*m+1)-m);S=(A-x)/t,b=function(R){var q=R*S,P=Pl(x),N=u/(n*z)*(P*rv(t*q+x)-nv(x));return[a+N*g,l+N*v,u*P/Pl(t*q+x)]}}return b.duration=S*1e3*t/Math.SQRT2,b}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,l=a*a;return e(s,a,l)},o})(Math.SQRT2,2,4);var er=0,zr=0,Or=0,zl=1e3,Co,Rr,Ao=0,An=0,Mo=0,Dr=typeof performance=="object"&&performance.now?performance:Date,Ol=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function $i(){return An||(Ol(ov),An=Dr.now()+Mo)}function ov(){An=0}function Io(){this._call=this._time=this._next=null}Io.prototype=Rl.prototype={constructor:Io,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?$i():+n)+(t==null?0:+t),!this._next&&Rr!==this&&(Rr?Rr._next=this:Co=this,Rr=this),this._call=e,this._time=n,es()},stop:function(){this._call&&(this._call=null,this._time=1/0,es())}};function Rl(e,t,n){var r=new Io;return r.restart(e,t,n),r}function iv(){$i(),++er;for(var e=Co,t;e;)(t=An-e._time)>=0&&e._call.call(void 0,t),e=e._next;--er}function Dl(){An=(Ao=Dr.now())+Mo,er=zr=0;try{iv()}finally{er=0,av(),An=0}}function sv(){var e=Dr.now(),t=e-Ao;t>zl&&(Mo-=t,Ao=e)}function av(){for(var e,t=Co,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Co=n);Rr=e,es(r)}function es(e){if(!er){zr&&(zr=clearTimeout(zr));var t=e-An;t>24?(e<1/0&&(zr=setTimeout(Dl,e-Dr.now()-Mo)),Or&&(Or=clearInterval(Or))):(Or||(Ao=Dr.now(),Or=setInterval(sv,zl)),er=1,Ol(Dl))}}function Hl(e,t,n){var r=new Io;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var lv=vo("start","end","cancel","interrupt"),cv=[],Bl=0,Ll=1,ts=2,No=3,ql=4,ns=5,Po=6;function zo(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;uv(e,n,{name:t,index:r,group:o,on:lv,tween:cv,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Bl})}function rs(e,t){var n=Tt(e,t);if(n.state>Bl)throw new Error("too late; already scheduled");return n}function Bt(e,t){var n=Tt(e,t);if(n.state>No)throw new Error("too late; already running");return n}function Tt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function uv(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Rl(i,0,n.time);function i(u){n.state=Ll,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var d,h,f,g;if(n.state!==Ll)return l();for(d in r)if(g=r[d],g.name===n.name){if(g.state===No)return Hl(s);g.state===ql?(g.state=Po,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=Po,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(Hl(function(){n.state===No&&(n.state=ql,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=ts,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ts){for(n.state=No,o=new Array(f=n.tween.length),d=0,h=-1;d<f;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(o[++h]=g);o.length=h+1}}function a(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=ns,1),h=-1,f=o.length;++h<f;)o[h].call(e,d);n.state===ns&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Po,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Oo(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>ts&&r.state<ns,r.state=Po,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function dv(e){return this.each(function(){Oo(this,e)})}function fv(e,t){var n,r;return function(){var o=Bt(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function hv(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Bt(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===t){o[l]=a;break}l===u&&o.push(a)}i.tween=o}}function gv(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Tt(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?fv:hv)(n,e,t))}function os(e,t,n){var r=e._id;return e.each(function(){var o=Bt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Tt(o,r).value[t]}}function Vl(e,t){var n;return(typeof t=="number"?Ht:t instanceof En?So:(n=En(t))?(t=n,So):Al)(e,t)}function vv(e){return function(){this.removeAttribute(e)}}function mv(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pv(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function yv(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function bv(e,t,n){var r,o,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a)))}}function _v(e,t,n){var r,o,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a)))}}function wv(e,t){var n=po(e),r=n==="transform"?ev:Vl;return this.attrTween(e,typeof t=="function"?(n.local?_v:bv)(n,r,os(this,"attr."+e,t)):t==null?(n.local?mv:vv)(n):(n.local?yv:pv)(n,r,t))}function xv(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function kv(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Sv(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&kv(e,i)),n}return o._value=t,o}function Ev(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&xv(e,i)),n}return o._value=t,o}function Tv(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=po(e);return this.tween(n,(r.local?Sv:Ev)(r,t))}function Cv(e,t){return function(){rs(this,e).delay=+t.apply(this,arguments)}}function Av(e,t){return t=+t,function(){rs(this,e).delay=t}}function Mv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Cv:Av)(t,e)):Tt(this.node(),t).delay}function Iv(e,t){return function(){Bt(this,e).duration=+t.apply(this,arguments)}}function Nv(e,t){return t=+t,function(){Bt(this,e).duration=t}}function Pv(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Iv:Nv)(t,e)):Tt(this.node(),t).duration}function zv(e,t){if(typeof t!="function")throw new Error;return function(){Bt(this,e).ease=t}}function Ov(e){var t=this._id;return arguments.length?this.each(zv(t,e)):Tt(this.node(),t).ease}function Rv(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Bt(this,e).ease=n}}function Dv(e){if(typeof e!="function")throw new Error;return this.each(Rv(this._id,e))}function Hv(e){typeof e!="function"&&(e=il(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,u=0;u<s;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&a.push(l);return new tn(r,this._parents,this._name,this._id)}function Bv(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var l=t[a],u=n[a],d=l.length,h=s[a]=new Array(d),f,g=0;g<d;++g)(f=l[g]||u[g])&&(h[g]=f);for(;a<r;++a)s[a]=t[a];return new tn(s,this._parents,this._name,this._id)}function Lv(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function qv(e,t,n){var r,o,i=Lv(t)?rs:Bt;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function Vv(e,t){var n=this._id;return arguments.length<2?Tt(this.node(),n).on.on(e):this.each(qv(n,e,t))}function Wv(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Fv(){return this.on("end.remove",Wv(this._id))}function Kv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wi(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a=r[s],l=a.length,u=i[s]=new Array(l),d,h,f=0;f<l;++f)(d=a[f])&&(h=e.call(d,d.__data__,f,a))&&("__data__"in d&&(h.__data__=d.__data__),u[f]=h,zo(u[f],t,n,f,u,Tt(d,n)));return new tn(i,this._parents,t,n)}function Zv(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ol(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var l=r[a],u=l.length,d,h=0;h<u;++h)if(d=l[h]){for(var f=e.call(d,d.__data__,h,l),g,v=Tt(d,n),p=0,b=f.length;p<b;++p)(g=f[p])&&zo(g,t,n,p,f,v);i.push(f),s.push(d)}return new tn(i,s,t,n)}var Yv=Cr.prototype.constructor;function Xv(){return new Yv(this._groups,this._parents)}function jv(e,t){var n,r,o;return function(){var i=Qn(this,e),s=(this.style.removeProperty(e),Qn(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function Wl(e){return function(){this.style.removeProperty(e)}}function Gv(e,t,n){var r,o=n+"",i;return function(){var s=Qn(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function Uv(e,t,n){var r,o,i;return function(){var s=Qn(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),Qn(this,e))),s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a))}}function Qv(e,t){var n,r,o,i="style."+t,s="end."+i,a;return function(){var l=Bt(this,e),u=l.on,d=l.value[i]==null?a||(a=Wl(t)):void 0;(u!==n||o!==d)&&(r=(n=u).copy()).on(s,o=d),l.on=r}}function Jv(e,t,n){var r=(e+="")=="transform"?$g:Vl;return t==null?this.styleTween(e,jv(e,r)).on("end.style."+e,Wl(e)):typeof t=="function"?this.styleTween(e,Uv(e,r,os(this,"style."+e,t))).each(Qv(this._id,e)):this.styleTween(e,Gv(e,r,t),n).on("end.style."+e,null)}function $v(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function em(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&$v(e,s,n)),r}return i._value=t,i}function tm(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,em(e,t,n??""))}function nm(e){return function(){this.textContent=e}}function rm(e){return function(){var t=e(this);this.textContent=t??""}}function om(e){return this.tween("text",typeof e=="function"?rm(os(this,"text",e)):nm(e==null?"":e+""))}function im(e){return function(t){this.textContent=e.call(this,t)}}function sm(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&im(o)),t}return r._value=e,r}function am(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,sm(e))}function lm(){for(var e=this._name,t=this._id,n=Fl(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,u=0;u<a;++u)if(l=s[u]){var d=Tt(l,t);zo(l,e,n,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new tn(r,this._parents,e,n)}function cm(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var a={value:s},l={value:function(){--o===0&&i()}};n.each(function(){var u=Bt(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),o===0&&i()})}var um=0;function tn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Fl(){return++um}var nn=Cr.prototype;tn.prototype={constructor:tn,select:Kv,selectAll:Zv,selectChild:nn.selectChild,selectChildren:nn.selectChildren,filter:Hv,merge:Bv,selection:Xv,transition:lm,call:nn.call,nodes:nn.nodes,node:nn.node,size:nn.size,empty:nn.empty,each:nn.each,on:Vv,attr:wv,attrTween:Tv,style:Jv,styleTween:tm,text:om,textTween:am,remove:Fv,tween:gv,delay:Mv,duration:Pv,ease:Ov,easeVarying:Dv,end:cm,[Symbol.iterator]:nn[Symbol.iterator]};function dm(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var fm={time:null,delay:0,duration:250,ease:dm};function hm(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function gm(e){var t,n;e instanceof tn?(t=e._id,e=e._name):(t=Fl(),(n=fm).time=$i(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,u=0;u<a;++u)(l=s[u])&&zo(l,e,t,u,s,n||hm(l,t));return new tn(r,this._parents,e,t)}Cr.prototype.interrupt=dv,Cr.prototype.transition=gm;const Ro=e=>()=>e;function vm(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function rn(e,t,n){this.k=e,this.x=t,this.y=n}rn.prototype={constructor:rn,scale:function(e){return e===1?this:new rn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new rn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Do=new rn(1,0,0);Kl.prototype=rn.prototype;function Kl(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Do;return e.__zoom}function is(e){e.stopImmediatePropagation()}function Hr(e){e.preventDefault(),e.stopImmediatePropagation()}function mm(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function pm(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Zl(){return this.__zoom||Do}function ym(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function bm(){return navigator.maxTouchPoints||"ontouchstart"in this}function _m(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function wm(){var e=mm,t=pm,n=_m,r=ym,o=bm,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=To,u=vo("start","zoom","end"),d,h,f,g=500,v=150,p=0,b=10;function S(y){y.property("__zoom",Zl).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",N).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",w).on("touchend.zoom touchcancel.zoom",C).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(y,E,I,k){var O=y.selection?y.selection():y;O.property("__zoom",Zl),y!==O?x(y,E,I,k):O.interrupt().each(function(){A(this,arguments).event(k).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},S.scaleBy=function(y,E,I,k){S.scaleTo(y,function(){var O=this.__zoom.k,D=typeof E=="function"?E.apply(this,arguments):E;return O*D},I,k)},S.scaleTo=function(y,E,I,k){S.transform(y,function(){var O=t.apply(this,arguments),D=this.__zoom,H=I==null?m(O):typeof I=="function"?I.apply(this,arguments):I,K=D.invert(H),Q=typeof E=="function"?E.apply(this,arguments):E;return n(M(z(D,Q),H,K),O,s)},I,k)},S.translateBy=function(y,E,I,k){S.transform(y,function(){return n(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),s)},null,k)},S.translateTo=function(y,E,I,k,O){S.transform(y,function(){var D=t.apply(this,arguments),H=this.__zoom,K=k==null?m(D):typeof k=="function"?k.apply(this,arguments):k;return n(Do.translate(K[0],K[1]).scale(H.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof I=="function"?-I.apply(this,arguments):-I),D,s)},k,O)};function z(y,E){return E=Math.max(i[0],Math.min(i[1],E)),E===y.k?y:new rn(E,y.x,y.y)}function M(y,E,I){var k=E[0]-I[0]*y.k,O=E[1]-I[1]*y.k;return k===y.x&&O===y.y?y:new rn(y.k,k,O)}function m(y){return[(+y[0][0]+ +y[1][0])/2,(+y[0][1]+ +y[1][1])/2]}function x(y,E,I,k){y.on("start.zoom",function(){A(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(k).end()}).tween("zoom",function(){var O=this,D=arguments,H=A(O,D).event(k),K=t.apply(O,D),Q=I==null?m(K):typeof I=="function"?I.apply(O,D):I,j=Math.max(K[1][0]-K[0][0],K[1][1]-K[0][1]),W=O.__zoom,Z=typeof E=="function"?E.apply(O,D):E,U=l(W.invert(Q).concat(j/W.k),Z.invert(Q).concat(j/Z.k));return function(X){if(X===1)X=Z;else{var ee=U(X),de=j/ee[2];X=new rn(de,Q[0]-ee[0]*de,Q[1]-ee[1]*de)}H.zoom(null,X)}})}function A(y,E,I){return!I&&y.__zooming||new R(y,E)}function R(y,E){this.that=y,this.args=E,this.active=0,this.sourceEvent=null,this.extent=t.apply(y,E),this.taps=0}R.prototype={event:function(y){return y&&(this.sourceEvent=y),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(y,E){return this.mouse&&y!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&y!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&y!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(y){var E=St(this.that).datum();u.call(y,this.that,new vm(y,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:u}),E)}};function q(y,...E){if(!e.apply(this,arguments))return;var I=A(this,E).event(y),k=this.__zoom,O=Math.max(i[0],Math.min(i[1],k.k*Math.pow(2,r.apply(this,arguments)))),D=Rt(y);if(I.wheel)(I.mouse[0][0]!==D[0]||I.mouse[0][1]!==D[1])&&(I.mouse[1]=k.invert(I.mouse[0]=D)),clearTimeout(I.wheel);else{if(k.k===O)return;I.mouse=[D,k.invert(D)],Oo(this),I.start()}Hr(y),I.wheel=setTimeout(H,v),I.zoom("mouse",n(M(z(k,O),I.mouse[0],I.mouse[1]),I.extent,s));function H(){I.wheel=null,I.end()}}function P(y,...E){if(f||!e.apply(this,arguments))return;var I=y.currentTarget,k=A(this,E,!0).event(y),O=St(y.view).on("mousemove.zoom",Q,!0).on("mouseup.zoom",j,!0),D=Rt(y,I),H=y.clientX,K=y.clientY;vl(y.view),is(y),k.mouse=[D,this.__zoom.invert(D)],Oo(this),k.start();function Q(W){if(Hr(W),!k.moved){var Z=W.clientX-H,U=W.clientY-K;k.moved=Z*Z+U*U>p}k.event(W).zoom("mouse",n(M(k.that.__zoom,k.mouse[0]=Rt(W,I),k.mouse[1]),k.extent,s))}function j(W){O.on("mousemove.zoom mouseup.zoom",null),ml(W.view,k.moved),Hr(W),k.event(W).end()}}function N(y,...E){if(e.apply(this,arguments)){var I=this.__zoom,k=Rt(y.changedTouches?y.changedTouches[0]:y,this),O=I.invert(k),D=I.k*(y.shiftKey?.5:2),H=n(M(z(I,D),k,O),t.apply(this,E),s);Hr(y),a>0?St(this).transition().duration(a).call(x,H,k,y):St(this).call(S.transform,H,k,y)}}function T(y,...E){if(e.apply(this,arguments)){var I=y.touches,k=I.length,O=A(this,E,y.changedTouches.length===k).event(y),D,H,K,Q;for(is(y),H=0;H<k;++H)K=I[H],Q=Rt(K,this),Q=[Q,this.__zoom.invert(Q),K.identifier],O.touch0?!O.touch1&&O.touch0[2]!==Q[2]&&(O.touch1=Q,O.taps=0):(O.touch0=Q,D=!0,O.taps=1+!!d);d&&(d=clearTimeout(d)),D&&(O.taps<2&&(h=Q[0],d=setTimeout(function(){d=null},g)),Oo(this),O.start())}}function w(y,...E){if(this.__zooming){var I=A(this,E).event(y),k=y.changedTouches,O=k.length,D,H,K,Q;for(Hr(y),D=0;D<O;++D)H=k[D],K=Rt(H,this),I.touch0&&I.touch0[2]===H.identifier?I.touch0[0]=K:I.touch1&&I.touch1[2]===H.identifier&&(I.touch1[0]=K);if(H=I.that.__zoom,I.touch1){var j=I.touch0[0],W=I.touch0[1],Z=I.touch1[0],U=I.touch1[1],X=(X=Z[0]-j[0])*X+(X=Z[1]-j[1])*X,ee=(ee=U[0]-W[0])*ee+(ee=U[1]-W[1])*ee;H=z(H,Math.sqrt(X/ee)),K=[(j[0]+Z[0])/2,(j[1]+Z[1])/2],Q=[(W[0]+U[0])/2,(W[1]+U[1])/2]}else if(I.touch0)K=I.touch0[0],Q=I.touch0[1];else return;I.zoom("touch",n(M(H,K,Q),I.extent,s))}}function C(y,...E){if(this.__zooming){var I=A(this,E).event(y),k=y.changedTouches,O=k.length,D,H;for(is(y),f&&clearTimeout(f),f=setTimeout(function(){f=null},g),D=0;D<O;++D)H=k[D],I.touch0&&I.touch0[2]===H.identifier?delete I.touch0:I.touch1&&I.touch1[2]===H.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(H=Rt(H,this),Math.hypot(h[0]-H[0],h[1]-H[1])<b)){var K=St(this).on("dblclick.zoom");K&&K.apply(this,arguments)}}}return S.wheelDelta=function(y){return arguments.length?(r=typeof y=="function"?y:Ro(+y),S):r},S.filter=function(y){return arguments.length?(e=typeof y=="function"?y:Ro(!!y),S):e},S.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:Ro(!!y),S):o},S.extent=function(y){return arguments.length?(t=typeof y=="function"?y:Ro([[+y[0][0],+y[0][1]],[+y[1][0],+y[1][1]]]),S):t},S.scaleExtent=function(y){return arguments.length?(i[0]=+y[0],i[1]=+y[1],S):[i[0],i[1]]},S.translateExtent=function(y){return arguments.length?(s[0][0]=+y[0][0],s[1][0]=+y[1][0],s[0][1]=+y[0][1],s[1][1]=+y[1][1],S):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},S.constrain=function(y){return arguments.length?(n=y,S):n},S.duration=function(y){return arguments.length?(a=+y,S):a},S.interpolate=function(y){return arguments.length?(l=y,S):l},S.on=function(){var y=u.on.apply(u,arguments);return y===u?S:y},S.clickDistance=function(y){return arguments.length?(p=(y=+y)*y,S):Math.sqrt(p)},S.tapDistance=function(y){return arguments.length?(b=+y,S):b},S}const Mn={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},ss=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Yl=["Enter"," ","Escape"],xm={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var tr;(function(e){e.Strict="strict",e.Loose="loose"})(tr||(tr={}));var nr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(nr||(nr={}));var Ho;(function(e){e.Partial="partial",e.Full="full"})(Ho||(Ho={}));const as={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var hn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(hn||(hn={}));var Br;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Br||(Br={}));var ie;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ie||(ie={}));const Xl={[ie.Left]:ie.Right,[ie.Right]:ie.Left,[ie.Top]:ie.Bottom,[ie.Bottom]:ie.Top},jl=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,km=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ls=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Lr=(e,t=[0,0])=>{const{width:n,height:r}=sn(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},Sm=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1;const r=e.reduce((o,i)=>{const s=typeof i=="string";let a=!t.nodeLookup&&!s?i:void 0;return t.nodeLookup&&(a=s?t.nodeLookup.get(i):ls(i)?i:t.nodeLookup.get(i.id)),a?(n=!0,Lo(o,Vo(a,t.nodeOrigin))):o},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?qo(r):{x:0,y:0,width:0,height:0}},Bo=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=Lo(n,Vo(o)),r=!0)}),r?qo(n):{x:0,y:0,width:0,height:0}},cs=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const a=(t.x-n)/o,l=(t.y-r)/o,u=t.width/o,d=t.height/o,h=[];for(const f of e.values()){const{measured:g,selectable:v=!0,hidden:p=!1}=f;if(s&&!v||p)continue;const b=g.width??f.width??f.initialWidth??0,S=g.height??f.height??f.initialHeight??0,{x:z,y:M}=f.internals.positionAbsolute,m=Jl(a,l,u,d,z,M,b,S),x=b*S,A=i&&m>0;(!f.internals.handleBounds||A||m>=x||f.dragging)&&h.push(f)}return h},Em=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function Tm(e,t){const n=new Map,r=t?.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{let i;if(t?.includeHiddenNodes){const{width:s,height:a}=sn(o);i=s>0&&a>0}else i=!!(o.measured.width&&o.measured.height&&!o.hidden);i&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function Cm({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return!0;const a=Tm(e,s),l=Bo(a),u=fs(l,t,n,s?.minZoom??o,s?.maxZoom??i,s?.padding??.1);return await r.setViewport(u,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),!0}function Gl({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){const s=n.get(e),a=s.parentId?n.get(s.parentId):void 0,{x:l,y:u}=a?a.internals.positionAbsolute:{x:0,y:0},d=s.origin??r;let h=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!a)i?.("005",Mn.error005());else{const{width:g,height:v}=sn(a);g&&v&&(h=[[l,u],[l+g,u+v]])}else a&&sr(s.extent)&&(h=[[s.extent[0][0]+l,s.extent[0][1]+u],[s.extent[1][0]+l,s.extent[1][1]+u]]);const f=sr(h)?In(t,h,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&i?.("015",Mn.error015()),{position:{x:f.x-l+(s.measured.width??0)*d[0],y:f.y-u+(s.measured.height??0)*d[1]},positionAbsolute:f}}async function Am({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(f=>f.id)),s=[];for(const f of n){if(f.deletable===!1)continue;const g=i.has(f.id),v=!g&&f.parentId&&s.find(p=>p.id===f.parentId);(g||v)&&s.push(f)}const a=new Set(t.map(f=>f.id)),l=r.filter(f=>f.deletable!==!1),d=Em(s,l);for(const f of l)a.has(f.id)&&!d.find(v=>v.id===f.id)&&d.push(f);if(!o)return{edges:d,nodes:s};const h=await o({nodes:s,edges:d});return typeof h=="boolean"?h?{edges:d,nodes:s}:{edges:[],nodes:[]}:h}const rr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),In=(e={x:0,y:0},t,n)=>({x:rr(e.x,t[0][0],t[1][0]-(n?.width??0)),y:rr(e.y,t[0][1],t[1][1]-(n?.height??0))});function Ul(e,t,n){const{width:r,height:o}=sn(n),{x:i,y:s}=n.internals.positionAbsolute;return In(e,[[i,s],[i+r,s+o]],t)}const Ql=(e,t,n)=>e<t?rr(Math.abs(e-t),1,t)/t:e>n?-rr(Math.abs(e-n),1,t)/t:0,us=(e,t,n=15,r=40)=>{const o=Ql(e.x,r,t.width-r)*n,i=Ql(e.y,r,t.height-r)*n;return[o,i]},Lo=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),ds=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),qo=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),qr=(e,t=[0,0])=>{const{x:n,y:r}=ls(e)?e.internals.positionAbsolute:Lr(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Vo=(e,t=[0,0])=>{const{x:n,y:r}=ls(e)?e.internals.positionAbsolute:Lr(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},Mm=(e,t)=>qo(Lo(ds(e),ds(t))),Jl=(e,t,n,r,o,i,s,a)=>{const l=Math.max(0,Math.min(e+n,o+s)-Math.max(e,o)),u=Math.max(0,Math.min(t+r,i+a)-Math.max(t,i));return Math.ceil(l*u)},Wo=(e,t)=>Jl(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),$l=e=>on(e.width)&&on(e.height)&&on(e.x)&&on(e.y),on=e=>!isNaN(e)&&isFinite(e),ec=(e,t)=>(n,r)=>{},Vr=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Wr=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const a={x:(e-n)/o,y:(t-r)/o};return i?Vr(a,s):a},or=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function ir(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Im(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=ir(e,n),o=ir(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=ir(e.top??e.y??0,n),o=ir(e.bottom??e.y??0,n),i=ir(e.left??e.x??0,t),s=ir(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Nm(e,t,n,r,o,i){const{x:s,y:a}=or(e,[t,n,r]),{x:l,y:u}=or({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=o-l,h=i-u;return{left:Math.floor(s),top:Math.floor(a),right:Math.floor(d),bottom:Math.floor(h)}}const fs=(e,t,n,r,o,i)=>{const s=Im(i,t,n),a=(t-s.x)/e.width,l=(n-s.y)/e.height,u=Math.min(a,l),d=rr(u,r,o),h=e.x+e.width/2,f=e.y+e.height/2,g=t/2-h*d,v=n/2-f*d,p=Nm(e,g,v,d,t,n),b={left:Math.min(p.left-s.left,0),top:Math.min(p.top-s.top,0),right:Math.min(p.right-s.right,0),bottom:Math.min(p.bottom-s.bottom,0)};return{x:g-b.left+b.right,y:v-b.top+b.bottom,zoom:d}},Fo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function sr(e){return e!=null&&e!=="parent"}function sn(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Pm(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function zm(e,t={width:0,height:0},n,r,o){const i={...e},s=r.get(n);if(s){const a=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*a[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*a[1]}return i}function Om(e){return{...xm,...e||{}}}function Rm(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(const n of e.keys())if(!t.has(n))return!1;return!0}function tc(e,t,n){if(!n)return;const r=[];e.forEach((o,i)=>{t?.has(i)||r.push(o)}),r.length&&n(r)}function Dm(e){return e===null?null:e?"valid":"invalid"}function hs(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=Ct(e),a=Wr({x:i-(o?.left??0),y:s-(o?.top??0)},r),{x:l,y:u}=n?Vr(a,t):a;return{xSnapped:l,ySnapped:u,...a}}const nc=e=>({width:e.offsetWidth,height:e.offsetHeight}),rc=e=>e?.getRootNode?.()||window?.document,Hm=["INPUT","SELECT","TEXTAREA"];function oc(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:Hm.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const ic=e=>"clientX"in e,Ct=(e,t)=>{const n=ic(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},sc=(e,t,n,r,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...nc(s)}})};function Bm({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:a}){const l=e*.125+o*.375+s*.375+n*.125,u=t*.125+i*.375+a*.375+r*.125,d=Math.abs(l-e),h=Math.abs(u-t);return[l,u,d,h]}function Ko(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function ac({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case ie.Left:return[t-Ko(t-r,i),n];case ie.Right:return[t+Ko(r-t,i),n];case ie.Top:return[t,n-Ko(n-o,i)];case ie.Bottom:return[t,n+Ko(o-n,i)]}}function lc({sourceX:e,sourceY:t,sourcePosition:n=ie.Bottom,targetX:r,targetY:o,targetPosition:i=ie.Top,curvature:s=.25}){const[a,l]=ac({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,d]=ac({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[h,f,g,v]=Bm({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${a},${l} ${u},${d} ${r},${o}`,h,f,g,v]}function cc({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,a=r<t?r+s:r-s;return[i,a,o,s]}function Lm({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=o&&n?r+1e3:r,a=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+a}function qm({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=Lo(Vo(e),Vo(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return Wo(s,qo(i))>0}const Vm=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Wm=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Fm=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.("006",Mn.error006()),t;const r=n.getEdgeId||Vm;let o;return jl(e)?o={...e}:o={...e,id:r(e)},Wm(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function uc({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,a]=cc({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,a]}const dc={[ie.Left]:{x:-1,y:0},[ie.Right]:{x:1,y:0},[ie.Top]:{x:0,y:-1},[ie.Bottom]:{x:0,y:1}},Km=({source:e,sourcePosition:t=ie.Bottom,target:n})=>t===ie.Left||t===ie.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},fc=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Zm({source:e,sourcePosition:t=ie.Bottom,target:n,targetPosition:r=ie.Top,center:o,offset:i,stepPosition:s}){const a=dc[t],l=dc[r],u={x:e.x+a.x*i,y:e.y+a.y*i},d={x:n.x+l.x*i,y:n.y+l.y*i},h=Km({source:u,sourcePosition:t,target:d}),f=h.x!==0?"x":"y",g=h[f];let v=[],p,b;const S={x:0,y:0},z={x:0,y:0},[,,M,m]=cc({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[f]*l[f]===-1){f==="x"?(p=o.x??u.x+(d.x-u.x)*s,b=o.y??(u.y+d.y)/2):(p=o.x??(u.x+d.x)/2,b=o.y??u.y+(d.y-u.y)*s);const q=[{x:p,y:u.y},{x:p,y:d.y}],P=[{x:u.x,y:b},{x:d.x,y:b}];a[f]===g?v=f==="x"?q:P:v=f==="x"?P:q}else{const q=[{x:u.x,y:d.y}],P=[{x:d.x,y:u.y}];if(f==="x"?v=a.x===g?P:q:v=a.y===g?q:P,t===r){const y=Math.abs(e[f]-n[f]);if(y<=i){const E=Math.min(i-1,i-y);a[f]===g?S[f]=(u[f]>e[f]?-1:1)*E:z[f]=(d[f]>n[f]?-1:1)*E}}if(t!==r){const y=f==="x"?"y":"x",E=a[f]===l[y],I=u[y]>d[y],k=u[y]<d[y];(a[f]===1&&(!E&&I||E&&k)||a[f]!==1&&(!E&&k||E&&I))&&(v=f==="x"?q:P)}const N={x:u.x+S.x,y:u.y+S.y},T={x:d.x+z.x,y:d.y+z.y},w=Math.max(Math.abs(N.x-v[0].x),Math.abs(T.x-v[0].x)),C=Math.max(Math.abs(N.y-v[0].y),Math.abs(T.y-v[0].y));w>=C?(p=(N.x+T.x)/2,b=v[0].y):(p=v[0].x,b=(N.y+T.y)/2)}const x={x:u.x+S.x,y:u.y+S.y},A={x:d.x+z.x,y:d.y+z.y};return[[e,...x.x!==v[0].x||x.y!==v[0].y?[x]:[],...v,...A.x!==v[v.length-1].x||A.y!==v[v.length-1].y?[A]:[],n],p,b,M,m]}function Ym(e,t,n,r){const o=Math.min(fc(e,t)/2,fc(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*d}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${i},${s+o*l}Q ${i},${s} ${i+o*a},${s}`}function gs({sourceX:e,sourceY:t,sourcePosition:n=ie.Bottom,targetX:r,targetY:o,targetPosition:i=ie.Top,borderRadius:s=5,centerX:a,centerY:l,offset:u=20,stepPosition:d=.5}){const[h,f,g,v,p]=Zm({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:a,y:l},offset:u,stepPosition:d});let b=`M${h[0].x} ${h[0].y}`;for(let S=1;S<h.length-1;S++)b+=Ym(h[S-1],h[S],h[S+1],s);return b+=`L${h[h.length-1].x} ${h[h.length-1].y}`,[b,f,g,v,p]}function hc(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Xm(e){const{sourceNode:t,targetNode:n}=e;if(!hc(t)||!hc(n))return null;const r=t.internals.handleBounds||gc(t.handles),o=n.internals.handleBounds||gc(n.handles),i=vc(r?.source??[],e.sourceHandle),s=vc(e.connectionMode===tr.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!i||!s)return e.onError?.("008",Mn.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=i?.position||ie.Bottom,l=s?.position||ie.Top,u=Nn(t,i,a),d=Nn(n,s,l);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:a,targetPosition:l}}function gc(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Nn(e,t,n=ie.Left,r=!1){const o=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:s,height:a}=t??sn(e);if(r)return{x:o+s/2,y:i+a/2};switch(t?.position??n){case ie.Top:return{x:o+s/2,y:i};case ie.Right:return{x:o+s,y:i+a/2};case ie.Bottom:return{x:o+s/2,y:i+a};case ie.Left:return{x:o,y:i+a/2}}}function vc(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function vs(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function jm(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const i=new Set;return e.reduce((s,a)=>([a.markerStart||r,a.markerEnd||o].forEach(l=>{if(l&&typeof l=="object"){const u=vs(l,t);i.has(u)||(s.push({id:u,color:l.color||n,...l}),i.add(u))}}),s),[]).sort((s,a)=>s.id.localeCompare(a.id))}const mc=1e3,Gm=10,ms={nodeOrigin:[0,0],nodeExtent:ss,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Um={...ms,checkEquality:!0};function ps(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function Qm(e,t,n){const r=ps(ms,n);for(const o of e.values())if(o.parentId)bs(o,e,t,r);else{const i=Lr(o,r.nodeOrigin),s=sr(o.extent)?o.extent:r.nodeExtent,a=In(i,s,sn(o));o.internals.positionAbsolute=a}}function Jm(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function ys(e){return e==="manual"}function $m(e,t,n,r={}){const o=ps(Um,r),i={i:0},s=new Map(t),a=o?.elevateNodesOnSelect&&!ys(o.zIndexMode)?mc:0;let l=e.length>0,u=!1;t.clear(),n.clear();for(const d of e){let h=s.get(d.id);if(o.checkEquality&&d===h?.internals.userNode)t.set(d.id,h);else{const f=Lr(d,o.nodeOrigin),g=sr(d.extent)?d.extent:o.nodeExtent,v=In(f,g,sn(d));h={...o.defaults,...d,measured:{width:d.measured?.width,height:d.measured?.height},internals:{positionAbsolute:v,handleBounds:Jm(d,h),z:pc(d,a,o.zIndexMode),userNode:d}},t.set(d.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(l=!1),d.parentId&&bs(h,t,n,r,i),u||=d.selected??!1}return{nodesInitialized:l,hasSelectedNodes:u}}function ep(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function bs(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:a,zIndexMode:l}=ps(ms,r),u=e.parentId,d=t.get(u);if(!d){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}ep(e,n),o&&!d.parentId&&d.internals.rootParentIndex===void 0&&l==="auto"&&(d.internals.rootParentIndex=++o.i,d.internals.z=d.internals.z+o.i*Gm),o&&d.internals.rootParentIndex!==void 0&&(o.i=d.internals.rootParentIndex);const h=i&&!ys(l)?mc:0,{x:f,y:g,z:v}=tp(e,d,s,a,h,l),{positionAbsolute:p}=e.internals,b=f!==p.x||g!==p.y;(b||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:f,y:g}:p,z:v}})}function pc(e,t,n){const r=on(e.zIndex)?e.zIndex:0;return ys(n)?r:r+(e.selected?t:0)}function tp(e,t,n,r,o,i){const{x:s,y:a}=t.internals.positionAbsolute,l=sn(e),u=Lr(e,n),d=sr(e.extent)?In(u,e.extent,l):u;let h=In({x:s+d.x,y:a+d.y},r,l);e.extent==="parent"&&(h=Ul(h,l,t));const f=pc(e,o,i),g=t.internals.z??0;return{x:h.x,y:h.y,z:g>=f?g+1:f}}function np(e,t,n,r=[0,0]){const o=[],i=new Map;for(const s of e){const a=t.get(s.parentId);if(!a)continue;const l=i.get(s.parentId)?.expandedRect??qr(a),u=Mm(l,s.rect);i.set(s.parentId,{expandedRect:u,parent:a})}return i.size>0&&i.forEach(({expandedRect:s,parent:a},l)=>{const u=a.internals.positionAbsolute,d=sn(a),h=a.origin??r,f=s.x<u.x?Math.round(Math.abs(u.x-s.x)):0,g=s.y<u.y?Math.round(Math.abs(u.y-s.y)):0,v=Math.max(d.width,Math.round(s.width)),p=Math.max(d.height,Math.round(s.height)),b=(v-d.width)*h[0],S=(p-d.height)*h[1];(f>0||g>0||b||S)&&(o.push({id:l,type:"position",position:{x:a.position.x-f+b,y:a.position.y-g+S}}),n.get(l)?.forEach(z=>{e.some(M=>M.id===z.id)||o.push({id:z.id,type:"position",position:{x:z.position.x+f,y:z.position.y+g}})})),(d.width<s.width||d.height<s.height||f||g)&&o.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?h[0]*f-b:0),height:p+(g?h[1]*g-S:0)}})}),o}function rp(e,t,n,r,o,i,s){const a=r?.querySelector(".xyflow__viewport");let l=!1;if(!a)return{changes:[],updatedInternals:l};const u=[],d=window.getComputedStyle(a),{m22:h}=new window.DOMMatrixReadOnly(d.transform),f=[];for(const g of e.values()){const v=t.get(g.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),l=!0;continue}const p=nc(g.nodeElement),b=v.measured.width!==p.width||v.measured.height!==p.height;if(!!(p.width&&p.height&&(b||!v.internals.handleBounds||g.force))){const z=g.nodeElement.getBoundingClientRect(),M=sr(v.extent)?v.extent:i;let{positionAbsolute:m}=v.internals;if(v.parentId&&v.extent==="parent"){const A=t.get(v.parentId);A&&(m=Ul(m,p,A))}else M&&(m=In(m,M,p));const x={...v,measured:p,internals:{...v.internals,positionAbsolute:m,handleBounds:{source:sc("source",g.nodeElement,z,h,v.id),target:sc("target",g.nodeElement,z,h,v.id)}}};t.set(v.id,x),v.parentId&&bs(x,t,n,{nodeOrigin:o,zIndexMode:s}),l=!0,b&&(u.push({id:v.id,type:"dimensions",dimensions:p}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:qr(x,o)}))}}if(f.length>0){const g=np(f,t,n,o);u.push(...g)}return{changes:u,updatedInternals:l}}async function op({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return!1;const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r);return!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2])}function yc(e,t,n,r,o,i){let s=o;const a=r.get(s)||new Map;r.set(s,a.set(n,t)),s=`${o}-${e}`;const l=r.get(s)||new Map;if(r.set(s,l.set(n,t)),i){s=`${o}-${e}-${i}`;const u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function ip(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:i,sourceHandle:s=null,targetHandle:a=null}=r,l={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:a},u=`${o}-${s}--${i}-${a}`,d=`${i}-${a}--${o}-${s}`;yc("source",l,d,e,o,s),yc("target",l,u,e,i,a),t.set(r.id,r)}}function bc(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:bc(n,t):!1}function _c(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function sp(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!bc(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const a=e.get(i);a&&o.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return o}function _s({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){const o=[];for(const[s,a]of t){const l=n.get(s)?.internals.userNode;l&&o.push({...l,position:a.position,dragging:r})}if(!e)return[o[0],o];const i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:r}:o[0],o]}function ap({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const i={x:n-o.distance.x,y:r-o.distance.y},s=Vr(i,t);return{x:s.x-i.x,y:s.y-i.y}}function lp({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,a=new Map,l=!1,u={x:0,y:0},d=null,h=!1,f=null,g=!1,v=!1,p=null;function b({noDragClassName:z,handleSelector:M,domNode:m,isSelectable:x,nodeId:A,nodeClickDistance:R=0}){f=St(m);function q({x:w,y:C}){const{nodeLookup:y,nodeExtent:E,snapGrid:I,snapToGrid:k,nodeOrigin:O,onNodeDrag:D,onSelectionDrag:H,onError:K,updateNodePositions:Q}=t();i={x:w,y:C};let j=!1;const W=a.size>1,Z=W&&E?ds(Bo(a)):null,U=W&&k?ap({dragItems:a,snapGrid:I,x:w,y:C}):null;for(const[X,ee]of a){if(!y.has(X))continue;let de={x:w-ee.distance.x,y:C-ee.distance.y};k&&(de=U?{x:Math.round(de.x+U.x),y:Math.round(de.y+U.y)}:Vr(de,I));let we=null;if(W&&E&&!ee.extent&&Z){const{positionAbsolute:he}=ee.internals,_e=he.x-Z.x+E[0][0],Ve=he.x+ee.measured.width-Z.x2+E[1][0],le=he.y-Z.y+E[0][1],me=he.y+ee.measured.height-Z.y2+E[1][1];we=[[_e,le],[Ve,me]]}const{position:re,positionAbsolute:be}=Gl({nodeId:X,nextPosition:de,nodeLookup:y,nodeExtent:we||E,nodeOrigin:O,onError:K});j=j||ee.position.x!==re.x||ee.position.y!==re.y,ee.position=re,ee.internals.positionAbsolute=be}if(v=v||j,!!j&&(Q(a,!0),p&&(r||D||!A&&H))){const[X,ee]=_s({nodeId:A,dragItems:a,nodeLookup:y});r?.(p,a,X,ee),D?.(p,X,ee),A||H?.(p,ee)}}async function P(){if(!d)return;const{transform:w,panBy:C,autoPanSpeed:y,autoPanOnNodeDrag:E}=t();if(!E){l=!1,cancelAnimationFrame(s);return}const[I,k]=us(u,d,y);(I!==0||k!==0)&&(i.x=(i.x??0)-I/w[2],i.y=(i.y??0)-k/w[2],await C({x:I,y:k})&&q(i)),s=requestAnimationFrame(P)}function N(w){const{nodeLookup:C,multiSelectionActive:y,nodesDraggable:E,transform:I,snapGrid:k,snapToGrid:O,selectNodesOnDrag:D,onNodeDragStart:H,onSelectionDragStart:K,unselectNodesAndEdges:Q}=t();h=!0,(!D||!x)&&!y&&A&&(C.get(A)?.selected||Q()),x&&D&&A&&e?.(A);const j=hs(w.sourceEvent,{transform:I,snapGrid:k,snapToGrid:O,containerBounds:d});if(i=j,a=sp(C,E,j,A),a.size>0&&(n||H||!A&&K)){const[W,Z]=_s({nodeId:A,dragItems:a,nodeLookup:C});n?.(w.sourceEvent,a,W,Z),H?.(w.sourceEvent,W,Z),A||K?.(w.sourceEvent,Z)}}const T=Ag().clickDistance(R).on("start",w=>{const{domNode:C,nodeDragThreshold:y,transform:E,snapGrid:I,snapToGrid:k}=t();d=C?.getBoundingClientRect()||null,g=!1,v=!1,p=w.sourceEvent,y===0&&N(w),i=hs(w.sourceEvent,{transform:E,snapGrid:I,snapToGrid:k,containerBounds:d}),u=Ct(w.sourceEvent,d)}).on("drag",w=>{const{autoPanOnNodeDrag:C,transform:y,snapGrid:E,snapToGrid:I,nodeDragThreshold:k,nodeLookup:O}=t(),D=hs(w.sourceEvent,{transform:y,snapGrid:E,snapToGrid:I,containerBounds:d});if(p=w.sourceEvent,(w.sourceEvent.type==="touchmove"&&w.sourceEvent.touches.length>1||A&&!O.has(A))&&(g=!0),!g){if(!l&&C&&h&&(l=!0,P()),!h){const H=Ct(w.sourceEvent,d),K=H.x-u.x,Q=H.y-u.y;Math.sqrt(K*K+Q*Q)>k&&N(w)}(i.x!==D.xSnapped||i.y!==D.ySnapped)&&a&&h&&(u=Ct(w.sourceEvent,d),q(D))}}).on("end",w=>{if(!h||g){g&&a.size>0&&t().updateNodePositions(a,!1);return}if(l=!1,h=!1,cancelAnimationFrame(s),a.size>0){const{nodeLookup:C,updateNodePositions:y,onNodeDragStop:E,onSelectionDragStop:I}=t();if(v&&(y(a,!1),v=!1),o||E||!A&&I){const[k,O]=_s({nodeId:A,dragItems:a,nodeLookup:C,dragging:!1});o?.(w.sourceEvent,a,k,O),E?.(w.sourceEvent,k,O),A||I?.(w.sourceEvent,O)}}}).filter(w=>{const C=w.target;return!w.button&&(!z||!_c(C,`.${z}`,m))&&(!M||_c(C,M,m))});f.call(T)}function S(){f?.on(".drag",null)}return{update:b,destroy:S}}function cp(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Wo(o,qr(i))>0&&r.push(i);return r}const up=250;function dp(e,t,n,r){let o=[],i=1/0;const s=cp(e,n,t+up);for(const a of s){const l=[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]];for(const u of l){if(r.nodeId===u.nodeId&&r.type===u.type&&r.id===u.id)continue;const{x:d,y:h}=Nn(a,u,u.position,!0),f=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));f>t||(f<i?(o=[{...u,x:d,y:h}],i=f):f===i&&o.push({...u,x:d,y:h}))}}if(!o.length)return null;if(o.length>1){const a=r.type==="source"?"target":"source";return o.find(l=>l.type===a)??o[0]}return o[0]}function wc(e,t,n,r,o,i=!1){const s=r.get(e);if(!s)return null;const a=o==="strict"?s.internals.handleBounds?.[t]:[...s.internals.handleBounds?.source??[],...s.internals.handleBounds?.target??[]],l=(n?a?.find(u=>u.id===n):a?.[0])??null;return l&&i?{...l,...Nn(s,l,l.position,!0)}:l}function xc(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function fp(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const kc=()=>!0;function hp(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:a,nodeLookup:l,lib:u,autoPanOnConnect:d,flowId:h,panBy:f,cancelConnection:g,onConnectStart:v,onConnect:p,onConnectEnd:b,isValidConnection:S=kc,onReconnectEnd:z,updateConnection:M,getTransform:m,getFromHandle:x,autoPanSpeed:A,dragThreshold:R=1,handleDomNode:q}){const P=rc(e.target);let N=0,T;const{x:w,y:C}=Ct(e),y=xc(i,q),E=a?.getBoundingClientRect();let I=!1;if(!E||!y)return;const k=wc(o,y,r,l,t);if(!k)return;let O=Ct(e,E),D=!1,H=null,K=!1,Q=null;function j(){if(!d||!E)return;const[re,be]=us(O,E,A);f({x:re,y:be}),N=requestAnimationFrame(j)}const W={...k,nodeId:o,type:y,position:k.position},Z=l.get(o);let X={inProgress:!0,isValid:null,from:Nn(Z,W,ie.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:Z,to:O,toHandle:null,toPosition:Xl[W.position],toNode:null,pointer:O};function ee(){I=!0,M(X),v?.(e,{nodeId:o,handleId:r,handleType:y})}R===0&&ee();function de(re){if(!I){const{x:me,y:te}=Ct(re),ge=me-w,xe=te-C;if(!(ge*ge+xe*xe>R*R))return;ee()}if(!x()||!W){we(re);return}const be=m();O=Ct(re,E),T=dp(Wr(O,be,!1,[1,1]),n,l,W),D||(j(),D=!0);const he=Sc(re,{handle:T,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:S,doc:P,lib:u,flowId:h,nodeLookup:l});Q=he.handleDomNode,H=he.connection,K=fp(!!T,he.isValid);const _e=l.get(o),Ve=_e?Nn(_e,W,ie.Left,!0):X.from,le={...X,from:Ve,isValid:K,to:he.toHandle&&K?or({x:he.toHandle.x,y:he.toHandle.y},be):O,toHandle:he.toHandle,toPosition:K&&he.toHandle?he.toHandle.position:Xl[W.position],toNode:he.toHandle?l.get(he.toHandle.nodeId):null,pointer:O};M(le),X=le}function we(re){if(!("touches"in re&&re.touches.length>0)){if(I){(T||Q)&&H&&K&&p?.(H);const{inProgress:be,...he}=X,_e={...he,toPosition:X.toHandle?X.toPosition:null};b?.(re,_e),i&&z?.(re,_e)}g(),cancelAnimationFrame(N),D=!1,K=!1,H=null,Q=null,P.removeEventListener("mousemove",de),P.removeEventListener("mouseup",we),P.removeEventListener("touchmove",de),P.removeEventListener("touchend",we)}}P.addEventListener("mousemove",de),P.addEventListener("mouseup",we),P.addEventListener("touchmove",de),P.addEventListener("touchend",we)}function Sc(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:a,flowId:l,isValidConnection:u=kc,nodeLookup:d}){const h=i==="target",f=t?s.querySelector(`.${a}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:v}=Ct(e),p=s.elementFromPoint(g,v),b=p?.classList.contains(`${a}-flow__handle`)?p:f,S={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const z=xc(void 0,b),M=b.getAttribute("data-nodeid"),m=b.getAttribute("data-handleid"),x=b.classList.contains("connectable"),A=b.classList.contains("connectableend");if(!M||!z)return S;const R={source:h?M:r,sourceHandle:h?m:o,target:h?r:M,targetHandle:h?o:m};S.connection=R;const P=x&&A&&(n===tr.Strict?h&&z==="source"||!h&&z==="target":M!==r||m!==o);S.isValid=P&&u(R),S.toHandle=wc(M,z,m,d,n,!0)}return S}const Ec={onPointerDown:hp,isValid:Sc},Zo=e=>({x:e.x,y:e.y,zoom:e.k}),ws=({x:e,y:t,zoom:n})=>Do.translate(e,t).scale(n),gn=(e,t)=>e.target.closest(`.${t}`),Tc=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),gp=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,xs=(e,t=0,n=gp,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},Cc=e=>{const t=e.ctrlKey&&Fo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function vp({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(gn(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(d.ctrlKey&&s){const b=Rt(d),S=Cc(d),z=h*Math.pow(2,S);r.scaleTo(n,z,b,d);return}const f=d.deltaMode===1?20:1;let g=o===nr.Vertical?0:d.deltaX*f,v=o===nr.Horizontal?0:d.deltaY*f;!Fo()&&d.shiftKey&&o!==nr.Vertical&&(g=d.deltaY*f,v=0),r.translateBy(n,-(g/h)*i,-(v/h)*i,{internal:!0});const p=Zo(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?l?.(d,p):(e.isPanScrolling=!0,a?.(d,p)),e.panScrollTimeout=setTimeout(()=>{u?.(d,p),e.isPanScrolling=!1},150)}}function mp({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,a=gn(r,e);if(r.ctrlKey&&i&&a&&r.preventDefault(),s||a)return null;r.preventDefault(),n.call(this,r,o)}}function pp({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;const o=Zo(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,o)}}function yp({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{e.usedRightMouseButton=!!(n&&Tc(t,e.mouseButton??0)),i.sourceEvent?.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!i.sourceEvent?.internal&&o?.(i.sourceEvent,Zo(i.transform))}}function bp({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{if(!s.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&Tc(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const a=Zo(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(s.sourceEvent,a)},n?150:0)}}}function _p({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:l,noPanClassName:u,lib:d,connectionInProgress:h}){return f=>{const g=t||n,v=r&&f.ctrlKey,p=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(gn(f,`${d}-flow__node`)||gn(f,`${d}-flow__edge`)||gn(f,`${d}-flow__selection`)||gn(f,`${d}-flow__nodesselection`)))return!0;if(!o&&!g&&!i&&!s&&!r||a||h&&!p||gn(f,l)&&p||gn(f,u)&&(!p||i&&p&&!t)||!r&&f.ctrlKey&&p)return!1;if(!r&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!g&&!i&&!v&&p||!o&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(o)&&!o.includes(f.button)&&f.type==="mousedown")return!1;const b=Array.isArray(o)&&o.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||p||e)&&b}}function wp({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:a,onDraggingChange:l}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect();let h=[[0,0],[d.width,d.height]];(typeof ResizeObserver<"u"?new ResizeObserver(C=>{const y=C[0];y&&(h=[[0,0],[y.contentRect.width,y.contentRect.height]])}):null)?.observe(e);const g=wm().extent(()=>h).scaleExtent([t,n]).translateExtent(r),v=St(e).call(g);m({x:o.x,y:o.y,zoom:rr(o.zoom,t,n)},[[0,0],[d.width,d.height]],r);const p=v.on("wheel.zoom"),b=v.on("dblclick.zoom");g.wheelDelta(Cc);async function S(C,y){return v?new Promise(E=>{g?.interpolate(y?.interpolate==="linear"?Pr:To).transform(xs(v,y?.duration,y?.ease,()=>E(!0)),C)}):!1}function z({noWheelClassName:C,noPanClassName:y,onPaneContextMenu:E,userSelectionActive:I,panOnScroll:k,panOnDrag:O,panOnScrollMode:D,panOnScrollSpeed:H,preventScrolling:K,zoomOnPinch:Q,zoomOnScroll:j,zoomOnDoubleClick:W,panActivationKeyPressed:Z=!1,zoomActivationKeyPressed:U,lib:X,onTransformChange:ee,connectionInProgress:de,paneClickDistance:we,selectionOnDrag:re}){I&&!u.isZoomingOrPanning&&M();const be=k&&!U&&!I;g.clickDistance(re?1/0:!on(we)||we<0?0:we);const he=be?vp({zoomPanValues:u,noWheelClassName:C,d3Selection:v,d3Zoom:g,panOnScrollMode:D,panOnScrollSpeed:H,zoomOnPinch:Q,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:a}):mp({noWheelClassName:C,preventScrolling:K,d3ZoomHandler:p});v.on("wheel.zoom",he,{passive:!1});const _e=pp({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:s});g.on("start",_e);const Ve=yp({zoomPanValues:u,panOnDrag:O,onPaneContextMenu:!!E,onPanZoom:i,onTransformChange:ee});g.on("zoom",Ve);const le=bp({zoomPanValues:u,panOnDrag:O,panOnScroll:k,onPaneContextMenu:E,onPanZoomEnd:a,onDraggingChange:l});g.on("end",le);const me=_p({panActivationKeyPressed:Z,zoomActivationKeyPressed:U,panOnDrag:O,zoomOnScroll:j,panOnScroll:k,zoomOnDoubleClick:W,zoomOnPinch:Q,userSelectionActive:I,noPanClassName:y,noWheelClassName:C,lib:X,connectionInProgress:de});g.filter(me),W?v.on("dblclick.zoom",b):v.on("dblclick.zoom",null)}function M(){g.on("zoom",null)}async function m(C,y,E){const I=ws(C),k=g?.constrain()(I,y,E);return k&&await S(k),k}async function x(C,y){const E=ws(C);return await S(E,y),E}function A(C){if(v){const y=ws(C),E=v.property("__zoom");(E.k!==C.zoom||E.x!==C.x||E.y!==C.y)&&g?.transform(v,y,null,{sync:!0})}}function R(){const C=v?Kl(v.node()):{x:0,y:0,k:1};return{x:C.x,y:C.y,zoom:C.k}}async function q(C,y){return v?new Promise(E=>{g?.interpolate(y?.interpolate==="linear"?Pr:To).scaleTo(xs(v,y?.duration,y?.ease,()=>E(!0)),C)}):!1}async function P(C,y){return v?new Promise(E=>{g?.interpolate(y?.interpolate==="linear"?Pr:To).scaleBy(xs(v,y?.duration,y?.ease,()=>E(!0)),C)}):!1}function N(C){g?.scaleExtent(C)}function T(C){g?.translateExtent(C)}function w(C){const y=!on(C)||C<0?0:C;g?.clickDistance(y)}return{update:z,destroy:M,setViewport:x,setViewportConstrained:m,getViewport:R,scaleTo:q,scaleBy:P,setScaleExtent:N,setTranslateExtent:T,syncViewport:A,setClickDistance:w}}var Ac;(function(e){e.Line="line",e.Handle="handle"})(Ac||(Ac={}));const xp=ec();function kp(e,t,n={}){return Fm(e,t,{...n,onError:n.onError??xp})}function ks(){const e={};return[t=>{if(t&&!Wu(e))throw new Error(t);return ci(e)},t=>Zs(e,t)]}const[Sp,Ep]=ks(),[Tp,Cp]=ks(),[Ap,Mp]=ks();var Ip=new Set(["$$slots","$$events","$$legacy","id","type","position","style","class","isConnectable","isConnectableStart","isConnectableEnd","isValidConnection","onconnect","ondisconnect","children"]),Np=G("<div><!></div>");function ar(e,t){se(t,!0);let n=Y(t,"id",3,null),r=Y(t,"type",3,"source"),o=Y(t,"position",19,()=>ie.Top),i=Y(t,"isConnectableStart",3,!0),s=Y(t,"isConnectableEnd",3,!0),a=xt(t,Ip);const l=Sp("Handle must be used within a Custom Node component"),u=Tp("Handle must be used within a Custom Node component");let d=_(()=>r()==="target"),h=_(()=>t.isConnectable!==void 0?t.isConnectable:u.value),f=Pn(),g=_(()=>f.ariaLabelConfig),v=null;ma(()=>{if(t.onconnect||t.ondisconnect){f.edges;let w=f.connectionLookup.get(`${l}-${r()}${n()?`-${n()}`:""}`);if(v&&!Rm(w,v)){const C=w??new Map;tc(v,C,t.ondisconnect),tc(C,v,t.onconnect)}v=new Map(w)}});let p=_(()=>{if(!f.connection.inProgress)return[!1,!1,!1,!1,null];const{fromHandle:w,toHandle:C,isValid:y}=f.connection,E=w&&w.nodeId===l&&w.type===r()&&w.id===n(),I=C&&C.nodeId===l&&C.type===r()&&C.id===n(),k=f.connectionMode===tr.Strict?w?.type!==r():l!==w?.nodeId||n()!==w?.id;return[!0,E,I,k,I&&y]}),b=_(()=>hr(c(p),5)),S=_(()=>c(b)[0]),z=_(()=>c(b)[1]),M=_(()=>c(b)[2]),m=_(()=>c(b)[3]),x=_(()=>c(b)[4]);function A(w){const C=f.onbeforeconnect?f.onbeforeconnect(w):w;C&&(f.addEdge(C),f.onconnect?.(w))}function R(w){const C=ic(w);w.currentTarget&&(C&&w.button===0||!C)&&Ec.onPointerDown(w,{handleId:n(),nodeId:l,isTarget:c(d),connectionRadius:f.connectionRadius,domNode:f.domNode,nodeLookup:f.nodeLookup,connectionMode:f.connectionMode,lib:"svelte",autoPanOnConnect:f.autoPanOnConnect,autoPanSpeed:f.autoPanSpeed,flowId:f.flowId,isValidConnection:t.isValidConnection||((...y)=>f.isValidConnection?.(...y)??!0),updateConnection:f.updateConnection,cancelConnection:f.cancelConnection,panBy:f.panBy,onConnect:A,onConnectStart:f.onconnectstart,onConnectEnd:(...y)=>f.onconnectend?.(...y),getTransform:()=>[f.viewport.x,f.viewport.y,f.viewport.zoom],getFromHandle:()=>f.connection.fromHandle,dragThreshold:f.connectionDragThreshold,handleDomNode:w.currentTarget})}function q(w){if(!l||!f.clickConnectStartHandle&&!i())return;if(!f.clickConnectStartHandle){f.onclickconnectstart?.(w,{nodeId:l,handleId:n(),handleType:r()}),f.clickConnectStartHandle={nodeId:l,type:r(),id:n()};return}const C=rc(w.target),y=t.isValidConnection??f.isValidConnection,{connectionMode:E,clickConnectStartHandle:I,flowId:k,nodeLookup:O}=f,{connection:D,isValid:H}=Ec.isValid(w,{handle:{nodeId:l,id:n(),type:r()},connectionMode:E,fromNodeId:I.nodeId,fromHandleId:I.id??null,fromType:I.type,isValidConnection:y,flowId:k,doc:C,lib:"svelte",nodeLookup:O});H&&D&&A(D);const K=structuredClone(Ks(f.connection));delete K.inProgress,K.toPosition=K.toHandle?K.toHandle.position:null,f.onclickconnectend?.(w,K),f.clickConnectStartHandle=null}var P=Np(),N=()=>{};gt(P,()=>({"data-handleid":n(),"data-nodeid":l,"data-handlepos":o(),"data-id":`${f.flowId??""}-${l??""}-${n()??"null"??""}-${r()??""}`,class:["svelte-flow__handle",`svelte-flow__handle-${o()}`,f.noDragClass,f.noPanClass,o(),t.class],onmousedown:R,ontouchstart:R,onclick:f.clickConnect?q:void 0,onkeypress:N,style:t.style,role:"button","aria-label":c(g)["handle.ariaLabel"],tabindex:"-1",...a,[fn]:{valid:c(x),connectingto:c(M),connectingfrom:c(z),source:!c(d),target:c(d),connectablestart:i(),connectableend:s(),connectable:c(h),connectionindicator:c(h)&&(!c(S)||c(m))&&(c(S)||f.clickConnectStartHandle?s():i())}}));var T=V(P);qe(T,()=>t.children??ct),L(e,P),ae()}var Pp=G("<!> <!>",1);function Mc(e,t){se(t,!0);let n=Y(t,"targetPosition",19,()=>ie.Top),r=Y(t,"sourcePosition",19,()=>ie.Bottom);var o=Pp(),i=ce(o);ar(i,{type:"target",get position(){return n()}});var s=F(i),a=F(s);ar(a,{type:"source",get position(){return r()}}),J(()=>$(s,` ${t.data?.label??""} `)),L(e,o),ae()}var zp=G(" <!>",1);function Op(e,t){se(t,!0);let n=Y(t,"data",19,()=>({label:"Node"})),r=Y(t,"sourcePosition",19,()=>ie.Bottom);var o=zp(),i=ce(o),s=F(i);ar(s,{type:"source",get position(){return r()}}),J(()=>$(i,`${n()?.label??""} `)),L(e,o),ae()}var Rp=G(" <!>",1);function Dp(e,t){se(t,!0);let n=Y(t,"data",19,()=>({label:"Node"})),r=Y(t,"targetPosition",19,()=>ie.Top);var o=Rp(),i=ce(o),s=F(i);ar(s,{type:"target",get position(){return r()}}),J(()=>$(i,`${n()?.label??""} `)),L(e,o),ae()}function Hp(e,t){}function Ss(e,t,n){if(!n||!t)return;const r=n==="root"?t:t.querySelector(`.svelte-flow__${n}`);r&&r.appendChild(e)}function Bp(e,t){const n=_(Pn),r=_(()=>c(n).domNode);let o;return c(r)?Ss(e,c(r),t):o=pa(()=>{ot(()=>{Ss(e,c(r),t),o?.()})}),{async update(i){Ss(e,c(r),i)},destroy(){e.parentNode&&e.parentNode.removeChild(e),o?.()}}}function Lp(){let e=oe(typeof window>"u");if(c(e)){const t=pa(()=>{ot(()=>{B(e,!1),t?.()})})}return{get value(){return c(e)}}}const Ic=e=>km(e),qp=e=>jl(e);function Lt(e){return e===void 0?void 0:`${e}px`}const Yo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Vp=new Set(["$$slots","$$events","$$legacy","x","y","width","height","selectEdgeOnClick","transparent","class","children"]),Wp=G("<div><!></div>");function Fp(e,t){se(t,!0);let n=Y(t,"x",3,0),r=Y(t,"y",3,0),o=Y(t,"selectEdgeOnClick",3,!1),i=Y(t,"transparent",3,!1),s=xt(t,Vp);const a=Pn(),l=Ap("EdgeLabel must be used within a Custom Edge component");let u=_(()=>a.visible.edges.get(l)?.zIndex);var d=Wp(),h=()=>{o()&&l&&a.handleEdgeSelection(l)};gt(d,g=>({class:["svelte-flow__edge-label",{transparent:i()},t.class],tabindex:"-1",onclick:h,...s,[$t]:g}),[()=>({display:Lp().value?"none":void 0,cursor:o()?"pointer":void 0,transform:`translate(-50%, -50%) translate(${n()??""}px,${r()??""}px)`,"pointer-events":"all",width:Lt(t.width),height:Lt(t.height),"z-index":c(u)})],void 0,void 0,"svelte-qyfwwc");var f=V(d);qe(f,()=>t.children??ct),Qe(d,(g,v)=>Bp?.(g,v),()=>"edge-labels"),L(e,d),ae()}var Kp=new Set(["$$slots","$$events","$$legacy","id","path","label","labelX","labelY","labelStyle","markerStart","markerEnd","style","interactionWidth","class"]),Zp=Le("<path></path>"),Yp=Le('<path fill="none"></path><!><!>',1);function Xo(e,t){let n=Y(t,"interactionWidth",3,20),r=xt(t,Kp);var o=Yp(),i=ce(o),s=F(i);{var a=d=>{var h=Zp();gt(h,()=>({d:t.path,"stroke-opacity":0,"stroke-width":n(),fill:"none",class:"svelte-flow__edge-interaction",...r})),L(d,h)};pe(s,d=>{n()>0&&d(a)})}var l=F(s);{var u=d=>{Fp(d,{get x(){return t.labelX},get y(){return t.labelY},get style(){return t.labelStyle},selectEdgeOnClick:!0,children:(h,f)=>{var g=xr();J(()=>$(g,t.label)),L(h,g)},$$slots:{default:!0}})};pe(l,d=>{t.label&&d(u)})}J(()=>{ne(i,"id",t.id),ne(i,"d",t.path),Ot(i,0,Sn(["svelte-flow__edge-path",t.class])),ne(i,"marker-start",t.markerStart),ne(i,"marker-end",t.markerEnd),st(i,t.style)}),L(e,o)}function Nc(e,t){se(t,!0);let n=_(()=>lc({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,curvature:t.pathOptions?.curvature})),r=_(()=>hr(c(n),3)),o=_(()=>c(r)[0]),i=_(()=>c(r)[1]),s=_(()=>c(r)[2]);Xo(e,{get id(){return t.id},get path(){return c(o)},get labelX(){return c(i)},get labelY(){return c(s)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),ae()}function Xp(e,t){se(t,!0);let n=_(()=>gs({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition})),r=_(()=>hr(c(n),3)),o=_(()=>c(r)[0]),i=_(()=>c(r)[1]),s=_(()=>c(r)[2]);Xo(e,{get path(){return c(o)},get labelX(){return c(i)},get labelY(){return c(s)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),ae()}function jp(e,t){se(t,!0);let n=_(()=>uc({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY})),r=_(()=>hr(c(n),3)),o=_(()=>c(r)[0]),i=_(()=>c(r)[1]),s=_(()=>c(r)[2]);Xo(e,{get path(){return c(o)},get labelX(){return c(i)},get labelY(){return c(s)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),ae()}function Gp(e,t){se(t,!0);let n=_(()=>gs({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,borderRadius:0})),r=_(()=>hr(c(n),3)),o=_(()=>c(r)[0]),i=_(()=>c(r)[1]),s=_(()=>c(r)[2]);Xo(e,{get path(){return c(o)},get labelX(){return c(i)},get labelY(){return c(s)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),ae()}function Up(e,t,n,r){const o=new Map;return cs(e,{x:0,y:0,width:n,height:r},t,!0).forEach(i=>{o.set(i.id,i)}),o}function Pc(e){const{edges:t,defaultEdgeOptions:n,nodeLookup:r,previousEdges:o,connectionMode:i,onerror:s,onlyRenderVisible:a,elevateEdgesOnSelect:l,zIndexMode:u}=e,d=new Map;for(const h of t){const f=r.get(h.source),g=r.get(h.target);if(!f||!g)continue;if(a){const{visibleNodes:b,transform:S,width:z,height:M}=e;if(qm({sourceNode:f,targetNode:g,width:z,height:M,transform:S}))b.set(f.id,f),b.set(g.id,g);else continue}const v=o.get(h.id);if(v&&h===v.edge&&f==v.sourceNode&&g==v.targetNode){d.set(h.id,v);continue}const p=Xm({id:h.id,sourceNode:f,targetNode:g,sourceHandle:h.sourceHandle||null,targetHandle:h.targetHandle||null,connectionMode:i,onError:s});p&&d.set(h.id,{...n,...h,...p,zIndex:Lm({selected:h.selected,zIndex:h.zIndex??n.zIndex,sourceNode:f,targetNode:g,elevateOnSelect:l,zIndexMode:u}),sourceNode:f,targetNode:g,edge:h})}return d}const Qp=ec(),zc={input:Op,output:Dp,default:Mc,group:Hp},Oc={straight:jp,smoothstep:Xp,default:Nc,step:Gp};function Jp(e,t,n,r,o,i){if(t&&!n&&r&&o){const s=Bo(i,{filter:a=>!!((a.width||a.initialWidth)&&(a.height||a.initialHeight))});return fs(s,r,o,.5,2,.1)}else return n??{x:0,y:0,zoom:1}}function $p(e){class t{#e=_(()=>e.props.id??"1");get flowId(){return c(this.#e)}set flowId(r){B(this.#e,r)}#n=oe(null);get domNode(){return c(this.#n)}set domNode(r){B(this.#n,r)}#t=oe(null);get panZoom(){return c(this.#t)}set panZoom(r){B(this.#t,r)}#s=oe(e.width??0);get width(){return c(this.#s)}set width(r){B(this.#s,r)}#r=oe(e.height??0);get height(){return c(this.#r)}set height(r){B(this.#r,r)}#o=oe(e.props.zIndexMode??"basic");get zIndexMode(){return c(this.#o)}set zIndexMode(r){B(this.#o,r)}#i=_(()=>{const{nodesInitialized:r}=$m(e.nodes,this.nodeLookup,this.parentLookup,{nodeExtent:this.nodeExtent,nodeOrigin:this.nodeOrigin,elevateNodesOnSelect:e.props.elevateNodesOnSelect??!0,checkEquality:!0,zIndexMode:this.zIndexMode});return this.fitViewQueued&&r&&(this.fitViewOptions?.duration?this.resolveFitView():queueMicrotask(()=>{this.resolveFitView()})),r});get nodesInitialized(){return c(this.#i)}set nodesInitialized(r){B(this.#i,r)}#l=_(()=>this.panZoom!==null);get viewportInitialized(){return c(this.#l)}set viewportInitialized(r){B(this.#l,r)}#a=_(()=>(ip(this.connectionLookup,this.edgeLookup,e.edges),e.edges));get _edges(){return c(this.#a)}set _edges(r){B(this.#a,r)}get nodes(){return this.nodesInitialized,e.nodes}set nodes(r){e.nodes=r}get edges(){return this._edges}set edges(r){e.edges=r}_prevSelectedNodes=[];_prevSelectedNodeIds=new Set;#g=_(()=>{const r=this._prevSelectedNodeIds.size,o=new Set,i=this.nodes.filter(s=>(s.selected&&(o.add(s.id),this._prevSelectedNodeIds.delete(s.id)),s.selected));return(r!==o.size||this._prevSelectedNodeIds.size>0)&&(this._prevSelectedNodes=i),this._prevSelectedNodeIds=o,this._prevSelectedNodes});get selectedNodes(){return c(this.#g)}set selectedNodes(r){B(this.#g,r)}_prevSelectedEdges=[];_prevSelectedEdgeIds=new Set;#c=_(()=>{const r=this._prevSelectedEdgeIds.size,o=new Set,i=this.edges.filter(s=>(s.selected&&(o.add(s.id),this._prevSelectedEdgeIds.delete(s.id)),s.selected));return(r!==o.size||this._prevSelectedEdgeIds.size>0)&&(this._prevSelectedEdges=i),this._prevSelectedEdgeIds=o,this._prevSelectedEdges});get selectedEdges(){return c(this.#c)}set selectedEdges(r){B(this.#c,r)}selectionChangeHandlers=new Map;nodeLookup=new Map;parentLookup=new Map;connectionLookup=new Map;edgeLookup=new Map;_prevVisibleEdges=new Map;#u=_(()=>{const{nodes:r,_edges:o,_prevVisibleEdges:i,nodeLookup:s,connectionMode:a,onerror:l,onlyRenderVisibleElements:u,defaultEdgeOptions:d,zIndexMode:h}=this;let f,g;const v={edges:o,defaultEdgeOptions:d,previousEdges:i,nodeLookup:s,connectionMode:a,elevateEdgesOnSelect:e.props.elevateEdgesOnSelect??!0,zIndexMode:h,onerror:l};if(u){const{viewport:p,width:b,height:S}=this,z=[p.x,p.y,p.zoom];f=Up(s,z,b,S),g=Pc({...v,onlyRenderVisible:!0,visibleNodes:f,transform:z,width:b,height:S})}else f=this.nodeLookup,g=Pc(v);return this._prevVisibleEdges=g,{nodes:f,edges:g}});get visible(){return c(this.#u)}set visible(r){B(this.#u,r)}#f=_(()=>e.props.nodesDraggable??!0);get nodesDraggable(){return c(this.#f)}set nodesDraggable(r){B(this.#f,r)}#m=_(()=>e.props.nodesConnectable??!0);get nodesConnectable(){return c(this.#m)}set nodesConnectable(r){B(this.#m,r)}#d=_(()=>e.props.elementsSelectable??!0);get elementsSelectable(){return c(this.#d)}set elementsSelectable(r){B(this.#d,r)}#y=_(()=>e.props.nodesFocusable??!0);get nodesFocusable(){return c(this.#y)}set nodesFocusable(r){B(this.#y,r)}#p=_(()=>e.props.edgesFocusable??!0);get edgesFocusable(){return c(this.#p)}set edgesFocusable(r){B(this.#p,r)}#w=_(()=>e.props.disableKeyboardA11y??!1);get disableKeyboardA11y(){return c(this.#w)}set disableKeyboardA11y(r){B(this.#w,r)}#x=_(()=>e.props.minZoom??.5);get minZoom(){return c(this.#x)}set minZoom(r){B(this.#x,r)}#b=_(()=>e.props.maxZoom??2);get maxZoom(){return c(this.#b)}set maxZoom(r){B(this.#b,r)}#h=_(()=>e.props.nodeOrigin??[0,0]);get nodeOrigin(){return c(this.#h)}set nodeOrigin(r){B(this.#h,r)}#_=_(()=>e.props.nodeExtent??ss);get nodeExtent(){return c(this.#_)}set nodeExtent(r){B(this.#_,r)}#v=_(()=>e.props.translateExtent??ss);get translateExtent(){return c(this.#v)}set translateExtent(r){B(this.#v,r)}#k=_(()=>e.props.defaultEdgeOptions??{});get defaultEdgeOptions(){return c(this.#k)}set defaultEdgeOptions(r){B(this.#k,r)}#S=_(()=>e.props.nodeDragThreshold??1);get nodeDragThreshold(){return c(this.#S)}set nodeDragThreshold(r){B(this.#S,r)}#E=_(()=>e.props.autoPanOnNodeDrag??!0);get autoPanOnNodeDrag(){return c(this.#E)}set autoPanOnNodeDrag(r){B(this.#E,r)}#T=_(()=>e.props.autoPanOnConnect??!0);get autoPanOnConnect(){return c(this.#T)}set autoPanOnConnect(r){B(this.#T,r)}#C=_(()=>e.props.autoPanOnNodeFocus??!0);get autoPanOnNodeFocus(){return c(this.#C)}set autoPanOnNodeFocus(r){B(this.#C,r)}#A=_(()=>e.props.autoPanSpeed??15);get autoPanSpeed(){return c(this.#A)}set autoPanSpeed(r){B(this.#A,r)}#M=_(()=>e.props.connectionDragThreshold??1);get connectionDragThreshold(){return c(this.#M)}set connectionDragThreshold(r){B(this.#M,r)}fitViewQueued=e.props.fitView??!1;fitViewOptions=e.props.fitViewOptions;fitViewResolver=null;#I=_(()=>e.props.snapGrid??null);get snapGrid(){return c(this.#I)}set snapGrid(r){B(this.#I,r)}#N=oe(!1);get dragging(){return c(this.#N)}set dragging(r){B(this.#N,r)}#P=oe(null);get selectionRect(){return c(this.#P)}set selectionRect(r){B(this.#P,r)}#z=oe(!1);get selectionKeyPressed(){return c(this.#z)}set selectionKeyPressed(r){B(this.#z,r)}#O=oe(!1);get multiselectionKeyPressed(){return c(this.#O)}set multiselectionKeyPressed(r){B(this.#O,r)}#R=oe(!1);get deleteKeyPressed(){return c(this.#R)}set deleteKeyPressed(r){B(this.#R,r)}#D=oe(!1);get panActivationKeyPressed(){return c(this.#D)}set panActivationKeyPressed(r){B(this.#D,r)}#H=oe(!1);get zoomActivationKeyPressed(){return c(this.#H)}set zoomActivationKeyPressed(r){B(this.#H,r)}#B=oe(null);get selectionRectMode(){return c(this.#B)}set selectionRectMode(r){B(this.#B,r)}#L=oe("");get ariaLiveMessage(){return c(this.#L)}set ariaLiveMessage(r){B(this.#L,r)}#q=_(()=>e.props.selectionMode??Ho.Partial);get selectionMode(){return c(this.#q)}set selectionMode(r){B(this.#q,r)}#V=_(()=>({...zc,...e.props.nodeTypes}));get nodeTypes(){return c(this.#V)}set nodeTypes(r){B(this.#V,r)}#W=_(()=>({...Oc,...e.props.edgeTypes}));get edgeTypes(){return c(this.#W)}set edgeTypes(r){B(this.#W,r)}#F=_(()=>e.props.noPanClass??"nopan");get noPanClass(){return c(this.#F)}set noPanClass(r){B(this.#F,r)}#K=_(()=>e.props.noDragClass??"nodrag");get noDragClass(){return c(this.#K)}set noDragClass(r){B(this.#K,r)}#Z=_(()=>e.props.noWheelClass??"nowheel");get noWheelClass(){return c(this.#Z)}set noWheelClass(r){B(this.#Z,r)}#Y=_(()=>Om(e.props.ariaLabelConfig));get ariaLabelConfig(){return c(this.#Y)}set ariaLabelConfig(r){B(this.#Y,r)}#X=oe(Jp(this.nodesInitialized,e.props.fitView,e.props.initialViewport,this.width,this.height,this.nodeLookup));get _viewport(){return c(this.#X)}set _viewport(r){B(this.#X,r)}get viewport(){return e.viewport??this._viewport}set viewport(r){e.viewport&&(e.viewport=r),this._viewport=r}#j=oe(as);get _connection(){return c(this.#j)}set _connection(r){B(this.#j,r)}#G=_(()=>this._connection.inProgress?{...this._connection,to:Wr(this._connection.to,[this.viewport.x,this.viewport.y,this.viewport.zoom])}:this._connection);get connection(){return c(this.#G)}set connection(r){B(this.#G,r)}#U=_(()=>e.props.connectionMode??tr.Strict);get connectionMode(){return c(this.#U)}set connectionMode(r){B(this.#U,r)}#Q=_(()=>e.props.connectionRadius??20);get connectionRadius(){return c(this.#Q)}set connectionRadius(r){B(this.#Q,r)}#J=_(()=>e.props.isValidConnection??(()=>!0));get isValidConnection(){return c(this.#J)}set isValidConnection(r){B(this.#J,r)}#$=_(()=>e.props.selectNodesOnDrag??!0);get selectNodesOnDrag(){return c(this.#$)}set selectNodesOnDrag(r){B(this.#$,r)}#ee=_(()=>e.props.defaultMarkerColor===void 0?"#b1b1b7":e.props.defaultMarkerColor);get defaultMarkerColor(){return c(this.#ee)}set defaultMarkerColor(r){B(this.#ee,r)}#te=_(()=>jm(e.edges,{defaultColor:this.defaultMarkerColor,id:this.flowId,defaultMarkerStart:this.defaultEdgeOptions.markerStart,defaultMarkerEnd:this.defaultEdgeOptions.markerEnd}));get markers(){return c(this.#te)}set markers(r){B(this.#te,r)}#ne=_(()=>e.props.onlyRenderVisibleElements??!1);get onlyRenderVisibleElements(){return c(this.#ne)}set onlyRenderVisibleElements(r){B(this.#ne,r)}#re=_(()=>e.props.onflowerror??Qp);get onerror(){return c(this.#re)}set onerror(r){B(this.#re,r)}#oe=_(()=>e.props.ondelete);get ondelete(){return c(this.#oe)}set ondelete(r){B(this.#oe,r)}#ie=_(()=>e.props.onbeforedelete);get onbeforedelete(){return c(this.#ie)}set onbeforedelete(r){B(this.#ie,r)}#se=_(()=>e.props.onbeforeconnect);get onbeforeconnect(){return c(this.#se)}set onbeforeconnect(r){B(this.#se,r)}#ae=_(()=>e.props.onconnect);get onconnect(){return c(this.#ae)}set onconnect(r){B(this.#ae,r)}#le=_(()=>e.props.onconnectstart);get onconnectstart(){return c(this.#le)}set onconnectstart(r){B(this.#le,r)}#ce=_(()=>e.props.onconnectend);get onconnectend(){return c(this.#ce)}set onconnectend(r){B(this.#ce,r)}#ue=_(()=>e.props.onbeforereconnect);get onbeforereconnect(){return c(this.#ue)}set onbeforereconnect(r){B(this.#ue,r)}#de=_(()=>e.props.onreconnect);get onreconnect(){return c(this.#de)}set onreconnect(r){B(this.#de,r)}#fe=_(()=>e.props.onreconnectstart);get onreconnectstart(){return c(this.#fe)}set onreconnectstart(r){B(this.#fe,r)}#he=_(()=>e.props.onreconnectend);get onreconnectend(){return c(this.#he)}set onreconnectend(r){B(this.#he,r)}#ge=_(()=>e.props.clickConnect??!0);get clickConnect(){return c(this.#ge)}set clickConnect(r){B(this.#ge,r)}#ve=_(()=>e.props.onclickconnectstart);get onclickconnectstart(){return c(this.#ve)}set onclickconnectstart(r){B(this.#ve,r)}#me=_(()=>e.props.onclickconnectend);get onclickconnectend(){return c(this.#me)}set onclickconnectend(r){B(this.#me,r)}#pe=oe(null);get clickConnectStartHandle(){return c(this.#pe)}set clickConnectStartHandle(r){B(this.#pe,r)}#ye=_(()=>e.props.onselectiondrag);get onselectiondrag(){return c(this.#ye)}set onselectiondrag(r){B(this.#ye,r)}#be=_(()=>e.props.onselectiondragstart);get onselectiondragstart(){return c(this.#be)}set onselectiondragstart(r){B(this.#be,r)}#_e=_(()=>e.props.onselectiondragstop);get onselectiondragstop(){return c(this.#_e)}set onselectiondragstop(r){B(this.#_e,r)}resolveFitView=async()=>{this.panZoom&&(await Cm({nodes:this.nodeLookup,width:this.width,height:this.height,panZoom:this.panZoom,minZoom:this.minZoom,maxZoom:this.maxZoom},this.fitViewOptions),this.fitViewResolver?.resolve(!0),this.fitViewQueued=!1,this.fitViewOptions=void 0,this.fitViewResolver=null)};_prefersDark=new Bf("(prefers-color-scheme: dark)",e.props.colorModeSSR==="dark");#we=_(()=>e.props.colorMode==="system"?this._prefersDark.current?"dark":"light":e.props.colorMode??"light");get colorMode(){return c(this.#we)}set colorMode(r){B(this.#we,r)}constructor(){}resetStoreValues(){this.dragging=!1,this.selectionRect=null,this.selectionRectMode=null,this.selectionKeyPressed=!1,this.multiselectionKeyPressed=!1,this.deleteKeyPressed=!1,this.panActivationKeyPressed=!1,this.zoomActivationKeyPressed=!1,this._connection=as,this.clickConnectStartHandle=null,this.viewport=e.props.initialViewport??{x:0,y:0,zoom:1},this.ariaLiveMessage=""}}return new t}const e0=Mn.error001("svelte");function Pn(){const e=ci(Es);if(!e)throw new Error(e0);return e.getStore()}const Es=Symbol();function t0(e){const t=$p(e);function n(T){t.nodeTypes={...zc,...T}}function r(T){t.edgeTypes={...Oc,...T}}function o(T){t.edges=kp(T,t.edges,{onError:t.onerror})}const i=(T,w=!1)=>{t.nodes=t.nodes.map(C=>{if(t.connection.inProgress&&t.connection.fromNode.id===C.id){const E=t.nodeLookup.get(C.id);E&&(t.connection={...t.connection,from:Nn(E,t.connection.fromHandle,ie.Left,!0)})}const y=T.get(C.id);return y?{...C,position:y.position,dragging:w}:C})};function s(T){const{changes:w,updatedInternals:C}=rp(T,t.nodeLookup,t.parentLookup,t.domNode,t.nodeOrigin,t.nodeExtent,t.zIndexMode);if(!C)return;Qm(t.nodeLookup,t.parentLookup,{nodeOrigin:t.nodeOrigin,nodeExtent:t.nodeExtent,zIndexMode:t.zIndexMode}),t.fitViewQueued&&t.resolveFitView();const y=new Map;for(const E of w){const I=t.nodeLookup.get(E.id)?.internals.userNode;if(!I)continue;const k={...I};switch(E.type){case"dimensions":{const O={...k.measured,...E.dimensions};E.setAttributes&&(k.width=E.dimensions?.width??k.width,k.height=E.dimensions?.height??k.height),k.measured=O;break}case"position":k.position=E.position??k.position;break}y.set(E.id,k)}t.nodes=t.nodes.map(E=>y.get(E.id)??E)}function a(T){const w=t.fitViewResolver??Promise.withResolvers();return t.fitViewQueued=!0,t.fitViewOptions=T,t.fitViewResolver=w,t.nodes=[...t.nodes],w.promise}async function l(T,w,C){const y=typeof C?.zoom<"u"?C.zoom:t.maxZoom,E=t.panZoom;return E?(await E.setViewport({x:t.width/2-T*y,y:t.height/2-w*y,zoom:y},{duration:C?.duration,ease:C?.ease,interpolate:C?.interpolate}),!0):!1}async function u(T,w){const C=t.panZoom;return C?C.scaleBy(T,w):!1}async function d(T){return u(1.2,T)}function h(T){return u(1/1.2,T)}function f(T){const w=t.panZoom;w&&(w.setScaleExtent([T,t.maxZoom]),t.minZoom=T)}function g(T){const w=t.panZoom;w&&(w.setScaleExtent([t.minZoom,T]),t.maxZoom=T)}function v(T){const w=t.panZoom;w&&(w.setTranslateExtent(T),t.translateExtent=T)}function p(T,w=null){let C=!1;const y=T.map(E=>(w?w.has(E.id):!0)&&E.selected?(C=!0,{...E,selected:!1}):E);return[C,y]}function b(T){const w=T?.nodes?new Set(T.nodes.map(O=>O.id)):null,[C,y]=p(t.nodes,w);C&&(t.nodes=y);const E=T?.edges?new Set(T.edges.map(O=>O.id)):null,[I,k]=p(t.edges,E);I&&(t.edges=k)}function S(T){const w=t.multiselectionKeyPressed;t.nodes=t.nodes.map(C=>{const y=T.includes(C.id),E=w&&C.selected||y;return!!C.selected!==E?{...C,selected:E}:C}),w||b({nodes:[]})}function z(T){const w=t.multiselectionKeyPressed;t.edges=t.edges.map(C=>{const y=T.includes(C.id),E=w&&C.selected||y;return!!C.selected!==E?{...C,selected:E}:C}),w||b({edges:[]})}function M(T,w,C){const y=t.nodeLookup.get(T);if(!y){t.onerror("012",Mn.error012(T));return}t.selectionRect=null,t.selectionRectMode=null,y.selected?(w||y.selected&&t.multiselectionKeyPressed)&&(b({nodes:[y.internals.userNode],edges:[]}),requestAnimationFrame(()=>C?.blur())):S([T])}function m(T){const w=t.edgeLookup.get(T);if(!w){t.onerror("016",Mn.error016(T));return}(w.selectable||t.elementsSelectable&&typeof w.selectable>"u")&&(t.selectionRect=null,t.selectionRectMode=null,w.selected?w.selected&&t.multiselectionKeyPressed&&b({nodes:[],edges:[w]}):z([T]))}function x(T,w){const{nodeExtent:C,snapGrid:y,nodeOrigin:E,nodeLookup:I,nodesDraggable:k,onerror:O}=t,D=new Map,H=y?.[0]??5,K=y?.[1]??5,Q=T.x*H*w,j=T.y*K*w;for(const W of I.values()){if(!(W.selected&&(W.draggable||k&&typeof W.draggable>"u")))continue;let U={x:W.internals.positionAbsolute.x+Q,y:W.internals.positionAbsolute.y+j};y&&(U=Vr(U,y));const{position:X,positionAbsolute:ee}=Gl({nodeId:W.id,nextPosition:U,nodeLookup:I,nodeExtent:C,nodeOrigin:E,onError:O});W.position=X,W.internals.positionAbsolute=ee,D.set(W.id,W)}i(D)}function A(T){return op({delta:T,panZoom:t.panZoom,transform:[t.viewport.x,t.viewport.y,t.viewport.zoom],translateExtent:t.translateExtent,width:t.width,height:t.height})}const R=T=>{t._connection={...T}};function q(){t._connection=as}function P(){t.resetStoreValues(),b()}return Object.assign(t,{setNodeTypes:n,setEdgeTypes:r,addEdge:o,updateNodePositions:i,updateNodeInternals:s,zoomIn:d,zoomOut:h,fitView:a,setCenter:l,setMinZoom:f,setMaxZoom:g,setTranslateExtent:v,unselectNodesAndEdges:b,addSelectedNodes:S,addSelectedEdges:z,handleNodeSelection:M,handleEdgeSelection:m,moveSelectedNodes:x,panBy:A,updateConnection:R,cancelConnection:q,reset:P})}function n0(e,t){const{minZoom:n,maxZoom:r,initialViewport:o,onPanZoomStart:i,onPanZoom:s,onPanZoomEnd:a,translateExtent:l,setPanZoomInstance:u,onDraggingChange:d,onTransformChange:h}=t,f=wp({domNode:e,minZoom:n,maxZoom:r,translateExtent:l,viewport:o,onPanZoom:s,onPanZoomStart:i,onPanZoomEnd:a,onDraggingChange:d}),g=f.getViewport();return(o.x!==g.x||o.y!==g.y||o.zoom!==g.zoom)&&h([g.x,g.y,g.zoom]),u(f),f.update(t),{update(v){f.update(v)}}}var r0=G('<div class="svelte-flow__zoom svelte-flow__container"><!></div>');function o0(e,t){se(t,!0);let n=Y(t,"store",15),r=_(()=>n().panActivationKeyPressed||t.panOnDrag),o=_(()=>n().panActivationKeyPressed||t.panOnScroll);const{viewport:i}=n();let s=!1;ot(()=>{!s&&n().viewportInitialized&&(t.oninit?.(),s=!0)});var a=r0(),l=V(a);qe(l,()=>t.children),Qe(a,(u,d)=>n0?.(u,d),()=>({viewport:n().viewport,minZoom:n().minZoom,maxZoom:n().maxZoom,initialViewport:i,onDraggingChange:u=>{n(n().dragging=u,!0)},setPanZoomInstance:u=>{n(n().panZoom=u,!0)},onPanZoomStart:t.onmovestart,onPanZoom:t.onmove,onPanZoomEnd:t.onmoveend,zoomOnScroll:t.zoomOnScroll,zoomOnDoubleClick:t.zoomOnDoubleClick,zoomOnPinch:t.zoomOnPinch,panOnScroll:c(o),panOnDrag:c(r),panOnScrollSpeed:t.panOnScrollSpeed,panOnScrollMode:t.panOnScrollMode,panActivationKeyPressed:n().panActivationKeyPressed,zoomActivationKeyPressed:n().zoomActivationKeyPressed,preventScrolling:typeof t.preventScrolling=="boolean"?t.preventScrolling:!0,noPanClassName:n().noPanClass,noWheelClassName:n().noWheelClass,userSelectionActive:!!n().selectionRect,translateExtent:n().translateExtent,lib:"svelte",paneClickDistance:t.paneClickDistance,selectionOnDrag:t.selectionOnDrag,onTransformChange:u=>{n(n().viewport={x:u[0],y:u[1],zoom:u[2]},!0)},connectionInProgress:n().connection.inProgress})),L(e,a),ae()}function Rc(e,t){return n=>{n.target===t&&e?.(n)}}function Dc(e){return t=>{const n=e.has(t.id);return!!t.selected!==n?{...t,selected:n}:t}}function Hc(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}var i0=G("<div><!></div>");function s0(e,t){se(t,!0);let n=Y(t,"store",15),r=Y(t,"panOnDrag",3,!0),o=Y(t,"paneClickDistance",3,1),i=Y(t,"autoPanOnSelection",3,!0),s,a=null,l=!1,u=new Set,d=new Set,h=_(()=>n().panActivationKeyPressed||r()),f=_(()=>n().selectionKeyPressed||!!n().selectionRect||t.selectionOnDrag&&c(h)!==!0),g=_(()=>n().elementsSelectable&&(c(f)||n().selectionRectMode==="user")),v=!1,p=0,b={x:0,y:0},S=!1;function z(k){if(k.pointerType==="touch"&&c(h)!==!1&&!n().selectionKeyPressed||(a=s?.getBoundingClientRect(),!a))return;const O=k.target===s,D=!O&&!!k.target.closest(".nokey"),H=t.selectionOnDrag&&O||n().selectionKeyPressed;if(D||!c(f)||!H||k.button!==0||!k.isPrimary)return;k.target?.setPointerCapture?.(k.pointerId),v=!1,S=!1;const{x:K,y:Q}=Ct(k,a),j=Wr({x:K,y:Q},[n().viewport.x,n().viewport.y,n().viewport.zoom]);n(n().selectionRect={width:0,height:0,startX:j.x,startY:j.y,x:K,y:Q},!0),O||(k.stopPropagation(),k.preventDefault())}function M(k,O){if(n().selectionRect?.startX===void 0||n().selectionRect.startY===void 0)return;const D={x:n().selectionRect?.startX,y:n().selectionRect?.startY},H=or(D,[n().viewport.x,n().viewport.y,n().viewport.zoom]),K={startX:D.x,startY:D.y,x:k<H.x?k:H.x,y:O<H.y?O:H.y,width:Math.abs(k-H.x),height:Math.abs(O-H.y)},Q=u,j=d;u=new Set(cs(n().nodeLookup,K,[n().viewport.x,n().viewport.y,n().viewport.zoom],n().selectionMode===Ho.Partial,!0).map(Z=>Z.id));const W=n().defaultEdgeOptions.selectable??!0;d=new Set;for(const Z of u){const U=n().connectionLookup.get(Z);if(U)for(const{edgeId:X}of U.values()){const ee=n().edgeLookup.get(X);ee&&(ee.selectable??W)&&d.add(X)}}Hc(Q,u)||n(n().nodes=n().nodes.map(Dc(u)),!0),Hc(j,d)||n(n().edges=n().edges.map(Dc(d)),!0),n(n().selectionRectMode="user",!0),n(n().selectionRect=K,!0)}function m(){if(!i()||!a)return;const[k,O]=us(b,a,n().autoPanSpeed);n().panBy({x:k,y:O}).then(D=>{if(!v||!D){p=requestAnimationFrame(m);return}M(b.x,b.y),p=requestAnimationFrame(m)})}function x(){cancelAnimationFrame(p),p=0,S=!1}uo(()=>{typeof window<"u"&&x()});function A(k){if(!c(f)||!a||!n().selectionRect)return;const O=Ct(k,a);b={x:O.x,y:O.y};const D={x:n().selectionRect.startX,y:n().selectionRect.startY},H=or(D,[n().viewport.x,n().viewport.y,n().viewport.zoom]);if(!v){const K=n().selectionKeyPressed?0:o();if(Math.hypot(O.x-H.x,O.y-H.y)<=K)return;n().unselectNodesAndEdges(),t.onselectionstart?.(k)}v=!0,S||(m(),S=!0),M(O.x,O.y)}function R(k){if(!c(g)){k.target===s&&n().connection.inProgress&&(l=!0);return}k.button===0&&(k.target?.releasePointerCapture?.(k.pointerId),!v&&k.target===s&&T?.(k),n(n().selectionRect=null,!0),v&&n(n().selectionRectMode=u.size>0?"nodes":null,!0),v&&t.onselectionend?.(k),x())}function q(k){k.target?.releasePointerCapture?.(k.pointerId),x()}const P=k=>{if(Array.isArray(c(h))&&c(h).includes(2)){k.preventDefault();return}t.onpanecontextmenu?.({event:k})},N=k=>{v&&(k.stopPropagation(),v=!1)};function T(k){if(v||n().connection.inProgress||l){v=!1,l=!1;return}t.onpaneclick?.({event:k}),n().unselectNodesAndEdges(),n(n().selectionRectMode=null,!0),n(n().selectionRect=null,!0)}var w=i0();let C;var y=_(()=>c(g)?void 0:Rc(T,s)),E=_(()=>Rc(P,s)),I=V(w);qe(I,()=>t.children),en(w,k=>s=k,()=>s),J(k=>C=Ot(w,1,"svelte-flow__pane svelte-flow__container",null,C,k),[()=>({draggable:r()===!0||Array.isArray(r())&&r().includes(0),dragging:n().dragging,selection:c(f)})]),Ie("click",w,function(...k){c(y)?.apply(this,k)}),kn("pointerdown",w,function(...k){(c(g)?z:void 0)?.apply(this,k)},!0),Ie("pointermove",w,function(...k){(c(g)?A:void 0)?.apply(this,k)}),Ie("pointerup",w,R),kn("pointercancel",w,function(...k){(c(g)?q:void 0)?.apply(this,k)}),Ie("contextmenu",w,function(...k){c(E)?.apply(this,k)}),kn("click",w,function(...k){(c(g)?N:void 0)?.apply(this,k)},!0),L(e,w),ae()}Yn(["click","pointermove","pointerup","contextmenu"]);var a0=G('<div class="svelte-flow__viewport xyflow__viewport svelte-flow__container"><!></div>');function l0(e,t){se(t,!0);var n=a0();let r;var o=V(n);qe(o,()=>t.children),J(()=>r=st(n,"",r,{transform:`translate(${t.store.viewport.x??""}px, ${t.store.viewport.y??""}px) scale(${t.store.viewport.zoom??""})`})),L(e,n),ae()}function Bc(e,t){const{store:n,onDrag:r,onDragStart:o,onDragStop:i,onNodeMouseDown:s}=t,a=lp({onDrag:r,onDragStart:o,onDragStop:i,onNodeMouseDown:s,getStoreItems:()=>{const{snapGrid:u,viewport:d}=n;return{nodes:n.nodes,nodeLookup:n.nodeLookup,edges:n.edges,nodeExtent:n.nodeExtent,snapGrid:u||[0,0],snapToGrid:!!u,nodeOrigin:n.nodeOrigin,multiSelectionActive:n.multiselectionKeyPressed,domNode:n.domNode,transform:[d.x,d.y,d.zoom],autoPanOnNodeDrag:n.autoPanOnNodeDrag,nodesDraggable:n.nodesDraggable,selectNodesOnDrag:n.selectNodesOnDrag,nodeDragThreshold:n.nodeDragThreshold,unselectNodesAndEdges:n.unselectNodesAndEdges,updateNodePositions:n.updateNodePositions,onSelectionDrag:n.onselectiondrag,onSelectionDragStart:n.onselectiondragstart,onSelectionDragStop:n.onselectiondragstop,panBy:n.panBy}}});function l(u,d){if(d.disabled){a.destroy();return}a.update({domNode:u,noDragClassName:d.noDragClass,handleSelector:d.handleSelector,nodeId:d.nodeId,isSelectable:d.isSelectable,nodeClickDistance:d.nodeClickDistance})}return l(e,t),{update(u){l(e,u)},destroy(){a.destroy()}}}var c0=G('<div aria-live="assertive" aria-atomic="true" class="a11y-live-msg svelte-i52n8g"> </div>'),u0=G('<div class="a11y-hidden svelte-i52n8g"> </div> <div class="a11y-hidden svelte-i52n8g"> </div> <!>',1);function d0(e,t){se(t,!0);var n=u0(),r=ce(n),o=V(r),i=F(r,2),s=V(i),a=F(i,2);{var l=u=>{var d=c0(),h=V(d);J(()=>{ne(d,"id",`${f0}-${t.store.flowId}`),$(h,t.store.ariaLiveMessage)}),L(u,d)};pe(a,u=>{t.store.disableKeyboardA11y||u(l)})}J(()=>{ne(r,"id",`${Lc}-${t.store.flowId}`),$(o,t.store.disableKeyboardA11y?t.store.ariaLabelConfig["node.a11yDescription.default"]:t.store.ariaLabelConfig["node.a11yDescription.keyboardDisabled"]),ne(i,"id",`${qc}-${t.store.flowId}`),$(s,t.store.ariaLabelConfig["edge.a11yDescription.default"])}),L(e,n),ae()}const Lc="svelte-flow__node-desc",qc="svelte-flow__edge-desc",f0="svelte-flow__aria-live";var h0=G("<div><!></div>");function g0(e,t){se(t,!0);let n=Y(t,"store",15),r=_(()=>Fe(t.node.data,()=>({}),!0)),o=_(()=>Fe(t.node.selected,!1)),i=_(()=>t.node.draggable),s=_(()=>t.node.selectable),a=_(()=>Fe(t.node.deletable,!0)),l=_(()=>t.node.connectable),u=_(()=>t.node.focusable),d=_(()=>Fe(t.node.hidden,!1)),h=_(()=>Fe(t.node.dragging,!1)),f=_(()=>Fe(t.node.style,"")),g=_(()=>t.node.class),v=_(()=>Fe(t.node.type,"default")),p=_(()=>t.node.parentId),b=_(()=>t.node.sourcePosition),S=_(()=>t.node.targetPosition),z=_(()=>Fe(t.node.measured,()=>({width:0,height:0}),!0).width),M=_(()=>Fe(t.node.measured,()=>({width:0,height:0}),!0).height),m=_(()=>t.node.initialWidth),x=_(()=>t.node.initialHeight),A=_(()=>t.node.width),R=_(()=>t.node.height),q=_(()=>t.node.dragHandle),P=_(()=>Fe(t.node.internals.z,0)),N=_(()=>t.node.internals.positionAbsolute.x),T=_(()=>t.node.internals.positionAbsolute.y),w=_(()=>t.node.internals.userNode),{id:C}=t.node,y=_(()=>c(i)??n().nodesDraggable),E=_(()=>c(s)??n().elementsSelectable),I=_(()=>c(l)??n().nodesConnectable),k=_(()=>Pm(t.node)),O=_(()=>!!t.node.internals.handleBounds),D=_(()=>c(k)&&c(O)),H=_(()=>c(u)??n().nodesFocusable);function K(te){return n().parentLookup.has(te)}let Q=_(()=>K(C)),j=oe(null),W=null,Z=c(v),U=c(b),X=c(S),ee=_(()=>n().nodeTypes[c(v)]??Mc),de=_(()=>n().ariaLabelConfig),we={get value(){return c(I)}};Ep(C),Cp(we);let re=_(()=>{const te=c(z)===void 0?c(A)??c(m):c(A),ge=c(M)===void 0?c(R)??c(x):c(R);if(!(te===void 0&&ge===void 0&&c(f)===void 0))return`${c(f)};${te?`width:${Lt(te)};`:""}${ge?`height:${Lt(ge)};`:""}`});ot(()=>{(c(v)!==Z||c(b)!==U||c(S)!==X)&&c(j)!==null&&requestAnimationFrame(()=>{c(j)!==null&&n().updateNodeInternals(new Map([[C,{id:C,nodeElement:c(j),force:!0}]]))}),Z=c(v),U=c(b),X=c(S)}),ot(()=>{t.resizeObserver&&(!c(D)||c(j)!==W)&&(W&&t.resizeObserver.unobserve(W),c(j)&&t.resizeObserver.observe(c(j)),W=c(j))}),uo(()=>{W&&t.resizeObserver?.unobserve(W)});function be(te){c(E)&&(!n().selectNodesOnDrag||!c(y)||n().nodeDragThreshold>0)&&n().handleNodeSelection(C),t.onnodeclick?.({node:c(w),event:te})}function he(te){if(!(oc(te)||n().disableKeyboardA11y))if(Yl.includes(te.key)&&c(E)){const ge=te.key==="Escape";n().handleNodeSelection(C,ge,c(j))}else c(y)&&t.node.selected&&Object.prototype.hasOwnProperty.call(Yo,te.key)&&(te.preventDefault(),n(n().ariaLiveMessage=c(de)["node.a11yDescription.ariaLiveMessage"]({direction:te.key.replace("Arrow","").toLowerCase(),x:~~t.node.internals.positionAbsolute.x,y:~~t.node.internals.positionAbsolute.y}),!0),n().moveSelectedNodes(Yo[te.key],te.shiftKey?4:1))}const _e=()=>{if(n().disableKeyboardA11y||!n().autoPanOnNodeFocus||!c(j)?.matches(":focus-visible"))return;const{width:te,height:ge,viewport:xe}=n();cs(new Map([[C,t.node]]),{x:0,y:0,width:te,height:ge},[xe.x,xe.y,xe.zoom],!0).length>0||n().setCenter(t.node.position.x+(t.node.measured.width??0)/2,t.node.position.y+(t.node.measured.height??0)/2,{zoom:xe.zoom})};var Ve=Re(),le=ce(Ve);{var me=te=>{var ge=h0();gt(ge,()=>({"data-id":C,class:["svelte-flow__node",`svelte-flow__node-${c(v)}`,c(g)],style:c(re),onclick:be,onpointerenter:t.onnodepointerenter?ye=>t.onnodepointerenter({node:c(w),event:ye}):void 0,onpointerleave:t.onnodepointerleave?ye=>t.onnodepointerleave({node:c(w),event:ye}):void 0,onpointermove:t.onnodepointermove?ye=>t.onnodepointermove({node:c(w),event:ye}):void 0,oncontextmenu:t.onnodecontextmenu?ye=>t.onnodecontextmenu({node:c(w),event:ye}):void 0,onkeydown:c(H)?he:void 0,onfocus:c(H)?_e:void 0,tabIndex:c(H)?0:void 0,role:t.node.ariaRole??(c(H)?"group":void 0),"aria-label":t.node.ariaLabel,"aria-roledescription":"node","aria-describedby":n().disableKeyboardA11y?void 0:`${Lc}-${n().flowId}`,...t.node.domAttributes,[fn]:{dragging:c(h),selected:c(o),draggable:c(y),connectable:c(I),selectable:c(E),nopan:c(y),parent:c(Q)},[$t]:{"z-index":c(P),transform:`translate(${c(N)??""}px, ${c(T)??""}px)`,visibility:c(k)?"visible":"hidden"}}));var xe=V(ge);Ii(xe,()=>c(ee),(ye,We)=>{We(ye,{get data(){return c(r)},get id(){return C},get selected(){return c(o)},get selectable(){return c(E)},get deletable(){return c(a)},get sourcePosition(){return c(b)},get targetPosition(){return c(S)},get zIndex(){return c(P)},get dragging(){return c(h)},get draggable(){return c(y)},get dragHandle(){return c(q)},get parentId(){return c(p)},get type(){return c(v)},get isConnectable(){return c(I)},get positionAbsoluteX(){return c(N)},get positionAbsoluteY(){return c(T)},get width(){return c(A)},get height(){return c(R)}})}),Qe(ge,(ye,We)=>Bc?.(ye,We),()=>({nodeId:C,isSelectable:c(E),disabled:!c(y),handleSelector:c(q),noDragClass:n().noDragClass,nodeClickDistance:t.nodeClickDistance,onNodeMouseDown:n().handleNodeSelection,onDrag:(ye,We,ze,Ee)=>{t.onnodedrag?.({event:ye,targetNode:ze,nodes:Ee})},onDragStart:(ye,We,ze,Ee)=>{t.onnodedragstart?.({event:ye,targetNode:ze,nodes:Ee})},onDragStop:(ye,We,ze,Ee)=>{t.onnodedragstop?.({event:ye,targetNode:ze,nodes:Ee})},store:n()})),en(ge,ye=>B(j,ye),()=>c(j)),L(te,ge)};pe(le,te=>{c(d)||te(me)})}L(e,Ve),ae()}var v0=G('<div class="svelte-flow__nodes"></div>');function m0(e,t){se(t,!0);let n=Y(t,"store",15);const r=typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const s=new Map;i.forEach(a=>{const l=a.target.getAttribute("data-id");s.set(l,{id:l,nodeElement:a.target,force:!0})}),n().updateNodeInternals(s)});uo(()=>{r?.disconnect()});var o=v0();Te(o,21,()=>n().visible.nodes.values(),i=>i.id,(i,s)=>{g0(i,{get node(){return c(s)},get resizeObserver(){return r},get nodeClickDistance(){return t.nodeClickDistance},get onnodeclick(){return t.onnodeclick},get onnodepointerenter(){return t.onnodepointerenter},get onnodepointermove(){return t.onnodepointermove},get onnodepointerleave(){return t.onnodepointerleave},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get onnodecontextmenu(){return t.onnodecontextmenu},get store(){return n()},set store(a){n(a)}})}),L(e,o),ae()}var p0=Le('<svg class="svelte-flow__edge-wrapper"><g><!></g></svg>');function y0(e,t){se(t,!0);let n=_(()=>t.edge.id),r=_(()=>t.edge.source),o=_(()=>t.edge.target),i=_(()=>t.edge.sourceX),s=_(()=>t.edge.sourceY),a=_(()=>t.edge.targetX),l=_(()=>t.edge.targetY),u=_(()=>t.edge.sourcePosition),d=_(()=>t.edge.targetPosition),h=_(()=>Fe(t.edge.animated,!1)),f=_(()=>Fe(t.edge.selected,!1)),g=_(()=>t.edge.label),v=_(()=>t.edge.labelStyle),p=_(()=>Fe(t.edge.data,()=>({}),!0)),b=_(()=>t.edge.style),S=_(()=>t.edge.interactionWidth),z=_(()=>Fe(t.edge.type,"default")),M=_(()=>t.edge.sourceHandle),m=_(()=>t.edge.targetHandle),x=_(()=>t.edge.markerStart),A=_(()=>t.edge.markerEnd),R=_(()=>t.edge.selectable),q=_(()=>t.edge.focusable),P=_(()=>Fe(t.edge.deletable,!0)),N=_(()=>t.edge.hidden),T=_(()=>t.edge.zIndex),w=_(()=>t.edge.class),C=_(()=>t.edge.ariaLabel);Mp(c(n));let y=null,E=_(()=>c(R)??t.store.elementsSelectable),I=_(()=>c(q)??t.store.edgesFocusable),k=_(()=>t.store.edgeTypes[c(z)]??Nc),O=_(()=>c(x)?`url('#${vs(c(x),t.store.flowId)}')`:void 0),D=_(()=>c(A)?`url('#${vs(c(A),t.store.flowId)}')`:void 0);function H(U){const X=t.store.edgeLookup.get(c(n));X&&(c(E)&&t.store.handleEdgeSelection(c(n)),t.onedgeclick?.({event:U,edge:X}))}function K(U,X){const ee=t.store.edgeLookup.get(c(n));ee&&X({event:U,edge:ee})}function Q(U){if(!t.store.disableKeyboardA11y&&Yl.includes(U.key)&&c(E)){const{unselectNodesAndEdges:X,addSelectedEdges:ee}=t.store;U.key==="Escape"?(y?.blur(),X({edges:[t.edge]})):ee([c(n)])}}var j=Re(),W=ce(j);{var Z=U=>{var X=p0();let ee;var de=V(X);gt(de,()=>({class:["svelte-flow__edge",c(w)],"data-id":c(n),onclick:H,oncontextmenu:t.onedgecontextmenu?re=>{K(re,t.onedgecontextmenu)}:void 0,onpointerenter:t.onedgepointerenter?re=>{K(re,t.onedgepointerenter)}:void 0,onpointerleave:t.onedgepointerleave?re=>{K(re,t.onedgepointerleave)}:void 0,"aria-label":c(C)===null?void 0:c(C)?c(C):`Edge from ${c(r)} to ${c(o)}`,"aria-describedby":c(I)?`${qc}-${t.store.flowId}`:void 0,role:t.edge.ariaRole??(c(I)?"group":"img"),"aria-roledescription":"edge",onkeydown:c(I)?Q:void 0,tabindex:c(I)?0:void 0,...t.edge.domAttributes,[fn]:{animated:c(h),selected:c(f),selectable:c(E)}}));var we=V(de);Ii(we,()=>c(k),(re,be)=>{be(re,{get id(){return c(n)},get source(){return c(r)},get target(){return c(o)},get sourceX(){return c(i)},get sourceY(){return c(s)},get targetX(){return c(a)},get targetY(){return c(l)},get sourcePosition(){return c(u)},get targetPosition(){return c(d)},get animated(){return c(h)},get selected(){return c(f)},get label(){return c(g)},get labelStyle(){return c(v)},get data(){return c(p)},get style(){return c(b)},get interactionWidth(){return c(S)},get selectable(){return c(E)},get deletable(){return c(P)},get type(){return c(z)},get sourceHandleId(){return c(M)},get targetHandleId(){return c(m)},get markerStart(){return c(O)},get markerEnd(){return c(D)}})}),en(de,re=>y=re,()=>y),J(()=>ee=st(X,"",ee,{"z-index":c(T)})),L(U,X)};pe(W,U=>{c(N)||U(Z)})}L(e,j),ae()}qu();var b0=Le("<defs></defs>");function _0(e,t){se(t,!1);const n=Pn();Ud();var r=b0();Te(r,5,()=>n.markers,o=>o.id,(o,i)=>{S0(o,Xn(()=>c(i)))}),L(e,r),ae()}var w0=Le('<polyline class="arrow" fill="none" stroke-linecap="round" stroke-linejoin="round" points="-5,-4 0,0 -5,4"></polyline>'),x0=Le('<polyline class="arrowclosed" stroke-linecap="round" stroke-linejoin="round" points="-5,-4 0,0 -5,4 -5,-4"></polyline>'),k0=Le('<marker class="svelte-flow__arrowhead" viewBox="-10 -10 20 20" refX="0" refY="0"><!></marker>');function S0(e,t){se(t,!0);let n=Y(t,"width",3,12.5),r=Y(t,"height",3,12.5),o=Y(t,"markerUnits",3,"strokeWidth"),i=Y(t,"orient",3,"auto-start-reverse"),s=Y(t,"color",3,"none");var a=k0(),l=V(a);{var u=h=>{var f=w0();let g;J(()=>{ne(f,"stroke-width",t.strokeWidth),g=st(f,"",g,{stroke:s()})}),L(h,f)},d=h=>{var f=x0();let g;J(()=>{ne(f,"stroke-width",t.strokeWidth),g=st(f,"",g,{stroke:s(),fill:s()})}),L(h,f)};pe(l,h=>{t.type===Br.Arrow?h(u):t.type===Br.ArrowClosed&&h(d,1)})}J(()=>{ne(a,"id",t.id),ne(a,"markerWidth",`${n()}`),ne(a,"markerHeight",`${r()}`),ne(a,"markerUnits",o()),ne(a,"orient",i())}),L(e,a),ae()}var E0=G('<div class="svelte-flow__edges"><svg class="svelte-flow__marker"><!></svg> <!></div>');function T0(e,t){se(t,!0);let n=Y(t,"store",15);var r=E0(),o=V(r),i=V(o);_0(i,{});var s=F(o,2);Te(s,17,()=>n().visible.edges.values(),a=>a.id,(a,l)=>{y0(a,{get edge(){return c(l)},get onedgeclick(){return t.onedgeclick},get onedgecontextmenu(){return t.onedgecontextmenu},get onedgepointerenter(){return t.onedgepointerenter},get onedgepointerleave(){return t.onedgepointerleave},get store(){return n()},set store(u){n(u)}})}),L(e,r),ae()}var C0=G('<div class="svelte-flow__selection svelte-vt0ypg"></div>');function Vc(e,t){se(t,!0);let n=Y(t,"x",3,0),r=Y(t,"y",3,0),o=Y(t,"width",3,0),i=Y(t,"height",3,0),s=Y(t,"isVisible",3,!0);var a=Re(),l=ce(a);{var u=d=>{var h=C0();let f;J(g=>f=st(h,"",f,g),[()=>({width:typeof o()=="string"?o():Lt(o()),height:typeof i()=="string"?i():Lt(i()),transform:`translate(${n()}px, ${r()}px)`})]),L(d,h)};pe(l,d=>{s()&&d(u)})}L(e,a),ae()}var A0=G("<div><!></div>");function M0(e,t){se(t,!0);let n=oe(void 0);ot(()=>{t.store.disableKeyboardA11y||c(n)?.focus({preventScroll:!0})});let r=_(()=>{if(t.store.selectionRectMode==="nodes"){t.store.nodes;const h=Bo(t.store.nodeLookup,{filter:f=>!!f.selected});if(h.width>0&&h.height>0)return h}return null});function o(h){const f=t.store.nodes.filter(g=>g.selected);t.onselectioncontextmenu?.({nodes:f,event:h})}function i(h){const f=t.store.nodes.filter(g=>g.selected);t.onselectionclick?.({nodes:f,event:h})}function s(h){Object.prototype.hasOwnProperty.call(Yo,h.key)&&(h.preventDefault(),t.store.moveSelectedNodes(Yo[h.key],h.shiftKey?4:1))}var a=Re(),l=ce(a);{var u=h=>{var f=A0();let g;var v=V(f);Vc(v,{width:"100%",height:"100%",x:0,y:0}),Qe(f,(p,b)=>Bc?.(p,b),()=>({disabled:!1,store:t.store,onDrag:(p,b,S,z)=>{t.onnodedrag?.({event:p,targetNode:null,nodes:z})},onDragStart:(p,b,S,z)=>{t.onnodedragstart?.({event:p,targetNode:null,nodes:z})},onDragStop:(p,b,S,z)=>{t.onnodedragstop?.({event:p,targetNode:null,nodes:z})}})),en(f,p=>B(n,p),()=>c(n)),J(p=>{Ot(f,1,Sn(["svelte-flow__selection-wrapper",t.store.noPanClass]),"svelte-1n4hcy8"),ne(f,"role",t.store.disableKeyboardA11y?void 0:"button"),ne(f,"tabindex",t.store.disableKeyboardA11y?void 0:-1),g=st(f,"",g,p)},[()=>({width:Lt(c(r).width),height:Lt(c(r).height),transform:`translate(${c(r).x??""}px, ${c(r).y??""}px)`})]),Ie("contextmenu",f,o),Ie("click",f,i),Ie("keydown",f,function(...p){(t.store.disableKeyboardA11y?void 0:s)?.apply(this,p)}),L(h,f)},d=_(()=>t.store.selectionRectMode==="nodes"&&c(r)&&on(c(r).x)&&on(c(r).y));pe(l,h=>{c(d)&&h(u)})}L(e,a),ae()}Yn(["contextmenu","click","keydown"]);function I0(e){switch(e){case"none":return 0;case"ctrl":return 8;case"shift":return 4;case"alt":return 2;case"meta":return 1}}function qt(e,t){let{enabled:n=!0,trigger:r,type:o="keydown"}=t;function i(a){const l=Array.isArray(r)?r:[r],u=[a.metaKey,a.altKey,a.shiftKey,a.ctrlKey].reduce((d,h,f)=>h?d|1<<f:d,0);for(const d of l){const h={preventDefault:!1,enabled:!0,...d},{modifier:f,key:g,code:v,callback:p,preventDefault:b,enabled:S}=h;if(!g&&!v&&console.warn("[svelte-put/shortcut] Trigger should have either `key` or `code`, a trigger missing both was detected! Check your configuration"),S&&(g||v)){if(v&&a.code!==v)continue;if(g&&a.key!==g)continue;if(f===null||f===!1){if(u!==0)continue}else if(f!==void 0&&f?.[0]?.length>0){const M=Array.isArray(f)?f:[f];let m=!1;for(const x of M)if((Array.isArray(x)?x:[x]).reduce((R,q)=>R|I0(q),0)===u){m=!0;break}if(!m)continue}b&&a.preventDefault();const z={node:e,trigger:h,originalEvent:a};e.dispatchEvent(new CustomEvent("shortcut",{detail:z})),p?.(z)}}}let s;return n&&(s=Ci(e,o,i)),{update:a=>{const{enabled:l=!0,type:u="keydown"}=a;n&&(!l||o!==u)?s?.():!n&&l&&(s=Ci(e,u,i)),n=l,o=u,r=a.trigger},destroy:()=>{s?.()}}}function N0(){const e=_(Pn),t=i=>{const s=Ic(i)?i:c(e).nodeLookup.get(i.id),a=s.parentId?zm(s.position,s.measured,s.parentId,c(e).nodeLookup,c(e).nodeOrigin):s.position,l={...s,position:a,width:s.measured?.width??s.width,height:s.measured?.height??s.height};return qr(l)};function n(i,s,a={replace:!1}){c(e).nodes=Ue(()=>c(e).nodes).map(l=>{if(l.id===i){const u=typeof s=="function"?s(l):s;return a?.replace&&Ic(u)?u:{...l,...u}}return l})}function r(i,s,a={replace:!1}){c(e).edges=Ue(()=>c(e).edges).map(l=>{if(l.id===i){const u=typeof s=="function"?s(l):s;return a.replace&&qp(u)?u:{...l,...u}}return l})}const o=i=>c(e).nodeLookup.get(i);return{zoomIn:c(e).zoomIn,zoomOut:c(e).zoomOut,getInternalNode:o,getNode:i=>o(i)?.internals.userNode,getNodes:i=>i===void 0?c(e).nodes:Wc(c(e).nodeLookup,i),getEdge:i=>c(e).edgeLookup.get(i),getEdges:i=>i===void 0?c(e).edges:Wc(c(e).edgeLookup,i),setZoom:async(i,s)=>{const a=c(e).panZoom;return a?a.scaleTo(i,s):!1},getZoom:()=>c(e).viewport.zoom,setViewport:async(i,s)=>{const a=c(e).viewport;return c(e).panZoom?(await c(e).panZoom.setViewport({x:i.x??a.x,y:i.y??a.y,zoom:i.zoom??a.zoom},s),!0):!1},getViewport:()=>Ks(c(e).viewport),setCenter:async(i,s,a)=>c(e).setCenter(i,s,a),fitView:i=>c(e).fitView(i),fitBounds:async(i,s)=>{if(!c(e).panZoom)return!1;const a=fs(i,c(e).width,c(e).height,c(e).minZoom,c(e).maxZoom,s?.padding??.1);return await c(e).panZoom.setViewport(a,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),!0},getIntersectingNodes:(i,s=!0,a)=>{const l=$l(i),u=l?i:t(i);return u?(a||c(e).nodes).filter(d=>{const h=c(e).nodeLookup.get(d.id);if(!h||!l&&d.id===i.id)return!1;const f=qr(h),g=Wo(f,u);return s&&g>0||g>=f.width*f.height||g>=u.width*u.height}):[]},isNodeIntersecting:(i,s,a=!0)=>{const u=$l(i)?i:t(i);if(!u)return!1;const d=Wo(u,s);return a&&d>0||d>=s.width*s.height||d>=u.width*u.height},deleteElements:async({nodes:i=[],edges:s=[]})=>{const{nodes:a,edges:l}=await Am({nodesToRemove:i,edgesToRemove:s,nodes:c(e).nodes,edges:c(e).edges,onBeforeDelete:c(e).onbeforedelete});return a&&(c(e).nodes=Ue(()=>c(e).nodes).filter(u=>!a.some(({id:d})=>d===u.id))),l&&(c(e).edges=Ue(()=>c(e).edges).filter(u=>!l.some(({id:d})=>d===u.id))),(a.length>0||l.length>0)&&c(e).ondelete?.({nodes:a,edges:l}),{deletedNodes:a,deletedEdges:l}},screenToFlowPosition:(i,s={snapToGrid:!0})=>{if(!c(e).domNode)return i;const a=s.snapToGrid?c(e).snapGrid:!1,{x:l,y:u,zoom:d}=c(e).viewport,{x:h,y:f}=c(e).domNode.getBoundingClientRect(),g={x:i.x-h,y:i.y-f};return Wr(g,[l,u,d],a!==null,a||[1,1])},flowToScreenPosition:i=>{if(!c(e).domNode)return i;const{x:s,y:a,zoom:l}=c(e).viewport,{x:u,y:d}=c(e).domNode.getBoundingClientRect(),h=or(i,[s,a,l]);return{x:h.x+u,y:h.y+d}},toObject:()=>structuredClone({nodes:[...c(e).nodes],edges:[...c(e).edges],viewport:{...c(e).viewport}}),updateNode:n,updateNodeData:(i,s,a)=>{const l=c(e).nodeLookup.get(i)?.internals.userNode;if(!l)return;const u=typeof s=="function"?s(l):s;n(i,d=>({...d,data:a?.replace?u:{...d.data,...u}}))},updateEdge:r,getNodesBounds:i=>Sm(i,{nodeLookup:c(e).nodeLookup,nodeOrigin:c(e).nodeOrigin}),getHandleConnections:({type:i,id:s,nodeId:a})=>Array.from(c(e).connectionLookup.get(`${a}-${i}-${s??null}`)?.values()??[])}}function Wc(e,t){const n=[];for(const r of t){const o=e.get(r);if(o){const i="internals"in o?o.internals?.userNode:o;n.push(i)}}return n}function P0(e,t){se(t,!0);let n=Y(t,"store",15),r=Y(t,"selectionKey",3,"Shift"),o=Y(t,"multiSelectionKey",19,()=>Fo()?"Meta":"Control"),i=Y(t,"deleteKey",3,"Backspace"),s=Y(t,"panActivationKey",3," "),a=Y(t,"zoomActivationKey",19,()=>Fo()?"Meta":"Control"),{deleteElements:l}=N0();function u(p){return p!==null&&typeof p=="object"}function d(p){return u(p)?p.modifier||[]:[]}function h(p){return p==null?"":u(p)?p.key:p}function f(p,b){return(Array.isArray(p)?p:[p]).map(z=>{const M=h(z);return{key:M,modifier:d(z),enabled:M!==null,callback:b}})}function g(){n(n().selectionRect=null,!0),n(n().selectionKeyPressed=!1,!0),n(n().multiselectionKeyPressed=!1,!0),n(n().deleteKeyPressed=!1,!0),n(n().panActivationKeyPressed=!1,!0),n(n().zoomActivationKeyPressed=!1,!0)}function v(){const p=n().nodes.filter(S=>S.selected),b=n().edges.filter(S=>S.selected);l({nodes:p,edges:b})}kn("blur",je,g),kn("contextmenu",je,g),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(r(),()=>n(n().selectionKeyPressed=!0,!0)),type:"keydown"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(r(),()=>n(n().selectionKeyPressed=!1,!0)),type:"keyup"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(o(),()=>{n(n().multiselectionKeyPressed=!0,!0)}),type:"keydown"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(o(),()=>n(n().multiselectionKeyPressed=!1,!0)),type:"keyup"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(i(),p=>{!(p.originalEvent.ctrlKey||p.originalEvent.metaKey||p.originalEvent.shiftKey)&&!oc(p.originalEvent)&&(n(n().deleteKeyPressed=!0,!0),v())}),type:"keydown"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(i(),()=>n(n().deleteKeyPressed=!1,!0)),type:"keyup"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(s(),()=>n(n().panActivationKeyPressed=!0,!0)),type:"keydown"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(s(),()=>n(n().panActivationKeyPressed=!1,!0)),type:"keyup"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(a(),()=>n(n().zoomActivationKeyPressed=!0,!0)),type:"keydown"})),Qe(je,(p,b)=>qt?.(p,b),()=>({trigger:f(a(),()=>n(n().zoomActivationKeyPressed=!1,!0)),type:"keyup"})),ae()}var z0=Le('<path fill="none" class="svelte-flow__connection-path"></path>'),O0=Le('<svg class="svelte-flow__connectionline"><g><!></g></svg>');function R0(e,t){se(t,!0);let n=_(()=>{if(!t.store.connection.inProgress)return"";const s={sourceX:t.store.connection.from.x,sourceY:t.store.connection.from.y,sourcePosition:t.store.connection.fromPosition,targetX:t.store.connection.to.x,targetY:t.store.connection.to.y,targetPosition:t.store.connection.toPosition};switch(t.type){case hn.Bezier:{const[a]=lc(s);return a}case hn.Straight:{const[a]=uc(s);return a}case hn.Step:case hn.SmoothStep:{const[a]=gs({...s,borderRadius:t.type===hn.Step?0:void 0});return a}}});var r=Re(),o=ce(r);{var i=s=>{var a=O0(),l=V(a),u=V(l);{var d=f=>{var g=Re(),v=ce(g);Ii(v,()=>t.LineComponent,(p,b)=>{b(p,{})}),L(f,g)},h=f=>{var g=z0();J(()=>{ne(g,"d",c(n)),st(g,t.style)}),L(f,g)};pe(u,f=>{t.LineComponent?f(d):f(h,-1)})}J(f=>{ne(a,"width",t.store.width),ne(a,"height",t.store.height),st(a,t.containerStyle),Ot(l,0,f)},[()=>Sn(["svelte-flow__connection",Dm(t.store.connection.isValid)])]),L(s,a)};pe(o,s=>{t.store.connection.inProgress&&s(i)})}L(e,r),ae()}var D0=new Set(["$$slots","$$events","$$legacy","position","style","class","children"]),H0=G("<div><!></div>");function Fc(e,t){se(t,!0);let n=Y(t,"position",3,"top-right"),r=xt(t,D0),o=_(()=>`${n()}`.split("-"));var i=H0();gt(i,a=>({class:a,style:t.style,...r}),[()=>["svelte-flow__panel",t.class,...c(o)]]);var s=V(i);qe(s,()=>t.children??ct),L(e,i),ae()}var B0=G('<a target="_blank" rel="noopener noreferrer" aria-label="Svelte Flow attribution">Svelte Flow</a>');function L0(e,t){se(t,!0);let n=Y(t,"position",3,"bottom-right");const r="https://svelteflow.dev?utm_source=attribution";ot(()=>{});var o=Re(),i=ce(o);{var s=a=>{{let l=_(()=>`Please only hide this attribution when you are subscribed to Svelte Flow Pro: ${r}`);Fc(a,{get position(){return n()},class:"svelte-flow__attribution",get"data-message"(){return c(l)},children:(u,d)=>{var h=B0();J(()=>ne(h,"href",r)),L(u,h)},$$slots:{default:!0}})}};pe(i,a=>{t.proOptions?.hideAttribution||a(s)})}L(e,o),ae()}var q0=G("<div><!></div>");function V0(e,t){se(t,!0);let n=Y(t,"domNode",15),r=Y(t,"clientWidth",15),o=Y(t,"clientHeight",15),i=_(()=>t.rest.class),s=_(()=>fu(t.rest,["id","class","nodeTypes","edgeTypes","colorMode","isValidConnection","onmove","onmovestart","onmoveend","onflowerror","ondelete","onbeforedelete","onbeforeconnect","onconnect","onconnectstart","onconnectend","onbeforereconnect","onreconnect","onreconnectstart","onreconnectend","onclickconnectstart","onclickconnectend","oninit","onselectionchange","onselectiondragstart","onselectiondrag","onselectiondragstop","onselectionstart","onselectionend","clickConnect","fitView","fitViewOptions","nodeOrigin","nodeDragThreshold","connectionDragThreshold","minZoom","maxZoom","initialViewport","connectionRadius","connectionMode","selectionMode","selectNodesOnDrag","snapGrid","defaultMarkerColor","translateExtent","nodeExtent","onlyRenderVisibleElements","autoPanOnConnect","autoPanOnNodeDrag","colorModeSSR","defaultEdgeOptions","elevateNodesOnSelect","elevateEdgesOnSelect","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","elementsSelectable","nodesFocusable","edgesFocusable","disableKeyboardA11y","noDragClass","noPanClass","noWheelClass","ariaLabelConfig","autoPanSpeed","panOnScrollSpeed","zIndexMode","autoPanOnSelection"]));function a(d){d.currentTarget.scrollTo({top:0,left:0,behavior:"auto"}),t.rest.onscroll&&t.rest.onscroll(d)}var l=q0();gt(l,d=>({class:["svelte-flow","svelte-flow__container",t.colorMode,c(i)],"data-testid":"svelte-flow__wrapper",role:"application",onscroll:a,...c(s),[$t]:d}),[()=>({width:Lt(t.width),height:Lt(t.height)})],void 0,void 0,"svelte-1ca19db");var u=V(l);qe(u,()=>t.children??ct),en(l,d=>n(d),()=>n()),ja(l,"clientHeight",o),ja(l,"clientWidth",r),L(e,l),ae()}var W0=new Set(["$$slots","$$events","$$legacy","width","height","proOptions","selectionKey","deleteKey","panActivationKey","multiSelectionKey","zoomActivationKey","paneClickDistance","nodeClickDistance","onmovestart","onmoveend","onmove","oninit","onnodeclick","onnodecontextmenu","onnodedrag","onnodedragstart","onnodedragstop","onnodepointerenter","onnodepointermove","onnodepointerleave","onselectionclick","onselectioncontextmenu","onselectionstart","onselectionend","onedgeclick","onedgecontextmenu","onedgepointerenter","onedgepointerleave","onpaneclick","onpanecontextmenu","panOnScrollMode","preventScrolling","zoomOnScroll","zoomOnDoubleClick","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnDrag","selectionOnDrag","autoPanOnSelection","connectionLineComponent","connectionLineStyle","connectionLineContainerStyle","connectionLineType","attributionPosition","children","nodes","edges","viewport"]),F0=G('<div class="svelte-flow__viewport-back svelte-flow__container"></div> <!> <div class="svelte-flow__edge-labels svelte-flow__container"></div> <!> <!> <!> <div class="svelte-flow__viewport-front svelte-flow__container"></div>',1),K0=G("<!> <!>",1),Z0=G("<!> <!> <!> <!> <!>",1);function Y0(e,t){se(t,!0);let n=Y(t,"paneClickDistance",3,1),r=Y(t,"nodeClickDistance",3,1),o=Y(t,"panOnScrollMode",19,()=>nr.Free),i=Y(t,"preventScrolling",3,!0),s=Y(t,"zoomOnScroll",3,!0),a=Y(t,"zoomOnDoubleClick",3,!0),l=Y(t,"zoomOnPinch",3,!0),u=Y(t,"panOnScroll",3,!1),d=Y(t,"panOnScrollSpeed",3,.5),h=Y(t,"panOnDrag",3,!0),f=Y(t,"selectionOnDrag",3,!1),g=Y(t,"autoPanOnSelection",3,!0),v=Y(t,"connectionLineType",19,()=>hn.Bezier),p=Y(t,"nodes",31,()=>Nt([])),b=Y(t,"edges",31,()=>Nt([])),S=Y(t,"viewport",15,void 0),z=xt(t,W0),M=t0({props:z,width:t.width,height:t.height,get nodes(){return p()},set nodes(x){p(x)},get edges(){return b()},set edges(x){b(x)},get viewport(){return S()},set viewport(x){S(x)}});const m=ci(Es);m&&m.setStore&&m.setStore(M),Zs(Es,{provider:!1,getStore(){return M}}),ot(()=>{const x={nodes:M.selectedNodes,edges:M.selectedEdges};Ue(()=>t.onselectionchange)?.(x);for(const A of M.selectionChangeHandlers.values())A(x)}),uo(()=>{M.reset()}),V0(e,{get colorMode(){return M.colorMode},get width(){return t.width},get height(){return t.height},get rest(){return z},get domNode(){return M.domNode},set domNode(x){M.domNode=x},get clientWidth(){return M.width},set clientWidth(x){M.width=x},get clientHeight(){return M.height},set clientHeight(x){M.height=x},children:(x,A)=>{var R=Z0(),q=ce(R);P0(q,{get selectionKey(){return t.selectionKey},get deleteKey(){return t.deleteKey},get panActivationKey(){return t.panActivationKey},get multiSelectionKey(){return t.multiSelectionKey},get zoomActivationKey(){return t.zoomActivationKey},get store(){return M},set store(C){M=C}});var P=F(q,2);o0(P,{get panOnScrollMode(){return o()},get preventScrolling(){return i()},get zoomOnScroll(){return s()},get zoomOnDoubleClick(){return a()},get zoomOnPinch(){return l()},get panOnScroll(){return u()},get panOnScrollSpeed(){return d()},get panOnDrag(){return h()},get paneClickDistance(){return n()},get selectionOnDrag(){return f()},get onmovestart(){return t.onmovestart},get onmove(){return t.onmove},get onmoveend(){return t.onmoveend},get oninit(){return t.oninit},get store(){return M},set store(C){M=C},children:(C,y)=>{s0(C,{get onpaneclick(){return t.onpaneclick},get onpanecontextmenu(){return t.onpanecontextmenu},get onselectionstart(){return t.onselectionstart},get onselectionend(){return t.onselectionend},get panOnDrag(){return h()},get paneClickDistance(){return n()},get selectionOnDrag(){return f()},get autoPanOnSelection(){return g()},get store(){return M},set store(E){M=E},children:(E,I)=>{var k=K0(),O=ce(k);l0(O,{get store(){return M},set store(H){M=H},children:(H,K)=>{var Q=F0(),j=F(ce(Q),2);T0(j,{get onedgeclick(){return t.onedgeclick},get onedgecontextmenu(){return t.onedgecontextmenu},get onedgepointerenter(){return t.onedgepointerenter},get onedgepointerleave(){return t.onedgepointerleave},get store(){return M},set store(X){M=X}});var W=F(j,4);R0(W,{get type(){return v()},get LineComponent(){return t.connectionLineComponent},get containerStyle(){return t.connectionLineContainerStyle},get style(){return t.connectionLineStyle},get store(){return M},set store(X){M=X}});var Z=F(W,2);m0(Z,{get nodeClickDistance(){return r()},get onnodeclick(){return t.onnodeclick},get onnodecontextmenu(){return t.onnodecontextmenu},get onnodepointerenter(){return t.onnodepointerenter},get onnodepointermove(){return t.onnodepointermove},get onnodepointerleave(){return t.onnodepointerleave},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get store(){return M},set store(X){M=X}});var U=F(Z,2);M0(U,{get onselectionclick(){return t.onselectionclick},get onselectioncontextmenu(){return t.onselectioncontextmenu},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get store(){return M},set store(X){M=X}}),L(H,Q)},$$slots:{default:!0}});var D=F(O,2);{let H=_(()=>!!(M.selectionRect&&M.selectionRectMode==="user")),K=_(()=>M.selectionRect?.width),Q=_(()=>M.selectionRect?.height),j=_(()=>M.selectionRect?.x),W=_(()=>M.selectionRect?.y);Vc(D,{get isVisible(){return c(H)},get width(){return c(K)},get height(){return c(Q)},get x(){return c(j)},get y(){return c(W)}})}L(E,k)},$$slots:{default:!0}})},$$slots:{default:!0}});var N=F(P,2);L0(N,{get proOptions(){return t.proOptions},get position(){return t.attributionPosition}});var T=F(N,2);d0(T,{get store(){return M}});var w=F(T,2);qe(w,()=>t.children??ct),L(x,R)},$$slots:{default:!0}}),ae()}var X0=new Set(["$$slots","$$events","$$legacy","class","bgColor","bgColorHover","color","colorHover","borderColor","onclick","children"]),j0=G("<button><!></button>");function jo(e,t){let n=xt(t,X0);var r=j0();gt(r,()=>({type:"button",onclick:t.onclick,class:["svelte-flow__controls-button",t.class],...n,[$t]:{"--xy-controls-button-background-color-props":t.bgColor,"--xy-controls-button-background-color-hover-props":t.bgColorHover,"--xy-controls-button-color-props":t.color,"--xy-controls-button-color-hover-props":t.colorHover,"--xy-controls-button-border-color-props":t.borderColor}}));var o=V(r);qe(o,()=>t.children??ct),L(e,r)}var G0=Le('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"></path></svg>');function U0(e){var t=G0();L(e,t)}var Q0=Le('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 5"><path d="M0 0h32v4.2H0z"></path></svg>');function J0(e){var t=Q0();L(e,t)}var $0=Le('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 30"><path d="M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"></path></svg>');function ey(e){var t=$0();L(e,t)}var ty=Le('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"></path></svg>');function ny(e){var t=ty();L(e,t)}var ry=Le('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 32"><path d="M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"></path></svg>');function oy(e){var t=ry();L(e,t)}var iy=new Set(["$$slots","$$events","$$legacy","position","orientation","showZoom","showFitView","showLock","style","class","buttonBgColor","buttonBgColorHover","buttonColor","buttonColorHover","buttonBorderColor","fitViewOptions","children","before","after"]),sy=G("<!> <!>",1),ay=G("<!> <!> <!> <!> <!> <!>",1);function ly(e,t){se(t,!0);let n=Y(t,"position",3,"bottom-left"),r=Y(t,"orientation",3,"vertical"),o=Y(t,"showZoom",3,!0),i=Y(t,"showFitView",3,!0),s=Y(t,"showLock",3,!0),a=xt(t,iy),l=_(Pn);const u=_(()=>({bgColor:t.buttonBgColor,bgColorHover:t.buttonBgColorHover,color:t.buttonColor,colorHover:t.buttonColorHover,borderColor:t.buttonBorderColor}));let d=_(()=>c(l).nodesDraggable||c(l).nodesConnectable||c(l).elementsSelectable),h=_(()=>c(l).viewport.zoom<=c(l).minZoom),f=_(()=>c(l).viewport.zoom>=c(l).maxZoom),g=_(()=>c(l).ariaLabelConfig),v=_(()=>r()==="horizontal"?"horizontal":"vertical");const p=()=>{c(l).zoomIn()},b=()=>{c(l).zoomOut()},S=()=>{c(l).fitView(t.fitViewOptions)},z=()=>{let M=!c(d);c(l).nodesDraggable=M,c(l).nodesConnectable=M,c(l).elementsSelectable=M};{let M=_(()=>["svelte-flow__controls",c(v),t.class]);Fc(e,Xn({get class(){return c(M)},get position(){return n()},"data-testid":"svelte-flow__controls",get"aria-label"(){return c(g)["controls.ariaLabel"]},get style(){return t.style}},()=>a,{children:(m,x)=>{var A=ay(),R=ce(A);{var q=D=>{var H=Re(),K=ce(H);qe(K,()=>t.before),L(D,H)};pe(R,D=>{t.before&&D(q)})}var P=F(R,2);{var N=D=>{var H=sy(),K=ce(H);jo(K,Xn({onclick:p,class:"svelte-flow__controls-zoomin",get title(){return c(g)["controls.zoomIn.ariaLabel"]},get"aria-label"(){return c(g)["controls.zoomIn.ariaLabel"]},get disabled(){return c(f)}},()=>c(u),{children:(j,W)=>{U0(j)},$$slots:{default:!0}}));var Q=F(K,2);jo(Q,Xn({onclick:b,class:"svelte-flow__controls-zoomout",get title(){return c(g)["controls.zoomOut.ariaLabel"]},get"aria-label"(){return c(g)["controls.zoomOut.ariaLabel"]},get disabled(){return c(h)}},()=>c(u),{children:(j,W)=>{J0(j)},$$slots:{default:!0}})),L(D,H)};pe(P,D=>{o()&&D(N)})}var T=F(P,2);{var w=D=>{jo(D,Xn({class:"svelte-flow__controls-fitview",onclick:S,get title(){return c(g)["controls.fitView.ariaLabel"]},get"aria-label"(){return c(g)["controls.fitView.ariaLabel"]}},()=>c(u),{children:(H,K)=>{ey(H)},$$slots:{default:!0}}))};pe(T,D=>{i()&&D(w)})}var C=F(T,2);{var y=D=>{jo(D,Xn({class:"svelte-flow__controls-interactive",onclick:z,get title(){return c(g)["controls.interactive.ariaLabel"]},get"aria-label"(){return c(g)["controls.interactive.ariaLabel"]}},()=>c(u),{children:(H,K)=>{var Q=Re(),j=ce(Q);{var W=U=>{oy(U)},Z=U=>{ny(U)};pe(j,U=>{c(d)?U(W):U(Z,-1)})}L(H,Q)},$$slots:{default:!0}}))};pe(C,D=>{s()&&D(y)})}var E=F(C,2);{var I=D=>{var H=Re(),K=ce(H);qe(K,()=>t.children),L(D,H)};pe(E,D=>{t.children&&D(I)})}var k=F(E,2);{var O=D=>{var H=Re(),K=ce(H);qe(K,()=>t.after),L(D,H)};pe(k,D=>{t.after&&D(O)})}L(m,A)},$$slots:{default:!0}}))}ae()}var vn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(vn||(vn={}));var cy=Le("<circle></circle>");function uy(e,t){var n=cy();J(()=>{ne(n,"cx",t.radius),ne(n,"cy",t.radius),ne(n,"r",t.radius),Ot(n,0,Sn(["svelte-flow__background-pattern","dots",t.class]))}),L(e,n)}var dy=Le("<path></path>");function fy(e,t){se(t,!0);var n=dy();J(()=>{ne(n,"stroke-width",t.lineWidth),ne(n,"d",`M${t.dimensions[0]/2} 0 V${t.dimensions[1]} M0 ${t.dimensions[1]/2} H${t.dimensions[0]}`),Ot(n,0,Sn(["svelte-flow__background-pattern",t.variant,t.class]))}),L(e,n),ae()}const hy={[vn.Dots]:1,[vn.Lines]:1,[vn.Cross]:6};var gy=Le('<svg data-testid="svelte-flow__background"><pattern patternUnits="userSpaceOnUse"><!></pattern><rect x="0" y="0" width="100%" height="100%"></rect></svg>');function vy(e,t){se(t,!0);let n=Y(t,"variant",19,()=>vn.Dots),r=Y(t,"gap",3,20),o=Y(t,"lineWidth",3,1),i=_(Pn),s=_(()=>n()===vn.Dots),a=_(()=>n()===vn.Cross),l=_(()=>Array.isArray(r())?r():[r(),r()]),u=_(()=>`background-pattern-${c(i).flowId}-${t.id??""}`),d=_(()=>[c(l)[0]*c(i).viewport.zoom||1,c(l)[1]*c(i).viewport.zoom||1]),h=_(()=>(t.size??hy[n()])*c(i).viewport.zoom),f=_(()=>c(a)?[c(h),c(h)]:c(d)),g=_(()=>c(s)?[c(h)/2,c(h)/2]:[c(f)[0]/2,c(f)[1]/2]);var v=gy();let p;var b=V(v),S=V(b);{var z=x=>{{let A=_(()=>c(h)/2);uy(x,{get radius(){return c(A)},get class(){return t.patternClass}})}},M=x=>{fy(x,{get dimensions(){return c(f)},get variant(){return n()},get lineWidth(){return o()},get class(){return t.patternClass}})};pe(S,x=>{c(s)?x(z):x(M,-1)})}var m=F(b);J(()=>{Ot(v,0,Sn(["svelte-flow__background","svelte-flow__container",t.class])),p=st(v,"",p,{"--xy-background-color-props":t.bgColor,"--xy-background-pattern-color-props":t.patternColor}),ne(b,"id",c(u)),ne(b,"x",c(i).viewport.x%c(d)[0]),ne(b,"y",c(i).viewport.y%c(d)[1]),ne(b,"width",c(d)[0]),ne(b,"height",c(d)[1]),ne(b,"patternTransform",`translate(-${c(g)[0]},-${c(g)[1]})`),ne(m,"fill",`url(#${c(u)})`)}),L(e,v),ae()}var my=G("<strong> </strong>"),py=G("<!> <!> <!>",1);function yy(e,t){se(t,!0);var n=py(),r=ce(n);ar(r,{type:"target",get position(){return ie.Top}});var o=F(r,2);{let s=_(()=>t.data.container?"ecosystem-container":"ecosystem-node");fo(o,{get class(){return c(s)},children:(a,l)=>{var u=my(),d=V(u);J(()=>$(d,t.data.label)),L(a,u)},$$slots:{default:!0}})}var i=F(o,2);ar(i,{type:"source",get position(){return ie.Bottom}}),L(e,n),ae()}function by(e){const t=new Map([[void 0,[]]]),n=new Map;for(const s of Object.values(e.relations)){if(s.type!=="contains")continue;const a=s.endpoints.find(u=>u.role==="parent").target,l=s.endpoints.find(u=>u.role==="child").target;n.set(l,a)}for(const s of Object.values(e.entities)){const a=n.get(s.id);t.has(a)||t.set(a,[]),t.get(a).push(s)}const r=[];function o(s){const a=t.get(s)??[];let l=s?48:0,u=0,d=s?24:0,h=288;return a.forEach((f,g)=>{const v=f.type==="container"?o(f.id):{width:240,height:110};g%2===0&&g&&(l+=u+50,d=s?24:0,u=0),r.push({id:f.id,type:"ecosystem",position:{x:d,y:l},...s?{parentId:s,extent:"parent"}:{},...f.type==="container"?{style:`width: ${v.width}px; height: ${v.height}px;`}:{},data:{label:f.attributes.name.value,container:f.type==="container"}}),d+=v.width+60,h=Math.max(h,d-36),u=Math.max(u,v.height)}),{width:h,height:l+u+24}}o(void 0);const i=s=>{let a=0;for(;n.has(s);s=n.get(s))a++;return a};return r.sort((s,a)=>i(s.id)-i(a.id))}var _y=G("<!> <!>",1),wy=G("<li> </li>"),xy=G('<figure><figcaption> </figcaption> <p class="canvas-hint">Déplacez le schéma et pincez pour zoomer, ou utilisez les boutons + et −.</p> <div class="canvas" data-renderer="xyflow-svelte" role="region"><!></div> <details><summary>Lire les relations du schéma</summary> <ul></ul></details></figure>');function ky(e,t){se(t,!0);let n=Y(t,"dark",3,!1);const r={ecosystem:yy};let o=_(()=>by(t.document)),i=_(()=>Object.values(t.document.relations).filter(p=>p.type==="link"));const s=(p,b)=>p.endpoints.find(S=>S.role===b).target;let a=_(()=>c(i).map(p=>({id:p.id,source:s(p,"source"),target:s(p,"target"),label:p.attributes?.label?.value,type:"smoothstep",style:"stroke: var(--st-semantic-border-strong); stroke-width: 1px;",labelStyle:"fill: var(--st-semantic-text-primary); font-size: 12px;",labelBgStyle:"fill: var(--st-semantic-surface-raised);",markerEnd:{type:Br.ArrowClosed,color:n()?"#94a3b8":"#475569",width:16,height:16}})));var l=xy(),u=V(l),d=V(u),h=F(u,4),f=V(h);{let p=_(()=>n()?"dark":"light");Y0(f,{get nodes(){return c(o)},get edges(){return c(a)},get nodeTypes(){return r},fitView:!0,minZoom:.15,maxZoom:2.5,zoomOnPinch:!0,zoomOnScroll:!1,panOnDrag:!0,nodesDraggable:!1,nodesConnectable:!1,get colorMode(){return c(p)},children:(b,S)=>{var z=_y(),M=ce(z);ly(M,{showInteractive:!1});var m=F(M,2);vy(m,{gap:20,size:1}),L(b,z)},$$slots:{default:!0}})}var g=F(h,2),v=F(V(g),2);Te(v,21,()=>c(i),Ne,(p,b)=>{var S=wy(),z=V(S);J((M,m)=>$(z,`${M??""} → ${m??""}${c(b).attributes?.label?` : ${c(b).attributes.label.value}`:""}`),[()=>t.document.entities[s(c(b),"source")].attributes.name.value,()=>t.document.entities[s(c(b),"target")].attributes.name.value]),L(p,S)}),J(()=>{ne(l,"aria-label",t.alt),$(d,t.alt),ne(h,"aria-label",`Schéma : ${t.alt}`)}),L(e,l),ae()}const Sy=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Vt=(e,t)=>e>>>t|e<<32-t;function Ey(e){const t=new Uint8Array(Math.ceil((e.length+9)/64)*64);t.set(e),t[e.length]=128;const n=new DataView(t.buffer),r=e.length*8;n.setUint32(t.length-8,Math.floor(r/4294967296)),n.setUint32(t.length-4,r>>>0);const o=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],i=new Int32Array(64);for(let s=0;s<t.length;s+=64){for(let p=0;p<16;p++)i[p]=n.getInt32(s+p*4);for(let p=16;p<64;p++){const b=i[p-15],S=i[p-2];i[p]=i[p-16]+(Vt(b,7)^Vt(b,18)^b>>>3)+i[p-7]+(Vt(S,17)^Vt(S,19)^S>>>10)}let[a,l,u,d,h,f,g,v]=o;for(let p=0;p<64;p++){const b=v+(Vt(h,6)^Vt(h,11)^Vt(h,25))+(h&f^~h&g)+Sy[p]+i[p]|0,S=(Vt(a,2)^Vt(a,13)^Vt(a,22))+(a&l^a&u^l&u)|0;v=g,g=f,f=h,h=d+b|0,d=u,u=l,l=a,a=b+S|0}[a,l,u,d,h,f,g,v].forEach((p,b)=>{o[b]=o[b]+p|0})}return o.map(s=>(s>>>0).toString(16).padStart(8,"0")).join("")}function Ts(e){if(e.length%4||/[^A-Za-z0-9+/]/.test(e.replace(/={1,2}$/,"")))throw new Error("Invalid base64");const t=atob(e);if(btoa(t)!==e)throw new Error("Non-canonical base64");const n=new Uint8Array(t.length);for(let r=0;r<n.length;r++)n[r]=t.charCodeAt(r);return n}const Kc=e=>new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}).decode(e),Zc=e=>e.split(/\r\n|\n|\r/);function Ty(e,t,n,r){let o=0;const i=[],s=t.toLocaleLowerCase(),a=()=>{if(!n())return;const l=Math.min(e.length,o+4096);if(s)for(;o<l;o++)e[o].toLocaleLowerCase().includes(s)&&i.push(o+1);else o=e.length;o<e.length?setTimeout(a,0):n()&&r(i)};setTimeout(a,0)}var Cy=G("<figure><img/><figcaption> </figcaption></figure>"),Ay=G('<div role="listitem"><span class="line-number"> </span> </div>'),My=G('<label>Rechercher dans toute la source <input type="search"/></label> <p aria-live="polite" data-search-status=""> </p> <button>Résultat suivant</button> <label>Aller à la ligne <input type="number" min="1"/></label> <button>Atteindre</button> <p> </p> <div class="source-scroll"><div role="list" aria-label="Lignes de la source" tabindex="-1"><div aria-hidden="true"></div> <!> <div aria-hidden="true"></div></div></div>',1),Iy=G('<section aria-label="Source consultée" class="source-viewer"><h3 tabindex="-1"> </h3> <p> </p> <details><summary>Empreinte des octets</summary><code> </code></details> <div class="evidence-actions"><button>Retour au contexte</button> <button>Télécharger les octets originaux</button></div> <!></section>');function Ny(e,t){se(t,!0);let n=_(()=>t.source.mediaType.startsWith("image/")?[]:Zc(Kc(Ts(t.source.data)))),r=oe(0),o=oe(1),i=oe(""),s=oe(Nt([])),a=oe(!1),l=0,u=oe(0),d=oe(null),h=oe(null),f,g=0;Ua(()=>f.focus());const v=80,p=24;async function b(k,O=!0){const D=++g,H=Math.min(c(n).length,Math.max(1,Number(k)||1));B(r,Math.max(0,H-9),!0),B(o,H,!0),await lo(),D===g&&(c(d).scrollTop=(H-1)*p,await lo(),O&&D===g&&(c(d).querySelector(`[data-line="${H}"]`)?.scrollIntoView({block:"nearest",inline:"nearest"}),c(h)?.focus({preventScroll:!0})))}ot(()=>{t.visit>0&&c(n).length&&b(t.locator?.start??1)}),ot(()=>{const k=c(i),O=c(n),D=++l,H=g;return B(s,[],!0),B(a,!0),B(u,0),Ty(O,k,()=>l===D,K=>{B(s,K,!0),B(a,!1),K.length&&H===g&&b(K[0],!1)}),()=>{l++}});function S(){const k=URL.createObjectURL(new Blob([Ts(t.source.data)],{type:"application/octet-stream"})),O=document.createElement("a");O.href=k,O.download=`evidence-${t.source.id.replace(/[^a-zA-Z0-9._-]/g,"_")}`,O.click(),setTimeout(()=>URL.revokeObjectURL(k),1e3)}var z=Iy(),M=V(z),m=V(M);en(M,k=>f=k,()=>f);var x=F(M,2),A=V(x),R=F(x,2),q=F(V(R)),P=V(q),N=F(R,2),T=V(N),w=F(T,2),C=F(N,2);{var y=k=>{var O=Cy(),D=V(O),H=F(D),K=V(H);J(()=>{ne(D,"src",`data:${t.source.mediaType};base64,${t.source.data}`),ne(D,"alt",t.source.alt),ne(D,"width",t.source.width),ne(D,"height",t.source.height),$(K,t.locator?.caption??t.source.alt)}),L(k,O)},E=_(()=>t.source.mediaType.startsWith("image/")),I=k=>{var O=My(),D=ce(O),H=F(V(D)),K=F(D,2),Q=V(K),j=F(K,2),W=F(j,2),Z=F(V(W)),U=F(W,2),X=F(U,2),ee=V(X),de=F(X,2),we=V(de),re=V(we),be=F(re,2);Te(be,17,()=>c(n).slice(c(r),c(r)+v),Ne,(_e,Ve,le)=>{var me=Ay();let te;var ge=V(me),xe=V(ge),ye=F(ge);J(()=>{te=Ot(me,1,"source-line",null,te,{cited:c(r)+le+1>=t.locator?.start&&c(r)+le+1<=t.locator?.end}),ne(me,"data-line",c(r)+le+1),$(xe,c(r)+le+1),$(ye,` ${(c(Ve)||" ")??""}`)}),L(_e,me)});var he=F(be,2);en(we,_e=>B(h,_e),()=>c(h)),en(de,_e=>B(d,_e),()=>c(d)),J(_e=>{$(Q,c(a)?"Recherche en cours…":`${c(s).length} résultat(s)`),j.disabled=!c(s).length,ne(Z,"max",c(n).length),$(ee,`${c(n).length??""} lignes · plage citée : ${t.locator?.start??"—"??""}–${t.locator?.end??"—"??""}`),st(re,`height:${c(r)*p}px`),st(he,_e)},[()=>`height:${Math.max(0,c(n).length-c(r)-v)*p}px`]),Xa(H,()=>c(i),_e=>B(i,_e)),Ie("click",j,()=>{B(u,(c(u)+1)%c(s).length),b(c(s)[c(u)])}),Xa(Z,()=>c(o),_e=>B(o,_e)),Ie("click",U,()=>b(c(o))),kn("scroll",de,()=>{B(r,Math.max(0,Math.floor(c(d).scrollTop/p)-8),!0)}),L(k,O)};pe(C,k=>{c(E)?k(y):k(I,-1)})}J(k=>{$(m,t.source.title),$(A,`${t.source.mediaType??""} · ${t.source.size??""} octets · ${k??""}`),$(P,t.source.sha256)},[()=>JSON.stringify(t.source.origin)]),Ie("click",T,function(...k){t.onback?.apply(this,k)}),Ie("click",w,S),L(e,z),ae()}Yn(["click"]);const Yc=e=>"schemaVersion"in e&&e.schemaVersion===2;function Py(e){if(!Yc(e))return{sources:0,bytes:0,consultationMinutes:0};const t=e.sources.reduce((r,o)=>r+o.size,0),n=e.sources.filter(r=>!r.mediaType.startsWith("image/")).reduce((r,o)=>r+o.size,0)+e.annexes.reduce((r,o)=>r+new TextEncoder().encode(JSON.stringify(o.blocks)).length,0);return{sources:e.sources.length,bytes:t,consultationMinutes:Math.ceil(n/6/180)}}var Xc=G("<li><button> </button> </li>"),Go=G("<button> </button>"),zy=G("<article><p> </p> <!> <!></article>"),Oy=G("<p> </p>"),Ry=G("<pre><code> </code></pre>"),Dy=G("<th> </th>"),Hy=G("<td> </td>"),By=G("<tr></tr>"),Ly=G('<div class="evidence-table"><table><thead><tr></tr></thead><tbody></tbody></table></div>'),qy=G("<!> <!>",1),Vy=G("<details><summary><span> </span> </summary> <!></details>"),Wy=G('<section aria-label="Pièces justificatives" class="evidence-index"><h2>Pièces justificatives</h2> <p> </p> <!> <ul></ul> <details open=""><summary>Catalogue des sources</summary><ul></ul></details> <!> <!></section>');function Fy(e,t){se(t,!0);let n=oe(null),r=oe(null),o=oe(0),i,s;const a=new go,l=_(()=>Py(t.dossier));function u(P){const N=t.dossier.citations.find(T=>T.id===P);d(N.sourceId,N.locator)}function d(P,N=null){i=document.activeElement,s=window.scrollY,B(r,N,!0),c(n)?.id!==P&&B(n,t.dossier.sources.find(T=>T.id===P),!0),id(o)}async function h(){B(n,null),B(r,null),await lo(),i?.focus({preventScroll:!0}),window.scrollTo(0,s)}function f(P){if(P===t.dossier.ref)return{id:null,label:"dossier"};for(const N of t.dossier.sections){const T=N.kind==="optionSet"&&N.options.find(w=>w.id===P||w.targetRef===P);if(T)return{id:T.id,label:T.label};if(N.id===P||N.targetRef===P)return{id:N.id,label:N.question??N.title??N.alt??(N.kind==="outcome"?"Conclusion":N.kind==="amendmentTrace"?"Historique":"Contexte")}}}function g(P){const N=f(P),T=N?.id===null?document.querySelector("main"):[...document.querySelectorAll("main .dossier-section, main .option-card")].find(w=>w.id===N?.id);if(!T)throw new Error(`Unresolved annex back reference: ${P}`);T.matches("button, a, input")||(T.tabIndex=-1),T.focus(),T.scrollIntoView({block:"start"})}var v={openCitation:u},p=Wy(),b=F(V(p),2),S=V(b),z=F(b,2);{var M=P=>{var N=Re(),T=ce(N);Pd(T,()=>c(n).id,w=>{Ny(w,{get source(){return c(n)},get locator(){return c(r)},get visit(){return c(o)},onback:h})}),L(P,N)};pe(z,P=>{c(n)&&P(M)})}var m=F(z,2);Te(m,21,()=>t.dossier.citations,Ne,(P,N)=>{var T=Xc(),w=V(T),C=V(w),y=F(w);J(()=>{$(C,c(N).label),$(y,` — ${c(N).sourceId??""}`)}),Ie("click",w,()=>u(c(N).id)),L(P,T)});var x=F(m,2),A=F(V(x));Te(A,21,()=>t.dossier.sources,Ne,(P,N)=>{var T=Xc(),w=V(T),C=V(w),y=F(w);J(()=>{$(C,`Consulter ${c(N).title??""}`),$(y,` · ${c(N).size??""} octets`)}),Ie("click",w,()=>d(c(N).id)),L(P,T)});var R=F(x,2);Te(R,17,()=>t.dossier.evidenceGroups,Ne,(P,N)=>{var T=zy(),w=V(T),C=V(w),y=F(w,2);Te(y,17,()=>c(N).citationRefs,Ne,(I,k)=>{var O=Go(),D=V(O);J(H=>$(D,H),[()=>t.dossier.citations.find(H=>H.id===c(k)).label]),Ie("click",O,()=>u(c(k))),L(I,O)});var E=F(y,2);Te(E,17,()=>c(N).sourceRefs,Ne,(I,k)=>{var O=Go(),D=V(O);J(H=>$(D,`Source : ${H??""}`),[()=>t.dossier.sources.find(H=>H.id===c(k)).title]),Ie("click",O,()=>d(c(k))),L(I,O)}),J(()=>$(C,c(N).summary)),L(P,T)});var q=F(R,2);return Te(q,17,()=>t.dossier.annexes,Ne,(P,N)=>{var T=Vy(),w=V(T),C=V(w),y=V(C),E=F(C),I=F(w,2);{var k=D=>{var H=qy(),K=ce(H);Te(K,17,()=>c(N).blocks,Ne,(j,W)=>{var Z=Re(),U=ce(Z);{var X=re=>{var be=Oy(),he=V(be);J(()=>$(he,c(W).text)),L(re,be)},ee=re=>{var be=Ry(),he=V(be),_e=V(he);J(()=>$(_e,c(W).text)),L(re,be)},de=re=>{var be=Ly(),he=V(be),_e=V(he),Ve=V(_e);Te(Ve,21,()=>c(W).columns,Ne,(me,te)=>{var ge=Dy(),xe=V(ge);J(()=>$(xe,c(te))),L(me,ge)});var le=F(_e);Te(le,21,()=>c(W).rows,Ne,(me,te)=>{var ge=By();Te(ge,21,()=>c(te),Ne,(xe,ye)=>{var We=Hy(),ze=V(We);J(()=>$(ze,c(ye))),L(xe,We)}),L(me,ge)}),L(re,be)},we=re=>{var be=Re(),he=ce(be);Te(he,17,()=>c(W).citationRefs,Ne,(_e,Ve)=>{var le=Go(),me=V(le);J(te=>$(me,te),[()=>t.dossier.citations.find(te=>te.id===c(Ve)).label]),Ie("click",le,()=>u(c(Ve))),L(_e,le)}),L(re,be)};pe(U,re=>{c(W).kind==="text"?re(X):c(W).kind==="code"?re(ee,1):c(W).kind==="table"?re(de,2):c(W).kind==="references"&&re(we,3)})}L(j,Z)});var Q=F(K,2);Te(Q,17,()=>c(N).backRefs,Ne,(j,W)=>{var Z=Go(),U=V(Z);J(X=>$(U,`Retour : ${X??""}`),[()=>f(c(W)).label]),Ie("click",Z,()=>g(c(W))),L(j,Z)}),L(D,H)},O=_(()=>a.has(c(N).id));pe(I,D=>{c(O)&&D(k)})}J(()=>{$(y,c(N).title),$(E,` — ${c(N).summary??""}`)}),kn("toggle",T,D=>{D.currentTarget.open?a.add(c(N).id):a.delete(c(N).id)}),L(P,T)}),J(()=>$(S,`${c(l).sources??""} sources · ${c(l).bytes??""} octets · consultation estimée : ${c(l).consultationMinutes??""} minute(s), à six octets par mot, hors budget de décision.`)),L(e,p),ae(v)}Yn(["click"]);const Uo={low:2,medium:8,high:30},lt={minOwnerRequestQuoteLength:8,minStakesLength:20,minQuestionContextLength:20,maxDossierBudgetMinutes:30,wordsPerMinute:180,maxHeadingLength:100,maxDecisionLineLength:300,maxOptionLabelLength:100,maxConsequenceLength:160,maxOptionBodyLength:300},jc=/\b(?:[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+|[A-Z][A-Z0-9]*\d[A-Z0-9]*[a-z]?|[A-Z]{2,})\b/g,Gc=new Set(["GO","NO-GO","NO","PENDING","DEFERRED","LR","RL","TB","BT","TD","UTF-8"]),Cs=/\beither\b[\s\S]{0,160}?\bor\b|\bsoit\b[\s\S]{0,160}?\bsoit\b|\b(?:instead of|rather than|plut[oô]t que|versus|vs\.?|choos(?:e|ing) between|choisir entre)\b/i,Uc=/(?:^|[\n\r\u2028\u2029])\s*(?:[-*+•‣>]|\d+[.)]|[a-z][.)])\s+\S|\([a-z]\)[\s\S]*\([a-z]\)|\b(?:sub[- ]?options?|sous[- ]?options?)\b/i,Qc=/[\n\r\u2028\u2029]/,Wt=e=>!e?.trim(),Qo=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{},Jc=e=>(e.join(" ").match(/\S+/gu)?.length??0)/lt.wordsPerMinute,Ky=e=>{const t=[],n=(m,x,A)=>{t.push({path:m,code:x,message:A})},r=e.readability,o=r?.ownerRequestQuote?.trim()??"";r?.noOwnerRequest===!0?n("$.readability.noOwnerRequest",o?"conflicting_owner_request":"presentation_blocked",o?"A quoted owner request conflicts with noOwnerRequest: keep the literal request and remove the flag.":"No owner request: presentation is blocked until the owner's literal request is quoted."):o?o.length<lt.minOwnerRequestQuoteLength&&n("$.readability.ownerRequestQuote","owner_request_too_short","Quote the full literal owner request so the owner recognizes their own intention."):n("$.readability.ownerRequestQuote","missing_owner_request","Quote the literal owner request this dossier serves, or set noOwnerRequest to block presentation explicitly."),Wt(r?.stakes)?n("$.readability.stakes","missing_stakes","State why the decision matters to the owner, using plain words about cost, time or consequences."):r.stakes.trim().length<lt.minStakesLength&&n("$.readability.stakes","stakes_too_short","Explain the actual consequence for the owner in at least 20 characters; an internal label is insufficient.");const i=r?.stakesLevel;(!i||!Object.hasOwn(Uo,i))&&n("$.readability.stakesLevel","missing_stakes_level","Declare stakesLevel: low for a small reversible inconvenience, medium for cost/disruption, high for lasting or major impact.");const s=r?.readingBudgetMinutes,a=s!==void 0&&Number.isFinite(s)&&s>=1&&s<=lt.maxDossierBudgetMinutes;s===void 0?n("$.readability.readingBudgetMinutes","missing_reading_budget","Declare a total reading budget in minutes proportionate to the stakes: low up to 2, medium up to 8, high up to 30."):a?i&&Object.hasOwn(Uo,i)&&s>Uo[i]&&n("$.readability.readingBudgetMinutes","reading_budget_disproportionate",`The ${i} stakes budget is at most ${Uo[i]} minutes; shorten this dossier or justify a different stakes level.`):n("$.readability.readingBudgetMinutes","reading_budget_out_of_range","The total reading budget must be a finite number between 1 and 30 minutes.");const l=new Map;r?.glossary?.forEach((m,x)=>{if(Wt(m.term)||Wt(m.definition))n(`$.readability.glossary[${x}]`,"empty_glossary_entry","Give every glossary term a definition in plain words visible to the reader.");else{const A=m.term.trim();(l.has(A)||m.definition.trim()===A)&&n(`$.readability.glossary[${x}]`,"invalid_glossary_entry","Use one definition per term and expand its meaning; repeating the code does not explain it."),(m.definition.match(jc)??[]).some(R=>!Gc.has(R))&&n(`$.readability.glossary[${x}].definition`,"invalid_glossary_entry","Explain each term independently in plain words, without itself or another code, even one defined elsewhere."),l.set(A,m.definition)}});const u=(m,x)=>{for(const A of new Set(m?.match(jc)??[]))!Gc.has(A)&&!l.has(A)&&n(x,"undefined_code",`Unexpanded code or acronym "${A}": define it in the visible glossary in plain words, or rewrite it.`)},d=[],h=(m,x)=>{u(m,x),m&&d.push(m)};Yc(e)&&(e.sources.forEach((m,x)=>{u(m.title,`$.sources[${x}].title`),u(m.alt,`$.sources[${x}].alt`)}),e.citations.forEach((m,x)=>{u(m.label,`$.citations[${x}].label`),m.locator.kind==="image"&&u(m.locator.caption,`$.citations[${x}].locator.caption`)}),e.evidenceGroups.forEach((m,x)=>h(m.summary,`$.evidenceGroups[${x}].summary`)),e.annexes.forEach((m,x)=>{h(m.title,`$.annexes[${x}].title`),h(m.summary,`$.annexes[${x}].summary`),m.blocks.forEach((A,R)=>{const q=`$.annexes[${x}].blocks[${R}]`;A.kind==="text"&&u(A.text,`${q}.text`),A.kind==="table"&&[...A.columns,...A.rows.flat()].forEach(P=>u(P,q))})}));for(const m of["title","subject"])h(e[m],`$.${m}`),Wt(e[m])&&n(`$.${m}`,"empty_heading","Name the subject and decision in a short, non-empty line the owner understands."),z(e[m],`$.${m}`,lt.maxHeadingLength);h(o,"$.readability.ownerRequestQuote"),h(r?.stakes,"$.readability.stakes"),r?.glossary?.forEach((m,x)=>{d.push(m.term),h(m.definition,`$.readability.glossary[${x}].definition`)});const f=(m,x)=>{m.forEach((A,R)=>{h(A.author,`${x}[${R}].author`),h(A.summary,`${x}[${R}].summary`)})};f(e.amendmentTrace,"$.amendmentTrace"),e.interactions.forEach((m,x)=>h(m.label,`$.interactions[${x}].label`));const g=e.sections.filter(m=>m.kind==="question"),v=new Set(g.map(m=>m.id));g.length||n("$.sections","missing_question","A decision dossier needs an explicit question with context, options and a recommendation.");const p=(m,x,A)=>{Wt(m)?A&&n(x,"hidden_decision","This content implies a choice without an explicit question: set questionId to the question the owner must answer."):v.has(m)||n(x,"unknown_question_ref",`Question "${m}" does not exist in this dossier; link to an explicit question.`)},b=e.sections.filter(m=>m.kind==="optionSet");let S=0;return e.sections.forEach((m,x)=>{const A=`$.sections[${x}]`;switch(m.kind){case"prose":h(m.markdown,`${A}.markdown`),p(m.questionId,`${A}.questionId`,Cs.test(m.markdown));break;case"outcome":h(m.statement,`${A}.statement`),p(m.questionId,`${A}.questionId`,m.modality!=="comment"||Cs.test(m.statement));break;case"diagram":h(m.alt,`${A}.alt`),m.scene===void 0?h(m.source,`${A}.source`):u(m.source,`${A}.source`);for(const[R,q]of[["entities","name"],["relations","label"]])for(const[P,N]of Object.entries(Qo(m.scene?.[R]))){const T=Qo(Qo(Qo(N).attributes)[q]);T.kind==="text"&&typeof T.value=="string"&&h(T.value,`${A}.scene.${R}.${P}.attributes.${q}.value`)}break;case"amendmentTrace":f(m.steps,`${A}.steps`);break;case"optionSet":p(m.questionId,`${A}.questionId`,!0),u(m.title,`${A}.title`),z(m.title,`${A}.title`,lt.maxHeadingLength),m.options.forEach((R,q)=>M(R,`${A}.options[${q}]`));break;case"question":{Wt(m.question)&&n(`${A}.question`,"empty_question","State the explicit decision the owner needs to make in this question."),Wt(m.context)?n(`${A}.context`,"missing_question_context","Add representative context in plain words so the question can be understood on its own."):m.context.trim().length<lt.minQuestionContextLength&&n(`${A}.context`,"question_context_too_short","Give representative context of at least 20 characters, including what changes for the owner."),Wt(m.recommendedAnswer)&&n(`${A}.recommendedAnswer`,"missing_recommendation","Recommend an option with a short reason that relates to the owner's request and stakes."),z(m.question,`${A}.question`,lt.maxDecisionLineLength),z(m.recommendedAnswer,`${A}.recommendedAnswer`,lt.maxDecisionLineLength);const R=b.filter(w=>w.questionId===m.id),q=R.flatMap(w=>w.options);(q.length<2||q.length>4)&&n(A,"option_count",`Each question needs 2–4 short options; this question has ${q.length}.`),q.some(w=>w.id===m.recommendedOptionId)||n(`${A}.recommendedOptionId`,"unknown_recommended_option","Identify the recommended option by its id among this question's options, with the reason in recommendedAnswer.");const P=[m.question,m.context,m.recommendedAnswer,m.answer,q.find(w=>w.id===m.recommendedOptionId)?.label,...R.map(w=>w.title),...q.flatMap(w=>[w.label,w.consequence,w.body,w.annotationComment])];u(m.question,`${A}.question`),u(m.context,`${A}.context`),u(m.recommendedAnswer,`${A}.recommendedAnswer`),u(m.answer,`${A}.answer`);const N=m.readingTimeMinutes,T=Jc(P);N===void 0?n(`${A}.readingTimeMinutes`,"missing_reading_time","Estimate the time to read this question, context and options in readingTimeMinutes (up to 2 minutes)."):!Number.isFinite(N)||N<=0||N>2?n(`${A}.readingTimeMinutes`,"reading_time_exceeded","Each question must take a positive finite time of at most 2 minutes; shorten or split it."):(N<T&&n(`${A}.readingTimeMinutes`,"reading_time_underestimated",`This question needs at least ${T.toFixed(2)} minutes at 180 words/minute; shorten it or correct its estimate (maximum 2 minutes).`),S+=Math.max(N,T));break}}}),a&&S+Jc(d)>s&&n("$.readability.readingBudgetMinutes","reading_budget_exceeded","The questions plus shared context and glossary exceed the declared reading budget; shorten the dossier to match its stakes."),t;function z(m,x,A){m&&((m.trim().length>A||Qc.test(m))&&n(x,"decision_line_too_long",`Use one short line of at most ${A} characters; put explanation in the question context.`),Uc.test(m)&&n(x,"nested_suboptions","Expose sub-choices as separate options or questions, without nested lists or inline branches."))}function M(m,x){const A=[{field:"label",text:m.label,max:lt.maxOptionLabelLength,code:"option_too_long"},{field:"consequence",text:m.consequence,max:lt.maxConsequenceLength,code:"consequence_too_long"},{field:"body",text:m.body,max:lt.maxOptionBodyLength,code:"option_too_long"},{field:"annotationComment",text:m.annotationComment,max:lt.maxOptionBodyLength,code:"option_too_long"}];Wt(m.label)&&n(`${x}.label`,"empty_option_label","Name this option in a few plain words so the owner can compare it at a glance."),Wt(m.consequence)&&n(`${x}.consequence`,"missing_consequence","Add a one-line consequence: what choosing this option changes for the owner.");for(const{field:R,text:q,max:P,code:N}of A)q&&(u(q,`${x}.${R}`),(q.trim().length>P||Qc.test(q))&&n(`${x}.${R}`,N,`Keep this option ${R} to one short line of at most ${P} characters; move necessary context to the question.`),(Uc.test(q)||Cs.test(q))&&n(`${x}.${R}`,"nested_suboptions","This option hides sub-options: expose the choices as separate options or as a separate question."))}};class $c extends Error{constructor(t){super(t.message),this.issue=t}issue}const Ce=(e,t,n)=>{throw new $c({path:e,code:t,message:n})};function Ft(e,t,n,r=[]){(!e||typeof e!="object"||Array.isArray(e))&&Ce(t,"invalid_evidence","Expected a closed object");const o=e;for(const i of Object.keys(o))[...n,...r].includes(i)||Ce(`${t}.${i}`,"invalid_evidence","Unknown evidence field");for(const i of n)Object.hasOwn(o,i)||Ce(`${t}.${i}`,"invalid_evidence","Missing evidence field");return o}function Ye(e,t,n=!1){return(typeof e!="string"||!n&&!e.trim())&&Ce(t,"invalid_evidence","Expected a non-empty string"),e}function mn(e,t){return Array.isArray(e)||Ce(t,"invalid_evidence","Expected an array"),e}const As=(e,t)=>mn(e,t).map((n,r)=>Ye(n,`${t}[${r}]`));function Zy(e,t){const n=r=>new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(r);if(t==="image/png"){if(e.length>=33&&[137,80,78,71,13,10,26,10].every((r,o)=>e[o]===r)&&n(8)===13&&n(12)===1229472850)return[n(16),n(20)]}else if(e[0]===255&&e[1]===216){let r=2;for(;r+4<e.length&&e[r]===255;){const o=e[r+1],i=e[r+2]<<8|e[r+3];if(i<2||r+2+i>e.length)break;if([192,193,194,195,197,198,199,201,202,203,205,206,207].includes(o)&&i>=8)return[e[r+7]<<8|e[r+8],e[r+5]<<8|e[r+6]];r+=i+2}}}const eu=e=>/^text\/[a-z0-9.+-]+$/.test(e)||["application/json","application/yaml","application/x-yaml","application/x-ndjson"].includes(e);function Yy(e,t){const n=new Map;return{sources:mn(e,"$.sources").map((o,i)=>{const s=`$.sources[${i}]`,a=Ft(o,s,["id","title","origin","mediaType","encoding","data","sha256","size"],["width","height","alt"]);for(const f of["id","title","mediaType","sha256"])Ye(a[f],`${s}.${f}`);t(a.id,`${s}.id`);const l=a.origin,u=l&&Object.hasOwn(l,"uri")?["uri"]:["repo","revision","path"];Ft(l,`${s}.origin`,u);for(const f of u)Ye(l[f],`${s}.origin.${f}`);a.encoding!=="base64"&&Ce(`${s}.encoding`,"source_encoding","Only original base64 bytes are accepted");const d=a.mediaType;!eu(d)&&!["image/png","image/jpeg"].includes(d)&&Ce(`${s}.mediaType`,"unsupported_media",`Unsupported media for source ${a.id}`);let h;try{h=Ts(Ye(a.data,`${s}.data`,!0))}catch{return Ce(`${s}.data`,"source_encoding",`Invalid base64 for source ${a.id}`)}if((!Number.isSafeInteger(a.size)||a.size!==h.length)&&Ce(`${s}.size`,"source_size",`Byte size mismatch for source ${a.id}`),(!/^[a-f0-9]{64}$/.test(a.sha256)||Ey(h)!==a.sha256)&&Ce(`${s}.sha256`,"source_digest",`SHA-256 mismatch for source ${a.id}`),eu(d)){try{n.set(a.id,Zc(Kc(h)).length)}catch{Ce(`${s}.data`,"source_encoding",`Invalid UTF-8 for source ${a.id}`)}for(const f of["width","height","alt"])a[f]!==void 0&&Ce(`${s}.${f}`,"invalid_evidence","Image metadata on text")}else{Ye(a.alt,`${s}.alt`);const f=Zy(h,d);(!f||!Number.isSafeInteger(a.width)||!Number.isSafeInteger(a.height)||f[0]<=0||f[1]<=0||f[0]!==a.width||f[1]!==a.height)&&Ce(s,"image_metadata",`Image dimensions/signature mismatch for source ${a.id}`)}return a}),lineCounts:n}}function Xy(e,t){try{const{schemaVersion:n,sources:r,citations:o,evidenceGroups:i,annexes:s,...a}=e,l=new Map,u=(P,N)=>{if(!P||typeof P!="object"||Array.isArray(P))return P;const{citationRefs:T,...w}=P;return T!==void 0&&l.set(N,As(T,`${N}.citationRefs`)),w};Array.isArray(a.sections)&&(a.sections=a.sections.map((P,N)=>{const T=u(P,`$.sections[${N}]`);return T?.kind==="optionSet"&&Array.isArray(T.options)?{...T,options:T.options.map((w,C)=>u(w,`$.sections[${N}].options[${C}]`))}:T}));const d=t(a);if(!d.ok)return d;const h=d.value,f=new Set,g=new Set([h.ref]),v=(P,N)=>{f.has(P)&&Ce(N,"duplicate_id",`Duplicate id ${P}`),f.add(P)};h.sections.forEach(P=>{v(P.id,"$.sections"),g.add(P.id),g.add(P.targetRef),P.kind==="optionSet"&&P.options.forEach(N=>{v(N.id,"$.sections.options"),g.add(N.id),g.add(N.targetRef)})});const{sources:p,lineCounts:b}=Yy(r,v),S=new Map(p.map(P=>[P.id,P])),z=mn(o,"$.citations").map((P,N)=>{const T=`$.citations[${N}]`,w=Ft(P,T,["id","sourceId","label","locator"]);for(const E of["id","sourceId","label"])Ye(w[E],`${T}.${E}`);v(w.id,`${T}.id`);const C=S.get(w.sourceId)??Ce(`${T}.sourceId`,"unresolved_source",`Unknown source ${w.sourceId}`),y=w.locator;return y?.kind==="lines"?(Ft(y,`${T}.locator`,["kind","start","end"]),b.has(C.id)||Ce(`${T}.locator`,"citation_media",`Source ${C.id} is not text`),(!Number.isSafeInteger(y.start)||!Number.isSafeInteger(y.end)||y.start<1||y.end<y.start||y.end>b.get(C.id))&&Ce(`${T}.locator`,"citation_range",`Invalid inclusive line range for ${C.id}`)):y?.kind==="image"?(Ft(y,`${T}.locator`,["kind","caption"]),Ye(y.caption,`${T}.locator.caption`),C.mediaType.startsWith("image/")||Ce(`${T}.locator`,"citation_media",`Source ${C.id} is not an image`)):Ce(`${T}.locator`,"invalid_evidence","Unknown citation locator"),w}),M=new Set(z.map(P=>P.id)),m=(P,N,T,w)=>{const C=As(P,N);for(const y of C)T.has(y)||Ce(N,w,`Unresolved reference ${y}`);return C};for(const[P,N]of l)m(N,`${P}.citationRefs`,M,"unresolved_citation");const x=mn(i,"$.evidenceGroups").map((P,N)=>{const T=`$.evidenceGroups[${N}]`,w=Ft(P,T,["id","summary","citationRefs","sourceRefs"]);return v(Ye(w.id,`${T}.id`),`${T}.id`),Ye(w.summary,`${T}.summary`),m(w.citationRefs,`${T}.citationRefs`,M,"unresolved_citation"),m(w.sourceRefs,`${T}.sourceRefs`,new Set(S.keys()),"unresolved_source"),w}),A=mn(s,"$.annexes").map((P,N)=>{const T=`$.annexes[${N}]`,w=Ft(P,T,["id","title","summary","blocks","backRefs"]);return v(Ye(w.id,`${T}.id`),`${T}.id`),Ye(w.title,`${T}.title`),Ye(w.summary,`${T}.summary`),m(w.backRefs,`${T}.backRefs`,g,"unresolved_target"),mn(w.blocks,`${T}.blocks`).forEach((C,y)=>{const E=`${T}.blocks[${y}]`,I=C?.kind;if(I==="text"||I==="code"){const k=Ft(C,E,["kind","text"],I==="code"?["language"]:[]);Ye(k.text,`${E}.text`,!0),k.language!==void 0&&Ye(k.language,`${E}.language`)}else if(I==="table"){const k=Ft(C,E,["kind","columns","rows"]),O=As(k.columns,`${E}.columns`);O.length||Ce(E,"invalid_evidence","A table needs columns"),mn(k.rows,`${E}.rows`).forEach((D,H)=>{const K=mn(D,`${E}.rows[${H}]`);K.forEach((Q,j)=>Ye(Q,`${E}.rows[${H}][${j}]`,!0)),K.length!==O.length&&Ce(E,"invalid_evidence","Table row width mismatch")})}else if(I==="references"){const k=Ft(C,E,["kind","citationRefs"]);m(k.citationRefs,`${E}.citationRefs`,M,"unresolved_citation")}else Ce(`${E}.kind`,"invalid_evidence","Unsupported annex block (no decisions or active content)")}),w}),R=(P,N)=>l.has(N)?{...P,citationRefs:l.get(N)}:P,q=h.sections.map((P,N)=>R(P.kind==="optionSet"?{...P,options:P.options.map((T,w)=>R(T,`$.sections[${N}].options[${w}]`))}:P,`$.sections[${N}]`));return{ok:!0,value:{...h,schemaVersion:2,sections:q,sources:p,citations:z,evidenceGroups:x,annexes:A}}}catch(n){if(n instanceof $c)return{ok:!1,issues:[n.issue]};throw n}}class jy extends Error{issues;constructor(t){super(`invalid DecisionDossierDocument: ${t.map(n=>`${n.path} ${n.code}: ${n.message}`).join("; ")}`),this.name="DecisionDossierValidationError",this.issues=t}}const Jo=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ae=(e,t,n)=>({path:e,code:t,message:n}),$e=(e,t,n,r,o,i)=>{if(!Jo(e)){i.push(Ae(t,"invalid_type","expected an object"));return}const s=new Set(n);for(const a of Object.keys(e))s.has(a)||i.push(Ae(`${t}.${a}`,"unknown_field","field not in the closed schema"));for(const a of r)e[a]===void 0&&i.push(Ae(`${t}.${a}`,"missing_field","required field is missing"));for(const a of o)e[a]!==void 0&&typeof e[a]!="string"&&i.push(Ae(`${t}.${a}`,"invalid_type","expected a string"));return e},Fr=(e,t,n,r)=>{(typeof e!="string"||!n.includes(e))&&r.push(Ae(t,"invalid_enum",`expected one of: ${n.join(" | ")}`))},tu=["ref","subject","title","hash","cursor","sections","interactions","provenance","amendmentTrace"],Gy=["ref","subject","title","hash","cursor"],Uy=[...tu,"readability"],Qy=(e,t,n)=>{const r=n.length,o=$e(e,t,["kind","id","targetRef","label","body","annotation","annotationComment","consequence"],["kind","id","targetRef","label","annotation"],["id","targetRef","label","body","annotationComment","consequence"],n);if(o!==void 0&&(o.kind!=="option"&&n.push(Ae(`${t}.kind`,"invalid_discriminator",'expected "option"')),Fr(o.annotation,`${t}.annotation`,["none","accept","reject","comment"],n),n.length===r))return{kind:"option",id:o.id,targetRef:o.targetRef,label:o.label,...typeof o.body=="string"?{body:o.body}:{},annotation:o.annotation,...typeof o.annotationComment=="string"?{annotationComment:o.annotationComment}:{},...typeof o.consequence=="string"?{consequence:o.consequence}:{}}},nu=(e,t,n)=>{const r=n.length,o=$e(e,t,["at","author","summary"],["at","author","summary"],["at","author","summary"],n);if(!(o===void 0||n.length!==r))return{at:o.at,author:o.author,summary:o.summary}},Jy=(e,t,n)=>{if(!Jo(e)){n.push(Ae(t,"invalid_type","expected an object"));return}const r=e.kind;if(r!=="prose"&&r!=="question"&&r!=="optionSet"&&r!=="outcome"&&r!=="amendmentTrace"&&r!=="diagram"){n.push(Ae(`${t}.kind`,typeof r>"u"?"missing_field":"unknown_node_kind",`unknown section kind ${typeof r=="string"?`"${r}"`:" discriminant"}`));return}const o=n.length;switch(r){case"prose":{const i=$e(e,t,["kind","id","targetRef","markdown","questionId"],["kind","id","targetRef","markdown"],["id","targetRef","markdown","questionId"],n);return i===void 0||n.length!==o?void 0:{kind:"prose",id:i.id,targetRef:i.targetRef,markdown:i.markdown,...typeof i.questionId=="string"?{questionId:i.questionId}:{}}}case"question":{const i=$e(e,t,["kind","id","targetRef","question","recommendedAnswer","answer","state","context","readingTimeMinutes","recommendedOptionId"],["kind","id","targetRef","question","state"],["id","targetRef","question","recommendedAnswer","answer","context","recommendedOptionId"],n);return i===void 0||(Fr(i.state,`${t}.state`,["open","answered","validated"],n),i.readingTimeMinutes!==void 0&&(typeof i.readingTimeMinutes!="number"||!Number.isFinite(i.readingTimeMinutes))&&n.push(Ae(`${t}.readingTimeMinutes`,"invalid_type","expected a finite number")),n.length!==o)?void 0:{kind:"question",id:i.id,targetRef:i.targetRef,question:i.question,...typeof i.recommendedAnswer=="string"?{recommendedAnswer:i.recommendedAnswer}:{},...typeof i.answer=="string"?{answer:i.answer}:{},state:i.state,...typeof i.context=="string"?{context:i.context}:{},...typeof i.recommendedOptionId=="string"?{recommendedOptionId:i.recommendedOptionId}:{},...typeof i.readingTimeMinutes=="number"?{readingTimeMinutes:i.readingTimeMinutes}:{}}}case"optionSet":{const i=$e(e,t,["kind","id","targetRef","title","options","questionId"],["kind","id","targetRef","options"],["id","targetRef","title","questionId"],n);if(i===void 0)return;const s=[];return Array.isArray(i.options)?i.options.forEach((a,l)=>{const u=Qy(a,`${t}.options[${l}]`,n);u!==void 0&&s.push(u)}):n.push(Ae(`${t}.options`,"invalid_type","expected an array")),n.length!==o?void 0:{kind:"optionSet",id:i.id,targetRef:i.targetRef,...typeof i.title=="string"?{title:i.title}:{},options:s,...typeof i.questionId=="string"?{questionId:i.questionId}:{}}}case"outcome":{const i=$e(e,t,["kind","id","targetRef","modality","statement","questionId"],["kind","id","targetRef","modality","statement"],["id","targetRef","statement","questionId"],n);return i===void 0||(Fr(i.modality,`${t}.modality`,["decision","orientation","amendment","comment"],n),n.length!==o)?void 0:{kind:"outcome",id:i.id,targetRef:i.targetRef,modality:i.modality,statement:i.statement,...typeof i.questionId=="string"?{questionId:i.questionId}:{}}}case"amendmentTrace":{const i=$e(e,t,["kind","id","targetRef","steps"],["kind","id","targetRef","steps"],["id","targetRef"],n);if(i===void 0)return;const s=[];return Array.isArray(i.steps)?i.steps.forEach((a,l)=>{const u=nu(a,`${t}.steps[${l}]`,n);u!==void 0&&s.push(u)}):n.push(Ae(`${t}.steps`,"invalid_type","expected an array")),n.length!==o?void 0:{kind:"amendmentTrace",id:i.id,targetRef:i.targetRef,steps:s}}case"diagram":{const i=$e(e,t,["kind","id","targetRef","syntax","source","alt","scene"],["kind","id","targetRef","syntax","source","alt"],["id","targetRef","source","alt"],n);return i===void 0||(Fr(i.syntax,`${t}.syntax`,["mermaid","plantuml"],n),i.scene!==void 0&&!Jo(i.scene)&&n.push(Ae(`${t}.scene`,"invalid_type","expected a diagram-core SemanticDocument object")),n.length!==o)?void 0:{kind:"diagram",id:i.id,targetRef:i.targetRef,syntax:i.syntax,source:i.source,alt:i.alt,...i.scene===void 0?{}:{scene:i.scene}}}}},$y=(e,t,n)=>{const r=n.length,o=$e(e,t,["name","targetRef","label","enabled"],["name","targetRef","label","enabled"],["name","targetRef","label"],n);if(o!==void 0&&(o.enabled!==!1&&n.push(Ae(`${t}.enabled`,"enabled_action","snapshot interactions must stay disabled (enabled:false)")),n.length===r))return{name:o.name,targetRef:o.targetRef,label:o.label,enabled:!1}},eb=(e,t,n)=>{const r=n.length,o=$e(e,t,["term","definition"],["term","definition"],["term","definition"],n);if(!(o===void 0||n.length!==r))return{term:o.term,definition:o.definition}},tb=(e,t,n)=>{const r=n.length,o=$e(e,t,["ownerRequestQuote","noOwnerRequest","stakes","stakesLevel","readingBudgetMinutes","glossary"],[],["ownerRequestQuote","stakes"],n);if(o===void 0)return;o.stakesLevel!==void 0&&Fr(o.stakesLevel,`${t}.stakesLevel`,["low","medium","high"],n),o.noOwnerRequest!==void 0&&typeof o.noOwnerRequest!="boolean"&&n.push(Ae(`${t}.noOwnerRequest`,"invalid_type","expected a boolean")),o.readingBudgetMinutes!==void 0&&(typeof o.readingBudgetMinutes!="number"||!Number.isFinite(o.readingBudgetMinutes))&&n.push(Ae(`${t}.readingBudgetMinutes`,"invalid_type","expected a finite number"));let i;if(o.glossary!==void 0&&(i=[],Array.isArray(o.glossary)?o.glossary.forEach((s,a)=>{const l=eb(s,`${t}.glossary[${a}]`,n);l!==void 0&&i.push(l)}):n.push(Ae(`${t}.glossary`,"invalid_type","expected an array"))),n.length===r)return{...typeof o.ownerRequestQuote=="string"?{ownerRequestQuote:o.ownerRequestQuote}:{},...typeof o.noOwnerRequest=="boolean"?{noOwnerRequest:o.noOwnerRequest}:{},...typeof o.stakes=="string"?{stakes:o.stakes}:{},...o.stakesLevel!==void 0?{stakesLevel:o.stakesLevel}:{},...typeof o.readingBudgetMinutes=="number"?{readingBudgetMinutes:o.readingBudgetMinutes}:{},...i!==void 0?{glossary:i}:{}}},ru=e=>{const t=[],n=$e(e,"$",[...Uy],[...tu],[...Gy],t);if(n===void 0)return{ok:!1,issues:t};const r=[];Array.isArray(n.sections)?n.sections.forEach((u,d)=>{const h=Jy(u,`$.sections[${d}]`,t);h!==void 0&&r.push(h)}):t.push(Ae("$.sections","invalid_type","expected an array"));const o=[];Array.isArray(n.interactions)?n.interactions.forEach((u,d)=>{const h=$y(u,`$.interactions[${d}]`,t);h!==void 0&&o.push(h)}):t.push(Ae("$.interactions","invalid_type","expected an array"));let i;const s=$e(n.provenance,"$.provenance",["source","readAt","comprehensionEvidence"],["source","readAt"],["source","readAt"],t);if(s!==void 0){let u;if(s.comprehensionEvidence!==void 0){const d=t.length,h=$e(s.comprehensionEvidence,"$.provenance.comprehensionEvidence",["subject","dossierHash","signature"],["subject","dossierHash"],["subject","dossierHash","signature"],t);h!==void 0&&t.length===d&&(u={subject:h.subject,dossierHash:h.dossierHash,...typeof h.signature=="string"?{signature:h.signature}:{}})}i={source:s.source,readAt:s.readAt,...u!==void 0?{comprehensionEvidence:u}:{}}}const a=[];Array.isArray(n.amendmentTrace)?n.amendmentTrace.forEach((u,d)=>{const h=nu(u,`$.amendmentTrace[${d}]`,t);h!==void 0&&a.push(h)}):t.push(Ae("$.amendmentTrace","invalid_type","expected an array"));let l;return n.readability!==void 0&&(l=tb(n.readability,"$.readability",t)),t.length>0||i===void 0||n.readability!==void 0&&l===void 0?{ok:!1,issues:t}:typeof n.ref!="string"||typeof n.subject!="string"||typeof n.title!="string"||typeof n.hash!="string"||typeof n.cursor!="string"?{ok:!1,issues:t}:{ok:!0,value:{ref:n.ref,subject:n.subject,title:n.title,hash:n.hash,cursor:n.cursor,sections:r,interactions:o,provenance:i,amendmentTrace:a,...l!==void 0?{readability:l}:{}}}},nb=e=>Jo(e)&&Object.hasOwn(e,"schemaVersion")?e.schemaVersion!==2?{ok:!1,issues:[Ae("$.schemaVersion","unsupported_version","Supported explicit version: 2; omit schemaVersion for legacy v1")]}:Xy(e,ru):ru(e),rb=e=>{const t=[],n=new Map,r=(s,a)=>{const l=n.get(s);l!==void 0?t.push(Ae(a,"duplicate_id",`node id "${s}" already used at ${l}`)):n.set(s,a)};e.sections.forEach((s,a)=>{const l=`$.sections[${a}]`;r(s.id,`${l}.id`),s.kind==="optionSet"&&s.options.forEach((u,d)=>{r(u.id,`${l}.options[${d}].id`)})});const o=new Set([e.ref]);for(const s of e.sections)if(o.add(s.id),o.add(s.targetRef),s.kind==="optionSet")for(const a of s.options)o.add(a.id),o.add(a.targetRef);e.interactions.forEach((s,a)=>{o.has(s.targetRef)||t.push(Ae(`$.interactions[${a}].targetRef`,"unresolved_target",`interaction target "${s.targetRef}" resolves to no node`))});const i=e.provenance.comprehensionEvidence;return i!==void 0&&i.dossierHash!==e.hash&&t.push(Ae("$.provenance.comprehensionEvidence.dossierHash","evidence_mismatch","comprehension evidence does not match the snapshot hash")),t},ob=e=>{const t=nb(e);if(!t.ok)return t;const n=rb(t.value);return n.length>0?{ok:!1,issues:n}:t},ib=e=>{const t=ob(e);if(!t.ok)return t;const n=Ky(t.value);return n.length>0?{ok:!1,issues:n}:t},sb=e=>{const t=ib(e);if(!t.ok)throw new jy(t.issues);return t.value},ab=e=>{const t=sb(e),n=t.sections.filter(o=>o.kind==="optionSet"),r=t.sections.flatMap(o=>{if(o.kind==="optionSet")return[];if(o.kind!=="question")return[o];const i=n.filter(d=>d.questionId===o.id),s=i.flatMap(d=>d.options).find(d=>d.id===o.recommendedOptionId),a=o.recommendedAnswer.trim(),l=s.label.trim(),u=a.toLowerCase().startsWith(l.toLowerCase())&&/^(?:$|[\s,:;.!?—–-])/.test(a.slice(l.length));return[{...o,recommendedAnswer:u?a:`${l} — ${a}`},...i]});return{...t,sections:r}};var lb=G("<h2>Votre demande</h2><blockquote> </blockquote><p> </p>",1),cb=G("<dt> </dt><dd> </dd>",1),ub=G('<aside aria-label="Glossaire"><h2>En mots simples</h2><dl></dl></aside>'),db=G('<p class="prose"> </p>'),$o=G("<p> </p>"),fb=G('<h2> </h2><p> </p> <p class="recommendation"><!> </p> <p class="muted"> </p> <!>',1),hb=G("<h3> </h3>"),gb=G("<strong> </strong> <!> <p> </p><!> <!> <!>",1),vb=G("<button><!></button>"),mb=G('<!> <div class="options" role="group"></div> <p class="selection" aria-live="polite"> </p>',1),pb=G("<h3>Conclusion proposée</h3><p> </p>",1),yb=G('<button class="citation-link"> </button>'),bb=G('<p> <button class="citation-link"> </button></p>'),_b=G('<section class="dossier-section"><!> <!> <!></section>'),wb=G("<li> </li>"),xb=G("<details><summary>Historique</summary><ul></ul></details>"),kb=G('<main><div class="reading-meta"><!> </div> <!> <!> <!> <!> <!> <footer><p>Vos sélections restent dans cette page jusqu’à sa fermeture. Elles ne valent pas décision enregistrée.</p> <details><summary>Source et version</summary><p> </p><p> </p></details></footer></main>'),Sb=G('<div class="focus-page"><header class="title-band"><h1> </h1> <!></header> <!></div>');function Eb(e,t){se(t,!0);let n=oe(Nt(matchMedia("(prefers-color-scheme: dark)").matches));const r=new Of;let o=oe(null),i=_(()=>t.document.sections.filter(h=>h.kind==="question")),s=_(()=>ab(t.document).sections),a=_(()=>c(s).filter(h=>h.kind==="optionSet"));const l=(h,f)=>c(a).filter(g=>g.questionId===h).flatMap(g=>g.options).find(g=>g.id===f)?.label,u=(h,f)=>c(i).find(g=>g.id===h.questionId)?.recommendedOptionId===f.id;let d=_(()=>[...t.document.amendmentTrace,...t.document.sections.filter(h=>h.kind==="amendmentTrace").flatMap(h=>h.steps)]);{let h=_(()=>c(n)?qf:Lf);Nf(e,{get theme(){return c(h)},children:(f,g)=>{var v=Sb(),p=V(v),b=V(p),S=V(b),z=F(b,2);sf(z,{variant:"ghost",size:"sm",get"aria-pressed"(){return c(n)},onclick:()=>B(n,!c(n)),children:(m,x)=>{var A=xr();J(()=>$(A,`Thème ${c(n)?"clair":"sombre"}`)),L(m,A)},$$slots:{default:!0}});var M=F(p,2);uf(M,{size:"full",children:(m,x)=>{var A=kb(),R=V(A),q=V(R);Bi(q,{tone:"info",children:(W,Z)=>{var U=xr("Focus");L(W,U)},$$slots:{default:!0}});var P=F(q),N=F(R,2);fo(N,{children:(W,Z)=>{var U=lb(),X=F(ce(U)),ee=V(X),de=F(X),we=V(de);J(()=>{$(ee,t.document.readability.ownerRequestQuote),$(we,t.document.readability.stakes)}),L(W,U)},$$slots:{default:!0}});var T=F(N,2);{var w=W=>{var Z=ub(),U=F(V(Z));Te(U,21,()=>t.document.readability.glossary,Ne,(X,ee)=>{var de=cb(),we=ce(de),re=V(we),be=F(we),he=V(be);J(()=>{$(re,c(ee).term),$(he,c(ee).definition)}),L(X,de)}),L(W,Z)};pe(T,W=>{t.document.readability.glossary?.length&&W(w)})}var C=F(T,2);Te(C,17,()=>c(s),Ne,(W,Z)=>{var U=_b(),X=V(U);{var ee=le=>{var me=db(),te=V(me);J(()=>$(te,c(Z).markdown)),L(le,me)},de=le=>{var me=fb(),te=ce(me),ge=V(te),xe=F(te),ye=V(xe),We=F(xe,2),ze=V(We);Bi(ze,{tone:"success",children:(vt,cr)=>{var ur=xr("Recommandation");L(vt,ur)},$$slots:{default:!0}});var Ee=F(ze),et=F(We,2),zn=V(et),lr=F(et,2);{var On=vt=>{var cr=$o(),ur=V(cr);J(()=>$(ur,`Réponse enregistrée : ${c(Z).answer??""}`)),L(vt,cr)};pe(lr,vt=>{c(Z).answer&&vt(On)})}J(()=>{$(ge,c(Z).question),$(ye,c(Z).context),$(Ee,` ${c(Z).recommendedAnswer??""}`),$(zn,`${c(Z).readingTimeMinutes??""} minute(s) · ${c(Z).state==="open"?"Question ouverte":c(Z).state==="answered"?"Réponse reçue":"Décision validée"}`)}),L(le,me)},we=le=>{var me=mb(),te=ce(me);{var ge=ze=>{var Ee=hb(),et=V(Ee);J(()=>$(et,c(Z).title)),L(ze,Ee)};pe(te,ze=>{c(Z).title&&ze(ge)})}var xe=F(te,2);Te(xe,21,()=>c(Z).options,Ne,(ze,Ee)=>{var et=vb();let zn;var lr=V(et);fo(lr,{children:(On,vt)=>{var cr=gb(),ur=ce(cr),Cb=V(ur),ou=F(ur,2);{var Ab=Xe=>{Bi(Xe,{tone:"success",children:(Kt,dr)=>{var Rb=xr("Recommandée");L(Kt,Rb)},$$slots:{default:!0}})},Mb=_(()=>u(c(Z),c(Ee)));pe(ou,Xe=>{c(Mb)&&Xe(Ab)})}var iu=F(ou,2),Ib=V(iu),su=F(iu);{var Nb=Xe=>{var Kt=$o(),dr=V(Kt);J(()=>$(dr,c(Ee).body)),L(Xe,Kt)};pe(su,Xe=>{c(Ee).body&&Xe(Nb)})}var au=F(su,2);{var Pb=Xe=>{var Kt=$o(),dr=V(Kt);J(()=>$(dr,`Annotation source : ${c(Ee).annotation??""}`)),L(Xe,Kt)};pe(au,Xe=>{c(Ee).annotation!=="none"&&Xe(Pb)})}var zb=F(au,2);{var Ob=Xe=>{var Kt=$o(),dr=V(Kt);J(()=>$(dr,c(Ee).annotationComment)),L(Xe,Kt)};pe(zb,Xe=>{c(Ee).annotationComment&&Xe(Ob)})}J(()=>{$(Cb,c(Ee).label),$(Ib,c(Ee).consequence)}),L(On,cr)},$$slots:{default:!0}}),J((On,vt)=>{ne(et,"id",c(Ee).id),zn=Ot(et,1,"option-card",null,zn,On),ne(et,"aria-pressed",vt)},[()=>({selected:r.get(c(Z).questionId)===c(Ee).id}),()=>r.get(c(Z).questionId)===c(Ee).id]),Ie("click",et,()=>r.set(c(Z).questionId,c(Ee).id)),L(ze,et)});var ye=F(xe,2),We=V(ye);J(ze=>{ne(xe,"aria-label",c(Z).title??"Options"),$(We,ze)},[()=>r.get(c(Z).questionId)?`Sélection locale : ${l(c(Z).questionId,r.get(c(Z).questionId))}. Communiquez ce choix au présentateur pour l’enregistrer.`:"Sélectionnez une option pour préparer votre réponse."]),L(le,me)},re=le=>{ky(le,{get document(){return c(Z).scene},get dark(){return c(n)},get alt(){return c(Z).alt}})},be=le=>{fo(le,{children:(me,te)=>{var ge=pb(),xe=F(ce(ge)),ye=V(xe);J(()=>$(ye,c(Z).statement)),L(me,ge)},$$slots:{default:!0}})};pe(X,le=>{c(Z).kind==="prose"?le(ee):c(Z).kind==="question"?le(de,1):c(Z).kind==="optionSet"?le(we,2):c(Z).kind==="diagram"?le(re,3):c(Z).kind==="outcome"&&le(be,4)})}var he=F(X,2);Te(he,17,()=>c(Z).citationRefs??[],Ne,(le,me)=>{var te=yb(),ge=V(te);J(xe=>$(ge,xe),[()=>t.document.citations.find(xe=>xe.id===c(me)).label]),Ie("click",te,()=>c(o).openCitation(c(me))),L(le,te)});var _e=F(he,2);{var Ve=le=>{var me=Re(),te=ce(me);Te(te,17,()=>c(Z).options,Ne,(ge,xe)=>{var ye=Re(),We=ce(ye);Te(We,17,()=>c(xe).citationRefs??[],Ne,(ze,Ee)=>{var et=bb(),zn=V(et),lr=F(zn),On=V(lr);J(vt=>{$(zn,`${c(xe).label??""} : `),$(On,vt)},[()=>t.document.citations.find(vt=>vt.id===c(Ee)).label]),Ie("click",lr,()=>c(o).openCitation(c(Ee))),L(ze,et)}),L(ge,ye)}),L(le,me)};pe(_e,le=>{c(Z).kind==="optionSet"&&le(Ve)})}J(()=>ne(U,"id",c(Z).id)),L(W,U)});var y=F(C,2);{var E=W=>{en(Fy(W,{get dossier(){return t.document}}),Z=>B(o,Z,!0),()=>c(o))};pe(y,W=>{t.document.schemaVersion===2&&W(E)})}var I=F(y,2);{var k=W=>{var Z=xb(),U=F(V(Z));Te(U,21,()=>c(d),Ne,(X,ee)=>{var de=wb(),we=V(de);J(()=>$(we,`${c(ee).at??""} · ${c(ee).author??""} : ${c(ee).summary??""}`)),L(X,de)}),L(W,Z)};pe(I,W=>{c(d).length&&W(k)})}var O=F(I,2),D=F(V(O),2),H=F(V(D)),K=V(H),Q=F(H),j=V(Q);J(()=>{$(P,` ${c(i).length??""} question(s) · ${t.document.readability.readingBudgetMinutes??""} minutes`),$(K,`${t.document.provenance.source??""} · ${t.document.provenance.readAt??""}`),$(j,`${t.document.ref??""} · ${t.document.cursor??""} · ${t.document.hash??""}`)}),L(m,A)},$$slots:{default:!0}}),J(()=>{ne(v,"data-mode",c(n)?"dark":"light"),$(S,t.document.title)}),L(f,v)},$$slots:{default:!0}})}ae()}Yn(["click"]);const Tb=JSON.parse(document.querySelector("[data-focus-document]").textContent);Ad(Eb,{target:document.getElementById("app"),props:Tb})})();
278
+ </script></body></html>