@chrisjowen/wheelhouse 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/README.md +23 -1
  2. package/build/client/_app/immutable/assets/0.CS9-5c8D.css +1 -0
  3. package/build/client/_app/immutable/assets/0.CS9-5c8D.css.br +0 -0
  4. package/build/client/_app/immutable/assets/0.CS9-5c8D.css.gz +0 -0
  5. package/build/client/_app/immutable/chunks/{CTLz5ghs.js → 8JUY7TGF.js} +1 -1
  6. package/build/client/_app/immutable/chunks/8JUY7TGF.js.br +0 -0
  7. package/build/client/_app/immutable/chunks/8JUY7TGF.js.gz +0 -0
  8. package/build/client/_app/immutable/chunks/B78SKOml.js +23 -0
  9. package/build/client/_app/immutable/chunks/B78SKOml.js.br +0 -0
  10. package/build/client/_app/immutable/chunks/B78SKOml.js.gz +0 -0
  11. package/build/client/_app/immutable/chunks/{DKQe4Tss.js → BCUUi0V0.js} +1 -1
  12. package/build/client/_app/immutable/chunks/BCUUi0V0.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/{DKQe4Tss.js.gz → BCUUi0V0.js.gz} +0 -0
  14. package/build/client/_app/immutable/chunks/{DmYimTF4.js → BIJDRvOc.js} +1 -1
  15. package/build/client/_app/immutable/chunks/BIJDRvOc.js.br +0 -0
  16. package/build/client/_app/immutable/chunks/BIJDRvOc.js.gz +0 -0
  17. package/build/client/_app/immutable/chunks/{DZ6A9wfS.js → BYUAxBPx.js} +1 -1
  18. package/build/client/_app/immutable/chunks/BYUAxBPx.js.br +0 -0
  19. package/build/client/_app/immutable/chunks/BYUAxBPx.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/{cAfuCUf-.js → BaPx3dni.js} +1 -1
  21. package/build/client/_app/immutable/chunks/BaPx3dni.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/BaPx3dni.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/BezBg3rs.js +1 -0
  24. package/build/client/_app/immutable/chunks/BezBg3rs.js.br +0 -0
  25. package/build/client/_app/immutable/chunks/BezBg3rs.js.gz +0 -0
  26. package/build/client/_app/immutable/chunks/{HX17oQGV.js → BrlWJk4r.js} +1 -1
  27. package/build/client/_app/immutable/chunks/BrlWJk4r.js.br +0 -0
  28. package/build/client/_app/immutable/chunks/BrlWJk4r.js.gz +0 -0
  29. package/build/client/_app/immutable/chunks/{-UC3yquZ.js → Bw22EWRR.js} +1 -1
  30. package/build/client/_app/immutable/chunks/Bw22EWRR.js.br +0 -0
  31. package/build/client/_app/immutable/chunks/Bw22EWRR.js.gz +0 -0
  32. package/build/client/_app/immutable/chunks/{yLdhLQbD.js → C6B0JAFe.js} +1 -1
  33. package/build/client/_app/immutable/chunks/C6B0JAFe.js.br +0 -0
  34. package/build/client/_app/immutable/chunks/C6B0JAFe.js.gz +0 -0
  35. package/build/client/_app/immutable/chunks/{BfUcVuHG.js → C8OIAOGW.js} +1 -1
  36. package/build/client/_app/immutable/chunks/C8OIAOGW.js.br +0 -0
  37. package/build/client/_app/immutable/chunks/C8OIAOGW.js.gz +0 -0
  38. package/build/client/_app/immutable/chunks/{B6Xfoyj4.js → CEHCs8E4.js} +1 -1
  39. package/build/client/_app/immutable/chunks/CEHCs8E4.js.br +0 -0
  40. package/build/client/_app/immutable/chunks/CEHCs8E4.js.gz +0 -0
  41. package/build/client/_app/immutable/chunks/{CBeiP5A_.js → CL60_qsS.js} +1 -1
  42. package/build/client/_app/immutable/chunks/CL60_qsS.js.br +0 -0
  43. package/build/client/_app/immutable/chunks/CL60_qsS.js.gz +0 -0
  44. package/build/client/_app/immutable/chunks/{4JI5fA27.js → CbTQtfeu.js} +1 -1
  45. package/build/client/_app/immutable/chunks/CbTQtfeu.js.br +0 -0
  46. package/build/client/_app/immutable/chunks/CbTQtfeu.js.gz +0 -0
  47. package/build/client/_app/immutable/chunks/{aicrexzH.js → CeuOu7QI.js} +1 -1
  48. package/build/client/_app/immutable/chunks/CeuOu7QI.js.br +0 -0
  49. package/build/client/_app/immutable/chunks/CeuOu7QI.js.gz +0 -0
  50. package/build/client/_app/immutable/chunks/{CSoC52Vx.js → Cn9pLe1S.js} +1 -1
  51. package/build/client/_app/immutable/chunks/Cn9pLe1S.js.br +0 -0
  52. package/build/client/_app/immutable/chunks/Cn9pLe1S.js.gz +0 -0
  53. package/build/client/_app/immutable/chunks/{CxJQEvmu.js → D1QZsS_n.js} +1 -1
  54. package/build/client/_app/immutable/chunks/D1QZsS_n.js.br +0 -0
  55. package/build/client/_app/immutable/chunks/D1QZsS_n.js.gz +0 -0
  56. package/build/client/_app/immutable/chunks/{BCRg__8v.js → D3z87-GH.js} +5 -5
  57. package/build/client/_app/immutable/chunks/D3z87-GH.js.br +0 -0
  58. package/build/client/_app/immutable/chunks/D3z87-GH.js.gz +0 -0
  59. package/build/client/_app/immutable/chunks/{DebP8q1f.js → D69HGG2e.js} +1 -1
  60. package/build/client/_app/immutable/chunks/D69HGG2e.js.br +0 -0
  61. package/build/client/_app/immutable/chunks/D69HGG2e.js.gz +0 -0
  62. package/build/client/_app/immutable/chunks/{BHmiFpwn.js → D6kQXwLu.js} +1 -1
  63. package/build/client/_app/immutable/chunks/D6kQXwLu.js.br +0 -0
  64. package/build/client/_app/immutable/chunks/D6kQXwLu.js.gz +0 -0
  65. package/build/client/_app/immutable/chunks/{DkrGZW5a.js → D8TgbIKz.js} +1 -1
  66. package/build/client/_app/immutable/chunks/D8TgbIKz.js.br +0 -0
  67. package/build/client/_app/immutable/chunks/D8TgbIKz.js.gz +0 -0
  68. package/build/client/_app/immutable/chunks/{CpqCFuwf.js → DGZVZsEx.js} +1 -1
  69. package/build/client/_app/immutable/chunks/DGZVZsEx.js.br +0 -0
  70. package/build/client/_app/immutable/chunks/DGZVZsEx.js.gz +0 -0
  71. package/build/client/_app/immutable/chunks/{BqMdGvwc.js → Dbi_7cO_.js} +2 -2
  72. package/build/client/_app/immutable/chunks/Dbi_7cO_.js.br +0 -0
  73. package/build/client/_app/immutable/chunks/Dbi_7cO_.js.gz +0 -0
  74. package/build/client/_app/immutable/chunks/{yYKc4xgI.js → Dq4WC4aT.js} +1 -1
  75. package/build/client/_app/immutable/chunks/Dq4WC4aT.js.br +0 -0
  76. package/build/client/_app/immutable/chunks/Dq4WC4aT.js.gz +0 -0
  77. package/build/client/_app/immutable/chunks/{CcafVx98.js → QrHSSdjC.js} +1 -1
  78. package/build/client/_app/immutable/chunks/QrHSSdjC.js.br +2 -0
  79. package/build/client/_app/immutable/chunks/QrHSSdjC.js.gz +0 -0
  80. package/build/client/_app/immutable/chunks/{CA_poXX0.js → bOtONP_M.js} +1 -1
  81. package/build/client/_app/immutable/chunks/bOtONP_M.js.br +0 -0
  82. package/build/client/_app/immutable/chunks/bOtONP_M.js.gz +0 -0
  83. package/build/client/_app/immutable/entry/app.B0SozPUz.js +2 -0
  84. package/build/client/_app/immutable/entry/app.B0SozPUz.js.br +0 -0
  85. package/build/client/_app/immutable/entry/app.B0SozPUz.js.gz +0 -0
  86. package/build/client/_app/immutable/entry/start.BgyXy-5i.js +1 -0
  87. package/build/client/_app/immutable/entry/start.BgyXy-5i.js.br +0 -0
  88. package/build/client/_app/immutable/entry/start.BgyXy-5i.js.gz +0 -0
  89. package/build/client/_app/immutable/nodes/0.BH-p6KNP.js +9 -0
  90. package/build/client/_app/immutable/nodes/0.BH-p6KNP.js.br +0 -0
  91. package/build/client/_app/immutable/nodes/0.BH-p6KNP.js.gz +0 -0
  92. package/build/client/_app/immutable/nodes/{1.DMeNq-MM.js → 1.5bKMe7me.js} +1 -1
  93. package/build/client/_app/immutable/nodes/1.5bKMe7me.js.br +0 -0
  94. package/build/client/_app/immutable/nodes/1.5bKMe7me.js.gz +0 -0
  95. package/build/client/_app/immutable/nodes/{10.C85i7naL.js → 10.CuyB--Be.js} +1 -1
  96. package/build/client/_app/immutable/nodes/10.CuyB--Be.js.br +0 -0
  97. package/build/client/_app/immutable/nodes/10.CuyB--Be.js.gz +0 -0
  98. package/build/client/_app/immutable/nodes/{11.B3oT5Eyb.js → 11.Cp96bYst.js} +1 -1
  99. package/build/client/_app/immutable/nodes/11.Cp96bYst.js.br +0 -0
  100. package/build/client/_app/immutable/nodes/11.Cp96bYst.js.gz +0 -0
  101. package/build/client/_app/immutable/nodes/{12.CzGzD4iD.js → 12.B9kS4-UK.js} +1 -1
  102. package/build/client/_app/immutable/nodes/12.B9kS4-UK.js.br +0 -0
  103. package/build/client/_app/immutable/nodes/12.B9kS4-UK.js.gz +0 -0
  104. package/build/client/_app/immutable/nodes/{13.hmYycyBf.js → 13.ie4sMrRi.js} +1 -1
  105. package/build/client/_app/immutable/nodes/13.ie4sMrRi.js.br +0 -0
  106. package/build/client/_app/immutable/nodes/13.ie4sMrRi.js.gz +0 -0
  107. package/build/client/_app/immutable/nodes/{14.KtuQwZ-C.js → 14.CqfbcQC3.js} +1 -1
  108. package/build/client/_app/immutable/nodes/14.CqfbcQC3.js.br +0 -0
  109. package/build/client/_app/immutable/nodes/14.CqfbcQC3.js.gz +0 -0
  110. package/build/client/_app/immutable/nodes/{15.C7QObash.js → 15.ClcEiTus.js} +1 -1
  111. package/build/client/_app/immutable/nodes/15.ClcEiTus.js.br +0 -0
  112. package/build/client/_app/immutable/nodes/15.ClcEiTus.js.gz +0 -0
  113. package/build/client/_app/immutable/nodes/{16.BJOpVasQ.js → 16.Lubye7rY.js} +1 -1
  114. package/build/client/_app/immutable/nodes/16.Lubye7rY.js.br +0 -0
  115. package/build/client/_app/immutable/nodes/16.Lubye7rY.js.gz +0 -0
  116. package/build/client/_app/immutable/nodes/{17.Bk-1GRlF.js → 17.CZsgvMnU.js} +1 -1
  117. package/build/client/_app/immutable/nodes/17.CZsgvMnU.js.br +0 -0
  118. package/build/client/_app/immutable/nodes/17.CZsgvMnU.js.gz +0 -0
  119. package/build/client/_app/immutable/nodes/{19.lzLFSTUS.js → 19.nb4PEk6e.js} +1 -1
  120. package/build/client/_app/immutable/nodes/19.nb4PEk6e.js.br +0 -0
  121. package/build/client/_app/immutable/nodes/19.nb4PEk6e.js.gz +0 -0
  122. package/build/client/_app/immutable/nodes/2.DBpcacIW.js +26 -0
  123. package/build/client/_app/immutable/nodes/2.DBpcacIW.js.br +0 -0
  124. package/build/client/_app/immutable/nodes/2.DBpcacIW.js.gz +0 -0
  125. package/build/client/_app/immutable/nodes/{20.DqOEVNtJ.js → 20.DKDJA76m.js} +1 -1
  126. package/build/client/_app/immutable/nodes/20.DKDJA76m.js.br +0 -0
  127. package/build/client/_app/immutable/nodes/20.DKDJA76m.js.gz +0 -0
  128. package/build/client/_app/immutable/nodes/{21.BmaCB5Rb.js → 21.DDSJrVwV.js} +1 -1
  129. package/build/client/_app/immutable/nodes/21.DDSJrVwV.js.br +0 -0
  130. package/build/client/_app/immutable/nodes/21.DDSJrVwV.js.gz +0 -0
  131. package/build/client/_app/immutable/nodes/{22.D4F9Jlfe.js → 22.Bf2Y4qtK.js} +1 -1
  132. package/build/client/_app/immutable/nodes/22.Bf2Y4qtK.js.br +0 -0
  133. package/build/client/_app/immutable/nodes/22.Bf2Y4qtK.js.gz +0 -0
  134. package/build/client/_app/immutable/nodes/{23.CGv8T_kx.js → 23.CgSRzQDr.js} +1 -1
  135. package/build/client/_app/immutable/nodes/23.CgSRzQDr.js.br +0 -0
  136. package/build/client/_app/immutable/nodes/23.CgSRzQDr.js.gz +0 -0
  137. package/build/client/_app/immutable/nodes/{24.DKrgSigC.js → 24.fKJczgYC.js} +1 -1
  138. package/build/client/_app/immutable/nodes/24.fKJczgYC.js.br +0 -0
  139. package/build/client/_app/immutable/nodes/24.fKJczgYC.js.gz +0 -0
  140. package/build/client/_app/immutable/nodes/25.BzI2N_Dl.js +14 -0
  141. package/build/client/_app/immutable/nodes/25.BzI2N_Dl.js.br +0 -0
  142. package/build/client/_app/immutable/nodes/25.BzI2N_Dl.js.gz +0 -0
  143. package/build/client/_app/immutable/nodes/{26.5XFLLXwF.js → 26.Bl7bQZez.js} +1 -1
  144. package/build/client/_app/immutable/nodes/26.Bl7bQZez.js.br +0 -0
  145. package/build/client/_app/immutable/nodes/26.Bl7bQZez.js.gz +0 -0
  146. package/build/client/_app/immutable/nodes/{27.BgW1QGtl.js → 27.Dn-mDbvz.js} +1 -1
  147. package/build/client/_app/immutable/nodes/27.Dn-mDbvz.js.br +0 -0
  148. package/build/client/_app/immutable/nodes/27.Dn-mDbvz.js.gz +0 -0
  149. package/build/client/_app/immutable/nodes/{28.DeOjXHlX.js → 28.B9EWyQv6.js} +1 -1
  150. package/build/client/_app/immutable/nodes/28.B9EWyQv6.js.br +0 -0
  151. package/build/client/_app/immutable/nodes/28.B9EWyQv6.js.gz +0 -0
  152. package/build/client/_app/immutable/nodes/{3.Dh_akpU9.js → 3.DMxCWZ16.js} +1 -1
  153. package/build/client/_app/immutable/nodes/3.DMxCWZ16.js.br +0 -0
  154. package/build/client/_app/immutable/nodes/3.DMxCWZ16.js.gz +0 -0
  155. package/build/client/_app/immutable/nodes/{4.Bs1kn53S.js → 4.Bj_V5H0A.js} +1 -1
  156. package/build/client/_app/immutable/nodes/4.Bj_V5H0A.js.br +0 -0
  157. package/build/client/_app/immutable/nodes/4.Bj_V5H0A.js.gz +0 -0
  158. package/build/client/_app/immutable/nodes/{6.C71EcMPx.js → 6.BAzIGIXP.js} +1 -1
  159. package/build/client/_app/immutable/nodes/6.BAzIGIXP.js.br +0 -0
  160. package/build/client/_app/immutable/nodes/6.BAzIGIXP.js.gz +0 -0
  161. package/build/client/_app/immutable/nodes/{7.ZTOGuaHI.js → 7.CpRItf5T.js} +1 -1
  162. package/build/client/_app/immutable/nodes/7.CpRItf5T.js.br +0 -0
  163. package/build/client/_app/immutable/nodes/7.CpRItf5T.js.gz +0 -0
  164. package/build/client/_app/immutable/nodes/{8.CvoRv_Q7.js → 8.BRbaXe0L.js} +1 -1
  165. package/build/client/_app/immutable/nodes/8.BRbaXe0L.js.br +0 -0
  166. package/build/client/_app/immutable/nodes/8.BRbaXe0L.js.gz +0 -0
  167. package/build/client/_app/immutable/nodes/{9.BKcDiRzn.js → 9.DpQmfi7O.js} +1 -1
  168. package/build/client/_app/immutable/nodes/9.DpQmfi7O.js.br +0 -0
  169. package/build/client/_app/immutable/nodes/9.DpQmfi7O.js.gz +0 -0
  170. package/build/client/_app/version.json +1 -1
  171. package/build/client/_app/version.json.br +0 -0
  172. package/build/client/_app/version.json.gz +0 -0
  173. package/build/handler.js +4 -4
  174. package/build/index.js +4 -4
  175. package/build/server/chunks/chunks/{DecisionCard.js-DNJjQj6y.js → DecisionCard.js-Cim80Nvw.js} +3 -3
  176. package/build/server/chunks/chunks/{EtaLine.js-B29ZmIHz.js → EtaLine.js-D5L0wIoo.js} +2 -2
  177. package/build/server/chunks/chunks/{OpenDecision.js-evqpdz3O.js → OpenDecision.js-BVAXM8UF.js} +3 -3
  178. package/build/server/chunks/chunks/{RemotesPanel.js-0dTa0R21.js → RemotesPanel.js-qXJzfoKH.js} +87 -7
  179. package/build/server/chunks/chunks/brief.js-TS-K0lZ6.js +54 -0
  180. package/build/server/chunks/chunks/{chat.svelte.js-PibwBfjx.js → chat.svelte.js-BcKQjH6T.js} +6 -2
  181. package/build/server/chunks/chunks/{detail.js-Dgv4KmRL.js → detail.js-BBCxJBpU.js} +2 -2
  182. package/build/server/chunks/chunks/{feedback.js-Czi1E8u9.js → feedback.js-DHLUCzN_.js} +2 -2
  183. package/build/server/chunks/chunks/harness.js-DPojOlFJ.js +16 -0
  184. package/build/server/chunks/chunks/{insights.svelte.js-BLHg5qc-.js → insights.svelte.js-CLCl4593.js} +5 -5
  185. package/build/server/chunks/chunks/{internal.js-BP2QIFKY.js → internal.js-CedW099c.js} +3 -3
  186. package/build/server/chunks/chunks/{keychain.js-DJN5Zq29.js → keychain.js-CspIw1lK.js} +2 -2
  187. package/build/server/chunks/chunks/{live.svelte.js-DmaKnCsQ.js → live.svelte.js-qalupdld.js} +2 -2
  188. package/build/server/chunks/chunks/{marketplace-service.js-DJa250U3.js → marketplace-service.js-O-2c34nr.js} +2 -2
  189. package/build/server/chunks/chunks/{page.js-DfEGGxtv.js → page.js-BRRl6mg_.js} +2 -2
  190. package/build/server/chunks/chunks/{brief.js-DyAlUufG.js → plain.js-Dc97sYaJ.js} +2 -53
  191. package/build/server/chunks/chunks/{plugins.js-Dfplrp6Q.js → plugins.js-DoEQ8bDp.js} +2 -2
  192. package/build/server/chunks/chunks/{previewhelper2.js-oDj1DB3x.js → previewhelper2.js-CLYvgGeM.js} +3 -3
  193. package/build/server/chunks/chunks/{repo.js-CDmQ4avP.js → repo.js-BQv7p3Qv.js} +2 -2
  194. package/build/server/chunks/chunks/{runtime.js-OVMyjvFp.js → runtime.js-ja9fpm3a.js} +2113 -789
  195. package/build/server/chunks/chunks/{service.js-BLOqmXsC.js → service.js-CHB5De_m.js} +2 -2
  196. package/build/server/chunks/chunks/{service2.js-DlF0JRL_.js → service2.js-BSXaHqaf.js} +24 -10
  197. package/build/server/chunks/chunks/{starter.js-D0aq1VOH.js → starter.js-BL6kYdY7.js} +227 -9
  198. package/build/server/chunks/chunks/{terminal.js-BckfZrAP.js → terminal.js-s8yEF1TY.js} +3 -1
  199. package/build/server/chunks/chunks/{view.js-mOm4Yref.js → view.js-DvrTXTsb.js} +2 -2
  200. package/build/server/chunks/entries/endpoints/api/apps/_op_/{_server.ts.js-BQM1jaCW.js → _server.ts.js-DJDX8mej.js} +8 -6
  201. package/build/server/chunks/entries/endpoints/api/cloud/{_server.ts.js-BnfxYZJ4.js → _server.ts.js-ZpNBOdE6.js} +14 -5
  202. package/build/server/chunks/entries/endpoints/api/cloud/previews/{_server.ts.js-CuYYpy-k.js → _server.ts.js-cLGgBi-L.js} +8 -6
  203. package/build/server/chunks/entries/endpoints/api/events/{_server.ts.js-v28e8g7l.js → _server.ts.js-DyA-Ftti.js} +8 -6
  204. package/build/server/chunks/entries/endpoints/api/files/{_server.ts.js-Q9s9qdZ9.js → _server.ts.js-BRutjWld.js} +8 -6
  205. package/build/server/chunks/entries/endpoints/api/firstmate/chat/{_server.ts.js-BN6RMteU.js → _server.ts.js-CSUsZ_Uy.js} +8 -6
  206. package/build/server/chunks/entries/endpoints/api/firstmate/commands/{_server.ts.js-C-e8niCf.js → _server.ts.js-CyMAbBop.js} +11 -6
  207. package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/{_server.ts.js-CulYtEQF.js → _server.ts.js-C1QNh7Fv.js} +8 -6
  208. package/build/server/chunks/entries/endpoints/api/firstmate/input/{_server.ts.js-C6Bz4_ee.js → _server.ts.js-xAS3zgy6.js} +8 -6
  209. package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/{_server.ts.js-BqZfV_xz.js → _server.ts.js-C0ChpkPv.js} +8 -6
  210. package/build/server/chunks/entries/endpoints/api/firstmate/messages/{_server.ts.js-UWIoNytl.js → _server.ts.js-Dg8UqJYL.js} +9 -7
  211. package/build/server/chunks/entries/endpoints/api/firstmate/pick/{_server.ts.js-DW2s3QXr.js → _server.ts.js-KtXAKUKl.js} +8 -6
  212. package/build/server/chunks/entries/endpoints/api/firstmate/reactions/{_server.ts.js-CKcueh0v.js → _server.ts.js-SfyGIsms.js} +8 -6
  213. package/build/server/chunks/entries/endpoints/api/firstmate/start/{_server.ts.js-DIG6BGUw.js → _server.ts.js-uKjVaQqO.js} +8 -6
  214. package/build/server/chunks/entries/endpoints/api/fleet/{_server.ts.js-DbyPkjMG.js → _server.ts.js-Bh09YMSB.js} +8 -6
  215. package/build/server/chunks/entries/endpoints/api/gateway/{_server.ts.js-iIWTQNdz.js → _server.ts.js-DiOWY9as.js} +8 -6
  216. package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-C6aIFSPp.js → _server.ts.js-BRjxK-9y.js} +8 -6
  217. package/build/server/chunks/entries/endpoints/api/inbox/{_server.ts.js-KQsJpMC4.js → _server.ts.js-CA3XQih9.js} +8 -6
  218. package/build/server/chunks/entries/endpoints/api/inbox/report/{_server.ts.js-CnyUgKFG.js → _server.ts.js-B5MRXVz2.js} +8 -6
  219. package/build/server/chunks/entries/endpoints/api/insights/{_server.ts.js-CuR7nOsT.js → _server.ts.js-Hj5j2VEd.js} +8 -6
  220. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/{_server.ts.js-B0PprKNy.js → _server.ts.js-CG5hVtIr.js} +8 -6
  221. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/{_server.ts.js-ExGq36cR.js → _server.ts.js-CbfYfN4W.js} +9 -7
  222. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/summary/{_server.ts.js-DEiF7hSn.js → _server.ts.js-Cntqh4w-.js} +9 -7
  223. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/icon/_icon_/{_server.ts.js-CNilnIbo.js → _server.ts.js-DbaYfmK8.js} +7 -5
  224. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/{_server.ts.js-DH8JvoH8.js → _server.ts.js-CMC6khtq.js} +2 -2
  225. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/{_server.ts.js-BFsGEK3z.js → _server.ts.js-DiCaOT3E.js} +8 -6
  226. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/{_server.ts.js-D20dZu-e.js → _server.ts.js-DQZxZKa4.js} +2 -2
  227. package/build/server/chunks/entries/endpoints/api/plugins/{_server.ts.js-CUNuwhSn.js → _server.ts.js-CaQ772k3.js} +8 -6
  228. package/build/server/chunks/entries/endpoints/api/plugins/inspect/{_server.ts.js-CjBpWyyM.js → _server.ts.js-DkjBSjdS.js} +2 -2
  229. package/build/server/chunks/entries/endpoints/api/plugins/install/{_server.ts.js-BOj-J5oo.js → _server.ts.js-BLEOrgEt.js} +2 -2
  230. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/{_server.ts.js-CwwZDf_S.js → _server.ts.js-rrfRBhVX.js} +9 -7
  231. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/icon/_name_/{_server.ts.js-DyB021Bo.js → _server.ts.js-DEaeguu1.js} +9 -7
  232. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/registries/{_server.ts.js-Dcw_-YKO.js → _server.ts.js-DGviOddp.js} +9 -7
  233. package/build/server/chunks/entries/endpoints/api/plugins/updates/{_server.ts.js-Dn8taLal.js → _server.ts.js-BfwOLICk.js} +2 -2
  234. package/build/server/chunks/entries/endpoints/api/previews/check/{_server.ts.js-CYRaQ1Q9.js → _server.ts.js-C3dZCo79.js} +8 -6
  235. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/{_server.ts.js-CKz_IHkS.js → _server.ts.js-QCxCUoaZ.js} +9 -7
  236. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/{_server.ts.js-B05Zzw2L.js → _server.ts.js-CIHZWmY6.js} +9 -7
  237. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/{_server.ts.js-DIFxtwPN.js → _server.ts.js-9MZ6ZU7W.js} +9 -7
  238. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/{_server.ts.js-DKPspl_e.js → _server.ts.js-YJgYZpm2.js} +9 -7
  239. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/{_server.ts.js-BzvpX8Lp.js → _server.ts.js-DRO0yFlG.js} +9 -7
  240. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/{_server.ts.js-DaGgjHpa.js → _server.ts.js--78Nc6jj.js} +9 -7
  241. package/build/server/chunks/entries/endpoints/api/second-mates/_id_/peek/{_server.ts.js-BDtqyF9w.js → _server.ts.js-B92-w9Jt.js} +8 -6
  242. package/build/server/chunks/entries/endpoints/api/services/{_server.ts.js-CzCXTD-q.js → _server.ts.js-BlgDs2xk.js} +8 -6
  243. package/build/server/chunks/entries/endpoints/api/setup/{_server.ts.js-f6ZbC1i9.js → _server.ts.js-Cc70st9n.js} +8 -6
  244. package/build/server/chunks/entries/endpoints/api/slots/{_server.ts.js-DeBR06cu.js → _server.ts.js-COmpO5sc.js} +8 -6
  245. package/build/server/chunks/entries/endpoints/api/tasks/_id_/{_server.ts.js-CqZJfk6k.js → _server.ts.js-DcHNA_QH.js} +9 -7
  246. package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/{_server.ts.js-BxqmUBCJ.js → _server.ts.js-BIBAGkdF.js} +8 -6
  247. package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/{_server.ts.js-BdHMgaY-.js → _server.ts.js-DXKDhcRn.js} +8 -6
  248. package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/{_server.ts.js-CcwryXxc.js → _server.ts.js-BgJD7i53.js} +8 -6
  249. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/{_server.ts.js-DN6VppQL.js → _server.ts.js-CxKGr5ok.js} +8 -6
  250. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/helper/{_server.ts.js-CVyRxqaq.js → _server.ts.js-k2erXAMq.js} +8 -6
  251. package/build/server/chunks/entries/endpoints/api/vault/{_server.ts.js-CKtXqbub.js → _server.ts.js-BUmsnNMT.js} +8 -6
  252. package/build/server/chunks/entries/endpoints/api/wheelhouse/source/{_server.ts.js-iwhW_cdh.js → _server.ts.js-Dic1r8FA.js} +2 -2
  253. package/build/server/chunks/entries/endpoints/api/wheelhouse/update/{_server.ts.js-DnF0-ymm.js → _server.ts.js-DCDFOP3H.js} +2 -2
  254. package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/{_server.ts.js-B8tzXzqR.js → _server.ts.js-DyaR3iKq.js} +2 -2
  255. package/build/server/chunks/entries/endpoints/tasks/_id_/review/{_server.ts.js-C_n7oVA8.js → _server.ts.js-Ds9qnblb.js} +8 -6
  256. package/build/server/chunks/entries/{hooks.server.js-D06ps4Om.js → hooks.server.js-BLsrrww8.js} +8 -6
  257. package/build/server/chunks/entries/pages/{_layout.server.ts.js-b_JVQfjI.js → _layout.server.ts.js-CWJXWFa8.js} +2 -2
  258. package/build/server/chunks/entries/pages/{_layout.svelte.js-5WXlsqB3.js → _layout.svelte.js-CuWnZ-US.js} +132 -42
  259. package/build/server/chunks/entries/pages/{_page.server.ts.js-DBb-K68h.js → _page.server.ts.js-DcIo1Fkt.js} +2 -2
  260. package/build/server/chunks/entries/pages/{_page.svelte.js-DFWU8yJc.js → _page.svelte.js-CGR2VowD.js} +35 -21
  261. package/build/server/chunks/entries/pages/decisions/{_page.server.ts.js-C3xd1s3T.js → _page.server.ts.js-Cumc04zT.js} +2 -2
  262. package/build/server/chunks/entries/pages/deck/{_page.server.ts.js-DruCAu5Z.js → _page.server.ts.js-BvnBsHnq.js} +2 -2
  263. package/build/server/chunks/entries/pages/deck/{_page.svelte.js-BE2e7Hyi.js → _page.svelte.js-zqjb3tWK.js} +7 -7
  264. package/build/server/chunks/entries/pages/files/{_page.server.ts.js-CXFi4LV0.js → _page.server.ts.js-DVzHoqMO.js} +2 -2
  265. package/build/server/chunks/entries/pages/harbour/{_page.server.ts.js-DvOPkrBM.js → _page.server.ts.js-BK7WgAXR.js} +2 -2
  266. package/build/server/chunks/entries/pages/harbour/{_page.svelte.js-DW1Zg1aI.js → _page.svelte.js-BmsnWRtI.js} +2 -2
  267. package/build/server/chunks/entries/pages/headroom/{_page.server.ts.js-F2DiEcl8.js → _page.server.ts.js-B_et4vbk.js} +2 -2
  268. package/build/server/chunks/entries/pages/inbox/{_page.server.ts.js-CaMBSVLS.js → _page.server.ts.js-DWY01zRh.js} +2 -2
  269. package/build/server/chunks/entries/pages/inbox/{_page.svelte.js-BddxZY9X.js → _page.svelte.js-DLpzhD2s.js} +4 -4
  270. package/build/server/chunks/entries/pages/more/{_page.svelte.js-CnwXpFY4.js → _page.svelte.js--_4q1cBB.js} +2 -2
  271. package/build/server/chunks/entries/pages/plugins/{_page.svelte.js-Dk84Z-NW.js → _page.svelte.js-CUCt4Yh6.js} +3 -3
  272. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/{_page.server.ts.js-ClGdKDIt.js → _page.server.ts.js-Be_vf2s9.js} +2 -2
  273. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/{_page.svelte.js-BYHP64gx.js → _page.svelte.js-pQ6VEL_L.js} +2 -2
  274. package/build/server/chunks/entries/pages/projects/_id_/{_page.server.ts.js-DEQv1OLm.js → _page.server.ts.js-euICzR6h.js} +3 -3
  275. package/build/server/chunks/entries/pages/projects/_id_/{_page.svelte.js-B9P8UZOd.js → _page.svelte.js-B0wg_ICE.js} +3 -3
  276. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/{_page.server.ts.js-DJFGO-Cc.js → _page.server.ts.js-CO-iqBAD.js} +3 -3
  277. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/{_page.svelte.js-CcwDpwg7.js → _page.svelte.js-2F9iPWld.js} +2 -2
  278. package/build/server/chunks/entries/pages/projects/_id_/passage/{_page.server.ts.js-DjGE65vR.js → _page.server.ts.js-DzQmyVut.js} +4 -4
  279. package/build/server/chunks/entries/pages/projects/_id_/passage/{_page.svelte.js-B3HRzAzL.js → _page.svelte.js-CRoYOdvp.js} +2 -2
  280. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/{_page.server.ts.js-BmjN06QJ.js → _page.server.ts.js-ByePQa4g.js} +2 -2
  281. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/{_page.svelte.js-DaA-EDRZ.js → _page.svelte.js-C-4CQ9Vj.js} +2 -2
  282. package/build/server/chunks/entries/pages/remotes/{_page.server.ts.js-BCYsX8Qf.js → _page.server.ts.js-DRj_7nDd.js} +2 -2
  283. package/build/server/chunks/entries/pages/remotes/{_page.svelte.js-BSG7dgKM.js → _page.svelte.js-jCBA0xmJ.js} +2 -2
  284. package/build/server/chunks/entries/pages/second-mates/{_page.svelte.js-Dd467IE0.js → _page.svelte.js-3euUM2q5.js} +2 -2
  285. package/build/server/chunks/entries/pages/settings/cloud/{_page.server.ts.js-CVexEhWo.js → _page.server.ts.js-QWGL2-Cn.js} +2 -2
  286. package/build/server/chunks/entries/pages/settings/cloud/{_page.svelte.js-CCSostfV.js → _page.svelte.js-ZcLxf_7V.js} +2 -2
  287. package/build/server/chunks/entries/pages/settings/gateway/{_page.server.ts.js-BHoaQS8-.js → _page.server.ts.js-DAOkZ-fE.js} +2 -2
  288. package/build/server/chunks/entries/pages/settings/plugins/{_page.server.ts.js-DnPR5x0p.js → _page.server.ts.js-jeZvTAgT.js} +2 -2
  289. package/build/server/chunks/entries/pages/settings/plugins/{_page.svelte.js-CtZUu0ww.js → _page.svelte.js-CVkf5sHc.js} +3 -3
  290. package/build/server/chunks/entries/pages/settings/plugins/_plugin_/{_page.server.ts.js-BBTiKiTp.js → _page.server.ts.js-Bzo5Uals.js} +2 -2
  291. package/build/server/chunks/entries/pages/settings/plugins/_plugin_/{_page.svelte.js-BL9OERy0.js → _page.svelte.js-Dn6-A1cY.js} +3 -3
  292. package/build/server/chunks/entries/pages/settings/setup/{_page.server.ts.js-UhPQcuM0.js → _page.server.ts.js-1XiCbDhc.js} +2 -2
  293. package/build/server/chunks/entries/pages/settings/update/{_page.server.ts.js-DQJnyFPr.js → _page.server.ts.js-DwYnrxXG.js} +2 -2
  294. package/build/server/chunks/entries/pages/setup/{_page.server.ts.js-ZaOlhvmr.js → _page.server.ts.js-DP--6Ko6.js} +3 -3
  295. package/build/server/chunks/entries/pages/setup/{_page.svelte.js-BgqCbRCh.js → _page.svelte.js-CB6DNUFE.js} +110 -87
  296. package/build/server/chunks/entries/pages/tasks/_id_/{_page.server.ts.js-DomAdSYf.js → _page.server.ts.js-Dl0z8pkQ.js} +3 -3
  297. package/build/server/chunks/entries/pages/tasks/_id_/{_page.svelte.js-016yK-eG.js → _page.svelte.js-Cali_YuK.js} +7 -6
  298. package/build/server/chunks/entries/pages/tasks/_id_/doc/{_page.server.ts.js-B3OWfHLh.js → _page.server.ts.js-CyPpYkuJ.js} +2 -2
  299. package/build/server/chunks/entries/pages/time/{_page.server.ts.js-D3R_fKKg.js → _page.server.ts.js-DlcJgtrb.js} +2 -2
  300. package/build/server/chunks/{handler-LFdZeRhM.js → handler-pU2T6cxW.js} +3 -3
  301. package/build/server/chunks/{index.js-BXq0LqPz.js → index.js-B3YyBD1_.js} +2 -2
  302. package/build/server/chunks/{manifest.js-aLGKYQ2c.js → manifest.js-D3OqJAbv.js} +86 -86
  303. package/build/server/chunks/nodes/{0.js-cZzmSKzn.js → 0.js-DapnlcBu.js} +12 -10
  304. package/build/server/chunks/nodes/{1.js-OfqTUBqN.js → 1.js-B2zVBiHu.js} +2 -2
  305. package/build/server/chunks/nodes/{10.js-XZMNgA-_.js → 10.js-CwfaDBrN.js} +3 -3
  306. package/build/server/chunks/nodes/{11.js-BQsBxnqW.js → 11.js-BSKCzLBk.js} +11 -9
  307. package/build/server/chunks/nodes/{12.js-BtN6NNws.js → 12.js-Cw0R3pzN.js} +12 -10
  308. package/build/server/chunks/nodes/{13.js-TYF306j2.js → 13.js-1CllvmKU.js} +12 -10
  309. package/build/server/chunks/nodes/{14.js-paIqFLgN.js → 14.js-Duo10iYX.js} +13 -11
  310. package/build/server/chunks/nodes/{15.js-Cnov1YR7.js → 15.js-yyKjbIPm.js} +12 -10
  311. package/build/server/chunks/nodes/{16.js-ELBvJEOW.js → 16.js-Bw3O413k.js} +7 -7
  312. package/build/server/chunks/nodes/{17.js-Ca8V-3qj.js → 17.js-CKJWbBiG.js} +3 -3
  313. package/build/server/chunks/nodes/{19.js-Cnn9fSef.js → 19.js-gqmNp-1X.js} +7 -7
  314. package/build/server/chunks/nodes/{2.js-CAfs3Ddj.js → 2.js-DbAE0QSU.js} +11 -9
  315. package/build/server/chunks/nodes/{20.js-Dd2o-zjp.js → 20.js-DyVwaMHk.js} +10 -8
  316. package/build/server/chunks/nodes/{21.js-BoKvVAba.js → 21.js-UWLpwye1.js} +11 -9
  317. package/build/server/chunks/nodes/{22.js-Dsqrw0IR.js → 22.js-DjQqtx9a.js} +11 -9
  318. package/build/server/chunks/nodes/{23.js-DKVqYHOy.js → 23.js-BRxy911D.js} +11 -9
  319. package/build/server/chunks/nodes/{24.js-BTDlc3cd.js → 24.js-QS0KOwss.js} +4 -4
  320. package/build/server/chunks/nodes/{25.js-B_TBD0eZ.js → 25.js-PQ5YJuMR.js} +12 -10
  321. package/build/server/chunks/nodes/{26.js-kw2HsE7Z.js → 26.js-CVgNTrxq.js} +12 -10
  322. package/build/server/chunks/nodes/{27.js-ChPlnFqh.js → 27.js-D362fjZ7.js} +11 -9
  323. package/build/server/chunks/nodes/{28.js-gkTtK_J_.js → 28.js-CquKiHnq.js} +10 -8
  324. package/build/server/chunks/nodes/{3.js-56YxWA1q.js → 3.js-_ZrsIscU.js} +10 -8
  325. package/build/server/chunks/nodes/{4.js-QNM4W7ly.js → 4.js-CMBAdl6x.js} +11 -9
  326. package/build/server/chunks/nodes/{5.js-CW12fKyW.js → 5.js-DRAnyeo0.js} +9 -7
  327. package/build/server/chunks/nodes/{6.js-CJ0pRLBP.js → 6.js-CWsHGKdF.js} +11 -9
  328. package/build/server/chunks/nodes/{7.js-_jRitR1O.js → 7.js-BzkPQGE-.js} +10 -8
  329. package/build/server/chunks/nodes/{8.js-Wz8EKcS3.js → 8.js-DppreJ1j.js} +11 -9
  330. package/build/server/chunks/nodes/{9.js-DWh3J_q7.js → 9.js-CWCKh6Lz.js} +3 -3
  331. package/dist/cli.js +1043 -261
  332. package/dist/wh-vault.js +1 -1
  333. package/package.json +1 -1
  334. package/skills/manage-wheelhouse/SKILL.md +1 -1
  335. package/skills/manage-wheelhouse/references/operations.md +5 -4
  336. package/build/client/_app/immutable/assets/0.CjeOh6H-.css +0 -1
  337. package/build/client/_app/immutable/assets/0.CjeOh6H-.css.br +0 -0
  338. package/build/client/_app/immutable/assets/0.CjeOh6H-.css.gz +0 -0
  339. package/build/client/_app/immutable/chunks/-UC3yquZ.js.br +0 -0
  340. package/build/client/_app/immutable/chunks/-UC3yquZ.js.gz +0 -0
  341. package/build/client/_app/immutable/chunks/4JI5fA27.js.br +0 -0
  342. package/build/client/_app/immutable/chunks/4JI5fA27.js.gz +0 -0
  343. package/build/client/_app/immutable/chunks/B6Xfoyj4.js.br +0 -0
  344. package/build/client/_app/immutable/chunks/B6Xfoyj4.js.gz +0 -0
  345. package/build/client/_app/immutable/chunks/BCRg__8v.js.br +0 -0
  346. package/build/client/_app/immutable/chunks/BCRg__8v.js.gz +0 -0
  347. package/build/client/_app/immutable/chunks/BHmiFpwn.js.br +0 -0
  348. package/build/client/_app/immutable/chunks/BHmiFpwn.js.gz +0 -0
  349. package/build/client/_app/immutable/chunks/BfUcVuHG.js.br +0 -0
  350. package/build/client/_app/immutable/chunks/BfUcVuHG.js.gz +0 -0
  351. package/build/client/_app/immutable/chunks/BqMdGvwc.js.br +0 -0
  352. package/build/client/_app/immutable/chunks/BqMdGvwc.js.gz +0 -0
  353. package/build/client/_app/immutable/chunks/CA_poXX0.js.br +0 -0
  354. package/build/client/_app/immutable/chunks/CA_poXX0.js.gz +0 -0
  355. package/build/client/_app/immutable/chunks/CBeiP5A_.js.br +0 -0
  356. package/build/client/_app/immutable/chunks/CBeiP5A_.js.gz +0 -0
  357. package/build/client/_app/immutable/chunks/CSoC52Vx.js.br +0 -0
  358. package/build/client/_app/immutable/chunks/CSoC52Vx.js.gz +0 -0
  359. package/build/client/_app/immutable/chunks/CTLz5ghs.js.br +0 -0
  360. package/build/client/_app/immutable/chunks/CTLz5ghs.js.gz +0 -0
  361. package/build/client/_app/immutable/chunks/CcafVx98.js.br +0 -3
  362. package/build/client/_app/immutable/chunks/CcafVx98.js.gz +0 -0
  363. package/build/client/_app/immutable/chunks/CpqCFuwf.js.br +0 -0
  364. package/build/client/_app/immutable/chunks/CpqCFuwf.js.gz +0 -0
  365. package/build/client/_app/immutable/chunks/CxJQEvmu.js.br +0 -0
  366. package/build/client/_app/immutable/chunks/CxJQEvmu.js.gz +0 -0
  367. package/build/client/_app/immutable/chunks/DKQe4Tss.js.br +0 -0
  368. package/build/client/_app/immutable/chunks/DZ6A9wfS.js.br +0 -0
  369. package/build/client/_app/immutable/chunks/DZ6A9wfS.js.gz +0 -0
  370. package/build/client/_app/immutable/chunks/DebP8q1f.js.br +0 -0
  371. package/build/client/_app/immutable/chunks/DebP8q1f.js.gz +0 -0
  372. package/build/client/_app/immutable/chunks/DkrGZW5a.js.br +0 -0
  373. package/build/client/_app/immutable/chunks/DkrGZW5a.js.gz +0 -0
  374. package/build/client/_app/immutable/chunks/DmYimTF4.js.br +0 -0
  375. package/build/client/_app/immutable/chunks/DmYimTF4.js.gz +0 -0
  376. package/build/client/_app/immutable/chunks/HX17oQGV.js.br +0 -0
  377. package/build/client/_app/immutable/chunks/HX17oQGV.js.gz +0 -0
  378. package/build/client/_app/immutable/chunks/aicrexzH.js.br +0 -0
  379. package/build/client/_app/immutable/chunks/aicrexzH.js.gz +0 -0
  380. package/build/client/_app/immutable/chunks/cAfuCUf-.js.br +0 -0
  381. package/build/client/_app/immutable/chunks/cAfuCUf-.js.gz +0 -0
  382. package/build/client/_app/immutable/chunks/vll1K05s.js +0 -12
  383. package/build/client/_app/immutable/chunks/vll1K05s.js.br +0 -0
  384. package/build/client/_app/immutable/chunks/vll1K05s.js.gz +0 -0
  385. package/build/client/_app/immutable/chunks/wU4H_Xw3.js +0 -1
  386. package/build/client/_app/immutable/chunks/wU4H_Xw3.js.br +0 -0
  387. package/build/client/_app/immutable/chunks/wU4H_Xw3.js.gz +0 -0
  388. package/build/client/_app/immutable/chunks/yLdhLQbD.js.br +0 -0
  389. package/build/client/_app/immutable/chunks/yLdhLQbD.js.gz +0 -0
  390. package/build/client/_app/immutable/chunks/yYKc4xgI.js.br +0 -0
  391. package/build/client/_app/immutable/chunks/yYKc4xgI.js.gz +0 -0
  392. package/build/client/_app/immutable/entry/app.CLSymNWl.js +0 -2
  393. package/build/client/_app/immutable/entry/app.CLSymNWl.js.br +0 -0
  394. package/build/client/_app/immutable/entry/app.CLSymNWl.js.gz +0 -0
  395. package/build/client/_app/immutable/entry/start.D4AIF2Ao.js +0 -1
  396. package/build/client/_app/immutable/entry/start.D4AIF2Ao.js.br +0 -0
  397. package/build/client/_app/immutable/entry/start.D4AIF2Ao.js.gz +0 -0
  398. package/build/client/_app/immutable/nodes/0.Bk5Y_mtP.js +0 -10
  399. package/build/client/_app/immutable/nodes/0.Bk5Y_mtP.js.br +0 -0
  400. package/build/client/_app/immutable/nodes/0.Bk5Y_mtP.js.gz +0 -0
  401. package/build/client/_app/immutable/nodes/1.DMeNq-MM.js.br +0 -0
  402. package/build/client/_app/immutable/nodes/1.DMeNq-MM.js.gz +0 -0
  403. package/build/client/_app/immutable/nodes/10.C85i7naL.js.br +0 -0
  404. package/build/client/_app/immutable/nodes/10.C85i7naL.js.gz +0 -0
  405. package/build/client/_app/immutable/nodes/11.B3oT5Eyb.js.br +0 -0
  406. package/build/client/_app/immutable/nodes/11.B3oT5Eyb.js.gz +0 -0
  407. package/build/client/_app/immutable/nodes/12.CzGzD4iD.js.br +0 -0
  408. package/build/client/_app/immutable/nodes/12.CzGzD4iD.js.gz +0 -0
  409. package/build/client/_app/immutable/nodes/13.hmYycyBf.js.br +0 -0
  410. package/build/client/_app/immutable/nodes/13.hmYycyBf.js.gz +0 -0
  411. package/build/client/_app/immutable/nodes/14.KtuQwZ-C.js.br +0 -0
  412. package/build/client/_app/immutable/nodes/14.KtuQwZ-C.js.gz +0 -0
  413. package/build/client/_app/immutable/nodes/15.C7QObash.js.br +0 -0
  414. package/build/client/_app/immutable/nodes/15.C7QObash.js.gz +0 -0
  415. package/build/client/_app/immutable/nodes/16.BJOpVasQ.js.br +0 -0
  416. package/build/client/_app/immutable/nodes/16.BJOpVasQ.js.gz +0 -0
  417. package/build/client/_app/immutable/nodes/17.Bk-1GRlF.js.br +0 -0
  418. package/build/client/_app/immutable/nodes/17.Bk-1GRlF.js.gz +0 -0
  419. package/build/client/_app/immutable/nodes/19.lzLFSTUS.js.br +0 -3
  420. package/build/client/_app/immutable/nodes/19.lzLFSTUS.js.gz +0 -0
  421. package/build/client/_app/immutable/nodes/2.D1A41fuz.js +0 -25
  422. package/build/client/_app/immutable/nodes/2.D1A41fuz.js.br +0 -0
  423. package/build/client/_app/immutable/nodes/2.D1A41fuz.js.gz +0 -0
  424. package/build/client/_app/immutable/nodes/20.DqOEVNtJ.js.br +0 -0
  425. package/build/client/_app/immutable/nodes/20.DqOEVNtJ.js.gz +0 -0
  426. package/build/client/_app/immutable/nodes/21.BmaCB5Rb.js.br +0 -0
  427. package/build/client/_app/immutable/nodes/21.BmaCB5Rb.js.gz +0 -0
  428. package/build/client/_app/immutable/nodes/22.D4F9Jlfe.js.br +0 -0
  429. package/build/client/_app/immutable/nodes/22.D4F9Jlfe.js.gz +0 -0
  430. package/build/client/_app/immutable/nodes/23.CGv8T_kx.js.br +0 -0
  431. package/build/client/_app/immutable/nodes/23.CGv8T_kx.js.gz +0 -0
  432. package/build/client/_app/immutable/nodes/24.DKrgSigC.js.br +0 -0
  433. package/build/client/_app/immutable/nodes/24.DKrgSigC.js.gz +0 -0
  434. package/build/client/_app/immutable/nodes/25.DsBTVUcU.js +0 -12
  435. package/build/client/_app/immutable/nodes/25.DsBTVUcU.js.br +0 -0
  436. package/build/client/_app/immutable/nodes/25.DsBTVUcU.js.gz +0 -0
  437. package/build/client/_app/immutable/nodes/26.5XFLLXwF.js.br +0 -0
  438. package/build/client/_app/immutable/nodes/26.5XFLLXwF.js.gz +0 -0
  439. package/build/client/_app/immutable/nodes/27.BgW1QGtl.js.br +0 -0
  440. package/build/client/_app/immutable/nodes/27.BgW1QGtl.js.gz +0 -0
  441. package/build/client/_app/immutable/nodes/28.DeOjXHlX.js.br +0 -0
  442. package/build/client/_app/immutable/nodes/28.DeOjXHlX.js.gz +0 -0
  443. package/build/client/_app/immutable/nodes/3.Dh_akpU9.js.br +0 -0
  444. package/build/client/_app/immutable/nodes/3.Dh_akpU9.js.gz +0 -0
  445. package/build/client/_app/immutable/nodes/4.Bs1kn53S.js.br +0 -0
  446. package/build/client/_app/immutable/nodes/4.Bs1kn53S.js.gz +0 -0
  447. package/build/client/_app/immutable/nodes/6.C71EcMPx.js.br +0 -0
  448. package/build/client/_app/immutable/nodes/6.C71EcMPx.js.gz +0 -0
  449. package/build/client/_app/immutable/nodes/7.ZTOGuaHI.js.br +0 -0
  450. package/build/client/_app/immutable/nodes/7.ZTOGuaHI.js.gz +0 -0
  451. package/build/client/_app/immutable/nodes/8.CvoRv_Q7.js.br +0 -0
  452. package/build/client/_app/immutable/nodes/8.CvoRv_Q7.js.gz +0 -0
  453. package/build/client/_app/immutable/nodes/9.BKcDiRzn.js.br +0 -0
  454. package/build/client/_app/immutable/nodes/9.BKcDiRzn.js.gz +0 -0
