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 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9703],{19703:(t,e,i)=>{"use strict";i.r(e),i.d(e,{render:()=>f});var r=i(1642),n=i(73084),o=i(23418),s=i(60043),a=i(39433);function h(t,e){t.forEach(t=>{let i={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(i[e]=t[e])}),e.add({group:"nodes",data:i,position:{x:t.x??0,y:t.y??0}})})}function l(t,e){t.forEach(t=>{let i={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(i[e]=t[e])}),e.add({group:"edges",data:i})})}function g(t){return new Promise(e=>{let i=(0,a.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),n=(0,o.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});i.remove(),h(t.nodes,n),l(t.edges,n),n.nodes().forEach(function(t){t.layoutDimensions=()=>{let e=t.data();return{w:e.width,h:e.height}}}),n.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),n.ready(t=>{r.R.info("Cytoscape ready",t),e(n)})})}function u(t){return t.nodes().map(t=>{let e=t.data(),i=t.position(),r={id:e.id,x:i.x,y:i.y};return Object.keys(e).forEach(t=>{"id"!==t&&(r[t]=e[t])}),r})}function c(t){return t.edges().map(t=>{let e=t.data(),i=t._private.rscratch,r={id:e.id,source:e.source,target:e.target,startX:i.startX,startY:i.startY,midX:i.midX,midY:i.midY,endX:i.endX,endY:i.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(r[t]=e[t])}),r})}async function d(t,e){r.R.debug("Starting cose-bilkent layout algorithm");try{p(t);let e=await g(t),i=u(e),n=c(e);return r.R.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(t){throw r.R.error("Error in cose-bilkent layout algorithm:",t),t}}function p(t){if(!t)throw Error("Layout data is required");if(!t.config)throw Error("Configuration is required in layout data");if(!t.rootNode)throw Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw Error("Edges array is required in layout data");return!0}o.A.use(s),(0,n.K)(h,"addNodes"),(0,n.K)(l,"addEdges"),(0,n.K)(g,"createCytoscapeInstance"),(0,n.K)(u,"extractPositionedNodes"),(0,n.K)(c,"extractPositionedEdges"),(0,n.K)(d,"executeCoseBilkentLayout"),(0,n.K)(p,"validateLayoutData");var f=(0,n.K)(async(t,e,{insertCluster:i,insertEdge:r,insertEdgeLabel:n,insertMarkers:o,insertNode:s,log:a,positionEdgeLabel:h},{algorithm:l})=>{let g={},u={},c=e.select("g");o(c,t.markers,t.type,t.diagramId);let p=c.insert("g").attr("class","subgraphs"),f=c.insert("g").attr("class","edgePaths"),y=c.insert("g").attr("class","edgeLabels"),E=c.insert("g").attr("class","nodes");a.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){let t={...e};u[e.id]=t,g[e.id]=t,await i(p,e)}else{let i={...e};g[e.id]=i;let r=await s(E,e,{config:t.config,dir:t.direction||"TB"}),n=r.node().getBBox();i.width=n.width,i.height=n.height,i.domId=r,a.debug(`Node ${e.id} dimensions: ${n.width}x${n.height}`)}})),a.debug("Running cose-bilkent layout algorithm");let v={...t,nodes:t.nodes.map(t=>{let e=g[t.id];return{...t,width:e.width,height:e.height}})},A=await d(v,t.config);a.debug("Positioning nodes based on layout results"),A.nodes.forEach(t=>{let e=g[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,a.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),A.edges.forEach(e=>{let i=t.edges.find(t=>t.id===e.id);i&&(i.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),a.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{await n(y,e);let i=g[e.start??""],o=g[e.end??""];if(i&&o){let n=A.edges.find(t=>t.id===e.id);if(n){a.debug("APA01 positionedEdge",n);let s={...e},l=r(f,s,u,t.type,i,o,t.diagramId);h(s,l)}else{let n={...e,points:[{x:i.x||0,y:i.y||0},{x:o.x||0,y:o.y||0}]},s=r(f,n,u,t.type,i,o,t.diagramId);h(n,s)}}})),a.debug("Cose-bilkent rendering completed")},"render")},60043:function(t,e,i){t.exports=function(t){var e=[function(e,i){e.exports=t},function(t,e,i){"use strict";var r=i(0).layoutBase.LayoutConstants,n=i(0).layoutBase.FDLayoutConstants,o=i(0).CoSEConstants,s=i(0).CoSELayout,a=i(0).CoSENode,h=i(0).layoutBase.PointD,l=i(0).layoutBase.DimensionD,g={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function u(t){this.options=function(t,e){var i={};for(var r in t)i[r]=t[r];for(var r in e)i[r]=e[r];return i}(g,t),c(this.options)}var c=function(t){null!=t.nodeRepulsion&&(o.DEFAULT_REPULSION_STRENGTH=n.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(o.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(o.DEFAULT_SPRING_STRENGTH=n.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(o.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(o.MAX_ITERATIONS=n.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?r.QUALITY=0:"proof"==t.quality?r.QUALITY=2:r.QUALITY=1,o.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!t.randomize,o.ANIMATE=n.ANIMATE=r.ANIMATE=t.animate,o.TILE=t.tile,o.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};u.prototype.run=function(){var t,e,i=this.options;this.idToLNode={};var r=this.layout=new s,n=this;n.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var o=r.newGraphManager();this.gm=o;var a=this.options.eles.nodes(),h=this.options.eles.edges();this.root=o.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(a),r);for(var l=0;l<h.length;l++){var g=h[l],u=this.idToLNode[g.data("source")],c=this.idToLNode[g.data("target")];u!==c&&0==u.getEdgesBetween(c).length&&(o.add(r.newEdge(),u,c).id=g.id())}var d=function(t,e){"number"==typeof t&&(t=e);var i=t.data("id"),r=n.idToLNode[i];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},p=function o(){for(var s,a=function(){i.fit&&i.cy.fit(i.eles,i.padding),t||(t=!0,n.cy.one("layoutready",i.ready),n.cy.trigger({type:"layoutready",layout:n}))},h=n.options.refresh,l=0;l<h&&!s;l++)s=n.stopped||n.layout.tick();if(s){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,n.options.eles.nodes().positions(d),a(),n.cy.one("layoutstop",n.options.stop),n.cy.trigger({type:"layoutstop",layout:n}),e&&cancelAnimationFrame(e),t=!1;return}var g=n.layout.getPositionsData();i.eles.nodes().positions(function(t,e){if("number"==typeof t&&(t=e),!t.isParent()){for(var i=t.id(),r=g[i],n=t;null==r&&(r=g[n.data("parent")]||g["DummyCompound_"+n.data("parent")],g[i]=r,void 0!=(n=n.parent()[0])););return null!=r?{x:r.x,y:r.y}:{x:t.position("x"),y:t.position("y")}}}),a(),e=requestAnimationFrame(o)};return r.addListener("layoutstarted",function(){"during"===n.options.animate&&(e=requestAnimationFrame(p))}),r.runLayout(),"during"!==this.options.animate&&(n.options.eles.nodes().not(":parent").layoutPositions(n,n.options,d),t=!1),this},u.prototype.getTopMostNodes=function(t){for(var e={},i=0;i<t.length;i++)e[t[i].id()]=!0;return t.filter(function(t,i){"number"==typeof t&&(t=i);for(var r=t.parent()[0];null!=r;){if(e[r.id()])return!1;r=r.parent()[0]}return!0})},u.prototype.processChildrenList=function(t,e,i){for(var r=e.length,n=0;n<r;n++){var o,s,g=e[n],u=g.children(),c=g.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((o=null!=g.outerWidth()&&null!=g.outerHeight()?t.add(new a(i.graphManager,new h(g.position("x")-c.w/2,g.position("y")-c.h/2),new l(parseFloat(c.w),parseFloat(c.h)))):t.add(new a(this.graphManager))).id=g.data("id"),o.paddingLeft=parseInt(g.css("padding")),o.paddingTop=parseInt(g.css("padding")),o.paddingRight=parseInt(g.css("padding")),o.paddingBottom=parseInt(g.css("padding")),this.options.nodeDimensionsIncludeLabels&&g.isParent()){var d=g.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=g.boundingBox({includeLabels:!0,includeNodes:!1}).h,f=g.css("text-halign");o.labelWidth=d,o.labelHeight=p,o.labelPos=f}this.idToLNode[g.data("id")]=o,isNaN(o.rect.x)&&(o.rect.x=0),isNaN(o.rect.y)&&(o.rect.y=0),null!=u&&u.length>0&&(s=i.getGraphManager().add(i.newGraph(),o),this.processChildrenList(s,u,i))}},u.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",u)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}],i={};function r(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=i,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}(i(88361))},88361:function(t,e,i){t.exports=function(t){var e=[function(e,i){e.exports=t},function(t,e,i){"use strict";var r=i(0).FDLayoutConstants;function n(){}for(var o in r)n[o]=r[o];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=n},function(t,e,i){"use strict";var r=i(0).FDLayoutEdge;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).LGraph;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).LGraphManager;function n(t){r.call(this,t)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).FDLayoutNode,n=i(0).IMath;function o(t,e,i,n){r.call(this,t,e,i,n)}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),n=0;n<r.length;n++)null==(i=r[n]).getChild()?(i.moveBy(t,e),i.displacementX+=t,i.displacementY+=e):i.propogateDisplacementToChildren(t,e)},o.prototype.setPred1=function(t){this.pred1=t},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(t){this.next=t},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(t){this.processed=t},o.prototype.isProcessed=function(){return processed},t.exports=o},function(t,e,i){"use strict";var r=i(0).FDLayout,n=i(4),o=i(3),s=i(5),a=i(2),h=i(1),l=i(0).FDLayoutConstants,g=i(0).LayoutConstants,u=i(0).Point,c=i(0).PointD,d=i(0).Layout,p=i(0).Integer,f=i(0).IGeometry,y=i(0).LGraph,E=i(0).Transform;function v(){r.call(this),this.toBeTiled={}}for(var A in v.prototype=Object.create(r.prototype),r)v[A]=r[A];v.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},v.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},v.prototype.newNode=function(t){return new s(this.graphManager,t)},v.prototype.newEdge=function(t){return new a(null,null,t)},v.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=l.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=l.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=l.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},v.prototype.layout=function(){return g.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},v.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e)}}else{var i=this.getFlatForest();if(i.length>0)this.positionNodesRadially(i);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(!(this.prunedNodesAll.length>0))return!0;else this.isTreeGrowing=!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(!(this.prunedNodesAll.length>0))return!0;else this.isTreeGrowing=!0;this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i<t.length;i++){var r=t[i].rect,n=t[i].id;e[n]={id:n,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return e},v.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===l.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},v.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,i=[],r=this.graphManager.getGraphs(),n=r.length;for(e=0;e<n;e++)(t=r[e]).updateConnected(),t.isConnected||(i=i.concat(t.getNodes()));return i},v.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e=new Set;for(o=0;o<t.length;o++){var i=t[o];if(!e.has(i)){var r=i.getSource(),n=i.getTarget();if(r==n)i.getBendpoints().push(new c),i.getBendpoints().push(new c),this.createDummyNodesForBendpoints(i),e.add(i);else{var o,s,a=[];if(a=(a=a.concat(r.getEdgeListToNode(n))).concat(n.getEdgeListToNode(r)),!e.has(a[0])){if(a.length>1)for(s=0;s<a.length;s++){var h=a[s];h.getBendpoints().push(new c),this.createDummyNodesForBendpoints(h)}a.forEach(function(t){e.add(t)})}}}if(e.size==t.length)break}},v.prototype.positionNodesRadially=function(t){for(var e=new u(0,0),i=Math.ceil(Math.sqrt(t.length)),r=0,n=0,o=0,s=new c(0,0),a=0;a<t.length;a++){a%i==0&&(o=0,n=r,0!=a&&(n+=h.DEFAULT_COMPONENT_SEPERATION),r=0);var l=t[a],p=d.findCenterOfTree(l);e.x=o,e.y=n,(s=v.radialLayout(l,p,e)).y>r&&(r=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(g.WORLD_CENTER_X-s.x/2,g.WORLD_CENTER_Y-s.y/2))},v.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(e,null,0,359,0,r);var n=y.calculateBounds(t),o=new E;o.setDeviceOrgX(n.getMinX()),o.setDeviceOrgY(n.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s<t.length;s++)t[s].transform(o);var a=new c(n.getMaxX(),n.getMaxY());return o.inverseTransformPoint(a)},v.branchRadialLayout=function(t,e,i,r,n,o){var s,a=(r-i+1)/2;a<0&&(a+=180);var h=(a+i)%360*f.TWO_PI/360,l=n*Math.cos(h),g=n*Math.sin(h);t.setCenter(l,g);var u=[],c=(u=u.concat(t.getEdges())).length;null!=e&&c--;for(var d=0,p=u.length,y=t.getEdgesBetween(e);y.length>1;){var E=y[0];y.splice(0,1);var A=u.indexOf(E);A>=0&&u.splice(A,1),p--,c--}s=null!=e?(u.indexOf(y[0])+1)%p:0;for(var N=Math.abs(r-i)/c,T=s;d!=c;T=++T%p){var _=u[T].getOtherEnd(t);if(_!=e){var L=(i+d*N)%360,m=(L+N)%360;v.branchRadialLayout(_,t,L,m,n+o,o),d++}}},v.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;i<t.length;i++){var r=t[i].getDiagonal();r>e&&(e=r)}return e},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),n=0;n<r.length;n++){var o=r[n],a=o.getParent();0!==this.getNodeDegreeWithChildren(o)||void 0!=a.id&&this.getToBeTiled(a)||i.push(o)}for(var n=0;n<i.length;n++){var o=i[n],h=o.getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(o)}Object.keys(e).forEach(function(i){if(e[i].length>1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var n=e[i][0].getParent(),o=new s(t.graphManager);o.id=r,o.paddingLeft=n.paddingLeft||0,o.paddingRight=n.paddingRight||0,o.paddingBottom=n.paddingBottom||0,o.paddingTop=n.paddingTop||0,t.idToDummyNode[r]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=n.getChild();h.add(o);for(var l=0;l<e[i].length;l++){var g=e[i][l];h.remove(g),a.add(g)}}})},v.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var i=0;i<this.compoundOrder.length;i++)e[this.compoundOrder[i].id]=this.compoundOrder[i],t[this.compoundOrder[i].id]=[].concat(this.compoundOrder[i].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[i].getChild()),this.compoundOrder[i].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},v.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(i){var r=t.idToDummyNode[i];e[i]=t.tileNodes(t.memberGroups[i],r.paddingLeft+r.paddingRight),r.rect.width=e[i].width,r.rect.height=e[i].height})},v.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,n=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,n)}},v.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var r=t.idToDummyNode[i],n=r.paddingLeft,o=r.paddingTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,n,o)})},v.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),n=0;n<r.length;n++){var o=r[n];if(this.getNodeDegree(o)>0)return this.toBeTiled[e]=!1,!1;if(null==o.getChild()){this.toBeTiled[o.id]=!1;continue}if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}return this.toBeTiled[e]=!0,!0},v.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;r<e.length;r++){var n=e[r];n.getSource().id!==n.getTarget().id&&(i+=1)}return i},v.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var i=t.getChild().getNodes(),r=0;r<i.length;r++){var n=i[r];e+=this.getNodeDegreeWithChildren(n)}return e},v.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},v.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var i=t[e];null!=i.getChild()&&this.fillCompexOrderByDFS(i.getChild().getNodes()),this.getToBeTiled(i)&&this.compoundOrder.push(i)}},v.prototype.adjustLocations=function(t,e,i,r,n){e+=r,i+=n;for(var o=e,s=0;s<t.rows.length;s++){var a=t.rows[s];e=o;for(var h=0,l=0;l<a.length;l++){var g=a[l];g.rect.x=e,g.rect.y=i,e+=g.rect.width+t.horizontalPadding,g.rect.height>h&&(h=g.rect.height)}i+=h+t.verticalPadding}},v.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var n=e[r];i.tiledMemberPack[r]=i.tileNodes(t[r],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[r].width,n.rect.height=i.tiledMemberPack[r].height})},v.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:+(t.rect.width*t.rect.height<e.rect.width*e.rect.height)});for(var r=0;r<t.length;r++){var n=t[r];0==i.rows.length?this.insertNodeToRow(i,n,0,e):this.canAddHorizontal(i,n.rect.width,n.rect.height)?this.insertNodeToRow(i,n,this.getShortestRowIndex(i),e):this.insertNodeToRow(i,n,i.rows.length,e),this.shiftToLastRow(i)}return i},v.prototype.insertNodeToRow=function(t,e,i,r){i==t.rows.length&&(t.rows.push([]),t.rowWidth.push(r),t.rowHeight.push(0));var n=t.rowWidth[i]+e.rect.width;t.rows[i].length>0&&(n+=t.horizontalPadding),t.rowWidth[i]=n,t.width<n&&(t.width=n);var o=e.rect.height;i>0&&(o+=t.verticalPadding);var s=0;o>t.rowHeight[i]&&(s=t.rowHeight[i],t.rowHeight[i]=o,s=t.rowHeight[i]-s),t.height+=s,t.rows[i].push(e)},v.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;r<t.rows.length;r++)t.rowWidth[r]<i&&(e=r,i=t.rowWidth[r]);return e},v.prototype.getLongestRowIndex=function(t){for(var e=-1,i=5e-324,r=0;r<t.rows.length;r++)t.rowWidth[r]>i&&(e=r,i=t.rowWidth[r]);return e},v.prototype.canAddHorizontal=function(t,e,i){var r,n,o=this.getShortestRowIndex(t);if(o<0)return!0;var s=t.rowWidth[o];if(s+t.horizontalPadding+e<=t.width)return!0;var a=0;return t.rowHeight[o]<i&&o>0&&(a=i+t.verticalPadding-t.rowHeight[o]),r=t.width-s>=e+t.horizontalPadding?(t.height+a)/(s+e+t.horizontalPadding):(t.height+a)/t.width,a=i+t.verticalPadding,(n=t.width<e?(t.height+a)/e:(t.height+a)/t.width)<1&&(n=1/n),r<1&&(r=1/r),r<n},v.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),i=t.rowWidth.length-1,r=t.rows[e],n=r[r.length-1],o=n.width+t.horizontalPadding;if(t.width-t.rowWidth[i]>o&&e!=i){r.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=5e-324,a=0;a<r.length;a++)r[a].height>s&&(s=r[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]<n.height+t.verticalPadding&&(t.rowHeight[i]=n.height+t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[i];t.height+=l-h,this.shiftToLastRow(t)}},v.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},v.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},v.prototype.reduceTrees=function(){for(var t,e=[],i=!0;i;){var r=this.graphManager.getAllNodes(),n=[];i=!1;for(var o=0;o<r.length;o++)1!=(t=r[o]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(n.push([t,t.getEdges()[0],t.getOwner()]),i=!0);if(!0==i){for(var s=[],a=0;a<n.length;a++)1==n[a][0].getEdges().length&&(s.push(n[a]),n[a][0].getOwner().remove(n[a][0]));e.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},v.prototype.growTree=function(t){for(var e,i=t.length,r=t[i-1],n=0;n<r.length;n++)e=r[n],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},v.prototype.findPlaceforPrunedNode=function(t){var e,i,r,n,o=t[0],s=(i=o==t[1].source?t[1].target:t[1].source).startX,a=i.finishX,h=i.startY,g=i.finishY,u=[0,0,0,0];if(h>0)for(var c=s;c<=a;c++)u[0]+=this.grid[c][h-1].length+this.grid[c][h].length-1;if(a<this.grid.length-1)for(var c=h;c<=g;c++)u[1]+=this.grid[a+1][c].length+this.grid[a][c].length-1;if(g<this.grid[0].length-1)for(var c=s;c<=a;c++)u[2]+=this.grid[c][g+1].length+this.grid[c][g].length-1;if(s>0)for(var c=h;c<=g;c++)u[3]+=this.grid[s-1][c].length+this.grid[s][c].length-1;for(var d=p.MAX_VALUE,f=0;f<u.length;f++)u[f]<d?(d=u[f],r=1,n=f):u[f]==d&&r++;if(3==r&&0==d)0==u[0]&&0==u[1]&&0==u[2]?e=1:0==u[0]&&0==u[1]&&0==u[3]?e=0:0==u[0]&&0==u[2]&&0==u[3]?e=3:0==u[1]&&0==u[2]&&0==u[3]&&(e=2);else if(2==r&&0==d){var y=Math.floor(2*Math.random());e=0==u[0]&&0==u[1]?+(0!=y):0==u[0]&&0==u[2]?2*(0!=y):0==u[0]&&0==u[3]?3*(0!=y):0==u[1]&&0==u[2]?0==y?1:2:0==u[1]&&0==u[3]?0==y?1:3:0==y?2:3}else if(4==r&&0==d){var y=Math.floor(4*Math.random());e=y}else e=n;0==e?o.setCenter(i.getCenterX(),i.getCenterY()-i.getHeight()/2-l.DEFAULT_EDGE_LENGTH-o.getHeight()/2):1==e?o.setCenter(i.getCenterX()+i.getWidth()/2+l.DEFAULT_EDGE_LENGTH+o.getWidth()/2,i.getCenterY()):2==e?o.setCenter(i.getCenterX(),i.getCenterY()+i.getHeight()/2+l.DEFAULT_EDGE_LENGTH+o.getHeight()/2):o.setCenter(i.getCenterX()-i.getWidth()/2-l.DEFAULT_EDGE_LENGTH-o.getWidth()/2,i.getCenterY())},t.exports=v},function(t,e,i){"use strict";var r={};r.layoutBase=i(0),r.CoSEConstants=i(1),r.CoSEEdge=i(2),r.CoSEGraph=i(3),r.CoSEGraphManager=i(4),r.CoSELayout=i(6),r.CoSENode=i(5),t.exports=r}],i={};function r(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=i,r.i=function(t){return t},r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}(i(96985))},96985:function(t){t.exports=function(){var t=[function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(r.prototype),r)s[a]=r[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=[,,,,];this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],1>Math.abs(this.lengthX)&&(this.lengthX=o.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),1>Math.abs(this.lengthX)&&(this.lengthX=o.sign(this.lengthX)),1>Math.abs(this.lengthY)&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),a=i(16),h=i(4);function l(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,null!=i&&null!=e?this.rect=new o(e.x,e.y,i.width,i.height):this.rect=new o}for(var g in l.prototype=Object.create(r.prototype),r)l[g]=r[g];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}}),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";(r.target==t||r.source==t)&&e.push(r)}),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;i<e.length;i++)e[i].withChildren().forEach(function(e){t.add(e)});return t},l.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),i=0;i<e.length;i++)t+=e[i].getNoOfChildren();return 0==t&&(t=1),t},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){return null==this.child?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},l.prototype.scatter=function(){var t,e,i=-s.INITIAL_WORLD_BOUNDARY,r=s.INITIAL_WORLD_BOUNDARY;t=s.WORLD_CENTER_X+a.nextDouble()*(r-i)+i;var n=-s.INITIAL_WORLD_BOUNDARY,o=s.INITIAL_WORLD_BOUNDARY;e=s.WORLD_CENTER_Y+a.nextDouble()*(o-n)+n,this.rect.x=t,this.rect.y=e},l.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),i=t.getBottom()-t.getTop();this.labelWidth>e&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>i&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-i)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-i),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new h(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(6),a=i(3),h=i(1),l=i(13),g=i(12),u=i(11);function c(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in c.prototype=Object.create(r.prototype),r)c[d]=r[d];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(t,e,i){if(null==e&&null==i){if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(t)>-1)throw"Node already in graph!";return t.owner=this,this.getNodes().push(t),t}if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(t.source=e,t.target=i,t.isInterGraph=!1,this.getEdges().push(t),e.edges.push(t),i!=e&&i.edges.push(t),t)},c.prototype.remove=function(t){if(t instanceof a){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var e,i=t.edges.slice(),r=i.length,n=0;n<r;n++)(e=i[n]).isInterGraph?this.graphManager.remove(e):e.source.owner.remove(e);var o=this.nodes.indexOf(t);if(-1==o)throw"Node not in owner node list!";this.nodes.splice(o,1)}else if(t instanceof h){var e=t;if(null==e)throw"Edge is null!";if(null==e.source||null==e.target)throw"Source and/or target is null!";if(null==e.source.owner||null==e.target.owner||e.source.owner!=this||e.target.owner!=this)throw"Source and/or target owner is invalid!";var s=e.source.edges.indexOf(e),l=e.target.edges.indexOf(e);if(!(s>-1&&l>-1))throw"Source and/or target doesn't know this edge!";e.source.edges.splice(s,1),e.target!=e.source&&e.target.edges.splice(l,1);var o=e.source.owner.getEdges().indexOf(e);if(-1==o)throw"Not in owner's edge list!";e.source.owner.getEdges().splice(o,1)}},c.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h<a;h++){var l=s[h];t=l.getTop(),e=l.getLeft(),r>t&&(r=t),o>e&&(o=e)}return r==n.MAX_VALUE?null:(i=void 0!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new g(this.left,this.top))},c.prototype.updateBounds=function(t){for(var e,i,r,o,s,a=n.MAX_VALUE,h=-n.MAX_VALUE,g=n.MAX_VALUE,u=-n.MAX_VALUE,c=this.nodes,d=c.length,p=0;p<d;p++){var f=c[p];t&&null!=f.child&&f.updateBounds(),e=f.getLeft(),i=f.getRight(),r=f.getTop(),o=f.getBottom(),a>e&&(a=e),h<i&&(h=i),g>r&&(g=r),u<o&&(u=o)}var y=new l(a,g,h-a,u-g);a==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=void 0!=c[0].getParent().paddingLeft?c[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},c.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,a=-n.MAX_VALUE,h=n.MAX_VALUE,g=-n.MAX_VALUE,u=t.length,c=0;c<u;c++){var d=t[c];e=d.getLeft(),i=d.getRight(),r=d.getTop(),o=d.getBottom(),s>e&&(s=e),a<i&&(a=i),h>r&&(h=r),g<o&&(g=o)}return new l(s,h,a-s,g-h)},c.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r<i;r++)t+=e[r].calcEstimatedSize();return 0==t?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=t/Math.sqrt(this.nodes.length),this.estimatedSize},c.prototype.updateConnected=function(){var t,e,i=this;if(0==this.nodes.length){this.isConnected=!0;return}var r=new u,n=new Set,o=this.nodes[0];for(o.withChildren().forEach(function(t){r.push(t),n.add(t)});0!==r.length;)for(var s=(t=(o=r.shift()).getEdges()).length,a=0;a<s;a++)null==(e=t[a].getOtherEndInGraph(o,this))||n.has(e)||e.withChildren().forEach(function(t){r.push(t),n.add(t)});if(this.isConnected=!1,n.size>=this.nodes.length){var h=0;n.forEach(function(t){t.owner==i&&h++}),h==this.nodes.length&&(this.isConnected=!0)}},t.exports=c},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,r=e,i=t;var o=r.getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var e,i,o=[],s=(o=o.concat(t.getEdges())).length,a=0;a<s;a++)e=o[a],t.remove(e);var h=[];s=(h=h.concat(t.getNodes())).length;for(var a=0;a<s;a++)i=h[a],t.remove(i);t==this.rootGraph&&this.setRootGraph(null);var l=this.graphs.indexOf(t);this.graphs.splice(l,1),t.parent=null}else if(t instanceof n){if(null==(e=t))throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(null==e.source||null==e.target)throw"Source and/or target is null!";if(-1==e.source.edges.indexOf(e)||-1==e.target.edges.indexOf(e))throw"Source and/or target doesn't know this edge!";var l=e.source.edges.indexOf(e);if(e.source.edges.splice(l,1),l=e.target.edges.indexOf(e),e.target.edges.splice(l,1),null==e.source.owner||null==e.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==e.source.owner.getGraphManager().edges.indexOf(e))throw"Not in owner graph manager's edge list!";var l=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(l,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),i=e.length,r=0;r<i;r++)t=t.concat(e[r].getNodes());this.allNodes=t}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(null==this.allEdges){var t=[],e=this.getGraphs();e.length;for(var i=0;i<e.length;i++)t=t.concat(e[i].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var i,r=t.getOwner();null!=(i=r.getParent());){if(i==e)return!0;if(null==(r=i.getOwner()))break}for(r=e.getOwner();null!=(i=r.getParent());){if(i==t)return!0;if(null==(r=i.getOwner()))break}return!1},o.prototype.calcLowestCommonAncestors=function(){for(var t,e,i,r,n,o=this.getAllEdges(),s=o.length,a=0;a<s;a++){if(e=(t=o[a]).source,i=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=i,e==i){t.lca=e.getOwner();continue}for(r=e.getOwner();null==t.lca;){for(t.targetInLca=i,n=i.getOwner();null==t.lca;){if(n==r){t.lca=n;break}if(n==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=n.getParent(),n=t.targetInLca.getOwner()}if(r==this.rootGraph)break;null==t.lca&&(t.sourceInLca=r.getParent(),r=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var i=t.getOwner();null!=i;){for(var r=e.getOwner();null!=r;){if(r==i)return r;r=r.getParent().getOwner()}i=i.getParent().getOwner()}return i},o.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var i,r=t.getNodes(),n=r.length,o=0;o<n;o++)(i=r[o]).inclusionTreeDepth=e,null!=i.child&&this.calcInclusionTreeDepths(i.child,e+1)},o.prototype.includesInvalidEdge=function(){for(var t,e=this.edges.length,i=0;i<e;i++)if(t=this.edges[i],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=o},function(t,e,i){"use strict";var r=i(0);function n(){}for(var o in r)n[o]=r[o];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=3*n.MAX_NODE_DISPLACEMENT_INCREMENTAL,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,i){"use strict";var r=i(12);function n(){}n.calcSeparationAmount=function(t,e,i,r){if(!t.intersects(e))throw"assert failed";var n=[,,];this.decideDirectionsForOverlappingNodes(t,e,n),i[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),i[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]<a?a=i[0]:s=i[1],i[0]=-1*n[0]*(a/2+r),i[1]=-1*n[1]*(s/2+r)},n.decideDirectionsForOverlappingNodes=function(t,e,i){t.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,t.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},n.getIntersection2=function(t,e,i){var r=t.getCenterX(),n=t.getCenterY(),o=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return i[0]=r,i[1]=n,i[2]=o,i[3]=s,!0;var a=t.getX(),h=t.getY(),l=t.getRight(),g=t.getX(),u=t.getBottom(),c=t.getRight(),d=t.getWidthHalf(),p=t.getHeightHalf(),f=e.getX(),y=e.getY(),E=e.getRight(),v=e.getX(),A=e.getBottom(),N=e.getRight(),T=e.getWidthHalf(),_=e.getHeightHalf(),L=!1,m=!1;if(r===o)n>s?(i[0]=r,i[1]=h,i[2]=o,i[3]=A):n<s&&(i[0]=r,i[1]=u,i[2]=o,i[3]=y);else if(n===s)r>o?(i[0]=a,i[1]=n,i[2]=E,i[3]=s):r<o&&(i[0]=l,i[1]=n,i[2]=f,i[3]=s);else{var O=t.height/t.width,I=e.height/e.width,D=(s-n)/(o-r),w=void 0,R=void 0,C=void 0,M=void 0,G=void 0,x=void 0;if(-O===D?(r>o?(i[0]=g,i[1]=u):(i[0]=l,i[1]=h),L=!0):O===D&&(r>o?(i[0]=a,i[1]=h):(i[0]=c,i[1]=u),L=!0),-I===D?(o>r?(i[2]=v,i[3]=A):(i[2]=E,i[3]=y),m=!0):I===D&&(o>r?(i[2]=f,i[3]=y):(i[2]=N,i[3]=A),m=!0),L&&m)return!1;if(r>o?n>s?(w=this.getCardinalDirection(O,D,4),R=this.getCardinalDirection(I,D,2)):(w=this.getCardinalDirection(-O,D,3),R=this.getCardinalDirection(-I,D,1)):n>s?(w=this.getCardinalDirection(-O,D,1),R=this.getCardinalDirection(-I,D,3)):(w=this.getCardinalDirection(O,D,2),R=this.getCardinalDirection(I,D,4)),!L)switch(w){case 1:M=h,C=r+-p/D,i[0]=C,i[1]=M;break;case 2:C=c,M=n+d*D,i[0]=C,i[1]=M;break;case 3:M=u,C=r+p/D,i[0]=C,i[1]=M;break;case 4:C=g,M=n+-d*D,i[0]=C,i[1]=M}if(!m)switch(R){case 1:x=y,G=o+-_/D,i[2]=G,i[3]=x;break;case 2:G=N,x=s+T*D,i[2]=G,i[3]=x;break;case 3:x=A,G=o+_/D,i[2]=G,i[3]=x;break;case 4:G=v,x=s+-T*D,i[2]=G,i[3]=x}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o=t.x,s=t.y,a=e.x,h=e.y,l=i.x,g=i.y,u=n.x,c=n.y,d=void 0,p=void 0,f=void 0,y=void 0,E=void 0,v=void 0,A=void 0;return(d=h-s,f=o-a,E=a*s-o*h,p=c-g,y=l-u,v=u*g-l*c,0==(A=d*y-p*f))?null:new r((f*v-y*E)/A,(p*E-d*v)/A)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i<t?n+=Math.PI:r<e&&(n+=this.TWO_PI)):n=r<e?this.ONE_AND_HALF_PI:this.HALF_PI,n},n.doIntersect=function(t,e,i,r){var n=t.x,o=t.y,s=e.x,a=e.y,h=i.x,l=i.y,g=r.x,u=r.y,c=(s-n)*(u-l)-(g-h)*(a-o);if(0===c)return!1;var d=((u-l)*(g-n)+(h-g)*(u-o))/c,p=((o-a)*(g-n)+(s-n)*(u-o))/c;return 0<d&&d<1&&0<p&&p<1},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,i){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=0x7fffffff,r.MIN_VALUE=-0x80000000,t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=function(t){return{value:t,next:null,prev:null}},o=function(t,e,i,r){return null!==t?t.next=e:r.head=e,null!==i?i.prev=e:r.tail=e,e.prev=t,e.next=i,r.length++,e},s=function(t,e){var i=t.prev,r=t.next;return null!==i?i.next=r:e.head=r,null!==r?r.prev=i:e.tail=i,t.prev=t.next=null,e.length--,t};t.exports=function(){function t(e){var i=this;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach(function(t){return i.push(t)})}return r(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return o(e.prev,n(t),e,this)}},{key:"insertAfter",value:function(t,e){return o(e,n(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return o(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return o(e,t,e.next,this)}},{key:"push",value:function(t){return o(this.tail,n(t),null,this)}},{key:"unshift",value:function(t){return o(null,n(t),this.head,this)}},{key:"remove",value:function(t){return s(t,this)}},{key:"pop",value:function(){return s(this.tail,this).value}},{key:"popNode",value:function(){return s(this.tail,this)}},{key:"shift",value:function(){return s(this.head,this).value}},{key:"shiftNode",value:function(){return s(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var e=1,i=this.head;e<t;)i=i.next,e++;return i.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var i=1,r=this.head;i<t;)r=r.next,i++;r.value=e}}}]),t}()},function(t,e,i){"use strict";function r(t,e,i){this.x=null,this.y=null,null==t&&null==e&&null==i?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==i?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==i&&(i=t,this.x=i.x,this.y=i.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(t,e,i){"Point"==t.constructor.name&&null==e&&null==i?(i=t,this.setLocation(i.x,i.y)):"number"==typeof t&&"number"==typeof e&&null==i&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},r.prototype.move=function(t,e){this.x=t,this.y=e},r.prototype.translate=function(t,e){this.x+=t,this.y+=e},r.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},r.prototype.toString=function(){return new r().constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=r},function(t,e,i){"use strict";function r(t,e,i,r){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=i&&null!=r&&(this.x=t,this.y=e,this.width=i,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(t){this.x=t},r.prototype.getY=function(){return this.y},r.prototype.setY=function(t){this.y=t},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},t.exports=r},function(t,e,i){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(){}n.lastID=0,n.createID=function(t){return n.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=n.getString(),n.lastID++),t.uniqueID)},n.getString=function(t){return null==t&&(t=n.lastID),"Object#"+t},n.isPrimitive=function(t){var e=void 0===t?"undefined":r(t);return null==t||"object"!=e&&"function"!=e},t.exports=n},function(t,e,i){"use strict";function r(t){if(!Array.isArray(t))return Array.from(t);for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}var n=i(0),o=i(6),s=i(3),a=i(1),h=i(5),l=i(4),g=i(17),u=i(27);function c(t){u.call(this),this.layoutQuality=n.QUALITY,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=n.DEFAULT_INCREMENTAL,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}c.RANDOM_SEED=1,c.prototype=Object.create(u.prototype),c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},c.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},c.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},c.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t,t},c.prototype.newGraph=function(t){return new h(null,this.graphManager,t)},c.prototype.newNode=function(t){return new s(this.graphManager,t)},c.prototype.newEdge=function(t){return new a(null,null,t)},c.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},c.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==n.ANIMATE&&(t&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},c.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},c.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];for(var i=this.graphManager.getRoot().getNodes(),e=0;e<i.length;e++)i[e];this.update(this.graphManager.getRoot())}},c.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof s){if(null!=t.getChild())for(var e=t.getChild().getNodes(),i=0;i<e.length;i++)update(e[i]);null!=t.vGraphObject&&t.vGraphObject.update(t)}else t instanceof a?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof h&&null!=t.vGraphObject&&t.vGraphObject.update(t)},c.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=n.QUALITY,this.animationDuringLayout=n.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=n.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=n.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=n.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=n.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=n.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},c.prototype.transform=function(t){if(void 0==t)this.transform(new l(0,0));else{var e=new g,i=this.graphManager.getRoot().updateLeftTop();if(null!=i){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(i.x),e.setDeviceOrgY(i.y);for(var r=this.getAllNodes(),n=0;n<r.length;n++)r[n].transform(e)}}},c.prototype.positionNodesRandomly=function(t){if(void 0==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,i,r=t.getNodes(),n=0;n<r.length;n++)null==(i=(e=r[n]).getChild())||0==i.getNodes().length?e.scatter():(this.positionNodesRandomly(i),e.updateBounds())},c.prototype.getFlatForest=function(){for(var t=[],e=!0,i=this.graphManager.getRoot().getNodes(),n=!0,o=0;o<i.length;o++)null!=i[o].getChild()&&(n=!1);if(!n)return t;var s=new Set,a=[],h=new Map,l=[];for(l=l.concat(i);l.length>0&&e;){for(a.push(l[0]);a.length>0&&e;){var g=a[0];a.splice(0,1),s.add(g);for(var u=g.getEdges(),o=0;o<u.length;o++){var c=u[o].getOtherEnd(g);if(h.get(g)!=c)if(s.has(c)){e=!1;break}else a.push(c),h.set(c,g)}}if(e){var d=[].concat(r(s));t.push(d);for(var o=0;o<d.length;o++){var p=d[o],f=l.indexOf(p);f>-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},c.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n<t.bendpoints.length;n++){var o=this.newNode(null);o.setRect(new Point(0,0),new Dimension(1,1)),r.add(o);var s=this.newEdge(null);this.graphManager.add(s,i,o),e.add(o),i=o}var s=this.newEdge(null);return this.graphManager.add(s,i,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):r.remove(t),e},c.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(r(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var i=t[e];if(i.bendpoints.length>0){for(var n=this.edgeToDummyNodes.get(i),o=0;o<n.length;o++){var s=n[o],a=new l(s.getCenterX(),s.getCenterY()),h=i.bendpoints.get(o);h.x=a.x,h.y=a.y,s.getOwner().remove(s)}this.graphManager.add(i,i.source,i.target)}}},c.transform=function(t,e,i,r){if(void 0==i||void 0==r)return t<=50?(n=9*e/500,o=e/10):(n=9*e/50,o=-8*e),n*t+o;var n,o,s=e;return t<=50?s-=(e-e/i)/50*(50-t):s+=(e*r-e)/50*(t-50),s},c.findCenterOfTree=function(t){var e=[];e=e.concat(t);var i=[],r=new Map,n=!1,o=null;(1==e.length||2==e.length)&&(n=!0,o=e[0]);for(var s=0;s<e.length;s++){var a=e[s],h=a.getNeighborsList().size;r.set(a,a.getNeighborsList().size),1==h&&i.push(a)}var l=[];for(l=l.concat(i);!n;){var g=[];g=g.concat(l),l=[];for(var s=0;s<e.length;s++){var a=e[s],u=e.indexOf(a);u>=0&&e.splice(u,1),a.getNeighborsList().forEach(function(t){if(0>i.indexOf(t)){var e=r.get(t)-1;1==e&&l.push(t),r.set(t,e)}})}i=i.concat(l),(1==e.length||2==e.length)&&(n=!0,o=e[0])}return o},c.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=c},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(4);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";var r=i(15),n=i(7),o=i(0),s=i(8),a=i(9);function h(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.springConstant=n.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=n.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var l in h.prototype=Object.create(r.prototype),r)h[l]=r[l];h.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,s,a,h=this.getGraphManager().getAllEdges(),l=0;l<h.length;l++)(t=h[l]).idealLength=this.idealEdgeLength,t.isInterGraph&&(i=t.getSource(),r=t.getTarget(),s=t.getSourceInLca().getEstimatedSize(),a=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=s+a-2*o.SIMPLE_NODE_SIZE),e=t.getLca().getInclusionTreeDepth(),t.idealLength+=n.DEFAULT_EDGE_LENGTH*n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(i.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*e))},h.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>n.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i<e.length;i++)t=e[i],this.calcSpringForce(t,t.idealLength)},h.prototype.calcRepulsionForces=function(){var t,e,i,r,o,s=!(arguments.length>0)||void 0===arguments[0]||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t<h.length;t++)i=h[t],this.calculateRepulsionForceOfANode(i,o,s,a),o.add(i);else for(t=0;t<h.length;t++)for(i=h[t],e=t+1;e<h.length;e++)r=h[e],i.getOwner()==r.getOwner()&&this.calcRepulsionForce(i,r)},h.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),i=0;i<e.length;i++)t=e[i],this.calcGravitationalForce(t)},h.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},h.prototype.calcSpringForce=function(t,e){var i,r,n,o,s=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==s.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(i=t.getLength())&&(n=(r=this.springConstant*(i-e))*(t.lengthX/i),o=r*(t.lengthY/i),s.springForceX+=n,s.springForceY+=o,a.springForceX-=n,a.springForceY-=o)},h.prototype.calcRepulsionForce=function(t,e){var i,r,o,h,l,g,u,c=t.getRect(),d=e.getRect(),p=[,,],f=[,,,,];if(c.intersects(d)){s.calcSeparationAmount(c,d,p,n.DEFAULT_EDGE_LENGTH/2),g=2*p[0],u=2*p[1];var y=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=y*g,t.repulsionForceY-=y*u,e.repulsionForceX+=y*g,e.repulsionForceY+=y*u}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(i=d.getCenterX()-c.getCenterX(),r=d.getCenterY()-c.getCenterY()):(s.getIntersection(c,d,f),i=f[2]-f[0],r=f[3]-f[1]),Math.abs(i)<n.MIN_REPULSION_DIST&&(i=a.sign(i)*n.MIN_REPULSION_DIST),Math.abs(r)<n.MIN_REPULSION_DIST&&(r=a.sign(r)*n.MIN_REPULSION_DIST),h=Math.sqrt(o=i*i+r*r),g=(l=this.repulsionConstant*t.noOfChildren*e.noOfChildren/o)*i/h,u=l*r/h,t.repulsionForceX-=g,t.repulsionForceY-=u,e.repulsionForceX+=g,e.repulsionForceY+=u},h.prototype.calcGravitationalForce=function(t){var e,i,r,n,o,s,a,h;i=((e=t.getOwner()).getRight()+e.getLeft())/2,r=(e.getTop()+e.getBottom())/2,n=t.getCenterX()-i,o=t.getCenterY()-r,s=Math.abs(n)+t.getWidth()/2,a=Math.abs(o)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(s>(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=2>Math.abs(this.totalDisplacement-this.oldTotalDisplacement)),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),i=0;i<e.length;i++)(t=e[i]).noOfChildren=t.getNoOfChildren()},h.prototype.calcGrid=function(t){var e=0,i=0;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),i=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var r=Array(e),n=0;n<e;n++)r[n]=Array(i);for(var n=0;n<e;n++)for(var o=0;o<i;o++)r[n][o]=[];return r},h.prototype.addNodeToGrid=function(t,e,i){var r=0,n=0,o=0,s=0;r=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),n=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().y-i)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-i)/this.repulsionRange));for(var a=r;a<=n;a++)for(var h=o;h<=s;h++)this.grid[a][h].push(t),t.setGridCoordinates(r,n,o,s)},h.prototype.updateGrid=function(){var t,e,i=this.getAllNodes();for(t=0,this.grid=this.calcGrid(this.graphManager.getRoot());t<i.length;t++)e=i[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(t,e,i,r){if(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&i||r){var o,s=new Set;t.surrounding=[];for(var a=this.grid,h=t.startX-1;h<t.finishX+2;h++)for(var l=t.startY-1;l<t.finishY+2;l++)if(!(h<0||l<0||h>=a.length||l>=a[0].length)){for(var g=0;g<a[h][l].length;g++)if(o=a[h][l][g],t.getOwner()==o.getOwner()&&t!=o&&!e.has(o)&&!s.has(o)){var u=Math.abs(t.getCenterX()-o.getCenterX())-(t.getWidth()/2+o.getWidth()/2),c=Math.abs(t.getCenterY()-o.getCenterY())-(t.getHeight()/2+o.getHeight()/2);u<=this.repulsionRange&&c<=this.repulsionRange&&s.add(o)}}t.surrounding=[].concat(function(t){if(!Array.isArray(t))return Array.from(t);for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}(s))}for(h=0;h<t.surrounding.length;h++)this.calcRepulsionForce(t,t.surrounding[h])},h.prototype.calcRepulsionRange=function(){return 0},t.exports=h},function(t,e,i){"use strict";var r=i(1),n=i(7);function o(t,e,i){r.call(this,t,e,i),this.idealLength=n.DEFAULT_EDGE_LENGTH}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];t.exports=o},function(t,e,i){"use strict";var r=i(3);function n(t,e,i,n){r.call(this,t,e,i,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];n.prototype.setGridCoordinates=function(t,e,i,r){this.startX=t,this.finishX=e,this.startY=i,this.finishY=r},t.exports=n},function(t,e,i){"use strict";function r(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(t){this.width=t},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(t){this.height=t},t.exports=r},function(t,e,i){"use strict";var r=i(14);function n(){this.map={},this.keys=[]}n.prototype.put=function(t,e){var i=r.createID(t);this.contains(i)||(this.map[i]=e,this.keys.push(t))},n.prototype.contains=function(t){return r.createID(t),null!=this.map[t]},n.prototype.get=function(t){var e=r.createID(t);return this.map[e]},n.prototype.keySet=function(){return this.keys},t.exports=n},function(t,e,i){"use strict";var r=i(14);function n(){this.set={}}n.prototype.add=function(t){var e=r.createID(t);this.contains(e)||(this.set[e]=t)},n.prototype.remove=function(t){delete this.set[r.createID(t)]},n.prototype.clear=function(){this.set={}},n.prototype.contains=function(t){return this.set[r.createID(t)]==t},n.prototype.isEmpty=function(){return 0===this.size()},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),i=e.length,r=0;r<i;r++)t.push(this.set[e[r]])},n.prototype.size=function(){return Object.keys(this.set).length},n.prototype.addAll=function(t){for(var e=t.length,i=0;i<e;i++){var r=t[i];this.add(r)}},t.exports=n},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}(),n=i(11);t.exports=function(){function t(e,i){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");(null!==i||void 0!==i)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=e instanceof n?e.size():e.length,this._quicksort(e,0,r-1)}return r(t,[{key:"_quicksort",value:function(t,e,i){if(e<i){var r=this._partition(t,e,i);this._quicksort(t,e,r),this._quicksort(t,r+1,i)}}},{key:"_partition",value:function(t,e,i){for(var r=this._get(t,e),n=e,o=i;;){for(;this.compareFunction(r,this._get(t,o));)o--;for(;this.compareFunction(this._get(t,n),r);)n++;if(!(n<o))return o;this._swap(t,n,o),n++,o--}}},{key:"_get",value:function(t,e){return t instanceof n?t.get_object_at(e):t[e]}},{key:"_set",value:function(t,e,i){t instanceof n?t.set_object_at(e,i):t[e]=i}},{key:"_swap",value:function(t,e,i){var r=this._get(t,e);this._set(t,e,this._get(t,i)),this._set(t,i,r)}},{key:"_defaultCompareFunction",value:function(t,e){return e>t}}]),t}()},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,i,r){return i&&t(e.prototype,i),r&&t(e,r),e}}();t.exports=function(){function t(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[s][a]=0}this.tracebackGrid=Array(this.iMax);for(var h=0;h<this.iMax;h++){this.tracebackGrid[h]=Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[h][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var r=1;r<this.jMax;r++){var n=[this.sequence1[i-1]===this.sequence2[r-1]?this.grid[i-1][r-1]+this.match_score:this.grid[i-1][r-1]+this.mismatch_penalty,this.grid[i-1][r]+this.gap_penalty,this.grid[i][r-1]+this.gap_penalty],o=this.arrayAllMaxIndexes(n);this.grid[i][r]=n[o[0]],this.tracebackGrid[i][r]=[o.includes(0),o.includes(1),o.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],i=this.tracebackGrid[e.pos[0]][e.pos[1]];i[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),i[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),i[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var i=[],r=-1;-1!==(r=t.indexOf(e,r+1));)i.push(r);return i}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t}()},function(t,e,i){"use strict";var r=function(){};r.FDLayout=i(18),r.FDLayoutConstants=i(7),r.FDLayoutEdge=i(19),r.FDLayoutNode=i(20),r.DimensionD=i(21),r.HashMap=i(22),r.HashSet=i(23),r.IGeometry=i(8),r.IMath=i(9),r.Integer=i(10),r.Point=i(12),r.PointD=i(4),r.RandomSeed=i(16),r.RectangleD=i(13),r.Transform=i(17),r.UniqueIDGeneretor=i(14),r.Quicksort=i(24),r.LinkedList=i(11),r.LGraphObject=i(2),r.LGraph=i(5),r.LEdge=i(1),r.LGraphManager=i(6),r.LNode=i(3),r.Layout=i(15),r.LayoutConstants=i(0),r.NeedlemanWunsch=i(25),t.exports=r},function(t,e,i){"use strict";function r(){this.listeners=[]}var n=r.prototype;n.addListener=function(t,e){this.listeners.push({event:t,callback:e})},n.removeListener=function(t,e){for(var i=this.listeners.length;i>=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;i<this.listeners.length;i++){var r=this.listeners[i];t===r.event&&r.callback(e)}},t.exports=r}],e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26)}()}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9882],{2455:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]])},9145:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]])},14844:t=>{t.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_7a3ec7",variable:"__variable_7a3ec7"}},17439:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},18678:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},20474:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]])},22546:(t,e,s)=>{"use strict";var r=s(41958);s.o(r,"useParams")&&s.d(e,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(e,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(e,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(e,{useSearchParams:function(){return r.useSearchParams}})},24837:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},33832:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},41866:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]])},44516:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},45258:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},47092:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},50848:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]])},58129:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]])},67071:(t,e,s)=>{"use strict";s.d(e,{j:()=>a});var r=s(20381);let i={};function a(t,e){let s=r.useRef(i);return s.current===i&&(s.current=t(e)),s}},67082:(t,e,s)=>{"use strict";s.d(e,{y:()=>a});var r=s(20381);let i=[];function a(t){r.useEffect(t,i)}},67149:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},68502:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]])},72449:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},74308:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},74471:(t,e,s)=>{"use strict";s.d(e,{E:()=>a,Z:()=>u});var r=s(67071),i=s(67082);class a{static create(){return new a}start(t,e){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,e()},t)}isStarted(){return 0!==this.currentId}constructor(){this.currentId=0,this.clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}}function u(){let t=(0,r.j)(a.create).current;return(0,i.y)(t.disposeEffect),t}},84327:(t,e,s)=>{"use strict";s.d(e,{B:()=>h});var r=s(20381),i=s(74471),a=s(57865);let u=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new i.E,currentIdRef:{current:null},currentContextRef:{current:null}});function c(t){let{children:e,delay:s,timeoutMs:c=0}=t,n=r.useRef(s),h=r.useRef(s),l=r.useRef(null),o=r.useRef(null),d=(0,i.Z)();return(0,a.jsx)(u.Provider,{value:r.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:h,currentIdRef:l,timeoutMs:c,currentContextRef:o,timeout:d}),[c,d]),children:e})}let n=r.createContext(void 0),h=function(t){let{delay:e,closeDelay:s,timeout:i=400}=t,u=r.useMemo(()=>({delay:e,closeDelay:s}),[e,s]),h=r.useMemo(()=>({open:e,close:s}),[e,s]);return(0,a.jsx)(n.Provider,{value:u,children:(0,a.jsx)(c,{delay:h,timeoutMs:i,children:t.children})})}},88957:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},89303:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]])},92168:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]])},93891:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]])},95391:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},97317:(t,e,s)=>{"use strict";s.d(e,{D:()=>u});var r=s(20381),i=r.createContext(void 0),a={setTheme:t=>{},themes:[]},u=()=>{var t;return null!=(t=r.useContext(i))?t:a}},98627:(t,e,s)=>{"use strict";s.d(e,{n:()=>l});var r=s(20381),i=s(69629),a=s(5342),u=s(3383),c=s(6407),n=class extends u.Q{#t;#e=void 0;#s;#r;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,c.f8)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,c.EN)(e.mutationKey)!==(0,c.EN)(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#a(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#i(),this.#a()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#i(){let t=this.#s?.state??(0,i.$)();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#a(t){a.jG.batch(()=>{if(this.#r&&this.hasListeners()){let e=this.#e.variables,s=this.#e.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,s,r)}catch(t){Promise.reject(t)}try{this.#r.onSettled?.(t.data,null,e,s,r)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,s,r)}catch(t){Promise.reject(t)}try{this.#r.onSettled?.(void 0,t.error,e,s,r)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#e)})})}},h=s(4710);function l(t,e){let s=(0,h.jE)(e),[i]=r.useState(()=>new n(s,t));r.useEffect(()=>{i.setOptions(t)},[i,t]);let u=r.useSyncExternalStore(r.useCallback(t=>i.subscribe(a.jG.batchCalls(t)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=r.useCallback((t,e)=>{i.mutate(t,e).catch(c.lQ)},[i]);if(u.error&&(0,c.GU)(i.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:l,mutateAsync:u.mutate}}},98779:(t,e,s)=>{"use strict";s.d(e,{A:()=>r});let r=(0,s(58441).A)("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9998],{79998:(e,s,c)=>{c.d(s,{createEventModelingServices:()=>a.g});var a=c(14171);c(88931)}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3787,6815,9492],{63695:()=>{}},_=>{_.O(0,[9828,8821,7358],()=>_(_.s=63695)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6605],{116:(e,t,a)=>{"use strict";function r(e){return{slides:e.slides.map(e=>{let{image:t,caption:a,include:r}=e;return{image:t,caption:a,include:r}}),caption:{hook:e.caption.hook,body:e.caption.body},hashtags:[...e.hashtags],cover:{text:e.cover.text,sub:e.cover.sub},location:e.location}}a.d(t,{$Y:()=>l,LP:()=>c,Mz:()=>r,ll:()=>d,rH:()=>o});class n extends Error{constructor(e,t){super(t),this.status=e,this.name="GraphApprovalsApiError"}}let s={list:"목록을 보려면",decide:"승인하려면",save:"초안을 저장하려면"},l="/app/settings/#bearer-token";function o(e){return e instanceof n&&(401===e.status||403===e.status)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"decide";return e instanceof n?401===e.status||403===e.status?"".concat(s[t]," 이 기기를 데몬에 연결해야 합니다 — 설정 › 데몬 연결 › 연결 토큰 칸에 토큰을 넣어 주세요."):404===e.status?"이 실행을 찾지 못했습니다. 목록을 다시 확인해 주세요.":409===e.status?"이미 결정된 실행입니다. 목록을 다시 확인해 주세요.":400===e.status?"결정 내용을 확인한 뒤 다시 시도해 주세요.":"승인 요청을 처리하지 못했습니다. 잠시 뒤 다시 시도해 주세요.":e instanceof TypeError?"서버에 연결하지 못했습니다. 연결 상태를 확인해 주세요.":"승인 요청을 처리하지 못했습니다. 잠시 뒤 다시 시도해 주세요."}let i="/v1/graph-approvals";function d(e){var t,a;let r=(null!=(t=e.baseUrl)?t:"").replace(/\/+$/,""),s=null!=(a=e.fetchImpl)?a:fetch;async function l(t,a){let l={...a,headers:{"content-type":"application/json",...e.authHeader?{authorization:e.authHeader}:{}}},o=e.client?await e.client.fetchResponse(t,l):await s("".concat(r).concat(t),l),c=await o.json().catch(()=>null);if(!o.ok){let e=c&&"object"==typeof c&&"error"in c&&"string"==typeof c.error?c.error:"request-failed";throw new n(o.status,e)}return c}return{list:()=>l(i),decide:(e,t,a)=>l("".concat(i,"/").concat(encodeURIComponent(e),"/").concat(encodeURIComponent(t)),{method:"POST",body:JSON.stringify({decision:a})}),saveFeedDraft:(e,t,a)=>l("".concat(i,"/").concat(encodeURIComponent(e),"/").concat(encodeURIComponent(t),"/feed-draft"),{method:"PUT",body:JSON.stringify(a)}),feedMedia:async(t,a,l)=>{let o="".concat(i,"/").concat(encodeURIComponent(t),"/").concat(encodeURIComponent(a),"/media?path=").concat(encodeURIComponent(l)),c={headers:e.authHeader?{authorization:e.authHeader}:{}},d=e.client?await e.client.fetchResponse(o,c):await s("".concat(r).concat(o),c);if(!d.ok)throw new n(d.status,"media-failed");return d.blob()}}}},16759:(e,t,a)=>{"use strict";a.d(t,{C:()=>i,DaemonProvider:()=>d,Q:()=>u});var r=a(57865),n=a(20381),s=a(8905),l=a(33797),o=a(47956),c=a(62351);let i=(0,n.createContext)(null);function d(e){let{children:t}=e,a={baseUrl:"",token:"",provider:""},[d,u]=(0,n.useState)(a),[m,p]=(0,n.useState)(""),[h]=(0,n.useState)(()=>new o.ki(a));(0,n.useEffect)(()=>{let e=(0,s.Fp)();u(e),h.updateConfig(e),p((0,l.oD)()),(0,c.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[h]),(0,n.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,s.Fp)();h.updateConfig(t),u(t),(0,c.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&p(t=>t===e.newValue?t:((0,c.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[h]);let b=e=>{u(t=>{let a={...t,...e};return(0,s.Qc)(e),h.updateConfig(a),(0,c.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),a})},x=e=>{p(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,c.cY)("webterm.provider.daemon.session-set",{sessionId:e})},f=(0,n.useMemo)(()=>({config:d,setConfig:b,client:h,sessionId:m,setSessionId:x}),[d,h,m]);return(0,r.jsx)(i.Provider,{value:f,children:t})}function u(){let e=(0,n.useContext)(i);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},33797:(e,t,a)=>{"use strict";a.d(t,{Zr:()=>l,f6:()=>n,oD:()=>s});let r="elanous.daemon.sessionId";function n(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function s(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(r,e),e):localStorage.getItem(r)}();if(e)return e;let t=n();return localStorage.setItem(r,t),t}function l(){let e=n();return localStorage.setItem(r,e),e}},33832:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(58441).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},49491:(e,t,a)=>{"use strict";a.d(t,{GM:()=>o,J3:()=>l,WF:()=>r,bR:()=>s,m:()=>c,r5:()=>n});let r="/v1/devices",n="/v1/approvals/merges",s="/v1/templates/capability-preview",l="/v1/idle-nudge/preview",o="/v1/morning-digest/showroom",c="/v1/next-fluent/dispatch"},52255:(e,t,a)=>{"use strict";a.d(t,{GC:()=>n,In:()=>i,OG:()=>o});var r=a(20381);let n="elanous.pwa.role",s="elanous:pwa-role";function l(){try{let e=window.localStorage.getItem(n);if("owner"===e||"contributor"===e||"general"===e)return e}catch(e){}return"general"}function o(e){try{window.localStorage.setItem(n,e)}catch(e){}"function"==typeof window.dispatchEvent&&window.dispatchEvent(new Event(s))}function c(e){if("function"!=typeof window.addEventListener)return()=>{};window.addEventListener(s,e);let t=t=>{(t.key===n||null===t.key)&&e()};return window.addEventListener("storage",t),()=>{window.removeEventListener(s,e),window.removeEventListener("storage",t)}}function i(){return(0,r.useSyncExternalStore)(c,l,()=>"general")}},58441:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var r=a(20381);let n=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim()},s=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,r.createContext)({}),c=(0,r.forwardRef)((e,t)=>{var a,s,c;let{color:i,size:d,strokeWidth:u,absoluteStrokeWidth:m,className:p="",children:h,iconNode:b,...x}=e,{size:f=24,strokeWidth:g=2,absoluteStrokeWidth:w=!1,color:y="currentColor",className:v=""}=null!=(a=(0,r.useContext)(o))?a:{},N=(null!=m?m:w)?24*Number(null!=u?u:g)/Number(null!=d?d:f):null!=u?u:g;return(0,r.createElement)("svg",{ref:t,...l,width:null!=(s=null!=d?d:f)?s:l.width,height:null!=(c=null!=d?d:f)?c:l.height,stroke:null!=i?i:y,strokeWidth:N,className:n("lucide",v,p),...!h&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(x)&&{"aria-hidden":"true"},...x},[...b.map(e=>{let[t,a]=e;return(0,r.createElement)(t,a)}),...Array.isArray(h)?h:[h]])}),i=(e,t)=>{let a=(0,r.forwardRef)((a,l)=>{let{className:o,...i}=a;return(0,r.createElement)(c,{ref:l,iconNode:t,className:n("lucide-".concat(s(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),o),...i})});return a.displayName=s(e),a}},73372:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>j});var r=a(57865),n=a(20381),s=a(36246),l=a(52681),o=a(16759),c=a(52255),i=a(86308);function d(e,t){return"UNKNOWN"===t&&e<3?3e3:null}async function u(e,t){let a,r=0,n=d(0,"UNKNOWN");for(;null!==n;){var s,l,o;if(await t.sleep(n),t.isActive&&!t.isActive())break;r++;try{a=await e(),null==(l=t.onDetail)||l.call(t,a)}catch(e){}null==(s=t.onAttempt)||s.call(t),n=d(r,null!=(o=null==a?void 0:a.mergeable)?o:"UNKNOWN")}return{attempts:r,...a?{last:a}:{}}}var m=a(33832);function p(e){let{view:t,target:a}=e,[s]=(0,n.useState)(()=>Date.now()),[l,o]=(0,n.useState)(s);(0,n.useEffect)(()=>{let e=window.setInterval(()=>o(Date.now()),100);return()=>window.clearInterval(e)},[]);let c=function(e,t,a){let r="".concat((Math.max(0,e)/1e3).toFixed(1),"초");return{title:"merged"===t?"GitHub 에서 반영된 코드 변경을 읽고 있습니다":a?"GitHub 에서 승인을 기다리는 코드 변경과 #".concat(a," 카드를 읽고 있습니다"):"GitHub 에서 승인을 기다리는 코드 변경을 읽고 있습니다",clock:r,hint:e>=8e3?"평소(2~5초)보다 오래 걸립니다 — GitHub 응답을 기다리는 중이며 멈추지 않았습니다.":null}}(l-s,t,a);return(0,r.jsxs)("section",{role:"status","aria-live":"polite","aria-busy":"true",className:"space-y-3","data-approvals-loading":!0,children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-blue-500/40 bg-blue-500/5 p-4",children:[(0,r.jsx)(m.A,{className:"h-6 w-6 shrink-0 text-blue-500 motion-safe:animate-spin","aria-hidden":!0}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"font-medium",children:c.title}),c.hint&&(0,r.jsx)("p",{className:"mt-1 text-sm text-amber-600 dark:text-amber-400",children:c.hint})]}),(0,r.jsx)("span",{className:"font-mono text-lg tabular-nums text-blue-600 dark:text-blue-300","aria-label":"경과 시간",children:c.clock})]}),(0,r.jsx)("div",{className:"h-1 overflow-hidden rounded-full bg-muted","aria-hidden":!0,children:(0,r.jsx)("div",{className:"h-full w-1/3 rounded-full bg-blue-500 motion-safe:animate-[approvals-slide_1.2s_ease-in-out_infinite]"})}),(0,r.jsx)("style",{children:"@keyframes approvals-slide{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}"}),[0,1].map(e=>(0,r.jsxs)("div",{className:"space-y-3 rounded-xl border border-border bg-card p-5 motion-safe:animate-pulse","aria-hidden":!0,children:[(0,r.jsx)("div",{className:"h-4 w-2/3 rounded bg-muted"}),(0,r.jsx)("div",{className:"h-3 w-full rounded bg-muted"}),(0,r.jsx)("div",{className:"h-3 w-5/6 rounded bg-muted"})]},e))]})}function h(e){let{view:t,onChange:a}=e,n=(e,n)=>(0,r.jsx)("button",{type:"button",role:"tab","aria-selected":t===e,onClick:()=>a(e),className:"rounded-md px-3 py-1 text-sm ".concat(t===e?"bg-foreground text-background":"bg-muted text-foreground"),children:n});return(0,r.jsxs)("div",{role:"tablist","aria-label":"승인 목록 보기",className:"flex gap-2",children:[n("open","승인 대기"),n("merged","완료")]})}function b(e){let{brief:t,lineage:a,summary:n}=e;return(0,r.jsxs)(r.Fragment,{children:[null!==t?(0,r.jsx)("section",{"aria-label":"승인 요약",className:"mt-3 break-words text-sm leading-relaxed [&_a]:text-blue-600 [&_a]:underline [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_h3]:mt-3 [&_h3]:font-semibold [&_li]:ml-5 [&_li]:list-disc [&_p]:my-2 [&_table]:block [&_table]:overflow-x-auto",children:(0,r.jsx)(s.oz,{remarkPlugins:[l.A],components:{a:e=>{let{href:t,children:a}=e;return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",children:a})}},children:t})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"mt-3 rounded border border-amber-500/40 bg-amber-500/15 p-3 text-sm text-amber-800 dark:text-amber-300",children:"승인 요약 내용이 없습니다 — GitHub 본문을 보거나 발사자에게 요청하세요"}),(0,r.jsx)("p",{className:"mt-3 whitespace-pre-wrap text-sm",children:n})]}),a&&(0,r.jsxs)("p",{className:"mt-3 text-sm text-muted-foreground",children:["아이디어 원장: ",a]})]})}function x(e){var t;let{gate:a,busy:n,blocked:s,mergeLabel:l,onCheck:o,onMerge:c}=e;return(0,r.jsxs)("div",{className:"mt-3 space-y-2","aria-label":"머지 전 검사",children:["none"===a.status&&(0,r.jsx)("button",{type:"button",onClick:o,disabled:n,className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:"머지 전 검사 시작"}),"running"===a.status&&(0,r.jsx)("p",{role:"status",className:"text-sm",children:"검사 중…"}),"passed"===a.status&&(0,r.jsxs)("p",{className:"text-sm text-green-700 dark:text-green-400",children:["검사 통과 (",null!=(t=a.os)?t:"unknown",")",a.baseDrifted?" \xb7 검사 뒤 main 이 움직였다 — 머지 때 겹치는 파일이 있으면 다시 검사를 요구한다":""]}),("failed"===a.status||"unmeasured"===a.status)&&(0,r.jsxs)("div",{role:"alert",className:"text-sm text-red-600",children:[(0,r.jsx)("p",{children:"failed"===a.status?"검사 실패":"검사 측정 불가"}),(0,r.jsx)("ul",{className:"list-inside list-disc",children:a.failures.map((e,t)=>(0,r.jsx)("li",{children:e},t))}),(0,r.jsx)("button",{type:"button",onClick:o,disabled:n,className:"mt-2 rounded-lg border px-3 py-2 disabled:opacity-50",children:"머지 전 검사 다시 시작"})]}),(0,r.jsx)("button",{type:"button",onClick:c,disabled:n||s||"passed"!==a.status,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white disabled:cursor-not-allowed disabled:opacity-50",children:null!=l?l:"승인하고 머지"})]})}function f(e){let{card:t,api:a,attempt:r,onAttempt:s,onUpdate:l}=e,o="UNKNOWN"===t.mergeable&&!t.merged&&"OPEN"===t.state;return(0,n.useEffect)(()=>{if(!o||r>0)return;let e=!0,n=[];return u(()=>a.get(t.number),{sleep:e=>new Promise(t=>{n.push(window.setTimeout(t,e))}),isActive:()=>e,onDetail:a=>{e&&l(a,t.headSha)},onAttempt:()=>{e&&s(t.number)}}),()=>{for(let t of(e=!1,n))window.clearTimeout(t)}},[a,t.number,o,r,s,l]),null}function g(){let e=(0,c.In)(),{client:t}=(0,o.Q)(),a=(0,n.useMemo)(()=>(0,i.tV)({client:t}),[t]),[s,l]=(0,n.useState)([]),[u,m]=(0,n.useState)(!0),[g,w]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),[N,j]=(0,n.useState)({}),[k,S]=(0,n.useState)({}),[C,I]=(0,n.useState)(null),[E,U]=(0,n.useState)("open"),L=(0,n.useCallback)(e=>{S(t=>{var a;return{...t,[e]:(null!=(a=t[e])?a:0)+1}})},[]),R=(0,n.useCallback)((e,t)=>{l(a=>a.map(a=>a.number!==e.number||a.headSha!==t?a:{...e,gate:e.headSha===t?e.gate:{status:"none",failures:[]},merged:a.merged}))},[]);async function O(e){v(e.number),j(t=>({...t,[e.number]:""}));try{let{gate:t}=await a.check(e.number,e.headSha);l(a=>a.map(a=>a.number===e.number&&a.headSha===e.headSha?{...a,gate:t}:a))}catch(t){j(a=>({...a,[e.number]:(0,i.V5)(t,"검사를 시작하지 못했습니다.").text}))}finally{v(null)}}async function M(e){if(window.confirm("#".concat(e.number," ").concat(e.title,"\n현재 확인한 변경을 승인하고 머지할까요?"))){v(e.number),j(t=>({...t,[e.number]:""}));try{await a.merge(e.number,e.headSha),l(t=>t.map(t=>t.number===e.number?{...t,merged:!0,state:"MERGED"}:t))}catch(t){j(a=>({...a,[e.number]:(0,i.V5)(t,"머지하지 못했습니다.").text}))}finally{v(null)}}}return((0,n.useEffect)(()=>{let e=s.filter(e=>"OPEN"===e.state&&("running"===e.gate.status||"passed"===e.gate.status));if("open"!==E||!e.length)return;let t=!0,r=window.setInterval(()=>{for(let r of e)a.get(r.number).then(e=>{t&&R(e,r.headSha)}).catch(e=>{t&&j(t=>({...t,[r.number]:(0,i.V5)(e,"검사 상태를 불러오지 못했습니다.").text}))})},1e4);return()=>{t=!1,window.clearInterval(r)}},[a,s,R,E]),(0,n.useEffect)(()=>{let e=!0,t=Number(new URLSearchParams(window.location.search).get("pr")),r=Number.isSafeInteger(t)&&t>0?t:null;return(m(!0),w(null),I(r),"merged"===E)?(a.list("merged").then(t=>{let{items:a}=t;e&&l(a)}).catch(t=>{e&&w((0,i.V5)(t,"목록을 불러오지 못했습니다."))}).finally(()=>{e&&m(!1)}),()=>{e=!1}):(a.list().then(async t=>{let{items:n}=t;if(!e)return;let s=n.find(e=>e.number===r);if(r&&!s)try{let t=await a.get(r);e&&l([t,...n])}catch(t){e&&w((0,i.V5)(t,"PR 을 불러오지 못했습니다.")),e&&l(n)}else l(r?[...n].sort((e,t)=>Number(t.number===r)-Number(e.number===r)):n)}).catch(t=>{e&&w((0,i.V5)(t,"목록을 불러오지 못했습니다."))}).finally(()=>{e&&m(!1)}),()=>{e=!1})},[a,E]),"owner"===e||"open"!==E||u||s.length||g)?(0,r.jsxs)("main",{className:"mx-auto max-w-3xl space-y-5 p-4 pb-20 text-foreground sm:p-8",children:[(0,r.jsxs)("header",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:"코드 변경 승인"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"자동으로 만든 코드 변경(PR)을 확인하고 승인합니다."})]}),(0,r.jsx)(h,{view:E,onChange:e=>{l([]),U(e)}}),u&&(0,r.jsx)(p,{view:E,target:C}),g&&(0,r.jsxs)("p",{role:"alert",className:"text-red-600","data-approvals-error":!0,children:[g.text,g.href&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)("a",{href:g.href,className:"font-semibold underline underline-offset-2","data-approvals-settings":!0,children:"설정 열기 →"})]})]}),!u&&!s.length&&!g&&(0,r.jsx)("p",{children:"merged"===E?"승인해 반영된 코드 변경이 아직 없습니다.":"승인을 기다리는 코드 변경이 없습니다."}),s.map(e=>{var t,n;let s=e.merged||"MERGED"===e.state,l="OPEN"!==e.state&&!s,o=e.draft?"초안 PR 은 머지할 수 없습니다. GitHub에서 초안을 해제한 뒤 다시 확인하세요.":e.checks.failure>0?"실패한 검사가 있습니다.":e.checks.pending>0?"검사가 아직 끝나지 않았습니다.":"CONFLICTING"===e.mergeable?"머지 충돌이 있습니다.":"MERGEABLE"!==e.mergeable?"머지 가능 여부가 아직 확인되지 않았습니다.":"main"!==e.base?"대상 브랜치가 main 이 아닙니다.":"",c=C===e.number,i=null!=(t=k[e.number])?t:0;return(0,r.jsxs)("article",{className:"rounded-xl border bg-card p-5 shadow-sm ".concat(c?"border-blue-500 ring-2 ring-blue-500/30":"border-border"),children:[(0,r.jsx)(f,{card:e,api:a,attempt:i,onAttempt:L,onUpdate:R}),(0,r.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,r.jsxs)("h2",{className:"font-semibold",children:["#",e.number," \xb7 ",e.title]}),(0,r.jsx)("span",{className:"rounded bg-muted px-2 py-1 text-xs",children:s?function(e){if(!e)return"머지됨";let t=new Date(e);if(Number.isNaN(t.getTime()))return"머지됨";let a=new Date(t.getTime()+324e5).toISOString();return"머지됨 ".concat(a.slice(5,10)," ").concat(a.slice(11,16)," KST")}(e.mergedAt):l?"닫힘":e.draft?"초안":"열림"})]}),(0,r.jsx)(b,{brief:e.brief,lineage:e.lineage,summary:e.summary}),(0,r.jsxs)("p",{className:"mt-3 text-sm text-muted-foreground",children:["+",e.additions," 추가 / −",e.deletions," 삭제 \xb7 파일 ",e.changedFiles]}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 text-xs","aria-label":"검사 상태",children:[(0,r.jsxs)("span",{className:"rounded bg-green-500/15 px-2 py-1",children:["성공 ",e.checks.success]}),(0,r.jsxs)("span",{className:"rounded bg-red-500/15 px-2 py-1",children:["실패 ",e.checks.failure]}),(0,r.jsxs)("span",{className:"rounded bg-yellow-500/15 px-2 py-1",children:["대기 ",e.checks.pending]}),e.checks.success+e.checks.failure+e.checks.pending===0&&(0,r.jsx)("span",{className:"rounded bg-slate-500/15 px-2 py-1",children:"GitHub 검사 없음 — 머지 전 검사는 아래에서 별도로 실행"})]}),(0,r.jsxs)("details",{open:c,className:"mt-3 text-sm",children:[(0,r.jsx)("summary",{className:"cursor-pointer",children:"바뀐 파일 보기"}),(0,r.jsx)("ul",{className:"mt-2 list-inside list-disc break-all",children:e.files.map(e=>(0,r.jsx)("li",{children:e},e))})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-4",children:[(0,r.jsx)("a",{className:"text-sm text-blue-600 underline",href:e.url,target:"_blank",rel:"noopener noreferrer",children:"GitHub 에서 보기"}),!s&&!l&&(0,r.jsx)(x,{gate:e.gate,busy:null!==y,blocked:!!o,mergeLabel:y===e.number?"머지 중…":"UNKNOWN"!==(n=e.mergeable)?"승인하고 머지":null===d(i,n)?"확인 종료":"확인 중…",onCheck:()=>O(e),onMerge:()=>M(e)})]}),o&&!s&&!l&&(0,r.jsxs)("p",{className:"mt-2 text-sm text-amber-600",children:[o,"UNKNOWN"===e.mergeable&&i>=3?" 자동 확인이 끝났습니다. 최신 상태는 페이지를 새로고침하세요.":""]}),N[e.number]&&(0,r.jsx)("p",{role:"alert",className:"mt-2 text-sm text-red-600",children:N[e.number]})]},e.number)})]}):null}var w=a(116);function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),a="release-loop"===e.graphId?"릴리스 발행":"announce-loop"===e.graphId?"공지":e.graphId,r=Date.parse(e.since),n=Number.isNaN(r)?0:Math.max(0,Math.floor((t-r)/6e4)),s=n<1?"방금 전":n<60?"".concat(n,"분 전"):n<1440?"".concat(Math.floor(n/60),"시간 전"):"".concat(Math.floor(n/1440),"일 전");return{title:a,nodeId:e.nodeId,waiting:s,message:e.message,recent:e.recent.map(e=>"".concat(e.ok&&"fail"!==e.outcome&&"error"!==e.outcome?"✓":"✗"," ").concat(e.nodeId).concat(e.outcome?" \xb7 ".concat(e.outcome):"").concat(e.summary?" \xb7 ".concat(e.summary):""))}}function v(e){var t,a,s,l,o,c,i;let{item:d,api:u,onDecided:m,confirm:p}=e,[h,b]=(0,n.useState)(d.feed),[x,f]=(0,n.useState)(()=>(0,w.Mz)(d.feed)),[g,y]=(0,n.useState)(!1),[v,N]=(0,n.useState)(0),[j,k]=(0,n.useState)(!1),[S,C]=(0,n.useState)(!1),[I,E]=(0,n.useState)(""),[U,L]=(0,n.useState)(""),[R,O]=(0,n.useState)(!1),M=(e,t)=>{L((0,w.LP)(e,t)),O((0,w.rH)(e))},[D,A]=(0,n.useState)({}),P=(0,n.useRef)(null),_=null!=p?p:e=>window.confirm(e),H=(i=(0,w.Mz)(h),JSON.stringify(x)!==JSON.stringify(i)),G=(0,n.useMemo)(()=>(function(e,t){let a=[];for(let r of(e.cover.image&&a.push({image:e.cover.image,isCover:!0}),t.slides))r.include&&a.push({image:r.image,caption:r.caption});return a})(h,x),[h,x]),T=G[Math.min(v,Math.max(0,G.length-1))],F=(0,n.useMemo)(()=>[h.cover.image,...h.slides.map(e=>e.image)].filter(e=>!!e),[h]);function V(e){N(t=>Math.max(0,Math.min(G.length-1,t+e)))}function z(e,t){f(a=>({...a,slides:a.slides.map((a,r)=>r===e?{...a,...t}:a)}))}function W(e,t){f(a=>{let r=e+t;if(r<0||r>=a.slides.length)return a;let n=[...a.slides];return[n[e],n[r]]=[n[r],n[e]],{...a,slides:n}})}async function Y(){C(!0),L(""),O(!1),E("");try{let e=await u.saveFeedDraft(d.graphId,d.runId,x);return b(e.feed),f((0,w.Mz)(e.feed)),E("저장했어요 \xb7 수정 ".concat(e.feed.revision," \xb7 아직 게시 전입니다")),!0}catch(e){return M(e,"save"),!1}finally{C(!1)}}async function J(){if(_("게시할까요? 승인하면 이 초안으로 게시 준비 묶음이 텔레그램으로 갑니다.")&&(!H||await Y())){C(!0),L("");try{await u.decide(d.graphId,d.runId,"approved"),m()}catch(e){M(e,"decide")}finally{C(!1)}}}async function K(){if(_("이 게시 초안을 거절할까요?")){C(!0),L("");try{await u.decide(d.graphId,d.runId,"rejected"),m()}catch(e){M(e,"decide")}finally{C(!1)}}}(0,n.useEffect)(()=>{let e=!0,t=[],a="undefined"!=typeof URL&&"function"==typeof URL.createObjectURL;return Promise.all(F.map(async r=>{try{let n=await u.feedMedia(d.graphId,d.runId,r);if(!e||!a)return null;let s=URL.createObjectURL(n);return t.push(s),[r,s]}catch(e){return null}})).then(t=>{e&&A(Object.fromEntries(t.filter(e=>!!e)))}),()=>{e=!1,a&&"function"==typeof URL.revokeObjectURL&&t.forEach(e=>URL.revokeObjectURL(e))}},[u,d.graphId,d.runId,F]);let $=(null==(t=h.brand)?void 0:t.name)||"브랜드",q=$.trim().charAt(0).toUpperCase()||"\xb7",Q=x.hashtags.join(" "),X=x.cover.text!==(null!=(s=h.cover.renderedText)?s:h.cover.text)||x.cover.sub!==(null!=(l=h.cover.renderedSub)?l:h.cover.sub);return(0,r.jsxs)("article",{"aria-label":"피드 미리보기","data-feed-revision":h.revision,className:"mx-auto w-full max-w-md overflow-hidden rounded-xl border border-border bg-card text-foreground shadow-sm",children:[(0,r.jsxs)("header",{className:"flex items-center gap-3 px-3 py-2",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold",children:q}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"truncate text-sm font-semibold",children:$}),(null==(a=h.brand)?void 0:a.handle)&&(0,r.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:h.brand.handle})]}),(0,r.jsxs)("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:["수정 ",h.revision,H?" \xb7 저장 안 됨":""]})]}),(0,r.jsxs)("div",{className:"relative aspect-[4/5] w-full touch-pan-y select-none overflow-hidden bg-muted",onTouchStart:e=>{var t,a;P.current=null!=(a=null==(t=e.touches[0])?void 0:t.clientX)?a:null},onTouchEnd:e=>{var t;let a=P.current;P.current=null;let r=null==(t=e.changedTouches[0])?void 0:t.clientX;null==a||null==r||40>Math.abs(r-a)||V(r<a?1:-1)},children:[(null==T?void 0:T.image)&&D[T.image]?(0,r.jsx)("img",{src:D[T.image],alt:T.isCover?x.cover.text:null!=(o=T.caption)?o:"",className:"h-full w-full object-cover"}):(0,r.jsx)("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"이미지 불러오는 중"}),G.length>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button","aria-label":"이전 장",disabled:0===v,onClick:()=>V(-1),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full bg-black/40 px-2 py-1 text-white disabled:opacity-0",children:"‹"}),(0,r.jsx)("button",{type:"button","aria-label":"다음 장",disabled:v>=G.length-1,onClick:()=>V(1),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full bg-black/40 px-2 py-1 text-white disabled:opacity-0",children:"›"})]})]}),G.length>1&&(0,r.jsx)("div",{"aria-label":"장 표시",className:"flex justify-center gap-1.5 py-2",children:G.map((e,t)=>(0,r.jsx)("span",{"data-dot":t===v?"on":"off",className:"h-1.5 w-1.5 rounded-full ".concat(t===v?"bg-primary":"bg-muted-foreground/40")},t))}),X&&(0,r.jsxs)("p",{"data-cover-pending":!0,className:"mx-3 mb-2 rounded border border-dashed border-border px-2 py-1 text-xs text-muted-foreground",children:["커버 문구 변경 — \xab",x.cover.text,x.cover.sub?" \xb7 ".concat(x.cover.sub):"","\xbb \xb7 게시 때 커버를 다시 그립니다"]}),(0,r.jsxs)("div",{className:"space-y-2 px-3 pb-3 text-sm",children:[(0,r.jsxs)("p",{className:"break-words",children:[(0,r.jsx)("span",{className:"font-semibold",children:$})," ",x.caption.hook]}),x.caption.body&&(j?(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:x.caption.body}):(0,r.jsx)("button",{type:"button",onClick:()=>k(!0),className:"text-muted-foreground",children:"더 보기"})),x.hashtags.length>0&&(0,r.jsx)("p",{className:"flex flex-wrap gap-x-1.5 text-primary",children:x.hashtags.map((e,t)=>(0,r.jsx)("span",{className:"whitespace-nowrap",children:e},"".concat(e,"-").concat(t)))}),x.location&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["\uD83D\uDCCD ",x.location]})]}),g&&(0,r.jsxs)("section",{"aria-label":"초안 편집",className:"space-y-3 border-t border-border px-3 py-3 text-sm",children:[(0,r.jsxs)("label",{className:"block",children:["커버 문구",(0,r.jsx)("input",{value:x.cover.text,onChange:e=>f({...x,cover:{...x.cover,text:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["커버 부제",(0,r.jsx)("input",{value:x.cover.sub,onChange:e=>f({...x,cover:{...x.cover,sub:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["첫 줄",(0,r.jsx)("input",{value:x.caption.hook,onChange:e=>f({...x,caption:{...x.caption,hook:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["본문",(0,r.jsx)("textarea",{value:x.caption.body,rows:4,onChange:e=>f({...x,caption:{...x.caption,body:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["해시태그(띄어쓰기로 구분)",(0,r.jsx)("input",{value:Q,onChange:e=>f({...x,hashtags:e.target.value.split(/\s+/).filter(Boolean)}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["위치(비우면 없음)",(0,r.jsx)("input",{value:null!=(c=x.location)?c:"",onChange:e=>f({...x,location:e.target.value.trim()?e.target.value:null}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsx)("ol",{"aria-label":"사진 순서",className:"space-y-2",children:x.slides.map((e,t)=>(0,r.jsxs)("li",{"data-slide":e.image,className:"rounded border border-border p-2 ".concat(e.include?"":"opacity-50"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-6 shrink-0 text-xs text-muted-foreground",children:t+1}),(0,r.jsx)("input",{"aria-label":"".concat(t+1,"번 사진 설명"),value:e.caption,onChange:e=>z(t,{caption:e.target.value}),className:"min-w-0 flex-1 rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:0===t,onClick:()=>W(t,-1),className:"rounded border px-2 py-0.5 disabled:opacity-40",children:"앞으로"}),(0,r.jsx)("button",{type:"button",disabled:t===x.slides.length-1,onClick:()=>W(t,1),className:"rounded border px-2 py-0.5 disabled:opacity-40",children:"뒤로"}),(0,r.jsx)("button",{type:"button",onClick:()=>z(t,{include:!e.include}),className:"rounded border px-2 py-0.5",children:e.include?"빼기":"되살리기"})]})]},e.image))})]}),(I||U)&&(0,r.jsx)("p",{role:U?"alert":"status",className:"px-3 pb-2 text-sm ".concat(U?"text-red-600":"text-muted-foreground"),children:U||I}),U&&R&&(0,r.jsx)("p",{className:"px-3 pb-2 text-sm",children:(0,r.jsx)("a",{href:w.$Y,className:"font-medium underline","data-connect-token-link":!0,children:"연결 토큰 칸 열기 →"})}),(0,r.jsxs)("footer",{className:"flex flex-wrap gap-2 border-t border-border px-3 py-3",children:[(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>y(e=>!e),className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:g?"편집 닫기":"편집"}),(0,r.jsx)("button",{type:"button",disabled:S||!H,onClick:()=>{Y()},className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:"수정 저장"}),(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>{J()},className:"rounded-lg bg-blue-600 px-3 py-2 text-sm font-medium text-white disabled:opacity-50",children:"최종 게시"}),(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>{K()},className:"ml-auto rounded-lg px-3 py-2 text-sm text-muted-foreground disabled:opacity-50",children:"거절"})]})]})}function N(){let e,{client:t}=(0,o.Q)(),a=(0,n.useMemo)(()=>(0,w.ll)({client:t}),[t]),[s,l]=(0,n.useState)([]),[c,i]=(0,n.useState)(""),[d,u]=(0,n.useState)(!1),[m,p]=(0,n.useState)(!1),h=(0,n.useRef)((e=0,{begin:()=>e+=1,isLatest:t=>t===e})).current,b=(0,n.useCallback)(async()=>{let e=h.begin();try{let t=await a.list();if(!h.isLatest(e))return;l(t.items),i(""),u(!1)}catch(t){h.isLatest(e)&&(i((0,w.LP)(t,"list")),u((0,w.rH)(t)))}},[a,h]);async function x(e,t){if("rejected"!==t||window.confirm("".concat(y(e).title," 실행을 거절할까요?"))){p(!0),i(""),h.begin();try{await a.decide(e.graphId,e.runId,t),await b()}catch(e){i((0,w.LP)(e,"decide")),u((0,w.rH)(e))}finally{p(!1)}}}(0,n.useEffect)(()=>{b();let e=window.setInterval(()=>{b()},3e4);return()=>window.clearInterval(e)},[b]);let f=s.filter(e=>!!e.feed),g=s.filter(e=>!e.feed);return s.length||c?(0,r.jsxs)(r.Fragment,{children:[f.length>0&&(0,r.jsxs)("section",{"aria-label":"게시 대기",className:"mx-auto max-w-3xl space-y-4 px-4 pt-6 text-foreground sm:px-8",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"게시 대기"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"고쳐서 저장해도 대기열에 남습니다. \xab최종 게시\xbb를 눌러야만 올라갑니다."}),f.map(e=>(0,r.jsx)(v,{item:e,api:a,onDecided:()=>{h.begin(),b()}},"".concat(e.graphId,"/").concat(e.runId)))]}),(g.length>0||c)&&(0,r.jsxs)("section",{"aria-label":"실행 승인",className:"mx-auto max-w-3xl space-y-4 px-4 pt-6 text-foreground sm:px-8",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"실행 승인"}),c&&(0,r.jsx)("p",{role:"alert",className:"text-sm text-red-600",children:c}),c&&d&&(0,r.jsx)("p",{className:"text-sm",children:(0,r.jsx)("a",{href:w.$Y,className:"font-medium underline","data-connect-token-link":!0,children:"연결 토큰 칸 열기 →"})}),g.map(e=>{let t=y(e);return(0,r.jsxs)("article",{className:"rounded-xl border border-border bg-card p-5 shadow-sm",children:[(0,r.jsx)("h3",{className:"font-semibold",children:t.title}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:["멈춘 단계: ",t.nodeId," \xb7 ",t.waiting,"부터 대기 중"]}),(0,r.jsx)("p",{className:"mt-3 whitespace-pre-wrap break-words text-sm",children:t.message}),t.recent.length>0&&(0,r.jsxs)("div",{className:"mt-3 text-sm",children:[(0,r.jsx)("p",{className:"font-medium",children:"최근 단계"}),(0,r.jsx)("ul",{className:"mt-1 space-y-1",children:t.recent.map((e,t)=>(0,r.jsx)("li",{className:"break-words",children:e},t))})]}),(0,r.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:m,onClick:()=>{x(e,"approved")},className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white disabled:opacity-50",children:"승인"}),(0,r.jsx)("button",{type:"button",disabled:m,onClick:()=>{x(e,"rejected")},className:"rounded-lg border px-4 py-2 text-sm disabled:opacity-50",children:"거절"})]})]},"".concat(e.graphId,"/").concat(e.runId))})]})]}):null}function j(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N,{}),(0,r.jsx)(g,{})]})}},86308:(e,t,a)=>{"use strict";a.d(t,{V5:()=>s,tV:()=>l});var r=a(49491);class n extends Error{constructor(e,t,a){super(a||t),this.status=e,this.error=t,this.reason=a,this.name="MergeApprovalsApiError"}}function s(e,t){return e instanceof n?401===e.status||"unauthorized"===e.error?{text:"이 기기에 소유자 토큰이 없어 승인 목록을 못 읽었습니다 — 이미 연결된 기기의 설정 › 연결 토큰 만들기 에서 토큰을 만들어, 이 기기의 설정 › 데몬 연결 › 연결 토큰 칸에 붙이면 바로 보입니다.",href:"/app/settings/#bearer-token"}:"gh-failed"===e.error?{text:"데몬이 GitHub 를 읽지 못했습니다(데몬 기계의 gh 로그인\xb7네트워크) — 잠시 뒤 다시 열어 보세요.".concat(e.reason?" 사유: ".concat(e.reason.split("\n")[0].slice(0,160)):"")}:"gh-invalid-response"===e.error?{text:"GitHub 응답을 해석하지 못했습니다 — 잠시 뒤 다시 열어 보세요."}:"approvals-repo-unknown"===e.error?{text:"승인할 저장소를 모릅니다 — 데몬 설정 intake.approvals.repo(예: owner/repo)를 채워 주세요.",href:"/app/settings/"}:e.reason?{text:e.reason}:{text:"".concat(t," (").concat(e.status," ").concat(e.error,")")}:e instanceof TypeError?{text:"데몬에 닿지 못했습니다 — 데몬이 켜져 있는지, 이 기기가 같은 네트워크(tailnet)에 있는지 확인하세요."}:{text:e instanceof Error&&e.message?e.message:t}}function l(e){var t,a;let s=null!=(t=e.fetchImpl)?t:fetch,l=(null!=(a=e.baseUrl)?a:"").replace(/\/+$/,"");async function o(t,a){let r={...a,headers:{"content-type":"application/json",...e.authHeader?{authorization:e.authHeader}:{}}},o=e.client?await e.client.fetchResponse(t,r):await s("".concat(l).concat(t),r),c=await o.json().catch(()=>null);if(!o.ok){var i;let e=c&&"object"==typeof c?c:{};throw new n(o.status,null!=(i=e.error)?i:"request-failed",e.reason)}return c}return{list:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"open";return o("merged"===e?"".concat(r.r5,"?state=merged"):r.r5)},get:e=>o("".concat(r.r5,"/").concat(e)),check:(e,t)=>o("".concat(r.r5,"/").concat(e,"/check"),{method:"POST",body:JSON.stringify({headSha:t})}),merge:(e,t)=>o("".concat(r.r5,"/").concat(e,"/merge"),{method:"POST",body:JSON.stringify({headSha:t})})}}},93693:(e,t,a)=>{Promise.resolve().then(a.bind(a,73372))}},e=>{e.O(0,[8030,7956,9828,8821,7358],()=>e(e.s=93693)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2922],{9645:(e,t,n)=>{"use strict";n.d(t,{cn:()=>a});var r=n(53995),s=n(42127);function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.QP)((0,r.$)(t))}},16759:(e,t,n)=>{"use strict";n.d(t,{C:()=>d,DaemonProvider:()=>c,Q:()=>u});var r=n(57865),s=n(20381),a=n(8905),i=n(33797),o=n(47956),l=n(62351);let d=(0,s.createContext)(null);function c(e){let{children:t}=e,n={baseUrl:"",token:"",provider:""},[c,u]=(0,s.useState)(n),[m,x]=(0,s.useState)(""),[p]=(0,s.useState)(()=>new o.ki(n));(0,s.useEffect)(()=>{let e=(0,a.Fp)();u(e),p.updateConfig(e),x((0,i.oD)()),(0,l.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[p]),(0,s.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,a.Fp)();p.updateConfig(t),u(t),(0,l.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&x(t=>t===e.newValue?t:((0,l.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[p]);let g=e=>{u(t=>{let n={...t,...e};return(0,a.Qc)(e),p.updateConfig(n),(0,l.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),n})},h=e=>{x(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,l.cY)("webterm.provider.daemon.session-set",{sessionId:e})},b=(0,s.useMemo)(()=>({config:c,setConfig:g,client:p,sessionId:m,setSessionId:h}),[c,p,m]);return(0,r.jsx)(d.Provider,{value:b,children:t})}function u(){let e=(0,s.useContext)(d);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},33797:(e,t,n)=>{"use strict";n.d(t,{Zr:()=>i,f6:()=>s,oD:()=>a});let r="elanous.daemon.sessionId";function s(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function a(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(r,e),e):localStorage.getItem(r)}();if(e)return e;let t=s();return localStorage.setItem(r,t),t}function i(){let e=s();return localStorage.setItem(r,e),e}},42272:(e,t,n)=>{"use strict";n.d(t,{r:()=>o});var r=n(57865),s=n(1041),a=n.n(s);let i=[{key:"autopilot",href:"/autopilot",num:"①",label:"미션",sub:"Autopilot"},{key:"tasks",href:"/tasks",num:"②",label:"작업",sub:"Tasks"},{key:"scheduler",href:"/scheduler",num:"③",label:"스케줄",sub:"Schedules"}];function o(e){let{active:t}=e;return(0,r.jsxs)("nav",{"aria-label":"Mission Fabric 파이프라인","data-testid":"fabric-stage-header",className:"flex flex-wrap items-center gap-1 text-xs",children:[(0,r.jsx)("span",{className:"mr-1 text-muted-foreground",children:"Missions"}),i.map((e,n)=>(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsxs)(a(),{href:e.href,"aria-current":e.key===t?"page":void 0,className:["rounded px-2 py-1 ring-1 transition-colors",e.key===t?"bg-primary/15 font-medium text-foreground ring-primary/40":"text-muted-foreground ring-border hover:bg-muted hover:text-foreground"].join(" "),children:[(0,r.jsx)("span",{className:"mr-1",children:e.num}),e.label,(0,r.jsx)("span",{className:"ml-1 text-[10px] opacity-70",children:e.sub})]}),n<i.length-1&&(0,r.jsx)("span",{className:"text-muted-foreground/50","aria-hidden":!0,children:"→"})]},e.key))]})}},43240:(e,t,n)=>{Promise.resolve().then(n.bind(n,45726))},45726:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>I});var r=n(57865),s=n(20381),a=n(16759),i=n(58174);let o=["dig","backtest","trade","retro","replay","delegate","autopilot"],l={trade:"bg-rose-500/15 text-rose-300 ring-rose-500/30",dig:"bg-sky-500/15 text-sky-200 ring-sky-500/30",backtest:"bg-violet-500/15 text-violet-200 ring-violet-500/30",retro:"bg-amber-500/15 text-amber-200 ring-amber-500/30",replay:"bg-indigo-500/15 text-indigo-200 ring-indigo-500/30",delegate:"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30",autopilot:"bg-fuchsia-500/15 text-fuchsia-200 ring-fuchsia-500/30"};function d(e){let{api:t}=e,[n,a]=(0,s.useState)([]),[d,c]=(0,s.useState)(null),[u,m]=(0,s.useState)(!0),x=(0,s.useCallback)(async()=>{m(!0);try{var e;let n=await t.autonomy(80,null!=d?d:void 0);a(null!=(e=n.actions)?e:[])}catch(e){}finally{m(!1)}},[t,d]);return(0,s.useEffect)(()=>{x()},[x]),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>c(null),className:["rounded px-2 py-0.5 text-xs ring-1",null===d?"bg-primary/20 text-foreground ring-primary/40":"bg-muted text-muted-foreground ring-border"].join(" "),children:"전체"}),o.map(e=>{var t;return(0,r.jsx)("button",{type:"button",onClick:()=>c(e),className:["rounded px-2 py-0.5 text-xs ring-1",d===e?null!=(t=l[e])?t:"bg-primary/20 ring-primary/40":"bg-muted text-muted-foreground ring-border"].join(" "),children:e},e)}),(0,r.jsx)(i.$,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>void x(),children:"새로고침"})]}),u?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"불러오는 중…"}):0===n.length?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"아직 기록된 자율행동이 없습니다. 자율루프가 돌면 여기에 “무엇을 왜 했나”가 쌓입니다."}):(0,r.jsx)("ul",{className:"space-y-2",children:n.map((e,t)=>{var n;return(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-card/50 p-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:["rounded px-2 py-0.5 text-xs ring-1",null!=(n=l[e.loop])?n:"bg-muted text-muted-foreground ring-border"].join(" "),children:e.loop}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:function(e){try{return new Intl.DateTimeFormat("ko-KR",{timeZone:"Asia/Seoul",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e))}catch(t){return e.slice(5,16)}}(e.ts)}),e.importance>=8&&(0,r.jsx)("span",{className:"rounded bg-rose-500/15 px-1.5 text-[10px] text-rose-300 ring-1 ring-rose-500/30",children:"중요"})]}),(0,r.jsx)("pre",{className:"mt-1.5 whitespace-pre-wrap font-sans text-sm text-foreground/90",children:e.text})]},"".concat(e.ts,"-").concat(t))})})]})}var c=n(1041),u=n.n(c),m=n(73134);let x=new Set(["done","failed","disarmed","rejected","completed","cancelled"]);function p(e){return x.has(null!=e?e:"")}function g(){return"갱신이 ".concat(14,"일 넘게 없으면 \xab멈춤\xbb으로 본다 — 마지막 갱신 이후 진행 흔적이 없다는 뜻이다.")}function h(e){return null==e?"파생 미측정":"파생 ".concat(e.total)}let b={ok:{icon:"✅",tone:"text-emerald-300",label:"정상"},done:{icon:"✅",tone:"text-emerald-300",label:"완료"},stale:{icon:"⏰",tone:"text-amber-300",label:"밀림"},error:{icon:"❌",tone:"text-rose-400",label:"실패"},active:{icon:"\uD83D\uDD35",tone:"text-sky-300",label:"실행중"},pending:{icon:"⏳",tone:"text-muted-foreground",label:"대기"}},f={cron:"크론",task:"태스크",action:"자율행동"};function v(e){var t;let{counts:n,total:s}=e,a=Object.entries(null!=n?n:{}).filter(e=>{let[,t]=e;return t>0});if(!s||0===s)return(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:"태스크 0"});let i=null!=(t=null==n?void 0:n.done)?t:0;return(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("span",{className:"text-xs text-muted-foreground",children:["태스크 ",i,"/",s]}),a.map(e=>{let[t,n]=e;return(0,r.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[t,":",n]},t)})]})}function y(e){let{r:t}=e;if(!t||0===t.total)return(0,r.jsx)("span",{className:"text-xs text-muted-foreground",...t?{}:{title:"서버가 파생 롤업을 싣지 않았다 — \xab파생 0\xbb이 아니라 \xab못 잰\xbb 값이다(구 서버 \xb7 집계 실패)."},children:h(t)});let n=(e,t)=>e>0?(0,r.jsxs)("span",{className:["text-xs",b[t].tone].join(" "),children:[b[t].icon,e]},t):null;return(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:h(t)}),n(t.ok,"ok"),n(t.stale,"stale"),n(t.error,"error"),n(t.active,"active"),n(t.pending,"pending")]})}function j(e){let{api:t,m:n,onDone:a}=e,o="scheduler"===n.model,l="task"===n.model,[d,c]=(0,s.useState)(""),[u,m]=(0,s.useState)(""),[x,p]=(0,s.useState)(""),[g,h]=(0,s.useState)(null),[b,f]=(0,s.useState)(null);if(!o&&!l)return(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["이 실행모델(",n.model,")은 지속 잡을 만들지 않아 구체화 대상이 아닙니다."]});let v=async e=>{h(e),f(null);let r=o?{command:d.trim(),...u.trim()?{cron:u.trim()}:{}}:{...x.trim()?{prompt:x.trim()}:{}};try{let i=await t.missionAction(n.id,e,r);if(i.error)f("오류: ".concat(i.error));else{var s;f("arm"===e?"승인\xb7arming ON 시 자동 실행":"구체화 완료(".concat(null!=(s=i.engine)?s:"",")")),a()}}catch(e){f(e instanceof Error?e.message:String(e))}finally{h(null)}};return(0,r.jsxs)("div",{className:"mt-3 space-y-2 rounded-md border border-border bg-background/50 p-2.5",children:[o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{value:d,onChange:e=>c(e.target.value),placeholder:"실행할 명령 (예: scripts/foo.ts) — 필수",className:"w-full rounded border border-border bg-background px-2 py-1 text-xs"}),(0,r.jsx)("input",{value:u,onChange:e=>m(e.target.value),placeholder:"cron (선택 \xb7 비우면 골에서 추론)",className:"w-full rounded border border-border bg-background px-2 py-1 font-mono text-xs"})]}),l&&(0,r.jsx)("input",{value:x,onChange:e=>p(e.target.value),placeholder:"태스크 내용 (선택 \xb7 비우면 골 사용)",className:"w-full rounded border border-border bg-background px-2 py-1 text-xs"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(i.$,{size:"sm",disabled:!!g||o&&!d.trim(),onClick:()=>void v("materialize"),children:"materialize"===g?"…":"지금 구체화"}),(0,r.jsx)(i.$,{size:"sm",variant:"outline",disabled:!!g||o&&!d.trim(),onClick:()=>void v("arm"),children:"arm"===g?"…":"승인(arm)"}),b&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:b})]})]})}function N(e){let{api:t,m:n,onMutate:a}=e,o=!1===n.isAutopilot,[l,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(null),[h,N]=(0,s.useState)(!1),k=n.model?m.NE[n.model]:null,w=function(e,t,n){var r;if(void 0===e||!Number.isFinite(e)||!Number.isFinite(t))return null;let s=new Date(e);if(!Number.isFinite(s.getTime()))return null;let a=new Intl.DateTimeFormat("en-CA",{timeZone:null==n?void 0:n.timeZone,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(s),i=e=>{var t;return null==(t=a.find(t=>t.type===e))?void 0:t.value},o="".concat(i("year"),"-").concat(i("month"),"-").concat(i("day")),l=Math.floor((t-e)/864e5);return{stale:!p(null==n?void 0:n.status)&&l>=(null!=(r=null==n?void 0:n.thresholdDays)?r:14),days:l,lastUpdated:o}}(n.updatedAt,Date.now(),{status:n.status}),S=(null==w?void 0:w.stale)?w:null,[C,z]=(0,s.useState)(!1),A=(0,s.useCallback)(async()=>{N(!0);try{x(await t.trace(n.id))}catch(e){}finally{N(!1)}},[t,n.id]),[E,D]=(0,s.useState)(!1),[I,O]=(0,s.useState)(!1),[P,U]=(0,s.useState)(null),M=!o&&"proposed"===n.status,T=(0,s.useCallback)(async()=>{let e=!l;d(e),!e||c||o||await A()},[l,c,A,o]),$=(0,s.useCallback)(async()=>{D(!0),U(null);try{await t.missionAction(n.id,"cancel"),z(!1),await A(),a()}catch(e){}finally{D(!1)}},[t,n.id,A,a]),J=(0,s.useCallback)(async()=>{O(!0),U(null);try{var e;let r=await t.missionAction(n.id,"approve");r.error?U("오류: ".concat(r.error)):U("✅ 승인 — 태스크 ".concat(null!=(e=r.activated)?e:0,"건 실행 시작(ready). 미션 running.")),await A()}catch(e){U(e instanceof Error?e.message:String(e))}finally{O(!1)}},[t,n.id,A]);return(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-card/50",children:[(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>void T(),className:"flex min-w-0 flex-1 items-start gap-3 p-3 text-left",children:[(0,r.jsx)("span",{className:"mt-0.5 text-muted-foreground",children:l?"▾":"▸"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o?(0,r.jsx)("span",{className:"rounded bg-slate-500/15 px-2 py-0.5 text-xs font-medium text-slate-300 ring-1 ring-slate-500/30",children:"사람 \xb7 intake"}):k&&(0,r.jsx)("span",{className:["rounded px-2 py-0.5 text-xs font-medium ring-1",k.tone].join(" "),children:k.label}),!o&&"continuous"===n.kind&&(0,r.jsx)("span",{className:"rounded bg-sky-500/15 px-1.5 py-0.5 text-[11px] text-sky-300 ring-1 ring-sky-500/30",children:"상시"}),!o&&"finite"===n.kind&&(0,r.jsx)("span",{className:"rounded bg-violet-500/15 px-1.5 py-0.5 text-[11px] text-violet-300 ring-1 ring-violet-500/30",children:"유한"}),(0,r.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground ring-1 ring-border",children:n.source}),M?(0,r.jsx)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] font-medium text-amber-300 ring-1 ring-amber-500/40",children:"승인 대기"}):(0,r.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground ring-1 ring-border",children:n.status}),n.reviewDue&&(0,r.jsx)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] text-amber-300 ring-1 ring-amber-500/30",children:"⚠ 30일+ 리뷰"}),o?(0,r.jsx)(v,{counts:n.taskCounts,total:n.taskCount}):(0,r.jsx)(y,{r:n.derived}),S&&(0,r.jsx)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] font-medium text-amber-300 ring-1 ring-amber-500/30",title:g(),children:"".concat(S.days,"일 멈춤 \xb7 마지막 갱신 ").concat(S.lastUpdated)})]}),(0,r.jsx)("p",{className:"truncate text-sm text-foreground/90",children:n.goal}),(0,r.jsx)("p",{className:"font-mono text-[10px] text-muted-foreground",children:n.id})]})]}),S&&!o&&(0,r.jsxs)("div",{className:"mr-3 mt-3 flex shrink-0 flex-col items-end gap-1.5",children:[(0,r.jsx)(i.$,{size:"sm",variant:"outline",disabled:E,onClick:()=>z(e=>!e),"aria-expanded":C,"aria-controls":"mission-close-confirm-".concat(n.id),className:"border-amber-500/40 text-amber-300 hover:text-amber-200",children:E?"종료 중…":"닫기 제안"}),C&&(0,r.jsxs)("div",{id:"mission-close-confirm-".concat(n.id),role:"group","aria-label":"미션 종료 확인",className:"w-60 space-y-1.5 rounded-md border border-amber-500/40 bg-amber-500/5 p-2",children:[(0,r.jsx)("p",{className:"text-[11px] leading-snug text-amber-200/90",children:g()}),(0,r.jsxs)("p",{className:"text-[11px] leading-snug text-muted-foreground",children:[S.days,"일째 갱신 없음 \xb7 파생 잡까지 release 되며 되돌릴 수 없다."]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[(0,r.jsx)(i.$,{size:"sm",variant:"ghost",disabled:E,className:"h-7 px-2 text-[11px] text-muted-foreground",onClick:()=>z(!1),children:"취소"}),(0,r.jsx)(i.$,{size:"sm",variant:"outline",disabled:E,className:"h-7 border-rose-500/50 px-2 text-[11px] text-rose-300 hover:text-rose-200",onClick:()=>void $(),children:E?"종료 중…":"종료 확인"})]})]})]}),S&&o&&(0,r.jsxs)("div",{className:"mr-3 mt-3 flex shrink-0 flex-col items-end gap-1.5",children:[(0,r.jsx)(u(),{href:"/tasks",title:"".concat(S.days,"일째 갱신 없음 \xb7 ").concat(g()),className:"inline-flex h-8 items-center rounded-md border border-amber-500/40 px-3 text-xs font-medium text-amber-300 hover:text-amber-200",children:"닫기 제안 — 작업 보드"}),(0,r.jsxs)("span",{className:"max-w-[15rem] text-right text-[11px] leading-snug text-muted-foreground",children:[S.days,"일째 갱신 없음 \xb7 사람 미션은 작업 보드에서 닫습니다"]})]})]}),l&&o&&(0,r.jsxs)("div",{className:"border-t border-border px-4 py-3 space-y-2",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"사람이 Intake 로 만든 미션입니다. 실행은 Task 보드에서 진행됩니다."}),(0,r.jsx)(v,{counts:n.taskCounts,total:n.taskCount}),(0,r.jsx)(u(),{href:"/tasks",className:"inline-block text-xs text-primary hover:underline",children:"② 작업 보드에서 보기 →"})]}),l&&!o&&(0,r.jsxs)("div",{className:"border-t border-border px-4 py-3",children:[M&&(0,r.jsxs)("div",{className:"mb-3 space-y-2 rounded-md border border-amber-500/30 bg-amber-500/5 p-3",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-amber-200",children:"자동 분해 완료 \xb7 승인 대기"}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["골을 태스크로 자동 구체화했습니다(아직 ",(0,r.jsx)("b",{children:"실행 안 함"}),"). 승인하면 실행이 시작됩니다.","scheduler"===n.model&&" 반복 스케줄은 승인 후 배선됩니다."]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(i.$,{size:"sm",disabled:I||E,onClick:()=>void J(),children:I?"승인 중…":"✅ 승인(실행 시작)"}),(0,r.jsx)(i.$,{size:"sm",variant:"ghost",disabled:I||E,onClick:()=>void $(),className:"text-rose-400 hover:text-rose-300",children:E?"거절 중…":"거절"}),P&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:P})]})]}),h&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"계보 조회 중…"}),c&&0===c.derived.length&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:c.note}),c&&(0,m.on)(c.derived)&&(0,r.jsxs)(u(),{href:(0,m.on)(c.derived),className:"mb-2 inline-block text-xs text-primary hover:underline","data-mission-schedules":!0,children:["이 미션을 부르는 스케줄 ",c.derived.filter(e=>"cron"===e.kind&&e.id).length," →"]}),c&&c.derived.length>0&&(0,r.jsx)("ul",{className:"space-y-1.5",children:c.derived.map((e,t)=>{let n=b[e.status];return(0,r.jsxs)("li",{className:"flex items-start gap-2 text-sm",children:[(0,r.jsx)("span",{className:n.tone,children:n.icon}),(0,r.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground ring-1 ring-border",children:f[e.kind]}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,r.jsx)("span",{className:"text-foreground/90",children:e.name}),e.detail&&(0,r.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:e.detail})]})]},t)})}),c&&!p(n.status)&&!M&&(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)(i.$,{size:"sm",variant:"ghost",disabled:E,onClick:()=>void $(),className:"text-rose-400 hover:text-rose-300",children:E?"종료 중…":"미션 종료(파생 잡 release)"}),"continuous"===n.kind&&(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"상시 미션 — 종료 전까지 계속 실행"})]}),c&&!M&&(0,r.jsx)(j,{api:t,m:n,onDone:()=>void A()})]})]})}function k(e){let{api:t,onCommitted:n}=e,[a,o]=(0,s.useState)(""),[l,d]=(0,s.useState)(null),[c,u]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[g,h]=(0,s.useState)(null),b=(0,s.useCallback)(async()=>{let e=a.trim();if(e){u(!0),h(null);try{d((await t.triagePreview(e)).triage)}catch(e){h(e instanceof Error?e.message:String(e))}finally{u(!1)}}},[t,a]),f=(0,s.useCallback)(async()=>{let e=a.trim();if(e){p(!0),h(null);try{(await t.commitMission(e,"intake")).missionId?(o(""),d(null),n()):h("미션 생성 실패")}catch(e){h(e instanceof Error?e.message:String(e))}finally{p(!1)}}},[t,a,n]),v=l?m.NE[l.executionModel]:null;return(0,r.jsxs)("div",{className:"space-y-2 rounded-lg border border-border bg-card/40 p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"text-sm font-medium",children:["골 던지기 ",(0,r.jsx)("span",{className:"text-xs font-normal text-muted-foreground",children:"— 소망을 말하면 미션이 됩니다"})]}),(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"텔레그램에선 “미션:” 마커로"})]}),(0,r.jsx)("textarea",{value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&b()},placeholder:"예: 삼성전자 급락하면 매매 검토 / 이 주제 끝까지 파봐 / 매일 아침 반도체 뉴스 정리",className:"min-h-[60px] w-full resize-y rounded-md border border-border bg-background px-3 py-2 text-sm"}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(i.$,{onClick:()=>void b(),disabled:c||!a.trim(),size:"sm",variant:"outline",children:c?"분류 중…":"Triage (⌘↵)"}),(0,r.jsx)(i.$,{onClick:()=>void f(),disabled:x||!a.trim(),size:"sm",children:x?"커밋 중…":"미션 커밋 →"}),l&&v&&(0,r.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[(0,r.jsx)("span",{className:["rounded px-2 py-0.5 ring-1",v.tone].join(" "),children:v.label}),(0,r.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-muted-foreground ring-1 ring-border",children:"heavy"===l.tier?"무거움":"가벼움"}),(0,r.jsx)("span",{className:"text-muted-foreground",children:l.rationale})]}),g&&(0,r.jsx)("span",{className:"text-xs text-rose-400",children:g})]})]})}function w(e){var t,n;let{api:a}=e,[o,l]=(0,s.useState)(null),[d,c]=(0,s.useState)(null),[u,m]=(0,s.useState)(!1),x=(0,s.useCallback)(async()=>{m(!0),c(null);try{let e=[...(await a.missionsUnified()).missions].sort((e,t)=>e.createdAt<t.createdAt?1:-1);l(e)}catch(e){c(e instanceof Error?e.message:String(e))}finally{m(!1)}},[a]);(0,s.useEffect)(()=>{x()},[x]);let p=(0,s.useCallback)(()=>{x()},[x]),g=null!=(t=null==o?void 0:o.filter(e=>e.isAutopilot).length)?t:0,h=(null!=(n=null==o?void 0:o.length)?n:0)-g;return(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("p",{className:"text-sm text-muted-foreground",children:["모든 미션(사람 intake + 자율)의 계보\xb7실행 상태.",o&&(0,r.jsxs)("span",{className:"ml-1 text-[11px]",children:["자율 ",g," \xb7 사람 ",h]})]}),(0,r.jsx)(i.$,{onClick:()=>void x(),disabled:u,size:"sm",variant:"outline",children:u?"…":"새로고침"})]}),(0,r.jsx)(k,{api:a,onCommitted:()=>void x()}),d&&(0,r.jsx)("p",{className:"text-xs text-rose-400",children:d}),o&&0===o.length&&(0,r.jsx)("p",{className:"rounded-lg border border-dashed border-border p-6 text-center text-sm text-muted-foreground",children:"아직 미션이 없습니다. 위 “골 던지기”로 자율 미션을 만들거나, Intake 에서 메모를 포착하세요."}),o&&o.length>0&&(0,r.jsx)("div",{className:"space-y-2",children:o.map(e=>(0,r.jsx)(N,{api:a,m:e,onMutate:p},e.id))})]})}var S=n(66066);function C(e){let{client:t}=e,[n,a]=(0,s.useState)({total:0,items:[],error:null,loading:!0});return(0,s.useEffect)(()=>{let e=!0;return a({total:0,items:[],error:null,loading:!0}),(0,S.qK)(t).then(t=>{let n=[...t].sort((e,t)=>{var n,r;return(e.dueAt?Date.parse(e.dueAt):1/0)-(t.dueAt?Date.parse(t.dueAt):1/0)||(null!=(n=e.raisedAt)?n:"").localeCompare(null!=(r=t.raisedAt)?r:"")});e&&a({total:n.length,items:n.slice(0,3),error:null,loading:!1})}).catch(t=>{e&&a({total:0,items:[],error:t instanceof Error?t.message:String(t),loading:!1})}),()=>{e=!1}},[t]),(0,r.jsxs)("section",{"aria-label":"결정 대기",className:"mb-4 rounded-xl border border-border bg-card p-4",children:[n.loading?(0,r.jsx)("p",{role:"status",children:"결정 대기 읽는 중"}):n.error?(0,r.jsxs)("p",{role:"alert",children:["결정 대기 못 읽음 \xb7 ",n.error]}):0===n.total?(0,r.jsx)("p",{children:"열린 결정 없음"}):(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium",children:"결정 대기 ".concat(n.total,"건").concat(n.total>n.items.length?" \xb7 상위 3건 표시":"")}),(0,r.jsx)("ol",{className:"mt-2 space-y-1",children:n.items.map(e=>(0,r.jsx)("li",{className:"text-sm break-words",children:(0,r.jsx)("span",{"aria-label":e.title,children:"".concat(e.title).concat(e.dueAt?" \xb7 기한 ".concat(e.dueAt):"")})},e.id))})]}),(0,r.jsx)("a",{href:"/decisions",className:"mt-2 inline-block text-sm underline",children:"결정 대기 카드 열기"})]})}var z=n(42272);let A=[{id:"missions",label:"Missions"},{id:"autonomy",label:"자율행동"}];function E(e){var t;let{arming:n}=e;if(!n)return null;let s=(e,t)=>(0,r.jsxs)("span",{className:["rounded px-2 py-0.5 text-xs ring-1",e?"bg-emerald-500/15 text-emerald-300 ring-emerald-500/30":"bg-muted text-muted-foreground ring-border"].join(" "),children:[t," ",e?"ON":"OFF"]});return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,r.jsx)("span",{children:"자율 경계:"}),s(n.absorb,"흡수 PR초안(".concat(n.absorbBackend,")")),s(n.merge,"mandate merge"),s(n.reboot,"재부팅"),s(null!=(t=n.materialize)&&t,"자율 구체화"),(0,r.jsx)("span",{className:"text-[11px]",children:"\xb7 재부팅은 항상 HITL \xb7 기본 disarmed(fail-closed)"})]})}function D(){let{client:e}=(0,a.Q)(),t=(0,s.useMemo)(()=>new m.Yt(e),[e]),[n,i]=(0,s.useState)("missions"),[o,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=!0;return t.arming().then(t=>{e&&l(t.arming)}).catch(()=>{}),()=>{e=!1}},[t]),(0,r.jsxs)("div",{className:"mx-auto max-w-[1400px] px-4 pt-4",children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(z.r,{active:"autopilot"})}),(0,r.jsxs)("div",{className:"mb-3 space-y-2",children:[(0,r.jsxs)("h1",{className:"text-lg font-semibold",children:["Missions ",(0,r.jsx)("span",{className:"text-sm font-normal text-muted-foreground",children:"미션 지휘 센터 \xb7 Autopilot"})]}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"미션(사람 + 자율)의 계보\xb7상태\xb7자율행동. 아래 “골 던지기” 또는 텔레그램 “미션:” 마커로 소망을 던지면 미션이 됩니다."}),(0,r.jsx)(E,{arming:o})]}),(0,r.jsx)(C,{client:e}),(0,r.jsx)("div",{className:"flex gap-1 border-b border-border",children:A.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>i(e.id),className:["-mb-px border-b-2 px-4 py-2 text-sm font-medium transition-colors",n===e.id?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"].join(" "),children:e.label},e.id))}),(0,r.jsxs)("div",{className:"py-4",children:["missions"===n&&(0,r.jsx)(w,{api:t}),"autonomy"===n&&(0,r.jsx)(d,{api:t})]})]})}function I(){return(0,r.jsx)(D,{})}},58174:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var r=n(57865),s=n(4648),a=n(3255),i=n(9645);let o=(0,a.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:n="default",size:a="default",...l}=e;return(0,r.jsx)(s.$,{"data-slot":"button",className:(0,i.cn)(o({variant:n,size:a,className:t})),...l})}},66066:(e,t,n)=>{"use strict";async function r(e){let t=await e.fetchResponse("/v1/ops-board/notices");if(!t.ok)throw Error("notices list failed: ".concat(t.status));return(await t.json()).notices}async function s(e,t,n){let r=await e.fetchResponse("/v1/ops-board/notices",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({noticeId:t,body:n})});if(!r.ok)throw Error("notice reply failed: ".concat(r.status));return(await r.json()).reply}async function a(e){let t=await e.fetchResponse("/v1/decisions?status=open");if(!t.ok)throw Error("decisions list failed: ".concat(t.status));return(await t.json()).decisions}async function i(e,t,n,r){let s=await e.fetchResponse("/v1/decisions/".concat(encodeURIComponent(t),"/decide"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({choice:n,...void 0===r?{}:{note:r}})});if(!s.ok)throw Error("decision failed: ".concat(s.status));return s.json()}n.d(t,{LD:()=>i,aj:()=>s,kh:()=>r,qK:()=>a})},73134:(e,t,n)=>{"use strict";function r(e){let t=e.filter(e=>"cron"===e.kind&&e.id).map(e=>e.id);return t.length?"/scheduler?ids=".concat(t.map(encodeURIComponent).join(",")):null}n.d(t,{NE:()=>l,Yt:()=>o,on:()=>r});let s=["task","goal-loop","single-shot"],a=["scheduler","monitor-trigger"];function i(e){var t,n,r,i,o,l,d;let c=e.autopilot,u=null!=(t=null==c?void 0:c.executionModel)?t:null;return{id:e.id,goal:e.title||e.description||e.id,source:null!=(n=null==c?void 0:c.origin)?n:"human",status:null!=(r=null==c?void 0:c.apmStatus)?r:e.status,model:u,tier:null!=(i=null==c?void 0:c.tier)?i:null,engine:null!=(o=null==c?void 0:c.engine)?o:null,kind:(d=null!=(l=null==c?void 0:c.executionModel)?l:null)&&s.includes(d)?"finite":d&&a.includes(d)?"continuous":"other",reviewDue:!1,createdAt:new Date(e.createdAt).toISOString(),updatedAt:e.updatedAt,derived:e.derived,isAutopilot:null!=c,toxStatus:e.status,taskCount:e.taskCount,taskCounts:e.taskStatusCounts}}class o{async triagePreview(e,t){return this.client.fetchJson("/v1/autopilot/triage-preview",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({goal:e,...t?{category:t}:{}})})}async commitMission(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"intake",n=arguments.length>2?arguments[2]:void 0;return this.client.fetchJson("/v1/autopilot/triage-preview",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({goal:e,commit:!0,source:t,...n?{category:n}:{}})})}async missionsUnified(e){var t,n;let r=new URLSearchParams({...e?{status:e}:{}}).toString(),s=await this.client.fetchJson("/v1/missions".concat(r?"?".concat(r):"")),a=null!=(t=s.missions)?t:[];return{ok:!0,total:null!=(n=s.total)?n:a.length,missions:a.map(i)}}async trace(e){return this.client.fetchJson("/v1/autopilot/trace?id=".concat(encodeURIComponent(e)))}async missionArcMap(){var e,t,n;let r=await this.client.fetchJson("/v1/missions"),s=new Map;for(let a of null!=(e=r.missions)?e:[]){let e=null==(t=a.autopilot)?void 0:t.arcs;e&&e.length>0&&s.set(a.id,{apmStatus:null==(n=a.autopilot)?void 0:n.apmStatus,arcs:e})}return s}async missionAction(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.client.fetchJson("/v1/autopilot/mission-action",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:e,action:t,...n})})}async autonomy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=arguments.length>1?arguments[1]:void 0,n=new URLSearchParams({limit:String(e),...t?{loop:t}:{}});return this.client.fetchJson("/v1/autopilot/autonomy?".concat(n.toString()))}async arming(){return this.client.fetchJson("/v1/autopilot/arming")}constructor(e){this.client=e}}let l={task:{label:"작업 분해",tone:"bg-sky-500/15 text-sky-200 ring-sky-500/30"},"goal-loop":{label:"목표 루프",tone:"bg-violet-500/15 text-violet-200 ring-violet-500/30"},scheduler:{label:"스케줄러",tone:"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30"},"monitor-trigger":{label:"감시 트리거",tone:"bg-amber-500/15 text-amber-200 ring-amber-500/30"},hybrid:{label:"하이브리드",tone:"bg-fuchsia-500/15 text-fuchsia-200 ring-fuchsia-500/30"},fanout:{label:"병렬 팬아웃",tone:"bg-cyan-500/15 text-cyan-200 ring-cyan-500/30"},"single-shot":{label:"즉답",tone:"bg-muted text-muted-foreground ring-border"},"hitl-delegate":{label:"HITL 위임",tone:"bg-rose-500/15 text-rose-200 ring-rose-500/30"}}}},e=>{e.O(0,[4725,752,1041,7956,9828,8821,7358],()=>e(e.s=43240)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7081],{16759:(e,t,s)=>{"use strict";s.d(t,{C:()=>c,DaemonProvider:()=>d,Q:()=>u});var a=s(57865),r=s(20381),n=s(8905),l=s(33797),o=s(47956),i=s(62351);let c=(0,r.createContext)(null);function d(e){let{children:t}=e,s={baseUrl:"",token:"",provider:""},[d,u]=(0,r.useState)(s),[m,p]=(0,r.useState)(""),[f]=(0,r.useState)(()=>new o.ki(s));(0,r.useEffect)(()=>{let e=(0,n.Fp)();u(e),f.updateConfig(e),p((0,l.oD)()),(0,i.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[f]),(0,r.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,n.Fp)();f.updateConfig(t),u(t),(0,i.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&p(t=>t===e.newValue?t:((0,i.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[f]);let h=e=>{u(t=>{let s={...t,...e};return(0,n.Qc)(e),f.updateConfig(s),(0,i.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),s})},x=e=>{p(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,i.cY)("webterm.provider.daemon.session-set",{sessionId:e})},g=(0,r.useMemo)(()=>({config:d,setConfig:h,client:f,sessionId:m,setSessionId:x}),[d,f,m]);return(0,a.jsx)(c.Provider,{value:g,children:t})}function u(){let e=(0,r.useContext)(c);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},33797:(e,t,s)=>{"use strict";s.d(t,{Zr:()=>l,f6:()=>r,oD:()=>n});let a="elanous.daemon.sessionId";function r(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function n(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(a,e),e):localStorage.getItem(a)}();if(e)return e;let t=r();return localStorage.setItem(a,t),t}function l(){let e=r();return localStorage.setItem(a,e),e}},66209:(e,t,s)=>{Promise.resolve().then(s.bind(s,69928))},69928:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>k});var a=s(57865),r=s(92200);function n(e){return e.map(e=>({...(0,r.cj)(e,[]),taskId:e.taskId,...e.wishReply?{wishReply:{surface:e.wishReply.surface,address:null}}:{}}))}var l=s(20381),o=s(16759);function i(e){var t;for(let t of[e.sections.triage,e.sections.intake]){let e=null==t?void 0:t.data.title;if("string"==typeof e&&e.trim())return e.trim()}return(null==(t=e.apiTitle)?void 0:t.trim())||e.taskId}var c=s(39175);let d={green:"순항",yellow:"진행 중",red:"막힘",done:"완료"},u=["intake","triage","gates","relations","memory","workspace","run","landing","release"];function m(e){return null==e?"—":"string"==typeof e?e:JSON.stringify(e)}function p(e){let{entry:t}=e;return(0,a.jsxs)("details",{className:"mt-2 text-xs",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:"JSON"}),(0,a.jsx)("pre",{className:"mt-2 max-h-64 overflow-auto rounded-lg bg-muted p-2 text-xs whitespace-pre-wrap break-all",children:JSON.stringify(t.data,null,2)})]})}function f(e){let{entry:t}=e,s=new Date(t.ts).toISOString();return(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,a.jsxs)("span",{children:["Owner: ",t.owner]}),(0,a.jsx)("time",{dateTime:s,children:s})]})}function h(e){var t,s,r;let{card:n,placements:o,onClose:c,publicCapture:h=!1}=e,[x,g]=(0,l.useState)(""),[b,y]=(0,l.useState)(!1),[w,k]=(0,l.useState)(null),v=async e=>{if(e.preventDefault(),!(!c||!x.trim()||/[\r\n]/.test(x))&&!b){y(!0),k(null);try{await c(x.trim())}catch(e){k(e instanceof Error?e.message:String(e))}finally{y(!1)}}},j=null==(t=n.sections.gates)?void 0:t.data;return(0,a.jsxs)("section",{"aria-label":"Task card detail",className:"min-w-0 space-y-4 rounded-2xl border border-border bg-card p-4",children:[(0,a.jsxs)("header",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:i(n)}),(0,a.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:n.taskId}),"closed"===n.status?(0,a.jsxs)("p",{role:"status",children:["닫힘 \xb7 ",null!=(s=n.closedReason)?s:"사유 없음"]}):!h&&c?(0,a.jsxs)("form",{onSubmit:v,className:"mt-3 flex flex-wrap items-end gap-2",children:[(0,a.jsxs)("label",{className:"text-sm",children:["닫기 사유 (한 줄)",(0,a.jsx)("input",{type:"text",required:!0,value:x,onChange:e=>g(e.target.value),className:"block rounded-md border border-border bg-background px-2 py-1"})]}),(0,a.jsx)("button",{type:"submit",disabled:b||!x.trim()||/[\r\n]/.test(x),className:"rounded-md border border-border px-3 py-1 text-sm",children:b?"닫는 중…":"닫기"}),w&&(0,a.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:w})]}):null]}),void 0!==n.wishReply&&(0,a.jsxs)("section",{"aria-label":"Wish reply destination",className:"rounded-xl border border-border p-3 text-sm",children:[(0,a.jsx)("h3",{className:"mb-1 font-semibold",children:"어디로 회신하나"}),(0,a.jsx)("p",{className:"break-all",children:n.wishReply?"".concat(null!=(r=({telegram:"텔레그램 대화",pwa:"PWA",tui:"TUI",linear:"Linear"})[n.wishReply.surface])?r:n.wishReply.surface).concat(n.wishReply.address?" \xb7 ".concat(n.wishReply.address):""):"회신 주소 없음"})]}),void 0!==n.wishReply&&(0,a.jsxs)("section",{"aria-label":"Wish reply history",className:"rounded-xl border border-border p-3 text-sm",children:[(0,a.jsx)("h3",{className:"mb-1 font-semibold",children:"회신 이력"}),(0,a.jsx)("p",{className:"text-muted-foreground",children:"카드 원장에는 회신 발송 이력이 기록되지 않습니다"})]}),o&&(0,a.jsxs)("p",{className:"overflow-x-auto whitespace-nowrap text-sm","aria-label":"Wish placement and progress",children:["배치 \xb7 ",o.length?o.map(e=>{let{cellId:t,cellTitle:s,version:a,status:r}=e;return"".concat(t," ").concat(s," \xb7 ").concat(a,"판 \xb7 ").concat(d[r])}).join(" / "):"아직 배치되지 않음"]}),j&&(0,a.jsxs)("p",{className:"overflow-x-auto whitespace-nowrap text-sm","aria-label":"Gate decisions",children:["Gate \xb7 budget: ",m(j.budget)," \xb7 location: ",m(j.location)]}),u.map(e=>{let t=n.sections[e];return t?(0,a.jsxs)("section",{"aria-label":"".concat(e," section"),className:"rounded-xl border border-border p-3",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-semibold capitalize",children:e}),(0,a.jsx)(f,{entry:t}),(0,a.jsx)(p,{entry:t})]},e):null}),(0,a.jsxs)("section",{"aria-label":"Incidents",className:"space-y-2",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold",children:["Incidents (",n.incidents.length,")"]}),n.incidents.length?(0,a.jsx)("ol",{className:"space-y-2",children:n.incidents.map(e=>(0,a.jsxs)("li",{className:"rounded-xl border border-border p-3",children:[(0,a.jsx)(f,{entry:e}),(0,a.jsx)(p,{entry:e})]},e.key))}):(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"No incidents."})]})]})}let x=["steward","execution","landing","release","done"],g=new Set(["intake","triage","gates","relations","memory","workspace","run","landing","release","incidents"]);function b(e){let t=[],s=Date.parse(e.createdAt),a=e.sections.find(e=>"intake:reply:0"===e.key),r=null;if(a)try{let e=JSON.parse(a.content);if(e&&"object"==typeof e&&!Array.isArray(e)){let{surface:t,address:s}=e;"string"==typeof t&&("string"==typeof s||null===s)&&(r={surface:t,address:s})}}catch(e){}for(let a of e.sections){let r;if(!g.has(a.key))continue;try{let e=JSON.parse(a.content);r=e&&"object"==typeof e&&!Array.isArray(e)?e:{content:a.content}}catch(e){r={content:a.content}}let n=Date.parse(a.createdAt);t.push({taskId:e.id,section:a.key,key:"".concat(a.key,":").concat(a.createdAt,":").concat(t.length),owner:a.owner,ts:Number.isFinite(n)?n:s,data:r,..."string"==typeof r.runId?{runId:r.runId}:{}})}if(0===t.length&&t.push({taskId:e.id,section:"triage",key:"api:title",owner:"task-card API",ts:s,data:{title:e.title}}),"closed"===e.status){let a=t.filter(e=>"release"===e.section).sort((e,t)=>t.ts-e.ts)[0];t.push({taskId:e.id,section:"release",key:"api:closed",owner:"task-card API",ts:Math.max(s,...t.map(e=>e.ts)),data:{...null==a?void 0:a.data,status:"done"}})}return{...function(e){let t,s=e[0];if(!s)return null;let a={},r=[],n=new Set,l=s.ts,o=-1/0;for(let i of e)if(!(i.taskId!==s.taskId||n.has(i.key)))if(n.add(i.key),l=Math.max(l,i.ts),i.runId&&i.ts>=o&&(t=i.runId,o=i.ts),"incidents"===i.section)r.push(i);else{let e=a[i.section];(!e||i.ts>=e.ts)&&(a[i.section]=i)}return{taskId:s.taskId,sections:a,incidents:r,updatedAt:l,...t?{runId:t}:{}}}(t),apiTitle:e.title,status:e.status,...void 0===e.closedReason?{}:{closedReason:e.closedReason},...e.goalId.startsWith("wish:")?{wishReply:r}:{}}}function y(e){let{cards:t,selectedId:s,onSelect:r,selectedCard:n,detailError:l,placements:o,onCloseCard:c,publicCapture:d}=e,u=(null==n?void 0:n.taskId)===s?n:null;return(0,a.jsxs)("div",{className:"space-y-4 p-4",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"보드"}),(0,a.jsx)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:x.map(e=>(0,a.jsxs)("section",{"aria-label":"".concat(e," column"),className:"min-w-0 space-y-2 rounded-xl border border-border p-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold capitalize",children:e}),t.filter(t=>(function(e){var t;let s=null==(t=e.sections.release)?void 0:t.data;return(null==s?void 0:s.status)==="done"||(null==s?void 0:s.status)==="completed"?"done":s?"release":e.sections.landing?"landing":e.sections.run||e.sections.workspace||e.sections.gates||e.sections.relations||e.sections.memory?"execution":"steward"})(t)===e).map(e=>{var t,n;return(0,a.jsxs)("button",{type:"button",onClick:()=>r(e.taskId),"aria-pressed":s===e.taskId,className:"w-full rounded-lg border border-border bg-card p-3 text-left text-sm hover:bg-accent/40",children:[(0,a.jsx)("span",{className:"block font-medium",children:i(e)}),(0,a.jsx)("span",{className:"block text-xs text-muted-foreground",children:(0,a.jsx)("time",{dateTime:new Date(e.updatedAt).toISOString(),title:new Date(e.updatedAt).toLocaleString(),children:(t=function(e){let t=new Map;for(let a of e.incidents){var s;let e=null!=(s=a.data.incidentId)?s:a.data.id,r="string"==typeof e&&e.trim()?e:a.key,n=t.get(r);(!n||a.ts>=n.ts)&&t.set(r,a)}return Array.from(t.values()).filter(e=>"closed"!==e.data.status&&"resolved"!==e.data.status).length}(e),n=Date.now(),[...t>0?["사고 ".concat(t)]:[],...e.runId?["런 ".concat(e.runId.replace(/^run-/,"").slice(0,8))]:[],function(e,t,s){let a=Math.floor((t-e)/6e4);if(!Number.isFinite(a)||a<1)return"방금";if(a<60)return"".concat(a,"분 전");if(a<1440)return"".concat(Math.floor(a/60),"시간 전");let r=new Intl.DateTimeFormat("ko-KR",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,...s?{timeZone:s}:{}}).formatToParts(new Date(e)),n=e=>{var t,s;return null!=(s=null==(t=r.find(t=>t.type===e))?void 0:t.value)?s:""};return"".concat(n("month"),"/").concat(n("day")," ").concat(n("hour"),":").concat(n("minute"))}(e.updatedAt,n,void 0)]).join(" \xb7 ")})})]},e.taskId)})]},e))}),s&&(0,a.jsxs)("aside",{className:"max-w-3xl space-y-2","aria-label":"Selected card",children:[(0,a.jsx)("button",{type:"button",onClick:()=>r(null),"aria-label":"Close card detail",className:"text-sm text-muted-foreground",children:"Close"}),u?(0,a.jsx)(h,{card:u,placements:o,onClose:c,publicCapture:d}):(0,a.jsx)("p",{role:"status",children:null!=l?l:"Loading card detail…"})]})]})}function w(){let{config:e}=(0,o.Q)(),t=(0,l.useMemo)(()=>e.baseUrl?(0,c.xX)({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}):null,[e.baseUrl,e.token]),[s,i]=(0,l.useState)([]),[d,u]=(0,l.useState)(null),[m,p]=(0,l.useState)(null),[f,h]=(0,l.useState)(void 0),[x,g]=(0,l.useState)(null),[w,k]=(0,l.useState)(null),[v,j]=(0,l.useState)(!1);(0,l.useEffect)(()=>{"public"===new URLSearchParams(window.location.search).get("capture")&&j(!0)},[]);let N=(0,l.useMemo)(()=>v?n(s):s,[s,v]),I=v&&m?n([m])[0]:m,S=v&&f?(0,r.cj)(f,[]):f;(0,l.useEffect)(()=>{let e=!1;if(i([]),u(null),p(null),h(void 0),g(null),!t)return void k("Connect to NEXUS to load task cards.");k(null);let s=()=>t.getTaskCards().then(t=>{let{cards:s}=t;e||(i(s.map(b)),k(null))}).catch(t=>{e||k(t instanceof c.Iu&&404===t.status?"Task cards are not available yet (pre-E1).":t instanceof Error?t.message:String(t))});s();let a=setInterval(()=>{s()},1e4);return()=>{e=!0,clearInterval(a)}},[t]),(0,l.useEffect)(()=>{if(!t||!d)return;let e=!1;return p(null),h(void 0),g(null),t.getTaskCard(d).then(t=>{let{card:s,placements:a}=t;e||(h(a),p(b(s)))}).catch(t=>{e||g(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[t,d]);let C=async e=>{if(!t||!d||v)throw Error("Card close unavailable");let{card:s}=await t.closeTaskCard(d,e);p(e=>(null==e?void 0:e.taskId)===d?b(s):e),i(e=>e.map(e=>e.taskId===s.id?b(s):e))};return(0,a.jsxs)(a.Fragment,{children:[w&&(0,a.jsx)("p",{role:"status",className:"p-4 text-sm text-muted-foreground",children:w}),(0,a.jsx)(y,{cards:N,selectedId:d,selectedCard:I,detailError:x,placements:S,onSelect:e=>{(null===e||d!==e)&&(p(null),h(void 0),g(null),u(e))},onCloseCard:C,publicCapture:v})]})}function k(){return(0,a.jsx)(w,{})}},92200:(e,t,s)=>{"use strict";s.d(t,{Er:()=>r,cj:()=>c,dc:()=>l,yR:()=>i});let a=/^(oauth\.|harness\.decision|llm\.router)/;function r(e){let t=[],s=e=>{"string"==typeof e&&e.trim()&&!t.includes(e.trim())&&t.push(e.trim())};for(let t of e){var r;let e=null!=(r=t.data)?r:{};if(t.category.startsWith("oauth.")){for(let t of["from","to","name","account"])s(e[t]);if(Array.isArray(e.usage))for(let t of e.usage)s(null==t?void 0:t.name);continue}if(a.test(t.category))for(let t of(s(e.account),["what","why","reason"])){let a=e[t];if("string"==typeof a)for(let e of a.matchAll(/계정\s+([A-Za-z0-9][\w.-]*)/g))s(e[1])}}return t}function n(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(e){let t=new Map(e.map((e,t)=>[e,"account-".concat(t+1)])),s=e.length?RegExp("(^|[^\\w-])(".concat(e.map(n).sort((e,t)=>t.length-e.length).join("|"),")(?![\\w-])"),"g"):null,a=new Map;return(e,r)=>{let n=e.replace(/\b[a-z0-9-]+\.tail[0-9a-f]+\.ts\.net\b/gi,"tailnet-host").replace(/\bmsb\d+\b/gi,e=>(e=>{let t=e.toLowerCase();a.has(t)||a.set(t,"remote-".concat(a.size+1));let s=a.get(t);return e===e.toUpperCase()?s.toUpperCase():s})(e)).replace(/\bmbp\b/gi,e=>e===e.toUpperCase()?"LOCAL":"local").replace(/\/Users\/[^/\s"']+/g,"~").replace(/(크레딧|credits?|💳)(\s*[:=]?\s*)[\d][\d,.]*/gi,"$1$2•••").replace(/[\d][\d,.]*(\s*)(크레딧|credits?)/gi,"•••$1$2").replace(/\$\s?[\d][\d,.]*/g,"$•••").replace(/(잔량?|remaining|left)(\s*[:=]?\s*)(?:[A-Za-z0-9][\w.-]*\s+)?\d+(?:\.\d+)?\s?%/gi,"$1$2•••");return r&&s&&(n=n.replace(s,(e,s,a)=>{var r;return"".concat(s).concat(null!=(r=t.get(a))?r:"account")})),n}}function o(e,t){if("string"==typeof e)return t(e);if(Array.isArray(e))return e.map(e=>o(e,t));if(e&&"object"==typeof e){let s={};for(let[a,r]of Object.entries(e))"apiEquivalentUsd"===a||"usd"===a||/credit(s|Balance)?$/i.test(a)||(s[a]=o(r,t));return s}return e}function i(e){let t=l(r(e));return e.map(e=>{let s=a.test(e.category);return{...e,event:t(e.event,!1),data:e.data?o(e.data,e=>t(e,s)):e.data}})}function c(e,t){let s=l(t);return o(e,e=>s(e,!0))}}},e=>{e.O(0,[7956,9175,9828,8821,7358],()=>e(e.s=66209)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7955],{42497:(e,t,s)=>{Promise.resolve().then(s.bind(s,89258))},89258:(e,t,s)=>{"use strict";s.d(t,{BotlabPageContent:()=>h});var r,l=s(57865),a=s(20381);let o=(null!=(r=s(38598).env.NEXT_PUBLIC_ELANOUS_BOTLAB_HOST)?r:"").trim(),n="elanous.botlab.wallHost",d=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;function i(e){return e.length>0&&e.length<=253&&d.test(e)}function c(e){var t;let{search:s,remembered:r=null}=e,d=(0,a.useMemo)(()=>(function(e){var t,s;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=null;try{l=new URLSearchParams(e).get("host")}catch(e){l=null}let a=null!=(t=null==l?void 0:l.trim())?t:"";if(""!==a&&i(a))return{host:a,source:"query",rejected:null};let n=""===a?null:a,d=null!=(s=null==r?void 0:r.trim())?s:"";return""!==d&&i(d)?{host:d,source:"remembered",rejected:n}:""!==o&&i(o)?{host:o,source:"default",rejected:n}:{host:"",source:"unset",rejected:n}})(s,r),[s,r]),c="unset"===d.source?null:(t=d.host,"https://".concat(t).concat("/bot3/bot-wall.html"));return(0,a.useEffect)(()=>{if("query"===d.source)try{window.localStorage.setItem(n,d.host)}catch(e){}},[d.source,d.host]),(0,l.jsxs)("main",{className:"mx-auto flex w-full max-w-6xl flex-col gap-6 px-6 py-10 sm:px-10","data-testid":"botlab-panel",children:[(0,l.jsxs)("header",{children:[(0,l.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Bot screens"}),(0,l.jsx)("h1",{className:"mt-2 text-3xl font-bold",children:"Botlab"}),(0,l.jsxs)("p",{className:"mt-2 max-w-3xl text-sm text-muted-foreground",children:["Live noVNC screens for the bots, served through Tailscale. One document holds all four sessions, so the VNC password is asked ",(0,l.jsx)("strong",{children:"once"}),", not four times."]}),(0,l.jsx)("p",{className:"mt-2 max-w-3xl text-sm text-muted-foreground",children:"View-only by default. This surface cannot send commands or control the bots."})]}),(0,l.jsxs)("section",{className:"rounded-xl border border-border bg-card p-4","aria-label":"Wall address",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold",children:"Wall address"}),(0,l.jsx)("p",{className:"mt-1 break-all font-mono text-xs text-muted-foreground","data-testid":"botlab-wall-url",children:null!=c?c:"(no host configured)"}),(0,l.jsx)("p",{className:"mt-2 text-xs text-muted-foreground","data-testid":"botlab-host-source",children:"query"===d.source?"Host came from the ?host= query parameter (remembered on this device).":"remembered"===d.source?"Host is the one remembered on this device; override it with ?host=<tailnet-name>.":"default"===d.source?"Host is the build default (NEXT_PUBLIC_ELANOUS_BOTLAB_HOST); override it with ?host=<tailnet-name>.":"No wall host is configured. Open this page once with ?host=<the VM tailnet name> — it is remembered on this device."}),null!==d.rejected&&(0,l.jsxs)("p",{role:"alert",className:"mt-2 text-xs text-destructive","data-testid":"botlab-host-rejected",children:["Ignored ?host=",d.rejected," — not a valid hostname."]}),null!==c&&(0,l.jsxs)("p",{className:"mt-3 text-xs text-muted-foreground",children:[(0,l.jsx)("a",{className:"underline",href:c,target:"_blank",rel:"noreferrer","data-testid":"botlab-open-tab",children:"Open the wall in a new tab"})," — ","use this if the embedded frame stays blank."]})]}),null!==c&&(0,l.jsx)("section",{"aria-label":"Bot screen wall",children:(0,l.jsx)("iframe",{src:c,title:"Bot screen wall","data-testid":"botlab-wall-frame",className:"h-[70vh] w-full rounded-xl border border-border bg-background"})}),(0,l.jsxs)("section",{className:"rounded-xl border border-border bg-card p-5","aria-label":"If the wall is blank",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold",children:"If the wall stays blank"}),(0,l.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"A blank frame is not necessarily a broken bot. There are three separate reasons, with different fixes:"}),(0,l.jsxs)("ol",{className:"mt-3 list-decimal space-y-2 pl-5 text-sm text-muted-foreground",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"This device is outside the tailnet."})," The address simply does not exist here. Join the tailnet, or view the screens from a device that is on it."]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"Tailscale serve is not published."})," Re-run"," ",(0,l.jsx)("code",{className:"font-mono text-xs",children:"bash scripts/botlab/deploy-bot-wall.sh"}),", which re-publishes the paths and then verifies each one returns 200."]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("strong",{children:"The wall loaded but did not connect."})," That is a VNC-level failure, not a page failure — the wall itself reports connected/failed counts once you enter the password."]})]}),(0,l.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"The VNC password is deliberately not carried in this page or in the URL: any page a bot browser opens could otherwise reach the local websocket, and websockets have no CORS."})]}),(0,l.jsxs)("section",{className:"rounded-xl border border-dashed border-border p-5","aria-label":"Not wired yet",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold",children:"Not wired yet"}),(0,l.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-muted-foreground",children:[(0,l.jsxs)("li",{children:["Per-bot cell headers (name \xb7 last round verdict \xb7 whether CDP is alive) need"," ",(0,l.jsx)("code",{className:"font-mono text-xs",children:"browserPort"})," and round results on the daemon's persona route. That route is owned by another track and is not published today."]}),(0,l.jsx)("li",{children:"Running a command from this surface needs a POST route that does not exist yet."})]})]})]})}function h(){let e=window.location.search,t=null;try{t=window.localStorage.getItem(n)}catch(e){t=null}return(0,l.jsx)(c,{search:e,remembered:t})}}},e=>{e.O(0,[9828,8821,7358],()=>e(e.s=42497)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2885],{7333:(e,t,n)=>{"use strict";n.d(t,{BotsPageContent:()=>D});var r=n(57865),l=n(20381),s=n(16759),a=n(79248);function o(e){if(null==e)return null;let t=e.replace(/[,%\s]/g,"").replace(/\*/g,"").trim();if(""===t||"-"===t||"N/A"===t)return null;let n=Number(t);return Number.isFinite(n)?n:null}let i=e=>"string"==typeof e&&""!==e?e:null,d=e=>"number"==typeof e&&Number.isFinite(e)?e:null,u=e=>"boolean"==typeof e?e:null;function c(e){var t,n,r,l,s;let a=[],c=[];for(let t of null!=(n=e.artifacts)?n:[]){let e=null!=(r=i(null==t?void 0:t.name))?r:"(이름 없음)",n=i(null==t?void 0:t.text);if(null===n){c.push(e);continue}a.push(function(e,t){var n;let r=function(e){let t=e.split("\n").filter(e=>""!==e.trim()&&!e.includes("━")),n=t.slice(0,3).join(" / ").slice(0,160),r=t.slice(0,3).join("\n");return/^Traceback \(most recent call last\):/m.test(r)?{kindOf:"파이썬 예외(Traceback)",head:n}:/^⛔\s*.*(실패|failed|error)/mi.test(r)?{kindOf:"스킬이 \xab실패\xbb라고 말했다",head:n}:/^(Error|error):/m.test(r)?{kindOf:"오류",head:n}:/^\s*command not found|No such file or directory/m.test(r)?{kindOf:"명령\xb7파일이 \xab없다\xbb",head:n}:null}(t);if(null!==r)return{kind:"failure",name:e,kindOf:r.kindOf,head:r.head};let l=function(e){var t,n,r,l;let s=null!=(l=null!=(r=null==(t=/^대상:\s*(\S+)/m.exec(e))?void 0:t[1])?r:null==(n=/^##\s+(\S+)\s+Real-Time Quote/m.exec(e))?void 0:n[1])?l:null;if(null===s)return null;let a=t=>{var n,r;return null!=(r=null==(n=RegExp("\\*\\*".concat(t,":\\*\\*\\s*([-+0-9.,]+)"),"i").exec(e))?void 0:n[1])?r:null},i=/\*\*Change:\*\*\s*([-+0-9.,]+)\s*\(([-+0-9.]+)%\)/i.exec(e),d={symbol:s,close:o(a("Close")),change:i?o(i[1]):o(a("Change")),changePct:i?o(i[2]):null,open:o(a("Open")),high:o(a("High")),low:o(a("Low")),volume:o(a("Volume")),prevClose:o(a("Prev Close"))};return[d.close,d.change,d.open,d.high,d.low,d.volume,d.prevClose].some(e=>null!==e)?d:null}(t);if(null!==l)return{kind:"quote",name:e,quote:l};let s=null!=(n=function(e){var t,n,r,l,s,a,i,d;let u=e.split("\n"),c=u.findIndex(e=>e.includes("|")&&e.includes("외국인")&&e.includes("기관")&&e.includes("개인"));if(c<0)return null;let m=e=>e.split("|").map(e=>e.trim()).filter((e,t,n)=>""!==e||0!==t&&t!==n.length-1),x=m(u[c]),f=e=>x.findIndex(t=>t.includes(e)),[h,g,p,b]=[0,f("외국인"),f("기관"),f("개인")];if(g<0||p<0||b<0)return null;let j=[];for(let e=c+1;e<u.length;e+=1){let t=u[e];if(!t.includes("|")){if(j.length>0)break;continue}if(/^\s*\|?[\s:|-]+\|?\s*$/.test(t))continue;let n=m(t);if(n.length<=Math.max(g,p,b))continue;let r=(null!=(l=n[h])?l:"").trim();""!==r&&j.push({key:r,foreign:o(n[g]),institution:o(n[p]),individual:o(n[b])})}if(0===j.length)return null;let y="";for(let e=c;e>=0;e-=1){let t=/^#{2,3}\s+(.+)$/.exec((null!=(s=u[e])?s:"").trim());if(t){y=t[1];break}}return""===y&&(y=null!=(a=null==(t=u.find(e=>""!==e.trim()&&!e.includes("━")))?void 0:t.trim())?a:"(제목 없음)"),{title:y,unit:null!=(d=null==(n=/\((백만|천|억)\)/.exec(x.join(" ")))?void 0:n[1])?d:null!=(i=null==(r=/\(([^)]*원[^)]*)\)/.exec(x.join(" ")))?void 0:r[1])?i:null,rows:j}}(t))?n:function(e){let t,n=e.trimStart();if(!n.startsWith("{"))return null;try{t=JSON.parse(n)}catch(e){return null}let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(let t of n){let n=e[t];if("number"==typeof n&&Number.isFinite(n))return n}return null},l=[],s=t.periods;if("object"==typeof s&&null!==s&&!Array.isArray(s))for(let[e,t]of Object.entries(s))"object"==typeof t&&null!==t&&l.push({key:e,foreign:r(t,"frgn_net_shares","frgn_net_amount_million"),institution:r(t,"inst_net_shares","inst_net_amount_million"),individual:r(t,"prsn_net_shares","prsn_net_amount_million")});if(0===l.length&&Array.isArray(t.rows))for(let e of t.rows){if("object"!=typeof e||null===e)continue;let t="string"==typeof e.date?e.date:null;null!==t&&l.push({key:t,foreign:r(e,"frgn_net_shares","frgn_net_amount_million"),institution:r(e,"inst_net_shares","inst_net_amount_million"),individual:r(e,"prsn_net_shares","prsn_net_amount_million")})}if(0===l.length)return null;let a="string"==typeof t.ticker?t.ticker:null,o="string"==typeof t.name&&t.name!==a?t.name:null;return{title:null!==o&&null!==a?"".concat(o,"(").concat(a,") 투자자 수급"):null!==a?"".concat(a," 투자자 수급"):"투자자 수급",unit:"주",rows:l}}(t);if(null!==s)return{kind:"flow",name:e,flow:s};let a=function(e){let t,n=e.split("\n"),r=n.findIndex(e=>"---BEGIN_OMNI_CRAWL_JSON---"===e);if(r<0)return{news:null,why:null,fenced:!1};let l=n.findIndex((e,t)=>t>r&&"---END_OMNI_CRAWL_JSON---"===e);if(l<0)return{news:null,why:"Omni crawl JSON 끝 울타리를 \xab못 찾았다\xbb",fenced:!0};try{t=JSON.parse(n.slice(r+1,l).join("\n"))}catch(e){return{news:null,why:"Omni crawl 울타리 안 JSON을 \xab못 읽었다\xbb",fenced:!0}}if("object"!=typeof t||null===t||Array.isArray(t))return{news:null,why:"Omni crawl JSON 최상위가 객체가 아니다",fenced:!0};let s=t;if(!Array.isArray(s.results))return{news:null,why:"Omni crawl JSON에 results 배열이 없다",fenced:!0};let a=[];for(let e of s.results){if("object"!=typeof e||null===e||Array.isArray(e))continue;let t=e.items;if(Array.isArray(t))for(let e of t)"object"!=typeof e||null===e||Array.isArray(e)||a.push({title:"string"==typeof e.title?e.title:null,url:"string"==typeof e.url?e.url:null,date:"string"==typeof e.date?e.date:null})}return{news:{query:"string"==typeof s.query?s.query:null,items:a},why:null,fenced:!0}}(t);if(null!==a.news)return{kind:"news",name:e,news:a.news};let i=t.split("\n").filter(e=>""!==e.trim()&&!e.includes("━")).slice(0,2).join(" / ").slice(0,120);if(a.fenced)return{kind:"unparsed",name:e,why:a.why,head:i};let d=function(e){let t=e.split("\n").filter(e=>""!==e.trim()&&!e.includes("━"));if(t.length<2)return null;let n=[];for(let e of t.slice(1)){let t=/^\s{1,}(\S[^:]*?)\s+:\s+(.+?)\s*$/.exec(e);if(null===t)continue;let r=t[1].trim(),l=t[2].trim();""===r||""===l||r.includes("//")||n.push({label:r,value:l,num:o(l)})}return 0===n.length?null:{title:t[0].trim(),entries:n}}(t);return null!==d?{kind:"keyed",name:e,keyed:d}:{kind:"unparsed",name:e,why:"아는 꼴이 \xab아니다\xbb(시세\xb7수급표\xb7뉴스\xb7라벨:값 넷 다 아님)",head:i}}(e,n))}return{personaId:null!=(l=i(e.personaId))?l:"unknown",runId:i(e.runId),atUtc:i(e.atUtc),ok:u(e.ok),steps:d(e.steps),failed:d(e.failed),source:null!=(s=i(e.source))?s:"unknown",delivered:u(null==(t=e.delivery)?void 0:t.sent),artifacts:a,textless:c}}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===e)return"—";let n=Math.abs(e)>=1e3?e.toLocaleString("en-US"):String(e);return!0===t.sign&&e>0?"+".concat(n):n}async function x(e,t,n){try{var r,l,s=await e.fetchJson("/v1/bots/rounds?persona=".concat(encodeURIComponent(t),"&limit=").concat(n));if("object"!=typeof s||null===s)return{kind:"error",reason:"라우트 응답을 \xab못 읽었다\xbb(객체가 아니다)"};if(!Array.isArray(s.rounds))return{kind:"error",reason:"`rounds` 가 \xab배열이 아니다\xbb — 「0건」과 \xab다른 값\xbb이다"};let a=s.unreadableBy,o=void 0===a?null:Object.entries(a).filter(e=>{let[t]=e;return"result-missing"!==t}).reduce((e,t)=>{var n;let[,r]=t;return e+(null!=(n=d(r))?n:0)},0);return{kind:"ready",rounds:s.rounds.map(c),unreadable:null!=(r=d(s.unreadable))?r:0,unreadableNow:null!=o?o:null!=(l=d(s.unreadable))?l:0}}catch(e){return{kind:"error",reason:e instanceof Error&&e.message?e.message:String(e)}}}function f(e){let{a:t}=e,n=t.quote,l=null!==n.changePct&&n.changePct>0,s=null!==n.changePct&&n.changePct<0;return(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-background/60 p-3","data-testid":"quote-".concat(n.symbol),children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-3",children:[(0,r.jsx)("h4",{className:"font-mono text-sm font-semibold",children:n.symbol}),(0,r.jsx)("span",{className:"text-lg font-bold tabular-nums",children:m(n.close)}),(0,r.jsxs)("span",{className:"text-sm font-semibold tabular-nums ".concat(l?"text-emerald-600":s?"text-rose-600":"text-muted-foreground"),children:[m(n.change,{sign:!0}),null!==n.changePct&&" (".concat(m(n.changePct,{sign:!0}),"%)")]})]}),(0,r.jsx)("dl",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 text-xs text-muted-foreground sm:grid-cols-4",children:[["시가",n.open],["고가",n.high],["저가",n.low],["전일",n.prevClose]].map(e=>{let[t,n]=e;return(0,r.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,r.jsx)("dt",{children:t}),(0,r.jsx)("dd",{className:"tabular-nums text-foreground",children:m(n)})]},t)})})]})}function h(e){let{a:t}=e,n=t.flow;return(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-background/60 p-3","data-testid":"flow-block",children:[(0,r.jsx)("h4",{className:"text-sm font-semibold",children:n.title}),null!==n.unit&&(0,r.jsxs)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["단위: ",n.unit]}),(0,r.jsx)("div",{className:"mt-2 overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[22rem] text-xs",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"text-muted-foreground",children:[(0,r.jsx)("th",{className:"py-1 text-left font-medium",children:"기간"}),["외국인","기관","개인"].map(e=>(0,r.jsx)("th",{className:"py-1 text-right font-medium",children:e},e))]})}),(0,r.jsx)("tbody",{children:n.rows.slice(0,6).map(e=>(0,r.jsxs)("tr",{className:"border-t border-border/60",children:[(0,r.jsx)("td",{className:"py-1 font-mono",children:e.key}),[e.foreign,e.institution,e.individual].map((e,t)=>(0,r.jsx)("td",{className:"py-1 text-right tabular-nums ".concat(null===e?"text-muted-foreground":e>0?"text-emerald-600":e<0?"text-rose-600":""),children:m(e,{sign:!0})},t))]},e.key))})]})}),n.rows.length>6&&(0,r.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["…",n.rows.length-6,"줄 더 (전체는 회차 원본에)"]})]})}function g(e){let{a:t}=e,n=t.keyed;return(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-background/60 p-3","data-testid":"keyed-block",children:[(0,r.jsx)("h4",{className:"text-sm font-semibold",children:n.title}),(0,r.jsx)("dl",{className:"mt-2 grid gap-1 sm:grid-cols-2",children:n.entries.map(e=>(0,r.jsxs)("div",{className:"flex items-baseline justify-between gap-3 text-sm",children:[(0,r.jsx)("dt",{className:"text-muted-foreground",children:e.label}),(0,r.jsx)("dd",{className:"font-semibold tabular-nums",children:e.value})]},e.label))})]})}function p(e){let{a:t}=e;return(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-background/60 p-3","data-testid":"news-block",children:[(0,r.jsx)("h4",{className:"text-sm font-semibold",children:null===t.news.query?"뉴스":"뉴스: ".concat(t.news.query)}),0===t.news.items.length?(0,r.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"수집된 기사가 0건이다."}):(0,r.jsx)("ul",{className:"mt-2 space-y-2",children:t.news.items.map((e,t)=>{var n,l,s,a;return(0,r.jsxs)("li",{className:"text-sm",children:[null===e.url?null!=(n=e.title)?n:"(제목 없음)":(0,r.jsx)("a",{className:"font-medium underline underline-offset-2",href:e.url,children:null!=(l=e.title)?l:e.url}),null!==e.date&&(0,r.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:e.date})]},"".concat(null!=(a=null!=(s=e.url)?s:e.title)?a:"article","-").concat(t))})})]})}function b(e){let{a:t}=e;return(0,r.jsxs)("div",{className:"rounded-lg border border-rose-500/40 bg-rose-500/5 p-3","data-testid":"failure-block",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[(0,r.jsx)("h4",{className:"font-mono text-sm font-semibold",children:t.name}),(0,r.jsx)("span",{className:"rounded bg-rose-500/15 px-2 py-0.5 text-xs font-medium text-rose-700",children:"이 단계가 \xab실패\xbb했다"})]}),(0,r.jsx)("p",{className:"mt-1 text-xs text-rose-700",children:t.kindOf}),(0,r.jsx)("p",{className:"mt-1 break-words font-mono text-xs text-muted-foreground",children:t.head})]})}function j(e){let{a:t}=e;return(0,r.jsxs)("div",{className:"rounded-lg border border-dashed border-border bg-background/40 p-3","data-testid":"unparsed-block",children:[(0,r.jsx)("h4",{className:"font-mono text-sm",children:t.name}),(0,r.jsxs)("p",{className:"mt-1 text-xs text-amber-600",children:["⚠️ 이 산출을 \xab못 읽었다\xbb — ",t.why]}),(0,r.jsx)("p",{className:"mt-1 truncate text-xs text-muted-foreground",children:t.head})]})}function y(e){var t;let{round:n}=e,l=null!==n.failed&&n.failed>0;return(0,r.jsxs)("article",{className:"rounded-xl border border-border bg-card p-5","data-testid":"round-".concat(null!=(t=n.runId)?t:"unknown"),children:[(0,r.jsxs)("header",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Asia/Seoul";if(null===e)return"시각 \xab모름\xbb";let n=new Date(e);if(Number.isNaN(n.getTime()))return"시각을 \xab못 읽었다\xbb(".concat(e.slice(0,24),")");let r=new Intl.DateTimeFormat("ko-KR",{timeZone:t,month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1});return"".concat(r.format(n)," KST")}(n.atUtc)}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(0,r.jsx)("span",{className:"rounded px-2 py-0.5 font-medium ".concat("cron"===n.source?"bg-emerald-500/15 text-emerald-700":"bg-muted text-muted-foreground"),children:"cron"===n.source?"무인(cron)":"manual"===n.source?"손":"출처 \xab모름\xbb"}),(0,r.jsxs)("span",{className:"rounded px-2 py-0.5 font-medium ".concat(l?"bg-rose-500/15 text-rose-700":"bg-muted text-muted-foreground"),children:[null===n.steps?"단계 \xab모름\xbb":"".concat(n.steps,"단계"),l&&" \xb7 실패 ".concat(n.failed)]}),(0,r.jsx)("span",{className:"rounded px-2 py-0.5 font-medium ".concat(!0===n.delivered?"bg-sky-500/15 text-sky-700":"bg-muted text-muted-foreground"),children:null===n.delivered?"배달 \xab모름\xbb":n.delivered?"폰에 갔다":"안 갔다"})]})]}),(0,r.jsxs)("div",{className:"mt-4 space-y-3",children:[n.artifacts.map((e,t)=>"quote"===e.kind?(0,r.jsx)(f,{a:e},t):"flow"===e.kind?(0,r.jsx)(h,{a:e},t):"news"===e.kind?(0,r.jsx)(p,{a:e},t):"keyed"===e.kind?(0,r.jsx)(g,{a:e},t):"failure"===e.kind?(0,r.jsx)(b,{a:e},t):(0,r.jsx)(j,{a:e},t)),0===n.artifacts.length&&0===n.textless.length&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"이 회차에 산출이 \xab없다\xbb."}),n.textless.length>0&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["본문을 \xab안 받은\xbb 산출 ",n.textless.length,"건: ",n.textless.join(" \xb7 ")]})]})]})}function N(e){let{client:t,persona:n,title:s,subtitle:a,limit:o=3}=e,[i,d]=(0,l.useState)({kind:"loading"});return(0,l.useEffect)(()=>{let e=!0;return d({kind:"loading"}),x(t,n,o).then(t=>{e&&d(t)}),()=>{e=!1}},[t,n,o]),(0,r.jsxs)("section",{className:"flex flex-col gap-4","aria-label":"".concat(n," rounds"),"data-testid":"rounds-".concat(n),children:[(0,r.jsxs)("header",{children:[(0,r.jsx)("h2",{className:"text-xl font-bold",children:s}),(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a})]}),"loading"===i.kind&&(0,r.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"투자 회차를 불러오는 중…"}),"error"===i.kind&&(0,r.jsxs)("div",{role:"alert",className:"rounded-lg border border-destructive/40 bg-destructive/5 p-3 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-destructive",children:"회차를 \xab못 받았다\xbb."}),(0,r.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:i.reason}),(0,r.jsxs)("p",{className:"mt-2 text-xs text-muted-foreground",children:["⚠️ 라우트 ",(0,r.jsx)("code",{className:"font-mono",children:"/v1/bots/rounds"})," 가 아직 \xab없을 수\xbb 있다(\uD83C\uDD63 축). 그때는 이 자리가 비는 것이 \xab맞다\xbb — 화면이 그것을 말하고 있다."]})]}),"ready"===i.kind&&0===i.rounds.length&&(0,r.jsxs)("p",{className:"text-sm text-muted-foreground",children:["회차가 \xab0건\xbb이다.",i.unreadable>0&&" (못 읽은 자리 ".concat(i.unreadable,"곳 — 「없다」가 아니다)")]}),"ready"===i.kind&&i.rounds.length>0&&(0,r.jsxs)(r.Fragment,{children:[i.unreadableNow>0?(0,r.jsxs)("p",{role:"alert",className:"text-xs text-amber-600",children:["⚠️ ***지금 못 읽는 자리 ",i.unreadableNow,"곳*** — 아래 수는 \xab과소\xbb다."]}):i.unreadable>0?(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["못 읽은 자리 ",i.unreadable,"곳(옛 회차) — 「지금 깨진 것」은 \xab없다\xbb."]}):null,(0,r.jsx)("div",{className:"flex flex-col gap-4",children:i.rounds.map(e=>{var t,n;return(0,r.jsx)(y,{round:e},null!=(n=null!=(t=e.runId)?t:e.atUtc)?n:Math.random())})})]})]})}function w(e){let{client:t,limit:n=3}=e;return(0,r.jsx)(N,{client:t,persona:"investor",limit:n,title:"\uD83D\uDCC8 투자 회차",subtitle:"봇이 \xab실제로 낸\xbb 산출이다. ⛔ 차트는 \xab일부러\xbb 안 그린다 — 글만 낸다."})}function v(e){let{client:t,limit:n=2}=e;return(0,r.jsx)(N,{client:t,persona:"assistant",limit:n,title:"\uD83D\uDDD3️ 비서 회차",subtitle:"안 읽은 메일\xb7앞으로의 일정. ⛔ 「0」도 \xab잰 값\xbb이라 그대로 보여 준다."})}function k(e){let{client:t,limit:n=2}=e;return(0,r.jsx)(N,{client:t,persona:"newsbot",limit:n,title:"\uD83D\uDCF0 뉴스 회차",subtitle:"⚠️ 이 봇의 산출은 꼴이 여럿이다 — 못 읽은 것은 \xab이름을 대고\xbb 남는다."})}async function _(e){try{let t=await e.fetchJson("/v1/bots/commands");return{kind:"ready",commands:t}}catch(e){return{kind:"error",reason:e instanceof Error&&e.message?e.message:"string"==typeof e&&e?e:"Unknown error"}}}function S(e){let{client:t}=e,n=(0,a.v)(t),[s,o]=(0,l.useState)({kind:"loading"});(0,l.useEffect)(()=>{let e=!0;return o({kind:"loading"}),_(t).then(t=>{e&&o(t)}),()=>{e=!1}},[t]);let i=n.error,d="error"===s.kind?s.reason:null,u=null!==i||null!==d,c=!u&&(n.loading||"loading"===s.kind),m="ready"===s.kind?s.commands:[],x=!c&&!u;return(0,r.jsxs)("main",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-6 py-10 sm:px-10","data-testid":"bots-panel",children:[(0,r.jsxs)("header",{children:[(0,r.jsx)("p",{className:"text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Bot directory"}),(0,r.jsx)("h1",{className:"mt-2 text-3xl font-bold",children:"Bots"}),(0,r.jsx)("p",{className:"mt-2 max-w-3xl text-sm text-muted-foreground",children:"Commands are global: every bot exposes the same catalog."}),(0,r.jsx)("p",{className:"mt-2 max-w-3xl text-sm text-muted-foreground",children:"This surface cannot send commands yet; it only shows what you can ask bots to do."})]}),c&&(0,r.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading bot identities and command catalog…"}),i&&(0,r.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Unable to load bot identities: ",i]}),d&&(0,r.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Unable to load bot catalog: ",d]}),x&&0===n.personas.length&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"No bots are configured."}),x&&n.personas.length>0&&0===m.length&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"No bot commands are available."}),(0,r.jsx)(w,{client:t}),(0,r.jsx)(v,{client:t}),(0,r.jsx)(k,{client:t}),x&&n.personas.length>0&&m.length>0&&(0,r.jsx)("section",{className:"grid gap-4 md:grid-cols-2","aria-label":"Bot identities",children:n.personas.map(e=>{var t;return(0,r.jsxs)("article",{className:"rounded-xl border border-border bg-card p-5","data-testid":"bot-card-".concat(e.personaId),children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:e.displayName}),(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:null!=(t=e.description)?t:"No description provided."}),(0,r.jsx)("h3",{className:"mt-5 text-sm font-semibold",children:"Available commands"}),(0,r.jsx)("ul",{className:"mt-3 space-y-3","aria-label":"Available bot commands",children:m.map(e=>(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-background/60 p-3",children:[(0,r.jsx)("h4",{className:"font-mono text-sm font-semibold",children:e.name}),(0,r.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e.description}),e.arguments.length>0?(0,r.jsx)("ul",{className:"mt-2 space-y-1","aria-label":"".concat(e.name," arguments"),children:e.arguments.map(e=>(0,r.jsxs)("li",{className:"text-xs text-muted-foreground",children:[(0,r.jsx)("code",{className:"font-semibold text-foreground",children:e.name}),e.required?" (required)":" (optional)"," — ",e.description]},e.name))}):(0,r.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:"No arguments."})]},e.name))})]},e.personaId)})})]})}function D(){let{client:e}=(0,s.Q)();return(0,r.jsx)(S,{client:e})}},16759:(e,t,n)=>{"use strict";n.d(t,{C:()=>d,DaemonProvider:()=>u,Q:()=>c});var r=n(57865),l=n(20381),s=n(8905),a=n(33797),o=n(47956),i=n(62351);let d=(0,l.createContext)(null);function u(e){let{children:t}=e,n={baseUrl:"",token:"",provider:""},[u,c]=(0,l.useState)(n),[m,x]=(0,l.useState)(""),[f]=(0,l.useState)(()=>new o.ki(n));(0,l.useEffect)(()=>{let e=(0,s.Fp)();c(e),f.updateConfig(e),x((0,a.oD)()),(0,i.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[f]),(0,l.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,s.Fp)();f.updateConfig(t),c(t),(0,i.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&x(t=>t===e.newValue?t:((0,i.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[f]);let h=e=>{c(t=>{let n={...t,...e};return(0,s.Qc)(e),f.updateConfig(n),(0,i.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),n})},g=e=>{x(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,i.cY)("webterm.provider.daemon.session-set",{sessionId:e})},p=(0,l.useMemo)(()=>({config:u,setConfig:h,client:f,sessionId:m,setSessionId:g}),[u,f,m]);return(0,r.jsx)(d.Provider,{value:p,children:t})}function c(){let e=(0,l.useContext)(d);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},33797:(e,t,n)=>{"use strict";n.d(t,{Zr:()=>a,f6:()=>l,oD:()=>s});let r="elanous.daemon.sessionId";function l(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function s(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(r,e),e):localStorage.getItem(r)}();if(e)return e;let t=l();return localStorage.setItem(r,t),t}function a(){let e=l();return localStorage.setItem(r,e),e}},66291:(e,t,n)=>{Promise.resolve().then(n.bind(n,7333))},79248:(e,t,n)=>{"use strict";n.d(t,{v:()=>a});var r=n(20381),l=n(62351);let s=null;function a(e){let[t,n]=(0,r.useState)(()=>s&&Date.now()-s.at<6e4?s.data:[]),[a,o]=(0,r.useState)(!1),[i,d]=(0,r.useState)(null),u=(0,r.useCallback)(async()=>{o(!0),d(null);try{let t=await e.listPersonas();s={at:Date.now(),data:t.personas},n(t.personas)}catch(e){d(e instanceof Error?e.message:String(e))}finally{o(!1)}},[e]);(0,r.useEffect)(()=>{if(s&&Date.now()-s.at<6e4)return void n(s.data);u()},[u]);let c=(0,r.useCallback)(async()=>{s=null,await u()},[u]);return(0,r.useEffect)(()=>{let t=e.personasEventsUrl();if(!t)return;let n=null;try{n=new EventSource(t)}catch(e){(0,l.cY)("showroom.personas.sse.construct-error",{error:String(e)});return}let r=e=>()=>{"hello"!==e&&((0,l.cY)("showroom.personas.sse.event",{kind:e}),s=null,u())};return n.addEventListener("hello",r("hello")),n.addEventListener("load-dir",r("load-dir")),n.addEventListener("reload-all",r("reload-all")),n.addEventListener("upsert",r("upsert")),n.addEventListener("remove",r("remove")),n.onerror=e=>{(0,l.cY)("showroom.personas.sse.error",{type:e.type})},()=>{try{null==n||n.close()}catch(e){}}},[e,u]),{personas:t,loading:a,error:i,reload:c}}}},e=>{e.O(0,[7956,9828,8821,7358],()=>e(e.s=66291)),_N_E=e.O()}]);