@agent-spaces/server 0.3.64 → 0.3.67

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 (332) hide show
  1. package/dist/adapters/agent-runtime.js +4 -0
  2. package/dist/adapters/claude-code-runtime/index.js +68 -2
  3. package/dist/adapters/claude-code-runtime/message-format.js +26 -0
  4. package/dist/adapters/claude-code-runtime/sdk-config.js +12 -0
  5. package/dist/adapters/codex-function-tool-bridge.js +144 -0
  6. package/dist/adapters/codex-runtime.js +23 -4
  7. package/dist/adapters/git.js +25 -7
  8. package/dist/adapters/hermes-runtime.js +210 -0
  9. package/dist/agents/agent-message-parts.js +1 -1
  10. package/dist/agents/commit-agent.js +4 -2
  11. package/dist/agents/issue-task-controller.js +75 -4
  12. package/dist/agents/pull-request-agent.js +115 -0
  13. package/dist/agents/scheduler-agent.js +1 -1
  14. package/dist/app.js +12 -70
  15. package/dist/middleware/auth.js +1 -1
  16. package/dist/package.json +2 -1
  17. package/dist/routes/agent-sse.js +2 -0
  18. package/dist/routes/agent.js +3 -0
  19. package/dist/routes/database.js +1 -0
  20. package/dist/routes/git.js +197 -317
  21. package/dist/routes/issue.js +1 -1
  22. package/dist/routes/notification.js +10 -0
  23. package/dist/routes/robot-account.js +68 -0
  24. package/dist/routes/version.js +94 -0
  25. package/dist/routes/worktree.js +93 -0
  26. package/dist/services/agent.js +37 -3
  27. package/dist/services/builtin-tools/kanban-tools.js +4 -0
  28. package/dist/services/git-operation-log.js +40 -0
  29. package/dist/services/global-wechat-qr.js +72 -0
  30. package/dist/services/hook-engine.js +175 -17
  31. package/dist/services/notification-center.js +9 -0
  32. package/dist/services/notification-hub/bot-agent.js +3 -1
  33. package/dist/services/notification-hub/service.js +12 -2
  34. package/dist/services/robot-account.js +34 -0
  35. package/dist/services/version.js +59 -0
  36. package/dist/services/workflow-command-runner.js +23 -0
  37. package/dist/services/workflow.js +25 -8
  38. package/dist/services/workspace.js +25 -1
  39. package/dist/services/worktree.js +207 -0
  40. package/dist/storage/robot-account-store.js +39 -0
  41. package/dist/storage/worktree-store.js +33 -0
  42. package/dist/web/404.html +1 -1
  43. package/dist/web/__next.__PAGE__.txt +4 -4
  44. package/dist/web/__next._full.txt +23 -25
  45. package/dist/web/__next._head.txt +4 -4
  46. package/dist/web/__next._index.txt +13 -13
  47. package/dist/web/__next._tree.txt +2 -2
  48. package/dist/web/_next/static/chunks/{0n6_4so_afuwk.js → 0-92u-tiuy40a.js} +4 -4
  49. package/dist/web/_next/static/chunks/{0vbqaynjq8ga..js → 0-yizd8osmas2.js} +1 -1
  50. package/dist/web/_next/static/chunks/0.ln~3mnv8.69.js +1 -0
  51. package/dist/web/_next/static/chunks/{0iuf30t0rjsjv.js → 01y3e9pemva7b.js} +10 -10
  52. package/dist/web/_next/static/chunks/02802taez976w.js +67 -0
  53. package/dist/web/_next/static/chunks/02l~tmzrgny.~.js +1 -0
  54. package/dist/web/_next/static/chunks/033.awk90g6eh.js +1 -0
  55. package/dist/web/_next/static/chunks/03f1bwuynjdmk.js +1 -0
  56. package/dist/web/_next/static/chunks/04cb4kc9r2pd1.js +1 -0
  57. package/dist/web/_next/static/chunks/04de6ha5_e3pp.js +1 -0
  58. package/dist/web/_next/static/chunks/06.kdsa9rr2h1.js +1 -0
  59. package/dist/web/_next/static/chunks/09he0p79ov1rn.js +1 -0
  60. package/dist/web/_next/static/chunks/09vpocs4zuc8h.js +1 -0
  61. package/dist/web/_next/static/chunks/0_o2exgr0e_nh.js +1 -0
  62. package/dist/web/_next/static/chunks/{0xbaakj0dfc0..js → 0_y9nskc-xt2k.js} +1 -1
  63. package/dist/web/_next/static/chunks/0clnj-1fi6u8j.js +3 -0
  64. package/dist/web/_next/static/chunks/0gv40by0zzxs_.js +1 -0
  65. package/dist/web/_next/static/chunks/0iusr8y88.kjg.js +1 -0
  66. package/dist/web/_next/static/chunks/{04a4vsq2wknm4.js → 0j-8418fxvkd1.js} +1 -1
  67. package/dist/web/_next/static/chunks/0j-l7l_k9jt45.js +1 -0
  68. package/dist/web/_next/static/chunks/0j.wxxyoclma5.js +1 -0
  69. package/dist/web/_next/static/chunks/0jq.16sozqik..js +3 -0
  70. package/dist/web/_next/static/chunks/0jw8xdk_fpnp0.css +1 -0
  71. package/dist/web/_next/static/chunks/0l1lkd-wcotma.js +1 -0
  72. package/dist/web/_next/static/chunks/0ncxf_zr4n839.js +1 -0
  73. package/dist/web/_next/static/chunks/0ndo7um~v7vco.js +1 -0
  74. package/dist/web/_next/static/chunks/0ngk.~kan8wq_.js +1 -0
  75. package/dist/web/_next/static/chunks/0p3h-h3zj5ujg.js +30 -0
  76. package/dist/web/_next/static/chunks/0pm-un~-sy3rl.js +1 -0
  77. package/dist/web/_next/static/chunks/0rt9bofnn6qvn.js +1 -0
  78. package/dist/web/_next/static/chunks/0t64.9jd00hio.js +3 -0
  79. package/dist/web/_next/static/chunks/0taui9--5n6-5.js +1 -0
  80. package/dist/web/_next/static/chunks/0ty39169lh~z3.js +1 -0
  81. package/dist/web/_next/static/chunks/0uxzi~9b~k4mn.js +31 -0
  82. package/dist/web/_next/static/chunks/0v8nof~waedlu.js +1 -0
  83. package/dist/web/_next/static/chunks/{0ctg5qmw7uu.1.js → 0vcfoagnpf.aw.js} +3 -3
  84. package/dist/web/_next/static/chunks/{08ckpwmmwlors.js → 0wwwq.gyyz0vg.js} +3 -3
  85. package/dist/web/_next/static/chunks/0x5lak8yz7pm7.js +1 -0
  86. package/dist/web/_next/static/chunks/0xon_.4-o0_zq.js +7 -0
  87. package/dist/web/_next/static/chunks/0zjnrbt7inime.js +1 -0
  88. package/dist/web/_next/static/chunks/0zncg76rgtbm-.js +1 -0
  89. package/dist/web/_next/static/chunks/0zwebpitvpuv1.js +1 -0
  90. package/dist/web/_next/static/chunks/0~02o4g-o6n~m.js +1 -0
  91. package/dist/web/_next/static/chunks/{10l-9myrdo3x9.js → 0~fjezp.k4qk3.js} +1 -1
  92. package/dist/web/_next/static/chunks/0~sh93re1-_rp.js +1 -0
  93. package/dist/web/_next/static/chunks/10_niiq0k6o-p.js +5 -0
  94. package/dist/web/_next/static/chunks/12tjr0_2ccrtq.js +2 -0
  95. package/dist/web/_next/static/chunks/12x5.go_x9mfk.js +1 -0
  96. package/dist/web/_next/static/chunks/{1442stwa0gbxe.js → 12~5dk9i9d16t.js} +2 -2
  97. package/dist/web/_next/static/chunks/13iye4rv5p31b.js +1 -0
  98. package/dist/web/_next/static/chunks/{01~quun6sefgl.js → 13~y-b.b9rrw4.js} +1 -1
  99. package/dist/web/_next/static/chunks/151wzhb5q0lo5.js +1 -0
  100. package/dist/web/_next/static/chunks/18c7g84y01mj0.js +1 -0
  101. package/dist/web/_next/static/chunks/{turbopack-0ndm2zc_pdptk.js → turbopack-11qjwlynmfc-n.js} +1 -1
  102. package/dist/web/_not-found/__next._full.txt +30 -29
  103. package/dist/web/_not-found/__next._head.txt +4 -4
  104. package/dist/web/_not-found/__next._index.txt +13 -13
  105. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
  106. package/dist/web/_not-found/__next._not-found.txt +3 -3
  107. package/dist/web/_not-found/__next._tree.txt +2 -2
  108. package/dist/web/_not-found.html +1 -1
  109. package/dist/web/_not-found.txt +30 -29
  110. package/dist/web/index.html +1 -1
  111. package/dist/web/index.txt +23 -25
  112. package/dist/web/login/__next._full.txt +28 -28
  113. package/dist/web/login/__next._head.txt +4 -4
  114. package/dist/web/login/__next._index.txt +13 -13
  115. package/dist/web/login/__next._tree.txt +2 -2
  116. package/dist/web/login/__next.login.__PAGE__.txt +4 -4
  117. package/dist/web/login/__next.login.txt +3 -3
  118. package/dist/web/login.html +1 -1
  119. package/dist/web/login.txt +28 -28
  120. package/dist/web/settings/__next._full.txt +33 -32
  121. package/dist/web/settings/__next._head.txt +4 -4
  122. package/dist/web/settings/__next._index.txt +13 -13
  123. package/dist/web/settings/__next._tree.txt +2 -2
  124. package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
  125. package/dist/web/settings/__next.settings.txt +5 -5
  126. package/dist/web/settings/agents/__next._full.txt +24 -24
  127. package/dist/web/settings/agents/__next._head.txt +4 -4
  128. package/dist/web/settings/agents/__next._index.txt +13 -13
  129. package/dist/web/settings/agents/__next._tree.txt +2 -2
  130. package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
  131. package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
  132. package/dist/web/settings/agents/__next.settings.txt +5 -5
  133. package/dist/web/settings/agents.html +1 -1
  134. package/dist/web/settings/agents.txt +24 -24
  135. package/dist/web/settings/mcps/__next._full.txt +24 -24
  136. package/dist/web/settings/mcps/__next._head.txt +4 -4
  137. package/dist/web/settings/mcps/__next._index.txt +13 -13
  138. package/dist/web/settings/mcps/__next._tree.txt +2 -2
  139. package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
  140. package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
  141. package/dist/web/settings/mcps/__next.settings.txt +5 -5
  142. package/dist/web/settings/mcps.html +1 -1
  143. package/dist/web/settings/mcps.txt +24 -24
  144. package/dist/web/settings/models/__next._full.txt +24 -24
  145. package/dist/web/settings/models/__next._head.txt +4 -4
  146. package/dist/web/settings/models/__next._index.txt +13 -13
  147. package/dist/web/settings/models/__next._tree.txt +2 -2
  148. package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
  149. package/dist/web/settings/models/__next.settings.models.txt +3 -3
  150. package/dist/web/settings/models/__next.settings.txt +5 -5
  151. package/dist/web/settings/models.html +1 -1
  152. package/dist/web/settings/models.txt +24 -24
  153. package/dist/web/settings/output-styles/__next._full.txt +24 -24
  154. package/dist/web/settings/output-styles/__next._head.txt +4 -4
  155. package/dist/web/settings/output-styles/__next._index.txt +13 -13
  156. package/dist/web/settings/output-styles/__next._tree.txt +2 -2
  157. package/dist/web/settings/output-styles/__next.settings.output-styles.__PAGE__.txt +4 -4
  158. package/dist/web/settings/output-styles/__next.settings.output-styles.txt +3 -3
  159. package/dist/web/settings/output-styles/__next.settings.txt +5 -5
  160. package/dist/web/settings/output-styles.html +1 -1
  161. package/dist/web/settings/output-styles.txt +24 -24
  162. package/dist/web/settings/prompts/__next._full.txt +24 -24
  163. package/dist/web/settings/prompts/__next._head.txt +4 -4
  164. package/dist/web/settings/prompts/__next._index.txt +13 -13
  165. package/dist/web/settings/prompts/__next._tree.txt +2 -2
  166. package/dist/web/settings/prompts/__next.settings.prompts.__PAGE__.txt +4 -4
  167. package/dist/web/settings/prompts/__next.settings.prompts.txt +3 -3
  168. package/dist/web/settings/prompts/__next.settings.txt +5 -5
  169. package/dist/web/settings/prompts.html +1 -1
  170. package/dist/web/settings/prompts.txt +24 -24
  171. package/dist/web/settings/providers/__next._full.txt +24 -24
  172. package/dist/web/settings/providers/__next._head.txt +4 -4
  173. package/dist/web/settings/providers/__next._index.txt +13 -13
  174. package/dist/web/settings/providers/__next._tree.txt +2 -2
  175. package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
  176. package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
  177. package/dist/web/settings/providers/__next.settings.txt +5 -5
  178. package/dist/web/settings/providers.html +1 -1
  179. package/dist/web/settings/providers.txt +24 -24
  180. package/dist/web/settings/skills/__next._full.txt +24 -24
  181. package/dist/web/settings/skills/__next._head.txt +4 -4
  182. package/dist/web/settings/skills/__next._index.txt +13 -13
  183. package/dist/web/settings/skills/__next._tree.txt +2 -2
  184. package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
  185. package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
  186. package/dist/web/settings/skills/__next.settings.txt +5 -5
  187. package/dist/web/settings/skills.html +1 -1
  188. package/dist/web/settings/skills.txt +24 -24
  189. package/dist/web/settings/tools/__next._full.txt +24 -24
  190. package/dist/web/settings/tools/__next._head.txt +4 -4
  191. package/dist/web/settings/tools/__next._index.txt +13 -13
  192. package/dist/web/settings/tools/__next._tree.txt +2 -2
  193. package/dist/web/settings/tools/__next.settings.tools.__PAGE__.txt +4 -4
  194. package/dist/web/settings/tools/__next.settings.tools.txt +3 -3
  195. package/dist/web/settings/tools/__next.settings.txt +5 -5
  196. package/dist/web/settings/tools.html +1 -1
  197. package/dist/web/settings/tools.txt +24 -24
  198. package/dist/web/settings.html +1 -1
  199. package/dist/web/settings.txt +33 -32
  200. package/dist/web/workflows/__next._full.txt +31 -33
  201. package/dist/web/workflows/__next._head.txt +4 -4
  202. package/dist/web/workflows/__next._index.txt +13 -13
  203. package/dist/web/workflows/__next._tree.txt +2 -2
  204. package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
  205. package/dist/web/workflows/__next.workflows.txt +3 -3
  206. package/dist/web/workflows.html +1 -1
  207. package/dist/web/workflows.txt +31 -33
  208. package/dist/web/workspace/_/__next._full.txt +28 -29
  209. package/dist/web/workspace/_/__next._head.txt +4 -4
  210. package/dist/web/workspace/_/__next._index.txt +13 -13
  211. package/dist/web/workspace/_/__next._tree.txt +2 -2
  212. package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -3
  213. package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
  214. package/dist/web/workspace/_/__next.workspace.txt +3 -3
  215. package/dist/web/workspace/_.html +1 -1
  216. package/dist/web/workspace/_.txt +28 -29
  217. package/dist/web/workspaces/__next._full.txt +29 -31
  218. package/dist/web/workspaces/__next._head.txt +4 -4
  219. package/dist/web/workspaces/__next._index.txt +13 -13
  220. package/dist/web/workspaces/__next._tree.txt +2 -2
  221. package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
  222. package/dist/web/workspaces/__next.workspaces.txt +3 -3
  223. package/dist/web/workspaces.html +1 -1
  224. package/dist/web/workspaces.txt +29 -31
  225. package/dist/ws/agent-prompt.js +32 -3
  226. package/dist/ws/agent-runner.js +83 -6
  227. package/package.json +11 -11
  228. package/dist/web/_next/static/chunks/0-9194nbxy_6d.js +0 -1
  229. package/dist/web/_next/static/chunks/0.n~yfwf4~6w-.js +0 -1
  230. package/dist/web/_next/static/chunks/02mf61htij8g0.js +0 -31
  231. package/dist/web/_next/static/chunks/04dg4l4hv11q2.js +0 -3
  232. package/dist/web/_next/static/chunks/04fxddw-y20~-.js +0 -7
  233. package/dist/web/_next/static/chunks/04w7~5ooz_pwm.js +0 -1
  234. package/dist/web/_next/static/chunks/05oc21sj24wtq.js +0 -1
  235. package/dist/web/_next/static/chunks/08kfx8on9oty~.js +0 -1
  236. package/dist/web/_next/static/chunks/08k~meqbd8d6v.js +0 -1
  237. package/dist/web/_next/static/chunks/099h96wjsdb25.js +0 -2
  238. package/dist/web/_next/static/chunks/09h23logvq65m.js +0 -1
  239. package/dist/web/_next/static/chunks/0a5y-vhf4i5id.js +0 -3
  240. package/dist/web/_next/static/chunks/0ake2f3x2uan4.js +0 -24
  241. package/dist/web/_next/static/chunks/0ck8dw_9-1cdx.js +0 -1
  242. package/dist/web/_next/static/chunks/0ewceguykiut5.js +0 -1
  243. package/dist/web/_next/static/chunks/0f7cb9li~3jra.js +0 -67
  244. package/dist/web/_next/static/chunks/0ghs9on7wodrm.js +0 -1
  245. package/dist/web/_next/static/chunks/0ghx3j_.-gdyd.js +0 -1
  246. package/dist/web/_next/static/chunks/0h9cu-k6z5o08.js +0 -1
  247. package/dist/web/_next/static/chunks/0jb4~3qqkw2ps.js +0 -1
  248. package/dist/web/_next/static/chunks/0nb8.iteznuvx.js +0 -1
  249. package/dist/web/_next/static/chunks/0os58q93stt7j.js +0 -3
  250. package/dist/web/_next/static/chunks/0s9lmk8iauou3.js +0 -1
  251. package/dist/web/_next/static/chunks/0sp_zbx~w0am7.js +0 -1
  252. package/dist/web/_next/static/chunks/0tel~zsv4z8l_.js +0 -1
  253. package/dist/web/_next/static/chunks/0twamv4wr_dbv.js +0 -1
  254. package/dist/web/_next/static/chunks/0uhol5wafdbl~.js +0 -1
  255. package/dist/web/_next/static/chunks/0v3a_x4vt42kx.js +0 -5
  256. package/dist/web/_next/static/chunks/0v7q4mys.mnm..css +0 -1
  257. package/dist/web/_next/static/chunks/0xt-8wk21gs7g.js +0 -1
  258. package/dist/web/_next/static/chunks/0z~vqzbm_q371.js +0 -1
  259. package/dist/web/_next/static/chunks/0~3xm80~j9ddg.js +0 -1
  260. package/dist/web/_next/static/chunks/14s37n6h0_q3x.js +0 -16
  261. package/dist/web/_next/static/chunks/161ik5kfyuwtd.js +0 -1
  262. package/dist/web/_next/static/chunks/17k~zbv0_4rep.js +0 -1
  263. package/public/output-styles/carmack-mode.md +0 -381
  264. package/public/output-styles/codex-rigor-mode.md +0 -114
  265. package/public/output-styles/dhh-mode.md +0 -265
  266. package/public/output-styles/evan-you-mode.md +0 -539
  267. package/public/output-styles/index.json +0 -37
  268. package/public/output-styles/jobs-mode.md +0 -369
  269. package/public/output-styles/linus-mode.md +0 -135
  270. package/public/output-styles/uncle-bob-mode.md +0 -221
  271. package/public/prompt/andrej-karpathy-skills.md +0 -65
  272. package/public/prompt/claude-token-efficient-coding.md +0 -35
  273. package/public/prompt/index.json +0 -12
  274. package/public/skills/index.json +0 -92
  275. package/public/skills/planning-with-files/planning-with-files-zh/SKILL.md +0 -243
  276. package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.ps1 +0 -44
  277. package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.sh +0 -46
  278. package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.ps1 +0 -124
  279. package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.sh +0 -124
  280. package/public/skills/planning-with-files/planning-with-files-zh/scripts/session-catchup.py +0 -438
  281. package/public/skills/planning-with-files/planning-with-files-zh/templates/findings.md +0 -29
  282. package/public/skills/planning-with-files/planning-with-files-zh/templates/progress.md +0 -40
  283. package/public/skills/planning-with-files/planning-with-files-zh/templates/task_plan.md +0 -58
  284. package/public/skills/superpowers/brainstorming/SKILL.md +0 -164
  285. package/public/skills/superpowers/brainstorming/scripts/frame-template.html +0 -214
  286. package/public/skills/superpowers/brainstorming/scripts/helper.js +0 -88
  287. package/public/skills/superpowers/brainstorming/scripts/server.cjs +0 -354
  288. package/public/skills/superpowers/brainstorming/scripts/start-server.sh +0 -148
  289. package/public/skills/superpowers/brainstorming/scripts/stop-server.sh +0 -56
  290. package/public/skills/superpowers/brainstorming/spec-document-reviewer-prompt.md +0 -49
  291. package/public/skills/superpowers/brainstorming/visual-companion.md +0 -287
  292. package/public/skills/superpowers/dispatching-parallel-agents/SKILL.md +0 -182
  293. package/public/skills/superpowers/executing-plans/SKILL.md +0 -70
  294. package/public/skills/superpowers/finishing-a-development-branch/SKILL.md +0 -251
  295. package/public/skills/superpowers/receiving-code-review/SKILL.md +0 -213
  296. package/public/skills/superpowers/requesting-code-review/SKILL.md +0 -103
  297. package/public/skills/superpowers/requesting-code-review/code-reviewer.md +0 -168
  298. package/public/skills/superpowers/subagent-driven-development/SKILL.md +0 -279
  299. package/public/skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +0 -25
  300. package/public/skills/superpowers/subagent-driven-development/implementer-prompt.md +0 -113
  301. package/public/skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +0 -61
  302. package/public/skills/superpowers/systematic-debugging/CREATION-LOG.md +0 -119
  303. package/public/skills/superpowers/systematic-debugging/SKILL.md +0 -296
  304. package/public/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +0 -158
  305. package/public/skills/superpowers/systematic-debugging/condition-based-waiting.md +0 -115
  306. package/public/skills/superpowers/systematic-debugging/defense-in-depth.md +0 -122
  307. package/public/skills/superpowers/systematic-debugging/find-polluter.sh +0 -63
  308. package/public/skills/superpowers/systematic-debugging/root-cause-tracing.md +0 -169
  309. package/public/skills/superpowers/systematic-debugging/test-academic.md +0 -14
  310. package/public/skills/superpowers/systematic-debugging/test-pressure-1.md +0 -58
  311. package/public/skills/superpowers/systematic-debugging/test-pressure-2.md +0 -68
  312. package/public/skills/superpowers/systematic-debugging/test-pressure-3.md +0 -69
  313. package/public/skills/superpowers/test-driven-development/SKILL.md +0 -371
  314. package/public/skills/superpowers/test-driven-development/testing-anti-patterns.md +0 -299
  315. package/public/skills/superpowers/using-git-worktrees/SKILL.md +0 -215
  316. package/public/skills/superpowers/using-superpowers/SKILL.md +0 -117
  317. package/public/skills/superpowers/using-superpowers/references/codex-tools.md +0 -59
  318. package/public/skills/superpowers/using-superpowers/references/copilot-tools.md +0 -42
  319. package/public/skills/superpowers/using-superpowers/references/gemini-tools.md +0 -51
  320. package/public/skills/superpowers/verification-before-completion/SKILL.md +0 -139
  321. package/public/skills/superpowers/writing-plans/SKILL.md +0 -152
  322. package/public/skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +0 -49
  323. package/public/skills/superpowers/writing-skills/SKILL.md +0 -655
  324. package/public/skills/superpowers/writing-skills/anthropic-best-practices.md +0 -1150
  325. package/public/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
  326. package/public/skills/superpowers/writing-skills/graphviz-conventions.dot +0 -172
  327. package/public/skills/superpowers/writing-skills/persuasion-principles.md +0 -187
  328. package/public/skills/superpowers/writing-skills/render-graphs.js +0 -168
  329. package/public/skills/superpowers/writing-skills/testing-skills-with-subagents.md +0 -384
  330. /package/dist/web/_next/static/{e8w3vd9Eov_LDYWj_0zsE → rGXyAK8rgod1NjF3bLZAY}/_buildManifest.js +0 -0
  331. /package/dist/web/_next/static/{e8w3vd9Eov_LDYWj_0zsE → rGXyAK8rgod1NjF3bLZAY}/_clientMiddlewareManifest.js +0 -0
  332. /package/dist/web/_next/static/{e8w3vd9Eov_LDYWj_0zsE → rGXyAK8rgod1NjF3bLZAY}/_ssgManifest.js +0 -0