@@ -1,5 +1,5 @@
1
- import"./DsnmJJEf.js";import{m as g,g as l,v as m,p as Y,u as R,A as $,f as Z,s as tt,t as q,a as W,b as et,i as _,o as st,d as nt,c as V,q as N}from"./D46tdsTs.js";import{i as rt}from"./DWAM9c1z.js";import{s as ot}from"./BLivoCTk.js";import{b as it}from"./RbWQh321.js";import{p as C}from"./z5Xef_-v.js";import{p as at}from"./CcafVx98.js";import{S as A}from"./BXN538J3.js";import{r as P}from"./xjN9NojQ.js";import{w as ut}from"./aicrexzH.js";const ct=new Set(["127.0.0.1","localhost","0.0.0.0","[::1]"]),lt=e=>Number.isInteger(e)&&e>=1&&e<=65535;function dt(e){const t=e.indexOf("{port}"),s=e.indexOf("/",e.indexOf("://")+3);return t>=0&&(s<0||t<s)}function ht(e){const t=URL.parse(e);if(!t||t.protocol!=="http:"&&t.protocol!=="https:"||t.username||t.password||!ct.has(t.hostname.toLowerCase()))return null;const s=Number(t.port||(t.protocol==="https:"?443:80));return lt(s)?s:null}function D(e,t){const s=ht(e);if(s===null||t.reserved?.includes(s))return e;const n=new URL(e);return`${t.pattern.replace("{port}",String(s)).replace(/\/+$/,"")}${n.pathname}${n.search}${n.hash}`}const X=new Set(["127.0.0.1","localhost"]);function te(e,t){const s="allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox";let n=!0;try{n=new URL(e).origin===t}catch{}return n?s:`${s} allow-same-origin`}const mt=e=>Number.isInteger(e)&&e>=1&&e<=65535;function ft(e){const t=URL.parse(e);if(!t||t.protocol!=="http:"||t.username||t.password||!X.has(t.hostname.toLowerCase()))return null;const s=t.port?Number(t.port):80;return mt(s)?s:null}function pt(e,t,s){const n=t?ft(e):null;if(n===null||!t)return e;const r=s.port||(s.protocol==="https:"?"443":"80");if(X.has(s.hostname.toLowerCase())&&String(n)===r)return e;const i=new URL(e),a=t.replace("{port}",String(n));return`${s.protocol}//${a}${s.port?`:${s.port}`:""}${i.pathname}${i.search}${i.hash}`}class gt{#t=g(null);get to(){return l(this.#t)}set to(t){m(this.#t,t,!0)}#e=g(null);get remote(){return l(this.#e)}set remote(t){m(this.#e,t,!0)}#s=g(null);get hosted(){return l(this.#s)}set hosted(t){m(this.#s,t,!0)}get active(){return!!(this.remote||this.hosted||this.to)}view(t){return this.remote?P(t,this.remote,location.origin):this.hosted?D(t,this.hosted):this.to?pt(t,this.to,location):t}sandbox(t){return this.remote?P(t,this.remote,location.origin):this.hosted&&dt(this.hosted.pattern)?D(t,{pattern:this.hosted.pattern}):t}}const O=new gt;function ee(e){const t=n=>{if(!O.active)return;const r=n.composedPath().find(a=>a instanceof HTMLAnchorElement&&a.hasAttribute("href"));if(!r)return;const i=O.view(r.href);i!==r.href&&(r.href=i)},s=["click","auxclick","contextmenu","dragstart"];for(const n of s)e.addEventListener(n,t,!0);return()=>{for(const n of s)e.removeEventListener(n,t,!0)}}async function yt(e,t,s,n=`wh-${crypto.randomUUID()}`){try{const r=await fetch(`/api/plugins/${encodeURIComponent(e)}/feedback`,{method:"POST",headers:{"content-type":"application/json","idempotency-key":n,[A]:s},body:JSON.stringify(t)});if(r.ok){const a=await r.json().catch(()=>null);return a?.message?.delivery==="failed"?{ok:!1,error:a.message.deliveryDetail??"Firstmate did not take the list."}:{ok:!0,pending:r.status===202}}return{ok:!1,error:(await r.json().catch(()=>null))?.message??`Wheelhouse answered ${r.status}.`}}catch{return{ok:!1,error:"Could not reach the Wheelhouse server."}}}async function kt(e,t,s){try{const n=await fetch(`/api/plugins/${encodeURIComponent(e)}/feedback/summary`,{method:"POST",headers:{"content-type":"application/json",[A]:s},body:JSON.stringify(t)}),r=await n.json().catch(()=>null);return n.ok&&Array.isArray(r?.points)?{ok:!0,points:r.points}:{ok:!1,error:r?.message??`Wheelhouse answered ${n.status}.`}}catch{return{ok:!1,error:"Could not reach the Wheelhouse server."}}}const bt=e=>new URLSearchParams({plugin:e.plugin,service:e.service,...e.project?{project:e.project}:{}}).toString();async function wt(e){try{const t=await fetch(`/api/services?${bt(e)}`);return t.ok?await t.json():null}catch{return null}}async function vt(e,t,s=null){const n=window.open("","_blank");try{n?.document.write('<!doctype html><title>Starting…</title><body style="font:15px system-ui;margin:3rem;color:#14213d;background:#f6f2e9">Wheelhouse is starting it; this tab opens it when it answers.</body>')}catch{}let r=null;try{const a=await fetch("/api/services",{method:"POST",headers:{"content-type":"application/json",[A]:t},body:JSON.stringify({plugin:e.plugin,service:e.service,project:e.project??null})});r=a.ok?await a.json():{...await a.json().catch(()=>({})),state:"failed",reason:`Wheelhouse could not start it (${a.status}).`}}catch{r=null}const i=r?.state==="running"?s??r.url:null;if(i){const a=O.view(i);n?n.location.href=a:window.open(a,"_blank")}else n?.close();return r}const St=5e3,U=new Map;function xt(e,t){let s=U.get(e);return s||(s=t(e).catch(n=>{throw U.delete(e),n}),U.set(e,s)),s}const F=()=>typeof navigator>"u"||!navigator.userActivation?!0:navigator.userActivation.isActive;function _t(e,t){const s=e.pluginId,n=(i,a)=>{if(typeof i!="string"||!i)throw new TypeError("Name a service.");const d=a===void 0?e.projectId:a;return{plugin:s,service:i,project:typeof d=="string"&&d?d:null}},r=i=>{const a=typeof i=="object"&&i!==null?i:{},d=typeof a.task=="string"&&a.task?a.task:e.taskId??null;return d?{taskId:d,subject:typeof a.subject=="string"?a.subject:null,items:Array.isArray(a.items)?a.items:[]}:null};return Object.freeze({pluginId:s,service:async(i,a={})=>t.status(n(i,a.project)),launch:async(i,a={})=>t.launch(n(i,a.project),t.token(),typeof a.open=="string"?a.open:null),sendFeedback:async i=>{if(!(t.clicked??F)())return{ok:!1,error:"Feedback is sent only when the captain clicks to send it."};const a=r(i);return a?t.feedback(s,a,t.token()):{ok:!1,error:"Name the task the feedback is about."}},summariseFeedback:async i=>{if(!(t.clicked??F)())return{ok:!1,error:"Feedback is summarised only when the captain clicks to."};if(!t.summarise)return{ok:!1,error:"This page cannot summarise feedback."};const a=r(i);return a?t.summarise(s,a,t.token()):{ok:!1,error:"Name the task the feedback is about."}}})}async function Et(e,t){if(!customElements.get(t.tag)){if(!t.ui)throw new Error("this Wheelhouse has no UI bundle for it");try{await xt(t.ui,t.importer??(r=>import(r)))}catch(r){throw new Error(`its UI bundle did not load (${r instanceof Error?r.message:String(r)})`)}let n;try{await Promise.race([customElements.whenDefined(t.tag),new Promise((r,i)=>{n=setTimeout(()=>i(new Error(`its UI bundle does not define <${t.tag}>`)),t.timeoutMs??St)})])}finally{clearTimeout(n)}}const s=document.createElement(t.tag);return t.host&&(s.host=t.host),s.entry=t.entry,s.data=t.data,e.append(s),s}var Tt=V('<p class="text-sm text-muted-foreground"> </p>'),At=V('<div class="contents"></div> <!>',1);function se(e,t){Y(t,!0);let s=C(t,"preview",3,void 0),n=C(t,"quiet",3,!1);const r=_(()=>"element"in t.entry.render?t.entry.render.element:""),i=_(()=>t.entry.ui??null);let a=g(null),d=g(null),b=g(null);R(()=>{if(!l(a)||!l(r))return;const k=l(a);let v=!1,T=null;return m(b,null),Et(k,{tag:l(r),ui:l(i),data:$(()=>t.data),entry:$(()=>t.entry),host:_t($(()=>t.entry),{status:wt,launch:vt,feedback:yt,summarise:kt,token:()=>at.data.sessionToken??""}),importer:t.importer}).then(o=>{T=o,v?o.remove():m(d,o,!0)},o=>{v||m(b,o.message,!0)}),()=>{v=!0,T?.remove(),m(d,null)}}),R(()=>{l(d)&&(s()!==void 0&&(l(d).preview=s()),l(d).entry=t.entry,l(d).data=t.data)});var y=At(),x=Z(y);it(x,k=>m(a,k),()=>l(a));var E=tt(x,2);{var w=k=>{var v=Tt(),T=st(v);q(()=>nt(T,`Not available. The ${t.entry.pluginId??""} plugin’s element could not be shown: ${l(b)??""}.`)),W(k,v)};rt(E,k=>{l(b)&&!n()&&k(w)})}q(()=>ot(x,"data-plugin-element",l(r))),W(e,y),et()}const jt=/^(captain[,.!]?\s*)?(shipshape|all (is )?well|all quiet|nothing (new )?to report)[.!]?$/i,J=/^\[Request interrupted by user/,It=/\u001b\[[0-9;?]*[A-Za-z]/g,L=e=>String(e??"").split("/").filter(Boolean).pop()??"",M=e=>String(e??"").split(`
2
- `)[0].trim(),$t=e=>{try{return new URL(String(e)).host}catch{return String(e??"")}};function Ut(e,t){switch(e){case"Bash":return{verb:"Ran",summary:t.description||M(t.command),noun:["command","commands"]};case"Read":return{verb:"Read",summary:L(t.file_path),noun:["file read","files read"]};case"Edit":case"MultiEdit":return{verb:"Edited",summary:L(t.file_path),noun:["edit","edits"]};case"Write":return{verb:"Wrote",summary:L(t.file_path),noun:["file written","files written"]};case"Grep":return{verb:"Searched code for",summary:String(t.pattern??""),noun:["code search","code searches"]};case"Glob":return{verb:"Listed files",summary:String(t.pattern??""),noun:["file listing","file listings"]};case"WebSearch":return{verb:"Searched the web for",summary:String(t.query??""),noun:["web search","web searches"]};case"WebFetch":return{verb:"Read page",summary:$t(t.url),noun:["page read","pages read"]};case"Skill":return{verb:"Used skill",summary:String(t.skill??""),noun:["skill","skills"]};case"ToolSearch":return{verb:"Loaded tools",summary:M(t.query),noun:["tool lookup","tool lookups"]};case"Agent":case"Task":return{verb:"Asked a helper",summary:t.description||M(t.prompt),noun:["helper","helpers"]};case"TodoWrite":return{verb:"Updated the plan",summary:"",noun:["plan update","plan updates"]};case"SendMessage":return{verb:"Messaged",summary:String(t.to??""),noun:["message","messages"]};default:{const s=e.match(/^mcp__(.+?)__(.+)$/);return s?{verb:"Used",summary:`${s[2].replace(/_/g," ")} (${s[1]})`,noun:["tool call","tool calls"]}:{verb:"Used",summary:e,noun:["tool call","tool calls"]}}}}function Lt(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>t?.type==="text"?String(t.text??""):t?.type==="image"?"[image]":t?.type==="tool_reference"?`[tool: ${t.tool_name??""}]`:`[${t?.type??"item"}]`).join(`
3
- `):""}const j=e=>e.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g,"").replace(/<\/?pasted_content(?:\s+id="[^"]*")?\s*>\n?/g,"").trim(),Mt=/<system-reminder>\s*The user sent a new message while you were working:\n([\s\S]*?)(?:\n\nThis is how Claude Code (?:(?!\n\n)[\s\S])*)?\s*<\/system-reminder>/,H=e=>{const t=e.match(Mt);return t&&j(t[1])||null};function I(e,t){const s=e.match(new RegExp(`<${t}>([\\s\\S]*?)</${t}>`));return s?s[1].trim():null}function B(e){const t=I(e,"command-name");if(!t)return null;const s=I(e,"command-args");return s?`${t} ${s}`:t}function Ot(e){return(Array.isArray(e?.questions)?e.questions:[]).map(s=>({header:String(s?.header??""),question:String(s?.question??""),multiSelect:s?.multiSelect===!0,options:(Array.isArray(s?.options)?s.options:[]).map(n=>({label:String(n?.label??""),description:String(n?.description??"")}))}))}function Rt(e,t){const s=e.toolUseResult?.answers;if(s&&typeof s=="object")return Object.fromEntries(Object.entries(s).map(([r,i])=>[r,String(i)]));const n={};for(const r of t.matchAll(/"([^"]+)"="([^"]*)"/g))n[r[1]]=r[2];return n}function qt(e){const t=[],s=new Map,n=new Map;let r=null,i=null,a=null,d=null,b=!1;const y=()=>{i=null},x=o=>(i||(i={kind:"turn",id:o.uuid,parts:[],at:o.timestamp,durationMs:null,done:!1,interrupted:!1,trigger:b?"background":"captain"},b=!1,t.push(i),a=i),i),E=o=>{const p=x(o),u=p.parts[p.parts.length-1];if(u?.kind==="activity")return u;const c={kind:"activity",id:`${o.uuid}-a`,steps:[]};return p.parts.push(c),c},w=(o,p,u={})=>{y(),b=!1,t.push({kind:"user",id:o.uuid,text:p,at:o.timestamp,queued:!!u.queued,command:!!u.command})},k=(o,p,u,c=o.uuid)=>{i&&E(o).steps.push({kind:"context",id:c,label:p,detail:u})};for(const o of e){if(!o||typeof o!="object"||o.isSidechain)continue;const p=o.timestamp??null;switch(o.type){case"ai-title":r=o.aiTitle??r;break;case"user":{const u=o.message?.content;if(typeof u=="string")if(o.origin?.kind==="task-notification"||u.trimStart().startsWith("<task-notification>"))y(),b=!0;else if(o.isMeta){const c=H(u);c?w(o,c,{queued:!0}):k(o,"Context added",u)}else if(J.test(u.trim()))a&&(a.interrupted=!0);else{const c=B(u);if(c)w(o,c,{command:!0});else if(!u.includes("<local-command-stdout>")){const h=j(u);h&&w(o,h)}}else if(Array.isArray(u))for(const c of u)if(c?.type==="tool_result"){const h=Lt(c.content),f=s.get(c.tool_use_id);f&&(f.result=h,f.isError=!!c.is_error);const S=n.get(c.tool_use_id);S&&(S.answers=c.is_error?{}:Rt(o,h))}else if(c?.type==="text"){const h=String(c.text??""),f=H(h);if(J.test(h.trim()))a&&(a.interrupted=!0);else if(f)w(o,f,{queued:!0});else if(o.isMeta||o.sourceToolUseID){const S=h.startsWith("Base directory for this skill")?"Skill instructions loaded":"Context added";k(o,S,h,`${o.uuid}-${S}`)}else{const S=j(h);S&&w(o,S)}}else c?.type==="image"&&w(o,"[image]");break}case"assistant":{for(const u of o.message?.content??[])if(u?.type==="thinking"||u?.type==="redacted_thinking"){const c=d&&p?Date.parse(p)-Date.parse(d):null;E(o).steps.push({kind:"thinking",id:`${o.uuid}-th`,ms:c})}else if(u?.type==="tool_use"&&u.name==="AskUserQuestion"){const c={kind:"question",id:u.id,questions:Ot(u.input),answers:null};n.set(u.id,c),x(o).parts.push(c)}else if(u?.type==="tool_use"){const c=Ut(String(u.name),u.input??{}),h={kind:"tool",id:u.id,name:String(u.name),...c,input:u.input,result:null,isError:!1};s.set(u.id,h),E(o).steps.push(h)}else if(u?.type==="text"){if(!String(u.text??"").trim())continue;x(o).parts.push({kind:"text",id:`${o.uuid}-t`,text:u.text})}break}case"attachment":{const u=o.attachment??{};if(u.type==="queued_command"&&typeof u.prompt=="string"&&(u.commandMode??"prompt")==="prompt"){const c=j(u.prompt);c&&w(o,c,{queued:!0})}else if(u.type==="hook_additional_context"){const c=Array.isArray(u.content)?u.content.join(`
4
- `):String(u.content??"");k(o,`Hook added context${u.hookEvent?` (${u.hookEvent})`:""}`,c)}break}case"system":{if(o.subtype==="turn_duration")a&&(a.durationMs=o.durationMs??null,a.done=!0),y();else if(o.subtype==="away_summary")y(),t.push({kind:"notice",id:o.uuid,title:"While you were away",detail:String(o.content??""),at:o.timestamp});else if(o.subtype==="local_command"){const u=String(o.content??""),c=I(u,"local-command-stdout")??I(u,"local-command-stderr"),h=B(u);if(h)w(o,h,{command:!0});else if(c!==null){const f=c.replace(It,"").trim();f&&t.push({kind:"output",id:o.uuid,text:f,at:o.timestamp})}}break}}p&&(d=p)}const v=[];return{items:t.filter((o,p)=>{if(o.kind!=="turn"||o.trigger!=="background")return!0;const u=o.parts.filter(f=>f.kind==="text").map(f=>f.text).join(`
5
- `).trim(),h=!o.parts.some(f=>f.kind==="question")&&(!u||jt.test(u));return v.push({id:o.id,at:o.at,durationMs:o.durationMs,done:o.done||p<t.length-1,outcome:h?"quiet":"reported"}),!h}),title:r,checks:v}}function ne(e){const t=new Map;let s=!1,n=0;for(const i of e){if(i.kind==="thinking"&&(s=!0,n+=i.ms??0),i.kind!=="tool")continue;const a=t.get(i.noun[0])??{n:0,noun:i.noun};a.n++,t.set(i.noun[0],a)}const r=[...t.values()].map(i=>`${i.n} ${i.n===1?i.noun[0]:i.noun[1]}`);return r.length?r.join(", "):s?n>=1e3?`Thought for ${Wt(n)}`:"Thought briefly":"Read some context"}function Wt(e){if(e==null||e<0)return"";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const s=Math.floor(t/60);return s<60?`${s}m ${t%60}s`:`${Math.floor(s/60)}h ${s%60}m`}function re(e){const t=[];for(const s of e)if(s.kind==="turn"){for(const n of s.parts)if(n.kind==="activity")for(const r of n.steps)r.kind==="tool"&&r.result!==null&&r.name.startsWith("mcp__")&&t.push(r.id)}return t}const Nt=2,Q=e=>` ${e.replace(/\s+/g," ").trim()} `,z=e=>e[e.length-1]?.id??null,Ct=(e,t)=>t===null?-1:e.findIndex(s=>s.id===t),G=e=>e?.kind==="turn";function Pt(e,t){const s=new Map;return e.filter(n=>{if(n.state==="sending"||n.state==="failed")return!0;const r=Ct(t,n.after),i=t.slice(r+1);if(n.via==="inbox")return!i.some(G);const a=Q(n.text),d=s.get(a)??0;return i.filter(y=>y.kind==="user"&&Q(y.text).includes(a)).length>d?(s.set(a,d+1),!1):i.filter(y=>G(y)&&y.done).length<Nt})}function oe(e){switch(e.state){case"sending":return"Sending…";case"queued":return"Queued · Firstmate is busy and will read it next";case"failed":return e.error?`Not sent · ${e.error}`:"Not sent";default:return e.via==="inbox"?"In Firstmate’s inbox":"Delivered · waiting for Firstmate"}}const K=6e3;class Dt{#t=g(null);get session(){return l(this.#t)}set session(t){m(this.#t,t,!0)}#e=g(null);get source(){return l(this.#e)}set source(t){m(this.#e,t,!0)}#s=g([]);get records(){return l(this.#s)}set records(t){m(this.#s,t)}#n=g("connecting");get connection(){return l(this.#n)}set connection(t){m(this.#n,t,!0)}#r=g(0);get resets(){return l(this.#r)}set resets(t){m(this.#r,t,!0)}#o=g(!1);get synced(){return l(this.#o)}set synced(t){m(this.#o,t,!0)}#i=g(N([]));get commands(){return l(this.#i)}set commands(t){m(this.#i,t,!0)}#a=_(()=>qt(this.records));get chat(){return l(this.#a)}set chat(t){m(this.#a,t)}#u=_(()=>{const t=this.chat.items[this.chat.items.length-1];return this.session?.busy===!0||t?.kind==="turn"&&!t.done&&!t.interrupted});get working(){return l(this.#u)}set working(t){m(this.#u,t)}#c=_(()=>this.connection==="open"&&this.session?.state==="ours"&&!this.session.picker&&!this.session.menu&&this.working);get atWork(){return l(this.#c)}set atWork(t){m(this.#c,t)}#l=g(N([]));get outbox(){return l(this.#l)}set outbox(t){m(this.#l,t,!0)}#d=_(()=>Pt(this.outbox,this.chat.items));get pending(){return l(this.#d)}set pending(t){m(this.#d,t)}close=null;connect(){if(this.close)return()=>{};this.synced=!1;const t=s=>{s.addEventListener("session",n=>{this.session=JSON.parse(n.data),this.connection="open"}),s.addEventListener("reset",n=>{this.source=JSON.parse(n.data),this.records=[],this.resets++}),s.addEventListener("records",n=>{const r=[...this.records,...JSON.parse(n.data)];this.records=r.length>K?r.slice(-K):r}),s.addEventListener("synced",()=>this.synced=!0)};return this.close=ut("/api/firstmate/chat",t,s=>this.connection=s),this.loadCommands(),()=>{this.close?.(),this.close=null,this.connection="connecting"}}async send(t,s,n,r){return this.prune(),this.outbox.push({id:crypto.randomUUID(),text:t,via:s,state:"sending",error:null,after:z(this.chat.items)}),this.deliver(this.outbox[this.outbox.length-1],n,r)}retry(t,s,n){const r=this.outbox.find(i=>i.id===t);!r||r.state!=="failed"||(r.after=z(this.chat.items),this.deliver(r,s,n))}dismiss(t){this.outbox=this.outbox.filter(s=>s.id!==t)}async deliver(t,s,n){t.state="sending",t.error=null;const r=t.via==="inbox"?await Jt(t.text,s):await Ft("/api/firstmate/input",s,{text:t.text});return r.ok?t.state=n&&t.via==="session"?"queued":"delivered":(t.state="failed",t.error=r.error),r}prune(){const t=new Set(this.pending.map(s=>s.id));this.outbox=this.outbox.filter(s=>t.has(s.id))}async loadCommands(){try{const t=await fetch("/api/firstmate/commands");t.ok&&(this.commands=(await t.json()).commands)}catch{}}}const ie=new Dt;async function Ft(e,t,s){try{const n=await fetch(e,{method:"POST",headers:{"content-type":"application/json",[A]:t},body:JSON.stringify(s??{})});return n.ok?{ok:!0}:{ok:!1,error:(await n.json().catch(()=>null))?.message??`Wheelhouse answered ${n.status}.`}}catch{return{ok:!1,error:"Could not reach the Wheelhouse server."}}}async function Jt(e,t,s=null,n=`wh-${crypto.randomUUID()}`){try{const r=await fetch("/api/firstmate/messages",{method:"POST",headers:{"content-type":"application/json","idempotency-key":n,[A]:t},body:JSON.stringify({text:e,taskId:s})});return r.ok?{ok:!0,pending:r.status===202}:{ok:!1,error:(await r.json().catch(()=>null))?.message??`Wheelhouse answered ${r.status}.`}}catch{return{ok:!1,error:"Could not reach the Wheelhouse server."}}}export{se as P,O as a,X as b,ne as c,Wt as d,ie as e,te as f,Ft as g,re as h,oe as p,ee as r,Jt as s};
1
+ import"./DsnmJJEf.js";import{m as g,g as l,v as m,p as Y,u as q,A as L,f as Z,s as tt,t as N,a as W,b as et,i as _,o as st,d as nt,c as V,q as C}from"./D46tdsTs.js";import{i as rt}from"./DWAM9c1z.js";import{s as ot}from"./BLivoCTk.js";import{b as it}from"./RbWQh321.js";import{p as P}from"./z5Xef_-v.js";import{p as at}from"./QrHSSdjC.js";import{S as A}from"./BXN538J3.js";import{r as D}from"./xjN9NojQ.js";import{w as ut}from"./CeuOu7QI.js";const ct=new Set(["127.0.0.1","localhost","0.0.0.0","[::1]"]),lt=e=>Number.isInteger(e)&&e>=1&&e<=65535;function dt(e){const t=e.indexOf("{port}"),s=e.indexOf("/",e.indexOf("://")+3);return t>=0&&(s<0||t<s)}function ht(e){const t=URL.parse(e);if(!t||t.protocol!=="http:"&&t.protocol!=="https:"||t.username||t.password||!ct.has(t.hostname.toLowerCase()))return null;const s=Number(t.port||(t.protocol==="https:"?443:80));return lt(s)?s:null}function F(e,t){const s=ht(e);if(s===null||t.reserved?.includes(s))return e;const r=new URL(e);return`${t.pattern.replace("{port}",String(s)).replace(/\/+$/,"")}${r.pathname}${r.search}${r.hash}`}const X=new Set(["127.0.0.1","localhost"]);function te(e,t){const s="allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox";let r=!0;try{r=new URL(e).origin===t}catch{}return r?s:`${s} allow-same-origin`}const mt=e=>Number.isInteger(e)&&e>=1&&e<=65535;function ft(e){const t=URL.parse(e);if(!t||t.protocol!=="http:"||t.username||t.password||!X.has(t.hostname.toLowerCase()))return null;const s=t.port?Number(t.port):80;return mt(s)?s:null}function pt(e,t,s){const r=t?ft(e):null;if(r===null||!t)return e;const n=s.port||(s.protocol==="https:"?"443":"80");if(X.has(s.hostname.toLowerCase())&&String(r)===n)return e;const i=new URL(e),a=t.replace("{port}",String(r));return`${s.protocol}//${a}${s.port?`:${s.port}`:""}${i.pathname}${i.search}${i.hash}`}class gt{#t=g(null);get to(){return l(this.#t)}set to(t){m(this.#t,t,!0)}#e=g(null);get remote(){return l(this.#e)}set remote(t){m(this.#e,t,!0)}#s=g(null);get hosted(){return l(this.#s)}set hosted(t){m(this.#s,t,!0)}get active(){return!!(this.remote||this.hosted||this.to)}view(t){return this.remote?D(t,this.remote,location.origin):this.hosted?F(t,this.hosted):this.to?pt(t,this.to,location):t}sandbox(t){return this.remote?D(t,this.remote,location.origin):this.hosted&&dt(this.hosted.pattern)?F(t,{pattern:this.hosted.pattern}):t}}const R=new gt;function ee(e){const t=r=>{if(!R.active)return;const n=r.composedPath().find(a=>a instanceof HTMLAnchorElement&&a.hasAttribute("href"));if(!n)return;const i=R.view(n.href);i!==n.href&&(n.href=i)},s=["click","auxclick","contextmenu","dragstart"];for(const r of s)e.addEventListener(r,t,!0);return()=>{for(const r of s)e.removeEventListener(r,t,!0)}}async function yt(e,t,s,r=`wh-${crypto.randomUUID()}`){try{const n=await fetch(`/api/plugins/${encodeURIComponent(e)}/feedback`,{method:"POST",headers:{"content-type":"application/json","idempotency-key":r,[A]:s},body:JSON.stringify(t)});if(n.ok){const a=await n.json().catch(()=>null);return a?.message?.delivery==="failed"?{ok:!1,error:a.message.deliveryDetail??"Firstmate did not take the list."}:{ok:!0,pending:n.status===202}}return{ok:!1,error:(await n.json().catch(()=>null))?.message??`Wheelhouse answered ${n.status}.`}}catch{return{ok:!1,error:"Could not reach the Wheelhouse server."}}}async function kt(e,t,s){try{const r=await fetch(`/api/plugins/${encodeURIComponent(e)}/feedback/summary`,{method:"POST",headers:{"content-type":"application/json",[A]:s},body:JSON.stringify(t)}),n=await r.json().catch(()=>null);return r.ok&&Array.isArray(n?.points)?{ok:!0,points:n.points}:{ok:!1,error:n?.message??`Wheelhouse answered ${r.status}.`}}catch{return{ok:!1,error:"Could not reach the Wheelhouse server."}}}const bt=e=>new URLSearchParams({plugin:e.plugin,service:e.service,...e.project?{project:e.project}:{}}).toString();async function wt(e){try{const t=await fetch(`/api/services?${bt(e)}`);return t.ok?await t.json():null}catch{return null}}async function vt(e,t,s=null){const r=window.open("","_blank");try{r?.document.write('<!doctype html><title>Starting…</title><body style="font:15px system-ui;margin:3rem;color:#14213d;background:#f6f2e9">Wheelhouse is starting it; this tab opens it when it answers.</body>')}catch{}let n=null;try{const a=await fetch("/api/services",{method:"POST",headers:{"content-type":"application/json",[A]:t},body:JSON.stringify({plugin:e.plugin,service:e.service,project:e.project??null})});n=a.ok?await a.json():{...await a.json().catch(()=>({})),state:"failed",reason:`Wheelhouse could not start it (${a.status}).`}}catch{n=null}const i=n?.state==="running"?s??n.url:null;if(i){const a=R.view(i);r?r.location.href=a:window.open(a,"_blank")}else r?.close();return n}const St=5e3,U=new Map;function xt(e,t){let s=U.get(e);return s||(s=t(e).catch(r=>{throw U.delete(e),r}),U.set(e,s)),s}const J=()=>typeof navigator>"u"||!navigator.userActivation?!0:navigator.userActivation.isActive;function _t(e,t){const s=e.pluginId,r=(i,a)=>{if(typeof i!="string"||!i)throw new TypeError("Name a service.");const d=a===void 0?e.projectId:a;return{plugin:s,service:i,project:typeof d=="string"&&d?d:null}},n=i=>{const a=typeof i=="object"&&i!==null?i:{},d=typeof a.task=="string"&&a.task?a.task:e.taskId??null;return d?{taskId:d,subject:typeof a.subject=="string"?a.subject:null,items:Array.isArray(a.items)?a.items:[]}:null};return Object.freeze({pluginId:s,service:async(i,a={})=>t.status(r(i,a.project)),launch:async(i,a={})=>t.launch(r(i,a.project),t.token(),typeof a.open=="string"?a.open:null),sendFeedback:async i=>{if(!(t.clicked??J)())return{ok:!1,error:"Feedback is sent only when the captain clicks to send it."};const a=n(i);return a?t.feedback(s,a,t.token()):{ok:!1,error:"Name the task the feedback is about."}},summariseFeedback:async i=>{if(!(t.clicked??J)())return{ok:!1,error:"Feedback is summarised only when the captain clicks to."};if(!t.summarise)return{ok:!1,error:"This page cannot summarise feedback."};const a=n(i);return a?t.summarise(s,a,t.token()):{ok:!1,error:"Name the task the feedback is about."}}})}async function Et(e,t){if(!customElements.get(t.tag)){if(!t.ui)throw new Error("this Wheelhouse has no UI bundle for it");try{await xt(t.ui,t.importer??(n=>import(n)))}catch(n){throw new Error(`its UI bundle did not load (${n instanceof Error?n.message:String(n)})`)}let r;try{await Promise.race([customElements.whenDefined(t.tag),new Promise((n,i)=>{r=setTimeout(()=>i(new Error(`its UI bundle does not define <${t.tag}>`)),t.timeoutMs??St)})])}finally{clearTimeout(r)}}const s=document.createElement(t.tag);return t.host&&(s.host=t.host),s.entry=t.entry,s.data=t.data,e.append(s),s}var Tt=V('<p class="text-sm text-muted-foreground"> </p>'),At=V('<div class="contents"></div> <!>',1);function se(e,t){Y(t,!0);let s=P(t,"preview",3,void 0),r=P(t,"quiet",3,!1);const n=_(()=>"element"in t.entry.render?t.entry.render.element:""),i=_(()=>t.entry.ui??null);let a=g(null),d=g(null),b=g(null);q(()=>{if(!l(a)||!l(n))return;const k=l(a);let v=!1,T=null;return m(b,null),Et(k,{tag:l(n),ui:l(i),data:L(()=>t.data),entry:L(()=>t.entry),host:_t(L(()=>t.entry),{status:wt,launch:vt,feedback:yt,summarise:kt,token:()=>at.data.sessionToken??""}),importer:t.importer}).then(o=>{T=o,v?o.remove():m(d,o,!0)},o=>{v||m(b,o.message,!0)}),()=>{v=!0,T?.remove(),m(d,null)}}),q(()=>{l(d)&&(s()!==void 0&&(l(d).preview=s()),l(d).entry=t.entry,l(d).data=t.data)});var y=At(),x=Z(y);it(x,k=>m(a,k),()=>l(a));var E=tt(x,2);{var w=k=>{var v=Tt(),T=st(v);N(()=>nt(T,`Not available. The ${t.entry.pluginId??""} plugin’s element could not be shown: ${l(b)??""}.`)),W(k,v)};rt(E,k=>{l(b)&&!r()&&k(w)})}N(()=>ot(x,"data-plugin-element",l(n))),W(e,y),et()}const jt=/^(captain[,.!]?\s*)?(shipshape|all (is )?well|all quiet|nothing (new )?to report)[.!]?$/i,H=/^\[Request interrupted by user/,It=/\u001b\[[0-9;?]*[A-Za-z]/g,O=e=>String(e??"").split("/").filter(Boolean).pop()??"",M=e=>String(e??"").split(`
2
+ `)[0].trim(),$t=e=>{try{return new URL(String(e)).host}catch{return String(e??"")}};function Lt(e,t){switch(e){case"Bash":return{verb:"Ran",summary:t.description||M(t.command),noun:["command","commands"]};case"Read":return{verb:"Read",summary:O(t.file_path),noun:["file read","files read"]};case"Edit":case"MultiEdit":return{verb:"Edited",summary:O(t.file_path),noun:["edit","edits"]};case"Write":return{verb:"Wrote",summary:O(t.file_path),noun:["file written","files written"]};case"Grep":return{verb:"Searched code for",summary:String(t.pattern??""),noun:["code search","code searches"]};case"Glob":return{verb:"Listed files",summary:String(t.pattern??""),noun:["file listing","file listings"]};case"WebSearch":return{verb:"Searched the web for",summary:String(t.query??""),noun:["web search","web searches"]};case"WebFetch":return{verb:"Read page",summary:$t(t.url),noun:["page read","pages read"]};case"Skill":return{verb:"Used skill",summary:String(t.skill??""),noun:["skill","skills"]};case"ToolSearch":return{verb:"Loaded tools",summary:M(t.query),noun:["tool lookup","tool lookups"]};case"Agent":case"Task":return{verb:"Asked a helper",summary:t.description||M(t.prompt),noun:["helper","helpers"]};case"TodoWrite":return{verb:"Updated the plan",summary:"",noun:["plan update","plan updates"]};case"SendMessage":return{verb:"Messaged",summary:String(t.to??""),noun:["message","messages"]};default:{const s=e.match(/^mcp__(.+?)__(.+)$/);return s?{verb:"Used",summary:`${s[2].replace(/_/g," ")} (${s[1]})`,noun:["tool call","tool calls"]}:{verb:"Used",summary:e,noun:["tool call","tool calls"]}}}}function Ut(e){return typeof e=="string"?e:Array.isArray(e)?e.map(t=>t?.type==="text"?String(t.text??""):t?.type==="image"?"[image]":t?.type==="tool_reference"?`[tool: ${t.tool_name??""}]`:`[${t?.type??"item"}]`).join(`
3
+ `):""}const I=e=>e.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g,"").replace(/<\/?pasted_content(?:\s+id="[^"]*")?\s*>\n?/g,"").trim(),Ot=/<system-reminder>\s*The user sent a new message while you were working:\n([\s\S]*?)(?:\n\nThis is how Claude Code (?:(?!\n\n)[\s\S])*)?\s*<\/system-reminder>/,B=e=>{const t=e.match(Ot);return t&&I(t[1])||null};function $(e,t){const s=e.match(new RegExp(`<${t}>([\\s\\S]*?)</${t}>`));return s?s[1].trim():null}function Q(e){const t=$(e,"command-name");if(!t)return null;const s=$(e,"command-args");return s?`${t} ${s}`:t}function Mt(e){return(Array.isArray(e?.questions)?e.questions:[]).map(s=>({header:String(s?.header??""),question:String(s?.question??""),multiSelect:s?.multiSelect===!0,options:(Array.isArray(s?.options)?s.options:[]).map(r=>({label:String(r?.label??""),description:String(r?.description??"")}))}))}function Rt(e,t){const s=e.toolUseResult?.answers;if(s&&typeof s=="object")return Object.fromEntries(Object.entries(s).map(([n,i])=>[n,String(i)]));const r={};for(const n of t.matchAll(/"([^"]+)"="([^"]*)"/g))r[n[1]]=n[2];return r}function qt(e){const t=[],s=new Map,r=new Map;let n=null,i=null,a=null,d=null,b=!1;const y=()=>{i=null},x=o=>(i||(i={kind:"turn",id:o.uuid,parts:[],at:o.timestamp,durationMs:null,done:!1,interrupted:!1,trigger:b?"background":"captain"},b=!1,t.push(i),a=i),i),E=o=>{const p=x(o),u=p.parts[p.parts.length-1];if(u?.kind==="activity")return u;const c={kind:"activity",id:`${o.uuid}-a`,steps:[]};return p.parts.push(c),c},w=(o,p,u={})=>{y(),b=!1,t.push({kind:"user",id:o.uuid,text:p,at:o.timestamp,queued:!!u.queued,command:!!u.command})},k=(o,p,u,c=o.uuid)=>{i&&E(o).steps.push({kind:"context",id:c,label:p,detail:u})};for(const o of e){if(!o||typeof o!="object"||o.isSidechain)continue;const p=o.timestamp??null;switch(o.type){case"ai-title":n=o.aiTitle??n;break;case"user":{const u=o.message?.content;if(typeof u=="string")if(o.origin?.kind==="task-notification"||u.trimStart().startsWith("<task-notification>"))y(),b=!0;else if(o.isMeta){const c=B(u);c?w(o,c,{queued:!0}):k(o,"Context added",u)}else if(H.test(u.trim()))a&&(a.interrupted=!0);else{const c=Q(u);if(c)w(o,c,{command:!0});else if(!u.includes("<local-command-stdout>")){const h=I(u);h&&w(o,h)}}else if(Array.isArray(u))for(const c of u)if(c?.type==="tool_result"){const h=Ut(c.content),f=s.get(c.tool_use_id);f&&(f.result=h,f.isError=!!c.is_error);const S=r.get(c.tool_use_id);S&&(S.answers=c.is_error?{}:Rt(o,h))}else if(c?.type==="text"){const h=String(c.text??""),f=B(h);if(H.test(h.trim()))a&&(a.interrupted=!0);else if(f)w(o,f,{queued:!0});else if(o.isMeta||o.sourceToolUseID){const S=h.startsWith("Base directory for this skill")?"Skill instructions loaded":"Context added";k(o,S,h,`${o.uuid}-${S}`)}else{const S=I(h);S&&w(o,S)}}else c?.type==="image"&&w(o,"[image]");break}case"assistant":{for(const u of o.message?.content??[])if(u?.type==="thinking"||u?.type==="redacted_thinking"){const c=d&&p?Date.parse(p)-Date.parse(d):null;E(o).steps.push({kind:"thinking",id:`${o.uuid}-th`,ms:c})}else if(u?.type==="tool_use"&&u.name==="AskUserQuestion"){const c={kind:"question",id:u.id,questions:Mt(u.input),answers:null};r.set(u.id,c),x(o).parts.push(c)}else if(u?.type==="tool_use"){const c=Lt(String(u.name),u.input??{}),h={kind:"tool",id:u.id,name:String(u.name),...c,input:u.input,result:null,isError:!1};s.set(u.id,h),E(o).steps.push(h)}else if(u?.type==="text"){if(!String(u.text??"").trim())continue;x(o).parts.push({kind:"text",id:`${o.uuid}-t`,text:u.text})}break}case"attachment":{const u=o.attachment??{};if(u.type==="queued_command"&&typeof u.prompt=="string"&&(u.commandMode??"prompt")==="prompt"){const c=I(u.prompt);c&&w(o,c,{queued:!0})}else if(u.type==="hook_additional_context"){const c=Array.isArray(u.content)?u.content.join(`
4
+ `):String(u.content??"");k(o,`Hook added context${u.hookEvent?` (${u.hookEvent})`:""}`,c)}break}case"system":{if(o.subtype==="turn_duration")a&&(a.durationMs=o.durationMs??null,a.done=!0),y();else if(o.subtype==="away_summary")y(),t.push({kind:"notice",id:o.uuid,title:"While you were away",detail:String(o.content??""),at:o.timestamp});else if(o.subtype==="local_command"){const u=String(o.content??""),c=$(u,"local-command-stdout")??$(u,"local-command-stderr"),h=Q(u);if(h)w(o,h,{command:!0});else if(c!==null){const f=c.replace(It,"").trim();f&&t.push({kind:"output",id:o.uuid,text:f,at:o.timestamp})}}break}}p&&(d=p)}const v=[];return{items:t.filter((o,p)=>{if(o.kind!=="turn"||o.trigger!=="background")return!0;const u=o.parts.filter(f=>f.kind==="text").map(f=>f.text).join(`
5
+ `).trim(),h=!o.parts.some(f=>f.kind==="question")&&(!u||jt.test(u));return v.push({id:o.id,at:o.at,durationMs:o.durationMs,done:o.done||p<t.length-1,outcome:h?"quiet":"reported"}),!h}),title:n,checks:v}}function ne(e){const t=new Map;let s=!1,r=0;for(const i of e){if(i.kind==="thinking"&&(s=!0,r+=i.ms??0),i.kind!=="tool")continue;const a=t.get(i.noun[0])??{n:0,noun:i.noun};a.n++,t.set(i.noun[0],a)}const n=[...t.values()].map(i=>`${i.n} ${i.n===1?i.noun[0]:i.noun[1]}`);return n.length?n.join(", "):s?r>=1e3?`Thought for ${Nt(r)}`:"Thought briefly":"Read some context"}function Nt(e){if(e==null||e<0)return"";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const s=Math.floor(t/60);return s<60?`${s}m ${t%60}s`:`${Math.floor(s/60)}h ${s%60}m`}function re(e){const t=[];for(const s of e)if(s.kind==="turn"){for(const r of s.parts)if(r.kind==="activity")for(const n of r.steps)n.kind==="tool"&&n.result!==null&&n.name.startsWith("mcp__")&&t.push(n.id)}return t}const Wt=2,z=e=>` ${e.replace(/\s+/g," ").trim()} `,G=e=>e[e.length-1]?.id??null,Ct=(e,t)=>t===null?-1:e.findIndex(s=>s.id===t),K=e=>e?.kind==="turn";function Pt(e,t){const s=new Map;return e.filter(r=>{if(r.state==="sending"||r.state==="failed")return!0;const n=Ct(t,r.after),i=t.slice(n+1);if(r.via==="inbox")return!i.some(K);const a=z(r.text),d=s.get(a)??0;return i.filter(y=>y.kind==="user"&&z(y.text).includes(a)).length>d?(s.set(a,d+1),!1):i.filter(y=>K(y)&&y.done).length<Wt})}function oe(e){switch(e.state){case"sending":return"Sending…";case"queued":return"Queued · Firstmate is busy and will read it next";case"failed":return e.error?`Not sent · ${e.error}`:"Not sent";default:return e.via==="inbox"?"In Firstmate’s inbox":"Delivered · waiting for Firstmate"}}const j=6e3;class Dt{#t=g(null);get session(){return l(this.#t)}set session(t){m(this.#t,t,!0)}#e=g(null);get source(){return l(this.#e)}set source(t){m(this.#e,t,!0)}#s=g([]);get records(){return l(this.#s)}set records(t){m(this.#s,t)}#n=g("connecting");get connection(){return l(this.#n)}set connection(t){m(this.#n,t,!0)}#r=g(0);get resets(){return l(this.#r)}set resets(t){m(this.#r,t,!0)}#o=g(!1);get synced(){return l(this.#o)}set synced(t){m(this.#o,t,!0)}#i=g(C([]));get commands(){return l(this.#i)}set commands(t){m(this.#i,t,!0)}#a=_(()=>qt(this.records));get chat(){return l(this.#a)}set chat(t){m(this.#a,t)}#u=_(()=>{const t=this.chat.items[this.chat.items.length-1];return this.session?.busy===!0||t?.kind==="turn"&&!t.done&&!t.interrupted});get working(){return l(this.#u)}set working(t){m(this.#u,t)}#c=_(()=>this.connection==="open"&&this.session?.state==="ours"&&!this.session.picker&&!this.session.menu&&this.working);get atWork(){return l(this.#c)}set atWork(t){m(this.#c,t)}#l=g(C([]));get outbox(){return l(this.#l)}set outbox(t){m(this.#l,t,!0)}#d=_(()=>Pt(this.outbox,this.chat.items));get pending(){return l(this.#d)}set pending(t){m(this.#d,t)}close=null;connect(){if(this.close)return()=>{};this.synced=!1;const t=s=>{s.addEventListener("session",r=>{this.session=JSON.parse(r.data),this.connection="open"}),s.addEventListener("reset",r=>{this.source=JSON.parse(r.data),this.records=[],this.resets++}),s.addEventListener("records",r=>{const n=[...this.records,...JSON.parse(r.data)];this.records=n.length>j?n.slice(-j):n}),s.addEventListener("replace",r=>{const n=JSON.parse(r.data);this.records=n.length>j?n.slice(-j):n}),s.addEventListener("synced",()=>this.synced=!0)};return this.close=ut("/api/firstmate/chat",t,s=>this.connection=s),this.loadCommands(),()=>{this.close?.(),this.close=null,this.connection="connecting"}}async send(t,s,r,n){return this.prune(),this.outbox.push({id:crypto.randomUUID(),text:t,via:s,state:"sending",error:null,after:G(this.chat.items)}),this.deliver(this.outbox[this.outbox.length-1],r,n)}retry(t,s,r){const n=this.outbox.find(i=>i.id===t);!n||n.state!=="failed"||(n.after=G(this.chat.items),this.deliver(n,s,r))}dismiss(t){this.outbox=this.outbox.filter(s=>s.id!==t)}async deliver(t,s,r){t.state="sending",t.error=null;const n=t.via==="inbox"?await Jt(t.text,s):await Ft("/api/firstmate/input",s,{text:t.text});return n.ok?t.state=r&&t.via==="session"?"queued":"delivered":(t.state="failed",t.error=n.error),n}prune(){const t=new Set(this.pending.map(s=>s.id));this.outbox=this.outbox.filter(s=>t.has(s.id))}async loadCommands(){try{const t=await fetch("/api/firstmate/commands");t.ok&&(this.commands=(await t.json()).commands)}catch{}}}const ie=new Dt;async function Ft(e,t,s){try{const r=await fetch(e,{method:"POST",headers:{"content-type":"application/json",[A]:t},body:JSON.stringify(s??{})});return r.ok?{ok:!0}:{ok:!1,error:(await r.json().catch(()=>null))?.message??`Wheelhouse answered ${r.status}.`}}catch{return{ok:!1,error:"Could not reach the Wheelhouse server."}}}async function Jt(e,t,s=null,r=`wh-${crypto.randomUUID()}`){try{const n=await fetch("/api/firstmate/messages",{method:"POST",headers:{"content-type":"application/json","idempotency-key":r,[A]:t},body:JSON.stringify({text:e,taskId:s})});return n.ok?{ok:!0,pending:n.status===202}:{ok:!1,error:(await n.json().catch(()=>null))?.message??`Wheelhouse answered ${n.status}.`}}catch{return{ok:!1,error:"Could not reach the Wheelhouse server."}}}export{se as P,R as a,X as b,ne as c,Nt as d,ie as e,te as f,Ft as g,re as h,oe as p,ee as r,Jt as s};
@@ -1 +1 @@
1
- import"./DsnmJJEf.js";import{i as n}from"./DKlgDTCT.js";import{p as h,a as s,b as v,c as i,o as c,t as u,g as o,d as b,r as g}from"./D46tdsTs.js";import{e as _,s as f}from"./BLivoCTk.js";import{p as d}from"./CcafVx98.js";import{L as x}from"./cwI46DFb.js";var O=i('<a class="nav-tab shrink-0"> </a>'),L=i('<nav class="-ml-2.5 no-scrollbar flex gap-1 overflow-x-auto" aria-label="Logbook"></nav>');function K(l,p){h(p,!1),n();var r=L();_(r,5,()=>x,t=>t.href,(t,e)=>{var a=O(),m=c(a,!0);u(()=>{f(a,"href",o(e).href),f(a,"aria-current",d.url.pathname===o(e).href?"page":void 0),b(m,o(e).label)}),s(t,a)}),g(r),s(l,r),v()}export{K as I};
1
+ import"./DsnmJJEf.js";import{i as n}from"./DKlgDTCT.js";import{p as h,a as s,b as v,c as i,o as c,t as u,g as o,d as b,r as g}from"./D46tdsTs.js";import{e as _,s as f}from"./BLivoCTk.js";import{p as d}from"./QrHSSdjC.js";import{L as x}from"./cwI46DFb.js";var O=i('<a class="nav-tab shrink-0"> </a>'),L=i('<nav class="-ml-2.5 no-scrollbar flex gap-1 overflow-x-auto" aria-label="Logbook"></nav>');function K(l,p){h(p,!1),n();var r=L();_(r,5,()=>x,t=>t.href,(t,e)=>{var a=O(),m=c(a,!0);u(()=>{f(a,"href",o(e).href),f(a,"aria-current",d.url.pathname===o(e).href?"page":void 0),b(m,o(e).label)}),s(t,a)}),g(r),s(l,r),v()}export{K as I};
@@ -1 +1 @@
1
- import"./DsnmJJEf.js";import{p as O,h as C,g as R,s as j,r as W,t as H,d as P,a as F,b as U,i as Y,c as B}from"./D46tdsTs.js";import{c as G}from"./DT69KRC9.js";import{a as J}from"./BLivoCTk.js";import{a as Q}from"./DKQe4Tss.js";import{L as _,l as z,n as V,b as I,s as k,h as K,c as g,A as X}from"./1X9ywHoQ.js";import{P as Z,u as ee}from"./BjWKWeiq.js";import{C as te}from"./ll0BMwr1.js";import{S as ne}from"./oy2xxZEw.js";import{T as se}from"./DDbzEejx.js";import{H as ae}from"./4dIDSPSf.js";const m=[{key:"queued",label:"Queued",hint:"Waiting its turn"},{key:"building",label:"Building",hint:"The crew is writing it"},{key:"testing",label:"Testing",hint:"Checks and review"},{key:"pr",label:"Pull request",hint:"In CI or with you"},{key:"landed",label:"Landed",hint:"In the last day"}],A={queued:"queued",building:"building",checks:"testing",pr:"pr",review:"pr",landed:"landed"};function b(e){if(e.status==="queued")return"queued";if(e.status==="landed")return"landed";const t=e.passage.steps;for(let s=Math.min(e.passage.current,t.length-1);s>=0;s--){const a=A[t[s].column]??A[t[s].key];if(a)return a}return"building"}const Ae={you:"Waiting on you",stuck:"Stuck",firstmate:"With Firstmate",busy:"Busy",idle:"Idle",landed:"Landed"};function re(e){return e.status==="landed"?"landed":V(e)?"you":I(e)||e.passage.steps[e.passage.current]?.failed||e.pipeline?.outcome==="failed"?"stuck":e.status==="with-firstmate"?"firstmate":e.busy?"busy":"idle"}const $={you:0,stuck:1,firstmate:2,busy:3,idle:4,landed:5},ie=e=>{const t=e?Date.parse(e):NaN;return Number.isNaN(t)?null:t};function y(e,t=b(e)){return t==="landed"?z(e):t==="testing"?ie(e.pipeline?.startedAt):null}function $e(e,t,s){const a=new Map;for(const r of t){if(r.status==="closed")continue;const i=b(r),o=r.passage.steps[r.passage.current]?.key??null,n=e.get(r.id);if(!n||n.lane!==i){a.set(r.id,n?{lane:i,step:o,laneSince:s,stepSince:s}:{lane:i,step:o,laneSince:y(r,i),stepSince:null});continue}const l=n.laneSince??y(r,i);a.set(r.id,n.step!==o?{...n,step:o,laneSince:l,stepSince:s}:l!==n.laneSince?{...n,laneSince:l}:n)}return a}const p=3600*1e3,L=.35;function oe(e,t){if(e===null)return L;const s=t-e;if(s<=p)return 1;const a=Math.min(1,(s-p)/(_-p));return 1-(1-L)*a}function Le(e,t,s){const a=new Map(m.map(n=>[n.key,[]])),r={you:0,stuck:0,firstmate:0,busy:0,idle:0,landed:0};let i=0;for(const n of e){if(n.status==="closed")continue;const l=b(n),d=s?.get(n.id),c=d?d.laneSince:y(n,l),f=re(n);if(n.status==="landed"&&(c===null||t-c>_)){i++;continue}r[f]++,a.get(l).push({id:n.id,task:n,lane:l,signal:f,since:c,stepSince:d?.stepSince??null,opacity:f==="landed"?oe(c,t):1})}const o=(n,l)=>n.lane==="landed"?(l.since??0)-(n.since??0):$[n.signal]-$[l.signal]||(n.since??1/0)-(l.since??1/0)||n.id.localeCompare(l.id);return{lanes:m.map(n=>({...n,blips:a.get(n.key).sort(o)})),landedOlder:i,counts:r}}const xe=e=>m.find(t=>t.key===e).label;function ue(e,t){if(e===null)return"unknown";const s=Math.max(0,Math.round((t-e)/6e4));if(s<1)return"under a minute";if(s<60)return`${s} min`;const a=Math.round(s/60);return a<48?`${a} h`:`${Math.round(a/24)} days`}const w=e=>{const t=e?Date.parse(e):NaN;return Number.isNaN(t)?null:t},S=["needs-you","held-up","new","under-way","quiet"],le=S.filter(e=>e!=="new"),de=14,ce={"needs-you":"Needs you","held-up":"Held up",new:"New","under-way":"Under way",quiet:"Quiet"},q=e=>!!e.passage.steps[e.passage.current]?.failed;function ve(e,t,s){const a=k(t,"under-way"),r=K(a,s),i=u=>I(u)||q(u),o=r.underWay.filter(i),n=[...r.underWay.filter(u=>!i(u)),...r.waitingOnFirstmate,...r.waitingOnReviewers],l=k(t,"completed"),d=l.filter(u=>u.status==="landed"),c=d.filter(u=>{const T=g(u);return T!==null&&s-T<=Z}),f=t.map(u=>ee(u)).filter(u=>u!==null),N=t.map(u=>w(u.since)).filter(u=>u!==null),E=!l.length&&N.length>0&&Math.min(...N)>=s-de*864e5,D=r.needsYou.length?"needs-you":o.length||e.passage?.problems?"held-up":a.length?E?"new":"under-way":"quiet";return{project:e,state:D,yourMove:r.needsYou,heldUp:o,moving:n,queued:r.queued,landed:c,lastLanded:d[0]??null,landings:d.map(u=>g(u)).filter(u=>u!==null),underWay:o.length+n.length,openPullRequests:a.filter(u=>u.pr).length,lastActivity:f.length?Math.max(...f):null}}const h=e=>e.trim().replace(/[.\s]+$/,""),x=e=>e.passage.steps[e.passage.current]?.label??null;function v(e,t,s){const a=[t.activity?.source==="state"?null:w(t.activity?.at),w(t.since)].filter(r=>r!==null);return a.length?` ${e} for ${ue(Math.max(...a),s)}.`:""}function Me(e,t){const s=e.yourMove[0];if(s)return(s.attention?.text?`${s.shortTitle}: ${h(s.attention.text)}.`:`${s.shortTitle} needs you.`)+v("Waiting",s,t);const a=e.heldUp[0];if(a)return(q(a)?`${a.shortTitle}: ${x(a)} failed.`:`${a.shortTitle}: ${h(a.statusLabel)}.`)+v("Held up",a,t);if(e.project.passage?.problems)return"Its passage file has problems.";const r=e.moving[0];if(r){if(r.activity?.text)return`${r.shortTitle}: ${h(r.activity.text)}.`;const n=x(r);return n?`${r.shortTitle} is at ${n}.`:`${r.shortTitle} is under way.`}if(e.queued.length)return`Nothing under way. ${e.queued.length} queued.`;const i=e.lastLanded,o=i?g(i):null;return i&&o!==null?`Nothing under way. ${i.shortTitle} landed ${Q(new Date(o).toISOString(),t)}.`:"No work yet."}function _e(e){return e.toSorted((t,s)=>S.indexOf(t.state)-S.indexOf(s.state)||(s.lastActivity??-1/0)-(t.lastActivity??-1/0)||t.project.name.localeCompare(s.project.name))}function Ie(e){return le.find(t=>t===e)??null}const qe=(e,t)=>!t||e===t||t==="under-way"&&e==="new",M=(e,t,s)=>`${e} ${e===1?t:s}`;function Ee(e){const t=e.filter(n=>n.project.id!=="unassigned").length,s=n=>e.reduce((l,d)=>l+n(d),0),a=s(n=>n.yourMove.length),r=s(n=>n.underWay),i=s(n=>n.heldUp.length),o=s(n=>n.landed.length);return[`${M(t,"project","projects")}.`,a?`${M(a,"thing needs","things need")} you;`:"Nothing needs you;",r?`${r} under way${i?`, ${i} of them held up`:""};`:"nothing under way;",o?`${o} landed this week.`:"nothing landed this week."].join(" ")}function De(e,t,s){const a=new Array(s).fill(0),r=new Date(t);r.setHours(0,0,0,0);for(const i of e){if(i>t)continue;const o=new Date(i);o.setHours(0,0,0,0);const n=Math.round((r.getTime()-o.getTime())/864e5);n>=0&&n<s&&a[s-1-n]++}return a}var fe=B("<span><!> </span>");function Oe(e,t){O(t,!0);const s={"needs-you":ae,"held-up":se,new:ne,"under-way":te,quiet:X},a={"needs-you":"border-sea/40 bg-sea/10 text-sea","held-up":"border-danger/40 bg-danger/10 text-danger",new:"border-success/40 bg-success/10 text-success","under-way":"border-hair bg-muted/60 text-foreground",quiet:"border-hair text-muted-foreground"},r=Y(()=>s[t.state]);var i=fe(),o=C(i);G(o,()=>R(r),(l,d)=>{d(l,{class:"size-3.5","aria-hidden":"true"})});var n=j(o,1,!0);W(i),H(()=>{J(i,1,`inline-flex shrink-0 items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium whitespace-nowrap ${a[t.state]??""}`),P(n,ce[t.state])}),F(e,i),U()}export{de as A,le as F,m as L,Oe as P,Ae as S,v as a,ve as b,ue as c,De as d,_e as e,Ee as f,ce as g,Ie as h,qe as i,xe as l,Me as p,Le as r,h as s,$e as t};
1
+ import"./DsnmJJEf.js";import{p as O,h as C,g as R,s as j,r as W,t as H,d as P,a as F,b as U,i as Y,c as B}from"./D46tdsTs.js";import{c as G}from"./DT69KRC9.js";import{a as J}from"./BLivoCTk.js";import{a as Q}from"./BCUUi0V0.js";import{L as _,l as z,n as V,b as I,s as k,h as K,c as g,A as X}from"./1X9ywHoQ.js";import{P as Z,u as ee}from"./BjWKWeiq.js";import{C as te}from"./ll0BMwr1.js";import{S as ne}from"./oy2xxZEw.js";import{T as se}from"./DDbzEejx.js";import{H as ae}from"./4dIDSPSf.js";const m=[{key:"queued",label:"Queued",hint:"Waiting its turn"},{key:"building",label:"Building",hint:"The crew is writing it"},{key:"testing",label:"Testing",hint:"Checks and review"},{key:"pr",label:"Pull request",hint:"In CI or with you"},{key:"landed",label:"Landed",hint:"In the last day"}],A={queued:"queued",building:"building",checks:"testing",pr:"pr",review:"pr",landed:"landed"};function b(e){if(e.status==="queued")return"queued";if(e.status==="landed")return"landed";const t=e.passage.steps;for(let s=Math.min(e.passage.current,t.length-1);s>=0;s--){const a=A[t[s].column]??A[t[s].key];if(a)return a}return"building"}const Ae={you:"Waiting on you",stuck:"Stuck",firstmate:"With Firstmate",busy:"Busy",idle:"Idle",landed:"Landed"};function re(e){return e.status==="landed"?"landed":V(e)?"you":I(e)||e.passage.steps[e.passage.current]?.failed||e.pipeline?.outcome==="failed"?"stuck":e.status==="with-firstmate"?"firstmate":e.busy?"busy":"idle"}const $={you:0,stuck:1,firstmate:2,busy:3,idle:4,landed:5},ie=e=>{const t=e?Date.parse(e):NaN;return Number.isNaN(t)?null:t};function y(e,t=b(e)){return t==="landed"?z(e):t==="testing"?ie(e.pipeline?.startedAt):null}function $e(e,t,s){const a=new Map;for(const r of t){if(r.status==="closed")continue;const i=b(r),o=r.passage.steps[r.passage.current]?.key??null,n=e.get(r.id);if(!n||n.lane!==i){a.set(r.id,n?{lane:i,step:o,laneSince:s,stepSince:s}:{lane:i,step:o,laneSince:y(r,i),stepSince:null});continue}const l=n.laneSince??y(r,i);a.set(r.id,n.step!==o?{...n,step:o,laneSince:l,stepSince:s}:l!==n.laneSince?{...n,laneSince:l}:n)}return a}const p=3600*1e3,L=.35;function oe(e,t){if(e===null)return L;const s=t-e;if(s<=p)return 1;const a=Math.min(1,(s-p)/(_-p));return 1-(1-L)*a}function Le(e,t,s){const a=new Map(m.map(n=>[n.key,[]])),r={you:0,stuck:0,firstmate:0,busy:0,idle:0,landed:0};let i=0;for(const n of e){if(n.status==="closed")continue;const l=b(n),d=s?.get(n.id),c=d?d.laneSince:y(n,l),f=re(n);if(n.status==="landed"&&(c===null||t-c>_)){i++;continue}r[f]++,a.get(l).push({id:n.id,task:n,lane:l,signal:f,since:c,stepSince:d?.stepSince??null,opacity:f==="landed"?oe(c,t):1})}const o=(n,l)=>n.lane==="landed"?(l.since??0)-(n.since??0):$[n.signal]-$[l.signal]||(n.since??1/0)-(l.since??1/0)||n.id.localeCompare(l.id);return{lanes:m.map(n=>({...n,blips:a.get(n.key).sort(o)})),landedOlder:i,counts:r}}const xe=e=>m.find(t=>t.key===e).label;function ue(e,t){if(e===null)return"unknown";const s=Math.max(0,Math.round((t-e)/6e4));if(s<1)return"under a minute";if(s<60)return`${s} min`;const a=Math.round(s/60);return a<48?`${a} h`:`${Math.round(a/24)} days`}const w=e=>{const t=e?Date.parse(e):NaN;return Number.isNaN(t)?null:t},S=["needs-you","held-up","new","under-way","quiet"],le=S.filter(e=>e!=="new"),de=14,ce={"needs-you":"Needs you","held-up":"Held up",new:"New","under-way":"Under way",quiet:"Quiet"},q=e=>!!e.passage.steps[e.passage.current]?.failed;function ve(e,t,s){const a=k(t,"under-way"),r=K(a,s),i=u=>I(u)||q(u),o=r.underWay.filter(i),n=[...r.underWay.filter(u=>!i(u)),...r.waitingOnFirstmate,...r.waitingOnReviewers],l=k(t,"completed"),d=l.filter(u=>u.status==="landed"),c=d.filter(u=>{const T=g(u);return T!==null&&s-T<=Z}),f=t.map(u=>ee(u)).filter(u=>u!==null),N=t.map(u=>w(u.since)).filter(u=>u!==null),E=!l.length&&N.length>0&&Math.min(...N)>=s-de*864e5,D=r.needsYou.length?"needs-you":o.length||e.passage?.problems?"held-up":a.length?E?"new":"under-way":"quiet";return{project:e,state:D,yourMove:r.needsYou,heldUp:o,moving:n,queued:r.queued,landed:c,lastLanded:d[0]??null,landings:d.map(u=>g(u)).filter(u=>u!==null),underWay:o.length+n.length,openPullRequests:a.filter(u=>u.pr).length,lastActivity:f.length?Math.max(...f):null}}const h=e=>e.trim().replace(/[.\s]+$/,""),x=e=>e.passage.steps[e.passage.current]?.label??null;function v(e,t,s){const a=[t.activity?.source==="state"?null:w(t.activity?.at),w(t.since)].filter(r=>r!==null);return a.length?` ${e} for ${ue(Math.max(...a),s)}.`:""}function Me(e,t){const s=e.yourMove[0];if(s)return(s.attention?.text?`${s.shortTitle}: ${h(s.attention.text)}.`:`${s.shortTitle} needs you.`)+v("Waiting",s,t);const a=e.heldUp[0];if(a)return(q(a)?`${a.shortTitle}: ${x(a)} failed.`:`${a.shortTitle}: ${h(a.statusLabel)}.`)+v("Held up",a,t);if(e.project.passage?.problems)return"Its passage file has problems.";const r=e.moving[0];if(r){if(r.activity?.text)return`${r.shortTitle}: ${h(r.activity.text)}.`;const n=x(r);return n?`${r.shortTitle} is at ${n}.`:`${r.shortTitle} is under way.`}if(e.queued.length)return`Nothing under way. ${e.queued.length} queued.`;const i=e.lastLanded,o=i?g(i):null;return i&&o!==null?`Nothing under way. ${i.shortTitle} landed ${Q(new Date(o).toISOString(),t)}.`:"No work yet."}function _e(e){return e.toSorted((t,s)=>S.indexOf(t.state)-S.indexOf(s.state)||(s.lastActivity??-1/0)-(t.lastActivity??-1/0)||t.project.name.localeCompare(s.project.name))}function Ie(e){return le.find(t=>t===e)??null}const qe=(e,t)=>!t||e===t||t==="under-way"&&e==="new",M=(e,t,s)=>`${e} ${e===1?t:s}`;function Ee(e){const t=e.filter(n=>n.project.id!=="unassigned").length,s=n=>e.reduce((l,d)=>l+n(d),0),a=s(n=>n.yourMove.length),r=s(n=>n.underWay),i=s(n=>n.heldUp.length),o=s(n=>n.landed.length);return[`${M(t,"project","projects")}.`,a?`${M(a,"thing needs","things need")} you;`:"Nothing needs you;",r?`${r} under way${i?`, ${i} of them held up`:""};`:"nothing under way;",o?`${o} landed this week.`:"nothing landed this week."].join(" ")}function De(e,t,s){const a=new Array(s).fill(0),r=new Date(t);r.setHours(0,0,0,0);for(const i of e){if(i>t)continue;const o=new Date(i);o.setHours(0,0,0,0);const n=Math.round((r.getTime()-o.getTime())/864e5);n>=0&&n<s&&a[s-1-n]++}return a}var fe=B("<span><!> </span>");function Oe(e,t){O(t,!0);const s={"needs-you":ae,"held-up":se,new:ne,"under-way":te,quiet:X},a={"needs-you":"border-sea/40 bg-sea/10 text-sea","held-up":"border-danger/40 bg-danger/10 text-danger",new:"border-success/40 bg-success/10 text-success","under-way":"border-hair bg-muted/60 text-foreground",quiet:"border-hair text-muted-foreground"},r=Y(()=>s[t.state]);var i=fe(),o=C(i);G(o,()=>R(r),(l,d)=>{d(l,{class:"size-3.5","aria-hidden":"true"})});var n=j(o,1,!0);W(i),H(()=>{J(i,1,`inline-flex shrink-0 items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-xs font-medium whitespace-nowrap ${a[t.state]??""}`),P(n,ce[t.state])}),F(e,i),U()}export{de as A,le as F,m as L,Oe as P,Ae as S,v as a,ve as b,ue as c,De as d,_e as e,Ee as f,ce as g,Ie as h,qe as i,xe as l,Me as p,Le as r,h as s,$e as t};
@@ -1 +1 @@
1
- import"./DsnmJJEf.js";import{p as Y,j as fe,f as Z,g as s,a as l,b as ee,i as _,h as z,s as C,r as w,t as p,d as B,c,o as W}from"./D46tdsTs.js";import{i as y}from"./DWAM9c1z.js";import{s as R,a as $,e as J,d as K}from"./BLivoCTk.js";import{S as pe}from"./DlfaZ-Lx.js";import{t as ge}from"./B4gzexCn.js";import{p as te}from"./z5Xef_-v.js";import{p as he}from"./DKQe4Tss.js";import{p as me}from"./DJNADPa5.js";import{t as ve,d as ke,a as be}from"./BY5XjwMm.js";var xe=c('<span class="font-normal opacity-70" data-second-mate-host=""> </span>'),$e=c('<span class="inline-flex max-w-full min-w-0 items-center gap-1 rounded-sm bg-brass/10 px-1.5 text-xs leading-[1.15rem] font-medium text-brass"><!><span class="truncate"> <!></span></span>');function Ve(e,t){Y(t,!0);const r=_(()=>t.task.secondMate??null);var n=fe(),h=Z(n);{var k=v=>{var f=$e(),D=z(f);pe(D,{class:"size-3 shrink-0","aria-hidden":"true"});var A=C(D),M=z(A,!0),q=C(M);{var G=N=>{var F=xe(),i=W(F,!0);p(()=>B(i,` · ${s(r).host}`)),l(N,F)};y(q,N=>{s(r).where==="remote"&&s(r).host&&N(G)})}w(A),w(f),p(()=>{R(f,"title",s(r).where==="remote"?`Runs on second mate ${s(r).id}, on ${s(r).host??"another host"}`:`Runs on second mate ${s(r).id}, on this computer`),R(f,"data-second-mate-task",s(r).id),B(M,s(r).id)}),l(v,f)};y(h,v=>{s(r)&&v(k)})}l(e,n),ee()}const Ye={review:"GitHub review",thread:"GitHub review comment",comment:"GitHub comment",preview:"Preview feedback",plugin:"Plugin feedback","pr-review":"Wheelhouse PR review",decision:"Decisions inbox"},Ze={open:"To do",resolved:"Resolved on GitHub",addressed:"Worker reported it ready since"},et=e=>e.where?`${e.where.path}${e.where.line!=null?`, line ${e.where.line}`:""}`:null;function we(e){return{open:e.filter(t=>t.state==="open"),done:e.filter(t=>t.state!=="open")}}function tt(e){if(!e?.length)return null;const{open:t,done:r}=we(e);return[t.length?`${t.length} ${he(t.length,"change","changes")} to make`:null,r.length?`${r.length} done`:null].filter(Boolean).join(" · ")}const ye=e=>e.runs&&e.runs.current>1?e.runs.runs.at(-1)??null:null;function nt(e){if(!e.runs||e.runs.current<2)return null;const t=e.passage.steps[e.passage.current];return t?`Run ${e.runs.current} · ${t.label}`:`Run ${e.runs.current}`}var _e=c('<span aria-hidden="true"></span>');function Ce(e,t){let r=te(t,"class",3,"");var n=_e();p(()=>$(n,1,`pointer-events-none absolute inset-0 rounded-full opacity-40 motion-safe:animate-ping ${r()??""}`)),l(e,n)}var Re=c('<p class="mb-1.5 text-xs font-medium text-muted-foreground" data-run-label=""> </p>'),Q=c("<span></span>"),Ie=c("<span><!></span>"),Ae=c('<span class="relative z-10 mt-[2px] size-2 rounded-full border border-dashed border-muted-foreground/50 bg-card"></span>'),Me=c('<li class="relative flex min-w-0 flex-col items-center"><!> <!> <span> </span></li>'),Ne=c('<ol class="grid"></ol>'),Se=c('<li class="min-w-0"><div></div> <p> </p></li>'),Le=c('<ol class="grid gap-2"></ol>'),ze=c("<!> <!>",1);function rt(e,t){Y(t,!0);let r=te(t,"size",3,"card");const n=_(()=>t.task.passage),h=_(()=>ye(t.task)),k=_(()=>be(t.task)),v=_(()=>`${s(h)?`Run ${s(h).n}, `:""}Step ${s(n).current+1} of ${s(n).steps.length}: ${s(n).steps[s(n).current]?.label??""}${s(n).steps[s(n).current]?.failed?", failed":""}${t.task.busy?", in progress":""}`),f=i=>i?"bg-danger":ke[s(k)],D=i=>i?"text-danger":ve[s(k)];var A=ze(),M=Z(A);{var q=i=>{var u=Re(),m=W(u);p(()=>B(m,`Run ${s(h).n??""}`)),l(i,u)};y(M,i=>{s(h)&&i(q)})}var G=C(M,2);{var N=i=>{var u=Ne();J(u,23,()=>s(n).steps,m=>m.key,(m,a,b)=>{var x=Me(),S=z(x);{var O=o=>{var d=Q();p(()=>$(d,1,`absolute top-[5px] right-1/2 left-[-50%] ${s(b)<=s(n).current?"h-0.5 bg-foreground/50":"h-0 border-t border-dotted border-input"}`)),l(o,d)};y(S,o=>{s(b)>0&&o(O)})}var T=C(S,2);{var ae=o=>{var d=Ie(),le=z(d);{var de=L=>{{let ce=_(()=>f(s(a).failed));Ce(L,{get class(){return s(ce)}})}};y(le,L=>{t.task.busy&&L(de)})}w(d),p(L=>$(d,1,`relative z-10 size-3 rounded-full ring-[3px] ring-card ${L??""}`),[()=>f(s(a).failed)]),ge(1,d,()=>me),l(o,d)},ie=o=>{var d=Ae();l(o,d)},oe=o=>{var d=Q();p(()=>$(d,1,`relative z-10 mt-[2px] size-2 rounded-full ${s(a).state==="done"?"bg-foreground/50":"border border-border bg-card"}`)),l(o,d)};y(T,o=>{s(a).state==="current"?o(ae):s(a).state==="skipped"?o(ie,1):o(oe,-1)})}var X=C(T,2),ue=W(X,!0);w(x),p(o=>{R(x,"title",s(a).note??void 0),$(X,1,`mt-1.5 max-w-full truncate text-xs leading-none ${o??""}`),B(ue,s(a).short)},[()=>s(a).state==="current"?`font-semibold ${D(s(a).failed)}`:s(a).state==="done"?"text-muted-foreground":s(a).state==="skipped"?"text-muted-foreground italic line-through":"text-muted-foreground italic"]),l(m,x)}),w(u),p(()=>{K(u,`grid-template-columns: repeat(${s(n).steps.length??""}, minmax(0, 1fr))`),R(u,"aria-label",s(v))}),l(i,u)},F=i=>{var u=Le();J(u,21,()=>s(n).steps,m=>m.key,(m,a)=>{var b=Se(),x=z(b),S=C(x,2),O=W(S);w(b),p(T=>{R(b,"title",s(a).note??void 0),$(x,1,`h-1.5 rounded-full transition-colors duration-500 ${T??""}`),$(S,1,`mt-2 truncate text-xs leading-tight ${s(a).state==="current"?`font-medium ${s(a).failed?"text-danger":"text-foreground"}`:s(a).state==="done"?"text-muted-foreground":"text-muted-foreground italic"} ${s(a).state==="skipped"?"line-through":""}`),B(O,`${s(a).label??""}${s(a).failed?" failed":""}`)},[()=>s(a).state==="done"?"bg-foreground/60":s(a).state==="current"?f(s(a).failed):s(a).state==="skipped"?"border border-dashed border-border":"bg-border"]),l(m,b)}),w(u),p(()=>{K(u,`grid-template-columns: repeat(${s(n).steps.length??""}, minmax(0, 1fr))`),R(u,"aria-label",s(v))}),l(i,u)};y(G,i=>{r()==="card"?i(N):i(F,-1)})}l(e,A),ee()}const Be={intent:"Reading the brief",rebase:"Catching up with the main branch",review:"Reviewing the change",test:"Running the tests",document:"Checking the docs",lint:"Checking code style",push:"Pushing the branch",pr:"Opening the pull request",ci:"Waiting for CI"},De={rebase:"resolving conflicts with the main branch",review:"fixing review findings",test:"fixing test failures",document:"fixing the docs",lint:"fixing code style",ci:"fixing CI failures"},P={intent:"Brief read",rebase:"Up to date with the main branch",review:"No issues found",test:"Tests passed",document:"Docs up to date",lint:"Code style clean",push:"Branch pushed",pr:"Pull request opened",ci:"CI passed"},Fe={rebase:"Could not catch up with the main branch",test:"Tests failed",push:"Could not push the branch",pr:"Could not open the pull request",ci:"CI failed"},j=e=>e&&e[0].toUpperCase()+e.slice(1),g=(e,t,r)=>`${e} ${e===1?t:r}`,H=e=>Be[e.key]??`Running ${e.label.toLowerCase()}`,ne=e=>De[e]??"applying fixes",U=e=>Fe[e.key]??`${e.label} failed`;function V(e){const t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t}s`;const r=Math.floor(t/60);if(r<60)return t%60?`${r}m ${t%60}s`:`${r}m`;const n=Math.floor(r/60);return r%60?`${n}h ${r%60}m`:`${n}h`}function E(e,t,r){if(r===null)return null;const n=t?Date.parse(t):NaN;return Number.isNaN(n)?e?.durationMs!=null?V(e.durationMs):null:V(r-n)}const I=(...e)=>e.filter(Boolean).join(" · ");function re(e,t){const r=e.gate?.questions??0;if(r>0)return g(r,"question","questions")+" for Firstmate";const n=e.gate?.findings||t.findings;return n>0?`${g(n,"finding","findings")} waiting on Firstmate`:"waiting on Firstmate"}function se(e,t){return`${ne(t.key)}${e.round?`, round ${e.round}`:""}`}const Te=e=>e.steps.find(t=>t.key===e.step)??null;function st(e,t){const r=e.ci==="green";if(e.outcome==="passed")return r?"All checks passed · CI green":"All checks passed";if(e.outcome==="cancelled")return"Checks stopped before finishing";const n=Te(e);if(e.outcome==="failed")return n?.state==="failed"?U(n):"Checks failed";if(!n)return`${e.label} step`;switch(n.state){case"waiting":return I(H(n),E(n,null,t),re(e,n));case"fixing":return j(I(e.answered&&"Answer received",se(e,n),E(n,e.roundStartedAt??e.startedAt,t)));case"failed":return U(n);case"running":if(n.key==="ci"){if(r)return"All checks passed · CI green";if(e.ci==="red")return I("CI found problems",E(n,e.startedAt,t))}return I(H(n),E(n,e.startedAt,t));case"upcoming":return"Waiting for the checks to start";default:return r?"All checks passed · CI green":"Checks finished"}}function Ee(e,t){const r=e.findings,n=e.fixes??0;switch(e.state){case"upcoming":return"";case"skipped":return"Skipped";case"waiting":return j(re(t,e));case"fixing":return j(I(r>0&&`Found ${g(r,"issue","issues")}`,e.key===t.step?se(t,e):ne(e.key)));case"failed":return I(U(e),r>0&&g(r,"finding","findings"));case"running":return e.key==="ci"?t.ci==="green"?"CI passed; watching until it merges":t.ci==="red"?"CI found problems":"Waiting for CI checks":`${H(e)}…`;default:return e.key==="ci"&&t.ci==="red"?"CI found problems":e.fixes===null&&e.key==="review"?r>0?`Found ${g(r,"issue","issues")}`:"No issues left":r>0&&n>0?`Found ${g(r,"issue","issues")} · fixed in ${g(n,"round","rounds")}`:r>0?e.key==="review"?`Found ${g(r,"issue","issues")}; no changes needed`:`${P[e.key]??"Done"} · ${g(r,"note","notes")}`:n>0?`${e.key==="review"?"No issues left":P[e.key]??"Done"} after ${g(n,"round of fixes","rounds of fixes")}`:P[e.key]??"Done"}}function at(e){if(!e.length)return null;const t=e.length,r=v=>e.filter(f=>f.state===v).length,n=r("fail"),h=r("running")+r("pending");if(n)return`${n} of ${t} ${t===1?"check":"checks"} failed`;if(h)return`${h} of ${t} ${t===1?"check":"checks"} still running`;const k=r("pass");return k?`${k} of ${t} ${t===1?"check":"checks"} passed`:`${t} ${t===1?"check":"checks"} reported`}const it=e=>!!e.pipeline?.steps.length&&e.status!=="landed";function We(e,t){if(e.key==="ci"&&e.state!=="upcoming"&&e.state!=="skipped"){if(t.ci==="green")return"done";if(t.ci==="red"&&e.state!=="fixing")return"failed"}switch(e.state){case"done":return"done";case"running":return"active";case"waiting":return"waiting";case"fixing":return"fixing";case"failed":return"failed";case"skipped":return"skipped";default:return"todo"}}const qe={done:"done",running:"active",waiting:"waiting",fixing:"fixing",failed:"failed",skipped:"skipped",upcoming:"todo"};function ot(e,t){const r=new Map((t?.steps??[]).map(n=>[n.key,n]));return e?.steps.length?e.steps.map(n=>({key:n.key,label:n.label,tone:We(n,e),summary:Ee(n,e),durationMs:n.durationMs,current:n.key===e.step&&e.outcome==="running",report:r.get(n.key)??null})):(t?.steps??[]).map(n=>({key:n.key,label:n.label,tone:qe[n.state],summary:n.summary,durationMs:n.durationMs,current:!1,report:n}))}function ut(e){switch(e.outcome){case"passed":return"All checks passed";case"failed":return"Checks failed";case"cancelled":return"Checks stopped before finishing";case"running":return"Checks under way";default:return"Checks"}}export{Ce as B,rt as S,Ve as W,it as a,tt as b,st as c,ot as d,ut as e,V as f,at as g,we as h,Ze as i,Ye as j,et as k,ye as l,nt as r,We as s};
1
+ import"./DsnmJJEf.js";import{p as Y,j as fe,f as Z,g as s,a as l,b as ee,i as _,h as z,s as C,r as w,t as p,d as B,c,o as W}from"./D46tdsTs.js";import{i as y}from"./DWAM9c1z.js";import{s as R,a as $,e as J,d as K}from"./BLivoCTk.js";import{S as pe}from"./DlfaZ-Lx.js";import{t as ge}from"./B4gzexCn.js";import{p as te}from"./z5Xef_-v.js";import{p as he}from"./BCUUi0V0.js";import{p as me}from"./DJNADPa5.js";import{t as ve,d as ke,a as be}from"./BY5XjwMm.js";var xe=c('<span class="font-normal opacity-70" data-second-mate-host=""> </span>'),$e=c('<span class="inline-flex max-w-full min-w-0 items-center gap-1 rounded-sm bg-brass/10 px-1.5 text-xs leading-[1.15rem] font-medium text-brass"><!><span class="truncate"> <!></span></span>');function Ve(e,t){Y(t,!0);const r=_(()=>t.task.secondMate??null);var n=fe(),h=Z(n);{var k=v=>{var f=$e(),D=z(f);pe(D,{class:"size-3 shrink-0","aria-hidden":"true"});var A=C(D),M=z(A,!0),q=C(M);{var G=N=>{var F=xe(),i=W(F,!0);p(()=>B(i,` · ${s(r).host}`)),l(N,F)};y(q,N=>{s(r).where==="remote"&&s(r).host&&N(G)})}w(A),w(f),p(()=>{R(f,"title",s(r).where==="remote"?`Runs on second mate ${s(r).id}, on ${s(r).host??"another host"}`:`Runs on second mate ${s(r).id}, on this computer`),R(f,"data-second-mate-task",s(r).id),B(M,s(r).id)}),l(v,f)};y(h,v=>{s(r)&&v(k)})}l(e,n),ee()}const Ye={review:"GitHub review",thread:"GitHub review comment",comment:"GitHub comment",preview:"Preview feedback",plugin:"Plugin feedback","pr-review":"Wheelhouse PR review",decision:"Decisions inbox"},Ze={open:"To do",resolved:"Resolved on GitHub",addressed:"Worker reported it ready since"},et=e=>e.where?`${e.where.path}${e.where.line!=null?`, line ${e.where.line}`:""}`:null;function we(e){return{open:e.filter(t=>t.state==="open"),done:e.filter(t=>t.state!=="open")}}function tt(e){if(!e?.length)return null;const{open:t,done:r}=we(e);return[t.length?`${t.length} ${he(t.length,"change","changes")} to make`:null,r.length?`${r.length} done`:null].filter(Boolean).join(" · ")}const ye=e=>e.runs&&e.runs.current>1?e.runs.runs.at(-1)??null:null;function nt(e){if(!e.runs||e.runs.current<2)return null;const t=e.passage.steps[e.passage.current];return t?`Run ${e.runs.current} · ${t.label}`:`Run ${e.runs.current}`}var _e=c('<span aria-hidden="true"></span>');function Ce(e,t){let r=te(t,"class",3,"");var n=_e();p(()=>$(n,1,`pointer-events-none absolute inset-0 rounded-full opacity-40 motion-safe:animate-ping ${r()??""}`)),l(e,n)}var Re=c('<p class="mb-1.5 text-xs font-medium text-muted-foreground" data-run-label=""> </p>'),Q=c("<span></span>"),Ie=c("<span><!></span>"),Ae=c('<span class="relative z-10 mt-[2px] size-2 rounded-full border border-dashed border-muted-foreground/50 bg-card"></span>'),Me=c('<li class="relative flex min-w-0 flex-col items-center"><!> <!> <span> </span></li>'),Ne=c('<ol class="grid"></ol>'),Se=c('<li class="min-w-0"><div></div> <p> </p></li>'),Le=c('<ol class="grid gap-2"></ol>'),ze=c("<!> <!>",1);function rt(e,t){Y(t,!0);let r=te(t,"size",3,"card");const n=_(()=>t.task.passage),h=_(()=>ye(t.task)),k=_(()=>be(t.task)),v=_(()=>`${s(h)?`Run ${s(h).n}, `:""}Step ${s(n).current+1} of ${s(n).steps.length}: ${s(n).steps[s(n).current]?.label??""}${s(n).steps[s(n).current]?.failed?", failed":""}${t.task.busy?", in progress":""}`),f=i=>i?"bg-danger":ke[s(k)],D=i=>i?"text-danger":ve[s(k)];var A=ze(),M=Z(A);{var q=i=>{var u=Re(),m=W(u);p(()=>B(m,`Run ${s(h).n??""}`)),l(i,u)};y(M,i=>{s(h)&&i(q)})}var G=C(M,2);{var N=i=>{var u=Ne();J(u,23,()=>s(n).steps,m=>m.key,(m,a,b)=>{var x=Me(),S=z(x);{var O=o=>{var d=Q();p(()=>$(d,1,`absolute top-[5px] right-1/2 left-[-50%] ${s(b)<=s(n).current?"h-0.5 bg-foreground/50":"h-0 border-t border-dotted border-input"}`)),l(o,d)};y(S,o=>{s(b)>0&&o(O)})}var T=C(S,2);{var ae=o=>{var d=Ie(),le=z(d);{var de=L=>{{let ce=_(()=>f(s(a).failed));Ce(L,{get class(){return s(ce)}})}};y(le,L=>{t.task.busy&&L(de)})}w(d),p(L=>$(d,1,`relative z-10 size-3 rounded-full ring-[3px] ring-card ${L??""}`),[()=>f(s(a).failed)]),ge(1,d,()=>me),l(o,d)},ie=o=>{var d=Ae();l(o,d)},oe=o=>{var d=Q();p(()=>$(d,1,`relative z-10 mt-[2px] size-2 rounded-full ${s(a).state==="done"?"bg-foreground/50":"border border-border bg-card"}`)),l(o,d)};y(T,o=>{s(a).state==="current"?o(ae):s(a).state==="skipped"?o(ie,1):o(oe,-1)})}var X=C(T,2),ue=W(X,!0);w(x),p(o=>{R(x,"title",s(a).note??void 0),$(X,1,`mt-1.5 max-w-full truncate text-xs leading-none ${o??""}`),B(ue,s(a).short)},[()=>s(a).state==="current"?`font-semibold ${D(s(a).failed)}`:s(a).state==="done"?"text-muted-foreground":s(a).state==="skipped"?"text-muted-foreground italic line-through":"text-muted-foreground italic"]),l(m,x)}),w(u),p(()=>{K(u,`grid-template-columns: repeat(${s(n).steps.length??""}, minmax(0, 1fr))`),R(u,"aria-label",s(v))}),l(i,u)},F=i=>{var u=Le();J(u,21,()=>s(n).steps,m=>m.key,(m,a)=>{var b=Se(),x=z(b),S=C(x,2),O=W(S);w(b),p(T=>{R(b,"title",s(a).note??void 0),$(x,1,`h-1.5 rounded-full transition-colors duration-500 ${T??""}`),$(S,1,`mt-2 truncate text-xs leading-tight ${s(a).state==="current"?`font-medium ${s(a).failed?"text-danger":"text-foreground"}`:s(a).state==="done"?"text-muted-foreground":"text-muted-foreground italic"} ${s(a).state==="skipped"?"line-through":""}`),B(O,`${s(a).label??""}${s(a).failed?" failed":""}`)},[()=>s(a).state==="done"?"bg-foreground/60":s(a).state==="current"?f(s(a).failed):s(a).state==="skipped"?"border border-dashed border-border":"bg-border"]),l(m,b)}),w(u),p(()=>{K(u,`grid-template-columns: repeat(${s(n).steps.length??""}, minmax(0, 1fr))`),R(u,"aria-label",s(v))}),l(i,u)};y(G,i=>{r()==="card"?i(N):i(F,-1)})}l(e,A),ee()}const Be={intent:"Reading the brief",rebase:"Catching up with the main branch",review:"Reviewing the change",test:"Running the tests",document:"Checking the docs",lint:"Checking code style",push:"Pushing the branch",pr:"Opening the pull request",ci:"Waiting for CI"},De={rebase:"resolving conflicts with the main branch",review:"fixing review findings",test:"fixing test failures",document:"fixing the docs",lint:"fixing code style",ci:"fixing CI failures"},P={intent:"Brief read",rebase:"Up to date with the main branch",review:"No issues found",test:"Tests passed",document:"Docs up to date",lint:"Code style clean",push:"Branch pushed",pr:"Pull request opened",ci:"CI passed"},Fe={rebase:"Could not catch up with the main branch",test:"Tests failed",push:"Could not push the branch",pr:"Could not open the pull request",ci:"CI failed"},j=e=>e&&e[0].toUpperCase()+e.slice(1),g=(e,t,r)=>`${e} ${e===1?t:r}`,H=e=>Be[e.key]??`Running ${e.label.toLowerCase()}`,ne=e=>De[e]??"applying fixes",U=e=>Fe[e.key]??`${e.label} failed`;function V(e){const t=Math.max(0,Math.round(e/1e3));if(t<60)return`${t}s`;const r=Math.floor(t/60);if(r<60)return t%60?`${r}m ${t%60}s`:`${r}m`;const n=Math.floor(r/60);return r%60?`${n}h ${r%60}m`:`${n}h`}function E(e,t,r){if(r===null)return null;const n=t?Date.parse(t):NaN;return Number.isNaN(n)?e?.durationMs!=null?V(e.durationMs):null:V(r-n)}const I=(...e)=>e.filter(Boolean).join(" · ");function re(e,t){const r=e.gate?.questions??0;if(r>0)return g(r,"question","questions")+" for Firstmate";const n=e.gate?.findings||t.findings;return n>0?`${g(n,"finding","findings")} waiting on Firstmate`:"waiting on Firstmate"}function se(e,t){return`${ne(t.key)}${e.round?`, round ${e.round}`:""}`}const Te=e=>e.steps.find(t=>t.key===e.step)??null;function st(e,t){const r=e.ci==="green";if(e.outcome==="passed")return r?"All checks passed · CI green":"All checks passed";if(e.outcome==="cancelled")return"Checks stopped before finishing";const n=Te(e);if(e.outcome==="failed")return n?.state==="failed"?U(n):"Checks failed";if(!n)return`${e.label} step`;switch(n.state){case"waiting":return I(H(n),E(n,null,t),re(e,n));case"fixing":return j(I(e.answered&&"Answer received",se(e,n),E(n,e.roundStartedAt??e.startedAt,t)));case"failed":return U(n);case"running":if(n.key==="ci"){if(r)return"All checks passed · CI green";if(e.ci==="red")return I("CI found problems",E(n,e.startedAt,t))}return I(H(n),E(n,e.startedAt,t));case"upcoming":return"Waiting for the checks to start";default:return r?"All checks passed · CI green":"Checks finished"}}function Ee(e,t){const r=e.findings,n=e.fixes??0;switch(e.state){case"upcoming":return"";case"skipped":return"Skipped";case"waiting":return j(re(t,e));case"fixing":return j(I(r>0&&`Found ${g(r,"issue","issues")}`,e.key===t.step?se(t,e):ne(e.key)));case"failed":return I(U(e),r>0&&g(r,"finding","findings"));case"running":return e.key==="ci"?t.ci==="green"?"CI passed; watching until it merges":t.ci==="red"?"CI found problems":"Waiting for CI checks":`${H(e)}…`;default:return e.key==="ci"&&t.ci==="red"?"CI found problems":e.fixes===null&&e.key==="review"?r>0?`Found ${g(r,"issue","issues")}`:"No issues left":r>0&&n>0?`Found ${g(r,"issue","issues")} · fixed in ${g(n,"round","rounds")}`:r>0?e.key==="review"?`Found ${g(r,"issue","issues")}; no changes needed`:`${P[e.key]??"Done"} · ${g(r,"note","notes")}`:n>0?`${e.key==="review"?"No issues left":P[e.key]??"Done"} after ${g(n,"round of fixes","rounds of fixes")}`:P[e.key]??"Done"}}function at(e){if(!e.length)return null;const t=e.length,r=v=>e.filter(f=>f.state===v).length,n=r("fail"),h=r("running")+r("pending");if(n)return`${n} of ${t} ${t===1?"check":"checks"} failed`;if(h)return`${h} of ${t} ${t===1?"check":"checks"} still running`;const k=r("pass");return k?`${k} of ${t} ${t===1?"check":"checks"} passed`:`${t} ${t===1?"check":"checks"} reported`}const it=e=>!!e.pipeline?.steps.length&&e.status!=="landed";function We(e,t){if(e.key==="ci"&&e.state!=="upcoming"&&e.state!=="skipped"){if(t.ci==="green")return"done";if(t.ci==="red"&&e.state!=="fixing")return"failed"}switch(e.state){case"done":return"done";case"running":return"active";case"waiting":return"waiting";case"fixing":return"fixing";case"failed":return"failed";case"skipped":return"skipped";default:return"todo"}}const qe={done:"done",running:"active",waiting:"waiting",fixing:"fixing",failed:"failed",skipped:"skipped",upcoming:"todo"};function ot(e,t){const r=new Map((t?.steps??[]).map(n=>[n.key,n]));return e?.steps.length?e.steps.map(n=>({key:n.key,label:n.label,tone:We(n,e),summary:Ee(n,e),durationMs:n.durationMs,current:n.key===e.step&&e.outcome==="running",report:r.get(n.key)??null})):(t?.steps??[]).map(n=>({key:n.key,label:n.label,tone:qe[n.state],summary:n.summary,durationMs:n.durationMs,current:!1,report:n}))}function ut(e){switch(e.outcome){case"passed":return"All checks passed";case"failed":return"Checks failed";case"cancelled":return"Checks stopped before finishing";case"running":return"Checks under way";default:return"Checks"}}export{Ce as B,rt as S,Ve as W,it as a,tt as b,st as c,ot as d,ut as e,V as f,at as g,we as h,Ze as i,Ye as j,et as k,ye as l,nt as r,We as s};
@@ -1 +1 @@
1
- import{o as y}from"./D8OKqJm7.js";import{aa as p,bD as I,m as u,g as f,v as d}from"./D46tdsTs.js";const h=[];function k(e,t=p){let n=null;const s=new Set;function r(o){if(I(e,o)&&(e=o,n)){const c=!h.length;for(const l of s)l[1](),h.push(l,e);if(c){for(let l=0;l<h.length;l+=2)h[l][0](h[l+1]);h.length=0}}}function i(o){r(o(e))}function a(o,c=p){const l=[o,c];return s.add(l),s.size===1&&(n=t(r,i)||p),o(e),()=>{s.delete(l),s.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:a}}const N="1794558769475";new URL("sveltekit-internal://");function D(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function H(e){return e.split("%25").map(decodeURI).join("%25")}function K(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function B({href:e}){return e.split("#")[0]}function L(){}function O(...e){let t=5381;for(const n of e)if(typeof n=="string"){let s=n.length;for(;s;)t=t*33^n.charCodeAt(--s)}else if(ArrayBuffer.isView(n)){const s=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=s.length;for(;r;)t=t*33^s[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function q(e){const t=atob(e),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}const $=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&b.delete(m(e)),$(e,t));const b=new Map;function W(e,t){const n=m(e,t),s=document.querySelector(n);if(s?.textContent){s.remove();let{body:r,...i}=JSON.parse(s.textContent);s.getAttribute("data-b64")!==null&&(r=q(r));const o=s.getAttribute("data-ttl");return o&&b.set(n,{body:r,init:i,ttl:1e3*Number(o)}),Promise.resolve(new Response(r,i))}return window.fetch(e,t)}function X(e,t,n){if(b.size>0){const s=m(e,n),r=b.get(s);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(r.body,r.init);b.delete(s)}}return window.fetch(t,n)}function m(e,t){let s=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),s+=`[data-hash="${O(...r)}"]`}return s}const C=globalThis.__sveltekit_iuwxq0?.base??"",P=globalThis.__sveltekit_iuwxq0?.assets??C??"",J="sveltekit:snapshot",M="sveltekit:scroll",F="sveltekit:states",Q="sveltekit:pageurl",Z="sveltekit:history",ee="sveltekit:navigation",v={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},E=location.origin;function te(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function ne(){return{x:pageXOffset,y:pageYOffset}}function g(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const S={...v,"":v.hover};function T(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function se(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=T(e)}}function re(e,t,n){let s;try{if(s=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&s.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";s.hash=`#${o}${s.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,i=!s||!!r||V(s,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),a=s?.origin===E&&e.hasAttribute("download");return{url:s,external:i,target:r,download:a}}function oe(e){let t=null,n=null,s=null,r=null,i=null,a=null,o=e;for(;o&&o!==document.documentElement;)s===null&&(s=g(o,"preload-code")),r===null&&(r=g(o,"preload-data")),t===null&&(t=g(o,"keepfocus")),n===null&&(n=g(o,"noscroll")),i===null&&(i=g(o,"reload")),a===null&&(a=g(o,"replacestate")),o=T(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:S[s??"off"],preload_data:S[r??"off"],keepfocus:c(t),noscroll:c(n),reload:c(i),replace_state:c(a)}}function ae(e){const t=k(e);let n=!0;function s(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function i(a){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&a(o=c)})}return{notify:s,set:r,subscribe:i}}const U={v:L};function ie(){const{set:e,subscribe:t}=k(!1);let n;async function s(){clearTimeout(n);try{const r=await fetch(`${P}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==N;return a&&(e(!0),U.v(),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:s}}function V(e,t,n){return e.origin!==E||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function le(e){}const x=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...x];const j=new Set([...x]);[...j];let w,A,_;const G=y.toString().includes("$$")||/function \w+\(\) \{\}/.test(y.toString()),R="a:";G?(w={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(R)},A={current:null},_={current:!1}):(w=new class{#e=u({});get data(){return f(this.#e)}set data(t){d(this.#e,t)}#t=u(null);get form(){return f(this.#t)}set form(t){d(this.#t,t)}#n=u(null);get error(){return f(this.#n)}set error(t){d(this.#n,t)}#s=u({});get params(){return f(this.#s)}set params(t){d(this.#s,t)}#r=u({id:null});get route(){return f(this.#r)}set route(t){d(this.#r,t)}#o=u({});get state(){return f(this.#o)}set state(t){d(this.#o,t)}#a=u(-1);get status(){return f(this.#a)}set status(t){d(this.#a,t)}#i=u(new URL(R));get url(){return f(this.#i)}set url(t){d(this.#i,t)}},A=new class{#e=u(null);get current(){return f(this.#e)}set current(t){d(this.#e,t)}},_=new class{#e=u(!1);get current(){return f(this.#e)}set current(t){d(this.#e,t)}},U.v=()=>_.current=!0);function de(e){Object.assign(w,e)}export{Z as H,ee as N,Q as P,F as S,A as a,C as b,oe as c,B as d,K as e,se as f,re as g,D as h,V as i,ie as j,ae as k,v as l,H as m,L as n,E as o,w as p,J as q,te as r,ne as s,X as t,de as u,W as v,k as w,M as x,le as y};
1
+ import{o as y}from"./D8OKqJm7.js";import{aa as p,bD as N,m as u,g as f,v as d}from"./D46tdsTs.js";const h=[];function k(e,t=p){let n=null;const s=new Set;function r(o){if(N(e,o)&&(e=o,n)){const c=!h.length;for(const l of s)l[1](),h.push(l,e);if(c){for(let l=0;l<h.length;l+=2)h[l][0](h[l+1]);h.length=0}}}function i(o){r(o(e))}function a(o,c=p){const l=[o,c];return s.add(l),s.size===1&&(n=t(r,i)||p),o(e),()=>{s.delete(l),s.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:a}}const L="1794582435281";new URL("sveltekit-internal://");function D(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function H(e){return e.split("%25").map(decodeURI).join("%25")}function K(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function B({href:e}){return e.split("#")[0]}function O(){}function x(...e){let t=5381;for(const n of e)if(typeof n=="string"){let s=n.length;for(;s;)t=t*33^n.charCodeAt(--s)}else if(ArrayBuffer.isView(n)){const s=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=s.length;for(;r;)t=t*33^s[--r]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function $(e){const t=atob(e),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}const q=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&b.delete(m(e)),q(e,t));const b=new Map;function W(e,t){const n=m(e,t),s=document.querySelector(n);if(s?.textContent){s.remove();let{body:r,...i}=JSON.parse(s.textContent);s.getAttribute("data-b64")!==null&&(r=$(r));const o=s.getAttribute("data-ttl");return o&&b.set(n,{body:r,init:i,ttl:1e3*Number(o)}),Promise.resolve(new Response(r,i))}return window.fetch(e,t)}function X(e,t,n){if(b.size>0){const s=m(e,n),r=b.get(s);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(r.body,r.init);b.delete(s)}}return window.fetch(t,n)}function m(e,t){let s=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const r=[];t.headers&&r.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&r.push(t.body),s+=`[data-hash="${x(...r)}"]`}return s}const C=globalThis.__sveltekit_4focgo?.base??"",P=globalThis.__sveltekit_4focgo?.assets??C??"",J="sveltekit:snapshot",M="sveltekit:scroll",F="sveltekit:states",Q="sveltekit:pageurl",Z="sveltekit:history",ee="sveltekit:navigation",v={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},E=location.origin;function te(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function ne(){return{x:pageXOffset,y:pageYOffset}}function g(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const S={...v,"":v.hover};function T(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function se(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=T(e)}}function re(e,t,n){let s;try{if(s=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&s.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";s.hash=`#${o}${s.hash}`}}catch{}const r=e instanceof SVGAElement?e.target.baseVal:e.target,i=!s||!!r||V(s,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),a=s?.origin===E&&e.hasAttribute("download");return{url:s,external:i,target:r,download:a}}function oe(e){let t=null,n=null,s=null,r=null,i=null,a=null,o=e;for(;o&&o!==document.documentElement;)s===null&&(s=g(o,"preload-code")),r===null&&(r=g(o,"preload-data")),t===null&&(t=g(o,"keepfocus")),n===null&&(n=g(o,"noscroll")),i===null&&(i=g(o,"reload")),a===null&&(a=g(o,"replacestate")),o=T(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:S[s??"off"],preload_data:S[r??"off"],keepfocus:c(t),noscroll:c(n),reload:c(i),replace_state:c(a)}}function ae(e){const t=k(e);let n=!0;function s(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function i(a){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&a(o=c)})}return{notify:s,set:r,subscribe:i}}const U={v:O};function ie(){const{set:e,subscribe:t}=k(!1);let n;async function s(){clearTimeout(n);try{const r=await fetch(`${P}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==L;return a&&(e(!0),U.v(),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:s}}function V(e,t,n){return e.origin!==E||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function le(e){}const I=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...I];const j=new Set([...I]);[...j];let w,A,_;const G=y.toString().includes("$$")||/function \w+\(\) \{\}/.test(y.toString()),R="a:";G?(w={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(R)},A={current:null},_={current:!1}):(w=new class{#e=u({});get data(){return f(this.#e)}set data(t){d(this.#e,t)}#t=u(null);get form(){return f(this.#t)}set form(t){d(this.#t,t)}#n=u(null);get error(){return f(this.#n)}set error(t){d(this.#n,t)}#s=u({});get params(){return f(this.#s)}set params(t){d(this.#s,t)}#r=u({id:null});get route(){return f(this.#r)}set route(t){d(this.#r,t)}#o=u({});get state(){return f(this.#o)}set state(t){d(this.#o,t)}#a=u(-1);get status(){return f(this.#a)}set status(t){d(this.#a,t)}#i=u(new URL(R));get url(){return f(this.#i)}set url(t){d(this.#i,t)}},A=new class{#e=u(null);get current(){return f(this.#e)}set current(t){d(this.#e,t)}},_=new class{#e=u(!1);get current(){return f(this.#e)}set current(t){d(this.#e,t)}},U.v=()=>_.current=!0);function de(e){Object.assign(w,e)}export{Z as H,ee as N,Q as P,F as S,A as a,C as b,oe as c,B as d,K as e,se as f,re as g,D as h,V as i,ie as j,ae as k,v as l,H as m,O as n,E as o,w as p,J as q,te as r,ne as s,X as t,de as u,W as v,k as w,M as x,le as y};
@@ -1,2 +1,2 @@
1
- import{s as yt}from"./D8OKqJm7.js";import{H as B,N as Y,r as me,n as N,i as je,b as T,s as $,a as Se,f as tt,g as Ie,c as oe,d as be,S as Oe,P as rt,p as I,o as Ne,e as wt,h as vt,u as xe,j as bt,w as Et,k as Xe,l as X,m as At,q as nt,t as kt,v as St,x as at}from"./CpqCFuwf.js";import{G as se,a8 as It,A as Rt}from"./D46tdsTs.js";class te{constructor(t,r){this.status=t,typeof r=="string"?this.body={message:r}:r?this.body=r:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class De{constructor(t,r){try{new Headers({location:r})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(r)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=r}}class Ce extends Error{constructor(t,r,n){super(n),this.status=t,this.text=r}}const Pt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,Lt=/^\/\((?:[^)]+)\)$/;function Tt(e){const t=[];return{pattern:e==="/"||Lt.test(e)?/^\/$/:new RegExp(`^${jt(e).map(n=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(n);if(i)return t.push({name:i[1],matcher:i[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const a=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(n);if(a)return t.push({name:a[1],matcher:a[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!n)return;const o=n.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return Ee(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Ee(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const l=Pt.exec(c),[,d,p,u,h]=l;return t.push({name:u,matcher:h,optional:!!d,rest:!!p,chained:p?f===1&&o[0]==="":!1}),p?"([^]*?)":d?"([^/]*)?":"([^/]+?)"}return Ee(c)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function jt(e){return e.slice(1).split("/").filter(Ut)}function Ot(e,t,r){const n={},i=e.slice(1),a=i.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const c=t[s];let f=i[s-o];if(c.chained&&c.rest&&o&&(f=i.slice(s-o,s+1).filter(l=>l).join("/"),o=0),f===void 0)if(c.rest)f="";else continue;if(!c.matcher||r[c.matcher](f)){n[c.name]=f;const l=t[s+1],d=i[s+1];l&&!l.rest&&l.optional&&d&&c.chained&&(o=0),!l&&!d&&Object.keys(n).length===a.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return n}function Ee(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Nt({nodes:e,server_loads:t,dictionary:r,matchers:n}){const i=new Set(t);return Object.entries(r).map(([s,[c,f,l]])=>{const{pattern:d,params:p}=Tt(s),u={id:s,exec:h=>{const w=d.exec(h);if(w)return Ot(w,p,n)},errors:[1,...l||[]].map(h=>e[h]),layouts:[0,...f||[]].map(o),leaf:a(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(s){const c=s<0;return c&&(s=~s),[c,e[s]]}function o(s){return s===void 0?s:[i.has(s),e[s]]}}function ot(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ze(e,t,r=JSON.stringify){const n=r(t);try{sessionStorage[e]=n}catch{}}const xt=-1,Dt=-2,Ct=-3,Bt=-4,Mt=-5,$t=-6,Ft=-7,st=2**32-1,Re=st-1;function qt(e){return!(!Number.isInteger(e)||e<0||e>Re)}function Vt(e){return!(!Number.isInteger(e)||e<0||e>st)}function Ht(e){return Uint8Array.fromBase64(e).buffer}function Yt(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function Kt(e){const t=atob(e),r=t.length,n=new Uint8Array(r);for(let i=0;i<r;i++)n[i]=t.charCodeAt(i);return n.buffer}const Gt=typeof Uint8Array.fromBase64=="function",Xt=typeof process=="object"&&process.versions?.node!==void 0,zt=Gt?Ht:Xt?Yt:Kt;function Wt(e,t){return e}const Jt=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,We=typeof SharedArrayBuffer>"u"?void 0:Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get,Zt={fromPrimitive:e=>e,fromISOString:e=>new Date(e),fromStringValue:(e,t)=>e==="URL"?new URL(t):e==="URLSearchParams"?new URLSearchParams(t):Temporal[e.slice(9)].from(t),fromArrayBuffer:e=>e,fromRegExpInfo:(e,t)=>new RegExp(e,t),fromViewInfo:(e,t,r,n)=>{try{Jt.call(t)}catch(a){if(!We)throw a;We.call(t)}const i=globalThis[e];return r!==void 0?new i(t,r,n):new i(t)},box:e=>Object(e),createArray:e=>new Array(e),createSparseArray:e=>{const t=[];return t[Re]=void 0,delete t[Re],t.length=e,t},createObject:()=>({}),createNullPrototypeObject:()=>Object.create(null),createSet:()=>new Set,createMap:()=>new Map,set:(e,t,r)=>{e[t]=r},addValue:(e,t)=>{e.add(t)},addEntry:(e,t,r)=>{e.set(t,r)}},Qt=Object.freeze(Zt);function er(e,t,r){const n=Wt(Qt);if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const i=e,a=Array(i.length);let o=null;function s(c,f=!1){if(c===xt)return n.fromPrimitive(void 0);if(c===Ct)return n.fromPrimitive(NaN);if(c===Bt)return n.fromPrimitive(1/0);if(c===Mt)return n.fromPrimitive(-1/0);if(c===$t)return n.fromPrimitive(-0);if(f||typeof c!="number")throw new Error("Invalid input");if(c in a)return a[c];if(c>=i.length)throw new Error("Invalid input");const l=i[c];if(!l||typeof l!="object")a[c]=n.fromPrimitive(l);else if(Array.isArray(l))if(typeof l[0]=="string"){const d=l[0],p=t&&Object.hasOwn(t,d)?t[d]:void 0;if(p){let u=l[1];if(typeof u!="number"&&(u=i.push(l[1])-1),Object.hasOwn(a,u))return a[c]=p(a[u]);if(o??=new Set,o.has(u))throw new Error("Invalid circular reference");return o.add(u),a[c]=p(s(u)),o.delete(u),a[c]}switch(d){case"Date":a[c]=n.fromISOString(l[1]);break;case"Set":const u=n.createSet();a[c]=u;for(let _=1;_<l.length;_+=1)n.addValue(u,s(l[_]));break;case"Map":const h=n.createMap();a[c]=h;for(let _=1;_<l.length;_+=2)n.addEntry(h,s(l[_]),s(l[_+1]));break;case"RegExp":a[c]=n.fromRegExpInfo(l[1],l[2]);break;case"Object":{const _=l[1];if(typeof i[_]=="object"&&i[_][0]!=="BigInt")throw new Error("Invalid input");a[c]=n.box(s(_));break}case"BigInt":a[c]=n.fromPrimitive(BigInt(l[1]));break;case"null":const w=n.createNullPrototypeObject();a[c]=w;for(let _=1;_<l.length;_+=2){const m=l[_];if(typeof m!="string")throw new Error("Cannot parse an object with a non-string key");if(m==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");n.set(w,m,s(l[_+1]))}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Float16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":case"DataView":{if(i[l[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const _=s(l[1]);a[c]=n.fromViewInfo(d,_,l[2],l[3]);break}case"ArrayBuffer":{const _=l[1];if(typeof _!="string")throw new Error("Invalid ArrayBuffer encoding");a[c]=n.fromArrayBuffer(zt(_));break}case"URL":case"URLSearchParams":case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{a[c]=n.fromStringValue(d,l[1]);break}default:throw new Error(`Unknown type ${d}`)}}else if(l[0]===Ft){const d=l[1];if(!Vt(d))throw new Error("Invalid input");const p=n.createSparseArray(d);a[c]=p;for(let u=2;u<l.length;u+=2){const h=l[u];if(!qt(h)||h>=d)throw new Error("Invalid input");n.set(p,h,s(l[u+1]))}}else{const d=n.createArray(l.length);a[c]=d;for(let p=0;p<l.length;p+=1){const u=l[p];u!==Dt&&n.set(d,p,s(u))}}else{const d=n.createObject();a[c]=d;for(const p of Object.keys(l)){if(p==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");n.set(d,p,s(l[p]))}}return a[c]}return s(0)}function tr(e){return e.filter(t=>t!=null)}const rr="x-sveltekit-invalidated",nr="x-sveltekit-trailing-slash";function F(e,t){return e+"/"+t}function ie(e){return e instanceof te||e instanceof Ce?e.status:500}function ar(e){return e instanceof Ce?e.text:"Internal Error"}const or="/__data.json",sr=".html__data.json";function ir(e){return e.endsWith(".html")?e.replace(/\.html$/,sr):e.replace(/\/$/,"")+or}async function*cr(e,t){let r=!1,n="";const i=new TextDecoder;for(;;){let a=n.indexOf(t);for(;a!==-1;)yield n.slice(0,a),n=n.slice(a+t.length),a=n.indexOf(t);if(r){n&&(yield n);return}const o=await e.read();r=o.done,o.value&&(n+=i.decode(o.value,{stream:!0})),r&&(n+=i.decode())}}async function*lr(e){for await(const t of cr(e,`
2
- `)){const r=t.trim();r&&(yield JSON.parse(r))}}const{onMount:fr}=yt,ur=Rt??(e=>e()),dr=new Set(["icon","shortcut icon","apple-touch-icon"]);let z=null;const D=ot(at)??{},Z=ot(nt)??{},x={url:Xe({}),page:Xe({}),navigating:Et(null),updated:bt()};function Be(e){D[e]=$()}function hr(e,t){let r=e+1;for(;D[r];)delete D[r],r+=1;for(r=t+1;Z[r];)delete Z[r],r+=1}function K(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(N)}async function it(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(T||"/");e&&await e.update()}}let Me,Pe,ce,O,Le,E;const le=[],fe=[];let L=null;function Q(){L?.fork?.then(e=>e?.discard()),L=null,q={element:void 0,href:void 0}}const ae=new Map,$e=new Set,ct=new Set,V=new Set;let g={branch:[],error:null,url:null,nav:null},Fe=!1,ue=!1,Je=!0,ee=!1,W=!1,lt=!1,re=!1,ge,k,R,U;const J=new Set;let Ae;const de=new Map,he=new Map;async function Ur(e,t,r){if(globalThis.__sveltekit_iuwxq0.data){const{q:a={},p:o={},l:s={},f:c={}}=globalThis.__sveltekit_iuwxq0.data;for(const f in a)a[f];for(const f in s)s[f];for(const f in c)c[f];for(const f in o)o[f]}document.URL!==location.href&&(location.href=location.href),E=e,await e.hooks.init?.(),Me=Nt(e),O=document.documentElement,Le=t,Pe=e.nodes[0],ce=e.nodes[1],Pe(),ce(),k=history.state?.[B],R=history.state?.[Y],k||(k=R=Date.now(),history.replaceState({...history.state,[B]:k,[Y]:R},""));const n=D[k];function i(){n&&(history.scrollRestoration="manual",scrollTo(n.x,n.y))}r?(i(),await kr(Le,r)):(await H({type:"enter",url:me(E.hash?Rr(new URL(location.href)):location.href),replace_state:!0}),i()),Ar()}async function pr(e=!0,t=!0){if(await(Ae||=Promise.resolve()),!Ae)return;Ae=null;const r=U={},n=await ne(g.url,!0);Q();const i=new Map;if(re){for(const o of de.values())for(const{resource:s}of o.values())s.refresh();for(const[o,s]of he)for(const[c,{resource:f}]of s){const l=F(o,c),d=f.reconnect();d.catch(N),i.set(l,d)}}if(e){const o=I.state,s=n&&await Ye(n);if(!s||r!==U)return;if(s.type==="redirect")return qe(new URL(s.location,g.url).href,{replaceState:!0},1,r);t||(s.props.page.state=o),xe(s.props.page),g={...s.state,nav:g.nav},Te(),ge.$set(s.props)}else Te();const a=[];for(const o of de.values())for(const{resource:s}of o.values())a.push(s);for(const[o,s]of he)for(const c of s.keys()){const f=F(o,c),l=i.get(f);l&&a.push(l)}await Promise.all(a).catch(N)}function Te(){le.length=0,re=!1}function ft(e){fe.some(t=>t?.snapshot)&&(Z[e]=fe.map(t=>t?.snapshot?.capture()))}function ut(e){Z[e]?.forEach((t,r)=>{fe[r]?.snapshot?.restore(t)})}function Ze(){Be(k),ze(at,D),ft(R),ze(nt,Z)}async function qe(e,t,r,n){let i,a;t.invalidateAll&&Q(),await H({type:"goto",url:me(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:n,accept:()=>{if(t.invalidateAll){re=!0,i=new Set;for(const[o,s]of de)for(const[c,f]of s)f.resource?.reset(),i.add(F(o,c));a=new Set;for(const[o,s]of he)for(const c of s.keys())a.add(F(o,c))}t.invalidate&&t.invalidate.forEach(Er)}}),t.invalidateAll&&se().then(se).then(()=>{for(const[o,s]of de)for(const[c,{resource:f}]of s)i?.has(F(o,c))&&f.start();for(const[o,s]of he)for(const[c,{resource:f}]of s)a?.has(F(o,c))&&f.reconnect()})}async function _r(e){if(e.id!==L?.id){Q();const t={};J.add(t),L={id:e.id,token:t,promise:Ye({...e,preload:t}).then(r=>(J.delete(t),r.type==="loaded"&&r.state.error&&Q(),r)),fork:null}}return L.promise}async function ke(e){const t=(await ne(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(r=>r[1]()))}async function dt(e,t,r){const n={params:g.params,route:{id:g.route?.id??null},url:new URL(location.href)};if(g={...e.state,nav:n},xe(e.props.page),ge=new E.root({target:t,props:{...e.props,stores:x,components:fe},hydrate:r,sync:!1,transformError:void 0}),await Promise.resolve(),r){const i={from:null,to:{...n,scroll:D[k]??$()},willUnload:!1,type:"enter",complete:Promise.resolve()};V.forEach(a=>a(i))}ut(R),ue=!0}async function pe({url:e,params:t,branch:r,errors:n,status:i,error:a,route:o,form:s}){let c="never";if(T&&(e.pathname===T||e.pathname===T+"/"))c="always";else for(const h of r)h?.slash!==void 0&&(c=h.slash);e.pathname=vt(e.pathname,c),e.search=e.search;const f={type:"loaded",state:{url:e,params:t,branch:r,error:a,route:o},props:{constructors:tr(r).map(h=>h.node.component),page:we(I)}};s!==void 0&&(f.props.form=s);let l={},d=!I,p=0;for(let h=0;h<Math.max(r.length,g.branch.length);h+=1){const w=r[h],_=g.branch[h];w?.data!==_?.data&&(d=!0),w&&(l={...l,...w.data},d&&(f.props[`data_${p}`]=l),p+=1)}return(!g.url||e.href!==g.url.href||g.error!==a||s!==void 0&&s!==I.form||d)&&(f.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?l:I.data}),f}async function Ve({loader:e,parent:t,url:r,params:n,route:i,server_data_node:a}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();return{node:c,loader:e,server:a,universal:c.universal?.load?{type:"data",data:o,uses:s}:null,data:o??a?.data??null,slash:c.universal?.trailingSlash??a?.slash}}function mr(e,t,r){let n=e instanceof Request?e.url:e;const i=new URL(n,r);i.origin===r.origin&&(n=i.href.slice(r.origin.length));const a=ue?kt(n,i.href,t):St(n,t);return{resolved:i,promise:a}}function Qe(e,t,r,n,i,a){if(re)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&r)return!0;for(const o of i.search_params)if(n.has(o))return!0;for(const o of i.params)if(a[o]!==g.params[o])return!0;for(const o of i.dependencies)if(le.some(s=>s(new URL(o))))return!0;return!1}function He(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function gr(e,t){if(!e)return new Set(t.searchParams.keys());const r=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const n of r){const i=e.searchParams.getAll(n),a=t.searchParams.getAll(n);i.every(o=>a.includes(o))&&a.every(o=>i.includes(o))&&r.delete(n)}return r}function et({error:e,url:t,route:r,params:n}){return{type:"loaded",state:{error:e,url:t,route:r,params:n,branch:[]},props:{page:we(I),constructors:[]}}}async function Ye({id:e,invalidating:t,url:r,params:n,route:i,preload:a}){if(L?.id===e)return J.delete(L.token),L.promise;const{errors:o,layouts:s,leaf:c}=i,f=[...s,c];o.forEach(y=>y?.().catch(N)),f.forEach(y=>y?.[1]().catch(N));let l=null;const d=g.url?e!==_e(g.url):!1,p=g.route?i.id!==g.route.id:!1,u=gr(g.url,r);let h=!1;{const y=f.map((v,A)=>{const S=g.branch[A],b=!!v?.[0]&&(S?.loader!==v[1]||Qe(h,p,d,u,S.server?.uses,n));return b&&(h=!0),b});if(y.some(Boolean)){try{l=await _t(r,y)}catch(v){const A=await M(v,{url:r,params:n,route:{id:e}});return a&&J.has(a)?et({error:A,url:r,params:n,route:i}):ye({status:ie(v),error:A,url:r,route:i})}if(l.type==="redirect")return l}}const w=l?.nodes;let _=!1;const m=f.map(async(y,v)=>{if(!y)return;const A=g.branch[v],S=w?.[v];if((!S||S.type==="skip")&&y[1]===A?.loader&&!Qe(_,p,d,u,A.universal?.uses,n))return A;if(_=!0,S?.type==="error")throw S;return Ve({loader:y[1],url:r,params:n,route:i,parent:async()=>{const j={};for(let C=0;C<v;C+=1)Object.assign(j,(await m[C])?.data);return j},server_data_node:He(S===void 0&&y[0]?{type:"skip"}:S??null,y[0]?A?.server:void 0)})});for(const y of m)y.catch(N);const P=[];for(let y=0;y<f.length;y+=1)if(f[y])try{P.push(await m[y])}catch(v){if(v instanceof De)return{type:"redirect",location:v.location};if(a&&J.has(a))return et({error:await M(v,{params:n,url:r,route:{id:i.id}}),url:r,params:n,route:i});let A=ie(v),S;if(w?.includes(v))A=v.status??A,S=v.error;else if(v instanceof te)S=v.body;else{if(await x.updated.check())return await it(),await K(r);S=await M(v,{params:n,url:r,route:{id:i.id}})}const b=await yr(y,P,o);return b?pe({url:r,params:n,branch:P.slice(0,b.idx).concat(b.node),errors:o,status:A,error:S,route:i}):await pt(r,{id:i.id},S,A)}else P.push(void 0);return pe({url:r,params:n,branch:P,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function yr(e,t,r){for(;e--;)if(r[e]){let n=e;for(;!t[n];)n-=1;try{return{idx:n+1,node:{node:await r[e](),loader:r[e],data:{},server:null,universal:null}}}catch{continue}}}async function ye({status:e,error:t,url:r,route:n}){const i={};let a=null;if(E.server_loads[0]===0)try{const s=await _t(r,[!0]);if(s.type!=="data"||s.nodes[0]&&s.nodes[0].type!=="data")throw 0;a=s.nodes[0]??null}catch(s){if(!(s instanceof te&&s.status===404)&&(r.origin!==Ne||r.pathname!==location.pathname||Fe))return await K(r)}try{const o=await Ve({loader:Pe,url:r,params:i,route:n,parent:()=>Promise.resolve({}),server_data_node:He(a)}),s={node:await ce(),loader:ce,universal:null,server:null,data:null};return pe({url:r,params:i,branch:[o,s],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof De){await qe(new URL(o.location,location.href),{},0);return}const s=await E.get_error_template(),c=await M(o,{url:r,params:i,route:n}),f=String(c?.message??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),l=s({status:e,message:f}),d=new DOMParser().parseFromString(l,"text/html");throw document.documentElement.replaceChild(document.adoptNode(d.head),document.head),document.documentElement.replaceChild(document.adoptNode(d.body),document.body),o}}async function wr(e){const t=e.href;if(ae.has(t))return ae.get(t);let r;try{const n=(async()=>{let i=await E.hooks.reroute({url:new URL(e),fetch:async(a,o)=>mr(a,o,e).promise})??e;if(typeof i=="string"){const a=new URL(e);E.hash?a.hash=i:a.pathname=i,i=a}return i})();ae.set(t,n),r=await n}catch{ae.delete(t);return}return r}async function ne(e,t){if(e&&!je(e,T,E.hash)){const r=await wr(e);if(!r)return;const n=vr(r);for(const i of Me){const a=i.exec(n);if(a)return{id:_e(e),invalidating:t,route:i,params:wt(a),url:e}}}}function vr(e){return At(E.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(T.length))||"/"}function _e(e){return(E.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:r,delta:n,event:i,scroll:a}){let o=!1;const s=Ge(g,r,e,t,a??null);n!==void 0&&(s.navigation.delta=n),i!==void 0&&(s.navigation.event=i);const c={...s.navigation,cancel:()=>{o=!0,s.reject(new Error("navigation cancelled"))}};return ee||$e.forEach(f=>f(c)),o?null:s}async function H({type:e,url:t,popped:r,keepfocus:n,noscroll:i,replace_state:a,state:o={},redirect_count:s=0,nav_token:c={},accept:f=N,block:l=N,event:d}){const p=U;U=c;const u=await ne(t,!1),h=e==="enter"?Ge(g,u,t,e):ht({url:t,type:e,delta:r?.delta,intent:u,scroll:r?.scroll,event:d});if(!h){l(),U===c&&(U=p);return}const w=k,_=R;f(),ee=!0,ue&&h.navigation.type!=="enter"&&x.navigating.set(Se.current=h.navigation);let m=u&&await Ye(u);if(!m){if(je(t,T,E.hash))return await K(t,a);m=await pt(t,{id:null},await M(new Ce(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,a)}if(t=u?.url||t,U!==c){h.reject(new Error("navigation aborted"));return}if(!m)return;if(m.type==="redirect"){if(s<20){await H({type:e,url:new URL(m.location,t),popped:r,keepfocus:n,noscroll:i,replace_state:a,state:o,redirect_count:s+1,nav_token:c}),h.fulfil(void 0);return}if(m=await ye({status:500,error:await M(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!m)return}else if(m.props.page.status>=400&&await x.updated.check())return await it(),await K(t,a);if(Te(),Be(w),ft(_),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),o=r?r.state:o,!r){const b=a?0:1,j={[B]:k+=b,[Y]:R+=b,[Oe]:o};(a?history.replaceState:history.pushState).call(history,j,"",t),a||hr(k,R)}const P=u&&L?.id===u.id?L.fork:null;L?.fork&&!P?Q():(L=null,q={element:void 0,href:void 0}),m.props.page.state=o;let y;if(ue){const b=(await Promise.all(Array.from(ct,G=>G(h.navigation)))).filter(G=>typeof G=="function");if(b.length>0){let G=function(){b.forEach(ve=>{V.delete(ve)})};b.push(G),b.forEach(ve=>{V.add(ve)})}const j=h.navigation.to;g={...m.state,nav:{params:j.params,route:j.route,url:j.url}},m.props.page&&(m.props.page.url=t),!n&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();const C=P&&await P;C?y=C.commit():(z=null,ge.$set(m.props),z&&Object.assign(m.props.page,z),xe(m.props.page),y=It?.()),lt=!0}else await dt(m,Le,!1);const{activeElement:v}=document;if(await y,await se(),await se(),U!==c){h.reject(new Error("navigation aborted"));return}m.props.page&&z&&Object.assign(m.props.page,z);let A=null;if(Je){const b=r?r.scroll:i?$():null;b?scrollTo(b.x,b.y):(A=t.hash&&document.getElementById(gt(t)))?A.scrollIntoView():scrollTo(0,0)}const S=document.activeElement!==v&&document.activeElement!==document.body;!n&&!S&&Ir(t,!A),Je=!0,ee=!1,h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=$()),V.forEach(b=>b(h.navigation)),e==="popstate"&&ut(R),x.navigating.set(Se.current=null)}async function pt(e,t,r,n,i){return e.origin===Ne&&e.pathname===location.pathname&&!Fe?await ye({status:n,error:r,url:e,route:t}):await K(e,i)}let q={element:void 0,href:void 0};function br(){let e,t;O.addEventListener("mousemove",o=>{const s=o.target;clearTimeout(e),e=setTimeout(()=>{i(s,X.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],X.tap)}O.addEventListener("mousedown",r),O.addEventListener("touchstart",r,{passive:!0});const n=new IntersectionObserver(o=>{for(const s of o)s.isIntersecting&&(ke(new URL(s.target.href)),n.unobserve(s.target))},{threshold:0});async function i(o,s){const c=tt(o,O),f=c===q.element&&c?.href===q.href&&s>=t;if(!c||f)return;const{url:l,external:d,download:p}=Ie(c,T,E.hash);if(d||p)return;const u=oe(c),h=l&&_e(g.url)===_e(l);if(!(u.reload||h))if(s<=u.preload_data){q={element:c,href:c.href},t=X.tap;const w=await ne(l,!1);if(!w)return;_r(w)}else s<=u.preload_code&&(q={element:c,href:c.href},t=s,ke(l))}function a(){n.disconnect();for(const o of O.querySelectorAll("a")){const{url:s,external:c,download:f}=Ie(o,T,E.hash);if(c||f)continue;const l=oe(o);l.reload||(l.preload_code===X.viewport&&n.observe(o),l.preload_code===X.eager&&ke(s))}}V.add(a),a()}function M(e,t){if(e instanceof te)return e.body;const r=ie(e),n=ar(e);return E.hooks.handleError({error:e,event:t,status:r,message:n})??{message:n}}function Ke(e,t){fr(()=>(e.add(t),()=>{e.delete(t)}))}function jr(e){Ke(V,e)}function Or(e){Ke($e,e)}function Nr(e){Ke(ct,e)}function xr(e,t={}){return e=new URL(me(e)),e.origin!==Ne?Promise.reject(new Error("goto: invalid URL")):qe(e,t,0)}function Er(e){if(typeof e=="function")le.push(e);else{const{href:t}=new URL(e,location.href);le.push(r=>r.href===t)}}function Dr(){return re=!0,pr()}function Cr(e,t){const r={[B]:k,[Y]:R,[rt]:I.url.href,[Oe]:t};history.replaceState(r,"",me(e)),I.state=t,ge.$set({page:ur(()=>we(I))})}function Ar(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let r=!1;if(Ze(),!ee){const n=Ge(g,void 0,null,"leave"),i={...n.navigation,cancel:()=>{r=!0,n.reject(new Error("navigation cancelled"))}};$e.forEach(a=>a(i))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ze()}),navigator.connection?.saveData||br(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=tt(t.composedPath()[0],O);if(!r)return;const{url:n,external:i,target:a,download:o}=Ie(r,T,E.hash);if(!n)return;if(a==="_parent"||a==="_top"){if(window.parent!==window)return}else if(a&&a!=="_self")return;const s=oe(r);if(!(r instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||o)return;const[f,l]=(E.hash?n.hash.replace(/^#/,""):n.href).split("#"),d=f===be(location);if(i||s.reload&&(!d||!l)){ht({url:n,type:"link",event:t})?ee=!0:t.preventDefault();return}if(l!==void 0&&d){const[,p]=g.url.href.split("#");if(p===l){if(t.preventDefault(),l===""||l==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=r.ownerDocument.getElementById(decodeURIComponent(l));u&&(u.scrollIntoView(),u.focus())}return}if(W=!0,Be(k),e(n),!s.replace_state)return;W=!1}t.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await H({type:"link",url:n,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??n.href===location.href,event:t})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),n=t.submitter;if((n?.formTarget||r.target)==="_blank"||(n?.formMethod||r.method)!=="get")return;const o=new URL(n?.hasAttribute("formaction")&&n?.formAction||r.action);if(je(o,T,!1))return;const s=t.target,c=oe(s);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(s,n);o.search=new URLSearchParams(f).toString(),H({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ue){if(t.state?.[B]){const r=t.state[B];if(U={},r===k)return;const n=D[r],i=t.state[Oe]??{},a=new URL(t.state[rt]??location.href),o=t.state[Y],s=g.url?be(location)===be(g.url):!1;if(o===R&&(lt||s)){i!==I.state&&(I.state=i),e(a),D[k]=$(),n&&scrollTo(n.x,n.y),k=r;return}const f=r-k;await H({type:"popstate",url:a,popped:{state:i,scroll:n,delta:f},accept:()=>{k=r,R=o},block:()=>{history.go(-f)},nav_token:U,event:t})}else if(!W){const r=new URL(location.href);e(r),E.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[B]:++k,[Y]:R},"",location.href))});for(const t of document.querySelectorAll("link"))dr.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&x.navigating.set(Se.current=null)});function e(t){g.url=I.url=t,x.page.set(we(I)),x.page.notify()}}async function kr(e,{status:t=200,error:r,node_ids:n,params:i,route:a,server_route:o,data:s,form:c}){Fe=!0;const f=new URL(location.href);let l;({params:i={},route:a={id:null}}=await ne(f,!1)||{}),l=Me.find(({id:u})=>u===a.id);let d,p=!0;try{const u=n.map(async(w,_)=>{const m=s[_];return m?.uses&&(m.uses=mt(m.uses)),Ve({loader:E.nodes[w],url:f,params:i,route:a,parent:async()=>{const P={};for(let y=0;y<_;y+=1)Object.assign(P,(await u[y]).data);return P},server_data_node:He(m)})}),h=await Promise.all(u);if(l){const w=l.layouts;for(let _=0;_<w.length;_++)w[_]||h.splice(_,0,void 0)}d=await pe({url:f,params:i,branch:h,status:t,error:r,errors:l?.errors,form:c,route:l??null})}catch(u){if(u instanceof De)return await K(new URL(u.location,location.href));d=await ye({status:ie(u),error:await M(u,{url:f,params:i,route:a}),url:f,route:a}),e.textContent="",p=!1}d&&(d.props.page&&(d.props.page.state={}),await dt(d,e,p))}async function _t(e,t){const r=new URL(e);r.pathname=ir(e.pathname),e.pathname.endsWith("/")&&r.searchParams.append(nr,"1"),r.searchParams.append(rr,t.map(a=>a?"1":"0").join(""));const n=window.fetch,i=await n(r.href,{});if(!i.ok){let a;throw i.headers.get("content-type")?.includes("application/json")?a=await i.json():i.status===404?a="Not Found":i.status===500&&(a="Internal Error"),new te(i.status,a)}return new Promise((a,o)=>{Sr(a,i).catch(o)})}async function Sr(e,t){const r=t.body.getReader(),n=new Map;function i(a){return er(a,{...E.decoders,Promise:o=>new Promise((s,c)=>{n.set(o,{fulfil:s,reject:c})})})}for await(const a of lr(r)){if(a.type==="redirect")return e(a);if(a.type==="data")a.nodes?.forEach(o=>{o?.type==="data"&&(o.uses=mt(o.uses),o.data=i(o.data))}),e(a);else if(a.type==="chunk"){const{id:o,data:s,error:c}=a,f=n.get(o);n.delete(o),c?f.reject(i(c)):f.fulfil(i(s))}}}function mt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ue=!1;function Ir(e,t=!0){const r=document.querySelector("[autofocus]");if(r)r.focus();else{const n=gt(e);if(n&&document.getElementById(n)){const{x:a,y:o}=$();setTimeout(()=>{const s=history.state;Ue=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(s,"",e),t&&scrollTo(a,o),Ue=!1})}else{const a=document.body,o=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),o!==null?a.setAttribute("tabindex",o):a.removeAttribute("tabindex")}const i=getSelection();if(i&&i.type!=="None"){const a=[];for(let o=0;o<i.rangeCount;o+=1)a.push(i.getRangeAt(o));setTimeout(()=>{if(i.rangeCount===a.length){for(let o=0;o<i.rangeCount;o+=1){const s=a[o],c=i.getRangeAt(o);if(s.commonAncestorContainer!==c.commonAncestorContainer||s.startContainer!==c.startContainer||s.endContainer!==c.endContainer||s.startOffset!==c.startOffset||s.endOffset!==c.endOffset)return}i.removeAllRanges()}})}}}function Ge(e,t,r,n,i=null){let a,o;const s=new Promise((f,l)=>{a=f,o=l});return s.catch(N),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:$()},to:r&&{params:t?.params??null,route:{id:t?.route?.id??null},url:r,scroll:i},willUnload:!t,type:n,complete:s},fulfil:a,reject:o}}function we(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Rr(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function gt(e){let t;if(E.hash){const[,,r]=e.hash.split("#",3);t=r??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{jr as a,Or as b,xr as g,Dr as i,Nr as o,Cr as r,Ur as s};
1
+ import{s as yt}from"./D8OKqJm7.js";import{H as B,N as Y,r as me,n as N,i as je,b as T,s as $,a as Se,f as tt,g as Ie,c as oe,d as be,S as Oe,P as rt,p as I,o as Ne,e as wt,h as vt,u as De,j as bt,w as Et,k as Xe,l as X,m as At,q as nt,t as kt,v as St,x as at}from"./DGZVZsEx.js";import{G as se,a8 as It,A as Rt}from"./D46tdsTs.js";class te{constructor(t,r){this.status=t,typeof r=="string"?this.body={message:r}:r?this.body=r:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class xe{constructor(t,r){try{new Headers({location:r})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(r)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=r}}class Ce extends Error{constructor(t,r,n){super(n),this.status=t,this.text=r}}const Pt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,Lt=/^\/\((?:[^)]+)\)$/;function Tt(e){const t=[];return{pattern:e==="/"||Lt.test(e)?/^\/$/:new RegExp(`^${jt(e).map(n=>{const i=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(n);if(i)return t.push({name:i[1],matcher:i[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const a=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(n);if(a)return t.push({name:a[1],matcher:a[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!n)return;const o=n.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return Ee(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Ee(String.fromCharCode(...c.slice(2).split("-").map(w=>parseInt(w,16))));const l=Pt.exec(c),[,d,p,u,h]=l;return t.push({name:u,matcher:h,optional:!!d,rest:!!p,chained:p?f===1&&o[0]==="":!1}),p?"([^]*?)":d?"([^/]*)?":"([^/]+?)"}return Ee(c)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function jt(e){return e.slice(1).split("/").filter(Ut)}function Ot(e,t,r){const n={},i=e.slice(1),a=i.filter(s=>s!==void 0);let o=0;for(let s=0;s<t.length;s+=1){const c=t[s];let f=i[s-o];if(c.chained&&c.rest&&o&&(f=i.slice(s-o,s+1).filter(l=>l).join("/"),o=0),f===void 0)if(c.rest)f="";else continue;if(!c.matcher||r[c.matcher](f)){n[c.name]=f;const l=t[s+1],d=i[s+1];l&&!l.rest&&l.optional&&d&&c.chained&&(o=0),!l&&!d&&Object.keys(n).length===a.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return n}function Ee(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Nt({nodes:e,server_loads:t,dictionary:r,matchers:n}){const i=new Set(t);return Object.entries(r).map(([s,[c,f,l]])=>{const{pattern:d,params:p}=Tt(s),u={id:s,exec:h=>{const w=d.exec(h);if(w)return Ot(w,p,n)},errors:[1,...l||[]].map(h=>e[h]),layouts:[0,...f||[]].map(o),leaf:a(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(s){const c=s<0;return c&&(s=~s),[c,e[s]]}function o(s){return s===void 0?s:[i.has(s),e[s]]}}function ot(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ze(e,t,r=JSON.stringify){const n=r(t);try{sessionStorage[e]=n}catch{}}const Dt=-1,xt=-2,Ct=-3,Bt=-4,Mt=-5,$t=-6,Ft=-7,st=2**32-1,Re=st-1;function Vt(e){return!(!Number.isInteger(e)||e<0||e>Re)}function qt(e){return!(!Number.isInteger(e)||e<0||e>st)}function Ht(e){return Uint8Array.fromBase64(e).buffer}function Yt(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function Kt(e){const t=atob(e),r=t.length,n=new Uint8Array(r);for(let i=0;i<r;i++)n[i]=t.charCodeAt(i);return n.buffer}const Gt=typeof Uint8Array.fromBase64=="function",Xt=typeof process=="object"&&process.versions?.node!==void 0,zt=Gt?Ht:Xt?Yt:Kt;function Wt(e,t){return e}const Jt=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,We=typeof SharedArrayBuffer>"u"?void 0:Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get,Zt={fromPrimitive:e=>e,fromISOString:e=>new Date(e),fromStringValue:(e,t)=>e==="URL"?new URL(t):e==="URLSearchParams"?new URLSearchParams(t):Temporal[e.slice(9)].from(t),fromArrayBuffer:e=>e,fromRegExpInfo:(e,t)=>new RegExp(e,t),fromViewInfo:(e,t,r,n)=>{try{Jt.call(t)}catch(a){if(!We)throw a;We.call(t)}const i=globalThis[e];return r!==void 0?new i(t,r,n):new i(t)},box:e=>Object(e),createArray:e=>new Array(e),createSparseArray:e=>{const t=[];return t[Re]=void 0,delete t[Re],t.length=e,t},createObject:()=>({}),createNullPrototypeObject:()=>Object.create(null),createSet:()=>new Set,createMap:()=>new Map,set:(e,t,r)=>{e[t]=r},addValue:(e,t)=>{e.add(t)},addEntry:(e,t,r)=>{e.set(t,r)}},Qt=Object.freeze(Zt);function er(e,t,r){const n=Wt(Qt);if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const i=e,a=Array(i.length);let o=null;function s(c,f=!1){if(c===Dt)return n.fromPrimitive(void 0);if(c===Ct)return n.fromPrimitive(NaN);if(c===Bt)return n.fromPrimitive(1/0);if(c===Mt)return n.fromPrimitive(-1/0);if(c===$t)return n.fromPrimitive(-0);if(f||typeof c!="number")throw new Error("Invalid input");if(c in a)return a[c];if(c>=i.length)throw new Error("Invalid input");const l=i[c];if(!l||typeof l!="object")a[c]=n.fromPrimitive(l);else if(Array.isArray(l))if(typeof l[0]=="string"){const d=l[0],p=t&&Object.hasOwn(t,d)?t[d]:void 0;if(p){let u=l[1];if(typeof u!="number"&&(u=i.push(l[1])-1),Object.hasOwn(a,u))return a[c]=p(a[u]);if(o??=new Set,o.has(u))throw new Error("Invalid circular reference");return o.add(u),a[c]=p(s(u)),o.delete(u),a[c]}switch(d){case"Date":a[c]=n.fromISOString(l[1]);break;case"Set":const u=n.createSet();a[c]=u;for(let _=1;_<l.length;_+=1)n.addValue(u,s(l[_]));break;case"Map":const h=n.createMap();a[c]=h;for(let _=1;_<l.length;_+=2)n.addEntry(h,s(l[_]),s(l[_+1]));break;case"RegExp":a[c]=n.fromRegExpInfo(l[1],l[2]);break;case"Object":{const _=l[1];if(typeof i[_]=="object"&&i[_][0]!=="BigInt")throw new Error("Invalid input");a[c]=n.box(s(_));break}case"BigInt":a[c]=n.fromPrimitive(BigInt(l[1]));break;case"null":const w=n.createNullPrototypeObject();a[c]=w;for(let _=1;_<l.length;_+=2){const m=l[_];if(typeof m!="string")throw new Error("Cannot parse an object with a non-string key");if(m==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");n.set(w,m,s(l[_+1]))}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Float16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":case"DataView":{if(i[l[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const _=s(l[1]);a[c]=n.fromViewInfo(d,_,l[2],l[3]);break}case"ArrayBuffer":{const _=l[1];if(typeof _!="string")throw new Error("Invalid ArrayBuffer encoding");a[c]=n.fromArrayBuffer(zt(_));break}case"URL":case"URLSearchParams":case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{a[c]=n.fromStringValue(d,l[1]);break}default:throw new Error(`Unknown type ${d}`)}}else if(l[0]===Ft){const d=l[1];if(!qt(d))throw new Error("Invalid input");const p=n.createSparseArray(d);a[c]=p;for(let u=2;u<l.length;u+=2){const h=l[u];if(!Vt(h)||h>=d)throw new Error("Invalid input");n.set(p,h,s(l[u+1]))}}else{const d=n.createArray(l.length);a[c]=d;for(let p=0;p<l.length;p+=1){const u=l[p];u!==xt&&n.set(d,p,s(u))}}else{const d=n.createObject();a[c]=d;for(const p of Object.keys(l)){if(p==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");n.set(d,p,s(l[p]))}}return a[c]}return s(0)}function tr(e){return e.filter(t=>t!=null)}const rr="x-sveltekit-invalidated",nr="x-sveltekit-trailing-slash";function F(e,t){return e+"/"+t}function ie(e){return e instanceof te||e instanceof Ce?e.status:500}function ar(e){return e instanceof Ce?e.text:"Internal Error"}const or="/__data.json",sr=".html__data.json";function ir(e){return e.endsWith(".html")?e.replace(/\.html$/,sr):e.replace(/\/$/,"")+or}async function*cr(e,t){let r=!1,n="";const i=new TextDecoder;for(;;){let a=n.indexOf(t);for(;a!==-1;)yield n.slice(0,a),n=n.slice(a+t.length),a=n.indexOf(t);if(r){n&&(yield n);return}const o=await e.read();r=o.done,o.value&&(n+=i.decode(o.value,{stream:!0})),r&&(n+=i.decode())}}async function*lr(e){for await(const t of cr(e,`
2
+ `)){const r=t.trim();r&&(yield JSON.parse(r))}}const{onMount:fr}=yt,ur=Rt??(e=>e()),dr=new Set(["icon","shortcut icon","apple-touch-icon"]);let z=null;const x=ot(at)??{},Z=ot(nt)??{},D={url:Xe({}),page:Xe({}),navigating:Et(null),updated:bt()};function Be(e){x[e]=$()}function hr(e,t){let r=e+1;for(;x[r];)delete x[r],r+=1;for(r=t+1;Z[r];)delete Z[r],r+=1}function K(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(N)}async function it(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(T||"/");e&&await e.update()}}let Me,Pe,ce,O,Le,E;const le=[],fe=[];let L=null;function Q(){L?.fork?.then(e=>e?.discard()),L=null,V={element:void 0,href:void 0}}const ae=new Map,$e=new Set,ct=new Set,q=new Set;let g={branch:[],error:null,url:null,nav:null},Fe=!1,ue=!1,Je=!0,ee=!1,W=!1,lt=!1,re=!1,ge,k,R,U;const J=new Set;let Ae;const de=new Map,he=new Map;async function Ur(e,t,r){if(globalThis.__sveltekit_4focgo.data){const{q:a={},p:o={},l:s={},f:c={}}=globalThis.__sveltekit_4focgo.data;for(const f in a)a[f];for(const f in s)s[f];for(const f in c)c[f];for(const f in o)o[f]}document.URL!==location.href&&(location.href=location.href),E=e,await e.hooks.init?.(),Me=Nt(e),O=document.documentElement,Le=t,Pe=e.nodes[0],ce=e.nodes[1],Pe(),ce(),k=history.state?.[B],R=history.state?.[Y],k||(k=R=Date.now(),history.replaceState({...history.state,[B]:k,[Y]:R},""));const n=x[k];function i(){n&&(history.scrollRestoration="manual",scrollTo(n.x,n.y))}r?(i(),await kr(Le,r)):(await H({type:"enter",url:me(E.hash?Rr(new URL(location.href)):location.href),replace_state:!0}),i()),Ar()}async function pr(e=!0,t=!0){if(await(Ae||=Promise.resolve()),!Ae)return;Ae=null;const r=U={},n=await ne(g.url,!0);Q();const i=new Map;if(re){for(const o of de.values())for(const{resource:s}of o.values())s.refresh();for(const[o,s]of he)for(const[c,{resource:f}]of s){const l=F(o,c),d=f.reconnect();d.catch(N),i.set(l,d)}}if(e){const o=I.state,s=n&&await Ye(n);if(!s||r!==U)return;if(s.type==="redirect")return Ve(new URL(s.location,g.url).href,{replaceState:!0},1,r);t||(s.props.page.state=o),De(s.props.page),g={...s.state,nav:g.nav},Te(),ge.$set(s.props)}else Te();const a=[];for(const o of de.values())for(const{resource:s}of o.values())a.push(s);for(const[o,s]of he)for(const c of s.keys()){const f=F(o,c),l=i.get(f);l&&a.push(l)}await Promise.all(a).catch(N)}function Te(){le.length=0,re=!1}function ft(e){fe.some(t=>t?.snapshot)&&(Z[e]=fe.map(t=>t?.snapshot?.capture()))}function ut(e){Z[e]?.forEach((t,r)=>{fe[r]?.snapshot?.restore(t)})}function Ze(){Be(k),ze(at,x),ft(R),ze(nt,Z)}async function Ve(e,t,r,n){let i,a;t.invalidateAll&&Q(),await H({type:"goto",url:me(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:n,accept:()=>{if(t.invalidateAll){re=!0,i=new Set;for(const[o,s]of de)for(const[c,f]of s)f.resource?.reset(),i.add(F(o,c));a=new Set;for(const[o,s]of he)for(const c of s.keys())a.add(F(o,c))}t.invalidate&&t.invalidate.forEach(Er)}}),t.invalidateAll&&se().then(se).then(()=>{for(const[o,s]of de)for(const[c,{resource:f}]of s)i?.has(F(o,c))&&f.start();for(const[o,s]of he)for(const[c,{resource:f}]of s)a?.has(F(o,c))&&f.reconnect()})}async function _r(e){if(e.id!==L?.id){Q();const t={};J.add(t),L={id:e.id,token:t,promise:Ye({...e,preload:t}).then(r=>(J.delete(t),r.type==="loaded"&&r.state.error&&Q(),r)),fork:null}}return L.promise}async function ke(e){const t=(await ne(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(r=>r[1]()))}async function dt(e,t,r){const n={params:g.params,route:{id:g.route?.id??null},url:new URL(location.href)};if(g={...e.state,nav:n},De(e.props.page),ge=new E.root({target:t,props:{...e.props,stores:D,components:fe},hydrate:r,sync:!1,transformError:void 0}),await Promise.resolve(),r){const i={from:null,to:{...n,scroll:x[k]??$()},willUnload:!1,type:"enter",complete:Promise.resolve()};q.forEach(a=>a(i))}ut(R),ue=!0}async function pe({url:e,params:t,branch:r,errors:n,status:i,error:a,route:o,form:s}){let c="never";if(T&&(e.pathname===T||e.pathname===T+"/"))c="always";else for(const h of r)h?.slash!==void 0&&(c=h.slash);e.pathname=vt(e.pathname,c),e.search=e.search;const f={type:"loaded",state:{url:e,params:t,branch:r,error:a,route:o},props:{constructors:tr(r).map(h=>h.node.component),page:we(I)}};s!==void 0&&(f.props.form=s);let l={},d=!I,p=0;for(let h=0;h<Math.max(r.length,g.branch.length);h+=1){const w=r[h],_=g.branch[h];w?.data!==_?.data&&(d=!0),w&&(l={...l,...w.data},d&&(f.props[`data_${p}`]=l),p+=1)}return(!g.url||e.href!==g.url.href||g.error!==a||s!==void 0&&s!==I.form||d)&&(f.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?l:I.data}),f}async function qe({loader:e,parent:t,url:r,params:n,route:i,server_data_node:a}){let o=null;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await e();return{node:c,loader:e,server:a,universal:c.universal?.load?{type:"data",data:o,uses:s}:null,data:o??a?.data??null,slash:c.universal?.trailingSlash??a?.slash}}function mr(e,t,r){let n=e instanceof Request?e.url:e;const i=new URL(n,r);i.origin===r.origin&&(n=i.href.slice(r.origin.length));const a=ue?kt(n,i.href,t):St(n,t);return{resolved:i,promise:a}}function Qe(e,t,r,n,i,a){if(re)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&r)return!0;for(const o of i.search_params)if(n.has(o))return!0;for(const o of i.params)if(a[o]!==g.params[o])return!0;for(const o of i.dependencies)if(le.some(s=>s(new URL(o))))return!0;return!1}function He(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function gr(e,t){if(!e)return new Set(t.searchParams.keys());const r=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const n of r){const i=e.searchParams.getAll(n),a=t.searchParams.getAll(n);i.every(o=>a.includes(o))&&a.every(o=>i.includes(o))&&r.delete(n)}return r}function et({error:e,url:t,route:r,params:n}){return{type:"loaded",state:{error:e,url:t,route:r,params:n,branch:[]},props:{page:we(I),constructors:[]}}}async function Ye({id:e,invalidating:t,url:r,params:n,route:i,preload:a}){if(L?.id===e)return J.delete(L.token),L.promise;const{errors:o,layouts:s,leaf:c}=i,f=[...s,c];o.forEach(y=>y?.().catch(N)),f.forEach(y=>y?.[1]().catch(N));let l=null;const d=g.url?e!==_e(g.url):!1,p=g.route?i.id!==g.route.id:!1,u=gr(g.url,r);let h=!1;{const y=f.map((v,A)=>{const S=g.branch[A],b=!!v?.[0]&&(S?.loader!==v[1]||Qe(h,p,d,u,S.server?.uses,n));return b&&(h=!0),b});if(y.some(Boolean)){try{l=await _t(r,y)}catch(v){const A=await M(v,{url:r,params:n,route:{id:e}});return a&&J.has(a)?et({error:A,url:r,params:n,route:i}):ye({status:ie(v),error:A,url:r,route:i})}if(l.type==="redirect")return l}}const w=l?.nodes;let _=!1;const m=f.map(async(y,v)=>{if(!y)return;const A=g.branch[v],S=w?.[v];if((!S||S.type==="skip")&&y[1]===A?.loader&&!Qe(_,p,d,u,A.universal?.uses,n))return A;if(_=!0,S?.type==="error")throw S;return qe({loader:y[1],url:r,params:n,route:i,parent:async()=>{const j={};for(let C=0;C<v;C+=1)Object.assign(j,(await m[C])?.data);return j},server_data_node:He(S===void 0&&y[0]?{type:"skip"}:S??null,y[0]?A?.server:void 0)})});for(const y of m)y.catch(N);const P=[];for(let y=0;y<f.length;y+=1)if(f[y])try{P.push(await m[y])}catch(v){if(v instanceof xe)return{type:"redirect",location:v.location};if(a&&J.has(a))return et({error:await M(v,{params:n,url:r,route:{id:i.id}}),url:r,params:n,route:i});let A=ie(v),S;if(w?.includes(v))A=v.status??A,S=v.error;else if(v instanceof te)S=v.body;else{if(await D.updated.check())return await it(),await K(r);S=await M(v,{params:n,url:r,route:{id:i.id}})}const b=await yr(y,P,o);return b?pe({url:r,params:n,branch:P.slice(0,b.idx).concat(b.node),errors:o,status:A,error:S,route:i}):await pt(r,{id:i.id},S,A)}else P.push(void 0);return pe({url:r,params:n,branch:P,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function yr(e,t,r){for(;e--;)if(r[e]){let n=e;for(;!t[n];)n-=1;try{return{idx:n+1,node:{node:await r[e](),loader:r[e],data:{},server:null,universal:null}}}catch{continue}}}async function ye({status:e,error:t,url:r,route:n}){const i={};let a=null;if(E.server_loads[0]===0)try{const s=await _t(r,[!0]);if(s.type!=="data"||s.nodes[0]&&s.nodes[0].type!=="data")throw 0;a=s.nodes[0]??null}catch(s){if(!(s instanceof te&&s.status===404)&&(r.origin!==Ne||r.pathname!==location.pathname||Fe))return await K(r)}try{const o=await qe({loader:Pe,url:r,params:i,route:n,parent:()=>Promise.resolve({}),server_data_node:He(a)}),s={node:await ce(),loader:ce,universal:null,server:null,data:null};return pe({url:r,params:i,branch:[o,s],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof xe){await Ve(new URL(o.location,location.href),{},0);return}const s=await E.get_error_template(),c=await M(o,{url:r,params:i,route:n}),f=String(c?.message??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),l=s({status:e,message:f}),d=new DOMParser().parseFromString(l,"text/html");throw document.documentElement.replaceChild(document.adoptNode(d.head),document.head),document.documentElement.replaceChild(document.adoptNode(d.body),document.body),o}}async function wr(e){const t=e.href;if(ae.has(t))return ae.get(t);let r;try{const n=(async()=>{let i=await E.hooks.reroute({url:new URL(e),fetch:async(a,o)=>mr(a,o,e).promise})??e;if(typeof i=="string"){const a=new URL(e);E.hash?a.hash=i:a.pathname=i,i=a}return i})();ae.set(t,n),r=await n}catch{ae.delete(t);return}return r}async function ne(e,t){if(e&&!je(e,T,E.hash)){const r=await wr(e);if(!r)return;const n=vr(r);for(const i of Me){const a=i.exec(n);if(a)return{id:_e(e),invalidating:t,route:i,params:wt(a),url:e}}}}function vr(e){return At(E.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(T.length))||"/"}function _e(e){return(E.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:r,delta:n,event:i,scroll:a}){let o=!1;const s=Ge(g,r,e,t,a??null);n!==void 0&&(s.navigation.delta=n),i!==void 0&&(s.navigation.event=i);const c={...s.navigation,cancel:()=>{o=!0,s.reject(new Error("navigation cancelled"))}};return ee||$e.forEach(f=>f(c)),o?null:s}async function H({type:e,url:t,popped:r,keepfocus:n,noscroll:i,replace_state:a,state:o={},redirect_count:s=0,nav_token:c={},accept:f=N,block:l=N,event:d}){const p=U;U=c;const u=await ne(t,!1),h=e==="enter"?Ge(g,u,t,e):ht({url:t,type:e,delta:r?.delta,intent:u,scroll:r?.scroll,event:d});if(!h){l(),U===c&&(U=p);return}const w=k,_=R;f(),ee=!0,ue&&h.navigation.type!=="enter"&&D.navigating.set(Se.current=h.navigation);let m=u&&await Ye(u);if(!m){if(je(t,T,E.hash))return await K(t,a);m=await pt(t,{id:null},await M(new Ce(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,a)}if(t=u?.url||t,U!==c){h.reject(new Error("navigation aborted"));return}if(!m)return;if(m.type==="redirect"){if(s<20){await H({type:e,url:new URL(m.location,t),popped:r,keepfocus:n,noscroll:i,replace_state:a,state:o,redirect_count:s+1,nav_token:c}),h.fulfil(void 0);return}if(m=await ye({status:500,error:await M(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}}),!m)return}else if(m.props.page.status>=400&&await D.updated.check())return await it(),await K(t,a);if(Te(),Be(w),ft(_),m.props.page.url.pathname!==t.pathname&&(t.pathname=m.props.page.url.pathname),o=r?r.state:o,!r){const b=a?0:1,j={[B]:k+=b,[Y]:R+=b,[Oe]:o};(a?history.replaceState:history.pushState).call(history,j,"",t),a||hr(k,R)}const P=u&&L?.id===u.id?L.fork:null;L?.fork&&!P?Q():(L=null,V={element:void 0,href:void 0}),m.props.page.state=o;let y;if(ue){const b=(await Promise.all(Array.from(ct,G=>G(h.navigation)))).filter(G=>typeof G=="function");if(b.length>0){let G=function(){b.forEach(ve=>{q.delete(ve)})};b.push(G),b.forEach(ve=>{q.add(ve)})}const j=h.navigation.to;g={...m.state,nav:{params:j.params,route:j.route,url:j.url}},m.props.page&&(m.props.page.url=t),!n&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();const C=P&&await P;C?y=C.commit():(z=null,ge.$set(m.props),z&&Object.assign(m.props.page,z),De(m.props.page),y=It?.()),lt=!0}else await dt(m,Le,!1);const{activeElement:v}=document;if(await y,await se(),await se(),U!==c){h.reject(new Error("navigation aborted"));return}m.props.page&&z&&Object.assign(m.props.page,z);let A=null;if(Je){const b=r?r.scroll:i?$():null;b?scrollTo(b.x,b.y):(A=t.hash&&document.getElementById(gt(t)))?A.scrollIntoView():scrollTo(0,0)}const S=document.activeElement!==v&&document.activeElement!==document.body;!n&&!S&&Ir(t,!A),Je=!0,ee=!1,h.fulfil(void 0),h.navigation.to&&(h.navigation.to.scroll=$()),q.forEach(b=>b(h.navigation)),e==="popstate"&&ut(R),D.navigating.set(Se.current=null)}async function pt(e,t,r,n,i){return e.origin===Ne&&e.pathname===location.pathname&&!Fe?await ye({status:n,error:r,url:e,route:t}):await K(e,i)}let V={element:void 0,href:void 0};function br(){let e,t;O.addEventListener("mousemove",o=>{const s=o.target;clearTimeout(e),e=setTimeout(()=>{i(s,X.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],X.tap)}O.addEventListener("mousedown",r),O.addEventListener("touchstart",r,{passive:!0});const n=new IntersectionObserver(o=>{for(const s of o)s.isIntersecting&&(ke(new URL(s.target.href)),n.unobserve(s.target))},{threshold:0});async function i(o,s){const c=tt(o,O),f=c===V.element&&c?.href===V.href&&s>=t;if(!c||f)return;const{url:l,external:d,download:p}=Ie(c,T,E.hash);if(d||p)return;const u=oe(c),h=l&&_e(g.url)===_e(l);if(!(u.reload||h))if(s<=u.preload_data){V={element:c,href:c.href},t=X.tap;const w=await ne(l,!1);if(!w)return;_r(w)}else s<=u.preload_code&&(V={element:c,href:c.href},t=s,ke(l))}function a(){n.disconnect();for(const o of O.querySelectorAll("a")){const{url:s,external:c,download:f}=Ie(o,T,E.hash);if(c||f)continue;const l=oe(o);l.reload||(l.preload_code===X.viewport&&n.observe(o),l.preload_code===X.eager&&ke(s))}}q.add(a),a()}function M(e,t){if(e instanceof te)return e.body;const r=ie(e),n=ar(e);return E.hooks.handleError({error:e,event:t,status:r,message:n})??{message:n}}function Ke(e,t){fr(()=>(e.add(t),()=>{e.delete(t)}))}function jr(e){Ke(q,e)}function Or(e){Ke($e,e)}function Nr(e){Ke(ct,e)}function Dr(e,t={}){return e=new URL(me(e)),e.origin!==Ne?Promise.reject(new Error("goto: invalid URL")):Ve(e,t,0)}function Er(e){if(typeof e=="function")le.push(e);else{const{href:t}=new URL(e,location.href);le.push(r=>r.href===t)}}function xr(){return re=!0,pr()}function Cr(e,t){const r={[B]:k,[Y]:R,[rt]:I.url.href,[Oe]:t};history.replaceState(r,"",me(e)),I.state=t,ge.$set({page:ur(()=>we(I))})}function Ar(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let r=!1;if(Ze(),!ee){const n=Ge(g,void 0,null,"leave"),i={...n.navigation,cancel:()=>{r=!0,n.reject(new Error("navigation cancelled"))}};$e.forEach(a=>a(i))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ze()}),navigator.connection?.saveData||br(),O.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=tt(t.composedPath()[0],O);if(!r)return;const{url:n,external:i,target:a,download:o}=Ie(r,T,E.hash);if(!n)return;if(a==="_parent"||a==="_top"){if(window.parent!==window)return}else if(a&&a!=="_self")return;const s=oe(r);if(!(r instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||o)return;const[f,l]=(E.hash?n.hash.replace(/^#/,""):n.href).split("#"),d=f===be(location);if(i||s.reload&&(!d||!l)){ht({url:n,type:"link",event:t})?ee=!0:t.preventDefault();return}if(l!==void 0&&d){const[,p]=g.url.href.split("#");if(p===l){if(t.preventDefault(),l===""||l==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const u=r.ownerDocument.getElementById(decodeURIComponent(l));u&&(u.scrollIntoView(),u.focus())}return}if(W=!0,Be(k),e(n),!s.replace_state)return;W=!1}t.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await H({type:"link",url:n,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??n.href===location.href,event:t})}),O.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),n=t.submitter;if((n?.formTarget||r.target)==="_blank"||(n?.formMethod||r.method)!=="get")return;const o=new URL(n?.hasAttribute("formaction")&&n?.formAction||r.action);if(je(o,T,!1))return;const s=t.target,c=oe(s);if(c.reload)return;t.preventDefault(),t.stopPropagation();const f=new FormData(s,n);o.search=new URLSearchParams(f).toString(),H({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ue){if(t.state?.[B]){const r=t.state[B];if(U={},r===k)return;const n=x[r],i=t.state[Oe]??{},a=new URL(t.state[rt]??location.href),o=t.state[Y],s=g.url?be(location)===be(g.url):!1;if(o===R&&(lt||s)){i!==I.state&&(I.state=i),e(a),x[k]=$(),n&&scrollTo(n.x,n.y),k=r;return}const f=r-k;await H({type:"popstate",url:a,popped:{state:i,scroll:n,delta:f},accept:()=>{k=r,R=o},block:()=>{history.go(-f)},nav_token:U,event:t})}else if(!W){const r=new URL(location.href);e(r),E.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[B]:++k,[Y]:R},"",location.href))});for(const t of document.querySelectorAll("link"))dr.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&D.navigating.set(Se.current=null)});function e(t){g.url=I.url=t,D.page.set(we(I)),D.page.notify()}}async function kr(e,{status:t=200,error:r,node_ids:n,params:i,route:a,server_route:o,data:s,form:c}){Fe=!0;const f=new URL(location.href);let l;({params:i={},route:a={id:null}}=await ne(f,!1)||{}),l=Me.find(({id:u})=>u===a.id);let d,p=!0;try{const u=n.map(async(w,_)=>{const m=s[_];return m?.uses&&(m.uses=mt(m.uses)),qe({loader:E.nodes[w],url:f,params:i,route:a,parent:async()=>{const P={};for(let y=0;y<_;y+=1)Object.assign(P,(await u[y]).data);return P},server_data_node:He(m)})}),h=await Promise.all(u);if(l){const w=l.layouts;for(let _=0;_<w.length;_++)w[_]||h.splice(_,0,void 0)}d=await pe({url:f,params:i,branch:h,status:t,error:r,errors:l?.errors,form:c,route:l??null})}catch(u){if(u instanceof xe)return await K(new URL(u.location,location.href));d=await ye({status:ie(u),error:await M(u,{url:f,params:i,route:a}),url:f,route:a}),e.textContent="",p=!1}d&&(d.props.page&&(d.props.page.state={}),await dt(d,e,p))}async function _t(e,t){const r=new URL(e);r.pathname=ir(e.pathname),e.pathname.endsWith("/")&&r.searchParams.append(nr,"1"),r.searchParams.append(rr,t.map(a=>a?"1":"0").join(""));const n=window.fetch,i=await n(r.href,{});if(!i.ok){let a;throw i.headers.get("content-type")?.includes("application/json")?a=await i.json():i.status===404?a="Not Found":i.status===500&&(a="Internal Error"),new te(i.status,a)}return new Promise((a,o)=>{Sr(a,i).catch(o)})}async function Sr(e,t){const r=t.body.getReader(),n=new Map;function i(a){return er(a,{...E.decoders,Promise:o=>new Promise((s,c)=>{n.set(o,{fulfil:s,reject:c})})})}for await(const a of lr(r)){if(a.type==="redirect")return e(a);if(a.type==="data")a.nodes?.forEach(o=>{o?.type==="data"&&(o.uses=mt(o.uses),o.data=i(o.data))}),e(a);else if(a.type==="chunk"){const{id:o,data:s,error:c}=a,f=n.get(o);n.delete(o),c?f.reject(i(c)):f.fulfil(i(s))}}}function mt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ue=!1;function Ir(e,t=!0){const r=document.querySelector("[autofocus]");if(r)r.focus();else{const n=gt(e);if(n&&document.getElementById(n)){const{x:a,y:o}=$();setTimeout(()=>{const s=history.state;Ue=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(s,"",e),t&&scrollTo(a,o),Ue=!1})}else{const a=document.body,o=a.getAttribute("tabindex");a.tabIndex=-1,a.focus({preventScroll:!0,focusVisible:!1}),o!==null?a.setAttribute("tabindex",o):a.removeAttribute("tabindex")}const i=getSelection();if(i&&i.type!=="None"){const a=[];for(let o=0;o<i.rangeCount;o+=1)a.push(i.getRangeAt(o));setTimeout(()=>{if(i.rangeCount===a.length){for(let o=0;o<i.rangeCount;o+=1){const s=a[o],c=i.getRangeAt(o);if(s.commonAncestorContainer!==c.commonAncestorContainer||s.startContainer!==c.startContainer||s.endContainer!==c.endContainer||s.startOffset!==c.startOffset||s.endOffset!==c.endOffset)return}i.removeAllRanges()}})}}}function Ge(e,t,r,n,i=null){let a,o;const s=new Promise((f,l)=>{a=f,o=l});return s.catch(N),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:$()},to:r&&{params:t?.params??null,route:{id:t?.route?.id??null},url:r,scroll:i},willUnload:!t,type:n,complete:s},fulfil:a,reject:o}}function we(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Rr(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function gt(e){let t;if(E.hash){const[,,r]=e.hash.split("#",3);t=r??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{jr as a,Or as b,Dr as g,xr as i,Nr as o,Cr as r,Ur as s};