elanous 0.2.44 → 0.3.1

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 (820) hide show
  1. package/README.md +3 -3
  2. package/apps/pwa/out/404/index.html +1 -1
  3. package/apps/pwa/out/404.html +1 -1
  4. package/apps/pwa/out/_next/static/98VlBaYvL-VVnCq93_lFS/_buildManifest.js +1 -0
  5. package/apps/pwa/out/_next/static/chunks/1388-1eb6df003f29bb9c.js +1 -0
  6. package/apps/pwa/out/_next/static/chunks/1434-a2c279f005d9c501.js +1 -0
  7. package/apps/pwa/out/_next/static/chunks/1464.14588e93d2ab3190.js +24 -0
  8. package/apps/pwa/out/_next/static/chunks/1465.85f9a1708f17853a.js +1 -0
  9. package/apps/pwa/out/_next/static/chunks/156.389be47355dc94c7.js +1 -0
  10. package/apps/pwa/out/_next/static/chunks/162.c03cf23572cb4136.js +1 -0
  11. package/apps/pwa/out/_next/static/chunks/1831.25868bc1e2cc0dae.js +1 -0
  12. package/apps/pwa/out/_next/static/chunks/1896.b6c635d0c8f65727.js +1 -0
  13. package/apps/pwa/out/_next/static/chunks/1939.3fa2506ad8e585bc.js +1 -0
  14. package/apps/pwa/out/_next/static/chunks/{5790.5eb06a653ebd8571.js → 1972.a8d37aadbc59ac43.js} +1 -1
  15. package/apps/pwa/out/_next/static/chunks/{8965-135a2c9eaa2464cb.js → 1997-f22e6f9510520182.js} +1 -1
  16. package/apps/pwa/out/_next/static/chunks/2242-6edf27c6c0ae7589.js +1 -0
  17. package/apps/pwa/out/_next/static/chunks/{46.57c783fa4884714f.js → 234.f25f5b0d65f89af8.js} +2 -2
  18. package/apps/pwa/out/_next/static/chunks/2344.795de26da3261060.js +23 -0
  19. package/apps/pwa/out/_next/static/chunks/2491.9ac5bd2f48bcd60c.js +226 -0
  20. package/apps/pwa/out/_next/static/chunks/2513.e03f6479c0079b6e.js +79 -0
  21. package/apps/pwa/out/_next/static/chunks/2551-43782d8812989ae7.js +1 -0
  22. package/apps/pwa/out/_next/static/chunks/2799.12b1a3e7090e27ef.js +1 -0
  23. package/apps/pwa/out/_next/static/chunks/2806.f04d7923f2adadb1.js +1 -0
  24. package/apps/pwa/out/_next/static/chunks/2862.b8ea08cbc69a63d4.js +1 -0
  25. package/apps/pwa/out/_next/static/chunks/295-1ff35d6a06be8400.js +1 -0
  26. package/apps/pwa/out/_next/static/chunks/3161.b9eb612f66d5ff04.js +1 -0
  27. package/apps/pwa/out/_next/static/chunks/3233.46021e4acc520c03.js +1 -0
  28. package/apps/pwa/out/_next/static/chunks/325.3cfd5b7571a9f740.js +1 -0
  29. package/apps/pwa/out/_next/static/chunks/{1266.a46cc33cb6a72d75.js → 3384.d91656787bec7922.js} +2 -2
  30. package/apps/pwa/out/_next/static/chunks/3414f5fa-46ae45073dca64f0.js +1 -0
  31. package/apps/pwa/out/_next/static/chunks/3589.a9094c2bc034055c.js +287 -0
  32. package/apps/pwa/out/_next/static/chunks/{2705.9816f3c244f8b85f.js → 367.1ffe524fe1ee7803.js} +1 -1
  33. package/apps/pwa/out/_next/static/chunks/3777.1450df79d987816d.js +1 -0
  34. package/apps/pwa/out/_next/static/chunks/3877-871ea505d778a6a7.js +1 -0
  35. package/apps/pwa/out/_next/static/chunks/4021.28d034c7fb0a6732.js +1 -0
  36. package/apps/pwa/out/_next/static/chunks/{6549dad0.2740b25e51bf8f05.js → 4069a63b.a074c39997560438.js} +1 -1
  37. package/apps/pwa/out/_next/static/chunks/4212.873105c37a871421.js +1 -0
  38. package/apps/pwa/out/_next/static/chunks/423-6be27163a1bce5d7.js +1 -0
  39. package/apps/pwa/out/_next/static/chunks/4231.644cd1e23974f1f6.js +1 -0
  40. package/apps/pwa/out/_next/static/chunks/4362.1adc1412509b7bb8.js +94 -0
  41. package/apps/pwa/out/_next/static/chunks/4431.83a630154376636a.js +41 -0
  42. package/apps/pwa/out/_next/static/chunks/4506-f8439f6fbd0a8483.js +1 -0
  43. package/apps/pwa/out/_next/static/chunks/4540-993e2e4e1d485a9a.js +1 -0
  44. package/apps/pwa/out/_next/static/chunks/4719-1d04b01d4d6166fc.js +1 -0
  45. package/apps/pwa/out/_next/static/chunks/4754-bfd5e1ad9016e176.js +1 -0
  46. package/apps/pwa/out/_next/static/chunks/5001.b39bf6d792509317.js +64 -0
  47. package/apps/pwa/out/_next/static/chunks/5021.7234ae147ab0a3e1.js +77 -0
  48. package/apps/pwa/out/_next/static/chunks/5230.3e562ed2a69cbc7b.js +1 -0
  49. package/apps/pwa/out/_next/static/chunks/5279.f75fafa19de6e131.js +1 -0
  50. package/apps/pwa/out/_next/static/chunks/{5a34fb2f.52f1b4e1baebb48a.js → 52bafb67.054ec9d048116d83.js} +3 -3
  51. package/apps/pwa/out/_next/static/chunks/5325-b9c1258cc7e579f9.js +1 -0
  52. package/apps/pwa/out/_next/static/chunks/5495-37306015ec740354.js +1 -0
  53. package/apps/pwa/out/_next/static/chunks/{1694.18debfd77562e56d.js → 5536.bbb17703f46e52e7.js} +2 -2
  54. package/apps/pwa/out/_next/static/chunks/{6245.1182e007e9d230d9.js → 5571.a062963c309338b4.js} +2 -2
  55. package/apps/pwa/out/_next/static/chunks/5658.d1e61315cb865f82.js +32 -0
  56. package/apps/pwa/out/_next/static/chunks/5709.867a5086d782dd97.js +286 -0
  57. package/apps/pwa/out/_next/static/chunks/5765.5949ec61cec63eac.js +1 -0
  58. package/apps/pwa/out/_next/static/chunks/587.e6b35bcbd947c58e.js +8 -0
  59. package/apps/pwa/out/_next/static/chunks/5951-f25e14d03e72135a.js +1 -0
  60. package/apps/pwa/out/_next/static/chunks/5962-1ab68b213684716b.js +1 -0
  61. package/apps/pwa/out/_next/static/chunks/{4502.bdcc877abd437a05.js → 5998.d426273cdd00305a.js} +1 -1
  62. package/apps/pwa/out/_next/static/chunks/6352.20c708245475cf50.js +1 -0
  63. package/apps/pwa/out/_next/static/chunks/6548-a160aa580fb9a8ff.js +1 -0
  64. package/apps/pwa/out/_next/static/chunks/673-40c924b2095a05eb.js +1 -0
  65. package/apps/pwa/out/_next/static/chunks/6731-c9308c2f71a1b8e3.js +1 -0
  66. package/apps/pwa/out/_next/static/chunks/{6881.9e7955847640c7fe.js → 6747.365eefdf3b4a0226.js} +17 -17
  67. package/apps/pwa/out/_next/static/chunks/691.6ff56b5f4b6ec918.js +309 -0
  68. package/apps/pwa/out/_next/static/chunks/6932.f80f616260b74131.js +1 -0
  69. package/apps/pwa/out/_next/static/chunks/6950-5d5edab502cc208b.js +1 -0
  70. package/apps/pwa/out/_next/static/chunks/6982.e8fecbf7feb3aba5.js +1 -0
  71. package/apps/pwa/out/_next/static/chunks/7051-0dbbb2c1ce4f519e.js +1 -0
  72. package/apps/pwa/out/_next/static/chunks/{8551.f762945c2cda2e95.js → 7087.99662912e4db6255.js} +1 -1
  73. package/apps/pwa/out/_next/static/chunks/709.bd9939dbb991de9f.js +1 -0
  74. package/apps/pwa/out/_next/static/chunks/7197.7b19aa948048e19a.js +93 -0
  75. package/apps/pwa/out/_next/static/chunks/7230-6527ac6be205c096.js +1 -0
  76. package/apps/pwa/out/_next/static/chunks/7233-d93f8ce1475f730c.js +1 -0
  77. package/apps/pwa/out/_next/static/chunks/7292-a4d5c8d2fe255e06.js +1 -0
  78. package/apps/pwa/out/_next/static/chunks/7304-dae57d61a8ccccf0.js +1 -0
  79. package/apps/pwa/out/_next/static/chunks/7382.bf53ab097670a235.js +27 -0
  80. package/apps/pwa/out/_next/static/chunks/7434.99c31fb661085b6a.js +1 -0
  81. package/apps/pwa/out/_next/static/chunks/7457-9ceddd4301467503.js +1 -0
  82. package/apps/pwa/out/_next/static/chunks/{3349.b5f09ee474d9533e.js → 7479.d00f44fde98cf34e.js} +1 -1
  83. package/apps/pwa/out/_next/static/chunks/7494.d8b8d01d8dcbafe8.js +2 -0
  84. package/apps/pwa/out/_next/static/chunks/{4757.67c6d7473a038e78.js → 751.95d127a92f7817e3.js} +1 -1
  85. package/apps/pwa/out/_next/static/chunks/7554-d9cec4ac2e6d556d.js +1 -0
  86. package/apps/pwa/out/_next/static/chunks/7733-6f0d8da7a3f3ce91.js +1 -0
  87. package/apps/pwa/out/_next/static/chunks/7757-6f4b6363cc651de5.js +1 -0
  88. package/apps/pwa/out/_next/static/chunks/{5a5078f8.2099200e5ea95e16.js → 77a1aef7.ba1c04f78a1493d9.js} +1 -1
  89. package/apps/pwa/out/_next/static/chunks/787-4d1d55b1311a5019.js +1 -0
  90. package/apps/pwa/out/_next/static/chunks/7915-a755af5ea69cfcfe.js +1 -0
  91. package/apps/pwa/out/_next/static/chunks/8029-2963385667511b16.js +1 -0
  92. package/apps/pwa/out/_next/static/chunks/8090.bc2349b6133b2cd5.js +1 -0
  93. package/apps/pwa/out/_next/static/chunks/8136.8ff2113530c27083.js +1 -0
  94. package/apps/pwa/out/_next/static/chunks/819.632a2a50f814f98e.js +74 -0
  95. package/apps/pwa/out/_next/static/chunks/8328.72a79ba9b81971ad.js +1 -0
  96. package/apps/pwa/out/_next/static/chunks/8448.4e25153e035786b0.js +62 -0
  97. package/apps/pwa/out/_next/static/chunks/{7679.32c40cdd14f20b4a.js → 8469.f67afe44a0fa8af0.js} +1 -1
  98. package/apps/pwa/out/_next/static/chunks/8613.76dfc054055f06ba.js +1 -0
  99. package/apps/pwa/out/_next/static/chunks/8649-fe9165a8879fad56.js +1 -0
  100. package/apps/pwa/out/_next/static/chunks/8840-53feb140de04dcfe.js +1 -0
  101. package/apps/pwa/out/_next/static/chunks/8873.ef8a37057644f876.js +1 -0
  102. package/apps/pwa/out/_next/static/chunks/8917-46eb4e608f44bf74.js +1 -0
  103. package/apps/pwa/out/_next/static/chunks/8954.e749ad9e9c5ca512.js +115 -0
  104. package/apps/pwa/out/_next/static/chunks/9065.8134b756614cf83f.js +36 -0
  105. package/apps/pwa/out/_next/static/chunks/9089.087fcd352568af49.js +1 -0
  106. package/apps/pwa/out/_next/static/chunks/9103.bd34694d18c05083.js +1 -0
  107. package/apps/pwa/out/_next/static/chunks/9140-bfcc4075cac3c387.js +1 -0
  108. package/apps/pwa/out/_next/static/chunks/9272.787cb6d987824708.js +1 -0
  109. package/apps/pwa/out/_next/static/chunks/9361-5b10273d3f34b21d.js +1 -0
  110. package/apps/pwa/out/_next/static/chunks/9396.097c14dd4df77c43.js +1 -0
  111. package/apps/pwa/out/_next/static/chunks/9468.370ef15c86f7b141.js +1 -0
  112. package/apps/pwa/out/_next/static/chunks/{5989.7ecd362c5c44b747.js → 9531.ffbcd1e59e2c32fc.js} +17 -17
  113. package/apps/pwa/out/_next/static/chunks/963-66d3a6d98e977ae5.js +1 -0
  114. package/apps/pwa/out/_next/static/chunks/9644.a615f56876ed37b8.js +90 -0
  115. package/apps/pwa/out/_next/static/chunks/{4415-b9d6a90960920a4a.js → 9693-ab5bc28704a66601.js} +3 -3
  116. package/apps/pwa/out/_next/static/chunks/9705-bbcd00db4ffd3484.js +1 -0
  117. package/apps/pwa/out/_next/static/chunks/{7864.b1ff31d4030b8994.js → 9786.2d8c3b7368f18f1b.js} +3 -3
  118. package/apps/pwa/out/_next/static/chunks/9805.e17f9c6e3811e48b.js +24 -0
  119. package/apps/pwa/out/_next/static/chunks/9876-49a1e08c0dfe7b8c.js +1 -0
  120. package/apps/pwa/out/_next/static/chunks/9891.5995e75a99b53d4e.js +149 -0
  121. package/apps/pwa/out/_next/static/chunks/{178-4da509cd7266672a.js → 9912-2be6b6ea0321c365.js} +1 -1
  122. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-c0543429ffa9cdfb.js +1 -0
  123. package/apps/pwa/out/_next/static/chunks/app/approvals/page-39f04d88df12b3e9.js +1 -0
  124. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-e4f014aa82483cae.js +1 -0
  125. package/apps/pwa/out/_next/static/chunks/app/board/page-e86f9273877eab46.js +1 -0
  126. package/apps/pwa/out/_next/static/chunks/app/botlab/page-dbc30fbf2e8933d9.js +1 -0
  127. package/apps/pwa/out/_next/static/chunks/app/bots/page-d83a916672a8cfd3.js +1 -0
  128. package/apps/pwa/out/_next/static/chunks/app/ceo/page-22f27eaa5e6e68c7.js +1 -0
  129. package/apps/pwa/out/_next/static/chunks/app/chat/page-66477bf22d33b56e.js +1 -0
  130. package/apps/pwa/out/_next/static/chunks/app/consult/page-913f2a86ea109c65.js +1 -0
  131. package/apps/pwa/out/_next/static/chunks/app/control/page-ac51dc349381d564.js +1 -0
  132. package/apps/pwa/out/_next/static/chunks/app/decisions/page-cd09fc74dca72511.js +1 -0
  133. package/apps/pwa/out/_next/static/chunks/app/design-check/page-6c357f5b58598b67.js +1 -0
  134. package/apps/pwa/out/_next/static/chunks/app/editor/page-ab83de8c73bd2e4f.js +1 -0
  135. package/apps/pwa/out/_next/static/chunks/app/exec/page-6402ad2273b6f7b5.js +1 -0
  136. package/apps/pwa/out/_next/static/chunks/app/field/page-50d9b8d13b33f785.js +1 -0
  137. package/apps/pwa/out/_next/static/chunks/app/healthz/route-c0543429ffa9cdfb.js +1 -0
  138. package/apps/pwa/out/_next/static/chunks/app/inside/page-ffca50fc1f13759c.js +1 -0
  139. package/apps/pwa/out/_next/static/chunks/app/intake/page-3316bfc28a901722.js +1 -0
  140. package/apps/pwa/out/_next/static/chunks/app/layout-aef93e049341011e.js +1 -0
  141. package/apps/pwa/out/_next/static/chunks/app/live/page-8e67bb49fa81d4e5.js +1 -0
  142. package/apps/pwa/out/_next/static/chunks/app/live-run/page-8b8c8ac4a3edf0eb.js +1 -0
  143. package/apps/pwa/out/_next/static/chunks/app/loops/page-b5b994c9ea03f6d7.js +1 -0
  144. package/apps/pwa/out/_next/static/chunks/app/market/page-1a06f6f510439341.js +1 -0
  145. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/{page-e187ac52a95538b3.js → page-d9720f6a03f31fa7.js} +1 -1
  146. package/apps/pwa/out/_next/static/chunks/app/morning/page-d7c891d78672d771.js +1 -0
  147. package/apps/pwa/out/_next/static/chunks/app/not-found-e915872b37ca7dcf.js +1 -0
  148. package/apps/pwa/out/_next/static/chunks/app/observatory/page-43c2ec7c00978377.js +1 -0
  149. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-c2537aa89b121637.js +1 -0
  150. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-3264666f6ef99431.js +1 -0
  151. package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-efe9dd7bc58d4fc6.js +1 -0
  152. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-153277343c9956b8.js +1 -0
  153. package/apps/pwa/out/_next/static/chunks/app/outputs/page-c1457829d1506ad7.js +1 -0
  154. package/apps/pwa/out/_next/static/chunks/app/page-9622573651a4b6ce.js +1 -0
  155. package/apps/pwa/out/_next/static/chunks/app/reflection/page-5aeba1aa69ec67ad.js +1 -0
  156. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-29cf1ba9ae2fdb92.js +1 -0
  157. package/apps/pwa/out/_next/static/chunks/app/sessions/page-99a060c6edd4726c.js +1 -0
  158. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-decfacd2237da403.js +1 -0
  159. package/apps/pwa/out/_next/static/chunks/app/settings/page-3650eed85a5c5c93.js +1 -0
  160. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-14077f0eddcae22f.js +1 -0
  161. package/apps/pwa/out/_next/static/chunks/app/setup/layout-c0543429ffa9cdfb.js +1 -0
  162. package/apps/pwa/out/_next/static/chunks/app/setup/page-364ee29f223bdc6b.js +1 -0
  163. package/apps/pwa/out/_next/static/chunks/app/share/page-905fb1f67c2665a7.js +1 -0
  164. package/apps/pwa/out/_next/static/chunks/app/showroom/page-79907fc36e3113f4.js +1 -0
  165. package/apps/pwa/out/_next/static/chunks/app/tasks/page-8f01867ee2a701b6.js +1 -0
  166. package/apps/pwa/out/_next/static/chunks/app/term/page-310b734167671ba8.js +1 -0
  167. package/apps/pwa/out/_next/static/chunks/app/today/page-cb1ca7ae52803603.js +1 -0
  168. package/apps/pwa/out/_next/static/chunks/app/trace/page-5491f2fb8e9376b5.js +1 -0
  169. package/apps/pwa/out/_next/static/chunks/app/vault/page-7e98befd36460b21.js +1 -0
  170. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-220923eefd5149b5.js +1 -0
  171. package/apps/pwa/out/_next/static/chunks/app/workflows/page-afdef54bb570da39.js +1 -0
  172. package/apps/pwa/out/_next/static/chunks/app/workspace/page-19f8acddbff16091.js +1 -0
  173. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-d327a7647a075184.js +1 -0
  174. package/apps/pwa/out/_next/static/chunks/bc1f8ef9.b79035bd0f565c66.js +1 -0
  175. package/apps/pwa/out/_next/static/chunks/{892fd990.456232f326cc39c2.js → c58bec24.d208786405e23259.js} +1 -1
  176. package/apps/pwa/out/_next/static/chunks/cf9ff424.b702f4a2ac70d836.js +1 -0
  177. package/apps/pwa/out/_next/static/chunks/d90ea774-d492ff408af303c1.js +1 -0
  178. package/apps/pwa/out/_next/static/chunks/{2e0f720a.a0697c08e3806a60.js → e7a93f74.aa8572069f848f17.js} +1 -1
  179. package/apps/pwa/out/_next/static/chunks/ec9064d2.691021d974525713.js +122 -0
  180. package/apps/pwa/out/_next/static/chunks/ef9d715f.186b83d00befb229.js +1 -0
  181. package/apps/pwa/out/_next/static/chunks/framework-f01b715c1ec2fb74.js +1 -0
  182. package/apps/pwa/out/_next/static/chunks/main-3267c2e627901292.js +1 -0
  183. package/apps/pwa/out/_next/static/chunks/main-app-a690bcbeac3c465d.js +1 -0
  184. package/apps/pwa/out/_next/static/chunks/pages/_app-124f11699738fd43.js +1 -0
  185. package/apps/pwa/out/_next/static/chunks/pages/_error-754b7bd073a36a5f.js +1 -0
  186. package/apps/pwa/out/_next/static/chunks/webpack-8ded1efe8121eba0.js +1 -0
  187. package/apps/pwa/out/_next/static/css/32b8e1b8996dbf5e.css +1 -0
  188. package/apps/pwa/out/_next/static/css/{62c858ad53854f47.css → 9e19f9d740cf4dcb.css} +1 -1
  189. package/apps/pwa/out/approvals/index.html +1 -1
  190. package/apps/pwa/out/approvals/index.txt +23 -23
  191. package/apps/pwa/out/autopilot/index.html +1 -1
  192. package/apps/pwa/out/autopilot/index.txt +23 -23
  193. package/apps/pwa/out/board/index.html +1 -1
  194. package/apps/pwa/out/board/index.txt +23 -23
  195. package/apps/pwa/out/botlab/index.html +1 -1
  196. package/apps/pwa/out/botlab/index.txt +22 -22
  197. package/apps/pwa/out/bots/index.html +1 -1
  198. package/apps/pwa/out/bots/index.txt +22 -22
  199. package/apps/pwa/out/ceo/index.html +1 -1
  200. package/apps/pwa/out/ceo/index.txt +23 -23
  201. package/apps/pwa/out/chat/index.html +1 -1
  202. package/apps/pwa/out/chat/index.txt +22 -22
  203. package/apps/pwa/out/consult/index.html +1 -1
  204. package/apps/pwa/out/consult/index.txt +23 -23
  205. package/apps/pwa/out/control/index.html +1 -1
  206. package/apps/pwa/out/control/index.txt +23 -23
  207. package/apps/pwa/out/decisions/index.html +1 -1
  208. package/apps/pwa/out/decisions/index.txt +22 -22
  209. package/apps/pwa/out/design-check/index.html +1 -1
  210. package/apps/pwa/out/design-check/index.txt +23 -23
  211. package/apps/pwa/out/editor/index.html +1 -1
  212. package/apps/pwa/out/editor/index.txt +24 -24
  213. package/apps/pwa/out/exec/index.html +1 -1
  214. package/apps/pwa/out/exec/index.txt +23 -23
  215. package/apps/pwa/out/field/index.html +1 -1
  216. package/apps/pwa/out/field/index.txt +23 -23
  217. package/apps/pwa/out/healthz +1 -1
  218. package/apps/pwa/out/index.html +1 -1
  219. package/apps/pwa/out/index.txt +22 -22
  220. package/apps/pwa/out/inside/index.html +1 -1
  221. package/apps/pwa/out/inside/index.txt +23 -23
  222. package/apps/pwa/out/intake/index.html +1 -1
  223. package/apps/pwa/out/intake/index.txt +23 -23
  224. package/apps/pwa/out/live/index.html +1 -1
  225. package/apps/pwa/out/live/index.txt +24 -24
  226. package/apps/pwa/out/live-run/index.html +1 -1
  227. package/apps/pwa/out/live-run/index.txt +24 -24
  228. package/apps/pwa/out/loops/index.html +1 -1
  229. package/apps/pwa/out/loops/index.txt +22 -22
  230. package/apps/pwa/out/market/index.html +1 -1
  231. package/apps/pwa/out/market/index.txt +22 -22
  232. package/apps/pwa/out/missions/placeholder/index.html +1 -1
  233. package/apps/pwa/out/missions/placeholder/index.txt +22 -22
  234. package/apps/pwa/out/morning/index.html +1 -1
  235. package/apps/pwa/out/morning/index.txt +23 -23
  236. package/apps/pwa/out/observatory/index.html +1 -1
  237. package/apps/pwa/out/observatory/index.txt +23 -23
  238. package/apps/pwa/out/ops/checklist/index.html +1 -1
  239. package/apps/pwa/out/ops/checklist/index.txt +22 -22
  240. package/apps/pwa/out/ops/release/index.html +1 -1
  241. package/apps/pwa/out/ops/release/index.txt +22 -22
  242. package/apps/pwa/out/ops/resources/index.html +1 -0
  243. package/apps/pwa/out/ops/resources/index.txt +30 -0
  244. package/apps/pwa/out/ops/seats/index.html +1 -1
  245. package/apps/pwa/out/ops/seats/index.txt +22 -22
  246. package/apps/pwa/out/outputs/index.html +1 -1
  247. package/apps/pwa/out/outputs/index.txt +22 -22
  248. package/apps/pwa/out/reflection/index.html +1 -1
  249. package/apps/pwa/out/reflection/index.txt +23 -23
  250. package/apps/pwa/out/scheduler/index.html +1 -1
  251. package/apps/pwa/out/scheduler/index.txt +23 -23
  252. package/apps/pwa/out/sessions/index.html +1 -1
  253. package/apps/pwa/out/sessions/index.txt +22 -22
  254. package/apps/pwa/out/settings/devices/index.html +1 -1
  255. package/apps/pwa/out/settings/devices/index.txt +23 -23
  256. package/apps/pwa/out/settings/index.html +1 -1
  257. package/apps/pwa/out/settings/index.txt +23 -23
  258. package/apps/pwa/out/setup/done/index.html +1 -1
  259. package/apps/pwa/out/setup/done/index.txt +23 -23
  260. package/apps/pwa/out/setup/index.html +1 -1
  261. package/apps/pwa/out/setup/index.txt +23 -23
  262. package/apps/pwa/out/share/index.html +1 -1
  263. package/apps/pwa/out/share/index.txt +23 -23
  264. package/apps/pwa/out/showroom/index.html +1 -1
  265. package/apps/pwa/out/showroom/index.txt +22 -22
  266. package/apps/pwa/out/tasks/index.html +1 -1
  267. package/apps/pwa/out/tasks/index.txt +23 -23
  268. package/apps/pwa/out/term/index.html +1 -1
  269. package/apps/pwa/out/term/index.txt +23 -23
  270. package/apps/pwa/out/today/index.html +1 -1
  271. package/apps/pwa/out/today/index.txt +23 -23
  272. package/apps/pwa/out/trace/index.html +1 -1
  273. package/apps/pwa/out/trace/index.txt +23 -23
  274. package/apps/pwa/out/vault/index.html +1 -1
  275. package/apps/pwa/out/vault/index.txt +23 -23
  276. package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
  277. package/apps/pwa/out/workflows/chat-ui/index.txt +23 -23
  278. package/apps/pwa/out/workflows/index.html +1 -1
  279. package/apps/pwa/out/workflows/index.txt +23 -23
  280. package/apps/pwa/out/workspace/index.html +1 -1
  281. package/apps/pwa/out/workspace/index.txt +23 -23
  282. package/apps/pwa/out/worktrees/index.html +1 -1
  283. package/apps/pwa/out/worktrees/index.txt +23 -23
  284. package/docs/goal-context/01-goal-authoring-checks.md +1 -0
  285. package/graphs/intake/intake-daily.yaml +5 -1
  286. package/graphs/overlays/examples/demo1104-research-arg-runtime.yaml +28 -0
  287. package/graphs/steward/README.md +9 -0
  288. package/graphs/steward/entrance-dispatch-shadow.yaml +23 -0
  289. package/graphs/steward/recipes.yaml +3 -0
  290. package/graphs/video/README.md +38 -0
  291. package/graphs/video/explainer-line.yaml +20 -7
  292. package/package.json +4 -1
  293. package/packs/b2b-sales-public/content/example-answer.md +5 -0
  294. package/packs/b2b-sales-public/content/playbook.md +11 -0
  295. package/packs/b2b-sales-public/content/proposal-template.md +13 -0
  296. package/packs/b2b-sales-public/content/questions.md +10 -0
  297. package/packs/b2b-sales-public/knowledge-pack.json +31 -0
  298. package/packs/elanous-basics/.codex-plugin/plugin.json +12 -0
  299. package/packs/elanous-basics/plugin.json +20 -0
  300. package/packs/elanous-essentials/plugin.json +24 -0
  301. package/packs/elanous-hwp/.codex-plugin/plugin.json +12 -0
  302. package/packs/elanous-hwp/NOTICE.md +13 -0
  303. package/packs/elanous-hwp/README.md +21 -0
  304. package/packs/elanous-hwp/nodes/from-md.yaml +16 -0
  305. package/packs/elanous-hwp/nodes/to-md.yaml +15 -0
  306. package/packs/elanous-hwp/plugin.json +18 -0
  307. package/packs/elanous-hwp/scripts/hwp.py +405 -0
  308. package/packs/elanous-hwp/skills/hwp-fill/SKILL.md +8 -0
  309. package/packs/elanous-hwp/skills/hwp-read/SKILL.md +8 -0
  310. package/packs/elanous-hwp/skills/hwp-write/SKILL.md +8 -0
  311. package/packs/elanous-hwp/templates/official-letter.yaml +6 -0
  312. package/packs/elanous-hwp/templates/report.yaml +6 -0
  313. package/packs/elanous-hwp/test/consumer.py +24 -0
  314. package/packs/elanous-hwp/test/verify-python-hwpx.py +12 -0
  315. package/packs/elanous-media/.codex-plugin/plugin.json +12 -0
  316. package/packs/elanous-media/plugin.json +16 -0
  317. package/packs/image-first-shorts/.codex-plugin/plugin.json +12 -0
  318. package/packs/image-first-shorts/LICENSE +76 -0
  319. package/packs/image-first-shorts/README.md +45 -0
  320. package/packs/image-first-shorts/SOURCE.md +43 -0
  321. package/packs/image-first-shorts/examples/input.json +9 -0
  322. package/packs/image-first-shorts/examples/storyboard.json +31 -0
  323. package/packs/image-first-shorts/graphs/image-first-shorts.yaml +121 -0
  324. package/packs/image-first-shorts/graphs/recipes.yaml +56 -0
  325. package/packs/image-first-shorts/graphs/run-step.ts +270 -0
  326. package/packs/image-first-shorts/plugin.json +38 -0
  327. package/packs/image-first-shorts/skills/image-first-shorts/SKILL.md +115 -0
  328. package/packs/image-first-shorts/skills/image-first-shorts/templates/examples/image_example.vars.json +7 -0
  329. package/packs/image-first-shorts/skills/image-first-shorts/templates/examples/video_example.vars.json +6 -0
  330. package/packs/image-first-shorts/skills/image-first-shorts/templates/image_blocks.json +30 -0
  331. package/packs/image-first-shorts/skills/image-first-shorts/templates/image_runner_wrapper.txt +6 -0
  332. package/packs/image-first-shorts/skills/image-first-shorts/templates/image_template.txt +1 -0
  333. package/packs/image-first-shorts/skills/image-first-shorts/templates/music_plan_template.json +13 -0
  334. package/packs/image-first-shorts/skills/image-first-shorts/templates/pricing.json +7 -0
  335. package/packs/image-first-shorts/skills/image-first-shorts/templates/tts_request_template.json +8 -0
  336. package/packs/image-first-shorts/skills/image-first-shorts/templates/tts_template.txt +1 -0
  337. package/packs/image-first-shorts/skills/image-first-shorts/templates/video_blocks.json +13 -0
  338. package/packs/image-first-shorts/skills/image-first-shorts/templates/video_template.txt +1 -0
  339. package/packs/image-first-shorts/skills/image-first-shorts/tools/analyze_music.py +41 -0
  340. package/packs/image-first-shorts/skills/image-first-shorts/tools/asr_pick.py +50 -0
  341. package/packs/image-first-shorts/skills/image-first-shorts/tools/fill.py +61 -0
  342. package/packs/image-first-shorts/skills/image-first-shorts/tools/heavy.sh +25 -0
  343. package/packs/image-first-shorts/skills/image-first-shorts/tools/imagegen_runner.py +128 -0
  344. package/packs/image-first-shorts/skills/image-first-shorts/tools/ip_guard.py +54 -0
  345. package/packs/image-first-shorts/skills/image-first-shorts/tools/keyer.py +199 -0
  346. package/packs/image-first-shorts/skills/image-first-shorts/tools/matte.sh +65 -0
  347. package/packs/image-first-shorts/skills/image-first-shorts/tools/matte_queue.sh +34 -0
  348. package/packs/release-ops/README.md +18 -0
  349. package/packs/release-ops/policy.yaml +26 -0
  350. package/packs/semiconductor-process-public/content/glossary.md +8 -0
  351. package/packs/semiconductor-process-public/content/process-overview.md +15 -0
  352. package/packs/semiconductor-process-public/content/public-source-check.md +8 -0
  353. package/packs/semiconductor-process-public/content/questions.md +5 -0
  354. package/packs/semiconductor-process-public/knowledge-pack.json +31 -0
  355. package/packs/video-broll/.codex-plugin/plugin.json +12 -0
  356. package/packs/video-broll/plugin.json +18 -0
  357. package/packs/video-explainer/.codex-plugin/plugin.json +12 -0
  358. package/packs/video-explainer/README.md +37 -0
  359. package/packs/video-explainer/nodes/explainer.yaml +17 -0
  360. package/packs/video-explainer/nodes/field-reel.yaml +17 -0
  361. package/packs/video-explainer/plugin.json +21 -0
  362. package/packs/web-publish/.codex-plugin/plugin.json +12 -0
  363. package/packs/web-publish/LICENSE +24 -0
  364. package/packs/web-publish/README.md +77 -0
  365. package/packs/web-publish/SOURCE.md +70 -0
  366. package/packs/web-publish/examples/input.json +9 -0
  367. package/packs/web-publish/graphs/recipes.yaml +72 -0
  368. package/packs/web-publish/graphs/run-step.ts +618 -0
  369. package/packs/web-publish/graphs/web-publish.yaml +157 -0
  370. package/packs/web-publish/nodes/web-publish.yaml +18 -0
  371. package/packs/web-publish/plugin.json +42 -0
  372. package/packs/web-publish/skills/business-motion-websites/SKILL.md +104 -0
  373. package/packs/web-publish/skills/business-motion-websites/agents/openai.yaml +5 -0
  374. package/packs/web-publish/skills/business-motion-websites/assets/project-brief.md +70 -0
  375. package/packs/web-publish/skills/business-motion-websites/examples/evas.md +17 -0
  376. package/packs/web-publish/skills/business-motion-websites/references/art-direction.md +59 -0
  377. package/packs/web-publish/skills/business-motion-websites/references/business-content.md +77 -0
  378. package/packs/web-publish/skills/business-motion-websites/references/media-production.md +130 -0
  379. package/packs/web-publish/skills/business-motion-websites/references/scroll-and-mobile.md +80 -0
  380. package/packs/web-publish/skills/business-motion-websites/references/verification-and-release.md +73 -0
  381. package/packs/web-publish/skills/business-motion-websites/scripts/audit-media.mjs +181 -0
  382. package/plugins/cloud-burst/README.md +7 -0
  383. package/plugins/cloud-burst/mock-runtime.ts +62 -0
  384. package/plugins/cloud-burst/plugin.json +17 -0
  385. package/plugins/cloud-burst/plugin.ts +103 -0
  386. package/plugins/cloud-burst/runtime-types.ts +7 -0
  387. package/plugins/cloud-burst/service.ts +147 -0
  388. package/scripts/generate-ux-sim-device-manual.ts +21 -0
  389. package/scripts/install-doctor-result.ts +25 -0
  390. package/scripts/install.sh +144 -75
  391. package/scripts/intake-news.ts +10 -4
  392. package/scripts/intake-social.ts +10 -4
  393. package/scripts/land-enqueue.test.sh +60 -0
  394. package/scripts/lib/intake-check-cli.ts +15 -0
  395. package/scripts/measure-git-checkout-accel.ts +232 -0
  396. package/scripts/release-loop/auto-approve-node.ts +7 -3
  397. package/scripts/release-loop/fixtures/gate-verdict-0.2.46.json +148 -0
  398. package/scripts/release-loop/gate-baseline-receipt.ts +34 -3
  399. package/scripts/release-loop/gate-node-sim.ts +5 -1
  400. package/scripts/release-loop/gate-node.ts +507 -83
  401. package/scripts/release-loop/gate-radius-live.ts +5 -4
  402. package/scripts/release-loop/gate-shard-dispatch.ts +100 -10
  403. package/scripts/release-loop/gate-shard-receipts.ts +85 -5
  404. package/scripts/release-loop/known-issues-node.ts +33 -10
  405. package/scripts/release-loop/node-verdict.ts +3 -1
  406. package/scripts/release-loop/publish-node.ts +7 -1
  407. package/scripts/release-loop/resume-release.ts +67 -10
  408. package/scripts/release-loop/resume.ts +101 -14
  409. package/scripts/sim-world-runner.ts +29 -0
  410. package/scripts/test-diet/node.ts +1 -1
  411. package/scripts/test-pod40-control-inbox-isolation.ts +39 -0
  412. package/scripts/ux/demo-rehearsal.ts +45 -12
  413. package/scripts/ux-sim-merge-driver.mjs +187 -0
  414. package/scripts/ux-sim.ts +11 -0
  415. package/scripts/video-pipeline.ts +6 -1
  416. package/scripts/warm-pool-provider-config.ts +76 -6
  417. package/scripts/zero-sim-world.sh +81 -0
  418. package/skills/explainer-video/engine/build.mjs +39 -2
  419. package/src/acp/core-turn-bridge.ts +34 -10
  420. package/src/agent/agent-output-tool.ts +33 -10
  421. package/src/agent/identity-env.ts +1 -0
  422. package/src/agent/terminal-surface.ts +248 -3
  423. package/src/agent-mission/driver.ts +26 -12
  424. package/src/agent-mission/grok-auth-status.ts +60 -23
  425. package/src/agent-mission/resource-ladder.ts +11 -4
  426. package/src/agent-substrate/pr-reviewer.ts +127 -16
  427. package/src/agent-substrate/self-review-cli.ts +348 -60
  428. package/src/auto-research/question-ladder-contract.ts +2 -0
  429. package/src/auto-research/research-turn.ts +289 -14
  430. package/src/cli/codex-device-login-wait.ts +103 -0
  431. package/src/cli/config-test-sync.ts +6 -1
  432. package/src/cli/control-cli.ts +5 -0
  433. package/src/cli/decision-list-format.ts +9 -0
  434. package/src/cli/decision-list-since.ts +13 -0
  435. package/src/cli/decisions-cli.ts +84 -24
  436. package/src/cli/decisions-list-cli.ts +32 -0
  437. package/src/cli/doctor-cli.ts +16 -6
  438. package/src/cli/doctor-fix.ts +76 -13
  439. package/src/cli/fleet-cli.ts +18 -0
  440. package/src/cli/friendly-errors.ts +4 -0
  441. package/src/cli/ingest-token-cli.ts +1 -1
  442. package/src/cli/intake-cli.ts +38 -9
  443. package/src/cli/intake-source-cli.ts +20 -4
  444. package/src/cli/light-entry-route.ts +25 -3
  445. package/src/cli/log-federation-cli.ts +29 -0
  446. package/src/cli/logs-cli.ts +12 -3
  447. package/src/cli/msg-cli.ts +5 -28
  448. package/src/cli/msg-list-cli.ts +73 -0
  449. package/src/cli/plugin-cli.ts +82 -0
  450. package/src/cli/pr-cli.ts +42 -58
  451. package/src/cli/pr-land-options.ts +34 -0
  452. package/src/cli/pr-land-overlap-evidence.ts +82 -22
  453. package/src/cli/provider-cli.ts +54 -0
  454. package/src/cli/pty-drive-cli.ts +25 -1
  455. package/src/cli/pty-takeover-cli.ts +9 -6
  456. package/src/cli/release-checklist-landed-cli.ts +273 -0
  457. package/src/cli/release-checklist-set-cli.ts +137 -0
  458. package/src/cli/release-checklist-write.ts +34 -0
  459. package/src/cli/release-cli.ts +18 -6
  460. package/src/cli/remote-eln-pty.ts +301 -0
  461. package/src/cli/resource-ledger-cli.ts +248 -0
  462. package/src/cli/runs-tree-cli.ts +256 -0
  463. package/src/cli/secret-cli.test-helpers.ts +25 -0
  464. package/src/cli/secret-cli.ts +172 -0
  465. package/src/cli/self-update.ts +1 -1
  466. package/src/cli/setup-cli.ts +45 -14
  467. package/src/cli/setup-keys.ts +80 -8
  468. package/src/cli/sim-cli.ts +116 -0
  469. package/src/cli/tasks-advance-cli.ts +185 -0
  470. package/src/cli/tasks-cli.ts +59 -92
  471. package/src/cli/tasks-read-cli.ts +32 -21
  472. package/src/cli/train-throughput.ts +71 -0
  473. package/src/cli/tui-test-cli.ts +154 -22
  474. package/src/compact/pipeline.ts +6 -1
  475. package/src/context-bus/context-day.ts +60 -11
  476. package/src/context-bus/external-events.ts +2 -2
  477. package/src/context-bus/nightly-condense.ts +8 -7
  478. package/src/control-plane/ledger.ts +1 -1
  479. package/src/core-turn/run-core-turn.ts +17 -11
  480. package/src/core-turn/run-goal-loop.ts +77 -35
  481. package/src/core-turn/seat-turn-cap.ts +8 -8
  482. package/src/core-turn/short-question.ts +27 -4
  483. package/src/dashboard/acp-boot.ts +66 -10
  484. package/src/dashboard/classic-sidetab-mission-job.ts +64 -6
  485. package/src/dashboard/classic-sidetab-mission-pair.ts +20 -7
  486. package/src/dashboard/classic-sidetab-mission-reconcile.ts +212 -0
  487. package/src/dashboard/classic-sidetab-mission-trio.ts +91 -18
  488. package/src/dashboard/classic-sidetab-mission.ts +94 -26
  489. package/src/dashboard/first-screen-band.ts +2 -2
  490. package/src/dashboard/index.ts +36 -34
  491. package/src/dashboard/input/chat-main-plain-turn-runtime.ts +5 -4
  492. package/src/dashboard/input/goal-continue.ts +10 -0
  493. package/src/dashboard/visible-mission-diagnostics.ts +1 -3
  494. package/src/decisions/decision-cards.ts +6 -1
  495. package/src/decisions/decision-ledger.ts +5 -0
  496. package/src/domains/schedule-manage-tool.ts +1 -1
  497. package/src/ensure-bin-path.ts +5 -1
  498. package/src/error-report/report.ts +139 -4
  499. package/src/execution-loop/launch-gate.ts +115 -18
  500. package/src/fleet/burst-auto-wire-ladder.ts +34 -0
  501. package/src/fleet/burst-auto-within-budget.ts +108 -0
  502. package/src/fleet/burst-ready-ladder.ts +64 -0
  503. package/src/fleet/host-doctor.ts +94 -23
  504. package/src/fleet/resource-inventory.ts +154 -0
  505. package/src/git-fs/worktree.ts +40 -16
  506. package/src/graph-runner/graph-cli.ts +3 -2
  507. package/src/graph-runner/runner.ts +23 -9
  508. package/src/grid/ssh-broker.ts +436 -0
  509. package/src/harness/browser-act.ts +11 -4
  510. package/src/harness/dispatch-backpressure.ts +184 -34
  511. package/src/harness/harness-cli-command.ts +71 -13
  512. package/src/harness/harness-pod-dispatch.ts +37 -1
  513. package/src/index.ts +218 -47
  514. package/src/intake-plane/actions.ts +19 -7
  515. package/src/intake-plane/digest.ts +30 -7
  516. package/src/intake-plane/intake-sources.ts +92 -3
  517. package/src/intake-plane/items.ts +13 -0
  518. package/src/intake-plane/linear-wish.ts +24 -1
  519. package/src/light-cli.ts +52 -5
  520. package/src/llm.ts +136 -21
  521. package/src/loops/orchestrator/tick.ts +29 -9
  522. package/src/machines/machine-ledger.ts +7 -1
  523. package/src/maturity/feature-maturity.ts +4 -3
  524. package/src/msg/msg-store.ts +5 -2
  525. package/src/mss/logging/log-federation.ts +334 -0
  526. package/src/mss/logging/log-store.ts +16 -7
  527. package/src/native-tool-catalog.ts +13 -0
  528. package/src/nexus/api/harness-api.ts +16 -6
  529. package/src/nexus/api/harness-traversal.ts +78 -5
  530. package/src/nexus/api/http-server.ts +30 -0
  531. package/src/nexus/api/ops-api.ts +69 -1
  532. package/src/nexus/api/public-routes.ts +14 -0
  533. package/src/nexus/api/resource-guardian.ts +26 -0
  534. package/src/nexus/api/resource-ledger.ts +59 -0
  535. package/src/nexus/api/rest-route-paths.ts +3 -0
  536. package/src/nexus/api/train-throughput.ts +228 -0
  537. package/src/nexus/api/ux-sim-devices.ts +67 -0
  538. package/src/nexus/index.ts +2 -0
  539. package/src/oauth/codex-seat-home.ts +231 -0
  540. package/src/oauth/codex.ts +69 -16
  541. package/src/onboarding/summary.ts +2 -0
  542. package/src/onboarding/web-first.ts +111 -47
  543. package/src/onboarding.ts +9 -0
  544. package/src/plugins/install/plugin-grounding.ts +233 -0
  545. package/src/plugins/maker/wizard-generate.ts +13 -1
  546. package/src/pty-shell/pty-manifest-query-cache.ts +18 -0
  547. package/src/pty-shell/pty-manifest.ts +76 -0
  548. package/src/pty-shell/remote-eln-inventory.ts +88 -0
  549. package/src/release-loop/gate-host-reservation.ts +19 -11
  550. package/src/release-loop/gate-shard-ledger.ts +2 -0
  551. package/src/release-loop/placement.ts +18 -8
  552. package/src/release-loop/rehearsal.ts +86 -11
  553. package/src/release-loop/release-note.ts +84 -0
  554. package/src/release-loop/stage-mail.ts +71 -0
  555. package/src/repl/index.ts +8 -1
  556. package/src/research/axis-fanout.ts +73 -23
  557. package/src/research/entity-status-table.ts +305 -0
  558. package/src/research/evidence-attribution.ts +48 -0
  559. package/src/research/gap-followup.ts +6 -1
  560. package/src/resource-ledger/guardian-reconcile.ts +172 -0
  561. package/src/resource-ledger/lease-automation.ts +112 -0
  562. package/src/resource-ledger/lease-heartbeat-worker.ts +169 -0
  563. package/src/resource-ledger/machine-pool-inventory.ts +81 -0
  564. package/src/resource-ledger/resource-ledger.ts +310 -0
  565. package/src/seat-loop/seat-loop.ts +2 -1
  566. package/src/self-dev/dev-pipeline.ts +98 -10
  567. package/src/self-dev/launch-preflight.ts +10 -4
  568. package/src/self-dev/orchestrate-cli.ts +7 -0
  569. package/src/self-dev/orchestrate-parent-dispatch.ts +44 -0
  570. package/src/self-dev/review-provider-fallback.ts +108 -10
  571. package/src/self-dev/run-supervisor.ts +26 -9
  572. package/src/self-implement/fixtures/structural-red-default-reexport.fixture.mjs +3 -0
  573. package/src/self-implement/fixtures/structural-red-export-star.fixture.mjs +3 -0
  574. package/src/self-implement/fixtures/structural-red-named-export.fixture.mjs +3 -0
  575. package/src/self-implement/gate-remote.ts +63 -10
  576. package/src/self-implement/goal-author.ts +214 -9
  577. package/src/self-implement/merge-train.ts +12 -1
  578. package/src/self-implement/off-diff-evidence.ts +223 -3
  579. package/src/self-implement/orchestrator.ts +205 -46
  580. package/src/self-implement/pod-warm-pool-profile.ts +3 -0
  581. package/src/self-implement/run-step-projection.ts +18 -4
  582. package/src/self-implement/seams.ts +42 -1
  583. package/src/session/chat.ts +29 -2
  584. package/src/session/index.ts +34 -0
  585. package/src/session/request-size-guard.ts +7 -7
  586. package/src/session/session-start.ts +17 -2
  587. package/src/session-runtime/index.ts +1 -1
  588. package/src/session-runtime/search-processor.ts +5 -2
  589. package/src/sidetab-core/model.ts +9 -6
  590. package/src/sidetab-core/visible-agent-mission.ts +108 -19
  591. package/src/sim-world-device-catalogs.json +182 -0
  592. package/src/skills/tools/shell.ts +7 -4
  593. package/src/steward/entrance-dispatch-shadow-adapter-child.ts +26 -0
  594. package/src/steward/entrance-dispatch-shadow-adapter.ts +196 -0
  595. package/src/steward/entrance-dispatch-shadow.ts +318 -0
  596. package/src/storage/short-lived-read-cache.ts +119 -0
  597. package/src/task-agent/card-evidence.ts +2 -1
  598. package/src/task-agent/entrance-shadow.ts +178 -0
  599. package/src/task-agent/mission.ts +9 -19
  600. package/src/task-agent/parent-host.ts +74 -4
  601. package/src/task-agent/repair-cycle.ts +75 -1
  602. package/src/task-agent/task-card-state.ts +161 -0
  603. package/src/task-agent/task-hand.ts +41 -141
  604. package/src/task-agent/work-order-build.ts +22 -1
  605. package/src/task-orchestrator/surfaces/gate-pod-pool-policy.ts +309 -0
  606. package/src/task-orchestrator/surfaces/pod-ledger-events.ts +194 -12
  607. package/src/task-orchestrator/surfaces/pod-pool.ts +55 -4
  608. package/src/task-orchestrator/surfaces/pod-warm-worker-provider.ts +57 -16
  609. package/src/task-orchestrator/surfaces/self-implement-pod.ts +40 -5
  610. package/src/task-orchestrator/surfaces/warm-reuse-evidence.ts +61 -0
  611. package/src/tool-runtime/agent-output-runtime.ts +1 -1
  612. package/src/tool-runtime/browser-hand-runtime.ts +41 -11
  613. package/src/tool-runtime/elanous-control-runtimes.ts +5 -2
  614. package/src/tool-runtime/elanous-ux-sim-devices-runtime.ts +43 -0
  615. package/src/tool-runtime/index.ts +2 -0
  616. package/src/tui/entry.ts +74 -24
  617. package/src/tui/sidetab/attach.ts +212 -34
  618. package/src/tui/sidetab/remote.ts +89 -0
  619. package/src/tui-client/dashboard-session.ts +2 -0
  620. package/src/tui-client/local-chat-turn.ts +9 -2
  621. package/src/user-config.ts +7 -1
  622. package/src/ux-sim/aside-feedback-loop.ts +181 -0
  623. package/src/ux-sim/author-reviewer-precheck-device.ts +78 -0
  624. package/src/ux-sim/burst-ready-ladder-sim.ts +225 -0
  625. package/src/ux-sim/codex-wire-capture.ts +26 -0
  626. package/src/ux-sim/event-monkey.ts +20 -2
  627. package/src/ux-sim/fake-bin.ts +72 -1
  628. package/src/ux-sim/fake-cloud-vm.ts +241 -0
  629. package/src/ux-sim/fake-fleet.ts +123 -0
  630. package/src/ux-sim/fake-kubectl.ts +21 -6
  631. package/src/ux-sim/fake-llm.ts +14 -1
  632. package/src/ux-sim/fake-ssh.ts +125 -0
  633. package/src/ux-sim/fake-telegram-video.ts +54 -0
  634. package/src/ux-sim/fixtures/git-worktree-accel-linux.json +239 -0
  635. package/src/ux-sim/gate-shard-host-reroute.ts +7 -3
  636. package/src/ux-sim/graph-runtime-overlay-event-path-worker.ts +79 -0
  637. package/src/ux-sim/graph-runtime-overlay-event-path.ts +102 -0
  638. package/src/ux-sim/grid-chaos-driver.ts +205 -0
  639. package/src/ux-sim/grid-ledger.ts +259 -0
  640. package/src/ux-sim/grid-ready-tiers.ts +253 -0
  641. package/src/ux-sim/heal-reauthor-materialized.ts +115 -0
  642. package/src/ux-sim/in-process-cli.ts +1 -1
  643. package/src/ux-sim/mock-device-requests.ts +189 -0
  644. package/src/ux-sim/mock-scenario-catalog.json +2934 -71
  645. package/src/ux-sim/mock-scenario-catalog.ts +139 -4
  646. package/src/ux-sim/next-tui-seat-scenarios.ts +52 -4
  647. package/src/ux-sim/release-sim-rig.ts +299 -7
  648. package/src/ux-sim/research-decision-chain.ts +220 -0
  649. package/src/ux-sim/safe-public-copy-publish.ts +89 -0
  650. package/src/ux-sim/scenario.ts +133 -14
  651. package/src/ux-sim/seminar-rehearsal.ts +108 -0
  652. package/src/ux-sim/service-key-setup.ts +37 -2
  653. package/src/ux-sim/warm-pool-reuse-sim.ts +256 -0
  654. package/src/ux-sim/world-schema.ts +216 -0
  655. package/src/ux-sim/world-store.ts +421 -0
  656. package/src/ux-sim/world.ts +524 -0
  657. package/src/version/packed-revision.json +1 -1
  658. package/src/video-pipeline/recipes/explainer.ts +237 -10
  659. package/src/video-pipeline/telegram-video-sender.ts +47 -0
  660. package/src/workflow-runtime/triggers/scheduler.ts +4 -4
  661. package/apps/pwa/out/_next/static/HMXsxdy5MIIcHPMHv1wD4/_buildManifest.js +0 -1
  662. package/apps/pwa/out/_next/static/chunks/08334415.f0e80896acbef722.js +0 -1
  663. package/apps/pwa/out/_next/static/chunks/1032-78ba4f6391258cab.js +0 -1
  664. package/apps/pwa/out/_next/static/chunks/1082-53f86a26e03d309d.js +0 -1
  665. package/apps/pwa/out/_next/static/chunks/1109-7d0e264f6f2edbc7.js +0 -1
  666. package/apps/pwa/out/_next/static/chunks/1124-7c26330402481143.js +0 -1
  667. package/apps/pwa/out/_next/static/chunks/118.2a89982fe4276880.js +0 -23
  668. package/apps/pwa/out/_next/static/chunks/1244.6c435dbf1bf21d8a.js +0 -1
  669. package/apps/pwa/out/_next/static/chunks/1252.9e665904d3aa3b1a.js +0 -32
  670. package/apps/pwa/out/_next/static/chunks/1306.967240ede9a0f757.js +0 -24
  671. package/apps/pwa/out/_next/static/chunks/1344.3b95f3bd1b77a3fe.js +0 -94
  672. package/apps/pwa/out/_next/static/chunks/1401.22dfe92640a2b1ac.js +0 -309
  673. package/apps/pwa/out/_next/static/chunks/1431-f7c78bd5be21e011.js +0 -1
  674. package/apps/pwa/out/_next/static/chunks/1451-cdd35a8a0b31834b.js +0 -1
  675. package/apps/pwa/out/_next/static/chunks/1708-f03d587b7a7545c8.js +0 -1
  676. package/apps/pwa/out/_next/static/chunks/1775-fa7152bdeff6c95f.js +0 -1
  677. package/apps/pwa/out/_next/static/chunks/1850-522de4ee34957210.js +0 -1
  678. package/apps/pwa/out/_next/static/chunks/1876-c6f6e0ddcc76c6a1.js +0 -1
  679. package/apps/pwa/out/_next/static/chunks/1976.097066b072432242.js +0 -1
  680. package/apps/pwa/out/_next/static/chunks/1978.eeb60a606dc5deac.js +0 -2
  681. package/apps/pwa/out/_next/static/chunks/2043.e233e3b5a3e790f5.js +0 -1
  682. package/apps/pwa/out/_next/static/chunks/2150.71b94e3348107c83.js +0 -1
  683. package/apps/pwa/out/_next/static/chunks/2158.ebc6fc5a10280ab7.js +0 -1
  684. package/apps/pwa/out/_next/static/chunks/2216.802962c04f40a26e.js +0 -64
  685. package/apps/pwa/out/_next/static/chunks/2294.7890edcfa046c97d.js +0 -1
  686. package/apps/pwa/out/_next/static/chunks/235.c89aaae4bcd6233a.js +0 -74
  687. package/apps/pwa/out/_next/static/chunks/239.de075467b5523469.js +0 -287
  688. package/apps/pwa/out/_next/static/chunks/249.ba7051590d603c8f.js +0 -226
  689. package/apps/pwa/out/_next/static/chunks/2571.a6ac4e26c8618403.js +0 -1
  690. package/apps/pwa/out/_next/static/chunks/2610.e149cd564a08913e.js +0 -1
  691. package/apps/pwa/out/_next/static/chunks/2801.afeb8a4dae22f85f.js +0 -1
  692. package/apps/pwa/out/_next/static/chunks/2954.bbefc95d6b20e0d8.js +0 -1
  693. package/apps/pwa/out/_next/static/chunks/3042.96ec235fe41c8d4e.js +0 -1
  694. package/apps/pwa/out/_next/static/chunks/3097-8e358f158acef46b.js +0 -1
  695. package/apps/pwa/out/_next/static/chunks/3205-93b1abe28b4fb16a.js +0 -1
  696. package/apps/pwa/out/_next/static/chunks/3273.b4434f0dcae7eb29.js +0 -1
  697. package/apps/pwa/out/_next/static/chunks/3311.9cbc43ea0c90d60c.js +0 -1
  698. package/apps/pwa/out/_next/static/chunks/3503.a47a9755fb4d97b0.js +0 -1
  699. package/apps/pwa/out/_next/static/chunks/3506-5f429b3b7e1392b0.js +0 -1
  700. package/apps/pwa/out/_next/static/chunks/3843.bad404d008893291.js +0 -77
  701. package/apps/pwa/out/_next/static/chunks/3877-4b40e530b47e3bf9.js +0 -1
  702. package/apps/pwa/out/_next/static/chunks/435-ce2958253cf7de61.js +0 -1
  703. package/apps/pwa/out/_next/static/chunks/4393.28fa5228d0eec217.js +0 -149
  704. package/apps/pwa/out/_next/static/chunks/4404.7281c847c6e10dfc.js +0 -1
  705. package/apps/pwa/out/_next/static/chunks/447-5b304de1fe098f43.js +0 -1
  706. package/apps/pwa/out/_next/static/chunks/4484-8ebea83d431e6fae.js +0 -1
  707. package/apps/pwa/out/_next/static/chunks/4599-f95790fc5c65b8df.js +0 -1
  708. package/apps/pwa/out/_next/static/chunks/463-b9114e411f33728e.js +0 -1
  709. package/apps/pwa/out/_next/static/chunks/4659.a57d1f0c5d754cd2.js +0 -36
  710. package/apps/pwa/out/_next/static/chunks/4722-a847e7a28115035f.js +0 -1
  711. package/apps/pwa/out/_next/static/chunks/4874-c86f878ec4502ad3.js +0 -1
  712. package/apps/pwa/out/_next/static/chunks/4891.3f80ba517a3b2373.js +0 -1
  713. package/apps/pwa/out/_next/static/chunks/4998.810ca8833084caa9.js +0 -62
  714. package/apps/pwa/out/_next/static/chunks/4f98febc.ea5841d4d616bfb2.js +0 -1
  715. package/apps/pwa/out/_next/static/chunks/5052.7dbb12a55d4f18f5.js +0 -1
  716. package/apps/pwa/out/_next/static/chunks/5166-ca73b3e361085a6d.js +0 -1
  717. package/apps/pwa/out/_next/static/chunks/5180-039f4a18b07ad387.js +0 -1
  718. package/apps/pwa/out/_next/static/chunks/5232.5a2ce4daf7a9e11d.js +0 -115
  719. package/apps/pwa/out/_next/static/chunks/5439.3fec6dbce29ecb36.js +0 -1
  720. package/apps/pwa/out/_next/static/chunks/5612-074d9a5e00dfac6a.js +0 -1
  721. package/apps/pwa/out/_next/static/chunks/5675-01989d524a84c505.js +0 -1
  722. package/apps/pwa/out/_next/static/chunks/5751.af641a1adf5ec697.js +0 -1
  723. package/apps/pwa/out/_next/static/chunks/5758-c6cb98714d18ab0c.js +0 -1
  724. package/apps/pwa/out/_next/static/chunks/578eded8.b582637306e16964.js +0 -122
  725. package/apps/pwa/out/_next/static/chunks/5853-4033e5bd5afbe06b.js +0 -1
  726. package/apps/pwa/out/_next/static/chunks/5904.97d70bb7f46b2db7.js +0 -1
  727. package/apps/pwa/out/_next/static/chunks/6036-c302c34ff0b3d410.js +0 -1
  728. package/apps/pwa/out/_next/static/chunks/606.ef81c313381f4264.js +0 -1
  729. package/apps/pwa/out/_next/static/chunks/616.1af54a928b1ba704.js +0 -1
  730. package/apps/pwa/out/_next/static/chunks/6201.bc936f71f613a8e9.js +0 -41
  731. package/apps/pwa/out/_next/static/chunks/6204-fdc86e0e64c4f92d.js +0 -1
  732. package/apps/pwa/out/_next/static/chunks/63699a35.17262e162bc514b2.js +0 -1
  733. package/apps/pwa/out/_next/static/chunks/6420.494801a80030160c.js +0 -27
  734. package/apps/pwa/out/_next/static/chunks/6931.fcdfb94141e67b3d.js +0 -1
  735. package/apps/pwa/out/_next/static/chunks/6991-8e081c6ce38c0ba1.js +0 -1
  736. package/apps/pwa/out/_next/static/chunks/7010.1bbd17a7f2b3e376.js +0 -1
  737. package/apps/pwa/out/_next/static/chunks/7029.d1466acf55fae2ed.js +0 -1
  738. package/apps/pwa/out/_next/static/chunks/7152-a123aa8e129c131f.js +0 -1
  739. package/apps/pwa/out/_next/static/chunks/7455.196168fffac3b9c4.js +0 -24
  740. package/apps/pwa/out/_next/static/chunks/7638.6ca4770dd1129138.js +0 -1
  741. package/apps/pwa/out/_next/static/chunks/7649-f37d76260e5e2a5a.js +0 -1
  742. package/apps/pwa/out/_next/static/chunks/7751.04bfbd16b4c6cd0a.js +0 -1
  743. package/apps/pwa/out/_next/static/chunks/7869-c47bd2c075c1fefa.js +0 -1
  744. package/apps/pwa/out/_next/static/chunks/8442.2f09ca969d631615.js +0 -1
  745. package/apps/pwa/out/_next/static/chunks/8445.2738dbd59a78c78c.js +0 -1
  746. package/apps/pwa/out/_next/static/chunks/8447.5510c439f9938c6d.js +0 -286
  747. package/apps/pwa/out/_next/static/chunks/8635-57a9d8d9db70f4f1.js +0 -1
  748. package/apps/pwa/out/_next/static/chunks/86961958-4b0689a5048f756b.js +0 -1
  749. package/apps/pwa/out/_next/static/chunks/8709.3c6019bb18f8554f.js +0 -8
  750. package/apps/pwa/out/_next/static/chunks/8759.c999528a0a907bf6.js +0 -1
  751. package/apps/pwa/out/_next/static/chunks/87f498e5-0881de09f2e44707.js +0 -1
  752. package/apps/pwa/out/_next/static/chunks/8843.c3197f904c952b81.js +0 -1
  753. package/apps/pwa/out/_next/static/chunks/8971-8d3b9c96f8a6c958.js +0 -1
  754. package/apps/pwa/out/_next/static/chunks/9059.c8598d96f8e5e9cd.js +0 -1
  755. package/apps/pwa/out/_next/static/chunks/9115.90447ae198b84eae.js +0 -1
  756. package/apps/pwa/out/_next/static/chunks/9147.d9b0a02e0babc9b4.js +0 -93
  757. package/apps/pwa/out/_next/static/chunks/9204-83075f4b70c61cdc.js +0 -1
  758. package/apps/pwa/out/_next/static/chunks/9244-c32ef14b5dc72bdf.js +0 -1
  759. package/apps/pwa/out/_next/static/chunks/930.2a9a30f964350c66.js +0 -90
  760. package/apps/pwa/out/_next/static/chunks/9398.1f56e3f17795f43f.js +0 -1
  761. package/apps/pwa/out/_next/static/chunks/9527.3e5ad31c891c5fcb.js +0 -79
  762. package/apps/pwa/out/_next/static/chunks/9571-4ac933e774d1225c.js +0 -1
  763. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-9fc644de2d8edae3.js +0 -1
  764. package/apps/pwa/out/_next/static/chunks/app/approvals/page-0c9dace2db62bee8.js +0 -1
  765. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-f5e65c3dc9d89f2a.js +0 -1
  766. package/apps/pwa/out/_next/static/chunks/app/board/page-2a9c19b9a140b7b1.js +0 -1
  767. package/apps/pwa/out/_next/static/chunks/app/botlab/page-61533ad92141adfb.js +0 -1
  768. package/apps/pwa/out/_next/static/chunks/app/bots/page-112004ced6fd0329.js +0 -1
  769. package/apps/pwa/out/_next/static/chunks/app/ceo/page-f733318c237a49d8.js +0 -1
  770. package/apps/pwa/out/_next/static/chunks/app/chat/page-51ea677d2d33bbc0.js +0 -1
  771. package/apps/pwa/out/_next/static/chunks/app/consult/page-428b41f2f9566e3c.js +0 -1
  772. package/apps/pwa/out/_next/static/chunks/app/control/page-1b29396ea90a61e5.js +0 -1
  773. package/apps/pwa/out/_next/static/chunks/app/decisions/page-cf83ec613ac904bf.js +0 -1
  774. package/apps/pwa/out/_next/static/chunks/app/design-check/page-3f4c0ecbc284bb5f.js +0 -1
  775. package/apps/pwa/out/_next/static/chunks/app/editor/page-b63c322f54f70cc6.js +0 -1
  776. package/apps/pwa/out/_next/static/chunks/app/exec/page-fe328c4ee9aac6b4.js +0 -1
  777. package/apps/pwa/out/_next/static/chunks/app/field/page-bfb855c584f0fb98.js +0 -1
  778. package/apps/pwa/out/_next/static/chunks/app/healthz/route-9fc644de2d8edae3.js +0 -1
  779. package/apps/pwa/out/_next/static/chunks/app/inside/page-47b1710c110eabd7.js +0 -1
  780. package/apps/pwa/out/_next/static/chunks/app/intake/page-42895214458bc6d2.js +0 -1
  781. package/apps/pwa/out/_next/static/chunks/app/layout-d03de0ebd8366e23.js +0 -1
  782. package/apps/pwa/out/_next/static/chunks/app/live/page-3ed6c47e4b1c61c2.js +0 -1
  783. package/apps/pwa/out/_next/static/chunks/app/live-run/page-ae653e9bf261c738.js +0 -1
  784. package/apps/pwa/out/_next/static/chunks/app/loops/page-23f3f0a0209c0ac4.js +0 -1
  785. package/apps/pwa/out/_next/static/chunks/app/market/page-88c691273aae66f9.js +0 -1
  786. package/apps/pwa/out/_next/static/chunks/app/morning/page-6e45828daed1295e.js +0 -1
  787. package/apps/pwa/out/_next/static/chunks/app/not-found-edb5d7287bb46186.js +0 -1
  788. package/apps/pwa/out/_next/static/chunks/app/observatory/page-4a7eaacd93c3f6a5.js +0 -1
  789. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-3ca073d43d74cc84.js +0 -1
  790. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-1e9fee67b1199436.js +0 -1
  791. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-df1283ea963c6816.js +0 -1
  792. package/apps/pwa/out/_next/static/chunks/app/outputs/page-19fcf8d8301ccd18.js +0 -1
  793. package/apps/pwa/out/_next/static/chunks/app/page-5ab699e0303bbb40.js +0 -1
  794. package/apps/pwa/out/_next/static/chunks/app/reflection/page-7cde0d29756984c5.js +0 -1
  795. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-9d4c598e8ee22f7a.js +0 -1
  796. package/apps/pwa/out/_next/static/chunks/app/sessions/page-cc1609a71f44ec62.js +0 -1
  797. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-7659a9a1345bfaa9.js +0 -1
  798. package/apps/pwa/out/_next/static/chunks/app/settings/page-0afef60ecc0c4af5.js +0 -1
  799. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-a3553949f8f34f5f.js +0 -1
  800. package/apps/pwa/out/_next/static/chunks/app/setup/layout-9fc644de2d8edae3.js +0 -1
  801. package/apps/pwa/out/_next/static/chunks/app/setup/page-057a69702f3c67c7.js +0 -1
  802. package/apps/pwa/out/_next/static/chunks/app/share/page-c0f0e570f3f74c73.js +0 -1
  803. package/apps/pwa/out/_next/static/chunks/app/showroom/page-1825071ae34e3b89.js +0 -1
  804. package/apps/pwa/out/_next/static/chunks/app/tasks/page-6244e3e135d8ccfc.js +0 -1
  805. package/apps/pwa/out/_next/static/chunks/app/term/page-da787e8a10b8a82e.js +0 -1
  806. package/apps/pwa/out/_next/static/chunks/app/today/page-1316d32498e2be42.js +0 -1
  807. package/apps/pwa/out/_next/static/chunks/app/trace/page-4df94572e343de2e.js +0 -1
  808. package/apps/pwa/out/_next/static/chunks/app/vault/page-708969f7475e88c1.js +0 -1
  809. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-c58add08c919a1dc.js +0 -1
  810. package/apps/pwa/out/_next/static/chunks/app/workflows/page-a24847f45e5d5bf9.js +0 -1
  811. package/apps/pwa/out/_next/static/chunks/app/workspace/page-acfec65a3a60e22e.js +0 -1
  812. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-3dfc598e6fbde245.js +0 -1
  813. package/apps/pwa/out/_next/static/chunks/framework-c658a626118411b7.js +0 -1
  814. package/apps/pwa/out/_next/static/chunks/main-4c73685fd891445b.js +0 -1
  815. package/apps/pwa/out/_next/static/chunks/main-app-6310f7e5de7dd01d.js +0 -1
  816. package/apps/pwa/out/_next/static/chunks/pages/_app-51c326bf48610be1.js +0 -1
  817. package/apps/pwa/out/_next/static/chunks/pages/_error-d0beadf754da59b0.js +0 -1
  818. package/apps/pwa/out/_next/static/chunks/webpack-acd243bfbf3f6732.js +0 -1
  819. package/apps/pwa/out/_next/static/css/d1f8bb401740a549.css +0 -1
  820. /package/apps/pwa/out/_next/static/{HMXsxdy5MIIcHPMHv1wD4 → 98VlBaYvL-VVnCq93_lFS}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4540],{15153:(e,t,s)=>{s.d(t,{X:()=>i});var a=s(61581);let r=null,n=[],l=[];function i(e){let[t,s]=(0,a.useState)(()=>r&&Date.now()-r.at<3e5?r.providers:n),[i,d]=(0,a.useState)(()=>r&&Date.now()-r.at<3e5?r.models:l),[o,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(null),x=(0,a.useCallback)(async()=>{c(!0),m(null);try{let t=await e.getRegistryCatalog(),a=t.providers.map(e=>({id:e.id,displayName:e.displayName,aliases:e.aliases,modelPrefixes:e.modelPrefixes,apiKeyEnv:e.apiKeyEnv,endpointPattern:e.endpointPattern,capabilities:e.capabilities,builtIn:e.builtIn})),n=t.models.map(e=>({id:e.id,provider:e.provider,displayName:e.displayName,...void 0!==e.family?{family:e.family}:{},...void 0!==e.familyShortcut?{familyShortcut:e.familyShortcut}:{},...void 0!==e.contextSize?{contextSize:e.contextSize}:{},...void 0!==e.outputMaxTokens?{outputMaxTokens:e.outputMaxTokens}:{},...void 0!==e.vision?{vision:e.vision}:{},...void 0!==e.reasoning?{reasoning:e.reasoning}:{},...void 0!==e.toolCalling?{toolCalling:e.toolCalling}:{},...void 0!==e.pricing?{pricing:e.pricing}:{},...void 0!==e.deprecated?{deprecated:e.deprecated}:{},...void 0!==e.releaseDate?{releaseDate:e.releaseDate}:{},...void 0!==e.kind?{kind:e.kind}:{}}));r={at:Date.now(),providers:a,models:n},s(a),d(n)}catch(e){m(e instanceof Error?e.message:String(e))}finally{c(!1)}},[e]);(0,a.useEffect)(()=>{if(r&&Date.now()-r.at<3e5){s(r.providers),d(r.models);return}x()},[x]);let p=(0,a.useCallback)(async()=>{r=null,await x()},[x]),h=(0,a.useMemo)(()=>t.map(e=>e.id),[t]),f=(0,a.useMemo)(()=>{let e=new Map;for(let t of i){let s=e.get(t.provider);s?s.push(t):e.set(t.provider,[t])}return t=>{var s;return t?null!=(s=e.get(t))?s:[]:i}},[i]);return{providers:t,providerIds:h,models:i,modelsByProvider:f,loading:o,error:u,reload:p}}},23240:(e,t,s)=>{s.d(t,{D:()=>p,ThemeProvider:()=>x,z:()=>i});var a=s(68441),r=s(61581),n=s(415),l=s(22058);let i=["catppuccin-mocha","mocha-pastel-accent","catppuccin-latte","rose-pine-dawn","nord-light","elanous-pastel-default"],d="elanous.pwa.theme",o="dashboard.theme.active",c="catppuccin-mocha";function u(e){return"string"==typeof e&&i.includes(e)}let m=(0,r.createContext)(null);function x(e){let{children:t}=e,s=(0,l.Qj)(),[x,p]=(0,r.useState)(c),h=(0,r.useRef)(0),f=(0,r.useCallback)(e=>{p(e),document.documentElement.dataset.theme=e},[]);(0,r.useEffect)(()=>{let e=localStorage.getItem(d),t=u(e)?e:c;f(t),(0,n.cY)("webterm.provider.theme.init",{theme:t})},[f]),(0,r.useEffect)(()=>{if(!s)return;let e=!0,t=h.current;return s.getSwitch(o).then(s=>{let{switch:a}=s;e&&t===h.current&&u(a.value)&&(f(a.value),localStorage.setItem(d,a.value))}).catch(()=>void 0),()=>{e=!1}},[f,s]);let b=(0,r.useCallback)(e=>{u(e)&&(h.current+=1,f(e),localStorage.setItem(d,e),(0,n.cY)("webterm.provider.theme.set",{theme:e}),null==s||s.putSwitch(o,{value:e}).catch(()=>void 0))},[f,s]);return(0,a.jsx)(m.Provider,{value:{theme:x,setTheme:b,themes:i},children:t})}function p(){let e=(0,r.useContext)(m);if(!e)throw Error("useTheme must be used inside <ThemeProvider>");return e}},74540:(e,t,s)=>{s.d(t,{O:()=>e8});var a=s(68441),r=s(61581),n=s(4935),l=s(23240),i=s(84663),d=s(73710),o=s(78214),c=s(74506);let u="pushcut-webhook",m="pushcut";async function x(e,t){return e.fetchJson("/v1/config/secrets",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:u,value:t})})}async function p(e){return e.fetchJson("/v1/registry/bindings?channel=".concat(m))}async function h(e,t){var s;let a=null!=(s=t.method)?s:"POST",r={};return void 0!==t.sessionId&&(r.sessionId=t.sessionId),void 0!==t.label&&(r.label=t.label),void 0!==t.meta&&(r.meta=t.meta),void 0!==t.mergeMeta&&(r.mergeMeta=t.mergeMeta),e.fetchJson("/v1/registry/bindings/".concat(m,"/").concat(encodeURIComponent(t.token)),{method:a,headers:{"content-type":"application/json"},body:JSON.stringify(r)})}async function f(e,t){return e.fetchJson("/v1/registry/bindings/".concat(m,"/").concat(encodeURIComponent(t)),{method:"DELETE"})}var b=s(415);let g="elanous.pwa.pushSubscriptionId",j="elanous.pwa.pushSubscriptionLabel";function v(){let e="Notification"in window&&"serviceWorker"in navigator&&"PushManager"in window,t=null,s=null;try{t=window.localStorage.getItem(g),s=window.localStorage.getItem(j)}catch(e){}return{supported:e,permission:e?Notification.permission:"unknown",cachedId:t,cachedLabel:s}}async function y(e){var t,s;let a,r;if(!("Notification"in window)||!("serviceWorker"in navigator)||!("PushManager"in window))return{status:"unsupported",reason:"Notification/PushManager API absent"};if(!e.baseUrl)return{status:"error",reason:"daemon baseUrl not configured"};if("granted"!==await Notification.requestPermission())return(0,b.cY)("pwa.push.permission-denied"),{status:"permission-denied"};let n=e.baseUrl.replace(/\/$/,"");try{let e=await fetch("".concat(n,"/v1/push/vapid-public-key"));if(!e.ok)throw Error("HTTP ".concat(e.status));let t=await e.json();if(!t.publicKey)throw Error("missing publicKey in response");a=t.publicKey}catch(e){return{status:"error",reason:"vapid fetch: ".concat(e instanceof Error?e.message:String(e))}}let l=await navigator.serviceWorker.ready;try{r=await l.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),s=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),a=new Uint8Array(s.length);for(let e=0;e<s.length;e+=1)a[e]=s.charCodeAt(e);return a}(a)})}catch(e){return{status:"error",reason:"subscribe: ".concat(e instanceof Error?e.message:String(e))}}let i=r.toJSON(),d=null!=(s=e.label)?s:"".concat(null!=(t=navigator.userAgent.split(" ")[0])?t:"browser"," ").concat(new Date().toISOString().slice(0,10));try{let t=await fetch("".concat(n,"/v1/push/subscribe"),{method:"POST",headers:{"content-type":"application/json",...e.token?{authorization:"Bearer ".concat(e.token)}:{}},body:JSON.stringify({subscription:i,label:d})});if(!t.ok){let e=await t.text();try{await r.unsubscribe()}catch(e){}return{status:"error",reason:"subscribe POST: ".concat(t.status," ").concat(e.slice(0,200))}}let s=await t.json();if(!s.id){try{await r.unsubscribe()}catch(e){}return{status:"error",reason:"daemon did not return subscription id"}}try{window.localStorage.setItem(g,s.id),window.localStorage.setItem(j,d)}catch(e){}return(0,b.cY)("pwa.push.enabled",{id:s.id,label:d}),{status:"enabled",id:s.id}}catch(e){try{await r.unsubscribe()}catch(e){}return{status:"error",reason:e instanceof Error?e.message:String(e)}}}async function N(e){let t=null;try{t=window.localStorage.getItem(g)}catch(e){}if(!t)return{status:"not-subscribed"};try{if("serviceWorker"in navigator){let e=await navigator.serviceWorker.ready,t=await e.pushManager.getSubscription();t&&await t.unsubscribe()}}catch(e){}if(e.baseUrl)try{await fetch("".concat(e.baseUrl.replace(/\/$/,""),"/v1/push/subscribe/").concat(encodeURIComponent(t)),{method:"DELETE",...e.token?{headers:{authorization:"Bearer ".concat(e.token)}}:{}})}catch(e){(0,b.cY)("pwa.push.disable.daemon-failed",{reason:e instanceof Error?e.message:String(e)})}try{window.localStorage.removeItem(g),window.localStorage.removeItem(j)}catch(e){}return{status:"disabled"}}var k=s(22058);let w=[{value:"none",label:"none — auto-detect / Quick Setup 안내"},{value:"codex",label:"codex — OpenAI Codex (OAuth or OPENAI_API_KEY)"},{value:"claude-code",label:"claude-code — Anthropic (claude-code CLI 인증)"},{value:"gemini",label:"gemini — Google (GEMINI_API_KEY)"}];function S(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"loading"});try{let t=await e.getChatBackendDetection();s({status:"ok",snapshot:t})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async t=>{if(e){l({status:"mutating",target:t});try{await e.putSwitch("global.chat.defaultBackend",{value:t}),await c(),l({status:"idle"})}catch(e){l({status:"error",error:e.message})}}},[e,c]);return((0,r.useEffect)(()=>{c()},[c]),i&&e)?(0,a.jsxs)("section",{"data-testid":"quick-setup-card",className:"rounded border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Quick Setup — chat 백엔드"}),(0,a.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"chat 탭이 사용할 LLM 백엔드 1개만 셋업하면 됩니다. 데스크탑 NEXUS TUI Settings 탭과 같은 안내."})]}),(0,a.jsx)(d.$,{"data-testid":"quick-setup-refresh",variant:"outline",size:"sm",disabled:"loading"===t.status,onClick:()=>void c(),"aria-label":"detection 재실행",title:"env / OAuth 재감지 (TUI 의 r 키 mirror)",children:"loading"===t.status?"…":"Refresh"})]}),"idle"===t.status&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"대기 중…"}),"loading"===t.status&&(0,a.jsx)("p",{"data-testid":"quick-setup-loading",className:"text-xs text-muted-foreground",children:"detection 진행 중…"}),"error"===t.status&&(0,a.jsx)("p",{"data-testid":"quick-setup-error",className:"text-xs text-destructive",children:t.error}),"ok"===t.status&&(0,a.jsx)(C,{snapshot:t.snapshot,swap:n,onSwap:u})]}):null}function C(e){let{snapshot:t,swap:s,onSwap:r}=e,n="none"!==t.detection.backend;return(0,a.jsxs)("div",{className:"space-y-3 text-xs",children:[(0,a.jsx)("div",{"data-testid":"quick-setup-status",children:n?(0,a.jsxs)("span",{children:["현재 wired \xb7"," ",(0,a.jsx)("code",{className:"rounded bg-muted px-1 font-mono",children:t.detection.backend})," ",(0,a.jsxs)("span",{className:"text-muted-foreground",children:["(",t.detection.source,")"]})]}):(0,a.jsx)("span",{className:"text-muted-foreground",children:"현재 wired \xb7 (없음 — 아래 3 provider 중 1개 셋업)"})}),(0,a.jsx)("ul",{className:"space-y-2","data-testid":"quick-setup-entries",children:t.entries.map(e=>(0,a.jsx)(U,{entry:e,wired:t.detection.backend===e.provider},e.provider))}),(0,a.jsxs)("div",{className:"space-y-1 border-t border-border/40 pt-2",children:[(0,a.jsx)("label",{className:"block text-[11px] text-muted-foreground",htmlFor:"quick-setup-swap",children:"Backend swap (`global.chat.defaultBackend` 변경)"}),(0,a.jsx)("select",{id:"quick-setup-swap","data-testid":"quick-setup-swap",value:t.detection.backend,disabled:"mutating"===s.status,onChange:e=>r(e.target.value),className:"flex h-8 w-full rounded-md border border-input bg-background px-2 py-1 text-xs shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",children:w.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"mutating"===s.status&&(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["적용 중 (target: ",(0,a.jsx)("code",{children:s.target}),")…"]}),"error"===s.status&&(0,a.jsxs)("p",{"data-testid":"quick-setup-swap-error",className:"text-[11px] text-destructive",children:["swap 실패 \xb7 ",s.error]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"새 chat 탭부터 적용 \xb7 기존 chat 인스턴스는 per-tab override 또는 재시작 시 반영. 변경은 즉시 NEXUS daemon 의 UserConfig 에 저장."})]}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Grok \xb7 중국 4종 (kimi/qwen/glm/deepseek) 등은 NEXUS chat 우선순위 외 — daemon 탭 또는 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous legacy"})," ","에서 사용."]})]})}function U(e){let{entry:t,wired:s}=e;return(0,a.jsxs)("li",{"data-testid":"quick-setup-provider-".concat(t.provider),"data-wired":s?"true":"false",className:"rounded border border-border/60 bg-background p-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 font-medium",children:[(0,a.jsx)("span",{"aria-hidden":"true",children:s?"▶":" "}),(0,a.jsx)("span",{children:t.label})]}),(0,a.jsx)("ul",{className:"mt-1 space-y-1",children:t.paths.map(e=>(0,a.jsxs)("li",{"data-testid":"quick-setup-path-".concat(t.provider,"-").concat(e.tag),"data-detected":e.detected?"true":"false",className:"flex gap-2",children:[(0,a.jsx)("span",{"aria-label":e.detected?"detected":"missing",children:e.detected?"✓":"◯"}),(0,a.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:e.tag}),(0,a.jsx)("span",{className:"text-[11px]",children:e.hint})]},e.tag))})]})}var P=s(46278),E=s(75756),M=s(63584);let A="global.nexus.firstBootGuideShown";function z(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"loading"});try{let t=await e.getSwitch(A),a=!0===t.switch.value;s({status:a?"hidden":"shown"})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async()=>{if(e){l(!0);try{await e.putSwitch(A,{value:!0}),s({status:"hidden"})}catch(e){s({status:"error",error:e.message})}finally{l(!1)}}},[e]);return((0,r.useEffect)(()=>{c()},[c]),i&&e&&"shown"===t.status)?(0,a.jsxs)("section",{"data-testid":"welcome-card",className:"rounded border border-primary/30 bg-primary/5 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"✦ Welcome to elanous NEXUS"}),(0,a.jsx)(d.$,{"data-testid":"welcome-card-dismiss",variant:"ghost",size:"sm",disabled:n,onClick:()=>void u(),"aria-label":"환영 카드 닫기",children:n?"…":"Got it"})]}),(0,a.jsxs)("div",{className:"space-y-2 text-xs text-muted-foreground",children:[(0,a.jsx)("p",{children:"모바일 / iOS / 원격에서도 같은 NEXUS 에 접속 — 데스크탑 TUI 와 이 PWA 는 같은 daemon 의 두 surface (UserConfig SSoT 공유)."}),(0,a.jsxs)("p",{children:["Chat 백엔드를 셋업하지 않았다면 위의 ",(0,a.jsx)("strong",{children:"Quick Setup"})," ","카드에서 1개만 선택하면 됩니다."]}),(0,a.jsxs)("p",{children:["Telegram \xb7 Discord allowlist \xb7 자동 부팅 (launchd / systemd) 등"," ",(0,a.jsx)("em",{children:"advanced 셋업"}),"은 데스크탑에서"," ",(0,a.jsx)("span",{className:"font-mono",children:"elanous legacy"})," →"," ",(0,a.jsx)("span",{className:"font-mono",children:"/setup"})," wizard 에서 셋업 (NEXUS 미mirror 영역)."]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"font-mono",children:"[Got it]"})," ","한 번 누르면 다음부터 안 보입니다 (TUI 와 동기화)."]})]})]}):null}let I=[{area:"Chat 백엔드",status:"✓ NEXUS native",location:"PWA Quick Setup card"},{area:"Telegram bot token",status:"✓ NEXUS native",location:"PWA Secret modal"},{area:"Discord bot token",status:"✓ NEXUS native",location:"PWA Secret modal"},{area:"Telegram allowlist",status:"◯ Wizard 전용",location:"desktop",cmd:"elanous legacy → /setup"},{area:"Discord guild \xb7 voice",status:"◯ Wizard 전용",location:"desktop",cmd:"elanous legacy → /setup"},{area:"OS 자동 부팅",status:"◯ NEXUS subcommand",location:"desktop",cmd:"elanous nexus install --launchd"}];function T(){return(0,a.jsxs)("section",{"data-testid":"advanced-setup-map",className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Advanced setup map"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:[(0,a.jsx)("p",{className:"mb-2 text-muted-foreground",children:"NEXUS native 셋업 영역은 PWA 에서 직접 \xb7 그 외 advanced 셋업은 desktop wizard 또는 NEXUS subcommand 에서."}),(0,a.jsxs)("table",{className:"w-full text-left text-[11px]",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border text-muted-foreground",children:[(0,a.jsx)("th",{className:"py-1 pr-2 font-medium",children:"영역"}),(0,a.jsx)("th",{className:"py-1 pr-2 font-medium",children:"상태"}),(0,a.jsx)("th",{className:"py-1 font-medium",children:"셋업 위치"})]})}),(0,a.jsx)("tbody",{children:I.map(e=>(0,a.jsxs)("tr",{"data-testid":"advanced-setup-row-".concat(e.area),className:"border-b border-border/50 last:border-0",children:[(0,a.jsx)("td",{className:"py-1.5 pr-2 font-medium",children:e.area}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono text-[10px]",children:e.status}),(0,a.jsxs)("td",{className:"py-1.5 text-muted-foreground",children:[e.location,e.cmd&&(0,a.jsxs)(a.Fragment,{children:[" \xb7 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[10px]",children:e.cmd})]})]})]},e.area))})]})]})]})}function R(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)({status:"idle"}),[n,l]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{o(!0)},[]);let c=(0,r.useCallback)(async()=>{if(e){s({status:"minting"}),l(!1);try{let t=await e.mintConnectToken();s({status:"shown",token:t.token,hint:t.hint})}catch(e){s({status:"error",error:e.message})}}},[e]),u=(0,r.useCallback)(async()=>{if("shown"===t.status)try{await navigator.clipboard.writeText(t.token),l(!0),setTimeout(()=>l(!1),2e3)}catch(e){s({status:"error",error:"clipboard: ".concat(e.message)})}},[t]);return i&&e?(0,a.jsxs)("section",{"data-testid":"connect-token-card",className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"연결 토큰 만들기 (다른 기기용)"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(0,a.jsxs)("p",{className:"text-muted-foreground",children:["다른 머신에서 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous nexus connect <host>"})," 시 paste 할 bearer token 을 발급. 한 번 paste 하면 그 머신의 bookmark 에 영구 저장 — 매번 재발급할 필요 없음."]}),"idle"===t.status&&(0,a.jsx)(d.$,{size:"sm",onClick:()=>void c(),"data-testid":"connect-token-generate",children:"Generate connect token"}),"minting"===t.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Minting…"}),"shown"===t.status&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("code",{className:"block break-all rounded bg-muted p-2 font-mono text-[11px] select-all","data-testid":"connect-token-value",children:t.token}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(d.$,{size:"sm",onClick:()=>void u(),"data-testid":"connect-token-copy",children:n?"✓ Copied":"Copy to clipboard"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>s({status:"idle"}),"data-testid":"connect-token-hide",children:"Hide"})]}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:t.hint})]}),"error"===t.status&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-rose-500",children:["발급 실패: ",t.error]}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>s({status:"idle"}),children:"Reset"})]})]})]}):null}var L=s(76404),D=s(41445),$=s(41799),O=s(76168),Y=s(19912),B=s(28626);function _(){return(0,k.Qj)()?(0,a.jsx)(Q,{}):null}function Q(){var e;let{data:t,isLoading:s,error:r,refetch:n,isFetching:l}=function(){let e=(0,k.M1)();return(0,Y.I)({queryKey:B.AF.platforms(),queryFn:()=>e.getPlatforms(),refetchInterval:3e4})}(),i=null!=(e=null==t?void 0:t.platforms)?e:[],d=i.filter(e=>"connected"===e.status).length;return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"platform-connections-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Platform connections"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)("span",{"data-testid":"platform-summary",children:t?"".concat(d," of ").concat(i.length," connected"):s?"loading…":""}),(0,a.jsx)("button",{type:"button",onClick:()=>n(),disabled:l,"aria-label":"Refresh platform connection status",className:"rounded p-1 hover:bg-surface-elevated disabled:opacity-50",children:(0,a.jsx)(L.A,{className:"h-3 w-3 ".concat(l?"animate-spin":"")})})]})]}),r&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),r instanceof Error?r.message:"Failed to load platform list"]}),s&&!t&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/platforms…"}),t&&(0,a.jsx)("ul",{className:"space-y-1.5",role:"list",children:i.map(e=>(0,a.jsx)(W,{entry:e},e.id))})]})}function W(e){let{entry:t}=e,s="connected"===t.status;return(0,a.jsxs)("li",{"data-testid":"platform-row-".concat(t.id),"data-status":t.status,className:"flex items-start gap-3 rounded-md border border-border bg-surface px-3 py-2",children:[(0,a.jsx)("div",{className:"mt-0.5 flex-shrink-0",children:s?(0,a.jsx)($.A,{className:"h-4 w-4 text-green-600","aria-label":"connected"}):(0,a.jsx)(O.A,{className:"h-4 w-4 text-muted-foreground","aria-label":"not configured"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,a.jsx)("span",{className:"text-[12px] font-medium",children:t.label}),(0,a.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wider ".concat(s?"bg-green-600/10 text-green-700":"bg-muted text-muted-foreground"),children:s?"connected":"not configured"})]}),(0,a.jsx)("div",{className:"text-[11px] text-muted-foreground",children:t.detail}),!s&&t.hint&&(0,a.jsx)("div",{className:"text-[10px] italic text-muted-foreground/80",children:t.hint})]})]})}var F=s(5110);function H(){var e,t;let s=(0,k.Qj)(),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)({status:"idle"}),[c,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(!0)},[]);let m=(0,r.useCallback)(async()=>{if(s){l({status:"loading"});try{var e,t,a;let r=await fetch("".concat(s.baseUrl,"/v1/hitl/audit/recent?channel=pushcut&limit=").concat(1),{credentials:"include"}),n=await r.json();if(!r.ok||!n.ok)return void l({status:"error",error:null!=(t=n.error)?t:"HTTP ".concat(r.status),fetchedAt:Date.now()});let i=null==(e=n.entries)?void 0:e[n.entries.length-1];l({status:"ok",count:null!=(a=n.count)?a:0,lastEntry:i,fetchedAt:Date.now()})}catch(e){l({status:"error",error:e.message,fetchedAt:Date.now()})}}},[s]),x=(0,r.useCallback)(async()=>{if(s){o({status:"sending"});try{var e,t;let a=await fetch("".concat(s.baseUrl,"/v1/hitl/test-pushcut"),{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({})}),r=await a.json();a.ok&&r.ok?(o({status:"ok",banner:"✓ sent → ".concat(null!=(e=r.notificationName)?e:"(unknown)")}),m()):o({status:"error",banner:"✗ ".concat(null!=(t=r.reason)?t:"HTTP ".concat(a.status)).concat(r.hint?" \xb7 ".concat(r.hint):"")})}catch(e){o({status:"error",banner:"✗ ".concat(e.message)})}}},[s,m]);if((0,r.useEffect)(()=>{m()},[m]),!c||!s)return null;let p=n.lastEntry,h=p?(t=Date.now()-p.ts)<0?"just now":t<6e4?"".concat(Math.floor(t/1e3),"s ago"):t<36e5?"".concat(Math.floor(t/6e4),"m ago"):t<864e5?"".concat(Math.floor(t/36e5),"h ago"):"".concat(Math.floor(t/864e5),"d ago"):"(no Pushcut deliveries recorded yet)";return(0,a.jsxs)("section",{"data-testid":"pushcut-settings-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between gap-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDCF2 Pushcut HITL channel"}),(0,a.jsx)(d.$,{"data-testid":"pushcut-settings-refresh",variant:"ghost",size:"sm",onClick:()=>void m(),"aria-label":"Refresh Pushcut status",children:"↻"})]}),(0,a.jsxs)("dl",{className:"grid grid-cols-[max-content_1fr] gap-x-3 gap-y-1 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last delivery"}),(0,a.jsx)("dd",{"data-testid":"pushcut-last-delivery",className:"font-mono",children:"loading"===n.status?"…":h}),p?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last answer"}),(0,a.jsxs)("dd",{className:"font-mono",children:[p.answer?"yes":"no"," \xb7 ",p.elapsedMs,"ms"]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Last requestId"}),(0,a.jsx)("dd",{className:"font-mono break-all",children:p.requestId})]}):null,(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Total recorded"}),(0,a.jsx)("dd",{className:"font-mono",children:"ok"===n.status?null!=(e=n.count)?e:0:"—"})]}),"error"===n.status?(0,a.jsxs)("p",{className:"mt-2 text-xs text-destructive",children:["audit fetch failed: ",n.error]}):null,(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsx)(d.$,{"data-testid":"pushcut-test-button",variant:"outline",size:"sm",disabled:"sending"===i.status,onClick:()=>void x(),children:"sending"===i.status?"…":"Test notification"}),i.banner?(0,a.jsx)("span",{"data-testid":"pushcut-test-banner",className:"ok"===i.status?"text-xs text-emerald-600 font-mono":"text-xs text-destructive font-mono",children:i.banner}):null]}),(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-muted-foreground",children:["Audit log: ",(0,a.jsx)("span",{className:"font-mono",children:"$ELANOUS_DIR/hitl-log.jsonl"})," ","(rotates at 100 MB \xb7 cv-3 β-4)"]})]})}var K=s(76192);let V=[{value:"fixed",label:"고정 (Fixed)",blurb:"입력 바 위에 항상 표시. 키보드 위주 dogfood 에 좋음."},{value:"popup",label:"팝업 (Popup)",blurb:"턴이 끝날 때마다 잠깐 (~6초) 나타나고 자동 dismiss. 모바일 화면 절약."},{value:"off",label:"끔 (Off)",blurb:"완전 숨김. 입력만으로 진행하고 싶을 때."}];function q(){let[e,t]=(0,r.useState)("fixed"),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>(n(!0),t((0,K.sY)()),(0,K.u9)(t)),[]),(0,a.jsxs)("section",{"data-testid":"intent-panel-settings",className:"rounded-lg border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Intent Panel"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Showroom 의 intent 6-button 패널 표시 방식을 선택합니다."})]}),(0,a.jsx)("div",{role:"radiogroup","aria-label":"intent panel display mode",className:"mt-3 space-y-2",children:V.map(r=>{let n=s&&e===r.value;return(0,a.jsxs)("label",{"data-testid":"intent-panel-mode-".concat(r.value),className:"flex cursor-pointer items-start gap-3 rounded-md border border-border/60 p-3 hover:border-border","data-active":n?"true":"false",children:[(0,a.jsx)("input",{type:"radio",name:"intent-panel-display-mode",value:r.value,checked:n,onChange:()=>{var e;return e=r.value,void((0,K._n)(e),t(e))},className:"mt-0.5 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:r.label}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:r.blurb})]})]},r.value)})})]})}var X=s(30105);function G(){let[e,t]=(0,r.useState)(X.kv),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>(n(!0),t((0,X.Vm)()),(0,X.$L)(t)),[]),(0,a.jsxs)("section",{"data-testid":"chat-routing-settings",className:"rounded-lg border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Chat input classification"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"입력 중 자동 분류를 켜거나 끕니다. 전송은 기존 ACP 경로를 유지합니다."})]}),(0,a.jsx)("div",{className:"mt-3 space-y-2",children:(0,a.jsxs)("label",{"data-testid":"chat-routing-auto",className:"flex cursor-pointer items-start gap-3 rounded-md border border-border/60 p-3 hover:border-border","data-active":s&&e.autoRouting?"true":"false",children:[(0,a.jsx)("input",{type:"checkbox",checked:s?e.autoRouting:X.kv.autoRouting,onChange:e=>{var s;return s=e.target.checked,void((0,X.Kz)(s),t(e=>({...e,autoRouting:s})))},className:"mt-0.5 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"Automatic routing"}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"입력 중 mission router 가 plan / build / review / research / quick / vision 으로 자동 분류합니다. OFF (default) 시 분류 요청을 보내지 않습니다."})]})]})})]})}function J(){var e,t,s,l;let{connection:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},d=(0,r.useContext)(n.C),o=null!=(t=null!=(e=null==i?void 0:i.baseUrl)?e:null==d?void 0:d.config.baseUrl)?t:"",c=null!=(l=null!=(s=null==i?void 0:i.token)?s:null==d?void 0:d.config.token)?l:"",[u,m]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)("");(0,r.useEffect)(()=>{if(m(null),f(""),!o)return;let e=new AbortController;return(async()=>{try{let t=await fetch("".concat(o.replace(/\/$/,""),"/v1/config/chat-fast-path"),{signal:e.signal,credentials:"same-origin",...c?{headers:{authorization:"Bearer ".concat(c)}}:{}});if(!t.ok)throw Error("HTTP ".concat(t.status));let s=await t.json();e.signal.aborted||m(s.enabled)}catch(t){e.signal.aborted||f(t instanceof Error?t.message:String(t))}})(),()=>e.abort()},[o,c]);let b=async e=>{p(!0),f("");try{let t=await fetch("".concat(o.replace(/\/$/,""),"/v1/config/chat-fast-path"),{method:"PUT",credentials:"same-origin",headers:{"content-type":"application/json",...c?{authorization:"Bearer ".concat(c)}:{}},body:JSON.stringify({enabled:e})});if(!t.ok)throw Error("HTTP ".concat(t.status));let s=await t.json();m(s.enabled)}catch(e){f(e instanceof Error?e.message:String(e))}finally{p(!1)}};return(0,a.jsxs)("section",{className:"space-y-3 rounded-lg border border-border bg-card p-4","data-testid":"fast-reply-card",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"짧은 물음은 빠르게"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:'인사\xb7짧은 물음은 도구 없이 먼저 답합니다 — 확인이 필요하면 "확인해 볼까요?"'}),(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox",checked:null!=u&&u,disabled:null===u||x,onChange:e=>{b(e.target.checked)},"aria-label":"빠른 답변 켜기/끄기"}),null===u?"불러오는 중":u?"켜짐":"꺼짐"]}),h&&(0,a.jsx)("p",{role:"alert",className:"text-xs text-destructive",children:h})]})}function Z(e){let t=Object.entries(e);return 0===t.length?"—":t.map(e=>{let[t,s]=e;return"".concat(t,":").concat(s)}).join(" \xb7 ")}function ee(){let{config:e}=(0,n.Q)(),[t,s]=(0,r.useState)({ocr:{total:0,failures:0,byProvider:{},byPolishMode:{}},save:{total:0,failures:0,byPolishMode:{}},client:{cancel:0,edit:0,discard:0},startedAt:"",ts:""}),[l,i]=(0,r.useState)(!1),[o,c]=(0,r.useState)(null),[u,m]=(0,r.useState)(!1),x=(0,r.useCallback)(async()=>{if(e.baseUrl){m(!0);try{let t=await fetch("".concat(e.baseUrl,"/v1/metrics/notes-from-image"),{...e.token?{headers:{authorization:"Bearer ".concat(e.token)}}:{}});if(!t.ok)return void c("HTTP ".concat(t.status));let a=await t.json();s(a.snapshot),i(a.wired),c(null),(0,b.cY)("notes-metrics.snapshot",{wired:a.wired,ocrTotal:a.snapshot.ocr.total,saveTotal:a.snapshot.save.total})}catch(e){c(String(e instanceof Error?e.message:e))}finally{m(!1)}}},[e.baseUrl,e.token]);(0,r.useEffect)(()=>{x();let e=setInterval(()=>{x()},1e4);return()=>clearInterval(e)},[x]);let p=t.ocr.total-t.ocr.failures,h=t.save.total-t.save.failures;return(0,a.jsxs)("section",{"data-testid":"notes-metrics-card",className:"rounded-lg border border-border bg-card p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-heading text-sm font-medium",children:"카메라 노트 metric"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"카메라 → markdown 노트 파이프라인 사용량 (daemon 재시작 시 0 으로 리셋)."})]}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>void x(),disabled:u,"aria-label":"refresh notes metrics",children:(0,a.jsx)(L.A,{className:u?"h-3.5 w-3.5 animate-spin":"h-3.5 w-3.5"})})]}),!l&&(0,a.jsx)("p",{"data-testid":"notes-metrics-not-wired",className:"mb-3 rounded bg-muted/50 px-2 py-1 text-xs text-muted-foreground",children:"collector 미wire — runNexus 재기동 후 측정 시작."}),o&&(0,a.jsxs)("p",{"data-testid":"notes-metrics-error",className:"mb-3 text-xs text-destructive",children:["metric fetch 실패: ",o]}),(0,a.jsxs)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR 총 / 성공 / 실패"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-ocr",children:[t.ocr.total," / ",p," / ",t.ocr.failures]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR provider"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-ocr-providers",children:Z(t.ocr.byProvider)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"OCR polishMode"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-ocr-polish",children:Z(t.ocr.byPolishMode)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Save 총 / 성공 / 실패"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-save",children:[t.save.total," / ",h," / ",t.save.failures]}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Save polishMode"}),(0,a.jsx)("dd",{"data-testid":"notes-metrics-save-polish",children:Z(t.save.byPolishMode)}),(0,a.jsx)("dt",{className:"text-muted-foreground",children:"Client cancel \xb7 edit \xb7 discard"}),(0,a.jsxs)("dd",{"data-testid":"notes-metrics-client",children:[t.client.cancel," \xb7 ",t.client.edit," \xb7 ",t.client.discard]})]}),t.startedAt&&l&&(0,a.jsxs)("p",{className:"mt-3 text-[10px] text-muted-foreground",children:["since ",t.startedAt]})]})}var et=s(25395);function es(){let[e,t]=(0,r.useState)(et.hn);(0,r.useEffect)(()=>{t((0,et.hn)())},[]);let s=e=>{t((0,et.qv)(e)),(0,b.cY)("settings.ocr-prefs.update",e)};return(0,a.jsxs)("section",{"data-testid":"ocr-prefs-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDCF7 OCR 기본 설정"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"사진 → 노트 모달의 초기 토글 상태. 매번 같은 옵션을 켜고 있다면 default 로 저장."})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-md border border-input bg-background px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:"LLM 비전 default"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7 더 정확하지만 느림 + 비쌈"})]}),(0,a.jsx)("input",{type:"checkbox","data-testid":"ocr-prefs-llm-vision",checked:e.defaultUseLlmVision,onChange:e=>s({defaultUseLlmVision:e.target.checked}),"aria-label":"LLM 비전 default"})]}),(0,a.jsxs)("label",{className:"flex items-center justify-between gap-3 rounded-md border border-input bg-background px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{children:"손글씨 default"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:"\xb7 handwriting strength 자동 추가"})]}),(0,a.jsx)("input",{type:"checkbox","data-testid":"ocr-prefs-handwriting",checked:e.defaultPreferHandwriting,onChange:e=>s({defaultPreferHandwriting:e.target.checked}),"aria-label":"손글씨 default"})]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{t((0,et.sg)()),(0,b.cY)("settings.ocr-prefs.reset")},className:"text-xs text-muted-foreground","data-testid":"ocr-prefs-reset",children:"기본값으로 리셋"})})]})}let ea=["lm-studio","vllm","ollama","anthropic-openai-wrap"],er={"lm-studio":"http://localhost:1234",vllm:"http://localhost:8000",ollama:"http://localhost:11434","anthropic-openai-wrap":"https://api.anthropic.com"};function en(){let{client:e,config:t}=(0,n.Q)(),[s,l]=(0,r.useState)({status:"idle"}),[i,u]=(0,r.useState)(0),[m,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)(""),[f,b]=(0,r.useState)("anthropic-openai-wrap"),[g,j]=(0,r.useState)(er["anthropic-openai-wrap"]),[v,y]=(0,r.useState)(""),[N,k]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!t.baseUrl)return void l({status:"idle"});let s=!1;return l({status:"loading"}),(async()=>{try{let t=await e.getLlmHosts();s||l({status:"ok",data:t})}catch(e){s||l({status:"error",error:e instanceof Error?e.message:String(e)})}})(),()=>{s=!0}},[e,t.baseUrl,i]);let w=(0,r.useCallback)(()=>u(e=>e+1),[]),S=(0,r.useCallback)(e=>{b(e),j(er[e])},[]),C=(0,r.useCallback)(async()=>{let t=p.trim(),a=g.trim(),r=v.trim();if(!t||!a)return void c.oR.error("name + endpoint 필수");if("anthropic-openai-wrap"===f&&!r)return void c.oR.error("Anthropic 은 apiKey 필수");k(!0);try{var n,l;let i=[...(null!=(l=null==(n=s.data)?void 0:n.hosts)?l:[]).filter(e=>e.name!==t).map(e=>{let t={name:e.name,kind:e.kind,endpoint:e.endpoint};return e.apiKey&&"[redacted]"!==e.apiKey&&(t.apiKey=e.apiKey),t}),{name:t,kind:f,endpoint:a,...r?{apiKey:r}:{}}];await e.setLlmHosts(i),c.oR.success("host '".concat(t,"' 추가됨")),h(""),y(""),x(!1),w()}catch(e){c.oR.error("추가 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,p,f,g,v,s.data,w]),U=(0,r.useCallback)(async t=>{k(!0);try{var a,r;let n=(null!=(r=null==(a=s.data)?void 0:a.hosts)?r:[]).filter(e=>e.name!==t).map(e=>{let t={name:e.name,kind:e.kind,endpoint:e.endpoint};return e.apiKey&&"[redacted]"!==e.apiKey&&(t.apiKey=e.apiKey),t});await e.setLlmHosts(n),c.oR.success("host '".concat(t,"' 제거됨")),w()}catch(e){c.oR.error("제거 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,s.data,w]),P=(0,r.useCallback)(async()=>{k(!0);try{await e.clearLlmHosts(),c.oR.success("env / legacy 로 환원"),w()}catch(e){c.oR.error("reset 실패: ".concat(e instanceof Error?e.message:String(e)))}finally{k(!1)}},[e,w]);if(!t.baseUrl)return null;let E=s.data,M=(null==E?void 0:E.source)==="override"?"bg-fuchsia-100 text-fuchsia-700 dark:bg-fuchsia-900 dark:text-fuchsia-200":(null==E?void 0:E.source)==="env"?"bg-amber-100 text-amber-700 dark:bg-amber-900 dark:text-amber-200":"bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300";return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"llm-hosts-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM Hosts"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[E&&(0,a.jsx)("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium uppercase ".concat(M),"data-testid":"llm-hosts-source-badge",children:E.source}),(0,a.jsx)("span",{"data-testid":"llm-hosts-count",children:E?"".concat(E.count," host").concat(1===E.count?"":"s"):"loading"===s.status?"loading…":""}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:w,disabled:"loading"===s.status||N,"data-testid":"llm-hosts-refresh",children:"Refresh"})]})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(null==E?void 0:E.deprecations)&&E.deprecations.length>0&&(0,a.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 p-2 text-[11px] text-amber-800 dark:border-amber-700 dark:bg-amber-900/30 dark:text-amber-200","data-testid":"llm-hosts-deprecations",children:[(0,a.jsx)("p",{className:"font-medium",children:"호환성 경고 \xb7 다음 release 에서 제거 예정"}),(0,a.jsx)("ul",{className:"ml-4 list-disc",children:E.deprecations.map(e=>(0,a.jsx)("li",{className:"font-mono text-[10px]",children:e},e))})]}),"error"===s.status&&(0,a.jsxs)("p",{className:"text-rose-500","data-testid":"llm-hosts-error",children:["조회 실패 \xb7 ",s.error]}),"loading"===s.status&&!E&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing /v1/llm/hosts…"}),E&&0===E.hosts.length&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"No hosts configured. Add one below to enable a remote LLM provider (e.g. Anthropic / Gemini API direct)."}),E&&E.hosts.length>0&&(0,a.jsx)("ul",{className:"space-y-1","data-testid":"llm-hosts-list",children:E.hosts.map(e=>(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border bg-muted/30 px-2 py-1","data-testid":"llm-host-row-".concat(e.name),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 font-mono text-[11px] font-medium",children:[(0,a.jsx)("span",{children:e.name}),(0,a.jsx)("span",{className:"rounded bg-muted px-1 text-[9px] uppercase text-muted-foreground",children:e.kind}),"[redacted]"===e.apiKey&&(0,a.jsx)("span",{className:"rounded bg-emerald-100 px-1 text-[9px] uppercase text-emerald-700 dark:bg-emerald-900 dark:text-emerald-200",title:"apiKey configured (server-side, not echoed)","data-testid":"llm-host-key-badge-".concat(e.name),children:"key"})]}),(0,a.jsx)("div",{className:"truncate font-mono text-[10px] text-muted-foreground",children:e.endpoint})]}),"override"===E.source&&(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{U(e.name)},disabled:N,"data-testid":"llm-host-remove-".concat(e.name),children:"Remove"})]},e.name))}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:[(0,a.jsx)(d.$,{size:"sm",onClick:()=>x(e=>!e),disabled:N,"data-testid":"llm-hosts-add-toggle",children:m?"Cancel add":"Add host"}),(null==E?void 0:E.source)==="override"&&(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{P()},disabled:N,"data-testid":"llm-hosts-reset",children:"Reset to env/legacy"})]}),m&&(0,a.jsxs)("div",{className:"mt-2 space-y-1.5 rounded border border-dashed border-border p-2","data-testid":"llm-hosts-add-form",children:[(0,a.jsx)(o.p,{value:p,placeholder:"name (e.g. anthropic-cloud)",onChange:e=>h(e.target.value),"data-testid":"llm-hosts-add-name",className:"text-[11px]"}),(0,a.jsx)("select",{value:f,onChange:e=>S(e.target.value),className:"flex h-8 w-full rounded-md border border-input bg-background px-2 text-xs","data-testid":"llm-hosts-add-kind",children:ea.map(e=>(0,a.jsx)("option",{value:e,children:e},e))}),(0,a.jsx)(o.p,{value:g,placeholder:"endpoint URL",onChange:e=>j(e.target.value),"data-testid":"llm-hosts-add-endpoint",className:"text-[11px]"}),"anthropic-openai-wrap"===f&&(0,a.jsx)(o.p,{type:"password",value:v,placeholder:"apiKey (sk-ant-…)",onChange:e=>y(e.target.value),"data-testid":"llm-hosts-add-apikey",className:"text-[11px]"}),(0,a.jsx)(d.$,{size:"sm",onClick:()=>{C()},disabled:N||!p.trim()||!g.trim(),"data-testid":"llm-hosts-add-submit",children:N?"Saving…":"Save"})]})]}),(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["In-memory override \xb7 daemon restart reverts to ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"ELANOUS_LLM_HOSTS"})," env / legacy single host. Permanent change → set the env var in ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:".zshrc"})," or ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"launchctl setenv"}),". PUT replaces the full list, so re-add Anthropic/Gemini hosts in one go (existing apiKeys appear as ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"[redacted]"})," and aren’t round-trippable)."]})]})}var el=s(8577);function ei(){var e,t;let[s,n]=(0,r.useState)(el.lu);(0,r.useEffect)(()=>{n((0,el.lu)())},[]);let l=s.speakingThresholdMultiplier===el.Qc.speakingThresholdMultiplier;return(0,a.jsxs)("section",{"data-testid":"voice-prefs-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83C\uDF99️ Voice barge-in 튜닝"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"BI-2 ducking 강도 — TTS 재생 중 자기-에코 false-fire 를 막는 RMS multiplier. 변경은 voice toggle off → on 또는 새로고침 시 적용."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsx)("span",{className:"font-medium",children:"speaking threshold multiplier"}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"voice-prefs-multiplier-value",children:(e=s.speakingThresholdMultiplier,"".concat(e.toFixed(1),"\xd7"))})]}),(0,a.jsx)("input",{type:"range",min:el.u4,max:el.M_,step:.1,value:s.speakingThresholdMultiplier,onChange:e=>{var t;return t={speakingThresholdMultiplier:Number(e.target.value)},void(n((0,el.ik)(t)),(0,b.cY)("settings.voice-prefs.update",t))},"data-testid":"voice-prefs-multiplier-slider","aria-label":"Speaking threshold multiplier","aria-valuemin":el.u4,"aria-valuemax":el.M_,"aria-valuenow":s.speakingThresholdMultiplier,className:"w-full"}),(0,a.jsx)("p",{className:"mt-1 text-[11px] text-muted-foreground","data-testid":"voice-prefs-hint",children:(t=s.speakingThresholdMultiplier)<=1.2?"거의 ducking 없음 — 자기-에코 false-fire 가능":t<=1.7?"약한 ducking — 강한 AEC 환경 + 빠른 cut-in":t<=2.5?"기본값 — 대부분 환경에서 균형":t<=3.5?"강한 ducking — 시끄러운 환경 / 민감한 마이크":"매우 강한 ducking — 자기-에코가 심한 환경"})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{n((0,el.KS)()),(0,b.cY)("settings.voice-prefs.reset")},disabled:l,className:"text-xs text-muted-foreground","data-testid":"voice-prefs-reset",children:["기본값으로 리셋 (",el.Qc.speakingThresholdMultiplier.toFixed(1),"\xd7)"]})})]})}var ed=s(18300),eo=s(47660),ec=s(43015);function eu(e){let{currentTier:t,nextTier:s,currentTierMonthlyUsd:n,nextTierMonthlyUsd:l,monthSoFarUsd:i,onConfirm:o,onCancel:c}=e,u=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;null==(e=u.current)||e.focus()},[]);let m=eo.YS[t],x=eo.YS[s],p=l>n,h=p?'Switch to "'.concat(eo.LW[s],'" tier?'):'Switch to "'.concat(eo.LW[s],'" tier (cheaper)'),f=l-n,b=f>=0?"+".concat((0,eo.Bg)(Math.abs(f))):"-".concat((0,eo.Bg)(Math.abs(f)));return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"tier-confirm-title","aria-describedby":"tier-confirm-summary","data-testid":"tier-change-confirm-modal",onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),c())},children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-lg border bg-white p-4 shadow-xl dark:bg-zinc-900 ".concat(p?"border-amber-300 dark:border-amber-700":"border-emerald-300 dark:border-emerald-700"),children:[(0,a.jsxs)("h2",{id:"tier-confirm-title",className:"mb-2 text-sm font-medium ".concat(p?"text-amber-700 dark:text-amber-300":"text-emerald-700 dark:text-emerald-300"),children:[p?"⚠️":"✓"," ",h]}),(0,a.jsx)("p",{id:"tier-confirm-summary",className:"mb-3 text-xs text-zinc-700 dark:text-zinc-300",children:x.rationale}),(0,a.jsxs)("dl",{className:"mb-4 space-y-1.5 text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("dt",{className:"text-zinc-500 dark:text-zinc-400",children:"Month so far"}),(0,a.jsx)("dd",{className:"font-mono tabular-nums text-zinc-900 dark:text-zinc-100","data-testid":"tier-confirm-month-so-far",children:(0,eo.Bg)(i).replace("/mo","")})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("dt",{className:"text-zinc-500 dark:text-zinc-400",children:["At current tier (",eo.LW[t],")"]}),(0,a.jsx)("dd",{className:"font-mono tabular-nums text-zinc-900 dark:text-zinc-100","data-testid":"tier-confirm-current-projected",children:(0,eo.Bg)(n)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between rounded px-2 py-1 ".concat(p?"bg-amber-50 dark:bg-amber-950/40":"bg-emerald-50 dark:bg-emerald-950/40"),children:[(0,a.jsxs)("dt",{className:p?"text-amber-700 dark:text-amber-300":"text-emerald-700 dark:text-emerald-300",children:["At new tier (",eo.LW[s],")"]}),(0,a.jsxs)("dd",{className:"font-mono tabular-nums ".concat(p?"text-amber-900 dark:text-amber-100":"text-emerald-900 dark:text-emerald-100"),"data-testid":"tier-confirm-next-projected",children:[(0,eo.Bg)(l),(0,a.jsxs)("span",{className:"ml-1 text-[10px] opacity-70","data-testid":"tier-confirm-delta",children:["(",b,")"]})]})]})]}),(0,a.jsxs)("p",{className:"mb-3 text-[11px] text-zinc-500 dark:text-zinc-400","data-testid":"tier-confirm-rate-line",children:["Per-call: $",m.usdPerMinAudio.toFixed(3),"/min → $",(x.usdPerMinAudio+x.loadedExtraUsdPerMin).toFixed(3),"/min"]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:c,"data-testid":"tier-confirm-cancel",children:"Cancel"}),(0,a.jsx)(d.$,{ref:u,type:"button",size:"sm",onClick:o,"data-testid":"tier-confirm-confirm",className:p?"bg-amber-600 text-white hover:bg-amber-700":"bg-emerald-600 text-white hover:bg-emerald-700",children:p?"Confirm switch":"Switch"})]})]})})}let em=eo.Ql.length;function ex(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)("idle"),[m]=(0,r.useState)(0);(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&(l(s),u("synced"))})(),()=>{e=!0}},[t]);let x=(0,ec.gF)(s),p=eo.YS[x],h=void 0===s.stt,f=(0,eo.K0)(null!=i?i:x),g=(0,r.useMemo)(()=>{let e={};for(let t of eo.Ql)e[t]=(0,eo.nX)(t,s.audioMinPerDay);return e},[s.audioMinPerDay]),j=e=>{l((0,ec.Pz)({stt:e})),u("syncing"),(0,b.cY)("settings.model-tier.update",{stt:e}),(0,ed.ZB)(t,e).then(u)};return(0,a.jsxs)("section",{"data-testid":"voice-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83C\uDF9A️ Voice transcription quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick how accurate vs. cheap the speech-to-text should be — elanous picks the model. Switching takes effect on the next voice call."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[x],h&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"voice-model-tier-default-badge",children:"Smart default"}),"syncing"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"voice-model-tier-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"voice-model-tier-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"voice-model-tier-sync-status",title:"Daemon unreachable — change saved locally \xb7 will sync when daemon comes back",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"voice-model-tier-sync-status",title:"Daemon refused the write — local copy still has your choice",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"voice-model-tier-cost",children:s.audioMinPerDay>0?(0,eo.Bg)(g[x]):"".concat((p.usdPerMinAudio+p.loadedExtraUsdPerMin).toFixed(3),"/min")})]}),(0,a.jsx)("input",{type:"range",min:0,max:em-1,step:1,value:f,onChange:e=>{let t=function(e){let t=Math.max(0,Math.min(em-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));if(t!==x){if(function(e){let{currentTier:t,nextTier:s,currentTierMonthlyUsd:a,nextTierMonthlyUsd:r,audioMinPerDay:n}=e;if(t===s)return!1;let l=r-a;if(l<0)return!1;if(n>0)return l>=1;let i=eo.YS[t].usdPerMinAudio+eo.YS[t].loadedExtraUsdPerMin,d=eo.YS[s].usdPerMinAudio+eo.YS[s].loadedExtraUsdPerMin;return 0===i?d>0:d>=5*i}({currentTier:x,nextTier:t,currentTierMonthlyUsd:g[x],nextTierMonthlyUsd:g[t],audioMinPerDay:s.audioMinPerDay}))return void o(t);j(t)}},"data-testid":"voice-model-tier-slider","aria-label":"Voice transcription tier","aria-valuemin":0,"aria-valuemax":em-1,"aria-valuenow":f,"aria-valuetext":eo.LW[x],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"voice-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===x?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"voice-model-tier-rationale",children:p.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"voice-model-tier-model-id",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:p.model}),"wip"===p.status&&(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-500/10 px-1 py-0.5 text-amber-600",children:"WIP \xb7 install local binary first"})]})]})}),(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l((0,ec.Pv)()),o(null),u("syncing"),(0,b.cY)("settings.model-tier.reset"),(0,ed.ZB)(t,null).then(u)},disabled:h,className:"text-xs text-muted-foreground","data-testid":"voice-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]}),s.audioMinPerDay>0&&(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground","data-testid":"voice-model-tier-usage-hint",children:["~",s.audioMinPerDay.toFixed(0)," min/day \xb7 14-day rolling avg"]})]}),i&&(0,a.jsx)(eu,{currentTier:x,nextTier:i,currentTierMonthlyUsd:g[x],nextTierMonthlyUsd:g[i],monthSoFarUsd:m,onConfirm:()=>{i&&j(i),o(null)},onCancel:()=>{o(null),(0,b.cY)("settings.model-tier.cancel",{from:x})}})]})}let ep=eo.Ql.length;function eh(e){return"string"==typeof e&&(0,eo.D9)(e)?e:"anthropic"}function ef(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)(()=>eh(e.provider)),[c,u]=(0,r.useState)("idle");(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&(l(s),u("synced"))})(),()=>{e=!0}},[t]),(0,r.useEffect)(()=>{o(eh(e.provider))},[e.provider]);let m=(0,ec.oA)(s),x=void 0===s.llm,p=(0,eo.K0)(m),h=(0,eo.f7)(i,m);return(0,a.jsxs)("section",{"data-testid":"llm-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83E\uDDE0 AI assistant quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick how careful vs. fast the model should think. elanous chooses the right model on your active provider \xb7 the slider stays the same across providers."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[m],x&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"llm-model-tier-default-badge",children:"Smart default"}),"syncing"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"llm-model-tier-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"llm-model-tier-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"llm-model-tier-sync-status",title:"Daemon unreachable",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"llm-model-tier-sync-status",title:"Daemon refused the write",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"llm-model-tier-provider",children:eo.T0[i]})]}),(0,a.jsx)("input",{type:"range",min:0,max:ep-1,step:1,value:p,onChange:e=>{let s=function(e){let t=Math.max(0,Math.min(ep-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));s!==m&&(l((0,ec.Pz)({llm:s})),u("syncing"),(0,b.cY)("settings.model-tier.llm.update",{llm:s}),(0,ed.tM)(t,s).then(u))},"data-testid":"llm-model-tier-slider","aria-label":"AI assistant tier","aria-valuemin":0,"aria-valuemax":ep-1,"aria-valuenow":p,"aria-valuetext":eo.LW[m],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"llm-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===m?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"llm-model-tier-rationale",children:h.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"llm-model-tier-model-id",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:h.model}),h.reasoningLevel&&(0,a.jsxs)("span",{className:"ml-1 text-muted-foreground",children:["\xb7 reasoning: ",(0,a.jsx)("span",{className:"font-mono",children:h.reasoningLevel})]}),"wip"===h.status&&(0,a.jsx)("span",{className:"ml-1 rounded bg-amber-500/10 px-1 py-0.5 text-amber-600",children:"WIP \xb7 install local runtime first"})]})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l((0,ec.Pz)({llm:void 0})),u("syncing"),(0,b.cY)("settings.model-tier.llm.reset"),(0,ed.tM)(t,null).then(u)},disabled:x,className:"text-xs text-muted-foreground","data-testid":"llm-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]})})]})}let eb=eo.Ql.length;function eg(){var e;let{config:t}=(0,n.Q)(),s=(0,r.useMemo)(()=>({baseUrl:t.baseUrl,...t.token?{token:t.token}:{}}),[t.baseUrl,t.token]),[l,i]=(0,r.useState)(ec.Ij),[o,c]=(0,r.useState)("idle");(0,r.useEffect)(()=>{i((0,ec.Ij)());let e=!1;return(async()=>{let t=await (0,ed.ee)(s);!e&&t&&(i(t),c("synced"))})(),()=>{e=!0}},[s]);let u=(0,ec.Md)(l),m=eo.eP[u],x=void 0===l.tts,p=(0,eo.K0)(u),h=!Number.isFinite(e=m.usdPerCharacter)||e<=0?"free":"$".concat((1e6*e).toFixed(0),"/M chars");return(0,a.jsxs)("section",{"data-testid":"tts-model-tier-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDD0A Voice playback quality"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick text-to-speech quality vs. cost. Voice identity (Rachel \xb7 SoYoung \xb7 custom) lives in a separate picker (Phase 2 M2-2b)."})]}),(0,a.jsx)("div",{className:"space-y-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between text-xs",children:[(0,a.jsxs)("span",{className:"font-medium",children:[eo.LW[u],x&&(0,a.jsx)("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground","data-testid":"tts-model-tier-default-badge",children:"Smart default"}),"syncing"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"tts-model-tier-sync-status",children:"Syncing…"}),"synced"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"tts-model-tier-sync-status",children:"Synced"}),"offline"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"tts-model-tier-sync-status",children:"Offline"}),"error"===o&&(0,a.jsx)("span",{className:"ml-2 rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"tts-model-tier-sync-status",children:"Sync error"})]}),(0,a.jsx)("span",{className:"rounded bg-muted px-2 py-0.5 font-mono text-[11px]","data-testid":"tts-model-tier-rate",children:h})]}),(0,a.jsx)("input",{type:"range",min:0,max:eb-1,step:1,value:p,onChange:e=>{let t=function(e){let t=Math.max(0,Math.min(eb-1,Math.round(e)));return eo.Ql[t]}(Number(e.target.value));t!==u&&(i((0,ec.Pz)({tts:t})),c("syncing"),(0,b.cY)("settings.model-tier.tts.update",{tts:t}),(0,ed.pP)(s,t).then(c))},"data-testid":"tts-model-tier-slider","aria-label":"Voice playback tier","aria-valuemin":0,"aria-valuemax":eb-1,"aria-valuenow":p,"aria-valuetext":eo.LW[u],className:"w-full"}),(0,a.jsx)("div",{className:"mt-1 flex justify-between text-[10px] text-muted-foreground","data-testid":"tts-model-tier-tick-labels",children:eo.Ql.map(e=>(0,a.jsx)("span",{className:e===u?"font-semibold text-foreground":void 0,children:eo.LW[e]},e))}),(0,a.jsx)("p",{className:"mt-2 text-[11px] text-muted-foreground","data-testid":"tts-model-tier-rationale",children:m.rationale}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-muted-foreground/80","data-testid":"tts-model-tier-model-id",children:["Provider: ",(0,a.jsx)("span",{className:"font-mono",children:m.provider}),(0,a.jsx)("span",{className:"ml-1",children:"\xb7"}),(0,a.jsxs)("span",{className:"ml-1",children:["Model: ",(0,a.jsx)("span",{className:"font-mono",children:m.model})]})]})]})}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>{i((0,ec.Pz)({tts:void 0})),c("syncing"),(0,b.cY)("settings.model-tier.tts.reset"),(0,ed.pP)(s,null).then(c)},disabled:x,className:"text-xs text-muted-foreground","data-testid":"tts-model-tier-reset",children:["Reset to default (",eo.LW[eo.j$],")"]})})]})}let ej=null;async function ev(e){var t;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.baseUrl)return null;let a=null!=(t=s.now)?t:Date.now();if(!s.bypassMemo&&ej&&a-ej.fetchedAt<6e4)return ej.lib;try{let t=e.baseUrl.replace(/\/$/,"")+"/v1/elevenlabs/voices",s={};e.token&&(s.authorization="Bearer ".concat(e.token));let r=await fetch(t,{headers:s});if(!r.ok)return null;let n=await r.json(),l={voices:Array.isArray(n.voices)?n.voices:[],configured:!0===n.configured,fromCache:!0===n.fromCache};return ej={fetchedAt:a,lib:l},l}catch(e){return null}}let ey="elanous.tts-voice.recent";function eN(){if("undefined"==typeof localStorage)return[];try{let e=localStorage.getItem(ey);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(e=>"string"==typeof e&&e.length>0).slice(0,5)}catch(e){return[]}}let ek=[{key:"default",label:"Default",hint:"Fallback when a specific context isn't set"},{key:"chat",label:"Chat reply",hint:"Used by the PWA / TUI chat surface"},{key:"digest",label:"Morning digest",hint:"Daily summary read-back (P2-D7)"},{key:"alert",label:"Push alerts",hint:"Urgency-driven voice for push notifications"},{key:"discord",label:"Discord bot",hint:"X9 Discord voice channel + DM voice replies"}],ew="elanous.tts-voice-map";function eS(){if("undefined"==typeof localStorage)return{};try{let e=localStorage.getItem(ew);if(!e)return{};let t=JSON.parse(e),s={};for(let e of ek){let a=t[e.key];"string"==typeof a&&a.trim().length>0&&(s[e.key]=a.trim())}return s}catch(e){return{}}}function eC(e){return[e.gender,e.accent,e.category].filter(Boolean).join(" \xb7 ")||"voice"}function eU(){var e;let{config:t}=(0,n.Q)(),s=(0,r.useMemo)(()=>({baseUrl:t.baseUrl,...t.token?{token:t.token}:{}}),[t.baseUrl,t.token]),[l,i]=(0,r.useState)(eS),[c,u]=(0,r.useState)("idle"),[m,x]=(0,r.useState)(null),[p,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(null),[j,v]=(0,r.useState)(eN),y=(0,r.useRef)(null),[N,k]=(0,r.useState)(null);(0,r.useEffect)(()=>{i(eS()),v(eN());let e=!1;return(async()=>{let t=await ev(s);e||(x(t),u(null===t?"offline":"synced"))})(),()=>{e=!0}},[s]);let w=(0,r.useMemo)(()=>{let e=new Map;if(m)for(let t of m.voices)e.set(t.id,t);return e},[m]),S=(0,r.useMemo)(()=>{if(!m)return[];var e=m.voices;let t=p.trim().toLowerCase();return t?e.filter(e=>[e.name,e.category,e.accent,e.gender,e.age,e.description,e.language,e.id].filter(Boolean).join(" ").toLowerCase().includes(t)):[...e]},[m,p]),C=async(e,t)=>{let a=(null!=t?t:"").trim(),r={...l};a?r[e]=a:delete r[e],i(r);if("undefined"!=typeof localStorage)try{localStorage.setItem(ew,JSON.stringify(r))}catch(e){}a&&(!function(e){if("undefined"==typeof localStorage||!e||"string"!=typeof e)return;let t=e.trim();if(!t)return;let s=eN().filter(e=>e!==t),a=[t,...s].slice(0,5);try{localStorage.setItem(ey,JSON.stringify(a))}catch(e){}}(a),v(eN())),u("syncing"),(0,b.cY)("settings.tts-voice.apply",{context:e,voiceId:a||null}),u(await (0,ed.D4)(s,{[e]:a||null}))},U=async()=>{if(i({}),"undefined"!=typeof localStorage)try{localStorage.removeItem(ew)}catch(e){}u("syncing"),(0,b.cY)("settings.tts-voice.reset-all"),u(await (0,ed.D4)(s,{default:null,chat:null,digest:null,alert:null,discord:null}))},P=e=>{if(!e.previewUrl)return;y.current&&(y.current.pause(),y.current.src="");let t=new Audio(e.previewUrl);y.current=t,k(e.id),t.addEventListener("ended",()=>k(t=>t===e.id?null:t)),t.addEventListener("error",()=>k(t=>t===e.id?null:t)),t.play().catch(()=>k(t=>t===e.id?null:t)),(0,b.cY)("settings.tts-voice.preview",{voiceId:e.id})},E=()=>{y.current&&(y.current.pause(),y.current.src="",y.current=null),k(null)},M=Object.keys(l).length>0,A=null!==m&&m.voices.length>0;return(0,a.jsxs)("section",{"data-testid":"tts-voice-id-picker-card",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"\uD83D\uDDE3️ Voice identity (per context)"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Pick a different voice per surface (chat / morning digest / alerts / Discord). Browse the ElevenLabs library or paste a voice id directly."})]}),"syncing"===c&&(0,a.jsx)("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"tts-voice-sync-status",children:"Syncing…"}),"synced"===c&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"tts-voice-sync-status",children:"Synced"}),"offline"===c&&(0,a.jsx)("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"tts-voice-sync-status",title:"Daemon unreachable",children:"Offline"}),"error"===c&&(0,a.jsx)("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"tts-voice-sync-status",children:"Sync error"})]}),m&&!m.configured&&(0,a.jsxs)("div",{className:"mb-3 rounded bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300","data-testid":"tts-voice-library-unconfigured",children:["ElevenLabs API key not set — set ",(0,a.jsx)("code",{className:"font-mono",children:"ELEVENLABS_API_KEY"})," in your env or store via ",(0,a.jsx)("code",{className:"font-mono",children:"elanous config set-secret elevenlabs.apiKey <key>"})," ","to browse the 10k+ voice library."]}),(0,a.jsx)("div",{className:"space-y-2","data-testid":"tts-voice-rows",children:ek.map(e=>{let t=l[e.key],s=t?w.get(t):void 0;return(0,a.jsxs)("div",{className:"rounded-md border border-input bg-background px-3 py-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-baseline justify-between gap-2 text-xs",children:[(0,a.jsx)("span",{className:"font-medium","data-testid":"tts-voice-row-".concat(e.key,"-label"),children:e.label}),s&&(0,a.jsxs)("span",{className:"text-[11px] text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-current-name"),children:[s.name," ",(0,a.jsxs)("span",{className:"opacity-60",children:["\xb7 ",eC(s)]})]}),t&&!s&&(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-current"),children:t})]}),(0,a.jsx)("p",{className:"mb-1 text-[10px] text-muted-foreground",children:e.hint}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(o.p,{defaultValue:null!=t?t:"",onBlur:s=>{let a=s.target.value.trim();a!==(null!=t?t:"")&&C(e.key,a||null)},placeholder:"Voice id (paste) or use Browse →",className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-input")}),(0,a.jsx)(d.$,{type:"button",size:"sm",variant:f===e.key?"default":"outline",onClick:()=>g(f===e.key?null:e.key),disabled:!A,className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-browse"),title:A?"Browse library":"Library not loaded yet",children:"Browse"}),(null==s?void 0:s.previewUrl)&&(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>N===s.id?E():P(s),className:"text-xs","data-testid":"tts-voice-row-".concat(e.key,"-preview"),children:N===s.id?"⏸":"▶"}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:()=>C(e.key,null),disabled:!t,className:"text-xs text-muted-foreground","data-testid":"tts-voice-row-".concat(e.key,"-clear"),children:"Clear"})]})]},e.key)})}),null!==f&&A&&(0,a.jsxs)("div",{className:"mt-3 rounded-md border border-input bg-background p-2","data-testid":"tts-voice-library-catalog",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,a.jsx)(o.p,{value:p,onChange:e=>h(e.target.value),placeholder:"Search voices (name \xb7 accent \xb7 gender \xb7 description)",className:"text-xs","data-testid":"tts-voice-library-search"}),(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>g(null),className:"text-xs text-muted-foreground","data-testid":"tts-voice-library-close",children:"Close"})]}),j.length>0&&!p&&(0,a.jsxs)("div",{className:"mb-2","data-testid":"tts-voice-recent-row",children:[(0,a.jsx)("p",{className:"mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:"Recently used"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:j.map(e=>{let t=w.get(e);return t?(0,a.jsx)("button",{type:"button",className:"rounded border border-border/40 bg-muted/30 px-2 py-1 text-[11px] hover:bg-muted",onClick:()=>f&&C(f,e),"data-testid":"tts-voice-recent-".concat(e),children:t.name},e):null})})]}),(0,a.jsxs)("p",{className:"mb-1 text-[10px] uppercase tracking-wider text-muted-foreground",children:[S.length," voice",1===S.length?"":"s",p&&' matching "'.concat(p,'"')]}),(0,a.jsxs)("div",{className:"max-h-64 space-y-1 overflow-y-auto pr-1","data-testid":"tts-voice-library-list",children:[S.slice(0,50).map(e=>{let t=N===e.id;return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded border border-border/40 bg-muted/20 px-2 py-1 text-xs","data-testid":"tts-voice-library-row-".concat(e.id),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"truncate font-medium",children:e.name}),(0,a.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:[eC(e),e.description&&(0,a.jsxs)("span",{children:[" \xb7 ",e.description]})]})]}),e.previewUrl&&(0,a.jsx)(d.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>t?E():P(e),className:"text-xs","data-testid":"tts-voice-library-preview-".concat(e.id),children:t?"⏸":"▶"}),(0,a.jsx)(d.$,{type:"button",size:"sm",onClick:()=>f&&C(f,e.id),className:"text-xs","data-testid":"tts-voice-library-apply-".concat(e.id),children:"Apply"})]},e.id)}),S.length>50&&(0,a.jsxs)("p",{className:"text-center text-[10px] text-muted-foreground",children:["Showing first 50 of ",S.length," \xb7 refine the search to see more"]}),0===S.length&&(0,a.jsxs)("p",{className:"px-2 py-4 text-center text-[11px] text-muted-foreground",children:['No voices match "',p,'"']})]})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:U,disabled:!M,className:"text-xs text-muted-foreground","data-testid":"tts-voice-reset-all",children:"Reset all"}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground/80",children:A?"".concat(null!=(e=null==m?void 0:m.voices.length)?e:0," voices \xb7 library cache via daemon"):"Paste voice id manually until daemon library is reachable"})]})]})}let eP={casual_chat:{id:"casual_chat",label:"Casual chat",icon:"\uD83D\uDCAC",description:"Day-to-day messaging \xb7 cheap STT / LLM \xb7 no read-back.",tiers:{stt:"budget",llm:"budget",tts:"budget"}},meeting:{id:"meeting",label:"Meeting notes",icon:"\uD83D\uDCCB",description:"Balanced accuracy for transcripts \xb7 standard LLM summarization.",tiers:{stt:"balanced",llm:"balanced",tts:"balanced"},monthlyUsdCap:5},medical_dictation:{id:"medical_dictation",label:"Medical / legal dictation",icon:"\uD83C\uDFE5",description:"Loaded STT (timestamps + jargon adaptation) \xb7 Best LLM \xb7 ElevenLabs voice.",tiers:{stt:"loaded",llm:"best",tts:"best"},monthlyUsdCap:20},live_caption:{id:"live_caption",label:"Live captioning",icon:"\uD83C\uDFAC",description:"Low-latency STT \xb7 LLM disabled \xb7 no read-back.",tiers:{stt:"balanced",llm:"budget",tts:"budget"}},sleep_mode:{id:"sleep_mode",label:"Sleep mode",icon:"\uD83C\uDF19",description:"Cost zero \xb7 local-only models \xb7 no API calls.",tiers:{stt:"budget",llm:"budget",tts:"budget"},monthlyUsdCap:0}},eE=["casual_chat","meeting","medical_dictation","live_caption","sleep_mode"],eM="elanous.active-preset";function eA(){if("undefined"!=typeof localStorage)try{let e=localStorage.getItem(eM);if(!e)return;return eE.includes(e)?e:void 0}catch(e){return}}function ez(e){if("undefined"!=typeof localStorage)try{null===e?localStorage.removeItem(eM):localStorage.setItem(eM,e)}catch(e){}}function eI(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(eA),[i,o]=(0,r.useState)("idle"),[c,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{l(eA())},[]);let m=async e=>{u(e.id),o("syncing"),(0,b.cY)("settings.preset.apply",{id:e.id}),ez(e.id),l(e.id),o(await (0,ed.F$)(t,{id:e.id,tiers:e.tiers,...e.ttsVoice?{ttsVoice:e.ttsVoice}:{},...void 0!==e.monthlyUsdCap?{monthlyUsdCap:e.monthlyUsdCap}:{}})),u(null)},x=async()=>{o("syncing"),(0,b.cY)("settings.preset.clear"),ez(null),l(void 0),o(await (0,ed.F$)(t,null))};return(0,a.jsxs)("section",{"data-testid":"preset-card-grid",className:"rounded border border-border/60 bg-card/40 p-4 shadow-sm",children:[(0,a.jsxs)("header",{className:"mb-2 flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"⚡ Quick presets"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"One-click bundles for common use cases — applies STT, LLM, TTS, voice id, and budget cap together. You can still fine-tune any slider after applying."})]}),"syncing"===i&&(0,a.jsx)("span",{className:"rounded bg-blue-500/10 px-1.5 py-0.5 text-[10px] text-blue-600","data-testid":"preset-sync-status",children:"Syncing…"}),"synced"===i&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 text-[10px] text-emerald-600","data-testid":"preset-sync-status",children:"Synced"}),"offline"===i&&(0,a.jsx)("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-600","data-testid":"preset-sync-status",children:"Offline"}),"error"===i&&(0,a.jsx)("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[10px] text-red-600","data-testid":"preset-sync-status",children:"Sync error"})]}),s&&(0,a.jsxs)("div",{className:"mb-3 flex items-center justify-between rounded bg-emerald-500/5 px-3 py-2 text-xs","data-testid":"preset-active-banner",children:[(0,a.jsxs)("span",{className:"text-emerald-700 dark:text-emerald-300",children:["✓ Active preset: ",(0,a.jsx)("strong",{children:eP[s].label})]}),(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:x,className:"text-[11px] text-muted-foreground","data-testid":"preset-clear-active",children:"Clear preset"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3","data-testid":"preset-card-list",children:eE.map(e=>{let t=eP[e],r=s===e,n=c===e;return(0,a.jsxs)("button",{type:"button",onClick:()=>m(t),disabled:n,className:"rounded-md border px-3 py-2 text-left transition-colors ".concat(r?"border-emerald-500 bg-emerald-500/5":"border-border/60 bg-background hover:bg-muted/40"),"data-testid":"preset-card-".concat(e),children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsxs)("span",{className:"text-sm font-semibold",children:[t.icon," ",t.label]}),r&&(0,a.jsx)("span",{className:"text-[10px] text-emerald-600",children:"active"}),n&&(0,a.jsx)("span",{className:"text-[10px] text-blue-600",children:"applying…"})]}),(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:t.description}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1 text-[9px] text-muted-foreground",children:[t.tiers.stt&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["stt:",t.tiers.stt]}),t.tiers.llm&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["llm:",t.tiers.llm]}),t.tiers.tts&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["tts:",t.tiers.tts]}),void 0!==t.monthlyUsdCap&&(0,a.jsxs)("span",{className:"rounded bg-muted px-1 py-0.5 font-mono",children:["cap:$",t.monthlyUsdCap]})]})]},e)})})]})}var eT=s(35486),eR=s(45558),eL=s(24962),eD=s(78242),e$=s(15153);let eO={skills:"\uD83D\uDEE0️",toolRestrictions:"\uD83D\uDD12",structuredOutput:"\uD83D\uDCCB",thinkingControl:"\uD83D\uDCAD",effortControl:"⚙️",sessionResume:"↩️",mcp:"\uD83E\uDDE9",hooks:"\uD83E\uDE9D",agents:"\uD83E\uDD16",envInjection:"\uD83D\uDD11",costControl:"\uD83D\uDCB0",fallbackModel:"\uD83D\uDD01",sandbox:"\uD83E\uDDF1",multiHostFanout:"\uD83C\uDF10"};function eY(){let{client:e,config:t}=(0,n.Q)(),s=(0,e$.X)(e),[l,i]=(0,r.useState)({}),[d,o]=(0,r.useState)({state:"idle"}),[c,u]=(0,r.useState)("list"),m=(0,r.useMemo)(()=>{let e=s.providers[0];return e?Object.keys(e.capabilities).sort():[]},[s.providers]);(0,r.useEffect)(()=>{if(s.providers.length>0&&0===Object.keys(l).length){let e={};for(let t of s.providers)e[t.id]=!1;i(e)}},[s.providers,l]);let x=(0,r.useCallback)(e=>{i(t=>({...t,[e]:!t[e]}))},[]),p=(0,r.useCallback)(async()=>{o({state:"running"});try{var e,a;let r="".concat(null!=(a=null==(e=t.baseUrl)?void 0:e.replace(/\/$/,""))?a:"","/v1/registry/discovery"),n={};t.token&&(n.authorization="Bearer ".concat(t.token));let l=await fetch(r,{method:"POST",headers:n});if(!l.ok)return void o({state:"error",detail:"HTTP ".concat(l.status)});await s.reload(),o({state:"ok"})}catch(e){o({state:"error",detail:e instanceof Error?e.message:String(e)})}},[t.baseUrl,t.token,s]);return(0,a.jsxs)("section",{className:"space-y-2","data-testid":"llm-catalog-card",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM Catalog"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[(0,a.jsx)("span",{"data-testid":"llm-catalog-summary",children:s.loading?"loading…":"".concat(s.providers.length," providers \xb7 ").concat(s.models.length," models")}),(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>"list"===e?"matrix":"list"),"aria-label":"Toggle view: list vs capability matrix","data-testid":"llm-catalog-view-toggle",className:"rounded px-1.5 py-0.5 text-[10px] uppercase font-medium hover:bg-surface-elevated",children:"list"===c?"matrix":"list"}),(0,a.jsx)("button",{type:"button",onClick:p,disabled:"running"===d.state||s.loading,"aria-label":"Run discovery refresh","data-testid":"llm-catalog-refresh",className:"rounded p-1 hover:bg-surface-elevated disabled:opacity-50",children:(0,a.jsx)(L.A,{className:"h-3 w-3 ".concat("running"===d.state?"animate-spin":"")})})]})]}),s.error&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error","data-testid":"llm-catalog-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),s.error]}),"error"===d.state&&(0,a.jsxs)("p",{className:"flex items-center gap-1 text-[11px] text-error",children:[(0,a.jsx)(D.A,{className:"h-3 w-3"}),"discovery failed \xb7 ",d.detail]}),"ok"===d.state&&(0,a.jsx)("p",{className:"text-[11px] text-emerald-600 dark:text-emerald-400",children:"discovery complete — catalog refreshed"}),s.loading&&0===s.providers.length&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Querying /v1/registry/catalog…"}),s.providers.length>0&&"matrix"===c&&(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-border","data-testid":"llm-catalog-matrix",children:(0,a.jsxs)("table",{className:"min-w-full text-[10px]",children:[(0,a.jsx)("thead",{className:"bg-surface-elevated",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"sticky left-0 z-10 bg-surface-elevated px-2 py-1 text-left font-medium",children:"Provider"}),m.map(e=>{var t;return(0,a.jsx)("th",{className:"px-1.5 py-1 text-center font-medium uppercase text-muted-foreground",title:e,children:null!=(t=eO[e])?t:e.slice(0,3)},e)})]})}),(0,a.jsx)("tbody",{children:s.providers.map(e=>(0,a.jsxs)("tr",{className:"border-t border-border/40","data-testid":"llm-catalog-matrix-row-".concat(e.id),children:[(0,a.jsx)("td",{className:"sticky left-0 z-10 bg-card px-2 py-1 font-mono text-[10px]",children:e.id}),m.map(t=>{let s=e.capabilities[t];return(0,a.jsx)("td",{className:"px-1.5 py-1 text-center",title:"".concat(e.id," \xb7 ").concat(t,": ").concat(s?"yes":"no"),children:s?(0,a.jsx)(eT.A,{className:"mx-auto h-3 w-3 text-emerald-600 dark:text-emerald-400"}):(0,a.jsx)(eR.A,{className:"mx-auto h-3 w-3 text-muted-foreground/50"})},t)})]},e.id))})]})}),s.providers.length>0&&"list"===c&&(0,a.jsx)("ul",{className:"space-y-1 rounded-md border border-border","data-testid":"llm-catalog-provider-list",children:s.providers.map(e=>{var t;let r=s.modelsByProvider(e.id),n=null!=(t=l[e.id])&&t,i=Object.entries(e.capabilities).filter(e=>{let[,t]=e;return!0===t}).map(e=>{let[t]=e;return t});return(0,a.jsxs)("li",{className:"border-b border-border/40 last:border-0","data-testid":"llm-catalog-provider-".concat(e.id),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>x(e.id),"aria-expanded":n,className:"flex w-full items-start justify-between gap-2 px-2 py-1.5 text-left hover:bg-surface-elevated","data-testid":"llm-catalog-provider-toggle-".concat(e.id),children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-[12px] font-medium",children:[n?(0,a.jsx)(eL.A,{className:"h-3 w-3"}):(0,a.jsx)(eD.A,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:e.displayName}),(0,a.jsx)("span",{className:"rounded bg-muted px-1 font-mono text-[9px] uppercase text-muted-foreground",children:e.id})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-0.5 pl-4 text-[10px] text-muted-foreground",children:i.map(e=>{var t;return(0,a.jsxs)("span",{className:"rounded bg-surface-elevated px-1",title:e,children:[null!=(t=eO[e])?t:"\xb7"," ",e]},e)})})]}),(0,a.jsxs)("span",{className:"shrink-0 rounded bg-muted px-1 text-[10px] text-muted-foreground",children:[r.length," model",1===r.length?"":"s"]})]}),n&&(0,a.jsxs)("ul",{className:"border-t border-border/40 bg-surface-elevated/50 px-2 py-1","data-testid":"llm-catalog-models-".concat(e.id),children:[0===r.length&&(0,a.jsx)("li",{className:"py-1 text-[10px] text-muted-foreground",children:"no models registered for this provider"}),r.map(e=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 py-0.5 font-mono text-[10px]","data-testid":"llm-catalog-model-".concat(e.id),children:[(0,a.jsx)("span",{className:"truncate",title:e.id,children:e.id}),(0,a.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:[e.contextSize?"".concat(Math.round(e.contextSize/1e3),"k ctx"):"—",e.pricing?" \xb7 $".concat(e.pricing.inputPerMTok,"/$").concat(e.pricing.outputPerMTok):""]})]},e.id))]})]},e.id)})})]})}var eB=s(58510);function e_(e){let{status:t,percent:s,monthlyUsdCap:n,monthSoFarUsd:l,recommendedFallback:i,notifyAtPct:o,onApply:c,onAdjustCap:u,onDismiss:m}=e,[x,p]=(0,r.useState)("switch"),h=(0,r.useRef)(null);(0,r.useEffect)(()=>{var e;null==(e=h.current)||e.focus()},[]);let f="cap-exceeded"===t,b=eo.LW[i],g=(0,eo.Bg)(l).replace("/mo",""),j=(0,eo.Bg)(n).replace("/mo","");return(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"budget-threshold-title","aria-describedby":"budget-threshold-summary","data-testid":"budget-threshold-modal","data-status":t,onKeyDown:e=>{"Escape"===e.key&&(e.stopPropagation(),m())},children:(0,a.jsxs)("div",{className:"w-full max-w-md rounded-lg border bg-white p-4 shadow-xl dark:bg-zinc-900 ".concat(f?"border-rose-300 dark:border-rose-700":"border-amber-300 dark:border-amber-700"),children:[(0,a.jsxs)("h2",{id:"budget-threshold-title",className:"mb-2 text-sm font-medium ".concat(f?"text-rose-700 dark:text-rose-300":"text-amber-700 dark:text-amber-300"),children:["\uD83D\uDCB0 You've used ",g," of ",j," monthly cap (",Math.round(s),"%)"]}),(0,a.jsx)("p",{id:"budget-threshold-summary",className:"mb-3 text-xs text-zinc-600 dark:text-zinc-400","data-testid":"budget-threshold-summary",children:f?"You've passed the cap. elanous recommends falling back to ".concat(b," tier for the rest of this month."):"You're past the ".concat(o,"% threshold. elanous can switch to ").concat(b," tier to slow the burn.")}),(0,a.jsxs)("fieldset",{className:"mb-4 space-y-1.5 text-xs","data-testid":"budget-threshold-choices",children:[(0,a.jsx)("legend",{className:"sr-only",children:"Auto-fallback options"}),(0,a.jsx)(eQ,{id:"switch",label:"Switch to ".concat(b," tier for the rest of this month"),checked:"switch"===x,onSelect:()=>p("switch")}),(0,a.jsx)(eQ,{id:"continue",label:"Continue at current tier (may exceed cap)",checked:"continue"===x,onSelect:()=>p("continue")}),(0,a.jsx)(eQ,{id:"local-only",label:"Use local-only models (cost = $0)",checked:"local-only"===x,onSelect:()=>p("local-only")})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,a.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",onClick:u,"data-testid":"budget-threshold-adjust-cap",children:"Adjust cap"}),(0,a.jsx)(d.$,{ref:h,type:"button",size:"sm",onClick:()=>c(x,i),"data-testid":"budget-threshold-apply",className:f?"bg-rose-600 text-white hover:bg-rose-700":"bg-amber-600 text-white hover:bg-amber-700",children:"Apply"})]})]})})}function eQ(e){let{id:t,label:s,checked:r,onSelect:n}=e;return(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded px-2 py-1 ".concat(r?"bg-zinc-100 dark:bg-zinc-800":"hover:bg-zinc-50 dark:hover:bg-zinc-800/50"),"data-testid":"budget-threshold-choice-".concat(t),children:[(0,a.jsx)("input",{type:"radio",name:"budget-threshold-choice",value:t,checked:r,onChange:n,className:"h-3 w-3"}),(0,a.jsx)("span",{className:"text-zinc-700 dark:text-zinc-200",children:s})]})}function eW(e){var t,s;let{pollMs:l=6e4,onAdjustCap:i}=e,{config:d}=(0,n.Q)(),[o,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{if(!d.baseUrl)return;let e=!1,t=async()=>{let t=await (0,eB.gh)({baseUrl:d.baseUrl,...d.token?{token:d.token}:{}});e||u(t)};if(t(),l<=0)return()=>{e=!0};let s=setInterval(()=>{t()},l);return()=>{e=!0,clearInterval(s)}},[d.baseUrl,d.token,l]);let m=(0,r.useCallback)(async(e,t)=>{if(!o)return;if("continue"===e){(0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"}),c.oR.message("Continuing at current tier — elanous will nag again at next threshold.");return}let s=await (0,eB.iQ)({baseUrl:d.baseUrl,...d.token?{token:d.token}:{}},t);"synced"===s?c.oR.success("Switched STT/LLM/TTS to ".concat(t,".")):"offline"===s?c.oR.error("Daemon offline — change saved locally, will sync when online."):c.oR.error("Budget fallback failed: ".concat(s,".")),(0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"})},[d.baseUrl,d.token,o]),x=(0,r.useCallback)(()=>{o&&((0,eB.s0)(o.monthYYYYMM,"ok"===o.status?"warning":o.status),u({...o,status:"ok"}))},[o]),p=(0,r.useCallback)(()=>{i&&i(),x()},[i,x]);return o&&(0,eB.Vl)(o)?(0,a.jsx)(e_,{status:o.status,percent:null!=(t=o.percent)?t:0,monthlyUsdCap:null!=(s=o.monthlyUsdCap)?s:0,monthSoFarUsd:o.monthSoFarUsd,recommendedFallback:o.recommendedFallback,notifyAtPct:o.notifyAtPct,onApply:(e,t)=>{m(e,t)},onAdjustCap:p,onDismiss:x}):null}let eF={embedding:"RAG retrieval \xb7 similarity. Most users never touch this.",vision:"OCR \xb7 screenshot analysis \xb7 note-from-image."};function eH(){let{config:e}=(0,n.Q)(),t=(0,r.useMemo)(()=>({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}),[e.baseUrl,e.token]),[s,l]=(0,r.useState)(ec.Ij),[i,o]=(0,r.useState)("idle"),[c,u]=(0,r.useState)("idle");(0,r.useEffect)(()=>{l((0,ec.Ij)());let e=!1;return(async()=>{let s=await (0,ed.ee)(t);!e&&s&&l(s)})(),()=>{e=!0}},[t]);let m=async(e,s)=>{(0,b.cY)("pwa.settings.tier.embedding-vision","selected ".concat(e,"=").concat(s)),"embedding"===e?(o("syncing"),o(await (0,ed.zs)(t,s)),l(e=>({...e,embedding:s}))):(u("syncing"),u(await (0,ed.We)(t,s)),l(e=>({...e,vision:s})))},x=e=>{let t="embedding"===e?(0,ec.ew)(s):(0,ec.lH)(s),r="embedding"===e?!!s.embedding:!!s.vision,n="embedding"===e?i:c;return(0,a.jsxs)("div",{className:"space-y-1.5","data-testid":"embedding-vision-row-".concat(e),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"embedding"===e?"Embedding":"Vision"}),(0,a.jsx)("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:r?"Saved \xb7 ".concat(n):"Smart default"})]}),(0,a.jsx)("p",{className:"text-[11px] text-zinc-500 dark:text-zinc-400",children:eF[e]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:eo.Ql.map(s=>(0,a.jsx)(d.$,{size:"sm",variant:s===t?"default":"outline",onClick:()=>{m(e,s)},"data-testid":"embedding-vision-".concat(e,"-").concat(s),className:"text-[11px]",children:eo.LW[s]},s))})]})};return(0,a.jsxs)("section",{className:"space-y-4 rounded-md border border-border bg-card p-4","data-testid":"embedding-vision-card",children:[(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Embedding \xb7 Vision tier"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Phase 3 scaffolding — model selection for RAG embedding + image vision. Resolvers wired; call-site integration follows as RAG / vision pipelines come online."})]}),x("embedding"),x("vision")]})}var eK=s(66781);function eV(e){var t,s;return{displayName:e.displayName,description:null!=(t=e.description)?t:"",systemPrompt:null!=(s=e.systemPrompt)?s:""}}function eq(e,t){let s=eV(e),a={};return t.displayName!==s.displayName&&(a.displayName=t.displayName),t.description!==s.description&&(a.description=t.description),t.systemPrompt!==s.systemPrompt&&(a.systemPrompt=t.systemPrompt),a}function eX(){let e=(0,k.Qj)(),[t,s]=(0,r.useState)(!1),[n,l]=(0,r.useState)({status:"idle"}),[i,o]=(0,r.useState)(null),[c,u]=(0,r.useState)({}),[m,x]=(0,r.useState)([]),[p,h]=(0,r.useState)(null),[f,b]=(0,r.useState)(""),[g,j]=(0,r.useState)(""),[v,y]=(0,r.useState)(!1),[N,w]=(0,r.useState)(null),[S,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{s(!0)},[]);let U=(0,r.useCallback)(async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){o(null),t||l({status:"loading"});try{let s=await e.getPersonas();l({status:"ok",personas:s.personas}),t||u({})}catch(e){t?o(e.message):l({status:"error",message:e.message})}}},[e]);(0,r.useEffect)(()=>{t&&e&&(U(),e.getPersonaPresets().then(e=>x(e.presets)).catch(e=>h(e.message)))},[t,e,U]);let P=(0,r.useCallback)(async()=>{if(e&&f&&g.trim()&&!v){y(!0),w(null),C(null);try{let t=await e.createPersona({preset:f,name:g.trim()});C("".concat(t.persona.displayName," 인격이 생성되었습니다.")),j(""),await U(!0)}catch(e){w(e.message)}finally{y(!1)}}},[e,f,g,v,U]),E=(0,r.useCallback)((e,t,s)=>{u(a=>{var r;let n={...null==(r=a[e.personaId])?void 0:r.draft};return s===eV(e)[t]?delete n[t]:n[t]=s,{...a,[e.personaId]:{draft:n,saving:!1,error:void 0}}})},[]),M=(0,r.useCallback)(async t=>{if(!e)return;let s=t.personaId,a=c[s];if(!a||a.saving)return;let r=eq(t,{...eV(t),...a.draft});if(0!==Object.keys(r).length){u(e=>({...e,[s]:{...a,saving:!0,error:void 0}}));try{let t=await e.patchPersona(s,r);l(e=>"ok"!==e.status?e:{status:"ok",personas:e.personas.map(e=>e.personaId===s?t.persona:e)}),u(e=>{let{[s]:t,...a}=e;return a})}catch(e){u(t=>({...t,[s]:{...a,saving:!1,error:e.message}}))}}},[e,c]);return t&&e?(0,a.jsxs)("section",{id:"personas","data-testid":"persona-card",className:"space-y-3 rounded border border-border bg-card p-4",children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:"Personas"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"프리셋으로 인격을 만들고 이름, 설명, 시스템 프롬프트를 편집합니다."})]}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>{U()},disabled:"loading"===n.status,children:"Refresh"})]}),(0,a.jsxs)("form",{className:"flex flex-wrap items-end gap-2",onSubmit:e=>{e.preventDefault(),P()},children:[(0,a.jsxs)("label",{className:"flex min-w-36 flex-1 flex-col gap-1 text-xs",htmlFor:"persona-preset",children:["프리셋",(0,a.jsxs)("select",{id:"persona-preset",value:f,onChange:e=>{b(e.target.value),w(null),C(null)},disabled:v,className:"rounded border border-input bg-background px-2.5 py-1.5",children:[(0,a.jsx)("option",{value:"",children:"프리셋 선택"}),m.map(e=>(0,a.jsx)("option",{value:e.personaId,children:e.displayName},e.personaId))]})]}),(0,a.jsxs)("label",{className:"flex min-w-36 flex-1 flex-col gap-1 text-xs",htmlFor:"persona-new-name",children:["이름",(0,a.jsx)("input",{id:"persona-new-name",value:g,onChange:e=>{j(e.target.value),w(null),C(null)},disabled:v,placeholder:"새 인격 이름",className:"rounded border border-input bg-background px-2.5 py-1.5"})]}),(0,a.jsx)(d.$,{type:"submit",size:"sm",disabled:!f||!g.trim()||v,children:v?"생성중…":"인격 만들기"})]}),p?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["프리셋 로드 실패: ",p]}):null,N?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["인격 생성 실패: ",N]}):null,S?(0,a.jsx)("p",{role:"status",className:"text-xs text-green-700 dark:text-green-400",children:S}):null,i?(0,a.jsxs)("p",{role:"alert",className:"text-xs text-destructive",children:["인격 목록 새로고침 실패: ",i]}):null,"idle"===n.status||"loading"===n.status?(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading personas…"}):null,"error"===n.status?(0,a.jsxs)("p",{className:"text-xs text-destructive",children:["persona 로드 실패: ",n.message]}):null,"ok"===n.status&&0===n.personas.length?(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"아직 인격이 없습니다. 위에서 프리셋을 골라 새 인격을 만드세요."}):null,"ok"===n.status&&n.personas.length>0?(0,a.jsx)("ul",{className:"flex flex-col gap-3",children:n.personas.map(e=>(0,a.jsx)(eG,{persona:e,edit:c[e.personaId],onDraftChange:E,onSave:M},e.personaId))}):null,(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Note: ⚗ Auto describer 와 orchestrator routing 은"," ",(0,a.jsx)("a",{href:"https://github.com/ElanvitalAI/elanous/blob/main/docs/research/RESEARCH-hermes-pr27572-triage-orchestrator-deferred-2026-05-19.md",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Hermes PR #27572 research"})," ","채택 시 활성화 예정."]})]}):null}function eG(e){var t;let{persona:s,edit:r,onDraftChange:n,onSave:l}=e,i={...eV(s),...null==r?void 0:r.draft},o=Object.keys(eq(s,i)).length>0,c=null!=(t=null==r?void 0:r.saving)&&t,u=280-i.description.length<0;return(0,a.jsxs)("li",{className:"flex flex-col gap-2 rounded border border-border bg-background p-3","data-testid":"persona-row-".concat(s.personaId),children:[(0,a.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[s.brandColor?(0,a.jsx)("span",{className:"inline-block h-3 w-3 rounded",style:{backgroundColor:s.brandColor},"aria-hidden":!0}):null,(0,a.jsx)("span",{className:"text-sm font-medium",children:s.displayName}),(0,a.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:s.personaId})]}),s.primaryModel?(0,a.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:s.primaryModel}):null]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["표시 이름",(0,a.jsx)("input",{value:i.displayName,onChange:e=>n(s,"displayName",e.target.value),disabled:c,"data-testid":"persona-display-name-".concat(s.personaId),className:"w-full rounded border border-input bg-transparent px-2.5 py-1.5"})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["설명",(0,a.jsx)("textarea",{value:i.description,onChange:e=>n(s,"description",e.target.value),rows:2,maxLength:560,placeholder:"이 persona 가 무엇을 잘 하는지 1-2 문장으로 적어주세요.",disabled:c,"data-testid":"persona-description-".concat(s.personaId),className:(0,eK.cn)("w-full rounded border border-input bg-transparent px-2.5 py-1.5 text-xs","focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50",u&&"border-destructive")})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:["시스템 프롬프트",(0,a.jsx)("textarea",{value:i.systemPrompt,onChange:e=>n(s,"systemPrompt",e.target.value),rows:5,disabled:c,"data-testid":"persona-system-prompt-".concat(s.personaId),className:"w-full rounded border border-input bg-transparent px-2.5 py-1.5 font-mono text-xs"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("span",{className:(0,eK.cn)("font-mono text-[10px]",u?"text-destructive":"text-muted-foreground"),children:[i.description.length," / ",280]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(null==r?void 0:r.error)?(0,a.jsx)("span",{className:"text-[10px] text-destructive",children:r.error}):null,(0,a.jsx)(d.$,{size:"sm",onClick:()=>l(s),disabled:!o||c||u||!i.displayName.trim(),"data-testid":"persona-save-".concat(s.personaId),children:c?"저장중…":"저장"})]})]})]})}let eJ="2026-11-04T01:36:34.043Z",eZ="6c2732f";function e0(e){try{return new Date(e).toLocaleString("ko-KR",{timeZone:"Asia/Seoul",year:"2-digit",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}catch(t){return e}}function e1(){let[e,t]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=!1;return fetch("/v1/health").then(e=>e.ok?e.json():null).then(s=>{!e&&s&&"number"==typeof s.startedAt&&t({startedAt:s.startedAt,sha:"string"==typeof s.daemonSha?s.daemonSha:""})}).catch(()=>{}),()=>{e=!0}},[]);let s=eZ&&"unknown"!==eZ?eZ:"",n=(null==e?void 0:e.sha)&&"unknown"!==e.sha?e.sha:"",l=!!n&&!!s&&n!==s;return(0,a.jsxs)("section",{className:"space-y-3 rounded-2xl border border-border bg-card p-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"빌드 정보"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"배포 최신 여부 판별 — 새로고침 후 시각/SHA 가 안 바뀌면 옛 캐시."})]}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"rounded-xl bg-muted/40 p-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:"PWA 프론트 빌드"}),(0,a.jsxs)("div",{className:"mt-1 font-mono text-sm",children:[eJ?e0(eJ):"—",s?" \xb7 ".concat(s):""]})]}),(0,a.jsxs)("div",{className:"rounded-xl bg-muted/40 p-3",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:"데몬(백엔드) 시작"}),(0,a.jsxs)("div",{className:"mt-1 font-mono text-sm ".concat(l?"text-amber-500":""),children:[e?e0(new Date(e.startedAt).toISOString()):"…",n?" \xb7 ".concat(n):""]}),l&&(0,a.jsx)("div",{className:"mt-1 text-[11px] text-amber-500",children:"프론트/데몬 SHA 불일치 — 재빌드\xb7재시작 필요"})]})]})]})}var e2=s(11953),e5=s(98853);function e3(){let{read:e=e5.fG,write:t=e5.MQ}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[s,n]=(0,r.useState)(!1),[l,i]=(0,r.useState)(!1);(0,r.useEffect)(()=>{n(e(e2.f4)),i(e(e2.vm))},[e]);let d=e=>e2.Ue.filter(t=>t.visibility===e).map(e=>e.label).join(" \xb7 "),o=(e,s,a)=>{a(s),t(e,s)};return(0,a.jsxs)("section",{className:"space-y-3 rounded-2xl border border-border bg-card p-4","aria-label":"메뉴",children:[(0,a.jsx)("h2",{className:"text-base font-semibold",children:"메뉴"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"메뉴에는 주요 탭만 보입니다. Labs(베타)와 숨긴 탭은 이 기기에서만 켤 수 있고, 숨긴 탭도 주소로는 열립니다."}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox","data-elanous-action":"menu-show-labs",checked:s,onChange:e=>o(e2.f4,e.target.checked,n)}),(0,a.jsxs)("span",{children:["Labs 탭 보기 ",(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",d("labs"),")"]})]})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,a.jsx)("input",{type:"checkbox","data-elanous-action":"menu-show-hidden",checked:l,onChange:e=>o(e2.vm,e.target.checked,i)}),(0,a.jsxs)("span",{children:["숨긴 탭 보기 ",(0,a.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",d("hidden"),")"]})]})]})]})}let e4=["","claude","gemini","grok","codex"];function e6(){let[e,t]=(0,r.useState)(i.sR);return(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Mermaid theme"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"자동은 밝은 default 도식입니다. 노트의 init 테마 지시가 이 설정보다 우선합니다."}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Mermaid theme",children:i.HS.map(s=>(0,a.jsx)(d.$,{type:"button",variant:e===s?"default":"outline",size:"sm","aria-pressed":e===s,onClick:()=>{t(s),(0,i.Rk)(s)},children:"auto"===s?"자동":s},s))})]})}function e8(){var e,t,s,i,b,g;let{config:j,setConfig:k,client:w,sessionId:C}=(0,n.Q)();(0,r.useEffect)(()=>{if("#bearer-token"!==window.location.hash)return;let e=window.setTimeout(()=>{let e=document.getElementById("bearer-token");null==e||e.scrollIntoView({block:"center"}),null==e||e.focus()},50);return()=>window.clearTimeout(e)},[]);let{theme:U,setTheme:A}=(0,l.D)(),[I,L]=(0,r.useState)({status:"idle"}),[D,$]=(0,r.useState)({status:"idle"}),[O,Y]=(0,r.useState)({status:"idle"}),[B,Q]=(0,r.useState)(0),[W,K]=(0,r.useState)({status:"idle"}),[V,X]=(0,r.useState)(0),[Z,et]=(0,r.useState)({status:"idle"}),[ea,er]=(0,r.useState)(0),[el,ed]=(0,r.useState)(()=>({supported:!1,permission:"unknown",cachedId:null,cachedLabel:null})),[eo,ec]=(0,r.useState)(!1),[eu,em]=(0,r.useState)(null);(0,r.useEffect)(()=>{ed(v())},[]);let ep=(0,r.useCallback)(()=>{ed(v())},[]),eh=(0,r.useCallback)(async()=>{ec(!0),em(null);try{let e=await y({baseUrl:j.baseUrl,...j.token?{token:j.token}:{}});"enabled"===e.status?c.oR.success("Notifications enabled"):"permission-denied"===e.status?c.oR.error("Permission denied — enable in browser/iOS settings"):"unsupported"===e.status?c.oR.error("Push not supported: ".concat(e.reason)):(em(e.reason),c.oR.error("Enable failed: ".concat(e.reason)))}finally{ec(!1),ep()}},[j.baseUrl,j.token,ep]),eb=(0,r.useCallback)(async()=>{ec(!0);try{await N({baseUrl:j.baseUrl,...j.token?{token:j.token}:{}}),c.oR.success("Notifications disabled")}finally{ec(!1),ep()}},[j.baseUrl,j.token,ep]),ej=(0,r.useCallback)(async()=>{if(j.baseUrl)try{var e,t;let s=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/push/test"),{method:"POST",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(!s.ok)return void c.oR.error("Test failed: HTTP ".concat(s.status));let a=await s.json();c.oR.success("Test sent: ".concat(null!=(e=a.delivered)?e:0," / ").concat(null!=(t=a.attempted)?t:0," delivered"))}catch(e){c.oR.error("Test failed: ".concat(e instanceof Error?e.message:String(e)))}},[j.baseUrl,j.token]),[ev,ey]=(0,r.useState)(""),[eN,ek]=(0,r.useState)(""),[ew,eS]=(0,r.useState)(""),[eC,eP]=(0,r.useState)(null),[eE,eM]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!j.baseUrl)return void L({status:"idle"});let e=!1,t=new AbortController,s=Date.now();return L({status:"loading"}),(async()=>{try{let a=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/health"),{signal:t.signal});if(e)return;let r=Date.now()-s;if(!a.ok)return void L({status:"error",error:"HTTP ".concat(a.status),latencyMs:r,checkedAt:Date.now()});let n=await a.json();L({status:n.ok?"ok":"error",..."number"==typeof n.sessions?{sessions:n.sessions}:{},latencyMs:r,checkedAt:Date.now(),...n.ok?{}:{error:"health.ok=false"}})}catch(t){if(e)return;L({status:"error",error:t instanceof Error?t.message:String(t),latencyMs:Date.now()-s,checkedAt:Date.now()})}})(),()=>{e=!0,t.abort()}},[j.baseUrl]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void $({status:"idle"});let e=!1,t=new AbortController;return $({status:"loading"}),(async()=>{try{var s,a;let r=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/tools"),{signal:t.signal,credentials:"same-origin",mode:"same-origin",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(!r.ok)return void $({status:"error",error:"HTTP ".concat(r.status)});let n=await r.json(),l=(null!=(s=n.specs)?s:[]).map(e=>{var t;return"string"==typeof e?{name:e,description:""}:{name:e.name,description:null!=(t=e.description)?t:""}});$({status:"ok",kind:null!=(a=n.kind)?a:"none",specs:l})}catch(t){if(e)return;$({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,t.abort()}},[I.status,I.checkedAt,j.baseUrl,j.token]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void Y({status:"idle"});let e=!1,t=new AbortController;return Y({status:"loading"}),(async()=>{try{var s;let a=await fetch("".concat(j.baseUrl.replace(/\/$/,""),"/v1/diag/auth-trace"),{signal:t.signal,credentials:"same-origin",mode:"same-origin",...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(!a.ok)return void Y({status:"error",error:"HTTP ".concat(a.status)});let r=await a.json();Y({status:"ok",entries:null!=(s=r.entries)?s:[],fetchedAt:Date.now()})}catch(t){if(e)return;Y({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,t.abort()}},[I.status,I.checkedAt,j.baseUrl,j.token,B]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl||!C)return void K({status:"idle"});let e=!1,t=null,s=new AbortController;return K({status:"loading"}),(async()=>{try{let a="".concat(j.baseUrl.replace(/\/$/,""),"/v1/turns/last/screenshot?session=").concat(encodeURIComponent(C)),r=await fetch(a,{signal:s.signal,...j.token?{headers:{authorization:"Bearer ".concat(j.token)}}:{}});if(e)return;if(404===r.status)return void K({status:"none",fetchedAt:Date.now()});if(!r.ok)return void K({status:"error",error:"HTTP ".concat(r.status)});let n=await r.blob();if(e)return;t=URL.createObjectURL(n),K({status:"ok",objectUrl:t,fetchedAt:Date.now()})}catch(t){if(e)return;K({status:"error",error:t instanceof Error?t.message:String(t)})}})(),()=>{e=!0,s.abort(),t&&URL.revokeObjectURL(t)}},[I.status,j.baseUrl,j.token,C,V]),(0,r.useEffect)(()=>{if("ok"!==I.status||!j.baseUrl)return void et({status:"idle"});let e=!1;return et(e=>({...e,status:"loading"})),(async()=>{try{let t=await p(w);if(e)return;et(e=>({status:"ok",bindings:t.bindings,...e.secretRef?{secretRef:e.secretRef}:{},...e.pendingSecretValue?{pendingSecretValue:e.pendingSecretValue}:{}}))}catch(s){if(e)return;let t=s instanceof Error?s.message:String(s);t.includes("404")||t.includes("Not Found")?et({status:"nexus-missing"}):et({status:"error",error:t})}})(),()=>{e=!0}},[w,I.status,j.baseUrl,ea]);let eA=(0,r.useCallback)(()=>{er(e=>e+1)},[]),ez=(0,r.useCallback)(async()=>{eM(!0);try{let e=function(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}(),t=await x(w,e);et(s=>({...s,secretRef:t.ref,pendingSecretValue:e})),c.oR.success("Pushcut secret rotated \xb7 copy + paste into iPhone Shortcut")}catch(t){let e=t instanceof Error?t.message:String(t);c.oR.error("secret rotate failed: ".concat(e))}finally{eM(!1)}},[w]),eT=(0,r.useCallback)(async()=>{if(!ev.trim())return void c.oR.error("token required");let e=eN.trim()||C;if(!e)return void c.oR.error("sessionId required (auto-fill: open this session in /term first)");eP("__new__");try{await h(w,{token:ev.trim(),sessionId:e,...ew.trim()?{label:ew.trim()}:{}}),c.oR.success("binding saved"),ey(""),ek(""),eS(""),eA()}catch(e){c.oR.error("binding save failed: ".concat(e instanceof Error?e.message:String(e)))}finally{eP(null)}},[w,ev,eN,ew,C,eA]),eR=(0,r.useCallback)(async e=>{eP(e);try{await f(w,e),c.oR.success("binding deleted: ".concat(e.slice(0,8),"…")),eA()}catch(e){c.oR.error("delete failed: ".concat(e instanceof Error?e.message:String(e)))}finally{eP(null)}},[w,eA]),eL=e=>"number"!=typeof e?"—":"".concat(e," ms"),eD=e=>{if(!e)return"";let t=Math.floor((Date.now()-e)/1e3);return t<5?"just now":t<60?"".concat(t,"s ago"):"".concat(Math.floor(t/60),"m ago")};return(0,a.jsxs)("div",{className:"mx-auto max-w-2xl space-y-8 p-6",children:[(0,a.jsx)(eW,{}),(0,a.jsxs)("header",{className:"space-y-1",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Settings"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:"Daemon connection, provider default, theme. Stored in localStorage."})]}),(0,a.jsx)(z,{}),(0,a.jsx)(S,{}),(0,a.jsx)(P.Q,{}),(0,a.jsx)(E.lN,{}),(0,a.jsx)(M.Q,{}),(0,a.jsx)("div",{id:"channels",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(_,{}),(0,a.jsx)(F.W,{}),(0,a.jsx)("div",{id:"advanced",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(eY,{}),(0,a.jsx)(en,{}),(0,a.jsx)(H,{}),(0,a.jsx)(G,{}),(0,a.jsx)(J,{}),(0,a.jsx)(q,{}),(0,a.jsx)(ee,{}),(0,a.jsx)(es,{}),(0,a.jsx)("div",{id:"voice",className:"scroll-mt-8","aria-hidden":!0}),(0,a.jsx)(ei,{}),(0,a.jsx)(eI,{}),(0,a.jsx)(ex,{}),(0,a.jsx)(ef,{}),(0,a.jsx)(eg,{}),(0,a.jsx)(eU,{}),(0,a.jsx)(eH,{}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"데몬 연결"}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Base URL"}),(0,a.jsx)(o.p,{value:j.baseUrl,placeholder:"http://localhost:31415",onChange:e=>k({baseUrl:e.target.value})})]}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"연결 토큰"}),(0,a.jsx)(o.p,{id:"bearer-token",type:"password",value:j.token,placeholder:"다른 기기에서 만든 연결 토큰을 붙여 넣으세요",onChange:e=>k({token:e.target.value})})]}),(0,a.jsxs)("label",{className:"block space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"Default provider"}),(0,a.jsx)("select",{value:j.provider,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-xs focus:outline-none focus:ring-2 focus:ring-ring",onChange:e=>k({provider:e.target.value}),children:e4.map(e=>(0,a.jsx)("option",{value:e,children:e||"(none — server default)"},e))})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Daemon health"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>{k({baseUrl:j.baseUrl})},disabled:!j.baseUrl,children:"Recheck"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["idle"===I.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Set Base URL above to probe."}),"loading"===I.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"ok"===I.status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-emerald-500","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-foreground",children:"Reachable"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:eL(I.latencyMs)}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:eD(I.checkedAt)})]}),"number"==typeof I.sessions&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Active sessions: ",(0,a.jsx)("span",{className:"font-mono text-foreground",children:I.sessions})]})]}),"error"===I.status&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-rose-500","aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-rose-600 dark:text-rose-400",children:"Unreachable"}),(0,a.jsx)("span",{className:"text-muted-foreground",children:eL(I.latencyMs)}),(0,a.jsx)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:eD(I.checkedAt)})]}),(0,a.jsx)("p",{className:"break-all font-mono text-[11px] text-muted-foreground",children:I.error}),(0,a.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["Verify Base URL \xb7 daemon running (",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"elanous serve --status"}),") \xb7 network reachable from this device."]})]})]})]}),(0,a.jsx)("div",{id:"tools",className:"scroll-mt-8","aria-hidden":!0}),("ok"===D.status||"error"===D.status)&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"LLM tool surface"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["ok"===D.status&&"none"===D.kind&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Tools 미설정 — `elanous serve --tools readonly` 또는 `webterm` 으로 활성화."}),"ok"===D.status&&D.kind&&"none"!==D.kind&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full ".concat("webterm"===D.kind?"bg-amber-500":"bg-emerald-500"),"aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium text-foreground",children:"kind:"}),(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono",children:D.kind}),"webterm"===D.kind&&(0,a.jsx)("span",{className:"text-[10px] text-amber-600 dark:text-amber-400",children:"(write-capable)"})]}),D.specs&&D.specs.length>0&&(0,a.jsx)("ul",{className:"flex flex-wrap gap-1",children:D.specs.map(e=>(0,a.jsx)("li",{title:e.description,className:"rounded border border-border bg-muted/50 px-1.5 py-0.5 font-mono text-[10px]",children:e.name},e.name))})]}),"error"===D.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"tool surface 조회 실패"})," \xb7 ",D.error]})]})]}),("ok"===O.status||"error"===O.status)&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Auth trace"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>Q(e=>e+1),children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["error"===O.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"auth-trace 조회 실패"})," \xb7 ",O.error]}),"ok"===O.status&&(null!=(i=null==(e=O.entries)?void 0:e.length)?i:0)===0&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"아직 auth 결정 없음. /v1/* 호출이 한 번도 없었다는 뜻."}),"ok"===O.status&&O.entries&&O.entries.length>0&&(0,a.jsx)("div",{className:"max-h-64 overflow-auto font-mono text-[10px]",children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{className:"sticky top-0 bg-card text-muted-foreground",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-1 text-left",children:"time"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"path"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"ok"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"reason"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"sfs"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"origin"}),(0,a.jsx)("th",{className:"px-1 text-left",children:"host"})]})}),(0,a.jsx)("tbody",{children:O.entries.slice().reverse().slice(0,30).map((e,t)=>{var s,r,n;return(0,a.jsxs)("tr",{className:"border-t border-border/50",children:[(0,a.jsx)("td",{className:"px-1 whitespace-nowrap",children:new Date(e.ts).toLocaleTimeString()}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[120px]",children:e.path}),(0,a.jsx)("td",{className:"px-1 ".concat(e.ok?"text-emerald-500":"text-rose-500"),children:e.ok?"Y":"N"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:e.reason}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[80px]",children:null!=(s=e.sfs)?s:"∅"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:null!=(r=e.origin)?r:"∅"}),(0,a.jsx)("td",{className:"px-1 truncate max-w-[140px]",children:null!=(n=e.host)?n:"∅"})]},"".concat(e.ts,"-").concat(t))})})]})})]})]}),C&&"webterm"===D.kind&&(0,a.jsxs)("section",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Last screenshot"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:()=>X(e=>e+1),disabled:"loading"===W.status||!j.baseUrl,children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs",children:["loading"===W.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"none"===W.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["아직 agent 가 screenshot 을 호출한 적 없음. ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"WebTerminalScreenshot"})," tool 실행 후 Refresh."]}),"ok"===W.status&&W.objectUrl&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("p",{className:"text-muted-foreground",children:["Most recent ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"tool_result"})," image in this session."]}),(0,a.jsx)("img",{src:W.objectUrl,alt:"Last screenshot",className:"max-w-full rounded border border-border bg-black"})]}),"error"===W.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"screenshot 조회 실패"})," \xb7 ",W.error]})]})]}),("idle"!==Z.status||"ok"===I.status)&&(0,a.jsxs)("section",{className:"space-y-3","data-testid":"pushcut-section",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Pushcut webhook"}),(0,a.jsx)(d.$,{variant:"outline",size:"sm",onClick:eA,disabled:"loading"===Z.status||!j.baseUrl,"data-testid":"pushcut-refresh",children:"Refresh"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-3",children:["loading"===Z.status&&(0,a.jsx)("p",{className:"text-muted-foreground",children:"Probing…"}),"nexus-missing"===Z.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:["NEXUS endpoints not reachable. ",(0,a.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5",children:"elanous nexus"})," 로 띄우면 secret + binding 관리가 활성됩니다.",(0,a.jsxs)("span",{className:"block mt-1 text-[10px]",children:["(현재 daemon 만 단독 실행 중인 경우 — 본 섹션은 NEXUS HTTP 의 ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/v1/registry/bindings"})," + ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"/v1/config/secrets"})," 의존)"]})]}),"error"===Z.status&&(0,a.jsxs)("p",{className:"text-muted-foreground",children:[(0,a.jsx)("span",{className:"text-rose-500",children:"조회 실패"})," \xb7 ",Z.error]}),("ok"===Z.status||Z.secretRef)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"HMAC secret"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{ez()},disabled:eE||!j.baseUrl,"data-testid":"pushcut-rotate-secret",children:eE?"Rotating…":"Rotate"})]}),Z.secretRef&&(0,a.jsxs)("p",{className:"font-mono text-[10px] text-muted-foreground",children:["ref: ",(0,a.jsx)("span",{className:"text-foreground",children:Z.secretRef})," \xb7 id: ",(0,a.jsx)("span",{className:"text-foreground",children:u})]}),Z.pendingSecretValue&&(0,a.jsxs)("div",{className:"rounded border border-amber-300 bg-amber-50 px-2 py-1.5 dark:border-amber-700 dark:bg-amber-950",children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-amber-700 dark:text-amber-200",children:"Copy now — only shown once"}),(0,a.jsx)("code",{className:"block break-all font-mono text-[11px] text-amber-900 dark:text-amber-100 select-all","data-testid":"pushcut-secret-value",children:Z.pendingSecretValue}),(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-amber-700 dark:text-amber-300",children:["Paste into iPhone “elanous-camera” Pushcut Shortcut Header ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:"X-Pushcut-Sig"})," recipe."]})]})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-medium",children:"연결 (토큰 → 대화)"}),(0,a.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:[null!=(b=null==(t=Z.bindings)?void 0:t.length)?b:0," active"]})]}),(null!=(g=null==(s=Z.bindings)?void 0:s.length)?g:0)===0&&"ok"===Z.status&&(0,a.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"No bindings yet. Add one below — the daemon will route Pushcut webhooks for that token to the chosen session."}),Z.bindings&&Z.bindings.length>0&&(0,a.jsx)("ul",{className:"space-y-1","data-testid":"pushcut-bindings-list",children:Z.bindings.map(e=>{var t,s;return(0,a.jsxs)("li",{className:"flex items-center gap-2 rounded border border-border bg-muted/30 px-2 py-1",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 space-y-0.5",children:[(0,a.jsx)("div",{className:"font-mono text-[11px] font-medium truncate",children:null!=(t=e.label)?t:"(no label)"}),(0,a.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground truncate",children:["token: ",e.key.length>16?"".concat(e.key.slice(0,8),"…").concat(e.key.slice(-4)):e.key]}),(0,a.jsxs)("div",{className:"font-mono text-[10px] text-muted-foreground truncate",children:["session: ",null!=(s=e.sessionId)?s:"(unset)"]})]}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{eR(e.key)},disabled:eC===e.key,"data-testid":"pushcut-delete-".concat(e.key),children:eC===e.key?"Deleting…":"Delete"})]},e.key)})}),(0,a.jsxs)("div",{className:"space-y-1.5 rounded border border-dashed border-border p-2 mt-2",children:[(0,a.jsx)("p",{className:"text-[10px] font-medium text-muted-foreground",children:"Add binding"}),(0,a.jsx)(o.p,{value:ev,placeholder:"token (webhook URL key)",onChange:e=>ey(e.target.value),"data-testid":"pushcut-add-token",className:"text-[11px]"}),(0,a.jsx)(o.p,{value:eN,placeholder:C?"sessionId (default: ".concat(C.slice(0,12),"…)"):"sessionId",onChange:e=>ek(e.target.value),"data-testid":"pushcut-add-session",className:"text-[11px]"}),(0,a.jsx)(o.p,{value:ew,placeholder:"label (e.g. iPhone 15)",onChange:e=>eS(e.target.value),"data-testid":"pushcut-add-label",className:"text-[11px]"}),(0,a.jsx)(d.$,{size:"sm",onClick:()=>{eT()},disabled:"__new__"===eC||!ev.trim(),"data-testid":"pushcut-add-submit",children:"__new__"===eC?"Saving…":"Add"})]})]})]})]}),(0,a.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Channel: ",(0,a.jsx)("code",{className:"rounded bg-muted px-1",children:m})," \xb7 powered by NEXUS subsystem registry (PR τ #1698) + secret backend (PR σ #1696). Webhook receiver lands in a follow-up daemon-side PR."]})]}),(0,a.jsx)("div",{id:"ios",className:"scroll-mt-8","aria-hidden":!0}),el.supported&&(0,a.jsxs)("section",{className:"space-y-3","data-testid":"webpush-section",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Notifications"}),(0,a.jsxs)("div",{className:"rounded-md border border-border bg-card p-3 text-xs space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"inline-block h-2 w-2 rounded-full ".concat(el.cachedId?"bg-emerald-500":"denied"===el.permission?"bg-rose-500":"bg-muted-foreground"),"aria-hidden":!0}),(0,a.jsx)("span",{className:"font-medium",children:el.cachedId?"Subscribed":"denied"===el.permission?"Permission denied":"Not subscribed"}),el.cachedLabel&&(0,a.jsx)("span",{className:"ml-auto font-mono text-[10px] text-muted-foreground",children:el.cachedLabel})]}),"denied"===el.permission&&(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Browser/iOS denied notification permission. Enable in Settings → Safari → Notifications, then reload."}),eu&&(0,a.jsx)("p",{className:"text-[10px] text-rose-500 break-all","data-testid":"webpush-error",children:eu}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[!el.cachedId&&(0,a.jsx)(d.$,{size:"sm",onClick:()=>{eh()},disabled:eo||!j.baseUrl||"denied"===el.permission,"data-testid":"webpush-enable",children:eo?"Enabling…":"Enable notifications"}),el.cachedId&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{eb()},disabled:eo,"data-testid":"webpush-disable",children:eo?"Disabling…":"Disable"}),(0,a.jsx)(d.$,{size:"sm",variant:"outline",onClick:()=>{ej()},disabled:eo||!j.baseUrl,"data-testid":"webpush-test",children:"Send test"})]})]}),(0,a.jsx)("p",{className:"text-[10px] text-muted-foreground",children:"Push 알림은 PWA 가 닫혀 있어도 도착합니다 — agent turn 완료 \xb7 녹화 종료 등. iOS 16.4+ home-screen installed PWA 만 작동 (Pushcut 가 fallback)."})]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"대화"}),(0,a.jsx)("div",{className:"rounded-md border border-border bg-card px-3 py-2 font-mono text-xs",children:C||"(no session yet)"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["A new session id is allocated on first load. Use Chat’s",(0,a.jsx)("code",{className:"mx-1 rounded bg-muted px-1.5 py-0.5",children:":fork"}),"meta-command to start fresh once U-3 ships."]})]}),(0,a.jsxs)("section",{className:"space-y-3",children:[(0,a.jsx)("h2",{className:"text-sm font-medium",children:"Theme"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:l.z.map(e=>(0,a.jsx)(d.$,{variant:e===U?"default":"outline",size:"sm",onClick:()=>A(e),children:e},e))})]}),(0,a.jsx)(e6,{}),(0,a.jsx)(eX,{}),(0,a.jsx)(T,{}),(0,a.jsx)(R,{}),(0,a.jsx)(e3,{}),(0,a.jsx)(e1,{}),(0,a.jsx)(d.$,{onClick:()=>c.oR.success("Settings saved"),children:"Saved"})]})}},76192:(e,t,s)=>{s.d(t,{GZ:()=>i,_n:()=>u,gu:()=>o,mB:()=>d,sY:()=>c,u9:()=>m});let a="elanous.showroom.intentPanel.collapsed",r="elanous.showroom.intentPanel.displayMode",n="fixed",l=new Set(["fixed","popup","off"]);function i(){try{return"true"===window.localStorage.getItem(a)}catch(e){return!1}}function d(e){try{e?window.localStorage.setItem(a,"true"):window.localStorage.removeItem(a),window.dispatchEvent(new StorageEvent("storage",{key:a,newValue:e?"true":null}))}catch(e){}}function o(e){let t=t=>{(t.key===a||null===t.key)&&e(i())};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}function c(){try{let e=window.localStorage.getItem(r);if(e&&l.has(e))return e;return n}catch(e){return n}}function u(e){try{e===n?window.localStorage.removeItem(r):window.localStorage.setItem(r,e),window.dispatchEvent(new StorageEvent("storage",{key:r,newValue:e===n?null:e}))}catch(e){}}function m(e){let t=t=>{(t.key===r||null===t.key)&&e(c())};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}},84663:(e,t,s)=>{s.d(t,{HS:()=>a,O2:()=>n,Rk:()=>o,XP:()=>c,sR:()=>d,uU:()=>r});let a=["auto","default","neutral","dark","forest"],r="elanous.mermaid.theme",n="elanous:mermaid-theme-change",l=null,i=null;function d(){if(i!==window&&(l=null),null!==l)return l;try{var e;let t=window.localStorage.getItem(r);return null!=(e=a.find(e=>e===t))?e:"auto"}catch(e){return"auto"}}function o(e){i=window;try{window.localStorage.setItem(r,e),l=null}catch(t){l=e}window.dispatchEvent(new Event(n))}function c(e,t){for(let t of e.matchAll(/%%\{\s*init\s*:\s*\{([\s\S]*?)\}\s*\}%%/gi)){var s;let e=null==(s=t[1])?void 0:s.match(/(?:^|,)\s*['"]?theme['"]?\s*:\s*['"]?(default|neutral|dark|forest|base)\b/i);if(e)return e[1].toLowerCase()}return"auto"===t?"default":t}},98853:(e,t,s)=>{s.d(t,{MQ:()=>n,OY:()=>a,fG:()=>r});let a="elanous:nav-prefs";function r(e){try{return"1"===window.localStorage.getItem(e)}catch(e){return!1}}function n(e,t){try{t?window.localStorage.setItem(e,"1"):window.localStorage.removeItem(e)}catch(e){}try{window.dispatchEvent(new Event(a))}catch(e){}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4719],{40889:(e,t,l)=>{l.d(t,{g:()=>i,q:()=>s});var n=l(43849);let a=[{id:"OP",seat:"COO"},{id:"MK",seat:"CMO"},{id:"TC",seat:"CTO"},{id:"UX",seat:"CXO"}];function r(e){return(0,n.t)(e.replace(/\s+/g," ")).trim()}function s(e){var t;let l=e.split("\n"),n=(e,t)=>{let l=e.trim();return t&&(l=(l=l.replace(/^\*\*\[[^\]]+\]\*\*\s*/,"")).replace(/^(?:📌\S*\s*)?\d{4}-\d{2}-\d{2}\s+\d{1,2}:\d{2}\s*KST\s*/,"")),r(l=(l=(l=(l=(l=(l=l.replace(/^→\s*(?:[A-Z]{1,4}|전원|전체)(?=\s|·|$)(?:\s*·\s*(?:[A-Z]{1,4}|전원|전체)(?=\s|·|$))*\s*(?:·)?\s*/u,"")).replace(/^—\s*/,"")).replace(/^[-*]\s+/,"").replace(/\*\*|`|__/g,"").replace(/^#+\s*/,"").trim()).replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,"")).replace(RegExp("^(?:\\p{Extended_Pictographic}\\uFE0F?)+\\s*","u"),"")).replace(/^(?:보고|요청|정정|결정|사고|안내)\s*·\s*/,""))},a=n(null!=(t=l[0])?t:"",!0);if(a)return a;let s=l.slice(1).find(e=>e.trim());return s?n(s,!1):""}function i(e,t){var l;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return{seats:a.map(t=>{var l;let{id:n,seat:a}=t,r=null==e?void 0:e.seats.find(e=>e.seat===n);return{seat:a,now:(null==r?void 0:r.now)&&Array.from(s(r.now.text)).slice(0,40).join("")||"못 읽음",landedToday:(null==r?void 0:r.landed)==null?"못 읽음":r.landed.length,blocked:(null==r?void 0:r.blocked)==null?"못 읽음":r.blocked.length,decisionsWaiting:null!=(l=null==r?void 0:r.pendingDecisions)?l:"못 읽음"}}),runs:(null!=(l=null==t?void 0:t.entries)?l:[]).filter(e=>"running"===e.status).sort((e,t)=>{var l,n;return(Date.parse(null!=(l=t.lastActivityTimestamp)?l:"")||0)-(Date.parse(null!=(n=e.lastActivityTimestamp)?n:"")||0)}).slice(0,6).map(e=>{var t;let l=Date.parse(null!=(t=e.lastActivityTimestamp)?t:"");return{id6:function(e){let t=e.replace(/^run-/i,"");return/^[a-z0-9]{6}/i.test(t)&&r(t.slice(0,6))||"못 읽음"}(e.runId),stage:r(e.lastPhase||e.status)||"못 읽음",elapsedSec:Number.isFinite(l)?Math.max(0,Math.floor((n-l)/1e3)):"못 읽음"}})}}},41346:(e,t,l)=>{l.d(t,{u:()=>n});function n(e,t){if(!e.enabled||"off"===e.scheduleState)return"off";if("failed"===e.lastStatus||"error"===e.lastStatus||"failure"===e.lastStatus||"abandoned"===e.lastStatus||"expired"===e.lastStatus)return"failed";if("stale"===e.scheduleState)return"late";let l=null===e.lastRunAt?NaN:Date.parse(e.lastRunAt);if(void 0!==e.secondDueAt){let n=null===e.secondDueAt?NaN:Date.parse(e.secondDueAt);return Number.isFinite(l)&&Number.isFinite(t)&&Number.isFinite(n)&&n>l&&t>n?"late":"alive"}return Number.isFinite(t)&&Number.isFinite(l)&&null!==e.intervalMs&&Number.isFinite(e.intervalMs)&&e.intervalMs>0&&t-l>2*e.intervalMs?"late":"alive"}},43849:(e,t,l)=>{l.d(t,{t:()=>u});let n=/\brun-([0-9a-f]{8})-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,a=/(?:\/(?:Users|home|private)\/[\w.%@+~/-]+|\b[A-Za-z]:\\(?:[^\\\s,;<>"']+\\)*[^\\\s,;<>"']+)/g,r=/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi,s=RegExp("(?<![A-Za-z0-9_-])(?:[A-Za-z0-9_]{40,}|(?:sk|ghp|gho|ghs|github_pat|xox[abpr])[-_][A-Za-z0-9_-]{20,})(?![A-Za-z0-9_-])","g"),i=/\b(?:OP|MK|TC|UX)\b/g,o=/\bmsb(\d+)\b/gi,d=/(?:\u{1F451}|🪑|🅞|🅜|🅣|🅤|🅢|🅕)\uFE0F?/gu,c={OP:"COO",MK:"CMO",TC:"CTO",UX:"CXO"};function u(e){let t,l=e;do t=l,l=l.replace(n,(e,t)=>"run-".concat(t.slice(0,6))).replace(a,"").replace(r,"").replace(d,"").replace(s,"").replace(i,e=>c[e]).replace(o,(e,t)=>"remote-".concat(t));while(l!==t&&function(e){return[n,a,r,s,i,d,o].flatMap(t=>[...e.matchAll(t)].map(e=>e[0]))}(l).length>0);return l}},47899:(e,t,l)=>{l.d(t,{QK:()=>s,i6:()=>r,Pz:()=>o,Em:()=>i,Yy:()=>d});var n=l(41346);let a={alive:"살아 있음",late:"늦음",failed:"실패",off:"꺼짐"},r="/v1/schedules?includeOff=1",s="/v1/dashboard/loops";async function i(e,t){var l,i,o,c,u,m,f,p;let[h,b]=await Promise.allSettled([e(r),e(s)]),x="fulfilled"===h.status?null==(l=h.value)?void 0:l.schedules:null,g="fulfilled"===b.status?null==(o=b.value)||null==(i=o.loops)?void 0:i.loops:null;if(!Array.isArray(x)&&!Array.isArray(g))throw Error("loop registries unavailable");if(!Array.isArray(x))throw Error("스케줄 레지스트리 조회 실패");if(!Array.isArray(g))throw Error("루프 레지스트리 조회 실패");let v=d(x,t).map(e=>({...e,id:"schedule:".concat(e.id)}));for(let e of g){let l=e.last?Date.parse(e.last.at):NaN,r=(0,n.u)({enabled:!1!==e.armed,lastRunAt:null!=(m=null==(c=e.last)?void 0:c.at)?m:null,lastStatus:null!=(f=null==(u=e.last)?void 0:u.status.toLowerCase())?f:null,intervalMs:null},t);v.push({id:"loop:".concat(e.name),name:e.label,layer:null!=(p=e.category)?p:"루프",owner:"미지정",mode:null===e.armed?"관측":e.armed?"armed":"off",lastRun:Number.isFinite(l)?e.last.at:null,verdict:"alive"===r?"판정 불가":a[r]})}return v}function o(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now,n=0,a=!0;return{async refresh(){let r=++n;try{let s=await i(e,l());a&&r===n&&t({rows:s,state:"ready"})}catch(e){a&&r===n&&t({rows:[],state:"error"})}},dispose(){a=!1}}}function d(e,t){return e.map(e=>{var l,r,s,i,o,d,c;let u=e.lastRun?Date.parse(e.lastRun.at):NaN,m=(0,n.u)({enabled:"off"!==e.state,lastRunAt:null!=(d=null==(l=e.lastRun)?void 0:l.at)?d:null,lastStatus:(null==(r=e.lastRun)?void 0:r.exit)!=null&&0!==e.lastRun.exit?"failed":(null==(s=e.lastRun)?void 0:s.status)==null||["ok","success","completed"].includes(e.lastRun.status.toLowerCase())?null!=(c=null==(o=e.lastRun)||null==(i=o.status)?void 0:i.toLowerCase())?c:null:"failed",intervalMs:e.cron?null:e.intervalMs,...e.cron?{scheduleState:e.state}:{}},t),f=!e.cron&&!(e.intervalMs&&e.intervalMs>0),p="alive"===m&&(!Number.isFinite(u)||f)?"판정 불가":a[m];return{id:e.id,name:e.name,layer:e.domain||e.category||e.source,owner:"미지정",mode:e.runVia||e.source,lastRun:Number.isFinite(u)?e.lastRun.at:null,verdict:p}})}},54719:(e,t,l)=>{l.d(t,{p1:()=>D});var n=l(68441),a=l(61581),r=l(37010),s=l(4935),i=l(66230),o=l(62551),d=l(40889),c=l(47899),u=l(50385),m=l(81715);l(39875);var f=l(69621),p=l(43849),h=l(89705);let b=/^[a-zA-Z0-9_-]{1,128}$/;function x(e){let{flows:t}=e,l=[],a=0;for(let e of t)for(let t of e.runs)l.push({seat:e.seat,run:t,y:27+34*a++});let r=20+34*l.length;return(0,n.jsx)("svg",{viewBox:"0 0 ".concat(320," ").concat(r),className:"h-auto w-full max-w-md","aria-hidden":"true",focusable:"false",children:t.map(e=>{var t;let a=l.filter(t=>t.seat===e.seat),r=(a[0].y+a[a.length-1].y)/2,s=null!=(t=f.DG[e.seat])?t:(0,p.t)(e.seat);return(0,n.jsxs)("g",{children:[(0,n.jsx)("line",{x1:60,y1:r,x2:68,y2:r,stroke:"#7492a8",strokeWidth:2}),a.length>1&&(0,n.jsx)("line",{x1:68,y1:a[0].y,x2:68,y2:a[a.length-1].y,stroke:"#7492a8",strokeWidth:2}),a.map(e=>(0,n.jsxs)("g",{children:[(0,n.jsx)("line",{x1:68,y1:e.y,x2:256,y2:e.y,stroke:"#7492a8",strokeWidth:2}),(0,n.jsx)("polygon",{points:"".concat(264,",").concat(e.y," ").concat(256,",").concat(e.y-4," ").concat(256,",").concat(e.y+4),fill:"#7492a8"}),(0,n.jsx)("circle",{cx:272,cy:e.y,r:8,fill:"#173556",stroke:"#38bdf8",strokeWidth:2}),(0,n.jsx)("text",{x:162,y:e.y-5,textAnchor:"middle",fontSize:10,fill:"#cbd5e1",children:e.run.runId.length>16?"".concat(e.run.runId.slice(0,15),"…"):e.run.runId})]},"".concat(e.run.runId,"-").concat(e.run.at))),(0,n.jsx)("circle",{cx:44,cy:r,r:16,fill:"#173556",stroke:"#38bdf8",strokeWidth:2}),(0,n.jsx)("text",{x:44,y:r+3.5,textAnchor:"middle",fontSize:9,fontWeight:"bold",fill:"#e0f2fe",children:s})]},e.seat)})})}function g(e){let{edges:t,seatIds:l}=e,a=function(e,t){let l=[...new Set(null!=t?t:e.filter(e=>"run"===e.kind&&e.to.startsWith("loop:")&&b.test(e.from)).map(e=>e.from))];void 0===t&&l.sort();let n=new Set(l),a=new Map,r=new Set;for(let t of e){var s;if("run"!==t.kind||!n.has(t.from)||!t.to.startsWith("loop:"))continue;let e=t.to.slice(5);if(!b.test(e))continue;let l="".concat(t.at,"|").concat(t.from,"|").concat(t.to);if(r.has(l))continue;r.add(l);let i=null!=(s=a.get(t.from))?s:[];i.push({runId:e,at:t.at}),a.set(t.from,i)}return l.filter(e=>a.has(e)).map(e=>{var t;return{seat:e,runs:(null!=(t=a.get(e))?t:[]).sort((e,t)=>e.at.localeCompare(t.at))}})}(t,l);return(0,n.jsxs)("section",{"aria-label":"자원 발사 흐름",className:"rounded-xl border border-slate-600 p-3",children:[(0,n.jsx)("h3",{className:"font-semibold",children:"자원 흐름 \xb7 자리 → 런"}),(0,n.jsx)("p",{className:"mt-1 text-xs text-slate-400",children:"현재 스냅숏의 실제 발사 관계(런 원장)로 자리 → 런 간선을 그립니다."}),0===a.length?(0,n.jsx)("p",{role:"status",className:"mt-2 text-sm text-slate-300",children:"실제 발사 관계가 아직 없습니다"}):(0,n.jsxs)("div",{className:"mt-2 grid gap-3 lg:grid-cols-[auto_1fr] lg:items-start",children:[(0,n.jsx)(x,{flows:a}),(0,n.jsx)("ol",{"aria-label":"자원 발사 간선",className:"space-y-2",children:a.map(e=>e.runs.map(t=>{var l;return(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/trace?level=L2&run=".concat(encodeURIComponent(t.runId)),className:"block w-full min-w-0 break-words rounded-lg border border-slate-600 px-3 py-2 text-left text-sm text-slate-300 focus-visible:outline-2 focus-visible:outline-sky-400",children:[null!=(l=f.DG[e.seat])?l:(0,p.t)(e.seat)," → 런 \xb7 ",(0,p.t)(t.runId)," \xb7 ",(0,n.jsx)("time",{dateTime:t.at,children:new Date(t.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]})},"".concat(e.seat,"-").concat(t.runId,"-").concat(t.at))}))})]})]})}let v={"살아 있음":"bg-emerald-500/15 text-emerald-300 ring-emerald-500/30",늦음:"bg-red-500/15 text-red-300 ring-red-500/30",실패:"bg-red-500/15 text-red-300 ring-red-500/30",꺼짐:"bg-slate-700 text-slate-300 ring-slate-500","판정 불가":"bg-slate-700 text-slate-300 ring-slate-500"},y=f.Pv;function w(e){let{detail:t}=e;return(0,n.jsxs)("div",{"data-near-detail":"",className:"w-[180px] space-y-1 rounded-lg border border-slate-600 bg-[#10243b]/95 p-2 text-left text-[10px] font-normal text-slate-200",children:[null!==t.now&&(0,n.jsxs)("p",{className:"break-words",children:[(0,n.jsx)("span",{className:"text-slate-400",children:"지금 "}),t.now]}),(null!==t.running||null!==t.waiting)&&(0,n.jsxs)("p",{className:"flex gap-2",children:[null!==t.running&&(0,n.jsxs)("span",{children:["도는 런 ",t.running]}),null!==t.waiting&&(0,n.jsxs)("span",{children:["대기 ",t.waiting]})]}),t.recent.length>0?(0,n.jsx)("ol",{"aria-label":"최근 행동",className:"space-y-0.5",children:t.recent.map((e,t)=>(0,n.jsx)("li",{className:"break-words",children:e},t))}):(0,n.jsx)("p",{className:"text-slate-400",children:"최근 행동 없음"})]})}let k={activity:function(e){let{data:t}=e,l="seat"===t.type||"hub"===t.type;return(0,n.jsxs)("div",{className:"relative flex flex-col items-center gap-1 text-center text-white",children:[(0,n.jsx)(u.h7,{type:"target",position:m.yX.Left,className:"!border-sky-400 !bg-sky-400"}),(0,n.jsx)("div",{className:"flex items-center justify-center rounded-full border-2 border-sky-400 bg-[#173556] px-2 font-bold ".concat(l?"h-[90px] w-[90px] text-lg":"h-[64px] w-[64px] text-xs"),children:(0,n.jsx)("span",{className:"line-clamp-2 break-all",children:(0,p.t)(t.label)})}),t.verdict&&(0,n.jsx)("span",{"data-loop-verdict":t.verdict,className:"rounded-full px-2 py-0.5 text-xs font-semibold ring-1 ".concat(v[t.verdict]),children:t.verdict}),t.detail&&(0,n.jsx)(w,{detail:t.detail}),(0,n.jsx)(u.h7,{type:"source",position:m.yX.Right,className:"!border-sky-400 !bg-sky-400"})]})}},j={packet:function(e){var t,l;let{id:r,sourceX:s,sourceY:i,targetX:o,targetY:d,sourcePosition:c,targetPosition:f,style:p,markerEnd:h,label:b,labelStyle:x,interactionWidth:g,data:v}=e,[y,w,k]=(0,m.Fp)({sourceX:s,sourceY:i,targetX:o,targetY:d,sourcePosition:c,targetPosition:f}),j=(0,a.useRef)(null),N=(0,a.useRef)(null),S=null!=(t=null==v?void 0:v.packet)?t:null,A=null!=(l=null==S?void 0:S.key)?l:null;return(0,a.useEffect)(()=>{if(null!==A)try{var e,t,l,n;null==(t=j.current)||null==(e=t.beginElement)||e.call(t),null==(n=N.current)||null==(l=n.beginElement)||l.call(n)}catch(e){}},[A]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.tE,{id:r,path:y,style:p,markerEnd:h,label:b,labelX:w,labelY:k,labelStyle:x,interactionWidth:g}),S&&(0,n.jsxs)("g",{"data-packet":S.word,"aria-hidden":"true",opacity:0,children:[(0,n.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",fontSize:16,fill:"#e0f2fe",stroke:"#10243b",strokeWidth:.6,children:S.shape}),(0,n.jsx)("animateMotion",{ref:j,begin:"indefinite",dur:"".concat(S.roundTrip?2400:1200,"ms"),path:y,fill:"freeze",...S.roundTrip?{keyPoints:"0;1;0",keyTimes:"0;0.5;1",calcMode:"linear"}:{}}),(0,n.jsx)("animate",{ref:N,attributeName:"opacity",begin:"indefinite",dur:"".concat(S.roundTrip?2400:1200,"ms"),values:"1;1;0",keyTimes:"0;0.85;1",fill:"freeze"})]})]})}},N={done:"border-emerald-500/60 bg-emerald-500/15",failed:"border-red-500/60 bg-red-500/15",current:"border-sky-300 bg-sky-500/20",pending:"border-dashed border-slate-500 bg-slate-800/40"};function S(e){return"hand"===e.kind?e.broken?"broken":"shadow"===e.mode?"shadow":"live":null}function A(e,t,l){if(t)return"".concat(y.launch," \xb7 유령 \xb7 런 원장 없음 ").concat(Math.floor((l-Date.parse(e.at))/6e4),"분");let n=S(e);return"broken"===n?"".concat(y.hand," \xb7 끊김 ✕"):"shadow"===n?"".concat(y.hand," \xb7 그림자"):y[e.kind]}function C(e){let{rows:t,edges:l,seenAt:s,now:i,state:o,seatIds:d,details:c}=e,m=(0,r.useSearchParams)(),b=m.get("card"),x=(0,f._s)(m),[w,C]=(0,a.useState)(1),M=(0,f.QU)(w),[T,R]=(0,a.useState)(!1);(0,a.useEffect)(()=>{var e;if(R(function(){try{return"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch(e){return!1}}()),"function"!=typeof window.matchMedia)return;let t=window.matchMedia("(prefers-reduced-motion: reduce)"),l=()=>R(t.matches);return null==(e=t.addEventListener)||e.call(t,"change",l),()=>{var e;return null==(e=t.removeEventListener)?void 0:e.call(t,"change",l)}},[]);let E=(0,a.useMemo)(()=>null===x?[]:(0,f.QB)(l,x),[l,x]),I=(0,a.useMemo)(()=>new Set(null===x?[]:(0,f.Z7)(l,x).map(f.iy)),[l,x]),[O,D]=(0,a.useState)(b);(0,a.useEffect)(()=>{D(b)},[b]);let U=(0,a.useMemo)(()=>[...new Set(l.filter(e=>"card"===e.kind).map(e=>e.ref))].sort(),[l]),W=(0,a.useMemo)(()=>null===O?[]:(0,f.Cd)(l,O),[l,O]),_=new Set(W.map(f.iy)),P=null!==O?_:null!==x?I:null,Z=e=>{D(e);let t=new URL(window.location.href);null===e?t.searchParams.delete("card"):t.searchParams.set("card",e),window.history.replaceState(window.history.state,"",t.toString())},F=(0,a.useMemo)(()=>(0,f.hA)(t,l,d),[t,l,d]),z=(0,a.useMemo)(()=>{let e=F.filter(e=>"seat"===e.type);return[...e.map(e=>e.id),"미지정"].map((t,l)=>({owner:t,column:l,nodes:[..."미지정"===t?[]:e.filter(e=>e.id===t),...F.filter(e=>"loop"===e.type&&e.owner===t)]})).filter(e=>e.nodes.length>0)},[F]),L=new Map(F.map((e,t)=>[e.id,"node-".concat(t)])),X=e=>{var t,l;return null!=(l=null==(t=F.find(t=>t.id===e))?void 0:t.label)?l:"알 수 없음"},q=new Set(l.filter(e=>"run"===e.kind&&e.to.startsWith("loop:")).map(e=>e.to)).size,K=e=>{if("near"!==M)return;let t=(0,f.qV)(e,l,e===f.EV?{running:q,...null==c?void 0:c[e]}:null==c?void 0:c[e],X,i);return null===t.now&&null===t.running&&null===t.waiting&&0===t.recent.length?void 0:t},V=z.map((e,t)=>z.slice(0,t).reduce((e,t)=>e+Math.ceil(t.nodes.length/8),0)),G=z.flatMap((e,t)=>{let{nodes:l}=e;return l.map((e,l)=>({id:L.get(e.id),type:"activity",position:{x:(V[t]+Math.floor(l/8))*220,y:l%8*138},data:{label:e.label,type:e.type,verdict:e.verdict,detail:K(e.id)}}))});f.fi.forEach((e,t)=>{let l=F.find(t=>t.id===e.id);l&&G.push({id:L.get(l.id),type:"activity",position:{x:220*t,y:-170},data:{label:l.label,type:l.type,verdict:l.verdict,detail:K(l.id)}})});let $=F.find(e=>e.id===f.qn);$&&G.push({id:L.get($.id),type:"activity",position:{x:0,y:-310},data:{label:$.label,type:$.type,detail:K($.id)}}),F.filter(e=>"other"===e.type).forEach((e,t)=>G.push({id:L.get(e.id),type:"activity",position:{x:180*Math.floor(t/8),y:138*Math.max(...z.map(e=>Math.min(e.nodes.length,8)),1)+40+t%8*138},data:{label:e.label,type:e.type,detail:K(e.id)}}));let Q=l.filter(e=>L.has(e.from)&&L.has(e.to)).map((e,t)=>{var n;let a=(0,f.iy)(e),r=i-(null!=(n=s[a])?n:0),o=r<f._o,d=null!==P&&P.has(a),c=null!==P&&!d,u=S(e),m=(0,f.$2)(e,l,i),p=A(e,m,i),h=m||T||!(r<2600)?null:{key:a,shape:f.Ok[e.kind],word:y[e.kind],roundTrip:(0,f.yo)(e,l)};return{id:"edge-".concat(t),type:"packet",source:L.get(e.from),target:L.get(e.to),label:p,data:{edge:e,packet:h,hand:u},animated:!1,focusable:!0,interactionWidth:24,style:{stroke:m||"broken"===u?"#fca5a5":d||!c&&o?"#7dd3fc":"#7492a8",strokeWidth:d||!c&&o?4:2,opacity:c?.16:d||o?1:"shadow"===u?.35:.55,...m||"broken"===u?{strokeDasharray:"2 7"}:"shadow"===u?{strokeDasharray:"6 5"}:{},transition:"stroke 1.5s ease, stroke-width 1.5s ease, opacity 1.5s ease"},labelStyle:{fill:c?"#7492a8":m||"broken"===u?"#fecaca":d||o?"#e0f2fe":"#a8b7c7",fontSize:12,opacity:c?.4:1}}});return(0,n.jsxs)("section",{"aria-label":"루프 활동 지도",className:"min-w-0 space-y-3",children:[(0,n.jsx)("p",{className:"text-sm text-slate-300",children:"자리(큰 원) \xb7 루프(작은 원) \xb7 최근 60분 실제 사건. 노드나 간선을 누르면 Trace로 이동합니다. 자원 노드는 자원 화면을 엽니다."}),(0,n.jsx)("p",{className:"text-xs text-slate-400",children:"꾸러미 모양 \xb7 요청 ● 결정 ◆ 보고 ■ 넘김 ▲ 발사 ★ 판단 ⬟ \xb7 넘김 실선 = 실발사 \xb7 점선 = 그림자 \xb7 ✕ = 끊김 \xb7 유령 = 발사 뒤 10분간 같은 ref 런 간선 없음 \xb7 확대하면 노드 안 지금 일이 보입니다."}),null!==x&&(0,n.jsxs)("section",{"aria-label":"데모 여정",className:"rounded-xl border border-sky-500/50 bg-[#173556] p-3",children:[(0,n.jsxs)("h3",{className:"font-semibold",children:["여정 \xb7 ",(0,p.t)(x)]}),"ready"===o&&0===I.size&&(0,n.jsx)("p",{role:"status",className:"mt-1 text-sm text-slate-300",children:"아직 사건 없음 — 틱이 이 카드를 집으면 1단계부터 채워집니다"}),(0,n.jsx)("ol",{className:"mt-2 flex min-w-0 flex-wrap items-stretch gap-2 text-sm",children:E.map((e,t)=>(0,n.jsxs)("li",{"data-journey-state":e.state,className:"flex min-w-0 items-center gap-2 rounded-lg border px-3 py-2 ".concat(N[e.state]),children:[(0,n.jsx)("span",{"aria-hidden":"true",children:h.bq[e.state].mark}),(0,n.jsxs)("span",{className:"min-w-0 break-words",children:[t+1,". ",e.label," \xb7 ",h.bq[e.state].word]}),e.edge&&(0,n.jsx)("time",{className:"text-xs text-slate-300",dateTime:e.edge.at,children:new Date(e.edge.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]},e.key))})]}),(0,n.jsxs)("div",{role:"group","aria-label":"데모 카드 선택",className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,n.jsx)("span",{children:"카드 경로"}),U.map(e=>(0,n.jsx)("button",{type:"button","aria-pressed":O===e,onClick:()=>Z(e),className:"min-h-11 rounded-lg border border-slate-500 px-3 py-2 aria-pressed:border-sky-300 aria-pressed:bg-sky-800 focus-visible:outline-2 focus-visible:outline-sky-400",children:(0,p.t)(e)},e)),null!==O&&(0,n.jsx)("button",{type:"button",onClick:()=>Z(null),className:"min-h-11 rounded-lg border border-slate-500 px-3 py-2 focus-visible:outline-2 focus-visible:outline-sky-400",children:"전체 보기"})]}),null!==O&&(0,n.jsxs)("section",{"aria-label":"선택 카드 흐름",className:"rounded-xl border border-sky-500/50 bg-[#173556] p-3",children:[(0,n.jsxs)("h3",{className:"font-semibold",children:["요구 한 줄 → 회신 \xb7 카드 ",(0,p.t)(O)]}),"ready"===o&&0===W.length&&(0,n.jsx)("p",{role:"status",children:"이 카드는 아직 흐른 사건이 없음"}),W.length>0&&(0,n.jsx)("ol",{className:"mt-2 space-y-2",children:W.map((e,t)=>{var l,a,r,s;return(0,n.jsxs)("li",{className:"break-words text-sm",children:[t+1,". ",(0,p.t)(null!=(r=null==(l=F.find(t=>t.id===e.from))?void 0:l.label)?r:"출발")," → ",e.to.startsWith("surface:")?"회신 \xb7 ".concat((0,p.t)(e.to.slice(8))):(0,p.t)(null!=(s=null==(a=F.find(t=>t.id===e.to))?void 0:a.label)?s:"도착")," \xb7 ",(0,n.jsx)("time",{dateTime:e.at,children:new Date(e.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]},"".concat((0,f.iy)(e),"-").concat(t))})})]}),"error"===o&&(0,n.jsx)("p",{role:"alert",className:"text-red-300",children:"지도 원천을 읽지 못했습니다. 이전 지도가 보이면 현재 데이터가 아닙니다. 데몬 연결을 확인하세요."}),"unauthorized"===o&&(0,n.jsx)("p",{role:"alert",className:"text-red-300",children:"지도 원천에 접근 권한이 없습니다 — 토큰으로 다시 붙으세요"}),"loading"===o&&(0,n.jsx)("p",{role:"status",children:"지도를 읽는 중…"}),(0,n.jsx)("div",{className:"h-[440px] min-w-0 w-full overflow-hidden rounded-2xl border border-slate-600 bg-[#10243b]","aria-label":"자리와 루프 관계도",children:(0,n.jsxs)(u.Gc,{nodes:G,edges:Q,nodeTypes:k,edgeTypes:j,fitView:!0,minZoom:.25,maxZoom:2.5,onInit:e=>C(e.getZoom()),onMove:(e,t)=>C(t.zoom),nodesDraggable:!1,nodesConnectable:!1,edgesReconnectable:!1,deleteKeyCode:null,onNodeClick:(e,t)=>{let l=F.find(e=>L.get(e.id)===t.id);l&&window.location.assign((0,f.ol)(l.id))},onEdgeClick:(e,t)=>{var l;let n=null==(l=t.data)?void 0:l.edge;n&&window.location.assign((0,f.ol)(n.to,n))},children:[(0,n.jsx)(u.VS,{color:"#355470"}),(0,n.jsx)(u.H2,{showInteractive:!1})]},"loading"===o?"loading":"loaded")}),"ready"===o&&(0,n.jsx)(g,{edges:l,seatIds:d}),(0,n.jsx)("div",{"aria-label":"지도 목록",className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:z.map(e=>{var t;return(0,n.jsxs)("section",{className:"min-w-0 rounded-xl border border-slate-600 p-3",children:[(0,n.jsx)("h3",{className:"mb-2 font-semibold",children:null!=(t=f.DG[e.owner])?t:(0,p.t)(e.owner)}),(0,n.jsx)("ul",{className:"space-y-2",children:e.nodes.map(e=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",onClick:()=>window.location.assign((0,f.ol)(e.id)),className:"flex w-full min-w-0 items-center gap-2 rounded-lg border border-slate-600 px-2 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-sky-400",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"shrink-0 rounded-full border border-sky-400 bg-[#173556] ".concat("seat"===e.type?"h-8 w-8":"h-5 w-5")}),(0,n.jsx)("span",{className:"min-w-0 break-words",children:(0,p.t)(e.label)}),e.verdict&&(0,n.jsx)("span",{"data-loop-verdict":e.verdict,className:"ml-auto shrink-0 rounded-full px-2 py-0.5 text-xs ring-1 ".concat(v[e.verdict]),children:e.verdict})]})},e.id))})]},e.owner)})}),(0,n.jsx)("ul",{"aria-label":"최근 간선 사건",className:"space-y-2",children:l.map((e,t)=>{var a,r,o,d,c;return(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",onClick:()=>window.location.assign((0,f.ol)(e.to,e)),className:"block w-full min-w-0 break-words rounded-lg border border-slate-600 px-3 py-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-sky-400 ".concat(null!==O?_.has((0,f.iy)(e))?"border-sky-300 bg-sky-500/30 text-sky-100":"bg-slate-800/30 text-slate-400 opacity-40":i-(null!=(o=s[(0,f.iy)(e)])?o:0)<f._o?"bg-sky-500/20 text-sky-100 transition-colors duration-[1500ms] motion-reduce:transition-none":"bg-slate-800/50 text-slate-300"),children:[(0,p.t)(null!=(d=null==(a=F.find(t=>t.id===e.from))?void 0:a.label)?d:"출발")," → ",(0,p.t)(null!=(c=null==(r=F.find(t=>t.id===e.to))?void 0:r.label)?c:"도착")," \xb7 ",A(e,(0,f.$2)(e,l,i),i)," \xb7 ",(0,n.jsx)("time",{dateTime:e.at,children:new Date(e.at).toLocaleTimeString("ko-KR",{timeZone:"Asia/Seoul"})})]})},"edge-".concat(t))})}),"ready"===o&&0===l.length&&(0,n.jsx)("p",{role:"status",className:"text-slate-300",children:"최근 사건이 없습니다."})]})}var M=l(25074);let T=["loop.","task-agent","harness.queue","self-implement.pod"],R={setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e),setInterval:(e,t)=>globalThis.setInterval(e,t),clearInterval:e=>globalThis.clearInterval(e)};var E=l(57902);let I=(0,d.g)(null,null);function O(e){let{view:t,runsUnreadable:l,refreshedAt:a}=e;return(0,n.jsxs)("section",{"aria-label":"루프 에이전트 활동",className:"min-w-0 space-y-6 p-4 text-lg min-[1440px]:text-[22px]",children:[(0,n.jsx)("div",{className:"grid grid-cols-2 gap-3 min-[1440px]:grid-cols-4",children:t.seats.map(e=>(0,n.jsxs)("article",{"aria-label":"".concat(e.seat," 자리"),className:"min-w-0 space-y-3 rounded-2xl border border-border bg-card p-3 min-[1440px]:p-6",children:[(0,n.jsx)("h2",{className:"font-bold",children:e.seat}),(0,n.jsx)("p",{className:"break-words","aria-label":"지금 하는 일",children:e.now}),(0,n.jsxs)("dl",{className:"space-y-1 text-base min-[1440px]:text-[22px]",children:[(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"오늘 착지"}),(0,n.jsx)("dd",{children:e.landedToday})]}),(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"막힘"}),(0,n.jsx)("dd",{children:e.blocked})]}),(0,n.jsxs)("div",{className:"flex flex-wrap justify-between gap-x-2",children:[(0,n.jsx)("dt",{children:"대표 결정 대기"}),(0,n.jsx)("dd",{children:e.decisionsWaiting})]})]})]},e.seat))}),(0,n.jsxs)("section",{"aria-label":"지금 도는 런",className:"min-w-0 rounded-2xl border border-border bg-card p-4",children:[(0,n.jsx)("h2",{className:"font-semibold",children:"지금 도는 런"}),l?(0,n.jsx)("p",{className:"text-muted-foreground",children:"못 읽음"}):0===t.runs.length?(0,n.jsx)("p",{className:"text-muted-foreground",children:"지금 도는 런이 없습니다"}):(0,n.jsx)("ul",{className:"mt-3 flex flex-wrap gap-3",children:t.runs.map((e,t)=>(0,n.jsxs)("li",{className:"min-w-0 break-words rounded-lg border border-border px-3 py-2",children:["런 ",e.id6," \xb7 ",e.stage," \xb7 경과 ","못 읽음"===e.elapsedSec?e.elapsedSec:"".concat(e.elapsedSec,"초")]},"".concat(e.id6,"-").concat(t)))})]}),(0,n.jsxs)("p",{className:"text-sm text-muted-foreground",children:["마지막 갱신 ",(0,n.jsx)("time",{dateTime:null!=a?a:void 0,children:a?new Date(a).toLocaleString("ko-KR",{timeZone:"Asia/Seoul"}):"못 읽음"})]})]})}function D(){var e,t,l,u,m,p,h,b,x;let{initialMode:g="activity",initialLoopRef:v=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{client:y,config:w}=(0,s.Q)(),[k,j]=(0,a.useState)(null),N=null!=(t=(0,f._s)((0,r.useSearchParams)()))?t:v,[S,A]=(0,a.useState)(null!==N?"map":g),[D,U]=(0,a.useState)(null),[W,_]=(0,a.useState)(0),P="".concat(w.baseUrl,"\0").concat(w.token),Z="".concat(P,"\0").concat(S,"\0").concat(null!=N?N:""),F=(null==k?void 0:k.source)===P?k:null,z=null!=(l=null==F||null==(e=F.seats)?void 0:e.seats.flatMap(e=>{var t,l;return null!=(l=null==(t=e.subSeats)?void 0:t.map(e=>e.id))?l:[]}))?l:[];(0,a.useEffect)(()=>{let e=!0,t=!1,l=(0,o.xX)({baseUrl:w.baseUrl,token:w.token});j({source:P,seats:null,runs:null,runsUnreadable:!0,refreshedAt:null});let n=async()=>{var n;if(!e||t||document.hidden)return;t=!0;let a=new Intl.DateTimeFormat("sv-SE",{timeZone:"Asia/Seoul"}).format(new Date),[r,s]=await Promise.allSettled([(0,i.Nn)(y,a),l.getHarnessRuns()]);if(t=!1,!e)return;let o="fulfilled"===r.status&&"ready"===r.value.kind?r.value.data:null,d="fulfilled"===s.status&&Array.isArray(null==(n=s.value)?void 0:n.entries)?s.value:null;j({source:P,seats:o,runs:d,runsUnreadable:null===d,refreshedAt:o||d?new Date().toISOString():null})};n();let a=window.setInterval(()=>{n()},1e4),r=()=>{document.hidden||n()};return document.addEventListener("visibilitychange",r),()=>{e=!1,window.clearInterval(a),document.removeEventListener("visibilitychange",r)}},[y,w.baseUrl,w.token,P]),(0,a.useEffect)(()=>{if("map"!==S)return;let e=!0,t=!1,l=!1;U(null),_(Date.now());let n=async()=>{if(!e||document.hidden)return;if(t){l=!0;return}t=!0,l=!1;let a=Date.now();try{let[t,l,n]=await Promise.all([(0,c.Em)(e=>y.fetchJson(e),a),y.fetchJson("/v1/schedules?includeOff=1&includeOwners=1"),y.fetchJson((0,f.Ew)(N)?"/v1/loops/edges?ref=".concat(encodeURIComponent(N),"&mode=live&limit=500"):"/v1/loops/edges?since=".concat(encodeURIComponent(new Date(a-f.oO).toISOString()),"&limit=200"))]),r=l.owners;if(!Array.isArray(r))throw Error("루프 주인 조회 실패");let s=null===N?(0,f.u1)(n,a):(0,f.s_)(n,a);e&&U(e=>({source:Z,rows:(0,f.lG)(t,r,a),edges:s,seenAt:(0,f.XV)((null==e?void 0:e.source)===Z?e.seenAt:null,s,a),state:"ready"}))}catch(t){if(e){let e=t instanceof o.Iu&&(401===t.status||403===t.status);U(t=>({source:Z,rows:e?[]:(null==t?void 0:t.source)===Z?t.rows:[],edges:e?[]:(null==t?void 0:t.source)===Z?t.edges:[],seenAt:e?{}:(null==t?void 0:t.source)===Z?t.seenAt:{},state:e?"unauthorized":"error"}))}}finally{t=!1,l&&e&&n()}};n();let a=function(e,t){var l,n,a,r,s;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null!=(l=i.timers)?l:R,d=null!=(n=i.debounceMs)?n:800,c=null!=(a=i.pollMs)?a:5e3,u=!1,m=null,f=null,p=o.setInterval(()=>{u||null!==f||t()},null!=(r=i.safetyMs)?r:3e4),h=()=>{var e;u||null!==f||(f=o.setInterval(()=>{u||t()},c),null==(e=i.onMode)||e.call(i,"poll"))},b=e.logsStreamUrl({category:T.join(",")}),x=()=>{};if(null===b)h();else{let e=!1;x=(0,M.BX)(b,{events:{log:()=>{if(!u){var e;null!==f&&(o.clearInterval(f),f=null,null==(e=i.onMode)||e.call(i,"stream")),null!==m&&o.clearTimeout(m),m=o.setTimeout(()=>{m=null,u||t()},d)}}},onError:h,onConstructError:()=>{e=!0}}),e?h():null==(s=i.onMode)||s.call(i,"stream")}return()=>{u||(u=!0,null!==m&&o.clearTimeout(m),null!==f&&o.clearInterval(f),o.clearInterval(p),m=null,f=null,x())}}(y,()=>{n()}),r=window.setInterval(()=>{document.hidden||_(Date.now())},250),s=()=>{document.hidden||n()};return document.addEventListener("visibilitychange",s),()=>{e=!1,a(),window.clearInterval(r),document.removeEventListener("visibilitychange",s)}},[y,S,Z,N]);let L=(null==D?void 0:D.source)===Z?D:null,X=null!==N&&N===v&&(0,f.Ew)(N)?N:null;return(0,n.jsxs)("div",{className:"min-w-0",children:[null!==X&&(0,n.jsx)("p",{"aria-label":"고정 루프",className:"px-4 pt-4 text-base",children:(0,E.FW)(X)}),(0,n.jsxs)("div",{role:"group","aria-label":"루프 에이전트 보기",className:"flex gap-2 px-4 pt-4",children:[(0,n.jsx)("button",{type:"button","aria-pressed":"activity"===S,onClick:()=>A("activity"),className:"min-h-11 rounded-lg border border-slate-500 px-4 py-2 aria-pressed:bg-sky-800",children:"현황"}),(0,n.jsx)("button",{type:"button","aria-pressed":"map"===S,onClick:()=>A("map"),className:"min-h-11 rounded-lg border border-slate-500 px-4 py-2 aria-pressed:bg-sky-800",children:"지도"})]}),"activity"===S?(0,n.jsx)(O,{view:F?(0,d.g)(F.seats,F.runs):I,runsUnreadable:null==(u=null==F?void 0:F.runsUnreadable)||u,refreshedAt:null!=(m=null==F?void 0:F.refreshedAt)?m:null}):(0,n.jsx)("div",{className:"min-w-0 p-4",children:(0,n.jsx)(C,{rows:null!=(p=null==L?void 0:L.rows)?p:[],edges:null!=(h=null==L?void 0:L.edges)?h:[],seatIds:["OP","MK","TC","UX",...z],details:F?function(e,t){let l={COO:"OP",CMO:"MK",CTO:"TC",CXO:"UX"},n=t?"못 읽음":e.runs.length,a={[f.Xg]:{running:n},[f.EV]:{running:n}};for(let t of e.seats)a[l[t.seat]]={now:t.now,waiting:t.decisionsWaiting};return a}((0,d.g)(F.seats,F.runs),F.runsUnreadable):void 0,seenAt:null!=(b=null==L?void 0:L.seenAt)?b:{},now:W,state:null!=(x=null==L?void 0:L.state)?x:"loading"})})]})}},57902:(e,t,l)=>{l.d(t,{FW:()=>r,ZR:()=>a,kU:()=>s});var n=l(69621);let a={refParam:"ref"};function r(e){return"루프 ".concat(e)}function s(e){var t;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.refParam;if(0===l.length)return null;let r=null!=(t=null==e?void 0:e.get(l))?t:null;if(null===r)return null;let s=r.trim();return(0,n.Ew)(s)?s:null}},69621:(e,t,l)=>{l.d(t,{$2:()=>d,Cd:()=>S,DG:()=>c,EV:()=>b,Ew:()=>g,Ok:()=>W,Pv:()=>D,QB:()=>I,QU:()=>O,XV:()=>C,Xg:()=>h,Z7:()=>E,_o:()=>o,_s:()=>v,fi:()=>x,hA:()=>j,iy:()=>A,lG:()=>s,oO:()=>i,ol:()=>N,qV:()=>U,qn:()=>p,s_:()=>w,u1:()=>y,yo:()=>_});var n=l(41346),a=l(43849);let r={alive:"살아 있음",late:"늦음",failed:"실패",off:"꺼짐"};function s(e,t,l){let s=new Map(t.flatMap(e=>e.jobs.map(t=>[t,e.owner]))),i=new Map(t.map(e=>[e.id,e.owner])),o=e.map(e=>{var t;return{...e,owner:null!=(t=e.id.startsWith("schedule:")?s.get(e.id.slice(9)):i.get(e.id.slice(5)))?t:"미지정"}});for(let e of t){var d,c,u,m,f,p,h;if(o.some(t=>t.id==="loop:".concat(e.id)))continue;let t=(0,n.u)({enabled:e.enabled,lastRunAt:null!=(m=null==(d=e.lastRun)?void 0:d.at)?m:null,lastStatus:null!=(f=null==(c=e.lastRun)?void 0:c.status.toLowerCase())?f:null,intervalMs:null},l);o.push({id:"loop:".concat(e.id),name:(0,a.t)(e.title),layer:"그래프",owner:null!=(p=e.owner)?p:"미지정",mode:"등록",lastRun:null!=(h=null==(u=e.lastRun)?void 0:u.at)?h:null,verdict:"alive"!==t||e.lastRun?r[t]:"판정 불가"})}return o}let i=36e5,o=1500;function d(e,t,l){if("launch"!==e.kind||"string"==typeof e.run&&""!==e.run)return!1;let n=Date.parse(e.at);return Number.isFinite(n)&&l-n>=6e5&&!t.some(t=>"run"===t.kind&&t.ref===e.ref)}let c={OP:"COO",MK:"CMO",TC:"CTO",UX:"CXO"},u=["OP","MK","TC","UX"],m=new Set(["request","decision","report","card","run","hand","launch","move"]),f=/^[a-zA-Z0-9_-]{1,128}$/,p="loop:resources",h="agent:task-agent",b="hub:runs",x=[{id:"loop:orchestrator",label:"조율"},{id:h,label:"TASK-AGENT"},{id:b,label:"런 묶음"},{id:"loop:release-loop",label:"발행 루프"},{id:"loop:guardian",label:"수호자"}];function g(e){return"string"==typeof e&&f.test(e)}function v(e){var t,l;let n=null!=(t=null==e?void 0:e.get("journey"))?t:null;if(g(n))return n;let a=null!=(l=null==e?void 0:e.get("demo"))?l:null;return g(a)&&"0"!==a&&"1"!==a?a:null}function y(e,t){return k(e,t,!0)}function w(e,t){return k(e,t,!1)}function k(e,t,l){let n=e&&"object"==typeof e&&"edges"in e?e.edges:null;if(!Array.isArray(n))throw Error("간선 조회 실패");return n.filter(e=>{if(!e||"object"!=typeof e||!m.has(e.kind)||"string"!=typeof e.at||"string"!=typeof e.from||"string"!=typeof e.to||"string"!=typeof e.ref)return!1;let n=Date.parse(e.at);return Number.isFinite(n)&&n<=t&&(!l||n>=t-i)})}function j(e,t){var l,n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,s=new Map;for(let e of r)s.set(e,{id:e,type:"seat",label:null!=(l=c[e])?l:(0,a.t)(e)});for(let e of x)s.set(e.id,{id:e.id,type:"hub",label:e.label});s.set(p,{id:p,type:"hub",label:"자원"});let i=new Set(r),o=new Set;for(let t of e){let e=i.has(t.owner)?t.owner:"미지정",l=t.id,n=(0,a.t)(t.name),r=o.has(n)?"".concat(n," \xb7 ").concat((0,a.t)(t.id)):n;o.add(n);let d=s.get(l);s.set(l,(null==d?void 0:d.type)==="hub"?{...d,owner:e,verdict:t.verdict}:{id:l,type:"loop",label:r,owner:e,verdict:t.verdict})}for(let e of t)for(let t of[e.from,e.to]){if(s.has(t))continue;let[e,l]=t.split(":",2);"loop"===e&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:l.startsWith("run-")?"런 \xb7 ".concat((0,a.t)(l)):"칸 \xb7 ".concat((0,a.t)(l))}):"card"===e||"surface"===e?s.set(t,{id:t,type:"other",label:"card"===e?"카드":"입구 \xb7 ".concat((0,a.t)(null!=l?l:""))}):"agent"===e&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:"에이전트 \xb7 ".concat((0,a.t)(l))}):"pr"===e&&l&&/^\d{1,9}$/.test(l)?s.set(t,{id:t,type:"other",label:"PR #".concat(l)}):("release"===e||"landed"===e)&&l&&f.test(l)?s.set(t,{id:t,type:"other",label:"".concat("release"===e?"발행":"착지"," \xb7 ").concat((0,a.t)(l))}):i.has(t)&&s.set(t,{id:t,type:"seat",label:null!=(n=c[t])?n:(0,a.t)(t)})}return[...s.values()]}function N(e,t){if(e===p&&!t)return"/loops?view=resources";if(t&&("hand"===t.kind||"launch"===t.kind||"move"===t.kind)&&f.test(t.ref))return"/trace?q=".concat(encodeURIComponent(t.ref));if(e.startsWith("pr:")&&/^\d{1,9}$/.test(e.slice(3))&&!t)return"/trace?q=".concat(encodeURIComponent(e.slice(3)));let l=(null==t?void 0:t.kind)==="run"?t.ref:e;if((null==t?void 0:t.kind)==="card"&&f.test(t.ref))return"/trace?q=".concat(encodeURIComponent(t.ref));if(l.startsWith("loop:")&&f.test(l.slice(5))){let e=l.slice(5);return e.startsWith("run-")?"/trace?level=L2&run=".concat(encodeURIComponent(e)):"/trace?q=".concat(encodeURIComponent(e))}return l.startsWith("schedule:")&&f.test(l.slice(9))?"/trace?q=".concat(encodeURIComponent(l.slice(9))):l.startsWith("card:")&&f.test(l.slice(5))?"/trace?q=".concat(encodeURIComponent(l.slice(5))):(null==t?void 0:t.kind)==="run"&&f.test(l)?"/trace?level=L2&run=".concat(encodeURIComponent(l)):"/trace"}function S(e,t){let l=e=>e.startsWith("surface:")?0:e.startsWith("card:")?1:e.startsWith("loop:")?2:3;return e.filter(e=>"card"===e.kind&&e.ref===t).sort((e,t)=>e.at.localeCompare(t.at)||l(e.from)-l(t.from))}function A(e){return JSON.stringify([e.at,e.kind,e.from,e.to,e.ref])}function C(e,t,l){return Object.fromEntries(t.map(t=>{var n;let a=A(t);return[a,null!=(n=null==e?void 0:e[a])?n:null===e?l-o:l]}))}let M=[{key:"tick",label:"틱 \xb7 넘김"},{key:"agent",label:"TASK-AGENT \xb7 발사"},{key:"run",label:"런"},{key:"pr",label:"PR"},{key:"land",label:"착지 \xb7 green 제안"}];function T(e,t){let l=new Set([t]);for(let n of e)"hand"===n.kind&&void 0!==n.cell&&(n.cell===t||n.cell.startsWith("".concat(t,"-")))&&l.add(n.ref);return l}function R(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set([t]),n=e.ref===t||l.has(e.ref);return"hand"===e.kind?n&&"shadow"!==e.mode?"tick":null:"launch"===e.kind?n?"agent":null:"move"===e.kind?n&&"green-proposal"===e.move?"land":null:"run"===e.kind?e.to.startsWith("pr:")?"pr":e.to.startsWith("loop:")?"run":null:"card"===e.kind&&e.to.startsWith("landed:")?"land":null}function E(e,t){let l=T(e,t),n=e=>M.findIndex(n=>n.key===R(e,t,l));return[...S(e,t),...e.filter(e=>"card"!==e.kind||e.ref!==t).filter(e=>null!==R(e,t,l))].sort((e,t)=>e.at.localeCompare(t.at)||n(e)-n(t))}function I(e,t){let l=E(e,t),n=T(e,t),a=0===l.length,r=M.reduce((e,a,r)=>l.some(e=>R(e,t,n)===a.key&&!e.broken)?r:e,-1);return M.map((e,s)=>{let i=l.filter(l=>R(l,t,n)===e.key),o=i.find(e=>!e.broken);return o?{key:e.key,label:e.label,state:"done",edge:o}:0===i.length&&s<r?{key:e.key,label:e.label,state:"done"}:i.length>0?(a=!0,{key:e.key,label:e.label,state:"failed",edge:i[0]}):a?{key:e.key,label:e.label,state:"pending"}:(a=!0,{key:e.key,label:e.label,state:"current"})})}function O(e){return e<.8?"far":"near"}let D={request:"요청",decision:"결정",report:"보고",card:"카드",run:"런",hand:"넘김",launch:"발사",move:"판단"};function U(e,t,l,n,r){var s,i;let o=t.filter(t=>t.from===e||t.to===e).sort((e,t)=>t.at.localeCompare(e.at)).slice(0,5).map(l=>"".concat(void 0!==r&&d(l,t,r)?"발사 \xb7 유령":D[l.kind]," ").concat(l.from===e?"→":"←"," ").concat((0,a.t)(n(l.from===e?l.to:l.from))));return{now:(null==l?void 0:l.now)?(0,a.t)(l.now):null,recent:o,running:null!=(s=null==l?void 0:l.running)?s:null,waiting:null!=(i=null==l?void 0:l.waiting)?i:null}}let W={request:"●",decision:"◆",report:"■",hand:"▲",launch:"★",move:"⬟",card:"◇",run:"▶"};function _(e,t){let l="request"===e.kind?["report","decision"]:"report"===e.kind||"decision"===e.kind?["request"]:[];return l.length>0&&t.some(t=>l.includes(t.kind)&&t.ref===e.ref&&t.from===e.to&&t.to===e.from)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4754],{4021:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},10087:(e,t,r)=>{function a(e){let{reason:t,children:r}=e;return r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return a}}),r(63771)},13752:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},14250:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,r(30812).createAsyncLocalStorage)()},30812:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{bindSnapshot:function(){return u},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return c}});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class a{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let n="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return n?new n:new a}function u(e){return n?n.bind(e):a.bind(e)}function c(){return n?n.snapshot():function(e,...t){return e(...t)}}},32426:(e,t,r)=>{function a(e){let{moduleIds:t}=e;return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return a}}),r(68441),r(39872),r(87537),r(84312)},34729:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).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"}]])},37010:(e,t,r)=>{var a=r(15750);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},41445:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).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"}]])},41799:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},42717:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).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"}]])},45558:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},54767:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},55768:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}});let a=r(56766)._(r(61728));function n(e,t){var r;let n={};"function"==typeof e&&(n.loader=e);let l={...n,...t};return(0,a.default)({...l,modules:null==(r=l.loadableGenerated)?void 0:r.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61728:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let a=r(68441),n=r(61581),l=r(10087);function u(e){return{default:e&&"default"in e?e.default:e}}r(32426);let c={loader:()=>Promise.resolve(u(()=>null)),loading:null,ssr:!0},o=function(e){let t={...c,...e},r=(0,n.lazy)(()=>t.loader().then(u)),o=t.loading;function d(e){let u=o?(0,a.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,c=!t.ssr||!!t.loading,d=c?n.Suspense:n.Fragment,i=t.ssr?(0,a.jsxs)(a.Fragment,{children:[null,(0,a.jsx)(r,{...e})]}):(0,a.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(r,{...e})});return(0,a.jsx)(d,{...c?{fallback:u}:{},children:i})}return d.displayName="LoadableComponent",d}},63853:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]])},64251:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("hand",[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]])},66476:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},76168:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},76404:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},78242:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},87537:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=r(14250)},91753:(e,t,r)=>{r.d(t,{A:()=>a});let a=(0,r(61121).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},99147:(e,t,r)=>{r.d(t,{default:()=>n.a});var a=r(55768),n=r.n(a)}}]);