@p4code/cli 0.8.11 → 0.8.13

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 (336) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-DY9l0jFs.mjs → binCli-B9aQxlIK.mjs} +1865 -1492
  3. package/dist/client/.vite/manifest.json +2144 -2145
  4. package/dist/client/assets/AlertDialogRoot-DvQNG7Nt.js +2 -0
  5. package/dist/client/assets/{AnimatedHeight-D-OJUoBJ.js → AnimatedHeight-CH-N3JTc.js} +2 -2
  6. package/dist/client/assets/{AuthSurfaceShell-B_P0_qZ6.js → AuthSurfaceShell-CJdXkxyH.js} +2 -2
  7. package/dist/client/assets/{CSPContext-D8hlJ4eS.js → CSPContext-4VAD2_gc.js} +2 -2
  8. package/dist/client/assets/{ChatGptUsageButton-fMcoYEDa.js → ChatGptUsageButton-7u9uPgbK.js} +2 -2
  9. package/dist/client/assets/ChatMarkdown-C22JFyYa.js +65 -0
  10. package/dist/client/assets/CheckboxIndicator-ClY0P0ol.js +2 -0
  11. package/dist/client/assets/CodexSetupSection.logic-CEAT7YdZ.js +2 -0
  12. package/dist/client/assets/{CollapsiblePanel-kfl4yLKn.js → CollapsiblePanel-Cubscn-a.js} +2 -2
  13. package/dist/client/assets/ComboboxClear-qTthzuJh.js +2 -0
  14. package/dist/client/assets/{CommandBlock-BI3ZCXsB.js → CommandBlock-CWt29kmi.js} +2 -2
  15. package/dist/client/assets/{ComposerPromptEditor-BkRvKIiZ.js → ComposerPromptEditor-Bt_L4smq.js} +44 -44
  16. package/dist/client/assets/{CompositeRoot-B9Xvst63.js → CompositeRoot-DUqf78yV.js} +2 -2
  17. package/dist/client/assets/{ConnectionStatusDot-DtKQQSMi.js → ConnectionStatusDot-cdpNRZhA.js} +2 -2
  18. package/dist/client/assets/{DevicePanel-B_jOvmeL.js → DevicePanel-CZm-f5TC.js} +2 -2
  19. package/dist/client/assets/{DeviceSetup-BXjqCO_9.js → DeviceSetup-BdrkGme6.js} +2 -2
  20. package/dist/client/assets/{DialogTitle-BzKEBo4W.js → DialogTitle-CQU6s1Wy.js} +2 -2
  21. package/dist/client/assets/{DiffCommentAnnotation-D_1Iw0oL.js → DiffCommentAnnotation-B-XoYYxb.js} +2 -2
  22. package/dist/client/assets/{DiffFileTree-D6386u9x.js → DiffFileTree-CwTkSU3R.js} +2 -2
  23. package/dist/client/assets/DiffPanel-BCI9XXpF.js +2 -0
  24. package/dist/client/assets/{DiffWorkerPoolProvider-Cw5WeG1t.js → DiffWorkerPoolProvider-OPZsOibX.js} +3 -3
  25. package/dist/client/assets/{EmbeddedDesign-Drkomo9K.js → EmbeddedDesign-DwRAPHYl.js} +4 -4
  26. package/dist/client/assets/{EnvironmentMachineIcon-COX4G5YJ.js → EnvironmentMachineIcon-DCdlTSYU.js} +2 -2
  27. package/dist/client/assets/{ExpandableText-BHihVj6x.js → ExpandableText-BtdwzlFy.js} +3 -3
  28. package/dist/client/assets/{FieldControl-CIaYJhnp.js → FieldControl-BI2gK4Z0.js} +2 -2
  29. package/dist/client/assets/{FileDiff-FK4mtyx3.js → FileDiff-BkJG5QAe.js} +2 -2
  30. package/dist/client/assets/{FilePreviewPanel-ncsuf7iX.js → FilePreviewPanel-CURtQAD1.js} +4 -4
  31. package/dist/client/assets/{FoldedSettingsSection-CRlh3-BO.js → FoldedSettingsSection-B9B8i8Gg.js} +2 -2
  32. package/dist/client/assets/{FormContext-DTtr4Y3v.js → FormContext-Bgwez2tv.js} +2 -2
  33. package/dist/client/assets/{Icons-BFyKltvl.js → Icons-B5JVkp3z.js} +2 -2
  34. package/dist/client/assets/Input-BQRZG5rU.js +2 -0
  35. package/dist/client/assets/{KeybindingsSettings.logic-_oQM9Dzv.js → KeybindingsSettings.logic-6lVDnd1N.js} +2 -2
  36. package/dist/client/assets/{NoProjectsHero-8d3l2unf.js → NoProjectsHero-CkhVaJk9.js} +2 -2
  37. package/dist/client/assets/PanelLayoutControls-CxuV0JO3.js +216 -0
  38. package/dist/client/assets/{PierreEntryIcon-DtlkLdir.js → PierreEntryIcon-CPG-jnaN.js} +2 -2
  39. package/dist/client/assets/PopoverHandle-CBT8hFut.js +2 -0
  40. package/dist/client/assets/PreviewPanel-Doh1peEu.js +2 -0
  41. package/dist/client/assets/ProjectDefaultsSettings-DfhAk0_Y.js +2 -0
  42. package/dist/client/assets/{ProjectFavicon-YdOZ4g5-.js → ProjectFavicon-DUW6Bo66.js} +3 -3
  43. package/dist/client/assets/{ProjectIconPickerDialog-C23nnU1a.js → ProjectIconPickerDialog-C613hnVY.js} +2 -2
  44. package/dist/client/assets/{ProjectMonogram-BMGWdmjv.js → ProjectMonogram-B9iJhcVp.js} +2 -2
  45. package/dist/client/assets/{ProviderAuthTerminal-YztsMr2F.js → ProviderAuthTerminal-eq346NX_.js} +2 -2
  46. package/dist/client/assets/{ProviderModelPicker-S_tiGeLH.js → ProviderModelPicker-DPb-88ui.js} +2 -2
  47. package/dist/client/assets/{ProviderSettingsForm-C3nbCFfS.js → ProviderSettingsForm-DTYqzs8W.js} +2 -2
  48. package/dist/client/assets/PullRequestCodeTab-BBz0FfLD.js +6 -0
  49. package/dist/client/assets/{ReadOnlySourcePreview-BNe8pyVf.js → ReadOnlySourcePreview-CkeeLVAm.js} +2 -2
  50. package/dist/client/assets/{RenderErrorBoundary-DEgVmtJL.js → RenderErrorBoundary-mfAvIiFU.js} +2 -2
  51. package/dist/client/assets/{ScheduledTasksSettings-CISo4C7r.js → ScheduledTasksSettings-BMUE9M9Z.js} +2 -2
  52. package/dist/client/assets/{ScopedSwitch-eWB5GlaA.js → ScopedSwitch-BKOdsllO.js} +2 -2
  53. package/dist/client/assets/{ScrollAreaCorner-SeZ1sx-t.js → ScrollAreaCorner-CoeXGFSL.js} +2 -2
  54. package/dist/client/assets/{SecretInput-D0DyMDSw.js → SecretInput-CROqj1gF.js} +2 -2
  55. package/dist/client/assets/SelectScrollUpArrow-SDOpV3nj.js +2 -0
  56. package/dist/client/assets/{SettingsPanels-DA7lXl0N.js → SettingsPanels-BHhMJaVc.js} +6 -6
  57. package/dist/client/assets/{SettingsPanels.logic-lCZaJhKM.js → SettingsPanels.logic-BwmY39Sq.js} +2 -2
  58. package/dist/client/assets/{SettingsScopeNotice-BAtVWG0d.js → SettingsScopeNotice-DAPsshab.js} +2 -2
  59. package/dist/client/assets/{T3ConnectAccountPages-nabxuL18.js → T3ConnectAccountPages-CDuVbE2z.js} +2 -2
  60. package/dist/client/assets/{T3ConnectSidebarSignIn-CSVR5Zot.js → T3ConnectSidebarSignIn-BSQHp-Xq.js} +2 -2
  61. package/dist/client/assets/{ThemeEditorPanel-BMtL4rIt.js → ThemeEditorPanel-BiuI7Uiy.js} +3 -3
  62. package/dist/client/assets/ThreadTerminalDrawer-B8n6TAqv.js +5 -0
  63. package/dist/client/assets/TooltipViewport-BKD6QABG.js +2 -0
  64. package/dist/client/assets/{Virtualizer-Bi8p4Z6E.js → Virtualizer-CTnacEby.js} +2 -2
  65. package/dist/client/assets/{WorkspaceBreadcrumb-B0Ap9wKu.js → WorkspaceBreadcrumb-BmVcurpi.js} +2 -2
  66. package/dist/client/assets/{WorkspacePageContainer-COKQZB3N.js → WorkspacePageContainer-BSjVd7h4.js} +2 -2
  67. package/dist/client/assets/{WorkspacePageHeader-BDzzcsWQ.js → WorkspacePageHeader-BLYOcS9Z.js} +2 -2
  68. package/dist/client/assets/_chat-z348gvgF.js +45 -0
  69. package/dist/client/assets/{_chat.index-k4jctzPr.js → _chat.index-CBbUzaK7.js} +2 -2
  70. package/dist/client/assets/{_chat.new-BlFtqZqt.js → _chat.new-7TTfcDf1.js} +2 -2
  71. package/dist/client/assets/_chat.pull-requests-BE7Q2lUu.js +2 -0
  72. package/dist/client/assets/{abnfDiagram-VCTEODGH-BVKlsgtX.js → abnfDiagram-VCTEODGH-HaXM7twL.js} +2 -2
  73. package/dist/client/assets/{alert-B2wk0CaO.js → alert-5swcxUBm.js} +2 -2
  74. package/dist/client/assets/architecture-7GRP2DOG-CiMEl2LX.js +1 -0
  75. package/dist/client/assets/{architectureDiagram-5GKGNRK7-zBJWGViu.js → architectureDiagram-5GKGNRK7-BhWXFsXS.js} +2 -2
  76. package/dist/client/assets/assets-DXnV2oRj.js +2 -0
  77. package/dist/client/assets/{blockDiagram-I7D4REHJ-BdiAAtHi.js → blockDiagram-I7D4REHJ-D213N9iF.js} +2 -2
  78. package/dist/client/assets/{browserHistoryStore-CqGVWa5a.js → browserHistoryStore-DURO3U2L.js} +2 -2
  79. package/dist/client/assets/{browserLinkTarget-CINrbcxi.js → browserLinkTarget-DcGx3A8F.js} +2 -2
  80. package/dist/client/assets/{c4Diagram-7LVT6UL2-CqnmSo8f.js → c4Diagram-7LVT6UL2-58POuQV-.js} +2 -2
  81. package/dist/client/assets/channel-CDbYAV2D.js +2 -0
  82. package/dist/client/assets/{checkbox-DU_a7ZnJ.js → checkbox-1tz9neVf.js} +2 -2
  83. package/dist/client/assets/{chunk-4HAMMTFA-BpyojyCk.js → chunk-4HAMMTFA-Bcwcw8Wz.js} +2 -2
  84. package/dist/client/assets/{chunk-75Z2AOVW-LBmwoUvq.js → chunk-75Z2AOVW-BaYdZ0Fq.js} +2 -2
  85. package/dist/client/assets/{chunk-DU6HZSFF-zhv2Vnfx.js → chunk-DU6HZSFF-B6TRgw4-.js} +2 -2
  86. package/dist/client/assets/{chunk-F27PBJKO-K5uPeDhv.js → chunk-F27PBJKO-B5arSwg6.js} +2 -2
  87. package/dist/client/assets/{chunk-GMAD6QVW-CAAu3Cn5.js → chunk-GMAD6QVW-XeNCd3gb.js} +2 -2
  88. package/dist/client/assets/{chunk-GVQU2GXP-Br_UAx49.js → chunk-GVQU2GXP-CWVbbWh7.js} +2 -2
  89. package/dist/client/assets/{chunk-IMKFNOWR-Kqfxrrdn.js → chunk-IMKFNOWR-Cb-yxIAE.js} +2 -2
  90. package/dist/client/assets/{chunk-L3NEJ4N5-D1cWO7rm.js → chunk-L3NEJ4N5-Di7nZhzu.js} +2 -2
  91. package/dist/client/assets/{chunk-OSK3NFVY-BiMJbcHf.js → chunk-OSK3NFVY-DcqBXKUK.js} +2 -2
  92. package/dist/client/assets/{chunk-P2QGCYS3-BuGzzo3g.js → chunk-P2QGCYS3-DJ1kMiTY.js} +2 -2
  93. package/dist/client/assets/{chunk-POPQ4Y6H-C_w0mNLk.js → chunk-POPQ4Y6H-Ba9RYr-b.js} +2 -2
  94. package/dist/client/assets/{chunk-PWAF6VOD-CJFd7LKC.js → chunk-PWAF6VOD-D4Ch07S8.js} +2 -2
  95. package/dist/client/assets/{chunk-SHT3W25Y-Beev3ZeU.js → chunk-SHT3W25Y-BafMUZgc.js} +2 -2
  96. package/dist/client/assets/{chunk-SVP7TREG-BqpBEmtK.js → chunk-SVP7TREG-CsEVe0s3.js} +2 -2
  97. package/dist/client/assets/{chunk-TICWLB2K-B0vIU1Au.js → chunk-TICWLB2K-D3tgdZlp.js} +2 -2
  98. package/dist/client/assets/classDiagram-ZZMXUADV-Cdtwlmxc.js +2 -0
  99. package/dist/client/assets/classDiagram-v2-VYDZK3BY-Cdtwlmxc.js +2 -0
  100. package/dist/client/assets/{color-picker-CYOS1hwQ.js → color-picker-N6f_Hu7P.js} +2 -2
  101. package/dist/client/assets/{combobox-CZradSHe.js → combobox-B07cVaQY.js} +2 -2
  102. package/dist/client/assets/{command-BB0IyhBc.js → command-B70eQIps.js} +2 -2
  103. package/dist/client/assets/{connect-DGwXUKTk.js → connect-Vt7wlrih.js} +2 -2
  104. package/dist/client/assets/{connect-agent-DFwOzcLG.js → connect-agent-CX70rAkF.js} +2 -2
  105. package/dist/client/assets/{cynefin-OW5HDTMX-BjcFswd0.js → cynefin-OW5HDTMX-CU8HnD4F.js} +1 -1
  106. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-BDWLg5Tt.js → cynefinDiagram-5FMLGOSQ-Cvc6_oYZ.js} +2 -2
  107. package/dist/client/assets/{dagre-GXQ25YYZ-DZpVjkDw.js → dagre-GXQ25YYZ-Bx5buWLS.js} +2 -2
  108. package/dist/client/assets/device-BgvBRE7C.js +2 -0
  109. package/dist/client/assets/{diagram-S7CK7UJ4-BpVs-kYJ.js → diagram-S7CK7UJ4-CPZrAy0P.js} +2 -2
  110. package/dist/client/assets/{diagram-UQ7AKVKN-EN7yKI08.js → diagram-UQ7AKVKN-kBtSnHpL.js} +2 -2
  111. package/dist/client/assets/{diagram-VSXAHHWV-B2oljv94.js → diagram-VSXAHHWV-DQP2q1tS.js} +2 -2
  112. package/dist/client/assets/{diagram-VX7I27RA-BIl0lJ6d.js → diagram-VX7I27RA-DRUN0yEk.js} +2 -2
  113. package/dist/client/assets/{diagram-Z3DM3KII-B8uoK-O5.js → diagram-Z3DM3KII-D4WMsQZZ.js} +2 -2
  114. package/dist/client/assets/{dialog-x5a5g_fa.js → dialog-DmneyTGi.js} +2 -2
  115. package/dist/client/assets/{diffRendering-DeZLcalP.js → diffRendering-iR2meoVj.js} +2 -2
  116. package/dist/client/assets/{discovery-list-Bn1UyUNL.js → discovery-list-ZGkddsst.js} +2 -2
  117. package/dist/client/assets/{dist-Bd1WIVAz.js → dist-vr51zfzA.js} +3 -3
  118. package/dist/client/assets/{draft-input-CwXvLRjL.js → draft-input-DHZ1J7B_.js} +2 -2
  119. package/dist/client/assets/{duoViewer-BZ7rNqkx.js → duoViewer-DTVry3xd.js} +2 -2
  120. package/dist/client/assets/{dynamic-BMz3CcWG.js → dynamic-CuoX2JEO.js} +2 -2
  121. package/dist/client/assets/{ebnfDiagram-PWID7BFC-BQcQotuk.js → ebnfDiagram-PWID7BFC-BNUtunQw.js} +2 -2
  122. package/dist/client/assets/{embeddedScripts-Cek5ppgQ.js → embeddedScripts-BMvBWRz_.js} +2 -2
  123. package/dist/client/assets/{empty-C-FrtXzi.js → empty-hFNkAHps.js} +2 -2
  124. package/dist/client/assets/entities-7B8nzlQw.js +2 -0
  125. package/dist/client/assets/{environments-Dm2_6Uan.js → environments-DYIXXf7q.js} +2 -2
  126. package/dist/client/assets/{erDiagram-RLTQ6QDP-Y5XhNz9b.js → erDiagram-RLTQ6QDP-DHjjowZq.js} +2 -2
  127. package/dist/client/assets/eventmodeling-NTZA5JFV-DNKqiuCf.js +1 -0
  128. package/dist/client/assets/{fileLinks-1xYacDKI.js → fileLinks-BYi-XNUG.js} +2 -2
  129. package/dist/client/assets/{fileTreeExpansion-B24BhRqA.js → fileTreeExpansion-DIOxQqDo.js} +2 -2
  130. package/dist/client/assets/flowDiagram-HODETNUW-CbOoDtR7.js +1 -0
  131. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-DqWb0OUJ.js → ganttDiagram-EL5Y4UJY-DEPOqoj0.js} +2 -2
  132. package/dist/client/assets/{getDiffFileInput-CCYVAWRm.js → getDiffFileInput-DMj15wpy.js} +2 -2
  133. package/dist/client/assets/{gitGraph-4MIJSDKK-5lcY1dZk.js → gitGraph-4MIJSDKK-BGKW_zhb.js} +1 -1
  134. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-BJKz_rGI.js → gitGraphDiagram-WWUBYQGX-7UhsI5zi.js} +2 -2
  135. package/dist/client/assets/{guideRunStore-BhlldU3q.js → guideRunStore-BEkwZ9H7.js} +2 -2
  136. package/dist/client/assets/{htmlRender-Egw4Y-80.js → htmlRender-BxVc1PlI.js} +2 -2
  137. package/dist/client/assets/{index-Dc7GC03y.js → index-C_MVyH59.js} +3 -3
  138. package/dist/client/assets/{info-A6RAGUB7-BWnMlmF7.js → info-A6RAGUB7-jvyzx_4e.js} +1 -1
  139. package/dist/client/assets/{infoDiagram-27XIBGKW-DKW68xDy.js → infoDiagram-27XIBGKW-lTTpu3as.js} +2 -2
  140. package/dist/client/assets/{input-DhWmPSxf.js → input-RqvQJ9gh.js} +2 -2
  141. package/dist/client/assets/{input-group-D4qHaxH8.js → input-group-BFtrsedw.js} +2 -2
  142. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-dRMCvDN0.js → ishikawaDiagram-5VMMS53U-DlrQNGG9.js} +2 -2
  143. package/dist/client/assets/{journeyDiagram-3NMN7TZE-CAxCpgF5.js → journeyDiagram-3NMN7TZE-Buy9e-fU.js} +2 -2
  144. package/dist/client/assets/{kanban-definition-UXKFOSKX-BaSkJW47.js → kanban-definition-UXKFOSKX-1KgAXH0g.js} +2 -2
  145. package/dist/client/assets/{kbd-I5TavBvc.js → kbd-BnsXAHsc.js} +2 -2
  146. package/dist/client/assets/{keybindings-B3kvDAJC.js → keybindings-BtHOXkP-.js} +2 -2
  147. package/dist/client/assets/{lazyRouteComponent-ZmKiS4iU.js → lazyRouteComponent-T0YE6Rn9.js} +2 -2
  148. package/dist/client/assets/{line-B59oA22i.js → line-DUV1hs6X.js} +2 -2
  149. package/dist/client/assets/{link-DQB3a7WC.js → link-gKYnbTYT.js} +2 -2
  150. package/dist/client/assets/{linkedPrompt-Cqfqh2Aq.js → linkedPrompt-Da8rJho3.js} +2 -2
  151. package/dist/client/assets/main-Bh6Hj0_-.js +30 -0
  152. package/dist/client/assets/{main-Ch-SjebX.css → main-CoSpTpWL.css} +1 -1
  153. package/dist/client/assets/{mediaReference-DRC-8GdL.js → mediaReference-CLlAiRVc.js} +2 -2
  154. package/dist/client/assets/{mediaSource-DWSwwPfV.js → mediaSource-BTCWn94E.js} +2 -2
  155. package/dist/client/assets/{mermaid-parser.core-DcamukpZ.js → mermaid-parser.core-CsBuWV4-.js} +4 -4
  156. package/dist/client/assets/{mermaid.core-C6GXL70P.js → mermaid.core-BcICv5EB.js} +5 -5
  157. package/dist/client/assets/{mindmap-definition-YA3MSWOX-CEVz3xGI.js → mindmap-definition-YA3MSWOX-BqCqe4io.js} +2 -2
  158. package/dist/client/assets/number-field-DIYUxout.js +2 -0
  159. package/dist/client/assets/{observeResize-Cpph8C0G.js → observeResize-D9ECzP-D.js} +2 -2
  160. package/dist/client/assets/{onboarding-CLIRA2Sa.js → onboarding-COQ6KgRG.js} +2 -2
  161. package/dist/client/assets/{openFileInPreview-uS9Qgrru.js → openFileInPreview-BhRAqg63.js} +2 -2
  162. package/dist/client/assets/{p4ProjectFile-CIYnqKbl.js → p4ProjectFile-z5Hlq99W.js} +2 -2
  163. package/dist/client/assets/{packet-AYTQ26CC-B9XAEihD.js → packet-AYTQ26CC-BYCaPqFA.js} +1 -1
  164. package/dist/client/assets/{pair-DTfs9_4K.js → pair-BDKjGij-.js} +2 -2
  165. package/dist/client/assets/{pegDiagram-XKGWAZYB-tcLsMhrs.js → pegDiagram-XKGWAZYB-CqCw5Z-L.js} +2 -2
  166. package/dist/client/assets/{phoneViewer-wYjPQP4U.js → phoneViewer-DLSM0QXE.js} +2 -2
  167. package/dist/client/assets/{pie-WAS4IAKB-B3ig0TFp.js → pie-WAS4IAKB-BfOlqQx1.js} +1 -1
  168. package/dist/client/assets/{pieDiagram-E7YTZNPT-uaJgfQOp.js → pieDiagram-E7YTZNPT-DZpCrUQF.js} +2 -2
  169. package/dist/client/assets/{pierre-icons-Dav7jMBk.js → pierre-icons-BG7vd34x.js} +2 -2
  170. package/dist/client/assets/{popover-Bc0WvoPP.js → popover-DE9WCm99.js} +2 -2
  171. package/dist/client/assets/{preview-IWIgXHdy.js → preview-Cl-7ojv-.js} +2 -2
  172. package/dist/client/assets/{preview-C4lGbDhm.js → preview-bd-MGMMz.js} +2 -2
  173. package/dist/client/assets/{previewMiniPlayerStore-CTOOyQLc.js → previewMiniPlayerStore-Bz1T9oVV.js} +2 -2
  174. package/dist/client/assets/primary-BwHoAoya.js +2 -0
  175. package/dist/client/assets/primaryCloudLinkState-DtOYGRkF.js +2 -0
  176. package/dist/client/assets/projectFilesQueryState-BP_JvI7-.js +2 -0
  177. package/dist/client/assets/projectScriptEditor-BGLshibY.js +2 -0
  178. package/dist/client/assets/{providerSkills-C7CtJefh.js → providerSkills-DxYtwoxJ.js} +2 -2
  179. package/dist/client/assets/{pullRequestDetail.logic-DGX-Sd8d.js → pullRequestDetail.logic-C_aVDAY_.js} +4 -4
  180. package/dist/client/assets/{pullRequestIcons-BaQbmCBu.js → pullRequestIcons-D5Yo5Zsn.js} +2 -2
  181. package/dist/client/assets/{pullRequestReviewStore-wpVYihKr.js → pullRequestReviewStore-DaEzt1m1.js} +2 -2
  182. package/dist/client/assets/{pullRequests-BbD7hNlR.js → pullRequests-D0no1PZS.js} +2 -2
  183. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-BOFUpnyi.js → quadrantDiagram-AXDQQJYC-BTtuOXlL.js} +2 -2
  184. package/dist/client/assets/queries-DkmaXOL-.js +2 -0
  185. package/dist/client/assets/query-Bd5_Y_Vy.js +2 -0
  186. package/dist/client/assets/{radar-RG4KPBEZ--djmIj49.js → radar-RG4KPBEZ-BiJgnIUY.js} +1 -1
  187. package/dist/client/assets/radio-group-CBunNtTU.js +2 -0
  188. package/dist/client/assets/{railroad-74A4TZTK-DMMw049f.js → railroad-74A4TZTK-C0CA0mcr.js} +1 -1
  189. package/dist/client/assets/railroad-abnf-HS5TGJTU-BtC_0p6z.js +1 -0
  190. package/dist/client/assets/railroad-ebnf-LZEXJU2U-IeTBC6cs.js +1 -0
  191. package/dist/client/assets/railroad-peg-WCYAUIDC-DLoLKYq3.js +1 -0
  192. package/dist/client/assets/{railroadDiagram-O6MQD6OU-Df9rhhFk.js → railroadDiagram-O6MQD6OU-WczOSoF4.js} +2 -2
  193. package/dist/client/assets/{renderScheduler-b0pOdWwc.js → renderScheduler-BLjFSKnt.js} +2 -2
  194. package/dist/client/assets/{requirementDiagram-BXWQKSXE-BtGYMd7U.js → requirementDiagram-BXWQKSXE-B3qCIQP5.js} +2 -2
  195. package/dist/client/assets/{rightPanelStore-37-59X44.js → rightPanelStore-6-YhsfkE.js} +2 -2
  196. package/dist/client/assets/runtime-Bni_zt6P.js +2 -0
  197. package/dist/client/assets/runtime-D8mKjOP-.js +6 -0
  198. package/dist/client/assets/{runtimeModeConfig-DF8wod3s.js → runtimeModeConfig-C3q8YqVA.js} +2 -2
  199. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-D7_y-s_u.js → sankeyDiagram-P5KCCOFB-e2-j7ERe.js} +2 -2
  200. package/dist/client/assets/{scheduledTasksSettings.logic-CvvQA-b7.js → scheduledTasksSettings.logic-BNC897-_.js} +3 -3
  201. package/dist/client/assets/{scroll-area-BDT5qfX2.js → scroll-area-Davaj52_.js} +2 -2
  202. package/dist/client/assets/{select-BQxcmO_1.js → select-B47XfaxQ.js} +2 -2
  203. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-AuXrX-b5.js → sequenceDiagram-WJ2MYXX4-DG7-8UJk.js} +2 -2
  204. package/dist/client/assets/server-CaLEm3Wt.js +2 -0
  205. package/dist/client/assets/{session-Bc1P10r_.js → session-2CRBJwS7.js} +2 -2
  206. package/dist/client/assets/{session-logic-BNtU33qU.js → session-logic-BLOBsHEA.js} +4 -4
  207. package/dist/client/assets/{settings-CZSrxmjf.js → settings-BIwaDm1N.js} +2 -2
  208. package/dist/client/assets/settings.appearance-ToUM8fHh.js +2 -0
  209. package/dist/client/assets/settings.archived-Cq_qclay.js +2 -0
  210. package/dist/client/assets/{settings.computer-use-BAzpb53_.js → settings.computer-use-BEghs16L.js} +2 -2
  211. package/dist/client/assets/settings.connections-C_LVk0gJ.js +2 -0
  212. package/dist/client/assets/{settings.data-controls-DIkcwUy1.js → settings.data-controls-BaTil8NB.js} +2 -2
  213. package/dist/client/assets/{settings.decisions-BN9ozN_A.js → settings.decisions-JTbMt08J.js} +2 -2
  214. package/dist/client/assets/settings.diagnostics-ByG62ZGs.js +2 -0
  215. package/dist/client/assets/settings.general-BT78z_Cn.js +2 -0
  216. package/dist/client/assets/{settings.integrations-CT3opViE.js → settings.integrations-C3jj2T1d.js} +2 -2
  217. package/dist/client/assets/{settings.keybindings-BBTkicWk.js → settings.keybindings-CeqZWQEi.js} +2 -2
  218. package/dist/client/assets/{settings.open-source-licenses-C_hoYTwe.js → settings.open-source-licenses-BAFwkfI8.js} +2 -2
  219. package/dist/client/assets/settings.plugins-D5l1ZPSB.js +5 -0
  220. package/dist/client/assets/settings.projects-Cqx1zAvs.js +4 -0
  221. package/dist/client/assets/settings.providers-CS55UrI1.js +3 -0
  222. package/dist/client/assets/settings.scheduled-tasks-CFJTEOb1.js +2 -0
  223. package/dist/client/assets/{settings.snap-shot-D-zJVnjT.js → settings.snap-shot-E3AITJyC.js} +2 -2
  224. package/dist/client/assets/{settings.source-control-DIU1xRUy.js → settings.source-control-CWWy9E3b.js} +2 -2
  225. package/dist/client/assets/{settings.storage-DRxTKEjG.js → settings.storage-BnUI1rFT.js} +2 -2
  226. package/dist/client/assets/{settingsLayout-Cbpy7Mfz.js → settingsLayout-DHc6oKfL.js} +3 -3
  227. package/dist/client/assets/{sidebar-D5nBG54l.js → sidebar-BkujXU9U.js} +2 -2
  228. package/dist/client/assets/{sidebarProjectGrouping-DXnDcqLY.js → sidebarProjectGrouping-DD4nu9RX.js} +2 -2
  229. package/dist/client/assets/{skeleton-oZHFXSZp.js → skeleton-C6_D5JUu.js} +2 -2
  230. package/dist/client/assets/{sortable.esm-Boen_E7K.js → sortable.esm-BAEGChD3.js} +2 -2
  231. package/dist/client/assets/{sourceControl-DE9QO1yg.js → sourceControl-BAghu6LN.js} +2 -2
  232. package/dist/client/assets/{spinner-Bnjv_L8F.js → spinner-CpLstN6u.js} +2 -2
  233. package/dist/client/assets/{standalone-page-Davc_MrS.js → standalone-page-7vaVYOp-.js} +2 -2
  234. package/dist/client/assets/{stateDiagram-D77RDMKH-EwB2WAAm.js → stateDiagram-D77RDMKH-CpZF58eW.js} +2 -2
  235. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-DewOo-MV.js +2 -0
  236. package/dist/client/assets/{swimlanes-42K2YHIH-RngRFsjR.js → swimlanes-42K2YHIH-D1b49puG.js} +2 -2
  237. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-d9EGwk-5.js +9 -0
  238. package/dist/client/assets/{terminal-links-BT70vIBN.js → terminal-links-CjmSI9gV.js} +2 -2
  239. package/dist/client/assets/{terminalSessions-Cj-MqjH8.js → terminalSessions-Q2t1JYPS.js} +2 -2
  240. package/dist/client/assets/{textarea-B8WPFAr0.js → textarea-DKdxwZZC.js} +2 -2
  241. package/dist/client/assets/{themePalette-CdoksNDx.js → themePalette-7p_LOU3J.js} +3 -3
  242. package/dist/client/assets/{threadSort-DD61dseb.js → threadSort-C5oCCRfj.js} +2 -2
  243. package/dist/client/assets/{timeline-definition-24CTP7MA-BfIggpP3.js → timeline-definition-24CTP7MA-89AJY6KO.js} +2 -2
  244. package/dist/client/assets/toast-DhMYg_gN.js +2 -0
  245. package/dist/client/assets/{toggle-DLuCM2ny.js → toggle-BshAsXT6.js} +2 -2
  246. package/dist/client/assets/{toggle-group-RZD18_sD.js → toggle-group-ZNzhUvHt.js} +2 -2
  247. package/dist/client/assets/tooltip-Cq9yz15d.js +2 -0
  248. package/dist/client/assets/{treeView-Q6P3EWNA-BjKaOr9u.js → treeView-Q6P3EWNA-CqNF2YcW.js} +1 -1
  249. package/dist/client/assets/{treemap-WGGIJYW6-ffFPsmk1.js → treemap-WGGIJYW6-LJa3ZEYA.js} +1 -1
  250. package/dist/client/assets/usage-CJVyABbK.js +2 -0
  251. package/dist/client/assets/{usageAccess-CGcVLBtI.js → usageAccess-CieOJbVm.js} +2 -2
  252. package/dist/client/assets/{usageFormat-B-HlJYM5.js → usageFormat-BEGhDYfU.js} +2 -2
  253. package/dist/client/assets/{usageShortcuts-CUsmDt-0.js → usageShortcuts-DxuByyhD.js} +2 -2
  254. package/dist/client/assets/{use-atom-command-Dz_yqN35.js → use-atom-command-x4GQBtio.js} +2 -2
  255. package/dist/client/assets/{useAriaLabelledBy-DZIzyiAY.js → useAriaLabelledBy-u5efXUxw.js} +2 -2
  256. package/dist/client/assets/{useHandleNewThread-DjevdE0U.js → useHandleNewThread-CReGBX6y.js} +2 -2
  257. package/dist/client/assets/{useLocation-UcmQE5FC.js → useLocation-B3ir4ben.js} +2 -2
  258. package/dist/client/assets/useNavigate-DRqH9NhA.js +2 -0
  259. package/dist/client/assets/{useNavigateBack-B0y76gBs.js → useNavigateBack-XQd0WINI.js} +2 -2
  260. package/dist/client/assets/{useParams-DdYFF9g9.js → useParams-Cil-ZIwd.js} +2 -2
  261. package/dist/client/assets/{usePermissionStatus-C01enB4u.js → usePermissionStatus-C4aMrLLP.js} +2 -2
  262. package/dist/client/assets/{usePullRequestActions-BKpChcp1.js → usePullRequestActions-BL4mjngC.js} +3 -3
  263. package/dist/client/assets/{useRegisterFieldControl-Bmw-33lq.js → useRegisterFieldControl-75QESVfk.js} +2 -2
  264. package/dist/client/assets/{useScopedModelAvailability-mUid6EfJ.js → useScopedModelAvailability-CBOIiaXC.js} +2 -2
  265. package/dist/client/assets/useSettings-Dx076NWT.js +3 -0
  266. package/dist/client/assets/{useT3ConnectAuthPrompt-C7Dm8xCm.js → useT3ConnectAuthPrompt-1zTdZLsH.js} +2 -2
  267. package/dist/client/assets/utils-BEVyjoxo.js +37 -0
  268. package/dist/client/assets/vcsRefInvalidation-46AnO9mr.js +2 -0
  269. package/dist/client/assets/{vennDiagram-4TSXK5OY-Bw5_1h9Y.js → vennDiagram-4TSXK5OY-CvvE7gMp.js} +2 -2
  270. package/dist/client/assets/{wardley-WFR3VGLG-BzzHb86M.js → wardley-WFR3VGLG-Ca8Qzkpo.js} +1 -1
  271. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-RCSx0hV5.js → wardleyDiagram-VM6X3IG4-BBSNgSMI.js} +2 -2
  272. package/dist/client/assets/{welcome-RXSMyzlx.js → welcome-B3wsq5wK.js} +2 -2
  273. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-CcISZM46.js → xychartDiagram-S5SC5T6Z-D8OhWe48.js} +2 -2
  274. package/dist/client/index.html +1 -1
  275. package/dist/{renderer-C4obs87z.mjs → renderer-C4CdFj__.mjs} +2 -2
  276. package/dist/{runtime-2Dbe0RYi.mjs → runtime-CCVFqL3Y.mjs} +78 -4
  277. package/package.json +1 -1
  278. package/dist/client/assets/AlertDialogRoot-Bb5-VhZe.js +0 -2
  279. package/dist/client/assets/ChatMarkdown-B7b91JUl.js +0 -65
  280. package/dist/client/assets/CheckboxIndicator-BzFOZwIv.js +0 -2
  281. package/dist/client/assets/CodexSetupSection.logic-CeUTTu-x.js +0 -2
  282. package/dist/client/assets/ComboboxClear-Di7TLMMS.js +0 -2
  283. package/dist/client/assets/DiffPanel-D6VVj6BF.js +0 -2
  284. package/dist/client/assets/Input-DoZ73vNO.js +0 -2
  285. package/dist/client/assets/PanelLayoutControls-3fTyX_SN.js +0 -216
  286. package/dist/client/assets/PopoverHandle-D2swQJBt.js +0 -2
  287. package/dist/client/assets/PreviewPanel-Ca3_DPh_.js +0 -2
  288. package/dist/client/assets/ProjectDefaultsSettings-B--7QlKN.js +0 -2
  289. package/dist/client/assets/PullRequestCodeTab-BdP3_tNe.js +0 -6
  290. package/dist/client/assets/SelectScrollUpArrow-CAd5YEsi.js +0 -2
  291. package/dist/client/assets/ThreadTerminalDrawer-CLfVfvoq.js +0 -5
  292. package/dist/client/assets/TooltipViewport-Wc_QpRGI.js +0 -2
  293. package/dist/client/assets/_chat-D-Gcj0-9.js +0 -45
  294. package/dist/client/assets/_chat.pull-requests-DrLHGpqx.js +0 -2
  295. package/dist/client/assets/architecture-7GRP2DOG-BNBr3Sao.js +0 -1
  296. package/dist/client/assets/assets-BhchpDuq.js +0 -2
  297. package/dist/client/assets/channel-CfHDq-fp.js +0 -2
  298. package/dist/client/assets/classDiagram-ZZMXUADV-Cm99q1tS.js +0 -2
  299. package/dist/client/assets/classDiagram-v2-VYDZK3BY-Cm99q1tS.js +0 -2
  300. package/dist/client/assets/device-BEgZIK7u.js +0 -2
  301. package/dist/client/assets/entities-DPIZFvN7.js +0 -2
  302. package/dist/client/assets/eventmodeling-NTZA5JFV-B7plRWX7.js +0 -1
  303. package/dist/client/assets/flowDiagram-HODETNUW-BEpQPBfI.js +0 -1
  304. package/dist/client/assets/main-CxOeqlhD.js +0 -30
  305. package/dist/client/assets/number-field-N4gbrhyd.js +0 -2
  306. package/dist/client/assets/primary-CRkgnOCY.js +0 -2
  307. package/dist/client/assets/primaryCloudLinkState-B_VNTJYL.js +0 -2
  308. package/dist/client/assets/projectFilesQueryState-U08pztRu.js +0 -2
  309. package/dist/client/assets/projectScriptEditor-D8mxKLOb.js +0 -2
  310. package/dist/client/assets/queries-BVPZtaQA.js +0 -2
  311. package/dist/client/assets/query-CpOQgkic.js +0 -2
  312. package/dist/client/assets/radio-group-CfHe3q1m.js +0 -2
  313. package/dist/client/assets/railroad-abnf-HS5TGJTU-BJdCwb3O.js +0 -1
  314. package/dist/client/assets/railroad-ebnf-LZEXJU2U-a9vhoAEG.js +0 -1
  315. package/dist/client/assets/railroad-peg-WCYAUIDC-Cyo-vXW_.js +0 -1
  316. package/dist/client/assets/runtime-Bc4kgQim.js +0 -2
  317. package/dist/client/assets/runtime-DZfpb67Q.js +0 -6
  318. package/dist/client/assets/server-LJ0-FVGH.js +0 -2
  319. package/dist/client/assets/settings.appearance-B_LipS5_.js +0 -2
  320. package/dist/client/assets/settings.archived-B_h3CK_T.js +0 -2
  321. package/dist/client/assets/settings.connections-Bv37N8Tm.js +0 -2
  322. package/dist/client/assets/settings.diagnostics-DuoGRNGf.js +0 -2
  323. package/dist/client/assets/settings.general-B-Bt2-nG.js +0 -2
  324. package/dist/client/assets/settings.plugins-DafKnC5Q.js +0 -5
  325. package/dist/client/assets/settings.projects-r2ZcxKud.js +0 -4
  326. package/dist/client/assets/settings.providers-jbZijXPV.js +0 -3
  327. package/dist/client/assets/settings.scheduled-tasks-C0d4wkYE.js +0 -2
  328. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CcnJHQ4a.js +0 -2
  329. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-CrkPrysy.js +0 -9
  330. package/dist/client/assets/toast-DYfY2t_z.js +0 -2
  331. package/dist/client/assets/tooltip-924Ikq0L.js +0 -2
  332. package/dist/client/assets/usage-CRK5JZJm.js +0 -2
  333. package/dist/client/assets/useNavigate-Dvl9uiuL.js +0 -2
  334. package/dist/client/assets/useSettings-DCI8Hv09.js +0 -3
  335. package/dist/client/assets/utils-CRwA5SKO.js +0 -37
  336. package/dist/client/assets/vcsRefInvalidation-3pHpDJC2.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$i as n,Ca as r,Co as i,Eo as a,Fa as o,Ln as s,Na as c,Pn as l,Ra as u,So as ee,Ta as d,To as f,Va as p,_o as te,br as m,ea as h,ga as g,io as ne,lE as re,vo as ie,wo as ae,ya as oe,yo as se,zn as _}from"./utils-BEVyjoxo.js";import{t as ce}from"./useRegisterFieldControl-75QESVfk.js";import{t as le}from"./FormContext-Bgwez2tv.js";import{t as ue}from"./useAriaLabelledBy-u5efXUxw.js";import{t as de}from"./FieldItemContext-Bn6xBVJg.js";var v=e(t()),y=v.createContext(void 0);function fe(e=!0){let t=v.useContext(y);if(t===void 0&&!e)throw Error(a(3));return t}function pe(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var b=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.indeterminate=`data-indeterminate`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({});function x(e){return v.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[b.checked]:``}:{[b.unchecked]:``}},..._}),[e.indeterminate])}var S=v.createContext(void 0);function C(){let e=v.useContext(S);if(e===void 0)throw Error(a(14));return e}var w=e(re()),me=`data-parent`,T=v.forwardRef(function(e,t){let{checked:a,className:te,defaultChecked:g=!1,"aria-labelledby":re,disabled:oe=!1,form:_,id:y,indeterminate:b=!1,inputRef:C,name:T,onCheckedChange:E,parent:D=!1,readOnly:O=!1,render:he,required:k=!1,uncheckedValue:A,value:j,nativeButton:M=!1,style:ge,..._e}=e,{clearErrors:ve}=le(),{disabled:ye,name:be,setDirty:xe,setFilled:N,setFocused:P,setTouched:Se,state:F,validationMode:Ce,validityData:we,shouldValidateOnChange:Te,validation:Ee}=s(),De=de(),{labelId:Oe,controlId:ke,registerControlId:I,getDescriptionProps:Ae}=l(),L=fe(),R=L?.parent,z=R&&L.allValues,B=ye||De.disabled||L?.disabled||oe,V=be??T,H=j??V,je=d(),Me=d(),U=ke;z?U=D?Me:`${R.id}-${H}`:y&&(U=y);let W={};z&&(D?W=L.parent.getParentProps():H&&(W=L.parent.getChildProps(H)));let{checked:Ne=a,indeterminate:G=b,onCheckedChange:Pe,...Fe}=W,K=L?.value,Ie=L?.setValue,Le=L?.defaultValue,q=v.useRef(null),J=f(()=>Symbol(`checkbox-control`)),Y=v.useRef(!1),{getButtonProps:Re,buttonRef:ze}=c({disabled:B,native:M}),X=L?.validation??Ee,[Z,Be]=p({controlled:H&&K&&!D?K.includes(H):Ne,default:H&&Le&&!D?Le.includes(H):g,name:`Checkbox`,state:`checked`});o(()=>{I!==i&&(Y.current=!0,I(J.current,U))},[U,I,J]),v.useEffect(()=>{let e=J.current;return()=>{Y.current&&I!==i&&(Y.current=!1,I(e,void 0))}},[I,J]),ce(q,je,Z,void 0,!L);let Q=v.useRef(null),Ve=ae(C,Q,X.inputRef),He=ue(re,Oe,Q,!M,U??void 0);o(()=>{Q.current&&(Q.current.indeterminate=G,Z&&N(!0))},[Z,G,N]),m(Z,()=>{(!L||D)&&(ve(V),N(Z),xe(Z!==we.initialValue),Te()?X.commit(Z):X.commit(Z,!0))});let Ue=se({checked:Z,disabled:B,form:_,name:D?void 0:V,id:M?void 0:U??void 0,required:k,ref:Ve,style:V?h:n,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(O){e.preventDefault();return}let t=e.currentTarget.checked,n=r(ne,e.nativeEvent);if(Pe?.(t,n),E?.(t,n),!n.isCanceled&&(Be(t),H&&K&&Ie&&!D&&!z)){let e=t?[...K,H]:K.filter(e=>e!==H);Ie(e,n)}},onFocus(){q.current?.focus()}},j===void 0?ee:{value:(L?Z&&j:j)||``},Ae,L?X.getValidationProps:X.getInputValidationProps),We=z?!!Ne:Z,Ge=z&&G||b;v.useEffect(()=>{if(!R||!H)return;let e=R.disabledStatesRef.current;return e.set(H,B),()=>{e.delete(H)}},[R,B,H]);let $=v.useMemo(()=>({...F,checked:We,disabled:B,readOnly:O,required:k,indeterminate:Ge}),[F,We,B,O,k,Ge]),Ke=x($),qe=ie(`span`,e,{state:$,ref:[ze,q,t,L?.registerControlRef],props:[{id:M?U??void 0:je,role:`checkbox`,"aria-checked":G?`mixed`:Z,"aria-readonly":O||void 0,"aria-required":k||void 0,"aria-labelledby":He,[me]:D?``:void 0,onFocus(){P(!0)},onBlur(){let e=Q.current;e&&(Se(!0),P(!1),Ce===`onBlur`&&X.commit(L?K:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=Q.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),u(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||pe(t)?.click()})},onClick(e){if(O||B)return;e.preventDefault();let t=Q.current;t&&t.dispatchEvent(new(u(t)).PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}))}},Ae,X.getValidationProps,_e,Fe,Re],stateAttributesMapping:Ke});return(0,w.jsxs)(S.Provider,{value:$,children:[qe,!Z&&!L&&V&&!D&&A!==void 0&&(0,w.jsx)(`input`,{type:`hidden`,form:_,name:V,value:A}),(0,w.jsx)(`input`,{...Ue,suppressHydrationWarning:!0})]})}),E=v.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=C(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:ee}=oe(c),d=v.useRef(null),f={...s,transitionStatus:u};g({open:c,ref:d,onComplete(){c||ee(!1)}});let p={...x(s),...te,..._},m=a||l,h=ie(`span`,e,{ref:[t,d],state:f,stateAttributesMapping:p,props:o});return m?h:null});export{T as n,E as t};
