@wzh-/ai-chat-example 1.0.0 → 1.0.1

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 (809) hide show
  1. package/dist/_basePickBy-CkZky1V-.js +135 -0
  2. package/dist/_baseUniq-f11MNaXe.js +573 -0
  3. package/dist/abap--jVlqvLx.js +2 -0
  4. package/dist/actionscript-3-N1AoJtTA.js +2 -0
  5. package/dist/ada-CYGINLea.js +2 -0
  6. package/dist/ai-chat-example.css +3 -0
  7. package/dist/andromeeda-CvsZnG9k.js +2 -0
  8. package/dist/angular-html-C5vmpet2.js +14 -0
  9. package/dist/angular-html-CLTv4jM9.js +5 -0
  10. package/dist/angular-ts-BKqJWrwt.js +19 -0
  11. package/dist/apache-D6X-_dyJ.js +2 -0
  12. package/dist/apex-C7VgAgAE.js +2 -0
  13. package/dist/apl-BcJs32yU.js +15 -0
  14. package/dist/applescript-DN64Su6U.js +2 -0
  15. package/dist/ara-Dm1jHrgg.js +2 -0
  16. package/dist/arc-Dh_0vvHo.js +78 -0
  17. package/dist/architecture-U656AL7Q-BqUSHYp0.js +8 -0
  18. package/dist/architectureDiagram-VXUJARFQ-BQvEdgpc.js +4053 -0
  19. package/dist/array-CkdOJbdT.js +5 -0
  20. package/dist/asciidoc-BpqtqRF5.js +2 -0
  21. package/dist/asm-DUGlKYIq.js +2 -0
  22. package/dist/astro-q-huTQEP.js +16 -0
  23. package/dist/aurora-x-DwOih-un.js +2 -0
  24. package/dist/awk-DcnVbJrN.js +2 -0
  25. package/dist/ayu-dark-Bd-89MKE.js +2 -0
  26. package/dist/ballerina-BQVdQd9X.js +2 -0
  27. package/dist/bash-DI_p7w58.js +2 -0
  28. package/dist/bat-juB1J52r.js +2 -0
  29. package/dist/beancount-ThxIlRc3.js +2 -0
  30. package/dist/berry-qC18BfC_.js +2 -0
  31. package/dist/bibtex-CahMDY_0.js +2 -0
  32. package/dist/bicep-CHLBKS47.js +2 -0
  33. package/dist/blade-Ckff5WJQ.js +19 -0
  34. package/dist/blockDiagram-VD42YOAC-DKkDshq3.js +3013 -0
  35. package/dist/bsl-BTNab0FD.js +3 -0
  36. package/dist/c-BYDGkYzS.js +2 -0
  37. package/dist/c-CX6yudYR.js +2 -0
  38. package/dist/c4Diagram-YG6GDRKO-KsGqOrVB.js +2955 -0
  39. package/dist/cadence-DA5J9-Di.js +2 -0
  40. package/dist/cairo-DUZgbTPW.js +3 -0
  41. package/dist/catppuccin-frappe-CE3kxG1f.js +2 -0
  42. package/dist/catppuccin-latte-DW2FXeIv.js +2 -0
  43. package/dist/catppuccin-macchiato-CD5qjRSF.js +2 -0
  44. package/dist/catppuccin-mocha-BYwVJvjI.js +2 -0
  45. package/dist/channel-BrxVk5HC.js +3 -0
  46. package/dist/chunk-4BX2VUAB-BGxl5VGr.js +6 -0
  47. package/dist/chunk-55IACEB6-CDMD5yu1.js +6 -0
  48. package/dist/chunk-76Q3JFCE-Db4Lkmow.js +19 -0
  49. package/dist/chunk-ABZYJK2D-BZvlc6Ej.js +2515 -0
  50. package/dist/chunk-ATLVNIR6-C3g7rsIT.js +65 -0
  51. package/dist/chunk-B4BG7PRW-Dx-bGI1r.js +3108 -0
  52. package/dist/chunk-CVBHYZKI-DxEBlSK7.js +10 -0
  53. package/dist/chunk-DI55MBZ5-CCWuZnfW.js +1994 -0
  54. package/dist/chunk-DNh5sLlG.js +18 -0
  55. package/dist/chunk-EXTU4WIE-BjMX7pAs.js +7 -0
  56. package/dist/chunk-FMBD7UC4-Dj3Ok4Bk.js +3 -0
  57. package/dist/chunk-FPAJGGOC-nWbO3e1v.js +12252 -0
  58. package/dist/chunk-FWNWRKHM-CjcwRw2u.js +56 -0
  59. package/dist/chunk-HN2XXSSU-Lv4Ef0co.js +74 -0
  60. package/dist/chunk-JA3XYJ7Z-Dhh1_u_p.js +463 -0
  61. package/dist/chunk-JZLCHNYA-vrb_Ucuc.js +4861 -0
  62. package/dist/chunk-LBM3YZW2-D8lrIfGo.js +19 -0
  63. package/dist/chunk-LHMN2FUI-DLQ0i8hl.js +19 -0
  64. package/dist/chunk-MI3HLSF2-Dy6F9XgR.js +1140 -0
  65. package/dist/chunk-N4CR4FBY-BdaGxHlZ.js +39 -0
  66. package/dist/chunk-O7ZBX7Z2-D8Yaukr5.js +26 -0
  67. package/dist/chunk-QN33PNHL-DnPw7tni.js +23 -0
  68. package/dist/chunk-QXUST7PY-D9mGQ-UP.js +486 -0
  69. package/dist/chunk-QZHKN3VN-ClanGuXA.js +11 -0
  70. package/dist/chunk-S3R3BYOJ-DHTsHczu.js +1074 -0
  71. package/dist/chunk-S6J4BHB3-8RrHs9bD.js +19 -0
  72. package/dist/chunk-T53DSG4Q-C2BDA_QX.js +24 -0
  73. package/dist/chunk-TZMSLE5B-F4nHm7N1.js +55 -0
  74. package/dist/chunk-XAJISQIX-Bz7ki7DY.js +135 -0
  75. package/dist/clarity-CsFOkG3c.js +2 -0
  76. package/dist/classDiagram-2ON5EDUG-C_ZEMlKu.js +33 -0
  77. package/dist/classDiagram-v2-WZHVMYZB-BHb5nZOM.js +33 -0
  78. package/dist/clojure-u1TZmmdQ.js +2 -0
  79. package/dist/clone-BRioDvRr.js +7 -0
  80. package/dist/cmake-CA3Lfsq7.js +2 -0
  81. package/dist/cmake-K1k8HMYR.js +2 -0
  82. package/dist/cobol-DhzLzJib.js +10 -0
  83. package/dist/codeowners-l4eSxhtA.js +2 -0
  84. package/dist/codeql-5CeQaktT.js +2 -0
  85. package/dist/coffee-P21KTKMu.js +3 -0
  86. package/dist/common-lisp-BVttGbYJ.js +2 -0
  87. package/dist/coq-CZjzQDnb.js +2 -0
  88. package/dist/cose-bilkent-S5V4N54A-Dy-do3hl.js +2250 -0
  89. package/dist/cpp-C6JyDxZu.js +16 -0
  90. package/dist/cpp-GAIEvywS.js +6 -0
  91. package/dist/crystal-BJfcoGS4.js +16 -0
  92. package/dist/csharp-BbUwciq4.js +2 -0
  93. package/dist/csharp-JE-9ns6W.js +2 -0
  94. package/dist/css-Crp0iO_o.js +2 -0
  95. package/dist/css-Cy-fypCV.js +2 -0
  96. package/dist/csv-DJ7xG4PY.js +2 -0
  97. package/dist/csv-DtT8LmMi.js +2 -0
  98. package/dist/cue-BwjaQTCz.js +2 -0
  99. package/dist/cypher-B7e06enY.js +2 -0
  100. package/dist/cytoscape.esm-CWqS6puh.js +18100 -0
  101. package/dist/d-q60wkid4.js +2 -0
  102. package/dist/dagre-6UL2VRFP-B38_sZWh.js +298 -0
  103. package/dist/dagre-DtvXp3zQ.js +1395 -0
  104. package/dist/dark-plus-D_fA88xf.js +2 -0
  105. package/dist/dart-DjkWvBgr.js +2 -0
  106. package/dist/dax-lueLIZQI.js +2 -0
  107. package/dist/defaultLocale-CoJOMwPq.js +177 -0
  108. package/dist/desktop-DaphHKD5.js +2 -0
  109. package/dist/diagram-PSM6KHXK-D6swsG-y.js +497 -0
  110. package/dist/diagram-QEK2KX5R-B7Hi0LAL.js +226 -0
  111. package/dist/diagram-S2PKOQOG-DLx7PlpM.js +144 -0
  112. package/dist/diff-COB48_rb.js +2 -0
  113. package/dist/diff-DlXnqUMK.js +2 -0
  114. package/dist/dist-CrnZo_23.js +49 -0
  115. package/dist/docker-DZKmuwpA.js +2 -0
  116. package/dist/dotenv-hmNahw-8.js +2 -0
  117. package/dist/dracula-ddM3a7au.js +2 -0
  118. package/dist/dracula-soft-vfA-TA_S.js +2 -0
  119. package/dist/dream-maker-Cxa2a8FY.js +2 -0
  120. package/dist/edge-Dm7HQa9N.js +12 -0
  121. package/dist/elixir-BkvHyCNd.js +5 -0
  122. package/dist/elm-rz9wTSrn.js +4 -0
  123. package/dist/emacs-lisp-w5URnZPZ.js +2 -0
  124. package/dist/erDiagram-Q2GNP2WA-B67FD8rh.js +1603 -0
  125. package/dist/erb-DyrwQYVz.js +25 -0
  126. package/dist/erlang-DLFKZs5N.js +3 -0
  127. package/dist/everforest-dark-DAPtv4yI.js +2 -0
  128. package/dist/everforest-light-nQzYm8GO.js +2 -0
  129. package/dist/fennel-CJDNJZTU.js +2 -0
  130. package/dist/fish-BkYaLI4-.js +2 -0
  131. package/dist/flowDiagram-NV44I4VS-DHXgrdJY.js +4132 -0
  132. package/dist/fluent-DShra35H.js +2 -0
  133. package/dist/fortran-fixed-form-SzB0QY3n.js +3 -0
  134. package/dist/fortran-free-form-CgbOAJnm.js +2 -0
  135. package/dist/fortran-free-form-Js8JrQQE.js +2 -0
  136. package/dist/fsharp-CtWO0jvL.js +3 -0
  137. package/dist/ganttDiagram-JELNMOA3-CGIqBt1P.js +3009 -0
  138. package/dist/gdresource-CgyXKpe4.js +8 -0
  139. package/dist/gdscript-DnurdQnh.js +2 -0
  140. package/dist/gdscript-STdmRKv-.js +2 -0
  141. package/dist/gdshader-Bs2s6cSB.js +2 -0
  142. package/dist/gdshader-YiVaPq6D.js +2 -0
  143. package/dist/genie-BppkvzZC.js +2 -0
  144. package/dist/gherkin-Bp4zdWMb.js +2 -0
  145. package/dist/git-commit--0GGwZNa.js +3 -0
  146. package/dist/git-rebase-orw-bSIZ.js +3 -0
  147. package/dist/gitGraph-F6HP7TQM-CH5XLm5Z.js +8 -0
  148. package/dist/gitGraphDiagram-NY62KEGX-Cq8AbOhM.js +634 -0
  149. package/dist/github-dark-CMN1tZPn.js +2 -0
  150. package/dist/github-dark-DxCf_Qaz.js +2 -0
  151. package/dist/github-dark-default-DVCJut02.js +2 -0
  152. package/dist/github-dark-dimmed-DXu9oDqW.js +2 -0
  153. package/dist/github-dark-high-contrast-BBZdE-mX.js +2 -0
  154. package/dist/github-light-CfdX7txK.js +2 -0
  155. package/dist/github-light-Y8g-VxKq.js +2 -0
  156. package/dist/github-light-default-BNGkGE--.js +2 -0
  157. package/dist/github-light-high-contrast-DiSIc-nG.js +2 -0
  158. package/dist/gleam-Lw0tKp8T.js +2 -0
  159. package/dist/glimmer-js-C6E6wJv0.js +12 -0
  160. package/dist/glimmer-ts-C6GgTGNO.js +12 -0
  161. package/dist/glsl-D8_YBRKT.js +3 -0
  162. package/dist/glsl-rwn_QCp2.js +3 -0
  163. package/dist/gnuplot-BeA3etmO.js +2 -0
  164. package/dist/go-BhDDN9y4.js +2 -0
  165. package/dist/go-xfE7BrfS.js +2 -0
  166. package/dist/graphlib-BZdVmxO6.js +223 -0
  167. package/dist/graphql-DQHhbQm2.js +6 -0
  168. package/dist/graphql-DoBLseH6.js +12 -0
  169. package/dist/groovy-C5-mv4io.js +2 -0
  170. package/dist/gruvbox-dark-hard-CULu6kVy.js +2 -0
  171. package/dist/gruvbox-dark-medium-BJM4uQXO.js +2 -0
  172. package/dist/gruvbox-dark-soft-CVaORUwa.js +2 -0
  173. package/dist/gruvbox-light-hard-B-WJAGLa.js +2 -0
  174. package/dist/gruvbox-light-medium-jc8FWnuC.js +2 -0
  175. package/dist/gruvbox-light-soft-CmvYQK92.js +2 -0
  176. package/dist/hack-DEAxoi73.js +10 -0
  177. package/dist/haml-BG2d3iX4.js +4 -0
  178. package/dist/haml-mA656Lm7.js +8 -0
  179. package/dist/handlebars-CO5xAxJ3.js +12 -0
  180. package/dist/haskell-Hsexh2aP.js +2 -0
  181. package/dist/haxe-BJVSeYxy.js +2 -0
  182. package/dist/haxe-CD_Rs3P5.js +2 -0
  183. package/dist/hcl-D098sJ_J.js +2 -0
  184. package/dist/hjson-BwXHX5r6.js +2 -0
  185. package/dist/hlsl-B0pnUVYG.js +2 -0
  186. package/dist/hlsl-Dt9-unql.js +2 -0
  187. package/dist/houston-C7hMWO_I.js +2 -0
  188. package/dist/html-DFCxtjnd.js +4 -0
  189. package/dist/html-DKSj3FeM.js +8 -0
  190. package/dist/html-derivative-BCRkrTcD.js +5 -0
  191. package/dist/html-derivative-C-vidKoA.js +3 -0
  192. package/dist/http-CYP1tEDW.js +17 -0
  193. package/dist/hurl-BJexUSKz.js +15 -0
  194. package/dist/hxml-XfuSEjM-.js +3 -0
  195. package/dist/hy-DPQ04rHt.js +2 -0
  196. package/dist/imba-Bgu2n5Mo.js +2 -0
  197. package/dist/info-NVLQJR56-hEN1y0nS.js +8 -0
  198. package/dist/infoDiagram-WHAUD3N6-btPwHXxp.js +31 -0
  199. package/dist/ini-g9mZnyrk.js +2 -0
  200. package/dist/init-CBay3kgM.js +13 -0
  201. package/dist/isArrayLikeObject-Dz_TDfw0.js +459 -0
  202. package/dist/isEmpty-CCym_WUL.js +32 -0
  203. package/dist/java-CUbPyze1.js +2 -0
  204. package/dist/java-DIOGgqAD.js +2 -0
  205. package/dist/javascript-9-JPeKdm.js +2 -0
  206. package/dist/javascript-De1qhUaI.js +2 -0
  207. package/dist/jinja-CVFxFRh6.js +5 -0
  208. package/dist/jison-0X6LppGq.js +3 -0
  209. package/dist/journeyDiagram-XKPGCS4Q-3OxtBx3I.js +884 -0
  210. package/dist/js/chat-example.es.js +39220 -0
  211. package/dist/js/chat-example.umd.js +2989 -0
  212. package/dist/json-DJtYdWQK.js +2 -0
  213. package/dist/json-fcFpRaf3.js +2 -0
  214. package/dist/json5-CPTZJOmf.js +2 -0
  215. package/dist/jsonc-CYrayg0k.js +2 -0
  216. package/dist/jsonl-Bsv7LjJ3.js +2 -0
  217. package/dist/jsonnet-B7LkHJxg.js +2 -0
  218. package/dist/jssm-BopKGZKg.js +2 -0
  219. package/dist/jsx-Bf3Nk9Di.js +2 -0
  220. package/dist/jsx-qo0JNHpZ.js +2 -0
  221. package/dist/julia-ChGs-n_c.js +17 -0
  222. package/dist/kanagawa-dragon-CSqqi78I.js +2 -0
  223. package/dist/kanagawa-lotus-l2vgoxpH.js +2 -0
  224. package/dist/kanagawa-wave-BWhFcnLj.js +2 -0
  225. package/dist/kanban-definition-3W4ZIXB7-zdtnJaXz.js +971 -0
  226. package/dist/katex-BcWXJDMd.js +22097 -0
  227. package/dist/katex-K1dsczyg.js +2 -0
  228. package/dist/kdl-BbokxoZ9.js +2 -0
  229. package/dist/kotlin-3dXKmwyJ.js +2 -0
  230. package/dist/kusto-Os6_yHEz.js +2 -0
  231. package/dist/laserwave-8RcN1zf8.js +2 -0
  232. package/dist/latex-BnWZlY4q.js +4 -0
  233. package/dist/lean--0Wr4Cy4.js +2 -0
  234. package/dist/less-B4ybD-7s.js +2 -0
  235. package/dist/less-Cb54jO7u.js +2 -0
  236. package/dist/light-plus-CP_iZQDF.js +2 -0
  237. package/dist/line-EpckC7pZ.js +30 -0
  238. package/dist/linear-DjVN4o4U.js +250 -0
  239. package/dist/liquid-pc5Mduds.js +12 -0
  240. package/dist/llvm-ILH_SX7E.js +2 -0
  241. package/dist/log-DwO_GzA0.js +2 -0
  242. package/dist/logo-B4FeRowR.js +2 -0
  243. package/dist/lua-0TqNbT8C.js +3 -0
  244. package/dist/lua-6pXga3HV.js +3 -0
  245. package/dist/luau-DsUEyLJN.js +2 -0
  246. package/dist/make-p6NYc19I.js +2 -0
  247. package/dist/markdown-CCRtgC0b.js +2 -0
  248. package/dist/markdown-LaaQ4Eua.js +2 -0
  249. package/dist/marked.esm-D9xINNve.js +1384 -0
  250. package/dist/marko-D8uDUUEs.js +12 -0
  251. package/dist/material-theme-D__z84-n.js +2 -0
  252. package/dist/material-theme-darker-CWC5BoMv.js +2 -0
  253. package/dist/material-theme-lighter-BJrV5b2o.js +2 -0
  254. package/dist/material-theme-ocean-DYpMfDiX.js +2 -0
  255. package/dist/material-theme-palenight-3Ix3iI7Q.js +2 -0
  256. package/dist/math-CJAnbPum.js +8 -0
  257. package/dist/matlab-CL0oMGfq.js +2 -0
  258. package/dist/mdc-Ki3KnB5U.js +13 -0
  259. package/dist/mdx-BTufVkNP.js +2 -0
  260. package/dist/mermaid-FCjIh1A7.js +2 -0
  261. package/dist/mermaid-parser.core-DVXSGppp.js +48 -0
  262. package/dist/mermaid.core-Ra1JFCui.js +895 -0
  263. package/dist/min-dark-B4KRMcN3.js +2 -0
  264. package/dist/min-light-BQVJODr0.js +2 -0
  265. package/dist/mindmap-definition-VGOIOE7T-CRPO52xV.js +960 -0
  266. package/dist/mipsasm-Cn6AQ4lM.js +2 -0
  267. package/dist/mojo-C9IiQhp4.js +2 -0
  268. package/dist/monokai-vDwMMRi4.js +2 -0
  269. package/dist/move-BdizQ4_I.js +2 -0
  270. package/dist/narrat-BP2kx-u2.js +2 -0
  271. package/dist/nextflow-CyRmCGOe.js +2 -0
  272. package/dist/nginx-B46vdQ9n.js +4 -0
  273. package/dist/night-owl-DmjkOa5g.js +2 -0
  274. package/dist/nim-BxQNx10D.js +19 -0
  275. package/dist/nix-qPhlsqZI.js +2 -0
  276. package/dist/nord-sjxbvIbg.js +2 -0
  277. package/dist/nushell-puA-1bCW.js +2 -0
  278. package/dist/objective-c-D-qDLNy5.js +2 -0
  279. package/dist/objective-cpp-CFxSAM6p.js +2 -0
  280. package/dist/ocaml-CsLB7SWJ.js +2 -0
  281. package/dist/one-dark-pro-BHH-VjFD.js +2 -0
  282. package/dist/one-light-BqE6erWk.js +2 -0
  283. package/dist/openscad-DJCIQfnJ.js +2 -0
  284. package/dist/ordinal-CYQpsShT.js +61 -0
  285. package/dist/packet-BFZMPI3H-Bnlch4JI.js +8 -0
  286. package/dist/pascal-CPg9_ZFN.js +2 -0
  287. package/dist/path-esxOUfAH.js +79 -0
  288. package/dist/perl-D1bDaADZ.js +15 -0
  289. package/dist/php-BX51InqL.js +9 -0
  290. package/dist/php-D5tmU8Cr.js +16 -0
  291. package/dist/pie-7BOR55EZ-B9egLHl5.js +8 -0
  292. package/dist/pieDiagram-ADFJNKIX-CKSgB7fx.js +172 -0
  293. package/dist/pkl-BQQ96hvn.js +2 -0
  294. package/dist/plastic-BrNUBdSC.js +2 -0
  295. package/dist/plsql-Co7Bxe7U.js +2 -0
  296. package/dist/po-BqzJCro7.js +2 -0
  297. package/dist/poimandres-C_AK8TlO.js +2 -0
  298. package/dist/polar-CtdYIPEe.js +2 -0
  299. package/dist/postcss-ChqFKb46.js +2 -0
  300. package/dist/postcss-ainQkoyY.js +2 -0
  301. package/dist/powerquery-CDugc1w-.js +2 -0
  302. package/dist/powershell-j5X-IA59.js +2 -0
  303. package/dist/prisma-Cyl7YhUw.js +2 -0
  304. package/dist/prolog-DELKnUYf.js +2 -0
  305. package/dist/proto-C4A_gDBY.js +2 -0
  306. package/dist/pug-BcLlS7Yb.js +10 -0
  307. package/dist/puppet-DFC9LyFj.js +2 -0
  308. package/dist/purescript-eECq7_n2.js +2 -0
  309. package/dist/python-BhdCuCld.js +2 -0
  310. package/dist/python-CuBu5pyY.js +2 -0
  311. package/dist/qml-MD0NqqIl.js +3 -0
  312. package/dist/qmldir-BpJII-Ze.js +2 -0
  313. package/dist/qss-CpMcemMc.js +2 -0
  314. package/dist/quadrantDiagram-AYHSOK5B-BHzqivzD.js +1970 -0
  315. package/dist/r-CQeHOO4c.js +2 -0
  316. package/dist/r-D90zdkbN.js +2 -0
  317. package/dist/racket-COTs6Zfi.js +2 -0
  318. package/dist/radar-NHE76QYJ-DdALhlvV.js +8 -0
  319. package/dist/raku-DfOtwMUC.js +2 -0
  320. package/dist/razor-eRwFWsjJ.js +10 -0
  321. package/dist/red-CWGFZsim.js +2 -0
  322. package/dist/reg-BX5DwoEA.js +2 -0
  323. package/dist/regexp-Ca0eDBa2.js +2 -0
  324. package/dist/regexp-Cap8fK_2.js +2 -0
  325. package/dist/rel-CzXuLSk3.js +2 -0
  326. package/dist/requirementDiagram-UZGBJVZJ-Darhwvir.js +2194 -0
  327. package/dist/riscv-DnFIiqh3.js +2 -0
  328. package/dist/rose-pine-C4v2iQVe.js +2 -0
  329. package/dist/rose-pine-dawn-D5sdDB-J.js +2 -0
  330. package/dist/rose-pine-moon-2Vb7bLLO.js +2 -0
  331. package/dist/rosmsg-D02ul3fM.js +2 -0
  332. package/dist/rst-DFmSdXGd.js +34 -0
  333. package/dist/ruby-BAEFomR0.js +20 -0
  334. package/dist/ruby-DDMUvAvC.js +28 -0
  335. package/dist/rust-s3hBbfQg.js +2 -0
  336. package/dist/sankeyDiagram-TZEHDZUN-KiSvBN_C.js +884 -0
  337. package/dist/sas-TjtLSnOp.js +3 -0
  338. package/dist/sass-v3HeJ9Fl.js +2 -0
  339. package/dist/scala-BTIBM_Vn.js +2 -0
  340. package/dist/scheme-C4NQMf7a.js +2 -0
  341. package/dist/scss-C-bthdG1.js +3 -0
  342. package/dist/scss-D-6-mg-f.js +3 -0
  343. package/dist/sdbl-BA3l-JrH.js +2 -0
  344. package/dist/sdbl-gc7zIVWR.js +2 -0
  345. package/dist/sequenceDiagram-WL72ISMW-D2Mo7Vtj.js +3560 -0
  346. package/dist/shaderlab-BRlB5fpk.js +3 -0
  347. package/dist/shellscript-BQ8mKDAF.js +2 -0
  348. package/dist/shellscript-DZa_4vvb.js +2 -0
  349. package/dist/shellsession-CIlmlgbR.js +3 -0
  350. package/dist/slack-dark-DhXO5DWr.js +2 -0
  351. package/dist/slack-ochin-aAGl4PPH.js +2 -0
  352. package/dist/smalltalk-DbwVUw_i.js +2 -0
  353. package/dist/snazzy-light-B4S5mk83.js +2 -0
  354. package/dist/solarized-dark-Dexkq3Fm.js +2 -0
  355. package/dist/solarized-light-I-Bzy8UC.js +2 -0
  356. package/dist/solidity-SMk0TJDc.js +2 -0
  357. package/dist/soy-DwSCrzEF.js +5 -0
  358. package/dist/sparql-D9kVSpEx.js +3 -0
  359. package/dist/splunk-DXXu2r7r.js +2 -0
  360. package/dist/sql-Bi3LyNPb.js +2 -0
  361. package/dist/sql-D0eLHBiZ.js +2 -0
  362. package/dist/src-B-SBGd0A.js +1975 -0
  363. package/dist/ssh-config-DyVcFTfI.js +2 -0
  364. package/dist/stata-DkEObyNb.js +3 -0
  365. package/dist/stateDiagram-FKZM4ZOC-BRQN2Npg.js +224 -0
  366. package/dist/stateDiagram-v2-4FDKWEC3-CeeIKiFG.js +32 -0
  367. package/dist/stylus-BKTuFHcX.js +2 -0
  368. package/dist/stylus-DEHALDNh.js +2 -0
  369. package/dist/svelte-KFuclcR6.js +12 -0
  370. package/dist/swift-Cenptrnf.js +2 -0
  371. package/dist/synthwave-84-BRkDuVE-.js +2 -0
  372. package/dist/system-verilog-Cvgukx4v.js +2 -0
  373. package/dist/systemd-BepdslJQ.js +2 -0
  374. package/dist/talonscript-Q98m-VXh.js +2 -0
  375. package/dist/tasl-uebrX98X.js +2 -0
  376. package/dist/tcl-B1Ny4XFf.js +2 -0
  377. package/dist/templ-C5mtYbb_.js +10 -0
  378. package/dist/terraform-0mA5ERTe.js +2 -0
  379. package/dist/tex-B4uYy1vC.js +3 -0
  380. package/dist/tex-BoVFa1ir.js +3 -0
  381. package/dist/timeline-definition-IT6M3QCI-CSwH0Pnx.js +830 -0
  382. package/dist/tokyo-night-D0mU3-u8.js +2 -0
  383. package/dist/toml-vMAjra5M.js +2 -0
  384. package/dist/treemap-KMMF4GRG-COjpj6-C.js +8 -0
  385. package/dist/ts-tags-DRdTXGhb.js +38 -0
  386. package/dist/tsv-BnmbkntZ.js +2 -0
  387. package/dist/tsx-BaaPsUbd.js +2 -0
  388. package/dist/tsx-C0w0w5St.js +2 -0
  389. package/dist/turtle-4UWi_qX6.js +2 -0
  390. package/dist/turtle-BRmolh-6.js +2 -0
  391. package/dist/twig-cEhAbahS.js +33 -0
  392. package/dist/typescript-4YtK2JL4.js +2 -0
  393. package/dist/typescript-CmJ8D0yY.js +2 -0
  394. package/dist/typespec-CILw3zvZ.js +2 -0
  395. package/dist/typst-CLajFw6q.js +2 -0
  396. package/dist/v-MJV2RQvK.js +2 -0
  397. package/dist/vala-Dc1TiHw1.js +2 -0
  398. package/dist/vb-CoJdNmGs.js +2 -0
  399. package/dist/verilog-C7aVmiO0.js +2 -0
  400. package/dist/vesper-Cvcqyrim.js +2 -0
  401. package/dist/vhdl-CYQvzAG1.js +2 -0
  402. package/dist/viml-DOyjiDI8.js +2 -0
  403. package/dist/vitesse-black-CUYJaB5b.js +2 -0
  404. package/dist/vitesse-dark-BNlzDJ1Z.js +2 -0
  405. package/dist/vitesse-light-JU98KqVa.js +2 -0
  406. package/dist/vue-B3C4YeUK.js +8 -0
  407. package/dist/vue-DMpjAWNv.js +20 -0
  408. package/dist/vue-html-BIZN50ug.js +13 -0
  409. package/dist/vue-vine-DxezWcjL.js +22 -0
  410. package/dist/vyper-JU_r7Ch6.js +2 -0
  411. package/dist/wasm-DJ1S--fN.js +2 -0
  412. package/dist/wasm-eLFiAU8u.js +2 -0
  413. package/dist/wenyan-CqkzmyWz.js +2 -0
  414. package/dist/wgsl-gV62iTnF.js +2 -0
  415. package/dist/wikitext-BfUl8La4.js +2 -0
  416. package/dist/wit-kp_bCf2U.js +2 -0
  417. package/dist/wolfram-aPsN9AKt.js +2 -0
  418. package/dist/xml-BglBgo29.js +3 -0
  419. package/dist/xml-BxRdgEAX.js +3 -0
  420. package/dist/xsl-Cni90e0k.js +4 -0
  421. package/dist/xychartDiagram-PRI3JC2R-CGXFYn39.js +2022 -0
  422. package/dist/yaml-DQRfaSRo.js +2 -0
  423. package/dist/yaml-P2kjOPvW.js +2 -0
  424. package/dist/zenscript-BuY4FX-t.js +2 -0
  425. package/dist/zig-CGDGjytz.js +2 -0
  426. package/package.json +10 -6
  427. package/.vscode/extensions.json +0 -3
  428. package/.vscode/settings.json +0 -6
  429. package/auto-imports.d.ts +0 -73
  430. package/components.d.ts +0 -312
  431. package/components.json +0 -21
  432. package/index.html +0 -13
  433. package/src/App.vue +0 -68
  434. package/src/components/ChatConversation/ChatConversation.vue +0 -97
  435. package/src/components/ChatConversation/index.ts +0 -1
  436. package/src/components/ChatPromptInputProvider/ChatPromptInputProvider.vue +0 -47
  437. package/src/components/ChatPromptInputProvider/index.ts +0 -1
  438. package/src/components/ai-elements/artifact/Artifact.vue +0 -23
  439. package/src/components/ai-elements/artifact/ArtifactAction.vue +0 -72
  440. package/src/components/ai-elements/artifact/ArtifactActions.vue +0 -19
  441. package/src/components/ai-elements/artifact/ArtifactClose.vue +0 -39
  442. package/src/components/ai-elements/artifact/ArtifactContent.vue +0 -20
  443. package/src/components/ai-elements/artifact/ArtifactDescription.vue +0 -20
  444. package/src/components/ai-elements/artifact/ArtifactHeader.vue +0 -23
  445. package/src/components/ai-elements/artifact/ArtifactTitle.vue +0 -20
  446. package/src/components/ai-elements/artifact/index.ts +0 -8
  447. package/src/components/ai-elements/canvas/Canvas.vue +0 -37
  448. package/src/components/ai-elements/canvas/index.ts +0 -1
  449. package/src/components/ai-elements/chain-of-thought/ChainOfThought.vue +0 -41
  450. package/src/components/ai-elements/chain-of-thought/ChainOfThoughtContent.vue +0 -32
  451. package/src/components/ai-elements/chain-of-thought/ChainOfThoughtHeader.vue +0 -43
  452. package/src/components/ai-elements/chain-of-thought/ChainOfThoughtImage.vue +0 -25
  453. package/src/components/ai-elements/chain-of-thought/ChainOfThoughtSearchResult.vue +0 -24
  454. package/src/components/ai-elements/chain-of-thought/ChainOfThoughtSearchResults.vue +0 -17
  455. package/src/components/ai-elements/chain-of-thought/ChainOfThoughtStep.vue +0 -54
  456. package/src/components/ai-elements/chain-of-thought/context.ts +0 -22
  457. package/src/components/ai-elements/chain-of-thought/index.ts +0 -7
  458. package/src/components/ai-elements/checkpoint/Checkpoint.vue +0 -19
  459. package/src/components/ai-elements/checkpoint/CheckpointIcon.vue +0 -19
  460. package/src/components/ai-elements/checkpoint/CheckpointTrigger.vue +0 -46
  461. package/src/components/ai-elements/checkpoint/index.ts +0 -3
  462. package/src/components/ai-elements/code-block/CodeBlock.vue +0 -84
  463. package/src/components/ai-elements/code-block/CodeBlockCopyButton.vue +0 -84
  464. package/src/components/ai-elements/code-block/context.ts +0 -7
  465. package/src/components/ai-elements/code-block/index.ts +0 -2
  466. package/src/components/ai-elements/code-block/utils.ts +0 -46
  467. package/src/components/ai-elements/confirmation/Confirmation.vue +0 -30
  468. package/src/components/ai-elements/confirmation/ConfirmationAccepted.vue +0 -18
  469. package/src/components/ai-elements/confirmation/ConfirmationAction.vue +0 -9
  470. package/src/components/ai-elements/confirmation/ConfirmationActions.vue +0 -23
  471. package/src/components/ai-elements/confirmation/ConfirmationRejected.vue +0 -18
  472. package/src/components/ai-elements/confirmation/ConfirmationRequest.vue +0 -11
  473. package/src/components/ai-elements/confirmation/ConfirmationTitle.vue +0 -18
  474. package/src/components/ai-elements/confirmation/context.ts +0 -46
  475. package/src/components/ai-elements/confirmation/index.ts +0 -7
  476. package/src/components/ai-elements/connection/Connection.vue +0 -36
  477. package/src/components/ai-elements/connection/index.ts +0 -1
  478. package/src/components/ai-elements/context/Context.vue +0 -29
  479. package/src/components/ai-elements/context/ContextCacheUsage.vue +0 -45
  480. package/src/components/ai-elements/context/ContextContent.vue +0 -20
  481. package/src/components/ai-elements/context/ContextContentBody.vue +0 -14
  482. package/src/components/ai-elements/context/ContextContentFooter.vue +0 -49
  483. package/src/components/ai-elements/context/ContextContentHeader.vue +0 -49
  484. package/src/components/ai-elements/context/ContextIcon.vue +0 -62
  485. package/src/components/ai-elements/context/ContextInputUsage.vue +0 -46
  486. package/src/components/ai-elements/context/ContextOutputUsage.vue +0 -45
  487. package/src/components/ai-elements/context/ContextReasoningUsage.vue +0 -48
  488. package/src/components/ai-elements/context/ContextTrigger.vue +0 -32
  489. package/src/components/ai-elements/context/TokensWithCost.vue +0 -25
  490. package/src/components/ai-elements/context/context.ts +0 -23
  491. package/src/components/ai-elements/context/index.ts +0 -12
  492. package/src/components/ai-elements/controls/Controls.vue +0 -25
  493. package/src/components/ai-elements/controls/index.ts +0 -1
  494. package/src/components/ai-elements/conversation/Conversation.vue +0 -37
  495. package/src/components/ai-elements/conversation/ConversationContent.vue +0 -21
  496. package/src/components/ai-elements/conversation/ConversationEmptyState.vue +0 -40
  497. package/src/components/ai-elements/conversation/ConversationScrollButton.vue +0 -34
  498. package/src/components/ai-elements/conversation/index.ts +0 -4
  499. package/src/components/ai-elements/edge/Animated.vue +0 -91
  500. package/src/components/ai-elements/edge/Temporary.vue +0 -28
  501. package/src/components/ai-elements/edge/index.ts +0 -2
  502. package/src/components/ai-elements/image/Image.vue +0 -29
  503. package/src/components/ai-elements/image/index.ts +0 -1
  504. package/src/components/ai-elements/inline-citation/InlineCitation.vue +0 -14
  505. package/src/components/ai-elements/inline-citation/InlineCitationCard.vue +0 -17
  506. package/src/components/ai-elements/inline-citation/InlineCitationCardBody.vue +0 -15
  507. package/src/components/ai-elements/inline-citation/InlineCitationCardTrigger.vue +0 -35
  508. package/src/components/ai-elements/inline-citation/InlineCitationCarousel.vue +0 -15
  509. package/src/components/ai-elements/inline-citation/InlineCitationCarouselContent.vue +0 -9
  510. package/src/components/ai-elements/inline-citation/InlineCitationCarouselHeader.vue +0 -16
  511. package/src/components/ai-elements/inline-citation/InlineCitationCarouselIndex.vue +0 -46
  512. package/src/components/ai-elements/inline-citation/InlineCitationCarouselItem.vue +0 -15
  513. package/src/components/ai-elements/inline-citation/InlineCitationCarouselNext.vue +0 -23
  514. package/src/components/ai-elements/inline-citation/InlineCitationCarouselPrev.vue +0 -23
  515. package/src/components/ai-elements/inline-citation/InlineCitationQuote.vue +0 -16
  516. package/src/components/ai-elements/inline-citation/InlineCitationSource.vue +0 -26
  517. package/src/components/ai-elements/inline-citation/InlineCitationText.vue +0 -14
  518. package/src/components/ai-elements/inline-citation/index.ts +0 -14
  519. package/src/components/ai-elements/loader/Loader.vue +0 -23
  520. package/src/components/ai-elements/loader/LoaderIcon.vue +0 -38
  521. package/src/components/ai-elements/loader/index.ts +0 -2
  522. package/src/components/ai-elements/message/Message.vue +0 -27
  523. package/src/components/ai-elements/message/MessageAction.vue +0 -45
  524. package/src/components/ai-elements/message/MessageActions.vue +0 -19
  525. package/src/components/ai-elements/message/MessageAttachment.vue +0 -87
  526. package/src/components/ai-elements/message/MessageAttachments.vue +0 -25
  527. package/src/components/ai-elements/message/MessageAvatar.vue +0 -22
  528. package/src/components/ai-elements/message/MessageBranch.vue +0 -66
  529. package/src/components/ai-elements/message/MessageBranchContent.vue +0 -51
  530. package/src/components/ai-elements/message/MessageBranchNext.vue +0 -23
  531. package/src/components/ai-elements/message/MessageBranchPage.vue +0 -28
  532. package/src/components/ai-elements/message/MessageBranchPrevious.vue +0 -23
  533. package/src/components/ai-elements/message/MessageBranchSelector.vue +0 -23
  534. package/src/components/ai-elements/message/MessageContent.vue +0 -26
  535. package/src/components/ai-elements/message/MessageResponse.vue +0 -42
  536. package/src/components/ai-elements/message/MessageToolbar.vue +0 -24
  537. package/src/components/ai-elements/message/context.ts +0 -22
  538. package/src/components/ai-elements/message/index.ts +0 -15
  539. package/src/components/ai-elements/model-selector/ModelSelector.vue +0 -9
  540. package/src/components/ai-elements/model-selector/ModelSelectorContent.vue +0 -29
  541. package/src/components/ai-elements/model-selector/ModelSelectorDialog.vue +0 -9
  542. package/src/components/ai-elements/model-selector/ModelSelectorEmpty.vue +0 -9
  543. package/src/components/ai-elements/model-selector/ModelSelectorGroup.vue +0 -9
  544. package/src/components/ai-elements/model-selector/ModelSelectorInput.vue +0 -18
  545. package/src/components/ai-elements/model-selector/ModelSelectorItem.vue +0 -10
  546. package/src/components/ai-elements/model-selector/ModelSelectorList.vue +0 -9
  547. package/src/components/ai-elements/model-selector/ModelSelectorLogo.vue +0 -22
  548. package/src/components/ai-elements/model-selector/ModelSelectorLogoGroup.vue +0 -24
  549. package/src/components/ai-elements/model-selector/ModelSelectorName.vue +0 -19
  550. package/src/components/ai-elements/model-selector/ModelSelectorSeparator.vue +0 -7
  551. package/src/components/ai-elements/model-selector/ModelSelectorShortcut.vue +0 -9
  552. package/src/components/ai-elements/model-selector/ModelSelectorTrigger.vue +0 -9
  553. package/src/components/ai-elements/model-selector/index.ts +0 -14
  554. package/src/components/ai-elements/node/Node.vue +0 -31
  555. package/src/components/ai-elements/node/NodeAction.vue +0 -9
  556. package/src/components/ai-elements/node/NodeContent.vue +0 -15
  557. package/src/components/ai-elements/node/NodeDescription.vue +0 -9
  558. package/src/components/ai-elements/node/NodeFooter.vue +0 -15
  559. package/src/components/ai-elements/node/NodeHeader.vue +0 -15
  560. package/src/components/ai-elements/node/NodeTitle.vue +0 -9
  561. package/src/components/ai-elements/node/index.ts +0 -7
  562. package/src/components/ai-elements/open-in-chat/OpenIn.vue +0 -20
  563. package/src/components/ai-elements/open-in-chat/OpenInContent.vue +0 -25
  564. package/src/components/ai-elements/open-in-chat/OpenInItemLink.vue +0 -30
  565. package/src/components/ai-elements/open-in-chat/OpenInTrigger.vue +0 -16
  566. package/src/components/ai-elements/open-in-chat/context.ts +0 -20
  567. package/src/components/ai-elements/open-in-chat/index.ts +0 -9
  568. package/src/components/ai-elements/open-in-chat/providers/icons/ChatGPT.vue +0 -13
  569. package/src/components/ai-elements/open-in-chat/providers/icons/Claude.vue +0 -15
  570. package/src/components/ai-elements/open-in-chat/providers/icons/Cursor.vue +0 -13
  571. package/src/components/ai-elements/open-in-chat/providers/icons/Github.vue +0 -8
  572. package/src/components/ai-elements/open-in-chat/providers/icons/Scira.vue +0 -58
  573. package/src/components/ai-elements/open-in-chat/providers/icons/V0.vue +0 -15
  574. package/src/components/ai-elements/open-in-chat/providers/icons/index.ts +0 -6
  575. package/src/components/ai-elements/open-in-chat/providers/index.ts +0 -69
  576. package/src/components/ai-elements/open-in-chat/providers/items/OpenInChatGPT.vue +0 -18
  577. package/src/components/ai-elements/open-in-chat/providers/items/OpenInClaude.vue +0 -18
  578. package/src/components/ai-elements/open-in-chat/providers/items/OpenInCursor.vue +0 -18
  579. package/src/components/ai-elements/open-in-chat/providers/items/OpenInScira.vue +0 -18
  580. package/src/components/ai-elements/open-in-chat/providers/items/OpenInT3.vue +0 -18
  581. package/src/components/ai-elements/open-in-chat/providers/items/OpenInv0.vue +0 -18
  582. package/src/components/ai-elements/panel/Panel.vue +0 -28
  583. package/src/components/ai-elements/panel/index.ts +0 -1
  584. package/src/components/ai-elements/plan/Plan.vue +0 -32
  585. package/src/components/ai-elements/plan/PlanAction.vue +0 -9
  586. package/src/components/ai-elements/plan/PlanContent.vue +0 -12
  587. package/src/components/ai-elements/plan/PlanDescription.vue +0 -25
  588. package/src/components/ai-elements/plan/PlanFooter.vue +0 -9
  589. package/src/components/ai-elements/plan/PlanHeader.vue +0 -18
  590. package/src/components/ai-elements/plan/PlanTitle.vue +0 -16
  591. package/src/components/ai-elements/plan/PlanTrigger.vue +0 -25
  592. package/src/components/ai-elements/plan/context.ts +0 -20
  593. package/src/components/ai-elements/plan/index.ts +0 -8
  594. package/src/components/ai-elements/prompt-input/PromptInput.vue +0 -116
  595. package/src/components/ai-elements/prompt-input/PromptInputActionAddAttachments.vue +0 -22
  596. package/src/components/ai-elements/prompt-input/PromptInputActionMenu.vue +0 -15
  597. package/src/components/ai-elements/prompt-input/PromptInputActionMenuContent.vue +0 -21
  598. package/src/components/ai-elements/prompt-input/PromptInputActionMenuItem.vue +0 -19
  599. package/src/components/ai-elements/prompt-input/PromptInputActionMenuTrigger.vue +0 -22
  600. package/src/components/ai-elements/prompt-input/PromptInputAttachment.vue +0 -94
  601. package/src/components/ai-elements/prompt-input/PromptInputAttachments.vue +0 -22
  602. package/src/components/ai-elements/prompt-input/PromptInputBody.vue +0 -12
  603. package/src/components/ai-elements/prompt-input/PromptInputButton.vue +0 -56
  604. package/src/components/ai-elements/prompt-input/PromptInputCommand.vue +0 -19
  605. package/src/components/ai-elements/prompt-input/PromptInputCommandEmpty.vue +0 -19
  606. package/src/components/ai-elements/prompt-input/PromptInputCommandGroup.vue +0 -19
  607. package/src/components/ai-elements/prompt-input/PromptInputCommandInput.vue +0 -17
  608. package/src/components/ai-elements/prompt-input/PromptInputCommandItem.vue +0 -19
  609. package/src/components/ai-elements/prompt-input/PromptInputCommandList.vue +0 -17
  610. package/src/components/ai-elements/prompt-input/PromptInputCommandSeparator.vue +0 -16
  611. package/src/components/ai-elements/prompt-input/PromptInputFooter.vue +0 -23
  612. package/src/components/ai-elements/prompt-input/PromptInputHeader.vue +0 -23
  613. package/src/components/ai-elements/prompt-input/PromptInputHoverCard.vue +0 -23
  614. package/src/components/ai-elements/prompt-input/PromptInputHoverCardContent.vue +0 -19
  615. package/src/components/ai-elements/prompt-input/PromptInputHoverCardTrigger.vue +0 -15
  616. package/src/components/ai-elements/prompt-input/PromptInputProvider.vue +0 -32
  617. package/src/components/ai-elements/prompt-input/PromptInputSelect.vue +0 -15
  618. package/src/components/ai-elements/prompt-input/PromptInputSelectContent.vue +0 -19
  619. package/src/components/ai-elements/prompt-input/PromptInputSelectItem.vue +0 -19
  620. package/src/components/ai-elements/prompt-input/PromptInputSelectTrigger.vue +0 -26
  621. package/src/components/ai-elements/prompt-input/PromptInputSelectValue.vue +0 -19
  622. package/src/components/ai-elements/prompt-input/PromptInputSpeechButton.vue +0 -137
  623. package/src/components/ai-elements/prompt-input/PromptInputSubmit.vue +0 -60
  624. package/src/components/ai-elements/prompt-input/PromptInputTab.vue +0 -16
  625. package/src/components/ai-elements/prompt-input/PromptInputTabBody.vue +0 -16
  626. package/src/components/ai-elements/prompt-input/PromptInputTabItem.vue +0 -16
  627. package/src/components/ai-elements/prompt-input/PromptInputTabLabel.vue +0 -16
  628. package/src/components/ai-elements/prompt-input/PromptInputTabsList.vue +0 -16
  629. package/src/components/ai-elements/prompt-input/PromptInputTextarea.vue +0 -78
  630. package/src/components/ai-elements/prompt-input/PromptInputTools.vue +0 -12
  631. package/src/components/ai-elements/prompt-input/context.ts +0 -223
  632. package/src/components/ai-elements/prompt-input/index.ts +0 -39
  633. package/src/components/ai-elements/prompt-input/types.ts +0 -28
  634. package/src/components/ai-elements/queue/Queue.vue +0 -21
  635. package/src/components/ai-elements/queue/QueueItem.vue +0 -21
  636. package/src/components/ai-elements/queue/QueueItemAction.vue +0 -25
  637. package/src/components/ai-elements/queue/QueueItemActions.vue +0 -14
  638. package/src/components/ai-elements/queue/QueueItemAttachment.vue +0 -14
  639. package/src/components/ai-elements/queue/QueueItemContent.vue +0 -32
  640. package/src/components/ai-elements/queue/QueueItemDescription.vue +0 -32
  641. package/src/components/ai-elements/queue/QueueItemFile.vue +0 -25
  642. package/src/components/ai-elements/queue/QueueItemImage.vue +0 -18
  643. package/src/components/ai-elements/queue/QueueItemIndicator.vue +0 -30
  644. package/src/components/ai-elements/queue/QueueList.vue +0 -22
  645. package/src/components/ai-elements/queue/QueueSection.vue +0 -26
  646. package/src/components/ai-elements/queue/QueueSectionContent.vue +0 -15
  647. package/src/components/ai-elements/queue/QueueSectionLabel.vue +0 -26
  648. package/src/components/ai-elements/queue/QueueSectionTrigger.vue +0 -25
  649. package/src/components/ai-elements/queue/index.ts +0 -15
  650. package/src/components/ai-elements/reasoning/Reasoning.vue +0 -94
  651. package/src/components/ai-elements/reasoning/ReasoningContent.vue +0 -41
  652. package/src/components/ai-elements/reasoning/ReasoningTrigger.vue +0 -61
  653. package/src/components/ai-elements/reasoning/context.ts +0 -19
  654. package/src/components/ai-elements/reasoning/index.ts +0 -3
  655. package/src/components/ai-elements/shimmer/Shimmer.vue +0 -69
  656. package/src/components/ai-elements/shimmer/index.ts +0 -1
  657. package/src/components/ai-elements/sources/Source.vue +0 -26
  658. package/src/components/ai-elements/sources/Sources.vue +0 -17
  659. package/src/components/ai-elements/sources/SourcesContent.vue +0 -23
  660. package/src/components/ai-elements/sources/SourcesTrigger.vue +0 -24
  661. package/src/components/ai-elements/sources/index.ts +0 -4
  662. package/src/components/ai-elements/suggestion/Suggestion.vue +0 -38
  663. package/src/components/ai-elements/suggestion/Suggestions.vue +0 -20
  664. package/src/components/ai-elements/suggestion/index.ts +0 -2
  665. package/src/components/ai-elements/task/Task.vue +0 -32
  666. package/src/components/ai-elements/task/TaskContent.vue +0 -27
  667. package/src/components/ai-elements/task/TaskItem.vue +0 -16
  668. package/src/components/ai-elements/task/TaskItemFile.vue +0 -18
  669. package/src/components/ai-elements/task/TaskTrigger.vue +0 -33
  670. package/src/components/ai-elements/task/index.ts +0 -5
  671. package/src/components/ai-elements/tool/Tool.vue +0 -18
  672. package/src/components/ai-elements/tool/ToolContent.vue +0 -23
  673. package/src/components/ai-elements/tool/ToolHeader.vue +0 -38
  674. package/src/components/ai-elements/tool/ToolInput.vue +0 -32
  675. package/src/components/ai-elements/tool/ToolOutput.vue +0 -69
  676. package/src/components/ai-elements/tool/ToolStatusBadge.vue +0 -63
  677. package/src/components/ai-elements/tool/index.ts +0 -5
  678. package/src/components/ai-elements/toolbar/Toolbar.vue +0 -32
  679. package/src/components/ai-elements/toolbar/index.ts +0 -1
  680. package/src/components/ai-elements/web-preview/WebPreview.vue +0 -60
  681. package/src/components/ai-elements/web-preview/WebPreviewBody.vue +0 -34
  682. package/src/components/ai-elements/web-preview/WebPreviewConsole.vue +0 -92
  683. package/src/components/ai-elements/web-preview/WebPreviewNavigation.vue +0 -21
  684. package/src/components/ai-elements/web-preview/WebPreviewNavigationButton.vue +0 -45
  685. package/src/components/ai-elements/web-preview/WebPreviewUrl.vue +0 -43
  686. package/src/components/ai-elements/web-preview/context.ts +0 -25
  687. package/src/components/ai-elements/web-preview/index.ts +0 -7
  688. package/src/components/ui/alert/Alert.vue +0 -21
  689. package/src/components/ui/alert/AlertDescription.vue +0 -17
  690. package/src/components/ui/alert/AlertTitle.vue +0 -17
  691. package/src/components/ui/alert/index.ts +0 -24
  692. package/src/components/ui/avatar/Avatar.vue +0 -18
  693. package/src/components/ui/avatar/AvatarFallback.vue +0 -21
  694. package/src/components/ui/avatar/AvatarImage.vue +0 -16
  695. package/src/components/ui/avatar/index.ts +0 -3
  696. package/src/components/ui/badge/Badge.vue +0 -26
  697. package/src/components/ui/badge/index.ts +0 -26
  698. package/src/components/ui/button/Button.vue +0 -29
  699. package/src/components/ui/button/index.ts +0 -38
  700. package/src/components/ui/button-group/ButtonGroup.vue +0 -22
  701. package/src/components/ui/button-group/ButtonGroupSeparator.vue +0 -24
  702. package/src/components/ui/button-group/ButtonGroupText.vue +0 -29
  703. package/src/components/ui/button-group/index.ts +0 -25
  704. package/src/components/ui/card/Card.vue +0 -22
  705. package/src/components/ui/card/CardAction.vue +0 -17
  706. package/src/components/ui/card/CardContent.vue +0 -17
  707. package/src/components/ui/card/CardDescription.vue +0 -17
  708. package/src/components/ui/card/CardFooter.vue +0 -17
  709. package/src/components/ui/card/CardHeader.vue +0 -17
  710. package/src/components/ui/card/CardTitle.vue +0 -17
  711. package/src/components/ui/card/index.ts +0 -7
  712. package/src/components/ui/carousel/Carousel.vue +0 -53
  713. package/src/components/ui/carousel/CarouselContent.vue +0 -33
  714. package/src/components/ui/carousel/CarouselItem.vue +0 -24
  715. package/src/components/ui/carousel/CarouselNext.vue +0 -41
  716. package/src/components/ui/carousel/CarouselPrevious.vue +0 -41
  717. package/src/components/ui/carousel/index.ts +0 -10
  718. package/src/components/ui/carousel/interface.ts +0 -26
  719. package/src/components/ui/carousel/useCarousel.ts +0 -56
  720. package/src/components/ui/collapsible/Collapsible.vue +0 -19
  721. package/src/components/ui/collapsible/CollapsibleContent.vue +0 -15
  722. package/src/components/ui/collapsible/CollapsibleTrigger.vue +0 -15
  723. package/src/components/ui/collapsible/index.ts +0 -3
  724. package/src/components/ui/command/Command.vue +0 -87
  725. package/src/components/ui/command/CommandDialog.vue +0 -31
  726. package/src/components/ui/command/CommandEmpty.vue +0 -27
  727. package/src/components/ui/command/CommandGroup.vue +0 -45
  728. package/src/components/ui/command/CommandInput.vue +0 -39
  729. package/src/components/ui/command/CommandItem.vue +0 -76
  730. package/src/components/ui/command/CommandList.vue +0 -25
  731. package/src/components/ui/command/CommandSeparator.vue +0 -21
  732. package/src/components/ui/command/CommandShortcut.vue +0 -17
  733. package/src/components/ui/command/index.ts +0 -25
  734. package/src/components/ui/dialog/Dialog.vue +0 -19
  735. package/src/components/ui/dialog/DialogClose.vue +0 -15
  736. package/src/components/ui/dialog/DialogContent.vue +0 -53
  737. package/src/components/ui/dialog/DialogDescription.vue +0 -23
  738. package/src/components/ui/dialog/DialogFooter.vue +0 -15
  739. package/src/components/ui/dialog/DialogHeader.vue +0 -17
  740. package/src/components/ui/dialog/DialogOverlay.vue +0 -21
  741. package/src/components/ui/dialog/DialogScrollContent.vue +0 -59
  742. package/src/components/ui/dialog/DialogTitle.vue +0 -23
  743. package/src/components/ui/dialog/DialogTrigger.vue +0 -15
  744. package/src/components/ui/dialog/index.ts +0 -10
  745. package/src/components/ui/dropdown-menu/DropdownMenu.vue +0 -19
  746. package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +0 -39
  747. package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +0 -39
  748. package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +0 -15
  749. package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +0 -31
  750. package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +0 -23
  751. package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +0 -21
  752. package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +0 -40
  753. package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +0 -23
  754. package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +0 -17
  755. package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +0 -18
  756. package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +0 -27
  757. package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +0 -30
  758. package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +0 -17
  759. package/src/components/ui/dropdown-menu/index.ts +0 -16
  760. package/src/components/ui/hover-card/HoverCard.vue +0 -19
  761. package/src/components/ui/hover-card/HoverCardContent.vue +0 -43
  762. package/src/components/ui/hover-card/HoverCardTrigger.vue +0 -15
  763. package/src/components/ui/hover-card/index.ts +0 -3
  764. package/src/components/ui/input/Input.vue +0 -33
  765. package/src/components/ui/input/index.ts +0 -1
  766. package/src/components/ui/input-group/InputGroup.vue +0 -37
  767. package/src/components/ui/input-group/InputGroupAddon.vue +0 -36
  768. package/src/components/ui/input-group/InputGroupButton.vue +0 -21
  769. package/src/components/ui/input-group/InputGroupInput.vue +0 -19
  770. package/src/components/ui/input-group/InputGroupText.vue +0 -19
  771. package/src/components/ui/input-group/InputGroupTextarea.vue +0 -19
  772. package/src/components/ui/input-group/index.ts +0 -59
  773. package/src/components/ui/progress/Progress.vue +0 -38
  774. package/src/components/ui/progress/index.ts +0 -1
  775. package/src/components/ui/scroll-area/ScrollArea.vue +0 -33
  776. package/src/components/ui/scroll-area/ScrollBar.vue +0 -32
  777. package/src/components/ui/scroll-area/index.ts +0 -2
  778. package/src/components/ui/select/Select.vue +0 -19
  779. package/src/components/ui/select/SelectContent.vue +0 -51
  780. package/src/components/ui/select/SelectGroup.vue +0 -15
  781. package/src/components/ui/select/SelectItem.vue +0 -44
  782. package/src/components/ui/select/SelectItemText.vue +0 -15
  783. package/src/components/ui/select/SelectLabel.vue +0 -17
  784. package/src/components/ui/select/SelectScrollDownButton.vue +0 -26
  785. package/src/components/ui/select/SelectScrollUpButton.vue +0 -26
  786. package/src/components/ui/select/SelectSeparator.vue +0 -19
  787. package/src/components/ui/select/SelectTrigger.vue +0 -33
  788. package/src/components/ui/select/SelectValue.vue +0 -15
  789. package/src/components/ui/select/index.ts +0 -11
  790. package/src/components/ui/separator/Separator.vue +0 -29
  791. package/src/components/ui/separator/index.ts +0 -1
  792. package/src/components/ui/textarea/Textarea.vue +0 -28
  793. package/src/components/ui/textarea/index.ts +0 -1
  794. package/src/components/ui/tooltip/Tooltip.vue +0 -19
  795. package/src/components/ui/tooltip/TooltipContent.vue +0 -34
  796. package/src/components/ui/tooltip/TooltipProvider.vue +0 -14
  797. package/src/components/ui/tooltip/TooltipTrigger.vue +0 -15
  798. package/src/components/ui/tooltip/index.ts +0 -4
  799. package/src/composables/useChat.ts +0 -46
  800. package/src/index.ts +0 -3
  801. package/src/lib/utils.ts +0 -7
  802. package/src/main.ts +0 -5
  803. package/src/request/index.ts +0 -41
  804. package/src/style.css +0 -120
  805. package/tsconfig.app.json +0 -25
  806. package/tsconfig.json +0 -13
  807. package/tsconfig.node.json +0 -26
  808. package/vite.config.ts +0 -26
  809. /package/{public → dist}/vite.svg +0 -0
