@p4code/cli 0.8.37 → 0.9.1

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 (287) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-mInzhqSL.mjs → binCli-B8_9WRM7.mjs} +2563 -2301
  3. package/dist/client/.vite/manifest.json +2008 -2048
  4. package/dist/client/assets/{2NI2N5EU-DVsZziQ3.js → 2NI2N5EU-Cc9Gs6p1.js} +2 -2
  5. package/dist/client/assets/{4UO7MD6I-Cs3yBe-m.js → 4UO7MD6I--tXEX5R9.js} +2 -2
  6. package/dist/client/assets/{5B3SVYGG-CxW0L1iX.js → 5B3SVYGG-CPRAqyzZ.js} +2 -2
  7. package/dist/client/assets/{5GK6JWQ2-Cb25PEnx.js → 5GK6JWQ2-OC2-LRPx.js} +2 -2
  8. package/dist/client/assets/{5N7A7DKN-udLyT643.js → 5N7A7DKN-BUa1-OZ6.js} +2 -2
  9. package/dist/client/assets/{5OC2THR4-DqD-reis.js → 5OC2THR4-DKcwc3u1.js} +2 -2
  10. package/dist/client/assets/{5S6HY5KT-Cy7mIKKq.js → 5S6HY5KT-Dqth6iG8.js} +2 -2
  11. package/dist/client/assets/{6IMQ5BUJ-Qu9PVsT7.js → 6IMQ5BUJ-DmEcg0r1.js} +2 -2
  12. package/dist/client/assets/{6OLKWJ4F-BYzZS9mf.js → 6OLKWJ4F-W-G6qP3r.js} +2 -2
  13. package/dist/client/assets/{74OO7NKP-h3ga2-vb.js → 74OO7NKP-u02yiNi7.js} +2 -2
  14. package/dist/client/assets/{75O6YZUN-ByAK3P56.js → 75O6YZUN-xx4y2KbP.js} +2 -2
  15. package/dist/client/assets/{77XECAW3-D_lZqaZv.js → 77XECAW3-SIARa2Fi.js} +2 -2
  16. package/dist/client/assets/{ABYRPUBD-BPWfXZyu.js → ABYRPUBD-B_0r9NT4.js} +2 -2
  17. package/dist/client/assets/AlertDialogRoot-D5eL1YFA.js +2 -0
  18. package/dist/client/assets/{AnimatedHeight-D0-6CAPr.js → AnimatedHeight-BZhIfVtA.js} +2 -2
  19. package/dist/client/assets/AuthSurfaceShell-DPlJfFlL.js +2 -0
  20. package/dist/client/assets/{BB2UYUI2-CGgafKC2.js → BB2UYUI2-CujjjZN9.js} +2 -2
  21. package/dist/client/assets/{BUM34MOA-Cn4iaSBT.js → BUM34MOA-NuuTH6rj.js} +2 -2
  22. package/dist/client/assets/{CEQABKGZ-CmBEfzh3.js → CEQABKGZ-DDaGayTm.js} +2 -2
  23. package/dist/client/assets/{CXAC5362-xibpmz3Y.js → CXAC5362-CB6ETtV8.js} +2 -2
  24. package/dist/client/assets/{ChatGptUsageButton-DU3PVHJW.js → ChatGptUsageButton-DqJ-vZMe.js} +2 -2
  25. package/dist/client/assets/{ChatMarkdown-D-cNSjFn.js → ChatMarkdown-C94Vrzqf.js} +7 -7
  26. package/dist/client/assets/{CheckboxIndicator-CZCy38xt.js → CheckboxIndicator-DZ8vBLEv.js} +2 -2
  27. package/dist/client/assets/{ClippedText-D_rM_XDj.js → ClippedText-Dswe5Mb4.js} +2 -2
  28. package/dist/client/assets/CodexSetupSection.logic-DOe05Yxb.js +2 -0
  29. package/dist/client/assets/{ComboboxClear-tOmMpuVi.js → ComboboxClear-By718biy.js} +2 -2
  30. package/dist/client/assets/{ComboboxGroupLabel-CgZZIHwV.js → ComboboxGroupLabel-DjWIIS5_.js} +2 -2
  31. package/dist/client/assets/{CommandBlock-6rjypfVF.js → CommandBlock-BUY_4yYG.js} +2 -2
  32. package/dist/client/assets/{ComposerPromptEditor-Dxfhec2W.js → ComposerPromptEditor-BXlsIVOQ.js} +10 -10
  33. package/dist/client/assets/{CompositeRoot-Bsb8efI6.js → CompositeRoot-BFPe8O0M.js} +2 -2
  34. package/dist/client/assets/{ConnectionDiagnosisDetails-Q0M5gCCf.js → ConnectionDiagnosisDetails-DoemNrMF.js} +2 -2
  35. package/dist/client/assets/{ConnectionStatusDot-DAuD0jkU.js → ConnectionStatusDot-wmgCjAfF.js} +2 -2
  36. package/dist/client/assets/{DRLTVNUE-BVseXOzv.js → DRLTVNUE-D0oW6kzx.js} +2 -2
  37. package/dist/client/assets/{DYY6UVD2-Bz33D3dq.js → DYY6UVD2-DBOhEG0-.js} +2 -2
  38. package/dist/client/assets/{DevicePanel-CsSQr7vQ.js → DevicePanel-B5VTFku5.js} +2 -2
  39. package/dist/client/assets/DeviceSetup-C7hesHao.js +2 -0
  40. package/dist/client/assets/{DialogTitle-bcvBtKP-.js → DialogTitle-DNp9zThp.js} +2 -2
  41. package/dist/client/assets/{DiffCommentAnnotation-bhzNqujM.js → DiffCommentAnnotation-DDYXWdY5.js} +2 -2
  42. package/dist/client/assets/{DiffFileTree-BySeJqhq.js → DiffFileTree-SBs4YWHB.js} +2 -2
  43. package/dist/client/assets/{DiffPanel-CCFas4eA.js → DiffPanel-Cd7uZSwI.js} +2 -2
  44. package/dist/client/assets/{DiffWorkerPoolProvider-CkkqWbz-.js → DiffWorkerPoolProvider-elvn0oLt.js} +3 -3
  45. package/dist/client/assets/{EmbeddedDesign-iuThcPT3.js → EmbeddedDesign-BDMR5UJo.js} +2 -2
  46. package/dist/client/assets/{EnvironmentMachineIcon-iUmoTUYt.js → EnvironmentMachineIcon-DBWK6C8T.js} +2 -2
  47. package/dist/client/assets/{ExpandableText-ByCx68yv.js → ExpandableText-B9cfY7p2.js} +2 -2
  48. package/dist/client/assets/{FNOVOB4O-DK3iet1g.js → FNOVOB4O-C55ATzH6.js} +2 -2
  49. package/dist/client/assets/{FieldControl-DtsEariK.js → FieldControl-BOrs67_f.js} +2 -2
  50. package/dist/client/assets/{FileDiff-Bu2BSqBV.js → FileDiff-DpQM5r9o.js} +2 -2
  51. package/dist/client/assets/{FilePreviewPanel-8cI8gciT.js → FilePreviewPanel-DWeewVws.js} +10 -10
  52. package/dist/client/assets/{FoldedSettingsSection-RYq8GTvV.js → FoldedSettingsSection-KMTLX6MR.js} +2 -2
  53. package/dist/client/assets/{FormContext-CIK8MKa2.js → FormContext-DcLeIpxJ.js} +2 -2
  54. package/dist/client/assets/{HDGCDEEZ-B_J1N6RY.js → HDGCDEEZ-BhXkP8CI.js} +2 -2
  55. package/dist/client/assets/{HSJLKHB7-B2SbZQUf.js → HSJLKHB7-ad9jby8d.js} +2 -2
  56. package/dist/client/assets/{Icons-xsXA_L6w.js → Icons-B1qw9fnR.js} +2 -2
  57. package/dist/client/assets/Input-DQflEYBs.js +2 -0
  58. package/dist/client/assets/JZOYTAAL-CifPXszn.js +1 -0
  59. package/dist/client/assets/{K3MD6TGW-VU68yYxr.js → K3MD6TGW-CG-BXshu.js} +2 -2
  60. package/dist/client/assets/{K7RP3OMA-zaD_NBVC.js → K7RP3OMA-Dvs72E71.js} +2 -2
  61. package/dist/client/assets/{KeybindingsSettings.logic-BJe27xmi.js → KeybindingsSettings.logic-BA5WG7V2.js} +2 -2
  62. package/dist/client/assets/{LHDIQX7Q-DCLqoRGy.js → LHDIQX7Q-DBbVLdBb.js} +2 -2
  63. package/dist/client/assets/{LUXOKEGN-CmxZpSzC.js → LUXOKEGN-B8HcSY56.js} +2 -2
  64. package/dist/client/assets/{MathTypeset-Hhqwg4PF.js → MathTypeset-D0cDlCZy.js} +2 -2
  65. package/dist/client/assets/{N3JZAHOW-Cev8Cn9M.js → N3JZAHOW-BXwh9_vP.js} +2 -2
  66. package/dist/client/assets/{NUIALGQ3-CV92Kt25.js → NUIALGQ3-ClxnUm8B.js} +2 -2
  67. package/dist/client/assets/{NoProjectsHero-CMqIlSNl.js → NoProjectsHero-Bn4v5ofT.js} +2 -2
  68. package/dist/client/assets/{O65XPQGZ-bGyTGMsB.js → O65XPQGZ-BEEpAP2l.js} +2 -2
  69. package/dist/client/assets/{O7XIQ6OM-DVdEfB1N.js → O7XIQ6OM-CkSDwviv.js} +2 -2
  70. package/dist/client/assets/{OFQON5FD-Ca_CNS26.js → OFQON5FD-4EbpxjZS.js} +2 -2
  71. package/dist/client/assets/{P4ConnectAccountPages-Buss2oTL.js → P4ConnectAccountPages-DgxvyIGG.js} +2 -2
  72. package/dist/client/assets/{P4ConnectSidebarSignIn-D1n4y6Gq.js → P4ConnectSidebarSignIn-Bn9hP_6_.js} +2 -2
  73. package/dist/client/assets/{PJQHF43J-B__IdKwP.js → PJQHF43J-D_j27v4O.js} +2 -2
  74. package/dist/client/assets/{PanelLayoutControls-EIunk_2Q.js → PanelLayoutControls-BHEJEPDp.js} +7 -7
  75. package/dist/client/assets/{PierreEntryIcon-GQImyog1.js → PierreEntryIcon-BCv2OXDn.js} +2 -2
  76. package/dist/client/assets/{PopoverHandle-Cj5egwXv.js → PopoverHandle-CqjlXffy.js} +2 -2
  77. package/dist/client/assets/PreviewPanel-D3CQGyTY.js +2 -0
  78. package/dist/client/assets/{ProjectDefaultsSettings-DX2Kf-tx.js → ProjectDefaultsSettings-CqigWqDQ.js} +2 -2
  79. package/dist/client/assets/{ProjectFavicon-OMOnEzVu.js → ProjectFavicon-BzkwZEKX.js} +3 -3
  80. package/dist/client/assets/{ProjectIconPickerDialog-Q4GkqwDs.js → ProjectIconPickerDialog-Bl7a1F6c.js} +2 -2
  81. package/dist/client/assets/{ProjectMonogram-Br5sgd24.js → ProjectMonogram-Ba70a8_s.js} +2 -2
  82. package/dist/client/assets/{ProviderAuthTerminal-Q584HoOn.js → ProviderAuthTerminal-BxyDTl04.js} +2 -2
  83. package/dist/client/assets/{ProviderModelPicker-JNM9nJs_.js → ProviderModelPicker-BjWN45iR.js} +2 -2
  84. package/dist/client/assets/{ProviderSettingsForm-CdiKhrJE.js → ProviderSettingsForm-9qRf6JzH.js} +2 -2
  85. package/dist/client/assets/{PullRequestCodeTab-Co76Qf6Z.js → PullRequestCodeTab-2fq1MIQq.js} +3 -3
  86. package/dist/client/assets/{RHNBAITX-Oryl0UiR.js → RHNBAITX-DaSH9fj2.js} +2 -2
  87. package/dist/client/assets/{ReadOnlySourcePreview-aUjexBVb.js → ReadOnlySourcePreview-CUL87R5C.js} +2 -2
  88. package/dist/client/assets/{RenderErrorBoundary-Oe5BzG3n.js → RenderErrorBoundary-CEX4aXRH.js} +2 -2
  89. package/dist/client/assets/{SLD4V6NK-DbsINoTD.js → SLD4V6NK-BPOaMXu1.js} +2 -2
  90. package/dist/client/assets/ScheduledTasksSettings-BEw_vC1N.js +4 -0
  91. package/dist/client/assets/{ScopedSwitch-D8-FelRH.js → ScopedSwitch-DPPAQKgb.js} +2 -2
  92. package/dist/client/assets/{ScrollAreaCorner-nnFi-Ecx.js → ScrollAreaCorner-DF4GCx0d.js} +2 -2
  93. package/dist/client/assets/{SecretInput-CqAhFuNO.js → SecretInput-Dg6ZsU9p.js} +2 -2
  94. package/dist/client/assets/{SelectScrollUpArrow-BQJrvk31.js → SelectScrollUpArrow-DeRXucOo.js} +2 -2
  95. package/dist/client/assets/{SettingsPanels-CNgY_ZPe.js → SettingsPanels-wkOx3NMK.js} +8 -8
  96. package/dist/client/assets/{SettingsPanels.logic-Dr_NyHjE.js → SettingsPanels.logic-BwMoKlP_.js} +2 -2
  97. package/dist/client/assets/{SettingsScopeNotice-BFxCBOnl.js → SettingsScopeNotice-5BIXPKKZ.js} +2 -2
  98. package/dist/client/assets/SidebarStageBackdrop-Cc8Os5aB.js +2 -0
  99. package/dist/client/assets/{T3PCR2KE-2R1FY5zG.js → T3PCR2KE-DF_ihTb_.js} +2 -2
  100. package/dist/client/assets/{TKWO2OVW-BjhIZzCe.js → TKWO2OVW-BpYa7JbN.js} +2 -2
  101. package/dist/client/assets/{TSHNXIZL-B_cvoUct.js → TSHNXIZL-icuUBQJZ.js} +2 -2
  102. package/dist/client/assets/ThemeEditorPanel-K5Z_cKr_.js +5 -0
  103. package/dist/client/assets/{ThreadTerminalDrawer-DHoyxd6-.js → ThreadTerminalDrawer-BEzEKbGr.js} +4 -4
  104. package/dist/client/assets/TooltipViewport-DJXNIjFt.js +2 -0
  105. package/dist/client/assets/{UQJE5E4I-2r98lr05.js → UQJE5E4I-jTtBmXGD.js} +2 -2
  106. package/dist/client/assets/{USNYFO5S-CvTI5t_o.js → USNYFO5S-COMhBWxE.js} +2 -2
  107. package/dist/client/assets/{Virtualizer-BgcEI5KE.js → Virtualizer-3W_tqqHL.js} +2 -2
  108. package/dist/client/assets/{WEVWDWVA-U7ygIdf3.js → WEVWDWVA-DoGSbgZU.js} +2 -2
  109. package/dist/client/assets/{WorkspaceBreadcrumb-_zND61qF.js → WorkspaceBreadcrumb-Dr-p0Dtn.js} +2 -2
  110. package/dist/client/assets/{WorkspacePageContainer-LYv_7Qc0.js → WorkspacePageContainer-MDWEFwmu.js} +2 -2
  111. package/dist/client/assets/{WorkspacePageHeader-B_0ute56.js → WorkspacePageHeader-CNcKDaqG.js} +2 -2
  112. package/dist/client/assets/{X5RFHQXM-D4S0_b0W.js → X5RFHQXM-pFbOarC5.js} +2 -2
  113. package/dist/client/assets/{X62E3GBT-CrIC4h9P.js → X62E3GBT-CSXB08Iw.js} +2 -2
  114. package/dist/client/assets/{XBNEOJTC-D2_RQZjM.js → XBNEOJTC-CvXlFTiB.js} +2 -2
  115. package/dist/client/assets/{YHV2MVVZ-BmAcJLBt.js → YHV2MVVZ-BxyA2-Iu.js} +2 -2
  116. package/dist/client/assets/{YURCZMG2-RCCTu3bv.js → YURCZMG2-WkhL6rVs.js} +2 -2
  117. package/dist/client/assets/{YVG2LODB-Cvp0Ei-1.js → YVG2LODB-BlCOW5Bm.js} +2 -2
  118. package/dist/client/assets/_chat-B72aqP_1.js +45 -0
  119. package/dist/client/assets/{_chat.design-DX1VqYkX.js → _chat.design-BzS-6FDR.js} +2 -2
  120. package/dist/client/assets/{_chat.index-Dzh3d42S.js → _chat.index-DyO0DElX.js} +2 -2
  121. package/dist/client/assets/{_chat.new-BHRvXFPr.js → _chat.new-Dy39C0PE.js} +3 -3
  122. package/dist/client/assets/_chat.pull-requests-Bzb1CyG6.js +2 -0
  123. package/dist/client/assets/{alert-BN-r9V4f.js → alert-DpVw79VA.js} +2 -2
  124. package/dist/client/assets/{assetUrls-B6vsSVWR.js → assetUrls-DSeSTRY1.js} +2 -2
  125. package/dist/client/assets/{assets-CID0y4Uv.js → assets-B_r3wLhD.js} +2 -2
  126. package/dist/client/assets/{browserHistoryStore-CK4YsfkQ.js → browserHistoryStore-BG8TrOnZ.js} +2 -2
  127. package/dist/client/assets/{browserLinkTarget-BJ30b4-s.js → browserLinkTarget-jRu1-WRM.js} +2 -2
  128. package/dist/client/assets/{checkbox-BJhN1L_L.js → checkbox-4yBjrqWQ.js} +2 -2
  129. package/dist/client/assets/{color-picker-D2LwMwlZ.js → color-picker-B6JEgpDa.js} +2 -2
  130. package/dist/client/assets/{combobox-Cw2-7qyI.js → combobox-CKWbcPIR.js} +2 -2
  131. package/dist/client/assets/{command-BIELTYJu.js → command-D8XZec1r.js} +2 -2
  132. package/dist/client/assets/{connect-D4llmZsa.js → connect-a25FIa26.js} +2 -2
  133. package/dist/client/assets/{connect-agent-BlR0FAbF.js → connect-agent-C1UODlly.js} +2 -2
  134. package/dist/client/assets/{design-Cdl1XCBU.js → design-C7HRMO73.js} +2 -2
  135. package/dist/client/assets/{device-Bc5H3PTz.js → device-BNK9g-io.js} +2 -2
  136. package/dist/client/assets/{dialog-BRtKKGzk.js → dialog-_vbB7RKH.js} +2 -2
  137. package/dist/client/assets/{diffRendering-DtBTalAD.js → diffRendering-UEl_19xa.js} +2 -2
  138. package/dist/client/assets/{dist-oE_MNxpZ.js → dist-ATiHSdUa.js} +3 -3
  139. package/dist/client/assets/{draft-input-vviXwx5Q.js → draft-input-C-u_3cDw.js} +2 -2
  140. package/dist/client/assets/{duoViewer-kcp00m8a.js → duoViewer-C7BduYuF.js} +2 -2
  141. package/dist/client/assets/{dynamic-C8_ODyue.js → dynamic-CFqi-4NG.js} +2 -2
  142. package/dist/client/assets/{embeddedScripts-skldQmE1.js → embeddedScripts-BNfDELW_.js} +2 -2
  143. package/dist/client/assets/{empty-rC3eYvxq.js → empty-BlKDGTzb.js} +2 -2
  144. package/dist/client/assets/{entities-B8Vupv5g.js → entities-pafv-XUM.js} +2 -2
  145. package/dist/client/assets/{fileLinks-BoyzENAX.js → fileLinks-pJLWwULO.js} +2 -2
  146. package/dist/client/assets/{fileTreeExpansion-DndrZZAD.js → fileTreeExpansion-CXgwpUPc.js} +2 -2
  147. package/dist/client/assets/{getDiffFileInput-C1QBFdFu.js → getDiffFileInput-eTK8du_O.js} +2 -2
  148. package/dist/client/assets/{guideRunStore-BgFFILxA.js → guideRunStore-83fw4RPw.js} +2 -2
  149. package/dist/client/assets/{htmlRender-ddkOIEbT.js → htmlRender-C3rZ0xgC.js} +2 -2
  150. package/dist/client/assets/{index-BwdieRvq.js → index-C0oEvzQc.js} +3 -3
  151. package/dist/client/assets/{input-BYd74ook.js → input-DXGWoa4O.js} +2 -2
  152. package/dist/client/assets/{input-group-DMFlSk_7.js → input-group-De0xZXfc.js} +2 -2
  153. package/dist/client/assets/{kbd-rp5mX21h.js → kbd-WWNLIkTn.js} +2 -2
  154. package/dist/client/assets/{keybindings-B_kRk5Fi.js → keybindings-DAHl8jIl.js} +2 -2
  155. package/dist/client/assets/{lazy-CeaQ3-Fj.js → lazy-B292152Q.js} +4 -4
  156. package/dist/client/assets/{lazyRouteComponent-COYyJY2H.js → lazyRouteComponent-BU0ER5FO.js} +2 -2
  157. package/dist/client/assets/{link-CsXnX9WM.js → link-C3TbL1do.js} +2 -2
  158. package/dist/client/assets/{linkedPrompt-B5iI7U8H.js → linkedPrompt-BOQDb8-o.js} +2 -2
  159. package/dist/client/assets/main-Cywp3EWc.js +37 -0
  160. package/dist/client/assets/main-DjrB0l0D.css +2 -0
  161. package/dist/client/assets/{mediaReference-ZW7gfO5X.js → mediaReference-onv8z3Oz.js} +2 -2
  162. package/dist/client/assets/{mediaSource-DsT6G6Wm.js → mediaSource-BhEv5iyl.js} +2 -2
  163. package/dist/client/assets/{number-field-CEA6qXbs.js → number-field-qEfih146.js} +2 -2
  164. package/dist/client/assets/{observeResize-DSyLC8QK.js → observeResize-DzSkewug.js} +2 -2
  165. package/dist/client/assets/{onboarding-BPkAEHBV.js → onboarding-y217_KQL.js} +2 -2
  166. package/dist/client/assets/{openFileInPreview-CGM83ICx.js → openFileInPreview-DeuqxJFn.js} +2 -2
  167. package/dist/client/assets/{p4ProjectFile-CwpteA7b.js → p4ProjectFile-BuzidL5M.js} +2 -2
  168. package/dist/client/assets/{pair-D9v8gc0o.js → pair-BjRq2ZHP.js} +2 -2
  169. package/dist/client/assets/{pendingSendStore-BuEVrrEM.js → pendingSendStore-BFVsboDn.js} +2 -2
  170. package/dist/client/assets/{phoneViewer-CNE0SVmy.js → phoneViewer-DYOR2qAi.js} +2 -2
  171. package/dist/client/assets/{pierre-icons-ChDlOt-h.js → pierre-icons-BDVVO9cA.js} +2 -2
  172. package/dist/client/assets/{popover-BjUpdrKu.js → popover-CogH2zM4.js} +2 -2
  173. package/dist/client/assets/{preview-3EscFepc.js → preview-BoTHkmVi.js} +2 -2
  174. package/dist/client/assets/{preview-DHLYKEKb.js → preview-O1ZL8Awg.js} +2 -2
  175. package/dist/client/assets/{previewMiniPlayerStore-DHjQeV1U.js → previewMiniPlayerStore-C5z1mN8S.js} +2 -2
  176. package/dist/client/assets/{primary-NcsmRI6j.js → primary-DiwDV4KJ.js} +2 -2
  177. package/dist/client/assets/{primaryCloudLinkState-DkXIVBHW.js → primaryCloudLinkState-BgmcA0C5.js} +2 -2
  178. package/dist/client/assets/{projectFilesQueryState-0jxJ50Qq.js → projectFilesQueryState-C_yH-05-.js} +2 -2
  179. package/dist/client/assets/{projectScriptEditor-CMGXoIEJ.js → projectScriptEditor-Cu65VaAw.js} +2 -2
  180. package/dist/client/assets/{providerSkills-4hnESoi_.js → providerSkills-CgtkB3rc.js} +2 -2
  181. package/dist/client/assets/{pullRequestDetail.logic-sbOM8yDW.js → pullRequestDetail.logic-FUlKz34F.js} +2 -2
  182. package/dist/client/assets/{pullRequestIcons-B7Om_B_D.js → pullRequestIcons-DPbMXqGp.js} +2 -2
  183. package/dist/client/assets/{pullRequestReviewStore-CIL8WfOG.js → pullRequestReviewStore-BAxwf6rl.js} +2 -2
  184. package/dist/client/assets/{pullRequests-CMTRCOu7.js → pullRequests-C8-SkuQU.js} +2 -2
  185. package/dist/client/assets/{queries-hhl_J8u9.js → queries-BZGM6AjA.js} +2 -2
  186. package/dist/client/assets/{query-CfGzD8v6.js → query-B3Zo1YOE.js} +2 -2
  187. package/dist/client/assets/{radio-group-up2QNXjf.js → radio-group-l1Zl-3hQ.js} +2 -2
  188. package/dist/client/assets/{renderScheduler-Dgqqs-EX.js → renderScheduler-CGMZZETC.js} +2 -2
  189. package/dist/client/assets/{rightPanelStore-CGF0-d-1.js → rightPanelStore-Cv1U3yrU.js} +2 -2
  190. package/dist/client/assets/{runtime-Ca_Z-vg5.js → runtime-BBIAfWJY.js} +3 -3
  191. package/dist/client/assets/{runtime-OeWFs5Hf.js → runtime-CABaKt1A.js} +3 -3
  192. package/dist/client/assets/{runtimeModeConfig-BTG9FTYe.js → runtimeModeConfig-BQ0QCQhj.js} +2 -2
  193. package/dist/client/assets/{scheduledTasksSettings.logic-BeuOnCov.js → scheduledTasksSettings.logic-DFlgKyt2.js} +2 -2
  194. package/dist/client/assets/{scroll-area-BNQKEZbp.js → scroll-area-CQNIjQ8U.js} +2 -2
  195. package/dist/client/assets/{select-D_zHR42Y.js → select-Cbpdz6n3.js} +2 -2
  196. package/dist/client/assets/{selfImproveFindings-CAZ0j1GD.js → selfImproveFindings-CT79AgdK.js} +2 -2
  197. package/dist/client/assets/{server-6nKYyc8r.js → server-mIR8e8Vz.js} +2 -2
  198. package/dist/client/assets/{session-BxUdP61p.js → session-BlCBDyVn.js} +2 -2
  199. package/dist/client/assets/{session-logic-Dr1plzXe.js → session-logic-CwBN7BBv.js} +3 -3
  200. package/dist/client/assets/{settings-DE_hSu0q.js → settings-fTPmNkCr.js} +2 -2
  201. package/dist/client/assets/{settings.appearance-C--uy4It.js → settings.appearance-D96WohbH.js} +2 -2
  202. package/dist/client/assets/settings.archived-CnXEwX0Z.js +2 -0
  203. package/dist/client/assets/{settings.computer-use-DhnqPqMm.js → settings.computer-use-DZTx8sD-.js} +2 -2
  204. package/dist/client/assets/settings.connections-Rl7zwQ75.js +2 -0
  205. package/dist/client/assets/settings.data-controls-DuyfuMcN.js +2 -0
  206. package/dist/client/assets/{settings.decisions-CU-6rIpn.js → settings.decisions-eRAu1hqY.js} +2 -2
  207. package/dist/client/assets/{settings.designs-DHYhhG4k.js → settings.designs-C0RxEgfD.js} +2 -2
  208. package/dist/client/assets/{settings.diagnostics-csgW1_E8.js → settings.diagnostics-BDo1Ma1e.js} +2 -2
  209. package/dist/client/assets/{settings.general-CeBkrL9-.js → settings.general-CpbG8_Ml.js} +2 -2
  210. package/dist/client/assets/{settings.integrations-DqSYBosl.js → settings.integrations-CujbsXfc.js} +2 -2
  211. package/dist/client/assets/{settings.keybindings-C7D1i238.js → settings.keybindings-CQ5xk9v3.js} +2 -2
  212. package/dist/client/assets/{settings.open-source-licenses-6oFDgAt7.js → settings.open-source-licenses-DIBdHSDB.js} +2 -2
  213. package/dist/client/assets/{settings.plugins-DfM65Xio.js → settings.plugins-BbsrwhRq.js} +4 -4
  214. package/dist/client/assets/settings.projects-BeNHSNe9.js +4 -0
  215. package/dist/client/assets/settings.providers-DQT6izvS.js +3 -0
  216. package/dist/client/assets/{settings.scheduled-tasks-Csi8wfij.js → settings.scheduled-tasks-vKCtN-OC.js} +2 -2
  217. package/dist/client/assets/settings.snap-shot-DgPUS-Zo.js +2 -0
  218. package/dist/client/assets/settings.source-control-B87geXn3.js +2 -0
  219. package/dist/client/assets/{settings.storage-DTcg-0aj.js → settings.storage-BYfdzwhk.js} +2 -2
  220. package/dist/client/assets/{settingsLayout-4ySvFdXb.js → settingsLayout-vgYGia0Q.js} +3 -3
  221. package/dist/client/assets/{sidebar-CHDwV4Ca.js → sidebar-BhJqncti.js} +2 -2
  222. package/dist/client/assets/{sidebarProjectGrouping-BcOVY8p-.js → sidebarProjectGrouping-DaMfJpqc.js} +2 -2
  223. package/dist/client/assets/{skeleton-BcLPbojY.js → skeleton-CFtayHTe.js} +2 -2
  224. package/dist/client/assets/{sourceControl-CPrl7cyO.js → sourceControl-CcPqr0UX.js} +2 -2
  225. package/dist/client/assets/{sourceControlClients-oNOd36Cq.js → sourceControlClients-DtjbXUDt.js} +2 -2
  226. package/dist/client/assets/{spinner-_ourbdVb.js → spinner-BZh9P0sD.js} +2 -2
  227. package/dist/client/assets/{terminal-links-DuZi4b83.js → terminal-links-CFKe0iu0.js} +2 -2
  228. package/dist/client/assets/{terminalSessions-D0vbdqqx.js → terminalSessions-0YYscaVr.js} +2 -2
  229. package/dist/client/assets/{textarea-DlXXDHPJ.js → textarea-hXQFbdrS.js} +2 -2
  230. package/dist/client/assets/themePalette-MbAn2gqj.js +5 -0
  231. package/dist/client/assets/{toast-DXWclCrr.js → toast-D26NINYU.js} +2 -2
  232. package/dist/client/assets/{toggle-Dofc34s2.js → toggle-B03MQDgB.js} +2 -2
  233. package/dist/client/assets/{toggle-group-CYKsfBbD.js → toggle-group-yF5GZ53o.js} +2 -2
  234. package/dist/client/assets/{tooltip-CY3W5y-f.js → tooltip-ChmjT8Ns.js} +2 -2
  235. package/dist/client/assets/uiStateStore-CKKy2mq4.js +2 -0
  236. package/dist/client/assets/{usage-DQcgd75_.js → usage-BDFFNkIV.js} +2 -2
  237. package/dist/client/assets/{usageAccess-CCSxXl9X.js → usageAccess-kgUHYKOw.js} +2 -2
  238. package/dist/client/assets/{usageFormat-ByjmRjTe.js → usageFormat-D5Mz5ugL.js} +2 -2
  239. package/dist/client/assets/{usageShortcuts-DOWm0Vo9.js → usageShortcuts-mAekk3eG.js} +2 -2
  240. package/dist/client/assets/{use-atom-command-vqjL7n-x.js → use-atom-command-C4y634Qy.js} +2 -2
  241. package/dist/client/assets/{useAriaLabelledBy-B7FNFpmO.js → useAriaLabelledBy-DjNn9irU.js} +2 -2
  242. package/dist/client/assets/useHandleNewThread-C7ynA68A.js +2 -0
  243. package/dist/client/assets/{useLocation-B_XV0lDx.js → useLocation-Cwv1HZ3K.js} +2 -2
  244. package/dist/client/assets/{useNavigate-BWqAWfiZ.js → useNavigate-Cdrlv-yJ.js} +2 -2
  245. package/dist/client/assets/{useNavigateBack-C52nbvbb.js → useNavigateBack-CwjQ4iuL.js} +2 -2
  246. package/dist/client/assets/{useP4ConnectAuthPrompt-DKhdNYj8.js → useP4ConnectAuthPrompt-5uCMQUT1.js} +2 -2
  247. package/dist/client/assets/{useParams-ekGanxxb.js → useParams-C5D_t-0u.js} +2 -2
  248. package/dist/client/assets/{usePermissionStatus-CWV_yoZe.js → usePermissionStatus-CKmeNk61.js} +2 -2
  249. package/dist/client/assets/{usePullRequestActions-DxtkLQ5D.js → usePullRequestActions-cmzmOrJ-.js} +2 -2
  250. package/dist/client/assets/{useRegisterFieldControl-BAJIcFiO.js → useRegisterFieldControl-DUs9w2Me.js} +2 -2
  251. package/dist/client/assets/{useScopedModelAvailability-815e0x20.js → useScopedModelAvailability-kczZtr1M.js} +2 -2
  252. package/dist/client/assets/useSettings-CHt2_4He.js +3 -0
  253. package/dist/client/assets/utils-CBe1bHL7.js +37 -0
  254. package/dist/client/assets/{vcsRefInvalidation-CW_MIqdt.js → vcsRefInvalidation-CytQodoP.js} +2 -2
  255. package/dist/client/assets/{welcome-k7S47hyM.js → welcome-pbssrwWd.js} +2 -2
  256. package/dist/client/index.html +1 -1
  257. package/dist/{renderer-Ay-1ojn7.mjs → renderer-BBWgEvuE.mjs} +2 -2
  258. package/dist/{runtime-bP6MSuMS.mjs → runtime-DNjlpJkJ.mjs} +286 -242
  259. package/package.json +1 -1
  260. package/dist/client/assets/AlertDialogRoot-BSP6M0Mu.js +0 -2
  261. package/dist/client/assets/AuthSurfaceShell-30QvY1bI.js +0 -2
  262. package/dist/client/assets/CodexSetupSection.logic-g6_GE4bw.js +0 -2
  263. package/dist/client/assets/DeviceSetup-Cl7L9wsi.js +0 -2
  264. package/dist/client/assets/Input-D3Qi4jCN.js +0 -2
  265. package/dist/client/assets/JZOYTAAL-BlxFvoz4.js +0 -1
  266. package/dist/client/assets/PreviewPanel-BkFeksTl.js +0 -2
  267. package/dist/client/assets/ScheduledTasksSettings-1uXNtcPA.js +0 -4
  268. package/dist/client/assets/ThemeEditorPanel-B7MiqZ90.js +0 -5
  269. package/dist/client/assets/TooltipViewport-ThbbZQDo.js +0 -2
  270. package/dist/client/assets/_chat-CwO3_WVM.js +0 -45
  271. package/dist/client/assets/_chat.pull-requests-BZilN1TK.js +0 -2
  272. package/dist/client/assets/composer-logic-P-jVPXi4.js +0 -6
  273. package/dist/client/assets/composerDraftUploads-S66xDlS0.js +0 -2
  274. package/dist/client/assets/main-DdVSHl80.css +0 -2
  275. package/dist/client/assets/main-VfCRP294.js +0 -29
  276. package/dist/client/assets/settings.archived-D-55XnxQ.js +0 -2
  277. package/dist/client/assets/settings.connections-BPVLazeK.js +0 -2
  278. package/dist/client/assets/settings.data-controls-CIzGvqCI.js +0 -2
  279. package/dist/client/assets/settings.projects-CeoZzdMW.js +0 -4
  280. package/dist/client/assets/settings.providers-BBgppyE3.js +0 -3
  281. package/dist/client/assets/settings.snap-shot-BdVdSIJy.js +0 -2
  282. package/dist/client/assets/settings.source-control-Bme3qg7j.js +0 -2
  283. package/dist/client/assets/themePalette-VIM7Gehx.js +0 -5
  284. package/dist/client/assets/uiStateStore-CdkBStdp.js +0 -6
  285. package/dist/client/assets/useHandleNewThread-BYNZXzR_.js +0 -2
  286. package/dist/client/assets/useSettings-gPlpTIWi.js +0 -3
  287. package/dist/client/assets/utils-DhUt689t.js +0 -37
