elanous 0.2.37 → 0.2.38

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 (588) hide show
  1. package/apps/pwa/out/404/index.html +1 -1
  2. package/apps/pwa/out/404.html +1 -1
  3. package/apps/pwa/out/_next/static/{8kITumG9GAZ1LwT9POrAR → RrjXTwz-urRAbChP1bX02}/_buildManifest.js +1 -1
  4. package/apps/pwa/out/_next/static/chunks/{2002-a43a3f380df873ec.js → 1026-44010f405704050c.js} +1 -1
  5. package/apps/pwa/out/_next/static/chunks/1118.a8a74ea29aac3e46.js +27 -0
  6. package/apps/pwa/out/_next/static/chunks/1204-2aa830479adf80f4.js +1 -0
  7. package/apps/pwa/out/_next/static/chunks/1341-43b7d2dc77d45c9d.js +1 -0
  8. package/apps/pwa/out/_next/static/chunks/1440-c3ea8882badfd9bf.js +1 -0
  9. package/apps/pwa/out/_next/static/chunks/{7424.c0fe2a595d4232b5.js → 1632.7d87f998e714bede.js} +1 -1
  10. package/apps/pwa/out/_next/static/chunks/1698-9c11cbf97f13717e.js +1 -0
  11. package/apps/pwa/out/_next/static/chunks/1770-3b1fc92253ef9f2f.js +1 -0
  12. package/apps/pwa/out/_next/static/chunks/{4937-28d437999b77c9dd.js → 1923-5c1695332240246a.js} +1 -1
  13. package/apps/pwa/out/_next/static/chunks/1938.0e6c60ee91c4d7f5.js +148 -0
  14. package/apps/pwa/out/_next/static/chunks/2104.70e086d5174a4736.js +1 -0
  15. package/apps/pwa/out/_next/static/chunks/213-20675f20673ba22a.js +1 -0
  16. package/apps/pwa/out/_next/static/chunks/214.186a430da28338f1.js +1 -0
  17. package/apps/pwa/out/_next/static/chunks/2277.3bd4c0ac7f1b5996.js +93 -0
  18. package/apps/pwa/out/_next/static/chunks/240.e09f433f71c78ff4.js +104 -0
  19. package/apps/pwa/out/_next/static/chunks/{3199.6a1a9b0e6cd01dc6.js → 2415.738b777642a02233.js} +1 -1
  20. package/apps/pwa/out/_next/static/chunks/2417.02151393605a7cd0.js +1 -0
  21. package/apps/pwa/out/_next/static/chunks/2463.cd2641a76daaa9ff.js +1 -0
  22. package/apps/pwa/out/_next/static/chunks/2576.b9e9c629c4b84c52.js +1 -0
  23. package/apps/pwa/out/_next/static/chunks/265-c021de53f0865bd9.js +1 -0
  24. package/apps/pwa/out/_next/static/chunks/2998-b1cc13956cd6a6e7.js +1 -0
  25. package/apps/pwa/out/_next/static/chunks/2e4782d3.ba2f0ab2b63a53e7.js +1 -0
  26. package/apps/pwa/out/_next/static/chunks/{1262.a89bb27a5b2f844e.js → 3086.fb14b60ce98b53d3.js} +1 -1
  27. package/apps/pwa/out/_next/static/chunks/3124-561f7f037943cde2.js +1 -0
  28. package/apps/pwa/out/_next/static/chunks/3130.626b54382b4dc379.js +1 -0
  29. package/apps/pwa/out/_next/static/chunks/3221-1bb3f99a55088613.js +1 -0
  30. package/apps/pwa/out/_next/static/chunks/3280.24edb1ffd03a7f3f.js +24 -0
  31. package/apps/pwa/out/_next/static/chunks/3288-eb3c22a1cbf2ae68.js +1 -0
  32. package/apps/pwa/out/_next/static/chunks/{2283.edd9627b7bdfb546.js → 3291.f6c1005387d514bd.js} +2 -2
  33. package/apps/pwa/out/_next/static/chunks/33.ef99e8374f96c6c4.js +36 -0
  34. package/apps/pwa/out/_next/static/chunks/{6877-84d47b7e85d0c41e.js → 3341-f09b9efbd7a82f70.js} +1 -1
  35. package/apps/pwa/out/_next/static/chunks/3389.012c70767a872f9b.js +1 -0
  36. package/apps/pwa/out/_next/static/chunks/3410-d7c0f14b329d6fda.js +1 -0
  37. package/apps/pwa/out/_next/static/chunks/3421.c87d6313a7d670f7.js +287 -0
  38. package/apps/pwa/out/_next/static/chunks/3422-83a3953f9bd67e26.js +1 -0
  39. package/apps/pwa/out/_next/static/chunks/{6680.6a693c28aae4cd19.js → 3528.e4b8ab70d339f965.js} +1 -1
  40. package/apps/pwa/out/_next/static/chunks/3587-002e24e368c515a9.js +1 -0
  41. package/apps/pwa/out/_next/static/chunks/3644.f12a7d821ab940af.js +1 -0
  42. package/apps/pwa/out/_next/static/chunks/3660.d7516588e2d875c3.js +1 -0
  43. package/apps/pwa/out/_next/static/chunks/3695.b82e2610f4cd4ea9.js +1 -0
  44. package/apps/pwa/out/_next/static/chunks/3858.ca1f5bc0f577eac9.js +94 -0
  45. package/apps/pwa/out/_next/static/chunks/3959-e6ac4a139d9d4bcc.js +1 -0
  46. package/apps/pwa/out/_next/static/chunks/3f0de3de-2340c532c00395db.js +1 -0
  47. package/apps/pwa/out/_next/static/chunks/4032.53f62176514ec0ea.js +1 -0
  48. package/apps/pwa/out/_next/static/chunks/4199-f7c6eb40cd0322f8.js +1 -0
  49. package/apps/pwa/out/_next/static/chunks/4204-ef8484cbecd5d62f.js +1 -0
  50. package/apps/pwa/out/_next/static/chunks/4259-163129ca79913c4b.js +1 -0
  51. package/apps/pwa/out/_next/static/chunks/428-eaa77df3d0c85969.js +1 -0
  52. package/apps/pwa/out/_next/static/chunks/4432-97e400ffa1e161f5.js +1 -0
  53. package/apps/pwa/out/_next/static/chunks/449-aa427cf2cbb75f50.js +1 -0
  54. package/apps/pwa/out/_next/static/chunks/4491-39a0fd32bbaf3840.js +1 -0
  55. package/apps/pwa/out/_next/static/chunks/4588.b7cf06d382953979.js +1 -0
  56. package/apps/pwa/out/_next/static/chunks/4690.70ec8060825366ab.js +32 -0
  57. package/apps/pwa/out/_next/static/chunks/{4036.d54e55e1ebf5acdc.js → 4804.6012b5cd33c22792.js} +2 -2
  58. package/apps/pwa/out/_next/static/chunks/4881.e4d22d730e3b9df5.js +1 -0
  59. package/apps/pwa/out/_next/static/chunks/4937.ce2e340dc29cad3e.js +79 -0
  60. package/apps/pwa/out/_next/static/chunks/5-bb1c08d84bd71df3.js +1 -0
  61. package/apps/pwa/out/_next/static/chunks/5005.de98df23b37cdf3c.js +1 -0
  62. package/apps/pwa/out/_next/static/chunks/5035.dc64a89cad5573cc.js +74 -0
  63. package/apps/pwa/out/_next/static/chunks/5041-5aada92ca215ffdd.js +1 -0
  64. package/apps/pwa/out/_next/static/chunks/{6819.be5c9c4d67f22922.js → 5203.51e5d8b5f1dcfe53.js} +16 -16
  65. package/apps/pwa/out/_next/static/chunks/5207.1a224035455790fd.js +1 -0
  66. package/apps/pwa/out/_next/static/chunks/{757-4fbaf50942b8c424.js → 5255-1b60d50eabe9f057.js} +1 -1
  67. package/apps/pwa/out/_next/static/chunks/5269.d0436ee6d773382a.js +286 -0
  68. package/apps/pwa/out/_next/static/chunks/5300.677c97e0393742e6.js +1 -0
  69. package/apps/pwa/out/_next/static/chunks/{7867.e8725745ddd1d940.js → 5307.d7328020227880c2.js} +4 -4
  70. package/apps/pwa/out/_next/static/chunks/5309.3367c4d50f52b489.js +1 -0
  71. package/apps/pwa/out/_next/static/chunks/552-689827d49780fa00.js +1 -0
  72. package/apps/pwa/out/_next/static/chunks/5539.34cc9d60622cb69b.js +8 -0
  73. package/apps/pwa/out/_next/static/chunks/5568.218dea0c00ca2ec7.js +1 -0
  74. package/apps/pwa/out/_next/static/chunks/{5046.7fd5cbd859299448.js → 5638.107314dc479e2f37.js} +1 -1
  75. package/apps/pwa/out/_next/static/chunks/5645.b7e3b055455a04ea.js +1 -0
  76. package/apps/pwa/out/_next/static/chunks/5662.18cc0f30353cbd96.js +1 -0
  77. package/apps/pwa/out/_next/static/chunks/5671.da24fc9dc5e98325.js +1 -0
  78. package/apps/pwa/out/_next/static/chunks/5b141171.324c40fd49cb6821.js +1 -0
  79. package/apps/pwa/out/_next/static/chunks/6142.913b44e260a3f925.js +64 -0
  80. package/apps/pwa/out/_next/static/chunks/6175-d4621f6a10b0cfab.js +1 -0
  81. package/apps/pwa/out/_next/static/chunks/6290.3eb53a20746b72ce.js +1 -0
  82. package/apps/pwa/out/_next/static/chunks/6415-9307f3eafa90837f.js +1 -0
  83. package/apps/pwa/out/_next/static/chunks/6493.27ad77de7aac7966.js +1 -0
  84. package/apps/pwa/out/_next/static/chunks/6579-3de35d00aacd71b5.js +1 -0
  85. package/apps/pwa/out/_next/static/chunks/680-2f324c4e039a5b67.js +1 -0
  86. package/apps/pwa/out/_next/static/chunks/6845-331b3c7481da3ba3.js +1 -0
  87. package/apps/pwa/out/_next/static/chunks/{1224.2ceca6c180d5130b.js → 7000.28157393caaf5343.js} +1 -1
  88. package/apps/pwa/out/_next/static/chunks/{6745-5a63492933959dd9.js → 7161-8f22db3ec5ed005e.js} +3 -3
  89. package/apps/pwa/out/_next/static/chunks/{2479-fe7e188bd9402d14.js → 7311-60a7ea80d23c7521.js} +1 -1
  90. package/apps/pwa/out/_next/static/chunks/7401.525d0a12f7d02c06.js +1 -0
  91. package/apps/pwa/out/_next/static/chunks/7438.c2cf72b66dca6aa4.js +1 -0
  92. package/apps/pwa/out/_next/static/chunks/{5952.294fc574a8625184.js → 7488.966b116789f3d41a.js} +1 -1
  93. package/apps/pwa/out/_next/static/chunks/7524.ce973525d30b3d52.js +1 -0
  94. package/apps/pwa/out/_next/static/chunks/7573.2376e13c9c21f1f8.js +77 -0
  95. package/apps/pwa/out/_next/static/chunks/7577.ea6e9ac72e035520.js +1 -0
  96. package/apps/pwa/out/_next/static/chunks/{6252.240578f10952e091.js → 7628.6b16863ac3972333.js} +1 -1
  97. package/apps/pwa/out/_next/static/chunks/7657.8d1fb3d2f7ebe273.js +1 -0
  98. package/apps/pwa/out/_next/static/chunks/7903-1435d5d2f0dd7807.js +1 -0
  99. package/apps/pwa/out/_next/static/chunks/{1746.3563617ea64023a3.js → 7954.4f7a8832663ee979.js} +1 -1
  100. package/apps/pwa/out/_next/static/chunks/7978-30a91192c5dbe3c2.js +1 -0
  101. package/apps/pwa/out/_next/static/chunks/{4931.95cc6dbd230774ca.js → 8019.21ca554a821dad01.js} +16 -16
  102. package/apps/pwa/out/_next/static/chunks/8025-8795821525cf1a07.js +1 -0
  103. package/apps/pwa/out/_next/static/chunks/8191.3674a00f0b565c23.js +1 -0
  104. package/apps/pwa/out/_next/static/chunks/8217-604955d8885c5ef2.js +1 -0
  105. package/apps/pwa/out/_next/static/chunks/8298-eed6f5f2585a63f4.js +1 -0
  106. package/apps/pwa/out/_next/static/chunks/{2375.bf364c85dbb6f085.js → 8487.291666583bebe640.js} +1 -1
  107. package/apps/pwa/out/_next/static/chunks/8509.3a54d4e61893d7cb.js +1 -0
  108. package/apps/pwa/out/_next/static/chunks/8758.ac421f726a189125.js +1 -0
  109. package/apps/pwa/out/_next/static/chunks/{4383.18e5c54db3a22c88.js → 8879.ac06755bcf3e44a1.js} +1 -1
  110. package/apps/pwa/out/_next/static/chunks/891.d6c723a51a067b36.js +149 -0
  111. package/apps/pwa/out/_next/static/chunks/{9151.a2c51e93f9156dae.js → 8911.bf5e712acb25fb6c.js} +1 -1
  112. package/apps/pwa/out/_next/static/chunks/{58edce7d.f1b0c72acf13b123.js → 8994d93e.33ba491f95345fc2.js} +1 -1
  113. package/apps/pwa/out/_next/static/chunks/{5f6af561-f90b7a67f4f75d13.js → 89d6c04f-6b8ab341748e468a.js} +1 -1
  114. package/apps/pwa/out/_next/static/chunks/9223.cbcc88e0e9950426.js +41 -0
  115. package/apps/pwa/out/_next/static/chunks/9299.24e2a7d9b6d1f91b.js +226 -0
  116. package/apps/pwa/out/_next/static/chunks/9317.6a9869039c231bb3.js +24 -0
  117. package/apps/pwa/out/_next/static/chunks/9383.e4755f275b3c11ff.js +1 -0
  118. package/apps/pwa/out/_next/static/chunks/9581.da63ddf41acfad46.js +1 -0
  119. package/apps/pwa/out/_next/static/chunks/9715.8c5529a0a5c41a36.js +1 -0
  120. package/apps/pwa/out/_next/static/chunks/9817.3009d65f0889ef1f.js +2 -0
  121. package/apps/pwa/out/_next/static/chunks/{de8446d3.31b73eb239fecd7b.js → 9fe1b809.738da85c8b17e3fb.js} +1 -1
  122. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-76873dd80da4f715.js +1 -0
  123. package/apps/pwa/out/_next/static/chunks/app/approvals/page-ed32b6ec5dea8f23.js +1 -0
  124. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-fdd40e15babf3d25.js +1 -0
  125. package/apps/pwa/out/_next/static/chunks/app/board/page-384efc78e85e400b.js +1 -0
  126. package/apps/pwa/out/_next/static/chunks/app/botlab/page-866aac5ff226a7f3.js +1 -0
  127. package/apps/pwa/out/_next/static/chunks/app/bots/page-d91809c5aeed319a.js +1 -0
  128. package/apps/pwa/out/_next/static/chunks/app/ceo/page-128f3522f89a81ab.js +1 -0
  129. package/apps/pwa/out/_next/static/chunks/app/chat/page-595961abf3b43ad1.js +1 -0
  130. package/apps/pwa/out/_next/static/chunks/app/consult/page-f41dccb76d8c0263.js +1 -0
  131. package/apps/pwa/out/_next/static/chunks/app/control/page-a3205c2e28b7d0d9.js +1 -0
  132. package/apps/pwa/out/_next/static/chunks/app/decisions/page-c39a80277814a3f4.js +1 -0
  133. package/apps/pwa/out/_next/static/chunks/app/design-check/page-1ab3f98194513195.js +1 -0
  134. package/apps/pwa/out/_next/static/chunks/app/editor/page-a5246f7e254d77d0.js +1 -0
  135. package/apps/pwa/out/_next/static/chunks/app/exec/page-0f92287bdb81217d.js +1 -0
  136. package/apps/pwa/out/_next/static/chunks/app/field/page-5a37131ff63793ef.js +1 -0
  137. package/apps/pwa/out/_next/static/chunks/app/healthz/route-76873dd80da4f715.js +1 -0
  138. package/apps/pwa/out/_next/static/chunks/app/inside/page-ac4bd14bb2348bfd.js +1 -0
  139. package/apps/pwa/out/_next/static/chunks/app/intake/{page-5c112c6d7c33656e.js → page-c348a3959c5b5fc6.js} +1 -1
  140. package/apps/pwa/out/_next/static/chunks/app/layout-2addd81c0d3e2906.js +1 -0
  141. package/apps/pwa/out/_next/static/chunks/app/live/page-da6b765f58a3eefb.js +1 -0
  142. package/apps/pwa/out/_next/static/chunks/app/live-run/page-0661e40f8780c32c.js +1 -0
  143. package/apps/pwa/out/_next/static/chunks/app/loops/page-b89af1b1c8e4875b.js +1 -0
  144. package/apps/pwa/out/_next/static/chunks/app/market/page-da8aeb82ba751cdb.js +1 -0
  145. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-cc71317b239439db.js +1 -0
  146. package/apps/pwa/out/_next/static/chunks/app/morning/page-bde7fc1d64ffe369.js +1 -0
  147. package/apps/pwa/out/_next/static/chunks/app/not-found-e2797214f713fa58.js +1 -0
  148. package/apps/pwa/out/_next/static/chunks/app/observatory/page-2a35bcda70defaf6.js +1 -0
  149. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-3af03deedde45032.js +1 -0
  150. package/apps/pwa/out/_next/static/chunks/app/ops/release/{page-88a1edbff62eaf1d.js → page-d1d1210f99f620ae.js} +1 -1
  151. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-46d1b5500885861d.js +1 -0
  152. package/apps/pwa/out/_next/static/chunks/app/outputs/page-291ab19fe2acb173.js +1 -0
  153. package/apps/pwa/out/_next/static/chunks/app/{page-b9af2ac1c4737ce8.js → page-7f569e533ddeecba.js} +1 -1
  154. package/apps/pwa/out/_next/static/chunks/app/reflection/page-990129c9fee46d8f.js +1 -0
  155. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-7737f785ebb1cdaf.js +1 -0
  156. package/apps/pwa/out/_next/static/chunks/app/sessions/page-9f3c73a4f7ffd2f8.js +1 -0
  157. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-03be7fb347f01058.js +1 -0
  158. package/apps/pwa/out/_next/static/chunks/app/settings/page-96b0280625e4df2b.js +1 -0
  159. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-56855545049eb56d.js +1 -0
  160. package/apps/pwa/out/_next/static/chunks/app/setup/layout-76873dd80da4f715.js +1 -0
  161. package/apps/pwa/out/_next/static/chunks/app/setup/page-79a909c9981f0338.js +1 -0
  162. package/apps/pwa/out/_next/static/chunks/app/share/{page-fb9e639c107f5f72.js → page-a9d9a3e66459c1e0.js} +1 -1
  163. package/apps/pwa/out/_next/static/chunks/app/showroom/page-c383cbf2013f7069.js +1 -0
  164. package/apps/pwa/out/_next/static/chunks/app/tasks/page-f57c6a2e54dbdca4.js +1 -0
  165. package/apps/pwa/out/_next/static/chunks/app/term/page-6b140f77593576eb.js +1 -0
  166. package/apps/pwa/out/_next/static/chunks/app/today/page-6b767ae2d9d0adfc.js +1 -0
  167. package/apps/pwa/out/_next/static/chunks/app/trace/page-116d6198d5da0e3d.js +1 -0
  168. package/apps/pwa/out/_next/static/chunks/app/vault/page-b9c9b778c7501370.js +1 -0
  169. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-a6c78392ab8f6335.js +1 -0
  170. package/apps/pwa/out/_next/static/chunks/app/workflows/page-455183deb4ed0cfe.js +1 -0
  171. package/apps/pwa/out/_next/static/chunks/app/workspace/page-6a63e99526bd63d0.js +1 -0
  172. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-31c22caafe788c08.js +1 -0
  173. package/apps/pwa/out/_next/static/chunks/{709a918c.4fd3b4e2a32cb4e3.js → b7459770.6539b11860eb8a9c.js} +7 -7
  174. package/apps/pwa/out/_next/static/chunks/{d9815f84.4918f682a45a8502.js → b7478fef.5917716286213fcc.js} +3 -3
  175. package/apps/pwa/out/_next/static/chunks/{4337e36d.f42c3b391b3d8f20.js → bb6987f9.3647e1a23b0e3217.js} +1 -1
  176. package/apps/pwa/out/_next/static/chunks/de8b930d.d94c0f42acf807fc.js +1 -0
  177. package/apps/pwa/out/_next/static/chunks/{8c58d09b.e8724a299658d86f.js → eaad0cba.771200940c529df7.js} +1 -1
  178. package/apps/pwa/out/_next/static/chunks/framework-4b12a946f352cee2.js +1 -0
  179. package/apps/pwa/out/_next/static/chunks/main-941155250ed2644b.js +1 -0
  180. package/apps/pwa/out/_next/static/chunks/main-app-f8b6765abed6d149.js +1 -0
  181. package/apps/pwa/out/_next/static/chunks/pages/_app-78432194c85388f9.js +1 -0
  182. package/apps/pwa/out/_next/static/chunks/pages/_error-cdf7390829512b1b.js +1 -0
  183. package/apps/pwa/out/_next/static/chunks/webpack-d5f0964a9c2e92d2.js +1 -0
  184. package/apps/pwa/out/approvals/index.html +1 -1
  185. package/apps/pwa/out/approvals/index.txt +22 -22
  186. package/apps/pwa/out/autopilot/index.html +1 -1
  187. package/apps/pwa/out/autopilot/index.txt +22 -22
  188. package/apps/pwa/out/board/index.html +1 -1
  189. package/apps/pwa/out/board/index.txt +22 -22
  190. package/apps/pwa/out/botlab/index.html +1 -1
  191. package/apps/pwa/out/botlab/index.txt +21 -21
  192. package/apps/pwa/out/bots/index.html +1 -1
  193. package/apps/pwa/out/bots/index.txt +21 -21
  194. package/apps/pwa/out/ceo/index.html +1 -1
  195. package/apps/pwa/out/ceo/index.txt +22 -22
  196. package/apps/pwa/out/chat/index.html +1 -1
  197. package/apps/pwa/out/chat/index.txt +21 -21
  198. package/apps/pwa/out/consult/index.html +1 -1
  199. package/apps/pwa/out/consult/index.txt +22 -22
  200. package/apps/pwa/out/control/index.html +1 -1
  201. package/apps/pwa/out/control/index.txt +22 -22
  202. package/apps/pwa/out/decisions/index.html +1 -1
  203. package/apps/pwa/out/decisions/index.txt +21 -21
  204. package/apps/pwa/out/design-check/index.html +1 -1
  205. package/apps/pwa/out/design-check/index.txt +22 -22
  206. package/apps/pwa/out/editor/index.html +1 -1
  207. package/apps/pwa/out/editor/index.txt +22 -22
  208. package/apps/pwa/out/exec/index.html +1 -1
  209. package/apps/pwa/out/exec/index.txt +22 -22
  210. package/apps/pwa/out/field/index.html +1 -1
  211. package/apps/pwa/out/field/index.txt +22 -22
  212. package/apps/pwa/out/healthz +1 -1
  213. package/apps/pwa/out/index.html +1 -1
  214. package/apps/pwa/out/index.txt +21 -21
  215. package/apps/pwa/out/inside/index.html +1 -1
  216. package/apps/pwa/out/inside/index.txt +21 -21
  217. package/apps/pwa/out/intake/index.html +1 -1
  218. package/apps/pwa/out/intake/index.txt +22 -22
  219. package/apps/pwa/out/live/index.html +1 -1
  220. package/apps/pwa/out/live/index.txt +22 -22
  221. package/apps/pwa/out/live-run/index.html +1 -1
  222. package/apps/pwa/out/live-run/index.txt +22 -22
  223. package/apps/pwa/out/loops/index.html +1 -1
  224. package/apps/pwa/out/loops/index.txt +21 -21
  225. package/apps/pwa/out/market/index.html +1 -1
  226. package/apps/pwa/out/market/index.txt +21 -21
  227. package/apps/pwa/out/missions/placeholder/index.html +1 -1
  228. package/apps/pwa/out/missions/placeholder/index.txt +21 -21
  229. package/apps/pwa/out/morning/index.html +1 -1
  230. package/apps/pwa/out/morning/index.txt +22 -22
  231. package/apps/pwa/out/observatory/index.html +1 -1
  232. package/apps/pwa/out/observatory/index.txt +22 -22
  233. package/apps/pwa/out/ops/checklist/index.html +1 -1
  234. package/apps/pwa/out/ops/checklist/index.txt +21 -21
  235. package/apps/pwa/out/ops/release/index.html +1 -1
  236. package/apps/pwa/out/ops/release/index.txt +21 -21
  237. package/apps/pwa/out/ops/seats/index.html +1 -1
  238. package/apps/pwa/out/ops/seats/index.txt +21 -21
  239. package/apps/pwa/out/outputs/index.html +1 -1
  240. package/apps/pwa/out/outputs/index.txt +21 -21
  241. package/apps/pwa/out/reflection/index.html +1 -1
  242. package/apps/pwa/out/reflection/index.txt +22 -22
  243. package/apps/pwa/out/scheduler/index.html +1 -1
  244. package/apps/pwa/out/scheduler/index.txt +22 -22
  245. package/apps/pwa/out/sessions/index.html +1 -1
  246. package/apps/pwa/out/sessions/index.txt +21 -21
  247. package/apps/pwa/out/settings/devices/index.html +1 -1
  248. package/apps/pwa/out/settings/devices/index.txt +22 -22
  249. package/apps/pwa/out/settings/index.html +1 -1
  250. package/apps/pwa/out/settings/index.txt +22 -22
  251. package/apps/pwa/out/setup/done/index.html +1 -1
  252. package/apps/pwa/out/setup/done/index.txt +22 -22
  253. package/apps/pwa/out/setup/index.html +1 -1
  254. package/apps/pwa/out/setup/index.txt +22 -22
  255. package/apps/pwa/out/share/index.html +1 -1
  256. package/apps/pwa/out/share/index.txt +22 -22
  257. package/apps/pwa/out/showroom/index.html +1 -1
  258. package/apps/pwa/out/showroom/index.txt +21 -21
  259. package/apps/pwa/out/tasks/index.html +1 -1
  260. package/apps/pwa/out/tasks/index.txt +22 -22
  261. package/apps/pwa/out/term/index.html +1 -1
  262. package/apps/pwa/out/term/index.txt +22 -22
  263. package/apps/pwa/out/today/index.html +1 -1
  264. package/apps/pwa/out/today/index.txt +22 -22
  265. package/apps/pwa/out/trace/index.html +1 -1
  266. package/apps/pwa/out/trace/index.txt +22 -22
  267. package/apps/pwa/out/vault/index.html +1 -1
  268. package/apps/pwa/out/vault/index.txt +22 -22
  269. package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
  270. package/apps/pwa/out/workflows/chat-ui/index.txt +22 -22
  271. package/apps/pwa/out/workflows/index.html +1 -1
  272. package/apps/pwa/out/workflows/index.txt +22 -22
  273. package/apps/pwa/out/workspace/index.html +1 -1
  274. package/apps/pwa/out/workspace/index.txt +22 -22
  275. package/apps/pwa/out/worktrees/index.html +1 -1
  276. package/apps/pwa/out/worktrees/index.txt +22 -22
  277. package/graphs/release/recipes.yaml +9 -0
  278. package/graphs/release/release-loop.yaml +26 -18
  279. package/package.json +1 -1
  280. package/scripts/ask-op-inbox-once.ts +17 -0
  281. package/scripts/brand/check.ts +13 -4
  282. package/scripts/gate-0226-accepted-remaining-90.txt +91 -0
  283. package/scripts/gate-0226-failure-census.ts +39 -0
  284. package/scripts/intake-collect-telegram-saved-stage.ts +48 -0
  285. package/scripts/provision-export-redactions.ts +15 -0
  286. package/scripts/public-copy-lint.ts +122 -0
  287. package/scripts/public-export.ts +69 -2
  288. package/scripts/ratchets/next-tui-entry-budget.ts +124 -0
  289. package/scripts/ratchets/train-side-invariants.sh +7 -1
  290. package/scripts/release-loop/cut-branch.ts +61 -12
  291. package/scripts/release-loop/gate-node.ts +161 -25
  292. package/scripts/release-loop/gate-partial.ts +82 -3
  293. package/scripts/release-loop/gate-prewarm-plan.ts +35 -0
  294. package/scripts/release-loop/gate-radius-live.ts +4 -2
  295. package/scripts/release-loop/resume-cap.ts +2 -1
  296. package/scripts/release-loop/resume-release.ts +297 -8
  297. package/scripts/release-loop/resume.ts +13 -5
  298. package/scripts/release-loop/traffic-node.ts +12 -4
  299. package/scripts/release-loop/traffic-transition.ts +53 -13
  300. package/scripts/release-loop/version-node.ts +29 -4
  301. package/scripts/ux-sim.ts +1 -1
  302. package/scripts/video-pipeline.ts +2 -2
  303. package/src/acp/core-turn-bridge.ts +6 -1
  304. package/src/agent/run-context.ts +1 -1
  305. package/src/agent/task-notification.ts +3 -1
  306. package/src/agent-substrate/review-observation.ts +10 -0
  307. package/src/agent-substrate/self-review-cli.ts +195 -27
  308. package/src/auto-research/question-ladder-contract.ts +137 -0
  309. package/src/auto-research/research-turn.ts +134 -0
  310. package/src/autopilot/discovery/doc-lint.ts +1 -1
  311. package/src/bots/screen-probe.ts +1 -1
  312. package/src/capture/tui-self-report.ts +10 -2
  313. package/src/chat/index.ts +1 -0
  314. package/src/chat/tool-render/dispatch.ts +8 -1
  315. package/src/cli/guardian-cli.ts +3 -1
  316. package/src/cli/intake-cli.ts +48 -12
  317. package/src/cli/lesson-cli.ts +69 -9
  318. package/src/cli/pr-land-overlap-evidence.ts +38 -5
  319. package/src/cli/pr-land-refusal.ts +1 -1
  320. package/src/cli/pty-takeover-cli.ts +58 -5
  321. package/src/cli/release-checklist-read-cli.ts +5 -2
  322. package/src/cli/release-cli.ts +47 -9
  323. package/src/cli/review-carry.ts +77 -0
  324. package/src/cli/self-update.ts +1 -1
  325. package/src/cli/tasks-card-show.ts +31 -1
  326. package/src/cli/tasks-cli.ts +62 -23
  327. package/src/cli/tasks-read-cli.ts +13 -5
  328. package/src/context-bus/context-now.ts +86 -2
  329. package/src/core-turn/run-core-turn.ts +9 -2
  330. package/src/core-turn/types.ts +3 -0
  331. package/src/dashboard/index.ts +18 -17
  332. package/src/dashboard/input/terminal-modal-router.ts +8 -159
  333. package/src/dashboard/side-basic-runtime.ts +61 -0
  334. package/src/dashboard/slash-runtime/dashboard-handlers.ts +2 -0
  335. package/src/dashboard/term-slash-runtime.ts +2 -0
  336. package/src/dashboard/turn-preamble.ts +28 -4
  337. package/src/domains/guardian-tick.ts +9 -0
  338. package/src/git-fs/watcher.ts +27 -22
  339. package/src/git-fs/worktree.ts +19 -3
  340. package/src/graph-runner/graph-grow.ts +37 -9
  341. package/src/graph-runner/runner.ts +17 -2
  342. package/src/grok/credential.ts +107 -36
  343. package/src/hq/fence-wrapper.ts +1 -1
  344. package/src/hq/transfer.ts +1 -1
  345. package/src/index.ts +44 -14
  346. package/src/intake-plane/collect-telegram-saved.ts +54 -5
  347. package/src/interactive-terminal-modal.ts +3 -0
  348. package/src/keybindings.ts +17 -22
  349. package/src/llm/provider-credentials.ts +1 -1
  350. package/src/llm-tool-schema.ts +20 -0
  351. package/src/llm.ts +81 -11
  352. package/src/loops/orchestrator/inbox-once.ts +28 -0
  353. package/src/loops/orchestrator/inbox.ts +130 -1
  354. package/src/loops/orchestrator/tick.ts +6 -3
  355. package/src/maturity/feature-maturity.ts +1 -0
  356. package/src/nexus/api/channel-ask-op.ts +96 -0
  357. package/src/nexus/api/discord-trigger-bot.ts +28 -1
  358. package/src/nexus/api/telegram-trigger-bot.ts +24 -0
  359. package/src/nexus/api/terminals.ts +28 -6
  360. package/src/patents/ledger.ts +18 -1
  361. package/src/preview/terminal.ts +4 -2
  362. package/src/prompt-cache/anthropic.ts +2 -0
  363. package/src/prompt-enhance/enhance.ts +5 -0
  364. package/src/pty-shell/pty-manifest.ts +16 -2
  365. package/src/release-loop/gate-shards.ts +61 -0
  366. package/src/release-loop/light-rc.ts +7 -4
  367. package/src/release-loop/rehearsal.ts +1 -1
  368. package/src/repl/index.ts +10 -0
  369. package/src/research/axis-fanout.ts +133 -0
  370. package/src/research/edge-decision.ts +88 -0
  371. package/src/research/output-router.ts +127 -0
  372. package/src/research-bridge/format.ts +16 -1
  373. package/src/research-bridge/index.ts +1 -0
  374. package/src/research-bridge/invoke.ts +41 -5
  375. package/src/self-dev/decompose.ts +45 -9
  376. package/src/self-dev/draft-residue.ts +221 -2
  377. package/src/self-dev/draft-sweep.ts +29 -16
  378. package/src/self-dev/orchestrate.ts +1 -0
  379. package/src/self-dev/run-supervisor.ts +22 -7
  380. package/src/self-dev/shard-run.ts +260 -3
  381. package/src/self-implement/comment-only-source.ts +54 -0
  382. package/src/self-implement/doctor-visit.ts +25 -0
  383. package/src/self-implement/gate-artifacts.ts +2 -2
  384. package/src/self-implement/gate-baseline.ts +44 -9
  385. package/src/self-implement/gate-cli.ts +151 -86
  386. package/src/self-implement/gate-failure-signature.ts +44 -0
  387. package/src/self-implement/gate-remote.ts +2 -0
  388. package/src/self-implement/goal-author.ts +74 -3
  389. package/src/self-implement/goal-doc/section.ts +22 -0
  390. package/src/self-implement/goal-supervisor-fill.ts +38 -4
  391. package/src/self-implement/knowhow-pack.ts +120 -7
  392. package/src/self-implement/l8-merge-queue.ts +198 -32
  393. package/src/self-implement/off-diff-evidence.ts +23 -0
  394. package/src/self-implement/orchestrator.ts +55 -12
  395. package/src/self-implement/pod-inplace-worktree.ts +82 -0
  396. package/src/self-implement/pod-warm-pool-profile.ts +2 -2
  397. package/src/self-implement/premise-review.ts +7 -5
  398. package/src/self-implement/run-ledger.ts +258 -0
  399. package/src/self-implement/seams.ts +33 -10
  400. package/src/self-implement/self-implement-cli.ts +26 -2
  401. package/src/session/channel-ask-op-envelope.ts +36 -0
  402. package/src/session/channel-op-reply-route.ts +200 -0
  403. package/src/session/chat.ts +3 -0
  404. package/src/session/index.ts +2 -0
  405. package/src/session-runtime/index.ts +9 -22
  406. package/src/skills/runner.ts +7 -3
  407. package/src/skills/tools/dev-harness.ts +2 -2
  408. package/src/skills/tools/schedule-wakeup.ts +1 -6
  409. package/src/status/bar.ts +3 -3
  410. package/src/storage/file-lock.ts +17 -4
  411. package/src/task-agent/adopt-pr.ts +63 -2
  412. package/src/task-agent/evidence-command-normalize.ts +42 -0
  413. package/src/task-agent/export-redactions-provision.ts +43 -0
  414. package/src/task-agent/parent-host.ts +59 -12
  415. package/src/task-agent/repair-cycle.ts +67 -8
  416. package/src/task-agent/repair-worker.ts +37 -1
  417. package/src/task-agent/task-hand.ts +98 -10
  418. package/src/task-agent/tier-split.ts +37 -3
  419. package/src/task-orchestrator/surfaces/pod-failure-reason.ts +31 -4
  420. package/src/task-orchestrator/surfaces/pod-pool.ts +27 -4
  421. package/src/task-orchestrator/surfaces/self-implement-pod.ts +126 -48
  422. package/src/task-orchestrator/surfaces/self-implement.ts +33 -2
  423. package/src/terminal/session-registry.ts +1 -0
  424. package/src/terminal/terminal-modal-router.ts +156 -0
  425. package/src/tool-hints/gate.ts +6 -4
  426. package/src/tool-hints/signals.ts +33 -1
  427. package/src/tui/chat/background-job-status.ts +8 -2
  428. package/src/tui/entry.ts +469 -31
  429. package/src/tui/sidetab/attach.ts +304 -0
  430. package/src/tui/sidetab/list.ts +176 -0
  431. package/src/tui/sidetab/nl-tool.ts +136 -0
  432. package/src/tui/slash/resume-command.ts +23 -0
  433. package/src/tui/slash/resume.ts +3 -23
  434. package/src/tui/slash/term-next.ts +2 -1
  435. package/src/tui-client/local-chat-turn.ts +29 -8
  436. package/src/user-config.ts +11 -2
  437. package/src/ux-sim/fake-llm.ts +11 -5
  438. package/src/ux-sim/next-tui-seat-scenarios.ts +53 -1
  439. package/src/version/packed-revision.json +1 -1
  440. package/apps/pwa/out/_next/static/chunks/1041-5841aae848fb6403.js +0 -1
  441. package/apps/pwa/out/_next/static/chunks/1087.3177e54f672dc526.js +0 -1
  442. package/apps/pwa/out/_next/static/chunks/1105.efe1e13503ac7a33.js +0 -1
  443. package/apps/pwa/out/_next/static/chunks/1417-1768233ac92f8a5d.js +0 -1
  444. package/apps/pwa/out/_next/static/chunks/1612.81bbc19af06af16c.js +0 -1
  445. package/apps/pwa/out/_next/static/chunks/1766.728d42053070bb2d.js +0 -1
  446. package/apps/pwa/out/_next/static/chunks/1773.d38e945481e04125.js +0 -1
  447. package/apps/pwa/out/_next/static/chunks/1974-c12f9600da3d3c26.js +0 -1
  448. package/apps/pwa/out/_next/static/chunks/1ed5e8af.cf424815c7c0efad.js +0 -1
  449. package/apps/pwa/out/_next/static/chunks/2061.7232dc9dc058417f.js +0 -1
  450. package/apps/pwa/out/_next/static/chunks/210.90b2cbd64926cf34.js +0 -32
  451. package/apps/pwa/out/_next/static/chunks/2318-450e75d07605b8fe.js +0 -1
  452. package/apps/pwa/out/_next/static/chunks/244-a810d282a20f1783.js +0 -1
  453. package/apps/pwa/out/_next/static/chunks/2514.03b60f266531a015.js +0 -148
  454. package/apps/pwa/out/_next/static/chunks/2526-a657538869888604.js +0 -1
  455. package/apps/pwa/out/_next/static/chunks/2533-6f0341ff075809e9.js +0 -1
  456. package/apps/pwa/out/_next/static/chunks/2676.e7994c695ef0f30d.js +0 -1
  457. package/apps/pwa/out/_next/static/chunks/2734.3ffdf54254fb6f99.js +0 -27
  458. package/apps/pwa/out/_next/static/chunks/2770-23252bf3a37880b9.js +0 -1
  459. package/apps/pwa/out/_next/static/chunks/2969.66b8b545139d1544.js +0 -1
  460. package/apps/pwa/out/_next/static/chunks/3128.a9210d08800ea6a8.js +0 -1
  461. package/apps/pwa/out/_next/static/chunks/3212.12179fd3eee8cef1.js +0 -1
  462. package/apps/pwa/out/_next/static/chunks/3578.4e9f9948a9a6f2f4.js +0 -2
  463. package/apps/pwa/out/_next/static/chunks/3760-2909ddb9279281cd.js +0 -1
  464. package/apps/pwa/out/_next/static/chunks/3825.1921b5901bf33dce.js +0 -36
  465. package/apps/pwa/out/_next/static/chunks/3994-63eb884ed0547011.js +0 -1
  466. package/apps/pwa/out/_next/static/chunks/4115.5b438b99f0ae729f.js +0 -226
  467. package/apps/pwa/out/_next/static/chunks/4269.d8f9f34bb0fc6c43.js +0 -287
  468. package/apps/pwa/out/_next/static/chunks/431-4eed5bd2c5fe1719.js +0 -1
  469. package/apps/pwa/out/_next/static/chunks/4313.76f232c304a15bde.js +0 -1
  470. package/apps/pwa/out/_next/static/chunks/4324.c99ba3e83eb1b691.js +0 -1
  471. package/apps/pwa/out/_next/static/chunks/4599-96eff3f2a9c242c1.js +0 -1
  472. package/apps/pwa/out/_next/static/chunks/4725-34bed25720cc326b.js +0 -1
  473. package/apps/pwa/out/_next/static/chunks/4825-a9d9d4e9f5892309.js +0 -1
  474. package/apps/pwa/out/_next/static/chunks/4833-7934c592c5569f00.js +0 -1
  475. package/apps/pwa/out/_next/static/chunks/4879-68518f547a207aff.js +0 -1
  476. package/apps/pwa/out/_next/static/chunks/4896.f9b70285363b27b2.js +0 -24
  477. package/apps/pwa/out/_next/static/chunks/49aa54ab.80f39398e0ed0f30.js +0 -1
  478. package/apps/pwa/out/_next/static/chunks/5056.482687319b82638e.js +0 -104
  479. package/apps/pwa/out/_next/static/chunks/506.16b83d56a437a9ee.js +0 -1
  480. package/apps/pwa/out/_next/static/chunks/5260-20593b0a25d0afbc.js +0 -1
  481. package/apps/pwa/out/_next/static/chunks/5404.cc4e9fec26fd5925.js +0 -1
  482. package/apps/pwa/out/_next/static/chunks/576.485e83e3f3dec19a.js +0 -1
  483. package/apps/pwa/out/_next/static/chunks/5832-a6be14e663f65726.js +0 -1
  484. package/apps/pwa/out/_next/static/chunks/5854-56648a9fe646b9a0.js +0 -1
  485. package/apps/pwa/out/_next/static/chunks/5925.3b1f8b135710249b.js +0 -93
  486. package/apps/pwa/out/_next/static/chunks/6168.17749aa3905fa073.js +0 -74
  487. package/apps/pwa/out/_next/static/chunks/6416.5d50b8ec9986ca98.js +0 -1
  488. package/apps/pwa/out/_next/static/chunks/6758.e7fbf532953c0783.js +0 -1
  489. package/apps/pwa/out/_next/static/chunks/6795.0cb8a59730d99703.js +0 -149
  490. package/apps/pwa/out/_next/static/chunks/6971-fb5f9dc0a2cb5d2d.js +0 -1
  491. package/apps/pwa/out/_next/static/chunks/717.522b08685979b814.js +0 -1
  492. package/apps/pwa/out/_next/static/chunks/7191.e41eb8f455c7f089.js +0 -41
  493. package/apps/pwa/out/_next/static/chunks/7233.8e744b7513119409.js +0 -1
  494. package/apps/pwa/out/_next/static/chunks/7238-97c2226f80504bd8.js +0 -1
  495. package/apps/pwa/out/_next/static/chunks/7285.307963afcf7e7660.js +0 -24
  496. package/apps/pwa/out/_next/static/chunks/7299-fbe4b8c47a87614a.js +0 -1
  497. package/apps/pwa/out/_next/static/chunks/7314.df0d95930b0c3f50.js +0 -1
  498. package/apps/pwa/out/_next/static/chunks/7406.c0589fdf2ee66629.js +0 -1
  499. package/apps/pwa/out/_next/static/chunks/752-90e3e7daad3d8e39.js +0 -1
  500. package/apps/pwa/out/_next/static/chunks/7524-bcd3d9928c6842d9.js +0 -1
  501. package/apps/pwa/out/_next/static/chunks/7549.9a4de3bf231cfc52.js +0 -1
  502. package/apps/pwa/out/_next/static/chunks/765.76ae970ceb597b5b.js +0 -1
  503. package/apps/pwa/out/_next/static/chunks/7893-e444a1b0809cd1e4.js +0 -1
  504. package/apps/pwa/out/_next/static/chunks/7956-33748cabb3a05562.js +0 -1
  505. package/apps/pwa/out/_next/static/chunks/7c5ed21f-f286708e57cf88f7.js +0 -1
  506. package/apps/pwa/out/_next/static/chunks/8030-aa66b478b53dbfca.js +0 -1
  507. package/apps/pwa/out/_next/static/chunks/8051.c88c07dacbbc5f21.js +0 -8
  508. package/apps/pwa/out/_next/static/chunks/8080-40d781e7704d3671.js +0 -1
  509. package/apps/pwa/out/_next/static/chunks/8149.80e402d4345e8dae.js +0 -77
  510. package/apps/pwa/out/_next/static/chunks/8205.50a5268f4e12ba0b.js +0 -1
  511. package/apps/pwa/out/_next/static/chunks/8231.a128feaa6f8b6079.js +0 -1
  512. package/apps/pwa/out/_next/static/chunks/85.4ddb1dda2ea3ffa2.js +0 -286
  513. package/apps/pwa/out/_next/static/chunks/8537.26517a09e8247beb.js +0 -1
  514. package/apps/pwa/out/_next/static/chunks/8595-e9b7081ab773a61f.js +0 -1
  515. package/apps/pwa/out/_next/static/chunks/8821-30cc65a61a60951f.js +0 -1
  516. package/apps/pwa/out/_next/static/chunks/8905.b3385aadb7b133e6.js +0 -79
  517. package/apps/pwa/out/_next/static/chunks/8983.246bb3a1ac38f50f.js +0 -1
  518. package/apps/pwa/out/_next/static/chunks/9072.18342f5941a1f3ec.js +0 -1
  519. package/apps/pwa/out/_next/static/chunks/9123.9df04866b2d6e00f.js +0 -1
  520. package/apps/pwa/out/_next/static/chunks/9175-7d383df15a82e2be.js +0 -1
  521. package/apps/pwa/out/_next/static/chunks/9181-bf89c07ce5b8f599.js +0 -1
  522. package/apps/pwa/out/_next/static/chunks/920-429bbc4504b45f71.js +0 -1
  523. package/apps/pwa/out/_next/static/chunks/9207.625edf45d656151c.js +0 -1
  524. package/apps/pwa/out/_next/static/chunks/9378.d2575c6ffd6dd756.js +0 -94
  525. package/apps/pwa/out/_next/static/chunks/957.db5b5c4d32a35240.js +0 -1
  526. package/apps/pwa/out/_next/static/chunks/958.53a8dcf4729e6997.js +0 -64
  527. package/apps/pwa/out/_next/static/chunks/9647.8f0cd0898c592a29.js +0 -1
  528. package/apps/pwa/out/_next/static/chunks/9665-26abb02665704c2c.js +0 -1
  529. package/apps/pwa/out/_next/static/chunks/9703.e7d81b6faef1050a.js +0 -1
  530. package/apps/pwa/out/_next/static/chunks/9882-7a9164b3c2dacbe5.js +0 -1
  531. package/apps/pwa/out/_next/static/chunks/9998.b74e033efadecd10.js +0 -1
  532. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-c604fb980a634d88.js +0 -1
  533. package/apps/pwa/out/_next/static/chunks/app/approvals/page-ec2d8a4979ca9075.js +0 -1
  534. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-cb6add08ad3c7660.js +0 -1
  535. package/apps/pwa/out/_next/static/chunks/app/board/page-e2eaa321ec223fe6.js +0 -1
  536. package/apps/pwa/out/_next/static/chunks/app/botlab/page-5b8a09c475b5f844.js +0 -1
  537. package/apps/pwa/out/_next/static/chunks/app/bots/page-91a77daedfbac191.js +0 -1
  538. package/apps/pwa/out/_next/static/chunks/app/ceo/page-f37fc5e974bda39b.js +0 -1
  539. package/apps/pwa/out/_next/static/chunks/app/chat/page-91429a0b78415a94.js +0 -1
  540. package/apps/pwa/out/_next/static/chunks/app/consult/page-b95798b58263b910.js +0 -1
  541. package/apps/pwa/out/_next/static/chunks/app/control/page-763d53e175e17aa1.js +0 -1
  542. package/apps/pwa/out/_next/static/chunks/app/decisions/page-d55023204055b12f.js +0 -1
  543. package/apps/pwa/out/_next/static/chunks/app/design-check/page-89d2140d78abc810.js +0 -1
  544. package/apps/pwa/out/_next/static/chunks/app/editor/page-82dc069abfe27f55.js +0 -1
  545. package/apps/pwa/out/_next/static/chunks/app/exec/page-25d9eee7beb552c0.js +0 -1
  546. package/apps/pwa/out/_next/static/chunks/app/field/page-770b4594c713ee97.js +0 -1
  547. package/apps/pwa/out/_next/static/chunks/app/healthz/route-c604fb980a634d88.js +0 -1
  548. package/apps/pwa/out/_next/static/chunks/app/inside/page-ba8e0dcae4f83985.js +0 -1
  549. package/apps/pwa/out/_next/static/chunks/app/layout-09788e1aa9a87db6.js +0 -1
  550. package/apps/pwa/out/_next/static/chunks/app/live/page-3337c6a1328c2674.js +0 -1
  551. package/apps/pwa/out/_next/static/chunks/app/live-run/page-89acd5d68c0bc560.js +0 -1
  552. package/apps/pwa/out/_next/static/chunks/app/loops/page-5c13e2c76371d797.js +0 -1
  553. package/apps/pwa/out/_next/static/chunks/app/market/page-653a9f18642825c6.js +0 -1
  554. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-fe986fe79b107546.js +0 -1
  555. package/apps/pwa/out/_next/static/chunks/app/morning/page-1e5da297557d2354.js +0 -1
  556. package/apps/pwa/out/_next/static/chunks/app/not-found-91ea9f5869a40943.js +0 -1
  557. package/apps/pwa/out/_next/static/chunks/app/observatory/page-7824e21b999962e2.js +0 -1
  558. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-53d00a60cc75a922.js +0 -1
  559. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-4e931248b3f9574b.js +0 -1
  560. package/apps/pwa/out/_next/static/chunks/app/outputs/page-443364c9e4a23b31.js +0 -1
  561. package/apps/pwa/out/_next/static/chunks/app/reflection/page-25ab9c614c14129b.js +0 -1
  562. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-dbcdcfac0a395a8a.js +0 -1
  563. package/apps/pwa/out/_next/static/chunks/app/sessions/page-bf1de6645089ec58.js +0 -1
  564. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-c4201761a5e839c9.js +0 -1
  565. package/apps/pwa/out/_next/static/chunks/app/settings/page-c304f469ea5d70e4.js +0 -1
  566. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-8e5a238cf5e50c9c.js +0 -1
  567. package/apps/pwa/out/_next/static/chunks/app/setup/layout-c604fb980a634d88.js +0 -1
  568. package/apps/pwa/out/_next/static/chunks/app/setup/page-32b526069ee50b3c.js +0 -1
  569. package/apps/pwa/out/_next/static/chunks/app/showroom/page-84220c776608cedc.js +0 -1
  570. package/apps/pwa/out/_next/static/chunks/app/tasks/page-e475618cbfd5ca2b.js +0 -1
  571. package/apps/pwa/out/_next/static/chunks/app/term/page-ac2c1e6169cfce57.js +0 -1
  572. package/apps/pwa/out/_next/static/chunks/app/today/page-fccd3020af2f8806.js +0 -1
  573. package/apps/pwa/out/_next/static/chunks/app/trace/page-9c0d7198ff7b5a91.js +0 -1
  574. package/apps/pwa/out/_next/static/chunks/app/vault/page-d54b1ec9b9c6430d.js +0 -1
  575. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-8c4bef1791d732ca.js +0 -1
  576. package/apps/pwa/out/_next/static/chunks/app/workflows/page-46fcc0b0bbc6fbfe.js +0 -1
  577. package/apps/pwa/out/_next/static/chunks/app/workspace/page-c1c80e345fa9d6f5.js +0 -1
  578. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-7dfda00afd172f5b.js +0 -1
  579. package/apps/pwa/out/_next/static/chunks/f21fd540.63ac75328926ed30.js +0 -1
  580. package/apps/pwa/out/_next/static/chunks/framework-77fdcc873519a6cd.js +0 -1
  581. package/apps/pwa/out/_next/static/chunks/main-app-d0d620d2ce235713.js +0 -1
  582. package/apps/pwa/out/_next/static/chunks/main-e0ef79c79337ba90.js +0 -1
  583. package/apps/pwa/out/_next/static/chunks/pages/_app-84b1bc71e3f9ce6a.js +0 -1
  584. package/apps/pwa/out/_next/static/chunks/pages/_error-2acb61f1363128cb.js +0 -1
  585. package/apps/pwa/out/_next/static/chunks/webpack-462ff5727ceb7824.js +0 -1
  586. package/scripts/migrate-monad-to-elanous.ts +0 -195
  587. package/scripts/rebrand-elanous.ts +0 -242
  588. /package/apps/pwa/out/_next/static/{8kITumG9GAZ1LwT9POrAR → RrjXTwz-urRAbChP1bX02}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[757],{10757:(e,t,l)=>{l.d(t,{p1:()=>D});var n=l(57865),a=l(20381),r=l(22546),s=l(16759),i=l(68985),o=l(39175),d=l(54377),c=l(22237),u=l(86321),m=l(92627);l(78403);var f=l(35877),p=l(46393),h=l(18360);let b=/^[a-zA-Z0-9_-]{1,128}$/;function x(e){let{flows:t}=e,l=[],a=0;for(let e of t)for(let t of e.runs)l.push({seat:e.seat,run:t,y:27+34*a++});let r=20+34*l.length;return(0,n.jsx)("svg",{viewBox:"0 0 ".concat(320," ").concat(r),className:"h-auto w-full max-w-md","aria-hidden":"true",focusable:"false",children:t.map(e=>{var t;let a=l.filter(t=>t.seat===e.seat),r=(a[0].y+a[a.length-1].y)/2,s=null!=(t=f.DG[e.seat])?t:(0,p.t)(e.seat);return(0,n.jsxs)("g",{children:[(0,n.jsx)("line",{x1:60,y1:r,x2:68,y2:r,stroke:"#7492a8",strokeWidth:2}),a.length>1&&(0,n.jsx)("line",{x1:68,y1:a[0].y,x2:68,y2:a[a.length-1].y,stroke:"#7492a8",strokeWidth:2}),a.map(e=>(0,n.jsxs)("g",{children:[(0,n.jsx)("line",{x1:68,y1:e.y,x2:256,y2:e.y,stroke:"#7492a8",strokeWidth:2}),(0,n.jsx)("polygon",{points:"".concat(264,",").concat(e.y," ").concat(256,",").concat(e.y-4," ").concat(256,",").concat(e.y+4),fill:"#7492a8"}),(0,n.jsx)("circle",{cx:272,cy:e.y,r:8,fill:"#173556",stroke:"#38bdf8",strokeWidth:2}),(0,n.jsx)("text",{x:162,y:e.y-5,textAnchor:"middle",fontSize:10,fill:"#cbd5e1",children:e.run.runId.length>16?"".concat(e.run.runId.slice(0,15),"…"):e.run.runId})]},"".concat(e.run.runId,"-").concat(e.run.at))),(0,n.jsx)("circle",{cx:44,cy:r,r:16,fill:"#173556",stroke:"#38bdf8",strokeWidth:2}),(0,n.jsx)("text",{x:44,y:r+3.5,textAnchor:"middle",fontSize:9,fontWeight:"bold",fill:"#e0f2fe",children:s})]},e.seat)})})}function g(e){let{edges:t,seatIds:l}=e,a=function(e,t){let l=[...new Set(null!=t?t:e.filter(e=>"run"===e.kind&&e.to.startsWith("loop:")&&b.test(e.from)).map(e=>e.from))];void 0===t&&l.sort();let n=new Set(l),a=new Map,r=new Set;for(let t of e){var s;if("run"!==t.kind||!n.has(t.from)||!t.to.startsWith("loop:"))continue;let e=t.to.slice(5);if(!b.test(e))continue;let l="".concat(t.at,"|").concat(t.from,"|").concat(t.to);if(r.has(l))continue;r.add(l);let i=null!=(s=a.get(t.from))?s:[];i.push({runId:e,at:t.at}),a.set(t.from,i)}return l.filter(e=>a.has(e)).map(e=>{var t;return{seat:e,runs:(null!=(t=a.get(e))?t:[]).sort((e,t)=>e.at.localeCompare(t.at))}})}(t,l);return(0,n.jsxs)("section",{"aria-label":"자원 발사 흐름",className:"rounded-xl border border-slate-600 p-3",children:[(0,n.jsx)("h3",{className:"font-semibold",children:"자원 흐름 \xb7 자리 → 런"}),(0,n.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:"현재 스냅숏의 실제 발사 관계(런 원장)로 자리 → 런 간선을 그립니다."}),0===a.length?(0,n.jsx)("p",{role:"status",className:"mt-2 text-sm text-slate-300",children:"실제 발사 관계가 아직 없습니다"}):(0,n.jsxs)("div",{className:"mt-2 grid gap-3 lg:grid-cols-[auto_1fr] lg:items-start",children:[(0,n.jsx)(x,{flows:a}),(0,n.jsx)("ol",{"aria-label":"자원 발사 간선",className:"space-y-2",children:a.map(e=>e.runs.map(t=>{var l;return(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/trace?level=L2&run=".concat(encodeURIComponent(t.runId)),className:"block w-full min-w-0 break-words rounded-lg border border-slate-600 px-3 py-2 text-left text-sm text-slate-300 focus-visible:outline-2 focus-visible:outline-sky-400",children:[null!=(l=f.DG[e.seat])?l:(0,p.t)(e.seat)," → 런 \xb7 ",(0,p.t)(t.runId)," \xb7 ",(0,n.jsx)("time",{dateTime:t.at,children:new Date(t.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]})},"".concat(e.seat,"-").concat(t.runId,"-").concat(t.at))}))})]})]})}let v={"살아 있음":"bg-emerald-500/15 text-emerald-300 ring-emerald-500/30",늦음:"bg-red-500/15 text-red-300 ring-red-500/30",실패:"bg-red-500/15 text-red-300 ring-red-500/30",꺼짐:"bg-slate-700 text-slate-300 ring-slate-500","판정 불가":"bg-slate-700 text-slate-300 ring-slate-500"},y=f.Pv;function w(e){let{detail:t}=e;return(0,n.jsxs)("div",{"data-near-detail":"",className:"w-[180px] space-y-1 rounded-lg border border-slate-600 bg-[#10243b]/95 p-2 text-left text-[10px] font-normal text-slate-200",children:[null!==t.now&&(0,n.jsxs)("p",{className:"break-words",children:[(0,n.jsx)("span",{className:"text-slate-400",children:"지금 "}),t.now]}),(null!==t.running||null!==t.waiting)&&(0,n.jsxs)("p",{className:"flex gap-2",children:[null!==t.running&&(0,n.jsxs)("span",{children:["도는 런 ",t.running]}),null!==t.waiting&&(0,n.jsxs)("span",{children:["대기 ",t.waiting]})]}),t.recent.length>0?(0,n.jsx)("ol",{"aria-label":"최근 행동",className:"space-y-0.5",children:t.recent.map((e,t)=>(0,n.jsx)("li",{className:"break-words",children:e},t))}):(0,n.jsx)("p",{className:"text-slate-400",children:"최근 행동 없음"})]})}let k={activity:function(e){let{data:t}=e,l="seat"===t.type||"hub"===t.type;return(0,n.jsxs)("div",{className:"relative flex flex-col items-center gap-1 text-center text-white",children:[(0,n.jsx)(u.h7,{type:"target",position:m.yX.Left,className:"!border-sky-400 !bg-sky-400"}),(0,n.jsx)("div",{className:"flex items-center justify-center rounded-full border-2 border-sky-400 bg-[#173556] px-2 font-bold ".concat(l?"h-[90px] w-[90px] text-lg":"h-[64px] w-[64px] text-xs"),children:(0,n.jsx)("span",{className:"line-clamp-2 break-all",children:(0,p.t)(t.label)})}),t.verdict&&(0,n.jsx)("span",{"data-loop-verdict":t.verdict,className:"rounded-full px-2 py-0.5 text-xs font-semibold ring-1 ".concat(v[t.verdict]),children:t.verdict}),t.detail&&(0,n.jsx)(w,{detail:t.detail}),(0,n.jsx)(u.h7,{type:"source",position:m.yX.Right,className:"!border-sky-400 !bg-sky-400"})]})}},j={packet:function(e){var t,l;let{id:r,sourceX:s,sourceY:i,targetX:o,targetY:d,sourcePosition:c,targetPosition:f,style:p,markerEnd:h,label:b,labelStyle:x,interactionWidth:g,data:v}=e,[y,w,k]=(0,m.Fp)({sourceX:s,sourceY:i,targetX:o,targetY:d,sourcePosition:c,targetPosition:f}),j=(0,a.useRef)(null),N=(0,a.useRef)(null),S=null!=(t=null==v?void 0:v.packet)?t:null,A=null!=(l=null==S?void 0:S.key)?l:null;return(0,a.useEffect)(()=>{if(null!==A)try{var e,t,l,n;null==(t=j.current)||null==(e=t.beginElement)||e.call(t),null==(n=N.current)||null==(l=n.beginElement)||l.call(n)}catch(e){}},[A]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.tE,{id:r,path:y,style:p,markerEnd:h,label:b,labelX:w,labelY:k,labelStyle:x,interactionWidth:g}),S&&(0,n.jsxs)("g",{"data-packet":S.word,"aria-hidden":"true",opacity:0,children:[(0,n.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",fontSize:16,fill:"#e0f2fe",stroke:"#10243b",strokeWidth:.6,children:S.shape}),(0,n.jsx)("animateMotion",{ref:j,begin:"indefinite",dur:"".concat(S.roundTrip?2400:1200,"ms"),path:y,fill:"freeze",...S.roundTrip?{keyPoints:"0;1;0",keyTimes:"0;0.5;1",calcMode:"linear"}:{}}),(0,n.jsx)("animate",{ref:N,attributeName:"opacity",begin:"indefinite",dur:"".concat(S.roundTrip?2400:1200,"ms"),values:"1;1;0",keyTimes:"0;0.85;1",fill:"freeze"})]})]})}},N={done:"border-emerald-500/60 bg-emerald-500/15",failed:"border-red-500/60 bg-red-500/15",current:"border-sky-300 bg-sky-500/20",pending:"border-dashed border-slate-500 bg-slate-800/40"};function S(e){return"hand"===e.kind?e.broken?"broken":"shadow"===e.mode?"shadow":"live":null}function A(e,t,l){if(t)return"".concat(y.launch," \xb7 유령 \xb7 런 원장 없음 ").concat(Math.floor((l-Date.parse(e.at))/6e4),"분");let n=S(e);return"broken"===n?"".concat(y.hand," \xb7 끊김 ✕"):"shadow"===n?"".concat(y.hand," \xb7 그림자"):y[e.kind]}function C(e){let{rows:t,edges:l,seenAt:s,now:i,state:o,seatIds:d,details:c}=e,m=(0,r.useSearchParams)(),b=m.get("card"),x=(0,f._s)(m),[w,C]=(0,a.useState)(1),M=(0,f.QU)(w),[T,R]=(0,a.useState)(!1);(0,a.useEffect)(()=>{var e;if(R(function(){try{return"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}()),"function"!=typeof window.matchMedia)return;let t=window.matchMedia("(prefers-reduced-motion: reduce)"),l=()=>R(t.matches);return null==(e=t.addEventListener)||e.call(t,"change",l),()=>{var e;return null==(e=t.removeEventListener)?void 0:e.call(t,"change",l)}},[]);let E=(0,a.useMemo)(()=>null===x?[]:(0,f.QB)(l,x),[l,x]),I=(0,a.useMemo)(()=>new Set(null===x?[]:(0,f.Z7)(l,x).map(f.iy)),[l,x]),[O,D]=(0,a.useState)(b);(0,a.useEffect)(()=>{D(b)},[b]);let U=(0,a.useMemo)(()=>[...new Set(l.filter(e=>"card"===e.kind).map(e=>e.ref))].sort(),[l]),W=(0,a.useMemo)(()=>null===O?[]:(0,f.Cd)(l,O),[l,O]),_=new Set(W.map(f.iy)),P=null!==O?_:null!==x?I:null,Z=e=>{D(e);let t=new URL(window.location.href);null===e?t.searchParams.delete("card"):t.searchParams.set("card",e),window.history.replaceState(window.history.state,"",t.toString())},F=(0,a.useMemo)(()=>(0,f.hA)(t,l,d),[t,l,d]),z=(0,a.useMemo)(()=>{let e=F.filter(e=>"seat"===e.type);return[...e.map(e=>e.id),"미지정"].map((t,l)=>({owner:t,column:l,nodes:[..."미지정"===t?[]:e.filter(e=>e.id===t),...F.filter(e=>"loop"===e.type&&e.owner===t)]})).filter(e=>e.nodes.length>0)},[F]),L=new Map(F.map((e,t)=>[e.id,"node-".concat(t)])),X=e=>{var t,l;return null!=(l=null==(t=F.find(t=>t.id===e))?void 0:t.label)?l:"알 수 없음"},q=new Set(l.filter(e=>"run"===e.kind&&e.to.startsWith("loop:")).map(e=>e.to)).size,K=e=>{if("near"!==M)return;let t=(0,f.qV)(e,l,e===f.EV?{running:q,...null==c?void 0:c[e]}:null==c?void 0:c[e],X,i);return null===t.now&&null===t.running&&null===t.waiting&&0===t.recent.length?void 0:t},V=z.map((e,t)=>z.slice(0,t).reduce((e,t)=>e+Math.ceil(t.nodes.length/8),0)),G=z.flatMap((e,t)=>{let{nodes:l}=e;return l.map((e,l)=>({id:L.get(e.id),type:"activity",position:{x:(V[t]+Math.floor(l/8))*220,y:l%8*138},data:{label:e.label,type:e.type,verdict:e.verdict,detail:K(e.id)}}))});f.fi.forEach((e,t)=>{let l=F.find(t=>t.id===e.id);l&&G.push({id:L.get(l.id),type:"activity",position:{x:220*t,y:-170},data:{label:l.label,type:l.type,verdict:l.verdict,detail:K(l.id)}})});let $=F.find(e=>e.id===f.qn);$&&G.push({id:L.get($.id),type:"activity",position:{x:0,y:-310},data:{label:$.label,type:$.type,detail:K($.id)}}),F.filter(e=>"other"===e.type).forEach((e,t)=>G.push({id:L.get(e.id),type:"activity",position:{x:180*Math.floor(t/8),y:138*Math.max(...z.map(e=>Math.min(e.nodes.length,8)),1)+40+t%8*138},data:{label:e.label,type:e.type,detail:K(e.id)}}));let Q=l.filter(e=>L.has(e.from)&&L.has(e.to)).map((e,t)=>{var n;let a=(0,f.iy)(e),r=i-(null!=(n=s[a])?n:0),o=r<f._o,d=null!==P&&P.has(a),c=null!==P&&!d,u=S(e),m=(0,f.$2)(e,l,i),p=A(e,m,i),h=m||T||!(r<2600)?null:{key:a,shape:f.Ok[e.kind],word:y[e.kind],roundTrip:(0,f.yo)(e,l)};return{id:"edge-".concat(t),type:"packet",source:L.get(e.from),target:L.get(e.to),label:p,data:{edge:e,packet:h,hand:u},animated:!1,focusable:!0,interactionWidth:24,style:{stroke:m||"broken"===u?"#fca5a5":d||!c&&o?"#7dd3fc":"#7492a8",strokeWidth:d||!c&&o?4:2,opacity:c?.16:d||o?1:"shadow"===u?.35:.55,...m||"broken"===u?{strokeDasharray:"2 7"}:"shadow"===u?{strokeDasharray:"6 5"}:{},transition:"stroke 1.5s ease, stroke-width 1.5s ease, opacity 1.5s ease"},labelStyle:{fill:c?"#7492a8":m||"broken"===u?"#fecaca":d||o?"#e0f2fe":"#a8b7c7",fontSize:12,opacity:c?.4:1}}});return(0,n.jsxs)("section",{"aria-label":"루프 활동 지도",className:"min-w-0 space-y-3",children:[(0,n.jsx)("p",{className:"text-sm text-slate-300",children:"자리(큰 원) \xb7 루프(작은 원) \xb7 최근 60분 실제 사건. 노드나 간선을 누르면 Trace로 이동합니다. 자원 노드는 자원 화면을 엽니다."}),(0,n.jsx)("p",{className:"text-xs text-slate-400",children:"꾸러미 모양 \xb7 요청 ● 결정 ◆ 보고 ■ 넘김 ▲ 발사 ★ 판단 ⬟ \xb7 넘김 실선 = 실발사 \xb7 점선 = 그림자 \xb7 ✕ = 끊김 \xb7 유령 = 발사 뒤 10분간 같은 ref 런 간선 없음 \xb7 확대하면 노드 안 지금 일이 보입니다."}),null!==x&&(0,n.jsxs)("section",{"aria-label":"데모 여정",className:"rounded-xl border border-sky-500/50 bg-[#173556] p-3",children:[(0,n.jsxs)("h3",{className:"font-semibold",children:["여정 \xb7 ",(0,p.t)(x)]}),"ready"===o&&0===I.size&&(0,n.jsx)("p",{role:"status",className:"mt-1 text-sm text-slate-300",children:"아직 사건 없음 — 틱이 이 카드를 집으면 1단계부터 채워집니다"}),(0,n.jsx)("ol",{className:"mt-2 flex min-w-0 flex-wrap items-stretch gap-2 text-sm",children:E.map((e,t)=>(0,n.jsxs)("li",{"data-journey-state":e.state,className:"flex min-w-0 items-center gap-2 rounded-lg border px-3 py-2 ".concat(N[e.state]),children:[(0,n.jsx)("span",{"aria-hidden":"true",children:h.bq[e.state].mark}),(0,n.jsxs)("span",{className:"min-w-0 break-words",children:[t+1,". ",e.label," \xb7 ",h.bq[e.state].word]}),e.edge&&(0,n.jsx)("time",{className:"text-xs text-slate-300",dateTime:e.edge.at,children:new Date(e.edge.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]},e.key))})]}),(0,n.jsxs)("div",{role:"group","aria-label":"데모 카드 선택",className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,n.jsx)("span",{children:"카드 경로"}),U.map(e=>(0,n.jsx)("button",{type:"button","aria-pressed":O===e,onClick:()=>Z(e),className:"min-h-11 rounded-lg border border-slate-500 px-3 py-2 aria-pressed:border-sky-300 aria-pressed:bg-sky-800 focus-visible:outline-2 focus-visible:outline-sky-400",children:(0,p.t)(e)},e)),null!==O&&(0,n.jsx)("button",{type:"button",onClick:()=>Z(null),className:"min-h-11 rounded-lg border border-slate-500 px-3 py-2 focus-visible:outline-2 focus-visible:outline-sky-400",children:"전체 보기"})]}),null!==O&&(0,n.jsxs)("section",{"aria-label":"선택 카드 흐름",className:"rounded-xl border border-sky-500/50 bg-[#173556] p-3",children:[(0,n.jsxs)("h3",{className:"font-semibold",children:["요구 한 줄 → 회신 \xb7 카드 ",(0,p.t)(O)]}),"ready"===o&&0===W.length&&(0,n.jsx)("p",{role:"status",children:"이 카드는 아직 흐른 사건이 없음"}),W.length>0&&(0,n.jsx)("ol",{className:"mt-2 space-y-2",children:W.map((e,t)=>{var l,a,r,s;return(0,n.jsxs)("li",{className:"break-words text-sm",children:[t+1,". ",(0,p.t)(null!=(r=null==(l=F.find(t=>t.id===e.from))?void 0:l.label)?r:"출발")," → ",e.to.startsWith("surface:")?"회신 \xb7 ".concat((0,p.t)(e.to.slice(8))):(0,p.t)(null!=(s=null==(a=F.find(t=>t.id===e.to))?void 0:a.label)?s:"도착")," \xb7 ",(0,n.jsx)("time",{dateTime:e.at,children:new Date(e.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]},"".concat((0,f.iy)(e),"-").concat(t))})})]}),"error"===o&&(0,n.jsx)("p",{role:"alert",className:"text-red-300",children:"지도 원천을 읽지 못했습니다. 이전 지도가 보이면 현재 데이터가 아닙니다. 데몬 연결을 확인하세요."}),"unauthorized"===o&&(0,n.jsx)("p",{role:"alert",className:"text-red-300",children:"지도 원천에 접근 권한이 없습니다 — 토큰으로 다시 붙으세요"}),"loading"===o&&(0,n.jsx)("p",{role:"status",children:"지도를 읽는 중…"}),(0,n.jsx)("div",{className:"h-[440px] min-w-0 w-full overflow-hidden rounded-2xl border border-slate-600 bg-[#10243b]","aria-label":"자리와 루프 관계도",children:(0,n.jsxs)(u.Gc,{nodes:G,edges:Q,nodeTypes:k,edgeTypes:j,fitView:!0,minZoom:.25,maxZoom:2.5,onInit:e=>C(e.getZoom()),onMove:(e,t)=>C(t.zoom),nodesDraggable:!1,nodesConnectable:!1,edgesReconnectable:!1,deleteKeyCode:null,onNodeClick:(e,t)=>{let l=F.find(e=>L.get(e.id)===t.id);l&&window.location.assign((0,f.ol)(l.id))},onEdgeClick:(e,t)=>{var l;let n=null==(l=t.data)?void 0:l.edge;n&&window.location.assign((0,f.ol)(n.to,n))},children:[(0,n.jsx)(u.VS,{color:"#355470"}),(0,n.jsx)(u.H2,{showInteractive:!1})]},"loading"===o?"loading":"loaded")}),"ready"===o&&(0,n.jsx)(g,{edges:l,seatIds:d}),(0,n.jsx)("div",{"aria-label":"지도 목록",className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:z.map(e=>{var t;return(0,n.jsxs)("section",{className:"min-w-0 rounded-xl border border-slate-600 p-3",children:[(0,n.jsx)("h3",{className:"mb-2 font-semibold",children:null!=(t=f.DG[e.owner])?t:(0,p.t)(e.owner)}),(0,n.jsx)("ul",{className:"space-y-2",children:e.nodes.map(e=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",onClick:()=>window.location.assign((0,f.ol)(e.id)),className:"flex w-full min-w-0 items-center gap-2 rounded-lg border border-slate-600 px-2 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-sky-400",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"shrink-0 rounded-full border border-sky-400 bg-[#173556] ".concat("seat"===e.type?"h-8 w-8":"h-5 w-5")}),(0,n.jsx)("span",{className:"min-w-0 break-words",children:(0,p.t)(e.label)}),e.verdict&&(0,n.jsx)("span",{"data-loop-verdict":e.verdict,className:"ml-auto shrink-0 rounded-full px-2 py-0.5 text-xs ring-1 ".concat(v[e.verdict]),children:e.verdict})]})},e.id))})]},e.owner)})}),(0,n.jsx)("ul",{"aria-label":"최근 간선 사건",className:"space-y-2",children:l.map((e,t)=>{var a,r,o,d,c;return(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",onClick:()=>window.location.assign((0,f.ol)(e.to,e)),className:"block w-full min-w-0 break-words rounded-lg border border-slate-600 px-3 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-sky-400 ".concat(null!==O?_.has((0,f.iy)(e))?"border-sky-300 bg-sky-500/30 text-sky-100":"bg-slate-800/30 text-slate-400 opacity-40":i-(null!=(o=s[(0,f.iy)(e)])?o:0)<f._o?"bg-sky-500/20 text-sky-100 transition-colors duration-[1500ms] motion-reduce:transition-none":"bg-slate-800/50 text-slate-300"),children:[(0,p.t)(null!=(d=null==(a=F.find(t=>t.id===e.from))?void 0:a.label)?d:"출발")," → ",(0,p.t)(null!=(c=null==(r=F.find(t=>t.id===e.to))?void 0:r.label)?c:"도착")," \xb7 ",A(e,(0,f.$2)(e,l,i),i)," \xb7 ",(0,n.jsx)("time",{dateTime:e.at,children:new Date(e.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]})},"edge-".concat(t))})}),"ready"===o&&0===l.length&&(0,n.jsx)("p",{role:"status",className:"text-slate-300",children:"최근 사건이 없습니다."})]})}var M=l(60866);let T=["loop.","task-agent","harness.queue","self-implement.pod"],R={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),setInterval:(e,t)=>globalThis.setInterval(e,t),clearInterval:e=>globalThis.clearInterval(e)};var E=l(11390);let I=(0,d.g)(null,null);function O(e){let{view:t,runsUnreadable:l,refreshedAt:a}=e;return(0,n.jsxs)("section",{"aria-label":"루프 에이전트 활동",className:"min-w-0 space-y-6 p-4 text-lg min-[1440px]:text-[22px]",children:[(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3 min-[1440px]:grid-cols-4",children:t.seats.map(e=>(0,n.jsxs)("article",{"aria-label":"".concat(e.seat," 자리"),className:"min-w-0 space-y-3 rounded-2xl border border-border bg-card p-3 min-[1440px]:p-6",children:[(0,n.jsx)("h2",{className:"font-bold",children:e.seat}),(0,n.jsx)("p",{className:"break-words","aria-label":"지금 하는 일",children:e.now}),(0,n.jsxs)("dl",{className:"space-y-1 text-base min-[1440px]:text-[22px]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"오늘 착지"}),(0,n.jsx)("dd",{children:e.landedToday})]}),(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"막힘"}),(0,n.jsx)("dd",{children:e.blocked})]}),(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"대표 결정 대기"}),(0,n.jsx)("dd",{children:e.decisionsWaiting})]})]})]},e.seat))}),(0,n.jsxs)("section",{"aria-label":"지금 도는 런",className:"min-w-0 rounded-2xl border border-border bg-card p-4",children:[(0,n.jsx)("h2",{className:"font-semibold",children:"지금 도는 런"}),l?(0,n.jsx)("p",{className:"text-muted-foreground",children:"못 읽음"}):0===t.runs.length?(0,n.jsx)("p",{className:"text-muted-foreground",children:"지금 도는 런이 없습니다"}):(0,n.jsx)("ul",{className:"mt-3 flex flex-wrap gap-3",children:t.runs.map((e,t)=>(0,n.jsxs)("li",{className:"min-w-0 break-words rounded-lg border border-border px-3 py-2",children:["런 ",e.id6," \xb7 ",e.stage," \xb7 경과 ","못 읽음"===e.elapsedSec?e.elapsedSec:"".concat(e.elapsedSec,"초")]},"".concat(e.id6,"-").concat(t)))})]}),(0,n.jsxs)("p",{className:"text-sm text-muted-foreground",children:["마지막 갱신 ",(0,n.jsx)("time",{dateTime:null!=a?a:void 0,children:a?new Date(a).toLocaleString("ko-KR",{timeZone:"Asia/Seoul"}):"못 읽음"})]})]})}function D(){var e,t,l,u,m,p,h,b,x;let{initialMode:g="activity",initialLoopRef:v=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{client:y,config:w}=(0,s.Q)(),[k,j]=(0,a.useState)(null),N=null!=(t=(0,f._s)((0,r.useSearchParams)()))?t:v,[S,A]=(0,a.useState)(null!==N?"map":g),[D,U]=(0,a.useState)(null),[W,_]=(0,a.useState)(0),P="".concat(w.baseUrl,"\0").concat(w.token),Z="".concat(P,"\0").concat(S,"\0").concat(null!=N?N:""),F=(null==k?void 0:k.source)===P?k:null,z=null!=(l=null==F||null==(e=F.seats)?void 0:e.seats.flatMap(e=>{var t,l;return null!=(l=null==(t=e.subSeats)?void 0:t.map(e=>e.id))?l:[]}))?l:[];(0,a.useEffect)(()=>{let e=!0,t=!1,l=(0,o.xX)({baseUrl:w.baseUrl,token:w.token});j({source:P,seats:null,runs:null,runsUnreadable:!0,refreshedAt:null});let n=async()=>{var n;if(!e||t||document.hidden)return;t=!0;let a=new Intl.DateTimeFormat("sv-SE",{timeZone:"Asia/Seoul"}).format(new Date),[r,s]=await Promise.allSettled([(0,i.Nn)(y,a),l.getHarnessRuns()]);if(t=!1,!e)return;let o="fulfilled"===r.status&&"ready"===r.value.kind?r.value.data:null,d="fulfilled"===s.status&&Array.isArray(null==(n=s.value)?void 0:n.entries)?s.value:null;j({source:P,seats:o,runs:d,runsUnreadable:null===d,refreshedAt:o||d?new Date().toISOString():null})};n();let a=window.setInterval(()=>{n()},1e4),r=()=>{document.hidden||n()};return document.addEventListener("visibilitychange",r),()=>{e=!1,window.clearInterval(a),document.removeEventListener("visibilitychange",r)}},[y,w.baseUrl,w.token,P]),(0,a.useEffect)(()=>{if("map"!==S)return;let e=!0,t=!1,l=!1;U(null),_(Date.now());let n=async()=>{if(!e||document.hidden)return;if(t){l=!0;return}t=!0,l=!1;let a=Date.now();try{let[t,l,n]=await Promise.all([(0,c.Em)(e=>y.fetchJson(e),a),y.fetchJson("/v1/schedules?includeOff=1&includeOwners=1"),y.fetchJson((0,f.Ew)(N)?"/v1/loops/edges?ref=".concat(encodeURIComponent(N),"&mode=live&limit=500"):"/v1/loops/edges?since=".concat(encodeURIComponent(new Date(a-f.oO).toISOString()),"&limit=200"))]),r=l.owners;if(!Array.isArray(r))throw Error("루프 주인 조회 실패");let s=null===N?(0,f.u1)(n,a):(0,f.s_)(n,a);e&&U(e=>({source:Z,rows:(0,f.lG)(t,r,a),edges:s,seenAt:(0,f.XV)((null==e?void 0:e.source)===Z?e.seenAt:null,s,a),state:"ready"}))}catch(t){if(e){let e=t instanceof o.Iu&&(401===t.status||403===t.status);U(t=>({source:Z,rows:e?[]:(null==t?void 0:t.source)===Z?t.rows:[],edges:e?[]:(null==t?void 0:t.source)===Z?t.edges:[],seenAt:e?{}:(null==t?void 0:t.source)===Z?t.seenAt:{},state:e?"unauthorized":"error"}))}}finally{t=!1,l&&e&&n()}};n();let a=function(e,t){var l,n,a,r,s;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null!=(l=i.timers)?l:R,d=null!=(n=i.debounceMs)?n:800,c=null!=(a=i.pollMs)?a:5e3,u=!1,m=null,f=null,p=o.setInterval(()=>{u||null!==f||t()},null!=(r=i.safetyMs)?r:3e4),h=()=>{var e;u||null!==f||(f=o.setInterval(()=>{u||t()},c),null==(e=i.onMode)||e.call(i,"poll"))},b=e.logsStreamUrl({category:T.join(",")}),x=()=>{};if(null===b)h();else{let e=!1;x=(0,M.BX)(b,{events:{log:()=>{if(!u){var e;null!==f&&(o.clearInterval(f),f=null,null==(e=i.onMode)||e.call(i,"stream")),null!==m&&o.clearTimeout(m),m=o.setTimeout(()=>{m=null,u||t()},d)}}},onError:h,onConstructError:()=>{e=!0}}),e?h():null==(s=i.onMode)||s.call(i,"stream")}return()=>{u||(u=!0,null!==m&&o.clearTimeout(m),null!==f&&o.clearInterval(f),o.clearInterval(p),m=null,f=null,x())}}(y,()=>{n()}),r=window.setInterval(()=>{document.hidden||_(Date.now())},250),s=()=>{document.hidden||n()};return document.addEventListener("visibilitychange",s),()=>{e=!1,a(),window.clearInterval(r),document.removeEventListener("visibilitychange",s)}},[y,S,Z,N]);let L=(null==D?void 0:D.source)===Z?D:null,X=null!==N&&N===v&&(0,f.Ew)(N)?N:null;return(0,n.jsxs)("div",{className:"min-w-0",children:[null!==X&&(0,n.jsx)("p",{"aria-label":"고정 루프",className:"px-4 pt-4 text-base",children:(0,E.FW)(X)}),(0,n.jsxs)("div",{role:"group","aria-label":"루프 에이전트 보기",className:"flex gap-2 px-4 pt-4",children:[(0,n.jsx)("button",{type:"button","aria-pressed":"activity"===S,onClick:()=>A("activity"),className:"min-h-11 rounded-lg border border-slate-500 px-4 py-2 aria-pressed:bg-sky-800",children:"현황"}),(0,n.jsx)("button",{type:"button","aria-pressed":"map"===S,onClick:()=>A("map"),className:"min-h-11 rounded-lg border border-slate-500 px-4 py-2 aria-pressed:bg-sky-800",children:"지도"})]}),"activity"===S?(0,n.jsx)(O,{view:F?(0,d.g)(F.seats,F.runs):I,runsUnreadable:null==(u=null==F?void 0:F.runsUnreadable)||u,refreshedAt:null!=(m=null==F?void 0:F.refreshedAt)?m:null}):(0,n.jsx)("div",{className:"min-w-0 p-4",children:(0,n.jsx)(C,{rows:null!=(p=null==L?void 0:L.rows)?p:[],edges:null!=(h=null==L?void 0:L.edges)?h:[],seatIds:["OP","MK","TC","UX",...z],details:F?function(e,t){let l={COO:"OP",CMO:"MK",CTO:"TC",CXO:"UX"},n=t?"못 읽음":e.runs.length,a={[f.Xg]:{running:n},[f.EV]:{running:n}};for(let t of e.seats)a[l[t.seat]]={now:t.now,waiting:t.decisionsWaiting};return a}((0,d.g)(F.seats,F.runs),F.runsUnreadable):void 0,seenAt:null!=(b=null==L?void 0:L.seenAt)?b:{},now:W,state:null!=(x=null==L?void 0:L.state)?x:"loading"})})]})}},11390:(e,t,l)=>{l.d(t,{FW:()=>r,ZR:()=>a,kU:()=>s});var n=l(35877);let a={refParam:"ref"};function r(e){return"루프 ".concat(e)}function s(e){var t;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.refParam;if(0===l.length)return null;let r=null!=(t=null==e?void 0:e.get(l))?t:null;if(null===r)return null;let s=r.trim();return(0,n.Ew)(s)?s:null}},22194:(e,t,l)=>{l.d(t,{u:()=>n});function n(e,t){if(!e.enabled||"off"===e.scheduleState)return"off";if("failed"===e.lastStatus||"error"===e.lastStatus||"failure"===e.lastStatus||"abandoned"===e.lastStatus||"expired"===e.lastStatus)return"failed";if("stale"===e.scheduleState)return"late";let l=null===e.lastRunAt?NaN:Date.parse(e.lastRunAt);if(void 0!==e.secondDueAt){let n=null===e.secondDueAt?NaN:Date.parse(e.secondDueAt);return Number.isFinite(l)&&Number.isFinite(t)&&Number.isFinite(n)&&n>l&&t>n?"late":"alive"}return Number.isFinite(t)&&Number.isFinite(l)&&null!==e.intervalMs&&Number.isFinite(e.intervalMs)&&e.intervalMs>0&&t-l>2*e.intervalMs?"late":"alive"}},22237:(e,t,l)=>{l.d(t,{QK:()=>s,i6:()=>r,Pz:()=>o,Em:()=>i,Yy:()=>d});var n=l(22194);let a={alive:"살아 있음",late:"늦음",failed:"실패",off:"꺼짐"},r="/v1/schedules?includeOff=1",s="/v1/dashboard/loops";async function i(e,t){var l,i,o,c,u,m,f,p;let[h,b]=await Promise.allSettled([e(r),e(s)]),x="fulfilled"===h.status?null==(l=h.value)?void 0:l.schedules:null,g="fulfilled"===b.status?null==(o=b.value)||null==(i=o.loops)?void 0:i.loops:null;if(!Array.isArray(x)&&!Array.isArray(g))throw Error("loop registries unavailable");if(!Array.isArray(x))throw Error("스케줄 레지스트리 조회 실패");if(!Array.isArray(g))throw Error("루프 레지스트리 조회 실패");let v=d(x,t).map(e=>({...e,id:"schedule:".concat(e.id)}));for(let e of g){let l=e.last?Date.parse(e.last.at):NaN,r=(0,n.u)({enabled:!1!==e.armed,lastRunAt:null!=(m=null==(c=e.last)?void 0:c.at)?m:null,lastStatus:null!=(f=null==(u=e.last)?void 0:u.status.toLowerCase())?f:null,intervalMs:null},t);v.push({id:"loop:".concat(e.name),name:e.label,layer:null!=(p=e.category)?p:"루프",owner:"미지정",mode:null===e.armed?"관측":e.armed?"armed":"off",lastRun:Number.isFinite(l)?e.last.at:null,verdict:"alive"===r?"판정 불가":a[r]})}return v}function o(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now,n=0,a=!0;return{async refresh(){let r=++n;try{let s=await i(e,l());a&&r===n&&t({rows:s,state:"ready"})}catch(e){a&&r===n&&t({rows:[],state:"error"})}},dispose(){a=!1}}}function d(e,t){return e.map(e=>{var l,r,s,i,o,d,c;let u=e.lastRun?Date.parse(e.lastRun.at):NaN,m=(0,n.u)({enabled:"off"!==e.state,lastRunAt:null!=(d=null==(l=e.lastRun)?void 0:l.at)?d:null,lastStatus:(null==(r=e.lastRun)?void 0:r.exit)!=null&&0!==e.lastRun.exit?"failed":(null==(s=e.lastRun)?void 0:s.status)==null||["ok","success","completed"].includes(e.lastRun.status.toLowerCase())?null!=(c=null==(o=e.lastRun)||null==(i=o.status)?void 0:i.toLowerCase())?c:null:"failed",intervalMs:e.cron?null:e.intervalMs,...e.cron?{scheduleState:e.state}:{}},t),f=!e.cron&&!(e.intervalMs&&e.intervalMs>0),p="alive"===m&&(!Number.isFinite(u)||f)?"판정 불가":a[m];return{id:e.id,name:e.name,layer:e.domain||e.category||e.source,owner:"미지정",mode:e.runVia||e.source,lastRun:Number.isFinite(u)?e.lastRun.at:null,verdict:p}})}},35877:(e,t,l)=>{l.d(t,{$2:()=>d,Cd:()=>S,DG:()=>c,EV:()=>b,Ew:()=>g,Ok:()=>W,Pv:()=>D,QB:()=>I,QU:()=>O,XV:()=>C,Xg:()=>h,Z7:()=>E,_o:()=>o,_s:()=>v,fi:()=>x,hA:()=>j,iy:()=>A,lG:()=>s,oO:()=>i,ol:()=>N,qV:()=>U,qn:()=>p,s_:()=>w,u1:()=>y,yo:()=>_});var n=l(22194),a=l(46393);let r={alive:"살아 있음",late:"늦음",failed:"실패",off:"꺼짐"};function s(e,t,l){let s=new Map(t.flatMap(e=>e.jobs.map(t=>[t,e.owner]))),i=new Map(t.map(e=>[e.id,e.owner])),o=e.map(e=>{var t;return{...e,owner:null!=(t=e.id.startsWith("schedule:")?s.get(e.id.slice(9)):i.get(e.id.slice(5)))?t:"미지정"}});for(let e of t){var d,c,u,m,f,p,h;if(o.some(t=>t.id==="loop:".concat(e.id)))continue;let t=(0,n.u)({enabled:e.enabled,lastRunAt:null!=(m=null==(d=e.lastRun)?void 0:d.at)?m:null,lastStatus:null!=(f=null==(c=e.lastRun)?void 0:c.status.toLowerCase())?f:null,intervalMs:null},l);o.push({id:"loop:".concat(e.id),name:(0,a.t)(e.title),layer:"그래프",owner:null!=(p=e.owner)?p:"미지정",mode:"등록",lastRun:null!=(h=null==(u=e.lastRun)?void 0:u.at)?h:null,verdict:"alive"!==t||e.lastRun?r[t]:"판정 불가"})}return o}let i=36e5,o=1500;function d(e,t,l){if("launch"!==e.kind||"string"==typeof e.run&&""!==e.run)return!1;let n=Date.parse(e.at);return Number.isFinite(n)&&l-n>=6e5&&!t.some(t=>"run"===t.kind&&t.ref===e.ref)}let c={OP:"COO",MK:"CMO",TC:"CTO",UX:"CXO"},u=["OP","MK","TC","UX"],m=new Set(["request","decision","report","card","run","hand","launch","move"]),f=/^[a-zA-Z0-9_-]{1,128}$/,p="loop:resources",h="agent:task-agent",b="hub:runs",x=[{id:"loop:orchestrator",label:"조율"},{id:h,label:"TASK-AGENT"},{id:b,label:"런 묶음"},{id:"loop:release-loop",label:"발행 루프"},{id:"loop:guardian",label:"수호자"}];function g(e){return"string"==typeof e&&f.test(e)}function v(e){var t,l;let n=null!=(t=null==e?void 0:e.get("journey"))?t:null;if(g(n))return n;let a=null!=(l=null==e?void 0:e.get("demo"))?l:null;return g(a)&&"0"!==a&&"1"!==a?a:null}function y(e,t){return k(e,t,!0)}function w(e,t){return k(e,t,!1)}function k(e,t,l){let n=e&&"object"==typeof e&&"edges"in e?e.edges:null;if(!Array.isArray(n))throw Error("간선 조회 실패");return n.filter(e=>{if(!e||"object"!=typeof e||!m.has(e.kind)||"string"!=typeof e.at||"string"!=typeof e.from||"string"!=typeof e.to||"string"!=typeof e.ref)return!1;let n=Date.parse(e.at);return Number.isFinite(n)&&n<=t&&(!l||n>=t-i)})}function j(e,t){var l,n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,s=new Map;for(let e of r)s.set(e,{id:e,type:"seat",label:null!=(l=c[e])?l:(0,a.t)(e)});for(let e of x)s.set(e.id,{id:e.id,type:"hub",label:e.label});s.set(p,{id:p,type:"hub",label:"자원"});let i=new Set(r),o=new Set;for(let t of e){let e=i.has(t.owner)?t.owner:"미지정",l=t.id,n=(0,a.t)(t.name),r=o.has(n)?"".concat(n," \xb7 ").concat((0,a.t)(t.id)):n;o.add(n);let d=s.get(l);s.set(l,(null==d?void 0:d.type)==="hub"?{...d,owner:e,verdict:t.verdict}:{id:l,type:"loop",label:r,owner:e,verdict:t.verdict})}for(let e of t)for(let t of[e.from,e.to]){if(s.has(t))continue;let[e,l]=t.split(":",2);"loop"===e&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:l.startsWith("run-")?"런 \xb7 ".concat((0,a.t)(l)):"칸 \xb7 ".concat((0,a.t)(l))}):"card"===e||"surface"===e?s.set(t,{id:t,type:"other",label:"card"===e?"카드":"입구 \xb7 ".concat((0,a.t)(null!=l?l:""))}):"agent"===e&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:"에이전트 \xb7 ".concat((0,a.t)(l))}):"pr"===e&&l&&/^\d{1,9}$/.test(l)?s.set(t,{id:t,type:"other",label:"PR #".concat(l)}):("release"===e||"landed"===e)&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:"".concat("release"===e?"발행":"착지"," \xb7 ").concat((0,a.t)(l))}):i.has(t)&&s.set(t,{id:t,type:"seat",label:null!=(n=c[t])?n:(0,a.t)(t)})}return[...s.values()]}function N(e,t){if(e===p&&!t)return"/loops?view=resources";if(t&&("hand"===t.kind||"launch"===t.kind||"move"===t.kind)&&f.test(t.ref))return"/trace?q=".concat(encodeURIComponent(t.ref));if(e.startsWith("pr:")&&/^\d{1,9}$/.test(e.slice(3))&&!t)return"/trace?q=".concat(encodeURIComponent(e.slice(3)));let l=(null==t?void 0:t.kind)==="run"?t.ref:e;if((null==t?void 0:t.kind)==="card"&&f.test(t.ref))return"/trace?q=".concat(encodeURIComponent(t.ref));if(l.startsWith("loop:")&&f.test(l.slice(5))){let e=l.slice(5);return e.startsWith("run-")?"/trace?level=L2&run=".concat(encodeURIComponent(e)):"/trace?q=".concat(encodeURIComponent(e))}return l.startsWith("schedule:")&&f.test(l.slice(9))?"/trace?q=".concat(encodeURIComponent(l.slice(9))):l.startsWith("card:")&&f.test(l.slice(5))?"/trace?q=".concat(encodeURIComponent(l.slice(5))):(null==t?void 0:t.kind)==="run"&&f.test(l)?"/trace?level=L2&run=".concat(encodeURIComponent(l)):"/trace"}function S(e,t){let l=e=>e.startsWith("surface:")?0:e.startsWith("card:")?1:e.startsWith("loop:")?2:3;return e.filter(e=>"card"===e.kind&&e.ref===t).sort((e,t)=>e.at.localeCompare(t.at)||l(e.from)-l(t.from))}function A(e){return JSON.stringify([e.at,e.kind,e.from,e.to,e.ref])}function C(e,t,l){return Object.fromEntries(t.map(t=>{var n;let a=A(t);return[a,null!=(n=null==e?void 0:e[a])?n:null===e?l-o:l]}))}let M=[{key:"tick",label:"틱 \xb7 넘김"},{key:"agent",label:"TASK-AGENT \xb7 발사"},{key:"run",label:"런"},{key:"pr",label:"PR"},{key:"land",label:"착지 \xb7 green 제안"}];function T(e,t){let l=new Set([t]);for(let n of e)"hand"===n.kind&&void 0!==n.cell&&(n.cell===t||n.cell.startsWith("".concat(t,"-")))&&l.add(n.ref);return l}function R(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set([t]),n=e.ref===t||l.has(e.ref);return"hand"===e.kind?n&&"shadow"!==e.mode?"tick":null:"launch"===e.kind?n?"agent":null:"move"===e.kind?n&&"green-proposal"===e.move?"land":null:"run"===e.kind?e.to.startsWith("pr:")?"pr":e.to.startsWith("loop:")?"run":null:"card"===e.kind&&e.to.startsWith("landed:")?"land":null}function E(e,t){let l=T(e,t),n=e=>M.findIndex(n=>n.key===R(e,t,l));return[...S(e,t),...e.filter(e=>"card"!==e.kind||e.ref!==t).filter(e=>null!==R(e,t,l))].sort((e,t)=>e.at.localeCompare(t.at)||n(e)-n(t))}function I(e,t){let l=E(e,t),n=T(e,t),a=0===l.length,r=M.reduce((e,a,r)=>l.some(e=>R(e,t,n)===a.key&&!e.broken)?r:e,-1);return M.map((e,s)=>{let i=l.filter(l=>R(l,t,n)===e.key),o=i.find(e=>!e.broken);return o?{key:e.key,label:e.label,state:"done",edge:o}:0===i.length&&s<r?{key:e.key,label:e.label,state:"done"}:i.length>0?(a=!0,{key:e.key,label:e.label,state:"failed",edge:i[0]}):a?{key:e.key,label:e.label,state:"pending"}:(a=!0,{key:e.key,label:e.label,state:"current"})})}function O(e){return e<.8?"far":"near"}let D={request:"요청",decision:"결정",report:"보고",card:"카드",run:"런",hand:"넘김",launch:"발사",move:"판단"};function U(e,t,l,n,r){var s,i;let o=t.filter(t=>t.from===e||t.to===e).sort((e,t)=>t.at.localeCompare(e.at)).slice(0,5).map(l=>"".concat(void 0!==r&&d(l,t,r)?"발사 \xb7 유령":D[l.kind]," ").concat(l.from===e?"→":"←"," ").concat((0,a.t)(n(l.from===e?l.to:l.from))));return{now:(null==l?void 0:l.now)?(0,a.t)(l.now):null,recent:o,running:null!=(s=null==l?void 0:l.running)?s:null,waiting:null!=(i=null==l?void 0:l.waiting)?i:null}}let W={request:"●",decision:"◆",report:"■",hand:"▲",launch:"★",move:"⬟",card:"◇",run:"▶"};function _(e,t){let l="request"===e.kind?["report","decision"]:"report"===e.kind||"decision"===e.kind?["request"]:[];return l.length>0&&t.some(t=>l.includes(t.kind)&&t.ref===e.ref&&t.from===e.to&&t.to===e.from)}},46393:(e,t,l)=>{l.d(t,{t:()=>u});let n=/\brun-([0-9a-f]{8})-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,a=/(?:\/(?:Users|home|private)\/[\w.%@+~/-]+|\b[A-Za-z]:\\(?:[^\\\s,;<>"']+\\)*[^\\\s,;<>"']+)/g,r=/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi,s=RegExp("(?<![A-Za-z0-9_-])(?:[A-Za-z0-9_]{40,}|(?:sk|ghp|gho|ghs|github_pat|xox[abpr])[-_][A-Za-z0-9_-]{20,})(?![A-Za-z0-9_-])","g"),i=/\b(?:OP|MK|TC|UX)\b/g,o=/\bmsb(\d+)\b/gi,d=/(?:\u{1F451}|🪑|🅞|🅜|🅣|🅤|🅢|🅕)\uFE0F?/gu,c={OP:"COO",MK:"CMO",TC:"CTO",UX:"CXO"};function u(e){let t,l=e;do t=l,l=l.replace(n,(e,t)=>"run-".concat(t.slice(0,6))).replace(a,"").replace(r,"").replace(d,"").replace(s,"").replace(i,e=>c[e]).replace(o,(e,t)=>"remote-".concat(t));while(l!==t&&function(e){return[n,a,r,s,i,d,o].flatMap(t=>[...e.matchAll(t)].map(e=>e[0]))}(l).length>0);return l}},54377:(e,t,l)=>{l.d(t,{g:()=>i,q:()=>s});var n=l(46393);let a=[{id:"OP",seat:"COO"},{id:"MK",seat:"CMO"},{id:"TC",seat:"CTO"},{id:"UX",seat:"CXO"}];function r(e){return(0,n.t)(e.replace(/\s+/g," ")).trim()}function s(e){var t;let l=e.split("\n"),n=(e,t)=>{let l=e.trim();return t&&(l=(l=l.replace(/^\*\*\[[^\]]+\]\*\*\s*/,"")).replace(/^(?:📌\S*\s*)?\d{4}-\d{2}-\d{2}\s+\d{1,2}:\d{2}\s*KST\s*/,"")),r(l=(l=(l=(l=(l=(l=l.replace(/^→\s*(?:[A-Z]{1,4}|전원|전체)(?=\s|·|$)(?:\s*·\s*(?:[A-Z]{1,4}|전원|전체)(?=\s|·|$))*\s*(?:·)?\s*/u,"")).replace(/^—\s*/,"")).replace(/^[-*]\s+/,"").replace(/\*\*|`|__/g,"").replace(/^#+\s*/,"").trim()).replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,"")).replace(RegExp("^(?:\\p{Extended_Pictographic}\\uFE0F?)+\\s*","u"),"")).replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,""))},a=n(null!=(t=l[0])?t:"",!0);if(a)return a;let s=l.slice(1).find(e=>e.trim());return s?n(s,!1):""}function i(e,t){var l;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return{seats:a.map(t=>{var l;let{id:n,seat:a}=t,r=null==e?void 0:e.seats.find(e=>e.seat===n);return{seat:a,now:(null==r?void 0:r.now)&&Array.from(s(r.now.text)).slice(0,40).join("")||"못 읽음",landedToday:(null==r?void 0:r.landed)==null?"못 읽음":r.landed.length,blocked:(null==r?void 0:r.blocked)==null?"못 읽음":r.blocked.length,decisionsWaiting:null!=(l=null==r?void 0:r.pendingDecisions)?l:"못 읽음"}}),runs:(null!=(l=null==t?void 0:t.entries)?l:[]).filter(e=>"running"===e.status).sort((e,t)=>{var l,n;return(Date.parse(null!=(l=t.lastActivityTimestamp)?l:"")||0)-(Date.parse(null!=(n=e.lastActivityTimestamp)?n:"")||0)}).slice(0,6).map(e=>{var t;let l=Date.parse(null!=(t=e.lastActivityTimestamp)?t:"");return{id6:function(e){let t=e.replace(/^run-/i,"");return/^[a-z0-9]{6}/i.test(t)&&r(t.slice(0,6))||"못 읽음"}(e.runId),stage:r(e.lastPhase||e.status)||"못 읽음",elapsedSec:Number.isFinite(l)?Math.max(0,Math.floor((n-l)/1e3)):"못 읽음"}})}}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5255],{11631:(e,t,l)=>{l.d(t,{QK:()=>s,i6:()=>r,Pz:()=>o,Em:()=>i,Yy:()=>d});var n=l(40530);let a={alive:"살아 있음",late:"늦음",failed:"실패",off:"꺼짐"},r="/v1/schedules?includeOff=1",s="/v1/dashboard/loops";async function i(e,t){var l,i,o,c,u,m,f,p;let[h,b]=await Promise.allSettled([e(r),e(s)]),x="fulfilled"===h.status?null==(l=h.value)?void 0:l.schedules:null,g="fulfilled"===b.status?null==(o=b.value)||null==(i=o.loops)?void 0:i.loops:null;if(!Array.isArray(x)&&!Array.isArray(g))throw Error("loop registries unavailable");if(!Array.isArray(x))throw Error("스케줄 레지스트리 조회 실패");if(!Array.isArray(g))throw Error("루프 레지스트리 조회 실패");let v=d(x,t).map(e=>({...e,id:"schedule:".concat(e.id)}));for(let e of g){let l=e.last?Date.parse(e.last.at):NaN,r=(0,n.u)({enabled:!1!==e.armed,lastRunAt:null!=(m=null==(c=e.last)?void 0:c.at)?m:null,lastStatus:null!=(f=null==(u=e.last)?void 0:u.status.toLowerCase())?f:null,intervalMs:null},t);v.push({id:"loop:".concat(e.name),name:e.label,layer:null!=(p=e.category)?p:"루프",owner:"미지정",mode:null===e.armed?"관측":e.armed?"armed":"off",lastRun:Number.isFinite(l)?e.last.at:null,verdict:"alive"===r?"판정 불가":a[r]})}return v}function o(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now,n=0,a=!0;return{async refresh(){let r=++n;try{let s=await i(e,l());a&&r===n&&t({rows:s,state:"ready"})}catch(e){a&&r===n&&t({rows:[],state:"error"})}},dispose(){a=!1}}}function d(e,t){return e.map(e=>{var l,r,s,i,o,d,c;let u=e.lastRun?Date.parse(e.lastRun.at):NaN,m=(0,n.u)({enabled:"off"!==e.state,lastRunAt:null!=(d=null==(l=e.lastRun)?void 0:l.at)?d:null,lastStatus:(null==(r=e.lastRun)?void 0:r.exit)!=null&&0!==e.lastRun.exit?"failed":(null==(s=e.lastRun)?void 0:s.status)==null||["ok","success","completed"].includes(e.lastRun.status.toLowerCase())?null!=(c=null==(o=e.lastRun)||null==(i=o.status)?void 0:i.toLowerCase())?c:null:"failed",intervalMs:e.cron?null:e.intervalMs,...e.cron?{scheduleState:e.state}:{}},t),f=!e.cron&&!(e.intervalMs&&e.intervalMs>0),p="alive"===m&&(!Number.isFinite(u)||f)?"판정 불가":a[m];return{id:e.id,name:e.name,layer:e.domain||e.category||e.source,owner:"미지정",mode:e.runVia||e.source,lastRun:Number.isFinite(u)?e.lastRun.at:null,verdict:p}})}},25255:(e,t,l)=>{l.d(t,{p1:()=>D});var n=l(61241),a=l(11437),r=l(99714),s=l(40503),i=l(18137),o=l(4199),d=l(50825),c=l(11631),u=l(99681),m=l(16067);l(14579);var f=l(70917),p=l(67097),h=l(39389);let b=/^[a-zA-Z0-9_-]{1,128}$/;function x(e){let{flows:t}=e,l=[],a=0;for(let e of t)for(let t of e.runs)l.push({seat:e.seat,run:t,y:27+34*a++});let r=20+34*l.length;return(0,n.jsx)("svg",{viewBox:"0 0 ".concat(320," ").concat(r),className:"h-auto w-full max-w-md","aria-hidden":"true",focusable:"false",children:t.map(e=>{var t;let a=l.filter(t=>t.seat===e.seat),r=(a[0].y+a[a.length-1].y)/2,s=null!=(t=f.DG[e.seat])?t:(0,p.t)(e.seat);return(0,n.jsxs)("g",{children:[(0,n.jsx)("line",{x1:60,y1:r,x2:68,y2:r,stroke:"#7492a8",strokeWidth:2}),a.length>1&&(0,n.jsx)("line",{x1:68,y1:a[0].y,x2:68,y2:a[a.length-1].y,stroke:"#7492a8",strokeWidth:2}),a.map(e=>(0,n.jsxs)("g",{children:[(0,n.jsx)("line",{x1:68,y1:e.y,x2:256,y2:e.y,stroke:"#7492a8",strokeWidth:2}),(0,n.jsx)("polygon",{points:"".concat(264,",").concat(e.y," ").concat(256,",").concat(e.y-4," ").concat(256,",").concat(e.y+4),fill:"#7492a8"}),(0,n.jsx)("circle",{cx:272,cy:e.y,r:8,fill:"#173556",stroke:"#38bdf8",strokeWidth:2}),(0,n.jsx)("text",{x:162,y:e.y-5,textAnchor:"middle",fontSize:10,fill:"#cbd5e1",children:e.run.runId.length>16?"".concat(e.run.runId.slice(0,15),"…"):e.run.runId})]},"".concat(e.run.runId,"-").concat(e.run.at))),(0,n.jsx)("circle",{cx:44,cy:r,r:16,fill:"#173556",stroke:"#38bdf8",strokeWidth:2}),(0,n.jsx)("text",{x:44,y:r+3.5,textAnchor:"middle",fontSize:9,fontWeight:"bold",fill:"#e0f2fe",children:s})]},e.seat)})})}function g(e){let{edges:t,seatIds:l}=e,a=function(e,t){let l=[...new Set(null!=t?t:e.filter(e=>"run"===e.kind&&e.to.startsWith("loop:")&&b.test(e.from)).map(e=>e.from))];void 0===t&&l.sort();let n=new Set(l),a=new Map,r=new Set;for(let t of e){var s;if("run"!==t.kind||!n.has(t.from)||!t.to.startsWith("loop:"))continue;let e=t.to.slice(5);if(!b.test(e))continue;let l="".concat(t.at,"|").concat(t.from,"|").concat(t.to);if(r.has(l))continue;r.add(l);let i=null!=(s=a.get(t.from))?s:[];i.push({runId:e,at:t.at}),a.set(t.from,i)}return l.filter(e=>a.has(e)).map(e=>{var t;return{seat:e,runs:(null!=(t=a.get(e))?t:[]).sort((e,t)=>e.at.localeCompare(t.at))}})}(t,l);return(0,n.jsxs)("section",{"aria-label":"자원 발사 흐름",className:"rounded-xl border border-slate-600 p-3",children:[(0,n.jsx)("h3",{className:"font-semibold",children:"자원 흐름 \xb7 자리 → 런"}),(0,n.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:"현재 스냅숏의 실제 발사 관계(런 원장)로 자리 → 런 간선을 그립니다."}),0===a.length?(0,n.jsx)("p",{role:"status",className:"mt-2 text-sm text-slate-300",children:"실제 발사 관계가 아직 없습니다"}):(0,n.jsxs)("div",{className:"mt-2 grid gap-3 lg:grid-cols-[auto_1fr] lg:items-start",children:[(0,n.jsx)(x,{flows:a}),(0,n.jsx)("ol",{"aria-label":"자원 발사 간선",className:"space-y-2",children:a.map(e=>e.runs.map(t=>{var l;return(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/trace?level=L2&run=".concat(encodeURIComponent(t.runId)),className:"block w-full min-w-0 break-words rounded-lg border border-slate-600 px-3 py-2 text-left text-sm text-slate-300 focus-visible:outline-2 focus-visible:outline-sky-400",children:[null!=(l=f.DG[e.seat])?l:(0,p.t)(e.seat)," → 런 \xb7 ",(0,p.t)(t.runId)," \xb7 ",(0,n.jsx)("time",{dateTime:t.at,children:new Date(t.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]})},"".concat(e.seat,"-").concat(t.runId,"-").concat(t.at))}))})]})]})}let v={"살아 있음":"bg-emerald-500/15 text-emerald-300 ring-emerald-500/30",늦음:"bg-red-500/15 text-red-300 ring-red-500/30",실패:"bg-red-500/15 text-red-300 ring-red-500/30",꺼짐:"bg-slate-700 text-slate-300 ring-slate-500","판정 불가":"bg-slate-700 text-slate-300 ring-slate-500"},y=f.Pv;function w(e){let{detail:t}=e;return(0,n.jsxs)("div",{"data-near-detail":"",className:"w-[180px] space-y-1 rounded-lg border border-slate-600 bg-[#10243b]/95 p-2 text-left text-[10px] font-normal text-slate-200",children:[null!==t.now&&(0,n.jsxs)("p",{className:"break-words",children:[(0,n.jsx)("span",{className:"text-slate-400",children:"지금 "}),t.now]}),(null!==t.running||null!==t.waiting)&&(0,n.jsxs)("p",{className:"flex gap-2",children:[null!==t.running&&(0,n.jsxs)("span",{children:["도는 런 ",t.running]}),null!==t.waiting&&(0,n.jsxs)("span",{children:["대기 ",t.waiting]})]}),t.recent.length>0?(0,n.jsx)("ol",{"aria-label":"최근 행동",className:"space-y-0.5",children:t.recent.map((e,t)=>(0,n.jsx)("li",{className:"break-words",children:e},t))}):(0,n.jsx)("p",{className:"text-slate-400",children:"최근 행동 없음"})]})}let k={activity:function(e){let{data:t}=e,l="seat"===t.type||"hub"===t.type;return(0,n.jsxs)("div",{className:"relative flex flex-col items-center gap-1 text-center text-white",children:[(0,n.jsx)(u.h7,{type:"target",position:m.yX.Left,className:"!border-sky-400 !bg-sky-400"}),(0,n.jsx)("div",{className:"flex items-center justify-center rounded-full border-2 border-sky-400 bg-[#173556] px-2 font-bold ".concat(l?"h-[90px] w-[90px] text-lg":"h-[64px] w-[64px] text-xs"),children:(0,n.jsx)("span",{className:"line-clamp-2 break-all",children:(0,p.t)(t.label)})}),t.verdict&&(0,n.jsx)("span",{"data-loop-verdict":t.verdict,className:"rounded-full px-2 py-0.5 text-xs font-semibold ring-1 ".concat(v[t.verdict]),children:t.verdict}),t.detail&&(0,n.jsx)(w,{detail:t.detail}),(0,n.jsx)(u.h7,{type:"source",position:m.yX.Right,className:"!border-sky-400 !bg-sky-400"})]})}},j={packet:function(e){var t,l;let{id:r,sourceX:s,sourceY:i,targetX:o,targetY:d,sourcePosition:c,targetPosition:f,style:p,markerEnd:h,label:b,labelStyle:x,interactionWidth:g,data:v}=e,[y,w,k]=(0,m.Fp)({sourceX:s,sourceY:i,targetX:o,targetY:d,sourcePosition:c,targetPosition:f}),j=(0,a.useRef)(null),N=(0,a.useRef)(null),S=null!=(t=null==v?void 0:v.packet)?t:null,A=null!=(l=null==S?void 0:S.key)?l:null;return(0,a.useEffect)(()=>{if(null!==A)try{var e,t,l,n;null==(t=j.current)||null==(e=t.beginElement)||e.call(t),null==(n=N.current)||null==(l=n.beginElement)||l.call(n)}catch(e){}},[A]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.tE,{id:r,path:y,style:p,markerEnd:h,label:b,labelX:w,labelY:k,labelStyle:x,interactionWidth:g}),S&&(0,n.jsxs)("g",{"data-packet":S.word,"aria-hidden":"true",opacity:0,children:[(0,n.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",fontSize:16,fill:"#e0f2fe",stroke:"#10243b",strokeWidth:.6,children:S.shape}),(0,n.jsx)("animateMotion",{ref:j,begin:"indefinite",dur:"".concat(S.roundTrip?2400:1200,"ms"),path:y,fill:"freeze",...S.roundTrip?{keyPoints:"0;1;0",keyTimes:"0;0.5;1",calcMode:"linear"}:{}}),(0,n.jsx)("animate",{ref:N,attributeName:"opacity",begin:"indefinite",dur:"".concat(S.roundTrip?2400:1200,"ms"),values:"1;1;0",keyTimes:"0;0.85;1",fill:"freeze"})]})]})}},N={done:"border-emerald-500/60 bg-emerald-500/15",failed:"border-red-500/60 bg-red-500/15",current:"border-sky-300 bg-sky-500/20",pending:"border-dashed border-slate-500 bg-slate-800/40"};function S(e){return"hand"===e.kind?e.broken?"broken":"shadow"===e.mode?"shadow":"live":null}function A(e,t,l){if(t)return"".concat(y.launch," \xb7 유령 \xb7 런 원장 없음 ").concat(Math.floor((l-Date.parse(e.at))/6e4),"분");let n=S(e);return"broken"===n?"".concat(y.hand," \xb7 끊김 ✕"):"shadow"===n?"".concat(y.hand," \xb7 그림자"):y[e.kind]}function C(e){let{rows:t,edges:l,seenAt:s,now:i,state:o,seatIds:d,details:c}=e,m=(0,r.useSearchParams)(),b=m.get("card"),x=(0,f._s)(m),[w,C]=(0,a.useState)(1),M=(0,f.QU)(w),[T,R]=(0,a.useState)(!1);(0,a.useEffect)(()=>{var e;if(R(function(){try{return"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}()),"function"!=typeof window.matchMedia)return;let t=window.matchMedia("(prefers-reduced-motion: reduce)"),l=()=>R(t.matches);return null==(e=t.addEventListener)||e.call(t,"change",l),()=>{var e;return null==(e=t.removeEventListener)?void 0:e.call(t,"change",l)}},[]);let E=(0,a.useMemo)(()=>null===x?[]:(0,f.QB)(l,x),[l,x]),I=(0,a.useMemo)(()=>new Set(null===x?[]:(0,f.Z7)(l,x).map(f.iy)),[l,x]),[O,D]=(0,a.useState)(b);(0,a.useEffect)(()=>{D(b)},[b]);let U=(0,a.useMemo)(()=>[...new Set(l.filter(e=>"card"===e.kind).map(e=>e.ref))].sort(),[l]),W=(0,a.useMemo)(()=>null===O?[]:(0,f.Cd)(l,O),[l,O]),_=new Set(W.map(f.iy)),P=null!==O?_:null!==x?I:null,Z=e=>{D(e);let t=new URL(window.location.href);null===e?t.searchParams.delete("card"):t.searchParams.set("card",e),window.history.replaceState(window.history.state,"",t.toString())},F=(0,a.useMemo)(()=>(0,f.hA)(t,l,d),[t,l,d]),z=(0,a.useMemo)(()=>{let e=F.filter(e=>"seat"===e.type);return[...e.map(e=>e.id),"미지정"].map((t,l)=>({owner:t,column:l,nodes:[..."미지정"===t?[]:e.filter(e=>e.id===t),...F.filter(e=>"loop"===e.type&&e.owner===t)]})).filter(e=>e.nodes.length>0)},[F]),L=new Map(F.map((e,t)=>[e.id,"node-".concat(t)])),X=e=>{var t,l;return null!=(l=null==(t=F.find(t=>t.id===e))?void 0:t.label)?l:"알 수 없음"},q=new Set(l.filter(e=>"run"===e.kind&&e.to.startsWith("loop:")).map(e=>e.to)).size,K=e=>{if("near"!==M)return;let t=(0,f.qV)(e,l,e===f.EV?{running:q,...null==c?void 0:c[e]}:null==c?void 0:c[e],X,i);return null===t.now&&null===t.running&&null===t.waiting&&0===t.recent.length?void 0:t},V=z.map((e,t)=>z.slice(0,t).reduce((e,t)=>e+Math.ceil(t.nodes.length/8),0)),G=z.flatMap((e,t)=>{let{nodes:l}=e;return l.map((e,l)=>({id:L.get(e.id),type:"activity",position:{x:(V[t]+Math.floor(l/8))*220,y:l%8*138},data:{label:e.label,type:e.type,verdict:e.verdict,detail:K(e.id)}}))});f.fi.forEach((e,t)=>{let l=F.find(t=>t.id===e.id);l&&G.push({id:L.get(l.id),type:"activity",position:{x:220*t,y:-170},data:{label:l.label,type:l.type,verdict:l.verdict,detail:K(l.id)}})});let $=F.find(e=>e.id===f.qn);$&&G.push({id:L.get($.id),type:"activity",position:{x:0,y:-310},data:{label:$.label,type:$.type,detail:K($.id)}}),F.filter(e=>"other"===e.type).forEach((e,t)=>G.push({id:L.get(e.id),type:"activity",position:{x:180*Math.floor(t/8),y:138*Math.max(...z.map(e=>Math.min(e.nodes.length,8)),1)+40+t%8*138},data:{label:e.label,type:e.type,detail:K(e.id)}}));let Q=l.filter(e=>L.has(e.from)&&L.has(e.to)).map((e,t)=>{var n;let a=(0,f.iy)(e),r=i-(null!=(n=s[a])?n:0),o=r<f._o,d=null!==P&&P.has(a),c=null!==P&&!d,u=S(e),m=(0,f.$2)(e,l,i),p=A(e,m,i),h=m||T||!(r<2600)?null:{key:a,shape:f.Ok[e.kind],word:y[e.kind],roundTrip:(0,f.yo)(e,l)};return{id:"edge-".concat(t),type:"packet",source:L.get(e.from),target:L.get(e.to),label:p,data:{edge:e,packet:h,hand:u},animated:!1,focusable:!0,interactionWidth:24,style:{stroke:m||"broken"===u?"#fca5a5":d||!c&&o?"#7dd3fc":"#7492a8",strokeWidth:d||!c&&o?4:2,opacity:c?.16:d||o?1:"shadow"===u?.35:.55,...m||"broken"===u?{strokeDasharray:"2 7"}:"shadow"===u?{strokeDasharray:"6 5"}:{},transition:"stroke 1.5s ease, stroke-width 1.5s ease, opacity 1.5s ease"},labelStyle:{fill:c?"#7492a8":m||"broken"===u?"#fecaca":d||o?"#e0f2fe":"#a8b7c7",fontSize:12,opacity:c?.4:1}}});return(0,n.jsxs)("section",{"aria-label":"루프 활동 지도",className:"min-w-0 space-y-3",children:[(0,n.jsx)("p",{className:"text-sm text-slate-300",children:"자리(큰 원) \xb7 루프(작은 원) \xb7 최근 60분 실제 사건. 노드나 간선을 누르면 Trace로 이동합니다. 자원 노드는 자원 화면을 엽니다."}),(0,n.jsx)("p",{className:"text-xs text-slate-400",children:"꾸러미 모양 \xb7 요청 ● 결정 ◆ 보고 ■ 넘김 ▲ 발사 ★ 판단 ⬟ \xb7 넘김 실선 = 실발사 \xb7 점선 = 그림자 \xb7 ✕ = 끊김 \xb7 유령 = 발사 뒤 10분간 같은 ref 런 간선 없음 \xb7 확대하면 노드 안 지금 일이 보입니다."}),null!==x&&(0,n.jsxs)("section",{"aria-label":"데모 여정",className:"rounded-xl border border-sky-500/50 bg-[#173556] p-3",children:[(0,n.jsxs)("h3",{className:"font-semibold",children:["여정 \xb7 ",(0,p.t)(x)]}),"ready"===o&&0===I.size&&(0,n.jsx)("p",{role:"status",className:"mt-1 text-sm text-slate-300",children:"아직 사건 없음 — 틱이 이 카드를 집으면 1단계부터 채워집니다"}),(0,n.jsx)("ol",{className:"mt-2 flex min-w-0 flex-wrap items-stretch gap-2 text-sm",children:E.map((e,t)=>(0,n.jsxs)("li",{"data-journey-state":e.state,className:"flex min-w-0 items-center gap-2 rounded-lg border px-3 py-2 ".concat(N[e.state]),children:[(0,n.jsx)("span",{"aria-hidden":"true",children:h.bq[e.state].mark}),(0,n.jsxs)("span",{className:"min-w-0 break-words",children:[t+1,". ",e.label," \xb7 ",h.bq[e.state].word]}),e.edge&&(0,n.jsx)("time",{className:"text-xs text-slate-300",dateTime:e.edge.at,children:new Date(e.edge.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]},e.key))})]}),(0,n.jsxs)("div",{role:"group","aria-label":"데모 카드 선택",className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,n.jsx)("span",{children:"카드 경로"}),U.map(e=>(0,n.jsx)("button",{type:"button","aria-pressed":O===e,onClick:()=>Z(e),className:"min-h-11 rounded-lg border border-slate-500 px-3 py-2 aria-pressed:border-sky-300 aria-pressed:bg-sky-800 focus-visible:outline-2 focus-visible:outline-sky-400",children:(0,p.t)(e)},e)),null!==O&&(0,n.jsx)("button",{type:"button",onClick:()=>Z(null),className:"min-h-11 rounded-lg border border-slate-500 px-3 py-2 focus-visible:outline-2 focus-visible:outline-sky-400",children:"전체 보기"})]}),null!==O&&(0,n.jsxs)("section",{"aria-label":"선택 카드 흐름",className:"rounded-xl border border-sky-500/50 bg-[#173556] p-3",children:[(0,n.jsxs)("h3",{className:"font-semibold",children:["요구 한 줄 → 회신 \xb7 카드 ",(0,p.t)(O)]}),"ready"===o&&0===W.length&&(0,n.jsx)("p",{role:"status",children:"이 카드는 아직 흐른 사건이 없음"}),W.length>0&&(0,n.jsx)("ol",{className:"mt-2 space-y-2",children:W.map((e,t)=>{var l,a,r,s;return(0,n.jsxs)("li",{className:"break-words text-sm",children:[t+1,". ",(0,p.t)(null!=(r=null==(l=F.find(t=>t.id===e.from))?void 0:l.label)?r:"출발")," → ",e.to.startsWith("surface:")?"회신 \xb7 ".concat((0,p.t)(e.to.slice(8))):(0,p.t)(null!=(s=null==(a=F.find(t=>t.id===e.to))?void 0:a.label)?s:"도착")," \xb7 ",(0,n.jsx)("time",{dateTime:e.at,children:new Date(e.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]},"".concat((0,f.iy)(e),"-").concat(t))})})]}),"error"===o&&(0,n.jsx)("p",{role:"alert",className:"text-red-300",children:"지도 원천을 읽지 못했습니다. 이전 지도가 보이면 현재 데이터가 아닙니다. 데몬 연결을 확인하세요."}),"unauthorized"===o&&(0,n.jsx)("p",{role:"alert",className:"text-red-300",children:"지도 원천에 접근 권한이 없습니다 — 토큰으로 다시 붙으세요"}),"loading"===o&&(0,n.jsx)("p",{role:"status",children:"지도를 읽는 중…"}),(0,n.jsx)("div",{className:"h-[440px] min-w-0 w-full overflow-hidden rounded-2xl border border-slate-600 bg-[#10243b]","aria-label":"자리와 루프 관계도",children:(0,n.jsxs)(u.Gc,{nodes:G,edges:Q,nodeTypes:k,edgeTypes:j,fitView:!0,minZoom:.25,maxZoom:2.5,onInit:e=>C(e.getZoom()),onMove:(e,t)=>C(t.zoom),nodesDraggable:!1,nodesConnectable:!1,edgesReconnectable:!1,deleteKeyCode:null,onNodeClick:(e,t)=>{let l=F.find(e=>L.get(e.id)===t.id);l&&window.location.assign((0,f.ol)(l.id))},onEdgeClick:(e,t)=>{var l;let n=null==(l=t.data)?void 0:l.edge;n&&window.location.assign((0,f.ol)(n.to,n))},children:[(0,n.jsx)(u.VS,{color:"#355470"}),(0,n.jsx)(u.H2,{showInteractive:!1})]},"loading"===o?"loading":"loaded")}),"ready"===o&&(0,n.jsx)(g,{edges:l,seatIds:d}),(0,n.jsx)("div",{"aria-label":"지도 목록",className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:z.map(e=>{var t;return(0,n.jsxs)("section",{className:"min-w-0 rounded-xl border border-slate-600 p-3",children:[(0,n.jsx)("h3",{className:"mb-2 font-semibold",children:null!=(t=f.DG[e.owner])?t:(0,p.t)(e.owner)}),(0,n.jsx)("ul",{className:"space-y-2",children:e.nodes.map(e=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",onClick:()=>window.location.assign((0,f.ol)(e.id)),className:"flex w-full min-w-0 items-center gap-2 rounded-lg border border-slate-600 px-2 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-sky-400",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"shrink-0 rounded-full border border-sky-400 bg-[#173556] ".concat("seat"===e.type?"h-8 w-8":"h-5 w-5")}),(0,n.jsx)("span",{className:"min-w-0 break-words",children:(0,p.t)(e.label)}),e.verdict&&(0,n.jsx)("span",{"data-loop-verdict":e.verdict,className:"ml-auto shrink-0 rounded-full px-2 py-0.5 text-xs ring-1 ".concat(v[e.verdict]),children:e.verdict})]})},e.id))})]},e.owner)})}),(0,n.jsx)("ul",{"aria-label":"최근 간선 사건",className:"space-y-2",children:l.map((e,t)=>{var a,r,o,d,c;return(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",onClick:()=>window.location.assign((0,f.ol)(e.to,e)),className:"block w-full min-w-0 break-words rounded-lg border border-slate-600 px-3 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-sky-400 ".concat(null!==O?_.has((0,f.iy)(e))?"border-sky-300 bg-sky-500/30 text-sky-100":"bg-slate-800/30 text-slate-400 opacity-40":i-(null!=(o=s[(0,f.iy)(e)])?o:0)<f._o?"bg-sky-500/20 text-sky-100 transition-colors duration-[1500ms] motion-reduce:transition-none":"bg-slate-800/50 text-slate-300"),children:[(0,p.t)(null!=(d=null==(a=F.find(t=>t.id===e.from))?void 0:a.label)?d:"출발")," → ",(0,p.t)(null!=(c=null==(r=F.find(t=>t.id===e.to))?void 0:r.label)?c:"도착")," \xb7 ",A(e,(0,f.$2)(e,l,i),i)," \xb7 ",(0,n.jsx)("time",{dateTime:e.at,children:new Date(e.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]})},"edge-".concat(t))})}),"ready"===o&&0===l.length&&(0,n.jsx)("p",{role:"status",className:"text-slate-300",children:"최근 사건이 없습니다."})]})}var M=l(78178);let T=["loop.","task-agent","harness.queue","self-implement.pod"],R={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),setInterval:(e,t)=>globalThis.setInterval(e,t),clearInterval:e=>globalThis.clearInterval(e)};var E=l(58302);let I=(0,d.g)(null,null);function O(e){let{view:t,runsUnreadable:l,refreshedAt:a}=e;return(0,n.jsxs)("section",{"aria-label":"루프 에이전트 활동",className:"min-w-0 space-y-6 p-4 text-lg min-[1440px]:text-[22px]",children:[(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3 min-[1440px]:grid-cols-4",children:t.seats.map(e=>(0,n.jsxs)("article",{"aria-label":"".concat(e.seat," 자리"),className:"min-w-0 space-y-3 rounded-2xl border border-border bg-card p-3 min-[1440px]:p-6",children:[(0,n.jsx)("h2",{className:"font-bold",children:e.seat}),(0,n.jsx)("p",{className:"break-words","aria-label":"지금 하는 일",children:e.now}),(0,n.jsxs)("dl",{className:"space-y-1 text-base min-[1440px]:text-[22px]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"오늘 착지"}),(0,n.jsx)("dd",{children:e.landedToday})]}),(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"막힘"}),(0,n.jsx)("dd",{children:e.blocked})]}),(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"대표 결정 대기"}),(0,n.jsx)("dd",{children:e.decisionsWaiting})]})]})]},e.seat))}),(0,n.jsxs)("section",{"aria-label":"지금 도는 런",className:"min-w-0 rounded-2xl border border-border bg-card p-4",children:[(0,n.jsx)("h2",{className:"font-semibold",children:"지금 도는 런"}),l?(0,n.jsx)("p",{className:"text-muted-foreground",children:"못 읽음"}):0===t.runs.length?(0,n.jsx)("p",{className:"text-muted-foreground",children:"지금 도는 런이 없습니다"}):(0,n.jsx)("ul",{className:"mt-3 flex flex-wrap gap-3",children:t.runs.map((e,t)=>(0,n.jsxs)("li",{className:"min-w-0 break-words rounded-lg border border-border px-3 py-2",children:["런 ",e.id6," \xb7 ",e.stage," \xb7 경과 ","못 읽음"===e.elapsedSec?e.elapsedSec:"".concat(e.elapsedSec,"초")]},"".concat(e.id6,"-").concat(t)))})]}),(0,n.jsxs)("p",{className:"text-sm text-muted-foreground",children:["마지막 갱신 ",(0,n.jsx)("time",{dateTime:null!=a?a:void 0,children:a?new Date(a).toLocaleString("ko-KR",{timeZone:"Asia/Seoul"}):"못 읽음"})]})]})}function D(){var e,t,l,u,m,p,h,b,x;let{initialMode:g="activity",initialLoopRef:v=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{client:y,config:w}=(0,s.Q)(),[k,j]=(0,a.useState)(null),N=null!=(t=(0,f._s)((0,r.useSearchParams)()))?t:v,[S,A]=(0,a.useState)(null!==N?"map":g),[D,U]=(0,a.useState)(null),[W,_]=(0,a.useState)(0),P="".concat(w.baseUrl,"\0").concat(w.token),Z="".concat(P,"\0").concat(S,"\0").concat(null!=N?N:""),F=(null==k?void 0:k.source)===P?k:null,z=null!=(l=null==F||null==(e=F.seats)?void 0:e.seats.flatMap(e=>{var t,l;return null!=(l=null==(t=e.subSeats)?void 0:t.map(e=>e.id))?l:[]}))?l:[];(0,a.useEffect)(()=>{let e=!0,t=!1,l=(0,o.xX)({baseUrl:w.baseUrl,token:w.token});j({source:P,seats:null,runs:null,runsUnreadable:!0,refreshedAt:null});let n=async()=>{var n;if(!e||t||document.hidden)return;t=!0;let a=new Intl.DateTimeFormat("sv-SE",{timeZone:"Asia/Seoul"}).format(new Date),[r,s]=await Promise.allSettled([(0,i.Nn)(y,a),l.getHarnessRuns()]);if(t=!1,!e)return;let o="fulfilled"===r.status&&"ready"===r.value.kind?r.value.data:null,d="fulfilled"===s.status&&Array.isArray(null==(n=s.value)?void 0:n.entries)?s.value:null;j({source:P,seats:o,runs:d,runsUnreadable:null===d,refreshedAt:o||d?new Date().toISOString():null})};n();let a=window.setInterval(()=>{n()},1e4),r=()=>{document.hidden||n()};return document.addEventListener("visibilitychange",r),()=>{e=!1,window.clearInterval(a),document.removeEventListener("visibilitychange",r)}},[y,w.baseUrl,w.token,P]),(0,a.useEffect)(()=>{if("map"!==S)return;let e=!0,t=!1,l=!1;U(null),_(Date.now());let n=async()=>{if(!e||document.hidden)return;if(t){l=!0;return}t=!0,l=!1;let a=Date.now();try{let[t,l,n]=await Promise.all([(0,c.Em)(e=>y.fetchJson(e),a),y.fetchJson("/v1/schedules?includeOff=1&includeOwners=1"),y.fetchJson((0,f.Ew)(N)?"/v1/loops/edges?ref=".concat(encodeURIComponent(N),"&mode=live&limit=500"):"/v1/loops/edges?since=".concat(encodeURIComponent(new Date(a-f.oO).toISOString()),"&limit=200"))]),r=l.owners;if(!Array.isArray(r))throw Error("루프 주인 조회 실패");let s=null===N?(0,f.u1)(n,a):(0,f.s_)(n,a);e&&U(e=>({source:Z,rows:(0,f.lG)(t,r,a),edges:s,seenAt:(0,f.XV)((null==e?void 0:e.source)===Z?e.seenAt:null,s,a),state:"ready"}))}catch(t){if(e){let e=t instanceof o.Iu&&(401===t.status||403===t.status);U(t=>({source:Z,rows:e?[]:(null==t?void 0:t.source)===Z?t.rows:[],edges:e?[]:(null==t?void 0:t.source)===Z?t.edges:[],seenAt:e?{}:(null==t?void 0:t.source)===Z?t.seenAt:{},state:e?"unauthorized":"error"}))}}finally{t=!1,l&&e&&n()}};n();let a=function(e,t){var l,n,a,r,s;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null!=(l=i.timers)?l:R,d=null!=(n=i.debounceMs)?n:800,c=null!=(a=i.pollMs)?a:5e3,u=!1,m=null,f=null,p=o.setInterval(()=>{u||null!==f||t()},null!=(r=i.safetyMs)?r:3e4),h=()=>{var e;u||null!==f||(f=o.setInterval(()=>{u||t()},c),null==(e=i.onMode)||e.call(i,"poll"))},b=e.logsStreamUrl({category:T.join(",")}),x=()=>{};if(null===b)h();else{let e=!1;x=(0,M.BX)(b,{events:{log:()=>{if(!u){var e;null!==f&&(o.clearInterval(f),f=null,null==(e=i.onMode)||e.call(i,"stream")),null!==m&&o.clearTimeout(m),m=o.setTimeout(()=>{m=null,u||t()},d)}}},onError:h,onConstructError:()=>{e=!0}}),e?h():null==(s=i.onMode)||s.call(i,"stream")}return()=>{u||(u=!0,null!==m&&o.clearTimeout(m),null!==f&&o.clearInterval(f),o.clearInterval(p),m=null,f=null,x())}}(y,()=>{n()}),r=window.setInterval(()=>{document.hidden||_(Date.now())},250),s=()=>{document.hidden||n()};return document.addEventListener("visibilitychange",s),()=>{e=!1,a(),window.clearInterval(r),document.removeEventListener("visibilitychange",s)}},[y,S,Z,N]);let L=(null==D?void 0:D.source)===Z?D:null,X=null!==N&&N===v&&(0,f.Ew)(N)?N:null;return(0,n.jsxs)("div",{className:"min-w-0",children:[null!==X&&(0,n.jsx)("p",{"aria-label":"고정 루프",className:"px-4 pt-4 text-base",children:(0,E.FW)(X)}),(0,n.jsxs)("div",{role:"group","aria-label":"루프 에이전트 보기",className:"flex gap-2 px-4 pt-4",children:[(0,n.jsx)("button",{type:"button","aria-pressed":"activity"===S,onClick:()=>A("activity"),className:"min-h-11 rounded-lg border border-slate-500 px-4 py-2 aria-pressed:bg-sky-800",children:"현황"}),(0,n.jsx)("button",{type:"button","aria-pressed":"map"===S,onClick:()=>A("map"),className:"min-h-11 rounded-lg border border-slate-500 px-4 py-2 aria-pressed:bg-sky-800",children:"지도"})]}),"activity"===S?(0,n.jsx)(O,{view:F?(0,d.g)(F.seats,F.runs):I,runsUnreadable:null==(u=null==F?void 0:F.runsUnreadable)||u,refreshedAt:null!=(m=null==F?void 0:F.refreshedAt)?m:null}):(0,n.jsx)("div",{className:"min-w-0 p-4",children:(0,n.jsx)(C,{rows:null!=(p=null==L?void 0:L.rows)?p:[],edges:null!=(h=null==L?void 0:L.edges)?h:[],seatIds:["OP","MK","TC","UX",...z],details:F?function(e,t){let l={COO:"OP",CMO:"MK",CTO:"TC",CXO:"UX"},n=t?"못 읽음":e.runs.length,a={[f.Xg]:{running:n},[f.EV]:{running:n}};for(let t of e.seats)a[l[t.seat]]={now:t.now,waiting:t.decisionsWaiting};return a}((0,d.g)(F.seats,F.runs),F.runsUnreadable):void 0,seenAt:null!=(b=null==L?void 0:L.seenAt)?b:{},now:W,state:null!=(x=null==L?void 0:L.state)?x:"loading"})})]})}},40530:(e,t,l)=>{l.d(t,{u:()=>n});function n(e,t){if(!e.enabled||"off"===e.scheduleState)return"off";if("failed"===e.lastStatus||"error"===e.lastStatus||"failure"===e.lastStatus||"abandoned"===e.lastStatus||"expired"===e.lastStatus)return"failed";if("stale"===e.scheduleState)return"late";let l=null===e.lastRunAt?NaN:Date.parse(e.lastRunAt);if(void 0!==e.secondDueAt){let n=null===e.secondDueAt?NaN:Date.parse(e.secondDueAt);return Number.isFinite(l)&&Number.isFinite(t)&&Number.isFinite(n)&&n>l&&t>n?"late":"alive"}return Number.isFinite(t)&&Number.isFinite(l)&&null!==e.intervalMs&&Number.isFinite(e.intervalMs)&&e.intervalMs>0&&t-l>2*e.intervalMs?"late":"alive"}},50825:(e,t,l)=>{l.d(t,{g:()=>i,q:()=>s});var n=l(67097);let a=[{id:"OP",seat:"COO"},{id:"MK",seat:"CMO"},{id:"TC",seat:"CTO"},{id:"UX",seat:"CXO"}];function r(e){return(0,n.t)(e.replace(/\s+/g," ")).trim()}function s(e){var t;let l=e.split("\n"),n=(e,t)=>{let l=e.trim();return t&&(l=(l=l.replace(/^\*\*\[[^\]]+\]\*\*\s*/,"")).replace(/^(?:📌\S*\s*)?\d{4}-\d{2}-\d{2}\s+\d{1,2}:\d{2}\s*KST\s*/,"")),r(l=(l=(l=(l=(l=(l=l.replace(/^→\s*(?:[A-Z]{1,4}|전원|전체)(?=\s|·|$)(?:\s*·\s*(?:[A-Z]{1,4}|전원|전체)(?=\s|·|$))*\s*(?:·)?\s*/u,"")).replace(/^—\s*/,"")).replace(/^[-*]\s+/,"").replace(/\*\*|`|__/g,"").replace(/^#+\s*/,"").trim()).replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,"")).replace(RegExp("^(?:\\p{Extended_Pictographic}\\uFE0F?)+\\s*","u"),"")).replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,""))},a=n(null!=(t=l[0])?t:"",!0);if(a)return a;let s=l.slice(1).find(e=>e.trim());return s?n(s,!1):""}function i(e,t){var l;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return{seats:a.map(t=>{var l;let{id:n,seat:a}=t,r=null==e?void 0:e.seats.find(e=>e.seat===n);return{seat:a,now:(null==r?void 0:r.now)&&Array.from(s(r.now.text)).slice(0,40).join("")||"못 읽음",landedToday:(null==r?void 0:r.landed)==null?"못 읽음":r.landed.length,blocked:(null==r?void 0:r.blocked)==null?"못 읽음":r.blocked.length,decisionsWaiting:null!=(l=null==r?void 0:r.pendingDecisions)?l:"못 읽음"}}),runs:(null!=(l=null==t?void 0:t.entries)?l:[]).filter(e=>"running"===e.status).sort((e,t)=>{var l,n;return(Date.parse(null!=(l=t.lastActivityTimestamp)?l:"")||0)-(Date.parse(null!=(n=e.lastActivityTimestamp)?n:"")||0)}).slice(0,6).map(e=>{var t;let l=Date.parse(null!=(t=e.lastActivityTimestamp)?t:"");return{id6:function(e){let t=e.replace(/^run-/i,"");return/^[a-z0-9]{6}/i.test(t)&&r(t.slice(0,6))||"못 읽음"}(e.runId),stage:r(e.lastPhase||e.status)||"못 읽음",elapsedSec:Number.isFinite(l)?Math.max(0,Math.floor((n-l)/1e3)):"못 읽음"}})}}},58302:(e,t,l)=>{l.d(t,{FW:()=>r,ZR:()=>a,kU:()=>s});var n=l(70917);let a={refParam:"ref"};function r(e){return"루프 ".concat(e)}function s(e){var t;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.refParam;if(0===l.length)return null;let r=null!=(t=null==e?void 0:e.get(l))?t:null;if(null===r)return null;let s=r.trim();return(0,n.Ew)(s)?s:null}},67097:(e,t,l)=>{l.d(t,{t:()=>u});let n=/\brun-([0-9a-f]{8})-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,a=/(?:\/(?:Users|home|private)\/[\w.%@+~/-]+|\b[A-Za-z]:\\(?:[^\\\s,;<>"']+\\)*[^\\\s,;<>"']+)/g,r=/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi,s=RegExp("(?<![A-Za-z0-9_-])(?:[A-Za-z0-9_]{40,}|(?:sk|ghp|gho|ghs|github_pat|xox[abpr])[-_][A-Za-z0-9_-]{20,})(?![A-Za-z0-9_-])","g"),i=/\b(?:OP|MK|TC|UX)\b/g,o=/\bmsb(\d+)\b/gi,d=/(?:\u{1F451}|🪑|🅞|🅜|🅣|🅤|🅢|🅕)\uFE0F?/gu,c={OP:"COO",MK:"CMO",TC:"CTO",UX:"CXO"};function u(e){let t,l=e;do t=l,l=l.replace(n,(e,t)=>"run-".concat(t.slice(0,6))).replace(a,"").replace(r,"").replace(d,"").replace(s,"").replace(i,e=>c[e]).replace(o,(e,t)=>"remote-".concat(t));while(l!==t&&function(e){return[n,a,r,s,i,d,o].flatMap(t=>[...e.matchAll(t)].map(e=>e[0]))}(l).length>0);return l}},70917:(e,t,l)=>{l.d(t,{$2:()=>d,Cd:()=>S,DG:()=>c,EV:()=>b,Ew:()=>g,Ok:()=>W,Pv:()=>D,QB:()=>I,QU:()=>O,XV:()=>C,Xg:()=>h,Z7:()=>E,_o:()=>o,_s:()=>v,fi:()=>x,hA:()=>j,iy:()=>A,lG:()=>s,oO:()=>i,ol:()=>N,qV:()=>U,qn:()=>p,s_:()=>w,u1:()=>y,yo:()=>_});var n=l(40530),a=l(67097);let r={alive:"살아 있음",late:"늦음",failed:"실패",off:"꺼짐"};function s(e,t,l){let s=new Map(t.flatMap(e=>e.jobs.map(t=>[t,e.owner]))),i=new Map(t.map(e=>[e.id,e.owner])),o=e.map(e=>{var t;return{...e,owner:null!=(t=e.id.startsWith("schedule:")?s.get(e.id.slice(9)):i.get(e.id.slice(5)))?t:"미지정"}});for(let e of t){var d,c,u,m,f,p,h;if(o.some(t=>t.id==="loop:".concat(e.id)))continue;let t=(0,n.u)({enabled:e.enabled,lastRunAt:null!=(m=null==(d=e.lastRun)?void 0:d.at)?m:null,lastStatus:null!=(f=null==(c=e.lastRun)?void 0:c.status.toLowerCase())?f:null,intervalMs:null},l);o.push({id:"loop:".concat(e.id),name:(0,a.t)(e.title),layer:"그래프",owner:null!=(p=e.owner)?p:"미지정",mode:"등록",lastRun:null!=(h=null==(u=e.lastRun)?void 0:u.at)?h:null,verdict:"alive"!==t||e.lastRun?r[t]:"판정 불가"})}return o}let i=36e5,o=1500;function d(e,t,l){if("launch"!==e.kind||"string"==typeof e.run&&""!==e.run)return!1;let n=Date.parse(e.at);return Number.isFinite(n)&&l-n>=6e5&&!t.some(t=>"run"===t.kind&&t.ref===e.ref)}let c={OP:"COO",MK:"CMO",TC:"CTO",UX:"CXO"},u=["OP","MK","TC","UX"],m=new Set(["request","decision","report","card","run","hand","launch","move"]),f=/^[a-zA-Z0-9_-]{1,128}$/,p="loop:resources",h="agent:task-agent",b="hub:runs",x=[{id:"loop:orchestrator",label:"조율"},{id:h,label:"TASK-AGENT"},{id:b,label:"런 묶음"},{id:"loop:release-loop",label:"발행 루프"},{id:"loop:guardian",label:"수호자"}];function g(e){return"string"==typeof e&&f.test(e)}function v(e){var t,l;let n=null!=(t=null==e?void 0:e.get("journey"))?t:null;if(g(n))return n;let a=null!=(l=null==e?void 0:e.get("demo"))?l:null;return g(a)&&"0"!==a&&"1"!==a?a:null}function y(e,t){return k(e,t,!0)}function w(e,t){return k(e,t,!1)}function k(e,t,l){let n=e&&"object"==typeof e&&"edges"in e?e.edges:null;if(!Array.isArray(n))throw Error("간선 조회 실패");return n.filter(e=>{if(!e||"object"!=typeof e||!m.has(e.kind)||"string"!=typeof e.at||"string"!=typeof e.from||"string"!=typeof e.to||"string"!=typeof e.ref)return!1;let n=Date.parse(e.at);return Number.isFinite(n)&&n<=t&&(!l||n>=t-i)})}function j(e,t){var l,n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,s=new Map;for(let e of r)s.set(e,{id:e,type:"seat",label:null!=(l=c[e])?l:(0,a.t)(e)});for(let e of x)s.set(e.id,{id:e.id,type:"hub",label:e.label});s.set(p,{id:p,type:"hub",label:"자원"});let i=new Set(r),o=new Set;for(let t of e){let e=i.has(t.owner)?t.owner:"미지정",l=t.id,n=(0,a.t)(t.name),r=o.has(n)?"".concat(n," \xb7 ").concat((0,a.t)(t.id)):n;o.add(n);let d=s.get(l);s.set(l,(null==d?void 0:d.type)==="hub"?{...d,owner:e,verdict:t.verdict}:{id:l,type:"loop",label:r,owner:e,verdict:t.verdict})}for(let e of t)for(let t of[e.from,e.to]){if(s.has(t))continue;let[e,l]=t.split(":",2);"loop"===e&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:l.startsWith("run-")?"런 \xb7 ".concat((0,a.t)(l)):"칸 \xb7 ".concat((0,a.t)(l))}):"card"===e||"surface"===e?s.set(t,{id:t,type:"other",label:"card"===e?"카드":"입구 \xb7 ".concat((0,a.t)(null!=l?l:""))}):"agent"===e&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:"에이전트 \xb7 ".concat((0,a.t)(l))}):"pr"===e&&l&&/^\d{1,9}$/.test(l)?s.set(t,{id:t,type:"other",label:"PR #".concat(l)}):("release"===e||"landed"===e)&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:"".concat("release"===e?"발행":"착지"," \xb7 ").concat((0,a.t)(l))}):i.has(t)&&s.set(t,{id:t,type:"seat",label:null!=(n=c[t])?n:(0,a.t)(t)})}return[...s.values()]}function N(e,t){if(e===p&&!t)return"/loops?view=resources";if(t&&("hand"===t.kind||"launch"===t.kind||"move"===t.kind)&&f.test(t.ref))return"/trace?q=".concat(encodeURIComponent(t.ref));if(e.startsWith("pr:")&&/^\d{1,9}$/.test(e.slice(3))&&!t)return"/trace?q=".concat(encodeURIComponent(e.slice(3)));let l=(null==t?void 0:t.kind)==="run"?t.ref:e;if((null==t?void 0:t.kind)==="card"&&f.test(t.ref))return"/trace?q=".concat(encodeURIComponent(t.ref));if(l.startsWith("loop:")&&f.test(l.slice(5))){let e=l.slice(5);return e.startsWith("run-")?"/trace?level=L2&run=".concat(encodeURIComponent(e)):"/trace?q=".concat(encodeURIComponent(e))}return l.startsWith("schedule:")&&f.test(l.slice(9))?"/trace?q=".concat(encodeURIComponent(l.slice(9))):l.startsWith("card:")&&f.test(l.slice(5))?"/trace?q=".concat(encodeURIComponent(l.slice(5))):(null==t?void 0:t.kind)==="run"&&f.test(l)?"/trace?level=L2&run=".concat(encodeURIComponent(l)):"/trace"}function S(e,t){let l=e=>e.startsWith("surface:")?0:e.startsWith("card:")?1:e.startsWith("loop:")?2:3;return e.filter(e=>"card"===e.kind&&e.ref===t).sort((e,t)=>e.at.localeCompare(t.at)||l(e.from)-l(t.from))}function A(e){return JSON.stringify([e.at,e.kind,e.from,e.to,e.ref])}function C(e,t,l){return Object.fromEntries(t.map(t=>{var n;let a=A(t);return[a,null!=(n=null==e?void 0:e[a])?n:null===e?l-o:l]}))}let M=[{key:"tick",label:"틱 \xb7 넘김"},{key:"agent",label:"TASK-AGENT \xb7 발사"},{key:"run",label:"런"},{key:"pr",label:"PR"},{key:"land",label:"착지 \xb7 green 제안"}];function T(e,t){let l=new Set([t]);for(let n of e)"hand"===n.kind&&void 0!==n.cell&&(n.cell===t||n.cell.startsWith("".concat(t,"-")))&&l.add(n.ref);return l}function R(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set([t]),n=e.ref===t||l.has(e.ref);return"hand"===e.kind?n&&"shadow"!==e.mode?"tick":null:"launch"===e.kind?n?"agent":null:"move"===e.kind?n&&"green-proposal"===e.move?"land":null:"run"===e.kind?e.to.startsWith("pr:")?"pr":e.to.startsWith("loop:")?"run":null:"card"===e.kind&&e.to.startsWith("landed:")?"land":null}function E(e,t){let l=T(e,t),n=e=>M.findIndex(n=>n.key===R(e,t,l));return[...S(e,t),...e.filter(e=>"card"!==e.kind||e.ref!==t).filter(e=>null!==R(e,t,l))].sort((e,t)=>e.at.localeCompare(t.at)||n(e)-n(t))}function I(e,t){let l=E(e,t),n=T(e,t),a=0===l.length,r=M.reduce((e,a,r)=>l.some(e=>R(e,t,n)===a.key&&!e.broken)?r:e,-1);return M.map((e,s)=>{let i=l.filter(l=>R(l,t,n)===e.key),o=i.find(e=>!e.broken);return o?{key:e.key,label:e.label,state:"done",edge:o}:0===i.length&&s<r?{key:e.key,label:e.label,state:"done"}:i.length>0?(a=!0,{key:e.key,label:e.label,state:"failed",edge:i[0]}):a?{key:e.key,label:e.label,state:"pending"}:(a=!0,{key:e.key,label:e.label,state:"current"})})}function O(e){return e<.8?"far":"near"}let D={request:"요청",decision:"결정",report:"보고",card:"카드",run:"런",hand:"넘김",launch:"발사",move:"판단"};function U(e,t,l,n,r){var s,i;let o=t.filter(t=>t.from===e||t.to===e).sort((e,t)=>t.at.localeCompare(e.at)).slice(0,5).map(l=>"".concat(void 0!==r&&d(l,t,r)?"발사 \xb7 유령":D[l.kind]," ").concat(l.from===e?"→":"←"," ").concat((0,a.t)(n(l.from===e?l.to:l.from))));return{now:(null==l?void 0:l.now)?(0,a.t)(l.now):null,recent:o,running:null!=(s=null==l?void 0:l.running)?s:null,waiting:null!=(i=null==l?void 0:l.waiting)?i:null}}let W={request:"●",decision:"◆",report:"■",hand:"▲",launch:"★",move:"⬟",card:"◇",run:"▶"};function _(e,t){let l="request"===e.kind?["report","decision"]:"report"===e.kind||"decision"===e.kind?["request"]:[];return l.length>0&&t.some(t=>l.includes(t.kind)&&t.ref===e.ref&&t.from===e.to&&t.to===e.from)}}}]);
@@ -0,0 +1,286 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5269],{5269:(t,e,s)=>{s.d(e,{diagram:()=>tc});var i=s(97472),r=s(74491),a=s(76497);s(34116);var n=s(62271);s(14498),s(50499),s(89693),s(59259),s(5696),s(67729),s(36693);var o=s(28130),l=s(51636),c=s(47356),h=s(54730),d=s(9820),u=s(78153),p=s(32645),y=function(){var t=(0,d.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],r=[2,4],a=[1,9],n=[1,11],o=[1,16],l=[1,17],c=[1,18],h=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],E=[1,31],x=[1,32],D=[1,35],$=[1,36],C=[1,37],v=[1,38],w=[1,34],I=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],A=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,d.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,d.K)(function(t,e,s,i,r,a,n){var o=a.length-1;switch(r){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:case 12:this.$=a[o];break;case 8:this.$="nl";break;case 13:let l=a[o-1];l.description=i.trimColon(a[o]),this.$=l;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:let c=i.trimColon(a[o]);this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var h=a[o],d=a[o-2].trim();if(a[o].match(":")){var u=a[o].split(":");h=u[0],d=[d,u[1]]}this.$={stmt:"state",id:h,type:"default",description:d};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:l,19:c,22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12],{14:[1,40],15:[1,41]}),t(I,[2,16]),{18:[1,42]},t(I,[2,18],{20:[1,43]}),{23:[1,44]},t(I,[2,22]),t(I,[2,23]),t(I,[2,24]),t(I,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(I,[2,28]),{34:[1,49]},{36:[1,50]},t(I,[2,31]),{13:51,24:u,57:w},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(L,[2,44],{58:[1,56]}),t(L,[2,45],{58:[1,57]}),t(I,[2,38]),t(I,[2,39]),t(I,[2,40]),t(I,[2,41]),t(I,[2,6]),t(I,[2,13]),{13:58,24:u,57:w},t(I,[2,17]),t(A,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(I,[2,29]),t(I,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(I,[2,14],{14:[1,71]}),{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,72],22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(I,[2,34]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(L,[2,46]),t(L,[2,47]),t(I,[2,15]),t(I,[2,19]),t(A,r,{7:78}),t(I,[2,26]),t(I,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:n,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:l,19:c,21:[1,81],22:h,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:x,51:D,52:$,53:C,54:v,57:w},t(I,[2,32]),t(I,[2,33]),t(I,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,d.K)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,d.K)(function(t){var e=this,s=[0],i=[],r=[null],a=[],n=this.table,o="",l=0,c=0,h=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y[g]=this.yy[g]);p.setInput(t,y),y.lexer=p,y.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K)(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,d.K)(S,"lex");for(var k,b,T,_,E,x,D,$,C,v={};;){if(T=s[s.length-1],this.defaultActions[T]?_=this.defaultActions[T]:(null==k&&(k=S()),_=n[T]&&n[T][k]),void 0===_||!_.length||!_[0]){var w="";for(x in C=[],n[T])this.terminals_[x]&&x>2&&C.push("'"+this.terminals_[x]+"'");w=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(w,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:f,expected:C})}if(_[0]instanceof Array&&_.length>1)throw Error("Parse Error: multiple actions possible at state: "+T+", token: "+k);switch(_[0]){case 1:s.push(k),r.push(p.yytext),a.push(p.yylloc),s.push(_[1]),k=null,b?(k=b,b=null):(c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc,h>0&&h--);break;case 2:if(D=this.productions_[_[1]][1],v.$=r[r.length-D],v._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},m&&(v._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[o,c,l,y,_[1],r,a].concat(u))))return E;D&&(s=s.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),s.push(this.productions_[_[1]][0]),r.push(v.$),a.push(v._$),$=n[s[s.length-2]][s[s.length-1]],s.push($);break;case 3:return!0}}return!0},"parse")};function N(){this.yy={}}return R.lexer={EOF:1,parseError:(0,d.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,d.K)(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,d.K)(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,d.K)(function(t){var e=t.length,s=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 i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K)(function(){return this._more=!0,this},"more"),reject:(0,d.K)(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,d.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K)(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,d.K)(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,d.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,d.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),a=0;a<r.length;a++)if((s=this._input.match(this.rules[r[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K)(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,d.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,d.K)(function(t,e,s,i){function r(){let s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){let i=e.yytext.slice(0,s),r=e.yytext.slice(s);r&&t.lexer.unput(r),e.yytext=i}return!0}switch((0,d.K)(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}},(0,d.K)(N,"Parser"),N.prototype=R,R.Parser=N,new N}();y.parser=y;var g="TB",f="state",m="root",S="relation",k="default",b="divider",T="fill:none",_="fill: #333",E="markdown",x="normal",D="rect",$="rectWithTitle",C="divider",v="roundedWithTitle",w="statediagram",I=`${w}-state`,L="transition",A=`${L} note-edge`,R=`${w}-note`,N=`${w}-cluster`,O=`${w}-cluster-alt`,K="parent",B="note",Y="----",F=`${Y}${B}`,P=`${Y}${K}`,G=new Map,W=0,j=0,M=new Map,z=(0,d.K)((t,e,s,i)=>{if(t===C&&s?.id!==void 0&&M.has(s.id)){let t=M.get(s.id);return M.set(e,t),t}let r=j++,a=i?void 0:r;return M.set(e,a),a},"colorSlotFor");function U(t="",e=0,s="",i=Y){let r=null!==s&&s.length>0?`${i}${s}`:"";return`state-${t}${r}-${e}`}(0,d.K)(U,"stateDomId");var H=(0,d.K)((t,e,s,i,r,a,n,o)=>{h.R.trace("items",e),e.forEach(e=>{switch(e.stmt){case f:case k:Q(t,e,s,i,r,a,n,o);break;case S:{Q(t,e.state1,s,i,r,a,n,o),Q(t,e.state2,s,i,r,a,n,o);let l="neo"===n,h={id:"edge"+W,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:l?"arrow_barb_neo":"arrow_barb",style:T,labelStyle:"",label:c.Y2.sanitizeText(e.description??"",(0,c.D7)()),arrowheadStyle:_,labelpos:"c",labelType:E,thickness:x,classes:L,look:n};r.push(h),W++}}})},"setupDoc"),X=(0,d.K)((t,e=g)=>{let s=e;if(t.doc)for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir");function V(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{let i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));let i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function J(t){return t?.classes?.join(" ")??""}function q(t){return t?.styles??[]}(0,d.K)(V,"insertOrUpdateNode"),(0,d.K)(J,"getClassesFromDbInfo"),(0,d.K)(q,"getStylesFromDbInfo");var Q=(0,d.K)((t,e,s,i,r,a,n,o)=>{let l=e.id,d=s.get(l),u=J(d),p=q(d),y=(0,c.D7)(),g=""!==u.trim()||p.length>0;if(h.R.info("dataFetcher parsedItem",e,d,p),"root"!==l){let s=D;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==k&&(s=e.type),G.get(l)||G.set(l,{id:l,shape:s,description:c.Y2.sanitizeText(l,y),cssClasses:`${u} ${I}`,cssStyles:p});let d=G.get(l);e.description&&(Array.isArray(d.description)?(d.shape=$,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=$,d.description===l?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=D,d.description=e.description),d.description=c.Y2.sanitizeTextOrArray(d.description,y)),d.description?.length===1&&d.shape===$&&("group"===d.type?d.shape=v:d.shape=D),!d.type&&e.doc&&(h.R.info("Setting cluster for XCX",l,X(e)),d.type="group",d.isGroup=!0,d.dir=X(e),d.shape=e.type===b?C:v,d.colorIndex=z(d.shape,l,t,g),d.cssClasses=`${d.cssClasses} ${N} ${a?O:""}`);let f={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:l,dir:d.dir,domId:U(l,W),type:d.type,isGroup:"group"===d.type,colorIndex:d.colorIndex,padding:8,rx:10,ry:10,look:n,labelType:"markdown"};if(f.shape===C&&(f.label=""),t&&"root"!==t.id&&(h.R.trace("Setting node ",l," to be child of its parent ",t.id),f.parentId=t.id),f.centerLabel=!0,e.note){let t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:R,cssStyles:[],cssCompiledStyles:[],id:l+F+"-"+W,domId:U(l,W,B),type:"node",isGroup:!1,padding:y.flowchart?.padding,look:n,position:e.note.position},s=l+P,a={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:l+P,domId:U(l,W,K),type:"group",isGroup:!0,padding:16,look:n,position:e.note.position};W++,a.id=s,t.parentId=s,V(i,a,o),V(i,t,o),V(i,f,o);let c=l,h=t.id;"left of"===e.note.position&&(c=t.id,h=l),r.push({id:c+"-"+h,start:c,end:h,arrowhead:"none",arrowTypeEnd:"",style:T,labelStyle:"",classes:A,pattern:"dashed",arrowheadStyle:_,labelpos:"c",labelType:E,thickness:x,look:n})}else V(i,f,o)}e.doc&&(h.R.trace("Adding nodes children "),H(e,e.doc,s,i,r,!a,n,o))},"dataFetcher"),Z=(0,d.K)(()=>{G.clear(),W=0,j=0,M.clear()},"reset"),tt=(0,d.K)((t,e=g)=>{if(!t.doc)return e;let s=e;for(let e of t.doc)"dir"===e.stmt&&(s=e.value);return s},"getDir"),te=(0,d.K)(function(t,e){return e.db.getClasses()},"getClasses"),ts=(0,d.K)(async function(t,e,s,n){h.R.info("REF0:"),h.R.info("Drawing state diagram (v2)",e);let{securityLevel:o,state:d,layout:u}=(0,c.D7)();n.db.extract(n.db.getRootDocV2());let p=n.db.getData(),y=(0,i.A)(e,o);p.type=n.type,p.layoutAlgorithm=(0,a.q7)(u),p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,"neo"===(0,c.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await (0,a.XX)(p,y);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((t,e)=>{let s,i="string"==typeof e?e:"string"==typeof e?.id?e.id:"",r=p.nodes.find(t=>t.id===i);if(!i)return void h.R.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));let a=y.node()?.querySelectorAll("g.node, g.rough-node");if(a?.forEach(t=>{let e=t.textContent?.trim();(t.id===r?.domId||e===i)&&(s=t)}),!s)return void h.R.warn("⚠️ Could not find node matching text:",i);let n=s.parentNode;if(!n)return void h.R.warn("⚠️ Node has no parent, cannot wrap:",i);let o=document.createElementNS("http://www.w3.org/2000/svg","a"),l=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),o.setAttribute("target","_blank"),t.tooltip){let e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e),s.setAttribute("title",e)}n.replaceChild(o,s),o.appendChild(s),h.R.info("\uD83D\uDD17 Wrapped node in <a> tag for:",i,t.url)})}catch(t){h.R.error("❌ Error injecting clickable links:",t)}l._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,n.db.getDiagramTitle()),(0,r.P)(y,8,w,d?.useMaxWidth??!0)},"draw"),ti={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},tr=(0,d.K)(()=>new Map,"newClassesList"),ta=(0,d.K)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),tn=(0,d.K)(t=>JSON.parse(JSON.stringify(t)),"clone"),to=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=tr(),this.documents={root:ta()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=c.iN,this.setAccTitle=c.SV,this.getAccDescription=c.m7,this.setAccDescription=c.EI,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{(0,d.K)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){for(let e of(this.clear(!0),Array.isArray(t)?t:t.doc))switch(e.stmt){case f:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case S:this.addRelation(e.state1,e.state2,e.description);break;case"classDef":this.addStyleClass(e.id.trim(),e.classes);break;case"style":this.handleStyleDef(e);break;case"applyClass":this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}let e=this.getStates(),s=(0,c.D7)();for(let t of(Z(),Q(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes),this.nodes))if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${t.id}]`);t.label=t.label[0]}}handleStyleDef(t){let e=t.id.trim().split(","),s=t.styleClass.split(",");for(let t of e){let e=this.getState(t);if(!e){let s=t.trim();this.addState(s),e=this.getState(s)}e&&(e.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){h.R.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===S){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===f&&(e.id===ti.START_NODE?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==m&&e.stmt!==f||!e.doc)return;let i=[],r=[];for(let t of e.doc)if(t.type===b){let e=tn(t);e.doc=tn(r),i.push(e),r=[]}else r.push(t);if(i.length>0&&r.length>0){let t={stmt:f,id:(0,l.$C)(),type:"divider",doc:tn(r)};i.push(tn(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:m,stmt:m},{id:m,stmt:m,doc:this.rootDoc},!0),{id:m,doc:this.rootDoc}}addState(t,e=k,s,i,r,a,n,o){let l=t?.trim();if(this.currentDocument.states.has(l)){let t=this.currentDocument.states.get(l);if(!t)throw Error(`State not found: ${l}`);t.doc||(t.doc=s),t.type||(t.type=e)}else h.R.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:f,id:l,descriptions:[],type:e,doc:s,note:r,classes:[],styles:[],textStyles:[]});if(i&&(h.R.info("Setting state description",l,i),(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(l,t.trim()))),r){let t=this.currentDocument.states.get(l);if(!t)throw Error(`State not found: ${l}`);t.note=r,t.note.text=c.Y2.sanitizeText(t.note.text,(0,c.D7)())}a&&(h.R.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(l,t.trim()))),n&&(h.R.info("Setting state styles",l,n),(Array.isArray(n)?n:[n]).forEach(t=>this.setStyle(l,t.trim()))),o&&(h.R.info("Setting state styles",l,n),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:ta()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=tr(),t||(this.links=new Map,(0,c.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){h.R.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),h.R.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===ti.START_NODE?(this.startEndCount++,`${ti.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=k){return t===ti.START_NODE?ti.START_TYPE:e}endIdIfNeeded(t=""){return t===ti.END_NODE?(this.startEndCount++,`${ti.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=k){return t===ti.END_NODE?ti.END_TYPE:e}addRelationObjs(t,e,s=""){let i=this.startIdIfNeeded(t.id.trim()),r=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,r,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:c.Y2.sanitizeText(s,(0,c.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){let i=this.startIdIfNeeded(t.trim()),r=this.startTypeIfNeeded(t),a=this.endIdIfNeeded(e.trim()),n=this.endTypeIfNeeded(e);this.addState(i,r),this.addState(a,n),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:s?c.Y2.sanitizeText(s,(0,c.D7)()):void 0})}}addDescription(t,e){let s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(c.Y2.sanitizeText(i,(0,c.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let s=this.classes.get(t);e&&s&&e.split(ti.STYLECLASS_SEP).forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(ti.COLOR_KEYWORD).exec(t)){let t=e.replace(ti.FILL_KEYWORD,ti.BG_FILL).replace(ti.COLOR_KEYWORD,ti.FILL_KEYWORD);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){let e=(0,n.Ck)();(0,u.Ltv)(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{let s=(0,u.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;let r=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.bottom+"px"),e.html(p.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,u.Ltv)(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){let e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=(0,c.D7)();for(let e of this.nodes)e.wrappingWidth??=t.state?.wrappingWidth,e.isGroup||(e.minWidth??=t.state?.minNodeWidth);return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:tt(this.getRootDocV2())}}getConfig(){return(0,c.D7)().state}},tl=(0,d.K)(t=>{let{theme:e,bkgColorArray:s,borderColorArray:i}=t;if(!(0,o.P1)(e,i))return"";let r=(0,o.rq)(t.look),a=(0,o.Ic)(s),n="";for(let t=0;t<(0,o.Hu)(i);t++){let e=i[t],o=a?`fill: ${s[t%s.length]};`:"",l=`[data-look="${r}"][data-color-id="color-${t}"]`;n+=`
2
+
3
+ /* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
4
+ the body, so what stays visible of \`outer\` is the band behind the label. */
5
+ ${l}.statediagram-cluster rect.outer {
6
+ stroke: ${e};
7
+ ${o}
8
+ }
9
+
10
+ ${l}.statediagram-cluster rect.inner {
11
+ stroke: ${e};
12
+ }
13
+
14
+ /* Concurrency regions. Siblings of one composite share a slot, so a divided composite
15
+ reads as one thing split into parts rather than as several composites. */
16
+ ${l}.statediagram-cluster rect.divider {
17
+ stroke: ${e};
18
+ ${o}
19
+ }
20
+
21
+ /* handDrawn draws the same container as roughjs shapes rather than plain rects, so it
22
+ needs its own rules. \`roundedWithTitle\` and \`divider\` name those groups \`outer\`,
23
+ \`inner\` and \`divider\` to match the classic branch, which is what lets these
24
+ discriminate -- a bare \`.statediagram-cluster path\` rule reached the body as well and
25
+ tinted the whole composite, losing \`compositeBackground\` and diverging from what
26
+ classic and neo do.
27
+
28
+ roughjs emits two paths per shape and marks them: the filled shape carries
29
+ \`stroke="none"\` and the sketched outline carries \`fill="none"\`. Splitting on that is
30
+ what keeps \`fill\` off the outline -- a rough outline is open squiggles, not a closed
31
+ region, so filling it produces smears -- and keeps \`stroke\` off the fill shape, which
32
+ would otherwise gain an edge it was drawn without. */
33
+ ${l}.statediagram-cluster .outer path[stroke='none'] {
34
+ ${o}
35
+ }
36
+
37
+ ${l}.statediagram-cluster .outer path[fill='none'] {
38
+ stroke: ${e};
39
+ }
40
+
41
+ /* No \`.inner\` rule on purpose. The body shape is left entirely alone under handDrawn,
42
+ where a rect's \`inner\` counterpart cannot be recoloured safely: roughjs draws a
43
+ hachure fill as *stroked* lines, so its fill paths carry \`fill="none"\` exactly like
44
+ the outline and no selector separates them. An \`.inner\` stroke rule therefore
45
+ repainted the hatching of every alt composite in the palette colour instead of
46
+ leaving it on \`altBackground\`. The container still reads as palette-coloured: the
47
+ \`outer\` shape spans the whole composite, so its outline already frames the body. */
48
+
49
+ /* Regions split the same way, which is why \`divider\` fills solid rather than taking
50
+ roughjs's default hachure -- see the note on that call. Hatched, both of its paths
51
+ carried \`fill="none"\` and these two rules degenerated: the tint matched nothing and
52
+ the border rule repainted the hatching. */
53
+ ${l}.statediagram-cluster .divider path[stroke='none'] {
54
+ ${o}
55
+ }
56
+
57
+ ${l}.statediagram-cluster .divider path[fill='none'] {
58
+ stroke: ${e};
59
+ }
60
+ `}return n},"genColor"),tc={parser:y,get db(){return new to(2)},renderer:{getClasses:te,draw:ts,getDir:tt},styles:(0,d.K)(t=>`
61
+ ${tl(t)}
62
+ defs [id$="-barbEnd"] {
63
+ fill: ${t.transitionColor};
64
+ stroke: ${t.transitionColor};
65
+ }
66
+ g.stateGroup text {
67
+ fill: ${t.nodeBorder};
68
+ stroke: none;
69
+ font-size: 10px;
70
+ }
71
+ g.stateGroup text {
72
+ fill: ${t.textColor};
73
+ stroke: none;
74
+ font-size: 10px;
75
+
76
+ }
77
+ g.stateGroup .state-title {
78
+ font-weight: bolder;
79
+ fill: ${t.stateLabelColor};
80
+ }
81
+
82
+ g.stateGroup rect {
83
+ fill: ${t.mainBkg};
84
+ stroke: ${t.nodeBorder};
85
+ }
86
+
87
+ g.stateGroup line {
88
+ stroke: ${t.lineColor};
89
+ stroke-width: ${t.strokeWidth||1};
90
+ }
91
+
92
+ .transition {
93
+ stroke: ${t.transitionColor};
94
+ stroke-width: ${t.strokeWidth||1};
95
+ fill: none;
96
+ }
97
+
98
+ .stateGroup .composit {
99
+ fill: ${t.background};
100
+ border-bottom: 1px
101
+ }
102
+
103
+ .stateGroup .alt-composit {
104
+ fill: #e0e0e0;
105
+ border-bottom: 1px
106
+ }
107
+
108
+ .state-note {
109
+ stroke: ${t.noteBorderColor};
110
+ fill: ${t.noteBkgColor};
111
+
112
+ text {
113
+ fill: ${t.noteTextColor};
114
+ stroke: none;
115
+ font-size: 10px;
116
+ }
117
+ }
118
+
119
+ .stateLabel .box {
120
+ stroke: none;
121
+ stroke-width: 0;
122
+ fill: ${t.mainBkg};
123
+ opacity: 0.5;
124
+ }
125
+
126
+ .edgeLabel .label rect {
127
+ fill: ${t.labelBackgroundColor};
128
+ opacity: 0.5;
129
+ }
130
+ .edgeLabel {
131
+ background-color: ${t.edgeLabelBackground};
132
+ p {
133
+ background-color: ${t.edgeLabelBackground};
134
+ }
135
+ rect {
136
+ opacity: 0.5;
137
+ background-color: ${t.edgeLabelBackground};
138
+ fill: ${t.edgeLabelBackground};
139
+ }
140
+ text-align: center;
141
+ }
142
+ .edgeLabel .label text {
143
+ fill: ${t.transitionLabelColor||t.tertiaryTextColor};
144
+ }
145
+ .label div .edgeLabel {
146
+ color: ${t.transitionLabelColor||t.tertiaryTextColor};
147
+ }
148
+
149
+ .stateLabel text {
150
+ fill: ${t.stateLabelColor};
151
+ font-size: 10px;
152
+ font-weight: bold;
153
+ }
154
+
155
+ .node circle.state-start {
156
+ fill: ${t.specialStateColor};
157
+ stroke: ${t.specialStateColor};
158
+ }
159
+
160
+ .node .fork-join {
161
+ fill: ${t.specialStateColor};
162
+ stroke: ${t.specialStateColor};
163
+ }
164
+
165
+ .node circle.state-end {
166
+ fill: ${t.innerEndBackground};
167
+ stroke: ${t.background};
168
+ stroke-width: 1.5
169
+ }
170
+ .end-state-inner {
171
+ fill: ${t.compositeBackground||t.background};
172
+ // stroke: ${t.background};
173
+ stroke-width: 1.5
174
+ }
175
+
176
+ .node rect {
177
+ fill: ${t.stateBkg||t.mainBkg};
178
+ stroke: ${t.stateBorder||t.nodeBorder};
179
+ stroke-width: ${t.strokeWidth||1}px;
180
+ }
181
+ .node polygon {
182
+ fill: ${t.mainBkg};
183
+ stroke: ${t.stateBorder||t.nodeBorder};;
184
+ stroke-width: ${t.strokeWidth||1}px;
185
+ }
186
+ [id$="-barbEnd"] {
187
+ fill: ${t.lineColor};
188
+ }
189
+
190
+ .statediagram-cluster rect {
191
+ fill: ${t.compositeTitleBackground};
192
+ stroke: ${t.stateBorder||t.nodeBorder};
193
+ stroke-width: ${t.strokeWidth||1}px;
194
+ }
195
+
196
+ .cluster-label, .nodeLabel {
197
+ color: ${t.stateLabelColor};
198
+ // line-height: 1;
199
+ }
200
+
201
+ .statediagram-cluster rect.outer {
202
+ rx: 5px;
203
+ ry: 5px;
204
+ }
205
+ .statediagram-state .divider {
206
+ stroke: ${t.stateBorder||t.nodeBorder};
207
+ }
208
+
209
+ .statediagram-state .title-state {
210
+ rx: 5px;
211
+ ry: 5px;
212
+ }
213
+ .statediagram-cluster.statediagram-cluster .inner {
214
+ fill: ${t.compositeBackground||t.background};
215
+ }
216
+ .statediagram-cluster.statediagram-cluster-alt .inner {
217
+ fill: ${t.altBackground?t.altBackground:"#efefef"};
218
+ }
219
+
220
+ .statediagram-cluster .inner {
221
+ rx:0;
222
+ ry:0;
223
+ }
224
+
225
+ .statediagram-state rect.basic {
226
+ rx: 5px;
227
+ ry: 5px;
228
+ }
229
+ .statediagram-state rect.divider {
230
+ stroke-dasharray: 10,10;
231
+ fill: ${t.altBackground?t.altBackground:"#efefef"};
232
+ }
233
+
234
+ .note-edge {
235
+ stroke-dasharray: 5;
236
+ }
237
+
238
+ .statediagram-note rect {
239
+ fill: ${t.noteBkgColor};
240
+ stroke: ${t.noteBorderColor};
241
+ stroke-width: 1px;
242
+ rx: 0;
243
+ ry: 0;
244
+ }
245
+ .statediagram-note rect {
246
+ fill: ${t.noteBkgColor};
247
+ stroke: ${t.noteBorderColor};
248
+ stroke-width: 1px;
249
+ rx: 0;
250
+ ry: 0;
251
+ }
252
+
253
+ .statediagram-note text {
254
+ fill: ${t.noteTextColor};
255
+ }
256
+
257
+ .statediagram-note .nodeLabel {
258
+ color: ${t.noteTextColor};
259
+ }
260
+ .statediagram .edgeLabel {
261
+ color: red; // ${t.noteTextColor};
262
+ }
263
+
264
+ [id$="-dependencyStart"], [id$="-dependencyEnd"] {
265
+ fill: ${t.lineColor};
266
+ stroke: ${t.lineColor};
267
+ stroke-width: ${t.strokeWidth||1};
268
+ }
269
+
270
+ .statediagramTitleText {
271
+ text-anchor: middle;
272
+ font-size: 18px;
273
+ fill: ${t.textColor};
274
+ }
275
+
276
+ [data-look="neo"].statediagram-cluster rect {
277
+ fill: ${t.mainBkg};
278
+ stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};
279
+ stroke-width: ${t.strokeWidth??1};
280
+ }
281
+ [data-look="neo"].statediagram-cluster rect.outer {
282
+ rx: ${t.radius}px;
283
+ ry: ${t.radius}px;
284
+ filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
285
+ }
286
+ `,"getStyles"),init:(0,d.K)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}},62271:(t,e,s)=>{s.d(e,{CP:()=>d,Ck:()=>y,HT:()=>p,PB:()=>u,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o});var i=s(47356),r=s(9820),a=s(54518),n=s(78153),o=(0,r.K)((t,e)=>{let s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,r.K)((t,e)=>{o(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=(0,r.K)((t,e)=>{let s=e.text.replace(i.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);let a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),r},"drawText"),h=(0,r.K)((t,e,s,i)=>{let r=t.append("image");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",n)},"drawImage"),d=(0,r.K)((t,e,s,i)=>{let r=t.append("use");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),u=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,r.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},74491:(t,e,s)=>{s.d(e,{P:()=>n});var i=s(47356),r=s(54730),a=s(9820),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:c,x:h,y:d}=o(t,e);(0,i.a$)(t,c,n,a);let u=l(h,d,n,c,e);t.attr("viewBox",u),r.R.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox")},97472:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(9820),r=s(78153),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5300],{25300:(e,r,t)=>{t.d(r,{diagram:()=>y});var a=t(49448),n=t(39173);t(23208),t(47356);var l=t(54730),s=t(9820),p=t(15568),i=(0,p.sB)().RailroadAbnf.parser.LangiumParser,u=(0,s.K)(e=>{let r=e.alternatives.map(m);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),m=(0,s.K)(e=>{let r=e.elements.map(d);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),o=(0,s.K)(e=>{if(e.includes("*")){let[r,t]=e.split("*");return{min:r?parseInt(r,10):0,max:t?parseInt(t,10):1/0}}let r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),d=(0,s.K)(e=>{let r=b(e.primary);if(!e.repeat)return r;let{min:t,max:a}=o(e.repeat);return 0===t&&1===a?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:a}},"transformElement"),b=(0,s.K)(e=>{switch(e.$type){case"AbnfStringLiteral":case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return u(e.element);case"AbnfOptionalGroup":return{type:"optional",element:u(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),f=(0,s.K)(e=>({name:e.name,definition:u(e.definition)}),"transformRule"),c=(0,s.K)(e=>{(0,n.S)(e,a.db),e.title&&a.db.setTitle(e.title),e.rules.map(e=>a.db.addRule(f(e)))},"populateDb"),y={parser:{parse:(0,s.K)(e=>{a.db.clear(),l.R.debug("[ABNF Parser] Starting Langium parse");let r=i.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p.zg(r);let t=r.value;l.R.debug("[ABNF Parser] Parsed rules:",t.rules.length),c(t),l.R.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a.db}},db:a.db,renderer:a.U,styles:a.$}}}]);