@@ -0,0 +1,67 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,970258,e=>{"use strict";let t,i,n,r;var s,a,l,o,d,u,c,h,p,f,g,m,v,y,b,w,j,k,S,N,C,O,M,E,A,I,D,P,T,z,W,R,$,L,B,F,U,H,X,V,Y,q,_,K,G,J,Z,Q,ee,et,ei,en,er,es,ea,el,eo,ed,eu,ec,eh,ep,ef,eg,em,ev,ey,ex,eb,ew,ej,ek,eS,eN,eC,eO,eM,eE,eA,eI,eD,eP,eT,ez,eW,eR,e$,eL,eB,eF,eU,eH,eX,eV,eY,eq,e_,eK,eG,eJ,eZ,eQ,e0,e1,e2,e4,e3,e5,e6,e8,e7,e9,te,tt,ti,tn,tr,ts,ta,tl,to,td,tu,tc,th,tp,tf,tg,tm,tv,ty,tx,tb,tw,tj,tk,tS,tN,tC,tO,tM,tE,tA,tI,tD,tP,tT,tz,tW,tR,t$,tL,tB,tF,tU,tH,tX,tV,tY,tq,t_,tK,tG,tJ,tZ,tQ,t0,t1,t2,t4,t3,t5,t6,t8,t7,t9,ie,it,ii,ir,is,ia,il,io,id,iu,ic,ih,ip,ig=e.i(344180),im=e.i(764556),iv=e.i(244073),iy=e.i(327964),ix=e.i(250226),ib=e.i(873111),iw=e.i(355819),ij=e.i(358989),ik=e.i(628453),iS=e.i(272736),iN=e.i(157408),iC=e.i(260218),iO=e.i(562918),iM=e.i(636288),iE=e.i(681622),iA=e.i(788010),iI=e.i(226624),iD=e.i(209988),iP=e.i(611176),iT=e.i(767467),iz=e.i(357301),iW=e.i(444204),iR=e.i(327962),i$=e.i(583705),iL=e.i(962562),iB=e.i(433721);let iF=(0,iB.default)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]);var iU=e.i(953700),iH=e.i(344118),iX=e.i(889445);let iV=(0,iB.default)("step-forward",[["path",{d:"M10.029 4.285A2 2 0 0 0 7 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"1ystz2"}],["path",{d:"M3 4v16",key:"1ph11n"}]]),iY=(0,iB.default)("ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]);var iq=e.i(31807),i_=e.i(465458);let iK={draft:"secondary",planned:"outline",in_progress:"default",review_pending:"outline",changes_requested:"destructive",approved:"default",completed:"secondary",archived:"outline",error:"destructive"},iG={pending:"secondary",running:"default",reviewing:"outline",waiting_review:"outline",retrying:"outline",done:"secondary",failed:"destructive",cancelled:"outline"},iJ=(0,im.forwardRef)(function({issue:e,workspaceId:t,t:i,tc:n,setEditOpen:r,setInfoOpen:s,startIssue:a,resumeIssue:l,continueIssue:o,interruptIssue:d,members:u,enabledAgents:c,issueTasks:h,updateIssue:p,createTask:f,updateTask:g},m){let[v,y]=(0,im.useState)(!1),[b,w]=(0,im.useState)(null),[j,k]=(0,im.useState)(""),[S,N]=(0,im.useState)(""),[C,O]=(0,im.useState)(""),M=new Set(["running","reviewing","retrying","waiting_review"]),E=h.some(e=>M.has(e.status)),A=h.some(e=>{if("pending"!==e.status)return!1;let t=new Set(h.filter(e=>"done"===e.status).map(e=>e.id));return(e.dependsOnTaskIds??[]).every(e=>t.has(e))}),I="draft"===e.status||"planned"===e.status,D=!E&&A&&"error"!==e.status&&"completed"!==e.status&&"archived"!==e.status,P=E||"planned"===e.status||"in_progress"===e.status,T=async()=>{j.trim()&&C&&(b?await g(t,b.id,{title:j.trim(),description:S.trim(),agentConfigId:C}):await f(t,e.id,j.trim(),S.trim(),C),k(""),N(""),O(""),w(null),y(!1))};return(0,im.useImperativeHandle)(m,()=>({openEditDialog:e=>{w(e),k(e.title),N(e.description),O(e.agentConfigId??""),y(!0)}})),(0,ig.jsxs)("div",{className:"shrink-0 p-4 pb-3 border-b",children:[(0,ig.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon-sm",className:"md:hidden shrink-0",onClick:()=>ix.useMobilePanelStore.getState().setActivePanel("issue-list"),children:(0,ig.jsx)(iT.ArrowLeft,{className:"size-4"})}),(0,ig.jsx)("h2",{className:"text-lg font-semibold truncate shrink min-w-0",children:e.title}),(0,ig.jsx)(iO.Badge,{variant:iK[e.status],children:i(`status.${e.status}`)}),(0,ig.jsxs)("div",{className:"ml-auto flex items-center gap-0.5",children:[(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon-sm",onClick:()=>r(!0),children:(0,ig.jsx)(iL.Pencil,{className:"size-4"})}),(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon-sm",title:i("detail.openChatChannel"),onClick:()=>{e?.channelId&&iq.useChannelStore.getState().ensureAndActivateChannel(t,e.channelId)},children:(0,ig.jsx)(iF,{className:"size-4"})}),(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon-sm",onClick:()=>s(!0),children:(0,ig.jsx)(i$.Info,{className:"size-4"})})]})]}),(0,ig.jsxs)("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[u.length>0&&(0,ig.jsxs)("span",{className:"flex items-center gap-1",children:[(0,ig.jsx)(iM.AvatarGroup,{children:u.slice(0,4).map(e=>(0,ig.jsx)(iP.AgentIcon,{agentId:"user"!==e?e:void 0,name:(0,iS.getMemberDisplayName)(c,e),className:"size-6 rounded-full"},e))}),(0,ig.jsx)("span",{children:i("detail.memberCount",{count:u.length})})]}),(0,ig.jsxs)("span",{className:"flex items-center gap-1",children:[(0,ig.jsx)(iW.Clock,{className:"h-3 w-3"}),i("detail.created")," ",new Date(e.createdAt).toLocaleDateString()]}),(0,ig.jsxs)("span",{className:"flex items-center gap-1",children:[(0,ig.jsx)(iW.Clock,{className:"h-3 w-3"}),i("detail.updated")," ",new Date(e.updatedAt).toLocaleDateString()]}),e.branch&&(0,ig.jsxs)("span",{className:"flex items-center gap-1",children:[(0,ig.jsx)(iR.GitBranch,{className:"h-3 w-3"}),e.branch]}),e.prUrl&&(0,ig.jsxs)("span",{children:[i("detail.pr")," ",e.prUrl]})]}),e.description&&(0,ig.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:e.description}),(0,ig.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,ig.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,ig.jsx)(iI.Switch,{size:"sm",checked:!1!==e.continuousRun,onCheckedChange:i=>p(t,e.id,{continuousRun:i})}),(0,ig.jsx)("span",{children:i("detail.continuousRun")})]}),I&&(0,ig.jsxs)(iC.Button,{size:"sm",variant:"outline",className:"h-6 px-2 text-xs",onClick:()=>a(t,e.id),children:[(0,ig.jsx)(iX.Play,{className:"h-3 w-3 mr-1"}),i("detail.start")]}),(0,ig.jsxs)(iC.Button,{size:"sm",variant:"outline",className:"h-6 px-2 text-xs",disabled:!D,onClick:()=>o(t,e.id),children:[(0,ig.jsx)(iV,{className:"h-3 w-3 mr-1"}),i("detail.continue")]}),(0,ig.jsxs)(iC.Button,{size:"sm",variant:"outline",className:"h-6 px-2 text-xs text-destructive hover:text-destructive",disabled:!P,onClick:()=>d(t,e.id),children:[(0,ig.jsx)(iY,{className:"h-3 w-3 mr-1"}),i("detail.interrupt")]}),(0,ig.jsxs)(iD.Dialog,{open:v,onOpenChange:e=>{y(e),e||w(null)},children:[(0,ig.jsx)(iD.DialogTrigger,{render:(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{w(null),k(""),N(""),O(""),y(!0)}}),children:(0,ig.jsx)(iU.Plus,{className:"h-4 w-4"})}),(0,ig.jsxs)(iD.DialogContent,{children:[(0,ig.jsx)(iD.DialogHeader,{children:(0,ig.jsx)(iD.DialogTitle,{children:i(b?"detail.editTask":"detail.addTask")})}),(0,ig.jsxs)("div",{className:"space-y-3",children:[(0,ig.jsx)(iE.Input,{placeholder:i("detail.taskTitlePlaceholder"),value:j,onChange:e=>k(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,ig.jsx)(iA.Textarea,{placeholder:i("detail.taskDescriptionPlaceholder"),value:S,onChange:e=>N(e.target.value),rows:3}),c.length>0&&(0,ig.jsxs)("div",{className:"space-y-1",children:[(0,ig.jsx)("label",{className:"text-xs text-muted-foreground",children:"Agent"}),(0,ig.jsx)("div",{className:"flex flex-wrap gap-1",children:c.map(e=>(0,ig.jsxs)("button",{type:"button",onClick:()=>O(e.id),className:(0,i_.cn)("flex items-center gap-1.5 px-2 py-1 rounded-md text-xs transition-colors border",C===e.id?"border-primary bg-primary/10 text-primary":"border-transparent hover:bg-muted"),children:[(0,ig.jsx)(iP.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,apiBase:e.apiBase,className:"size-4 rounded-full"}),(0,ig.jsx)("span",{className:"truncate max-w-[80px]",children:e.name}),C===e.id&&(0,ig.jsx)(iH.Check,{className:"size-3 shrink-0"})]},e.id))})]}),(0,ig.jsx)(iC.Button,{onClick:T,disabled:!j.trim()||!C,size:"sm",children:b?n("save"):i("detail.addTask")})]})]})]})]}),"error"===e.status&&(0,ig.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,ig.jsxs)(iC.Button,{size:"sm",variant:"outline",onClick:()=>l(t,e.id),children:[(0,ig.jsx)(iz.RotateCcw,{className:"h-3 w-3 mr-1"}),i("detail.resumeFailed")]}),e.retryPaused&&(0,ig.jsx)("span",{className:"text-[11px] text-muted-foreground",children:i("detail.retryPaused",{failed:e.retryCount,total:e.maxRetries})})]})]})});e.i(8890);var iZ=Symbol.for("preact-signals");function iQ(){if(i5>1)i5--;else{var e,t=!1,i=i9;for(i9=void 0;void 0!==i;)i.S.v===i.v&&(i.S.i=i.i),i=i.o;for(;void 0!==i3;){var n=i3;for(i3=void 0,i6++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&nr(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(i6=0,i5--,t)throw e}}function i0(e){if(i5>0)return e();i7=++i8,i5++;try{return e()}finally{iQ()}}var i1=void 0;function i2(e){var t=i1;i1=void 0;try{return e()}finally{i1=t}}var i4,i3=void 0,i5=0,i6=0,i8=0,i7=0,i9=void 0,ne=0;function nt(e){if(void 0!==i1){var t=e.n;if(void 0===t||t.t!==i1)return t={i:0,S:e,p:i1.s,n:void 0,t:i1,e:void 0,x:void 0,r:t},void 0!==i1.s&&(i1.s.n=t),i1.s=t,e.n=t,32&i1.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=i1.s,t.n=void 0,i1.s.n=t,i1.s=t),t}}function ni(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function nn(e,t){return new ni(e,t)}function nr(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ns(e){for(var t=e.s;void 0!==t;t=t.n){var i=t.S.n;if(void 0!==i&&(t.r=i),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function na(e){for(var t=e.s,i=void 0;void 0!==t;){var n=t.p;-1===t.i?(t.S.U(t),void 0!==n&&(n.n=t.n),void 0!==t.n&&(t.n.p=n)):i=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=n}e.s=i}function nl(e,t){ni.call(this,void 0),this.x=e,this.s=void 0,this.g=ne-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function no(e){var t=e.m;if(e.m=void 0,"function"==typeof t){i5++;var i=i1;i1=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,nd(e),t}finally{i1=i,iQ()}}}function nd(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,no(e)}function nu(e){if(i1!==this)throw Error("Out-of-order effect");na(this),i1=e,this.f&=-2,8&this.f&&nd(this),iQ()}function nc(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name,i4&&i4.push(this)}function nh(e,t){var i=new nc(e,t);try{i.c()}catch(e){throw i.d(),e}var n=i.d.bind(i);return n[Symbol.dispose]=n,n}ni.prototype.brand=iZ,ni.prototype.h=function(){return!0},ni.prototype.S=function(e){var t=this,i=this.t;i!==e&&void 0===e.e&&(e.x=i,this.t=e,void 0!==i?i.e=e:i2(function(){var e;null==(e=t.W)||e.call(t)}))},ni.prototype.U=function(e){var t=this;if(void 0!==this.t){var i=e.e,n=e.x;void 0!==i&&(i.x=n,e.e=void 0),void 0!==n&&(n.e=i,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&i2(function(){var e;null==(e=t.Z)||e.call(t)}))}},ni.prototype.subscribe=function(e){var t=this;return nh(function(){var i=t.value,n=i1;i1=void 0;try{e(i)}finally{i1=n}},{name:"sub"})},ni.prototype.valueOf=function(){return this.value},ni.prototype.toString=function(){return this.value+""},ni.prototype.toJSON=function(){return this.value},ni.prototype.peek=function(){var e=i1;i1=void 0;try{return this.value}finally{i1=e}},Object.defineProperty(ni.prototype,"value",{get:function(){var e=nt(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(i6>100)throw Error("Cycle detected");0!==i5&&0===i6&&this.l!==i7&&(this.l=i7,i9={S:this,v:this.v,i:this.i,o:i9}),this.v=e,this.i++,ne++,i5++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{iQ()}}}}),nl.prototype=new ni,nl.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f)||(this.f&=-5,this.g===ne))return!0;if(this.g=ne,this.f|=1,this.i>0&&!nr(this))return this.f&=-2,!0;var e=i1;try{ns(this),i1=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return i1=e,na(this),this.f&=-2,!0},nl.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}ni.prototype.S.call(this,e)},nl.prototype.U=function(e){if(void 0!==this.t&&(ni.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},nl.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(nl.prototype,"value",{get:function(){if(1&this.f)throw Error("Cycle detected");var e=nt(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),nc.prototype.c=function(){var e=this.S();try{if(8&this.f||void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},nc.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,no(this),ns(this),i5++;var e=i1;return i1=this,nu.bind(this,e)},nc.prototype.N=function(){2&this.f||(this.f|=2,this.u=i3,i3=this)},nc.prototype.d=function(){this.f|=8,1&this.f||nd(this)},nc.prototype.dispose=function(){this.d()};var np=Object.create,nf=Object.defineProperty,ng=Object.defineProperties,nm=Object.getOwnPropertyDescriptor,nv=Object.getOwnPropertyDescriptors,ny=Object.getOwnPropertySymbols,nx=Object.prototype.hasOwnProperty,nb=Object.prototype.propertyIsEnumerable,nw=e=>{throw TypeError(e)},nj=(e,t,i)=>t in e?nf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,nk=(e,t)=>nf(e,"name",{value:t,configurable:!0}),nS=["class","method","getter","setter","accessor","field","value","get","set"],nN=e=>void 0!==e&&"function"!=typeof e?nw("Function expected"):e,nC=(e,t,i,n,r)=>({kind:nS[e],name:t,metadata:n,addInitializer:e=>i._?nw("Already initialized"):r.push(nN(e||null))}),nO=(e,t)=>{let i,n;return nj(t,(i="metadata",(n=Symbol[i])?n:Symbol.for("Symbol."+i)),e[3])},nM=(e,t,i,n)=>{for(var r=0,s=e[t>>1],a=s&&s.length;r<a;r++)1&t?s[r].call(i):n=s[r].call(i,n);return n},nE=(e,t,i,n,r,s)=>{var a,l,o,d,u,c=7&t,h=!!(8&t),p=!!(16&t),f=c>3?e.length+1:c?h?1:2:0,g=nS[c+5],m=c>3&&(e[f-1]=[]),v=e[f]||(e[f]=[]),y=c&&(p||h||(r=r.prototype),c<5&&(c>3||!p)&&nm(c<4?r:{get[i](){return nD(this,s)},set[i](x){return nT(this,s,x)}},i));c?p&&c<4&&nk(s,(c>2?"set ":c>1?"get ":"")+i):nk(r,i);for(var b=n.length-1;b>=0;b--)d=nC(c,i,o={},e[3],v),c&&(d.static=h,d.private=p,u=d.access={has:p?e=>nI(r,e):e=>i in e},3^c&&(u.get=p?e=>(1^c?nD:nz)(e,r,4^c?s:y.get):e=>e[i]),c>2&&(u.set=p?(e,t)=>nT(e,r,t,4^c?s:y.set):(e,t)=>e[i]=t)),l=(0,n[b])(c?c<4?p?s:y[g]:c>4?void 0:{get:y.get,set:y.set}:r,d),o._=1,4^c||void 0===l?nN(l)&&(c>4?m.unshift(l):c?p?s=l:y[g]=l:r=l):"object"!=typeof l||null===l?nw("Object expected"):(nN(a=l.get)&&(y.get=a),nN(a=l.set)&&(y.set=a),nN(a=l.init)&&m.unshift(a));return c||nO(e,r),y&&nf(r,i,y),p?4^c?s:y:r},nA=(e,t,i)=>t.has(e)||nw("Cannot "+i),nI=(e,t)=>Object(t)!==t?nw('Cannot use the "in" operator on this value'):e.has(t),nD=(e,t,i)=>(nA(e,t,"read from private field"),i?i.call(e):t.get(e)),nP=(e,t,i)=>t.has(e)?nw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),nT=(e,t,i,n)=>(nA(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),nz=(e,t,i)=>(nA(e,t,"access private method"),i);function nW(e,t){if(t){let i;return new nl(()=>{let n=e();return n&&i&&t(i,n)?i:(i=n,n)},void 0)}return new nl(e,void 0)}function nR(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let i of e)if(!t.has(i))return!1;return!0}if(Array.isArray(e))return!!Array.isArray(t)&&e.length===t.length&&!e.some((e,i)=>!nR(e,t[i]));if("object"==typeof e&&"object"==typeof t){let i=Object.keys(e),n=Object.keys(t);return i.length===n.length&&!i.some(i=>!nR(e[i],t[i]))}return!1}function n$({get:e},t){return{init:e=>nn(e),get(){return e.call(this).value},set(t){let i=e.call(this);i.peek()!==t&&(i.value=t)}}}function nL(e,t){let i=new WeakMap;return function(){let t=i.get(this);return t||(t=nW(e.bind(this)),i.set(this,t)),t.value}}function nB(e=!0){return function(t,i){i.addInitializer(function(){let t="field"===i.kind||i.static?this:Object.getPrototypeOf(this),n=Object.getOwnPropertyDescriptor(t,i.name);n&&Object.defineProperty(t,i.name,ng(((e,t)=>{for(var i in t||(t={}))nx.call(t,i)&&nj(e,i,t[i]);if(ny)for(var i of ny(t))nb.call(t,i)&&nj(e,i,t[i]);return e})({},n),nv({enumerable:e})))})}}function nF(...e){let t=e.map(e=>nh(e));return()=>t.forEach(e=>e())}b=[n$],y=[n$],v=[n$],m=[nB()],g=[nB()],f=[nB()];var nU=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,nM(w,5,this),nP(this,C),nP(this,j,nM(w,8,this)),nM(w,11,this),nP(this,O,nM(w,12,this)),nM(w,15,this),nP(this,I,nM(w,16,this)),nM(w,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return nD(this,C,P)}get initial(){return nD(this,C,S)}get previous(){return nD(this,C,E)}set current(e){let t=i2(()=>nD(this,C,P));e&&t&&this.equals(t,e)||i0(()=>{nD(this,C,S)||nT(this,C,e,N),nT(this,C,t,A),nT(this,C,e,T)})}reset(e=this.defaultValue){i0(()=>{nT(this,C,void 0,A),nT(this,C,e,N),nT(this,C,e,T)})}};function nH(e){return i2(()=>{let t={};for(let i in e)t[i]=e[i];return t})}w=[,,,np(null)],j=new WeakMap,C=new WeakSet,O=new WeakMap,I=new WeakMap,S=(k=nE(w,20,"#initial",b,C,j)).get,N=k.set,E=(M=nE(w,20,"#previous",y,C,O)).get,A=M.set,P=(D=nE(w,20,"#current",v,C,I)).get,T=D.set,nE(w,2,"current",m,nU),nE(w,2,"initial",g,nU),nE(w,2,"previous",f,nU),nO(w,nU);var nX=class{constructor(){nP(this,z,new WeakMap)}get(e,t){var i;return e?null==(i=nD(this,z).get(e))?void 0:i.get(t):void 0}set(e,t,i){var n;if(e)return nD(this,z).has(e)||nD(this,z).set(e,new Map),null==(n=nD(this,z).get(e))?void 0:n.set(t,i)}clear(e){var t;return e?null==(t=nD(this,z).get(e))?void 0:t.clear():void 0}};z=new WeakMap;var nV=Object.create,nY=Object.defineProperty,nq=Object.getOwnPropertyDescriptor,n_=Object.getOwnPropertySymbols,nK=Object.prototype.hasOwnProperty,nG=Object.prototype.propertyIsEnumerable,nJ=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),nZ=e=>{throw TypeError(e)},nQ=Math.pow,n0=(e,t,i)=>t in e?nY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,n1=(e,t)=>nY(e,"name",{value:t,configurable:!0}),n2=["class","method","getter","setter","accessor","field","value","get","set"],n4=e=>void 0!==e&&"function"!=typeof e?nZ("Function expected"):e,n3=(e,t,i,n,r)=>({kind:n2[e],name:t,metadata:n,addInitializer:e=>i._?nZ("Already initialized"):r.push(n4(e||null))}),n5=(e,t)=>n0(t,nJ("metadata"),e[3]),n6=(e,t,i,n,r,s)=>{var a,l,o,d,u,c=7&t,h=!!(8&t),p=!!(16&t),f=c>3?e.length+1:c?h?1:2:0,g=n2[c+5],m=c>3&&(e[f-1]=[]),v=e[f]||(e[f]=[]),y=c&&(p||h||(r=r.prototype),c<5&&(c>3||!p)&&nq(c<4?r:{get[i](){return n9(this,s)},set[i](x){return re(this,s,x)}},i));c?p&&c<4&&n1(s,(c>2?"set ":c>1?"get ":"")+i):n1(r,i);for(var b=n.length-1;b>=0;b--)d=n3(c,i,o={},e[3],v),c&&(d.static=h,d.private=p,u=d.access={has:p?e=>n7(r,e):e=>i in e},3^c&&(u.get=p?e=>(1^c?n9:rt)(e,r,4^c?s:y.get):e=>e[i]),c>2&&(u.set=p?(e,t)=>re(e,r,t,4^c?s:y.set):(e,t)=>e[i]=t)),l=(0,n[b])(c?c<4?p?s:y[g]:c>4?void 0:{get:y.get,set:y.set}:r,d),o._=1,4^c||void 0===l?n4(l)&&(c>4?m.unshift(l):c?p?s=l:y[g]=l:r=l):"object"!=typeof l||null===l?nZ("Object expected"):(n4(a=l.get)&&(y.get=a),n4(a=l.set)&&(y.set=a),n4(a=l.init)&&m.unshift(a));return c||n5(e,r),y&&nY(r,i,y),p?4^c?s:y:r},n8=(e,t,i)=>t.has(e)||nZ("Cannot "+i),n7=(e,t)=>Object(t)!==t?nZ('Cannot use the "in" operator on this value'):e.has(t),n9=(e,t,i)=>(n8(e,t,"read from private field"),i?i.call(e):t.get(e)),re=(e,t,i,n)=>(n8(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),rt=(e,t,i)=>(n8(e,t,"access private method"),i),ri=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,i){return new e(t.x-i.x,t.y-i.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:i}){return new e(t,i)}},rn=class e{constructor(e,t,i,n){this.left=e,this.top=t,this.width=i,this.height=n,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,i){let{top:n,left:r,width:s,height:a,scale:l}=this,o=new e(r+t,n+i,s,a);return o.scale=((e,t)=>{for(var i in t||(t={}))nK.call(t,i)&&n0(e,i,t[i]);if(n_)for(var i of n_(t))nG.call(t,i)&&n0(e,i,t[i]);return e})({},l),o}get boundingRectangle(){let{width:e,height:t,left:i,top:n,right:r,bottom:s}=this;return{width:e,height:t,left:i,top:n,right:r,bottom:s}}get center(){let{left:e,top:t,right:i,bottom:n}=this;return new ri((e+i)/2,(t+n)/2)}get area(){let{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;let{left:i,top:n,width:r,height:s}=this;return i===t.left&&n===t.top&&r===t.width&&s===t.height}containsPoint(e){let{top:t,left:i,bottom:n,right:r}=this;return t<=e.y&&e.y<=n&&i<=e.x&&e.x<=r}intersectionArea(t){var i,n;let r,s,a,l;return t instanceof e?(i=this,r=Math.max((n=t).top,i.top),s=Math.max(n.left,i.left),a=Math.min(n.left+n.width,i.left+i.width),l=Math.min(n.top+n.height,i.top+i.height),s<a&&r<l?(a-s)*(l-r):0):0}intersectionRatio(e){let{area:t}=this,i=this.intersectionArea(e);return i/(e.area+t-i)}get bottom(){let{top:e,height:t}=this;return e+t}get right(){let{left:e,width:t}=this;return e+t}get aspectRatio(){let{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:i,width:n,height:r}){return new e(i,t,n,r)}static delta(e,t,i={x:"center",y:"center"}){let n=(e,t)=>{let n=i[t],r="x"===t?e.left:e.top,s="x"===t?e.width:e.height;return"start"==n?r:"end"==n?r+s:r+s/2};return ri.delta({x:n(e,"x"),y:n(e,"y")},{x:n(t,"x"),y:n(t,"y")})}static intersectionRatio(t,i){return e.from(t).intersectionRatio(e.from(i))}},rr=class extends($=nU,R=[nL],W=[nL],$){constructor(e){super(ri.from(e),(e,t)=>ri.equals(e,t)),((e,t,i,n)=>{for(var r=0,s=e[t>>1],a=s&&s.length;r<a;r++)1&t?s[r].call(i):n=s[r].call(i,n)})(B,5,this),((e,t,i)=>t.has(e)?nZ("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i))(this,L,0),this.velocity={x:0,y:0}}get delta(){return ri.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let i={x:e.x-t.x,y:e.y-t.y};return i.x||i.y?Math.abs(i.x)>Math.abs(i.y)?i.x>0?"right":"left":i.y>0?"down":"up":null}get current(){return super.current}set current(e){let{current:t}=this,i=ri.from(e),n={x:i.x-t.x,y:i.y-t.y},r=Date.now(),s=r-n9(this,L),a=e=>Math.round(e/s*100);i0(()=>{re(this,L,r),this.velocity={x:a(n.x),y:a(n.y)},super.current=i})}reset(e=this.defaultValue){super.reset(ri.from(e)),this.velocity={x:0,y:0}}};function rs({x:e,y:t},i){let n=Math.abs(e),r=Math.abs(t);return"number"==typeof i?Math.sqrt(nQ(n,2)+nQ(r,2))>i:"x"in i&&"y"in i?n>i.x&&r>i.y:"x"in i?n>i.x:"y"in i&&r>i.y}B=[,,,nV(null!=(s=null==$?void 0:$[nJ("metadata")])?s:null)],L=new WeakMap,n6(B,2,"delta",R,rr),n6(B,2,"direction",W,rr),n5(B,rr);var ra=((a=ra||{}).Horizontal="x",a.Vertical="y",a),rl=Object.values(ra),ro=Object.create,rd=Object.defineProperty,ru=Object.defineProperties,rc=Object.getOwnPropertyDescriptor,rh=Object.getOwnPropertyDescriptors,rp=Object.getOwnPropertySymbols,rf=Object.prototype.hasOwnProperty,rg=Object.prototype.propertyIsEnumerable,rm=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),rv=e=>{throw TypeError(e)},ry=(e,t,i)=>t in e?rd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,rx=(e,t)=>{for(var i in t||(t={}))rf.call(t,i)&&ry(e,i,t[i]);if(rp)for(var i of rp(t))rg.call(t,i)&&ry(e,i,t[i]);return e},rb=(e,t)=>ru(e,rh(t)),rw=(e,t)=>rd(e,"name",{value:t,configurable:!0}),rj=(e,t)=>{var i={};for(var n in e)rf.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&rp)for(var n of rp(e))0>t.indexOf(n)&&rg.call(e,n)&&(i[n]=e[n]);return i},rk=e=>{var t;return[,,,ro(null!=(t=null==e?void 0:e[rm("metadata")])?t:null)]},rS=["class","method","getter","setter","accessor","field","value","get","set"],rN=e=>void 0!==e&&"function"!=typeof e?rv("Function expected"):e,rC=(e,t,i,n,r)=>({kind:rS[e],name:t,metadata:n,addInitializer:e=>i._?rv("Already initialized"):r.push(rN(e||null))}),rO=(e,t)=>ry(t,rm("metadata"),e[3]),rM=(e,t,i,n)=>{for(var r=0,s=e[t>>1],a=s&&s.length;r<a;r++)1&t?s[r].call(i):n=s[r].call(i,n);return n},rE=(e,t,i,n,r,s)=>{var a,l,o,d,u,c=7&t,h=!!(8&t),p=!!(16&t),f=c>3?e.length+1:c?h?1:2:0,g=rS[c+5],m=c>3&&(e[f-1]=[]),v=e[f]||(e[f]=[]),y=c&&(p||h||(r=r.prototype),c<5&&(c>3||!p)&&rc(c<4?r:{get[i](){return rD(this,s)},set[i](x){return rT(this,s,x)}},i));c?p&&c<4&&rw(s,(c>2?"set ":c>1?"get ":"")+i):rw(r,i);for(var b=n.length-1;b>=0;b--)d=rC(c,i,o={},e[3],v),c&&(d.static=h,d.private=p,u=d.access={has:p?e=>rI(r,e):e=>i in e},3^c&&(u.get=p?e=>(1^c?rD:rz)(e,r,4^c?s:y.get):e=>e[i]),c>2&&(u.set=p?(e,t)=>rT(e,r,t,4^c?s:y.set):(e,t)=>e[i]=t)),l=(0,n[b])(c?c<4?p?s:y[g]:c>4?void 0:{get:y.get,set:y.set}:r,d),o._=1,4^c||void 0===l?rN(l)&&(c>4?m.unshift(l):c?p?s=l:y[g]=l:r=l):"object"!=typeof l||null===l?rv("Object expected"):(rN(a=l.get)&&(y.get=a),rN(a=l.set)&&(y.set=a),rN(a=l.init)&&m.unshift(a));return c||rO(e,r),y&&rd(r,i,y),p?4^c?s:y:r},rA=(e,t,i)=>t.has(e)||rv("Cannot "+i),rI=(e,t)=>Object(t)!==t?rv('Cannot use the "in" operator on this value'):e.has(t),rD=(e,t,i)=>(rA(e,t,"read from private field"),i?i.call(e):t.get(e)),rP=(e,t,i)=>t.has(e)?rv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),rT=(e,t,i,n)=>(rA(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),rz=(e,t,i)=>(rA(e,t,"access private method"),i);function rW(e,t){return{plugin:e,options:t}}function rR(e){return t=>rW(e,t)}function r$(e){return"function"==typeof e?{plugin:e,options:void 0}:e}F=[n$];var rL=class{constructor(e,t){this.manager=e,this.options=t,rP(this,H,rM(U,8,this,!1)),rM(U,11,this),rP(this,X,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return i2(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){let t=nh(e.bind(this));return rD(this,X).add(t),t}destroy(){rD(this,X).forEach(e=>e())}static configure(e){return rW(this,e)}};U=rk(null),H=new WeakMap,X=new WeakMap,rE(U,4,"disabled",F,rL,H),rO(U,rL);var rB=class extends rL{},rF=class{constructor(e){this.manager=e,this.instances=new Map,rP(this,V,[])}get values(){return Array.from(this.instances.values())}set values(e){let t=e.map(r$).reduce((e,t)=>{let i=e.find(({plugin:e})=>e===t.plugin);return i?(i.options=t.options,e):[...e,t]},[]),i=t.map(({plugin:e})=>e);for(let e of rD(this,V))if(!i.includes(e)){if(e.prototype instanceof rB)continue;this.unregister(e)}for(let{plugin:e,options:i}of t)this.register(e,i);rT(this,V,i)}get(e){return this.instances.get(e)}register(e,t){let i=this.instances.get(e);if(i)return i.options!==t&&(i.options=t),i;let n=new e(this.manager,t);return this.instances.set(e,n),n}unregister(e){let t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(let e of this.instances.values())e.destroy();this.instances.clear()}};function rU(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}V=new WeakMap;var rH=[],rX=class extends rL{constructor(e){super(e),rP(this,Y),rP(this,q),this.computeCollisions=this.computeCollisions.bind(this),rT(this,q,nn(rH)),this.destroy=nF(()=>{let e=this.computeCollisions(),t=i2(()=>this.manager.dragOperation.position.current);if(e!==rH){let e=rD(this,Y);if(rT(this,Y,t),e&&t.x==e.x&&t.y==e.y)return}else rT(this,Y,void 0);rD(this,q).value=e},()=>{let{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){i2(()=>{e?rD(this,q).value=this.computeCollisions():rT(this,Y,void 0)})}computeCollisions(e,t){let{registry:i,dragOperation:n}=this.manager,{source:r,shape:s,status:a}=n;if(!a.initialized||!s)return rH;let l=[],o=[];for(let s of null!=e?e:i.droppables){if(s.disabled||r&&!s.accepts(r))continue;let e=null!=t?t:s.collisionDetector;if(!e)continue;o.push(s),s.shape;let i=i2(()=>e({droppable:s,dragOperation:n}));i&&(null!=s.collisionPriority&&(i.priority=s.collisionPriority),l.push(i))}return 0===o.length?rH:(l.sort(rU),l)}get collisions(){return rD(this,q).value}};Y=new WeakMap,q=new WeakMap,G=[n$],K=[n$],_=[n$];var rV=class e{constructor(e,t){rP(this,ee,rM(Q,8,this)),rM(Q,11,this),rP(this,et),rP(this,ei,rM(Q,12,this)),rM(Q,15,this),rP(this,en,rM(Q,16,this)),rM(Q,19,this);const{effects:i,id:n,data:r={},disabled:s=!1,register:a=!0}=e;let l=n;rT(this,et,nn(n)),this.manager=t,this.data=r,this.disabled=s,this.effects=()=>{var e;return[()=>{let{id:e,manager:t}=this;if(e!==l)return l=e,null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==i?void 0:i())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,i;let n=rD(this,et).value;return null!=(i=null==(t=e.pendingIdChanges)?void 0:t.get(this))?i:n}set id(t){var i,n;t!==(null!=(n=null==(i=e.pendingIdChanges)?void 0:i.get(this))?n:rD(this,et).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>rz(e,J,Z).call(e))),e.pendingIdChanges.set(this,t))}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};Q=rk(null),J=new WeakSet,Z=function(){let e=rV.pendingIdChanges;rV.pendingIdChanges=null,e&&i0(()=>{for(let[t,i]of e)rD(t,et).value=i})},ee=new WeakMap,et=new WeakMap,ei=new WeakMap,en=new WeakMap,rE(Q,4,"manager",G,rV,ee),rE(Q,4,"data",K,rV,ei),rE(Q,4,"disabled",_,rV,en),rP(rV,J),rO(Q,rV),rV.pendingIdChanges=null;var rY=rV,rq=class{constructor(){this.map=nn(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{let i=this.map.peek(),n=i.get(e),r=()=>this.unregister(e,t);if(n===t)return r;if(n&&n.id===e){let e=this.cleanupFunctions.get(n);null==e||e(),this.cleanupFunctions.delete(n)}let s=new Map(i);for(let[n,r]of i)if(r===t&&n!==e){s.delete(n);break}s.set(e,t),this.map.value=s;let a=nF(...t.effects());return this.cleanupFunctions.set(t,a),r},this.unregister=(e,t)=>{let i=this.map.peek();if(i.get(e)!==t)return;let n=this.cleanupFunctions.get(t);null==n||n(),this.cleanupFunctions.delete(t);let r=new Map(i);r.delete(e),this.map.value=r}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(let e of this){let t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},r_=class extends(eu=rY,ed=[n$],eo=[n$],el=[n$],ea=[nL],es=[nL],er=[nL],eu){constructor(e,t){var{modifiers:i,type:n,sensors:r,plugins:s,effects:a}=e,l=rj(e,["modifiers","type","sensors","plugins","effects"]);super(rb(rx({},l),{effects:()=>{var e;return[...null!=(e=null==a?void 0:a())?e:[],()=>{let{manager:e,plugins:t}=this;if(e&&t)for(let i of t){let{plugin:t}=r$(i);e.registry.plugins.register(t)}}]}}),t),rM(ec,5,this),rP(this,eh,rM(ec,8,this)),rM(ec,11,this),rP(this,ep,rM(ec,12,this)),rM(ec,15,this),rP(this,ef,rM(ec,16,this,this.isDragSource?"dragging":"idle")),rM(ec,19,this),this.type=n,this.sensors=r,this.modifiers=i,this.alignment=l.alignment,this.plugins=s}pluginConfig(e){if(this.plugins)for(let t of this.plugins){let i=r$(t);if(i.plugin===e)return i.options}}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};ec=rk(eu),eh=new WeakMap,ep=new WeakMap,ef=new WeakMap,rE(ec,4,"type",ed,r_,eh),rE(ec,4,"modifiers",eo,r_,ep),rE(ec,4,"status",el,r_,ef),rE(ec,2,"isDropping",ea,r_),rE(ec,2,"isDragging",es,r_),rE(ec,2,"isDragSource",er,r_),rO(ec,r_);var rK=class extends(ew=rY,eb=[n$],ex=[n$],ey=[n$],ev=[n$],em=[n$],eg=[nL],ew){constructor(e,t){var{accept:i,collisionDetector:n,collisionPriority:r,type:s}=e;super(rj(e,["accept","collisionDetector","collisionPriority","type"]),t),rM(ej,5,this),rP(this,ek,rM(ej,8,this)),rM(ej,11,this),rP(this,eS,rM(ej,12,this)),rM(ej,15,this),rP(this,eN,rM(ej,16,this)),rM(ej,19,this),rP(this,eC,rM(ej,20,this)),rM(ej,23,this),rP(this,eO,rM(ej,24,this)),rM(ej,27,this),this.accept=i,this.collisionDetector=n,this.collisionPriority=r,this.type=s}accepts(e){let{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};ej=rk(ew),ek=new WeakMap,eS=new WeakMap,eN=new WeakMap,eC=new WeakMap,eO=new WeakMap,rE(ej,4,"accept",eb,rK,ek),rE(ej,4,"type",ex,rK,eS),rE(ej,4,"collisionDetector",ey,rK,eN),rE(ej,4,"collisionPriority",ev,rK,eC),rE(ej,4,"shape",em,rK,eO),rE(ej,2,"isDropTarget",eg,rK),rO(ej,rK);var rG=class{constructor(){this.registry=new Map}addEventListener(e,t){let{registry:i}=this,n=new Set(i.get(e));return n.add(t),i.set(e,n),()=>this.removeEventListener(e,t)}removeEventListener(e,t){let{registry:i}=this,n=new Set(i.get(e));n.delete(t),i.set(e,n)}dispatch(e,...t){let{registry:i}=this,n=i.get(e);if(n)for(let e of n)e(...t)}},rJ=class extends rG{constructor(e){super(),this.manager=e}dispatch(e,t){let i=[t,this.manager];super.dispatch(e,...i)}};function rZ(e,t=!0){let i=!1;return rb(rx({},e),{cancelable:t,get defaultPrevented(){return i},preventDefault(){t&&(i=!0)}})}var rQ=class extends rB{constructor(e){super(e);let t=[];this.destroy=nF(()=>{let{dragOperation:i,collisionObserver:n}=e;i.status.initializing&&(t=[],n.enable())},()=>{let i,{collisionObserver:n,monitor:r}=e,{collisions:s}=n;if(n.isDisabled()||rY.pendingIdChanges)return;let a=rZ({collisions:s});if(r.dispatch("collision",a),a.defaultPrevented||(i=t,s.map(({id:e})=>e).join("")===i.map(({id:e})=>e).join("")))return;t=s;let[l]=s;i2(()=>{var t;(null==l?void 0:l.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==l?void 0:l.id).then(()=>{n.enable()}))})})}},r0=((l=r0||{})[l.Lowest=0]="Lowest",l[l.Low=1]="Low",l[l.Normal=2]="Normal",l[l.High=3]="High",l[l.Highest=4]="Highest",l),r1=((o=r1||{})[o.Collision=0]="Collision",o[o.ShapeIntersection=1]="ShapeIntersection",o[o.PointerIntersection=2]="PointerIntersection",o);eT=[n$],eP=[nL],eD=[nL],eI=[nL],eA=[nL],eE=[nL],eM=[nL];var r2=class{constructor(){rM(ez,5,this),rP(this,eW,rM(ez,8,this,"idle")),rM(ez,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){let{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};ez=rk(null),eW=new WeakMap,rE(ez,4,"value",eT,r2,eW),rE(ez,2,"current",eP,r2),rE(ez,2,"idle",eD,r2),rE(ez,2,"initializing",eI,r2),rE(ez,2,"initialized",eA,r2),rE(ez,2,"dragging",eE,r2),rE(ez,2,"dropped",eM,r2),rO(ez,r2);var r4=class{constructor(e){this.manager=e}setDragSource(e){let{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return i2(()=>{let{dragOperation:t}=this.manager,i=null!=e?e:null;if(t.targetIdentifier===i)return Promise.resolve(!1);t.targetIdentifier=i;let n=rZ({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",n),this.manager.renderer.rendering.then(()=>n.defaultPrevented)})}start(e){return i2(()=>{let{dragOperation:t}=this.manager;if(null!=e.source&&this.setDragSource(e.source),!t.source)throw Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw Error("Cannot start a drag operation while another is active");let i=new AbortController,{event:n,coordinates:r}=e;i0(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=n?n:null,t.position.reset(r)});let s=rZ({operation:t.snapshot()});return(this.manager.monitor.dispatch("beforedragstart",s),s.defaultPrevented)?(t.reset(),i.abort()):(t.status.set("initializing"),t.controller=i,this.manager.renderer.rendering.then(()=>{if(i.signal.aborted)return;let{status:e}=t;"initializing"===e.current&&i0(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:n,operation:t.snapshot(),cancelable:!1})})})),i})}move(e){return i2(()=>{var t,i;let{dragOperation:n}=this.manager,{status:r,controller:s}=n;if(!r.dragging||!s||s.signal.aborted)return;let a=rZ({nativeEvent:e.event,operation:n.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(i=e.propagate)||i)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,i,r,s,l;if(a.defaultPrevented)return;let o=null!=(l=e.to)?l:{x:n.position.current.x+(null!=(i=null==(t=e.by)?void 0:t.x)?i:0),y:n.position.current.y+(null!=(s=null==(r=e.by)?void 0:r.y)?s:0)};n.position.current=o})})}stop(e={}){return i2(()=>{var t,i;let n,{dragOperation:r}=this.manager,{controller:s}=r;if(!s||s.signal.aborted)return;s.abort();let a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");let e=i2(()=>{var e;return(null==(e=r.source)?void 0:e.status)==="dropping"}),t=()=>{r.controller===s&&(r.controller=void 0),r.reset()};if(e){let{source:e}=r,i=nh(()=>{(null==e?void 0:e.status)==="idle"&&(i(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(i=e.canceled)&&i,suspend:()=>{let e={resume:()=>{},abort:()=>{}};return n=new Promise((t,i)=>{e.resume=t,e.abort=i}),e}}),n?n.then(a).catch(()=>r.reset()):a()})}},r3=class extends rL{constructor(e,t){super(e,t),this.manager=e,this.options=t}},r5=class extends AbortController{constructor(e,t){for(const i of(super(),this.constraints=e,this.onActivate=t,this.activated=!1,null!=e?e:[]))i.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(let t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},r6=class{constructor(e){this.options=e,rP(this,eR)}set controller(e){rT(this,eR,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=rD(this,eR))||t.activate(e)}};eR=new WeakMap;var r8=class extends rL{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},r7=class{constructor(e){this.draggables=new rq,this.droppables=new rq,this.plugins=new rF(e),this.sensors=new rF(e),this.modifiers=new rF(e)}register(e,t){if(e instanceof r_)return this.draggables.register(e.id,e);if(e instanceof rK)return this.droppables.register(e.id,e);if(e.prototype instanceof r8)return this.modifiers.register(e,t);if(e.prototype instanceof r3)return this.sensors.register(e,t);if(e.prototype instanceof rL)return this.plugins.register(e,t);throw Error("Invalid instance type")}unregister(e){if(e instanceof rY)return e instanceof r_?this.draggables.unregister(e.id,e):e instanceof rK?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof r8)return this.modifiers.unregister(e);if(e.prototype instanceof r3)return this.sensors.unregister(e);if(e.prototype instanceof rL)return this.plugins.unregister(e);throw Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};eY=[nL],eV=[n$],eX=[n$],eH=[n$],eU=[n$],eF=[n$],eB=[nL],eL=[nL],e$=[nL];var r9=class{constructor(e){rM(eG,5,this),rP(this,eq),rP(this,e_),rP(this,eK,new nU(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new r2,rP(this,eJ,rM(eG,8,this,!1)),rM(eG,11,this),rP(this,eZ,rM(eG,12,this,null)),rM(eG,15,this),rP(this,eQ,rM(eG,16,this,null)),rM(eG,19,this),rP(this,e0,rM(eG,20,this,null)),rM(eG,23,this),rP(this,e1,rM(eG,24,this,[])),rM(eG,27,this),this.position=new rr({x:0,y:0}),rP(this,e2,{x:0,y:0}),rT(this,eq,e)}get shape(){let{current:e,initial:t,previous:i}=rD(this,eK);return e&&t?{current:e,initial:t,previous:i}:null}set shape(e){e?rD(this,eK).current=e:rD(this,eK).reset()}get source(){var e;let t=this.sourceIdentifier;if(null==t)return null;let i=rD(this,eq).registry.draggables.get(t);return i&&rT(this,e_,i),null!=(e=null!=i?i:rD(this,e_))?e:null}get target(){var e;let t=this.targetIdentifier;return null!=t&&null!=(e=rD(this,eq).registry.droppables.get(t))?e:null}get transform(){let{x:e,y:t}=this.position.delta,i={x:e,y:t};for(let e of this.modifiers)i=e.apply(rb(rx({},this.snapshot()),{transform:i}));return rT(this,e2,i),i}snapshot(){return i2(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:rD(this,e2),shape:this.shape?nH(this.shape):null,position:nH(this.position),status:nH(this.status),canceled:this.canceled}))}reset(){i0(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,rD(this,eK).reset(),this.position.reset({x:0,y:0}),rT(this,e2,{x:0,y:0}),this.modifiers=[]})}};eG=rk(null),eq=new WeakMap,e_=new WeakMap,eK=new WeakMap,eJ=new WeakMap,eZ=new WeakMap,eQ=new WeakMap,e0=new WeakMap,e1=new WeakMap,e2=new WeakMap,rE(eG,2,"shape",eY,r9),rE(eG,4,"canceled",eV,r9,eJ),rE(eG,4,"activatorEvent",eX,r9,eZ),rE(eG,4,"sourceIdentifier",eH,r9,eQ),rE(eG,4,"targetIdentifier",eU,r9,e0),rE(eG,4,"modifiers",eF,r9,e1),rE(eG,2,"source",eB,r9),rE(eG,2,"target",eL,r9),rE(eG,2,"transform",e$,r9),rO(eG,r9);var se={get rendering(){return Promise.resolve()}};function st(e,t){return"function"==typeof e?e(t):null!=e?e:t}var si=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const i=null!=e?e:{},n=st(i.plugins,[]),r=st(i.sensors,[]),s=st(i.modifiers,[]),a=null!=(t=i.renderer)?t:se,l=new rJ(this),o=new r7(this);this.registry=o,this.monitor=l,this.renderer=a,this.actions=new r4(this),this.dragOperation=new r9(this),this.collisionObserver=new rX(this),this.plugins=[rQ,...n],this.modifiers=s,this.sensors=r;const{destroy:d}=this,u=nF(()=>{var e,t,i;let n=i2(()=>this.dragOperation.modifiers),r=this.modifiers;for(let e of n)r.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(i=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{let{plugin:t,options:i}=r$(e);return new t(this,i)}))?i:r});this.destroy=()=>{u(),d()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},sn=e=>{throw TypeError(e)},sr=(e,t,i)=>t.has(e)||sn("Cannot "+i),ss=(e,t,i)=>(sr(e,t,"read from private field"),t.get(e)),sa=(e,t,i)=>t.has(e)?sn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),sl=(e,t,i,n)=>(sr(e,t,"write to private field"),t.set(e,i),i),so=(e,t,i)=>(sr(e,t,"access private method"),i);function sd(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function su(e,t){let i=e.getAnimations(),n=null;for(let e of i){if("running"!==e.playState)continue;let{effect:i}=e,r=(sd(i)?i.getKeyframes():[]).filter(t);r.length>0&&(n=[r[r.length-1],e])}return n}function sc(e){let{width:t,height:i,top:n,left:r,bottom:s,right:a}=e.getBoundingClientRect();return{width:t,height:i,top:n,left:r,bottom:s,right:a}}function sh(e){let t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function sp(e){return"nodeType"in e}function sf(e){var t,i,n;return e?sh(e)?e:sp(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?n:window:window:window}function sg(e){let{Document:t}=sf(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function sm(e){return!(!e||sh(e))&&(e instanceof sf(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function sv(e){return e instanceof sf(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function sy(e){return e?sh(e)?e.document:sp(e)?sg(e)?e:sm(e)||sv(e)?e.ownerDocument:document:document:document}function sx(e,t=e.getBoundingClientRect(),i=0){var n,r,s,a,l;let o=t,{ownerDocument:d}=e,u=null!=(n=d.defaultView)?n:window,c=e.parentElement;for(;c&&c!==d.documentElement;){if(!function(e){if("DETAILS"===e.tagName&&!1===e.open)return!1;let{overflow:t,overflowX:i,overflowY:n}=getComputedStyle(e);return"visible"===t&&"visible"===i&&"visible"===n}(c)){let e=c.getBoundingClientRect(),t=i*(e.bottom-e.top),n=i*(e.right-e.left),r=i*(e.bottom-e.top),s=i*(e.right-e.left);(o={top:Math.max(o.top,e.top-t),right:Math.min(o.right,e.right+n),bottom:Math.min(o.bottom,e.bottom+r),left:Math.max(o.left,e.left-s),width:0,height:0}).width=o.right-o.left,o.height=o.bottom-o.top}c=c.parentElement}let h=u.visualViewport,p=null!=(r=null==h?void 0:h.offsetTop)?r:0,f=null!=(s=null==h?void 0:h.offsetLeft)?s:0,g=null!=(a=null==h?void 0:h.width)?a:u.innerWidth,m=null!=(l=null==h?void 0:h.height)?l:u.innerHeight,v=i*m,y=i*g;return(o={top:Math.max(o.top,p-v),right:Math.min(o.right,f+g+y),bottom:Math.min(o.bottom,p+m+v),left:Math.max(o.left,f-y),width:0,height:0}).width=o.right-o.left,o.height=o.bottom-o.top,o.width<0&&(o.width=0),o.height<0&&(o.height=0),o}function sb(e){return{x:e.clientX,y:e.clientY}}var sw="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function sj(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function sk(){var e,t;let i=sj()?window.visualViewport:null;return{x:null!=(e=null==i?void 0:i.offsetLeft)?e:0,y:null!=(t=null==i?void 0:i.offsetTop)?t:0}}function sS(e){return!!e&&!!sp(e)&&e instanceof sf(e).ShadowRoot}function sN(e){if(e&&sp(e)){let t=e.getRootNode();if(sS(t)||t instanceof Document)return t}return sy(e)}function sC(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function sO(e){return"value"in e}function sM(e){return"CANVAS"===e.tagName}var sE=new WeakMap,sA=class{constructor(){this.entries=new Set,this.clear=()=>{for(let e of this.entries){let[t,{type:i,listener:n,options:r}]=e;t.removeEventListener(i,n,r)}this.entries.clear()}}bind(e,t){let i=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t],r=[];for(let e of i)for(let t of n){let{type:i,listener:n,options:s}=t,a=[e,t];e.addEventListener(i,n,s),this.entries.add(a),r.push(a)}let s=this.entries;return function(){for(let e of r){let[t,{type:i,listener:n,options:r}]=e;t.removeEventListener(i,n,r),s.delete(e)}}}};function sI(e){let t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function sD(e,t){let i,n;return function(...r){let s=this;if(n){let a;null==i||i(),a=setTimeout(()=>{e.apply(s,r),n=performance.now()},t-(performance.now()-n)),i=()=>clearTimeout(a)}else e.apply(s,r),n=performance.now()}}var sP=sw?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},sT=class extends sP{constructor(e){super(t=>{ss(this,e4)?e(t,this):sl(this,e4,!0)}),sa(this,e4,!1)}};e4=new WeakMap;var sz=Array.from({length:100},(e,t)=>t/100),sW=class{constructor(e,t,i={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,sa(this,ti),this.disconnect=()=>{var e,t,i;sl(this,te,!0),null==(e=ss(this,e6))||e.disconnect(),null==(t=ss(this,e8))||t.disconnect(),ss(this,e7).disconnect(),null==(i=ss(this,e9))||i.remove()},sa(this,e3,!0),sa(this,e5),sa(this,e6),sa(this,e8),sa(this,e7),sa(this,e9),sa(this,te,!1),sa(this,tt,sD(()=>{var e,t,i;let{element:n}=this;if(null==(e=ss(this,e8))||e.disconnect(),ss(this,te)||!ss(this,e3)||!n.isConnected)return;let r=null!=(t=n.ownerDocument)?t:document,{innerHeight:s,innerWidth:a}=null!=(i=r.defaultView)?i:window,l=n.getBoundingClientRect(),{top:o,left:d,bottom:u,right:c}=sx(n,l),h=-Math.floor(o),p=-Math.floor(d),f=-Math.floor(a-c),g=-Math.floor(s-u),m=`${h}px ${f}px ${g}px ${p}px`;this.boundingClientRect=l,sl(this,e8,new IntersectionObserver(e=>{let[t]=e,{intersectionRect:i}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:rn.intersectionRatio(i,sx(n)))&&ss(this,tt).call(this)},{threshold:sz,rootMargin:m,root:r})),ss(this,e8).observe(n),so(this,ti,tn).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),sl(this,e3,function(e,t=e.getBoundingClientRect()){let{width:i,height:n}=sx(e,t);return i>0&&n>0}(e,this.boundingClientRect));let n=!0;this.callback=e=>{n&&(n=!1,i.skipInitial)||t(e)};const r=e.ownerDocument;(null==i?void 0:i.debug)&&(sl(this,e9,document.createElement("div")),ss(this,e9).style.background="rgba(0,0,0,0.15)",ss(this,e9).style.position="fixed",ss(this,e9).style.pointerEvents="none",r.body.appendChild(ss(this,e9))),sl(this,e7,new IntersectionObserver(t=>{var i,n;let{boundingClientRect:r,isIntersecting:s}=t[t.length-1],{width:a,height:l}=r,o=ss(this,e3);sl(this,e3,s),(a||l)&&(o&&!s?(null==(i=ss(this,e8))||i.disconnect(),this.callback(null),null==(n=ss(this,e6))||n.disconnect(),sl(this,e6,void 0),ss(this,e9)&&(ss(this,e9).style.visibility="hidden")):ss(this,tt).call(this),s&&!ss(this,e6)&&(sl(this,e6,new sT(ss(this,tt))),ss(this,e6).observe(e)))},{threshold:sz,root:r})),ss(this,e3)&&!i.skipInitial&&this.callback(this.boundingClientRect),ss(this,e7).observe(e)}};e3=new WeakMap,e5=new WeakMap,e6=new WeakMap,e8=new WeakMap,e7=new WeakMap,e9=new WeakMap,te=new WeakMap,tt=new WeakMap,ti=new WeakSet,tn=function(){var e,t;!ss(this,te)&&(so(this,ti,tr).call(this),(e=this.boundingClientRect)===(t=ss(this,e5))||e&&t&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom||(this.callback(this.boundingClientRect),sl(this,e5,this.boundingClientRect)))},tr=function(){if(ss(this,e9)){let{top:e,left:t,width:i,height:n}=sx(this.element);ss(this,e9).style.overflow="hidden",ss(this,e9).style.visibility="visible",ss(this,e9).style.top=`${Math.floor(e)}px`,ss(this,e9).style.left=`${Math.floor(t)}px`,ss(this,e9).style.width=`${Math.floor(i)}px`,ss(this,e9).style.height=`${Math.floor(n)}px`}};var sR=new WeakMap,s$=new WeakMap,sL=class{constructor(e,t,i){this.callback=t,sa(this,ts),sa(this,ta,!1),sa(this,tl),sa(this,to,sD(e=>{if(!ss(this,ta)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains){for(let t of ss(this,tl))if(e.target.contains(t)){this.callback(ss(this,ts).boundingClientRect);break}}},75));const n=function(e){let t=new Set,i=sI(e);for(;i;)t.add(i),i=sI(i);return t}(e),r=function(e,t){let i=new Set;for(let n of e){let e=function(e,t){let i=sR.get(e);return i||(i={disconnect:new sW(e,t=>{let i=sR.get(e);i&&i.callbacks.forEach(e=>e(t))},{skipInitial:!0}).disconnect,callbacks:new Set}),i.callbacks.add(t),sR.set(e,i),()=>{i.callbacks.delete(t),0===i.callbacks.size&&(sR.delete(e),i.disconnect())}}(n,t);i.add(e)}return()=>i.forEach(e=>e())}(n,t),s=function(e,t){var i;let n=e.ownerDocument;if(!s$.has(n)){let e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),s$.set(n,{disconnect:()=>e.abort(),listeners:t})}let{listeners:r,disconnect:s}=null!=(i=s$.get(n))?i:{};return r&&s?(r.add(t),()=>{r.delete(t),0===r.size&&(s(),s$.delete(n))}):()=>{}}(e,ss(this,to));sl(this,tl,n),sl(this,ts,new sW(e,t,i)),this.disconnect=()=>{ss(this,ta)||(sl(this,ta,!0),r(),s(),ss(this,ts).disconnect())}}};function sB(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function sF(e){try{sB(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function sU(e){return!!sw&&!!e&&e===sy(e).scrollingElement}function sH(e){var t,i;let n=sf(e),r=sU(e)?function(e){var t,i,n,r;let{documentElement:s}=sy(e),a=sf(e).visualViewport,l=null!=(t=null==a?void 0:a.width)?t:s.clientWidth,o=null!=(i=null==a?void 0:a.height)?i:s.clientHeight,d=null!=(n=null==a?void 0:a.offsetTop)?n:0,u=null!=(r=null==a?void 0:a.offsetLeft)?r:0;return{top:d,left:u,right:u+l,bottom:d+o,width:l,height:o}}(e):sc(e),s=n.visualViewport,a=sU(e)?{height:null!=(t=null==s?void 0:s.height)?t:n.innerHeight,width:null!=(i=null==s?void 0:s.width)?i:n.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}},o=l.current.y<=0,d=l.current.x<=0,u=l.current.y>=l.max.y,c=l.current.x>=l.max.x;return{rect:r,position:l,isTop:o,isLeft:d,isBottom:u,isRight:c}}ts=new WeakMap,ta=new WeakMap,tl=new WeakMap,to=new WeakMap;var sX=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;for(let t of(this.pending=!1,this.tasks=new Set,this.resolvers=new Set,e))t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},sV=new sX(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),sY=new sX(e=>setTimeout(e,50)),sq=new Map,s_=sq.clear.bind(sq);function sK(e,t=!1){if(!t)return sG(e);let i=sq.get(e);return i||(i=sG(e),sq.set(e,i),sY.schedule(s_)),i}function sG(e){return sf(e).getComputedStyle(e)}var sJ={excludeElement:!0,escapeShadowDOM:!0};function sZ(e,t=sJ){let{limit:i,excludeElement:n,escapeShadowDOM:r}=t,s=new Set;return e?function t(a){if(null!=i&&s.size>=i||!a)return s;if(sg(a)&&null!=a.scrollingElement&&!s.has(a.scrollingElement))return s.add(a.scrollingElement),s;if(r&&sS(a))return t(a.host);if(!sm(a))return sv(a)?t(a.parentElement):s;if(s.has(a))return s;let l=sK(a,!0);if(n&&a===e||function(e,t=sK(e,!0)){let i=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{let n=t[e];return"string"==typeof n&&i.test(n)})}(a,l)&&s.add(a),function(e,t=sK(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,l)){let{scrollingElement:e}=a.ownerDocument;return e&&s.add(e),s}return t(a.parentNode)}(e):s}function sQ(e,t=window.frameElement){let i={x:0,y:0,scaleX:1,scaleY:1};if(!e)return i;let n=sI(e);for(;n&&n!==t;){let e=sc(n),{x:t,y:r}=function(e,t=sc(e)){let i=Math.round(t.width),n=Math.round(t.height);if(sm(e))return{x:i/e.offsetWidth,y:n/e.offsetHeight};let r=sK(e,!0);return{x:(parseFloat(r.width)||i)/i,y:(parseFloat(r.height)||n)/n}}(n,e);i.x=i.x+e.left,i.y=i.y+e.top,i.scaleX=i.scaleX*t,i.scaleY=i.scaleY*r,n=sI(n)}return i}function s0(e){if("none"===e)return null;let[t,i,n="0"]=e.split(" "),r={x:parseFloat(t),y:parseFloat(i),z:parseInt(n,10)};return isNaN(r.x)&&isNaN(r.y)?null:{x:isNaN(r.x)?0:r.x,y:isNaN(r.y)?0:r.y,z:isNaN(r.z)?0:r.z}}function s1(e){var t,i,n,r,s,a,l,o,d;let{scale:u,transform:c,translate:h}=e,p=function(e){if("none"===e)return null;let t=e.split(" "),i=parseFloat(t[0]),n=parseFloat(t[1]);return isNaN(i)&&isNaN(n)?null:{x:isNaN(i)?n:i,y:isNaN(n)?i:n}}(u),f=s0(h),g=function(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(c);if(!g&&!p&&!f)return null;let m={x:null!=(t=null==p?void 0:p.x)?t:1,y:null!=(i=null==p?void 0:p.y)?i:1},v={x:null!=(n=null==f?void 0:f.x)?n:0,y:null!=(r=null==f?void 0:f.y)?r:0},y={x:null!=(s=null==g?void 0:g.x)?s:0,y:null!=(a=null==g?void 0:g.y)?a:0,scaleX:null!=(l=null==g?void 0:g.scaleX)?l:1,scaleY:null!=(o=null==g?void 0:g.scaleY)?o:1};return{x:v.x+y.x,y:v.y+y.y,z:null!=(d=null==f?void 0:f.z)?d:0,scaleX:m.x*y.scaleX,scaleY:m.y*y.scaleY}}var s2=((d=s2||{})[d.Idle=0]="Idle",d[d.Forward=1]="Forward",d[d.Reverse=-1]="Reverse",d),s4={x:.2,y:.2},s3={x:10,y:10};function s5(e,{block:t="nearest",inline:i="nearest"}={}){if(!sm(e))return;let n=sZ(e),r=[];for(let s of n){if(!sm(s))continue;let{top:n,left:a}=function(e,t){let i=s6(e),n=s6(t);return{top:i.top-n.top-t.clientTop,left:i.left-n.left-t.clientLeft}}(e,s),l=n,o=a;for(let e of r)l-=e.scrollTop,o-=e.scrollLeft;if("none"!==t){let i=l<s.scrollTop;i!==l+e.offsetHeight>s.scrollTop+s.clientHeight&&("center"===t?s.scrollTop=l-s.clientHeight/2+e.offsetHeight/2:i?s.scrollTop=l:s.scrollTop=l+e.offsetHeight-s.clientHeight)}if("none"!==i){let t=o<s.scrollLeft;t!==o+e.offsetWidth>s.scrollLeft+s.clientWidth&&("center"===i?s.scrollLeft=o-s.clientWidth/2+e.offsetWidth/2:t?s.scrollLeft=o:s.scrollLeft=o+e.offsetWidth-s.clientWidth)}r.push(s)}}function s6(e){let t=0,i=0,n=e;for(;n;){t+=n.offsetTop,i+=n.offsetLeft;let e=n.offsetParent;if(!sm(e))break;t+=e.clientTop,i+=e.clientLeft,n=e}return{top:t,left:i}}function s8({element:e,keyframes:t,options:i}){return e.animate(t,i).finished}function s7(e,t=sK(e).translate,i=!0){if(i){let t=su(e,e=>"translate"in e);if(t){let{translate:e=""}=t[0];if("string"==typeof e){let t=s0(e);if(t)return t}}}if(t){let e=s0(t);if(e)return e}return{x:0,y:0,z:0}}var s9=new sX(e=>setTimeout(e,0)),ae=new Map,at=ae.clear.bind(ae),ai=class extends rn{constructor(e,t={}){var i,n,r,s;let a;const{frameTransform:l=sQ(e),ignoreTransforms:o,getBoundingClientRect:d=sc}=t,u=function(e,t){let i=(function(e){let t=e.ownerDocument,i=ae.get(t);if(i)return i;i=t.getAnimations(),ae.set(t,i),s9.schedule(at);let n=i.filter(t=>sd(t.effect)&&t.effect.target===e);return ae.set(e,n),i})(e).filter(e=>{var i,n;if(sd(e.effect)){let{target:r}=e.effect;if(null==(n=r&&(null==(i=t.isValidTarget)?void 0:i.call(t,r)))||n)return e.effect.getKeyframes().some(e=>{for(let i of t.properties)if(e[i])return!0})}}).map(e=>{let{effect:t,currentTime:i}=e,n=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState&&"number"==typeof n&&"number"==typeof i&&i<n)return e.currentTime=n,()=>{e.currentTime=i}});if(i.length>0)return()=>i.forEach(e=>null==e?void 0:e())}(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||sj())&&t.contains(e)}),c=d(e);let{top:h,left:p,width:f,height:g}=c;const m=sK(e),v=s1(m),y={x:null!=(i=null==v?void 0:v.scaleX)?i:1,y:null!=(n=null==v?void 0:v.scaleY)?n:1},b=function(e,t){let i,n,r,s=e.getAnimations();if(!s.length)return null;let a=!1;for(let e of s){if("running"!==e.playState)continue;let t=sd(e.effect)?e.effect.getKeyframes():[],s=t[t.length-1];if(!s)continue;let{transform:l,translate:o,scale:d}=s;"string"==typeof l&&l&&(i=l,a=!0),"string"==typeof o&&o&&(n=o,a=!0),"string"==typeof d&&d&&(r=d,a=!0)}return a?s1({transform:null!=i?i:t.transform,translate:null!=n?n:t.translate,scale:null!=r?r:t.scale}):null}(e,m);null==u||u(),v&&(a=function(e,t,i){let{scaleX:n,scaleY:r,x:s,y:a}=t,l=e.left-s-(1-n)*parseFloat(i),o=e.top-a-(1-r)*parseFloat(i.slice(i.indexOf(" ")+1)),d=n?e.width/n:e.width,u=r?e.height/r:e.height;return{width:d,height:u,top:o,right:l+d,bottom:o+u,left:l}}(c,v,m.transformOrigin),(o||b)&&(h=a.top,p=a.left,f=a.width,g=a.height));const w={width:null!=(r=null==a?void 0:a.width)?r:f,height:null!=(s=null==a?void 0:a.height)?s:g};if(b&&!o&&a){const e=function(e,t,i){let{scaleX:n,scaleY:r,x:s,y:a}=t,l=e.left+s+(1-n)*parseFloat(i),o=e.top+a+(1-r)*parseFloat(i.slice(i.indexOf(" ")+1)),d=n?e.width*n:e.width,u=r?e.height*r:e.height;return{width:d,height:u,top:o,right:l+d,bottom:o+u,left:l}}(a,b,m.transformOrigin);h=e.top,p=e.left,f=e.width,g=e.height,y.x=b.scaleX,y.y=b.scaleY}l&&(o||(p*=l.scaleX,f*=l.scaleX,h*=l.scaleY,g*=l.scaleY),p+=l.x,h+=l.y),super(p,h,f,g),this.scale=y,this.intrinsicWidth=w.width,this.intrinsicHeight=w.height}};function an(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var ar=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){let{element:i}=this;if(an(i))for(let[n,r]of Object.entries(e)){let e=`${t}${n}`;this.initial.has(e)||this.initial.set(e,i.style.getPropertyValue(e)),i.style.setProperty(e,"string"==typeof r?r:`${r}px`)}}remove(e,t=""){let{element:i}=this;if(an(i))for(let n of e){let e=`${t}${n}`;i.style.removeProperty(e)}}reset(){let{element:e}=this;if(an(e)){for(let[t,i]of this.initial)e.style.setProperty(t,i);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function as(e){return!!e&&(e instanceof sf(e).Element||sp(e)&&e.nodeType===Node.ELEMENT_NODE)}function aa(e){if(!e)return!1;let{KeyboardEvent:t}=sf(e.target);return e instanceof t}var al={};function ao(e){let t=null==al[e]?0:al[e]+1;return al[e]=t,`${e}-${t}`}var ad=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{let i=e.position.current;if(!i)return null;let{id:n}=t;return t.shape&&t.shape.containsPoint(i)?{id:n,value:1/ri.distance(t.shape.center,i),type:r1.PointerIntersection,priority:r0.High}:null})(e))?t:(({dragOperation:e,droppable:t})=>{let{shape:i}=e;if(!t.shape||!(null==i?void 0:i.current))return null;let n=i.current.intersectionArea(t.shape);if(n){let{position:r}=e,s=ri.distance(t.shape.center,r.current),a=n/(i.current.area+t.shape.area-n);return{id:t.id,value:a/s,type:r1.ShapeIntersection,priority:r0.Normal}}return null})(e)},au=e=>{let{dragOperation:t,droppable:i}=e,{shape:n,position:r}=t;if(!i.shape)return null;let s=n?rn.from(n.current.boundingRectangle).corners:void 0,a=rn.from(i.shape.boundingRectangle).corners.reduce((e,t,i)=>{var n;return e+ri.distance(ri.from(t),null!=(n=null==s?void 0:s[i])?n:r.current)},0);return{id:i.id,value:1/(a/4),type:r1.Collision,priority:r0.Normal}},ac=Object.create,ah=Object.defineProperty,ap=Object.defineProperties,af=Object.getOwnPropertyDescriptor,ag=Object.getOwnPropertyDescriptors,am=Object.getOwnPropertySymbols,av=Object.prototype.hasOwnProperty,ay=Object.prototype.propertyIsEnumerable,ax=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ab=e=>{throw TypeError(e)},aw=(e,t,i)=>t in e?ah(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,aj=(e,t)=>{for(var i in t||(t={}))av.call(t,i)&&aw(e,i,t[i]);if(am)for(var i of am(t))ay.call(t,i)&&aw(e,i,t[i]);return e},ak=(e,t)=>ah(e,"name",{value:t,configurable:!0}),aS=(e,t)=>{var i={};for(var n in e)av.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&am)for(var n of am(e))0>t.indexOf(n)&&ay.call(e,n)&&(i[n]=e[n]);return i},aN=e=>{var t;return[,,,ac(null!=(t=null==e?void 0:e[ax("metadata")])?t:null)]},aC=["class","method","getter","setter","accessor","field","value","get","set"],aO=e=>void 0!==e&&"function"!=typeof e?ab("Function expected"):e,aM=(e,t,i,n,r)=>({kind:aC[e],name:t,metadata:n,addInitializer:e=>i._?ab("Already initialized"):r.push(aO(e||null))}),aE=(e,t)=>aw(t,ax("metadata"),e[3]),aA=(e,t,i,n)=>{for(var r=0,s=e[t>>1],a=s&&s.length;r<a;r++)1&t?s[r].call(i):n=s[r].call(i,n);return n},aI=(e,t,i,n,r,s)=>{var a,l,o,d,u,c=7&t,h=!!(8&t),p=!!(16&t),f=c>3?e.length+1:c?h?1:2:0,g=aC[c+5],m=c>3&&(e[f-1]=[]),v=e[f]||(e[f]=[]),y=c&&(p||h||(r=r.prototype),c<5&&(c>3||!p)&&af(c<4?r:{get[i](){return aT(this,s)},set[i](x){return aW(this,s,x)}},i));c?p&&c<4&&ak(s,(c>2?"set ":c>1?"get ":"")+i):ak(r,i);for(var b=n.length-1;b>=0;b--)d=aM(c,i,o={},e[3],v),c&&(d.static=h,d.private=p,u=d.access={has:p?e=>aP(r,e):e=>i in e},3^c&&(u.get=p?e=>(1^c?aT:aR)(e,r,4^c?s:y.get):e=>e[i]),c>2&&(u.set=p?(e,t)=>aW(e,r,t,4^c?s:y.set):(e,t)=>e[i]=t)),l=(0,n[b])(c?c<4?p?s:y[g]:c>4?void 0:{get:y.get,set:y.set}:r,d),o._=1,4^c||void 0===l?aO(l)&&(c>4?m.unshift(l):c?p?s=l:y[g]=l:r=l):"object"!=typeof l||null===l?ab("Object expected"):(aO(a=l.get)&&(y.get=a),aO(a=l.set)&&(y.set=a),aO(a=l.init)&&m.unshift(a));return c||aE(e,r),y&&ah(r,i,y),p?4^c?s:y:r},aD=(e,t,i)=>t.has(e)||ab("Cannot "+i),aP=(e,t)=>Object(t)!==t?ab('Cannot use the "in" operator on this value'):e.has(t),aT=(e,t,i)=>(aD(e,t,"read from private field"),i?i.call(e):t.get(e)),az=(e,t,i)=>t.has(e)?ab("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),aW=(e,t,i,n)=>(aD(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i),aR=(e,t,i)=>(aD(e,t,"access private method"),i),a$={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},aL={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:i}){if(e)return i?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}},aB=["dragover","dragmove"],aF=class extends rL{constructor(e,t){let i,n,r,s;super(e);const{id:a,idPrefix:{description:l="dnd-kit-description",announcement:o="dnd-kit-announcement"}={},announcements:d=aL,screenReaderInstructions:u=a$,debounce:c=500}=null!=t?t:{},h=a?`${l}-${a}`:ao(l),p=a?`${o}-${a}`:ao(o),f=(e=s)=>{r&&e&&(null==r?void 0:r.nodeValue)!==e&&(r.nodeValue=e)},g=()=>sV.schedule(f),m=function(e,t){let i,n=()=>{clearTimeout(i),i=setTimeout(e,t)};return n.cancel=()=>clearTimeout(i),n}(g,c),v=Object.entries(d).map(([e,t])=>this.manager.monitor.addEventListener(e,(i,n)=>{let a=r;if(!a)return;let l=null==t?void 0:t(i,n);l&&a.nodeValue!==l&&(s=l,aB.includes(e)?m():(g(),m.cancel()))})),y=()=>{var e;let t=[];if(!(null==i?void 0:i.isConnected)){let n;e=u.draggable,(n=document.createElement("div")).id=h,n.style.setProperty("display","none"),n.textContent=e,i=n,t.push(i)}if(!(null==n?void 0:n.isConnected)){let e;(e=document.createElement("div")).id=p,e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.style.setProperty("position","fixed"),e.style.setProperty("width","1px"),e.style.setProperty("height","1px"),e.style.setProperty("margin","-1px"),e.style.setProperty("border","0"),e.style.setProperty("padding","0"),e.style.setProperty("overflow","hidden"),e.style.setProperty("clip","rect(0 0 0 0)"),e.style.setProperty("clip-path","inset(100%)"),e.style.setProperty("white-space","nowrap"),n=e,r=document.createTextNode(""),n.appendChild(r),t.push(n)}t.length>0&&document.body.append(...t)},b=new Set;function w(){for(let e of b)e()}this.registerEffect(()=>{var e;for(let t of(b.clear(),this.manager.registry.draggables.value)){let r=null!=(e=t.handle)?e:t.element;if(r){for(let e of(i&&n||b.add(y),(!["input","select","textarea","a","button"].includes(r.tagName.toLowerCase())||sj())&&!r.hasAttribute("tabindex")&&b.add(()=>r.setAttribute("tabindex","0")),r.hasAttribute("role")||"button"===r.tagName.toLowerCase()||b.add(()=>r.setAttribute("role","button")),r.hasAttribute("aria-roledescription")||b.add(()=>r.setAttribute("aria-roledescription","draggable")),r.hasAttribute("aria-describedby")||b.add(()=>r.setAttribute("aria-describedby",h)),["aria-pressed","aria-grabbed"])){let i=String(t.isDragging);r.getAttribute(e)!==i&&b.add(()=>r.setAttribute(e,i))}let e=String(t.disabled);r.getAttribute("aria-disabled")!==e&&b.add(()=>r.setAttribute("aria-disabled",e))}}b.size>0&&sV.schedule(w)}),this.destroy=()=>{super.destroy(),null==i||i.remove(),null==n||n.remove(),v.forEach(e=>e())}}},aU=new Map,aH=class extends(tp=rB,th=[n$],tc=[nL],tu=[nL],td=[nL],tp){constructor(e,t){super(e,t),aA(tg,5,this),az(this,tv),az(this,tf,new Set),az(this,tm,aA(tg,8,this,new Set)),aA(tg,11,this),this.registerEffect(aR(this,tv,ty))}register(e){return aT(this,tf).add(e),()=>{aT(this,tf).delete(e)}}addRoot(e){return i2(()=>{let t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{i2(()=>{let t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;let{source:t}=this.manager.dragOperation;return sN(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;let{target:t}=this.manager.dragOperation;return sN(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){let{status:e}=this.manager.dragOperation;return e.initializing||e.initialized?new Set([...[this.sourceRoot,this.targetRoot].filter(e=>null!=e),...this.additionalRoots]):new Set}};tg=aN(tp),tf=new WeakMap,tm=new WeakMap,tv=new WeakSet,ty=function(){let{roots:e}=this,t=[];for(let i of e)for(let e of aT(this,tf))t.push(aR(this,tv,tx).call(this,i,e));return()=>{for(let e of t)e()}},tx=function(e,t){let i=aU.get(e);i||(i=new Map,aU.set(e,i));let n=i.get(t);if(!n){let r=sg(e)?aR(this,tv,tb).call(this,e,i,t):aR(this,tv,tw).call(this,e,i,t);if(!r)return()=>{};n=r,i.set(t,n)}n.refCount++;let r=!1;return()=>{r||(r=!0,n.refCount--,0===n.refCount&&n.cleanup())}},tb=function(e,t,i){var n;let r=e.createElement("style"),{nonce:s}=null!=(n=this.options)?n:{};s&&r.setAttribute("nonce",s),r.textContent=i,e.head.prepend(r);let a=new MutationObserver(t=>{for(let i of t)for(let t of Array.from(i.removedNodes))if(t===r)return void e.head.prepend(r)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),r.remove(),t.delete(i),0===t.size&&aU.delete(e)}}},tw=function(e,t,i){"adoptedStyleSheets"in e&&Array.isArray(e.adoptedStyleSheets);let n=e.ownerDocument.defaultView,{CSSStyleSheet:r}=null!=n?n:{};if(!r)return null;let s=new r;return s.replaceSync(i),e.adoptedStyleSheets.push(s),{refCount:0,cleanup:()=>{var n;if(sS(e)&&(null==(n=e.host)?void 0:n.isConnected)){let t=e.adoptedStyleSheets.indexOf(s);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(i),0===t.size&&aU.delete(e)}}},aI(tg,4,"additionalRoots",th,aH,tm),aI(tg,2,"sourceRoot",tc,aH),aI(tg,2,"targetRoot",tu,aH),aI(tg,2,"roots",td,aH),aE(tg,aH),aH.configure=rR(aH);var aX=class extends rL{constructor(e,t){super(e,t),this.manager=e;const{cursor:i="grabbing"}=null!=t?t:{},n=e.registry.plugins.get(aH),r=null==n?void 0:n.register(`* { cursor: ${i} !important; }`);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}}},aV="data-dnd-",aY=`${aV}dropping`,aq="--dnd-",a_=`${aV}dragging`,aK=`${aV}placeholder`,aG=[a_,aK,"popover","aria-pressed","aria-grabbing"],aJ=["view-transition-name"],aZ=`
2
+ :is(:root,:host) [${a_}] {
3
+ position: fixed !important;
4
+ pointer-events: none !important;
5
+ touch-action: none;
6
+ z-index: calc(infinity);
7
+ will-change: translate;
8
+ top: var(${aq}top, 0px) !important;
9
+ left: var(${aq}left, 0px) !important;
10
+ right: unset !important;
11
+ bottom: unset !important;
12
+ width: var(${aq}width, auto);
13
+ max-width: var(${aq}width, auto);
14
+ height: var(${aq}height, auto);
15
+ max-height: var(${aq}height, auto);
16
+ transform: var(${aq}transform, none) !important;
17
+ transition: var(${aq}transition) !important;
18
+ }
19
+
20
+ :is(:root,:host) [${aK}] {
21
+ transition: none;
22
+ }
23
+
24
+ :is(:root,:host) [${aK}='hidden'] {
25
+ visibility: hidden;
26
+ }
27
+
28
+ [${a_}] * {
29
+ pointer-events: none !important;
30
+ }
31
+
32
+ [${a_}]:not([${aY}]) {
33
+ translate: var(${aq}translate) !important;
34
+ }
35
+
36
+ [${a_}][style*='${aq}scale'] {
37
+ scale: var(${aq}scale) !important;
38
+ transform-origin: var(${aq}transform-origin) !important;
39
+ }
40
+
41
+ @layer dnd-kit {
42
+ :where([${a_}][popover]) {
43
+ overflow: visible;
44
+ background: unset;
45
+ border: unset;
46
+ margin: unset;
47
+ padding: unset;
48
+ color: inherit;
49
+
50
+ &:is(input, button) {
51
+ border: revert;
52
+ background: revert;
53
+ }
54
+ }
55
+ }
56
+ [${a_}]::backdrop, [${aV}overlay]:not([${a_}]) {
57
+ display: none;
58
+ visibility: hidden;
59
+ }
60
+ `.replace(/\n+/g," ").replace(/\s+/g," ").trim();function aQ(e,t){return e===t||sI(e)===sI(t)}function a0(e){let{target:t}=e;"newState"in e&&"closed"===e.newState&&as(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>sF(t))}function a1(e){return"TR"===e.tagName}var a2=class extends(tk=rL,tj=[n$],tk){constructor(e,t){super(e,t),az(this,tC),az(this,tN,aA(tS,8,this)),aA(tS,11,this),this.state={initial:{},current:{}};const i=e.registry.plugins.get(aH),n=null==i?void 0:i.register(aZ);if(n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}this.registerEffect(aR(this,tC,tO).bind(this,i)),this.registerEffect(aR(this,tC,tM))}};tS=aN(tk),tN=new WeakMap,tC=new WeakSet,tO=function(e){let{overlay:t}=this;if(!t||!e)return;let i=sN(t);if(i)return e.addRoot(i)},tM=function(){var e,t,i,n,r,s,a,l;let o,d,u,{state:c,manager:h,options:p}=this,{dragOperation:f}=h,{position:g,source:m,status:v}=f;if(v.idle){c.current={},c.initial={};return}if(!m)return;let{element:y}=m,b=m.pluginConfig(a2),w=null!=(t=null!=(e=null==b?void 0:b.feedback)?e:null==p?void 0:p.feedback)?t:"default",j="function"==typeof w?w(m,h):w;if(!y||"none"===j||!v.initialized||v.initializing)return;let{initial:k}=c,S=null!=(i=this.overlay)?i:y,N=sQ(S),C=sQ(y),O=!aQ(y,S),M=new ai(y,{frameTransform:O?C:null,ignoreTransforms:!O}),E={x:C.scaleX/N.scaleX,y:C.scaleY/N.scaleY},{width:A,height:I,top:D,left:P}=M;O&&(A/=E.x,I/=E.y);let T=new ar(S),z=sK(y),{transition:W,translate:R,boxSizing:$,paddingBlockStart:L,paddingBlockEnd:B,paddingInlineStart:F,paddingInlineEnd:U,borderInlineStartWidth:H,borderInlineEndWidth:X,borderBlockStartWidth:V,borderBlockEndWidth:Y}=z,q=W.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),_=s1(z),K=z.transform,G="clone"===j,J="content-box"===$,Z=J?parseInt(F)+parseInt(U)+parseInt(H)+parseInt(X):0,Q=J?parseInt(L)+parseInt(B)+parseInt(V)+parseInt(Y):0,ee="move"===j||this.overlay?null:function(e,t="hidden"){return i2(()=>{let i,n,r,{element:s,manager:a}=e;if(!s||!a)return;let l=function(e,t){let i=new Map;for(let n of t)if(n.element&&(e===n.element||e.contains(n.element))){let e=`${aV}${ao("dom-id")}`;n.element.setAttribute(e,""),i.set(n,e)}return i}(s,a.registry.droppables),o=[],d=(i="input, textarea, select, canvas, [contenteditable]",n=s.cloneNode(!0),r=Array.from(s.querySelectorAll(i)),Array.from(n.querySelectorAll(i)).forEach((e,t)=>{let i=r[t];if(sO(e)&&sO(i)&&("file"!==e.type&&(e.value=i.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),sM(e)&&sM(i)&&i.width>0&&i.height>0){let t=e.getContext("2d");null==t||t.drawImage(i,0,0)}}),n),{remove:u}=d;return function(e,t,i){for(let[n,r]of e){if(!n.element)continue;let e=`[${r}]`,s=t.matches(e)?t:t.querySelector(e);if(n.element.removeAttribute(r),!s)continue;let a=n.element;n.proxy=s,s.removeAttribute(r),sE.set(a,s),i.push(()=>{sE.delete(a),n.proxy=void 0})}}(l,d,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(aK,t)}(d,t),d.remove=()=>{o.forEach(e=>e()),u.call(d)},d})}(m,G?"clone":"hidden"),et=i2(()=>aa(h.dragOperation.activatorEvent));if(!k.translate){if(this.overlay&&_)k.translate={x:_.x,y:_.y};else if("none"!==R){let e=s0(R);e&&(k.translate=e)}}if(!k.transformOrigin){let e=i2(()=>g.current),t=P+(null!=(n=null==_?void 0:_.x)?n:0),i=D+(null!=(r=null==_?void 0:_.y)?r:0);k.transformOrigin={x:(e.x-t*N.scaleX-N.x)/(A*N.scaleX),y:(e.y-i*N.scaleY-N.y)/(I*N.scaleY)}}let{transformOrigin:ei}=k,en=D*N.scaleY+N.y,er=P*N.scaleX+N.x;if(!k.coordinates&&(k.coordinates={x:er,y:en},1!==E.x||1!==E.y)){let{scaleX:e,scaleY:t}=C,{x:i,y:n}=ei;k.coordinates.x+=(A*e-A)*i,k.coordinates.y+=(I*t-I)*n}k.dimensions||(k.dimensions={width:A,height:I}),k.frameTransform||(k.frameTransform=N);let es={x:k.coordinates.x-er,y:k.coordinates.y-en},ea={width:(k.dimensions.width*k.frameTransform.scaleX-A*N.scaleX)*ei.x,height:(k.dimensions.height*k.frameTransform.scaleY-I*N.scaleY)*ei.y},el={x:es.x/N.scaleX+ea.width,y:es.y/N.scaleY+ea.height},eo={left:P+el.x,top:D+el.y};S.setAttribute(a_,"true");let ed=i2(()=>f.transform),eu=null!=(s=k.translate)?s:{x:0,y:0},ec=ed.x*N.scaleX+eu.x,eh=ed.y*N.scaleY+eu.y,ep=sk();T.set({width:A-Z,height:I-Q,top:eo.top+ep.y,left:eo.left+ep.x,translate:`${ec}px ${eh}px 0`,transform:this.overlay?"none":K,transition:q?`${q}, translate 0ms linear`:"translate 0ms linear",scale:O?`${E.x} ${E.y}`:"","transform-origin":`${100*ei.x}% ${100*ei.y}%`},aq),ee&&(y.insertAdjacentElement("afterend",ee),(null==p?void 0:p.rootElement)&&("function"==typeof p.rootElement?p.rootElement(m):p.rootElement).appendChild(y)),sB(S)&&(S.hasAttribute("popover")||S.setAttribute("popover","manual"),sF(S),S.addEventListener("beforetoggle",a0));let ef=(l={placeholder:ee,element:y,feedbackElement:S,frameTransform:N,transformOrigin:ei,width:A,height:I,top:D,left:P,widthOffset:Z,heightOffset:Q,delta:el,styles:T,dragOperation:f,getTranslate:()=>c.current.translate,getElementMutationObserver:()=>o,getSavedCellWidths:()=>u,setSavedCellWidths:e=>{u=e}},new ResizeObserver(()=>{var e,t,i;let n=new ai(l.placeholder,{frameTransform:l.frameTransform,ignoreTransforms:!0}),r=null!=(e=l.transformOrigin)?e:{x:1,y:1},s=(l.width-n.width)*r.x+l.delta.x,a=(l.height-n.height)*r.y+l.delta.y,o=sk();if(l.styles.set({width:n.width-l.widthOffset,height:n.height-l.heightOffset,top:l.top+a+o.y,left:l.left+s+o.x},aq),null==(t=l.getElementMutationObserver())||t.takeRecords(),a1(l.element)&&a1(l.placeholder)){let e=Array.from(l.element.cells),t=Array.from(l.placeholder.cells);for(let[i,n]of(l.getSavedCellWidths()||l.setSavedCellWidths(e.map(e=>e.style.width)),e.entries())){let e=t[i];n.style.width=`${e.getBoundingClientRect().width}px`}}let d=null!=(i=l.getTranslate())?i:{x:0,y:0},u=l.left+s+o.x+d.x,c=l.top+a+o.y+d.y,h=n.width-l.widthOffset,p=n.height-l.heightOffset,f=l.frameTransform;l.dragOperation.shape=new rn(u*f.scaleX+f.x,c*f.scaleY+f.y,h*f.scaleX,p*f.scaleY)})),eg=new ai(S);i2(()=>f.shape=eg);let em=sf(S),ev=e=>{this.manager.actions.stop({event:e})},ey=sC(em);if(et&&em.addEventListener("resize",ev),"idle"===i2(()=>m.status)&&requestAnimationFrame(()=>m.status="dragging"),ee){let e,t;ef.observe(ee),(e=new MutationObserver(e=>{let t=!1;for(let i of e){if(i.target!==y){t=!0;continue}if("attributes"!==i.type)continue;let e=i.attributeName;if(e.startsWith("aria-")||aG.includes(e))continue;let n=y.getAttribute(e);if("style"===e){if(an(y)&&an(ee)){let e=y.style;for(let t of Array.from(ee.style))""===e.getPropertyValue(t)&&ee.style.removeProperty(t);for(let t of Array.from(e)){if(aJ.includes(t)||t.startsWith(aq))continue;let i=e.getPropertyValue(t);ee.style.setProperty(t,i)}}}else null!==n?ee.setAttribute(e,n):ee.removeAttribute(e)}t&&G&&ee.replaceChildren(...y.cloneNode(!0).childNodes)})).observe(y,{attributes:!0,subtree:!0,childList:!0}),o=e,(t=new MutationObserver(e=>{for(let t of e)if(0!==t.addedNodes.length)for(let e of Array.from(t.addedNodes)){if(e.contains(y)&&y.nextElementSibling!==ee){y.insertAdjacentElement("afterend",ee),sF(S);return}if(e.contains(ee)&&ee.previousElementSibling!==y){ee.insertAdjacentElement("beforebegin",y),sF(S);return}}y.isConnected&&ee.isConnected&&y.nextElementSibling!==ee&&(y.insertAdjacentElement("afterend",ee),sF(S))})).observe(y.ownerDocument.body,{childList:!0,subtree:!0}),d=t}let ex=null==(a=h.dragOperation.source)?void 0:a.id,eb=()=>{var e;if(!et||null==ex)return;let t=h.registry.draggables.get(ex),i=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;sm(i)&&i.focus()},ew=()=>{var e;if(null==o||o.disconnect(),null==d||d.disconnect(),ef.disconnect(),em.removeEventListener("resize",ev),sB(S)&&(S.removeEventListener("beforetoggle",a0),S.removeAttribute("popover")),S.removeAttribute(a_),T.reset(),u&&a1(y))for(let[t,i]of Array.from(y.cells).entries())i.style.width=null!=(e=u[t])?e:"";m.status="idle";let t=null!=c.current.translate,i=f.status.dragging;ee&&(!i&&t||ee.parentElement!==S.parentElement)&&S.isConnected&&ee.replaceWith(S),null==ee||ee.remove()},ej=null==p?void 0:p.dropAnimation,ek=this,eS=nF(()=>{var e,t,i;let{transform:n,status:r}=f;if((n.x||n.y||c.current.translate)&&r.dragging){let r=null!=(e=k.translate)?e:{x:0,y:0},s={x:n.x/N.scaleX+r.x,y:n.y/N.scaleY+r.y},a=c.current.translate,l=i2(()=>f.modifiers),d=i2(()=>{var e;return null==(e=f.shape)?void 0:e.current}),u=null==p?void 0:p.keyboardTransition,h=et&&!ey&&null!==u?`${null!=(t=null==u?void 0:u.duration)?t:250}ms ${null!=(i=null==u?void 0:u.easing)?i:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(T.set({transition:q?`${q}, translate ${h}`:`translate ${h}`,translate:`${s.x}px ${s.y}px 0`},aq),null==o||o.takeRecords(),d&&d!==eg&&a&&!l.length){let e=ri.delta(s,a);f.shape=rn.from(d.boundingRectangle).translate(e.x*N.scaleX,e.y*N.scaleY)}else f.shape=new ai(S);c.current.translate=s}},function(){if(f.status.dropped){this.dispose(),m.status="dropping";let e=(null==b?void 0:b.dropAnimation)!==void 0?b.dropAnimation:void 0!==ek.dropAnimation?ek.dropAnimation:ej,t=c.current.translate,i=null!=t;if(t||y===S||(t={x:0,y:0}),!t||null===e)return void ew();h.renderer.rendering.then(()=>{!function(e){var t,i,n,r;let{animation:s}=e;if("function"==typeof s)return Promise.resolve(s({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved})).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)});let{duration:a=250,easing:l="ease"}=null!=s?s:{};sF(e.feedbackElement);let[,o]=null!=(t=su(e.feedbackElement,e=>"translate"in e))?t:[];null==o||o.pause();let d=null!=(i=e.placeholder)?i:e.element,u={frameTransform:aQ(e.feedbackElement,d)?null:void 0},c=new ai(e.feedbackElement,u),h=null!=(n=s0(sK(e.feedbackElement).translate))?n:e.translate,p=new ai(d,u),f=rn.delta(c,p,e.alignment),g={x:h.x-f.x,y:h.y-f.y},m=Math.round(c.intrinsicHeight)!==Math.round(p.intrinsicHeight)?{minHeight:[`${c.intrinsicHeight}px`,`${p.intrinsicHeight}px`],maxHeight:[`${c.intrinsicHeight}px`,`${p.intrinsicHeight}px`]}:{},v=Math.round(c.intrinsicWidth)!==Math.round(p.intrinsicWidth)?{minWidth:[`${c.intrinsicWidth}px`,`${p.intrinsicWidth}px`],maxWidth:[`${c.intrinsicWidth}px`,`${p.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},aq),e.feedbackElement.setAttribute(aY,""),null==(r=e.getElementMutationObserver())||r.takeRecords(),s8({element:e.feedbackElement,keyframes:ap(aj(aj({},m),v),ag({translate:[`${h.x}px ${h.y}px 0`,`${g.x}px ${g.y}px 0`]})),options:{duration:sC(sf(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:l}}).then(()=>{e.feedbackElement.removeAttribute(aY),null==o||o.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:m,element:y,feedbackElement:S,placeholder:ee,translate:t,moved:i,transition:W,alignment:m.alignment,styles:T,animation:null!=e?e:void 0,getElementMutationObserver:()=>o,cleanup:ew,restoreFocus:eb})})}});return()=>{ew(),eS()}},aI(tS,4,"overlay",tj,a2,tN),aE(tS,a2),a2.configure=rR(a2),tI=[n$],tD=s2.Forward,tE=[n$],tA=s2.Reverse;var a4=class{constructor(){az(this,tT,aA(tP,8,this,!0)),aA(tP,11,this),az(this,tz,aA(tP,12,this,!0)),aA(tP,15,this)}isLocked(e){return e!==s2.Idle&&(null==e?!0===this[s2.Forward]&&!0===this[s2.Reverse]:!0===this[e])}unlock(e){e!==s2.Idle&&(this[e]=!1)}};tP=aN(null),tT=new WeakMap,tz=new WeakMap,aI(tP,4,tD,tI,a4,tT),aI(tP,4,tA,tE,a4,tz),aE(tP,a4);var a3=[s2.Forward,s2.Reverse],a5=class{constructor(){this.x=new a4,this.y=new a4}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},a6=class extends rL{constructor(e){super(e);const t=nn(new a5);let i=null;this.signal=t,nh(()=>{let{status:n}=e.dragOperation;if(!n.initialized){i=null,t.value=new a5;return}let{delta:r}=e.dragOperation.position;if(i){let e={x:a8(r.x,i.x),y:a8(r.y,i.y)},n=t.peek();i0(()=>{for(let t of rl)for(let i of a3)e[t]===i&&n[t].unlock(i);t.value=n})}i=r})}get current(){return this.signal.peek()}};function a8(e,t){return Math.sign(e-t)}var a7=class extends(tR=rB,tW=[n$],tR){constructor(e){super(e),az(this,tL,aA(t$,8,this,!1)),aA(t$,11,this),az(this,tB),az(this,tF,()=>{if(!aT(this,tB))return;let{element:e,by:t}=aT(this,tB);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var i;if(this.disabled)return!1;let n=this.getScrollableElements();if(!n)return aW(this,tB,void 0),!1;let{position:r}=this.manager.dragOperation,s=null==r?void 0:r.current;if(s){let{by:r}=null!=e?e:{},a=r?{x:a9(r.x),y:a9(r.y)}:void 0,l=a?void 0:this.scrollIntentTracker.current;if(null==l?void 0:l.isLocked())return!1;for(let e of n){let n=function(e,t){let{isTop:i,isBottom:n,isLeft:r,isRight:s,position:a}=sH(e),{x:l,y:o}=null!=t?t:{x:0,y:0},d=!i&&a.current.y+o>0,u=!n&&a.current.y+o<a.max.y,c=!r&&a.current.x+l>0,h=!s&&a.current.x+l<a.max.x;return{top:d,bottom:u,left:c,right:h,x:c||h,y:d||u}}(e,r);if(n.x||n.y){let{speed:n,direction:o}=function(e,t,i,n=25,r=s4,s=s3){let{x:a,y:l}=t,{rect:o,isTop:d,isBottom:u,isLeft:c,isRight:h}=sH(e),p=sQ(e),f=s1(sK(e,!0)),g=null!==f&&(null==f?void 0:f.scaleX)<0,m=null!==f&&(null==f?void 0:f.scaleY)<0,v=new rn(o.left*p.scaleX+p.x,o.top*p.scaleY+p.y,o.width*p.scaleX,o.height*p.scaleY),y={x:0,y:0},b={x:0,y:0},w={height:v.height*r.y,width:v.width*r.x};return w.height>0&&(!d||m&&!u)&&l<=v.top+w.height&&(null==i?void 0:i.y)!==1&&a>=v.left-s.x&&a<=v.right+s.x?(y.y=m?1:-1,b.y=n*Math.abs((v.top+w.height-l)/w.height)):w.height>0&&(!u||m&&!d)&&l>=v.bottom-w.height&&(null==i?void 0:i.y)!==-1&&a>=v.left-s.x&&a<=v.right+s.x&&(y.y=m?-1:1,b.y=n*Math.abs((v.bottom-w.height-l)/w.height)),w.width>0&&(!h||g&&!c)&&a>=v.right-w.width&&(null==i?void 0:i.x)!==-1&&l>=v.top-s.y&&l<=v.bottom+s.y?(y.x=g?-1:1,b.x=n*Math.abs((v.right-w.width-a)/w.width)):w.width>0&&(!c||g&&!h)&&a<=v.left+w.width&&(null==i?void 0:i.x)!==1&&l>=v.top-s.y&&l<=v.bottom+s.y&&(y.x=g?1:-1,b.x=n*Math.abs((v.left+w.width-a)/w.width)),{direction:y,speed:b}}(e,s,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold);if(l)for(let e of rl)l[e].isLocked(o[e])&&(n[e]=0,o[e]=0);if(o.x||o.y){let{x:t,y:s}=null!=r?r:o,a=t*n.x,l=s*n.y;if(a||l){let t=null==(i=aT(this,tB))?void 0:i.by;if(this.autoScrolling&&t&&(t.x&&!a||t.y&&!l))continue;return aW(this,tB,{element:e,by:{x:a,y:l}}),sV.schedule(aT(this,tF)),!0}}}}}return aW(this,tB,void 0),!1};let t=null,i=null;const n=nW(()=>{let{position:i,source:n}=e.dragOperation;if(!i)return null;let r=function e(t,{x:i,y:n}){var r;let s=t.elementFromPoint(i,n);if((null==(r=s)?void 0:r.tagName)==="IFRAME"){let{contentDocument:t}=s;if(t){let{left:r,top:a}=s.getBoundingClientRect();return e(t,{x:i-r,y:n-a})}}return s}(sN(null==n?void 0:n.element),i.current);return r&&(t=r),null!=r?r:t}),r=nW(()=>{let t=n.value,{documentElement:r}=sy(t);if(!t||t===r){let{target:t}=e.dragOperation,n=null==t?void 0:t.element;if(n){let e=sZ(n,{excludeElement:!1});return i=e,e}}if(t){let e=sZ(t,{excludeElement:!1});return this.autoScrolling&&i&&e.size<(null==i?void 0:i.size)?i:(i=e,e)}return i=null,null},nR);this.getScrollableElements=()=>r.value,this.scrollIntentTracker=new a6(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&aa(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function a9(e){return e>0?s2.Forward:e<0?s2.Reverse:s2.Idle}t$=aN(tR),tL=new WeakMap,tB=new WeakMap,tF=new WeakMap,aI(t$,4,"autoScrolling",tW,a7,tL),aE(t$,a7);var le=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{let{tasks:e,resolvers:t}=this;for(let t of(this.pending=!1,this.tasks=new Set,this.resolvers=new Set,e))t();for(let e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),lt=class extends rL{constructor(e,t){super(e,t);const i=e.registry.plugins.get(a7);if(!i)throw Error("AutoScroller plugin depends on Scroller plugin");this.destroy=nh(()=>{var t,n,r;if(this.disabled)return;let{position:s,status:a}=e.dragOperation;if(a.dragging){let e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(n=this.options)?void 0:n.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(r=this.options)?void 0:r.threshold};if(i.scroll(void 0,e)){i.autoScrolling=!0;let t=setInterval(()=>le.schedule(()=>i.scroll(void 0,e)),10);return()=>{clearInterval(t)}}i.autoScrolling=!1}})}};lt.configure=rR(lt);var li={capture:!0,passive:!0},ln=class extends rB{constructor(e){super(e),az(this,tU),this.handleScroll=()=>{null==aT(this,tU)&&aW(this,tU,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),aW(this,tU,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=nh(()=>{var e,i,n;if(t.status.dragging){let r=null!=(n=null==(i=null==(e=t.source)?void 0:e.element)?void 0:i.ownerDocument)?n:document;return r.addEventListener("scroll",this.handleScroll,li),()=>{r.removeEventListener("scroll",this.handleScroll,li)}}})}};tU=new WeakMap;var lr=class extends rL{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(aH),i=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=nh(()=>{let{dragOperation:e}=this.manager;if(e.status.initialized)return ls(),document.addEventListener("selectionchange",ls,{capture:!0}),()=>{document.removeEventListener("selectionchange",ls,{capture:!0})}}),i){const e=this.destroy.bind(this);this.destroy=()=>{i(),e()}}}};function ls(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var la=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var i;let n=null!=(i=t.handle)?i:t.element;return e.target!==n}}),ll=class extends r3{constructor(e,t){super(e),this.manager=e,this.options=t,az(this,tH,[]),this.listeners=new sA,this.handleSourceKeyDown=(e,t,i)=>{if(this.disabled||e.defaultPrevented||!as(e.target)||t.disabled)return;let{keyboardCodes:n=la.keyboardCodes,preventActivation:r=la.preventActivation}=null!=i?i:{};!n.start.includes(e.code)||!this.manager.dragOperation.status.idle||null!=r&&r(e,t)||this.handleStart(e,t,i)}}bind(e,t=this.options){return nh(()=>{var i;let n=null!=(i=e.handle)?i:e.element,r=i=>{aa(i)&&this.handleSourceKeyDown(i,e,t)};if(n)return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}})}handleStart(e,t,i){let{element:n}=t;if(!n)throw Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),s5(n);let{center:r}=new ai(n);if(this.manager.actions.start({event:e,coordinates:{x:r.x,y:r.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();let s=sy(n),a=[this.listeners.bind(s,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,i),options:{capture:!0}}])];aT(this,tH).push(...a)}handleKeyDown(e,t,i){let{keyboardCodes:n=la.keyboardCodes}=null!=i?i:{};if(lo(e,[...n.end,...n.cancel])){e.preventDefault();let t=lo(e,n.cancel);this.handleEnd(e,t);return}lo(e,n.up)?this.handleMove("up",e):lo(e,n.down)&&this.handleMove("down",e),lo(e,n.left)?this.handleMove("left",e):lo(e,n.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var i,n;let{shape:r}=this.manager.dragOperation,s=t.shiftKey?5:1,a={x:0,y:0},l=null!=(n=null==(i=this.options)?void 0:i.offset)?n:la.offset;if("number"==typeof l&&(l={x:l,y:l}),r){switch(e){case"up":a={x:0,y:-l.y*s};break;case"down":a={x:0,y:l.y*s};break;case"left":a={x:-l.x*s,y:0};break;case"right":a={x:l.x*s,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){let e=this.manager.registry.plugins.get(lt);(null==e?void 0:e.disabled)===!1&&(e.disable(),aT(this,tH).push(()=>{e.enable()}))}cleanup(){aT(this,tH).forEach(e=>e()),aW(this,tH,[])}destroy(){this.cleanup(),this.listeners.clear()}};function lo(e,t){return t.includes(e.code)}tH=new WeakMap,ll.configure=rR(ll),ll.defaults=la;var ld=class extends r6{constructor(){super(...arguments),az(this,tX)}onEvent(e){switch(e.type){case"pointerdown":aW(this,tX,sb(e));break;case"pointermove":if(!aT(this,tX))return;let{x:t,y:i}=sb(e),n={x:t-aT(this,tX).x,y:i-aT(this,tX).y},{tolerance:r}=this.options;if(r&&rs(n,r))return void this.abort();rs(n,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){aW(this,tX,void 0)}};tX=new WeakMap;var lu=class extends r6{constructor(){super(...arguments),az(this,tV),az(this,tY)}onEvent(e){switch(e.type){case"pointerdown":aW(this,tY,sb(e)),aW(this,tV,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!aT(this,tY))return;let{x:t,y:i}=sb(e);rs({x:t-aT(this,tY).x,y:i-aT(this,tY).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){aT(this,tV)&&(clearTimeout(aT(this,tV)),aW(this,tY,void 0),aW(this,tV,void 0))}};tV=new WeakMap,tY=new WeakMap;var lc=class{};lc.Delay=lu,lc.Distance=ld;var lh=Object.freeze({activationConstraints(e,t){var i;let{pointerType:n,target:r}=e;if(!("mouse"===n&&as(r)&&(t.handle===r||(null==(i=t.handle)?void 0:i.contains(r)))))return"touch"===n?[new lc.Delay({value:250,tolerance:5})]:function(e){var t;if(!as(e))return!1;let{tagName:i}=e;return"INPUT"===i||"TEXTAREA"===i||(t=e).hasAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable")}(r)&&!e.defaultPrevented?[new lc.Delay({value:200,tolerance:0})]:[new lc.Delay({value:200,tolerance:10}),new lc.Distance({value:5})]},preventActivation(e,t){var i;let{target:n}=e;return!(n===t.element||n===t.handle||!as(n)||(null==(i=t.handle)?void 0:i.contains(n)))&&!!n.closest(`
61
+ input:not([disabled]),
62
+ select:not([disabled]),
63
+ textarea:not([disabled]),
64
+ button:not([disabled]),
65
+ a[href],
66
+ [contenteditable]:not([contenteditable="false"])
67
+ `)}}),lp=class extends r3{constructor(e,t){super(e),this.manager=e,this.options=t,az(this,tq,new Set),this.listeners=new sA,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{let{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,i=this.options){let{activationConstraints:n=lh.activationConstraints}=null!=i?i:{};return"function"==typeof n?n(e,t):n}bind(e,t=this.options){return nh(()=>{var i,n;let r=new AbortController,{signal:s}=r,a=i=>{(function(e){if(!e)return!1;let{PointerEvent:t}=sf(e.target);return e instanceof t})(i)&&this.handlePointerDown(i,e,t)},l=[null!=(i=e.handle)?i:e.element];for(let i of((null==t?void 0:t.activatorElements)&&(l=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e)),l)){i&&(!(n=i.ownerDocument.defaultView)||lm.has(n)||(n.addEventListener("touchmove",lg,{capture:!1,passive:!1}),lm.add(n)),i.addEventListener("pointerdown",a,{signal:s}))}return()=>r.abort()})}handlePointerDown(e,t,i){if(this.disabled||!e.isPrimary||0!==e.button||!as(e.target)||t.disabled||"sensor"in e||!this.manager.dragOperation.status.idle)return;let{preventActivation:n=lh.preventActivation}=null!=i?i:{};if(null==n?void 0:n(e,t))return;let{target:r}=e,s=sm(r)&&r.draggable&&"true"===r.getAttribute("draggable"),a=sQ(t.element),{x:l,y:o}=sb(e);this.initialCoordinates={x:l*a.scaleX+a.x,y:o*a.scaleY+a.y};let d=this.activationConstraints(e,t,i);e.sensor=this;let u=new r5(d,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;let c=function e(t=document,i=new Set){if(i.has(t))return[];i.add(t);let n=[t];for(let r of Array.from(t.querySelectorAll("iframe, frame")))try{let t=r.contentDocument;t&&!i.has(t)&&n.push(...e(t,i))}catch(e){}try{let r=t.defaultView;if(r&&r!==window.top){let s=r.parent;s&&s.document&&s.document!==t&&n.push(...e(s.document,i))}}catch(e){}return n}(),h=this.listeners.bind(c,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:s?this.handleCancel:lf,options:{capture:!0}}]),p=()=>{h(),this.initialCoordinates=void 0};aT(this,tq).add(p)}handlePointerMove(e,t){var i,n;if((null==(i=this.controller)?void 0:i.activated)===!1){null==(n=this.controller)||n.onEvent(e);return}if(this.manager.dragOperation.status.dragging){let i=sb(e),n=sQ(t.element);i.x=i.x*n.scaleX+n.x,i.y=i.y*n.scaleY+n.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=i,sV.schedule(this.handleMove)}}handlePointerUp(e){let{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();let i=!t.initialized;this.manager.actions.stop({event:e,canceled:i})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){let{manager:i,initialCoordinates:n}=this;if(!n||!i.dragOperation.status.idle||t.defaultPrevented)return;if(i.actions.start({coordinates:n,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();let r=sy(t.target).body;try{r.setPointerCapture(t.pointerId)}catch(e){this.handleCancel(t);return}let s=as(t.target)?[t.target,r]:r,a=this.listeners.bind(s,[{type:"touchmove",listener:lf,options:{passive:!1}},{type:"click",listener:lf},{type:"contextmenu",listener:lf},{type:"keydown",listener:this.handleKeyDown}]);aT(this,tq).add(a)}handleCancel(e){let{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){let{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},aT(this,tq).forEach(e=>e()),aT(this,tq).clear()}destroy(){this.cleanup(),this.listeners.clear()}};function lf(e){e.preventDefault()}function lg(){}tq=new WeakMap,lp.configure=rR(lp),lp.defaults=lh;var lm=new WeakSet,lv=[],ly=[aF,lt,aX,a2,lr],lx=[lp,ll],lb=class extends si{constructor(e={}){const t=st(e.plugins,ly),i=st(e.sensors,lx),n=st(e.modifiers,lv);super(((e,t)=>ap(e,ag(t)))(aj({},e),{plugins:[ln,a7,aH,...t],sensors:i,modifiers:n}))}},lw=class extends(tG=r_,tK=[n$],t_=[n$],tG){constructor(e,t){var{element:i,effects:n=()=>[],handle:r}=e;super(aj({effects:()=>[...n(),()=>{var e,t;let{manager:i}=this;if(!i)return;let n=(null!=(t=null==(e=this.sensors)?void 0:e.map(r$))?t:[...i.sensors]).map(e=>{let t=e instanceof r3?e:i.registry.register(e.plugin),n=e instanceof r3?void 0:e.options;return t.bind(this,n)});return function(){n.forEach(e=>e())}}]},aS(e,["element","effects","handle"])),t),az(this,tZ,aA(tJ,8,this)),aA(tJ,11,this),az(this,tQ,aA(tJ,12,this)),aA(tJ,15,this),this.element=i,this.handle=r}};tJ=aN(tG),tZ=new WeakMap,tQ=new WeakMap,aI(tJ,4,"handle",tK,lw,tZ),aI(tJ,4,"element",t_,lw,tQ),aE(tJ,lw);var lj=class extends(t2=rK,t1=[n$],t0=[n$],t2){constructor(e,t){var{element:i,effects:n=()=>[]}=e,r=aS(e,["element","effects"]);const{collisionDetector:s=ad}=r,a=e=>{let{manager:t,element:i}=this;if(!i||null===e){this.shape=void 0;return}if(!t)return;let n=new ai(i),r=i2(()=>this.shape);return n&&(null==r?void 0:r.equals(n))?r:(this.shape=n,n)},l=nn(!1);super(((e,t)=>ap(e,ag(t)))(aj({},r),{collisionDetector:s,effects:()=>[...n(),()=>{let{element:e,manager:t}=this;if(!t)return;let{dragOperation:i}=t,{source:n}=i;l.value=!!(n&&i.status.initialized&&e&&!this.disabled&&this.accepts(n))},()=>{let{element:e}=this;if(l.value&&e){let t=new sL(e,a);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),az(this,t7),az(this,t3,aA(t4,8,this)),aA(t4,11,this),az(this,t9,aA(t4,12,this)),aA(t4,15,this),this.element=i,this.refreshShape=()=>a()}set element(e){aW(this,t7,e,t8)}get element(){var e;return null!=(e=this.proxy)?e:aT(this,t7,t6)}};t4=aN(t2),t3=new WeakMap,t7=new WeakSet,t9=new WeakMap,t6=(t5=aI(t4,20,"#element",t1,t7,t3)).get,t8=t5.set,aI(t4,4,"proxy",t0,lj,t9),aE(t4,lj);var lk=e.i(106206);function lS(e){var t;if(null!=e)return null!=e&&"object"==typeof e&&"current"in e?null!=(t=e.current)?t:void 0:e}var lN="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement?im.useLayoutEffect:im.useEffect;function lC(e,t){e()}function lO(e){let t=(0,im.useRef)(e);return lN(()=>{t.current=e},[e]),t}function lM(e,t,i=im.useEffect,n=Object.is){let r=(0,im.useRef)(e);i(()=>{let i=r.current;n(e,i)||(r.current=e,t(e,i))},[t,e])}function lE(e,t){let i=(0,im.useRef)(lS(e));lN(()=>{let n=lS(e);n!==i.current&&(i.current=n,t(n))})}var lA=Object.getOwnPropertySymbols,lI=Object.prototype.hasOwnProperty,lD=Object.prototype.propertyIsEnumerable,lP=new lb,lT=(0,im.createContext)(lP),lz=(0,im.memo)((0,im.forwardRef)(({children:e},t)=>{let[i,n]=(0,im.useState)(0),r=(0,im.useRef)(null),s=(0,im.useRef)(null),a=(0,im.useMemo)(()=>({renderer:{get rendering(){var e;return null!=(e=r.current)?e:Promise.resolve()}},trackRendering(e){r.current||(r.current=new Promise(e=>{s.current=e})),(0,im.startTransition)(()=>{e(),n(e=>e+1)})}}),[]);return lN(()=>{var e;null==(e=s.current)||e.call(s),r.current=null},[e,i]),(0,im.useImperativeHandle)(t,()=>a),null})),lW=[void 0,nR];function lR(e){let t;var i,{children:n,onCollision:r,onBeforeDragStart:s,onDragStart:a,onDragMove:l,onDragOver:o,onDragEnd:d}=e,u=((e,t)=>{var i={};for(var n in e)lI.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&lA)for(var n of lA(e))0>t.indexOf(n)&&lD.call(e,n)&&(i[n]=e[n]);return i})(e,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);let c=(0,im.useRef)(null),{plugins:h,modifiers:p,sensors:f}=u,g=st(h,ly),m=st(f,lx),v=st(p,lv),y=lO(s),b=lO(a),w=lO(o),j=lO(l),k=lO(d),S=lO(r),N=(i=()=>{var e;return null!=(e=u.manager)?e:new lb(u)},(t=(0,im.useRef)(null)).current||(t.current=i()),(0,im.useInsertionEffect)(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current);return(0,im.useEffect)(()=>{if(!c.current)throw Error("Renderer not found");let{renderer:e,trackRendering:t}=c.current,{monitor:i}=N;N.renderer=e;let n=[i.addEventListener("beforedragstart",e=>{let i=y.current;i&&t(()=>i(e,N))}),i.addEventListener("dragstart",e=>{var t;return null==(t=b.current)?void 0:t.call(b,e,N)}),i.addEventListener("dragover",e=>{let i=w.current;i&&t(()=>i(e,N))}),i.addEventListener("dragmove",e=>{let i=j.current;i&&t(()=>i(e,N))}),i.addEventListener("dragend",e=>{let i=k.current;i&&t(()=>i(e,N))}),i.addEventListener("collision",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,N)})];return()=>n.forEach(e=>e())},[N]),lM(g,()=>N&&(N.plugins=g),...lW),lM(m,()=>N&&(N.sensors=m),...lW),lM(v,()=>N&&(N.modifiers=v),...lW),(0,ig.jsxs)(lT.Provider,{value:N,children:[(0,ig.jsx)(lz,{ref:c,children:n}),n]})}var l$=Object.create,lL=Object.defineProperty,lB=Object.getOwnPropertyDescriptor,lF=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),lU=e=>{throw TypeError(e)},lH=["class","method","getter","setter","accessor","field","value","get","set"],lX=e=>void 0!==e&&"function"!=typeof e?lU("Function expected"):e,lV=(e,t,i,n,r)=>({kind:lH[e],name:t,metadata:n,addInitializer:e=>i._?lU("Already initialized"):r.push(lX(e||null))}),lY=(e,t,i,n,r,s)=>{for(var a,l,o,d=7&t,u=lH[d+5],c=e[2]||(e[2]=[]),h=lB(r=r.prototype,i),p=n.length-1;p>=0;p--)(o=lV(d,i,l={},e[3],c)).static=!1,o.private=!1,(o.access={has:e=>i in e}).get=e=>e[i],a=(0,n[p])(h[u],o),l._=1,lX(a)&&(h[u]=a);return h&&lL(r,i,h),r},lq=(e,t,i)=>t.has(e)||lU("Cannot "+i),l_=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,i){return new e(t.x-i.x,t.y-i.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:i}){return new e(t,i)}},lK=class extends(ii=nU,it=[nL],ie=[nL],ii){constructor(e){super(l_.from(e),(e,t)=>l_.equals(e,t)),((e,t,i,n)=>{for(var r=0,s=e[t>>1],a=s&&s.length;r<a;r++)s[r].call(i)})(is,5,this),((e,t,i)=>t.has(e)?lU("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i))(this,ir,0),this.velocity={x:0,y:0}}get delta(){return l_.delta(this.current,this.initial)}get direction(){let{current:e,previous:t}=this;if(!t)return null;let i={x:e.x-t.x,y:e.y-t.y};return i.x||i.y?Math.abs(i.x)>Math.abs(i.y)?i.x>0?"right":"left":i.y>0?"down":"up":null}get current(){return super.current}set current(e){let t,{current:i}=this,n=l_.from(e),r={x:n.x-i.x,y:n.y-i.y},s=Date.now(),a=s-(lq(this,t=ir,"read from private field"),t.get(this)),l=e=>Math.round(e/a*100);i0(()=>{let e;lq(this,e=ir,"write to private field"),e.set(this,s),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(l_.from(e)),this.velocity={x:0,y:0}}};is=[,,,l$(null!=(u=null==ii?void 0:ii[lF("metadata")])?u:null)],ir=new WeakMap,lY(is,2,"delta",it,lK),lY(is,2,"direction",ie,lK),c=is,t=lF("metadata"),i=c[3],t in lK?lL(lK,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):lK[t]=i;var lG=((h=lG||{}).Horizontal="x",h.Vertical="y",h);Object.values(lG);var lJ=Object.create,lZ=Object.defineProperty,lQ=Object.defineProperties,l0=Object.getOwnPropertyDescriptor,l1=Object.getOwnPropertyDescriptors,l2=Object.getOwnPropertySymbols,l4=Object.prototype.hasOwnProperty,l3=Object.prototype.propertyIsEnumerable,l5=e=>{throw TypeError(e)},l6=(e,t,i)=>t in e?lZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,l8=(e,t)=>{for(var i in t||(t={}))l4.call(t,i)&&l6(e,i,t[i]);if(l2)for(var i of l2(t))l3.call(t,i)&&l6(e,i,t[i]);return e},l7=["class","method","getter","setter","accessor","field","value","get","set"],l9=e=>void 0!==e&&"function"!=typeof e?l5("Function expected"):e,oe=(e,t,i,n,r)=>({kind:l7[e],name:t,metadata:n,addInitializer:e=>i._?l5("Already initialized"):r.push(l9(e||null))}),ot=(e,t,i,n)=>{for(var r=0,s=e[t>>1],a=s&&s.length;r<a;r++)1&t?s[r].call(i):n=s[r].call(i,n);return n},oi=(e,t,i,n,r,s)=>{for(var a,l,o,d,u,c=7&t,h=e.length+1,p=l7[c+5],f=e[h-1]=[],g=e[h]||(e[h]=[]),m=(r=r.prototype,l0({get[i](){return or(this,s)},set[i](x){return oa(this,s,x)}},i)),v=n.length-1;v>=0;v--)(d=oe(c,i,o={},e[3],g)).static=!1,d.private=!1,(u=d.access={has:e=>i in e}).get=e=>e[i],u.set=(e,t)=>e[i]=t,l=(0,n[v])({get:m.get,set:m.set},d),o._=1,void 0===l?l9(l)&&(m[p]=l):"object"!=typeof l||null===l?l5("Object expected"):(l9(a=l.get)&&(m.get=a),l9(a=l.set)&&(m.set=a),l9(a=l.init)&&f.unshift(a));return m&&lZ(r,i,m),r},on=(e,t,i)=>t.has(e)||l5("Cannot "+i),or=(e,t,i)=>(on(e,t,"read from private field"),t.get(e)),os=(e,t,i)=>t.has(e)?l5("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),oa=(e,t,i,n)=>(on(e,t,"write to private field"),t.set(e,i),i);function ol(e){return e instanceof oM||e instanceof oO}var oo=class extends rL{constructor(e){super(e);const t=nh(()=>{let{dragOperation:t}=e;if(aa(t.activatorEvent)&&ol(t.source)&&t.status.initialized){let t=e.registry.plugins.get(a7);if(t)return t.disable(),()=>t.enable()}}),i=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;let{dragOperation:i}=t;if(!aa(e.nativeEvent)||!ol(i.source)||!i.shape)return;let{actions:n,collisionObserver:r,registry:s}=t,{by:a}=e;if(!a)return;let l=function(e){let{x:t,y:i}=e;return t>0?"right":t<0?"left":i>0?"down":i<0?"up":void 0}(a),{source:o,target:d}=i,{center:u}=i.shape.current,c=[],h=[];i0(()=>{for(let e of s.droppables){let{id:t}=e;if(!e.accepts(o)||t===(null==d?void 0:d.id)&&ol(e)||!e.element)continue;let i=e.shape,n=new ai(e.element,{getBoundingClientRect:e=>sx(e,void 0,.2)});n.height&&n.width&&("down"==l&&u.y+10<n.center.y||"up"==l&&u.y-10>n.center.y||"left"==l&&u.x-10>n.center.x||"right"==l&&u.x+10<n.center.x)&&(c.push(e),e.shape=n,h.push(()=>e.shape=i))}}),e.preventDefault(),r.disable();let p=r.computeCollisions(c,au);i0(()=>h.forEach(e=>e()));let[f]=p;if(!f)return;let{id:g}=f,{index:m,group:v}=o.sortable;n.setDropTarget(g).then(()=>{let{source:e,target:t,shape:s}=i;if(!e||!ol(e)||!s)return;let{index:a,group:l,target:o}=e.sortable,d=m!==a||v!==l,u=d?o:null==t?void 0:t.element;if(!u)return;s5(u);let c=new ai(u);if(!c)return;let h=rn.delta(c,rn.from(s.current.boundingRectangle),e.alignment);n.move({by:h}),d?n.setDropTarget(e.id).then(()=>r.enable()):r.enable()})})});this.destroy=()=>{i(),t()}}},od=Object.defineProperty,ou=Object.defineProperties,oc=Object.getOwnPropertyDescriptors,oh=Object.getOwnPropertySymbols,op=Object.prototype.hasOwnProperty,of=Object.prototype.propertyIsEnumerable,og=(e,t,i)=>t in e?od(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,om=(e,t)=>{for(var i in t||(t={}))op.call(t,i)&&og(e,i,t[i]);if(oh)for(var i of oh(t))of.call(t,i)&&og(e,i,t[i]);return e};function ov(e,t,i){if(t===i)return e;let n=e.slice();return n.splice(i,0,n.splice(t,1)[0]),n}function oy(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}var ox="__default__";function ob(e,t,i,n){i.insertAdjacentElement(n<t?"afterend":"beforebegin",e)}function ow(e,t){return e.index-t.index}function oj(e){return Array.from(e).sort(ow)}var ok=[oo,class extends rL{constructor(e){super(e);const t=()=>{let t=new Map;for(let i of e.registry.droppables)if(i instanceof oM){let{sortable:e}=i,{group:n}=e,r=t.get(n);r||(r=new Set,t.set(n,r)),r.add(e)}for(let[e,i]of t)t.set(e,new Set(oj(i)));return t},i=[e.monitor.addEventListener("dragover",(e,i)=>{if(this.disabled)return;let{dragOperation:n}=i,{source:r,target:s}=n;if(!ol(r)||!ol(s)||r.sortable===s.sortable)return;let a=t(),l=r.sortable.group===s.sortable.group,o=a.get(r.sortable.group),d=l?o:a.get(s.sortable.group);o&&d&&queueMicrotask(()=>{e.defaultPrevented||i.renderer.rendering.then(()=>{var n,u,c;let h=t();for(let[e,t]of a.entries())for(let[i,r]of Array.from(t).entries())if(r.index!==i||r.group!==e||!(null==(n=h.get(e))?void 0:n.has(r)))return;let p=r.sortable.element,f=s.sortable.element;if(!f||!p||!l&&s.id===r.sortable.group)return;let g=oj(o),m=l?g:oj(d),v=null!=(u=r.sortable.group)?u:ox,y=null!=(c=s.sortable.group)?c:ox,b={[v]:g,[y]:m},w=function(e,t,i){var n,r,s;let a,l,{source:o,target:d,canceled:u}=t.operation;if(!o||!d||u)return"preventDefault"in t&&t.preventDefault(),e;let c=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){let n=e.findIndex(e=>c(e,o.id)),r=e.findIndex(e=>c(e,d.id));if(-1===n||-1===r){if(oy(o)){let n=o.initialIndex,r=o.index;return n===r||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):i(e,n,r)}return e}if(!u&&"index"in o&&"number"==typeof o.index){let t=o.index;if(t!==n)return i(e,n,t)}return i(e,n,r)}let h=Object.entries(e),p=-1,f=-1;for(let[e,t]of h)if(-1===p&&-1!==(p=t.findIndex(e=>c(e,o.id)))&&(a=e),-1===f&&-1!==(f=t.findIndex(e=>c(e,d.id)))&&(l=e),-1!==p&&-1!==f)break;if(-1===p&&oy(o)){let n=o.initialGroup,r=o.initialIndex,s=o.group,a=o.index;if(null==n||null==s||!(n in e)||!(s in e)||n===s&&r===a)return"preventDefault"in t&&t.preventDefault(),e;if(n===s)return ou(om({},e),oc({[n]:i(e[n],r,a)}));let l=e[n][r];return ou(om({},e),oc({[n]:[...e[n].slice(0,r),...e[n].slice(r+1)],[s]:[...e[s].slice(0,a),l,...e[s].slice(a)]}))}if(!o.manager)return e;let{dragOperation:g}=o.manager,m=null!=(r=null==(n=g.shape)?void 0:n.current.center)?r:g.position.current;if(null==l&&d.id in e){let t=d.shape&&m.y>d.shape.center.y?e[d.id].length:0;l=d.id,f=t}if(null==a||null==l||a===l&&p===f){if(null!=a&&a===l&&p===f&&oy(o)){let t=null!=o.group&&o.group!==a,n=o.index!==p;if(t||n){let t=null!=(s=o.group)?s:a;if(t in e){if(a===t)return ou(om({},e),oc({[a]:i(e[a],p,o.index)}));let n=e[a][p];return ou(om({},e),oc({[a]:[...e[a].slice(0,p),...e[a].slice(p+1)],[t]:[...e[t].slice(0,o.index),n,...e[t].slice(o.index)]}))}}}return"preventDefault"in t&&t.preventDefault(),e}if(a===l)return ou(om({},e),oc({[a]:i(e[a],p,f)}));let v=+!!(d.shape&&Math.round(m.y)>Math.round(d.shape.center.y)),y=e[a][p];return ou(om({},e),oc({[a]:[...e[a].slice(0,p),...e[a].slice(p+1)],[l]:[...e[l].slice(0,f+v),y,...e[l].slice(f+v)]}))}(b,e,ov);if(b===w)return;let j=w[y].indexOf(r.sortable),k=w[y].indexOf(s.sortable);i.collisionObserver.disable(),ob(p,j,f,k),i0(()=>{for(let[e,t]of w[v].entries())t.index=e;if(!l)for(let[e,t]of w[y].entries())t.group=s.sortable.group,t.index=e}),i.actions.setDropTarget(r.id).then(()=>i.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,i)=>{if(!e.canceled)return;let{dragOperation:n}=i,{source:r}=n;ol(r)&&(r.sortable.initialIndex!==r.sortable.index||r.sortable.initialGroup!==r.sortable.group)&&queueMicrotask(()=>{let e=t(),n=e.get(r.sortable.initialGroup);n&&i.renderer.rendering.then(()=>{for(let[t,i]of e.entries())for(let[e,n]of Array.from(i).entries())if(n.index!==e||n.group!==t)return;let t=oj(n),i=r.sortable.element,s=t[r.sortable.initialIndex],a=null==s?void 0:s.element;s&&a&&i&&(ob(i,s.index,a,r.index),i0(()=>{for(let[t,i]of e.entries())for(let e of Array.from(i).values())e.index=e.initialIndex,e.group=e.initialGroup}))})})})];this.destroy=()=>{for(let e of i)e()}}}],oS={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},oN=new nX;il=[n$],ia=[n$];var oC=class{constructor(e,t){os(this,id,ot(io,8,this)),ot(io,11,this),os(this,iu),os(this,ic),os(this,ih,ot(io,12,this)),ot(io,15,this),os(this,ip),this.register=()=>(i0(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{i0(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{i0(()=>{this.droppable.destroy(),this.draggable.destroy()})};var{effects:i=()=>[],group:n,index:r,sensors:s,type:a,transition:l=oS,plugins:o}=e,d=((e,t)=>{var i={};for(var n in e)l4.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&l2)for(var n of l2(e))0>t.indexOf(n)&&l3.call(e,n)&&(i[n]=e[n]);return i})(e,["effects","group","index","sensors","type","transition","plugins"]);const u=st(o,ok);this.droppable=new oM(d,t,this),this.draggable=new oO(((e,t)=>lQ(e,l1(t)))(l8({},d),{plugins:u,effects:()=>[()=>{var e,t,i;let n=null==(e=this.manager)?void 0:e.dragOperation.status;(null==n?void 0:n.initializing)&&this.id===(null==(i=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:i.id)&&oN.clear(this.manager),(null==n?void 0:n.dragging)&&oN.set(this.manager,this.id,i2(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{let{index:e,group:t,manager:i}=this,n=or(this,ic),r=or(this,iu);(e!==n||t!==r)&&(oa(this,ic,e),oa(this,iu,t),this.animate())},()=>{var e,t;let{target:i}=this,{isDragSource:n}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(a2))?void 0:e.feedback)?t:"default")&&n&&(this.droppable.disabled=!i)},...i()],type:a,sensors:s}),t,this),oa(this,ip,d.element),this.manager=t,this.index=r,oa(this,ic,r),this.group=n,oa(this,iu,n),this.type=a,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=oN.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=oN.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){i2(()=>{let{manager:e,transition:t}=this,{shape:i}=this.droppable;if(!e)return;let{idle:n}=e.dragOperation.status;i&&t&&(!n||t.idle)&&e.renderer.rendering.then(()=>{let{element:n}=this;if(!n)return;for(let e of n.getAnimations())"transitionProperty"in e&&("transform"===e.transitionProperty||"translate"===e.transitionProperty||"scale"===e.transitionProperty)&&e.cancel();let r=this.refreshShape();if(!r)return;let s={x:i.boundingRectangle.left-r.boundingRectangle.left,y:i.boundingRectangle.top-r.boundingRectangle.top},{translate:a}=sK(n),l=s7(n,a,!1),o=s7(n,a);if(s.x||s.y){let i=sC(sf(n))?lQ(l8({},t),l1({duration:0})):t;s8({element:n,keyframes:{translate:[`${l.x+s.x}px ${l.y+s.y}px ${l.z}`,`${o.x}px ${o.y}px ${o.z}`]},options:i}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){i0(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){i0(()=>{let t=or(this,ip),i=this.droppable.element,n=this.draggable.element;i&&i!==t||(this.droppable.element=e),n&&n!==t||(this.draggable.element=e),oa(this,ip,e)})}get element(){var e,t;let i=or(this,ip);if(i)return null!=(t=null!=(e=sE.get(i))?e:i)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set plugins(e){this.draggable.plugins=st(e,ok)}set disabled(e){i0(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){i0(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){this.droppable.id=e,this.draggable.id=e}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:ad}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){i0(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};io=[,,,lJ(null)],id=new WeakMap,iu=new WeakMap,ic=new WeakMap,ih=new WeakMap,ip=new WeakMap,oi(io,4,"index",il,oC,id),oi(io,4,"group",ia,oC,ih),p=io,l6(oC,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),p[3]);var oO=class extends lw{constructor(e,t,i){super(e,t),this.sortable=i}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},oM=class extends lj{constructor(e,t,i){super(e,t),this.sortable=i}get index(){return this.sortable.index}get group(){return this.sortable.group}},oE=Object.defineProperty,oA=Object.defineProperties,oI=Object.getOwnPropertyDescriptors,oD=Object.getOwnPropertySymbols,oP=Object.prototype.hasOwnProperty,oT=Object.prototype.propertyIsEnumerable,oz=(e,t,i)=>t in e?oE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,oW=(e,t)=>{for(var i in t||(t={}))oP.call(t,i)&&oz(e,i,t[i]);if(oD)for(var i of oD(t))oT.call(t,i)&&oz(e,i,t[i]);return e};function oR(e,t,i){return"isDragSource"===e&&!i&&!!t}var o$=e.i(137340),oL=e.i(668667);function oB({task:e,index:t,workspaceId:i,onRetry:n,onCancel:r,onEdit:s,onDelete:a,tTask:l}){let o="pending"===e.status,d=o||"running"===e.status||"reviewing"===e.status||"retrying"===e.status,u=o||d,{ref:c,isDragging:h}=function(e){let t,i,n,{accept:r,collisionDetector:s,collisionPriority:a,id:l,data:o,element:d,handle:u,index:c,group:h,disabled:p,modifiers:f,sensors:g,target:m,type:v,plugins:y}=e,b=oW(oW({},oS),e.transition),w=function(e){var t;let i=null!=(t=(0,im.useContext)(lT))?t:void 0,[n]=(0,im.useState)(()=>e(i));return n.manager!==i&&(n.manager=i),lN(n.register,[i,n]),n}(t=>new oC(oA(oW({},e),oI({transition:b,register:!1,handle:lS(u),element:lS(d),target:lS(m)})),t)),j=(t=(0,im.useRef)(new Map),i=(0,im.useState)(0)[1],n=(0,im.useCallback)(()=>{i(e=>e+1)},[i]),lN(()=>w?nh(()=>{var e;let i=!1,r=!1;for(let n of t.current){let[s]=n,a=i2(()=>n[1]),l=w[s];a!==l&&(i=!0,t.current.set(s,l),r=null!=(e=null==oR?void 0:oR(s,a,l))&&e)}i&&(r?queueMicrotask(()=>(0,lk.flushSync)(n)):n())}):void t.current.clear(),[w]),(0,im.useMemo)(()=>w?new Proxy(w,{get(e,i){let n=e[i];return t.current.set(i,n),n}}):w,[w]));return lM(l,()=>w.id=l),lN(()=>{i0(()=>{w.group=h,w.index=c})},[w,h,c]),lM(v,()=>w.type=v),lM(r,()=>w.accept=r,void 0,nR),lM(o,()=>o&&(w.data=o)),lM(c,()=>{var e;(null==(e=w.manager)?void 0:e.dragOperation.status.idle)&&(null==b?void 0:b.idle)&&w.refreshShape()},lC),lE(u,e=>w.handle=e),lE(d,e=>w.element=e),lE(m,e=>w.target=e),lM(p,()=>w.disabled=!0===p),lM(g,()=>w.sensors=g),lM(s,()=>w.collisionDetector=s),lM(a,()=>w.collisionPriority=a),lM(y,()=>w.plugins=y,void 0,nR),lM(b,()=>w.transition=b,void 0,nR),lM(f,()=>w.modifiers=f,void 0,nR),lM(e.alignment,()=>w.alignment=e.alignment),{sortable:j,get isDragging(){return j.isDragging},get isDropping(){return j.isDropping},get isDragSource(){return j.isDragSource},get isDropTarget(){return j.isDropTarget},handleRef:(0,im.useCallback)(e=>{w.handle=null!=e?e:void 0},[w]),ref:(0,im.useCallback)(e=>{var t,i;(e||null==(t=w.element)||!t.isConnected||(null==(i=w.manager)?void 0:i.dragOperation.status.idle))&&(w.element=null!=e?e:void 0)},[w]),sourceRef:(0,im.useCallback)(e=>{var t,i;(e||null==(t=w.source)||!t.isConnected||(null==(i=w.manager)?void 0:i.dragOperation.status.idle))&&(w.source=null!=e?e:void 0)},[w]),targetRef:(0,im.useCallback)(e=>{var t,i;(e||null==(t=w.target)||!t.isConnected||(null==(i=w.manager)?void 0:i.dragOperation.status.idle))&&(w.target=null!=e?e:void 0)},[w])}}({id:e.id,index:t,disabled:!u});return(0,ig.jsxs)("div",{ref:c,className:["inline-flex items-center gap-2 px-2.5 py-1.5 rounded-lg border bg-card group transition-colors hover:bg-accent/30 shrink-0",h&&"opacity-50 shadow-lg scale-105",!u&&"opacity-70"].filter(Boolean).join(" "),style:{cursor:u?"grab":"default"},children:[(0,ig.jsx)(iP.AgentIcon,{agentId:e.agentConfigId,className:"h-6 w-6 shrink-0 rounded"}),(0,ig.jsx)("span",{className:"text-sm min-w-0 shrink",children:e.title}),(0,ig.jsx)(iO.Badge,{variant:iG[e.status],className:"text-[10px] shrink-0",children:l(`status.${e.status}`)}),(0,ig.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[o&&(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>s(e),children:(0,ig.jsx)(iL.Pencil,{className:"h-3 w-3"})}),(o||"cancelled"===e.status||"done"===e.status)&&(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>a(i,e.id),children:(0,ig.jsx)(o$.Trash2,{className:"h-3 w-3"})}),"failed"===e.status&&(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>n(i,e.id),children:(0,ig.jsx)(iz.RotateCcw,{className:"h-3 w-3"})}),d&&(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>r(i,e.id),children:(0,ig.jsx)(oL.XCircle,{className:"h-3 w-3"})})]})]})}function oF({issue:e,workspaceId:t,issueTasks:i,t:n,tTask:r,retryTask:s,cancelTask:a,reorderTasks:l,deleteTask:o,onEditTask:d}){let u=async(e,t)=>{await o(e,t)};return(0,ig.jsxs)("div",{className:"shrink-0 p-4 pb-2 max-h-[180px] overflow-y-auto",children:[(0,ig.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,ig.jsx)("h3",{className:"text-sm font-medium",children:n("detail.tasks",{count:i.length})})}),0===i.length?(0,ig.jsx)("div",{className:"text-sm text-muted-foreground",children:n("detail.noTasks")}):(0,ig.jsx)(lR,{onDragEnd:n=>{if(n.canceled)return;let r=n.operation?.source,s=n.operation?.target;if(!r||!s||r.id===s.id)return;let a=i.map(e=>e.id),o=a.indexOf(String(r.id)),d=a.indexOf(String(s.id));if(-1===o||-1===d)return;let u=Array.from(a),[c]=u.splice(o,1);u.splice(d,0,c),l(t,e.id,u)},children:(0,ig.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1 scrollbar-thin",children:i.map((e,i)=>(0,ig.jsx)(oB,{task:e,index:i,workspaceId:t,onRetry:s,onCancel:a,onEdit:d,onDelete:u,tTask:r},e.id))})})]})}var oU=e.i(650654),oH=e.i(992764),oX=e.i(159619),oV=e.i(307858),oY=e.i(938306),oq=e.i(951841);function o_({comment:e,expanded:t,workspaceId:i,replies:n=[],replying:r=!1,onDelete:s,onUpdate:a,onExpandedChange:l,onReplyStart:o,onReplyCancel:d,onReplySubmit:u}){let[c,h]=(0,im.useState)(!1),[p,f]=(0,im.useState)(e.content),[g,m]=(0,im.useState)(!0),[v,y]=(0,im.useState)(!1),[b,w]=(0,im.useState)(!1),j=(0,im.useRef)(null),k=(0,im.useRef)(null),S="user"===e.senderId,N=(0,iw.useAgentStore)(e=>e.agents),C=S?void 0:N.find(t=>t.id===e.senderId),O=(0,iq.useChannelStore)(e=>e.setActiveChannel),M=(0,iq.useChannelStore)(e=>e.loadMessages),E=e.metadata?.channelId,A=e.metadata?.messageId,I=e.metadata?.phase,D=e.metadata?.taskId,P=(0,iv.useTranslations)("issue"),T=(0,iv.useTranslations)("common");(0,im.useEffect)(()=>{f(e.content),h(!1)},[e.id,e.content]),(0,im.useEffect)(()=>{let e=k.current;e&&w(e.scrollHeight>300)},[e.content,t]);let z=S?T("you"):C?.name||e.senderId,W=(0,oq.useUserAvatar)();(0,im.useEffect)(()=>{c&&j.current&&(j.current.focus(),j.current.setSelectionRange(p.length,p.length))},[c,p.length]);let R=async()=>{await navigator.clipboard.writeText(e.content),y(!0),setTimeout(()=>y(!1),1500)},$=async()=>{E&&A&&(O(E),await M(i,E),window.setTimeout(()=>{document.getElementById(`msg-${A}`)?.scrollIntoView({block:"center",behavior:"smooth"})},80))},L=()=>{let t=p.trim();if(!t||t===e.content){h(!1),f(e.content);return}a(i,e.id,t),h(!1)},B=!!(u&&A),F=[e.senderRole,e.metadata?.model,I?.replace("_"," "),D?P("message.task",{taskId:D.slice(0,8)}):void 0].filter(e=>!!e);return(0,ig.jsx)("div",{className:"group p-4",children:(0,ig.jsxs)("div",{className:"flex gap-3",children:[(0,ig.jsx)(iP.AgentIcon,{agentId:S?void 0:e.senderId,name:z,avatarUrl:S&&W||void 0,className:"size-7 rounded-full"}),(0,ig.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ig.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-1",children:[(0,ig.jsx)("span",{className:"text-sm font-medium",children:z}),(0,ig.jsx)("span",{className:"text-xs text-muted-foreground",children:new Date(e.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),F.map(e=>(0,ig.jsx)(iO.Badge,{variant:"secondary",className:"h-4 px-1.5 text-[10px]",children:e},e))]}),c?(0,ig.jsx)("textarea",{ref:j,value:p,onChange:e=>f(e.target.value),onKeyDown:t=>{"Enter"!==t.key||t.shiftKey||(t.preventDefault(),L()),"Escape"===t.key&&(h(!1),f(e.content))},onBlur:L,className:"mt-2 w-full min-h-[70px] resize-none rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-ring"}):(0,ig.jsxs)("div",{className:"relative",children:[(0,ig.jsx)("div",{ref:k,className:`mt-1 text-sm leading-relaxed whitespace-pre-wrap break-words ${!t?"max-h-[300px] overflow-hidden":""}`,children:e.content}),b&&!t&&(0,ig.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-background to-transparent flex items-end justify-center pb-1",children:(0,ig.jsx)(iC.Button,{variant:"ghost",size:"sm",className:"h-6 text-xs text-muted-foreground hover:text-foreground",onClick:()=>{l?.(e.id,!0)},children:P("message.expandMore")})}),t&&b&&(0,ig.jsx)(iC.Button,{variant:"ghost",size:"sm",className:"h-6 mt-1 text-xs text-muted-foreground hover:text-foreground",onClick:()=>{l?.(e.id,!1)},children:P("message.collapse")})]}),(0,ig.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[B?(0,ig.jsxs)(iC.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-xs",onClick:()=>o?.(e.id),children:[(0,ig.jsx)(oY.MessageCircle,{className:"size-3"}),"回复"]}):null,n.length>0?(0,ig.jsxs)(iC.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-xs",onClick:()=>m(e=>!e),children:[g?(0,ig.jsx)(oU.ChevronDown,{className:"size-3"}):(0,ig.jsx)(oH.ChevronRight,{className:"size-3"}),g?"隐藏":"显示"," ",n.length," 条回复"]}):null,E&&A?(0,ig.jsxs)(iC.Button,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-xs text-muted-foreground",onClick:$,children:[(0,ig.jsx)(oV.ExternalLink,{className:"size-3"}),P("message.openMessage")]}):null,!c&&(0,ig.jsxs)("div",{className:"flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{h(!0),f(e.content)},children:(0,ig.jsx)(iL.Pencil,{className:"h-3 w-3"})}),(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:R,children:v?(0,ig.jsx)(iH.Check,{className:"h-3 w-3 text-green-500"}):(0,ig.jsx)(oX.Copy,{className:"h-3 w-3"})}),(0,ig.jsx)(iC.Button,{variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",onClick:()=>s(e.id),children:(0,ig.jsx)(o$.Trash2,{className:"h-3 w-3"})})]})]}),r?(0,ig.jsxs)("div",{className:"relative pl-8 pt-3",children:[(0,ig.jsx)("div",{className:"absolute left-4 top-0 h-full w-px bg-border"}),(0,ig.jsx)(ik.ChatComposerInput,{workspaceId:i,agents:N.filter(e=>!1!==e.enabled),placeholder:"回复此消息",onSubmit:(t,i,n)=>{t&&u?.(e.id,t,i,n)},replyLabel:z,onCancelReply:d,initialMentionAgentId:S?void 0:e.senderId,enableAutoMode:!1,enableAgentResources:!1,disableMentionSuggestions:!S})]}):null,g&&n.length>0?(0,ig.jsx)("div",{className:"space-y-0",children:n.map(e=>(0,ig.jsx)(oK,{reply:e,level:1},e.id))}):null]})]})})}function oK({reply:e,level:t}){var i;let n=(0,iv.useTranslations)("common"),r=(0,iw.useAgentStore)(e=>e.agents),s=(0,oq.useUserAvatar)(),a="user"===e.senderId,l=a?void 0:r.find(t=>t.id===e.senderId),o=a?n("you"):l?.name||e.senderRole||e.senderId;return(0,ig.jsxs)("div",{className:"relative pl-8 pt-3",children:[(0,ig.jsx)("div",{className:"absolute left-4 top-0 h-full w-px bg-border"}),(0,ig.jsxs)("div",{className:"flex gap-3",children:[(0,ig.jsx)(iP.AgentIcon,{agentId:a?void 0:e.senderId,name:o,avatarUrl:a&&s||void 0,className:"size-7 rounded-full"}),(0,ig.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ig.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[(0,ig.jsx)("span",{className:"text-sm font-medium",children:o}),(0,ig.jsx)("span",{className:"text-xs text-muted-foreground",children:new Date(e.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),(0,ig.jsxs)(iO.Badge,{variant:"secondary",className:"h-4 px-1.5 text-[10px]",children:["L",t]}),e.senderRole?(0,ig.jsx)(iO.Badge,{variant:"secondary",className:"h-4 px-1.5 text-[10px]",children:e.senderRole}):null]}),(0,ig.jsx)("p",{className:"mt-1 whitespace-pre-wrap break-words text-sm leading-relaxed",children:(i=e.content,/<[a-z][\s\S]*>/i.test(i)?i.replace(/<[^>]*>/g,""):i)})]})]})]})}var oG=e.i(249673);function oJ({comments:e,onNavigate:t}){let[i,n]=(0,im.useState)(null),[r,s]=(0,im.useState)(!1),[a,l]=(0,im.useState)(0),o=(0,im.useRef)(null),d=(0,iv.useTranslations)("common"),u=(0,im.useCallback)(e=>{n(e),t(e)},[t]),c=(0,im.useCallback)((e,t)=>{if(!t||!o.current)return;n(e);let i=o.current.getBoundingClientRect(),r=t.getBoundingClientRect();l(r.top-i.top+r.height/2)},[]);return 0===e.length?null:(0,ig.jsxs)("div",{ref:o,className:"absolute right-2 top-1/2 -translate-y-1/2 z-10 flex flex-col items-center",onMouseEnter:()=>s(!0),onMouseLeave:()=>{s(!1),n(null)},children:[(0,ig.jsx)("button",{className:`flex-shrink-0 mb-0.5 flex items-center justify-center size-5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-all ${r?"opacity-100":"opacity-0 pointer-events-none"} ${null===i||i<=0?"invisible":""}`,onClick:()=>{null!==i&&i>0&&u(i-1)},children:(0,ig.jsx)(oG.ChevronUp,{className:"size-3.5"})}),(0,ig.jsx)("div",{className:"flex-1 w-full max-h-[50vh] overflow-y-auto scrollbar-none",children:(0,ig.jsx)("div",{className:"flex flex-col gap-[3px] px-1 py-0.5",children:e.map((e,t)=>(0,ig.jsx)("div",{className:"flex justify-center",children:(0,ig.jsx)("button",{className:`h-[4px] rounded-full transition-all duration-150 ${i===t?"bg-primary w-6":"user"===e.senderId?"bg-primary/30 hover:bg-primary/50 w-5":"bg-muted-foreground/25 hover:bg-muted-foreground/40 w-5"}`,onClick:()=>u(t),onMouseEnter:e=>c(t,e.currentTarget)})},e.id))})}),(0,ig.jsx)("button",{className:`flex-shrink-0 mt-0.5 flex items-center justify-center size-5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-all ${r?"opacity-100":"opacity-0 pointer-events-none"} ${null===i||i>=e.length-1?"invisible":""}`,onClick:()=>{null!==i&&i<e.length-1&&u(i+1)},children:(0,ig.jsx)(oU.ChevronDown,{className:"size-3.5"})}),r&&null!==i&&(0,ig.jsxs)("div",{className:"absolute right-full mr-3 w-56 rounded-lg border bg-popover p-2.5 shadow-lg z-50 animate-in fade-in-0 zoom-in-95 duration-75",style:{top:a,transform:"translateY(-50%)"},children:[(0,ig.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[(0,ig.jsx)("span",{className:"font-medium text-xs",children:"user"===e[i].senderId?d("you"):(0,iw.findAgentById)(e[i].senderId)?.name??e[i].senderId}),(0,ig.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(e[i].createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),(0,ig.jsxs)("p",{className:"text-xs text-muted-foreground line-clamp-3 leading-relaxed",children:[e[i].content.slice(0,150),e[i].content.length>150?"...":""]})]})]})}function oZ({issue:e,workspaceId:t,comments:i,expandedCommentIds:n,commentsViewportRef:r,commentRefs:s,onDeleteComment:a,onUpdateComment:l,onExpandedChange:o,scrollToComment:d,t:u}){let[c,h]=(0,im.useState)(null),p=(0,iq.useChannelStore)(e=>e.messages),f=(0,iq.useChannelStore)(e=>e.loadMessages),g=(0,iq.useChannelStore)(e=>e.sendMessage),m=(0,iq.useChannelStore)(e=>e.addMessage),v=(0,iq.useChannelStore)(e=>e.updateMessage),y=(0,iq.useChannelStore)(e=>e.deleteMessage),b=e.channelId;(0,im.useEffect)(()=>{b&&f(t,b)},[t,b,f]),(0,im.useEffect)(()=>{if(!b)return;let e=(0,iN.getWS)(t),i=e.on("channel.message",e=>{e.channelId===b&&m(b,e)}),n=e.on("channel.message.updated",e=>{e.channelId===b&&v(b,e)}),r=e.on("channel.message.deleted",e=>{e.channelId===b&&y(b,e.messageId)});return()=>{i(),n(),r()}},[t,b,m,v,y]);let w=(0,im.useMemo)(()=>{let e=p[b];return new Map((Array.isArray(e)?e:[]).map(e=>[e.id,e]))},[p,b]),j=(0,im.useCallback)((e,n,r,s)=>{let a=i.find(t=>t.id===e),l=a?.metadata?.messageId;b&&l&&(g(t,b,n,r,s,l),h(null))},[i,t,b,g]);return(0,ig.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col border-t",children:[(0,ig.jsx)("div",{className:"shrink-0 px-4 pt-2",children:(0,ig.jsx)("h3",{className:"text-sm font-medium mb-3",children:u("detail.comments",{count:i.length})})}),(0,ig.jsx)("div",{className:"flex-1 min-h-0 relative",children:i.length>0?(0,ig.jsxs)(ig.Fragment,{children:[(0,ig.jsxs)("div",{ref:r,className:"h-full overflow-y-auto",children:[i.map(e=>(0,ig.jsx)("div",{ref:t=>{t?s.current.set(e.id,t):s.current.delete(e.id)},children:(0,ig.jsx)(o_,{comment:e,expanded:n.has(e.id),workspaceId:t,replies:w.get(e.metadata?.messageId??"")?.replies??[],replying:c===e.id,onDelete:a,onUpdate:l,onExpandedChange:o,onReplyStart:h,onReplyCancel:()=>h(null),onReplySubmit:j})},e.id)),(0,ig.jsx)("div",{className:"h-20 pointer-events-none"})]}),(0,ig.jsx)(oJ,{comments:i,onNavigate:d})]}):null})]})}var oQ=e.i(812057),o0=e.i(191118),o1=e.i(14452),o2=e.i(529658),o4=e.i(929709),o3=e.i(592039),o5=e.i(230698);function o6({issue:e,workspaceId:t,open:i,onOpenChange:n,issueTasks:r,members:s,enabledAgents:a,onAddMembers:l,onDeleteIssue:o,t:d}){let[u,c]=(0,im.useState)(!1),h=new Set(s),p=a.filter(e=>!h.has(e.id)).map(e=>({id:e.id,label:(0,iS.getAgentDisplayName)(e),description:e.role}));return(0,ig.jsxs)(o1.Sheet,{open:i,onOpenChange:n,children:[(0,ig.jsxs)(o1.SheetContent,{side:"right",className:"w-80 p-0 gap-0",children:[(0,ig.jsxs)(o1.SheetHeader,{className:"sr-only",children:[(0,ig.jsx)(o1.SheetTitle,{children:d("detail.tabInfo")}),(0,ig.jsx)(o1.SheetDescription,{children:e.title})]}),(0,ig.jsxs)("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[(0,ig.jsx)(o3.CircleDot,{className:"size-4 text-muted-foreground shrink-0"}),(0,ig.jsx)("span",{className:"text-sm font-medium truncate",children:e.title})]}),(0,ig.jsxs)(oQ.Tabs,{defaultValue:"info",className:"flex flex-col flex-1 min-h-0",children:[(0,ig.jsxs)(oQ.TabsList,{className:"w-full rounded-none border-b bg-transparent h-9 p-0 shrink-0",children:[(0,ig.jsxs)(oQ.TabsTrigger,{value:"info",className:"flex-1 gap-1.5 data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-primary rounded-none",children:[(0,ig.jsx)(i$.Info,{className:"size-3.5"}),d("detail.tabInfo")]}),(0,ig.jsxs)(oQ.TabsTrigger,{value:"members",className:"flex-1 gap-1.5 data-[state=active]:shadow-none data-[state=active]:border-b-2 data-[state=active]:border-primary rounded-none",children:[(0,ig.jsx)(o2.Users,{className:"size-3.5"}),d("detail.tabMembers")]})]}),(0,ig.jsxs)(o0.ScrollArea,{className:"min-h-0 flex-1",children:[(0,ig.jsxs)(oQ.TabsContent,{value:"info",className:"p-4 mt-0 space-y-4",children:[(0,ig.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,ig.jsxs)("div",{className:"flex justify-between py-1 border-b",children:[(0,ig.jsx)("span",{className:"text-muted-foreground",children:d("detail.infoStatus")}),(0,ig.jsx)(iO.Badge,{variant:iK[e.status],className:"text-[10px]",children:d(`status.${e.status}`)})]}),(0,ig.jsxs)("div",{className:"flex justify-between py-1 border-b",children:[(0,ig.jsx)("span",{className:"text-muted-foreground",children:d("detail.infoIssueId")}),(0,ig.jsxs)("span",{className:"font-mono text-xs",children:[e.id.slice(0,8),"..."]})]}),(0,ig.jsxs)("div",{className:"flex justify-between py-1 border-b",children:[(0,ig.jsx)("span",{className:"text-muted-foreground",children:d("detail.infoTaskCount")}),(0,ig.jsx)("span",{children:r.length})]}),(0,ig.jsxs)("div",{className:"flex justify-between py-1 border-b",children:[(0,ig.jsx)("span",{className:"text-muted-foreground",children:d("detail.infoMemberCount")}),(0,ig.jsx)("span",{children:s.length})]}),(0,ig.jsxs)("div",{className:"flex justify-between py-1 border-b",children:[(0,ig.jsx)("span",{className:"text-muted-foreground",children:d("detail.infoCreatedAt")}),(0,ig.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]}),(0,ig.jsxs)("div",{className:"flex justify-between py-1 border-b",children:[(0,ig.jsx)("span",{className:"text-muted-foreground",children:d("detail.infoUpdatedAt")}),(0,ig.jsx)("span",{children:new Date(e.updatedAt).toLocaleDateString()})]}),e.branch&&(0,ig.jsxs)("div",{className:"flex justify-between py-1 border-b",children:[(0,ig.jsx)("span",{className:"text-muted-foreground",children:d("detail.infoBranch")}),(0,ig.jsxs)("span",{className:"font-mono text-xs flex items-center gap-1",children:[(0,ig.jsx)(iR.GitBranch,{className:"h-3 w-3"}),e.branch]})]}),e.prUrl&&(0,ig.jsxs)("div",{className:"flex justify-between py-1 border-b",children:[(0,ig.jsx)("span",{className:"text-muted-foreground",children:d("detail.infoPr")}),(0,ig.jsx)("span",{className:"text-xs truncate max-w-[140px]",children:e.prUrl})]})]}),e.description&&(0,ig.jsxs)("div",{className:"space-y-1",children:[(0,ig.jsx)("span",{className:"text-xs text-muted-foreground",children:d("detail.infoDescription")}),(0,ig.jsx)("p",{className:"text-sm bg-muted/50 rounded-lg px-3 py-2 whitespace-pre-wrap",children:e.description})]})]}),(0,ig.jsxs)(oQ.TabsContent,{value:"members",className:"p-4 mt-0 space-y-1",children:[s.map(e=>(0,ig.jsxs)("div",{className:"flex items-center gap-2 py-1.5",children:[(0,ig.jsx)(iP.AgentIcon,{agentId:"user"!==e?e:void 0,name:(0,iS.getMemberDisplayName)(a,e),className:"size-6 rounded-full"}),(0,ig.jsxs)("div",{className:"min-w-0",children:[(0,ig.jsx)("p",{className:"text-sm truncate",children:(0,iS.getMemberDisplayName)(a,e)}),(0,ig.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e})]})]},e)),(0,ig.jsxs)(iC.Button,{variant:"ghost",size:"sm",className:"w-full mt-2 text-xs text-muted-foreground",onClick:()=>c(!0),children:[(0,ig.jsx)(o4.UserPlus,{className:"size-3.5 mr-1"}),d("detail.addMember")]})]})]})]}),(0,ig.jsx)("div",{className:"shrink-0 p-3 border-t",children:(0,ig.jsxs)(iC.Button,{variant:"ghost",size:"sm",className:"w-full text-destructive hover:text-destructive",onClick:o,children:[(0,ig.jsx)(o$.Trash2,{className:"size-3.5 mr-1.5"}),d("detail.deleteIssue")]})})]}),(0,ig.jsx)(o5.AddMemberDialog,{open:u,onOpenChange:c,candidates:p,onAdd:l})]})}var o8=e.i(426022),o7=e.i(972846),o9=e.i(613087);e.s(["IssueDetail",0,function({workspaceId:e}){let{issues:t,activeIssueId:i,startIssue:n,resumeIssue:r,continueIssue:s,interruptIssue:a,updateIssue:l,deleteIssue:o}=(0,iy.useIssueStore)(),{tasks:d,loading:u,loadTasks:c,retryTask:h,cancelTask:p,createTask:f,updateTask:g,deleteTask:m,reorderTasks:v}=(0,ib.useTaskStore)(),y=(0,iw.useAgentStore)(e=>e.agents),b=(0,iw.useAgentStore)(e=>e.ensure),[w,j]=(0,im.useState)(!1),[k,S]=(0,im.useState)(!1),[N,C]=(0,im.useState)([]),[O,M]=(0,im.useState)(!1),[E,A]=(0,im.useState)(()=>new Set),[I,D]=(0,im.useState)(!1),P=(0,im.useRef)(null),T=(0,im.useRef)(new Map),z=(0,im.useRef)(null),W=(0,im.useCallback)(e=>{z.current?.openEditDialog(e)},[]),R=(0,iv.useTranslations)("issue"),$=(0,iv.useTranslations)("task"),L=(0,iv.useTranslations)("common"),B=t.find(e=>e.id===i),F=(0,im.useCallback)(async t=>{M(!0);try{let i=await fetch(`/api/workspaces/${e}/issues/${t}/comments`);if(!i.ok)return;let n=await i.json();C(n)}finally{M(!1)}},[e]);(0,im.useEffect)(()=>{B&&(c(e,B.id),Promise.resolve().then(()=>F(B.id)))},[B,e,c,F]),(0,im.useEffect)(()=>{b()},[b]),(0,im.useEffect)(()=>{if(!B)return;let t=(0,iN.getWS)(e),i=B.id,n=t.on("issue.updated",e=>{e.id===i&&F(i)});return()=>{n()}},[B,e,F]);let U=(0,im.useCallback)(async(t,i)=>{if(!B)return;let n=t.trim();if(!n)return;let r=await fetch(`/api/workspaces/${e}/issues/${B.id}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,mentions:i})});if(!r.ok)return;let s=await r.json();C(e=>[...e,s]),setTimeout(()=>{P.current?.scrollTo({top:P.current.scrollHeight,behavior:"smooth"})},50)},[B,e]),H=async t=>{if(!B)return;let i=await fetch(`/api/workspaces/${e}/issues/${B.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({members:(0,iS.normalizeChannelMembersToAgentIds)(G,[...K,...t])})}),n=await i.json();iy.useIssueStore.getState().upsertIssue(n)},X=(0,im.useCallback)(async t=>{B&&(await fetch(`/api/workspaces/${e}/issues/${B.id}/comments/${t}`,{method:"DELETE"}),C(e=>e.filter(e=>e.id!==t)))},[B,e]),V=(0,im.useCallback)((e,t)=>{A(i=>{let n=new Set(i);return t?n.add(e):n.delete(e),n})},[]),Y=(0,im.useCallback)(async(e,t,i)=>{if(!B)return;let n=await fetch(`/api/workspaces/${e}/issues/${B.id}/comments/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:i})});if(!n.ok)return;let r=await n.json();C(e=>e.map(e=>e.id===r.id?r:e))},[B]),q=(0,im.useCallback)(e=>{let t=N[e];t&&T.current.get(t.id)?.scrollIntoView({block:"start",behavior:"smooth"})},[N]),_=(0,im.useMemo)(()=>{if(!B)return[];let e=d.filter(e=>e.issueId===B.id),t=B.tasks??[],i=new Map(t.map((e,t)=>[e,t])),n=t.length;return e.sort((e,t)=>(i.get(e.id)??n)-(i.get(t.id)??n))},[d,B]),K=B?.members??[],G=y.filter(e=>!1!==e.enabled);return B?(0,ig.jsxs)("div",{className:"flex h-full overflow-hidden",children:[(0,ig.jsxs)("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden relative",children:[(0,ig.jsx)(iJ,{ref:z,issue:B,workspaceId:e,t:R,tc:L,setEditOpen:S,setInfoOpen:j,startIssue:n,resumeIssue:r,continueIssue:s,interruptIssue:a,members:K,enabledAgents:G,issueTasks:_,updateIssue:l,createTask:f,updateTask:g}),u?(0,ig.jsxs)("div",{className:"shrink-0 p-4 pb-2",children:[(0,ig.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,ig.jsx)(o9.Skeleton,{className:"h-4 w-16"}),(0,ig.jsx)(o9.Skeleton,{className:"size-6 rounded"})]}),(0,ig.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-1",children:Array.from({length:3},(e,t)=>(0,ig.jsxs)("div",{className:"rounded-md border px-3 py-2 min-w-[140px] space-y-1.5",children:[(0,ig.jsx)(o9.Skeleton,{className:"h-4 w-24"}),(0,ig.jsx)(o9.Skeleton,{className:"h-3 w-16"})]},t))})]}):(0,ig.jsx)(oF,{issue:B,workspaceId:e,issueTasks:_,t:R,tTask:$,retryTask:h,cancelTask:p,reorderTasks:v,deleteTask:m,onEditTask:W}),O&&0===N.length?(0,ig.jsxs)("div",{className:"flex-1 min-h-0 flex flex-col border-t",children:[(0,ig.jsx)("div",{className:"shrink-0 px-4 pt-2",children:(0,ig.jsx)(o9.Skeleton,{className:"h-4 w-20 mb-3"})}),(0,ig.jsx)("div",{className:"flex-1 overflow-auto px-4 space-y-4",children:Array.from({length:3},(e,t)=>(0,ig.jsxs)("div",{className:"flex gap-3",children:[(0,ig.jsx)(o9.Skeleton,{className:"size-6 rounded-full shrink-0 mt-0.5"}),(0,ig.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,ig.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ig.jsx)(o9.Skeleton,{className:"h-4 w-20"}),(0,ig.jsx)(o9.Skeleton,{className:"h-3 w-12"})]}),(0,ig.jsx)(o9.Skeleton,{className:"h-4 w-full"}),(0,ig.jsx)(o9.Skeleton,{className:"h-4 w-3/4"})]})]},t))})]}):(0,ig.jsx)(oZ,{issue:B,workspaceId:e,comments:N,expandedCommentIds:E,commentsViewportRef:P,commentRefs:T,onDeleteComment:X,onUpdateComment:Y,onExpandedChange:V,scrollToComment:q,t:R}),I?(0,ig.jsx)("div",{className:"absolute bottom-4 left-4 right-4 z-10 animate-in slide-in-from-bottom-2 duration-200",children:(0,ig.jsxs)("div",{className:"relative",children:[(0,ig.jsx)("button",{onClick:()=>D(!1),className:"absolute -top-2 -right-2 z-20 size-6 rounded-full bg-muted border shadow-sm flex items-center justify-center hover:bg-muted/80 transition-colors cursor-pointer",children:(0,ig.jsx)(o7.X,{className:"size-3.5"})}),(0,ig.jsx)(ik.ChatComposerInput,{workspaceId:e,agents:G,placeholder:R("detail.commentPlaceholder"),onSubmit:(e,t)=>U(e,t),enableAutoMode:!1,enableAgentResources:!1})]})}):(0,ig.jsxs)("button",{onClick:()=>D(!0),className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex items-center gap-2 px-4 py-2 rounded-full bg-primary text-primary-foreground shadow-lg hover:bg-primary/90 transition-all z-10 cursor-pointer",children:[(0,ig.jsx)(o8.MessageSquare,{className:"size-4"}),(0,ig.jsx)("span",{className:"text-sm font-medium",children:R("detail.comment")})]})]}),(0,ig.jsx)(o6,{issue:B,workspaceId:e,open:w,onOpenChange:j,issueTasks:_,members:K,enabledAgents:G,onAddMembers:H,onDeleteIssue:()=>{o(e,B.id),ix.useMobilePanelStore.getState().setActivePanel("issue-list")},t:R}),B&&(0,ig.jsx)(ij.EditIssueDialog,{issue:B,open:k,onOpenChange:S,agents:G,onSave:async t=>{await l(e,B.id,t)}})]}):(0,ig.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:R("detail.selectIssue")})}],970258)},706304,e=>{e.n(e.i(970258))}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,595390,e=>{"use strict";var t=e.i(344180),s=e.i(764556),r=e.i(681622),a=e.i(611176),n=e.i(972846);let i=e=>!["scheduler","task_creator","bot"].includes(e.description||"")&&"agent-generator"!==e.id;e.s(["MemberPicker",0,function({candidates:e,selected:l,onToggle:o,searchPlaceholder:c,emptyText:d,label:u,filter:f}){let[m,p]=(0,s.useState)(""),w=e.filter(f??i).sort((e,t)=>(e.sortIndex??0)-(t.sortIndex??0)).filter(e=>`${e.label} ${e.description||""}`.toLowerCase().includes(m.toLowerCase()));return(0,t.jsxs)("div",{className:"space-y-2",children:[u&&(0,t.jsx)("label",{className:"text-sm font-medium",children:u}),(0,t.jsx)(r.Input,{value:m,onChange:e=>p(e.target.value),placeholder:c}),(0,t.jsxs)("div",{className:"max-h-40 overflow-y-auto space-y-0.5",children:[0===w.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground py-2 text-center",children:d||"No items found"}),w.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>o(e.id),className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md hover:bg-muted text-left text-sm transition-colors",children:[(0,t.jsx)(a.AgentIcon,{agentId:"user"!==e.id?e.id:void 0,name:e.label,className:"size-5 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate",children:e.label}),e.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.description})]}),(0,t.jsx)("div",{className:`flex items-center justify-center size-4 rounded border shrink-0 ${l.includes(e.id)?"bg-primary border-primary text-primary-foreground":"border-input"}`})]},e.id))]}),l.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:l.map(s=>{let r=e.find(e=>e.id===s),i=r?.label||s;return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs max-w-[160px] min-w-0",children:["user"===s?(0,t.jsx)("span",{className:"truncate",children:i}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 min-w-0",children:[(0,t.jsx)(a.AgentIcon,{agentId:s,name:i,className:"size-3.5 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:i})]}),(0,t.jsx)("button",{type:"button",onClick:()=>o(s),className:"hover:text-destructive shrink-0 cursor-pointer",children:(0,t.jsx)(n.X,{className:"size-3"})})]},s)})})]})}])},272736,e=>{"use strict";function t(e){return e.name?.trim()||e.role}e.s(["getAgentDisplayName",0,t,"getMemberDisplayName",0,function(e,s){if("user"===s)return"user";let r=e.find(e=>e.id===s);return r?t(r):s},"normalizeChannelMembersToAgentIds",0,function(e,t){let s=new Set(e.map(e=>e.id)),r=[],a=new Set;for(let e of t)s.has(e)&&(a.has(e)||(a.add(e),r.push(e)));return r}])},302773,e=>{"use strict";let t=(0,e.i(816709).create)((e,t)=>({workflows:[],currentWorkflow:null,isLoading:!1,loadWorkflows:async()=>{e({isLoading:!0});try{let t=await fetch("/api/workflows"),s=await t.json();e({workflows:s,isLoading:!1})}catch{e({isLoading:!1})}},createWorkflow:async t=>{let s=await fetch("/api/workflows",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await s.json();return e(e=>({workflows:[...e.workflows,r]})),r},updateWorkflow:async(e,s)=>{let r=await fetch(`/api/workflows/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),a=await r.json();t().upsertWorkflow(a)},deleteWorkflow:async e=>{await fetch(`/api/workflows/${e}`,{method:"DELETE"}),t().removeWorkflow(e)},duplicateWorkflow:async t=>{let s=await fetch(`/api/workflows/${t}/duplicate`,{method:"POST"}),r=await s.json();e(e=>({workflows:[...e.workflows,r]}))},setCurrentWorkflow:t=>e({currentWorkflow:t}),upsertWorkflow:t=>{e(e=>{let s=e.workflows.findIndex(e=>e.id===t.id);if(-1!==s){let r=[...e.workflows];return r[s]=t,{workflows:r}}return{workflows:[...e.workflows,t]}})},removeWorkflow:t=>{e(e=>({workflows:e.workflows.filter(e=>e.id!==t),currentWorkflow:e.currentWorkflow?.id===t?null:e.currentWorkflow}))}}));e.s(["useWorkflowStore",0,t])},249063,e=>{"use strict";var t=e.i(344180),s=e.i(764556),r=e.i(244073),a=e.i(209988),n=e.i(681622),i=e.i(260218),l=e.i(788010),o=e.i(595390),c=e.i(272736),d=e.i(302773);e.s(["CreateIssueDialog",0,function({open:e,onOpenChange:u,agents:f=[],defaultDescription:m,onSubmit:p}){let[w,x]=(0,s.useState)(""),[h,g]=(0,s.useState)(""),[k,j]=(0,s.useState)([]),[b,y]=(0,s.useState)(""),{workflows:v,loadWorkflows:N}=(0,d.useWorkflowStore)(),C=(0,r.useTranslations)("issue"),T=(0,r.useTranslations)("common"),W=f.filter(e=>!1!==e.enabled).map((e,t)=>({id:e.id,label:(0,c.getMemberDisplayName)(f,e.id),sortIndex:t}));(0,s.useEffect)(()=>{e&&N()},[e,N]),(0,s.useEffect)(()=>{e&&m&&g(m)},[e,m]);let S=e=>{e||(x(""),g(""),j([]),y("")),u(e)};return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:S,children:(0,t.jsxs)(a.DialogContent,{className:"sm:max-w-md",children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:C("create.title")}),(0,t.jsx)(a.DialogDescription,{children:C("create.description")})]}),(0,t.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,t.jsx)(n.Input,{placeholder:C("create.titlePlaceholder"),value:w,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)(l.Textarea,{placeholder:C("create.descriptionPlaceholder"),value:h,onChange:e=>g(e.target.value),rows:3}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-foreground",children:"Workflow Template"}),(0,t.jsxs)("select",{value:b,onChange:e=>{let t=e.target.value;if(y(t),t){let e=v.find(e=>e.id===t);if(e){let t=e.nodes.filter(e=>"agent"===e.type).map(e=>e.data.agentConfigId);j(e=>Array.from(new Set([...e,...t])))}}},className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[(0,t.jsx)("option",{value:"",children:"None (use default pipeline)"}),v.map(e=>(0,t.jsxs)("option",{value:e.id,children:[e.name," (",e.nodes.length," agents)"]},e.id))]})]}),(0,t.jsx)(o.MemberPicker,{candidates:W,selected:k,onToggle:e=>{j(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},label:C("create.membersLabel"),searchPlaceholder:C("create.searchAgent"),emptyText:C("create.noAgents")},String(e)),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:()=>S(!1),children:T("cancel")}),(0,t.jsx)(i.Button,{onClick:()=>{w.trim()&&(p({title:w.trim(),description:h.trim(),members:k,workflowId:b||void 0}),S(!1))},disabled:!w.trim(),children:C("create.submit")})]})]})]})})}])},217832,e=>{e.n(e.i(249063))}]);