2
+ //# sourceMappingURL=CheckboxIndicator-ClY0P0ol.js.map
@@ -0,0 +1,2 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$y as n,Kd as r,LT as i,NE as a,Yo as o,b_ as s,eh as c,hd as l,l as u,lE as d,n_ as f,nh as p,r_ as m,sr as h,t as g,vd as _}from"./utils-BEVyjoxo.js";import{R as v,W as y}from"./runtime-D8mKjOP-.js";import{n as b,s as x,t as ee}from"./environments-DYIXXf7q.js";import{f as S}from"./server-CaLEm3Wt.js";import{i as te,n as C}from"./session-2CRBJwS7.js";import{n as w}from"./query-Bd5_Y_Vy.js";import{t as T}from"./use-atom-command-x4GQBtio.js";import{L as ne,f as re}from"./useSettings-Dx076NWT.js";import{n as E,t as D}from"./radio-group-CBunNtTU.js";import{t as ie}from"./input-RqvQJ9gh.js";import{a as ae,c as O,i as oe,r as se,s as ce,t as le}from"./dialog-DmneyTGi.js";import{x as k}from"./Icons-B5JVkp3z.js";import{t as ue}from"./preview-Cl-7ojv-.js";import{S as A,t as de}from"./ChatGptUsageButton-7u9uPgbK.js";import{a as j}from"./settingsLayout-DHc6oKfL.js";import{Aa as M,Fa as N,Ki as fe,Ma as pe,Pa as me,fr as P,ja as he,ka as F,qi as ge}from"./main-Bh6Hj0_-.js";var I=e(t(),1),L=a(),R=e(d(),1);function z(e){let t=(0,L.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,R.jsx)(k,{className:`size-4 shrink-0`,"aria-hidden":`true`}),t[3]=i):i=t[3];let a=n??`Continue with ChatGPT`,o;return t[4]!==r||t[5]!==a?(o=(0,R.jsxs)(h,{...r,children:[i,a]}),t[4]=r,t[5]=a,t[6]=o):o=t[6],o}function _e(e){let t=(0,L.c)(23),{open:n,methods:r,onClose:i,onSelect:a}=e,o=r.filter(ye),[s,c]=(0,I.useState)(null),l=s===`chatgpt-change-account`?s:o.find(e=>e.id===s)?.id??o[0]?.id??`chatgpt-change-account`,u=le,d;t[0]===i?d=t[1]:(d=e=>{e||i()},t[0]=i,t[1]=d);let f=ce,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,R.jsxs)(ae,{children:[(0,R.jsx)(O,{children:`Reconnect ChatGPT`}),(0,R.jsx)(se,{children:`On OpenAI, sign in with the account you choose here.`})]}),t[2]=p):p=t[2];let m=E,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>c(e),t[3]=h):h=t[3];let g=o.map(ve),_;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,R.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-sm`,children:[(0,R.jsx)(D,{value:`chatgpt-change-account`}),(0,R.jsx)(`span`,{className:`font-medium`,children:`Use a different account`})]}),t[4]=_):_=t[4];let v;t[5]!==m||t[6]!==l||t[7]!==h||t[8]!==g?(v=(0,R.jsx)(`div`,{className:`px-6 pb-6`,children:(0,R.jsxs)(m,{"aria-label":`ChatGPT account to connect`,value:l,onValueChange:h,children:[g,_]})}),t[5]=m,t[6]=l,t[7]=h,t[8]=g,t[9]=v):v=t[9];let y;t[10]!==a||t[11]!==l?(y=(0,R.jsx)(oe,{children:(0,R.jsx)(z,{onClick:()=>a(l)})}),t[10]=a,t[11]=l,t[12]=y):y=t[12];let b;t[13]!==f||t[14]!==p||t[15]!==v||t[16]!==y?(b=(0,R.jsxs)(f,{children:[p,v,y]}),t[13]=f,t[14]=p,t[15]=v,t[16]=y,t[17]=b):b=t[17];let x;return t[18]!==u||t[19]!==n||t[20]!==d||t[21]!==b?(x=(0,R.jsx)(u,{open:n,onOpenChange:d,children:b}),t[18]=u,t[19]=n,t[20]=d,t[21]=b,t[22]=x):x=t[22],x}function ve(e){return(0,R.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-sm`,children:[(0,R.jsx)(D,{value:e.id}),(0,R.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:e.name})]},e.id)}function ye(e){return e.id.startsWith(`chatgpt-profile:`)}function be(e){let t=(0,L.c)(36),{environmentId:n,onClose:r,renderSetup:i,onAccountCreated:a}=e,c=te(n,s),l=re(n),d;t[0]===n?d=t[1]:(d=S.providersValueAtom(n),t[0]=n,t[1]=d);let p=o(d),g=T(S.updateSettings,`Add ChatGPT account`),[_,v]=(0,I.useState)(`Personal`),y;t[2]===_?y=t[3]:(y=_.trim(),t[2]=_,t[3]=y);let b=`ChatGPT - ${y}`,[x,ee]=(0,I.useState)(null),[w,ne]=(0,I.useState)(!1),E=p?.find(e=>e.instanceId===x),D=A(E),ae=(0,I.useEffectEvent)(r);(0,I.useEffect)(()=>{D&&ae()},[D]);let O;t[4]!==b||t[5]!==n||t[6]!==_||t[7]!==a||t[8]!==r||t[9]!==w||t[10]!==l||t[11]!==g?(O=async()=>{if(w||!_.trim()||!C(n,`providers:manage`))return;ne(!0);let e=m.make(`codex_${u()}`);(await g({environmentId:n,input:{patch:{providerInstances:{...l.providerInstances,[e]:{driver:f.make(`codex`),displayName:b,enabled:!0,config:{enabled:!0,setupMode:`managed`}}}}}}))._tag===`Success`&&(a?(a(e,b),r()):ee(e)),ne(!1)},t[4]=b,t[5]=n,t[6]=_,t[7]=a,t[8]=r,t[9]=w,t[10]=l,t[11]=g,t[12]=O):O=t[12];let oe=O,se=le,ce=!D,k;t[13]===r?k=t[14]:(k=e=>{e||r()},t[13]=r,t[14]=k);let ue=pe,de=x?b:`Add ChatGPT account`,N;t[15]===de?N=t[16]:(N=(0,R.jsx)(M,{title:de,description:`Each account has its own Codex instance and sign-in. Choose the other account on the sign-in page.`}),t[15]=de,t[16]=N);let fe=he,me=x?E?.setup?i(x,E):(0,R.jsx)(j,{title:`Codex runtime`,description:`Preparing managed setup.`}):(0,R.jsx)(`form`,{id:`add-codex-account`,onSubmit:e=>{e.preventDefault(),oe()},children:(0,R.jsx)(j,{title:`Account name`,description:`Shown in the provider list and model picker.`,control:(0,R.jsx)(ie,{"aria-label":`Account name`,value:_,disabled:w,onChange:e=>v(e.target.value),placeholder:`e.g. Personal or Work`})})}),P;t[17]!==fe||t[18]!==me?(P=(0,R.jsx)(fe,{children:me}),t[17]=fe,t[18]=me,t[19]=P):P=t[19];let ge;t[20]!==c||t[21]!==x||t[22]!==_||t[23]!==r||t[24]!==w?(ge=(0,R.jsx)(F,{children:x?(0,R.jsx)(h,{variant:`outline`,onClick:r,children:`Finish later`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(h,{variant:`outline`,disabled:w,onClick:r,children:`Cancel`}),(0,R.jsx)(h,{type:`submit`,form:`add-codex-account`,disabled:w||!_.trim()||!c,children:w?`Adding account…`:`Continue`})]})}),t[20]=c,t[21]=x,t[22]=_,t[23]=r,t[24]=w,t[25]=ge):ge=t[25];let z;t[26]!==ue||t[27]!==P||t[28]!==ge||t[29]!==N?(z=(0,R.jsxs)(ue,{size:`wide`,children:[N,P,ge]}),t[26]=ue,t[27]=P,t[28]=ge,t[29]=N,t[30]=z):z=t[30];let _e;return t[31]!==se||t[32]!==z||t[33]!==ce||t[34]!==k?(_e=(0,R.jsx)(se,{open:ce,onOpenChange:k,children:z}),t[31]=se,t[32]=z,t[33]=ce,t[34]=k,t[35]=_e):_e=t[35],_e}var xe=n(c),Se=n(p),Ce=/^[A-Za-z0-9_./:\\-]+$/;function we(e,t,n){return Ce.test(e)&&(n===`windows`||!e.includes(`\\`))?e:n===`windows`?`& '${e.replaceAll(`'`,`''`)}'`:n===`darwin`||n===`linux`?e.startsWith(`~/`)||e.startsWith(`~\\`)?`~/'${e.slice(2).replaceAll(`'`,`'"'"'`)}'`:`'${e.replaceAll(`'`,`'"'"'`)}'`:t}function Te(e){return e===void 0?`checking`:!e.enabled||e.status===`disabled`?`disabled`:!e.installed&&e.status===`warning`&&e.auth.status===`unknown`?`checking`:e.installed?e.auth.status===`unauthenticated`?`signIn`:e.status===`ready`?`ready`:`attention`:`install`}var B={checking:0,disabled:1,install:2,attention:3,signIn:4,ready:5};function V(e){let t=new Map;for(let n of e??[]){let e=t.get(n.driver);(e===void 0||B[Te(n)]>B[Te(e)])&&t.set(n.driver,n)}return t}var Ee={claudeAgent:{windows:`irm https://claude.ai/install.ps1 | iex`,posix:`curl -fsSL https://claude.ai/install.sh | bash`},codex:{windows:`irm https://chatgpt.com/codex/install.ps1 | iex`,posix:`curl -fsSL https://chatgpt.com/codex/install.sh | sh`}};function De(e,t){let n=Ee[e];return t===`windows`?n.windows:n.posix}function Oe(e,t,n){let r=t.providerInstances[e.instanceId];if(e.driver===`claudeAgent`){let e=xe(r?.config??{});return`${we(i(e)?e.value.binaryPath:`claude`,`claude`,n)} auth login`}if(e.driver===`codex`){let e=Se(r?.config??{});return`${we(i(e)?e.value.binaryPath:`codex`,`codex`,n)} login`}return e.driver}var ke={disabled:{dot:`bg-muted-foreground/50`},error:{dot:`bg-destructive`},ready:{dot:`bg-success`},warning:{dot:`bg-warning`}};function H(e){if(!e)return{headline:`Checking provider status`,detail:`Waiting for the server to report installation and authentication details.`};if(!e.enabled||e.status===`disabled`)return{headline:`Disabled`,detail:e.message??`This provider is installed but disabled for new sessions in P4 Code.`};if(!e.installed)return{headline:`Not found`,detail:e.message??`CLI not detected on PATH.`};if(e.auth.status===`unauthenticated`){let t=e.auth.label??e.auth.type;return{headline:t?`Not authenticated · ${t}`:`Not authenticated`,detail:e.message??null}}if(e.status===`warning`)return{headline:`Needs attention`,detail:e.message??`The provider is installed, but the server could not fully verify it.`};if(e.status===`error`)return{headline:`Unavailable`,detail:e.message??`The provider failed its startup checks.`};if(e.auth.status===`authenticated`){let t=e.auth.label??e.auth.type;return{headline:t?`Authenticated · ${t}`:`Authenticated`,detail:e.message??null}}return{headline:`Available`,detail:e.message??null}}function U(e){if(!e)return null;let t=/^agy_acp_server_(\d{4})(\d{2})(\d{2})_\d+(?:_(\w+))?$/.exec(e);if(t){let[,e,n,r,i]=t;return`${e}-${n}-${r}${i?` ${i}`:``}`}return/^\d/.test(e)?`v${e}`:e}var Ae={graceful:`Limited support`,unsupported:`Unsupported version`,broken:`Known broken version`};function je(e,t,n=!0){let r=t?.latestVersionStatus===`broken`||t?.latestVersionStatus===`unsupported`;if(n&&t&&(t.status===`graceful`||t.status===`unsupported`||t.status===`broken`)){let n=t.recommendedVersion,i=U(n)??t.recommendedRange;return{title:Ae[t.status],detail:t.message??(i?`Use ${i} for full support.`:`Update for full support.`),updateCommand:n||r?null:e?.updateCommand??null,emphasis:t.status===`graceful`?`normal`:`strong`,targetVersion:n}}if(!e||e.status===`current`||e.status===`unknown`||r)return null;let i=`Update available`,a=e.latestVersion,o=U(a);return{title:i,detail:e.message??(o?`${i}: install ${o}.`:`${i}: install the latest provider version.`),updateCommand:e.updateCommand,emphasis:`normal`,targetVersion:null}}var Me=()=>void 0;function Ne(e){let t=(0,L.c)(11),[n,r]=(0,I.useState)(!1),i;t[0]===e.provider?i=t[1]:(i=Te(e.provider),t[0]=e.provider,t[1]=i);let a=i,o=e.enabled&&a===`ready`,s=e.provider?.auth.status===`authenticated`,c=a===`checking`,u;t[2]===e.provider?u=t[3]:(u=H(e.provider),t[2]=e.provider,t[3]=u);let d=u,f;return t[4]!==s||t[5]!==c||t[6]!==o||t[7]!==d||t[8]!==e||t[9]!==n?(f=e.mode===`existing`&&e.presentation===`onboarding`?(0,R.jsx)(Le,{title:e.displayName||e.provider?.displayName||`Codex`,description:o?e.provider?.auth.email?.trim()?(0,R.jsxs)(R.Fragment,{children:[`Signed in as`,` `,(0,R.jsx)(P,{value:e.provider.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`,className:`break-all`}),`.`]}):`Connected with your Codex CLI.`:c?`Checking your Codex CLI...`:e.provider?.installed?d.headline:`Code with your ChatGPT subscription.`,control:o?(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,R.jsx)(l,{className:`size-3.5`}),`Ready`]}):c?(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):s?(0,R.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d.headline}):(0,R.jsx)(z,{size:`sm`,disabled:e.readOnly,onClick:()=>{r(!0),e.onModeChange(`managed`)},children:`Continue with ChatGPT`}),secondaryControl:!s&&!o&&!c?(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,onClick:()=>e.onModeChange(`existing`),children:`Use existing CLI`}):null}):e.mode===`existing`?null:e.provider?.setup===void 0?e.presentation===`onboarding`?(0,R.jsx)(Le,{title:e.displayName||e.provider?.displayName||`Codex`,description:(0,R.jsx)(Ie,{}),control:(0,R.jsx)(h,{size:`sm`,variant:`outline`,className:`min-w-44`,disabled:!0,children:`Open sign-in page`}),secondaryControl:(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,disabled:!0,children:`Cancel`})}):(0,R.jsx)(j,{title:`ChatGPT account`,description:`Preparing sign-in.`}):(0,R.jsx)(Fe,{...e,autoStart:n||e.autoStart===!0,onAutoStartConsumed:()=>{r(!1),e.onAutoStartConsumed?.()}},`${e.environmentId}:${e.instanceId}`),t[4]=s,t[5]=c,t[6]=o,t[7]=d,t[8]=e,t[9]=n,t[10]=f):f=t[10],f}function Pe(e){let t=(0,L.c)(9),{environmentId:n,onClose:r,onAccountCreated:i}=e,a=te(n,s),o;t[0]!==a||t[1]!==n||t[2]!==r?(o=(e,t)=>(0,R.jsx)(Fe,{environmentId:n,instanceId:e,provider:t,mode:`managed`,enabled:!0,readOnly:!a,autoStart:!0,onAutoStartConsumed:Me,onModeChange:Me,onSignInCancelled:r,allowExistingCli:!1},e),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3];let c;return t[4]!==n||t[5]!==i||t[6]!==r||t[7]!==o?(c=(0,R.jsx)(be,{environmentId:n,onClose:r,onAccountCreated:i,renderSetup:o}),t[4]=n,t[5]=i,t[6]=r,t[7]=o,t[8]=c):c=t[8],c}function Fe({environmentId:e,instanceId:t,provider:n,enabled:i,readOnly:a,onModeChange:o,autoStart:s,onAutoStartConsumed:c,allowExistingCli:u=!0,presentation:d,displayName:f,onSignInCancelled:p}){let m={environmentId:e,input:{instanceId:t}},_=w(S.providerAuthState(m)),te=w(S.providerInstallState(m)),[C,re]=(0,I.useState)(null),E=w(C?S.chatGptHandoffState(C):null),D=E.data?.phase===`auth`?E.data.state:_.data,[ae,O]=(0,I.useState)(!1),[oe,se]=(0,I.useState)(`chatgpt`),ce=D?.methods?.find(e=>e.id===`chatgpt`)?.accountEmail,le=D?.methods?.find(e=>e.id===oe)?.accountEmail,k=D?.methods?.some(e=>e.id.startsWith(`chatgpt-profile:`)),A=D?.interaction?.type===`browser`?D.interaction.url:D?.authorizationUrl,M=te.data,pe=b(e),he=pe!==null&&ue(new URL(pe).hostname),F={reportFailure:!1,reportDefect:!1},L=T(S.startProviderAuth,F),ve=T(S.refreshProviders,F),ye=T(S.completeProviderAuth,F),be=T(S.cancelProviderAuth,F),xe=T(S.logoutProviderAuth,F),Se=T(S.startProviderInstall,F),Ce=T(S.cancelProviderInstall,F),we=T(S.chatGptReconnectProfile,F),Te=T(S.chatGptImportProfile,F),B=!C&&(!he||window.desktopBridge?.receiveProviderAuthCallback!==void 0),V=B&&!window.desktopBridge?.receiveProviderAuthCallback,Ee=x(),De=ee(Ee),Oe=b(Ee),ke=!he&&Ee&&De?.connection.phase===`connected`&&Oe&&ue(new URL(Oe).hostname)&&(window.desktopBridge!==void 0||ue(window.location.hostname))?Ee:null,H=new URL(window.location.href);H.pathname===`/welcome`&&(H.hash=`agents:${e}`),H.pathname===`/settings/providers`&&H.searchParams.set(`instanceId`,t);let U=V,Ae=(0,I.useId)(),[je,Me]=(0,I.useState)(!1),[Ne,Pe]=(0,I.useState)({flowId:``,value:``}),Fe=Ne.flowId===D?.flowId?Ne.value:``,[W,Re]=(0,I.useState)(!1),[ze,Be]=(0,I.useState)(null),Ve=(0,I.useRef)(!1),[He,Ue]=(0,I.useState)(null),G=(0,I.useRef)(null),K=(0,I.useRef)(!1),We=(0,I.useRef)(null),[Ge,Ke]=(0,I.useState)(!1),q=M?.installedVersion!=null,J=n?.auth.status===`authenticated`,qe=q&&M?.source!==`local`&&M?.version!=null&&M.version!==M.installedVersion,Je=ze!==null&&!J&&(D?.phase===`succeeded`||ze===`handoff`);(0,I.useEffect)(()=>{(J||D?.phase===`failed`||D?.phase===`cancelled`)&&Be(null)},[J,D?.phase]),(0,I.useEffect)(()=>{ze&&D?.phase===`succeeded`&&ve({environmentId:e,input:{instanceId:t}})},[ze,D?.phase,ve,e,t]);let Ye=s&&!Ge,Xe=ze===`sign-in`&&!J&&(D===null||D.phase===`idle`),Ze=Je||Xe||C!==null||D?.phase===`starting`||D?.phase===`waiting`||D?.phase===`verifying`,Y=M?.phase===`downloading`||M?.phase===`extracting`||M?.phase===`verifying`,X=Ye||Ze||W&&!Y,Z=a||!i||W||_.error!==null||te.error!==null,Q=W||Ze||Y,$=(0,I.useCallback)(async(e,t)=>{if(Ve.current)return!1;Ve.current=!0,Re(!0),Ue(null);let n=!1;try{let r=await e();if(r._tag===`Failure`){if(!v(r)){let e=y(r);Ue(e instanceof Error?e.message:`Codex setup failed. Try again.`)}}else n=!0,t?.(r.value)}catch{Ue(`Codex setup failed. Try again.`)}return Ve.current=!1,Re(!1),n},[]),Qe=(0,I.useId)(),$e=(0,I.useRef)(0),et=(0,I.useRef)(null),[tt,nt]=(0,I.useState)(!1),rt=(0,I.useCallback)(async n=>{let r=await $(()=>Te({environmentId:e,input:{instanceId:t,profile:n}}));r&&(Be(`handoff`),re(null)),nt(!r)},[$,Te,e,t]);(0,I.useEffect)(()=>{if(!C||E.data?.phase!==`finished`)return;let e=C.input.attemptId;et.current!==e&&(et.current=e,rt(E.data.profile))},[C,E.data,rt]),(0,I.useEffect)(()=>{C&&(E.error||E.data?.phase===`auth`&&[`failed`,`cancelled`].includes(E.data.state.phase))&&(Ue(E.data?.phase===`auth`?E.data.state.message??`ChatGPT sign-in could not finish. Try again.`:`ChatGPT sign-in on the primary environment was interrupted. Try again.`),re(null))},[C,E.data,E.error]);let it=(0,I.useCallback)(()=>(Be(null),C?(re(null),Promise.resolve()):$(()=>be({environmentId:e,input:{instanceId:t,flowId:D.flowId}}))),[C,$,be,e,t,D]),at=(0,I.useCallback)(async(n=`chatgpt`)=>{if(Ve.current)return;K.current=!0,nt(!1),se(n);let r=new URL(window.location.href);if(r.pathname===`/welcome`&&(r.hash=`agents:${e}`),r.pathname===`/settings/providers`&&r.searchParams.set(`instanceId`,t),ke){let i=`${Qe}:${++$e.current}`;await $(()=>we({environmentId:e,input:{instanceId:t,methodId:n}}),n=>re({environmentId:ke,input:{instanceId:t,environmentId:e,attemptId:i,returnUrl:r.toString(),profile:n}}))||(K.current=!1);return}await $(()=>L({environmentId:e,input:{instanceId:t,methodId:n,returnUrl:r.toString(),callbackMode:B?`client`:`server`}}),()=>Be(`sign-in`))||(K.current=!1)},[e,t,$,L,B,ke,we,Qe]),ot=(0,I.useCallback)(async(n=`chatgpt`)=>{Z||Q||(q&&!qe?await at(n):(G.current=n,await $(()=>Se({environmentId:e,input:{instanceId:t}}))||(G.current=null)))},[Z,Q,q,qe,at,$,Se,e,t]);(0,I.useEffect)(()=>{!s||Ge||Z||Q||M===null||!n?.setup?.canInstall||(Ke(!0),c(),ot())},[s,Ge,Z,Q,M,n?.setup?.canInstall,c,ot]),(0,I.useEffect)(()=>{if(!(!G.current||W||Y)){if(M?.phase===`failed`||M?.phase===`cancelled`)G.current=null;else if(q){let e=G.current;G.current=null,at(e)}}},[W,Y,M?.phase,q,at]);let st=(0,I.useRef)(null),ct=D?.flowId,lt=(0,I.useCallback)(async n=>{try{let r=window.desktopBridge?.receiveProviderAuthCallback;if(r&&B&&ct){if(st.current===n){await ne().shell.openExternal(n);return}st.current=n;let i=await r(n);if(st.current!==n)return;st.current=null,await $(()=>ye({environmentId:e,input:{instanceId:t,flowId:ct,callbackUrl:i}}))}else await ne().shell.openExternal(n)}catch{Ue(`Could not finish sign-in on this computer. Try again or paste the redirect URL below.`)}},[B,ct,$,ye,e,t]);(0,I.useEffect)(()=>{if(B&&A&&window.desktopBridge?.cancelProviderAuthCallback)return()=>{st.current===A&&(st.current=null),window.desktopBridge?.cancelProviderAuthCallback?.(A).catch(()=>void 0)}},[B,A]),(0,I.useEffect)(()=>{K.current&&D?.phase===`waiting`&&D.flowId&&A&&We.current!==D.flowId&&(We.current=D.flowId,K.current=!1,V||lt(A))},[D?.phase,D?.flowId,A,lt,V]);let ut=M?.phase===`downloading`?`Downloading ${(M.downloadedBytes/1e6).toFixed(1)}${M.totalBytes===null?``:` of ${(M.totalBytes/1e6).toFixed(1)}`} MB.`:M?.phase===`extracting`?`Installing Codex.`:M?.phase===`verifying`?`Checking Codex.`:q?`${M?.source===`local`?`Using your installed Codex`:`Managed by P4 Code`}${M?.installedVersion?` · v${M.installedVersion}`:``}.`:M?.message??`P4 Code downloads and manages Codex for you.`,dt=Je?`Finishing sign-in...`:Y?ut:X||D?.phase===`failed`||D?.phase===`cancelled`?D?.phase===`waiting`&&le?`Continue as ${le} on OpenAI.`:D?.message??`Finish signing in in your browser.`:J?n?.auth.email?.trim()?(0,R.jsxs)(R.Fragment,{children:[`Signed in as`,` `,(0,R.jsx)(P,{value:n.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`}),`.`]}):`Signed in with ChatGPT.`:ce??`Use your ChatGPT subscription.`,ft=U&&A&&D?.flowId&&ge(H.toString())?fe({authorizationUrl:A,returnUrl:H.toString(),environmentId:e,instanceId:t,flowId:D.flowId},!1):null,pt=(0,R.jsx)(h,{size:`sm`,variant:V?`default`:`outline`,className:d===`onboarding`?`min-w-44`:void 0,disabled:E.data?.phase===`finished`?W||!tt:!A||D?.phase!==`waiting`,onClick:()=>{E.data?.phase===`finished`?rt(E.data.profile):A&&lt(A)},children:Je?`Finishing sign-in...`:E.data?.phase===`finished`?tt?`Retry connection`:`Finishing sign-in...`:D?.phase===`waiting`?V?`Open ChatGPT sign-in`:`Open sign-in page`:d===`onboarding`?`Open sign-in page`:`Signing in...`}),mt=!C&&D?.phase===`waiting`&&A?(0,R.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-xs leading-relaxed text-muted-foreground`,children:[(0,R.jsx)(`p`,{children:`If sign-in doesn't return to P4 Code, paste the URL from the final localhost page.`}),(0,R.jsxs)(`form`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,onSubmit:n=>{if(n.preventDefault(),!D.flowId||!Fe.trim())return;let r=Fe.trim(),i=D.flowId;$(()=>ye({environmentId:e,input:{instanceId:t,flowId:i,callbackUrl:r}})).then(e=>{e&&Pe({flowId:i,value:``})})},children:[(0,R.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,R.jsx)(ie,{"aria-label":`ChatGPT sign-in redirect URL`,type:`password`,autoComplete:`off`,placeholder:`Paste the URL from the sign-in tab`,value:Fe,maxLength:16384,disabled:W||a,onChange:e=>Pe({flowId:D.flowId??``,value:e.target.value})})}),(0,R.jsx)(h,{variant:`outline`,type:`submit`,disabled:W||a||!Fe.trim(),children:`Connect`})]}),V?null:(0,R.jsx)(`div`,{children:(0,R.jsxs)(h,{size:`xs`,variant:`ghost-muted`,onClick:()=>void ne().shell.openExternal(A),children:[`Try sign-in in your browser`,(0,R.jsx)(r,{className:`size-3.5`})]})}),ft?(0,R.jsxs)(`details`,{children:[(0,R.jsx)(`summary`,{className:`cursor-pointer`,children:`Other ways to connect`}),(0,R.jsx)(h,{className:`mt-2`,size:`sm`,variant:`outline`,render:(0,R.jsx)(`a`,{href:ft}),children:`Use P4 Code desktop for automatic return`})]}):null]}):null,ht=e=>mt?(0,R.jsx)(me,{open:je,children:(0,R.jsx)(N,{children:(0,R.jsx)(`div`,{id:Ae,className:g(`w-full border-t border-border/50 pt-3`,e),children:mt})})}):null,gt=U?mt:mt?(0,R.jsxs)(`div`,{className:`text-xs leading-relaxed text-muted-foreground`,children:[(0,R.jsx)(Ie,{label:`Having trouble signing in?`,expanded:je,controls:Ae,onToggle:()=>Me(e=>!e)}),ht(`mt-3`)]}):null,_t=(0,R.jsx)(_e,{open:ae,methods:D?.methods??[],onClose:()=>O(!1),onSelect:e=>{O(!1),ot(D?.methods?.some(t=>t.id===e)?e:`chatgpt-change-account`)}}),vt=D?.phase===`idle`&&D.message?.startsWith(`Signed out locally.`)?D.message:null;if(d===`onboarding`){let r=vt??He??(_.error||te.error?`Could not read setup status. Reconnect and try again.`:M?.phase===`failed`?M.message:null);return(0,R.jsxs)(R.Fragment,{children:[_t,(0,R.jsxs)(Le,{title:f||n?.displayName||`Codex`,description:Y?ut:J?n?.auth.email?.trim()?(0,R.jsxs)(R.Fragment,{children:[`Signed in as`,` `,(0,R.jsx)(P,{value:n.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`,className:`break-all`}),`.`]}):`Connected to ChatGPT.`:mt&&!U?(0,R.jsx)(Ie,{expanded:je,controls:Ae,onToggle:()=>Me(e=>!e)}):Ye||Xe||D?.phase===`starting`||D?.phase===`waiting`||W&&!Y?(0,R.jsx)(Ie,{}):X||D?.phase===`failed`||D?.phase===`cancelled`?dt:`Code with your ChatGPT subscription.`,control:J&&!Q?(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,R.jsx)(l,{className:`size-3.5`}),`Ready`]}):X?pt:(0,R.jsx)(z,{size:`sm`,disabled:Z||Q||(q?!n?.setup?.canAuthenticate:!n?.setup?.canInstall),onClick:()=>{k?O(!0):ot()},children:Y||W?`Setting up...`:k?`Reconnect account`:`Continue with ChatGPT`}),secondaryControl:X&&!Je||Y?(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,disabled:W||a,onClick:()=>{K.current=!1,G.current=null,C||X&&D?.flowId?it():M?.operationId&&$(()=>Ce({environmentId:e,input:{instanceId:t,operationId:M.operationId}}))},children:`Cancel`}):!X&&!J&&k?(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,disabled:Z||Q,onClick:()=>void ot(`chatgpt-change-account`),children:`Use a different account`}):!X&&!J&&u?(0,R.jsx)(h,{size:`sm`,variant:`ghost-muted`,disabled:a||Q,onClick:()=>o(`existing`),children:`Use existing CLI`}):null,children:[U?gt:ht(),r?(0,R.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:r}):null]})]})}return(0,R.jsxs)(`section`,{"aria-label":`Codex setup`,className:`divide-y divide-border/50`,children:[_t,(0,R.jsx)(j,{title:`ChatGPT account`,description:dt,control:(0,R.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:X?(0,R.jsxs)(R.Fragment,{children:[pt,!Je&&(0,R.jsx)(h,{size:`sm`,variant:`ghost`,disabled:W||a,onClick:()=>{(C||D?.flowId)&&(K.current=!1,it(),p?.())},children:`Cancel`})]}):Y?(0,R.jsx)(h,{size:`sm`,variant:`ghost`,disabled:W||a,onClick:()=>{M?.operationId&&(G.current=null,$(()=>Ce({environmentId:e,input:{instanceId:t,operationId:M.operationId}})))},children:`Cancel`}):J?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(h,{size:`sm`,variant:`outline`,disabled:Z||Q,onClick:()=>O(!0),children:`Change account`}),(0,R.jsx)(h,{size:`sm`,variant:`ghost`,disabled:Z||Q,onClick:()=>void $(()=>xe(m)),children:`Disconnect`})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(z,{size:`sm`,disabled:Z||Q||(q?!n?.setup?.canAuthenticate:!n?.setup?.canInstall),onClick:()=>{k?O(!0):ot()},children:W?`Setting up...`:k?`Reconnect account`:`Continue with ChatGPT`}),k?(0,R.jsx)(h,{size:`sm`,variant:`ghost`,disabled:Z||Q,onClick:()=>void ot(`chatgpt-change-account`),children:`Use a different account`}):null]})})}),J?(0,R.jsx)(`div`,{className:`flex justify-end px-3 py-1 sm:px-4`,children:(0,R.jsx)(de,{})}):null,vt?(0,R.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-muted-foreground sm:px-4`,children:vt}):null,gt?(0,R.jsx)(`div`,{className:`px-3 py-3 sm:px-4`,children:gt}):null,He||_.error||te.error||M?.phase===`failed`?(0,R.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-destructive sm:px-4`,children:He??(M?.phase===`failed`?M.message:`Could not read Codex setup status. Reconnect and try again.`)}):null]})}function W(e){let t=(0,L.c)(20),{environmentId:n,instanceId:r,provider:i}=e,a;t[0]!==n||t[1]!==r?(a=S.providerInstallState({environmentId:n,input:{instanceId:r}}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=w(a),s=o.data?.executablePath??``,c=o.error?`Could not read runtime path`:`Not installed`,l;t[3]!==s||t[4]!==c?(l=(0,R.jsx)(j,{title:`Binary path`,description:`Selected by P4 Code.`,control:(0,R.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,R.jsx)(ie,{"aria-label":`Codex binary path`,value:s,title:s,placeholder:c,disabled:!0})})}),t[3]=s,t[4]=c,t[5]=l):l=t[5];let u=i?.runtimePaths?.homePath??``,d=i?.runtimePaths?.homePath,f;t[6]!==u||t[7]!==d?(f=(0,R.jsx)(j,{title:`CODEX_HOME path`,description:`Shared Codex config, sessions, and state.`,control:(0,R.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,R.jsx)(ie,{"aria-label":`Codex home path`,value:u,title:d,placeholder:`Unavailable`,disabled:!0})})}),t[6]=u,t[7]=d,t[8]=f):f=t[8];let p=i?.runtimePaths?.shadowHomePath?`Account-specific home sharing the Codex state above.`:`This instance uses the shared Codex home directly.`,m=i?.runtimePaths?.shadowHomePath??``,h=i?.runtimePaths?.shadowHomePath??void 0,g=i?.runtimePaths?`Not used`:`Unavailable`,_;t[9]!==g||t[10]!==m||t[11]!==h?(_=(0,R.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,R.jsx)(ie,{"aria-label":`Codex shadow home path`,value:m,title:h,placeholder:g,disabled:!0})}),t[9]=g,t[10]=m,t[11]=h,t[12]=_):_=t[12];let v;t[13]!==_||t[14]!==p?(v=(0,R.jsx)(j,{title:`Shadow home path`,description:p,control:_}),t[13]=_,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==l||t[18]!==f?(y=(0,R.jsxs)(R.Fragment,{children:[l,f,v]}),t[16]=v,t[17]=l,t[18]=f,t[19]=y):y=t[19],y}function Ie(e){let t=(0,L.c)(10),{label:n,expanded:r,controls:i,onToggle:a}=e,o=n===void 0?`Complete sign-in in your browser.`:n,s=r!==void 0&&r;if(!a){let e;return t[0]===o?e=t[1]:(e=(0,R.jsx)(`div`,{className:`leading-relaxed`,children:o}),t[0]=o,t[1]=e),e}let c=`size-3 shrink-0 ${s?`rotate-90`:``}`,l;t[2]===c?l=t[3]:(l=(0,R.jsx)(_,{"aria-hidden":!0,className:c}),t[2]=c,t[3]=l);let u;return t[4]!==i||t[5]!==s||t[6]!==o||t[7]!==a||t[8]!==l?(u=(0,R.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 rounded-sm text-left leading-relaxed outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,"aria-label":`Having trouble signing in?`,"aria-expanded":s,"aria-controls":i,onClick:a,children:[o,l]}),t[4]=i,t[5]=s,t[6]=o,t[7]=a,t[8]=l,t[9]=u):u=t[9],u}function Le(e){let t=(0,L.c)(21),{title:n,description:r,control:i,secondaryControl:a,children:o}=e,s;t[0]===o?s=t[1]:(s=I.Children.toArray(o),t[0]=o,t[1]=s);let c=s,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,R.jsx)(k,{className:`size-5 shrink-0 fill-foreground`}),t[2]=l):l=t[2];let u;t[3]===n?u=t[4]:(u=(0,R.jsx)(`h3`,{className:`text-sm font-medium`,children:n}),t[3]=n,t[4]=u);let d;t[5]===r?d=t[6]:(d=(0,R.jsx)(`div`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground`,children:r}),t[5]=r,t[6]=d);let f;t[7]!==u||t[8]!==d?(f=(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9];let p;t[10]!==i||t[11]!==a?(p=i||a?(0,R.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-2 has-[button]:w-full has-[button]:flex-col-reverse has-[button]:items-end sm:has-[button]:w-auto sm:has-[button]:flex-row sm:has-[button]:items-center`,children:[a,i]}):null,t[10]=i,t[11]=a,t[12]=p):p=t[12];let m;t[13]!==f||t[14]!==p?(m=(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[l,f,p]}),t[13]=f,t[14]=p,t[15]=m):m=t[15];let h;t[16]===c?h=t[17]:(h=c.length>0?(0,R.jsx)(`div`,{className:`ml-8 mt-2 flex flex-wrap items-center gap-2`,children:c}):null,t[16]=c,t[17]=h);let g;return t[18]!==m||t[19]!==h?(g=(0,R.jsxs)(`div`,{className:`rounded-lg border border-border bg-background px-4 py-4`,children:[m,h]}),t[18]=m,t[19]=h,t[20]=g):g=t[20],g}function Re(e){return typeof e==`object`&&e&&`setupMode`in e&&e.setupMode===`managed`?`managed`:`existing`}export{ke as a,U as c,Oe as d,V as f,Ne as i,Te as l,Pe as n,H as o,z as p,W as r,je as s,Re as t,De as u};
2
+ //# sourceMappingURL=CodexSetupSection.logic-CEAT7YdZ.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Ca as n,Eo as r,Fa as i,Ia as a,Na as o,Ra as s,Ta as c,Va as l,_a as u,_o as d,ba as f,bo as p,cE as m,ga as h,go as g,ia as _,io as v,lo as y,na as b,vo as x,wo as S,ya as C}from"./utils-CRwA5SKO.js";var w=e(t());function T(e){let{open:t,defaultOpen:r,onOpenChange:i,disabled:o}=e,[s,u]=l({controlled:t,default:r,name:`Collapsible`,state:`open`}),{mounted:d,setMounted:f,transitionStatus:p}=C(s,!0,!0),m=c(),[h,g]=w.useState(),_=h??m,v=a(e=>{let t=!s,r=n(y,e.nativeEvent);i(t,r),!r.isCanceled&&u(t)});return w.useMemo(()=>({disabled:o,handleTrigger:v,mounted:d,open:s,panelId:_,setMounted:f,setOpen:u,setPanelIdState:g,transitionStatus:p}),[o,v,d,s,_,f,u,g,p])}var E=w.createContext(void 0);function D(){let e=w.useContext(E);if(e===void 0)throw Error(r(15));return e}var O=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=g.startingStyle]=`startingStyle`,e[e.endingStyle=g.endingStyle]=`endingStyle`,e}({}),k=function(e){return e.panelOpen=`data-panel-open`,e}({}),A={[O.open]:``},j={[O.closed]:``},M={open(e){return e?{[k.panelOpen]:``}:null}},N={open(e){return e?A:j},...d},P=e(m()),F=w.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:o=!1,onOpenChange:s,open:c,style:l,...u}=e,d=a(s),f=T({open:c,defaultOpen:i,onOpenChange:d,disabled:o}),p=w.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),m=w.useMemo(()=>({...f,onOpenChange:d,state:p}),[f,d,p]),h=x(`div`,e,{state:p,ref:t,props:u,stateAttributesMapping:N});return(0,P.jsx)(E.Provider,{value:m,children:h})}),I={...M,...d},L=w.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:s}=D(),{className:c,disabled:l=s,id:u,render:d,nativeButton:f=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=o({disabled:l,focusableWhenDisabled:!0,native:f});return x(`button`,e,{state:a,ref:[t,g],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},m,h],stateAttributesMapping:I})}),R={height:void 0,width:void 0};function z(e){let{externalRef:t,hiddenUntilFound:r,id:o,keepMounted:s,mounted:c,onOpenChange:l,open:d,setMounted:p,setOpen:m,transitionStatus:g}=e,y=w.useRef(null),x=w.useRef(null),[C,T]=w.useState(R),E=w.useRef(R),D=w.useRef(!1),k=w.useRef(d),A=w.useRef(!1),[j,M]=w.useState(!1),N=w.useRef(null),P=S(t,y),F=b({mounted:c,open:d}),I=u(y,!1,!1),L=!d&&!c,z=j?`idle`:g,H=d&&(k.current||A.current),G=!d&&c&&x.current===`css-animation`&&C.height===void 0&&C.width===void 0?E.current:C,K=r&&L&&x.current!==`css-animation`,q=a((e,t=!0)=>{t&&(E.current=e),T(e)}),J=a(()=>{N.current?.(),N.current=null}),Y=a(e=>{J(),N.current=()=>{N.current=null,e()}}),X=a(()=>{d&&c&&x.current===`css-animation`&&(A.current=!0)});i(()=>{j&&g!==`starting`&&M(!1)},[j,g]),w.useEffect(()=>()=>{X(),J()},[X,J]),i(()=>{let e=y.current;if(!e)return;!d&&N.current&&J();let t=V(e,H);if(x.current=t,d&&g===`idle`&&k.current&&t===`css-animation`){E.current=B(e);return}if(d&&g===`starting`){let n=D.current;if(D.current=!1,t===`none`){q(B(e)),M(!0);return}if(t===`css-transition`){let t=W(e);if(q(B(e)),!n)return t;let r=U(e,`transition-duration`,`0s`);return Y(r),M(!0),t}if(t===`css-animation`){if(q(B(e)),!n){U(e,`animation-name`,`none`)();return}let t=U(e,`animation-name`,`none`),r=U(e,`animation-duration`,`0s`);t(),Y(r),M(!0);return}}if(!d&&c&&(g===`idle`||g===`starting`)){if(t===`none`){q(R,!1),p(!1);return}t===`css-animation`&&(k.current=!1,A.current=!1),q(B(e));return}if(g!==`ending`)return;if(t===`none`){p(!1);return}let n=B(e);if(!((n.height??0)>0||(n.width??0)>0)){p(!1);return}q(n),t===`css-animation`&&U(e,`animation-name`,`none`)()},[c,d,J,q,p,Y,H,g]),h({enabled:d&&c&&z===`idle`,open:!0,ref:y,onComplete(){d&&q(R,!1)}}),w.useEffect(()=>{if(d||!c||z!==`ending`||!y.current)return;let e=new AbortController,t=-1;function n(){F.current.open||(p(!1),q(R,!1))}return t=f.request(()=>{e.signal.aborted||I(n,e.signal)}),()=>{f.cancel(t),e.abort()}},[F,c,d,z,I,q,p]),i(()=>{let e=y.current;e&&r&&L&&e.setAttribute(`hidden`,`until-found`)},[L,r]),w.useEffect(function(){let e=y.current;if(!e)return;function t(e){D.current=!0,m(!0),l(!0,n(v,e))}return _(e,`beforematch`,t)},[l,m]);let Z=s||r||c||d;return{height:G.height,props:{...K?{[O.startingStyle]:``}:void 0,hidden:L,id:o},ref:P,shouldPreventOpenAnimation:H,shouldRender:Z,transitionStatus:z,width:G.width}}function B(e){return{height:e.scrollHeight,width:e.scrollWidth}}function V(e,t=!1){let n=s(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&H(n.animationDuration),i=H(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function H(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function U(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function W(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=f.request(n);return()=>{f.cancel(r),n()}}var G=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),K=w.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:a,render:o,id:s,style:c,...l}=e,{mounted:u,onOpenChange:d,open:f,panelId:m,setMounted:h,setPanelIdState:g,setOpen:_,state:v,transitionStatus:y}=D(),b=r??!1,S=a??!1;i(()=>{if(s)return g(s),()=>{g(void 0)}},[s,g]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:O,transitionStatus:k,width:A}=z({externalRef:t,hiddenUntilFound:b,id:m,keepMounted:S,mounted:u,onOpenChange:d,open:f,setMounted:h,setOpen:_,transitionStatus:y}),j={...v,transitionStatus:k},M=p(c,j),P=x(`div`,{...e,style:void 0},{state:j,ref:T,props:[w,{style:{[G.collapsiblePanelHeight]:C===void 0?`auto`:`${C}px`,[G.collapsiblePanelWidth]:A===void 0?`auto`:`${A}px`}},l,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:N});return O?P:null});export{L as n,F as r,K as t};
2
- //# sourceMappingURL=CollapsiblePanel-kfl4yLKn.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Ca as n,Eo as r,Fa as i,Ia as a,Na as o,Ra as s,Ta as c,Va as l,_a as u,_o as d,ba as f,bo as p,ga as m,go as h,ia as g,io as _,lE as v,lo as y,na as b,vo as x,wo as S,ya as C}from"./utils-BEVyjoxo.js";var w=e(t());function T(e){let{open:t,defaultOpen:r,onOpenChange:i,disabled:o}=e,[s,u]=l({controlled:t,default:r,name:`Collapsible`,state:`open`}),{mounted:d,setMounted:f,transitionStatus:p}=C(s,!0,!0),m=c(),[h,g]=w.useState(),_=h??m,v=a(e=>{let t=!s,r=n(y,e.nativeEvent);i(t,r),!r.isCanceled&&u(t)});return w.useMemo(()=>({disabled:o,handleTrigger:v,mounted:d,open:s,panelId:_,setMounted:f,setOpen:u,setPanelIdState:g,transitionStatus:p}),[o,v,d,s,_,f,u,g,p])}var E=w.createContext(void 0);function D(){let e=w.useContext(E);if(e===void 0)throw Error(r(15));return e}var O=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=h.startingStyle]=`startingStyle`,e[e.endingStyle=h.endingStyle]=`endingStyle`,e}({}),k=function(e){return e.panelOpen=`data-panel-open`,e}({}),A={[O.open]:``},j={[O.closed]:``},M={open(e){return e?{[k.panelOpen]:``}:null}},N={open(e){return e?A:j},...d},P=e(v()),F=w.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:o=!1,onOpenChange:s,open:c,style:l,...u}=e,d=a(s),f=T({open:c,defaultOpen:i,onOpenChange:d,disabled:o}),p=w.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),m=w.useMemo(()=>({...f,onOpenChange:d,state:p}),[f,d,p]),h=x(`div`,e,{state:p,ref:t,props:u,stateAttributesMapping:N});return(0,P.jsx)(E.Provider,{value:m,children:h})}),I={...M,...d},L=w.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:s}=D(),{className:c,disabled:l=s,id:u,render:d,nativeButton:f=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=o({disabled:l,focusableWhenDisabled:!0,native:f});return x(`button`,e,{state:a,ref:[t,g],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},m,h],stateAttributesMapping:I})}),R={height:void 0,width:void 0};function z(e){let{externalRef:t,hiddenUntilFound:r,id:o,keepMounted:s,mounted:c,onOpenChange:l,open:d,setMounted:p,setOpen:h,transitionStatus:v}=e,y=w.useRef(null),x=w.useRef(null),[C,T]=w.useState(R),E=w.useRef(R),D=w.useRef(!1),k=w.useRef(d),A=w.useRef(!1),[j,M]=w.useState(!1),N=w.useRef(null),P=S(t,y),F=b({mounted:c,open:d}),I=u(y,!1,!1),L=!d&&!c,z=j?`idle`:v,H=d&&(k.current||A.current),G=!d&&c&&x.current===`css-animation`&&C.height===void 0&&C.width===void 0?E.current:C,K=r&&L&&x.current!==`css-animation`,q=a((e,t=!0)=>{t&&(E.current=e),T(e)}),J=a(()=>{N.current?.(),N.current=null}),Y=a(e=>{J(),N.current=()=>{N.current=null,e()}}),X=a(()=>{d&&c&&x.current===`css-animation`&&(A.current=!0)});i(()=>{j&&v!==`starting`&&M(!1)},[j,v]),w.useEffect(()=>()=>{X(),J()},[X,J]),i(()=>{let e=y.current;if(!e)return;!d&&N.current&&J();let t=V(e,H);if(x.current=t,d&&v===`idle`&&k.current&&t===`css-animation`){E.current=B(e);return}if(d&&v===`starting`){let n=D.current;if(D.current=!1,t===`none`){q(B(e)),M(!0);return}if(t===`css-transition`){let t=W(e);if(q(B(e)),!n)return t;let r=U(e,`transition-duration`,`0s`);return Y(r),M(!0),t}if(t===`css-animation`){if(q(B(e)),!n){U(e,`animation-name`,`none`)();return}let t=U(e,`animation-name`,`none`),r=U(e,`animation-duration`,`0s`);t(),Y(r),M(!0);return}}if(!d&&c&&(v===`idle`||v===`starting`)){if(t===`none`){q(R,!1),p(!1);return}t===`css-animation`&&(k.current=!1,A.current=!1),q(B(e));return}if(v!==`ending`)return;if(t===`none`){p(!1);return}let n=B(e);if(!((n.height??0)>0||(n.width??0)>0)){p(!1);return}q(n),t===`css-animation`&&U(e,`animation-name`,`none`)()},[c,d,J,q,p,Y,H,v]),m({enabled:d&&c&&z===`idle`,open:!0,ref:y,onComplete(){d&&q(R,!1)}}),w.useEffect(()=>{if(d||!c||z!==`ending`||!y.current)return;let e=new AbortController,t=-1;function n(){F.current.open||(p(!1),q(R,!1))}return t=f.request(()=>{e.signal.aborted||I(n,e.signal)}),()=>{f.cancel(t),e.abort()}},[F,c,d,z,I,q,p]),i(()=>{let e=y.current;e&&r&&L&&e.setAttribute(`hidden`,`until-found`)},[L,r]),w.useEffect(function(){let e=y.current;if(!e)return;function t(e){D.current=!0,h(!0),l(!0,n(_,e))}return g(e,`beforematch`,t)},[l,h]);let Z=s||r||c||d;return{height:G.height,props:{...K?{[O.startingStyle]:``}:void 0,hidden:L,id:o},ref:P,shouldPreventOpenAnimation:H,shouldRender:Z,transitionStatus:z,width:G.width}}function B(e){return{height:e.scrollHeight,width:e.scrollWidth}}function V(e,t=!1){let n=s(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&H(n.animationDuration),i=H(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function H(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function U(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function W(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=f.request(n);return()=>{f.cancel(r),n()}}var G=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),K=w.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:a,render:o,id:s,style:c,...l}=e,{mounted:u,onOpenChange:d,open:f,panelId:m,setMounted:h,setPanelIdState:g,setOpen:_,state:v,transitionStatus:y}=D(),b=r??!1,S=a??!1;i(()=>{if(s)return g(s),()=>{g(void 0)}},[s,g]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:O,transitionStatus:k,width:A}=z({externalRef:t,hiddenUntilFound:b,id:m,keepMounted:S,mounted:u,onOpenChange:d,open:f,setMounted:h,setOpen:_,transitionStatus:y}),j={...v,transitionStatus:k},M=p(c,j),P=x(`div`,{...e,style:void 0},{state:j,ref:T,props:[w,{style:{[G.collapsiblePanelHeight]:C===void 0?`auto`:`${C}px`,[G.collapsiblePanelWidth]:A===void 0?`auto`:`${A}px`}},l,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:N});return O?P:null});export{L as n,F as r,K as t};
2
+ //# sourceMappingURL=CollapsiblePanel-Cubscn-a.js.map
@@ -0,0 +1,2 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$i as n,$r as r,Aa as i,An as a,Ar as o,Ca as s,Co as c,Cr as ee,Da as te,Di as l,Dr as u,En as d,Eo as f,Er as p,Fa as m,Fn as ne,Ha as h,Ia as g,In as _,Ka as v,Ln as y,Mn as b,Na as x,Nn as S,Oa as C,Oi as re,On as ie,Or as w,Pi as T,Pn as ae,Pr as E,Qa as D,Ri as O,Rn as k,Sn as A,So as j,Ta as oe,Ti as M,Tn as N,To as se,Tr as ce,Ua as le,Va as P,Za as ue,_o as de,ai as fe,bi as F,br as pe,ca as I,ea as me,ei as he,eo as ge,fa as L,ga as _e,ho as R,hr as ve,io as z,ja as ye,jn as be,jr as xe,ka as Se,ki as Ce,kn as we,lE as B,la as Te,ma as Ee,mo as De,na as Oe,po as ke,ro as Ae,ta as je,to as Me,ui as Ne,va as Pe,vo as V,vr as Fe,wa as Ie,wo as Le,xn as Re,xo as ze,xr as Be,ya as Ve,yi as He,yn as Ue,yo as We,zn as Ge}from"./utils-BEVyjoxo.js";import{t as Ke}from"./useRegisterFieldControl-75QESVfk.js";import{t as qe}from"./FormContext-Bgwez2tv.js";var H=e(t()),Je=H.createContext(void 0),Ye=H.createContext(void 0),Xe=H.createContext(void 0),Ze=H.createContext(``);function Qe(){let e=H.useContext(Je);if(!e)throw Error(f(22));return e}function $e(){let e=H.useContext(Ye);if(!e)throw Error(f(23));return e}function et(){let e=H.useContext(Xe);if(!e)throw Error(f(24));return e}function tt(){return H.useContext(Ze)}var U={id:M(e=>e.id),labelId:M(e=>e.labelId),items:M(e=>e.items),selectedValue:M(e=>e.selectedValue),hasSelectionChips:M(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:M(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:M((e,t)=>t?Re(e.items):!1),open:M(e=>e.open),mounted:M(e=>e.mounted),forceMounted:M(e=>e.forceMounted),inline:M(e=>e.inline),activeIndex:M(e=>e.activeIndex),selectedIndex:M(e=>e.selectedIndex),isActive:M((e,t)=>e.activeIndex===t),isSelected:M((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>ie(t,e,n)):ie(t,r,n)}),transitionStatus:M(e=>e.transitionStatus),popupProps:M(e=>e.popupProps),inputProps:M(e=>e.inputProps),triggerProps:M(e=>e.triggerProps),itemProps:M(e=>e.itemProps),positionerElement:M(e=>e.positionerElement),listElement:M(e=>e.listElement),triggerElement:M(e=>e.triggerElement),inputElement:M(e=>e.inputElement),inputGroupElement:M(e=>e.inputGroupElement),popupSide:M(e=>e.popupSide),openMethod:M(e=>e.openMethod),inputInsidePopup:M(e=>e.inputInsidePopup),inputOwnsFormValue:M(e=>e.inputOwnsFormValue),selectionMode:M(e=>e.selectionMode),name:M(e=>e.name),form:M(e=>e.form),disabled:M(e=>e.disabled),readOnly:M(e=>e.readOnly),required:M(e=>e.required),grid:M(e=>e.grid),virtualized:M(e=>e.virtualized),itemToStringLabel:M(e=>e.itemToStringLabel),isItemEqualToValue:M(e=>e.isItemEqualToValue),modal:M(e=>e.modal),autoHighlight:M(e=>e.autoHighlight),submitOnItemClick:M(e=>e.submitOnItemClick)};function nt(e,t){return(n,r)=>{if(n==null)return!1;let i=N(n,t);return e.contains(i,r)}}function rt(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=N(r,t),o=n==null?``:N(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var W=new Map;function it(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${at(e.locale)}|${JSON.stringify(t)}`,r=W.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=N(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=N(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=N(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return W.set(n,a),a}function at(e){return Array.isArray(e)?e.map(e=>at(e)).join(`,`):e==null?``:String(e)}var ot=it;function st(e={}){let{multiple:t=!1,value:n,...r}=e,i=it(r),a=H.useCallback((e,r,a)=>t?nt(i,a)(e,r):rt(i,a,n)(e,r),[i,n,t]);return H.useMemo(()=>({contains:a,startsWith:i.startsWith,endsWith:i.endsWith}),[a,i])}var ct=Symbol(`none`),lt={value:ct,index:-1},G=e(B());function ut(e){let{id:t,onOpenChangeComplete:r,defaultSelectedValue:i=null,selectedValue:ee,onSelectedValueChange:te,defaultInputValue:u,inputValue:f,open:p,defaultOpen:ne=!1,selectionMode:h=`none`,onItemHighlighted:_,name:v,form:x,disabled:C=!1,readOnly:w=!1,required:T=!1,inputRef:ae,grid:E=!1,items:O,filteredItems:k,filter:oe,openOnInputClick:M=!0,autoHighlight:ce=!1,keepHighlight:le=!1,highlightItemOnHover:ue=!0,loopFocus:de=!0,itemToStringLabel:L,itemToStringValue:R,isItemEqualToValue:ve=we,virtualized:ye=!1,inline:xe=!1,fillInputOnItemPress:Se=!0,modal:Ce=!1,limit:B=-1,autoComplete:Ee=`list`,formAutoComplete:De,locale:ke,submitOnItemClick:Ae=!1}=e,{clearErrors:je}=qe(),{setDirty:Pe,validityData:V,shouldValidateOnChange:Re,setFilled:Ue,name:Ge,disabled:Qe,setTouched:$e,setFocused:et,validationMode:tt,validation:W}=y(),it=o(),at=S({id:t}),st=ot({locale:ke}),[ut,dt]=H.useState(!1),[ft,pt]=H.useState(null),mt=H.useRef([]),ht=H.useRef([]),gt=H.useRef(null),_t=H.useRef(null),vt=H.useRef(null),yt=H.useRef(null),bt=H.useRef(null),xt=H.useRef(!0),St=H.useRef(!1),Ct=H.useRef(null),wt=H.useRef(null),Tt=H.useRef(null),Et=H.useRef(lt),Dt=H.useRef(null),Ot=H.useRef([]),kt=H.useRef([]),At=Qe||C,jt=Ge??v,K=h===`multiple`,Mt=h===`single`,Nt=f!==void 0||u!==void 0,Pt=O!==void 0,Ft=k!==void 0,q;q=ce===`always`?`always`:ce?`input-change`:!1;let[J,It]=P({controlled:ee,default:K?i??ze:i,name:`Combobox`,state:`selectedValue`}),Lt=H.useMemo(()=>oe===null?()=>!0:oe===void 0?Mt&&!ut?rt(st,L,J):nt(st,L):oe,[oe,Mt,J,ut,st,L]),Rt=se(()=>Nt?u??``:Mt?N(J,L):``).current,[Y,zt]=P({controlled:f,default:Rt,name:`Combobox`,state:`inputValue`}),[X,Bt]=P({controlled:p,default:ne,name:`Combobox`,state:`open`}),Vt=A(O),Z=ft??(Y===``?``:String(Y).trim()),Ht=Mt?N(J,L):``,Ut=Mt&&!ut&&Z!==``&&Ht!==``&&Ht.length===Z.length&&st.contains(Ht,Z),Wt=Ut?``:Z,Gt=Pt&&Ft&&Ut,Kt=H.useMemo(()=>O?Vt?O.flatMap(e=>e.items):O:ze,[O,Vt]),qt=H.useMemo(()=>{if(k&&!Gt)return k;if(!O)return ze;if(Vt){let e=O,t=[],n=0;for(let r of e){if(B>-1&&n>=B)break;let e=Wt===``?r.items:r.items.filter(e=>Lt(e,Wt,L));if(e.length===0)continue;let i=B>-1?B-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(Wt===``)return B>-1?Kt.slice(0,B):Kt;let e=[];for(let t of Kt){if(B>-1&&e.length>=B)break;Lt(t,Wt,L)&&e.push(t)}return e},[k,Gt,O,Vt,Wt,B,Lt,L,Kt]),Jt=H.useMemo(()=>Vt?qt.flatMap(e=>e.items):qt,[qt,Vt]),Q=se(()=>new He({id:at,labelId:void 0,selectedValue:J,open:X,filter:Lt,query:Z,items:O,selectionMode:h,listRef:mt,labelsRef:ht,popupRef:gt,emptyRef:bt,inputRef:_t,startDismissRef:vt,endDismissRef:yt,keyboardActiveRef:xt,chipsContainerRef:Ct,clearRef:wt,valuesRef:Ot,allValuesRef:kt,selectionEventRef:Tt,name:jt,form:x,disabled:At,readOnly:w,required:T,grid:E,isGrouped:Vt,virtualized:ye,openOnInputClick:M,itemToStringLabel:L,isItemEqualToValue:ve,modal:Ce,autoHighlight:q,submitOnItemClick:Ae,hasInputValue:Nt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:xe,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},itemProps:j,positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:h===`none`,onOpenChangeComplete:r||c,setOpen:c,setInputValue:c,setSelectedValue:c,setIndices:c,onItemHighlighted:c,handleSelection:c,forceMount:c,requestSubmit:c})).current,Yt=h===`none`?Y:J,Xt=H.useMemo(()=>h===`none`?Yt:Array.isArray(J)?J.map(e=>d(e,R)):d(J,R),[Yt,R,h,J]),Zt=g(_),Qt=g(r),$t=F(Q,U.activeIndex),en=F(Q,U.selectedIndex),tn=F(Q,U.positionerElement),nn=F(Q,U.listElement),rn=F(Q,U.triggerElement),an=F(Q,U.inputElement),on=F(Q,U.inputGroupElement),$=F(Q,U.inline),sn=F(Q,U.inputInsidePopup),cn=F(Q,U.inputOwnsFormValue),ln=Oe(rn),{mounted:un,setMounted:dn,transitionStatus:fn}=Ve(X),{openMethod:pn,triggerProps:mn}=Fe(X),hn=g(()=>Xt);Ke(sn?ln:_t,at,Yt,hn);let gn=g(()=>{O?ht.current=Jt.map(e=>N(e,L)):Q.set(`forceMounted`,!0)}),_n=H.useRef(J);m(()=>{J!==_n.current&&gn()},[gn,J]);let vn=g(e=>{Q.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0){if(e.activeIndex===null)Et.current!==lt&&(Et.current=lt,Zt(void 0,Ie(t,void 0,{index:-1})));else{let n=Ot.current[e.activeIndex];Et.current={value:n,index:e.activeIndex},Zt(n,Ie(t,void 0,{index:e.activeIndex}))}}}),yn=g((t,n)=>{if(St.current=n.reason===D,e.onInputValueChange?.(t,n),!n.isCanceled){if(n.reason===`input-change`){let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&dt(!0),Dt.current={hasQuery:e},e&&q&&Q.state.activeIndex==null&&Q.set(`activeIndex`,0)}}zt(t)}}),bn=g((t,n)=>{if(X!==t&&(n.reason===`escape-key`&&Pt&&Jt.length===0&&!Q.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&K&&sn&&!$&&ft!==null&&(dt(!1),pt(null),Y!==``&&yn(``,s(D,n.event))),!t&&ut&&(Mt?($||pt(Z),Z===``&&dt(!1)):K&&($||pt(Z),sn&&vn({activeIndex:null}),(!sn||$)&&yn(``,s(D,n.event)))),Bt(t),!t&&sn&&(n.reason===`focus-out`||n.reason===`outside-press`)&&($e(!0),et(!1),tt===`onBlur`)))){let e=h===`none`?Y:J;W.commit(e)}}),xn=g((e,t)=>{te?.(e,t),!t.isCanceled&&(It(e),(h===`none`&&gt.current&&Se||Mt&&!Q.state.inputInsidePopup)&&yn(N(e,L),s(t.reason,t.event)),Mt&&e!=null&&t.reason!==`input-change`&&ut&&!$&&pt(Z))}),Sn=g((e,t)=>{let n=t;if(n===void 0){if($t===null)return;n=Ot.current[$t]}let r=Te(e),i=Tt.current??e;Tt.current=null;let a=s(Me,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o){o.startsWith(`#`)&&bn(!1,a);return}if(K){let e=Array.isArray(J)?J:[],t=b(e,n,Q.state.isItemEqualToValue)?be(e,n,Q.state.isItemEqualToValue):[...e,n];if(xn(t,a),!(_t.current&&_t.current.value.trim()!==``))return;Q.state.inputInsidePopup?yn(``,s(D,a.event)):bn(!1,a)}else xn(n,a),bn(!1,a)}),Cn=g(()=>{if(!Q.state.submitOnItemClick)return;let e=W.inputRef.current?.form??Q.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),wn=g(()=>{if(dn(!1),Qt?.(!1),dt(!1),pt(null),vn(h===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),K&&_t.current&&_t.current.value!==``&&!St.current&&yn(``,s(D)),Mt){if(Q.state.inputInsidePopup)_t.current&&_t.current.value!==``&&yn(``,s(D));else{let e=N(J,L);_t.current&&_t.current.value!==e&&yn(e,s(e===``?D:z))}}}),Tn=H.useMemo(()=>$&&tn?{current:tn.closest(`[role="dialog"]`)}:gt,[$,tn]);_e({enabled:!e.actionsRef,open:X,ref:Tn,onComplete(){X||wn()}}),H.useImperativeHandle(e.actionsRef,()=>({unmount:wn}),[wn]),m(function(){if(X||h===`none`)return;let e=O?Kt:kt.current;if(K){let t=Array.isArray(J)?J:[],n=t[t.length-1],r=a(e,n,ve);vn({selectedIndex:r===-1?null:r})}else{let t=a(e,J,ve);vn({selectedIndex:t===-1?null:t})}},[X,J,O,h,Kt,K,ve,vn]),m(()=>{O&&(Ot.current=Jt,mt.current.length=Jt.length)},[O,Jt]),m(()=>{let e=Dt.current;if(e&&(e.hasQuery?q&&Q.set(`activeIndex`,0):q===`always`&&Q.set(`activeIndex`,0),Dt.current=null),!X&&!$)return;let t=Pt||Ft?Jt:Ot.current,n=Q.state.activeIndex;if(n==null){if(q===`always`&&t.length>0){Q.set(`activeIndex`,0);return}Et.current!==lt&&(Et.current=lt,Q.state.onItemHighlighted(void 0,Ie(z,void 0,{index:-1})));return}if(n>=t.length){Et.current!==lt&&(Et.current=lt,Q.state.onItemHighlighted(void 0,Ie(z,void 0,{index:-1}))),Q.set(`activeIndex`,null);return}let r=t[n],i=Et.current.value,a=i!==ct&&ie(r,i,Q.state.isItemEqualToValue);(Et.current.index!==n||!a)&&(Et.current={value:r,index:n},Q.state.onItemHighlighted(r,Ie(z,void 0,{index:n})))},[$t,q,Ft,Pt,Jt,$,X,Q]),m(()=>{if(h===`none`){Ue(String(Y)!==``);return}Ue(K?Array.isArray(J)&&J.length>0:J!=null)},[Ue,h,Y,J,K]),H.useEffect(()=>{Pt&&q&&Jt.length===0&&vn({activeIndex:null})},[Pt,q,Jt.length,vn]),pe(Z,()=>{X&&Z!==``&&Z!==String(Rt)&&dt(!0)}),pe(J,()=>{if(h!==`none`&&(je(jt),Pe(J!==V.initialValue),Re()?W.commit(J):W.commit(J,!0),Mt&&!Nt&&!sn)){let e=N(J,L);Y!==e&&yn(e,s(z))}}),pe(Y,()=>{h===`none`&&(je(jt),Pe(Y!==V.initialValue),Re()?W.commit(Y):W.commit(Y,!0))}),pe(O,()=>{if(!Mt||Nt||sn||ut)return;let e=N(J,L);Y!==e&&yn(e,s(z))});let En=fe({open:$?!0:X,onOpenChange:bn,elements:{reference:sn?rn:an,floating:tn}}),Dn,On;$||(Dn=E?`grid`:`listbox`,On=X?`true`:`false`);let kn=H.useMemo(()=>{let e=an?.tagName===`INPUT`,t=an==null||e,n=t||X,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=On,r[`aria-haspopup`]=Dn,r[`aria-controls`]=X?nn?.id:void 0,r[`aria-autocomplete`]=Ee),{reference:r,floating:{role:`presentation`}}},[an,X,On,Dn,nn?.id,Ee]),An=re(En,{enabled:!w&&!At&&M,event:`mousedown-only`,toggle:!1,touchOpenDelay:sn?0:100,reason:ge}),jn=l(En,{enabled:!w&&!At&&!$,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:$?!0:void 0,outsidePress(e){let t=Te(e);return!I(rn,t)&&!I(wt.current,t)&&!I(Ct.current,t)&&!I(on,t)}}),Mn=he(En,{enabled:!w&&!At,id:at,listRef:mt,activeIndex:$t,selectedIndex:en,virtual:!0,loopFocus:de,allowEscape:de&&!q,focusItemOnOpen:ut||h===`none`&&!q?!1:`auto`,focusItemOnHover:ue,resetOnPointerLeave:!le,cols:E?2:1,orientation:E?`horizontal`:void 0,rtl:it===`rtl`,disabledIndices:ze,onNavigate(e,t){(t||X)&&fn!==`ending`&&vn(t?{activeIndex:e,type:xt.current?`keyboard`:`pointer`}:{activeIndex:e})}}),Nn=H.useMemo(()=>We(Mn.reference,jn.reference,An.reference,kn.reference),[Mn.reference,jn.reference,An.reference,kn.reference]),Pn=H.useMemo(()=>We(Ne,Mn.floating,jn.floating,kn.floating),[Mn.floating,jn.floating,kn.floating]),Fn=H.useMemo(()=>{let e=Mn.item;return e?{...e,onFocus:void 0}:j},[Mn.item]);Be(()=>{Q.update({inline:xe,popupProps:Pn,inputProps:Nn,triggerProps:mn,itemProps:Fn,setOpen:bn,setInputValue:yn,setSelectedValue:xn,setIndices:vn,onItemHighlighted:Zt,handleSelection:Sn,forceMount:gn,requestSubmit:Cn})}),m(()=>{Q.update({id:at,selectedValue:J,open:X,mounted:un,transitionStatus:fn,items:O,inline:xe,popupProps:Pn,inputProps:Nn,triggerProps:mn,openMethod:pn,itemProps:Fn,selectionMode:h,name:jt,form:x,disabled:At,readOnly:w,required:T,grid:E,isGrouped:Vt,virtualized:ye,onOpenChangeComplete:Qt,openOnInputClick:M,itemToStringLabel:L,modal:Ce,autoHighlight:q,isItemEqualToValue:ve,submitOnItemClick:Ae,hasInputValue:Nt,requestSubmit:Cn,inputOwnsFormValue:h===`none`&&(xe||!Q.state.inputInsidePopup)})},[Q,at,J,X,un,fn,O,Pn,Nn,Fn,pn,mn,h,jt,At,w,T,W,E,Vt,ye,Qt,M,L,Ce,ve,Ae,Nt,xe,Cn,q,x]);let In=Le(ae,W.inputRef),Ln=H.useMemo(()=>({query:Z,hasItems:Pt,filteredItems:qt,flatFilteredItems:Jt}),[Z,Pt,qt,Jt]),Rn=H.useMemo(()=>Array.isArray(Yt)?``:d(Yt,R),[Yt,R]),zn=K&&Array.isArray(J)&&J.length>0,Bn=K||h===`none`&&cn?void 0:jt,Vn=H.useMemo(()=>!K||!Array.isArray(J)||!jt?null:J.map(e=>{let t=d(e,R);return(0,G.jsx)(`input`,{type:`hidden`,form:x,name:jt,value:t},t)}),[K,J,x,jt,R]),Hn=(0,G.jsxs)(H.Fragment,{children:[e.children,(0,G.jsx)(`input`,{...W.getInputValidationProps({onFocus(){if(sn){rn?.focus();return}(_t.current||rn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||At||w){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,n=s(z,e.nativeEvent);function r(){if(K)return;if(h===`none`){Pe(t!==V.initialValue),yn(t,n),Re()&&W.commit(t);return}let e=Ot.current.find(e=>d(e,R).toLowerCase()===t.toLowerCase()||N(e,L).toLowerCase()===t.toLowerCase());e!=null&&(Pe(e!==V.initialValue),xn?.(e,n),Re()&&W.commit(e))}O?r():(gn(),queueMicrotask(r))}}),id:at&&Bn==null?`${at}-hidden-input`:void 0,form:x,name:Bn,autoComplete:De,disabled:At,required:T&&!zn,readOnly:w,value:Rn,ref:In,style:Bn?me:n,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Vn]});return(0,G.jsx)(Je.Provider,{value:Q,children:(0,G.jsx)(Ye.Provider,{value:En,children:(0,G.jsx)(Xe.Provider,{value:Ln,children:(0,G.jsx)(Ze.Provider,{value:Y,children:Hn})})})})}var dt={...De,...Ge,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null},ft=H.createContext(void 0);function pt(){return H.useContext(ft)}var mt=H.createContext(void 0);function ht(e){let t=H.useContext(mt);if(t===void 0&&!e)throw Error(f(21));return t}var gt=H.forwardRef(function(e,t){let n=Qe(),{buttonRef:r,getButtonProps:i}=x({native:!1}),a=Le(t,r);function o(e){n.state.setOpen(!1,s(le,e.nativeEvent,e.currentTarget))}let c=i({onClick:o});return(0,G.jsx)(`span`,{ref:a,...c,"aria-label":`Dismiss`,tabIndex:void 0,style:me})}),_t=H.forwardRef(function(e,t){let{render:n,className:r,disabled:a=!1,id:c,style:ee,...te}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=y(),{labelId:h}=ae(),b=pt(),x=!!ht(!0),S=Qe(),{filteredItems:C}=et(),re=tt(),ie=o(),w=F(S,U.required),T=F(S,U.disabled),E=F(S,U.readOnly),O=F(S,U.name),A=F(S,U.form),j=F(S,U.selectionMode),M=F(S,U.autoHighlight),N=F(S,U.inputProps),se=F(S,U.triggerProps),ce=F(S,U.open),le=F(S,U.mounted),P=F(S,U.selectedValue),de=F(S,U.popupSide),fe=F(S,U.positionerElement),pe=F(S,U.id),I=F(S,U.inline),me=F(S,U.modal),he=!!M,ge=le&&fe?de:null,_e=u||T||a,R=C.length===0,ve=x||I,ye=!ve||me,be=oe(c??(ve?void 0:pe)),xe=Ue(h,void 0),Ce=x?k:l,[we,B]=H.useState(null),Te=H.useRef(!1),Ee=H.useRef(null),De=H.useRef(!1),Oe=j===`none`&&!x,ke=g(e=>{let t=x||S.state.inline;t&&!S.state.hasInputValue&&S.state.setInputValue(``,s(z)),S.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:Oe})}),Ae=x||!m?te:m.getValidationProps(te),je={...Ce,open:ce,disabled:_e,readOnly:E,popupSide:ge,listEmpty:R};function Me(e){if(!b)return;let t,{highlightedChipIndex:n}=b,r=b.chipsRef.current.length,i=ie===`rtl`,a=i?`ArrowRight`:`ArrowLeft`,o=i?`ArrowLeft`:`ArrowRight`;if(n!==void 0){if(e.key===a)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===o)e.preventDefault(),t=n<r-1?n+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let r=n>=P.length-1?P.length-2:n;t=r>=0?r:void 0,S.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===a&&(e.currentTarget.selectionStart??0)===0&&P.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&P.length>0&&(S.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let Ne=V(`input`,e,{state:je,ref:[t,S.state.inputRef,ke],props:[N,se,{type:`text`,value:e.value??we??re,"aria-readonly":E||void 0,"aria-required":w||void 0,"aria-labelledby":xe,disabled:_e,readOnly:E,required:j===`none`?w:void 0,form:A,...Oe&&O&&{name:O},id:be,onFocus(){if(f(!0),!I||!De.current)return;De.current=!1;let e=Ee.current;e!=null&&Object.hasOwn(S.state.valuesRef.current,e)&&S.state.setIndices({activeIndex:e})},onBlur(){d(!0),f(!1);let e=S.state.activeIndex;if(I&&e!==null&&M!==`always`&&(Ee.current=e,De.current=!0,S.state.setIndices({activeIndex:null})),p===`onBlur`){let e=j===`none`?re:P;m.commit(e)}},onCompositionStart(e){Se||(Te.current=!0,B(e.currentTarget.value))},onCompositionEnd(e){Te.current=!1;let t=e.currentTarget.value;B(null),S.state.setInputValue(t,s(ue,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=Te.current||!n;if(Te.current){let t=e.currentTarget.value;B(t),t===``&&!S.state.openOnInputClick&&!S.state.inputInsidePopup&&S.state.setOpen(!1,s(D,e.nativeEvent));let n=t.trim(),i=he&&n!==``;!E&&!_e&&n&&r&&(S.state.setOpen(!0,s(ue,e.nativeEvent)),he||S.state.setIndices({activeIndex:null,selectedIndex:null,type:S.state.keyboardActiveRef.current?`keyboard`:`pointer`})),ce&&S.state.activeIndex!==null&&!i&&S.state.setIndices({activeIndex:null,selectedIndex:null,type:S.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}S.state.setInputValue(e.currentTarget.value,s(ue,e.nativeEvent));let i=e.currentTarget.value===``,a=s(D,e.nativeEvent);i&&!S.state.inputInsidePopup&&(j===`single`&&S.state.setSelectedValue(null,a),S.state.openOnInputClick||S.state.setOpen(!1,a));let o=e.currentTarget.value.trim();!E&&!_e&&o&&r&&(S.state.setOpen(!0,s(ue,e.nativeEvent)),he||S.state.setIndices({activeIndex:null,selectedIndex:null,type:S.state.keyboardActiveRef.current?`keyboard`:`pointer`})),ce&&S.state.activeIndex!==null&&!he&&S.state.setIndices({activeIndex:null,selectedIndex:null,type:S.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(_e||E||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;S.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=ie===`rtl`;if(e.key===`Home`){L(e);let n=i&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){L(e);let a=i&&r?0:t.value.length;t.setSelectionRange(a,a),t.scrollLeft=r?-n:n;return}if(!le&&e.key===`Escape`){let t=j===`multiple`&&Array.isArray(P)?P.length===0:P===null,n=s(v,e.nativeEvent),r=j===`multiple`?[]:null;S.state.setInputValue(``,n),S.state.setSelectedValue(r,n),!t&&!S.state.inline&&!n.isPropagationAllowed&&e.stopPropagation();return}if(b&&e.key===`Backspace`&&t.value===``&&b.highlightedChipIndex===void 0&&Array.isArray(P)&&P.length>0){let t=b.chipsRef.current.length,n=t>0?t-1:P.length-1,r=P.filter((e,t)=>t!==n);S.state.setIndices({activeIndex:null,selectedIndex:null,type:S.state.keyboardActiveRef.current?`keyboard`:`pointer`}),S.state.setSelectedValue(r,s(z,e.nativeEvent));return}let a=b?.highlightedChipIndex!==void 0,o=Me(e);if(b?.setHighlightedChipIndex(o),o===void 0?a&&S.state.inputRef.current?.focus():b?.chipsRef.current[o]?.focus(),e.which!==229&&e.key===`Enter`&&ce){let t=S.state.activeIndex,n=e.nativeEvent;if(t===null){if(I)return;S.state.setOpen(!1,s(z,n));return}L(e);let r=S.state.listRef.current[t];r&&(S.state.selectionEventRef.current=n,r.click(),S.state.selectionEventRef.current=null)}},onPointerMove(){S.state.keyboardActiveRef.current=!1},onPointerDown(){S.state.keyboardActiveRef.current=!1}},Ae],stateAttributesMapping:dt}),Pe=x?(0,G.jsx)(_.Provider,{value:ne,children:Ne}):Ne;return(0,G.jsxs)(H.Fragment,{children:[ce&&ye&&(0,G.jsx)(gt,{ref:S.state.startDismissRef}),Pe]})}),vt=2,yt=H.forwardRef(function(e,t){let{render:n,className:i,nativeButton:a=!0,disabled:o=!1,id:c,style:ee,...te}=e,{state:l,disabled:u,setTouched:d,setFocused:f,validationMode:p,validation:m}=y(),{labelId:ne}=ae(),h=Qe(),{filteredItems:_}=et(),v=F(h,U.selectionMode),b=F(h,U.disabled),C=F(h,U.readOnly),ie=F(h,U.required),w=F(h,U.mounted),T=F(h,U.popupSide),E=F(h,U.positionerElement),D=F(h,U.listElement),O=F(h,U.triggerProps),k=F(h,U.triggerElement),A=F(h,U.inputInsidePopup),j=F(h,U.id),oe=F(h,U.labelId),M=F(h,U.open),N=F(h,U.selectedValue),se=F(h,U.activeIndex),ce=F(h,U.selectedIndex),le=F(h,U.hasSelectedValue),P=$e(),ue=tt(),de=Ee(),fe=u||b||o,pe=_.length===0,me=w&&E?T:null;S({id:A?c:void 0});let he=A?c??j:c,ge=Ue(ne,oe),_e=H.useRef(``);function R(e){_e.current=e.pointerType}let z=P.useState(`domReferenceElement`);H.useEffect(()=>{A&&k&&k!==z&&P.set(`domReferenceElement`,k)},[k,z,P,A]);let{reference:ye}=r(P,{enabled:!M&&!C&&!b&&v===`single`,listRef:h.state.labelsRef,activeIndex:se,selectedIndex:ce,onMatch(e){let t=h.state.valuesRef.current[e];t!==void 0&&h.state.setSelectedValue(t,s(`none`))}}),{reference:be}=re(P,{enabled:!C&&!b,event:`mousedown`}),{buttonRef:xe,getButtonProps:Se}=x({native:a,disabled:fe}),Ce={...l,open:M,disabled:fe,popupSide:me,listEmpty:pe,placeholder:v!==`none`&&!le},we=g(e=>{h.set(`triggerElement`,e)});return V(`button`,e,{ref:[t,xe,we],state:Ce,props:[O,be,ye,{id:he,tabIndex:A?0:-1,role:A?`combobox`:void 0,"aria-expanded":M?`true`:`false`,"aria-haspopup":A?`dialog`:`listbox`,"aria-controls":M?D?.id:void 0,"aria-required":A&&ie||void 0,"aria-labelledby":ge,onPointerDown:R,onPointerEnter:R,onFocus(){f(!0),!(fe||C)&&de.start(0,h.state.forceMount)},onBlur(e){if(!I(E,e.relatedTarget)&&(d(!0),f(!1),p===`onBlur`)){let e=v===`none`?ue:N;m.commit(e)}},onMouseDown(e){if(fe||C||(A||P.set(`domReferenceElement`,e.currentTarget),h.state.forceMount(),_e.current!==`touch`&&(h.state.inputRef.current?.focus(),A||e.preventDefault()),M))return;let t=je(e.currentTarget);function n(e){if(!k)return;let t=Te(e),n=h.state.positionerElement,r=h.state.listElement;if(I(k,t)||I(n,t)||I(r,t)||t===k)return;let i=ve(k),a=e.clientX>=i.left-vt&&e.clientX<=i.right+vt,o=e.clientY>=i.top-vt&&e.clientY<=i.bottom+vt;a&&o||h.state.setOpen(!1,s(`cancel-open`,e))}A&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){fe||C||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(L(e),h.state.setOpen(!0,s(Ae,e.nativeEvent)),h.state.inputRef.current?.focus())}},m?m.getValidationProps(te):te,Se],stateAttributesMapping:dt})}),bt=H.createContext(null);function xt(){return H.useContext(bt)}function St(e){let{children:t,items:n}=e,r=H.useMemo(()=>({items:n}),[n]);return(0,G.jsx)(bt.Provider,{value:r,children:t})}function Ct(e){let{children:t}=e,{filteredItems:n}=et(),r=xt(),i=r?r.items:n;return i?(0,G.jsx)(H.Fragment,{children:i.map(t)}):null}var wt=H.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=Qe(),ee=$e(),te=!!ht(!0),{filteredItems:l,hasItems:d}=et(),f=F(c,U.selectionMode),p=F(c,U.grid),m=F(c,U.popupProps),ne=F(c,U.virtualized),h=f===`multiple`,_=l.length===0,v=g(e=>{c.set(`positionerElement`,e)}),y=g(e=>{c.set(`listElement`,e)}),b=H.useMemo(()=>typeof o==`function`?n||=(0,G.jsx)(Ct,{children:o}):o,[o]),x={empty:_},S=ee.useState(`floatingId`),C=V(`div`,e,{state:x,ref:[t,y,te?null:v],props:[m,{children:b,tabIndex:-1,id:S,role:p?`grid`:`listbox`,"aria-multiselectable":h?`true`:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;L(e);let n=e.nativeEvent,r=c.state.listRef.current[t];r&&(c.state.selectionEventRef.current=n,r.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},s]});return ne?C:(0,G.jsx)(u,{elementsRef:c.state.listRef,labelsRef:d?void 0:c.state.labelsRef,children:C})}),Tt=e(Pe()),Et=`⁠`;function Dt(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function Ot(){let e=Ee(),t=H.useRef(null);return H.useEffect(()=>{if(ye)return;let n=t.current;if(n==null)return;let r=Dt(n);if(r==null)return;let i=r.nodeValue??``,a=`${i}${Et}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[t,e]),t}var kt=H.createContext(void 0);function At(){let e=H.useContext(kt);if(e===void 0)throw Error(f(20));return e}var jt=H.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Qe(),a=F(i,U.mounted),o=F(i,U.forceMounted);return a||n||o?(0,G.jsx)(kt.Provider,{value:n,children:(0,G.jsx)(T,{ref:t,...r})}):null}),K=H.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:te=0,collisionBoundary:l=`clipping-ancestors`,collisionPadding:u=5,arrowPadding:d=5,sticky:f=!1,disableAnchorTracking:ne=!1,collisionAvoidance:h=O,style:_,...v}=e,y=Qe(),{filteredItems:b}=et(),x=$e(),S=At(),C=F(y,U.modal),re=F(y,U.open),ie=F(y,U.mounted),T=F(y,U.openMethod),ae=F(y,U.positionerElement),E=F(y,U.triggerElement),D=F(y,U.inputElement),k=F(y,U.inputGroupElement),A=F(y,U.inputInsidePopup),j=F(y,U.transitionStatus),oe=b.length===0,M=w({anchor:i??(A?E:k??D),floatingRootContext:x,positionMethod:a,mounted:ie,side:o,sideOffset:c,align:s,alignOffset:te,arrowPadding:d,collisionBoundary:l,collisionPadding:u,sticky:f,disableAnchorTracking:ne,keepMounted:S,collisionAvoidance:h,lazyFlip:!0});ee(re&&C,T===`touch`,ae,E);let N={open:re,side:M.side,align:M.align,anchorHidden:M.anchorHidden,empty:oe};m(()=>{y.set(`popupSide`,M.side)},[y,M.side]);let se=g(e=>{y.set(`positionerElement`,e)}),le=ce(e,N,{styles:M.positionerStyles,transitionStatus:j,props:v,refs:[t,se],hidden:!ie,inert:!re});return(0,G.jsxs)(mt.Provider,{value:M,children:[ie&&C&&(0,G.jsx)(p,{inert:xe(!re),cutout:k??D??E}),le]})}),Mt={...ke,...de},Nt=H.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=Qe(),ee=ht(),te=$e(),{filteredItems:l}=et(),u=F(c,U.mounted),d=F(c,U.open),f=F(c,U.openMethod),p=F(c,U.transitionStatus),m=F(c,U.inputInsidePopup),ne=F(c,U.inputElement),h=F(c,U.modal),g=l.length===0;_e({open:d,ref:c.state.popupRef,onComplete(){d&&c.state.onOpenChangeComplete(!0)}});let _={open:d,side:ee.side,align:ee.align,anchorHidden:ee.anchorHidden,transitionStatus:p,empty:g},v=V(`div`,e,{state:_,ref:[t,c.state.popupRef],props:[{role:m?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=Te(e.nativeEvent);f!==`touch`&&(I(c.state.listElement,t)||t===e.currentTarget)&&c.state.inputRef.current?.focus()}},E(p),s],stateAttributesMapping:Mt}),y=a===void 0?m?e=>e===`touch`?c.state.popupRef.current:ne:!1:a,b;b=o??(m?void 0:!1);let x=!m||h;return(0,G.jsx)(Ce,{context:te,disabled:!u,modal:x,openInteractionType:f,initialFocus:y,returnFocus:b,getInsideElements:()=>[c.state.startDismissRef.current,c.state.endDismissRef.current],children:(0,G.jsxs)(H.Fragment,{children:[v,x&&(0,G.jsx)(gt,{ref:c.state.endDismissRef})]})})}),Pt=H.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return V(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:`▼`},a]})}),Ft=H.createContext(void 0),q=H.createContext(!1);function J(){return H.useContext(q)}var It=H.memo(H.forwardRef(function(e,t){let{render:n,className:r,style:i,value:o=null,index:s,disabled:c=!1,nativeButton:ee=!1,...l}=e,u=H.useRef(!1),d=H.useRef(null),f=C({index:s,textRef:d,indexGuessBehavior:te.GuessFromOrder}),p=Qe(),ne=J(),{flatFilteredItems:h,hasItems:g}=et(),_=F(p,U.open),v=F(p,U.selectionMode),y=F(p,U.readOnly),b=F(p,U.virtualized),S=F(p,U.isItemEqualToValue),re=v!==`none`,w=s??(b?a(h,o,S):f.index),T=f.index!==-1,ae=F(p,U.id),E=F(p,U.isActive,w),D=F(p,U.isSelected,o),O=F(p,U.itemProps),k=H.useRef(null),A=ae!=null&&T?`${ae}-${w}`:void 0,j=D&&re;m(()=>{if(!T||!b&&s==null)return;let e=p.state.listRef.current;return e[w]=k.current,()=>{delete e[w]}},[T,b,w,s,p]),m(()=>{if(!T||g)return;let e=p.state.valuesRef.current;return e[w]=o,v!==`none`&&p.state.allValuesRef.current.push(o),()=>{delete e[w]}},[T,g,w,o,p,v]),m(()=>{if(!_){u.current=!1;return}if(!T||g)return;let e=p.state.selectedValue,t=Array.isArray(e)?e[e.length-1]:e;ie(o,t,S)&&p.set(`selectedIndex`,w)},[T,g,_,p,w,o,S]);let{getButtonProps:oe,buttonRef:M}=x({disabled:c,focusableWhenDisabled:!0,native:ee,composite:!0}),N={disabled:c,selected:j,highlighted:E};function se(e){function t(){p.state.handleSelection(e,o)}p.state.submitOnItemClick?(Tt.flushSync(t),p.state.requestSubmit()):t()}let ce={id:A,role:ne?`gridcell`:`option`,"aria-selected":re?j:void 0,tabIndex:void 0,onPointerDownCapture(e){u.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){c||y||se(e.nativeEvent)},onMouseUp(e){let t=u.current;u.current=!1,!(c||y||e.button!==0||t||!E)&&se(e.nativeEvent)}},le=V(`div`,e,{ref:[M,t,f.ref,k],state:N,props:[O,ce,l,oe]}),P=H.useMemo(()=>({selected:j,textRef:d}),[j,d]);return(0,G.jsx)(Ft.Provider,{value:P,children:le})})),Lt=H.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=et(),c=Qe(),ee=Ot(),te=s.length===0?a:null;return V(`div`,e,{ref:[t,c.state.emptyRef,ee],props:[{children:te,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),Rt={...de,...R},Y=H.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,keepMounted:o=!1,style:c,...ee}=e,{disabled:te}=y(),l=Qe(),u=F(l,U.selectionMode),d=F(l,U.disabled),f=F(l,U.readOnly),p=F(l,U.open),m=F(l,U.selectedValue),ne=F(l,U.hasSelectionChips),g=tt(),_=!1;_=u===`none`?g!==``:u===`single`?m!=null:ne;let v=te||d||i,{buttonRef:b,getButtonProps:S}=x({native:a,disabled:v}),{mounted:C,transitionStatus:re,setMounted:ie}=Ve(_),w={disabled:v,visible:_,open:p,transitionStatus:re};_e({open:_,ref:l.state.clearRef,onComplete(){_||ie(!1)}});let T=V(`button`,e,{state:w,ref:[t,b,l.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(v||f)return;let t=l.state.keyboardActiveRef;l.state.setInputValue(``,s(h,e.nativeEvent)),u===`none`?l.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(l.state.setSelectedValue(Array.isArray(m)?[]:null,s(h,e.nativeEvent)),l.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),l.state.inputRef.current?.focus()}},ee,S],stateAttributesMapping:Rt});return o||C?T:null});export{Nt as a,Ot as c,St as d,yt as f,ot as g,st as h,Pt as i,wt as l,ut as m,Lt as n,K as o,_t as p,It as r,jt as s,Y as t,Ct as u};
2
+ //# sourceMappingURL=ComboboxClear-qTthzuJh.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{ME as t,cE as n,sr as r,t as i}from"./utils-CRwA5SKO.js";import{p as a}from"./toast-DYfY2t_z.js";import{c as o,l as s,y as c}from"./tooltip-924Ikq0L.js";var l=t(),u=e(n(),1);function d(e){let t=(0,l.c)(19),{command:n,className:d,prominent:f}=e,p=f!==void 0&&f,m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={timeout:1500,target:`command`},t[0]=m):m=t[0];let{copyToClipboard:h,isCopied:g}=a(m),_=p?`px-4 py-3.5 text-base`:`px-3 py-2.5 text-sm`,v;t[1]!==d||t[2]!==_?(v=i(`flex items-center justify-between gap-3 rounded-lg border border-border bg-muted/50 font-mono`,_,d),t[1]=d,t[2]=_,t[3]=v):v=t[3];let y;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,u.jsx)(`span`,{className:`mr-2 text-muted-foreground`,children:`$`}),t[4]=y):y=t[4];let b;t[5]===n?b=t[6]:(b=(0,u.jsxs)(`span`,{className:`min-w-0 truncate`,children:[y,n]}),t[5]=n,t[6]=b);let x;t[7]!==n||t[8]!==h?(x=()=>h(n,void 0),t[7]=n,t[8]=h,t[9]=x):x=t[9];let S=g?s:c,C;t[10]===S?C=t[11]:(C=(0,u.jsx)(o,{className:`size-3.5`,icon:S}),t[10]=S,t[11]=C);let w;t[12]!==x||t[13]!==C?(w=(0,u.jsx)(r,{size:`icon-xs`,variant:`ghost`,"aria-label":`Copy command`,onClick:x,children:C}),t[12]=x,t[13]=C,t[14]=w):w=t[14];let T;return t[15]!==w||t[16]!==v||t[17]!==b?(T=(0,u.jsxs)(`div`,{className:v,children:[b,w]}),t[15]=w,t[16]=v,t[17]=b,t[18]=T):T=t[18],T}export{d as t};
2
- //# sourceMappingURL=CommandBlock-BI3ZCXsB.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{NE as t,lE as n,sr as r,t as i}from"./utils-BEVyjoxo.js";import{p as a}from"./toast-DhMYg_gN.js";import{c as o,l as s,y as c}from"./tooltip-Cq9yz15d.js";var l=t(),u=e(n(),1);function d(e){let t=(0,l.c)(19),{command:n,className:d,prominent:f}=e,p=f!==void 0&&f,m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={timeout:1500,target:`command`},t[0]=m):m=t[0];let{copyToClipboard:h,isCopied:g}=a(m),_=p?`px-4 py-3.5 text-base`:`px-3 py-2.5 text-sm`,v;t[1]!==d||t[2]!==_?(v=i(`flex items-center justify-between gap-3 rounded-lg border border-border bg-muted/50 font-mono`,_,d),t[1]=d,t[2]=_,t[3]=v):v=t[3];let y;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,u.jsx)(`span`,{className:`mr-2 text-muted-foreground`,children:`$`}),t[4]=y):y=t[4];let b;t[5]===n?b=t[6]:(b=(0,u.jsxs)(`span`,{className:`min-w-0 truncate`,children:[y,n]}),t[5]=n,t[6]=b);let x;t[7]!==n||t[8]!==h?(x=()=>h(n,void 0),t[7]=n,t[8]=h,t[9]=x):x=t[9];let S=g?s:c,C;t[10]===S?C=t[11]:(C=(0,u.jsx)(o,{className:`size-3.5`,icon:S}),t[10]=S,t[11]=C);let w;t[12]!==x||t[13]!==C?(w=(0,u.jsx)(r,{size:`icon-xs`,variant:`ghost`,"aria-label":`Copy command`,onClick:x,children:C}),t[12]=x,t[13]=C,t[14]=w):w=t[14];let T;return t[15]!==w||t[16]!==v||t[17]!==b?(T=(0,u.jsxs)(`div`,{className:v,children:[b,w]}),t[15]=w,t[16]=v,t[17]=b,t[18]=T):T=t[18],T}export{d as t};
2
+ //# sourceMappingURL=CommandBlock-CWt29kmi.js.map