@@ -0,0 +1,1395 @@
1
+ import { C as _isIterateeCall_default, D as _overRest_default, E as _baseRest_default, G as _root_default, N as _setToString_default, P as constant_default, V as isArray_default, j as _baseAssignValue_default, k as _assignValue_default, n as _baseFor_default, p as keysIn_default, v as _baseUnary_default, w as isArrayLike_default, z as identity_default } from "./isArrayLikeObject-Dz_TDfw0.js";
2
+ import { C as _baseGet_default, E as toString_default, M as _arrayMap_default, N as isSymbol_default, S as _baseFlatten_default, a as filter_default, c as _castFunction_default, d as _baseForOwn_default, f as _baseIteratee_default, i as values_default, m as hasIn_default, n as reduce_default, p as _baseProperty_default, r as isUndefined_default, s as forEach_default, y as _baseClone_default } from "./_baseUniq-f11MNaXe.js";
3
+ import { a as isString_default, c as _baseMap_default, d as defaults_default, f as flatten_default, i as _baseLt_default, l as find_default, m as toFinite_default, n as min_default, o as has_default, r as _baseExtremum_default, s as map_default, t as _basePickBy_default, u as last_default } from "./_basePickBy-CkZky1V-.js";
4
+ import { i as _baseKeys_default, n as _getTag_default } from "./isEmpty-CCym_WUL.js";
5
+ import { A as merge_default } from "./chunk-S3R3BYOJ-DHTsHczu.js";
6
+ import { t as Graph } from "./graphlib-BZdVmxO6.js";
7
+ function flatRest(d) {
8
+ return _setToString_default(_overRest_default(d, void 0, flatten_default), d + "");
9
+ }
10
+ var _flatRest_default = flatRest, reHasUnicode = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");
11
+ function hasUnicode(d) {
12
+ return reHasUnicode.test(d);
13
+ }
14
+ var _hasUnicode_default = hasUnicode, CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
15
+ function cloneDeep(d) {
16
+ return _baseClone_default(d, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
17
+ }
18
+ var cloneDeep_default = cloneDeep, now_default = function() {
19
+ return _root_default.Date.now();
20
+ };
21
+ function forIn(d, B) {
22
+ return d == null ? d : _baseFor_default(d, _castFunction_default(B), keysIn_default);
23
+ }
24
+ var forIn_default = forIn;
25
+ function forOwn(d, B) {
26
+ return d && _baseForOwn_default(d, _castFunction_default(B));
27
+ }
28
+ var forOwn_default = forOwn;
29
+ function baseGt(d, B) {
30
+ return d > B;
31
+ }
32
+ var _baseGt_default = baseGt;
33
+ function mapValues(d, B) {
34
+ var V = {};
35
+ return B = _baseIteratee_default(B, 3), _baseForOwn_default(d, function(d, H, U) {
36
+ _baseAssignValue_default(V, H, B(d, H, U));
37
+ }), V;
38
+ }
39
+ var mapValues_default = mapValues;
40
+ function max(d) {
41
+ return d && d.length ? _baseExtremum_default(d, identity_default, _baseGt_default) : void 0;
42
+ }
43
+ var max_default = max;
44
+ function minBy(d, B) {
45
+ return d && d.length ? _baseExtremum_default(d, _baseIteratee_default(B, 2), _baseLt_default) : void 0;
46
+ }
47
+ var minBy_default = minBy;
48
+ function baseSortBy(d, B) {
49
+ var V = d.length;
50
+ for (d.sort(B); V--;) d[V] = d[V].value;
51
+ return d;
52
+ }
53
+ var _baseSortBy_default = baseSortBy;
54
+ function compareAscending(d, B) {
55
+ if (d !== B) {
56
+ var V = d !== void 0, H = d === null, U = d === d, W = isSymbol_default(d), G = B !== void 0, K = B === null, q = B === B, J = isSymbol_default(B);
57
+ if (!K && !J && !W && d > B || W && G && q && !K && !J || H && G && q || !V && q || !U) return 1;
58
+ if (!H && !W && !J && d < B || J && V && U && !H && !W || K && V && U || !G && U || !q) return -1;
59
+ }
60
+ return 0;
61
+ }
62
+ var _compareAscending_default = compareAscending;
63
+ function compareMultiple(d, B, V) {
64
+ for (var H = -1, U = d.criteria, W = B.criteria, G = U.length, K = V.length; ++H < G;) {
65
+ var q = _compareAscending_default(U[H], W[H]);
66
+ if (q) return H >= K ? q : q * (V[H] == "desc" ? -1 : 1);
67
+ }
68
+ return d.index - B.index;
69
+ }
70
+ var _compareMultiple_default = compareMultiple;
71
+ function baseOrderBy(d, B, V) {
72
+ B = B.length ? _arrayMap_default(B, function(d) {
73
+ return isArray_default(d) ? function(B) {
74
+ return _baseGet_default(B, d.length === 1 ? d[0] : d);
75
+ } : d;
76
+ }) : [identity_default];
77
+ var H = -1;
78
+ return B = _arrayMap_default(B, _baseUnary_default(_baseIteratee_default)), _baseSortBy_default(_baseMap_default(d, function(d, V, U) {
79
+ return {
80
+ criteria: _arrayMap_default(B, function(B) {
81
+ return B(d);
82
+ }),
83
+ index: ++H,
84
+ value: d
85
+ };
86
+ }), function(d, B) {
87
+ return _compareMultiple_default(d, B, V);
88
+ });
89
+ }
90
+ var _baseOrderBy_default = baseOrderBy, _asciiSize_default = _baseProperty_default("length"), rsAstralRange = "\\ud800-\\udfff", rsComboRange = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", rsVarRange = "\\ufe0e\\ufe0f", rsAstral = "[" + rsAstralRange + "]", rsCombo = "[" + rsComboRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ = "\\u200d", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [
91
+ rsNonAstral,
92
+ rsRegional,
93
+ rsSurrPair
94
+ ].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = "(?:" + [
95
+ rsNonAstral + rsCombo + "?",
96
+ rsCombo,
97
+ rsRegional,
98
+ rsSurrPair,
99
+ rsAstral
100
+ ].join("|") + ")", reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
101
+ function unicodeSize(d) {
102
+ for (var B = reUnicode.lastIndex = 0; reUnicode.test(d);) ++B;
103
+ return B;
104
+ }
105
+ var _unicodeSize_default = unicodeSize;
106
+ function stringSize(d) {
107
+ return _hasUnicode_default(d) ? _unicodeSize_default(d) : _asciiSize_default(d);
108
+ }
109
+ var _stringSize_default = stringSize;
110
+ function basePick(d, B) {
111
+ return _basePickBy_default(d, B, function(B, V) {
112
+ return hasIn_default(d, V);
113
+ });
114
+ }
115
+ var _basePick_default = basePick, pick_default = _flatRest_default(function(d, B) {
116
+ return d == null ? {} : _basePick_default(d, B);
117
+ }), nativeCeil = Math.ceil, nativeMax = Math.max;
118
+ function baseRange(d, B, V, H) {
119
+ for (var U = -1, W = nativeMax(nativeCeil((B - d) / (V || 1)), 0), G = Array(W); W--;) G[H ? W : ++U] = d, d += V;
120
+ return G;
121
+ }
122
+ var _baseRange_default = baseRange;
123
+ function createRange(B) {
124
+ return function(V, H, U) {
125
+ return U && typeof U != "number" && _isIterateeCall_default(V, H, U) && (H = U = void 0), V = toFinite_default(V), H === void 0 ? (H = V, V = 0) : H = toFinite_default(H), U = U === void 0 ? V < H ? 1 : -1 : toFinite_default(U), _baseRange_default(V, H, U, B);
126
+ };
127
+ }
128
+ var range_default = createRange(), mapTag = "[object Map]", setTag = "[object Set]";
129
+ function size(d) {
130
+ if (d == null) return 0;
131
+ if (isArrayLike_default(d)) return isString_default(d) ? _stringSize_default(d) : d.length;
132
+ var B = _getTag_default(d);
133
+ return B == mapTag || B == setTag ? d.size : _baseKeys_default(d).length;
134
+ }
135
+ var size_default = size, sortBy_default = _baseRest_default(function(B, V) {
136
+ if (B == null) return [];
137
+ var H = V.length;
138
+ return H > 1 && _isIterateeCall_default(B, V[0], V[1]) ? V = [] : H > 2 && _isIterateeCall_default(V[0], V[1], V[2]) && (V = [V[0]]), _baseOrderBy_default(B, _baseFlatten_default(V, 1), []);
139
+ }), idCounter = 0;
140
+ function uniqueId(d) {
141
+ var B = ++idCounter;
142
+ return toString_default(d) + B;
143
+ }
144
+ var uniqueId_default = uniqueId;
145
+ function baseZipObject(d, B, V) {
146
+ for (var H = -1, U = d.length, W = B.length, G = {}; ++H < U;) {
147
+ var K = H < W ? B[H] : void 0;
148
+ V(G, d[H], K);
149
+ }
150
+ return G;
151
+ }
152
+ var _baseZipObject_default = baseZipObject;
153
+ function zipObject(d, B) {
154
+ return _baseZipObject_default(d || [], B || [], _assignValue_default);
155
+ }
156
+ var zipObject_default = zipObject, List = class {
157
+ constructor() {
158
+ var d = {};
159
+ d._next = d._prev = d, this._sentinel = d;
160
+ }
161
+ dequeue() {
162
+ var d = this._sentinel, B = d._prev;
163
+ if (B !== d) return unlink(B), B;
164
+ }
165
+ enqueue(d) {
166
+ var B = this._sentinel;
167
+ d._prev && d._next && unlink(d), d._next = B._next, B._next._prev = d, B._next = d, d._prev = B;
168
+ }
169
+ toString() {
170
+ for (var d = [], B = this._sentinel, V = B._prev; V !== B;) d.push(JSON.stringify(V, filterOutLinks)), V = V._prev;
171
+ return "[" + d.join(", ") + "]";
172
+ }
173
+ };
174
+ function unlink(d) {
175
+ d._prev._next = d._next, d._next._prev = d._prev, delete d._next, delete d._prev;
176
+ }
177
+ function filterOutLinks(d, B) {
178
+ if (d !== "_next" && d !== "_prev") return B;
179
+ }
180
+ var DEFAULT_WEIGHT_FN = constant_default(1);
181
+ function greedyFAS(d, B) {
182
+ if (d.nodeCount() <= 1) return [];
183
+ var V = buildState(d, B || DEFAULT_WEIGHT_FN);
184
+ return flatten_default(map_default(doGreedyFAS(V.graph, V.buckets, V.zeroIdx), function(B) {
185
+ return d.outEdges(B.v, B.w);
186
+ }));
187
+ }
188
+ function doGreedyFAS(d, B, V) {
189
+ for (var H = [], U = B[B.length - 1], W = B[0], G; d.nodeCount();) {
190
+ for (; G = W.dequeue();) removeNode(d, B, V, G);
191
+ for (; G = U.dequeue();) removeNode(d, B, V, G);
192
+ if (d.nodeCount()) {
193
+ for (var K = B.length - 2; K > 0; --K) if (G = B[K].dequeue(), G) {
194
+ H = H.concat(removeNode(d, B, V, G, !0));
195
+ break;
196
+ }
197
+ }
198
+ }
199
+ return H;
200
+ }
201
+ function removeNode(d, B, V, H, U) {
202
+ var W = U ? [] : void 0;
203
+ return forEach_default(d.inEdges(H.v), function(H) {
204
+ var G = d.edge(H), K = d.node(H.v);
205
+ U && W.push({
206
+ v: H.v,
207
+ w: H.w
208
+ }), K.out -= G, assignBucket(B, V, K);
209
+ }), forEach_default(d.outEdges(H.v), function(H) {
210
+ var U = d.edge(H), W = H.w, G = d.node(W);
211
+ G.in -= U, assignBucket(B, V, G);
212
+ }), d.removeNode(H.v), W;
213
+ }
214
+ function buildState(d, B) {
215
+ var V = new Graph(), H = 0, U = 0;
216
+ forEach_default(d.nodes(), function(d) {
217
+ V.setNode(d, {
218
+ v: d,
219
+ in: 0,
220
+ out: 0
221
+ });
222
+ }), forEach_default(d.edges(), function(d) {
223
+ var W = V.edge(d.v, d.w) || 0, G = B(d), K = W + G;
224
+ V.setEdge(d.v, d.w, K), U = Math.max(U, V.node(d.v).out += G), H = Math.max(H, V.node(d.w).in += G);
225
+ });
226
+ var W = range_default(U + H + 3).map(function() {
227
+ return new List();
228
+ }), G = H + 1;
229
+ return forEach_default(V.nodes(), function(d) {
230
+ assignBucket(W, G, V.node(d));
231
+ }), {
232
+ graph: V,
233
+ buckets: W,
234
+ zeroIdx: G
235
+ };
236
+ }
237
+ function assignBucket(d, B, V) {
238
+ V.out ? V.in ? d[V.out - V.in + B].enqueue(V) : d[d.length - 1].enqueue(V) : d[0].enqueue(V);
239
+ }
240
+ function run$2(d) {
241
+ forEach_default(d.graph().acyclicer === "greedy" ? greedyFAS(d, B(d)) : dfsFAS(d), function(B) {
242
+ var V = d.edge(B);
243
+ d.removeEdge(B), V.forwardName = B.name, V.reversed = !0, d.setEdge(B.w, B.v, V, uniqueId_default("rev"));
244
+ });
245
+ function B(d) {
246
+ return function(B) {
247
+ return d.edge(B).weight;
248
+ };
249
+ }
250
+ }
251
+ function dfsFAS(d) {
252
+ var B = [], V = {}, H = {};
253
+ function U(W) {
254
+ Object.prototype.hasOwnProperty.call(H, W) || (H[W] = !0, V[W] = !0, forEach_default(d.outEdges(W), function(d) {
255
+ Object.prototype.hasOwnProperty.call(V, d.w) ? B.push(d) : U(d.w);
256
+ }), delete V[W]);
257
+ }
258
+ return forEach_default(d.nodes(), U), B;
259
+ }
260
+ function undo$2(d) {
261
+ forEach_default(d.edges(), function(B) {
262
+ var V = d.edge(B);
263
+ if (V.reversed) {
264
+ d.removeEdge(B);
265
+ var H = V.forwardName;
266
+ delete V.reversed, delete V.forwardName, d.setEdge(B.w, B.v, V, H);
267
+ }
268
+ });
269
+ }
270
+ function addDummyNode(d, B, V, H) {
271
+ var U;
272
+ do
273
+ U = uniqueId_default(H);
274
+ while (d.hasNode(U));
275
+ return V.dummy = B, d.setNode(U, V), U;
276
+ }
277
+ function simplify(d) {
278
+ var B = new Graph().setGraph(d.graph());
279
+ return forEach_default(d.nodes(), function(V) {
280
+ B.setNode(V, d.node(V));
281
+ }), forEach_default(d.edges(), function(V) {
282
+ var H = B.edge(V.v, V.w) || {
283
+ weight: 0,
284
+ minlen: 1
285
+ }, U = d.edge(V);
286
+ B.setEdge(V.v, V.w, {
287
+ weight: H.weight + U.weight,
288
+ minlen: Math.max(H.minlen, U.minlen)
289
+ });
290
+ }), B;
291
+ }
292
+ function asNonCompoundGraph(d) {
293
+ var B = new Graph({ multigraph: d.isMultigraph() }).setGraph(d.graph());
294
+ return forEach_default(d.nodes(), function(V) {
295
+ d.children(V).length || B.setNode(V, d.node(V));
296
+ }), forEach_default(d.edges(), function(V) {
297
+ B.setEdge(V, d.edge(V));
298
+ }), B;
299
+ }
300
+ function intersectRect(d, B) {
301
+ var V = d.x, H = d.y, U = B.x - V, W = B.y - H, G = d.width / 2, K = d.height / 2;
302
+ if (!U && !W) throw Error("Not possible to find intersection inside of the rectangle");
303
+ var q, J;
304
+ return Math.abs(W) * G > Math.abs(U) * K ? (W < 0 && (K = -K), q = K * U / W, J = K) : (U < 0 && (G = -G), q = G, J = G * W / U), {
305
+ x: V + q,
306
+ y: H + J
307
+ };
308
+ }
309
+ function buildLayerMatrix(d) {
310
+ var B = map_default(range_default(maxRank(d) + 1), function() {
311
+ return [];
312
+ });
313
+ return forEach_default(d.nodes(), function(V) {
314
+ var H = d.node(V), U = H.rank;
315
+ isUndefined_default(U) || (B[U][H.order] = V);
316
+ }), B;
317
+ }
318
+ function normalizeRanks(d) {
319
+ var B = min_default(map_default(d.nodes(), function(B) {
320
+ return d.node(B).rank;
321
+ }));
322
+ forEach_default(d.nodes(), function(V) {
323
+ var H = d.node(V);
324
+ has_default(H, "rank") && (H.rank -= B);
325
+ });
326
+ }
327
+ function removeEmptyRanks(d) {
328
+ var B = min_default(map_default(d.nodes(), function(B) {
329
+ return d.node(B).rank;
330
+ })), V = [];
331
+ forEach_default(d.nodes(), function(H) {
332
+ var U = d.node(H).rank - B;
333
+ V[U] || (V[U] = []), V[U].push(H);
334
+ });
335
+ var H = 0, U = d.graph().nodeRankFactor;
336
+ forEach_default(V, function(B, V) {
337
+ isUndefined_default(B) && V % U !== 0 ? --H : H && forEach_default(B, function(B) {
338
+ d.node(B).rank += H;
339
+ });
340
+ });
341
+ }
342
+ function addBorderNode$1(d, B, V, H) {
343
+ var U = {
344
+ width: 0,
345
+ height: 0
346
+ };
347
+ return arguments.length >= 4 && (U.rank = V, U.order = H), addDummyNode(d, "border", U, B);
348
+ }
349
+ function maxRank(d) {
350
+ return max_default(map_default(d.nodes(), function(B) {
351
+ var V = d.node(B).rank;
352
+ if (!isUndefined_default(V)) return V;
353
+ }));
354
+ }
355
+ function partition(d, B) {
356
+ var V = {
357
+ lhs: [],
358
+ rhs: []
359
+ };
360
+ return forEach_default(d, function(d) {
361
+ B(d) ? V.lhs.push(d) : V.rhs.push(d);
362
+ }), V;
363
+ }
364
+ function time(d, B) {
365
+ var V = now_default();
366
+ try {
367
+ return B();
368
+ } finally {
369
+ console.log(d + " time: " + (now_default() - V) + "ms");
370
+ }
371
+ }
372
+ function notime(d, B) {
373
+ return B();
374
+ }
375
+ function addBorderSegments(d) {
376
+ function B(V) {
377
+ var H = d.children(V), U = d.node(V);
378
+ if (H.length && forEach_default(H, B), Object.prototype.hasOwnProperty.call(U, "minRank")) {
379
+ U.borderLeft = [], U.borderRight = [];
380
+ for (var W = U.minRank, G = U.maxRank + 1; W < G; ++W) addBorderNode(d, "borderLeft", "_bl", V, U, W), addBorderNode(d, "borderRight", "_br", V, U, W);
381
+ }
382
+ }
383
+ forEach_default(d.children(), B);
384
+ }
385
+ function addBorderNode(d, B, V, H, U, W) {
386
+ var G = {
387
+ width: 0,
388
+ height: 0,
389
+ rank: W,
390
+ borderType: B
391
+ }, K = U[B][W - 1], q = addDummyNode(d, "border", G, V);
392
+ U[B][W] = q, d.setParent(q, H), K && d.setEdge(K, q, { weight: 1 });
393
+ }
394
+ function adjust(d) {
395
+ var B = d.graph().rankdir.toLowerCase();
396
+ (B === "lr" || B === "rl") && swapWidthHeight(d);
397
+ }
398
+ function undo$1(d) {
399
+ var B = d.graph().rankdir.toLowerCase();
400
+ (B === "bt" || B === "rl") && reverseY(d), (B === "lr" || B === "rl") && (swapXY(d), swapWidthHeight(d));
401
+ }
402
+ function swapWidthHeight(d) {
403
+ forEach_default(d.nodes(), function(B) {
404
+ swapWidthHeightOne(d.node(B));
405
+ }), forEach_default(d.edges(), function(B) {
406
+ swapWidthHeightOne(d.edge(B));
407
+ });
408
+ }
409
+ function swapWidthHeightOne(d) {
410
+ var B = d.width;
411
+ d.width = d.height, d.height = B;
412
+ }
413
+ function reverseY(d) {
414
+ forEach_default(d.nodes(), function(B) {
415
+ reverseYOne(d.node(B));
416
+ }), forEach_default(d.edges(), function(B) {
417
+ var V = d.edge(B);
418
+ forEach_default(V.points, reverseYOne), Object.prototype.hasOwnProperty.call(V, "y") && reverseYOne(V);
419
+ });
420
+ }
421
+ function reverseYOne(d) {
422
+ d.y = -d.y;
423
+ }
424
+ function swapXY(d) {
425
+ forEach_default(d.nodes(), function(B) {
426
+ swapXYOne(d.node(B));
427
+ }), forEach_default(d.edges(), function(B) {
428
+ var V = d.edge(B);
429
+ forEach_default(V.points, swapXYOne), Object.prototype.hasOwnProperty.call(V, "x") && swapXYOne(V);
430
+ });
431
+ }
432
+ function swapXYOne(d) {
433
+ var B = d.x;
434
+ d.x = d.y, d.y = B;
435
+ }
436
+ function run$1(d) {
437
+ d.graph().dummyChains = [], forEach_default(d.edges(), function(B) {
438
+ normalizeEdge(d, B);
439
+ });
440
+ }
441
+ function normalizeEdge(d, B) {
442
+ var V = B.v, H = d.node(V).rank, U = B.w, W = d.node(U).rank, G = B.name, K = d.edge(B), q = K.labelRank;
443
+ if (W !== H + 1) {
444
+ d.removeEdge(B);
445
+ var J = void 0, Y, X;
446
+ for (X = 0, ++H; H < W; ++X, ++H) K.points = [], J = {
447
+ width: 0,
448
+ height: 0,
449
+ edgeLabel: K,
450
+ edgeObj: B,
451
+ rank: H
452
+ }, Y = addDummyNode(d, "edge", J, "_d"), H === q && (J.width = K.width, J.height = K.height, J.dummy = "edge-label", J.labelpos = K.labelpos), d.setEdge(V, Y, { weight: K.weight }, G), X === 0 && d.graph().dummyChains.push(Y), V = Y;
453
+ d.setEdge(V, U, { weight: K.weight }, G);
454
+ }
455
+ }
456
+ function undo(d) {
457
+ forEach_default(d.graph().dummyChains, function(B) {
458
+ var V = d.node(B), H = V.edgeLabel, U;
459
+ for (d.setEdge(V.edgeObj, H); V.dummy;) U = d.successors(B)[0], d.removeNode(B), H.points.push({
460
+ x: V.x,
461
+ y: V.y
462
+ }), V.dummy === "edge-label" && (H.x = V.x, H.y = V.y, H.width = V.width, H.height = V.height), B = U, V = d.node(B);
463
+ });
464
+ }
465
+ function longestPath(d) {
466
+ var B = {};
467
+ function V(H) {
468
+ var U = d.node(H);
469
+ if (Object.prototype.hasOwnProperty.call(B, H)) return U.rank;
470
+ B[H] = !0;
471
+ var W = min_default(map_default(d.outEdges(H), function(B) {
472
+ return V(B.w) - d.edge(B).minlen;
473
+ }));
474
+ return (W === Infinity || W == null) && (W = 0), U.rank = W;
475
+ }
476
+ forEach_default(d.sources(), V);
477
+ }
478
+ function slack(d, B) {
479
+ return d.node(B.w).rank - d.node(B.v).rank - d.edge(B).minlen;
480
+ }
481
+ function feasibleTree(d) {
482
+ var B = new Graph({ directed: !1 }), V = d.nodes()[0], H = d.nodeCount();
483
+ B.setNode(V, {});
484
+ for (var U, W; tightTree(B, d) < H;) U = findMinSlackEdge(B, d), W = B.hasNode(U.v) ? slack(d, U) : -slack(d, U), shiftRanks(B, d, W);
485
+ return B;
486
+ }
487
+ function tightTree(d, B) {
488
+ function V(H) {
489
+ forEach_default(B.nodeEdges(H), function(U) {
490
+ var W = U.v, G = H === W ? U.w : W;
491
+ !d.hasNode(G) && !slack(B, U) && (d.setNode(G, {}), d.setEdge(H, G, {}), V(G));
492
+ });
493
+ }
494
+ return forEach_default(d.nodes(), V), d.nodeCount();
495
+ }
496
+ function findMinSlackEdge(d, B) {
497
+ return minBy_default(B.edges(), function(V) {
498
+ if (d.hasNode(V.v) !== d.hasNode(V.w)) return slack(B, V);
499
+ });
500
+ }
501
+ function shiftRanks(d, B, V) {
502
+ forEach_default(d.nodes(), function(d) {
503
+ B.node(d).rank += V;
504
+ });
505
+ }
506
+ constant_default(1), constant_default(1), topsort.CycleException = CycleException;
507
+ function topsort(d) {
508
+ var B = {}, V = {}, H = [];
509
+ function U(W) {
510
+ if (Object.prototype.hasOwnProperty.call(V, W)) throw new CycleException();
511
+ Object.prototype.hasOwnProperty.call(B, W) || (V[W] = !0, B[W] = !0, forEach_default(d.predecessors(W), U), delete V[W], H.push(W));
512
+ }
513
+ if (forEach_default(d.sinks(), U), size_default(B) !== d.nodeCount()) throw new CycleException();
514
+ return H;
515
+ }
516
+ function CycleException() {}
517
+ CycleException.prototype = /* @__PURE__ */ Error();
518
+ function dfs$1(d, B, V) {
519
+ isArray_default(B) || (B = [B]);
520
+ var H = (d.isDirected() ? d.successors : d.neighbors).bind(d), U = [], W = {};
521
+ return forEach_default(B, function(B) {
522
+ if (!d.hasNode(B)) throw Error("Graph does not have node: " + B);
523
+ doDfs(d, B, V === "post", W, H, U);
524
+ }), U;
525
+ }
526
+ function doDfs(d, B, V, H, U, W) {
527
+ Object.prototype.hasOwnProperty.call(H, B) || (H[B] = !0, V || W.push(B), forEach_default(U(B), function(B) {
528
+ doDfs(d, B, V, H, U, W);
529
+ }), V && W.push(B));
530
+ }
531
+ function postorder$1(d, B) {
532
+ return dfs$1(d, B, "post");
533
+ }
534
+ function preorder(d, B) {
535
+ return dfs$1(d, B, "pre");
536
+ }
537
+ networkSimplex.initLowLimValues = initLowLimValues, networkSimplex.initCutValues = initCutValues, networkSimplex.calcCutValue = calcCutValue, networkSimplex.leaveEdge = leaveEdge, networkSimplex.enterEdge = enterEdge, networkSimplex.exchangeEdges = exchangeEdges;
538
+ function networkSimplex(d) {
539
+ d = simplify(d), longestPath(d);
540
+ var B = feasibleTree(d);
541
+ initLowLimValues(B), initCutValues(B, d);
542
+ for (var V, H; V = leaveEdge(B);) H = enterEdge(B, d, V), exchangeEdges(B, d, V, H);
543
+ }
544
+ function initCutValues(d, B) {
545
+ var V = postorder$1(d, d.nodes());
546
+ V = V.slice(0, V.length - 1), forEach_default(V, function(V) {
547
+ assignCutValue(d, B, V);
548
+ });
549
+ }
550
+ function assignCutValue(d, B, V) {
551
+ var H = d.node(V).parent;
552
+ d.edge(V, H).cutvalue = calcCutValue(d, B, V);
553
+ }
554
+ function calcCutValue(d, B, V) {
555
+ var H = d.node(V).parent, U = !0, W = B.edge(V, H), G = 0;
556
+ return W ||= (U = !1, B.edge(H, V)), G = W.weight, forEach_default(B.nodeEdges(V), function(W) {
557
+ var K = W.v === V, q = K ? W.w : W.v;
558
+ if (q !== H) {
559
+ var J = K === U, Y = B.edge(W).weight;
560
+ if (G += J ? Y : -Y, isTreeEdge(d, V, q)) {
561
+ var X = d.edge(V, q).cutvalue;
562
+ G += J ? -X : X;
563
+ }
564
+ }
565
+ }), G;
566
+ }
567
+ function initLowLimValues(d, B) {
568
+ arguments.length < 2 && (B = d.nodes()[0]), dfsAssignLowLim(d, {}, 1, B);
569
+ }
570
+ function dfsAssignLowLim(d, B, V, H, U) {
571
+ var W = V, G = d.node(H);
572
+ return B[H] = !0, forEach_default(d.neighbors(H), function(U) {
573
+ Object.prototype.hasOwnProperty.call(B, U) || (V = dfsAssignLowLim(d, B, V, U, H));
574
+ }), G.low = W, G.lim = V++, U ? G.parent = U : delete G.parent, V;
575
+ }
576
+ function leaveEdge(d) {
577
+ return find_default(d.edges(), function(B) {
578
+ return d.edge(B).cutvalue < 0;
579
+ });
580
+ }
581
+ function enterEdge(d, B, V) {
582
+ var H = V.v, U = V.w;
583
+ B.hasEdge(H, U) || (H = V.w, U = V.v);
584
+ var W = d.node(H), G = d.node(U), K = W, q = !1;
585
+ return W.lim > G.lim && (K = G, q = !0), minBy_default(filter_default(B.edges(), function(B) {
586
+ return q === isDescendant(d, d.node(B.v), K) && q !== isDescendant(d, d.node(B.w), K);
587
+ }), function(d) {
588
+ return slack(B, d);
589
+ });
590
+ }
591
+ function exchangeEdges(d, B, V, H) {
592
+ var U = V.v, W = V.w;
593
+ d.removeEdge(U, W), d.setEdge(H.v, H.w, {}), initLowLimValues(d), initCutValues(d, B), updateRanks(d, B);
594
+ }
595
+ function updateRanks(d, B) {
596
+ var V = preorder(d, find_default(d.nodes(), function(d) {
597
+ return !B.node(d).parent;
598
+ }));
599
+ V = V.slice(1), forEach_default(V, function(V) {
600
+ var H = d.node(V).parent, U = B.edge(V, H), W = !1;
601
+ U || (U = B.edge(H, V), W = !0), B.node(V).rank = B.node(H).rank + (W ? U.minlen : -U.minlen);
602
+ });
603
+ }
604
+ function isTreeEdge(d, B, V) {
605
+ return d.hasEdge(B, V);
606
+ }
607
+ function isDescendant(d, B, V) {
608
+ return V.low <= B.lim && B.lim <= V.lim;
609
+ }
610
+ function rank(d) {
611
+ switch (d.graph().ranker) {
612
+ case "network-simplex":
613
+ networkSimplexRanker(d);
614
+ break;
615
+ case "tight-tree":
616
+ tightTreeRanker(d);
617
+ break;
618
+ case "longest-path":
619
+ longestPathRanker(d);
620
+ break;
621
+ default: networkSimplexRanker(d);
622
+ }
623
+ }
624
+ var longestPathRanker = longestPath;
625
+ function tightTreeRanker(d) {
626
+ longestPath(d), feasibleTree(d);
627
+ }
628
+ function networkSimplexRanker(d) {
629
+ networkSimplex(d);
630
+ }
631
+ function run(d) {
632
+ var B = addDummyNode(d, "root", {}, "_root"), V = treeDepths(d), H = max_default(values_default(V)) - 1, U = 2 * H + 1;
633
+ d.graph().nestingRoot = B, forEach_default(d.edges(), function(B) {
634
+ d.edge(B).minlen *= U;
635
+ });
636
+ var W = sumWeights(d) + 1;
637
+ forEach_default(d.children(), function(G) {
638
+ dfs(d, B, U, W, H, V, G);
639
+ }), d.graph().nodeRankFactor = U;
640
+ }
641
+ function dfs(d, B, V, H, U, W, G) {
642
+ var K = d.children(G);
643
+ if (!K.length) {
644
+ G !== B && d.setEdge(B, G, {
645
+ weight: 0,
646
+ minlen: V
647
+ });
648
+ return;
649
+ }
650
+ var q = addBorderNode$1(d, "_bt"), J = addBorderNode$1(d, "_bb"), Y = d.node(G);
651
+ d.setParent(q, G), Y.borderTop = q, d.setParent(J, G), Y.borderBottom = J, forEach_default(K, function(K) {
652
+ dfs(d, B, V, H, U, W, K);
653
+ var Y = d.node(K), X = Y.borderTop ? Y.borderTop : K, Z = Y.borderBottom ? Y.borderBottom : K, Q = Y.borderTop ? H : 2 * H, $ = X === Z ? U - W[G] + 1 : 1;
654
+ d.setEdge(q, X, {
655
+ weight: Q,
656
+ minlen: $,
657
+ nestingEdge: !0
658
+ }), d.setEdge(Z, J, {
659
+ weight: Q,
660
+ minlen: $,
661
+ nestingEdge: !0
662
+ });
663
+ }), d.parent(G) || d.setEdge(B, q, {
664
+ weight: 0,
665
+ minlen: U + W[G]
666
+ });
667
+ }
668
+ function treeDepths(d) {
669
+ var B = {};
670
+ function V(H, U) {
671
+ var W = d.children(H);
672
+ W && W.length && forEach_default(W, function(d) {
673
+ V(d, U + 1);
674
+ }), B[H] = U;
675
+ }
676
+ return forEach_default(d.children(), function(d) {
677
+ V(d, 1);
678
+ }), B;
679
+ }
680
+ function sumWeights(d) {
681
+ return reduce_default(d.edges(), function(B, V) {
682
+ return B + d.edge(V).weight;
683
+ }, 0);
684
+ }
685
+ function cleanup(d) {
686
+ var B = d.graph();
687
+ d.removeNode(B.nestingRoot), delete B.nestingRoot, forEach_default(d.edges(), function(B) {
688
+ d.edge(B).nestingEdge && d.removeEdge(B);
689
+ });
690
+ }
691
+ function addSubgraphConstraints(d, B, V) {
692
+ var H = {}, U;
693
+ forEach_default(V, function(V) {
694
+ for (var W = d.parent(V), G, K; W;) {
695
+ if (G = d.parent(W), G ? (K = H[G], H[G] = W) : (K = U, U = W), K && K !== W) {
696
+ B.setEdge(K, W);
697
+ return;
698
+ }
699
+ W = G;
700
+ }
701
+ });
702
+ }
703
+ function buildLayerGraph(d, B, V) {
704
+ var H = createRootNode(d), U = new Graph({ compound: !0 }).setGraph({ root: H }).setDefaultNodeLabel(function(B) {
705
+ return d.node(B);
706
+ });
707
+ return forEach_default(d.nodes(), function(W) {
708
+ var G = d.node(W), K = d.parent(W);
709
+ (G.rank === B || G.minRank <= B && B <= G.maxRank) && (U.setNode(W), U.setParent(W, K || H), forEach_default(d[V](W), function(B) {
710
+ var V = B.v === W ? B.w : B.v, H = U.edge(V, W), G = isUndefined_default(H) ? 0 : H.weight;
711
+ U.setEdge(V, W, { weight: d.edge(B).weight + G });
712
+ }), Object.prototype.hasOwnProperty.call(G, "minRank") && U.setNode(W, {
713
+ borderLeft: G.borderLeft[B],
714
+ borderRight: G.borderRight[B]
715
+ }));
716
+ }), U;
717
+ }
718
+ function createRootNode(d) {
719
+ for (var B; d.hasNode(B = uniqueId_default("_root")););
720
+ return B;
721
+ }
722
+ function crossCount(d, B) {
723
+ for (var V = 0, H = 1; H < B.length; ++H) V += twoLayerCrossCount(d, B[H - 1], B[H]);
724
+ return V;
725
+ }
726
+ function twoLayerCrossCount(d, B, V) {
727
+ for (var H = zipObject_default(V, map_default(V, function(d, B) {
728
+ return B;
729
+ })), U = flatten_default(map_default(B, function(B) {
730
+ return sortBy_default(map_default(d.outEdges(B), function(B) {
731
+ return {
732
+ pos: H[B.w],
733
+ weight: d.edge(B).weight
734
+ };
735
+ }), "pos");
736
+ })), W = 1; W < V.length;) W <<= 1;
737
+ var G = 2 * W - 1;
738
+ --W;
739
+ var K = map_default(Array(G), function() {
740
+ return 0;
741
+ }), q = 0;
742
+ return forEach_default(U.forEach(function(d) {
743
+ var B = d.pos + W;
744
+ K[B] += d.weight;
745
+ for (var V = 0; B > 0;) B % 2 && (V += K[B + 1]), B = B - 1 >> 1, K[B] += d.weight;
746
+ q += d.weight * V;
747
+ })), q;
748
+ }
749
+ function initOrder(d) {
750
+ var B = {}, V = filter_default(d.nodes(), function(B) {
751
+ return !d.children(B).length;
752
+ }), H = map_default(range_default(max_default(map_default(V, function(B) {
753
+ return d.node(B).rank;
754
+ })) + 1), function() {
755
+ return [];
756
+ });
757
+ function U(V) {
758
+ has_default(B, V) || (B[V] = !0, H[d.node(V).rank].push(V), forEach_default(d.successors(V), U));
759
+ }
760
+ return forEach_default(sortBy_default(V, function(B) {
761
+ return d.node(B).rank;
762
+ }), U), H;
763
+ }
764
+ function barycenter(d, B) {
765
+ return map_default(B, function(B) {
766
+ var V = d.inEdges(B);
767
+ if (V.length) {
768
+ var H = reduce_default(V, function(B, V) {
769
+ var H = d.edge(V), U = d.node(V.v);
770
+ return {
771
+ sum: B.sum + H.weight * U.order,
772
+ weight: B.weight + H.weight
773
+ };
774
+ }, {
775
+ sum: 0,
776
+ weight: 0
777
+ });
778
+ return {
779
+ v: B,
780
+ barycenter: H.sum / H.weight,
781
+ weight: H.weight
782
+ };
783
+ } else return { v: B };
784
+ });
785
+ }
786
+ function resolveConflicts(d, B) {
787
+ var V = {};
788
+ return forEach_default(d, function(d, B) {
789
+ var H = V[d.v] = {
790
+ indegree: 0,
791
+ in: [],
792
+ out: [],
793
+ vs: [d.v],
794
+ i: B
795
+ };
796
+ isUndefined_default(d.barycenter) || (H.barycenter = d.barycenter, H.weight = d.weight);
797
+ }), forEach_default(B.edges(), function(d) {
798
+ var B = V[d.v], H = V[d.w];
799
+ !isUndefined_default(B) && !isUndefined_default(H) && (H.indegree++, B.out.push(V[d.w]));
800
+ }), doResolveConflicts(filter_default(V, function(d) {
801
+ return !d.indegree;
802
+ }));
803
+ }
804
+ function doResolveConflicts(d) {
805
+ var B = [];
806
+ function V(d) {
807
+ return function(B) {
808
+ B.merged || (isUndefined_default(B.barycenter) || isUndefined_default(d.barycenter) || B.barycenter >= d.barycenter) && mergeEntries(d, B);
809
+ };
810
+ }
811
+ function H(B) {
812
+ return function(V) {
813
+ V.in.push(B), --V.indegree === 0 && d.push(V);
814
+ };
815
+ }
816
+ for (; d.length;) {
817
+ var U = d.pop();
818
+ B.push(U), forEach_default(U.in.reverse(), V(U)), forEach_default(U.out, H(U));
819
+ }
820
+ return map_default(filter_default(B, function(d) {
821
+ return !d.merged;
822
+ }), function(d) {
823
+ return pick_default(d, [
824
+ "vs",
825
+ "i",
826
+ "barycenter",
827
+ "weight"
828
+ ]);
829
+ });
830
+ }
831
+ function mergeEntries(d, B) {
832
+ var V = 0, H = 0;
833
+ d.weight && (V += d.barycenter * d.weight, H += d.weight), B.weight && (V += B.barycenter * B.weight, H += B.weight), d.vs = B.vs.concat(d.vs), d.barycenter = V / H, d.weight = H, d.i = Math.min(B.i, d.i), B.merged = !0;
834
+ }
835
+ function sort(d, B) {
836
+ var V = partition(d, function(d) {
837
+ return Object.prototype.hasOwnProperty.call(d, "barycenter");
838
+ }), H = V.lhs, U = sortBy_default(V.rhs, function(d) {
839
+ return -d.i;
840
+ }), W = [], G = 0, K = 0, q = 0;
841
+ H.sort(compareWithBias(!!B)), q = consumeUnsortable(W, U, q), forEach_default(H, function(d) {
842
+ q += d.vs.length, W.push(d.vs), G += d.barycenter * d.weight, K += d.weight, q = consumeUnsortable(W, U, q);
843
+ });
844
+ var J = { vs: flatten_default(W) };
845
+ return K && (J.barycenter = G / K, J.weight = K), J;
846
+ }
847
+ function consumeUnsortable(d, B, V) {
848
+ for (var H; B.length && (H = last_default(B)).i <= V;) B.pop(), d.push(H.vs), V++;
849
+ return V;
850
+ }
851
+ function compareWithBias(d) {
852
+ return function(B, V) {
853
+ return B.barycenter < V.barycenter ? -1 : B.barycenter > V.barycenter ? 1 : d ? V.i - B.i : B.i - V.i;
854
+ };
855
+ }
856
+ function sortSubgraph(d, B, V, H) {
857
+ var U = d.children(B), W = d.node(B), G = W ? W.borderLeft : void 0, K = W ? W.borderRight : void 0, q = {};
858
+ G && (U = filter_default(U, function(d) {
859
+ return d !== G && d !== K;
860
+ }));
861
+ var J = barycenter(d, U);
862
+ forEach_default(J, function(B) {
863
+ if (d.children(B.v).length) {
864
+ var U = sortSubgraph(d, B.v, V, H);
865
+ q[B.v] = U, Object.prototype.hasOwnProperty.call(U, "barycenter") && mergeBarycenters(B, U);
866
+ }
867
+ });
868
+ var Y = resolveConflicts(J, V);
869
+ expandSubgraphs(Y, q);
870
+ var X = sort(Y, H);
871
+ if (G && (X.vs = flatten_default([
872
+ G,
873
+ X.vs,
874
+ K
875
+ ]), d.predecessors(G).length)) {
876
+ var Z = d.node(d.predecessors(G)[0]), Q = d.node(d.predecessors(K)[0]);
877
+ Object.prototype.hasOwnProperty.call(X, "barycenter") || (X.barycenter = 0, X.weight = 0), X.barycenter = (X.barycenter * X.weight + Z.order + Q.order) / (X.weight + 2), X.weight += 2;
878
+ }
879
+ return X;
880
+ }
881
+ function expandSubgraphs(d, B) {
882
+ forEach_default(d, function(d) {
883
+ d.vs = flatten_default(d.vs.map(function(d) {
884
+ return B[d] ? B[d].vs : d;
885
+ }));
886
+ });
887
+ }
888
+ function mergeBarycenters(d, B) {
889
+ isUndefined_default(d.barycenter) ? (d.barycenter = B.barycenter, d.weight = B.weight) : (d.barycenter = (d.barycenter * d.weight + B.barycenter * B.weight) / (d.weight + B.weight), d.weight += B.weight);
890
+ }
891
+ function order(d) {
892
+ var B = maxRank(d), V = buildLayerGraphs(d, range_default(1, B + 1), "inEdges"), H = buildLayerGraphs(d, range_default(B - 1, -1, -1), "outEdges"), U = initOrder(d);
893
+ assignOrder(d, U);
894
+ for (var W = Infinity, G, K = 0, q = 0; q < 4; ++K, ++q) {
895
+ sweepLayerGraphs(K % 2 ? V : H, K % 4 >= 2), U = buildLayerMatrix(d);
896
+ var J = crossCount(d, U);
897
+ J < W && (q = 0, G = cloneDeep_default(U), W = J);
898
+ }
899
+ assignOrder(d, G);
900
+ }
901
+ function buildLayerGraphs(d, B, V) {
902
+ return map_default(B, function(B) {
903
+ return buildLayerGraph(d, B, V);
904
+ });
905
+ }
906
+ function sweepLayerGraphs(d, B) {
907
+ var V = new Graph();
908
+ forEach_default(d, function(d) {
909
+ var H = d.graph().root, U = sortSubgraph(d, H, V, B);
910
+ forEach_default(U.vs, function(B, V) {
911
+ d.node(B).order = V;
912
+ }), addSubgraphConstraints(d, V, U.vs);
913
+ });
914
+ }
915
+ function assignOrder(d, B) {
916
+ forEach_default(B, function(B) {
917
+ forEach_default(B, function(B, V) {
918
+ d.node(B).order = V;
919
+ });
920
+ });
921
+ }
922
+ function parentDummyChains(d) {
923
+ var B = postorder(d);
924
+ forEach_default(d.graph().dummyChains, function(V) {
925
+ for (var H = d.node(V), U = H.edgeObj, W = findPath(d, B, U.v, U.w), G = W.path, K = W.lca, q = 0, J = G[q], Y = !0; V !== U.w;) {
926
+ if (H = d.node(V), Y) {
927
+ for (; (J = G[q]) !== K && d.node(J).maxRank < H.rank;) q++;
928
+ J === K && (Y = !1);
929
+ }
930
+ if (!Y) {
931
+ for (; q < G.length - 1 && d.node(J = G[q + 1]).minRank <= H.rank;) q++;
932
+ J = G[q];
933
+ }
934
+ d.setParent(V, J), V = d.successors(V)[0];
935
+ }
936
+ });
937
+ }
938
+ function findPath(d, B, V, H) {
939
+ var U = [], W = [], G = Math.min(B[V].low, B[H].low), K = Math.max(B[V].lim, B[H].lim), q = V, J;
940
+ do
941
+ q = d.parent(q), U.push(q);
942
+ while (q && (B[q].low > G || K > B[q].lim));
943
+ for (J = q, q = H; (q = d.parent(q)) !== J;) W.push(q);
944
+ return {
945
+ path: U.concat(W.reverse()),
946
+ lca: J
947
+ };
948
+ }
949
+ function postorder(d) {
950
+ var B = {}, V = 0;
951
+ function H(U) {
952
+ var W = V;
953
+ forEach_default(d.children(U), H), B[U] = {
954
+ low: W,
955
+ lim: V++
956
+ };
957
+ }
958
+ return forEach_default(d.children(), H), B;
959
+ }
960
+ function findType1Conflicts(d, B) {
961
+ var V = {};
962
+ function H(B, H) {
963
+ var U = 0, W = 0, G = B.length, K = last_default(H);
964
+ return forEach_default(H, function(B, q) {
965
+ var J = findOtherInnerSegmentNode(d, B), Y = J ? d.node(J).order : G;
966
+ (J || B === K) && (forEach_default(H.slice(W, q + 1), function(B) {
967
+ forEach_default(d.predecessors(B), function(H) {
968
+ var W = d.node(H), G = W.order;
969
+ (G < U || Y < G) && !(W.dummy && d.node(B).dummy) && addConflict(V, H, B);
970
+ });
971
+ }), W = q + 1, U = Y);
972
+ }), H;
973
+ }
974
+ return reduce_default(B, H), V;
975
+ }
976
+ function findType2Conflicts(d, B) {
977
+ var V = {};
978
+ function H(B, H, U, W, G) {
979
+ var K;
980
+ forEach_default(range_default(H, U), function(H) {
981
+ K = B[H], d.node(K).dummy && forEach_default(d.predecessors(K), function(B) {
982
+ var H = d.node(B);
983
+ H.dummy && (H.order < W || H.order > G) && addConflict(V, B, K);
984
+ });
985
+ });
986
+ }
987
+ function U(B, V) {
988
+ var U = -1, W, G = 0;
989
+ return forEach_default(V, function(K, q) {
990
+ if (d.node(K).dummy === "border") {
991
+ var J = d.predecessors(K);
992
+ J.length && (W = d.node(J[0]).order, H(V, G, q, U, W), G = q, U = W);
993
+ }
994
+ H(V, G, V.length, W, B.length);
995
+ }), V;
996
+ }
997
+ return reduce_default(B, U), V;
998
+ }
999
+ function findOtherInnerSegmentNode(d, B) {
1000
+ if (d.node(B).dummy) return find_default(d.predecessors(B), function(B) {
1001
+ return d.node(B).dummy;
1002
+ });
1003
+ }
1004
+ function addConflict(d, B, V) {
1005
+ if (B > V) {
1006
+ var H = B;
1007
+ B = V, V = H;
1008
+ }
1009
+ Object.prototype.hasOwnProperty.call(d, B) || Object.defineProperty(d, B, {
1010
+ enumerable: !0,
1011
+ configurable: !0,
1012
+ value: {},
1013
+ writable: !0
1014
+ });
1015
+ var U = d[B];
1016
+ Object.defineProperty(U, V, {
1017
+ enumerable: !0,
1018
+ configurable: !0,
1019
+ value: !0,
1020
+ writable: !0
1021
+ });
1022
+ }
1023
+ function hasConflict(d, B, V) {
1024
+ if (B > V) {
1025
+ var H = B;
1026
+ B = V, V = H;
1027
+ }
1028
+ return !!d[B] && Object.prototype.hasOwnProperty.call(d[B], V);
1029
+ }
1030
+ function verticalAlignment(d, B, V, H) {
1031
+ var U = {}, W = {}, G = {};
1032
+ return forEach_default(B, function(d) {
1033
+ forEach_default(d, function(d, B) {
1034
+ U[d] = d, W[d] = d, G[d] = B;
1035
+ });
1036
+ }), forEach_default(B, function(d) {
1037
+ var B = -1;
1038
+ forEach_default(d, function(d) {
1039
+ var K = H(d);
1040
+ if (K.length) {
1041
+ K = sortBy_default(K, function(d) {
1042
+ return G[d];
1043
+ });
1044
+ for (var q = (K.length - 1) / 2, J = Math.floor(q), Y = Math.ceil(q); J <= Y; ++J) {
1045
+ var X = K[J];
1046
+ W[d] === d && B < G[X] && !hasConflict(V, d, X) && (W[X] = d, W[d] = U[d] = U[X], B = G[X]);
1047
+ }
1048
+ }
1049
+ });
1050
+ }), {
1051
+ root: U,
1052
+ align: W
1053
+ };
1054
+ }
1055
+ function horizontalCompaction(d, B, V, H, U) {
1056
+ var W = {}, G = buildBlockGraph(d, B, V, U), K = U ? "borderLeft" : "borderRight";
1057
+ function q(d, B) {
1058
+ for (var V = G.nodes(), H = V.pop(), U = {}; H;) U[H] ? d(H) : (U[H] = !0, V.push(H), V = V.concat(B(H))), H = V.pop();
1059
+ }
1060
+ function J(d) {
1061
+ W[d] = G.inEdges(d).reduce(function(d, B) {
1062
+ return Math.max(d, W[B.v] + G.edge(B));
1063
+ }, 0);
1064
+ }
1065
+ function Y(B) {
1066
+ var V = G.outEdges(B).reduce(function(d, B) {
1067
+ return Math.min(d, W[B.w] - G.edge(B));
1068
+ }, Infinity), H = d.node(B);
1069
+ V !== Infinity && H.borderType !== K && (W[B] = Math.max(W[B], V));
1070
+ }
1071
+ return q(J, G.predecessors.bind(G)), q(Y, G.successors.bind(G)), forEach_default(H, function(d) {
1072
+ W[d] = W[V[d]];
1073
+ }), W;
1074
+ }
1075
+ function buildBlockGraph(d, B, V, H) {
1076
+ var U = new Graph(), W = d.graph(), G = sep(W.nodesep, W.edgesep, H);
1077
+ return forEach_default(B, function(B) {
1078
+ var H;
1079
+ forEach_default(B, function(B) {
1080
+ var W = V[B];
1081
+ if (U.setNode(W), H) {
1082
+ var K = V[H], q = U.edge(K, W);
1083
+ U.setEdge(K, W, Math.max(G(d, B, H), q || 0));
1084
+ }
1085
+ H = B;
1086
+ });
1087
+ }), U;
1088
+ }
1089
+ function findSmallestWidthAlignment(d, B) {
1090
+ return minBy_default(values_default(B), function(B) {
1091
+ var V = -Infinity, H = Infinity;
1092
+ return forIn_default(B, function(B, U) {
1093
+ var W = width(d, U) / 2;
1094
+ V = Math.max(B + W, V), H = Math.min(B - W, H);
1095
+ }), V - H;
1096
+ });
1097
+ }
1098
+ function alignCoordinates(d, B) {
1099
+ var V = values_default(B), H = min_default(V), U = max_default(V);
1100
+ forEach_default(["u", "d"], function(V) {
1101
+ forEach_default(["l", "r"], function(W) {
1102
+ var G = V + W, K = d[G], q;
1103
+ if (K !== B) {
1104
+ var J = values_default(K);
1105
+ q = W === "l" ? H - min_default(J) : U - max_default(J), q && (d[G] = mapValues_default(K, function(d) {
1106
+ return d + q;
1107
+ }));
1108
+ }
1109
+ });
1110
+ });
1111
+ }
1112
+ function balance(d, B) {
1113
+ return mapValues_default(d.ul, function(V, H) {
1114
+ if (B) return d[B.toLowerCase()][H];
1115
+ var U = sortBy_default(map_default(d, H));
1116
+ return (U[1] + U[2]) / 2;
1117
+ });
1118
+ }
1119
+ function positionX(d) {
1120
+ var B = buildLayerMatrix(d), V = merge_default(findType1Conflicts(d, B), findType2Conflicts(d, B)), H = {}, U;
1121
+ return forEach_default(["u", "d"], function(W) {
1122
+ U = W === "u" ? B : values_default(B).reverse(), forEach_default(["l", "r"], function(B) {
1123
+ B === "r" && (U = map_default(U, function(d) {
1124
+ return values_default(d).reverse();
1125
+ }));
1126
+ var G = (W === "u" ? d.predecessors : d.successors).bind(d), K = verticalAlignment(d, U, V, G), q = horizontalCompaction(d, U, K.root, K.align, B === "r");
1127
+ B === "r" && (q = mapValues_default(q, function(d) {
1128
+ return -d;
1129
+ })), H[W + B] = q;
1130
+ });
1131
+ }), alignCoordinates(H, findSmallestWidthAlignment(d, H)), balance(H, d.graph().align);
1132
+ }
1133
+ function sep(d, B, V) {
1134
+ return function(H, U, W) {
1135
+ var G = H.node(U), K = H.node(W), q = 0, J;
1136
+ if (q += G.width / 2, Object.prototype.hasOwnProperty.call(G, "labelpos")) switch (G.labelpos.toLowerCase()) {
1137
+ case "l":
1138
+ J = -G.width / 2;
1139
+ break;
1140
+ case "r":
1141
+ J = G.width / 2;
1142
+ break;
1143
+ }
1144
+ if (J && (q += V ? J : -J), J = 0, q += (G.dummy ? B : d) / 2, q += (K.dummy ? B : d) / 2, q += K.width / 2, Object.prototype.hasOwnProperty.call(K, "labelpos")) switch (K.labelpos.toLowerCase()) {
1145
+ case "l":
1146
+ J = K.width / 2;
1147
+ break;
1148
+ case "r":
1149
+ J = -K.width / 2;
1150
+ break;
1151
+ }
1152
+ return J && (q += V ? J : -J), J = 0, q;
1153
+ };
1154
+ }
1155
+ function width(d, B) {
1156
+ return d.node(B).width;
1157
+ }
1158
+ function position(d) {
1159
+ d = asNonCompoundGraph(d), positionY(d), forOwn_default(positionX(d), function(B, V) {
1160
+ d.node(V).x = B;
1161
+ });
1162
+ }
1163
+ function positionY(d) {
1164
+ var B = buildLayerMatrix(d), V = d.graph().ranksep, H = 0;
1165
+ forEach_default(B, function(B) {
1166
+ var U = max_default(map_default(B, function(B) {
1167
+ return d.node(B).height;
1168
+ }));
1169
+ forEach_default(B, function(B) {
1170
+ d.node(B).y = H + U / 2;
1171
+ }), H += U + V;
1172
+ });
1173
+ }
1174
+ function layout(d, B) {
1175
+ var V = B && B.debugTiming ? time : notime;
1176
+ V("layout", () => {
1177
+ var B = V(" buildLayoutGraph", () => buildLayoutGraph(d));
1178
+ V(" runLayout", () => runLayout(B, V)), V(" updateInputGraph", () => updateInputGraph(d, B));
1179
+ });
1180
+ }
1181
+ function runLayout(d, B) {
1182
+ B(" makeSpaceForEdgeLabels", () => makeSpaceForEdgeLabels(d)), B(" removeSelfEdges", () => removeSelfEdges(d)), B(" acyclic", () => run$2(d)), B(" nestingGraph.run", () => run(d)), B(" rank", () => rank(asNonCompoundGraph(d))), B(" injectEdgeLabelProxies", () => injectEdgeLabelProxies(d)), B(" removeEmptyRanks", () => removeEmptyRanks(d)), B(" nestingGraph.cleanup", () => cleanup(d)), B(" normalizeRanks", () => normalizeRanks(d)), B(" assignRankMinMax", () => assignRankMinMax(d)), B(" removeEdgeLabelProxies", () => removeEdgeLabelProxies(d)), B(" normalize.run", () => run$1(d)), B(" parentDummyChains", () => parentDummyChains(d)), B(" addBorderSegments", () => addBorderSegments(d)), B(" order", () => order(d)), B(" insertSelfEdges", () => insertSelfEdges(d)), B(" adjustCoordinateSystem", () => adjust(d)), B(" position", () => position(d)), B(" positionSelfEdges", () => positionSelfEdges(d)), B(" removeBorderNodes", () => removeBorderNodes(d)), B(" normalize.undo", () => undo(d)), B(" fixupEdgeLabelCoords", () => fixupEdgeLabelCoords(d)), B(" undoCoordinateSystem", () => undo$1(d)), B(" translateGraph", () => translateGraph(d)), B(" assignNodeIntersects", () => assignNodeIntersects(d)), B(" reversePoints", () => reversePointsForReversedEdges(d)), B(" acyclic.undo", () => undo$2(d));
1183
+ }
1184
+ function updateInputGraph(d, B) {
1185
+ forEach_default(d.nodes(), function(V) {
1186
+ var H = d.node(V), U = B.node(V);
1187
+ H && (H.x = U.x, H.y = U.y, B.children(V).length && (H.width = U.width, H.height = U.height));
1188
+ }), forEach_default(d.edges(), function(V) {
1189
+ var H = d.edge(V), U = B.edge(V);
1190
+ H.points = U.points, Object.prototype.hasOwnProperty.call(U, "x") && (H.x = U.x, H.y = U.y);
1191
+ }), d.graph().width = B.graph().width, d.graph().height = B.graph().height;
1192
+ }
1193
+ var graphNumAttrs = [
1194
+ "nodesep",
1195
+ "edgesep",
1196
+ "ranksep",
1197
+ "marginx",
1198
+ "marginy"
1199
+ ], graphDefaults = {
1200
+ ranksep: 50,
1201
+ edgesep: 20,
1202
+ nodesep: 50,
1203
+ rankdir: "tb"
1204
+ }, graphAttrs = [
1205
+ "acyclicer",
1206
+ "ranker",
1207
+ "rankdir",
1208
+ "align"
1209
+ ], nodeNumAttrs = ["width", "height"], nodeDefaults = {
1210
+ width: 0,
1211
+ height: 0
1212
+ }, edgeNumAttrs = [
1213
+ "minlen",
1214
+ "weight",
1215
+ "width",
1216
+ "height",
1217
+ "labeloffset"
1218
+ ], edgeDefaults = {
1219
+ minlen: 1,
1220
+ weight: 1,
1221
+ width: 0,
1222
+ height: 0,
1223
+ labeloffset: 10,
1224
+ labelpos: "r"
1225
+ }, edgeAttrs = ["labelpos"];
1226
+ function buildLayoutGraph(d) {
1227
+ var B = new Graph({
1228
+ multigraph: !0,
1229
+ compound: !0
1230
+ }), V = canonicalize(d.graph());
1231
+ return B.setGraph(merge_default({}, graphDefaults, selectNumberAttrs(V, graphNumAttrs), pick_default(V, graphAttrs))), forEach_default(d.nodes(), function(V) {
1232
+ var H = canonicalize(d.node(V));
1233
+ B.setNode(V, defaults_default(selectNumberAttrs(H, nodeNumAttrs), nodeDefaults)), B.setParent(V, d.parent(V));
1234
+ }), forEach_default(d.edges(), function(V) {
1235
+ var H = canonicalize(d.edge(V));
1236
+ B.setEdge(V, merge_default({}, edgeDefaults, selectNumberAttrs(H, edgeNumAttrs), pick_default(H, edgeAttrs)));
1237
+ }), B;
1238
+ }
1239
+ function makeSpaceForEdgeLabels(d) {
1240
+ var B = d.graph();
1241
+ B.ranksep /= 2, forEach_default(d.edges(), function(V) {
1242
+ var H = d.edge(V);
1243
+ H.minlen *= 2, H.labelpos.toLowerCase() !== "c" && (B.rankdir === "TB" || B.rankdir === "BT" ? H.width += H.labeloffset : H.height += H.labeloffset);
1244
+ });
1245
+ }
1246
+ function injectEdgeLabelProxies(d) {
1247
+ forEach_default(d.edges(), function(B) {
1248
+ var V = d.edge(B);
1249
+ if (V.width && V.height) {
1250
+ var H = d.node(B.v);
1251
+ addDummyNode(d, "edge-proxy", {
1252
+ rank: (d.node(B.w).rank - H.rank) / 2 + H.rank,
1253
+ e: B
1254
+ }, "_ep");
1255
+ }
1256
+ });
1257
+ }
1258
+ function assignRankMinMax(d) {
1259
+ var B = 0;
1260
+ forEach_default(d.nodes(), function(V) {
1261
+ var H = d.node(V);
1262
+ H.borderTop && (H.minRank = d.node(H.borderTop).rank, H.maxRank = d.node(H.borderBottom).rank, B = max_default(B, H.maxRank));
1263
+ }), d.graph().maxRank = B;
1264
+ }
1265
+ function removeEdgeLabelProxies(d) {
1266
+ forEach_default(d.nodes(), function(B) {
1267
+ var V = d.node(B);
1268
+ V.dummy === "edge-proxy" && (d.edge(V.e).labelRank = V.rank, d.removeNode(B));
1269
+ });
1270
+ }
1271
+ function translateGraph(d) {
1272
+ var B = Infinity, V = 0, H = Infinity, U = 0, W = d.graph(), G = W.marginx || 0, K = W.marginy || 0;
1273
+ function q(d) {
1274
+ var W = d.x, G = d.y, K = d.width, q = d.height;
1275
+ B = Math.min(B, W - K / 2), V = Math.max(V, W + K / 2), H = Math.min(H, G - q / 2), U = Math.max(U, G + q / 2);
1276
+ }
1277
+ forEach_default(d.nodes(), function(B) {
1278
+ q(d.node(B));
1279
+ }), forEach_default(d.edges(), function(B) {
1280
+ var V = d.edge(B);
1281
+ Object.prototype.hasOwnProperty.call(V, "x") && q(V);
1282
+ }), B -= G, H -= K, forEach_default(d.nodes(), function(V) {
1283
+ var U = d.node(V);
1284
+ U.x -= B, U.y -= H;
1285
+ }), forEach_default(d.edges(), function(V) {
1286
+ var U = d.edge(V);
1287
+ forEach_default(U.points, function(d) {
1288
+ d.x -= B, d.y -= H;
1289
+ }), Object.prototype.hasOwnProperty.call(U, "x") && (U.x -= B), Object.prototype.hasOwnProperty.call(U, "y") && (U.y -= H);
1290
+ }), W.width = V - B + G, W.height = U - H + K;
1291
+ }
1292
+ function assignNodeIntersects(d) {
1293
+ forEach_default(d.edges(), function(B) {
1294
+ var V = d.edge(B), H = d.node(B.v), U = d.node(B.w), W, G;
1295
+ V.points ? (W = V.points[0], G = V.points[V.points.length - 1]) : (V.points = [], W = U, G = H), V.points.unshift(intersectRect(H, W)), V.points.push(intersectRect(U, G));
1296
+ });
1297
+ }
1298
+ function fixupEdgeLabelCoords(d) {
1299
+ forEach_default(d.edges(), function(B) {
1300
+ var V = d.edge(B);
1301
+ if (Object.prototype.hasOwnProperty.call(V, "x")) switch ((V.labelpos === "l" || V.labelpos === "r") && (V.width -= V.labeloffset), V.labelpos) {
1302
+ case "l":
1303
+ V.x -= V.width / 2 + V.labeloffset;
1304
+ break;
1305
+ case "r":
1306
+ V.x += V.width / 2 + V.labeloffset;
1307
+ break;
1308
+ }
1309
+ });
1310
+ }
1311
+ function reversePointsForReversedEdges(d) {
1312
+ forEach_default(d.edges(), function(B) {
1313
+ var V = d.edge(B);
1314
+ V.reversed && V.points.reverse();
1315
+ });
1316
+ }
1317
+ function removeBorderNodes(d) {
1318
+ forEach_default(d.nodes(), function(B) {
1319
+ if (d.children(B).length) {
1320
+ var V = d.node(B), H = d.node(V.borderTop), U = d.node(V.borderBottom), W = d.node(last_default(V.borderLeft)), G = d.node(last_default(V.borderRight));
1321
+ V.width = Math.abs(G.x - W.x), V.height = Math.abs(U.y - H.y), V.x = W.x + V.width / 2, V.y = H.y + V.height / 2;
1322
+ }
1323
+ }), forEach_default(d.nodes(), function(B) {
1324
+ d.node(B).dummy === "border" && d.removeNode(B);
1325
+ });
1326
+ }
1327
+ function removeSelfEdges(d) {
1328
+ forEach_default(d.edges(), function(B) {
1329
+ if (B.v === B.w) {
1330
+ var V = d.node(B.v);
1331
+ V.selfEdges ||= [], V.selfEdges.push({
1332
+ e: B,
1333
+ label: d.edge(B)
1334
+ }), d.removeEdge(B);
1335
+ }
1336
+ });
1337
+ }
1338
+ function insertSelfEdges(d) {
1339
+ forEach_default(buildLayerMatrix(d), function(B) {
1340
+ var V = 0;
1341
+ forEach_default(B, function(B, H) {
1342
+ var U = d.node(B);
1343
+ U.order = H + V, forEach_default(U.selfEdges, function(B) {
1344
+ addDummyNode(d, "selfedge", {
1345
+ width: B.label.width,
1346
+ height: B.label.height,
1347
+ rank: U.rank,
1348
+ order: H + ++V,
1349
+ e: B.e,
1350
+ label: B.label
1351
+ }, "_se");
1352
+ }), delete U.selfEdges;
1353
+ });
1354
+ });
1355
+ }
1356
+ function positionSelfEdges(d) {
1357
+ forEach_default(d.nodes(), function(B) {
1358
+ var V = d.node(B);
1359
+ if (V.dummy === "selfedge") {
1360
+ var H = d.node(V.e.v), U = H.x + H.width / 2, W = H.y, G = V.x - U, K = H.height / 2;
1361
+ d.setEdge(V.e, V.label), d.removeNode(B), V.label.points = [
1362
+ {
1363
+ x: U + 2 * G / 3,
1364
+ y: W - K
1365
+ },
1366
+ {
1367
+ x: U + 5 * G / 6,
1368
+ y: W - K
1369
+ },
1370
+ {
1371
+ x: U + G,
1372
+ y: W
1373
+ },
1374
+ {
1375
+ x: U + 5 * G / 6,
1376
+ y: W + K
1377
+ },
1378
+ {
1379
+ x: U + 2 * G / 3,
1380
+ y: W + K
1381
+ }
1382
+ ], V.label.x = V.x, V.label.y = V.y;
1383
+ }
1384
+ });
1385
+ }
1386
+ function selectNumberAttrs(d, B) {
1387
+ return mapValues_default(pick_default(d, B), Number);
1388
+ }
1389
+ function canonicalize(d) {
1390
+ var B = {};
1391
+ return forEach_default(d, function(d, V) {
1392
+ B[V.toLowerCase()] = d;
1393
+ }), B;
1394
+ }
1395
+ export { layout as t };