@marimo-team/frontend 0.13.7-dev28 → 0.13.7-dev3

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 (283) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-th_i__dG.js +22 -0
  2. package/dist/assets/VegaLite-0KIipZoB.js +11 -0
  3. package/dist/assets/_baseEach-DMa5jqoU.js +1 -0
  4. package/dist/assets/_baseMap-pUcN7Rpu.js +1 -0
  5. package/dist/assets/_baseUniq-BVoEUTG_.js +1 -0
  6. package/dist/assets/_createAggregator-Djppx6_O.js +1 -0
  7. package/dist/assets/{any-language-editor-BT30OVyI.js → any-language-editor-CyITx6h-.js} +1 -3
  8. package/dist/assets/apl-CXdQSnD-.js +1 -1
  9. package/dist/assets/arc-Cuwikxov.js +1 -1
  10. package/dist/assets/architectureDiagram-IEHRJDOE-OoEkDt5O.js +1 -0
  11. package/dist/assets/asciiarmor-D5V0T9Cu.js +1 -1
  12. package/dist/assets/asn1-DWPaVWf6.js +1 -1
  13. package/dist/assets/asterisk-B46aRdXb.js +1 -1
  14. package/dist/assets/blockDiagram-JOT3LUYC-CGnlM4UU.js +1 -0
  15. package/dist/assets/brainfuck-CtZaYBKt.js +1 -1
  16. package/dist/assets/c4Diagram-VJAJSXHY-DcwqEhJp.js +1 -0
  17. package/dist/assets/channel-C3LrtOq9.js +1 -0
  18. package/dist/assets/chunk-4BMEZGHF-DOK1C4SQ.js +1 -0
  19. package/dist/assets/chunk-A2AXSNBT-tcqF3UW3.js +1 -0
  20. package/dist/assets/chunk-AEK57VVT-CMGGH9xn.js +1 -0
  21. package/dist/assets/chunk-D6G4REZN-DXlJF2Bk.js +1 -0
  22. package/dist/assets/chunk-RZ5BOZE2-COQMYHlq.js +1 -0
  23. package/dist/assets/chunk-XZIHB7SX-Bhxm0x2M.js +1 -0
  24. package/dist/assets/{circle-play-CnK7j27X.js → circle-play-DfTVgygt.js} +2 -1
  25. package/dist/assets/classDiagram-GIVACNV2-Dx1tK0j4.js +1 -0
  26. package/dist/assets/classDiagram-v2-COTLJTTW-Dx1tK0j4.js +1 -0
  27. package/dist/assets/clike-BgBwzOhw.js +1 -1
  28. package/dist/assets/clojure-DR_hEDJv.js +1 -1
  29. package/dist/assets/clone-C11ag5RZ.js +1 -0
  30. package/dist/assets/cmake-DXn5xaP-.js +1 -1
  31. package/dist/assets/cobol-stawOqaz.js +1 -1
  32. package/dist/assets/coffeescript-BTDxI-eT.js +1 -1
  33. package/dist/assets/colors-bszWmPJw.js +1 -1
  34. package/dist/assets/commonlisp-vq6DHwts.js +1 -1
  35. package/dist/assets/compile-R0u9cqWP.js +1 -0
  36. package/dist/assets/crystal-CRzZ78HM.js +1 -1
  37. package/dist/assets/css-ZjFoif2m.js +1 -1
  38. package/dist/assets/cypher-gJDei3ni.js +1 -1
  39. package/dist/assets/cytoscape.esm-bH-fs5wT.js +9 -0
  40. package/dist/assets/d-BShv7fp-.js +1 -1
  41. package/dist/assets/dagre-OKDRZEBW-CtqjM5h9.js +1 -0
  42. package/dist/assets/data-editor-Bfcrqyi2.js +1 -0
  43. package/dist/assets/diagram-SSKATNLV-DNt52Sk_.js +1 -0
  44. package/dist/assets/diagram-VNBRO52H-xUNKnAoh.js +1 -0
  45. package/dist/assets/diff-UJJ5BM9S.js +1 -1
  46. package/dist/assets/dockerfile-knGOOxt4.js +1 -1
  47. package/dist/assets/dtd-DI9Herc-.js +1 -1
  48. package/dist/assets/dylan-CHJ5qNM_.js +1 -1
  49. package/dist/assets/ebnf-B-Df8AvO.js +1 -1
  50. package/dist/assets/ecl-DPFc0Uaf.js +1 -1
  51. package/dist/assets/edit-page-NmKprqkt.js +8 -0
  52. package/dist/assets/eiffel-DR5c0IrL.js +1 -1
  53. package/dist/assets/elm-D7xaZ7Da.js +1 -1
  54. package/dist/assets/erDiagram-Q7BY3M3F-io1sgtPU.js +1 -0
  55. package/dist/assets/erlang-BuqgqA5h.js +1 -1
  56. package/dist/assets/fcl-CVaBTCzQ.js +1 -1
  57. package/dist/assets/flowDiagram-4HSFHLVR-CAcDVF45.js +1 -0
  58. package/dist/assets/forth-Dri_5nFc.js +1 -1
  59. package/dist/assets/fortran-DL7KluxX.js +1 -1
  60. package/dist/assets/ganttDiagram-APWFNJXF-CCNkQyYO.js +1 -0
  61. package/dist/assets/gas-5kEe4nk0.js +1 -1
  62. package/dist/assets/gherkin-B6X1vGSW.js +1 -1
  63. package/dist/assets/gitGraphDiagram-7IBYFJ6S-S-DIg2KO.js +1 -0
  64. package/dist/assets/graph-CPvBoehR.js +1 -0
  65. package/dist/assets/groovy-DnIzCrpZ.js +1 -1
  66. package/dist/assets/haskell-CmdsSjFB.js +1 -1
  67. package/dist/assets/haxe-D25e-2l-.js +1 -1
  68. package/dist/assets/home-page-DUROE-6l.js +7 -0
  69. package/dist/assets/http-BKJkqRj4.js +1 -1
  70. package/dist/assets/idl-pcmmZuaN.js +1 -1
  71. package/dist/assets/index-1hj486rU.js +1 -0
  72. package/dist/assets/index-33Q7xM_A.css +1 -0
  73. package/dist/assets/index-9Y5po83T.js +1 -0
  74. package/dist/assets/index-B1R-kky3.js +1 -0
  75. package/dist/assets/index-BHjEpXuR.js +1 -0
  76. package/dist/assets/index-BLyYnOxb.js +1 -0
  77. package/dist/assets/index-BVOgGu7j.js +1 -0
  78. package/dist/assets/index-Bi8fVNBD.js +1 -0
  79. package/dist/assets/index-CBRsR4hm.js +1 -0
  80. package/dist/assets/index-CBe39OqR.js +1 -0
  81. package/dist/assets/index-CCmIqGps.js +87 -0
  82. package/dist/assets/index-Cq97_EnG.js +1 -0
  83. package/dist/assets/index-Cv0v8nkj.js +1 -0
  84. package/dist/assets/index-D3r87Dua.js +1 -0
  85. package/dist/assets/index-DTd9oqZ1.js +1 -0
  86. package/dist/assets/index-DeDcyKGD.js +1 -0
  87. package/dist/assets/index-W5H1wa8v.js +1 -0
  88. package/dist/assets/index-g5NcpOqf.js +1 -0
  89. package/dist/assets/index-jkcjZbio.js +1 -0
  90. package/dist/assets/index-pCY6hO1c.js +1 -0
  91. package/dist/assets/infoDiagram-PH2N3AL5-C_3rp1aS.js +1 -0
  92. package/dist/assets/init-DLRA0X12.js +1 -1
  93. package/dist/assets/javascript-D48wDJXV.js +1 -1
  94. package/dist/assets/jinja2-DhgKlfW7.js +1 -1
  95. package/dist/assets/journeyDiagram-U35MCT3I-JTAqngR8.js +1 -0
  96. package/dist/assets/julia-DjdwvFuI.js +1 -1
  97. package/dist/assets/kanban-definition-NDS4AKOZ-CIEmg2CK.js +1 -0
  98. package/dist/assets/katex-Blph-pX_.js +1 -0
  99. package/dist/assets/layout-5_9nD7xG.js +1 -0
  100. package/dist/assets/linear-DtkRsldv.js +1 -0
  101. package/dist/assets/livescript-HO6ttBFx.js +1 -1
  102. package/dist/assets/lua-8DXOpKDz.js +1 -1
  103. package/dist/assets/mathematica-IIbmv7SK.js +1 -1
  104. package/dist/assets/mbox-DoeuZPxA.js +1 -0
  105. package/dist/assets/mermaid-Cuo5gmPJ.js +7 -0
  106. package/dist/assets/mhchem-9pkdwevO.js +1 -0
  107. package/dist/assets/min-DZ6t4OQo.js +1 -0
  108. package/dist/assets/mindmap-definition-ALO5MXBD-BIjqJBz_.js +1 -0
  109. package/dist/assets/mirc-DkvFAiy5.js +1 -1
  110. package/dist/assets/mllike-3c2dg9RT.js +1 -1
  111. package/dist/assets/modelica-DSrSSXCg.js +1 -1
  112. package/dist/assets/mscgen-B2igx18G.js +1 -1
  113. package/dist/assets/mumps-zvxmGV4l.js +1 -1
  114. package/dist/assets/nginx-B4hAVlXN.js +1 -1
  115. package/dist/assets/ntriples-FFvkTduk.js +1 -1
  116. package/dist/assets/octave-C4hdQ5Hf.js +1 -1
  117. package/dist/assets/ordinal-DDUp3AbE.js +1 -1
  118. package/dist/assets/oz-qQq7irPq.js +1 -1
  119. package/dist/assets/pascal-CafrKXZF.js +1 -1
  120. package/dist/assets/perl-tdMlh9QA.js +1 -1
  121. package/dist/assets/pieDiagram-IB7DONF6-Bgy76ci6.js +1 -0
  122. package/dist/assets/pig-CwGJVRC4.js +1 -1
  123. package/dist/assets/powershell-D1ly3AHC.js +1 -1
  124. package/dist/assets/properties-_nPj978X.js +1 -1
  125. package/dist/assets/protobuf-B4y9do6W.js +1 -1
  126. package/dist/assets/pug-_kJOm_E2.js +1 -1
  127. package/dist/assets/puppet-Bc-yJKzi.js +1 -1
  128. package/dist/assets/python-DD-Q2bae.js +1 -1
  129. package/dist/assets/q-B0kTJ4cI.js +1 -1
  130. package/dist/assets/quadrantDiagram-7GDLP6J5-DtmO_lJs.js +1 -0
  131. package/dist/assets/r-BA4EbLKE.js +1 -1
  132. package/dist/assets/radar-MK3ICKWK-CQnq_RTY.js +1 -0
  133. package/dist/assets/range-CtcPcB_L.js +1 -1
  134. package/dist/assets/react-plotly-ytz-JCC5.js +71 -0
  135. package/dist/assets/requirementDiagram-KVF5MWMF-CW5hk-fu.js +1 -0
  136. package/dist/assets/rpm-DI_rRufH.js +1 -1
  137. package/dist/assets/ruby-CR-u2WLS.js +1 -1
  138. package/dist/assets/run-page-DhpeWfS6.js +1 -0
  139. package/dist/assets/sankeyDiagram-QLVOVGJD-DMJOShtL.js +1 -0
  140. package/dist/assets/sas-Bqaci40L.js +1 -1
  141. package/dist/assets/save-worker-CQvBUha3.js +1 -0
  142. package/dist/assets/scheme-qjP0V5Ag.js +1 -1
  143. package/dist/assets/sequenceDiagram-X6HHIX6F-Cs8tv4LH.js +1 -0
  144. package/dist/assets/shell-BLav31RL.js +1 -1
  145. package/dist/assets/sieve-r025o_jW.js +1 -1
  146. package/dist/assets/simple-mode-C3vEBAcb.js +1 -1
  147. package/dist/assets/slides-component-Dfd2iboP.js +1 -0
  148. package/dist/assets/smalltalk-C7J3IyEP.js +1 -1
  149. package/dist/assets/solr-78MBEUkU.js +1 -1
  150. package/dist/assets/sortBy-BKdwAT3U.js +1 -0
  151. package/dist/assets/sparql-BRLJFz69.js +1 -1
  152. package/dist/assets/spreadsheet-CGlWr0eM.js +1 -1
  153. package/dist/assets/sql-B3SPsWL6.js +1 -1
  154. package/dist/assets/stateDiagram-DGXRK772-CvA7Y-cH.js +1 -0
  155. package/dist/assets/stateDiagram-v2-YXO3MK2T-BFZJg-21.js +1 -0
  156. package/dist/assets/step-BwsUM5iJ.js +1 -1
  157. package/dist/assets/stylus-OdhglgkO.js +1 -1
  158. package/dist/assets/swift-B_XXVlXX.js +1 -1
  159. package/dist/assets/tcl-B2fODqDH.js +1 -1
  160. package/dist/assets/terminal-DVzybcfs.css +1 -0
  161. package/dist/assets/terminal-DX8mzLZW.js +1 -0
  162. package/dist/assets/textile-BuVhTOzU.js +1 -1
  163. package/dist/assets/tiddlywiki-BgR6AEZu.js +1 -1
  164. package/dist/assets/tiki-CI-ztowC.js +1 -1
  165. package/dist/assets/time-L5VRVaeJ.js +1 -0
  166. package/dist/assets/timeline-definition-BDJGKUSR-C2OBlRUS.js +1 -0
  167. package/dist/assets/timer-DFzT7np-.js +1 -1
  168. package/dist/assets/toml-BQXy8elZ.js +1 -1
  169. package/dist/assets/tracing-MU76FYLw.js +8 -0
  170. package/dist/assets/transform-DjHZbYKP.js +1 -0
  171. package/dist/assets/tree-CfXwrtHg.js +8 -0
  172. package/dist/assets/troff-Ce85hlLp.js +1 -1
  173. package/dist/assets/ttcn-BxnYHtq8.js +1 -1
  174. package/dist/assets/ttcn-cfg-CKJxb-l2.js +1 -1
  175. package/dist/assets/turtle-BkSuIpt-.js +1 -1
  176. package/dist/assets/useMarimoWebSocket-B5Kqyjii.js +15 -0
  177. package/dist/assets/vb-BHgjm0DN.js +1 -1
  178. package/dist/assets/vbscript-Dawdd5GZ.js +1 -1
  179. package/dist/assets/vega-component-D7BFIY4g.js +1 -0
  180. package/dist/assets/velocity-BdD_26Jv.js +1 -1
  181. package/dist/assets/verilog-B4LBqg_1.js +1 -1
  182. package/dist/assets/vhdl-CWWH2SUo.js +1 -1
  183. package/dist/assets/web-vitals-rCWRSGQR.js +1 -0
  184. package/dist/assets/webidl-CGwyPRYs.js +1 -1
  185. package/dist/assets/worker-DMKWnagd.js +1 -0
  186. package/dist/assets/worker-DXe6aoib.js +1 -0
  187. package/dist/assets/xquery-CVDBqZPY.js +1 -1
  188. package/dist/assets/xychartDiagram-VJFVF3MP-CYdhGX5A.js +1 -0
  189. package/dist/assets/yacas-I8QjZlxf.js +1 -1
  190. package/dist/assets/z80-D8p3gKXp.js +1 -1
  191. package/dist/assets/zoom-COrs4lFh.js +1 -1
  192. package/dist/index.html +2 -2
  193. package/package.json +4 -5
  194. package/dist/assets/ConnectedDataExplorerComponent-DwjCyDpd.js +0 -19
  195. package/dist/assets/VegaLite-DMaHTEfB.js +0 -189
  196. package/dist/assets/_baseEach-i-4uQUxd.js +0 -1
  197. package/dist/assets/_baseMap-CyhTxrrx.js +0 -1
  198. package/dist/assets/_baseUniq-MexZlZIg.js +0 -1
  199. package/dist/assets/_createAggregator-BvXAtaIK.js +0 -1
  200. package/dist/assets/architectureDiagram-IEHRJDOE-C-S_QKtE.js +0 -36
  201. package/dist/assets/blockDiagram-JOT3LUYC-Clnzy1aA.js +0 -121
  202. package/dist/assets/c4Diagram-VJAJSXHY-3Qi_u3Mc.js +0 -10
  203. package/dist/assets/channel-fBIcpWte.js +0 -1
  204. package/dist/assets/chunk-4BMEZGHF-unHSVyj1.js +0 -1
  205. package/dist/assets/chunk-A2AXSNBT-CNLfE56-.js +0 -164
  206. package/dist/assets/chunk-AEK57VVT-DqMoS-b2.js +0 -220
  207. package/dist/assets/chunk-D6G4REZN-ybjiByEI.js +0 -1
  208. package/dist/assets/chunk-RZ5BOZE2-ZiH6z06D.js +0 -1
  209. package/dist/assets/chunk-XZIHB7SX-jzAQ_UIk.js +0 -1
  210. package/dist/assets/classDiagram-GIVACNV2-4Zm3s2PF.js +0 -1
  211. package/dist/assets/classDiagram-v2-COTLJTTW-4Zm3s2PF.js +0 -1
  212. package/dist/assets/clone-ByM6GdRQ.js +0 -1
  213. package/dist/assets/compile-DHo1Z7jM.js +0 -10
  214. package/dist/assets/cytoscape.esm-C5gjFiAL.js +0 -10
  215. package/dist/assets/dagre-OKDRZEBW-CyqdwP0X.js +0 -4
  216. package/dist/assets/data-editor-BSvxn_Cs.js +0 -142
  217. package/dist/assets/diagram-SSKATNLV-BL12RqSL.js +0 -43
  218. package/dist/assets/diagram-VNBRO52H-DZyBx6Zz.js +0 -24
  219. package/dist/assets/edit-page-BK2WDJZN.js +0 -134
  220. package/dist/assets/erDiagram-Q7BY3M3F-D0nkkMQ2.js +0 -60
  221. package/dist/assets/flowDiagram-4HSFHLVR-CPFBgZ20.js +0 -161
  222. package/dist/assets/ganttDiagram-APWFNJXF-Cv0k7Z_p.js +0 -257
  223. package/dist/assets/gitGraphDiagram-7IBYFJ6S-DpPGEpF4.js +0 -65
  224. package/dist/assets/graph-G9dOVaSB.js +0 -1
  225. package/dist/assets/home-page-VyFBXgw2.js +0 -9
  226. package/dist/assets/index-9ttlyAdL.js +0 -1
  227. package/dist/assets/index-B4Xzlyep.js +0 -1
  228. package/dist/assets/index-B6mHWnBp.js +0 -1
  229. package/dist/assets/index-B7dPzIoa.js +0 -1
  230. package/dist/assets/index-Btp0PLIa.js +0 -1
  231. package/dist/assets/index-CT7tcR4r.js +0 -19
  232. package/dist/assets/index-CVL2yaRQ.js +0 -1
  233. package/dist/assets/index-CmWGraZ_.js +0 -1
  234. package/dist/assets/index-D3HVDLxL.js +0 -1
  235. package/dist/assets/index-D73Gl-_M.js +0 -1
  236. package/dist/assets/index-DH1FEIfA.js +0 -1
  237. package/dist/assets/index-DLEe8WJ3.js +0 -1
  238. package/dist/assets/index-DMUPkki0.css +0 -1
  239. package/dist/assets/index-DNRFI4Pl.js +0 -1
  240. package/dist/assets/index-F_rn6Nre.js +0 -1
  241. package/dist/assets/index-GiJ5EBl-.js +0 -1
  242. package/dist/assets/index-Z3Y1MWON.js +0 -7
  243. package/dist/assets/index-iLYgRYZr.js +0 -1
  244. package/dist/assets/index-n1J4TdF1.js +0 -476
  245. package/dist/assets/index-xNCUj0by.js +0 -1
  246. package/dist/assets/infoDiagram-PH2N3AL5-kRJwkv16.js +0 -2
  247. package/dist/assets/journeyDiagram-U35MCT3I-CuPIVsez.js +0 -138
  248. package/dist/assets/kanban-definition-NDS4AKOZ-SgQeDM9P.js +0 -88
  249. package/dist/assets/katex-BsnJiHtx.js +0 -261
  250. package/dist/assets/layout-qvy3Y2YI.js +0 -1
  251. package/dist/assets/linear-CHmrVrm7.js +0 -1
  252. package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
  253. package/dist/assets/mbox-z_N2Mo3d.js +0 -1
  254. package/dist/assets/mermaid-Do4EKgGr.js +0 -152
  255. package/dist/assets/mhchem-C_nT2J_7.js +0 -1
  256. package/dist/assets/min-3inaLGSw.js +0 -1
  257. package/dist/assets/mindmap-definition-ALO5MXBD-BOisTjUR.js +0 -95
  258. package/dist/assets/pieDiagram-IB7DONF6-bJLOoa8d.js +0 -30
  259. package/dist/assets/quadrantDiagram-7GDLP6J5-CvVFRHgk.js +0 -7
  260. package/dist/assets/radar-MK3ICKWK-CLYiEoC3.js +0 -126
  261. package/dist/assets/react-plotly-D_o-Vndy.js +0 -4074
  262. package/dist/assets/requirementDiagram-KVF5MWMF-BpOZq3SI.js +0 -64
  263. package/dist/assets/run-page-wF-pSMgD.js +0 -1
  264. package/dist/assets/sankeyDiagram-QLVOVGJD-DVZ8YUzx.js +0 -10
  265. package/dist/assets/save-worker-D7xNPs7e.js +0 -1
  266. package/dist/assets/sequenceDiagram-X6HHIX6F-DWo7ZwhU.js +0 -122
  267. package/dist/assets/slides-component-4RsHJk4c.js +0 -1
  268. package/dist/assets/sortBy-BZMRGRSa.js +0 -1
  269. package/dist/assets/stateDiagram-DGXRK772-DeJ12JmC.js +0 -1
  270. package/dist/assets/stateDiagram-v2-YXO3MK2T-CCKZi1_E.js +0 -1
  271. package/dist/assets/terminal-MqT0CqiL.js +0 -9
  272. package/dist/assets/terminal-WqMRJt5Z.css +0 -1
  273. package/dist/assets/time-9Pz3EKSN.js +0 -1
  274. package/dist/assets/timeline-definition-BDJGKUSR-3glR0bsu.js +0 -61
  275. package/dist/assets/tracing-CLdrqG1z.js +0 -2
  276. package/dist/assets/transform-Cyp0GDF-.js +0 -1
  277. package/dist/assets/tree-BbBZDE78.js +0 -17
  278. package/dist/assets/useMarimoWebSocket-BzRyz6q8.js +0 -27
  279. package/dist/assets/vega-component-YvphImMT.js +0 -1
  280. package/dist/assets/web-vitals-Buym0gfC.js +0 -1
  281. package/dist/assets/worker-BWN2kUSa.js +0 -1
  282. package/dist/assets/worker-D-UG5-wL.js +0 -1
  283. package/dist/assets/xychartDiagram-VJFVF3MP-B-TozqMz.js +0 -7
