@p4code/cli 0.8.0 → 0.8.2

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 (425) hide show
  1. package/dist/{AcpMcpStdioBridge-CfALMbjp.mjs → AcpMcpStdioBridge-DBONIB-w.mjs} +120 -19
  2. package/dist/AcpMcpStdioBridge-D_JnxPWS.mjs +4 -0
  3. package/dist/{Effect-zfMCY1g4.mjs → Effect-BahT0mOQ.mjs} +2 -2
  4. package/dist/bin.mjs +2 -2
  5. package/dist/{binCli-C3s3kGWK.mjs → binCli-C1tFongj.mjs} +7162 -5814
  6. package/dist/claude-history-worker.mjs +1 -1
  7. package/dist/{claudeHistoryWorker-CMjiofbZ.mjs → claudeHistoryWorker-v_0uyLGp.mjs} +2 -2
  8. package/dist/client/.vite/manifest.json +2154 -2122
  9. package/dist/client/assets/{AnimatedHeight-BwS0L5jd.js → AnimatedHeight-PJxVEp27.js} +2 -2
  10. package/dist/client/assets/{AuthSurfaceShell-B5dTwcVl.js → AuthSurfaceShell-BrPHaco9.js} +2 -2
  11. package/dist/client/assets/{CSPContext-B1m61J9R.js → CSPContext-C7uwFl6f.js} +2 -2
  12. package/dist/client/assets/ChatGptUsageButton-7IZqWaQq.js +2 -0
  13. package/dist/client/assets/ChatMarkdown-D3ITm4U-.js +65 -0
  14. package/dist/client/assets/CodexSetupSection.logic-DyTuN6tg.js +2 -0
  15. package/dist/client/assets/{ComboboxClear-CSnbXRcJ.js → ComboboxClear-BXGqqvsR.js} +2 -2
  16. package/dist/client/assets/{CommandBlock-DcgLBXYD.js → CommandBlock-JrUX9e8E.js} +2 -2
  17. package/dist/client/assets/{ComposerPromptEditor-oniaSNnQ.js → ComposerPromptEditor-Ba1dvqDN.js} +56 -56
  18. package/dist/client/assets/{CompositeRoot-ykxKqF8U.js → CompositeRoot-CW06ANMY.js} +2 -2
  19. package/dist/client/assets/{ConnectionStatusDot-BvfbN2Tp.js → ConnectionStatusDot-Cjh57o6i.js} +2 -2
  20. package/dist/client/assets/DevicePanel-zG3feCFw.js +2 -0
  21. package/dist/client/assets/{DeviceSetup-kaQqI-00.js → DeviceSetup-DccRVnjb.js} +2 -2
  22. package/dist/client/assets/{DialogTitle-Cwi7QOum.js → DialogTitle-7tvQYVxE.js} +2 -2
  23. package/dist/client/assets/{DiffCommentAnnotation-CnCPh4ot.js → DiffCommentAnnotation-DDBZcMFv.js} +3 -3
  24. package/dist/client/assets/DiffFileTree-BhSPT6m_.js +2 -0
  25. package/dist/client/assets/DiffPanel-D7QMWq_A.js +2 -0
  26. package/dist/client/assets/{DiffWorkerPoolProvider-C8TyWhmO.js → DiffWorkerPoolProvider-RcplgHGv.js} +3 -3
  27. package/dist/client/assets/{EnvironmentMachineIcon-CBS8TSmT.js → EnvironmentMachineIcon-DMZGa766.js} +2 -2
  28. package/dist/client/assets/{ExpandableText-CWbIeyDn.js → ExpandableText-DfY-qqRW.js} +3 -3
  29. package/dist/client/assets/{FieldControl-CWR3fEt0.js → FieldControl-C9UnFGZn.js} +2 -2
  30. package/dist/client/assets/{FileDiff-BiIVs0i-.js → FileDiff-BXlBWSxx.js} +2 -2
  31. package/dist/client/assets/{FilePreviewPanel-CXgaN8cb.js → FilePreviewPanel-CSKeM-xZ.js} +5 -5
  32. package/dist/client/assets/{FoldedSettingsSection-BimbnaOl.js → FoldedSettingsSection-BJm8ZaTy.js} +2 -2
  33. package/dist/client/assets/{FormContext-DyOeI4sU.js → FormContext-haYZgWIK.js} +2 -2
  34. package/dist/client/assets/{Icons-BlUgSxml.js → Icons-C12feMOO.js} +2 -2
  35. package/dist/client/assets/{KeybindingsSettings.logic-Dfld_XQx.js → KeybindingsSettings.logic-DhXMdk5O.js} +2 -2
  36. package/dist/client/assets/{NoProjectsHero-ZE4gAFj0.js → NoProjectsHero-CDoSxJVV.js} +2 -2
  37. package/dist/client/assets/{PanelLayoutControls-x5a58Pdn.js → PanelLayoutControls-CCKUTh1H.js} +10 -10
  38. package/dist/client/assets/{PierreEntryIcon-DeBbijxO.js → PierreEntryIcon-7x50Pz_C.js} +2 -2
  39. package/dist/client/assets/{PreviewPanel-2vuw0skj.js → PreviewPanel-BEWZuH6o.js} +2 -2
  40. package/dist/client/assets/ProjectDefaultsSettings-BRRQlvgR.js +2 -0
  41. package/dist/client/assets/{ProjectFavicon-BhJj4G_1.js → ProjectFavicon-ExMHrN16.js} +3 -3
  42. package/dist/client/assets/ProjectIconPickerDialog-DXSyEGg8.js +2 -0
  43. package/dist/client/assets/{ProjectMonogram-BgobvHld.js → ProjectMonogram-um8sYqIi.js} +2 -2
  44. package/dist/client/assets/{ProviderAuthTerminal-CJSJcjB9.js → ProviderAuthTerminal-Tw3kH5vc.js} +2 -2
  45. package/dist/client/assets/ProviderModelPicker-CpgHpUCG.js +2 -0
  46. package/dist/client/assets/{ProviderSettingsForm-Dh_vspcE.js → ProviderSettingsForm-CaNO8FYK.js} +2 -2
  47. package/dist/client/assets/{PullRequestCodeTab-Do36z71f.js → PullRequestCodeTab-DwqL4aAJ.js} +3 -3
  48. package/dist/client/assets/{ReadOnlySourcePreview-BfLIaC5x.js → ReadOnlySourcePreview-Cw6lfMjA.js} +2 -2
  49. package/dist/client/assets/{RedactedSensitiveText-D5aX1wQs.js → RedactedSensitiveText-citJBx4E.js} +2 -2
  50. package/dist/client/assets/{RenderErrorBoundary-DTEG6arv.js → RenderErrorBoundary-D21mPr47.js} +2 -2
  51. package/dist/client/assets/ScheduledTasksSettings-BXOG7dPV.js +4 -0
  52. package/dist/client/assets/ScopedSwitch-2MBm4Srn.js +2 -0
  53. package/dist/client/assets/{SettingsPanels-Betza2Al.js → SettingsPanels-DjzXV7Dm.js} +7 -7
  54. package/dist/client/assets/{SettingsPanels.logic-Dn2Jcxyy.js → SettingsPanels.logic-DpdMN_lX.js} +2 -2
  55. package/dist/client/assets/{SettingsScopeNotice-CAaNSKvu.js → SettingsScopeNotice-CdNfxmW3.js} +2 -2
  56. package/dist/client/assets/{T3ConnectAccountPages-DEqOE3hy.js → T3ConnectAccountPages-C6qHq26m.js} +2 -2
  57. package/dist/client/assets/{T3ConnectSidebarSignIn-C4jpzdPh.js → T3ConnectSidebarSignIn-DewmE1PI.js} +2 -2
  58. package/dist/client/assets/ThemeEditorPanel-aEsLfkYx.js +5 -0
  59. package/dist/client/assets/{ThreadTerminalDrawer-Z7ArIuq0.js → ThreadTerminalDrawer-C1NDkTSs.js} +4 -4
  60. package/dist/client/assets/{UsageLimits-7-_nKQT_.js → UsageLimits-BUS51Bjr.js} +2 -2
  61. package/dist/client/assets/{Virtualizer-EvXC5PAR.js → Virtualizer-B2BG0GB9.js} +2 -2
  62. package/dist/client/assets/WorkspaceBreadcrumb-DX3xH6tC.js +2 -0
  63. package/dist/client/assets/WorkspacePageContainer-BFo6qTGJ.js +2 -0
  64. package/dist/client/assets/{WorkspacePageHeader-DB9Z9OtR.js → WorkspacePageHeader-BCZXPSxj.js} +2 -2
  65. package/dist/client/assets/_chat-B3j3XTUJ.js +58 -0
  66. package/dist/client/assets/{_chat.index-CTfxLY4F.js → _chat.index-7o1_qjfU.js} +2 -2
  67. package/dist/client/assets/{_chat.new-B_FNmP8f.js → _chat.new-W2E0MZ4y.js} +3 -3
  68. package/dist/client/assets/_chat.pull-requests-DnQ-MKRG.js +2 -0
  69. package/dist/client/assets/{abnfDiagram-VCTEODGH-Du15a8Yu.js → abnfDiagram-VCTEODGH-DJY5x2uS.js} +2 -2
  70. package/dist/client/assets/{alert-DUQHh6vz.js → alert-yllEf0yh.js} +2 -2
  71. package/dist/client/assets/app-window-D2LBv8RE.js +2 -0
  72. package/dist/client/assets/architecture-7GRP2DOG-nO5xG-8k.js +1 -0
  73. package/dist/client/assets/{architectureDiagram-5GKGNRK7-DhXH9Bsf.js → architectureDiagram-5GKGNRK7-6YiKazHv.js} +2 -2
  74. package/dist/client/assets/arrow-left-yEW5WFYj.js +1 -0
  75. package/dist/client/assets/arrow-right-BzVZfSb7.js +1 -0
  76. package/dist/client/assets/arrow-up-down-DjL7trCL.js +1 -0
  77. package/dist/client/assets/assets-BxSVuao2.js +2 -0
  78. package/dist/client/assets/bell-ue7A6JFg.js +1 -0
  79. package/dist/client/assets/{blockDiagram-I7D4REHJ-CZ4PIO64.js → blockDiagram-I7D4REHJ-D_EURhbV.js} +2 -2
  80. package/dist/client/assets/blocks-De0WwZYY.js +1 -0
  81. package/dist/client/assets/bot-_T9E-nkd.js +1 -0
  82. package/dist/client/assets/brain-CQYem3Oz.js +2 -0
  83. package/dist/client/assets/{browserHistoryStore-D6A_83JY.js → browserHistoryStore-B-t3Vc_Z.js} +2 -2
  84. package/dist/client/assets/{browserLinkTarget-BuFHp5RQ.js → browserLinkTarget-CiQS1wUg.js} +2 -2
  85. package/dist/client/assets/{c4Diagram-7LVT6UL2-tMXW_Jy8.js → c4Diagram-7LVT6UL2-CmfPrrIj.js} +2 -2
  86. package/dist/client/assets/calendar-clock-DXFNSdXM.js +1 -0
  87. package/dist/client/assets/channel-BE0ymtNV.js +2 -0
  88. package/dist/client/assets/chart-no-axes-column-Dx_cyfN9.js +1 -0
  89. package/dist/client/assets/checkbox-CIeee0-J.js +2 -0
  90. package/dist/client/assets/chromium-BusoCgri.js +2 -0
  91. package/dist/client/assets/{chunk-4HAMMTFA-gISFFADw.js → chunk-4HAMMTFA-BdvKUuii.js} +2 -2
  92. package/dist/client/assets/{chunk-75Z2AOVW-iWd1WVXJ.js → chunk-75Z2AOVW-DXz8BlJz.js} +2 -2
  93. package/dist/client/assets/{chunk-DU6HZSFF-hD69jU_T.js → chunk-DU6HZSFF-ebFBoLTT.js} +2 -2
  94. package/dist/client/assets/{chunk-F27PBJKO-DnDFIjHp.js → chunk-F27PBJKO-B1MlVcaX.js} +2 -2
  95. package/dist/client/assets/{chunk-GMAD6QVW-Chr0sR5B.js → chunk-GMAD6QVW-CEXqem_-.js} +2 -2
  96. package/dist/client/assets/{chunk-GVQU2GXP-D84Xc6Vy.js → chunk-GVQU2GXP-wsgr7T0u.js} +2 -2
  97. package/dist/client/assets/{chunk-IMKFNOWR-DOdemMNR.js → chunk-IMKFNOWR-Daxc_3WP.js} +2 -2
  98. package/dist/client/assets/{chunk-L3NEJ4N5-CILnb7VE.js → chunk-L3NEJ4N5-C4NnipZ0.js} +2 -2
  99. package/dist/client/assets/{chunk-OSK3NFVY-Bxpu9Oo4.js → chunk-OSK3NFVY-DDd2Ay5_.js} +2 -2
  100. package/dist/client/assets/{chunk-P2QGCYS3-75l6wJUu.js → chunk-P2QGCYS3-I9iEYMEJ.js} +2 -2
  101. package/dist/client/assets/{chunk-POPQ4Y6H-jYZ1RdM0.js → chunk-POPQ4Y6H-Cgwl0wkZ.js} +2 -2
  102. package/dist/client/assets/{chunk-PWAF6VOD-DtONZJrC.js → chunk-PWAF6VOD-kBB0Jquc.js} +2 -2
  103. package/dist/client/assets/{chunk-SHT3W25Y-NY6-WqgC.js → chunk-SHT3W25Y-gtUoMWd0.js} +2 -2
  104. package/dist/client/assets/{chunk-SVP7TREG-CGG6Z85U.js → chunk-SVP7TREG-CbL5vJ0z.js} +2 -2
  105. package/dist/client/assets/{chunk-TICWLB2K-DzB7PtXF.js → chunk-TICWLB2K-CMgrptzc.js} +2 -2
  106. package/dist/client/assets/classDiagram-ZZMXUADV-YRduSbl9.js +2 -0
  107. package/dist/client/assets/classDiagram-v2-VYDZK3BY-YRduSbl9.js +2 -0
  108. package/dist/client/assets/{collapsible-CLujF6F7.js → collapsible-C3qenpEI.js} +2 -2
  109. package/dist/client/assets/{color-picker-BG3Rpy98.js → color-picker-Cj2frYnP.js} +2 -2
  110. package/dist/client/assets/{combobox-Cx4FP7Bk.js → combobox-DixSlhgy.js} +2 -2
  111. package/dist/client/assets/{command-CVKxjYiJ.js → command-B45LRbFT.js} +2 -2
  112. package/dist/client/assets/{connect-DeTNO4tO.js → connect-CYM5DIkv.js} +2 -2
  113. package/dist/client/assets/{connect-agent-CTLxG7lp.js → connect-agent-nn3QLMb4.js} +2 -2
  114. package/dist/client/assets/corner-left-up-DohBMTTI.js +1 -0
  115. package/dist/client/assets/{cynefin-OW5HDTMX-C3y7gjYM.js → cynefin-OW5HDTMX-CmLjrFzm.js} +1 -1
  116. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-DEFegOUv.js → cynefinDiagram-5FMLGOSQ-xQBevUIj.js} +2 -2
  117. package/dist/client/assets/{dagre-GXQ25YYZ-C3YHw-ZL.js → dagre-GXQ25YYZ-Ck8BwJaT.js} +2 -2
  118. package/dist/client/assets/device-BRhRKysY.js +2 -0
  119. package/dist/client/assets/{diagram-S7CK7UJ4-B04fDyJ1.js → diagram-S7CK7UJ4-Bl0e661x.js} +2 -2
  120. package/dist/client/assets/{diagram-UQ7AKVKN-DJ5yQdqn.js → diagram-UQ7AKVKN-TO9a3uQI.js} +2 -2
  121. package/dist/client/assets/{diagram-VSXAHHWV-DwQn4LJH.js → diagram-VSXAHHWV-BZ7xQ8wz.js} +2 -2
  122. package/dist/client/assets/{diagram-VX7I27RA-BFeEJB2L.js → diagram-VX7I27RA-C4cA30qa.js} +2 -2
  123. package/dist/client/assets/{diagram-Z3DM3KII-DjNPPgna.js → diagram-Z3DM3KII-Hl3MmqeP.js} +2 -2
  124. package/dist/client/assets/{dialog-BBidAZq_.js → dialog-DhJeevKt.js} +2 -2
  125. package/dist/client/assets/{diffRendering-BcgWZBc6.js → diffRendering-QVeYVRDU.js} +2 -2
  126. package/dist/client/assets/{discovery-list-BOhsy2yk.js → discovery-list-VoilmsP7.js} +2 -2
  127. package/dist/client/assets/{dist-D-bAcBTo.js → dist-CxgL3edJ.js} +3 -3
  128. package/dist/client/assets/download-B587khDU.js +1 -0
  129. package/dist/client/assets/{draft-input-Dk-JXf0v.js → draft-input-BrEXLyuj.js} +2 -2
  130. package/dist/client/assets/{duoViewer-DELDCd_3.js → duoViewer-D-_bD3-L.js} +2 -2
  131. package/dist/client/assets/dynamic-R3OtJZHK.js +3 -0
  132. package/dist/client/assets/earth-26IFbzWm.js +1 -0
  133. package/dist/client/assets/{ebnfDiagram-PWID7BFC-R_zFp3Q4.js → ebnfDiagram-PWID7BFC-Bo_ALmgV.js} +2 -2
  134. package/dist/client/assets/ellipsis-BScTTB_n.js +1 -0
  135. package/dist/client/assets/{embeddedScripts-S6heIv6s.js → embeddedScripts-DKKE5k7D.js} +2 -2
  136. package/dist/client/assets/{empty-B3wHlMsI.js → empty-uoiaKPHo.js} +2 -2
  137. package/dist/client/assets/entities-DNKDCsf2.js +2 -0
  138. package/dist/client/assets/{erDiagram-RLTQ6QDP-DgSVOlTI.js → erDiagram-RLTQ6QDP-B38FLl2U.js} +2 -2
  139. package/dist/client/assets/eventmodeling-NTZA5JFV-6XFarcvj.js +1 -0
  140. package/dist/client/assets/eye-DTlv8Vet.js +1 -0
  141. package/dist/client/assets/file-search-gFHOfI6S.js +1 -0
  142. package/dist/client/assets/{fileLinks-M_i1pQMr.js → fileLinks-VfyxNu8P.js} +2 -2
  143. package/dist/client/assets/{fileTreeExpansion-BoH-LpwD.js → fileTreeExpansion-BfMZMaRV.js} +2 -2
  144. package/dist/client/assets/flowDiagram-HODETNUW-DQXavjl4.js +1 -0
  145. package/dist/client/assets/fold-vertical-BNQMJ6gu.js +1 -0
  146. package/dist/client/assets/folder-git-2-6ON-nxul.js +1 -0
  147. package/dist/client/assets/folder-open-Rja0vZjv.js +1 -0
  148. package/dist/client/assets/folder-plus-CfJ5c8wa.js +1 -0
  149. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-CsDp8eOV.js → ganttDiagram-EL5Y4UJY-Cj0Kstgh.js} +2 -2
  150. package/dist/client/assets/{getDiffFileInput-y6l8uCrc.js → getDiffFileInput-XUe1xsym.js} +2 -2
  151. package/dist/client/assets/git-branch-BuWXMpmq.js +1 -0
  152. package/dist/client/assets/{gitGraph-4MIJSDKK-ByZ8Ddcu.js → gitGraph-4MIJSDKK-C84uaaYZ.js} +1 -1
  153. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-QkPoZOxP.js → gitGraphDiagram-WWUBYQGX-CvyimLfZ.js} +2 -2
  154. package/dist/client/assets/grip-vertical-qjSy6wXX.js +1 -0
  155. package/dist/client/assets/{guideRunStore-Ca6LGvkb.js → guideRunStore-DwmmS8D0.js} +2 -2
  156. package/dist/client/assets/hard-drive-DAxFba08.js +1 -0
  157. package/dist/client/assets/history-CrY611k2.js +1 -0
  158. package/dist/client/assets/house-CKS51Vx8.js +1 -0
  159. package/dist/client/assets/{htmlRender-Bs_dTcPz.js → htmlRender-DRfZ8nFp.js} +2 -2
  160. package/dist/client/assets/index-G0rP4C-v.js +3 -0
  161. package/dist/client/assets/{info-A6RAGUB7-DWgAQmsU.js → info-A6RAGUB7-AXJa674d.js} +1 -1
  162. package/dist/client/assets/{infoDiagram-27XIBGKW-DqBsTg-0.js → infoDiagram-27XIBGKW-CgaIIar7.js} +2 -2
  163. package/dist/client/assets/{input-group-13zF6rZl.js → input-group-DIOgVvbV.js} +2 -2
  164. package/dist/client/assets/{input-BOT1WFGI.js → input-u5qjnfMr.js} +2 -2
  165. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-DhvmZSIn.js → ishikawaDiagram-5VMMS53U-DSDzMD_t.js} +2 -2
  166. package/dist/client/assets/{journeyDiagram-3NMN7TZE-sBAsW8ZW.js → journeyDiagram-3NMN7TZE-Be6o5a7O.js} +2 -2
  167. package/dist/client/assets/{kanban-definition-UXKFOSKX-7pB8050L.js → kanban-definition-UXKFOSKX-Fpr0ne16.js} +2 -2
  168. package/dist/client/assets/kbd-D4mDfHPa.js +2 -0
  169. package/dist/client/assets/{keybindings-B4uuYLfE.js → keybindings-CzL-fWkh.js} +2 -2
  170. package/dist/client/assets/keyboard-Y7zJXIRo.js +1 -0
  171. package/dist/client/assets/{lazyRouteComponent-C2UuNVTE.js → lazyRouteComponent-dLOOuQ-r.js} +2 -2
  172. package/dist/client/assets/{line-CYcVbD9r.js → line-BXhbrPh0.js} +2 -2
  173. package/dist/client/assets/link-CbhoiCa8.js +1 -0
  174. package/dist/client/assets/{link-DnyZixWB.js → link-YLDgrmSN.js} +2 -2
  175. package/dist/client/assets/{linkedPrompt-Cjzkkr18.js → linkedPrompt-E32o3H76.js} +2 -2
  176. package/dist/client/assets/list-Cq4wtMwR.js +1 -0
  177. package/dist/client/assets/main-D9nJEeym.css +2 -0
  178. package/dist/client/assets/main-D9z9rMK1.js +27 -0
  179. package/dist/client/assets/{mediaReference-DCRMHOD7.js → mediaReference-C-grVzJf.js} +2 -2
  180. package/dist/client/assets/{mediaSource-C-YyAgza.js → mediaSource-CxVHZYDj.js} +2 -2
  181. package/dist/client/assets/{mermaid-parser.core-CUhkd3Km.js → mermaid-parser.core-BFPy42Wg.js} +4 -4
  182. package/dist/client/assets/{mermaid.core-7L34oYGP.js → mermaid.core-zK2u82e-.js} +5 -5
  183. package/dist/client/assets/message-circle-question-mark-BwzHSg4C.js +1 -0
  184. package/dist/client/assets/message-square-DcSgYDZ6.js +1 -0
  185. package/dist/client/assets/message-square-dashed-Cu56tC0F.js +1 -0
  186. package/dist/client/assets/{mindmap-definition-YA3MSWOX-CpfzOIsM.js → mindmap-definition-YA3MSWOX-RzkTvFrT.js} +2 -2
  187. package/dist/client/assets/mouse-pointer-2-DxhF1Woc.js +1 -0
  188. package/dist/client/assets/number-field-BLz8W5SU.js +2 -0
  189. package/dist/client/assets/{observeResize-CK9qVTLF.js → observeResize-WQaFQjbx.js} +2 -2
  190. package/dist/client/assets/{onboarding-DWVdcMTo.js → onboarding-DNafmm6s.js} +2 -2
  191. package/dist/client/assets/{openFileInPreview-DsWLDsnf.js → openFileInPreview-l6IXWIxV.js} +2 -2
  192. package/dist/client/assets/{p4ProjectFile-DVeZFEli.js → p4ProjectFile-BzCYJ8I-.js} +2 -2
  193. package/dist/client/assets/{packet-AYTQ26CC-TJIgXg7Z.js → packet-AYTQ26CC-rDYSbNWh.js} +1 -1
  194. package/dist/client/assets/{pair-Ds7MhGzA.js → pair-nG9A6oxp.js} +2 -2
  195. package/dist/client/assets/palette-B79srcx1.js +1 -0
  196. package/dist/client/assets/panel-left-Bp59PK2R.js +1 -0
  197. package/dist/client/assets/{panel-tab-close-button-CeVf2Cp1.js → panel-tab-close-button-B2GW1bDy.js} +2 -2
  198. package/dist/client/assets/panels-top-left-CC3HCiIs.js +1 -0
  199. package/dist/client/assets/{pegDiagram-XKGWAZYB-BWjyJv0r.js → pegDiagram-XKGWAZYB-8wodyYDi.js} +2 -2
  200. package/dist/client/assets/{phoneViewer-4yzlTfRU.js → phoneViewer-Bei8FsYJ.js} +2 -2
  201. package/dist/client/assets/{pie-WAS4IAKB-DI1xrBNC.js → pie-WAS4IAKB-Ce0_zpeP.js} +1 -1
  202. package/dist/client/assets/{pieDiagram-E7YTZNPT-D5BJ4dMD.js → pieDiagram-E7YTZNPT-C3QJYWCY.js} +2 -2
  203. package/dist/client/assets/{pierre-icons-C4_Is1e6.js → pierre-icons-CsjmRq9p.js} +2 -2
  204. package/dist/client/assets/popover-6BYEGLLK.js +2 -0
  205. package/dist/client/assets/{preview-BXSjnvc2.js → preview-BpTu6A2K.js} +2 -2
  206. package/dist/client/assets/{preview-ChiUlq6M.js → preview-DFDpDpup.js} +2 -2
  207. package/dist/client/assets/{previewMiniPlayerStore-BWBB4WZZ.js → previewMiniPlayerStore-BfMwexwO.js} +2 -2
  208. package/dist/client/assets/primary-Cc8Am8Ju.js +2 -0
  209. package/dist/client/assets/primaryCloudLinkState-N7pLty-_.js +2 -0
  210. package/dist/client/assets/{projectFilesQueryState-DLmHVuBp.js → projectFilesQueryState-CrGsc81w.js} +2 -2
  211. package/dist/client/assets/projectScriptEditor-RR3KkKhh.js +2 -0
  212. package/dist/client/assets/{pullRequestDetail.logic-CiIqeGLs.js → pullRequestDetail.logic-CE7fVOsp.js} +4 -4
  213. package/dist/client/assets/{pullRequestReviewStore-Ckm9o--D.js → pullRequestReviewStore-BHEIYvsP.js} +2 -2
  214. package/dist/client/assets/pullRequests-KhjrMCa0.js +2 -0
  215. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-USH3mFeD.js → quadrantDiagram-AXDQQJYC-Cqx4Dcqi.js} +2 -2
  216. package/dist/client/assets/queries-Cn1FJB1_.js +2 -0
  217. package/dist/client/assets/{query-DG-FU00d.js → query-CK8MOmXr.js} +2 -2
  218. package/dist/client/assets/{radar-RG4KPBEZ-BgwqseQY.js → radar-RG4KPBEZ-DsccxBWq.js} +1 -1
  219. package/dist/client/assets/radio-group-CM6Ra-QS.js +2 -0
  220. package/dist/client/assets/{railroad-74A4TZTK-lU1hozFq.js → railroad-74A4TZTK-B-UN2mSQ.js} +1 -1
  221. package/dist/client/assets/railroad-abnf-HS5TGJTU-CIxA0Vp4.js +1 -0
  222. package/dist/client/assets/railroad-ebnf-LZEXJU2U-Czs81Kdn.js +1 -0
  223. package/dist/client/assets/railroad-peg-WCYAUIDC-B7O8OPsa.js +1 -0
  224. package/dist/client/assets/{railroadDiagram-O6MQD6OU-BX2DBjFX.js → railroadDiagram-O6MQD6OU-B_PdDy5r.js} +2 -2
  225. package/dist/client/assets/{renderScheduler-e5LS9_r8.js → renderScheduler-D1ml_j--.js} +2 -2
  226. package/dist/client/assets/{requirementDiagram-BXWQKSXE-Bp2BwkCA.js → requirementDiagram-BXWQKSXE-CKZ6HpQu.js} +2 -2
  227. package/dist/client/assets/{rightPanelStore-Dnc28mSJ.js → rightPanelStore-6LLb3GY0.js} +2 -2
  228. package/dist/client/assets/rotate-ccw-dcahmZQ2.js +1 -0
  229. package/dist/client/assets/rotate-cw-CIep6yNT.js +1 -0
  230. package/dist/client/assets/runtime-BVgeNXTV.js +2 -0
  231. package/dist/client/assets/runtime-CCr9UADV.js +6 -0
  232. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-BklNNjEB.js → sankeyDiagram-P5KCCOFB-BLF-VPcj.js} +2 -2
  233. package/dist/client/assets/scheduledTasksSettings.logic-ozIaTRfT.js +3 -0
  234. package/dist/client/assets/{scroll-area-Cj3OF_L_.js → scroll-area-CsrtHuL8.js} +2 -2
  235. package/dist/client/assets/{select-BDMo6Fqt.js → select-BiARKKgd.js} +2 -2
  236. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-ufTHSg4p.js → sequenceDiagram-WJ2MYXX4-BpJGkNAx.js} +2 -2
  237. package/dist/client/assets/{server-DNo9AqHW.js → server-B26doYv6.js} +2 -2
  238. package/dist/client/assets/session-CQXL-cTI.js +2 -0
  239. package/dist/client/assets/session-logic-C0mrkZ0j.js +13 -0
  240. package/dist/client/assets/settings-2-C2dIdVBr.js +1 -0
  241. package/dist/client/assets/{settings-DxGY3RT5.js → settings-B5Dj0jhP.js} +2 -2
  242. package/dist/client/assets/settings-DiBtchmK.js +1 -0
  243. package/dist/client/assets/settings.appearance-Di8HZa2Q.js +2 -0
  244. package/dist/client/assets/settings.archived-By34XjbG.js +2 -0
  245. package/dist/client/assets/settings.computer-use-DuW-mXPO.js +2 -0
  246. package/dist/client/assets/settings.connections-BJuKrJhl.js +2 -0
  247. package/dist/client/assets/settings.decisions-BO8hfyYm.js +2 -0
  248. package/dist/client/assets/{settings.diagnostics-ByUhN_HC.js → settings.diagnostics-DSw1QN-I.js} +2 -2
  249. package/dist/client/assets/settings.general-RyWWgxqp.js +2 -0
  250. package/dist/client/assets/settings.integrations--N8SMmw7.js +2 -0
  251. package/dist/client/assets/{settings.keybindings-CITYXalz.js → settings.keybindings-BeQmUtKv.js} +2 -2
  252. package/dist/client/assets/{settings.open-source-licenses-CTznEYnQ.js → settings.open-source-licenses-BmgFSigO.js} +2 -2
  253. package/dist/client/assets/settings.projects--jLA2A5b.js +4 -0
  254. package/dist/client/assets/settings.providers-Cvt1-bmr.js +3 -0
  255. package/dist/client/assets/settings.scheduled-tasks-D5IG4nj_.js +2 -0
  256. package/dist/client/assets/settings.snap-shot-CUZNOX9M.js +2 -0
  257. package/dist/client/assets/{settings.source-control-BlHoYUC0.js → settings.source-control-R63Z9kEM.js} +2 -2
  258. package/dist/client/assets/{settings.storage-C4lRhJsq.js → settings.storage-J1kthey9.js} +2 -2
  259. package/dist/client/assets/settingsLayout-BzyY4qHt.js +3 -0
  260. package/dist/client/assets/shield-question-mark-l31p7uuJ.js +1 -0
  261. package/dist/client/assets/{sidebar-Bulbb3cX.js → sidebar-Dj0htG-5.js} +2 -2
  262. package/dist/client/assets/{sidebarProjectGrouping-DEvzxecx.js → sidebarProjectGrouping-DxzT7QCQ.js} +2 -2
  263. package/dist/client/assets/{skeleton-BFPHmDcq.js → skeleton-CtSxs1y1.js} +2 -2
  264. package/dist/client/assets/{sortable.esm-CHiRbsvI.js → sortable.esm-n8ce5zjO.js} +2 -2
  265. package/dist/client/assets/{sourceControl-DfhPxa0l.js → sourceControl-C3RSledt.js} +2 -2
  266. package/dist/client/assets/{spinner-rP6J82Of.js → spinner-BXr4m38K.js} +2 -2
  267. package/dist/client/assets/square-pen-CxvvUOOt.js +1 -0
  268. package/dist/client/assets/{standalone-page-BkHTM3MP.js → standalone-page-DSQDdNcR.js} +2 -2
  269. package/dist/client/assets/{stateDiagram-D77RDMKH-UnviM1_a.js → stateDiagram-D77RDMKH-DFGb4Fx3.js} +2 -2
  270. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-BFcRJjAO.js +2 -0
  271. package/dist/client/assets/{swimlanes-42K2YHIH-CpD6LDbC.js → swimlanes-42K2YHIH-D0z9osG6.js} +2 -2
  272. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-B7z2b1Qv.js +9 -0
  273. package/dist/client/assets/{terminalSessions-C9u_KQdo.js → terminalSessions-3aynRXX1.js} +2 -2
  274. package/dist/client/assets/text-search-DsadxNJw.js +1 -0
  275. package/dist/client/assets/{textarea-D7qN_9_U.js → textarea-DZLyhzuZ.js} +2 -2
  276. package/dist/client/assets/{themePalette-au2ZXbqB.js → themePalette-BZeqG2Hu.js} +3 -3
  277. package/dist/client/assets/threadSort-BvhI6zOp.js +2 -0
  278. package/dist/client/assets/{timeline-definition-24CTP7MA-CNy-4Mtq.js → timeline-definition-24CTP7MA-oHM5IS4i.js} +2 -2
  279. package/dist/client/assets/toast-Bm36EaG6.js +2 -0
  280. package/dist/client/assets/{toggle-4i71sOFB.js → toggle-BzIEPTf7.js} +2 -2
  281. package/dist/client/assets/{toggle-group-BtpeJU3C.js → toggle-group-_C7nJPTT.js} +2 -2
  282. package/dist/client/assets/tooltip-Df-4YKs5.js +2 -0
  283. package/dist/client/assets/{treeView-Q6P3EWNA-fz73DkUg.js → treeView-Q6P3EWNA-ONHv8oqx.js} +1 -1
  284. package/dist/client/assets/{treemap-WGGIJYW6-CHp0lk61.js → treemap-WGGIJYW6-Go2hwkyn.js} +1 -1
  285. package/dist/client/assets/unfold-vertical--twzQtvn.js +1 -0
  286. package/dist/client/assets/{usage-BoYlRHNx.js → usage-B26GT0RK.js} +2 -2
  287. package/dist/client/assets/{usageAccess-BmfDNhp2.js → usageAccess-BNLOTFbF.js} +2 -2
  288. package/dist/client/assets/{usageFormat-DdjdHqj5.js → usageFormat-DKCO_wk0.js} +2 -2
  289. package/dist/client/assets/{usageShortcuts-RpypNfqZ.js → usageShortcuts-DxLRXv0W.js} +2 -2
  290. package/dist/client/assets/{use-atom-command-Bc7LgQy1.js → use-atom-command-CiEeUGsC.js} +2 -2
  291. package/dist/client/assets/{useAriaLabelledBy-B_3SmrJo.js → useAriaLabelledBy-CJjXf8Fd.js} +2 -2
  292. package/dist/client/assets/useHandleNewThread-DTz3ztCG.js +2 -0
  293. package/dist/client/assets/{useLocation-DaTcl6iI.js → useLocation-9axGTsrg.js} +2 -2
  294. package/dist/client/assets/useNavigate-BK_XZ1It.js +2 -0
  295. package/dist/client/assets/{useNavigateBack-C43_t49N.js → useNavigateBack-AIHPN0Oo.js} +2 -2
  296. package/dist/client/assets/{useParams-s9hrFQQQ.js → useParams-CCV3vN4E.js} +2 -2
  297. package/dist/client/assets/{usePermissionStatus-CCpQkKk1.js → usePermissionStatus-BnBF7CdE.js} +2 -2
  298. package/dist/client/assets/usePullRequestActions-aKrHzIiJ.js +3 -0
  299. package/dist/client/assets/{useRegisterFieldControl-BVraoamc.js → useRegisterFieldControl-Daf1iBkI.js} +2 -2
  300. package/dist/client/assets/useScopedModelAvailability-IKTxpeQL.js +2 -0
  301. package/dist/client/assets/useSettings-CckatJFa.js +3 -0
  302. package/dist/client/assets/{useT3ConnectAuthPrompt-D3ARnr92.js → useT3ConnectAuthPrompt-CK8il-7e.js} +2 -2
  303. package/dist/client/assets/utils-DmS758az.js +37 -0
  304. package/dist/client/assets/vcsRefInvalidation-lkYjTxah.js +2 -0
  305. package/dist/client/assets/{vennDiagram-4TSXK5OY-BBpGz6rf.js → vennDiagram-4TSXK5OY-BwVRZPOj.js} +2 -2
  306. package/dist/client/assets/{wardley-WFR3VGLG-M4Al1qCV.js → wardley-WFR3VGLG-CYl4h3U-.js} +1 -1
  307. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-V-_mOkU8.js → wardleyDiagram-VM6X3IG4-yHMYVGhg.js} +2 -2
  308. package/dist/client/assets/{welcome-Bok5fRqT.js → welcome-CGBWwWzE.js} +2 -2
  309. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-CZOR99Bj.js → xychartDiagram-S5SC5T6Z-Td7MQ_xN.js} +2 -2
  310. package/dist/client/index.html +1 -1
  311. package/package.json +1 -1
  312. package/dist/AcpMcpStdioBridge-Ch5bMyss.mjs +0 -4
  313. package/dist/client/assets/ChatGptUsageButton-GxPReM3u.js +0 -2
  314. package/dist/client/assets/ChatMarkdown-DOdrk8tK.js +0 -65
  315. package/dist/client/assets/CodexSetupSection.logic-BpefaM8S.js +0 -2
  316. package/dist/client/assets/DevicePanel-wE6eEt9P.js +0 -2
  317. package/dist/client/assets/DiffFileTree-D3P47wbG.js +0 -2
  318. package/dist/client/assets/DiffPanel-cvlTVhB4.js +0 -2
  319. package/dist/client/assets/ProjectDefaultsSettings-Cu80XFdb.js +0 -2
  320. package/dist/client/assets/ProjectIconPickerDialog-Dwmv78OH.js +0 -2
  321. package/dist/client/assets/ProviderModelPicker-riIGf-PI.js +0 -2
  322. package/dist/client/assets/ScheduledTasksSettings-Cp8h_lNS.js +0 -4
  323. package/dist/client/assets/ScopedSwitch-CLAFXjj6.js +0 -2
  324. package/dist/client/assets/ThemeEditorPanel-BBkly3jP.js +0 -5
  325. package/dist/client/assets/WorkspaceBreadcrumb-fx0ZD7ay.js +0 -2
  326. package/dist/client/assets/WorkspacePageContainer-DFsaHi02.js +0 -2
  327. package/dist/client/assets/_chat-BerxDjpp.js +0 -58
  328. package/dist/client/assets/_chat.pull-requests-BwpBKnt3.js +0 -2
  329. package/dist/client/assets/app-window-CVIo0C1R.js +0 -2
  330. package/dist/client/assets/architecture-7GRP2DOG-CT4QCEL3.js +0 -1
  331. package/dist/client/assets/arrow-left-BiKrB-pT.js +0 -1
  332. package/dist/client/assets/arrow-right-DWAwZU0q.js +0 -1
  333. package/dist/client/assets/arrow-up-down-CfYH5v22.js +0 -1
  334. package/dist/client/assets/assets-DwywdbuJ.js +0 -2
  335. package/dist/client/assets/bell-C3RUvq1T.js +0 -1
  336. package/dist/client/assets/blocks-CoLUV11Q.js +0 -1
  337. package/dist/client/assets/bot-CjcO3F5G.js +0 -1
  338. package/dist/client/assets/brain-B_3rxsLd.js +0 -2
  339. package/dist/client/assets/calendar-clock-CJyS1C-x.js +0 -1
  340. package/dist/client/assets/channel-kQEwHVv9.js +0 -2
  341. package/dist/client/assets/chart-no-axes-column-B3ZqbY05.js +0 -1
  342. package/dist/client/assets/checkbox-Cw_SXlJ5.js +0 -2
  343. package/dist/client/assets/chromium-CvI58Z0o.js +0 -2
  344. package/dist/client/assets/classDiagram-ZZMXUADV-BO_GIPO1.js +0 -2
  345. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BO_GIPO1.js +0 -2
  346. package/dist/client/assets/corner-left-up-D653FjvK.js +0 -1
  347. package/dist/client/assets/device-DrIICsXu.js +0 -2
  348. package/dist/client/assets/download-CNXPbBhc.js +0 -1
  349. package/dist/client/assets/dynamic-BRlOHH6g.js +0 -3
  350. package/dist/client/assets/earth-C1f0Qxwi.js +0 -1
  351. package/dist/client/assets/ellipsis-0J7zX441.js +0 -1
  352. package/dist/client/assets/entities-yblphBg3.js +0 -2
  353. package/dist/client/assets/eventmodeling-NTZA5JFV-bjJqzJYE.js +0 -1
  354. package/dist/client/assets/eye-CmsLgU-5.js +0 -1
  355. package/dist/client/assets/file-search-ClaIV60V.js +0 -1
  356. package/dist/client/assets/flowDiagram-HODETNUW-CsPXFMK4.js +0 -1
  357. package/dist/client/assets/fold-vertical-BMLbHh0a.js +0 -2
  358. package/dist/client/assets/folder-git-2-BxqGR5ht.js +0 -2
  359. package/dist/client/assets/folder-open-gQZmKQ4n.js +0 -1
  360. package/dist/client/assets/folder-plus-BVmedEeH.js +0 -1
  361. package/dist/client/assets/git-branch-Ba9jLbPu.js +0 -1
  362. package/dist/client/assets/grip-vertical-BmIJSASv.js +0 -1
  363. package/dist/client/assets/hard-drive-hWUfbbG9.js +0 -1
  364. package/dist/client/assets/history-jvN7Bdkc.js +0 -1
  365. package/dist/client/assets/house-ozmwce4p.js +0 -1
  366. package/dist/client/assets/index-FZqrCEhr.js +0 -3
  367. package/dist/client/assets/kbd-BR8-VeaN.js +0 -2
  368. package/dist/client/assets/keyboard-_YjrW4PX.js +0 -1
  369. package/dist/client/assets/link-BcMcYjHb.js +0 -1
  370. package/dist/client/assets/list-DEjg_Q5H.js +0 -1
  371. package/dist/client/assets/main-BQLZB-ZD.css +0 -2
  372. package/dist/client/assets/main-Ch0n0whg.js +0 -26
  373. package/dist/client/assets/message-circle-question-mark-DzWFFMDp.js +0 -1
  374. package/dist/client/assets/message-square-BqGKFtP8.js +0 -1
  375. package/dist/client/assets/message-square-dashed-FPkUUYSB.js +0 -1
  376. package/dist/client/assets/mouse-pointer-2-DbBU41il.js +0 -2
  377. package/dist/client/assets/number-field-DsVu9T6C.js +0 -2
  378. package/dist/client/assets/palette-JCVMAFVd.js +0 -1
  379. package/dist/client/assets/panel-left-STqObAvQ.js +0 -1
  380. package/dist/client/assets/panels-top-left-B90U_rdS.js +0 -1
  381. package/dist/client/assets/popover-UOfX8iZ4.js +0 -2
  382. package/dist/client/assets/primary-BubJSDIO.js +0 -2
  383. package/dist/client/assets/primaryCloudLinkState-CFnZkCiA.js +0 -2
  384. package/dist/client/assets/projectScriptEditor-_TwHfcHY.js +0 -2
  385. package/dist/client/assets/pullRequests-C0Gr2876.js +0 -2
  386. package/dist/client/assets/queries-DbiotSzd.js +0 -2
  387. package/dist/client/assets/radio-group-DhxCP5q0.js +0 -2
  388. package/dist/client/assets/railroad-abnf-HS5TGJTU-DRzBu_EH.js +0 -1
  389. package/dist/client/assets/railroad-ebnf-LZEXJU2U-BuQh-rCG.js +0 -1
  390. package/dist/client/assets/railroad-peg-WCYAUIDC-DH1f3-__.js +0 -1
  391. package/dist/client/assets/rotate-ccw-98iN1bsB.js +0 -1
  392. package/dist/client/assets/rotate-cw-DdW3sRx4.js +0 -1
  393. package/dist/client/assets/runtime-BUB2ex14.js +0 -2
  394. package/dist/client/assets/runtime-BoEmkhOe.js +0 -6
  395. package/dist/client/assets/scheduledTasksSettings.logic-Bk1lq8Ri.js +0 -3
  396. package/dist/client/assets/session-CyPECDtf.js +0 -2
  397. package/dist/client/assets/session-logic-BBZj8pNB.js +0 -13
  398. package/dist/client/assets/settings-2-C-KVP40_.js +0 -1
  399. package/dist/client/assets/settings-D62zpRkD.js +0 -1
  400. package/dist/client/assets/settings.appearance-C-MzWdtB.js +0 -2
  401. package/dist/client/assets/settings.archived-BZ0wU-2j.js +0 -2
  402. package/dist/client/assets/settings.connections-B-h_wi7q.js +0 -2
  403. package/dist/client/assets/settings.general-DodDmaXX.js +0 -2
  404. package/dist/client/assets/settings.integrations-Dq9yt9c-.js +0 -2
  405. package/dist/client/assets/settings.projects-Bj9oI9dE.js +0 -4
  406. package/dist/client/assets/settings.providers-BPb4TbH8.js +0 -3
  407. package/dist/client/assets/settings.scheduled-tasks-TxnTVd7r.js +0 -2
  408. package/dist/client/assets/settings.snap-shot-DZaxUAEE.js +0 -2
  409. package/dist/client/assets/settingsLayout-De_r3pyr.js +0 -3
  410. package/dist/client/assets/shield-question-mark-B5w7j5aC.js +0 -1
  411. package/dist/client/assets/square-pen-DYBPSam-.js +0 -1
  412. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CJW4DyfF.js +0 -2
  413. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-Buz7ig8b.js +0 -9
  414. package/dist/client/assets/text-search-DrO_MCzY.js +0 -1
  415. package/dist/client/assets/threadSort-R2JvSO3D.js +0 -2
  416. package/dist/client/assets/toast-CIGvRti2.js +0 -2
  417. package/dist/client/assets/tooltip-Ciaezkl4.js +0 -2
  418. package/dist/client/assets/unfold-vertical-BLnEY4R7.js +0 -2
  419. package/dist/client/assets/useHandleNewThread-Csguf2GC.js +0 -2
  420. package/dist/client/assets/useNavigate-CnhAAl0Z.js +0 -2
  421. package/dist/client/assets/usePullRequestActions-CiF7znkV.js +0 -3
  422. package/dist/client/assets/useScopedModelAvailability-kFNRNx2C.js +0 -2
  423. package/dist/client/assets/useSettings-CNd8OM7A.js +0 -3
  424. package/dist/client/assets/utils-geC9CGP4.js +0 -37
  425. package/dist/client/assets/vcsRefInvalidation-DMpp-BNA.js +0 -2
