dimcode-web 0.0.0-stage → 0.1.0-alpha.11

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 (218) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +13 -4
  3. package/release-manifest.json +227 -0
  4. package/web/assets/CodeBlockNode-BExJacPr.js +43 -0
  5. package/web/assets/PreCodeBlock-CS3fZBao.js +1 -0
  6. package/web/assets/Tooltip-B1Jun8pl.js +1 -0
  7. package/web/assets/andromeeda-C4gqWexZ.js +1 -0
  8. package/web/assets/angular-html-BpR8Pn47.js +1 -0
  9. package/web/assets/arc-oZVymZ-6.js +1 -0
  10. package/web/assets/architectureDiagram-3BPJPVTR-Bdsx3Rrl.js +36 -0
  11. package/web/assets/aurora-x-D-2ljcwZ.js +1 -0
  12. package/web/assets/ayu-dark-DYE7WIF3.js +1 -0
  13. package/web/assets/ayu-light-BA47KaF1.js +1 -0
  14. package/web/assets/ayu-mirage-32ctXXKs.js +1 -0
  15. package/web/assets/blockDiagram-GPEHLZMM-BK2IeRUA.js +132 -0
  16. package/web/assets/c-BIGW1oBm.js +1 -0
  17. package/web/assets/c4Diagram-AAUBKEIU-DMleCZQv.js +10 -0
  18. package/web/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  19. package/web/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  20. package/web/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  21. package/web/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  22. package/web/assets/channel-DGamL3Zm.js +1 -0
  23. package/web/assets/chunk-2J33WTMH-DqhOMsnJ.js +1 -0
  24. package/web/assets/chunk-4BX2VUAB-eVCJx28A.js +1 -0
  25. package/web/assets/chunk-55IACEB6-DEbLCIoP.js +1 -0
  26. package/web/assets/chunk-727SXJPM-GwPb-eQY.js +206 -0
  27. package/web/assets/chunk-AQP2D5EJ-BFlYl-9N.js +231 -0
  28. package/web/assets/chunk-FMBD7UC4-5QtzaUQO.js +15 -0
  29. package/web/assets/chunk-ND2GUHAM-CySCSlmy.js +1 -0
  30. package/web/assets/chunk-QZHKN3VN-DNkBno1P.js +1 -0
  31. package/web/assets/classDiagram-4FO5ZUOK-nWhIUIyS.js +1 -0
  32. package/web/assets/classDiagram-v2-Q7XG4LA2-nWhIUIyS.js +1 -0
  33. package/web/assets/cmake-D1j8_8rp.js +1 -0
  34. package/web/assets/cose-bilkent-S5V4N54A-Cqajiw-2.js +1 -0
  35. package/web/assets/cpp-B-lmv-kZ.js +1 -0
  36. package/web/assets/csharp-COcwbKMJ.js +1 -0
  37. package/web/assets/css-DPfMkruS.js +1 -0
  38. package/web/assets/csv-fuZLfV_i.js +1 -0
  39. package/web/assets/cynefin-OW5HDTMX-CGp-_RPy.js +178 -0
  40. package/web/assets/cytoscape.esm-Ix0LnXOy.js +331 -0
  41. package/web/assets/dagre-BM42HDAG-BScsLv8J.js +4 -0
  42. package/web/assets/dark-plus-C3mMm8J8.js +1 -0
  43. package/web/assets/defaultLocale-DX6XiGOO.js +1 -0
  44. package/web/assets/diagram-2AECGRRQ-e16PRdi7.js +43 -0
  45. package/web/assets/diagram-5GNKFQAL-DuWJHiuL.js +10 -0
  46. package/web/assets/diagram-KO2AKTUF-C1E0cLdw.js +3 -0
  47. package/web/assets/diagram-LMA3HP47-CyF5HRCw.js +24 -0
  48. package/web/assets/diagram-OG6HWLK6-aUfbCvvL.js +24 -0
  49. package/web/assets/diff-D97Zzqfu.js +1 -0
  50. package/web/assets/docker-BcOcwvcX.js +1 -0
  51. package/web/assets/dracula-BzJJZx-M.js +1 -0
  52. package/web/assets/dracula-soft-BXkSAIEj.js +1 -0
  53. package/web/assets/elixir-CDX3lj18.js +1 -0
  54. package/web/assets/erDiagram-TEJ5UH35-DnVqKEfD.js +85 -0
  55. package/web/assets/erlang-DsQrWhSR.js +1 -0
  56. package/web/assets/everforest-dark-BgDCqdQA.js +1 -0
  57. package/web/assets/everforest-light-C8M2exoo.js +1 -0
  58. package/web/assets/extended-p72mFE2C.js +1 -0
  59. package/web/assets/floating-ui.dom-rMPa4aDr.js +1 -0
  60. package/web/assets/flowDiagram-I6XJVG4X-00TiWiHH.js +162 -0
  61. package/web/assets/ganttDiagram-6RSMTGT7-DhmsSHDy.js +292 -0
  62. package/web/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  63. package/web/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  64. package/web/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  65. package/web/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  66. package/web/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
  67. package/web/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
  68. package/web/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
  69. package/web/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  70. package/web/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
  71. package/web/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
  72. package/web/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  73. package/web/assets/gitGraphDiagram-PVQCEYII-DebPzL-q.js +106 -0
  74. package/web/assets/github-dark-DHJKELXO.js +1 -0
  75. package/web/assets/github-dark-default-Cuk6v7N8.js +1 -0
  76. package/web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  77. package/web/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  78. package/web/assets/github-light-DAi9KRSo.js +1 -0
  79. package/web/assets/github-light-default-D7oLnXFd.js +1 -0
  80. package/web/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  81. package/web/assets/go-CxLEBnE3.js +1 -0
  82. package/web/assets/graph-CAnANduQ.js +1 -0
  83. package/web/assets/graphql-ChdNCCLP.js +1 -0
  84. package/web/assets/groovy-gcz8RCvz.js +1 -0
  85. package/web/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  86. package/web/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  87. package/web/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  88. package/web/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  89. package/web/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  90. package/web/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  91. package/web/assets/haskell-Df6bDoY_.js +1 -0
  92. package/web/assets/hcl-BWvSN4gD.js +1 -0
  93. package/web/assets/horizon-BUw7H-hv.js +1 -0
  94. package/web/assets/horizon-bright-Cn-bp-IR.js +1 -0
  95. package/web/assets/houston-DnULxvSX.js +1 -0
  96. package/web/assets/html-GMplVEZG.js +1 -0
  97. package/web/assets/index-B0sf41uB.js +329 -0
  98. package/web/assets/index-D6IZb5kR.css +1 -0
  99. package/web/assets/index-RWtzc3nz.js +220 -0
  100. package/web/assets/index-Zlr3P937.js +220 -0
  101. package/web/assets/index10-DMROqqrK.js +8 -0
  102. package/web/assets/index5-A4hqyBCh.js +1 -0
  103. package/web/assets/index6-gqTWHimn.js +1 -0
  104. package/web/assets/index8-Jm7D2Uuu.js +2 -0
  105. package/web/assets/index9-DhsBkPMm.js +1 -0
  106. package/web/assets/infoDiagram-5YYISTIA-BlWEgGgR.js +2 -0
  107. package/web/assets/ini-BEwlwnbL.js +1 -0
  108. package/web/assets/init-Gi6I4Gst.js +1 -0
  109. package/web/assets/ishikawaDiagram-YF4QCWOH-D2U9WN2D.js +70 -0
  110. package/web/assets/java-CylS5w8V.js +1 -0
  111. package/web/assets/javascript-wDzz0qaB.js +1 -0
  112. package/web/assets/journeyDiagram-JHISSGLW-CKb3VgZk.js +139 -0
  113. package/web/assets/json-Cp-IABpG.js +1 -0
  114. package/web/assets/json5-C9tS-k6U.js +1 -0
  115. package/web/assets/jsonc-Des-eS-w.js +1 -0
  116. package/web/assets/jsx-g9-lgVsj.js +1 -0
  117. package/web/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  118. package/web/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  119. package/web/assets/kanagawa-wave-DWedfzmr.js +1 -0
  120. package/web/assets/kanban-definition-UN3LZRKU-CtxT87gS.js +89 -0
  121. package/web/assets/katex-C5jXJg4s.js +257 -0
  122. package/web/assets/kotlin-BdnUsdx6.js +1 -0
  123. package/web/assets/laserwave-DUszq2jm.js +1 -0
  124. package/web/assets/latex-CR2LgHuU.js +1 -0
  125. package/web/assets/layout-DGIYPm2g.js +1 -0
  126. package/web/assets/layout-DloY-SLW.js +4 -0
  127. package/web/assets/light-plus-B7mTdjB0.js +1 -0
  128. package/web/assets/linear-Ddk7u-wL.js +1 -0
  129. package/web/assets/lua-BaeVxFsk.js +1 -0
  130. package/web/assets/make-CHLpvVh8.js +1 -0
  131. package/web/assets/markdown-Cvjx9yec.js +1 -0
  132. package/web/assets/markstream-B2Peo11i.js +7 -0
  133. package/web/assets/material-theme-D5KoaKCx.js +1 -0
  134. package/web/assets/material-theme-darker-BfHTSMKl.js +1 -0
  135. package/web/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  136. package/web/assets/material-theme-ocean-CyktbL80.js +1 -0
  137. package/web/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  138. package/web/assets/mermaid.core-CIDPCsfA.js +309 -0
  139. package/web/assets/mhchem-MNFFEueS.js +1 -0
  140. package/web/assets/min-dark-CafNBF8u.js +1 -0
  141. package/web/assets/min-light-CTRr51gU.js +1 -0
  142. package/web/assets/mindmap-definition-RKZ34NQL-veskSkgC.js +96 -0
  143. package/web/assets/monokai-D4h5O-jR.js +1 -0
  144. package/web/assets/nginx-BpAMiNFr.js +1 -0
  145. package/web/assets/night-owl-C39BiMTA.js +1 -0
  146. package/web/assets/night-owl-light-CMTm3GFP.js +1 -0
  147. package/web/assets/nord-Ddv68eIx.js +1 -0
  148. package/web/assets/objective-c-DXmwc3jG.js +1 -0
  149. package/web/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  150. package/web/assets/one-light-C3Wv6jpd.js +1 -0
  151. package/web/assets/ordinal-Cboi1Yqb.js +1 -0
  152. package/web/assets/perl-C0TMdlhV.js +1 -0
  153. package/web/assets/php-Dhbhpdrm.js +1 -0
  154. package/web/assets/pieDiagram-4H26LBE5-BOU-b_Ew.js +30 -0
  155. package/web/assets/pierre-dark-CyvmCCZW.js +1 -0
  156. package/web/assets/pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js +1 -0
  157. package/web/assets/pierre-dark-soft-BHGpRqa4.js +1 -0
  158. package/web/assets/pierre-dark-tritanopia-Beq2gCRQ.js +1 -0
  159. package/web/assets/pierre-dark-vibrant-BWBVywrn.js +1 -0
  160. package/web/assets/pierre-light-480U9XYS.js +1 -0
  161. package/web/assets/pierre-light-protanopia-deuteranopia-CaVOBURG.js +1 -0
  162. package/web/assets/pierre-light-soft-CVdyfjmI.js +1 -0
  163. package/web/assets/pierre-light-tritanopia-B4_gpKOM.js +1 -0
  164. package/web/assets/pierre-light-vibrant-DdTDNdfJ.js +1 -0
  165. package/web/assets/plastic-3e1v2bzS.js +1 -0
  166. package/web/assets/poimandres-CS3Unz2-.js +1 -0
  167. package/web/assets/powershell-Dpen1YoG.js +1 -0
  168. package/web/assets/preCodeDiffMetrics-6xZ6qvnP.js +1 -0
  169. package/web/assets/proto-C7zT0LnQ.js +1 -0
  170. package/web/assets/python-B6aJPvgy.js +1 -0
  171. package/web/assets/quadrantDiagram-W4KKPZXB-BSS1N1TF.js +7 -0
  172. package/web/assets/r-Dspwwk_N.js +1 -0
  173. package/web/assets/red-bN70gL4F.js +1 -0
  174. package/web/assets/regexp-CDVJQ6XC.js +1 -0
  175. package/web/assets/requirementDiagram-4Y6WPE33-DsN8PjFw.js +84 -0
  176. package/web/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  177. package/web/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  178. package/web/assets/rose-pine-qdsjHGoJ.js +1 -0
  179. package/web/assets/ruby-BymL1q8G.js +1 -0
  180. package/web/assets/rust-B1yitclQ.js +1 -0
  181. package/web/assets/sankeyDiagram-5OEKKPKP-CnW7IbtR.js +40 -0
  182. package/web/assets/scala-C151Ov-r.js +1 -0
  183. package/web/assets/scss-OYdSNvt2.js +1 -0
  184. package/web/assets/sequenceDiagram-3UESZ5HK-DrDAXqp6.js +162 -0
  185. package/web/assets/shellscript-Yzrsuije.js +1 -0
  186. package/web/assets/slack-dark-BthQWCQV.js +1 -0
  187. package/web/assets/slack-ochin-DqwNpetd.js +1 -0
  188. package/web/assets/snazzy-light-Bw305WKR.js +1 -0
  189. package/web/assets/solarized-dark-DXbdFlpD.js +1 -0
  190. package/web/assets/solarized-light-L9t79GZl.js +1 -0
  191. package/web/assets/sql-BLtJtn59.js +1 -0
  192. package/web/assets/stateDiagram-AJRCARHV-DlPqWlqf.js +1 -0
  193. package/web/assets/stateDiagram-v2-BHNVJYJU-bvuvx9tw.js +1 -0
  194. package/web/assets/svelte-DZMnMd3x.js +1 -0
  195. package/web/assets/swift-D82vCrfD.js +1 -0
  196. package/web/assets/synthwave-84-CbfX1IO0.js +1 -0
  197. package/web/assets/timeline-definition-PNZ67QCA-DpzLLOwj.js +120 -0
  198. package/web/assets/tokyo-night-hegEt444.js +1 -0
  199. package/web/assets/toml-vGWfd6FD.js +1 -0
  200. package/web/assets/tsx-COt5Ahok.js +1 -0
  201. package/web/assets/typescript-BPQ3VLAy.js +1 -0
  202. package/web/assets/unused-optional-NNwleJvF.js +1 -0
  203. package/web/assets/vendor-vue-C21-5sm4.js +53 -0
  204. package/web/assets/vennDiagram-CIIHVFJN-BFiOUoie.js +34 -0
  205. package/web/assets/vesper-DU1UobuO.js +1 -0
  206. package/web/assets/vitesse-black-Bkuqu6BP.js +1 -0
  207. package/web/assets/vitesse-dark-D0r3Knsf.js +1 -0
  208. package/web/assets/vitesse-light-CVO1_9PV.js +1 -0
  209. package/web/assets/vue-DVfSmUF7.js +1 -0
  210. package/web/assets/wardleyDiagram-YWT4CUSO-CF-vWJdt.js +78 -0
  211. package/web/assets/xml-sdJ4AIDG.js +1 -0
  212. package/web/assets/xychartDiagram-2RQKCTM6-ko8fvtbV.js +7 -0
  213. package/web/assets/yaml-Buea-lGh.js +1 -0
  214. package/web/assets/zh-CN-Ctd5q_Jn.js +1 -0
  215. package/web/assets/zig-VOosw3JB.js +1 -0
  216. package/web/dimcode-web.json +5 -0
  217. package/web/index.html +44 -0
  218. package/README.md +0 -3