@@ -1,5 +0,0 @@
1
- import{Gy as e,Nb as t,Xy as n,cb as r,ib as i,vE as a}from"./utils-DhUt689t.js";var o=(e,t)=>{if(typeof e==`number`){if(t===3)return{mode:`rgb`,r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:`rgb`,r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:`rgb`,r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:`rgb`,r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},s={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},c=e=>o(s[e.toLowerCase()],6),l=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,u=e=>{let t;return(t=e.match(l))?o(parseInt(t[1],16),t[1].length):void 0},d=`([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)`;`${d}`;var f=`${d}%`;`${d}`;var p=`(?:${d}%|${d})`,m=`(?:${d}%|${d}|none)`,h=`(?:${d}(deg|grad|rad|turn)|${d})`;`${d}${d}`;var g=`\\s*,\\s*`;RegExp(`^`+m+`$`);var ee=RegExp(`^rgba?\\(\\s*${d}${g}${d}${g}${d}\\s*(?:,\\s*${p}\\s*)?\\)$`),te=RegExp(`^rgba?\\(\\s*${f}${g}${f}${g}${f}\\s*(?:,\\s*${p}\\s*)?\\)$`),ne=e=>{let t={mode:`rgb`},n;if(n=e.match(ee))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(te))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]===void 0?n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))):t.alpha=Math.max(0,Math.min(1,n[4]/100)),t},re=(e,t)=>e===void 0?void 0:typeof e==`object`?e.mode===void 0?t?{...e,mode:t}:void 0:e:be(e),ie=(e=`rgb`)=>t=>(t=re(t,e))===void 0?void 0:t.mode===e?t:_[t.mode][e]?_[t.mode][e](t):e===`rgb`?_[t.mode].rgb(t):_.rgb[e](_[t.mode].rgb(t)),_={},ae={},v=[],oe={},se=e=>e,y=e=>(_[e.mode]={..._[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{_[t]||(_[t]={}),_[t][e.mode]=e.fromMode[t]}),e.ranges||={},e.difference||={},e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]==`function`&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=se)}),ae[e.mode]=e,(e.parse||[]).forEach(t=>{le(t,e.mode)}),ie(e.mode)),ce=e=>ae[e],le=(e,t)=>{if(typeof e==`string`){if(!t)throw Error(`'mode' required when 'parser' is a string`);oe[e]=t}else typeof e==`function`&&v.indexOf(e)<0&&v.push(e)},ue=/[^\x00-\x7F]|[a-zA-Z_]/,de=/[^\x00-\x7F]|[-\w]/,b={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`},x=0;function fe(e){let t=e[x],n=e[x+1];return t===`-`||t===`+`?/\d/.test(n)||n===`.`&&/\d/.test(e[x+2]):t===`.`?/\d/.test(n):/\d/.test(t)}function pe(e){if(x>=e.length)return!1;let t=e[x];if(ue.test(t))return!0;if(t===`-`){if(e.length-x<2)return!1;let t=e[x+1];return!!(t===`-`||ue.test(t))}return!1}var me={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function S(e){let t=``;if((e[x]===`-`||e[x]===`+`)&&(t+=e[x++]),t+=C(e),e[x]===`.`&&/\d/.test(e[x+1])&&(t+=e[x++]+C(e)),(e[x]===`e`||e[x]===`E`)&&((e[x+1]===`-`||e[x+1]===`+`)&&/\d/.test(e[x+2])?t+=e[x++]+e[x++]+C(e):/\d/.test(e[x+1])&&(t+=e[x++]+C(e))),pe(e)){let n=w(e);return n===`deg`||n===`rad`||n===`turn`||n===`grad`?{type:b.Hue,value:t*me[n]}:void 0}return e[x]===`%`?(x++,{type:b.Percentage,value:+t}):{type:b.Number,value:+t}}function C(e){let t=``;for(;/\d/.test(e[x]);)t+=e[x++];return t}function w(e){let t=``;for(;x<e.length&&de.test(e[x]);)t+=e[x++];return t}function he(e){let t=w(e);return e[x]===`(`?(x++,{type:b.Function,value:t}):t===`none`?{type:b.None,value:void 0}:{type:b.Ident,value:t}}function ge(e=``){let t=e.trim(),n=[],r;for(x=0;x<t.length;){if(r=t[x++],r===`
2
- `||r===` `||r===` `){for(;x<t.length&&(t[x]===`
3
- `||t[x]===` `||t[x]===` `);)x++;continue}if(r===`,`)return;if(r===`)`){n.push({type:b.ParenClose});continue}if(r===`+`){if(x--,fe(t)){n.push(S(t));continue}return}if(r===`-`){if(x--,fe(t)){n.push(S(t));continue}if(pe(t)){n.push({type:b.Ident,value:w(t)});continue}return}if(r===`.`){if(x--,fe(t)){n.push(S(t));continue}return}if(r===`/`){for(;x<t.length&&(t[x]===`
4
- `||t[x]===` `||t[x]===` `);)x++;let e;if(fe(t)&&(e=S(t),e.type!==b.Hue)){n.push({type:b.Alpha,value:e});continue}if(pe(t)&&w(t)===`none`){n.push({type:b.Alpha,value:{type:b.None,value:void 0}});continue}return}if(/\d/.test(r)){x--,n.push(S(t));continue}if(ue.test(r)){x--,n.push(he(t));continue}return}return n}function _e(e){e._i=0;let t=e[e._i++];if(!t||t.type!==b.Function||t.value!==`color`||(t=e[e._i++],t.type!==b.Ident))return;let n=oe[t.value];if(!n)return;let r={mode:n},i=ve(e,!1);if(!i)return;let a=ce(n).channels;for(let e=0,t,n;e<a.length;e++)t=i[e],n=a[e],t.type!==b.None&&(r[n]=t.type===b.Number?t.value:t.value/100,n===`alpha`&&(r[n]=Math.max(0,Math.min(1,r[n]))));return r}function ve(e,t){let n=[],r;for(;e._i<e.length;){if(r=e[e._i++],r.type===b.None||r.type===b.Number||r.type===b.Alpha||r.type===b.Percentage||t&&r.type===b.Hue){n.push(r);continue}if(r.type===b.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==b.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:b.None,value:void 0}),n.every(e=>e.type!==b.Alpha)?n:void 0}}function ye(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==b.Function)return;let r=ve(e,t);if(r)return r.unshift(n.value),r}var be=e=>{if(typeof e!=`string`)return;let t=ge(e),n=t?ye(t,!0):void 0,r,i=0,a=v.length;for(;i<a;)if((r=v[i++](e,n))!==void 0)return r;return t?_e(t):void 0};function xe(e,t){if(!t||t[0]!==`rgb`&&t[0]!==`rgba`)return;let n={mode:`rgb`},[,r,i,a,o]=t;if(r.type!==b.Hue&&i.type!==b.Hue&&a.type!==b.Hue)return r.type!==b.None&&(n.r=r.type===b.Number?r.value/255:r.value/100),i.type!==b.None&&(n.g=i.type===b.Number?i.value/255:i.value/100),a.type!==b.None&&(n.b=a.type===b.Number?a.value/255:a.value/100),o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var Se=e=>e===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0,Ce=(e,t,n)=>e+n*(t-e),we=e=>{let t=[];for(let n=0;n<e.length-1;n++){let r=e[n],i=e[n+1];r===void 0&&i===void 0?t.push(void 0):r!==void 0&&i!==void 0?t.push([r,i]):t.push(r===void 0?[i,i]:[r,r])}return t},T=(e=>t=>{let n=we(t);return t=>{let r=t*n.length,i=t>=1?n.length-1:Math.max(Math.floor(r),0),a=n[i];return a===void 0?void 0:e(a[0],a[1],r-i)}})(Ce),E=e=>{let t=!1,n=e.map(e=>e===void 0?1:(t=!0,e));return t?n:e},D={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[xe,u,ne,c,Se,`srgb`],serialize:`srgb`,interpolate:{r:T,g:T,b:T,alpha:{use:T,fixup:E}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Te=(e=0)=>Math.abs(e)**(563/256)*Math.sign(e),Ee=e=>{let t=Te(e.r),n=Te(e.g),r=Te(e.b),i={mode:`xyz65`,x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},De=e=>Math.abs(e)**(256/563)*Math.sign(e),Oe=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`a98`,r:De(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:De(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:De(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},ke=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*((t+.055)/1.055)**2.4},O=({r:e,g:t,b:n,alpha:r})=>{let i={mode:`lrgb`,r:ke(e),g:ke(t),b:ke(n)};return r!==void 0&&(i.alpha=r),i},k=e=>{let{r:t,g:n,b:r,alpha:i}=O(e),a={mode:`xyz65`,x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(a.alpha=i),a},Ae=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*t**(1/2.4)-.055):e*12.92},A=({r:e,g:t,b:n,alpha:r},i=`rgb`)=>{let a={mode:i,r:Ae(e),g:Ae(t),b:Ae(n)};return r!==void 0&&(a.alpha=r),a},j=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=A({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i},je={...D,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:e=>Oe(k(e)),xyz65:Oe},toMode:{rgb:e=>j(Ee(e)),xyz65:Ee}},M=e=>(e%=360)<0?e+360:e;function Me({h:e,s:t,l:n,alpha:r}){e=M(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=n+t*(n<.5?n:1-n),a=i-(i-n)*2*Math.abs(e/60%2-1),o;switch(Math.floor(e/60)){case 0:o={r:i,g:a,b:2*n-i};break;case 1:o={r:a,g:i,b:2*n-i};break;case 2:o={r:2*n-i,g:i,b:a};break;case 3:o={r:2*n-i,g:a,b:i};break;case 4:o={r:a,g:2*n-i,b:i};break;case 5:o={r:i,g:2*n-i,b:a};break;default:o={r:2*n-i,g:2*n-i,b:2*n-i}}return o.mode=`rgb`,r!==void 0&&(o.alpha=r),o}function Ne({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsl`,s:i===a?0:(i-a)/(1-Math.abs(i+a-1)),l:.5*(i+a)};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t<n)*6:i===t?(n-e)/(i-a)+2:(e-t)/(i-a)+4)*60),r!==void 0&&(o.alpha=r),o}var Pe=(e,t)=>{switch(t){case`deg`:return+e;case`rad`:return e/Math.PI*180;case`grad`:return e/10*9;case`turn`:return e*360}},Fe=RegExp(`^hsla?\\(\\s*${h}${g}${f}${g}${f}\\s*(?:,\\s*${p}\\s*)?\\)$`),Ie=e=>{let t=e.match(Fe);if(!t)return;let n={mode:`hsl`};return t[3]===void 0?t[1]!==void 0&&t[2]!==void 0&&(n.h=Pe(t[1],t[2])):n.h=+t[3],t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]===void 0?t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))):n.alpha=Math.max(0,Math.min(1,t[6]/100)),n};function Le(e,t){if(!t||t[0]!==`hsl`&&t[0]!==`hsla`)return;let n={mode:`hsl`},[,r,i,a,o]=t;if(r.type!==b.None){if(r.type===b.Percentage)return;n.h=r.value}if(i.type!==b.None){if(i.type===b.Hue)return;n.s=i.value/100}if(a.type!==b.None){if(a.type===b.Hue)return;n.l=a.value/100}return o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var Re=(e,t)=>e.map((n,r,i)=>{if(n===void 0)return n;let a=M(n);return r===0||e[r-1]===void 0?a:t(a-M(i[r-1]))}).reduce((e,t)=>!e.length||t===void 0||e[e.length-1]===void 0?(e.push(t),e):(e.push(t+e[e.length-1]),e),[]),ze=e=>Re(e,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),Be=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=M(e.h),r=M(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},Ve=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=M(e.h),r=M(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},He=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=M(e.h),r=M(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},Ue=e=>{let t=e.reduce((e,t)=>{if(t!==void 0){let n=t*Math.PI/180;e.sin+=Math.sin(n),e.cos+=Math.cos(n)}return e},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},We={mode:`hsl`,toMode:{rgb:Me},fromMode:{rgb:Ne},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[Le,Ie],serialize:e=>`hsl(${e.h===void 0?`none`:e.h} ${e.s===void 0?`none`:e.s*100+`%`} ${e.l===void 0?`none`:e.l*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:T,fixup:ze},s:T,l:T,alpha:{use:T,fixup:E}},difference:{h:Be},average:{h:Ue}};function Ge({h:e,s:t,v:n,alpha:r}){e=M(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n,g:n*(1-t*i),b:n*(1-t)};break;case 1:a={r:n*(1-t*i),g:n,b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n,b:n*(1-t*i)};break;case 3:a={r:n*(1-t),g:n*(1-t*i),b:n};break;case 4:a={r:n*(1-t*i),g:n*(1-t),b:n};break;case 5:a={r:n,g:n*(1-t),b:n*(1-t*i)};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode=`rgb`,r!==void 0&&(a.alpha=r),a}function Ke({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsv`,s:i===0?0:1-a/i,v:i};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t<n)*6:i===t?(n-e)/(i-a)+2:(e-t)/(i-a)+4)*60),r!==void 0&&(o.alpha=r),o}var qe={mode:`hsv`,toMode:{rgb:Ge},parse:[`--hsv`],serialize:`--hsv`,fromMode:{rgb:Ke},channels:[`h`,`s`,`v`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,interpolate:{h:{use:T,fixup:ze},s:T,v:T,alpha:{use:T,fixup:E}},difference:{h:Be},average:{h:Ue}};function Je({h:e,w:t,b:n,alpha:r}){if(t===void 0&&(t=0),n===void 0&&(n=0),t+n>1){let e=t+n;t/=e,n/=e}return Ge({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function Ye(e){let t=Ke(e);if(t===void 0)return;let n=t.s===void 0?0:t.s,r=t.v===void 0?0:t.v,i={mode:`hwb`,w:(1-n)*r,b:1-r};return t.h!==void 0&&(i.h=t.h),t.alpha!==void 0&&(i.alpha=t.alpha),i}function Xe(e,t){if(!t||t[0]!==`hwb`)return;let n={mode:`hwb`},[,r,i,a,o]=t;if(r.type!==b.None){if(r.type===b.Percentage)return;n.h=r.value}if(i.type!==b.None){if(i.type===b.Hue)return;n.w=i.value/100}if(a.type!==b.None){if(a.type===b.Hue)return;n.b=a.value/100}return o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var Ze={mode:`hwb`,toMode:{rgb:Je},fromMode:{rgb:Ye},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[Xe],serialize:e=>`hwb(${e.h===void 0?`none`:e.h} ${e.w===void 0?`none`:e.w*100+`%`} ${e.b===void 0?`none`:e.b*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:T,fixup:ze},w:T,b:T,alpha:{use:T,fixup:E}},difference:{h:Ve},average:{h:Ue}},Qe=29**3/27,$e=216/29**3,N={X:.3457/.3585,Y:1,Z:.2958/.3585},P={X:.3127/.329,Y:1,Z:.3583/.329},et=e=>e**3>$e?e**3:(116*e-16)/Qe,tt=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz50`,x:et(a)*N.X,y:et(i)*N.Y,z:et(o)*N.Z};return r!==void 0&&(s.alpha=r),s},nt=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=A({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i},rt=e=>nt(tt(e)),it=e=>{let{r:t,g:n,b:r,alpha:i}=O(e),a={mode:`xyz50`,x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(a.alpha=i),a},at=e=>e>$e?Math.cbrt(e):(Qe*e+16)/116,ot=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=at(e/N.X),a=at(t/N.Y),o=at(n/N.Z),s={mode:`lab`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s},st=e=>{let t=ot(it(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function ct(e,t){if(!t||t[0]!==`lab`)return;let n={mode:`lab`},[,r,i,a,o]=t;if(r.type!==b.Hue&&i.type!==b.Hue&&a.type!==b.Hue)return r.type!==b.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==b.None&&(n.a=i.type===b.Number?i.value:i.value*125/100),a.type!==b.None&&(n.b=a.type===b.Number?a.value:a.value*125/100),o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var lt={mode:`lab`,toMode:{xyz50:tt,rgb:rt},fromMode:{xyz50:ot,rgb:st},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ct],serialize:e=>`lab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:E}}},ut=29**3/27,dt=216/29**3,ft=e=>e**3>dt?e**3:(116*e-16)/ut,pt=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz65`,x:ft(a)*P.X,y:ft(i)*P.Y,z:ft(o)*P.Z};return r!==void 0&&(s.alpha=r),s},mt=e=>j(pt(e)),ht=e=>e>dt?Math.cbrt(e):(ut*e+16)/116,gt=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ht(e/P.X),a=ht(t/P.Y),o=ht(n/P.Z),s={mode:`lab65`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s},_t=e=>{let t=gt(k(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},vt={...lt,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:pt,rgb:mt},fromMode:{xyz65:gt,rgb:_t},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},F=({l:e,a:t,b:n,alpha:r},i=`lch`)=>{t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.sqrt(t*t+n*n),o={mode:i,l:e,c:a};return a&&(o.h=M(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},I=({l:e,c:t,h:n,alpha:r},i=`lab`)=>{n===void 0&&(n=0);let a={mode:i,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(a.alpha=r),a};function yt(e,t){if(!t||t[0]!==`lch`)return;let n={mode:`lch`},[,r,i,a,o]=t;if(r.type!==b.None){if(r.type===b.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==b.None&&(n.c=Math.max(0,i.type===b.Number?i.value:i.value*150/100)),a.type!==b.None){if(a.type===b.Percentage)return;n.h=a.value}return o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var bt={mode:`lch`,toMode:{lab:I,rgb:e=>rt(I(e))},fromMode:{rgb:e=>F(st(e)),lab:F},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[yt],serialize:e=>`lch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:T,fixup:ze},c:T,l:T,alpha:{use:T,fixup:E}},difference:{h:He},average:{h:Ue}},xt={...bt,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:e=>I(e,`lab65`),rgb:e=>mt(I(e,`lab65`))},fromMode:{rgb:e=>F(_t(e),`lch65`),lab65:e=>F(e,`lch65`)},ranges:{l:[0,100],c:[0,150],h:[0,360]}},St={...D,mode:`lrgb`,toMode:{rgb:A},fromMode:{rgb:O},parse:[`srgb-linear`],serialize:`srgb-linear`},Ct=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+.3963377773761749*t+.2158037573099136*n)**3,a=(e-.1055613458156586*t-.0638541728258133*n)**3,o=(e-.0894841775298119*t-1.2914855480194092*n)**3,s={mode:`lrgb`,r:4.076741636075957*i-3.3077115392580616*a+.2309699031821044*o,g:-1.2684379732850317*i+2.6097573492876887*a-.3413193760026573*o,b:-.0041960761386756*i-.7034186179359362*a+1.7076146940746117*o};return r!==void 0&&(s.alpha=r),s},wt=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),s={mode:`oklab`,l:.210454268309314*i+.7936177747023054*a-.0040720430116193*o,a:1.9779985324311684*i-2.42859224204858*a+.450593709617411*o,b:.0259040424655478*i+.7827717124575296*a-.8086757549230774*o};return r!==void 0&&(s.alpha=r),s},Tt=e=>{let t=wt(O(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Et=e=>A(Ct(e));function Dt(e,t){if(!t||t[0]!==`oklab`)return;let n={mode:`oklab`},[,r,i,a,o]=t;if(r.type!==b.Hue&&i.type!==b.Hue&&a.type!==b.Hue)return r.type!==b.None&&(n.l=Math.min(Math.max(0,r.type===b.Number?r.value:r.value/100),1)),i.type!==b.None&&(n.a=i.type===b.Number?i.value:i.value*.4/100),a.type!==b.None&&(n.b=a.type===b.Number?a.value:a.value*.4/100),o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var Ot={...lt,mode:`oklab`,toMode:{lrgb:Ct,rgb:Et},fromMode:{lrgb:wt,rgb:Tt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Dt],serialize:e=>`oklab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`};function kt(e,t){if(!t||t[0]!==`oklch`)return;let n={mode:`oklch`},[,r,i,a,o]=t;if(r.type!==b.None){if(r.type===b.Hue)return;n.l=Math.min(Math.max(0,r.type===b.Number?r.value:r.value/100),1)}if(i.type!==b.None&&(n.c=Math.max(0,i.type===b.Number?i.value:i.value*.4/100)),a.type!==b.None){if(a.type===b.Percentage)return;n.h=a.value}return o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var At={...bt,mode:`oklch`,toMode:{oklab:e=>I(e,`oklab`),rgb:e=>Et(I(e,`oklab`))},fromMode:{rgb:e=>F(Tt(e),`oklch`),oklab:e=>F(e,`oklch`)},parse:[kt],serialize:e=>`oklch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},jt=e=>{let{r:t,g:n,b:r,alpha:i}=O(e),a={mode:`xyz65`,x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(a.alpha=i),a},Mt=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=A({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},`p3`);return r!==void 0&&(i.alpha=r),i},Nt={...D,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:e=>Mt(k(e)),xyz65:Mt},toMode:{rgb:e=>j(jt(e)),xyz65:jt}},Pt=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*t**(1/1.8):16*e},Ft=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`prophoto`,r:Pt(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Pt(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Pt(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},It=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*t**1.8:e/16},Lt=e=>{let t=It(e.r),n=It(e.g),r=It(e.b),i={mode:`xyz50`,x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},Rt={...D,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:Ft,rgb:e=>Ft(it(e))},toMode:{xyz50:Lt,rgb:e=>nt(Lt(e))}},zt=1.09929682680944,Bt=.018053968510807,Vt=e=>{let t=Math.abs(e);return t>Bt?(Math.sign(e)||1)*(zt*t**.45-.09929682680944008):4.5*e},Ht=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`rec2020`,r:Vt(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Vt(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Vt(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},Ut=1.09929682680944,Wt=.018053968510807,Gt=(e=0)=>{let t=Math.abs(e);return t<Wt*4.5?e/4.5:(Math.sign(e)||1)*((t+Ut-1)/Ut)**(1/.45)},Kt=e=>{let t=Gt(e.r),n=Gt(e.g),r=Gt(e.b),i={mode:`xyz65`,x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},qt={...D,mode:`rec2020`,fromMode:{xyz65:Ht,rgb:e=>Ht(k(e))},toMode:{xyz65:Kt,rgb:e=>j(Kt(e))},parse:[`rec2020`],serialize:`rec2020`},Jt={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:nt,lab:ot},fromMode:{rgb:it,lab:tt},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:E}}},Yt={mode:`xyz65`,toMode:{rgb:j,xyz50:e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz50`,x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(a.alpha=i),a}},fromMode:{rgb:k,xyz50:e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz65`,x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(a.alpha=i),a}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:[`x`,`y`,`z`,`alpha`],parse:[`xyz`,`xyz-d65`],serialize:`xyz-d65`,interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:E}}};y(je),y(We),y(qe),y(Ze),y(lt),y(vt),y(bt),y(xt),y(St),y(Ot),y(At),y(Nt),y(Rt),y(qt),y(D),y(Jt),y(Yt);var Xt=[`orchid`,`grove`,`ocean`,`ember`,`iris`];[...Xt];var L=new Set([`system`,`light`,`dark`,...Xt]);[...L];var Zt=`canvas.chrome.toolbar.toolbarForeground.toolbarBorder.toolbarControl.toolbarControlForeground.toolbarControlHover.surface.surfaceRaised.surfaceOverlay.text.textMuted.border.input.focus.accent.accentForeground.secondary.secondaryForeground.muted.mutedForeground.placeholder.secondaryLabel.iconMuted.error.errorForeground.errorSurface.warning.warningForeground.warningSurface.update.updateForeground.updateSurface.accentSurface.accentSurfaceForeground.messageSurface.messageForeground.messageAction.messageActionForeground.messageActionHover.codeBackground.codeForeground.searchMatchBackground.searchMatchForeground.searchMatchActiveBackground.searchMatchActiveForeground.sidebar.sidebarForeground.sidebarMutedForeground.sidebarControlSurface.sidebarRowHover.sidebarRowActive.sidebarRowSelected.sidebarBorder.terminalBackground.terminalForeground.terminalCursor.terminalSelection.terminalScrollbar.terminalScrollbarHover`.split(`.`),Qt={searchMatchBackground:`#ffde8b`,searchMatchForeground:`#21180a`,searchMatchActiveBackground:`#eea52b`,searchMatchActiveForeground:`#21180a`,canvas:`oklch(1 0 0)`,chrome:`#f4f4f4`,toolbar:`#f4f4f4`,toolbarForeground:`oklch(0.274 0.006 286.033)`,toolbarBorder:`oklch(0.92 0.004 286)`,toolbarControl:`oklch(1 0 0)`,toolbarControlForeground:`oklch(0.274 0.006 286.033)`,toolbarControlHover:`#f4f4f4`,surface:`oklch(1 0 0)`,surfaceRaised:`oklch(1 0 0)`,surfaceOverlay:`oklch(1 0 0)`,text:`oklch(0.274 0.006 286.033)`,textMuted:`oklch(0.442 0.017 285.786)`,border:`oklch(0.92 0.004 286)`,input:`oklch(0.871 0.006 286)`,focus:`oklch(0.546 0.215 262.881)`,accent:`oklch(0.546 0.215 262.881)`,accentForeground:`oklch(1 0 0)`,secondary:`oklch(0.977 0.001 286)`,secondaryForeground:`oklch(0.274 0.006 286.033)`,muted:`oklch(0.977 0.001 286)`,mutedForeground:`oklch(0.442 0.017 285.786)`,placeholder:`oklch(0.442 0.017 285.786)`,secondaryLabel:`oklch(0.442 0.017 285.786)`,iconMuted:`oklch(0.442 0.017 285.786)`,error:`oklch(0.637 0.237 25.331)`,errorForeground:`oklch(0.505 0.213 27.518)`,errorSurface:`#fcebec`,warning:`#fe9a00`,warningForeground:`#bb4d00`,warningSurface:`#fcf4e8`,update:`oklch(0.546 0.215 262.881)`,updateForeground:`oklch(0.546 0.215 262.881)`,updateSurface:`#e0e6f7`,accentSurface:`#f4f4f4`,accentSurfaceForeground:`oklch(0.21 0.006 286)`,messageSurface:`oklch(0.967 0.001 286)`,messageForeground:`oklch(0.274 0.006 286.033)`,messageAction:`oklch(0.546 0.215 262.881)`,messageActionForeground:`oklch(1 0 0)`,messageActionHover:`#3a72ed`,codeBackground:`oklch(1 0 0)`,codeForeground:`oklch(0.274 0.006 286.033)`,sidebar:`#f4f4f4`,sidebarForeground:`oklch(0.274 0.006 286.033)`,sidebarMutedForeground:`oklch(0.442 0.017 285.786)`,sidebarControlSurface:`oklch(0.977 0.001 286)`,sidebarRowHover:`#f4f4f4`,sidebarRowActive:`#e7e8e8`,sidebarRowSelected:`#e7e8e8`,sidebarBorder:`oklch(0.92 0.004 286)`,terminalBackground:`oklch(0.988 0.001 286)`,terminalForeground:`oklch(0.274 0.006 286.033)`,terminalCursor:`oklch(0.546 0.215 262.881)`,terminalSelection:`#d0d6dd`,terminalScrollbar:`#d6d6d6`,terminalScrollbarHover:`#bdbdbd`},$t={searchMatchBackground:`#8c6c1f`,searchMatchForeground:`#f5f5f5`,searchMatchActiveBackground:`#eea52b`,searchMatchActiveForeground:`#21180a`,canvas:`oklch(0.145 0.005 286)`,chrome:`oklch(0.185 0.006 286)`,toolbar:`oklch(0.185 0.006 286)`,toolbarForeground:`oklch(0.967 0.001 286)`,toolbarBorder:`oklch(0.274 0.006 286)`,toolbarControl:`oklch(0.205 0.006 286)`,toolbarControlForeground:`oklch(0.967 0.001 286)`,toolbarControlHover:`oklch(0.245 0.006 286)`,surface:`oklch(0.185 0.006 286)`,surfaceRaised:`oklch(0.185 0.006 286)`,surfaceOverlay:`oklch(0.205 0.006 286)`,text:`oklch(0.967 0.001 286)`,textMuted:`oklch(0.674 0.006 286)`,border:`oklch(0.274 0.006 286)`,input:`oklch(0.311 0.006 286)`,focus:`oklch(0.707 0.165 254.624)`,accent:`oklch(0.707 0.165 254.624)`,accentForeground:`oklch(0.145 0.005 286)`,secondary:`oklch(0.225 0.006 286)`,secondaryForeground:`oklch(0.967 0.001 286)`,muted:`oklch(0.225 0.006 286)`,mutedForeground:`oklch(0.674 0.006 286)`,placeholder:`oklch(0.674 0.006 286)`,secondaryLabel:`oklch(0.674 0.006 286)`,iconMuted:`oklch(0.674 0.006 286)`,error:`oklch(0.704 0.191 22.216)`,errorForeground:`oklch(0.783 0.157 21.5)`,errorSurface:`#301214`,warning:`#fe9a00`,warningForeground:`#ffb900`,warningSurface:`#312108`,update:`oklch(0.707 0.165 254.624)`,updateForeground:`oklch(0.707 0.165 254.624)`,updateSurface:`#121b34`,accentSurface:`oklch(0.245 0.006 286)`,accentSurfaceForeground:`oklch(0.967 0.001 286)`,messageSurface:`oklch(0.245 0.006 286)`,messageForeground:`oklch(0.967 0.001 286)`,messageAction:`oklch(0.707 0.165 254.624)`,messageActionForeground:`oklch(0.145 0.005 286)`,messageActionHover:`#4993ec`,codeBackground:`oklch(0.185 0.006 286)`,codeForeground:`oklch(0.967 0.001 286)`,sidebar:`oklch(0.185 0.006 286)`,sidebarForeground:`oklch(0.967 0.001 286)`,sidebarMutedForeground:`oklch(0.674 0.006 286)`,sidebarControlSurface:`oklch(0.225 0.006 286)`,sidebarRowHover:`oklch(0.245 0.006 286)`,sidebarRowActive:`oklch(0.245 0.006 286)`,sidebarRowSelected:`oklch(0.245 0.006 286)`,sidebarBorder:`oklch(0.274 0.006 286)`,terminalBackground:`oklch(0.145 0.005 286)`,terminalForeground:`oklch(0.967 0.001 286)`,terminalCursor:`oklch(0.707 0.165 254.624)`,terminalSelection:`#343a47`,terminalScrollbar:`#222222`,terminalScrollbarHover:`#363636`},en={id:`orchid`,label:`Orchid`,appearance:`light`,colors:{canvas:`oklch(0.982446 0.010114 325.653)`,chrome:`oklch(0.982446 0.010114 325.653)`,toolbar:`oklch(0.982446 0.010114 325.653)`,toolbarForeground:`oklch(0.325698 0.116116 325.037)`,toolbarBorder:`oklch(0.856784 0.082879 328.911)`,toolbarControl:`oklch(0.939552 0.024286 321.664)`,toolbarControlForeground:`oklch(0.325698 0.116116 325.037)`,toolbarControlHover:`oklch(0.884525 0.041658 337.177)`,surface:`oklch(0.971835 0.012884 321.894)`,surfaceRaised:`oklch(0.988235 0.005049 325.615)`,surfaceOverlay:`oklch(1 0 0)`,text:`oklch(0.325698 0.116116 325.037)`,textMuted:`oklch(0.494754 0.190937 354.544)`,border:`oklch(0.923531 0.021247 328.096)`,input:`oklch(0.851713 0.055822 336.6)`,focus:`oklch(0.591646 0.217985 0.584)`,accent:`oklch(0.591646 0.217985 0.584)`,accentForeground:`oklch(1 0 0)`,secondary:`oklch(0.869588 0.06751 334.899)`,secondaryForeground:`oklch(0.444777 0.134061 324.799)`,muted:`oklch(0.802407 0.090963 345.892)`,mutedForeground:`oklch(0.428932 0.163929 354.332)`,placeholder:`oklch(0.549927 0.090215 323.149)`,secondaryLabel:`oklch(0.494754 0.190937 354.544)`,iconMuted:`oklch(0.494754 0.190937 354.544)`,error:`oklch(0.627117 0.248974 7.734)`,errorForeground:`oklch(0.458704 0.169677 3.815)`,errorSurface:`oklch(0.942787 0.032076 344.963)`,warning:`oklch(0.76859 0.164659 70.08)`,warningForeground:`oklch(0.54612 0.143036 48.949)`,warningSurface:`oklch(0.962901 0.015297 48.56)`,update:`oklch(0.591646 0.217985 0.584)`,updateForeground:`oklch(0.494754 0.190937 354.544)`,updateSurface:`oklch(0.930264 0.036194 341.45)`,accentSurface:`oklch(0.939552 0.024286 321.664)`,accentSurfaceForeground:`oklch(0.396296 0.025134 285.196)`,messageSurface:`oklch(0.926746 0.037898 332.6)`,messageForeground:`oklch(0.354591 0.093575 307.568)`,messageAction:`oklch(0.591646 0.217985 0.584)`,messageActionForeground:`oklch(1 0 0)`,messageActionHover:`oklch(0.539042 0.197866 0.305)`,codeBackground:`oklch(0.953855 0.019695 315.668)`,codeForeground:`oklch(0.445128 0.13005 307.026)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.928886 0.031178 322.592)`,sidebarForeground:`oklch(0.396296 0.025134 285.196)`,sidebarMutedForeground:`oklch(0.494754 0.190937 354.544)`,sidebarControlSurface:`oklch(0.978851 0.001321 106.424)`,sidebarRowHover:`oklch(0.978851 0.001321 106.424)`,sidebarRowActive:`oklch(0.978851 0.001321 106.424)`,sidebarRowSelected:`oklch(0.978851 0.001321 106.424)`,sidebarBorder:`oklch(0.938313 0.002552 48.717)`,terminalBackground:`oklch(0.982446 0.010114 325.653)`,terminalForeground:`oklch(0.325698 0.116116 325.037)`,terminalCursor:`oklch(0.591646 0.217985 0.584)`,terminalSelection:`oklch(0.869588 0.06751 334.899)`,terminalScrollbar:`oklch(0.851713 0.055822 336.6)`,terminalScrollbarHover:`oklch(0.802407 0.090963 345.892)`},variants:{dark:{canvas:`oklch(0.22813 0.020366 307.469)`,chrome:`oklch(0.22813 0.020366 307.469)`,toolbar:`oklch(0.22813 0.020366 307.469)`,toolbarForeground:`oklch(0.980735 0.004092 301.426)`,toolbarBorder:`oklch(0.266943 0.015262 302.425)`,toolbarControl:`oklch(0.313674 0.030572 310.061)`,toolbarControlForeground:`oklch(0.848252 0.038248 307.961)`,toolbarControlHover:`oklch(0.364912 0.050794 308.491)`,surface:`oklch(0.267101 0.02016 311.799)`,surfaceRaised:`oklch(0.279864 0.021572 309.532)`,surfaceOverlay:`oklch(0.154761 0.01316 338.901)`,text:`oklch(0.980735 0.004092 301.426)`,textMuted:`oklch(0.880303 0.03077 342.696)`,border:`oklch(0.266943 0.015262 302.425)`,input:`oklch(0.266817 0.02897 344.461)`,focus:`oklch(0.591646 0.217985 0.584)`,accent:`oklch(0.460685 0.185347 4.099)`,accentForeground:`oklch(0.901233 0.057189 343.694)`,secondary:`oklch(0.313674 0.030572 310.061)`,secondaryForeground:`oklch(0.848252 0.038248 307.961)`,muted:`oklch(0.360924 0.021469 316.83)`,mutedForeground:`oklch(0.880303 0.03077 342.696)`,placeholder:`oklch(0.657087 0.028226 307.985)`,secondaryLabel:`oklch(0.880303 0.03077 342.696)`,iconMuted:`oklch(0.848252 0.038248 307.961)`,error:`oklch(0.458704 0.169677 3.815)`,errorForeground:`oklch(0.901233 0.057189 343.694)`,errorSurface:`oklch(0.259022 0.04799 340.062)`,warning:`oklch(0.76859 0.164659 70.08)`,warningForeground:`oklch(0.836861 0.164422 84.429)`,warningSurface:`oklch(0.321706 0.036256 60.806)`,update:`oklch(0.460685 0.185347 4.099)`,updateForeground:`oklch(0.901233 0.057189 343.694)`,updateSurface:`oklch(0.256077 0.063004 342.914)`,accentSurface:`oklch(0.364912 0.050794 308.491)`,accentSurfaceForeground:`oklch(0.964695 0.009139 341.803)`,messageSurface:`oklch(0.273791 0.025541 309.079)`,messageForeground:`oklch(0.949872 0.021269 306.838)`,messageAction:`oklch(0.460685 0.185347 4.099)`,messageActionForeground:`oklch(0.901233 0.057189 343.694)`,messageActionHover:`oklch(0.458754 0.184639 3.857)`,codeBackground:`oklch(0.22813 0.020366 307.469)`,codeForeground:`oklch(0.848703 0.064239 306.645)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.185778 0.019368 322.159)`,sidebarForeground:`oklch(0.967434 0.001326 286.375)`,sidebarMutedForeground:`oklch(0.880303 0.03077 342.696)`,sidebarControlSurface:`oklch(0.23366 0.026081 338.196)`,sidebarRowHover:`oklch(0.23366 0.026081 338.196)`,sidebarRowActive:`oklch(0.23366 0.026081 338.196)`,sidebarRowSelected:`oklch(0.23366 0.026081 338.196)`,sidebarBorder:`oklch(0.269132 0.030766 351.067)`,terminalBackground:`oklch(0.22813 0.020366 307.469)`,terminalForeground:`oklch(0.980735 0.004092 301.426)`,terminalCursor:`oklch(0.591646 0.217985 0.584)`,terminalSelection:`oklch(0.313674 0.030572 310.061)`,terminalScrollbar:`oklch(0.266817 0.02897 344.461)`,terminalScrollbarHover:`oklch(0.360924 0.021469 316.83)`}},sidebarArtwork:!0},tn={id:`grove`,label:`Grove`,appearance:`light`,colors:{canvas:`oklch(0.972369 0.005497 157.15)`,chrome:`oklch(0.972369 0.005497 157.15)`,toolbar:`oklch(0.972369 0.005497 157.15)`,toolbarForeground:`oklch(0.222003 0.03479 328.979)`,toolbarBorder:`oklch(0.864831 0.01312 167.255)`,toolbarControl:`oklch(0.932695 0.003778 160.944)`,toolbarControlForeground:`oklch(0.222003 0.03479 328.979)`,toolbarControlHover:`oklch(0.949276 0.004496 159.002)`,surface:`oklch(0.972369 0.005497 157.15)`,surfaceRaised:`oklch(0.972369 0.005497 157.15)`,surfaceOverlay:`oklch(0.932695 0.003778 160.944)`,text:`oklch(0.222003 0.03479 328.979)`,textMuted:`oklch(0.527266 0.012309 320.683)`,border:`oklch(0.864831 0.01312 167.255)`,input:`oklch(0.829746 0.016084 168.234)`,focus:`oklch(0.523295 0.112292 158.089)`,accent:`oklch(0.523295 0.112292 158.089)`,accentForeground:`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.945455 0.012308 162.879)`,secondaryForeground:`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.945455 0.012308 162.879)`,mutedForeground:`oklch(0.527266 0.012309 320.683)`,placeholder:`oklch(0.527266 0.012309 320.683)`,secondaryLabel:`oklch(0.527266 0.012309 320.683)`,iconMuted:`oklch(0.527266 0.012309 320.683)`,error:`oklch(0.637823 0.237287 25.436)`,errorForeground:`oklch(0.509494 0.208583 28.513)`,errorSurface:`oklch(0.936968 0.014243 26.295)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.545036 0.155019 45.359)`,warningSurface:`oklch(0.953175 0.02009 93.379)`,update:`oklch(0.523295 0.112292 158.089)`,updateForeground:`oklch(0.523295 0.112292 158.089)`,updateSurface:`oklch(0.900411 0.02384 164.795)`,accentSurface:`oklch(0.949276 0.004496 159.002)`,accentSurfaceForeground:`oklch(0.222003 0.03479 328.979)`,messageSurface:`oklch(0.949276 0.004496 159.002)`,messageForeground:`oklch(0.222003 0.03479 328.979)`,messageAction:`oklch(0.523295 0.112292 158.089)`,messageActionForeground:`oklch(0.990339 0.008411 325.64)`,messageActionHover:`oklch(0.488753 0.096536 77.829)`,codeBackground:`oklch(0.972369 0.005497 157.15)`,codeForeground:`oklch(0.222003 0.03479 328.979)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.972369 0.005497 157.15)`,sidebarForeground:`oklch(0.222003 0.03479 328.979)`,sidebarMutedForeground:`oklch(0.527266 0.012309 320.683)`,sidebarControlSurface:`oklch(0.945455 0.012308 162.879)`,sidebarRowHover:`oklch(0.949276 0.004496 159.002)`,sidebarRowActive:`oklch(0.949276 0.004496 159.002)`,sidebarRowSelected:`oklch(0.949276 0.004496 159.002)`,sidebarBorder:`oklch(0.864831 0.01312 167.255)`,terminalBackground:`oklch(0.972369 0.005497 157.15)`,terminalForeground:`oklch(0.222003 0.03479 328.979)`,terminalCursor:`oklch(0.523295 0.112292 158.089)`,terminalSelection:`oklch(0.891377 0.026164 164.929)`,terminalScrollbar:`oklch(0.824752 0.001392 294.641)`,terminalScrollbarHover:`oklch(0.755495 0.004415 318.776)`},variants:{dark:{canvas:`oklch(0.260865 0.02152 162.75)`,chrome:`oklch(0.260865 0.02152 162.75)`,toolbar:`oklch(0.260865 0.02152 162.75)`,toolbarForeground:`oklch(0.990339 0.008411 325.64)`,toolbarBorder:`oklch(0.457475 0.044046 160.971)`,toolbarControl:`oklch(0.411828 0.014378 166.627)`,toolbarControlForeground:`oklch(0.990339 0.008411 325.64)`,toolbarControlHover:`oklch(0.363192 0.016572 165.32)`,surface:`oklch(0.260865 0.02152 162.75)`,surfaceRaised:`oklch(0.260865 0.02152 162.75)`,surfaceOverlay:`oklch(0.411828 0.014378 166.627)`,text:`oklch(0.990339 0.008411 325.64)`,textMuted:`oklch(0.715427 0.010896 171.428)`,border:`oklch(0.457475 0.044046 160.971)`,input:`oklch(0.519849 0.049896 160.863)`,focus:`oklch(0.796228 0.133058 157.319)`,accent:`oklch(0.796228 0.133058 157.319)`,accentForeground:`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.339728 0.039456 160.274)`,secondaryForeground:`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.339728 0.039456 160.274)`,mutedForeground:`oklch(0.715427 0.010896 171.428)`,placeholder:`oklch(0.715427 0.010896 171.428)`,secondaryLabel:`oklch(0.715427 0.010896 171.428)`,iconMuted:`oklch(0.715427 0.010896 171.428)`,error:`oklch(0.655108 0.221148 23.473)`,errorForeground:`oklch(0.704237 0.187511 22.228)`,errorSurface:`oklch(0.312773 0.02923 32.121)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.829017 0.171221 81.038)`,warningSurface:`oklch(0.345524 0.046882 99.736)`,update:`oklch(0.796228 0.133058 157.319)`,updateForeground:`oklch(0.796228 0.133058 157.319)`,updateSurface:`oklch(0.448116 0.062637 158.86)`,accentSurface:`oklch(0.363192 0.016572 165.32)`,accentSurfaceForeground:`oklch(0.990339 0.008411 325.64)`,messageSurface:`oklch(0.363192 0.016572 165.32)`,messageForeground:`oklch(0.990339 0.008411 325.64)`,messageAction:`oklch(0.796228 0.133058 157.319)`,messageActionForeground:`oklch(0.222003 0.03479 328.979)`,messageActionHover:`oklch(0.815227 0.117902 84.21)`,codeBackground:`oklch(0.260865 0.02152 162.75)`,codeForeground:`oklch(0.990339 0.008411 325.64)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.260865 0.02152 162.75)`,sidebarForeground:`oklch(0.990339 0.008411 325.64)`,sidebarMutedForeground:`oklch(0.715427 0.010896 171.428)`,sidebarControlSurface:`oklch(0.339728 0.039456 160.274)`,sidebarRowHover:`oklch(0.363192 0.016572 165.32)`,sidebarRowActive:`oklch(0.363192 0.016572 165.32)`,sidebarRowSelected:`oklch(0.363192 0.016572 165.32)`,sidebarBorder:`oklch(0.457475 0.044046 160.971)`,terminalBackground:`oklch(0.260865 0.02152 162.75)`,terminalForeground:`oklch(0.990339 0.008411 325.64)`,terminalCursor:`oklch(0.796228 0.133058 157.319)`,terminalSelection:`oklch(0.464636 0.066083 158.72)`,terminalScrollbar:`oklch(0.594692 0.006862 176.022)`,terminalScrollbarHover:`oklch(0.687968 0.00354 193.55)`}},sidebarArtwork:!0},nn={id:`ocean`,label:`Ocean`,appearance:`light`,colors:{canvas:`oklch(0.974199 0.002856 241.597)`,chrome:`oklch(0.974199 0.002856 241.597)`,toolbar:`oklch(0.974199 0.002856 241.597)`,toolbarForeground:`oklch(0.222003 0.03479 328.979)`,toolbarBorder:`oklch(0.867646 0.013482 252.362)`,toolbarControl:`oklch(0.934442 0.003181 269.1)`,toolbarControlForeground:`oklch(0.222003 0.03479 328.979)`,toolbarControlHover:`oklch(0.951058 0.002962 258.339)`,surface:`oklch(0.974199 0.002856 241.597)`,surfaceRaised:`oklch(0.974199 0.002856 241.597)`,surfaceOverlay:`oklch(0.934442 0.003181 269.1)`,text:`oklch(0.222003 0.03479 328.979)`,textMuted:`oklch(0.528741 0.01828 313.823)`,border:`oklch(0.867646 0.013482 252.362)`,input:`oklch(0.832939 0.017389 252.598)`,focus:`oklch(0.536684 0.120219 247.01)`,accent:`oklch(0.536684 0.120219 247.01)`,accentForeground:`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.948004 0.009649 241.695)`,secondaryForeground:`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.948004 0.009649 241.695)`,mutedForeground:`oklch(0.528741 0.01828 313.823)`,placeholder:`oklch(0.528741 0.01828 313.823)`,secondaryLabel:`oklch(0.528741 0.01828 313.823)`,iconMuted:`oklch(0.528741 0.01828 313.823)`,error:`oklch(0.637823 0.237287 25.436)`,errorForeground:`oklch(0.509494 0.208583 28.513)`,errorSurface:`oklch(0.938747 0.016377 7.186)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.546927 0.155556 45.359)`,warningSurface:`oklch(0.954846 0.016009 81.731)`,update:`oklch(0.536684 0.120219 247.01)`,updateForeground:`oklch(0.536684 0.120219 247.01)`,updateSurface:`oklch(0.904165 0.021144 241.874)`,accentSurface:`oklch(0.951058 0.002962 258.339)`,accentSurfaceForeground:`oklch(0.222003 0.03479 328.979)`,messageSurface:`oklch(0.951058 0.002962 258.339)`,messageForeground:`oklch(0.222003 0.03479 328.979)`,messageAction:`oklch(0.536684 0.120219 247.01)`,messageActionForeground:`oklch(0.990339 0.008411 325.64)`,messageActionHover:`oklch(0.45151 0.074407 201.516)`,codeBackground:`oklch(0.974199 0.002856 241.597)`,codeForeground:`oklch(0.222003 0.03479 328.979)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.974199 0.002856 241.597)`,sidebarForeground:`oklch(0.222003 0.03479 328.979)`,sidebarMutedForeground:`oklch(0.528741 0.01828 313.823)`,sidebarControlSurface:`oklch(0.948004 0.009649 241.695)`,sidebarRowHover:`oklch(0.951058 0.002962 258.339)`,sidebarRowActive:`oklch(0.951058 0.002962 258.339)`,sidebarRowSelected:`oklch(0.951058 0.002962 258.339)`,sidebarBorder:`oklch(0.867646 0.013482 252.362)`,terminalBackground:`oklch(0.974199 0.002856 241.597)`,terminalForeground:`oklch(0.222003 0.03479 328.979)`,terminalCursor:`oklch(0.536684 0.120219 247.01)`,terminalSelection:`oklch(0.895373 0.023469 241.913)`,terminalScrollbar:`oklch(0.826271 0.006191 305.456)`,terminalScrollbarHover:`oklch(0.756866 0.008685 313.721)`},variants:{dark:{canvas:`oklch(0.242641 0.024125 250.573)`,chrome:`oklch(0.242641 0.024125 250.573)`,toolbar:`oklch(0.242641 0.024125 250.573)`,toolbarForeground:`oklch(0.990339 0.008411 325.64)`,toolbarBorder:`oklch(0.438653 0.039496 245.44)`,toolbarControl:`oklch(0.398517 0.018232 255.72)`,toolbarControlForeground:`oklch(0.990339 0.008411 325.64)`,toolbarControlHover:`oklch(0.348439 0.019942 253.696)`,surface:`oklch(0.242641 0.024125 250.573)`,surfaceRaised:`oklch(0.242641 0.024125 250.573)`,surfaceOverlay:`oklch(0.398517 0.018232 255.72)`,text:`oklch(0.990339 0.008411 325.64)`,textMuted:`oklch(0.691936 0.016294 261.588)`,border:`oklch(0.438653 0.039496 245.44)`,input:`oklch(0.500905 0.043574 244.781)`,focus:`oklch(0.758933 0.105833 241.548)`,accent:`oklch(0.758933 0.105833 241.548)`,accentForeground:`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.319287 0.036766 246.065)`,secondaryForeground:`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.319287 0.036766 246.065)`,mutedForeground:`oklch(0.691936 0.016294 261.588)`,placeholder:`oklch(0.691936 0.016294 261.588)`,secondaryLabel:`oklch(0.691936 0.016294 261.588)`,iconMuted:`oklch(0.691936 0.016294 261.588)`,error:`oklch(0.655108 0.221148 23.473)`,errorForeground:`oklch(0.702184 0.189226 22.228)`,errorSurface:`oklch(0.298933 0.036443 350.094)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.829017 0.171221 81.038)`,warningSurface:`oklch(0.329449 0.028712 84.495)`,update:`oklch(0.758933 0.105833 241.548)`,updateForeground:`oklch(0.758933 0.105833 241.548)`,updateSurface:`oklch(0.424017 0.053575 243.695)`,accentSurface:`oklch(0.348439 0.019942 253.696)`,accentSurfaceForeground:`oklch(0.990339 0.008411 325.64)`,messageSurface:`oklch(0.348439 0.019942 253.696)`,messageForeground:`oklch(0.990339 0.008411 325.64)`,messageAction:`oklch(0.758933 0.105833 241.548)`,messageActionForeground:`oklch(0.222003 0.03479 328.979)`,messageActionHover:`oklch(0.815308 0.096174 199.862)`,codeBackground:`oklch(0.242641 0.024125 250.573)`,codeForeground:`oklch(0.990339 0.008411 325.64)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.242641 0.024125 250.573)`,sidebarForeground:`oklch(0.990339 0.008411 325.64)`,sidebarMutedForeground:`oklch(0.691936 0.016294 261.588)`,sidebarControlSurface:`oklch(0.319287 0.036766 246.065)`,sidebarRowHover:`oklch(0.348439 0.019942 253.696)`,sidebarRowActive:`oklch(0.348439 0.019942 253.696)`,sidebarRowSelected:`oklch(0.348439 0.019942 253.696)`,sidebarBorder:`oklch(0.438653 0.039496 245.44)`,terminalBackground:`oklch(0.242641 0.024125 250.573)`,terminalForeground:`oklch(0.990339 0.008411 325.64)`,terminalCursor:`oklch(0.758933 0.105833 241.548)`,terminalSelection:`oklch(0.439946 0.0561 243.479)`,terminalScrollbar:`oklch(0.58613 0.012959 267.22)`,terminalScrollbarHover:`oklch(0.681569 0.010909 276.465)`}},sidebarArtwork:!0},rn={id:`ember`,label:`Ember`,appearance:`light`,colors:{canvas:`oklch(0.976527 0.002685 60.725)`,chrome:`oklch(0.976527 0.002685 60.725)`,toolbar:`oklch(0.976527 0.002685 60.725)`,toolbarForeground:`oklch(0.222003 0.03479 328.979)`,toolbarBorder:`oklch(0.870631 0.013204 39.431)`,toolbarControl:`oklch(0.936659 0.002879 29.96)`,toolbarControlForeground:`oklch(0.222003 0.03479 328.979)`,toolbarControlHover:`oklch(0.953321 0.002701 42.266)`,surface:`oklch(0.976527 0.002685 60.725)`,surfaceRaised:`oklch(0.976527 0.002685 60.725)`,surfaceOverlay:`oklch(0.936659 0.002879 29.96)`,text:`oklch(0.222003 0.03479 328.979)`,textMuted:`oklch(0.530413 0.018453 341.181)`,border:`oklch(0.870631 0.013204 39.431)`,input:`oklch(0.836213 0.017153 38.661)`,focus:`oklch(0.552831 0.129438 44.656)`,accent:`oklch(0.552831 0.129438 44.656)`,accentForeground:`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.950842 0.009273 51.528)`,secondaryForeground:`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950842 0.009273 51.528)`,mutedForeground:`oklch(0.530413 0.018453 341.181)`,placeholder:`oklch(0.530413 0.018453 341.181)`,secondaryLabel:`oklch(0.530413 0.018453 341.181)`,iconMuted:`oklch(0.530413 0.018453 341.181)`,error:`oklch(0.637823 0.237287 25.436)`,errorForeground:`oklch(0.509494 0.208583 28.513)`,errorSurface:`oklch(0.941094 0.019938 19.375)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.549154 0.156188 45.359)`,warningSurface:`oklch(0.957148 0.020843 76.702)`,update:`oklch(0.552831 0.129438 44.656)`,updateForeground:`oklch(0.552831 0.129438 44.656)`,updateSurface:`oklch(0.907902 0.020621 49.36)`,accentSurface:`oklch(0.953321 0.002701 42.266)`,accentSurfaceForeground:`oklch(0.222003 0.03479 328.979)`,messageSurface:`oklch(0.953321 0.002701 42.266)`,messageForeground:`oklch(0.222003 0.03479 328.979)`,messageAction:`oklch(0.552831 0.129438 44.656)`,messageActionForeground:`oklch(0.990339 0.008411 325.64)`,messageActionHover:`oklch(0.471223 0.145843 24.688)`,codeBackground:`oklch(0.976527 0.002685 60.725)`,codeForeground:`oklch(0.222003 0.03479 328.979)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.976527 0.002685 60.725)`,sidebarForeground:`oklch(0.222003 0.03479 328.979)`,sidebarMutedForeground:`oklch(0.530413 0.018453 341.181)`,sidebarControlSurface:`oklch(0.950842 0.009273 51.528)`,sidebarRowHover:`oklch(0.953321 0.002701 42.266)`,sidebarRowActive:`oklch(0.953321 0.002701 42.266)`,sidebarRowSelected:`oklch(0.953321 0.002701 42.266)`,sidebarBorder:`oklch(0.870631 0.013204 39.431)`,terminalBackground:`oklch(0.976527 0.002685 60.725)`,terminalForeground:`oklch(0.222003 0.03479 328.979)`,terminalCursor:`oklch(0.552831 0.129438 44.656)`,terminalSelection:`oklch(0.899296 0.022939 49.163)`,terminalScrollbar:`oklch(0.828185 0.005884 349.533)`,terminalScrollbarHover:`oklch(0.758584 0.008423 341.16)`},variants:{dark:{canvas:`oklch(0.245899 0.019144 42.044)`,chrome:`oklch(0.245899 0.019144 42.044)`,toolbar:`oklch(0.245899 0.019144 42.044)`,toolbarForeground:`oklch(0.990339 0.008411 325.64)`,toolbarBorder:`oklch(0.44099 0.040202 48.807)`,toolbarControl:`oklch(0.401111 0.014308 34.896)`,toolbarControlForeground:`oklch(0.990339 0.008411 325.64)`,toolbarControlHover:`oklch(0.351262 0.01565 37.592)`,surface:`oklch(0.245899 0.019144 42.044)`,surfaceRaised:`oklch(0.245899 0.019144 42.044)`,surfaceOverlay:`oklch(0.401111 0.014308 34.896)`,text:`oklch(0.990339 0.008411 325.64)`,textMuted:`oklch(0.692479 0.015227 30.963)`,border:`oklch(0.44099 0.040202 48.807)`,input:`oklch(0.503003 0.045721 49.44)`,focus:`oklch(0.762174 0.124117 52.082)`,accent:`oklch(0.762174 0.124117 52.082)`,accentForeground:`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.322144 0.03574 48.309)`,secondaryForeground:`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.322144 0.03574 48.309)`,mutedForeground:`oklch(0.692479 0.015227 30.963)`,placeholder:`oklch(0.692479 0.015227 30.963)`,secondaryLabel:`oklch(0.692479 0.015227 30.963)`,iconMuted:`oklch(0.692479 0.015227 30.963)`,error:`oklch(0.655108 0.221148 23.473)`,errorForeground:`oklch(0.702184 0.189226 22.228)`,errorSurface:`oklch(0.310955 0.059624 24.334)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.829017 0.171221 81.038)`,warningSurface:`oklch(0.339137 0.055638 66.911)`,update:`oklch(0.762174 0.124117 52.082)`,updateForeground:`oklch(0.762174 0.124117 52.082)`,updateSurface:`oklch(0.426749 0.057547 50.618)`,accentSurface:`oklch(0.351262 0.01565 37.592)`,accentSurfaceForeground:`oklch(0.990339 0.008411 325.64)`,messageSurface:`oklch(0.351262 0.01565 37.592)`,messageForeground:`oklch(0.990339 0.008411 325.64)`,messageAction:`oklch(0.762174 0.124117 52.082)`,messageActionForeground:`oklch(0.222003 0.03479 328.979)`,messageActionHover:`oklch(0.775116 0.117953 29.014)`,codeBackground:`oklch(0.245899 0.019144 42.044)`,codeForeground:`oklch(0.990339 0.008411 325.64)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.245899 0.019144 42.044)`,sidebarForeground:`oklch(0.990339 0.008411 325.64)`,sidebarMutedForeground:`oklch(0.692479 0.015227 30.963)`,sidebarControlSurface:`oklch(0.322144 0.03574 48.309)`,sidebarRowHover:`oklch(0.351262 0.01565 37.592)`,sidebarRowActive:`oklch(0.351262 0.01565 37.592)`,sidebarRowSelected:`oklch(0.351262 0.01565 37.592)`,sidebarBorder:`oklch(0.44099 0.040202 48.807)`,terminalBackground:`oklch(0.245899 0.019144 42.044)`,terminalForeground:`oklch(0.990339 0.008411 325.64)`,terminalCursor:`oklch(0.762174 0.124117 52.082)`,terminalSelection:`oklch(0.442681 0.0608 50.795)`,terminalScrollbar:`oklch(0.587861 0.010463 20.444)`,terminalScrollbarHover:`oklch(0.682876 0.009156 9.796)`}},sidebarArtwork:!0},an={id:`iris`,label:`Iris`,appearance:`light`,colors:{canvas:`oklch(0.976531 0.003855 303.226)`,chrome:`oklch(0.976531 0.003855 303.226)`,toolbar:`oklch(0.976531 0.003855 303.226)`,toolbarForeground:`oklch(0.222003 0.03479 328.979)`,toolbarBorder:`oklch(0.869608 0.018226 303.859)`,toolbarControl:`oklch(0.936665 0.005041 310.132)`,toolbarControlForeground:`oklch(0.222003 0.03479 328.979)`,toolbarControlHover:`oklch(0.953326 0.004536 307.676)`,surface:`oklch(0.976531 0.003855 303.226)`,surfaceRaised:`oklch(0.976531 0.003855 303.226)`,surfaceOverlay:`oklch(0.936665 0.005041 310.132)`,text:`oklch(0.222003 0.03479 328.979)`,textMuted:`oklch(0.529955 0.022319 321.556)`,border:`oklch(0.869608 0.018226 303.859)`,input:`oklch(0.834773 0.023405 303.676)`,focus:`oklch(0.525348 0.15373 294.176)`,accent:`oklch(0.525348 0.15373 294.176)`,accentForeground:`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.950194 0.011956 300.733)`,secondaryForeground:`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950194 0.011956 300.733)`,mutedForeground:`oklch(0.529955 0.022319 321.556)`,placeholder:`oklch(0.529955 0.022319 321.556)`,secondaryLabel:`oklch(0.529955 0.022319 321.556)`,iconMuted:`oklch(0.529955 0.022319 321.556)`,error:`oklch(0.637823 0.237287 25.436)`,errorForeground:`oklch(0.509494 0.208583 28.513)`,errorSurface:`oklch(0.941043 0.019582 4.235)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.549154 0.156188 45.359)`,warningSurface:`oklch(0.957054 0.016197 69.932)`,update:`oklch(0.525348 0.15373 294.176)`,updateForeground:`oklch(0.525348 0.15373 294.176)`,updateSurface:`oklch(0.90602 0.025754 299.867)`,accentSurface:`oklch(0.953326 0.004536 307.676)`,accentSurfaceForeground:`oklch(0.222003 0.03479 328.979)`,messageSurface:`oklch(0.953326 0.004536 307.676)`,messageForeground:`oklch(0.222003 0.03479 328.979)`,messageAction:`oklch(0.525348 0.15373 294.176)`,messageActionForeground:`oklch(0.990339 0.008411 325.64)`,messageActionHover:`oklch(0.471003 0.16748 340.687)`,codeBackground:`oklch(0.976531 0.003855 303.226)`,codeForeground:`oklch(0.222003 0.03479 328.979)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.976531 0.003855 303.226)`,sidebarForeground:`oklch(0.222003 0.03479 328.979)`,sidebarMutedForeground:`oklch(0.529955 0.022319 321.556)`,sidebarControlSurface:`oklch(0.950194 0.011956 300.733)`,sidebarRowHover:`oklch(0.953326 0.004536 307.676)`,sidebarRowActive:`oklch(0.953326 0.004536 307.676)`,sidebarRowSelected:`oklch(0.953326 0.004536 307.676)`,sidebarBorder:`oklch(0.869608 0.018226 303.859)`,terminalBackground:`oklch(0.976531 0.003855 303.226)`,terminalForeground:`oklch(0.222003 0.03479 328.979)`,terminalCursor:`oklch(0.525348 0.15373 294.176)`,terminalSelection:`oklch(0.897143 0.028558 299.758)`,terminalScrollbar:`oklch(0.828195 0.008526 318.858)`,terminalScrollbarHover:`oklch(0.758596 0.010892 321.538)`},variants:{dark:{canvas:`oklch(0.225975 0.031062 293.741)`,chrome:`oklch(0.225975 0.031062 293.741)`,toolbar:`oklch(0.225975 0.031062 293.741)`,toolbarForeground:`oklch(0.990339 0.008411 325.64)`,toolbarBorder:`oklch(0.40874 0.058536 295.893)`,toolbarControl:`oklch(0.386739 0.024023 297.509)`,toolbarControlForeground:`oklch(0.990339 0.008411 325.64)`,toolbarControlHover:`oklch(0.335291 0.026008 296.394)`,surface:`oklch(0.225975 0.031062 293.741)`,surfaceRaised:`oklch(0.225975 0.031062 293.741)`,surfaceOverlay:`oklch(0.386739 0.024023 297.509)`,text:`oklch(0.990339 0.008411 325.64)`,textMuted:`oklch(0.663321 0.025932 301.862)`,border:`oklch(0.40874 0.058536 295.893)`,input:`oklch(0.46756 0.065775 296.265)`,focus:`oklch(0.671712 0.169136 293.929)`,accent:`oklch(0.671712 0.169136 293.929)`,accentForeground:`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.291515 0.05276 294.209)`,secondaryForeground:`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.291515 0.05276 294.209)`,mutedForeground:`oklch(0.663321 0.025932 301.862)`,placeholder:`oklch(0.663321 0.025932 301.862)`,secondaryLabel:`oklch(0.663321 0.025932 301.862)`,iconMuted:`oklch(0.663321 0.025932 301.862)`,error:`oklch(0.655108 0.221148 23.473)`,errorForeground:`oklch(0.702184 0.189226 22.228)`,errorSurface:`oklch(0.291658 0.054707 352.238)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.829017 0.171221 81.038)`,warningSurface:`oklch(0.318952 0.033845 51.646)`,update:`oklch(0.671712 0.169136 293.929)`,updateForeground:`oklch(0.671712 0.169136 293.929)`,updateSurface:`oklch(0.381668 0.081286 294.195)`,accentSurface:`oklch(0.335291 0.026008 296.394)`,accentSurfaceForeground:`oklch(0.990339 0.008411 325.64)`,messageSurface:`oklch(0.335291 0.026008 296.394)`,messageForeground:`oklch(0.990339 0.008411 325.64)`,messageAction:`oklch(0.671712 0.169136 293.929)`,messageActionForeground:`oklch(0.222003 0.03479 328.979)`,messageActionHover:`oklch(0.813537 0.114101 337.23)`,codeBackground:`oklch(0.225975 0.031062 293.741)`,codeForeground:`oklch(0.990339 0.008411 325.64)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.225975 0.031062 293.741)`,sidebarForeground:`oklch(0.990339 0.008411 325.64)`,sidebarMutedForeground:`oklch(0.663321 0.025932 301.862)`,sidebarControlSurface:`oklch(0.291515 0.05276 294.209)`,sidebarRowHover:`oklch(0.335291 0.026008 296.394)`,sidebarRowActive:`oklch(0.335291 0.026008 296.394)`,sidebarRowSelected:`oklch(0.335291 0.026008 296.394)`,sidebarBorder:`oklch(0.40874 0.058536 295.893)`,terminalBackground:`oklch(0.225975 0.031062 293.741)`,terminalForeground:`oklch(0.990339 0.008411 325.64)`,terminalCursor:`oklch(0.671712 0.169136 293.929)`,terminalSelection:`oklch(0.395417 0.085554 294.182)`,terminalScrollbar:`oklch(0.578663 0.017888 302.229)`,terminalScrollbarHover:`oklch(0.676012 0.015271 305.433)`}},sidebarArtwork:!0},on=[en,tn,nn,rn,an],R=`p4code:themes:v1`,sn=`p4code:theme-follow-system`,cn=`p4code:theme-appearance-mode`,ln=`p4code:theme-halves:v1`,un=i,dn=new Set(Zt),fn=[],pn=new Set,z=null,mn=new Set,hn=null;function gn(){return hn}function _n(e){return mn.add(e),()=>mn.delete(e)}function vn(e){if(hn!==e){hn=e;for(let e of mn)e()}}function B(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yn(e){return e===`light`||e===`dark`}function bn(e){return typeof e==`string`&&U(e)!==null}function xn(e){return typeof e==`string`&&/^[a-z0-9](?:[a-z0-9-]{0,47})$/.test(e)}function Sn(e){return typeof e==`string`&&e.trim().length>0&&e.trim().length<=48}function Cn(e){return B(e)&&typeof e.id==`string`&&/^[a-z0-9][a-z0-9.:-]{0,127}$/i.test(e.id)&&Sn(e.label)?{id:e.id,label:e.label.trim()}:void 0}function wn(e){let t={};for(let[n,r]of Object.entries(e)){let e=U(r);dn.has(n)&&e&&(t[n]=e)}return t}function Tn(e,t){return B(e)?{...pr(t),...wn(e)}:null}function En(e,t){if(e===void 0)return;if(!B(e))return null;let n={};for(let[r,i]of Object.entries(e)){if(!yn(r))return null;if(r===t)continue;let e=Tn(i,r);if(!e)return null;n[r]=e}return Object.keys(n).length>0?n:void 0}function Dn(e){if(!B(e)||!xn(e.id)||L.has(e.id)||!Sn(e.label)||!yn(e.appearance))return null;let t=Tn(e.colors,e.appearance);if(!t)return null;let n=En(e.variants,e.appearance);if(e.variants!==void 0&&n===null)return null;let r=Cn(e.collection);return{id:e.id,label:e.label.trim(),appearance:e.appearance,colors:t,...n?{variants:n}:{},...r?{collection:r}:{},...e.managed===!0?{managed:!0}:{}}}function On(e){let t=[];for(let n of e){let e=Dn(n);e&&!t.some(t=>t.id===e.id)&&t.push(e)}return t}function kn(){if(typeof window>`u`)return{status:`ready`,storedThemes:[],themes:[]};let e;try{e=window.localStorage.getItem(R)}catch(e){return{status:`unavailable`,reason:`storage-unavailable`,cause:e}}if(!e)return{status:`ready`,storedThemes:[],themes:[]};let t;try{t=JSON.parse(e)}catch{return{status:`unavailable`,reason:`malformed`}}return Array.isArray(t)?{status:`ready`,storedThemes:t,themes:On(t)}:{status:`unavailable`,reason:`malformed`}}function An(){return z===null&&(z=kn()),z}function jn(){for(let e of pn)e()}function Mn(){z=null,jn()}var Nn=[];function Pn(){let e=An();return e.status===`ready`?e.themes:Nn}function Fn(){return fn}function In(e){return!a(fn,e)&&(fn=e,jn(),!0)}function Ln(e){return L.has(e)}function Rn(e){return Tr().themes.filter(t=>t.collection?.id===e)}function zn(e){if(pn.add(e),typeof window>`u`)return()=>pn.delete(e);let t=e=>{(e.key===`p4code:themes:v1`||e.key===null)&&Mn()};return window.addEventListener(`storage`,t),()=>{pn.delete(e),window.removeEventListener(`storage`,t)}}function Bn(e){return e===`dark`?Hn??=Zn($t):Vn??=Zn(Qt)}var Vn,Hn,Un={r:255,g:250,b:255},Wn={r:36,g:21,b:35},Gn={r:255,g:255,b:255},Kn={r:0,g:0,b:0},qn=ie(`oklch`);function V(e){if(typeof e!=`string`)return null;let t=e.trim(),n=be(t);if(!n)return null;let r=qn(n),i=r.l??0,a=r.c??0,o=r.h??0,s=/\/\s*none\s*\)$/i.test(t)?0:r.alpha??1;return[i,a,o,s].every(Number.isFinite)?{color:{L:Math.min(1,Math.max(0,i)),C:Math.max(0,a),h:o},alpha:Math.min(1,Math.max(0,s))}:null}function Jn(e,t){return(Math.abs(e)<10**-t/2?0:e).toFixed(t).replace(/(?:\.0+|(?:(\.[0-9]*?)0+))$/,`$1`)}function H(e,t=1){let n=e.C<5e-7?0:(e.h%360+360)%360,r=`${Jn(e.L,6)} ${Jn(e.C,6)} ${Jn(n,3)}`;return t<1?`oklch(${r} / ${Jn(t,4)})`:`oklch(${r})`}function U(e){let t=V(e);return t?H(t.color,t.alpha):null}function Yn(e){let t=V(e),n=t?{rgb:Y(t.color),alpha:t.alpha}:null;if(!n)return null;let r=Xn(n.rgb);return n.alpha>=1?r:`${r}${Math.round(n.alpha*255).toString(16).padStart(2,`0`)}`}function W(e,t){let n=V(e);return n?Y(n.color):t}function Xn(e){return`#${[e.r,e.g,e.b].map(e=>Math.round(Math.min(255,Math.max(0,e))).toString(16).padStart(2,`0`)).join(``)}`}function G(e){return H(J(e))}function Zn(e){return Object.fromEntries(Zt.map(t=>{let n=U(e[t]);if(!n)throw Error(`The color for "${t}" must be a literal CSS color such as oklch(0.62 0.2 280).`);return[t,n]}))}function Qn(e){return{...e,colors:Zn(e.colors),...e.variants?{variants:Object.fromEntries(Object.entries(e.variants).map(([e,t])=>[e,Zn(t)]))}:{}}}function K(e,t,n){return{r:e.r+(t.r-e.r)*n,g:e.g+(t.g-e.g)*n,b:e.b+(t.b-e.b)*n}}function q(e){let t=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*t(e.r)+.7152*t(e.g)+.0722*t(e.b)}function $n(e){let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function er(e){let t=e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055;return Math.round(Math.min(1,Math.max(0,t))*255)}function J(e){let t=$n(e.r),n=$n(e.g),r=$n(e.b),i=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),o=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r),s=.2104542553*i+.793617785*a-.0040720468*o,c=1.9779984951*i-2.428592205*a+.4505937099*o,l=.0259040371*i+.7827717662*a-.808675766*o;return{L:s,C:Math.hypot(c,l),h:Math.atan2(l,c)*180/Math.PI}}function tr({L:e,C:t,h:n}){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=(e+.3963377774*i+.2158037573*a)**3,s=(e-.1055613458*i-.0638541728*a)**3,c=(e-.0894841775*i-1.291485548*a)**3;return{r:4.0767416621*o-3.3077115913*s+.2309699292*c,g:-1.2684380046*o+2.6097574011*s-.3413193965*c,b:-.0041960863*o-.7034186147*s+1.707614701*c}}function nr(e){let t=t=>{let n=tr({...e,C:t});return[n.r,n.g,n.b].every(e=>e>=-1e-4&&e<=1.0001)};if(t(e.C))return e;let n=0,r=e.C,i=1e-6,a=Math.max(1,Math.ceil(Math.log2(Math.max(e.C,i))-Math.log2(i)));for(let e=0;e<a;e+=1){let e=(n+r)/2;t(e)?n=e:r=e}return{...e,C:n}}function Y(e){let t=tr(nr(e));return{r:er(t.r),g:er(t.g),b:er(t.b)}}function rr(e){return H(nr(e))}function ir(e,t,n,r){let i=r===`lighter`?e.L:0,a=r===`lighter`?1:e.L,o={...e};if(X(Y(o),t)>=n)return o;for(let s=0;s<18;s+=1){let s=(i+a)/2;o={...e,L:s},X(Y(o),t)>=n?r===`lighter`?a=s:i=s:r===`lighter`?i=s:a=s}return{...e,L:r===`lighter`?a:i}}function ar(e,t,n){let r=V(e),i=V(t);if(!r||!i)return e;let a=Y(i.color);if(X(Y(r.color),a)>=n)return e;let o=q(a)<.179?`lighter`:`darker`;return Xn(Y(ir(r.color,a,n,o)))}var or={light:{error:`#fb2c36`,errorForeground:`#c10007`,warning:`#fe9a00`,warningForeground:`#bb4d00`},dark:{error:`#fb414a`,errorForeground:`#ff6467`,warning:`#fe9a00`,warningForeground:`#ffb900`}};function sr(e){let t=q(e)<.179?`dark`:`light`,n=or[t],r=t===`dark`?.16:.08,i=t=>K(e,W(t,e),r),a=(n,r)=>rr(ir(J(W(n,e)),r,4.6,t===`dark`?`lighter`:`darker`)),o=i(n.error),s=i(n.warning);return{error:U(n.error),errorForeground:a(n.errorForeground,o),errorSurface:G(o),warning:U(n.warning),warningForeground:a(n.warningForeground,s),warningSurface:G(s)}}function cr(e,t,n){let r=pr(e),i=W(t,e===`dark`?{r:24,g:15,b:27}:{r:250,g:245,b:250}),a=W(n,{r:168,g:67,b:112}),o=J(i),s=J(a),c=q(i)<.179,l=s.C<.02?o.h:s.h,u=Math.min(.045,Math.max(.008,s.C*.22)),d=c?1:-1,f=(e,t=u)=>({L:Math.min(.98,Math.max(.05,o.L+d*e)),C:t,h:l}),p=e=>rr(e),m={L:c?.95:.2,C:Math.min(.035,s.C*.25),h:l},h=Y(ir(m,i,7,c?`lighter`:`darker`)),g=fr(i,h),ee={L:Math.min(.85,Math.max(.35,s.L+(c?.06:-.02))),C:Math.max(s.C*.9,.06),h:(l+50)%360},te=Y(ee),ne=Z(te),re=Z(a),ie=f(.045,u*1.4),_=Y(ie),ae=f(.015),v=f(.05),oe=Y(v),se=f(.075),y=f(c?.16:.12,Math.min(.07,s.C*.35)),ce=f(c?.21:.16,Math.min(.08,s.C*.4)),le=f(c?.1:.06,Math.min(.09,s.C*.5)),ue=Y(le),de=f(c?.06:.04,Math.min(.06,s.C*.35)),b=Y(de),x=f(c?.13:.08,Math.min(.11,s.C*.55)),fe=Y(x),pe=f(c?.16:.1,Math.min(.13,s.C*.6)),me=Y(pe),S=f(.035,u*.8),C=f(c?.14:.09,Math.min(.12,s.C*.55)),w=e=>rr(ir(m,e,4.6,c?`lighter`:`darker`)),he=G(lr(b,h,1,4.6)),ge=G(lr(oe,h,1,4.6)),_e=Y(f(.22,Math.min(.12,s.C))),ve=Y(f(.4,Math.min(.18,s.C))),ye={...ee,L:ee.L+(c?.06:-.06)};return{...r,...sr(i),canvas:G(i),chrome:G(i),toolbar:G(i),toolbarForeground:G(h),toolbarBorder:p(f(c?.14:.1,Math.min(.08,s.C*.4))),toolbarControl:p(f(c?.09:.05,u*1.3)),toolbarControlForeground:G(h),toolbarControlHover:p(f(c?.14:.09,u*1.6)),surface:p(ae),surfaceRaised:p(v),surfaceOverlay:p(se),text:G(h),textMuted:G(g),border:p(y),input:p(ce),focus:G(a),accent:G(a),accentForeground:G(re),secondary:p(le),secondaryForeground:w(ue),muted:p(de),mutedForeground:he,placeholder:ge,secondaryLabel:G(g),iconMuted:G(g),update:G(a),updateForeground:w(Y(C)),updateSurface:p(C),accentSurface:p(x),accentSurfaceForeground:w(fe),messageSurface:p(pe),messageForeground:w(me),messageAction:G(te),messageActionForeground:G(ne),messageActionHover:p(ye),codeBackground:p(S),codeForeground:G(h),searchMatchBackground:G(_e),searchMatchForeground:G(Z(_e)),searchMatchActiveBackground:G(ve),searchMatchActiveForeground:G(Z(ve)),sidebar:p(ie),sidebarForeground:w(_),sidebarMutedForeground:G(fr(_,h)),sidebarControlSurface:p(f(c?.1:.07,u*1.5)),sidebarRowHover:p(f(c?.08:.06,Math.min(.08,s.C*.45))),sidebarRowActive:p(f(c?.12:.09,Math.min(.1,s.C*.55))),sidebarRowSelected:p(f(c?.14:.1,Math.min(.11,s.C*.6))),sidebarBorder:p(f(c?.17:.12,Math.min(.08,s.C*.4))),terminalBackground:G(i),terminalForeground:G(h),terminalCursor:G(a),terminalSelection:p(f(c?.18:.12,Math.min(.12,s.C*.55))),terminalScrollbar:p(f(c?.22:.16,u)),terminalScrollbarHover:p(f(c?.3:.22,u))}}function X(e,t){let n=q(e),r=q(t),i=Math.max(n,r),a=Math.min(n,r);return(i+.05)/(a+.05)}function Z(e){let t=X(e,Un),n=X(e,Wn);return Math.max(t,n)>=4.5?t>=n?Un:Wn:X(e,Gn)>=X(e,Kn)?Gn:Kn}function lr(e,t,n,r){let i=K(t,e,n);if(X(i,e)>=r)return i;let a=t,o=0,s=n;for(let n=0;n<12;n+=1){let n=(o+s)/2,i=K(t,e,n);X(i,e)>=r?(a=i,o=n):s=n}return a}var ur=4.705,dr=5.082;function fr(e,t){return lr(e,t,1,q(e)<.179?dr:ur)}function pr(e){return e===`dark`?en.variants.dark:en.colors}function mr(e,t,n,r){let i=V(r);if(!i)return{...t,[n]:r};let a=H(i.color,i.alpha),o=W(t.canvas,e===`dark`?{r:24,g:15,b:27}:{r:250,g:245,b:250}),s=Y(i.color),c=e=>K(e,s,i.alpha),l=c(o),u=W(t.accent,{r:168,g:67,b:112}),d=q(o)<.179,f=q(l)<.179,p=e=>G(e),m=e=>p(Z(e)),h=e=>rr(ir(i.color,e,4.6,q(e)<.179?`lighter`:`darker`)),g=()=>{let e=K(o,l,d?.16:.08);return{foreground:h(e),surface:p(e)}};switch(n){case`canvas`:return{...t,canvas:a,chrome:a,toolbar:a};case`surface`:case`surfaceRaised`:case`surfaceOverlay`:case`input`:case`sidebarControlSurface`:return{...t,[n]:a};case`text`:return{...t,text:a,toolbarForeground:a,toolbarControlForeground:a};case`mutedForeground`:return{...t,textMuted:a,mutedForeground:a,placeholder:a,secondaryLabel:a,iconMuted:a,sidebarMutedForeground:a};case`border`:return{...t,border:a,toolbarBorder:a,sidebarBorder:a};case`secondary`:return{...t,secondary:a,secondaryForeground:m(l),muted:a,toolbarControl:a};case`accentSurface`:return{...t,accentSurface:a,accentSurfaceForeground:m(l),toolbarControlHover:a};case`accent`:{let e=K(o,l,d?.32:.16);return{...t,accent:a,accentForeground:m(l),focus:a,update:a,updateForeground:h(e),updateSurface:p(e),terminalCursor:a}}case`messageAction`:{let e=Z(l),n=K(s,e===Un||e===Gn?Kn:Gn,.12);return{...t,messageAction:a,messageActionForeground:p(e),messageActionHover:H(J(n),i.alpha)}}case`messageSurface`:return{...t,messageSurface:a,messageForeground:m(l)};case`searchMatchBackground`:return{...t,searchMatchBackground:p(l),searchMatchForeground:m(l)};case`searchMatchActiveBackground`:return{...t,searchMatchActiveBackground:p(l),searchMatchActiveForeground:m(l)};case`codeBackground`:return{...t,codeBackground:a,codeForeground:m(l)};case`sidebar`:return{...t,sidebar:a,sidebarForeground:m(l)};case`sidebarRowSelected`:{let e=W(t.sidebar,o),n=c(e);return{...t,sidebarRowHover:p(K(e,n,.5)),sidebarRowActive:p(K(e,n,.8)),sidebarRowSelected:a}}case`terminalBackground`:{let e=Z(l);return{...t,terminalBackground:a,terminalForeground:p(e),terminalSelection:p(K(l,u,f?.35:.18)),terminalScrollbar:p(K(l,e,f?.42:.22)),terminalScrollbarHover:p(K(l,e,f?.55:.32))}}case`error`:{let e=g();return{...t,error:a,errorForeground:e.foreground,errorSurface:e.surface}}case`warning`:{let e=g();return{...t,warning:a,warningForeground:e.foreground,warningSurface:e.surface}}default:return{...t,[n]:a}}}var hr=on;function Q(e){let t=e;return hr.find(e=>e.id===t)??Pn().find(e=>e.id===t)??fn.find(e=>e.id===t)??null}function gr(e){let t=e;return hr.find(e=>e.id===t)?.sidebarArtwork===!0}function _r(e){let t=vr(e);return t.length===1?t[0]:null}function $(e,t){return t===e.appearance?e.colors:e.variants?.[t]??null}function vr(e){return[`light`,`dark`].filter(t=>$(e,t)!==null)}function yr(e){return e===`system`?null:e===`light`||e===`dark`?e:Q(e)?.appearance??null}function br(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,48)||`custom-theme`}var xr=class extends r()(`ThemeLibraryStorageError`,{storageKey:i,operation:n([`read`,`write`]),reason:n([`malformed`,`storage-unavailable`]),cause:t(e())}){get message(){let e=this.operation===`read`?`from`:`to`;return`Failed to ${this.operation} the theme library ${e} ${this.storageKey}.`}};function Sr(e,t){if(typeof window<`u`){try{window.localStorage.setItem(R,JSON.stringify(e)),z={status:`ready`,storedThemes:e,themes:t}}catch(e){throw new xr({storageKey:R,operation:`write`,reason:`storage-unavailable`,cause:e})}jn()}}function Cr(e){if(e.status===`unavailable`)throw new xr({storageKey:R,operation:`read`,reason:e.reason,...`cause`in e?{cause:e.cause}:{}});return e}function wr(){return Cr(An())}function Tr(){return Cr(kn())}function Er(e,t){return B(e)&&e.id===t}function Dr(e,t){return B(e)&&B(e.collection)&&e.collection.id===t}function Or(e){if(L.has(e.id))throw Error(`The theme id "${e.id}" is reserved.`);let t=wr();if(hr.some(t=>t.id===e.id)||t.storedThemes.some(t=>Er(t,e.id)))throw Error(`A theme named "${e.label}" is already installed.`);let n=Qn(e),r=[...t.themes,n];return Sr([...t.storedThemes,n],r),n}function kr(e){if(L.has(e.id))throw Error(`The theme id "${e.id}" is reserved.`);let t=wr(),n=t.themes,r=n.findIndex(t=>t.id===e.id);if(r===-1)throw Error(`The theme "${e.label}" is not installed.`);let i=Qn(e),a=[...n];a[r]=i;let o=[],s=!1;for(let n of t.storedThemes)Er(n,e.id)?s||=(o.push(i),!0):o.push(n);return Sr(o,a),i}function Ar(e,t,n){if(t.length===0)throw Error(`A theme collection cannot be empty.`);let r=t.map(e=>Dn(e));if(r.some(t=>t===null||t.collection?.id!==e)||new Set(r.map(e=>e?.id)).size!==r.length)throw Error(`That theme collection is invalid.`);let i=r,a=Tr(),o=a.themes.filter(t=>t.collection?.id===e);if(n?.expectedCollection&&JSON.stringify(o)!==JSON.stringify(n.expectedCollection))throw Error(`Your installed themes changed while this package was downloading. Try again.`);let s=new Set(hr.map(e=>e.id));for(let t of a.storedThemes)!Dr(t,e)&&B(t)&&typeof t.id==`string`&&s.add(t.id);let c=i.find(e=>L.has(e.id)||s.has(e.id));if(c)throw Error(`A theme named "${c.label}" is already installed.`);let l=[],u=!1;for(let t of a.storedThemes)Dr(t,e)?u||=(l.push(...i),!0):l.push(t);return u||l.push(...i),Sr(l,On(l)),i}function jr(e){Mr([e])}function Mr(e){let t=new Set(e);if(t.size===0)return;let n=wr(),r=n.themes.filter(e=>!t.has(e.id));r.length!==n.themes.length&&Sr(n.storedThemes.filter(e=>!B(e)||typeof e.id!=`string`||!t.has(e.id)),r)}function Nr(e){if(!B(e))throw Error(`Theme colors must be objects.`);let t={};for(let[n,r]of Object.entries(e)){if(!dn.has(n))throw Error(`"${n}" is not a supported theme color role.`);let e=U(r);if(!e)throw Error(`The color for "${n}" must be a literal CSS color such as oklch(0.62 0.2 280).`);t[n]=e}if(Object.keys(t).length===0)throw Error(`Add at least one color role to the theme file.`);return t}function Pr(e){if(!B(e))throw Error(`Theme files must contain a JSON object.`);if(e.version!==1)throw Error(`This theme file uses an unsupported version. Expected 1.`);let t=e.name,n=e.appearance,r=e.colors;if(!Sn(t))throw Error(`Theme files need a name (48 characters or fewer).`);if(!yn(n))throw Error(`Theme files need an appearance of "light" or "dark".`);if(!B(r))throw Error(`Theme files need a colors object.`);let i=e.id===void 0?br(t):e.id;if(!xn(i))throw Error(`Theme ids may only contain lowercase letters, numbers, and hyphens.`);if(L.has(i))throw Error(`The theme id "${i}" is reserved.`);let a=Nr(r),o=Cn(e.collection);if(e.collection!==void 0&&!o)throw Error(`Theme collections need a valid id and label.`);let s=pr(n),c={};if(e.variants!==void 0){if(!B(e.variants))throw Error(`Theme variants must be an object.`);for(let[t,r]of Object.entries(e.variants)){if(!yn(t))throw Error(`Theme variants may only be named "light" or "dark".`);if(t===n)throw Error(`Theme variants must not repeat the base appearance "${n}".`);c[t]={...pr(t),...Nr(r)}}}return{id:i,label:t.trim(),appearance:n,colors:{...s,...a},...Object.keys(c).length>0?{variants:c}:{},...o?{collection:o}:{},...e.managed===!0?{managed:!0}:{}}}function Fr(e){let t=Qn(e),n={version:1,id:t.id,name:t.label,appearance:t.appearance,colors:t.colors,...t.variants?{variants:t.variants}:{},...t.collection?{collection:t.collection}:{},...t.managed?{managed:!0}:{}};return`${JSON.stringify(n,null,2)}\n`}var Ir={canvas:`--app-theme-canvas`,chrome:`--app-theme-chrome`,toolbar:`--app-theme-toolbar`,toolbarForeground:`--app-theme-toolbar-foreground`,toolbarBorder:`--app-theme-toolbar-border`,toolbarControl:`--app-theme-toolbar-control`,toolbarControlForeground:`--app-theme-toolbar-control-foreground`,toolbarControlHover:`--app-theme-toolbar-control-hover`,surface:`--app-theme-surface`,surfaceRaised:`--app-theme-surface-raised`,surfaceOverlay:`--app-theme-surface-overlay`,text:`--app-theme-text`,textMuted:`--app-theme-text-muted`,border:`--app-theme-border`,input:`--app-theme-input`,focus:`--app-theme-focus`,accent:`--app-theme-accent`,accentForeground:`--app-theme-accent-foreground`,secondary:`--app-theme-secondary`,secondaryForeground:`--app-theme-secondary-foreground`,muted:`--app-theme-muted`,mutedForeground:`--app-theme-muted-foreground`,placeholder:`--app-theme-placeholder`,secondaryLabel:`--app-theme-secondary-label`,iconMuted:`--app-theme-icon-muted`,error:`--app-theme-error`,errorForeground:`--app-theme-error-foreground`,errorSurface:`--app-theme-error-surface`,warning:`--app-theme-warning`,warningForeground:`--app-theme-warning-foreground`,warningSurface:`--app-theme-warning-surface`,update:`--app-theme-update`,updateForeground:`--app-theme-update-foreground`,updateSurface:`--app-theme-update-surface`,accentSurface:`--app-theme-accent-surface`,accentSurfaceForeground:`--app-theme-accent-surface-foreground`,messageSurface:`--app-theme-message-surface`,messageForeground:`--app-theme-message-foreground`,messageAction:`--app-theme-message-action`,messageActionForeground:`--app-theme-message-action-foreground`,messageActionHover:`--app-theme-message-action-hover`,codeBackground:`--app-theme-code-background`,codeForeground:`--app-theme-code-foreground`,searchMatchBackground:`--app-theme-search-match-background`,searchMatchForeground:`--app-theme-search-match-foreground`,searchMatchActiveBackground:`--app-theme-search-match-active-background`,searchMatchActiveForeground:`--app-theme-search-match-active-foreground`,sidebar:`--app-theme-sidebar`,sidebarForeground:`--app-theme-sidebar-foreground`,sidebarMutedForeground:`--app-theme-sidebar-muted-foreground`,sidebarControlSurface:`--app-theme-sidebar-control-surface`,sidebarRowHover:`--app-theme-sidebar-row-hover`,sidebarRowActive:`--app-theme-sidebar-row-active`,sidebarRowSelected:`--app-theme-sidebar-row-selected`,sidebarBorder:`--app-theme-sidebar-border`,terminalBackground:`--app-theme-terminal-background`,terminalForeground:`--app-theme-terminal-foreground`,terminalCursor:`--app-theme-terminal-cursor`,terminalSelection:`--app-theme-terminal-selection-background`,terminalScrollbar:`--app-theme-terminal-scrollbar`,terminalScrollbarHover:`--app-theme-terminal-scrollbar-hover`};function Lr(e){return Ir[e]}var Rr=`__preview`;function zr(e,t){if(typeof document>`u`)return;let n=document.documentElement;if(n?.style){vn(!1),n.dataset.themeId=Rr,n.classList.toggle(`dark`,t===`dark`);for(let[t,r]of Object.entries(e))bn(r)&&n.style.setProperty(Ir[t],r)}}function Br(e,t){if(typeof document>`u`)return;let n=document.documentElement;if(!n?.style)return;vn(null);let r=Q(e);if(r){n.dataset.themeId=r.id;let e=$(r,t??r.appearance)??r.colors;for(let[t,r]of Object.entries(e))n.style.setProperty(Ir[t],r);return}delete n.dataset.themeId;for(let e of Object.values(Ir))n.style.removeProperty(e)}function Vr(e,t,n,r,i){let a=t?`dark`:`light`,o=r??(n??e===`system`?`system`:null);if(o===`system`){if(i?.[a])return a;let t=Q(e);return t&&$(t,a)===null?t.appearance:a}if(o===`light`||o===`dark`){if(i?.[o])return o;let t=Q(e);return t&&$(t,o)===null?t.appearance:o}return yr(e)??`light`}function Hr(e,t,n,r){let i=n??(t??e===`system`?`system`:null);if(i===`system`){let t=Q(e),n=r?.light!==void 0||t!==null&&$(t,`light`)!==null,i=r?.dark!==void 0||t!==null&&$(t,`dark`)!==null;return t&&(!n||!i)?t.appearance:`system`}if(i===`light`||i===`dark`){if(r?.[i])return i;let t=Q(e);return t&&$(t,i)===null?t.appearance:i}return yr(e)??`system`}function Ur(e){return e===`light`||e===`dark`||e===`system`||Q(e)!==null}function Wr(e){if(!e)return null;try{let t=JSON.parse(e);if(!B(t))return null;let n={};for(let e of[`light`,`dark`]){let r=t[e];if(typeof r!=`string`)continue;let i=Q(r);i&&$(i,e)!==null&&(n[e]=i.id)}return n.light!==void 0||n.dark!==void 0?n:null}catch{return null}}function Gr(e,t,n){return t?.[n]??e}export{Qt as $,jr as A,_n as B,Ur as C,Pr as D,wn as E,Gr as F,mr as G,Yn as H,Fr as I,tn as J,on as K,In as L,Ar as M,Hr as N,Wr as O,Vr as P,$t as Q,_r as R,Mn as S,bn as T,br as U,gr as V,kr as W,nn as X,an as Y,en as Z,Q as _,Rr as a,gn as b,Br as c,pr as d,Zt as et,Fn as f,$ as g,Lr as h,ln as i,Mr as j,ar as k,cr as l,Rn as m,cn as n,un as o,Bn as p,rn as q,sn as r,zr as s,R as t,Pn as u,vr as v,Ln as w,Or as x,yr as y,zn as z};
5
- //# sourceMappingURL=themePalette-VIM7Gehx.js.map
@@ -1,6 +0,0 @@
1
- import{a as e,t}from"./react-DH3P2YXY.js";import{W as n,wa as r,z as i}from"./utils-DhUt689t.js";import"./entities-B8Vupv5g.js";import{jn as a}from"./runtime-Ca_Z-vg5.js";var o=e(r()),s=e(t());function c(){var e=[...arguments];return(0,s.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var l=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function u(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function d(e){return`nodeType`in e}function f(e){return e?u(e)?e:d(e)?e.ownerDocument?.defaultView??window:window:window}function p(e){let{Document:t}=f(e);return e instanceof t}function m(e){return!u(e)&&e instanceof f(e).HTMLElement}function h(e){return e instanceof f(e).SVGElement}function g(e){return e?u(e)?e.document:d(e)?p(e)?e:m(e)||h(e)?e.ownerDocument:document:document:document}var _=l?s.useLayoutEffect:s.useEffect;function v(e){let t=(0,s.useRef)(e);return _(()=>{t.current=e}),(0,s.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function y(){let e=(0,s.useRef)(null);return[(0,s.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,s.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function b(e,t){t===void 0&&(t=[e]);let n=(0,s.useRef)(e);return _(()=>{n.current!==e&&(n.current=e)},t),n}function x(e,t){let n=(0,s.useRef)();return(0,s.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function S(e){let t=v(e),n=(0,s.useRef)(null);return[n,(0,s.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function C(e){let t=(0,s.useRef)();return(0,s.useEffect)(()=>{t.current=e},[e]),t.current}var w={};function T(e,t){return(0,s.useMemo)(()=>{if(t)return t;let n=w[e]==null?0:w[e]+1;return w[e]=n,e+`-`+n},[e,t])}function E(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var D=E(1),O=E(-1);function k(e){return`clientX`in e&&`clientY`in e}function A(e){if(!e)return!1;let{KeyboardEvent:t}=f(e.target);return t&&e instanceof t}function j(e){if(!e)return!1;let{TouchEvent:t}=f(e.target);return t&&e instanceof t}function ee(e){if(j(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return k(e)?{x:e.clientX,y:e.clientY}:null}var te=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[te.Translate.toString(e),te.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),ne=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function M(e){return e.matches(ne)?e:e.querySelector(ne)}var re={display:`none`};function N(e){let{id:t,value:n}=e;return s.createElement(`div`,{id:t,style:re},n)}function ie(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return s.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function ae(){let[e,t]=(0,s.useState)(``);return{announce:(0,s.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var oe=(0,s.createContext)(null);function P(e){let t=(0,s.useContext)(oe);(0,s.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function se(){let[e]=(0,s.useState)(()=>new Set),t=(0,s.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,s.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var F={draggable:`
2
- To pick up a draggable item, press the space bar.
3
- While dragging, use the arrow keys to move the item.
4
- Press space again to drop the item in its new position, or press escape to cancel.
5
- `},I={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function ce(e){let{announcements:t=I,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=F}=e,{announce:a,announcement:c}=ae(),l=T(`DndLiveRegion`),[u,d]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{d(!0)},[]),P((0,s.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!u)return null;let f=s.createElement(s.Fragment,null,s.createElement(N,{id:r,value:i.draggable}),s.createElement(ie,{id:l,announcement:c}));return n?(0,o.createPortal)(f,n):f}var L;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(L||={});function R(){}function z(e,t){return(0,s.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function le(){var e=[...arguments];return(0,s.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var B=Object.freeze({x:0,y:0});function V(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function H(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ue(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function U(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function de(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function fe(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var W=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=fe(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=V(fe(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(H)},pe=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=U(t),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=U(r),o=i.reduce((e,t,r)=>e+V(n[r],t),0),s=Number((o/4).toFixed(4));a.push({id:t,data:{droppableContainer:e,value:s}})}}return a.sort(H)};function G(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var me=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=G(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(ue)};function he(e,t){let{top:n,left:r,bottom:i,right:a}=t;return n<=e.y&&e.y<=i&&r<=e.x&&e.x<=a}var ge=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];let i=[];for(let e of t){let{id:t}=e,a=n.get(t);if(a&&he(r,a)){let n=U(a).reduce((e,t)=>e+V(r,t),0),o=Number((n/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:o}})}}return i.sort(H)};function _e(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ve(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:B}function K(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var ye=K(1);function be(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function xe(e,t,n){let r=be(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var Se={ignoreTransform:!1};function q(e,t){t===void 0&&(t=Se);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=f(e).getComputedStyle(e);t&&(n=xe(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function Ce(e){return q(e,{ignoreTransform:!0})}function we(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Te(e,t){return t===void 0&&(t=f(e).getComputedStyle(e)),t.position===`fixed`}function Ee(e,t){t===void 0&&(t=f(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function J(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(p(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!m(i)||h(i)||n.includes(i))return n;let a=f(e).getComputedStyle(i);return i!==e&&Ee(i,a)&&n.push(i),Te(i,a)?n:r(i.parentNode)}return e?r(e):n}function De(e){let[t]=J(e,1);return t??null}function Y(e){return!l||!e?null:u(e)?e:d(e)?p(e)||e===g(e).scrollingElement?window:m(e)?e:null:null}function Oe(e){return u(e)?e.scrollX:e.scrollLeft}function ke(e){return u(e)?e.scrollY:e.scrollTop}function Ae(e){return{x:Oe(e),y:ke(e)}}var X;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(X||={});function je(e){return!l||!e?!1:e===document.scrollingElement}function Me(e){let t={x:0,y:0},n=je(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var Ne={x:.2,y:.2};function Pe(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=Ne);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=Me(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=X.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=X.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=X.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=X.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function Fe(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Ie(e){return e.reduce((e,t)=>D(e,Ae(t)),B)}function Le(e){return e.reduce((e,t)=>e+Oe(t),0)}function Re(e){return e.reduce((e,t)=>e+ke(t),0)}function ze(e,t){if(t===void 0&&(t=q),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);De(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Be=[[`x`,[`left`,`right`],Le],[`y`,[`top`,`bottom`],Re]],Ve=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=J(t),r=Ie(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Be)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},He=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Ue(e){let{EventTarget:t}=f(e);return e instanceof t?e:g(e)}function We(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var Z;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Z||={});function Ge(e){e.preventDefault()}function Ke(e){e.stopPropagation()}var Q;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Q||={});var qe={start:[Q.Space,Q.Enter],cancel:[Q.Esc],end:[Q.Space,Q.Enter,Q.Tab]},Je=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Q.Right:return{...n,x:n.x+25};case Q.Left:return{...n,x:n.x-25};case Q.Down:return{...n,y:n.y+25};case Q.Up:return{...n,y:n.y-25}}},Ye=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new He(g(t)),this.windowListeners=new He(f(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Z.Resize,this.handleCancel),this.windowListeners.add(Z.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Z.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&ze(n),t(B)}handleKeyDown(e){if(A(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=qe,coordinateGetter:a=Je,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:B;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=O(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=Me(n),p=Fe(n),m={x:Math.min(i===Q.Right?p.right-p.width/2:p.right,Math.max(i===Q.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Q.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Q.Down?p.top:p.top+p.height/2,u.y))},h=i===Q.Right&&!s||i===Q.Left&&!c,g=i===Q.Down&&!l||i===Q.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Q.Right&&e<=d.x||i===Q.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===Q.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Q.Down&&e<=d.y||i===Q.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===Q.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,D(O(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Ye.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=qe,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Xe(e){return!!(e&&`distance`in e)}function Ze(e){return!!(e&&`delay`in e)}var Qe=class{constructor(e,t,n){n===void 0&&(n=Ue(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=g(i),this.documentListeners=new He(this.document),this.listeners=new He(n),this.windowListeners=new He(f(i)),this.initialCoordinates=ee(r)??B,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Z.Resize,this.handleCancel),this.windowListeners.add(Z.DragStart,Ge),this.windowListeners.add(Z.VisibilityChange,this.handleCancel),this.windowListeners.add(Z.ContextMenu,Ge),this.documentListeners.add(Z.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ze(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Xe(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Z.Click,Ke,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Z.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=ee(e)??B,s=O(n,o);if(!t&&a){if(Xe(a)){if(a.tolerance!=null&&We(s,a.tolerance))return this.handleCancel();if(We(s,a.distance))return this.handleStart()}if(Ze(a)&&We(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Q.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},$e={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},et=class extends Qe{constructor(e){let{event:t}=e,n=g(t.target);super(e,$e,n)}};et.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var tt={move:{name:`mousemove`},end:{name:`mouseup`}},nt;(function(e){e[e.RightClick=2]=`RightClick`})(nt||={});var rt=class extends Qe{constructor(e){super(e,tt,g(e.event.target))}};rt.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==nt.RightClick&&(r?.({event:n}),!0)}}];var it={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},at=class extends Qe{constructor(e){super(e,it)}static setup(){return window.addEventListener(it.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(it.move.name,e)};function e(){}}};at.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var ot;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(ot||={});var st;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(st||={});function ct(e){let{acceleration:t,activator:n=ot.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:c=st.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:f,threshold:p}=e,m=ut({delta:f,disabled:!a}),[h,g]=y(),_=(0,s.useRef)({x:0,y:0}),v=(0,s.useRef)({x:0,y:0}),b=(0,s.useMemo)(()=>{switch(n){case ot.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ot.DraggableRect:return i}},[n,i,l]),x=(0,s.useRef)(null),S=(0,s.useCallback)(()=>{let e=x.current;if(!e)return;let t=_.current.x*v.current.x,n=_.current.y*v.current.y;e.scrollBy(t,n)},[]),C=(0,s.useMemo)(()=>c===st.TreeOrder?[...u].reverse():u,[c,u]);(0,s.useEffect)(()=>{if(!a||!u.length||!b){g();return}for(let e of C){if(r?.(e)===!1)continue;let n=u.indexOf(e),i=d[n];if(!i)continue;let{direction:a,speed:s}=Pe(e,i,b,t,p);for(let e of[`x`,`y`])m[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){g(),x.current=e,h(S,o),_.current=s,v.current=a;return}}_.current={x:0,y:0},v.current={x:0,y:0},g()},[t,S,r,g,a,o,JSON.stringify(b),JSON.stringify(m),h,u,C,d,JSON.stringify(p)])}var lt={x:{[X.Backward]:!1,[X.Forward]:!1},y:{[X.Backward]:!1,[X.Forward]:!1}};function ut(e){let{delta:t,disabled:n}=e,r=C(t);return x(e=>{if(n||!r||!e)return lt;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[X.Backward]:e.x[X.Backward]||i.x===-1,[X.Forward]:e.x[X.Forward]||i.x===1},y:{[X.Backward]:e.y[X.Backward]||i.y===-1,[X.Forward]:e.y[X.Forward]||i.y===1}}},[n,t,r])}function dt(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return x(e=>t==null?null:r??e??null,[r,t])}function ft(e,t){return(0,s.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var pt;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(pt||={});var mt;(function(e){e.Optimized=`optimized`})(mt||={});var ht=new Map;function gt(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,s.useState)(null),{frequency:c,measure:l,strategy:u}=i,d=(0,s.useRef)(e),f=_(),p=b(f),m=(0,s.useCallback)(function(e){e===void 0&&(e=[]),!p.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[p]),h=(0,s.useRef)(null),g=x(t=>{if(f&&!n)return ht;if(!t||t===ht||d.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Ve(l(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,f,l]);return(0,s.useEffect)(()=>{d.current=e},[e]),(0,s.useEffect)(()=>{f||m()},[n,f]),(0,s.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,s.useEffect)(()=>{f||typeof c!=`number`||h.current!==null||(h.current=setTimeout(()=>{m(),h.current=null},c))},[c,f,m,...r]),{droppableRects:g,measureDroppableContainers:m,measuringScheduled:a!=null};function _(){switch(u){case pt.Always:return!1;case pt.BeforeDragging:return n;default:return!n}}}function _t(e,t){return x(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function vt(e,t){return _t(e,t)}function yt(e){let{callback:t,disabled:n}=e,r=v(t),i=(0,s.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,s.useEffect)(()=>()=>i?.disconnect(),[i]),i}function bt(e){let{callback:t,disabled:n}=e,r=v(t),i=(0,s.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,s.useEffect)(()=>()=>i?.disconnect(),[i]),i}function xt(e){return new Ve(q(e),e)}function St(e,t,n){t===void 0&&(t=xt);let[r,i]=(0,s.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=yt({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),c=bt({callback:a});return _(()=>{a(),e?(c?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(c?.disconnect(),o?.disconnect())},[e]),r}function Ct(e){return ve(e,_t(e))}var wt=[];function Tt(e){let t=(0,s.useRef)(e),n=x(n=>e?n&&n!==wt&&e&&t.current&&e.parentNode===t.current.parentNode?n:J(e):wt,[e]);return(0,s.useEffect)(()=>{t.current=e},[e]),n}function Et(e){let[t,n]=(0,s.useState)(null),r=(0,s.useRef)(e),i=(0,s.useCallback)(e=>{let t=Y(e.target);t&&n(e=>e?(e.set(t,Ae(t)),new Map(e)):null)},[]);return(0,s.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=Y(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,Ae(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{Y(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,s.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>D(e,t),B):Ie(e):B,[e,t])}function Dt(e,t){t===void 0&&(t=[]);let n=(0,s.useRef)(null);return(0,s.useEffect)(()=>{n.current=null},t),(0,s.useEffect)(()=>{let t=e!==B;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?O(e,n.current):B}function Ot(e){(0,s.useEffect)(()=>{if(!l)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function kt(e,t){return(0,s.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function At(e){return(0,s.useMemo)(()=>e?we(e):null,[e])}var jt=[];function Mt(e,t){t===void 0&&(t=q);let[n]=e,r=At(n?f(n):null),[i,a]=(0,s.useState)(jt);function o(){a(()=>e.length?e.map(e=>je(e)?r:new Ve(t(e),e)):jt)}let c=bt({callback:o});return _(()=>{c?.disconnect(),o(),e.forEach(e=>c?.observe(e))},[e]),i}function Nt(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return m(t)?t:e}function Pt(e){let{measure:t}=e,[n,r]=(0,s.useState)(null),i=bt({callback:(0,s.useCallback)(e=>{for(let{target:n}of e)if(m(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=S((0,s.useCallback)(e=>{let n=Nt(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,s.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var Ft=[{sensor:et,options:{}},{sensor:Ye,options:{}}],It={current:{}},Lt={draggable:{measure:Ce},droppable:{measure:Ce,strategy:pt.WhileDragging,frequency:mt.Optimized},dragOverlay:{measure:q}},Rt=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},zt={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Rt,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:R},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Lt,measureDroppableContainers:R,windowRect:null,measuringScheduled:!1},Bt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:R,draggableNodes:new Map,over:null,measureDroppableContainers:R},Vt=(0,s.createContext)(Bt),Ht=(0,s.createContext)(zt);function Ut(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Rt}}}function Wt(e,t){switch(t.type){case L.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case L.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case L.DragEnd:case L.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case L.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new Rt(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case L.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new Rt(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case L.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new Rt(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Gt(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,s.useContext)(Vt),a=C(r),o=C(n?.id);return(0,s.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!A(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=M(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function Kt(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function qt(e){return(0,s.useMemo)(()=>({draggable:{...Lt.draggable,...e?.draggable},droppable:{...Lt.droppable,...e?.droppable},dragOverlay:{...Lt.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Jt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,s.useRef)(!1),{x:o,y:c}=typeof i==`boolean`?{x:i,y:i}:i;_(()=>{if(!o&&!c||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=ve(n(e),r);if(o||(i.x=0),c||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=De(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,c,r,n])}var Yt=(0,s.createContext)({...B,scaleX:1,scaleY:1}),Xt;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Xt||={});var Zt=(0,s.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=Ft,collisionDetection:c=me,measuring:l,modifiers:u,...d}=e,[p,m]=(0,s.useReducer)(Wt,void 0,Ut),[h,g]=se(),[v,y]=(0,s.useState)(Xt.Uninitialized),x=v===Xt.Initialized,{draggable:{active:S,nodes:C,translate:w},droppable:{containers:E}}=p,O=S==null?null:C.get(S),k=(0,s.useRef)({initial:null,translated:null}),A=(0,s.useMemo)(()=>S==null?null:{id:S,data:O?.data??It,rect:k},[S,O]),j=(0,s.useRef)(null),[te,ne]=(0,s.useState)(null),[M,re]=(0,s.useState)(null),N=b(d,Object.values(d)),ie=T(`DndDescribedBy`,t),ae=(0,s.useMemo)(()=>E.getEnabled(),[E]),P=qt(l),{droppableRects:F,measureDroppableContainers:I,measuringScheduled:R}=gt(ae,{dragging:x,dependencies:[w.x,w.y],config:P.droppable}),z=dt(C,S),le=(0,s.useMemo)(()=>M?ee(M):null,[M]),B=Pe(),V=vt(z,P.draggable.measure);Jt({activeNode:S==null?null:C.get(S),config:B.layoutShiftCompensation,initialRect:V,measure:P.draggable.measure});let H=St(z,P.draggable.measure,V),ue=St(z?z.parentElement:null),U=(0,s.useRef)({activatorEvent:null,active:null,activeNode:z,collisionRect:null,collisions:null,droppableRects:F,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),fe=E.getNodeFor(U.current.over?.id),W=Pt({measure:P.dragOverlay.measure}),pe=W.nodeRef.current??z,G=x?W.rect??H:null,he=!!(W.nodeRef.current&&W.rect),ge=Ct(he?null:H),ve=At(pe?f(pe):null),K=Tt(x?fe??z:null),be=Mt(K),xe=Kt(u,{transform:{x:w.x-ge.x,y:w.y-ge.y,scaleX:1,scaleY:1},activatorEvent:M,active:A,activeNodeRect:H,containerNodeRect:ue,draggingNodeRect:G,over:U.current.over,overlayNodeRect:W.rect,scrollableAncestors:K,scrollableAncestorRects:be,windowRect:ve}),Se=le?D(le,w):null,q=Et(K),Ce=Dt(q),we=Dt(q,[H]),Te=D(xe,Ce),Ee=G?ye(G,xe):null,J=A&&Ee?c({active:A,collisionRect:Ee,droppableRects:F,droppableContainers:ae,pointerCoordinates:Se}):null,De=de(J,`id`),[Y,Oe]=(0,s.useState)(null),ke=_e(he?xe:D(xe,we),Y?.rect??null,H),Ae=(0,s.useRef)(null),X=(0,s.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(j.current==null)return;let i=C.get(j.current);if(!i)return;let a=e.nativeEvent,s=new n({active:j.current,activeNode:i,event:a,options:r,context:U,onAbort(e){if(!C.get(e))return;let{onDragAbort:t}=N.current,n={id:e};t?.(n),h({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!C.get(e))return;let{onDragPending:i}=N.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),h({type:`onDragPending`,event:a})},onStart(e){let t=j.current;if(t==null)return;let n=C.get(t);if(!n)return;let{onDragStart:r}=N.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:k}};(0,o.unstable_batchedUpdates)(()=>{r?.(i),y(Xt.Initializing),m({type:L.DragStart,initialCoordinates:e,active:t}),h({type:`onDragStart`,event:i}),ne(Ae.current),re(a)})},onMove(e){m({type:L.DragMove,coordinates:e})},onEnd:c(L.DragEnd),onCancel:c(L.DragCancel)});Ae.current=s;function c(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=U.current,s=null;if(t&&i){let{cancelDrop:o}=N.current;s={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===L.DragEnd&&typeof o==`function`&&await Promise.resolve(o(s))&&(e=L.DragCancel)}j.current=null,(0,o.unstable_batchedUpdates)(()=>{m({type:e}),y(Xt.Uninitialized),Oe(null),ne(null),re(null),Ae.current=null;let t=e===L.DragEnd?`onDragEnd`:`onDragCancel`;if(s){let e=N.current[t];e?.(s),h({type:t,event:s})}})}}},[C]),je=ft(a,(0,s.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=C.get(r);if(j.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},j.current=r,X(n,t))},[C,X]));Ot(a),_(()=>{H&&v===Xt.Initializing&&y(Xt.Initialized)},[H,v]),(0,s.useEffect)(()=>{let{onDragMove:e}=N.current,{active:t,activatorEvent:n,collisions:r,over:i}=U.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:Te.x,y:Te.y},over:i};(0,o.unstable_batchedUpdates)(()=>{e?.(a),h({type:`onDragMove`,event:a})})},[Te.x,Te.y]),(0,s.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=U.current;if(!e||j.current==null||!t||!i)return;let{onDragOver:a}=N.current,s=r.get(De),c=s&&s.rect.current?{id:s.id,rect:s.rect.current,data:s.data,disabled:s.disabled}:null,l={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:c};(0,o.unstable_batchedUpdates)(()=>{Oe(c),a?.(l),h({type:`onDragOver`,event:l})})},[De]),_(()=>{U.current={activatorEvent:M,active:A,activeNode:z,collisionRect:Ee,collisions:J,droppableRects:F,draggableNodes:C,draggingNode:pe,draggingNodeRect:G,droppableContainers:E,over:Y,scrollableAncestors:K,scrollAdjustedTranslate:Te},k.current={initial:G,translated:Ee}},[A,z,J,Ee,C,pe,G,F,E,Y,K,Te]),ct({...B,delta:w,draggingRect:Ee,pointerCoordinates:Se,scrollableAncestors:K,scrollableAncestorRects:be});let Me=(0,s.useMemo)(()=>({active:A,activeNode:z,activeNodeRect:H,activatorEvent:M,collisions:J,containerNodeRect:ue,dragOverlay:W,draggableNodes:C,droppableContainers:E,droppableRects:F,over:Y,measureDroppableContainers:I,scrollableAncestors:K,scrollableAncestorRects:be,measuringConfiguration:P,measuringScheduled:R,windowRect:ve}),[A,z,H,M,J,ue,W,C,E,F,Y,I,K,be,P,R,ve]),Ne=(0,s.useMemo)(()=>({activatorEvent:M,activators:je,active:A,activeNodeRect:H,ariaDescribedById:{draggable:ie},dispatch:m,draggableNodes:C,over:Y,measureDroppableContainers:I}),[M,je,A,H,m,ie,C,Y,I]);return s.createElement(oe.Provider,{value:g},s.createElement(Vt.Provider,{value:Ne},s.createElement(Ht.Provider,{value:Me},s.createElement(Yt.Provider,{value:ke},i)),s.createElement(Gt,{disabled:n?.restoreFocus===!1})),s.createElement(ce,{...n,hiddenTextDescribedById:ie}));function Pe(){let e=te?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=x&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),Qt=(0,s.createContext)(null),$t=`button`,en=`Draggable`;function tn(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=T(en),{activators:o,activatorEvent:c,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:f,over:p}=(0,s.useContext)(Vt),{role:m=$t,roleDescription:h=`draggable`,tabIndex:g=0}=i??{},v=l?.id===t,y=(0,s.useContext)(v?Yt:Qt),[x,C]=S(),[w,E]=S(),D=kt(o,t),O=b(n);return _(()=>(f.set(t,{id:t,key:a,node:x,activatorNode:w,data:O}),()=>{let e=f.get(t);e&&e.key===a&&f.delete(t)}),[f,t]),{active:l,activatorEvent:c,activeNodeRect:u,attributes:(0,s.useMemo)(()=>({role:m,tabIndex:g,"aria-disabled":r,"aria-pressed":v&&m===$t?!0:void 0,"aria-roledescription":h,"aria-describedby":d.draggable}),[r,m,g,v,h,d.draggable]),isDragging:v,listeners:r?void 0:D,node:x,over:p,setNodeRef:C,setActivatorNodeRef:E,transform:y}}function nn(){return(0,s.useContext)(Ht)}var rn=`Droppable`,an={timeout:25};function on(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=T(rn),{active:o,dispatch:c,over:l,measureDroppableContainers:u}=(0,s.useContext)(Vt),d=(0,s.useRef)({disabled:n}),f=(0,s.useRef)(!1),p=(0,s.useRef)(null),m=(0,s.useRef)(null),{disabled:h,updateMeasurementsFor:g,timeout:_}={...an,...i},v=b(g??r),y=bt({callback:(0,s.useCallback)(()=>{if(!f.current){f.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(v.current)?v.current:[v.current]),m.current=null},_)},[_]),disabled:h||!o}),[x,C]=S((0,s.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),f.current=!1),e&&y.observe(e))},[y])),w=b(t);return(0,s.useEffect)(()=>{y&&x.current&&(y.disconnect(),f.current=!1,y.observe(x.current))},[x,y]),(0,s.useEffect)(()=>(c({type:L.RegisterDroppable,element:{id:r,key:a,disabled:n,node:x,rect:p,data:w}}),()=>c({type:L.UnregisterDroppable,key:a,id:r})),[r]),(0,s.useEffect)(()=>{n!==d.current.disabled&&(c({type:L.SetDroppableDisabled,id:r,key:a,disabled:n}),d.current.disabled=n)},[r,a,n,c]),{active:o,rect:p,isOver:l?.id===r,node:x,over:l,setNodeRef:C}}function sn(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function cn(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function ln(e){return e!==null&&e>=0}function un(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function dn(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var fn={scaleX:1,scaleY:1},pn=e=>{let{rects:t,activeNodeRect:n,activeIndex:r,overIndex:i,index:a}=e,o=t[r]??n;if(!o)return null;let s=mn(t,a,r);if(a===r){let e=t[i];return e?{x:r<i?e.left+e.width-(o.left+o.width):e.left-o.left,y:0,...fn}:null}return a>r&&a<=i?{x:-o.width-s,y:0,...fn}:a<r&&a>=i?{x:o.width+s,y:0,...fn}:{x:0,y:0,...fn}};function mn(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return!r||!i&&!a?0:n<t?i?r.left-(i.left+i.width):a.left-(r.left+r.width):a?a.left-(r.left+r.width):r.left-(i.left+i.width)}var hn=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=sn(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},gn={scaleX:1,scaleY:1},_n=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...gn}:null}let s=vn(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...gn}:r<t&&r>=a?{x:0,y:o.height+s,...gn}:{x:0,y:0,...gn}};function vn(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var yn=`Sortable`,bn=s.createContext({activeIndex:-1,containerId:yn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:hn,disabled:{draggable:!1,droppable:!1}});function xn(e){let{children:t,id:n,items:r,strategy:i=hn,disabled:a=!1}=e,{active:o,dragOverlay:c,droppableRects:l,over:u,measureDroppableContainers:d}=nn(),f=T(yn,n),p=c.rect!==null,m=(0,s.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),h=o!=null,g=o?m.indexOf(o.id):-1,v=u?m.indexOf(u.id):-1,y=(0,s.useRef)(m),b=!un(m,y.current),x=v!==-1&&g===-1||b,S=dn(a);_(()=>{b&&h&&d(m)},[b,m,h,d]),(0,s.useEffect)(()=>{y.current=m},[m]);let C=(0,s.useMemo)(()=>({activeIndex:g,containerId:f,disabled:S,disableTransforms:x,items:m,overIndex:v,useDragOverlay:p,sortedRects:cn(m,l),strategy:i}),[g,f,S.draggable,S.droppable,x,m,v,l,p,i]);return s.createElement(bn.Provider,{value:C},t)}var Sn=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return sn(n,r,i).indexOf(t)},Cn=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},wn={duration:200,easing:`ease`},Tn=`transform`,En=te.Transition.toString({property:Tn,duration:0,easing:`linear`}),Dn={roleDescription:`sortable`};function On(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,s.useState)(null),c=(0,s.useRef)(n);return _(()=>{if(!t&&n!==c.current&&r.current){let e=i.current;if(e){let t=q(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==c.current&&(c.current=n)},[t,n,r,i]),(0,s.useEffect)(()=>{a&&o(null)},[a]),a}function kn(e){let{animateLayoutChanges:t=Cn,attributes:n,disabled:r,data:i,getNewIndex:a=Sn,id:o,strategy:l,resizeObserverConfig:u,transition:d=wn}=e,{items:f,containerId:p,activeIndex:m,disabled:h,disableTransforms:g,sortedRects:_,overIndex:v,useDragOverlay:y,strategy:b}=(0,s.useContext)(bn),x=An(r,h),S=f.indexOf(o),C=(0,s.useMemo)(()=>({sortable:{containerId:p,index:S,items:f},...i}),[p,i,S,f]),w=(0,s.useMemo)(()=>f.slice(f.indexOf(o)),[f,o]),{rect:T,node:E,isOver:D,setNodeRef:O}=on({id:o,data:C,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...u}}),{active:k,activatorEvent:j,activeNodeRect:ee,attributes:ne,setNodeRef:M,listeners:re,isDragging:N,over:ie,setActivatorNodeRef:ae,transform:oe}=tn({id:o,data:C,attributes:{...Dn,...n},disabled:x.draggable}),P=c(O,M),se=!!k,F=se&&!g&&ln(m)&&ln(v),I=!y&&N,ce=F?(I&&F?oe:null)??(l??b)({rects:_,activeNodeRect:ee,activeIndex:m,overIndex:v,index:S}):null,L=ln(m)&&ln(v)?a({id:o,items:f,activeIndex:m,overIndex:v}):S,R=k?.id,z=(0,s.useRef)({activeId:R,items:f,newIndex:L,containerId:p}),le=f!==z.current.items,B=t({active:k,containerId:p,isDragging:N,isSorting:se,id:o,index:S,items:f,newIndex:z.current.newIndex,previousItems:z.current.items,previousContainerId:z.current.containerId,transition:d,wasDragging:z.current.activeId!=null}),V=On({disabled:!B,index:S,node:E,rect:T});return(0,s.useEffect)(()=>{se&&z.current.newIndex!==L&&(z.current.newIndex=L),p!==z.current.containerId&&(z.current.containerId=p),f!==z.current.items&&(z.current.items=f)},[se,L,p,f]),(0,s.useEffect)(()=>{if(R===z.current.activeId)return;if(R!=null&&z.current.activeId==null){z.current.activeId=R;return}let e=setTimeout(()=>{z.current.activeId=R},50);return()=>clearTimeout(e)},[R]),{active:k,activeIndex:m,attributes:ne,data:C,rect:T,index:S,newIndex:L,items:f,isOver:D,isSorting:se,isDragging:N,listeners:re,node:E,overIndex:v,over:ie,setNodeRef:P,setActivatorNodeRef:ae,setDroppableNodeRef:O,setDraggableNodeRef:M,transform:V??ce,transition:H()};function H(){if(V||le&&z.current.newIndex===S)return En;if(!(I&&!A(j)||!d)&&(se||B))return te.Transition.toString({...d,property:Tn})}}function An(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}function jn(e){if(!e)return!1;let t=e.data.current;return!!(t&&`sortable`in t&&typeof t.sortable==`object`&&`containerId`in t.sortable&&`items`in t.sortable&&`index`in t.sortable)}var Mn=[Q.Down,Q.Right,Q.Up,Q.Left],Nn=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:a,over:o,scrollableAncestors:s}}=t;if(Mn.includes(e.code)){if(e.preventDefault(),!n||!r)return;let t=[];a.getEnabled().forEach(n=>{if(!n||n!=null&&n.disabled)return;let a=i.get(n.id);if(a)switch(e.code){case Q.Down:r.top<a.top&&t.push(n);break;case Q.Up:r.top>a.top&&t.push(n);break;case Q.Left:r.left>a.left&&t.push(n);break;case Q.Right:r.left<a.left&&t.push(n)}});let c=pe({active:n,collisionRect:r,droppableRects:i,droppableContainers:t,pointerCoordinates:null}),l=de(c,`id`);if(l===o?.id&&c.length>1&&(l=c[1].id),l!=null){let e=a.get(n.id),t=a.get(l),o=t?i.get(t.id):null,c=t?.node.current;if(c&&o&&e&&t){let n=J(c).some((e,t)=>s[t]!==e),i=Pn(e,t),a=Fn(e,t),l=n||!i?{x:0,y:0}:{x:a?r.width-o.width:0,y:a?r.height-o.height:0},u={x:o.left,y:o.top};return l.x&&l.y?u:O(u,l)}}}};function Pn(e,t){return!jn(e)||!jn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Fn(e,t){return!jn(e)||!jn(t)||!Pn(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var In=`p4code:ui-state:v1`,Ln=2,Rn=[`p4code:renderer-state:v8`,`p4code:renderer-state:v7`,`p4code:renderer-state:v6`,`p4code:renderer-state:v5`,`p4code:renderer-state:v4`,`p4code:renderer-state:v3`,`codething:renderer-state:v4`,`codething:renderer-state:v3`,`codething:renderer-state:v2`,`codething:renderer-state:v1`],zn={projectExpandedById:{},projectOrder:[],pinnedProjectKeys:[],sidebarSections:[],projectSectionByKey:{},inactiveProjectKeys:[],inactiveSectionExpanded:!1,threadSectionByKey:{},sidebarProjectScopeKey:null,threadLastVisitedAtById:{},threadChangedFilesExpandedById:{},defaultAdvertisedEndpointKey:null,pullRequestMergeMethod:`merge`},Bn=`legacy-project-cwd:`,Vn=`legacy-project-expansion-default`,Hn=!1;function Un(e){return`${Bn}${a(e)}`}function $(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:[]}function Wn(e){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(e=>e[0].length>0&&typeof e[1]==`boolean`))}function Gn(e){return typeof e==`string`&&e.length>0?e:null}function Kn(e){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(e=>e[0].length>0&&typeof e[1]==`string`&&e[1].length>0&&Number.isFinite(Date.parse(e[1]))))}function qn(e){return e===`merge`||e===`squash`||e===`rebase`}function Jn(e){return{projectExpandedById:e.projectExpandedById===void 0?(()=>{let t={},n=$(e.collapsedProjectCwds),r=$(e.expandedProjectCwds);for(let e of n)t[Un(e)]=!1;for(let e of r)t[Un(e)]=!0;return!Array.isArray(e.collapsedProjectCwds)&&r.length>0&&(t[Vn]=!1),t})():Wn(e.projectExpandedById),projectOrder:e.projectOrder===void 0?$(e.projectOrderCwds).map(Un):$(e.projectOrder),pinnedProjectKeys:$(e.pinnedProjectKeys),sidebarSections:$(e.sidebarSections),threadSectionByKey:Object.fromEntries(Object.entries(e.threadSectionByKey??{}).filter(([t,n])=>t.length>0&&$(e.sidebarSections).includes(n))),projectSectionByKey:Object.fromEntries(Object.entries(e.projectSectionByKey??{}).filter(([t,n])=>t.length>0&&$(e.sidebarSections).includes(n))),inactiveProjectKeys:$(e.inactiveProjectKeys),inactiveSectionExpanded:e.inactiveSectionExpanded===!0,threadLastVisitedAtById:Kn(e.threadLastVisitedAtById),threadChangedFilesExpandedById:e.threadChangedFilesExpansionVersion===Ln?Xn(e.threadChangedFilesExpandedById):{},defaultAdvertisedEndpointKey:Gn(e.defaultAdvertisedEndpointKey),sidebarProjectScopeKey:Gn(e.sidebarProjectScopeKey),pullRequestMergeMethod:qn(e.pullRequestMergeMethod)?e.pullRequestMergeMethod:zn.pullRequestMergeMethod}}function Yn(){if(typeof window>`u`)return zn;try{let e=window.localStorage.getItem(In);if(!e){for(let e of Rn){let t=window.localStorage.getItem(e);if(t)return Jn(JSON.parse(t))}return zn}return Jn(JSON.parse(e))}catch{return zn}}function Xn(e){if(!e||typeof e!=`object`)return{};let t={};for(let[n,r]of Object.entries(e)){if(!n||!r||typeof r!=`object`)continue;let e={};for(let[t,n]of Object.entries(r))t&&typeof n==`boolean`&&(e[t]=n);Object.keys(e).length>0&&(t[n]=e)}return t}function Zn(e){if(typeof window<`u`)try{let t=Object.fromEntries(Object.entries(e.projectExpandedById).filter(([e])=>e!==Vn));if(window.localStorage.setItem(In,JSON.stringify({projectExpandedById:t,projectOrder:e.projectOrder,pinnedProjectKeys:e.pinnedProjectKeys,sidebarSections:e.sidebarSections,projectSectionByKey:e.projectSectionByKey,inactiveProjectKeys:e.inactiveProjectKeys,inactiveSectionExpanded:e.inactiveSectionExpanded,threadSectionByKey:e.threadSectionByKey,threadLastVisitedAtById:e.threadLastVisitedAtById,defaultAdvertisedEndpointKey:e.defaultAdvertisedEndpointKey,sidebarProjectScopeKey:e.sidebarProjectScopeKey,threadChangedFilesExpansionVersion:Ln,threadChangedFilesExpandedById:e.threadChangedFilesExpandedById,pullRequestMergeMethod:e.pullRequestMergeMethod})),!Hn){Hn=!0;for(let e of Rn)window.localStorage.removeItem(e)}}catch{}}var Qn=new i(Zn,{wait:500});function $n(e,t,n){let r=Date.parse(n);if(!Number.isFinite(r))return e;let i=e.threadLastVisitedAtById[t],a=i?Date.parse(i):NaN;return Number.isFinite(a)&&Number.isFinite(r)&&a>=r?e:{...e,threadLastVisitedAtById:{...e.threadLastVisitedAtById,[t]:n}}}function er(e,t,n){if(!n)return e;let r=Date.parse(n);if(Number.isNaN(r))return e;let i=new Date(r-1).toISOString();return e.threadLastVisitedAtById[t]===i?e:{...e,threadLastVisitedAtById:{...e.threadLastVisitedAtById,[t]:i}}}function tr(e,t,n,r){let i=e.threadChangedFilesExpandedById[t]??{};return i[n]===r?e:{...e,threadChangedFilesExpandedById:{...e.threadChangedFilesExpandedById,[t]:{...i,[n]:r}}}}function nr(e,t){let n=t&&t.length>0?t:null;return e.defaultAdvertisedEndpointKey===n?e:{...e,defaultAdvertisedEndpointKey:n}}function rr(e,t){let n=Gn(t);return e.sidebarProjectScopeKey===n?e:{...e,sidebarProjectScopeKey:n}}function ir(e,t){return e.pullRequestMergeMethod===t?e:{...e,pullRequestMergeMethod:t}}function ar(e,t){for(let n of t){let t=e[n];if(t!==void 0)return t}return e[Vn]??!0}function or(e,t,n){let r=(typeof t==`string`?[t]:t).filter(t=>e.projectExpandedById[t]!==n);if(r.length===0)return e;let i={...e.projectExpandedById};for(let e of r)i[e]=n;return{...e,projectExpandedById:i}}function sr(e,t,n,r){if(n.length===0)return e;let i=new Set(n),a=new Set(r);if(n.every(e=>a.has(e)))return e;let o=t.findIndex(e=>a.has(e));if(o<0)return e;let s=[...t],c=[],l=0;for(let e=s.length-1;e>=0;e--)i.has(s[e])&&(c.unshift(s.splice(e,1)[0]),e<o&&l++);if(c.length===0)return e;let u=o-Math.max(0,l-1);return s.splice(u,0,...c),{...e,projectOrder:s}}var cr=n(e=>({...Yn(),setThreadSection:(t,n)=>e(e=>({sidebarSections:n&&!e.sidebarSections.includes(n)?[...e.sidebarSections,n]:e.sidebarSections,threadSectionByKey:n?{...e.threadSectionByKey,[t]:n}:Object.fromEntries(Object.entries(e.threadSectionByKey).filter(([e])=>e!==t))})),toggleProjectPinned:t=>e(e=>({pinnedProjectKeys:e.pinnedProjectKeys.includes(t)?e.pinnedProjectKeys.filter(e=>e!==t):[...e.pinnedProjectKeys,t],inactiveProjectKeys:e.inactiveProjectKeys.filter(e=>e!==t)})),setProjectSection:(t,n)=>e(e=>({sidebarSections:n&&!e.sidebarSections.includes(n)?[...e.sidebarSections,n]:e.sidebarSections,projectSectionByKey:n?{...e.projectSectionByKey,[t]:n}:Object.fromEntries(Object.entries(e.projectSectionByKey).filter(([e])=>e!==t)),pinnedProjectKeys:e.pinnedProjectKeys.filter(e=>e!==t),inactiveProjectKeys:e.inactiveProjectKeys.filter(e=>e!==t)})),setProjectInactive:(t,n)=>e(e=>{let r=e.inactiveProjectKeys.filter(e=>e!==t);return n?{inactiveProjectKeys:[...r,t],pinnedProjectKeys:e.pinnedProjectKeys.filter(e=>e!==t),projectSectionByKey:Object.fromEntries(Object.entries(e.projectSectionByKey).filter(([e])=>e!==t))}:{inactiveProjectKeys:r}}),setInactiveSectionExpanded:t=>e({inactiveSectionExpanded:t}),removeSidebarSection:t=>e(e=>({threadSectionByKey:Object.fromEntries(Object.entries(e.threadSectionByKey).filter(([,e])=>e!==t)),sidebarSections:e.sidebarSections.filter(e=>e!==t),projectSectionByKey:Object.fromEntries(Object.entries(e.projectSectionByKey).filter(([,e])=>e!==t))})),markThreadVisited:(t,n)=>e(e=>$n(e,t,n)),markThreadUnread:(t,n)=>e(e=>er(e,t,n)),setThreadChangedFilesExpanded:(t,n,r)=>e(e=>tr(e,t,n,r)),setDefaultAdvertisedEndpointKey:t=>e(e=>nr(e,t)),setSidebarProjectScopeKey:t=>e(e=>rr(e,t)),setPullRequestMergeMethod:t=>e(e=>ir(e,t)),setProjectExpanded:(t,n)=>e(e=>or(e,t,n)),reorderProjects:(t,n,r)=>e(e=>sr(e,t,n,r))}));cr.subscribe(e=>Qn.maybeExecute(e)),typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`beforeunload`,()=>{Qn.flush()});export{le as _,sn as a,f as b,kn as c,Ye as d,et as f,z as g,ge as h,xn as i,_n as l,pe as m,ar as n,pn as o,W as p,cr as r,Nn as s,Un as t,Zt as u,te as v,g as y};
6
- //# sourceMappingURL=uiStateStore-CdkBStdp.js.map
@@ -1,2 +0,0 @@
1
- import{a as e,t}from"./react-DH3P2YXY.js";import{n}from"./jsx-runtime-BnjsACtP.js";import{$s as r,C as i,D as a,Oh as o,Qs as s,Zo as c,Zs as l,c as u,cl as d,g as f,i as p,s as m,ts as h}from"./utils-DhUt689t.js";import{L as g,R as _}from"./runtime-OeWFs5Hf.js";import{d as ee,f as te,k as v,m as ne,p as y,w as b}from"./entities-B8Vupv5g.js";import{in as x,it as S,pn as C}from"./runtime-Ca_Z-vg5.js";import{a as w,t as re}from"./useParams-ekGanxxb.js";import{d as T}from"./toast-DXWclCrr.js";import{s as E}from"./useSettings-gPlpTIWi.js";import{n as D}from"./server-6nKYyc8r.js";import"./queries-hhl_J8u9.js";import{p as O}from"./session-logic-Dr1plzXe.js";import{a as k,i as A,n as ie,o as j}from"./threadSort-Bd2rijEy.js";import{c as M,r as N}from"./projectFilesQueryState-0jxJ50Qq.js";import{r as P,t as ae}from"./uiStateStore-CdkBStdp.js";import{d as F,f as I,i as oe,r as se,s as ce,t as L}from"./p4ProjectFile-CwpteA7b.js";var R=e(t(),1),z=n(),B=`[data-thread-item], [data-thread-selection-safe]`,V=3,H=160;function U(e){let t=(0,z.c)(6),[n,r]=R.useState(null),[i,a]=R.useState(e),o,s;t[0]!==e||t[1]!==n?(o=()=>{if(e){a(!0);return}if(n===null)return;if(typeof IntersectionObserver>`u`){a(!0);return}let t=n.closest(`[data-slot="scroll-area-viewport"]`),r=new IntersectionObserver(e=>{let[t]=e;return a(t?.isIntersecting===!0)},{root:t,rootMargin:`${H}px 0px`});return r.observe(n),()=>r.disconnect()},s=[e,n],t[0]=e,t[1]=n,t[2]=o,t[3]=s):(o=t[2],s=t[3]),R.useEffect(o,s);let c=e||i,l;return t[4]===c?l=t[5]:(l={leaseLiveStatus:c,rowRef:r},t[4]=c,t[5]=l),l}function W(e,t){let n=R.useRef(null);return e!==null&&t!==null&&(n.current={key:e,value:t}),t===null?e!==null&&n.current?.key===e?n.current.value:null:t}function G(e,t,n,r){let i=e.indexOf(t),a=e.indexOf(n);return i===-1||a===-1?[]:e.slice(Math.min(i,a),Math.max(i,a)+1).filter(r)}async function K(e){let t=new Set,n=null;for(let r of e.entries){let i=await e.delete(r,t);if(i!==null){if(i._tag===`Failure`){if(_(i))break;n??=i;continue}t.add(r.threadKey)}}return{deletedThreadKeys:t,firstFailure:n}}async function q(e){let t=[],n=[];for(let r of e.entries){let i=!1,a=await e.archive(r,()=>{i=!0});if((i||a._tag===`Success`)&&t.push(r.threadKey),a._tag===`Success`)continue;let o=a;if(i){n.push(o);continue}return{archivedThreadKeys:t,mutationFailure:o,followupFailures:n}}return{archivedThreadKeys:t,mutationFailure:null,followupFailures:n}}function J(e){return[{id:`mark-unread`,label:`Mark unread (${e.count})`},{id:`archive`,label:`Archive (${e.count})`,disabled:e.hasRunningThread},{id:`delete`,label:`Delete (${e.count})`,destructive:!0}]}function Y(e){return e.lineage.relationshipToParent===`subagent`}function le(e,t){let n=S(e);return e.filter(e=>e.archivedAt===null&&!Y(e)&&n(e)&&(t===null||t.has(`${e.environmentId}:${e.projectId}`)))}var ue={"Pending Approval":5,"Awaiting Input":4,Working:3,Connecting:3,Waiting:2.5,"Plan Ready":2,Completed:1};function de(e){let t=e.setTimeoutFn??globalThis.setTimeout,n=e.clearTimeoutFn??globalThis.clearTimeout,r=!1,i=null,a=()=>{i!==null&&(n(i),i=null)};return{sync:n=>{if(!n){a(),r&&(r=!1,e.onVisibilityChange(!1));return}r||i!==null||(i=t(()=>{i=null,r=!0,e.onVisibilityChange(!0)},e.delayMs))},dispose:()=>{a()}}}function fe(){let e=(0,z.c)(5),[t,n]=R.useState(!1),r=R.useRef(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=de({delayMs:200,onVisibilityChange:e=>{n(e)},setTimeoutFn:window.setTimeout.bind(window),clearTimeoutFn:window.clearTimeout.bind(window)});return r.current=e,()=>{e.dispose(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),R.useEffect(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{r.current?.sync(e)},e[2]=o):o=e[2];let s=o,c;return e[3]===t?c=e[4]:(c={showThreadJumpHints:t,updateThreadJumpHintsVisibility:s},e[3]=t,e[4]=c),c}function pe(e,t){return e===void 0?t:e??void 0}function me(e){if(!e.latestRun?.completedAt)return!1;let t=Date.parse(e.latestRun.completedAt);if(Number.isNaN(t)||!e.lastVisitedAt)return!1;let n=Date.parse(e.lastVisitedAt);return Number.isNaN(n)?!0:t>n}function he(e){return e===null||!e.closest(B)}function ge(e){return e>1}function _e(e,t){return e===null||!(`closest`in e)||typeof e.closest!=`function`?null:e.closest(t)}function ve(e){return typeof e!=`object`||!e?!1:_e(e,`a[href]`)!==null||_e(`parentElement`in e&&e.parentElement!==null&&typeof e.parentElement==`object`?e.parentElement:null,`a[href]`)!==null}function ye(e){let{getId:t,getPreferenceIds:n,items:r,preferredIds:i}=e;if(i.length===0)return[...r];let a=new Map;for(let[e,i]of r.entries()){let r=n?.(i)??[t(i)];for(let t of new Set(r)){let n=a.get(t);n?n.push(e):a.set(t,[e])}}let o=new Set,s=i.flatMap(e=>{let t=a.get(e)?.find(e=>!o.has(e));return t===void 0?[]:(o.add(t),[r[t]])}),c=r.filter((e,t)=>!o.has(t));return[...s,...c]}function be(e,t=V){return e.slice(0,Math.max(0,t))}function xe(e){let{currentThreadId:t,direction:n,threadIds:r}=e;if(r.length===0)return null;if(t===null)return n===`previous`?r.at(-1)??null:r[0]??null;let i=r.indexOf(t);return i===-1?null:n===`previous`?i>0?r[i-1]??null:null:i<r.length-1?r[i+1]??null:null}function Se(e){return e.button===2||e.isMac&&e.button===0&&e.ctrlKey}function Ce(e){return e.hasPendingApprovals||e.pendingSubagentRequest===`approval`?`approval`:e.hasPendingUserInput||e.pendingSubagentRequest===`user_input`?`input`:e.runtime!==null&&[`preparing`,`queued`,`starting`,`running`,`waiting`].includes(e.runtime.status)?`working`:e.runtime?.status===`idle`?`waiting`:e.runtime?.status===`failed`?e.runtime.lastErrorClass===`usage_limit`?`limited`:`failed`:`ready`}function we(e,t){let n=k(e,t),r=n.filter(e=>e.pinnedAt!=null);return r.length===0?n:[...A(r),...n.filter(e=>e.pinnedAt==null)]}function Te(e,t){let n=u(t);if(n.length===0)return!1;let r=u(C(e).join(` `));return n.split(` `).every(e=>r.includes(e))}function Ee(e){let{thread:t}=e;return t.hasPendingApprovals||t.pendingSubagentRequest===`approval`?{label:`Pending Approval`,colorClass:`text-amber-600 dark:text-amber-300/90`,dotClass:`bg-amber-500 dark:bg-amber-300/90`,pulse:!1}:t.hasPendingUserInput||t.pendingSubagentRequest===`user_input`?{label:`Awaiting Input`,colorClass:`text-indigo-600 dark:text-indigo-300/90`,dotClass:`bg-indigo-500 dark:bg-indigo-300/90`,pulse:!1}:t.runtime?.status===`running`||t.runtime?.status===`waiting`?{label:`Working`,colorClass:`text-sky-600 dark:text-sky-300/80`,dotClass:`bg-sky-500 dark:bg-sky-300/80`,pulse:!0}:t.runtime?.status===`preparing`||t.runtime?.status===`starting`||t.runtime?.status===`queued`?{label:`Connecting`,colorClass:`text-sky-600 dark:text-sky-300/80`,dotClass:`bg-sky-500 dark:bg-sky-300/80`,pulse:!0}:x(t.pendingBackgroundTasks??[])?{label:`Waiting`,colorClass:`text-sidebar-muted-foreground`,dotClass:`bg-sidebar-muted-foreground`,pulse:!1}:!t.hasPendingUserInput&&t.interactionMode===`plan`&&O(t.latestRun,t.runtime)&&t.hasActionableProposedPlan?{label:`Plan Ready`,colorClass:`text-violet-600 dark:text-violet-300/90`,dotClass:`bg-violet-500 dark:bg-violet-300/90`,pulse:!1}:me(t)?{label:`Completed`,colorClass:`text-emerald-600 dark:text-emerald-300/90`,dotClass:`bg-emerald-500 dark:bg-emerald-300/90`,pulse:!1}:null}function De(e){let t=null;for(let n of e)n!==null&&(t===null||ue[n.label]>ue[t.label])&&(t=n);return t}function Oe(e,t){return t.projectExpanded?t.isThreadListExpanded||e.length<=t.previewCount?e:e.slice(0,t.previewCount):[]}function ke(e){let{deletedThreadId:t,deletedThreadIds:n,sortOrder:r,threads:i}=e,a=i.find(e=>e.id===t);return a?k(i.filter(e=>e.projectId===a.projectId&&e.id!==t&&!n?.has(e.id)),r)[0]?.id??null:null}function Ae(e,t,n){return t.length>0?t.reduce((e,t)=>Math.max(e,ie(t,n)),-1/0):n===`created_at`?j(e.createdAt)??-1/0:j(e.updatedAt??e.createdAt)??-1/0}function X(e,t,n,r){return t===`manual`?[...e]:e.map(e=>({project:e,timestamp:Ae(e,n(e),t)})).sort((e,t)=>(t.timestamp===e.timestamp?0:t.timestamp>e.timestamp?1:-1)||r(e.project,t.project)).map(({project:e})=>e)}function je(e,t,n){let r=new Map;for(let e of t){let t=r.get(e.projectId)??[];t.push(e),r.set(e.projectId,t)}return X(e,n,e=>r.get(e.id)??[],(e,t)=>e.title.localeCompare(t.title)||e.id.localeCompare(t.id))}function Me(e,t,n){let r=new Map(e.flatMap(e=>e.memberProjectRefs.map(t=>[`${t.environmentId}\0${t.projectId}`,e.projectKey]))),i=new Map;for(let e of t){if(e.archivedAt!==null)continue;let t=r.get(`${e.environmentId}\0${e.projectId}`);if(!t)continue;let n=i.get(t);n?n.push(e):i.set(t,[e])}return X(e,n,e=>i.get(e.projectKey)??[],(e,t)=>e.title.localeCompare(t.title)||e.projectKey.localeCompare(t.projectKey))}function Ne(e,t,n){return Me(e,le(t,null),n)}function Pe(e,t,n){let r=(e,t)=>`${e}\u0000${t}`,i=new Map;for(let e of t){if(e.archivedAt!==null)continue;let t=r(e.environmentId,e.projectId),n=i.get(t)??[];n.push(e),i.set(t,n)}return X(e,n,e=>i.get(r(e.environmentId,e.id))??[],(e,t)=>e.title.localeCompare(t.title)||e.environmentId.localeCompare(t.environmentId)||e.id.localeCompare(t.id))}function Z(e){return e.envMode!==`local`&&e.newWorktreesStartFromOrigin}function Fe(e){return e.projectDefaultSelection??(e.carrySourceDraftId===e.destinationDraftId?null:e.carrySelection)}function Ie(e){let t=e?.activeProvider;return e?.modelSelectionExplicit===!0&&t!=null&&e.modelSelectionByProvider[t]!==void 0}function Le(e){return e.activeThread?l(e.activeThread.environmentId,e.activeThread.projectId):e.activeDraftThread?l(e.activeDraftThread.environmentId,e.activeDraftThread.projectId):e.defaultProjectRef}async function Re(e){let t=Le(e);return t?(await e.handleNewThread(t),!0):!1}async function ze(e,t){let n=await g(c,N(e,t,d),{reportDefect:!1,reportFailure:!1}),r=M(e,t,d,M(e,t,n._tag===`Success`?n.value.relativePath:d,n._tag===`Success`?n.value:null));return r===null||r.truncated?null:L(r.contents)}function Q(e){return{...e?.branch===void 0?{}:{branch:e.branch},...e?.worktreePath===void 0?{}:{worktreePath:e.worktreePath},...e?.envMode===void 0?{}:{envMode:e.envMode},...e?.startFromOrigin===void 0?{}:{startFromOrigin:e.startFromOrigin}}}function $(){let e=(0,z.c)(7),t=h(D),n=E(I),c=w(),l;e[0]===c.state.matches?l=e[1]:(l=()=>{let e=c.state.matches[c.state.matches.length-1]?.params??{};return T(e)},e[0]=c.state.matches,e[1]=l);let u=l,d;return e[2]!==t||e[3]!==u||e[4]!==n||e[5]!==c?(d=(e,l)=>{let d=te(),h=t.get(e.environmentId)?.settings??o,{getComposerDraft:g,getDraftSessionByLogicalProjectKey:_,getDraftSession:v,getDraftThread:b,applyStickyState:x,setDraftThreadContext:S,setLogicalProjectDraftThreadId:C,setModelSelection:w}=a.getState(),re=c.state.location.href,T=()=>c.state.location.href!==re,E=u(),D=E?.kind===`server`?y(E.threadRef):null,O=E?.kind===`draft`?v(E.draftId):null,k=E?g(E.kind===`server`?E.threadRef:E.draftId):null,A=k?.activeProvider??null,ie=(A?k?.modelSelectionByProvider[A]??null:null)??D?.modelSelection??null,j=k?.interactionMode??D?.interactionMode??O?.interactionMode??null,M=d.find(t=>t.id===e.projectId&&t.environmentId===e.environmentId),N=()=>T()||M!==void 0&&ee(e)===null,P=oe(h,M?.id??null,M),ae=P.settings.defaultModelSelection,F=P.settings.defaultRuntimeMode,I=e=>Fe({projectDefaultSelection:ae??null,carrySelection:ie,carrySourceDraftId:E?.kind===`draft`?E.draftId:null,destinationDraftId:e}),L=async()=>{let n=M!==void 0&&P.settings.defaultThreadEnvMode===null?await ze(M.environmentId,M.workspaceRoot):null;return se({projectSettings:oe(h,M?.id??null,M,n),workspaceRoot:M?.workspaceRoot??null,newProjectsRoot:t.get(e.environmentId)?.newProjectsRoot,projectHasThreads:ne().some(t=>t.environmentId===e.environmentId&&t.projectId===e.projectId)})},R=M?ce(M,n):r(e),z=l?.branch!==void 0,B=l?.worktreePath!==void 0,V=l?.envMode!==void 0,H=l?.startFromOrigin!==void 0,U=_(R),W=U?s(U.environmentId,U.threadId):null,G=U!==null&&U.promotedTo==null&&W!==null&&y(W)===null?U:null;W&&G===null&&i(W);let K=G&&!f(g(G.draftId))?G:null,q=E?E.kind===`server`?b(E.threadRef):v(E.draftId):null;if(K)return(async()=>{let t=E?.kind===`draft`&&E.draftId===K.draftId,n=z||B||V||H,r=null;if(n)r=Q(l);else if(!t){let e=await L();if(N())return null;let t=u(),n=t?.kind===`draft`&&t.draftId===K.draftId,i=W!==null&&y(W)!==null,a=_(R)?.draftId!==K.draftId,o=f(g(K.draftId));if(n||i||a||o)return null;r={branch:null,worktreePath:null,envMode:e,startFromOrigin:Z({envMode:e,newWorktreesStartFromOrigin:P.settings.newWorktreesStartFromOrigin})}}if(r&&S(K.draftId,{...r,...t?{}:{runtimeMode:F},...j?{interactionMode:j}:{}}),!Ie(g(K.draftId))){x(K.draftId);let e=I(K.draftId);e&&w(K.draftId,e,{replaceOptions:!0})}C(R,e,K.draftId,{threadId:K.threadId,...r,...t?{}:{runtimeMode:F},...j?{interactionMode:j}:{}});let i={draftId:K.draftId,threadId:K.threadId},a=u();return a?.kind===`draft`&&a.draftId===K.draftId||await c.navigate({to:`/draft/$draftId`,params:{draftId:K.draftId},replace:l?.replace??!1}),i})();if(q&&E?.kind===`draft`&&q.logicalProjectKey===R&&q.promotedTo==null&&!f(g(E.draftId)))return(z||B||V||H)&&S(E.draftId,Q(l)),C(R,e,E.draftId,{threadId:q.threadId,createdAt:q.createdAt,runtimeMode:q.runtimeMode,interactionMode:q.interactionMode,...Q(l)}),Promise.resolve({draftId:E.draftId,threadId:q.threadId});let J=p(),Y=m(),le=new Date().toISOString();return(async()=>{let t=l?.envMode??await L();if(N())return null;let n=_(R);if(n&&n.draftId!==U?.draftId&&y(s(n.environmentId,n.threadId))===null)return C(R,e,n.draftId,{threadId:n.threadId,createdAt:n.createdAt,runtimeMode:n.runtimeMode,interactionMode:n.interactionMode,...Q(l)}),await c.navigate({to:`/draft/$draftId`,params:{draftId:n.draftId},replace:l?.replace??!1}),{draftId:n.draftId,threadId:n.threadId};C(R,e,J,{threadId:Y,createdAt:le,branch:l?.branch??null,worktreePath:l?.worktreePath??null,envMode:t,startFromOrigin:l?.startFromOrigin??Z({envMode:t,newWorktreesStartFromOrigin:P.settings.newWorktreesStartFromOrigin}),runtimeMode:F,...j?{interactionMode:j}:{}}),x(J);let r=I(J);return r&&w(J,r,{replaceOptions:!0}),await c.navigate({to:`/draft/$draftId`,params:{draftId:J},replace:l?.replace??!1}),{draftId:J,threadId:Y}})()},e[2]=t,e[3]=u,e[4]=n,e[5]=c,e[6]=d):d=e[6],d}function Be(){let e=(0,z.c)(16),t=P(We),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={strict:!1,select:Ue},e[0]=n):n=e[0];let r=re(n),i=r?.kind===`server`?r.threadRef:null,o=r?.kind===`draft`?r.draftId:null,s=v(i),c=a(He),u;e[1]!==c||e[2]!==r?(u=()=>r?r.kind===`server`?c(r.threadRef):a.getState().getDraftSession(r.draftId):null,e[1]=c,e[2]=r,e[3]=u):u=e[3];let d=a(u),f=b(),p;e[4]!==t||e[5]!==f?(p=ye({items:f,preferredIds:t,getId:F,getPreferenceIds:Ve}),e[4]=t,e[5]=f,e[6]=p):p=e[6];let m=p,h=$(),g;e[7]===m[0]?g=e[8]:(g=m[0]?l(m[0].environmentId,m[0].id):null,e[7]=m[0],e[8]=g);let _;return e[9]!==d||e[10]!==s||e[11]!==h||e[12]!==o||e[13]!==i||e[14]!==g?(_={activeDraftThread:d,activeThread:s,defaultProjectRef:g,handleNewThread:h,routeDraftId:o,routeThreadRef:i},e[9]=d,e[10]=s,e[11]=h,e[12]=o,e[13]=i,e[14]=g,e[15]=_):_=e[15],_}function Ve(e){return[F(e),ae(e.workspaceRoot)]}function He(e){return e.getDraftThread}function Ue(e){return T(e)}function We(e){return e.projectOrder}export{W as A,Ee as C,Pe as D,je as E,fe as M,Ne as O,pe as S,Me as T,xe as _,Le as a,G as b,J as c,be as d,Se as f,Te as g,ye as h,Z as i,U as j,we as k,K as l,ge as m,$ as n,Re as o,ve as p,Ie as r,q as s,Be as t,ke as u,De as v,he as w,Ce as x,Oe as y};
2
- //# sourceMappingURL=useHandleNewThread-BYNZXzR_.js.map
@@ -1,3 +0,0 @@
1
- import{a as e,t}from"./react-DH3P2YXY.js";import{n}from"./jsx-runtime-BnjsACtP.js";import{$_ as r,$b as i,CS as a,Dh as o,Dl as s,Eb as c,Gy as l,Lg as u,M_ as d,N_ as f,Nb as ee,Nc as te,Nh as ne,Oh as re,Os as ie,P_ as ae,Rh as oe,Tb as se,Th as ce,Tl as le,Ts as ue,Ub as de,Uh as fe,Vh as pe,Wb as me,Wh as he,Ws as ge,Xx as _e,Xy as ve,Yv as ye,Zb as be,Zo as xe,_T as p,_h as Se,aE as Ce,as as m,bh as we,cb as Te,d_ as Ee,eE as De,ex as Oe,hb as ke,ib as Ae,js as je,ks as Me,l_ as Ne,ns as Pe,nx as Fe,pb as Ie,ps as h,rs as Le,rx as Re,sv as ze,tE as g,ts as _,wl as Be,xS as Ve,xT as v,xb as He,xh as Ue,yT as y,yb as We}from"./utils-DhUt689t.js";import{At as Ge,E as Ke,I as qe,R as Je,Sn as Ye,T as Xe,W as Ze,_t as b}from"./runtime-OeWFs5Hf.js";import{T as Qe,Tt as $e,kt as et,t as tt}from"./runtime-Ca_Z-vg5.js";import{i as x}from"./toast-DXWclCrr.js";import{f as S,h as C,m as nt,u as rt}from"./server-6nKYyc8r.js";import{i as it,n as at,s as ot,t as st}from"./session-BxUdP61p.js";import{t as ct}from"./use-atom-command-vqjL7n-x.js";import{B as lt,C as ut,F as dt,N as ft,O as pt,P as mt,S as ht,V as gt,_ as _t,b as vt,c as yt,i as w,n as bt,o as xt,r as St,y as Ct}from"./themePalette-VIM7Gehx.js";var T=e(t(),1),E=n();function wt(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function Tt(e){let t=Le(t=>m(n=>{let r=n(e.catalogValueAtom).entries.get(t);if(r===void 0)return null;let i=De(ie(n(e.stateAtom(t))),()=>Ye);return{entry:r,connection:r.unsupportedReason===void 0?et(i):{phase:`unsupported`,error:r.unsupportedReason,traceId:null},serverConfig:n(e.serverConfigValueAtom(t))}}).pipe(h(`environment-presentation:${t}`))),n=new Map;return{presentationAtom:t,presentationsAtom:m(r=>{let i=new Map;for(let n of r(e.catalogValueAtom).entries.keys()){let e=r(t(n));e!==null&&i.set(n,e)}return wt(n,i)||(n=i),n}).pipe(h(`environment-presentations`))}}function Et(e,t){return{environmentId:e,environmentLabel:t.entry.target.label,displayUrl:$e(t.entry)??``,isRelayManaged:Ge(t.entry),isEnabled:t.entry.enabled,connectionState:t.connection.phase,connectionError:t.connection.error,connectionErrorTraceId:t.connection.traceId}}function Dt(e){let t=m(t=>{let n=[...t(e.catalogValueAtom).entries.keys()],r=g(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e===r[t])?r:n}),n=m(t=>{let n=[...t(e.catalogValueAtom).entries].map(([e,t])=>({environmentId:e,label:t.target.label})),r=g(t.self());return r!==null&&r.length===n.length&&n.every((e,t)=>e.environmentId===r[t]?.environmentId&&e.label===r[t]?.label)?r:n}),r=Le(t=>m(n=>{let r=n(e.presentationAtom(t));if(r===null)return null;let i=Et(t,r),a=g(n.self());return a!==null&&a.environmentId===i.environmentId&&a.environmentLabel===i.environmentLabel&&a.displayUrl===i.displayUrl&&a.isRelayManaged===i.isRelayManaged&&a.isEnabled===i.isEnabled&&a.connectionState===i.connectionState&&a.connectionError===i.connectionError&&a.connectionErrorTraceId===i.connectionErrorTraceId?a:i})),i=m(t=>{let n=[];for(let i of t(e.catalogValueAtom).entries.keys()){let e=t(r(i));e!==null&&n.push(e)}let i=g(t.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}).pipe(h(`environment-connection-summaries`));return{environmentIdsAtom:t,connectedEnvironmentIdsAtom:m(e=>{let n=e(t).filter(t=>e(r(t))?.connectionState===`connected`),i=g(e.self());return i!==null&&i.length===n.length&&n.every((e,t)=>e===i[t])?i:n}),identitiesAtom:n,environmentsAtom:i,machineByIdAtom:m(n=>{let r=new Map(n(t).map(t=>[t,s(n(e.presentationAtom(t))?.serverConfig??null)])),i=g(n.self());return i!==null&&wt(i,r)?i:r}),pullRequestsSupportedAtom:m(n=>n(t).some(t=>n(e.presentationAtom(t))?.serverConfig?.environment.capabilities.pullRequests===!0))}}var Ot=Tt({catalogValueAtom:C.catalogValueAtom,stateAtom:C.stateAtom,serverConfigValueAtom:S.configValueAtom}),kt=Dt({catalogValueAtom:C.catalogValueAtom,presentationAtom:Ot.presentationAtom}),At=m(null).pipe(h(`web-environment-presentation:empty`));function jt(e){let t=(0,E.c)(5),n=_(C.catalogValueAtom),r;t[0]===e?r=t[1]:(r=e===null?At:Ot.presentationAtom(e),t[0]=e,t[1]=r);let i=_(r),a;return t[2]!==n.isReady||t[3]!==i?(a={isReady:n.isReady,presentation:i},t[2]=n.isReady,t[3]=i,t[4]=a):a=t[4],a}var Mt={status:`idle`},D=Mt,O=null,k=[],A=0,Nt=new Set;function j(e){D=e;for(let e of Nt)e()}function Pt(e){O?.resolve(e);for(let t of k)t.resolve(e);O=null,k=[]}function Ft(){return D}function It(e){return Nt.add(e),()=>{Nt.delete(e)}}function Lt(){A+=1;let e=!0;return()=>{e&&(e=!1,A=Math.max(0,A-1),A===0&&(Pt(!1),j(Mt)))}}function Rt(e,t){if(A!==0)return new Promise(n=>{let r={message:e,variant:t?.variant??`default`,resolve:n};if(O||D.status===`closing`){k.push(r);return}O=r,j({status:`confirming`,message:e,variant:r.variant})})}function zt(){return D.status!==`idle`||O!==null||k.length>0}function Bt(e){if(D.status!==`confirming`||!O)return;let t=O;O=null,t.resolve(e),j({status:`closing`,message:D.message,variant:D.variant})}function Vt(){if(D.status!==`closing`)return;let e=k.shift();if(!e){j(Mt);return}O=e,j({status:`confirming`,message:e.message,variant:e.variant})}var Ht={Ctrl:`⌃`,Alt:`⌥`,Shift:`⇧`,Super:`⌘`,CmdOrCtrl:`⌘`};function Ut(e,t=navigator.platform){let n=e.split(`+`),r=n.pop()??``;return te(t)?`${n.map(e=>Ht[e]??e).join(``)}${r}`:[...n.map(e=>e===`CmdOrCtrl`?`Ctrl`:e===`Super`?`Meta`:e),r].join(`+`)}var Wt=`http://www.w3.org/2000/svg`,Gt={archive:[{tag:`rect`,attrs:{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`}},{tag:`path`,attrs:{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`}},{tag:`path`,attrs:{d:`M10 12h4`}}],check:[{tag:`path`,attrs:{d:`M20 6 9 17l-5-5`}}],timer:[{tag:`line`,attrs:{x1:`10`,x2:`14`,y1:`2`,y2:`2`}},{tag:`line`,attrs:{x1:`12`,x2:`15`,y1:`14`,y2:`11`}},{tag:`circle`,attrs:{cx:`12`,cy:`14`,r:`8`}}],"chevron-right":[{tag:`path`,attrs:{d:`m9 19 7-7-7-7`}}],"circle-check":[{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}},{tag:`path`,attrs:{d:`m9 12 2 2 4-4`}}],clock:[{tag:`path`,attrs:{d:`M12 6v6l4 2`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`10`}}],pencil:[{tag:`path`,attrs:{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}},{tag:`path`,attrs:{d:`m15 5 4 4`}}],copy:[{tag:`rect`,attrs:{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}},{tag:`path`,attrs:{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}}],folder:[{tag:`path`,attrs:{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}}],"git-branch":[{tag:`line`,attrs:{x1:`6`,x2:`6`,y1:`3`,y2:`15`}},{tag:`circle`,attrs:{cx:`18`,cy:`6`,r:`3`}},{tag:`circle`,attrs:{cx:`6`,cy:`18`,r:`3`}},{tag:`path`,attrs:{d:`M18 9a9 9 0 0 1-9 9`}}],eye:[{tag:`path`,attrs:{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"eye-off":[{tag:`path`,attrs:{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`}},{tag:`path`,attrs:{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`}},{tag:`path`,attrs:{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`}},{tag:`path`,attrs:{d:`m2 2 20 20`}}],"app-window":[{tag:`rect`,attrs:{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`}},{tag:`path`,attrs:{d:`M10 4v4`}},{tag:`path`,attrs:{d:`M2 8h20`}},{tag:`path`,attrs:{d:`M6 4v4`}}],"arrow-up-right":[{tag:`path`,attrs:{d:`M7 7h10v10`}},{tag:`path`,attrs:{d:`M7 17 17 7`}}],"external-link":[{tag:`path`,attrs:{d:`M15 3h6v6`}},{tag:`path`,attrs:{d:`M10 14 21 3`}},{tag:`path`,attrs:{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}}],link:[{tag:`path`,attrs:{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`}},{tag:`path`,attrs:{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`}}],list:[{tag:`path`,attrs:{d:`M3 5h.01`}},{tag:`path`,attrs:{d:`M3 12h.01`}},{tag:`path`,attrs:{d:`M3 19h.01`}},{tag:`path`,attrs:{d:`M8 5h13`}},{tag:`path`,attrs:{d:`M8 12h13`}},{tag:`path`,attrs:{d:`M8 19h13`}}],share:[{tag:`path`,attrs:{d:`M12 2v13`}},{tag:`path`,attrs:{d:`m16 6-4-4-4 4`}},{tag:`path`,attrs:{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`}}],x:[{tag:`path`,attrs:{d:`M18 6 6 18`}},{tag:`path`,attrs:{d:`m6 6 12 12`}}],hash:[{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`9`,y2:`9`}},{tag:`line`,attrs:{x1:`4`,x2:`20`,y1:`15`,y2:`15`}},{tag:`line`,attrs:{x1:`10`,x2:`8`,y1:`3`,y2:`21`}},{tag:`line`,attrs:{x1:`16`,x2:`14`,y1:`3`,y2:`21`}}],"mail-open":[{tag:`path`,attrs:{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`}},{tag:`path`,attrs:{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`}}],"message-square-plus":[{tag:`path`,attrs:{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`}},{tag:`path`,attrs:{d:`M12 8v6`}},{tag:`path`,attrs:{d:`M9 11h6`}}],pin:[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`}}],"pin-off":[{tag:`path`,attrs:{d:`M12 17v5`}},{tag:`path`,attrs:{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`}},{tag:`path`,attrs:{d:`m2 2 20 20`}},{tag:`path`,attrs:{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`}}],"refresh-cw":[{tag:`path`,attrs:{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}},{tag:`path`,attrs:{d:`M21 3v5h-5`}},{tag:`path`,attrs:{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}},{tag:`path`,attrs:{d:`M8 16H3v5`}}],settings:[{tag:`path`,attrs:{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.38a2 2 0 0 0-.73-2.73l-.15-.09a2 2 0 0 1-1-1.74v-.51a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`}},{tag:`circle`,attrs:{cx:`12`,cy:`12`,r:`3`}}],"folder-tree":[{tag:`path`,attrs:{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}},{tag:`path`,attrs:{d:`M3 5a2 2 0 0 0 2 2h3`}},{tag:`path`,attrs:{d:`M3 3v13a2 2 0 0 0 2 2h3`}}],trash:[{tag:`path`,attrs:{d:`M3 6h18`}},{tag:`path`,attrs:{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}},{tag:`path`,attrs:{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}},{tag:`line`,attrs:{x1:`10`,x2:`10`,y1:`11`,y2:`17`}},{tag:`line`,attrs:{x1:`14`,x2:`14`,y1:`11`,y2:`17`}}]};function Kt(e,t){let n=Gt[e];if(!n||typeof document.createElementNS!=`function`)return null;let r=document.createElementNS(Wt,`svg`);r.setAttribute(`xmlns`,Wt),r.setAttribute(`viewBox`,`0 0 24 24`),r.setAttribute(`fill`,`none`),r.setAttribute(`stroke`,`currentColor`),r.setAttribute(`stroke-width`,`2`),r.setAttribute(`stroke-linecap`,`round`),r.setAttribute(`stroke-linejoin`,`round`),r.setAttribute(`class`,t===`destructive`?`size-4.5 shrink-0 sm:size-4`:`size-4.5 shrink-0 text-muted-foreground sm:size-4`);for(let e of n){let t=document.createElementNS(Wt,e.tag);for(let[n,r]of Object.entries(e.attrs))t.setAttribute(n,r);r.appendChild(t)}return r}function qt(e,t,n){let r=e.getBoundingClientRect(),i=Math.min(Math.max(4,t),Math.max(4,window.innerWidth-r.width-4)),a=Math.min(Math.max(4,n),Math.max(4,window.innerHeight-r.height-4));e.style.left=`${i}px`,e.style.top=`${a}px`}function Jt(e,t){if(typeof Node<`u`&&e instanceof Node)return t.some(t=>t.contains(e));if(!e||typeof e!=`object`)return!1;let n=e;for(;n&&typeof n==`object`;){if(t.includes(n))return!0;n=n.parent}return!1}var M=null;function Yt(){return M!==null}function Xt(){M?.(),M=null}function Zt(e,t){return new Promise(n=>{let r=document.activeElement instanceof HTMLElement?document.activeElement:null,i=[],a=[],o=!1,s=!1,c=()=>l(null),l=e=>{if(o)return;o=!0,M===c&&(M=null),document.removeEventListener(`keydown`,u),document.removeEventListener(`pointerdown`,d,!0),document.removeEventListener(`contextmenu`,f,!0);let t=Jt(document.activeElement,i);for(let e of i)e.remove();t&&r?.isConnected&&r.focus({preventScroll:!0}),n(e)},u=e=>{e.key===`Escape`&&(e.preventDefault(),l(null))},d=e=>{s&&!Jt(e.target,i)&&l(null)},f=e=>{s&&!Jt(e.target,i)&&(e.preventDefault(),l(null))},ee=e=>{for(;i.length>e;)a.pop()?.setAttribute(`aria-expanded`,`false`),i.pop()?.remove()},ne=(e,t,n,r,o)=>{ee(r);let c=document.createElement(`div`);c.className=`dropdown-glass fixed z-[10000] min-w-56 max-w-sm overflow-hidden rounded-lg bg-clip-padding text-popover-foreground outline-none`,c.style.cssText=`position:fixed;z-index:10000;min-width:14rem;max-width:24rem;overflow:hidden;border-radius:var(--radius-lg);background-clip:padding-box;color:var(--contrast-popover-foreground);outline:none;pointer-events:auto;`,c.style.left=`${t}px`,c.style.top=`${n}px`,c.dataset.level=String(r);let u=document.createElement(`div`);u.className=`max-h-[calc(100vh-0.5rem)] min-w-0 max-w-sm overflow-y-auto overflow-x-hidden p-1`,u.style.cssText=`max-height:calc(100vh - 0.5rem);min-width:0;max-width:24rem;overflow-x:hidden;overflow-y:auto;padding:0.25rem;`;for(let t of e){if(t.separatorBefore===!0&&u.children.length>0){let e=document.createElement(`div`);e.className=`mx-2 my-1 h-px bg-border`,e.style.cssText=`height:1px;margin:0.25rem 0.5rem;background:var(--contrast-border);`,e.dataset.contextMenuSeparator=`true`,e.setAttribute(`role`,`separator`),u.appendChild(e)}if(t.header===!0){let e=document.createElement(`div`);e.className=`px-2 py-1.5 font-medium text-muted-foreground text-xs`,e.textContent=t.label,u.appendChild(e);continue}let e=Array.isArray(t.children)&&t.children.length>0,n=!e&&(t.destructive===!0||t.id===`delete`),a=document.createElement(`button`);a.type=`button`;let o=t.disabled===!0;a.disabled=o;let c=`flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-left outline-none transition-colors sm:min-h-7 sm:text-sm min-h-8 text-base`;if(a.className=o?`${c} pointer-events-none cursor-not-allowed text-muted-foreground opacity-64`:n?`${c} text-destructive-foreground hover:bg-destructive/10 hover:text-destructive-foreground`:`${c} text-foreground hover:bg-accent hover:text-accent-foreground`,a.style.cssText=`display:flex;width:100%;min-height:1.75rem;align-items:center;gap:0.5rem;border:0;border-radius:var(--radius-sm);background:transparent;padding:0.25rem 0.5rem;color:var(--contrast-foreground);font-family:var(--font-sans,system-ui,sans-serif);font-size:0.875rem;line-height:1.25rem;text-align:left;cursor:default;`,n&&(a.style.color=`var(--destructive-foreground)`),o&&(a.style.color=`var(--contrast-muted-foreground)`,a.style.opacity=`0.64`,a.style.pointerEvents=`none`),typeof t.checked==`boolean`){a.setAttribute(`role`,`menuitemradio`),a.setAttribute(`aria-checked`,t.checked?`true`:`false`);let e=t.checked?Kt(`check`,`neutral`):null;if(e)a.appendChild(e);else{let e=document.createElement(`span`);e.className=`size-4.5 shrink-0 sm:size-4`,e.style.cssText=`display:inline-block;width:1rem;height:1rem;flex-shrink:0;`,e.setAttribute(`aria-hidden`,`true`),a.appendChild(e)}}else if(typeof t.icon==`string`){let e=Kt(t.icon,n?`destructive`:`neutral`);e&&a.appendChild(e)}let d=document.createElement(`span`);if(d.className=`min-w-0 flex-1 truncate`,d.textContent=t.label,a.appendChild(d),typeof t.accelerator==`string`){let e=document.createElement(`span`);e.className=`ms-6 shrink-0 text-muted-foreground text-xs tracking-widest`,e.style.cssText=`margin-inline-start:1.5rem;flex-shrink:0;color:var(--contrast-muted-foreground);font-size:0.75rem;letter-spacing:0.1em;`,e.textContent=Ut(t.accelerator),e.setAttribute(`aria-hidden`,`true`),a.setAttribute(`aria-keyshortcuts`,t.accelerator.replace(`CmdOrCtrl`,te(navigator.platform)?`Meta`:`Control`)),a.appendChild(e)}if(e){a.setAttribute(`aria-haspopup`,`menu`),a.setAttribute(`aria-expanded`,`false`);let e=Kt(`chevron-right`,`neutral`);e&&(e.setAttribute(`class`,`-me-0.5 ms-auto size-4.5 shrink-0 text-muted-foreground opacity-80 sm:size-4`),e.setAttribute(`aria-hidden`,`true`),e.dataset.contextMenuChevron=`true`,a.appendChild(e))}if(!o){let o=!1,c=!1,u=()=>{let e=o||c;a.style.background=e?n?`color-mix(in srgb, var(--destructive) 10%, transparent)`:`var(--accent)`:`transparent`,a.style.color=e?n?`var(--destructive-foreground)`:`var(--contrast-accent-foreground)`:n?`var(--destructive-foreground)`:`var(--contrast-foreground)`};if(a.addEventListener(`mouseenter`,()=>{a.focus({preventScroll:!0}),o=!0,u()}),a.addEventListener(`mouseleave`,()=>{o=!1,u()}),a.addEventListener(`focus`,()=>{c=!0,u()}),a.addEventListener(`blur`,()=>{c=!1,u()}),e){let e=(e=!1)=>{let n=a.getBoundingClientRect(),o=n.right+4,s=n.top;ne(t.children,o,s,r+1,a),a.setAttribute(`aria-expanded`,`true`);let c=i[r+1];if(!c)return;let l=c.getBoundingClientRect();l.right>window.innerWidth&&qt(c,n.left-l.width-4,n.top),e&&[...c.querySelectorAll(`button`)].find(e=>!e.disabled)?.focus()};a.addEventListener(`mouseenter`,()=>{e()}),a.addEventListener(`click`,t=>{t.preventDefault(),e(!0)})}else a.addEventListener(`mouseenter`,()=>{ee(r+1)}),a.addEventListener(`click`,()=>{s&&l(t.id)})}u.appendChild(a)}c.appendChild(u),c.addEventListener(`mouseenter`,()=>{ee(r+1)}),document.body.appendChild(c),i[r]=c,a[r]=o,requestAnimationFrame(()=>{qt(c,t,n)})};document.addEventListener(`keydown`,u),document.addEventListener(`pointerdown`,d,!0),document.addEventListener(`contextmenu`,f,!0),ne(e,t?.x??0,t?.y??0,0),M&&M(),M=c,requestAnimationFrame(()=>{s=!0})})}var Qt=`p4code:client-settings:v1`;function $t(){return typeof window<`u`}function en(){return $t()?Me(Qt,Se):null}function tn(e){$t()&&je(Qt,e,Se)}var nn;function rn(){return{dialogs:{pickFolder:async e=>window.desktopBridge?window.desktopBridge.pickFolder(e):null,confirm:async(e,t)=>Rt(e,t)??!1},shell:{openExternal:async e=>{if(window.desktopBridge){if(!await window.desktopBridge.openExternal(e))throw Error(`Unable to open link.`);return}window.open(e,`_blank`,`noopener,noreferrer`)},openSystemSettings:async e=>{if(!window.desktopBridge?.openSystemSettings||!await window.desktopBridge.openSystemSettings(e))throw Error(`Unable to open System Settings.`)}},contextMenu:{show:async(e,t)=>window.desktopBridge?window.desktopBridge.showContextMenu(e,t):Zt(e,t),close:async()=>{window.desktopBridge||Xt()}},persistence:{getClientSettings:async()=>window.desktopBridge?window.desktopBridge.getClientSettings():en(),setClientSettings:async e=>{if(window.desktopBridge)return window.desktopBridge.setClientSettings(e);tn(e)}}}}function an(){return rn()}function on(){if(typeof window<`u`)return nn||(nn=an(),nn)}function sn(){let e=on();if(!e)throw Error(`Local API not found`);return e}var N=`p4code:theme`,cn=`(prefers-color-scheme: dark)`,P={theme:`system`,resolvedTheme:`light`,systemDark:!1,followSystem:!0,appearanceMode:`system`,themeHalves:null};function ln(){return F()}function un(){return typeof window>`u`?{}:dn()}function F(){if(typeof window>`u`)return null;try{return pt(window.localStorage.getItem(w))}catch{return null}}function dn(){try{let e=JSON.parse(window.localStorage.getItem(`p4code:theme-halves:v1`)??`null`);if(typeof e!=`object`||!e)return{};let t={};for(let n of[`light`,`dark`]){let r=e[n];typeof r==`string`&&(t[n]=r)}return t}catch{return{}}}function fn(e){return`${e?.light??``}|${e?.dark??``}`}var pn=`theme-color`,mn=`meta[name="${pn}"][data-dynamic-theme-color="true"]`,I=class extends Te()(`ThemeStorageError`,{operation:ve([`read`,`write`]),storageKey:Ae,theme:ee(xt),cause:l()}){get message(){return`Failed to ${this.operation} theme preference for ${this.storageKey}.`}},hn=c(I),gn=class extends Te()(`DesktopThemeSyncError`,{theme:xt,cause:l()}){get message(){return`Failed to sync the ${this.theme} theme to the desktop shell.`}},_n=c(gn),L=[],R=null,vn=!0,yn=null,z=null,B=null;function V(){vn=!0;for(let e of L)e()}function bn(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(cn).matches}function xn(e){if(typeof window>`u`)return e===`system`;try{let e=window.localStorage.getItem(St);if(e===`true`)return!0;if(e===`false`)return!1}catch{}return e===`system`}function Sn(e){return e===`light`||e===`dark`||e===`system`}function H(e){if(typeof window<`u`)try{let e=window.localStorage.getItem(bt);if(Sn(e))return e}catch{}return xn(e)?`system`:Ct(e)??`light`}function Cn(e){if(typeof window<`u`)try{window.localStorage.setItem(bt,e)}catch(e){throw new I({operation:`write`,storageKey:bt,cause:e})}}function wn(){if(typeof window>`u`)return P.theme;let e;try{e=window.localStorage.getItem(N)}catch(e){throw new I({operation:`read`,storageKey:N,cause:e})}return e!==null&&ut(e)?e:P.theme}function Tn(e){if(typeof window<`u`)try{window.localStorage.setItem(N,e),B=null}catch(t){throw new I({operation:`write`,storageKey:N,theme:e,cause:t})}}function U(){if(B!==null)return P.theme;try{return wn()}catch(e){let t=hn(e)?e:new I({operation:`read`,storageKey:N,cause:e});return B=t,console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),P.theme}}function En(){let e=document.querySelector(mn);return e||(e=document.createElement(`meta`),e.name=pn,e.setAttribute(`data-dynamic-theme-color`,`true`),document.head.append(e),e)}function Dn(e){let t=e?.trim().toLowerCase();return!t||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0 0 0 / 0)`?null:e?.trim()??null}function On(){return document.querySelector(`main[data-slot='sidebar-inset']`)??document.querySelector(`[data-slot='sidebar-inner']`)??document.body}function kn(){if(typeof document>`u`||typeof getComputedStyle>`u`)return;let e=getComputedStyle(document.documentElement),t=document.documentElement.dataset.themeId?Dn(e.getPropertyValue(`--app-chrome-background`)):null,n=Dn(getComputedStyle(On()).backgroundColor),r=Dn(getComputedStyle(document.body).backgroundColor),i=t??n??r;if(!i)return;document.documentElement.style.backgroundColor=i,document.body.style.backgroundColor=i;let a=document.querySelectorAll(`meta[name="${pn}"]`);if(a.length===0){En().setAttribute(`content`,i);return}for(let e of a)e.setAttribute(`content`,i)}function W(e,{suppressTransitions:t=!1,preservePreview:n=!0}={}){if(typeof document>`u`||typeof window>`u`||n&&document.documentElement.dataset?.themeId===`__preview`)return;let r=H(e),i=r===`system`,a=i?bn():!1,o=F();if(z?.theme===e&&z.systemDark===a&&z.followSystem===i&&z.appearanceMode===r&&fn(z.themeHalves)===fn(o)){jn(e,i,r);return}t&&document.documentElement.classList.add(`no-transitions`);let s=mt(e,a,i,r,o);yt(dt(e,o,s),s),document.documentElement.classList.toggle(`dark`,s===`dark`),z={theme:e,systemDark:a,followSystem:i,appearanceMode:r,themeHalves:o},kn(),jn(e,i,r),t&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove(`no-transitions`)}))}async function An(e,t,n,r,i=F()){try{await e.setTheme(ft(t,n,r,i))}catch(e){throw new gn({theme:t,cause:e})}}function jn(e,t,n){if(typeof window>`u`)return;let r=window.desktopBridge,i=F(),a=ft(e,t,n,i);r&&typeof r.setTheme==`function`&&yn!==a&&(yn=a,An(r,e,t,n,i).catch(t=>{let n=_n(t)?t:new gn({theme:e,cause:t});console.error(n.message,{theme:n.theme,...b(n)}),yn===a&&(yn=null)}))}typeof document<`u`&&typeof window<`u`&&W(U());function Mn(){if(typeof window>`u`)return P;if(!vn&&R)return R;vn=!1;let e=U(),t=H(e),n=t===`system`,r=n?bn():!1,i=F(),a=mt(e,r,n,t,i);return R&&R.theme===e&&R.resolvedTheme===a&&R.systemDark===r&&R.followSystem===n&&R.appearanceMode===t&&fn(R.themeHalves)===fn(i)||(R={theme:e,resolvedTheme:a,systemDark:r,followSystem:n,appearanceMode:t,themeHalves:i}),R}function Nn(){return P}function Pn(){let e=U();H(e)===`system`&&W(e,{suppressTransitions:!0}),V()}function Fn(e){e.key===N?(B=null,W(U(),{suppressTransitions:!0}),V()):e.key===`p4code:theme-follow-system`||e.key===`p4code:theme-appearance-mode`||e.key===`p4code:theme-halves:v1`?(W(U(),{suppressTransitions:!0}),V()):(e.key===`p4code:themes:v1`||e.key===null)&&(e.key===null&&(B=null),ht(),z=null,W(U(),{suppressTransitions:!0}),V())}var In=null;function Ln(e){if(typeof window>`u`)return()=>{};if(L.push(e),!In){let e=typeof window.matchMedia==`function`?window.matchMedia(cn):null;e?.addEventListener(`change`,Pn),window.addEventListener(`storage`,Fn),In=()=>{e?.removeEventListener(`change`,Pn),window.removeEventListener(`storage`,Fn)}}return()=>{L=L.filter(t=>t!==e),L.length===0&&(In?.(),In=null)}}function Rn(){let e=(0,T.useSyncExternalStore)(Ln,Mn,Nn),{theme:t,resolvedTheme:n}=e,r=(0,T.useCallback)(e=>{if(typeof window>`u`)return!1;try{Cn(H(U()));let t=window.localStorage.getItem(w);window.localStorage.removeItem(w);try{Tn(e)}catch(e){if(t!==null)try{window.localStorage.setItem(w,t)}catch{}throw e}}catch(t){let n=hn(t)?t:new I({operation:`write`,storageKey:N,theme:e,cause:t});return console.error(n.message,{operation:n.operation,storageKey:n.storageKey,theme:e,...b(n)}),!1}return W(e,{suppressTransitions:!0}),V(),!0},[]),i=(0,T.useCallback)(e=>{if(typeof window>`u`)return!1;try{Cn(e)}catch(e){let t=hn(e)?e:new I({operation:`write`,storageKey:bt,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return B=null,W(U(),{suppressTransitions:!0}),V(),!0},[]),a=(0,T.useCallback)(e=>{let n=H(t),r=e?`system`:n===`system`?Ct(t)??`light`:n;return i(r)},[i,t]),o=(0,T.useCallback)((e,t)=>{if(typeof window>`u`)return!1;try{let n={...dn()};t===null?delete n[e]:n[e]=t,n.light===void 0&&n.dark===void 0?window.localStorage.removeItem(w):window.localStorage.setItem(w,JSON.stringify(n))}catch(e){let t=new I({operation:`write`,storageKey:w,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return W(U(),{suppressTransitions:!0}),V(),!0},[]),s=(0,T.useCallback)(()=>{if(typeof window>`u`)return!1;try{window.localStorage.removeItem(w)}catch(e){let t=new I({operation:`write`,storageKey:w,cause:e});return console.error(t.message,{operation:t.operation,storageKey:t.storageKey,...b(t)}),!1}return W(U(),{suppressTransitions:!0}),V(),!0},[]),c=(0,T.useCallback)(({preservePreview:e=!1}={})=>{typeof window<`u`&&(z=null,W(U(),{suppressTransitions:!0,preservePreview:e}),V())},[]);return(0,T.useEffect)(()=>{W(t)},[e.appearanceMode,t]),{theme:t,setTheme:r,setAppearanceMode:i,setFollowSystem:a,setThemeHalf:o,clearThemeHalves:s,refreshTheme:c,followSystem:e.followSystem,appearanceMode:e.appearanceMode,resolvedTheme:n,themeHalves:e.themeHalves}}var zn=ke(se(Ie)),Bn=Re(e=>{let t=e.replace(/("(?:[^"\\]|\\.)*")|\/\/[^\n]*/g,(e,t)=>t?e:``);return t=t.replace(/("(?:[^"\\]|\\.)*")|\/\*[\s\S]*?\*\//g,(e,t)=>t?e:``),t=t.replace(/("(?:[^"\\]|\\.)*")|,(\s*[}\]])/g,(e,t,n)=>t?e:n??``),zn(t).pipe(a(e=>e.issue))}),Vn=new be(Bn,Fe());Oe().pipe(i(Fe({space:2})));var Hn=e=>Ae.pipe(We(e,Vn)),Un={performance:{profile:`performance`,automaticGitFetchInterval:y(15),providerHealthRefreshInterval:p(1),hostPowerMonitorActiveInterval:y(30),hostPowerMonitorIdleInterval:p(2),idleClientTtl:y(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!1,pauseWhenClientLowPower:!1,pauseWhenOnBattery:!1},balanced:{profile:`balanced`,automaticGitFetchInterval:we,providerHealthRefreshInterval:o,hostPowerMonitorActiveInterval:y(30),hostPowerMonitorIdleInterval:p(5),idleClientTtl:y(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!1},"battery-saver":{profile:`battery-saver`,automaticGitFetchInterval:y(0),providerHealthRefreshInterval:p(15),hostPowerMonitorActiveInterval:p(1),hostPowerMonitorIdleInterval:p(10),idleClientTtl:y(45),pauseWhenHostLocked:!0,pauseWhenHostLowPower:!0,pauseWhenClientLowPower:!0,pauseWhenOnBattery:!0}};function G(e){return Un[e]}function Wn(e){return e.profile===`custom`?e.baseProfile??`balanced`:e.profile}function Gn(e){let t=Wn(e),n=Un[t],r=e.profile===`custom`?e.overrides:{};return{profile:t,automaticGitFetchInterval:r.automaticGitFetchInterval??n.automaticGitFetchInterval,providerHealthRefreshInterval:r.providerHealthRefreshInterval??n.providerHealthRefreshInterval,hostPowerMonitorActiveInterval:r.hostPowerMonitorActiveInterval??n.hostPowerMonitorActiveInterval,hostPowerMonitorIdleInterval:r.hostPowerMonitorIdleInterval??n.hostPowerMonitorIdleInterval,idleClientTtl:r.idleClientTtl??n.idleClientTtl,pauseWhenHostLocked:r.pauseWhenHostLocked??n.pauseWhenHostLocked,pauseWhenHostLowPower:r.pauseWhenHostLowPower??n.pauseWhenHostLowPower,pauseWhenClientLowPower:r.pauseWhenClientLowPower??n.pauseWhenClientLowPower,pauseWhenOnBattery:r.pauseWhenOnBattery??n.pauseWhenOnBattery}}function K(e,t){return v(e)===v(t)}function Kn(e,t){return K(e.automaticGitFetchInterval,t.automaticGitFetchInterval)&&K(e.providerHealthRefreshInterval,t.providerHealthRefreshInterval)&&K(e.hostPowerMonitorActiveInterval,t.hostPowerMonitorActiveInterval)&&K(e.hostPowerMonitorIdleInterval,t.hostPowerMonitorIdleInterval)&&K(e.idleClientTtl,t.idleClientTtl)&&e.pauseWhenHostLocked===t.pauseWhenHostLocked&&e.pauseWhenHostLowPower===t.pauseWhenHostLowPower&&e.pauseWhenClientLowPower===t.pauseWhenClientLowPower&&e.pauseWhenOnBattery===t.pauseWhenOnBattery}function qn(e){if(e.profile!==`custom`)return{schemaVersion:1,profile:e.profile,overrides:{}};let t=Gn(e),n=[Wn(e),`balanced`,`performance`,`battery-saver`];for(let e of n)if(Kn(t,Un[e]))return{schemaVersion:1,profile:e,overrides:{}};let r=Wn(e),i=Un[r];return{schemaVersion:1,profile:`custom`,baseProfile:r,overrides:{...K(t.automaticGitFetchInterval,i.automaticGitFetchInterval)?{}:{automaticGitFetchInterval:t.automaticGitFetchInterval},...K(t.providerHealthRefreshInterval,i.providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:t.providerHealthRefreshInterval},...K(t.hostPowerMonitorActiveInterval,i.hostPowerMonitorActiveInterval)?{}:{hostPowerMonitorActiveInterval:t.hostPowerMonitorActiveInterval},...K(t.hostPowerMonitorIdleInterval,i.hostPowerMonitorIdleInterval)?{}:{hostPowerMonitorIdleInterval:t.hostPowerMonitorIdleInterval},...K(t.idleClientTtl,i.idleClientTtl)?{}:{idleClientTtl:t.idleClientTtl},...t.pauseWhenHostLocked===i.pauseWhenHostLocked?{}:{pauseWhenHostLocked:t.pauseWhenHostLocked},...t.pauseWhenHostLowPower===i.pauseWhenHostLowPower?{}:{pauseWhenHostLowPower:t.pauseWhenHostLowPower},...t.pauseWhenClientLowPower===i.pauseWhenClientLowPower?{}:{pauseWhenClientLowPower:t.pauseWhenClientLowPower},...t.pauseWhenOnBattery===i.pauseWhenOnBattery?{}:{pauseWhenOnBattery:t.pauseWhenOnBattery}}}}function Jn(e){let t={schemaVersion:1,profile:Ue,overrides:{}},n=e.backgroundActivity.profile===t.profile&&e.backgroundActivity.baseProfile===void 0&&Object.keys(e.backgroundActivity.overrides).length===0,r=e.backgroundActivityProfile,i=r!==`balanced`||v(e.automaticGitFetchInterval)!==v(we)||v(e.providerHealthRefreshInterval)!==v(o);return Gn(n&&i?{schemaVersion:1,profile:v(e.automaticGitFetchInterval)===v(G(r).automaticGitFetchInterval)&&v(e.providerHealthRefreshInterval)===v(G(r).providerHealthRefreshInterval)?r:`custom`,baseProfile:r,overrides:{...v(e.automaticGitFetchInterval)===v(G(r).automaticGitFetchInterval)?{}:{automaticGitFetchInterval:e.automaticGitFetchInterval},...v(e.providerHealthRefreshInterval)===v(G(r).providerHealthRefreshInterval)?{}:{providerHealthRefreshInterval:e.providerHealthRefreshInterval}}}:e.backgroundActivity)}function Yn(e){let t=Jn(e);return qn({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}})}var Xn=Hn(ne);He(Xn);function Zn(e,t){let n=e.providerInstances[t.instanceId];return n===void 0?oe(t.instanceId):he(n)}var Qn=[`codex`,`claudeAgent`,`cursor`,`grok`,`muse`,`pi`,`opencode`,`antigravity`].map(e=>d.make(e));function $n(e,t,n){let r=[...Qn.map(e=>[ae(e),e]),...n?.includeConfiguredInstances===!0?Object.entries(e).flatMap(([e,t])=>Qn.includes(t.driver)?[[f.make(e),t.driver]]:[]):[]].find(([e,n])=>t(e,n));if(r===void 0)return null;let[i,a]=r,o=n?.defaultModelSelection,s=e[i]?.config;return o?.instanceId===i&&ge(s?.customModels).some(e=>e.slug===o.model)?o:{instanceId:i,model:Ee[a]??Ne[a]??`gpt-6-luna`}}function er(e,t,n){let r=e.sourceControlWriterModelSelection;if(!r||!fe(e,n,r.instanceId))return e.textGenerationModelSelection;if(t===void 0)return r;let i=t.find(e=>e.instanceId===r.instanceId);return i?.enabled===!0&&Be(i)&&le(i)?r:e.textGenerationModelSelection}function tr(e,t,n){let r=e.reviewGuideModelSelection;if(r&&fe(e,n,r.instanceId)){let e=t?.find(e=>e.instanceId===r.instanceId);if(t===void 0||e?.enabled===!0&&Be(e)&&le(e))return r}return er(e,t,n)}function nr(e,t={}){return{favorites:e.favorites??t.favorites??[],providerModelPreferences:e.providerModelPreferences??t.providerModelPreferences??{}}}function rr(e,t){let n=e.favorites===null&&(t.favorites?.length??0)>0?t.favorites:void 0,r=e.providerModelPreferences===null&&Object.keys(t.providerModelPreferences??{}).length>0?t.providerModelPreferences:void 0;return n===void 0&&r===void 0?null:{migrateModelPreferences:{...n===void 0?{}:{favorites:n},...r===void 0?{}:{providerModelPreferences:r}}}}var ir=new Set([`continueThreadsAfterServerUpdate`,`sidebarAutoSettleAfterDays`,`sidebarAutoSettleOnMerge`,`autoResumeLimitedThreads`,`snoozeLimitedThreads`,`newWorktreesStartFromOrigin`,`sourceControlWritingStyle`,`textGenerationModelSelection`]);function ar(e){let t={},n={};for(let[r,i]of Object.entries(e))ir.has(r)?t[r]=i:n[r]=i;return{sharedPatch:t,localPatch:n}}function or(e,t,n,r=n,i=!1){let a=e.textGenerationModelSelection?.instanceId??r?.textGenerationModelSelection.instanceId;return!i&&e.textGenerationModelSelection&&(!n||a!==void 0&&(r?.providerInstances[a]?.driver??a)!==(n.providerInstances[a]?.driver??a)||!Zn(n,{...n.textGenerationModelSelection,...e.textGenerationModelSelection}))&&(e=me(e,[`textGenerationModelSelection`])),t?.threadRestartContinuation===!0?e:me(e,[`continueThreadsAfterServerUpdate`])}function sr(e){return e.connection.phase===`connected`&&e.serverConfig?.environment.capabilities.threadAutoSettlement===!0}function cr(e){let t=e.atom(ye(Ke.pipe(Ve(e=>u(e.state)))),{initialValue:Xe});return{stateAtom:t,stateValueAtom:m(e=>De(ie(e(t)),()=>Xe)).pipe(h(`relay-environment-discovery-value`)),refresh:qe(e,{label:`relay-environment-discovery:refresh`,concurrency:{mode:`singleFlight`,key:()=>`refresh`},execute:e=>Ke.pipe(_e(e=>e.refresh))})}}var lr=cr(tt);function ur(e,t){return{...t,environmentId:e,label:t.entry.target.label,displayUrl:$e(t.entry),relayManaged:Ge(t.entry)}}function dr(){let e=(0,E.c)(7),t=_(C.catalogValueAtom),n=_(C.networkStatusValueAtom),r=_(Ot.presentationsAtom),i;e[0]===r?i=e[1]:(i=[...r.entries()].map(fr),e[0]=r,e[1]=i);let a=i,o;return e[2]!==t.isReady||e[3]!==a||e[4]!==n||e[5]!==r?(o={isReady:t.isReady,networkStatus:n,environments:a,presentationById:r},e[2]=t.isReady,e[3]=a,e[4]=n,e[5]=r,e[6]=o):o=e[6],o}function fr(e){let[t,n]=e;return ur(t,n)}function pr(){return _(nt)}function mr(e){let t=(0,E.c)(3),{presentation:n}=jt(e),r;return t[0]!==e||t[1]!==n?(r=e===null||n===null?null:ur(e,n),t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function hr(){return mr(pr())}function gr(e){let t=(0,E.c)(2),n=ot(e),r;return t[0]===n?r=t[1]:(r=Ce(n)?n.value.httpBaseUrl:null,t[0]=n,t[1]=r),r}function _r(){return _(lr.stateValueAtom)}function vr(){return _(kt.environmentIdsAtom)}function yr(){return _(kt.identitiesAtom)}function br(){return _(kt.pullRequestsSupportedAtom)}var xr=`[CLIENT_SETTINGS]`,Sr=new Set,Cr=new Set,wr=ce,q=`pending`,J=null,Tr=0,Er=Promise.resolve(),Dr=0;function Or(){for(let e of Sr)e()}function kr(){for(let e of Cr)e()}function Y(){return wr}function X(e){wr=e,Or()}function Ar(e){q!==e&&(q=e,kr())}function jr(e){return Sr.add(e),Z().catch(()=>void 0),()=>{Sr.delete(e)}}function Mr(){return q===`ready`}function Nr(){return q}function Pr(e){return Cr.add(e),Z().catch(()=>void 0),()=>{Cr.delete(e)}}async function Z(){if(q===`ready`)return;if(J)return J;let e=Tr;Ar(q===`failed`||q===`retrying`?`retrying`:`pending`);let t=(async()=>{try{let t=await sn().persistence.getClientSettings();if(e!==Tr)return;t&&X({...ce,...t}),Ar(`ready`)}catch(t){throw e===Tr&&Ar(`failed`),console.error(`${xr} hydrate failed`,{operation:`hydrate`,...b(t)}),t}})().finally(()=>{J===t&&(J=null)});return J=t,J}var Fr=e=>sn().persistence.setClientSettings(e);function Ir(e){let t=Er.then(e);return Er=t.then(()=>void 0,()=>void 0),t}function Lr(e,t=Fr){let n=q!==`ready`||Dr>0;return n?Dr+=1:X({...Y(),...e}),Ir(async()=>{if(n)try{q!==`ready`&&await Z(),X({...Y(),...e})}finally{--Dr}await t(Y())}).catch(e=>{console.error(`${xr} persist failed`,{operation:`persist`,...b(e)})})}async function Rr(e,t=Fr){return Ir(async()=>{for(q!==`ready`&&await Z();;){let n=Y(),r=e(n);if(await t(r),Y()===n)return X(r),r}})}var zr=new Set(de(ne.fields));function Br(e){let t={},n={};for(let[r,i]of Object.entries(e))zr.has(r)?t[r]=i:n[r]=i;return{serverPatch:t,clientPatch:n}}function Vr(){return Y()}function Hr(){return Z()}function Ur(){return(0,T.useSyncExternalStore)(Pr,Mr,Wr)}function Wr(){return!1}function Gr(){return(0,T.useSyncExternalStore)(Pr,Nr,Kr)}function Kr(){return`pending`}function Q(){return(0,T.useSyncExternalStore)(jr,Y,qr)}function qr(){return ce}function Jr(e,t){return{...t,...e,...nr(e,t)}}var Yr=new Set;function $(e,t){let n=(0,E.c)(8),r=Q(),i=Ur(),a;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},n[0]=a):a=n[0];let o=ct(S.updateSettings,a),s,c;n[1]!==r||n[2]!==e||n[3]!==i||n[4]!==o||n[5]!==t?(s=()=>{if(!e||!t||!i||Yr.has(e))return;let n=rr(t,r);n&&(Yr.add(e),o({environmentId:e,input:{patch:n}}).finally(()=>Yr.delete(e)))},c=[r,e,i,o,t],n[1]=r,n[2]=e,n[3]=i,n[4]=o,n[5]=t,n[6]=s,n[7]=c):(s=n[6],c=n[7]),(0,T.useEffect)(s,c)}function Xr(e,t){let n=(0,E.c)(6),r=Q(),i;n[0]!==r||n[1]!==e?(i=Jr(e,r),n[0]=r,n[1]=e,n[2]=i):i=n[2];let a=i,o;return n[3]!==a||n[4]!==t?(o=t?t(a):a,n[3]=a,n[4]=t,n[5]=o):o=n[5],o}function Zr(e){let t=(0,E.c)(3),n=Q(),r;return t[0]!==e||t[1]!==n?(r=e?e(n):n,t[0]=e,t[1]=n,t[2]=r):r=t[2],r}function Qr(e){return e.settingsHydrated?e.paletteThemeActive&&!e.paletteThemeAllowsArtwork&&e.mode===`artwork`?`pill`:e.mode:`none`}function $r(){let e=(0,E.c)(7),t=Ur(),n=Q().environmentIdentificationMode,{resolvedTheme:r,theme:i,themeHalves:a}=Rn(),o=(0,T.useSyncExternalStore)(lt,vt,ei),s;if(e[0]!==n||e[1]!==o||e[2]!==r||e[3]!==t||e[4]!==i||e[5]!==a){let c=dt(i,a,r),l=_t(c);s=Qr({mode:n,settingsHydrated:t,paletteThemeActive:o!==null||l!==null,paletteThemeAllowsArtwork:o??gt(c)}),e[0]=n,e[1]=o,e[2]=r,e[3]=t,e[4]=i,e[5]=a,e[6]=s}else s=e[6];return s}function ei(){return null}async function ti(e,t){return(e.favorites===null||e.providerModelPreferences===null)&&await Hr(),{...rr(e,Vr()),...t}}function ni(e){let t=(0,E.c)(6),n;t[0]===e?n=t[1]:(n=e?S.settingsValueAtom(e):ii,t[0]=e,t[1]=n);let r=_(n),i=ct(S.updateSettings,`model preferences update`),a;return t[2]!==e||t[3]!==i||t[4]!==r?(a=async t=>{if(!e||!r)return;let n;try{n=await ti(r,t)}catch{x.add({type:`error`,title:`Model preferences not saved`,description:`Could not load saved model preferences. Try again.`});return}return i({environmentId:e,input:{patch:n}})},t[2]=e,t[3]=i,t[4]=r,t[5]=a):a=t[5],a}function ri(e){let t=(0,T.use)(Pe),n=(0,T.useRef)(new Map),r=ni(e);return(0,T.useCallback)(async(i,a)=>{if(!e)return;let o=S.settingsValueAtom(e),s=t.get(o);if(!s)return;if(s.favorites===null)try{await Hr()}catch{x.add({type:`error`,title:`Favorites not saved`,description:`Could not load saved model preferences. Try again.`});return}let c=t.get(o)??s,l=nr(c,Vr()).favorites,u=JSON.stringify([e,i,a]),d=n.current.get(u),f={favorite:!(d&&(d.pending||d.settings.favorites===c.favorites)?d.favorite:l.some(e=>e.provider===i&&e.model===a)),settings:c,pending:!0};n.current.set(u,f);try{let e=await r({setModelFavorites:[{provider:i,model:a,favorite:f.favorite}]});e&&ue(e)&&t.get(o)?.favorites===c.favorites&&(f.pending=!1)}finally{f.pending&&n.current.get(u)===f&&(d&&!d.pending&&t.get(o)?.favorites===d.settings.favorites?n.current.set(u,d):n.current.delete(u))}},[e,t,r])}var ii=m(null);function ai(e){let t=(0,E.c)(5),n;t[0]===e?n=t[1]:(n=e?S.settingsValueAtom(e):ii,t[0]=e,t[1]=n);let r=_(n),i=Q();$(e,r);let a=r??re,o;return t[2]!==i||t[3]!==a?(o=nr(a,i),t[2]=i,t[3]=a,t[4]=o):o=t[4],o}function oi(e,t){let n=(0,E.c)(2),r;n[0]===e?r=n[1]:(r=S.settingsValueAtom(e),n[0]=e,n[1]=r);let i=_(r);return $(e,i),Xr(i??re,t)}function si(e){let t=(0,E.c)(4),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={reportFailure:!1},t[0]=n):n=t[0];let r=ct(S.mutateProviderInstance,n),i;return t[1]!==e||t[2]!==r?(i=(t,n)=>r({environmentId:e,input:{patch:n===void 0?{}:n,providerInstanceMutation:t}}),t[1]=e,t[2]=r,t[3]=i):i=t[3],i}function ci(e){let t=hr(),n=_(rt);return $(t?.environmentId??null,t?.serverConfig?.settings??null),Xr(n,e)}var li=`This setting is saved on a server, and the hosted app is not anchored to one. Change it from the desktop app or from the server's own address.`;function ui(){let e=(0,E.c)(2),t=hr(),n;return e[0]===t?n=e[1]:(n=t!==null||!Qe(),e[0]=t,e[1]=n),n}function di(e){let t=(0,E.c)(3),n=e!==void 0&&e,{environments:r}=dr(),i;return t[0]!==r||t[1]!==n?(i=m(e=>r.filter(sr).flatMap(t=>{let r=e(st.sessionStateAtom(t.environmentId));if(n&&r._tag===`Initial`)return[t.environmentId];let i=r._tag===`Failure`?null:g(ie(r));return i!==null&&ze(i,`settings:write`)?[t.environmentId]:[]})),t[0]=r,t[1]=n,t[2]=i):i=t[2],_(i)}function fi(e){let t=(0,E.c)(10);it(e,r);let n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={label:`server settings update`,reportFailure:!1},t[0]=n):n=t[0];let i=ct(S.updateSettings,n),{environments:a}=dr(),o;t[1]!==a||t[2]!==i?(o=async e=>{let t=await i(e);if(t._tag===`Failure`&&!Je(t)){let n=a.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,r=Ze(t);x.add({type:`error`,title:`Setting not saved`,description:`Could not save on ${n}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`})}return t},t[1]=a,t[2]=i,t[3]=o):o=t[3];let s=o,c=di(!0),l;return t[4]!==e||t[5]!==a||t[6]!==i||t[7]!==s||t[8]!==c?(l=t=>{let{serverPatch:n,clientPatch:r}=Br(t),o=e===null||pe(n).every(t=>at(e,t));if(Object.keys(n).length>0&&!o&&x.add({type:`warning`,title:`Setting not saved`,description:`This connection lacks permission to change settings on ${a.find(t=>t.environmentId===e)?.label??`the selected environment`}.`}),Object.keys(n).length>0&&o){let{sharedPatch:t,localPatch:r}=ar(n),o=_i;if(Object.keys(r).length>0&&(e?s({environmentId:e,input:{patch:r}}):o()),Object.keys(t).length>0){let n=a.find(t=>t.environmentId===e)?.serverConfig?.settings,r=new Set(c);e&&r.add(e);let s=[],l=[];for(let i of r){let r=a.find(e=>e.environmentId===i),o=or(t,r?.serverConfig?.environment.capabilities,r?.serverConfig?.settings,n,i===e);if(Object.keys(o).length!==0){if(xe.get(st.sessionStateAtom(i))._tag!==`Initial`&&!pe(t).every(e=>at(i,e))){l.push(r?.label??i);continue}s.push({environmentId:i,input:{patch:o}})}}s.length===0?o(l.length>0?`This connection lacks permission to change settings on ${l.join(`, `)}.`:r.size>0?`Update older servers to save this setting.`:void 0):Promise.all(s.map(async e=>({label:a.find(t=>t.environmentId===e.environmentId)?.label??e.environmentId,result:await i(e)}))).then(pi)}}Object.keys(r).length>0&&Lr(r)},t[4]=e,t[5]=a,t[6]=i,t[7]=s,t[8]=c,t[9]=l):l=t[9],l}function pi(e){let t=e.flatMap(gi);if(t.length===0)return;let n=e.filter(hi).map(mi);x.add({type:`error`,title:n.length>0?`Setting saved on some environments`:`Setting not saved`,description:[...t,...n.length>0?[`Saved on ${n.join(`, `)}.`]:[]].join(`
2
- `)})}function mi(e){let{label:t}=e;return t}function hi(e){let{result:t}=e;return t._tag===`Success`}function gi(e){let{label:t,result:n}=e;if(n._tag!==`Failure`||Je(n))return[];let r=Ze(n);return[`Could not save on ${t}: ${r instanceof Error?r.message:`The save failed. Try reconnecting and saving again.`}`]}function _i(e){let t=e===void 0?li:e;return x.add({type:`warning`,title:`Setting not saved`,description:t})}function vi(e){return fi(e)}function yi(){return fi(hr()?.environmentId??null)}function bi(){return xi}function xi(e){return Lr(e)}export{Lt as $,_r as A,Hn as B,gr as C,hr as D,dr as E,Wn as F,kn as G,ln as H,G as I,on as J,Rn as K,qn as L,$n as M,tr as N,pr as O,er as P,Ft as Q,Yn as R,mr as S,vr as T,un as U,H as V,wn as W,Vt as X,Yt as Y,zt as Z,ri as _,Lr as a,jt as at,vi as b,Ur as c,ai as d,Rt as et,oi as f,ui as g,ci as h,Jr as i,kt as it,lr as j,br as k,Gr as l,si as m,Hr as n,It as nt,Rr as o,$ as p,sn as q,Vr as r,Ot as rt,Zr as s,li as t,Bt as tt,$r as u,bi as v,yr as w,yi as x,ni as y,Jn as z};
3
- //# sourceMappingURL=useSettings-gPlpTIWi.js.map