@@ -1,2 +1,2 @@
1
- import{Al as e,Tb as t,cx as n}from"./utils-geC9CGP4.js";import{F as r,L as i,R as a,z as o}from"./useSettings-CNd8OM7A.js";function s(e){return e!==`separate`}function c(e,t=`repository`){return e?t===`repository_path`?`repository_path`:`repository`:`separate`}var l=`t3code:last-enabled-project-grouping-mode`;function u(){try{return localStorage.getItem(l)===`repository_path`?`repository_path`:`repository`}catch{return`repository`}}function d(e){if(e!==`separate`)try{localStorage.setItem(l,e)}catch{}}function f(t){return!n(t.backgroundActivity,e.backgroundActivity)||t.backgroundActivityProfile!==e.backgroundActivityProfile||!n(t.automaticGitFetchInterval,e.automaticGitFetchInterval)||!n(t.providerHealthRefreshInterval,e.providerHealthRefreshInterval)}function p(t){return[...t.fontFamilySans!==e.fontFamilySans||t.fontSizeInterface!==e.fontSizeInterface?[`Interface font`]:[],...t.fontFamilyComposer!==e.fontFamilyComposer||t.fontSizePrompt!==e.fontSizePrompt?[`Prompt font`]:[],...t.fontFamilyCode!==e.fontFamilyCode||t.fontSizeCode!==e.fontSizeCode?[`Code font`]:[],...t.fontFamilyTerminal!==e.fontFamilyTerminal||t.fontSizeTerminal!==e.fontSizeTerminal?[`Terminal font`]:[]]}function m(e,t){return e._tag===t._tag?e._tag===`fill`||t._tag===`fill`?!0:e.width!==t.width||e.height!==t.height?!1:e._tag===`preset`&&t._tag===`preset`?e.presetId===t.presetId:!0:!1}function h(t){return[...m(t.browserDefaultViewport,e.browserDefaultViewport)?[]:[`Browser viewport`],...t.browserDefaultZoomFactor===e.browserDefaultZoomFactor?[]:[`Browser zoom`],...t.browserDefaultAppearance===e.browserDefaultAppearance?[]:[`Browser appearance`],...t.browserRecordingFrameRate===e.browserRecordingFrameRate?[]:[`Recording frame rate`],...t.browserRecordingShowKeyPresses?[`Recording key presses`]:[],...t.browserRecordingShowMousePresses?[`Recording mouse presses`]:[],...t.browserLinkTarget===e.browserLinkTarget?[]:[`Open links in`],...t.browserAutoShowFloatingPreview===e.browserAutoShowFloatingPreview?[]:[`Floating preview`]]}function g(e){let t=o(e),n=i({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}});return n.profile===`custom`?`advanced`:n.profile}function _(e,t){let n=a(e);return{schemaVersion:1,profile:`custom`,baseProfile:t,overrides:n.profile===`custom`?n.overrides:{}}}function v(e){return{providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}function y(e){return Math.round(t(e)/1e3)}function b(e,t=0){return e===null||!Number.isFinite(e)?t:Math.max(t,Math.round(e))}function x(e,t,n){let i={automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery,...n};for(let[e,t]of Object.entries(i))t===void 0&&delete i[e];return{backgroundActivity:{schemaVersion:1,profile:`custom`,baseProfile:r(e),overrides:i}}}export{h as a,s as c,u as d,d as f,y as i,b as l,_ as n,p as o,g as p,v as r,f as s,x as t,c as u};
2
- //# sourceMappingURL=SettingsPanels.logic-Dn2Jcxyy.js.map
1
+ import{Al as e,Db as t,ux as n}from"./utils-DmS758az.js";import{F as r,L as i,R as a,z as o}from"./useSettings-CckatJFa.js";function s(e){return e!==`separate`}function c(e,t=`repository`){return e?t===`repository_path`?`repository_path`:`repository`:`separate`}var l=`t3code:last-enabled-project-grouping-mode`;function u(){try{return localStorage.getItem(l)===`repository_path`?`repository_path`:`repository`}catch{return`repository`}}function d(e){if(e!==`separate`)try{localStorage.setItem(l,e)}catch{}}function f(t){return!n(t.backgroundActivity,e.backgroundActivity)||t.backgroundActivityProfile!==e.backgroundActivityProfile||!n(t.automaticGitFetchInterval,e.automaticGitFetchInterval)||!n(t.providerHealthRefreshInterval,e.providerHealthRefreshInterval)}function p(t){return[...t.fontFamilySans!==e.fontFamilySans||t.fontSizeInterface!==e.fontSizeInterface?[`Interface font`]:[],...t.fontFamilyComposer!==e.fontFamilyComposer||t.fontSizePrompt!==e.fontSizePrompt?[`Prompt font`]:[],...t.fontFamilyCode!==e.fontFamilyCode||t.fontSizeCode!==e.fontSizeCode?[`Code font`]:[],...t.fontFamilyTerminal!==e.fontFamilyTerminal||t.fontSizeTerminal!==e.fontSizeTerminal?[`Terminal font`]:[]]}function m(e,t){return e._tag===t._tag?e._tag===`fill`||t._tag===`fill`?!0:e.width!==t.width||e.height!==t.height?!1:e._tag===`preset`&&t._tag===`preset`?e.presetId===t.presetId:!0:!1}function h(t){return[...m(t.browserDefaultViewport,e.browserDefaultViewport)?[]:[`Browser viewport`],...t.browserDefaultZoomFactor===e.browserDefaultZoomFactor?[]:[`Browser zoom`],...t.browserDefaultAppearance===e.browserDefaultAppearance?[]:[`Browser appearance`],...t.browserRecordingFrameRate===e.browserRecordingFrameRate?[]:[`Recording frame rate`],...t.browserRecordingShowKeyPresses?[`Recording key presses`]:[],...t.browserRecordingShowMousePresses?[`Recording mouse presses`]:[],...t.browserLinkTarget===e.browserLinkTarget?[]:[`Open links in`],...t.browserAutoShowFloatingPreview===e.browserAutoShowFloatingPreview?[]:[`Floating preview`]]}function g(e){let t=o(e),n=i({schemaVersion:1,profile:`custom`,baseProfile:t.profile,overrides:{automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery}});return n.profile===`custom`?`advanced`:n.profile}function _(e,t){let n=a(e);return{schemaVersion:1,profile:`custom`,baseProfile:t,overrides:n.profile===`custom`?n.overrides:{}}}function v(e){return{providerInstances:{...e.settings.providerInstances,[e.instanceId]:e.instance},...e.textGenerationModelSelection===void 0?{}:{textGenerationModelSelection:e.textGenerationModelSelection}}}function y(e){return Math.round(t(e)/1e3)}function b(e,t=0){return e===null||!Number.isFinite(e)?t:Math.max(t,Math.round(e))}function x(e,t,n){let i={automaticGitFetchInterval:t.automaticGitFetchInterval,providerHealthRefreshInterval:t.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval,idleClientTtl:t.idleClientTtl,pauseWhenHostLocked:t.pauseWhenHostLocked,pauseWhenHostLowPower:t.pauseWhenHostLowPower,pauseWhenClientLowPower:t.pauseWhenClientLowPower,pauseWhenOnBattery:t.pauseWhenOnBattery,...n};for(let[e,t]of Object.entries(i))t===void 0&&delete i[e];return{backgroundActivity:{schemaVersion:1,profile:`custom`,baseProfile:r(e),overrides:i}}}export{h as a,s as c,u as d,d as f,y as i,b as l,_ as n,p as o,g as p,v as r,f as s,x as t,c as u};
2
+ //# sourceMappingURL=SettingsPanels.logic-DpdMN_lX.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Sx as t,ma as n,or as r}from"./utils-geC9CGP4.js";import{t as i}from"./useNavigate-CnhAAl0Z.js";import{t as a}from"./useLocation-DaTcl6iI.js";import{E as o}from"./useSettings-CNd8OM7A.js";import{n as s,r as c,t as l}from"./alert-DUQHh6vz.js";import{V as u,i as d,z as f}from"./settingsLayout-De_r3pyr.js";var p=t(),m=e(n(),1);function h(e){let t=(0,p.c)(42),{children:n,target:h,targetId:y,eligibleEnvironmentIds:b}=e,{selectScope:x,search:S}=f(),C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(C={from:`/settings`},t[0]=C):C=t[0];let w=i(C),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T={select:v},t[1]=T):T=t[1];let E=a(T),{environments:D}=o(),O=u(),k,A,j,M,N,P,F,I;if(t[2]!==n||t[3]!==b||t[4]!==D||t[5]!==O||t[6]!==w||t[7]!==E||t[8]!==S||t[9]!==x||t[10]!==h||t[11]!==y){let e=h===`checkout`?O.filter(e=>!S.project||e.projectKey===S.project).flatMap(_):h===`project`?O.map(g):h===`environment`?D.filter(e=>b===void 0||b.includes(e.environmentId)).map(e=>({label:D.some(t=>t.environmentId!==e.environmentId&&t.label===e.label)?`${e.label} · ${e.displayUrl||e.environmentId}`:e.label,search:{machine:e.environmentId}})):[{label:`Open all environments`,search:{}}];M=d,j=l,I=`status`,A=c,t[20]===n?F=t[21]:(F=(0,m.jsx)(`p`,{children:n}),t[20]=n,t[21]=F),k=s,N=`flex-wrap`;let i;t[22]!==w||t[23]!==E||t[24]!==x||t[25]!==y?(i=e=>(0,m.jsx)(r,{size:`sm-multiline`,variant:`outline`,className:`max-w-full break-all text-left`,onClick:()=>{y?w({to:E,search:()=>e.search,hash:y}):x(e.search)},children:e.label},JSON.stringify(e.search)),t[22]=w,t[23]=E,t[24]=x,t[25]=y,t[26]=i):i=t[26],P=e.map(i),t[2]=n,t[3]=b,t[4]=D,t[5]=O,t[6]=w,t[7]=E,t[8]=S,t[9]=x,t[10]=h,t[11]=y,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N,t[17]=P,t[18]=F,t[19]=I}else k=t[12],A=t[13],j=t[14],M=t[15],N=t[16],P=t[17],F=t[18],I=t[19];let L;t[27]!==k||t[28]!==N||t[29]!==P?(L=(0,m.jsx)(k,{className:N,children:P}),t[27]=k,t[28]=N,t[29]=P,t[30]=L):L=t[30];let R;t[31]!==A||t[32]!==F||t[33]!==L?(R=(0,m.jsxs)(A,{children:[F,L]}),t[31]=A,t[32]=F,t[33]=L,t[34]=R):R=t[34];let z;t[35]!==j||t[36]!==I||t[37]!==R?(z=(0,m.jsx)(j,{role:I,children:R}),t[35]=j,t[36]=I,t[37]=R,t[38]=z):z=t[38];let B;return t[39]!==M||t[40]!==z?(B=(0,m.jsx)(M,{children:z}),t[39]=M,t[40]=z,t[41]=B):B=t[41],B}function g(e){return{label:e.displayName,search:{project:e.projectKey}}}function _(e){return e.memberProjects.map(t=>({label:`${e.displayName} · ${t.environmentLabel??`Environment`} · ${t.workspaceRoot}`,search:{project:e.projectKey,machine:t.environmentId,checkout:t.physicalProjectKey}}))}function v(e){return e.pathname}export{h as t};
2
- //# sourceMappingURL=SettingsScopeNotice-CAaNSKvu.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{ma as t,or as n,wx as r}from"./utils-DmS758az.js";import{t as i}from"./useNavigate-BK_XZ1It.js";import{t as a}from"./useLocation-9axGTsrg.js";import{E as o}from"./useSettings-CckatJFa.js";import{n as s,r as c,t as l}from"./alert-yllEf0yh.js";import{V as u,i as d,z as f}from"./settingsLayout-BzyY4qHt.js";var p=r(),m=e(t(),1);function h(e){let t=(0,p.c)(42),{children:r,target:h,targetId:y,eligibleEnvironmentIds:b}=e,{selectScope:x,search:S}=f(),C;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(C={from:`/settings`},t[0]=C):C=t[0];let w=i(C),T;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(T={select:v},t[1]=T):T=t[1];let E=a(T),{environments:D}=o(),O=u(),k,A,j,M,N,P,F,I;if(t[2]!==r||t[3]!==b||t[4]!==D||t[5]!==O||t[6]!==w||t[7]!==E||t[8]!==S||t[9]!==x||t[10]!==h||t[11]!==y){let e=h===`checkout`?O.filter(e=>!S.project||e.projectKey===S.project).flatMap(_):h===`project`?O.map(g):h===`environment`?D.filter(e=>b===void 0||b.includes(e.environmentId)).map(e=>({label:D.some(t=>t.environmentId!==e.environmentId&&t.label===e.label)?`${e.label} · ${e.displayUrl||e.environmentId}`:e.label,search:{machine:e.environmentId}})):[{label:`Open all environments`,search:{}}];M=d,j=l,I=`status`,A=c,t[20]===r?F=t[21]:(F=(0,m.jsx)(`p`,{children:r}),t[20]=r,t[21]=F),k=s,N=`flex-wrap`;let i;t[22]!==w||t[23]!==E||t[24]!==x||t[25]!==y?(i=e=>(0,m.jsx)(n,{size:`sm-multiline`,variant:`outline`,className:`max-w-full break-all text-left`,onClick:()=>{y?w({to:E,search:()=>e.search,hash:y}):x(e.search)},children:e.label},JSON.stringify(e.search)),t[22]=w,t[23]=E,t[24]=x,t[25]=y,t[26]=i):i=t[26],P=e.map(i),t[2]=r,t[3]=b,t[4]=D,t[5]=O,t[6]=w,t[7]=E,t[8]=S,t[9]=x,t[10]=h,t[11]=y,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N,t[17]=P,t[18]=F,t[19]=I}else k=t[12],A=t[13],j=t[14],M=t[15],N=t[16],P=t[17],F=t[18],I=t[19];let L;t[27]!==k||t[28]!==N||t[29]!==P?(L=(0,m.jsx)(k,{className:N,children:P}),t[27]=k,t[28]=N,t[29]=P,t[30]=L):L=t[30];let R;t[31]!==A||t[32]!==F||t[33]!==L?(R=(0,m.jsxs)(A,{children:[F,L]}),t[31]=A,t[32]=F,t[33]=L,t[34]=R):R=t[34];let z;t[35]!==j||t[36]!==I||t[37]!==R?(z=(0,m.jsx)(j,{role:I,children:R}),t[35]=j,t[36]=I,t[37]=R,t[38]=z):z=t[38];let B;return t[39]!==M||t[40]!==z?(B=(0,m.jsx)(M,{children:z}),t[39]=M,t[40]=z,t[41]=B):B=t[41],B}function g(e){return{label:e.displayName,search:{project:e.projectKey}}}function _(e){return e.memberProjects.map(t=>({label:`${e.displayName} · ${t.environmentLabel??`Environment`} · ${t.workspaceRoot}`,search:{project:e.projectKey,machine:t.environmentId,checkout:t.physicalProjectKey}}))}function v(e){return e.pathname}export{h as t};
2
+ //# sourceMappingURL=SettingsScopeNotice-CdNfxmW3.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{$o as n,Go as r,Jo as i,Lo as a,Mb as o,Sx as s,Un as c,Vo as l,Wo as u,f_ as d,la as f,ma as p,or as m,oy as h,ps as g,t as _}from"./utils-geC9CGP4.js";import{t as v}from"./server-Le_hLOlf.js";import{t as y}from"./smartphone-zkhAIn1Q.js";import{D as b,F as x,L as S,O as C,U as w,d as T,f as E,h as D,m as O,pn as k,r as ee}from"./runtime-BoEmkhOe.js";import{i as A}from"./toast-CIGvRti2.js";import{t as j}from"./use-atom-command-Bc7LgQy1.js";import{t as M}from"./skeleton-BFPHmDcq.js";import{i as te,r as ne}from"./dist-D-bAcBTo.js";import{a as N,i as P,o as F,r as I,t as L}from"./empty-B3wHlMsI.js";import{n as re,r as ie,t as ae}from"./collapsible-CLujF6F7.js";import{Pa as oe}from"./main-Ch0n0whg.js";var R=e(f(),1),z=s(),B=e(t(),1),V=i(h(k,ee.contextEffect.pipe(d(e=>o(e,k))))),H=T(V),U=C(),W=x(V,{label:`web:managed-relay:deregister-environment`,scheduler:U,concurrency:{mode:`serial`,key:e=>e.accountId},execute:(e,t)=>E(t,e)}),G=r(g([])).pipe(u,n(`managed-relay:web:environments:null`)),K=r(g([])).pipe(u,n(`managed-relay:web:devices:null`));function se(){let e=(0,z.c)(14),t=l(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.environmentsAtom(t):G,e[0]=t,e[1]=n);let r=l(n),i;e[2]===r?i=e[3]:(i=D(r),e[2]=r,e[3]=i);let o=i,s,c;e[4]!==o.error||e[5]!==o.errorTraceId?(s=()=>{o.error&&console.error(`[t3-cloud] Relay environment listing failed`,{message:o.error,traceId:o.errorTraceId})},c=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=s,e[7]=c):(s=e[6],c=e[7]),(0,B.useEffect)(s,c);let u;e[8]===t?u=e[9]:(u=()=>{t&&H.refreshEnvironments(a,t)},e[8]=t,e[9]=u);let d=u,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}function q(){let e=(0,z.c)(14),t=l(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.devicesAtom(t):K,e[0]=t,e[1]=n);let r=l(n),i;e[2]===r?i=e[3]:(i=D(r),e[2]=r,e[3]=i);let o=i,s,c;e[4]!==o.error||e[5]!==o.errorTraceId?(s=()=>{o.error&&console.error(`[t3-cloud] Relay device listing failed`,{message:o.error,traceId:o.errorTraceId})},c=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=s,e[7]=c):(s=e[6],c=e[7]),(0,B.useEffect)(s,c);let u;e[8]===t?u=e[9]:(u=()=>{t&&H.refreshDevices(a,t)},e[8]=t,e[9]=u);let d=u,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}var ce=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),le=[[`notifyOnApproval`,`approvals`],[`notifyOnInput`,`input requests`],[`notifyOnCompletion`,`completions`],[`notifyOnFailure`,`failures`]];function ue(e){return`${e.platform===`android`?`Android`:e.iosMajorVersion===null?`iOS`:`iOS ${e.iosMajorVersion}`}${e.appVersion?` · P4 Code ${e.appVersion}`:``}`}function de(e){if(!e.notifications.enabled)return`Push notifications are disabled on this device.`;let t=le.flatMap(([t,n])=>e.notifications[t]?[n]:[]);return t.length>0?`Alerts enabled for ${t.join(`, `)}.`:`Push notifications are enabled, but no alert types are selected.`}function fe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Update time unavailable`:`Updated ${ce.format(t)}`}var J=e(p(),1);function Y(e){let t=(0,z.c)(18),{action:n,children:r,className:i,description:a,title:o}=e,s;t[0]===i?s=t[1]:(s=_(`w-full min-w-0 text-foreground`,i),t[0]=i,t[1]=s);let c;t[2]===o?c=t[3]:(c=(0,J.jsx)(`h2`,{className:`text-base leading-6 font-semibold`,children:o}),t[2]=o,t[3]=c);let l;t[4]===a?l=t[5]:(l=a?(0,J.jsx)(`p`,{className:`mt-1 max-w-[34rem] text-xs leading-4.5 text-muted-foreground sm:min-h-9`,children:a}):null,t[4]=a,t[5]=l);let u;t[6]!==c||t[7]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n?d=t[10]:(d=n?(0,J.jsx)(`div`,{className:`shrink-0`,children:n}):null,t[9]=n,t[10]=d);let f;t[11]!==u||t[12]!==d?(f=(0,J.jsxs)(`header`,{className:`flex flex-col gap-3 pb-4 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:pr-8`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;return t[14]!==r||t[15]!==s||t[16]!==f?(p=(0,J.jsxs)(`div`,{className:s,children:[f,r]}),t[14]=r,t[15]=s,t[16]=f,t[17]=p):p=t[17],p}function X(e){let t=(0,z.c)(7),{className:n,disabled:r,isPending:i,onClick:a}=e,o=r!==void 0&&r||i,s;t[0]===i?s=t[1]:(s=(0,J.jsx)(oe,{"aria-hidden":`true`,size:`sm`,refreshing:i}),t[0]=i,t[1]=s);let c;return t[2]!==n||t[3]!==a||t[4]!==o||t[5]!==s?(c=(0,J.jsxs)(m,{size:`sm`,variant:`outline`,className:n,disabled:o,onClick:a,children:[s,`Refresh`]}),t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c):c=t[6],c}function Z(e){let t=(0,z.c)(12),{children:n,className:r,icon:i}=e,a;t[0]===r?a=t[1]:(a=_(`border-t py-4 first:border-t-0`,r),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border bg-muted/32 text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]===n?s=t[5]:(s=(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:n}),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,J.jsx)(`li`,{className:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}var pe=[`primary`,`secondary`];function Q(e){let t=(0,z.c)(4),{enabled:n,label:r}=e,i=n?`success`:`outline`,a=n?`On`:`Off`,o;return t[0]!==r||t[1]!==i||t[2]!==a?(o=(0,J.jsxs)(c,{variant:i,children:[r,`: `,a]}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3],o}function me(e){let t=(0,z.c)(32),{device:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(y,{className:`size-4`}),t[0]=r):r=t[0];let i;t[1]===n.label?i=t[2]:(i=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=i);let a;t[3]===n?a=t[4]:(a=ue(n),t[3]=n,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`p`,{className:`text-xs leading-4.5 text-muted-foreground`,children:a}),t[5]=a,t[6]=o);let s;t[7]!==i||t[8]!==o?(s=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[i,o]}),t[7]=i,t[8]=o,t[9]=s):s=t[9];let c;t[10]===n.updatedAt?c=t[11]:(c=fe(n.updatedAt),t[10]=n.updatedAt,t[11]=c);let l;t[12]===c?l=t[13]:(l=(0,J.jsx)(`p`,{className:`shrink-0 text-2xs leading-4 text-muted-foreground/75`,children:c}),t[12]=c,t[13]=l);let u;t[14]!==s||t[15]!==l?(u=(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5 sm:flex-row sm:items-start sm:justify-between sm:gap-3`,children:[s,l]}),t[14]=s,t[15]=l,t[16]=u):u=t[16];let d;t[17]===n.notifications.enabled?d=t[18]:(d=(0,J.jsx)(Q,{enabled:n.notifications.enabled,label:`Push notifications`}),t[17]=n.notifications.enabled,t[18]=d);let f;t[19]===n.liveActivities.enabled?f=t[20]:(f=(0,J.jsx)(Q,{enabled:n.liveActivities.enabled,label:`Live Activities`}),t[19]=n.liveActivities.enabled,t[20]=f);let p;t[21]!==f||t[22]!==d?(p=(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[d,f]}),t[21]=f,t[22]=d,t[23]=p):p=t[23];let m;t[24]===n?m=t[25]:(m=de(n),t[24]=n,t[25]=m);let h;t[26]===m?h=t[27]:(h=(0,J.jsx)(`p`,{className:`mt-1.5 text-xs leading-4.5 text-muted-foreground/80`,children:m}),t[26]=m,t[27]=h);let g;return t[28]!==p||t[29]!==h||t[30]!==u?(g=(0,J.jsxs)(Z,{icon:r,children:[u,p,h]}),t[28]=p,t[29]=h,t[30]=u,t[31]=g):g=t[31],g}function he(){let e=(0,z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`div`,{"aria-label":`Loading mobile clients`,className:`divide-y border-t`,role:`status`,children:pe.map(ge)}),e[0]=t):t=e[0],t}function ge(e){return(0,J.jsx)(`div`,{className:`py-4`,children:(0,J.jsxs)(`div`,{className:`flex gap-3`,children:[(0,J.jsx)(M,{shape:`card`,className:`size-8 shrink-0`}),(0,J.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,J.jsx)(M,{className:`h-3.5 w-36`}),(0,J.jsx)(M,{className:`h-3 w-28`}),(0,J.jsxs)(`div`,{className:`flex gap-2`,children:[(0,J.jsx)(M,{className:`h-4.5 w-28`}),(0,J.jsx)(M,{className:`h-4.5 w-24`})]})]})]})},e)}function _e(){let e=(0,z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(y,{})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(L,{size:`compact`,children:[t,(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No mobile clients`}),(0,J.jsx)(I,{children:`Install P4 Code on your phone and sign in to P4 Connect to get push notifications and Live Activities.`})]})]}),e[1]=n):n=e[1],n}function ve(){let e=(0,z.c)(18),t=q(),n;e[0]===t.data?n=e[1]:(n=t.data??[],e[0]=t.data,e[1]=n);let r=n,i=!t.accountId||t.data===null&&!t.error,a=t.error!==null&&t.data===null,o;e[2]!==t.isPending||e[3]!==t.refresh?(o=(0,J.jsx)(X,{isPending:t.isPending,onClick:t.refresh}),e[2]=t.isPending,e[3]=t.refresh,e[4]=o):o=e[4];let s;e[5]!==t.error||e[6]!==t.refresh?(s=t.error?(0,J.jsxs)(`div`,{className:`mb-4 flex flex-col gap-3 border-t border-destructive/35 py-3 text-xs sm:flex-row sm:items-center sm:justify-between`,role:`alert`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load mobile clients`}),(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:t.error})]}),(0,J.jsx)(m,{size:`xs`,variant:`outline`,onClick:t.refresh,children:`Try again`})]}):null,e[5]=t.error,e[6]=t.refresh,e[7]=s):s=e[7];let c;e[8]!==r||e[9]!==a||e[10]!==i?(c=i?(0,J.jsx)(he,{}):a?null:r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(ye)}):(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsx)(_e,{})}),e[8]=r,e[9]=a,e[10]=i,e[11]=c):c=e[11];let l;e[12]!==s||e[13]!==c?(l=(0,J.jsxs)(`div`,{children:[s,c]}),e[12]=s,e[13]=c,e[14]=l):l=e[14];let u;return e[15]!==o||e[16]!==l?(u=(0,J.jsx)(Y,{title:`Mobile clients`,description:`Mobile devices that get notifications from your environments.`,action:o,children:l}),e[15]=o,e[16]=l,e[17]=u):u=e[17],u}function ye(e){return(0,J.jsx)(me,{device:e},e.deviceId)}var be=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`});function xe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Link date unavailable`:`Linked ${be.format(t)}`}function Se(e){return e.endpoint.providerKind===`cloudflare_tunnel`?`Managed tunnel`:`Activity publishing only`}function Ce(e){let t=(0,z.c)(46),{environment:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(v,{className:`size-4`}),t[0]=r):r=t[0];let i=e.confirmationOpen,a=e.onConfirmationChange,o;t[1]===n.label?o=t[2]:(o=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=o);let s;t[3]===n.linkedAt?s=t[4]:(s=xe(n.linkedAt),t[3]=n.linkedAt,t[4]=s);let c;t[5]===n?c=t[6]:(c=Se(n),t[5]=n,t[6]=c);let l;t[7]!==s||t[8]!==c?(l=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[s,` · `,c]}),t[7]=s,t[8]=c,t[9]=l):l=t[9];let u;t[10]!==o||t[11]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[o,l]}),t[10]=o,t[11]=l,t[12]=u):u=t[12];let d;t[13]===e.mutationPending?d=t[14]:(d=(0,J.jsx)(ie,{render:(0,J.jsx)(m,{size:`sm`,variant:`destructive-outline`,disabled:e.mutationPending,children:`Deregister`})}),t[13]=e.mutationPending,t[14]=d);let f;t[15]!==u||t[16]!==d?(f=(0,J.jsxs)(`div`,{className:`flex items-start gap-4`,children:[u,d]}),t[15]=u,t[16]=d,t[17]=f):f=t[17];let p=`Confirm deregistration of ${n.label}`,h;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,J.jsx)(`h4`,{className:`text-sm leading-4.5 font-semibold text-foreground`,children:`Deregister server`}),t[18]=h):h=t[18];let g;t[19]===n.label?g=t[20]:(g=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[`“`,n.label,`” will be removed from this account.`]}),t[19]=n.label,t[20]=g);let _;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(`p`,{className:`mt-4 max-w-xl text-xs leading-4.5 text-muted-foreground`,children:`P4 Connect access will be revoked, any managed tunnel will be removed, and a host space will become available. Local connections on your devices are not changed.`}),t[21]=_):_=t[21];let y;t[22]===e?y=t[23]:(y=()=>e.onConfirmationChange(!1),t[22]=e,t[23]=y);let b;t[24]!==e.mutationPending||t[25]!==y?(b=(0,J.jsx)(m,{size:`sm`,variant:`ghost`,disabled:e.mutationPending,onClick:y,children:`Cancel`}),t[24]=e.mutationPending,t[25]=y,t[26]=b):b=t[26];let x;t[27]!==n||t[28]!==e?(x=()=>e.onDeregister(n),t[27]=n,t[28]=e,t[29]=x):x=t[29];let S=e.mutationPending?`Deregistering…`:`Deregister`,C;t[30]!==e.mutationPending||t[31]!==x||t[32]!==S?(C=(0,J.jsx)(m,{size:`sm`,variant:`destructive`,disabled:e.mutationPending,onClick:x,children:S}),t[30]=e.mutationPending,t[31]=x,t[32]=S,t[33]=C):C=t[33];let w;t[34]!==b||t[35]!==C?(w=(0,J.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[b,C]}),t[34]=b,t[35]=C,t[36]=w):w=t[36];let T;t[37]!==p||t[38]!==g||t[39]!==w?(T=(0,J.jsx)(re,{children:(0,J.jsx)(`div`,{className:`pt-3`,children:(0,J.jsxs)(`div`,{className:`rounded-lg border border-input bg-muted/32 px-5 py-4 shadow-xs/5`,role:`group`,"aria-label":p,children:[h,g,_,w]})})}),t[37]=p,t[38]=g,t[39]=w,t[40]=T):T=t[40];let E;return t[41]!==e.confirmationOpen||t[42]!==e.onConfirmationChange||t[43]!==T||t[44]!==f?(E=(0,J.jsx)(Z,{icon:r,children:(0,J.jsxs)(ae,{open:i,onOpenChange:a,children:[f,T]})}),t[41]=e.confirmationOpen,t[42]=e.onConfirmationChange,t[43]=T,t[44]=f,t[45]=E):E=t[45],E}function we(){let e=(0,z.c)(41),t=se(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},e[0]=n):n=e[0];let r=j(W,n),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(null),c=(0,B.useRef)(!1),l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={accountId:null,linkedAtById:new Map},e[1]=l):l=e[1];let[u,d]=(0,B.useState)(l),f;e[2]!==r||e[3]!==t?(f=async e=>{let n=t.accountId;if(!n||c.current)return;c.current=!0,a(e.environmentId);let i=await r({accountId:n,environmentId:e.environmentId});if(c.current=!1,a(null),i._tag===`Success`){s(null),d(t=>{let r=new Map(t.accountId===n?t.linkedAtById:[]);return r.set(e.environmentId,e.linkedAt),{accountId:n,linkedAtById:r}}),t.refresh(),A.add({type:`success`,title:`Server deregistered`,description:`P4 Connect access was revoked and a host space is now available.`});return}if(S(i))return;let o=w(i),l=o instanceof Error?o.message:`Could not deregister the server.`,u=b(o);console.error(`[t3-connect] Could not deregister environment`,{environmentId:e.environmentId,message:l,traceId:u,cause:o}),A.add({type:`error`,title:`Could not deregister server`,description:l,data:u?{secondaryActionProps:{children:`Copy trace ID`,onClick:()=>void navigator.clipboard?.writeText(u)}}:void 0})},e[2]=r,e[3]=t,e[4]=f):f=e[4];let p=f,m;e[5]!==t.accountId||e[6]!==u.accountId||e[7]!==u.linkedAtById?(m=u.accountId===t.accountId?u.linkedAtById:new Map,e[5]=t.accountId,e[6]=u.accountId,e[7]=u.linkedAtById,e[8]=m):m=e[8];let h=m,g,_,y,x,C,T;if(e[9]!==o||e[10]!==i||e[11]!==t.accountId||e[12]!==t.data||e[13]!==t.error||e[14]!==t.isPending||e[15]!==t.refresh||e[16]!==p||e[17]!==h){let n;e[24]===h?n=e[25]:(n=e=>h.get(e.environmentId)!==e.linkedAt,e[24]=h,e[25]=n);let r=(t.data??[]).filter(n),a=!t.accountId||t.data===null&&!t.error;g=Y,x=`P4 Connect`,C=`Environments registered to your account. Connections on this device are managed in Settings.`;let c=i!==null;e[26]!==t.isPending||e[27]!==t.refresh||e[28]!==c?(T=(0,J.jsx)(X,{disabled:c,isPending:t.isPending,onClick:t.refresh}),e[26]=t.isPending,e[27]=t.refresh,e[28]=c,e[29]=T):T=e[29],e[30]===t.error?_=e[31]:(_=t.error?(0,J.jsxs)(`div`,{className:`mb-4 border-t border-destructive/35 py-3 text-xs`,role:`alert`,children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load P4 Connect environments`}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t.error})]}):null,e[30]=t.error,e[31]=_),y=a?(0,J.jsx)(`p`,{className:`border-t py-4 text-xs text-muted-foreground`,role:`status`,children:`Loading environments…`}):r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(e=>(0,J.jsx)(Ce,{environment:e,confirmationOpen:o===e.environmentId,mutationPending:i!==null,onConfirmationChange:t=>s(t?e.environmentId:null),onDeregister:e=>void p(e)},e.environmentId))}):t.error?null:(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsxs)(L,{size:`compact`,children:[(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(v,{})}),(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No P4 Connect environments`}),(0,J.jsx)(I,{children:`Link an environment from its local Settings to make it available through P4 Connect.`})]})]})}),e[9]=o,e[10]=i,e[11]=t.accountId,e[12]=t.data,e[13]=t.error,e[14]=t.isPending,e[15]=t.refresh,e[16]=p,e[17]=h,e[18]=g,e[19]=_,e[20]=y,e[21]=x,e[22]=C,e[23]=T}else g=e[18],_=e[19],y=e[20],x=e[21],C=e[22],T=e[23];let E;e[32]!==_||e[33]!==y?(E=(0,J.jsxs)(`div`,{children:[_,y]}),e[32]=_,e[33]=y,e[34]=E):E=e[34];let D;return e[35]!==g||e[36]!==x||e[37]!==C||e[38]!==T||e[39]!==E?(D=(0,J.jsx)(g,{title:x,description:C,action:T,children:E}),e[35]=g,e[36]=x,e[37]=C,e[38]=T,e[39]=E,e[40]=D):D=e[40],D}var $=[{label:`Mobile clients`,url:`mobile-clients`,icon:(0,J.jsx)(y,{className:`size-4`}),content:(0,J.jsx)(ve,{})},{label:`P4 Connect`,url:`t3-connect`,icon:(0,J.jsx)(v,{className:`size-4`}),content:(0,J.jsx)(we,{})}];function Te(){let e=(0,z.c)(8),t=te(),{isSignedIn:n}=ne(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},e[0]=r):r=e[0];let[i,a]=(0,B.useState)(r),o;e[1]===t?o=e[2]:(o=()=>{let e=(e,t)=>a(n=>({...n,[e]:t}));t.openUserProfile({__experimental_startPath:`/t3-connect`,customPages:$.map(t=>({label:t.label,url:t.url,mount:n=>e(`content:${t.url}`,n),unmount:()=>e(`content:${t.url}`,void 0),mountIcon:n=>e(`icon:${t.url}`,n),unmountIcon:()=>e(`icon:${t.url}`,void 0)}))})},e[1]=t,e[2]=o);let s=o,c;e[3]===i?c=e[4]:(c=$.flatMap(e=>{let t=i[`content:${e.url}`],n=i[`icon:${e.url}`];return[t?(0,R.createPortal)(e.content,t,`content:${e.url}`):null,n?(0,R.createPortal)(e.icon,n,`icon:${e.url}`):null]}),e[3]=i,e[4]=c);let l=c,u=n?s:null,d;return e[5]!==l||e[6]!==u?(d={open:u,portals:l},e[5]=l,e[6]=u,e[7]=d):d=e[7],d}export{Te as n,$ as t};
2
- //# sourceMappingURL=T3ConnectAccountPages-DEqOE3hy.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{$o as n,Go as r,Jo as i,Lo as a,Pb as o,Un as s,Vo as c,Wo as l,cy as u,la as d,m_ as f,ma as p,or as m,ps as h,t as g,wx as _}from"./utils-DmS758az.js";import{t as v}from"./server-Le_hLOlf.js";import{t as y}from"./smartphone-zkhAIn1Q.js";import{D as b,F as x,L as S,O as C,U as w,d as T,f as E,h as D,m as O,pn as k,r as ee}from"./runtime-CCr9UADV.js";import{i as A}from"./toast-Bm36EaG6.js";import{t as j}from"./use-atom-command-CiEeUGsC.js";import{t as M}from"./skeleton-CtSxs1y1.js";import{i as te,r as ne}from"./dist-CxgL3edJ.js";import{a as N,i as P,o as F,r as I,t as L}from"./empty-uoiaKPHo.js";import{n as re,r as ie,t as ae}from"./collapsible-C3qenpEI.js";import{Ia as oe}from"./main-D9z9rMK1.js";var R=e(d(),1),z=_(),B=e(t(),1),V=i(u(k,ee.contextEffect.pipe(f(e=>o(e,k))))),H=T(V),U=C(),W=x(V,{label:`web:managed-relay:deregister-environment`,scheduler:U,concurrency:{mode:`serial`,key:e=>e.accountId},execute:(e,t)=>E(t,e)}),G=r(h([])).pipe(l,n(`managed-relay:web:environments:null`)),K=r(h([])).pipe(l,n(`managed-relay:web:devices:null`));function se(){let e=(0,z.c)(14),t=c(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.environmentsAtom(t):G,e[0]=t,e[1]=n);let r=c(n),i;e[2]===r?i=e[3]:(i=D(r),e[2]=r,e[3]=i);let o=i,s,l;e[4]!==o.error||e[5]!==o.errorTraceId?(s=()=>{o.error&&console.error(`[t3-cloud] Relay environment listing failed`,{message:o.error,traceId:o.errorTraceId})},l=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=s,e[7]=l):(s=e[6],l=e[7]),(0,B.useEffect)(s,l);let u;e[8]===t?u=e[9]:(u=()=>{t&&H.refreshEnvironments(a,t)},e[8]=t,e[9]=u);let d=u,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}function q(){let e=(0,z.c)(14),t=c(O)?.accountId??null,n;e[0]===t?n=e[1]:(n=t?H.devicesAtom(t):K,e[0]=t,e[1]=n);let r=c(n),i;e[2]===r?i=e[3]:(i=D(r),e[2]=r,e[3]=i);let o=i,s,l;e[4]!==o.error||e[5]!==o.errorTraceId?(s=()=>{o.error&&console.error(`[t3-cloud] Relay device listing failed`,{message:o.error,traceId:o.errorTraceId})},l=[o.error,o.errorTraceId],e[4]=o.error,e[5]=o.errorTraceId,e[6]=s,e[7]=l):(s=e[6],l=e[7]),(0,B.useEffect)(s,l);let u;e[8]===t?u=e[9]:(u=()=>{t&&H.refreshDevices(a,t)},e[8]=t,e[9]=u);let d=u,f;return e[10]!==t||e[11]!==d||e[12]!==o?(f={...o,accountId:t,refresh:d},e[10]=t,e[11]=d,e[12]=o,e[13]=f):f=e[13],f}var ce=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}),le=[[`notifyOnApproval`,`approvals`],[`notifyOnInput`,`input requests`],[`notifyOnCompletion`,`completions`],[`notifyOnFailure`,`failures`]];function ue(e){return`${e.platform===`android`?`Android`:e.iosMajorVersion===null?`iOS`:`iOS ${e.iosMajorVersion}`}${e.appVersion?` · P4 Code ${e.appVersion}`:``}`}function de(e){if(!e.notifications.enabled)return`Push notifications are disabled on this device.`;let t=le.flatMap(([t,n])=>e.notifications[t]?[n]:[]);return t.length>0?`Alerts enabled for ${t.join(`, `)}.`:`Push notifications are enabled, but no alert types are selected.`}function fe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Update time unavailable`:`Updated ${ce.format(t)}`}var J=e(p(),1);function Y(e){let t=(0,z.c)(18),{action:n,children:r,className:i,description:a,title:o}=e,s;t[0]===i?s=t[1]:(s=g(`w-full min-w-0 text-foreground`,i),t[0]=i,t[1]=s);let c;t[2]===o?c=t[3]:(c=(0,J.jsx)(`h2`,{className:`text-base leading-6 font-semibold`,children:o}),t[2]=o,t[3]=c);let l;t[4]===a?l=t[5]:(l=a?(0,J.jsx)(`p`,{className:`mt-1 max-w-[34rem] text-xs leading-4.5 text-muted-foreground sm:min-h-9`,children:a}):null,t[4]=a,t[5]=l);let u;t[6]!==c||t[7]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[c,l]}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;t[9]===n?d=t[10]:(d=n?(0,J.jsx)(`div`,{className:`shrink-0`,children:n}):null,t[9]=n,t[10]=d);let f;t[11]!==u||t[12]!==d?(f=(0,J.jsxs)(`header`,{className:`flex flex-col gap-3 pb-4 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:pr-8`,children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;return t[14]!==r||t[15]!==s||t[16]!==f?(p=(0,J.jsxs)(`div`,{className:s,children:[f,r]}),t[14]=r,t[15]=s,t[16]=f,t[17]=p):p=t[17],p}function X(e){let t=(0,z.c)(7),{className:n,disabled:r,isPending:i,onClick:a}=e,o=r!==void 0&&r||i,s;t[0]===i?s=t[1]:(s=(0,J.jsx)(oe,{"aria-hidden":`true`,size:`sm`,refreshing:i}),t[0]=i,t[1]=s);let c;return t[2]!==n||t[3]!==a||t[4]!==o||t[5]!==s?(c=(0,J.jsxs)(m,{size:`sm`,variant:`outline`,className:n,disabled:o,onClick:a,children:[s,`Refresh`]}),t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c):c=t[6],c}function Z(e){let t=(0,z.c)(12),{children:n,className:r,icon:i}=e,a;t[0]===r?a=t[1]:(a=g(`border-t py-4 first:border-t-0`,r),t[0]=r,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,J.jsx)(`div`,{"aria-hidden":`true`,className:`flex size-8 shrink-0 items-center justify-center rounded-lg border bg-muted/32 text-muted-foreground`,children:i}),t[2]=i,t[3]=o);let s;t[4]===n?s=t[5]:(s=(0,J.jsx)(`div`,{className:`min-w-0 flex-1`,children:n}),t[4]=n,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,J.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,J.jsx)(`li`,{className:a,children:c}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}var pe=[`primary`,`secondary`];function Q(e){let t=(0,z.c)(4),{enabled:n,label:r}=e,i=n?`success`:`outline`,a=n?`On`:`Off`,o;return t[0]!==r||t[1]!==i||t[2]!==a?(o=(0,J.jsxs)(s,{variant:i,children:[r,`: `,a]}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):o=t[3],o}function me(e){let t=(0,z.c)(32),{device:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(y,{className:`size-4`}),t[0]=r):r=t[0];let i;t[1]===n.label?i=t[2]:(i=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=i);let a;t[3]===n?a=t[4]:(a=ue(n),t[3]=n,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`p`,{className:`text-xs leading-4.5 text-muted-foreground`,children:a}),t[5]=a,t[6]=o);let s;t[7]!==i||t[8]!==o?(s=(0,J.jsxs)(`div`,{className:`min-w-0`,children:[i,o]}),t[7]=i,t[8]=o,t[9]=s):s=t[9];let c;t[10]===n.updatedAt?c=t[11]:(c=fe(n.updatedAt),t[10]=n.updatedAt,t[11]=c);let l;t[12]===c?l=t[13]:(l=(0,J.jsx)(`p`,{className:`shrink-0 text-2xs leading-4 text-muted-foreground/75`,children:c}),t[12]=c,t[13]=l);let u;t[14]!==s||t[15]!==l?(u=(0,J.jsxs)(`div`,{className:`flex flex-col gap-0.5 sm:flex-row sm:items-start sm:justify-between sm:gap-3`,children:[s,l]}),t[14]=s,t[15]=l,t[16]=u):u=t[16];let d;t[17]===n.notifications.enabled?d=t[18]:(d=(0,J.jsx)(Q,{enabled:n.notifications.enabled,label:`Push notifications`}),t[17]=n.notifications.enabled,t[18]=d);let f;t[19]===n.liveActivities.enabled?f=t[20]:(f=(0,J.jsx)(Q,{enabled:n.liveActivities.enabled,label:`Live Activities`}),t[19]=n.liveActivities.enabled,t[20]=f);let p;t[21]!==f||t[22]!==d?(p=(0,J.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[d,f]}),t[21]=f,t[22]=d,t[23]=p):p=t[23];let m;t[24]===n?m=t[25]:(m=de(n),t[24]=n,t[25]=m);let h;t[26]===m?h=t[27]:(h=(0,J.jsx)(`p`,{className:`mt-1.5 text-xs leading-4.5 text-muted-foreground/80`,children:m}),t[26]=m,t[27]=h);let g;return t[28]!==p||t[29]!==h||t[30]!==u?(g=(0,J.jsxs)(Z,{icon:r,children:[u,p,h]}),t[28]=p,t[29]=h,t[30]=u,t[31]=g):g=t[31],g}function he(){let e=(0,z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(`div`,{"aria-label":`Loading mobile clients`,className:`divide-y border-t`,role:`status`,children:pe.map(ge)}),e[0]=t):t=e[0],t}function ge(e){return(0,J.jsx)(`div`,{className:`py-4`,children:(0,J.jsxs)(`div`,{className:`flex gap-3`,children:[(0,J.jsx)(M,{shape:`card`,className:`size-8 shrink-0`}),(0,J.jsxs)(`div`,{className:`flex-1 space-y-2`,children:[(0,J.jsx)(M,{className:`h-3.5 w-36`}),(0,J.jsx)(M,{className:`h-3 w-28`}),(0,J.jsxs)(`div`,{className:`flex gap-2`,children:[(0,J.jsx)(M,{className:`h-4.5 w-28`}),(0,J.jsx)(M,{className:`h-4.5 w-24`})]})]})]})},e)}function _e(){let e=(0,z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(y,{})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsxs)(L,{size:`compact`,children:[t,(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No mobile clients`}),(0,J.jsx)(I,{children:`Install P4 Code on your phone and sign in to P4 Connect to get push notifications and Live Activities.`})]})]}),e[1]=n):n=e[1],n}function ve(){let e=(0,z.c)(18),t=q(),n;e[0]===t.data?n=e[1]:(n=t.data??[],e[0]=t.data,e[1]=n);let r=n,i=!t.accountId||t.data===null&&!t.error,a=t.error!==null&&t.data===null,o;e[2]!==t.isPending||e[3]!==t.refresh?(o=(0,J.jsx)(X,{isPending:t.isPending,onClick:t.refresh}),e[2]=t.isPending,e[3]=t.refresh,e[4]=o):o=e[4];let s;e[5]!==t.error||e[6]!==t.refresh?(s=t.error?(0,J.jsxs)(`div`,{className:`mb-4 flex flex-col gap-3 border-t border-destructive/35 py-3 text-xs sm:flex-row sm:items-center sm:justify-between`,role:`alert`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load mobile clients`}),(0,J.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:t.error})]}),(0,J.jsx)(m,{size:`xs`,variant:`outline`,onClick:t.refresh,children:`Try again`})]}):null,e[5]=t.error,e[6]=t.refresh,e[7]=s):s=e[7];let c;e[8]!==r||e[9]!==a||e[10]!==i?(c=i?(0,J.jsx)(he,{}):a?null:r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(ye)}):(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsx)(_e,{})}),e[8]=r,e[9]=a,e[10]=i,e[11]=c):c=e[11];let l;e[12]!==s||e[13]!==c?(l=(0,J.jsxs)(`div`,{children:[s,c]}),e[12]=s,e[13]=c,e[14]=l):l=e[14];let u;return e[15]!==o||e[16]!==l?(u=(0,J.jsx)(Y,{title:`Mobile clients`,description:`Mobile devices that get notifications from your environments.`,action:o,children:l}),e[15]=o,e[16]=l,e[17]=u):u=e[17],u}function ye(e){return(0,J.jsx)(me,{device:e},e.deviceId)}var be=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`});function xe(e){let t=new Date(e);return Number.isNaN(t.getTime())?`Link date unavailable`:`Linked ${be.format(t)}`}function Se(e){return e.endpoint.providerKind===`cloudflare_tunnel`?`Managed tunnel`:`Activity publishing only`}function Ce(e){let t=(0,z.c)(46),{environment:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(v,{className:`size-4`}),t[0]=r):r=t[0];let i=e.confirmationOpen,a=e.onConfirmationChange,o;t[1]===n.label?o=t[2]:(o=(0,J.jsx)(`h3`,{className:`truncate text-sm leading-4.5 font-medium text-foreground`,children:n.label}),t[1]=n.label,t[2]=o);let s;t[3]===n.linkedAt?s=t[4]:(s=xe(n.linkedAt),t[3]=n.linkedAt,t[4]=s);let c;t[5]===n?c=t[6]:(c=Se(n),t[5]=n,t[6]=c);let l;t[7]!==s||t[8]!==c?(l=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[s,` · `,c]}),t[7]=s,t[8]=c,t[9]=l):l=t[9];let u;t[10]!==o||t[11]!==l?(u=(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[o,l]}),t[10]=o,t[11]=l,t[12]=u):u=t[12];let d;t[13]===e.mutationPending?d=t[14]:(d=(0,J.jsx)(ie,{render:(0,J.jsx)(m,{size:`sm`,variant:`destructive-outline`,disabled:e.mutationPending,children:`Deregister`})}),t[13]=e.mutationPending,t[14]=d);let f;t[15]!==u||t[16]!==d?(f=(0,J.jsxs)(`div`,{className:`flex items-start gap-4`,children:[u,d]}),t[15]=u,t[16]=d,t[17]=f):f=t[17];let p=`Confirm deregistration of ${n.label}`,h;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,J.jsx)(`h4`,{className:`text-sm leading-4.5 font-semibold text-foreground`,children:`Deregister server`}),t[18]=h):h=t[18];let g;t[19]===n.label?g=t[20]:(g=(0,J.jsxs)(`p`,{className:`mt-1 text-xs leading-4.5 text-muted-foreground`,children:[`“`,n.label,`” will be removed from this account.`]}),t[19]=n.label,t[20]=g);let _;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,J.jsx)(`p`,{className:`mt-4 max-w-xl text-xs leading-4.5 text-muted-foreground`,children:`P4 Connect access will be revoked, any managed tunnel will be removed, and a host space will become available. Local connections on your devices are not changed.`}),t[21]=_):_=t[21];let y;t[22]===e?y=t[23]:(y=()=>e.onConfirmationChange(!1),t[22]=e,t[23]=y);let b;t[24]!==e.mutationPending||t[25]!==y?(b=(0,J.jsx)(m,{size:`sm`,variant:`ghost`,disabled:e.mutationPending,onClick:y,children:`Cancel`}),t[24]=e.mutationPending,t[25]=y,t[26]=b):b=t[26];let x;t[27]!==n||t[28]!==e?(x=()=>e.onDeregister(n),t[27]=n,t[28]=e,t[29]=x):x=t[29];let S=e.mutationPending?`Deregistering…`:`Deregister`,C;t[30]!==e.mutationPending||t[31]!==x||t[32]!==S?(C=(0,J.jsx)(m,{size:`sm`,variant:`destructive`,disabled:e.mutationPending,onClick:x,children:S}),t[30]=e.mutationPending,t[31]=x,t[32]=S,t[33]=C):C=t[33];let w;t[34]!==b||t[35]!==C?(w=(0,J.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[b,C]}),t[34]=b,t[35]=C,t[36]=w):w=t[36];let T;t[37]!==p||t[38]!==g||t[39]!==w?(T=(0,J.jsx)(re,{children:(0,J.jsx)(`div`,{className:`pt-3`,children:(0,J.jsxs)(`div`,{className:`rounded-lg border border-input bg-muted/32 px-5 py-4 shadow-xs/5`,role:`group`,"aria-label":p,children:[h,g,_,w]})})}),t[37]=p,t[38]=g,t[39]=w,t[40]=T):T=t[40];let E;return t[41]!==e.confirmationOpen||t[42]!==e.onConfirmationChange||t[43]!==T||t[44]!==f?(E=(0,J.jsx)(Z,{icon:r,children:(0,J.jsxs)(ae,{open:i,onOpenChange:a,children:[f,T]})}),t[41]=e.confirmationOpen,t[42]=e.onConfirmationChange,t[43]=T,t[44]=f,t[45]=E):E=t[45],E}function we(){let e=(0,z.c)(41),t=se(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},e[0]=n):n=e[0];let r=j(W,n),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(null),c=(0,B.useRef)(!1),l;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l={accountId:null,linkedAtById:new Map},e[1]=l):l=e[1];let[u,d]=(0,B.useState)(l),f;e[2]!==r||e[3]!==t?(f=async e=>{let n=t.accountId;if(!n||c.current)return;c.current=!0,a(e.environmentId);let i=await r({accountId:n,environmentId:e.environmentId});if(c.current=!1,a(null),i._tag===`Success`){s(null),d(t=>{let r=new Map(t.accountId===n?t.linkedAtById:[]);return r.set(e.environmentId,e.linkedAt),{accountId:n,linkedAtById:r}}),t.refresh(),A.add({type:`success`,title:`Server deregistered`,description:`P4 Connect access was revoked and a host space is now available.`});return}if(S(i))return;let o=w(i),l=o instanceof Error?o.message:`Could not deregister the server.`,u=b(o);console.error(`[t3-connect] Could not deregister environment`,{environmentId:e.environmentId,message:l,traceId:u,cause:o}),A.add({type:`error`,title:`Could not deregister server`,description:l,data:u?{secondaryActionProps:{children:`Copy trace ID`,onClick:()=>void navigator.clipboard?.writeText(u)}}:void 0})},e[2]=r,e[3]=t,e[4]=f):f=e[4];let p=f,m;e[5]!==t.accountId||e[6]!==u.accountId||e[7]!==u.linkedAtById?(m=u.accountId===t.accountId?u.linkedAtById:new Map,e[5]=t.accountId,e[6]=u.accountId,e[7]=u.linkedAtById,e[8]=m):m=e[8];let h=m,g,_,y,x,C,T;if(e[9]!==o||e[10]!==i||e[11]!==t.accountId||e[12]!==t.data||e[13]!==t.error||e[14]!==t.isPending||e[15]!==t.refresh||e[16]!==p||e[17]!==h){let n;e[24]===h?n=e[25]:(n=e=>h.get(e.environmentId)!==e.linkedAt,e[24]=h,e[25]=n);let r=(t.data??[]).filter(n),a=!t.accountId||t.data===null&&!t.error;g=Y,x=`P4 Connect`,C=`Environments registered to your account. Connections on this device are managed in Settings.`;let c=i!==null;e[26]!==t.isPending||e[27]!==t.refresh||e[28]!==c?(T=(0,J.jsx)(X,{disabled:c,isPending:t.isPending,onClick:t.refresh}),e[26]=t.isPending,e[27]=t.refresh,e[28]=c,e[29]=T):T=e[29],e[30]===t.error?_=e[31]:(_=t.error?(0,J.jsxs)(`div`,{className:`mb-4 border-t border-destructive/35 py-3 text-xs`,role:`alert`,children:[(0,J.jsx)(`p`,{className:`font-medium text-destructive-foreground`,children:`Could not load P4 Connect environments`}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t.error})]}):null,e[30]=t.error,e[31]=_),y=a?(0,J.jsx)(`p`,{className:`border-t py-4 text-xs text-muted-foreground`,role:`status`,children:`Loading environments…`}):r.length>0?(0,J.jsx)(`ul`,{className:`border-t`,children:r.map(e=>(0,J.jsx)(Ce,{environment:e,confirmationOpen:o===e.environmentId,mutationPending:i!==null,onConfirmationChange:t=>s(t?e.environmentId:null),onDeregister:e=>void p(e)},e.environmentId))}):t.error?null:(0,J.jsx)(`div`,{className:`border-t`,children:(0,J.jsxs)(L,{size:`compact`,children:[(0,J.jsx)(N,{variant:`icon`,children:(0,J.jsx)(v,{})}),(0,J.jsxs)(P,{children:[(0,J.jsx)(F,{children:`No P4 Connect environments`}),(0,J.jsx)(I,{children:`Link an environment from its local Settings to make it available through P4 Connect.`})]})]})}),e[9]=o,e[10]=i,e[11]=t.accountId,e[12]=t.data,e[13]=t.error,e[14]=t.isPending,e[15]=t.refresh,e[16]=p,e[17]=h,e[18]=g,e[19]=_,e[20]=y,e[21]=x,e[22]=C,e[23]=T}else g=e[18],_=e[19],y=e[20],x=e[21],C=e[22],T=e[23];let E;e[32]!==_||e[33]!==y?(E=(0,J.jsxs)(`div`,{children:[_,y]}),e[32]=_,e[33]=y,e[34]=E):E=e[34];let D;return e[35]!==g||e[36]!==x||e[37]!==C||e[38]!==T||e[39]!==E?(D=(0,J.jsx)(g,{title:x,description:C,action:T,children:E}),e[35]=g,e[36]=x,e[37]=C,e[38]=T,e[39]=E,e[40]=D):D=e[40],D}var $=[{label:`Mobile clients`,url:`mobile-clients`,icon:(0,J.jsx)(y,{className:`size-4`}),content:(0,J.jsx)(ve,{})},{label:`P4 Connect`,url:`t3-connect`,icon:(0,J.jsx)(v,{className:`size-4`}),content:(0,J.jsx)(we,{})}];function Te(){let e=(0,z.c)(8),t=te(),{isSignedIn:n}=ne(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},e[0]=r):r=e[0];let[i,a]=(0,B.useState)(r),o;e[1]===t?o=e[2]:(o=()=>{let e=(e,t)=>a(n=>({...n,[e]:t}));t.openUserProfile({__experimental_startPath:`/t3-connect`,customPages:$.map(t=>({label:t.label,url:t.url,mount:n=>e(`content:${t.url}`,n),unmount:()=>e(`content:${t.url}`,void 0),mountIcon:n=>e(`icon:${t.url}`,n),unmountIcon:()=>e(`icon:${t.url}`,void 0)}))})},e[1]=t,e[2]=o);let s=o,c;e[3]===i?c=e[4]:(c=$.flatMap(e=>{let t=i[`content:${e.url}`],n=i[`icon:${e.url}`];return[t?(0,R.createPortal)(e.content,t,`content:${e.url}`):null,n?(0,R.createPortal)(e.icon,n,`icon:${e.url}`):null]}),e[3]=i,e[4]=c);let l=c,u=n?s:null,d;return e[5]!==l||e[6]!==u?(d={open:u,portals:l},e[5]=l,e[6]=u,e[7]=d):d=e[7],d}export{Te as n,$ as t};
2
+ //# sourceMappingURL=T3ConnectAccountPages-C6qHq26m.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{Sx as t,ma as n}from"./utils-geC9CGP4.js";import{t as r}from"./log-in-BpPtfyCd.js";import{o as i}from"./runtime-BoEmkhOe.js";import{n as a,r as o}from"./dist-D-bAcBTo.js";import{c as s,l as c,s as l}from"./sidebar-Bulbb3cX.js";import{t as u}from"./T3ConnectAccountPages-DEqOE3hy.js";import{t as d}from"./useT3ConnectAuthPrompt-D3ARnr92.js";var f=t(),p=e(n(),1);function m(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(v,{}),e[0]=t):t=e[0],t}function h(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(g,{}),e[0]=t):t=e[0],t}function g(){let e=(0,f.c)(1),{isLoaded:t,isSignedIn:n}=o();if(!t||!n)return null;let r;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(a,{appearance:{elements:{avatarBox:`size-7`,userButtonTrigger:`rounded-lg p-1 hover:bg-sidebar-row-hover`}},children:u.map(_)}),e[0]=r):r=e[0],r}function _(e){return(0,p.jsx)(a.UserProfilePage,{label:e.label,labelIcon:e.icon,url:e.url,children:e.content},e.url)}function v(){let e=(0,f.c)(7),{isLoaded:t,isSignedIn:n}=o(),{authPrompt:i,openAuthPrompt:a}=d();if(!t||n)return null;let u,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,p.jsx)(r,{}),m=(0,p.jsx)(`span`,{children:`Sign in to P4 Connect`}),e[0]=u,e[1]=m):(u=e[0],m=e[1]);let h;e[2]===a?h=e[3]:(h=(0,p.jsx)(l,{children:(0,p.jsx)(c,{children:(0,p.jsxs)(s,{onClick:a,children:[u,m]})})}),e[2]=a,e[3]=h);let g;return e[4]!==i||e[5]!==h?(g=(0,p.jsxs)(p.Fragment,{children:[h,i]}),e[4]=i,e[5]=h,e[6]=g):g=e[6],g}export{h as T3ConnectSidebarAvatar,m as T3ConnectSidebarSignIn};
2
- //# sourceMappingURL=T3ConnectSidebarSignIn-C4jpzdPh.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{ma as t,wx as n}from"./utils-DmS758az.js";import{t as r}from"./log-in-BpPtfyCd.js";import{o as i}from"./runtime-CCr9UADV.js";import{n as a,r as o}from"./dist-CxgL3edJ.js";import{c as s,l as c,s as l}from"./sidebar-Dj0htG-5.js";import{t as u}from"./T3ConnectAccountPages-C6qHq26m.js";import{t as d}from"./useT3ConnectAuthPrompt-CK8il-7e.js";var f=n(),p=e(t(),1);function m(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(v,{}),e[0]=t):t=e[0],t}function h(){let e=(0,f.c)(1);if(!i())return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(g,{}),e[0]=t):t=e[0],t}function g(){let e=(0,f.c)(1),{isLoaded:t,isSignedIn:n}=o();if(!t||!n)return null;let r;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,p.jsx)(a,{appearance:{elements:{avatarBox:`size-7`,userButtonTrigger:`rounded-lg p-1 hover:bg-sidebar-row-hover`}},children:u.map(_)}),e[0]=r):r=e[0],r}function _(e){return(0,p.jsx)(a.UserProfilePage,{label:e.label,labelIcon:e.icon,url:e.url,children:e.content},e.url)}function v(){let e=(0,f.c)(7),{isLoaded:t,isSignedIn:n}=o(),{authPrompt:i,openAuthPrompt:a}=d();if(!t||n)return null;let u,m;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,p.jsx)(r,{}),m=(0,p.jsx)(`span`,{children:`Sign in to P4 Connect`}),e[0]=u,e[1]=m):(u=e[0],m=e[1]);let h;e[2]===a?h=e[3]:(h=(0,p.jsx)(l,{children:(0,p.jsx)(c,{children:(0,p.jsxs)(s,{onClick:a,children:[u,m]})})}),e[2]=a,e[3]=h);let g;return e[4]!==i||e[5]!==h?(g=(0,p.jsxs)(p.Fragment,{children:[h,i]}),e[4]=i,e[5]=h,e[6]=g):g=e[6],g}export{h as T3ConnectSidebarAvatar,m as T3ConnectSidebarSignIn};
2
+ //# sourceMappingURL=T3ConnectSidebarSignIn-DewmE1PI.js.map
@@ -0,0 +1,5 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{ma as n,or as r,t as i,wx as a}from"./utils-DmS758az.js";import{t as o}from"./paintbrush-D1BKpWrm.js";import{t as s}from"./plus-Cr075-cy.js";import{t as c}from"./x-CSwbgjBe.js";import{a as l,c as u,n as d,t as f,u as p}from"./tooltip-Df-4YKs5.js";import{A as m,E as h,G as g,H as _,O as v,S as y,U as ee,W as b,_ as te,d as ne,et as x,g as S,m as C,s as w,u as T,y as E}from"./themePalette-BZeqG2Hu.js";import{n as D,t as O}from"./toggle-group-_C7nJPTT.js";import{t as re}from"./input-u5qjnfMr.js";import{i as k,o as A,t as j}from"./popover-6BYEGLLK.js";import{i as M,n as N,r as P,t as F}from"./color-picker-Cj2frYnP.js";import{Ea as I,ao as L}from"./main-D9z9rMK1.js";var R=p(),ie=a(),z=e(t(),1),B=e(n(),1);function V(e){return{canvas:`Background`,toolbar:`Toolbar background`,toolbarForeground:`Toolbar text`,toolbarBorder:`Toolbar border`,toolbarControl:`Toolbar control`,toolbarControlForeground:`Toolbar control text`,toolbarControlHover:`Toolbar control hover`,accent:`Accent color`,errorForeground:`Error text`,errorSurface:`Error background`,warningForeground:`Warning text`,warningSurface:`Warning background`,updateForeground:`Update text`,updateSurface:`Update background`}[e]||e.replace(/([A-Z])/g,` $1`).replace(/^./,e=>e.toUpperCase())}function H(e){let t=_(e)??``,n=t.length===9?t.slice(7):``;return n===`ff`?``:n}function ae(e){return(_(e)??`#000000`).slice(0,7)}function oe(e){let t=Number.parseInt(ae(e).slice(1),16);return[t>>16,t>>8&255,t&255]}function se(e){let t=e.trim().replace(/^rgb\(\s*/i,``).replace(/\s*\)$/,``).split(/[,\s]+/).filter(Boolean).map(Number);return t.length!==3||t.some(e=>!Number.isInteger(e)||e<0||e>255)?null:`#${t.map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function U(e){return oe(e).join(`, `)}function W({label:e,value:t,onChange:n}){let r=ae(t),i=H(t),[a,o]=(0,z.useState)(()=>P(r)),[s,c]=(0,z.useState)(r),[l,u]=(0,z.useState)(()=>U(r)),d=(0,z.useRef)(!1),f=M(a.h,a.s,a.v),p=U(f);(0,z.useEffect)(()=>{d.current||(c(r),u(U(r))),o(e=>M(e.h,e.s,e.v)===r?e:P(r))},[r]);let m=(0,z.useRef)(n);m.current=n;let h=(0,z.useRef)(null),g=(0,z.useRef)(null),_=(0,z.useCallback)(()=>{g.current!==null&&(cancelAnimationFrame(g.current),g.current=null);let e=h.current;h.current=null,e!==null&&m.current(e)},[]);(0,z.useEffect)(()=>()=>_(),[_]);let v=(0,z.useCallback)(e=>{h.current=e,g.current??=requestAnimationFrame(()=>{g.current=null;let e=h.current;h.current=null,e!==null&&m.current(e)})},[]),y=(0,z.useCallback)(e=>{o(e);let t=M(e.h,e.s,e.v);c(t),u(U(t)),v(t+i)},[i,v]),ee=e=>{if(c(e),!/^#[0-9a-f]{6}$/i.test(e))return;let t=P(e);o(t),u(U(e)),n(e.toLowerCase())},b=e=>{u(e);let t=se(e);t&&(o(P(t)),c(t),n(t+i))};return(0,B.jsxs)(`div`,{className:`w-72 bg-popover`,children:[(0,B.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/70 px-4 py-3`,children:[(0,B.jsxs)(`div`,{className:`min-w-0`,children:[(0,B.jsx)(`p`,{className:`truncate text-xs font-semibold text-foreground`,children:e}),(0,B.jsx)(`p`,{className:`text-2xs text-muted-foreground`,children:`Choose a color`})]}),(0,B.jsx)(`span`,{className:`size-7 shrink-0 rounded-full shadow-sm`,style:{backgroundColor:f}})]}),(0,B.jsxs)(`div`,{className:`grid gap-3 px-3 pb-3 pt-3`,children:[(0,B.jsx)(N,{label:e,value:a,onChange:y,onInteractionEnd:_}),(0,B.jsx)(F,{label:`${e} hue`,value:a.h,onChange:e=>y({...a,h:e}),onInteractionEnd:_}),(0,B.jsxs)(`div`,{className:`grid grid-cols-[1fr_1.2fr] gap-2`,children:[(0,B.jsxs)(`label`,{className:`grid min-w-0 gap-1`,children:[(0,B.jsx)(`span`,{className:`px-1 text-3xs font-semibold uppercase tracking-widest text-muted-foreground`,children:`HEX`}),(0,B.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 rounded-lg border border-input bg-background px-2 focus-within:border-ring`,children:[(0,B.jsx)(`span`,{className:`size-3.5 shrink-0 rounded-full`,style:{backgroundColor:f}}),(0,B.jsx)(`input`,{"aria-label":`${e} picker hex value`,className:`h-8 min-w-0 flex-1 bg-transparent font-mono text-xs text-foreground outline-none`,onBlur:()=>{d.current=!1,c(f),u(p)},onChange:e=>ee(e.currentTarget.value),onFocus:()=>{d.current=!0},spellCheck:!1,value:s})]})]}),(0,B.jsxs)(`label`,{className:`grid min-w-0 gap-1`,children:[(0,B.jsx)(`span`,{className:`px-1 text-3xs font-semibold uppercase tracking-widest text-muted-foreground`,children:`RGB`}),(0,B.jsx)(`span`,{className:`flex min-w-0 items-center rounded-lg border border-input bg-background px-2 focus-within:border-ring`,children:(0,B.jsx)(`input`,{"aria-label":`${e} picker RGB value`,className:`h-8 min-w-0 flex-1 bg-transparent font-mono text-xs text-foreground outline-none`,onBlur:()=>{d.current=!1,c(f),u(p)},onChange:e=>b(e.currentTarget.value),onFocus:()=>{d.current=!0},spellCheck:!1,value:l})})]})]})]})]})}function ce(e){let t=(0,ie.c)(13),{label:n,value:r,onChange:i,onInteract:a}=e,o=`Choose ${n} color`,s;t[0]===r?s=t[1]:(s=(0,B.jsx)(`span`,{className:`absolute inset-0 rounded-full shadow-sm`,style:{backgroundColor:r}}),t[0]=r,t[1]=s);let c;t[2]!==a||t[3]!==o||t[4]!==s?(c=(0,B.jsx)(A,{render:(0,B.jsx)(`button`,{"aria-label":o,className:`relative flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-full border border-foreground/30 transition-transform hover:scale-105 focus-visible:outline-2 focus-visible:outline-solid focus-visible:-outline-offset-2 focus-visible:outline-ring`,onFocus:a,onPointerDown:a,type:`button`,children:s})}),t[2]=a,t[3]=o,t[4]=s,t[5]=c):c=t[5];let l;t[6]!==n||t[7]!==i||t[8]!==r?(l=(0,B.jsx)(k,{align:`end`,padding:`none`,"data-theme-editor-panel":``,side:`bottom`,sideOffset:10,children:(0,B.jsx)(W,{label:n,onChange:i,value:r})}),t[6]=n,t[7]=i,t[8]=r,t[9]=l):l=t[9];let u;return t[10]!==c||t[11]!==l?(u=(0,B.jsxs)(j,{children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}var le=(0,z.memo)(function(e){let t=(0,ie.c)(58),{role:n,value:r,onChange:a,onSelect:o,onToggleSelected:s,selected:c,label:u}=e,p=c!==void 0&&c,m;t[0]!==u||t[1]!==n?(m=u??V(n),t[0]=u,t[1]=n,t[2]=m):m=t[2];let g=m,v;t[3]===r?v=t[4]:(v=h(r),t[3]=r,t[4]=v);let y=v,ee=y?r:`#000000`,b;t[5]===r?b=t[6]:(b=r.trim().toLowerCase().startsWith(`oklch(`)?_(r)??r:r,t[5]=r,t[6]=b);let te=b,ne=p&&`bg-accent/60 inset-ring inset-ring-ring`,x;t[7]===ne?x=t[8]:(x=i(`flex min-h-11 min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 transition-[background-color,box-shadow]`,ne),t[7]=ne,t[8]=x);let S=`${p?`Hide`:`Show`} ${g} usage`,C;t[9]!==s||t[10]!==n?(C=()=>s?.(n),t[9]=s,t[10]=n,t[11]=C):C=t[11];let w;t[12]===g?w=t[13]:(w=(0,B.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:g}),t[12]=g,t[13]=w);let T;t[14]!==p||t[15]!==S||t[16]!==C||t[17]!==w?(T=(0,B.jsx)(l,{render:(0,B.jsx)(`button`,{"aria-label":S,"aria-pressed":p,className:`flex min-w-0 flex-1 cursor-pointer items-center rounded-md text-left text-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,onClick:C,type:`button`,children:w})}),t[14]=p,t[15]=S,t[16]=C,t[17]=w,t[18]=T):T=t[18];let E=`${p?`Hide`:`Show`} where ${g} is used`,D;t[19]===E?D=t[20]:(D=(0,B.jsx)(d,{side:`top`,children:E}),t[19]=E,t[20]=D);let O;t[21]!==T||t[22]!==D?(O=(0,B.jsxs)(f,{children:[T,D]}),t[21]=T,t[22]=D,t[23]=O):O=t[23];let k;t[24]!==a||t[25]!==n?(k=e=>a(n,e),t[24]=a,t[25]=n,t[26]=k):k=t[26];let A;t[27]!==o||t[28]!==n?(A=()=>o?.(n),t[27]=o,t[28]=n,t[29]=A):A=t[29];let j;t[30]!==g||t[31]!==ee||t[32]!==k||t[33]!==A?(j=(0,B.jsx)(ce,{label:g,onChange:k,onInteract:A,value:ee}),t[30]=g,t[31]=ee,t[32]=k,t[33]=A,t[34]=j):j=t[34];let M=!y,N=`${g} hex value`,P=`${n}-hex`,F;t[35]!==a||t[36]!==n?(F=e=>a(n,e.currentTarget.value),t[35]=a,t[36]=n,t[37]=F):F=t[37];let I,L;t[38]!==o||t[39]!==n?(I=()=>o?.(n),L=()=>o?.(n),t[38]=o,t[39]=n,t[40]=I,t[41]=L):(I=t[40],L=t[41]);let R;t[42]!==te||t[43]!==M||t[44]!==N||t[45]!==P||t[46]!==F||t[47]!==I||t[48]!==L?(R=(0,B.jsx)(re,{"aria-invalid":M,"aria-label":N,className:`w-28 shrink-0`,font:`mono`,id:P,nativeInput:!0,onChange:F,onFocus:I,onPointerDown:L,size:`compact`,value:te}),t[42]=te,t[43]=M,t[44]=N,t[45]=P,t[46]=F,t[47]=I,t[48]=L,t[49]=R):R=t[49];let z;t[50]!==j||t[51]!==R?(z=(0,B.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[j,R]}),t[50]=j,t[51]=R,t[52]=z):z=t[52];let H;return t[53]!==n||t[54]!==O||t[55]!==z||t[56]!==x?(H=(0,B.jsxs)(`div`,{className:x,"data-theme-color-role":n,children:[O,z]}),t[53]=n,t[54]=O,t[55]=z,t[56]=x,t[57]=H):H=t[57],H}),ue=[`background`,`border`,`foreground`],G=`data-theme-inspector-match`,K=`data-theme-token-probe`,q=`#01fea7`,J=`#fe01a7`,Y=`theme-inspector-spotlight`,de=`theme-inspector-spotlight-mask`,fe=`theme-inspector-spotlight-glow`,X=`theme-inspector-hover`,pe=`http://www.w3.org/2000/svg`,me={background:`canvas`,foreground:`text`,card:`surface`,"card-foreground":`text`,popover:`surfaceOverlay`,"popover-foreground":`text`,"surface-raised":`surfaceRaised`,primary:`messageAction`,"primary-foreground":`messageActionForeground`,secondary:`secondary`,"secondary-foreground":`secondaryForeground`,muted:`muted`,"muted-foreground":`mutedForeground`,placeholder:`placeholder`,"secondary-label":`secondaryLabel`,"icon-muted":`iconMuted`,accent:`accentSurface`,"accent-foreground":`accentSurfaceForeground`,destructive:`error`,"destructive-foreground":`errorForeground`,error:`error`,"error-foreground":`errorForeground`,"error-surface":`errorSurface`,warning:`warning`,"warning-foreground":`warningForeground`,"warning-surface":`warningSurface`,update:`update`,"update-foreground":`updateForeground`,"update-surface":`updateSurface`,message:`messageSurface`,"message-foreground":`messageForeground`,"message-action":`messageAction`,"message-action-foreground":`messageActionForeground`,"message-action-hover":`messageActionHover`,sidebar:`sidebar`,"sidebar-foreground":`sidebarForeground`,"sidebar-muted-foreground":`sidebarMutedForeground`,"sidebar-control-surface":`sidebarControlSurface`,"sidebar-row-hover":`sidebarRowHover`,"sidebar-row-active":`sidebarRowActive`,"sidebar-row-selected":`sidebarRowSelected`,"sidebar-border":`sidebarBorder`,border:`border`,input:`input`,ring:`focus`},he={background:[`bg-`],border:[`border-`,`outline-`,`ring-`],foreground:[`text-`,`caret-`,`fill-`,`stroke-`]};function Z(e){document.querySelectorAll(`[${e}]`).forEach(t=>t.removeAttribute(e))}function ge(){Z(G),document.getElementById(Y)?.remove()}function _e(){document.getElementById(X)?.remove()}function Q(e){return document.createElementNS(pe,e)}function ve(e){let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0||t.right<0||t.bottom<0||t.left>window.innerWidth||t.top>window.innerHeight)return null;let n=t.left-5,r=t.top-5,i=Number.parseFloat(window.getComputedStyle(e).borderTopLeftRadius)||0;return{x:n,y:r,width:t.width+10,height:t.height+10,radius:Math.min(18,Math.max(7,i+5))}}function ye(e,t){let n=ve(e.element);if(!n){_e();return}let r=document.getElementById(X);if(!r){r=document.createElement(`div`),r.id=X,r.setAttribute(`aria-hidden`,`true`);let e=document.createElement(`span`);e.dataset.themeInspectorHoverLabel=``,r.append(e),document.body.append(r)}r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.borderRadius=`${n.radius}px`,r.dataset.placement=n.y<32?`below`:`above`;let i=r.querySelector(`[data-theme-inspector-hover-label]`);i&&(i.textContent=t)}function be(e){let t=new Map;for(let n of e){let e=ve(n);if(!e)continue;let r=[e.x,e.y,e.width,e.height].map(e=>Math.round(e)).join(`:`);t.set(r,e)}if(t.size===0){document.getElementById(Y)?.remove();return}let n=document.getElementById(Y);n||(n=Q(`svg`),n.id=Y,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`),document.body.append(n)),n.setAttribute(`viewBox`,`0 0 ${window.innerWidth} ${window.innerHeight}`);let r=Q(`defs`),i=Q(`mask`);i.id=de,i.setAttribute(`maskUnits`,`userSpaceOnUse`);let a=Q(`rect`);a.setAttribute(`width`,String(window.innerWidth)),a.setAttribute(`height`,String(window.innerHeight)),a.setAttribute(`fill`,`white`),i.append(a);let o=Q(`filter`);o.id=fe,o.setAttribute(`x`,`-50%`),o.setAttribute(`y`,`-50%`),o.setAttribute(`width`,`200%`),o.setAttribute(`height`,`200%`);let s=Q(`feGaussianBlur`);s.setAttribute(`stdDeviation`,`5`),s.setAttribute(`result`,`blur`);let c=Q(`feMerge`),l=Q(`feMergeNode`);l.setAttribute(`in`,`blur`);let u=Q(`feMergeNode`);u.setAttribute(`in`,`SourceGraphic`),c.append(l,u),o.append(s,c),r.append(i,o);let d=Q(`g`);for(let e of t.values()){let t=Q(`rect`);t.setAttribute(`x`,String(e.x)),t.setAttribute(`y`,String(e.y)),t.setAttribute(`width`,String(e.width)),t.setAttribute(`height`,String(e.height)),t.setAttribute(`rx`,String(e.radius)),t.setAttribute(`fill`,`black`),i.append(t);let n=t.cloneNode(!1);n.removeAttribute(`fill`),n.setAttribute(`class`,`theme-inspector-spotlight-glow`),n.setAttribute(`filter`,`url(#${fe})`),d.append(n)}let f=Q(`rect`);f.setAttribute(`class`,`theme-inspector-spotlight-dimmer`),f.setAttribute(`width`,String(window.innerWidth)),f.setAttribute(`height`,String(window.innerHeight)),f.setAttribute(`mask`,`url(#${de})`),n.replaceChildren(r,f,d)}function xe(){be([...document.querySelectorAll(`[${G}]`)])}function Se(e){return e.matches(`input, textarea, select, option`)?!0:Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&!!e.textContent?.trim())}function Ce(e,{forHitTest:t=!1}={}){let n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`||Number(n.opacity)===0)return null;let r=[];for(let[e,t,i]of[[n.borderTopColor,n.borderTopStyle,n.borderTopWidth],[n.borderRightColor,n.borderRightStyle,n.borderRightWidth],[n.borderBottomColor,n.borderBottomStyle,n.borderBottomWidth],[n.borderLeftColor,n.borderLeftStyle,n.borderLeftWidth]])t!==`none`&&Number.parseFloat(i)>0&&r.push(e);n.outlineStyle!==`none`&&Number.parseFloat(n.outlineWidth)>0&&r.push(n.outlineColor),n.borderImageSource!==`none`&&r.push(n.borderImageSource),n.boxShadow!==`none`&&r.push(n.boxShadow);let i=[];return(t||Se(e))&&i.push(n.color),e instanceof SVGElement&&i.push(n.fill,n.stroke),e.matches(`input, textarea`)&&i.push(n.caretColor),n.textDecorationLine!==`none`&&i.push(n.textDecorationColor),n.textShadow!==`none`&&i.push(n.textShadow),{background:[n.backgroundColor,n.backgroundImage].join(`
2
+ `),border:r.join(`
3
+ `),foreground:i.join(`
4
+ `)}}function we(e,t){return ue.filter(n=>e[n]!==t[n])}function Te(e){let t=document.documentElement,n=t.hasAttribute(K);n||t.setAttribute(K,``);try{return e()}finally{window.getComputedStyle(t).color,n||t.removeAttribute(K)}}function $(e){let t=document.documentElement,n=S(e),r=t.style.getPropertyValue(n),i=t.style.getPropertyPriority(n),a=r.trim().toLowerCase()===q?J:q;return t.style.setProperty(n,a,`important`),()=>{r?t.style.setProperty(n,r,i):t.style.removeProperty(n)}}function Ee(e){let t=e.map($);return()=>{for(let e of t.toReversed())e()}}function De(){return[document.body,...document.body.querySelectorAll(`*`)].filter(e=>!e.closest(`[data-theme-editor-panel]`)&&!e.closest(`#${Y}, #${X}`))}function Oe(e,t){if(e.includes(`:`))return null;for(let n of he[t])if(e.startsWith(n))return me[e.slice(n.length).split(`/`,1)[0]??``]??null;return null}function ke(e){for(let t of ue)for(let n of e.classList){let e=Oe(n,t);if(e)return e}return null}function Ae(e){let t=[],n=e;for(;n&&n!==document.documentElement;)n.closest(`[data-theme-editor-panel]`)||t.push(n),n=n.parentElement;return t}function je(e){if(e.closest(`[data-theme-editor-panel]`))return null;for(let t of Ae(e)){let e=ke(t);if(e)return{element:t,role:e}}return null}function Me(e){performance.now(),Z(G);let t=De(),n=performance.now(),r=Te(()=>{let n=new Map;for(let e of t){let t=Ce(e);t&&n.set(e,t)}let r=Ee(e),i=new Set;try{for(let[e,t]of n){let n=Ce(e);n&&we(t,n).length>0&&i.add(e)}}finally{r()}return i});performance.now()-n;let i=new Set;for(let e of r)i.add(e instanceof SVGElement?e.closest(`svg`)??e:e);for(let e of i)e.setAttribute(G,``);return be([...i]),i.size}function Ne(e){if(e.closest(`[data-theme-editor-panel]`))return null;let t=Ae(e),n=je(e);if(n)return n;let r=Te(()=>{let e=new Map,n=new Map;for(let n of t){let t=Ce(n,{forHitTest:!0});t&&e.set(n,t)}for(let t of x){let r=$(t);try{for(let[r,i]of e){let e=Ce(r,{forHitTest:!0});if(!e)continue;let a=n.get(r)??{};for(let n of we(i,e))a[n]??=t;n.set(r,a)}}finally{r()}}return n});for(let e of t){let t=r.get(e);if(t)for(let n of ue){let r=t[n];if(r)return{element:e,role:r}}}return null}var Pe=[`canvas`,`accent`],Fe=[{id:`foundation`,title:`Foundation`,families:[{id:`background`,label:`Background`,role:`canvas`,roles:[`canvas`,`chrome`,`toolbar`]},{id:`surface`,label:`Surface`,role:`surface`,roles:[`surface`]},{id:`raised-surface`,label:`Raised surface`,role:`surfaceRaised`,roles:[`surfaceRaised`]},{id:`overlay`,label:`Overlay`,role:`surfaceOverlay`,roles:[`surfaceOverlay`]},{id:`text`,label:`Text`,role:`text`,roles:[`text`,`toolbarForeground`,`toolbarControlForeground`]},{id:`muted-text`,label:`Muted text`,role:`mutedForeground`,roles:[`textMuted`,`mutedForeground`,`placeholder`,`secondaryLabel`,`iconMuted`,`sidebarMutedForeground`]},{id:`border`,label:`Border`,role:`border`,roles:[`border`,`toolbarBorder`,`sidebarBorder`]},{id:`input`,label:`Input`,role:`input`,roles:[`input`]}]},{id:`brand-content`,title:`Brand & content`,families:[{id:`subtle-surface`,label:`Subtle surface`,role:`secondary`,roles:[`secondary`,`secondaryForeground`,`muted`,`toolbarControl`]},{id:`highlight-surface`,label:`Highlight surface`,role:`accentSurface`,roles:[`accentSurface`,`accentSurfaceForeground`,`toolbarControlHover`]},{id:`accent`,label:`Accent`,role:`accent`,roles:[`accent`,`accentForeground`,`focus`,`update`,`updateForeground`,`updateSurface`,`terminalCursor`]},{id:`action`,label:`Action`,role:`messageAction`,roles:[`messageAction`,`messageActionForeground`,`messageActionHover`]},{id:`message-surface`,label:`Message surface`,role:`messageSurface`,roles:[`messageSurface`,`messageForeground`]},{id:`code-surface`,label:`Code surface`,role:`codeBackground`,roles:[`codeBackground`,`codeForeground`]}]},{id:`search`,title:`Search`,families:[{id:`search-matches`,label:`Search matches`,role:`searchMatchBackground`,roles:[`searchMatchBackground`,`searchMatchForeground`]},{id:`current-match`,label:`Current match`,role:`searchMatchActiveBackground`,roles:[`searchMatchActiveBackground`,`searchMatchActiveForeground`]}]},{id:`context`,title:`Context`,families:[{id:`sidebar-background`,label:`Sidebar background`,role:`sidebar`,roles:[`sidebar`,`sidebarForeground`]},{id:`sidebar-controls`,label:`Sidebar controls`,role:`sidebarControlSurface`,roles:[`sidebarControlSurface`]},{id:`sidebar-selection`,label:`Sidebar selection`,role:`sidebarRowSelected`,roles:[`sidebarRowHover`,`sidebarRowActive`,`sidebarRowSelected`]},{id:`terminal-background`,label:`Terminal background`,role:`terminalBackground`,roles:[`terminalBackground`,`terminalForeground`,`terminalSelection`,`terminalScrollbar`,`terminalScrollbarHover`]}]},{id:`status`,title:`Status`,families:[{id:`error`,label:`Error`,role:`error`,roles:[`error`,`errorForeground`,`errorSurface`]},{id:`warning`,label:`Warning`,role:`warning`,roles:[`warning`,`warningForeground`,`warningSurface`]}]}],Ie=Fe.flatMap(e=>e.families),Le=new Map(Ie.flatMap(e=>e.roles.map(t=>[t,e])));function Re(e){return Le.get(e)??null}function ze(e){return{...C(e)}}function Be(){return{light:ze(`light`),dark:ze(`dark`)}}function Ve(e){return h(e.trim())}function He(e,t){let n=C(e);return T(e,Ve(t.canvas)?t.canvas:n.canvas,Ve(t.accent)?t.accent:n.accent)}function Ue({open:e,onOpenChange:t,onSaved:n,editingTheme:a,initialAppearance:p,seedTheme:h,seedName:_,restoreTheme:S}){let C=a!==null,[T,k]=(0,z.useState)(``),[A,j]=(0,z.useState)(p),[M,N]=(0,z.useState)(!1),[P,F]=(0,z.useState)(()=>Be()),[ie,H]=(0,z.useState)({light:!1,dark:!1}),[ae,oe]=(0,z.useState)(!1),[se,U]=(0,z.useState)(null),[W,ce]=(0,z.useState)(!1),[ue,G]=(0,z.useState)(``),[K,q]=(0,z.useState)(!1),[J,Y]=(0,z.useState)(null),[de,fe]=(0,z.useState)(null),[X,pe]=(0,z.useState)(null),[me,he]=(0,z.useState)(null),Z=(0,z.useRef)(null),Q=(0,z.useRef)(null),ve=(0,z.useRef)(null);(0,z.useEffect)(()=>{if(!e)return;let t=()=>{let e,t;he(n=>n&&(e=Math.max(280,Math.min(n.width,window.innerWidth-16)),t=Math.max(220,Math.min(n.height,window.innerHeight-16)),{width:e,height:t})),pe(n=>{if(!n)return n;let r=$e(n.x,n.y,e),i=W?Z.current?.offsetHeight??0:t??Z.current?.offsetHeight??0,a=Math.max(8,window.innerHeight-i-8);return{x:r.x,y:Math.min(r.y,a)}})};return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[W,e]);let[be,Se]=(0,z.useState)(!1),Ce=(0,z.useRef)(!1);(0,z.useEffect)(()=>{if(e&&!Ce.current){let e=a??h??null,t=Be(),n=e?te(e,p)?p:e.appearance:p;if(e){t[e.appearance]={...e.colors};for(let n of[`light`,`dark`]){let r=e.variants?.[n];r&&(t[n]={...r})}}k(a?.label??_??``),j(n),N(e!==null&&e.managed!==!0),H({light:!1,dark:!1}),oe(e!==null&&e.managed!==!0),F(t),Y(null),fe(null),q(!1),U(null),Se(!0)}!e&&be&&Se(!1),Ce.current=e},[a,p,be,e,_,h]);let we=ee(T),Te=T.trim().toLowerCase(),$=Te===``?null:ne().find(e=>e.id!==a?.id&&(e.id===we||e.label.trim().toLowerCase()===Te))??null,Ee=$?E($):[],De=a?E(a):null,Oe=e=>De&&!De.includes(e)?`“${a?.label}” has no ${e} palette. Create a theme with the same name to add one.`:!C&&Ee.includes(e)?`“${$?.label}” already has a ${e} palette.`:null,ke=$?.id??null,Ae=Ee.join(`,`);(0,z.useEffect)(()=>{if(C||ke===null)return;let e=Ae.split(`,`).filter(Boolean);e.length===1&&j(t=>e.includes(t)?e[0]===`light`?`dark`:`light`:t)},[C,ke,Ae]),(0,z.useEffect)(()=>{e&&be&&w(P[A],A)},[A,P,be,e]),(0,z.useEffect)(()=>{if(e)return()=>{S()}},[e,S]);let Ie=(0,z.useCallback)((e,t)=>{F(n=>{let r={...n[A],[e]:t},i=!M&&Pe.includes(e)&&Ve(t);return{...n,[A]:M?g(A,n[A],e,t):i?He(A,r):r}}),!M&&Pe.includes(e)&&Ve(t)&&H(e=>({...e,[A]:!0})),M&&oe(!0)},[A,M]),Le=(0,z.useCallback)((e,t=!1)=>{let n=Re(e)?.role??e;Y(n),Pe.includes(n)||(N(!0),G(``)),t&&requestAnimationFrame(()=>{Z.current?.querySelector(`[data-theme-color-role="${n}"]`)?.scrollIntoView({behavior:`smooth`,block:`nearest`})})},[]),ze=(0,z.useCallback)(e=>{Y(t=>t===e?null:e)},[]),Ue=(0,z.useCallback)(()=>{Y(null),fe(null),q(!1)},[]),We=(J?M?Re(J)?.roles??[J]:Pe.includes(J)?x.filter(e=>P[A][e].trim().toLowerCase()===P[A][J].trim().toLowerCase()):[J]:[]).join(`,`);(0,z.useEffect)(()=>{if(ge(),!e||J===null){fe(null);return}if(K)return;let t=We.split(`,`),n=()=>fe(Me(t));n();let r=null,i=null,a=performance.now(),o=()=>{if(r!==null||i!==null)return;let e=Math.max(0,500-(performance.now()-a)),t=()=>{r=null,i=null,a=performance.now(),n()};e===0?r=requestAnimationFrame(t):i=setTimeout(t,e)},s=new MutationObserver(e=>{e.every(e=>e.target instanceof Element&&(e.target.closest(`#theme-inspector-spotlight`)||e.target.closest(`[data-theme-editor-panel]`)))||o()});s.observe(document.body,{childList:!0,subtree:!0});let c=null,l=()=>{c??=requestAnimationFrame(()=>{c=null,xe()})};return window.addEventListener(`resize`,l),window.addEventListener(`scroll`,l,!0),()=>{s.disconnect(),r!==null&&cancelAnimationFrame(r),i!==null&&clearTimeout(i),c!==null&&cancelAnimationFrame(c),window.removeEventListener(`resize`,l),window.removeEventListener(`scroll`,l,!0),ge()}},[K,e,We,J]),(0,z.useEffect)(()=>{if(!e||!K){_e();return}let t=!1,n=null,r=null,i=null,a=null,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{o(),n=null,r=null,_e()},c=e=>{r=e,ye(e,Re(e.role)?.label??V(e.role))},l=e=>{let t=e.target;if(!(t instanceof Element)||t.closest(`[data-theme-editor-panel]`)){s();return}o(),n=t,r=null;let a=je(t);if(a){c(a);return}_e(),i=window.setTimeout(()=>{if(i=null,n!==t||!t.isConnected)return;let e=Ne(t);e&&c(e)},140)},u=e=>{e.relatedTarget===null&&s()},d=e=>{let i=e.target;if(!(i instanceof Element)||i.closest(`[data-theme-editor-panel]`))return;e.preventDefault(),e.stopPropagation(),o();let a=n===i&&r?r:Ne(i);a&&(s(),Le(a.role,!0),t=!0)},f=e=>{let n=e.target;n instanceof Element&&!n.closest(`[data-theme-editor-panel]`)&&(e.preventDefault(),e.stopPropagation(),t&&q(!1),t=!1)},p=e=>{e.key===`Escape`&&(e.preventDefault(),s(),Ue())},m=()=>{r&&(a??=requestAnimationFrame(()=>{a=null,r&&ye(r,Re(r.role)?.label??V(r.role))}))},h=()=>s();return document.addEventListener(`pointerover`,l,!0),document.addEventListener(`pointerout`,u,!0),document.addEventListener(`pointerdown`,d,!0),document.addEventListener(`click`,f,!0),document.addEventListener(`keydown`,p,!0),window.addEventListener(`resize`,m),window.addEventListener(`scroll`,h,!0),()=>{document.removeEventListener(`pointerover`,l,!0),document.removeEventListener(`pointerout`,u,!0),document.removeEventListener(`pointerdown`,d,!0),document.removeEventListener(`click`,f,!0),document.removeEventListener(`keydown`,p,!0),window.removeEventListener(`resize`,m),window.removeEventListener(`scroll`,h,!0),o(),a!==null&&cancelAnimationFrame(a),_e()}},[Ue,K,e,Le]);let Ge=(0,z.useCallback)(e=>{if(N(e),e||(J&&!Pe.includes(J)&&Y(null),!ae))return;let t=a&&E(a).length>1?[`light`,`dark`]:[A];H(e=>{let n={...e};for(let e of t)n[e]=!0;return n}),F(e=>{let n={...e};for(let r of t)n[r]=He(r,e[r]);return n}),oe(!1)},[A,a,J,ae]),Ke=()=>{if(!T.trim()){U(`Name your theme first.`);return}try{let e=M?P:{light:ie.light?He(`light`,P.light):P.light,dark:ie.dark?He(`dark`,P.dark):P.dark},r,i=null,o=null;if(a&&$){let t=E(a),n=t.find(e=>Ee.includes(e));if(n){U(`“${$.label}” already has a ${n} palette. Pick another name.`);return}i=t[0]??null,r=b({...v({version:1,id:$.id,name:$.label,appearance:$.appearance,colors:$.colors,variants:{...$.variants,...Object.fromEntries(t.map(t=>[t,e[t]]))},...$.managed===!0&&!M?{managed:!0}:{}}),...$.collection?{collection:$.collection}:{}}),o=a;try{m(a.id)}catch(e){try{b($)}catch{}throw e}}else if(a){let t=a.appearance,n=t===`light`?`dark`:`light`;r=b({...v({version:1,id:a.id,name:T,appearance:t,colors:e[t],...E(a).length>1?{variants:{[n]:e[n]}}:{},...M?{}:{managed:!0}}),...a.collection?{collection:a.collection}:{}})}else if($){if(Ee.includes(A)){U(`“${$.label}” already has light and dark palettes. Pick another name.`);return}i=A,r=b({...v({version:1,id:$.id,name:$.label,appearance:$.appearance,colors:$.colors,variants:{...$.variants,[A]:e[A]},...$.managed===!0&&!M?{managed:!0}:{}}),...$.collection?{collection:$.collection}:{}})}else r=y(v({version:1,name:T,appearance:A,colors:e[A],...M?{}:{managed:!0}}));if(!n(r,{created:a===null&&i===null,...i?{mergedAppearance:i}:{}})){if(!a&&i===null)try{m(r.id)}catch{}else if($&&i!==null)try{b($),o&&y(o)}catch{}U(`Theme saved, but it could not be made active. Try again.`);return}t(!1)}catch(e){U(e instanceof Error?e.message:C?`Could not save the theme.`:`Could not create the theme.`)}},qe=()=>(0,B.jsxs)(`label`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] items-center gap-3`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium`,children:`Theme name`}),(0,B.jsx)(re,{autoFocus:!0,size:`sm`,onChange:e=>{k(e.currentTarget.value),U(null)},placeholder:C?`Theme name`:`e.g. Aurora`,value:T})]}),Je=e=>{let t=Oe(e),n=(0,B.jsx)(O,{"aria-disabled":t!==null,value:e,children:e===`light`?`Light`:`Dark`});return t===null?n:(0,B.jsxs)(f,{children:[(0,B.jsx)(l,{render:n}),(0,B.jsx)(d,{children:t})]})},Ye=()=>(0,B.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] items-center gap-3`,children:[(0,B.jsx)(`span`,{className:`text-sm font-medium`,children:`Appearance`}),(0,B.jsxs)(D,{"aria-label":`Theme appearance`,variant:`segmented`,value:[A],onValueChange:e=>{let t=e[0];(t===`light`||t===`dark`)&&Oe(t)===null&&j(t)},children:[Je(`light`),Je(`dark`)]})]}),Xe=()=>(0,B.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)] items-start gap-3`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`h3`,{className:`text-sm font-medium`,children:`Colors`}),M?null:(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Two colors, rest derived`})]}),(0,B.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[M?(0,B.jsx)(re,{"aria-label":`Filter colors`,className:`min-w-0 flex-1`,onChange:e=>G(e.currentTarget.value),placeholder:`Filter colors`,size:`sm`,value:ue}):null,(0,B.jsxs)(`label`,{className:`ml-auto flex shrink-0 cursor-pointer items-center gap-2 pt-0.5 text-sm font-medium`,children:[(0,B.jsx)(`span`,{children:`Advanced`}),(0,B.jsx)(I,{"aria-label":`Use advanced theme colors`,checked:M,onCheckedChange:e=>Ge(!!e)})]})]})]}),Ze=(e,t=`grid gap-2 sm:grid-cols-2`)=>(0,B.jsx)(`div`,{className:t,children:e.map(e=>(0,B.jsx)(le,{label:e.label,onChange:Ie,onSelect:Le,onToggleSelected:ze,role:e.role,selected:J===e.role,value:P[A][e.role]},e.id))}),Qe=()=>{let e=ue.trim().toLowerCase(),t=Fe.map(t=>({...t,families:t.families.filter(t=>!e||[t.label,...t.roles.map(e=>V(e))].join(` `).toLowerCase().includes(e))})).filter(e=>e.families.length>0);return M?(0,B.jsxs)(`div`,{className:`space-y-5`,children:[t.map(e=>(0,B.jsxs)(`section`,{className:`space-y-2`,children:[(0,B.jsx)(`h4`,{className:`text-sm font-medium text-foreground`,children:e.title}),Ze(e.families,`grid gap-1`)]},e.id)),t.length===0?(0,B.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No matches.`}):null]}):(0,B.jsx)(`div`,{className:`grid gap-1`,children:Pe.map(e=>(0,B.jsx)(le,{onChange:Ie,onSelect:Le,onToggleSelected:ze,role:e,label:e===`canvas`?`Background`:`Accent`,selected:J===e,value:P[A][e]},e))})},$e=(e,t,n)=>{let r=Z.current,i=n??r?.offsetWidth??0;return{x:Math.min(Math.max(e,8),Math.max(8,window.innerWidth-i-8)),y:Math.min(Math.max(t,8),Math.max(8,window.innerHeight-48))}},et=e=>{if(e.target.closest(`button, input, a`))return;let t=Z.current?.getBoundingClientRect();t&&(Q.current={dx:e.clientX-t.x,dy:e.clientY-t.y},e.currentTarget.setPointerCapture(e.pointerId))},tt=e=>{let t=Q.current;t&&pe($e(e.clientX-t.dx,e.clientY-t.dy))},nt=()=>{Q.current=null},rt=e=>{let t=Z.current?.getBoundingClientRect();t&&(e.preventDefault(),X===null&&pe($e(t.x,t.y)),ve.current={pointerX:e.clientX,pointerY:e.clientY,left:t.x,top:t.y,width:t.width,height:t.height},e.currentTarget.setPointerCapture(e.pointerId))},it=e=>{let t=ve.current;if(!t)return;let n=Math.max(280,window.innerWidth-8-t.left),r=Math.max(220,window.innerHeight-8-t.top);he({width:Math.min(Math.max(t.width+e.clientX-t.pointerX,280),n),height:Math.min(Math.max(t.height+e.clientY-t.pointerY,220),r)})},at=()=>{ve.current=null};return(0,B.jsxs)(`div`,{"aria-label":C?`Edit theme`:`Create theme`,className:i(`dialog-glass fixed z-[110] flex max-h-[min(42rem,calc(100dvh-6rem))] w-[min(26rem,calc(100vw-2rem))] flex-col overflow-hidden rounded-xl border text-popover-foreground`,X===null&&`bottom-4 right-4`,W&&`max-h-none`),"data-theme-editor-panel":!0,ref:Z,role:`dialog`,style:{...X?{left:X.x,top:X.y}:{},...me?{width:me.width}:{},...me&&!W?{height:me.height,maxHeight:`calc(100dvh - 1rem)`}:{}},children:[(0,B.jsxs)(`div`,{className:`flex cursor-grab touch-none select-none items-center gap-1 border-b border-border/70 px-3 py-2 active:cursor-grabbing`,onPointerCancel:nt,onPointerDown:et,onPointerMove:tt,onPointerUp:nt,children:[(0,B.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-baseline gap-2`,children:[(0,B.jsx)(`h2`,{className:`shrink-0 truncate text-sm font-medium`,children:C?`Edit theme`:`Create theme`}),W?null:(0,B.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:K?`Select an element · Esc to cancel`:J?`${M?Re(J)?.label??V(J):V(J)} · ${de??0} ${de===1?`use`:`uses`}`:`Select a color below`})]}),(0,B.jsxs)(f,{children:[(0,B.jsx)(l,{render:(0,B.jsxs)(r,{"aria-label":K?`Cancel inspecting app colors`:`Inspect app colors`,"aria-pressed":K,size:`xs`,variant:K?`secondary`:`ghost`,onClick:()=>{if(K){Ue();return}q(!0)},children:[(0,B.jsx)(L,{}),K?`Cancel`:`Inspect`]})}),(0,B.jsx)(d,{"data-theme-editor-panel":``,children:K?`Cancel and clear the selection`:`Pick a color from the app`})]}),(0,B.jsx)(r,{"aria-label":W?`Expand the theme editor`:`Minimize the theme editor`,size:`icon-xs`,variant:`ghost`,onClick:()=>ce(!W),children:(0,B.jsx)(u,{icon:W?R.ChevronUp:R.ChevronDown})}),(0,B.jsx)(r,{"aria-label":`Close the theme editor`,size:`icon-xs`,variant:`ghost`,onClick:()=>t(!1),children:(0,B.jsx)(c,{})})]}),W?null:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-y-auto py-3 pl-3 pr-1.5`,children:[qe(),se?(0,B.jsx)(`p`,{"aria-live":`polite`,className:`text-sm text-destructive`,children:se}):null,Ye(),(0,B.jsxs)(`div`,{className:`space-y-3`,children:[Xe(),Qe()]})]}),(0,B.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t border-border/70 px-3 py-2`,children:[(0,B.jsx)(r,{size:`sm`,variant:`ghost`,onClick:()=>t(!1),children:`Cancel`}),(0,B.jsx)(r,{disabled:!T.trim(),size:`sm`,onClick:Ke,children:C?$?`Merge into “${$.label}”`:`Save changes`:$?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(s,{}),`Add ${A} palette`]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(o,{}),`Create theme`]})})]}),(0,B.jsx)(`div`,{"aria-hidden":!0,className:`absolute bottom-0 right-0 z-10 flex size-5 cursor-se-resize touch-none select-none items-end justify-end p-1 text-muted-foreground/70`,onPointerCancel:at,onPointerDown:rt,onPointerMove:it,onPointerUp:at,children:(0,B.jsx)(`svg`,{className:`size-2.5`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.2`,viewBox:`0 0 8 8`,children:(0,B.jsx)(`path`,{d:`M7 1 1 7M7 4.5 4.5 7`})})})]})]})}export{Ue as ThemeEditorPanel};
5
+ //# sourceMappingURL=ThemeEditorPanel-aEsLfkYx.js.map