@p4code/cli 0.8.31 → 0.8.32

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 (301) hide show
  1. package/dist/bin.mjs +1 -1
  2. package/dist/{binCli-CJxvJzbR.mjs → binCli-BS733BXG.mjs} +247 -73
  3. package/dist/client/.vite/manifest.json +2221 -2221
  4. package/dist/client/assets/AlertDialogRoot-gCZMGgw9.js +2 -0
  5. package/dist/client/assets/{AnimatedHeight-N_bbjpO0.js → AnimatedHeight-CF-2TJ2y.js} +2 -2
  6. package/dist/client/assets/{AuthSurfaceShell-CgYhpT9f.js → AuthSurfaceShell-QiZ7Fio5.js} +2 -2
  7. package/dist/client/assets/{CSPContext-Bchqn4Z4.js → CSPContext-BrBN2jLZ.js} +2 -2
  8. package/dist/client/assets/{ChatGptUsageButton-DgX5jPaE.js → ChatGptUsageButton-BawFqJFy.js} +2 -2
  9. package/dist/client/assets/{ChatMarkdown-DG8q7VMD.js → ChatMarkdown-Ddq8N5Pt.js} +4 -4
  10. package/dist/client/assets/{CheckboxIndicator-C27GMhZi.js → CheckboxIndicator-Cnknf-Kf.js} +2 -2
  11. package/dist/client/assets/{ClippedText-gxEyECp8.js → ClippedText-Dj3uJchI.js} +2 -2
  12. package/dist/client/assets/{CodexSetupSection.logic-D6jywL3c.js → CodexSetupSection.logic-CQjm4KgX.js} +2 -2
  13. package/dist/client/assets/{ComboboxClear-BU2zssbU.js → ComboboxClear-CQwzC_c6.js} +2 -2
  14. package/dist/client/assets/{ComboboxGroupLabel-BOqTaS8V.js → ComboboxGroupLabel-ByhgWB6k.js} +2 -2
  15. package/dist/client/assets/{CommandBlock-Bl59WSdA.js → CommandBlock-C1TNh1aK.js} +2 -2
  16. package/dist/client/assets/{ComposerPromptEditor-Docpl1DT.js → ComposerPromptEditor-ILuiCg0V.js} +54 -54
  17. package/dist/client/assets/{CompositeRoot-DHfFZgBC.js → CompositeRoot-Dw7CUw_h.js} +2 -2
  18. package/dist/client/assets/{ConnectionStatusDot-BzysNXvb.js → ConnectionStatusDot-BMAnD6fx.js} +2 -2
  19. package/dist/client/assets/{DesignPageTile-BVOnXVkp.js → DesignPageTile-Blp3j4pb.js} +2 -2
  20. package/dist/client/assets/{DevicePanel-WtIdRhFw.js → DevicePanel-DvQaA35w.js} +2 -2
  21. package/dist/client/assets/{DeviceSetup-CHZDTHUd.js → DeviceSetup-DKsXIZ-i.js} +2 -2
  22. package/dist/client/assets/{DialogTitle-4VgvC45v.js → DialogTitle-DO8wNz_M.js} +2 -2
  23. package/dist/client/assets/{DiffCommentAnnotation-DgOiyt7Z.js → DiffCommentAnnotation-C8PC7OpK.js} +2 -2
  24. package/dist/client/assets/{DiffFileTree-C2oGHe27.js → DiffFileTree-C7DU5LPH.js} +2 -2
  25. package/dist/client/assets/{DiffPanel-DPrR8Qs5.js → DiffPanel-ChTAkyLv.js} +2 -2
  26. package/dist/client/assets/{DiffWorkerPoolProvider-Dmv8oWFH.js → DiffWorkerPoolProvider-DgSyhIgr.js} +2 -2
  27. package/dist/client/assets/{EmbeddedDesign-CjSpgNcP.js → EmbeddedDesign-2lyTE7DK.js} +2 -2
  28. package/dist/client/assets/{EnvironmentMachineIcon-Brb19vmz.js → EnvironmentMachineIcon-DGhfQksr.js} +2 -2
  29. package/dist/client/assets/{ExpandableText-XtyFV-c_.js → ExpandableText-Pc3rE_yW.js} +2 -2
  30. package/dist/client/assets/{FieldControl-wrjTWyrJ.js → FieldControl-ARIcqLzr.js} +2 -2
  31. package/dist/client/assets/{FileDiff-C4ZDhTn8.js → FileDiff-BmnyAzoE.js} +2 -2
  32. package/dist/client/assets/{FilePreviewPanel-bLnvHX8B.js → FilePreviewPanel-cA2W4Rul.js} +3 -3
  33. package/dist/client/assets/{FoldedSettingsSection-CHR7h1G5.js → FoldedSettingsSection-DFVEbDHa.js} +2 -2
  34. package/dist/client/assets/{FormContext-Coi3SJqc.js → FormContext-BrID1ioM.js} +2 -2
  35. package/dist/client/assets/{Icons-Cq5M4QzB.js → Icons-Ddevc3gx.js} +2 -2
  36. package/dist/client/assets/Input-DUO0btsQ.js +2 -0
  37. package/dist/client/assets/{KeybindingsSettings.logic-6i6ZOa5z.js → KeybindingsSettings.logic-syA5tOXE.js} +2 -2
  38. package/dist/client/assets/{NoProjectsHero-GJ38wnNe.js → NoProjectsHero-DteDEVXK.js} +2 -2
  39. package/dist/client/assets/{P4ConnectAccountPages-D7Ar154E.js → P4ConnectAccountPages-DNsNO72W.js} +2 -2
  40. package/dist/client/assets/{P4ConnectSidebarSignIn-CUYAtZDx.js → P4ConnectSidebarSignIn-CCSRsOHV.js} +2 -2
  41. package/dist/client/assets/{PanelLayoutControls-BE1UZnqX.js → PanelLayoutControls-BfOcYLV_.js} +4 -4
  42. package/dist/client/assets/{PierreEntryIcon-DYysiIHP.js → PierreEntryIcon-CZSFlc29.js} +2 -2
  43. package/dist/client/assets/{PopoverHandle-CCHSPl9b.js → PopoverHandle-Fh0T2lgZ.js} +2 -2
  44. package/dist/client/assets/{PreviewPanel-C5cXvzpC.js → PreviewPanel-BOlR7nxg.js} +2 -2
  45. package/dist/client/assets/{ProjectDefaultsSettings-TXDWst62.js → ProjectDefaultsSettings-CeJNtS_2.js} +2 -2
  46. package/dist/client/assets/{ProjectFavicon-ICrHszWR.js → ProjectFavicon-qT5hWPuq.js} +3 -3
  47. package/dist/client/assets/{ProjectIconPickerDialog-Ba7hOqYY.js → ProjectIconPickerDialog-DFizZxrO.js} +2 -2
  48. package/dist/client/assets/{ProjectMonogram-B-2KfzJL.js → ProjectMonogram-BIhk1YTm.js} +2 -2
  49. package/dist/client/assets/{ProviderAuthTerminal-Jips16Bn.js → ProviderAuthTerminal-CGIBlp18.js} +2 -2
  50. package/dist/client/assets/{ProviderModelPicker-XnkpbcR8.js → ProviderModelPicker-DmTpqH-1.js} +2 -2
  51. package/dist/client/assets/{ProviderSettingsForm-IKIOes-H.js → ProviderSettingsForm-CGGiFito.js} +2 -2
  52. package/dist/client/assets/{PullRequestCodeTab-BfyP5rAG.js → PullRequestCodeTab-D_kLFUG-.js} +2 -2
  53. package/dist/client/assets/{ReadOnlySourcePreview-DBnxKhBT.js → ReadOnlySourcePreview-BMiQe1Lg.js} +2 -2
  54. package/dist/client/assets/{RenderErrorBoundary-Bl-OUl5k.js → RenderErrorBoundary-C0kFBk2V.js} +2 -2
  55. package/dist/client/assets/{ScheduledTasksSettings-C7ATNVHr.js → ScheduledTasksSettings--d2IHc0N.js} +2 -2
  56. package/dist/client/assets/{ScopedSwitch-BOKobbKr.js → ScopedSwitch-CGUJ2axV.js} +2 -2
  57. package/dist/client/assets/{ScrollAreaCorner-BIznaLk6.js → ScrollAreaCorner-rul6gwU9.js} +2 -2
  58. package/dist/client/assets/{SecretInput-C79TLohk.js → SecretInput-B0-1jamL.js} +2 -2
  59. package/dist/client/assets/{SelectScrollUpArrow-Cfi9Iziv.js → SelectScrollUpArrow-B1Cpt8Xi.js} +2 -2
  60. package/dist/client/assets/{SettingsPanels-C1KZy78u.js → SettingsPanels-9vnfPGhh.js} +2 -2
  61. package/dist/client/assets/{SettingsPanels.logic-B1Q6568q.js → SettingsPanels.logic-DuGA_Vtl.js} +2 -2
  62. package/dist/client/assets/{SettingsScopeNotice-euPyqysz.js → SettingsScopeNotice-D-W1Rrih.js} +2 -2
  63. package/dist/client/assets/{ThemeEditorPanel-CUd0Ycbm.js → ThemeEditorPanel-ViqKo5Pz.js} +2 -2
  64. package/dist/client/assets/{ThreadTerminalDrawer-DSRbySPW.js → ThreadTerminalDrawer-BZjKvCY4.js} +3 -3
  65. package/dist/client/assets/{TooltipViewport-DdG9rZd5.js → TooltipViewport-8hYwjAeo.js} +2 -2
  66. package/dist/client/assets/{Virtualizer-BIhFPLk7.js → Virtualizer-DW_9TOUV.js} +2 -2
  67. package/dist/client/assets/{WorkspaceBreadcrumb-CALMpobe.js → WorkspaceBreadcrumb-BdJSw-_r.js} +2 -2
  68. package/dist/client/assets/{WorkspacePageContainer-CiVT-7R2.js → WorkspacePageContainer-Dw8KJBJ2.js} +2 -2
  69. package/dist/client/assets/{WorkspacePageHeader-FKxEatch.js → WorkspacePageHeader-Bs1ZibxA.js} +2 -2
  70. package/dist/client/assets/{_chat-DhGy3zID.js → _chat-zHqzPoIC.js} +35 -35
  71. package/dist/client/assets/{_chat.design-t19d-9uy.js → _chat.design-BKFWZrif.js} +2 -2
  72. package/dist/client/assets/{_chat.index-KQDv-fuK.js → _chat.index-sREjixAX.js} +2 -2
  73. package/dist/client/assets/{_chat.new-RJprGiOy.js → _chat.new-Rp3b8Rku.js} +2 -2
  74. package/dist/client/assets/{_chat.pull-requests-CLVk83_X.js → _chat.pull-requests-CHm-J7nT.js} +2 -2
  75. package/dist/client/assets/{abnfDiagram-VCTEODGH-t5z1wnJG.js → abnfDiagram-VCTEODGH-nID8H4Ws.js} +2 -2
  76. package/dist/client/assets/{alert-61HmGaFS.js → alert-BeUU9Jmh.js} +2 -2
  77. package/dist/client/assets/architecture-7GRP2DOG-DyfYOPfc.js +1 -0
  78. package/dist/client/assets/{architectureDiagram-5GKGNRK7-DcOIRpxq.js → architectureDiagram-5GKGNRK7-ADmd_9R9.js} +2 -2
  79. package/dist/client/assets/{assets-CrSjo2kD.js → assets-BAm5fonQ.js} +2 -2
  80. package/dist/client/assets/{blockDiagram-I7D4REHJ-BCRVXJ_x.js → blockDiagram-I7D4REHJ-CWC3ppcV.js} +2 -2
  81. package/dist/client/assets/{browserHistoryStore-D1yDZcmo.js → browserHistoryStore-WB7aqbFT.js} +2 -2
  82. package/dist/client/assets/{browserLinkTarget-COQ2EK0x.js → browserLinkTarget-CfxBH-bb.js} +2 -2
  83. package/dist/client/assets/{c4Diagram-7LVT6UL2-DvlzZJ5f.js → c4Diagram-7LVT6UL2-BnPLBOS3.js} +2 -2
  84. package/dist/client/assets/channel-BF0vQ6gt.js +2 -0
  85. package/dist/client/assets/{checkbox-CmtFeke_.js → checkbox-fCF41UNu.js} +2 -2
  86. package/dist/client/assets/{chunk-4HAMMTFA-CQxPGvDf.js → chunk-4HAMMTFA-BMmUIm4M.js} +2 -2
  87. package/dist/client/assets/{chunk-75Z2AOVW-ByoE3ygp.js → chunk-75Z2AOVW-BLOF0vWA.js} +2 -2
  88. package/dist/client/assets/{chunk-DU6HZSFF-CxJhFL2x.js → chunk-DU6HZSFF-DcvsSVYK.js} +2 -2
  89. package/dist/client/assets/{chunk-F27PBJKO-C3hjOOOZ.js → chunk-F27PBJKO-Cn6gVHWw.js} +2 -2
  90. package/dist/client/assets/{chunk-GMAD6QVW-C3RS9FjC.js → chunk-GMAD6QVW-Rc6dmWYa.js} +2 -2
  91. package/dist/client/assets/{chunk-GVQU2GXP-CU4SkxJJ.js → chunk-GVQU2GXP-CCfnXEDn.js} +2 -2
  92. package/dist/client/assets/{chunk-IMKFNOWR-D_UNCo9G.js → chunk-IMKFNOWR-hKP_ARqC.js} +2 -2
  93. package/dist/client/assets/{chunk-L3NEJ4N5-CDfxiw1c.js → chunk-L3NEJ4N5-UoQ2XFY5.js} +2 -2
  94. package/dist/client/assets/{chunk-OSK3NFVY-NYgnlZSq.js → chunk-OSK3NFVY-M6M-pt1u.js} +2 -2
  95. package/dist/client/assets/{chunk-P2QGCYS3-BPZ-Bmpx.js → chunk-P2QGCYS3-Cd8cJ8M5.js} +2 -2
  96. package/dist/client/assets/{chunk-POPQ4Y6H-Cypzc9-c.js → chunk-POPQ4Y6H-BxePkVhI.js} +2 -2
  97. package/dist/client/assets/{chunk-PWAF6VOD-Db0WrtMq.js → chunk-PWAF6VOD-Bi5LpKG7.js} +2 -2
  98. package/dist/client/assets/{chunk-SHT3W25Y-D3molYj2.js → chunk-SHT3W25Y-BrG-a748.js} +2 -2
  99. package/dist/client/assets/{chunk-SVP7TREG-DgoMAGEz.js → chunk-SVP7TREG-CF1wf42R.js} +2 -2
  100. package/dist/client/assets/{chunk-TICWLB2K-spQbgY0o.js → chunk-TICWLB2K-BclYZT-J.js} +2 -2
  101. package/dist/client/assets/classDiagram-ZZMXUADV-BO63eAEb.js +2 -0
  102. package/dist/client/assets/classDiagram-v2-VYDZK3BY-BO63eAEb.js +2 -0
  103. package/dist/client/assets/{color-picker-ChpGy00s.js → color-picker-CDX0WEH1.js} +2 -2
  104. package/dist/client/assets/{combobox-Ch68LcDn.js → combobox-JHKSWXnT.js} +2 -2
  105. package/dist/client/assets/{command-BrqzJdSJ.js → command-Cn2EdEQc.js} +2 -2
  106. package/dist/client/assets/{composer-logic-BnxD8s0P.js → composer-logic-BOY4DYDR.js} +2 -2
  107. package/dist/client/assets/{composerDraftUploads-xCoYO41C.js → composerDraftUploads-ZMfUcbzB.js} +2 -2
  108. package/dist/client/assets/{connect-Bi0gWecR.js → connect-CxYiAJyx.js} +2 -2
  109. package/dist/client/assets/{connect-agent-C5_77Z12.js → connect-agent-DjA6Xdxq.js} +2 -2
  110. package/dist/client/assets/{cynefin-OW5HDTMX-VdrFQn-0.js → cynefin-OW5HDTMX-BmT_i5v2.js} +1 -1
  111. package/dist/client/assets/{cynefinDiagram-5FMLGOSQ-DrYOTpUv.js → cynefinDiagram-5FMLGOSQ-BtGOm4FD.js} +2 -2
  112. package/dist/client/assets/{dagre-GXQ25YYZ-D3a8EWau.js → dagre-GXQ25YYZ-BR5caQju.js} +2 -2
  113. package/dist/client/assets/{design-CVZ_2BzE.js → design-DafZtWVO.js} +2 -2
  114. package/dist/client/assets/{device-CRTuVO6r.js → device-DoBfKmlF.js} +2 -2
  115. package/dist/client/assets/{diagram-S7CK7UJ4-Mk5il6gg.js → diagram-S7CK7UJ4-G9md-5MD.js} +2 -2
  116. package/dist/client/assets/{diagram-UQ7AKVKN-CJj53e2L.js → diagram-UQ7AKVKN-CIfR4KNl.js} +2 -2
  117. package/dist/client/assets/{diagram-VSXAHHWV-BWgbywkR.js → diagram-VSXAHHWV-DuhvRzdY.js} +2 -2
  118. package/dist/client/assets/{diagram-VX7I27RA-DMf1k563.js → diagram-VX7I27RA-M9PQMscl.js} +2 -2
  119. package/dist/client/assets/{diagram-Z3DM3KII-DIxFk_Cz.js → diagram-Z3DM3KII-Cf9vEi4s.js} +2 -2
  120. package/dist/client/assets/{dialog-C-AXHdu2.js → dialog-D2TxWkVz.js} +2 -2
  121. package/dist/client/assets/{diffRendering-CM-KgrTj.js → diffRendering-Ddvz1xVy.js} +2 -2
  122. package/dist/client/assets/{discovery-list-BLwegNxU.js → discovery-list-ifxatYrP.js} +2 -2
  123. package/dist/client/assets/{dist-BkonGG_P.js → dist-CSj3DTUP.js} +3 -3
  124. package/dist/client/assets/{draft-input-f9kP93zT.js → draft-input-CPdCbcdo.js} +2 -2
  125. package/dist/client/assets/{duoViewer-Cp8TdqB1.js → duoViewer-D58mDyrn.js} +2 -2
  126. package/dist/client/assets/{dynamic-CqVCRX0A.js → dynamic-DDInnlY3.js} +2 -2
  127. package/dist/client/assets/{ebnfDiagram-PWID7BFC-Bq87OZKi.js → ebnfDiagram-PWID7BFC-CdnGU8S4.js} +2 -2
  128. package/dist/client/assets/{embeddedScripts-DUXU_2UT.js → embeddedScripts-Cnp_hNd7.js} +2 -2
  129. package/dist/client/assets/{empty-BGBD5hOV.js → empty-D2w_I0ra.js} +2 -2
  130. package/dist/client/assets/{entities-BFEUS0MV.js → entities-DYcBueIQ.js} +2 -2
  131. package/dist/client/assets/{erDiagram-RLTQ6QDP-BDEnYaI_.js → erDiagram-RLTQ6QDP-EL8h6pNS.js} +2 -2
  132. package/dist/client/assets/eventmodeling-NTZA5JFV-BGNyLRLr.js +1 -0
  133. package/dist/client/assets/{fileLinks-C_OGOAy0.js → fileLinks-Bvwcm27g.js} +2 -2
  134. package/dist/client/assets/{fileTreeExpansion-DbdTJigr.js → fileTreeExpansion-CKv7X50W.js} +4 -2
  135. package/dist/client/assets/flowDiagram-HODETNUW-D4h5Y9DU.js +1 -0
  136. package/dist/client/assets/{ganttDiagram-EL5Y4UJY-op3QCfWU.js → ganttDiagram-EL5Y4UJY-BeWGgKDe.js} +2 -2
  137. package/dist/client/assets/{getDiffFileInput-BPDHiYWE.js → getDiffFileInput-DkBmRBXx.js} +2 -2
  138. package/dist/client/assets/{gitGraph-4MIJSDKK-EJna0WOL.js → gitGraph-4MIJSDKK-tAuinbUz.js} +1 -1
  139. package/dist/client/assets/{gitGraphDiagram-WWUBYQGX-BLrezOEV.js → gitGraphDiagram-WWUBYQGX-BRgTxcdk.js} +2 -2
  140. package/dist/client/assets/{guideRunStore-Pua8pC4c.js → guideRunStore-VBGcCjdB.js} +2 -2
  141. package/dist/client/assets/{htmlRender-BXRxD1K0.js → htmlRender-CKceuC_c.js} +2 -2
  142. package/dist/client/assets/{index-DOBP-EJG.js → index-DT_x2Wmm.js} +3 -3
  143. package/dist/client/assets/{info-A6RAGUB7-8rXbMaiz.js → info-A6RAGUB7-CLddhXSv.js} +1 -1
  144. package/dist/client/assets/{infoDiagram-27XIBGKW-C12oaC7k.js → infoDiagram-27XIBGKW-Ck2KMNXn.js} +2 -2
  145. package/dist/client/assets/{input-CyLVEbfy.js → input-B-f6_0Yh.js} +2 -2
  146. package/dist/client/assets/{input-group-BpHzF9lc.js → input-group-6imEZqDF.js} +2 -2
  147. package/dist/client/assets/{ishikawaDiagram-5VMMS53U-W3kXC0zb.js → ishikawaDiagram-5VMMS53U-CVV4V2Va.js} +2 -2
  148. package/dist/client/assets/{journeyDiagram-3NMN7TZE-BT8uaxDi.js → journeyDiagram-3NMN7TZE-_ZWFV8C3.js} +2 -2
  149. package/dist/client/assets/{kanban-definition-UXKFOSKX-B7ND7-SD.js → kanban-definition-UXKFOSKX-Drxpl4IC.js} +2 -2
  150. package/dist/client/assets/{kbd-BCESLLdc.js → kbd-BWzNfkcE.js} +2 -2
  151. package/dist/client/assets/{keybindings-D2lV30Mz.js → keybindings-BpfREAW_.js} +2 -2
  152. package/dist/client/assets/{lazyRouteComponent-Cbf8_a0u.js → lazyRouteComponent-D-AmGefV.js} +2 -2
  153. package/dist/client/assets/{line-CaFh5vaw.js → line-DUegkqb4.js} +2 -2
  154. package/dist/client/assets/{link-DATjtH5q.js → link-fhNuP7xH.js} +2 -2
  155. package/dist/client/assets/{linkedPrompt-DedAQve-.js → linkedPrompt-vtw7tk3j.js} +2 -2
  156. package/dist/client/assets/main-BnBtmv6q.css +2 -0
  157. package/dist/client/assets/{main-BaHshvYq.js → main-o79tG0ak.js} +8 -8
  158. package/dist/client/assets/{mediaReference-O3GJrEIU.js → mediaReference-CrN4zeyb.js} +2 -2
  159. package/dist/client/assets/{mediaSource-DuaFWKv4.js → mediaSource-C3ROG2-i.js} +2 -2
  160. package/dist/client/assets/{mermaid-parser.core-B85FdVeQ.js → mermaid-parser.core-CqsSH_Vs.js} +4 -4
  161. package/dist/client/assets/{mermaid.core-BfgiEgiv.js → mermaid.core-C2amTgJW.js} +5 -5
  162. package/dist/client/assets/{mindmap-definition-YA3MSWOX-C27kuSH9.js → mindmap-definition-YA3MSWOX-C3Dc0dsB.js} +2 -2
  163. package/dist/client/assets/{number-field-CkcbPdEw.js → number-field-D8sgB2t5.js} +2 -2
  164. package/dist/client/assets/{observeResize-D4IgTUH5.js → observeResize-CFQCO46z.js} +2 -2
  165. package/dist/client/assets/{onboarding-Cjovq1W5.js → onboarding-lF9A0Lvr.js} +2 -2
  166. package/dist/client/assets/{openFileInPreview-lTkgJAnn.js → openFileInPreview-CUQFiuq4.js} +2 -2
  167. package/dist/client/assets/{p4ProjectFile-CElYjkWE.js → p4ProjectFile-wQ_DI6PZ.js} +2 -2
  168. package/dist/client/assets/{packet-AYTQ26CC-CWaYauqZ.js → packet-AYTQ26CC-DYEisiXm.js} +1 -1
  169. package/dist/client/assets/{pair-Bvr3POUi.js → pair-DzXZOQrw.js} +2 -2
  170. package/dist/client/assets/{pegDiagram-XKGWAZYB-B3kDVFHS.js → pegDiagram-XKGWAZYB-PyAqWngL.js} +2 -2
  171. package/dist/client/assets/{pendingSendStore-GVfJAspD.js → pendingSendStore-IZrHrdvI.js} +2 -2
  172. package/dist/client/assets/{phoneViewer-K_yf0qA-.js → phoneViewer-C4wQJita.js} +2 -2
  173. package/dist/client/assets/{pie-WAS4IAKB-C-AkuoFA.js → pie-WAS4IAKB-BiZuzafo.js} +1 -1
  174. package/dist/client/assets/{pieDiagram-E7YTZNPT-CZcM-75b.js → pieDiagram-E7YTZNPT-DJ6cQBTw.js} +2 -2
  175. package/dist/client/assets/{pierre-icons-B7EEc0An.js → pierre-icons-BnQ4J8dG.js} +2 -2
  176. package/dist/client/assets/{popover-DSpvkDFi.js → popover-CFnxwxV8.js} +2 -2
  177. package/dist/client/assets/{preview-D0D5go_r.js → preview-B3PdThjm.js} +2 -2
  178. package/dist/client/assets/{preview-B6BR8ksI.js → preview-CchO6ZxQ.js} +2 -2
  179. package/dist/client/assets/{previewMiniPlayerStore-BkcmyfQf.js → previewMiniPlayerStore-DhWJVpLX.js} +2 -2
  180. package/dist/client/assets/{primary-KFQ3FtJ7.js → primary-DHkJeZE5.js} +2 -2
  181. package/dist/client/assets/{primaryCloudLinkState-BNae8QE-.js → primaryCloudLinkState-CQGqUe5Z.js} +2 -2
  182. package/dist/client/assets/{projectFilesQueryState-DYM4LICj.js → projectFilesQueryState-CK8V3D_H.js} +2 -2
  183. package/dist/client/assets/{projectScriptEditor-OsyI37w0.js → projectScriptEditor-Dnq8wkNa.js} +2 -2
  184. package/dist/client/assets/{providerSkills-BmIipPix.js → providerSkills-dqx0wFDy.js} +2 -2
  185. package/dist/client/assets/{pullRequestDetail.logic-CqDZ5g0j.js → pullRequestDetail.logic-DS1SYAn0.js} +2 -2
  186. package/dist/client/assets/{pullRequestIcons-Cf6S2cR8.js → pullRequestIcons-B2iTt9H1.js} +2 -2
  187. package/dist/client/assets/{pullRequestReviewStore-CQxQgiFQ.js → pullRequestReviewStore-DQXty7CX.js} +2 -2
  188. package/dist/client/assets/{pullRequests-CSBkKZN_.js → pullRequests-Djl75ZaK.js} +2 -2
  189. package/dist/client/assets/{quadrantDiagram-AXDQQJYC-L_HgCOzl.js → quadrantDiagram-AXDQQJYC-CroWwkQp.js} +2 -2
  190. package/dist/client/assets/{queries-CPW8n8P2.js → queries-H1IDPhJo.js} +2 -2
  191. package/dist/client/assets/{query-BaUS26f1.js → query-CrtXKOxk.js} +2 -2
  192. package/dist/client/assets/{radar-RG4KPBEZ-CivxkEmZ.js → radar-RG4KPBEZ-LeplYTz7.js} +1 -1
  193. package/dist/client/assets/{radio-group-znYoQ5jv.js → radio-group-CqNTRY1A.js} +2 -2
  194. package/dist/client/assets/{railroad-74A4TZTK-EW5ap3Uk.js → railroad-74A4TZTK-Dx-JHdmS.js} +1 -1
  195. package/dist/client/assets/railroad-abnf-HS5TGJTU-BZvFsNPH.js +1 -0
  196. package/dist/client/assets/railroad-ebnf-LZEXJU2U-BWlDZ7xc.js +1 -0
  197. package/dist/client/assets/railroad-peg-WCYAUIDC--JkOWmP3.js +1 -0
  198. package/dist/client/assets/{railroadDiagram-O6MQD6OU-91r4kx_C.js → railroadDiagram-O6MQD6OU-Cng7FrK3.js} +2 -2
  199. package/dist/client/assets/{renderScheduler-BeK99gYq.js → renderScheduler-Bri4egpt.js} +2 -2
  200. package/dist/client/assets/{requirementDiagram-BXWQKSXE-ewjTPAQv.js → requirementDiagram-BXWQKSXE-CRqEhIuH.js} +2 -2
  201. package/dist/client/assets/{rightPanelStore-D_BFsdvo.js → rightPanelStore-C24EACg1.js} +2 -2
  202. package/dist/client/assets/{runtime-BD3Q-gPo.js → runtime-BoS3svRr.js} +3 -3
  203. package/dist/client/assets/{runtime-CYS_HmDu.js → runtime-dibyMnpt.js} +2 -2
  204. package/dist/client/assets/{runtimeModeConfig-NDts48yX.js → runtimeModeConfig-Cq4qBBQz.js} +2 -2
  205. package/dist/client/assets/{sankeyDiagram-P5KCCOFB-AaDNrvur.js → sankeyDiagram-P5KCCOFB-DxCT5kbi.js} +2 -2
  206. package/dist/client/assets/{scheduledTasksSettings.logic-B5btE2kZ.js → scheduledTasksSettings.logic-CT0e8Q4B.js} +2 -2
  207. package/dist/client/assets/{scroll-area-1mTt9e_w.js → scroll-area-DXW_WIUB.js} +2 -2
  208. package/dist/client/assets/{select-C3qtJHHz.js → select-DkBs5u_m.js} +2 -2
  209. package/dist/client/assets/{sequenceDiagram-WJ2MYXX4-oEk1pEy7.js → sequenceDiagram-WJ2MYXX4-B_7vBMwW.js} +2 -2
  210. package/dist/client/assets/{server-DbZyg5DS.js → server-c3qBJcFf.js} +2 -2
  211. package/dist/client/assets/{session-CZ54Pt8a.js → session-DSU6Gpmh.js} +2 -2
  212. package/dist/client/assets/{session-logic-Dl5ZfweX.js → session-logic-B-TC6OqT.js} +2 -2
  213. package/dist/client/assets/{settings-U7xJrpYG.js → settings-bJ7fyuMB.js} +2 -2
  214. package/dist/client/assets/{settings.appearance-BAL1SlyQ.js → settings.appearance-mzc4rmPF.js} +2 -2
  215. package/dist/client/assets/settings.archived-DZUfUaK5.js +2 -0
  216. package/dist/client/assets/{settings.computer-use-CFQ7AMzB.js → settings.computer-use-CoAdDyer.js} +2 -2
  217. package/dist/client/assets/{settings.connections-BQ9kTua7.js → settings.connections-e2VpNXnS.js} +2 -2
  218. package/dist/client/assets/{settings.data-controls-DjjJ5kF4.js → settings.data-controls-Z-hHwSxC.js} +2 -2
  219. package/dist/client/assets/{settings.decisions-BJjTL0fp.js → settings.decisions-CemF3lRg.js} +2 -2
  220. package/dist/client/assets/{settings.designs-CVHQqx3n.js → settings.designs-ChPt6dw4.js} +2 -2
  221. package/dist/client/assets/{settings.diagnostics-BPt4kWXo.js → settings.diagnostics-BZsZUfG4.js} +2 -2
  222. package/dist/client/assets/{settings.general-2-cxXxzq.js → settings.general-BfcLUlDK.js} +2 -2
  223. package/dist/client/assets/{settings.integrations-DWLVwJhz.js → settings.integrations-bMySZ3xQ.js} +2 -2
  224. package/dist/client/assets/{settings.keybindings-CEI48kYu.js → settings.keybindings-lEwh5VVT.js} +2 -2
  225. package/dist/client/assets/{settings.open-source-licenses-CSHAwMa-.js → settings.open-source-licenses-hbi_Eida.js} +2 -2
  226. package/dist/client/assets/{settings.plugins-B2qYws_x.js → settings.plugins-uQgo5kKH.js} +2 -2
  227. package/dist/client/assets/{settings.projects-mqMUluFy.js → settings.projects-BX00Ds_W.js} +3 -3
  228. package/dist/client/assets/{settings.providers-CVn9TdT6.js → settings.providers-ChCjhFPm.js} +3 -3
  229. package/dist/client/assets/{settings.scheduled-tasks-CGCW7jt4.js → settings.scheduled-tasks-BPdgliUI.js} +2 -2
  230. package/dist/client/assets/{settings.snap-shot-BwlI37um.js → settings.snap-shot-CUiI3kp9.js} +2 -2
  231. package/dist/client/assets/{settings.source-control-CKO1wLGw.js → settings.source-control-DnXvsfKg.js} +2 -2
  232. package/dist/client/assets/{settings.storage-D9B95lPl.js → settings.storage-CITIJQBP.js} +2 -2
  233. package/dist/client/assets/{settingsLayout-BUXF2u92.js → settingsLayout-CMZkPLAK.js} +2 -2
  234. package/dist/client/assets/{sidebar-tYIa3_8M.js → sidebar-DlxUoXMx.js} +2 -2
  235. package/dist/client/assets/{sidebarProjectGrouping-Bq3Z5shR.js → sidebarProjectGrouping-Dw7JdLLE.js} +2 -2
  236. package/dist/client/assets/{skeleton-C5tu1gWo.js → skeleton-D4aDYk5u.js} +2 -2
  237. package/dist/client/assets/{sourceControl-DrtWBs3V.js → sourceControl-Cla5zUd3.js} +2 -2
  238. package/dist/client/assets/{sourceControlClients-B9NhKGf6.js → sourceControlClients-C4s3TVIY.js} +2 -2
  239. package/dist/client/assets/{spinner-DU7w6Tl0.js → spinner-FYgwMJ6T.js} +2 -2
  240. package/dist/client/assets/{standalone-page-C5ckzQAC.js → standalone-page-CKUVIQ1e.js} +2 -2
  241. package/dist/client/assets/{stateDiagram-D77RDMKH-Nv8b020l.js → stateDiagram-D77RDMKH-DcD8HmfB.js} +2 -2
  242. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-B14Nnvlu.js +2 -0
  243. package/dist/client/assets/{swimlanes-42K2YHIH-BHEi83oj.js → swimlanes-42K2YHIH-BlBkmfsT.js} +2 -2
  244. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-D10Jhf1N.js +9 -0
  245. package/dist/client/assets/{terminal-links-DaRIZ_ri.js → terminal-links-ZQCDiM-O.js} +2 -2
  246. package/dist/client/assets/{terminalSessions-DvEfRw4m.js → terminalSessions-Dxo8abTt.js} +2 -2
  247. package/dist/client/assets/{textarea-CAyj7_Hj.js → textarea-CBtjBVW3.js} +2 -2
  248. package/dist/client/assets/{themePalette-B0pJNxta.js → themePalette-tRVivgCl.js} +2 -2
  249. package/dist/client/assets/{timeline-definition-24CTP7MA-DCGMxN2J.js → timeline-definition-24CTP7MA-DJ6DOYfi.js} +2 -2
  250. package/dist/client/assets/{toast-BDoYTcO9.js → toast-45xHk8t0.js} +2 -2
  251. package/dist/client/assets/{toggle-BdizphFv.js → toggle-CBuoGytK.js} +2 -2
  252. package/dist/client/assets/{toggle-group-DAQh9V2C.js → toggle-group-C1HL5vwX.js} +2 -2
  253. package/dist/client/assets/{tooltip-DguVraEa.js → tooltip-CGIYdVkV.js} +2 -2
  254. package/dist/client/assets/{treeView-Q6P3EWNA-DLsS087V.js → treeView-Q6P3EWNA-bTdGasLu.js} +1 -1
  255. package/dist/client/assets/{treemap-WGGIJYW6-DZcq234F.js → treemap-WGGIJYW6-daOCp2lU.js} +1 -1
  256. package/dist/client/assets/{uiStateStore-VU84hC1r.js → uiStateStore-C20vhoIi.js} +2 -2
  257. package/dist/client/assets/{usage-BjbKwEBL.js → usage-CfPnKiRu.js} +2 -2
  258. package/dist/client/assets/{usageAccess-DeusmFu4.js → usageAccess-JgjzTgv_.js} +2 -2
  259. package/dist/client/assets/{usageFormat-bv0-SbBE.js → usageFormat-BXO14RVw.js} +2 -2
  260. package/dist/client/assets/{usageShortcuts-Dx5czWNh.js → usageShortcuts-DSDNMPfj.js} +2 -2
  261. package/dist/client/assets/{use-atom-command-DWENi-Kq.js → use-atom-command-D-h097sl.js} +2 -2
  262. package/dist/client/assets/{useAriaLabelledBy-CvM07jd7.js → useAriaLabelledBy-CiJdbReS.js} +2 -2
  263. package/dist/client/assets/{useHandleNewThread-BevNhAvp.js → useHandleNewThread-CgAzOCNO.js} +2 -2
  264. package/dist/client/assets/{useLocation-CsUjfT4f.js → useLocation-CX6-ZBHr.js} +2 -2
  265. package/dist/client/assets/useNavigate-hIX0aKyk.js +2 -0
  266. package/dist/client/assets/{useNavigateBack-CpakkPiu.js → useNavigateBack-CURt1gqJ.js} +2 -2
  267. package/dist/client/assets/{useP4ConnectAuthPrompt-Dos10UY-.js → useP4ConnectAuthPrompt-YijczhP3.js} +2 -2
  268. package/dist/client/assets/{useParams-BmGuCYQD.js → useParams-Ck_hBeVd.js} +2 -2
  269. package/dist/client/assets/{usePermissionStatus-DxuVlxCI.js → usePermissionStatus-CBGpzeTh.js} +2 -2
  270. package/dist/client/assets/{usePullRequestActions-B1gYq--s.js → usePullRequestActions-DErc7uKF.js} +2 -2
  271. package/dist/client/assets/{useRegisterFieldControl-D9BX_Pej.js → useRegisterFieldControl-B6t05DZf.js} +2 -2
  272. package/dist/client/assets/{useScopedModelAvailability-UwO2vexH.js → useScopedModelAvailability-BKL9M4Zi.js} +2 -2
  273. package/dist/client/assets/{useSettings-BaZP4LTG.js → useSettings-CF52Llff.js} +2 -2
  274. package/dist/client/assets/{utils-CyMIjIQl.js → utils-DPab5G1h.js} +2 -2
  275. package/dist/client/assets/{vcsRefInvalidation-AWZHImpO.js → vcsRefInvalidation-DToXD8si.js} +2 -2
  276. package/dist/client/assets/{vennDiagram-4TSXK5OY-DoNr7ggz.js → vennDiagram-4TSXK5OY-BZhmnQ7w.js} +2 -2
  277. package/dist/client/assets/{wardley-WFR3VGLG-C0-g8Z0r.js → wardley-WFR3VGLG-B2T_T_mo.js} +1 -1
  278. package/dist/client/assets/{wardleyDiagram-VM6X3IG4-CE5djs04.js → wardleyDiagram-VM6X3IG4-C8cIQYgo.js} +2 -2
  279. package/dist/client/assets/{welcome-BB-0eAGm.js → welcome-BmripdEM.js} +2 -2
  280. package/dist/client/assets/{xychartDiagram-S5SC5T6Z-CuLm0sO7.js → xychartDiagram-S5SC5T6Z-BHFfxI75.js} +2 -2
  281. package/dist/client/index.html +1 -1
  282. package/dist/{renderer-A818pKS0.mjs → renderer-Cl5-TVgQ.mjs} +2 -2
  283. package/dist/resource-monitor/darwin-arm64/p4-resource-monitor +0 -0
  284. package/dist/{runtime-chxDiILq.mjs → runtime-AFwhp7fW.mjs} +3 -2
  285. package/package.json +1 -1
  286. package/dist/client/assets/AlertDialogRoot-BSccQInP.js +0 -2
  287. package/dist/client/assets/Input-Ffzotn9J.js +0 -2
  288. package/dist/client/assets/architecture-7GRP2DOG-DgOy0dfB.js +0 -1
  289. package/dist/client/assets/channel-BIESPbx4.js +0 -2
  290. package/dist/client/assets/classDiagram-ZZMXUADV-C1C1MJdp.js +0 -2
  291. package/dist/client/assets/classDiagram-v2-VYDZK3BY-C1C1MJdp.js +0 -2
  292. package/dist/client/assets/eventmodeling-NTZA5JFV-B1YZgpjy.js +0 -1
  293. package/dist/client/assets/flowDiagram-HODETNUW-CFvVv1a2.js +0 -1
  294. package/dist/client/assets/main-BjxTXt02.css +0 -2
  295. package/dist/client/assets/railroad-abnf-HS5TGJTU-BbAwy8JJ.js +0 -1
  296. package/dist/client/assets/railroad-ebnf-LZEXJU2U-DPSsaf9m.js +0 -1
  297. package/dist/client/assets/railroad-peg-WCYAUIDC-Dl-4IH_W.js +0 -1
  298. package/dist/client/assets/settings.archived-BV2WO97K.js +0 -2
  299. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-C4UghKIZ.js +0 -2
  300. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-sqiR-R0o.js +0 -9
  301. package/dist/client/assets/useNavigate-JwBJSn8e.js +0 -2