@@ -0,0 +1,8 @@
1
+ import{d as Vl,r as m,y as Yl,x as Xl,w as j,o as yl,m as Zl,k as I,B as Kl,a as T,p as B,q as Ft,b as u,z as h,t as Ke,i as oe,s as we,n as ht,g as Gl,v as Jl,E as kl,F as xl,c as Ql,e as en,f as tn,A as ln,T as nn,j as rn,u as O}from"./vendor-vue-C21-5sm4.js";import{N as jt,a as an,d as on,s as un,o as sn,f as cn,l as dn,Z as bl,i as zt,O as Ml,Y as Tl,R as vn,r as At,c as mn,S as fn,T as hn,U as gn,V as pn,W as wn,m as yn,_ as kn}from"./index-RWtzc3nz.js";import"./index-Zlr3P937.js";function xn(d,f){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,f-12),f))}function El(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function bn(d){const f=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(f)||(function(y){const A=y.split(";",1)[0],o=A.indexOf(":");return o>0&&El(A.slice(0,o))})(f)}function Mn(d){if(!d.includes(";"))return d;const f=d.indexOf(":");if(f===-1||!(function(D,ee){const k=D.slice(0,ee);return/^\s*Note\b/i.test(k)||El(k)})(d,f))return d;const y=d.slice(0,f+1),A=d.slice(f+1),o=(function(D){let ee="",k=!1;for(let E=0;E<D.length;E++){const te=D[E];te!==";"||xn(D,E)||bn(D.slice(E+1))?ee+=te:(ee+="#59;",k=!0)}return k?ee:D})(A);return o===A?d:`${y}${o}`}function Ht(d){if(jt(d)!=="sequencediagram")return d;const f=d.split(/(\r\n|\n|\r)/);let y=!1;for(let A=0;A<f.length;A+=2){const o=f[A],D=Mn(o);D!==o&&(f[A]=D,y=!0)}return y?f.join(""):d}var Tn=Object.defineProperty,Cn=Object.defineProperties,Bn=Object.getOwnPropertyDescriptors,Cl=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,Sn=Math.pow,Bl=(d,f,y)=>f in d?Tn(d,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[f]=y,Ol=(d,f)=>{for(var y in f||(f={}))On.call(f,y)&&Bl(d,y,f[y]);if(Cl)for(var y of Cl(f))En.call(f,y)&&Bl(d,y,f[y]);return d},C=(d,f,y)=>new Promise((A,o)=>{var D=E=>{try{k(y.next(E))}catch(te){o(te)}},ee=E=>{try{k(y.throw(E))}catch(te){o(te)}},k=E=>E.done?A(E.value):Promise.resolve(E.value).then(D,ee);k((y=y.apply(d,f)).next())});const $n=["data-markstream-mode","data-markstream-pending"],Pn={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Dn={key:0},Rn={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Fn=["innerHTML"],zn={key:2},An={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Hn={class:"flex items-center gap-x-1"},Ln={class:"flex items-center gap-x-1"},jn={key:4},_n={key:5,class:"mermaid-header-actions flex items-center"},Nn=["aria-pressed"],In={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Wn={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},qn=["aria-label","disabled"],Un=["aria-label","disabled"],Vn={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Yn={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Xn={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Zn={key:1,class:"relative"},Kn={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Gn={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Jn={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Qn={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},gt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",Lt=an(Vl({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},fitPreviewHeight:{type:Boolean,default:!1},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:f}){var y,A;const o=d,D=f,ee={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style","br"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=m(!1),E=m(typeof window>"u"),te=on(),_t=un(),Oe=O(()=>o.isStrict?"strict":"loose"),Sl=O(()=>({startOnLoad:!1,securityLevel:Oe.value,dompurifyConfig:Oe.value==="strict"?ee:void 0,htmlLabels:Oe.value!=="strict"&&void 0,flowchart:Oe.value==="strict"?{htmlLabels:!1}:void 0}));function ye(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Ee(e,t,l={}){if(!e)return null;const n=(function(r,a){if(!r)return null;const c=wn(a);if(!c)return null;const g=(function(i,s){const w=Array.from(i.childNodes),S=document.createElement("div");return S.dataset.mermaidSvgLayer="1",S.style.zIndex="1",S.appendChild(s),i.insertBefore(S,i.firstChild),w.length>0&&(function(U){const z=()=>{var X;for(const Z of U)(X=Z.parentNode)==null||X.removeChild(Z)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(z)}):setTimeout(z,32)})(w),S})(r,c);return{svg:c.outerHTML,bindTarget:g}})(e,t);return n||l.keepPreviousOnFailure||ye(e),n}let ie=null;function ke(e){if(o.enableMermaidInteractions&&(e!=null&&e.querySelector("svg")))try{ie==null||ie(e)}catch{}}const{t:p}=sn();let ue=!1,xe=0;function Ge(){return C(this,null,function*(){try{const e=yield gn();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(E.value=!0)}})}const Je=m(!1),V=m(!1),Qe=m(),K=m(),v=m(),se=m(),et=m(null),$l=cn(),He=m(null),ce=m(typeof window>"u"||!te.value),Pl=Yl(),le=Xl(dn,null);let de="",be=0,tt=0;const Nt=O(()=>yn(o,Pl));function pt(){const e=Nt.value;e&&(de&&de!==e&&(le==null||le.markSettled(de),be=0),de=e,be+=1,tt+=1,be===1&&(le==null||le.markPending(e)))}function wt(){return C(this,null,function*(){const e=de;if(!e||(be=Math.max(0,be-1),be>0))return;de="";const t=++tt;yield I(),t===tt&&((function(l=Nt.value){l&&Qe.value&&(le==null||le.reportHeight(l,Qe.value.offsetHeight))})(e),le==null||le.markSettled(e))})}function It(){const e=de;e&&(de="",be=0,tt+=1,le==null||le.markSettled(e))}const Wt=m(),R=O(()=>o.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Dl(e,t=R.value){const l=t,n={theme:e==="dark"?"dark":"default"};Oe.value==="strict"&&(n.htmlLabels=!1,n.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(n)}}%%
2
+ `;return l.trim().startsWith("%%{")?l:r+l}const Rl=O(()=>{var e;return(e=At(o.estimatedPreviewHeightPx))!=null?e:hn(R.value)});function qt(){return(function(e){const t=(function(){var n;const r=K.value?getComputedStyle(K.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(n=At(r))!=null?n:360})(),l=ul();return fn(e,t,l)})(Rl.value)}function yt(){return`${qt()}px`}const Le=m(null);function lt(){var e;return!!((e=v.value)!=null&&e.querySelector("svg"))}function Ut(){return o.loading!==!1&&(lt()||!!Le.value)}const b=m(1),W=m(0),q=m(0),Vt=m(!1),x=m(!0),je=m(!1),re=m(!1),ve=m(null),kt=m(!1);let _e=null;function Yt(){_e!=null&&(clearTimeout(_e),_e=null)}j([ce,E],([e,t])=>{Yt(),kt.value=!1,e&&!t&&(_e=setTimeout(()=>{_e=null,kt.value=!0},15e3))},{immediate:!0});const Fl=O(()=>{if((!E.value||k.value)&&x.value&&!je.value&&!kt.value)return yt()});let xt="",bt=!1,me="";const nt=m(0),Mt=m(!1),zl=O(()=>{var e;return Math.max(0,(e=o.renderDebounceMs)!=null?e:300)}),Al=O(()=>{var e;return Math.max(0,(e=o.contentStableDelayMs)!=null?e:500)}),Ne=O(()=>{var e;return Math.max(120,(e=o.previewPollDelayMs)!=null?e:800)}),Hl=O(()=>{var e;return Math.max(Ne.value,(e=o.previewPollMaxDelayMs)!=null?e:4e3)}),Xt=O(()=>{var e;return Math.max(1,Math.trunc((e=o.previewPollMaxAttempts)!=null?e:12))}),fe=O(()=>o.loading!==!1);let Ie=null,We=null,Se=null,$e=null,qe=0;const Zt=(y=globalThis.requestIdleCallback)!=null?y:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),Kt=(A=globalThis.cancelIdleCallback)!=null?A:e=>clearTimeout(e);function M(e=xe){return!ue&&e===xe}function H(){return M()&&ce.value&&!V.value}function Tt(){Se!=null&&(globalThis.clearTimeout(Se),Se=null),$e!=null&&(Kt($e),$e=null)}function Ue(){ue||Se==null&&$e==null&&(Se=globalThis.setTimeout(()=>{Se=null,H()&&($e=Zt(()=>{$e=null,H()&&pl()},{timeout:500}))},zl.value))}function Ve(){We!=null&&(globalThis.clearTimeout(We),We=null)}function Gt(e=600){if(typeof globalThis>"u"||ue)return;const t=Math.max(0,e);Ve(),We=globalThis.setTimeout(()=>{if(We=null,!ue){if(o.loading||re.value||!H())return void Gt(Math.min(1200,Math.max(300,1.2*t)));Ue()}},t)}const _=m(yt()),rt=m(_.value),Ll=O(()=>o.fitPreviewHeight?`${Ml}px`:void 0);let Pe=null;const $=m(!1),G=m(!1),he=m({}),ge=m(0);let Y=null,De=null;const N=m(!1),jl=O(()=>{var e,t;return!(V.value||x.value||E.value&&!re.value&&!ve.value&&($.value||N.value&&((t=(e=v.value)==null?void 0:e.textContent)!=null&&t.trim())))}),Me=m({zoom:1,translateX:0,translateY:0,containerHeight:_.value}),Jt=O(()=>o.enableWheelZoom?{wheel:Nl}:{}),J=O(()=>{var e,t,l,n;return{worker:(e=o.workerTimeoutMs)!=null?e:1400,parse:(t=o.parseTimeoutMs)!=null?t:1800,render:(l=o.renderTimeoutMs)!=null?l:2500,fullRender:(n=o.fullRenderTimeoutMs)!=null?n:4e3}});let Re=null,at=null,Fe=!1,Te=Ne.value,ne=null,ot=0,Ct=!0,it=0;function Ce(e,t){const l=t==null?void 0:t.timeoutMs,n=t==null?void 0:t.signal;if(n!=null&&n.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,a=!1,c=null;return new Promise((g,i)=>{const s=()=>{r!=null&&clearTimeout(r),c&&n&&n.removeEventListener("abort",c)};l&&l>0&&(r=globalThis.setTimeout(()=>{a||(a=!0,s(),i(new Error("Operation timed out")))},l)),n&&(c=()=>{a||(a=!0,s(),i(new DOMException("Aborted","AbortError")))},n.addEventListener("abort",c)),e().then(w=>{a||(a=!0,s(),g(w))}).catch(w=>{a||(a=!0,s(),i(w))})})}function Qt(e){if(typeof document>"u"||!v.value)return;if(typeof o.onRenderError=="function"&&o.onRenderError(e,R.value,v.value)===!0)return N.value=!0,void L();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const l=document.createElement("span");l.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(l),ye(v.value),v.value.appendChild(t);const n=v.value?getComputedStyle(v.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";_.value=n||"360px",rt.value=_.value,N.value=!0,L()}function el(e){const t=typeof e=="string"?e:typeof(e==null?void 0:e.message)=="string"?e.message:"";return typeof t=="string"&&/timed out/i.test(t)}function tl(e){return(e==null?void 0:e.name)==="AbortError"}function Bt(e){return!el(e)&&!tl(e)}typeof window<"u"&&j([()=>Qe.value,te],([e,t])=>{var l;if((l=He.value)==null||l.destroy(),He.value=null,!t||ce.value)return void(ce.value=!0);if(!e)return void(ce.value=!1);const n=$l(e,{rootMargin:_t==null?void 0:_t.value.heavyBlockMargin,allowIdle:!1});He.value=n,ce.value=n.isVisible.value,n.whenVisible.then(()=>{ce.value=!0})},{immediate:!0}),yl(()=>{var e;ue=!0,xe+=1,ge.value+=1,(e=He.value)==null||e.destroy(),He.value=null,It(),Tt()});const ut=O(()=>o.showTooltips!==!1);function ll(e){return!e||e.disabled}function F(e,t,l="top"){if(!ut.value||ll(e.currentTarget))return;const n=e,r=(n==null?void 0:n.clientX)!=null&&(n==null?void 0:n.clientY)!=null?{x:n.clientX,y:n.clientY}:void 0;Tl(e.currentTarget,t,l,!1,r,o.isDark)}function P(){ut.value&&bl()}function nl(e){if(!ut.value||ll(e.currentTarget))return;const t=Je.value?p("common.copied")||"Copied":p("common.copy")||"Copy",l=e,n=(l==null?void 0:l.clientX)!=null&&(l==null?void 0:l.clientY)!=null?{x:l.clientX,y:l.clientY}:void 0;Tl(e.currentTarget,t,"top",!1,n,o.isDark)}function rl(e,t){const l={theme:t==="dark"?"dark":"default"};Oe.value==="strict"&&(l.htmlLabels=!1,l.flowchart={htmlLabels:!1});const n=`%%{init: ${JSON.stringify(l)}}%%
3
+ `;return e.trimStart().startsWith("%%{")?e:n+e}function st(){return Ct&&!x.value&&!$.value&&!N.value}function al(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Ot(e){if(jt(e)==="gantt")return(function(l){var n;const r=l.split(/\r?\n/);for(!/\r?\n$/.test(l)&&r.length>0&&r.pop();r.length>0;){const a=(n=r[r.length-1])==null?void 0:n.trim();if(a&&!a.startsWith("%%")){if(al(a))break;r.pop()}else r.pop()}return r.some(al)?r.join(`
4
+ `):""})(e);const t=e.split(/\r?\n/);for(;t.length>0;){const l=t[t.length-1].trimEnd();if(l!==""){if(!(/^[-=~>|<\s]+$/.test(l.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(l)||/[-|><]$/.test(l)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(l)))break;t.pop()}else t.pop()}return t.join(`
5
+ `)}function ol(e,t,l,n){return C(this,null,function*(){try{return yield Ce(()=>e.render(t,l),{timeoutMs:n})}catch(r){if(!Bt(r))throw r;const a=Ht(l);if(a===l)throw r;try{return yield Ce(()=>e.render(`${t}-retry`,a),{timeoutMs:n})}catch{throw r}}})}function ct(e,t,l){return C(this,null,function*(){var n;try{return yield kn(e,t,(n=l==null?void 0:l.timeoutMs)!=null?n:J.value.worker,l==null?void 0:l.signal)}catch(r){if((r==null?void 0:r.name)==="AbortError")throw r;const a=(r==null?void 0:r.code)||(r==null?void 0:r.name);if(a!=="WORKER_BUSY"&&a!=="WORKER_TIMEOUT"&&a!=="WORKER_INIT_ERROR"&&a!=="MERMAID_DISABLED"&&a!=="WORKER_REPLACED"||r!=null&&r.fallbackToRenderer||a==="WORKER_TIMEOUT")return yield(function(c,g,i){return C(this,null,function*(){var s,w,S,U;const z=yield Ge();if(!z)return;const X=z,Z=rl(c,g);if(typeof X.parse=="function"){try{yield Ce(()=>X.parse(Z),{timeoutMs:(s=i==null?void 0:i.timeoutMs)!=null?s:J.value.parse,signal:i==null?void 0:i.signal})}catch(ae){if(!Bt(ae))throw ae;const Ze=Ht(Z);if(Ze===Z)throw ae;try{yield Ce(()=>X.parse(Ze),{timeoutMs:(w=i==null?void 0:i.timeoutMs)!=null?w:J.value.parse,signal:i==null?void 0:i.signal})}catch{throw ae}}return!0}const ft=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;try{yield Ce(()=>z.render(ft,Z),{timeoutMs:(S=i==null?void 0:i.timeoutMs)!=null?S:J.value.render,signal:i==null?void 0:i.signal})}catch(ae){if(!Bt(ae))throw ae;const Ze=Ht(Z);if(Ze===Z)throw ae;try{yield Ce(()=>z.render(`${ft}-retry`,Ze),{timeoutMs:(U=i==null?void 0:i.timeoutMs)!=null?U:J.value.render,signal:i==null?void 0:i.signal})}catch{throw ae}}return!0})})(e,t,l);throw r}})}function il(e,t,l){return C(this,null,function*(){var n;if(jt(e)==="gantt"){const a=Ot(e);if(!a.trim())return{fullOk:!1,prefixOk:!1};try{if(yield ct(a,t,l))return a===e?{fullOk:!0,prefixOk:!1}:{fullOk:!1,prefixOk:!0,prefix:a}}catch(c){if((c==null?void 0:c.name)==="AbortError")throw c}return{fullOk:!1,prefixOk:!1}}try{if(yield ct(e,t,l))return{fullOk:!0,prefixOk:!1}}catch(a){if((a==null?void 0:a.name)==="AbortError")throw a}let r=Ot(e);if(r&&r.trim()&&r!==e)try{try{const a=yield pn(e,t,(n=l==null?void 0:l.timeoutMs)!=null?n:J.value.worker,l==null?void 0:l.signal);a&&a.trim()&&(r=a)}catch{}if(yield ct(r,t,l))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(a){if((a==null?void 0:a.name)==="AbortError")throw a}return{fullOk:!1,prefixOk:!1}})}const dt=O(()=>x.value||re.value||V.value);function ul(){if(o.maxHeight==="none")return null;if(o.maxHeight!=null){const t=Number.parseFloat(String(o.maxHeight));if(Number.isFinite(t))return t}const e=K.value;if(e){const t=getComputedStyle(e).getPropertyValue("--ms-size-code-max-height").trim(),l=Number.parseFloat(t);if(Number.isFinite(l))return l}return 500}function Ye(e,t){if(!K.value||!v.value)return;const l=!(t!=null&&t.force)&&o.loading!==!1&&lt(),n=v.value.querySelector("svg");if(!n)return;let r=0,a=0;const c=n.getAttribute("viewBox"),g=n.getAttribute("width"),i=n.getAttribute("height");if(c){const s=c.split(" ");s.length===4&&(r=Number.parseFloat(s[2]),a=Number.parseFloat(s[3]))}if(r&&a||g&&i&&(r=Number.parseFloat(g),a=Number.parseFloat(i)),Number.isNaN(r)||Number.isNaN(a)||r<=0||a<=0)try{const s=n.getBBox();s&&s.width>0&&s.height>0&&(r=s.width,a=s.height)}catch(s){return void console.error("Failed to get SVG BBox:",s)}if(r>0&&a>0){const s=a/r,w=e??K.value.clientWidth,S=n.getBoundingClientRect().width,U=S>0?S/Math.max(.01,b.value):w,z=ul(),X=U*s,Z=z==null?X:Math.min(X,z),ft=o.fitPreviewHeight?vn(Z,Ml,z):Math.max(Z,qt());l||!o.fitPreviewHeight&&At(o.estimatedPreviewHeightPx)!=null||(_.value=`${ft}px`),rt.value=_.value}}const Q=m(!1),Et=O(()=>({transform:`translate(${W.value}px, ${q.value}px) scale(${b.value})`}));function sl(e){e.key==="Escape"&&Q.value&&$t()}function St(){var e;if(!K.value||!se.value)return!1;if(((e=se.value.firstElementChild)==null?void 0:e.getAttribute("data-mermaid-modal-clone"))==="1")return!0;const t=K.value.cloneNode(!0);t.dataset.mermaidModalClone="1",t.classList.add("fullscreen"),t.style.height="100%",t.style.maxHeight="100%";const l=t.querySelector("._mermaid");l&&(l.style.contain="none",l.style.contentVisibility="visible");const n=t.querySelector("[data-mermaid-wrapper]");return n&&(et.value=n,n.style.transform=Et.value.transform),ye(se.value),se.value.appendChild(t),ke(t),!0}function $t(){if(Q.value=!1,se.value&&ye(se.value),et.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",sl)}catch{}}function cl(){b.value<3&&(b.value+=.1)}function dl(){b.value>.5&&(b.value-=.1)}function vl(){b.value=1,W.value=0,q.value=0}j(se,e=>{Q.value&&e&&St()}),j(Et,e=>{Q.value&&et.value&&(et.value.style.transform=e.transform)},{immediate:!0});const Pt=O(()=>Q.value||b.value>1),ml=mn({getTranslate:()=>({x:W.value,y:q.value}),setTranslate:e=>{W.value=e.x,q.value=e.y},canStart:e=>!!lt()&&(e.pointerType!=="touch"||Pt.value),onActiveChange:e=>Vt.value=e}),vt=ml.start,_l=ml.stop;function Nl(e){if(o.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!K.value)return;const t=K.value.getBoundingClientRect(),l=e.clientX-t.left,n=e.clientY-t.top,r=l-t.width/2,a=n-t.height/2,c=(r-W.value)/b.value,g=(a-q.value)/b.value,i=.01,s=-e.deltaY*i,w=Math.min(Math.max(b.value+s,.5),3);w!==b.value&&(W.value=r-c*w,q.value=a-g*w,b.value=w)}}function Il(){return C(this,null,function*(){try{const e=R.value,t={payload:{type:"copy",text:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(D("copy",t),t.defaultPrevented)return;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(e)),Je.value=!0,setTimeout(()=>{Je.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})}function Wl(){var e;const t=(e=v.value)==null?void 0:e.querySelector("svg");if(!t)return void console.error("SVG element not found");const l=new XMLSerializer().serializeToString(t),n={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:t,svgString:l};D("export",n),n.defaultPrevented||(function(r,a=null){C(this,null,function*(){try{const c=a??new XMLSerializer().serializeToString(r),g=new Blob([c],{type:"image/svg+xml;charset=utf-8"}),i=URL.createObjectURL(g);if(typeof document<"u"){const s=document.createElement("a");s.href=i,s.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(s),s.click(),document.body.removeChild(s)}catch{}URL.revokeObjectURL(i)}}catch(c){console.error("Failed to export SVG:",c)}})})(t,l)}function ql(){var e,t;const l=(t=(e=v.value)==null?void 0:e.querySelector("svg"))!=null?t:null,n=l?new XMLSerializer().serializeToString(l):null,r={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:l,svgString:n};D("openModal",r),r.defaultPrevented||(function(){if(Q.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",sl)}catch{}I(()=>{St()||I(St)})})()}function fl(e){const t={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};D("toggleMode",e,t),t.defaultPrevented||hl(e)}function hl(e){return C(this,null,function*(){const t=Wt.value;if(!t)return je.value=!0,void(x.value=e==="source");const l=t.getBoundingClientRect().height;t.style.height=`${l}px`,t.style.overflow="hidden",je.value=!0,x.value=e==="source",yield I();const n=t.scrollHeight;t.style.transition="height var(--ms-duration-standard) var(--ms-ease-standard)",t.offsetHeight,t.style.height=`${n}px`;const r=()=>{t.style.transition="",t.style.height="",t.style.overflow="",t.removeEventListener("transitionend",a)};function a(){r()}t.addEventListener("transitionend",a),setTimeout(()=>r(),220)})}function pe(e=R.value,t=o.isDark?"dark":"light",l=o.loading===!1){return{code:e,codeWithTheme:Dl(t,e),final:l,signature:`${t}\0${e}`,theme:t}}function ze(e){return e.signature===pe().signature}function Be(){return C(this,arguments,function*(e=pe()){const t=xe;if(!M(t)||!ze(e))return!1;if(re.value){const l=ve.value,n=bt,r=xt;if(!l)return!1;const a=yield l;return!(!M(t)||!ze(e))&&(r===e.signature?!(!a||me!==e.signature)||!(!e.final||o.loading!==!1||n)&&Be(e):Be(e))}if(!v.value){if(yield I(),!M(t))return!1;if(!v.value)return console.warn("Mermaid container not ready"),!1}return!(!M(t)||!ze(e))&&(re.value=!0,bt=e.final,xt=e.signature,pt(),ve.value=C(null,null,function*(){var l,n,r,a;try{const c=yield Ge();if(!M(t)||!c)return!1;const g=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;$.value||G.value||(l=c.initialize)==null||l.call(c,(r=Ol({},Sl.value),a={dompurifyConfig:Ol({},ee)},Cn(r,Bn(a))));const i=yield ol(c,g,e.codeWithTheme,J.value.fullRender);if(!M(t)||!(function(S){return ze(S)||!S.final&&o.loading!==!1&&R.value.startsWith(S.code)})(e))return G.value&&(G.value=!1),!1;if(!v.value)return!1;const s=Ee(v.value,i==null?void 0:i.svg,{keepPreviousOnFailure:!e.final||o.loading!==!1});if(!s)return G.value&&(G.value=!1),!1;const w=(n=i==null?void 0:i.bindFunctions)!=null?n:null;return ie=w,ke(s.bindTarget),zt(()=>Ye()),$.value||G.value||($.value=!0,Me.value={zoom:b.value,translateX:W.value,translateY:q.value,containerHeight:_.value}),he.value[e.theme]={svg:s.svg,bindFunctions:w},G.value&&(G.value=!1),me=e.signature,Le.value=v.value.innerHTML,N.value=!1,qe=0,Ve(),!0}catch(c){if(!M(t)||!ze(e))return G.value&&(G.value=!1),!1;const g=el(c),i=qe+1;return g&&i<=3?(qe=i,Gt(Math.min(1200,600*i))):(qe=0,Ve(),e.final&&o.loading===!1&&console.error("Failed to render mermaid diagram:",c),e.final&&o.loading===!1&&Qt(c)),!1}finally{bt=!1,xt="",re.value=!1,ve.value=null,M(t)&&wt()}}),ve.value)})}function Ae(){return C(this,null,function*(){var e;const t=R.value;if(!t.trim())return Ut()?void 0:(v.value&&ye(v.value),Le.value=null,me="",void(N.value=!1));if(!k.value||!H())return;const l=pe(t);$.value&&l.signature===me&&((e=v.value)!=null&&e.querySelector("svg"))||(yield Be(l))&&(N.value=!1)})}function gl(e,t,l,n){return C(this,null,function*(){const r=xe;if(!M(r)||!st()||!v.value&&(yield I(),!M(r)||!v.value)||re.value)return;re.value=!0,pt();const a=pe(t,l),c=C(null,null,function*(){var g;try{const i=yield Ge();if(!M(r)||!i)return!1;const s=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,w=Ot(e),S=w&&w.trim()?w:e,U=yield ol(i,s,rl(S,l),J.value.render);if(!M(r)||ge.value!==n||o.loading===!1||!st()||!ze(a))return!1;const z=U==null?void 0:U.svg;if(!v.value||!z)return!1;const X=Ee(v.value,z,{keepPreviousOnFailure:!0});return!!X&&(ie=(g=U==null?void 0:U.bindFunctions)!=null?g:null,ke(X.bindTarget),zt(()=>Ye()),!1)}catch{return!1}finally{ve.value===c&&(re.value=!1,ve.value=null),M(r)&&wt()}});return ve.value=c,c})}function pl(){return C(this,null,function*(){var e;if(!H())return;const t=xe,l=Date.now(),n=++ge.value;pt();try{Y&&Y.abort(),Y=new AbortController;const r=Y.signal,a=o.isDark?"dark":"light",c=R.value;if(!c.trim())return Ut()?void 0:(v.value&&ye(v.value),Le.value=null,me="",void(N.value=!1));if(pe(c,a).signature===me)return;try{const i=yield il(c,a,{signal:r,timeoutMs:J.value.worker});if(!M(t))return;if(i.fullOk)return r.aborted||ge.value!==n||!(yield Be(pe(c,a)))?void 0:void(M(t)&&ge.value===n&&(N.value=!1));const s=ot&&l<=ot;if(i.prefixOk&&i.prefix&&!r.aborted&&ge.value===n&&st()&&!s)return void(yield gl(i.prefix,c,a,n))}catch(i){if((i==null?void 0:i.name)==="AbortError")return}if(!M(t)||ge.value!==n||N.value)return;const g=he.value[a];if(g&&v.value){const i=Ee(v.value,g.svg);i&&(ie=(e=g.bindFunctions)!=null?e:null,ke(i.bindTarget))}}finally{M(t)&&wt()}})}function L(){Fe&&(Fe=!1,Te=Ne.value,Ct=!1,ne&&(ne.abort(),ne=null),Re&&(globalThis.clearTimeout(Re),Re=null),at&&(Kt(at),at=null),ot=Date.now())}function Xe(){if(L(),Tt(),Y){try{Y.abort()}catch{}Y=null}if(ne){try{ne.abort()}catch{}ne=null}Ve(),qe=0}function Dt(){De==null||De.abort(),De=null}function Rt(e=Ne.value){Fe&&(it>=Xt.value?L():(Re&&globalThis.clearTimeout(Re),Re=globalThis.setTimeout(()=>{at=Zt(()=>C(null,null,function*(){if(!Fe)return;if(!H()||x.value||$.value)return void L();const t=o.isDark?"dark":"light",l=R.value;if(!l.trim())return o.loading===!1?void L():void Rt(Te);if(it++,it>Xt.value)L();else{ne&&ne.abort(),ne=new AbortController;try{const n=yield il(l,t,{signal:ne.signal,timeoutMs:J.value.worker});if(n.fullOk){if((yield Be(pe(l,t)))&&$.value)return void L()}else n.prefixOk&&n.prefix&&st()&&(yield gl(n.prefix,l,t,ge.value))}catch{}Te=Math.min(Math.floor(1.5*Te),Hl.value),Rt(Te)}}),{timeout:500})},e)))}function mt(){Fe||fe.value&&k.value&&H()&&(x.value||$.value||(Fe=!0,ot=0,Ct=!0,it=0,Te=Ne.value,Rt(Te)))}function wl(){return C(this,null,function*(){const e=xe;M(e)&&(yield Ge().catch(t=>{M(e)&&(k.value=!1,console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t))}),M(e)&&(yield I(),M(e)&&(je.value||(x.value=!k.value),H()&&(fe.value?(Ue(),nt.value=R.value.length):x.value||Ae()))))})}return yl(_l),j(ut,e=>{e||bl()}),j(()=>R.value,e=>{if((e.trim()||o.loading===!1)&&($.value=!1,he.value={}),!fe.value)return L(),void(H()&&!x.value&&Ae());H()&&Ue(),!x.value&&k.value&&H()?mt():L(),(function(){if(!fe.value||!x.value||!k.value)return;const t=R.value.length;t!==nt.value&&(Mt.value=!0,nt.value=t,Ie&&clearTimeout(Ie),Ie=setTimeout(()=>{Mt.value&&x.value&&R.value.trim()&&(Mt.value=!1,hl("preview"))},Al.value))})()}),j(()=>o.isDark,()=>C(null,null,function*(){var e;if(N.value)return;const t=o.isDark?"dark":"light",l=he.value[t];if(l){if(v.value){const a=Ee(v.value,l.svg);a&&(ie=(e=l.bindFunctions)!=null?e:null,ke(a.bindTarget))}return}const n={zoom:b.value,translateX:W.value,translateY:q.value,containerHeight:_.value},r=b.value!==1||W.value!==0||q.value!==0;G.value=!0,r&&(b.value=1,W.value=0,q.value=0,yield I()),yield Be(),r&&(yield I(),b.value=n.zoom,W.value=n.translateX,q.value=n.translateY,_.value=n.containerHeight,Me.value=n)})),j(()=>x.value,e=>C(null,null,function*(){var t;if(e)L(),$.value&&(Me.value={zoom:b.value,translateX:W.value,translateY:q.value,containerHeight:_.value});else{if(N.value)return;const l=o.isDark?"dark":"light";if($.value&&he.value[l]){if(yield I(),v.value){const n=he.value[l],r=Ee(v.value,n.svg);r&&(ie=(t=n.bindFunctions)!=null?t:null,ke(r.bindTarget))}return b.value=Me.value.zoom,W.value=Me.value.translateX,q.value=Me.value.translateY,void(_.value=Me.value.containerHeight)}if(yield I(),!k.value||!H())return;if(!fe.value)return L(),void(yield Ae());mt(),yield pl()}})),j(()=>o.loading,(e,t)=>C(null,null,function*(){var l;if(e)Dt();else if(t===!0){Dt();const n=R.value,r=n.trim();if(!r)return v.value&&ye(v.value),Le.value=null,me="",N.value=!1,Xe();if(!H())return void Xe();const a=o.isDark?"dark":"light",c=pe(n,a);if($.value&&c.signature===me){if(yield I(),v.value&&!v.value.querySelector("svg")&&he.value[a]){const i=he.value[a],s=Ee(v.value,i.svg);s&&(ie=(l=i.bindFunctions)!=null?l:null,ke(s.bindTarget))}return Ye(void 0,{force:!0}),void Xe()}const g=new AbortController;De=g;try{let i=0;for(;;)try{yield ct(r,a,{signal:g.signal,timeoutMs:J.value.worker});break}catch(s){const w=(s==null?void 0:s.code)==="WORKER_BUSY"||(s==null?void 0:s.code)==="WORKER_TIMEOUT",S=(s==null?void 0:s.code)==="WORKER_TIMEOUT"?2:8;if(!w||i>=S)throw s;const U=Math.min(50*Sn(2,i),400);i++,yield Ce(()=>new Promise(z=>setTimeout(z,U)),{signal:g.signal})}if(!(yield Be(c)))return;N.value=!1,Xe()}catch(i){if(tl(i))return;Xe(),Qt(i)}finally{De===g&&(De=null)}}})),j(K,e=>{Pe&&Pe.disconnect(),e&&(Pe=new ResizeObserver(t=>{t&&t.length>0&&!x.value&&!V.value&&zt(()=>{Ye(t[0].contentRect.width)})}),Pe.observe(e))},{immediate:!0}),Zl(()=>{te.value&&!H()||wl()}),j(()=>k.value,e=>{je.value||(x.value=!e)}),j(()=>o.maxHeight,()=>{I(()=>{Ye()})}),j([()=>o.estimatedPreviewHeightPx,()=>R.value],()=>{$.value||lt()||x.value||(_.value=yt(),rt.value=_.value)}),j(()=>ce.value,e=>C(null,null,function*(){e&&(E.value?($.value||(fe.value?(Ue(),nt.value=R.value.length):Ae()),o.loading||$.value||Ae(),!x.value&&k.value&&fe.value&&mt()):yield wl())}),{immediate:!1}),Kl(()=>{Ie&&clearTimeout(Ie),Yt(),Tt(),Pe&&Pe.disconnect(),Y&&(Y.abort(),Y=null),Dt(),L(),Ve(),It()}),j(()=>V.value,e=>C(null,null,function*(){e?(L(),Y&&Y.abort()):H()&&!$.value&&(yield I(),fe.value?(Ue(),mt()):x.value||Ae())}),{immediate:!1}),(e,t)=>(T(),B("div",{ref_key:"blockContainer",ref:Qe,class:oe(["mermaid-block-container rounded-lg border overflow-hidden",[{"is-rendering":o.loading,dark:o.isDark}]]),"data-markstream-mermaid":"1","data-markstream-mode":x.value?"fallback":$.value?"preview":"pending","data-markstream-pending":jl.value?"true":void 0},[o.showHeader?(T(),B("div",Pn,[e.$slots["header-left"]?(T(),B("div",Dn,[Ft(e.$slots,"header-left",{},void 0,!0)])):(T(),B("div",Rn,[u("span",{class:"icon-slot action-icon shrink-0",innerHTML:h(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
6
+ <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M1.5 2.5c0 6 2.25 5.75 4 7 .83.67 1.17 2 1 4h3c-.17-2 .17-3.33 1-4 1.75-1.25 4-1 4-7C12 2.5 10 3 8 7 6 3 4 2.5 1.5 2.5" />
7
+ </svg>
8
+ `)},null,8,Fn),t[23]||(t[23]=u("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate"},"Mermaid",-1))])),e.$slots["header-center"]?(T(),B("div",zn,[Ft(e.$slots,"header-center",{},void 0,!0)])):o.showModeToggle&&k.value?(T(),B("div",An,[u("button",{class:oe(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[x.value?"":"is-active"]]),onClick:t[0]||(t[0]=()=>fl("preview")),onMouseenter:t[1]||(t[1]=l=>F(l,h(p)("common.preview")||"Preview")),onFocus:t[2]||(t[2]=l=>F(l,h(p)("common.preview")||"Preview")),onMouseleave:P,onBlur:P},[u("div",Hn,[t[24]||(t[24]=u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),u("circle",{cx:"12",cy:"12",r:"3"})])],-1)),u("span",null,Ke(h(p)("common.preview")||"Preview"),1)])],34),u("button",{class:oe(["mermaid-mode-btn px-2 py-0.5 rounded transition-colors",[x.value?"is-active":""]]),onClick:t[3]||(t[3]=()=>fl("source")),onMouseenter:t[4]||(t[4]=l=>F(l,h(p)("common.source")||"Source")),onFocus:t[5]||(t[5]=l=>F(l,h(p)("common.source")||"Source")),onMouseleave:P,onBlur:P},[u("div",Ln,[t[25]||(t[25]=u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),u("span",null,Ke(h(p)("common.source")||"Source"),1)])],34)])):we("",!0),e.$slots["header-right"]?(T(),B("div",jn,[Ft(e.$slots,"header-right",{},void 0,!0)])):(T(),B("div",_n,[o.showCollapseButton?(T(),B("button",{key:0,class:oe(gt),"aria-pressed":V.value,onClick:t[6]||(t[6]=l=>V.value=!V.value),onMouseenter:t[7]||(t[7]=l=>F(l,V.value?h(p)("common.expand")||"Expand":h(p)("common.collapse")||"Collapse")),onFocus:t[8]||(t[8]=l=>F(l,V.value?h(p)("common.expand")||"Expand":h(p)("common.collapse")||"Collapse")),onMouseleave:P,onBlur:P},[(T(),B("svg",{style:ht({rotate:V.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...t[26]||(t[26]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,Nn)):we("",!0),o.showCopyButton?(T(),B("button",{key:1,class:oe(gt),onClick:Il,onMouseenter:t[9]||(t[9]=l=>nl(l)),onFocus:t[10]||(t[10]=l=>nl(l)),onMouseleave:P,onBlur:P},[Je.value?(T(),B("svg",Wn,[...t[28]||(t[28]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(T(),B("svg",In,[...t[27]||(t[27]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):we("",!0),o.showExportButton&&k.value?(T(),B("button",{key:2,class:oe(`${gt} ${dt.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":h(p)("common.export")||"Export",disabled:dt.value,onClick:Wl,onMouseenter:t[11]||(t[11]=l=>F(l,h(p)("common.export")||"Export")),onFocus:t[12]||(t[12]=l=>F(l,h(p)("common.export")||"Export")),onMouseleave:P,onBlur:P},[...t[29]||(t[29]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),u("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,qn)):we("",!0),o.showFullscreenButton&&k.value?(T(),B("button",{key:3,class:oe(`${gt} ${dt.value?"opacity-50 cursor-not-allowed":""}`),"aria-label":Q.value?h(p)("common.minimize")||"Minimize":h(p)("common.open")||"Open",disabled:dt.value,onClick:ql,onMouseenter:t[13]||(t[13]=l=>F(l,Q.value?h(p)("common.minimize")||"Minimize":h(p)("common.open")||"Open")),onFocus:t[14]||(t[14]=l=>F(l,Q.value?h(p)("common.minimize")||"Minimize":h(p)("common.open")||"Open")),onMouseleave:P,onBlur:P},[Q.value?(T(),B("svg",Yn,[...t[31]||(t[31]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(T(),B("svg",Vn,[...t[30]||(t[30]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,Un)):we("",!0)]))])):we("",!0),Gl(u("div",{ref_key:"modeContainerRef",ref:Wt},[x.value?(T(),B("div",{key:0,class:"mermaid-source-panel",style:ht({minHeight:Fl.value})},[u("pre",Xn,Ke(R.value),1)],4)):(T(),B("div",Zn,[o.showZoomControls?(T(),B("div",Kn,[u("div",Gn,[u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:cl,onMouseenter:t[15]||(t[15]=l=>F(l,h(p)("common.zoomIn")||"Zoom in")),onFocus:t[16]||(t[16]=l=>F(l,h(p)("common.zoomIn")||"Zoom in")),onMouseleave:P,onBlur:P},[...t[32]||(t[32]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("circle",{cx:"11",cy:"11",r:"8"}),u("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:dl,onMouseenter:t[17]||(t[17]=l=>F(l,h(p)("common.zoomOut")||"Zoom out")),onFocus:t[18]||(t[18]=l=>F(l,h(p)("common.zoomOut")||"Zoom out")),onMouseleave:P,onBlur:P},[...t[33]||(t[33]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("circle",{cx:"11",cy:"11",r:"8"}),u("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:vl,onMouseenter:t[19]||(t[19]=l=>F(l,h(p)("common.resetZoom")||"Reset zoom")),onFocus:t[20]||(t[20]=l=>F(l,h(p)("common.resetZoom")||"Reset zoom")),onMouseleave:P,onBlur:P},Ke(Math.round(100*b.value))+"% ",33)])])):we("",!0),u("div",kl({ref_key:"mermaidContainer",ref:K,class:["mermaid-preview-area relative overflow-hidden block transition-[height] ease-out",{"mermaid-pan-touch":Pt.value}],style:{height:_.value,minHeight:Ll.value}},xl(Jt.value,!0),{onPointerdown:t[21]||(t[21]=(...l)=>h(vt)&&h(vt)(...l))}),[u("div",{"data-mermaid-wrapper":"",class:oe(["absolute inset-0 cursor-grab",{"cursor-grabbing":Vt.value}]),style:ht(Et.value)},[u("div",{ref_key:"mermaidContent",ref:v,class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:ht({height:rt.value})},null,4)],6)],16),(T(),Ql(rn,{to:"body"},[u("div",{class:oe(["markstream-vue",{dark:o.isDark}])},[en(nn,{name:"mermaid-dialog",appear:""},{default:tn(()=>[Q.value?(T(),B("div",{key:0,class:"mermaid-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:ln($t,["self"])},[u("div",Jn,[u("div",Qn,[u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:cl},[...t[34]||(t[34]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("circle",{cx:"11",cy:"11",r:"8"}),u("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:dl},[...t[35]||(t[35]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("circle",{cx:"11",cy:"11",r:"8"}),u("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),u("button",{class:"mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors",onClick:vl},Ke(Math.round(100*b.value))+"% ",1),u("button",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded transition-colors",onClick:$t},[...t[36]||(t[36]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),u("div",kl({ref_key:"modalContent",ref:se,class:["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"mermaid-pan-touch":Pt.value}]},xl(Jt.value,!0),{onPointerdown:t[22]||(t[22]=(...l)=>h(vt)&&h(vt)(...l))}),null,16)])])):we("",!0)]),_:1})],2)]))]))],512),[[Jl,!V.value]])],10,$n))}}),[["__scopeId","data-v-a0530481"]]);Lt.install=d=>{d.component(Lt.__name,Lt)};export{Lt as default};
@@ -0,0 +1 @@
1
+ import{d as Z,x as ee,l as ne,r as S,w as j,m as te,o as le,a as H,p as I,e as ae,f as oe,s as re,b as ie,T as ue,i as X,t as se,n as ce,u as q,k as G}from"./vendor-vue-C21-5sm4.js";import{a as de,l as ve,v as fe,z as J,e as me,p as he,F as ge,B as pe,E as ye,m as ke}from"./index-RWtzc3nz.js";import"./index-Zlr3P937.js";var Q=(E,K,x)=>new Promise((t,c)=>{var i=v=>{try{R(x.next(v))}catch(f){c(f)}},d=v=>{try{R(x.throw(v))}catch(f){c(f)}},R=v=>v.done?t(v.value):Promise.resolve(v.value).then(i,d);R((x=x.apply(E,K)).next())});const $e=["data-markstream-mode","data-markstream-pending"],xe={key:0,class:"math-loading-overlay"},be=["innerHTML"],we={key:1,class:"math-block__fallback text-left"},D=de(Z({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(E){var K,x;const t=E,c=S(null),i=ee(ve,null),d=q(()=>he(t.node.content)),R=((x=(K=ne())==null?void 0:K.vnode.el)==null?void 0:x.nodeType)===1,v=q(()=>ke(t,{})),f=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=fe();if(!e){const n=typeof window>"u"||R;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(d.value,{throwOnError:!1,displayMode:!0});return J(d.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=S(f.html),g=S(f.text);let M=!1,b=0,m=!1,w=null;const p=me();let O=null,y="";const k=S(f.loading),N=S(!1),$=S(L());function C(e){e!=null&&e!==b||(N.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:p==null?void 0:p.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function L(){var e;const n=W();return n&&(e=p==null?void 0:p.cache.get(n))!=null?e:0}function B(){if($.value===0)return;$.value=0;const e=W();e&&(p==null||p.cache.set(e,0))}function P(e){if(u.value)return void B();if(!Number.isFinite(e)||e<=0)return;const n=Math.max($.value,e);if(n===$.value)return;$.value=n;const l=W();l&&(p==null||p.cache.set(l,n))}function _(){G(()=>{var e,n;P((n=(e=c.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=y;i&&e&&(y="",i.markSettled(e))}function A(){return Q(this,null,function*(){if(m)return z(),void C();w&&(w.abort(),w=null);const e=++b;if(!t.node.content)return z(),C(),k.value=!1,u.value="",g.value=t.node.raw,M=!1,void _();const n=new AbortController;w=n,N.value=!0,m||e!==b||n.signal.aborted?m||C(e):((function(){const l=v.value;i&&l&&y!==l&&(y&&i.markSettled(y),y=l,i.markPending(l))})(),ge(d.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(l=>{m||e!==b||(u.value=l,g.value="",M=!0,k.value=!1,B(),_())}).catch(l=>Q(null,null,function*(){if(m||e!==b)return;const r=(l==null?void 0:l.code)||(l==null?void 0:l.name),a=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||l!=null&&l.fallbackToRenderer||(r===pe||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield ye();if(m||e!==b)return;if(o){try{const s=o.renderToString(d.value,{throwOnError:t.node.loading,displayMode:!0});u.value=s,g.value="",M=!0,k.value=!1,B(),_(),J(d.value,!0,s)}catch{}return}}if(a||!t.node.loading)return k.value=!1,u.value="",g.value=t.node.raw,void _();M||(k.value=!0)})).finally(()=>{m||e!==b||(C(e),(function(){const l=y;i&&l&&(y="",G(()=>{var r,a;if(!m){const o=(a=(r=c.value)==null?void 0:r.offsetHeight)!=null?a:0;o>0&&i.reportHeight(l,o)}i.markSettled(l)}))})())}))})}f.html&&(M=!0),f.html&&B();const Y=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const a=String(r??"");for(const{family:o,open:s,close:T}of Y)if((s!=="$"||!a.startsWith("$$")&&!a.endsWith("$$"))&&a.length>=s.length+T.length&&a.startsWith(s)&&a.endsWith(T))return{family:o,inner:a.slice(s.length,a.length-T.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}let h=null,F=`${d.value}\0${t.node.loading?"1":"0"}`;return j(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[l,,r])=>{var a,o;a=V(r,l),o=V(n,e),a.inner===""||a.family===o.family&&(a.trusted&&o.trusted?o.inner.startsWith(a.inner):o.inner===a.inner)||B(),(function(){const s=d.value,T=t.node.loading===!0,U=`${s}\0${T?"1":"0"}`;if(U!==F){if(F=U,!T)return h!=null&&(clearTimeout(h),h=null),void A();h==null&&(h=setTimeout(()=>{h=null,A()},32))}})()},{flush:"post"}),j([()=>t.indexKey,()=>t.cacheScope],()=>{$.value=L(),_()}),te(()=>{typeof ResizeObserver<"u"&&c.value&&(O=new ResizeObserver(()=>{var e,n;P((n=(e=c.value)==null?void 0:e.offsetHeight)!=null?n:0)}),O.observe(c.value)),_(),u.value||A()}),le(()=>{m=!0,h!=null&&(clearTimeout(h),h=null),z(),w&&(w.abort(),w=null),O==null||O.disconnect(),O=null}),(e,n)=>(H(),I("div",{ref_key:"containerEl",ref:c,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":g.value?"fallback":"loading","data-markstream-pending":N.value?"true":void 0,style:ce($.value?{minHeight:`${$.value}px`}:void 0)},[ae(ue,{name:"math-fade"},{default:oe(()=>[!k.value||u.value||g.value?re("",!0):(H(),I("div",xe,[...n[0]||(n[0]=[ie("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(H(),I("div",{key:0,class:X(["math-block__content",{"math-rendering":k.value}]),innerHTML:u.value},null,10,be)):g.value?(H(),I("pre",we,se(g.value),1)):(H(),I("div",{key:2,class:X(["math-block__content",{"math-rendering":k.value}])},null,2))],12,$e))}}),[["__scopeId","data-v-af54c877"]]);D.install=E=>{E.component(D.__name,D)};export{D as default};
@@ -0,0 +1 @@
1
+ import{d as K,l as H,r as w,w as P,m as U,o as W,a as _,p as I,t as q,c as z,f as V,b as B,q as X,T as j,s as F,u as S}from"./vendor-vue-C21-5sm4.js";import{a as G,v as J,z as N,p as M,F as Q,B as Y,E as Z}from"./index-RWtzc3nz.js";import"./index-Zlr3P937.js";var A=(h,y,d)=>new Promise((T,e)=>{var x=o=>{try{t(d.next(o))}catch(i){e(i)}},s=o=>{try{t(d.throw(o))}catch(i){e(i)}},t=o=>o.done?T(o.value):Promise.resolve(o.value).then(x,s);t((d=d.apply(h,y)).next())});const ee=["data-markstream-mode","data-markstream-pending"],ne=["innerHTML"],ae={key:1,class:"math-inline math-inline--fallback"},le={class:"math-inline__loading",role:"status","aria-live":"polite"},O=G(K({__name:"MathInlineNode",props:{node:{}},setup(h){var y,d,T;const e=h,x=w(null),s=S(()=>e.node.markup==="$$"),t=S(()=>M(e.node.content)),o=((d=(y=H())==null?void 0:y.vnode.el)==null?void 0:d.nodeType)===1,i=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const n=J();if(!n){const a=typeof window>"u"||o;return{html:"",text:a?e.node.raw:"",loading:!a}}try{const a=n.renderToString(t.value,{throwOnError:!1,displayMode:s.value});return N(t.value,s.value,a),{html:a,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),u=w(i.html),c=w(i.text);let k=!1,g=0,m=!1,v=null;const f=w(i.loading),E=w(!1);function $(n){n!=null&&n!==g||(E.value=!1)}function b(){return A(this,null,function*(){if(m)return;v&&(v.abort(),v=null);const n=++g;if(!e.node.content)return $(),u.value="",c.value=e.node.loading?"":e.node.raw,f.value=e.node.loading,void(k=!1);const a=new AbortController;v=a,E.value=!0,m||n!==g||a.signal.aborted?$(n):Q(t.value,s.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:a.signal}).then(l=>{m||n!==g||(u.value=l,c.value="",f.value=!1,k=!0)}).catch(l=>A(null,null,function*(){if(m||n!==g)return;const p=(l==null?void 0:l.code)||(l==null?void 0:l.name),D=p==="KATEX_DISABLED";if(p==="WORKER_INIT_ERROR"||l!=null&&l.fallbackToRenderer||(p===Y||p==="WORKER_TIMEOUT")&&!e.node.loading){const L=yield Z();if(m||n!==g)return;if(L){try{const R=L.renderToString(t.value,{throwOnError:e.node.loading,displayMode:s.value});u.value=R,c.value="",f.value=!1,k=!0,N(t.value,s.value,R)}catch{}return}}if(D||!e.node.loading)return f.value=!1,u.value="",void(c.value=e.node.raw);k||(f.value=!0)})).finally(()=>{m||$(n)})})}i.html&&(k=!0);let r=null,C=`${M(e.node.content)}\0${(T=e.node.markup)!=null?T:""}\0${e.node.loading?"1":"0"}`;return P(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{(function(){var n;const a=M(e.node.content),l=e.node.loading===!0,p=`${a}\0${(n=e.node.markup)!=null?n:""}\0${l?"1":"0"}`;if(p!==C){if(C=p,!l)return r!=null&&(clearTimeout(r),r=null),void b();r==null&&(r=setTimeout(()=>{r=null,b()},32))}})()}),U(()=>{u.value||b()}),W(()=>{m=!0,r!=null&&(clearTimeout(r),r=null),v&&(v.abort(),v=null)}),(n,a)=>(_(),I("span",{ref_key:"containerEl",ref:x,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":u.value?"katex":c.value?"fallback":"loading","data-markstream-pending":E.value?"true":void 0},[u.value?(_(),I("span",{key:0,class:"math-inline",innerHTML:u.value},null,8,ne)):c.value?(_(),I("span",ae,q(c.value),1)):f.value?(_(),z(j,{key:2,name:"table-node-fade"},{default:V(()=>[B("span",le,[X(n.$slots,"loading",{isLoading:f.value},()=>[a[0]||(a[0]=B("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),a[1]||(a[1]=B("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):F("",!0)],8,ee))}}),[["__scopeId","data-v-73d5e320"]]);O.install=h=>{h.component(O.__name,O)};export{O as default};
@@ -0,0 +1,2 @@
1
+ import{d as t1,r as v,y as l1,x as r1,w as H,k as I,m as a1,o as i1,a as s,p as u,q as be,b as t,z as r,t as A,i as x,s as T,n as Me,g as s1,v as u1,c as c1,e as d1,f as v1,A as m1,T as h1,j as p1,u as F}from"./vendor-vue-C21-5sm4.js";import{a as f1,o as w1,f as g1,s as C1,d as k1,l as x1,c as y1,b as Ue,n as b1,r as K,u as Ye,g as M1,Y as Xe,Z as B1,D as F1,m as $1}from"./index-RWtzc3nz.js";import"./index-Zlr3P937.js";var de=(O,Fe,l)=>new Promise((a,Q)=>{var Z=c=>{try{z(l.next(c))}catch(S){Q(S)}},ee=c=>{try{z(l.throw(c))}catch(S){Q(S)}},z=c=>c.done?a(c.value):Promise.resolve(c.value).then(Z,ee);z((l=l.apply(O,Fe)).next())});const j1=["data-markstream-mode"],H1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},T1={key:0},z1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},S1=["innerHTML"],E1={key:2},P1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},L1=["disabled"],V1={class:"flex items-center gap-x-1"},Z1={class:"flex items-center gap-x-1"},D1={key:4},N1={key:5,class:"infographic-header-actions flex items-center"},_1=["aria-pressed"],I1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},A1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},O1=["disabled"],R1=["disabled"],U1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Y1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},X1={key:0,class:"infographic-source"},G1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},q1={key:1,class:"relative"},W1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},J1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},K1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Q1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},en={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},ve="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",Be=f1(t1({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(O,{emit:Fe}){const l=O,{t:a}=w1(),Q=g1(),Z=C1(),ee=k1(),z=v(!1),c=v(!1),S=v(),p=v(),y=v(!0),$e=v(!1),$=v(!1),D=v(),ne=v(null),L=v(!1),oe=v(!1),R=v(null),E=v(typeof window>"u"||!ee.value),Ge=l1(),b=r1(x1,null);let P="";const je=F(()=>$1(l,Ge));typeof window<"u"&&H([()=>S.value,ee],([n,e])=>{var o,i,f;if((o=R.value)==null||o.destroy(),R.value=null,!e||E.value)return void(E.value=!0);if(!n)return void(E.value=!1);const C=(f=(i=Z==null?void 0:Z.value.heavyBlockMargin)!=null?i:Z==null?void 0:Z.value.rootMargin)!=null?f:"160px",w=Q(n,{rootMargin:C,allowIdle:!1});R.value=w,E.value=w.isVisible.value,w.whenVisible.then(()=>{E.value=!0})},{immediate:!0});const j=F(()=>l.node.code),me=F(()=>{var n;return(function(e){const o=(function(){var f;const C=p.value?getComputedStyle(p.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(f=K(C))!=null?f:b1})();if(l.maxHeight==="none")return Ye(e,o,null);const i=K(l.maxHeight);return Ye(e,o,i)})((n=K(l.estimatedPreviewHeightPx))!=null?n:M1(j.value))}),he=v(`${me.value}px`),qe=F(()=>K(l.estimatedPreviewHeightPx)!=null);function He(){var n;if(!p.value||qe.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=K((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const C=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(C))return`${Math.min(i,C)}px`}const f=p.value;if(f){const C=getComputedStyle(f).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(C);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;he.value=`${Math.max(o,me.value)}px`}}const M=v(1),U=v(0),Y=v(0),te=v(!1),pe=F(()=>j.value);function Te(n){return!n||n.disabled}function h(n,e,o="top"){if(Te(n.currentTarget))return;const i=n,f=(i==null?void 0:i.clientX)!=null&&(i==null?void 0:i.clientY)!=null?{x:i.clientX,y:i.clientY}:void 0;Xe(n.currentTarget,e,o,!1,f,l.isDark)}function d(){B1()}function ze(n){if(Te(n.currentTarget))return;const e=z.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=(o==null?void 0:o.clientX)!=null&&(o==null?void 0:o.clientY)!=null?{x:o.clientX,y:o.clientY}:void 0;Xe(n.currentTarget,e,"top",!1,i,l.isDark)}function We(){return de(this,null,function*(){try{const n=j.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),z.value=!0,setTimeout(()=>{z.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function Se(n){(n!=="preview"||Ue())&&($e.value=!0,y.value=n==="source")}function Je(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){de(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),f=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),C=URL.createObjectURL(f);if(typeof document<"u"){const w=document.createElement("a");w.href=C,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(C)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function fe(n){n.key==="Escape"&&$.value&&we()}function we(){if($.value=!1,D.value&&(D.value.innerHTML=""),ne.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",fe)}catch{}}function Ke(){(function(){if($.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",fe)}catch{}I(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),ne.value=n,n.style.transform=`translate(${U.value}px, ${Y.value}px) scale(${M.value})`}})})()}function Ee(){M.value<3&&(M.value+=.1)}function Pe(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,U.value=0,Y.value=0}const ge=F(()=>$.value||M.value>1),Ve=y1({getTranslate:()=>({x:U.value,y:Y.value}),setTranslate:n=>{U.value=n.x,Y.value=n.y},canStart:n=>!!L.value&&(n.pointerType!=="touch"||ge.value),onActiveChange:n=>te.value=n}),le=Ve.start,Qe=Ve.stop;let k=null,Ce=!1,re=!1,X=!1,ae=!1,G=!1,ie="",q=!1,ke=0;function se(n){return!q&&n===ke}function Ze(n=!1){return de(this,null,function*(){var e,o,i,f,C,w;if(q||!E.value||!p.value)return;if(Ce)return re=!0,void(X=X||n);const W=pe.value;if(!n&&W===ie&&L.value)return;const _e=j.value,Ie=l.loading===!1,ce=++ke;Ce=!0,(function(){const m=je.value;m&&P!==m&&(P&&(b==null||b.markSettled(P)),P=m,b==null||b.markPending(m))})();let g=null,_=null;try{const m=yield F1();if(!se(ce))return;if(!m)throw new Error("Infographic library failed to load.");const V=p.value;if(!V)return;const n1=l.loading===!0;if(!(W===pe.value||!Ie&&n1&&j.value.startsWith(_e)))return;_=Array.from(V.childNodes),g=new m({container:V,width:"100%",height:"100%"});let xe="",Ae=!1;if((e=g.on)==null||e.call(g,"error",J=>{xe=(Array.isArray(J)?J:[J]).map(B=>{var Re;return B instanceof Error?B.message:typeof B=="string"?B:String(B&&typeof B=="object"&&"message"in B?(Re=B.message)!=null?Re:"":B??"")}).filter(Boolean).join("; ")}),(o=g.on)==null||o.call(g,"rendered",()=>{Ae=!0}),g.render(_e),xe)throw new Error(xe);const ye=Array.from(V.childNodes),o1=ye.length>0&&(ye.length!==_.length||ye.some((J,Oe)=>J!==(_==null?void 0:_[Oe])));if(!Ae&&!o1)throw new Error("Infographic render returned empty output.");(i=k==null?void 0:k.destroy)==null||i.call(k),k=g,g=null,L.value=!0,oe.value=!1,ie=W,I(()=>{se(ce)&&He()})}catch(m){if(!se(ce))return;(f=g==null?void 0:g.destroy)==null||f.call(g),g=null,Ie&&l.loading===!1&&W===pe.value?(console.error("Failed to render infographic:",m),(C=k==null?void 0:k.destroy)==null||C.call(k),k=null,L.value=!1,oe.value=!0,ie="",p.value&&(p.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}</div>`)):_&&p.value&&p.value.replaceChildren(..._)}finally{if((w=g==null?void 0:g.destroy)==null||w.call(g),Ce=!1,se(ce))if(re){const m=X;re=!1,X=!1,I(()=>{Ze(m)})}else(function(){de(this,null,function*(){const m=P;m&&(P="",yield I(),(function(V=je.value){V&&S.value&&(b==null||b.reportHeight(V,S.value.offsetHeight))})(m),b==null||b.markSettled(m))})})()}})}function N(n=!1){q||!E.value||y.value||c.value||(G=G||n,ae||(ae=!0,I(()=>{ae=!1;const e=G;G=!1,q||Ze(e)})))}H(()=>j.value,()=>{N(!0)}),H(()=>l.loading,(n,e)=>{e&&!n&&N(!0)}),H(()=>y.value,n=>{n||N(!0)}),H(()=>c.value,n=>{n||N()}),H(()=>l.maxHeight,()=>{I(()=>{He()})}),H([()=>l.estimatedPreviewHeightPx,()=>j.value],()=>{L.value||y.value||(he.value=`${me.value}px`)}),H(()=>E.value,n=>{!n||y.value||c.value||N()}),a1(()=>{!$e.value&&Ue(),N()}),i1(()=>{var n,e;if(q=!0,Qe(),ke+=1,re=!1,X=!1,ae=!1,G=!1,(n=R.value)==null||n.destroy(),R.value=null,(function(){const o=P;o&&(P="",b==null||b.markSettled(o))})(),k&&((e=k.destroy)==null||e.call(k),k=null),ie="",typeof window<"u")try{window.removeEventListener("keydown",fe)}catch{}});const De=F(()=>!0),ue=F(()=>y.value||c.value),e1=F(()=>y.value?"fallback":oe.value?"error":L.value?"preview":"pending"),Ne=F(()=>({transform:`translate(${U.value}px, ${Y.value}px) scale(${M.value})`}));return H(Ne,n=>{$.value&&ne.value&&(ne.value.style.transform=n.transform)}),(n,e)=>(s(),u("div",{ref_key:"viewportTarget",ref:S,class:x(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":e1.value},[l.showHeader?(s(),u("div",H1,[n.$slots["header-left"]?(s(),u("div",T1,[be(n.$slots,"header-left",{},void 0,!0)])):(s(),u("div",z1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:r(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg>
2
+ `)},null,8,S1),e[23]||(e[23]=t("span",{class:"infographic-label font-medium font-mono truncate"},"Infographic",-1))])),n.$slots["header-center"]?(s(),u("div",E1,[be(n.$slots,"header-center",{},void 0,!0)])):l.showModeToggle?(s(),u("div",P1,[t("button",{class:x(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[y.value?"":"is-active",De.value?"opacity-50 cursor-not-allowed":""]]),disabled:De.value,onClick:e[0]||(e[0]=()=>Se("preview")),onMouseenter:e[1]||(e[1]=o=>h(o,r(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>h(o,r(a)("common.preview")||"Preview")),onMouseleave:d,onBlur:d},[t("div",V1,[e[24]||(e[24]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",null,A(r(a)("common.preview")||"Preview"),1)])],42,L1),t("button",{class:x(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[y.value?"is-active":""]]),onClick:e[3]||(e[3]=()=>Se("source")),onMouseenter:e[4]||(e[4]=o=>h(o,r(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>h(o,r(a)("common.source")||"Source")),onMouseleave:d,onBlur:d},[t("div",Z1,[e[25]||(e[25]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),t("span",null,A(r(a)("common.source")||"Source"),1)])],34)])):T("",!0),n.$slots["header-right"]?(s(),u("div",D1,[be(n.$slots,"header-right",{},void 0,!0)])):(s(),u("div",N1,[l.showCollapseButton?(s(),u("button",{key:0,class:x(ve),"aria-pressed":c.value,onClick:e[6]||(e[6]=o=>c.value=!c.value),onMouseenter:e[7]||(e[7]=o=>h(o,c.value?r(a)("common.expand")||"Expand":r(a)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=o=>h(o,c.value?r(a)("common.expand")||"Expand":r(a)("common.collapse")||"Collapse")),onMouseleave:d,onBlur:d},[(s(),u("svg",{style:Me({rotate:c.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[26]||(e[26]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,_1)):T("",!0),l.showCopyButton?(s(),u("button",{key:1,class:x(ve),onClick:We,onMouseenter:e[9]||(e[9]=o=>ze(o)),onFocus:e[10]||(e[10]=o=>ze(o)),onMouseleave:d,onBlur:d},[z.value?(s(),u("svg",A1,[...e[28]||(e[28]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(s(),u("svg",I1,[...e[27]||(e[27]=[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),t("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):T("",!0),l.showExportButton?(s(),u("button",{key:2,class:x(`${ve} ${ue.value?"opacity-50 cursor-not-allowed":""}`),disabled:ue.value,onClick:Je,onMouseenter:e[11]||(e[11]=o=>h(o,r(a)("common.export")||"Export")),onFocus:e[12]||(e[12]=o=>h(o,r(a)("common.export")||"Export")),onMouseleave:d,onBlur:d},[...e[29]||(e[29]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,O1)):T("",!0),l.showFullscreenButton?(s(),u("button",{key:3,class:x(`${ve} ${ue.value?"opacity-50 cursor-not-allowed":""}`),disabled:ue.value,onClick:Ke,onMouseenter:e[13]||(e[13]=o=>h(o,$.value?r(a)("common.minimize")||"Minimize":r(a)("common.open")||"Open")),onFocus:e[14]||(e[14]=o=>h(o,$.value?r(a)("common.minimize")||"Minimize":r(a)("common.open")||"Open")),onMouseleave:d,onBlur:d},[$.value?(s(),u("svg",Y1,[...e[31]||(e[31]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(s(),u("svg",U1,[...e[30]||(e[30]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,R1)):T("",!0)]))])):T("",!0),s1(t("div",null,[y.value?(s(),u("div",X1,[t("pre",G1,A(j.value),1)])):(s(),u("div",q1,[l.showZoomControls?(s(),u("div",W1,[t("div",J1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Ee,onMouseenter:e[15]||(e[15]=o=>h(o,r(a)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=o=>h(o,r(a)("common.zoomIn")||"Zoom in")),onMouseleave:d,onBlur:d},[...e[32]||(e[32]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Pe,onMouseenter:e[17]||(e[17]=o=>h(o,r(a)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=o=>h(o,r(a)("common.zoomOut")||"Zoom out")),onMouseleave:d,onBlur:d},[...e[33]||(e[33]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le,onMouseenter:e[19]||(e[19]=o=>h(o,r(a)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=o=>h(o,r(a)("common.resetZoom")||"Reset zoom")),onMouseleave:d,onBlur:d},A(Math.round(100*M.value))+"% ",33)])])):T("",!0),t("div",{class:x(["infographic-preview relative transition-all overflow-hidden block",{"infographic-pan-touch":ge.value}]),style:Me({height:he.value}),onPointerdown:e[21]||(e[21]=(...o)=>r(le)&&r(le)(...o))},[L.value||oe.value?T("",!0):(s(),u("pre",K1,A(j.value),1)),t("div",{class:x(["absolute inset-0 cursor-grab",{"cursor-grabbing":te.value}]),style:Me(Ne.value)},[t("div",{ref_key:"infographicContainer",ref:p,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],38)]))],512),[[u1,!c.value]]),(s(),c1(p1,{to:"body"},[t("div",{class:x(["markstream-vue",{dark:l.isDark}])},[d1(h1,{name:"infographic-dialog",appear:""},{default:v1(()=>[$.value?(s(),u("div",{key:0,class:"infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:m1(we,["self"])},[t("div",Q1,[t("div",en,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Ee},[...e[34]||(e[34]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Pe},[...e[35]||(e[35]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le},A(Math.round(100*M.value))+"% ",1),t("button",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",onClick:we},[...e[36]||(e[36]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),t("div",{ref_key:"modalContent",ref:D,class:x(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!te.value,"cursor-grabbing":te.value,"infographic-pan-touch":ge.value}]),onPointerdown:e[22]||(e[22]=(...o)=>r(le)&&r(le)(...o))},null,34)])])):T("",!0)]),_:1})],2)]))],10,j1))}}),[["__scopeId","data-v-3bff4a01"]]);Be.install=O=>{O.component(Be.__name,Be)};export{Be as default};
@@ -0,0 +1 @@
1
+ import{d as at,y as ut,x as it,r as c,w as K,k as fe,m as st,o as dt,a as v,p as m,b as i,z as f,i as pe,t as R,s as j,n as ge,g as ct,v as vt,u as b}from"./vendor-vue-C21-5sm4.js";import{a as mt,l as ft,o as pt,f as gt,s as ht,d as yt,Y as Se,Z as wt,r as kt,P as bt,m as xt}from"./index-RWtzc3nz.js";import"./index-Zlr3P937.js";var Bt=Object.defineProperty,Ne=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Ct=Object.prototype.propertyIsEnumerable,Le=(g,o,s)=>o in g?Bt(g,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):g[o]=s,he=(g,o)=>{for(var s in o||(o={}))Dt.call(o,s)&&Le(g,s,o[s]);if(Ne)for(var s of Ne(o))Ct.call(o,s)&&Le(g,s,o[s]);return g},ye=(g,o,s)=>new Promise((w,r)=>{var H=h=>{try{p(s.next(h))}catch(a){r(a)}},x=h=>{try{p(s.throw(h))}catch(a){r(a)}},p=h=>h.done?w(h.value):Promise.resolve(h.value).then(H,x);p((s=s.apply(g,o)).next())});let Re=0;const Mt=["data-markstream-mode","data-markstream-pending"],Et={key:0,class:"d2-block-header flex justify-between items-center border-b"},Tt={class:"d2-header-actions flex items-center"},At={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},jt=["aria-label"],Ht={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Ot={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},It=["aria-label"],Pt=["aria-pressed"],Ft={key:0,class:"d2-source"},St={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Lt={key:1},Rt={key:0,class:"d2-source"},_t={class:"d2-code"},$t={key:0,class:"d2-error mt-2 text-xs"},Vt=["innerHTML"],Yt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=mt(at({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(g){const o=g,s=ut(),w=it(ft,null),{t:r}=pt(),H=c(!1),x=c(!1),p=c(!1),h=c(!1),a=c(null),Q=c(!1),O=c(""),ae=c(""),ue=c(0),_=c(""),I=c(""),W=c(null),ke=c(null),ie=c(null),_e=gt(),ee=ht(),be=yt(),z=c(null),xe=typeof window<"u",Be=c(!1),P=c(typeof window>"u"||!be.value),M=b(()=>{var t;return(t=o.node.code)!=null?t:""}),$e=b(()=>xt(o,s)),te=b(()=>{var t,e;return[o.isDark?"dark":"light",(t=o.themeId)!=null?t:"auto",(e=o.darkThemeId)!=null?e:"auto",M.value].join(":")}),oe=b(()=>!!O.value&&ae.value===te.value),De=b(()=>{if(!Be.value||!M.value||p.value)return!1;const t=te.value;return!!Q.value||_.value!==t&&(!a.value||I.value!==t)}),se=b(()=>oe.value||!!O.value&&De.value),ne=b(()=>p.value||!h.value||!se.value),Ve=b(()=>{var t;return p.value||se.value?0:M.value?a.value&&I.value===te.value?0:(t=kt(o.estimatedPreviewHeightPx))!=null?t:0:0}),Ye=b(()=>{var t;if(!ne.value)return;const e=Math.max((t=ke.value)!=null?t:0,Ve.value);return e>0?{minHeight:`${e}px`}:void 0}),ze=b(()=>{if(o.maxHeight==="none")return{maxHeight:"none","--ms-d2-render-max-height":"none"};if(o.maxHeight!=null){const t=typeof o.maxHeight=="number"?`${o.maxHeight}px`:String(o.maxHeight);return{maxHeight:t,"--ms-d2-render-max-height":t}}});let B=null,de=!1,$=!1,Ce=0,V=null,F=!1,U=null,E="";typeof window<"u"&&K([()=>ie.value,be],([t,e])=>{var n,d,S;if((n=z.value)==null||n.destroy(),z.value=null,!e||P.value)return void(P.value=!0);if(!t)return void(P.value=!1);const le=(S=(d=ee==null?void 0:ee.value.heavyBlockMargin)!=null?d:ee==null?void 0:ee.value.rootMargin)!=null?S:"160px",D=_e(t,{rootMargin:le,allowIdle:!1});z.value=D,P.value=D.isVisible.value,D.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const Ue={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function T(t,e,n="top"){if(Me(t.currentTarget))return;const d=t,S=(d==null?void 0:d.clientX)!=null&&(d==null?void 0:d.clientY)!=null?{x:d.clientX,y:d.clientY}:void 0;Se(t.currentTarget,e,n,!1,S,o.isDark)}function k(){wt()}function Ee(t){if(Me(t.currentTarget))return;const e=H.value?r("common.copied")||"Copied":r("common.copy")||"Copy",n=t,d=(n==null?void 0:n.clientX)!=null&&(n==null?void 0:n.clientY)!=null?{x:n.clientX,y:n.clientY}:void 0;Se(t.currentTarget,e,"top",!1,d,o.isDark)}function Xe(){return ye(this,null,function*(){try{const t=M.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function qe(){x.value=!x.value}function Te(t){p.value=t==="source"}const Ze=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],Ge=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Je(t){if(!t)return"";const e=t.trim();return Ge.test(e)?e:""}function Ae(){O.value="",ae.value=""}function X(t){return $||t!==ue.value}function Ke(){return ye(this,null,function*(){var t,e,n,d,S,le;if(!xe||$||!P.value||o.loading&&!o.progressiveRender)return;const D=te.value;if(D===_.value&&!a.value&&oe.value)return h.value=!0,void(o.loading&&(p.value=!1));const je=M.value;if(!je)return Ae(),a.value=null,_.value="",void(I.value="");const Z=++ue.value;Q.value=!0,a.value=null,I.value="",(function(){const u=$e.value;w&&u&&E!==u&&(E&&w.markSettled(E),E=u,w.markPending(u))})();try{const u=yield(function(){return ye(this,null,function*(){if(B)return B;const l=yield bt();if($||!l)return null;if(typeof l=="function"){const G=new l;return G&&typeof G.compile=="function"?B=G:typeof l.compile=="function"&&(B=l),B}return l!=null&&l.D2&&typeof l.D2=="function"?(B=new l.D2,B):(typeof l.compile=="function"&&(B=l),B)})})();if(X(Z))return;if(!u)return h.value=!1,p.value=!0,Ae(),a.value="D2 is not available.",void(I.value=D);if(typeof u.compile!="function"||typeof u.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield u.compile(je);if(X(Z))return;const re=(t=y==null?void 0:y.diagram)!=null?t:y,C=(n=(e=y==null?void 0:y.renderOptions)!=null?e:y==null?void 0:y.options)!=null?n:{},We=(d=o.themeId)!=null?d:C.themeID,He=(S=o.darkThemeId)!=null?S:C.darkThemeID,N=he({},C);if(N.themeID=o.isDark&&He!=null?He:We,N.darkThemeID=null,N.darkThemeOverrides=null,o.isDark){const l=C.themeOverrides&&typeof C.themeOverrides=="object"?C.themeOverrides:null;N.themeOverrides=he(he({},Ue),l||{})}N.salt=(le=N.salt)!=null?le:(function(l="markstream-vue-d2"){return Re+=1,`${l}-${Re}`})();const et=yield u.render(re,N);if(X(Z))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(et);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,G){const Ie=(function(Pe){if(typeof window>"u"||typeof DOMParser>"u"||!Pe)return"";const tt=Pe.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(tt,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(Fe){const ot=new Set(["script"]),nt=[Fe,...Array.from(Fe.querySelectorAll("*"))];for(const L of nt){if(ot.has(L.tagName.toLowerCase())){L.remove();continue}const lt=Array.from(L.attributes);for(const Y of lt){const A=Y.name;if(/^on/i.test(A))L.removeAttribute(A);else{if(A==="style"&&Y.value){const J=Y.value;if(Ze.some(rt=>rt.test(J))){L.removeAttribute(A);continue}}if((A==="href"||A==="xlink:href")&&Y.value){const J=Je(Y.value);if(!J){L.removeAttribute(A);continue}J!==Y.value&&L.setAttribute(A,J)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);O.value=Ie||"",ae.value=Ie?G:""})(Oe,D),_.value=D,I.value="",o.loading&&(p.value=!1),a.value=null}catch(u){if(X(Z))return;const y=u!=null&&u.message?String(u.message):"D2 render failed.";o.loading||(a.value=y,I.value=D),_.value="",y.includes("@terrastruct/d2")&&(h.value=!1,p.value=!0)}finally{X(Z)||(Q.value=!1,F?(F=!1,q()):(function(){const u=E;w&&u&&(E="",fe(()=>{var y,re;if(!$){const C=(re=(y=ie.value)==null?void 0:y.offsetHeight)!=null?re:0;C>0&&w.reportHeight(u,C)}w.markSettled(u)}))})())}})}function q(t=!1){if(de||!xe||$)return;if(Q.value)return void(F=!0);const e=Math.max(120,Number(o.progressiveIntervalMs)||0),n=Date.now()-Ce;if(!t&&n<e)return F=!0,void(V==null&&(V=window.setTimeout(()=>{V=null,F&&(F=!1,q(!0))},Math.max(0,e-n))));de=!0;const d=()=>{de=!1,Ce=Date.now(),Ke()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(d):setTimeout(d,0)}function Qe(){if(oe.value)try{const t=new Blob([O.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const n=document.createElement("a");n.href=e,n.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(n),n.click(),document.body.removeChild(n)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function ce(){var t;const e=W.value;if(!e)return;const n=((t=e.firstElementChild)!=null?t:e).getBoundingClientRect().height;n>0&&(ke.value=n)}return K(()=>[o.node.code,o.loading,o.isDark,o.themeId,o.darkThemeId],()=>{q()},{immediate:!0}),K(()=>o.loading,(t,e)=>{e&&!t&&q(!0)}),K(()=>P.value,t=>{t&&q(!0)}),K(()=>[ne.value,O.value,M.value],()=>{fe(()=>{ce()})}),st(()=>{Be.value=!0,fe(()=>{ce()}),typeof ResizeObserver<"u"&&(U=new ResizeObserver(()=>{ce()}),W.value&&U.observe(W.value))}),dt(()=>{var t;$=!0,ue.value+=1,F=!1,(function(){const e=E;w&&e&&(E="",w.markSettled(e))})(),_.value="",(t=z.value)==null||t.destroy(),z.value=null,V!=null&&(clearTimeout(V),V=null),U==null||U.disconnect(),U=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:o.isDark}]),"data-markstream-d2":"1","data-markstream-mode":ne.value?"fallback":"preview","data-markstream-pending":De.value?"true":void 0},[o.showHeader?(v(),m("div",Et,[e[16]||(e[16]=i("div",{class:"flex items-center gap-x-2"},[i("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),i("div",Tt,[o.showModeToggle?(v(),m("div",At,[i("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",p.value?"":"is-active"]),onClick:e[0]||(e[0]=n=>Te("preview")),onMouseenter:e[1]||(e[1]=n=>T(n,f(r)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=n=>T(n,f(r)("common.preview")||"Preview")),onMouseleave:k,onBlur:k},R(f(r)("common.preview")||"Preview"),35),i("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",p.value?"is-active":""]),onClick:e[3]||(e[3]=n=>Te("source")),onMouseenter:e[4]||(e[4]=n=>T(n,f(r)("common.source")||"Source")),onFocus:e[5]||(e[5]=n=>T(n,f(r)("common.source")||"Source")),onMouseleave:k,onBlur:k},R(f(r)("common.source")||"Source"),35)])):j("",!0),o.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":H.value?f(r)("common.copied")||"Copied":f(r)("common.copy")||"Copy",onClick:Xe,onMouseenter:e[6]||(e[6]=n=>Ee(n)),onFocus:e[7]||(e[7]=n=>Ee(n)),onMouseleave:k,onBlur:k},[H.value?(v(),m("svg",Ot,[...e[13]||(e[13]=[i("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Ht,[...e[12]||(e[12]=[i("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[i("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),i("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,jt)):j("",!0),o.showExportButton&&oe.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(r)("common.export")||"Export",onClick:Qe,onMouseenter:e[8]||(e[8]=n=>T(n,f(r)("common.export")||"Export")),onFocus:e[9]||(e[9]=n=>T(n,f(r)("common.export")||"Export")),onMouseleave:k,onBlur:k},[...e[14]||(e[14]=[i("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[i("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,It)):j("",!0),o.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":x.value,onClick:qe,onMouseenter:e[10]||(e[10]=n=>T(n,x.value?f(r)("common.expand")||"Expand":f(r)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=n=>T(n,x.value?f(r)("common.expand")||"Expand":f(r)("common.collapse")||"Collapse")),onMouseleave:k,onBlur:k},[(v(),m("svg",{style:ge({rotate:x.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[i("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,Pt)):j("",!0)])])):j("",!0),ct(i("div",{ref_key:"bodyRef",ref:W,class:"d2-block-body",style:ge(Ye.value)},[o.loading&&!se.value?(v(),m("div",Ft,[i("pre",St,[i("code",null,R(M.value),1)]),a.value?(v(),m("p",Nt,R(a.value),1)):j("",!0)])):(v(),m("div",Lt,[ne.value?(v(),m("div",Rt,[i("pre",_t,[i("code",null,R(M.value),1)]),a.value?(v(),m("p",$t,R(a.value),1)):j("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(ze.value)},[i("div",{class:"d2-svg",innerHTML:O.value},null,8,Vt),a.value?(v(),m("p",Yt,R(a.value),1)):j("",!0)],4))]))],4),[[vt,!x.value]])],10,Mt))}}),[["__scopeId","data-v-196847dc"]]);we.install=g=>{g.component(we.__name,we)};export{we as default};
@@ -0,0 +1,2 @@
1
+ import{_ as a,l as s,I as n,e as i}from"./mermaid.core-CIDPCsfA.js";import{p}from"./cynefin-OW5HDTMX-CGp-_RPy.js";import"./index-Zlr3P937.js";import"./vendor-vue-C21-5sm4.js";var g={parse:a(async r=>{const e=await p("info",r);s.debug(e)},"parse")},v={version:"11.15.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,o)=>{s.debug(`rendering info diagram
2
+ `+r);const t=n(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:c},w={parser:g,db:m,renderer:l};export{w as diagram};
@@ -0,0 +1 @@
1
+ const n=Object.freeze(JSON.parse(`{"displayName":"INI","name":"ini","patterns":[{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ini"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.ini"}},"end":"\\\\n","name":"comment.line.number-sign.ini"}]},{"begin":"(^[\\\\t ]+)?(?=;)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.ini"}},"end":"(?!\\\\G)","patterns":[{"begin":";","beginCaptures":{"0":{"name":"punctuation.definition.comment.ini"}},"end":"\\\\n","name":"comment.line.semicolon.ini"}]},{"captures":{"1":{"name":"keyword.other.definition.ini"},"2":{"name":"punctuation.separator.key-value.ini"}},"match":"\\\\b([-.0-9A-Z_a-z]+)\\\\b\\\\s*(=)"},{"captures":{"1":{"name":"punctuation.definition.entity.ini"},"3":{"name":"punctuation.definition.entity.ini"}},"match":"^(\\\\[)(.*?)(])","name":"entity.name.section.group-title.ini"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ini"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.ini"}},"name":"string.quoted.single.ini","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.ini"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ini"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.ini"}},"name":"string.quoted.double.ini"}],"scopeName":"source.ini","aliases":["properties"]}`)),i=[n];export{i as default};
@@ -0,0 +1 @@
1
+ function t(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{t as i};
@@ -0,0 +1,70 @@
1
+ import{_ as o,c as ot,a4 as ut,I as dt,al as yt,z as ft,k as pt,p as it,a as gt,b as kt,g as mt,s as wt,q as _t,e as bt}from"./mermaid.core-CIDPCsfA.js";import"./index-Zlr3P937.js";import"./vendor-vue-C21-5sm4.js";var tt=(function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,u,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),b=Object.create(this.lexer),C={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(C.yy[z]=this.yy[z]);b.setInput(t,C.yy),C.yy.lexer=b,C.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var T=b.yylloc;n.push(T);var D=b.options&&b.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function F(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(F,"popStack");function j(){var P;return P=u.pop()||b.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(j,"lex");for(var A,W,B,K,H={},X,V,et,Y;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=j()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var Q="";Y=[];for(X in v[W])this.terminals_[X]&&X>L&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Q="Parse error on line "+(I+1)+`:
2
+ `+b.showPosition()+`
3
+ Expecting `+Y.join(", ")+", got '"+(this.terminals_[A]||A)+"'":Q="Parse error on line "+(I+1)+": Unexpected "+(A==E?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:T,expected:Y})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(B[0]){case 1:i.push(A),p.push(b.yytext),n.push(b.yylloc),i.push(B[1]),A=null,S=b.yyleng,w=b.yytext,I=b.yylineno,T=b.yylloc;break;case 2:if(V=this.productions_[B[1]][1],H.$=p[p.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},D&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(H,[w,S,I,C.yy,B[1],p,n].concat(R)),typeof K<"u")return K;V&&(i=i.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[B[1]][0]),p.push(H.$),n.push(H._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var M={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
5
+ `+s+"^"},"showPosition"),test_match:o(function(t,s){var i,u,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),u=t[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var n in p)this[n]=p[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,s,i,u;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),n=0;n<p.length;n++)if(i=this._input.match(this.rules[p[n]]),i&&(!s||i[0].length>s[0].length)){if(s=i,u=n,this.options.backtrack_lexer){if(t=this.test_match(i,p[n]),t!==!1)return t;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(t=this.test_match(s,p[u]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var s=this.next();return s||this.lex()},"lex"),begin:o(function(s){this.conditionStack.push(s)},"begin"),popState:o(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:o(function(s){this.begin(s)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(s,i,u,p){switch(u){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return M})();N.lexer=O;function $(){this.yy={}}return o($,"Parser"),$.prototype=N,N.Parser=$,new $})();tt.parser=tt;var xt=tt,Z,vt=(Z=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,ft()}getRoot(){return this.root}addNode(h,r){const a=pt.sanitizeText(r,ot());if(!this.root){this.root={text:a,children:[]},this.stack=[{level:0,node:this.root}],it(a);return}this.baseLevel??(this.baseLevel=h);let l=h-this.baseLevel+1;for(l<=0&&(l=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=l;)this.stack.pop();const y=this.stack[this.stack.length-1].node,f={text:a,children:[]};y.children.push(f),this.stack.push({level:l,node:f})}getAccTitle(){return gt()}setAccTitle(h){kt(h)}getAccDescription(){return mt()}setAccDescription(h){wt(h)}getDiagramTitle(){return _t()}setDiagramTitle(h){it(h)}},o(Z,"IshikawaDB"),Z),St=14,G=250,$t=30,Et=60,At=5,ht=82*Math.PI/180,st=Math.cos(ht),nt=Math.sin(ht),at=o((e,h,r)=>{const a=e.node().getBBox(),l=a.width+h*2,y=a.height+h*2;bt(e,y,l,r),e.attr("viewBox",`${a.x-h} ${a.y-h} ${l} ${y}`)},"applyPaddedViewBox"),It=o((e,h,r,a)=>{var C,z;const y=a.db.getRoot();if(!y)return;const f=ot(),{look:d,handDrawnSeed:m,themeVariables:c}=f,k=ut(f.fontSize)[0]??St,g=d==="handDrawn",_=y.children??[],x=((C=f.ishikawa)==null?void 0:C.diagramPadding)??20,N=((z=f.ishikawa)==null?void 0:z.useMaxWidth)??!1,O=dt(h),$=O.append("g").attr("class","ishikawa"),M=g?yt.svg(O.node()):void 0,t=M?{roughSvg:M,seed:m??0,lineColor:(c==null?void 0:c.lineColor)??"#333",fillColor:(c==null?void 0:c.mainBkg)??"#fff"}:void 0,s=`ishikawa-arrow-${h}`;g||$.append("defs").append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let i=0,u=G;const p=g?void 0:U($,i,u,i,u,"ishikawa-spine");if(Lt($,i,u,y.text,k,t),!_.length){g&&U($,i,u,i,u,"ishikawa-spine",t),at(O,x,N);return}i-=20;const n=_.filter((T,D)=>D%2===0),v=_.filter((T,D)=>D%2===1),w=rt(n),I=rt(v),S=w.total+I.total;let L=G,E=G;if(S>0){const T=G*2,D=G*.3;L=Math.max(D,T*(w.total/S)),E=Math.max(D,T*(I.total/S))}const R=k*2;L=Math.max(L,w.max*R),E=Math.max(E,I.max*R),u=Math.max(L,G),p&&p.attr("y1",u).attr("y2",u),$.select(".ishikawa-head-group").attr("transform",`translate(0,${u})`);const b=Math.ceil(_.length/2);for(let T=0;T<b;T++){const D=$.append("g").attr("class","ishikawa-pair");for(const[F,j,A]of[[_[T*2],-1,L],[_[T*2+1],1,E]])F&&Pt(D,F,i,u,j,A,k,t);i=D.selectAll("text").nodes().reduce((F,j)=>Math.min(F,j.getBBox().x),1/0)}if(g)U($,i,u,0,u,"ishikawa-spine",t);else{p.attr("x1",i);const T=`url(#${s})`;$.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",T)}at(O,x,N)},"draw"),rt=o(e=>{const h=o(r=>r.children.reduce((a,l)=>a+1+h(l),0),"countDescendants");return e.reduce((r,a)=>{const l=h(a);return r.total+=l,r.max=Math.max(r.max,l),r},{total:0,max:0})},"sideStats"),Lt=o((e,h,r,a,l,y)=>{const f=Math.max(6,Math.floor(110/(l*.6))),d=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${h},${r})`),m=q(d,ct(a,f),0,0,"ishikawa-head-label","start",l),c=m.node().getBBox(),k=Math.max(60,c.width+6),g=Math.max(40,c.height*2+40),_=`M 0 ${-g/2} L 0 ${g/2} Q ${k*2.4} 0 0 ${-g/2} Z`;if(y){const x=y.roughSvg.path(_,{roughness:1.5,seed:y.seed,fill:y.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:y.lineColor,strokeWidth:2});d.insert(()=>x,":first-child").attr("class","ishikawa-head")}else d.insert("path",":first-child").attr("class","ishikawa-head").attr("d",_);m.attr("transform",`translate(${(k-c.width)/2-c.x+3},${-c.y-c.height/2})`)},"drawHead"),Tt=o((e,h)=>{const r=[],a=[],l=o((y,f,d)=>{const m=h===-1?[...y].reverse():y;for(const c of m){const k=r.length,g=c.children??[];r.push({depth:d,text:ct(c.text,15),parentIndex:f,childCount:g.length}),d%2===0?(a.push(k),g.length&&l(g,k,d+1)):(g.length&&l(g,k,d+1),a.push(k))}},"walk");return l(e,-1,2),{entries:r,yOrder:a}},"flattenTree"),Mt=o((e,h,r,a,l,y,f)=>{const d=e.append("g").attr("class","ishikawa-label-group"),c=q(d,h,r,a+11*l,"ishikawa-label cause","middle",y).node().getBBox();if(f){const k=f.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:f.seed,fill:f.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:f.lineColor,strokeWidth:2});d.insert(()=>k,":first-child").attr("class","ishikawa-label-box")}else d.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",c.x-20).attr("y",c.y-2).attr("width",c.width+40).attr("height",c.height+4)},"drawCauseLabel"),J=o((e,h,r,a,l,y)=>{const f=Math.sqrt(a*a+l*l);if(f===0)return;const d=a/f,m=l/f,c=6,k=-m*c,g=d*c,_=h,x=r,N=`M ${_} ${x} L ${_-d*c*2+k} ${x-m*c*2+g} L ${_-d*c*2-k} ${x-m*c*2-g} Z`,O=y.roughSvg.path(N,{roughness:1,seed:y.seed,fill:y.lineColor,fillStyle:"solid",stroke:y.lineColor,strokeWidth:1});e.append(()=>O)},"drawArrowMarker"),Pt=o((e,h,r,a,l,y,f,d)=>{const m=h.children??[],c=y*(m.length?1:.2),k=-st*c,g=nt*c*l,_=r+k,x=a+g;if(U(e,r,a,_,x,"ishikawa-branch",d),d&&J(e,r,a,r-_,a-x,d),Mt(e,h.text,_,x,l,f,d),!m.length)return;const{entries:N,yOrder:O}=Tt(m,l),$=N.length,M=new Array($);for(const[p,n]of O.entries())M[n]=a+g*((p+1)/($+1));const t=new Map;t.set(-1,{x0:r,y0:a,x1:_,y1:x,childCount:m.length,childrenDrawn:0});const s=-st,i=nt*l,u=l<0?"ishikawa-label up":"ishikawa-label down";for(const[p,n]of N.entries()){const v=M[p],w=t.get(n.parentIndex),I=e.append("g").attr("class","ishikawa-sub-group");let S=0,L=0,E=0;if(n.depth%2===0){const R=w.y1-w.y0;S=lt(w.x0,w.x1,R?(v-w.y0)/R:.5),L=v,E=S-(n.childCount>0?Et+n.childCount*At:$t),U(I,S,v,E,v,"ishikawa-sub-branch",d),d&&J(I,S,v,1,0,d),q(I,n.text,E,v,"ishikawa-label align","end",f)}else{const R=w.childrenDrawn++;S=lt(w.x0,w.x1,(w.childCount-R)/(w.childCount+1)),L=w.y0,E=S+s*((v-L)/i),U(I,S,L,E,v,"ishikawa-sub-branch",d),d&&J(I,S,L,S-E,L-v,d),q(I,n.text,E,v,u,"end",f)}n.childCount>0&&t.set(p,{x0:S,y0:L,x1:E,y1:v,childCount:n.childCount,childrenDrawn:0})}},"drawBranch"),Bt=o(e=>e.split(/<br\s*\/?>|\n/),"splitLines"),ct=o((e,h)=>{if(e.length<=h)return e;const r=[];for(const a of e.split(/\s+/)){const l=r.length-1;l>=0&&r[l].length+1+a.length<=h?r[l]+=" "+a:r.push(a)}return r.join(`
7
+ `)},"wrapText"),q=o((e,h,r,a,l,y,f)=>{const d=Bt(h),m=f*1.05,c=e.append("text").attr("class",l).attr("text-anchor",y).attr("x",r).attr("y",a-(d.length-1)*m/2);for(const[k,g]of d.entries())c.append("tspan").attr("x",r).attr("dy",k===0?0:m).text(g);return c},"drawMultilineText"),lt=o((e,h,r)=>e+(h-e)*r,"lerp"),U=o((e,h,r,a,l,y,f)=>{if(f){const d=f.roughSvg.line(h,r,a,l,{roughness:1.5,seed:f.seed,stroke:f.lineColor,strokeWidth:2});e.append(()=>d).attr("class",y);return}return e.append("line").attr("class",y).attr("x1",h).attr("y1",r).attr("x2",a).attr("y2",l)},"drawLine"),Nt={draw:It},Dt=o(e=>`
8
+ .ishikawa .ishikawa-spine,
9
+ .ishikawa .ishikawa-branch,
10
+ .ishikawa .ishikawa-sub-branch {
11
+ stroke: ${e.lineColor};
12
+ stroke-width: 2;
13
+ fill: none;
14
+ }
15
+
16
+ .ishikawa .ishikawa-sub-branch {
17
+ stroke-width: 1;
18
+ }
19
+
20
+ .ishikawa .ishikawa-arrow {
21
+ fill: ${e.lineColor};
22
+ }
23
+
24
+ .ishikawa .ishikawa-head {
25
+ fill: ${e.mainBkg};
26
+ stroke: ${e.lineColor};
27
+ stroke-width: 2;
28
+ }
29
+
30
+ .ishikawa .ishikawa-label-box {
31
+ fill: ${e.mainBkg};
32
+ stroke: ${e.lineColor};
33
+ stroke-width: 2;
34
+ }
35
+
36
+ .ishikawa text {
37
+ font-family: ${e.fontFamily};
38
+ font-size: ${e.fontSize};
39
+ fill: ${e.textColor};
40
+ }
41
+
42
+ .ishikawa .ishikawa-head-label {
43
+ font-weight: 600;
44
+ text-anchor: middle;
45
+ dominant-baseline: middle;
46
+ font-size: 14px;
47
+ }
48
+
49
+ .ishikawa .ishikawa-label {
50
+ text-anchor: end;
51
+ }
52
+
53
+ .ishikawa .ishikawa-label.cause {
54
+ text-anchor: middle;
55
+ dominant-baseline: middle;
56
+ }
57
+
58
+ .ishikawa .ishikawa-label.align {
59
+ text-anchor: end;
60
+ dominant-baseline: middle;
61
+ }
62
+
63
+ .ishikawa .ishikawa-label.up {
64
+ dominant-baseline: baseline;
65
+ }
66
+
67
+ .ishikawa .ishikawa-label.down {
68
+ dominant-baseline: hanging;
69
+ }
70
+ `,"getStyles"),Ot=Dt,Wt={parser:xt,get db(){return new vt},renderer:Nt,styles:Ot};export{Wt as diagram};
@@ -0,0 +1 @@
1
+ const e=Object.freeze(JSON.parse(`{"displayName":"Java","name":"java","patterns":[{"begin":"\\\\b(package)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.other.package.java"}},"contentName":"storage.modifier.package.java","end":"\\\\s*(;)","endCaptures":{"1":{"name":"punctuation.terminator.java"}},"name":"meta.package.java","patterns":[{"include":"#comments"},{"match":"(?<=\\\\.)\\\\s*\\\\.|\\\\.(?=\\\\s*;)","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!_)_(?=\\\\s*([.;]))|\\\\b\\\\d+|-+","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"[A-Z]+","name":"invalid.deprecated.package_name_not_lowercase.java"},{"match":"\\\\b(?<!\\\\$)(abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|non-sealed|package|permits|private|protected|public|return|sealed|short|static|strictfp|super|switch|syncronized|this|throws??|transient|try|void|volatile|while|yield|true|false|null)\\\\b","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\.","name":"punctuation.separator.java"}]},{"begin":"\\\\b(import)\\\\b\\\\s*\\\\b(static)?\\\\b\\\\s","beginCaptures":{"1":{"name":"keyword.other.import.java"},"2":{"name":"storage.modifier.java"}},"contentName":"storage.modifier.import.java","end":"\\\\s*(;)","endCaptures":{"1":{"name":"punctuation.terminator.java"}},"name":"meta.import.java","patterns":[{"include":"#comments"},{"match":"(?<=\\\\.)\\\\s*\\\\.|\\\\.(?=\\\\s*;)","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!\\\\.)\\\\s*\\\\*","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!_)_(?=\\\\s*([.;]))|\\\\b\\\\d+|-+","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\b(?<!\\\\$)(abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|non-sealed|package|permits|private|protected|public|return|sealed|short|static|strictfp|super|switch|syncronized|this|throws??|transient|try|void|volatile|while|yield|true|false|null)\\\\b","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\.","name":"punctuation.separator.java"},{"match":"\\\\*","name":"variable.language.wildcard.java"}]},{"include":"#comments-javadoc"},{"include":"#code"},{"include":"#module"}],"repository":{"all-types":{"patterns":[{"include":"#primitive-arrays"},{"include":"#primitive-types"},{"include":"#object-types"}]},"annotations":{"patterns":[{"begin":"((@)\\\\s*([^(\\\\s]+))(\\\\()","beginCaptures":{"2":{"name":"punctuation.definition.annotation.java"},"3":{"name":"storage.type.annotation.java"},"4":{"name":"punctuation.definition.annotation-arguments.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.annotation-arguments.end.bracket.round.java"}},"name":"meta.declaration.annotation.java","patterns":[{"captures":{"1":{"name":"constant.other.key.java"},"2":{"name":"keyword.operator.assignment.java"}},"match":"(\\\\w*)\\\\s*(=)"},{"include":"#code"}]},{"captures":{"1":{"name":"punctuation.definition.annotation.java"},"2":{"name":"storage.modifier.java"},"3":{"name":"storage.type.annotation.java"},"5":{"name":"punctuation.definition.annotation.java"},"6":{"name":"storage.type.annotation.java"}},"match":"(@)(interface)\\\\s+(\\\\w*)|((@)\\\\s*(\\\\w+))","name":"meta.declaration.annotation.java"}]},"anonymous-block-and-instance-initializer":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.java"}},"patterns":[{"include":"#code"}]},"anonymous-classes-and-new":{"begin":"\\\\bnew\\\\b","beginCaptures":{"0":{"name":"keyword.control.new.java"}},"end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"include":"#function-call"},{"include":"#all-types"},{"begin":"(?<=\\\\))","end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.inner-class.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.inner-class.end.bracket.curly.java"}},"name":"meta.inner-class.java","patterns":[{"include":"#class-body"}]}]},{"begin":"(?<=])","end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.array-initializer.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.array-initializer.end.bracket.curly.java"}},"name":"meta.array-initializer.java","patterns":[{"include":"#code"}]}]},{"include":"#parens"}]},"assertions":{"patterns":[{"begin":"\\\\b(assert)\\\\s","beginCaptures":{"1":{"name":"keyword.control.assert.java"}},"end":"$","name":"meta.declaration.assertion.java","patterns":[{"match":":","name":"keyword.operator.assert.expression-separator.java"},{"include":"#code"}]}]},"class":{"begin":"(?=\\\\w?[-\\\\w\\\\s]*\\\\b(?:class|(?<!@)interface|enum)\\\\s+[$\\\\w]+)","end":"}","endCaptures":{"0":{"name":"punctuation.section.class.end.bracket.curly.java"}},"name":"meta.class.java","patterns":[{"include":"#storage-modifiers"},{"include":"#generics"},{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.java"},"2":{"name":"entity.name.type.class.java"}},"match":"(class|(?<!@)interface|enum)\\\\s+([$\\\\w]+)","name":"meta.class.identifier.java"},{"begin":"extends","beginCaptures":{"0":{"name":"storage.modifier.extends.java"}},"end":"(?=\\\\{|implements|permits)","name":"meta.definition.class.inherited.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"(implements)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\s*extends|permits|\\\\{)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"(permits)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.permits.java"}},"end":"(?=\\\\s*extends|implements|\\\\{)","name":"meta.definition.class.permits.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.class.begin.bracket.curly.java"}},"contentName":"meta.class.body.java","end":"(?=})","patterns":[{"include":"#class-body"}]}]},"class-body":{"patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"include":"#enums"},{"include":"#class"},{"include":"#generics"},{"include":"#static-initializer"},{"include":"#class-fields-and-methods"},{"include":"#annotations"},{"include":"#storage-modifiers"},{"include":"#member-variables"},{"include":"#code"}]},"class-fields-and-methods":{"patterns":[{"begin":"(?==)","end":"(?=;)","patterns":[{"include":"#code"}]},{"include":"#methods"}]},"code":{"patterns":[{"include":"#annotations"},{"include":"#comments"},{"include":"#enums"},{"include":"#class"},{"include":"#record"},{"include":"#anonymous-block-and-instance-initializer"},{"include":"#try-catch-finally"},{"include":"#assertions"},{"include":"#parens"},{"include":"#constants-and-special-vars"},{"include":"#numbers"},{"include":"#anonymous-classes-and-new"},{"include":"#lambda-expression"},{"include":"#keywords"},{"include":"#storage-modifiers"},{"include":"#method-call"},{"include":"#function-call"},{"include":"#variables"},{"include":"#variables-local"},{"include":"#objects"},{"include":"#properties"},{"include":"#strings"},{"include":"#all-types"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"},{"match":";","name":"punctuation.terminator.java"}]},"comments":{"patterns":[{"captures":{"0":{"name":"punctuation.definition.comment.java"}},"match":"/\\\\*\\\\*/","name":"comment.block.empty.java"},{"include":"#comments-inline"}]},"comments-inline":{"patterns":[{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.java"}},"end":"\\\\*/","name":"comment.block.java"},{"begin":"(^[\\\\t ]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.java"}},"end":"(?!\\\\G)","patterns":[{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.java"}},"end":"\\\\n","name":"comment.line.double-slash.java"}]}]},"comments-javadoc":{"patterns":[{"begin":"^\\\\s*(/\\\\*\\\\*)(?!/)","beginCaptures":{"1":{"name":"punctuation.definition.comment.java"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.java"}},"name":"comment.block.javadoc.java","patterns":[{"match":"@(author|deprecated|return|see|serial|since|version)\\\\b","name":"keyword.other.documentation.javadoc.java"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"variable.parameter.java"}},"match":"(@param)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"entity.name.type.class.java"}},"match":"(@(?:exception|throws))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"entity.name.type.class.java"},"3":{"name":"variable.parameter.java"}},"match":"\\\\{(@link)\\\\s+(\\\\S+)?#([$\\\\w]+\\\\s*\\\\([^()]*\\\\)).*?}"}]}]},"constants-and-special-vars":{"patterns":[{"match":"\\\\b(true|false|null)\\\\b","name":"constant.language.java"},{"match":"\\\\bthis\\\\b","name":"variable.language.this.java"},{"match":"\\\\bsuper\\\\b","name":"variable.language.java"}]},"enums":{"begin":"^\\\\s*([\\\\w\\\\s]*)(enum)\\\\s+(\\\\w+)","beginCaptures":{"1":{"patterns":[{"include":"#storage-modifiers"}]},"2":{"name":"storage.modifier.java"},"3":{"name":"entity.name.type.enum.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.enum.end.bracket.curly.java"}},"name":"meta.enum.java","patterns":[{"begin":"\\\\b(extends)\\\\b","beginCaptures":{"1":{"name":"storage.modifier.extends.java"}},"end":"(?=\\\\{|\\\\bimplements\\\\b)","name":"meta.definition.class.inherited.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\b(implements)\\\\b","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\{|\\\\bextends\\\\b)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.enum.begin.bracket.curly.java"}},"end":"(?=})","patterns":[{"begin":"(?<=\\\\{)","end":"(?=[;}])","patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"begin":"\\\\b(\\\\w+)\\\\b","beginCaptures":{"1":{"name":"constant.other.enum.java"}},"end":"(,)|(?=[;}])","endCaptures":{"1":{"name":"punctuation.separator.delimiter.java"}},"patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"patterns":[{"include":"#class-body"}]}]}]},{"include":"#class-body"}]}]},"function-call":{"begin":"([$A-Z_a-z][$\\\\w]*)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.java"},"2":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.function-call.java","patterns":[{"include":"#code"}]},"generics":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.bracket.angle.java"}},"end":">","endCaptures":{"0":{"name":"punctuation.bracket.angle.java"}},"patterns":[{"match":"\\\\b(extends|super)\\\\b","name":"storage.modifier.$1.java"},{"captures":{"1":{"name":"storage.type.java"}},"match":"(?<!\\\\.)([$A-Z_a-z][$0-9A-Z_a-z]*)(?=\\\\s*<)"},{"include":"#primitive-arrays"},{"match":"[$A-Z_a-z][$0-9A-Z_a-z]*","name":"storage.type.generic.java"},{"match":"\\\\?","name":"storage.type.generic.wildcard.java"},{"match":"&","name":"punctuation.separator.types.java"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"},{"include":"#parens"},{"include":"#generics"},{"include":"#comments"}]},"keywords":{"patterns":[{"match":"\\\\bthrow\\\\b","name":"keyword.control.throw.java"},{"match":"[:?]","name":"keyword.control.ternary.java"},{"match":"\\\\b(return|yield|break|case|continue|default|do|while|for|switch|if|else)\\\\b","name":"keyword.control.java"},{"match":"\\\\b(instanceof)\\\\b","name":"keyword.operator.instanceof.java"},{"match":"(<<|>>>?|[\\\\^~])","name":"keyword.operator.bitwise.java"},{"match":"(([\\\\&^|]|<<|>>>?)=)","name":"keyword.operator.assignment.bitwise.java"},{"match":"(===?|!=|<=|>=|<>|[<>])","name":"keyword.operator.comparison.java"},{"match":"([-%*+/]=)","name":"keyword.operator.assignment.arithmetic.java"},{"match":"(=)","name":"keyword.operator.assignment.java"},{"match":"(--|\\\\+\\\\+)","name":"keyword.operator.increment-decrement.java"},{"match":"([-%*+/])","name":"keyword.operator.arithmetic.java"},{"match":"(!|&&|\\\\|\\\\|)","name":"keyword.operator.logical.java"},{"match":"([\\\\&|])","name":"keyword.operator.bitwise.java"},{"match":"\\\\b(const|goto)\\\\b","name":"keyword.reserved.java"}]},"lambda-expression":{"patterns":[{"match":"->","name":"storage.type.function.arrow.java"}]},"member-variables":{"begin":"(?=private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)","end":"(?=[;=])","patterns":[{"include":"#storage-modifiers"},{"include":"#variables"},{"include":"#primitive-arrays"},{"include":"#object-types"}]},"method-call":{"begin":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"entity.name.function.java"},"3":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.method-call.java","patterns":[{"include":"#code"}]},"methods":{"begin":"(?!new)(?=[<\\\\w].*\\\\s+)(?=([^/=]|/(?!/))+\\\\()","end":"(})|(?=;)","endCaptures":{"1":{"name":"punctuation.section.method.end.bracket.curly.java"}},"name":"meta.method.java","patterns":[{"include":"#storage-modifiers"},{"begin":"(\\\\w+)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.java"},"2":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.method.identifier.java","patterns":[{"include":"#parameters"},{"include":"#parens"},{"include":"#comments"}]},{"include":"#generics"},{"begin":"(?=\\\\w.*\\\\s+\\\\w+\\\\s*\\\\()","end":"(?=\\\\s+\\\\w+\\\\s*\\\\()","name":"meta.method.return-type.java","patterns":[{"include":"#all-types"},{"include":"#parens"},{"include":"#comments"}]},{"include":"#throws"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.method.begin.bracket.curly.java"}},"contentName":"meta.method.body.java","end":"(?=})","patterns":[{"include":"#code"}]},{"include":"#comments"}]},"module":{"begin":"((open)\\\\s)?(module)\\\\s+(\\\\w+)","beginCaptures":{"1":{"name":"storage.modifier.java"},"3":{"name":"storage.modifier.java"},"4":{"name":"entity.name.type.module.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.module.end.bracket.curly.java"}},"name":"meta.module.java","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.module.begin.bracket.curly.java"}},"contentName":"meta.module.body.java","end":"(?=})","patterns":[{"include":"#comments"},{"include":"#comments-javadoc"},{"match":"\\\\b(requires|transitive|exports|opens|to|uses|provides|with)\\\\b","name":"keyword.module.java"}]}]},"numbers":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])((?<!\\\\.)\\\\h([_\\\\h]*\\\\h)?[Ll]?(?!\\\\.)|(\\\\h([_\\\\h]*\\\\h)?\\\\.?|(\\\\h([_\\\\h]*\\\\h)?)?\\\\.\\\\h([_\\\\h]*\\\\h)?)[Pp][-+]?[0-9]([0-9_]*[0-9])?[DFdf]?)\\\\b(?!\\\\$)","name":"constant.numeric.hex.java"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]([01_]*[01])?[Ll]?\\\\b(?!\\\\$)","name":"constant.numeric.binary.java"},{"match":"\\\\b(?<!\\\\$)0[0-7]([0-7_]*[0-7])?[Ll]?\\\\b(?!\\\\$)","name":"constant.numeric.octal.java"},{"match":"(?<!\\\\$)(\\\\b[0-9]([0-9_]*[0-9])?\\\\.\\\\B(?!\\\\.)|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([Ee][-+]?[0-9]([0-9_]*[0-9])?)[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]\\\\b|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([0-9]([0-9_]*[0-9])?)([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]?\\\\b|(?<!\\\\.)\\\\B\\\\.[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]\\\\b|\\\\b(0|[1-9]([0-9_]*[0-9])?)(?!\\\\.)[Ll]?\\\\b)(?!\\\\$)","name":"constant.numeric.decimal.java"}]},"object-types":{"patterns":[{"include":"#generics"},{"begin":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*)([A-Z_]\\\\w*)\\\\s*(?=\\\\[)","beginCaptures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]},"2":{"name":"storage.type.object.array.java"}},"end":"(?!\\\\s*\\\\[)","patterns":[{"include":"#comments"},{"include":"#parens"}]},{"captures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]}},"match":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*[A-Z_]\\\\w*)\\\\s*(?=<)"},{"captures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]}},"match":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*[A-Z_]\\\\w*)\\\\b((?=\\\\s*[\\\\n$A-Z_a-z])|(?=\\\\s*\\\\.\\\\.\\\\.))"}]},"object-types-inherited":{"patterns":[{"include":"#generics"},{"captures":{"1":{"name":"punctuation.separator.period.java"}},"match":"\\\\b(?:[A-Z]\\\\w*\\\\s*(\\\\.)\\\\s*)*[A-Z]\\\\w*\\\\b","name":"entity.other.inherited-class.java"},{"match":",","name":"punctuation.separator.delimiter.java"}]},"objects":{"match":"(?<![$\\\\w])[$A-Z_a-z][$\\\\w]*(?=\\\\s*\\\\.\\\\s*[$\\\\w]+)","name":"variable.other.object.java"},"parameters":{"patterns":[{"match":"\\\\bfinal\\\\b","name":"storage.modifier.java"},{"include":"#annotations"},{"include":"#all-types"},{"include":"#strings"},{"match":"\\\\w+","name":"variable.parameter.java"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.\\\\.\\\\.","name":"punctuation.definition.parameters.varargs.java"}]},"parens":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.bracket.square.java"}},"end":"]","endCaptures":{"0":{"name":"punctuation.bracket.square.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"patterns":[{"include":"#code"}]}]},"primitive-arrays":{"patterns":[{"begin":"\\\\b(void|boolean|byte|char|short|int|float|long|double)\\\\b\\\\s*(?=\\\\[)","beginCaptures":{"1":{"name":"storage.type.primitive.array.java"}},"end":"(?!\\\\s*\\\\[)","patterns":[{"include":"#comments"},{"include":"#parens"}]}]},"primitive-types":{"match":"\\\\b(void|boolean|byte|char|short|int|float|long|double)\\\\b","name":"storage.type.primitive.java"},"properties":{"patterns":[{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"keyword.control.new.java"}},"match":"(\\\\.)\\\\s*(new)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"variable.other.object.property.java"}},"match":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)(?=\\\\s*\\\\.\\\\s*[$A-Z_a-z][$\\\\w]*)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"variable.other.object.property.java"}},"match":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"invalid.illegal.identifier.java"}},"match":"(\\\\.)\\\\s*([0-9][$\\\\w]*)"}]},"record":{"begin":"(?=\\\\w?[\\\\w\\\\s]*\\\\brecord\\\\s+[$\\\\w]+)","end":"}","endCaptures":{"0":{"name":"punctuation.section.class.end.bracket.curly.java"}},"name":"meta.record.java","patterns":[{"include":"#storage-modifiers"},{"include":"#generics"},{"include":"#comments"},{"begin":"(record)\\\\s+([$\\\\w]+)(<[$\\\\w]+>)?(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.java"},"2":{"name":"entity.name.type.record.java"},"3":{"patterns":[{"include":"#generics"}]},"4":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.record.identifier.java","patterns":[{"include":"#code"}]},{"begin":"(implements)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\s*\\\\{)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"include":"#record-body"}]},"record-body":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.class.begin.bracket.curly.java"}},"end":"(?=})","name":"meta.record.body.java","patterns":[{"include":"#record-constructor"},{"include":"#class-body"}]},"record-constructor":{"begin":"(?!new)(?=[<\\\\w].*\\\\s+)(?=([^(/=]|/(?!/))+(?=\\\\{))","end":"(})|(?=;)","endCaptures":{"1":{"name":"punctuation.section.method.end.bracket.curly.java"}},"name":"meta.method.java","patterns":[{"include":"#storage-modifiers"},{"begin":"(\\\\w+)","beginCaptures":{"1":{"name":"entity.name.function.java"}},"end":"(?=\\\\s*\\\\{)","name":"meta.method.identifier.java","patterns":[{"include":"#comments"}]},{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.method.begin.bracket.curly.java"}},"contentName":"meta.method.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},"static-initializer":{"patterns":[{"include":"#anonymous-block-and-instance-initializer"},{"match":"static","name":"storage.modifier.java"}]},"storage-modifiers":{"match":"\\\\b(public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|volatile|default|strictfp|sealed|non-sealed)\\\\b","name":"storage.modifier.java"},"strings":{"patterns":[{"begin":"\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"\\"\\"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.triple.java","patterns":[{"match":"(\\\\\\\\\\"\\"\\")(?!\\")|(\\\\\\\\.)","name":"constant.character.escape.java"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.double.java","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.java"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.single.java","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.java"}]}]},"throws":{"begin":"throws","beginCaptures":{"0":{"name":"storage.modifier.java"}},"end":"(?=[;{])","name":"meta.throwables.java","patterns":[{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"[$A-Z_a-z][$.0-9A-Z_a-z]*","name":"storage.type.java"},{"include":"#comments"}]},"try-catch-finally":{"patterns":[{"begin":"\\\\btry\\\\b","beginCaptures":{"0":{"name":"keyword.control.try.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.try.end.bracket.curly.java"}},"name":"meta.try.java","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.try.resources.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.try.resources.end.bracket.round.java"}},"name":"meta.try.resources.java","patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.try.begin.bracket.curly.java"}},"contentName":"meta.try.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},{"begin":"\\\\b(catch)\\\\b","beginCaptures":{"1":{"name":"keyword.control.catch.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.catch.end.bracket.curly.java"}},"name":"meta.catch.java","patterns":[{"include":"#comments"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"contentName":"meta.catch.parameters.java","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"patterns":[{"include":"#comments"},{"include":"#storage-modifiers"},{"begin":"[$A-Z_a-z][$.0-9A-Z_a-z]*","beginCaptures":{"0":{"name":"storage.type.java"}},"end":"(\\\\|)|(?=\\\\))","endCaptures":{"1":{"name":"punctuation.catch.separator.java"}},"patterns":[{"include":"#comments"},{"captures":{"0":{"name":"variable.parameter.java"}},"match":"\\\\w+"}]}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.catch.begin.bracket.curly.java"}},"contentName":"meta.catch.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},{"begin":"\\\\bfinally\\\\b","beginCaptures":{"0":{"name":"keyword.control.finally.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.finally.end.bracket.curly.java"}},"name":"meta.finally.java","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.finally.begin.bracket.curly.java"}},"contentName":"meta.finally.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]}]},"variables":{"begin":"(?=\\\\b((void|boolean|byte|char|short|int|float|long|double)|(?>(\\\\w+\\\\.)*[A-Z_]+\\\\w*))\\\\b\\\\s*(<[],.<>?\\\\[\\\\w\\\\s]*>)?\\\\s*((\\\\[])*)?\\\\s+[$A-Z_a-z][$\\\\w]*([]$,\\\\[\\\\w][],\\\\[\\\\w\\\\s]*)?\\\\s*([:;=]))","end":"(?=[:;=])","name":"meta.definition.variable.java","patterns":[{"captures":{"1":{"name":"variable.other.definition.java"}},"match":"([$A-Z_a-z][$\\\\w]*)(?=\\\\s*(\\\\[])*\\\\s*([,:;=]))"},{"include":"#all-types"},{"include":"#code"}]},"variables-local":{"begin":"(?=\\\\b(var)\\\\b\\\\s+[$A-Z_a-z][$\\\\w]*\\\\s*([:;=]))","end":"(?=[:;=])","name":"meta.definition.variable.local.java","patterns":[{"match":"\\\\bvar\\\\b","name":"storage.type.local.java"},{"captures":{"1":{"name":"variable.other.definition.java"}},"match":"([$A-Z_a-z][$\\\\w]*)(?=\\\\s*(\\\\[])*\\\\s*([:;=]))"},{"include":"#code"}]}},"scopeName":"source.java"}`)),a=[e];export{a as default};