@vunk/plus 1.10.1 → 1.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/components/WebGLRenderer.mjs +1 -1
  2. package/components/WebGPURenderer.mjs +1 -1
  3. package/components/agent-chat-provider/index.mjs +1 -1
  4. package/components/avatar/index.mjs +1 -1
  5. package/components/broadcasting-markdown/index.mjs +16 -13
  6. package/components/broadcasting-markdown/src/index.vue.d.ts +1 -75
  7. package/components/browserAll.mjs +1 -1
  8. package/components/bubble-list/index.css +0 -22
  9. package/components/bubble-list/index.mjs +413 -9
  10. package/components/bubble-templates/index.mjs +1 -1
  11. package/components/chat-independent/index.mjs +1 -1
  12. package/components/drawer/index.css +92 -92
  13. package/components/drawer/index.mjs +2 -2
  14. package/components/index2.mjs +90 -11
  15. package/components/index3.mjs +20 -79450
  16. package/components/lottie-animation/index.mjs +1 -1
  17. package/components/metahuman-broadcasting/index.d.ts +0 -1
  18. package/components/metahuman-broadcasting/index.mjs +3092 -68
  19. package/components/metahuman-broadcasting/src/index.vue.d.ts +75 -191
  20. package/components/monaco-editor/index.mjs +1 -1
  21. package/components/monaco-environment/index.mjs +1 -1
  22. package/components/pixi-frame/index.d.ts +4 -1
  23. package/components/pixi-frame/index.mjs +2 -2
  24. package/components/pixi-frame/src/bitmap-generator.vue.d.ts +146 -0
  25. package/components/recorder-button/index.mjs +1 -1
  26. package/components/routes-menu-content/index.mjs +3 -3
  27. package/components/scrollbar/index.mjs +3 -3
  28. package/components/sender/index.mjs +2 -2
  29. package/components/speech-button/index.mjs +3 -3
  30. package/components/table-columns/index.mjs +1 -1
  31. package/components/tables-v1/index.mjs +1 -1
  32. package/components/tables-v1-checkbox/index.mjs +1 -1
  33. package/components/text/index.mjs +1 -1
  34. package/components/typing-markdown/index.mjs +1 -1
  35. package/components/vditor/index.mjs +3 -3
  36. package/components/webworkerAll.mjs +1 -1
  37. package/components/xgplayer/index.mjs +4 -16359
  38. package/icons/end/index.mjs +1 -1
  39. package/icons/keyboard/index.mjs +1 -1
  40. package/icons/start/index.mjs +1 -1
  41. package/icons/voice/index.mjs +1 -1
  42. package/index.css +92 -114
  43. package/package.json +4 -20
  44. package/shared/data/blobToAudioBuffer.d.ts +1 -0
  45. package/shared/data/imgUrlToBitmap.d.ts +1 -0
  46. package/shared/data/index.d.ts +2 -0
  47. package/shared/data/index.mjs +25 -0
  48. package/components/_baseUniq-BXtq6_NW.mjs +0 -239
  49. package/components/abap-B7h4dtBh.mjs +0 -6
  50. package/components/actionscript-3-Bmm7RA3Y.mjs +0 -6
  51. package/components/ada-BZS802Se.mjs +0 -6
  52. package/components/andromeeda-CrngpmZk.mjs +0 -3
  53. package/components/apache-D4roVlsU.mjs +0 -6
  54. package/components/apex-D6mfw0H5.mjs +0 -6
  55. package/components/apl-DDK-VObo.mjs +0 -18
  56. package/components/applescript-C43Knf0G.mjs +0 -6
  57. package/components/ara-DRBH84ND.mjs +0 -6
  58. package/components/arc-Js_tyW10.mjs +0 -131
  59. package/components/architecture-O4VJ6CD3-ZoZ2IAk2.mjs +0 -15
  60. package/components/architectureDiagram-SUXI7LT5-kyYGGrHN.mjs +0 -8678
  61. package/components/asm-3tg4MVib.mjs +0 -6
  62. package/components/astro-v4FYbRud.mjs +0 -19
  63. package/components/aurora-x-wJ4-eM2h.mjs +0 -3
  64. package/components/awk-ChreaG-G.mjs +0 -6
  65. package/components/ayu-dark-BEKp3oqs.mjs +0 -3
  66. package/components/ballerina-B0yt0TYU.mjs +0 -6
  67. package/components/batch-Ce_EX3Sx.mjs +0 -14
  68. package/components/beancount-BRIsdQEB.mjs +0 -6
  69. package/components/berry-Brv4WWdL.mjs +0 -14
  70. package/components/bibtex-BLeFwAes.mjs +0 -6
  71. package/components/bicep-BVrgfErX.mjs +0 -6
  72. package/components/blade-By3Sw_Ex.mjs +0 -22
  73. package/components/blockDiagram-6J76NXCF-IAr4zDV3.mjs +0 -3610
  74. package/components/c-C4VtT7JA.mjs +0 -6
  75. package/components/c4Diagram-6F6E4RAY-Dv27rXcJ.mjs +0 -2492
  76. package/components/catppuccin-frappe-zLMNRRUx.mjs +0 -3
  77. package/components/catppuccin-latte-CdF5jC3c.mjs +0 -3
  78. package/components/catppuccin-macchiato-DyjXeyRt.mjs +0 -3
  79. package/components/catppuccin-mocha-66IdYxR8.mjs +0 -3
  80. package/components/cdc-30ktANo3.mjs +0 -14
  81. package/components/channel-BBZy6zOT.mjs +0 -7
  82. package/components/chunk-353BL4L5-Dn_Y_Yna.mjs +0 -17
  83. package/components/chunk-67H74DCK-Br5U8bfD.mjs +0 -102
  84. package/components/chunk-AACKK3MU-DH_MKxca.mjs +0 -17
  85. package/components/chunk-BFAMUDN2-DHLCoYMN.mjs +0 -13
  86. package/components/chunk-E2GYISFI-DQPHyyga.mjs +0 -19
  87. package/components/chunk-OW32GOEJ-CQOSE6Bn.mjs +0 -1924
  88. package/components/chunk-SKB7J2MH-BlwHRDiW.mjs +0 -25
  89. package/components/chunk-SZ463SBG-DEp8buKJ.mjs +0 -1823
  90. package/components/clarity-6uBl6Vpb.mjs +0 -6
  91. package/components/classDiagram-M3E45YP4-D0ySDe-v.mjs +0 -32
  92. package/components/classDiagram-v2-YAWTLIQI-D0ySDe-v.mjs +0 -32
  93. package/components/clojure-COBRmwo8.mjs +0 -14
  94. package/components/clone-CEJtuQzg.mjs +0 -8
  95. package/components/cmake-CDfQILeU.mjs +0 -6
  96. package/components/cobol-BOOIiISO.mjs +0 -13
  97. package/components/coffee-DO_RGoZp.mjs +0 -9
  98. package/components/cpp-DAK8ktHO.mjs +0 -25
  99. package/components/crystal-CBGbbyVp.mjs +0 -19
  100. package/components/cs-h3ksD6-P.mjs +0 -14
  101. package/components/css-BtVcDqlU.mjs +0 -6
  102. package/components/cue-BFSVLV6N.mjs +0 -6
  103. package/components/cypher-Dl2CXoXF.mjs +0 -14
  104. package/components/cytoscape.esm-BojS1z60.mjs +0 -30216
  105. package/components/d-9qSZPw74.mjs +0 -6
  106. package/components/dagre-JOIXM2OF-5zx0JY2T.mjs +0 -707
  107. package/components/dark-plus-DmZ1Dzd4.mjs +0 -3
  108. package/components/dart-CCSsOg9l.mjs +0 -6
  109. package/components/dax-CvsmLV-B.mjs +0 -6
  110. package/components/defaultLocale-DVr69WTU.mjs +0 -202
  111. package/components/diagram-5UYTHUR4-C19nyAKc.mjs +0 -215
  112. package/components/diagram-VMROVX33-DkGwo-hj.mjs +0 -861
  113. package/components/diagram-ZTM2IBQH-CBgHCu9L.mjs +0 -317
  114. package/components/diff-BEdzuHlE.mjs +0 -6
  115. package/components/dockerfile-B3DP334t.mjs +0 -14
  116. package/components/dracula-B8-AVrwI.mjs +0 -3
  117. package/components/dracula-soft-BHeefow7.mjs +0 -3
  118. package/components/dream-maker-CNLQpoF-.mjs +0 -6
  119. package/components/elixir-0rTCSSfp.mjs +0 -11
  120. package/components/elm-BhwiZPvf.mjs +0 -10
  121. package/components/erDiagram-3M52JZNH-cttdAJXW.mjs +0 -1169
  122. package/components/erb-Lra8TlYM.mjs +0 -27
  123. package/components/erlang-D2NNgvtR.mjs +0 -17
  124. package/components/everforest-dark-Cg1xdODP.mjs +0 -3
  125. package/components/everforest-light-BmTD3bxe.mjs +0 -3
  126. package/components/fish-BU5HSdZy.mjs +0 -6
  127. package/components/flowDiagram-KYDEHFYC-9HpsqDdB.mjs +0 -2345
  128. package/components/fs-CdBSddpF.mjs +0 -17
  129. package/components/ganttDiagram-EK5VF46D-8QB3ofs6.mjs +0 -3497
  130. package/components/gdresource-CAbkn6H_.mjs +0 -11
  131. package/components/gdscript-Be_cubqt.mjs +0 -6
  132. package/components/gdshader-BEzE4j_3.mjs +0 -6
  133. package/components/gherkin-xCNF9gh8.mjs +0 -6
  134. package/components/git-commit-PP9xCApN.mjs +0 -9
  135. package/components/git-rebase-DqdGofLo.mjs +0 -9
  136. package/components/gitGraph-ZV4HHKMB-BSmtVGRu.mjs +0 -15
  137. package/components/gitGraphDiagram-GW3U2K7C-DNzc0Vx_.mjs +0 -1227
  138. package/components/github-dark-O22yVQaY.mjs +0 -3
  139. package/components/github-dark-default-DB2Hkvqn.mjs +0 -3
  140. package/components/github-dark-dimmed-CMZ_OfqC.mjs +0 -3
  141. package/components/github-dark-high-contrast-DmxWVmCU.mjs +0 -3
  142. package/components/github-light-BTbR9xVK.mjs +0 -3
  143. package/components/github-light-default-DWEonwFe.mjs +0 -3
  144. package/components/github-light-high-contrast-WJ_cPDts.mjs +0 -3
  145. package/components/glimmer-js-BkPYTyD4.mjs +0 -23
  146. package/components/glsl-CGsiYPcu.mjs +0 -9
  147. package/components/gnuplot-tV8vezdE.mjs +0 -6
  148. package/components/go-CBmVHZBz.mjs +0 -6
  149. package/components/graph-3zJxsO-i.mjs +0 -425
  150. package/components/graphql-D4pgneW3.mjs +0 -15
  151. package/components/groovy-Bn4MhXgW.mjs +0 -6
  152. package/components/gruvbox-dark-hard-C89wZ4s3.mjs +0 -3
  153. package/components/gruvbox-dark-medium-swz85q_b.mjs +0 -3
  154. package/components/gruvbox-dark-soft-BYHBHQJW.mjs +0 -3
  155. package/components/gruvbox-light-hard-DEF_ZxYZ.mjs +0 -3
  156. package/components/gruvbox-light-medium-ziUMnHJx.mjs +0 -3
  157. package/components/gruvbox-light-soft-Cuwp0tsB.mjs +0 -3
  158. package/components/gts-d3WsqAZM.mjs +0 -23
  159. package/components/hack-CwaBuF5l.mjs +0 -13
  160. package/components/haml-gLijj4rW.mjs +0 -11
  161. package/components/hbs-CFi5SpI3.mjs +0 -23
  162. package/components/hcl-axoq0Ycu.mjs +0 -6
  163. package/components/hjson-I7LcauIB.mjs +0 -6
  164. package/components/hlsl-TRzjajlb.mjs +0 -6
  165. package/components/houston-CF_ws8Cq.mjs +0 -3
  166. package/components/hs-DXSGqUFF.mjs +0 -14
  167. package/components/html-CLq-n30c.mjs +0 -11
  168. package/components/html-derivative-C8POX8SL.mjs +0 -9
  169. package/components/http-BYUKZ6kX.mjs +0 -20
  170. package/components/imba-C4923lSV.mjs +0 -6
  171. package/components/index4.mjs +0 -78
  172. package/components/info-63CPKGFF-C8sYWczU.mjs +0 -15
  173. package/components/infoDiagram-LHK5PUON-C-vFFPTf.mjs +0 -44
  174. package/components/init-ZxktEp_H.mjs +0 -15
  175. package/components/java-BfXh-0uJ.mjs +0 -6
  176. package/components/jinja-html-BmW4v_vu.mjs +0 -11
  177. package/components/jison-C9kAT_Oj.mjs +0 -9
  178. package/components/journeyDiagram-EWQZEKCU-BJrw4-AG.mjs +0 -1264
  179. package/components/js-CN_xSsjU.mjs +0 -14
  180. package/components/json-TjWBGEk1.mjs +0 -6
  181. package/components/json5-DCGCKrmX.mjs +0 -6
  182. package/components/jsonc-DLVLp8id.mjs +0 -6
  183. package/components/jsonl-B-R_pDGg.mjs +0 -6
  184. package/components/jsonnet-Cs8BnnC6.mjs +0 -6
  185. package/components/jssm-D_YBQ_cM.mjs +0 -14
  186. package/components/jsx-BPmvoin2.mjs +0 -6
  187. package/components/julia-C-JjBobP.mjs +0 -19
  188. package/components/kanagawa-dragon-DU8n2NNT.mjs +0 -3
  189. package/components/kanagawa-lotus-Byd0CDet.mjs +0 -3
  190. package/components/kanagawa-wave-DExoagcR.mjs +0 -3
  191. package/components/kanban-definition-ZSS6B67P-BptAnqU-.mjs +0 -1059
  192. package/components/kotlin-BM2ZNTMh.mjs +0 -6
  193. package/components/kusto-D9MF7CZf.mjs +0 -14
  194. package/components/laserwave-DF03wMlf.mjs +0 -3
  195. package/components/latex-BsqkLZB_.mjs +0 -10
  196. package/components/layout-sGZIJplX.mjs +0 -2043
  197. package/components/less-BAzLMJNR.mjs +0 -6
  198. package/components/light-plus-DS08Xg5J.mjs +0 -3
  199. package/components/linear-DqgVh5FN.mjs +0 -336
  200. package/components/liquid-f2VHt0dg.mjs +0 -15
  201. package/components/lisp-DAq1kaby.mjs +0 -6
  202. package/components/logo-D9l7oEJ8.mjs +0 -6
  203. package/components/lua-CH3ttzl_.mjs +0 -9
  204. package/components/makefile-D2qLe7q0.mjs +0 -14
  205. package/components/marko-DwRyI_--.mjs +0 -15
  206. package/components/material-theme-B8B2U48Q.mjs +0 -3
  207. package/components/material-theme-darker-BV0iY_T3.mjs +0 -3
  208. package/components/material-theme-lighter-DrzybSTF.mjs +0 -3
  209. package/components/material-theme-ocean-BRPLVReX.mjs +0 -3
  210. package/components/material-theme-palenight-DSJwsR_D.mjs +0 -3
  211. package/components/matlab-7XHduepk.mjs +0 -6
  212. package/components/md-BIvDPr-W.mjs +0 -14
  213. package/components/mdc-Rx6hWSHn.mjs +0 -16
  214. package/components/mdx-D5wExp-O.mjs +0 -6
  215. package/components/mermaid-CUjtoYEe.mjs +0 -6
  216. package/components/mermaid-parser.core-CH9ryA1K.mjs +0 -16987
  217. package/components/mermaid.core-CAqkCmS1.mjs +0 -20977
  218. package/components/min-BngCxx8g.mjs +0 -109
  219. package/components/min-dark-BNaN9fWk.mjs +0 -3
  220. package/components/min-light-CMrjentn.mjs +0 -3
  221. package/components/mindmap-definition-6CBA2TL7-Cp_EeEsh.mjs +0 -5856
  222. package/components/mojo-CrbF881p.mjs +0 -6
  223. package/components/monokai-DelygWXa.mjs +0 -3
  224. package/components/narrat-DOwkIbBe.mjs +0 -14
  225. package/components/nf-DHfvJ2gH.mjs +0 -14
  226. package/components/nginx-B_jWsywZ.mjs +0 -10
  227. package/components/night-owl-DSS199ra.mjs +0 -3
  228. package/components/nim-yzbnZKJd.mjs +0 -22
  229. package/components/nix--3K2gyjg.mjs +0 -6
  230. package/components/nord-CvDbBq5M.mjs +0 -3
  231. package/components/objective-c-DkOBZg1J.mjs +0 -14
  232. package/components/objective-cpp-DEoN9Fe5.mjs +0 -6
  233. package/components/ocaml-B1kfGk9Y.mjs +0 -6
  234. package/components/one-dark-pro-CsMf0BoJ.mjs +0 -3
  235. package/components/one-light-BwwAsfsj.mjs +0 -3
  236. package/components/ordinal-DSZU4PqD.mjs +0 -76
  237. package/components/packet-HUATNLJX-bfFWFja0.mjs +0 -15
  238. package/components/pascal-CU8Kjkr_.mjs +0 -6
  239. package/components/perl-FH6su6vZ.mjs +0 -18
  240. package/components/php-Dnl1TfYH.mjs +0 -20
  241. package/components/pie-WTHONI2E-QPrWs3SR.mjs +0 -15
  242. package/components/pieDiagram-NIOCPIFQ-C46Y_4C6.mjs +0 -250
  243. package/components/plastic-BjwMpBc0.mjs +0 -3
  244. package/components/plsql-B3Na24V4.mjs +0 -6
  245. package/components/poimandres-ChWyhPrn.mjs +0 -3
  246. package/components/postcss-kj1IbjVd.mjs +0 -6
  247. package/components/powerquery-B-e1fO-k.mjs +0 -6
  248. package/components/prisma-bmxcSDxq.mjs +0 -6
  249. package/components/prolog-BT9GCzqD.mjs +0 -6
  250. package/components/properties-D6yKO1eW.mjs +0 -14
  251. package/components/proto-BIXM0k1a.mjs +0 -6
  252. package/components/ps1-aFyNx8UH.mjs +0 -18
  253. package/components/pug-BrOx0bSt.mjs +0 -21
  254. package/components/puppet-N15G4Usj.mjs +0 -6
  255. package/components/purescript-DrwsEYNH.mjs +0 -6
  256. package/components/python-D2s92fRP.mjs +0 -14
  257. package/components/ql-DTm-NCRo.mjs +0 -14
  258. package/components/quadrantDiagram-2OG54O6I-Dgf6d6F_.mjs +0 -1349
  259. package/components/r-oprfD2-9.mjs +0 -6
  260. package/components/radar-NJJJXTRR-BnUCJhQL.mjs +0 -15
  261. package/components/raku-xArQd_rF.mjs +0 -14
  262. package/components/razor-BoXCAbWQ.mjs +0 -13
  263. package/components/red-DByOl5N0.mjs +0 -3
  264. package/components/reg-CULnG2WX.mjs +0 -6
  265. package/components/rel-CHRwzjd4.mjs +0 -6
  266. package/components/requirementDiagram-QOLK2EJ7-CSF6N7HA.mjs +0 -1173
  267. package/components/riscv-BNQ9cVpw.mjs +0 -6
  268. package/components/rose-pine-LL9gXmP2.mjs +0 -3
  269. package/components/rose-pine-dawn-CH9zdisO.mjs +0 -3
  270. package/components/rose-pine-moon-B1oKSfEJ.mjs +0 -3
  271. package/components/rst-bEtD1v7N.mjs +0 -36
  272. package/components/ruby-BmfBy6EV.mjs +0 -44
  273. package/components/rust-Bf_fdNdL.mjs +0 -14
  274. package/components/sankeyDiagram-4UZDY2LN-BAHB7dMS.mjs +0 -1201
  275. package/components/sas-BLBgC3TA.mjs +0 -9
  276. package/components/sass-BheygBdF.mjs +0 -6
  277. package/components/scala-B-_7vFVn.mjs +0 -6
  278. package/components/scheme-BSHdPinv.mjs +0 -6
  279. package/components/scss-Dq-LbI_c.mjs +0 -9
  280. package/components/sequenceDiagram-SKLFT4DO-10gLJ50N.mjs +0 -3424
  281. package/components/shaderlab-BOQRTiQi.mjs +0 -17
  282. package/components/shellsession-Cu3c0QAc.mjs +0 -17
  283. package/components/slack-dark-BEe10hxO.mjs +0 -3
  284. package/components/slack-ochin-BKmu9pBc.mjs +0 -3
  285. package/components/smalltalk-qxcGy4fT.mjs +0 -6
  286. package/components/snazzy-light-Dcvd-ZyI.mjs +0 -3
  287. package/components/solarized-dark-BBl5y5sR.mjs +0 -3
  288. package/components/solarized-light-DW9b_AY8.mjs +0 -3
  289. package/components/solidity-CewKZgp-.mjs +0 -6
  290. package/components/sparql-DswowMAp.mjs +0 -9
  291. package/components/splunk-gK6Iw_P9.mjs +0 -14
  292. package/components/sql-DzUuSofg.mjs +0 -6
  293. package/components/ssh-config-Bk_I5wDR.mjs +0 -6
  294. package/components/stata-Dl7wDdBE.mjs +0 -9
  295. package/components/stateDiagram-MI5ZYTHO-D6p6nCaj.mjs +0 -461
  296. package/components/stateDiagram-v2-5AN5P6BG-DaN5hC-t.mjs +0 -31
  297. package/components/stylus-qRNkxrFU.mjs +0 -14
  298. package/components/svelte-B9qv3vkS.mjs +0 -15
  299. package/components/swift-BRQRsam8.mjs +0 -6
  300. package/components/synthwave-84-CoUef9sh.mjs +0 -3
  301. package/components/system-verilog-BcESSvRn.mjs +0 -6
  302. package/components/tasl-DfOr2qHi.mjs +0 -6
  303. package/components/tcl-CTsc4-t7.mjs +0 -6
  304. package/components/tex-CumJx1zu.mjs +0 -9
  305. package/components/timeline-definition-MYPXXCX6-gLqnWxDu.mjs +0 -1236
  306. package/components/tokyo-night-DjtLpAEY.mjs +0 -3
  307. package/components/toml-vHPzWDj6.mjs +0 -6
  308. package/components/treemap-75Q7IDZK-B2atdfMH.mjs +0 -15
  309. package/components/tsx-CmGGo4Hm.mjs +0 -6
  310. package/components/turtle-BnC7StHY.mjs +0 -6
  311. package/components/twig-0XKNpXN1.mjs +0 -35
  312. package/components/typescript-CgxwwAuC.mjs +0 -14
  313. package/components/v-Bmdjo9cy.mjs +0 -6
  314. package/components/vb-DuF6ZenW.mjs +0 -14
  315. package/components/verilog-CCb_iTfF.mjs +0 -6
  316. package/components/vesper-4Q1cEwPL.mjs +0 -3
  317. package/components/vhdl-DMqk4T2s.mjs +0 -6
  318. package/components/vimscript-aKp9YbYm.mjs +0 -18
  319. package/components/vitesse-black-BqNLki8b.mjs +0 -3
  320. package/components/vitesse-dark-jJ32WhwH.mjs +0 -3
  321. package/components/vitesse-light-476zM4e6.mjs +0 -3
  322. package/components/vue-DVNNTw2l.mjs +0 -40
  323. package/components/vue-html-Cr5wciIP.mjs +0 -16
  324. package/components/vyper-DYedWgAE.mjs +0 -14
  325. package/components/wasm-BBh6f151.mjs +0 -6
  326. package/components/wasm-DDgzZJey.mjs +0 -7
  327. package/components/wenyan-BdqozpMZ.mjs +0 -6
  328. package/components/wgsl-Vo-hHVWH.mjs +0 -6
  329. package/components/wolfram-CRmjUoI4.mjs +0 -6
  330. package/components/xml-BMzZeaqs.mjs +0 -9
  331. package/components/xsl-CAhvzxWv.mjs +0 -10
  332. package/components/xychartDiagram-H2YORKM3-Whqa4ezL.mjs +0 -1895
  333. package/components/yml-BhSrWWMS.mjs +0 -14
  334. package/components/zenscript-DFINJL6j.mjs +0 -6
  335. package/components/zig-CS4FMAZp.mjs +0 -6
  336. package/components/zsh-hcK4TBd7.mjs +0 -26
  337. package/shared/StreamingInferenceService.mjs +0 -204
  338. package/shared/audioToFrames/index.d.ts +0 -19
  339. package/shared/audioToFrames/index.mjs +0 -44
  340. package/shared/audioToFrames/src/assets/mask.d.ts +0 -2
  341. package/shared/audioToFrames/src/audio/StreamingFeatureExtractorService.d.ts +0 -125
  342. package/shared/audioToFrames/src/audio/index.d.ts +0 -5
  343. package/shared/audioToFrames/src/audio/index.mjs +0 -375
  344. package/shared/audioToFrames/src/config.d.ts +0 -4
  345. package/shared/audioToFrames/src/core/constants.d.ts +0 -17
  346. package/shared/audioToFrames/src/core/index.d.ts +0 -6
  347. package/shared/audioToFrames/src/core/index.mjs +0 -24
  348. package/shared/audioToFrames/src/core/utils.d.ts +0 -26
  349. package/shared/audioToFrames/src/inference/StreamingInferenceService.d.ts +0 -189
  350. package/shared/audioToFrames/src/inference/index.d.ts +0 -5
  351. package/shared/audioToFrames/src/inference/index.mjs +0 -3
  352. package/shared/audioToFrames/src/media/DataLoaderService.d.ts +0 -59
  353. package/shared/audioToFrames/src/media/PredictiveFrameLoader.d.ts +0 -81
  354. package/shared/audioToFrames/src/media/index.d.ts +0 -6
  355. package/shared/audioToFrames/src/media/index.mjs +0 -236
  356. package/shared/config.mjs +0 -5
  357. package/shared/constants.mjs +0 -7