@@ -1,2 +1,2 @@
1
- import{BE as e,Ev as t,M_ as n,Ov as r,Sy as i,Vc as a,j_ as o}from"./utils-CyMIjIQl.js";import{F as s,M as c,P as l,k as u,tt as d}from"./runtime-BD3Q-gPo.js";import{t as f}from"./runtime-CYS_HmDu.js";import{i as p}from"./session-CZ54Pt8a.js";import{n as m}from"./query-BaUS26f1.js";var h=e(),g=Object.freeze({generation:-1,resetVersion:-1,offset:0}),_=524288,v=16384,y=1024,b=new TextEncoder,x=new TextDecoder(`utf-8`,{ignoreBOM:!0}),S=Object.freeze({generation:0,chunks:Object.freeze([]),retainedBytes:0,resetVersion:0,nextOffset:0});function C(e,t){if(e.length===0)return[];let n=b.encode(e);if(n.byteLength<=t)return[{data:e,byteLength:n.byteLength}];let r=[],i=0;for(;i<n.byteLength;){let e=Math.min(i+t,n.byteLength);for(;e<n.byteLength&&((n[e]??0)&192)==128;)--e;if(e===i)for(e=Math.min(i+t,n.byteLength);e<n.byteLength&&((n[e]??0)&192)==128;)e+=1;let a=n.subarray(i,e);r.push({data:x.decode(a),byteLength:a.byteLength}),i=e}return r}function w(e,t){if(t<=0)return``;let n=b.encode(e);if(n.byteLength<=t)return e;let r=n.byteLength-t;for(;r<n.length;){let e=n[r];if(e===void 0||(e&192)!=128)break;r+=1}return x.decode(n.subarray(r))}function T(e,t,n=v){let r=C(e,n),i=0,a=t;return{chunks:r.map(e=>{i+=e.byteLength;let t=a;return a+=e.data.length,{startOffset:t,data:e.data,byteLength:e.byteLength}}),nextOffset:a,byteLength:i}}function E(e){let t=[];for(let n of e){let e=t.at(-1);e!==void 0&&e.startOffset+e.data.length===n.startOffset&&e.byteLength+n.byteLength<=v?t[t.length-1]={startOffset:e.startOffset,data:`${e.data}${n.data}`,byteLength:e.byteLength+n.byteLength}:t.push(n)}return t}function D(e,t){let n=0,r=0;for(;r<t&&n<e.data.length;){let t=e.data.codePointAt(n);r+=t<=127?1:t<=2047?2:t<=65535?3:4,n+=t<=65535?1:2}return{...e,startOffset:e.startOffset+n,data:e.data.slice(n),byteLength:e.byteLength-r}}function O(e,t,n){if(t.length===0)return e;if(n<=0)return{generation:e.generation,chunks:[],retainedBytes:0,resetVersion:e.resetVersion+1,nextOffset:e.nextOffset+t.length};let r=T(t,e.nextOffset,Math.min(v,Math.max(1,n))),i=[...e.chunks,...r.chunks],a=e.retainedBytes+r.byteLength,o=0;for(;a>n&&o<i.length;){let e=i[o],t=a-n;if(t<e.byteLength){let n=D(e,t);a-=e.byteLength-n.byteLength,n.byteLength>0?i[o]=n:o+=1;break}a-=e.byteLength,o+=1}let s=o===0?i:i.slice(o);if(s.length>y){s=E(s);let e=s.length-y;if(e>0){for(let t of s.slice(0,e))a-=t.byteLength;s=s.slice(e)}}return{generation:e.generation,chunks:s,retainedBytes:a,resetVersion:e.resetVersion,nextOffset:r.nextOffset}}function k(e,t,n){let r=T(w(t,n),0,Math.min(v,Math.max(1,n)));return{generation:e.generation,chunks:r.chunks,retainedBytes:r.byteLength,resetVersion:e.resetVersion+1,nextOffset:r.nextOffset}}function A(e){return e.chunks.map(e=>e.data).join(``)}function j(e,t){let n={generation:e.generation,resetVersion:e.resetVersion,offset:e.nextOffset},r=e.chunks[0];if(t.generation!==e.generation||t.resetVersion!==e.resetVersion||t.offset<(r?.startOffset??e.nextOffset))return{type:`reset`,data:A(e),cursor:n};let i=e.chunks.filter(e=>e.startOffset+e.data.length>t.offset);return i.length===0?{type:`none`,cursor:n}:{type:`append`,data:i.map(e=>e.data.slice(Math.max(0,t.offset-e.startOffset))).join(``),cursor:n}}function M(e){return e.filter(e=>e.state.hasRunningSubprocess).map(e=>e.target.terminalId)}var N=Object.freeze({output:S,status:`closed`,error:null,updatedAt:null,version:0,lifecycleVersion:0}),P=Object.freeze({summary:null,output:S,status:`closed`,error:null,hasRunningSubprocess:!1,updatedAt:null,version:0,lifecycleVersion:0}),F=0;function I(){return{...N,output:{...S,generation:++F}}}function L(e,t,n=N){return{output:k(n.output,e.history,t),status:e.status,error:null,updatedAt:e.updatedAt,version:n.version+1,lifecycleVersion:n.lifecycleVersion}}function R(e,t){return e===null?t:t===null||Date.parse(e)>=Date.parse(t)?e:t}function z(e,t){return{summary:e,output:t.output,status:t.version>0?t.status:e?.status??t.status,error:t.error,hasRunningSubprocess:e?.hasRunningSubprocess??!1,updatedAt:R(e?.updatedAt??null,t.updatedAt),version:t.version,lifecycleVersion:t.lifecycleVersion}}function B(e,t,n=_){switch(t.type){case`snapshot`:return{...L(t.snapshot,n,e),lifecycleVersion:e.version===0?e.lifecycleVersion:e.lifecycleVersion+1};case`restarted`:return{...L(t.snapshot,n,e),lifecycleVersion:e.lifecycleVersion+1};case`output`:return{...e,output:O(e.output,t.data,n),status:e.status===`closed`?`running`:e.status,error:null,version:e.version+1};case`cleared`:return{...e,output:k(e.output,``,n),error:null,version:e.version+1};case`exited`:return{...e,status:`exited`,error:null,version:e.version+1};case`closed`:return{...e,status:`closed`,error:null,version:e.version+1};case`error`:return{...e,status:`error`,error:t.message,version:e.version+1};case`activity`:return e}}function V(e,t){return t.type===`snapshot`?t.terminals:t.type===`remove`?e.filter(e=>e.threadId!==t.threadId||e.terminalId!==t.terminalId):[...e.filter(e=>e.threadId!==t.terminal.threadId||e.terminalId!==t.terminal.terminalId),t.terminal]}function H(e){let n=u(),i=u(),o=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId]),f=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId,t.terminalId??null]),p={mode:`serial`,key:o};return{observe:s(e,{label:`environment-data:terminal:observe`,subscribe:e=>r(()=>d(a.terminalObserve,e).pipe(t(I,B)))}),attach:s(e,{label:`environment-data:terminal:attach`,subscribe:e=>r(()=>d(a.terminalAttach,e).pipe(t(I,B)))}),events:l(e,{label:`environment-data:terminal:events`,tag:a.subscribeTerminalEvents}),metadata:s(e,{label:`environment-data:terminal:metadata`,subscribe:e=>d(a.subscribeTerminalMetadata,{}).pipe(t(()=>[],V))}),open:c(e,{label:`environment-data:terminal:open`,tag:a.terminalOpen,scheduler:n,concurrency:p}),write:c(e,{label:`environment-data:terminal:write`,tag:a.terminalWrite}),resize:c(e,{label:`environment-data:terminal:resize`,tag:a.terminalResize,scheduler:i,concurrency:{mode:`latest`,key:f}}),clear:c(e,{label:`environment-data:terminal:clear`,tag:a.terminalClear,scheduler:n,concurrency:p}),restart:c(e,{label:`environment-data:terminal:restart`,tag:a.terminalRestart,scheduler:n,concurrency:p}),close:c(e,{label:`environment-data:terminal:close`,tag:a.terminalClose,scheduler:n,concurrency:p})}}var U=H(f),W=Object.freeze([]),G=new WeakMap,K=new WeakMap,q=new WeakMap;function J(e,t){let n=K.get(e),r=n?.get(t);if(r)return r;let a={target:{environmentId:t,threadId:i.make(e.threadId),terminalId:e.terminalId},state:z(e,N)};return n||(n=new Map,K.set(e,n)),n.set(t,a),a}function Y(e){let t=G.get(e);if(!t){let n=new Intl.Collator(void 0,{numeric:!0}).compare,r=e.toSorted((e,t)=>n(e.terminalId,t.terminalId)),i=new Map;for(let e of r){let t=i.get(e.threadId);t?t.push(e):i.set(e.threadId,[e])}t={all:r,byThreadId:i,views:new Map},G.set(e,t)}return t}function X(e,t,n){if(t===null||e===null||e.length===0)return W;let r=Y(e),i=r.views.get(t),a=i?.get(n);if(a)return a;let o=n===null?r.all:r.byThreadId.get(n);if(!o||o.length===0)return W;let s=o[0],c=n===null?`all`:`thread`,l=q.get(s),u=l?.get(t),d=u?.[c]?.deref(),f=d?.length===o.length&&d.every((e,t)=>e.state.summary===o[t])?d:o.map(e=>J(e,t));return l||(l=new Map,q.set(s,l)),f!==d&&l.set(t,{...u,[c]:new WeakRef(f)}),i||(i=new Map,r.views.set(t,i)),i.set(n,f),f}function Z(e){let t=(0,h.c)(15),r=p(e.environmentId,n),i=p(e.environmentId,o),a;t[0]!==i||t[1]!==r||t[2]!==e.environmentId||t[3]!==e.terminal?(a=e.environmentId!==null&&e.terminal!==null?i?U.attach({environmentId:e.environmentId,input:e.terminal}):r?U.observe({environmentId:e.environmentId,input:{threadId:e.terminal.threadId,terminalId:e.terminal.terminalId}}):null:null,t[0]=i,t[1]=r,t[2]=e.environmentId,t[3]=e.terminal,t[4]=a):a=t[4];let s=m(a),c;t[5]!==r||t[6]!==e.environmentId?(c=e.environmentId===null||!r?null:U.metadata({environmentId:e.environmentId,input:null}),t[5]=r,t[6]=e.environmentId,t[7]=c):c=t[7];let l=m(c),u;bb0:{if(e.environmentId===null||e.terminal===null){u=P;break bb0}let n;t[8]!==s.data||t[9]!==e.terminal||t[10]!==l.data?(n=z((l.data===null?null:Y(l.data).byThreadId.get(e.terminal.threadId)?.find(t=>t.terminalId===e.terminal?.terminalId))??null,s.data??N),t[8]=s.data,t[9]=e.terminal,t[10]=l.data,t[11]=n):n=t[11];let r=n,i;t[12]!==s.error||t[13]!==r?(i=s.error===null?r:{...r,error:s.error,status:`error`},t[12]=s.error,t[13]=r,t[14]=i):i=t[14],u=i}return u}function Q(e){let t=(0,h.c)(8),r=p(e.environmentId,n),i;t[0]!==r||t[1]!==e.environmentId?(i=e.environmentId===null||!r?null:U.metadata({environmentId:e.environmentId,input:null}),t[0]=r,t[1]=e.environmentId,t[2]=i):i=t[2];let a=m(i),o;return t[3]!==e.environmentId||t[4]!==e.threadId||t[5]!==a.data||t[6]!==a.error?(o=a.data===null||a.error!==null?null:X(a.data,e.environmentId,e.threadId),t[3]=e.environmentId,t[4]=e.threadId,t[5]=a.data,t[6]=a.error,t[7]=o):o=t[7],o}function $(e){let t=(0,h.c)(4),n=Q(e),r;t[0]===n?r=t[1]:(r=n??[],t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=M(r),t[2]=r,t[3]=i),i}export{g as a,U as i,Q as n,j as o,$ as r,Z as t};
2
- //# sourceMappingURL=terminalSessions-DvEfRw4m.js.map
1
+ import{BE as e,Ev as t,M_ as n,Ov as r,Sy as i,Vc as a,j_ as o}from"./utils-DPab5G1h.js";import{F as s,M as c,P as l,k as u,tt as d}from"./runtime-BoS3svRr.js";import{t as f}from"./runtime-dibyMnpt.js";import{i as p}from"./session-DSU6Gpmh.js";import{n as m}from"./query-CrtXKOxk.js";var h=e(),g=Object.freeze({generation:-1,resetVersion:-1,offset:0}),_=524288,v=16384,y=1024,b=new TextEncoder,x=new TextDecoder(`utf-8`,{ignoreBOM:!0}),S=Object.freeze({generation:0,chunks:Object.freeze([]),retainedBytes:0,resetVersion:0,nextOffset:0});function C(e,t){if(e.length===0)return[];let n=b.encode(e);if(n.byteLength<=t)return[{data:e,byteLength:n.byteLength}];let r=[],i=0;for(;i<n.byteLength;){let e=Math.min(i+t,n.byteLength);for(;e<n.byteLength&&((n[e]??0)&192)==128;)--e;if(e===i)for(e=Math.min(i+t,n.byteLength);e<n.byteLength&&((n[e]??0)&192)==128;)e+=1;let a=n.subarray(i,e);r.push({data:x.decode(a),byteLength:a.byteLength}),i=e}return r}function w(e,t){if(t<=0)return``;let n=b.encode(e);if(n.byteLength<=t)return e;let r=n.byteLength-t;for(;r<n.length;){let e=n[r];if(e===void 0||(e&192)!=128)break;r+=1}return x.decode(n.subarray(r))}function T(e,t,n=v){let r=C(e,n),i=0,a=t;return{chunks:r.map(e=>{i+=e.byteLength;let t=a;return a+=e.data.length,{startOffset:t,data:e.data,byteLength:e.byteLength}}),nextOffset:a,byteLength:i}}function E(e){let t=[];for(let n of e){let e=t.at(-1);e!==void 0&&e.startOffset+e.data.length===n.startOffset&&e.byteLength+n.byteLength<=v?t[t.length-1]={startOffset:e.startOffset,data:`${e.data}${n.data}`,byteLength:e.byteLength+n.byteLength}:t.push(n)}return t}function D(e,t){let n=0,r=0;for(;r<t&&n<e.data.length;){let t=e.data.codePointAt(n);r+=t<=127?1:t<=2047?2:t<=65535?3:4,n+=t<=65535?1:2}return{...e,startOffset:e.startOffset+n,data:e.data.slice(n),byteLength:e.byteLength-r}}function O(e,t,n){if(t.length===0)return e;if(n<=0)return{generation:e.generation,chunks:[],retainedBytes:0,resetVersion:e.resetVersion+1,nextOffset:e.nextOffset+t.length};let r=T(t,e.nextOffset,Math.min(v,Math.max(1,n))),i=[...e.chunks,...r.chunks],a=e.retainedBytes+r.byteLength,o=0;for(;a>n&&o<i.length;){let e=i[o],t=a-n;if(t<e.byteLength){let n=D(e,t);a-=e.byteLength-n.byteLength,n.byteLength>0?i[o]=n:o+=1;break}a-=e.byteLength,o+=1}let s=o===0?i:i.slice(o);if(s.length>y){s=E(s);let e=s.length-y;if(e>0){for(let t of s.slice(0,e))a-=t.byteLength;s=s.slice(e)}}return{generation:e.generation,chunks:s,retainedBytes:a,resetVersion:e.resetVersion,nextOffset:r.nextOffset}}function k(e,t,n){let r=T(w(t,n),0,Math.min(v,Math.max(1,n)));return{generation:e.generation,chunks:r.chunks,retainedBytes:r.byteLength,resetVersion:e.resetVersion+1,nextOffset:r.nextOffset}}function A(e){return e.chunks.map(e=>e.data).join(``)}function j(e,t){let n={generation:e.generation,resetVersion:e.resetVersion,offset:e.nextOffset},r=e.chunks[0];if(t.generation!==e.generation||t.resetVersion!==e.resetVersion||t.offset<(r?.startOffset??e.nextOffset))return{type:`reset`,data:A(e),cursor:n};let i=e.chunks.filter(e=>e.startOffset+e.data.length>t.offset);return i.length===0?{type:`none`,cursor:n}:{type:`append`,data:i.map(e=>e.data.slice(Math.max(0,t.offset-e.startOffset))).join(``),cursor:n}}function M(e){return e.filter(e=>e.state.hasRunningSubprocess).map(e=>e.target.terminalId)}var N=Object.freeze({output:S,status:`closed`,error:null,updatedAt:null,version:0,lifecycleVersion:0}),P=Object.freeze({summary:null,output:S,status:`closed`,error:null,hasRunningSubprocess:!1,updatedAt:null,version:0,lifecycleVersion:0}),F=0;function I(){return{...N,output:{...S,generation:++F}}}function L(e,t,n=N){return{output:k(n.output,e.history,t),status:e.status,error:null,updatedAt:e.updatedAt,version:n.version+1,lifecycleVersion:n.lifecycleVersion}}function R(e,t){return e===null?t:t===null||Date.parse(e)>=Date.parse(t)?e:t}function z(e,t){return{summary:e,output:t.output,status:t.version>0?t.status:e?.status??t.status,error:t.error,hasRunningSubprocess:e?.hasRunningSubprocess??!1,updatedAt:R(e?.updatedAt??null,t.updatedAt),version:t.version,lifecycleVersion:t.lifecycleVersion}}function B(e,t,n=_){switch(t.type){case`snapshot`:return{...L(t.snapshot,n,e),lifecycleVersion:e.version===0?e.lifecycleVersion:e.lifecycleVersion+1};case`restarted`:return{...L(t.snapshot,n,e),lifecycleVersion:e.lifecycleVersion+1};case`output`:return{...e,output:O(e.output,t.data,n),status:e.status===`closed`?`running`:e.status,error:null,version:e.version+1};case`cleared`:return{...e,output:k(e.output,``,n),error:null,version:e.version+1};case`exited`:return{...e,status:`exited`,error:null,version:e.version+1};case`closed`:return{...e,status:`closed`,error:null,version:e.version+1};case`error`:return{...e,status:`error`,error:t.message,version:e.version+1};case`activity`:return e}}function V(e,t){return t.type===`snapshot`?t.terminals:t.type===`remove`?e.filter(e=>e.threadId!==t.threadId||e.terminalId!==t.terminalId):[...e.filter(e=>e.threadId!==t.terminal.threadId||e.terminalId!==t.terminal.terminalId),t.terminal]}function H(e){let n=u(),i=u(),o=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId]),f=({environmentId:e,input:t})=>JSON.stringify([e,t.threadId,t.terminalId??null]),p={mode:`serial`,key:o};return{observe:s(e,{label:`environment-data:terminal:observe`,subscribe:e=>r(()=>d(a.terminalObserve,e).pipe(t(I,B)))}),attach:s(e,{label:`environment-data:terminal:attach`,subscribe:e=>r(()=>d(a.terminalAttach,e).pipe(t(I,B)))}),events:l(e,{label:`environment-data:terminal:events`,tag:a.subscribeTerminalEvents}),metadata:s(e,{label:`environment-data:terminal:metadata`,subscribe:e=>d(a.subscribeTerminalMetadata,{}).pipe(t(()=>[],V))}),open:c(e,{label:`environment-data:terminal:open`,tag:a.terminalOpen,scheduler:n,concurrency:p}),write:c(e,{label:`environment-data:terminal:write`,tag:a.terminalWrite}),resize:c(e,{label:`environment-data:terminal:resize`,tag:a.terminalResize,scheduler:i,concurrency:{mode:`latest`,key:f}}),clear:c(e,{label:`environment-data:terminal:clear`,tag:a.terminalClear,scheduler:n,concurrency:p}),restart:c(e,{label:`environment-data:terminal:restart`,tag:a.terminalRestart,scheduler:n,concurrency:p}),close:c(e,{label:`environment-data:terminal:close`,tag:a.terminalClose,scheduler:n,concurrency:p})}}var U=H(f),W=Object.freeze([]),G=new WeakMap,K=new WeakMap,q=new WeakMap;function J(e,t){let n=K.get(e),r=n?.get(t);if(r)return r;let a={target:{environmentId:t,threadId:i.make(e.threadId),terminalId:e.terminalId},state:z(e,N)};return n||(n=new Map,K.set(e,n)),n.set(t,a),a}function Y(e){let t=G.get(e);if(!t){let n=new Intl.Collator(void 0,{numeric:!0}).compare,r=e.toSorted((e,t)=>n(e.terminalId,t.terminalId)),i=new Map;for(let e of r){let t=i.get(e.threadId);t?t.push(e):i.set(e.threadId,[e])}t={all:r,byThreadId:i,views:new Map},G.set(e,t)}return t}function X(e,t,n){if(t===null||e===null||e.length===0)return W;let r=Y(e),i=r.views.get(t),a=i?.get(n);if(a)return a;let o=n===null?r.all:r.byThreadId.get(n);if(!o||o.length===0)return W;let s=o[0],c=n===null?`all`:`thread`,l=q.get(s),u=l?.get(t),d=u?.[c]?.deref(),f=d?.length===o.length&&d.every((e,t)=>e.state.summary===o[t])?d:o.map(e=>J(e,t));return l||(l=new Map,q.set(s,l)),f!==d&&l.set(t,{...u,[c]:new WeakRef(f)}),i||(i=new Map,r.views.set(t,i)),i.set(n,f),f}function Z(e){let t=(0,h.c)(15),r=p(e.environmentId,n),i=p(e.environmentId,o),a;t[0]!==i||t[1]!==r||t[2]!==e.environmentId||t[3]!==e.terminal?(a=e.environmentId!==null&&e.terminal!==null?i?U.attach({environmentId:e.environmentId,input:e.terminal}):r?U.observe({environmentId:e.environmentId,input:{threadId:e.terminal.threadId,terminalId:e.terminal.terminalId}}):null:null,t[0]=i,t[1]=r,t[2]=e.environmentId,t[3]=e.terminal,t[4]=a):a=t[4];let s=m(a),c;t[5]!==r||t[6]!==e.environmentId?(c=e.environmentId===null||!r?null:U.metadata({environmentId:e.environmentId,input:null}),t[5]=r,t[6]=e.environmentId,t[7]=c):c=t[7];let l=m(c),u;bb0:{if(e.environmentId===null||e.terminal===null){u=P;break bb0}let n;t[8]!==s.data||t[9]!==e.terminal||t[10]!==l.data?(n=z((l.data===null?null:Y(l.data).byThreadId.get(e.terminal.threadId)?.find(t=>t.terminalId===e.terminal?.terminalId))??null,s.data??N),t[8]=s.data,t[9]=e.terminal,t[10]=l.data,t[11]=n):n=t[11];let r=n,i;t[12]!==s.error||t[13]!==r?(i=s.error===null?r:{...r,error:s.error,status:`error`},t[12]=s.error,t[13]=r,t[14]=i):i=t[14],u=i}return u}function Q(e){let t=(0,h.c)(8),r=p(e.environmentId,n),i;t[0]!==r||t[1]!==e.environmentId?(i=e.environmentId===null||!r?null:U.metadata({environmentId:e.environmentId,input:null}),t[0]=r,t[1]=e.environmentId,t[2]=i):i=t[2];let a=m(i),o;return t[3]!==e.environmentId||t[4]!==e.threadId||t[5]!==a.data||t[6]!==a.error?(o=a.data===null||a.error!==null?null:X(a.data,e.environmentId,e.threadId),t[3]=e.environmentId,t[4]=e.threadId,t[5]=a.data,t[6]=a.error,t[7]=o):o=t[7],o}function $(e){let t=(0,h.c)(4),n=Q(e),r;t[0]===n?r=t[1]:(r=n??[],t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=M(r),t[2]=r,t[3]=i),i}export{g as a,U as i,Q as n,j as o,$ as r,Z as t};
2
+ //# sourceMappingURL=terminalSessions-Dxo8abTt.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{BE as t,Co as n,mE as r,t as i}from"./utils-CyMIjIQl.js";import{t as a}from"./FieldControl-wrjTWyrJ.js";var o=t(),s=e(r(),1);function c(e){let t=(0,o.c)(15),r,c,l,u;t[0]===e?(r=t[1],c=t[2],l=t[3],u=t[4]):({className:r,size:l,unstyled:u,...c}=e,t[0]=e,t[1]=r,t[2]=c,t[3]=l,t[4]=u);let d=l===void 0?`default`:l,f=u!==void 0&&u,p;t[5]!==r||t[6]!==f?(p=i(!f&&`relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] has-focus-visible:ring-inset not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] sm:text-sm dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]`,r)||void 0,t[5]=r,t[6]=f,t[7]=p):p=t[7];let m;t[8]!==c||t[9]!==d?(m=(0,s.jsx)(a,{render:e=>(0,s.jsx)(`textarea`,{className:i(`field-sizing-content min-h-17.5 max-h-64 w-full rounded-[inherit] px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] outline-none wrap-anywhere max-sm:min-h-20.5`,d===`sm`&&`min-h-16.5 px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)] max-sm:min-h-19.5`,d===`lg`&&`min-h-18.5 py-[calc(--spacing(2)-1px)] max-sm:min-h-21.5`),"data-slot":`textarea`,...n(e,c)})}),t[8]=c,t[9]=d,t[10]=m):m=t[10];let h;return t[11]!==d||t[12]!==p||t[13]!==m?(h=(0,s.jsx)(`span`,{className:p,"data-size":d,"data-slot":`textarea-control`,children:m}),t[11]=d,t[12]=p,t[13]=m,t[14]=h):h=t[14],h}export{c as t};
2
- //# sourceMappingURL=textarea-CAyj7_Hj.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{BE as t,Co as n,mE as r,t as i}from"./utils-DPab5G1h.js";import{t as a}from"./FieldControl-ARIcqLzr.js";var o=t(),s=e(r(),1);function c(e){let t=(0,o.c)(15),r,c,l,u;t[0]===e?(r=t[1],c=t[2],l=t[3],u=t[4]):({className:r,size:l,unstyled:u,...c}=e,t[0]=e,t[1]=r,t[2]=c,t[3]=l,t[4]=u);let d=l===void 0?`default`:l,f=u!==void 0&&u,p;t[5]!==r||t[6]!==f?(p=i(!f&&`relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] has-focus-visible:ring-inset not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] sm:text-sm dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]`,r)||void 0,t[5]=r,t[6]=f,t[7]=p):p=t[7];let m;t[8]!==c||t[9]!==d?(m=(0,s.jsx)(a,{render:e=>(0,s.jsx)(`textarea`,{className:i(`field-sizing-content min-h-17.5 max-h-64 w-full rounded-[inherit] px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] outline-none wrap-anywhere max-sm:min-h-20.5`,d===`sm`&&`min-h-16.5 px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)] max-sm:min-h-19.5`,d===`lg`&&`min-h-18.5 py-[calc(--spacing(2)-1px)] max-sm:min-h-21.5`),"data-slot":`textarea`,...n(e,c)})}),t[8]=c,t[9]=d,t[10]=m):m=t[10];let h;return t[11]!==d||t[12]!==p||t[13]!==m?(h=(0,s.jsx)(`span`,{className:p,"data-size":d,"data-slot":`textarea-control`,children:m}),t[11]=d,t[12]=p,t[13]=m,t[14]=h):h=t[14],h}export{c as t};
2
+ //# sourceMappingURL=textarea-CBtjBVW3.js.map
@@ -1,5 +1,5 @@
1
- import{Gy as e,Ny as t,Oy as n,Vy as r,gb as i,tE as a}from"./utils-CyMIjIQl.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:ye(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 S(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 pe={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function C(e){let t=``;if((e[x]===`-`||e[x]===`+`)&&(t+=e[x++]),t+=w(e),e[x]===`.`&&/\d/.test(e[x+1])&&(t+=e[x++]+w(e)),(e[x]===`e`||e[x]===`E`)&&((e[x+1]===`-`||e[x+1]===`+`)&&/\d/.test(e[x+2])?t+=e[x++]+e[x++]+w(e):/\d/.test(e[x+1])&&(t+=e[x++]+w(e))),S(e)){let n=T(e);return n===`deg`||n===`rad`||n===`turn`||n===`grad`?{type:b.Hue,value:t*pe[n]}:void 0}return e[x]===`%`?(x++,{type:b.Percentage,value:+t}):{type:b.Number,value:+t}}function w(e){let t=``;for(;/\d/.test(e[x]);)t+=e[x++];return t}function T(e){let t=``;for(;x<e.length&&de.test(e[x]);)t+=e[x++];return t}function me(e){let t=T(e);return e[x]===`(`?(x++,{type:b.Function,value:t}):t===`none`?{type:b.None,value:void 0}:{type:b.Ident,value:t}}function he(e=``){let t=e.trim(),n=[],r;for(x=0;x<t.length;){if(r=t[x++],r===`
1
+ import{Gy as e,Ny as t,Oy as n,Vy as r,gb as i,tE as a}from"./utils-DPab5G1h.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:ye(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 S(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 pe={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function C(e){let t=``;if((e[x]===`-`||e[x]===`+`)&&(t+=e[x++]),t+=w(e),e[x]===`.`&&/\d/.test(e[x+1])&&(t+=e[x++]+w(e)),(e[x]===`e`||e[x]===`E`)&&((e[x+1]===`-`||e[x+1]===`+`)&&/\d/.test(e[x+2])?t+=e[x++]+e[x++]+w(e):/\d/.test(e[x+1])&&(t+=e[x++]+w(e))),S(e)){let n=T(e);return n===`deg`||n===`rad`||n===`turn`||n===`grad`?{type:b.Hue,value:t*pe[n]}:void 0}return e[x]===`%`?(x++,{type:b.Percentage,value:+t}):{type:b.Number,value:+t}}function w(e){let t=``;for(;/\d/.test(e[x]);)t+=e[x++];return t}function T(e){let t=``;for(;x<e.length&&de.test(e[x]);)t+=e[x++];return t}function me(e){let t=T(e);return e[x]===`(`?(x++,{type:b.Function,value:t}):t===`none`?{type:b.None,value:void 0}:{type:b.Ident,value:t}}function he(e=``){let t=e.trim(),n=[],r;for(x=0;x<t.length;){if(r=t[x++],r===`
2
2
  `||r===` `||r===` `){for(;x<t.length&&(t[x]===`
