@inkeep/open-knowledge 0.46.0-beta.13 → 0.46.0-beta.14

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 (455) hide show
  1. package/dist/{acp-harness-probe-BfbkLxMd.mjs → acp-harness-probe-DyGzojAs.mjs} +2 -2
  2. package/dist/cli.mjs +49 -49
  3. package/dist/constants-BMl86IqT.mjs +2 -0
  4. package/dist/fs-traced-DB5c--Vd.mjs +1 -0
  5. package/dist/{fs-traced-B-x7hAhD.mjs → fs-traced-wfI5VoOz.mjs} +4 -4
  6. package/dist/git-handle-CMWGPj44.mjs +1 -0
  7. package/dist/{git-handle-M_t2H6C-.mjs → git-handle-TtCDd9Le.mjs} +2 -2
  8. package/dist/index.mjs +1 -1
  9. package/dist/{init-DJvgtKke.mjs → init-UsHQ5nkw.mjs} +3 -3
  10. package/dist/init-YMPn7j-R.mjs +1 -0
  11. package/dist/{launch-json-removal-1939Vm-0.mjs → launch-json-removal-HQmTN2zF.mjs} +2 -2
  12. package/dist/{loader-DZ3vC2N-.mjs → loader-TX84kNNr.mjs} +3 -3
  13. package/dist/loader-_6OcHbvd.mjs +1 -0
  14. package/dist/md-manager-wJEAbIvp.mjs +2 -0
  15. package/dist/{open-browser-BsKTF04c.mjs → open-browser-BiK9JzSf.mjs} +2 -2
  16. package/dist/parse-worker.mjs +1 -1
  17. package/dist/{preview-Bfh6RWYE.mjs → preview-BO-_TVuU.mjs} +2 -2
  18. package/dist/preview-Ba0S1iHw.mjs +1 -0
  19. package/dist/public/assets/ActivityModeContent-D04ZTB05.js +1 -0
  20. package/dist/public/assets/{AgentDiffPane-DM8oQapu.js → AgentDiffPane-BCcrDXW5.js} +2 -2
  21. package/dist/public/assets/{AgentThreadClientBinder-BE7sGGt4.js → AgentThreadClientBinder--w-hCCkY.js} +1 -1
  22. package/dist/public/assets/AppMenubar-CMfyQoWX.js +1 -0
  23. package/dist/public/assets/{BugReportHistory-CaAYnGNR.js → BugReportHistory-DJ9tF746.js} +1 -1
  24. package/dist/public/assets/{BugReportHistoryDialog-DFfft492.js → BugReportHistoryDialog-8V1yE7Ti.js} +1 -1
  25. package/dist/public/assets/ChangedOutsideBadge-Jw_1ftdU.js +1 -0
  26. package/dist/public/assets/CodeMirrorPropInput-6uPyBi97.js +3 -0
  27. package/dist/public/assets/{ConfigSharingInfoTooltip-QTCODx7g.js → ConfigSharingInfoTooltip-BEi44Q-l.js} +1 -1
  28. package/dist/public/assets/{ConsentDialogBody-U4UzjnaQ.js → ConsentDialogBody-D6HuxFrl.js} +1 -1
  29. package/dist/public/assets/{CopyButton-O0Y9mXoH.js → CopyButton-C_GVjBMW.js} +1 -1
  30. package/dist/public/assets/{DiffView-kKTjtgKq.js → DiffView-KapiOFto.js} +1 -1
  31. package/dist/public/assets/DocumentContext-Ddtfw06F.js +38 -0
  32. package/dist/public/assets/EditorModeToggle-B622Ggff.js +1 -0
  33. package/dist/public/assets/EnableSyncConfirmDialog-Dt2Km8QO.js +1 -0
  34. package/dist/public/assets/FeedbackForm-BB-M0GcJ.js +1 -0
  35. package/dist/public/assets/{GraphPanel-DZVUW5Ne.js → GraphPanel-DAJMshWv.js} +2 -2
  36. package/dist/public/assets/ImportSkillDialog-7_9XdUL4.js +1 -0
  37. package/dist/public/assets/{LintConfigEditor-DZEV5zwj.js → LintConfigEditor-DoWT7p5q.js} +1 -1
  38. package/dist/public/assets/ManagedArtifactProperties-7dshK0Jv.js +2 -0
  39. package/dist/public/assets/ManagedArtifactProperties-_eOhIDmZ.js +1 -0
  40. package/dist/public/assets/McpConsentDialogBody-N1L0Uz4o.js +1 -0
  41. package/dist/public/assets/Mermaid-D-PR8Nq0.js +2 -0
  42. package/dist/public/assets/MermaidDocEditor-xVs3RYNL.js +1 -0
  43. package/dist/public/assets/RegisteredAgentIcon-CKpJ_hgB.js +1 -0
  44. package/dist/public/assets/ReportBugDialogBody-BOsNuOIC.js +3 -0
  45. package/dist/public/assets/SchemaConfigEditor-dViX9E3z.js +1 -0
  46. package/dist/public/assets/SessionsHost-DwEoO1aA.js +2 -0
  47. package/dist/public/assets/SettingsDialogBody-DapiVVeV.js +7 -0
  48. package/dist/public/assets/{ShareBranchSwitchDialog-D54uq5Dv.js → ShareBranchSwitchDialog-P949gbnF.js} +1 -1
  49. package/dist/public/assets/{ShareReceiveDialog-CoskdBM6.js → ShareReceiveDialog-Bhnm-iQX.js} +1 -1
  50. package/dist/public/assets/{ShareReceiveMissDialog-Byg3PSFa.js → ShareReceiveMissDialog-UEKRcm_k.js} +1 -1
  51. package/dist/public/assets/{SkillEditBanner-Dtk_Dd6-.js → SkillEditBanner-DLVzp3KP.js} +1 -1
  52. package/dist/public/assets/SkillModeBanner-BGvDA8_3.js +1 -0
  53. package/dist/public/assets/SkillOriginInline-D2WanLMv.js +1 -0
  54. package/dist/public/assets/SkillToolbarControls-hj3PWE0K.js +1 -0
  55. package/dist/public/assets/{SourceEditor-8qossd7Q.js → SourceEditor-JLV4zFVy.js} +1 -1
  56. package/dist/public/assets/{TerminalPanel-C4TfiKjZ.js → TerminalPanel-CJ96nwqY.js} +1 -1
  57. package/dist/public/assets/{TerminalWindowApp-BV4Va3sn.js → TerminalWindowApp-DJKxzDZB.js} +1 -1
  58. package/dist/public/assets/TextDocEditor-Bkkf7noz.js +1 -0
  59. package/dist/public/assets/{ThreadView-BZlK-XfA.js → ThreadView-BaD0xIEg.js} +3 -3
  60. package/dist/public/assets/{TimelineDiffPane-Ox3ktjmx.js → TimelineDiffPane-BwLDgxHU.js} +2 -2
  61. package/dist/public/assets/{abnfDiagram-VRR7QNED-CYyOqigz.js → abnfDiagram-VRR7QNED-DthMMUp7.js} +1 -1
  62. package/dist/public/assets/{agent-diff-store-BptHmEsn.js → agent-diff-store-P7Uc0zvh.js} +1 -1
  63. package/dist/public/assets/agent-visibility-Bj5OOTN2.js +1 -0
  64. package/dist/public/assets/{arc-DpnwTjlg.js → arc-D6dkQwuB.js} +1 -1
  65. package/dist/public/assets/architecture-TIHT7OUA-BY9GAchj.js +1 -0
  66. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-BArScuNA.js → architectureDiagram-ZJ3FMSHR-D2AdknnG.js} +1 -1
  67. package/dist/public/assets/arrow-up-right-CinCNAo3.js +1 -0
  68. package/dist/public/assets/auth-state-cache-Du0vALuT.js +11 -0
  69. package/dist/public/assets/badge-BTPyRUGW.js +1 -0
  70. package/dist/public/assets/{blockDiagram-677ZJIJ3-BKdJnykw.js → blockDiagram-677ZJIJ3-CQpuKURY.js} +1 -1
  71. package/dist/public/assets/{braces-CqiL3TOP.js → braces-CsvuNjsR.js} +1 -1
  72. package/dist/public/assets/button-D3xSRfT4.js +1 -0
  73. package/dist/public/assets/{c4Diagram-LMCZKHZV-BGzHBzYq.js → c4Diagram-LMCZKHZV-vMnsf6JP.js} +1 -1
  74. package/dist/public/assets/calendar-DvE9J6Sj.js +1 -0
  75. package/dist/public/assets/{case-sensitive-DcowXaLf.js → case-sensitive-OXVu8f1h.js} +1 -1
  76. package/dist/public/assets/channel-Bkag9BhJ.js +1 -0
  77. package/dist/public/assets/check-D1JmbeH0.js +1 -0
  78. package/dist/public/assets/checkbox-CgM6fL3A.js +1 -0
  79. package/dist/public/assets/{chevron-down-BJumc1E_.js → chevron-down-BH5tpfEN.js} +1 -1
  80. package/dist/public/assets/chevron-left-CbL-Ysx_.js +1 -0
  81. package/dist/public/assets/chevron-right-COaV_K3r.js +1 -0
  82. package/dist/public/assets/chunk-2Q5K7J3B-BsdS7tBq.js +1 -0
  83. package/dist/public/assets/{chunk-32BRIVSS-DWFi-mYl.js → chunk-32BRIVSS-CVMNE9FE.js} +1 -1
  84. package/dist/public/assets/{chunk-52WLFC77-C3ewIu0v.js → chunk-52WLFC77-ByP8adiF.js} +1 -1
  85. package/dist/public/assets/{chunk-5FCAYU7R-DH0H_TSt.js → chunk-5FCAYU7R-apcsbWAl.js} +1 -1
  86. package/dist/public/assets/{chunk-5HE753X5-COZLeOUQ.js → chunk-5HE753X5-BApo3bqD.js} +1 -1
  87. package/dist/public/assets/{chunk-5JV3BV7I-BtSn9e5l.js → chunk-5JV3BV7I-BHpORvdP.js} +1 -1
  88. package/dist/public/assets/{chunk-5TONJI2A-CyVAUHQY.js → chunk-5TONJI2A-DFa3pMK9.js} +1 -1
  89. package/dist/public/assets/{chunk-5VM5RSS4-DkfDxTnu.js → chunk-5VM5RSS4-Dv_-BFYa.js} +1 -1
  90. package/dist/public/assets/{chunk-7BUUIJ7U-Bwj5weSU.js → chunk-7BUUIJ7U-CAEbPbJV.js} +1 -1
  91. package/dist/public/assets/{chunk-BIQX33UG-WShnA3hi.js → chunk-BIQX33UG-BAiXBHCK.js} +1 -1
  92. package/dist/public/assets/{chunk-BO2N2NFS-0fL-jnUT.js → chunk-BO2N2NFS-BuvkRQr-.js} +3 -3
  93. package/dist/public/assets/{chunk-C7G6YPKG-JOVwaeql.js → chunk-C7G6YPKG-1I7HAvac.js} +1 -1
  94. package/dist/public/assets/{chunk-CQNSW5MT-DmFd2LFl.js → chunk-CQNSW5MT-CWAJXUKm.js} +1 -1
  95. package/dist/public/assets/{chunk-CYSBUYHQ-BOCWcr_T.js → chunk-CYSBUYHQ-okSmY2v_.js} +1 -1
  96. package/dist/public/assets/{chunk-EMLP6XTP-_039-Ubh.js → chunk-EMLP6XTP-BoC1pbij.js} +1 -1
  97. package/dist/public/assets/{chunk-EX3LRPZG-CMgFCagr.js → chunk-EX3LRPZG-g376BU8Z.js} +1 -1
  98. package/dist/public/assets/{chunk-FWX5IMBZ-C4vKCoUv.js → chunk-FWX5IMBZ-C-l8NZxe.js} +2 -2
  99. package/dist/public/assets/{chunk-HOUHSVGY-CZX004Ef.js → chunk-HOUHSVGY-Do2Y3Btv.js} +1 -1
  100. package/dist/public/assets/{chunk-ICXQ74PX-B_iuJAXS.js → chunk-ICXQ74PX-Ce0LzbhW.js} +1 -1
  101. package/dist/public/assets/{chunk-JG7HCLWE-CtDpq51e.js → chunk-JG7HCLWE-KxXMgbns.js} +1 -1
  102. package/dist/public/assets/{chunk-JWPE2WC7-pDBBV-ex.js → chunk-JWPE2WC7-CEvGtkOv.js} +1 -1
  103. package/dist/public/assets/{chunk-MOJQB5TN-BOLftHeO.js → chunk-MOJQB5TN-CqgruPhq.js} +1 -1
  104. package/dist/public/assets/{chunk-MOZMSUNE-B90rFhRO.js → chunk-MOZMSUNE-_PphKf7-.js} +1 -1
  105. package/dist/public/assets/{chunk-OGEWGWER-dIUHPavN.js → chunk-OGEWGWER-DEtBK0B_.js} +1 -1
  106. package/dist/public/assets/{chunk-OSBZ3O6U-C8f7zxUa.js → chunk-OSBZ3O6U-CZ7_DsZG.js} +1 -1
  107. package/dist/public/assets/{chunk-PUDLZKDR-QPYzmUFw.js → chunk-PUDLZKDR-DOJ6xYbt.js} +1 -1
  108. package/dist/public/assets/{chunk-Q4XR5HBZ--1adMSrR.js → chunk-Q4XR5HBZ-BE54IG_w.js} +1 -1
  109. package/dist/public/assets/{chunk-QBLGF6JB-q87mQ87z.js → chunk-QBLGF6JB-DhkUA6kz.js} +1 -1
  110. package/dist/public/assets/{chunk-R7FJI6CG-B5NnR0wG.js → chunk-R7FJI6CG-C8R_fEMX.js} +1 -1
  111. package/dist/public/assets/{chunk-RYQCIY6F-BnIBPlEn.js → chunk-RYQCIY6F-BGQYOx1F.js} +1 -1
  112. package/dist/public/assets/{chunk-U6XO7XAA-DuxWv8i1.js → chunk-U6XO7XAA-S326EP4t.js} +1 -1
  113. package/dist/public/assets/{chunk-V7JOEXUC-zQePb8W4.js → chunk-V7JOEXUC-CRcOKbTq.js} +1 -1
  114. package/dist/public/assets/chunk-VAUOI2AC-Bwx73Zo5.js +1 -0
  115. package/dist/public/assets/{chunk-VR4S4FIN-DOfDyz67.js → chunk-VR4S4FIN-DI4tyiVg.js} +1 -1
  116. package/dist/public/assets/{chunk-WYO6CB5R-DAcO6KqN.js → chunk-WYO6CB5R-CB_foSvM.js} +1 -1
  117. package/dist/public/assets/chunk-XXDRQBXY-B0w7NWS1.js +1 -0
  118. package/dist/public/assets/{chunk-YOTPTUD7-DSjCnGGQ.js → chunk-YOTPTUD7-Df82opFk.js} +1 -1
  119. package/dist/public/assets/{chunk-ZGVPDNZ5-CnXHsnX3.js → chunk-ZGVPDNZ5-BwKc2ci4.js} +1 -1
  120. package/dist/public/assets/{chunk-ZIRB5QZD-rA251rHW.js → chunk-ZIRB5QZD-x2paC8Ym.js} +1 -1
  121. package/dist/public/assets/classDiagram-OUVF2IWQ-CBMdybof.js +1 -0
  122. package/dist/public/assets/classDiagram-v2-EOCWNBFH-_6omkEAt.js +1 -0
  123. package/dist/public/assets/{client-version-9mDVHFsH.js → client-version-CI3pzxaH.js} +1 -1
  124. package/dist/public/assets/{comment-chips-zzwDt2eW.js → comment-chips-Dffri1Xa.js} +2 -2
  125. package/dist/public/assets/{config-provider-CqysOmJk.js → config-provider-DpMwlMEo.js} +2 -2
  126. package/dist/public/assets/{cose-bilkent-JH36ORCC-BO3tFb1k.js → cose-bilkent-JH36ORCC-CYGNHPN1.js} +1 -1
  127. package/dist/public/assets/createLucideIcon-wbFLvDA-.js +1 -0
  128. package/dist/public/assets/cynefin-VYW2F7L2-Bld4CPSL.js +1 -0
  129. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-kMgUnu_c.js → cynefinDiagram-TSTJHNR4-B2WpbGQm.js} +1 -1
  130. package/dist/public/assets/{dagre-VKFMJZFB-CgYSDfeg.js → dagre-VKFMJZFB-D9UQmJxN.js} +1 -1
  131. package/dist/public/assets/{dagre-DmGue-PX.js → dagre-m0poQDwd.js} +1 -1
  132. package/dist/public/assets/{diagram-FQU43EPY-XRWiX7Im.js → diagram-FQU43EPY-7M2ET6l3.js} +1 -1
  133. package/dist/public/assets/{diagram-G47NLZAW-BzqAYczi.js → diagram-G47NLZAW-DpsDaYFM.js} +1 -1
  134. package/dist/public/assets/{diagram-NH7WQ7WH-CAOpGCwL.js → diagram-NH7WQ7WH-CwGRC_4A.js} +1 -1
  135. package/dist/public/assets/{diagram-OA4YK3LP-CsYFi60N.js → diagram-OA4YK3LP-Cv8Yslyv.js} +1 -1
  136. package/dist/public/assets/{diagram-WEI45ONY-BPyyv8e3.js → diagram-WEI45ONY-BQVzDEI1.js} +1 -1
  137. package/dist/public/assets/{dialog-CkjkuWLF.js → dialog-C1XaLkpS.js} +1 -1
  138. package/dist/public/assets/{dist-D2AiGKcA.js → dist-B6UNek5u.js} +1 -1
  139. package/dist/public/assets/{dist-_8wb0R99.js → dist-BFl6CzPt.js} +1 -1
  140. package/dist/public/assets/{dist-Bdhn2jv42.js → dist-BUtHqenk2.js} +1 -1
  141. package/dist/public/assets/{dist-Dqtgp0QD2.js → dist-Bcmi_W0T2.js} +1 -1
  142. package/dist/public/assets/{dist-CEBfbNax.js → dist-CKIx-azO.js} +1 -1
  143. package/dist/public/assets/{dist-CTPwMRld.js → dist-CPb8nv1S.js} +1 -1
  144. package/dist/public/assets/{dist-C2ZNHEgX.js → dist-CWm4Y27g.js} +1 -1
  145. package/dist/public/assets/{dist-FPlC48Ke.js → dist-CZ_7whgD.js} +1 -1
  146. package/dist/public/assets/{dist-BK-fqCFD.js → dist-CqYx5K2X.js} +1 -1
  147. package/dist/public/assets/{dist-B4smVaZm2.js → dist-D8RKvolB2.js} +179 -179
  148. package/dist/public/assets/{dist-MQd-Irtl.js → dist-DH19Ha9g.js} +1 -1
  149. package/dist/public/assets/{dist-CKHaw45-.js → dist-DXiLicfm.js} +1 -1
  150. package/dist/public/assets/{dist-DA8rIjtg.js → dist-DhhvZ-Fu.js} +1 -1
  151. package/dist/public/assets/{dist-BkSGIgDv.js → dist-Dibn-GMd.js} +1 -1
  152. package/dist/public/assets/{doc-paths-DPN-3rhq.js → doc-paths-C6_l5qhr.js} +1 -1
  153. package/dist/public/assets/{documents-events-DYwaAqwG.js → documents-events-Bh1LSWeJ.js} +1 -1
  154. package/dist/public/assets/{download-D3RTVXwv.js → download-DLNGh9PS.js} +1 -1
  155. package/dist/public/assets/dropdown-menu-BvpO8ueR.js +1 -0
  156. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-CUTAjine.js → ebnfDiagram-CCIWWBDH-DMAh9nKT.js} +1 -1
  157. package/dist/public/assets/{erDiagram-Q63AITRT-BSu96D8g.js → erDiagram-Q63AITRT-DKFiE0Vo.js} +1 -1
  158. package/dist/public/assets/{esm-DbmiTy2g.js → esm-C2ewNoEu.js} +1 -1
  159. package/dist/public/assets/eventmodeling-45OFAUF4-BM0_rW2P.js +1 -0
  160. package/dist/public/assets/{eye-yERBaQWj.js → eye-DDAm7EsR.js} +1 -1
  161. package/dist/public/assets/field-Cq66GDVw.js +1 -0
  162. package/dist/public/assets/file-tree-adapter-B4ykQtEb.js +1 -0
  163. package/dist/public/assets/{file-tree-utils-BYKXMiDK.js → file-tree-utils-COZ5qd1A.js} +1 -1
  164. package/dist/public/assets/flowDiagram-23GEKE2U-B4eMpKzl.js +1 -0
  165. package/dist/public/assets/{folder-8ceGqZIO.js → folder-CnSwxkO-.js} +1 -1
  166. package/dist/public/assets/{folder-config-api-CDok_aFN.js → folder-config-api-CqtfjrQF.js} +1 -1
  167. package/dist/public/assets/{folder-open-CvyyCBOn.js → folder-open-BKx7QmM_.js} +1 -1
  168. package/dist/public/assets/follow-file-bH1z3rvn.js +1 -0
  169. package/dist/public/assets/form-VEn6ZPb_.js +1 -0
  170. package/dist/public/assets/{ganttDiagram-NO4QXBWP-Crrr-q7s.js → ganttDiagram-NO4QXBWP--SJpls7L.js} +1 -1
  171. package/dist/public/assets/{git-branch-oPfvsh1I.js → git-branch-v159JGOd.js} +1 -1
  172. package/dist/public/assets/gitGraph-TEB2WS4Q-BFnnOjnN.js +1 -0
  173. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-BdMHODo-.js → gitGraphDiagram-IHSO6WYX-B1AjnInE.js} +1 -1
  174. package/dist/public/assets/{globals-DpFuWoOb.js → globals-prQJiwR-.js} +2 -2
  175. package/dist/public/assets/{graphlib-DIVfLvlR.js → graphlib-D6a-9iLo.js} +1 -1
  176. package/dist/public/assets/{hash-DP25l_li.js → hash-DId30u-_.js} +1 -1
  177. package/dist/public/assets/{highlighted-body-OFNGDK62-Cue0vPGT.js → highlighted-body-OFNGDK62-xJQZHz65.js} +1 -1
  178. package/dist/public/assets/index-C3pQc8vq.js +2092 -0
  179. package/dist/public/assets/{info-Bza7Xa6D.js → info-BcCY_Or2.js} +1 -1
  180. package/dist/public/assets/info-DKCQHKI2-C4iD29MB.js +1 -0
  181. package/dist/public/assets/{infoDiagram-FWYZ7A6U-_RNxdwPC.js → infoDiagram-FWYZ7A6U-DBicCXZU.js} +1 -1
  182. package/dist/public/assets/input-CdGQDWjM.js +1 -0
  183. package/dist/public/assets/input-group-C_zrpbIa.js +1 -0
  184. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-BbXzN7UF.js → ishikawaDiagram-FXEZZL3T-B5hPGOul.js} +1 -1
  185. package/dist/public/assets/{journeyDiagram-5HDEW3XC-BqwkEnJh.js → journeyDiagram-5HDEW3XC-Dl3OnoGl.js} +1 -1
  186. package/dist/public/assets/{kanban-definition-HUTT4EX6-CX-ROP0U.js → kanban-definition-HUTT4EX6-maq6lkuf.js} +1 -1
  187. package/dist/public/assets/label-CGqMAe0S.js +1 -0
  188. package/dist/public/assets/{line-D0lohJ6a.js → line-B2_EkJOy.js} +1 -1
  189. package/dist/public/assets/{linear-By98wvuz.js → linear-Bskk1XDV.js} +1 -1
  190. package/dist/public/assets/{lint-config-client-CqIt6_m6.js → lint-config-client-bEZXQCEN.js} +1 -1
  191. package/dist/public/assets/loader-circle-A8fM_hha.js +1 -0
  192. package/dist/public/assets/{map-XagOZNs9.js → map-BEHMQBu2.js} +1 -1
  193. package/dist/public/assets/{markdownlint-rule-browser-B9Uf4v2H.js → markdownlint-rule-browser-DSfETRq3.js} +1 -1
  194. package/dist/public/assets/mermaid-GHXKKRXX-DE1sjxOE.js +1 -0
  195. package/dist/public/assets/{mermaid-parser.core-DtOR1aVt.js → mermaid-parser.core-DDjZMctQ.js} +2 -2
  196. package/dist/public/assets/{mermaid.core-DFRkYHGF.js → mermaid.core-DJBoiuub.js} +3 -3
  197. package/dist/public/assets/{mindmap-definition-LN4V7U3C-BPq8CY-V.js → mindmap-definition-LN4V7U3C-BMKM5jZf.js} +1 -1
  198. package/dist/public/assets/minus-BqVmr9UG.js +1 -0
  199. package/dist/public/assets/{miss-dialog-store-DBqQ_Nyn.js → miss-dialog-store-CU8cCSmK.js} +1 -1
  200. package/dist/public/assets/navigation-targets-x6iOvvv-.js +1 -0
  201. package/dist/public/assets/{now-BJ6wHiq6.js → now-DQUsv__I.js} +1 -1
  202. package/dist/public/assets/{open-managed-artifact-tab-BRW0Boal.js → open-managed-artifact-tab-D7O6shhm.js} +1 -1
  203. package/dist/public/assets/{ordinal-BhGTF2Fp.js → ordinal-Cy_9j7oo.js} +1 -1
  204. package/dist/public/assets/packet-7NZHBO7P-7H_SSh7g.js +1 -0
  205. package/dist/public/assets/panel-Boo96yEj.js +1 -0
  206. package/dist/public/assets/{panel-right-open-ChixO1pm.js → panel-right-open-mOxBnqyo.js} +1 -1
  207. package/dist/public/assets/{paperclip-CFZOhV8C.js → paperclip-mdBEQ0WS.js} +1 -1
  208. package/dist/public/assets/{pegDiagram-2B236MQR-Bs6HaUdW.js → pegDiagram-2B236MQR-XqQZD2V0.js} +1 -1
  209. package/dist/public/assets/{pending-receive-nav-store-C5kqBBL2.js → pending-receive-nav-store-D4P72ovr.js} +1 -1
  210. package/dist/public/assets/pie-RZYD4A2V-B5KrTLE6.js +1 -0
  211. package/dist/public/assets/{pieDiagram-ENE6RG2P-BBo6EMS4.js → pieDiagram-ENE6RG2P-BtvwA4qL.js} +1 -1
  212. package/dist/public/assets/project-paths-CqnImr76.js +1 -0
  213. package/dist/public/assets/{prop-types-CwT5q2dg.js → prop-types-BfZ_j9wJ.js} +1 -1
  214. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-qmZeOoSr.js → quadrantDiagram-ABIIQ3AL-CI6wpHnQ.js} +1 -1
  215. package/dist/public/assets/radar-I7S5WNFK-BmyXCsHA.js +1 -0
  216. package/dist/public/assets/radio-group-DxMM4tU-.js +1 -0
  217. package/dist/public/assets/railroad-3IZDKUUU-BR0L2Ycb.js +1 -0
  218. package/dist/public/assets/railroad-abnf-AHOZXSZD-BJSVlTW3.js +1 -0
  219. package/dist/public/assets/railroad-ebnf-EBAXGLYW-DQeJc96K.js +1 -0
  220. package/dist/public/assets/railroad-peg-LSFZ7HO6-BOBB_YAC.js +1 -0
  221. package/dist/public/assets/{railroadDiagram-RFXS5EU6-DE_EvwtV.js → railroadDiagram-RFXS5EU6-esD3LX2s.js} +1 -1
  222. package/dist/public/assets/{receive-store-9n3T9AKo.js → receive-store-C-X60pJ_.js} +1 -1
  223. package/dist/public/assets/{refresh-cw-D3t5sdqM.js → refresh-cw-CsRXA9N2.js} +1 -1
  224. package/dist/public/assets/{requirementDiagram-TGXJPOKE-BZ-rKt8B.js → requirementDiagram-TGXJPOKE-BInMn3Xh.js} +1 -1
  225. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-B9AZEJIc.js → sankeyDiagram-HTMAVEWB-DjH7kut4.js} +1 -1
  226. package/dist/public/assets/schema-fields-view-intent-ywCTOcjb.js +1 -0
  227. package/dist/public/assets/select-BVnl5AhR.js +1 -0
  228. package/dist/public/assets/{selection-context-Ei6PWK1c.js → selection-context-UHJm7wNO.js} +1 -1
  229. package/dist/public/assets/separator-BhGCtoZc.js +1 -0
  230. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-DR0l3jeO.js → sequenceDiagram-DBY2YBRQ-D9rSuKJA.js} +1 -1
  231. package/dist/public/assets/{sizeCapture-X5ZJPWSS-CK3vwB3X.js → sizeCapture-X5ZJPWSS-BpnFIdO9.js} +1 -1
  232. package/dist/public/assets/skeleton-CD1oYYfF.js +1 -0
  233. package/dist/public/assets/skill-actions-Dm5ldBEc.js +2 -0
  234. package/dist/public/assets/{skill-scope-QSVdjA7g.js → skill-scope-B58Ho5RB.js} +1 -1
  235. package/dist/public/assets/{skills-api-DPk4ScTz.js → skills-api-CcFN0_Po.js} +1 -1
  236. package/dist/public/assets/{square-pen-wqme9vlv.js → square-pen-BbETm_LZ.js} +1 -1
  237. package/dist/public/assets/{src-rG3yqT5Z.js → src--VBSbHrD.js} +1 -1
  238. package/dist/public/assets/{src-DsJU4LsJ.js → src-D9tbVCHI.js} +1 -1
  239. package/dist/public/assets/{stateDiagram-2N3HPSRC-DEWfQHsO.js → stateDiagram-2N3HPSRC-B0iumw-I.js} +1 -1
  240. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-nM3zWRo5.js +1 -0
  241. package/dist/public/assets/{swimlanes-5IMT3BWC-B6x4Ld9j.js → swimlanes-5IMT3BWC-DPME_yO4.js} +2 -2
  242. package/dist/public/assets/swimlanesDiagram-G3AALYLV-Bkn7cRsX.js +8 -0
  243. package/dist/public/assets/switch-BQ3qkbBx.js +1 -0
  244. package/dist/public/assets/tabs-C54rwljA.js +1 -0
  245. package/dist/public/assets/tag-pill-input-Br5GXzD6.js +1 -0
  246. package/dist/public/assets/{target-navigation-intent-Bo9uuBEh.js → target-navigation-intent-DEjv2wu2.js} +1 -1
  247. package/dist/public/assets/{telemetry-impl-D4kQ8pzt.js → telemetry-impl-D5iNhayi.js} +2 -2
  248. package/dist/public/assets/{telemetry-startup-B15S0fJ7.js → telemetry-startup-gGtzcYyd.js} +1 -1
  249. package/dist/public/assets/terminal-input-events-D7rv6nZZ.js +1 -0
  250. package/dist/public/assets/terminal-launch-events-cds9D2zG.js +1 -0
  251. package/dist/public/assets/{terminal-telemetry-46cHbbgd.js → terminal-telemetry-B0_vjUSm.js} +1 -1
  252. package/dist/public/assets/text-viewer-languages-BHFZCAL-.js +2 -0
  253. package/dist/public/assets/textarea-BzPGvj03.js +1 -0
  254. package/dist/public/assets/{thread-client-DpMjiK2J.js → thread-client-DmkqHx9Q.js} +1 -1
  255. package/dist/public/assets/{timeline-definition-FHXFAJF6-DB7l9JZO.js → timeline-definition-FHXFAJF6-DXT31kug.js} +1 -1
  256. package/dist/public/assets/toggle-group-DpvWeoN9.js +1 -0
  257. package/dist/public/assets/tooltip-CtvLp_YK.js +1 -0
  258. package/dist/public/assets/{trash-2-5vqPZUBk.js → trash-2-4ZuuBm4P.js} +1 -1
  259. package/dist/public/assets/treeView-QDETBFTQ-BmMqItzI.js +1 -0
  260. package/dist/public/assets/treemap-6X3UGDF4-muRT0NuT.js +1 -0
  261. package/dist/public/assets/{triangle-alert-BwCftF1V.js → triangle-alert-BB_1Bz59.js} +1 -1
  262. package/dist/public/assets/{typing-burst-detector-CKkV0qHr.js → typing-burst-detector-BOmCFurR.js} +1 -1
  263. package/dist/public/assets/{undo-2-BRIW1mxN.js → undo-2-BxTugTzj.js} +1 -1
  264. package/dist/public/assets/uninstall-DNe6MvBi.js +1 -0
  265. package/dist/public/assets/{use-activity-panel-BrntKM08.js → use-activity-panel-DbcErwrL.js} +1 -1
  266. package/dist/public/assets/{use-apply-config-color-theme-BeVjXtPt.js → use-apply-config-color-theme-C5xWr7J7.js} +2 -2
  267. package/dist/public/assets/{use-collab-url-DNKvlkVI.js → use-collab-url-D_rLtDaU.js} +1 -1
  268. package/dist/public/assets/{use-live-xterm-theme-zW4nzNGd.js → use-live-xterm-theme-KQpLA6Ig.js} +1 -1
  269. package/dist/public/assets/{use-open-skill-Bs2T3l_Z.js → use-open-skill-BYpqVFnY.js} +1 -1
  270. package/dist/public/assets/{use-settings-route-Dw-Hb0ex.js → use-settings-route-xhvjUTtD.js} +1 -1
  271. package/dist/public/assets/{use-skill-directory-CB4briga.js → use-skill-directory-CZ_74a8P.js} +1 -1
  272. package/dist/public/assets/{use-skills-luzjx-1h.js → use-skills-DBT082yp.js} +1 -1
  273. package/dist/public/assets/{use-terminal-enabled-BmqysEmJ.js → use-terminal-enabled-BtMJcFpZ.js} +1 -1
  274. package/dist/public/assets/{use-timeline-entry-diff-5XrGZxUG.js → use-timeline-entry-diff-CHAJ_uzb.js} +2 -2
  275. package/dist/public/assets/{use-workspace-Bi_k2cyZ.js → use-workspace-D6_5od5W.js} +1 -1
  276. package/dist/public/assets/utils-CPqDy6Hr.js +1 -0
  277. package/dist/public/assets/{vennDiagram-L72KCM5P-D6bPpaIm.js → vennDiagram-L72KCM5P-DIsQhsUb.js} +1 -1
  278. package/dist/public/assets/wardley-OPB4EBWU-vOd_RJdo.js +1 -0
  279. package/dist/public/assets/{wardleyDiagram-EHGQE667-9U25ZM8P.js → wardleyDiagram-EHGQE667-CeHWZQuw.js} +1 -1
  280. package/dist/public/assets/{wrench-CqOvU1qQ.js → wrench-BHZvMfZp.js} +1 -1
  281. package/dist/public/assets/x-BL2rz544.js +1 -0
  282. package/dist/public/assets/{xychartDiagram-FW5EYKEG-WSgFIUEO.js → xychartDiagram-FW5EYKEG-5ub1f-kN.js} +1 -1
  283. package/dist/public/index.html +131 -128
  284. package/dist/public/uninstall.html +17 -16
  285. package/dist/{repair-launch-json-BnuZxbzl.mjs → repair-launch-json-Cc9RPEk-.mjs} +2 -2
  286. package/dist/{repair-mcp-configs-Cbg7X3jU.mjs → repair-mcp-configs-Bk7nIh5R.mjs} +2 -2
  287. package/dist/{repair-skills-dd5mv1UC.mjs → repair-skills-BMYnxn3h.mjs} +2 -2
  288. package/dist/repair-skills-C-ey2QcX.mjs +1 -0
  289. package/dist/{server-lock-CiLY7g7M.mjs → server-lock-CCS3UzJQ.mjs} +2 -2
  290. package/dist/server-lock-CKTWPQax.mjs +1 -0
  291. package/dist/{sleep-IcuyYCzq.mjs → sleep-TXRFWg8x.mjs} +5 -5
  292. package/dist/{src-vPHpv2Pv.mjs → src-C9yhZBbO.mjs} +21 -21
  293. package/dist/src-CJQ7Tr0x.mjs +2030 -0
  294. package/dist/{src-BV_ssChu.mjs → src-DDzpg6rN.mjs} +2 -2
  295. package/dist/{src-FJfcW5Wa.mjs → src-Dmoupsem.mjs} +1 -1
  296. package/dist/{start-CrQRZ2iN.mjs → start-BPeS-cjq.mjs} +3 -3
  297. package/dist/start-BRdG0jJw.mjs +1 -0
  298. package/dist/{write-project-skill-9Bg5smOa.mjs → write-project-skill-DPGLaFfB.mjs} +2 -2
  299. package/package.json +5 -5
  300. package/dist/constants-Tj2BXHLz.mjs +0 -2
  301. package/dist/fs-traced-Bi88qem0.mjs +0 -1
  302. package/dist/git-handle-CIs--jPt.mjs +0 -1
  303. package/dist/init-DAEIZfnY.mjs +0 -1
  304. package/dist/loader-DjGgIOZB.mjs +0 -1
  305. package/dist/md-manager-BYBAWLMu.mjs +0 -2
  306. package/dist/preview-BRsYNNVp.mjs +0 -1
  307. package/dist/public/assets/ActivityModeContent-DBIuWjYz.js +0 -1
  308. package/dist/public/assets/AppMenubar-7eBxIB37.js +0 -1
  309. package/dist/public/assets/ChangedOutsideBadge-HeyxmqeX.js +0 -1
  310. package/dist/public/assets/CodeMirrorPropInput-ni9vC7Fz.js +0 -3
  311. package/dist/public/assets/DocumentContext-DOLytv_M.js +0 -38
  312. package/dist/public/assets/EditorModeToggle-CNorGTYw.js +0 -2
  313. package/dist/public/assets/EnableSyncConfirmDialog-BIggEySP.js +0 -1
  314. package/dist/public/assets/FeedbackForm-CxZ7wWPb.js +0 -1
  315. package/dist/public/assets/ImportSkillDialog-CDNt7ygs.js +0 -1
  316. package/dist/public/assets/ManagedArtifactProperties-AwlBn5fa.js +0 -1
  317. package/dist/public/assets/ManagedArtifactProperties-DUL9cmXF.js +0 -2
  318. package/dist/public/assets/McpConsentDialogBody-BMrE5RK5.js +0 -1
  319. package/dist/public/assets/MermaidDocEditor-DNa5Mst7.js +0 -1
  320. package/dist/public/assets/RegisteredAgentIcon-CHh3fima.js +0 -1
  321. package/dist/public/assets/ReportBugDialogBody-C3Dct-EA.js +0 -3
  322. package/dist/public/assets/SchemaConfigEditor-IN_XqunA.js +0 -1
  323. package/dist/public/assets/SessionsHost-CYxR-RCl.js +0 -2
  324. package/dist/public/assets/SettingsDialogBody-zEVCcY6i.js +0 -7
  325. package/dist/public/assets/SkillModeBanner-CsKHM-QY.js +0 -1
  326. package/dist/public/assets/SkillOriginInline-Bi8XGbK6.js +0 -1
  327. package/dist/public/assets/SkillToolbarControls-t4VQIap4.js +0 -1
  328. package/dist/public/assets/agent-visibility-Bt2OD_n5.js +0 -1
  329. package/dist/public/assets/architecture-TIHT7OUA-Bl7-zFAE.js +0 -1
  330. package/dist/public/assets/arrow-up-right-BZsQghvQ.js +0 -1
  331. package/dist/public/assets/auth-state-cache-DpJsYOVr.js +0 -11
  332. package/dist/public/assets/badge-DB5BJfSU.js +0 -1
  333. package/dist/public/assets/button-oSXzJYWO.js +0 -1
  334. package/dist/public/assets/calendar-C2lP75MI.js +0 -1
  335. package/dist/public/assets/channel-Bf_IZmsH.js +0 -1
  336. package/dist/public/assets/check-DA7_vRdO.js +0 -1
  337. package/dist/public/assets/checkbox-DYPwCq3O.js +0 -1
  338. package/dist/public/assets/chevron-left-D8z-buF6.js +0 -1
  339. package/dist/public/assets/chevron-right-CgsPV9lV.js +0 -1
  340. package/dist/public/assets/chunk-2Q5K7J3B-CBNXZghD.js +0 -1
  341. package/dist/public/assets/chunk-VAUOI2AC-K9aKY8La.js +0 -1
  342. package/dist/public/assets/chunk-XXDRQBXY-CRN6FsNM.js +0 -1
  343. package/dist/public/assets/classDiagram-OUVF2IWQ-B8NyhReL.js +0 -1
  344. package/dist/public/assets/classDiagram-v2-EOCWNBFH-To5zrK6k.js +0 -1
  345. package/dist/public/assets/createLucideIcon-BiRV80uZ.js +0 -1
  346. package/dist/public/assets/cynefin-VYW2F7L2-DjK3ZZKp.js +0 -1
  347. package/dist/public/assets/dropdown-menu-D2umi56L.js +0 -1
  348. package/dist/public/assets/eventmodeling-45OFAUF4-C3gCuhXd.js +0 -1
  349. package/dist/public/assets/field-i4kPdg1V.js +0 -1
  350. package/dist/public/assets/file-tree-adapter-B3YYQMKE.js +0 -1
  351. package/dist/public/assets/flowDiagram-23GEKE2U-V8thnmzy.js +0 -1
  352. package/dist/public/assets/follow-file-BpD8YozT.js +0 -1
  353. package/dist/public/assets/form-lIFpKMVU.js +0 -1
  354. package/dist/public/assets/gitGraph-TEB2WS4Q-BERn_Vnm.js +0 -1
  355. package/dist/public/assets/index-Bbf0BHeh.js +0 -2092
  356. package/dist/public/assets/info-DKCQHKI2-xuBgM0S3.js +0 -1
  357. package/dist/public/assets/input-C4n4n5Hc.js +0 -1
  358. package/dist/public/assets/input-group-C_H5NgPX.js +0 -1
  359. package/dist/public/assets/label-Ds0LTB-Z.js +0 -1
  360. package/dist/public/assets/loader-circle-Cn2Xr4cN.js +0 -1
  361. package/dist/public/assets/mermaid-GHXKKRXX-CFTslKYT.js +0 -1
  362. package/dist/public/assets/minus-CBRjUXY7.js +0 -1
  363. package/dist/public/assets/navigation-targets-CvdOYknS.js +0 -1
  364. package/dist/public/assets/packet-7NZHBO7P-DhQWKabl.js +0 -1
  365. package/dist/public/assets/panel-FwLLPu5s.js +0 -1
  366. package/dist/public/assets/pie-RZYD4A2V-DaewLp2Y.js +0 -1
  367. package/dist/public/assets/project-paths-Cgrv2qcw.js +0 -1
  368. package/dist/public/assets/radar-I7S5WNFK-DljmjJ2C.js +0 -1
  369. package/dist/public/assets/radio-group-DFFiLDEM.js +0 -1
  370. package/dist/public/assets/railroad-3IZDKUUU-6CgLOfBJ.js +0 -1
  371. package/dist/public/assets/railroad-abnf-AHOZXSZD-DQ60e1aW.js +0 -1
  372. package/dist/public/assets/railroad-ebnf-EBAXGLYW-Da8xQ_1N.js +0 -1
  373. package/dist/public/assets/railroad-peg-LSFZ7HO6-CDOeiUF5.js +0 -1
  374. package/dist/public/assets/schema-fields-view-intent-SQVE5W3s.js +0 -1
  375. package/dist/public/assets/select-DyVZCohx.js +0 -1
  376. package/dist/public/assets/separator-4_yBRx-q.js +0 -1
  377. package/dist/public/assets/skeleton-BlTc8h6X.js +0 -1
  378. package/dist/public/assets/skill-actions-6lbXpkx6.js +0 -2
  379. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-aJyvpelO.js +0 -1
  380. package/dist/public/assets/swimlanesDiagram-G3AALYLV-NoFAxBaw.js +0 -8
  381. package/dist/public/assets/switch-CsstPO-E.js +0 -1
  382. package/dist/public/assets/tabs-C8ykgpIi.js +0 -1
  383. package/dist/public/assets/tag-pill-input-Bi-VYc9q.js +0 -1
  384. package/dist/public/assets/terminal-input-events-B8xUcID4.js +0 -1
  385. package/dist/public/assets/terminal-launch-events-CCUJ6bvs.js +0 -1
  386. package/dist/public/assets/textarea-DKb-eo87.js +0 -1
  387. package/dist/public/assets/toggle-group-DMfnQ5Pd.js +0 -1
  388. package/dist/public/assets/tooltip-DkZ6fphS.js +0 -1
  389. package/dist/public/assets/treeView-QDETBFTQ-Ds4YBLMo.js +0 -1
  390. package/dist/public/assets/treemap-6X3UGDF4-D2ccHx16.js +0 -1
  391. package/dist/public/assets/uninstall-C2Z7mcqE.js +0 -1
  392. package/dist/public/assets/wardley-OPB4EBWU-JuWm1scq.js +0 -1
  393. package/dist/public/assets/x-C6kVbc_i.js +0 -1
  394. package/dist/repair-skills-PgjKx2Kj.mjs +0 -1
  395. package/dist/server-lock-toF-I3k7.mjs +0 -1
  396. package/dist/src-BexdiJ2F.mjs +0 -2030
  397. package/dist/start-CBKXj6gj.mjs +0 -1
  398. /package/dist/public/assets/{ActivityPanelDiffView-ZX0cv7Dl.js → ActivityPanelDiffView-DmVrPrCH.js} +0 -0
  399. /package/dist/public/assets/{__vite-browser-external-DwydhYHF.js → __vite-browser-external-B4L9Bgvr.js} +0 -0
  400. /package/dist/public/assets/{agent-presence-BcWu61SE.js → agent-presence-CuSKbQIG.js} +0 -0
  401. /package/dist/public/assets/{array-DpLqdF3L.js → array-jB8ZVI0g.js} +0 -0
  402. /package/dist/public/assets/{auth-prompt-store-CmyRhcKh.js → auth-prompt-store-C7w8BqXG.js} +0 -0
  403. /package/dist/public/assets/{chunk-KEIR6QF5-Bf0oDx3Z.js → chunk-KEIR6QF5-BoNEB_HG.js} +0 -0
  404. /package/dist/public/assets/{chunk-Y2CYZVJY-PbmsUfAu.js → chunk-Y2CYZVJY-DCzjAn36.js} +0 -0
  405. /package/dist/public/assets/{clike-BrXLgO2o.js → clike-volkcHCn.js} +0 -0
  406. /package/dist/public/assets/{clipboard-adapter-B3lKEXcw.js → clipboard-adapter-DdkYoUY3.js} +0 -0
  407. /package/dist/public/assets/{colors-B-WRw0bG.js → colors-DP6EPL4e.js} +0 -0
  408. /package/dist/public/assets/{copilot-BkvifxDd.js → copilot-CYbxld_I.js} +0 -0
  409. /package/dist/public/assets/{cursor-D-FuCbK1.js → cursor-CVuYJhcM.js} +0 -0
  410. /package/dist/public/assets/{cytoscape.esm-BkIkmBTc.js → cytoscape.esm-DBvPDb1U.js} +0 -0
  411. /package/dist/public/assets/{defaultLocale-DoD61tXl.js → defaultLocale-DHYtiGMG.js} +0 -0
  412. /package/dist/public/assets/{desktop-bridge-types-5ScET3Cg.js → desktop-bridge-types-ByIs2Wy8.js} +0 -0
  413. /package/dist/public/assets/{diff-DTEjW6Ec.js → diff-DCzkDf0s.js} +0 -0
  414. /package/dist/public/assets/{dist-D4eaXg-1.js → dist-CvBo_0Zd.js} +0 -0
  415. /package/dist/public/assets/{dist-DuwTJb1j.js → dist-D-OluTzV.js} +0 -0
  416. /package/dist/public/assets/{dist-CA7QPULb.js → dist-D5z-4WeG.js} +0 -0
  417. /package/dist/public/assets/{dist-6Q9yuoli.js → dist-DEf6luEB.js} +0 -0
  418. /package/dist/public/assets/{dist-BVbCw0G-.js → dist-Dr52ya0i.js} +0 -0
  419. /package/dist/public/assets/{documents-fetch-AfOPbdF_.js → documents-fetch-Ks0Eoaj3.js} +0 -0
  420. /package/dist/public/assets/{external-link-LAxhzgCI.js → external-link-CIs3ZL0b.js} +0 -0
  421. /package/dist/public/assets/{file-tree-rename-validation-CkkVvtpx.js → file-tree-rename-validation-D3F7wC1T.js} +0 -0
  422. /package/dist/public/assets/{format-Bj7zR862.js → format-B72MB8qy.js} +0 -0
  423. /package/dist/public/assets/{go-D3-a1upg.js → go-DJh4zI5a.js} +0 -0
  424. /package/dist/public/assets/{init-D0AX7DDe.js → init-tVp38eyI.js} +0 -0
  425. /package/dist/public/assets/{isObject-Bs1dF4ay.js → isObject-C7xg_t-t.js} +0 -0
  426. /package/dist/public/assets/{libesm-D5Z2fjiR.js → libesm-BjhN8jLl.js} +0 -0
  427. /package/dist/public/assets/{lint-plugin-meta-DEfDN-Lf.js → lint-plugin-meta-7A6ZrPoH.js} +0 -0
  428. /package/dist/public/assets/{lru-string-cache-CHVwK1CS.js → lru-string-cache-CTK2PJbw.js} +0 -0
  429. /package/dist/public/assets/{lua-B71IklsF.js → lua-xZf4SjJ3.js} +0 -0
  430. /package/dist/public/assets/{mcp-consent-store-B7QM8uoo.js → mcp-consent-store-CsArEV-K.js} +0 -0
  431. /package/dist/public/assets/{min-nSRrTGDE.js → min-GIYS61kh.js} +0 -0
  432. /package/dist/public/assets/{overlay-layers-cTOQ-1PW.js → overlay-layers-gL_2dQqz.js} +0 -0
  433. /package/dist/public/assets/{panzoom.es-D_Inq3Bn.js → panzoom.es-CKxXrXUu.js} +0 -0
  434. /package/dist/public/assets/{parse-api-error-CqQte8A1.js → parse-api-error-9c-Rs5WJ.js} +0 -0
  435. /package/dist/public/assets/{path-rUjnF-It.js → path-BYW9Uhnc.js} +0 -0
  436. /package/dist/public/assets/{pdf-B6i840eQ.js → pdf-CGE64eYM.js} +0 -0
  437. /package/dist/public/assets/{pdf.worker-BVtQmJKT.js → pdf.worker-Cxt0GdPg.js} +0 -0
  438. /package/dist/public/assets/{perl-B5Ul8OcV.js → perl-BwX6Ksou.js} +0 -0
  439. /package/dist/public/assets/{properties-CWbs0haa.js → properties-DagD85j5.js} +0 -0
  440. /package/dist/public/assets/{r-DcrAlDW2.js → r-DUn7ZAa_.js} +0 -0
  441. /package/dist/public/assets/{rough.esm-BfebUORF.js → rough.esm-xhKrnp4d.js} +0 -0
  442. /package/dist/public/assets/{ruby-i1xYQ9jV.js → ruby-BIPfMRfv.js} +0 -0
  443. /package/dist/public/assets/{share-metadata-rows-D1HTNYwn.js → share-metadata-rows-Ci33wJ2t.js} +0 -0
  444. /package/dist/public/assets/{shell-cUw_P8eQ.js → shell-Cq5Ihso3.js} +0 -0
  445. /package/dist/public/assets/{sortable.esm-ByX1chKY.js → sortable.esm-Dngr9VJ1.js} +0 -0
  446. /package/dist/public/assets/{sql-xiwUJ94E.js → sql-C1ugTeux.js} +0 -0
  447. /package/dist/public/assets/{src-DkpCd49O.js → src-o9HvXeVZ.js} +0 -0
  448. /package/dist/public/assets/{startup-marks-BHZdrXwz.js → startup-marks-BFvG00Uu.js} +0 -0
  449. /package/dist/public/assets/{stex-rJmw0eOd.js → stex-BRz73jPo.js} +0 -0
  450. /package/dist/public/assets/{swift-Cl1DeyT6.js → swift-DG2ERlv4.js} +0 -0
  451. /package/dist/public/assets/{thread-draft-staging-CygDRDTa.js → thread-draft-staging-CcGOkG5T.js} +0 -0
  452. /package/dist/public/assets/{timeline-diff-store-C89mH-2r.js → timeline-diff-store-BYDskbwd.js} +0 -0
  453. /package/dist/public/assets/{toml-B2JpJCpy.js → toml-_AQXZoMV.js} +0 -0
  454. /package/dist/public/assets/{use-installed-clis-BR1AXhaE.js → use-installed-clis-a0f5-upA.js} +0 -0
  455. /package/dist/public/assets/{useLintConfigViewMode-eMibVVkV.js → useLintConfigViewMode-RQ4d4hHC.js} +0 -0
@@ -0,0 +1,7 @@
1
+ import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{Jt as r,vn as i}from"./DocumentContext-Ddtfw06F.js";import{t as a}from"./react-f2sANaYj.js";import{n as o,r as s}from"./dist-Nvb76hAm.js";import{t as c}from"./useQuery-ZeEDLtxh.js";import{n as l}from"./dist-PQ5KMVDh.js";import{t as u}from"./compiler-runtime-BfE3aGVn.js";import{a as d,c as f,s as p,u as m}from"./terminal-input-events-D7rv6nZZ.js";import{t as h}from"./utils-CPqDy6Hr.js";import{i as g,n as _,o as v,s as y,t as b}from"./ChangedOutsideBadge-Jw_1ftdU.js";import{t as x}from"./button-D3xSRfT4.js";import{i as S,n as C,t as w}from"./tooltip-CtvLp_YK.js";import{n as T,r as E,t as D}from"./collapsible-BTn3nxAn.js";import{a as O,c as k,i as A,n as j,o as M,r as N,s as P,t as F}from"./dialog-C1XaLkpS.js";import{t as I}from"./checkbox-CgM6fL3A.js";import{a as L,m as R,r as z,t as B}from"./dropdown-menu-BvpO8ueR.js";import{t as V}from"./label-CGqMAe0S.js";import{i as H,n as ee,o as U,s as te,t as ne}from"./select-BVnl5AhR.js";import{i as re,n as W,r as G,t as K}from"./radio-group-DxMM4tU-.js";import{t as q}from"./switch-BQ3qkbBx.js";import{n as J,t as ie}from"./toggle-group-DpvWeoN9.js";import{C as ae,a as oe,b as Y,c as se,d as ce,f as le,h as ue,l as de,n as fe,o as pe,r as me,s as he,t as ge,u as _e,y as ve}from"./agent-visibility-Bj5OOTN2.js";import{i as ye}from"./terminal-telemetry-B0_vjUSm.js";import{Co as be,Mt as xe,So as Se,Xa as Ce,Ya as we,Yr as Te,Z as Ee,_o as De,ao as Oe,bo as ke,da as Ae,fo as je,ft as Me,jt as Ne,la as Pe,lo as Fe,ma as Ie,mo as Le,no as Re,qa as ze,so as Be,uo as Ve,ur as He,xo as Ue}from"./dist-D8RKvolB2.js";import{t as We}from"./createLucideIcon-wbFLvDA-.js";import{a as Ge,c as Ke,d as qe,s as Je,t as Ye}from"./EnableSyncConfirmDialog-Dt2Km8QO.js";import{t as Xe}from"./arrow-up-right-CinCNAo3.js";import{t as Ze}from"./RegisteredAgentIcon-CKpJ_hgB.js";import{t as Qe}from"./check-D1JmbeH0.js";import{t as $e}from"./chevron-right-COaV_K3r.js";import{i as et}from"./prop-types-BfZ_j9wJ.js";import{A as tt,B as nt,D as rt,F as it,H as at,M as ot,N as st,O as ct,P as lt,R as ut,_ as dt,b as ft,c as pt,d as mt,f as ht,h as gt,i as _t,j as vt,l as yt,m as bt,n as xt,o as St,p as Ct,u as wt,v as Tt,y as Et}from"./auth-state-cache-Du0vALuT.js";import{o as Dt}from"./folder-config-api-CqtfjrQF.js";import{t as Ot}from"./info-BcCY_Or2.js";import{t as kt}from"./loader-circle-A8fM_hha.js";import{c as At,i as jt}from"./field-Cq66GDVw.js";import{t as Mt}from"./square-pen-BbETm_LZ.js";import{t as Nt}from"./trash-2-4ZuuBm4P.js";import{t as Pt}from"./triangle-alert-BB_1Bz59.js";import{t as Ft}from"./x-BL2rz544.js";import{n as X}from"./dist-Dr52ya0i.js";import{t as It}from"./ConfigSharingInfoTooltip-BEi44Q-l.js";import{t as Lt}from"./input-CdGQDWjM.js";import{t as Rt}from"./dist-D-OluTzV.js";import{d as zt}from"./doc-paths-C6_l5qhr.js";import{a as Bt,c as Vt,d as Ht,g as Ut,l as Wt,p as Gt,u as Kt}from"./use-settings-route-xhvjUTtD.js";import{K as qt}from"./navigation-targets-x6iOvvv-.js";import{t as Jt}from"./badge-BTPyRUGW.js";import"./config-provider-DpMwlMEo.js";import{a as Yt,c as Xt,d as Zt,f as Qt,l as $t,n as en,o as tn,s as nn,u as rn}from"./use-apply-config-color-theme-C5xWr7J7.js";import{t as an}from"./external-link-CIs3ZL0b.js";import{t as on}from"./textarea-BzPGvj03.js";import{t as sn}from"./lint-plugin-meta-7A6ZrPoH.js";import{t as cn}from"./skeleton-CD1oYYfF.js";import{d as ln,n as un,r as dn,t as fn,u as pn}from"./lint-config-client-bEZXQCEN.js";import{a as mn,d as hn,f as gn,i as _n,l as vn,m as yn,o as bn,p as xn,s as Sn,t as Cn,u as wn}from"./sortable.esm-Dngr9VJ1.js";import{t as Tn}from"./open-managed-artifact-tab-D7O6shhm.js";import{a as En,f as Dn,i as On,n as kn,o as An,p as jn,r as Mn,s as Nn,t as Pn}from"./form-VEn6ZPb_.js";import{t as Fn}from"./tag-pill-input-Br5GXzD6.js";import{t as In}from"./markdownlint-rule-browser-DSfETRq3.js";import{i as Ln,n as Rn}from"./schema-fields-view-intent-ywCTOcjb.js";import{n as zn,t as Bn}from"./use-terminal-enabled-BtMJcFpZ.js";var Vn=We(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Z=u(),Q=e(a(),1),$=n(),Hn=`settings-sharing-title`;function Un(){let e=(0,Z.c)(1),t=(typeof window<`u`?window.okDesktop:void 0)?.sharing,n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=t===void 0?(0,$.jsx)(Wn,{}):(0,$.jsx)(Gn,{}),e[0]=n):n=e[0],n}function Wn(){let e=(0,Z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`h3`,{id:Hn,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`cs4mps`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`section`,{"aria-labelledby":Hn,className:`space-y-3`,children:(0,$.jsxs)(`div`,{className:`space-y-1`,children:[t,(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`7YRrJ9`,components:{0:(0,$.jsx)(`code`,{}),1:(0,$.jsx)(`code`,{}),2:(0,$.jsx)(`code`,{})}})})]})}),e[1]=n):n=e[1],n}function Gn(){let e=(0,Z.c)(39),{_:t}=s(),[n,r]=(0,Q.useState)(null),[i,a]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(null),u;e[0]===t?u=e[1]:(u=async function(){let e=window.okDesktop?.sharing;if(e)try{r(await e.status())}catch(e){let n=e;X.error(n instanceof Error?n.message:t({id:`K0N7zS`})),r(qn)}},e[0]=t,e[1]=u);let d=u,f;e[2]===d?f=e[3]:(f=()=>{d()},e[2]=d,e[3]=f);let p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],e[4]=p):p=e[4],(0,Q.useEffect)(f,p);let m;e[5]!==t||e[6]!==i||e[7]!==d||e[8]!==n?(m=async function(e){let r=window.okDesktop?.sharing;if(!r||n===null||i||n.mode===e)return;a(!0),l(null);let o=null,s=null;try{o=await r.setMode(e)}catch(e){s=e}if(a(!1),s!==null){X.error(s instanceof Error?s.message:t({id:`qZv5ZR`}));return}o!==null&&(o.kind===`refused-tracked`?(l({tracked:o.tracked,remediation:o.remediation}),X.error(t({id:`z2JdQ-`}),{duration:5e3})):o.kind===`no-exclude`?X.warning(o.reason===`no-git`?t({id:`YSFv5w`}):t({id:`8cS0nH`,values:{0:o.reason}})):X.success(t(e===`local-only`?{id:`VvS_k_`}:{id:`k_pade`})),await d())},e[5]=t,e[6]=i,e[7]=d,e[8]=n,e[9]=m):m=e[9];let h=m,g;e[10]!==t||e[11]!==i||e[12]!==d||e[13]!==n?(g=async function(){let e=window.okDesktop?.sharing;if(!e||n===null||i)return;a(!0);let r=null,o=null;try{r=await e.setSkillsShared(!1)}catch(e){o=e}if(a(!1),o!==null){X.error(o instanceof Error?o.message:t({id:`onTlRk`}));return}if(r!==null){if(r.kind===`no-exclude`){let e=r.reason===`no-git`?t({id:`Xwump4`}):r.reason===`inaccessible`?t({id:`PlGC6r`}):t({id:`zcmYx4`});X.warning(t({id:`4h3e0H`,values:{detail:e}}));return}X.success(t({id:`pQf2Ux`})),await d()}},e[10]=t,e[11]=i,e[12]=d,e[13]=n,e[14]=g):g=e[14];let _=g;if(n===null){let t;return e[15]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":Hn,className:`space-y-3`,children:[(0,$.jsx)(`h3`,{id:Hn,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`cs4mps`})}),(0,$.jsx)(cn,{className:`h-24`})]}),e[15]=t):t=e[15],t}let v=n.mode===`no-git`,y;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(`h3`,{id:Hn,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`cs4mps`})}),(0,$.jsx)(It,{})]}),e[16]=y):y=e[16];let b;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[y,(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`N55YNr`})})]}),e[17]=b):b=e[17];let S;e[18]!==i||e[19]!==v||e[20]!==h||e[21]!==n.mode?(S=v?(0,$.jsx)(`p`,{className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,role:`status`,"data-testid":`settings-sharing-no-git`,children:(0,$.jsx)(o,{id:`ju38ms`})}):(0,$.jsxs)(K,{value:n.mode,onValueChange:e=>void h(e),disabled:i,className:`gap-2`,"aria-labelledby":Hn,"data-testid":`settings-sharing-radiogroup`,children:[(0,$.jsxs)(`label`,{htmlFor:`settings-sharing-shared`,className:`flex items-start gap-2 text-sm`,children:[(0,$.jsx)(W,{id:`settings-sharing-shared`,value:`shared`,"data-testid":`settings-sharing-shared`,className:`mt-1`}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`span`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`0Gd0NU`})}),(0,$.jsx)(`span`,{className:`block text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`dJw2_7`})})]})]}),(0,$.jsxs)(`label`,{htmlFor:`settings-sharing-local-only`,className:`flex items-start gap-2 text-sm`,children:[(0,$.jsx)(W,{id:`settings-sharing-local-only`,value:`local-only`,"data-testid":`settings-sharing-local-only`,className:`mt-1`}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`span`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`OgyJSr`})}),(0,$.jsx)(`span`,{className:`block text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`cZ_8zB`})})]})]})]}),e[18]=i,e[19]=v,e[20]=h,e[21]=n.mode,e[22]=S):S=e[22];let C;e[23]!==i||e[24]!==_||e[25]!==n.mode||e[26]!==n.skillsShared?(C=n.mode===`local-only`&&n.skillsShared?(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-2 rounded-md border border-muted-foreground/30 bg-muted/40 p-3 text-sm`,"data-testid":`settings-sharing-skills-exception`,children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(`span`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`Kiytqd`})}),(0,$.jsx)(`span`,{className:`block text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`K0FgsP`})})]}),(0,$.jsx)(x,{variant:`outline`,size:`sm`,disabled:i,onClick:()=>void _(),children:(0,$.jsx)(o,{id:`9uI_rE`})})]}):null,e[23]=i,e[24]=_,e[25]=n.mode,e[26]=n.skillsShared,e[27]=C):C=e[27];let w;e[28]===c?w=e[29]:(w=c===null?null:(0,$.jsxs)(`div`,{className:`space-y-2 rounded-md border border-destructive bg-destructive/10 p-3 text-sm`,role:`alert`,"data-testid":`settings-sharing-refusal`,children:[(0,$.jsx)(`p`,{className:`font-semibold`,children:(0,$.jsx)(o,{id:`Kgdbkt`})}),(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap font-mono text-xs leading-relaxed`,children:c.remediation}),(0,$.jsx)(x,{variant:`outline`,size:`sm`,onClick:()=>l(null),children:(0,$.jsx)(o,{id:`1QfxQT`})})]}),e[28]=c,e[29]=w);let T;e[30]!==c||e[31]!==n.mode||e[32]!==n.trackedUpstream?(T=n.trackedUpstream.length>0&&n.mode!==`no-git`&&c===null?(0,$.jsxs)(`div`,{className:`space-y-1 rounded-md border border-muted-foreground/30 bg-muted/40 p-3 text-sm`,"data-testid":`settings-sharing-tracked-info`,children:[(0,$.jsx)(`p`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`LhWYpm`})}),(0,$.jsx)(`ul`,{className:`list-disc pl-5 font-mono text-xs text-muted-foreground`,children:n.trackedUpstream.map(Kn)}),(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`1XSMhZ`,components:{0:(0,$.jsx)(`code`,{}),1:(0,$.jsx)(`code`,{})}})})]}):null,e[30]=c,e[31]=n.mode,e[32]=n.trackedUpstream,e[33]=T):T=e[33];let E;return e[34]!==T||e[35]!==S||e[36]!==C||e[37]!==w?(E=(0,$.jsxs)(`section`,{"aria-labelledby":Hn,className:`space-y-4`,"data-testid":`settings-sharing`,children:[b,S,C,w,T]}),e[34]=T,e[35]=S,e[36]=C,e[37]=w,e[38]=E):E=e[38],E}function Kn(e){return(0,$.jsx)(`li`,{children:e},e)}function qn(e){return e??{kind:`status`,mode:`no-git`,excluded:[],trackedUpstream:[],skillsShared:!1}}function Jn(e){let t=(0,Z.c)(35),{authQueryTransport:n,authTransport:r}=e,{_:i}=s(),a;t[0]===n?a=t[1]:(a=n??ut(),t[0]=n,t[1]=a);let c=a,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l={phase:`loading`},t[2]=l):l=t[2];let[u,d]=(0,Q.useState)(l),[f,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(null),v=(0,Q.useRef)(!1),y;t[3]===c?y=t[4]:(y=async function(){d({phase:`loading`});try{let e=await c.status();d({phase:`loaded`,result:e}),xt(e.authenticated)}catch(e){console.warn(`[AccountSection] GitHub status check failed`,e),d({phase:`check-failed`})}},t[3]=c,t[4]=y);let b=y,S;t[5]===b?S=t[6]:(S=()=>{b()},t[5]=b,t[6]=S);let C;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(C=[],t[7]=C):C=t[7],(0,Q.useEffect)(S,C);let w;t[8]!==i||t[9]!==b||t[10]!==c?(w=async function(){if(v.current)return;v.current=!0,p(!1),h(!0),_(null);let e=null;try{let t=c.signout?await c.signout():{ok:!1,error:i({id:`8cpOa8`})};t.ok||(e=t.error??i({id:`8cpOa8`}))}catch(t){console.warn(`[AccountSection] GitHub disconnect failed`,t),e=i({id:`8cpOa8`})}await b(),e&&_(e),h(!1),v.current=!1},t[8]=i,t[9]=b,t[10]=c,t[11]=w):w=t[11];let T=w,E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`h3`,{id:`settings-account-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`AeXO77`})}),t[12]=E):E=t[12];let D;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[E,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`E6lrpp`})})]}),t[13]=D):D=t[13];let O;t[14]!==g||t[15]!==m||t[16]!==T||t[17]!==b||t[18]!==u.phase||t[19]!==u.result?(O=u.phase===`loading`?(0,$.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-busy":`true`,className:`space-y-2 rounded-md border p-3`,"data-testid":`settings-account-loading`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`IWGfGF`})}),(0,$.jsx)(cn,{className:`h-4 w-40`}),(0,$.jsx)(cn,{className:`h-8 w-32`})]}):u.phase===`check-failed`?(0,$.jsxs)(`div`,{className:`space-y-2 rounded-md border p-3`,"data-testid":`settings-account-check-failed`,children:[(0,$.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`T_wG4n`})}),(0,$.jsx)(x,{variant:`outline`,size:`sm`,onClick:()=>void b(),children:(0,$.jsx)(o,{id:`KDw4GX`})})]}):u.result.authenticated?u.result.tier===`A`?(0,$.jsx)(Xn,{login:u.result.login}):(0,$.jsx)(Yn,{login:u.result.login,disconnecting:m,error:g,onDisconnect:()=>void T()}):(0,$.jsx)(Zn,{onConnect:()=>p(!0)}),t[14]=g,t[15]=m,t[16]=T,t[17]=b,t[18]=u.phase,t[19]=u.result,t[20]=O):O=t[20];let k;t[21]===b?k=t[22]:(k=e=>{p(e),e||b()},t[21]=b,t[22]=k);let A=u.phase===`loaded`?u.result.host:void 0,j=u.phase===`loaded`?u.result.ghAvailable:void 0,M;t[23]===b?M=t[24]:(M=()=>{b()},t[23]=b,t[24]=M);let N;t[25]!==f||t[26]!==r||t[27]!==k||t[28]!==A||t[29]!==j||t[30]!==M?(N=(0,$.jsx)(it,{open:f,onOpenChange:k,transport:r,host:A,ghAvailable:j,onSuccess:M}),t[25]=f,t[26]=r,t[27]=k,t[28]=A,t[29]=j,t[30]=M,t[31]=N):N=t[31];let P;return t[32]!==N||t[33]!==O?(P=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-account-title`,className:`space-y-3`,"data-testid":`settings-account`,children:[D,O,N]}),t[32]=N,t[33]=O,t[34]=P):P=t[34],P}function Yn(e){let t=(0,Z.c)(20),{login:n,disconnecting:r,error:i,onDisconnect:a}=e,s;t[0]===n?s=t[1]:(s=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`E_tNGD`,values:{login:n}})}),t[0]=n,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`nxlOpL`})}),t[2]=c):c=t[2];let l;t[3]===s?l=t[4]:(l=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[s,c]}),t[3]=s,t[4]=l);let u;t[5]===r?u=t[6]:(u=r?(0,$.jsx)(o,{id:`rppgXF`}):(0,$.jsx)(o,{id:`-K0AvT`}),t[5]=r,t[6]=u);let d;t[7]!==r||t[8]!==a||t[9]!==u?(d=(0,$.jsx)(x,{variant:`outline`,onClick:a,disabled:r,"aria-describedby":`settings-account-disconnect-caveat`,"data-testid":`settings-account-disconnect`,children:u}),t[7]=r,t[8]=a,t[9]=u,t[10]=d):d=t[10];let f;t[11]!==l||t[12]!==d?(f=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[l,d]}),t[11]=l,t[12]=d,t[13]=f):f=t[13];let p;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`p`,{id:`settings-account-disconnect-caveat`,className:`text-muted-foreground text-1sm`,"data-testid":`settings-account-disconnect-caveat`,children:(0,$.jsx)(o,{id:`msOK6I`})}),t[14]=p):p=t[14];let m;t[15]===i?m=t[16]:(m=i?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,"data-testid":`settings-account-disconnect-error`,children:i}):null,t[15]=i,t[16]=m);let h;return t[17]!==f||t[18]!==m?(h=(0,$.jsxs)(`div`,{className:`space-y-2 rounded-md border p-3`,"data-testid":`settings-account-connected`,children:[f,p,m]}),t[17]=f,t[18]=m,t[19]=h):h=t[19],h}function Xn(e){let t=(0,Z.c)(5),{login:n}=e,r;t[0]===n?r=t[1]:(r=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`E_tNGD`,values:{login:n}})}),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`ny6vNn`})}),t[2]=i):i=t[2];let a;return t[3]===r?a=t[4]:(a=(0,$.jsx)(`div`,{className:`rounded-md border p-3`,"data-testid":`settings-account-gh-cli`,children:(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[r,i]})}),t[3]=r,t[4]=a),a}function Zn(e){let t=(0,Z.c)(5),{onConnect:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`S33tz3`})}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[r,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`EJuO7B`})})]}),t[1]=i):i=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(o,{id:`5lWFkC`}),t[2]=a):a=t[2];let s;return t[3]===n?s=t[4]:(s=(0,$.jsx)(`div`,{className:`rounded-md border p-3`,"data-testid":`settings-account-disconnected`,children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,(0,$.jsx)(x,{onClick:n,"data-testid":`settings-account-connect`,children:a})]})}),t[3]=n,t[4]=s),s}function Qn(e){return e.kind===`editor`?`editor:${e.id}`:e.kind===`skill`?`skill:${e.id}`:`path`}function $n(e){let t=(0,Z.c)(11),{testId:n,children:r}=e,{_:i}=s(),a;t[0]===i?a=t[1]:(a=i({id:`2B6eYX`}),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(Ot,{className:`size-3.5`}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==n?(c=(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(x,{variant:`ghost`,size:`icon`,className:`mt-1.5 mr-1.5 h-6 w-6 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,"aria-label":a,"data-testid":n,children:o})}),t[3]=a,t[4]=n,t[5]=c):c=t[5];let l;t[6]===r?l=t[7]:(l=(0,$.jsx)(C,{side:`left`,className:`max-w-sm text-left`,children:(0,$.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:r})}),t[6]=r,t[7]=l);let u;return t[8]!==c||t[9]!==l?(u=(0,$.jsxs)(w,{children:[c,l]}),t[8]=c,t[9]=l,t[10]=u):u=t[10],u}function er(){let e=(0,Z.c)(38),{_:t}=s(),n=typeof window<`u`?window.okDesktop??null:null,[r,i]=(0,Q.useState)(null),[a,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d,f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{if(!n)return;let e=!1;return n.integrations.status().then(t=>{e||i(t)}).catch(()=>{e||c(!0)}),()=>{e=!0}},f=[n],e[0]=d,e[1]=f):(d=e[0],f=e[1]),(0,Q.useEffect)(d,f);let p;e[2]===t?p=e[3]:(p=async function(e,r){if(n){u(Qn(e));try{let t=await n.integrations.setComponent({component:e,enabled:r});i(t.status),t.ok||X.error(t.error)}catch(e){let n=e;X.error(t({id:`gfdqcY`,values:{0:n instanceof Error?n.message:String(n)}}))}u(null)}},e[2]=t,e[3]=p);let m=p,h;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`h3`,{id:`settings-ai-tools-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`_5qBNl`})}),e[4]=h):h=e[4];let g;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[h,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`mLAjyL`})})]}),e[5]=g):g=e[5];let _=g;if(!n||a){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`ai-tools-unavailable`,children:(0,$.jsx)(o,{id:`O4PnDd`})})]}),e[6]=t):t=e[6],t}if(r===null){let t;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsxs)(`div`,{className:`space-y-2`,"data-testid":`ai-tools-loading`,children:[(0,$.jsx)(cn,{className:`h-10 w-full`}),(0,$.jsx)(cn,{className:`h-10 w-full`}),(0,$.jsx)(cn,{className:`h-10 w-full`})]})]}),e[7]=t):t=e[7],t}let v=l!==null||!r.available,y=r.path.shellDetected||r.path.installed,b;e[8]===r.available?b=e[9]:(b=!r.available&&(0,$.jsx)(`p`,{className:`text-sm text-amber-600 dark:text-amber-400`,"data-testid":`ai-tools-read-only`,children:(0,$.jsx)(o,{id:`OplnBG`})}),e[8]=r.available,e[9]=b);let x;e[10]!==t||e[11]!==m||e[12]!==v||e[13]!==y||e[14]!==r.path.installed||e[15]!==r.path.rcFilesToTouch?(x=y&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`ALhMYW`})}),(0,$.jsxs)(`div`,{className:`flex items-start overflow-hidden rounded-md border border-border bg-card/50 hover:bg-accent`,children:[(0,$.jsxs)(V,{htmlFor:`ai-tools-path`,className:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,children:[(0,$.jsx)(I,{id:`ai-tools-path`,checked:r.path.installed,disabled:v,onCheckedChange:()=>void m({kind:`path`},!r.path.installed),className:`mt-0.5`,"data-testid":`ai-tools-path-checkbox`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,$.jsx)(o,{id:`Fsx78O`,components:{0:(0,$.jsx)(`code`,{className:`inline-code`})}})}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`ai-tools-path-status`,children:r.path.installed?t({id:`yhdqox`}):t({id:`04XyCH`,values:{0:r.path.rcFilesToTouch.join(`, `)}})})]})]}),(0,$.jsxs)($n,{testId:`ai-tools-path-info`,children:[(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`f9lQNJ`})}),r.path.rcFilesToTouch.map(nr),(0,$.jsx)(`p`,{className:`pt-1`,children:(0,$.jsx)(o,{id:`CWzc2T`,components:{0:(0,$.jsx)(`code`,{}),1:(0,$.jsx)(`code`,{})}})})]})]})]}),e[10]=t,e[11]=m,e[12]=v,e[13]=y,e[14]=r.path.installed,e[15]=r.path.rcFilesToTouch,e[16]=x):x=e[16];let S;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`psfGPX`})}),e[17]=S):S=e[17];let C;if(e[18]!==t||e[19]!==m||e[20]!==v||e[21]!==r.editors){let n;e[23]!==t||e[24]!==m||e[25]!==v?(n=e=>{let n=e.state===`installed`||e.state===`foreign`,r=v||e.state===`unmanageable`,i=e.state===`not-installed`&&!e.detected,a=`https://openknowledge.ai/docs/integrations/${Ie[e.id]}`,s=e.state===`installed`?t({id:`eQkgKV`}):e.state===`foreign`?t({id:`AczYxH`}):e.state===`unmanageable`?t({id:`LbmLyU`}):e.detected?t({id:`bBE5tC`}):null,c=e.state===`foreign`||e.state===`unmanageable`?`text-xs text-amber-600 dark:text-amber-400`:`text-xs text-muted-foreground`;return(0,$.jsxs)(`li`,{className:r?`flex items-start`:`flex items-start hover:bg-accent`,children:[(0,$.jsxs)(V,{htmlFor:`ai-tools-editor-${e.id}`,className:r?`flex flex-1 items-start gap-2.5 px-3 py-2.5 font-normal`:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,children:[(0,$.jsx)(I,{id:`ai-tools-editor-${e.id}`,checked:n,disabled:r,onCheckedChange:()=>void m({kind:`editor`,id:e.id},!n),className:`mt-0.5`,"data-testid":`ai-tools-editor-checkbox-${e.id}`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:e.label}),s!==null&&(0,$.jsx)(`span`,{className:c,"data-testid":`ai-tools-editor-status-${e.id}`,children:s})]})]}),i&&(0,$.jsxs)(`a`,{href:a,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>an(e,a),onAuxClick:e=>an(e,a),"aria-label":t({id:`D-Oh1s`,values:{0:e.label}}),className:`flex shrink-0 items-center gap-0.5 px-2 py-2.5 text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,"data-testid":`ai-tools-editor-status-${e.id}`,children:[(0,$.jsx)(o,{id:`P_bX4O`}),(0,$.jsx)(Xe,{className:`size-3`,"aria-hidden":!0})]}),(0,$.jsxs)($n,{testId:`ai-tools-editor-info-${e.id}`,children:[(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`J2eKUI`})}),(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e.configPath??t({id:`ndwmea`})})}),(0,$.jsx)(`p`,{className:`pt-1 opacity-70`,children:(0,$.jsx)(o,{id:`VIwCaD`})}),(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e.entryLocator})})]})]},e.id)},e[23]=t,e[24]=m,e[25]=v,e[26]=n):n=e[26],C=r.editors.map(n),e[18]=t,e[19]=m,e[20]=v,e[21]=r.editors,e[22]=C}else C=e[22];let w;e[27]===C?w=e[28]:(w=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[S,(0,$.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:C})]}),e[27]=C,e[28]=w);let T;e[29]!==m||e[30]!==v||e[31]!==r.skills?(T=r.skills.length>0&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`28B21t`})}),(0,$.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:r.skills.map(e=>(0,$.jsxs)(`li`,{className:`flex items-start hover:bg-accent`,children:[(0,$.jsxs)(V,{htmlFor:`ai-tools-skill-${e.id}`,className:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,children:[(0,$.jsx)(I,{id:`ai-tools-skill-${e.id}`,checked:e.installed,disabled:v,onCheckedChange:()=>void m({kind:`skill`,id:e.id},!e.installed),className:`mt-0.5`,"data-testid":`ai-tools-skill-checkbox-${e.id}`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,$.jsx)(`code`,{children:e.name})}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,"data-testid":`ai-tools-skill-status-${e.id}`,children:e.id===`discovery`?(0,$.jsx)(o,{id:`0inVGS`}):(0,$.jsx)(o,{id:`FXk_zY`})})]})]}),(0,$.jsxs)($n,{testId:`ai-tools-skill-info-${e.id}`,children:[(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`HSh8u_`})}),e.paths.map(tr)]})]},e.id))})]}),e[29]=m,e[30]=v,e[31]=r.skills,e[32]=T):T=e[32];let E;return e[33]!==T||e[34]!==b||e[35]!==x||e[36]!==w?(E=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-ai-tools-title`,className:`space-y-4`,children:[_,b,x,w,T]}),e[33]=T,e[34]=b,e[35]=x,e[36]=w,e[37]=E):E=e[37],E}function tr(e){return(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e})},e)}function nr(e){return(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e})},e)}function rr(e){return{chrome:e.sidebar,surface:e.background,bar:e.primary,line:e.border,dots:[e[`syntax-string`],e[`syntax-keyword`],e[`syntax-atom`]]}}function ir(e,t,n){return e.id===`custom`?rr(Fe(rn(Qt(t)))):e.base?rr(Fe(e.base)):rr($t(n))}function ar(e){let t=(0,Z.c)(36),{theme:n,customSeed:r,defaultMode:i}=e,a,o,s,c,l,u,d,f,p;t[0]!==r||t[1]!==i||t[2]!==n?(a=ir(n,r,i),u=!0,d=`aspect-[4/3] w-full overflow-hidden rounded-md border`,f={backgroundColor:a.surface,borderColor:a.line},p=(0,$.jsxs)(`div`,{className:`flex h-1/3 items-center gap-1 px-1.5`,style:{backgroundColor:a.chrome,borderBottom:`1px solid ${a.line}`},children:[(0,$.jsx)(`span`,{className:`h-1.5 w-5 rounded-full`,style:{backgroundColor:a.bar}}),(0,$.jsx)(`span`,{className:`h-1.5 flex-1 rounded-full opacity-50`,style:{backgroundColor:a.line}})]}),l=`flex h-2/3`,o=`flex w-1/4 flex-col items-center justify-center gap-1`,s={backgroundColor:a.chrome,borderRight:`1px solid ${a.line}`},c=a.dots.map(or),t[0]=r,t[1]=i,t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p):(a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11]);let m;t[12]!==o||t[13]!==s||t[14]!==c?(m=(0,$.jsx)(`div`,{className:o,style:s,children:c}),t[12]=o,t[13]=s,t[14]=c,t[15]=m):m=t[15];let h;t[16]===a.dots[1]?h=t[17]:(h=(0,$.jsx)(`span`,{className:`h-1.5 w-3/4 rounded-full`,style:{backgroundColor:a.dots[1]}}),t[16]=a.dots[1],t[17]=h);let g;t[18]===a.line?g=t[19]:(g=(0,$.jsx)(`span`,{className:`h-1.5 w-1/2 rounded-full opacity-60`,style:{backgroundColor:a.line}}),t[18]=a.line,t[19]=g);let _;t[20]===a.dots[0]?_=t[21]:(_=(0,$.jsx)(`span`,{className:`h-1.5 w-2/3 rounded-full`,style:{backgroundColor:a.dots[0]}}),t[20]=a.dots[0],t[21]=_);let v;t[22]!==h||t[23]!==g||t[24]!==_?(v=(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col justify-center gap-1 px-1.5`,children:[h,g,_]}),t[22]=h,t[23]=g,t[24]=_,t[25]=v):v=t[25];let y;t[26]!==v||t[27]!==l||t[28]!==m?(y=(0,$.jsxs)(`div`,{className:l,children:[m,v]}),t[26]=v,t[27]=l,t[28]=m,t[29]=y):y=t[29];let b;return t[30]!==y||t[31]!==u||t[32]!==d||t[33]!==f||t[34]!==p?(b=(0,$.jsxs)(`div`,{"aria-hidden":u,className:d,style:f,children:[p,y]}),t[30]=y,t[31]=u,t[32]=d,t[33]=f,t[34]=p,t[35]=b):b=t[35],b}function or(e,t){return(0,$.jsx)(`span`,{className:`size-1.5 rounded-full`,style:{backgroundColor:e}},t)}function sr(e){let t=(0,Z.c)(11),{value:n,onSelect:r,customSeed:i,defaultMode:a,id:o,"aria-label":c,"aria-describedby":l}=e,u=a===void 0?`light`:a,{_:d}=s(),f=Re.some(e=>e.id===n)?n:`default`,p;t[0]!==d||t[1]!==i||t[2]!==u?(p=Re.map(e=>(0,$.jsxs)(G,{value:e.id,className:h(`group/tile flex flex-col gap-1.5 rounded-lg border-2 border-transparent p-1 text-left outline-none`,`hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40`,`data-checked:border-primary`),children:[(0,$.jsx)(ar,{theme:e,customSeed:i,defaultMode:u}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between px-0.5`,children:[(0,$.jsx)(`span`,{className:`text-1sm font-medium text-foreground`,children:e.label}),(0,$.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wide text-muted-foreground`,children:e.id===`custom`?Xt(Qt(i))===`dark`?d({id:`pvnfJD`}):d({id:`1njn7W`}):e.kind===`system`?d({id:`R9Khdg`}):e.kind===`light`?d({id:`1njn7W`}):d({id:`pvnfJD`})})]})]},e.id)),t[0]=d,t[1]=i,t[2]=u,t[3]=p):p=t[3];let m;return t[4]!==l||t[5]!==c||t[6]!==o||t[7]!==r||t[8]!==f||t[9]!==p?(m=(0,$.jsx)(re,{id:o,"aria-label":c,"aria-describedby":l,value:f,onValueChange:r,className:`grid w-full grid-cols-2 gap-2 sm:grid-cols-3`,children:p}),t[4]=l,t[5]=c,t[6]=o,t[7]=r,t[8]=f,t[9]=p,t[10]=m):m=t[10],m}function cr(e,t){if(e.length===0)throw Error(`buildPatch: path must be non-empty`);let[n,...r]=e;return r.length===0?{[String(n)]:t}:{[String(n)]:cr(r,t)}}function lr(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(e?.type===`default`){let t=e.defaultValue;return typeof t==`function`?t():t}let n=t?._zod?.def?.innerType;if(n===void 0)return;t=n}}function ur(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(!e)return;if(e.type===`default`||e.type===`optional`||e.type===`nullable`){t=e.innerType;continue}return e.type}}function dr(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(!e)return;if(e.type===`enum`)return e.entries?Object.values(e.entries):void 0;if(e.innerType!==void 0){t=e.innerType;continue}return}}function fr(e){if(!Le(e)||e.code!==`SCHEMA_INVALID`)return null;let t=e.issues[0];return!t||t.path.length===0?null:t.path.map(String).join(`.`)}function pr(){let e=(0,Z.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(cn,{className:`h-5 w-32`}),n=(0,$.jsx)(cn,{className:`h-4 w-64`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`div`,{className:`space-y-3`,children:[t,n,(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(cn,{className:`h-9 w-full`}),(0,$.jsx)(cn,{className:`h-9 w-full`})]})]}),e[2]=r):r=e[2],r}function mr({field:e,scope:t,commitField:n,isFlashed:r}){"use no memo";let{_:i}=s(),a=jn(),c=Se(ze,e.path),l=c?ur(c):void 0,u=c?lr(c):void 0,d=c?dr(c):void 0,f=c?Ve(c):void 0,p=f?.scope===`project`&&t!==`project`||f?.scope===`user`&&t!==`user`,m=e.path.join(`.`),g=i(e.label),[_,v]=(0,Q.useState)(!1),y=(0,Q.useRef)(null);(0,Q.useEffect)(()=>()=>{y.current&&clearTimeout(y.current)},[]);let b=()=>{v(!0),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>v(!1),1200)},T=()=>{let e=n(m);return e&&b(),e},E=()=>a.getFieldState(m).isDirty?T():!0,D=()=>{let e=u===void 0?null:u;a.setValue(m,e,{shouldDirty:!1}),T()},O=h(`relative`,r&&`animate-settings-flash`);return(0,$.jsx)(On,{control:a.control,name:m,render:({field:n})=>{let r=!p&&(u!==void 0||n.value!==void 0);return(0,$.jsxs)(En,{className:O,"data-field":e.path.join(`.`),"data-scope":t,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(An,{className:`text-sm font-medium`,children:g}),r?(0,$.jsxs)(w,{children:[(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(x,{variant:`ghost`,size:`icon`,className:`h-5 w-5 text-muted-foreground opacity-60 hover:opacity-100`,onClick:D,"aria-label":i({id:`lhjq3G`,values:{labelText:g}}),children:(0,$.jsx)(At,{className:`size-3.5`})})}),(0,$.jsx)(C,{children:(0,$.jsx)(o,{id:`L-rMC9`})})]}):null]}),e.description?(0,$.jsx)(Mn,{className:`text-muted-foreground text-1sm`,children:i(e.description)}):null,(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(kn,{children:(0,$.jsx)(hr,{field:e,ctl:n,typeTag:l,enumOptions:d,onCommit:E})}),(0,$.jsx)(yr,{visible:_,srOnly:e.control===`theme-tiles`})]}),(0,$.jsx)(Nn,{"data-field-error":e.path.join(`.`)})]})}})}function hr({field:e,ctl:t,typeTag:n,enumOptions:r,onCommit:i,...a}){"use no memo";let{_:o}=s(),{setTheme:c,systemTheme:u}=l(),d=tn()?.merged??null;if(e.control===`theme-tiles`){let{id:n,...r}=a,s=d?.appearance?.customTheme,l=d?.appearance?.theme,f=l===`light`||l===`dark`?l:u===`dark`?`dark`:`light`;return(0,$.jsx)(sr,{...r,id:n,value:typeof t.value==`string`?t.value:`default`,customSeed:s,defaultMode:f,"aria-label":o(e.label),onSelect:e=>{if(en(e,s),e===`custom`)c(Xt(Qt(s))===`dark`?`dark`:`light`);else{let t=Be(e);t&&c(t)}t.onChange(e),i()}})}if(n===`boolean`)return(0,$.jsx)(q,{...a,checked:!!t.value,ref:t.ref,onCheckedChange:e=>{t.onChange(e),i()},onBlur:t.onBlur});if(n===`enum`&&r&&r.length>0&&(e.control===`enum-toggle`||r.length<=4)){let{id:n,...s}=a,l=e.path[0]===`appearance`&&e.path[1]===`theme`;return(0,$.jsx)(ie,{...s,type:`single`,value:typeof t.value==`string`?t.value:``,ref:t.ref,onValueChange:e=>{e&&(l&&c(e),t.onChange(e),i())},onBlur:t.onBlur,variant:`segmented`,size:`sm`,spacing:1,className:`bg-muted dark:bg-background p-0.5 rounded-lg`,"aria-label":o(e.label),children:r.map((e,t)=>(0,$.jsx)(J,{value:e,id:t===0?n:void 0,className:`text-1sm capitalize`,children:e},e))})}return n===`number`||n===`int`?(0,$.jsx)(_r,{ctl:t,onCommit:i,...a}):n===`array`?(0,$.jsx)(vr,{ctl:t,onCommit:i,...a}):(0,$.jsx)(gr,{ctl:t,onCommit:i,...a})}function gr({ctl:e,onCommit:t,...n}){"use no memo";return(0,$.jsx)(Lt,{...n,value:typeof e.value==`string`?e.value:``,ref:e.ref,onChange:t=>e.onChange(t.target.value),onBlur:()=>{e.onBlur(),t()},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),t())},className:`h-8 text-sm`})}function _r({ctl:e,onCommit:t,...n}){"use no memo";let[r,i]=(0,Q.useState)(e.value===void 0?``:String(e.value)),a=(0,Q.useRef)(e.value);(0,Q.useEffect)(()=>{a.current!==e.value&&(i(e.value===void 0?``:String(e.value)),a.current=e.value)},[e.value]);let o=()=>{let n=Number(r);if(!Number.isFinite(n)){e.onChange(r),t();return}e.onChange(n),t(),a.current=n};return(0,$.jsx)(Lt,{...n,type:`number`,value:r,ref:e.ref,onChange:e=>i(e.target.value),onBlur:()=>{e.onBlur(),o()},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),o())},className:`h-8 w-28 text-sm tabular-nums`})}function vr({ctl:e,onCommit:t,...n}){"use no memo";let r=Array.isArray(e.value)?e.value.join(`
2
+ `):``,[i,a]=(0,Q.useState)(r),o=(0,Q.useRef)(r);(0,Q.useEffect)(()=>{let t=Array.isArray(e.value)?e.value.join(`
3
+ `):``;t!==o.current&&(a(t),o.current=t)},[e.value]);let s=()=>{let n=i.split(`
4
+ `).map(e=>e.trim()).filter(e=>e.length>0);e.onChange(n),t(),o.current=n.join(`
5
+ `)};return(0,$.jsx)(on,{...n,value:i,ref:e.ref,onChange:e=>a(e.target.value),onBlur:()=>{e.onBlur(),s()},rows:Math.max(2,Math.min(6,i.split(`
6
+ `).length)),className:`field-sizing-fixed min-h-16 rounded-md bg-background px-3 py-1.5 font-mono text-xs md:text-xs dark:bg-background`})}function yr(e){let t=(0,Z.c)(5),{visible:n,srOnly:r}=e,i=r===void 0?!1:r,a;t[0]!==i||t[1]!==n?(a=n?(0,$.jsxs)($.Fragment,{children:[i?null:(0,$.jsx)(Qe,{"aria-hidden":`true`,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`idD8Ev`})})]}):null,t[0]=i,t[1]=n,t[2]=a):a=t[2];let s;return t[3]===a?s=t[4]:(s=(0,$.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`text-emerald-600`,children:a}),t[3]=a,t[4]=s),s}function br(e){let t=(0,Z.c)(14),n;t[0]===e?n=t[1]:(n=e.current(),t[0]=e,t[1]=n);let r=n,i;t[2]===r?i=t[3]:(i={defaultValues:r,mode:`onBlur`},t[2]=r,t[3]=i);let a=Dn(i),o,s;t[4]!==e||t[5]!==a?(o=()=>e.subscribe(e=>{xr(a,e)}),s=[e,a],t[4]=e,t[5]=a,t[6]=o,t[7]=s):(o=t[6],s=t[7]),(0,Q.useEffect)(o,s);let c;t[8]!==e||t[9]!==a?(c=t=>Sr(a,e,t),t[8]=e,t[9]=a,t[10]=c):c=t[10];let l=c,u;return t[11]!==l||t[12]!==a?(u={form:a,commitField:l},t[11]=l,t[12]=a,t[13]=u):u=t[13],u}function xr(e,t){e.reset(t,{keepDirtyValues:!0,keepDirty:!0,keepTouched:!0})}function Sr(e,t,n){let r=e.getValues(n),i=cr(Tr(n),r),a=t.patch(i);if(a.ok)return e.clearErrors(n),e.resetField(n,{defaultValue:r,keepError:!1}),!0;if(Le(a.error)&&a.error.code===`SCHEMA_INVALID`&&a.error.issues.length>0){e.clearErrors(n);for(let t of a.error.issues){let r=t.path.length>0?t.path.map(String).join(`.`):n;e.setError(r,{type:`config-binding`,message:t.message})}}else e.setError(n,{type:`config-binding`,message:Cr(a.error,n)});return!1}function Cr(e,t){if(Le(e)&&e.code===`SCHEMA_INVALID`){let n=e.issues.find(e=>wr(e,t));if(n)return n.message}return je(e)}function wr(e,t){return e.path.map(String).join(`.`)===t}function Tr(e){return e.split(`.`)}var Er=`content.attachmentFolderPath`,Dr=`attachments`;function Or(e){let t=Ue(e);return t===`./`?`same-folder`:t===`/`?`content-root`:t.startsWith(`./`)?`current-folder-subfolder`:`content-root-folder`}function kr(e){let t=Ue(e);return t===`./`||t===`/`?Dr:t.startsWith(`./`)?t.slice(2)||Dr:t}function Ar(e){return e.trim().replace(/^(?:\.\/)+/,``).replace(/\/{2,}/g,`/`).replace(/\/+$/g,``)}function jr(e,t){let n=Ar(t)||Dr;return e===`same-folder`?`./`:e===`content-root`?`/`:e===`current-folder-subfolder`?`./${n}`:n}function Mr(){let e=(0,Z.c)(4),{projectBinding:t,projectConfig:n,projectSynced:r}=Yt();if(!t||!r||!n){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(pr,{}),e[0]=t):t=e[0],t}let i=n.content.attachmentFolderPath??`./`,a;return e[1]!==i||e[2]!==t?(a=(0,$.jsx)(Nr,{binding:t,value:i},i),e[1]=i,e[2]=t,e[3]=a):a=e[3],a}function Nr(e){let t=(0,Z.c)(50),{binding:n,value:r}=e,{_:i}=s(),a;t[0]===r?a=t[1]:(a=()=>Or(r),t[0]=r,t[1]=a);let[c,l]=(0,Q.useState)(a),u;t[2]===r?u=t[3]:(u=()=>kr(r),t[2]=r,t[3]=u);let[d,f]=(0,Q.useState)(u),[p,m]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1),b=(0,Q.useRef)(null),x=(0,Q.useRef)(null),S,C;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{b.current&&clearTimeout(b.current),x.current&&clearTimeout(x.current)},C=[],t[4]=S,t[5]=C):(S=t[4],C=t[5]),(0,Q.useEffect)(S,C);let w,T;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>_t(e=>{if(e.docName!==`__config__/project`||fr(e.error)!==Er)return;let t=Cr(e.error,Er);X.error(je(e.error),{duration:8e3}),m(t),y(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{y(!1),m(null)},600)}),T=[],t[6]=w,t[7]=T):(w=t[6],T=t[7]),(0,Q.useEffect)(w,T);let E;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(E=()=>{_(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>_(!1),1200)},t[8]=E):E=t[8];let D=E,O;t[9]!==i||t[10]!==n?(O=e=>{let t=n.patch({content:{attachmentFolderPath:e}});if(t.ok){m(null),D();return}let r=Cr(t.error,Er);m(r),X.error(i({id:`eQxm13`,values:{detail:r}}))},t[9]=i,t[10]=n,t[11]=O):O=t[11];let k=O,A;t[12]!==k||t[13]!==d?(A=e=>{if(e!==`same-folder`&&e!==`content-root`&&e!==`current-folder-subfolder`&&e!==`content-root-folder`)return;let t=e,n=t===`current-folder-subfolder`||t===`content-root-folder`?d||Dr:d;l(t),f(n),k(jr(t,n))},t[12]=k,t[13]=d,t[14]=A):A=t[14];let j=A,M;t[15]!==k||t[16]!==d||t[17]!==c?(M=()=>{let e=jr(c,d);f(kr(e)),k(e)},t[15]=k,t[16]=d,t[17]=c,t[18]=M):M=t[18];let N=M,P=c===`current-folder-subfolder`||c===`content-root-folder`,F;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(`h3`,{id:`settings-attachments-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`w_Sphq`})}),t[19]=F):F=t[19];let I;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[F,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`Hnl9nT`})})]}),t[20]=I):I=t[20];let L=v&&`animate-settings-flash`,R;t[21]===L?R=t[22]:(R=h(`rounded-md border p-3`,L),t[21]=L,t[22]=R);let z;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(`div`,{className:`text-sm font-medium`,id:`settings-attachments-location-label`,children:(0,$.jsx)(o,{id:`AsqRE_`})}),t[23]=z):z=t[23];let B;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[z,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`vppAju`})})]}),t[24]=B):B=t[24];let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(U,{"aria-labelledby":`settings-attachments-location-label`,"data-testid":`settings-attachments-mode`,size:`sm`,children:(0,$.jsx)(te,{})}),t[25]=V):V=t[25];let re;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsx)(H,{value:`same-folder`,children:(0,$.jsx)(o,{id:`Q7W-mC`})}),t[26]=re):re=t[26];let W;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(H,{value:`content-root`,children:(0,$.jsx)(o,{id:`yWSvcf`})}),t[27]=W):W=t[27];let G;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,$.jsx)(H,{value:`current-folder-subfolder`,children:(0,$.jsx)(o,{id:`0YUS3Q`})}),t[28]=G):G=t[28];let K;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,$.jsxs)(ee,{children:[re,W,G,(0,$.jsx)(H,{value:`content-root-folder`,children:(0,$.jsx)(o,{id:`qAx7xG`})})]}),t[29]=K):K=t[29];let q;t[30]!==c||t[31]!==j?(q=(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_minmax(16rem,18rem)] sm:items-start`,children:[B,(0,$.jsxs)(ne,{value:c,onValueChange:j,children:[V,K]})]}),t[30]=c,t[31]=j,t[32]=q):q=t[32];let J;t[33]!==i||t[34]!==N||t[35]!==d||t[36]!==P?(J=P?(0,$.jsxs)(`div`,{className:`mt-3 max-w-sm space-y-1`,children:[(0,$.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:`settings-attachments-folder-input`,children:(0,$.jsx)(o,{id:`kNqMMd`})}),(0,$.jsx)(Lt,{id:`settings-attachments-folder-input`,value:d,placeholder:i({id:`OeAl1e`}),onChange:e=>f(e.target.value),onBlur:N,onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),N())},className:`h-8 text-sm`,"data-testid":`settings-attachments-folder`})]}):null,t[33]=i,t[34]=N,t[35]=d,t[36]=P,t[37]=J):J=t[37];let ie;t[38]===p?ie=t[39]:(ie=p?(0,$.jsx)(`p`,{className:`text-1sm text-destructive`,"data-field-error":Er,role:`alert`,children:p}):null,t[38]=p,t[39]=ie);let ae;t[40]===g?ae=t[41]:(ae=(0,$.jsx)(yr,{visible:g}),t[40]=g,t[41]=ae);let oe;t[42]!==ie||t[43]!==ae?(oe=(0,$.jsxs)(`div`,{className:`mt-2 flex min-h-5 items-center gap-2`,children:[ie,ae]}),t[42]=ie,t[43]=ae,t[44]=oe):oe=t[44];let Y;return t[45]!==R||t[46]!==q||t[47]!==J||t[48]!==oe?(Y=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-attachments-title`,className:`space-y-3`,"data-testid":`settings-attachments`,children:[I,(0,$.jsxs)(`div`,{className:R,"data-field":Er,"data-scope":`project`,children:[q,J,oe]})]}),t[45]=R,t[46]=q,t[47]=J,t[48]=oe,t[49]=Y):Y=t[49],Y}function Pr(e){let t=(0,Z.c)(21),{icon:n,name:r,hint:i,checked:a,disabled:o,ariaLabel:s,testId:c,onToggle:l}=e,u;t[0]===n?u=t[1]:(u=(0,$.jsx)(`span`,{className:`flex h-5 shrink-0 items-center`,children:n}),t[0]=n,t[1]=u);let d;t[2]===r?d=t[3]:(d=(0,$.jsx)(`span`,{className:`truncate text-sm leading-5`,children:r}),t[2]=r,t[3]=d);let f;t[4]===i?f=t[5]:(f=i?(0,$.jsx)(`span`,{className:`truncate text-muted-foreground text-1sm`,children:i}):null,t[4]=i,t[5]=f);let p;t[6]!==d||t[7]!==f?(p=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[d,f]}),t[6]=d,t[7]=f,t[8]=p):p=t[8];let m;t[9]!==u||t[10]!==p?(m=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2.5`,children:[u,p]}),t[9]=u,t[10]=p,t[11]=m):m=t[11];let h;t[12]!==s||t[13]!==a||t[14]!==o||t[15]!==l||t[16]!==c?(h=(0,$.jsx)(q,{checked:a,disabled:o,onCheckedChange:l,"aria-label":s,"data-testid":c}),t[12]=s,t[13]=a,t[14]=o,t[15]=l,t[16]=c,t[17]=h):h=t[17];let g;return t[18]!==m||t[19]!==h?(g=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-2.5`,children:[m,h]}),t[18]=m,t[19]=h,t[20]=g):g=t[20],g}function Fr(e){let t=(0,Z.c)(9),{label:n,children:r,labelId:i}=e,a;t[0]!==n||t[1]!==i?(a=(0,$.jsx)(`h4`,{id:i,className:`mb-2 font-mono text-muted-foreground text-xs uppercase tracking-wide`,children:n}),t[0]=n,t[1]=i,t[2]=a):a=t[2];let o;t[3]===r?o=t[4]:(o=(0,$.jsx)(`div`,{className:`divide-y overflow-hidden rounded-md border`,children:r}),t[3]=r,t[4]=o);let s;return t[5]!==i||t[6]!==a||t[7]!==o?(s=(0,$.jsxs)(`section`,{"aria-labelledby":i,children:[a,o]}),t[5]=i,t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function Ir(){let e=(0,Z.c)(50),{_:t}=s(),n=le(),r=ae(),{states:a,refresh:o}=y(),l=v(),[u,d]=(0,Q.useState)(``),[f,p]=(0,Q.useState)(!1),m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={queryKey:[`acp-catalog`],queryFn:zr,staleTime:3e5},e[0]=m):m=e[0];let h=c(m),g;e[1]===o?g=e[2]:(g=()=>{o()},e[1]=o,e[2]=g);let _=(0,Q.useEffectEvent)(g),b;e[3]===_?b=e[4]:(b=()=>{_()},e[3]=_,e[4]=b);let S;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=[],e[5]=S):S=e[5],(0,Q.useEffect)(b,S);let C=h.data?.agents,w;e[6]===r?w=e[7]:(w=new Set(r.map(Rr)),e[6]=r,e[7]=w);let T=w,E;e[8]===l?.installedClis?E=e[9]:(E=l?.installedClis??{},e[8]=l?.installedClis,e[9]=E);let D=E,O;if(e[10]!==t||e[11]!==h||e[12]!==C||e[13]!==D||e[14]!==n||e[15]!==u||e[16]!==T||e[17]!==f||e[18]!==a||e[19]!==l){let r=u.trim().toLowerCase(),o=e=>r===``||e.toLowerCase().includes(r),s=(C??[]).filter(e=>o(e.name)),c=l===null?[]:xe.filter(e=>o(Ne[e].displayName)),m=ue.filter(e=>o(e.displayName)),g=r!==``,_=!h.isLoading&&!h.isError,v=g&&_&&s.length===0&&c.length===0&&m.length===0,y=!g||h.isLoading||h.isError||s.length>0,b=l!==null&&(!g||c.length>0),S=!g||m.length>0,w;e[21]!==n||e[22]!==T?(w=e=>{let t=T.has(`${e.source}:${e.id}`),r=e.supported===!0&&e.harness?.availability===`present`;return fe(n,e.source,e.id,t||r,e.supported)},e[21]=n,e[22]=T,e[23]=w):w=e[23];let E=w,k;e[24]===E?k=e[25]:(k=e=>e.harness!==void 0||E(e),e[24]=E,e[25]=k);let A=s.filter(k),j=g||f?s:A,M=g?0:s.length-A.length,N;e[26]===t?N=e[27]:(N=t({id:`jRAGrQ`}),e[26]=t,e[27]=N);let P;e[28]===N?P=e[29]:(P=(0,$.jsx)(`h3`,{id:`settings-configure-agents-title`,className:`font-semibold text-base`,children:N}),e[28]=N,e[29]=P);let F;e[30]===t?F=e[31]:(F=t({id:`OcBurH`}),e[30]=t,e[31]=F);let I;e[32]===F?I=e[33]:(I=(0,$.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:F}),e[32]=F,e[33]=I);let L;e[34]!==P||e[35]!==I?(L=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[P,I]}),e[34]=P,e[35]=I,e[36]=L):L=e[36];let R;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(i,{className:`-translate-y-1/2 absolute top-1/2 left-2.5 size-4 text-muted-foreground`,"aria-hidden":`true`}),e[37]=R):R=e[37];let z;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>d(e.target.value),e[38]=z):z=e[38];let B;e[39]===t?B=e[40]:(B=t({id:`-7s4fw`}),e[39]=t,e[40]=B);let V;e[41]===t?V=e[42]:(V=t({id:`-7s4fw`}),e[41]=t,e[42]=V);let H;e[43]!==u||e[44]!==B||e[45]!==V?(H=(0,$.jsxs)(`div`,{className:`relative`,children:[R,(0,$.jsx)(Lt,{value:u,onChange:z,placeholder:B,"aria-label":V,className:`pl-8`,"data-testid":`configure-agents-search`})]}),e[43]=u,e[44]=B,e[45]=V,e[46]=H):H=e[46];let ee;e[47]!==t||e[48]!==v?(ee=v?(0,$.jsx)(`p`,{className:`py-6 text-center text-muted-foreground text-sm`,"data-testid":`configure-agents-no-results`,children:t({id:`Nay2Yr`})}):null,e[47]=t,e[48]=v,e[49]=ee):ee=e[49],O=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-configure-agents-title`,className:`space-y-6`,"data-testid":`settings-configure-agents`,children:[L,H,ee,y?(0,$.jsx)(Fr,{label:(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[t({id:`RXEbZy`}),(0,$.jsx)(he,{})]}),labelId:`settings-configure-agents-in-app`,children:h.isLoading?(0,$.jsxs)(`div`,{className:`flex items-center justify-center gap-2 px-3 py-6 text-muted-foreground text-sm`,children:[(0,$.jsx)(kt,{className:`size-4 animate-spin`,"aria-hidden":`true`}),t({id:`ucXZ0k`})]}):h.isError?(0,$.jsxs)(`div`,{className:`flex flex-col items-center gap-2 px-3 py-6 text-center text-muted-foreground text-sm`,children:[(0,$.jsx)(Vn,{className:`size-5`,"aria-hidden":`true`}),(0,$.jsx)(`span`,{children:t({id:`FqGWeR`})}),(0,$.jsx)(x,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>void h.refetch(),children:t({id:`6gRgw8`})})]}):(C?.length??0)===0?(0,$.jsx)(`p`,{className:`px-3 py-6 text-center text-muted-foreground text-sm`,children:t({id:`QQbwzK`})}):(0,$.jsxs)($.Fragment,{children:[j.map(e=>{let r=E(e),i=e.supported?e.description:t({id:`5jEnaB`});return(0,$.jsx)(Pr,{icon:(0,$.jsx)(Ze,{agentId:e.id,iconUrl:e.iconUrl,className:`size-4`}),name:e.name,hint:i,checked:r,disabled:!e.supported,ariaLabel:t({id:`FZtBeR`,values:{0:e.name}}),testId:`configure-agents-in-app-${e.source}:${e.id}`,onToggle:t=>{t?(Y({source:e.source,id:e.id,name:e.name,supported:e.supported,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}},{makeDefault:!1}),_e(de(e.source,e.id),!0)):(_e(de(e.source,e.id),!1),ve(`${e.source}:${e.id}`,e=>fe(n,e.source,e.id,!0,e.supported)))}},`${e.source}:${e.id}`)}),M>0?(0,$.jsx)(x,{type:`button`,variant:`ghost`,onClick:()=>p(Lr),className:`w-full justify-center rounded-none font-normal text-1sm text-muted-foreground`,"data-testid":`configure-agents-in-app-show-more`,children:t(f?{id:`6lGV3K`}:{id:`np9pbC`,values:{inAppHiddenCount:M}})}):null]})}):null,b?(0,$.jsx)(Fr,{label:t({id:`ALhMYW`}),labelId:`settings-configure-agents-terminal`,children:c.map(e=>{let{displayName:r}=Ne[e],i=D[e]===!1;return(0,$.jsx)(Pr,{icon:(0,$.jsx)(pe,{id:oe(e),className:`size-4`,"aria-hidden":`true`}),name:t({id:`QYfQdv`,values:{displayName:r}}),hint:i?t({id:`5SwVv1`}):void 0,checked:me(n,e,D),ariaLabel:t({id:`27TLNq`,values:{displayName:r}}),testId:`configure-agents-terminal-${e}`,onToggle:t=>_e(ce(e),t)},e)})}):null,S?(0,$.jsx)(Fr,{label:t({id:`BBqGS9`}),labelId:`settings-configure-agents-desktop`,children:m.map(e=>{let r=a[e.id]?.installed??null;return(0,$.jsx)(Pr,{icon:(0,$.jsx)(pe,{id:e.id,className:`size-4`,"aria-hidden":`true`}),name:e.displayName,hint:r===!1?t({id:`5SwVv1`}):void 0,checked:ge(n,e.id),ariaLabel:t({id:`FZtBeR`,values:{0:e.displayName}}),testId:`configure-agents-desktop-${e.id}`,onToggle:t=>_e(se(e.id),t)},e.id)})}):null]}),e[10]=t,e[11]=h,e[12]=C,e[13]=D,e[14]=n,e[15]=u,e[16]=T,e[17]=f,e[18]=a,e[19]=l,e[20]=O}else O=e[20];return O}function Lr(e){return!e}function Rr(e){return`${e.source}:${e.id}`}function zr(e){let{signal:t}=e;return ye(t)}function Br(){let e=(0,Z.c)(35),{_:t}=s(),{projectConfig:n,projectSynced:r,projectBinding:i}=Yt(),a=r&&i!==null,c=n?.validation?.links??`warning`,l=n?.validation?.fileTreeIndicators!==!1,u;e[0]!==t||e[1]!==i?(u=function(e){if(i===null){X.error(t({id:`dVaXnv`}));return}let n=i.patch({validation:e});n.ok||X.error(t({id:`NrFwux`,values:{0:je(n.error)}}))},e[0]=t,e[1]=i,e[2]=u):u=e[2];let d=u,f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`h3`,{id:`settings-content-rules-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`OPOiKn`})}),e[3]=f):f=e[3];let p;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[f,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`FTBN5g`})})]}),e[4]=p):p=e[4];let m;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(V,{htmlFor:`settings-content-rules-links`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`8ruqQi`})}),e[5]=m):m=e[5];let h;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[m,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`N-IonL`})})]}),e[6]=h):h=e[6];let g;e[7]===d?g=e[8]:(g=e=>d({links:e}),e[7]=d,e[8]=g);let _=!a,v;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(U,{id:`settings-content-rules-links`,className:`w-36 shrink-0`,"data-testid":`settings-content-rules-links`,children:(0,$.jsx)(te,{})}),e[9]=v):v=e[9];let y;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(H,{value:`off`,children:(0,$.jsx)(o,{id:`Nwbs0q`})}),e[10]=y):y=e[10];let b;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(H,{value:`warning`,children:(0,$.jsx)(o,{id:`r6y-jM`})}),e[11]=b):b=e[11];let x;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsxs)(ee,{children:[y,b,(0,$.jsx)(H,{value:`error`,children:(0,$.jsx)(o,{id:`SlfejT`})})]}),e[12]=x):x=e[12];let S;e[13]!==c||e[14]!==g||e[15]!==_?(S=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-2`,children:[h,(0,$.jsxs)(ne,{value:c,onValueChange:g,disabled:_,children:[v,x]})]}),e[13]=c,e[14]=g,e[15]=_,e[16]=S):S=e[16];let C;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(V,{htmlFor:`settings-content-rules-indicators`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`x3kWeu`})}),e[17]=C):C=e[17];let w;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[C,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`ktspdq`})})]}),e[18]=w):w=e[18];let T=!a,E;e[19]===d?E=e[20]:(E=e=>d({fileTreeIndicators:e}),e[19]=d,e[20]=E);let D;e[21]!==t||e[22]!==l?(D=t(l?{id:`U9tm58`}:{id:`uR2YT3`}),e[21]=t,e[22]=l,e[23]=D):D=e[23];let O;e[24]!==l||e[25]!==T||e[26]!==E||e[27]!==D?(O=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-2`,children:[w,(0,$.jsx)(q,{id:`settings-content-rules-indicators`,checked:l,disabled:T,onCheckedChange:E,"aria-label":D,"data-testid":`settings-content-rules-indicators`})]}),e[24]=l,e[25]=T,e[26]=E,e[27]=D,e[28]=O):O=e[28];let k;e[29]!==S||e[30]!==O?(k=(0,$.jsxs)(`div`,{className:`divide-y rounded-md border`,children:[S,O]}),e[29]=S,e[30]=O,e[31]=k):k=e[31];let A;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`settings-content-rules-plugins-note`,children:(0,$.jsx)(o,{id:`YDL7N6`})}),e[32]=A):A=e[32];let j;return e[33]===k?j=e[34]:(j=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-content-rules-title`,className:`space-y-4`,"data-testid":`settings-content-rules`,children:[p,k,A]}),e[33]=k,e[34]=j),j}function Vr({binding:e}){return Gt(e).split(` / `).map((e,t)=>t===0?(0,$.jsx)(r,{"aria-label":Ut(e),children:e},`kbd-${e}`):(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`qEue6Q`})}),(0,$.jsx)(`span`,{"aria-hidden":`true`,children:` / `}),(0,$.jsx)(r,{"aria-label":Ut(e),children:e})]},`or-${e}`))}function Hr(){let e=(0,Z.c)(6),{_:t}=s(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`h3`,{id:`settings-hotkeys-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`4KmEoC`})}),e[0]=n):n=e[0];let r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[n,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`RaPMZv`})})]}),e[1]=r):r=e[1];let i;e[2]===t?i=e[3]:(i=Ht.map(e=>{let n=Wt.filter(t=>t.category===e);return n.length===0?null:(0,$.jsxs)(`section`,{"aria-labelledby":`settings-hotkeys-${e}`,children:[(0,$.jsx)(`h4`,{id:`settings-hotkeys-${e}`,className:`mb-2 font-mono text-muted-foreground text-xs uppercase tracking-wide`,children:t(Kt[e])}),(0,$.jsx)(`ul`,{"aria-labelledby":`settings-hotkeys-${e}`,className:`m-0 list-none overflow-hidden rounded-md border p-0`,children:n.map(e=>{let n=`settings-hotkey-${e.id}-title`,r=`settings-hotkey-${e.id}-description`,i=e.bindings.reduce(Ur,0)>4;return(0,$.jsxs)(`li`,{"aria-describedby":r,"aria-labelledby":n,className:h(`grid gap-2 border-border border-b px-3 py-3 last:border-b-0`,i?`sm:grid-cols-1`:`sm:grid-cols-[minmax(0,1fr)_minmax(0,auto)]`),"data-testid":`settings-hotkey-${e.id}`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(`p`,{className:`font-medium text-sm`,id:n,children:t(e.title)}),(0,$.jsxs)(Jt,{variant:`gray`,children:[(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`iXTp5j`})}),t(e.scope)]})]}),(0,$.jsx)(`p`,{className:`text-muted-foreground text-sm`,id:r,children:t(e.description)})]}),(0,$.jsx)(`div`,{className:h(`flex min-w-0 max-w-full self-start content-start flex-wrap items-start gap-1.5`,i?`sm:justify-start`:`sm:max-w-[38rem] sm:justify-end`),children:e.bindings.map(t=>(0,$.jsx)(Vr,{binding:t},`${e.id}-${t.mac}-${t.windowsLinux}`))})]},e.id)})})]},e)}),e[2]=t,e[3]=i);let a;return e[4]===i?a=e[5]:(a=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-hotkeys-title`,className:`space-y-5`,"data-testid":`settings-hotkeys`,children:[r,(0,$.jsx)(`div`,{className:`space-y-6`,"data-testid":`settings-hotkeys-list`,children:i})]}),e[4]=i,e[5]=a),a}function Ur(e,t){return e+Gt(t).split(` / `).length}function Wr(){(0,Z.c)(16);let[e,t]=(0,Q.useState)(!1),{skillInstalled:n,refresh:r}=tt();return null}function Gr(){let e=(0,Z.c)(32),{_:t}=s(),{projectLocalConfig:n,projectLocalSynced:r,projectLocalBinding:i}=Yt(),[a,c]=(0,Q.useState)(!1),l=(0,Q.useRef)(null),u=n?.linkPreviews?.enabled??!1,d=r&&i!==null,f;e[0]!==t||e[1]!==i?(f=function(e){if(i===null)return X.error(t({id:`ax9kie`})),!1;let n=i.patch({linkPreviews:{enabled:e}});if(!n.ok){let r=je(n.error);return X.error(t(e?{id:`ZatAO_`,values:{detail:r}}:{id:`RO-yts`,values:{detail:r}})),!1}return!0},e[0]=t,e[1]=i,e[2]=f):f=e[2];let p=f,m;e[3]===p?m=e[4]:(m=function(e){if(e){c(!0);return}p(!1)},e[3]=p,e[4]=m);let h=m,g;e[5]===p?g=e[6]:(g=function(){p(!0)&&c(!1)},e[5]=p,e[6]=g);let _=g,v;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`h3`,{id:`settings-link-previews-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`gh27t1`})}),e[7]=v):v=e[7];let y;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[v,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`cGV6Mh`})})]}),e[8]=y):y=e[8];let b;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(`label`,{htmlFor:`settings-link-previews-toggle`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`ENpRJV`})}),e[9]=b):b=e[9];let x;e[10]===u?x=e[11]:(x=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[b,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,"data-testid":`settings-link-previews-body`,children:u?(0,$.jsx)(o,{id:`rVJpLz`}):(0,$.jsx)(o,{id:`YjMLg2`})})]}),e[10]=u,e[11]=x);let S=!d,C;e[12]!==t||e[13]!==u?(C=t(u?{id:`5Umg9i`}:{id:`KpOJFY`}),e[12]=t,e[13]=u,e[14]=C):C=e[14];let w;e[15]!==u||e[16]!==h||e[17]!==S||e[18]!==C?(w=(0,$.jsx)(q,{ref:l,id:`settings-link-previews-toggle`,checked:u,disabled:S,onCheckedChange:h,"aria-label":C,"data-testid":`settings-link-previews-toggle`}),e[15]=u,e[16]=h,e[17]=S,e[18]=C,e[19]=w):w=e[19];let T;e[20]!==x||e[21]!==w?(T=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[x,w]}),e[20]=x,e[21]=w,e[22]=T):T=e[22];let E;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm mt-2`,children:(0,$.jsx)(o,{id:`Xk0-VC`})}),e[23]=E):E=e[23];let D;e[24]===T?D=e[25]:(D=(0,$.jsxs)(`div`,{className:`rounded-md border p-3`,children:[T,E]}),e[24]=T,e[25]=D);let O;e[26]!==a||e[27]!==_?(O=(0,$.jsx)(Kr,{open:a,onOpenChange:c,onConfirm:_,returnFocusRef:l}),e[26]=a,e[27]=_,e[28]=O):O=e[28];let k;return e[29]!==D||e[30]!==O?(k=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-link-previews-title`,className:`space-y-3`,"data-testid":`settings-link-previews`,children:[y,D,O]}),e[29]=D,e[30]=O,e[31]=k):k=e[31],k}function Kr(e){let t=(0,Z.c)(17),{open:n,onOpenChange:r,onConfirm:i,returnFocusRef:a}=e,s;t[0]===a?s=t[1]:(s=e=>{e.preventDefault(),a.current?.focus()},t[0]=a,t[1]=s);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(k,{children:(0,$.jsx)(o,{id:`MqsbfN`})}),t[2]=c):c=t[2];let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsxs)(P,{children:[c,(0,$.jsx)(O,{children:(0,$.jsx)(o,{id:`VFQXPl`})})]}),t[3]=l):l=t[3];let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(`p`,{className:`mb-2 font-medium`,children:(0,$.jsx)(o,{id:`2Snes1`})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(j,{children:(0,$.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2.5 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:[u,(0,$.jsxs)(`ul`,{className:`list-disc space-y-1.5 pl-5`,children:[(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`My0wYT`})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`lmBPt0`})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`5AzM72`})})]})]})}),t[5]=d):d=t[5];let f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(N,{asChild:!0,children:(0,$.jsx)(x,{variant:`outline`,children:(0,$.jsx)(o,{id:`dEgA5A`})})}),t[6]=f):f=t[6];let p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(o,{id:`iMkWoF`}),t[7]=p):p=t[7];let m;t[8]===i?m=t[9]:(m=(0,$.jsxs)(M,{children:[f,(0,$.jsx)(x,{onClick:i,"data-testid":`settings-link-previews-confirm-enable`,children:p})]}),t[8]=i,t[9]=m);let h;t[10]!==s||t[11]!==m?(h=(0,$.jsxs)(A,{className:`sm:max-w-lg`,"data-testid":`settings-link-previews-confirm`,onCloseAutoFocus:s,children:[l,d,m]}),t[10]=s,t[11]=m,t[12]=h):h=t[12];let g;return t[13]!==r||t[14]!==n||t[15]!==h?(g=(0,$.jsx)(F,{open:n,onOpenChange:r,children:h}),t[13]=r,t[14]=n,t[15]=h,t[16]=g):g=t[16],g}var qr=[`unmatched`,`invalid`,`suspicious`],Jr=` appliesTo glob `,Yr=` (frontmatter mapping for `,Xr=` — `;function Zr(e){if(!e.startsWith(`"`))return null;for(let t=1;t<e.length;t++){let n=e[t];if(n===`\\`){t++;continue}if(n===`"`)try{return{value:JSON.parse(e.slice(0,t+1)),rest:e.slice(t+1)}}catch{return null}}return null}function Qr(e){let t=qr.find(t=>e.startsWith(`${t}${Jr}`));if(t===void 0)return null;let n=Zr(e.slice(t.length+16));if(n===null)return null;let r=n.rest.lastIndexOf(Yr);if(r===-1||!n.rest.endsWith(`)`))return null;let i=n.rest.slice(r+26,-1);if(i===``)return null;let a=n.rest.slice(0,r);if(!a.startsWith(Xr))return null;let o=a.slice(3);return o===``?null:{kind:t,pattern:n.value,detail:o,file:i}}function $r(e){let t=new Map;for(let n of e){let e=Qr(n);if(e===null)continue;let r=t.get(e.file);r===void 0&&(r=new Map,t.set(e.file,r));let i=r.get(e.pattern);r.set(e.pattern,i===void 0?e.detail:`${i}; ${e.detail}`)}return t}var ei=8e3;function ti({pluginId:e,label:t}){X.success(Rt._({id:`XfA5xx`,values:{label:t}}),{id:`plugin-enabled-${e}`,description:Rt._({id:`2wTb8w`}),duration:ei,action:{label:Rt._({id:`Yp-Hi_`}),onClick:()=>Bt(e)}})}function ni(e){let t=(0,Z.c)(10),{scope:n}=e,r=`settings-scope-badge-${n}`,i;t[0]===n?i=t[1]:(i=n===`user`?(0,$.jsx)(o,{id:`7PzzBU`}):(0,$.jsx)(o,{id:`e0NrBM`}),t[0]=n,t[1]=i);let a;t[2]!==r||t[3]!==i?(a=(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(Jt,{variant:`gray`,tabIndex:0,className:`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,"data-testid":r,children:i})}),t[2]=r,t[3]=i,t[4]=a):a=t[4];let s;t[5]===n?s=t[6]:(s=(0,$.jsx)(C,{children:n===`user`?(0,$.jsx)(o,{id:`a7P3nH`}):(0,$.jsx)(o,{id:`494br3`})}),t[5]=n,t[6]=s);let c;return t[7]!==a||t[8]!==s?(c=(0,$.jsxs)(w,{children:[a,s]}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function ri(){let e=(0,Z.c)(7),{_:t}=s(),{projectConfig:n,projectSynced:r,projectBinding:i}=Yt(),a=n?.contentRules,o=r&&i!==null,c;e[0]!==t||e[1]!==i?(c=function(e){if(i===null)return X.error(t({id:`dVaXnv`})),!1;let n=i.patch({contentRules:e});return n.ok?!0:(X.error(t({id:`NrFwux`,values:{0:je(n.error)}})),!1)},e[0]=t,e[1]=i,e[2]=c):c=e[2];let l=c,u;return e[3]!==o||e[4]!==a||e[5]!==l?(u={contentRules:a,bindingReady:o,write:l},e[3]=o,e[4]=a,e[5]=l,e[6]=u):u=e[6],u}function ii(e,t){return{[e]:{enabled:t}}}function ai(e){let t=(0,Z.c)(2),{id:n}=e;switch(n){case`markdownlint`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`Vftef5`}),t[0]=e):e=t[0],e}case`frontmatter`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`78G7R3`}),t[1]=e):e=t[1],e}}}function oi(){let e=(0,Z.c)(12),{_:t}=s(),{contentRules:n,bindingReady:r,write:i}=ri(),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(`h3`,{id:`settings-plugins-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`ohUJJM`})}),e[0]=a):a=e[0];let c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[a,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`oXlLi4`})})]}),e[1]=c):c=e[1];let l;e[2]!==t||e[3]!==r||e[4]!==n||e[5]!==i?(l=sn.map(e=>{let a=n?.[e.id]?.enabled===!0;return(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-2`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsxs)(V,{htmlFor:`settings-plugin-toggle-${e.id}`,className:`inline-flex items-center gap-1.5 text-sm font-medium`,children:[e.label,e.id===`frontmatter`?(0,$.jsx)(Ln,{}):null]}),(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(ai,{id:e.id})})]}),(0,$.jsx)(q,{id:`settings-plugin-toggle-${e.id}`,checked:a,disabled:!r,onCheckedChange:t=>{i(ii(e.id,t))&&t&&ti({pluginId:e.id,label:e.label})},"aria-label":t(a?{id:`y5UgU8`,values:{0:e.label}}:{id:`FZtBeR`,values:{0:e.label}}),"data-testid":`settings-plugin-toggle-${e.id}`})]},e.id)}),e[2]=t,e[3]=r,e[4]=n,e[5]=i,e[6]=l):l=e[6];let u;e[7]===l?u=e[8]:(u=(0,$.jsx)(`div`,{className:`divide-y rounded-md border`,"data-testid":`settings-plugins-list`,children:l}),e[7]=l,e[8]=u);let d;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`settings-plugins-audit-pointer`,children:(0,$.jsx)(o,{id:`9KooKn`})}),e[9]=d):d=e[9];let f;return e[10]===u?f=e[11]:(f=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-plugins-title`,className:`space-y-4`,"data-testid":`settings-plugins-manage`,children:[c,u,d]}),e[10]=u,e[11]=f),f}function si(e){let t=(0,Z.c)(15),{userBinding:n}=e,{_:r}=s(),{userConfig:i}=Yt(),a=i?.appearance?.colorThemeEnabled!==!1,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`h3`,{id:`settings-user-plugins-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`ohUJJM`})}),t[0]=c):c=t[0];let l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[c,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`k2fEi7`})})]}),t[1]=l):l=t[1];let u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(V,{htmlFor:`settings-plugin-toggle-theme`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`fJ3EbT`})}),t[2]=u):u=t[2];let d;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[u,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`YRavYS`})})]}),t[3]=d):d=t[3];let f=n===null,p;t[4]!==r||t[5]!==n?(p=e=>{if(n){if(!n.patch({appearance:{colorThemeEnabled:e}}).ok){X.error(r({id:`C_Lyvh`}));return}e&&ti({pluginId:`theme`,label:r({id:`fJ3EbT`})})}},t[4]=r,t[5]=n,t[6]=p):p=t[6];let m;t[7]!==r||t[8]!==a?(m=r(a?{id:`cOJyVj`}:{id:`G_hVTP`}),t[7]=r,t[8]=a,t[9]=m):m=t[9];let h;return t[10]!==f||t[11]!==p||t[12]!==m||t[13]!==a?(h=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-user-plugins-title`,className:`space-y-4`,"data-testid":`settings-user-plugins-manage`,children:[l,(0,$.jsx)(`div`,{className:`rounded-md border p-3`,"data-testid":`settings-user-plugins-list`,children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[d,(0,$.jsx)(q,{id:`settings-plugin-toggle-theme`,checked:a,disabled:f,onCheckedChange:p,"aria-label":m,"data-testid":`settings-plugin-toggle-theme`})]})})]}),t[10]=f,t[11]=p,t[12]=m,t[13]=a,t[14]=h):h=t[14],h}function ci(e){let t=(0,Z.c)(22),{titleId:n,title:r,scope:i,beta:a,docUrl:c,children:l}=e,{_:u}=s(),d;t[0]!==r||t[1]!==n?(d=(0,$.jsx)(`h3`,{id:n,className:`text-base font-semibold`,children:r}),t[0]=r,t[1]=n,t[2]=d):d=t[2];let f;t[3]===a?f=t[4]:(f=a?(0,$.jsx)(Ln,{}):null,t[3]=a,t[4]=f);let p;t[5]===i?p=t[6]:(p=i?(0,$.jsx)(ni,{scope:i}):null,t[5]=i,t[6]=p);let m;t[7]!==d||t[8]!==f||t[9]!==p?(m=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[d,f,p]}),t[7]=d,t[8]=f,t[9]=p,t[10]=m):m=t[10];let h;t[11]===l?h=t[12]:(h=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:l}),t[11]=l,t[12]=h);let g;t[13]!==u||t[14]!==c||t[15]!==r||t[16]!==n?(g=c===void 0?null:(0,$.jsxs)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>an(e,c),onAuxClick:e=>an(e,c),"aria-label":u({id:`Li4U-T`,values:{title:r}}),className:`inline-flex items-center gap-0.5 text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`,"data-testid":`${n}-docs-link`,children:[(0,$.jsx)(o,{id:`zwWKhA`}),(0,$.jsx)(Xe,{"aria-hidden":!0,className:`size-3`})]}),t[13]=u,t[14]=c,t[15]=r,t[16]=n,t[17]=g):g=t[17];let _;return t[18]!==m||t[19]!==h||t[20]!==g?(_=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[m,h,g]}),t[18]=m,t[19]=h,t[20]=g,t[21]=_):_=t[21],_}function li(e){return sn.find(t=>t.id===e)?.docUrl}function ui(e){let t=(0,Z.c)(6),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{initialRuleQuery:r}=n,i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=li(`markdownlint`),t[2]=i):i=t[2];let a;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(ci,{titleId:`settings-plugin-markdownlint-title`,title:`markdownlint`,scope:`project`,docUrl:i,children:(0,$.jsx)(o,{id:`WFEbV1`,components:{0:(0,$.jsx)(`a`,{href:`https://github.com/DavidAnson/markdownlint`,target:`_blank`,rel:`noopener noreferrer`,onClick:fi,onAuxClick:di,className:`inline-flex items-center gap-0.5 text-muted-foreground underline-offset-2 hover:text-foreground hover:underline`}),1:(0,$.jsx)(Xe,{"aria-hidden":!0,className:`size-3`})}})}),t[3]=a):a=t[3];let s;return t[4]===r?s=t[5]:(s=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-plugin-markdownlint-title`,className:`space-y-4`,"data-testid":`settings-plugin-markdownlint`,children:[a,(0,$.jsx)(In,{initialRuleQuery:r})]}),t[4]=r,t[5]=s),s}function di(e){return an(e,`https://github.com/DavidAnson/markdownlint`)}function fi(e){return an(e,`https://github.com/DavidAnson/markdownlint`)}function pi(e){return e===void 0?[]:Array.isArray(e)?e:[e]}function mi(e){let t=(0,Z.c)(20),{summary:n}=e;switch(n.kind){case`everything`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`0zAhu6`}),t[0]=e):e=t[0],e}case`folder-recursive`:{let e;return t[1]===n.folder?e=t[2]:(e=(0,$.jsx)(o,{id:`OZavHH`,values:{0:n.folder}}),t[1]=n.folder,t[2]=e),e}case`folder-direct`:{let e;return t[3]===n.folder?e=t[4]:(e=(0,$.jsx)(o,{id:`CWjM1r`,values:{0:n.folder}}),t[3]=n.folder,t[4]=e),e}case`exact`:{let e;return t[5]===n.target?e=t[6]:(e=(0,$.jsx)(o,{id:`c3ZGrq`,values:{0:n.target}}),t[5]=n.target,t[6]=e),e}case`name-anywhere`:{let e;return t[7]===n.name?e=t[8]:(e=(0,$.jsx)(o,{id:`QLgdT6`,values:{0:n.name}}),t[7]=n.name,t[8]=e),e}case`folder-anywhere`:{let e;return t[9]===n.folder?e=t[10]:(e=(0,$.jsx)(o,{id:`_yB-24`,values:{0:n.folder}}),t[9]=n.folder,t[10]=e),e}case`folder-recursive-nested`:{let e;return t[11]!==n.folder||t[12]!==n.root?(e=(0,$.jsx)(o,{id:`paCw0z`,values:{0:n.folder,1:n.root}}),t[11]=n.folder,t[12]=n.root,t[13]=e):e=t[13],e}case`matches-nothing`:{let e;return t[14]===n.pattern?e=t[15]:(e=(0,$.jsx)(o,{id:`J2_JuX`,values:{0:n.pattern}}),t[14]=n.pattern,t[15]=e),e}case`invalid`:{let e;return t[16]===n.pattern?e=t[17]:(e=(0,$.jsx)(o,{id:`5aahsI`,values:{0:n.pattern}}),t[16]=n.pattern,t[17]=e),e}case`pattern`:{let e;return t[18]===n.pattern?e=t[19]:(e=(0,$.jsx)(o,{id:`SiFgBx`,values:{0:n.pattern}}),t[18]=n.pattern,t[19]=e),e}}}function hi(e){let t=(0,Z.c)(4),{file:n,appliesTo:r}=e,i;if(t[0]!==r||t[1]!==n){let{includes:e,excludes:a}=Te(r),s=gi,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(o,{id:`p98xmP`}),t[3]=c):c=t[3],i=(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`frontmatter-schema-applies-summary-${n}`,children:[c,` `,e.length===0?(0,$.jsx)(mi,{summary:{kind:`everything`}}):s(e),a.length>0?(0,$.jsxs)($.Fragment,{children:[` `,(0,$.jsx)(o,{id:`YGNRB5`}),` `,s(a)]}):null,`.`]}),t[0]=r,t[1]=n,t[2]=i}else i=t[2];return i}function gi(e){return e.map(_i)}function _i(e,t){return(0,$.jsxs)(`span`,{children:[t>0?`, `:null,(0,$.jsx)(mi,{summary:e})]},t)}function vi(e){return e.enabled!==!1}function yi(e){let t=(0,Z.c)(49),{file:n,mapping:r,disabled:i,globProblems:a,onToggle:c,onAppliesToChange:l,onDelete:u}=e,{_:d}=s(),f;t[0]===r?f=t[1]:(f=r!==void 0&&vi(r),t[0]=r,t[1]=f);let p=f,m;t[2]===n?m=t[3]:(m=()=>{Rn(n),window.location.hash=zt(n)},t[2]=n,t[3]=m);let h=m,g=`frontmatter-schema-row-${n}`,_;t[4]===n?_=t[5]:(_=(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-sm`,title:n,children:n}),t[4]=n,t[5]=_);let v;t[6]!==d||t[7]!==n?(v=d({id:`74C2zx`,values:{file:n}}),t[6]=d,t[7]=n,t[8]=v):v=t[8];let y=`frontmatter-schema-edit-${n}`,b,S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(Mt,{"aria-hidden":!0,className:`size-3`}),S=(0,$.jsx)(o,{id:`ePK91l`}),t[9]=b,t[10]=S):(b=t[9],S=t[10]);let C;t[11]!==h||t[12]!==v||t[13]!==y?(C=(0,$.jsxs)(x,{variant:`outline`,size:`sm`,className:`h-6 shrink-0 gap-1 px-2 text-xs`,onClick:h,"aria-label":v,"data-testid":y,children:[b,S]}),t[11]=h,t[12]=v,t[13]=y,t[14]=C):C=t[14];let w;t[15]!==d||t[16]!==i||t[17]!==n||t[18]!==u?(w=u===null?null:(0,$.jsx)(x,{variant:`ghost`,size:`icon`,className:`h-5 w-5 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,disabled:i,"aria-label":d({id:`mHf8mp`,values:{file:n}}),onClick:u,"data-testid":`frontmatter-schema-delete-${n}`,children:(0,$.jsx)(Nt,{className:`size-3.5`})}),t[15]=d,t[16]=i,t[17]=n,t[18]=u,t[19]=w):w=t[19];let T;t[20]!==d||t[21]!==n||t[22]!==p?(T=d(p?{id:`mAzs2H`,values:{file:n}}:{id:`EO4Dt1`,values:{file:n}}),t[20]=d,t[21]=n,t[22]=p,t[23]=T):T=t[23];let E=`frontmatter-schema-toggle-${n}`,D;t[24]!==i||t[25]!==p||t[26]!==c||t[27]!==T||t[28]!==E?(D=(0,$.jsx)(q,{checked:p,disabled:i,"aria-label":T,onCheckedChange:c,"data-testid":E}),t[24]=i,t[25]=p,t[26]=c,t[27]=T,t[28]=E,t[29]=D):D=t[29];let O;t[30]!==w||t[31]!==D||t[32]!==C?(O=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[C,w,D]}),t[30]=w,t[31]=D,t[32]=C,t[33]=O):O=t[33];let k;t[34]!==O||t[35]!==_?(k=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[_,O]}),t[34]=O,t[35]=_,t[36]=k):k=t[36];let A;t[37]!==d||t[38]!==i||t[39]!==n||t[40]!==a||t[41]!==r?.appliesTo||t[42]!==p||t[43]!==l?(A=p?(0,$.jsxs)(`div`,{className:`mt-2 space-y-1 pl-1.5`,children:[(0,$.jsx)(V,{htmlFor:`frontmatter-schema-applies-${n}`,className:`text-xs`,children:(0,$.jsx)(o,{id:`5Y17qa`})}),(0,$.jsx)(Fn,{id:`frontmatter-schema-applies-${n}`,value:pi(r?.appliesTo),grammar:`free-text`,disabled:i,entryProblems:a,onChange:l,placeholder:d({id:`R_U_A4`}),"aria-label":d({id:`a45f2c`})}),(0,$.jsx)(hi,{file:n,appliesTo:r?.appliesTo})]}):null,t[37]=d,t[38]=i,t[39]=n,t[40]=a,t[41]=r?.appliesTo,t[42]=p,t[43]=l,t[44]=A):A=t[44];let j;return t[45]!==k||t[46]!==A||t[47]!==g?(j=(0,$.jsxs)(`div`,{className:`px-3 py-2`,"data-testid":g,children:[k,A]}),t[45]=k,t[46]=A,t[47]=g,t[48]=j):j=t[48],j}function bi(){let e=(0,Z.c)(99),{_:t}=s(),{contentRules:n,bindingReady:r,write:i}=ri(),{data:a}=ln(),{schemas:c}=pn(),l;e[0]===n?.frontmatter?.schemas?l=e[1]:(l=n?.frontmatter?.schemas??[],e[0]=n?.frontmatter?.schemas,e[1]=l);let u=l,[h,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)(!1),[b,S]=(0,Q.useState)(``),[C,w]=(0,Q.useState)(null),[T,E]=(0,Q.useState)(!1),D,O,k,A,j,M,N,P;if(e[2]!==t||e[3]!==r||e[4]!==v||e[5]!==a?.configProblems||e[6]!==c||e[7]!==u||e[8]!==b||e[9]!==h||e[10]!==i){let n=new Set(u.map(wi)),s=(a?.configProblems??[]).filter(e=>e.startsWith(`frontmatter schema `)?[...n].some(t=>e.startsWith(`frontmatter schema ${t}:`)):e.startsWith(`invalid appliesTo glob`)||e.startsWith(`suspicious appliesTo glob`)||e.startsWith(`unmatched appliesTo glob`)?[...n].some(t=>e.endsWith(`(frontmatter mapping for ${t})`)):!1),l;e[19]===i?l=e[20]:(l=function(e){i({frontmatter:{schemas:e}})&&dn()},e[19]=i,e[20]=l);let g=l,C=[...new Set([...c,...u.map(Ci)])].sort(Si),T=h.trim().toLowerCase(),F=C.filter(e=>T===``||e.toLowerCase().includes(T)),I=$r(s),L;e[21]===u?L=e[22]:(L=e=>{let t=Qr(e);if(t===null)return!0;let n=u.find(e=>e.file===t.file),r=n!==void 0&&vi(n)&&pi(n.appliesTo).includes(t.pattern),i=u.some(e=>e.file===t.file&&pi(e.appliesTo).includes(t.pattern));return!r&&i},e[21]=u,e[22]=L);let R=s.filter(L),z;e[23]!==u||e[24]!==g?(z=function(e,t){if(!u.some(t=>t.file===e)){t&&g([...u,{file:e,enabled:!0}]);return}g(u.map(n=>n.file===e?{...n,enabled:t}:n))},e[23]=u,e[24]=g,e[25]=z):z=e[25];let B=z,H;e[26]!==u||e[27]!==g?(H=function(e,t){g(u.map(n=>{if(n.file!==e)return n;if(t.length===0){let{appliesTo:e,...t}=n;return t}return{...n,appliesTo:t}}))},e[26]=u,e[27]=g,e[28]=H):H=e[28];let ee=H,U;e[29]!==t||e[30]!==u||e[31]!==g?(U=async function(e){E(!0);let n=await un(e);if(E(!1),!n.ok){X.error(n.errorDetail??t({id:`hgtsat`,values:{file:e}}));return}u.some(t=>t.file===e)&&g(u.filter(t=>t.file!==e)),w(null),X.success(t({id:`v_2_3v`,values:{file:e}}))},e[29]=t,e[30]=u,e[31]=g,e[32]=U):U=e[32],D=U;let te;e[33]!==t||e[34]!==u||e[35]!==b||e[36]!==g?(te=async function(){let e=b.trim();if(e===``||e.includes(`/`)||e.includes(`\\`))return;let n=`.ok/schemas/${e.endsWith(`.json`)?e:`${e}.schema.json`}`,r=await fn(n);if(!r.ok){X.error(r.errorDetail??t({id:`U88xbi`}));return}g([...u,{file:n,enabled:!0}]),y(!1),S(``)},e[33]=t,e[34]=u,e[35]=b,e[36]=g,e[37]=te):te=e[37];let ne=te;O=`settings-plugin-frontmatter-title`,k=`space-y-4`,A=`settings-plugin-frontmatter`;let re;e[38]===t?re=e[39]:(re=t({id:`PVggyD`}),e[38]=t,e[39]=re);let W,G;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(W=li(`frontmatter`),G=(0,$.jsx)(o,{id:`V3iDh1`}),e[40]=W,e[41]=G):(W=e[40],G=e[41]),e[42]===re?j=e[43]:(j=(0,$.jsx)(ci,{titleId:`settings-plugin-frontmatter-title`,title:re,beta:!0,docUrl:W,children:G}),e[42]=re,e[43]=j),M=R.length>0&&(0,$.jsxs)(`div`,{className:`space-y-1 rounded-md border border-amber-500/50 bg-amber-500/10 p-3 text-sm`,"data-testid":`frontmatter-config-problems`,children:[(0,$.jsx)(`p`,{className:`font-medium`,children:(0,$.jsx)(o,{id:`3BLniE`})}),(0,$.jsx)(`ul`,{className:`list-disc pl-5 text-muted-foreground`,children:R.map(xi)})]});let K;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(K=e=>_(e.target.value),e[44]=K):K=e[44];let q;e[45]===t?q=e[46]:(q=t({id:`37P2BJ`}),e[45]=t,e[46]=q);let J;e[47]===t?J=e[48]:(J=t({id:`_NWEid`}),e[47]=t,e[48]=J);let ie;e[49]!==h||e[50]!==q||e[51]!==J?(ie=(0,$.jsx)(Lt,{value:h,onChange:K,placeholder:q,"aria-label":J,className:`h-8`,"data-testid":`frontmatter-schema-search`}),e[49]=h,e[50]=q,e[51]=J,e[52]=ie):ie=e[52];let ae;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(f,{asChild:!0,children:(0,$.jsxs)(x,{variant:`outline`,size:`sm`,className:`shrink-0`,"data-testid":`frontmatter-create-schema`,children:[(0,$.jsx)(m,{"aria-hidden":!0,className:`size-4`}),(0,$.jsx)(o,{id:`LQdLio`})]})}),e[53]=ae):ae=e[53];let oe;e[54]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(V,{htmlFor:`frontmatter-create-schema-name`,className:`text-xs`,children:(0,$.jsx)(o,{id:`PijLsG`})}),e[54]=oe):oe=e[54];let Y;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(Y=e=>S(e.target.value),e[55]=Y):Y=e[55];let se;e[56]===ne?se=e[57]:(se=e=>{e.key===`Enter`&&ne()},e[56]=ne,e[57]=se);let ce;e[58]!==b||e[59]!==se?(ce=(0,$.jsx)(Lt,{id:`frontmatter-create-schema-name`,value:b,onChange:Y,onKeyDown:se,placeholder:`doc`,"data-testid":`frontmatter-create-schema-name`}),e[58]=b,e[59]=se,e[60]=ce):ce=e[60];let le;e[61]!==r||e[62]!==b?(le=!r||b.trim()===``,e[61]=r,e[62]=b,e[63]=le):le=e[63];let ue;e[64]===ne?ue=e[65]:(ue=()=>void ne(),e[64]=ne,e[65]=ue);let de;e[66]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,$.jsx)(o,{id:`hYgDIe`}),e[66]=de):de=e[66];let fe;e[67]!==le||e[68]!==ue?(fe=(0,$.jsx)(x,{size:`sm`,disabled:le,onClick:ue,"data-testid":`frontmatter-create-schema-save`,children:de}),e[67]=le,e[68]=ue,e[69]=fe):fe=e[69];let pe;e[70]!==ce||e[71]!==fe?(pe=(0,$.jsxs)(p,{align:`end`,className:`w-72 space-y-2`,children:[oe,ce,fe]}),e[70]=ce,e[71]=fe,e[72]=pe):pe=e[72];let me;e[73]!==v||e[74]!==pe?(me=(0,$.jsxs)(d,{open:v,onOpenChange:y,children:[ae,pe]}),e[73]=v,e[74]=pe,e[75]=me):me=e[75],e[76]!==ie||e[77]!==me?(N=(0,$.jsxs)(`div`,{className:`flex items-center gap-4`,children:[ie,me]}),e[76]=ie,e[77]=me,e[78]=N):N=e[78],P=F.length===0?(0,$.jsx)(`p`,{className:`rounded-md border border-dashed p-3 text-sm text-muted-foreground`,"data-testid":`frontmatter-schemas-empty`,children:C.length===0?(0,$.jsx)(o,{id:`cRm498`}):(0,$.jsx)(o,{id:`3HAPpl`})}):(0,$.jsx)(`div`,{className:`divide-y rounded-md border`,"data-testid":`frontmatter-schemas-list`,children:F.map(e=>(0,$.jsx)(yi,{file:e,mapping:u.find(t=>t.file===e),disabled:!r,globProblems:I.get(e),onToggle:t=>B(e,t),onAppliesToChange:t=>ee(e,t),onDelete:He(e)?()=>w(e):null},e))}),e[2]=t,e[3]=r,e[4]=v,e[5]=a?.configProblems,e[6]=c,e[7]=u,e[8]=b,e[9]=h,e[10]=i,e[11]=D,e[12]=O,e[13]=k,e[14]=A,e[15]=j,e[16]=M,e[17]=N,e[18]=P}else D=e[11],O=e[12],k=e[13],A=e[14],j=e[15],M=e[16],N=e[17],P=e[18];let I=C!==null,L;e[79]===T?L=e[80]:(L=e=>{!e&&!T&&w(null)},e[79]=T,e[80]=L);let R;e[81]!==t||e[82]!==D||e[83]!==C||e[84]!==T?(R=C===null?null:(0,$.jsx)(g,{itemName:t({id:`qribBG`,values:{deleteTarget:C}}),isSubmitting:T,onDelete:()=>void D(C),customDescription:t({id:`NzPihF`,values:{deleteTarget:C}})}),e[81]=t,e[82]=D,e[83]=C,e[84]=T,e[85]=R):R=e[85];let z;e[86]!==R||e[87]!==I||e[88]!==L?(z=(0,$.jsx)(F,{open:I,onOpenChange:L,children:R}),e[86]=R,e[87]=I,e[88]=L,e[89]=z):z=e[89];let B;return e[90]!==O||e[91]!==z||e[92]!==k||e[93]!==A||e[94]!==j||e[95]!==M||e[96]!==N||e[97]!==P?(B=(0,$.jsxs)(`section`,{"aria-labelledby":O,className:k,"data-testid":A,children:[j,M,N,P,z]}),e[90]=O,e[91]=z,e[92]=k,e[93]=A,e[94]=j,e[95]=M,e[96]=N,e[97]=P,e[98]=B):B=e[98],B}function xi(e){return(0,$.jsx)(`li`,{children:e},e)}function Si(e,t){return e.localeCompare(t)}function Ci(e){return e.file}function wi(e){return e.file}var Ti={markdownlint:ui,frontmatter:bi},Ei=sn.map(e=>({...e,Section:Ti[e.id]})),Di=e(t(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}var r=``,i=` `,a=`\\`,o=/^\s+$/,s=/(?:[^\\]|^)\\$/,c=/^\\!/,l=/^\\#/,u=/\r?\n/g,d=/^\.*\/|^\.+$/,f=`/`,p=`node-ignore`;typeof Symbol<`u`&&(p=Symbol.for(`node-ignore`));var m=p,h=(e,t,n)=>Object.defineProperty(e,t,{value:n}),g=/([0-z])-([0-z])/g,_=()=>!1,v=e=>e.replace(g,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:r),y=e=>{let{length:t}=e;return e.slice(0,t-t%2)},b=[[/^\uFEFF/,()=>r],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?i:r)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+i}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>a],[/\\\\/g,()=>a],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===a?`\\[${n}${y(r)}${i}`:i===`]`&&r.length%2==0?`[${v(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`]],x=Object.create(null),S=(e,t)=>{let n=x[e];return n||(n=b.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),x[e]=n),t?new RegExp(n,`i`):new RegExp(n)},C=e=>typeof e==`string`,w=e=>e&&C(e)&&!o.test(e)&&!s.test(e)&&e.indexOf(`#`)!==0,T=e=>e.split(u),E=class{constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}},D=(e,t)=>{let n=e,r=!1;e.indexOf(`!`)===0&&(r=!0,e=e.substr(1)),e=e.replace(c,`!`).replace(l,`#`);let i=S(e,t);return new E(n,e,r,i)},O=(e,t)=>{throw new t(e)},k=(e,t,n)=>C(e)?e?k.isNotRelative(e)?n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),A=e=>d.test(e);k.isNotRelative=A,k.convert=e=>e;var j=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){h(this,m,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[m]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(w(e)){let t=D(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(C(e)?T(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach(i=>{let{negative:a}=i;r===a&&n!==r||a&&!n&&!r&&!t||i.regex.test(e)&&(n=!a,r=a)}),{ignored:n,unignored:r}}_test(e,t,n,r){let i=e&&k.convert(e);return k(i,e,this._allowRelativePaths?_:O),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(f),r.pop(),!r.length)return t[e]=this._testOne(e,n);let i=this._t(r.join(f)+f,t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},M=e=>new j(e);if(M.isPathValid=e=>k(e&&k.convert(e),e,_),M.default=M,t.exports=M,typeof process<`u`&&({}.IGNORE_TEST_WIN32||process.platform===`win32`)){k.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;k.isNotRelative=t=>e.test(t)||A(t)}}))(),1),Oi=new Map;function ki(e){let t=Oi.get(e);if(t)return Oi.delete(e),Oi.set(e,t),t;let n=(0,Di.default)();if(n.add(e),Oi.set(e,n),Oi.size>256){let e=Oi.keys().next().value;e!==void 0&&Oi.delete(e)}return n}function Ai(e,t){let n=e.trim();if(n.length===0||n.startsWith(`#`))return 0;let r=ki(n),i=0;for(let e of t)e.length!==0&&r.ignores(e)&&(i+=1);return i}var ji={"trailing-backslash":`Trailing backslash — line continuation isn't supported.`,"unmatched-bracket":`Unmatched [ — character class is open.`,"lone-bang":`Lone ! — negation needs a pattern after it.`,"leading-whitespace":`Leading whitespace — the rule may not match as expected.`,"embedded-newline":`Embedded line break — the row spans multiple lines.`};function Mi(e){let t=[];if(e.length===0||e.trimStart().startsWith(`#`))return t;/[\r\n]/.test(e)&&t.push({code:`embedded-newline`,message:ji[`embedded-newline`]}),/^\s/.test(e)&&t.push({code:`leading-whitespace`,message:ji[`leading-whitespace`]});let n=e.trim();return n===`!`&&t.push({code:`lone-bang`,message:ji[`lone-bang`]}),n.endsWith(`\\`)&&t.push({code:`trailing-backslash`,message:ji[`trailing-backslash`]}),Ni(n,`[`)>Ni(n,`]`)&&t.push({code:`unmatched-bracket`,message:ji[`unmatched-bracket`]}),t}function Ni(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}var Pi=`https://openknowledge.ai/docs/features/ignore-patterns`,Fi=1200,Ii=150,Li=150,Ri=5e3,zi=600,Bi=400,Vi=`okignore-show-advanced`;function Hi(e){let t=(0,Z.c)(3),{binding:n,synced:r}=e;if(n===null||!r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Ui,{}),t[0]=e):e=t[0],e}let i;return t[1]===n?i=t[2]:(i=(0,$.jsx)(Wi,{binding:n}),t[1]=n,t[2]=i),i}function Ui(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-okignore-title`,className:`space-y-3`,"data-testid":`settings-okignore-skeleton`,children:[(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`h3`,{id:`settings-okignore-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`3zyg_A`})}),(0,$.jsx)(cn,{className:`h-4 w-72`})]}),(0,$.jsx)(cn,{className:`h-20 w-full`})]}),e[0]=t):t=e[0],t}function Wi(e){let t=(0,Z.c)(72),{binding:n}=e,{_:r}=s(),i;t[0]===n?i=t[1]:(i=()=>n.current(),t[0]=n,t[1]=i);let[a,c]=(0,Q.useState)(i),l,u;t[2]===n?(l=t[3],u=t[4]):(l=()=>n.subscribe(e=>{c(e)}),u=[n],t[2]=n,t[3]=l,t[4]=u),(0,Q.useEffect)(l,u);let{pages:d,pageMeta:f,assetPaths:p}=et(),m;t[5]!==p||t[6]!==f||t[7]!==d?(m=da(d,f,p),t[5]=p,t[6]=f,t[7]=d,t[8]=m):m=t[8];let h=m,g,_;t[9]===a?(g=t[10],_=t[11]):(g=ht(a),_=mt(g),t[9]=a,t[10]=g,t[11]=_);let v=_,y=v.length===0,[b,x]=(0,Q.useState)(null),S=(0,Q.useRef)(null),C,w;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>()=>{S.current&&clearTimeout(S.current)},w=[],t[12]=C,t[13]=w):(C=t[12],w=t[13]),(0,Q.useEffect)(C,w);let T;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>{x({key:e,ts:Date.now()}),S.current&&clearTimeout(S.current),S.current=setTimeout(()=>x(null),Fi)},t[14]=T):T=t[14];let E=T,[D,O]=(0,Q.useState)(null),k=(0,Q.useRef)(null),A,j;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>()=>{k.current&&clearTimeout(k.current)},A=[],t[15]=A,t[16]=j):(A=t[15],j=t[16]),(0,Q.useEffect)(j,A);let M,N;t[17]===n?(M=t[18],N=t[19]):(M=()=>_t(e=>{e.docName===`__config__/okignore`&&n.notifyRejection(e.error)}),N=[n],t[17]=n,t[18]=M,t[19]=N),(0,Q.useEffect)(M,N);let P,F;t[20]===n?(P=t[21],F=t[22]):(P=()=>n.subscribeRejection(e=>{let{error:t}=e,n=sa(t);O({message:n?.detail??je(t),lineNumber:n?.lineNumber,ts:Date.now()}),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>O(null),Ri)}),F=[n],t[20]=n,t[21]=P,t[22]=F),(0,Q.useEffect)(P,F);let I,L;t[23]===r?(I=t[24],L=t[25]):(I=()=>St(e=>{let{path:t}=e;X.error(r({id:`3oh0nQ`,values:{path:t}}),{description:e.error,id:`okignore-nested-error:${e.path}`,duration:8e3})}),L=[r],t[23]=r,t[24]=I,t[25]=L),(0,Q.useEffect)(I,L);let R;t[26]===n?R=t[27]:(R=e=>{n.patch(e)},t[26]=n,t[27]=R);let z=R,B;t[28]!==z||t[29]!==g||t[30]!==v?(B=(e,t)=>{let n=t.trim(),r=v[e];if(r&&n!==r.text){if(n.length===0){z(gt(Ct(g,e)));return}z(gt(yt(g,e,n))),E(oa(n,e))}},t[28]=z,t[29]=g,t[30]=v,t[31]=B):B=t[31];let V=B,H;t[32]!==z||t[33]!==g?(H=e=>{z(gt(Ct(g,e)))},t[32]=z,t[33]=g,t[34]=H):H=t[34];let ee=H,U;t[35]!==z||t[36]!==g||t[37]!==v.length?(U=e=>{let t=e.trim();if(t.length===0)return;let n=wt(g,t);if(n>=0){E(oa(t,n));return}z(gt(pt(g,t))),E(oa(t,v.length))},t[35]=z,t[36]=g,t[37]=v.length,t[38]=U):U=t[38];let te=U,ne;t[39]!==z||t[40]!==g?(ne=e=>{let t=String(e.active.id),n=e.over?String(e.over.id):null;if(!n||t===n)return;let r=aa(t),i=aa(n);r<0||i<0||r===i||z(gt(bt(g,r,i)))},t[39]=z,t[40]=g,t[41]=ne):ne=t[41];let re=ne,W;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(W={activationConstraint:{distance:4}},t[42]=W):W=t[42];let G;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(G={coordinateGetter:_n},t[43]=G):G=t[43];let K=xn(gn(wn,W),gn(vn,G)),q=D===null?null:`rejection-${D.ts}`,[J,ie]=ma(),ae;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(`h3`,{id:`settings-okignore-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`3zyg_A`})}),t[44]=ae):ae=t[44];let oe;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[ae,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`Z5h97D`,components:{0:(0,$.jsx)(`a`,{href:Pi,target:`_blank`,rel:`noreferrer noopener`,className:`text-primary underline-offset-2 hover:underline`,"data-testid":`settings-okignore-primer`})}})})]}),t[45]=oe):oe=t[45];let Y;t[46]===D?Y=t[47]:(Y=D===null?null:(0,$.jsx)(qi,{rejection:D}),t[46]=D,t[47]=Y);let se;t[48]!==n||t[49]!==h||t[50]!==te||t[51]!==re||t[52]!==V||t[53]!==ee||t[54]!==y||t[55]!==v||t[56]!==q||t[57]!==b||t[58]!==K||t[59]!==J||t[60]!==a?(se=J?(0,$.jsx)(Gi,{binding:n,text:a}):y?(0,$.jsx)(Ji,{onAdd:te,rejectionFlashKey:q,filePaths:h}):(0,$.jsx)(Yi,{patterns:v,sensors:K,onDragEnd:re,onEdit:V,onRemove:ee,onAdd:te,savedFlash:b,rejectionFlashKey:q,filePaths:h}),t[48]=n,t[49]=h,t[50]=te,t[51]=re,t[52]=V,t[53]=ee,t[54]=y,t[55]=v,t[56]=q,t[57]=b,t[58]=K,t[59]=J,t[60]=a,t[61]=se):se=t[61];let ce;t[62]!==ie||t[63]!==J?(ce=()=>ie(!J),t[62]=ie,t[63]=J,t[64]=ce):ce=t[64];let le;t[65]!==J||t[66]!==ce?(le=(0,$.jsx)(`div`,{className:`flex justify-end`,children:(0,$.jsx)(Ki,{enabled:J,onToggle:ce})}),t[65]=J,t[66]=ce,t[67]=le):le=t[67];let ue;return t[68]!==Y||t[69]!==se||t[70]!==le?(ue=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-okignore-title`,className:`space-y-3`,"data-testid":`settings-okignore-section`,children:[oe,Y,se,le]}),t[68]=Y,t[69]=se,t[70]=le,t[71]=ue):ue=t[71],ue}function Gi(e){let t=(0,Z.c)(31),{binding:n,text:r}=e,{_:i}=s(),[a,o]=(0,Q.useState)(r),c=(0,Q.useRef)(r),l=(0,Q.useRef)(!1),u=(0,Q.useRef)(r),d=(0,Q.useRef)(null),f,p;t[0]===r?(f=t[1],p=t[2]):(f=()=>{l.current||r!==c.current&&(o(r),u.current=r,c.current=r)},p=[r],t[0]=r,t[1]=f,t[2]=p),(0,Q.useEffect)(f,p);let m,h;t[3]===a?(m=t[4],h=t[5]):(m=()=>{u.current=a},h=[a],t[3]=a,t[4]=m,t[5]=h),(0,Q.useEffect)(m,h);let g,_;t[6]===n?(g=t[7],_=t[8]):(g=()=>()=>{d.current&&(clearTimeout(d.current),d.current=null,u.current!==c.current&&(n.patch(u.current),c.current=u.current))},_=[n],t[6]=n,t[7]=g,t[8]=_),(0,Q.useEffect)(g,_);let v;t[9]===n?v=t[10]:(v=e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{d.current=null,e!==c.current&&(c.current=e,n.patch(e))},Bi)},t[9]=n,t[10]=v);let y=v,b;t[11]===n?b=t[12]:(b=()=>{d.current&&=(clearTimeout(d.current),null),u.current!==c.current&&(c.current=u.current,n.patch(u.current))},t[11]=n,t[12]=b);let x=b,S;t[13]===y?S=t[14]:(S=e=>{o(e.target.value),y(e.target.value)},t[13]=y,t[14]=S);let C;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{l.current=!0},t[15]=C):C=t[15];let w;t[16]===x?w=t[17]:(w=()=>{l.current=!1,x()},t[16]=x,t[17]=w);let T;t[18]===a?T=t[19]:(T=a.split(`
7
+ `),t[18]=a,t[19]=T);let E=Math.max(6,Math.min(20,T.length+1)),D;t[20]===i?D=t[21]:(D=i({id:`rssK8c`}),t[20]=i,t[21]=D);let O;t[22]===i?O=t[23]:(O=i({id:`AeHuzT`}),t[22]=i,t[23]=O);let k;return t[24]!==a||t[25]!==w||t[26]!==E||t[27]!==D||t[28]!==O||t[29]!==S?(k=(0,$.jsx)(`textarea`,{value:a,onChange:S,onFocus:C,onBlur:w,spellCheck:!1,rows:E,"aria-label":D,placeholder:O,className:`min-h-32 w-full rounded-md border border-input bg-background px-3 py-2 font-mono text-xs outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,"data-testid":`settings-okignore-advanced-textarea`}),t[24]=a,t[25]=w,t[26]=E,t[27]=D,t[28]=O,t[29]=S,t[30]=k):k=t[30],k}function Ki(e){let t=(0,Z.c)(6),{enabled:n,onToggle:r}=e,i;t[0]===n?i=t[1]:(i=n?(0,$.jsx)(o,{id:`9PQysm`}):(0,$.jsx)(o,{id:`Nv3mUj`}),t[0]=n,t[1]=i);let a;return t[2]!==n||t[3]!==r||t[4]!==i?(a=(0,$.jsx)(x,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,"aria-pressed":n,className:`h-7 px-2 text-xs text-muted-foreground hover:text-foreground`,"data-testid":`settings-okignore-show-advanced-toggle`,children:i}),t[2]=n,t[3]=r,t[4]=i,t[5]=a):a=t[5],a}function qi(e){let t=(0,Z.c)(7),{rejection:n}=e,{_:r}=s(),{lineNumber:i,message:a}=n,o;t[0]!==r||t[1]!==i||t[2]!==a?(o=r(i===void 0?{id:`G7-rf8`,values:{message:a}}:{id:`P3NS4G`,values:{lineNumber:i,message:a}}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3];let c=o,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(Pt,{"aria-hidden":`true`,className:`mt-0.5 size-4 shrink-0`}),t[4]=l):l=t[4];let u;return t[5]===c?u=t[6]:(u=(0,$.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"data-testid":`settings-okignore-rejection-banner`,className:`flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive animate-in fade-in`,children:[l,(0,$.jsx)(`span`,{children:c})]}),t[5]=c,t[6]=u),u}function Ji(e){let t=(0,Z.c)(8),{onAdd:n,rejectionFlashKey:r,filePaths:i}=e,{_:a}=s(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`makN88`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=a({id:`Gx0VS1`}),t[1]=a,t[2]=l);let u;return t[3]!==i||t[4]!==n||t[5]!==r||t[6]!==l?(u=(0,$.jsxs)(`div`,{className:`space-y-3 rounded-md border border-dashed p-4`,"data-testid":`settings-okignore-empty`,children:[c,(0,$.jsx)($i,{onAdd:n,placeholder:l,rejectionFlashKey:r,filePaths:i})]}),t[3]=i,t[4]=n,t[5]=r,t[6]=l,t[7]=u):u=t[7],u}function Yi(e){let t=(0,Z.c)(35),{patterns:n,sensors:r,onDragEnd:i,onEdit:a,onRemove:o,onAdd:c,savedFlash:l,rejectionFlashKey:u,filePaths:d}=e,{_:f}=s(),p;t[0]===n?p=t[1]:(p=n.map(Xi),t[0]=n,t[1]=p);let m=p,h;t[2]===f?h=t[3]:(h=f({id:`3zyg_A`}),t[2]=f,t[3]=h);let g;if(t[4]!==d||t[5]!==a||t[6]!==o||t[7]!==n||t[8]!==l){let e;t[10]!==d||t[11]!==a||t[12]!==o||t[13]!==l?(e=(e,t)=>{let n=oa(e.text,t),r=l!==null&&l.key===n;return(0,$.jsx)(Zi,{sortableId:ia(t),patternIndex:t,pattern:e,onEdit:a,onRemove:o,flashActive:r,filePaths:d},ia(t))},t[10]=d,t[11]=a,t[12]=o,t[13]=l,t[14]=e):e=t[14],g=n.map(e),t[4]=d,t[5]=a,t[6]=o,t[7]=n,t[8]=l,t[9]=g}else g=t[9];let _;t[15]!==h||t[16]!==g?(_=(0,$.jsx)(`ul`,{"aria-label":h,className:`divide-y rounded-md border`,"data-testid":`settings-okignore-list`,children:g}),t[15]=h,t[16]=g,t[17]=_):_=t[17];let v;t[18]!==m||t[19]!==_?(v=(0,$.jsx)(Cn,{items:m,strategy:bn,children:_}),t[18]=m,t[19]=_,t[20]=v):v=t[20];let y;t[21]!==i||t[22]!==r||t[23]!==v?(y=(0,$.jsx)(Sn,{sensors:r,collisionDetection:hn,onDragEnd:i,children:v}),t[21]=i,t[22]=r,t[23]=v,t[24]=y):y=t[24];let b;t[25]===f?b=t[26]:(b=f({id:`cZGNlb`}),t[25]=f,t[26]=b);let x;t[27]!==d||t[28]!==c||t[29]!==u||t[30]!==b?(x=(0,$.jsx)($i,{onAdd:c,placeholder:b,rejectionFlashKey:u,filePaths:d}),t[27]=d,t[28]=c,t[29]=u,t[30]=b,t[31]=x):x=t[31];let S;return t[32]!==y||t[33]!==x?(S=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[y,x]}),t[32]=y,t[33]=x,t[34]=S):S=t[34],S}function Xi(e,t){return ia(t)}function Zi(e){let t=(0,Z.c)(47),{sortableId:n,patternIndex:r,pattern:i,onEdit:a,onRemove:o,flashActive:c,filePaths:l}=e,{_:u}=s(),d;t[0]===n?d=t[1]:(d={id:n},t[0]=n,t[1]=d);let{attributes:f,listeners:p,setNodeRef:m,transform:h,transition:g,isDragging:_}=mn(d),v=i.text,y;t[2]===h?y=t[3]:(y=yn.Transform.toString(h),t[2]=h,t[3]=y);let b=_?.5:void 0,S=_?1:void 0,C;t[4]!==y||t[5]!==b||t[6]!==S||t[7]!==g?(C={transform:y,transition:g,opacity:b,zIndex:S},t[4]=y,t[5]=b,t[6]=S,t[7]=g,t[8]=C):C=t[8];let w=C,T;t[9]!==u||t[10]!==v?(T=u({id:`7_bFEL`,values:{patternText:v}}),t[9]=u,t[10]=v,t[11]=T):T=t[11];let E;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(Dt,{className:`size-3.5`}),t[12]=E):E=t[12];let D;t[13]!==f||t[14]!==p||t[15]!==T?(D=(0,$.jsx)(x,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`settings-okignore-drag-handle`,"aria-label":T,...f,...p,className:`h-7 w-4 shrink-0 cursor-grab touch-none px-0 text-muted-foreground/40 hover:text-foreground focus-visible:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing`,children:E}),t[13]=f,t[14]=p,t[15]=T,t[16]=D):D=t[16];let O;t[17]!==a||t[18]!==r?(O=e=>a(r,e),t[17]=a,t[18]=r,t[19]=O):O=t[19];let k;t[20]!==l||t[21]!==i.text||t[22]!==r||t[23]!==O?(k=(0,$.jsx)(Qi,{patternIndex:r,initialText:i.text,onCommit:O,filePaths:l}),t[20]=l,t[21]=i.text,t[22]=r,t[23]=O,t[24]=k):k=t[24];let A;t[25]===c?A=t[26]:(A=(0,$.jsx)(ra,{visible:c}),t[25]=c,t[26]=A);let j;t[27]!==u||t[28]!==v?(j=u({id:`S9Vnum`,values:{patternText:v}}),t[27]=u,t[28]=v,t[29]=j):j=t[29];let M;t[30]!==o||t[31]!==r?(M=()=>o(r),t[30]=o,t[31]=r,t[32]=M):M=t[32];let N;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(Ft,{className:`size-3.5`}),t[33]=N):N=t[33];let P;t[34]!==j||t[35]!==M?(P=(0,$.jsx)(x,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-testid":`settings-okignore-remove`,"aria-label":j,onClick:M,className:`h-7 w-7 shrink-0 text-muted-foreground hover:text-destructive`,children:N}),t[34]=j,t[35]=M,t[36]=P):P=t[36];let F;t[37]!==k||t[38]!==A||t[39]!==P||t[40]!==D?(F=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[D,k,A,P]}),t[37]=k,t[38]=A,t[39]=P,t[40]=D,t[41]=F):F=t[41];let I;return t[42]!==r||t[43]!==m||t[44]!==w||t[45]!==F?(I=(0,$.jsx)(`li`,{ref:m,style:w,className:`flex flex-col gap-0.5 px-2 py-1.5`,"data-testid":`settings-okignore-row`,"data-pattern-index":r,children:F}),t[42]=r,t[43]=m,t[44]=w,t[45]=F,t[46]=I):I=t[46],I}function Qi(e){let t=(0,Z.c)(31),{patternIndex:n,initialText:r,onCommit:i,filePaths:a}=e,{_:o}=s(),[c,l]=(0,Q.useState)(r),u=(0,Q.useRef)(r),d=(0,Q.useRef)(!1),f,p;t[0]===r?(f=t[1],p=t[2]):(f=()=>{d.current||r!==u.current&&(l(r),u.current=r)},p=[r],t[0]=r,t[1]=f,t[2]=p),(0,Q.useEffect)(f,p);let m=ca(c),g=la(c,a),_=n+1,v;t[3]!==c||t[4]!==i?(v=()=>{c!==u.current&&(u.current=c,i(c))},t[3]=c,t[4]=i,t[5]=v):v=t[5];let y=v,b,x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>l(e.target.value),x=()=>{d.current=!0},t[6]=b,t[7]=x):(b=t[6],x=t[7]);let S;t[8]===y?S=t[9]:(S=()=>{d.current=!1,y()},t[8]=y,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{e.key===`Enter`?(e.preventDefault(),e.currentTarget.blur()):e.key===`Escape`&&(e.preventDefault(),l(u.current),e.currentTarget.blur())},t[10]=C):C=t[10];let w;t[11]!==o||t[12]!==_?(w=o({id:`-YV1Uo`,values:{patternNumber:_}}),t[11]=o,t[12]=_,t[13]=w):w=t[13];let T=m.length>0?`border-amber-500/60 focus-visible:ring-amber-500/40`:``,E;t[14]===T?E=t[15]:(E=h(`h-7 flex-1 font-mono text-xs`,T),t[14]=T,t[15]=E);let D;t[16]!==c||t[17]!==E||t[18]!==S||t[19]!==w?(D=(0,$.jsx)(Lt,{value:c,onChange:b,onFocus:x,onBlur:S,onKeyDown:C,"aria-label":w,className:E,"data-testid":`settings-okignore-row-input`}),t[16]=c,t[17]=E,t[18]=S,t[19]=w,t[20]=D):D=t[20];let O;t[21]===m?O=t[22]:(O=(0,$.jsx)(ea,{warnings:m}),t[21]=m,t[22]=O);let k;t[23]!==D||t[24]!==O?(k=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1`,children:[D,O]}),t[23]=D,t[24]=O,t[25]=k):k=t[25];let A;t[26]===g?A=t[27]:(A=(0,$.jsx)(ua,{count:g}),t[26]=g,t[27]=A);let j;return t[28]!==k||t[29]!==A?(j=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[k,A]}),t[28]=k,t[29]=A,t[30]=j):j=t[30],j}function $i(e){let t=(0,Z.c)(34),{onAdd:n,placeholder:r,rejectionFlashKey:i,filePaths:a}=e,{_:c}=s(),[l,u]=(0,Q.useState)(``),d=ca(l),f=la(l,a),p=ga(i),m;t[0]!==n||t[1]!==l?(m=()=>{let e=l.trim();e.length!==0&&(n(e),u(``))},t[0]=n,t[1]=l,t[2]=m):m=t[2];let g=m,_;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>u(e.target.value),t[3]=_):_=t[3];let v;t[4]===g?v=t[5]:(v=e=>{e.key===`Enter`&&(e.preventDefault(),g())},t[4]=g,t[5]=v);let y;t[6]===c?y=t[7]:(y=c({id:`p9sdCy`}),t[6]=c,t[7]=y);let b=p?`border-destructive ring-2 ring-destructive/30 focus-visible:ring-destructive/50`:d.length>0?`border-amber-500/60 focus-visible:ring-amber-500/40`:``,S;t[8]===b?S=t[9]:(S=h(`h-8 text-sm`,b),t[8]=b,t[9]=S);let C=p?`true`:void 0,w;t[10]!==l||t[11]!==r||t[12]!==v||t[13]!==y||t[14]!==S||t[15]!==C?(w=(0,$.jsx)(Lt,{value:l,onChange:_,onKeyDown:v,placeholder:r,"aria-label":y,className:S,"data-testid":`settings-okignore-add-input`,"data-rejection-flashing":C}),t[10]=l,t[11]=r,t[12]=v,t[13]=y,t[14]=S,t[15]=C,t[16]=w):w=t[16];let T;t[17]===d?T=t[18]:(T=(0,$.jsx)(ea,{warnings:d}),t[17]=d,t[18]=T);let E;t[19]===l?E=t[20]:(E=l.trim(),t[19]=l,t[20]=E);let D=E.length===0,O;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(o,{id:`BY-g4_`}),t[21]=O):O=t[21];let k;t[22]!==g||t[23]!==D?(k=(0,$.jsx)(x,{size:`sm`,onClick:g,disabled:D,"data-testid":`settings-okignore-add-button`,children:O}),t[22]=g,t[23]=D,t[24]=k):k=t[24];let A;t[25]!==k||t[26]!==w||t[27]!==T?(A=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[w,T,k]}),t[25]=k,t[26]=w,t[27]=T,t[28]=A):A=t[28];let j;t[29]===f?j=t[30]:(j=(0,$.jsx)(ua,{count:f}),t[29]=f,t[30]=j);let M;return t[31]!==A||t[32]!==j?(M=(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5`,"data-testid":`settings-okignore-add`,children:[A,j]}),t[31]=A,t[32]=j,t[33]=M):M=t[33],M}function ea(e){let t=(0,Z.c)(31),{warnings:n}=e,{_:r}=s();if(n.length===0){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`flex w-4 shrink-0 justify-center`,"data-testid":`settings-okignore-warning-indicator`,"data-warnings":`0`}),t[0]=e):e=t[0],e}let i,a,o,c,l,u,d;t[1]!==r||t[2]!==n?(o=n.map(na).join(` `),a=w,i=S,d=!0,c=`status`,l=`polite`,u=r({id:`NORKZU`,values:{summary:o}}),t[1]=r,t[2]=n,t[3]=i,t[4]=a,t[5]=o,t[6]=c,t[7]=l,t[8]=u,t[9]=d):(i=t[3],a=t[4],o=t[5],c=t[6],l=t[7],u=t[8],d=t[9]);let f=String(n.length),p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(Pt,{"aria-hidden":`true`,className:`size-3.5`}),t[10]=p):p=t[10];let m;t[11]===o?m=t[12]:(m=(0,$.jsx)(`span`,{className:`sr-only`,children:o}),t[11]=o,t[12]=m);let h;t[13]!==c||t[14]!==l||t[15]!==u||t[16]!==f||t[17]!==m?(h=(0,$.jsxs)(`span`,{role:c,"aria-live":l,"aria-label":u,className:`flex w-4 shrink-0 cursor-help justify-center text-amber-500`,"data-testid":`settings-okignore-warning-indicator`,"data-warnings":f,children:[p,m]}),t[13]=c,t[14]=l,t[15]=u,t[16]=f,t[17]=m,t[18]=h):h=t[18];let g;t[19]!==i||t[20]!==d||t[21]!==h?(g=(0,$.jsx)(i,{asChild:d,children:h}),t[19]=i,t[20]=d,t[21]=h,t[22]=g):g=t[22];let _;t[23]===n?_=t[24]:(_=n.map(ta),t[23]=n,t[24]=_);let v;t[25]===_?v=t[26]:(v=(0,$.jsx)(C,{side:`top`,className:`max-w-xs`,children:(0,$.jsx)(`ul`,{className:`list-disc space-y-1 pl-4`,children:_})}),t[25]=_,t[26]=v);let y;return t[27]!==a||t[28]!==v||t[29]!==g?(y=(0,$.jsxs)(a,{children:[g,v]}),t[27]=a,t[28]=v,t[29]=g,t[30]=y):y=t[30],y}function ta(e){return(0,$.jsx)(`li`,{children:e.message},e.code)}function na(e){return e.message}function ra(e){let t=(0,Z.c)(4),{visible:n}=e,r;t[0]===n?r=t[1]:(r=n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Qe,{"aria-hidden":`true`,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`sr-only`,children:(0,$.jsx)(o,{id:`idD8Ev`})})]}):null,t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`flex w-4 shrink-0 justify-center text-emerald-600`,"data-testid":`settings-okignore-saved-indicator`,children:r}),t[2]=r,t[3]=i),i}function ia(e){return`okignore-pattern-${e}`}function aa(e){let t=e.match(/^okignore-pattern-(\d+)$/);if(!t)return-1;let n=Number.parseInt(t[1]??``,10);return Number.isNaN(n)?-1:n}function oa(e,t){return`${t}::${e}`}function sa(e){return!Le(e)||e.code!==`OKIGNORE_INVALID`?null:{detail:e.detail,lineNumber:e.lineNumber}}function ca(e){let t=(0,Z.c)(5),n;t[0]===e?n=t[1]:(n=()=>e.length===0?[]:Mi(e),t[0]=e,t[1]=n);let[r,i]=(0,Q.useState)(n),a,o;return t[2]===e?(a=t[3],o=t[4]):(a=()=>{if(e.length===0){i([]);return}let t=setTimeout(()=>{i(Mi(e))},Ii);return()=>clearTimeout(t)},o=[e],t[2]=e,t[3]=a,t[4]=o),(0,Q.useEffect)(a,o),r}function la(e,t){let n=(0,Z.c)(9),r;n[0]===e?r=n[1]:(r=e.trim(),n[0]=e,n[1]=r);let i=r,a;n[2]!==t||n[3]!==i?(a=()=>i.length===0?null:Ai(i,t),n[2]=t,n[3]=i,n[4]=a):a=n[4];let[o,s]=(0,Q.useState)(a),c,l;return n[5]!==t||n[6]!==i?(c=()=>{if(i.length===0){s(null);return}let e=setTimeout(()=>{s(Ai(i,t))},Li);return()=>clearTimeout(e)},l=[i,t],n[5]=t,n[6]=i,n[7]=c,n[8]=l):(c=n[7],l=n[8]),(0,Q.useEffect)(c,l),o}function ua(e){let t=(0,Z.c)(12),{count:n}=e;if(n===null){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`block h-3.5`,"data-testid":`settings-okignore-preview`,"data-preview-state":`hidden`}),t[0]=e):e=t[0],e}let r=n===0,i=String(n),a=r?`text-muted-foreground/70`:`text-muted-foreground`,s;t[1]===a?s=t[2]:(s=h(`block text-xs`,a),t[1]=a,t[2]=s);let c;t[3]===n?c=t[4]:(c=(0,$.jsx)(o,{id:`-3Qbv7`,values:{count:n}}),t[3]=n,t[4]=c);let l;t[5]===r?l=t[6]:(l=r?(0,$.jsx)(`span`,{className:`ml-1 text-muted-foreground/60`,children:(0,$.jsx)(o,{id:`5kWklo`})}):null,t[5]=r,t[6]=l);let u;return t[7]!==i||t[8]!==s||t[9]!==c||t[10]!==l?(u=(0,$.jsxs)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`settings-okignore-preview`,"data-preview-state":`visible`,"data-preview-count":i,className:s,children:[c,l]}),t[7]=i,t[8]=s,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function da(e,t,n){let r=[];for(let n of e){let e=t.get(n)?.docExt??`.md`;r.push(n+e)}for(let e of n)r.push(e);return r}function fa(){try{return globalThis.localStorage?.getItem(Vi)===`true`}catch{return!1}}function pa(e){try{globalThis.localStorage?.setItem(Vi,e?`true`:`false`)}catch(e){console.debug(`[OkignoreSection] localStorage unavailable; advanced toggle will not persist:`,e)}}function ma(){let e=(0,Z.c)(3),[t,n]=(0,Q.useState)(ha),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{n(e),pa(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function ha(){return fa()}function ga(e){let t=(0,Z.c)(3),[n,r]=(0,Q.useState)(!1),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(e===null)return;r(!0);let t=setTimeout(()=>r(!1),zi);return()=>clearTimeout(t)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,Q.useEffect)(i,a),n}function _a(e){return`editor:${e}`}var va=`skill`;function ya(e){let t=(0,Z.c)(11),{testId:n,children:r}=e,{_:i}=s(),a;t[0]===i?a=t[1]:(a=i({id:`2B6eYX`}),t[0]=i,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(Ot,{className:`size-3.5`}),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==n?(c=(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(x,{variant:`ghost`,size:`icon`,className:`mt-1.5 mr-1.5 h-6 w-6 shrink-0 text-muted-foreground opacity-60 hover:opacity-100`,"aria-label":a,"data-testid":n,children:o})}),t[3]=a,t[4]=n,t[5]=c):c=t[5];let l;t[6]===r?l=t[7]:(l=(0,$.jsx)(C,{side:`left`,className:`max-w-sm text-left`,children:(0,$.jsx)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:r})}),t[6]=r,t[7]=l);let u;return t[8]!==c||t[9]!==l?(u=(0,$.jsxs)(w,{children:[c,l]}),t[8]=c,t[9]=l,t[10]=u):u=t[10],u}function ba(e){let t=(0,Z.c)(5),{followUp:n,testId:r}=e;if(n===`none`)return null;let i;t[0]===n?i=t[1]:(i=n===`approve-once`?(0,$.jsx)(o,{id:`HTW0Zw`,components:{0:(0,$.jsx)(`code`,{className:`inline-code`})}}):n===`enable-manually`?(0,$.jsx)(o,{id:`NNJsn7`}):(0,$.jsx)(o,{id:`n8DwqQ`}),t[0]=n,t[1]=i);let a;return t[2]!==i||t[3]!==r?(a=(0,$.jsx)(`span`,{role:`status`,className:`text-xs text-amber-600 dark:text-amber-400`,"data-testid":r,children:i}),t[2]=i,t[3]=r,t[4]=a):a=t[4],a}function xa(){let e=(0,Z.c)(29),{_:t}=s(),n=typeof window<`u`?window.okDesktop??null:null,[r,i]=(0,Q.useState)(null),[a,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d,f;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{if(!n)return;let e=!1;return n.projectIntegrations.status().then(t=>{e||i(t)}).catch(()=>{e||c(!0)}),()=>{e=!0}},f=[n],e[0]=d,e[1]=f):(d=e[0],f=e[1]),(0,Q.useEffect)(d,f);let p;e[2]===t?p=e[3]:(p=async function(e,r){if(n){u(e.kind===`editor`?_a(e.id):va);try{let t=await n.projectIntegrations.setComponent({component:e,enabled:r});i(t.status),t.ok||X.error(t.error)}catch(e){let n=e;X.error(t({id:`gfdqcY`,values:{0:n instanceof Error?n.message:String(n)}}))}u(null)}},e[2]=t,e[3]=p);let m=p,h;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`h3`,{id:`settings-project-ai-tools-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`crqzW5`})}),e[4]=h):h=e[4];let g;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[h,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`ZYtq3m`})})]}),e[5]=g):g=e[5];let _=g;if(!n||a){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-project-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`project-ai-tools-unavailable`,children:(0,$.jsx)(o,{id:`g4WlQK`})})]}),e[6]=t):t=e[6],t}if(r===null){let t;return e[7]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-project-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsxs)(`div`,{className:`space-y-2`,"data-testid":`project-ai-tools-loading`,children:[(0,$.jsx)(cn,{className:`h-10 w-full`}),(0,$.jsx)(cn,{className:`h-10 w-full`})]})]}),e[7]=t):t=e[7],t}if(!r.hasProject){let t;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-project-ai-tools-title`,className:`space-y-4`,children:[_,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,"data-testid":`project-ai-tools-no-project`,children:(0,$.jsx)(o,{id:`yaPGPa`})})]}),e[8]=t):t=e[8],t}let v=l!==null||!r.available,y;e[9]===r.available?y=e[10]:(y=!r.available&&(0,$.jsx)(`p`,{className:`text-sm text-amber-600 dark:text-amber-400`,"data-testid":`project-ai-tools-read-only`,children:(0,$.jsx)(o,{id:`_NX6gG`})}),e[9]=r.available,e[10]=y);let b;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`psfGPX`})}),e[11]=b):b=e[11];let x;if(e[12]!==m||e[13]!==v||e[14]!==r.editors){let t;e[16]!==m||e[17]!==v?(t=e=>(0,$.jsx)(Ca,{editor:e,busy:v,onToggle:t=>void m({kind:`editor`,id:e.id},t)},e.id),e[16]=m,e[17]=v,e[18]=t):t=e[18],x=r.editors.map(t),e[12]=m,e[13]=v,e[14]=r.editors,e[15]=x}else x=e[15];let S;e[19]===x?S=e[20]:(S=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[b,(0,$.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 divide-y divide-border overflow-hidden`,children:x})]}),e[19]=x,e[20]=S);let C;e[21]!==m||e[22]!==v||e[23]!==r.skill?(C=r.skill!==null&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:(0,$.jsx)(o,{id:`LtiJ5c`})}),(0,$.jsx)(`ul`,{className:`rounded-md border border-border bg-card/50 overflow-hidden`,children:(0,$.jsxs)(`li`,{className:`flex items-start hover:bg-accent`,children:[(0,$.jsxs)(V,{htmlFor:`project-ai-tools-skill`,className:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,children:[(0,$.jsx)(I,{id:`project-ai-tools-skill`,checked:r.skill.installed,disabled:v,onCheckedChange:()=>void m({kind:`skill`},!r.skill?.installed),className:`mt-0.5`,"data-testid":`project-ai-tools-skill-checkbox`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:(0,$.jsx)(`code`,{children:`open-knowledge`})}),(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:(0,$.jsx)(o,{id:`khCa4M`})})]})]}),(0,$.jsxs)(ya,{testId:`project-ai-tools-skill-info`,children:[(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`HSh8u_`})}),r.skill.paths.map(Sa)]})]})})]}),e[21]=m,e[22]=v,e[23]=r.skill,e[24]=C):C=e[24];let w;return e[25]!==y||e[26]!==S||e[27]!==C?(w=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-project-ai-tools-title`,className:`space-y-4`,children:[_,y,S,C]}),e[25]=y,e[26]=S,e[27]=C,e[28]=w):w=e[28],w}function Sa(e){return(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:e})},e)}function Ca(e){let t=(0,Z.c)(45),{editor:n,busy:r,onToggle:i}=e,{_:a}=s(),c=n.state===`installed`||n.state===`foreign`,l=r||n.state===`unmanageable`,u;t[0]!==a||t[1]!==n.state?(u=n.state===`installed`?a({id:`eQkgKV`}):n.state===`foreign`?a({id:`AczYxH`}):n.state===`unmanageable`?a({id:`CXTwen`}):null,t[0]=a,t[1]=n.state,t[2]=u):u=t[2];let d=u,f=n.state===`foreign`||n.state===`unmanageable`?`text-xs text-amber-600 dark:text-amber-400`:`text-xs text-muted-foreground`,p=l?`flex items-start`:`flex items-start hover:bg-accent`,m=`project-ai-tools-editor-${n.id}`,h=l?`flex flex-1 items-start gap-2.5 px-3 py-2.5 font-normal`:`flex flex-1 cursor-pointer items-start gap-2.5 px-3 py-2.5 font-normal`,g=`project-ai-tools-editor-${n.id}`,_;t[3]!==c||t[4]!==i?(_=()=>i(!c),t[3]=c,t[4]=i,t[5]=_):_=t[5];let v=`project-ai-tools-editor-checkbox-${n.id}`,y;t[6]!==c||t[7]!==l||t[8]!==g||t[9]!==_||t[10]!==v?(y=(0,$.jsx)(I,{id:g,checked:c,disabled:l,onCheckedChange:_,className:`mt-0.5`,"data-testid":v}),t[6]=c,t[7]=l,t[8]=g,t[9]=_,t[10]=v,t[11]=y):y=t[11];let b;t[12]===n.label?b=t[13]:(b=(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:n.label}),t[12]=n.label,t[13]=b);let x;t[14]!==n.id||t[15]!==f||t[16]!==d?(x=d!==null&&(0,$.jsx)(`span`,{className:f,"data-testid":`project-ai-tools-editor-status-${n.id}`,children:d}),t[14]=n.id,t[15]=f,t[16]=d,t[17]=x):x=t[17];let S;t[18]!==c||t[19]!==n.followUp||t[20]!==n.id?(S=c&&(0,$.jsx)(ba,{followUp:n.followUp,testId:`project-ai-tools-editor-followup-${n.id}`}),t[18]=c,t[19]=n.followUp,t[20]=n.id,t[21]=S):S=t[21];let C;t[22]!==x||t[23]!==S||t[24]!==b?(C=(0,$.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[b,x,S]}),t[22]=x,t[23]=S,t[24]=b,t[25]=C):C=t[25];let w;t[26]!==C||t[27]!==m||t[28]!==h||t[29]!==y?(w=(0,$.jsxs)(V,{htmlFor:m,className:h,children:[y,C]}),t[26]=C,t[27]=m,t[28]=h,t[29]=y,t[30]=w):w=t[30];let T=`project-ai-tools-editor-info-${n.id}`,E;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`p`,{className:`opacity-70`,children:(0,$.jsx)(o,{id:`J2eKUI`})}),t[31]=E):E=t[31];let D;t[32]===n.configPath?D=t[33]:(D=(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:n.configPath})}),t[32]=n.configPath,t[33]=D);let O;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`p`,{className:`pt-1 opacity-70`,children:(0,$.jsx)(o,{id:`VIwCaD`})}),t[34]=O):O=t[34];let k;t[35]===n.entryLocator?k=t[36]:(k=(0,$.jsx)(`p`,{children:(0,$.jsx)(`code`,{className:`break-all`,children:n.entryLocator})}),t[35]=n.entryLocator,t[36]=k);let A;t[37]!==T||t[38]!==D||t[39]!==k?(A=(0,$.jsxs)(ya,{testId:T,children:[E,D,O,k]}),t[37]=T,t[38]=D,t[39]=k,t[40]=A):A=t[40];let j;return t[41]!==w||t[42]!==A||t[43]!==p?(j=(0,$.jsxs)(`li`,{className:p,children:[w,A]}),t[41]=w,t[42]=A,t[43]=p,t[44]=j):j=t[44],j}function wa(e){let t=(0,Z.c)(68),{config:n}=e,{state:r,refresh:i}=at(``),[a,s]=(0,Q.useState)(null),[c,l]=(0,Q.useState)(!1),u=Vt(),d;t[0]===u?d=t[1]:(d=function(e,t){Tn(qt(e,t)),u.close()},t[0]=u,t[1]=d);let f=d,p,m,h,g,_,v,y,b,x;if(t[2]!==n||t[3]!==c||t[4]!==f||t[5]!==i||t[6]!==r){x=Symbol.for(`react.early_return_sentinel`);bb0:{let e=r.status===`ready`?(r.data.folder.templates_available??[]).filter(e=>e.scope===n.scope).sort(Ea):[];if(r.status===`error`){let{loadErrorTitle:e}=n,{message:a}=r,s=`settings-${n.testIdPrefix}-section`,u;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>l(!0),t[16]=u):u=t[16];let d;t[17]===n?d=t[18]:(d=(0,$.jsx)(Da,{config:n,onNewClick:u}),t[17]=n,t[18]=d);let p;t[19]!==e||t[20]!==a?(p=(0,$.jsx)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive`,role:`alert`,children:(0,$.jsx)(o,{id:`uH_S-u`,values:{loadErrorTitle:e,message:a}})}),t[19]=e,t[20]=a,t[21]=p):p=t[21];let m;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(m=new Set,t[22]=m):m=t[22];let h;t[23]!==f||t[24]!==i?(h=e=>{i(),f(``,e)},t[23]=f,t[24]=i,t[25]=h):h=t[25];let g;t[26]!==c||t[27]!==h?(g=(0,$.jsx)(lt,{folderPath:``,existingNames:m,open:c,onOpenChange:l,onCreated:h}),t[26]=c,t[27]=h,t[28]=g):g=t[28];let _;t[29]!==n.settingsId||t[30]!==s||t[31]!==d||t[32]!==p||t[33]!==g?(_=(0,$.jsxs)(`section`,{className:`space-y-3`,"aria-labelledby":n.settingsId,"data-testid":s,children:[d,p,g]}),t[29]=n.settingsId,t[30]=s,t[31]=d,t[32]=p,t[33]=g,t[34]=_):_=t[34],x=_;break bb0}if(r.status===`idle`||r.status===`loading`){let e=`settings-${n.testIdPrefix}-section`,r;t[35]===n?r=t[36]:(r=(0,$.jsx)(Da,{config:n}),t[35]=n,t[36]=r);let i;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(`div`,{className:`rounded-lg border bg-card p-3 space-y-2`,children:[(0,$.jsx)(cn,{className:`h-12 w-full`}),(0,$.jsx)(cn,{className:`h-12 w-full`})]}),t[37]=i):i=t[37];let a;t[38]!==n.settingsId||t[39]!==e||t[40]!==r?(a=(0,$.jsxs)(`section`,{className:`space-y-3`,"aria-labelledby":n.settingsId,"data-testid":e,children:[r,i]}),t[38]=n.settingsId,t[39]=e,t[40]=r,t[41]=a):a=t[41],x=a;break bb0}g=`space-y-3`,_=n.settingsId,v=`settings-${n.testIdPrefix}-section`;let a;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>l(!0),t[42]=a):a=t[42],t[43]===n?y=t[44]:(y=(0,$.jsx)(Da,{config:n,onNewClick:a}),t[43]=n,t[44]=y);let u=e.length===0?(0,$.jsx)(`p`,{className:`px-3 py-4 text-sm text-muted-foreground`,"data-testid":`settings-${n.testIdPrefix}-empty`,children:n.emptyMessage}):(0,$.jsx)(`ul`,{className:`space-y-1 p-2`,"data-testid":`settings-${n.testIdPrefix}-list`,children:e.map(e=>(0,$.jsx)(ot,{template:e,onEdit:()=>f(e.source_folder,e.name),onDelete:()=>s(e),badge:(0,$.jsx)(Jt,{variant:n.badge.variant,className:`text-2xs`,children:n.badge.label})},e.name))});t[45]===u?b=t[46]:(b=(0,$.jsx)(`div`,{className:`rounded-lg border bg-card`,children:u}),t[45]=u,t[46]=b),p=lt,m=``,h=new Set(e.map(Ta))}t[2]=n,t[3]=c,t[4]=f,t[5]=i,t[6]=r,t[7]=p,t[8]=m,t[9]=h,t[10]=g,t[11]=_,t[12]=v,t[13]=y,t[14]=b,t[15]=x}else p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],v=t[12],y=t[13],b=t[14],x=t[15];if(x!==Symbol.for(`react.early_return_sentinel`))return x;let S;t[47]!==f||t[48]!==i?(S=e=>{i(),f(``,e)},t[47]=f,t[48]=i,t[49]=S):S=t[49];let C;t[50]!==p||t[51]!==c||t[52]!==S||t[53]!==m||t[54]!==h?(C=(0,$.jsx)(p,{folderPath:m,existingNames:h,open:c,onOpenChange:l,onCreated:S}),t[50]=p,t[51]=c,t[52]=S,t[53]=m,t[54]=h,t[55]=C):C=t[55];let w;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{e||s(null)},t[56]=w):w=t[56];let T;t[57]!==a||t[58]!==i?(T=(0,$.jsx)(st,{template:a,onOpenChange:w,onDeleted:i}),t[57]=a,t[58]=i,t[59]=T):T=t[59];let E;return t[60]!==C||t[61]!==T||t[62]!==g||t[63]!==_||t[64]!==v||t[65]!==y||t[66]!==b?(E=(0,$.jsxs)(`section`,{className:g,"aria-labelledby":_,"data-testid":v,children:[y,b,C,T]}),t[60]=C,t[61]=T,t[62]=g,t[63]=_,t[64]=v,t[65]=y,t[66]=b,t[67]=E):E=t[67],E}function Ta(e){return e.name}function Ea(e,t){return(e.title??e.name).toLowerCase().localeCompare((t.title??t.name).toLowerCase())}function Da(e){let t=(0,Z.c)(14),{config:n,onNewClick:r}=e,i;t[0]!==n.settingsId||t[1]!==n.title?(i=(0,$.jsx)(`h3`,{id:n.settingsId,className:`text-base font-semibold`,children:n.title}),t[0]=n.settingsId,t[1]=n.title,t[2]=i):i=t[2];let a;t[3]===n.description?a=t[4]:(a=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n.description}),t[3]=n.description,t[4]=a);let s;t[5]!==i||t[6]!==a?(s=(0,$.jsxs)(`div`,{children:[i,a]}),t[5]=i,t[6]=a,t[7]=s):s=t[7];let c;t[8]!==n.testIdPrefix||t[9]!==r?(c=r?(0,$.jsxs)(x,{variant:`outline`,size:`sm`,className:`font-mono uppercase shrink-0`,onClick:r,"data-testid":`settings-${n.testIdPrefix}-new-button`,children:[(0,$.jsx)(m,{className:`size-3.5`,"aria-hidden":!0}),(0,$.jsx)(o,{id:`G1Gw0v`})]}):null,t[8]=n.testIdPrefix,t[9]=r,t[10]=c):c=t[10];let l;return t[11]!==s||t[12]!==c?(l=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[s,c]}),t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function Oa(){let e=(0,Z.c)(16),{_:t}=s(),n;e[0]===t?n=e[1]:(n=t({id:`hBMK4W`}),e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(o,{id:`nft48x`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`})}}),e[2]=r):r=e[2];let i;e[3]===t?i=e[4]:(i=t({id:`6Pxqwv`}),e[3]=t,e[4]=i);let a;e[5]===t?a=e[6]:(a=t({id:`BD0XSC`}),e[5]=t,e[6]=a);let c;e[7]===t?c=e[8]:(c=t({id:`ysxgu8`}),e[7]=t,e[8]=c);let l;e[9]===c?l=e[10]:(l={label:c,variant:`gray`},e[9]=c,e[10]=l);let u;return e[11]!==n||e[12]!==i||e[13]!==a||e[14]!==l?(u=(0,$.jsx)(wa,{config:{scope:`local`,title:n,description:r,emptyMessage:i,loadErrorTitle:a,badge:l,settingsId:`settings-project-templates-title`,testIdPrefix:`project-templates`}}),e[11]=n,e[12]=i,e[13]=a,e[14]=l,e[15]=u):u=e[15],u}async function ka(e){try{let t=Me.safeParse(await e.json());if(t.success)return t.data.title}catch{}}async function Aa(e,t){try{let n=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)});return n.ok?{ok:!0}:{ok:!1,error:await ka(n)}}catch{return{ok:!1}}}function ja(){return{setKey:e=>Aa(`/api/local-op/embeddings/set-key`,{key:e}),clearKey:()=>Aa(`/api/local-op/embeddings/clear-key`,{}),async testConnection(){try{let e=await fetch(`/api/local-op/embeddings/test`,{method:`POST`,headers:{"content-type":`application/json`},body:`{}`});if(!e.ok)return null;let t=Ee.safeParse(await e.json());return t.success?t.data:null}catch{return null}}}}var Ma=[2500,5e3];function Na(e){let t=(0,Z.c)(160),{transport:n}=e,{_:r}=s(),{projectLocalConfig:i,projectLocalSynced:a,projectLocalBinding:c}=Yt(),{status:l,refresh:u}=nt(),d;t[0]===n?d=t[1]:(d=n??ja(),t[0]=n,t[1]=d);let f=d,[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(null),[_,v]=(0,Q.useState)(!1),y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[2]=y):y=t[2];let b=(0,Q.useRef)(y),S,C;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>()=>{for(let e of b.current)clearTimeout(e)},C=[],t[3]=S,t[4]=C):(S=t[3],C=t[4]),(0,Q.useEffect)(S,C);let w=i?.search?.semantic?.baseUrl??`https://api.openai.com/v1`,O=i?.search?.semantic?.model??`text-embedding-3-small`,[k,A]=(0,Q.useState)(w),[j,M]=(0,Q.useState)(O),[N,P]=(0,Q.useState)(null),[F,I]=(0,Q.useState)(null),[L,R]=(0,Q.useState)(!1),[z,B]=(0,Q.useState)(null),V;t[5]!==w||t[6]!==O?(V={baseUrl:w,model:O},t[5]=w,t[6]=O,t[7]=V):V=t[7];let[H,ee]=(0,Q.useState)(V);(w!==H.baseUrl||O!==H.model)&&(ee({baseUrl:w,model:O}),A(w),M(O),v(!1),g(null),B(null));let U=i?.search?.semantic?.enabled??!1,te=a&&c!==null,ne=F??(w!==`https://api.openai.com/v1`||O!==`text-embedding-3-small`),re;t[8]===u?re=t[9]:(re=function(){for(let e of b.current)clearTimeout(e);b.current=Ma.map(e=>setTimeout(u,e))},t[8]=u,t[9]=re);let W=re,G;t[10]!==r||t[11]!==c||t[12]!==u||t[13]!==W?(G=function(e){if(c===null)return X.error(r({id:`YW7Q86`})),!1;let t=c.patch({search:{semantic:{enabled:e}}});if(!t.ok){let n=je(t.error);return X.error(r(e?{id:`LYufDw`,values:{detail:n}}:{id:`5mksg0`,values:{detail:n}})),!1}return u(),W(),!0},t[10]=r,t[11]=c,t[12]=u,t[13]=W,t[14]=G):G=t[14];let K=G,J;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(J=function(e){return e.trim()||`https://api.openai.com/v1`},t[15]=J):J=t[15];let ie=J,ae;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ae=function(e){return e.trim()||`text-embedding-3-small`},t[16]=ae):ae=t[16];let oe=ae,Y;t[17]!==r||t[18]!==c||t[19]!==u||t[20]!==W?(Y=function(e){if(c===null)return X.error(r({id:`YW7Q86`})),!1;let t=c.patch({search:{semantic:{baseUrl:e.baseUrl,model:e.model}}});if(!t.ok){let e=je(t.error);return X.error(r({id:`aQD_86`,values:{detail:e}})),!1}return B(null),u(),W(),!0},t[17]=r,t[18]=c,t[19]=u,t[20]=W,t[21]=Y):Y=t[21];let se=Y,ce;t[22]!==w||t[23]!==O?(ce=function(e){e.baseUrl===w&&e.model===O||P(e)},t[22]=w,t[23]=O,t[24]=ce):ce=t[24];let le=ce,ue;t[25]!==N||t[26]!==se?(ue=function(){N&&se(N)&&P(null)},t[25]=N,t[26]=se,t[27]=ue):ue=t[27];let de=ue,fe;t[28]!==w||t[29]!==O?(fe=function(){P(null),A(w),M(O),g(null)},t[28]=w,t[29]=O,t[30]=fe):fe=t[30];let pe=fe,me;t[31]!==f||t[32]!==L?(me=async function(){if(L)return;R(!0),B(null);let e;try{e=await f.testConnection()}catch{e=null}R(!1),B({response:e})},t[31]=f,t[32]=L,t[33]=me):me=t[33];let he=me,ge;t[34]===K?ge=t[35]:(ge=function(e){if(e){m(!0);return}K(!1)},t[34]=K,t[35]=ge);let _e=ge,ve;t[36]===K?ve=t[37]:(ve=function(){K(!0)&&m(!1)},t[36]=K,t[37]=ve);let ye=ve,be;t[38]===r?be=t[39]:(be=function(e){let t=e.trim();if(!t)return null;let n=Oe(t);return n===null?null:r(n===`invalid-url`?{id:`2j1kfc`}:{id:`JM_aq-`})},t[38]=r,t[39]=be);let xe=be,Se;t[40]!==xe||t[41]!==_?(Se=function(e){A(e),_&&g(xe(e))},t[40]=xe,t[41]=_,t[42]=Se):Se=t[42];let Te=Se,Ee;t[43]!==k||t[44]!==xe||t[45]!==j||t[46]!==le?(Ee=function(){v(!0);let e=xe(k);g(e),e===null&&le({baseUrl:ie(k),model:oe(j)})},t[43]=k,t[44]=xe,t[45]=j,t[46]=le,t[47]=Ee):Ee=t[47];let De=Ee,ke=l?.enabled??!1,Ae=l?.keyPresent??!1,Me=l?.keyNotRequired??!1,Ne=l?.keyHint??null,Pe=l?.keySource??null,Fe=l?.ready??!1,Ie=l?.capable??!1,Le=l?.embedded??0,Re=l?.total??0,ze;t[48]===w?ze=t[49]:(ze=Ba(w)??w,t[48]=w,t[49]=ze);let Be=ze,Ve;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,$.jsx)(`h3`,{id:`settings-search-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`3y6XTb`})}),t[50]=Ve):Ve=t[50];let He;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[Ve,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`dUQ7_J`})})]}),t[51]=He):He=t[51];let Ue;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,$.jsx)(`label`,{htmlFor:`settings-search-semantic-toggle`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`3y6XTb`})}),t[52]=Ue):Ue=t[52];let We;t[53]===U?We=t[54]:(We=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[Ue,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,"data-testid":`settings-search-body`,children:U?(0,$.jsx)(o,{id:`stlgky`}):(0,$.jsx)(o,{id:`kdzzOK`})})]}),t[53]=U,t[54]=We);let Ge=!te,Ke;t[55]!==r||t[56]!==U?(Ke=r(U?{id:`fNr-MX`}:{id:`Aif3E7`}),t[55]=r,t[56]=U,t[57]=Ke):Ke=t[57];let qe;t[58]!==U||t[59]!==_e||t[60]!==Ge||t[61]!==Ke?(qe=(0,$.jsx)(q,{id:`settings-search-semantic-toggle`,checked:U,disabled:Ge,onCheckedChange:_e,"aria-label":Ke,"data-testid":`settings-search-semantic-toggle`}),t[58]=U,t[59]=_e,t[60]=Ge,t[61]=Ke,t[62]=qe):qe=t[62];let Je;t[63]!==We||t[64]!==qe?(Je=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[We,qe]}),t[63]=We,t[64]=qe,t[65]=Je):Je=t[65];let Ye;t[66]!==Ie||t[67]!==Le||t[68]!==U||t[69]!==Me||t[70]!==Ae||t[71]!==Fe||t[72]!==ke||t[73]!==l||t[74]!==Re?(Ye=U?(0,$.jsx)(Fa,{loaded:l!==null,serverEnabled:ke,keyPresent:Ae,keyNotRequired:Me,ready:Fe,capable:Ie,embedded:Le,total:Re}):null,t[66]=Ie,t[67]=Le,t[68]=U,t[69]=Me,t[70]=Ae,t[71]=Fe,t[72]=ke,t[73]=l,t[74]=Re,t[75]=Ye):Ye=t[75];let Xe;t[76]!==Je||t[77]!==Ye?(Xe=(0,$.jsxs)(`div`,{className:`rounded-md border p-3`,children:[Je,Ye]}),t[76]=Je,t[77]=Ye,t[78]=Xe):Xe=t[78];let Ze=l!==null,Qe;t[79]!==Be||t[80]!==Ne||t[81]!==Me||t[82]!==Ae||t[83]!==Pe||t[84]!==u||t[85]!==f||t[86]!==Ze?(Qe=(0,$.jsx)(Pa,{transport:f,refresh:u,endpointHost:Be,keyPresent:Ae,keyHint:Ne,keySource:Pe,keyNotRequired:Me,loaded:Ze}),t[79]=Be,t[80]=Ne,t[81]=Me,t[82]=Ae,t[83]=Pe,t[84]=u,t[85]=f,t[86]=Ze,t[87]=Qe):Qe=t[87];let et;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,$.jsxs)(E,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`settings-search-custom-endpoint-trigger`,children:[(0,$.jsx)(o,{id:`Hp4rRh`}),(0,$.jsx)($e,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[88]=et):et=t[88];let tt;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`kRTXGw`})}),t[89]=tt):tt=t[89];let rt;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,$.jsx)(`label`,{htmlFor:`settings-search-base-url`,className:`block text-sm font-medium`,children:(0,$.jsx)(o,{id:`FCKppt`})}),t[90]=rt):rt=t[90];let it;t[91]===Te?it=t[92]:(it=e=>Te(e.currentTarget.value),t[91]=Te,t[92]=it);let at;t[93]===De?at=t[94]:(at=e=>{e.key===`Enter`&&(e.preventDefault(),De())},t[93]=De,t[94]=at);let ot=!te,st=h!==null,ct;t[95]!==k||t[96]!==De||t[97]!==it||t[98]!==at||t[99]!==ot||t[100]!==st?(ct=(0,$.jsx)(Lt,{id:`settings-search-base-url`,value:k,onChange:it,onBlur:De,onKeyDown:at,placeholder:we,disabled:ot,spellCheck:!1,autoComplete:`off`,"aria-invalid":st,"aria-describedby":`settings-search-base-url-message`,"data-testid":`settings-search-base-url`,className:`h-8 font-mono text-sm`}),t[95]=k,t[96]=De,t[97]=it,t[98]=at,t[99]=ot,t[100]=st,t[101]=ct):ct=t[101];let lt=h?`text-1sm text-destructive`:`text-muted-foreground text-1sm`,ut=h?`settings-search-base-url-error`:`settings-search-base-url-help`,dt;t[102]===h?dt=t[103]:(dt=h??(0,$.jsx)(o,{id:`lHCR4I`}),t[102]=h,t[103]=dt);let ft;t[104]!==lt||t[105]!==ut||t[106]!==dt?(ft=(0,$.jsx)(`p`,{id:`settings-search-base-url-message`,"aria-live":`polite`,className:lt,"data-testid":ut,children:dt}),t[104]=lt,t[105]=ut,t[106]=dt,t[107]=ft):ft=t[107];let pt;t[108]!==ct||t[109]!==ft?(pt=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[rt,ct,ft]}),t[108]=ct,t[109]=ft,t[110]=pt):pt=t[110];let mt;t[111]===Symbol.for(`react.memo_cache_sentinel`)?(mt=(0,$.jsx)(`label`,{htmlFor:`settings-search-model`,className:`block text-sm font-medium`,children:(0,$.jsx)(o,{id:`scu3wk`})}),t[111]=mt):mt=t[111];let ht;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(ht=e=>M(e.currentTarget.value),t[112]=ht):ht=t[112];let gt;t[113]===De?gt=t[114]:(gt=e=>{e.key===`Enter`&&(e.preventDefault(),De())},t[113]=De,t[114]=gt);let _t=!te,vt;t[115]!==De||t[116]!==j||t[117]!==gt||t[118]!==_t?(vt=(0,$.jsx)(Lt,{id:`settings-search-model`,value:j,onChange:ht,onBlur:De,onKeyDown:gt,placeholder:Ce,disabled:_t,spellCheck:!1,autoComplete:`off`,"aria-describedby":`settings-search-model-help`,"data-testid":`settings-search-model`,className:`h-8 font-mono text-sm`}),t[115]=De,t[116]=j,t[117]=gt,t[118]=_t,t[119]=vt):vt=t[119];let yt;t[120]===Symbol.for(`react.memo_cache_sentinel`)?(yt=(0,$.jsx)(`p`,{id:`settings-search-model-help`,className:`text-muted-foreground text-1sm`,"data-testid":`settings-search-model-help`,children:(0,$.jsx)(o,{id:`C-mmmK`,values:{DEFAULT_EMBEDDINGS_MODEL:Ce}})}),t[120]=yt):yt=t[120];let bt;t[121]===vt?bt=t[122]:(bt=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[mt,vt,yt]}),t[121]=vt,t[122]=bt);let xt;t[123]===he?xt=t[124]:(xt=()=>void he(),t[123]=he,t[124]=xt);let St=L||!te,Ct;t[125]===L?Ct=t[126]:(Ct=L?(0,$.jsx)(o,{id:`qIJIrD`}):(0,$.jsx)(o,{id:`e2zZ3E`}),t[125]=L,t[126]=Ct);let wt;t[127]!==xt||t[128]!==St||t[129]!==Ct?(wt=(0,$.jsx)(x,{variant:`outline`,onClick:xt,disabled:St,"data-testid":`settings-search-test-connection`,children:Ct}),t[127]=xt,t[128]=St,t[129]=Ct,t[130]=wt):wt=t[130];let Tt;t[131]!==w||t[132]!==O||t[133]!==z||t[134]!==L?(Tt=(0,$.jsx)(Ia,{result:z,testing:L,configuredBaseUrl:w,configuredModel:O}),t[131]=w,t[132]=O,t[133]=z,t[134]=L,t[135]=Tt):Tt=t[135];let Et;t[136]!==wt||t[137]!==Tt?(Et=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[wt,Tt]}),t[136]=wt,t[137]=Tt,t[138]=Et):Et=t[138];let Dt;t[139]!==pt||t[140]!==bt||t[141]!==Et?(Dt=(0,$.jsxs)(T,{className:`space-y-4 border-t px-3 py-3`,children:[tt,pt,bt,Et]}),t[139]=pt,t[140]=bt,t[141]=Et,t[142]=Dt):Dt=t[142];let Ot;t[143]!==ne||t[144]!==Dt?(Ot=(0,$.jsxs)(D,{open:ne,onOpenChange:I,className:`rounded-md border`,"data-testid":`settings-search-custom-endpoint`,children:[et,Dt]}),t[143]=ne,t[144]=Dt,t[145]=Ot):Ot=t[145];let kt;t[146]!==p||t[147]!==ye?(kt=(0,$.jsx)(Va,{open:p,onOpenChange:m,onConfirm:ye}),t[146]=p,t[147]=ye,t[148]=kt):kt=t[148];let At;t[149]!==pe||t[150]!==de||t[151]!==N||t[152]!==Re?(At=(0,$.jsx)(za,{pending:N,pageCount:Re,onCancel:pe,onConfirm:de}),t[149]=pe,t[150]=de,t[151]=N,t[152]=Re,t[153]=At):At=t[153];let jt;return t[154]!==Xe||t[155]!==Qe||t[156]!==Ot||t[157]!==kt||t[158]!==At?(jt=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-search-title`,className:`space-y-3`,"data-testid":`settings-search`,children:[He,Xe,Qe,Ot,kt,At]}),t[154]=Xe,t[155]=Qe,t[156]=Ot,t[157]=kt,t[158]=At,t[159]=jt):jt=t[159],jt}function Pa(e){let t=(0,Z.c)(31),{transport:n,refresh:r,endpointHost:i,keyPresent:a,keyHint:c,keySource:l,keyNotRequired:u,loaded:d}=e,{_:f}=s(),[p,m]=(0,Q.useState)(``),[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(null),y;t[0]!==f||t[1]!==h||t[2]!==p||t[3]!==r||t[4]!==n?(y=async function(){let e=p.trim();if(!e||h)return;g(!0),v(null);let t=await n.setKey(e);g(!1),t.ok?(m(``),r()):v(t.error??f({id:`Ck9XRt`}))},t[0]=f,t[1]=h,t[2]=p,t[3]=r,t[4]=n,t[5]=y):y=t[5];let b=y,S;t[6]!==f||t[7]!==h||t[8]!==r||t[9]!==n?(S=async function(){if(h)return;g(!0),v(null);let e=await n.clearKey();g(!1),e.ok?r():v(e.error??f({id:`CSL0l1`}))},t[6]=f,t[7]=h,t[8]=r,t[9]=n,t[10]=S):S=t[10];let C=S,w;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`2pR7ad`})}),t[11]=w):w=t[11];let T;t[12]!==i||t[13]!==u?(T=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[w,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:u?(0,$.jsx)(o,{id:`k8xtrB`,values:{endpointHost:i},components:{0:(0,$.jsx)(`span`,{className:`font-medium`})}}):(0,$.jsx)(o,{id:`RhX_1U`,values:{endpointHost:i},components:{0:(0,$.jsx)(`span`,{className:`font-medium`}),1:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]}),t[12]=i,t[13]=u,t[14]=T):T=t[14];let E;t[15]!==f||t[16]!==h||t[17]!==c||t[18]!==p||t[19]!==a||t[20]!==l||t[21]!==d||t[22]!==C||t[23]!==b?(E=l===`env`?(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,"data-testid":`settings-search-key-env`,children:(0,$.jsx)(o,{id:`KH5bQi`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})}):(0,$.jsxs)($.Fragment,{children:[a?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,"data-testid":`settings-search-key-set`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`div`,{className:`mb-1.5 text-sm font-medium`,children:(0,$.jsx)(o,{id:`AqnqMJ`})}),c?(0,$.jsxs)(`p`,{className:`truncate font-mono text-muted-foreground text-xs`,title:f({id:`qEIFZu`,values:{keyHint:c}}),"data-testid":`settings-search-key-hint`,children:[(0,$.jsx)(`span`,{"aria-hidden":`true`,children:`••••••••`}),c]}):null]}),(0,$.jsx)(x,{variant:`outline`,onClick:()=>void C(),disabled:h,"data-testid":`settings-search-key-clear`,children:(0,$.jsx)(o,{id:`xCJdfg`})})]}):null,(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`label`,{htmlFor:`settings-search-key-input`,className:`mb-2 block text-sm font-medium`,children:a?(0,$.jsx)(o,{id:`UW93oq`}):(0,$.jsx)(o,{id:`K6jxcj`})}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Lt,{id:`settings-search-key-input`,type:`password`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),b())},placeholder:f({id:`tsiTqO`}),autoComplete:`off`,spellCheck:!1,disabled:h||!d,"data-testid":`settings-search-key-input`,className:`h-8 font-mono text-sm`}),(0,$.jsx)(x,{onClick:()=>void b(),disabled:h||p.trim().length===0,"data-testid":`settings-search-key-save`,children:h?(0,$.jsx)(o,{id:`uF9ruK`}):(0,$.jsx)(o,{id:`tfDRzk`})})]})]})]}),t[15]=f,t[16]=h,t[17]=c,t[18]=p,t[19]=a,t[20]=l,t[21]=d,t[22]=C,t[23]=b,t[24]=E):E=t[24];let D;t[25]===_?D=t[26]:(D=_?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,"data-testid":`settings-search-key-error`,children:_}):null,t[25]=_,t[26]=D);let O;return t[27]!==T||t[28]!==E||t[29]!==D?(O=(0,$.jsxs)(`section`,{className:`space-y-3 rounded-md border p-3`,"data-testid":`settings-search-key`,children:[T,E,D]}),t[27]=T,t[28]=E,t[29]=D,t[30]=O):O=t[30],O}function Fa(e){let t=(0,Z.c)(12),{loaded:n,serverEnabled:r,keyPresent:i,keyNotRequired:a,ready:s,capable:c,embedded:l,total:u}=e;if(!n||!r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{role:`status`,"aria-live":`polite`,className:`text-muted-foreground text-1sm mt-2`,"data-testid":`settings-search-settling`,children:(0,$.jsx)(o,{id:`AdcGcG`})}),t[0]=e):e=t[0],e}if(!i&&!a){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-1sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,"data-testid":`settings-search-needs-key`,children:(0,$.jsx)(o,{id:`x4pGVR`})}),t[1]=e):e=t[1],e}if(s&&!c){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-1sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,"data-testid":`settings-search-provider-error`,children:(0,$.jsx)(o,{id:`Oj-JV8`,components:{0:(0,$.jsx)(`span`,{className:`font-medium`})}})}),t[2]=e):e=t[2],e}if(!s){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{role:`status`,className:`text-muted-foreground text-1sm mt-2`,"data-testid":`settings-search-pending`,children:(0,$.jsx)(o,{id:`VZSBXL`})}),t[3]=e):e=t[3],e}let d;t[4]!==l||t[5]!==u?(d=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`lVWEIL`,values:{embedded:l,total:u}})}),t[4]=l,t[5]=u,t[6]=d):d=t[6];let f;t[7]===l?f=t[8]:(f=l===0?(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`ku0yLQ`})}):null,t[7]=l,t[8]=f);let p;return t[9]!==d||t[10]!==f?(p=(0,$.jsxs)(`div`,{className:`mt-2 space-y-0.5`,"data-testid":`settings-search-coverage`,children:[d,f]}),t[9]=d,t[10]=f,t[11]=p):p=t[11],p}function Ia(e){let t=(0,Z.c)(6),{result:n,testing:r,configuredBaseUrl:i,configuredModel:a}=e;if(r||n===null)return null;let{response:s}=n;if(s===null){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Ra,{tone:`error`,testId:`settings-search-test-unreachable`,children:(0,$.jsx)(o,{id:`uNGmQn`})}),t[0]=e):e=t[0],e}if(s.endpoint!==i||s.model!==a){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Ra,{tone:`warn`,testId:`settings-search-test-stale`,children:(0,$.jsx)(o,{id:`psl2Sj`})}),t[1]=e):e=t[1],e}if(s.ok){let e;return t[2]===s.dimensions?e=t[3]:(e=(0,$.jsx)(Ra,{tone:`ok`,testId:`settings-search-test-ok`,children:(0,$.jsx)(o,{id:`D-_B7l`,values:{0:s.dimensions}})}),t[2]=s.dimensions,t[3]=e),e}let c;return t[4]===s?c=t[5]:(c=(0,$.jsx)(Ra,{tone:`error`,testId:`settings-search-test-error`,children:(0,$.jsx)(La,{response:s})}),t[4]=s,t[5]=c),c}function La(e){let t=(0,Z.c)(9),{response:n}=e;switch(n.reason){case`no_key`:{let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`7cAW1G`}),t[0]=e):e=t[0],e}case`invalid_endpoint`:{let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`PhLu69`}),t[1]=e):e=t[1],e}case`rate_limit`:{let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`xDEcka`}),t[2]=e):e=t[2],e}case`timeout`:{let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`PpJy-V`}),t[3]=e):e=t[3],e}case`network`:{let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`yFr-5x`}),t[4]=e):e=t[4],e}case`dims_mismatch`:{let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`5Szq6N`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}}),t[5]=e):e=t[5],e}case`malformed_response`:{let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(o,{id:`AwLCZA`}),t[6]=e):e=t[6],e}default:{let e;return t[7]===n.status?e=t[8]:(e=n.status===void 0?(0,$.jsx)(o,{id:`tN5WTS`}):(0,$.jsx)(o,{id:`v_cQn_`,values:{0:n.status}}),t[7]=n.status,t[8]=e),e}}}function Ra(e){let t=(0,Z.c)(7),{tone:n,testId:r,children:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={ok:`border-emerald-300 bg-emerald-50 text-emerald-900 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-200`,warn:`border-amber-300 bg-amber-50 text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,error:`border-destructive/50 bg-destructive/10 text-destructive`},t[0]=a):a=t[0];let o=a[n],s=n===`error`?`alert`:`status`,c=n===`error`?`assertive`:`polite`,l=`rounded-md border px-3 py-2 text-1sm ${o}`,u;return t[1]!==i||t[2]!==s||t[3]!==c||t[4]!==l||t[5]!==r?(u=(0,$.jsx)(`p`,{role:s,"aria-live":c,className:l,"data-testid":r,children:i}),t[1]=i,t[2]=s,t[3]=c,t[4]=l,t[5]=r,t[6]=u):u=t[6],u}function za(e){let t=(0,Z.c)(32),{pending:n,pageCount:r,onCancel:i,onConfirm:a}=e,s;t[0]===n?s=t[1]:(s=n?Ba(n.baseUrl)??n.baseUrl:``,t[0]=n,t[1]=s);let c=s,l=n!==null,u;t[2]===i?u=t[3]:(u=e=>{e||i()},t[2]=i,t[3]=u);let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(k,{children:(0,$.jsx)(o,{id:`_GRWOJ`})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsxs)(P,{children:[d,(0,$.jsx)(O,{children:(0,$.jsx)(o,{id:`EKwNEe`})})]}),t[5]=f):f=t[5];let p;t[6]!==c||t[7]!==r?(p={pageCount:r,host:c},t[6]=c,t[7]=r,t[8]=p):p=t[8];let m;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(m={0:(0,$.jsx)(`span`,{className:`font-medium`}),1:(0,$.jsx)(`span`,{className:`font-medium`})},t[9]=m):m=t[9];let h;t[10]===p?h=t[11]:(h=(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`darW93`,values:p,components:m})}),t[10]=p,t[11]=h);let g=n?.model,_;t[12]===g?_=t[13]:(_={0:g},t[12]=g,t[13]=_);let v;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(v={0:(0,$.jsx)(`span`,{className:`font-mono`})},t[14]=v):v=t[14];let y;t[15]===_?y=t[16]:(y=(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`sweBEk`,values:_,components:v})}),t[15]=_,t[16]=y);let b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`cD3aew`})}),t[17]=b):b=t[17];let S;t[18]!==y||t[19]!==h?(S=(0,$.jsx)(j,{children:(0,$.jsx)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2.5 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:(0,$.jsxs)(`ul`,{className:`list-disc space-y-1.5 pl-5`,children:[h,y,b]})})}),t[18]=y,t[19]=h,t[20]=S):S=t[20];let C;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(N,{asChild:!0,children:(0,$.jsx)(x,{variant:`outline`,children:(0,$.jsx)(o,{id:`dEgA5A`})})}),t[21]=C):C=t[21];let w;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(o,{id:`9aVlF2`}),t[22]=w):w=t[22];let T;t[23]===a?T=t[24]:(T=(0,$.jsxs)(M,{children:[C,(0,$.jsx)(x,{onClick:a,"data-testid":`settings-search-provider-confirm-apply`,children:w})]}),t[23]=a,t[24]=T);let E;t[25]!==S||t[26]!==T?(E=(0,$.jsxs)(A,{className:`sm:max-w-lg`,"data-testid":`settings-search-provider-confirm`,children:[f,S,T]}),t[25]=S,t[26]=T,t[27]=E):E=t[27];let D;return t[28]!==E||t[29]!==l||t[30]!==u?(D=(0,$.jsx)(F,{open:l,onOpenChange:u,children:E}),t[28]=E,t[29]=l,t[30]=u,t[31]=D):D=t[31],D}function Ba(e){try{return new URL(e).host}catch{return null}}function Va(e){let t=(0,Z.c)(13),{open:n,onOpenChange:r,onConfirm:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(k,{children:(0,$.jsx)(o,{id:`vhAnzJ`})}),t[0]=a):a=t[0];let s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsxs)(P,{children:[a,(0,$.jsx)(O,{children:(0,$.jsx)(o,{id:`aENGMB`})})]}),t[1]=s):s=t[1];let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`p`,{className:`mb-2 font-medium`,children:(0,$.jsx)(o,{id:`7PNNNs`})}),t[2]=c):c=t[2];let l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`UfW9Kr`})}),t[3]=l):l=t[3];let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(j,{children:(0,$.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-amber-300 bg-amber-50 px-3 py-2.5 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200`,children:[c,(0,$.jsxs)(`ul`,{className:`list-disc space-y-1.5 pl-5`,children:[l,(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`Emz5BG`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-amber-100 px-1 py-0.5 font-mono text-xs dark:bg-amber-900`})}})}),(0,$.jsx)(`li`,{children:(0,$.jsx)(o,{id:`DKYW1G`})})]})]})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(N,{asChild:!0,children:(0,$.jsx)(x,{variant:`outline`,children:(0,$.jsx)(o,{id:`dEgA5A`})})}),t[5]=d):d=t[5];let f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(o,{id:`iMkWoF`}),t[6]=f):f=t[6];let p;t[7]===i?p=t[8]:(p=(0,$.jsxs)(A,{className:`sm:max-w-lg`,"data-testid":`settings-search-confirm`,children:[s,u,(0,$.jsxs)(M,{children:[d,(0,$.jsx)(x,{onClick:i,"data-testid":`settings-search-confirm-enable`,children:f})]})]}),t[7]=i,t[8]=p);let m;return t[9]!==r||t[10]!==n||t[11]!==p?(m=(0,$.jsx)(F,{open:n,onOpenChange:r,children:p}),t[9]=r,t[10]=n,t[11]=p,t[12]=m):m=t[12],m}function Ha(e){let t=(0,Z.c)(46),{scope:n}=e,{_:r}=s(),{state:i,saving:a,folderAction:c}=vt(),[l,u]=(0,Q.useState)(``),d,f,p,m;if(t[0]!==r||t[1]!==c||t[2]!==a||t[3]!==n||t[4]!==i.data||t[5]!==i.message||t[6]!==i.status){let e=i.status===`ready`?(i.data.folders??[]).filter(e=>e.scope===n):[],s=new Map(e.map(Ga)),l=e=>(e.state===`linked`||e.state===`linked-parent`)&&typeof e.target==`string`&&s.has(e.target),u=new Map;for(let t of e){if(!l(t))continue;let e=t.target;u.set(e,[...u.get(e)??[],t])}let h;t[11]===l?h=t[12]:(h=e=>!l(e),t[11]=l,t[12]=h);let g=e.filter(h),v;t[13]!==c||t[14]!==n?(v=(e,t,r)=>{c({scope:n,root:e,action:t,...r===void 0?{}:{target:r}}).catch(Wa)},t[13]=c,t[14]=n,t[15]=v):v=t[15];let y=v;d=`space-y-2 rounded-lg border bg-card p-3`,f=`settings-skill-folders`;let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(`h4`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`HSh8u_`})}),t[16]=S):S=t[16],t[17]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsxs)(`div`,{children:[S,(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`sLcbHt`})})]}),t[17]=p):p=t[17],m=i.status===`error`?(0,$.jsx)(`div`,{className:`text-1sm text-destructive`,role:`alert`,"data-testid":`skill-targets-error`,children:(0,$.jsx)(o,{id:`ACKMCN`,values:{0:i.message}})}):i.status===`ready`?(0,$.jsx)(`ul`,{className:`space-y-1 pt-1`,children:g.map(t=>{let i=n===`global`?`~/${t.root}`:t.root,s=u.get(t.root)??[],c=e.filter(e=>e.root!==t.root&&(e.state===`own`||e.state===`absent`));return(0,$.jsxs)(`li`,{className:`text-sm`,"data-testid":`skill-folder-row-${t.host}`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(_,{host:t.host,"aria-hidden":!0,className:`size-4 shrink-0`}),(0,$.jsxs)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs`,children:[i,t.state===`linked`||t.state===`linked-parent`?(0,$.jsxs)(`span`,{className:`text-muted-foreground`,children:[` → `,t.target??`?`]}):null]}),t.drift?(0,$.jsx)(b,{testId:`skill-folder-drift-${t.host}`,title:r({id:`p3m_Gk`,values:{0:t.expected??``}})}):null,t.state===`absent`?(0,$.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,$.jsx)(o,{id:`KFd4xz`})}):null,t.state===`linked-parent`?(0,$.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,title:r({id:`yLwx9e`}),children:(0,$.jsx)(o,{id:`nf0wk0`})}):null,(t.state===`own`||t.state===`absent`)&&c.length>0?(0,$.jsxs)(B,{children:[(0,$.jsx)(R,{asChild:!0,children:(0,$.jsx)(x,{size:`sm`,variant:`ghost`,disabled:a,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground`,title:r({id:`g5w1sF`,values:{display:i}}),"data-testid":`skill-folder-link-${t.host}`,children:(0,$.jsx)(o,{id:`uUCrBv`})})}),(0,$.jsx)(z,{align:`end`,className:`w-auto`,children:c.map(e=>(0,$.jsxs)(L,{onSelect:()=>y(e.root,`link`,t.root),"data-testid":`skill-folder-link-${t.host}-to-${e.root}`,children:[(0,$.jsx)(_,{host:e.host,"aria-hidden":!0,className:`size-4`}),(0,$.jsx)(`span`,{className:`font-mono text-xs`,children:n===`global`?`~/${e.root}`:e.root})]},e.root))})]}):null,t.state===`linked`?(0,$.jsx)(x,{size:`sm`,variant:`ghost`,disabled:a,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground`,title:r({id:`MQ5LOx`,values:{display:i}}),onClick:()=>y(t.root,`unlink`),"data-testid":`skill-folder-unlink-${t.host}`,children:(0,$.jsx)(o,{id:`ptQ3_N`})}):null]}),s.length>0?(0,$.jsx)(`ul`,{className:`mt-1 ml-2 space-y-1 border-border/60 border-l pl-3`,"data-testid":`skill-folder-followers-${t.host}`,children:s.map(e=>(0,$.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(_,{host:e.host,"aria-hidden":!0,className:`size-4 shrink-0`}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-muted-foreground text-xs`,children:n===`global`?`~/${e.root}`:e.root}),e.drift?(0,$.jsx)(b,{testId:`skill-folder-drift-${e.host}`,title:r({id:`p3m_Gk`,values:{0:e.expected??``}})}):null,e.state===`linked-parent`?(0,$.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground uppercase tracking-wide`,title:r({id:`yLwx9e`}),children:(0,$.jsx)(o,{id:`Ef6ukL`})}):(0,$.jsx)(x,{size:`sm`,variant:`ghost`,disabled:a,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide hover:text-foreground`,title:r({id:`9_2oe6`,values:{0:n===`global`?`~/${e.root}`:e.root}}),onClick:()=>y(e.root,`unlink`),"data-testid":`skill-folder-unlink-${e.host}`,children:(0,$.jsx)(o,{id:`ptQ3_N`})})]},e.host))}):null]},t.host)})}):(0,$.jsxs)(`div`,{className:`space-y-2 pt-1`,children:[(0,$.jsx)(cn,{className:`h-5 w-56`}),(0,$.jsx)(cn,{className:`h-5 w-56`})]}),t[0]=r,t[1]=c,t[2]=a,t[3]=n,t[4]=i.data,t[5]=i.message,t[6]=i.status,t[7]=d,t[8]=f,t[9]=p,t[10]=m}else d=t[7],f=t[8],p=t[9],m=t[10];let h;t[18]!==c||t[19]!==l||t[20]!==n?(h=e=>{e.preventDefault();let t=l.trim().replace(/^~\//,``);t!==``&&c({scope:n,root:t,action:`add-root`}).then(()=>u(``)).catch(Ua)},t[18]=c,t[19]=l,t[20]=n,t[21]=h):h=t[21];let g;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>u(e.target.value),t[22]=g):g=t[22];let v;t[23]!==r||t[24]!==n?(v=r(n===`global`?{id:`Wboy1j`}:{id:`jpoCue`}),t[23]=r,t[24]=n,t[25]=v):v=t[25];let y;t[26]!==l||t[27]!==a||t[28]!==v?(y=(0,$.jsx)(Lt,{value:l,onChange:g,placeholder:v,className:`h-7 flex-1 font-mono text-xs`,disabled:a,"data-testid":`skill-folders-add-root-input`}),t[26]=l,t[27]=a,t[28]=v,t[29]=y):y=t[29];let S;t[30]!==l||t[31]!==a?(S=a||l.trim()===``,t[30]=l,t[31]=a,t[32]=S):S=t[32];let C;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(o,{id:`ZW2yR_`}),t[33]=C):C=t[33];let w;t[34]===S?w=t[35]:(w=(0,$.jsx)(x,{type:`submit`,size:`sm`,variant:`secondary`,disabled:S,className:`h-7 px-2 font-normal text-xs`,children:C}),t[34]=S,t[35]=w);let T;t[36]!==w||t[37]!==h||t[38]!==y?(T=(0,$.jsxs)(`form`,{className:`flex items-center gap-2 pt-1`,onSubmit:h,"data-testid":`skill-folders-add-root`,children:[y,w]}),t[36]=w,t[37]=h,t[38]=y,t[39]=T):T=t[39];let E;return t[40]!==d||t[41]!==T||t[42]!==f||t[43]!==p||t[44]!==m?(E=(0,$.jsxs)(`section`,{className:d,"data-testid":f,children:[p,m,T]}),t[40]=d,t[41]=T,t[42]=f,t[43]=p,t[44]=m,t[45]=E):E=t[45],E}function Ua(e){return X.error(e instanceof Error?e.message:String(e))}function Wa(e){return X.error(e instanceof Error?e.message:String(e))}function Ga(e){return[e.root,e]}function Ka(e){let t=(0,Z.c)(14),{scope:n}=e,r=`settings-skills-title-${n}`,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(o,{id:`PCSkw2`}),t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=(0,$.jsx)(`h3`,{id:r,className:`text-base font-semibold`,children:i}),t[1]=r,t[2]=a);let s;t[3]===n?s=t[4]:(s=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n===`project`?(0,$.jsx)(o,{id:`NCmYhK`}):(0,$.jsx)(o,{id:`67TEhP`})}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[a,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;t[8]===n?l=t[9]:(l=(0,$.jsx)(Ha,{scope:n}),t[8]=n,t[9]=l);let u;return t[10]!==c||t[11]!==l||t[12]!==r?(u=(0,$.jsxs)(`section`,{"aria-labelledby":r,className:`space-y-4`,"data-testid":`settings-skills-section`,children:[c,l]}),t[10]=c,t[11]=l,t[12]=r,t[13]=u):u=t[13],u}var qa=`data-[state=on]:border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground data-[state=on]:hover:bg-primary/90`;function Ja(){let e=(0,Z.c)(93),{_:t}=s(),n=qe(),{projectConfig:r,projectLocalConfig:i,projectLocalSynced:a,projectSynced:c}=Yt(),l=Ke(),u=Ge(),d;e[0]===i?.autoSync?d=e[1]:(d=be(i?.autoSync)??`off`,e[0]=i?.autoSync,e[1]=d);let f=d,{confirmOpen:p,setConfirmOpen:m,pendingMode:h,onModeSelect:g,onConfirm:_}=Je(l,f),[v,y]=(0,Q.useState)(!1),[b,O]=(0,Q.useState)(!1);if(n&&!n.hasRemote&&n.state===`dormant`){let t;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`h3`,{id:`settings-sync-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`Nu4DdT`})}),e[2]=t):t=e[2];let n;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[t,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`AiNMQ7`})})]}),e[3]=n):n=e[3];let r;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`div`,{className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`3_6U6f`})}),e[4]=r):r=e[4];let i;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[r,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`i92eAT`})})]}),e[5]=i):i=e[5];let a;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>y(!0),e[6]=a):a=e[6];let s;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border p-3`,children:[i,(0,$.jsx)(x,{onClick:a,"data-testid":`settings-sync-setup`,children:(0,$.jsx)(o,{id:`zkz0Fg`})})]}),e[7]=s):s=e[7];let c;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(E,{asChild:!0,children:(0,$.jsxs)(x,{variant:`ghost`,size:`sm`,className:`group gap-1 px-1.5 text-muted-foreground`,children:[(0,$.jsx)($e,{className:`size-3.5 transition-transform group-data-[state=open]:rotate-90`,"aria-hidden":!0}),(0,$.jsx)(o,{id:`6caB2T`})]})}),e[8]=c):c=e[8];let l;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsxs)(D,{children:[c,(0,$.jsx)(T,{className:`px-1.5 pt-2 text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`44DSl0`,components:{0:(0,$.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`})}})})]}),e[9]=l):l=e[9];let u;return e[10]===v?u=e[11]:(u=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-sync-title`,className:`space-y-4`,"data-testid":`settings-sync-empty`,children:[n,s,l,(0,$.jsx)(ft,{open:v,onOpenChange:y})]}),e[10]=v,e[11]=u),u}let k=!a,A=n?.pushPermission?.checkStatus===`denied`||n?.pausedReason===`no-push-permission`,j=n?.pushPermission,M;e[12]===j?M=e[13]:(M=Tt(j),e[12]=j,e[13]=M);let N=M,P=f===`full`&&A&&N,F=f===`full`&&A&&!N,I=n?.pushPermission?.checkStatus===`denied`&&n.pushPermission.deniedReason!==`not-authenticated`,L;e[14]!==A||e[15]!==F||e[16]!==n?(L=F||A||!n?.pausedReason?null:dt(n.pausedReason),e[14]=A,e[15]=F,e[16]=n,e[17]=L):L=e[17];let R=L,z;e[18]===g?z=e[19]:(z=function(e){De(e)&&g(e)},e[18]=g,e[19]=z);let B=z,V;e[20]===r?.autoSync?.default?V=e[21]:(V=ke(r?.autoSync?.default)??`ask`,e[20]=r?.autoSync?.default,e[21]=V);let H=V,ee;e[22]!==t||e[23]!==u?(ee=function(e){if(e!==`ask`&&!De(e))return;if(u===null){X.error(t({id:`fiMNLl`}));return}let n;bb110:switch(e){case`ask`:n=null;break bb110;case`off`:n=!1;break bb110;case`full`:n=!0;break bb110;case`follow`:n=`follow`;break bb110;default:throw Error(`unhandled committed default: ${String(e)}`)}let r=u(n);if(!r.ok){let e=r.error;X.error(t({id:`oAFVKX`,values:{detail:e}}))}},e[22]=t,e[23]=u,e[24]=ee):ee=e[24];let U=ee,te;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,$.jsx)(`h3`,{id:`settings-sync-title`,className:`text-base font-semibold`,children:(0,$.jsx)(o,{id:`Nu4DdT`})}),e[25]=te):te=e[25];let ne;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[te,(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,$.jsx)(o,{id:`-f2Ogn`})})]}),e[26]=ne):ne=e[26];let re;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,$.jsx)(`div`,{id:`settings-sync-mode-label`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`yZepkk`})}),e[27]=re):re=e[27];let W;e[28]===f?W=e[29]:(W=(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,"data-testid":`settings-sync-body`,children:f===`full`?(0,$.jsx)(o,{id:`hxYFzm`}):f===`follow`?(0,$.jsx)(o,{id:`-imiMK`}):(0,$.jsx)(o,{id:`UVDasf`})}),e[28]=f,e[29]=W);let G;e[30]!==t||e[31]!==n?(G=n?.remote?(0,$.jsxs)(`p`,{className:`text-muted-foreground text-1sm truncate`,"data-testid":`settings-sync-remote`,children:[(0,$.jsx)(o,{id:`Q8A-U_`}),` `,n.remote.webUrl?(0,$.jsxs)(`a`,{href:n.remote.webUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-foreground hover:text-primary hover:underline inline-flex items-center gap-0.5`,"aria-label":t({id:`1nke1r`,values:{0:n.remote.label}}),"data-testid":`settings-sync-remote-link`,children:[(0,$.jsx)(`span`,{children:n.remote.label}),(0,$.jsx)(Xe,{className:`inline size-3.5`,"aria-hidden":!0})]}):(0,$.jsx)(`span`,{className:`font-medium text-foreground`,"data-testid":`settings-sync-remote-label`,children:n.remote.label})]}):null,e[30]=t,e[31]=n,e[32]=G):G=e[32];let K;e[33]!==W||e[34]!==G?(K=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[re,W,G]}),e[33]=W,e[34]=G,e[35]=K):K=e[35];let q;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(J,{value:`off`,className:qa,"data-testid":`settings-sync-mode-off`,children:(0,$.jsx)(o,{id:`az8lvo`})}),e[36]=q):q=e[36];let ae;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(J,{value:`follow`,className:qa,"data-testid":`settings-sync-mode-follow`,children:(0,$.jsx)(o,{id:`MKEPCY`})}),e[37]=ae):ae=e[37];let oe;e[38]===I?oe=e[39]:(oe=I?(0,$.jsxs)(w,{children:[(0,$.jsx)(S,{asChild:!0,children:(0,$.jsx)(`span`,{className:`inline-flex`,children:(0,$.jsx)(J,{value:`full`,className:qa,disabled:!0,"data-testid":`settings-sync-mode-full`,children:(0,$.jsx)(o,{id:`g2Tj8R`})})})}),(0,$.jsx)(C,{"data-testid":`settings-sync-mode-full-tip`,children:(0,$.jsx)(o,{id:`ChAtFg`})})]}):(0,$.jsx)(J,{value:`full`,className:qa,"data-testid":`settings-sync-mode-full`,children:(0,$.jsx)(o,{id:`g2Tj8R`})}),e[38]=I,e[39]=oe);let Y;e[40]!==f||e[41]!==k||e[42]!==B||e[43]!==oe?(Y=(0,$.jsxs)(ie,{type:`single`,variant:`outline`,spacing:2,value:f,onValueChange:B,disabled:k,"aria-labelledby":`settings-sync-mode-label`,"data-testid":`settings-sync-mode-toggle`,children:[q,ae,oe]}),e[40]=f,e[41]=k,e[42]=B,e[43]=oe,e[44]=Y):Y=e[44];let se;e[45]!==K||e[46]!==Y?(se=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[K,Y]}),e[45]=K,e[46]=Y,e[47]=se):se=e[47];let ce;e[48]===P?ce=e[49]:(ce=P&&(0,$.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-reconnect`,children:[(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,$.jsx)(o,{id:`tnG-m6`})}),(0,$.jsx)(x,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>O(!0),children:(0,$.jsx)(o,{id:`5lWFkC`})})]}),e[48]=P,e[49]=ce);let le;e[50]!==g||e[51]!==F?(le=F&&(0,$.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-switch-follow`,children:[(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,$.jsx)(o,{id:`ajHi4O`})}),(0,$.jsx)(x,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>g(`follow`),"data-testid":`settings-sync-switch-follow-action`,children:(0,$.jsx)(o,{id:`i6ng22`})})]}),e[50]=g,e[51]=F,e[52]=le):le=e[52];let ue;e[53]!==A||e[54]!==f||e[55]!==P||e[56]!==F?(ue=!F&&!P&&A&&f!==`follow`&&(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground mt-2`,"data-testid":`settings-sync-denied-hint`,children:(0,$.jsx)(o,{id:`uUiiyC`})}),e[53]=A,e[54]=f,e[55]=P,e[56]=F,e[57]=ue):ue=e[57];let de;e[58]===R?de=e[59]:(de=R!==null&&(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground mt-2`,"data-testid":`settings-sync-reason`,children:R}),e[58]=R,e[59]=de);let fe;e[60]===n?.pushPermission?fe=e[61]:(fe=Et(n?.pushPermission)&&(0,$.jsxs)(`div`,{className:`mt-2 flex items-start gap-2`,"data-testid":`settings-sync-signin-again`,children:[(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground flex-1 min-w-0`,children:(0,$.jsx)(o,{id:`C_cPoW`})}),(0,$.jsx)(x,{variant:`outline`,size:`xs`,className:`self-start`,onClick:()=>O(!0),children:(0,$.jsx)(o,{id:`5lWFkC`})})]}),e[60]=n?.pushPermission,e[61]=fe);let pe;e[62]!==se||e[63]!==ce||e[64]!==le||e[65]!==ue||e[66]!==de||e[67]!==fe?(pe=(0,$.jsxs)(`div`,{className:`rounded-md border p-3`,children:[se,ce,le,ue,de,fe]}),e[62]=se,e[63]=ce,e[64]=le,e[65]=ue,e[66]=de,e[67]=fe,e[68]=pe):pe=e[68];let me;e[69]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,$.jsx)(`div`,{id:`settings-sync-default-label`,className:`text-sm font-medium`,children:(0,$.jsx)(o,{id:`j_Z6g7`})}),e[69]=me):me=e[69];let he;e[70]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[me,(0,$.jsx)(`p`,{className:`text-muted-foreground text-1sm`,children:(0,$.jsx)(o,{id:`msuDyW`})})]}),e[70]=he):he=e[70];let ge=!c,_e;e[71]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,$.jsx)(J,{value:`ask`,className:qa,"data-testid":`settings-sync-default-ask`,children:(0,$.jsx)(o,{id:`EdQY6l`})}),e[71]=_e):_e=e[71];let ve;e[72]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,$.jsx)(J,{value:`off`,className:qa,"data-testid":`settings-sync-default-off`,children:(0,$.jsx)(o,{id:`az8lvo`})}),e[72]=ve):ve=e[72];let ye;e[73]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,$.jsx)(J,{value:`follow`,className:qa,"data-testid":`settings-sync-default-follow`,children:(0,$.jsx)(o,{id:`MKEPCY`})}),e[73]=ye):ye=e[73];let xe;e[74]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,$.jsx)(J,{value:`full`,className:qa,"data-testid":`settings-sync-default-full`,children:(0,$.jsx)(o,{id:`g2Tj8R`})}),e[74]=xe):xe=e[74];let Se;e[75]!==H||e[76]!==U||e[77]!==ge?(Se=(0,$.jsxs)(`div`,{className:`rounded-md border p-3 space-y-2`,"data-testid":`settings-sync-default`,children:[he,(0,$.jsxs)(ie,{type:`single`,variant:`outline`,spacing:2,value:H,onValueChange:U,disabled:ge,"aria-labelledby":`settings-sync-default-label`,"data-testid":`settings-sync-default-toggle`,children:[_e,ve,ye,xe]})]}),e[75]=H,e[76]=U,e[77]=ge,e[78]=Se):Se=e[78];let Ce=h??`full`,we=h===`follow`?n?.ahead??0:0,Te;e[79]!==p||e[80]!==_||e[81]!==m||e[82]!==Ce||e[83]!==we?(Te=(0,$.jsx)(Ye,{open:p,onOpenChange:m,onConfirm:_,variant:Ce,strandedCommitCount:we}),e[79]=p,e[80]=_,e[81]=m,e[82]=Ce,e[83]=we,e[84]=Te):Te=e[84];let Ee;e[85]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=()=>O(!1),e[85]=Ee):Ee=e[85];let Oe;e[86]===b?Oe=e[87]:(Oe=(0,$.jsx)(it,{open:b,onOpenChange:O,onSuccess:Ee,reauth:!0}),e[86]=b,e[87]=Oe);let Ae;return e[88]!==pe||e[89]!==Se||e[90]!==Te||e[91]!==Oe?(Ae=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-sync-title`,className:`space-y-3`,children:[ne,pe,Se,Te,Oe]}),e[88]=pe,e[89]=Se,e[90]=Te,e[91]=Oe,e[92]=Ae):Ae=e[92],Ae}function Ya(e){let t=(0,Z.c)(15),{title:n,description:r,scope:i,binding:a,fields:o,scopeBadge:s}=e,{form:c,commitField:l}=br(a),[u,d]=(0,Q.useState)(null),f=(0,Q.useRef)(null),p,m;t[0]!==c||t[1]!==i?(p=()=>{let e=i===`project`?Pe:Ae,t=_t(t=>{if(t.docName!==e)return;X.error(je(t.error),{duration:8e3});let n=fr(t.error);n&&(c.setError(n,{type:`config-validation-rejected`,message:Cr(t.error,n)}),c.setFocus(n),d(n),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{d(null),c.clearErrors(n)},600))});return()=>{t(),f.current&&clearTimeout(f.current)}},m=[i,c],t[0]=c,t[1]=i,t[2]=p,t[3]=m):(p=t[2],m=t[3]),(0,Q.useEffect)(p,m);let h;t[4]!==l||t[5]!==r||t[6]!==o||t[7]!==u||t[8]!==i||t[9]!==s||t[10]!==n?(h=(0,$.jsx)(Xa,{title:n,description:r,scope:i,scopeBadge:s,fields:o,commitField:l,flashedPath:u}),t[4]=l,t[5]=r,t[6]=o,t[7]=u,t[8]=i,t[9]=s,t[10]=n,t[11]=h):h=t[11];let g;return t[12]!==c||t[13]!==h?(g=(0,$.jsx)(Pn,{...c,children:h}),t[12]=c,t[13]=h,t[14]=g):g=t[14],g}function Xa(e){let t=(0,Z.c)(28),{title:n,description:r,scope:i,scopeBadge:a,fields:o,commitField:s,flashedPath:c}=e,l=`settings-section-${i}-title`,u;t[0]!==n||t[1]!==l?(u=(0,$.jsx)(`h3`,{id:l,className:`text-base font-semibold`,children:n}),t[0]=n,t[1]=l,t[2]=u):u=t[2];let d;t[3]===a?d=t[4]:(d=a?(0,$.jsx)(ni,{scope:a}):null,t[3]=a,t[4]=d);let f;t[5]!==u||t[6]!==d?(f=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[u,d]}),t[5]=u,t[6]=d,t[7]=f):f=t[7];let p;t[8]===r?p=t[9]:(p=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:r}),t[8]=r,t[9]=p);let m;t[10]!==f||t[11]!==p?(m=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;if(t[13]!==s||t[14]!==o||t[15]!==c||t[16]!==i){let e;t[18]!==s||t[19]!==c||t[20]!==i?(e=e=>(0,$.jsx)(mr,{field:e,scope:i,commitField:s,isFlashed:c===e.path.join(`.`)},e.path.join(`.`)),t[18]=s,t[19]=c,t[20]=i,t[21]=e):e=t[21],h=o.map(e),t[13]=s,t[14]=o,t[15]=c,t[16]=i,t[17]=h}else h=t[17];let g;t[22]===h?g=t[23]:(g=(0,$.jsx)(`div`,{className:`space-y-10`,children:h}),t[22]=h,t[23]=g);let _;return t[24]!==m||t[25]!==g||t[26]!==l?(_=(0,$.jsxs)(`section`,{"aria-labelledby":l,className:`space-y-3`,children:[m,g]}),t[24]=m,t[25]=g,t[26]=l,t[27]=_):_=t[27],_}function Za(){let e=(0,Z.c)(71),{_:t}=s(),{enabled:n,synced:r}=Bn(),i=zn(),a=n!==!1,{userConfig:o,userBinding:c,userSynced:l}=Yt(),u=o?.agents?.autoApproveOkTools!==!1,[d,f]=(0,Q.useState)(!1),p,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>{let e=window.okDesktop;if(!e)return;let t=!1;return e.terminal.cliPreflight(`codex`).then(e=>{t||f(e.onPath===`present`&&e.okServerConfigured!==!0)}).catch(Qa),()=>{t=!0}},m=[],e[0]=p,e[1]=m):(p=e[0],m=e[1]),(0,Q.useEffect)(p,m);let h;e[2]!==t||e[3]!==i?(h=function(e){if(i===null){X.error(t({id:`w6sBjd`}));return}let n=i(e);n.ok||X.error(t(e?{id:`jKd3AP`,values:{0:n.error}}:{id:`pajIrl`,values:{0:n.error}}))},e[2]=t,e[3]=i,e[4]=h):h=e[4];let g=h,_;e[5]!==t||e[6]!==c?(_=function(e){if(c===null){X.error(t({id:`fnlBN4`}));return}let n=c.patch({agents:{autoApproveOkTools:e}});if(!n.ok){let e=je(n.error);X.error(t({id:`habOU_`,values:{detail:e}}))}},e[5]=t,e[6]=c,e[7]=_):_=e[7];let v=_,y;e[8]===t?y=e[9]:(y=t({id:`ALhMYW`}),e[8]=t,e[9]=y);let b;e[10]===y?b=e[11]:(b=(0,$.jsx)(`h3`,{id:`settings-terminal-title`,className:`text-base font-semibold`,children:y}),e[10]=y,e[11]=b);let x;e[12]===t?x=e[13]:(x=t({id:`FCAcjR`}),e[12]=t,e[13]=x);let S;e[14]===x?S=e[15]:(S=(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:x}),e[14]=x,e[15]=S);let C;e[16]!==b||e[17]!==S?(C=(0,$.jsxs)(`div`,{className:`space-y-1`,children:[b,S]}),e[16]=b,e[17]=S,e[18]=C):C=e[18];let w;e[19]===t?w=e[20]:(w=t({id:`E4XYYH`}),e[19]=t,e[20]=w);let T;e[21]===w?T=e[22]:(T=(0,$.jsx)(`label`,{htmlFor:`settings-terminal-toggle`,className:`text-sm font-medium`,children:w}),e[21]=w,e[22]=T);let E;e[23]!==t||e[24]!==a?(E=t(a?{id:`AQGtjK`}:{id:`R65q-K`}),e[23]=t,e[24]=a,e[25]=E):E=e[25];let D;e[26]===E?D=e[27]:(D=(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`settings-terminal-body`,children:E}),e[26]=E,e[27]=D);let O;e[28]!==T||e[29]!==D?(O=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[T,D]}),e[28]=T,e[29]=D,e[30]=O):O=e[30];let k=!r||i===null,A;e[31]===t?A=e[32]:(A=t({id:`E4XYYH`}),e[31]=t,e[32]=A);let j;e[33]!==g||e[34]!==a||e[35]!==k||e[36]!==A?(j=(0,$.jsx)(q,{id:`settings-terminal-toggle`,checked:a,onCheckedChange:g,disabled:k,"aria-label":A,"data-testid":`settings-terminal-toggle`}),e[33]=g,e[34]=a,e[35]=k,e[36]=A,e[37]=j):j=e[37];let M;e[38]!==O||e[39]!==j?(M=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border p-3`,children:[O,j]}),e[38]=O,e[39]=j,e[40]=M):M=e[40];let N;e[41]===t?N=e[42]:(N=t({id:`ilodsp`}),e[41]=t,e[42]=N);let P;e[43]===N?P=e[44]:(P=(0,$.jsx)(`label`,{htmlFor:`settings-terminal-autoapprove-toggle`,className:`text-sm font-medium`,children:N}),e[43]=N,e[44]=P);let F;e[45]===t?F=e[46]:(F=t({id:`jENU1Q`}),e[45]=t,e[46]=F);let I;e[47]===F?I=e[48]:(I=(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`settings-terminal-autoapprove-body`,children:F}),e[47]=F,e[48]=I);let L;e[49]!==t||e[50]!==u||e[51]!==d?(L=u&&d?(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,"data-testid":`settings-terminal-autoapprove-codex-note`,children:t({id:`Kr3VPS`})}):null,e[49]=t,e[50]=u,e[51]=d,e[52]=L):L=e[52];let R;e[53]!==P||e[54]!==I||e[55]!==L?(R=(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[P,I,L]}),e[53]=P,e[54]=I,e[55]=L,e[56]=R):R=e[56];let z=!l||c===null,B;e[57]===t?B=e[58]:(B=t({id:`ilodsp`}),e[57]=t,e[58]=B);let V;e[59]!==v||e[60]!==u||e[61]!==z||e[62]!==B?(V=(0,$.jsx)(q,{id:`settings-terminal-autoapprove-toggle`,checked:u,onCheckedChange:v,disabled:z,"aria-label":B,"data-testid":`settings-terminal-autoapprove-toggle`}),e[59]=v,e[60]=u,e[61]=z,e[62]=B,e[63]=V):V=e[63];let H;e[64]!==R||e[65]!==V?(H=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-md border p-3`,children:[R,V]}),e[64]=R,e[65]=V,e[66]=H):H=e[66];let ee;return e[67]!==M||e[68]!==H||e[69]!==C?(ee=(0,$.jsxs)(`section`,{"aria-labelledby":`settings-terminal-title`,className:`space-y-3`,children:[C,M,H]}),e[67]=M,e[68]=H,e[69]=C,e[70]=ee):ee=e[70],ee}function Qa(){}var $a=[`background`,`surface`,`foreground`,`primary`,`accent`,`border`];function eo(e){let t=(0,Z.c)(27),{seed:n}=e,r;t[0]===n?r=t[1]:(r=Fe(rn(n)),t[0]=n,t[1]=r);let i=r,a;t[2]!==i.background||t[3]!==i.border?(a={backgroundColor:i.background,borderColor:i.border},t[2]=i.background,t[3]=i.border,t[4]=a):a=t[4];let o=`1px solid ${i.border}`,s;t[5]!==i.sidebar||t[6]!==o?(s={backgroundColor:i.sidebar,borderBottom:o},t[5]=i.sidebar,t[6]=o,t[7]=s):s=t[7];let c;t[8]===i.primary?c=t[9]:(c=(0,$.jsx)(`span`,{className:`h-1.5 w-6 rounded-full`,style:{backgroundColor:i.primary}}),t[8]=i.primary,t[9]=c);let l;t[10]!==s||t[11]!==c?(l=(0,$.jsx)(`div`,{className:`flex h-1/3 items-center gap-1 px-1.5`,style:s,children:c}),t[10]=s,t[11]=c,t[12]=l):l=t[12];let u=i[`syntax-keyword`],d;t[13]===u?d=t[14]:(d=(0,$.jsx)(`span`,{className:`h-1.5 w-4/5 rounded-full`,style:{backgroundColor:u}}),t[13]=u,t[14]=d);let f;t[15]===i.foreground?f=t[16]:(f=(0,$.jsx)(`span`,{className:`h-1.5 w-3/5 rounded-full opacity-70`,style:{backgroundColor:i.foreground}}),t[15]=i.foreground,t[16]=f);let p=i[`syntax-string`],m;t[17]===p?m=t[18]:(m=(0,$.jsx)(`span`,{className:`h-1.5 w-2/3 rounded-full`,style:{backgroundColor:p}}),t[17]=p,t[18]=m);let h;t[19]!==m||t[20]!==d||t[21]!==f?(h=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1 p-1.5`,children:[d,f,m]}),t[19]=m,t[20]=d,t[21]=f,t[22]=h):h=t[22];let g;return t[23]!==h||t[24]!==a||t[25]!==l?(g=(0,$.jsxs)(`div`,{"aria-hidden":!0,className:`h-20 w-32 shrink-0 overflow-hidden rounded-md border`,style:a,children:[l,h]}),t[23]=h,t[24]=a,t[25]=l,t[26]=g):g=t[26],g}function to(e){let t=(0,Z.c)(67),{userBinding:n}=e,{_:r}=s(),{setTheme:i}=l(),a=tn()?.merged??null,o=a?.appearance?.customTheme,c;t[0]===o?c=t[1]:(c=Qt(o),t[0]=o,t[1]=c);let u=c,d=a?.appearance?.colorTheme===`custom`,[f,p]=(0,Q.useState)(u),m;t[2]===u?m=t[3]:(m=JSON.stringify(u),t[2]=u,t[3]=m);let h=m,g;t[4]===u?g=t[5]:(g=()=>{p(u)},t[4]=u,t[5]=g);let _;t[6]===h?_=t[7]:(_=[h],t[6]=h,t[7]=_),(0,Q.useEffect)(g,_);let v,y,b,S,C,w,T,E;if(t[8]!==r||t[9]!==d||t[10]!==f||t[11]!==i||t[12]!==n){let e={background:r({id:`GtJbUa`}),surface:r({id:`qiN9NB`}),foreground:r({id:`xeiujy`}),primary:r({id:`T_R-Qz`}),accent:r({id:`Eax_et`}),border:r({id:`dCIGNG`})},a;t[21]!==d||t[22]!==i?(a=function(e){d&&(en(`custom`,e),i(Xt(e)===`dark`?`dark`:`light`))},t[21]=d,t[22]=i,t[23]=a):a=t[23];let o=a,s;t[24]!==o||t[25]!==f?(s=function(e,t){let n={...f,[e]:t};p(n),Zt(t)&&o(n)},t[24]=o,t[25]=f,t[26]=s):s=t[26];let c=s,l;t[27]===n?l=t[28]:(l=function(e,t){Zt(t)&&n.patch({appearance:{customTheme:{[e]:t}}})},t[27]=n,t[28]=l);let u=l,m;t[29]!==o||t[30]!==n?(m=function(){p(nn),o(nn),n.patch({appearance:{customTheme:{...nn}}})},t[29]=o,t[30]=n,t[31]=m):m=t[31];let h=m;v=`settings-custom-theme-title`,y=`space-y-3`,b=`custom-theme`;let g;t[32]===r?g=t[33]:(g=r({id:`DcLaew`}),t[32]=r,t[33]=g);let _;t[34]===g?_=t[35]:(_=(0,$.jsx)(`h3`,{id:`settings-custom-theme-title`,className:`font-medium text-sm`,children:g}),t[34]=g,t[35]=_);let D;t[36]!==r||t[37]!==d?(D=r(d?{id:`YEIS9T`}:{id:`4ieVh2`}),t[36]=r,t[37]=d,t[38]=D):D=t[38];let O;t[39]===D?O=t[40]:(O=(0,$.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:D}),t[39]=D,t[40]=O);let k;t[41]!==_||t[42]!==O?(k=(0,$.jsxs)(`div`,{children:[_,O]}),t[41]=_,t[42]=O,t[43]=k):k=t[43];let A;t[44]===r?A=t[45]:(A=r({id:`OfhWJH`}),t[44]=r,t[45]=A);let j;t[46]!==h||t[47]!==A?(j=(0,$.jsx)(x,{variant:`ghost`,size:`sm`,onClick:h,className:`text-muted-foreground`,children:A}),t[46]=h,t[47]=A,t[48]=j):j=t[48],t[49]!==k||t[50]!==j?(S=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[k,j]}),t[49]=k,t[50]=j,t[51]=S):S=t[51],T=`flex items-start gap-4`,t[52]===f?E=t[53]:(E=(0,$.jsx)(eo,{seed:f}),t[52]=f,t[53]=E),C=`grid flex-1 grid-cols-1 gap-2 sm:grid-cols-2`,w=$a.map(t=>(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Lt,{type:`color`,"aria-label":e[t],value:f[t],onChange:e=>c(t,e.target.value),onBlur:e=>u(t,e.target.value),className:`h-8 w-9 shrink-0 cursor-pointer rounded-md p-1`}),(0,$.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,$.jsx)(V,{className:`text-1sm text-muted-foreground`,children:e[t]}),(0,$.jsx)(Lt,{value:f[t],spellCheck:!1,"aria-label":r({id:`I-xnra`,values:{0:e[t]}}),"aria-invalid":!Zt(f[t]),onChange:e=>c(t,e.target.value),onBlur:e=>u(t,e.target.value),onKeyDown:e=>{e.key===`Enter`&&u(t,e.target.value)},className:`h-7 font-mono text-1sm uppercase`}),Zt(f[t])?null:(0,$.jsx)(jt,{className:`absolute top-full left-0 mt-0.5 text-xs leading-tight`,"data-testid":`custom-theme-hex-error-${t}`,children:r({id:`yR5LHI`})})]})]},t)),t[8]=r,t[9]=d,t[10]=f,t[11]=i,t[12]=n,t[13]=v,t[14]=y,t[15]=b,t[16]=S,t[17]=C,t[18]=w,t[19]=T,t[20]=E}else v=t[13],y=t[14],b=t[15],S=t[16],C=t[17],w=t[18],T=t[19],E=t[20];let D;t[54]!==C||t[55]!==w?(D=(0,$.jsx)(`div`,{className:C,children:w}),t[54]=C,t[55]=w,t[56]=D):D=t[56];let O;t[57]!==D||t[58]!==T||t[59]!==E?(O=(0,$.jsxs)(`div`,{className:T,children:[E,D]}),t[57]=D,t[58]=T,t[59]=E,t[60]=O):O=t[60];let k;return t[61]!==v||t[62]!==y||t[63]!==b||t[64]!==S||t[65]!==O?(k=(0,$.jsxs)(`section`,{"aria-labelledby":v,className:y,"data-section":b,children:[S,O]}),t[61]=v,t[62]=y,t[63]=b,t[64]=S,t[65]=O,t[66]=k):k=t[66],k}function no(e){let t=(0,Z.c)(13),{userBinding:n}=e,{_:r}=s(),i;t[0]===r?i=t[1]:(i=r({id:`fJ3EbT`}),t[0]=r,t[1]=i);let a;t[2]===r?a=t[3]:(a=r({id:`J_bJiH`}),t[2]=r,t[3]=a);let o;t[4]!==i||t[5]!==a||t[6]!==n?(o=(0,$.jsx)(Ya,{title:i,description:a,scope:`user`,scopeBadge:`user`,binding:n,fields:rt}),t[4]=i,t[5]=a,t[6]=n,t[7]=o):o=t[7];let c;t[8]===n?c=t[9]:(c=(0,$.jsx)(to,{userBinding:n}),t[8]=n,t[9]=c);let l;return t[10]!==o||t[11]!==c?(l=(0,$.jsxs)(`div`,{className:`space-y-6`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=l):l=t[12],l}function ro(e){let t=(0,Z.c)(38),{activeId:n,userBinding:r,okignoreBinding:i,okignoreSynced:a,markdownlintRuleQuery:o}=e,{_:c}=s();if(n===`preferences`){let e;t[0]!==c||t[1]!==r?(e=r?(0,$.jsx)(Ya,{title:c({id:`Q6hhn8`}),description:c({id:`Y_kL7X`}),scope:`user`,binding:r,fields:ct}):(0,$.jsx)(pr,{}),t[0]=c,t[1]=r,t[2]=e):e=t[2];let n;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(Mr,{}),t[3]=n):n=t[3];let i;return t[4]===e?i=t[5]:(i=(0,$.jsxs)(`div`,{className:`space-y-8`,children:[e,n]}),t[4]=e,t[5]=i),i}if(n===`configure-agents`){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Ir,{}),t[6]=e):e=t[6],e}if(n===`hotkeys`){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Hr,{}),t[7]=e):e=t[7],e}if(n===`account`){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Jn,{}),t[8]=e):e=t[8],e}if(n===`sync`){let e;return t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Ja,{}),t[9]=e):e=t[9],e}if(n===`search`){let e;return t[10]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Na,{}),t[10]=e):e=t[10],e}if(n===`plugins-manage`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(oi,{}),t[11]=e):e=t[11],e}if(n===`content-rules`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Br,{}),t[12]=e):e=t[12],e}if(n===`user-plugins-manage`){let e;return t[13]===r?e=t[14]:(e=(0,$.jsx)(si,{userBinding:r}),t[13]=r,t[14]=e),e}if(n===`plugin:theme`){let e;return t[15]===r?e=t[16]:(e=r?(0,$.jsx)(no,{userBinding:r}):(0,$.jsx)(pr,{}),t[15]=r,t[16]=e),e}if(n===`plugin:markdownlint`){let e=o??null,n;return t[17]===e?n=t[18]:(n=(0,$.jsx)(ui,{initialRuleQuery:e}),t[17]=e,t[18]=n),n}if(n.startsWith(`plugin:`)){let e;t[19]===n?e=t[20]:(e=n.slice(7),t[19]=n,t[20]=e);let r=e,i;t[21]===r?i=t[22]:(i=Ei.find(e=>e.id===r),t[21]=r,t[22]=i);let a=i;if(!a)return null;let o=a.Section,s;return t[23]!==o||t[24]!==n?(s=(0,$.jsx)(o,{},n),t[23]=o,t[24]=n,t[25]=s):s=t[25],s}if(n===`link-previews`){let e;return t[26]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Gr,{}),t[26]=e):e=t[26],e}if(n===`terminal`){let e;return t[27]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Za,{}),t[27]=e):e=t[27],e}if(n===`project-templates`){let e;return t[28]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Oa,{}),t[28]=e):e=t[28],e}if(n===`skills`){let e;return t[29]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Ka,{scope:`project`}),t[29]=e):e=t[29],e}if(n===`user-skills`){let e;return t[30]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Ka,{scope:`global`}),t[30]=e):e=t[30],e}if(n===`sharing`){let e;return t[31]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Un,{}),t[31]=e):e=t[31],e}if(n===`okignore`){let e;return t[32]!==i||t[33]!==a?(e=(0,$.jsx)(Hi,{binding:i,synced:a}),t[32]=i,t[33]=a,t[34]=e):e=t[34],e}if(n===`ai-tools`){let e;return t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(er,{}),t[35]=e):e=t[35],e}if(n===`project-ai-tools`){let e;return t[36]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(xa,{}),t[36]=e):e=t[36],e}if(n===`claude-desktop`){let e;return t[37]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Wr,{}),t[37]=e):e=t[37],e}return null}export{ro as SettingsDialogBody};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-oSXzJYWO.js";import{a as ee,c as te,i as ne,n as re,o as ie,s as ae,t as oe}from"./dialog-CkjkuWLF.js";import{n as se,t as s}from"./git-branch-oPfvsh1I.js";import{t as c}from"./loader-circle-Cn2Xr4cN.js";import{n as ce,t as le}from"./miss-dialog-store-DBqQ_Nyn.js";import{n as l}from"./dist-BVbCw0G-.js";import{t as u}from"./desktop-bridge-types-5ScET3Cg.js";import{r as d,t as f}from"./auth-prompt-store-CmyRhcKh.js";import{a as p,n as m}from"./receive-store-9n3T9AKo.js";import{t as ue}from"./share-metadata-rows-D1HTNYwn.js";var h=e(n(),1),de=a();function fe(e){let t=e.shareTargetExists,n=e.dirtyConflicts.conflicts,r=e.dirtyConflicts.files;return t&&!n?{kind:`A`,openCurrentEnabled:!0,switchEnabled:!0,conflictingFiles:r}:!t&&!n?{kind:`B`,openCurrentEnabled:!1,switchEnabled:!0,conflictingFiles:r}:t&&n?{kind:`C`,openCurrentEnabled:!0,switchEnabled:!1,conflictingFiles:r}:{kind:`D`,openCurrentEnabled:!1,switchEnabled:!1,conflictingFiles:r}}function pe(e){return e.detached?e.currentHeadSha:e.currentBranch??`HEAD`}function g(e){if(e.ok)return{action:`await-cc1`};switch(e.reason){case`dirty-conflict`:return{action:`rerender-conflict`,files:e.files??[]};case`branch-not-found`:return{action:`dismiss-with-toast`,reason:`branch-not-found`};case`fetch-failed`:case`checkout-failed`:return{action:`stay-with-toast`,reason:e.reason};case`branch-in-other-worktree`:{let t=e.otherWorktreePath;return t===void 0||t.length===0?{action:`stay-with-toast`,reason:`checkout-failed`}:{action:`pivot-to-other-worktree`,otherWorktreePath:t}}case`ff-diverged`:return{action:`branch-diverged`};default:{let t=e.reason;throw Error(`Unhandled CheckoutFailureReason: ${String(t)}`)}}}var me={phase:`loading`};function he(e,t){return e.phase===`loading`?t===null?{phase:`error`}:{phase:`ready`,info:t}:e}function ge(e,t){return e.phase!==`ready`&&e.phase!==`verdict`?e:{phase:`switching`,info:e.info,pendingDoc:t}}function _e(e){return e.phase===`ready`?{phase:`creating-worktree`,info:e.info}:e}function ve(e){return fe(e).kind===`B`&&e.shareTargetOnOriginBranch===!1}function ye(e){return e.phase===`ready`?{phase:`verdict-pending`,info:e.info}:e}function be(e,t){if(e.phase!==`verdict-pending`)return e;if(t===null||t.verdict===`unknown`||t.verdict===`changed-locally`)return{phase:`ready`,info:e.info};let n=t.verdict===`renamed`?{kind:`renamed`,renamedTo:t.renamedTo}:{kind:t.verdict};return{phase:`verdict`,info:e.info,resolution:n}}function xe(e,t){if(e.phase!==`switching`)return{state:e};if(t===null)return{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`proxy-null`}};let n=g(t);return n.action===`await-cc1`?{state:{phase:`awaiting-cc1-recycle`,pendingDoc:e.pendingDoc}}:n.action===`rerender-conflict`?{state:{phase:`ready`,info:{...e.info,dirtyConflicts:{conflicts:!0,files:n.files.slice()}}}}:n.action===`pivot-to-other-worktree`?{state:{phase:`branch-in-other-worktree`,info:e.info,otherWorktreePath:n.otherWorktreePath,pendingDoc:e.pendingDoc}}:n.action===`dismiss-with-toast`?{state:{phase:`dismissed`,reason:n.reason},sideEffect:{kind:`toast`,reason:n.reason}}:n.action===`branch-diverged`?{state:{phase:`verdict`,info:e.info,resolution:{kind:`diverged`}}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:n.reason}}}function Se(e,t){return e.phase===`creating-worktree`?t===null?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`proxy-null`}}:t.ok?{state:{phase:`opening-worktree`,path:t.path}}:t.reason===`branch-not-found`?{state:{phase:`dismissed`,reason:`branch-not-found`},sideEffect:{kind:`toast`,reason:`branch-not-found`}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,helper:t.helper,authFailed:t.reason===`fetch-failed`?t.authFailed:void 0}}:{state:e}}var _=t();function Ce(e){return e!==null&&e.kind===`project-branch-switch`}function v(e){let t=(0,de.c)(217),{bridge:n,store:a}=e,f=a===void 0?m:a,{_:g}=i(),v=(0,h.useSyncExternalStore)(f.subscribe,f.getSnapshot,je),[y,b]=(0,h.useState)(me),Me=(0,h.useRef)(!1),Ne=(0,h.useRef)(!1),Pe=(0,h.useRef)(!1),Fe=(0,h.useRef)(null),Ie;t[0]===v?Ie=t[1]:(Ie=Ce(v)?v:null,t[0]=v,t[1]=Ie);let x=Ie,Le;t[2]!==g||t[3]!==x?.share.target.kind?(Le=x?.share.target.kind===`folder`?g({id:`ugoTXs`}):g({id:`XH30C4`}),t[2]=g,t[3]=x?.share.target.kind,t[4]=Le):Le=t[4];let S=Le,Re;t[5]===x?Re=t[6]:(Re=()=>{b(me),Me.current=!1,Ne.current=!1,Pe.current=!1,Fe.current=x},t[5]=x,t[6]=Re);let ze;t[7]===v?ze=t[8]:(ze=[v],t[7]=v,t[8]=ze),(0,h.useEffect)(Re,ze);let Be;t[9]!==x||t[10]!==n?(Be=()=>{if(!x||Me.current)return;Me.current=!0;let e=!1;return n.project.fetchBranchInfo({projectPath:x.projectPath,branch:x.share.branch,kind:x.share.target.kind,path:u(x.share.target)}).then(t=>{e||b(e=>he(e,t))}).catch(t=>{e||(console.warn(`[receive] branch-info-fetch-failed`,t instanceof Error?t.message:t),b(Ae))}),()=>{e=!0}},t[9]=x,t[10]=n,t[11]=Be):Be=t[11];let Ve;t[12]===x?Ve=t[13]:(Ve=[x],t[12]=x,t[13]=Ve),(0,h.useEffect)(Be,Ve);let He;t[14]!==x||t[15]!==y.info||t[16]!==y.phase||t[17]!==n?(He=()=>{if(!x||y.phase!==`ready`||Pe.current||!ve(y.info))return;Pe.current=!0,b(ye);let e=x;n.project.fetchTargetStatus({projectPath:x.projectPath,branch:x.share.branch,kind:x.share.target.kind,path:u(x.share.target)}).then(t=>{Fe.current===e&&b(e=>be(e,t))}).catch(t=>{Fe.current===e&&(console.warn(`[receive] target-status-fetch-failed`,t instanceof Error?t.message:t),b(ke))})},t[14]=x,t[15]=y.info,t[16]=y.phase,t[17]=n,t[18]=He):He=t[18];let Ue;t[19]!==x||t[20]!==y.phase?(Ue=[y.phase,x],t[19]=x,t[20]=y.phase,t[21]=Ue):Ue=t[21],(0,h.useEffect)(He,Ue);let We;t[22]!==x||t[23]!==y.phase||t[24]!==y.resolution||t[25]!==f?(We=()=>{if(y.phase!==`verdict`)return;let{kind:e}=y.resolution;e!==`deleted`&&e!==`never-on-branch`||x&&(le.arm({kind:x.share.target.kind,path:u(x.share.target),branch:x.share.branch}),f.dismiss())},t[22]=x,t[23]=y.phase,t[24]=y.resolution,t[25]=f,t[26]=We):We=t[26];let Ge;t[27]!==x||t[28]!==y||t[29]!==f?(Ge=[y,x,f],t[27]=x,t[28]=y,t[29]=f,t[30]=Ge):Ge=t[30],(0,h.useEffect)(We,Ge);let Ke;t[31]!==y.phase||t[32]!==y.resolution?(Ke=()=>{y.phase===`verdict`&&console.log(p({verdict_cell:y.resolution.kind}))},t[31]=y.phase,t[32]=y.resolution,t[33]=Ke):Ke=t[33];let qe;t[34]===y?qe=t[35]:(qe=[y],t[34]=y,t[35]=qe),(0,h.useEffect)(Ke,qe);let Je;t[36]!==g||t[37]!==x||t[38]!==y.pendingDoc||t[39]!==y.phase||t[40]!==n||t[41]!==f||t[42]!==S?(Je=()=>{if(y.phase!==`awaiting-cc1-recycle`||!x)return;let e=x.share.branch,t=y.pendingDoc;if(!e){f.dismiss();return}if(Ne.current)return;Ne.current=!0;let r=!1;return n.project.awaitBranchSwitched({projectPath:x.projectPath,branch:e,timeoutMs:3e4}).then(i=>{if(!r){if(i.ok){console.log(p({branch_dialog_action:`branch-switch-complete`,branch:e})),n.project.open({path:x.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:x.share.target.kind,path:t},pendingBranch:e}).catch(e=>{console.warn(`[receive] warm-focus-dispatch-failed branch_action=switch`,e instanceof Error?e.message:e),l.error(g({id:`gQV-9w`,values:{targetNoun:S}}))}),f.dismiss();return}console.log(p({branch_dialog_action:`branch-switch-timeout`,branch:e})),l.error(g({id:`LBwUR6`,values:{targetNoun:S}})),f.dismiss()}}).catch(e=>{r||(console.warn(`[receive] awaitBranchSwitched rejected`,e instanceof Error?e.message:e),l.error(g({id:`Jw6EC4`,values:{targetNoun:S}})),f.dismiss())}),()=>{r=!0}},t[36]=g,t[37]=x,t[38]=y.pendingDoc,t[39]=y.phase,t[40]=n,t[41]=f,t[42]=S,t[43]=Je):Je=t[43];let Ye;if(t[44]!==x||t[45]!==y.phase?(Ye=[y.phase,x],t[44]=x,t[45]=y.phase,t[46]=Ye):Ye=t[46],(0,h.useEffect)(Je,Ye),!x)return null;let{share:C,projectPath:w,currentBranch:Xe}=x,T=C.branch,Ze;t[47]!==g||t[48]!==n.project||t[49]!==w||t[50]!==T||t[51]!==f?(Ze=function(e,t,r){console.log(p({branch_dialog_action:`switch`,branch_action:`switch`,branch:T,verdict_cell:r})),b(t=>ge(t,e)),n.project.runCheckout(t?{projectPath:w,branch:T,fastForward:!0}:{projectPath:w,branch:T}).then(e=>{let t=null,n=!1;b(r=>{let{state:i,sideEffect:a}=xe(r,e);return a&&(t=a.reason,n=i.phase===`dismissed`),i}),t===`branch-not-found`?l.error(g({id:`NJyQi_`,values:{shareBranch:T}})):t===`fetch-failed`?l.error(g({id:`bWLmRK`})):(t===`checkout-failed`||t===`proxy-null`)&&l.error(g({id:`c863eW`,values:{shareBranch:T}})),n&&f.dismiss()}).catch(e=>{console.warn(`[receive] runCheckout rejected branch_action=switch`,e instanceof Error?e.message:e),b(Oe),l.error(g({id:`c863eW`,values:{shareBranch:T}}))})},t[47]=g,t[48]=n.project,t[49]=w,t[50]=T,t[51]=f,t[52]=Ze):Ze=t[52];let E=Ze,Qe;t[53]!==y.info||t[54]!==y.phase||t[55]!==E||t[56]!==C.target?(Qe=function(){y.phase===`ready`&&fe(y.info).switchEnabled&&E(u(C.target),!1)},t[53]=y.info,t[54]=y.phase,t[55]=E,t[56]=C.target,t[57]=Qe):Qe=t[57];let $e=Qe,et;t[58]!==y.phase||t[59]!==y.resolution||t[60]!==E||t[61]!==C.target?(et=function(){y.phase===`verdict`&&E(u(C.target),!0,y.resolution.kind)},t[58]=y.phase,t[59]=y.resolution,t[60]=E,t[61]=C.target,t[62]=et):et=t[62];let tt=et,nt;t[63]!==y.phase||t[64]!==y.resolution||t[65]!==E?(nt=function(){y.phase===`verdict`&&y.resolution.kind===`renamed`&&E(y.resolution.renamedTo,!0,y.resolution.kind)},t[63]=y.phase,t[64]=y.resolution,t[65]=E,t[66]=nt):nt=t[66];let rt=nt,it;t[67]!==y.phase||t[68]!==y.resolution||t[69]!==E||t[70]!==C.target?(it=function(){y.phase===`verdict`&&E(u(C.target),!1,y.resolution.kind)},t[67]=y.phase,t[68]=y.resolution,t[69]=E,t[70]=C.target,t[71]=it):it=t[71];let at=it,ot;t[72]!==g||t[73]!==n.project||t[74]!==w||t[75]!==C.target||t[76]!==T||t[77]!==f||t[78]!==S?(ot=function(){console.log(p({branch_dialog_action:`open-current`,branch:T})),n.project.open({path:w,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:C.target.kind,path:u(C.target)}}).catch(e=>{console.warn(`[receive] warm-focus-dispatch-failed branch_action=open-current`,e instanceof Error?e.message:e),l.error(g({id:`b5aNbi`,values:{targetNoun:S}}))}),f.dismiss()},t[72]=g,t[73]=n.project,t[74]=w,t[75]=C.target,t[76]=T,t[77]=f,t[78]=S,t[79]=ot):ot=t[79];let st=ot,ct;t[80]!==g||t[81]!==T?(ct=function(e,t,n){if(e===`fetch-failed`&&n){l.error(g({id:`gfb-CM`}),{action:{label:g({id:`5lWFkC`}),onClick:De}});return}switch(e){case`helper-not-found`:{let e=t??g({id:`cHhH3i`});l.error(g({id:`Z7x_Zh`,values:{tool:e}}));return}case`branch-not-found`:l.error(g({id:`NJyQi_`,values:{shareBranch:T}}));return;case`fetch-failed`:l.error(g({id:`bWLmRK`}));return;case`already-checked-out`:l.error(g({id:`ljHjfg`}));return;case`branch-exists`:l.error(g({id:`h3QZcB`,values:{shareBranch:T}}));return;case`path-exists`:l.error(g({id:`cN1Gcp`,values:{shareBranch:T}}));return;case`no-git`:l.error(g({id:`CFnavk`}));return;case`invalid-branch`:l.error(g({id:`JfPuv7`,values:{shareBranch:T}}));return;case`proxy-null`:case`error`:l.error(g({id:`e8zYa8`,values:{shareBranch:T}}));return;default:throw Error(`Unhandled worktree failure reason: ${String(e)}`)}},t[80]=g,t[81]=T,t[82]=ct):ct=t[82];let lt=ct,ut;t[83]!==g||t[84]!==n.project||t[85]!==C.target||t[86]!==T||t[87]!==lt||t[88]!==f?(ut=function(e){let t=null,r,i,a=!1,o=null;if(b(n=>{let{state:ee,sideEffect:te}=Se(n,e);return te&&(t=te.reason,r=te.helper,i=te.authFailed,a=ee.phase===`dismissed`),ee.phase===`opening-worktree`&&(o=ee.path),ee}),t!==null&&(console.log(p({branch_dialog_action:`open-worktree-failed:${t}`,branch:T})),lt(t,r,i)),o!==null){d();let e=o;n.project.open({path:e,target:`new-window`,entryPoint:`worktree`,pendingDeepLinkTarget:{kind:C.target.kind,path:u(C.target)},pendingBranch:T}).catch(t=>{console.warn(`[receive] worktree-open-failed branch_dialog_action=open-worktree`,t instanceof Error?t.message:t),l.error(g({id:`LdABLa`,values:{target:e}}))}),f.dismiss()}a&&f.dismiss()},t[83]=g,t[84]=n.project,t[85]=C.target,t[86]=T,t[87]=lt,t[88]=f,t[89]=ut):ut=t[89];let dt=ut,ft;t[90]!==dt||t[91]!==y.phase||t[92]!==n.worktree||t[93]!==T?(ft=function(){y.phase===`ready`&&(console.log(p({branch_dialog_action:`open-worktree`,branch:T})),b(_e),n.worktree.checkout({branch:T}).then(e=>{dt(e)}).catch(e=>{console.warn(`[receive] worktree-checkout rejected branch_dialog_action=open-worktree`,e instanceof Error?e.message:e),dt(null)}))},t[90]=dt,t[91]=y.phase,t[92]=n.worktree,t[93]=T,t[94]=ft):ft=t[94];let pt=ft,mt;t[95]!==g||t[96]!==y.otherWorktreePath||t[97]!==y.phase||t[98]!==n.project||t[99]!==C.target||t[100]!==T||t[101]!==f?(mt=function(){if(y.phase!==`branch-in-other-worktree`)return;let e=y.otherWorktreePath;console.log(p({branch_dialog_action:`pivot-to-other-worktree`,branch:T})),n.project.open({path:e,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:C.target.kind,path:u(C.target)},pendingBranch:T}).catch(t=>{console.warn(`[receive] pivot-open-failed branch_action=pivot-to-other-worktree`,t instanceof Error?t.message:t),l.error(g({id:`LdABLa`,values:{target:e}}))}),f.dismiss()},t[95]=g,t[96]=y.otherWorktreePath,t[97]=y.phase,t[98]=n.project,t[99]=C.target,t[100]=T,t[101]=f,t[102]=mt):mt=t[102];let ht=mt,gt;t[103]!==y.phase||t[104]!==y.resolution||t[105]!==f?(gt=function(){console.log(p({branch_dialog_action:`cancel`,verdict_cell:y.phase===`verdict`?y.resolution.kind:void 0})),f.dismiss()},t[103]=y.phase,t[104]=y.resolution,t[105]=f,t[106]=gt):gt=t[106];let D=gt,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K;if(t[107]!==g||t[108]!==y.info||t[109]!==y.otherWorktreePath||t[110]!==y.phase||t[111]!==y.resolution||t[112]!==D||t[113]!==Xe||t[114]!==C.branch||t[115]!==C.owner||t[116]!==C.repo||t[117]!==C.target||t[118]!==T||t[119]!==S){G=y.phase===`ready`||y.phase===`switching`||y.phase===`creating-worktree`?fe(y.info):null;let e;t[139]!==y.info||t[140]!==y.phase||t[141]!==Xe?(e=y.phase===`ready`||y.phase===`switching`||y.phase===`creating-worktree`?pe(y.info):Xe??`HEAD`,t[139]=y.info,t[140]=y.phase,t[141]=Xe,t[142]=e):e=t[142];let n=e;P=y.phase===`switching`||y.phase===`awaiting-cc1-recycle`,j=y.phase===`creating-worktree`;let i;t[143]===g?i=t[144]:(i=g({id:`OuY8t9`}),t[143]=g,t[144]=i),M=i;let a;t[145]===g?a=t[146]:(a=g({id:`XZkdtg`}),t[145]=g,t[146]=a),N=a;let o;t[147]===g?o=t[148]:(o=g({id:`VTulZj`}),t[147]=g,t[148]=o),K=o;let ie=y.phase===`loading`,se=y.phase===`error`;A=oe,U=!0,t[149]===D?W=t[150]:(W=e=>{e||D()},t[149]=D,t[150]=W),k=ne,R=`sm:max-w-xl`,z=`share-branch-switch-dialog`,B=Ee,V=Te;let s;t[151]===S?s=t[152]:(s=(0,_.jsx)(te,{children:(0,_.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:S}})}),t[151]=S,t[152]=s);let ce=C.owner,le=C.repo,l;t[153]===C.target?l=t[154]:(l=u(C.target),t[153]=C.target,t[154]=l);let d;t[155]!==C.owner||t[156]!==C.repo||t[157]!==l?(d=(0,_.jsx)(ee,{className:`sr-only`,children:(0,_.jsx)(r,{id:`f8jU-L`,values:{0:ce,1:le,2:l}})}),t[155]=C.owner,t[156]=C.repo,t[157]=l,t[158]=d):d=t[158],t[159]!==s||t[160]!==d?(H=(0,_.jsxs)(ae,{children:[s,d]}),t[159]=s,t[160]=d,t[161]=H):H=t[161],O=re;let f=C.owner,p=C.repo,m;t[162]===C.target?m=t[163]:(m=u(C.target),t[162]=C.target,t[163]=m),t[164]!==C.branch||t[165]!==C.owner||t[166]!==C.repo||t[167]!==C.target.kind||t[168]!==m?(F=(0,_.jsx)(`div`,{className:`mb-4`,children:(0,_.jsx)(ue,{owner:f,repo:p,path:m,kind:C.target.kind,branch:C.branch,testId:`share-branch-switch-metadata`,branchTestId:`share-branch-switch-metadata-branch`})}),t[164]=C.branch,t[165]=C.owner,t[166]=C.repo,t[167]=C.target.kind,t[168]=m,t[169]=F):F=t[169],I=y.phase===`branch-in-other-worktree`?(0,_.jsxs)(`div`,{className:`text-sm text-muted-foreground`,"data-testid":`share-branch-switch-in-other-worktree`,children:[(0,_.jsx)(`p`,{className:`leading-6`,children:(0,_.jsx)(r,{id:`yjExfe`,values:{shareBranch:T},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),(0,_.jsx)(`p`,{className:`mt-2 break-all rounded bg-muted px-2 py-1 font-mono text-xs text-foreground/80`,"data-testid":`share-branch-switch-in-other-worktree-path`,children:y.otherWorktreePath})]}):y.phase===`verdict-pending`?(0,_.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-verdict-pending`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`c8jBgX`})]}):y.phase===`verdict`?y.resolution.kind===`on-origin`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-on-origin`,children:(0,_.jsx)(r,{id:`Uay5NL`,values:{targetNoun:S,shareBranch:T},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):y.resolution.kind===`renamed`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-renamed`,children:(0,_.jsx)(r,{id:`P0HC30`,values:{0:y.resolution.renamedTo,targetNoun:S},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):y.resolution.kind===`diverged`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-diverged`,children:(0,_.jsx)(r,{id:`kLv8d3`,values:{shareBranch:T,targetNoun:S},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,_.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-verdict-handoff`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`c8jBgX`})]}):ie?(0,_.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-loading`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`jerqF0`})]}):se?(0,_.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,_.jsx)(r,{id:`w4hMYl`})}):G?.kind===`D`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,_.jsx)(r,{id:`DTI-fp`,values:{targetNoun:S,shareBranch:T},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):G?.kind===`B`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,_.jsx)(r,{id:`sZ2IOu`,values:{targetNoun:S,shareBranch:T,currentLabel:n},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,_.jsx)(r,{id:`_902BE`,values:{targetNoun:S,shareBranch:T,currentLabel:n},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),L=G&&!G.switchEnabled&&G.conflictingFiles.length>0?(0,_.jsxs)(`div`,{className:`mt-3 rounded-md border border-border bg-muted/30 p-3 text-1sm`,"data-testid":`share-branch-switch-conflict`,children:[(0,_.jsx)(`p`,{className:`font-medium text-foreground/90`,children:(0,_.jsx)(r,{id:`n2lRue`})}),(0,_.jsx)(`ul`,{id:`share-receive-branch-conflict-files`,className:`mt-1 list-disc space-y-0.5 pl-5 text-muted-foreground`,children:G.conflictingFiles.map(we)})]}):null,t[107]=g,t[108]=y.info,t[109]=y.otherWorktreePath,t[110]=y.phase,t[111]=y.resolution,t[112]=D,t[113]=Xe,t[114]=C.branch,t[115]=C.owner,t[116]=C.repo,t[117]=C.target,t[118]=T,t[119]=S,t[120]=O,t[121]=k,t[122]=A,t[123]=j,t[124]=M,t[125]=N,t[126]=P,t[127]=F,t[128]=I,t[129]=L,t[130]=R,t[131]=z,t[132]=B,t[133]=V,t[134]=H,t[135]=U,t[136]=W,t[137]=G,t[138]=K}else O=t[120],k=t[121],A=t[122],j=t[123],M=t[124],N=t[125],P=t[126],F=t[127],I=t[128],L=t[129],R=t[130],z=t[131],B=t[132],V=t[133],H=t[134],U=t[135],W=t[136],G=t[137],K=t[138];let q;t[170]===P?q=t[171]:(q=P?(0,_.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-switching`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`CU3AiE`})]}):null,t[170]=P,t[171]=q);let J;t[172]===j?J=t[173]:(J=j?(0,_.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-creating-worktree`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`PZtgO0`})]}):null,t[172]=j,t[173]=J);let Y;t[174]!==O||t[175]!==F||t[176]!==I||t[177]!==L||t[178]!==q||t[179]!==J?(Y=(0,_.jsxs)(O,{children:[F,I,L,q,J]}),t[174]=O,t[175]=F,t[176]=I,t[177]=L,t[178]=q,t[179]=J,t[180]=Y):Y=t[180];let _t;t[181]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,_.jsx)(r,{id:`dEgA5A`}),t[181]=_t):_t=t[181];let X;t[182]===D?X=t[183]:(X=(0,_.jsx)(o,{variant:`ghost`,className:`font-mono uppercase`,onClick:D,"data-testid":`share-branch-switch-cancel`,children:_t}),t[182]=D,t[183]=X);let Z;t[184]!==y.phase||t[185]!==y.resolution||t[186]!==j||t[187]!==st||t[188]!==rt||t[189]!==pt||t[190]!==ht||t[191]!==at||t[192]!==$e||t[193]!==tt||t[194]!==M||t[195]!==N||t[196]!==P||t[197]!==G||t[198]!==K?(Z=y.phase===`branch-in-other-worktree`?(0,_.jsx)(o,{onClick:ht,"data-testid":`share-branch-switch-in-other-worktree-pivot`,children:(0,_.jsx)(r,{id:`hyCxJY`})}):y.phase===`verdict`?y.resolution.kind===`on-origin`?(0,_.jsxs)(o,{onClick:tt,"data-testid":`share-branch-switch-verdict-switch-update`,children:[(0,_.jsx)(s,{className:`size-3.5`,"aria-hidden":!0}),(0,_.jsx)(r,{id:`uA_jXp`})]}):y.resolution.kind===`renamed`?(0,_.jsxs)(o,{onClick:rt,"data-testid":`share-branch-switch-verdict-open-renamed`,children:[(0,_.jsx)(ce,{className:`size-3.5`,"aria-hidden":!0}),(0,_.jsx)(r,{id:`AItsE5`})]}):y.resolution.kind===`diverged`?(0,_.jsxs)(o,{onClick:at,"data-testid":`share-branch-switch-verdict-plain-switch`,children:[(0,_.jsx)(s,{className:`size-3.5`,"aria-hidden":!0}),N]}):null:(0,_.jsxs)(`div`,{className:`flex min-w-0 flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:justify-end sm:gap-2`,children:[G?.openCurrentEnabled?(0,_.jsxs)(o,{variant:`outline`,className:`font-mono uppercase`,onClick:st,disabled:P||j,"data-testid":`share-branch-switch-open-current`,children:[(0,_.jsx)(ce,{className:`size-3.5`,"aria-hidden":!0}),M]}):null,(0,_.jsx)(o,{variant:`outline`,onClick:$e,disabled:!G?.switchEnabled||P||j,"aria-disabled":!G?.switchEnabled||P||j,"aria-describedby":G&&!G.switchEnabled&&G.conflictingFiles.length>0?`share-receive-branch-conflict-files`:void 0,"data-testid":`share-branch-switch-switch`,children:P?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(c,{className:`size-3.5 animate-spin`,"aria-hidden":`true`}),N]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(s,{className:`size-3.5`,"aria-hidden":!0}),N]})}),(0,_.jsx)(o,{onClick:pt,disabled:!G||P||j,"data-testid":`share-branch-switch-worktree`,children:j?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(c,{className:`size-3.5 animate-spin`,"aria-hidden":`true`}),K]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se,{className:`size-3.5`,"aria-hidden":!0}),K]})})]}),t[184]=y.phase,t[185]=y.resolution,t[186]=j,t[187]=st,t[188]=rt,t[189]=pt,t[190]=ht,t[191]=at,t[192]=$e,t[193]=tt,t[194]=M,t[195]=N,t[196]=P,t[197]=G,t[198]=K,t[199]=Z):Z=t[199];let Q;t[200]!==X||t[201]!==Z?(Q=(0,_.jsxs)(ie,{className:`sm:justify-between`,children:[X,Z]}),t[200]=X,t[201]=Z,t[202]=Q):Q=t[202];let $;t[203]!==k||t[204]!==R||t[205]!==z||t[206]!==B||t[207]!==V||t[208]!==H||t[209]!==Y||t[210]!==Q?($=(0,_.jsxs)(k,{className:R,"data-testid":z,onInteractOutside:B,onPointerDownOutside:V,children:[H,Y,Q]}),t[203]=k,t[204]=R,t[205]=z,t[206]=B,t[207]=V,t[208]=H,t[209]=Y,t[210]=Q,t[211]=$):$=t[211];let vt;return t[212]!==A||t[213]!==U||t[214]!==W||t[215]!==$?(vt=(0,_.jsx)(A,{open:U,onOpenChange:W,children:$}),t[212]=A,t[213]=U,t[214]=W,t[215]=$,t[216]=vt):vt=t[216],vt}function we(e){return(0,_.jsx)(`li`,{children:(0,_.jsx)(`code`,{className:`text-foreground/80`,children:e})},e)}function Te(e){e.preventDefault()}function Ee(e){e.preventDefault()}function De(){return f.request()}function Oe(e){return xe(e,null).state}function ke(e){return be(e,null)}function Ae(e){return he(e,null)}function je(){return null}export{v as ShareBranchSwitchDialog};
1
+ import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./button-D3xSRfT4.js";import{a as ee,c as te,i as ne,n as re,o as ie,s as ae,t as oe}from"./dialog-C1XaLkpS.js";import{n as se,t as s}from"./git-branch-v159JGOd.js";import{t as c}from"./loader-circle-A8fM_hha.js";import{n as ce,t as le}from"./miss-dialog-store-CU8cCSmK.js";import{n as l}from"./dist-Dr52ya0i.js";import{t as u}from"./desktop-bridge-types-ByIs2Wy8.js";import{r as d,t as f}from"./auth-prompt-store-C7w8BqXG.js";import{a as p,n as m}from"./receive-store-C-X60pJ_.js";import{t as ue}from"./share-metadata-rows-Ci33wJ2t.js";var h=e(n(),1),de=a();function fe(e){let t=e.shareTargetExists,n=e.dirtyConflicts.conflicts,r=e.dirtyConflicts.files;return t&&!n?{kind:`A`,openCurrentEnabled:!0,switchEnabled:!0,conflictingFiles:r}:!t&&!n?{kind:`B`,openCurrentEnabled:!1,switchEnabled:!0,conflictingFiles:r}:t&&n?{kind:`C`,openCurrentEnabled:!0,switchEnabled:!1,conflictingFiles:r}:{kind:`D`,openCurrentEnabled:!1,switchEnabled:!1,conflictingFiles:r}}function pe(e){return e.detached?e.currentHeadSha:e.currentBranch??`HEAD`}function g(e){if(e.ok)return{action:`await-cc1`};switch(e.reason){case`dirty-conflict`:return{action:`rerender-conflict`,files:e.files??[]};case`branch-not-found`:return{action:`dismiss-with-toast`,reason:`branch-not-found`};case`fetch-failed`:case`checkout-failed`:return{action:`stay-with-toast`,reason:e.reason};case`branch-in-other-worktree`:{let t=e.otherWorktreePath;return t===void 0||t.length===0?{action:`stay-with-toast`,reason:`checkout-failed`}:{action:`pivot-to-other-worktree`,otherWorktreePath:t}}case`ff-diverged`:return{action:`branch-diverged`};default:{let t=e.reason;throw Error(`Unhandled CheckoutFailureReason: ${String(t)}`)}}}var me={phase:`loading`};function he(e,t){return e.phase===`loading`?t===null?{phase:`error`}:{phase:`ready`,info:t}:e}function ge(e,t){return e.phase!==`ready`&&e.phase!==`verdict`?e:{phase:`switching`,info:e.info,pendingDoc:t}}function _e(e){return e.phase===`ready`?{phase:`creating-worktree`,info:e.info}:e}function ve(e){return fe(e).kind===`B`&&e.shareTargetOnOriginBranch===!1}function ye(e){return e.phase===`ready`?{phase:`verdict-pending`,info:e.info}:e}function be(e,t){if(e.phase!==`verdict-pending`)return e;if(t===null||t.verdict===`unknown`||t.verdict===`changed-locally`)return{phase:`ready`,info:e.info};let n=t.verdict===`renamed`?{kind:`renamed`,renamedTo:t.renamedTo}:{kind:t.verdict};return{phase:`verdict`,info:e.info,resolution:n}}function xe(e,t){if(e.phase!==`switching`)return{state:e};if(t===null)return{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`proxy-null`}};let n=g(t);return n.action===`await-cc1`?{state:{phase:`awaiting-cc1-recycle`,pendingDoc:e.pendingDoc}}:n.action===`rerender-conflict`?{state:{phase:`ready`,info:{...e.info,dirtyConflicts:{conflicts:!0,files:n.files.slice()}}}}:n.action===`pivot-to-other-worktree`?{state:{phase:`branch-in-other-worktree`,info:e.info,otherWorktreePath:n.otherWorktreePath,pendingDoc:e.pendingDoc}}:n.action===`dismiss-with-toast`?{state:{phase:`dismissed`,reason:n.reason},sideEffect:{kind:`toast`,reason:n.reason}}:n.action===`branch-diverged`?{state:{phase:`verdict`,info:e.info,resolution:{kind:`diverged`}}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:n.reason}}}function Se(e,t){return e.phase===`creating-worktree`?t===null?{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:`proxy-null`}}:t.ok?{state:{phase:`opening-worktree`,path:t.path}}:t.reason===`branch-not-found`?{state:{phase:`dismissed`,reason:`branch-not-found`},sideEffect:{kind:`toast`,reason:`branch-not-found`}}:{state:{phase:`ready`,info:e.info},sideEffect:{kind:`toast`,reason:t.reason,helper:t.helper,authFailed:t.reason===`fetch-failed`?t.authFailed:void 0}}:{state:e}}var _=t();function Ce(e){return e!==null&&e.kind===`project-branch-switch`}function v(e){let t=(0,de.c)(217),{bridge:n,store:a}=e,f=a===void 0?m:a,{_:g}=i(),v=(0,h.useSyncExternalStore)(f.subscribe,f.getSnapshot,je),[y,b]=(0,h.useState)(me),Me=(0,h.useRef)(!1),Ne=(0,h.useRef)(!1),Pe=(0,h.useRef)(!1),Fe=(0,h.useRef)(null),Ie;t[0]===v?Ie=t[1]:(Ie=Ce(v)?v:null,t[0]=v,t[1]=Ie);let x=Ie,Le;t[2]!==g||t[3]!==x?.share.target.kind?(Le=x?.share.target.kind===`folder`?g({id:`ugoTXs`}):g({id:`XH30C4`}),t[2]=g,t[3]=x?.share.target.kind,t[4]=Le):Le=t[4];let S=Le,Re;t[5]===x?Re=t[6]:(Re=()=>{b(me),Me.current=!1,Ne.current=!1,Pe.current=!1,Fe.current=x},t[5]=x,t[6]=Re);let ze;t[7]===v?ze=t[8]:(ze=[v],t[7]=v,t[8]=ze),(0,h.useEffect)(Re,ze);let Be;t[9]!==x||t[10]!==n?(Be=()=>{if(!x||Me.current)return;Me.current=!0;let e=!1;return n.project.fetchBranchInfo({projectPath:x.projectPath,branch:x.share.branch,kind:x.share.target.kind,path:u(x.share.target)}).then(t=>{e||b(e=>he(e,t))}).catch(t=>{e||(console.warn(`[receive] branch-info-fetch-failed`,t instanceof Error?t.message:t),b(Ae))}),()=>{e=!0}},t[9]=x,t[10]=n,t[11]=Be):Be=t[11];let Ve;t[12]===x?Ve=t[13]:(Ve=[x],t[12]=x,t[13]=Ve),(0,h.useEffect)(Be,Ve);let He;t[14]!==x||t[15]!==y.info||t[16]!==y.phase||t[17]!==n?(He=()=>{if(!x||y.phase!==`ready`||Pe.current||!ve(y.info))return;Pe.current=!0,b(ye);let e=x;n.project.fetchTargetStatus({projectPath:x.projectPath,branch:x.share.branch,kind:x.share.target.kind,path:u(x.share.target)}).then(t=>{Fe.current===e&&b(e=>be(e,t))}).catch(t=>{Fe.current===e&&(console.warn(`[receive] target-status-fetch-failed`,t instanceof Error?t.message:t),b(ke))})},t[14]=x,t[15]=y.info,t[16]=y.phase,t[17]=n,t[18]=He):He=t[18];let Ue;t[19]!==x||t[20]!==y.phase?(Ue=[y.phase,x],t[19]=x,t[20]=y.phase,t[21]=Ue):Ue=t[21],(0,h.useEffect)(He,Ue);let We;t[22]!==x||t[23]!==y.phase||t[24]!==y.resolution||t[25]!==f?(We=()=>{if(y.phase!==`verdict`)return;let{kind:e}=y.resolution;e!==`deleted`&&e!==`never-on-branch`||x&&(le.arm({kind:x.share.target.kind,path:u(x.share.target),branch:x.share.branch}),f.dismiss())},t[22]=x,t[23]=y.phase,t[24]=y.resolution,t[25]=f,t[26]=We):We=t[26];let Ge;t[27]!==x||t[28]!==y||t[29]!==f?(Ge=[y,x,f],t[27]=x,t[28]=y,t[29]=f,t[30]=Ge):Ge=t[30],(0,h.useEffect)(We,Ge);let Ke;t[31]!==y.phase||t[32]!==y.resolution?(Ke=()=>{y.phase===`verdict`&&console.log(p({verdict_cell:y.resolution.kind}))},t[31]=y.phase,t[32]=y.resolution,t[33]=Ke):Ke=t[33];let qe;t[34]===y?qe=t[35]:(qe=[y],t[34]=y,t[35]=qe),(0,h.useEffect)(Ke,qe);let Je;t[36]!==g||t[37]!==x||t[38]!==y.pendingDoc||t[39]!==y.phase||t[40]!==n||t[41]!==f||t[42]!==S?(Je=()=>{if(y.phase!==`awaiting-cc1-recycle`||!x)return;let e=x.share.branch,t=y.pendingDoc;if(!e){f.dismiss();return}if(Ne.current)return;Ne.current=!0;let r=!1;return n.project.awaitBranchSwitched({projectPath:x.projectPath,branch:e,timeoutMs:3e4}).then(i=>{if(!r){if(i.ok){console.log(p({branch_dialog_action:`branch-switch-complete`,branch:e})),n.project.open({path:x.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:x.share.target.kind,path:t},pendingBranch:e}).catch(e=>{console.warn(`[receive] warm-focus-dispatch-failed branch_action=switch`,e instanceof Error?e.message:e),l.error(g({id:`gQV-9w`,values:{targetNoun:S}}))}),f.dismiss();return}console.log(p({branch_dialog_action:`branch-switch-timeout`,branch:e})),l.error(g({id:`LBwUR6`,values:{targetNoun:S}})),f.dismiss()}}).catch(e=>{r||(console.warn(`[receive] awaitBranchSwitched rejected`,e instanceof Error?e.message:e),l.error(g({id:`Jw6EC4`,values:{targetNoun:S}})),f.dismiss())}),()=>{r=!0}},t[36]=g,t[37]=x,t[38]=y.pendingDoc,t[39]=y.phase,t[40]=n,t[41]=f,t[42]=S,t[43]=Je):Je=t[43];let Ye;if(t[44]!==x||t[45]!==y.phase?(Ye=[y.phase,x],t[44]=x,t[45]=y.phase,t[46]=Ye):Ye=t[46],(0,h.useEffect)(Je,Ye),!x)return null;let{share:C,projectPath:w,currentBranch:Xe}=x,T=C.branch,Ze;t[47]!==g||t[48]!==n.project||t[49]!==w||t[50]!==T||t[51]!==f?(Ze=function(e,t,r){console.log(p({branch_dialog_action:`switch`,branch_action:`switch`,branch:T,verdict_cell:r})),b(t=>ge(t,e)),n.project.runCheckout(t?{projectPath:w,branch:T,fastForward:!0}:{projectPath:w,branch:T}).then(e=>{let t=null,n=!1;b(r=>{let{state:i,sideEffect:a}=xe(r,e);return a&&(t=a.reason,n=i.phase===`dismissed`),i}),t===`branch-not-found`?l.error(g({id:`NJyQi_`,values:{shareBranch:T}})):t===`fetch-failed`?l.error(g({id:`bWLmRK`})):(t===`checkout-failed`||t===`proxy-null`)&&l.error(g({id:`c863eW`,values:{shareBranch:T}})),n&&f.dismiss()}).catch(e=>{console.warn(`[receive] runCheckout rejected branch_action=switch`,e instanceof Error?e.message:e),b(Oe),l.error(g({id:`c863eW`,values:{shareBranch:T}}))})},t[47]=g,t[48]=n.project,t[49]=w,t[50]=T,t[51]=f,t[52]=Ze):Ze=t[52];let E=Ze,Qe;t[53]!==y.info||t[54]!==y.phase||t[55]!==E||t[56]!==C.target?(Qe=function(){y.phase===`ready`&&fe(y.info).switchEnabled&&E(u(C.target),!1)},t[53]=y.info,t[54]=y.phase,t[55]=E,t[56]=C.target,t[57]=Qe):Qe=t[57];let $e=Qe,et;t[58]!==y.phase||t[59]!==y.resolution||t[60]!==E||t[61]!==C.target?(et=function(){y.phase===`verdict`&&E(u(C.target),!0,y.resolution.kind)},t[58]=y.phase,t[59]=y.resolution,t[60]=E,t[61]=C.target,t[62]=et):et=t[62];let tt=et,nt;t[63]!==y.phase||t[64]!==y.resolution||t[65]!==E?(nt=function(){y.phase===`verdict`&&y.resolution.kind===`renamed`&&E(y.resolution.renamedTo,!0,y.resolution.kind)},t[63]=y.phase,t[64]=y.resolution,t[65]=E,t[66]=nt):nt=t[66];let rt=nt,it;t[67]!==y.phase||t[68]!==y.resolution||t[69]!==E||t[70]!==C.target?(it=function(){y.phase===`verdict`&&E(u(C.target),!1,y.resolution.kind)},t[67]=y.phase,t[68]=y.resolution,t[69]=E,t[70]=C.target,t[71]=it):it=t[71];let at=it,ot;t[72]!==g||t[73]!==n.project||t[74]!==w||t[75]!==C.target||t[76]!==T||t[77]!==f||t[78]!==S?(ot=function(){console.log(p({branch_dialog_action:`open-current`,branch:T})),n.project.open({path:w,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:C.target.kind,path:u(C.target)}}).catch(e=>{console.warn(`[receive] warm-focus-dispatch-failed branch_action=open-current`,e instanceof Error?e.message:e),l.error(g({id:`b5aNbi`,values:{targetNoun:S}}))}),f.dismiss()},t[72]=g,t[73]=n.project,t[74]=w,t[75]=C.target,t[76]=T,t[77]=f,t[78]=S,t[79]=ot):ot=t[79];let st=ot,ct;t[80]!==g||t[81]!==T?(ct=function(e,t,n){if(e===`fetch-failed`&&n){l.error(g({id:`gfb-CM`}),{action:{label:g({id:`5lWFkC`}),onClick:De}});return}switch(e){case`helper-not-found`:{let e=t??g({id:`cHhH3i`});l.error(g({id:`Z7x_Zh`,values:{tool:e}}));return}case`branch-not-found`:l.error(g({id:`NJyQi_`,values:{shareBranch:T}}));return;case`fetch-failed`:l.error(g({id:`bWLmRK`}));return;case`already-checked-out`:l.error(g({id:`ljHjfg`}));return;case`branch-exists`:l.error(g({id:`h3QZcB`,values:{shareBranch:T}}));return;case`path-exists`:l.error(g({id:`cN1Gcp`,values:{shareBranch:T}}));return;case`no-git`:l.error(g({id:`CFnavk`}));return;case`invalid-branch`:l.error(g({id:`JfPuv7`,values:{shareBranch:T}}));return;case`proxy-null`:case`error`:l.error(g({id:`e8zYa8`,values:{shareBranch:T}}));return;default:throw Error(`Unhandled worktree failure reason: ${String(e)}`)}},t[80]=g,t[81]=T,t[82]=ct):ct=t[82];let lt=ct,ut;t[83]!==g||t[84]!==n.project||t[85]!==C.target||t[86]!==T||t[87]!==lt||t[88]!==f?(ut=function(e){let t=null,r,i,a=!1,o=null;if(b(n=>{let{state:ee,sideEffect:te}=Se(n,e);return te&&(t=te.reason,r=te.helper,i=te.authFailed,a=ee.phase===`dismissed`),ee.phase===`opening-worktree`&&(o=ee.path),ee}),t!==null&&(console.log(p({branch_dialog_action:`open-worktree-failed:${t}`,branch:T})),lt(t,r,i)),o!==null){d();let e=o;n.project.open({path:e,target:`new-window`,entryPoint:`worktree`,pendingDeepLinkTarget:{kind:C.target.kind,path:u(C.target)},pendingBranch:T}).catch(t=>{console.warn(`[receive] worktree-open-failed branch_dialog_action=open-worktree`,t instanceof Error?t.message:t),l.error(g({id:`LdABLa`,values:{target:e}}))}),f.dismiss()}a&&f.dismiss()},t[83]=g,t[84]=n.project,t[85]=C.target,t[86]=T,t[87]=lt,t[88]=f,t[89]=ut):ut=t[89];let dt=ut,ft;t[90]!==dt||t[91]!==y.phase||t[92]!==n.worktree||t[93]!==T?(ft=function(){y.phase===`ready`&&(console.log(p({branch_dialog_action:`open-worktree`,branch:T})),b(_e),n.worktree.checkout({branch:T}).then(e=>{dt(e)}).catch(e=>{console.warn(`[receive] worktree-checkout rejected branch_dialog_action=open-worktree`,e instanceof Error?e.message:e),dt(null)}))},t[90]=dt,t[91]=y.phase,t[92]=n.worktree,t[93]=T,t[94]=ft):ft=t[94];let pt=ft,mt;t[95]!==g||t[96]!==y.otherWorktreePath||t[97]!==y.phase||t[98]!==n.project||t[99]!==C.target||t[100]!==T||t[101]!==f?(mt=function(){if(y.phase!==`branch-in-other-worktree`)return;let e=y.otherWorktreePath;console.log(p({branch_dialog_action:`pivot-to-other-worktree`,branch:T})),n.project.open({path:e,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:C.target.kind,path:u(C.target)},pendingBranch:T}).catch(t=>{console.warn(`[receive] pivot-open-failed branch_action=pivot-to-other-worktree`,t instanceof Error?t.message:t),l.error(g({id:`LdABLa`,values:{target:e}}))}),f.dismiss()},t[95]=g,t[96]=y.otherWorktreePath,t[97]=y.phase,t[98]=n.project,t[99]=C.target,t[100]=T,t[101]=f,t[102]=mt):mt=t[102];let ht=mt,gt;t[103]!==y.phase||t[104]!==y.resolution||t[105]!==f?(gt=function(){console.log(p({branch_dialog_action:`cancel`,verdict_cell:y.phase===`verdict`?y.resolution.kind:void 0})),f.dismiss()},t[103]=y.phase,t[104]=y.resolution,t[105]=f,t[106]=gt):gt=t[106];let D=gt,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K;if(t[107]!==g||t[108]!==y.info||t[109]!==y.otherWorktreePath||t[110]!==y.phase||t[111]!==y.resolution||t[112]!==D||t[113]!==Xe||t[114]!==C.branch||t[115]!==C.owner||t[116]!==C.repo||t[117]!==C.target||t[118]!==T||t[119]!==S){G=y.phase===`ready`||y.phase===`switching`||y.phase===`creating-worktree`?fe(y.info):null;let e;t[139]!==y.info||t[140]!==y.phase||t[141]!==Xe?(e=y.phase===`ready`||y.phase===`switching`||y.phase===`creating-worktree`?pe(y.info):Xe??`HEAD`,t[139]=y.info,t[140]=y.phase,t[141]=Xe,t[142]=e):e=t[142];let n=e;P=y.phase===`switching`||y.phase===`awaiting-cc1-recycle`,j=y.phase===`creating-worktree`;let i;t[143]===g?i=t[144]:(i=g({id:`OuY8t9`}),t[143]=g,t[144]=i),M=i;let a;t[145]===g?a=t[146]:(a=g({id:`XZkdtg`}),t[145]=g,t[146]=a),N=a;let o;t[147]===g?o=t[148]:(o=g({id:`VTulZj`}),t[147]=g,t[148]=o),K=o;let ie=y.phase===`loading`,se=y.phase===`error`;A=oe,U=!0,t[149]===D?W=t[150]:(W=e=>{e||D()},t[149]=D,t[150]=W),k=ne,R=`sm:max-w-xl`,z=`share-branch-switch-dialog`,B=Ee,V=Te;let s;t[151]===S?s=t[152]:(s=(0,_.jsx)(te,{children:(0,_.jsx)(r,{id:`RY6Bq1`,values:{targetNoun:S}})}),t[151]=S,t[152]=s);let ce=C.owner,le=C.repo,l;t[153]===C.target?l=t[154]:(l=u(C.target),t[153]=C.target,t[154]=l);let d;t[155]!==C.owner||t[156]!==C.repo||t[157]!==l?(d=(0,_.jsx)(ee,{className:`sr-only`,children:(0,_.jsx)(r,{id:`f8jU-L`,values:{0:ce,1:le,2:l}})}),t[155]=C.owner,t[156]=C.repo,t[157]=l,t[158]=d):d=t[158],t[159]!==s||t[160]!==d?(H=(0,_.jsxs)(ae,{children:[s,d]}),t[159]=s,t[160]=d,t[161]=H):H=t[161],O=re;let f=C.owner,p=C.repo,m;t[162]===C.target?m=t[163]:(m=u(C.target),t[162]=C.target,t[163]=m),t[164]!==C.branch||t[165]!==C.owner||t[166]!==C.repo||t[167]!==C.target.kind||t[168]!==m?(F=(0,_.jsx)(`div`,{className:`mb-4`,children:(0,_.jsx)(ue,{owner:f,repo:p,path:m,kind:C.target.kind,branch:C.branch,testId:`share-branch-switch-metadata`,branchTestId:`share-branch-switch-metadata-branch`})}),t[164]=C.branch,t[165]=C.owner,t[166]=C.repo,t[167]=C.target.kind,t[168]=m,t[169]=F):F=t[169],I=y.phase===`branch-in-other-worktree`?(0,_.jsxs)(`div`,{className:`text-sm text-muted-foreground`,"data-testid":`share-branch-switch-in-other-worktree`,children:[(0,_.jsx)(`p`,{className:`leading-6`,children:(0,_.jsx)(r,{id:`yjExfe`,values:{shareBranch:T},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),(0,_.jsx)(`p`,{className:`mt-2 break-all rounded bg-muted px-2 py-1 font-mono text-xs text-foreground/80`,"data-testid":`share-branch-switch-in-other-worktree-path`,children:y.otherWorktreePath})]}):y.phase===`verdict-pending`?(0,_.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-verdict-pending`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`c8jBgX`})]}):y.phase===`verdict`?y.resolution.kind===`on-origin`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-on-origin`,children:(0,_.jsx)(r,{id:`Uay5NL`,values:{targetNoun:S,shareBranch:T},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):y.resolution.kind===`renamed`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-renamed`,children:(0,_.jsx)(r,{id:`P0HC30`,values:{0:y.resolution.renamedTo,targetNoun:S},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):y.resolution.kind===`diverged`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,"data-testid":`share-branch-switch-verdict-diverged`,children:(0,_.jsx)(r,{id:`kLv8d3`,values:{shareBranch:T,targetNoun:S},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,_.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-verdict-handoff`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`c8jBgX`})]}):ie?(0,_.jsxs)(`p`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-loading`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`jerqF0`})]}):se?(0,_.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,_.jsx)(r,{id:`w4hMYl`})}):G?.kind===`D`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,_.jsx)(r,{id:`DTI-fp`,values:{targetNoun:S,shareBranch:T},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):G?.kind===`B`?(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,_.jsx)(r,{id:`sZ2IOu`,values:{targetNoun:S,shareBranch:T,currentLabel:n},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}):(0,_.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:(0,_.jsx)(r,{id:`_902BE`,values:{targetNoun:S,shareBranch:T,currentLabel:n},components:{0:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`}),1:(0,_.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),L=G&&!G.switchEnabled&&G.conflictingFiles.length>0?(0,_.jsxs)(`div`,{className:`mt-3 rounded-md border border-border bg-muted/30 p-3 text-1sm`,"data-testid":`share-branch-switch-conflict`,children:[(0,_.jsx)(`p`,{className:`font-medium text-foreground/90`,children:(0,_.jsx)(r,{id:`n2lRue`})}),(0,_.jsx)(`ul`,{id:`share-receive-branch-conflict-files`,className:`mt-1 list-disc space-y-0.5 pl-5 text-muted-foreground`,children:G.conflictingFiles.map(we)})]}):null,t[107]=g,t[108]=y.info,t[109]=y.otherWorktreePath,t[110]=y.phase,t[111]=y.resolution,t[112]=D,t[113]=Xe,t[114]=C.branch,t[115]=C.owner,t[116]=C.repo,t[117]=C.target,t[118]=T,t[119]=S,t[120]=O,t[121]=k,t[122]=A,t[123]=j,t[124]=M,t[125]=N,t[126]=P,t[127]=F,t[128]=I,t[129]=L,t[130]=R,t[131]=z,t[132]=B,t[133]=V,t[134]=H,t[135]=U,t[136]=W,t[137]=G,t[138]=K}else O=t[120],k=t[121],A=t[122],j=t[123],M=t[124],N=t[125],P=t[126],F=t[127],I=t[128],L=t[129],R=t[130],z=t[131],B=t[132],V=t[133],H=t[134],U=t[135],W=t[136],G=t[137],K=t[138];let q;t[170]===P?q=t[171]:(q=P?(0,_.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-switching`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`CU3AiE`})]}):null,t[170]=P,t[171]=q);let J;t[172]===j?J=t[173]:(J=j?(0,_.jsxs)(`p`,{className:`mt-3 flex items-center gap-2 text-sm text-muted-foreground`,"data-testid":`share-branch-switch-creating-worktree`,role:`status`,"aria-live":`polite`,children:[(0,_.jsx)(c,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,_.jsx)(r,{id:`PZtgO0`})]}):null,t[172]=j,t[173]=J);let Y;t[174]!==O||t[175]!==F||t[176]!==I||t[177]!==L||t[178]!==q||t[179]!==J?(Y=(0,_.jsxs)(O,{children:[F,I,L,q,J]}),t[174]=O,t[175]=F,t[176]=I,t[177]=L,t[178]=q,t[179]=J,t[180]=Y):Y=t[180];let _t;t[181]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,_.jsx)(r,{id:`dEgA5A`}),t[181]=_t):_t=t[181];let X;t[182]===D?X=t[183]:(X=(0,_.jsx)(o,{variant:`ghost`,className:`font-mono uppercase`,onClick:D,"data-testid":`share-branch-switch-cancel`,children:_t}),t[182]=D,t[183]=X);let Z;t[184]!==y.phase||t[185]!==y.resolution||t[186]!==j||t[187]!==st||t[188]!==rt||t[189]!==pt||t[190]!==ht||t[191]!==at||t[192]!==$e||t[193]!==tt||t[194]!==M||t[195]!==N||t[196]!==P||t[197]!==G||t[198]!==K?(Z=y.phase===`branch-in-other-worktree`?(0,_.jsx)(o,{onClick:ht,"data-testid":`share-branch-switch-in-other-worktree-pivot`,children:(0,_.jsx)(r,{id:`hyCxJY`})}):y.phase===`verdict`?y.resolution.kind===`on-origin`?(0,_.jsxs)(o,{onClick:tt,"data-testid":`share-branch-switch-verdict-switch-update`,children:[(0,_.jsx)(s,{className:`size-3.5`,"aria-hidden":!0}),(0,_.jsx)(r,{id:`uA_jXp`})]}):y.resolution.kind===`renamed`?(0,_.jsxs)(o,{onClick:rt,"data-testid":`share-branch-switch-verdict-open-renamed`,children:[(0,_.jsx)(ce,{className:`size-3.5`,"aria-hidden":!0}),(0,_.jsx)(r,{id:`AItsE5`})]}):y.resolution.kind===`diverged`?(0,_.jsxs)(o,{onClick:at,"data-testid":`share-branch-switch-verdict-plain-switch`,children:[(0,_.jsx)(s,{className:`size-3.5`,"aria-hidden":!0}),N]}):null:(0,_.jsxs)(`div`,{className:`flex min-w-0 flex-col-reverse gap-2 sm:flex-row sm:flex-wrap sm:justify-end sm:gap-2`,children:[G?.openCurrentEnabled?(0,_.jsxs)(o,{variant:`outline`,className:`font-mono uppercase`,onClick:st,disabled:P||j,"data-testid":`share-branch-switch-open-current`,children:[(0,_.jsx)(ce,{className:`size-3.5`,"aria-hidden":!0}),M]}):null,(0,_.jsx)(o,{variant:`outline`,onClick:$e,disabled:!G?.switchEnabled||P||j,"aria-disabled":!G?.switchEnabled||P||j,"aria-describedby":G&&!G.switchEnabled&&G.conflictingFiles.length>0?`share-receive-branch-conflict-files`:void 0,"data-testid":`share-branch-switch-switch`,children:P?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(c,{className:`size-3.5 animate-spin`,"aria-hidden":`true`}),N]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(s,{className:`size-3.5`,"aria-hidden":!0}),N]})}),(0,_.jsx)(o,{onClick:pt,disabled:!G||P||j,"data-testid":`share-branch-switch-worktree`,children:j?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(c,{className:`size-3.5 animate-spin`,"aria-hidden":`true`}),K]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(se,{className:`size-3.5`,"aria-hidden":!0}),K]})})]}),t[184]=y.phase,t[185]=y.resolution,t[186]=j,t[187]=st,t[188]=rt,t[189]=pt,t[190]=ht,t[191]=at,t[192]=$e,t[193]=tt,t[194]=M,t[195]=N,t[196]=P,t[197]=G,t[198]=K,t[199]=Z):Z=t[199];let Q;t[200]!==X||t[201]!==Z?(Q=(0,_.jsxs)(ie,{className:`sm:justify-between`,children:[X,Z]}),t[200]=X,t[201]=Z,t[202]=Q):Q=t[202];let $;t[203]!==k||t[204]!==R||t[205]!==z||t[206]!==B||t[207]!==V||t[208]!==H||t[209]!==Y||t[210]!==Q?($=(0,_.jsxs)(k,{className:R,"data-testid":z,onInteractOutside:B,onPointerDownOutside:V,children:[H,Y,Q]}),t[203]=k,t[204]=R,t[205]=z,t[206]=B,t[207]=V,t[208]=H,t[209]=Y,t[210]=Q,t[211]=$):$=t[211];let vt;return t[212]!==A||t[213]!==U||t[214]!==W||t[215]!==$?(vt=(0,_.jsx)(A,{open:U,onOpenChange:W,children:$}),t[212]=A,t[213]=U,t[214]=W,t[215]=$,t[216]=vt):vt=t[216],vt}function we(e){return(0,_.jsx)(`li`,{children:(0,_.jsx)(`code`,{className:`text-foreground/80`,children:e})},e)}function Te(e){e.preventDefault()}function Ee(e){e.preventDefault()}function De(){return f.request()}function Oe(e){return xe(e,null).state}function ke(e){return be(e,null)}function Ae(e){return he(e,null)}function je(){return null}export{v as ShareBranchSwitchDialog};