@@ -1,1201 +0,0 @@
1
- import { _ as __name, c as getConfig2, a as getAccTitle, b as setAccTitle, g as getAccDescription, s as setAccDescription, t as getDiagramTitle, q as setDiagramTitle, z as clear$2, k as common_default, A as defaultConfig2, d as select, ac as setupGraphViewbox } from './mermaid.core-CAqkCmS1.mjs';
2
- import { o as ordinal } from './ordinal-DSZU4PqD.mjs';
3
- import './index3.mjs';
4
- import 'vue';
5
- import '@vunk/plus/components/bubble-templates';
6
- import 'element-plus';
7
- import './index4.mjs';
8
- import '@vueuse/core';
9
- import '@vunk/plus/components/scrollbar';
10
- import './_plugin-vue_export-helper.mjs';
11
- import '@vunk/shared/function';
12
- import '@vunk/plus/components/agent-chat-provider';
13
- import './init-ZxktEp_H.mjs';
14
-
15
- var _a, _b, _c;
16
- function colors(specifier) {
17
- var n = specifier.length / 6 | 0, colors2 = new Array(n), i = 0;
18
- while (i < n) colors2[i] = "#" + specifier.slice(i * 6, ++i * 6);
19
- return colors2;
20
- }
21
- const d3schemeTableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
22
- function max(values, valueof) {
23
- let max2;
24
- if (valueof === void 0) {
25
- for (const value2 of values) {
26
- if (value2 != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
27
- max2 = value2;
28
- }
29
- }
30
- } else {
31
- let index = -1;
32
- for (let value2 of values) {
33
- if ((value2 = valueof(value2, ++index, values)) != null && (max2 < value2 || max2 === void 0 && value2 >= value2)) {
34
- max2 = value2;
35
- }
36
- }
37
- }
38
- return max2;
39
- }
40
- function min(values, valueof) {
41
- let min2;
42
- if (valueof === void 0) {
43
- for (const value2 of values) {
44
- if (value2 != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
45
- min2 = value2;
46
- }
47
- }
48
- } else {
49
- let index = -1;
50
- for (let value2 of values) {
51
- if ((value2 = valueof(value2, ++index, values)) != null && (min2 > value2 || min2 === void 0 && value2 >= value2)) {
52
- min2 = value2;
53
- }
54
- }
55
- }
56
- return min2;
57
- }
58
- function sum(values, valueof) {
59
- let sum2 = 0;
60
- if (valueof === void 0) {
61
- for (let value2 of values) {
62
- if (value2 = +value2) {
63
- sum2 += value2;
64
- }
65
- }
66
- } else {
67
- let index = -1;
68
- for (let value2 of values) {
69
- if (value2 = +valueof(value2, ++index, values)) {
70
- sum2 += value2;
71
- }
72
- }
73
- }
74
- return sum2;
75
- }
76
- function targetDepth(d) {
77
- return d.target.depth;
78
- }
79
- function left(node) {
80
- return node.depth;
81
- }
82
- function right(node, n) {
83
- return n - 1 - node.height;
84
- }
85
- function justify(node, n) {
86
- return node.sourceLinks.length ? node.depth : n - 1;
87
- }
88
- function center(node) {
89
- return node.targetLinks.length ? node.depth : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1 : 0;
90
- }
91
- function constant$1(x2) {
92
- return function() {
93
- return x2;
94
- };
95
- }
96
- function ascendingSourceBreadth(a, b) {
97
- return ascendingBreadth(a.source, b.source) || a.index - b.index;
98
- }
99
- function ascendingTargetBreadth(a, b) {
100
- return ascendingBreadth(a.target, b.target) || a.index - b.index;
101
- }
102
- function ascendingBreadth(a, b) {
103
- return a.y0 - b.y0;
104
- }
105
- function value(d) {
106
- return d.value;
107
- }
108
- function defaultId(d) {
109
- return d.index;
110
- }
111
- function defaultNodes(graph) {
112
- return graph.nodes;
113
- }
114
- function defaultLinks(graph) {
115
- return graph.links;
116
- }
117
- function find(nodeById, id) {
118
- const node = nodeById.get(id);
119
- if (!node) throw new Error("missing: " + id);
120
- return node;
121
- }
122
- function computeLinkBreadths({ nodes: nodes2 }) {
123
- for (const node of nodes2) {
124
- let y0 = node.y0;
125
- let y1 = y0;
126
- for (const link2 of node.sourceLinks) {
127
- link2.y0 = y0 + link2.width / 2;
128
- y0 += link2.width;
129
- }
130
- for (const link2 of node.targetLinks) {
131
- link2.y1 = y1 + link2.width / 2;
132
- y1 += link2.width;
133
- }
134
- }
135
- }
136
- function Sankey() {
137
- let x0 = 0, y0 = 0, x1 = 1, y1 = 1;
138
- let dx = 24;
139
- let dy = 8, py;
140
- let id = defaultId;
141
- let align = justify;
142
- let sort;
143
- let linkSort;
144
- let nodes2 = defaultNodes;
145
- let links2 = defaultLinks;
146
- let iterations = 6;
147
- function sankey() {
148
- const graph = { nodes: nodes2.apply(null, arguments), links: links2.apply(null, arguments) };
149
- computeNodeLinks(graph);
150
- computeNodeValues(graph);
151
- computeNodeDepths(graph);
152
- computeNodeHeights(graph);
153
- computeNodeBreadths(graph);
154
- computeLinkBreadths(graph);
155
- return graph;
156
- }
157
- sankey.update = function(graph) {
158
- computeLinkBreadths(graph);
159
- return graph;
160
- };
161
- sankey.nodeId = function(_) {
162
- return arguments.length ? (id = typeof _ === "function" ? _ : constant$1(_), sankey) : id;
163
- };
164
- sankey.nodeAlign = function(_) {
165
- return arguments.length ? (align = typeof _ === "function" ? _ : constant$1(_), sankey) : align;
166
- };
167
- sankey.nodeSort = function(_) {
168
- return arguments.length ? (sort = _, sankey) : sort;
169
- };
170
- sankey.nodeWidth = function(_) {
171
- return arguments.length ? (dx = +_, sankey) : dx;
172
- };
173
- sankey.nodePadding = function(_) {
174
- return arguments.length ? (dy = py = +_, sankey) : dy;
175
- };
176
- sankey.nodes = function(_) {
177
- return arguments.length ? (nodes2 = typeof _ === "function" ? _ : constant$1(_), sankey) : nodes2;
178
- };
179
- sankey.links = function(_) {
180
- return arguments.length ? (links2 = typeof _ === "function" ? _ : constant$1(_), sankey) : links2;
181
- };
182
- sankey.linkSort = function(_) {
183
- return arguments.length ? (linkSort = _, sankey) : linkSort;
184
- };
185
- sankey.size = function(_) {
186
- return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];
187
- };
188
- sankey.extent = function(_) {
189
- return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];
190
- };
191
- sankey.iterations = function(_) {
192
- return arguments.length ? (iterations = +_, sankey) : iterations;
193
- };
194
- function computeNodeLinks({ nodes: nodes3, links: links3 }) {
195
- for (const [i, node] of nodes3.entries()) {
196
- node.index = i;
197
- node.sourceLinks = [];
198
- node.targetLinks = [];
199
- }
200
- const nodeById = new Map(nodes3.map((d, i) => [id(d, i, nodes3), d]));
201
- for (const [i, link2] of links3.entries()) {
202
- link2.index = i;
203
- let { source, target } = link2;
204
- if (typeof source !== "object") source = link2.source = find(nodeById, source);
205
- if (typeof target !== "object") target = link2.target = find(nodeById, target);
206
- source.sourceLinks.push(link2);
207
- target.targetLinks.push(link2);
208
- }
209
- if (linkSort != null) {
210
- for (const { sourceLinks, targetLinks } of nodes3) {
211
- sourceLinks.sort(linkSort);
212
- targetLinks.sort(linkSort);
213
- }
214
- }
215
- }
216
- function computeNodeValues({ nodes: nodes3 }) {
217
- for (const node of nodes3) {
218
- node.value = node.fixedValue === void 0 ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value)) : node.fixedValue;
219
- }
220
- }
221
- function computeNodeDepths({ nodes: nodes3 }) {
222
- const n = nodes3.length;
223
- let current = new Set(nodes3);
224
- let next = /* @__PURE__ */ new Set();
225
- let x2 = 0;
226
- while (current.size) {
227
- for (const node of current) {
228
- node.depth = x2;
229
- for (const { target } of node.sourceLinks) {
230
- next.add(target);
231
- }
232
- }
233
- if (++x2 > n) throw new Error("circular link");
234
- current = next;
235
- next = /* @__PURE__ */ new Set();
236
- }
237
- }
238
- function computeNodeHeights({ nodes: nodes3 }) {
239
- const n = nodes3.length;
240
- let current = new Set(nodes3);
241
- let next = /* @__PURE__ */ new Set();
242
- let x2 = 0;
243
- while (current.size) {
244
- for (const node of current) {
245
- node.height = x2;
246
- for (const { source } of node.targetLinks) {
247
- next.add(source);
248
- }
249
- }
250
- if (++x2 > n) throw new Error("circular link");
251
- current = next;
252
- next = /* @__PURE__ */ new Set();
253
- }
254
- }
255
- function computeNodeLayers({ nodes: nodes3 }) {
256
- const x2 = max(nodes3, (d) => d.depth) + 1;
257
- const kx = (x1 - x0 - dx) / (x2 - 1);
258
- const columns = new Array(x2);
259
- for (const node of nodes3) {
260
- const i = Math.max(0, Math.min(x2 - 1, Math.floor(align.call(null, node, x2))));
261
- node.layer = i;
262
- node.x0 = x0 + i * kx;
263
- node.x1 = node.x0 + dx;
264
- if (columns[i]) columns[i].push(node);
265
- else columns[i] = [node];
266
- }
267
- if (sort) for (const column of columns) {
268
- column.sort(sort);
269
- }
270
- return columns;
271
- }
272
- function initializeNodeBreadths(columns) {
273
- const ky = min(columns, (c) => (y1 - y0 - (c.length - 1) * py) / sum(c, value));
274
- for (const nodes3 of columns) {
275
- let y2 = y0;
276
- for (const node of nodes3) {
277
- node.y0 = y2;
278
- node.y1 = y2 + node.value * ky;
279
- y2 = node.y1 + py;
280
- for (const link2 of node.sourceLinks) {
281
- link2.width = link2.value * ky;
282
- }
283
- }
284
- y2 = (y1 - y2 + py) / (nodes3.length + 1);
285
- for (let i = 0; i < nodes3.length; ++i) {
286
- const node = nodes3[i];
287
- node.y0 += y2 * (i + 1);
288
- node.y1 += y2 * (i + 1);
289
- }
290
- reorderLinks(nodes3);
291
- }
292
- }
293
- function computeNodeBreadths(graph) {
294
- const columns = computeNodeLayers(graph);
295
- py = Math.min(dy, (y1 - y0) / (max(columns, (c) => c.length) - 1));
296
- initializeNodeBreadths(columns);
297
- for (let i = 0; i < iterations; ++i) {
298
- const alpha = Math.pow(0.99, i);
299
- const beta = Math.max(1 - alpha, (i + 1) / iterations);
300
- relaxRightToLeft(columns, alpha, beta);
301
- relaxLeftToRight(columns, alpha, beta);
302
- }
303
- }
304
- function relaxLeftToRight(columns, alpha, beta) {
305
- for (let i = 1, n = columns.length; i < n; ++i) {
306
- const column = columns[i];
307
- for (const target of column) {
308
- let y2 = 0;
309
- let w = 0;
310
- for (const { source, value: value2 } of target.targetLinks) {
311
- let v = value2 * (target.layer - source.layer);
312
- y2 += targetTop(source, target) * v;
313
- w += v;
314
- }
315
- if (!(w > 0)) continue;
316
- let dy2 = (y2 / w - target.y0) * alpha;
317
- target.y0 += dy2;
318
- target.y1 += dy2;
319
- reorderNodeLinks(target);
320
- }
321
- if (sort === void 0) column.sort(ascendingBreadth);
322
- resolveCollisions(column, beta);
323
- }
324
- }
325
- function relaxRightToLeft(columns, alpha, beta) {
326
- for (let n = columns.length, i = n - 2; i >= 0; --i) {
327
- const column = columns[i];
328
- for (const source of column) {
329
- let y2 = 0;
330
- let w = 0;
331
- for (const { target, value: value2 } of source.sourceLinks) {
332
- let v = value2 * (target.layer - source.layer);
333
- y2 += sourceTop(source, target) * v;
334
- w += v;
335
- }
336
- if (!(w > 0)) continue;
337
- let dy2 = (y2 / w - source.y0) * alpha;
338
- source.y0 += dy2;
339
- source.y1 += dy2;
340
- reorderNodeLinks(source);
341
- }
342
- if (sort === void 0) column.sort(ascendingBreadth);
343
- resolveCollisions(column, beta);
344
- }
345
- }
346
- function resolveCollisions(nodes3, alpha) {
347
- const i = nodes3.length >> 1;
348
- const subject = nodes3[i];
349
- resolveCollisionsBottomToTop(nodes3, subject.y0 - py, i - 1, alpha);
350
- resolveCollisionsTopToBottom(nodes3, subject.y1 + py, i + 1, alpha);
351
- resolveCollisionsBottomToTop(nodes3, y1, nodes3.length - 1, alpha);
352
- resolveCollisionsTopToBottom(nodes3, y0, 0, alpha);
353
- }
354
- function resolveCollisionsTopToBottom(nodes3, y2, i, alpha) {
355
- for (; i < nodes3.length; ++i) {
356
- const node = nodes3[i];
357
- const dy2 = (y2 - node.y0) * alpha;
358
- if (dy2 > 1e-6) node.y0 += dy2, node.y1 += dy2;
359
- y2 = node.y1 + py;
360
- }
361
- }
362
- function resolveCollisionsBottomToTop(nodes3, y2, i, alpha) {
363
- for (; i >= 0; --i) {
364
- const node = nodes3[i];
365
- const dy2 = (node.y1 - y2) * alpha;
366
- if (dy2 > 1e-6) node.y0 -= dy2, node.y1 -= dy2;
367
- y2 = node.y0 - py;
368
- }
369
- }
370
- function reorderNodeLinks({ sourceLinks, targetLinks }) {
371
- if (linkSort === void 0) {
372
- for (const { source: { sourceLinks: sourceLinks2 } } of targetLinks) {
373
- sourceLinks2.sort(ascendingTargetBreadth);
374
- }
375
- for (const { target: { targetLinks: targetLinks2 } } of sourceLinks) {
376
- targetLinks2.sort(ascendingSourceBreadth);
377
- }
378
- }
379
- }
380
- function reorderLinks(nodes3) {
381
- if (linkSort === void 0) {
382
- for (const { sourceLinks, targetLinks } of nodes3) {
383
- sourceLinks.sort(ascendingTargetBreadth);
384
- targetLinks.sort(ascendingSourceBreadth);
385
- }
386
- }
387
- }
388
- function targetTop(source, target) {
389
- let y2 = source.y0 - (source.sourceLinks.length - 1) * py / 2;
390
- for (const { target: node, width } of source.sourceLinks) {
391
- if (node === target) break;
392
- y2 += width + py;
393
- }
394
- for (const { source: node, width } of target.targetLinks) {
395
- if (node === source) break;
396
- y2 -= width;
397
- }
398
- return y2;
399
- }
400
- function sourceTop(source, target) {
401
- let y2 = target.y0 - (target.targetLinks.length - 1) * py / 2;
402
- for (const { source: node, width } of target.targetLinks) {
403
- if (node === source) break;
404
- y2 += width + py;
405
- }
406
- for (const { target: node, width } of source.sourceLinks) {
407
- if (node === target) break;
408
- y2 -= width;
409
- }
410
- return y2;
411
- }
412
- return sankey;
413
- }
414
- var pi = Math.PI, tau = 2 * pi, epsilon = 1e-6, tauEpsilon = tau - epsilon;
415
- function Path() {
416
- this._x0 = this._y0 = // start of current subpath
417
- this._x1 = this._y1 = null;
418
- this._ = "";
419
- }
420
- function path() {
421
- return new Path();
422
- }
423
- Path.prototype = path.prototype = {
424
- constructor: Path,
425
- moveTo: function(x2, y2) {
426
- this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2);
427
- },
428
- closePath: function() {
429
- if (this._x1 !== null) {
430
- this._x1 = this._x0, this._y1 = this._y0;
431
- this._ += "Z";
432
- }
433
- },
434
- lineTo: function(x2, y2) {
435
- this._ += "L" + (this._x1 = +x2) + "," + (this._y1 = +y2);
436
- },
437
- quadraticCurveTo: function(x1, y1, x2, y2) {
438
- this._ += "Q" + +x1 + "," + +y1 + "," + (this._x1 = +x2) + "," + (this._y1 = +y2);
439
- },
440
- bezierCurveTo: function(x1, y1, x2, y2, x3, y3) {
441
- this._ += "C" + +x1 + "," + +y1 + "," + +x2 + "," + +y2 + "," + (this._x1 = +x3) + "," + (this._y1 = +y3);
442
- },
443
- arcTo: function(x1, y1, x2, y2, r) {
444
- x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
445
- var x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
446
- if (r < 0) throw new Error("negative radius: " + r);
447
- if (this._x1 === null) {
448
- this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
449
- } else if (!(l01_2 > epsilon)) ;
450
- else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
451
- this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
452
- } else {
453
- var x20 = x2 - x0, y20 = y2 - y0, l21_2 = x21 * x21 + y21 * y21, l20_2 = x20 * x20 + y20 * y20, l21 = Math.sqrt(l21_2), l01 = Math.sqrt(l01_2), l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), t01 = l / l01, t21 = l / l21;
454
- if (Math.abs(t01 - 1) > epsilon) {
455
- this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
456
- }
457
- this._ += "A" + r + "," + r + ",0,0," + +(y01 * x20 > x01 * y20) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
458
- }
459
- },
460
- arc: function(x2, y2, r, a0, a1, ccw) {
461
- x2 = +x2, y2 = +y2, r = +r, ccw = !!ccw;
462
- var dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x2 + dx, y0 = y2 + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
463
- if (r < 0) throw new Error("negative radius: " + r);
464
- if (this._x1 === null) {
465
- this._ += "M" + x0 + "," + y0;
466
- } else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
467
- this._ += "L" + x0 + "," + y0;
468
- }
469
- if (!r) return;
470
- if (da < 0) da = da % tau + tau;
471
- if (da > tauEpsilon) {
472
- this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x2 - dx) + "," + (y2 - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
473
- } else if (da > epsilon) {
474
- this._ += "A" + r + "," + r + ",0," + +(da >= pi) + "," + cw + "," + (this._x1 = x2 + r * Math.cos(a1)) + "," + (this._y1 = y2 + r * Math.sin(a1));
475
- }
476
- },
477
- rect: function(x2, y2, w, h) {
478
- this._ += "M" + (this._x0 = this._x1 = +x2) + "," + (this._y0 = this._y1 = +y2) + "h" + +w + "v" + +h + "h" + -w + "Z";
479
- },
480
- toString: function() {
481
- return this._;
482
- }
483
- };
484
- function constant(x2) {
485
- return function constant2() {
486
- return x2;
487
- };
488
- }
489
- function x(p) {
490
- return p[0];
491
- }
492
- function y(p) {
493
- return p[1];
494
- }
495
- var slice = Array.prototype.slice;
496
- function linkSource(d) {
497
- return d.source;
498
- }
499
- function linkTarget(d) {
500
- return d.target;
501
- }
502
- function link(curve) {
503
- var source = linkSource, target = linkTarget, x$1 = x, y$1 = y, context = null;
504
- function link2() {
505
- var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);
506
- if (!context) context = buffer = path();
507
- curve(context, +x$1.apply(this, (argv[0] = s, argv)), +y$1.apply(this, argv), +x$1.apply(this, (argv[0] = t, argv)), +y$1.apply(this, argv));
508
- if (buffer) return context = null, buffer + "" || null;
509
- }
510
- link2.source = function(_) {
511
- return arguments.length ? (source = _, link2) : source;
512
- };
513
- link2.target = function(_) {
514
- return arguments.length ? (target = _, link2) : target;
515
- };
516
- link2.x = function(_) {
517
- return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), link2) : x$1;
518
- };
519
- link2.y = function(_) {
520
- return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), link2) : y$1;
521
- };
522
- link2.context = function(_) {
523
- return arguments.length ? (context = _ == null ? null : _, link2) : context;
524
- };
525
- return link2;
526
- }
527
- function curveHorizontal(context, x0, y0, x1, y1) {
528
- context.moveTo(x0, y0);
529
- context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);
530
- }
531
- function linkHorizontal() {
532
- return link(curveHorizontal);
533
- }
534
- function horizontalSource(d) {
535
- return [d.source.x1, d.y0];
536
- }
537
- function horizontalTarget(d) {
538
- return [d.target.x0, d.y1];
539
- }
540
- function d3SankeyLinkHorizontal() {
541
- return linkHorizontal().source(horizontalSource).target(horizontalTarget);
542
- }
543
- var parser = function() {
544
- var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
545
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
546
- return o2;
547
- }, "o"), $V0 = [1, 9], $V1 = [1, 10], $V2 = [1, 5, 10, 12];
548
- var parser2 = {
549
- trace: /* @__PURE__ */ __name(function trace() {
550
- }, "trace"),
551
- yy: {},
552
- symbols_: { "error": 2, "start": 3, "SANKEY": 4, "NEWLINE": 5, "csv": 6, "opt_eof": 7, "record": 8, "csv_tail": 9, "EOF": 10, "field[source]": 11, "COMMA": 12, "field[target]": 13, "field[value]": 14, "field": 15, "escaped": 16, "non_escaped": 17, "DQUOTE": 18, "ESCAPED_TEXT": 19, "NON_ESCAPED_TEXT": 20, "$accept": 0, "$end": 1 },
553
- terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
554
- productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
555
- performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
556
- var $0 = $$.length - 1;
557
- switch (yystate) {
558
- case 7:
559
- const source = yy.findOrCreateNode($$[$0 - 4].trim().replaceAll('""', '"'));
560
- const target = yy.findOrCreateNode($$[$0 - 2].trim().replaceAll('""', '"'));
561
- const value2 = parseFloat($$[$0].trim());
562
- yy.addLink(source, target, value2);
563
- break;
564
- case 8:
565
- case 9:
566
- case 11:
567
- this.$ = $$[$0];
568
- break;
569
- case 10:
570
- this.$ = $$[$0 - 1];
571
- break;
572
- }
573
- }, "anonymous"),
574
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 1: [2, 6], 7: 11, 10: [1, 12] }, o($V1, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, o($V2, [2, 8]), o($V2, [2, 9]), { 19: [1, 16] }, o($V2, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, o($V1, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 15: 18, 16: 7, 17: 8, 18: $V0, 20: $V1 }, { 18: [1, 19] }, o($V1, [2, 3]), { 12: [1, 20] }, o($V2, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: $V0, 20: $V1 }, o([1, 5, 10], [2, 7])],
575
- defaultActions: { 11: [2, 1], 12: [2, 5] },
576
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
577
- if (hash.recoverable) {
578
- this.trace(str);
579
- } else {
580
- var error = new Error(str);
581
- error.hash = hash;
582
- throw error;
583
- }
584
- }, "parseError"),
585
- parse: /* @__PURE__ */ __name(function parse(input) {
586
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
587
- var args = lstack.slice.call(arguments, 1);
588
- var lexer2 = Object.create(this.lexer);
589
- var sharedState = { yy: {} };
590
- for (var k in this.yy) {
591
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
592
- sharedState.yy[k] = this.yy[k];
593
- }
594
- }
595
- lexer2.setInput(input, sharedState.yy);
596
- sharedState.yy.lexer = lexer2;
597
- sharedState.yy.parser = this;
598
- if (typeof lexer2.yylloc == "undefined") {
599
- lexer2.yylloc = {};
600
- }
601
- var yyloc = lexer2.yylloc;
602
- lstack.push(yyloc);
603
- var ranges = lexer2.options && lexer2.options.ranges;
604
- if (typeof sharedState.yy.parseError === "function") {
605
- this.parseError = sharedState.yy.parseError;
606
- } else {
607
- this.parseError = Object.getPrototypeOf(this).parseError;
608
- }
609
- function popStack(n) {
610
- stack.length = stack.length - 2 * n;
611
- vstack.length = vstack.length - n;
612
- lstack.length = lstack.length - n;
613
- }
614
- __name(popStack, "popStack");
615
- function lex() {
616
- var token;
617
- token = tstack.pop() || lexer2.lex() || EOF;
618
- if (typeof token !== "number") {
619
- if (token instanceof Array) {
620
- tstack = token;
621
- token = tstack.pop();
622
- }
623
- token = self.symbols_[token] || token;
624
- }
625
- return token;
626
- }
627
- __name(lex, "lex");
628
- var symbol, state, action, r, yyval = {}, p, len, newState, expected;
629
- while (true) {
630
- state = stack[stack.length - 1];
631
- if (this.defaultActions[state]) {
632
- action = this.defaultActions[state];
633
- } else {
634
- if (symbol === null || typeof symbol == "undefined") {
635
- symbol = lex();
636
- }
637
- action = table[state] && table[state][symbol];
638
- }
639
- if (typeof action === "undefined" || !action.length || !action[0]) {
640
- var errStr = "";
641
- expected = [];
642
- for (p in table[state]) {
643
- if (this.terminals_[p] && p > TERROR) {
644
- expected.push("'" + this.terminals_[p] + "'");
645
- }
646
- }
647
- if (lexer2.showPosition) {
648
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
649
- } else {
650
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
651
- }
652
- this.parseError(errStr, {
653
- text: lexer2.match,
654
- token: this.terminals_[symbol] || symbol,
655
- line: lexer2.yylineno,
656
- loc: yyloc,
657
- expected
658
- });
659
- }
660
- if (action[0] instanceof Array && action.length > 1) {
661
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
662
- }
663
- switch (action[0]) {
664
- case 1:
665
- stack.push(symbol);
666
- vstack.push(lexer2.yytext);
667
- lstack.push(lexer2.yylloc);
668
- stack.push(action[1]);
669
- symbol = null;
670
- {
671
- yyleng = lexer2.yyleng;
672
- yytext = lexer2.yytext;
673
- yylineno = lexer2.yylineno;
674
- yyloc = lexer2.yylloc;
675
- }
676
- break;
677
- case 2:
678
- len = this.productions_[action[1]][1];
679
- yyval.$ = vstack[vstack.length - len];
680
- yyval._$ = {
681
- first_line: lstack[lstack.length - (len || 1)].first_line,
682
- last_line: lstack[lstack.length - 1].last_line,
683
- first_column: lstack[lstack.length - (len || 1)].first_column,
684
- last_column: lstack[lstack.length - 1].last_column
685
- };
686
- if (ranges) {
687
- yyval._$.range = [
688
- lstack[lstack.length - (len || 1)].range[0],
689
- lstack[lstack.length - 1].range[1]
690
- ];
691
- }
692
- r = this.performAction.apply(yyval, [
693
- yytext,
694
- yyleng,
695
- yylineno,
696
- sharedState.yy,
697
- action[1],
698
- vstack,
699
- lstack
700
- ].concat(args));
701
- if (typeof r !== "undefined") {
702
- return r;
703
- }
704
- if (len) {
705
- stack = stack.slice(0, -1 * len * 2);
706
- vstack = vstack.slice(0, -1 * len);
707
- lstack = lstack.slice(0, -1 * len);
708
- }
709
- stack.push(this.productions_[action[1]][0]);
710
- vstack.push(yyval.$);
711
- lstack.push(yyval._$);
712
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
713
- stack.push(newState);
714
- break;
715
- case 3:
716
- return true;
717
- }
718
- }
719
- return true;
720
- }, "parse")
721
- };
722
- var lexer = /* @__PURE__ */ function() {
723
- var lexer2 = {
724
- EOF: 1,
725
- parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
726
- if (this.yy.parser) {
727
- this.yy.parser.parseError(str, hash);
728
- } else {
729
- throw new Error(str);
730
- }
731
- }, "parseError"),
732
- // resets the lexer, sets new input
733
- setInput: /* @__PURE__ */ __name(function(input, yy) {
734
- this.yy = yy || this.yy || {};
735
- this._input = input;
736
- this._more = this._backtrack = this.done = false;
737
- this.yylineno = this.yyleng = 0;
738
- this.yytext = this.matched = this.match = "";
739
- this.conditionStack = ["INITIAL"];
740
- this.yylloc = {
741
- first_line: 1,
742
- first_column: 0,
743
- last_line: 1,
744
- last_column: 0
745
- };
746
- if (this.options.ranges) {
747
- this.yylloc.range = [0, 0];
748
- }
749
- this.offset = 0;
750
- return this;
751
- }, "setInput"),
752
- // consumes and returns one char from the input
753
- input: /* @__PURE__ */ __name(function() {
754
- var ch = this._input[0];
755
- this.yytext += ch;
756
- this.yyleng++;
757
- this.offset++;
758
- this.match += ch;
759
- this.matched += ch;
760
- var lines = ch.match(/(?:\r\n?|\n).*/g);
761
- if (lines) {
762
- this.yylineno++;
763
- this.yylloc.last_line++;
764
- } else {
765
- this.yylloc.last_column++;
766
- }
767
- if (this.options.ranges) {
768
- this.yylloc.range[1]++;
769
- }
770
- this._input = this._input.slice(1);
771
- return ch;
772
- }, "input"),
773
- // unshifts one char (or a string) into the input
774
- unput: /* @__PURE__ */ __name(function(ch) {
775
- var len = ch.length;
776
- var lines = ch.split(/(?:\r\n?|\n)/g);
777
- this._input = ch + this._input;
778
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
779
- this.offset -= len;
780
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
781
- this.match = this.match.substr(0, this.match.length - 1);
782
- this.matched = this.matched.substr(0, this.matched.length - 1);
783
- if (lines.length - 1) {
784
- this.yylineno -= lines.length - 1;
785
- }
786
- var r = this.yylloc.range;
787
- this.yylloc = {
788
- first_line: this.yylloc.first_line,
789
- last_line: this.yylineno + 1,
790
- first_column: this.yylloc.first_column,
791
- last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
792
- };
793
- if (this.options.ranges) {
794
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
795
- }
796
- this.yyleng = this.yytext.length;
797
- return this;
798
- }, "unput"),
799
- // When called from action, caches matched text and appends it on next action
800
- more: /* @__PURE__ */ __name(function() {
801
- this._more = true;
802
- return this;
803
- }, "more"),
804
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
805
- reject: /* @__PURE__ */ __name(function() {
806
- if (this.options.backtrack_lexer) {
807
- this._backtrack = true;
808
- } else {
809
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
810
- text: "",
811
- token: null,
812
- line: this.yylineno
813
- });
814
- }
815
- return this;
816
- }, "reject"),
817
- // retain first n characters of the match
818
- less: /* @__PURE__ */ __name(function(n) {
819
- this.unput(this.match.slice(n));
820
- }, "less"),
821
- // displays already matched input, i.e. for error messages
822
- pastInput: /* @__PURE__ */ __name(function() {
823
- var past = this.matched.substr(0, this.matched.length - this.match.length);
824
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
825
- }, "pastInput"),
826
- // displays upcoming input, i.e. for error messages
827
- upcomingInput: /* @__PURE__ */ __name(function() {
828
- var next = this.match;
829
- if (next.length < 20) {
830
- next += this._input.substr(0, 20 - next.length);
831
- }
832
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
833
- }, "upcomingInput"),
834
- // displays the character position where the lexing error occurred, i.e. for error messages
835
- showPosition: /* @__PURE__ */ __name(function() {
836
- var pre = this.pastInput();
837
- var c = new Array(pre.length + 1).join("-");
838
- return pre + this.upcomingInput() + "\n" + c + "^";
839
- }, "showPosition"),
840
- // test the lexed token: return FALSE when not a match, otherwise return token
841
- test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
842
- var token, lines, backup;
843
- if (this.options.backtrack_lexer) {
844
- backup = {
845
- yylineno: this.yylineno,
846
- yylloc: {
847
- first_line: this.yylloc.first_line,
848
- last_line: this.last_line,
849
- first_column: this.yylloc.first_column,
850
- last_column: this.yylloc.last_column
851
- },
852
- yytext: this.yytext,
853
- match: this.match,
854
- matches: this.matches,
855
- matched: this.matched,
856
- yyleng: this.yyleng,
857
- offset: this.offset,
858
- _more: this._more,
859
- _input: this._input,
860
- yy: this.yy,
861
- conditionStack: this.conditionStack.slice(0),
862
- done: this.done
863
- };
864
- if (this.options.ranges) {
865
- backup.yylloc.range = this.yylloc.range.slice(0);
866
- }
867
- }
868
- lines = match[0].match(/(?:\r\n?|\n).*/g);
869
- if (lines) {
870
- this.yylineno += lines.length;
871
- }
872
- this.yylloc = {
873
- first_line: this.yylloc.last_line,
874
- last_line: this.yylineno + 1,
875
- first_column: this.yylloc.last_column,
876
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
877
- };
878
- this.yytext += match[0];
879
- this.match += match[0];
880
- this.matches = match;
881
- this.yyleng = this.yytext.length;
882
- if (this.options.ranges) {
883
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
884
- }
885
- this._more = false;
886
- this._backtrack = false;
887
- this._input = this._input.slice(match[0].length);
888
- this.matched += match[0];
889
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
890
- if (this.done && this._input) {
891
- this.done = false;
892
- }
893
- if (token) {
894
- return token;
895
- } else if (this._backtrack) {
896
- for (var k in backup) {
897
- this[k] = backup[k];
898
- }
899
- return false;
900
- }
901
- return false;
902
- }, "test_match"),
903
- // return next match in input
904
- next: /* @__PURE__ */ __name(function() {
905
- if (this.done) {
906
- return this.EOF;
907
- }
908
- if (!this._input) {
909
- this.done = true;
910
- }
911
- var token, match, tempMatch, index;
912
- if (!this._more) {
913
- this.yytext = "";
914
- this.match = "";
915
- }
916
- var rules = this._currentRules();
917
- for (var i = 0; i < rules.length; i++) {
918
- tempMatch = this._input.match(this.rules[rules[i]]);
919
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
920
- match = tempMatch;
921
- index = i;
922
- if (this.options.backtrack_lexer) {
923
- token = this.test_match(tempMatch, rules[i]);
924
- if (token !== false) {
925
- return token;
926
- } else if (this._backtrack) {
927
- match = false;
928
- continue;
929
- } else {
930
- return false;
931
- }
932
- } else if (!this.options.flex) {
933
- break;
934
- }
935
- }
936
- }
937
- if (match) {
938
- token = this.test_match(match, rules[index]);
939
- if (token !== false) {
940
- return token;
941
- }
942
- return false;
943
- }
944
- if (this._input === "") {
945
- return this.EOF;
946
- } else {
947
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
948
- text: "",
949
- token: null,
950
- line: this.yylineno
951
- });
952
- }
953
- }, "next"),
954
- // return next match that has a token
955
- lex: /* @__PURE__ */ __name(function lex() {
956
- var r = this.next();
957
- if (r) {
958
- return r;
959
- } else {
960
- return this.lex();
961
- }
962
- }, "lex"),
963
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
964
- begin: /* @__PURE__ */ __name(function begin(condition) {
965
- this.conditionStack.push(condition);
966
- }, "begin"),
967
- // pop the previously active lexer condition state off the condition stack
968
- popState: /* @__PURE__ */ __name(function popState() {
969
- var n = this.conditionStack.length - 1;
970
- if (n > 0) {
971
- return this.conditionStack.pop();
972
- } else {
973
- return this.conditionStack[0];
974
- }
975
- }, "popState"),
976
- // produce the lexer rule set which is active for the currently active lexer condition state
977
- _currentRules: /* @__PURE__ */ __name(function _currentRules() {
978
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
979
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
980
- } else {
981
- return this.conditions["INITIAL"].rules;
982
- }
983
- }, "_currentRules"),
984
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
985
- topState: /* @__PURE__ */ __name(function topState(n) {
986
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
987
- if (n >= 0) {
988
- return this.conditionStack[n];
989
- } else {
990
- return "INITIAL";
991
- }
992
- }, "topState"),
993
- // alias for begin(condition)
994
- pushState: /* @__PURE__ */ __name(function pushState(condition) {
995
- this.begin(condition);
996
- }, "pushState"),
997
- // return the number of states currently on the stack
998
- stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
999
- return this.conditionStack.length;
1000
- }, "stateStackSize"),
1001
- options: { "case-insensitive": true },
1002
- performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1003
- switch ($avoiding_name_collisions) {
1004
- case 0:
1005
- this.pushState("csv");
1006
- return 4;
1007
- case 1:
1008
- return 10;
1009
- case 2:
1010
- return 5;
1011
- case 3:
1012
- return 12;
1013
- case 4:
1014
- this.pushState("escaped_text");
1015
- return 18;
1016
- case 5:
1017
- return 20;
1018
- case 6:
1019
- this.popState("escaped_text");
1020
- return 18;
1021
- case 7:
1022
- return 19;
1023
- }
1024
- }, "anonymous"),
1025
- rules: [/^(?:sankey-beta\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
1026
- conditions: { "csv": { "rules": [1, 2, 3, 4, 5, 6, 7], "inclusive": false }, "escaped_text": { "rules": [6, 7], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7], "inclusive": true } }
1027
- };
1028
- return lexer2;
1029
- }();
1030
- parser2.lexer = lexer;
1031
- function Parser() {
1032
- this.yy = {};
1033
- }
1034
- __name(Parser, "Parser");
1035
- Parser.prototype = parser2;
1036
- parser2.Parser = Parser;
1037
- return new Parser();
1038
- }();
1039
- parser.parser = parser;
1040
- var sankey_default = parser;
1041
- var links = [];
1042
- var nodes = [];
1043
- var nodesMap = /* @__PURE__ */ new Map();
1044
- var clear2 = /* @__PURE__ */ __name(() => {
1045
- links = [];
1046
- nodes = [];
1047
- nodesMap = /* @__PURE__ */ new Map();
1048
- clear$2();
1049
- }, "clear");
1050
- var SankeyLink = (_a = class {
1051
- constructor(source, target, value2 = 0) {
1052
- this.source = source;
1053
- this.target = target;
1054
- this.value = value2;
1055
- }
1056
- }, __name(_a, "SankeyLink"), _a);
1057
- var addLink = /* @__PURE__ */ __name((source, target, value2) => {
1058
- links.push(new SankeyLink(source, target, value2));
1059
- }, "addLink");
1060
- var SankeyNode = (_b = class {
1061
- constructor(ID) {
1062
- this.ID = ID;
1063
- }
1064
- }, __name(_b, "SankeyNode"), _b);
1065
- var findOrCreateNode = /* @__PURE__ */ __name((ID) => {
1066
- ID = common_default.sanitizeText(ID, getConfig2());
1067
- let node = nodesMap.get(ID);
1068
- if (node === void 0) {
1069
- node = new SankeyNode(ID);
1070
- nodesMap.set(ID, node);
1071
- nodes.push(node);
1072
- }
1073
- return node;
1074
- }, "findOrCreateNode");
1075
- var getNodes = /* @__PURE__ */ __name(() => nodes, "getNodes");
1076
- var getLinks = /* @__PURE__ */ __name(() => links, "getLinks");
1077
- var getGraph = /* @__PURE__ */ __name(() => ({
1078
- nodes: nodes.map((node) => ({ id: node.ID })),
1079
- links: links.map((link2) => ({
1080
- source: link2.source.ID,
1081
- target: link2.target.ID,
1082
- value: link2.value
1083
- }))
1084
- }), "getGraph");
1085
- var sankeyDB_default = {
1086
- nodesMap,
1087
- getConfig: /* @__PURE__ */ __name(() => getConfig2().sankey, "getConfig"),
1088
- getNodes,
1089
- getLinks,
1090
- getGraph,
1091
- addLink,
1092
- findOrCreateNode,
1093
- getAccTitle,
1094
- setAccTitle,
1095
- getAccDescription,
1096
- setAccDescription,
1097
- getDiagramTitle,
1098
- setDiagramTitle,
1099
- clear: clear2
1100
- };
1101
- var Uid = (_c = class {
1102
- static next(name) {
1103
- return new _c(name + ++_c.count);
1104
- }
1105
- constructor(id) {
1106
- this.id = id;
1107
- this.href = `#${id}`;
1108
- }
1109
- toString() {
1110
- return "url(" + this.href + ")";
1111
- }
1112
- }, __name(_c, "Uid"), _c.count = 0, _c);
1113
- var alignmentsMap = {
1114
- left,
1115
- right,
1116
- center,
1117
- justify
1118
- };
1119
- var draw = /* @__PURE__ */ __name(function(text, id, _version, diagObj) {
1120
- const { securityLevel, sankey: conf } = getConfig2();
1121
- const defaultSankeyConfig = defaultConfig2.sankey;
1122
- let sandboxElement;
1123
- if (securityLevel === "sandbox") {
1124
- sandboxElement = select("#i" + id);
1125
- }
1126
- const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
1127
- const svg = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : select(`[id="${id}"]`);
1128
- const width = (conf == null ? void 0 : conf.width) ?? defaultSankeyConfig.width;
1129
- const height = (conf == null ? void 0 : conf.height) ?? defaultSankeyConfig.width;
1130
- const useMaxWidth = (conf == null ? void 0 : conf.useMaxWidth) ?? defaultSankeyConfig.useMaxWidth;
1131
- const nodeAlignment = (conf == null ? void 0 : conf.nodeAlignment) ?? defaultSankeyConfig.nodeAlignment;
1132
- const prefix = (conf == null ? void 0 : conf.prefix) ?? defaultSankeyConfig.prefix;
1133
- const suffix = (conf == null ? void 0 : conf.suffix) ?? defaultSankeyConfig.suffix;
1134
- const showValues = (conf == null ? void 0 : conf.showValues) ?? defaultSankeyConfig.showValues;
1135
- const graph = diagObj.db.getGraph();
1136
- const nodeAlign = alignmentsMap[nodeAlignment];
1137
- const nodeWidth = 10;
1138
- const sankey = Sankey().nodeId((d) => d.id).nodeWidth(nodeWidth).nodePadding(10 + (showValues ? 15 : 0)).nodeAlign(nodeAlign).extent([
1139
- [0, 0],
1140
- [width, height]
1141
- ]);
1142
- sankey(graph);
1143
- const colorScheme = ordinal(d3schemeTableau10);
1144
- svg.append("g").attr("class", "nodes").selectAll(".node").data(graph.nodes).join("g").attr("class", "node").attr("id", (d) => (d.uid = Uid.next("node-")).id).attr("transform", function(d) {
1145
- return "translate(" + d.x0 + "," + d.y0 + ")";
1146
- }).attr("x", (d) => d.x0).attr("y", (d) => d.y0).append("rect").attr("height", (d) => {
1147
- return d.y1 - d.y0;
1148
- }).attr("width", (d) => d.x1 - d.x0).attr("fill", (d) => colorScheme(d.id));
1149
- const getText = /* @__PURE__ */ __name(({ id: id2, value: value2 }) => {
1150
- if (!showValues) {
1151
- return id2;
1152
- }
1153
- return `${id2}
1154
- ${prefix}${Math.round(value2 * 100) / 100}${suffix}`;
1155
- }, "getText");
1156
- svg.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(graph.nodes).join("text").attr("x", (d) => d.x0 < width / 2 ? d.x1 + 6 : d.x0 - 6).attr("y", (d) => (d.y1 + d.y0) / 2).attr("dy", `${showValues ? "0" : "0.35"}em`).attr("text-anchor", (d) => d.x0 < width / 2 ? "start" : "end").text(getText);
1157
- const link2 = svg.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(graph.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply");
1158
- const linkColor = (conf == null ? void 0 : conf.linkColor) ?? "gradient";
1159
- if (linkColor === "gradient") {
1160
- const gradient = link2.append("linearGradient").attr("id", (d) => (d.uid = Uid.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (d) => d.source.x1).attr("x2", (d) => d.target.x0);
1161
- gradient.append("stop").attr("offset", "0%").attr("stop-color", (d) => colorScheme(d.source.id));
1162
- gradient.append("stop").attr("offset", "100%").attr("stop-color", (d) => colorScheme(d.target.id));
1163
- }
1164
- let coloring;
1165
- switch (linkColor) {
1166
- case "gradient":
1167
- coloring = /* @__PURE__ */ __name((d) => d.uid, "coloring");
1168
- break;
1169
- case "source":
1170
- coloring = /* @__PURE__ */ __name((d) => colorScheme(d.source.id), "coloring");
1171
- break;
1172
- case "target":
1173
- coloring = /* @__PURE__ */ __name((d) => colorScheme(d.target.id), "coloring");
1174
- break;
1175
- default:
1176
- coloring = linkColor;
1177
- }
1178
- link2.append("path").attr("d", d3SankeyLinkHorizontal()).attr("stroke", coloring).attr("stroke-width", (d) => Math.max(1, d.width));
1179
- setupGraphViewbox(void 0, svg, 0, useMaxWidth);
1180
- }, "draw");
1181
- var sankeyRenderer_default = {
1182
- draw
1183
- };
1184
- var prepareTextForParsing = /* @__PURE__ */ __name((text) => {
1185
- const textToParse = text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, "\n").trim();
1186
- return textToParse;
1187
- }, "prepareTextForParsing");
1188
- var getStyles = /* @__PURE__ */ __name((options) => `.label {
1189
- font-family: ${options.fontFamily};
1190
- }`, "getStyles");
1191
- var styles_default = getStyles;
1192
- var originalParse = sankey_default.parse.bind(sankey_default);
1193
- sankey_default.parse = (text) => originalParse(prepareTextForParsing(text));
1194
- var diagram = {
1195
- styles: styles_default,
1196
- parser: sankey_default,
1197
- db: sankeyDB_default,
1198
- renderer: sankeyRenderer_default
1199
- };
1200
-
1201
- export { diagram };