3
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(C(t));continue}return}if(r===`-`){if(x--,fe(t)){n.push(C(t));continue}if(S(t)){n.push({type:b.Ident,value:T(t)});continue}return}if(r===`.`){if(x--,fe(t)){n.push(C(t));continue}return}if(r===`/`){for(;x<t.length&&(t[x]===`
4
4
  `||t[x]===` `||t[x]===` `);)x++;let e;if(fe(t)&&(e=C(t),e.type!==b.Hue)){n.push({type:b.Alpha,value:e});continue}if(S(t)&&T(t)===`none`){n.push({type:b.Alpha,value:{type:b.None,value:void 0}});continue}return}if(/\d/.test(r)){x--,n.push(C(t));continue}if(ue.test(r)){x--,n.push(me(t));continue}return}return n}function ge(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=_e(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 _e(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 ve(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==b.Function)return;let r=_e(e,t);if(r)return r.unshift(n.value),r}var ye=e=>{if(typeof e!=`string`)return;let t=he(e),n=t?ve(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?ge(t):void 0};function be(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 xe=e=>e===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0,Se=(e,t,n)=>e+n*(t-e),Ce=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},E=(e=>t=>{let n=Ce(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)}})(Se),D=e=>{let t=!1,n=e.map(e=>e===void 0?1:(t=!0,e));return t?n:e},O={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[be,u,ne,c,xe,`srgb`],serialize:`srgb`,interpolate:{r:E,g:E,b:E,alpha:{use:E,fixup:D}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},we=(e=0)=>Math.abs(e)**(563/256)*Math.sign(e),Te=e=>{let t=we(e.r),n=we(e.g),r=we(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},Ee=e=>Math.abs(e)**(256/563)*Math.sign(e),De=({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:Ee(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:Ee(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:Ee(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},Oe=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*((t+.055)/1.055)**2.4},k=({r:e,g:t,b:n,alpha:r})=>{let i={mode:`lrgb`,r:Oe(e),g:Oe(t),b:Oe(n)};return r!==void 0&&(i.alpha=r),i},A=e=>{let{r:t,g:n,b:r,alpha:i}=k(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},ke=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*t**(1/2.4)-.055):e*12.92},j=({r:e,g:t,b:n,alpha:r},i=`rgb`)=>{let a={mode:i,r:ke(e),g:ke(t),b:ke(n)};return r!==void 0&&(a.alpha=r),a},M=({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=j({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},Ae={...O,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:e=>De(A(e)),xyz65:De},toMode:{rgb:e=>M(Te(e)),xyz65:Te}},N=e=>(e%=360)<0?e+360:e;function je({h:e,s:t,l:n,alpha:r}){e=N(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 Me({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 Ne=(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}},Pe=RegExp(`^hsla?\\(\\s*${h}${g}${f}${g}${f}\\s*(?:,\\s*${p}\\s*)?\\)$`),Fe=e=>{let t=e.match(Pe);if(!t)return;let n={mode:`hsl`};return t[3]===void 0?t[1]!==void 0&&t[2]!==void 0&&(n.h=Ne(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 Ie(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 Le=(e,t)=>e.map((n,r,i)=>{if(n===void 0)return n;let a=N(n);return r===0||e[r-1]===void 0?a:t(a-N(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),[]),Re=e=>Le(e,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),ze=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=N(e.h),r=N(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},Be=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=N(e.h),r=N(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},Ve=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=N(e.h),r=N(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},He=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},Ue={mode:`hsl`,toMode:{rgb:je},fromMode:{rgb:Me},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[Ie,Fe],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:E,fixup:Re},s:E,l:E,alpha:{use:E,fixup:D}},difference:{h:ze},average:{h:He}};function We({h:e,s:t,v:n,alpha:r}){e=N(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 Ge({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 Ke={mode:`hsv`,toMode:{rgb:We},parse:[`--hsv`],serialize:`--hsv`,fromMode:{rgb:Ge},channels:[`h`,`s`,`v`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,interpolate:{h:{use:E,fixup:Re},s:E,v:E,alpha:{use:E,fixup:D}},difference:{h:ze},average:{h:He}};function qe({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 We({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function Je(e){let t=Ge(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 Ye(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 Xe={mode:`hwb`,toMode:{rgb:qe},fromMode:{rgb:Je},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[Ye],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:E,fixup:Re},w:E,b:E,alpha:{use:E,fixup:D}},difference:{h:Be},average:{h:He}},Ze=29**3/27,Qe=216/29**3,P={X:.3457/.3585,Y:1,Z:.2958/.3585},F={X:.3127/.329,Y:1,Z:.3583/.329},$e=e=>e**3>Qe?e**3:(116*e-16)/Ze,et=({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:$e(a)*P.X,y:$e(i)*P.Y,z:$e(o)*P.Z};return r!==void 0&&(s.alpha=r),s},tt=({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=j({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},nt=e=>tt(et(e)),rt=e=>{let{r:t,g:n,b:r,alpha:i}=k(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},it=e=>e>Qe?Math.cbrt(e):(Ze*e+16)/116,at=({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=it(e/P.X),a=it(t/P.Y),o=it(n/P.Z),s={mode:`lab`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s},ot=e=>{let t=at(rt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function st(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 ct={mode:`lab`,toMode:{xyz50:et,rgb:nt},fromMode:{xyz50:at,rgb:ot},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[st],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:E,a:E,b:E,alpha:{use:E,fixup:D}}},lt=29**3/27,ut=216/29**3,dt=e=>e**3>ut?e**3:(116*e-16)/lt,ft=({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:dt(a)*F.X,y:dt(i)*F.Y,z:dt(o)*F.Z};return r!==void 0&&(s.alpha=r),s},pt=e=>M(ft(e)),mt=e=>e>ut?Math.cbrt(e):(lt*e+16)/116,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=mt(e/F.X),a=mt(t/F.Y),o=mt(n/F.Z),s={mode:`lab65`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s},gt=e=>{let t=ht(A(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},_t={...ct,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:ft,rgb:pt},fromMode:{xyz65:ht,rgb:gt},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},I=({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=N(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},L=({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 vt(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 yt={mode:`lch`,toMode:{lab:L,rgb:e=>nt(L(e))},fromMode:{rgb:e=>I(ot(e)),lab:I},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[vt],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:E,fixup:Re},c:E,l:E,alpha:{use:E,fixup:D}},difference:{h:Ve},average:{h:He}},bt={...yt,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:e=>L(e,`lab65`),rgb:e=>pt(L(e,`lab65`))},fromMode:{rgb:e=>I(gt(e),`lch65`),lab65:e=>I(e,`lch65`)},ranges:{l:[0,100],c:[0,150],h:[0,360]}},xt={...O,mode:`lrgb`,toMode:{rgb:j},fromMode:{rgb:k},parse:[`srgb-linear`],serialize:`srgb-linear`},St=({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},Ct=({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},wt=e=>{let t=Ct(k(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Tt=e=>j(St(e));function Et(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 Dt={...ct,mode:`oklab`,toMode:{lrgb:St,rgb:Tt},fromMode:{lrgb:Ct,rgb:wt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Et],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 Ot(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 kt={...yt,mode:`oklch`,toMode:{oklab:e=>L(e,`oklab`),rgb:e=>Tt(L(e,`oklab`))},fromMode:{rgb:e=>I(wt(e),`oklch`),oklab:e=>I(e,`oklch`)},parse:[Ot],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]}},At=e=>{let{r:t,g:n,b:r,alpha:i}=k(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},jt=({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=j({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},Mt={...O,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:e=>jt(A(e)),xyz65:jt},toMode:{rgb:e=>M(At(e)),xyz65:At}},Nt=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*t**(1/1.8):16*e},Pt=({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:Nt(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Nt(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Nt(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},Ft=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*t**1.8:e/16},It=e=>{let t=Ft(e.r),n=Ft(e.g),r=Ft(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},Lt={...O,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:Pt,rgb:e=>Pt(rt(e))},toMode:{xyz50:It,rgb:e=>tt(It(e))}},Rt=1.09929682680944,zt=.018053968510807,Bt=e=>{let t=Math.abs(e);return t>zt?(Math.sign(e)||1)*(Rt*t**.45-.09929682680944008):4.5*e},Vt=({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:Bt(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Bt(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Bt(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},Ht=1.09929682680944,Ut=.018053968510807,Wt=(e=0)=>{let t=Math.abs(e);return t<Ut*4.5?e/4.5:(Math.sign(e)||1)*((t+Ht-1)/Ht)**(1/.45)},Gt=e=>{let t=Wt(e.r),n=Wt(e.g),r=Wt(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},Kt={...O,mode:`rec2020`,fromMode:{xyz65:Vt,rgb:e=>Vt(A(e))},toMode:{xyz65:Gt,rgb:e=>M(Gt(e))},parse:[`rec2020`],serialize:`rec2020`},qt={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:tt,lab:at},fromMode:{rgb:rt,lab:et},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:E,y:E,z:E,alpha:{use:E,fixup:D}}},Jt={mode:`xyz65`,toMode:{rgb:M,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:A,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:E,y:E,z:E,alpha:{use:E,fixup:D}}};y(Ae),y(Ue),y(Ke),y(Xe),y(ct),y(_t),y(yt),y(bt),y(xt),y(Dt),y(kt),y(Mt),y(Lt),y(Kt),y(O),y(qt),y(Jt);var Yt=[`orchid`,`grove`,`ocean`,`ember`,`iris`];[...Yt];var R=new Set([`system`,`light`,`dark`,...Yt]);[...R];var Xt=`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(`.`),Zt={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`},Qt={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`},$t={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},en={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},tn={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},nn={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},rn={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},an=[$t,en,tn,nn,rn],z=`p4code:themes:v1`,on=`p4code:theme-follow-system`,sn=`p4code:theme-appearance-mode`,cn=`p4code:theme-halves:v1`,ln=r,un=new Set(Xt),dn=[],fn=new Set,B=null,pn=new Set,mn=null;function hn(){return mn}function gn(e){return pn.add(e),()=>pn.delete(e)}function _n(e){if(mn!==e){mn=e;for(let e of pn)e()}}function V(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function vn(e){return e===`light`||e===`dark`}function yn(e){return typeof e==`string`&&U(e)!==null}function bn(e){return typeof e==`string`&&/^[a-z0-9](?:[a-z0-9-]{0,47})$/.test(e)}function xn(e){return typeof e==`string`&&e.trim().length>0&&e.trim().length<=48}function Sn(e){return V(e)&&typeof e.id==`string`&&/^[a-z0-9][a-z0-9.:-]{0,127}$/i.test(e.id)&&xn(e.label)?{id:e.id,label:e.label.trim()}:void 0}function Cn(e){let t={};for(let[n,r]of Object.entries(e)){let e=U(r);un.has(n)&&e&&(t[n]=e)}return t}function wn(e,t){return V(e)?{...fr(t),...Cn(e)}:null}function Tn(e,t){if(e===void 0)return;if(!V(e))return null;let n={};for(let[r,i]of Object.entries(e)){if(!vn(r))return null;if(r===t)continue;let e=wn(i,r);if(!e)return null;n[r]=e}return Object.keys(n).length>0?n:void 0}function En(e){if(!V(e)||!bn(e.id)||R.has(e.id)||!xn(e.label)||!vn(e.appearance))return null;let t=wn(e.colors,e.appearance);if(!t)return null;let n=Tn(e.variants,e.appearance);if(e.variants!==void 0&&n===null)return null;let r=Sn(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 Dn(e){let t=[];for(let n of e){let e=En(n);e&&!t.some(t=>t.id===e.id)&&t.push(e)}return t}function On(){if(typeof window>`u`)return{status:`ready`,storedThemes:[],themes:[]};let e;try{e=window.localStorage.getItem(z)}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:Dn(t)}:{status:`unavailable`,reason:`malformed`}}function kn(){return B===null&&(B=On()),B}function An(){for(let e of fn)e()}function jn(){B=null,An()}var Mn=[];function Nn(){let e=kn();return e.status===`ready`?e.themes:Mn}function Pn(){return dn}function Fn(e){return!a(dn,e)&&(dn=e,An(),!0)}function In(e){return R.has(e)}function Ln(e){return wr().themes.filter(t=>t.collection?.id===e)}function Rn(e){if(fn.add(e),typeof window>`u`)return()=>fn.delete(e);let t=e=>{(e.key===`p4code:themes:v1`||e.key===null)&&jn()};return window.addEventListener(`storage`,t),()=>{fn.delete(e),window.removeEventListener(`storage`,t)}}function zn(e){return e===`dark`?Vn??=Zn(Qt):Bn??=Zn(Zt)}var Bn,Vn,Hn={r:255,g:250,b:255},Un={r:36,g:21,b:35},Wn={r:255,g:255,b:255},Gn={r:0,g:0,b:0},Kn=ie(`oklch`);function qn(e){if(typeof e!=`string`)return null;let t=e.trim(),n=ye(t);if(!n)return null;let r=Kn(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=qn(e);return t?H(t.color,t.alpha):null}function Yn(e){let t=qn(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=qn(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(Xt.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}}var ar={light:{error:`#fb2c36`,errorForeground:`#c10007`,warning:`#fe9a00`,warningForeground:`#bb4d00`},dark:{error:`#fb414a`,errorForeground:`#ff6467`,warning:`#fe9a00`,warningForeground:`#ffb900`}};function or(e){let t=q(e)<.179?`dark`:`light`,n=ar[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 sr(e,t,n){let r=fr(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=dr(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),S=f(c?.16:.1,Math.min(.13,s.C*.6)),pe=Y(S),C=f(.035,u*.8),w=f(c?.14:.09,Math.min(.12,s.C*.55)),T=e=>rr(ir(m,e,4.6,c?`lighter`:`darker`)),me=G(cr(b,h,1,4.6)),he=G(cr(oe,h,1,4.6)),ge=Y(f(.22,Math.min(.12,s.C))),_e=Y(f(.4,Math.min(.18,s.C))),ve={...ee,L:ee.L+(c?.06:-.06)};return{...r,...or(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:T(ue),muted:p(de),mutedForeground:me,placeholder:he,secondaryLabel:G(g),iconMuted:G(g),update:G(a),updateForeground:T(Y(w)),updateSurface:p(w),accentSurface:p(x),accentSurfaceForeground:T(fe),messageSurface:p(S),messageForeground:T(pe),messageAction:G(te),messageActionForeground:G(ne),messageActionHover:p(ve),codeBackground:p(C),codeForeground:G(h),searchMatchBackground:G(ge),searchMatchForeground:G(Z(ge)),searchMatchActiveBackground:G(_e),searchMatchActiveForeground:G(Z(_e)),sidebar:p(ie),sidebarForeground:T(_),sidebarMutedForeground:G(dr(_,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,Hn),n=X(e,Un);return Math.max(t,n)>=4.5?t>=n?Hn:Un:X(e,Wn)>=X(e,Gn)?Wn:Gn}function cr(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 lr=4.705,ur=5.082;function dr(e,t){return cr(e,t,1,q(e)<.179?ur:lr)}function fr(e){return e===`dark`?$t.variants.dark:$t.colors}function pr(e,t,n,r){let i=qn(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===Hn||e===Wn?Gn:Wn,.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 mr=an;function Q(e){let t=e;return mr.find(e=>e.id===t)??Nn().find(e=>e.id===t)??dn.find(e=>e.id===t)??null}function hr(e){let t=e;return mr.find(e=>e.id===t)?.sidebarArtwork===!0}function gr(e){let t=_r(e);return t.length===1?t[0]:null}function $(e,t){return t===e.appearance?e.colors:e.variants?.[t]??null}function _r(e){return[`light`,`dark`].filter(t=>$(e,t)!==null)}function vr(e){return e===`system`?null:e===`light`||e===`dark`?e:Q(e)?.appearance??null}function yr(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,48)||`custom-theme`}var br=class extends e()(`ThemeLibraryStorageError`,{storageKey:r,operation:t([`read`,`write`]),reason:t([`malformed`,`storage-unavailable`]),cause:i(n())}){get message(){let e=this.operation===`read`?`from`:`to`;return`Failed to ${this.operation} the theme library ${e} ${this.storageKey}.`}};function xr(e,t){if(typeof window<`u`){try{window.localStorage.setItem(z,JSON.stringify(e)),B={status:`ready`,storedThemes:e,themes:t}}catch(e){throw new br({storageKey:z,operation:`write`,reason:`storage-unavailable`,cause:e})}An()}}function Sr(e){if(e.status===`unavailable`)throw new br({storageKey:z,operation:`read`,reason:e.reason,...`cause`in e?{cause:e.cause}:{}});return e}function Cr(){return Sr(kn())}function wr(){return Sr(On())}function Tr(e,t){return V(e)&&e.id===t}function Er(e,t){return V(e)&&V(e.collection)&&e.collection.id===t}function Dr(e){if(R.has(e.id))throw Error(`The theme id "${e.id}" is reserved.`);let t=Cr();if(mr.some(t=>t.id===e.id)||t.storedThemes.some(t=>Tr(t,e.id)))throw Error(`A theme named "${e.label}" is already installed.`);let n=Qn(e),r=[...t.themes,n];return xr([...t.storedThemes,n],r),n}function Or(e){if(R.has(e.id))throw Error(`The theme id "${e.id}" is reserved.`);let t=Cr(),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)Tr(n,e.id)?s||=(o.push(i),!0):o.push(n);return xr(o,a),i}function kr(e,t,n){if(t.length===0)throw Error(`A theme collection cannot be empty.`);let r=t.map(e=>En(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=wr(),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(mr.map(e=>e.id));for(let t of a.storedThemes)!Er(t,e)&&V(t)&&typeof t.id==`string`&&s.add(t.id);let c=i.find(e=>R.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)Er(t,e)?u||=(l.push(...i),!0):l.push(t);return u||l.push(...i),xr(l,Dn(l)),i}function Ar(e){jr([e])}function jr(e){let t=new Set(e);if(t.size===0)return;let n=Cr(),r=n.themes.filter(e=>!t.has(e.id));r.length!==n.themes.length&&xr(n.storedThemes.filter(e=>!V(e)||typeof e.id!=`string`||!t.has(e.id)),r)}function Mr(e){if(!V(e))throw Error(`Theme colors must be objects.`);let t={};for(let[n,r]of Object.entries(e)){if(!un.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 Nr(e){if(!V(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(!xn(t))throw Error(`Theme files need a name (48 characters or fewer).`);if(!vn(n))throw Error(`Theme files need an appearance of "light" or "dark".`);if(!V(r))throw Error(`Theme files need a colors object.`);let i=e.id===void 0?yr(t):e.id;if(!bn(i))throw Error(`Theme ids may only contain lowercase letters, numbers, and hyphens.`);if(R.has(i))throw Error(`The theme id "${i}" is reserved.`);let a=Mr(r),o=Sn(e.collection);if(e.collection!==void 0&&!o)throw Error(`Theme collections need a valid id and label.`);let s=fr(n),c={};if(e.variants!==void 0){if(!V(e.variants))throw Error(`Theme variants must be an object.`);for(let[t,r]of Object.entries(e.variants)){if(!vn(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]={...fr(t),...Mr(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 Pr(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 Fr={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 Ir(e){return Fr[e]}var Lr=`__preview`;function Rr(e,t){if(typeof document>`u`)return;let n=document.documentElement;if(n?.style){_n(!1),n.dataset.themeId=Lr,n.classList.toggle(`dark`,t===`dark`);for(let[t,r]of Object.entries(e))yn(r)&&n.style.setProperty(Fr[t],r)}}function zr(e,t){if(typeof document>`u`)return;let n=document.documentElement;if(!n?.style)return;_n(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(Fr[t],r);return}delete n.dataset.themeId;for(let e of Object.values(Fr))n.style.removeProperty(e)}function Br(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 vr(e)??`light`}function Vr(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 vr(e)??`system`}function Hr(e){return e===`light`||e===`dark`||e===`system`||Q(e)!==null}function Ur(e){if(!e)return null;try{let t=JSON.parse(e);if(!V(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 Wr(e,t,n){return t?.[n]??e}export{Xt as $,jr as A,hr as B,Hr as C,Nr as D,Cn as E,Pr as F,an as G,yr as H,Fn as I,rn as J,nn as K,gr as L,Vr as M,Br as N,Ur as O,Wr as P,Zt as Q,Rn as R,jn as S,yn as T,Or as U,Yn as V,pr as W,$t as X,tn as Y,Qt as Z,Q as _,Lr as a,hn as b,zr as c,fr as d,Pn as f,$ as g,Ir as h,cn as i,kr as j,Ar as k,sr as l,Ln as m,sn as n,ln as o,zn as p,en as q,on as r,Rr as s,z as t,Nn as u,_r as v,In as w,Dr as x,vr as y,gn as z};
5
- //# sourceMappingURL=themePalette-B0pJNxta.js.map
5
+ //# sourceMappingURL=themePalette-tRVivgCl.js.map
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-oBChb5qS.js";import{$ as i,J as a,a as o,b as s,et as c,nt as l,o as u,x as d}from"./chunk-DU6HZSFF-CxJhFL2x.js";import{t as f}from"./arc-DgcGdgmL.js";import{p}from"./chunk-75Z2AOVW-ByoE3ygp.js";import{f as m}from"./mermaid.core-BfgiEgiv.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s]}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-oBChb5qS.js";import{$ as i,J as a,a as o,b as s,et as c,nt as l,o as u,x as d}from"./chunk-DU6HZSFF-DcvsSVYK.js";import{t as f}from"./arc-DgcGdgmL.js";import{p}from"./chunk-75Z2AOVW-BLOF0vWA.js";import{f as m}from"./mermaid.core-C2amTgJW.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s]}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -118,4 +118,4 @@ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on l
118
118
  filter: brightness(120%);
119
119
  }
120
120
  `},`getStyles`)};export{Se as diagram};
121
- //# sourceMappingURL=timeline-definition-24CTP7MA-DCGMxN2J.js.map
121
+ //# sourceMappingURL=timeline-definition-24CTP7MA-DJ6DOYfi.js.map
@@ -1,2 +1,2 @@
1
- import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{r as n}from"./Icon-l19w4AjM.js";import{Aa as r,Ad as i,Ao as a,BE as o,Ba as s,Bi as c,D as l,Do as u,Ea as d,Eo as f,Fr as p,Gy as m,Ha as h,Ip as g,Jm as _,Ju as v,La as y,Ld as b,Mr as x,Od as S,Om as C,Oy as w,Pu as T,Rf as E,Sa as D,Si as O,So as k,Ua as ee,Ui as A,Vy as j,Wi as M,Xs as N,_a as P,aa as F,ba as te,bt as ne,ca as re,da as ie,dr as ae,fa as I,jm as oe,ki as L,ko as se,kr as ce,lb as R,li as z,lr as B,lu as le,mE as ue,na as de,pa as V,ra as fe,sa as H,t as U,ua as pe,ul as me,va as he,xo as ge,za as _e}from"./utils-CyMIjIQl.js";import{jn as ve}from"./runtime-BD3Q-gPo.js";import{S as ye,d as be,f as xe,l as W,m as Se,u as Ce}from"./TooltipViewport-DdG9rZd5.js";import{t as we}from"./spinner-DU7w6Tl0.js";import{t as Te}from"./useParams-BmGuCYQD.js";var Ee=R(me),De=R(le);function Oe(e){return De(e)&&(e.reason===`thread_not_empty`||e.reason===`thread_not_side_chat`)}function ke(e){return Ee(e)&&e.bootstrapThreadDisposition===`deleted`}function Ae(e){return Ee(e)&&e.bootstrapThreadDisposition===`not-created`}var je=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the P4 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(ve)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function Me(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&je.some(e=>e.test(t))}function Ne(e){return Me(e)?null:e??null}var G=e(n()),Pe=G.createContext(void 0);function Fe(){let e=G.useContext(Pe);if(!e)throw Error(a(73));return e}var Ie=0;function Le(e){return Ie+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ie}`}function Re(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function ze(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var Be=e=>e.toastMetadata,K={toasts:L(e=>e.toasts),isEmpty:L(e=>e.toasts.length===0),toast:L(Be,(e,t)=>e.get(t)?.value),toastIndex:L(Be,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:L(Be,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:L(Be,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:L(e=>e.hovering),focused:L(e=>e.focused),expanded:L(e=>e.hovering||e.focused),expandedOrOutOfFocus:L(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:L(e=>e.prevFocusElement)},Ve=class extends O{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:ze(e.toasts)},{},K)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=K.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||Le(`toast`);if(e.id){let t=K.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=K.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=K.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:ze(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Re(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Re(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Re(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=P.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=V(e);I(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!K.expandedOrOutOfFocus(this.state),a=i?P.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:ze(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=ie(F(this.state.viewport));if(!this.state.viewport||!I(this.state.viewport,t)||!pe(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=K.toasts(this.state),r=K.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},q=e(ue()),He=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=se(()=>new Ve({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return d(a.disposeEffect),G.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),a.useSyncedValues({timeout:n,limit:r}),(0,q.jsx)(Pe.Provider,{value:a,children:t})},Ue=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),We=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Fe(),c=he(),l=G.useRef(!1),u=G.useRef(!1),d=G.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),g=s.useState(`expanded`),_=s.useState(`prevFocusElement`),v=p[0]?.height??0,y=G.useMemo(()=>p.some(e=>e.transitionStatus===`ending`),[p]),b=G.useMemo(()=>p.filter(e=>e.priority===`high`),[p]);G.useEffect(()=>{let e=s.state.viewport;if(!e)return;function t(t){f||t.key===`F6`&&V(t)!==e&&(t.preventDefault(),s.setPrevFocusElement(ie(F(e))),e?.focus({preventScroll:!0}),s.pauseTimers(),s.setFocused(!0))}let n=h(e);return re(n,`keydown`,t)},[s,f]),G.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=h(e);function n(e){V(e)===t&&(s.setIsWindowFocused(!1),s.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=V(n),i=ie(F(e));(r===t||!I(e,r)||!pe(i))&&s.resumeTimers(),c.start(0,()=>s.setIsWindowFocused(!0))}return H(re(t,`blur`,n,!0),re(t,`focus`,r,!0))},[s,c,f]),G.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=F(e);return re(t,`pointerdown`,s.handleDocumentPointerDown,!0)},[f,s]);function x(e){let t=s.state.viewport;t&&(l.current=!0,e.relatedTarget===t?p[0]?.ref?.current?.focus():s.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&V(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement(),s.resumeTimers())}function C(){let e=s.state.toasts.some(e=>e.transitionStatus===`ending`);s.state.isWindowFocused&&!e&&!d.current&&u.current&&(s.resumeTimers(),s.setHovering(!1),u.current=!1)}G.useEffect(C,[y,s]);function w(){s.pauseTimers(),s.setHovering(!0),u.current=!1}function T(){y||d.current?u.current=!0:(s.resumeTimers(),s.setHovering(!1))}function E(e){e.pointerType===`touch`&&(d.current=!0)}function D(e){e.pointerType===`touch`&&(d.current=!1,C())}function O(){if(l.current){l.current=!1;return}m||pe(ie(F(s.state.viewport)))&&(s.setFocused(!0),s.pauseTimers())}function ee(e){m&&!I(s.state.viewport,e.relatedTarget)&&(s.setFocused(!1),s.resumeTimers())}let A={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:T,onFocus:O,onBlur:ee,onKeyDown:S,onClick:O,onPointerDown:E,onPointerUp:D,onPointerCancel:D},j={expanded:g},M=k(`div`,e,{ref:[t,s.setViewport],state:j,props:[A,{style:{[Ue.frontmostHeight]:v?`${v}px`:void 0}},o,{children:(0,q.jsxs)(G.Fragment,{children:[!f&&_&&(0,q.jsx)(de,{onFocus:x}),a,!f&&_&&(0,q.jsx)(de,{onFocus:x})]})}]});return(0,q.jsxs)(G.Fragment,{children:[!f&&_&&(0,q.jsx)(de,{onFocus:x}),M,!m&&b.length>0&&(0,q.jsx)(`div`,{style:fe,children:b.map(e=>(0,q.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,q.jsx)(`div`,{children:e.title}),(0,q.jsx)(`div`,{children:e.description})]},e.id))})]})}),Ge=e(D()),Ke=G.createContext(void 0);function qe(){let e=G.useContext(Ke);if(!e)throw Error(a(66));return e}var J=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function Je(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Ye(e){let t=h(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var Xe={...ge,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Ze=40,Qe=10,Y=.5,$e=1,et=`${c},${A}`,tt=G.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...c}=e,l=n.positionerProps?.anchor!==void 0,u=[];l||(u=Array.isArray(a)?a:[a]);let d=u.length>0,f=Fe(),[m,h]=G.useState(void 0),[g,_]=G.useState(!1),[v,y]=G.useState(!1),[b,x]=G.useState(!1),[S,C]=G.useState({x:0,y:0}),[w,T]=G.useState({x:0,y:0,scale:1}),[E,D]=G.useState(),[O,ee]=G.useState(),[A,j]=G.useState(null),M=G.useRef(null),N=G.useRef({x:0,y:0}),P=G.useRef({x:0,y:0,scale:1}),ne=G.useRef(void 0),ae=G.useRef(0),oe=G.useRef(!1),L=G.useRef({x:0,y:0}),se=G.useRef(!1),ce=G.useRef({x:0,y:0}),R=G.useRef(null),z=G.useRef(null),B=f.useState(`toastIndex`,n.id),le=f.useState(`toastVisibleIndex`,n.id),ue=f.useState(`toastOffsetY`,n.id),de=f.useState(`focused`),fe=f.useState(`expanded`);te({open:n.transitionStatus!==`ending`,ref:M,onComplete(){n.transitionStatus===`ending`&&f.removeToast(n.id)}});let H=s((e=!1)=>{let t=M.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){f.updateToastInternal(n.id,{ref:M,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?Ge.flushSync(a):a()});_e(H,[H]);function U(e){ce.current=e,C(e)}_e(()=>()=>{z.current?.abort()},[]);function pe(e,t){let n=e,r=t;return!u.includes(`left`)&&!u.includes(`right`)?n=e>0?e**Y:-(Math.abs(e)**Y):(!u.includes(`right`)&&e>0&&(n=e**Y),!u.includes(`left`)&&e<0&&(n=-(Math.abs(e)**Y))),!u.includes(`up`)&&!u.includes(`down`)?r=t>0?t**Y:-(Math.abs(t)**Y):(!u.includes(`down`)&&t>0&&(r=t**Y),!u.includes(`up`)&&t<0&&(r=-(Math.abs(t)**Y))),{x:n,y:r}}let me=s(e=>{if(e.pointerId!==R.current)return;R.current=null,z.current?.abort(),z.current=null,_(!1),y(!1),j(null);let t=P.current;if(e.type===`pointercancel`||oe.current){U({x:t.x,y:t.y}),h(void 0);return}let r=!1,i=ce.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of u){switch(e){case`right`:a>Ze&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>Ze&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(h(s),x(!0),f.closeToast(n.id)):(U({x:t.x,y:t.y}),h(void 0))});function he(e){if(e.button!==0)return;e.pointerType===`touch`&&f.pauseTimers();let t=V(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${et}`))return;if(oe.current=!1,ne.current=void 0,ae.current=0,R.current=e.pointerId,N.current={x:e.clientX,y:e.clientY},L.current=N.current,M.current){let e=Ye(M.current);P.current=e,T(e),U({x:e.x,y:e.y})}f.setHovering(!0),_(!0),y(!1),j(null),se.current=!0;let n=M.current;if(n){z.current?.abort();let t=new AbortController;z.current=t;let r=F(n);r.addEventListener(`pointerup`,me,{signal:t.signal}),r.addEventListener(`pointercancel`,me,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function ge(e){if(e.pointerId!==R.current)return;e.preventDefault(),se.current&&=(N.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>L.current.y||i>0&&t<L.current.y)&&(L.current={x:L.current.x,y:t}),(r<0&&n>L.current.x||r>0&&n<L.current.x)&&(L.current={x:n,y:L.current.y});let a=n-N.current.x,o=t-N.current.y,s=t-L.current.y,c=n-L.current.x;if(!v&&Math.sqrt(a*a+o*o)>=$e&&(y(!0),A===null)){let e=u.includes(`left`)||u.includes(`right`),t=u.includes(`up`)||u.includes(`down`);e&&t&&j(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let l;if(!ne.current)A===`vertical`?o>0?l=`down`:o<0&&(l=`up`):A===`horizontal`?a>0?l=`right`:a<0&&(l=`left`):l=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,l&&u.includes(l)&&(ne.current=l,ae.current=Je(l,a,o),h(l));else{let e=ne.current,t=Je(e,c,s);t>Ze?(oe.current=!1,h(e)):!(u.includes(`left`)&&u.includes(`right`))&&!(u.includes(`up`)&&u.includes(`down`))&&ae.current-t>=Qe&&(oe.current=!0)}let d=pe(a,o),f=P.current.x,p=P.current.y;A===`horizontal`?(u.includes(`left`)||u.includes(`right`))&&(f+=d.x):(A===`vertical`||(u.includes(`left`)||u.includes(`right`))&&(f+=d.x),(u.includes(`up`)||u.includes(`down`))&&(p+=d.y)),U({x:f,y:p})}function ve(e){if(e.key===`Escape`){if(!M.current||!I(M.current,ie(F(M.current))))return;f.closeToast(n.id)}}G.useEffect(()=>{if(!d)return;let e=M.current;if(!e)return;function t(t){I(e,V(t))&&t.preventDefault()}return re(e,`touchmove`,t,{passive:!1})},[d]);function ye(){if(!g&&S.x===w.x&&S.y===w.y&&!b)return{[J.swipeMovementX]:`0px`,[J.swipeMovementY]:`0px`};let e=S.x-w.x,t=S.y-w.y;return{transition:g?`none`:void 0,transform:g?`translateX(${S.x}px) translateY(${S.y}px) scale(${w.scale})`:void 0,[J.swipeMovementX]:`${e}px`,[J.swipeMovementY]:`${t}px`}}let be=n.priority===`high`,xe={role:be?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":E,"aria-describedby":O,"aria-hidden":be&&!de?!0:void 0,onPointerDown:d?he:void 0,onPointerMove:d?ge:void 0,onPointerUp:d?me:void 0,onPointerCancel:d?me:void 0,onKeyDown:ve,inert:p(n.limited),style:{...ye(),[J.index]:n.transitionStatus===`ending`?B:le,[J.offsetY]:`${ue}px`,[J.height]:n.height?`${n.height}px`:void 0}},W=G.useMemo(()=>({rootRef:M,toast:n,titleId:E,setTitleId:D,descriptionId:O,setDescriptionId:ee,swiping:g,swipeDirection:m,recalculateHeight:H,index:B,visibleIndex:le,expanded:fe}),[n,E,O,g,m,H,B,le,fe]),Se={transitionStatus:n.transitionStatus,expanded:fe,limited:n.limited||!1,type:n.type,swiping:W.swiping,swipeDirection:W.swipeDirection},Ce=k(`div`,e,{ref:[t,W.rootRef],state:Se,stateAttributesMapping:Xe,props:[xe,c]});return(0,q.jsx)(Ke.Provider,{value:W,children:Ce})}),nt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=qe(),l=G.useRef(null);return _e(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),k(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),rt=G.forwardRef(function(e,t){let{render:n,className:i,style:a,id:o,children:s,...c}=e,{toast:l,setDescriptionId:u}=qe(),d=s??l.description,f=!!d,p=r(o);_e(()=>{if(f)return u(p),()=>{u(void 0)}},[f,p,u]);let m={type:l.type},h=k(`p`,e,{ref:t,state:m,props:{...c,id:p,children:d}});return f?h:null}),it=G.forwardRef(function(e,t){let{render:n,className:i,style:a,id:o,children:s,...c}=e,{toast:l,setTitleId:u}=qe(),d=s??l.title,f=!!d,p=r(o);_e(()=>{if(f)return u(p),()=>{u(void 0)}},[f,p,u]);let m={type:l.type},h=k(`h2`,e,{ref:t,state:m,props:{...c,id:p,children:d}});return f?h:null}),at=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Fe(),{toast:l}=qe(),u=c.useState(`expanded`),[d,f]=G.useState(!1),{getButtonProps:p,buttonRef:m}=y({disabled:a,native:o}),h={type:l.type};return k(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),ot=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=qe(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=y({disabled:a,native:o}),p={type:c.type},m=k(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),st=Ce,ct=G.createContext(void 0);function lt(){let e=G.useContext(ct);if(e===void 0)throw Error(a(84));return e}var ut=G.forwardRef(function(e,t){let{toast:n,...r}=e,i=Fe(),a=n.positionerProps??f,{render:o,className:s,anchor:c=a.anchor,positionMethod:l=a.positionMethod??`absolute`,side:d=a.side??`top`,align:p=a.align??`center`,sideOffset:m=a.sideOffset??0,alignOffset:h=a.alignOffset??0,collisionBoundary:g=a.collisionBoundary??`clipping-ancestors`,collisionPadding:_=a.collisionPadding??5,arrowPadding:v=a.arrowPadding??5,sticky:y=a.sticky??!1,disableAnchorTracking:b=a.disableAnchorTracking??!1,collisionAvoidance:S=a.collisionAvoidance??M,style:C,...w}=r,[T,E]=G.useState(null),D=i.useState(`toastIndex`,n.id),O=i.useState(`toastVisibleIndex`,n.id),k=ee(c)?c:null,A=z({open:!0,onOpenChange:u,elements:{floating:T,reference:k}}),j=x({anchor:k,positionMethod:l,floatingRootContext:A,mounted:!0,side:d,sideOffset:m,align:p,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:S}),N=G.useMemo(()=>({side:j.side,align:j.align,anchorHidden:j.anchorHidden}),[j.side,j.align,j.anchorHidden]),P=ce(e,N,{styles:{...j.positionerStyles,[J.index]:n.transitionStatus===`ending`?D:O},transitionStatus:n.transitionStatus,props:w,refs:[t,E]});return(0,q.jsx)(ct.Provider,{value:j,children:P})}),dt=G.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=lt();return k(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function ft(){let e=G.useContext(Pe);if(!e)throw Error(a(73));let t=e.useState(`toasts`);return G.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function pt(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Le(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var mt=t({Action:()=>ot,Arrow:()=>dt,Close:()=>at,Content:()=>nt,Description:()=>rt,Portal:()=>st,Positioner:()=>ut,Provider:()=>He,Root:()=>tt,Title:()=>it,Viewport:()=>We,createToastManager:()=>pt,useToastManager:()=>ft});function ht(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var X=ht(),Z=o(),gt={archive:v,clock:b,pin:g,trash:C};function _t(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,G.useEffect)(vt,t),null}function vt(){let e=!0,t=new Set,n=()=>{let n=X.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),Q.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?gt[r.icon]:null,i=r.actions??[],a=i.find(bt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{X.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&X.getSnapshot().includes(r)&&X.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,q.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},hideCopyButton:!0}};t.has(r.id)?Q.update(`shared:${r.id}`,s):(t.add(r.id),Q.add({...s,id:`shared:${r.id}`}))}},r=X.subscribe(n),i=yt;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),X.setPaused(`web-hidden`,!1);for(let e of t)Q.close(`shared:${e}`)}}function yt(){return X.setPaused(`web-hidden`,document.hidden)}function bt(e){return e.primary}var xt=class extends m()(`ClipboardApiUnavailableError`,{target:j}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},St=class extends m()(`ClipboardWriteError`,{target:j,cause:w()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},Ct=class extends m()(`ClipboardReadUnavailableError`,{target:j}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},wt=class extends m()(`ClipboardReadError`,{target:j,cause:w()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function Tt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function Et(e,t=`text`,n){if(typeof window>`u`)throw new xt({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[T];if(r&&(n={...n,"text/html":ne(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(Tt(e,n))return!0;throw new xt({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new St({target:t,cause:e})}}async function Dt(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new Ct({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new wt({target:e,cause:t})}}function Ot({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=G.useState(!1),s=G.useRef(null),c=G.useRef(n),l=G.useRef(r),u=G.useRef(t),d=G.useRef(e);c.current=n,l.current=r;let f=G.useRef(i);u.current=t,d.current=e,f.current=i;let p=G.useCallback((e,t)=>{Et(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return G.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function kt(e){return e===`live`}function At(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function jt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Mt(e){return{draftId:e}}function Nt(e){return!e.environmentId||!e.threadId?null:N(e.environmentId,e.threadId)}function Pt(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:N(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function Ft(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function It(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function Lt(e,t){return t<=1?!1:e>0}function Rt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=zt(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:zt(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function zt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function Bt(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var Q=pt(),Vt=pt(),$=new Map,Ht={error:S,info:E,loading:we,success:i,warning:oe},Ut=180;function Wt(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<Ut))return`line-clamp-4`}function Gt(e,t,n){n?.(),e.close(t)}function Kt(e){let t=(0,Z.c)(3),{onClick:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,q.jsx)(_,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,q.jsx)(B,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,"data-slot":`toast-close`,onClick:n,children:r}),t[1]=n,t[2]=i),i}function qt(e){let t=(0,Z.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=Ot(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=U(`size-3`,c),t[4]=c,t[5]=l);let u=a?be:ye,d;t[6]!==l||t[7]!==u?(d=(0,q.jsx)(W,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,q.jsx)(B,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var Jt=`mt-2 max-h-40 min-h-0 overflow-y-auto overscroll-contain pr-0.5 select-text`;function Yt(e){let t=(0,Z.c)(13),{children:n,labels:r}=e,[i,a]=(0,G.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Xt),t[0]=c):c=t[0];let l=i?Se:xe,u;t[1]===l?u=t[2]:(u=(0,q.jsx)(W,{className:`size-3.5 shrink-0 opacity-80`,icon:l,strokeWidth:2.25}),t[1]=l,t[2]=u);let d=i?s:o,f;t[3]!==i||t[4]!==u||t[5]!==d?(f=(0,q.jsxs)(`button`,{"aria-expanded":i,className:`inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,onClick:c,type:`button`,children:[u,d]}),t[3]=i,t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==i?(p=i?(0,q.jsx)(`div`,{className:Jt,children:n}):null,t[7]=n,t[8]=i,t[9]=p):p=t[9];let m;return t[10]!==f||t[11]!==p?(m=(0,q.jsxs)(`div`,{className:`min-w-0`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m}function Xt(e){return!e}function Zt(e){let t=(0,Z.c)(36),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]===n?.expandableLabels?o=t[1]:(o=n?.expandableLabels??{},t[0]=n?.expandableLabels,t[1]=o);let s=o,c=n?.expandableDescriptionTrigger??!1,l;t[2]!==r||t[3]!==i?(l=U(`min-w-0 select-text wrap-break-word text-muted-foreground`,Wt(i,r)),t[2]=r,t[3]=i,t[4]=l):l=t[4];let u=l,[d,f]=(0,G.useState)(!1);if(!a){let e;return t[5]===u?e=t[6]:(e=(0,q.jsx)(rt,{className:u,"data-slot":`toast-description`}),t[5]=u,t[6]=e),e}if(!c){let e;t[7]===u?e=t[8]:(e=(0,q.jsx)(rt,{className:u,"data-slot":`toast-description`}),t[7]=u,t[8]=e);let n;t[9]!==a||t[10]!==s?(n=(0,q.jsx)(Yt,{labels:s,children:a}),t[9]=a,t[10]=s,t[11]=n):n=t[11];let r;return t[12]!==e||t[13]!==n?(r=(0,q.jsxs)(q.Fragment,{children:[e,n]}),t[12]=e,t[13]=n,t[14]=r):r=t[14],r}let p=s.expand??`Show details`,m=s.collapse??`Hide details`,h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>f(Qt),t[15]=h):h=t[15];let g=h,_;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())},t[16]=_):_=t[16];let v=_,y=d?m:p,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=U(`group flex min-w-0 w-full cursor-pointer select-none items-start gap-1.5 rounded-sm text-left outline-none ring-offset-background`,`transition-colors hover:bg-muted/40`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`),t[17]=b):b=t[17];let x;t[18]!==r||t[19]!==i?(x=U(`min-w-0 select-none wrap-break-word text-muted-foreground`,Wt(i,r),`underline-offset-2 decoration-muted-foreground/60 group-hover:underline`),t[18]=r,t[19]=i,t[20]=x):x=t[20];let S;t[21]===x?S=t[22]:(S=(0,q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,q.jsx)(rt,{className:x,"data-slot":`toast-description`})}),t[21]=x,t[22]=S);let C=d?Se:xe,w;t[23]===C?w=t[24]:(w=(0,q.jsx)(W,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80`,icon:C,strokeWidth:2.25}),t[23]=C,t[24]=w);let T;t[25]!==d||t[26]!==w||t[27]!==y||t[28]!==S?(T=(0,q.jsxs)(`div`,{"aria-label":y,"aria-expanded":d,className:b,onClick:g,onKeyDown:v,role:`button`,tabIndex:0,children:[S,w]}),t[25]=d,t[26]=w,t[27]=y,t[28]=S,t[29]=T):T=t[29];let E;t[30]!==a||t[31]!==d?(E=d?(0,q.jsx)(`div`,{className:Jt,children:a}):null,t[30]=a,t[31]=d,t[32]=E):E=t[32];let D;return t[33]!==T||t[34]!==E?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35],D}function Qt(e){return!e}function $t(e){let t=e.type?Ht[e.type]:null,n=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,r=(e.data?.additionalActions?.length??0)>0,i=e.data?.secondaryActionProps!==void 0;return{Icon:t,copyErrorText:n,hasTrailingControls:n!==null||It(e.actionProps)||r||i}}function en(e){let t=(0,Z.c)(32),{Icon:n,copyErrorText:r,actionProps:i,hasTrailingControls:a,toastData:o,toastDescription:s,toastType:c}=e,l;t[0]===o?.additionalActions?l=t[1]:(l=o?.additionalActions??[],t[0]=o?.additionalActions,t[1]=l);let u=l,d=o?.secondaryActionProps,f=o?.leadingIcon,p;t[2]===d?p=t[3]:(p=d??{},t[2]=d,t[3]=p);let m,h;t[4]===p?(m=t[5],h=t[6]):({className:m,...h}=p,t[4]=p,t[5]=m,t[6]=h);let g;t[7]!==n||t[8]!==f?(g=f?(0,q.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:f}):n?(0,q.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,q.jsx)(n,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[7]=n,t[8]=f,t[9]=g):g=t[9];let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,q.jsx)(it,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[10]=_):_=t[10];let v;t[11]===g?v=t[12]:(v=(0,q.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[g,_]}),t[11]=g,t[12]=v);let y;t[13]!==o||t[14]!==s||t[15]!==c?(y=(0,q.jsx)(Zt,{toastData:o,toastDescription:s,toastType:c}),t[13]=o,t[14]=s,t[15]=c,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,q.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-0.5`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]!==i||t[21]!==u||t[22]!==r||t[23]!==a||t[24]!==m||t[25]!==d||t[26]!==h||t[27]!==o?.sharedToastId?(x=a?(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[r===null?null:(0,q.jsx)(qt,{text:r}),u.map(tn),d?(0,q.jsx)(B,{...h,className:m,size:`xs`,type:`button`,variant:o?.sharedToastId?`solid-neutral`:`soft`}):null,It(i)?(0,q.jsx)(ot,{className:U(ae({size:`xs`,variant:`solid-neutral`}),`shrink-0`),"data-slot":`toast-action`,children:i?.children}):null]}):null,t[20]=i,t[21]=u,t[22]=r,t[23]=a,t[24]=m,t[25]=d,t[26]=h,t[27]=o?.sharedToastId,t[28]=x):x=t[28];let S;return t[29]!==b||t[30]!==x?(S=(0,q.jsxs)(q.Fragment,{children:[b,x]}),t[29]=b,t[30]=x,t[31]=S):S=t[31],S}function tn(e){let{id:t,props:n}=e,{className:r,...i}=n;return(0,G.createElement)(B,{...i,className:r,key:t,size:`xs`,type:`button`,variant:`soft`})}function nn(){let e=(0,Z.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:rn},e[0]=t):t=e[0];let n=Te(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=l(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function rn(e){return Pt(e)}function an(e){let t=(0,Z.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=$.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,$.delete(n),Q.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),$.set(n,e))},l=()=>{if(!(a||t!==null)){if(e<=0){s();return}t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)}},u=()=>{if(document.visibilityState===`visible`&&document.hasFocus()){l();return}c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,G.useEffect)(i,a),null}function on(e){let t=(0,Z.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(_t,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,q.jsx)(sn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,q.jsxs)(He,{toastManager:Q,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function sn(e){let t=(0,Z.c)(19),{position:n}=e,{toasts:r}=ft(),i=nn(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>Bt(e.data,i),t[2]=i,t[3]=s);let c=Rt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(cn));for(let t of $.keys())e.has(t)||$.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,G.useEffect)(l,u);let d=mt,f=mt,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=U(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=Lt(r,c.items.length),s=$t(t);return(0,q.jsxs)(tt,{className:U(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(var(--toast-calc-offset-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&X.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&X.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&X.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&X.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,q.jsx)(an,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),(0,q.jsxs)(nt,{className:U(`pointer-events-auto flex min-h-0 items-center justify-between gap-2 overflow-y-visible py-3 pr-2 pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,q.jsx)(en,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),(0,q.jsx)(Kt,{onClick:()=>{let e=t.data?.sharedToastId;e?X.dismiss(e):Gt(Q,t.id,t.data?.onClose)}})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,q.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,q.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function cn(e){return e.id}function ln(e){let t=(0,Z.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(un,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,q.jsxs)(He,{toastManager:Vt,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function un(){let e=(0,Z.c)(7),{toasts:t}=ft(),n=nn(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>Bt(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(dn),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,q.jsx)(st,{"data-slot":`toast-portal-anchored`,children:(0,q.jsx)(We,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function dn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=$t(e);return n?.anchor?(0,q.jsx)(ut,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,q.jsx)(tt,{className:U(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,q.jsx)(nt,{className:`pointer-events-auto px-2 py-1`,children:(0,q.jsx)(it,{"data-slot":`toast-title`})}):(0,q.jsxs)(nt,{className:`pointer-events-auto flex min-h-0 items-center justify-between gap-1.5 overflow-y-visible py-3 pr-2 pl-3.5 text-sm [overflow-x:clip]`,children:[(0,q.jsx)(en,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type}),(0,q.jsx)(Kt,{onClick:()=>Gt(Vt,e.id,e.data?.onClose)})]})})},e.id):null}export{ke as _,Mt as a,Ft as c,Pt as d,Dt as f,Ne as g,X as h,Q as i,Nt as l,Et as m,on as n,jt as o,Ot as p,Vt as r,kt as s,ln as t,At as u,Ae as v,Oe as y};
2
- //# sourceMappingURL=toast-BDoYTcO9.js.map
1
+ import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{r as n}from"./Icon-l19w4AjM.js";import{Aa as r,Ad as i,Ao as a,BE as o,Ba as s,Bi as c,D as l,Do as u,Ea as d,Eo as f,Fr as p,Gy as m,Ha as h,Ip as g,Jm as _,Ju as v,La as y,Ld as b,Mr as x,Od as S,Om as C,Oy as w,Pu as T,Rf as E,Sa as D,Si as O,So as k,Ua as ee,Ui as A,Vy as j,Wi as M,Xs as N,_a as P,aa as F,ba as te,bt as ne,ca as re,da as ie,dr as ae,fa as I,jm as oe,ki as L,ko as se,kr as ce,lb as R,li as z,lr as B,lu as le,mE as ue,na as de,pa as V,ra as fe,sa as H,t as U,ua as pe,ul as me,va as he,xo as ge,za as _e}from"./utils-DPab5G1h.js";import{jn as ve}from"./runtime-BoS3svRr.js";import{S as ye,d as be,f as xe,l as W,m as Se,u as Ce}from"./TooltipViewport-8hYwjAeo.js";import{t as we}from"./spinner-FYgwMJ6T.js";import{t as Te}from"./useParams-Ck_hBeVd.js";var Ee=R(me),De=R(le);function Oe(e){return De(e)&&(e.reason===`thread_not_empty`||e.reason===`thread_not_side_chat`)}function ke(e){return Ee(e)&&e.bootstrapThreadDisposition===`deleted`}function Ae(e){return Ee(e)&&e.bootstrapThreadDisposition===`not-created`}var je=[/\bSocketCloseError\b/i,/\bSocketOpenError\b/i,/\bSocket is not connected\b/i,/Unable to connect to the P4 server WebSocket\./i,RegExp(`\\b(?:is not connected|disconnected|stopped responding|could not establish a WebSocket connection)\\.(?: ${(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`))(ve)})?$`,`i`),/\bClientProtocolError\b/i,/\bRpcClientError\b/i,/\bping timeout\b/i];function Me(e){if(typeof e!=`string`)return!1;let t=e.trim();return t.length!==0&&je.some(e=>e.test(t))}function Ne(e){return Me(e)?null:e??null}var G=e(n()),Pe=G.createContext(void 0);function Fe(){let e=G.useContext(Pe);if(!e)throw Error(a(73));return e}var Ie=0;function Le(e){return Ie+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${Ie}`}function Re(e,t){if(typeof e==`string`)return{description:e};if(typeof e==`function`){let n=e(t);return typeof n==`string`?{description:n}:n}return e}function ze(e){let t=new Map,n=0,r=0;return e.forEach((e,i)=>{let a=e.transitionStatus===`ending`;t.set(e.id,{value:e,domIndex:i,visibleIndex:a?-1:n,offsetY:r}),r+=e.height||0,a||(n+=1)}),t}var Be=e=>e.toastMetadata,K={toasts:L(e=>e.toasts),isEmpty:L(e=>e.toasts.length===0),toast:L(Be,(e,t)=>e.get(t)?.value),toastIndex:L(Be,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:L(Be,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:L(Be,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:L(e=>e.hovering),focused:L(e=>e.focused),expanded:L(e=>e.hovering||e.focused),expandedOrOutOfFocus:L(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:L(e=>e.prevFocusElement)},Ve=class extends O{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:ze(e.toasts)},{},K)}setFocused(e){this.set(`focused`,e)}setHovering(e){this.set(`hovering`,e)}setIsWindowFocused(e){this.set(`isWindowFocused`,e)}setPrevFocusElement(e){this.set(`prevFocusElement`,e)}setViewport=e=>{this.set(`viewport`,e)};disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t={}){let n=K.toastIndex(this.state,e);if(n===-1)return;let r=this.state.toasts[n];t.skipOnRemove||r?.onRemove?.();let i=[...this.state.toasts];i.splice(n,1),this.setToasts(i)}addToast=e=>{let{timeout:t,limit:n}=this.state,r=e.id||Le(`toast`);if(e.id){let t=K.toast(this.state,e.id);if(t){if(t.transitionStatus===`ending`)this.removeToast(e.id,{skipOnRemove:!0});else{let{id:t,transitionStatus:n,...r}=e;return this.updateToastInternal(e.id,r,{resetTimer:!0,markUpdated:!0}),e.id}}}let i={...e,id:r,updateKey:0,transitionStatus:`starting`},a=[i,...this.state.toasts],o=a.filter(e=>e.transitionStatus!==`ending`);if(o.length>n){let e=o.length-n,t=o.slice(-e),r=new Set(t.map(e=>e.id));this.setToasts(a.map(e=>{let t=r.has(e.id);return e.limited===t?e:{...e,limited:t}}))}else this.setToasts(a.map(e=>e.limited?{...e,limited:!1}:e));let s=i.timeout??t;return i.type!==`loading`&&s>0&&this.scheduleTimer(r,s,()=>this.closeToast(r)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),r};updateToast=(e,t)=>{this.updateToastInternal(e,t,{markUpdated:!0})};updateToastInternal=(e,t,n={})=>{let{timeout:r,toasts:i}=this.state,a=K.toast(this.state,e)??null;if(!a||a.transitionStatus===`ending`)return;let o={...a,...t,...n.markUpdated&&{updateKey:(a.updateKey??0)+1}};this.setToasts(i.map(t=>t.id===e?o:t));let s=o.timeout??r,c=a?.timeout??r,l=Object.hasOwn(t,`timeout`),u=o.transitionStatus!==`ending`&&o.type!==`loading`&&s>0,d=this.timers.has(e),f=c!==s,p=a?.type===`loading`;if(!u&&d){this.timers.get(e)?.timeout?.clear(),this.timers.delete(e);return}if(u&&(!d||f||l||p||n.resetTimer)){let t=this.timers.get(e);t&&(t.timeout?.clear(),this.timers.delete(e)),this.scheduleTimer(e,s,()=>this.closeToast(e)),K.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=e=>{let t=e===void 0,{limit:n,toasts:r}=this.state,i;if(t)i=r,this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear();else{let t=K.toast(this.state,e);if(!t)return;i=[t];let n=this.timers.get(e);n?.timeout&&(n.timeout.clear(),this.timers.delete(e))}let a=0,o=r.map(r=>{if(t||r.id===e)return{...r,transitionStatus:`ending`,height:0};if(r.transitionStatus===`ending`)return r;let i=a>=n;return a+=1,r.limited===i?r:{...r,limited:i}}),s={toasts:o,toastMetadata:ze(o)};(t||r.length===1)&&(s.hovering=!1,s.focused=!1),this.update(s),i.forEach(e=>{e.transitionStatus!==`ending`&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=Re(t.loading),r=this.addToast({...n,type:`loading`}),i=e.then(e=>{let n=Re(t.success,e);return this.updateToast(r,{...n,type:`success`,timeout:n.timeout}),e}).catch(e=>{let n=Re(t.error,e);return this.updateToast(r,{...n,type:`error`,timeout:n.timeout}),Promise.reject(e)});return{}.hasOwnProperty.call(t,`setPromise`)&&t.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{if(e.timeout){e.timeout.clear();let t=Date.now()-e.start,n=e.delay-t;e.remaining=n>0?n:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=P.create(),e.timeout.start(e.remaining,()=>{this.timers.delete(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if(e.pointerType!==`touch`)return;let t=V(e);I(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let r=Date.now(),i=!K.expandedOrOutOfFocus(this.state),a=i?P.create():void 0;a?.start(t,()=>{this.timers.delete(e),n()}),this.timers.set(e,{timeout:a,start:i?r:0,delay:t,remaining:t,callback:n})}setToasts(e){let t={toasts:e,toastMetadata:ze(e)};e.length===0&&(t.hovering=!1,t.focused=!1),this.update(t)}handleFocusManagement(e){let t=ie(F(this.state.viewport));if(!this.state.viewport||!I(this.state.viewport,t)||!pe(t))return;if(e===void 0){this.restoreFocusToPrevElement();return}let n=K.toasts(this.state),r=K.toastIndex(this.state,e),i=null,a=r+1;for(;a<n.length;){if(n[a].transitionStatus!==`ending`){i=n[a];break}a+=1}if(!i)for(a=r-1;a>=0;){if(n[a].transitionStatus!==`ending`){i=n[a];break}--a}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}},q=e(ue()),He=function(e){let{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,a=se(()=>new Ve({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return d(a.disposeEffect),G.useEffect(function(){if(i)return i[` subscribe`](({action:e,options:t})=>{let n=t.id;e===`promise`&&t.promise?a.promiseToast(t.promise,t):e===`update`&&n?a.updateToast(n,t):e===`close`?a.closeToast(n):a.addToast(t)})},[a,i]),a.useSyncedValues({timeout:n,limit:r}),(0,q.jsx)(Pe.Provider,{value:a,children:t})},Ue=function(e){return e.frontmostHeight=`--toast-frontmost-height`,e}({}),We=G.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=Fe(),c=he(),l=G.useRef(!1),u=G.useRef(!1),d=G.useRef(!1),f=s.useState(`isEmpty`),p=s.useState(`toasts`),m=s.useState(`focused`),g=s.useState(`expanded`),_=s.useState(`prevFocusElement`),v=p[0]?.height??0,y=G.useMemo(()=>p.some(e=>e.transitionStatus===`ending`),[p]),b=G.useMemo(()=>p.filter(e=>e.priority===`high`),[p]);G.useEffect(()=>{let e=s.state.viewport;if(!e)return;function t(t){f||t.key===`F6`&&V(t)!==e&&(t.preventDefault(),s.setPrevFocusElement(ie(F(e))),e?.focus({preventScroll:!0}),s.pauseTimers(),s.setFocused(!0))}let n=h(e);return re(n,`keydown`,t)},[s,f]),G.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=h(e);function n(e){V(e)===t&&(s.setIsWindowFocused(!1),s.pauseTimers())}function r(n){if(n.relatedTarget)return;let r=V(n),i=ie(F(e));(r===t||!I(e,r)||!pe(i))&&s.resumeTimers(),c.start(0,()=>s.setIsWindowFocused(!0))}return H(re(t,`blur`,n,!0),re(t,`focus`,r,!0))},[s,c,f]),G.useEffect(()=>{let e=s.state.viewport;if(!e||f)return;let t=F(e);return re(t,`pointerdown`,s.handleDocumentPointerDown,!0)},[f,s]);function x(e){let t=s.state.viewport;t&&(l.current=!0,e.relatedTarget===t?p[0]?.ref?.current?.focus():s.restoreFocusToPrevElement())}function S(e){e.key===`Tab`&&e.shiftKey&&V(e.nativeEvent)===s.state.viewport&&(e.preventDefault(),s.restoreFocusToPrevElement(),s.resumeTimers())}function C(){let e=s.state.toasts.some(e=>e.transitionStatus===`ending`);s.state.isWindowFocused&&!e&&!d.current&&u.current&&(s.resumeTimers(),s.setHovering(!1),u.current=!1)}G.useEffect(C,[y,s]);function w(){s.pauseTimers(),s.setHovering(!0),u.current=!1}function T(){y||d.current?u.current=!0:(s.resumeTimers(),s.setHovering(!1))}function E(e){e.pointerType===`touch`&&(d.current=!0)}function D(e){e.pointerType===`touch`&&(d.current=!1,C())}function O(){if(l.current){l.current=!1;return}m||pe(ie(F(s.state.viewport)))&&(s.setFocused(!0),s.pauseTimers())}function ee(e){m&&!I(s.state.viewport,e.relatedTarget)&&(s.setFocused(!1),s.resumeTimers())}let A={tabIndex:-1,role:`region`,"aria-live":`polite`,"aria-atomic":!1,"aria-relevant":`additions text`,"aria-label":`Notifications`,onMouseEnter:w,onMouseMove:w,onMouseLeave:T,onFocus:O,onBlur:ee,onKeyDown:S,onClick:O,onPointerDown:E,onPointerUp:D,onPointerCancel:D},j={expanded:g},M=k(`div`,e,{ref:[t,s.setViewport],state:j,props:[A,{style:{[Ue.frontmostHeight]:v?`${v}px`:void 0}},o,{children:(0,q.jsxs)(G.Fragment,{children:[!f&&_&&(0,q.jsx)(de,{onFocus:x}),a,!f&&_&&(0,q.jsx)(de,{onFocus:x})]})}]});return(0,q.jsxs)(G.Fragment,{children:[!f&&_&&(0,q.jsx)(de,{onFocus:x}),M,!m&&b.length>0&&(0,q.jsx)(`div`,{style:fe,children:b.map(e=>(0,q.jsxs)(`div`,{role:`alert`,"aria-atomic":!0,children:[(0,q.jsx)(`div`,{children:e.title}),(0,q.jsx)(`div`,{children:e.description})]},e.id))})]})}),Ge=e(D()),Ke=G.createContext(void 0);function qe(){let e=G.useContext(Ke);if(!e)throw Error(a(66));return e}var J=function(e){return e.index=`--toast-index`,e.offsetY=`--toast-offset-y`,e.height=`--toast-height`,e.swipeMovementX=`--toast-swipe-movement-x`,e.swipeMovementY=`--toast-swipe-movement-y`,e}({});function Je(e,t,n){switch(e){case`up`:return-n;case`down`:return n;case`left`:return-t;case`right`:return t;default:return 0}}function Ye(e){let t=h(e).getComputedStyle(e).transform,n=0,r=0,i=1;if(t&&t!==`none`){let e=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(n=t[4],r=t[5],i=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(n=t[12],r=t[13],i=t[0])}}return{x:n,y:r,scale:i}}var Xe={...ge,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Ze=40,Qe=10,Y=.5,$e=1,et=`${c},${A}`,tt=G.forwardRef(function(e,t){let{toast:n,render:r,className:i,swipeDirection:a=[`down`,`right`],style:o,...c}=e,l=n.positionerProps?.anchor!==void 0,u=[];l||(u=Array.isArray(a)?a:[a]);let d=u.length>0,f=Fe(),[m,h]=G.useState(void 0),[g,_]=G.useState(!1),[v,y]=G.useState(!1),[b,x]=G.useState(!1),[S,C]=G.useState({x:0,y:0}),[w,T]=G.useState({x:0,y:0,scale:1}),[E,D]=G.useState(),[O,ee]=G.useState(),[A,j]=G.useState(null),M=G.useRef(null),N=G.useRef({x:0,y:0}),P=G.useRef({x:0,y:0,scale:1}),ne=G.useRef(void 0),ae=G.useRef(0),oe=G.useRef(!1),L=G.useRef({x:0,y:0}),se=G.useRef(!1),ce=G.useRef({x:0,y:0}),R=G.useRef(null),z=G.useRef(null),B=f.useState(`toastIndex`,n.id),le=f.useState(`toastVisibleIndex`,n.id),ue=f.useState(`toastOffsetY`,n.id),de=f.useState(`focused`),fe=f.useState(`expanded`);te({open:n.transitionStatus!==`ending`,ref:M,onComplete(){n.transitionStatus===`ending`&&f.removeToast(n.id)}});let H=s((e=!1)=>{let t=M.current;if(!t)return;let r=t.style.height;t.style.height=`auto`;let i=t.offsetHeight;t.style.height=r;function a(){f.updateToastInternal(n.id,{ref:M,height:i,...n.transitionStatus===`starting`?{transitionStatus:void 0}:{}})}e?Ge.flushSync(a):a()});_e(H,[H]);function U(e){ce.current=e,C(e)}_e(()=>()=>{z.current?.abort()},[]);function pe(e,t){let n=e,r=t;return!u.includes(`left`)&&!u.includes(`right`)?n=e>0?e**Y:-(Math.abs(e)**Y):(!u.includes(`right`)&&e>0&&(n=e**Y),!u.includes(`left`)&&e<0&&(n=-(Math.abs(e)**Y))),!u.includes(`up`)&&!u.includes(`down`)?r=t>0?t**Y:-(Math.abs(t)**Y):(!u.includes(`down`)&&t>0&&(r=t**Y),!u.includes(`up`)&&t<0&&(r=-(Math.abs(t)**Y))),{x:n,y:r}}let me=s(e=>{if(e.pointerId!==R.current)return;R.current=null,z.current?.abort(),z.current=null,_(!1),y(!1),j(null);let t=P.current;if(e.type===`pointercancel`||oe.current){U({x:t.x,y:t.y}),h(void 0);return}let r=!1,i=ce.current,a=i.x-t.x,o=i.y-t.y,s;for(let e of u){switch(e){case`right`:a>Ze&&(r=!0,s=`right`);break;case`left`:a<-40&&(r=!0,s=`left`);break;case`down`:o>Ze&&(r=!0,s=`down`);break;case`up`:o<-40&&(r=!0,s=`up`)}if(r)break}r?(h(s),x(!0),f.closeToast(n.id)):(U({x:t.x,y:t.y}),h(void 0))});function he(e){if(e.button!==0)return;e.pointerType===`touch`&&f.pauseTimers();let t=V(e.nativeEvent);if(t&&t.closest(`button,a,input,textarea,[role="button"],${et}`))return;if(oe.current=!1,ne.current=void 0,ae.current=0,R.current=e.pointerId,N.current={x:e.clientX,y:e.clientY},L.current=N.current,M.current){let e=Ye(M.current);P.current=e,T(e),U({x:e.x,y:e.y})}f.setHovering(!0),_(!0),y(!1),j(null),se.current=!0;let n=M.current;if(n){z.current?.abort();let t=new AbortController;z.current=t;let r=F(n);r.addEventListener(`pointerup`,me,{signal:t.signal}),r.addEventListener(`pointercancel`,me,{signal:t.signal}),n.setPointerCapture?.(e.pointerId)}}function ge(e){if(e.pointerId!==R.current)return;e.preventDefault(),se.current&&=(N.current={x:e.clientX,y:e.clientY},!1);let{clientY:t,clientX:n,movementX:r,movementY:i}=e;(i<0&&t>L.current.y||i>0&&t<L.current.y)&&(L.current={x:L.current.x,y:t}),(r<0&&n>L.current.x||r>0&&n<L.current.x)&&(L.current={x:n,y:L.current.y});let a=n-N.current.x,o=t-N.current.y,s=t-L.current.y,c=n-L.current.x;if(!v&&Math.sqrt(a*a+o*o)>=$e&&(y(!0),A===null)){let e=u.includes(`left`)||u.includes(`right`),t=u.includes(`up`)||u.includes(`down`);e&&t&&j(Math.abs(a)>Math.abs(o)?`horizontal`:`vertical`)}let l;if(!ne.current)A===`vertical`?o>0?l=`down`:o<0&&(l=`up`):A===`horizontal`?a>0?l=`right`:a<0&&(l=`left`):l=Math.abs(a)>=Math.abs(o)?a>0?`right`:`left`:o>0?`down`:`up`,l&&u.includes(l)&&(ne.current=l,ae.current=Je(l,a,o),h(l));else{let e=ne.current,t=Je(e,c,s);t>Ze?(oe.current=!1,h(e)):!(u.includes(`left`)&&u.includes(`right`))&&!(u.includes(`up`)&&u.includes(`down`))&&ae.current-t>=Qe&&(oe.current=!0)}let d=pe(a,o),f=P.current.x,p=P.current.y;A===`horizontal`?(u.includes(`left`)||u.includes(`right`))&&(f+=d.x):(A===`vertical`||(u.includes(`left`)||u.includes(`right`))&&(f+=d.x),(u.includes(`up`)||u.includes(`down`))&&(p+=d.y)),U({x:f,y:p})}function ve(e){if(e.key===`Escape`){if(!M.current||!I(M.current,ie(F(M.current))))return;f.closeToast(n.id)}}G.useEffect(()=>{if(!d)return;let e=M.current;if(!e)return;function t(t){I(e,V(t))&&t.preventDefault()}return re(e,`touchmove`,t,{passive:!1})},[d]);function ye(){if(!g&&S.x===w.x&&S.y===w.y&&!b)return{[J.swipeMovementX]:`0px`,[J.swipeMovementY]:`0px`};let e=S.x-w.x,t=S.y-w.y;return{transition:g?`none`:void 0,transform:g?`translateX(${S.x}px) translateY(${S.y}px) scale(${w.scale})`:void 0,[J.swipeMovementX]:`${e}px`,[J.swipeMovementY]:`${t}px`}}let be=n.priority===`high`,xe={role:be?`alertdialog`:`dialog`,tabIndex:0,"aria-modal":!1,"aria-labelledby":E,"aria-describedby":O,"aria-hidden":be&&!de?!0:void 0,onPointerDown:d?he:void 0,onPointerMove:d?ge:void 0,onPointerUp:d?me:void 0,onPointerCancel:d?me:void 0,onKeyDown:ve,inert:p(n.limited),style:{...ye(),[J.index]:n.transitionStatus===`ending`?B:le,[J.offsetY]:`${ue}px`,[J.height]:n.height?`${n.height}px`:void 0}},W=G.useMemo(()=>({rootRef:M,toast:n,titleId:E,setTitleId:D,descriptionId:O,setDescriptionId:ee,swiping:g,swipeDirection:m,recalculateHeight:H,index:B,visibleIndex:le,expanded:fe}),[n,E,O,g,m,H,B,le,fe]),Se={transitionStatus:n.transitionStatus,expanded:fe,limited:n.limited||!1,type:n.type,swiping:W.swiping,swipeDirection:W.swipeDirection},Ce=k(`div`,e,{ref:[t,W.rootRef],state:Se,stateAttributesMapping:Xe,props:[xe,c]});return(0,q.jsx)(Ke.Provider,{value:W,children:Ce})}),nt=G.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{visibleIndex:o,expanded:s,recalculateHeight:c}=qe(),l=G.useRef(null);return _e(()=>{let e=l.current;if(!e||(c(),typeof ResizeObserver!=`function`||typeof MutationObserver!=`function`))return;let t=new ResizeObserver(()=>c(!0)),n=new MutationObserver(()=>c(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[c]),k(`div`,e,{ref:[t,l],state:{expanded:s,behind:o>0},props:a})}),rt=G.forwardRef(function(e,t){let{render:n,className:i,style:a,id:o,children:s,...c}=e,{toast:l,setDescriptionId:u}=qe(),d=s??l.description,f=!!d,p=r(o);_e(()=>{if(f)return u(p),()=>{u(void 0)}},[f,p,u]);let m={type:l.type},h=k(`p`,e,{ref:t,state:m,props:{...c,id:p,children:d}});return f?h:null}),it=G.forwardRef(function(e,t){let{render:n,className:i,style:a,id:o,children:s,...c}=e,{toast:l,setTitleId:u}=qe(),d=s??l.title,f=!!d,p=r(o);_e(()=>{if(f)return u(p),()=>{u(void 0)}},[f,p,u]);let m={type:l.type},h=k(`h2`,e,{ref:t,state:m,props:{...c,id:p,children:d}});return f?h:null}),at=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,c=Fe(),{toast:l}=qe(),u=c.useState(`expanded`),[d,f]=G.useState(!1),{getButtonProps:p,buttonRef:m}=y({disabled:a,native:o}),h={type:l.type};return k(`button`,e,{ref:[t,m],state:h,props:[{"aria-hidden":!u&&!d,onClick(){c.closeToast(l.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})}),ot=G.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a,nativeButton:o=!0,...s}=e,{toast:c}=qe(),l=c.actionProps?.children??s.children,u=!!l,{getButtonProps:d,buttonRef:f}=y({disabled:a,native:o}),p={type:c.type},m=k(`button`,e,{ref:[t,f],state:p,props:[s,c.actionProps,d,{children:l}]});return u?m:null}),st=Ce,ct=G.createContext(void 0);function lt(){let e=G.useContext(ct);if(e===void 0)throw Error(a(84));return e}var ut=G.forwardRef(function(e,t){let{toast:n,...r}=e,i=Fe(),a=n.positionerProps??f,{render:o,className:s,anchor:c=a.anchor,positionMethod:l=a.positionMethod??`absolute`,side:d=a.side??`top`,align:p=a.align??`center`,sideOffset:m=a.sideOffset??0,alignOffset:h=a.alignOffset??0,collisionBoundary:g=a.collisionBoundary??`clipping-ancestors`,collisionPadding:_=a.collisionPadding??5,arrowPadding:v=a.arrowPadding??5,sticky:y=a.sticky??!1,disableAnchorTracking:b=a.disableAnchorTracking??!1,collisionAvoidance:S=a.collisionAvoidance??M,style:C,...w}=r,[T,E]=G.useState(null),D=i.useState(`toastIndex`,n.id),O=i.useState(`toastVisibleIndex`,n.id),k=ee(c)?c:null,A=z({open:!0,onOpenChange:u,elements:{floating:T,reference:k}}),j=x({anchor:k,positionMethod:l,floatingRootContext:A,mounted:!0,side:d,sideOffset:m,align:p,alignOffset:h,collisionBoundary:g,collisionPadding:_,sticky:y,arrowPadding:v,disableAnchorTracking:b,keepMounted:!0,collisionAvoidance:S}),N=G.useMemo(()=>({side:j.side,align:j.align,anchorHidden:j.anchorHidden}),[j.side,j.align,j.anchorHidden]),P=ce(e,N,{styles:{...j.positionerStyles,[J.index]:n.transitionStatus===`ending`?D:O},transitionStatus:n.transitionStatus,props:w,refs:[t,E]});return(0,q.jsx)(ct.Provider,{value:j,children:P})}),dt=G.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,{arrowRef:o,side:s,align:c,arrowUncentered:l,arrowStyles:u}=lt();return k(`div`,e,{state:{side:s,align:c,uncentered:l},ref:[t,o],props:[{style:u,"aria-hidden":!0},a]})});function ft(){let e=G.useContext(Pe);if(!e)throw Error(a(73));let t=e.useState(`toasts`);return G.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}function pt(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||Le(`toast`);return t({action:`add`,options:{...e,id:n,transitionStatus:`starting`}}),n},close(e){t({action:`close`,options:{id:e}})},update(e,n){t({action:`update`,options:{...n,id:e}})},promise(e,n){let r=e;return t({action:`promise`,options:{...n,promise:e,setPromise(e){r=e}}}),r}}}var mt=t({Action:()=>ot,Arrow:()=>dt,Close:()=>at,Content:()=>nt,Description:()=>rt,Portal:()=>st,Positioner:()=>ut,Provider:()=>He,Root:()=>tt,Title:()=>it,Viewport:()=>We,createToastManager:()=>pt,useToastManager:()=>ft});function ht(){let e=[],t=0,n=new Set,r=new Map,i=new Map,a=new Map,o=new Map,s=new Set,c=()=>n.forEach(e=>e()),l=e=>{clearTimeout(r.get(e)),r.delete(e);let t=a.get(e);t!==void 0&&(i.set(e,Math.max(0,(i.get(e)??0)-(Date.now()-t))),a.delete(e))},u=t=>{let n=e.find(e=>e.id===t);n&&(l(t),i.delete(t),o.delete(t),e=e.filter(e=>e.id!==t),c(),n.onDismiss?.())},d=e=>{s.size||o.get(e)?.size||r.has(e)||!i.has(e)||(a.set(e,Date.now()),r.set(e,setTimeout(()=>u(e),i.get(e))))},f=n=>{let r=n.id??`notification-${++t}`;l(r);let a={...n,id:r};e=[...e.filter(e=>e.id!==r),a];let o=n.durationMs??8e3;return o>0?i.set(r,o):i.delete(r),d(r),c(),r},p=(e,t)=>{let n=o.get(e)??new Set;n.add(t),o.set(e,n),l(e)},m=(e,t)=>{o.get(e)?.delete(t),d(e)};return{show:f,dismiss:u,pause:p,resume:m,getSnapshot:()=>e,subscribe:e=>(n.add(e),()=>{n.delete(e)}),setPaused:(t,n)=>{n?s.add(t):s.delete(t);for(let t of e)s.size?l(t.id):d(t.id)},performAction:async(t,n)=>{let r=e.find(e=>e.id===t),i=r?.actions?.find(e=>e.id===n);if(!r||!i||r.pendingActionId)return;let a={...r,pendingActionId:n};p(t,`action`),e=e.map(e=>e===r?a:e),c();try{await i.run(),e.includes(a)&&u(t)}catch(t){e.includes(a)&&f({...r,title:i.failureTitle??`Could not complete action`,description:t instanceof Error?t.message:`Please try again.`,tone:`error`})}finally{m(t,`action`)}}}}var X=ht(),Z=o(),gt={archive:v,clock:b,pin:g,trash:C};function _t(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,G.useEffect)(vt,t),null}function vt(){let e=!0,t=new Set,n=()=>{let n=X.getSnapshot();for(let e of t)n.some(t=>t.id===e)||(t.delete(e),Q.close(`shared:${e}`));for(let r of n){let n=r.icon&&r.tone!==`error`?gt[r.icon]:null,i=r.actions??[],a=i.find(bt),o=e=>({children:e.label,disabled:!!r.pendingActionId,onClick:()=>{X.performAction(r.id,e.id)}}),s={title:r.title,description:r.description??null,type:r.tone??`info`,timeout:0,onClose:()=>{e&&X.getSnapshot().includes(r)&&X.dismiss(r.id)},actionProps:{children:null},data:{sharedToastId:r.id,leadingIcon:n?(0,q.jsx)(n,{className:`size-4`}):void 0,additionalActions:i.filter(e=>e!==a).map(e=>({id:e.id,props:o(e)})),...a?{secondaryActionProps:o(a)}:{},hideCopyButton:!0}};t.has(r.id)?Q.update(`shared:${r.id}`,s):(t.add(r.id),Q.add({...s,id:`shared:${r.id}`}))}},r=X.subscribe(n),i=yt;return document.addEventListener(`visibilitychange`,i),i(),n(),()=>{e=!1,r(),document.removeEventListener(`visibilitychange`,i),X.setPaused(`web-hidden`,!1);for(let e of t)Q.close(`shared:${e}`)}}function yt(){return X.setPaused(`web-hidden`,document.hidden)}function bt(e){return e.primary}var xt=class extends m()(`ClipboardApiUnavailableError`,{target:j}){get message(){return`Clipboard API is unavailable while copying ${this.target}.`}},St=class extends m()(`ClipboardWriteError`,{target:j,cause:w()}){get message(){return`Failed to copy ${this.target} to the clipboard.`}},Ct=class extends m()(`ClipboardReadUnavailableError`,{target:j}){get message(){return`Clipboard API is unavailable while reading ${this.target}.`}},wt=class extends m()(`ClipboardReadError`,{target:j,cause:w()}){get message(){return`Failed to read ${this.target} from the clipboard.`}};function Tt(e,t){if(typeof document>`u`||typeof document.execCommand!=`function`)return!1;let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.setAttribute(`aria-hidden`,`true`),n.style.position=`fixed`,n.style.top=`0`,n.style.left=`0`,n.style.opacity=`0`,n.style.fontSize=`16px`;let r=document.activeElement,i=n=>{if(t&&n.clipboardData){n.clipboardData.setData(`text/plain`,e);for(let[e,r]of Object.entries(t))n.clipboardData.setData(e,r);n.preventDefault()}};document.body.appendChild(n),n.addEventListener(`copy`,i);try{return n.focus({preventScroll:!0}),n.select(),n.setSelectionRange(0,e.length),document.execCommand(`copy`)}catch{return!1}finally{n.removeEventListener(`copy`,i),n.remove();let e=r?.focus;typeof e==`function`&&e.call(r)}}async function Et(e,t=`text`,n){if(typeof window>`u`)throw new xt({target:t});if(!e)return!1;n&&=Object.fromEntries(Object.entries(n).filter(([e])=>e!==`text/plain`));let r=n?.[T];if(r&&(n={...n,"text/html":ne(e,r,n?.[`text/html`])}),typeof navigator>`u`||!navigator.clipboard?.writeText){if(Tt(e,n))return!0;throw new xt({target:t})}try{if(n&&typeof ClipboardItem<`u`&&navigator.clipboard.write)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),...Object.fromEntries(Object.entries(n).map(([e,t])=>[e,new Blob([t],{type:e})]))})]),!0}catch{let t=n[`text/html`];if(t)try{return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([e],{type:`text/plain`}),"text/html":new Blob([t],{type:`text/html`})})]),!0}catch{}}return await navigator.clipboard.writeText(e),!0}catch(e){throw new St({target:t,cause:e})}}async function Dt(e=`text`){if(typeof window>`u`||typeof navigator>`u`||!navigator.clipboard?.readText)throw new Ct({target:e});try{return await navigator.clipboard.readText()}catch(t){throw new wt({target:e,cause:t})}}function Ot({timeout:e=2e3,target:t=`text`,onCopy:n,onError:r,extraFlavors:i}={}){let[a,o]=G.useState(!1),s=G.useRef(null),c=G.useRef(n),l=G.useRef(r),u=G.useRef(t),d=G.useRef(e);c.current=n,l.current=r;let f=G.useRef(i);u.current=t,d.current=e,f.current=i;let p=G.useCallback((e,t)=>{Et(e,u.current,f.current).then(e=>{e&&(s.current&&clearTimeout(s.current),o(!0),c.current?.(t),d.current!==0&&(s.current=setTimeout(()=>{o(!1),s.current=null},d.current)))},e=>{console.error(e),l.current?.(e,t)})},[]);return G.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copyToClipboard:p,isCopied:a}}function kt(e){return e===`live`}function At(e){return e.draftThreadExists||e.serverThreadExists&&!e.serverThreadDeleted?`ready`:e.bootstrapComplete?`missing`:`loading`}function jt(e){return{environmentId:e.environmentId,threadId:e.threadId}}function Mt(e){return{draftId:e}}function Nt(e){return!e.environmentId||!e.threadId?null:N(e.environmentId,e.threadId)}function Pt(e){return e.environmentId&&e.threadId?{kind:`server`,threadRef:N(e.environmentId,e.threadId)}:e.draftId?{kind:`draft`,draftId:e.draftId}:null}function Ft(e,t){return e?.kind===`server`?e.threadRef:e?.kind!==`draft`||!t?.promotedTo?null:t.promotedTo}function It(e){if(typeof e!=`object`||!e||!(`children`in e))return!1;let t=e.children;return t!=null&&t!==!1&&t!==``}function Lt(e,t){return t<=1?!1:e>0}function Rt(e){let t=0,n=0,r=0,i=0,a=e.map(e=>{let a=zt(e.height);if(e.transitionStatus===`ending`){let r={toast:e,visibleIndex:t,offsetY:n};return n+=a,t+=1,r}let o={toast:e,visibleIndex:r,offsetY:i};return n+=a,t+=1,i+=a,r+=1,o});return{frontmostHeight:zt(e.find(e=>e.transitionStatus!==`ending`)?.height),items:a}}function zt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:0}function Bt(e,t){if(e?.threadRef)return t!==null&&e.threadRef.environmentId===t.environmentId&&e.threadRef.threadId===t.threadId;let n=e?.threadId;return!n||t?.threadId===n}var Q=pt(),Vt=pt(),$=new Map,Ht={error:S,info:E,loading:we,success:i,warning:oe},Ut=180;function Wt(e,t){if(e===`error`&&typeof t==`string`&&!(t.length<Ut))return`line-clamp-4`}function Gt(e,t,n){n?.(),e.close(t)}function Kt(e){let t=(0,Z.c)(3),{onClick:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,q.jsx)(_,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,q.jsx)(B,{size:`icon-xs`,variant:`ghost`,"aria-label":`Dismiss notification`,"data-slot":`toast-close`,onClick:n,children:r}),t[1]=n,t[2]=i),i}function qt(e){let t=(0,Z.c)(13),{text:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`error-message`},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=Ot(r),o=a?`Copied error`:`Copy error`,s;t[1]!==i||t[2]!==n?(s=()=>i(n),t[1]=i,t[2]=n,t[3]=s):s=t[3];let c=a&&`text-success`,l;t[4]===c?l=t[5]:(l=U(`size-3`,c),t[4]=c,t[5]=l);let u=a?be:ye,d;t[6]!==l||t[7]!==u?(d=(0,q.jsx)(W,{className:l,icon:u}),t[6]=l,t[7]=u,t[8]=d):d=t[8];let f;return t[9]!==o||t[10]!==s||t[11]!==d?(f=(0,q.jsx)(B,{size:`icon-micro`,variant:`ghost-muted`,"aria-label":o,className:`[--control-icon-color:currentColor] rounded-md text-muted-foreground/80 hover:bg-transparent hover:text-muted-foreground`,onClick:s,children:d}),t[9]=o,t[10]=s,t[11]=d,t[12]=f):f=t[12],f}var Jt=`mt-2 max-h-40 min-h-0 overflow-y-auto overscroll-contain pr-0.5 select-text`;function Yt(e){let t=(0,Z.c)(13),{children:n,labels:r}=e,[i,a]=(0,G.useState)(!1),o=r.expand??`Show details`,s=r.collapse??`Hide details`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>a(Xt),t[0]=c):c=t[0];let l=i?Se:xe,u;t[1]===l?u=t[2]:(u=(0,q.jsx)(W,{className:`size-3.5 shrink-0 opacity-80`,icon:l,strokeWidth:2.25}),t[1]=l,t[2]=u);let d=i?s:o,f;t[3]!==i||t[4]!==u||t[5]!==d?(f=(0,q.jsxs)(`button`,{"aria-expanded":i,className:`inline-flex cursor-pointer items-center gap-1 rounded-md py-0.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,onClick:c,type:`button`,children:[u,d]}),t[3]=i,t[4]=u,t[5]=d,t[6]=f):f=t[6];let p;t[7]!==n||t[8]!==i?(p=i?(0,q.jsx)(`div`,{className:Jt,children:n}):null,t[7]=n,t[8]=i,t[9]=p):p=t[9];let m;return t[10]!==f||t[11]!==p?(m=(0,q.jsxs)(`div`,{className:`min-w-0`,children:[f,p]}),t[10]=f,t[11]=p,t[12]=m):m=t[12],m}function Xt(e){return!e}function Zt(e){let t=(0,Z.c)(36),{toastData:n,toastDescription:r,toastType:i}=e,a=n?.expandableContent,o;t[0]===n?.expandableLabels?o=t[1]:(o=n?.expandableLabels??{},t[0]=n?.expandableLabels,t[1]=o);let s=o,c=n?.expandableDescriptionTrigger??!1,l;t[2]!==r||t[3]!==i?(l=U(`min-w-0 select-text wrap-break-word text-muted-foreground`,Wt(i,r)),t[2]=r,t[3]=i,t[4]=l):l=t[4];let u=l,[d,f]=(0,G.useState)(!1);if(!a){let e;return t[5]===u?e=t[6]:(e=(0,q.jsx)(rt,{className:u,"data-slot":`toast-description`}),t[5]=u,t[6]=e),e}if(!c){let e;t[7]===u?e=t[8]:(e=(0,q.jsx)(rt,{className:u,"data-slot":`toast-description`}),t[7]=u,t[8]=e);let n;t[9]!==a||t[10]!==s?(n=(0,q.jsx)(Yt,{labels:s,children:a}),t[9]=a,t[10]=s,t[11]=n):n=t[11];let r;return t[12]!==e||t[13]!==n?(r=(0,q.jsxs)(q.Fragment,{children:[e,n]}),t[12]=e,t[13]=n,t[14]=r):r=t[14],r}let p=s.expand??`Show details`,m=s.collapse??`Hide details`,h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>f(Qt),t[15]=h):h=t[15];let g=h,_;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g())},t[16]=_):_=t[16];let v=_,y=d?m:p,b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=U(`group flex min-w-0 w-full cursor-pointer select-none items-start gap-1.5 rounded-sm text-left outline-none ring-offset-background`,`transition-colors hover:bg-muted/40`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`),t[17]=b):b=t[17];let x;t[18]!==r||t[19]!==i?(x=U(`min-w-0 select-none wrap-break-word text-muted-foreground`,Wt(i,r),`underline-offset-2 decoration-muted-foreground/60 group-hover:underline`),t[18]=r,t[19]=i,t[20]=x):x=t[20];let S;t[21]===x?S=t[22]:(S=(0,q.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,q.jsx)(rt,{className:x,"data-slot":`toast-description`})}),t[21]=x,t[22]=S);let C=d?Se:xe,w;t[23]===C?w=t[24]:(w=(0,q.jsx)(W,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0 text-muted-foreground opacity-80`,icon:C,strokeWidth:2.25}),t[23]=C,t[24]=w);let T;t[25]!==d||t[26]!==w||t[27]!==y||t[28]!==S?(T=(0,q.jsxs)(`div`,{"aria-label":y,"aria-expanded":d,className:b,onClick:g,onKeyDown:v,role:`button`,tabIndex:0,children:[S,w]}),t[25]=d,t[26]=w,t[27]=y,t[28]=S,t[29]=T):T=t[29];let E;t[30]!==a||t[31]!==d?(E=d?(0,q.jsx)(`div`,{className:Jt,children:a}):null,t[30]=a,t[31]=d,t[32]=E):E=t[32];let D;return t[33]!==T||t[34]!==E?(D=(0,q.jsxs)(q.Fragment,{children:[T,E]}),t[33]=T,t[34]=E,t[35]=D):D=t[35],D}function Qt(e){return!e}function $t(e){let t=e.type?Ht[e.type]:null,n=e.type===`error`&&typeof e.description==`string`&&!e.data?.hideCopyButton?e.description:null,r=(e.data?.additionalActions?.length??0)>0,i=e.data?.secondaryActionProps!==void 0;return{Icon:t,copyErrorText:n,hasTrailingControls:n!==null||It(e.actionProps)||r||i}}function en(e){let t=(0,Z.c)(32),{Icon:n,copyErrorText:r,actionProps:i,hasTrailingControls:a,toastData:o,toastDescription:s,toastType:c}=e,l;t[0]===o?.additionalActions?l=t[1]:(l=o?.additionalActions??[],t[0]=o?.additionalActions,t[1]=l);let u=l,d=o?.secondaryActionProps,f=o?.leadingIcon,p;t[2]===d?p=t[3]:(p=d??{},t[2]=d,t[3]=p);let m,h;t[4]===p?(m=t[5],h=t[6]):({className:m,...h}=p,t[4]=p,t[5]=m,t[6]=h);let g;t[7]!==n||t[8]!==f?(g=f?(0,q.jsx)(`div`,{className:`flex h-lh w-4 shrink-0 items-center justify-center`,"data-slot":`toast-icon`,children:f}):n?(0,q.jsx)(`div`,{className:`[&>svg]:h-lh [&>svg]:w-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,"data-slot":`toast-icon`,children:(0,q.jsx)(n,{className:`in-data-[type=error]:text-destructive in-data-[type=info]:text-info in-data-[type=success]:text-success in-data-[type=warning]:text-warning in-data-[type=loading]:opacity-80`})}):null,t[7]=n,t[8]=f,t[9]=g):g=t[9];let _;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,q.jsx)(it,{className:`min-w-0 wrap-break-word font-medium`,"data-slot":`toast-title`}),t[10]=_):_=t[10];let v;t[11]===g?v=t[12]:(v=(0,q.jsxs)(`div`,{className:`flex min-w-0 gap-2`,children:[g,_]}),t[11]=g,t[12]=v);let y;t[13]!==o||t[14]!==s||t[15]!==c?(y=(0,q.jsx)(Zt,{toastData:o,toastDescription:s,toastType:c}),t[13]=o,t[14]=s,t[15]=c,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,q.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-0.5`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let x;t[20]!==i||t[21]!==u||t[22]!==r||t[23]!==a||t[24]!==m||t[25]!==d||t[26]!==h||t[27]!==o?.sharedToastId?(x=a?(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[r===null?null:(0,q.jsx)(qt,{text:r}),u.map(tn),d?(0,q.jsx)(B,{...h,className:m,size:`xs`,type:`button`,variant:o?.sharedToastId?`solid-neutral`:`soft`}):null,It(i)?(0,q.jsx)(ot,{className:U(ae({size:`xs`,variant:`solid-neutral`}),`shrink-0`),"data-slot":`toast-action`,children:i?.children}):null]}):null,t[20]=i,t[21]=u,t[22]=r,t[23]=a,t[24]=m,t[25]=d,t[26]=h,t[27]=o?.sharedToastId,t[28]=x):x=t[28];let S;return t[29]!==b||t[30]!==x?(S=(0,q.jsxs)(q.Fragment,{children:[b,x]}),t[29]=b,t[30]=x,t[31]=S):S=t[31],S}function tn(e){let{id:t,props:n}=e,{className:r,...i}=n;return(0,G.createElement)(B,{...i,className:r,key:t,size:`xs`,type:`button`,variant:`soft`})}function nn(){let e=(0,Z.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={strict:!1,select:rn},e[0]=t):t=e[0];let n=Te(t),r;e[1]===n?r=e[2]:(r=e=>n?.kind===`draft`?e.getDraftSession(n.draftId):null,e[1]=n,e[2]=r);let i=l(r),a;bb0:{if(n?.kind===`server`){a=n.threadRef;break bb0}if(n?.kind===`draft`&&i){let t;e[3]!==i.environmentId||e[4]!==i.threadId?(t={environmentId:i.environmentId,threadId:i.threadId},e[3]=i.environmentId,e[4]=i.threadId,e[5]=t):t=e[5],a=t;break bb0}a=null}return a}function rn(e){return Pt(e)}function an(e){let t=(0,Z.c)(4),{toastId:n,dismissAfterVisibleMs:r}=e,i,a;return t[0]!==r||t[1]!==n?(i=()=>{if(!r||r<=0||typeof window>`u`||typeof document>`u`)return;let e=$.get(n)??r,t=null,i=null,a=!1,o=()=>{i!==null&&(window.clearTimeout(i),i=null)},s=()=>{a||(a=!0,$.delete(n),Q.close(n))},c=()=>{t!==null&&(e=Math.max(0,e-(Date.now()-t)),t=null,o(),$.set(n,e))},l=()=>{if(!(a||t!==null)){if(e<=0){s();return}t=Date.now(),o(),i=window.setTimeout(()=>{e=0,t=null,s()},e)}},u=()=>{if(document.visibilityState===`visible`&&document.hasFocus()){l();return}c()};return u(),document.addEventListener(`visibilitychange`,u),window.addEventListener(`focus`,u),window.addEventListener(`blur`,u),()=>{document.removeEventListener(`visibilitychange`,u),window.removeEventListener(`focus`,u),window.removeEventListener(`blur`,u),c(),o()}},a=[r,n],t[0]=r,t[1]=n,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,G.useEffect)(i,a),null}function on(e){let t=(0,Z.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,position:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`top-center`:i,o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,q.jsx)(_t,{}),t[4]=o):o=t[4];let s;t[5]===a?s=t[6]:(s=(0,q.jsx)(sn,{position:a}),t[5]=a,t[6]=s);let c;return t[7]!==n||t[8]!==r||t[9]!==s?(c=(0,q.jsxs)(He,{toastManager:Q,...r,children:[o,n,s]}),t[7]=n,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function sn(e){let t=(0,Z.c)(19),{position:n}=e,{toasts:r}=ft(),i=nn(),a;t[0]===n?a=t[1]:(a=n.startsWith(`top`),t[0]=n,t[1]=a);let o=a,s;t[2]===i?s=t[3]:(s=e=>Bt(e.data,i),t[2]=i,t[3]=s);let c=Rt(r.filter(s)),l,u;t[4]===r?(l=t[5],u=t[6]):(l=()=>{let e=new Set(r.map(cn));for(let t of $.keys())e.has(t)||$.delete(t)},u=[r],t[4]=r,t[5]=l,t[6]=u),(0,G.useEffect)(l,u);let d=mt,f=mt,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=U(`fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]`,`data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]`,`data-[position*=bottom]:bottom-(--toast-inset)`,`data-[position*=left]:left-(--toast-inset)`,`data-[position*=right]:right-(--toast-inset)`,`data-[position*=center]:-translate-x-1/2 data-[position*=center]:left-1/2`),t[7]=p):p=t[7];let m=`${c.frontmostHeight}px`,h;t[8]===m?h=t[9]:(h={"--toast-frontmost-height":m},t[8]=m,t[9]=h);let g=h,_=c.items.map(e=>{let{toast:t,visibleIndex:r,offsetY:i}=e,a=Lt(r,c.items.length),s=$t(t);return(0,q.jsxs)(tt,{className:U(`dropdown-glass absolute z-[calc(9999-var(--toast-index))] w-full overflow-visible select-none rounded-xl text-popover-foreground shadow-lg shadow-black/10 [transition:transform_.5s_cubic-bezier(.22,1,.36,1),opacity_.5s,height_.15s] motion-reduce:transition-none`,`data-[position*=right]:right-0 data-[position*=right]:left-auto`,`data-[position*=left]:right-auto data-[position*=left]:left-0`,`data-[position*=center]:right-0 data-[position*=center]:left-0`,`data-[position*=top]:top-0 data-[position*=top]:bottom-auto data-[position*=top]:origin-top`,`data-[position*=bottom]:top-auto data-[position*=bottom]:bottom-0 data-[position*=bottom]:origin-bottom`,`after:absolute after:left-0 after:h-[calc(var(--toast-gap)+1px)] after:w-full`,`data-[position*=top]:after:top-full`,`data-[position*=bottom]:after:bottom-full`,r>0?`not-data-expanded:[--toast-calc-height:var(--toast-frontmost-height)] data-expanded:[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`:`[--toast-calc-height:max(var(--toast-frontmost-height,var(--toast-height)),var(--toast-height))]`,`[--toast-gap:--spacing(3)] [--toast-peek:--spacing(3)] [--toast-scale:calc(max(0,1-(var(--toast-index)*.1)))] [--toast-shrink:calc(1-var(--toast-scale))]`,r>0?`not-data-expanded:h-(--toast-calc-height) data-expanded:h-auto`:`h-auto`,`data-[position*=top]:[--toast-calc-offset-y:calc(var(--toast-offset-y)+var(--toast-index)*var(--toast-gap)+var(--toast-swipe-movement-y))]`,`data-[position*=bottom]:[--toast-calc-offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--toast-gap)*-1+var(--toast-swipe-movement-y))]`,`data-[position*=top]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--toast-peek))+(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-[position*=bottom]:transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--toast-peek))-(var(--toast-shrink)*var(--toast-calc-height))))_scale(var(--toast-scale))]`,`data-limited:opacity-0`,`data-position:data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--toast-calc-offset-y))]`,`data-[position*=top]:data-starting-style:transform-[translateY(calc(-100%-var(--toast-inset)))]`,`data-[position*=bottom]:data-starting-style:transform-[translateY(calc(100%+var(--toast-inset)))]`,`data-[position*=top]:data-[position*=right]:data-starting-style:transform-[translateX(calc(100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:opacity-0`,`data-ending-style:not-data-limited:not-data-swipe-direction:transform-[translateY(calc(var(--toast-calc-offset-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=left]:transform-[translateX(calc(var(--toast-swipe-movement-x)-100%-var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=right]:transform-[translateX(calc(var(--toast-swipe-movement-x)+100%+var(--toast-inset)))_translateY(var(--toast-calc-offset-y))]`,`data-expanded:data-ending-style:data-[swipe-direction=up]:transform-[translateY(calc(var(--toast-swipe-movement-y)-100%-var(--toast-inset)))]`,`data-expanded:data-ending-style:data-[swipe-direction=down]:transform-[translateY(calc(var(--toast-swipe-movement-y)+100%+var(--toast-inset)))]`),"data-position":n,onPointerEnter:()=>{t.data?.sharedToastId&&X.pause(t.data.sharedToastId,`pointer`)},onPointerLeave:()=>{t.data?.sharedToastId&&X.resume(t.data.sharedToastId,`pointer`)},onFocusCapture:()=>{t.data?.sharedToastId&&X.pause(t.data.sharedToastId,`focus`)},onBlurCapture:e=>{t.data?.sharedToastId&&!e.currentTarget.contains(e.relatedTarget)&&X.resume(t.data.sharedToastId,`focus`)},style:{"--toast-index":r,"--toast-offset-y":`${i}px`},swipeDirection:n.includes(`center`)?[o?`up`:`down`]:n.includes(`left`)?[`left`,o?`up`:`down`]:[`right`,o?`up`:`down`],toast:t,children:[(0,q.jsx)(an,{dismissAfterVisibleMs:t.data?.dismissAfterVisibleMs,toastId:t.id}),(0,q.jsxs)(nt,{className:U(`pointer-events-auto flex min-h-0 items-center justify-between gap-2 overflow-y-visible py-3 pr-2 pl-3.5 text-sm transition-opacity duration-250 [overflow-x:clip] data-expanded:opacity-100`,a&&`not-data-expanded:pointer-events-none not-data-expanded:opacity-0`),children:[(0,q.jsx)(en,{...s,actionProps:t.actionProps,toastData:t.data,toastDescription:t.description,toastType:t.type}),(0,q.jsx)(Kt,{onClick:()=>{let e=t.data?.sharedToastId;e?X.dismiss(e):Gt(Q,t.id,t.data?.onClose)}})]})]},t.id)}),v;t[10]!==n||t[11]!==g||t[12]!==_||t[13]!==f.Viewport||t[14]!==p?(v=(0,q.jsx)(f.Viewport,{className:p,"data-position":n,"data-slot":`toast-viewport`,style:g,children:_}),t[10]=n,t[11]=g,t[12]=_,t[13]=f.Viewport,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==d.Portal?(y=(0,q.jsx)(d.Portal,{"data-slot":`toast-portal`,children:v}),t[16]=v,t[17]=d.Portal,t[18]=y):y=t[18],y}function cn(e){return e.id}function ln(e){let t=(0,Z.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,q.jsx)(un,{}),t[3]=i):i=t[3];let a;return t[4]!==n||t[5]!==r?(a=(0,q.jsxs)(He,{toastManager:Vt,...r,children:[n,i]}),t[4]=n,t[5]=r,t[6]=a):a=t[6],a}function un(){let e=(0,Z.c)(7),{toasts:t}=ft(),n=nn(),r;if(e[0]!==n||e[1]!==t){let i;e[3]===n?i=e[4]:(i=e=>Bt(e.data,n),e[3]=n,e[4]=i),r=t.filter(i).map(dn),e[0]=n,e[1]=t,e[2]=r}else r=e[2];let i;return e[5]===r?i=e[6]:(i=(0,q.jsx)(st,{"data-slot":`toast-portal-anchored`,children:(0,q.jsx)(We,{className:`outline-none`,"data-slot":`toast-viewport-anchored`,children:r})}),e[5]=r,e[6]=i),i}function dn(e){let t=e.data?.tooltipStyle??!1,n=e.positionerProps,r=$t(e);return n?.anchor?(0,q.jsx)(ut,{className:`z-100 max-w-[min(--spacing(64),var(--available-width))]`,"data-slot":`toast-positioner`,sideOffset:n.sideOffset??4,toast:e,children:(0,q.jsx)(tt,{className:U(`dropdown-glass relative overflow-visible text-balance text-popover-foreground text-xs shadow-xl shadow-black/25 transition-[scale,opacity] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,t?`rounded-md`:`rounded-lg`),"data-slot":`toast-popup`,toast:e,children:t?(0,q.jsx)(nt,{className:`pointer-events-auto px-2 py-1`,children:(0,q.jsx)(it,{"data-slot":`toast-title`})}):(0,q.jsxs)(nt,{className:`pointer-events-auto flex min-h-0 items-center justify-between gap-1.5 overflow-y-visible py-3 pr-2 pl-3.5 text-sm [overflow-x:clip]`,children:[(0,q.jsx)(en,{...r,actionProps:e.actionProps,toastData:e.data,toastDescription:e.description,toastType:e.type}),(0,q.jsx)(Kt,{onClick:()=>Gt(Vt,e.id,e.data?.onClose)})]})})},e.id):null}export{ke as _,Mt as a,Ft as c,Pt as d,Dt as f,Ne as g,X as h,Q as i,Nt as l,Et as m,on as n,jt as o,Ot as p,Vt as r,kt as s,ln as t,At as u,Ae as v,Oe as y};
2
+ //# sourceMappingURL=toast-45xHk8t0.js.map
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Ao as n,BE as r,Da as i,Ga as a,Hu as o,La as s,So as c,_r as l,co as u,ka as d,mE as f,t as p}from"./utils-CyMIjIQl.js";var m=e(t()),h=m.createContext(void 0);function g(e=!0){let t=m.useContext(h);if(t===void 0&&!e)throw Error(n(7));return t}var _=e(f()),v=m.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:o=!1,form:f,onPressedChange:p,pressed:m,render:h,type:v,value:y,nativeButton:b=!0,style:x,...S}=e,C=d(y||void 0),w=g(),T=w?.value??[],E=w?void 0:r,D=(o||w?.disabled)??!1,[O,k]=a({controlled:w?C!==void 0&&T.indexOf(C)>-1:m,default:E,name:`Toggle`,state:`pressed`}),{getButtonProps:A,buttonRef:j}=s({disabled:D,native:b}),M={disabled:D,pressed:O},N=[j,t],P=[{"aria-pressed":O,onClick(e){let t=!O,n=i(u,e.nativeEvent);C&&w?.setGroupValue?.(C,t,n),p?.(t,n),!n.isCanceled&&k(t)}},S,A],F=c(`button`,e,{enabled:!w,state:M,ref:N,props:P});return w?(0,_.jsx)(l,{tag:`button`,render:h,className:n,style:x,state:M,refs:N,props:P}):F}),y=r(),b=o(`[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer select-none items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base text-foreground outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 aria-disabled:opacity-64 data-pressed:bg-input/64 data-pressed:text-accent-foreground sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{size:`default`,variant:`default`},variants:{size:{compact:`h-7 min-w-7 rounded-md px-[calc(--spacing(1)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] [&_svg:not([class*='size-'])]:size-3.5`,default:`h-9 min-w-9 px-[calc(--spacing(2)-1px)] sm:h-8 sm:min-w-8`,lg:`h-10 min-w-10 px-[calc(--spacing(2.5)-1px)] sm:h-9 sm:min-w-9`,segmented:`h-6 min-w-0 rounded-md px-2.5 text-xs before:rounded-[calc(var(--radius-md)-1px)]`,sm:`h-8 min-w-8 px-[calc(--spacing(1.5)-1px)] sm:h-7 sm:min-w-7`,xs:`h-7 min-w-7 px-[calc(--spacing(1)-1px)] sm:h-6 sm:min-w-6 rounded-md`},variant:{default:`border-transparent`,pill:`border-transparent rounded-full px-3 font-normal text-muted-foreground data-pressed:text-foreground`,ghost:`border-transparent text-foreground shadow-none [:disabled,:active,[data-pressed]]:shadow-none before:shadow-none data-pressed:bg-accent data-pressed:text-accent-foreground disabled:opacity-100 disabled:text-muted-foreground disabled:[&_svg]:opacity-100`,outline:`border-input bg-background not-dark:bg-clip-padding shadow-xs/5 not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:data-pressed:bg-input dark:hover:bg-input/64 dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] dark:not-disabled:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/2%)] [:disabled,:active,[data-pressed]]:shadow-none`,segmented:`border-transparent text-muted-foreground shadow-none transition-colors before:shadow-none hover:bg-background/55 hover:text-foreground data-pressed:bg-background data-pressed:text-foreground data-pressed:shadow-xs/10 dark:hover:bg-input/32 dark:data-pressed:bg-input/72`}}});function x(e){let t=(0,y.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:a,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==n||t[6]!==i||t[7]!==a?(o=p(b({className:n,size:i,variant:a})),t[5]=n,t[6]=i,t[7]=a,t[8]=o):o=t[8];let s;return t[9]!==r||t[10]!==o?(s=(0,_.jsx)(v,{className:o,"data-slot":`toggle`,...r}),t[9]=r,t[10]=o,t[11]=s):s=t[11],s}export{h as n,x as t};
2
- //# sourceMappingURL=toggle-BdizphFv.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./Icon-l19w4AjM.js";import{Ao as n,BE as r,Da as i,Ga as a,Hu as o,La as s,So as c,_r as l,co as u,ka as d,mE as f,t as p}from"./utils-DPab5G1h.js";var m=e(t()),h=m.createContext(void 0);function g(e=!0){let t=m.useContext(h);if(t===void 0&&!e)throw Error(n(7));return t}var _=e(f()),v=m.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:o=!1,form:f,onPressedChange:p,pressed:m,render:h,type:v,value:y,nativeButton:b=!0,style:x,...S}=e,C=d(y||void 0),w=g(),T=w?.value??[],E=w?void 0:r,D=(o||w?.disabled)??!1,[O,k]=a({controlled:w?C!==void 0&&T.indexOf(C)>-1:m,default:E,name:`Toggle`,state:`pressed`}),{getButtonProps:A,buttonRef:j}=s({disabled:D,native:b}),M={disabled:D,pressed:O},N=[j,t],P=[{"aria-pressed":O,onClick(e){let t=!O,n=i(u,e.nativeEvent);C&&w?.setGroupValue?.(C,t,n),p?.(t,n),!n.isCanceled&&k(t)}},S,A],F=c(`button`,e,{enabled:!w,state:M,ref:N,props:P});return w?(0,_.jsx)(l,{tag:`button`,render:h,className:n,style:x,state:M,refs:N,props:P}):F}),y=r(),b=o(`[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer select-none items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-base text-foreground outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 aria-disabled:opacity-64 data-pressed:bg-input/64 data-pressed:text-accent-foreground sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{size:`default`,variant:`default`},variants:{size:{compact:`h-7 min-w-7 rounded-md px-[calc(--spacing(1)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] [&_svg:not([class*='size-'])]:size-3.5`,default:`h-9 min-w-9 px-[calc(--spacing(2)-1px)] sm:h-8 sm:min-w-8`,lg:`h-10 min-w-10 px-[calc(--spacing(2.5)-1px)] sm:h-9 sm:min-w-9`,segmented:`h-6 min-w-0 rounded-md px-2.5 text-xs before:rounded-[calc(var(--radius-md)-1px)]`,sm:`h-8 min-w-8 px-[calc(--spacing(1.5)-1px)] sm:h-7 sm:min-w-7`,xs:`h-7 min-w-7 px-[calc(--spacing(1)-1px)] sm:h-6 sm:min-w-6 rounded-md`},variant:{default:`border-transparent`,pill:`border-transparent rounded-full px-3 font-normal text-muted-foreground data-pressed:text-foreground`,ghost:`border-transparent text-foreground shadow-none [:disabled,:active,[data-pressed]]:shadow-none before:shadow-none data-pressed:bg-accent data-pressed:text-accent-foreground disabled:opacity-100 disabled:text-muted-foreground disabled:[&_svg]:opacity-100`,outline:`border-input bg-background not-dark:bg-clip-padding shadow-xs/5 not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:data-pressed:bg-input dark:hover:bg-input/64 dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] dark:not-disabled:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/2%)] [:disabled,:active,[data-pressed]]:shadow-none`,segmented:`border-transparent text-muted-foreground shadow-none transition-colors before:shadow-none hover:bg-background/55 hover:text-foreground data-pressed:bg-background data-pressed:text-foreground data-pressed:shadow-xs/10 dark:hover:bg-input/32 dark:data-pressed:bg-input/72`}}});function x(e){let t=(0,y.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,variant:a,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==n||t[6]!==i||t[7]!==a?(o=p(b({className:n,size:i,variant:a})),t[5]=n,t[6]=i,t[7]=a,t[8]=o):o=t[8];let s;return t[9]!==r||t[10]!==o?(s=(0,_.jsx)(v,{className:o,"data-slot":`toggle`,...r}),t[9]=r,t[10]=o,t[11]=s):s=t[11],s}export{h as n,x as t};
2
+ //# sourceMappingURL=toggle-CBuoGytK.js.map