thursday-agent 0.9.0 → 0.11.0

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 (320) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +0 -1
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +0 -6
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  13. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +1 -1
  15. package/.next/server/app/_not-found.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  19. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  24. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  26. package/.next/server/app/api/config/route.js.nft.json +1 -1
  27. package/.next/server/app/api/events/route.js.nft.json +1 -1
  28. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  29. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  30. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  31. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  32. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  33. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  34. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  36. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  37. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  38. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  39. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  40. package/.next/server/app/api/reach/route.js +13 -13
  41. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  42. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  43. package/.next/server/app/api/signins/route.js +1 -1
  44. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  45. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  47. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  48. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  49. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  50. package/.next/server/app/api/thursday/tool-call/route.js +14 -15
  51. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  52. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  53. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  54. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  55. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  56. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  58. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  59. package/.next/server/app/page/server-reference-manifest.json +56 -56
  60. package/.next/server/app/page.js +4 -4
  61. package/.next/server/app/page.js.nft.json +1 -1
  62. package/.next/server/app/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app-paths-manifest.json +0 -1
  64. package/.next/server/chunks/[root-of-the-server]__014ydvq._.js +2 -2
  65. package/.next/server/chunks/[root-of-the-server]__0209ah4._.js +7 -5
  66. package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +4 -2
  67. package/.next/server/chunks/[root-of-the-server]__0542v_d._.js +3 -0
  68. package/.next/server/chunks/[root-of-the-server]__0gewdg9._.js +2 -2
  69. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__1-swlkw._.js +2 -2
  71. package/.next/server/chunks/[root-of-the-server]__12iddfq._.js +1 -1
  72. package/.next/server/chunks/[root-of-the-server]__1ai5lme._.js +3 -3
  73. package/.next/server/chunks/[root-of-the-server]__1cjxw0-._.js +2 -2
  74. package/.next/server/chunks/{[root-of-the-server]__1fy2g82._.js → [root-of-the-server]__1k3j52n._.js} +1 -1
  75. package/.next/server/chunks/[root-of-the-server]__1kyjt5m._.js +3 -3
  76. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  77. package/.next/server/chunks/_05v8k21._.js +3 -1
  78. package/.next/server/chunks/_0awtznl._.js +1 -1
  79. package/.next/server/chunks/_0na2fj1._.js +1 -1
  80. package/.next/server/chunks/_0x-ej3f._.js +17 -17
  81. package/.next/server/chunks/_12-amdu._.js +2 -2
  82. package/.next/server/chunks/_15740dw._.js +60 -0
  83. package/.next/server/chunks/_1dc_d1q._.js +3 -3
  84. package/.next/server/chunks/_1i350l5._.js +3 -1
  85. package/.next/server/chunks/_1jc5g4p._.js +2 -2
  86. package/.next/server/chunks/_1jn-aep._.js +4 -4
  87. package/.next/server/chunks/_1m88lkh._.js +11 -11
  88. package/.next/server/chunks/_1ogqovh._.js +4 -4
  89. package/.next/server/chunks/_1uuucy-._.js +1 -1
  90. package/.next/server/chunks/_1zxp-p6._.js +1 -1
  91. package/.next/server/chunks/features_0rfvely._.js +5 -3
  92. package/.next/server/chunks/ssr/{[root-of-the-server]__1se25x0._.js → [root-of-the-server]__0hpp3nw._.js} +29 -13
  93. package/.next/server/chunks/ssr/[root-of-the-server]__0m7u9j-._.js +3 -0
  94. package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +24 -60
  95. package/.next/server/chunks/ssr/[root-of-the-server]__1cz2rz5._.js +3 -0
  96. package/.next/server/chunks/ssr/{[root-of-the-server]__0tvavy9._.js → [root-of-the-server]__1iwyp1e._.js} +1 -1
  97. package/.next/server/chunks/ssr/[root-of-the-server]__1w9hqq8._.js +1 -1
  98. package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
  99. package/.next/server/chunks/ssr/{_1tmu8z-._.js → _0btzccu._.js} +2 -2
  100. package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
  101. package/.next/server/chunks/ssr/_0hjzb5o._.js +3 -0
  102. package/.next/server/chunks/ssr/_0ld9_qq._.js +1 -1
  103. package/.next/server/chunks/ssr/{_0urj3mc._.js → _0ouzu9f._.js} +2 -2
  104. package/.next/server/chunks/ssr/{_1-zyvdb._.js → _0u7ko71._.js} +2 -2
  105. package/.next/server/chunks/ssr/{_0ltz2q5._.js → _0wd_o8-._.js} +2 -2
  106. package/.next/server/chunks/ssr/_0ya0cb0._.js +3 -0
  107. package/.next/server/chunks/ssr/_10yyqtk._.js +67 -0
  108. package/.next/server/chunks/ssr/{_1uy0xom._.js → _12eyown._.js} +3 -3
  109. package/.next/server/chunks/ssr/_12mijol._.js +11 -11
  110. package/.next/server/chunks/ssr/_132qkfz._.js +1 -1
  111. package/.next/server/chunks/ssr/_184327j._.js +1 -1
  112. package/.next/server/chunks/ssr/{_1z74dmq._.js → _19ps4p3._.js} +7 -7
  113. package/.next/server/chunks/ssr/{_1flbs77._.js → _1bhy4yg._.js} +2 -2
  114. package/.next/server/chunks/ssr/_1d423aj._.js +7 -5
  115. package/.next/server/chunks/ssr/{_1a-nuxx._.js → _1kd843u._.js} +2 -2
  116. package/.next/server/chunks/ssr/{_0ital-2._.js → _1kq2ye_._.js} +2 -2
  117. package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
  118. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  119. package/.next/server/chunks/ssr/_1p8xorg._.js +3 -0
  120. package/.next/server/chunks/ssr/{_1x-kojb._.js → _1q683w8._.js} +3 -3
  121. package/.next/server/chunks/ssr/_1tawxu2._.js +3 -0
  122. package/.next/server/chunks/ssr/{_0scf7xy._.js → _1w2oba6._.js} +2 -2
  123. package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
  124. package/.next/server/chunks/ssr/{_0kjj5ts._.js → _1ybo1hd._.js} +3 -3
  125. package/.next/server/chunks/ssr/features_bot_0s11m4r._.js +3 -0
  126. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  127. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  128. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  129. package/.next/server/chunks/ssr/features_workspace_00jz2hu._.js +1 -1
  130. package/.next/server/chunks/ssr/{node_modules_1af3w91._.js → node_modules_00pocul._.js} +1 -1
  131. package/.next/server/chunks/ssr/{node_modules_0th357h._.js → node_modules_02zt4az._.js} +1 -1
  132. package/.next/server/chunks/ssr/{node_modules_0jljel9._.js → node_modules_05ojmcl._.js} +1 -1
  133. package/.next/server/chunks/ssr/{node_modules_0wnlddw._.js → node_modules_06i6bli._.js} +1 -1
  134. package/.next/server/chunks/ssr/{node_modules_06bb4q8._.js → node_modules_09dj429._.js} +1 -1
  135. package/.next/server/chunks/ssr/{node_modules_068ws5v._.js → node_modules_0auzgvx._.js} +1 -1
  136. package/.next/server/chunks/ssr/{node_modules_1ogczzz._.js → node_modules_0evjwh1._.js} +1 -1
  137. package/.next/server/chunks/ssr/{node_modules_13kwejm._.js → node_modules_0gmdur8._.js} +1 -1
  138. package/.next/server/chunks/ssr/{node_modules_1s-gb-1._.js → node_modules_0j3te-1._.js} +1 -1
  139. package/.next/server/chunks/ssr/{node_modules_1bucjlk._.js → node_modules_0rbaymq._.js} +1 -1
  140. package/.next/server/chunks/ssr/{node_modules_1wbkzl9._.js → node_modules_0tf8_1e._.js} +1 -1
  141. package/.next/server/chunks/ssr/{node_modules_12et8d5._.js → node_modules_0yqy-0b._.js} +1 -1
  142. package/.next/server/chunks/ssr/{node_modules_1lkix61._.js → node_modules_1-53ebx._.js} +1 -1
  143. package/.next/server/chunks/ssr/{node_modules_03d0rfz._.js → node_modules_1-y9aho._.js} +1 -1
  144. package/.next/server/chunks/ssr/{node_modules_0x630an._.js → node_modules_11bltzp._.js} +1 -1
  145. package/.next/server/chunks/ssr/{node_modules_0uyh_vb._.js → node_modules_18jn2qo._.js} +1 -1
  146. package/.next/server/chunks/ssr/{node_modules_0dzm4um._.js → node_modules_1_te3bu._.js} +1 -1
  147. package/.next/server/chunks/ssr/{node_modules_07rs_p2._.js → node_modules_1c0pg3k._.js} +1 -1
  148. package/.next/server/chunks/ssr/{node_modules_0sgy-dc._.js → node_modules_1en2jx5._.js} +1 -1
  149. package/.next/server/chunks/ssr/{node_modules_0ubdtk-._.js → node_modules_1p-c8cr._.js} +1 -1
  150. package/.next/server/chunks/ssr/{node_modules_1z1lrbk._.js → node_modules_1qe-oxg._.js} +1 -1
  151. package/.next/server/chunks/ssr/{node_modules_04_sbbc._.js → node_modules_1rjt833._.js} +1 -1
  152. package/.next/server/chunks/ssr/{node_modules_0yvz9e0._.js → node_modules_1tzw5sn._.js} +1 -1
  153. package/.next/server/chunks/ssr/{node_modules_1uwg-gz._.js → node_modules_1x6uwvn._.js} +1 -1
  154. package/.next/server/chunks/ssr/{node_modules_0t_ez6-._.js → node_modules_1zqddke._.js} +1 -1
  155. package/.next/server/chunks/ssr/{node_modules_05ybmta._.js → node_modules_211zgim._.js} +1 -1
  156. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0r443fh._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0y51bqj._.js} +1 -1
  157. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10wnlbk._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1sc114e._.js} +1 -1
  158. package/.next/server/middleware-build-manifest.js +3 -3
  159. package/.next/server/pages/404.html +1 -1
  160. package/.next/server/pages/500.html +1 -1
  161. package/.next/server/server-reference-manifest.js +1 -1
  162. package/.next/server/server-reference-manifest.json +57 -57
  163. package/.next/static/chunks/{13ixzheqw7o-w.js → 03-724sj0nk_z.js} +2 -2
  164. package/.next/static/chunks/03bhu4mk8en2q.js +1 -0
  165. package/.next/static/chunks/{3h2e-xv1zxh_f.js → 04imzjhvzw65d.js} +2 -2
  166. package/.next/static/chunks/{27tvv1i-smrck.js → 0gljzv9fz1g7d.js} +1 -1
  167. package/.next/static/chunks/{37j27b3e1gt7r.js → 0h0lythv1ql93.js} +1 -1
  168. package/.next/static/chunks/{2o4dndk0d68do.js → 0hzbj7f48cmx0.js} +1 -1
  169. package/.next/static/chunks/0lwunwbl7u7pt.js +1 -0
  170. package/.next/static/chunks/{0u9ae9k_2g7k3.js → 0r6nwxg4dv83t.js} +1 -1
  171. package/.next/static/chunks/0rn9nbg6aif9f.js +17 -0
  172. package/.next/static/chunks/{3bbzsitgiltnt.js → 0x_w4shtvrrfg.js} +1 -1
  173. package/.next/static/chunks/{2sdwbfs1x5skp.js → 0ympuji_ufypd.js} +1 -1
  174. package/.next/static/chunks/{3t9huugh-5_ps.js → 0zmrz4zfzm4dt.js} +1 -1
  175. package/.next/static/chunks/{0qmd8n52hp-6v.js → 11tlxkr7a_rpc.js} +1 -1
  176. package/.next/static/chunks/{2c64drdevdla3.js → 12scesro428m7.js} +2 -2
  177. package/.next/static/chunks/16s2fx3890_jd.js +65 -0
  178. package/.next/static/chunks/{0oyz95sujd2c7.js → 1qzfgplyo18tc.js} +1 -1
  179. package/.next/static/chunks/{04e-e--5lk26x.js → 1r4zajz14jp9-.js} +1 -1
  180. package/.next/static/chunks/1s6m4cmbn7htf.js +1 -0
  181. package/.next/static/chunks/1wl9t1-3i-q8p.css +1 -0
  182. package/.next/static/chunks/2-asot3p1j3yg.js +1 -0
  183. package/.next/static/chunks/{0u3ktztrzu1fa.js → 2-jn4xscbm-i2.js} +1 -1
  184. package/.next/static/chunks/22h9gvclqtx_2.js +1 -0
  185. package/.next/static/chunks/{337g9g_ux2gj-.js → 26-eblxwnykck.js} +1 -1
  186. package/.next/static/chunks/{43q9cgbuw8krx.js → 2kzwhbuobpkw3.js} +2 -2
  187. package/.next/static/chunks/2m6jd3586ijb-.js +1 -0
  188. package/.next/static/chunks/{0_awn8tucznxc.js → 304q9p54tcgm1.js} +1 -1
  189. package/.next/static/chunks/{1u5i-jti87jbo.js → 35wdx3wt7cg4a.js} +1 -1
  190. package/.next/static/chunks/37unh9460im7v.js +18 -0
  191. package/.next/static/chunks/{01xjer0i_e5z5.js → 39gj5vxz1zpm_.js} +1 -1
  192. package/.next/static/chunks/{427qsc6kahxyo.js → 39vrqy1r_00jc.js} +1 -1
  193. package/.next/static/chunks/{245hb85nsy6j4.js → 3dipmu0mptqum.js} +1 -1
  194. package/.next/static/chunks/3gki-squw28yu.js +1 -0
  195. package/.next/static/chunks/{3obf9n3cxj99k.js → 3jvldk2wvwbge.js} +1 -1
  196. package/.next/static/chunks/{38301ji-85i30.js → 3nnzdl_te20hv.js} +1 -1
  197. package/.next/static/chunks/{2m267diam_vib.js → 3tz4dr0_8pq1-.js} +1 -1
  198. package/.next/static/chunks/{2gocl3dq0_h1s.js → 3x6pggb-2kyrk.js} +1 -1
  199. package/.next/static/chunks/{025bmrgeukcb2.js → 4440mws9jz3mt.js} +1 -1
  200. package/README.md +4 -0
  201. package/app/api/thursday/tool-call/route.ts +1 -15
  202. package/components/ui/radio-group.tsx +2 -2
  203. package/docs/images/demo-still.jpg +0 -0
  204. package/docs/live-calls.md +19 -11
  205. package/features/ai/prompts/live.prompt.ts +51 -26
  206. package/features/ai/prompts/prompt-helper.ts +1 -9
  207. package/features/ai/prompts/thursday.prompt.ts +8 -2
  208. package/features/bot/bot.run.ts +9 -3
  209. package/features/bot/bot.seed.ts +35 -91
  210. package/features/bot/components/bot-room.tsx +0 -6
  211. package/features/bot/components/bot-setting.tsx +4 -4
  212. package/features/bot/components/room-pill.tsx +4 -2
  213. package/features/bot/seed-bots.ts +2 -2
  214. package/features/intro/components/intro.tsx +2 -3
  215. package/features/reach/reach.ts +2 -2
  216. package/features/routine/components/routine-setting.tsx +1 -1
  217. package/features/signins/signins.query.ts +66 -1
  218. package/features/thursday/components/side-captions.tsx +31 -8
  219. package/features/thursday/components/thursday-setting.tsx +5 -5
  220. package/features/thursday/components/thursday.tsx +97 -39
  221. package/features/thursday/components/write-line.tsx +28 -17
  222. package/features/thursday/thursday.action.ts +4 -20
  223. package/features/thursday/thursday.schema.ts +0 -9
  224. package/features/thursday/thursday.store.ts +11 -15
  225. package/features/thursday/thursday.text.ts +10 -8
  226. package/features/thursday/tool-line.ts +17 -6
  227. package/features/thursday/use-call-ring.ts +1 -5
  228. package/features/thursday/use-text-call.ts +37 -21
  229. package/features/thursday/use-thursday.ts +14 -44
  230. package/features/workspace/workspace.ts +4 -2
  231. package/guide/bots.md +13 -3
  232. package/guide/calls.md +7 -5
  233. package/knip.json +1 -0
  234. package/lib/live/live.session.ts +0 -39
  235. package/package.json +1 -1
  236. package/scripts/live-session.test.mts +19 -26
  237. package/seed-skills/analyst/README.md +18 -0
  238. package/seed-skills/analyst/data-report/SKILL.md +60 -0
  239. package/seed-skills/analyst/data-report/references/brief.md +31 -0
  240. package/seed-skills/analyst/data-report/references/company.md +41 -0
  241. package/seed-skills/analyst/data-report/references/comparison.md +42 -0
  242. package/seed-skills/analyst/data-report/references/decision.md +28 -0
  243. package/seed-skills/analyst/data-report/references/market-size.md +49 -0
  244. package/seed-skills/analyst/data-report/references/price-check.md +33 -0
  245. package/seed-skills/analyst/data-report/references/sources.md +51 -0
  246. package/seed-skills/analyst/data-report/references/trend.md +39 -0
  247. package/seed-skills/analyst/data-report/scripts/fetch.mjs +521 -0
  248. package/seed-skills/insta/instagram/SKILL.md +36 -0
  249. package/seed-skills/insta/instagram/references/dm.md +49 -0
  250. package/seed-skills/insta/instagram/references/post.md +74 -0
  251. package/seed-skills/insta/instagram/scripts/compose.mjs +333 -0
  252. package/seed-skills/insta/instagram/scripts/inbox.mjs +163 -0
  253. package/seed-skills/insta/instagram/scripts/lib.mjs +33 -0
  254. package/seed-skills/insta/instagram/scripts/media.mjs +104 -0
  255. package/seed-skills/insta/instagram/scripts/profile.mjs +143 -0
  256. package/seed-skills/insta/instagram/scripts/read.mjs +244 -0
  257. package/seed-skills/insta/instagram/scripts/search.mjs +137 -0
  258. package/seed-skills/insta/instagram/scripts/selectors.mjs +56 -0
  259. package/seed-skills/insta/instagram/scripts/sheet.mjs +43 -0
  260. package/seed-skills/insta/instagram/templates/carousel.html +62 -0
  261. package/seed-skills/marketer/README.md +6 -4
  262. package/seed-skills/marketer/copywriting/SKILL.md +1 -1
  263. package/seed-skills/marketer/emails/SKILL.md +1 -1
  264. package/seed-skills/marketer/launch/SKILL.md +1 -1
  265. package/seed-skills/marketer/product-marketing/SKILL.md +5 -5
  266. package/seed-skills/marketer/seo-audit/SKILL.md +1 -1
  267. package/seed-skills/marketer/social/SKILL.md +1 -1
  268. package/seed-skills/tutor/picture-book/SKILL.md +16 -0
  269. package/seed-skills/tutor/picture-book/book/book.css +181 -0
  270. package/seed-skills/tutor/picture-book/book/book.html +33 -0
  271. package/seed-skills/tutor/picture-book/book/book.js +60 -0
  272. package/seed-skills/tutor/picture-book/references/picture-book.md +104 -0
  273. package/seed-skills/tutor/picture-book/scripts/book-video.mjs +177 -0
  274. package/seed-skills/tutor/picture-book/scripts/book.mjs +98 -0
  275. package/skills/browser/SKILL.md +13 -4
  276. package/skills/browser/references/scripts.md +55 -0
  277. package/skills/browser/scripts/image-size.mjs +30 -0
  278. package/skills/browser/scripts/render.mjs +126 -0
  279. package/skills/browser/scripts/session.mjs +105 -0
  280. package/skills/browser/scripts/sheet.mjs +97 -0
  281. package/skills/browser/scripts/webimage.mjs +105 -0
  282. package/skills/interactive-page/SKILL.md +4 -3
  283. package/skills/interactive-page/scripts/chart.mjs +679 -0
  284. package/skills/interactive-page/scripts/page.mjs +1 -0
  285. package/.next/server/app/api/probe/route/app-paths-manifest.json +0 -3
  286. package/.next/server/app/api/probe/route/build-manifest.json +0 -12
  287. package/.next/server/app/api/probe/route/server-reference-manifest.json +0 -4
  288. package/.next/server/app/api/probe/route.js +0 -10
  289. package/.next/server/app/api/probe/route.js.map +0 -5
  290. package/.next/server/app/api/probe/route.js.nft.json +0 -1
  291. package/.next/server/app/api/probe/route_client-reference-manifest.js +0 -3
  292. package/.next/server/chunks/[root-of-the-server]__012s2o8._.js +0 -3
  293. package/.next/server/chunks/[root-of-the-server]__0z0hc1f._.js +0 -4
  294. package/.next/server/chunks/[root-of-the-server]__1v7-zke._.js +0 -5
  295. package/.next/server/chunks/_0whlpyi._.js +0 -4
  296. package/.next/server/chunks/_next-internal_server_app_api_probe_route_actions_0cqd30j.js +0 -3
  297. package/.next/server/chunks/ssr/[root-of-the-server]__0oo-wlv._.js +0 -103
  298. package/.next/server/chunks/ssr/[root-of-the-server]__0zuns7e._.js +0 -3
  299. package/.next/server/chunks/ssr/_070nv1_._.js +0 -3
  300. package/.next/server/chunks/ssr/_0dshsh4._.js +0 -3
  301. package/.next/server/chunks/ssr/_0l_mcfz._.js +0 -3
  302. package/.next/server/chunks/ssr/_0u5xv6g._.js +0 -3
  303. package/.next/server/chunks/ssr/_157yfrk._.js +0 -3
  304. package/.next/server/chunks/ssr/features_bot_1nr94ks._.js +0 -3
  305. package/.next/static/chunks/06nt9tatr-dug.js +0 -1
  306. package/.next/static/chunks/0ge-hx0ed83a1.js +0 -1
  307. package/.next/static/chunks/0pda_vf-abwvx.js +0 -1
  308. package/.next/static/chunks/0rowp9rx3qbxu.js +0 -18
  309. package/.next/static/chunks/1grkt5gr8pbg1.js +0 -17
  310. package/.next/static/chunks/1yugpvvi8qrbu.js +0 -101
  311. package/.next/static/chunks/27lkanxvtdn09.js +0 -1
  312. package/.next/static/chunks/3fec-aeteddr-.js +0 -1
  313. package/.next/static/chunks/3go3hwp1z2_h2.css +0 -1
  314. package/.next/static/chunks/3h2bun3hcggg8.js +0 -1
  315. package/.next/static/chunks/3j1y335o95mj7.js +0 -1
  316. package/lib/probe.server.ts +0 -17
  317. package/lib/probe.ts +0 -55
  318. /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_buildManifest.js +0 -0
  319. /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_clientMiddlewareManifest.js +0 -0
  320. /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,447804,600104,872200,722914,826157,693158,48114,851262,363823,992536,226619,381142,700357,163018,885812,647608,342919,991085,568482,532780,338489,t=>{"use strict";var e,i=t.i(60231),n=t.i(508324),s=t.i(419524),o=t.i(139941);function r(t,e,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6)}function h(t){this._context=t}function a(t){return new h(t)}function _(){}function c(t){this._context=t}function l(t){this._context=t}t.i(947716),h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},t.s(["curveBasis",0,a],600104),c.prototype={areaStart:_,areaEnd:_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:r(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,n):this._context.moveTo(i,n);break;case 3:this._point=4;default:r(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class u{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function f(t){return new u(t,!0)}function y(t){return new u(t,!1)}function x(t,e){this._basis=new h(t),this._beta=e}t.s(["curveBumpX",0,f],872200),t.s(["curveBumpY",0,y],722914),x.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,i=t.length-1;if(i>0)for(var n,s=t[0],o=e[0],r=t[i]-s,h=e[i]-o,a=-1;++a<=i;)n=a/i,this._basis.point(this._beta*t[a]+(1-this._beta)*(s+n*r),this._beta*e[a]+(1-this._beta)*(o+n*h));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};let p=function t(e){function i(t){return 1===e?new h(t):new x(t,e)}return i.beta=function(e){return t(+e)},i}(.85);function d(t,e,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function g(t,e){this._context=t,this._k=(1-e)/6}g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:d(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:d(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let b=function t(e){function i(t){return new g(t,e)}return i.tension=function(e){return t(+e)},i}(0);function m(t,e){this._context=t,this._k=(1-e)/6}m.prototype={areaStart:_,areaEnd:_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:d(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let v=function t(e){function i(t){return new m(t,e)}return i.tension=function(e){return t(+e)},i}(0);function w(t,e){this._context=t,this._k=(1-e)/6}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:d(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let T=function t(e){function i(t){return new w(t,e)}return i.tension=function(e){return t(+e)},i}(0);t.s(["curveCardinal",0,b],826157);var S=t.i(810199);function j(t,e,i){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>S.epsilon){var h=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*h-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,s=(s*h-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>S.epsilon){var _=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*_+t._x1*t._l23_2a-e*t._l12_2a)/c,r=(r*_+t._y1*t._l23_2a-i*t._l12_2a)/c}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function A(t,e){this._context=t,this._alpha=e}A.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var i=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:j(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let N=function t(e){function i(t){return e?new A(t,e):new g(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function M(t,e){this._context=t,this._alpha=e}M.prototype={areaStart:_,areaEnd:_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t*=1,e*=1,this._point){var i=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:j(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let E=function t(e){function i(t){return e?new M(t,e):new m(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function O(t,e){this._context=t,this._alpha=e}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var i=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:j(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let k=function t(e){function i(t){return e?new O(t,e):new w(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function P(t){this._context=t}function B(t){return new P(t)}function $(t){this._context=t}t.s(["curveCatmullRom",0,N],693158),P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},t.s(["default",0,B],48114),t.s(["curveLinear",0,B],851262),$.prototype={areaStart:_,areaEnd:_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function C(t,e,i){var n=t._x1-t._x0,s=e-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(i-t._y1)/(s||n<0&&-0);return((o<0?-1:1)+(r<0?-1:1))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs((o*s+r*n)/(n+s)))||0}function D(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function I(t,e,i){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,h=(o-n)/3;t._context.bezierCurveTo(n+h,s+h*e,o-h,r-h*i,o,r)}function R(t){this._context=t}function z(t){this._context=new F(t)}function F(t){this._context=t}function W(t){return new R(t)}function U(t){return new z(t)}function H(t){this._context=t}function L(t){var e,i,n=t.length-1,s=Array(n),o=Array(n),r=Array(n);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],e=1;e<n-1;++e)s[e]=1,o[e]=4,r[e]=4*t[e]+2*t[e+1];for(s[n-1]=2,o[n-1]=7,r[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=s[e]/o[e-1],o[e]-=i,r[e]-=i*r[e-1];for(s[n-1]=r[n-1]/o[n-1],e=n-2;e>=0;--e)s[e]=(r[e]-s[e+1])/o[e];for(o[n-1]=(t[n]+s[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-s[e+1];return[s,o]}function V(t){return new H(t)}function q(t,e){this._context=t,this._t=e}function X(t){return new q(t,.5)}function Y(t){return new q(t,0)}function K(t){return new q(t,1)}R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:I(this,this._t0,D(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var i=NaN;if(e*=1,(t*=1)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,I(this,D(this,i=C(this,t,e)),i);break;default:I(this,this._t0,i=C(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}},(z.prototype=Object.create(R.prototype)).point=function(t,e){R.prototype.point.call(this,e,t)},F.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,i,n,s,o){this._context.bezierCurveTo(e,t,n,i,o,s)}},t.s(["curveMonotoneX",0,W],363823),t.s(["curveMonotoneY",0,U],992536),H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===i)this._context.lineTo(t[1],e[1]);else for(var n=L(t),s=L(e),o=0,r=1;r<i;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],e[r]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},t.s(["curveNatural",0,V],226619),q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}}this._x=t,this._y=e}},t.s(["curveStep",0,X],381142),t.s(["curveStepAfter",0,K],700357),t.s(["curveStepBefore",0,Y],163018);var J=t.i(723685);function G(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");let i=function(...n){let s=e?e.apply(this,n):n[0],o=i.cache;if(o.has(s))return o.get(s);let r=t.apply(this,n);return i.cache=o.set(s,r)||o,r};return i.cache=new(G.Cache||Map),i}function Z(){}function Q(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function tt(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function te(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}G.Cache=Map,t.s(["isPrimitive",0,Q],885812);let ti="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||t.g||function(){return this}();function tn(t){return void 0!==ti.Buffer&&ti.Buffer.isBuffer(t)}function ts(t){if("object"!=typeof t||null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){let e=t[Symbol.toStringTag];return null!=e&&!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function to(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}t.s(["isBuffer",0,tn],647608),t.s(["getTag",0,to],342919);let tr="[object RegExp]",th="[object String]",ta="[object Number]",t_="[object Boolean]",tc="[object Arguments]",tl="[object Symbol]",tu="[object Date]",tf="[object Map]",ty="[object Set]",tx="[object Array]",tp="[object ArrayBuffer]",td="[object Object]",tg="[object DataView]",tb="[object Uint8Array]",tm="[object Uint8ClampedArray]",tv="[object Uint16Array]",tw="[object Uint32Array]",tT="[object Int8Array]",tS="[object Int16Array]",tj="[object Int32Array]",tA="[object Float32Array]",tN="[object Float64Array]";function tM(t,e,i,n=new Map,s){let o=s?.(t,e,i,n);if(void 0!==o)return o;if(Q(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){let e=Array(t.length);n.set(t,e);for(let o=0;o<t.length;o++)e[o]=tM(t[o],o,i,n,s);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){let e=new Map;for(let[o,r]of(n.set(t,e),t))e.set(o,tM(r,o,i,n,s));return e}if(t instanceof Set){let e=new Set;for(let o of(n.set(t,e),t))e.add(tM(o,void 0,i,n,s));return e}if(tn(t))return t.subarray();if(tt(t)){let e=new(Object.getPrototypeOf(t)).constructor(t.length);n.set(t,e);for(let o=0;o<t.length;o++)e[o]=tM(t[o],o,i,n,s);return e}if(t instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,e),tE(e,t,i,n,s),e}if("u">typeof File&&t instanceof File){let e=new File([t],t.name,{type:t.type});return n.set(t,e),tE(e,t,i,n,s),e}if("u">typeof Blob&&t instanceof Blob){let e=new Blob([t],{type:t.type});return n.set(t,e),tE(e,t,i,n,s),e}if(t instanceof Error){let e=structuredClone(t);return n.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,tE(e,t,i,n,s),e}if(t instanceof Boolean){let e=new Boolean(t.valueOf());return n.set(t,e),tE(e,t,i,n,s),e}if(t instanceof Number){let e=new Number(t.valueOf());return n.set(t,e),tE(e,t,i,n,s),e}if(t instanceof String){let e=new String(t.valueOf());return n.set(t,e),tE(e,t,i,n,s),e}if("object"==typeof t&&function(t){switch(to(t)){case tc:case tx:case tp:case tg:case t_:case tu:case tA:case tN:case tT:case tS:case tj:case tf:case ta:case td:case tr:case ty:case th:case tl:case tb:case tm:case tv:case tw:return!0;default:return!1}}(t)){let e=Object.create(Object.getPrototypeOf(t));return n.set(t,e),tE(e,t,i,n,s),e}return t}function tE(t,e,i=t,n,s){let o=[...Object.keys(e),...te(e)];for(let r=0;r<o.length;r++){let h=o[r],a=Object.getOwnPropertyDescriptor(t,h);(null==a||a.writable)&&(t[h]=tM(e[h],h,i,n,s))}}function tO(t){var e;return e=(e,i,n,s)=>{let o;if(void 0!==o)return o;if("object"==typeof t){if("[object Object]"===to(t)&&"function"!=typeof t.constructor){let e={};return s.set(t,e),tE(e,t,n,s),e}switch(Object.prototype.toString.call(t)){case ta:case th:case t_:{let e=new t.constructor(t?.valueOf());return tE(e,t),e}case tc:{let e={};return tE(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}},tM(t,void 0,t,new Map,e)}function tk(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===to(t)}function tP(t){return"object"==typeof t&&null!==t}function tB(t){var e;return null!=t&&"function"!=typeof t&&Number.isSafeInteger(e=t.length)&&e>=0}function t$(t){return tt(t)}t.s(["argumentsTag",0,tc,"arrayBufferTag",0,tp,"arrayTag",0,tx,"booleanTag",0,t_,"dataViewTag",0,tg,"dateTag",0,tu,"float32ArrayTag",0,tA,"float64ArrayTag",0,tN,"int16ArrayTag",0,tS,"int32ArrayTag",0,tj,"int8ArrayTag",0,tT,"mapTag",0,tf,"numberTag",0,ta,"objectTag",0,td,"regexpTag",0,tr,"setTag",0,ty,"stringTag",0,th,"symbolTag",0,tl,"uint16ArrayTag",0,tv,"uint32ArrayTag",0,tw,"uint8ArrayTag",0,tb,"uint8ClampedArrayTag",0,tm],991085),t.s(["isArguments",0,tk],568482),t.s(["isArrayLike",0,tB],532780),t.s(["isTypedArray",0,t$],338489);var tC={curveBasis:a,curveBasisClosed:function(t){return new c(t)},curveBasisOpen:function(t){return new l(t)},curveBumpX:f,curveBumpY:y,curveBundle:p,curveCardinalClosed:v,curveCardinalOpen:T,curveCardinal:b,curveCatmullRomClosed:E,curveCatmullRomOpen:k,curveCatmullRom:N,curveLinear:B,curveLinearClosed:function(t){return new $(t)},curveMonotoneX:W,curveMonotoneY:U,curveNatural:V,curveStep:X,curveStepAfter:K,curveStepBefore:Y},tD=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,tI=(0,s.__name)(function(t,e){let n=tR(t,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(n)){let t=n.map(t=>t.args);(0,i.sanitizeDirective)(t),s=(0,i.assignWithDepth_default)(s,[...t])}else s=n.args;if(!s)return;let o=(0,i.detectType)(t,e),r="config";return void 0!==s[r]&&("flowchart-v2"===o&&(o="flowchart"),s[o]=s[r],delete s[r]),s},"detectInit"),tR=(0,s.__name)(function(t,e=null){try{let s,o=RegExp(`[%]{2}(?![{]${tD.source})(?=[}][%]{2}).*
2
- `,"ig");t=t.trim().replace(o,"").replace(/'/gm,'"'),n.log.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);let r=[];for(;null!==(s=i.directiveRegex.exec(t));)if(s.index===i.directiveRegex.lastIndex&&i.directiveRegex.lastIndex++,s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let t=s[1]?s[1]:s[2],e=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;r.push({type:t,args:e})}if(0===r.length)return{type:t,args:null};return 1===r.length?r[0]:r}catch(i){return n.log.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),tz=(0,s.__name)(function(t){return t.replace(i.directiveRegex,"")},"removeDirectives"),tF=(0,s.__name)(function(t,e){for(let[i,n]of e.entries())if(n.match(t))return i;return -1},"isSubstringInArray");function tW(t,e){return t?tC[`curve${t.charAt(0).toUpperCase()+t.slice(1)}`]??e:e}function tU(t,e){let i=t.trim();if(i)return"loose"!==e.securityLevel?(0,o.sanitizeUrl)(i):i}(0,s.__name)(tW,"interpolateToCurve"),(0,s.__name)(tU,"formatUrl");var tH=(0,s.__name)((t,...e)=>{let i=t.split("."),s=i.length-1,o=i[s],r=window;for(let e=0;e<s;e++)if(!(r=r[i[e]]))return void n.log.error(`Function name: ${t} not found in window`);r[o](...e)},"runFunc");function tL(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function tV(t){let e,i=0;return t.forEach(t=>{i+=tL(t,e),e=t}),tY(t,i/2)}function tq(t){return 1===t.length?t[0]:tV(t)}(0,s.__name)(tL,"distance"),(0,s.__name)(tV,"traverseEdge"),(0,s.__name)(tq,"calcLabelPosition");var tX=(0,s.__name)((t,e=2)=>{let i=Math.pow(10,e);return Math.round(t*i)/i},"roundNumber"),tY=(0,s.__name)((t,e)=>{let i,n=e;for(let e of t){if(i){let t=tL(e,i);if(0===t)return i;if(t<n)n-=t;else{let s=n/t;if(s<=0)return i;if(s>=1)return{x:e.x,y:e.y};if(s>0&&s<1)return{x:tX((1-s)*i.x+s*e.x,5),y:tX((1-s)*i.y+s*e.y,5)}}}i=e}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),tK=(0,s.__name)((t,e,i)=>{n.log.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());let s=tY(e,25),o=t?10:5,r=Math.atan2(e[0].y-s.y,e[0].x-s.x),h={x:0,y:0};return h.x=Math.sin(r)*o+(e[0].x+s.x)/2,h.y=-Math.cos(r)*o+(e[0].y+s.y)/2,h},"calcCardinalityPosition");function tJ(t,e,i){let s=structuredClone(i);n.log.info("our points",s),"start_left"!==e&&"start_right"!==e&&s.reverse();let o=tY(s,25+t),r=10+.5*t,h=Math.atan2(s[0].y-o.y,s[0].x-o.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(h+Math.PI)*r+(s[0].x+o.x)/2,a.y=-Math.cos(h+Math.PI)*r+(s[0].y+o.y)/2):"end_right"===e?(a.x=Math.sin(h-Math.PI)*r+(s[0].x+o.x)/2-5,a.y=-Math.cos(h-Math.PI)*r+(s[0].y+o.y)/2-5):"end_left"===e?(a.x=Math.sin(h)*r+(s[0].x+o.x)/2-5,a.y=-Math.cos(h)*r+(s[0].y+o.y)/2-5):(a.x=Math.sin(h)*r+(s[0].x+o.x)/2,a.y=-Math.cos(h)*r+(s[0].y+o.y)/2),a}function tG(t){let e="",i="";for(let n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?i=i+n+";":e=e+n+";");return{style:e,labelStyle:i}}(0,s.__name)(tJ,"calcTerminalLabelPosition"),(0,s.__name)(tG,"getStylesFromArray");var tZ=0,tQ=(0,s.__name)(()=>(tZ++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tZ),"generateId");function t0(t){let e="",i="0123456789abcdef",n=i.length;for(let s=0;s<t;s++)e+=i.charAt(Math.floor(Math.random()*n));return e}(0,s.__name)(t0,"makeRandomHex");var t1=(0,s.__name)(t=>t0(t.length),"random"),t2=(0,s.__name)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),t3=(0,s.__name)(function(t,e){let n=e.text.replace(i.common_default.lineBreakRegex," "),[,s]=en(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);let r=o.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.attr("fill",e.fill),r.text(n),o},"drawSimpleText"),t4=G((t,e,n)=>{if(!t||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),i.common_default.lineBreakRegex.test(t)))return t;let s=t.split(" ").filter(Boolean),o=[],r="";return s.forEach((t,i)=>{let h=t8(`${t} `,n),a=t8(r,n);if(h>e){let{hyphenatedStrings:i,remainingWord:s}=t5(t,e,"-",n);o.push(r,...i),r=s}else a+h>=e?(o.push(r),r=t):r=[r,t].filter(Boolean).join(" ");i+1===s.length&&o.push(r)}),o.filter(t=>""!==t).join(n.joinWith)},(t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),t5=G((t,e,i="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let s=[...t],o=[],r="";return s.forEach((t,h)=>{let a=`${r}${t}`;if(t8(a,n)>=e){let t=s.length===h+1,e=`${a}${i}`;o.push(t?a:e),r=""}else r=a}),{hyphenatedStrings:o,remainingWord:r}},(t,e,i="-",n)=>`${t}${e}${i}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function t6(t,e){return t9(t,e).height}function t8(t,e){return t9(t,e).width}(0,s.__name)(t6,"calculateTextHeight"),(0,s.__name)(t8,"calculateTextWidth");var t9=G((t,e)=>{let{fontSize:n=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};let[,r]=en(n),h=t.split(i.common_default.lineBreakRegex),a=[],_=(0,J.select)("body");if(!_.remove)return{width:0,height:0,lineHeight:0};let c=_.append("svg");for(let t of["sans-serif",s]){let e=0,i={width:0,height:0,lineHeight:0};for(let n of h){let s=t2();s.text=n||"​";let h=t3(c,s).style("font-size",r).style("font-weight",o).style("font-family",t),a=(h._groups||h)[0][0].getBBox();if(0===a.width&&0===a.height)throw Error("svg element not in render tree");i.width=Math.round(Math.max(i.width,a.width)),e=Math.round(a.height),i.height+=e,i.lineHeight=Math.round(Math.max(i.lineHeight,e))}a.push(i)}c.remove();let l=isNaN(a[1].height)||isNaN(a[1].width)||isNaN(a[1].lineHeight)||a[0].height>a[1].height&&a[0].width>a[1].width&&a[0].lineHeight>a[1].lineHeight?0:1;return a[l]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),t7=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,s.__name)(this,"InitIDGenerator")}},et=(0,s.__name)(function(t){return e=e||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),e.innerHTML=t,unescape(e.textContent)},"entityDecode");function ee(t){return"str"in t}(0,s.__name)(ee,"isDetailedError");var ei=(0,s.__name)((t,e,i,n)=>{if(!n)return;let s=t.node()?.getBBox();s&&t.append("text").text(n).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-i).attr("class",e)},"insertTitle"),en=(0,s.__name)(t=>{if("number"==typeof t)return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function es(t,e){return function(t,...e){return function(t,...e){let i=e.slice(0,-1),n=e[e.length-1],s=t;for(let t=0;t<i.length;t++)s=function t(e,i,n,s){if(Q(e)&&(e=Object(e)),null==i||"object"!=typeof i)return e;if(s.has(i))return function(t){if(Q(t))return t;if(Array.isArray(t)||tt(t)||t instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);let e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);let i=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new i(t);if(t instanceof RegExp){let e=new i(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new i(t.buffer.slice(0));if(t instanceof Error){let e;return(e=t instanceof AggregateError?new i(t.errors,t.message,{cause:t.cause}):new i(t.message,{cause:t.cause})).stack=t.stack,Object.assign(e,t),e}return"u">typeof File&&t instanceof File?new i([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(s.get(i));if(s.set(i,e),Array.isArray(i)){i=i.slice();for(let t=0;t<i.length;t++)t in i||(i[t]=void 0)}let o=[...Object.keys(i),...te(i)];for(let h=0;h<o.length;h++){let a=o[h];if("__proto__"===a)continue;let _=i[a],c=e[a];if(tk(_)&&(_={..._}),tk(c)&&(c={...c}),tn(_)&&(_=tO(_)),Array.isArray(_))if(Array.isArray(c)){let t=[],e=Reflect.ownKeys(c);for(let i=0;i<e.length;i++){let n=e[i];t[n]=c[n]}c=t}else{var r;if(tP(r=c)&&tB(r)){let t=[];for(let e=0;e<c.length;e++)t[e]=c[e];c=t}else c=[]}let l=n(c,_,a,e,i,s);void 0!==l?e[a]=l:Array.isArray(_)||tP(c)&&tP(_)&&(ts(c)||ts(_)||t$(c)||t$(_))?e[a]=t(c,_,n,s):null==c&&ts(_)?e[a]=t({},_,n,s):null==c&&t$(_)?e[a]=tO(_):(void 0===c||void 0!==_)&&(e[a]=_)}return e}(s,i[t],n,new Map);return s}(t,...e,Z)}({},t,e)}(0,s.__name)(es,"cleanAndMerge");var eo={assignWithDepth:i.assignWithDepth_default,wrapLabel:t4,calculateTextHeight:t6,calculateTextWidth:t8,calculateTextDimensions:t9,cleanAndMerge:es,detectInit:tI,detectDirective:tR,isSubstringInArray:tF,interpolateToCurve:tW,calcLabelPosition:tq,calcCardinalityPosition:tK,calcTerminalLabelPosition:tJ,formatUrl:tU,getStylesFromArray:tG,generateId:tQ,random:t1,runFunc:tH,entityDecode:et,insertTitle:ei,isLabelCoordinateInPath:ec,parseFontSize:en,InitIDGenerator:t7},er=(0,s.__name)(function(t){let e=t;return(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){let e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},"encodeEntities"),eh=(0,s.__name)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),ea=(0,s.__name)((t,e,{counter:i=0,prefix:n,suffix:s},o)=>o||`${n?`${n}_`:""}${t}_${e}_${i}${s?`_${s}`:""}`,"getEdgeId");function e_(t){return t??null}function ec(t,e){let i=Math.round(t.x),n=Math.round(t.y),s=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return s.includes(i.toString())||s.includes(n.toString())}(0,s.__name)(e_,"handleUndefinedAttr"),(0,s.__name)(ec,"isLabelCoordinateInPath"),t.s(["ZERO_WIDTH_SPACE",0,"​","calculateTextDimensions",0,t9,"calculateTextHeight",0,t6,"calculateTextWidth",0,t8,"cleanAndMerge",0,es,"decodeEntities",0,eh,"encodeEntities",0,er,"generateId",0,tQ,"getEdgeId",0,ea,"getStylesFromArray",0,tG,"handleUndefinedAttr",0,e_,"interpolateToCurve",0,tW,"isDetailedError",0,ee,"parseFontSize",0,en,"random",0,t1,"removeDirectives",0,tz,"utils_default",0,eo,"wrapLabel",0,t4],447804)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,447804,600104,872200,722914,826157,693158,48114,851262,363823,992536,226619,381142,700357,163018,885812,647608,342919,991085,568482,532780,338489,t=>{"use strict";var e,i=t.i(60231),n=t.i(508324),s=t.i(419524),o=t.i(779879);function r(t,e,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6)}function h(t){this._context=t}function a(t){return new h(t)}function _(){}function c(t){this._context=t}function l(t){this._context=t}t.i(947716),h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:r(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:r(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},t.s(["curveBasis",0,a],600104),c.prototype={areaStart:_,areaEnd:_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:r(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,n):this._context.moveTo(i,n);break;case 3:this._point=4;default:r(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class u{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function f(t){return new u(t,!0)}function y(t){return new u(t,!1)}function x(t,e){this._basis=new h(t),this._beta=e}t.s(["curveBumpX",0,f],872200),t.s(["curveBumpY",0,y],722914),x.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,i=t.length-1;if(i>0)for(var n,s=t[0],o=e[0],r=t[i]-s,h=e[i]-o,a=-1;++a<=i;)n=a/i,this._basis.point(this._beta*t[a]+(1-this._beta)*(s+n*r),this._beta*e[a]+(1-this._beta)*(o+n*h));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};let p=function t(e){function i(t){return 1===e?new h(t):new x(t,e)}return i.beta=function(e){return t(+e)},i}(.85);function d(t,e,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function g(t,e){this._context=t,this._k=(1-e)/6}g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:d(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:d(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let b=function t(e){function i(t){return new g(t,e)}return i.tension=function(e){return t(+e)},i}(0);function m(t,e){this._context=t,this._k=(1-e)/6}m.prototype={areaStart:_,areaEnd:_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:d(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let v=function t(e){function i(t){return new m(t,e)}return i.tension=function(e){return t(+e)},i}(0);function w(t,e){this._context=t,this._k=(1-e)/6}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:d(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let T=function t(e){function i(t){return new w(t,e)}return i.tension=function(e){return t(+e)},i}(0);t.s(["curveCardinal",0,b],826157);var S=t.i(810199);function j(t,e,i){var n=t._x1,s=t._y1,o=t._x2,r=t._y2;if(t._l01_a>S.epsilon){var h=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*h-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,s=(s*h-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>S.epsilon){var _=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*_+t._x1*t._l23_2a-e*t._l12_2a)/c,r=(r*_+t._y1*t._l23_2a-i*t._l12_2a)/c}t._context.bezierCurveTo(n,s,o,r,t._x2,t._y2)}function A(t,e){this._context=t,this._alpha=e}A.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var i=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:j(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let N=function t(e){function i(t){return e?new A(t,e):new g(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function M(t,e){this._context=t,this._alpha=e}M.prototype={areaStart:_,areaEnd:_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t*=1,e*=1,this._point){var i=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:j(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let E=function t(e){function i(t){return e?new M(t,e):new m(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function O(t,e){this._context=t,this._alpha=e}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var i=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:j(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let k=function t(e){function i(t){return e?new O(t,e):new w(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function P(t){this._context=t}function B(t){return new P(t)}function $(t){this._context=t}t.s(["curveCatmullRom",0,N],693158),P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},t.s(["default",0,B],48114),t.s(["curveLinear",0,B],851262),$.prototype={areaStart:_,areaEnd:_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function C(t,e,i){var n=t._x1-t._x0,s=e-t._x1,o=(t._y1-t._y0)/(n||s<0&&-0),r=(i-t._y1)/(s||n<0&&-0);return((o<0?-1:1)+(r<0?-1:1))*Math.min(Math.abs(o),Math.abs(r),.5*Math.abs((o*s+r*n)/(n+s)))||0}function D(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function I(t,e,i){var n=t._x0,s=t._y0,o=t._x1,r=t._y1,h=(o-n)/3;t._context.bezierCurveTo(n+h,s+h*e,o-h,r-h*i,o,r)}function R(t){this._context=t}function z(t){this._context=new F(t)}function F(t){this._context=t}function W(t){return new R(t)}function U(t){return new z(t)}function H(t){this._context=t}function L(t){var e,i,n=t.length-1,s=Array(n),o=Array(n),r=Array(n);for(s[0]=0,o[0]=2,r[0]=t[0]+2*t[1],e=1;e<n-1;++e)s[e]=1,o[e]=4,r[e]=4*t[e]+2*t[e+1];for(s[n-1]=2,o[n-1]=7,r[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=s[e]/o[e-1],o[e]-=i,r[e]-=i*r[e-1];for(s[n-1]=r[n-1]/o[n-1],e=n-2;e>=0;--e)s[e]=(r[e]-s[e+1])/o[e];for(o[n-1]=(t[n]+s[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-s[e+1];return[s,o]}function V(t){return new H(t)}function q(t,e){this._context=t,this._t=e}function X(t){return new q(t,.5)}function Y(t){return new q(t,0)}function K(t){return new q(t,1)}R.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:I(this,this._t0,D(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var i=NaN;if(e*=1,(t*=1)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,I(this,D(this,i=C(this,t,e)),i);break;default:I(this,this._t0,i=C(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=i}}},(z.prototype=Object.create(R.prototype)).point=function(t,e){R.prototype.point.call(this,e,t)},F.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,i,n,s,o){this._context.bezierCurveTo(e,t,n,i,o,s)}},t.s(["curveMonotoneX",0,W],363823),t.s(["curveMonotoneY",0,U],992536),H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===i)this._context.lineTo(t[1],e[1]);else for(var n=L(t),s=L(e),o=0,r=1;r<i;++o,++r)this._context.bezierCurveTo(n[0][o],s[0][o],n[1][o],s[1][o],t[r],e[r]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},t.s(["curveNatural",0,V],226619),q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}}this._x=t,this._y=e}},t.s(["curveStep",0,X],381142),t.s(["curveStepAfter",0,K],700357),t.s(["curveStepBefore",0,Y],163018);var J=t.i(723685);function G(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");let i=function(...n){let s=e?e.apply(this,n):n[0],o=i.cache;if(o.has(s))return o.get(s);let r=t.apply(this,n);return i.cache=o.set(s,r)||o,r};return i.cache=new(G.Cache||Map),i}function Z(){}function Q(t){return null==t||"object"!=typeof t&&"function"!=typeof t}function tt(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function te(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}G.Cache=Map,t.s(["isPrimitive",0,Q],885812);let ti="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||t.g||function(){return this}();function tn(t){return void 0!==ti.Buffer&&ti.Buffer.isBuffer(t)}function ts(t){if("object"!=typeof t||null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){let e=t[Symbol.toStringTag];return null!=e&&!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function to(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}t.s(["isBuffer",0,tn],647608),t.s(["getTag",0,to],342919);let tr="[object RegExp]",th="[object String]",ta="[object Number]",t_="[object Boolean]",tc="[object Arguments]",tl="[object Symbol]",tu="[object Date]",tf="[object Map]",ty="[object Set]",tx="[object Array]",tp="[object ArrayBuffer]",td="[object Object]",tg="[object DataView]",tb="[object Uint8Array]",tm="[object Uint8ClampedArray]",tv="[object Uint16Array]",tw="[object Uint32Array]",tT="[object Int8Array]",tS="[object Int16Array]",tj="[object Int32Array]",tA="[object Float32Array]",tN="[object Float64Array]";function tM(t,e,i,n=new Map,s){let o=s?.(t,e,i,n);if(void 0!==o)return o;if(Q(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){let e=Array(t.length);n.set(t,e);for(let o=0;o<t.length;o++)e[o]=tM(t[o],o,i,n,s);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){let e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){let e=new Map;for(let[o,r]of(n.set(t,e),t))e.set(o,tM(r,o,i,n,s));return e}if(t instanceof Set){let e=new Set;for(let o of(n.set(t,e),t))e.add(tM(o,void 0,i,n,s));return e}if(tn(t))return t.subarray();if(tt(t)){let e=new(Object.getPrototypeOf(t)).constructor(t.length);n.set(t,e);for(let o=0;o<t.length;o++)e[o]=tM(t[o],o,i,n,s);return e}if(t instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){let e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,e),tE(e,t,i,n,s),e}if("u">typeof File&&t instanceof File){let e=new File([t],t.name,{type:t.type});return n.set(t,e),tE(e,t,i,n,s),e}if("u">typeof Blob&&t instanceof Blob){let e=new Blob([t],{type:t.type});return n.set(t,e),tE(e,t,i,n,s),e}if(t instanceof Error){let e=structuredClone(t);return n.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,tE(e,t,i,n,s),e}if(t instanceof Boolean){let e=new Boolean(t.valueOf());return n.set(t,e),tE(e,t,i,n,s),e}if(t instanceof Number){let e=new Number(t.valueOf());return n.set(t,e),tE(e,t,i,n,s),e}if(t instanceof String){let e=new String(t.valueOf());return n.set(t,e),tE(e,t,i,n,s),e}if("object"==typeof t&&function(t){switch(to(t)){case tc:case tx:case tp:case tg:case t_:case tu:case tA:case tN:case tT:case tS:case tj:case tf:case ta:case td:case tr:case ty:case th:case tl:case tb:case tm:case tv:case tw:return!0;default:return!1}}(t)){let e=Object.create(Object.getPrototypeOf(t));return n.set(t,e),tE(e,t,i,n,s),e}return t}function tE(t,e,i=t,n,s){let o=[...Object.keys(e),...te(e)];for(let r=0;r<o.length;r++){let h=o[r],a=Object.getOwnPropertyDescriptor(t,h);(null==a||a.writable)&&(t[h]=tM(e[h],h,i,n,s))}}function tO(t){var e;return e=(e,i,n,s)=>{let o;if(void 0!==o)return o;if("object"==typeof t){if("[object Object]"===to(t)&&"function"!=typeof t.constructor){let e={};return s.set(t,e),tE(e,t,n,s),e}switch(Object.prototype.toString.call(t)){case ta:case th:case t_:{let e=new t.constructor(t?.valueOf());return tE(e,t),e}case tc:{let e={};return tE(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}},tM(t,void 0,t,new Map,e)}function tk(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===to(t)}function tP(t){return"object"==typeof t&&null!==t}function tB(t){var e;return null!=t&&"function"!=typeof t&&Number.isSafeInteger(e=t.length)&&e>=0}function t$(t){return tt(t)}t.s(["argumentsTag",0,tc,"arrayBufferTag",0,tp,"arrayTag",0,tx,"booleanTag",0,t_,"dataViewTag",0,tg,"dateTag",0,tu,"float32ArrayTag",0,tA,"float64ArrayTag",0,tN,"int16ArrayTag",0,tS,"int32ArrayTag",0,tj,"int8ArrayTag",0,tT,"mapTag",0,tf,"numberTag",0,ta,"objectTag",0,td,"regexpTag",0,tr,"setTag",0,ty,"stringTag",0,th,"symbolTag",0,tl,"uint16ArrayTag",0,tv,"uint32ArrayTag",0,tw,"uint8ArrayTag",0,tb,"uint8ClampedArrayTag",0,tm],991085),t.s(["isArguments",0,tk],568482),t.s(["isArrayLike",0,tB],532780),t.s(["isTypedArray",0,t$],338489);var tC={curveBasis:a,curveBasisClosed:function(t){return new c(t)},curveBasisOpen:function(t){return new l(t)},curveBumpX:f,curveBumpY:y,curveBundle:p,curveCardinalClosed:v,curveCardinalOpen:T,curveCardinal:b,curveCatmullRomClosed:E,curveCatmullRomOpen:k,curveCatmullRom:N,curveLinear:B,curveLinearClosed:function(t){return new $(t)},curveMonotoneX:W,curveMonotoneY:U,curveNatural:V,curveStep:X,curveStepAfter:K,curveStepBefore:Y},tD=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,tI=(0,s.__name)(function(t,e){let n=tR(t,/(?:init\b)|(?:initialize\b)/),s={};if(Array.isArray(n)){let t=n.map(t=>t.args);(0,i.sanitizeDirective)(t),s=(0,i.assignWithDepth_default)(s,[...t])}else s=n.args;if(!s)return;let o=(0,i.detectType)(t,e),r="config";return void 0!==s[r]&&("flowchart-v2"===o&&(o="flowchart"),s[o]=s[r],delete s[r]),s},"detectInit"),tR=(0,s.__name)(function(t,e=null){try{let s,o=RegExp(`[%]{2}(?![{]${tD.source})(?=[}][%]{2}).*
2
+ `,"ig");t=t.trim().replace(o,"").replace(/'/gm,'"'),n.log.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);let r=[];for(;null!==(s=i.directiveRegex.exec(t));)if(s.index===i.directiveRegex.lastIndex&&i.directiveRegex.lastIndex++,s&&!e||e&&s[1]?.match(e)||e&&s[2]?.match(e)){let t=s[1]?s[1]:s[2],e=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;r.push({type:t,args:e})}if(0===r.length)return{type:t,args:null};return 1===r.length?r[0]:r}catch(i){return n.log.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),tz=(0,s.__name)(function(t){return t.replace(i.directiveRegex,"")},"removeDirectives"),tF=(0,s.__name)(function(t,e){for(let[i,n]of e.entries())if(n.match(t))return i;return -1},"isSubstringInArray");function tW(t,e){return t?tC[`curve${t.charAt(0).toUpperCase()+t.slice(1)}`]??e:e}function tU(t,e){let i=t.trim();if(i)return"loose"!==e.securityLevel?(0,o.sanitizeUrl)(i):i}(0,s.__name)(tW,"interpolateToCurve"),(0,s.__name)(tU,"formatUrl");var tH=(0,s.__name)((t,...e)=>{let i=t.split("."),s=i.length-1,o=i[s],r=window;for(let e=0;e<s;e++)if(!(r=r[i[e]]))return void n.log.error(`Function name: ${t} not found in window`);r[o](...e)},"runFunc");function tL(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function tV(t){let e,i=0;return t.forEach(t=>{i+=tL(t,e),e=t}),tY(t,i/2)}function tq(t){return 1===t.length?t[0]:tV(t)}(0,s.__name)(tL,"distance"),(0,s.__name)(tV,"traverseEdge"),(0,s.__name)(tq,"calcLabelPosition");var tX=(0,s.__name)((t,e=2)=>{let i=Math.pow(10,e);return Math.round(t*i)/i},"roundNumber"),tY=(0,s.__name)((t,e)=>{let i,n=e;for(let e of t){if(i){let t=tL(e,i);if(0===t)return i;if(t<n)n-=t;else{let s=n/t;if(s<=0)return i;if(s>=1)return{x:e.x,y:e.y};if(s>0&&s<1)return{x:tX((1-s)*i.x+s*e.x,5),y:tX((1-s)*i.y+s*e.y,5)}}}i=e}throw Error("Could not find a suitable point for the given distance")},"calculatePoint"),tK=(0,s.__name)((t,e,i)=>{n.log.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());let s=tY(e,25),o=t?10:5,r=Math.atan2(e[0].y-s.y,e[0].x-s.x),h={x:0,y:0};return h.x=Math.sin(r)*o+(e[0].x+s.x)/2,h.y=-Math.cos(r)*o+(e[0].y+s.y)/2,h},"calcCardinalityPosition");function tJ(t,e,i){let s=structuredClone(i);n.log.info("our points",s),"start_left"!==e&&"start_right"!==e&&s.reverse();let o=tY(s,25+t),r=10+.5*t,h=Math.atan2(s[0].y-o.y,s[0].x-o.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(h+Math.PI)*r+(s[0].x+o.x)/2,a.y=-Math.cos(h+Math.PI)*r+(s[0].y+o.y)/2):"end_right"===e?(a.x=Math.sin(h-Math.PI)*r+(s[0].x+o.x)/2-5,a.y=-Math.cos(h-Math.PI)*r+(s[0].y+o.y)/2-5):"end_left"===e?(a.x=Math.sin(h)*r+(s[0].x+o.x)/2-5,a.y=-Math.cos(h)*r+(s[0].y+o.y)/2-5):(a.x=Math.sin(h)*r+(s[0].x+o.x)/2,a.y=-Math.cos(h)*r+(s[0].y+o.y)/2),a}function tG(t){let e="",i="";for(let n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?i=i+n+";":e=e+n+";");return{style:e,labelStyle:i}}(0,s.__name)(tJ,"calcTerminalLabelPosition"),(0,s.__name)(tG,"getStylesFromArray");var tZ=0,tQ=(0,s.__name)(()=>(tZ++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tZ),"generateId");function t0(t){let e="",i="0123456789abcdef",n=i.length;for(let s=0;s<t;s++)e+=i.charAt(Math.floor(Math.random()*n));return e}(0,s.__name)(t0,"makeRandomHex");var t1=(0,s.__name)(t=>t0(t.length),"random"),t2=(0,s.__name)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),t3=(0,s.__name)(function(t,e){let n=e.text.replace(i.common_default.lineBreakRegex," "),[,s]=en(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",s),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);let r=o.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.attr("fill",e.fill),r.text(n),o},"drawSimpleText"),t4=G((t,e,n)=>{if(!t||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),i.common_default.lineBreakRegex.test(t)))return t;let s=t.split(" ").filter(Boolean),o=[],r="";return s.forEach((t,i)=>{let h=t6(`${t} `,n),a=t6(r,n);if(h>e){let{hyphenatedStrings:i,remainingWord:s}=t5(t,e,"-",n);o.push(r,...i),r=s}else a+h>=e?(o.push(r),r=t):r=[r,t].filter(Boolean).join(" ");i+1===s.length&&o.push(r)}),o.filter(t=>""!==t).join(n.joinWith)},(t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`),t5=G((t,e,i="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let s=[...t],o=[],r="";return s.forEach((t,h)=>{let a=`${r}${t}`;if(t6(a,n)>=e){let t=s.length===h+1,e=`${a}${i}`;o.push(t?a:e),r=""}else r=a}),{hyphenatedStrings:o,remainingWord:r}},(t,e,i="-",n)=>`${t}${e}${i}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function t8(t,e){return t9(t,e).height}function t6(t,e){return t9(t,e).width}(0,s.__name)(t8,"calculateTextHeight"),(0,s.__name)(t6,"calculateTextWidth");var t9=G((t,e)=>{let{fontSize:n=12,fontFamily:s="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};let[,r]=en(n),h=t.split(i.common_default.lineBreakRegex),a=[],_=(0,J.select)("body");if(!_.remove)return{width:0,height:0,lineHeight:0};let c=_.append("svg");for(let t of["sans-serif",s]){let e=0,i={width:0,height:0,lineHeight:0};for(let n of h){let s=t2();s.text=n||"​";let h=t3(c,s).style("font-size",r).style("font-weight",o).style("font-family",t),a=(h._groups||h)[0][0].getBBox();if(0===a.width&&0===a.height)throw Error("svg element not in render tree");i.width=Math.round(Math.max(i.width,a.width)),e=Math.round(a.height),i.height+=e,i.lineHeight=Math.round(Math.max(i.lineHeight,e))}a.push(i)}c.remove();let l=isNaN(a[1].height)||isNaN(a[1].width)||isNaN(a[1].lineHeight)||a[0].height>a[1].height&&a[0].width>a[1].width&&a[0].lineHeight>a[1].lineHeight?0:1;return a[l]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),t7=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,s.__name)(this,"InitIDGenerator")}},et=(0,s.__name)(function(t){return e=e||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),e.innerHTML=t,unescape(e.textContent)},"entityDecode");function ee(t){return"str"in t}(0,s.__name)(ee,"isDetailedError");var ei=(0,s.__name)((t,e,i,n)=>{if(!n)return;let s=t.node()?.getBBox();s&&t.append("text").text(n).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-i).attr("class",e)},"insertTitle"),en=(0,s.__name)(t=>{if("number"==typeof t)return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function es(t,e){return function(t,...e){return function(t,...e){let i=e.slice(0,-1),n=e[e.length-1],s=t;for(let t=0;t<i.length;t++)s=function t(e,i,n,s){if(Q(e)&&(e=Object(e)),null==i||"object"!=typeof i)return e;if(s.has(i))return function(t){if(Q(t))return t;if(Array.isArray(t)||tt(t)||t instanceof ArrayBuffer||"u">typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);let e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);let i=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new i(t);if(t instanceof RegExp){let e=new i(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new i(t.buffer.slice(0));if(t instanceof Error){let e;return(e=t instanceof AggregateError?new i(t.errors,t.message,{cause:t.cause}):new i(t.message,{cause:t.cause})).stack=t.stack,Object.assign(e,t),e}return"u">typeof File&&t instanceof File?new i([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(s.get(i));if(s.set(i,e),Array.isArray(i)){i=i.slice();for(let t=0;t<i.length;t++)t in i||(i[t]=void 0)}let o=[...Object.keys(i),...te(i)];for(let h=0;h<o.length;h++){let a=o[h];if("__proto__"===a)continue;let _=i[a],c=e[a];if(tk(_)&&(_={..._}),tk(c)&&(c={...c}),tn(_)&&(_=tO(_)),Array.isArray(_))if(Array.isArray(c)){let t=[],e=Reflect.ownKeys(c);for(let i=0;i<e.length;i++){let n=e[i];t[n]=c[n]}c=t}else{var r;if(tP(r=c)&&tB(r)){let t=[];for(let e=0;e<c.length;e++)t[e]=c[e];c=t}else c=[]}let l=n(c,_,a,e,i,s);void 0!==l?e[a]=l:Array.isArray(_)||tP(c)&&tP(_)&&(ts(c)||ts(_)||t$(c)||t$(_))?e[a]=t(c,_,n,s):null==c&&ts(_)?e[a]=t({},_,n,s):null==c&&t$(_)?e[a]=tO(_):(void 0===c||void 0!==_)&&(e[a]=_)}return e}(s,i[t],n,new Map);return s}(t,...e,Z)}({},t,e)}(0,s.__name)(es,"cleanAndMerge");var eo={assignWithDepth:i.assignWithDepth_default,wrapLabel:t4,calculateTextHeight:t8,calculateTextWidth:t6,calculateTextDimensions:t9,cleanAndMerge:es,detectInit:tI,detectDirective:tR,isSubstringInArray:tF,interpolateToCurve:tW,calcLabelPosition:tq,calcCardinalityPosition:tK,calcTerminalLabelPosition:tJ,formatUrl:tU,getStylesFromArray:tG,generateId:tQ,random:t1,runFunc:tH,entityDecode:et,insertTitle:ei,isLabelCoordinateInPath:ec,parseFontSize:en,InitIDGenerator:t7},er=(0,s.__name)(function(t){let e=t;return(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){let e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},"encodeEntities"),eh=(0,s.__name)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),ea=(0,s.__name)((t,e,{counter:i=0,prefix:n,suffix:s},o)=>o||`${n?`${n}_`:""}${t}_${e}_${i}${s?`_${s}`:""}`,"getEdgeId");function e_(t){return t??null}function ec(t,e){let i=Math.round(t.x),n=Math.round(t.y),s=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return s.includes(i.toString())||s.includes(n.toString())}(0,s.__name)(e_,"handleUndefinedAttr"),(0,s.__name)(ec,"isLabelCoordinateInPath"),t.s(["ZERO_WIDTH_SPACE",0,"​","calculateTextDimensions",0,t9,"calculateTextHeight",0,t8,"calculateTextWidth",0,t6,"cleanAndMerge",0,es,"decodeEntities",0,eh,"encodeEntities",0,er,"generateId",0,tQ,"getEdgeId",0,ea,"getStylesFromArray",0,tG,"handleUndefinedAttr",0,e_,"interpolateToCurve",0,tW,"isDetailedError",0,ee,"parseFontSize",0,en,"random",0,t1,"removeDirectives",0,tz,"utils_default",0,eo,"wrapLabel",0,t4],447804)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,660302,t=>{"use strict";var e=t.i(843476),n=t.i(647163);let r={muted:{under:"text-muted-foreground/60 dark:text-muted-foreground",band:"via-foreground"},waiting:{under:"text-amber-700/60 dark:text-amber-400",band:"via-amber-950 dark:via-amber-100"}};t.s(["ShinyText",0,function({text:t,tone:a="muted",speed:i=2.4,className:o}){let{under:s,band:u}=r[a];return(0,e.jsxs)("span",{"data-slot":"shiny-text",className:(0,n.cn)("relative inline-block max-w-full",s,o),children:[t,(0,e.jsx)("span",{"aria-hidden":!0,style:{animationDuration:`${i}s`},className:(0,n.cn)("pointer-events-none absolute inset-0 animate-shine overflow-hidden bg-linear-120 from-transparent from-35% via-50% to-transparent to-65% bg-size-[200%_auto] bg-clip-text text-transparent p-[inherit] select-none [text-overflow:inherit] motion-reduce:hidden",u),children:t})]})}])},319036,t=>{"use strict";var e=t.i(843476);t.i(924305);var n=t.i(271645),r=t.i(951437),a=t.i(828918),i=t.i(146376),o=t.i(502077),s=t.i(956789),u=t.i(552245),c=t.i(788015),d=t.i(540886),l=t.i(951849),f=t.i(133438),h=t.i(64350),g=t.i(469690),m=t.i(381104),b=t.i(884708),w=t.i(247778),p=t.i(31421),v=t.i(538489),x=t.i(675606),y=t.i(56434),k=t.i(606039);let M=n.forwardRef(function(t,M){let{checked:z,className:D,defaultChecked:S,"aria-labelledby":T,form:O,id:C,inputRef:E,name:P,nativeButton:Y=!1,onCheckedChange:N,readOnly:F=!1,required:H=!1,disabled:L=!1,render:q,uncheckedValue:R,value:j,style:B,...I}=t,{clearErrors:$}=(0,b.useFormContext)(),{state:W,setTouched:A,setDirty:G,validityData:Q,setFilled:X,setFocused:U,validationMode:V,disabled:K,name:_,validation:Z}=(0,g.useFieldRootContext)(),{labelId:J}=(0,w.useLabelableContext)(),tt=K||L,te=_??P,tn=n.useRef(null),tr=(0,a.useMergedRefs)(tn,E,Z.inputRef),ta=n.useRef(null),ti=(0,c.useBaseUiId)(),to=(0,v.useLabelableId)({id:C}),ts=Y?void 0:to,[tu,tc]=(0,r.useControlled)({controlled:z,default:!!S,name:"Switch",state:"checked"});(0,m.useRegisterFieldControl)(ta,ti,tu,void 0,!tt,P),(0,i.useIsoLayoutEffect)(()=>{X(tu)},[tu,X]),(0,k.useValueChanged)(tu,()=>{$(te),G(tu!==Q.initialValue),Z.change(tu)});let{getButtonProps:td,buttonRef:tl}=(0,d.useButton)({disabled:tt,native:Y}),tf=(0,p.useAriaLabelledBy)(T,J,tn,!Y,ts),th={...Z.getValidationProps(tt),checked:tu,disabled:tt,form:O,id:ts,name:te,required:H,style:te?o.visuallyHiddenInput:o.visuallyHidden,tabIndex:-1,type:"checkbox","aria-hidden":!0,ref:tr,onChange(t){if(t.nativeEvent.defaultPrevented)return;if(F)return void t.preventDefault();let e=t.currentTarget.checked,n=(0,x.createChangeEventDetails)(y.REASONS.none,t.nativeEvent);N?.(e,n),n.isCanceled||tc(e)},onClick(t){t.stopPropagation()},onFocus(){ta.current?.focus()},...void 0!==j?{value:j}:s.EMPTY_OBJECT},tg=n.useMemo(()=>({...W,checked:tu,disabled:tt,readOnly:F,required:H}),[W,tu,tt,F,H]),tm=(0,u.useRenderElement)("span",t,{state:tg,ref:[M,ta,tl],props:[{id:Y?to:ti,role:"switch","aria-checked":tu,"aria-readonly":F||void 0,"aria-required":H||void 0,"aria-labelledby":tf,onFocus(){tt||U(!0)},onBlur(){let t=tn.current;t&&!tt&&(A(!0),U(!1),"onBlur"===V&&Z.commit(t.checked))},onClick(t){if(F||tt)return;t.preventDefault();let e=tn.current;e&&(0,h.dispatchClickWithModifiers)(e,t)}},I,td,t=>Z.getValidationProps(tt,t)],stateAttributesMapping:f.stateAttributesMapping});return(0,e.jsxs)(l.SwitchRootContext.Provider,{value:tg,children:[tm,!tu&&te&&void 0!==R&&(0,e.jsx)("input",{type:"hidden",form:O,name:te,value:R,disabled:tt}),(0,e.jsx)("input",{...th,suppressHydrationWarning:!0})]})}),z=n.forwardRef(function(t,e){let{render:n,className:r,style:a,...i}=t,o=(0,l.useSwitchRootContext)();return(0,u.useRenderElement)("span",t,{state:o,ref:e,stateAttributesMapping:f.stateAttributesMapping,props:i})});t.s(["Root",0,M,"Thumb",0,z],450994);var D=t.i(450994),D=D,S=t.i(647163);t.s(["Switch",0,function({className:t,size:n="default",...r}){return(0,e.jsx)(D.Root,{"data-slot":"switch","data-size":n,className:(0,S.cn)("cursor-pointer peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-brand data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",t),...r,children:(0,e.jsx)(D.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-brand-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}],319036)},553429,t=>{"use strict";var e=t.i(681307);e.z.object({to:e.z.string().trim().min(1),text:e.z.string().trim().min(1),kind:e.z.enum(["message","question"]).default("message"),options:e.z.array(e.z.string().trim().min(1)).nullish(),replyTo:e.z.string().nullish()});let n=e.z.enum(["queued","running","waiting","external","paused","done","cancelled"]),r=e.z.object({bot:e.z.string(),state:n}),a=e.z.object({id:e.z.string(),bot:e.z.string(),text:e.z.string(),options:e.z.string().array().optional()}),i=e.z.object({participants:r.array(),questions:a.array(),deliveries:e.z.object({id:e.z.string(),bot:e.z.string(),text:e.z.string(),delivered:e.z.boolean()}).array(),relays:e.z.object({id:e.z.number(),bot:e.z.string(),text:e.z.string(),kind:e.z.enum(["message","question","report","interrupted"]),messageId:e.z.string().nullable()}).array()});t.s(["ROOM_THURSDAY",0,"Thursday","RoomViewSchema",0,i])},989409,t=>{"use strict";let e=(0,t.i(768834).create)()(t=>({open:!1,section:"thursday",show:e=>t(t=>({open:!0,section:e??t.section})),hide:()=>t({open:!1}),pick:e=>t({section:e})}));t.s(["openSettings",0,t=>e.getState().show(t),"useSettingsStore",0,e])},245629,401851,980797,383482,t=>{"use strict";var e=t.i(55545),n=t.i(455024),r=t.i(99151),a=t.i(845110),i=t.i(234662),o=t.i(281092);function s(t,e){let n=(0,o.toDate)(t,e?.in);return n.setHours(0,0,0,0),n}function u(t,e){let r=(0,n.getDefaultOptions)(),a=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=(0,o.toDate)(t,e?.in),s=i.getDay();return i.setDate(i.getDate()-(7*(s<a)+s-a)),i.setHours(0,0,0,0),i}function c(t,e){return u(t,{...e,weekStartsOn:1})}var d=t.i(677241);function l(t,e){let n=(0,o.toDate)(t,e?.in),r=n.getFullYear(),a=(0,d.constructFrom)(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let i=c(a),s=(0,d.constructFrom)(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let u=c(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function f(t,e){let r=(0,o.toDate)(t,e?.in),a=r.getFullYear(),i=(0,n.getDefaultOptions)(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,c=(0,d.constructFrom)(e?.in||t,0);c.setFullYear(a+1,0,s),c.setHours(0,0,0,0);let l=u(c,e),f=(0,d.constructFrom)(e?.in||t,0);f.setFullYear(a,0,s),f.setHours(0,0,0,0);let h=u(f,e);return+r>=+l?a+1:+r>=+h?a:a-1}function h(t,e){let n=Math.abs(t).toString().padStart(e,"0");return(t<0?"-":"")+n}let g={y(t,e){let n=t.getFullYear(),r=n>0?n:1-n;return h("yy"===e?r%100:r,e.length)},M(t,e){let n=t.getMonth();return"M"===e?String(n+1):h(n+1,2)},d:(t,e)=>h(t.getDate(),e.length),a(t,e){let n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>h(t.getHours()%12||12,e.length),H:(t,e)=>h(t.getHours(),e.length),m:(t,e)=>h(t.getMinutes(),e.length),s:(t,e)=>h(t.getSeconds(),e.length),S(t,e){let n=e.length;return h(Math.trunc(t.getMilliseconds()*Math.pow(10,n-3)),e.length)}},m={G:function(t,e,n){let r=+(t.getFullYear()>0);switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){let e=t.getFullYear();return n.ordinalNumber(e>0?e:1-e,{unit:"year"})}return g.y(t,e)},Y:function(t,e,n,r){let a=f(t,r),i=a>0?a:1-a;return"YY"===e?h(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):h(i,e.length)},R:function(t,e){return h(l(t),e.length)},u:function(t,e){return h(t.getFullYear(),e.length)},Q:function(t,e,n){let r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return h(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){let r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return h(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){let r=t.getMonth();switch(e){case"M":case"MM":return g.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){let r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return h(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,r,a){let s,c,l,g,m,b=Math.round((u(s=(0,o.toDate)(t,a?.in),a)-(c=(0,n.getDefaultOptions)(),l=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??c.firstWeekContainsDate??c.locale?.options?.firstWeekContainsDate??1,g=f(s,a),(m=(0,d.constructFrom)(a?.in||s,0)).setFullYear(g,0,l),m.setHours(0,0,0,0),u(m,a)))/i.millisecondsInWeek)+1;return"wo"===e?r.ordinalNumber(b,{unit:"week"}):h(b,e.length)},I:function(t,e,n){let r,a,s,u=Math.round((c(r=(0,o.toDate)(t,void 0))-(a=l(r,void 0),(s=(0,d.constructFrom)(r,0)).setFullYear(a,0,4),s.setHours(0,0,0,0),c(s)))/i.millisecondsInWeek)+1;return"Io"===e?n.ordinalNumber(u,{unit:"week"}):h(u,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):g.d(t,e)},D:function(t,e,n){let u,c,d=function(t,e){let[n,o]=(0,a.normalizeDates)(void 0,t,e),u=s(n),c=s(o);return Math.round((u-(0,r.getTimezoneOffsetInMilliseconds)(u)-(c-(0,r.getTimezoneOffsetInMilliseconds)(c)))/i.millisecondsInDay)}(u=(0,o.toDate)(t,void 0),((c=(0,o.toDate)(u,void 0)).setFullYear(c.getFullYear(),0,1),c.setHours(0,0,0,0),c))+1;return"Do"===e?n.ordinalNumber(d,{unit:"dayOfYear"}):h(d,e.length)},E:function(t,e,n){let r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){let a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return h(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){let a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return h(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){let r=t.getDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return h(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){let r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){let r,a=t.getHours();switch(r=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){let r,a=t.getHours();switch(r=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return g.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):g.H(t,e)},K:function(t,e,n){let r=t.getHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):h(r,e.length)},k:function(t,e,n){let r=t.getHours();return(0===r&&(r=24),"ko"===e)?n.ordinalNumber(r,{unit:"hour"}):h(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):g.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):g.s(t,e)},S:function(t,e){return g.S(t,e)},X:function(t,e,n){let r=t.getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return w(r);case"XXXX":case"XX":return p(r);default:return p(r,":")}},x:function(t,e,n){let r=t.getTimezoneOffset();switch(e){case"x":return w(r);case"xxxx":case"xx":return p(r);default:return p(r,":")}},O:function(t,e,n){let r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+b(r,":");default:return"GMT"+p(r,":")}},z:function(t,e,n){let r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+b(r,":");default:return"GMT"+p(r,":")}},t:function(t,e,n){return h(Math.trunc(t/1e3),e.length)},T:function(t,e,n){return h(+t,e.length)}};function b(t,e=""){let n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return 0===i?n+String(a):n+String(a)+e+h(i,2)}function w(t,e){return t%60==0?(t>0?"-":"+")+h(Math.abs(t)/60,2):p(t,e)}function p(t,e=""){let n=Math.abs(t);return(t>0?"-":"+")+h(Math.trunc(n/60),2)+e+h(n%60,2)}let v=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},x=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},y={p:x,P:(t,e)=>{let n,r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return v(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",v(a,e)).replace("{{time}}",x(i,e))}},k=/^D+$/,M=/^Y+$/,z=["D","DD","YY","YYYY"],D=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,S=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,T=/^'([^]*?)'?$/,O=/''/g,C=/[a-zA-Z]/;function E(t,r,a){let i=(0,n.getDefaultOptions)(),s=a?.locale??i.locale??e.defaultLocale,u=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,c=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,d=(0,o.toDate)(t,a?.in);if(!(d instanceof Date||"object"==typeof d&&"[object Date]"===Object.prototype.toString.call(d))&&"number"!=typeof d||isNaN(+(0,o.toDate)(d)))throw RangeError("Invalid time value");let l=r.match(S).map(t=>{let e=t[0];return"p"===e||"P"===e?(0,y[e])(t,s.formatLong):t}).join("").match(D).map(t=>{if("''"===t)return{isToken:!1,value:"'"};let e=t[0];if("'"===e){var n;let e;return{isToken:!1,value:(e=(n=t).match(T))?e[1].replace(O,"'"):n}}if(m[e])return{isToken:!0,value:t};if(e.match(C))throw RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}});s.localize.preprocessor&&(l=s.localize.preprocessor(d,l));let f={firstWeekContainsDate:u,weekStartsOn:c,locale:s};return l.map(e=>{if(!e.isToken)return e.value;let n=e.value;return(!a?.useAdditionalWeekYearTokens&&M.test(n)||!a?.useAdditionalDayOfYearTokens&&k.test(n))&&function(t,e,n){var r,a,i;let o,s=(r=t,a=e,i=n,o="Y"===r[0]?"years":"days of the month",`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${a}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(s),z.includes(t))throw RangeError(s)}(n,r,String(t)),(0,m[n[0]])(d,n,s.localize,f)}).join("")}t.s(["format",0,E],401851);var P=t.i(24708);function Y(t,e,n){let[r,i]=(0,a.normalizeDates)(n?.in,t,e);return+s(r)==+s(i)}function N(t,e){return Y((0,d.constructFrom)(e?.in||t,t),(0,P.constructNow)(e?.in||t))}function F(t,e){var n,r;let a;return Y((0,d.constructFrom)(e?.in||t,t),(n=(0,P.constructNow)(e?.in||t),r=void 0,a=(0,o.toDate)(n,r?.in),isNaN(-1)?(0,d.constructFrom)(r?.in||n,NaN):(a.setDate(a.getDate()+-1),a)))}t.s(["isToday",0,N],980797),t.s(["isYesterday",0,F],383482);var H=t.i(681307);let L=H.z.union([H.z.date(),H.z.iso.datetime()]),q=t=>new Date(t);t.s(["DateLikeSchema",0,L,"shortAgo",0,function(t,e=Date.now()){let n=Math.max(0,Math.round((e-q(t).getTime())/1e3));if(n<60)return"now";let r=Math.round(n/60);if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`},"toDate",0,q,"whenOf",0,function(t){let e=q(t),n=E(e,"HH:mm");return N(e)?n:F(e)?`Yesterday ${n}`:`${E(e,"MMM d")} \xb7 ${n}`}],245629)},31421,t=>{"use strict";var e=t.i(271645),n=t.i(146376),r=t.i(788015);t.s(["useAriaLabelledBy",0,function(t,a,i,o=!0,s){let[u,c]=e.useState(),d=(0,r.useBaseUiId)(s?`${s}-label`:void 0),l=t??a??u;return(0,n.useIsoLayoutEffect)(()=>{let e=t||a||!o?void 0:function(t,e){let n=function(t){if(!t)return;let e=t.parentElement;if(e&&"LABEL"===e.tagName)return e;let n=t.id;if(n){let e=t.nextElementSibling;if(e&&e.htmlFor===n)return e}let r=t.labels;return r&&r[0]}(t);if(n)return!n.id&&e&&(n.id=e),n.id||void 0}(i.current,d);u!==e&&c(e)}),l}])},924305,951849,133438,t=>{"use strict";t.s([],924305);var e=t.i(733332),n=t.i(271645);let r=n.createContext(void 0);t.s(["SwitchRootContext",0,r,"useSwitchRootContext",0,function(){let t=n.useContext(r);if(void 0===t)throw Error((0,e.default)(63));return t}],951849);let a={...t.i(875812).fieldValidityMapping,checked:t=>t?{"data-checked":""}:{"data-unchecked":""}};t.s(["stateAttributesMapping",0,a],133438)},593698,t=>{"use strict";var e=t.i(643957);t.s(["CheckIcon",()=>e.default])},263676,t=>{"use strict";var e=t.i(814387);t.s(["X",()=>e.default])},504565,t=>{"use strict";var e=t.i(722219);t.s(["default",0,e])},768834,t=>{"use strict";var e=t.i(271645);let n=t=>{let e,n=new Set,r=(t,r)=>{let a="function"==typeof t?t(e):t;if(!Object.is(a,e)){let t=e;e=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},e,a),n.forEach(n=>n(e,t))}},a=()=>e,i={setState:r,getState:a,getInitialState:()=>o,subscribe:t=>(n.add(t),()=>n.delete(t))},o=e=t(r,a,i);return i},r=t=>{let r=t?n(t):n,a=t=>(function(t,n=t=>t){let r=e.default.useSyncExternalStore(t.subscribe,e.default.useCallback(()=>n(t.getState()),[t,n]),e.default.useCallback(()=>n(t.getInitialState()),[t,n]));return e.default.useDebugValue(r),r})(r,t);return Object.assign(a,r),a};t.s(["create",0,t=>t?r(t):r],768834)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,638475,e=>{"use strict";var t=e.i(843476),n=e.i(798120),a=e.i(319036),i=e.i(609856),s=e.i(283653),r=e.i(95187);let l=(0,r.createServerReference)("7f0ce65e996cfa2473780a3cf0b38904069554f768",r.callServer,void 0,r.findSourceMapURL,"setKeepWorkingOnAction"),o="Work while the app is closed";e.s(["KeepWorkingSwitch",0,function(){let{data:e,mutate:r}=(0,s.useServerRoute)(n.queryKey.botKeepWorking),[d]=(0,i.useServerAction)(l,{onOk:()=>(0,s.revalidate)(n.queryKey.botKeepWorking)});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",title:"Off, closing the last tab stops running jobs and holds routines until one is open again. On, they run until the server stops.",children:o}),(0,t.jsx)(a.Switch,{checked:e??!1,disabled:void 0===e,onCheckedChange:e=>{r(e,!1),d(e)},"aria-label":o})]})}],638475)},480869,e=>{"use strict";var t=e.i(843476),n=e.i(401851),a=e.i(493801),i=e.i(456420);let s={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};s.node;let r=(0,i.default)(s);var l=e.i(716327),o=e.i(867927),d=e.i(632781),u=e.i(648119),c=e.i(21357),h=e.i(759659),m=e.i(263676),x=e.i(271645),f=e.i(798120),p=e.i(167881),g=e.i(630374),b=e.i(463415),j=e.i(23750),y=e.i(917162),k=e.i(421429),v=e.i(660302),w=e.i(319036),N=e.i(184762),S=e.i(41533),M=e.i(635963),D=e.i(638475),T=e.i(978411),$=e.i(895836),C=e.i(989409),R=e.i(245629),O=e.i(609856),A=e.i(283653),z=e.i(647163),I=e.i(95187);let q=(0,I.createServerReference)("7fcce53089b7d9ab37e1ede476aa5dedc0b0d35e12",I.callServer,void 0,I.findSourceMapURL,"createRoutineAction"),E=(0,I.createServerReference)("7fdc335db44dcf20b0412b805f81e431a0f5686511",I.callServer,void 0,I.findSourceMapURL,"deleteRoutineAction"),F=(0,I.createServerReference)("7fa185f09203bb0a1f39243fa623f48a736f8dd739",I.callServer,void 0,I.findSourceMapURL,"runRoutineNowAction"),K=(0,I.createServerReference)("7f07a02cdabcb5642ab071031c8335e8f0ba101a04",I.callServer,void 0,I.findSourceMapURL,"updateRoutineAction");var W=e.i(504565);let P=[1,2,3,4,5,6,7],B=W.default.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/,"A time is HH:MM, 00:00 to 23:59");function H(e){let[t,n]=e.split(" "),[a,i,s]=t.split("-").map(Number),[r,l]=n.split(":").map(Number);return new Date(a,i-1,s,r,l)}let U=/^\d{4}-\d\d-\d\d ([01]\d|2[0-3]):[0-5]\d$/,L=W.default.string().regex(U,'A moment is "YYYY-MM-DD HH:MM"').refine(e=>{if(!U.test(e))return!0;let t=H(e);return t.getMonth()===Number(e.slice(5,7))-1&&t.getDate()===Number(e.slice(8,10))},"There is no such day"),G=W.default.discriminatedUnion("kind",[W.default.object({kind:W.default.literal("once"),at:L}),W.default.object({kind:W.default.literal("daily"),time:B,days:W.default.array(W.default.number().int().min(1).max(7)).min(1,"Pick at least one day").transform(e=>[...new Set(e)].sort((e,t)=>e-t))}),W.default.object({kind:W.default.literal("every"),hours:W.default.number().int().min(S.ROUTINE.minHours,`No more often than every ${S.ROUTINE.minHours}h`).max(168)})]),Y=W.default.object({bot:W.default.string().trim().min(1,"Pick a bot"),label:W.default.string().trim().min(1,"Give it a name").max(80),request:W.default.string().trim().min(1,"Say what it should do"),schedule:G}),J=W.default.object({id:W.default.string(),status:W.default.enum(["running","waiting","done","cancelled"]),outcome:W.default.string().nullable(),updatedAt:R.DateLikeSchema});Y.extend({id:W.default.string(),enabled:W.default.boolean(),nextRunAt:R.DateLikeSchema,runs:W.default.array(J)});let _=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(e){if("once"===e.kind){let[t,n]=e.at.split(" "),[,a,i]=t.split("-").map(Number);return`Once \xb7 ${V[a-1]} ${i} ${n}`}if("every"===e.kind)return 1===e.hours?"Every hour":`Every ${e.hours} hours`;let{days:t,time:n}=e;if(7===t.length)return`Daily ${n}`;if(1===t.length)return`${_[t[0]-1]} ${n}`;let a=t.every((e,n)=>0===n||e===t[n-1]+1)?`${_[t[0]-1]}–${_[t.at(-1)-1]}`:t.map(e=>_[e-1]).join(" ");return`Daily ${n} \xb7 ${a}`}var Q=e.i(431594);let Z=(e,t)=>{let n=t?.find(t=>t.name===e)?.icon;return{color:n?.color,shape:n?.shape,outline:n?.outline,paint:n?.paint}};function ee({routine:e,bots:n,open:a,onOpen:i,onSwitch:s}){let r=function(e,t){let n=e.runs[0],a=n?.outcome?(0,z.plainText)(n.outcome):"",i=n?`${(0,R.whenOf)(n.updatedAt)}${a?` — ${a}`:""}`:"Not run yet";if(!e.enabled)return{text:`Off \xb7 ${i}`,tone:"text-muted-foreground"};let s=t?.find(t=>t.name===e.bot);return t&&(!s||s.disabled)?{text:s?`${e.bot} is switched off`:`${e.bot} is gone — pick another bot`,tone:z.WAITING_INK,waits:!0}:n?.status==="running"?{text:"Running now",tone:"",shine:!0}:n?.status==="waiting"?{text:`The last run waits on you${a?`: ${a}`:""}`,tone:z.WAITING_INK,waits:!0}:{text:i,tone:"text-muted-foreground"}}(e,n),l=e.runs[0]?.status==="running";return(0,t.jsxs)("div",{className:(0,z.cn)("flex items-center gap-3 p-4 transition-colors",a?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("button",{type:"button",onClick:i,className:(0,z.cn)("flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",!e.enabled&&"opacity-70"),children:[(0,t.jsx)(M.BotMark,{size:40,seed:e.bot,...Z(e.bot,n),state:l?"thinking":"idle",notify:!!r.waits,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),l&&(0,t.jsx)(d.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),(0,t.jsx)("span",{className:"flex min-w-0 text-[13px] leading-snug",children:r.shine?(0,t.jsx)(v.ShinyText,{text:r.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,z.cn)("min-w-0 truncate",r.tone),children:r.text})})]}),(0,t.jsxs)("span",{className:"flex w-44 shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",children:[(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 text-foreground",children:[(0,t.jsx)(Q.RoutineMark,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate",children:X(e.schedule)})]}),(0,t.jsx)("span",{className:"max-w-full truncate text-muted-foreground/70",children:e.enabled?`next ${(0,R.whenOf)(e.nextRunAt)}`:"off"})]})]}),(0,t.jsx)(w.Switch,{checked:e.enabled,onCheckedChange:s,"aria-label":`${e.label} on or off`,className:"shrink-0"}),(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":`Open ${e.label}`,className:"shrink-0 rounded-md text-muted-foreground outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(o.ChevronRight,{className:"size-4"})})]})}let et=e=>String(e).padStart(2,"0");function en(e,t=new Date){let n=new Date(t);return n.setDate(n.getDate()+e),`${n.getFullYear()}-${et(n.getMonth()+1)}-${et(n.getDate())}`}let ea=(e,t)=>{let n=e?.schedule;return{label:e?.label??"",bot:e?.bot??t.find(e=>!e.disabled)?.name??"",request:e?.request??"",kind:n?.kind??"daily",time:n?.kind==="daily"?n.time:n?.kind==="once"?n.at.slice(11):"09:00",days:n?.kind==="daily"?n.days:[...P],hours:n?.kind==="every"?n.hours:6,date:n?.kind==="once"?n.at.slice(0,10):en(1)}};function ei(e){let t=/^\d\d:\d\d$/.test(e.time);return"once"===e.kind?t&&e.date?{kind:"once",at:`${e.date} ${e.time}`}:null:"daily"===e.kind?e.days.length&&t?{kind:"daily",time:e.time,days:e.days}:null:{kind:"every",hours:e.hours}}let es=e=>e?.kind==="once"&&H(e.at)<=new Date,er=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],el=[{label:"Every day",days:[1,2,3,4,5,6,7]},{label:"Weekdays",days:[1,2,3,4,5]},{label:"Weekends",days:[6,7]}],eo=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ed=[1,2,3,6,12,24].filter(e=>e>=S.ROUTINE.minHours);function eu({routine:e,bots:n,onClose:a,onMade:i}){var s,r;let d,[v,S]=(0,x.useState)(null),D=(0,x.useCallback)(e=>{S(e?.closest("[data-slot=dialog-content]")??null)},[]),$="new"===e?null:e,I="new"===e?"new":e?.id??"",[W,B]=(0,x.useState)(()=>ea($,n));(0,x.useEffect)(()=>B(ea($,n)),[I]);let H=e=>B(t=>({...t,...e})),U=()=>(0,A.revalidate)(f.queryKey.routines),[L,G]=(0,O.useServerAction)(q,{onOk:e=>{U(),i(e.id)}}),[Y]=(0,O.useServerAction)(K,{onOk:U}),[J]=(0,O.useServerAction)(E,{onOk:U}),[_,V]=(0,O.useServerAction)(F,{onOk:()=>{U(),(0,A.revalidate)(f.queryKey.threads)}}),ee=ei(W),ex=ee&&!es(ee)&&W.label.trim()&&W.bot&&W.request.trim()?{label:W.label.trim(),bot:W.bot,request:W.request.trim(),schedule:ee}:null,ej=e=>{$&&Y($.id,e).catch(()=>{})},ey=e=>{H(e);let t=ei({...W,...e});!t||es(t)||ej({schedule:t,..."once"===t.kind?{enabled:!0}:{}})},ek=async()=>{!$||await y.notify.confirm({title:`Delete "${$.label}"?`,description:"It starts no more. The jobs it already opened stay.",okText:"Delete",destructive:!0})&&(await J($.id).catch(()=>{}),a())},ev=n.find(e=>e.name===W.bot),ew=$?.runs[0]?.status==="running"||$?.runs[0]?.status==="waiting";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:D,hidden:!0}),(0,t.jsx)(g.Dialog,{open:!!(e&&v),onOpenChange:e=>!e&&a(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(g.DialogPortal,{container:v,children:(0,t.jsx)(g.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[ev?(0,t.jsx)(M.BotMark,{size:28,seed:ev.name,...Z(ev.name,n),notify:!1,className:"shrink-0"}):(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:(0,t.jsx)(Q.RoutineMark,{className:"size-3.5"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(g.DialogTitle,{className:"sr-only",children:$?$.label:"New routine"}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:$?$.label:"New routine"}),$&&(0,t.jsxs)("p",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(Q.RoutineMark,{className:"size-3 shrink-0"}),(0,t.jsxs)("span",{className:"truncate",children:[$.bot," · ",X($.schedule),$.enabled&&` \xb7 next ${(0,R.whenOf)($.nextRunAt)}`]})]})]}),$&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Switch,{checked:$.enabled,onCheckedChange:e=>void Y($.id,{enabled:e}).catch(()=>{}),"aria-label":`${$.label} on or off`,className:"mr-1 shrink-0"}),(0,t.jsxs)(b.DropdownMenu,{children:[(0,t.jsx)(b.DropdownMenuTrigger,{render:(0,t.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"More",className:"text-muted-foreground"}),children:(0,t.jsx)(u.MoreHorizontal,{})}),(0,t.jsx)(b.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(b.DropdownMenuItem,{variant:"destructive",onClick:ek,children:[(0,t.jsx)(h.Trash2,{}),"Delete"]})})]})]}),(0,t.jsx)(g.DialogClose,{render:(0,t.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the routine"}),children:(0,t.jsx)(m.X,{})})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto px-5 pt-3 pb-5",children:[(0,t.jsxs)(eb,{label:"Name",htmlFor:"routine-name",children:[(0,t.jsx)(j.Input,{id:"routine-name",value:W.label,onChange:e=>H({label:e.target.value}),onBlur:()=>{let e=W.label.trim();e&&e!==$?.label&&ej({label:e})},placeholder:"Morning mail",maxLength:80,autoFocus:!$}),(0,t.jsx)(ec,{children:"What it is called in this list, and what she calls it on a call."})]}),(0,t.jsxs)(eb,{label:"Bot",children:[(0,t.jsxs)(b.DropdownMenu,{children:[(0,t.jsxs)(b.DropdownMenuTrigger,{render:(0,t.jsx)(p.Button,{variant:"outline",className:"justify-start gap-2 pl-1.5 font-normal"}),children:[ev?(0,t.jsx)(M.BotMark,{size:20,seed:ev.name,...Z(ev.name,n),notify:!1,className:"shrink-0"}):null,(0,t.jsx)("span",{className:(0,z.cn)(!ev&&"pl-1.5 text-muted-foreground"),children:ev?.name??(W.bot||"Pick a bot")}),(0,t.jsx)(l.ChevronDown,{className:"ml-1 size-3.5 text-muted-foreground"})]}),(0,t.jsx)(b.DropdownMenuContent,{align:"start",children:(0,t.jsx)(b.DropdownMenuGroup,{children:n.filter(e=>!e.disabled).map(e=>(0,t.jsxs)(b.DropdownMenuItem,{onClick:()=>{H({bot:e.name}),e.name!==$?.bot&&ej({bot:e.name})},children:[(0,t.jsx)(M.BotMark,{size:16,seed:e.name,...Z(e.name,n),notify:!1,className:"shrink-0"}),e.name]},e.name))})})]}),(0,t.jsx)(ec,{children:"Who does the job each time it starts."})]}),(0,t.jsx)(eb,{label:"When",children:(0,t.jsxs)("div",{className:"space-y-3.5",children:[(0,t.jsx)(k.Segmented,{"aria-label":"How it starts",value:W.kind,onChange:e=>ey({kind:e}),options:[{value:"once",label:"Once"},{value:"daily",label:"On set days"},{value:"every",label:"Every few hours"}]}),(0,t.jsx)("div",{className:"space-y-2.5",children:"once"===W.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(em,{word:"On",children:(0,t.jsx)(ef,{value:W.date,onPick:e=>ey({date:e})})}),(0,t.jsxs)(em,{word:"At",children:[(0,t.jsx)(ep,{value:W.time,onChange:e=>H({time:e}),onDone:()=>ey({})}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"or"}),(0,t.jsx)(eh,{picked:!1,onClick:()=>{let e;return ey(((e=new Date(Date.now()+36e5)).setMinutes(5*Math.ceil(e.getMinutes()/5),0,0),{date:en(0,e),time:`${et(e.getHours())}:${et(e.getMinutes())}`}))},children:"In an hour"})]})]}):"daily"===W.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(em,{word:"On",children:P.map(e=>{let n=W.days.includes(e);return(0,t.jsx)(eh,{picked:n,"aria-label":eo[e-1],onClick:()=>ey({days:n?W.days.filter(t=>t!==e):[...W.days,e].sort((e,t)=>e-t)}),children:er[e-1]},e)})}),(0,t.jsx)(em,{children:el.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>ey({days:[...e.days]}),className:"h-6.5 rounded-full bg-muted px-2.5 text-xs text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:e.label},e.label))}),(0,t.jsx)(em,{word:"At",children:(0,t.jsx)(ep,{value:W.time,onChange:e=>H({time:e}),onDone:()=>ey({})})})]}):(0,t.jsxs)(em,{word:"Every",children:[(ed.includes(W.hours)?ed:[...ed,W.hours].sort((e,t)=>e-t)).map(e=>(0,t.jsx)(eh,{picked:e===W.hours,onClick:()=>ey({hours:e}),className:"min-w-10 px-3",children:e},e)),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"hours"})]})}),(0,t.jsx)(eg,{schedule:ee,kind:W.kind})]})}),(0,t.jsxs)(eb,{label:"Job",htmlFor:"routine-request",children:[(0,t.jsx)(N.Textarea,{id:"routine-request",value:W.request,onChange:e=>H({request:e.target.value}),onBlur:()=>{let e=W.request.trim();e&&e!==$?.request&&ej({request:e})},placeholder:"Go through the mail that came since the last run and draft replies to what needs one. Send nothing.",className:"min-h-28"}),(0,t.jsx)(ec,{children:"Handed to the bot as a new thread each time, with a line on how the last run ended. Nobody is there to ask, so say everything it needs."})]}),$&&(0,t.jsxs)("div",{className:"pt-1",children:[(0,t.jsx)("div",{className:"flex h-6 items-center",children:(0,t.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Runs"})}),0===$.runs.length?(0,t.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Not run yet."}):$.runs.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.id,void(C.useSettingsStore.getState().hide(),T.roomOpens.open(t))},className:"flex h-9 w-full items-center gap-3 border-t border-border/60 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"w-28 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,R.whenOf)(e.updatedAt)}),(0,t.jsx)("span",{className:(0,z.cn)("min-w-0 flex-1 truncate","waiting"===e.status?z.WAITING_INK:"text-muted-foreground"),children:"running"===e.status?"Running now":e.outcome?(0,z.plainText)(e.outcome):"cancelled"===e.status?"Stopped":"No words"}),(0,t.jsx)(o.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground"})]},e.id))]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-5 py-3",children:[(0,t.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-4 text-muted-foreground",children:$||ex?"Starts while Thursday is running on this computer, with a tab open unless work goes on with the app closed. A time that passed meanwhile starts once, not once for each.":`Still needs ${s=W,r=ee,(d=[s.label.trim()?null:"a name",s.bot?null:"a bot",!r?"a time":es(r)?"a time still ahead":null,s.request.trim()?null:"a job"].filter(e=>null!==e)).length>1?`${d.slice(0,-1).join(", ")} and ${d.at(-1)}`:d[0]??"nothing"}.`}),$?(0,t.jsxs)(p.Button,{variant:"outline",size:"sm",loading:V,disabled:ew,title:ew?"Its last run is still open":void 0,onClick:()=>void _($.id).catch(()=>{}),children:[(0,t.jsx)(c.Play,{}),"Run now"]}):(0,t.jsx)(p.Button,{variant:"brand",size:"sm",loading:G,disabled:!ex,onClick:()=>ex&&void L(ex).catch(()=>{}),children:"Create"})]})]})})})})]})}let ec=({children:e})=>(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e});function eh({picked:e,className:n,...a}){return(0,t.jsx)("button",{type:"button","aria-pressed":e,className:(0,z.cn)("inline-flex h-8 items-center justify-center gap-1.5 rounded-full px-3.5 text-[13px] whitespace-nowrap outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",e?"bg-primary font-medium text-primary-foreground":"text-foreground ring-1 ring-border ring-inset hover:bg-muted",n),...a})}function em({word:e,children:n}){return(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)("span",{className:"flex h-8 w-9 shrink-0 items-center text-[13px] text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:n})]})}function ex(e){let t=H(`${e} 00:00`),a=(t.getTime()-H(`${en(0)} 00:00`).getTime())/864e5;return(0,n.format)(t,a<7?"EEE d":"EEE, MMM d")}function ef({value:e,onPick:n}){let a=(0,x.useRef)(null),i=[0,1,2,3].map(e=>en(e)),s=()=>a.current?.showPicker();return(0,t.jsxs)(t.Fragment,{children:[i.map((a,i)=>(0,t.jsx)(eh,{picked:a===e,onClick:()=>n(a),children:0===i?"Today":1===i?"Tomorrow":ex(a)},a)),!i.includes(e)&&(0,t.jsx)(eh,{picked:!0,onClick:s,children:ex(e)}),(0,t.jsxs)("span",{className:"relative",children:[(0,t.jsx)(eh,{picked:!1,"aria-label":"Another day",onClick:s,className:"w-8 px-0",children:(0,t.jsx)(r,{className:"size-3.5"})}),(0,t.jsx)("input",{ref:a,type:"date",tabIndex:-1,"aria-hidden":!0,min:i[0],value:e,onChange:e=>e.target.value&&n(e.target.value),className:"pointer-events-none absolute inset-0 opacity-0"})]})]})}function ep({value:e,onChange:n,onDone:a}){return(0,t.jsx)(j.Input,{type:"time","aria-label":"Time of day",value:e,onChange:e=>n(e.target.value),onBlur:a,onClick:e=>e.currentTarget.showPicker?.(),className:"h-8.5 w-28 px-3 text-[15px] tabular-nums md:text-[15px] [&::-webkit-calendar-picker-indicator]:hidden"})}function eg({schedule:e,kind:n}){if(!e||es(e))return(0,t.jsx)("p",{className:"text-xs text-destructive",children:e?"That time has passed. Pick a later one.":"daily"===n?"Pick a time and at least one day.":"Pick a time."});let i=function(e,t){if("once"===e.kind)return H(e.at);if("every"===e.kind)return new Date(t.getTime()+36e5*e.hours);let[n,a]=e.time.split(":").map(Number);for(let i=0;i<=7;i++){let s=new Date(t);s.setDate(s.getDate()+i),s.setHours(n,a,0,0);let r=0===s.getDay()?7:s.getDay();if(s>t&&e.days.includes(r))return s}return new Date(t.getTime()+864e5)}(e,new Date);return(0,t.jsxs)("p",{className:"flex items-start gap-2 text-[13px] leading-5",children:[(0,t.jsx)(Q.RoutineMark,{className:"mt-0.75 size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"min-w-0",children:[X(e),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" · ","once"===e.kind?`${(0,a.formatDistanceToNowStrict)(i,{addSuffix:!0})}, then it switches itself off`:`first start ${(0,R.whenOf)(i)}`]})]})]})}function eb({label:e,htmlFor:n,children:a}){return(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("label",{htmlFor:n,className:"w-14 shrink-0 pt-2 font-mono text-xs text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"min-w-0 flex-1 space-y-1.5",children:a})]})}e.s(["RoutineSetting",0,function(){let[e,n]=(0,x.useState)(null),{data:a,isLoading:i,error:s}=(0,A.useServerRoute)(f.queryKey.routines),{data:r}=(0,A.useServerRoute)(f.queryKey.bot),[l]=(0,O.useServerAction)(K,{onOk:()=>(0,A.revalidate)(f.queryKey.routines)});if(i)return(0,t.jsx)($.SettingSkeleton,{rows:3});if(s)return(0,t.jsx)($.SettingError,{message:s.message});let o=a??[],d=o.filter(e=>e.enabled).length,u=o.find(t=>t.id===e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.SettingScreen,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)($.SettingRailNote,{children:[o.length," of ",S.ROUTINE.max," · ",d," on"]}),(0,t.jsx)(D.KeepWorkingSwitch,{})]}),children:(0,t.jsx)($.SettingItems,{addRow:o.length<S.ROUTINE.max?{label:"New routine",onClick:()=>n("new")}:void 0,children:0===o.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:'Nothing starts by itself yet. Tell Thursday what should — "every weekday at nine, go through my mail" — or make one here.'}):o.map(a=>(0,t.jsx)(ee,{routine:a,bots:r,open:a.id===e,onOpen:()=>n(a.id),onSwitch:e=>l(a.id,{enabled:e})},a.id))})}),(0,t.jsx)(eu,{routine:"new"===e?"new":u??null,bots:r??[],onClose:()=>n(null),onMade:e=>n(e)})]})}],480869)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},21357,e=>{"use strict";var t=e.i(456420);let n={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};n.node;let a=(0,t.default)(n);e.s(["Play",0,a],21357)},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let a=(0,t.default)(n);e.s(["Trash2",0,a],759659)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,638475,e=>{"use strict";var t=e.i(843476),n=e.i(798120),a=e.i(319036),i=e.i(609856),s=e.i(283653),r=e.i(95187);let l=(0,r.createServerReference)("7f157eae9449c071099b328bc394675b074c81a76c",r.callServer,void 0,r.findSourceMapURL,"setKeepWorkingOnAction"),o="Work while the app is closed";e.s(["KeepWorkingSwitch",0,function(){let{data:e,mutate:r}=(0,s.useServerRoute)(n.queryKey.botKeepWorking),[d]=(0,i.useServerAction)(l,{onOk:()=>(0,s.revalidate)(n.queryKey.botKeepWorking)});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",title:"Off, closing the last tab stops running jobs and holds routines until one is open again. On, they run until the server stops.",children:o}),(0,t.jsx)(a.Switch,{checked:e??!1,disabled:void 0===e,onCheckedChange:e=>{r(e,!1),d(e)},"aria-label":o})]})}],638475)},480869,e=>{"use strict";var t=e.i(843476),n=e.i(401851),a=e.i(493801),i=e.i(456420);let s={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};s.node;let r=(0,i.default)(s);var l=e.i(716327),o=e.i(867927),d=e.i(632781),u=e.i(648119),c=e.i(21357),h=e.i(759659),m=e.i(263676),x=e.i(271645),f=e.i(798120),p=e.i(167881),g=e.i(630374),b=e.i(463415),j=e.i(23750),y=e.i(917162),k=e.i(421429),v=e.i(660302),w=e.i(319036),N=e.i(184762),S=e.i(41533),M=e.i(635963),D=e.i(638475),T=e.i(978411),$=e.i(895836),C=e.i(989409),R=e.i(245629),O=e.i(609856),A=e.i(283653),z=e.i(647163),I=e.i(95187);let q=(0,I.createServerReference)("7fd4ff170b7cdf7b9381301071729ac83a1c9bcf9f",I.callServer,void 0,I.findSourceMapURL,"createRoutineAction"),E=(0,I.createServerReference)("7f95db2d3b2d454d76e1f110d5c6fa57e4afbb1028",I.callServer,void 0,I.findSourceMapURL,"deleteRoutineAction"),F=(0,I.createServerReference)("7f667df7969c01b6651de468c6d1d73d11389ddc32",I.callServer,void 0,I.findSourceMapURL,"runRoutineNowAction"),K=(0,I.createServerReference)("7f7fe8e97bd7c852d5b703c786a6b397a9e17f29d2",I.callServer,void 0,I.findSourceMapURL,"updateRoutineAction");var W=e.i(504565);let P=[1,2,3,4,5,6,7],B=W.default.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/,"A time is HH:MM, 00:00 to 23:59");function H(e){let[t,n]=e.split(" "),[a,i,s]=t.split("-").map(Number),[r,l]=n.split(":").map(Number);return new Date(a,i-1,s,r,l)}let U=/^\d{4}-\d\d-\d\d ([01]\d|2[0-3]):[0-5]\d$/,L=W.default.string().regex(U,'A moment is "YYYY-MM-DD HH:MM"').refine(e=>{if(!U.test(e))return!0;let t=H(e);return t.getMonth()===Number(e.slice(5,7))-1&&t.getDate()===Number(e.slice(8,10))},"There is no such day"),G=W.default.discriminatedUnion("kind",[W.default.object({kind:W.default.literal("once"),at:L}),W.default.object({kind:W.default.literal("daily"),time:B,days:W.default.array(W.default.number().int().min(1).max(7)).min(1,"Pick at least one day").transform(e=>[...new Set(e)].sort((e,t)=>e-t))}),W.default.object({kind:W.default.literal("every"),hours:W.default.number().int().min(S.ROUTINE.minHours,`No more often than every ${S.ROUTINE.minHours}h`).max(168)})]),Y=W.default.object({bot:W.default.string().trim().min(1,"Pick a bot"),label:W.default.string().trim().min(1,"Give it a name").max(80),request:W.default.string().trim().min(1,"Say what it should do"),schedule:G}),J=W.default.object({id:W.default.string(),status:W.default.enum(["running","waiting","done","cancelled"]),outcome:W.default.string().nullable(),updatedAt:R.DateLikeSchema});Y.extend({id:W.default.string(),enabled:W.default.boolean(),nextRunAt:R.DateLikeSchema,runs:W.default.array(J)});let _=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function X(e){if("once"===e.kind){let[t,n]=e.at.split(" "),[,a,i]=t.split("-").map(Number);return`Once \xb7 ${V[a-1]} ${i} ${n}`}if("every"===e.kind)return 1===e.hours?"Every hour":`Every ${e.hours} hours`;let{days:t,time:n}=e;if(7===t.length)return`Daily ${n}`;if(1===t.length)return`${_[t[0]-1]} ${n}`;let a=t.every((e,n)=>0===n||e===t[n-1]+1)?`${_[t[0]-1]}–${_[t.at(-1)-1]}`:t.map(e=>_[e-1]).join(" ");return`Daily ${n} \xb7 ${a}`}var Q=e.i(431594);let Z=(e,t)=>{let n=t?.find(t=>t.name===e)?.icon;return{color:n?.color,shape:n?.shape,outline:n?.outline,paint:n?.paint}};function ee({routine:e,bots:n,open:a,onOpen:i,onSwitch:s}){let r=function(e,t){let n=e.runs[0],a=n?.outcome?(0,z.plainText)(n.outcome):"",i=n?`${(0,R.whenOf)(n.updatedAt)}${a?` — ${a}`:""}`:"Not run yet";if(!e.enabled)return{text:`Off \xb7 ${i}`,tone:"text-muted-foreground"};let s=t?.find(t=>t.name===e.bot);return t&&(!s||s.disabled)?{text:s?`${e.bot} is switched off`:`${e.bot} is gone — pick another bot`,tone:z.WAITING_INK,waits:!0}:n?.status==="running"?{text:"Running now",tone:"",shine:!0}:n?.status==="waiting"?{text:`The last run waits on you${a?`: ${a}`:""}`,tone:z.WAITING_INK,waits:!0}:{text:i,tone:"text-muted-foreground"}}(e,n),l=e.runs[0]?.status==="running";return(0,t.jsxs)("div",{className:(0,z.cn)("flex items-center gap-3 p-4 transition-colors",a?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("button",{type:"button",onClick:i,className:(0,z.cn)("flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",!e.enabled&&"opacity-70"),children:[(0,t.jsx)(M.BotMark,{size:40,seed:e.bot,...Z(e.bot,n),state:l?"thinking":"idle",notify:!!r.waits,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),l&&(0,t.jsx)(d.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),(0,t.jsx)("span",{className:"flex min-w-0 text-[13px] leading-snug",children:r.shine?(0,t.jsx)(v.ShinyText,{text:r.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,z.cn)("min-w-0 truncate",r.tone),children:r.text})})]}),(0,t.jsxs)("span",{className:"flex w-44 shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",children:[(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 text-foreground",children:[(0,t.jsx)(Q.RoutineMark,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate",children:X(e.schedule)})]}),(0,t.jsx)("span",{className:"max-w-full truncate text-muted-foreground/70",children:e.enabled?`next ${(0,R.whenOf)(e.nextRunAt)}`:"off"})]})]}),(0,t.jsx)(w.Switch,{checked:e.enabled,onCheckedChange:s,"aria-label":`${e.label} on or off`,className:"shrink-0"}),(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":`Open ${e.label}`,className:"shrink-0 rounded-md text-muted-foreground outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(o.ChevronRight,{className:"size-4"})})]})}let et=e=>String(e).padStart(2,"0");function en(e,t=new Date){let n=new Date(t);return n.setDate(n.getDate()+e),`${n.getFullYear()}-${et(n.getMonth()+1)}-${et(n.getDate())}`}let ea=(e,t)=>{let n=e?.schedule;return{label:e?.label??"",bot:e?.bot??t.find(e=>!e.disabled)?.name??"",request:e?.request??"",kind:n?.kind??"daily",time:n?.kind==="daily"?n.time:n?.kind==="once"?n.at.slice(11):"09:00",days:n?.kind==="daily"?n.days:[...P],hours:n?.kind==="every"?n.hours:6,date:n?.kind==="once"?n.at.slice(0,10):en(1)}};function ei(e){let t=/^\d\d:\d\d$/.test(e.time);return"once"===e.kind?t&&e.date?{kind:"once",at:`${e.date} ${e.time}`}:null:"daily"===e.kind?e.days.length&&t?{kind:"daily",time:e.time,days:e.days}:null:{kind:"every",hours:e.hours}}let es=e=>e?.kind==="once"&&H(e.at)<=new Date,er=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],el=[{label:"Every day",days:[1,2,3,4,5,6,7]},{label:"Weekdays",days:[1,2,3,4,5]},{label:"Weekends",days:[6,7]}],eo=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ed=[1,2,3,6,12,24].filter(e=>e>=S.ROUTINE.minHours);function eu({routine:e,bots:n,onClose:a,onMade:i}){var s,r;let d,[v,S]=(0,x.useState)(null),D=(0,x.useCallback)(e=>{S(e?.closest("[data-slot=dialog-content]")??null)},[]),$="new"===e?null:e,I="new"===e?"new":e?.id??"",[W,B]=(0,x.useState)(()=>ea($,n));(0,x.useEffect)(()=>B(ea($,n)),[I]);let H=e=>B(t=>({...t,...e})),U=()=>(0,A.revalidate)(f.queryKey.routines),[L,G]=(0,O.useServerAction)(q,{onOk:e=>{U(),i(e.id)}}),[Y]=(0,O.useServerAction)(K,{onOk:U}),[J]=(0,O.useServerAction)(E,{onOk:U}),[_,V]=(0,O.useServerAction)(F,{onOk:()=>{U(),(0,A.revalidate)(f.queryKey.threads)}}),ee=ei(W),ex=ee&&!es(ee)&&W.label.trim()&&W.bot&&W.request.trim()?{label:W.label.trim(),bot:W.bot,request:W.request.trim(),schedule:ee}:null,ej=e=>{$&&Y($.id,e).catch(()=>{})},ey=e=>{H(e);let t=ei({...W,...e});!t||es(t)||ej({schedule:t,..."once"===t.kind?{enabled:!0}:{}})},ek=async()=>{!$||await y.notify.confirm({title:`Delete "${$.label}"?`,description:"It starts no more. The jobs it already opened stay.",okText:"Delete",destructive:!0})&&(await J($.id).catch(()=>{}),a())},ev=n.find(e=>e.name===W.bot),ew=$?.runs[0]?.status==="running"||$?.runs[0]?.status==="waiting";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:D,hidden:!0}),(0,t.jsx)(g.Dialog,{open:!!(e&&v),onOpenChange:e=>!e&&a(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(g.DialogPortal,{container:v,children:(0,t.jsx)(g.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[ev?(0,t.jsx)(M.BotMark,{size:28,seed:ev.name,...Z(ev.name,n),notify:!1,className:"shrink-0"}):(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:(0,t.jsx)(Q.RoutineMark,{className:"size-3.5"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(g.DialogTitle,{className:"sr-only",children:$?$.label:"New routine"}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:$?$.label:"New routine"}),$&&(0,t.jsxs)("p",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(Q.RoutineMark,{className:"size-3 shrink-0"}),(0,t.jsxs)("span",{className:"truncate",children:[$.bot," · ",X($.schedule),$.enabled&&` \xb7 next ${(0,R.whenOf)($.nextRunAt)}`]})]})]}),$&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Switch,{checked:$.enabled,onCheckedChange:e=>void Y($.id,{enabled:e}).catch(()=>{}),"aria-label":`${$.label} on or off`,className:"mr-1 shrink-0"}),(0,t.jsxs)(b.DropdownMenu,{children:[(0,t.jsx)(b.DropdownMenuTrigger,{render:(0,t.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"More",className:"text-muted-foreground"}),children:(0,t.jsx)(u.MoreHorizontal,{})}),(0,t.jsx)(b.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(b.DropdownMenuItem,{variant:"destructive",onClick:ek,children:[(0,t.jsx)(h.Trash2,{}),"Delete"]})})]})]}),(0,t.jsx)(g.DialogClose,{render:(0,t.jsx)(p.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the routine"}),children:(0,t.jsx)(m.X,{})})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto px-5 pt-3 pb-5",children:[(0,t.jsxs)(eb,{label:"Name",htmlFor:"routine-name",children:[(0,t.jsx)(j.Input,{id:"routine-name",value:W.label,onChange:e=>H({label:e.target.value}),onBlur:()=>{let e=W.label.trim();e&&e!==$?.label&&ej({label:e})},placeholder:"Morning mail",maxLength:80,autoFocus:!$}),(0,t.jsx)(ec,{children:"What it is called in this list, and what she calls it on a call."})]}),(0,t.jsxs)(eb,{label:"Bot",children:[(0,t.jsxs)(b.DropdownMenu,{children:[(0,t.jsxs)(b.DropdownMenuTrigger,{render:(0,t.jsx)(p.Button,{variant:"outline",className:"justify-start gap-2 pl-1.5 font-normal"}),children:[ev?(0,t.jsx)(M.BotMark,{size:20,seed:ev.name,...Z(ev.name,n),notify:!1,className:"shrink-0"}):null,(0,t.jsx)("span",{className:(0,z.cn)(!ev&&"pl-1.5 text-muted-foreground"),children:ev?.name??(W.bot||"Pick a bot")}),(0,t.jsx)(l.ChevronDown,{className:"ml-1 size-3.5 text-muted-foreground"})]}),(0,t.jsx)(b.DropdownMenuContent,{align:"start",children:(0,t.jsx)(b.DropdownMenuGroup,{children:n.filter(e=>!e.disabled).map(e=>(0,t.jsxs)(b.DropdownMenuItem,{onClick:()=>{H({bot:e.name}),e.name!==$?.bot&&ej({bot:e.name})},children:[(0,t.jsx)(M.BotMark,{size:16,seed:e.name,...Z(e.name,n),notify:!1,className:"shrink-0"}),e.name]},e.name))})})]}),(0,t.jsx)(ec,{children:"Who does the job each time it starts."})]}),(0,t.jsx)(eb,{label:"When",children:(0,t.jsxs)("div",{className:"space-y-3.5",children:[(0,t.jsx)(k.Segmented,{"aria-label":"How it starts",value:W.kind,onChange:e=>ey({kind:e}),options:[{value:"once",label:"Once"},{value:"daily",label:"On set days"},{value:"every",label:"Every few hours"}]}),(0,t.jsx)("div",{className:"space-y-2.5",children:"once"===W.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(em,{word:"On",children:(0,t.jsx)(ef,{value:W.date,onPick:e=>ey({date:e})})}),(0,t.jsxs)(em,{word:"At",children:[(0,t.jsx)(ep,{value:W.time,onChange:e=>H({time:e}),onDone:()=>ey({})}),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"or"}),(0,t.jsx)(eh,{picked:!1,onClick:()=>{let e;return ey(((e=new Date(Date.now()+36e5)).setMinutes(5*Math.ceil(e.getMinutes()/5),0,0),{date:en(0,e),time:`${et(e.getHours())}:${et(e.getMinutes())}`}))},children:"In an hour"})]})]}):"daily"===W.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(em,{word:"On",children:P.map(e=>{let n=W.days.includes(e);return(0,t.jsx)(eh,{picked:n,"aria-label":eo[e-1],onClick:()=>ey({days:n?W.days.filter(t=>t!==e):[...W.days,e].sort((e,t)=>e-t)}),children:er[e-1]},e)})}),(0,t.jsx)(em,{children:el.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>ey({days:[...e.days]}),className:"h-6.5 rounded-full bg-muted px-2.5 text-xs text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:e.label},e.label))}),(0,t.jsx)(em,{word:"At",children:(0,t.jsx)(ep,{value:W.time,onChange:e=>H({time:e}),onDone:()=>ey({})})})]}):(0,t.jsxs)(em,{word:"Every",children:[(ed.includes(W.hours)?ed:[...ed,W.hours].sort((e,t)=>e-t)).map(e=>(0,t.jsx)(eh,{picked:e===W.hours,onClick:()=>ey({hours:e}),className:"min-w-10 px-3",children:e},e)),(0,t.jsx)("span",{className:"text-[13px] text-muted-foreground",children:"hours"})]})}),(0,t.jsx)(eg,{schedule:ee,kind:W.kind})]})}),(0,t.jsxs)(eb,{label:"Job",htmlFor:"routine-request",children:[(0,t.jsx)(N.Textarea,{id:"routine-request",value:W.request,onChange:e=>H({request:e.target.value}),onBlur:()=>{let e=W.request.trim();e&&e!==$?.request&&ej({request:e})},placeholder:"Go through the mail that came since the last run and draft replies to what needs one. Send nothing.",className:"min-h-28"}),(0,t.jsx)(ec,{children:"Handed to the bot as a new thread each time, with a line on how the last run ended. Nobody is there to ask, so say everything it needs."})]}),$&&(0,t.jsxs)("div",{className:"pt-1",children:[(0,t.jsx)("div",{className:"flex h-6 items-center",children:(0,t.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Runs"})}),0===$.runs.length?(0,t.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Not run yet."}):$.runs.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.id,void(C.useSettingsStore.getState().hide(),T.roomOpens.open(t))},className:"flex h-9 w-full items-center gap-3 border-t border-border/60 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"w-28 shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,R.whenOf)(e.updatedAt)}),(0,t.jsx)("span",{className:(0,z.cn)("min-w-0 flex-1 truncate","waiting"===e.status?z.WAITING_INK:"text-muted-foreground"),children:"running"===e.status?"Running now":e.outcome?(0,z.plainText)(e.outcome):"cancelled"===e.status?"Stopped":"No words"}),(0,t.jsx)(o.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground"})]},e.id))]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-t border-border/60 px-5 py-3",children:[(0,t.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-4 text-muted-foreground",children:$||ex?"Starts while Thursday is running on this computer, with a tab open unless work goes on with the app closed. A time that passed meanwhile starts once, not once for each.":`Still needs ${s=W,r=ee,(d=[s.label.trim()?null:"a name",s.bot?null:"a bot",!r?"a time":es(r)?"a time still ahead":null,s.request.trim()?null:"a job"].filter(e=>null!==e)).length>1?`${d.slice(0,-1).join(", ")} and ${d.at(-1)}`:d[0]??"nothing"}.`}),$?(0,t.jsxs)(p.Button,{variant:"outline",size:"sm",loading:V,disabled:ew,title:ew?"Its last run is still open":void 0,onClick:()=>void _($.id).catch(()=>{}),children:[(0,t.jsx)(c.Play,{}),"Run now"]}):(0,t.jsx)(p.Button,{variant:"brand",size:"sm",loading:G,disabled:!ex,onClick:()=>ex&&void L(ex).catch(()=>{}),children:"Create"})]})]})})})})]})}let ec=({children:e})=>(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e});function eh({picked:e,className:n,...a}){return(0,t.jsx)("button",{type:"button","aria-pressed":e,className:(0,z.cn)("inline-flex h-8 items-center justify-center gap-1.5 rounded-full px-3.5 text-[13px] whitespace-nowrap outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",e?"bg-brand font-medium text-brand-foreground":"text-foreground ring-1 ring-border ring-inset hover:bg-muted",n),...a})}function em({word:e,children:n}){return(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)("span",{className:"flex h-8 w-9 shrink-0 items-center text-[13px] text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5",children:n})]})}function ex(e){let t=H(`${e} 00:00`),a=(t.getTime()-H(`${en(0)} 00:00`).getTime())/864e5;return(0,n.format)(t,a<7?"EEE d":"EEE, MMM d")}function ef({value:e,onPick:n}){let a=(0,x.useRef)(null),i=[0,1,2,3].map(e=>en(e)),s=()=>a.current?.showPicker();return(0,t.jsxs)(t.Fragment,{children:[i.map((a,i)=>(0,t.jsx)(eh,{picked:a===e,onClick:()=>n(a),children:0===i?"Today":1===i?"Tomorrow":ex(a)},a)),!i.includes(e)&&(0,t.jsx)(eh,{picked:!0,onClick:s,children:ex(e)}),(0,t.jsxs)("span",{className:"relative",children:[(0,t.jsx)(eh,{picked:!1,"aria-label":"Another day",onClick:s,className:"w-8 px-0",children:(0,t.jsx)(r,{className:"size-3.5"})}),(0,t.jsx)("input",{ref:a,type:"date",tabIndex:-1,"aria-hidden":!0,min:i[0],value:e,onChange:e=>e.target.value&&n(e.target.value),className:"pointer-events-none absolute inset-0 opacity-0"})]})]})}function ep({value:e,onChange:n,onDone:a}){return(0,t.jsx)(j.Input,{type:"time","aria-label":"Time of day",value:e,onChange:e=>n(e.target.value),onBlur:a,onClick:e=>e.currentTarget.showPicker?.(),className:"h-8.5 w-28 px-3 text-[15px] tabular-nums md:text-[15px] [&::-webkit-calendar-picker-indicator]:hidden"})}function eg({schedule:e,kind:n}){if(!e||es(e))return(0,t.jsx)("p",{className:"text-xs text-destructive",children:e?"That time has passed. Pick a later one.":"daily"===n?"Pick a time and at least one day.":"Pick a time."});let i=function(e,t){if("once"===e.kind)return H(e.at);if("every"===e.kind)return new Date(t.getTime()+36e5*e.hours);let[n,a]=e.time.split(":").map(Number);for(let i=0;i<=7;i++){let s=new Date(t);s.setDate(s.getDate()+i),s.setHours(n,a,0,0);let r=0===s.getDay()?7:s.getDay();if(s>t&&e.days.includes(r))return s}return new Date(t.getTime()+864e5)}(e,new Date);return(0,t.jsxs)("p",{className:"flex items-start gap-2 text-[13px] leading-5",children:[(0,t.jsx)(Q.RoutineMark,{className:"mt-0.75 size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("span",{className:"min-w-0",children:[X(e),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" · ","once"===e.kind?`${(0,a.formatDistanceToNowStrict)(i,{addSuffix:!0})}, then it switches itself off`:`first start ${(0,R.whenOf)(i)}`]})]})]})}function eb({label:e,htmlFor:n,children:a}){return(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("label",{htmlFor:n,className:"w-14 shrink-0 pt-2 font-mono text-xs text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"min-w-0 flex-1 space-y-1.5",children:a})]})}e.s(["RoutineSetting",0,function(){let[e,n]=(0,x.useState)(null),{data:a,isLoading:i,error:s}=(0,A.useServerRoute)(f.queryKey.routines),{data:r}=(0,A.useServerRoute)(f.queryKey.bot),[l]=(0,O.useServerAction)(K,{onOk:()=>(0,A.revalidate)(f.queryKey.routines)});if(i)return(0,t.jsx)($.SettingSkeleton,{rows:3});if(s)return(0,t.jsx)($.SettingError,{message:s.message});let o=a??[],d=o.filter(e=>e.enabled).length,u=o.find(t=>t.id===e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.SettingScreen,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)($.SettingRailNote,{children:[o.length," of ",S.ROUTINE.max," · ",d," on"]}),(0,t.jsx)(D.KeepWorkingSwitch,{})]}),children:(0,t.jsx)($.SettingItems,{addRow:o.length<S.ROUTINE.max?{label:"New routine",onClick:()=>n("new")}:void 0,children:0===o.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:'Nothing starts by itself yet. Tell Thursday what should — "every weekday at nine, go through my mail" — or make one here.'}):o.map(a=>(0,t.jsx)(ee,{routine:a,bots:r,open:a.id===e,onOpen:()=>n(a.id),onSwitch:e=>l(a.id,{enabled:e})},a.id))})}),(0,t.jsx)(eu,{routine:"new"===e?"new":u??null,bots:r??[],onClose:()=>n(null),onMade:e=>n(e)})]})}],480869)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},21357,e=>{"use strict";var t=e.i(456420);let n={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};n.node;let a=(0,t.default)(n);e.s(["Play",0,a],21357)},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let a=(0,t.default)(n);e.s(["Trash2",0,a],759659)}]);
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,801891,t=>{"use strict";var e=t.i(658679),a=t.i(865264),r=t.i(58137),i=t.i(447804),s=t.i(60231),n=t.i(508324),o=t.i(419524);t.i(947716);var c=t.i(723685),l=t.i(139941),d=function(){var t=(0,o.__name)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],i=[2,4],s=[1,9],n=[1,11],c=[1,12],l=[1,14],d=[1,15],h=[1,17],p=[1,18],T=[1,19],E=[1,25],g=[1,26],_=[1,27],u=[1,28],m=[1,29],x=[1,30],O=[1,31],y=[1,32],b=[1,33],f=[1,34],I=[1,35],R=[1,36],L=[1,37],P=[1,38],N=[1,39],S=[1,40],w=[1,42],D=[1,43],A=[1,44],k=[1,45],M=[1,46],C=[1,47],v=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Y=[1,74],B=[1,80],$=[1,81],V=[1,82],W=[1,83],K=[1,84],F=[1,85],q=[1,86],H=[1,87],z=[1,88],U=[1,89],j=[1,90],G=[1,91],X=[1,92],J=[1,93],Z=[1,94],Q=[1,95],tt=[1,96],te=[1,97],ta=[1,98],tr=[1,99],ti=[1,100],ts=[1,101],tn=[1,102],to=[1,103],tc=[1,104],tl=[1,105],td=[2,78],th=[4,5,17,51,53,54],tp=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],tT=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],tE=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],tg=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],t_=[5,52],tu=[70,71,72,73],tm=[1,151],tx={trace:(0,o.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,o.__name)(function(t,e,a,r,i,s,n){var o=s.length-1;switch(i){case 3:return r.apply(s[o]),s[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:s[o-1].push(s[o]),this.$=s[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=s[o];break;case 16:s[o].type="createParticipant",this.$=s[o];break;case 17:s[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(s[o-2])}),s[o-1].push({type:"boxEnd",boxText:s[o-2]}),this.$=s[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-2]),sequenceIndexStep:Number(s[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-1].actor};break;case 30:r.setDiagramTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 31:r.setDiagramTitle(s[o].substring(7)),this.$=s[o].substring(7);break;case 32:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 35:s[o-1].unshift({type:"loopStart",loopText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.LOOP_START}),s[o-1].push({type:"loopEnd",loopText:s[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=s[o-1];break;case 36:s[o-1].unshift({type:"rectStart",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_START}),s[o-1].push({type:"rectEnd",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=s[o-1];break;case 37:s[o-1].unshift({type:"optStart",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_START}),s[o-1].push({type:"optEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=s[o-1];break;case 38:s[o-1].unshift({type:"altStart",altText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.ALT_START}),s[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=s[o-1];break;case 39:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 40:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 41:s[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.CRITICAL_START}),s[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=s[o-1];break;case 42:s[o-1].unshift({type:"breakStart",breakText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_START}),s[o-1].push({type:"breakEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=s[o-1];break;case 44:this.$=s[o-3].concat([{type:"option",optionText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},s[o]]);break;case 46:this.$=s[o-3].concat([{type:"and",parText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.PAR_AND},s[o]]);break;case 48:this.$=s[o-3].concat([{type:"else",altText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.ALT_ELSE},s[o]]);break;case 49:case 54:s[o-3].draw="participant",s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 50:case 55:s[o-1].draw="participant",s[o-1].type="addParticipant",this.$=s[o-1];break;case 51:case 56:s[o-3].draw="actor",s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 52:case 57:s[o-1].draw="actor",s[o-1].type="addParticipant",this.$=s[o-1];break;case 53:s[o-1].type="destroyParticipant",this.$=s[o-1];break;case 58:this.$=[s[o-1],{type:"addNote",placement:s[o-2],actor:s[o-1].actor,text:s[o]}];break;case 59:s[o-2]=[].concat(s[o-1],s[o-1]).slice(0,2),s[o-2][0]=s[o-2][0].actor,s[o-2][1]=s[o-2][1].actor,this.$=[s[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:s[o-2].slice(0,2),text:s[o]}];break;case 60:this.$=[s[o-1],{type:"addLinks",actor:s[o-1].actor,text:s[o]}];break;case 61:this.$=[s[o-1],{type:"addALink",actor:s[o-1].actor,text:s[o]}];break;case 62:this.$=[s[o-1],{type:"addProperties",actor:s[o-1].actor,text:s[o]}];break;case 63:this.$=[s[o-1],{type:"addDetails",actor:s[o-1].actor,text:s[o]}];break;case 66:this.$=[s[o-2],s[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1].actor}];break;case 71:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-4].actor}];break;case 72:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:s[o-1].actor}];break;case 73:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:s[o-4].actor}];break;case 74:this.$=[s[o-5],s[o-1],{type:"addMessage",from:s[o-5].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:s[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:s[o-5].actor}];break;case 75:this.$=[s[o-3],s[o-1],{type:"addMessage",from:s[o-3].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o]}];break;case 76:this.$={type:"addParticipant",actor:s[o-1],config:s[o]};break;case 77:this.$=s[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:s[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(s[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},t(v,[2,5]),{9:48,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,15]),{13:49,51:P,53:N,54:S},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:C},{23:56,73:C},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(v,[2,30]),t(v,[2,31]),{33:[1,62]},{35:[1,63]},t(v,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Y},{23:75,55:76,73:Y},{23:77,73:C},{69:78,72:[1,79],78:B,79:$,80:V,81:W,82:K,83:F,84:q,85:H,86:z,87:U,88:j,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:te,96:ta,97:tr,98:ti,99:ts,100:tn,101:to,102:tc,103:tl},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:C},{23:111,73:C},{23:112,73:C},{23:113,73:C},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],td),t(v,[2,6]),t(v,[2,16]),t(th,[2,10],{11:114}),t(v,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(v,[2,22]),{5:[1,118]},{5:[1,119]},t(v,[2,25]),t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,29]),t(v,[2,32]),t(v,[2,33]),t(tp,i,{7:120}),t(tp,i,{7:121}),t(tp,i,{7:122}),t(tT,i,{41:123,7:124}),t(tE,i,{43:125,7:126}),t(tE,i,{7:126,43:127}),t(tg,i,{46:128,7:129}),t(tp,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(t_,td,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:C},{69:146,78:B,79:$,80:V,81:W,82:K,83:F,84:q,85:H,86:z,87:U,88:j,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:te,96:ta,97:tr,98:ti,99:ts,100:tn,101:to,102:tc,103:tl},t(tu,[2,79]),t(tu,[2,80]),t(tu,[2,81]),t(tu,[2,82]),t(tu,[2,83]),t(tu,[2,84]),t(tu,[2,85]),t(tu,[2,86]),t(tu,[2,87]),t(tu,[2,88]),t(tu,[2,89]),t(tu,[2,90]),t(tu,[2,91]),t(tu,[2,92]),t(tu,[2,93]),t(tu,[2,94]),t(tu,[2,95]),t(tu,[2,96]),t(tu,[2,97]),t(tu,[2,98]),t(tu,[2,99]),t(tu,[2,100]),t(tu,[2,101]),t(tu,[2,102]),t(tu,[2,103]),t(tu,[2,104]),{23:147,73:C},{23:149,60:148,73:C},{73:[2,68]},{73:[2,69]},{58:150,104:tm},{58:152,104:tm},{58:153,104:tm},{58:154,104:tm},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:P,53:N,54:S},{5:[1,160]},t(v,[2,20]),t(v,[2,21]),t(v,[2,23]),t(v,[2,24]),{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[1,161],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[1,162],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[1,163],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{17:[1,164]},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[2,47],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,50:[1,165],51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{17:[1,166]},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[2,45],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,49:[1,167],51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{17:[1,168]},{17:[1,169]},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[2,43],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,48:[1,170],51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[1,171],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{16:[1,172]},t(v,[2,50]),{16:[1,173]},t(v,[2,55]),t(t_,[2,76]),{76:[1,174]},{16:[1,175]},t(v,[2,52]),{16:[1,176]},t(v,[2,57]),t(v,[2,53]),{23:177,73:C},{23:178,73:C},{23:179,73:C},{58:180,104:tm},{23:181,72:[1,182],73:C},{58:183,104:tm},{58:184,104:tm},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(v,[2,17]),t(th,[2,11]),{13:186,51:P,53:N,54:S},t(th,[2,13]),t(th,[2,14]),t(v,[2,19]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,38]),{16:[1,187]},t(v,[2,39]),{16:[1,188]},t(v,[2,40]),t(v,[2,41]),{16:[1,189]},t(v,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:tm},{58:196,104:tm},{58:197,104:tm},{5:[2,75]},{58:198,104:tm},{23:199,73:C},{5:[2,58]},{5:[2,59]},{23:200,73:C},t(th,[2,12]),t(tT,i,{7:124,41:201}),t(tE,i,{7:126,43:202}),t(tg,i,{7:129,46:203}),t(v,[2,49]),t(v,[2,54]),t(t_,[2,77]),t(v,[2,51]),t(v,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:tm},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,o.__name)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,o.__name)(function(t){var e=this,a=[0],r=[],i=[null],s=[],n=this.table,c="",l=0,d=0,h=0,p=s.slice.call(arguments,1),T=Object.create(this.lexer),E={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E[g]=this.yy[g]);T.setInput(t,E),E.lexer=T,E.parser=this,void 0===T.yylloc&&(T.yylloc={});var _=T.yylloc;s.push(_);var u=T.options&&T.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||T.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof E.parseError?this.parseError=E.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.__name)(function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,o.__name)(m,"lex");for(var x,O,y,b,f,I,R,L,P,N={};;){if(y=a[a.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(null==x&&(x=m()),b=n[y]&&n[y][x]),void 0===b||!b.length||!b[0]){var S="";for(I in P=[],n[y])this.terminals_[I]&&I>2&&P.push("'"+this.terminals_[I]+"'");S=T.showPosition?"Parse error on line "+(l+1)+":\n"+T.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:T.match,token:this.terminals_[x]||x,line:T.yylineno,loc:_,expected:P})}if(b[0]instanceof Array&&b.length>1)throw Error("Parse Error: multiple actions possible at state: "+y+", token: "+x);switch(b[0]){case 1:a.push(x),i.push(T.yytext),s.push(T.yylloc),a.push(b[1]),x=null,O?(x=O,O=null):(d=T.yyleng,c=T.yytext,l=T.yylineno,_=T.yylloc,h>0&&h--);break;case 2:if(R=this.productions_[b[1]][1],N.$=i[i.length-R],N._$={first_line:s[s.length-(R||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(R||1)].first_column,last_column:s[s.length-1].last_column},u&&(N._$.range=[s[s.length-(R||1)].range[0],s[s.length-1].range[1]]),void 0!==(f=this.performAction.apply(N,[c,d,l,E,b[1],i,s].concat(p))))return f;R&&(a=a.slice(0,-1*R*2),i=i.slice(0,-1*R),s=s.slice(0,-1*R)),a.push(this.productions_[b[1]][0]),i.push(N.$),s.push(N._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0},"parse")};function tO(){this.yy={}}return tx.lexer={EOF:1,parseError:(0,o.__name)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,o.__name)(function(t,e){return this.yy=e||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:(0,o.__name)(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:(0,o.__name)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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),a.length-1&&(this.yylineno-=a.length-1);var i=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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.__name)(function(){return this._more=!0,this},"more"),reject:(0,o.__name)(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:(0,o.__name)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.__name)(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:(0,o.__name)(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:(0,o.__name)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.__name)(function(t,e){var a,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var s in i)this[s]=i[s];return!1},"test_match"),next:(0,o.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,i=this._currentRules(),s=0;s<i.length;s++)if((a=this._input.match(this.rules[i[s]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&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:(0,o.__name)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.__name)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.__name)(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:(0,o.__name)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.__name)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.__name)(function(t,e,a,r){switch(a){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}},(0,o.__name)(tO,"Parser"),tO.prototype=tx,tx.Parser=tO,new tO}();d.parser=d;var h={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},p={FILLED:0,OPEN:1},T={LEFTOF:0,RIGHTOF:1,OVER:2},E=class{constructor(){this.state=new e.ImperativeState(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=s.setAccTitle,this.setAccDescription=s.setAccDescription,this.setDiagramTitle=s.setDiagramTitle,this.getAccTitle=s.getAccTitle,this.getAccDescription=s.getAccDescription,this.getDiagramTitle=s.getDiagramTitle,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,s.getConfig2)().wrap),this.LINETYPE=h,this.ARROWTYPE=p,this.PLACEMENT=T}static{(0,o.__name)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,i,s){let n,o=this.state.records.currentBox;if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}",n=(0,a.load)(t,{schema:a.JSON_SCHEMA})}i=n?.type??i,n?.alias&&(!r||r.text===e)&&(r={text:n.alias,wrap:r?.wrap,type:i});let c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==r)return}if(r?.text==null&&(r={text:e,type:i}),(null==i||null==r.text)&&(r={text:e,type:i}),this.state.records.actors.set(t,{box:o,name:e,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){let e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,e,a,r,i=!1,s){if(r===this.LINETYPE.ACTIVE_END&&1>this.activationCount(t??"")){let e=Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();let e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,s.getConfig2)().sequence?.wrap??!1}clear(){this.state.reset(),(0,s.clear)()}parseMessage(t){let e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),i={text:r,wrap:a};return n.log.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{let e=new Option().style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}let{wrap:i,cleanedText:n}=this.extractWrap(r);return{text:n?(0,s.sanitizeText)(n,(0,s.getConfig2)()):void 0,color:a,wrap:i}}addNote(t,e,a){let r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},i=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){let a=this.getActor(t);try{let t=(0,s.sanitizeText)(e.text,(0,s.getConfig2)());t=(t=t.replace(/&equals;/g,"=")).replace(/&amp;/g,"&");let r=JSON.parse(t);this.insertLinks(a,r)}catch(t){n.log.error("error while parsing actor link text",t)}}addALink(t,e){let a=this.getActor(t);try{let t={},r=(0,s.sanitizeText)(e.text,(0,s.getConfig2)()),i=r.indexOf("@"),n=(r=(r=r.replace(/&equals;/g,"=")).replace(/&amp;/g,"&")).slice(0,i-1).trim(),o=r.slice(i+1).trim();t[n]=o,this.insertLinks(a,t)}catch(t){n.log.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}addProperties(t,e){let a=this.getActor(t);try{let t=(0,s.sanitizeText)(e.text,(0,s.getConfig2)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(t){n.log.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){let a=this.getActor(t),r=document.getElementById(e.text);try{let t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(t){n.log.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(t?.properties!==void 0)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated)if(t.to!==this.state.records.lastCreated)throw Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");else this.state.records.lastCreated=void 0;else if(this.state.records.lastDestroyed)if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");else this.state.records.lastDestroyed=void 0;this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,s.setAccTitle)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,s.getConfig2)().sequence}},g=(0,o.__name)(t=>{let e=t.dropShadow??"none",{look:a}=(0,s.getConfig2)();return`.actor {
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,801891,t=>{"use strict";var e=t.i(658679),a=t.i(865264),r=t.i(58137),i=t.i(447804),s=t.i(60231),n=t.i(508324),o=t.i(419524);t.i(947716);var c=t.i(723685),l=t.i(779879),d=function(){var t=(0,o.__name)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],i=[2,4],s=[1,9],n=[1,11],c=[1,12],l=[1,14],d=[1,15],h=[1,17],p=[1,18],T=[1,19],E=[1,25],g=[1,26],_=[1,27],u=[1,28],m=[1,29],x=[1,30],O=[1,31],y=[1,32],b=[1,33],f=[1,34],I=[1,35],R=[1,36],L=[1,37],P=[1,38],N=[1,39],S=[1,40],w=[1,42],D=[1,43],A=[1,44],k=[1,45],M=[1,46],C=[1,47],v=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Y=[1,74],B=[1,80],$=[1,81],V=[1,82],W=[1,83],K=[1,84],F=[1,85],q=[1,86],H=[1,87],z=[1,88],U=[1,89],j=[1,90],G=[1,91],X=[1,92],J=[1,93],Z=[1,94],Q=[1,95],tt=[1,96],te=[1,97],ta=[1,98],tr=[1,99],ti=[1,100],ts=[1,101],tn=[1,102],to=[1,103],tc=[1,104],tl=[1,105],td=[2,78],th=[4,5,17,51,53,54],tp=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],tT=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],tE=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],tg=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],t_=[5,52],tu=[70,71,72,73],tm=[1,151],tx={trace:(0,o.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,o.__name)(function(t,e,a,r,i,s,n){var o=s.length-1;switch(i){case 3:return r.apply(s[o]),s[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:s[o-1].push(s[o]),this.$=s[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=s[o];break;case 16:s[o].type="createParticipant",this.$=s[o];break;case 17:s[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(s[o-2])}),s[o-1].push({type:"boxEnd",boxText:s[o-2]}),this.$=s[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-2]),sequenceIndexStep:Number(s[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(s[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-1].actor};break;case 30:r.setDiagramTitle(s[o].substring(6)),this.$=s[o].substring(6);break;case 31:r.setDiagramTitle(s[o].substring(7)),this.$=s[o].substring(7);break;case 32:this.$=s[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=s[o].trim(),r.setAccDescription(this.$);break;case 35:s[o-1].unshift({type:"loopStart",loopText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.LOOP_START}),s[o-1].push({type:"loopEnd",loopText:s[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=s[o-1];break;case 36:s[o-1].unshift({type:"rectStart",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_START}),s[o-1].push({type:"rectEnd",color:r.parseMessage(s[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=s[o-1];break;case 37:s[o-1].unshift({type:"optStart",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_START}),s[o-1].push({type:"optEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=s[o-1];break;case 38:s[o-1].unshift({type:"altStart",altText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.ALT_START}),s[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=s[o-1];break;case 39:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 40:s[o-1].unshift({type:"parStart",parText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),s[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=s[o-1];break;case 41:s[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.CRITICAL_START}),s[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=s[o-1];break;case 42:s[o-1].unshift({type:"breakStart",breakText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_START}),s[o-1].push({type:"breakEnd",optText:r.parseMessage(s[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=s[o-1];break;case 44:this.$=s[o-3].concat([{type:"option",optionText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},s[o]]);break;case 46:this.$=s[o-3].concat([{type:"and",parText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.PAR_AND},s[o]]);break;case 48:this.$=s[o-3].concat([{type:"else",altText:r.parseMessage(s[o-1]),signalType:r.LINETYPE.ALT_ELSE},s[o]]);break;case 49:case 54:s[o-3].draw="participant",s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 50:case 55:s[o-1].draw="participant",s[o-1].type="addParticipant",this.$=s[o-1];break;case 51:case 56:s[o-3].draw="actor",s[o-3].type="addParticipant",s[o-3].description=r.parseMessage(s[o-1]),this.$=s[o-3];break;case 52:case 57:s[o-1].draw="actor",s[o-1].type="addParticipant",this.$=s[o-1];break;case 53:s[o-1].type="destroyParticipant",this.$=s[o-1];break;case 58:this.$=[s[o-1],{type:"addNote",placement:s[o-2],actor:s[o-1].actor,text:s[o]}];break;case 59:s[o-2]=[].concat(s[o-1],s[o-1]).slice(0,2),s[o-2][0]=s[o-2][0].actor,s[o-2][1]=s[o-2][1].actor,this.$=[s[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:s[o-2].slice(0,2),text:s[o]}];break;case 60:this.$=[s[o-1],{type:"addLinks",actor:s[o-1].actor,text:s[o]}];break;case 61:this.$=[s[o-1],{type:"addALink",actor:s[o-1].actor,text:s[o]}];break;case 62:this.$=[s[o-1],{type:"addProperties",actor:s[o-1].actor,text:s[o]}];break;case 63:this.$=[s[o-1],{type:"addDetails",actor:s[o-1].actor,text:s[o]}];break;case 66:this.$=[s[o-2],s[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:s[o-1].actor}];break;case 71:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:s[o-4].actor}];break;case 72:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:s[o-1].actor}];break;case 73:this.$=[s[o-4],s[o-1],{type:"addMessage",from:s[o-4].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:s[o-4].actor}];break;case 74:this.$=[s[o-5],s[o-1],{type:"addMessage",from:s[o-5].actor,to:s[o-1].actor,signalType:s[o-3],msg:s[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:s[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:s[o-5].actor}];break;case 75:this.$=[s[o-3],s[o-1],{type:"addMessage",from:s[o-3].actor,to:s[o-1].actor,signalType:s[o-2],msg:s[o]}];break;case 76:this.$={type:"addParticipant",actor:s[o-1],config:s[o]};break;case 77:this.$=s[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:s[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(s[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},t(v,[2,5]),{9:48,13:13,14:l,15:d,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,15]),{13:49,51:P,53:N,54:S},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:C},{23:56,73:C},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(v,[2,30]),t(v,[2,31]),{33:[1,62]},{35:[1,63]},t(v,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Y},{23:75,55:76,73:Y},{23:77,73:C},{69:78,72:[1,79],78:B,79:$,80:V,81:W,82:K,83:F,84:q,85:H,86:z,87:U,88:j,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:te,96:ta,97:tr,98:ti,99:ts,100:tn,101:to,102:tc,103:tl},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:C},{23:111,73:C},{23:112,73:C},{23:113,73:C},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],td),t(v,[2,6]),t(v,[2,16]),t(th,[2,10],{11:114}),t(v,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(v,[2,22]),{5:[1,118]},{5:[1,119]},t(v,[2,25]),t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,29]),t(v,[2,32]),t(v,[2,33]),t(tp,i,{7:120}),t(tp,i,{7:121}),t(tp,i,{7:122}),t(tT,i,{41:123,7:124}),t(tE,i,{43:125,7:126}),t(tE,i,{7:126,43:127}),t(tg,i,{46:128,7:129}),t(tp,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(t_,td,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:C},{69:146,78:B,79:$,80:V,81:W,82:K,83:F,84:q,85:H,86:z,87:U,88:j,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:te,96:ta,97:tr,98:ti,99:ts,100:tn,101:to,102:tc,103:tl},t(tu,[2,79]),t(tu,[2,80]),t(tu,[2,81]),t(tu,[2,82]),t(tu,[2,83]),t(tu,[2,84]),t(tu,[2,85]),t(tu,[2,86]),t(tu,[2,87]),t(tu,[2,88]),t(tu,[2,89]),t(tu,[2,90]),t(tu,[2,91]),t(tu,[2,92]),t(tu,[2,93]),t(tu,[2,94]),t(tu,[2,95]),t(tu,[2,96]),t(tu,[2,97]),t(tu,[2,98]),t(tu,[2,99]),t(tu,[2,100]),t(tu,[2,101]),t(tu,[2,102]),t(tu,[2,103]),t(tu,[2,104]),{23:147,73:C},{23:149,60:148,73:C},{73:[2,68]},{73:[2,69]},{58:150,104:tm},{58:152,104:tm},{58:153,104:tm},{58:154,104:tm},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:P,53:N,54:S},{5:[1,160]},t(v,[2,20]),t(v,[2,21]),t(v,[2,23]),t(v,[2,24]),{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[1,161],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[1,162],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[1,163],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{17:[1,164]},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[2,47],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,50:[1,165],51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{17:[1,166]},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[2,45],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,49:[1,167],51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{17:[1,168]},{17:[1,169]},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[2,43],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,48:[1,170],51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{4:s,5:n,8:8,9:10,10:c,13:13,14:l,15:d,17:[1,171],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:_,34:u,36:m,37:x,38:O,39:y,40:b,42:f,44:I,45:R,47:L,51:P,53:N,54:S,56:w,61:D,62:A,63:k,64:M,73:C},{16:[1,172]},t(v,[2,50]),{16:[1,173]},t(v,[2,55]),t(t_,[2,76]),{76:[1,174]},{16:[1,175]},t(v,[2,52]),{16:[1,176]},t(v,[2,57]),t(v,[2,53]),{23:177,73:C},{23:178,73:C},{23:179,73:C},{58:180,104:tm},{23:181,72:[1,182],73:C},{58:183,104:tm},{58:184,104:tm},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(v,[2,17]),t(th,[2,11]),{13:186,51:P,53:N,54:S},t(th,[2,13]),t(th,[2,14]),t(v,[2,19]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,38]),{16:[1,187]},t(v,[2,39]),{16:[1,188]},t(v,[2,40]),t(v,[2,41]),{16:[1,189]},t(v,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:tm},{58:196,104:tm},{58:197,104:tm},{5:[2,75]},{58:198,104:tm},{23:199,73:C},{5:[2,58]},{5:[2,59]},{23:200,73:C},t(th,[2,12]),t(tT,i,{7:124,41:201}),t(tE,i,{7:126,43:202}),t(tg,i,{7:129,46:203}),t(v,[2,49]),t(v,[2,54]),t(t_,[2,77]),t(v,[2,51]),t(v,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:tm},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,o.__name)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,o.__name)(function(t){var e=this,a=[0],r=[],i=[null],s=[],n=this.table,c="",l=0,d=0,h=0,p=s.slice.call(arguments,1),T=Object.create(this.lexer),E={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E[g]=this.yy[g]);T.setInput(t,E),E.lexer=T,E.parser=this,void 0===T.yylloc&&(T.yylloc={});var _=T.yylloc;s.push(_);var u=T.options&&T.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||T.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof E.parseError?this.parseError=E.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.__name)(function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,o.__name)(m,"lex");for(var x,O,y,b,f,I,R,L,P,N={};;){if(y=a[a.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(null==x&&(x=m()),b=n[y]&&n[y][x]),void 0===b||!b.length||!b[0]){var S="";for(I in P=[],n[y])this.terminals_[I]&&I>2&&P.push("'"+this.terminals_[I]+"'");S=T.showPosition?"Parse error on line "+(l+1)+":\n"+T.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:T.match,token:this.terminals_[x]||x,line:T.yylineno,loc:_,expected:P})}if(b[0]instanceof Array&&b.length>1)throw Error("Parse Error: multiple actions possible at state: "+y+", token: "+x);switch(b[0]){case 1:a.push(x),i.push(T.yytext),s.push(T.yylloc),a.push(b[1]),x=null,O?(x=O,O=null):(d=T.yyleng,c=T.yytext,l=T.yylineno,_=T.yylloc,h>0&&h--);break;case 2:if(R=this.productions_[b[1]][1],N.$=i[i.length-R],N._$={first_line:s[s.length-(R||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(R||1)].first_column,last_column:s[s.length-1].last_column},u&&(N._$.range=[s[s.length-(R||1)].range[0],s[s.length-1].range[1]]),void 0!==(f=this.performAction.apply(N,[c,d,l,E,b[1],i,s].concat(p))))return f;R&&(a=a.slice(0,-1*R*2),i=i.slice(0,-1*R),s=s.slice(0,-1*R)),a.push(this.productions_[b[1]][0]),i.push(N.$),s.push(N._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0},"parse")};function tO(){this.yy={}}return tx.lexer={EOF:1,parseError:(0,o.__name)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,o.__name)(function(t,e){return this.yy=e||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:(0,o.__name)(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:(0,o.__name)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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),a.length-1&&(this.yylineno-=a.length-1);var i=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:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.__name)(function(){return this._more=!0,this},"more"),reject:(0,o.__name)(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:(0,o.__name)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.__name)(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:(0,o.__name)(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:(0,o.__name)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.__name)(function(t,e){var a,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.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],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var s in i)this[s]=i[s];return!1},"test_match"),next:(0,o.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,r,i=this._currentRules(),s=0;s<i.length;s++)if((a=this._input.match(this.rules[i[s]]))&&(!e||a[0].length>e[0].length)){if(e=a,r=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&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:(0,o.__name)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.__name)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.__name)(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:(0,o.__name)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.__name)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.__name)(function(t,e,a,r){switch(a){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}},(0,o.__name)(tO,"Parser"),tO.prototype=tx,tx.Parser=tO,new tO}();d.parser=d;var h={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},p={FILLED:0,OPEN:1},T={LEFTOF:0,RIGHTOF:1,OVER:2},E=class{constructor(){this.state=new e.ImperativeState(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=s.setAccTitle,this.setAccDescription=s.setAccDescription,this.setDiagramTitle=s.setDiagramTitle,this.getAccTitle=s.getAccTitle,this.getAccDescription=s.getAccDescription,this.getDiagramTitle=s.getDiagramTitle,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,s.getConfig2)().wrap),this.LINETYPE=h,this.ARROWTYPE=p,this.PLACEMENT=T}static{(0,o.__name)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,i,s){let n,o=this.state.records.currentBox;if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}",n=(0,a.load)(t,{schema:a.JSON_SCHEMA})}i=n?.type??i,n?.alias&&(!r||r.text===e)&&(r={text:n.alias,wrap:r?.wrap,type:i});let c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==r)return}if(r?.text==null&&(r={text:e,type:i}),(null==i||null==r.text)&&(r={text:e,type:i}),this.state.records.actors.set(t,{box:o,name:e,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){let e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e<this.state.records.messages.length;e++)this.state.records.messages[e].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[e].from===t&&a++,this.state.records.messages[e].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[e].from===t&&a--;return a}addMessage(t,e,a,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a.text,wrap:a.wrap??this.autoWrap(),answer:r})}addSignal(t,e,a,r,i=!1,s){if(r===this.LINETYPE.ACTIVE_END&&1>this.activationCount(t??"")){let e=Error("Trying to inactivate an inactive participant ("+t+")");throw e.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:s??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();let e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,s.getConfig2)().sequence?.wrap??!1}clear(){this.state.reset(),(0,s.clear)()}parseMessage(t){let e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),i={text:r,wrap:a};return n.log.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{let e=new Option().style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}let{wrap:i,cleanedText:n}=this.extractWrap(r);return{text:n?(0,s.sanitizeText)(n,(0,s.getConfig2)()):void 0,color:a,wrap:i}}addNote(t,e,a){let r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},i=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){let a=this.getActor(t);try{let t=(0,s.sanitizeText)(e.text,(0,s.getConfig2)());t=(t=t.replace(/&equals;/g,"=")).replace(/&amp;/g,"&");let r=JSON.parse(t);this.insertLinks(a,r)}catch(t){n.log.error("error while parsing actor link text",t)}}addALink(t,e){let a=this.getActor(t);try{let t={},r=(0,s.sanitizeText)(e.text,(0,s.getConfig2)()),i=r.indexOf("@"),n=(r=(r=r.replace(/&equals;/g,"=")).replace(/&amp;/g,"&")).slice(0,i-1).trim(),o=r.slice(i+1).trim();t[n]=o,this.insertLinks(a,t)}catch(t){n.log.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(let a in e)t.links[a]=e[a]}addProperties(t,e){let a=this.getActor(t);try{let t=(0,s.sanitizeText)(e.text,(0,s.getConfig2)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(t){n.log.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(let a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){let a=this.getActor(t),r=document.getElementById(e.text);try{let t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(t){n.log.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(t?.properties!==void 0)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated)if(t.to!==this.state.records.lastCreated)throw Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");else this.state.records.lastCreated=void 0;else if(this.state.records.lastDestroyed)if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");else this.state.records.lastDestroyed=void 0;this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,s.setAccTitle)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,s.getConfig2)().sequence}},g=(0,o.__name)(t=>{let e=t.dropShadow??"none",{look:a}=(0,s.getConfig2)();return`.actor {
2
2
  stroke: ${t.actorBorder};
3
3
  fill: ${t.actorBkg};
4
4
  stroke-width: ${t.strokeWidth??1};