@@ -0,0 +1 @@
1
+ var e;import{g as t,s}from"./chunk-RZ5BOZE2-COQMYHlq.js";import{_ as i,b as n,a as r,s as a,g as l,p as c,q as o,c as h,l as u,y,B as m,o as E,r as p,u as d}from"./mermaid-Cuo5gmPJ.js";import"./transform-DjHZbYKP.js";import"./timer-DFzT7np-.js";import"./index-CCmIqGps.js";import"./step-BwsUM5iJ.js";var R=function(){var e=i((function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s}),"o"),t=[1,3],s=[1,4],n=[1,5],r=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],l=[1,22],c=[2,7],o=[1,26],h=[1,27],u=[1,28],y=[1,29],m=[1,33],E=[1,34],p=[1,35],d=[1,36],R=[1,37],f=[1,38],_=[1,24],g=[1,31],S=[1,32],I=[1,30],b=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],q=[89,90],C=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[27,29],v=[1,70],L=[1,71],O=[1,72],x=[1,73],w=[1,74],D=[1,75],M=[1,76],$=[1,83],F=[1,80],P=[1,84],U=[1,85],V=[1,86],Y=[1,87],B=[1,88],Q=[1,89],H=[1,90],j=[1,91],K=[1,92],W=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],G=[63,64],z=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Z=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],J=[1,110],ee=[1,106],te=[1,107],se=[1,108],ie=[1,109],ne=[1,111],re=[1,116],ae=[1,117],le=[1,114],ce=[1,115],oe={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:i((function(e,t,s,i,n,r,a){var l=r.length-1;switch(n){case 4:this.$=r[l].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(r[l-3],r[l-4]);break;case 22:i.addRequirement(r[l-5],r[l-6]),i.setClass([r[l-5]],r[l-3]);break;case 23:i.setNewReqId(r[l-2]);break;case 24:i.setNewReqText(r[l-2]);break;case 25:i.setNewReqRisk(r[l-2]);break;case 26:i.setNewReqVerifyMethod(r[l-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(r[l-3]);break;case 43:i.addElement(r[l-5]),i.setClass([r[l-5]],r[l-3]);break;case 44:i.setNewElementType(r[l-2]);break;case 45:i.setNewElementDocRef(r[l-2]);break;case 48:i.addRelationship(r[l-2],r[l],r[l-4]);break;case 49:i.addRelationship(r[l-2],r[l-4],r[l]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=r[l-2],i.defineClass(r[l-1],r[l]);break;case 58:i.setClass(r[l-1],r[l]);break;case 59:i.setClass([r[l-2]],r[l]);break;case 60:case 62:case 65:this.$=[r[l]];break;case 61:case 63:this.$=r[l-2].concat([r[l]]);break;case 64:this.$=r[l-2],i.setCssStyle(r[l-1],r[l]);break;case 66:r[l-2].push(r[l]),this.$=r[l-2];break;case 68:this.$=r[l-1]+r[l]}}),"anonymous"),table:[{3:1,4:2,6:t,9:s,11:n,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:s,11:n,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:s,11:n,13:r},{1:[2,2]},{4:17,5:l,7:13,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:l,7:42,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:43,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:44,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:45,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:46,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:47,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:48,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:49,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:50,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:N,89:b,90:T},{30:63,33:62,75:N,89:b,90:T},{30:64,33:62,75:N,89:b,90:T},e(q,[2,29]),e(q,[2,30]),e(q,[2,31]),e(q,[2,32]),e(q,[2,33]),e(q,[2,34]),e(C,[2,81]),e(C,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(A,[2,79]),e(A,[2,80]),{27:[1,67],29:[1,68]},e(A,[2,85]),e(A,[2,86]),{62:69,65:v,66:L,67:O,68:x,69:w,70:D,71:M},{62:77,65:v,66:L,67:O,68:x,69:w,70:D,71:M},{30:78,33:62,75:N,89:b,90:T},{73:79,75:$,76:F,78:81,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:j,88:K},e(W,[2,60]),e(W,[2,62]),{73:93,75:$,76:F,78:81,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:j,88:K},{30:94,33:62,75:N,76:F,89:b,90:T},{5:[1,95]},{30:96,33:62,75:N,89:b,90:T},{5:[1,97]},{30:98,33:62,75:N,89:b,90:T},{63:[1,99]},e(G,[2,50]),e(G,[2,51]),e(G,[2,52]),e(G,[2,53]),e(G,[2,54]),e(G,[2,55]),e(G,[2,56]),{64:[1,100]},e(k,[2,59],{76:F}),e(k,[2,64],{76:z}),{33:103,75:[1,102],89:b,90:T},e(X,[2,65],{79:104,75:$,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:j,88:K}),e(Z,[2,67]),e(Z,[2,69]),e(Z,[2,70]),e(Z,[2,71]),e(Z,[2,72]),e(Z,[2,73]),e(Z,[2,74]),e(Z,[2,75]),e(Z,[2,76]),e(Z,[2,77]),e(Z,[2,78]),e(k,[2,57],{76:z}),e(k,[2,58],{76:F}),{5:J,28:105,31:ee,34:te,36:se,38:ie,40:ne},{27:[1,112],76:F},{5:re,40:ae,56:113,57:le,59:ce},{27:[1,118],76:F},{33:119,89:b,90:T},{33:120,89:b,90:T},{75:$,78:121,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:j,88:K},e(W,[2,61]),e(W,[2,63]),e(Z,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:J,28:126,31:ee,34:te,36:se,38:ie,40:ne},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:re,40:ae,56:130,57:le,59:ce},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(X,[2,66],{79:104,75:$,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:j,88:K}),{33:132,89:b,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:J,28:145,31:ee,34:te,36:se,38:ie,40:ne},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:re,40:ae,56:152,57:le,59:ce},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:J,28:159,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:160,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:161,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:162,31:ee,34:te,36:se,38:ie,40:ne},{5:re,40:ae,56:163,57:le,59:ce},{5:re,40:ae,56:164,57:le,59:ce},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:i((function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)}),"parseError"),parse:i((function(e){var t=this,s=[0],n=[],r=[null],a=[],l=this.table,c="",o=0,h=0,u=a.slice.call(arguments,1),y=Object.create(this.lexer),m={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(m.yy[E]=this.yy[E]);y.setInput(e,m.yy),m.yy.lexer=y,m.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var p=y.yylloc;a.push(p);var d=y.options&&y.options.ranges;function R(){var e;return"number"!=typeof(e=n.pop()||y.lex()||1)&&(e instanceof Array&&(e=(n=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(e){s.length=s.length-2*e,r.length=r.length-e,a.length=a.length-e}),"popStack"),i(R,"lex");for(var f,_,g,S,I,b,T,k,N={};;){if(_=s[s.length-1],this.defaultActions[_]?g=this.defaultActions[_]:(null==f&&(f=R()),g=l[_]&&l[_][f]),void 0===g||!g.length||!g[0]){var q="";for(I in k=[],l[_])this.terminals_[I]&&I>2&&k.push("'"+this.terminals_[I]+"'");q=y.showPosition?"Parse error on line "+(o+1)+":\n"+y.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(q,{text:y.match,token:this.terminals_[f]||f,line:y.yylineno,loc:p,expected:k})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+f);switch(g[0]){case 1:s.push(f),r.push(y.yytext),a.push(y.yylloc),s.push(g[1]),f=null,h=y.yyleng,c=y.yytext,o=y.yylineno,p=y.yylloc;break;case 2:if(b=this.productions_[g[1]][1],N.$=r[r.length-b],N._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},d&&(N._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(S=this.performAction.apply(N,[c,h,o,m.yy,g[1],r,a].concat(u))))return S;b&&(s=s.slice(0,-1*b*2),r=r.slice(0,-1*b),a=a.slice(0,-1*b)),s.push(this.productions_[g[1]][0]),r.push(N.$),a.push(N._$),T=l[s[s.length-2]][s[s.length-1]],s.push(T);break;case 3:return!0}}return!0}),"parse")},he=function(){return{EOF:1,parseError:i((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:i((function(e,t){return this.yy=t||this.yy||{},this._input=e,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:i((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:i((function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=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),s.length-1&&(this.yylineno-=s.length-1);var n=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:i((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:i((function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!t||s[0].length>t[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var e=this.next();return e||this.lex()}),"lex"),begin:i((function(e){this.conditionStack.push(e)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((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:i((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:i((function(e){this.begin(e)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(e,t,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 69:return 80;case 70:return 76}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ue(){this.yy={}}return oe.lexer=he,i(ue,"Parser"),ue.prototype=oe,oe.Parser=ue,new ue}();R.parser=R;var f=R,_=(i(e=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=n,this.getAccTitle=r,this.setAccDescription=a,this.getAccDescription=l,this.setDiagramTitle=c,this.getDiagramTitle=o,this.getConfig=i((()=>h().requirement),"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),u.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,s){this.relations.push({type:e,src:t,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,y()}setCssStyle(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(!t||!e)return;for(const s of t)s.includes(",")?e.cssStyles.push(...s.split(",")):e.cssStyles.push(s)}}setClass(e,t){var s;for(const i of e){const e=this.requirements.get(i)??this.elements.get(i);if(e)for(const i of t){e.classes.push(i);const t=null==(s=this.classes.get(i))?void 0:s.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(const s of e){let e=this.classes.get(s);void 0===e&&(e={id:s,styles:[],textStyles:[]},this.classes.set(s,e)),t&&t.forEach((function(t){if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})),this.requirements.forEach((e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap((e=>e.split(","))))})),this.elements.forEach((e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap((e=>e.split(","))))}))}}getClasses(){return this.classes}getData(){var e,t,s,i;const n=h(),r=[],a=[];for(const l of this.requirements.values()){const e=l;e.id=l.name,e.cssStyles=l.cssStyles,e.cssClasses=l.classes.join(" "),e.shape="requirementBox",e.look=n.look,r.push(e)}for(const l of this.elements.values()){const e=l;e.shape="requirementBox",e.look=n.look,e.id=l.name,e.cssStyles=l.cssStyles,e.cssClasses=l.classes.join(" "),r.push(e)}for(const l of this.relations){let r=0;const c=l.type===this.Relationships.CONTAINS,o={id:`${l.src}-${l.dst}-${r}`,start:(null==(e=this.requirements.get(l.src))?void 0:e.name)??(null==(t=this.elements.get(l.src))?void 0:t.name),end:(null==(s=this.requirements.get(l.dst))?void 0:s.name)??(null==(i=this.elements.get(l.dst))?void 0:i.name),label:`&lt;&lt;${l.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",c?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:c?"normal":"dashed",arrowTypeStart:c?"requirement_contains":"",arrowTypeEnd:c?"":"requirement_arrow",look:n.look};a.push(o),r++}return{nodes:r,edges:a,other:{},config:n,direction:this.getDirection()}}},"RequirementDB"),e),g=i((e=>`\n\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n .divider {\n stroke: ${e.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n`),"getStyles"),S={};m(S,{draw:()=>I});var I=i((async function(e,i,n,r){u.info("REF0:"),u.info("Drawing requirement diagram (unified)",i);const{securityLevel:a,state:l,layout:c}=h(),o=r.db.getData(),y=t(i,a);o.type=r.type,o.layoutAlgorithm=E(c),o.nodeSpacing=(null==l?void 0:l.nodeSpacing)??50,o.rankSpacing=(null==l?void 0:l.rankSpacing)??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=i,await p(o,y);d.insertTitle(y,"requirementDiagramTitleText",(null==l?void 0:l.titleTopMargin)??25,r.db.getDiagramTitle()),s(y,8,"requirementDiagram",(null==l?void 0:l.useMaxWidth)??!0)}),"draw"),b={parser:f,get db(){return new _},renderer:S,styles:g};export{b as diagram};
@@ -1 +1 @@
1
- var e=/^-+$/,n=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,a=/^[\w+.-]+@[\w.-]+/;const c={name:"rpmchanges",token:function(t){return t.sol()&&(t.match(e)||t.match(n))?"tag":t.match(a)?"string":(t.next(),null)}};var o=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,i=/^[a-zA-Z0-9()]+:/,p=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,u=/^%(ifnarch|ifarch|if)/,l=/^%(else|endif)/,m=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;const s={name:"rpmspec",startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(t,r){if(t.peek()=="#")return t.skipToEnd(),"comment";if(t.sol()){if(t.match(i))return"header";if(t.match(p))return"atom"}if(t.match(/^\$\w+/)||t.match(/^\$\{\w+\}/))return"def";if(t.match(l))return"keyword";if(t.match(u))return r.controlFlow=!0,"keyword";if(r.controlFlow){if(t.match(m))return"operator";if(t.match(/^(\d+)/))return"number";t.eol()&&(r.controlFlow=!1)}if(t.match(o))return t.eol()&&(r.controlFlow=!1),"number";if(t.match(/^%[\w]+/))return t.match("(")&&(r.macroParameters=!0),"keyword";if(r.macroParameters){if(t.match(/^\d+/))return"number";if(t.match(")"))return r.macroParameters=!1,"keyword"}return t.match(/^%\{\??[\w \-\:\!]+\}/)?(t.eol()&&(r.controlFlow=!1),"def"):(t.next(),null)}};export{c as rpmChanges,s as rpmSpec};
1
+ var r=/^-+$/,e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,t=/^[\w+.-]+@[\w.-]+/;const a={name:"rpmchanges",token:function(a){if(a.sol()){if(a.match(r))return"tag";if(a.match(e))return"tag"}return a.match(t)?"string":(a.next(),null)}};var n=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,c=/^[a-zA-Z0-9()]+:/,o=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,i=/^%(ifnarch|ifarch|if)/,p=/^%(else|endif)/,u=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;const l={name:"rpmspec",startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(r,e){if("#"==r.peek())return r.skipToEnd(),"comment";if(r.sol()){if(r.match(c))return"header";if(r.match(o))return"atom"}if(r.match(/^\$\w+/))return"def";if(r.match(/^\$\{\w+\}/))return"def";if(r.match(p))return"keyword";if(r.match(i))return e.controlFlow=!0,"keyword";if(e.controlFlow){if(r.match(u))return"operator";if(r.match(/^(\d+)/))return"number";r.eol()&&(e.controlFlow=!1)}if(r.match(n))return r.eol()&&(e.controlFlow=!1),"number";if(r.match(/^%[\w]+/))return r.match("(")&&(e.macroParameters=!0),"keyword";if(e.macroParameters){if(r.match(/^\d+/))return"number";if(r.match(")"))return e.macroParameters=!1,"keyword"}return r.match(/^%\{\??[\w \-\:\!]+\}/)?(r.eol()&&(e.controlFlow=!1),"def"):(r.next(),null)}};export{a as rpmChanges,l as rpmSpec};
@@ -1 +1 @@
1
- function x(e){for(var t={},n=0,i=e.length;n<i;++n)t[e[n]]=!0;return t}var o,b=["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"],w=x(b),E=x(["def","class","case","for","while","until","module","catch","loop","proc","begin"]),T=x(["end","until"]),_={"[":"]","{":"}","(":")"},L={"]":"[","}":"{",")":"("};function c(e,t,n){return n.tokenize.push(e),e(t,n)}function k(e,t){if(e.sol()&&e.match("=begin")&&e.eol())return t.tokenize.push(A),"comment";if(e.eatSpace())return null;var n,i,a,r=e.next();if(r=="`"||r=="'"||r=='"')return c(p(r,"string",r=='"'||r=="`"),e,t);if(r=="/")return function(l){for(var f,y=l.pos,m=0,z=!1,h=!1;(f=l.next())!=null;)if(h)h=!1;else{if("[{(".indexOf(f)>-1)m++;else if("]})".indexOf(f)>-1){if(--m<0)break}else if(f=="/"&&m==0){z=!0;break}h=f=="\\"}return l.backUp(l.pos-y),z}(e)?c(p(r,"string.special",!0),e,t):"operator";if(r=="%"){var u="string",s=!0;e.eat("s")?u="atom":e.eat(/[WQ]/)?u="string":e.eat(/[r]/)?u="string.special":e.eat(/[wxq]/)&&(u="string",s=!1);var d=e.eat(/[^\w\s=]/);return d?(_.propertyIsEnumerable(d)&&(d=_[d]),c(p(d,u,s,!0),e,t)):"operator"}if(r=="#")return e.skipToEnd(),"comment";if(r=="<"&&(n=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return c((i=n[2],a=n[1],function(l,f){return a&&l.eatSpace(),l.match(i)?f.tokenize.pop():l.skipToEnd(),"string"}),e,t);if(r=="0")return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(r))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if(r=="?"){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}if(r==":")return e.eat("'")?c(p("'","atom",!1),e,t):e.eat('"')?c(p('"',"atom",!0),e,t):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if(r=="@"&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"propertyName";if(r=="$")return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variableName.special";if(/[a-zA-Z_\xa1-\uffff]/.test(r))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"variable";if(r!="|"||!t.varList&&t.lastTok!="{"&&t.lastTok!="do"){if(/[\(\)\[\]{}\\;]/.test(r))return o=r,null;if(r=="-"&&e.eat(">"))return"operator";if(/[=+\-\/*:\.^%<>~|]/.test(r)){var g=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return r!="."||g||(o="."),"operator"}return null}return o="|",null}function v(e){return e||(e=1),function(t,n){if(t.peek()=="}"){if(e==1)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=v(e-1)}else t.peek()=="{"&&(n.tokenize[n.tokenize.length-1]=v(e+1));return k(t,n)}}function W(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,k(t,n))}}function p(e,t,n,i){return function(a,r){var u,s=!1;for(r.context.type==="read-quoted-paused"&&(r.context=r.context.prev,a.eat("}"));(u=a.next())!=null;){if(u==e&&(i||!s)){r.tokenize.pop();break}if(n&&u=="#"&&!s){if(a.eat("{")){e=="}"&&(r.context={prev:r.context,type:"read-quoted-paused"}),r.tokenize.push(v());break}if(/[@\$]/.test(a.peek())){r.tokenize.push(W());break}}s=!s&&u=="\\"}return t}}function A(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}const I={name:"ruby",startState:function(e){return{tokenize:[k],indented:0,context:{type:"top",indented:-e},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){o=null,e.sol()&&(t.indented=e.indentation());var n,i=t.tokenize[t.tokenize.length-1](e,t),a=o;if(i=="variable"){var r=e.current();(i=t.lastTok=="."?"property":w.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(r)?"tag":t.lastTok=="def"||t.lastTok=="class"||t.varList?"def":"variable")=="keyword"&&(a=r,E.propertyIsEnumerable(r)?n="indent":T.propertyIsEnumerable(r)?n="dedent":r!="if"&&r!="unless"||e.column()!=e.indentation()?r=="do"&&t.context.indented<t.indented&&(n="indent"):n="indent")}return(o||i&&i!="comment")&&(t.lastTok=a),o=="|"&&(t.varList=!t.varList),n=="indent"||/[\(\[\{]/.test(o)?t.context={prev:t.context,type:o||i,indented:t.indented}:(n=="dedent"||/[\)\]\}]/.test(o))&&t.context.prev&&(t.context=t.context.prev),e.eol()&&(t.continuedLine=o=="\\"||i=="operator"),i},indent:function(e,t,n){if(e.tokenize[e.tokenize.length-1]!=k)return null;var i=t&&t.charAt(0),a=e.context,r=a.type==L[i]||a.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(t);return a.indented+(r?0:n.unit)+(e.continuedLine?n.unit:0)},languageData:{indentOnInput:/^\s*(?:end|rescue|elsif|else|\})$/,commentTokens:{line:"#"},autocomplete:b}};export{I as ruby};
1
+ function e(e){for(var t={},n=0,r=e.length;n<r;++n)t[e[n]]=!0;return t}var t,n=["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"],r=e(n),i=e(["def","class","case","for","while","until","module","catch","loop","proc","begin"]),a=e(["end","until"]),o={"[":"]","{":"}","(":")"},u={"]":"[","}":"{",")":"("};function l(e,t,n){return n.tokenize.push(e),e(t,n)}function f(e,n){if(e.sol()&&e.match("=begin")&&e.eol())return n.tokenize.push(p),"comment";if(e.eatSpace())return null;var r,i,a,u=e.next();if("`"==u||"'"==u||'"'==u)return l(c(u,"string",'"'==u||"`"==u),e,n);if("/"==u)return function(e){var t,n=e.pos,r=0,i=!1,a=!1;for(;null!=(t=e.next());)if(a)a=!1;else{if("[{(".indexOf(t)>-1)r++;else if("]})".indexOf(t)>-1){if(--r<0)break}else if("/"==t&&0==r){i=!0;break}a="\\"==t}return e.backUp(e.pos-n),i}(e)?l(c(u,"string.special",!0),e,n):"operator";if("%"==u){var f="string",s=!0;e.eat("s")?f="atom":e.eat(/[WQ]/)?f="string":e.eat(/[r]/)?f="string.special":e.eat(/[wxq]/)&&(f="string",s=!1);var d=e.eat(/[^\w\s=]/);return d?(o.propertyIsEnumerable(d)&&(d=o[d]),l(c(d,f,s,!0),e,n)):"operator"}if("#"==u)return e.skipToEnd(),"comment";if("<"==u&&(r=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return l((i=r[2],a=r[1],function(e,t){return a&&e.eatSpace(),e.match(i)?t.tokenize.pop():e.skipToEnd(),"string"}),e,n);if("0"==u)return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(u))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==u){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}if(":"==u)return e.eat("'")?l(c("'","atom",!1),e,n):e.eat('"')?l(c('"',"atom",!0),e,n):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if("@"==u&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"propertyName";if("$"==u)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variableName.special";if(/[a-zA-Z_\xa1-\uffff]/.test(u))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"variable";if("|"!=u||!n.varList&&"{"!=n.lastTok&&"do"!=n.lastTok){if(/[\(\)\[\]{}\\;]/.test(u))return t=u,null;if("-"==u&&e.eat(">"))return"operator";if(/[=+\-\/*:\.^%<>~|]/.test(u)){var k=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=u||k||(t="."),"operator"}return null}return t="|",null}function s(e){return e||(e=1),function(t,n){if("}"==t.peek()){if(1==e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=s(e-1)}else"{"==t.peek()&&(n.tokenize[n.tokenize.length-1]=s(e+1));return f(t,n)}}function d(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,f(t,n))}}function c(e,t,n,r){return function(i,a){var o,u=!1;for("read-quoted-paused"===a.context.type&&(a.context=a.context.prev,i.eat("}"));null!=(o=i.next());){if(o==e&&(r||!u)){a.tokenize.pop();break}if(n&&"#"==o&&!u){if(i.eat("{")){"}"==e&&(a.context={prev:a.context,type:"read-quoted-paused"}),a.tokenize.push(s());break}if(/[@\$]/.test(i.peek())){a.tokenize.push(d());break}}u=!u&&"\\"==o}return t}}function p(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}const k={name:"ruby",startState:function(e){return{tokenize:[f],indented:0,context:{type:"top",indented:-e},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,n){t=null,e.sol()&&(n.indented=e.indentation());var o,u=n.tokenize[n.tokenize.length-1](e,n),l=t;if("variable"==u){var f=e.current();"keyword"==(u="."==n.lastTok?"property":r.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(f)?"tag":"def"==n.lastTok||"class"==n.lastTok||n.varList?"def":"variable")&&(l=f,i.propertyIsEnumerable(f)?o="indent":a.propertyIsEnumerable(f)?o="dedent":"if"!=f&&"unless"!=f||e.column()!=e.indentation()?"do"==f&&n.context.indented<n.indented&&(o="indent"):o="indent")}return(t||u&&"comment"!=u)&&(n.lastTok=l),"|"==t&&(n.varList=!n.varList),"indent"==o||/[\(\[\{]/.test(t)?n.context={prev:n.context,type:t||u,indented:n.indented}:("dedent"==o||/[\)\]\}]/.test(t))&&n.context.prev&&(n.context=n.context.prev),e.eol()&&(n.continuedLine="\\"==t||"operator"==u),u},indent:function(e,t,n){if(e.tokenize[e.tokenize.length-1]!=f)return null;var r=t&&t.charAt(0),i=e.context,a=i.type==u[r]||"keyword"==i.type&&/^(?:end|until|else|elsif|when|rescue)\b/.test(t);return i.indented+(a?0:n.unit)+(e.continuedLine?n.unit:0)},languageData:{indentOnInput:/^\s*(?:end|rescue|elsif|else|\})$/,commentTokens:{line:"#"},autocomplete:n}};export{k as ruby};
@@ -0,0 +1 @@
1
+ import{d as e,Q as s,S as t,T as o,U as r,j as i,V as a,W as m,X as n,Y as l,Z as c,_ as p,$ as j,a0 as d,a1 as h,a2 as b,a3 as x,a4 as f,a5 as y,a6 as u,a7 as g,a8 as _,a9 as k,aa as v,ab as w,ac as N}from"./index-CCmIqGps.js";import{u as S,A as C,R as I,a as A,C as P}from"./useMarimoWebSocket-B5Kqyjii.js";import"./index-DTd9oqZ1.js";import"./index-CBRsR4hm.js";import"./index-D3r87Dua.js";import"./index-Cq97_EnG.js";import"./index-B1R-kky3.js";import"./index-pCY6hO1c.js";import"./index-DeDcyKGD.js";import"./index-1hj486rU.js";import"./index-W5H1wa8v.js";import"./index-9Y5po83T.js";import"./index-BHjEpXuR.js";import"./index-CBe39OqR.js";import"./index-jkcjZbio.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-CHJ5qNM_.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-D7xaZ7Da.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-Dri_5nFc.js";import"./fortran-DL7KluxX.js";import"./gas-5kEe4nk0.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CmdsSjFB.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-DoeuZPxA.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-FFvkTduk.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-OdhglgkO.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-BQXy8elZ.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";const T=a=>{const n=e.c(14),{appConfig:l}=a,{setCells:c}=s();let p,j,d;n[0]===Symbol.for("react.memo_cache_sentinel")?(p=[],n[0]=p):p=n[0],t.useEffect(z,p),n[1]===Symbol.for("react.memo_cache_sentinel")?(j=m(),n[1]=j):j=n[1],n[2]!==c?(d={autoInstantiate:!0,setCells:c,sessionId:j},n[2]=c,n[3]=d):d=n[3];const{connection:h}=S(d),b=o(r);let x,f,y;return n[4]!==h?(x=i.jsx(A,{connection:h,className:"sm:pt-8"}),n[4]=h,n[5]=x):x=n[5],n[6]!==l?(f=i.jsx(P,{appConfig:l,mode:"read"}),n[6]=l,n[7]=f):f=n[7],n[8]!==l.width||n[9]!==h||n[10]!==b||n[11]!==x||n[12]!==f?(y=i.jsxs(C,{connection:h,isRunning:b,width:l.width,children:[x,f]}),n[8]=l.width,n[9]=h,n[10]=b,n[11]=x,n[12]=f,n[13]=y):y=n[13],y};function q(){I.INSTANCE.stop()}function z(){return I.INSTANCE.start(a),q}const E=()=>{const s=e.c(4);if(!n())return null;let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=l(),s[0]=t):t=s[0];const o=t;if(!o)return null;let r,a,m;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("a",{href:c.githubPage,target:"_blank",className:"underline",children:"marimo"}),s[1]=r):r=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsxs("span",{children:["This is a static Python notebook built using"," ",r,".",i.jsx("br",{}),"Some interactive features may not work, see ways to run or edit this."]}),s[2]=a):a=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsxs("div",{className:"px-4 py-2 bg-[var(--sky-2)] border-b border-[var(--sky-7)] text-md text-[var(--sky-11)] font-semibold flex justify-between items-center gap-4 no-print",children:[a,i.jsx("span",{className:"flex-shrink-0",children:i.jsx(R,{code:o})})]}),s[3]=m):m=s[3],m},R=s=>{const t=e.c(81),{code:o}=s;let r;if(t[0]===Symbol.for("react.memo_cache_sentinel")){r=p()||"notebook.py";const e=r.lastIndexOf("/");-1!==e&&(r=r.slice(e+1)),t[0]=r}else r=t[0];const a=window.location.href;let m,n,l,N,S,C,I,A,P,T,q,z,E,R,W,F,B,D,M,O,Q,Y,G,H,J,K,L,U,V,X,Z,$,ee,se,te,oe,re;if(t[1]!==o){const e=j({code:o});let s;N=d,t[25]===Symbol.for("react.memo_cache_sentinel")?(W=i.jsx(h,{asChild:!0,children:i.jsx(b,{"data-testid":"static-notebook-dialog-trigger",variant:"secondary",children:"Run or edit this notebook"})}),t[25]=W):W=t[25],l=x,n=f,t[26]===Symbol.for("react.memo_cache_sentinel")?(R=i.jsx(y,{children:r}),t[26]=R):R=t[26],m=u,O="pt-4 text-md text-left",Q="This is a static notebook built using",Y=" ",t[27]===Symbol.for("react.memo_cache_sentinel")?(G=i.jsx("a",{href:c.githubPage,target:"_blank",className:"text-link hover:underline",children:"marimo"}),t[27]=G):G=t[27],C=". marimo is an open-source next-generation Python notebook.",t[28]===Symbol.for("react.memo_cache_sentinel")?(I=i.jsx("hr",{className:"my-3"}),t[28]=I):I=t[28],A="In order to edit this notebook, you will need to download the code locally, install marimo, and run the following in your terminal:",t[29]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("br",{}),t[29]=s):s=t[29],t[30]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)]",children:["pip install marimo",s,"marimo edit ",r]}),T=!a.endsWith(".html")&&i.jsxs(i.Fragment,{children:["or",i.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)] break-all",children:["marimo edit ",window.location.href]})]}),q=i.jsx("hr",{className:"my-3"}),t[30]=P,t[31]=T,t[32]=q):(P=t[30],T=t[31],q=t[32]),z="You may also be able to run this notebook entirely in the browser via WebAssembly at:",E=" ",S=e,F="_blank",B="text-link hover:underline",D="noreferrer",M=e.slice(0,40),t[1]=o,t[2]=m,t[3]=n,t[4]=l,t[5]=N,t[6]=S,t[7]=C,t[8]=I,t[9]=A,t[10]=P,t[11]=T,t[12]=q,t[13]=z,t[14]=E,t[15]=R,t[16]=W,t[17]=F,t[18]=B,t[19]=D,t[20]=M,t[21]=O,t[22]=Q,t[23]=Y,t[24]=G}else m=t[2],n=t[3],l=t[4],N=t[5],S=t[6],C=t[7],I=t[8],A=t[9],P=t[10],T=t[11],q=t[12],z=t[13],E=t[14],R=t[15],W=t[16],F=t[17],B=t[18],D=t[19],M=t[20],O=t[21],Q=t[22],Y=t[23],G=t[24];return t[33]!==S||t[34]!==F||t[35]!==B||t[36]!==D||t[37]!==M?(H=i.jsxs("a",{href:S,target:F,className:B,rel:D,children:[M,"..."]}),t[33]=S,t[34]=F,t[35]=B,t[36]=D,t[37]=M,t[38]=H):H=t[38],t[39]===Symbol.for("react.memo_cache_sentinel")?(J=i.jsx("br",{}),t[39]=J):J=t[39],t[40]===Symbol.for("react.memo_cache_sentinel")?(K=i.jsxs("div",{className:"text-sm text-muted-foreground pt-2",children:[i.jsx("strong",{children:"Note:"})," This feature is experimental and may not work for all notebooks. Additionally, some dependencies may not be available in the browser."]}),t[40]=K):K=t[40],t[41]!==m||t[42]!==C||t[43]!==I||t[44]!==A||t[45]!==P||t[46]!==T||t[47]!==q||t[48]!==z||t[49]!==E||t[50]!==H||t[51]!==O||t[52]!==Q||t[53]!==Y||t[54]!==G?(L=i.jsxs(m,{className:O,children:[Q,Y,G,C,I,A,P,T,q,z,E,H,J,K]}),t[41]=m,t[42]=C,t[43]=I,t[44]=A,t[45]=P,t[46]=T,t[47]=q,t[48]=z,t[49]=E,t[50]=H,t[51]=O,t[52]=Q,t[53]=Y,t[54]=G,t[55]=L):L=t[55],t[56]!==n||t[57]!==R||t[58]!==L?(U=i.jsxs(n,{children:[R,L]}),t[56]=n,t[57]=R,t[58]=L,t[59]=U):U=t[59],t[60]!==o?(V=async()=>{await g(o),_({title:"Copied to clipboard"})},t[60]=o,t[61]=V):V=t[61],t[62]===Symbol.for("react.memo_cache_sentinel")?(X=i.jsx(k,{className:"w-4 h-4 mr-1"}),t[62]=X):X=t[62],t[63]!==V?(Z=i.jsxs(b,{"data-testid":"copy-static-notebook-dialog-button",variant:"secondary",onClick:V,children:[X,"Copy code"]}),t[63]=V,t[64]=Z):Z=t[64],t[65]!==o?($=()=>{v(new Blob([o],{type:"text/plain"}),r)},t[65]=o,t[66]=$):$=t[66],t[67]===Symbol.for("react.memo_cache_sentinel")?(ee=i.jsx(w,{className:"w-4 h-4 mr-1"}),t[67]=ee):ee=t[67],t[68]!==$?(se=i.jsxs(b,{"data-testid":"download-static-notebook-dialog-button",variant:"secondary",onClick:$,children:[ee,"Download code"]}),t[68]=$,t[69]=se):se=t[69],t[70]!==Z||t[71]!==se?(te=i.jsxs("div",{className:"flex gap-4 flex-wrap",children:[Z,se]}),t[70]=Z,t[71]=se,t[72]=te):te=t[72],t[73]!==l||t[74]!==U||t[75]!==te?(oe=i.jsxs(l,{children:[U,te]}),t[73]=l,t[74]=U,t[75]=te,t[76]=oe):oe=t[76],t[77]!==N||t[78]!==W||t[79]!==oe?(re=i.jsxs(N,{children:[W,oe]}),t[77]=N,t[78]=W,t[79]=oe,t[80]=re):re=t[80],re},W=N()||n(),F=s=>{const t=e.c(6);let o,r,a,m;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(E,{}),t[0]=o):o=t[0],t[1]!==s.appConfig?(r=i.jsx(T,{appConfig:s.appConfig}),t[1]=s.appConfig,t[2]=r):r=t[2],t[3]===Symbol.for("react.memo_cache_sentinel")?(a=W&&i.jsx(B,{}),t[3]=a):a=t[3],t[4]!==r?(m=i.jsxs(i.Fragment,{children:[o,r,a]}),t[4]=r,t[5]=m):m=t[5],m},B=()=>{const s=e.c(1);let t;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"fixed bottom-0 right-0 z-50",children:i.jsxs("a",{href:c.githubPage,target:"_blank",className:"text-sm text-[var(--grass-11)] font-bold tracking-wide transition-colors bg-[var(--grass-4)] hover:bg-[var(--grass-5)] border-t border-l border-[var(--grass-8)] px-3 py-1 rounded-tl-md flex items-center gap-2",children:[i.jsx("span",{className:"pb-[2px]",children:"made with marimo"}),i.jsx("img",{src:"./favicon.ico",alt:"marimo",className:"h-4 w-auto"})]})}),s[0]=t):t=s[0],t};export{F as default};
@@ -0,0 +1 @@
1
+ var t,n,e;import{_ as i,p as r,q as s,s as o,g as l,b as a,a as c,c as h,z as u,S as f,y,j as p}from"./mermaid-Cuo5gmPJ.js";import{s as d}from"./transform-DjHZbYKP.js";import{o as g}from"./ordinal-DDUp3AbE.js";import{c as _}from"./colors-bszWmPJw.js";import"./index-CCmIqGps.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";import"./init-DLRA0X12.js";const m=_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function x(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var k,v;function b(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&e>i&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&e>i&&(i=e);return i}function w(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&i>e&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&i>e&&(i=e);return i}function S(t,n){var e,i=t.length,r=-1,s=0;if(null==n)for(;++r<i;)(e=+t[r])&&(s+=e);else for(;++r<i;)(e=+n(t[r],r,t))&&(s+=e);return s}function E(t){return t.target.depth}function L(t,n){return t.sourceLinks.length?t.depth:n-1}function A(t){return function(){return t}}function M(t,n){return T(t.source,n.source)||t.index-n.index}function I(t,n){return T(t.target,n.target)||t.index-n.index}function T(t,n){return t.y0-n.y0}function j(t){return t.value}function N(t){return t.index}function P(t){return t.nodes}function O(t){return t.links}function C(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function D({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function $(){let t,n,e,i=0,r=0,s=1,o=1,l=24,a=8,c=N,h=L,u=P,f=O,y=6;function p(){const p={nodes:u.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,r]of t.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const i=new Map(t.map(((n,e)=>[c(n,e,t),n])));for(const[e,r]of n.entries()){r.index=e;let{source:t,target:n}=r;"object"!=typeof t&&(t=r.source=C(i,t)),"object"!=typeof n&&(n=r.target=C(i,n)),t.sourceLinks.push(r),n.targetLinks.push(r)}if(null!=e)for(const{sourceLinks:r,targetLinks:s}of t)r.sort(e),s.sort(e)}(p),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(S(n.sourceLinks,j),S(n.targetLinks,j)):n.fixedValue}(p),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(p),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(p),function(e){const c=function({nodes:t}){const e=b(t,(t=>t.depth))+1,r=(s-i-l)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(h.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+l,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(a,(o-r)/(b(c,(t=>t.length))-1)),function(n){const e=w(n,(n=>(o-r-(n.length-1)*t)/S(n,j)));for(const i of n){let n=r;for(const r of i){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(o-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}v(i)}}(c);for(let t=0;t<y;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/y);g(c,n,e),d(c,n,e)}}(p),D(p),p}function d(t,e,i){for(let r=1,s=t.length;r<s;++r){const s=t[r];for(const t of s){let n=0,i=0;for(const{source:e,value:s}of t.targetLinks){let r=s*(t.layer-e.layer);n+=E(e,t)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function g(t,e,i){for(let r=t.length-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=$(t,e)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function _(n,e){const i=n.length>>1,s=n[i];x(n,s.y0-t,i-1,e),m(n,s.y1+t,i+1,e),x(n,o,n.length-1,e),m(n,r,0,e)}function m(n,e,i,r){for(;i<n.length;++i){const s=n[i],o=(e-s.y0)*r;o>1e-6&&(s.y0+=o,s.y1+=o),e=s.y1+t}}function x(n,e,i,r){for(;i>=0;--i){const s=n[i],o=(s.y1-e)*r;o>1e-6&&(s.y0-=o,s.y1-=o),e=s.y0-t}}function k({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(I);for(const{target:{targetLinks:n}}of t)n.sort(M)}}function v(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(I),e.sort(M)}function E(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:s}of n.sourceLinks){if(r===e)break;i+=s+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;i-=r}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:s}of e.targetLinks){if(r===n)break;i+=s+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;i-=r}return i}return p.update=function(t){return D(t),t},p.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:A(t),p):c},p.nodeAlign=function(t){return arguments.length?(h="function"==typeof t?t:A(t),p):h},p.nodeSort=function(t){return arguments.length?(n=t,p):n},p.nodeWidth=function(t){return arguments.length?(l=+t,p):l},p.nodePadding=function(n){return arguments.length?(a=t=+n,p):a},p.nodes=function(t){return arguments.length?(u="function"==typeof t?t:A(t),p):u},p.links=function(t){return arguments.length?(f="function"==typeof t?t:A(t),p):f},p.linkSort=function(t){return arguments.length?(e=t,p):e},p.size=function(t){return arguments.length?(i=r=0,s=+t[0],o=+t[1],p):[s-i,o-r]},p.extent=function(t){return arguments.length?(i=+t[0][0],s=+t[1][0],r=+t[0][1],o=+t[1][1],p):[[i,r],[s,o]]},p.iterations=function(t){return arguments.length?(y=+t,p):y},p}1===(k=x).length&&(v=k,k=function(t,n){return x(v(t),n)});var z=Math.PI,F=2*z,U=1e-6,W=F-U;function G(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function q(){return new G}function V(t){return function(){return t}}function X(t){return t[0]}function Q(t){return t[1]}G.prototype=q.prototype={constructor:G,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,s){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var s=this._x1,o=this._y1,l=e-t,a=i-n,c=s-t,h=o-n,u=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>U)if(Math.abs(h*l-a*c)>U&&r){var f=e-s,y=i-o,p=l*l+a*a,d=f*f+y*y,g=Math.sqrt(p),_=Math.sqrt(u),m=r*Math.tan((z-Math.acos((p+u-d)/(2*g*_)))/2),x=m/_,k=m/g;Math.abs(x-1)>U&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+k*l)+","+(this._y1=n+k*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,s){t=+t,n=+n,s=!!s;var o=(e=+e)*Math.cos(i),l=e*Math.sin(i),a=t+o,c=n+l,h=1^s,u=s?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+c:(Math.abs(this._x1-a)>U||Math.abs(this._y1-c)>U)&&(this._+="L"+a+","+c),e&&(u<0&&(u=u%F+F),u>W?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-l)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=c):u>U&&(this._+="A"+e+","+e+",0,"+ +(u>=z)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var R=Array.prototype.slice;function Y(t){return t.source}function B(t){return t.target}function K(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function Z(){return function(t){var n=Y,e=B,i=X,r=Q,s=null;function o(){var o,l=R.call(arguments),a=n.apply(this,l),c=e.apply(this,l);if(s||(s=o=q()),t(s,+i.apply(this,(l[0]=a,l)),+r.apply(this,l),+i.apply(this,(l[0]=c,l)),+r.apply(this,l)),o)return s=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:V(+t),o):i},o.y=function(t){return arguments.length?(r="function"==typeof t?t:V(+t),o):r},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o}(K)}function H(t){return[t.source.x1,t.y0]}function J(t){return[t.target.x0,t.y1]}var tt=function(){var t=i((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],r=[1,5,10,12],s={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:i((function(t,n,e,i,r,s,o){var l=s.length-1;switch(r){case 7:const t=i.findOrCreateNode(s[l-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(s[l-2].trim().replaceAll('""','"')),e=parseFloat(s[l].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=s[l];break;case 10:this.$=s[l-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(r,[2,8]),t(r,[2,9]),{19:[1,16]},t(r,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(r,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:i((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:i((function(t){var n=this,e=[0],r=[],s=[null],o=[],l=this.table,a="",c=0,h=0,u=o.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var d=f.yylloc;o.push(d);var g=f.options&&f.options.ranges;function _(){var t;return"number"!=typeof(t=r.pop()||f.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(t){e.length=e.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),i(_,"lex");for(var m,x,k,v,b,w,S,E,L={};;){if(x=e[e.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==m&&(m=_()),k=l[x]&&l[x][m]),void 0===k||!k.length||!k[0]){var A="";for(b in E=[],l[x])this.terminals_[b]&&b>2&&E.push("'"+this.terminals_[b]+"'");A=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:f.match,token:this.terminals_[m]||m,line:f.yylineno,loc:d,expected:E})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+m);switch(k[0]){case 1:e.push(m),s.push(f.yytext),o.push(f.yylloc),e.push(k[1]),m=null,h=f.yyleng,a=f.yytext,c=f.yylineno,d=f.yylloc;break;case 2:if(w=this.productions_[k[1]][1],L.$=s[s.length-w],L._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column},g&&(L._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]),void 0!==(v=this.performAction.apply(L,[a,h,c,y.yy,k[1],s,o].concat(u))))return v;w&&(e=e.slice(0,-1*w*2),s=s.slice(0,-1*w),o=o.slice(0,-1*w)),e.push(this.productions_[k[1]][0]),s.push(L.$),o.push(L._$),S=l[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:i((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:i((function(t,n){return this.yy=n||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:i((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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:i((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=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),e.length-1&&(this.yylineno-=e.length-1);var r=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:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:i((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:i((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:i((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:i((function(t,n){var e,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((e=this._input.match(this.rules[r[s]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var t=this.next();return t||this.lex()}),"lex"),begin:i((function(t){this.conditionStack.push(t)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((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:i((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:i((function(t){this.begin(t)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function l(){this.yy={}}return s.lexer=o,i(l,"Parser"),l.prototype=s,s.Parser=l,new l}();tt.parser=tt;var nt=tt,et=[],it=[],rt=new Map,st=i((()=>{et=[],it=[],rt=new Map,y()}),"clear"),ot=(i(t=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}},"SankeyLink"),t),lt=i(((t,n,e)=>{et.push(new ot(t,n,e))}),"addLink"),at=(i(n=class{constructor(t){this.ID=t}},"SankeyNode"),n),ct=i((t=>{t=p.sanitizeText(t,h());let n=rt.get(t);return void 0===n&&(n=new at(t),rt.set(t,n),it.push(n)),n}),"findOrCreateNode"),ht=i((()=>it),"getNodes"),ut=i((()=>et),"getLinks"),ft=i((()=>({nodes:it.map((t=>({id:t.ID}))),links:et.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),yt={nodesMap:rt,getConfig:i((()=>h().sankey),"getConfig"),getNodes:ht,getLinks:ut,getGraph:ft,addLink:lt,findOrCreateNode:ct,getAccTitle:c,setAccTitle:a,getAccDescription:l,setAccDescription:o,getDiagramTitle:s,setDiagramTitle:r,clear:st},pt=(i(e=class{static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},"Uid"),e.count=0,e),dt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?w(t.sourceLinks,E)-1:0},justify:L},gt={draw:i((function(t,n,e,r){const{securityLevel:s,sankey:o}=h(),l=u.sankey;let a;"sandbox"===s&&(a=d("#i"+n));const c=d("sandbox"===s?a.nodes()[0].contentDocument.body:"body"),y="sandbox"===s?c.select(`[id="${n}"]`):d(`[id="${n}"]`),p=(null==o?void 0:o.width)??l.width,_=(null==o?void 0:o.height)??l.width,x=(null==o?void 0:o.useMaxWidth)??l.useMaxWidth,k=(null==o?void 0:o.nodeAlignment)??l.nodeAlignment,v=(null==o?void 0:o.prefix)??l.prefix,b=(null==o?void 0:o.suffix)??l.suffix,w=(null==o?void 0:o.showValues)??l.showValues,S=r.db.getGraph(),E=dt[k];$().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(w?15:0)).nodeAlign(E).extent([[0,0],[p,_]])(S);const L=g(m);y.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=pt.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>L(t.id)));const A=i((({id:t,value:n})=>w?`${t}\n${v}${Math.round(100*n)/100}${b}`:t),"getText");y.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(S.nodes).join("text").attr("x",(t=>t.x0<p/2?t.x1+6:t.x0-6)).attr("y",(t=>(t.y1+t.y0)/2)).attr("dy",(w?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0<p/2?"start":"end")).text(A);const M=y.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),I=(null==o?void 0:o.linkColor)??"gradient";if("gradient"===I){const t=M.append("linearGradient").attr("id",(t=>(t.uid=pt.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>L(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>L(t.target.id)))}let T;switch(I){case"gradient":T=i((t=>t.uid),"coloring");break;case"source":T=i((t=>L(t.source.id)),"coloring");break;case"target":T=i((t=>L(t.target.id)),"coloring");break;default:T=I}M.append("path").attr("d",Z().source(H).target(J)).attr("stroke",T).attr("stroke-width",(t=>Math.max(1,t.width))),f(void 0,y,0,x)}),"draw")},_t=i((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),mt=i((t=>`.label {\n font-family: ${t.fontFamily};\n }`),"getStyles"),xt=nt.parse.bind(nt);nt.parse=t=>xt(_t(t));var kt={styles:mt,parser:nt,db:yt,renderer:gt};export{kt as diagram};
@@ -1 +1 @@
1
- var a={},m={eq:"operator",lt:"operator",le:"operator",gt:"operator",ge:"operator",in:"operator",ne:"operator",or:"operator"},p=/(<=|>=|!=|<>)/,d=/[=\(:\),{}.*<>+\-\/^\[\]]/;function o(s,i,e){if(e)for(var n=i.split(" "),r=0;r<n.length;r++)a[n[r]]={style:s,state:e}}o("def","stack pgm view source debug nesting nolist",["inDataStep"]),o("def","if while until for do do; end end; then else cancel",["inDataStep"]),o("def","label format _n_ _error_",["inDataStep"]),o("def","ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME",["inDataStep"]),o("def","filevar finfo finv fipname fipnamel fipstate first firstobs floor",["inDataStep"]),o("def","varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday",["inDataStep"]),o("def","zipfips zipname zipnamel zipstate",["inDataStep"]),o("def","put putc putn",["inDataStep"]),o("builtin","data run",["inDataStep"]),o("def","data",["inProc"]),o("def","%if %end %end; %else %else; %do %do; %then",["inMacro"]),o("builtin","proc run; quit; libname filename %macro %mend option options",["ALL"]),o("def","footnote title libname ods",["ALL"]),o("def","%let %put %global %sysfunc %eval ",["ALL"]),o("variable","&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext",["ALL"]),o("def","source2 nosource2 page pageno pagesize",["ALL"]),o("def","_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddfm ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref fmterr fmtsearch fnonct fnote font fontalias fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs on open order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2 paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps pw pwreq qtr quote r ranbin rancau random ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni rcorr read recfm register regr remote remove rename repeat repeated replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover sub subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq min max",["inDataStep","inProc"]),o("operator","and not ",["inDataStep","inProc"]);const f={name:"sas",startState:function(){return{inDataStep:!1,inProc:!1,inMacro:!1,nextword:!1,continueString:null,continueComment:!1}},token:function(s,i){return s.eatSpace()?null:function(e,n){var r=e.next();if(r==="/"&&e.eat("*"))return n.continueComment=!0,"comment";if(n.continueComment===!0)return r==="*"&&e.peek()==="/"?(e.next(),n.continueComment=!1):e.skipTo("*")?(e.skipTo("*"),e.next(),e.eat("/")&&(n.continueComment=!1)):e.skipToEnd(),"comment";if(r=="*"&&e.column()==e.indentation())return e.skipToEnd(),"comment";var t,l=r+e.peek();if(!(r!=='"'&&r!=="'"||n.continueString))return n.continueString=r,"string";if(n.continueString)return n.continueString==r?n.continueString=null:e.skipTo(n.continueString)?(e.next(),n.continueString=null):e.skipToEnd(),"string";if(n.continueString!==null&&e.eol())return e.skipTo(n.continueString)||e.skipToEnd(),"string";if(/[\d\.]/.test(r))return r==="."?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):r==="0"?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(p.test(r+e.peek()))return e.next(),"operator";if(m.hasOwnProperty(l)){if(e.next(),e.peek()===" ")return m[l.toLowerCase()]}else if(d.test(r))return"operator";if(e.match(/[%&;\w]+/,!1)!=null){if(t=r+e.match(/[%&;\w]+/,!0),/&/.test(t))return"variable"}else t=r;if(n.nextword)return e.match(/[\w]+/),e.peek()==="."&&e.skipTo(" "),n.nextword=!1,"variableName.special";if(t=t.toLowerCase(),n.inDataStep){if(t==="run;"||e.match(/run\s;/))return n.inDataStep=!1,"builtin";if(t&&e.next()===".")return/\w/.test(e.peek())?"variableName.special":"variable";if(t&&a.hasOwnProperty(t)&&(a[t].state.indexOf("inDataStep")!==-1||a[t].state.indexOf("ALL")!==-1)){e.start<e.pos&&e.backUp(e.pos-e.start);for(var c=0;c<t.length;++c)e.next();return a[t].style}}if(n.inProc){if(t==="run;"||t==="quit;")return n.inProc=!1,"builtin";if(t&&a.hasOwnProperty(t)&&(a[t].state.indexOf("inProc")!==-1||a[t].state.indexOf("ALL")!==-1))return e.match(/[\w]+/),a[t].style}return n.inMacro?t==="%mend"?(e.peek()===";"&&e.next(),n.inMacro=!1,"builtin"):t&&a.hasOwnProperty(t)&&(a[t].state.indexOf("inMacro")!==-1||a[t].state.indexOf("ALL")!==-1)?(e.match(/[\w]+/),a[t].style):"atom":t&&a.hasOwnProperty(t)?(e.backUp(1),e.match(/[\w]+/),t==="data"&&/=/.test(e.peek())===!1?(n.inDataStep=!0,n.nextword=!0,"builtin"):t==="proc"?(n.inProc=!0,n.nextword=!0,"builtin"):t==="%macro"?(n.inMacro=!0,n.nextword=!0,"builtin"):/title[1-9]/.test(t)?"def":t==="footnote"?(e.eat(/[1-9]/),"def"):n.inDataStep===!0&&a[t].state.indexOf("inDataStep")!==-1||n.inProc===!0&&a[t].state.indexOf("inProc")!==-1||n.inMacro===!0&&a[t].state.indexOf("inMacro")!==-1||a[t].state.indexOf("ALL")!==-1?a[t].style:null):null}(s,i)},languageData:{commentTokens:{block:{open:"/*",close:"*/"}}}};export{f as sas};
1
+ var e={},t={eq:"operator",lt:"operator",le:"operator",gt:"operator",ge:"operator",in:"operator",ne:"operator",or:"operator"},n=/(<=|>=|!=|<>)/,r=/[=\(:\),{}.*<>+\-\/^\[\]]/;function s(t,n,r){if(r)for(var s=n.split(" "),o=0;o<s.length;o++)e[s[o]]={style:t,state:r}}s("def","stack pgm view source debug nesting nolist",["inDataStep"]),s("def","if while until for do do; end end; then else cancel",["inDataStep"]),s("def","label format _n_ _error_",["inDataStep"]),s("def","ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME",["inDataStep"]),s("def","filevar finfo finv fipname fipnamel fipstate first firstobs floor",["inDataStep"]),s("def","varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday",["inDataStep"]),s("def","zipfips zipname zipnamel zipstate",["inDataStep"]),s("def","put putc putn",["inDataStep"]),s("builtin","data run",["inDataStep"]),s("def","data",["inProc"]),s("def","%if %end %end; %else %else; %do %do; %then",["inMacro"]),s("builtin","proc run; quit; libname filename %macro %mend option options",["ALL"]),s("def","footnote title libname ods",["ALL"]),s("def","%let %put %global %sysfunc %eval ",["ALL"]),s("variable","&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext",["ALL"]),s("def","source2 nosource2 page pageno pagesize",["ALL"]),s("def","_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddfm ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref fmterr fmtsearch fnonct fnote font fontalias fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs on open order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2 paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps pw pwreq qtr quote r ranbin rancau random ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni rcorr read recfm register regr remote remove rename repeat repeated replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover sub subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq min max",["inDataStep","inProc"]),s("operator","and not ",["inDataStep","inProc"]);const o={name:"sas",startState:function(){return{inDataStep:!1,inProc:!1,inMacro:!1,nextword:!1,continueString:null,continueComment:!1}},token:function(s,o){return s.eatSpace()?null:function(s,o){var a=s.next();if("/"===a&&s.eat("*"))return o.continueComment=!0,"comment";if(!0===o.continueComment)return"*"===a&&"/"===s.peek()?(s.next(),o.continueComment=!1):s.skipTo("*")?(s.skipTo("*"),s.next(),s.eat("/")&&(o.continueComment=!1)):s.skipToEnd(),"comment";if("*"==a&&s.column()==s.indentation())return s.skipToEnd(),"comment";var i,l=a+s.peek();if(!('"'!==a&&"'"!==a||o.continueString))return o.continueString=a,"string";if(o.continueString)return o.continueString==a?o.continueString=null:s.skipTo(o.continueString)?(s.next(),o.continueString=null):s.skipToEnd(),"string";if(null!==o.continueString&&s.eol())return s.skipTo(o.continueString)||s.skipToEnd(),"string";if(/[\d\.]/.test(a))return"."===a?s.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"===a?s.match(/^[xX][0-9a-fA-F]+/)||s.match(/^0[0-7]+/):s.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(n.test(a+s.peek()))return s.next(),"operator";if(t.hasOwnProperty(l)){if(s.next()," "===s.peek())return t[l.toLowerCase()]}else if(r.test(a))return"operator";if(null!=s.match(/[%&;\w]+/,!1)){if(i=a+s.match(/[%&;\w]+/,!0),/&/.test(i))return"variable"}else i=a;if(o.nextword)return s.match(/[\w]+/),"."===s.peek()&&s.skipTo(" "),o.nextword=!1,"variableName.special";if(i=i.toLowerCase(),o.inDataStep){if("run;"===i||s.match(/run\s;/))return o.inDataStep=!1,"builtin";if(i&&"."===s.next())return/\w/.test(s.peek())?"variableName.special":"variable";if(i&&e.hasOwnProperty(i)&&(-1!==e[i].state.indexOf("inDataStep")||-1!==e[i].state.indexOf("ALL"))){s.start<s.pos&&s.backUp(s.pos-s.start);for(var c=0;c<i.length;++c)s.next();return e[i].style}}if(o.inProc){if("run;"===i||"quit;"===i)return o.inProc=!1,"builtin";if(i&&e.hasOwnProperty(i)&&(-1!==e[i].state.indexOf("inProc")||-1!==e[i].state.indexOf("ALL")))return s.match(/[\w]+/),e[i].style}return o.inMacro?"%mend"===i?(";"===s.peek()&&s.next(),o.inMacro=!1,"builtin"):i&&e.hasOwnProperty(i)&&(-1!==e[i].state.indexOf("inMacro")||-1!==e[i].state.indexOf("ALL"))?(s.match(/[\w]+/),e[i].style):"atom":i&&e.hasOwnProperty(i)?(s.backUp(1),s.match(/[\w]+/),"data"===i&&!1===/=/.test(s.peek())?(o.inDataStep=!0,o.nextword=!0,"builtin"):"proc"===i?(o.inProc=!0,o.nextword=!0,"builtin"):"%macro"===i?(o.inMacro=!0,o.nextword=!0,"builtin"):/title[1-9]/.test(i)?"def":"footnote"===i?(s.eat(/[1-9]/),"def"):!0===o.inDataStep&&-1!==e[i].state.indexOf("inDataStep")||!0===o.inProc&&-1!==e[i].state.indexOf("inProc")||!0===o.inMacro&&-1!==e[i].state.indexOf("inMacro")||-1!==e[i].state.indexOf("ALL")?e[i].style:null):null}(s,o)},languageData:{commentTokens:{block:{open:"/*",close:"*/"}}}};export{o as sas};
@@ -0,0 +1 @@
1
+ var e,t,n=Object.getOwnPropertyNames,r=(e={"assets/save-worker-CQvBUha3.js"(e,t){var n,r,a;(r=n||(n={})).assertEqual=e=>e,r.assertIs=function(e){},r.assertNever=function(e){throw new Error},r.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},r.getValidEnumValues=e=>{const t=r.objectKeys(e).filter((t=>"number"!=typeof e[e[t]])),n={};for(const r of t)n[r]=e[r];return r.objectValues(n)},r.objectValues=e=>r.objectKeys(e).map((function(t){return e[t]})),r.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},r.find=(e,t)=>{for(const n of e)if(t(n))return n},r.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,r.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},r.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(a||(a={})).mergeShapes=(e,t)=>({...e,...t});const s=n.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),i=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;case"object":return Array.isArray(e)?s.array:null===e?s.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?s.promise:"undefined"!=typeof Map&&e instanceof Map?s.map:"undefined"!=typeof Set&&e instanceof Set?s.set:"undefined"!=typeof Date&&e instanceof Date?s.date:s.object;default:return s.unknown}},o=n.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class d extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(r);else if("invalid_return_type"===a.code)r(a.returnTypeError);else if("invalid_arguments"===a.code)r(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,r=0;for(;r<a.path.length;){const n=a.path[r];r===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof d))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}d.create=e=>new d(e);const c=(e,t)=>{let r;switch(e.code){case o.invalid_type:r=e.received===s.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,n.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:r=`Unrecognized key(s) in object: ${n.joinValues(e.keys,", ")}`;break;case o.invalid_union:r="Invalid input";break;case o.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${n.joinValues(e.options)}`;break;case o.invalid_enum_value:r=`Invalid enum value. Expected ${n.joinValues(e.options)}, received '${e.received}'`;break;case o.invalid_arguments:r="Invalid function arguments";break;case o.invalid_return_type:r="Invalid function return type";break;case o.invalid_date:r="Invalid date";break;case o.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:n.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case o.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case o.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case o.custom:r="Invalid input";break;case o.invalid_intersection_types:r="Intersection results could not be merged";break;case o.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case o.not_finite:r="Number must be finite";break;default:r=t.defaultError,n.assertNever(e)}return{message:r}};let u=c;function l(){return u}const p=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],i={...a,path:s};if(void 0!==a.message)return{...a,path:s,message:a.message};let o="";const d=r.filter((e=>!!e)).slice().reverse();for(const c of d)o=c(i,{data:t,defaultError:o}).message;return{...a,path:s,message:o}};function h(e,t){const n=l(),r=p({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===c?void 0:c].filter((e=>!!e))});e.common.issues.push(r)}class m{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return f;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t){const e=await r.key,t=await r.value;n.push({key:e,value:t})}return m.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:a}=r;if("aborted"===t.status)return f;if("aborted"===a.status)return f;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!r.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const f=Object.freeze({status:"aborted"}),y=e=>({status:"dirty",value:e}),g=e=>({status:"valid",value:e}),v=e=>"aborted"===e.status,_=e=>"dirty"===e.status,w=e=>"valid"===e.status,b=e=>"undefined"!=typeof Promise&&e instanceof Promise;function k(e,t,n,r){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function x(e,t,n,r,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var S,T,E,O;"function"==typeof SuppressedError&&SuppressedError,(T=S||(S={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},T.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class Z{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const N=(e,t)=>{if(w(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new d(e.common.issues);return this._error=t,this._error}}};function j(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:a}:{errorMap:(t,a)=>{var s,i;const{message:o}=e;return"invalid_enum_value"===t.code?{message:null!=o?o:a.defaultError}:void 0===a.data?{message:null!==(s=null!=o?o:r)&&void 0!==s?s:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(i=null!=o?o:n)&&void 0!==i?i:a.defaultError}},description:a}}class P{get description(){return this._def.description}_getType(e){return i(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new m,ctx:{common:e.parent.common,data:e.data,parsedType:i(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(b(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},a=this._parseSync({data:e,path:r.path,parent:r});return N(r,a)}"~validate"(e){var t,n;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:r});return w(t)?{value:t.value}:{issues:r.common.issues}}catch(a){(null===(n=null===(t=null==a?void 0:a.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then((e=>w(e)?{value:e.value}:{issues:r.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:i(e)},r=this._parse({data:e,path:n.path,parent:n}),a=await(b(r)?r:Promise.resolve(r));return N(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,r)=>{const a=e(t),s=()=>r.addIssue({code:o.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(s(),!1))):!!a||(s(),!1)}))}refinement(e,t){return this._refinement(((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)))}_refinement(e){return new Pe({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Ae.create(this,this._def)}nullable(){return Ce.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pe.create(this)}promise(){return je.create(this,this._def)}or(e){return fe.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new Pe({...j(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ie({...j(this._def),innerType:this,defaultValue:t,typeName:Ve.ZodDefault})}brand(){return new Le({typeName:Ve.ZodBranded,type:this,...j(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Re({...j(this._def),innerType:this,catchValue:t,typeName:Ve.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Me.create(this,e)}readonly(){return De.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const A=/^c[^\s-]{8,}$/i,C=/^[0-9a-z]+$/,I=/^[0-9A-HJKMNP-TV-Z]{26}$/i,R=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,F=/^[a-z0-9_-]{21}$/i,$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,L=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,M=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let D;const U=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,q=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,V=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,H=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,B=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,W="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",K=new RegExp(`^${W}$`);function J(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function Y(e){let t=`${W}T${J(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function G(e,t){if(!$.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!("object"!=typeof a||null===a||!a.typ||!a.alg||t&&a.alg!==t)}catch(n){return!1}}function X(e,t){return!("v4"!==t&&t||!z.test(e))||!("v6"!==t&&t||!V.test(e))}class Q extends P{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==s.string){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.string,received:t.parsedType}),f}const t=new m;let r;for(const s of this._def.checks)if("min"===s.kind)e.data.length<s.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:o.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("max"===s.kind)e.data.length>s.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:o.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),t.dirty());else if("length"===s.kind){const n=e.data.length>s.value,a=e.data.length<s.value;(n||a)&&(r=this._getOrReturnCtx(e,r),n?h(r,{code:o.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&h(r,{code:o.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),t.dirty())}else if("email"===s.kind)M.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"email",code:o.invalid_string,message:s.message}),t.dirty());else if("emoji"===s.kind)D||(D=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),D.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"emoji",code:o.invalid_string,message:s.message}),t.dirty());else if("uuid"===s.kind)R.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"uuid",code:o.invalid_string,message:s.message}),t.dirty());else if("nanoid"===s.kind)F.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"nanoid",code:o.invalid_string,message:s.message}),t.dirty());else if("cuid"===s.kind)A.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cuid",code:o.invalid_string,message:s.message}),t.dirty());else if("cuid2"===s.kind)C.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cuid2",code:o.invalid_string,message:s.message}),t.dirty());else if("ulid"===s.kind)I.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"ulid",code:o.invalid_string,message:s.message}),t.dirty());else if("url"===s.kind)try{new URL(e.data)}catch(d){r=this._getOrReturnCtx(e,r),h(r,{validation:"url",code:o.invalid_string,message:s.message}),t.dirty()}else"regex"===s.kind?(s.regex.lastIndex=0,s.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"regex",code:o.invalid_string,message:s.message}),t.dirty())):"trim"===s.kind?e.data=e.data.trim():"includes"===s.kind?e.data.includes(s.value,s.position)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),t.dirty()):"toLowerCase"===s.kind?e.data=e.data.toLowerCase():"toUpperCase"===s.kind?e.data=e.data.toUpperCase():"startsWith"===s.kind?e.data.startsWith(s.value)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:{startsWith:s.value},message:s.message}),t.dirty()):"endsWith"===s.kind?e.data.endsWith(s.value)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:{endsWith:s.value},message:s.message}),t.dirty()):"datetime"===s.kind?Y(s).test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:"datetime",message:s.message}),t.dirty()):"date"===s.kind?K.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:"date",message:s.message}),t.dirty()):"time"===s.kind?new RegExp(`^${J(s)}$`).test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{code:o.invalid_string,validation:"time",message:s.message}),t.dirty()):"duration"===s.kind?L.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"duration",code:o.invalid_string,message:s.message}),t.dirty()):"ip"===s.kind?(a=e.data,("v4"!==(i=s.version)&&i||!U.test(a))&&("v6"!==i&&i||!q.test(a))&&(r=this._getOrReturnCtx(e,r),h(r,{validation:"ip",code:o.invalid_string,message:s.message}),t.dirty())):"jwt"===s.kind?G(e.data,s.alg)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"jwt",code:o.invalid_string,message:s.message}),t.dirty()):"cidr"===s.kind?X(e.data,s.version)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"cidr",code:o.invalid_string,message:s.message}),t.dirty()):"base64"===s.kind?H.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"base64",code:o.invalid_string,message:s.message}),t.dirty()):"base64url"===s.kind?B.test(e.data)||(r=this._getOrReturnCtx(e,r),h(r,{validation:"base64url",code:o.invalid_string,message:s.message}),t.dirty()):n.assertNever(s);var a,i;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:o.invalid_string,...S.errToObj(n)})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...S.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...S.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...S.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...S.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...S.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...S.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...S.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...S.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...S.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...S.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...S.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...S.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...S.errToObj(t)})}nonempty(e){return this.min(1,S.errToObj(e))}trim(){return new Q({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ee(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}Q.create=e=>{var t;return new Q({checks:[],typeName:Ve.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...j(e)})};class te extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==s.number){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.number,received:t.parsedType}),f}let t;const r=new m;for(const a of this._def.checks)"int"===a.kind?n.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),h(t,{code:o.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"multipleOf"===a.kind?0!==ee(e.data,a.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),h(t,{code:o.not_finite,message:a.message}),r.dirty()):n.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,n,r){return new te({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:S.toString(r)}]})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:S.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&n.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}te.create=e=>new te({checks:[],typeName:Ve.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...j(e)});class ne extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(a){return this._getInvalidInput(e)}if(this._getType(e)!==s.bigint)return this._getInvalidInput(e);let t;const r=new m;for(const s of this._def.checks)"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),r.dirty()):"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),h(t,{code:o.not_multiple_of,multipleOf:s.value,message:s.message}),r.dirty()):n.assertNever(s);return{status:r.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.bigint,received:t.parsedType}),f}gte(e,t){return this.setLimit("min",e,!0,S.toString(t))}gt(e,t){return this.setLimit("min",e,!1,S.toString(t))}lte(e,t){return this.setLimit("max",e,!0,S.toString(t))}lt(e,t){return this.setLimit("max",e,!1,S.toString(t))}setLimit(e,t,n,r){return new ne({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:S.toString(r)}]})}_addCheck(e){return new ne({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:S.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ne.create=e=>{var t;return new ne({checks:[],typeName:Ve.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...j(e)})};class re extends P{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==s.boolean){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.boolean,received:t.parsedType}),f}return g(e.data)}}re.create=e=>new re({typeName:Ve.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...j(e)});class ae extends P{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==s.date){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.date,received:t.parsedType}),f}if(isNaN(e.data.getTime()))return h(this._getOrReturnCtx(e),{code:o.invalid_date}),f;const t=new m;let r;for(const a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:o.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(r=this._getOrReturnCtx(e,r),h(r,{code:o.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):n.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:S.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:S.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ae.create=e=>new ae({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...j(e)});class se extends P{_parse(e){if(this._getType(e)!==s.symbol){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.symbol,received:t.parsedType}),f}return g(e.data)}}se.create=e=>new se({typeName:Ve.ZodSymbol,...j(e)});class ie extends P{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.undefined,received:t.parsedType}),f}return g(e.data)}}ie.create=e=>new ie({typeName:Ve.ZodUndefined,...j(e)});class oe extends P{_parse(e){if(this._getType(e)!==s.null){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.null,received:t.parsedType}),f}return g(e.data)}}oe.create=e=>new oe({typeName:Ve.ZodNull,...j(e)});class de extends P{constructor(){super(...arguments),this._any=!0}_parse(e){return g(e.data)}}de.create=e=>new de({typeName:Ve.ZodAny,...j(e)});class ce extends P{constructor(){super(...arguments),this._unknown=!0}_parse(e){return g(e.data)}}ce.create=e=>new ce({typeName:Ve.ZodUnknown,...j(e)});class ue extends P{_parse(e){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.never,received:t.parsedType}),f}}ue.create=e=>new ue({typeName:Ve.ZodNever,...j(e)});class le extends P{_parse(e){if(this._getType(e)!==s.undefined){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.void,received:t.parsedType}),f}return g(e.data)}}le.create=e=>new le({typeName:Ve.ZodVoid,...j(e)});class pe extends P{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==s.array)return h(t,{code:o.invalid_type,expected:s.array,received:t.parsedType}),f;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,a=t.data.length<r.exactLength.value;(e||a)&&(h(t,{code:e?o.too_big:o.too_small,minimum:a?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(h(t,{code:o.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(h(t,{code:o.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>r.type._parseAsync(new Z(t,e,t.path,n))))).then((e=>m.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>r.type._parseSync(new Z(t,e,t.path,n))));return m.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new pe({...this._def,minLength:{value:e,message:S.toString(t)}})}max(e,t){return new pe({...this._def,maxLength:{value:e,message:S.toString(t)}})}length(e,t){return new pe({...this._def,exactLength:{value:e,message:S.toString(t)}})}nonempty(e){return this.min(1,e)}}function he(e){if(e instanceof me){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ae.create(he(r))}return new me({...e._def,shape:()=>t})}return e instanceof pe?new pe({...e._def,type:he(e.element)}):e instanceof Ae?Ae.create(he(e.unwrap())):e instanceof Ce?Ce.create(he(e.unwrap())):e instanceof we?we.create(e.items.map((e=>he(e)))):e}pe.create=(e,t)=>new pe({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...j(t)});class me extends P{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=n.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==s.object){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.object,received:t.parsedType}),f}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof ue&&"strip"===this._def.unknownKeys))for(const s in n.data)a.includes(s)||i.push(s);const d=[];for(const s of a){const e=r[s],t=n.data[s];d.push({key:{status:"valid",value:s},value:e._parse(new Z(n,t,n.path,s)),alwaysSet:s in n.data})}if(this._def.catchall instanceof ue){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of i)d.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)i.length>0&&(h(n,{code:o.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const r=n.data[t];d.push({key:{status:"valid",value:t},value:e._parse(new Z(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of d){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e})).then((e=>m.mergeObjectSync(t,e))):m.mergeObjectSync(t,d)}get shape(){return this._def.shape()}strict(e){return S.errToObj,new me({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var r,a,s,i;const o=null!==(s=null===(a=(r=this._def).errorMap)||void 0===a?void 0:a.call(r,t,n).message)&&void 0!==s?s:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=S.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new me({...this._def,unknownKeys:"strip"})}passthrough(){return new me({...this._def,unknownKeys:"passthrough"})}extend(e){return new me({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new me({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ve.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new me({...this._def,catchall:e})}pick(e){const t={};return n.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new me({...this._def,shape:()=>t})}omit(e){const t={};return n.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new me({...this._def,shape:()=>t})}deepPartial(){return he(this)}partial(e){const t={};return n.objectKeys(this.shape).forEach((n=>{const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()})),new me({...this._def,shape:()=>t})}required(e){const t={};return n.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ae;)e=e._def.innerType;t[n]=e}})),new me({...this._def,shape:()=>t})}keyof(){return Oe(n.objectKeys(this.shape))}}me.create=(e,t)=>new me({shape:()=>e,unknownKeys:"strip",catchall:ue.create(),typeName:Ve.ZodObject,...j(t)}),me.strictCreate=(e,t)=>new me({shape:()=>e,unknownKeys:"strict",catchall:ue.create(),typeName:Ve.ZodObject,...j(t)}),me.lazycreate=(e,t)=>new me({shape:e,unknownKeys:"strip",catchall:ue.create(),typeName:Ve.ZodObject,...j(t)});class fe extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map((e=>new d(e.ctx.common.issues)));return h(t,{code:o.invalid_union,unionErrors:n}),f}));{let e;const r=[];for(const s of n){const n={...t,common:{...t.common,issues:[]},parent:null},a=s._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=r.map((e=>new d(e)));return h(t,{code:o.invalid_union,unionErrors:a}),f}}get options(){return this._def.options}}fe.create=(e,t)=>new fe({options:e,typeName:Ve.ZodUnion,...j(t)});const ye=e=>e instanceof Te?ye(e.schema):e instanceof Pe?ye(e.innerType()):e instanceof Ee?[e.value]:e instanceof Ze?e.options:e instanceof Ne?n.objectValues(e.enum):e instanceof Ie?ye(e._def.innerType):e instanceof ie?[void 0]:e instanceof oe?[null]:e instanceof Ae?[void 0,...ye(e.unwrap())]:e instanceof Ce?[null,...ye(e.unwrap())]:e instanceof Le||e instanceof De?ye(e.unwrap()):e instanceof Re?ye(e._def.innerType):[];class ge extends P{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.object)return h(t,{code:o.invalid_type,expected:s.object,received:t.parsedType}),f;const n=this.discriminator,r=t.data[n],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(h(t,{code:o.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),f)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const r=new Map;for(const a of t){const t=ye(a.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const n of t){if(r.has(n))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);r.set(n,a)}}return new ge({typeName:Ve.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...j(n)})}}function ve(e,t){const r=i(e),a=i(t);if(e===t)return{valid:!0,data:e};if(r===s.object&&a===s.object){const r=n.objectKeys(t),a=n.objectKeys(e).filter((e=>-1!==r.indexOf(e))),s={...e,...t};for(const n of a){const r=ve(e[n],t[n]);if(!r.valid)return{valid:!1};s[n]=r.data}return{valid:!0,data:s}}if(r===s.array&&a===s.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const a=ve(e[r],t[r]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return r===s.date&&a===s.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _e extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(v(e)||v(r))return f;const a=ve(e.value,r.value);return a.valid?((_(e)||_(r))&&t.dirty(),{status:t.value,value:a.data}):(h(n,{code:o.invalid_intersection_types}),f)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>r(e,t))):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}_e.create=(e,t,n)=>new _e({left:e,right:t,typeName:Ve.ZodIntersection,...j(n)});class we extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.array)return h(n,{code:o.invalid_type,expected:s.array,received:n.parsedType}),f;if(n.data.length<this._def.items.length)return h(n,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),f;!this._def.rest&&n.data.length>this._def.items.length&&(h(n,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map(((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new Z(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(r).then((e=>m.mergeArray(t,e))):m.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new we({...this._def,rest:e})}}we.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new we({items:e,typeName:Ve.ZodTuple,rest:null,...j(t)})};class be extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.object)return h(n,{code:o.invalid_type,expected:s.object,received:n.parsedType}),f;const r=[],a=this._def.keyType,i=this._def.valueType;for(const s in n.data)r.push({key:a._parse(new Z(n,s,n.path,s)),value:i._parse(new Z(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?m.mergeObjectAsync(t,r):m.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new be(t instanceof P?{keyType:e,valueType:t,typeName:Ve.ZodRecord,...j(n)}:{keyType:Q.create(),valueType:e,typeName:Ve.ZodRecord,...j(t)})}}class ke extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.map)return h(n,{code:o.invalid_type,expected:s.map,received:n.parsedType}),f;const r=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map((([e,t],s)=>({key:r._parse(new Z(n,e,n.path,[s,"key"])),value:a._parse(new Z(n,t,n.path,[s,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of i){const r=await n.key,a=await n.value;if("aborted"===r.status||"aborted"===a.status)return f;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of i){const r=n.key,a=n.value;if("aborted"===r.status||"aborted"===a.status)return f;"dirty"!==r.status&&"dirty"!==a.status||t.dirty(),e.set(r.value,a.value)}return{status:t.value,value:e}}}}ke.create=(e,t,n)=>new ke({valueType:t,keyType:e,typeName:Ve.ZodMap,...j(n)});class xe extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.set)return h(n,{code:o.invalid_type,expected:s.set,received:n.parsedType}),f;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(h(n,{code:o.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(h(n,{code:o.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function i(e){const n=new Set;for(const r of e){if("aborted"===r.status)return f;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const d=[...n.data.values()].map(((e,t)=>a._parse(new Z(n,e,n.path,t))));return n.common.async?Promise.all(d).then((e=>i(e))):i(d)}min(e,t){return new xe({...this._def,minSize:{value:e,message:S.toString(t)}})}max(e,t){return new xe({...this._def,maxSize:{value:e,message:S.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}xe.create=(e,t)=>new xe({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...j(t)});class Se extends P{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.function)return h(t,{code:o.invalid_type,expected:s.function,received:t.parsedType}),f;function n(e,n){return p({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),c].filter((e=>!!e)),issueData:{code:o.invalid_arguments,argumentsError:n}})}function r(e,n){return p({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l(),c].filter((e=>!!e)),issueData:{code:o.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof je){const e=this;return g((async function(...t){const s=new d([]),o=await e._def.args.parseAsync(t,a).catch((e=>{throw s.addIssue(n(t,e)),s})),c=await Reflect.apply(i,this,o);return await e._def.returns._def.type.parseAsync(c,a).catch((e=>{throw s.addIssue(r(c,e)),s}))}))}{const e=this;return g((function(...t){const s=e._def.args.safeParse(t,a);if(!s.success)throw new d([n(t,s.error)]);const o=Reflect.apply(i,this,s.data),c=e._def.returns.safeParse(o,a);if(!c.success)throw new d([r(o,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Se({...this._def,args:we.create(e).rest(ce.create())})}returns(e){return new Se({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Se({args:e||we.create([]).rest(ce.create()),returns:t||ce.create(),typeName:Ve.ZodFunction,...j(n)})}}class Te extends P{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Te.create=(e,t)=>new Te({getter:e,typeName:Ve.ZodLazy,...j(t)});class Ee extends P{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),f}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Oe(e,t){return new Ze({values:e,typeName:Ve.ZodEnum,...j(t)})}Ee.create=(e,t)=>new Ee({value:e,typeName:Ve.ZodLiteral,...j(t)});class Ze extends P{constructor(){super(...arguments),E.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return h(t,{expected:n.joinValues(r),received:t.parsedType,code:o.invalid_type}),f}if(k(this,E)||x(this,E,new Set(this._def.values)),!k(this,E).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return h(t,{received:t.data,code:o.invalid_enum_value,options:n}),f}return g(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ze.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ze.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}E=new WeakMap,Ze.create=Oe;class Ne extends P{constructor(){super(...arguments),O.set(this,void 0)}_parse(e){const t=n.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==s.string&&r.parsedType!==s.number){const e=n.objectValues(t);return h(r,{expected:n.joinValues(e),received:r.parsedType,code:o.invalid_type}),f}if(k(this,O)||x(this,O,new Set(n.getValidEnumValues(this._def.values))),!k(this,O).has(e.data)){const e=n.objectValues(t);return h(r,{received:r.data,code:o.invalid_enum_value,options:e}),f}return g(e.data)}get enum(){return this._def.values}}O=new WeakMap,Ne.create=(e,t)=>new Ne({values:e,typeName:Ve.ZodNativeEnum,...j(t)});class je extends P{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.promise&&!1===t.common.async)return h(t,{code:o.invalid_type,expected:s.promise,received:t.parsedType}),f;const n=t.parsedType===s.promise?t.data:Promise.resolve(t.data);return g(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}je.create=(e,t)=>new je({type:e,typeName:Ve.ZodPromise,...j(t)});class Pe extends P{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:e=>{h(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===a.type){const e=a.transform(r.data,s);if(r.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return f;const n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?f:"dirty"===n.status||"dirty"===t.value?y(n.value):n}));{if("aborted"===t.value)return f;const n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?f:"dirty"===n.status||"dirty"===t.value?y(n.value):n}}if("refinement"===a.type){const e=e=>{const t=a.refinement(e,s);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?f:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((n=>"aborted"===n.status?f:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===a.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!w(e))return e;const n=a.transform(e.value,s);if(n instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then((e=>w(e)?Promise.resolve(a.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}n.assertNever(a)}}Pe.create=(e,t,n)=>new Pe({schema:e,typeName:Ve.ZodEffects,effect:t,...j(n)}),Pe.createWithPreprocess=(e,t,n)=>new Pe({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...j(n)});class Ae extends P{_parse(e){return this._getType(e)===s.undefined?g(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ae.create=(e,t)=>new Ae({innerType:e,typeName:Ve.ZodOptional,...j(t)});class Ce extends P{_parse(e){return this._getType(e)===s.null?g(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ce.create=(e,t)=>new Ce({innerType:e,typeName:Ve.ZodNullable,...j(t)});class Ie extends P{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===s.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:Ve.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...j(t)});class Re extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return b(r)?r.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new d(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new d(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Re.create=(e,t)=>new Re({innerType:e,typeName:Ve.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...j(t)});class Fe extends P{_parse(e){if(this._getType(e)!==s.nan){const t=this._getOrReturnCtx(e);return h(t,{code:o.invalid_type,expected:s.nan,received:t.parsedType}),f}return{status:"valid",value:e.data}}}Fe.create=e=>new Fe({typeName:Ve.ZodNaN,...j(e)});const $e=Symbol("zod_brand");class Le extends P{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Me extends P{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?f:"dirty"===e.status?(t.dirty(),y(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?f:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Me({in:e,out:t,typeName:Ve.ZodPipeline})}}class De extends P{_parse(e){const t=this._def.innerType._parse(e),n=e=>(w(e)&&(e.value=Object.freeze(e.value)),e);return b(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Ue(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function ze(e,t={},n){return e?de.create().superRefine(((r,a)=>{var s,i;const o=e(r);if(o instanceof Promise)return o.then((e=>{var s,i;if(!e){const e=Ue(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}}));if(!o){const e=Ue(t,r),o=null===(i=null!==(s=e.fatal)&&void 0!==s?s:n)||void 0===i||i;a.addIssue({code:"custom",...e,fatal:o})}})):de.create()}De.create=(e,t)=>new De({innerType:e,typeName:Ve.ZodReadonly,...j(t)});const qe={object:me.lazycreate};var Ve,He;(He=Ve||(Ve={})).ZodString="ZodString",He.ZodNumber="ZodNumber",He.ZodNaN="ZodNaN",He.ZodBigInt="ZodBigInt",He.ZodBoolean="ZodBoolean",He.ZodDate="ZodDate",He.ZodSymbol="ZodSymbol",He.ZodUndefined="ZodUndefined",He.ZodNull="ZodNull",He.ZodAny="ZodAny",He.ZodUnknown="ZodUnknown",He.ZodNever="ZodNever",He.ZodVoid="ZodVoid",He.ZodArray="ZodArray",He.ZodObject="ZodObject",He.ZodUnion="ZodUnion",He.ZodDiscriminatedUnion="ZodDiscriminatedUnion",He.ZodIntersection="ZodIntersection",He.ZodTuple="ZodTuple",He.ZodRecord="ZodRecord",He.ZodMap="ZodMap",He.ZodSet="ZodSet",He.ZodFunction="ZodFunction",He.ZodLazy="ZodLazy",He.ZodLiteral="ZodLiteral",He.ZodEnum="ZodEnum",He.ZodEffects="ZodEffects",He.ZodNativeEnum="ZodNativeEnum",He.ZodOptional="ZodOptional",He.ZodNullable="ZodNullable",He.ZodDefault="ZodDefault",He.ZodCatch="ZodCatch",He.ZodPromise="ZodPromise",He.ZodBranded="ZodBranded",He.ZodPipeline="ZodPipeline",He.ZodReadonly="ZodReadonly";const Be=Q.create,We=te.create,Ke=Fe.create,Je=ne.create,Ye=re.create,Ge=ae.create,Xe=se.create,Qe=ie.create,et=oe.create,tt=de.create,nt=ce.create,rt=ue.create,at=le.create,st=pe.create,it=me.create,ot=me.strictCreate,dt=fe.create,ct=ge.create,ut=_e.create,lt=we.create,pt=be.create,ht=ke.create,mt=xe.create,ft=Se.create,yt=Te.create,gt=Ee.create,vt=Ze.create,_t=Ne.create,wt=je.create,bt=Pe.create,kt=Ae.create,xt=Ce.create,St=Pe.createWithPreprocess,Tt=Me.create,Et={string:e=>Q.create({...e,coerce:!0}),number:e=>te.create({...e,coerce:!0}),boolean:e=>re.create({...e,coerce:!0}),bigint:e=>ne.create({...e,coerce:!0}),date:e=>ae.create({...e,coerce:!0})},Ot=f;var Zt=Object.freeze({__proto__:null,defaultErrorMap:c,setErrorMap:function(e){u=e},getErrorMap:l,makeIssue:p,EMPTY_PATH:[],addIssueToContext:h,ParseStatus:m,INVALID:f,DIRTY:y,OK:g,isAborted:v,isDirty:_,isValid:w,isAsync:b,get util(){return n},get objectUtil(){return a},ZodParsedType:s,getParsedType:i,ZodType:P,datetimeRegex:Y,ZodString:Q,ZodNumber:te,ZodBigInt:ne,ZodBoolean:re,ZodDate:ae,ZodSymbol:se,ZodUndefined:ie,ZodNull:oe,ZodAny:de,ZodUnknown:ce,ZodNever:ue,ZodVoid:le,ZodArray:pe,ZodObject:me,ZodUnion:fe,ZodDiscriminatedUnion:ge,ZodIntersection:_e,ZodTuple:we,ZodRecord:be,ZodMap:ke,ZodSet:xe,ZodFunction:Se,ZodLazy:Te,ZodLiteral:Ee,ZodEnum:Ze,ZodNativeEnum:Ne,ZodPromise:je,ZodEffects:Pe,ZodTransformer:Pe,ZodOptional:Ae,ZodNullable:Ce,ZodDefault:Ie,ZodCatch:Re,ZodNaN:Fe,BRAND:$e,ZodBranded:Le,ZodPipeline:Me,ZodReadonly:De,custom:ze,Schema:P,ZodSchema:P,late:qe,get ZodFirstPartyTypeKind(){return Ve},coerce:Et,any:tt,array:st,bigint:Je,boolean:Ye,date:Ge,discriminatedUnion:ct,effect:bt,enum:vt,function:ft,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>ze((t=>t instanceof e),t),intersection:ut,lazy:yt,literal:gt,map:ht,nan:Ke,nativeEnum:_t,never:rt,null:et,nullable:xt,number:We,object:it,oboolean:()=>Ye().optional(),onumber:()=>We().optional(),optional:kt,ostring:()=>Be().optional(),pipeline:Tt,preprocess:St,promise:wt,record:pt,set:mt,strictObject:ot,string:Be,symbol:Xe,transformer:bt,tuple:lt,undefined:Qe,union:dt,unknown:nt,void:at,NEVER:Ot,ZodIssueCode:o,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:d});const Nt=Zt.object({detail:Zt.string()});function jt(e){if(!e)return"Unknown error";if(e instanceof Error){const t=Nt.safeParse(e.cause);return t.success?t.data.detail:function(e){const t=function(e){try{return JSON.parse(e)}catch{return e}}(e);if(!t)return e;const n=Nt.safeParse(t);return n.success?n.data.detail:e}(e.message)}if("object"==typeof e){const t=Nt.safeParse(e);if(t.success)return t.data.detail}try{return JSON.stringify(e)}catch{return String(e)}}const Pt=1e3;function At(e,t){const n=e.map((e=>`"${e}"`)).join(", ");return new Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function Ct(e={}){let t={};function n(e){t=e}let r,a={};function s(e){var t;a.unregisterHandler&&a.unregisterHandler(),a=e,null==(t=a.registerHandler)||t.call(a,_)}function i(e){r="function"!=typeof e?(t,n)=>{const r=e[t];if(r)return r(n);const a=e._;if(!a)throw new Error(`The requested method has no handler: ${t}`);return a(t,n)}:e}const{maxRequestTime:o=Pt}=e;e.transport&&s(e.transport),e.requestHandler&&i(e.requestHandler),e._debugHooks&&n(e._debugHooks);let d=0;const c=new Map,u=new Map;function l(e,...n){const r=n[0];return new Promise(((n,s)=>{var i;if(!a.send)throw At(["send"],"make requests");const l=d<=1e10?++d:d=0,p={type:"request",id:l,method:e,params:r};c.set(l,{resolve:n,reject:s}),o!==1/0&&u.set(l,setTimeout((()=>{u.delete(l),s(new Error("RPC request timed out."))}),o)),null==(i=t.onSend)||i.call(t,p),a.send(p)}))}const p=new Proxy(l,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>l(t,e)}),h=p;function m(e,...n){var r;const s=n[0];if(!a.send)throw At(["send"],"send messages");const i={type:"message",id:e,payload:s};null==(r=t.onSend)||r.call(t,i),a.send(i)}const f=new Proxy(m,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>m(t,e)}),y=f,g=new Map,v=new Set;async function _(e){var n,s;if(null==(n=t.onReceive)||n.call(t,e),!("type"in e))throw new Error("Message does not contain a type.");if("request"===e.type){if(!a.send||!r)throw At(["send","requestHandler"],"handle requests");const{id:n,method:o,params:d}=e;let c;try{c={type:"response",id:n,success:!0,payload:await r(o,d)}}catch(i){if(!(i instanceof Error))throw i;c={type:"response",id:n,success:!1,error:i.message}}return null==(s=t.onSend)||s.call(t,c),void a.send(c)}if("response"!==e.type){if("message"!==e.type)throw new Error(`Unexpected RPC message type: ${e.type}`);{for(const n of v)n(e.id,e.payload);const t=g.get(e.id);if(!t)return;for(const n of t)n(e.payload)}}else{const t=u.get(e.id);null!=t&&clearTimeout(t);const{resolve:n,reject:r}=c.get(e.id)??{};e.success?null==n||n(e.payload):null==r||r(new Error(e.error))}}return{setTransport:s,setRequestHandler:i,request:p,requestProxy:h,send:f,sendProxy:y,addMessageListener:function(e,t){var n;if(!a.registerHandler)throw At(["registerHandler"],"register message listeners");"*"!==e?(g.has(e)||g.set(e,new Set),null==(n=g.get(e))||n.add(t)):v.add(t)},removeMessageListener:function(e,t){var n,r;"*"!==e?(null==(n=g.get(e))||n.delete(t),0===(null==(r=g.get(e))?void 0:r.size)&&g.delete(e)):v.delete(t)},proxy:{send:y,request:h},_setDebugHooks:n}}const It="[transport-id]";function Rt(e,t={}){const{transportId:n,filter:r,remotePort:a}=t,s=e,i=a??e;let o;return{send(e){i.postMessage(function(e,t){const{transportId:n}=t;return null!=n?{[It]:n,data:e}:e}(e,{transportId:n}))},registerHandler(e){o=t=>{const a=t.data,[s,i]=function(e,t){const{transportId:n,filter:r}=t,a=null==r?void 0:r();if(null!=n&&null!=a)throw new Error("Cannot use both `transportId` and `filter` at the same time");let s=e;if(n){if(e[It]!==n)return[!0];s=e.data}return!1===a?[!0]:[!1,s]}(a,{transportId:n,filter:()=>null==r?void 0:r(t)});s||e(i)},s.addEventListener("message",o)},unregisterHandler(){o&&s.removeEventListener("message",o)}}}const Ft={debug:(...e)=>{},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)}},$t="undefined"!=typeof window&&window.Logger||Ft;var Lt,Mt=Object.defineProperty,Dt=(e,t)=>Mt(e,"name",{value:t,configurable:!0}),Ut=(Lt=function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Lt,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):Lt);function zt(e){return!isNaN(parseFloat(e))&&isFinite(e)}function qt(e){return e.charAt(0).toUpperCase()+e.substring(1)}function Vt(e){return function(){return this[e]}}Dt(zt,"_isNumber"),Dt(qt,"_capitalize"),Dt(Vt,"_getter");var Ht,Bt,Wt=["isConstructor","isEval","isNative","isToplevel"],Kt=["columnNumber","lineNumber"],Jt=["fileName","functionName","source"],Yt=Wt.concat(Kt,Jt,["args"],["evalOrigin"]);function Gt(e){if(e)for(var t=0;t<Yt.length;t++)void 0!==e[Yt[t]]&&this["set"+qt(Yt[t])](e[Yt[t]])}for(Dt(Gt,"StackFrame"),Gt.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof Gt)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new Gt(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:r?r+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},Gt.fromString=Dt((function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),r=e.substring(0,t),a=e.substring(t+1,n).split(","),s=e.substring(n+1);if(0===s.indexOf("@"))var i=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(s,""),o=i[1],d=i[2],c=i[3];return new Gt({functionName:r,args:a||void 0,fileName:o,lineNumber:d||void 0,columnNumber:c||void 0})}),"StackFrame$$fromString"),Ht=0;Ht<Wt.length;Ht++)Gt.prototype["get"+qt(Wt[Ht])]=Vt(Wt[Ht]),Gt.prototype["set"+qt(Wt[Ht])]=function(e){return function(t){this[e]=!!t}}(Wt[Ht]);for(Bt=0;Bt<Kt.length;Bt++)Gt.prototype["get"+qt(Kt[Bt])]=Vt(Kt[Bt]),Gt.prototype["set"+qt(Kt[Bt])]=function(e){return function(t){if(!zt(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(Kt[Bt]);for(Xt=0;Xt<Jt.length;Xt++)Gt.prototype["get"+qt(Jt[Xt])]=Vt(Jt[Xt]),Gt.prototype["set"+qt(Jt[Xt])]=function(e){return function(t){this[e]=String(t)}}(Jt[Xt]);var Xt,Qt=Gt;function en(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:Dt((function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")}),"ErrorStackParser$$parse"),extractLocation:Dt((function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]}),"ErrorStackParser$$extractLocation"),parseV8OrIE:Dt((function(t){return t.stack.split("\n").filter((function(t){return!!t.match(e)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;var r=this.extractLocation(n?n[1]:t),a=n&&t||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new Qt({functionName:a,fileName:s,lineNumber:r[1],columnNumber:r[2],source:e})}),this)}),"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:Dt((function(e){return e.stack.split("\n").filter((function(e){return!e.match(t)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Qt({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,a=this.extractLocation(e.replace(t,""));return new Qt({functionName:r,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:e})}),this)}),"ErrorStackParser$$parseFFOrSafari")}}Dt(en,"ErrorStackParser");var tn,nn,rn,an,sn,on,dn,cn,un,ln=new en,pn="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!process.browser,hn=pn&&typeof t<"u"&&typeof t.exports<"u"&&typeof Ut<"u"&&typeof __dirname<"u",mn=pn&&!hn,fn=typeof Deno<"u",yn=!pn&&!fn,gn=yn&&"object"==typeof window&&"object"==typeof document&&"function"==typeof document.createElement&&"sessionStorage"in window&&"function"!=typeof importScripts,vn=yn&&"function"==typeof importScripts&&"object"==typeof self;async function _n(){if(!pn||(tn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,an=await import("./__vite-browser-external-CIEyP2s7.js"),sn=await import("./__vite-browser-external-CIEyP2s7.js"),rn=(await import("./__vite-browser-external-CIEyP2s7.js")).default,nn=await import("./__vite-browser-external-CIEyP2s7.js"),dn=nn.sep,typeof Ut<"u"))return;let e={fs:an,crypto:await import("./__vite-browser-external-CIEyP2s7.js"),ws:await import("./__vite-browser-external-CIEyP2s7.js"),child_process:await import("./__vite-browser-external-CIEyP2s7.js")};globalThis.require=function(t){return e[t]}}function wn(e,t){return nn.resolve(t||".",e)}function bn(e,t){return void 0===t&&(t=location),new URL(e,t).toString()}function kn(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:sn.readFile(e).then((e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength)))}}function xn(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}async function Sn(e,t){let{response:n,binary:r}=cn(e,t);if(r)return r;let a=await n;if(!a.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await a.arrayBuffer())}if("object"==typeof navigator&&"string"==typeof navigator.userAgent&&-1==navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Safari"),Dt(_n,"initNodeModules"),Dt(wn,"node_resolvePath"),Dt(bn,"browser_resolvePath"),on=pn?wn:bn,pn||(dn="/"),Dt(kn,"node_getBinaryResponse"),Dt(xn,"browser_getBinaryResponse"),cn=pn?kn:xn,Dt(Sn,"loadBinaryFile"),gn)un=Dt((async e=>await import(e)),"loadScript");else if(vn)un=Dt((async e=>{try{globalThis.importScripts(e)}catch(t){if(!(t instanceof TypeError))throw t;await import(e)}}),"loadScript");else{if(!pn)throw new Error("Cannot determine runtime environment");un=Tn}async function Tn(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?rn.runInThisContext(await(await fetch(e)).text()):await import(tn.pathToFileURL(e).href)}async function En(e){if(pn){await _n();let t=await sn.readFile(e,{encoding:"utf8"});return JSON.parse(t)}return await(await fetch(e)).json()}async function On(){if(hn)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=ln.parse(e)[0].fileName;if(pn&&!t.startsWith("file://")&&(t=`file://${t}`),mn){let e=await import("./__vite-browser-external-CIEyP2s7.js");return(await import("./__vite-browser-external-CIEyP2s7.js")).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(dn);if(-1===n)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,n)}function Zn(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,a={DIR_MODE:16895,FILE_MODE:33279,mount:function(e){if(!e.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return n.mount.apply(null,arguments)},syncfs:async(e,t,n)=>{try{let r=a.getLocalSet(e),s=await a.getRemoteSet(e),i=t?s:r,o=t?r:s;await a.reconcile(e,i,o),n(null)}catch(r){n(r)}},getLocalSet:e=>{let n=Object.create(null);function a(e){return"."!==e&&".."!==e}function s(e){return t=>r.join2(e,t)}Dt(a,"isRealDir"),Dt(s,"toAbsolute");let i=t.readdir(e.mountpoint).filter(a).map(s(e.mountpoint));for(;i.length;){let e=i.pop(),r=t.stat(e);t.isDir(r.mode)&&i.push.apply(i,t.readdir(e).filter(a).map(s(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:"local",entries:n}},getRemoteSet:async e=>{let t=Object.create(null),n=await Nn(e.opts.fileSystemHandle);for(let[s,i]of n)"."!==s&&(t[r.join2(e.mountpoint,s)]={timestamp:"file"===i.kind?new Date((await i.getFile()).lastModified):new Date,mode:"file"===i.kind?a.FILE_MODE:a.DIR_MODE});return{type:"remote",entries:t,handles:n}},loadLocalEntry:e=>{let r=t.lookupPath(e).node,a=t.stat(e);if(t.isDir(a.mode))return{timestamp:a.mtime,mode:a.mode};if(t.isFile(a.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:a.mtime,mode:a.mode,contents:r.contents};throw new Error("node type not supported")},storeLocalEntry:(e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else{if(!t.isFile(n.mode))throw new Error("node type not supported");t.writeFile(e,n.contents,{canOwn:!0})}t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},removeLocalEntry:e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},loadRemoteEntry:async e=>{if("file"===e.kind){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:a.FILE_MODE,timestamp:new Date(t.lastModified)}}if("directory"===e.kind)return{mode:a.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+e.kind)},storeRemoteEntry:async(e,n,a)=>{let s=e.get(r.dirname(n)),i=t.isFile(a.mode)?await s.getFileHandle(r.basename(n),{create:!0}):await s.getDirectoryHandle(r.basename(n),{create:!0});if("file"===i.kind){let e=await i.createWritable();await e.write(a.contents),await e.close()}e.set(n,i)},removeRemoteEntry:async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},reconcile:async(e,n,s)=>{let i=0,o=[];Object.keys(n.entries).forEach((function(e){let r=n.entries[e],a=s.entries[e];(!a||t.isFile(r.mode)&&r.timestamp.getTime()>a.timestamp.getTime())&&(o.push(e),i++)})),o.sort();let d=[];if(Object.keys(s.entries).forEach((function(e){n.entries[e]||(d.push(e),i++)})),d.sort().reverse(),!i)return;let c="remote"===n.type?n.handles:s.handles;for(let t of o){let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);if("local"===s.type){let e=c.get(n),r=await a.loadRemoteEntry(e);a.storeLocalEntry(t,r)}else{let e=a.loadLocalEntry(t);await a.storeRemoteEntry(c,n,e)}}for(let t of d)if("local"===s.type)a.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);await a.removeRemoteEntry(c,n)}}};e.FS.filesystems.NATIVEFS_ASYNC=a}Dt(Tn,"nodeLoadScript"),Dt(En,"loadLockFile"),Dt(On,"calculateDirname"),Dt(Zn,"initializeNativeFS");var Nn=Dt((async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),"directory"===r.kind&&await n(r)}Dt(n,"collect"),await n(e);let r=new Map;r.set(".",e);for(let a of t){let t=(await e.resolve(a)).join("/");r.set(t,a)}return r}),"getFsHandles");function jn(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Rn(e),quit(e,n){throw t.exited={status:e,toThrow:n},n},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:t=>e.indexURL+t,instantiateWasm:Fn(e.indexURL)};return t}function Pn(e){return function(t){try{t.FS.mkdirTree(e)}catch(n){console.error(`Error occurred while making a home directory '${e}':`),console.error(n),console.error("Using '/' for a home directory instead"),e="/"}t.FS.chdir(e)}}function An(e){return function(t){Object.assign(t.ENV,e)}}function Cn(e){return e?[async t=>{t.addRunDependency("fsInitHook");try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency("fsInitHook")}}]:[]}function In(e){let t=Sn(e);return async e=>{let n=e._py_version_major(),r=e._py_version_minor();e.FS.mkdirTree("/lib"),e.API.sitePackages=`/lib/python${n}.${r}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency("install-stdlib");try{let a=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,a)}catch(a){console.error("Error occurred while installing the standard library:"),console.error(a)}finally{e.removeRunDependency("install-stdlib")}}}function Rn(e){let t;return t=null!=e.stdLibURL?e.stdLibURL:e.indexURL+"python_stdlib.zip",[...Cn(e.fsInit),In(t),Pn(e.env.HOME),An(e.env),Zn]}function Fn(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:n}=cn(e+"pyodide.asm.wasm");return function(e,r){return async function(){try{let a;a=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:s,module:i}=a;r(s,i)}catch(a){console.warn("wasm instantiation failed!"),console.warn(a)}}(),{}}}Dt(jn,"createSettings"),Dt(Pn,"createHomeDirectory"),Dt(An,"setEnvironment"),Dt(Cn,"callFsInitHook"),Dt(In,"installStdlib"),Dt(Rn,"getFileSystemInitializationFuncs"),Dt(Fn,"getInstantiateWasmFunc");var $n="0.27.5";async function Ln(e={}){var t,n;await _n();let r=e.indexURL||await On();r=on(r),r.endsWith("/")||(r+="/"),e.indexURL=r;let a={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:r+"pyodide-lock.json",args:[],env:{},packageCacheDir:r,packages:[],enableRunUntilComplete:!1,checkAPIVersion:!0,BUILD_ID:"bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4"},s=Object.assign(a,e);(t=s.env).HOME??(t.HOME="/home/pyodide"),(n=s.env).PYTHONINSPECT??(n.PYTHONINSPECT="1");let i,o=jn(s),d=o.API;if(d.lockFilePromise=En(s.lockFileURL),"function"!=typeof _createPyodideModule){let e=`${s.indexURL}pyodide.asm.js`;await un(e)}if(e._loadSnapshot){let t=await e._loadSnapshot;i=ArrayBuffer.isView(t)?t:new Uint8Array(t),o.noInitialRun=!0,o.INITIAL_MEMORY=i.length}let c,u=await _createPyodideModule(o);if(o.exited)throw o.exited.toThrow;if(e.pyproxyToStringRepr&&d.setPyProxyToStringMethod(!0),d.version!==$n&&s.checkAPIVersion)throw new Error(`Pyodide version does not match: '${$n}' <==> '${d.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);u.locateFile=e=>{throw new Error("Didn't expect to load any more file_packager files!")},i&&(c=d.restoreSnapshot(i));let l=d.finalizeBootstrap(c,e._snapshotDeserializer);return d.sys.path.insert(0,d.config.env.HOME),l.version.includes("dev")||d.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${l.version}/full/`),d._pyodide.set_excepthook(),await d.packageIndexReady,d.initializeStreams(s.stdin,s.stdout,s.stderr),l}function Mn(e){return e.FS}Dt(Ln,"loadPyodide");const Dn=e=>(new TextDecoder).decode(e),Un="notebook.py",zn="/marimo",qn=Un,Vn=e=>{const t=Mn(e);try{t.mkdirTree(zn)}catch{}t.chdir(zn)},Hn=e=>{Mn(e).mount(e.FS.filesystems.IDBFS,{root:"."},zn)},Bn=async e=>{await Yn(e,!0)},Wn=async e=>{await Yn(e,!1)},Kn=e=>{const t=Mn(e),n=`${zn}/${Un}`;return Dn(t.readFile(n))},Jn=e=>{const{pyodide:t,filename:n,code:r}=e,a=Mn(t);if(n&&n!==Un){const e=(e=>{try{return Dn(a.readFile(e))}catch{return null}})(n);if(e)return{code:e,filename:n}}return a.writeFile(Un,r),{code:r,filename:Un}};function Yn(e,t){return new Promise(((n,r)=>{Mn(e).syncfs(t,(e=>{e instanceof Error?r(e):n()}))}))}const Gn=new class{constructor(){this.spans=[]}startSpan(e,t={}){const n={name:e,startTime:Date.now(),attributes:t,end:(e="ok")=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t="ok"){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){const r=this.startSpan(t||e.name,n);try{const t=e();return this.endSpan(r),t}catch(a){throw this.endSpan(r,"error"),a}}wrapAsync(e,t,n={}){return async(...r)=>{const a=this.startSpan(t||e.name,n);try{const t=await e(...r);return this.endSpan(a),t}catch(s){throw this.endSpan(a,"error"),s}}}logSpans(){}};globalThis.t=Gn;class Xn{constructor(){this.pyodide=null}get requirePyodide(){return function(e,t){if(!e)throw new Error(t)}(this.pyodide,"Pyodide not loaded"),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!Ln)throw new Error("loadPyodide is not defined");const t=Gn.startSpan("loadPyodide");try{const n=await Ln({packages:["micropip","marimo-base","Markdown","pymdown-extensions","narwhals","packaging"],_makeSnapshot:!1,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`});return this.pyodide=n,t.end("ok"),n}catch(n){throw $t.error("Failed to load Pyodide",n),n}}async mountFilesystem(e){const t=Gn.startSpan("mountFilesystem");return Vn(this.requirePyodide),Hn(this.requirePyodide),await Bn(this.requirePyodide),t.end("ok"),Jn({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){const{code:t,filename:n,onMessage:r,queryParameters:a,userConfig:s}=e;self.messenger={callback:r},self.query_params=a,self.user_config=s;const i=Gn.startSpan("startSession.runPython"),o=n||qn,[d,c,u]=this.requirePyodide.runPython(`\n print("[py] Starting marimo...")\n import asyncio\n import js\n from marimo._pyodide.bootstrap import create_session, instantiate\n\n assert js.messenger, "messenger is not defined"\n assert js.query_params, "query_params is not defined"\n\n session, bridge = create_session(\n filename="${o}",\n query_params=js.query_params.to_py(),\n message_callback=js.messenger.callback,\n user_config=js.user_config.to_py(),\n )\n\n def init(auto_instantiate=True):\n instantiate(session, auto_instantiate)\n asyncio.create_task(session.start())\n\n # Find the packages to install\n with open("${o}", "r") as f:\n packages = session.find_packages(f.read())\n\n bridge, init, packages`);i.end();const l=new Set(u.toJs());return this.loadNotebookDeps(t,l).then((()=>c(s.runtime.auto_instantiate))),d}async loadNotebookDeps(e,t){const n=this.requirePyodide;e.includes("mo.sql")&&(e="import sqlglot\n"+(e="import duckdb\n"+(e=`import pandas\n${e}`))).includes("polars")&&(e=`import pyarrow\n${e}`),e="import pyodide_http\n"+(e="import jedi\n"+(e="import pygments\n"+(e=`import docutils\n${e}`)));const r=[...t];let a=Gn.startSpan("pyodide.loadPackage");await n.loadPackagesFromImports(e,{errorCallback:$t.error,messageCallback:$t.log}),a.end(),a=Gn.startSpan("micropip.install");const s=r.filter((e=>!n.loadedPackages[e]));s.length>0&&await n.runPythonAsync(`\n import micropip\n import sys\n # Filter out builtins\n missing = [p for p in ${JSON.stringify(s)} if p not in sys.modules]\n if len(missing) > 0:\n print("Loading from micropip:", missing)\n await micropip.install(missing)\n `).catch((e=>{$t.error("Failed to load packages from micropip",e)})),a.end()}}const Qn=async function(){var e;try{const t=self.name,n=function(e){return e.includes("dev"),`v${$n}`}(t),r=await async function(e){try{return await import(`/wasm/controller.js?version=${e}`)}catch{return new Xn}}(t);self.controller=r,self.pyodide=await r.bootstrap({version:t,pyodideVersion:n}),await(null==(e=r.mountFilesystem)?void 0:e.call(r,{code:"",filename:null})),tr.send.initialized({})}catch(t){$t.error("Error bootstrapping",t),tr.send.initializedError({error:jt(t)})}}(),er={readFile:async e=>(await Qn,Dn(self.pyodide.FS.readFile(e))),readNotebook:async()=>(await Qn,Kn(self.pyodide)),saveNotebook:async e=>{await Qn;const t=self.pyodide.runPython("\n from marimo._pyodide.bootstrap import save_file\n\n save_file\n ");await t(JSON.stringify(e),qn),await Wn(self.pyodide)}},tr=function(e){return Ct(e)}({transport:(nr={transportId:"marimo-transport"},Rt(self,nr)),requestHandler:er});var nr;tr.send("ready",{})}},function(){return t||(0,e[n(e)[0]])((t={exports:{}}).exports,t),t.exports});export default r();
@@ -1 +1 @@
1
- var c="comment",x="string",b="symbol",l="atom",v="number",y="bracket";function k(e){for(var t={},n=e.split(" "),a=0;a<n.length;++a)t[n[a]]=!0;return t}var w=k("\u03BB case-lambda call/cc class cond-expand define-class define-values exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax define-macro defmacro delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),S=k("define let letrec let* lambda define-macro defmacro let-syntax letrec-syntax let-values let*-values define-syntax syntax-rules define-values when unless");function q(e,t,n){this.indent=e,this.type=t,this.prev=n}function u(e,t,n){e.indentStack=new q(t,n,e.indentStack)}var Q=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),C=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),$=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),R=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);function U(e){return e.match(Q)}function W(e){return e.match(C)}function m(e,t){return t===!0&&e.backUp(1),e.match(R)}function z(e){return e.match($)}function E(e,t){for(var n,a=!1;(n=e.next())!=null;){if(n==t.token&&!a){t.state.mode=!1;break}a=!a&&n=="\\"}}const I={name:"scheme",startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1,sExprQuote:!1}},token:function(e,t){if(t.indentStack==null&&e.sol()&&(t.indentation=e.indentation()),e.eatSpace())return null;var n=null;switch(t.mode){case"string":E(e,{token:'"',state:t}),n=x;break;case"symbol":E(e,{token:"|",state:t}),n=b;break;case"comment":for(var a,p=!1;(a=e.next())!=null;){if(a=="#"&&p){t.mode=!1;break}p=a=="|"}n=c;break;case"s-expr-comment":if(t.mode=!1,e.peek()!="("&&e.peek()!="["){e.eatWhile(/[^\s\(\)\[\]]/),n=c;break}t.sExprComment=0;default:var r=e.next();if(r=='"')t.mode="string",n=x;else if(r=="'")e.peek()=="("||e.peek()=="["?(typeof t.sExprQuote!="number"&&(t.sExprQuote=0),n=l):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),n=l);else if(r=="|")t.mode="symbol",n=b;else if(r=="#")if(e.eat("|"))t.mode="comment",n=c;else if(e.eat(/[tf]/i))n=l;else if(e.eat(";"))t.mode="s-expr-comment",n=c;else{var i=null,d=!1,f=!0;e.eat(/[ei]/i)?d=!0:e.backUp(1),e.match(/^#b/i)?i=U:e.match(/^#o/i)?i=W:e.match(/^#x/i)?i=z:e.match(/^#d/i)?i=m:e.match(/^[-+0-9.]/,!1)?(f=!1,i=m):d||e.eat("#"),i!=null&&(f&&!d&&e.match(/^#[ei]/i),i(e)&&(n=v))}else if(/^[-+0-9.]/.test(r)&&m(e,!0))n=v;else if(r==";")e.skipToEnd(),n=c;else if(r=="("||r=="["){for(var h,s="",o=e.column();(h=e.eat(/[^\s\(\[\;\)\]]/))!=null;)s+=h;s.length>0&&S.propertyIsEnumerable(s)?u(t,o+2,r):(e.eatSpace(),e.eol()||e.peek()==";"?u(t,o+1,r):u(t,o+e.current().length,r)),e.backUp(e.current().length-1),typeof t.sExprComment=="number"&&t.sExprComment++,typeof t.sExprQuote=="number"&&t.sExprQuote++,n=y}else r==")"||r=="]"?(n=y,t.indentStack!=null&&t.indentStack.type==(r==")"?"(":"[")&&(function(g){g.indentStack=g.indentStack.prev}(t),typeof t.sExprComment=="number"&&--t.sExprComment==0&&(n=c,t.sExprComment=!1),typeof t.sExprQuote=="number"&&--t.sExprQuote==0&&(n=l,t.sExprQuote=!1))):(e.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),n=w&&w.propertyIsEnumerable(e.current())?"builtin":"variable")}return typeof t.sExprComment=="number"?c:typeof t.sExprQuote=="number"?l:n},indent:function(e){return e.indentStack==null?e.indentation:e.indentStack.indent},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:";;"}}};export{I as scheme};
1
+ var e="comment",t="string",n="symbol",r="atom",a="number",i="bracket";function s(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var c=s("λ case-lambda call/cc class cond-expand define-class define-values exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax define-macro defmacro delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),l=s("define let letrec let* lambda define-macro defmacro let-syntax letrec-syntax let-values let*-values define-syntax syntax-rules define-values when unless");function o(e,t,n){this.indent=e,this.type=t,this.prev=n}function d(e,t,n){e.indentStack=new o(t,n,e.indentStack)}var u=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),m=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),p=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),f=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);function h(e){return e.match(u)}function g(e){return e.match(m)}function x(e,t){return!0===t&&e.backUp(1),e.match(f)}function b(e){return e.match(p)}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==t.token&&!r){t.state.mode=!1;break}r=!r&&"\\"==n}}const k={name:"scheme",startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1,sExprQuote:!1}},token:function(s,o){if(null==o.indentStack&&s.sol()&&(o.indentation=s.indentation()),s.eatSpace())return null;var u=null;switch(o.mode){case"string":v(s,{token:'"',state:o}),u=t;break;case"symbol":v(s,{token:"|",state:o}),u=n;break;case"comment":for(var m,p=!1;null!=(m=s.next());){if("#"==m&&p){o.mode=!1;break}p="|"==m}u=e;break;case"s-expr-comment":if(o.mode=!1,"("!=s.peek()&&"["!=s.peek()){s.eatWhile(/[^\s\(\)\[\]]/),u=e;break}o.sExprComment=0;default:var f=s.next();if('"'==f)o.mode="string",u=t;else if("'"==f)"("==s.peek()||"["==s.peek()?("number"!=typeof o.sExprQuote&&(o.sExprQuote=0),u=r):(s.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),u=r);else if("|"==f)o.mode="symbol",u=n;else if("#"==f)if(s.eat("|"))o.mode="comment",u=e;else if(s.eat(/[tf]/i))u=r;else if(s.eat(";"))o.mode="s-expr-comment",u=e;else{var k=null,y=!1,w=!0;s.eat(/[ei]/i)?y=!0:s.backUp(1),s.match(/^#b/i)?k=h:s.match(/^#o/i)?k=g:s.match(/^#x/i)?k=b:s.match(/^#d/i)?k=x:s.match(/^[-+0-9.]/,!1)?(w=!1,k=x):y||s.eat("#"),null!=k&&(w&&!y&&s.match(/^#[ei]/i),k(s)&&(u=a))}else if(/^[-+0-9.]/.test(f)&&x(s,!0))u=a;else if(";"==f)s.skipToEnd(),u=e;else if("("==f||"["==f){for(var E,S="",q=s.column();null!=(E=s.eat(/[^\s\(\[\;\)\]]/));)S+=E;S.length>0&&l.propertyIsEnumerable(S)?d(o,q+2,f):(s.eatSpace(),s.eol()||";"==s.peek()?d(o,q+1,f):d(o,q+s.current().length,f)),s.backUp(s.current().length-1),"number"==typeof o.sExprComment&&o.sExprComment++,"number"==typeof o.sExprQuote&&o.sExprQuote++,u=i}else")"==f||"]"==f?(u=i,null!=o.indentStack&&o.indentStack.type==(")"==f?"(":"[")&&(!function(e){e.indentStack=e.indentStack.prev}(o),"number"==typeof o.sExprComment&&0==--o.sExprComment&&(u=e,o.sExprComment=!1),"number"==typeof o.sExprQuote&&0==--o.sExprQuote&&(u=r,o.sExprQuote=!1))):(s.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),u=c&&c.propertyIsEnumerable(s.current())?"builtin":"variable")}return"number"==typeof o.sExprComment?e:"number"==typeof o.sExprQuote?r:u},indent:function(e){return null==e.indentStack?e.indentation:e.indentStack.indent},languageData:{closeBrackets:{brackets:["(","[","{",'"']},commentTokens:{line:";;"}}};export{k as scheme};