@p4code/cli 0.9.14 → 0.9.15
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.
- package/dist/{AcpMcpStdioBridge-z_p02VlR.mjs → AcpMcpStdioBridge-BPNHFfTr.mjs} +11 -4
- package/dist/AcpMcpStdioBridge-CtXfvrFO.mjs +3 -0
- package/dist/{Effect-Bwkv2ifD.mjs → Effect-COOccdaU.mjs} +2 -2
- package/dist/{Schema-CFgoTmE6.mjs → Schema-BXiVImR2.mjs} +2 -2
- package/dist/{Stream-B4Gds95A.mjs → Stream-D2XZdzH6.mjs} +45 -3
- package/dist/bin.mjs +15 -2
- package/dist/{binCli-BGRfVnO9.mjs → binCli-06acKUH_.mjs} +4146 -2094
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-DVpahhef.mjs → claudeHistoryWorker-BJKXFgWC.mjs} +4 -4
- package/dist/client/.vite/manifest.json +2064 -2089
- package/dist/client/assets/{2NI2N5EU-Bk2qNhha.js → 2NI2N5EU-CzVcbH89.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-CPV9277r.js → 4UO7MD6I-DS3UFSUE.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-LgRjxbnj.js → 5B3SVYGG-lbor_c4_.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-9ndiKpIs.js → 5GK6JWQ2-DufacBFC.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-DnUhiayz.js → 5N7A7DKN-B3iWX-TC.js} +2 -2
- package/dist/client/assets/{5OC2THR4-DxmpZihk.js → 5OC2THR4-DoDDWXtD.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-C4cUz8RB.js → 5S6HY5KT-7n94quvm.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-2G8Rrp9t.js → 6IMQ5BUJ-CqcR9lZq.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-CW3F_AM6.js → 6OLKWJ4F-BeCI6be_.js} +2 -2
- package/dist/client/assets/{74OO7NKP-z5ujM5KH.js → 74OO7NKP-XWvi4Kgp.js} +2 -2
- package/dist/client/assets/{75O6YZUN-CSeaYNtt.js → 75O6YZUN-BbbGiqdI.js} +2 -2
- package/dist/client/assets/{77XECAW3-DxL0AHyZ.js → 77XECAW3-BVGMXOi_.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-DvBcJj7G.js → ABYRPUBD-D4oehH5y.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-BI19p1Pb.js +2 -0
- package/dist/client/assets/{AnimatedHeight-DChvigzz.js → AnimatedHeight-DT585xP0.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell-29ykag3m.js → AuthSurfaceShell-C312CXz7.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-Cun87LIm.js → BB2UYUI2-BkFcdWkE.js} +2 -2
- package/dist/client/assets/{BUM34MOA-D6aIFnwf.js → BUM34MOA-DK6xDbTB.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-DYzEk-9p.js → CEQABKGZ-rLn9wSBN.js} +2 -2
- package/dist/client/assets/{CXAC5362-CdQgNtpk.js → CXAC5362-C1eQCQMX.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-BldpBXxU.js +2 -0
- package/dist/client/assets/ChatMarkdown-BUoR67CT.js +49 -0
- package/dist/client/assets/CheckboxIndicator-C4iAbUMh.js +2 -0
- package/dist/client/assets/ClippedText-TtLeyAVc.js +2 -0
- package/dist/client/assets/CodexSetupSection.logic-BO6ZAijp.js +2 -0
- package/dist/client/assets/ComboboxClear-CtNsa8Al.js +2 -0
- package/dist/client/assets/ComboboxGroupLabel-vQ7y8c50.js +2 -0
- package/dist/client/assets/{CommandBlock-DBGDwDRu.js → CommandBlock-40eSIrOe.js} +2 -2
- package/dist/client/assets/CompositeRoot-CL7X20MU.js +2 -0
- package/dist/client/assets/ConnectAgentSurface-B_AYPHWs.js +2 -0
- package/dist/client/assets/{ConnectionStatusDot-C_9jtSee.js → ConnectionStatusDot-7Tjfknn6.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-CftE6Aa3.js → DRLTVNUE-BPoomdQn.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DezK9sBO.js → DYY6UVD2-BVvdA84B.js} +2 -2
- package/dist/client/assets/DevicePanel-Cqexcbm2.js +2 -0
- package/dist/client/assets/DeviceSetup-Cdyw5Z9a.js +2 -0
- package/dist/client/assets/DialogTitle-CFYK6V6-.js +2 -0
- package/dist/client/assets/{DiffCommentAnnotation-QtrnUuSs.js → DiffCommentAnnotation-C28NAT6f.js} +3 -3
- package/dist/client/assets/{DiffFileTree-B_4bn5J8.js → DiffFileTree-DNP9E3To.js} +2 -2
- package/dist/client/assets/DiffPanel-CrswOKS6.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-CtpHksSf.js → DiffWorkerPoolProvider-TgqbZJCv.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-BU5m6_ou.js → EmbeddedDesign-Bdq5oAfI.js} +8 -8
- package/dist/client/assets/{EnvironmentMachineIcon-DTUBsEaI.js → EnvironmentMachineIcon-B81Bujkx.js} +2 -2
- package/dist/client/assets/{ExpandableText-Wij8nL6W.js → ExpandableText-CViqRFUp.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-DHCmE6LN.js → FNOVOB4O-CmMgcKnc.js} +2 -2
- package/dist/client/assets/FieldControl-95mCsa0m.js +2 -0
- package/dist/client/assets/{FileDiff-CAtJtUC5.js → FileDiff-BnZVGRTP.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-CjKP3Q7G.js → FilePreviewPanel-BUTTBdpa.js} +5 -5
- package/dist/client/assets/{FoldedSettingsSection-CAZumPht.js → FoldedSettingsSection-CioXtXIT.js} +2 -2
- package/dist/client/assets/FormContext-BcA1kdFD.js +2 -0
- package/dist/client/assets/{HDGCDEEZ-DNHIctoG.js → HDGCDEEZ-BsN0BbNt.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-BfNhUjhw.js → HSJLKHB7-Bn8VFRt5.js} +2 -2
- package/dist/client/assets/{Icons-DYaY7Otq.js → Icons-D_LFMxsj.js} +2 -2
- package/dist/client/assets/Input-C9KIhPlP.js +2 -0
- package/dist/client/assets/JZOYTAAL-B8H2VC7A.js +1 -0
- package/dist/client/assets/{K3MD6TGW-D-q4Z_68.js → K3MD6TGW-BEaTend7.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-C5AEGeo9.js → K7RP3OMA-Ca837W6z.js} +2 -2
- package/dist/client/assets/KeybindingsSettings.logic-DwMUZYvv.js +2 -0
- package/dist/client/assets/{LHDIQX7Q-CY4nmSyZ.js → LHDIQX7Q-kLYZmy22.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-BHmzrQMD.js → LUXOKEGN-C6-9ARpy.js} +2 -2
- package/dist/client/assets/LinkMachineSelect-BVNnYUBb.js +2 -0
- package/dist/client/assets/{MathTypeset-C1sAcsZE.js → MathTypeset-CO0wlzDm.js} +2 -2
- package/dist/client/assets/{N3JZAHOW-D1VvHXNc.js → N3JZAHOW-BFAKVTw8.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-DKQw5Xvm.js → NUIALGQ3-DJg3tvBl.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-DVJOMY01.js → NoProjectsHero-ClDVFY0-.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-B7xlpxd0.js → O65XPQGZ-C5dkxqix.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-D_yohKEz.js → O7XIQ6OM-BUT403yQ.js} +2 -2
- package/dist/client/assets/{OFQON5FD-Eb1UafMJ.js → OFQON5FD-BPK3FXUG.js} +2 -2
- package/dist/client/assets/P4ConnectAccountPages-ChT866qO.js +2 -0
- package/dist/client/assets/{P4ConnectSidebarSignIn-BarFXVdD.js → P4ConnectSidebarSignIn-D7BBbl_u.js} +2 -2
- package/dist/client/assets/{PJQHF43J-xu8MNrTl.js → PJQHF43J-DrfICuu-.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-DMUv135M.js +216 -0
- package/dist/client/assets/PierreEntryIcon-DLXDEcqA.js +2 -0
- package/dist/client/assets/PopoverHandle-D8JhsX32.js +2 -0
- package/dist/client/assets/PreviewPanel-D7YWnWZS.js +2 -0
- package/dist/client/assets/ProjectDefaultsSettings-BZSw74tU.js +2 -0
- package/dist/client/assets/ProjectFavicon-BbtNdeB8.js +3 -0
- package/dist/client/assets/{ProjectIconPickerDialog-Ccwf3eo1.js → ProjectIconPickerDialog-7vur_TCX.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-Bui44V7z.js → ProjectMonogram-CjAGnMXr.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-DjIpg2-V.js → ProviderAuthTerminal-83vDClUK.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-af7MWLPO.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-sjzQFb8p.js → ProviderSettingsForm-B4N4tsxv.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-B07M_QW4.js +6 -0
- package/dist/client/assets/{RHNBAITX-DWaFNhmX.js → RHNBAITX-CzAdLNMd.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DDDARz8g.js → ReadOnlySourcePreview-CRy5hHfx.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-BFwVjGRJ.js → RedactedSensitiveText-B-u4PB3I.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-BbxLD-66.js +23 -0
- package/dist/client/assets/{RightPanelResizeHandle-DstJn39I.js → RightPanelResizeHandle-BODMyZa6.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-kuRIO20K.js → SLD4V6NK-DIFaAadw.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-BTi69FRq.js +6 -0
- package/dist/client/assets/{ScopedSwitch-B7HEwool.js → ScopedSwitch-sSIKDf2q.js} +2 -2
- package/dist/client/assets/ScrollAreaCorner-CsKGemsf.js +2 -0
- package/dist/client/assets/{SecretInput-CxRazSuj.js → SecretInput-DxjaAnSE.js} +2 -2
- package/dist/client/assets/SelectScrollUpArrow-BMZtcPXM.js +2 -0
- package/dist/client/assets/{SelfImproveSettingsSection-BxPUr-AT.js → SelfImproveSettingsSection-Dx6spJXh.js} +2 -2
- package/dist/client/assets/SettingsPanels-DhuEF0_Y.js +46 -0
- package/dist/client/assets/{SettingsPanels.logic-B406HX50.js → SettingsPanels.logic-D5Fnq4gS.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-Dt7vuLO5.js → SettingsScopeNotice-B1JDmqM6.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-BzsUCj2G.js → SidebarStageBackdrop-Bbv3JBlJ.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-C14xVwSj.js → T3PCR2KE-CACWvOHn.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-CC_4uZad.js → TKWO2OVW-DpiGaVko.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-Kizqv5oh.js → TSHNXIZL-Cs6g4gXN.js} +2 -2
- package/dist/client/assets/ThemeEditorPanel-w-RJEK3t.js +5 -0
- package/dist/client/assets/{ThreadDetailsItemsMenu-CSCIFtTP.js → ThreadDetailsItemsMenu-DEwUOoLt.js} +60 -60
- package/dist/client/assets/ThreadTerminalDrawer-CY2qHldP.js +5 -0
- package/dist/client/assets/TooltipProvider-Czzm7ro-.js +2 -0
- package/dist/client/assets/{UQJE5E4I-KUX5qtvS.js → UQJE5E4I-C2gKDRv_.js} +2 -2
- package/dist/client/assets/{USNYFO5S-XMF6TRXj.js → USNYFO5S-CQ8LfY6F.js} +2 -2
- package/dist/client/assets/{Virtualizer-CqFZ9IgG.js → Virtualizer-DsEq6qUF.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-BNUvxLQd.js → WEVWDWVA-DK2GTAKk.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-DyZsM9TF.js → WorkspaceBreadcrumb-BImJJpuo.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-DFXSkFyh.js → WorkspacePageContainer-BlYFBUKE.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-FTc6UfB-.js → WorkspacePageHeader-B7O16593.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-BtifjFQb.js → X5RFHQXM-sPxDCIwv.js} +2 -2
- package/dist/client/assets/{X62E3GBT-DT_qCIPw.js → X62E3GBT-DVWr270S.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-7FdMX9IP.js → XBNEOJTC-C4ZNtSrU.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-D6KCo9Qp.js → YHV2MVVZ-aSYUfq9n.js} +2 -2
- package/dist/client/assets/{YURCZMG2-D0_CST6F.js → YURCZMG2-fnxZxUja.js} +2 -2
- package/dist/client/assets/{YVG2LODB-CRU4fKD2.js → YVG2LODB-DxaZKaXT.js} +2 -2
- package/dist/client/assets/_chat-BeJoXsdK.js +47 -0
- package/dist/client/assets/_chat.design-AJz30uXq.js +2 -0
- package/dist/client/assets/_chat.index-D1csjyRQ.js +2 -0
- package/dist/client/assets/_chat.new-IhhWgwNo.js +4 -0
- package/dist/client/assets/_chat.pull-requests-B84LUHIv.js +2 -0
- package/dist/client/assets/{alert-D0u2-4Zh.js → alert-D6MFRWZv.js} +2 -2
- package/dist/client/assets/{alert-dialog-DK40IDMO.js → alert-dialog-BCq0Qme9.js} +2 -2
- package/dist/client/assets/assetUrls-CpRsTTqn.js +2 -0
- package/dist/client/assets/assets-Dh1LFwqL.js +2 -0
- package/dist/client/assets/browserHistoryStore-BVEWgOnh.js +2 -0
- package/dist/client/assets/{browserLinkTarget-BOF3rlV5.js → browserLinkTarget-IOprEiHF.js} +2 -2
- package/dist/client/assets/{checkbox-bsJs8Zu-.js → checkbox-CGhJug34.js} +2 -2
- package/dist/client/assets/{color-picker-W4KTEgfL.js → color-picker-CRaqqL5F.js} +2 -2
- package/dist/client/assets/{combobox-UDn50qHb.js → combobox-5RzytEjd.js} +2 -2
- package/dist/client/assets/{command-C7CgDZ25.js → command-06bu9QoQ.js} +2 -2
- package/dist/client/assets/{connect-CguaBRtJ.js → connect-7OV1IEwO.js} +2 -2
- package/dist/client/assets/connect-agent-B6pgZuy8.js +2 -0
- package/dist/client/assets/design-DSoix9e1.js +2 -0
- package/dist/client/assets/device-DQmQm4GC.js +2 -0
- package/dist/client/assets/{dialog-BEXthTAp.js → dialog-DTVhbEqi.js} +2 -2
- package/dist/client/assets/{diffRendering-DosiBwUN.js → diffRendering-DAzPanqh.js} +3 -3
- package/dist/client/assets/{dist-p5OtQFc9.js → dist-BuxsAlG0.js} +3 -3
- package/dist/client/assets/draft-input-BTetoXSt.js +2 -0
- package/dist/client/assets/{duoViewer-BcsodgGy.js → duoViewer-DxmaOmHS.js} +2 -2
- package/dist/client/assets/{dynamic-XOmtS0-B.js → dynamic-wBSCLNxy.js} +2 -2
- package/dist/client/assets/{embeddedScripts-BQl_ld6u.js → embeddedScripts-ZebptRJ0.js} +2 -2
- package/dist/client/assets/{empty-CTv2Unxd.js → empty-B4h5DyMQ.js} +2 -2
- package/dist/client/assets/entities-CWtNgawi.js +2 -0
- package/dist/client/assets/{fileLinks-T2ko6Qmp.js → fileLinks-BfcK2bJU.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-BOutPxUH.js → fileTreeExpansion-DjiK1m5s.js} +2 -2
- package/dist/client/assets/{getDiffFileInput-Do7OSxYn.js → getDiffFileInput-XE3jyXxK.js} +2 -2
- package/dist/client/assets/{guideRunStore-DGAK_XSV.js → guideRunStore-CzF0q6A8.js} +2 -2
- package/dist/client/assets/{htmlRender-DAhG7IlW.js → htmlRender-DGe3WaPg.js} +2 -2
- package/dist/client/assets/{index-4XHdM2Yx.js → index-CurDuwfz.js} +3 -3
- package/dist/client/assets/{input-BGKmQVHf.js → input-CQaedaQh.js} +2 -2
- package/dist/client/assets/{input-group-BdgWY0OZ.js → input-group-BQ_2ox-w.js} +2 -2
- package/dist/client/assets/{kbd-BIypvknl.js → kbd-DQRicdHu.js} +2 -2
- package/dist/client/assets/{keybindings-C0ntbKmL.js → keybindings-tgj8XFFz.js} +2 -2
- package/dist/client/assets/{lazy-DudfZwDr.js → lazy-DmPH_lNd.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-VtherrNw.js → lazyRouteComponent-CE6uW_5p.js} +2 -2
- package/dist/client/assets/{link--eZ8ZXuK.js → link-CKfckeju.js} +2 -2
- package/dist/client/assets/{linkedPrompt-DRNVlalr.js → linkedPrompt-68_t5vwh.js} +2 -2
- package/dist/client/assets/main-B1sXOjZZ.js +37 -0
- package/dist/client/assets/main-CbkvDRKP.css +2 -0
- package/dist/client/assets/{mediaReference-CMwg4kE3.js → mediaReference-DQ6GIZY7.js} +2 -2
- package/dist/client/assets/mediaSource-DfTsMdqm.js +2 -0
- package/dist/client/assets/number-field-xEi5ylvp.js +2 -0
- package/dist/client/assets/{observeResize-CV41SgJr.js → observeResize-BbXolq6K.js} +2 -2
- package/dist/client/assets/onboarding-CkdZxdNL.js +2 -0
- package/dist/client/assets/openFileInPreview-BHhDd-id.js +2 -0
- package/dist/client/assets/{p4ProjectFile-DqqWNGdD.js → p4ProjectFile-5VDI-yAx.js} +2 -2
- package/dist/client/assets/{pair-Wl7C9P9c.js → pair-BpCo33SH.js} +2 -2
- package/dist/client/assets/{pendingSendStore-CFKdq-QP.js → pendingSendStore-Ba--K6cH.js} +2 -2
- package/dist/client/assets/{phoneViewer-C1sFfV5x.js → phoneViewer-C1aGY-h1.js} +2 -2
- package/dist/client/assets/{pierre-icons-2mAt8csu.js → pierre-icons-BdcegjLq.js} +3 -3
- package/dist/client/assets/popover-BB2K1---.js +2 -0
- package/dist/client/assets/preview-B4_sjsUX.js +2 -0
- package/dist/client/assets/preview-DgXn94k5.js +2 -0
- package/dist/client/assets/{previewMiniPlayerStore-DwJUVJAq.js → previewMiniPlayerStore-DguWdL1f.js} +2 -2
- package/dist/client/assets/primary-BDoRkJqU.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-Cc0Xobh6.js +2 -0
- package/dist/client/assets/projectFilesQueryState-BdfD5cZ2.js +2 -0
- package/dist/client/assets/projectScriptEditor-faOsFlds.js +2 -0
- package/dist/client/assets/{providerSkills-B9Q5OmXk.js → providerSkills-C8PrnHb-.js} +2 -2
- package/dist/client/assets/{pullRequestDetail.logic-CVJbFct1.js → pullRequestDetail.logic-kOhR5jr9.js} +4 -4
- package/dist/client/assets/{pullRequestIcons-ZE5MB0dW.js → pullRequestIcons-CbDg0o8q.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-CF0UmQoG.js → pullRequestReviewStore-0WIH92NQ.js} +2 -2
- package/dist/client/assets/pullRequests-Cf9E2kW-.js +2 -0
- package/dist/client/assets/queries-Cl508kPw.js +2 -0
- package/dist/client/assets/query-D3KVoW9G.js +2 -0
- package/dist/client/assets/radio-group-BnZVD-CO.js +2 -0
- package/dist/client/assets/relay-Do9UB5iT.js +2 -0
- package/dist/client/assets/{renderScheduler-BLYWx2Dl.js → renderScheduler-DsjkE3rh.js} +2 -2
- package/dist/client/assets/{rightPanelStore-BzpX6F8n.js → rightPanelStore-DB1OP4MT.js} +2 -2
- package/dist/client/assets/runtime-BBYIQ0f-.js +7 -0
- package/dist/client/assets/runtimeModeConfig-CRXk0H6e.js +2 -0
- package/dist/client/assets/scheduledTasksSettings.logic-Dw_swg_M.js +3 -0
- package/dist/client/assets/{scroll-area-BN4-XX3T.js → scroll-area-Cm9XZdHp.js} +2 -2
- package/dist/client/assets/{select-CHOl11x1.js → select-Cz_1ByI4.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-BTdfhZ3z.js → selfImproveFindings-DtoTFNL_.js} +2 -2
- package/dist/client/assets/semver-BoU8Be_3.js +2 -0
- package/dist/client/assets/server-Dkj4NeYG.js +2 -0
- package/dist/client/assets/session-CBEVNHld.js +2 -0
- package/dist/client/assets/{session-logic-BwAELIPU.js → session-logic-DB_ei-pn.js} +5 -5
- package/dist/client/assets/{settings-fuKhbSed.js → settings-Yvo1RMvg.js} +2 -2
- package/dist/client/assets/{settings.appearance-K-0McYk9.js → settings.appearance-ONDNW-gc.js} +2 -2
- package/dist/client/assets/settings.archived-CjdyCMyi.js +2 -0
- package/dist/client/assets/{settings.computer-use-C8dDJqmo.js → settings.computer-use-97ffp9C_.js} +2 -2
- package/dist/client/assets/settings.connections-w3qKRKGa.js +2 -0
- package/dist/client/assets/settings.data-controls-C8ozSexu.js +2 -0
- package/dist/client/assets/{settings.decisions-C1RgAwXn.js → settings.decisions-BvR3_OTv.js} +2 -2
- package/dist/client/assets/{settings.designs-BgEqEGXM.js → settings.designs-CB8PWHwW.js} +2 -2
- package/dist/client/assets/settings.diagnostics-DdInPrq0.js +2 -0
- package/dist/client/assets/{settings.general-BeLPMggF.js → settings.general-Cf_bIbyH.js} +2 -2
- package/dist/client/assets/settings.integrations-pj9KVvtd.js +2 -0
- package/dist/client/assets/settings.keybindings-3diGciV1.js +2 -0
- package/dist/client/assets/{settings.open-source-licenses-DWVgu9MJ.js → settings.open-source-licenses-DlqO6HBa.js} +2 -2
- package/dist/client/assets/{settings.plugins-DsfEfMST.js → settings.plugins-DpaJJH_J.js} +4 -4
- package/dist/client/assets/settings.projects-Bfh3CJ1a.js +4 -0
- package/dist/client/assets/settings.providers-DNiEeQYT.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-BJMUub-y.js → settings.scheduled-tasks-BIaHEXVF.js} +2 -2
- package/dist/client/assets/settings.secrets-BSNXem5A.js +2 -0
- package/dist/client/assets/{settings.snap-shot-6aF3J4Zd.js → settings.snap-shot-Ds0ywKhE.js} +2 -2
- package/dist/client/assets/settings.source-control-C41AVNSm.js +2 -0
- package/dist/client/assets/settings.storage-B-Hm5vEC.js +2 -0
- package/dist/client/assets/settingsLayout-BbEwQ6Fy.js +3 -0
- package/dist/client/assets/{sidebar-Dt9UYgk1.js → sidebar-B70J7v16.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-lpBYOlht.js → sidebarProjectGrouping-Cy06FqQF.js} +2 -2
- package/dist/client/assets/{skeleton-BiqtjWsk.js → skeleton-BavPX8IL.js} +2 -2
- package/dist/client/assets/sourceControl-De64nxc-.js +2 -0
- package/dist/client/assets/{sourceControlClients-Bcd4sqEi.js → sourceControlClients-BofXnV5S.js} +2 -2
- package/dist/client/assets/{spinner-C64jtA3m.js → spinner-BiCpg0TU.js} +2 -2
- package/dist/client/assets/terminal-links-DkNuyYrs.js +2 -0
- package/dist/client/assets/terminalSessions-BLnAzTpE.js +2 -0
- package/dist/client/assets/{textarea-DtceyvOF.js → textarea-DPWqoJRQ.js} +2 -2
- package/dist/client/assets/themePalette-1UQmJk98.js +5 -0
- package/dist/client/assets/{threadCheckpoints-BXz5LJLz.js → threadCheckpoints-C5aLz9nv.js} +2 -2
- package/dist/client/assets/{toggle-Be7gb_vD.js → toggle-DERKSGyC.js} +2 -2
- package/dist/client/assets/{toggle-group-Cz65VaLC.js → toggle-group-DYSJFIn3.js} +2 -2
- package/dist/client/assets/tooltip-C7NAkYG3.js +2 -0
- package/dist/client/assets/{uiStateStore-yyuUmO2M.js → uiStateStore-FYiLqqos.js} +2 -2
- package/dist/client/assets/usage-CtcqAwlu.js +2 -0
- package/dist/client/assets/{usageAccess-0MZ9DMCW.js → usageAccess-2Wks5kIN.js} +2 -2
- package/dist/client/assets/{usageFormat-4k8-70X2.js → usageFormat-BZJ9qCn4.js} +2 -2
- package/dist/client/assets/{usageShortcuts-C4Dhwzkz.js → usageShortcuts-BJyp1xT6.js} +2 -2
- package/dist/client/assets/use-atom-command-BbFDhw_c.js +2 -0
- package/dist/client/assets/useAriaLabelledBy-BJnK5b5h.js +2 -0
- package/dist/client/assets/useHandleNewThread-C6MtV3AM.js +2 -0
- package/dist/client/assets/{useLocation-_8If3LN3.js → useLocation-NTw9A5XQ.js} +2 -2
- package/dist/client/assets/{useNavigate-5WivMyAa.js → useNavigate-DV9bXnWr.js} +2 -2
- package/dist/client/assets/{useNavigateBack-DXfbYF86.js → useNavigateBack-D62rsj_4.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-D0Equ6mY.js → useP4ConnectAuthPrompt-Bj5GIxgy.js} +2 -2
- package/dist/client/assets/{useParams-DV-Nw6Lj.js → useParams-jklHVL7l.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-CIobAIHF.js → usePermissionStatus-DaCu90iN.js} +2 -2
- package/dist/client/assets/usePopupViewport-D1lXH2SQ.js +2 -0
- package/dist/client/assets/usePreviousValue-Dx4Nv0v8.js +2 -0
- package/dist/client/assets/usePullRequestActions-WFmep5Tm.js +3 -0
- package/dist/client/assets/useRegisterFieldControl-BtJcyaxh.js +2 -0
- package/dist/client/assets/{useScopedModelAvailability-Cc-bmdqn.js → useScopedModelAvailability-hsJL85Tg.js} +2 -2
- package/dist/client/assets/useSettings-EYJbJzT3.js +3 -0
- package/dist/client/assets/utils-DjbLtxuo.js +37 -0
- package/dist/client/assets/vcsRefInvalidation-DkXoQApH.js +2 -0
- package/dist/client/assets/welcome-uKSqaFeK.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/{renderer-D_KFqL06.mjs → renderer-D9dDeERN.mjs} +68 -13
- package/dist/{runtime-Tslhhp69.mjs → runtime-C3UJDGLb.mjs} +81 -11
- package/package.json +1 -1
- package/dist/AcpMcpStdioBridge-BinVfs5k.mjs +0 -3
- package/dist/client/assets/AlertDialogRoot-z7O2CaB2.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-DQjnXjt6.js +0 -2
- package/dist/client/assets/ChatMarkdown-C7ocX514.js +0 -48
- package/dist/client/assets/CheckboxIndicator-D2jNOqVc.js +0 -2
- package/dist/client/assets/ClippedText-CDOkzr7r.js +0 -2
- package/dist/client/assets/CodexSetupSection.logic-BIpypa3y.js +0 -2
- package/dist/client/assets/ComboboxClear-CPvB2whi.js +0 -2
- package/dist/client/assets/ComboboxGroupLabel-DN75A_2f.js +0 -2
- package/dist/client/assets/CompositeRoot-Jf3zEGLN.js +0 -2
- package/dist/client/assets/ConnectAgentSurface-Cv2oB5Cw.js +0 -2
- package/dist/client/assets/DevicePanel-CKWUjHEE.js +0 -2
- package/dist/client/assets/DeviceSetup-BrOsu1Y4.js +0 -2
- package/dist/client/assets/DialogTitle-COHuuWBE.js +0 -2
- package/dist/client/assets/DiffPanel-CGIIHSDI.js +0 -2
- package/dist/client/assets/FieldControl-Yp1Yjlg7.js +0 -2
- package/dist/client/assets/FormContext-BEFZtJu9.js +0 -2
- package/dist/client/assets/Input-CVeLgfX4.js +0 -2
- package/dist/client/assets/JZOYTAAL-Bngs0npp.js +0 -1
- package/dist/client/assets/KeybindingsSettings.logic-A_266dBm.js +0 -2
- package/dist/client/assets/LinkMachineSelect-tm04n5mK.js +0 -2
- package/dist/client/assets/P4ConnectAccountPages-BkOCG7hq.js +0 -2
- package/dist/client/assets/PanelLayoutControls-amKHUz1V.js +0 -216
- package/dist/client/assets/PierreEntryIcon-CbhCWTjd.js +0 -2
- package/dist/client/assets/PopoverHandle-DbGxLy3d.js +0 -2
- package/dist/client/assets/PreviewPanel-B1KmgL5R.js +0 -2
- package/dist/client/assets/ProjectDefaultsSettings-D_2ixmme.js +0 -2
- package/dist/client/assets/ProjectFavicon-BXd2O1Gh.js +0 -3
- package/dist/client/assets/ProviderModelPicker-DJl5IM1n.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-BcFFbURH.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-DianZAsM.js +0 -23
- package/dist/client/assets/ScheduledTasksSettings-BHT9WAFD.js +0 -6
- package/dist/client/assets/ScrollAreaCorner-DW6lxPPn.js +0 -2
- package/dist/client/assets/SelectScrollUpArrow-DZfqWvZD.js +0 -2
- package/dist/client/assets/SettingsPanels-CrMsCqvq.js +0 -46
- package/dist/client/assets/ThemeEditorPanel-BuMI6s2A.js +0 -5
- package/dist/client/assets/ThreadTerminalDrawer-FZ0zyNm1.js +0 -5
- package/dist/client/assets/TooltipViewport-DjveMpIl.js +0 -2
- package/dist/client/assets/_chat-P2jEGe91.js +0 -47
- package/dist/client/assets/_chat.design-k56_YrCY.js +0 -2
- package/dist/client/assets/_chat.index-CUR_1FMo.js +0 -2
- package/dist/client/assets/_chat.new-7EgBpaGD.js +0 -4
- package/dist/client/assets/_chat.pull-requests-C97pdH91.js +0 -2
- package/dist/client/assets/assetUrls-ChygJppW.js +0 -2
- package/dist/client/assets/assets-Cv1qxio9.js +0 -2
- package/dist/client/assets/browserHistoryStore-PB9BBl0N.js +0 -2
- package/dist/client/assets/connect-agent-BitywHYq.js +0 -2
- package/dist/client/assets/design-NrL4Xyzh.js +0 -2
- package/dist/client/assets/device-DsIsK_g9.js +0 -2
- package/dist/client/assets/draft-input-Cp7zSsLs.js +0 -2
- package/dist/client/assets/entities-Ci9sZwRJ.js +0 -2
- package/dist/client/assets/main-CKOKCTSr.css +0 -2
- package/dist/client/assets/main-CRJyb41E.js +0 -37
- package/dist/client/assets/mediaSource-BQpgJ9hG.js +0 -2
- package/dist/client/assets/number-field-pjPmm2hH.js +0 -2
- package/dist/client/assets/onboarding-C7BynXti.js +0 -2
- package/dist/client/assets/openFileInPreview-Cs7GoIEO.js +0 -2
- package/dist/client/assets/popover-oNrAhEOs.js +0 -2
- package/dist/client/assets/preview-CAzlFJXG.js +0 -2
- package/dist/client/assets/preview-D8H2Itzr.js +0 -2
- package/dist/client/assets/primary-BdVzsWIK.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-eu2avrjG.js +0 -2
- package/dist/client/assets/projectFilesQueryState-f8odJKc-.js +0 -2
- package/dist/client/assets/projectScriptEditor-D8Os7g21.js +0 -2
- package/dist/client/assets/pullRequests-p7FMtHTx.js +0 -2
- package/dist/client/assets/queries-C1_RUJ-8.js +0 -2
- package/dist/client/assets/query-DszcgUku.js +0 -2
- package/dist/client/assets/radio-group-Cb2KobOI.js +0 -2
- package/dist/client/assets/runtime-CcgzOADx.js +0 -6
- package/dist/client/assets/runtime-D2NRh41I.js +0 -3
- package/dist/client/assets/runtimeModeConfig-DTaQ5JjA.js +0 -2
- package/dist/client/assets/scheduledTasksSettings.logic-FST8Bc6V.js +0 -3
- package/dist/client/assets/semver-CFbvOQKc.js +0 -2
- package/dist/client/assets/server-C-cSQN_G.js +0 -2
- package/dist/client/assets/session-D6BRf77P.js +0 -2
- package/dist/client/assets/settings.archived-CalSrYkZ.js +0 -2
- package/dist/client/assets/settings.connections-D_XSkcFH.js +0 -2
- package/dist/client/assets/settings.data-controls-CTlXbRrO.js +0 -2
- package/dist/client/assets/settings.diagnostics-BxqI_9bx.js +0 -2
- package/dist/client/assets/settings.integrations-4rKfTDFW.js +0 -2
- package/dist/client/assets/settings.keybindings-DSavoJxs.js +0 -2
- package/dist/client/assets/settings.projects-CJzRAMVM.js +0 -4
- package/dist/client/assets/settings.providers-BoTCdGuy.js +0 -3
- package/dist/client/assets/settings.secrets-Ch_XS6ak.js +0 -2
- package/dist/client/assets/settings.source-control-B7PW3yi5.js +0 -2
- package/dist/client/assets/settings.storage-PmxiGFaE.js +0 -2
- package/dist/client/assets/settingsLayout-fG812pJ2.js +0 -3
- package/dist/client/assets/sourceControl-BUEFlHbW.js +0 -2
- package/dist/client/assets/terminal-links-DxE1mEi0.js +0 -2
- package/dist/client/assets/terminalSessions-Ceajv0BZ.js +0 -2
- package/dist/client/assets/themePalette-tZPF0oN0.js +0 -5
- package/dist/client/assets/toast-BYGaCmZu.js +0 -2
- package/dist/client/assets/tooltip-BYZIg_IY.js +0 -2
- package/dist/client/assets/usage-B6rUsIoY.js +0 -2
- package/dist/client/assets/use-atom-command-DEluSG6k.js +0 -2
- package/dist/client/assets/useAriaLabelledBy-Ca8fkLAD.js +0 -2
- package/dist/client/assets/useHandleNewThread-BOej8pJq.js +0 -2
- package/dist/client/assets/usePullRequestActions-Cf39XlVv.js +0 -3
- package/dist/client/assets/useRegisterFieldControl-Dmsxd6H8.js +0 -2
- package/dist/client/assets/useSettings-jZr_DfW0.js +0 -3
- package/dist/client/assets/utils-OWUgXvpr.js +0 -37
- package/dist/client/assets/vcsRefInvalidation-CRToBQE1.js +0 -2
- package/dist/client/assets/welcome-BcjbPbMq.js +0 -2
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Ab as e,Eb as t,GE as n,nx as r,pb as i,vb as a}from"./utils-DjbLtxuo.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+)?)`,f=`${d}%`,p=`(?:${d}%|${d})`,m=`(?:${d}%|${d}|none)`,h=`(?:${d}(deg|grad|rad|turn)|${d})`,g=`\\s*,\\s*`;RegExp(`^`+m+`$`);var ee=RegExp(`^rgba?\\(\\s*${d}${g}${d}${g}${d}\\s*(?:,\\s*${p}\\s*)?\\)$`),te=RegExp(`^rgba?\\(\\s*${f}${g}${f}${g}${f}\\s*(?:,\\s*${p}\\s*)?\\)$`),ne=e=>{let t={mode:`rgb`},n;if(n=e.match(ee))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(te))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]===void 0?n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))):t.alpha=Math.max(0,Math.min(1,n[4]/100)),t},re=(e,t)=>e===void 0?void 0:typeof e==`object`?e.mode===void 0?t?{...e,mode:t}:void 0:e:be(e),ie=(e=`rgb`)=>t=>(t=re(t,e))===void 0?void 0:t.mode===e?t:_[t.mode][e]?_[t.mode][e](t):e===`rgb`?_[t.mode].rgb(t):_.rgb[e](_[t.mode].rgb(t)),_={},ae={},v=[],oe={},se=e=>e,y=e=>(_[e.mode]={..._[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{_[t]||(_[t]={}),_[t][e.mode]=e.fromMode[t]}),e.ranges||={},e.difference||={},e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]==`function`&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=se)}),ae[e.mode]=e,(e.parse||[]).forEach(t=>{le(t,e.mode)}),ie(e.mode)),ce=e=>ae[e],le=(e,t)=>{if(typeof e==`string`){if(!t)throw Error(`'mode' required when 'parser' is a string`);oe[e]=t}else typeof e==`function`&&v.indexOf(e)<0&&v.push(e)},ue=/[^\x00-\x7F]|[a-zA-Z_]/,de=/[^\x00-\x7F]|[-\w]/,b={Function:`function`,Ident:`ident`,Number:`number`,Percentage:`percentage`,ParenClose:`)`,None:`none`,Hue:`hue`,Alpha:`alpha`},x=0;function fe(e){let t=e[x],n=e[x+1];return t===`-`||t===`+`?/\d/.test(n)||n===`.`&&/\d/.test(e[x+2]):t===`.`?/\d/.test(n):/\d/.test(t)}function pe(e){if(x>=e.length)return!1;let t=e[x];if(ue.test(t))return!0;if(t===`-`){if(e.length-x<2)return!1;let t=e[x+1];return!!(t===`-`||ue.test(t))}return!1}var me={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function S(e){let t=``;if((e[x]===`-`||e[x]===`+`)&&(t+=e[x++]),t+=C(e),e[x]===`.`&&/\d/.test(e[x+1])&&(t+=e[x++]+C(e)),(e[x]===`e`||e[x]===`E`)&&((e[x+1]===`-`||e[x+1]===`+`)&&/\d/.test(e[x+2])?t+=e[x++]+e[x++]+C(e):/\d/.test(e[x+1])&&(t+=e[x++]+C(e))),pe(e)){let n=w(e);return n===`deg`||n===`rad`||n===`turn`||n===`grad`?{type:b.Hue,value:t*me[n]}:void 0}return e[x]===`%`?(x++,{type:b.Percentage,value:+t}):{type:b.Number,value:+t}}function C(e){let t=``;for(;/\d/.test(e[x]);)t+=e[x++];return t}function w(e){let t=``;for(;x<e.length&&de.test(e[x]);)t+=e[x++];return t}function he(e){let t=w(e);return e[x]===`(`?(x++,{type:b.Function,value:t}):t===`none`?{type:b.None,value:void 0}:{type:b.Ident,value:t}}function ge(e=``){let t=e.trim(),n=[],r;for(x=0;x<t.length;)if(r=t[x++],r===`
|
|
2
|
+
`||r===` `||r===` `)for(;x<t.length&&(t[x]===`
|
|
3
|
+
`||t[x]===` `||t[x]===` `);)x++;else{if(r===`,`)return;if(r===`)`)n.push({type:b.ParenClose});else{if(r===`+`){if(x--,fe(t)){n.push(S(t));continue}return}if(r===`-`){if(x--,fe(t)){n.push(S(t));continue}if(pe(t)){n.push({type:b.Ident,value:w(t)});continue}return}if(r===`.`){if(x--,fe(t)){n.push(S(t));continue}return}if(r===`/`){for(;x<t.length&&(t[x]===`
|
|
4
|
+
`||t[x]===` `||t[x]===` `);)x++;let e;if(fe(t)&&(e=S(t),e.type!==b.Hue)){n.push({type:b.Alpha,value:e});continue}if(pe(t)&&w(t)===`none`){n.push({type:b.Alpha,value:{type:b.None,value:void 0}});continue}return}if(/\d/.test(r))x--,n.push(S(t));else if(ue.test(r))x--,n.push(he(t));else return}}return n}function _e(e){e._i=0;let t=e[e._i++];if(!t||t.type!==b.Function||t.value!==`color`||(t=e[e._i++],t.type!==b.Ident))return;let n=oe[t.value];if(!n)return;let r={mode:n},i=ve(e,!1);if(!i)return;let a=ce(n).channels;for(let e=0,t,n;e<a.length;e++)t=i[e],n=a[e],t.type!==b.None&&(r[n]=t.type===b.Number?t.value:t.value/100,n===`alpha`&&(r[n]=Math.max(0,Math.min(1,r[n]))));return r}function ve(e,t){let n=[],r;for(;e._i<e.length;)if(r=e[e._i++],r.type===b.None||r.type===b.Number||r.type===b.Alpha||r.type===b.Percentage||t&&r.type===b.Hue)n.push(r);else if(r.type===b.ParenClose){if(e._i<e.length)return}else return;if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==b.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:b.None,value:void 0}),n.every(e=>e.type!==b.Alpha)?n:void 0}}function ye(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==b.Function)return;let r=ve(e,t);if(r)return r.unshift(n.value),r}var be=e=>{if(typeof e!=`string`)return;let t=ge(e),n=t?ye(t,!0):void 0,r,i=0,a=v.length;for(;i<a;)if((r=v[i++](e,n))!==void 0)return r;return t?_e(t):void 0};function xe(e,t){if(!t||t[0]!==`rgb`&&t[0]!==`rgba`)return;let n={mode:`rgb`},[,r,i,a,o]=t;if(r.type!==b.Hue&&i.type!==b.Hue&&a.type!==b.Hue)return r.type!==b.None&&(n.r=r.type===b.Number?r.value/255:r.value/100),i.type!==b.None&&(n.g=i.type===b.Number?i.value/255:i.value/100),a.type!==b.None&&(n.b=a.type===b.Number?a.value/255:a.value/100),o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var Se=e=>e===`transparent`?{mode:`rgb`,r:0,g:0,b:0,alpha:0}:void 0,Ce=(e,t,n)=>e+n*(t-e),we=e=>{let t=[];for(let n=0;n<e.length-1;n++){let r=e[n],i=e[n+1];r===void 0&&i===void 0?t.push(void 0):r!==void 0&&i!==void 0?t.push([r,i]):t.push(r===void 0?[i,i]:[r,r])}return t},T=(e=>t=>{let n=we(t);return t=>{let r=t*n.length,i=t>=1?n.length-1:Math.max(Math.floor(r),0),a=n[i];return a===void 0?void 0:e(a[0],a[1],r-i)}})(Ce),E=e=>{let t=!1,n=e.map(e=>e===void 0?1:(t=!0,e));return t?n:e},D={mode:`rgb`,channels:[`r`,`g`,`b`,`alpha`],parse:[xe,u,ne,c,Se,`srgb`],serialize:`srgb`,interpolate:{r:T,g:T,b:T,alpha:{use:T,fixup:E}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Te=(e=0)=>Math.abs(e)**(563/256)*Math.sign(e),Ee=e=>{let t=Te(e.r),n=Te(e.g),r=Te(e.b),i={mode:`xyz65`,x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},De=e=>Math.abs(e)**(256/563)*Math.sign(e),Oe=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`a98`,r:De(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:De(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:De(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},ke=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*((t+.055)/1.055)**2.4},O=({r:e,g:t,b:n,alpha:r})=>{let i={mode:`lrgb`,r:ke(e),g:ke(t),b:ke(n)};return r!==void 0&&(i.alpha=r),i},k=e=>{let{r:t,g:n,b:r,alpha:i}=O(e),a={mode:`xyz65`,x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(a.alpha=i),a},Ae=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*t**(1/2.4)-.055):e*12.92},A=({r:e,g:t,b:n,alpha:r},i=`rgb`)=>{let a={mode:i,r:Ae(e),g:Ae(t),b:Ae(n)};return r!==void 0&&(a.alpha=r),a},j=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=A({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i},je={...D,mode:`a98`,parse:[`a98-rgb`],serialize:`a98-rgb`,fromMode:{rgb:e=>Oe(k(e)),xyz65:Oe},toMode:{rgb:e=>j(Ee(e)),xyz65:Ee}},M=e=>(e%=360)<0?e+360:e;function Me({h:e,s:t,l:n,alpha:r}){e=M(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=n+t*(n<.5?n:1-n),a=i-(i-n)*2*Math.abs(e/60%2-1),o;switch(Math.floor(e/60)){case 0:o={r:i,g:a,b:2*n-i};break;case 1:o={r:a,g:i,b:2*n-i};break;case 2:o={r:2*n-i,g:i,b:a};break;case 3:o={r:2*n-i,g:a,b:i};break;case 4:o={r:a,g:2*n-i,b:i};break;case 5:o={r:i,g:2*n-i,b:a};break;default:o={r:2*n-i,g:2*n-i,b:2*n-i}}return o.mode=`rgb`,r!==void 0&&(o.alpha=r),o}function Ne({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsl`,s:i===a?0:(i-a)/(1-Math.abs(i+a-1)),l:.5*(i+a)};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t<n)*6:i===t?(n-e)/(i-a)+2:(e-t)/(i-a)+4)*60),r!==void 0&&(o.alpha=r),o}var Pe=(e,t)=>{switch(t){case`deg`:return+e;case`rad`:return e/Math.PI*180;case`grad`:return e/10*9;case`turn`:return e*360}},Fe=RegExp(`^hsla?\\(\\s*${h}${g}${f}${g}${f}\\s*(?:,\\s*${p}\\s*)?\\)$`),Ie=e=>{let t=e.match(Fe);if(!t)return;let n={mode:`hsl`};return t[3]===void 0?t[1]!==void 0&&t[2]!==void 0&&(n.h=Pe(t[1],t[2])):n.h=+t[3],t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]===void 0?t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))):n.alpha=Math.max(0,Math.min(1,t[6]/100)),n};function Le(e,t){if(!t||t[0]!==`hsl`&&t[0]!==`hsla`)return;let n={mode:`hsl`},[,r,i,a,o]=t;if(r.type!==b.None){if(r.type===b.Percentage)return;n.h=r.value}if(i.type!==b.None){if(i.type===b.Hue)return;n.s=i.value/100}if(a.type!==b.None){if(a.type===b.Hue)return;n.l=a.value/100}return o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var Re=(e,t)=>e.map((n,r,i)=>{if(n===void 0)return n;let a=M(n);return r===0||e[r-1]===void 0?a:t(a-M(i[r-1]))}).reduce((e,t)=>!e.length||t===void 0||e[e.length-1]===void 0?(e.push(t),e):(e.push(t+e[e.length-1]),e),[]),ze=e=>Re(e,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),Be=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=M(e.h),r=M(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},Ve=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=M(e.h),r=M(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},He=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=M(e.h),r=M(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},Ue=e=>{let t=e.reduce((e,t)=>{if(t!==void 0){let n=t*Math.PI/180;e.sin+=Math.sin(n),e.cos+=Math.cos(n)}return e},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},We={mode:`hsl`,toMode:{rgb:Me},fromMode:{rgb:Ne},channels:[`h`,`s`,`l`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[Le,Ie],serialize:e=>`hsl(${e.h===void 0?`none`:e.h} ${e.s===void 0?`none`:e.s*100+`%`} ${e.l===void 0?`none`:e.l*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:T,fixup:ze},s:T,l:T,alpha:{use:T,fixup:E}},difference:{h:Be},average:{h:Ue}};function Ge({h:e,s:t,v:n,alpha:r}){e=M(e===void 0?0:e),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:n,g:n*(1-t*i),b:n*(1-t)};break;case 1:a={r:n*(1-t*i),g:n,b:n*(1-t)};break;case 2:a={r:n*(1-t),g:n,b:n*(1-t*i)};break;case 3:a={r:n*(1-t),g:n*(1-t*i),b:n};break;case 4:a={r:n*(1-t*i),g:n*(1-t),b:n};break;case 5:a={r:n,g:n*(1-t),b:n*(1-t*i)};break;default:a={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return a.mode=`rgb`,r!==void 0&&(a.alpha=r),a}function Ke({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),a=Math.min(e,t,n),o={mode:`hsv`,s:i===0?0:1-a/i,v:i};return i-a!==0&&(o.h=(i===e?(t-n)/(i-a)+(t<n)*6:i===t?(n-e)/(i-a)+2:(e-t)/(i-a)+4)*60),r!==void 0&&(o.alpha=r),o}var qe={mode:`hsv`,toMode:{rgb:Ge},parse:[`--hsv`],serialize:`--hsv`,fromMode:{rgb:Ke},channels:[`h`,`s`,`v`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,interpolate:{h:{use:T,fixup:ze},s:T,v:T,alpha:{use:T,fixup:E}},difference:{h:Be},average:{h:Ue}};function Je({h:e,w:t,b:n,alpha:r}){if(t===void 0&&(t=0),n===void 0&&(n=0),t+n>1){let e=t+n;t/=e,n/=e}return Ge({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function Ye(e){let t=Ke(e);if(t===void 0)return;let n=t.s===void 0?0:t.s,r=t.v===void 0?0:t.v,i={mode:`hwb`,w:(1-n)*r,b:1-r};return t.h!==void 0&&(i.h=t.h),t.alpha!==void 0&&(i.alpha=t.alpha),i}function Xe(e,t){if(!t||t[0]!==`hwb`)return;let n={mode:`hwb`},[,r,i,a,o]=t;if(r.type!==b.None){if(r.type===b.Percentage)return;n.h=r.value}if(i.type!==b.None){if(i.type===b.Hue)return;n.w=i.value/100}if(a.type!==b.None){if(a.type===b.Hue)return;n.b=a.value/100}return o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var Ze={mode:`hwb`,toMode:{rgb:Je},fromMode:{rgb:Ye},channels:[`h`,`w`,`b`,`alpha`],ranges:{h:[0,360]},gamut:`rgb`,parse:[Xe],serialize:e=>`hwb(${e.h===void 0?`none`:e.h} ${e.w===void 0?`none`:e.w*100+`%`} ${e.b===void 0?`none`:e.b*100+`%`}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:T,fixup:ze},w:T,b:T,alpha:{use:T,fixup:E}},difference:{h:Ve},average:{h:Ue}},Qe=29**3/27,$e=216/29**3,N={X:.3457/.3585,Y:1,Z:.2958/.3585},P={X:.3127/.329,Y:1,Z:.3583/.329},et=e=>e**3>$e?e**3:(116*e-16)/Qe,tt=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz50`,x:et(a)*N.X,y:et(i)*N.Y,z:et(o)*N.Z};return r!==void 0&&(s.alpha=r),s},nt=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=A({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i},rt=e=>nt(tt(e)),it=e=>{let{r:t,g:n,b:r,alpha:i}=O(e),a={mode:`xyz50`,x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(a.alpha=i),a},at=e=>e>$e?Math.cbrt(e):(Qe*e+16)/116,ot=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=at(e/N.X),a=at(t/N.Y),o=at(n/N.Z),s={mode:`lab`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s},st=e=>{let t=ot(it(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function ct(e,t){if(!t||t[0]!==`lab`)return;let n={mode:`lab`},[,r,i,a,o]=t;if(r.type!==b.Hue&&i.type!==b.Hue&&a.type!==b.Hue)return r.type!==b.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==b.None&&(n.a=i.type===b.Number?i.value:i.value*125/100),a.type!==b.None&&(n.b=a.type===b.Number?a.value:a.value*125/100),o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var lt={mode:`lab`,toMode:{xyz50:tt,rgb:rt},fromMode:{xyz50:ot,rgb:st},channels:[`l`,`a`,`b`,`alpha`],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ct],serialize:e=>`lab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:E}}},ut=29**3/27,dt=216/29**3,ft=e=>e**3>dt?e**3:(116*e-16)/ut,pt=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,a=t/500+i,o=i-n/200,s={mode:`xyz65`,x:ft(a)*P.X,y:ft(i)*P.Y,z:ft(o)*P.Z};return r!==void 0&&(s.alpha=r),s},mt=e=>j(pt(e)),ht=e=>e>dt?Math.cbrt(e):(ut*e+16)/116,gt=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ht(e/P.X),a=ht(t/P.Y),o=ht(n/P.Z),s={mode:`lab65`,l:116*a-16,a:500*(i-a),b:200*(a-o)};return r!==void 0&&(s.alpha=r),s},_t=e=>{let t=gt(k(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},vt={...lt,mode:`lab65`,parse:[`--lab-d65`],serialize:`--lab-d65`,toMode:{xyz65:pt,rgb:mt},fromMode:{xyz65:gt,rgb:_t},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},F=({l:e,a:t,b:n,alpha:r},i=`lch`)=>{t===void 0&&(t=0),n===void 0&&(n=0);let a=Math.sqrt(t*t+n*n),o={mode:i,l:e,c:a};return a&&(o.h=M(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},I=({l:e,c:t,h:n,alpha:r},i=`lab`)=>{n===void 0&&(n=0);let a={mode:i,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(a.alpha=r),a};function yt(e,t){if(!t||t[0]!==`lch`)return;let n={mode:`lch`},[,r,i,a,o]=t;if(r.type!==b.None){if(r.type===b.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==b.None&&(n.c=Math.max(0,i.type===b.Number?i.value:i.value*150/100)),a.type!==b.None){if(a.type===b.Percentage)return;n.h=a.value}return o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var bt={mode:`lch`,toMode:{lab:I,rgb:e=>rt(I(e))},fromMode:{rgb:e=>F(st(e)),lab:F},channels:[`l`,`c`,`h`,`alpha`],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[yt],serialize:e=>`lch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,interpolate:{h:{use:T,fixup:ze},c:T,l:T,alpha:{use:T,fixup:E}},difference:{h:He},average:{h:Ue}},xt={...bt,mode:`lch65`,parse:[`--lch-d65`],serialize:`--lch-d65`,toMode:{lab65:e=>I(e,`lab65`),rgb:e=>mt(I(e,`lab65`))},fromMode:{rgb:e=>F(_t(e),`lch65`),lab65:e=>F(e,`lch65`)},ranges:{l:[0,100],c:[0,150],h:[0,360]}},St={...D,mode:`lrgb`,toMode:{rgb:A},fromMode:{rgb:O},parse:[`srgb-linear`],serialize:`srgb-linear`},Ct=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+.3963377773761749*t+.2158037573099136*n)**3,a=(e-.1055613458156586*t-.0638541728258133*n)**3,o=(e-.0894841775298119*t-1.2914855480194092*n)**3,s={mode:`lrgb`,r:4.076741636075957*i-3.3077115392580616*a+.2309699031821044*o,g:-1.2684379732850317*i+2.6097573492876887*a-.3413193760026573*o,b:-.0041960761386756*i-.7034186179359362*a+1.7076146940746117*o};return r!==void 0&&(s.alpha=r),s},wt=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),s={mode:`oklab`,l:.210454268309314*i+.7936177747023054*a-.0040720430116193*o,a:1.9779985324311684*i-2.42859224204858*a+.450593709617411*o,b:.0259040424655478*i+.7827717124575296*a-.8086757549230774*o};return r!==void 0&&(s.alpha=r),s},Tt=e=>{let t=wt(O(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Et=e=>A(Ct(e));function Dt(e,t){if(!t||t[0]!==`oklab`)return;let n={mode:`oklab`},[,r,i,a,o]=t;if(r.type!==b.Hue&&i.type!==b.Hue&&a.type!==b.Hue)return r.type!==b.None&&(n.l=Math.min(Math.max(0,r.type===b.Number?r.value:r.value/100),1)),i.type!==b.None&&(n.a=i.type===b.Number?i.value:i.value*.4/100),a.type!==b.None&&(n.b=a.type===b.Number?a.value:a.value*.4/100),o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var Ot={...lt,mode:`oklab`,toMode:{lrgb:Ct,rgb:Et},fromMode:{lrgb:wt,rgb:Tt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Dt],serialize:e=>`oklab(${e.l===void 0?`none`:e.l} ${e.a===void 0?`none`:e.a} ${e.b===void 0?`none`:e.b}${e.alpha<1?` / ${e.alpha}`:``})`};function kt(e,t){if(!t||t[0]!==`oklch`)return;let n={mode:`oklch`},[,r,i,a,o]=t;if(r.type!==b.None){if(r.type===b.Hue)return;n.l=Math.min(Math.max(0,r.type===b.Number?r.value:r.value/100),1)}if(i.type!==b.None&&(n.c=Math.max(0,i.type===b.Number?i.value:i.value*.4/100)),a.type!==b.None){if(a.type===b.Percentage)return;n.h=a.value}return o.type!==b.None&&(n.alpha=Math.min(1,Math.max(0,o.type===b.Number?o.value:o.value/100))),n}var At={...bt,mode:`oklch`,toMode:{oklab:e=>I(e,`oklab`),rgb:e=>Et(I(e,`oklab`))},fromMode:{rgb:e=>F(Tt(e),`oklch`),oklab:e=>F(e,`oklch`)},parse:[kt],serialize:e=>`oklch(${e.l===void 0?`none`:e.l} ${e.c===void 0?`none`:e.c} ${e.h===void 0?`none`:e.h}${e.alpha<1?` / ${e.alpha}`:``})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},jt=e=>{let{r:t,g:n,b:r,alpha:i}=O(e),a={mode:`xyz65`,x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(a.alpha=i),a},Mt=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=A({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},`p3`);return r!==void 0&&(i.alpha=r),i},Nt={...D,mode:`p3`,parse:[`display-p3`],serialize:`display-p3`,fromMode:{rgb:e=>Mt(k(e)),xyz65:Mt},toMode:{rgb:e=>j(jt(e)),xyz65:jt}},Pt=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*t**(1/1.8):16*e},Ft=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`prophoto`,r:Pt(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Pt(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Pt(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},It=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*t**1.8:e/16},Lt=e=>{let t=It(e.r),n=It(e.g),r=It(e.b),i={mode:`xyz50`,x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},Rt={...D,mode:`prophoto`,parse:[`prophoto-rgb`],serialize:`prophoto-rgb`,fromMode:{xyz50:Ft,rgb:e=>Ft(it(e))},toMode:{xyz50:Lt,rgb:e=>nt(Lt(e))}},zt=1.09929682680944,Bt=.018053968510807,Vt=e=>{let t=Math.abs(e);return t>Bt?(Math.sign(e)||1)*(zt*t**.45-.09929682680944008):4.5*e},Ht=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:`rec2020`,r:Vt(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:Vt(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:Vt(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},Ut=1.09929682680944,Wt=.018053968510807,Gt=(e=0)=>{let t=Math.abs(e);return t<Wt*4.5?e/4.5:(Math.sign(e)||1)*((t+Ut-1)/Ut)**(1/.45)},Kt=e=>{let t=Gt(e.r),n=Gt(e.g),r=Gt(e.b),i={mode:`xyz65`,x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},qt={...D,mode:`rec2020`,fromMode:{xyz65:Ht,rgb:e=>Ht(k(e))},toMode:{xyz65:Kt,rgb:e=>j(Kt(e))},parse:[`rec2020`],serialize:`rec2020`},Jt={mode:`xyz50`,parse:[`xyz-d50`],serialize:`xyz-d50`,toMode:{rgb:nt,lab:ot},fromMode:{rgb:it,lab:tt},channels:[`x`,`y`,`z`,`alpha`],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:E}}},Yt={mode:`xyz65`,toMode:{rgb:j,xyz50:e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz50`,x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(a.alpha=i),a}},fromMode:{rgb:k,xyz50:e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let a={mode:`xyz65`,x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(a.alpha=i),a}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:[`x`,`y`,`z`,`alpha`],parse:[`xyz`,`xyz-d65`],serialize:`xyz-d65`,interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:E}}};y(je),y(We),y(qe),y(Ze),y(lt),y(vt),y(bt),y(xt),y(St),y(Ot),y(At),y(Nt),y(Rt),y(qt),y(D),y(Jt),y(Yt);var Xt=[`orchid`,`grove`,`ocean`,`ember`,`iris`];[...Xt];var L=new Set([`system`,`light`,`dark`,...Xt]);[...L];var Zt=`canvas.chrome.toolbar.toolbarForeground.toolbarBorder.toolbarControl.toolbarControlForeground.toolbarControlHover.surface.surfaceRaised.surfaceOverlay.text.textMuted.border.input.focus.accent.accentForeground.secondary.secondaryForeground.muted.mutedForeground.placeholder.secondaryLabel.iconMuted.error.errorForeground.errorSurface.warning.warningForeground.warningSurface.update.updateForeground.updateSurface.accentSurface.accentSurfaceForeground.messageSurface.messageForeground.messageAction.messageActionForeground.messageActionHover.codeBackground.codeForeground.searchMatchBackground.searchMatchForeground.searchMatchActiveBackground.searchMatchActiveForeground.sidebar.sidebarForeground.sidebarMutedForeground.sidebarControlSurface.sidebarRowHover.sidebarRowActive.sidebarRowSelected.sidebarBorder.terminalBackground.terminalForeground.terminalCursor.terminalSelection.terminalScrollbar.terminalScrollbarHover`.split(`.`),Qt={searchMatchBackground:`#ffde8b`,searchMatchForeground:`#21180a`,searchMatchActiveBackground:`#eea52b`,searchMatchActiveForeground:`#21180a`,canvas:`oklch(1 0 0)`,chrome:`#f4f4f4`,toolbar:`#f4f4f4`,toolbarForeground:`oklch(0.274 0.006 286.033)`,toolbarBorder:`oklch(0.92 0.004 286)`,toolbarControl:`oklch(1 0 0)`,toolbarControlForeground:`oklch(0.274 0.006 286.033)`,toolbarControlHover:`#f4f4f4`,surface:`oklch(1 0 0)`,surfaceRaised:`oklch(1 0 0)`,surfaceOverlay:`oklch(1 0 0)`,text:`oklch(0.274 0.006 286.033)`,textMuted:`oklch(0.442 0.017 285.786)`,border:`oklch(0.92 0.004 286)`,input:`oklch(0.871 0.006 286)`,focus:`oklch(0.546 0.215 262.881)`,accent:`oklch(0.546 0.215 262.881)`,accentForeground:`oklch(1 0 0)`,secondary:`oklch(0.977 0.001 286)`,secondaryForeground:`oklch(0.274 0.006 286.033)`,muted:`oklch(0.977 0.001 286)`,mutedForeground:`oklch(0.442 0.017 285.786)`,placeholder:`oklch(0.442 0.017 285.786)`,secondaryLabel:`oklch(0.442 0.017 285.786)`,iconMuted:`oklch(0.442 0.017 285.786)`,error:`oklch(0.637 0.237 25.331)`,errorForeground:`oklch(0.505 0.213 27.518)`,errorSurface:`#fcebec`,warning:`#fe9a00`,warningForeground:`#bb4d00`,warningSurface:`#fcf4e8`,update:`oklch(0.546 0.215 262.881)`,updateForeground:`oklch(0.546 0.215 262.881)`,updateSurface:`#e0e6f7`,accentSurface:`#f4f4f4`,accentSurfaceForeground:`oklch(0.21 0.006 286)`,messageSurface:`oklch(0.967 0.001 286)`,messageForeground:`oklch(0.274 0.006 286.033)`,messageAction:`oklch(0.546 0.215 262.881)`,messageActionForeground:`oklch(1 0 0)`,messageActionHover:`#3a72ed`,codeBackground:`oklch(1 0 0)`,codeForeground:`oklch(0.274 0.006 286.033)`,sidebar:`#f4f4f4`,sidebarForeground:`oklch(0.274 0.006 286.033)`,sidebarMutedForeground:`oklch(0.442 0.017 285.786)`,sidebarControlSurface:`oklch(0.977 0.001 286)`,sidebarRowHover:`#f4f4f4`,sidebarRowActive:`#e7e8e8`,sidebarRowSelected:`#e7e8e8`,sidebarBorder:`oklch(0.92 0.004 286)`,terminalBackground:`oklch(0.988 0.001 286)`,terminalForeground:`oklch(0.274 0.006 286.033)`,terminalCursor:`oklch(0.546 0.215 262.881)`,terminalSelection:`#d0d6dd`,terminalScrollbar:`#d6d6d6`,terminalScrollbarHover:`#bdbdbd`},$t={searchMatchBackground:`#8c6c1f`,searchMatchForeground:`#f5f5f5`,searchMatchActiveBackground:`#eea52b`,searchMatchActiveForeground:`#21180a`,canvas:`oklch(0.145 0.005 286)`,chrome:`oklch(0.185 0.006 286)`,toolbar:`oklch(0.185 0.006 286)`,toolbarForeground:`oklch(0.967 0.001 286)`,toolbarBorder:`oklch(0.274 0.006 286)`,toolbarControl:`oklch(0.205 0.006 286)`,toolbarControlForeground:`oklch(0.967 0.001 286)`,toolbarControlHover:`oklch(0.245 0.006 286)`,surface:`oklch(0.185 0.006 286)`,surfaceRaised:`oklch(0.185 0.006 286)`,surfaceOverlay:`oklch(0.205 0.006 286)`,text:`oklch(0.967 0.001 286)`,textMuted:`oklch(0.674 0.006 286)`,border:`oklch(0.274 0.006 286)`,input:`oklch(0.311 0.006 286)`,focus:`oklch(0.707 0.165 254.624)`,accent:`oklch(0.707 0.165 254.624)`,accentForeground:`oklch(0.145 0.005 286)`,secondary:`oklch(0.225 0.006 286)`,secondaryForeground:`oklch(0.967 0.001 286)`,muted:`oklch(0.225 0.006 286)`,mutedForeground:`oklch(0.674 0.006 286)`,placeholder:`oklch(0.674 0.006 286)`,secondaryLabel:`oklch(0.674 0.006 286)`,iconMuted:`oklch(0.674 0.006 286)`,error:`oklch(0.704 0.191 22.216)`,errorForeground:`oklch(0.783 0.157 21.5)`,errorSurface:`#301214`,warning:`#fe9a00`,warningForeground:`#ffb900`,warningSurface:`#312108`,update:`oklch(0.707 0.165 254.624)`,updateForeground:`oklch(0.707 0.165 254.624)`,updateSurface:`#121b34`,accentSurface:`oklch(0.245 0.006 286)`,accentSurfaceForeground:`oklch(0.967 0.001 286)`,messageSurface:`oklch(0.245 0.006 286)`,messageForeground:`oklch(0.967 0.001 286)`,messageAction:`oklch(0.707 0.165 254.624)`,messageActionForeground:`oklch(0.145 0.005 286)`,messageActionHover:`#4993ec`,codeBackground:`oklch(0.185 0.006 286)`,codeForeground:`oklch(0.967 0.001 286)`,sidebar:`oklch(0.185 0.006 286)`,sidebarForeground:`oklch(0.967 0.001 286)`,sidebarMutedForeground:`oklch(0.674 0.006 286)`,sidebarControlSurface:`oklch(0.225 0.006 286)`,sidebarRowHover:`oklch(0.245 0.006 286)`,sidebarRowActive:`oklch(0.245 0.006 286)`,sidebarRowSelected:`oklch(0.245 0.006 286)`,sidebarBorder:`oklch(0.274 0.006 286)`,terminalBackground:`oklch(0.145 0.005 286)`,terminalForeground:`oklch(0.967 0.001 286)`,terminalCursor:`oklch(0.707 0.165 254.624)`,terminalSelection:`#343a47`,terminalScrollbar:`#222222`,terminalScrollbarHover:`#363636`},en={id:`orchid`,label:`Orchid`,appearance:`light`,colors:{canvas:`oklch(0.982446 0.010114 325.653)`,chrome:`oklch(0.982446 0.010114 325.653)`,toolbar:`oklch(0.982446 0.010114 325.653)`,toolbarForeground:`oklch(0.325698 0.116116 325.037)`,toolbarBorder:`oklch(0.856784 0.082879 328.911)`,toolbarControl:`oklch(0.939552 0.024286 321.664)`,toolbarControlForeground:`oklch(0.325698 0.116116 325.037)`,toolbarControlHover:`oklch(0.884525 0.041658 337.177)`,surface:`oklch(0.971835 0.012884 321.894)`,surfaceRaised:`oklch(0.988235 0.005049 325.615)`,surfaceOverlay:`oklch(1 0 0)`,text:`oklch(0.325698 0.116116 325.037)`,textMuted:`oklch(0.494754 0.190937 354.544)`,border:`oklch(0.923531 0.021247 328.096)`,input:`oklch(0.851713 0.055822 336.6)`,focus:`oklch(0.591646 0.217985 0.584)`,accent:`oklch(0.591646 0.217985 0.584)`,accentForeground:`oklch(1 0 0)`,secondary:`oklch(0.869588 0.06751 334.899)`,secondaryForeground:`oklch(0.444777 0.134061 324.799)`,muted:`oklch(0.802407 0.090963 345.892)`,mutedForeground:`oklch(0.428932 0.163929 354.332)`,placeholder:`oklch(0.549927 0.090215 323.149)`,secondaryLabel:`oklch(0.494754 0.190937 354.544)`,iconMuted:`oklch(0.494754 0.190937 354.544)`,error:`oklch(0.627117 0.248974 7.734)`,errorForeground:`oklch(0.458704 0.169677 3.815)`,errorSurface:`oklch(0.942787 0.032076 344.963)`,warning:`oklch(0.76859 0.164659 70.08)`,warningForeground:`oklch(0.54612 0.143036 48.949)`,warningSurface:`oklch(0.962901 0.015297 48.56)`,update:`oklch(0.591646 0.217985 0.584)`,updateForeground:`oklch(0.494754 0.190937 354.544)`,updateSurface:`oklch(0.930264 0.036194 341.45)`,accentSurface:`oklch(0.939552 0.024286 321.664)`,accentSurfaceForeground:`oklch(0.396296 0.025134 285.196)`,messageSurface:`oklch(0.926746 0.037898 332.6)`,messageForeground:`oklch(0.354591 0.093575 307.568)`,messageAction:`oklch(0.591646 0.217985 0.584)`,messageActionForeground:`oklch(1 0 0)`,messageActionHover:`oklch(0.539042 0.197866 0.305)`,codeBackground:`oklch(0.953855 0.019695 315.668)`,codeForeground:`oklch(0.445128 0.13005 307.026)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.928886 0.031178 322.592)`,sidebarForeground:`oklch(0.396296 0.025134 285.196)`,sidebarMutedForeground:`oklch(0.494754 0.190937 354.544)`,sidebarControlSurface:`oklch(0.978851 0.001321 106.424)`,sidebarRowHover:`oklch(0.978851 0.001321 106.424)`,sidebarRowActive:`oklch(0.978851 0.001321 106.424)`,sidebarRowSelected:`oklch(0.978851 0.001321 106.424)`,sidebarBorder:`oklch(0.938313 0.002552 48.717)`,terminalBackground:`oklch(0.982446 0.010114 325.653)`,terminalForeground:`oklch(0.325698 0.116116 325.037)`,terminalCursor:`oklch(0.591646 0.217985 0.584)`,terminalSelection:`oklch(0.869588 0.06751 334.899)`,terminalScrollbar:`oklch(0.851713 0.055822 336.6)`,terminalScrollbarHover:`oklch(0.802407 0.090963 345.892)`},variants:{dark:{canvas:`oklch(0.22813 0.020366 307.469)`,chrome:`oklch(0.22813 0.020366 307.469)`,toolbar:`oklch(0.22813 0.020366 307.469)`,toolbarForeground:`oklch(0.980735 0.004092 301.426)`,toolbarBorder:`oklch(0.266943 0.015262 302.425)`,toolbarControl:`oklch(0.313674 0.030572 310.061)`,toolbarControlForeground:`oklch(0.848252 0.038248 307.961)`,toolbarControlHover:`oklch(0.364912 0.050794 308.491)`,surface:`oklch(0.267101 0.02016 311.799)`,surfaceRaised:`oklch(0.279864 0.021572 309.532)`,surfaceOverlay:`oklch(0.154761 0.01316 338.901)`,text:`oklch(0.980735 0.004092 301.426)`,textMuted:`oklch(0.880303 0.03077 342.696)`,border:`oklch(0.266943 0.015262 302.425)`,input:`oklch(0.266817 0.02897 344.461)`,focus:`oklch(0.591646 0.217985 0.584)`,accent:`oklch(0.460685 0.185347 4.099)`,accentForeground:`oklch(0.901233 0.057189 343.694)`,secondary:`oklch(0.313674 0.030572 310.061)`,secondaryForeground:`oklch(0.848252 0.038248 307.961)`,muted:`oklch(0.360924 0.021469 316.83)`,mutedForeground:`oklch(0.880303 0.03077 342.696)`,placeholder:`oklch(0.657087 0.028226 307.985)`,secondaryLabel:`oklch(0.880303 0.03077 342.696)`,iconMuted:`oklch(0.848252 0.038248 307.961)`,error:`oklch(0.458704 0.169677 3.815)`,errorForeground:`oklch(0.901233 0.057189 343.694)`,errorSurface:`oklch(0.259022 0.04799 340.062)`,warning:`oklch(0.76859 0.164659 70.08)`,warningForeground:`oklch(0.836861 0.164422 84.429)`,warningSurface:`oklch(0.321706 0.036256 60.806)`,update:`oklch(0.460685 0.185347 4.099)`,updateForeground:`oklch(0.901233 0.057189 343.694)`,updateSurface:`oklch(0.256077 0.063004 342.914)`,accentSurface:`oklch(0.364912 0.050794 308.491)`,accentSurfaceForeground:`oklch(0.964695 0.009139 341.803)`,messageSurface:`oklch(0.273791 0.025541 309.079)`,messageForeground:`oklch(0.949872 0.021269 306.838)`,messageAction:`oklch(0.460685 0.185347 4.099)`,messageActionForeground:`oklch(0.901233 0.057189 343.694)`,messageActionHover:`oklch(0.458754 0.184639 3.857)`,codeBackground:`oklch(0.22813 0.020366 307.469)`,codeForeground:`oklch(0.848703 0.064239 306.645)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.185778 0.019368 322.159)`,sidebarForeground:`oklch(0.967434 0.001326 286.375)`,sidebarMutedForeground:`oklch(0.880303 0.03077 342.696)`,sidebarControlSurface:`oklch(0.23366 0.026081 338.196)`,sidebarRowHover:`oklch(0.23366 0.026081 338.196)`,sidebarRowActive:`oklch(0.23366 0.026081 338.196)`,sidebarRowSelected:`oklch(0.23366 0.026081 338.196)`,sidebarBorder:`oklch(0.269132 0.030766 351.067)`,terminalBackground:`oklch(0.22813 0.020366 307.469)`,terminalForeground:`oklch(0.980735 0.004092 301.426)`,terminalCursor:`oklch(0.591646 0.217985 0.584)`,terminalSelection:`oklch(0.313674 0.030572 310.061)`,terminalScrollbar:`oklch(0.266817 0.02897 344.461)`,terminalScrollbarHover:`oklch(0.360924 0.021469 316.83)`}},sidebarArtwork:!0},tn={id:`grove`,label:`Grove`,appearance:`light`,colors:{canvas:`oklch(0.972369 0.005497 157.15)`,chrome:`oklch(0.972369 0.005497 157.15)`,toolbar:`oklch(0.972369 0.005497 157.15)`,toolbarForeground:`oklch(0.222003 0.03479 328.979)`,toolbarBorder:`oklch(0.864831 0.01312 167.255)`,toolbarControl:`oklch(0.932695 0.003778 160.944)`,toolbarControlForeground:`oklch(0.222003 0.03479 328.979)`,toolbarControlHover:`oklch(0.949276 0.004496 159.002)`,surface:`oklch(0.972369 0.005497 157.15)`,surfaceRaised:`oklch(0.972369 0.005497 157.15)`,surfaceOverlay:`oklch(0.932695 0.003778 160.944)`,text:`oklch(0.222003 0.03479 328.979)`,textMuted:`oklch(0.527266 0.012309 320.683)`,border:`oklch(0.864831 0.01312 167.255)`,input:`oklch(0.829746 0.016084 168.234)`,focus:`oklch(0.523295 0.112292 158.089)`,accent:`oklch(0.523295 0.112292 158.089)`,accentForeground:`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.945455 0.012308 162.879)`,secondaryForeground:`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.945455 0.012308 162.879)`,mutedForeground:`oklch(0.527266 0.012309 320.683)`,placeholder:`oklch(0.527266 0.012309 320.683)`,secondaryLabel:`oklch(0.527266 0.012309 320.683)`,iconMuted:`oklch(0.527266 0.012309 320.683)`,error:`oklch(0.637823 0.237287 25.436)`,errorForeground:`oklch(0.509494 0.208583 28.513)`,errorSurface:`oklch(0.936968 0.014243 26.295)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.545036 0.155019 45.359)`,warningSurface:`oklch(0.953175 0.02009 93.379)`,update:`oklch(0.523295 0.112292 158.089)`,updateForeground:`oklch(0.523295 0.112292 158.089)`,updateSurface:`oklch(0.900411 0.02384 164.795)`,accentSurface:`oklch(0.949276 0.004496 159.002)`,accentSurfaceForeground:`oklch(0.222003 0.03479 328.979)`,messageSurface:`oklch(0.949276 0.004496 159.002)`,messageForeground:`oklch(0.222003 0.03479 328.979)`,messageAction:`oklch(0.523295 0.112292 158.089)`,messageActionForeground:`oklch(0.990339 0.008411 325.64)`,messageActionHover:`oklch(0.488753 0.096536 77.829)`,codeBackground:`oklch(0.972369 0.005497 157.15)`,codeForeground:`oklch(0.222003 0.03479 328.979)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.972369 0.005497 157.15)`,sidebarForeground:`oklch(0.222003 0.03479 328.979)`,sidebarMutedForeground:`oklch(0.527266 0.012309 320.683)`,sidebarControlSurface:`oklch(0.945455 0.012308 162.879)`,sidebarRowHover:`oklch(0.949276 0.004496 159.002)`,sidebarRowActive:`oklch(0.949276 0.004496 159.002)`,sidebarRowSelected:`oklch(0.949276 0.004496 159.002)`,sidebarBorder:`oklch(0.864831 0.01312 167.255)`,terminalBackground:`oklch(0.972369 0.005497 157.15)`,terminalForeground:`oklch(0.222003 0.03479 328.979)`,terminalCursor:`oklch(0.523295 0.112292 158.089)`,terminalSelection:`oklch(0.891377 0.026164 164.929)`,terminalScrollbar:`oklch(0.824752 0.001392 294.641)`,terminalScrollbarHover:`oklch(0.755495 0.004415 318.776)`},variants:{dark:{canvas:`oklch(0.260865 0.02152 162.75)`,chrome:`oklch(0.260865 0.02152 162.75)`,toolbar:`oklch(0.260865 0.02152 162.75)`,toolbarForeground:`oklch(0.990339 0.008411 325.64)`,toolbarBorder:`oklch(0.457475 0.044046 160.971)`,toolbarControl:`oklch(0.411828 0.014378 166.627)`,toolbarControlForeground:`oklch(0.990339 0.008411 325.64)`,toolbarControlHover:`oklch(0.363192 0.016572 165.32)`,surface:`oklch(0.260865 0.02152 162.75)`,surfaceRaised:`oklch(0.260865 0.02152 162.75)`,surfaceOverlay:`oklch(0.411828 0.014378 166.627)`,text:`oklch(0.990339 0.008411 325.64)`,textMuted:`oklch(0.715427 0.010896 171.428)`,border:`oklch(0.457475 0.044046 160.971)`,input:`oklch(0.519849 0.049896 160.863)`,focus:`oklch(0.796228 0.133058 157.319)`,accent:`oklch(0.796228 0.133058 157.319)`,accentForeground:`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.339728 0.039456 160.274)`,secondaryForeground:`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.339728 0.039456 160.274)`,mutedForeground:`oklch(0.715427 0.010896 171.428)`,placeholder:`oklch(0.715427 0.010896 171.428)`,secondaryLabel:`oklch(0.715427 0.010896 171.428)`,iconMuted:`oklch(0.715427 0.010896 171.428)`,error:`oklch(0.655108 0.221148 23.473)`,errorForeground:`oklch(0.704237 0.187511 22.228)`,errorSurface:`oklch(0.312773 0.02923 32.121)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.829017 0.171221 81.038)`,warningSurface:`oklch(0.345524 0.046882 99.736)`,update:`oklch(0.796228 0.133058 157.319)`,updateForeground:`oklch(0.796228 0.133058 157.319)`,updateSurface:`oklch(0.448116 0.062637 158.86)`,accentSurface:`oklch(0.363192 0.016572 165.32)`,accentSurfaceForeground:`oklch(0.990339 0.008411 325.64)`,messageSurface:`oklch(0.363192 0.016572 165.32)`,messageForeground:`oklch(0.990339 0.008411 325.64)`,messageAction:`oklch(0.796228 0.133058 157.319)`,messageActionForeground:`oklch(0.222003 0.03479 328.979)`,messageActionHover:`oklch(0.815227 0.117902 84.21)`,codeBackground:`oklch(0.260865 0.02152 162.75)`,codeForeground:`oklch(0.990339 0.008411 325.64)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.260865 0.02152 162.75)`,sidebarForeground:`oklch(0.990339 0.008411 325.64)`,sidebarMutedForeground:`oklch(0.715427 0.010896 171.428)`,sidebarControlSurface:`oklch(0.339728 0.039456 160.274)`,sidebarRowHover:`oklch(0.363192 0.016572 165.32)`,sidebarRowActive:`oklch(0.363192 0.016572 165.32)`,sidebarRowSelected:`oklch(0.363192 0.016572 165.32)`,sidebarBorder:`oklch(0.457475 0.044046 160.971)`,terminalBackground:`oklch(0.260865 0.02152 162.75)`,terminalForeground:`oklch(0.990339 0.008411 325.64)`,terminalCursor:`oklch(0.796228 0.133058 157.319)`,terminalSelection:`oklch(0.464636 0.066083 158.72)`,terminalScrollbar:`oklch(0.594692 0.006862 176.022)`,terminalScrollbarHover:`oklch(0.687968 0.00354 193.55)`}},sidebarArtwork:!0},nn={id:`ocean`,label:`Ocean`,appearance:`light`,colors:{canvas:`oklch(0.974199 0.002856 241.597)`,chrome:`oklch(0.974199 0.002856 241.597)`,toolbar:`oklch(0.974199 0.002856 241.597)`,toolbarForeground:`oklch(0.222003 0.03479 328.979)`,toolbarBorder:`oklch(0.867646 0.013482 252.362)`,toolbarControl:`oklch(0.934442 0.003181 269.1)`,toolbarControlForeground:`oklch(0.222003 0.03479 328.979)`,toolbarControlHover:`oklch(0.951058 0.002962 258.339)`,surface:`oklch(0.974199 0.002856 241.597)`,surfaceRaised:`oklch(0.974199 0.002856 241.597)`,surfaceOverlay:`oklch(0.934442 0.003181 269.1)`,text:`oklch(0.222003 0.03479 328.979)`,textMuted:`oklch(0.528741 0.01828 313.823)`,border:`oklch(0.867646 0.013482 252.362)`,input:`oklch(0.832939 0.017389 252.598)`,focus:`oklch(0.536684 0.120219 247.01)`,accent:`oklch(0.536684 0.120219 247.01)`,accentForeground:`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.948004 0.009649 241.695)`,secondaryForeground:`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.948004 0.009649 241.695)`,mutedForeground:`oklch(0.528741 0.01828 313.823)`,placeholder:`oklch(0.528741 0.01828 313.823)`,secondaryLabel:`oklch(0.528741 0.01828 313.823)`,iconMuted:`oklch(0.528741 0.01828 313.823)`,error:`oklch(0.637823 0.237287 25.436)`,errorForeground:`oklch(0.509494 0.208583 28.513)`,errorSurface:`oklch(0.938747 0.016377 7.186)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.546927 0.155556 45.359)`,warningSurface:`oklch(0.954846 0.016009 81.731)`,update:`oklch(0.536684 0.120219 247.01)`,updateForeground:`oklch(0.536684 0.120219 247.01)`,updateSurface:`oklch(0.904165 0.021144 241.874)`,accentSurface:`oklch(0.951058 0.002962 258.339)`,accentSurfaceForeground:`oklch(0.222003 0.03479 328.979)`,messageSurface:`oklch(0.951058 0.002962 258.339)`,messageForeground:`oklch(0.222003 0.03479 328.979)`,messageAction:`oklch(0.536684 0.120219 247.01)`,messageActionForeground:`oklch(0.990339 0.008411 325.64)`,messageActionHover:`oklch(0.45151 0.074407 201.516)`,codeBackground:`oklch(0.974199 0.002856 241.597)`,codeForeground:`oklch(0.222003 0.03479 328.979)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.974199 0.002856 241.597)`,sidebarForeground:`oklch(0.222003 0.03479 328.979)`,sidebarMutedForeground:`oklch(0.528741 0.01828 313.823)`,sidebarControlSurface:`oklch(0.948004 0.009649 241.695)`,sidebarRowHover:`oklch(0.951058 0.002962 258.339)`,sidebarRowActive:`oklch(0.951058 0.002962 258.339)`,sidebarRowSelected:`oklch(0.951058 0.002962 258.339)`,sidebarBorder:`oklch(0.867646 0.013482 252.362)`,terminalBackground:`oklch(0.974199 0.002856 241.597)`,terminalForeground:`oklch(0.222003 0.03479 328.979)`,terminalCursor:`oklch(0.536684 0.120219 247.01)`,terminalSelection:`oklch(0.895373 0.023469 241.913)`,terminalScrollbar:`oklch(0.826271 0.006191 305.456)`,terminalScrollbarHover:`oklch(0.756866 0.008685 313.721)`},variants:{dark:{canvas:`oklch(0.242641 0.024125 250.573)`,chrome:`oklch(0.242641 0.024125 250.573)`,toolbar:`oklch(0.242641 0.024125 250.573)`,toolbarForeground:`oklch(0.990339 0.008411 325.64)`,toolbarBorder:`oklch(0.438653 0.039496 245.44)`,toolbarControl:`oklch(0.398517 0.018232 255.72)`,toolbarControlForeground:`oklch(0.990339 0.008411 325.64)`,toolbarControlHover:`oklch(0.348439 0.019942 253.696)`,surface:`oklch(0.242641 0.024125 250.573)`,surfaceRaised:`oklch(0.242641 0.024125 250.573)`,surfaceOverlay:`oklch(0.398517 0.018232 255.72)`,text:`oklch(0.990339 0.008411 325.64)`,textMuted:`oklch(0.691936 0.016294 261.588)`,border:`oklch(0.438653 0.039496 245.44)`,input:`oklch(0.500905 0.043574 244.781)`,focus:`oklch(0.758933 0.105833 241.548)`,accent:`oklch(0.758933 0.105833 241.548)`,accentForeground:`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.319287 0.036766 246.065)`,secondaryForeground:`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.319287 0.036766 246.065)`,mutedForeground:`oklch(0.691936 0.016294 261.588)`,placeholder:`oklch(0.691936 0.016294 261.588)`,secondaryLabel:`oklch(0.691936 0.016294 261.588)`,iconMuted:`oklch(0.691936 0.016294 261.588)`,error:`oklch(0.655108 0.221148 23.473)`,errorForeground:`oklch(0.702184 0.189226 22.228)`,errorSurface:`oklch(0.298933 0.036443 350.094)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.829017 0.171221 81.038)`,warningSurface:`oklch(0.329449 0.028712 84.495)`,update:`oklch(0.758933 0.105833 241.548)`,updateForeground:`oklch(0.758933 0.105833 241.548)`,updateSurface:`oklch(0.424017 0.053575 243.695)`,accentSurface:`oklch(0.348439 0.019942 253.696)`,accentSurfaceForeground:`oklch(0.990339 0.008411 325.64)`,messageSurface:`oklch(0.348439 0.019942 253.696)`,messageForeground:`oklch(0.990339 0.008411 325.64)`,messageAction:`oklch(0.758933 0.105833 241.548)`,messageActionForeground:`oklch(0.222003 0.03479 328.979)`,messageActionHover:`oklch(0.815308 0.096174 199.862)`,codeBackground:`oklch(0.242641 0.024125 250.573)`,codeForeground:`oklch(0.990339 0.008411 325.64)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.242641 0.024125 250.573)`,sidebarForeground:`oklch(0.990339 0.008411 325.64)`,sidebarMutedForeground:`oklch(0.691936 0.016294 261.588)`,sidebarControlSurface:`oklch(0.319287 0.036766 246.065)`,sidebarRowHover:`oklch(0.348439 0.019942 253.696)`,sidebarRowActive:`oklch(0.348439 0.019942 253.696)`,sidebarRowSelected:`oklch(0.348439 0.019942 253.696)`,sidebarBorder:`oklch(0.438653 0.039496 245.44)`,terminalBackground:`oklch(0.242641 0.024125 250.573)`,terminalForeground:`oklch(0.990339 0.008411 325.64)`,terminalCursor:`oklch(0.758933 0.105833 241.548)`,terminalSelection:`oklch(0.439946 0.0561 243.479)`,terminalScrollbar:`oklch(0.58613 0.012959 267.22)`,terminalScrollbarHover:`oklch(0.681569 0.010909 276.465)`}},sidebarArtwork:!0},rn={id:`ember`,label:`Ember`,appearance:`light`,colors:{canvas:`oklch(0.976527 0.002685 60.725)`,chrome:`oklch(0.976527 0.002685 60.725)`,toolbar:`oklch(0.976527 0.002685 60.725)`,toolbarForeground:`oklch(0.222003 0.03479 328.979)`,toolbarBorder:`oklch(0.870631 0.013204 39.431)`,toolbarControl:`oklch(0.936659 0.002879 29.96)`,toolbarControlForeground:`oklch(0.222003 0.03479 328.979)`,toolbarControlHover:`oklch(0.953321 0.002701 42.266)`,surface:`oklch(0.976527 0.002685 60.725)`,surfaceRaised:`oklch(0.976527 0.002685 60.725)`,surfaceOverlay:`oklch(0.936659 0.002879 29.96)`,text:`oklch(0.222003 0.03479 328.979)`,textMuted:`oklch(0.530413 0.018453 341.181)`,border:`oklch(0.870631 0.013204 39.431)`,input:`oklch(0.836213 0.017153 38.661)`,focus:`oklch(0.552831 0.129438 44.656)`,accent:`oklch(0.552831 0.129438 44.656)`,accentForeground:`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.950842 0.009273 51.528)`,secondaryForeground:`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950842 0.009273 51.528)`,mutedForeground:`oklch(0.530413 0.018453 341.181)`,placeholder:`oklch(0.530413 0.018453 341.181)`,secondaryLabel:`oklch(0.530413 0.018453 341.181)`,iconMuted:`oklch(0.530413 0.018453 341.181)`,error:`oklch(0.637823 0.237287 25.436)`,errorForeground:`oklch(0.509494 0.208583 28.513)`,errorSurface:`oklch(0.941094 0.019938 19.375)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.549154 0.156188 45.359)`,warningSurface:`oklch(0.957148 0.020843 76.702)`,update:`oklch(0.552831 0.129438 44.656)`,updateForeground:`oklch(0.552831 0.129438 44.656)`,updateSurface:`oklch(0.907902 0.020621 49.36)`,accentSurface:`oklch(0.953321 0.002701 42.266)`,accentSurfaceForeground:`oklch(0.222003 0.03479 328.979)`,messageSurface:`oklch(0.953321 0.002701 42.266)`,messageForeground:`oklch(0.222003 0.03479 328.979)`,messageAction:`oklch(0.552831 0.129438 44.656)`,messageActionForeground:`oklch(0.990339 0.008411 325.64)`,messageActionHover:`oklch(0.471223 0.145843 24.688)`,codeBackground:`oklch(0.976527 0.002685 60.725)`,codeForeground:`oklch(0.222003 0.03479 328.979)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.976527 0.002685 60.725)`,sidebarForeground:`oklch(0.222003 0.03479 328.979)`,sidebarMutedForeground:`oklch(0.530413 0.018453 341.181)`,sidebarControlSurface:`oklch(0.950842 0.009273 51.528)`,sidebarRowHover:`oklch(0.953321 0.002701 42.266)`,sidebarRowActive:`oklch(0.953321 0.002701 42.266)`,sidebarRowSelected:`oklch(0.953321 0.002701 42.266)`,sidebarBorder:`oklch(0.870631 0.013204 39.431)`,terminalBackground:`oklch(0.976527 0.002685 60.725)`,terminalForeground:`oklch(0.222003 0.03479 328.979)`,terminalCursor:`oklch(0.552831 0.129438 44.656)`,terminalSelection:`oklch(0.899296 0.022939 49.163)`,terminalScrollbar:`oklch(0.828185 0.005884 349.533)`,terminalScrollbarHover:`oklch(0.758584 0.008423 341.16)`},variants:{dark:{canvas:`oklch(0.245899 0.019144 42.044)`,chrome:`oklch(0.245899 0.019144 42.044)`,toolbar:`oklch(0.245899 0.019144 42.044)`,toolbarForeground:`oklch(0.990339 0.008411 325.64)`,toolbarBorder:`oklch(0.44099 0.040202 48.807)`,toolbarControl:`oklch(0.401111 0.014308 34.896)`,toolbarControlForeground:`oklch(0.990339 0.008411 325.64)`,toolbarControlHover:`oklch(0.351262 0.01565 37.592)`,surface:`oklch(0.245899 0.019144 42.044)`,surfaceRaised:`oklch(0.245899 0.019144 42.044)`,surfaceOverlay:`oklch(0.401111 0.014308 34.896)`,text:`oklch(0.990339 0.008411 325.64)`,textMuted:`oklch(0.692479 0.015227 30.963)`,border:`oklch(0.44099 0.040202 48.807)`,input:`oklch(0.503003 0.045721 49.44)`,focus:`oklch(0.762174 0.124117 52.082)`,accent:`oklch(0.762174 0.124117 52.082)`,accentForeground:`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.322144 0.03574 48.309)`,secondaryForeground:`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.322144 0.03574 48.309)`,mutedForeground:`oklch(0.692479 0.015227 30.963)`,placeholder:`oklch(0.692479 0.015227 30.963)`,secondaryLabel:`oklch(0.692479 0.015227 30.963)`,iconMuted:`oklch(0.692479 0.015227 30.963)`,error:`oklch(0.655108 0.221148 23.473)`,errorForeground:`oklch(0.702184 0.189226 22.228)`,errorSurface:`oklch(0.310955 0.059624 24.334)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.829017 0.171221 81.038)`,warningSurface:`oklch(0.339137 0.055638 66.911)`,update:`oklch(0.762174 0.124117 52.082)`,updateForeground:`oklch(0.762174 0.124117 52.082)`,updateSurface:`oklch(0.426749 0.057547 50.618)`,accentSurface:`oklch(0.351262 0.01565 37.592)`,accentSurfaceForeground:`oklch(0.990339 0.008411 325.64)`,messageSurface:`oklch(0.351262 0.01565 37.592)`,messageForeground:`oklch(0.990339 0.008411 325.64)`,messageAction:`oklch(0.762174 0.124117 52.082)`,messageActionForeground:`oklch(0.222003 0.03479 328.979)`,messageActionHover:`oklch(0.775116 0.117953 29.014)`,codeBackground:`oklch(0.245899 0.019144 42.044)`,codeForeground:`oklch(0.990339 0.008411 325.64)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.245899 0.019144 42.044)`,sidebarForeground:`oklch(0.990339 0.008411 325.64)`,sidebarMutedForeground:`oklch(0.692479 0.015227 30.963)`,sidebarControlSurface:`oklch(0.322144 0.03574 48.309)`,sidebarRowHover:`oklch(0.351262 0.01565 37.592)`,sidebarRowActive:`oklch(0.351262 0.01565 37.592)`,sidebarRowSelected:`oklch(0.351262 0.01565 37.592)`,sidebarBorder:`oklch(0.44099 0.040202 48.807)`,terminalBackground:`oklch(0.245899 0.019144 42.044)`,terminalForeground:`oklch(0.990339 0.008411 325.64)`,terminalCursor:`oklch(0.762174 0.124117 52.082)`,terminalSelection:`oklch(0.442681 0.0608 50.795)`,terminalScrollbar:`oklch(0.587861 0.010463 20.444)`,terminalScrollbarHover:`oklch(0.682876 0.009156 9.796)`}},sidebarArtwork:!0},an={id:`iris`,label:`Iris`,appearance:`light`,colors:{canvas:`oklch(0.976531 0.003855 303.226)`,chrome:`oklch(0.976531 0.003855 303.226)`,toolbar:`oklch(0.976531 0.003855 303.226)`,toolbarForeground:`oklch(0.222003 0.03479 328.979)`,toolbarBorder:`oklch(0.869608 0.018226 303.859)`,toolbarControl:`oklch(0.936665 0.005041 310.132)`,toolbarControlForeground:`oklch(0.222003 0.03479 328.979)`,toolbarControlHover:`oklch(0.953326 0.004536 307.676)`,surface:`oklch(0.976531 0.003855 303.226)`,surfaceRaised:`oklch(0.976531 0.003855 303.226)`,surfaceOverlay:`oklch(0.936665 0.005041 310.132)`,text:`oklch(0.222003 0.03479 328.979)`,textMuted:`oklch(0.529955 0.022319 321.556)`,border:`oklch(0.869608 0.018226 303.859)`,input:`oklch(0.834773 0.023405 303.676)`,focus:`oklch(0.525348 0.15373 294.176)`,accent:`oklch(0.525348 0.15373 294.176)`,accentForeground:`oklch(0.990339 0.008411 325.64)`,secondary:`oklch(0.950194 0.011956 300.733)`,secondaryForeground:`oklch(0.222003 0.03479 328.979)`,muted:`oklch(0.950194 0.011956 300.733)`,mutedForeground:`oklch(0.529955 0.022319 321.556)`,placeholder:`oklch(0.529955 0.022319 321.556)`,secondaryLabel:`oklch(0.529955 0.022319 321.556)`,iconMuted:`oklch(0.529955 0.022319 321.556)`,error:`oklch(0.637823 0.237287 25.436)`,errorForeground:`oklch(0.509494 0.208583 28.513)`,errorSurface:`oklch(0.941043 0.019582 4.235)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.549154 0.156188 45.359)`,warningSurface:`oklch(0.957054 0.016197 69.932)`,update:`oklch(0.525348 0.15373 294.176)`,updateForeground:`oklch(0.525348 0.15373 294.176)`,updateSurface:`oklch(0.90602 0.025754 299.867)`,accentSurface:`oklch(0.953326 0.004536 307.676)`,accentSurfaceForeground:`oklch(0.222003 0.03479 328.979)`,messageSurface:`oklch(0.953326 0.004536 307.676)`,messageForeground:`oklch(0.222003 0.03479 328.979)`,messageAction:`oklch(0.525348 0.15373 294.176)`,messageActionForeground:`oklch(0.990339 0.008411 325.64)`,messageActionHover:`oklch(0.471003 0.16748 340.687)`,codeBackground:`oklch(0.976531 0.003855 303.226)`,codeForeground:`oklch(0.222003 0.03479 328.979)`,searchMatchBackground:`oklch(0.915 0.11 85)`,searchMatchForeground:`oklch(0.216164 0.028283 77.423)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.976531 0.003855 303.226)`,sidebarForeground:`oklch(0.222003 0.03479 328.979)`,sidebarMutedForeground:`oklch(0.529955 0.022319 321.556)`,sidebarControlSurface:`oklch(0.950194 0.011956 300.733)`,sidebarRowHover:`oklch(0.953326 0.004536 307.676)`,sidebarRowActive:`oklch(0.953326 0.004536 307.676)`,sidebarRowSelected:`oklch(0.953326 0.004536 307.676)`,sidebarBorder:`oklch(0.869608 0.018226 303.859)`,terminalBackground:`oklch(0.976531 0.003855 303.226)`,terminalForeground:`oklch(0.222003 0.03479 328.979)`,terminalCursor:`oklch(0.525348 0.15373 294.176)`,terminalSelection:`oklch(0.897143 0.028558 299.758)`,terminalScrollbar:`oklch(0.828195 0.008526 318.858)`,terminalScrollbarHover:`oklch(0.758596 0.010892 321.538)`},variants:{dark:{canvas:`oklch(0.225975 0.031062 293.741)`,chrome:`oklch(0.225975 0.031062 293.741)`,toolbar:`oklch(0.225975 0.031062 293.741)`,toolbarForeground:`oklch(0.990339 0.008411 325.64)`,toolbarBorder:`oklch(0.40874 0.058536 295.893)`,toolbarControl:`oklch(0.386739 0.024023 297.509)`,toolbarControlForeground:`oklch(0.990339 0.008411 325.64)`,toolbarControlHover:`oklch(0.335291 0.026008 296.394)`,surface:`oklch(0.225975 0.031062 293.741)`,surfaceRaised:`oklch(0.225975 0.031062 293.741)`,surfaceOverlay:`oklch(0.386739 0.024023 297.509)`,text:`oklch(0.990339 0.008411 325.64)`,textMuted:`oklch(0.663321 0.025932 301.862)`,border:`oklch(0.40874 0.058536 295.893)`,input:`oklch(0.46756 0.065775 296.265)`,focus:`oklch(0.671712 0.169136 293.929)`,accent:`oklch(0.671712 0.169136 293.929)`,accentForeground:`oklch(0.222003 0.03479 328.979)`,secondary:`oklch(0.291515 0.05276 294.209)`,secondaryForeground:`oklch(0.990339 0.008411 325.64)`,muted:`oklch(0.291515 0.05276 294.209)`,mutedForeground:`oklch(0.663321 0.025932 301.862)`,placeholder:`oklch(0.663321 0.025932 301.862)`,secondaryLabel:`oklch(0.663321 0.025932 301.862)`,iconMuted:`oklch(0.663321 0.025932 301.862)`,error:`oklch(0.655108 0.221148 23.473)`,errorForeground:`oklch(0.702184 0.189226 22.228)`,errorSurface:`oklch(0.291658 0.054707 352.238)`,warning:`oklch(0.772406 0.172798 65.367)`,warningForeground:`oklch(0.829017 0.171221 81.038)`,warningSurface:`oklch(0.318952 0.033845 51.646)`,update:`oklch(0.671712 0.169136 293.929)`,updateForeground:`oklch(0.671712 0.169136 293.929)`,updateSurface:`oklch(0.381668 0.081286 294.195)`,accentSurface:`oklch(0.335291 0.026008 296.394)`,accentSurfaceForeground:`oklch(0.990339 0.008411 325.64)`,messageSurface:`oklch(0.335291 0.026008 296.394)`,messageForeground:`oklch(0.990339 0.008411 325.64)`,messageAction:`oklch(0.671712 0.169136 293.929)`,messageActionForeground:`oklch(0.222003 0.03479 328.979)`,messageActionHover:`oklch(0.813537 0.114101 337.23)`,codeBackground:`oklch(0.225975 0.031062 293.741)`,codeForeground:`oklch(0.990339 0.008411 325.64)`,searchMatchBackground:`oklch(0.55 0.1 85)`,searchMatchForeground:`oklch(0.970151 0 0)`,searchMatchActiveBackground:`oklch(0.774202 0.151946 74.331)`,searchMatchActiveForeground:`oklch(0.216164 0.028283 77.423)`,sidebar:`oklch(0.225975 0.031062 293.741)`,sidebarForeground:`oklch(0.990339 0.008411 325.64)`,sidebarMutedForeground:`oklch(0.663321 0.025932 301.862)`,sidebarControlSurface:`oklch(0.291515 0.05276 294.209)`,sidebarRowHover:`oklch(0.335291 0.026008 296.394)`,sidebarRowActive:`oklch(0.335291 0.026008 296.394)`,sidebarRowSelected:`oklch(0.335291 0.026008 296.394)`,sidebarBorder:`oklch(0.40874 0.058536 295.893)`,terminalBackground:`oklch(0.225975 0.031062 293.741)`,terminalForeground:`oklch(0.990339 0.008411 325.64)`,terminalCursor:`oklch(0.671712 0.169136 293.929)`,terminalSelection:`oklch(0.395417 0.085554 294.182)`,terminalScrollbar:`oklch(0.578663 0.017888 302.229)`,terminalScrollbarHover:`oklch(0.676012 0.015271 305.433)`}},sidebarArtwork:!0},on=[en,tn,nn,rn,an],R=`p4code:themes:v1`,sn=`p4code:theme-follow-system`,cn=`p4code:theme-appearance-mode`,ln=`p4code:theme-halves:v1`,un=t,dn=new Set(Zt),fn=[],pn=new Set,z=null,mn=new Set,hn=null;function gn(){return hn}function _n(e){return mn.add(e),()=>mn.delete(e)}function vn(e){if(hn!==e){hn=e;for(let e of mn)e()}}function B(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yn(e){return e===`light`||e===`dark`}function bn(e){return typeof e==`string`&&U(e)!==null}function xn(e){return typeof e==`string`&&/^[a-z0-9](?:[a-z0-9-]{0,47})$/.test(e)}function Sn(e){return typeof e==`string`&&e.trim().length>0&&e.trim().length<=48}function Cn(e){return B(e)&&typeof e.id==`string`&&/^[a-z0-9][a-z0-9.:-]{0,127}$/i.test(e.id)&&Sn(e.label)?{id:e.id,label:e.label.trim()}:void 0}function wn(e){let t={};for(let[n,r]of Object.entries(e)){let e=U(r);dn.has(n)&&e&&(t[n]=e)}return t}function Tn(e,t){return B(e)?{...pr(t),...wn(e)}:null}function En(e,t){if(e===void 0)return;if(!B(e))return null;let n={};for(let[r,i]of Object.entries(e)){if(!yn(r))return null;if(r===t)continue;let e=Tn(i,r);if(!e)return null;n[r]=e}return Object.keys(n).length>0?n:void 0}function Dn(e){if(!B(e)||!xn(e.id)||L.has(e.id)||!Sn(e.label)||!yn(e.appearance))return null;let t=Tn(e.colors,e.appearance);if(!t)return null;let n=En(e.variants,e.appearance);if(e.variants!==void 0&&n===null)return null;let r=Cn(e.collection);return{id:e.id,label:e.label.trim(),appearance:e.appearance,colors:t,...n?{variants:n}:{},...r?{collection:r}:{},...e.managed===!0?{managed:!0}:{}}}function On(e){let t=[];for(let n of e){let e=Dn(n);e&&!t.some(t=>t.id===e.id)&&t.push(e)}return t}function kn(){if(typeof window>`u`)return{status:`ready`,storedThemes:[],themes:[]};let e;try{e=window.localStorage.getItem(R)}catch(e){return{status:`unavailable`,reason:`storage-unavailable`,cause:e}}if(!e)return{status:`ready`,storedThemes:[],themes:[]};let t;try{t=JSON.parse(e)}catch{return{status:`unavailable`,reason:`malformed`}}return Array.isArray(t)?{status:`ready`,storedThemes:t,themes:On(t)}:{status:`unavailable`,reason:`malformed`}}function An(){return z===null&&(z=kn()),z}function jn(){for(let e of pn)e()}function Mn(){z=null,jn()}var Nn=[];function Pn(){let e=An();return e.status===`ready`?e.themes:Nn}function Fn(){return fn}function In(e){return!n(fn,e)&&(fn=e,jn(),!0)}function Ln(e){return L.has(e)}function Rn(e){return Tr().themes.filter(t=>t.collection?.id===e)}function zn(e){if(pn.add(e),typeof window>`u`)return()=>pn.delete(e);let t=e=>{(e.key===`p4code:themes:v1`||e.key===null)&&Mn()};return window.addEventListener(`storage`,t),()=>{pn.delete(e),window.removeEventListener(`storage`,t)}}function Bn(e){return e===`dark`?Hn??=Zn($t):Vn??=Zn(Qt)}var Vn,Hn,Un={r:255,g:250,b:255},Wn={r:36,g:21,b:35},Gn={r:255,g:255,b:255},Kn={r:0,g:0,b:0},qn=ie(`oklch`);function V(e){if(typeof e!=`string`)return null;let t=e.trim(),n=be(t);if(!n)return null;let r=qn(n),i=r.l??0,a=r.c??0,o=r.h??0,s=/\/\s*none\s*\)$/i.test(t)?0:r.alpha??1;return[i,a,o,s].every(Number.isFinite)?{color:{L:Math.min(1,Math.max(0,i)),C:Math.max(0,a),h:o},alpha:Math.min(1,Math.max(0,s))}:null}function Jn(e,t){return(Math.abs(e)<10**-t/2?0:e).toFixed(t).replace(/(?:\.0+|(?:(\.[0-9]*?)0+))$/,`$1`)}function H(e,t=1){let n=e.C<5e-7?0:(e.h%360+360)%360,r=`${Jn(e.L,6)} ${Jn(e.C,6)} ${Jn(n,3)}`;return t<1?`oklch(${r} / ${Jn(t,4)})`:`oklch(${r})`}function U(e){let t=V(e);return t?H(t.color,t.alpha):null}function Yn(e){let t=V(e),n=t?{rgb:Y(t.color),alpha:t.alpha}:null;if(!n)return null;let r=Xn(n.rgb);return n.alpha>=1?r:`${r}${Math.round(n.alpha*255).toString(16).padStart(2,`0`)}`}function W(e,t){let n=V(e);return n?Y(n.color):t}function Xn(e){return`#${[e.r,e.g,e.b].map(e=>Math.round(Math.min(255,Math.max(0,e))).toString(16).padStart(2,`0`)).join(``)}`}function G(e){return H(J(e))}function Zn(e){return Object.fromEntries(Zt.map(t=>{let n=U(e[t]);if(!n)throw Error(`The color for "${t}" must be a literal CSS color such as oklch(0.62 0.2 280).`);return[t,n]}))}function Qn(e){return{...e,colors:Zn(e.colors),...e.variants?{variants:Object.fromEntries(Object.entries(e.variants).map(([e,t])=>[e,Zn(t)]))}:{}}}function K(e,t,n){return{r:e.r+(t.r-e.r)*n,g:e.g+(t.g-e.g)*n,b:e.b+(t.b-e.b)*n}}function q(e){let t=e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*t(e.r)+.7152*t(e.g)+.0722*t(e.b)}function $n(e){let t=e/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4}function er(e){let t=e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055;return Math.round(Math.min(1,Math.max(0,t))*255)}function J(e){let t=$n(e.r),n=$n(e.g),r=$n(e.b),i=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),o=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r),s=.2104542553*i+.793617785*a-.0040720468*o,c=1.9779984951*i-2.428592205*a+.4505937099*o,l=.0259040371*i+.7827717662*a-.808675766*o;return{L:s,C:Math.hypot(c,l),h:Math.atan2(l,c)*180/Math.PI}}function tr({L:e,C:t,h:n}){let r=n*Math.PI/180,i=t*Math.cos(r),a=t*Math.sin(r),o=(e+.3963377774*i+.2158037573*a)**3,s=(e-.1055613458*i-.0638541728*a)**3,c=(e-.0894841775*i-1.291485548*a)**3;return{r:4.0767416621*o-3.3077115913*s+.2309699292*c,g:-1.2684380046*o+2.6097574011*s-.3413193965*c,b:-.0041960863*o-.7034186147*s+1.707614701*c}}function nr(e){let t=t=>{let n=tr({...e,C:t});return[n.r,n.g,n.b].every(e=>e>=-1e-4&&e<=1.0001)};if(t(e.C))return e;let n=0,r=e.C,i=1e-6,a=Math.max(1,Math.ceil(Math.log2(Math.max(e.C,i))-Math.log2(i)));for(let e=0;e<a;e+=1){let e=(n+r)/2;t(e)?n=e:r=e}return{...e,C:n}}function Y(e){let t=tr(nr(e));return{r:er(t.r),g:er(t.g),b:er(t.b)}}function rr(e){return H(nr(e))}function ir(e,t,n,r){let i=r===`lighter`?e.L:0,a=r===`lighter`?1:e.L,o={...e};if(X(Y(o),t)>=n)return o;for(let s=0;s<18;s+=1){let s=(i+a)/2;o={...e,L:s},X(Y(o),t)>=n?r===`lighter`?a=s:i=s:r===`lighter`?i=s:a=s}return{...e,L:r===`lighter`?a:i}}function ar(e,t,n){let r=V(e),i=V(t);if(!r||!i)return e;let a=Y(i.color);if(X(Y(r.color),a)>=n)return e;let o=q(a)<.179?`lighter`:`darker`;return Xn(Y(ir(r.color,a,n,o)))}var or={light:{error:`#fb2c36`,errorForeground:`#c10007`,warning:`#fe9a00`,warningForeground:`#bb4d00`},dark:{error:`#fb414a`,errorForeground:`#ff6467`,warning:`#fe9a00`,warningForeground:`#ffb900`}};function sr(e){let t=q(e)<.179?`dark`:`light`,n=or[t],r=t===`dark`?.16:.08,i=t=>K(e,W(t,e),r),a=(n,r)=>rr(ir(J(W(n,e)),r,4.6,t===`dark`?`lighter`:`darker`)),o=i(n.error),s=i(n.warning);return{error:U(n.error),errorForeground:a(n.errorForeground,o),errorSurface:G(o),warning:U(n.warning),warningForeground:a(n.warningForeground,s),warningSurface:G(s)}}function cr(e,t,n){let r=pr(e),i=W(t,e===`dark`?{r:24,g:15,b:27}:{r:250,g:245,b:250}),a=W(n,{r:168,g:67,b:112}),o=J(i),s=J(a),c=q(i)<.179,l=s.C<.02?o.h:s.h,u=Math.min(.045,Math.max(.008,s.C*.22)),d=c?1:-1,f=(e,t=u)=>({L:Math.min(.98,Math.max(.05,o.L+d*e)),C:t,h:l}),p=e=>rr(e),m={L:c?.95:.2,C:Math.min(.035,s.C*.25),h:l},h=Y(ir(m,i,7,c?`lighter`:`darker`)),g=fr(i,h),ee={L:Math.min(.85,Math.max(.35,s.L+(c?.06:-.02))),C:Math.max(s.C*.9,.06),h:(l+50)%360},te=Y(ee),ne=Z(te),re=Z(a),ie=f(.045,u*1.4),_=Y(ie),ae=f(.015),v=f(.05),oe=Y(v),se=f(.075),y=f(c?.16:.12,Math.min(.07,s.C*.35)),ce=f(c?.21:.16,Math.min(.08,s.C*.4)),le=f(c?.1:.06,Math.min(.09,s.C*.5)),ue=Y(le),de=f(c?.06:.04,Math.min(.06,s.C*.35)),b=Y(de),x=f(c?.13:.08,Math.min(.11,s.C*.55)),fe=Y(x),pe=f(c?.16:.1,Math.min(.13,s.C*.6)),me=Y(pe),S=f(.035,u*.8),C=f(c?.14:.09,Math.min(.12,s.C*.55)),w=e=>rr(ir(m,e,4.6,c?`lighter`:`darker`)),he=G(lr(b,h,1,4.6)),ge=G(lr(oe,h,1,4.6)),_e=Y(f(.22,Math.min(.12,s.C))),ve=Y(f(.4,Math.min(.18,s.C))),ye={...ee,L:ee.L+(c?.06:-.06)};return{...r,...sr(i),canvas:G(i),chrome:G(i),toolbar:G(i),toolbarForeground:G(h),toolbarBorder:p(f(c?.14:.1,Math.min(.08,s.C*.4))),toolbarControl:p(f(c?.09:.05,u*1.3)),toolbarControlForeground:G(h),toolbarControlHover:p(f(c?.14:.09,u*1.6)),surface:p(ae),surfaceRaised:p(v),surfaceOverlay:p(se),text:G(h),textMuted:G(g),border:p(y),input:p(ce),focus:G(a),accent:G(a),accentForeground:G(re),secondary:p(le),secondaryForeground:w(ue),muted:p(de),mutedForeground:he,placeholder:ge,secondaryLabel:G(g),iconMuted:G(g),update:G(a),updateForeground:w(Y(C)),updateSurface:p(C),accentSurface:p(x),accentSurfaceForeground:w(fe),messageSurface:p(pe),messageForeground:w(me),messageAction:G(te),messageActionForeground:G(ne),messageActionHover:p(ye),codeBackground:p(S),codeForeground:G(h),searchMatchBackground:G(_e),searchMatchForeground:G(Z(_e)),searchMatchActiveBackground:G(ve),searchMatchActiveForeground:G(Z(ve)),sidebar:p(ie),sidebarForeground:w(_),sidebarMutedForeground:G(fr(_,h)),sidebarControlSurface:p(f(c?.1:.07,u*1.5)),sidebarRowHover:p(f(c?.08:.06,Math.min(.08,s.C*.45))),sidebarRowActive:p(f(c?.12:.09,Math.min(.1,s.C*.55))),sidebarRowSelected:p(f(c?.14:.1,Math.min(.11,s.C*.6))),sidebarBorder:p(f(c?.17:.12,Math.min(.08,s.C*.4))),terminalBackground:G(i),terminalForeground:G(h),terminalCursor:G(a),terminalSelection:p(f(c?.18:.12,Math.min(.12,s.C*.55))),terminalScrollbar:p(f(c?.22:.16,u)),terminalScrollbarHover:p(f(c?.3:.22,u))}}function X(e,t){let n=q(e),r=q(t),i=Math.max(n,r),a=Math.min(n,r);return(i+.05)/(a+.05)}function Z(e){let t=X(e,Un),n=X(e,Wn);return Math.max(t,n)>=4.5?t>=n?Un:Wn:X(e,Gn)>=X(e,Kn)?Gn:Kn}function lr(e,t,n,r){let i=K(t,e,n);if(X(i,e)>=r)return i;let a=t,o=0,s=n;for(let n=0;n<12;n+=1){let n=(o+s)/2,i=K(t,e,n);X(i,e)>=r?(a=i,o=n):s=n}return a}var ur=4.705,dr=5.082;function fr(e,t){return lr(e,t,1,q(e)<.179?dr:ur)}function pr(e){return e===`dark`?en.variants.dark:en.colors}function mr(e,t,n,r){let i=V(r);if(!i)return{...t,[n]:r};let a=H(i.color,i.alpha),o=W(t.canvas,e===`dark`?{r:24,g:15,b:27}:{r:250,g:245,b:250}),s=Y(i.color),c=e=>K(e,s,i.alpha),l=c(o),u=W(t.accent,{r:168,g:67,b:112}),d=q(o)<.179,f=q(l)<.179,p=e=>G(e),m=e=>p(Z(e)),h=e=>rr(ir(i.color,e,4.6,q(e)<.179?`lighter`:`darker`)),g=()=>{let e=K(o,l,d?.16:.08);return{foreground:h(e),surface:p(e)}};switch(n){case`canvas`:return{...t,canvas:a,chrome:a,toolbar:a};case`surface`:case`surfaceRaised`:case`surfaceOverlay`:case`input`:case`sidebarControlSurface`:return{...t,[n]:a};case`text`:return{...t,text:a,toolbarForeground:a,toolbarControlForeground:a};case`mutedForeground`:return{...t,textMuted:a,mutedForeground:a,placeholder:a,secondaryLabel:a,iconMuted:a,sidebarMutedForeground:a};case`border`:return{...t,border:a,toolbarBorder:a,sidebarBorder:a};case`secondary`:return{...t,secondary:a,secondaryForeground:m(l),muted:a,toolbarControl:a};case`accentSurface`:return{...t,accentSurface:a,accentSurfaceForeground:m(l),toolbarControlHover:a};case`accent`:{let e=K(o,l,d?.32:.16);return{...t,accent:a,accentForeground:m(l),focus:a,update:a,updateForeground:h(e),updateSurface:p(e),terminalCursor:a}}case`messageAction`:{let e=Z(l),n=K(s,e===Un||e===Gn?Kn:Gn,.12);return{...t,messageAction:a,messageActionForeground:p(e),messageActionHover:H(J(n),i.alpha)}}case`messageSurface`:return{...t,messageSurface:a,messageForeground:m(l)};case`searchMatchBackground`:return{...t,searchMatchBackground:p(l),searchMatchForeground:m(l)};case`searchMatchActiveBackground`:return{...t,searchMatchActiveBackground:p(l),searchMatchActiveForeground:m(l)};case`codeBackground`:return{...t,codeBackground:a,codeForeground:m(l)};case`sidebar`:return{...t,sidebar:a,sidebarForeground:m(l)};case`sidebarRowSelected`:{let e=W(t.sidebar,o),n=c(e);return{...t,sidebarRowHover:p(K(e,n,.5)),sidebarRowActive:p(K(e,n,.8)),sidebarRowSelected:a}}case`terminalBackground`:{let e=Z(l);return{...t,terminalBackground:a,terminalForeground:p(e),terminalSelection:p(K(l,u,f?.35:.18)),terminalScrollbar:p(K(l,e,f?.42:.22)),terminalScrollbarHover:p(K(l,e,f?.55:.32))}}case`error`:{let e=g();return{...t,error:a,errorForeground:e.foreground,errorSurface:e.surface}}case`warning`:{let e=g();return{...t,warning:a,warningForeground:e.foreground,warningSurface:e.surface}}default:return{...t,[n]:a}}}var hr=on;function Q(e){let t=e;return hr.find(e=>e.id===t)??Pn().find(e=>e.id===t)??fn.find(e=>e.id===t)??null}function gr(e){let t=e;return hr.find(e=>e.id===t)?.sidebarArtwork===!0}function _r(e){let t=vr(e);return t.length===1?t[0]:null}function $(e,t){return t===e.appearance?e.colors:e.variants?.[t]??null}function vr(e){return[`light`,`dark`].filter(t=>$(e,t)!==null)}function yr(e){return e===`system`?null:e===`light`||e===`dark`?e:Q(e)?.appearance??null}function br(e){let t=e.trim().toLowerCase(),n=t.replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,48);if(n||!t)return n||`custom-theme`;let r=2166136261;for(let e=0;e<t.length;e+=1)r^=t.charCodeAt(e),r=Math.imul(r,16777619);return`theme-${(r>>>0).toString(36)}`}var xr=class extends e()(`ThemeLibraryStorageError`,{storageKey:t,operation:a([`read`,`write`]),reason:a([`malformed`,`storage-unavailable`]),cause:r(i())}){get message(){let e=this.operation===`read`?`from`:`to`;return`Failed to ${this.operation} the theme library ${e} ${this.storageKey}.`}};function Sr(e,t){if(typeof window<`u`){try{window.localStorage.setItem(R,JSON.stringify(e)),z={status:`ready`,storedThemes:e,themes:t}}catch(e){throw new xr({storageKey:R,operation:`write`,reason:`storage-unavailable`,cause:e})}jn()}}function Cr(e){if(e.status===`unavailable`)throw new xr({storageKey:R,operation:`read`,reason:e.reason,...`cause`in e?{cause:e.cause}:{}});return e}function wr(){return Cr(An())}function Tr(){return Cr(kn())}function Er(e,t){return B(e)&&e.id===t}function Dr(e,t){return B(e)&&B(e.collection)&&e.collection.id===t}function Or(e){if(L.has(e.id))throw Error(`The theme id "${e.id}" is reserved.`);let t=wr();if(hr.some(t=>t.id===e.id)||t.storedThemes.some(t=>Er(t,e.id)))throw Error(`A theme named "${e.label}" is already installed.`);let n=Qn(e),r=[...t.themes,n];return Sr([...t.storedThemes,n],r),n}function kr(e){if(L.has(e.id))throw Error(`The theme id "${e.id}" is reserved.`);let t=wr(),n=t.themes,r=n.findIndex(t=>t.id===e.id);if(r===-1)throw Error(`The theme "${e.label}" is not installed.`);let i=Qn(e),a=[...n];a[r]=i;let o=[],s=!1;for(let n of t.storedThemes)Er(n,e.id)?s||=(o.push(i),!0):o.push(n);return Sr(o,a),i}function Ar(e,t,n){if(t.length===0)throw Error(`A theme collection cannot be empty.`);let r=t.map(e=>Dn(e));if(r.some(t=>t===null||t.collection?.id!==e)||new Set(r.map(e=>e?.id)).size!==r.length)throw Error(`That theme collection is invalid.`);let i=r,a=Tr(),o=a.themes.filter(t=>t.collection?.id===e);if(n?.expectedCollection&&JSON.stringify(o)!==JSON.stringify(n.expectedCollection))throw Error(`Your installed themes changed while this package was downloading. Try again.`);let s=new Set(hr.map(e=>e.id));for(let t of a.storedThemes)!Dr(t,e)&&B(t)&&typeof t.id==`string`&&s.add(t.id);let c=i.find(e=>L.has(e.id)||s.has(e.id));if(c)throw Error(`A theme named "${c.label}" is already installed.`);let l=[],u=!1;for(let t of a.storedThemes)Dr(t,e)?u||=(l.push(...i),!0):l.push(t);return u||l.push(...i),Sr(l,On(l)),i}function jr(e){Mr([e])}function Mr(e){let t=new Set(e);if(t.size===0)return;let n=wr(),r=n.themes.filter(e=>!t.has(e.id));r.length!==n.themes.length&&Sr(n.storedThemes.filter(e=>!B(e)||typeof e.id!=`string`||!t.has(e.id)),r)}function Nr(e){if(!B(e))throw Error(`Theme colors must be objects.`);let t={};for(let[n,r]of Object.entries(e)){if(!dn.has(n))throw Error(`"${n}" is not a supported theme color role.`);let e=U(r);if(!e)throw Error(`The color for "${n}" must be a literal CSS color such as oklch(0.62 0.2 280).`);t[n]=e}if(Object.keys(t).length===0)throw Error(`Add at least one color role to the theme file.`);return t}function Pr(e){if(!B(e))throw Error(`Theme files must contain a JSON object.`);if(e.version!==1)throw Error(`This theme file uses an unsupported version. Expected 1.`);let t=e.name,n=e.appearance,r=e.colors;if(!Sn(t))throw Error(`Theme files need a name (48 characters or fewer).`);if(!yn(n))throw Error(`Theme files need an appearance of "light" or "dark".`);if(!B(r))throw Error(`Theme files need a colors object.`);let i=e.id===void 0?br(t):e.id;if(!xn(i))throw Error(`Theme ids may only contain lowercase letters, numbers, and hyphens.`);if(L.has(i))throw Error(`The theme id "${i}" is reserved.`);let a=Nr(r),o=Cn(e.collection);if(e.collection!==void 0&&!o)throw Error(`Theme collections need a valid id and label.`);let s=pr(n),c={};if(e.variants!==void 0){if(!B(e.variants))throw Error(`Theme variants must be an object.`);for(let[t,r]of Object.entries(e.variants)){if(!yn(t))throw Error(`Theme variants may only be named "light" or "dark".`);if(t===n)throw Error(`Theme variants must not repeat the base appearance "${n}".`);c[t]={...pr(t),...Nr(r)}}}return{id:i,label:t.trim(),appearance:n,colors:{...s,...a},...Object.keys(c).length>0?{variants:c}:{},...o?{collection:o}:{},...e.managed===!0?{managed:!0}:{}}}function Fr(e){let t=Qn(e),n={version:1,id:t.id,name:t.label,appearance:t.appearance,colors:t.colors,...t.variants?{variants:t.variants}:{},...t.collection?{collection:t.collection}:{},...t.managed?{managed:!0}:{}};return`${JSON.stringify(n,null,2)}\n`}var Ir={canvas:`--app-theme-canvas`,chrome:`--app-theme-chrome`,toolbar:`--app-theme-toolbar`,toolbarForeground:`--app-theme-toolbar-foreground`,toolbarBorder:`--app-theme-toolbar-border`,toolbarControl:`--app-theme-toolbar-control`,toolbarControlForeground:`--app-theme-toolbar-control-foreground`,toolbarControlHover:`--app-theme-toolbar-control-hover`,surface:`--app-theme-surface`,surfaceRaised:`--app-theme-surface-raised`,surfaceOverlay:`--app-theme-surface-overlay`,text:`--app-theme-text`,textMuted:`--app-theme-text-muted`,border:`--app-theme-border`,input:`--app-theme-input`,focus:`--app-theme-focus`,accent:`--app-theme-accent`,accentForeground:`--app-theme-accent-foreground`,secondary:`--app-theme-secondary`,secondaryForeground:`--app-theme-secondary-foreground`,muted:`--app-theme-muted`,mutedForeground:`--app-theme-muted-foreground`,placeholder:`--app-theme-placeholder`,secondaryLabel:`--app-theme-secondary-label`,iconMuted:`--app-theme-icon-muted`,error:`--app-theme-error`,errorForeground:`--app-theme-error-foreground`,errorSurface:`--app-theme-error-surface`,warning:`--app-theme-warning`,warningForeground:`--app-theme-warning-foreground`,warningSurface:`--app-theme-warning-surface`,update:`--app-theme-update`,updateForeground:`--app-theme-update-foreground`,updateSurface:`--app-theme-update-surface`,accentSurface:`--app-theme-accent-surface`,accentSurfaceForeground:`--app-theme-accent-surface-foreground`,messageSurface:`--app-theme-message-surface`,messageForeground:`--app-theme-message-foreground`,messageAction:`--app-theme-message-action`,messageActionForeground:`--app-theme-message-action-foreground`,messageActionHover:`--app-theme-message-action-hover`,codeBackground:`--app-theme-code-background`,codeForeground:`--app-theme-code-foreground`,searchMatchBackground:`--app-theme-search-match-background`,searchMatchForeground:`--app-theme-search-match-foreground`,searchMatchActiveBackground:`--app-theme-search-match-active-background`,searchMatchActiveForeground:`--app-theme-search-match-active-foreground`,sidebar:`--app-theme-sidebar`,sidebarForeground:`--app-theme-sidebar-foreground`,sidebarMutedForeground:`--app-theme-sidebar-muted-foreground`,sidebarControlSurface:`--app-theme-sidebar-control-surface`,sidebarRowHover:`--app-theme-sidebar-row-hover`,sidebarRowActive:`--app-theme-sidebar-row-active`,sidebarRowSelected:`--app-theme-sidebar-row-selected`,sidebarBorder:`--app-theme-sidebar-border`,terminalBackground:`--app-theme-terminal-background`,terminalForeground:`--app-theme-terminal-foreground`,terminalCursor:`--app-theme-terminal-cursor`,terminalSelection:`--app-theme-terminal-selection-background`,terminalScrollbar:`--app-theme-terminal-scrollbar`,terminalScrollbarHover:`--app-theme-terminal-scrollbar-hover`};function Lr(e){return Ir[e]}var Rr=`__preview`;function zr(e,t){if(typeof document>`u`)return;let n=document.documentElement;if(n?.style){vn(!1),n.dataset.themeId=Rr,n.classList.toggle(`dark`,t===`dark`);for(let[t,r]of Object.entries(e))bn(r)&&n.style.setProperty(Ir[t],r)}}function Br(e,t){if(typeof document>`u`)return;let n=document.documentElement;if(!n?.style)return;vn(null);let r=Q(e);if(r){n.dataset.themeId=r.id;let e=$(r,t??r.appearance)??r.colors;for(let[t,r]of Object.entries(e))n.style.setProperty(Ir[t],r)}else{delete n.dataset.themeId;for(let e of Object.values(Ir))n.style.removeProperty(e)}}function Vr(e,t,n,r,i){let a=t?`dark`:`light`,o=r??(n??e===`system`?`system`:null);if(o===`system`){if(i?.[a])return a;let t=Q(e);return t&&$(t,a)===null?t.appearance:a}if(o===`light`||o===`dark`){if(i?.[o])return o;let t=Q(e);return t&&$(t,o)===null?t.appearance:o}return yr(e)??`light`}function Hr(e,t,n,r){let i=n??(t??e===`system`?`system`:null);if(i===`system`){let t=Q(e),n=r?.light!==void 0||t!==null&&$(t,`light`)!==null,i=r?.dark!==void 0||t!==null&&$(t,`dark`)!==null;return t&&(!n||!i)?t.appearance:`system`}if(i===`light`||i===`dark`){if(r?.[i])return i;let t=Q(e);return t&&$(t,i)===null?t.appearance:i}return yr(e)??`system`}function Ur(e){return e===`light`||e===`dark`||e===`system`||Q(e)!==null}function Wr(e){if(!e)return null;try{let t=JSON.parse(e);if(!B(t))return null;let n={};for(let e of[`light`,`dark`]){let r=t[e];if(typeof r!=`string`)continue;let i=Q(r);i&&$(i,e)!==null&&(n[e]=i.id)}return n.light!==void 0||n.dark!==void 0?n:null}catch{return null}}function Gr(e,t,n){return t?.[n]??e}export{Qt as $,jr as A,_n as B,Ur as C,Pr as D,wn as E,Gr as F,mr as G,Yn as H,Fr as I,tn as J,on as K,In as L,Ar as M,Hr as N,Wr as O,Vr as P,$t as Q,_r as R,Mn as S,bn as T,br as U,gr as V,kr as W,nn as X,an as Y,en as Z,Q as _,Rr as a,gn as b,Br as c,pr as d,Zt as et,Fn as f,$ as g,Lr as h,ln as i,Mr as j,ar as k,cr as l,Rn as m,cn as n,un as o,Bn as p,rn as q,sn as r,zr as s,R as t,Pn as u,vr as v,Ln as w,Or as x,yr as y,zn as z};
|
|
5
|
+
//# sourceMappingURL=themePalette-1UQmJk98.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=threadCheckpoints-
|
|
1
|
+
import{Fx as e}from"./utils-DjbLtxuo.js";function t(t){return t.checkpoints.flatMap(n=>{if(n.appRunOrdinal===null||n.runId===null)return[];let r=t.messages.findLast(e=>e.runId===n.runId&&e.role===`assistant`)?.id??null;return[{checkpointId:n.id,scopeId:n.scopeId,runId:n.runId,checkpointTurnCount:n.appRunOrdinal,checkpointRef:n.ref,status:n.status,files:n.files,...n.filesTotal===void 0?{}:{filesTotal:n.filesTotal},assistantMessageId:r,completedAt:e(n.capturedAt)}]})}function n(e){if(e.filesTotal!==void 0)return e.filesTotal;let t=0,n=0;for(let r of e.files)t+=r.additions,n+=r.deletions;return{count:e.files.length,additions:t,deletions:n}}export{t as n,n as t};
|
|
2
|
+
//# sourceMappingURL=threadCheckpoints-C5aLz9nv.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{
|
|
2
|
-
//# sourceMappingURL=toggle-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Do as i,Fo as a,Ha as o,Ma as s,Pa as c,Sr as l,Xa as u,ld as d,po as f,t as p}from"./utils-DjbLtxuo.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(a(7));return t}var _=e(r()),v=m.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:a=!1,form:d,onPressedChange:p,pressed:m,render:h,type:v,value:y,nativeButton:b=!0,style:x,...S}=e,C=c(y||void 0),w=g(),T=w?.value??[],E=w?void 0:r,D=(a||w?.disabled)??!1,[O,k]=u({controlled:w?C!==void 0&&T.indexOf(C)>-1:m,default:E,name:`Toggle`,state:`pressed`}),{getButtonProps:A,buttonRef:j}=o({disabled:D,native:b}),M={disabled:D,pressed:O},N=[j,t],P=[{"aria-pressed":O,onClick(e){let t=!O,n=s(f,e.nativeEvent);C&&w?.setGroupValue?.(C,t,n),p?.(t,n),!n.isCanceled&&k(t)}},S,A],F=i(`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=n(),b=d(`[&_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-DERKSGyC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{
|
|
2
|
-
//# sourceMappingURL=toggle-group-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Ao as i,Do as a,Ga as o,Xa as s,oi as c,t as l}from"./utils-DjbLtxuo.js";import{t as u}from"./CompositeRoot-CL7X20MU.js";import{n as d,t as f}from"./toggle-DERKSGyC.js";var p=e(t()),m=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e.multiple=`data-multiple`,e}({}),h=e(r()),g={multiple(e){return e?{[m.multiple]:``}:null}},_=p.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:l=!0,onValueChange:f,orientation:m=`horizontal`,multiple:_=!1,value:v,className:y,render:b,style:x,...S}=e,C=c(!0),w=p.useMemo(()=>v!==void 0||n!==void 0,[v,n]),T=(C?.disabled??!1)||r,[E,D]=s({controlled:v,default:v===void 0?n??i:void 0,name:`ToggleGroup`,state:`value`}),O=o((e,t,n)=>{let r;_?(r=E.slice(),t?r.push(e):r.splice(E.indexOf(e),1)):r=t?[e]:[],f?.(r,n),!n.isCanceled&&D(r)}),k={disabled:T,multiple:_,orientation:m},A=p.useMemo(()=>({disabled:T,orientation:m,setGroupValue:O,value:E,isValueInitialized:w}),[T,m,O,E,w]),j={role:`group`},M=a(`div`,e,{enabled:!!C,state:k,ref:t,props:[j,S],stateAttributesMapping:g});return(0,h.jsx)(d.Provider,{value:A,children:C?M:(0,h.jsx)(u,{render:b,className:y,style:x,state:k,refs:[t],props:[j,S],stateAttributesMapping:g,loopFocus:l,enableHomeAndEndKeys:!0,orientation:m})})}),v=n(),y=p.createContext({size:`default`,variant:`default`});function b({className:e,variant:t=`segmented`,size:n=t===`segmented`?`segmented`:`default`,orientation:r=`horizontal`,children:i,...a}){let o=p.useMemo(()=>({size:n,variant:t}),[n,t]);return(0,h.jsx)(_,{className:l(`flex w-fit *:focus-visible:z-10 dark:*:[[data-slot=separator]:has(+[data-slot=toggle]:hover)]:before:bg-input/64 dark:*:[[data-slot=separator]:has(+[data-slot=toggle][data-pressed])]:before:bg-input dark:*:[[data-slot=toggle]:hover+[data-slot=separator]]:before:bg-input/64 dark:*:[[data-slot=toggle][data-pressed]+[data-slot=separator]]:before:bg-input`,r===`horizontal`?`*:pointer-coarse:after:min-w-auto`:`*:pointer-coarse:after:min-h-auto`,t===`segmented`?`gap-0.5 rounded-lg bg-input/40 p-0.5`:t==="default"?`gap-0.5`:r===`horizontal`?`*:not-first:not-data-[slot=separator]:before:-start-[0.5px] *:not-last:not-data-[slot=separator]:before:-end-[0.5px] *:not-first:rounded-s-none *:not-last:rounded-e-none *:not-first:border-s-0 *:not-last:border-e-0 *:not-first:before:rounded-s-none *:not-last:before:rounded-e-none`:`*:not-first:not-data-[slot=separator]:before:-top-[0.5px] *:not-last:not-data-[slot=separator]:before:-bottom-[0.5px] flex-col *:not-first:rounded-t-none *:not-last:rounded-b-none *:not-first:border-t-0 *:not-last:border-b-0 *:not-first:before:rounded-t-none *:not-last:before:rounded-b-none *:data-[slot=toggle]:not-last:before:hidden dark:*:last:before:hidden dark:*:first:before:block`,e),"data-size":n,"data-slot":`toggle-group`,"data-variant":t,orientation:r,...a,children:(0,h.jsx)(y,{value:o,children:i})})}function x(e){let t=(0,v.c)(12),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,variant:o,size:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=p.use(y),c=o??s.variant,l=a??s.size,u;return t[6]!==n||t[7]!==r||t[8]!==i||t[9]!==l||t[10]!==c?(u=(0,h.jsx)(f,{className:r,"data-size":l,"data-variant":c,size:l,variant:c,...i,children:n}),t[6]=n,t[7]=r,t[8]=i,t[9]=l,t[10]=c,t[11]=u):u=t[11],u}export{b as n,x as t};
|
|
2
|
+
//# sourceMappingURL=toggle-group-DYSJFIn3.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{Wc as i,r as a,t as o}from"./utils-DjbLtxuo.js";import{a as s,n as c,o as l,r as u,s as d,t as f}from"./TooltipProvider-Czzm7ro-.js";import{t as p}from"./env-BfPir1X4.js";var m=n(),h=e(t(),1),g=`wco`,_=`electron`,v=`electron-windows`,y=52;function b(){return typeof navigator>`u`?null:navigator.windowControlsOverlay??null}function x(){if(typeof document>`u`)return()=>{};let e=b(),t=()=>{document.documentElement.classList.toggle(g,e!==null&&e.visible)};return t(),e?(e.addEventListener(`geometrychange`,t),()=>{e.removeEventListener(`geometrychange`,t)}):()=>{}}function S(e){let t=b();return t?.addEventListener(`geometrychange`,e),()=>t?.removeEventListener(`geometrychange`,e)}function C(){if(p&&i(navigator.platform))return y;let e=b();return e?.visible?e.getTitlebarAreaRect().bottom:0}function w(){return(0,h.useSyncExternalStore)(S,C,T)}function T(){return 0}function E(e){return a(e)?[_,v]:[_]}function D(e){if(typeof document>`u`)return()=>{};let t=E(e);return document.documentElement.classList.add(...t),()=>{document.documentElement.classList.remove(...t)}}var O=e(r(),1),k=5,A=f,j=(0,h.createContext)(null),M=(0,h.createContext)(null);function N(e){let t=(0,m.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({onScrollCapture:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i=(0,h.useRef)(null),a;t[3]===n?a=t[4]:(a=e=>{n?.(e);let t=i.current;t&&!t.trigger.contains(t.trigger.ownerDocument.activeElement)&&(i.current=null,t.actionsRef.current?.close())},t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,O.jsx)(M,{value:i,children:(0,O.jsx)(`div`,{...r,onScrollCapture:a})}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function P(e){let t=(0,h.use)(M),n=(0,h.useRef)(null),r=e.actionsRef??n;return(0,h.useEffect)(()=>()=>{t?.current?.actionsRef===r&&(t.current=null)},[r,t]),t?(0,O.jsx)(j,{value:r,children:(0,O.jsx)(d,{...e,actionsRef:r,onOpenChange:(n,i)=>{e.onOpenChange?.(n,i),!n&&!i.isCanceled&&t.current?.actionsRef===r&&(t.current=null)}})}):(0,O.jsx)(d,{...e})}function F(e){let t=(0,h.use)(M),n=(0,h.use)(j);return!t||!n?(0,O.jsx)(l,{"data-slot":`tooltip-trigger`,...e}):(0,O.jsx)(l,{"data-slot":`tooltip-trigger`,...e,onMouseEnter:r=>{e.onMouseEnter?.(r),t.current={trigger:r.currentTarget,actionsRef:n}}})}function I(e){let t=(0,m.c)(5),n=k+w(),r;t[0]===n?r=t[1]:(r={top:n,right:k,bottom:k,left:k},t[0]=n,t[1]=r);let i;return t[2]!==e||t[3]!==r?(i=(0,O.jsx)(u,{className:`pointer-events-none z-[140] max-w-(--available-width) transition-[top,left,right,bottom,transform] data-instant:transition-none`,collisionPadding:r,"data-slot":`tooltip-positioner`,...e}),t[2]=e,t[3]=r,t[4]=i):i=t[4],i}function L(e){let t=(0,m.c)(25),n,r,i,a,l,u,d,f;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],l=t[5],u=t[6],d=t[7],f=t[8]):({className:i,align:l,sideOffset:u,side:d,variant:f,anchor:n,children:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=l,t[6]=u,t[7]=d,t[8]=f);let p=l===void 0?`center`:l,h=u===void 0?4:u,g=d===void 0?`top`:d,_=f===void 0?`default`:f,v=_===`glass`?`dropdown-glass shadow-xl shadow-black/25 before:hidden`:_===`inverse`?`rounded-xl border border-foreground bg-foreground text-background shadow-md/10 before:hidden`:`border bg-popover not-dark:bg-clip-padding shadow-md/5`,y=_===`code`?`max-w-120 wrap-anywhere text-left font-mono text-[11px] leading-relaxed`:`max-w-80 wrap-anywhere whitespace-normal leading-snug`,b;t[9]!==i||t[10]!==v||t[11]!==y?(b=o(`relative flex origin-(--transform-origin) text-balance rounded-md text-popover-foreground text-xs transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 data-instant:duration-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,v,y,i),t[9]=i,t[10]=v,t[11]=y,t[12]=b):b=t[12];let x;t[13]===r?x=t[14]:(x=(0,O.jsx)(`div`,{className:`min-w-0 px-2 py-1`,"data-slot":`tooltip-viewport`,children:r}),t[13]=r,t[14]=x);let S;t[15]!==a||t[16]!==b||t[17]!==x?(S=(0,O.jsx)(c,{className:b,"data-slot":`tooltip-popup`,...a,children:x}),t[15]=a,t[16]=b,t[17]=x,t[18]=S):S=t[18];let C;return t[19]!==p||t[20]!==n||t[21]!==g||t[22]!==h||t[23]!==S?(C=(0,O.jsx)(s,{children:(0,O.jsx)(I,{align:p,anchor:n,side:g,sideOffset:h,children:S})}),t[19]=p,t[20]=n,t[21]=g,t[22]=h,t[23]=S,t[24]=C):C=t[24],C}export{F as a,N as i,L as n,D as o,A as r,x as s,P as t};
|
|
2
|
+
//# sourceMappingURL=tooltip-C7NAkYG3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{W as e,z as t}from"./utils-
|
|
2
|
-
//# sourceMappingURL=uiStateStore-
|
|
1
|
+
import{W as e,z as t}from"./utils-DjbLtxuo.js";import{ar as n}from"./runtime-BBYIQ0f-.js";import"./entities-CWtNgawi.js";var r=`p4code:ui-state:v1`,i=2,a=[`p4code:renderer-state:v8`,`p4code:renderer-state:v7`,`p4code:renderer-state:v6`,`p4code:renderer-state:v5`,`p4code:renderer-state:v4`,`p4code:renderer-state:v3`,`codething:renderer-state:v4`,`codething:renderer-state:v3`,`codething:renderer-state:v2`,`codething:renderer-state:v1`],o={projectExpandedById:{},projectOrder:[],pinnedProjectKeys:[],sidebarSections:[],projectSectionByKey:{},inactiveProjectKeys:[],inactiveSectionExpanded:!1,threadSectionByKey:{},sidebarProjectScopeKey:null,threadLastVisitedAtById:{},threadChangedFilesExpandedById:{},defaultAdvertisedEndpointKey:null,pullRequestMergeMethod:`merge`},s=`legacy-project-cwd:`,c=`legacy-project-expansion-default`,l=!1;function u(e){return`${s}${n(e)}`}function d(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:[]}function f(e){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(e=>e[0].length>0&&typeof e[1]==`boolean`))}function p(e){return typeof e==`string`&&e.length>0?e:null}function m(e){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(e=>e[0].length>0&&typeof e[1]==`string`&&e[1].length>0&&Number.isFinite(Date.parse(e[1]))))}function h(e){return e===`merge`||e===`squash`||e===`rebase`}function g(e){return{projectExpandedById:e.projectExpandedById===void 0?(()=>{let t={},n=d(e.collapsedProjectCwds),r=d(e.expandedProjectCwds);for(let e of n)t[u(e)]=!1;for(let e of r)t[u(e)]=!0;return!Array.isArray(e.collapsedProjectCwds)&&r.length>0&&(t[c]=!1),t})():f(e.projectExpandedById),projectOrder:e.projectOrder===void 0?d(e.projectOrderCwds).map(u):d(e.projectOrder),pinnedProjectKeys:d(e.pinnedProjectKeys),sidebarSections:d(e.sidebarSections),threadSectionByKey:Object.fromEntries(Object.entries(e.threadSectionByKey??{}).filter(([t,n])=>t.length>0&&d(e.sidebarSections).includes(n))),projectSectionByKey:Object.fromEntries(Object.entries(e.projectSectionByKey??{}).filter(([t,n])=>t.length>0&&d(e.sidebarSections).includes(n))),inactiveProjectKeys:d(e.inactiveProjectKeys),inactiveSectionExpanded:e.inactiveSectionExpanded===!0,threadLastVisitedAtById:m(e.threadLastVisitedAtById),threadChangedFilesExpandedById:e.threadChangedFilesExpansionVersion===i?v(e.threadChangedFilesExpandedById):{},defaultAdvertisedEndpointKey:p(e.defaultAdvertisedEndpointKey),sidebarProjectScopeKey:p(e.sidebarProjectScopeKey),pullRequestMergeMethod:h(e.pullRequestMergeMethod)?e.pullRequestMergeMethod:o.pullRequestMergeMethod}}function _(){if(typeof window>`u`)return o;try{let e=window.localStorage.getItem(r);if(!e){for(let e of a){let t=window.localStorage.getItem(e);if(t)return g(JSON.parse(t))}return o}return g(JSON.parse(e))}catch{return o}}function v(e){if(!e||typeof e!=`object`)return{};let t={};for(let[n,r]of Object.entries(e)){if(!n||!r||typeof r!=`object`)continue;let e={};for(let[t,n]of Object.entries(r))t&&typeof n==`boolean`&&(e[t]=n);Object.keys(e).length>0&&(t[n]=e)}return t}function y(e){if(typeof window<`u`)try{let t=Object.fromEntries(Object.entries(e.projectExpandedById).filter(([e])=>e!==c));if(window.localStorage.setItem(r,JSON.stringify({projectExpandedById:t,projectOrder:e.projectOrder,pinnedProjectKeys:e.pinnedProjectKeys,sidebarSections:e.sidebarSections,projectSectionByKey:e.projectSectionByKey,inactiveProjectKeys:e.inactiveProjectKeys,inactiveSectionExpanded:e.inactiveSectionExpanded,threadSectionByKey:e.threadSectionByKey,threadLastVisitedAtById:e.threadLastVisitedAtById,defaultAdvertisedEndpointKey:e.defaultAdvertisedEndpointKey,sidebarProjectScopeKey:e.sidebarProjectScopeKey,threadChangedFilesExpansionVersion:i,threadChangedFilesExpandedById:e.threadChangedFilesExpandedById,pullRequestMergeMethod:e.pullRequestMergeMethod})),!l){l=!0;for(let e of a)window.localStorage.removeItem(e)}}catch{}}var b=new t(y,{wait:500});function x(e,t,n){let r=Date.parse(n);if(!Number.isFinite(r))return e;let i=e.threadLastVisitedAtById[t],a=i?Date.parse(i):NaN;return Number.isFinite(a)&&Number.isFinite(r)&&a>=r?e:{...e,threadLastVisitedAtById:{...e.threadLastVisitedAtById,[t]:n}}}function S(e,t,n){if(!n)return e;let r=Date.parse(n);if(Number.isNaN(r))return e;let i=new Date(r-1).toISOString();return e.threadLastVisitedAtById[t]===i?e:{...e,threadLastVisitedAtById:{...e.threadLastVisitedAtById,[t]:i}}}function C(e,t,n,r){let i=e.threadChangedFilesExpandedById[t]??{};return i[n]===r?e:{...e,threadChangedFilesExpandedById:{...e.threadChangedFilesExpandedById,[t]:{...i,[n]:r}}}}function w(e,t){let n=t&&t.length>0?t:null;return e.defaultAdvertisedEndpointKey===n?e:{...e,defaultAdvertisedEndpointKey:n}}function T(e,t){let n=p(t);return e.sidebarProjectScopeKey===n?e:{...e,sidebarProjectScopeKey:n}}function E(e,t){return e.pullRequestMergeMethod===t?e:{...e,pullRequestMergeMethod:t}}function D(e,t){for(let n of t){let t=e[n];if(t!==void 0)return t}return e[c]??!0}function O(e,t,n){let r=(typeof t==`string`?[t]:t).filter(t=>e.projectExpandedById[t]!==n);if(r.length===0)return e;let i={...e.projectExpandedById};for(let e of r)i[e]=n;return{...e,projectExpandedById:i}}function k(e,t,n,r){if(n.length===0)return e;let i=new Set(n),a=new Set(r);if(n.every(e=>a.has(e)))return e;let o=t.findIndex(e=>a.has(e));if(o<0)return e;let s=[...t],c=[],l=0;for(let e=s.length-1;e>=0;e--)i.has(s[e])&&(c.unshift(s.splice(e,1)[0]),e<o&&l++);if(c.length===0)return e;let u=o-Math.max(0,l-1);return s.splice(u,0,...c),{...e,projectOrder:s}}var A=e(e=>({..._(),setThreadSection:(t,n)=>e(e=>({sidebarSections:n&&!e.sidebarSections.includes(n)?[...e.sidebarSections,n]:e.sidebarSections,threadSectionByKey:n?{...e.threadSectionByKey,[t]:n}:Object.fromEntries(Object.entries(e.threadSectionByKey).filter(([e])=>e!==t))})),toggleProjectPinned:t=>e(e=>({pinnedProjectKeys:e.pinnedProjectKeys.includes(t)?e.pinnedProjectKeys.filter(e=>e!==t):[...e.pinnedProjectKeys,t],inactiveProjectKeys:e.inactiveProjectKeys.filter(e=>e!==t)})),setProjectSection:(t,n)=>e(e=>({sidebarSections:n&&!e.sidebarSections.includes(n)?[...e.sidebarSections,n]:e.sidebarSections,projectSectionByKey:n?{...e.projectSectionByKey,[t]:n}:Object.fromEntries(Object.entries(e.projectSectionByKey).filter(([e])=>e!==t)),pinnedProjectKeys:e.pinnedProjectKeys.filter(e=>e!==t),inactiveProjectKeys:e.inactiveProjectKeys.filter(e=>e!==t)})),setProjectInactive:(t,n)=>e(e=>{let r=e.inactiveProjectKeys.filter(e=>e!==t);return n?{inactiveProjectKeys:[...r,t],pinnedProjectKeys:e.pinnedProjectKeys.filter(e=>e!==t),projectSectionByKey:Object.fromEntries(Object.entries(e.projectSectionByKey).filter(([e])=>e!==t))}:{inactiveProjectKeys:r}}),setInactiveSectionExpanded:t=>e({inactiveSectionExpanded:t}),removeSidebarSection:t=>e(e=>({threadSectionByKey:Object.fromEntries(Object.entries(e.threadSectionByKey).filter(([,e])=>e!==t)),sidebarSections:e.sidebarSections.filter(e=>e!==t),projectSectionByKey:Object.fromEntries(Object.entries(e.projectSectionByKey).filter(([,e])=>e!==t))})),markThreadVisited:(t,n)=>e(e=>x(e,t,n)),markThreadUnread:(t,n)=>e(e=>S(e,t,n)),setThreadChangedFilesExpanded:(t,n,r)=>e(e=>C(e,t,n,r)),setDefaultAdvertisedEndpointKey:t=>e(e=>w(e,t)),setSidebarProjectScopeKey:t=>e(e=>T(e,t)),setPullRequestMergeMethod:t=>e(e=>E(e,t)),setProjectExpanded:(t,n)=>e(e=>O(e,t,n)),reorderProjects:(t,n,r)=>e(e=>k(e,t,n,r))}));A.subscribe(e=>b.maybeExecute(e)),typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`beforeunload`,()=>{b.flush()});export{D as n,A as r,u as t};
|
|
2
|
+
//# sourceMappingURL=uiStateStore-FYiLqqos.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{$_ as i,Am as a,Fs as o,Jd as s,Ls as c,OE as l,Ob as u,Ps as d,Qn as f,Vd as p,Yb as m,Zn as h,_m as g,ap as _,cm as v,es as y,fr as b,gh as x,hr as S,is as C,kv as w,ml as T,mr as E,nx as D,rr as ee,sr as O,ss as k,t as A,tr as j,ub as M,us as N,vb as P,ys as F}from"./utils-DjbLtxuo.js";import{Er as I,Sr as L,Tr as R,yr as z}from"./runtime-BBYIQ0f-.js";import{a as B,c as V,o as te,s as ne,t as re}from"./select-Cz_1ByI4.js";import{t as ie}from"./useNavigateBack-D62rsj_4.js";import{rt as ae}from"./useSettings-EYJbJzT3.js";import{f as oe,s as se}from"./server-Dkj4NeYG.js";import{n as H,t as U}from"./session-CBEVNHld.js";import{t as ce}from"./use-atom-command-BbFDhw_c.js";import{a as le,c as ue,d as W,f as G,i as de,l as K,n as fe,o as pe,r as q,s as J,t as Y,u as me}from"./usageFormat-BZJ9qCn4.js";import{t as he}from"./env-BfPir1X4.js";import{a as ge,n as _e,t as ve}from"./tooltip-C7NAkYG3.js";import{t as X}from"./skeleton-BavPX8IL.js";import{n as ye,t as be}from"./toggle-group-DYSJFIn3.js";import{t as xe}from"./input-CQaedaQh.js";import{t as Se}from"./scroll-area-Cm9XZdHp.js";import{a as Ce,c as we,i as Te,o as Ee,r as De,s as Oe,t as ke}from"./dialog-DTVhbEqi.js";import{o as Ae}from"./sidebar-B70J7v16.js";import{t as je}from"./observeResize-BbXolq6K.js";import{y as Me}from"./keybindings-tgj8XFFz.js";import{i as Ne,o as Pe,t as Fe}from"./popover-BB2K1---.js";import{S as Ie,n as Le,t as Re}from"./ChatGptUsageButton-BldpBXxU.js";import{t as ze}from"./WorkspacePageContainer-BlYFBUKE.js";import{n as Be,r as Ve,t as He}from"./usageShortcuts-BJyp1xT6.js";import{Ao as Ue,Ir as We,Lr as Ge,Rr as Ke,ci as qe,pa as Je,wa as Ye,zr as Xe}from"./main-B1sXOjZZ.js";import{t as Ze}from"./WorkspacePageHeader-B7O16593.js";import{i as Qe,n as $e,r as et,t as tt}from"./WorkspaceBreadcrumb-BImJJpuo.js";import{t as nt}from"./usageAccess-2Wks5kIN.js";var Z=e(t(),1),Q=n(),rt=m(I);function it(e,t){return e?.sources.some(e=>e.action===`enableCursorKeychain`)===!0&&t?.some(e=>e.driver===`cursor`&&e.status===`ready`)===!0}function at(e){return e.some(e=>e.summary?.sources.some(e=>e.fingerprint.provider===`cursor`&&e.fingerprint.hostId===`cursor.com`))?[]:e.filter(e=>e.needsCursorKeychainAccess)}var ot=new Map,st=new Map;async function ct(e,t,n=!1,r=!1){let i=st.get(e);if(i!==void 0){if(r){try{await i}catch{}return ct(e,t,!1,!0)}return n?void 0:await i}let a=ot.get(e)??0;if(n&&Date.now()<a)return;let o=Promise.resolve().then(t).finally(()=>{st.delete(e),ot.set(e,Date.now()+3e5)});return st.set(e,o),await o}async function lt({registry:e,server:t,presentations:n,environmentIds:r,input:i}){await Promise.all(r.map(async r=>{let a=t.usageSummary({environmentId:r,input:i}),o=n.presentationAtom(r),s=new AbortController,c=()=>{e.get(o)?.connection.phase!==`connected`&&s.abort()},l=e.subscribe(o,c);c();try{let n=await L(e,t.refreshUsageRates,{environmentId:r,input:{}},{reportFailure:!1}),i=n._tag===`Failure`&&rt(R(n));if(e.refresh(a),i||s.signal.aborted)return;await z(e,a,{reportFailure:!1,signal:s.signal})}finally{l()}}))}function ut(e,t=!1){let{summary:n}=e;if(!e.isConnected||e.error!==null)return{phase:`inactive`};if(n===null)return{phase:`loading`};if(t)return{phase:`stale`};if(!e.isPending)return{phase:`ready`};let r=[...new Set(n.sources.flatMap(e=>e.refreshing?[e.fingerprint.provider]:[]))];return r.length>0?{phase:`partway`,providers:r}:{phase:`stale`}}function dt(e,t){return e.length===1?`Updating ${t(e[0])}…`:`Updating ${e.length} providers…`}function ft(e,t=!1){let n=new Set,r=!1;for(let i of e){let e=ut(i,t);if((e.phase===`loading`||e.phase===`stale`)&&(r=!0),e.phase===`partway`)for(let t of e.providers)n.add(t)}return{partial:r||n.size>0,everyProvider:r,providers:n}}function pt(e){return e.records>0&&e.unpricedRecords>=e.records}function mt(e){return[e.hostId,e.provider,e.resolvedHomePath,e.volumeId].join(` `)}function ht(e,t){let n=e.sources.filter(e=>e.fingerprint.provider===t.fingerprint.provider);return e.buckets.filter(e=>e.provider===t.fingerprint.provider&&(e.sourcePath===t.fingerprint.resolvedHomePath||e.sourcePath===void 0&&n.length===1))}function gt(e){return JSON.stringify([e.day,e.hourStart??null,e.provider,e.model])}function _t(e){let t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=[],s=[...e].sort((e,t)=>(Date.parse(t.summary.readAt)||0)-(Date.parse(e.summary.readAt)||0)||e.environmentId.localeCompare(t.environmentId));for(let e of[`ok`,`partial`,`failed`])for(let r of s)for(let i of r.summary.sources){if(i.status!==e)continue;let s=mt(i.fingerprint);t.has(s)?o.push(`${r.label}: ${i.fingerprint.resolvedHomePath}`):(t.set(s,r.environmentId),n.set(s,{environment:r,source:i}),a.set(s,i.distinctSessions))}for(let e of s)for(let t of e.summary.sources){if(t.status!==`partial`)continue;let o=mt(t.fingerprint),s=n.get(o);if(s?.source.status!==`ok`||Date.parse(e.summary.readAt)<=Date.parse(s.environment.summary.readAt))continue;let c=r.get(o);c===void 0&&(c=new Set(ht(s.environment.summary,s.source).map(gt)),r.set(o,c));let l=i.get(e.environmentId)??new Set,u=!1;for(let n of ht(e.summary,t)){let e=gt(n);c.has(e)||(c.add(e),l.add(n),u=!0)}u&&(i.set(e.environmentId,l),a.set(o,Math.max(a.get(o)??0,t.distinctSessions)))}return{ownerByFingerprint:t,supplementalBucketsByEnvironment:i,sessionsByFingerprint:a,duplicates:o}}function vt(e,t,n,r){let i=new Set,a=new Set,o=new Map;for(let n of e.summary.sources){if(n.status===`missing`)continue;let s=mt(n.fingerprint);if(t.get(s)===e.environmentId){let e=n.fingerprint.provider;i.add(e),a.add(`${e}\u0000${n.fingerprint.resolvedHomePath}`),o.set(e,(o.get(e)??0)+(r.get(s)??n.distinctSessions))}}return{buckets:e.summary.buckets.filter(e=>n.has(e)||(e.sourcePath===void 0?i.has(e.provider):a.has(`${e.provider}\u0000${e.sourcePath}`))),sessionsByProvider:o}}function yt(e){return e.totals.uncachedInputTokens+e.totals.cachedInputTokens+e.totals.cacheCreationTokens+e.totals.outputTokens}function bt(e,t){return e>=4&&e<=t}var xt={costUsd:0,uncachedInputTokens:0,cachedInputTokens:0,cacheCreationTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,records:0,sessions:0,providers:[],models:[],daily:[],hourly:[],costQuality:{providerReportedShare:0,modelPricedShare:0,unpricedShare:0,cacheSavingsUsd:0},categoryCost:{input:0,cacheRead:0,cacheWrite:0,output:0,unsplit:0},speedCost:{standard:0,fast:0,ultrafast:0,premium:0},duplicateSources:[],contributingEnvironments:[],contractMismatches:[]};function St(e,t){if(e.length===0)return xt;let n=[],r=[];for(let i of e)bt(i.summary.contractVersion,t)?n.push(i):r.push({environmentId:i.environmentId,direction:i.summary.contractVersion<t?`serverBehind`:`clientBehind`,contractVersion:i.summary.contractVersion});let{ownerByFingerprint:i,supplementalBucketsByEnvironment:a,sessionsByFingerprint:o,duplicates:s}=_t(n),c=0,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y={input:0,cacheRead:0,cacheWrite:0,output:0},b={fast:0,ultrafast:0,premium:0},x=new Map,S=new Map,C=new Map,w=new Map,T=[];for(let e of n){let{buckets:t,sessionsByProvider:n}=vt(e,i,a.get(e.environmentId)??new Set,o);t.length>0&&T.push(e.environmentId);for(let[e,t]of n){if(h+=t,t===0)continue;let n=x.get(e)??{costUsd:0,totalTokens:0,records:0,sessions:0};n.sessions+=t,x.set(e,n)}for(let e of t){let t=yt(e);c+=e.costUsd,g+=e.cacheSavingsUsd,l+=e.totals.uncachedInputTokens,u+=e.totals.cachedInputTokens,d+=e.totals.cacheCreationTokens,f+=e.totals.outputTokens,p+=e.totals.reasoningTokens,m+=e.records,v+=e.unpricedRecords,e.costSource===`providerReported`&&(_+=e.records),e.categoryCostUsd!==void 0&&(y.input+=e.categoryCostUsd.input,y.cacheRead+=e.categoryCostUsd.cacheRead,y.cacheWrite+=e.categoryCostUsd.cacheWrite,y.output+=e.categoryCostUsd.output),b.fast+=e.fastCostUsd??0,b.ultrafast+=e.ultrafastCostUsd??0,b.premium+=e.speedPremiumUsd??0;let n=x.get(e.provider)??{costUsd:0,totalTokens:0,records:0,sessions:0};n.costUsd+=e.costUsd,n.totalTokens+=t,n.records+=e.records,x.set(e.provider,n);let r=`${e.provider} ${e.model}`,i=S.get(r)??{provider:e.provider,costUsd:0,totalTokens:0,tokens:{uncachedInputTokens:0,cachedInputTokens:0,cacheCreationTokens:0,outputTokens:0,reasoningTokens:0},records:0,unpricedRecords:0,unpricedTokens:0};i.costUsd+=e.costUsd,i.totalTokens+=t,i.tokens={uncachedInputTokens:i.tokens.uncachedInputTokens+e.totals.uncachedInputTokens,cachedInputTokens:i.tokens.cachedInputTokens+e.totals.cachedInputTokens,cacheCreationTokens:i.tokens.cacheCreationTokens+e.totals.cacheCreationTokens,outputTokens:i.tokens.outputTokens+e.totals.outputTokens,reasoningTokens:i.tokens.reasoningTokens+e.totals.reasoningTokens},i.records+=e.records,i.unpricedRecords+=e.unpricedRecords,e.records>0&&(i.unpricedTokens+=t*e.unpricedRecords/e.records),S.set(r,i);let a=C.get(e.day)??{costUsd:0,totalTokens:0,byProvider:new Map};a.costUsd+=e.costUsd,a.totalTokens+=t;let o=a.byProvider.get(e.provider)??{costUsd:0,totalTokens:0};if(o.costUsd+=e.costUsd,o.totalTokens+=t,a.byProvider.set(e.provider,o),C.set(e.day,a),e.hourStart!==void 0){let n=w.get(e.hourStart)??{day:e.day,hourStart:e.hourStart,costUsd:0,totalTokens:0,byProvider:new Map};n.costUsd+=e.costUsd,n.totalTokens+=t;let r=n.byProvider.get(e.provider)??{costUsd:0,totalTokens:0};r.costUsd+=e.costUsd,r.totalTokens+=t,n.byProvider.set(e.provider,r),w.set(e.hourStart,n)}}}let E=l+u+d+f,D=[...x.entries()].map(([e,t])=>({provider:e,costUsd:t.costUsd,totalTokens:t.totalTokens,records:t.records,sessions:t.sessions,costShare:c===0?0:t.costUsd/c,tokenShare:E===0?0:t.totalTokens/E})).sort((e,t)=>t.costUsd-e.costUsd),ee=[...S.entries()].map(([e,t])=>({model:e.slice(e.indexOf(` `)+1),provider:t.provider,costUsd:t.costUsd,totalTokens:t.totalTokens,tokens:t.tokens,records:t.records,unpricedRecords:t.unpricedRecords,unpricedTokens:t.unpricedTokens,costShare:c===0?0:t.costUsd/c,tokenShare:E===0?0:t.totalTokens/E})).sort((e,t)=>t.costUsd-e.costUsd||t.totalTokens-e.totalTokens),O=[...C.entries()].map(([e,t])=>({day:e,costUsd:t.costUsd,totalTokens:t.totalTokens,byProvider:t.byProvider})).sort((e,t)=>e.day.localeCompare(t.day)),k=[...w.values()].sort((e,t)=>e.hourStart.localeCompare(t.hourStart));return{costUsd:c,uncachedInputTokens:l,cachedInputTokens:u,cacheCreationTokens:d,outputTokens:f,reasoningTokens:p,totalTokens:E,records:m,sessions:h,providers:D,models:ee,daily:O,hourly:k,costQuality:{providerReportedShare:m===0?0:_/m,unpricedShare:m===0?0:v/m,modelPricedShare:m===0?0:(m-_-v)/m,cacheSavingsUsd:g},categoryCost:{...y,unsplit:Math.max(0,c-y.input-y.cacheRead-y.cacheWrite-y.output)},speedCost:{...b,standard:Math.max(0,c-b.fast-b.ultrafast)},duplicateSources:s,contributingEnvironments:T,contractMismatches:r}}var Ct=k(e=>N(t=>{let n=JSON.parse(e),r=t(ae.presentationsAtom),i=[];for(let[e,a]of r){let r=a.connection.phase===`connected`,o=t(U.sessionStateAtom(e)),s=nt({connectionPhase:a.connection.phase,session:l(d(o)),hasSessionError:o._tag===`Failure`});if(!s.canReadDiagnostics){i.push({environmentId:e,label:a.entry.target.label,isConnected:r,...s,summary:null,needsCursorKeychainAccess:!1});continue}let c=t(oe.usageSummary({environmentId:e,input:n})),u=l(d(c));i.push({environmentId:e,label:a.entry.target.label,isPending:c.waiting,canReadDiagnostics:!0,isConnected:r,error:c._tag===`Failure`?`This environment could not report usage.`:null,summary:u,needsCursorKeychainAccess:it(u,t(oe.providersValueAtom(e)))})}return i}).pipe(F(`web-usage:window:${e}`)));function wt(e,t){return St(e.flatMap(({environmentId:e,label:n,summary:r})=>r===null?[]:[{environmentId:e,label:n,summary:t===void 0?r:{...r,buckets:r.buckets.filter(t)}}]),6)}var Tt=new Set;function Et(e,t){return t.size===0?e:e.map(e=>e.summary===null?e:{...e,summary:{...e.summary,buckets:e.summary.buckets.filter(e=>!t.has(e.provider)),sources:e.summary.sources.filter(e=>!t.has(e.fingerprint.provider))}})}function Dt(e,t,n){let r=(0,Q.c)(36),i=t===void 0?null:t,a=n===void 0?Tt:n,o;r[0]!==e.resolution||r[1]!==e.sinceDay||r[2]!==e.sinceTime||r[3]!==e.timeZone||r[4]!==e.untilDay||r[5]!==e.untilTime?(o=JSON.stringify({sinceDay:e.sinceDay,untilDay:e.untilDay,timeZone:e.timeZone,resolution:e.resolution,sinceTime:e.sinceTime,untilTime:e.untilTime}),r[0]=e.resolution,r[1]=e.sinceDay,r[2]=e.sinceTime,r[3]=e.timeZone,r[4]=e.untilDay,r[5]=e.untilTime,r[6]=o):o=r[6];let s=o,c;r[7]===s?c=r[8]:(c=Ct(s),r[7]=s,r[8]=c);let l=C(c),u;r[9]!==l||r[10]!==i?(u=i===null?l:l.filter(e=>i.has(e.environmentId)),r[9]=l,r[10]=i,r[11]=u):u=r[11];let d=u,f;r[12]!==d||r[13]!==s?(f=e=>lt({registry:y,server:oe,presentations:ae,environmentIds:d.filter(jt).map(At),input:e??JSON.parse(s)}),r[12]=d,r[13]=s,r[14]=f):f=r[14];let p=f,m;r[15]!==a||r[16]!==d?(m=wt(Et(d,a)),r[15]=a,r[16]=d,r[17]=m):m=r[17];let h=m,g;r[18]===d?g=r[19]:(g=d.filter(kt),r[18]=d,r[19]=g);let _=g.length,v;r[20]===d?v=r[21]:(v=d.filter(Ot),r[20]=d,r[21]=v);let b=v.length,x=_===0&&b>0,[S,w]=(0,Z.useState)(null);_>0&&(S?.merged!==h||S.window!==e||S.selection!==i||S.hidden!==a)&&w({window:e,merged:h,selection:i,hidden:a});let T=S?.selection===i&&S.hidden===a?S:null,E;r[22]!==_||r[23]!==e||r[24]!==x||r[25]!==T||r[26]!==h?(E=_>0?{window:e,merged:h}:T??(x?null:{window:e,merged:h}),r[22]=_,r[23]=e,r[24]=x,r[25]=T,r[26]=h,r[27]=E):E=r[27];let D=E,ee=_>0&&b>0,O;return r[28]!==l||r[29]!==x||r[30]!==h||r[31]!==p||r[32]!==d||r[33]!==D||r[34]!==ee?(O={merged:h,environments:l,selectedEnvironments:d,isPending:x,shown:D,isPartial:ee,refresh:p},r[28]=l,r[29]=x,r[30]=h,r[31]=p,r[32]=d,r[33]=D,r[34]=ee,r[35]=O):O=r[35],O}function Ot(e){return e.summary===null&&e.error===null}function kt(e){return e.summary!==null}function At(e){let{environmentId:t}=e;return t}function jt(e){return e.canReadDiagnostics&&H(e.environmentId,`diagnostics:read`)}var $=e(r(),1);function Mt(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`w-full caption-bottom text-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,$.jsx)(`table`,{"data-slot":`table`,className:i,...r})}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Nt(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`[&_tr]:border-b`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`thead`,{"data-slot":`table-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pt(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`[&_tr:last-child]:border-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`tbody`,{"data-slot":`table-body`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ft(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`tr`,{"data-slot":`table-row`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function It(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`th`,{"data-slot":`table-head`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Lt(e){let t=(0,Q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=A(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,$.jsx)(`td`,{"data-slot":`table-cell`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Rt=[{key:`inputCostPerMillionTokens`,label:`Input`,optional:!1},{key:`outputCostPerMillionTokens`,label:`Output`,optional:!1},{key:`cacheReadCostPerMillionTokens`,label:`Cache read`,optional:!0},{key:`cacheWriteCostPerMillionTokens`,label:`Cache write`,optional:!0}];function zt(e=``,t){return{model:e,inputCostPerMillionTokens:t?.inputCostPerMillionTokens.toString()??``,outputCostPerMillionTokens:t?.outputCostPerMillionTokens.toString()??``,cacheReadCostPerMillionTokens:t?.cacheReadCostPerMillionTokens?.toString()??``,cacheWriteCostPerMillionTokens:t?.cacheWriteCostPerMillionTokens?.toString()??``}}function Bt(e){let t=e.model.trim();if(t.length===0)return null;let n={};for(let t of Rt){let r=e[t.key].trim().replace(`,`,`.`);if(r===``){if(t.optional)continue;return null}if(!/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i.test(r))return null;let i=Number(r);if(!Number.isFinite(i)||i<0)return null;n[t.key]=i}return n.inputCostPerMillionTokens===void 0||n.outputCostPerMillionTokens===void 0?null:{model:t,price:{inputCostPerMillionTokens:n.inputCostPerMillionTokens,outputCostPerMillionTokens:n.outputCostPerMillionTokens,...n.cacheReadCostPerMillionTokens===void 0?{}:{cacheReadCostPerMillionTokens:n.cacheReadCostPerMillionTokens},...n.cacheWriteCostPerMillionTokens===void 0?{}:{cacheWriteCostPerMillionTokens:n.cacheWriteCostPerMillionTokens}}}}function Vt(e){return e.isNew&&e.model.trim()===``&&(e.alias??``).trim()===``&&Object.values(e.values).every(e=>e.trim()===``)}function Ht(e,t){return e.prices&&Object.hasOwn(e.prices,t)?e.prices[t]:void 0}function Ut(e,t){return e.aliases&&Object.hasOwn(e.aliases,t)?e.aliases[t]:void 0}function Wt(e,t){if(e.some(e=>e.aliases===null))return{value:``,placeholder:`Unavailable`};let n=e.map(e=>Ut(e,t)??``);return n.some(e=>e!==n[0])?{value:``,placeholder:`Mixed`}:{value:n[0]??``,placeholder:`None`}}function Gt(e,t,n){let r=Rt.find(e=>e.key===n).optional,i=e.map(e=>Ht(e,t)?zt(t,Ht(e,t))[n]:null);return e.some(e=>e.prices===null)?{value:``,placeholder:`Unavailable`}:i.some(e=>e!==i[0])?{value:``,placeholder:`Mixed`}:{value:i[0]??``,placeholder:i[0]===null?`Automatic`:r?`Input rate`:`0.00`}}function Kt(e,t){let n=[],r=new Map;for(let i of t){if(Vt(i))continue;let t=i.model.trim(),a=Ut(e,t);if(i.removed){Ht(e,t)&&n.push({model:t,price:null}),a!==void 0&&n.push({model:t,alias:null});continue}let o=(i.alias??a??``).trim();if(o!==``){if(i.alias===void 0&&Object.keys(i.values).length>0){r.set(i.id,`${e.label} maps this model. Remove it from "Apply to" or clear its mapping first.`);continue}t===``?r.set(i.id,`Enter a model ID.`):o===t?r.set(i.id,`Map to a different model.`):(o!==a&&n.push({model:t,alias:o}),Ht(e,t)&&n.push({model:t,price:null}));continue}if(a!==void 0&&(n.push({model:t,alias:null}),!Ht(e,t)&&Object.values(i.values).every(e=>e.trim()===``)))continue;let s=zt(t,Ht(e,t)),c={...s,...i.values},l=Bt(c);if(l===null){let n=Rt.find(e=>!e.optional&&c[e.key].trim()===``);r.set(i.id,t===``?`Enter a model ID.`:n?`${n.label} is required on ${e.label}.`:`Use non-negative numbers for prices.`);continue}let u=zt(t,l.price);Rt.some(e=>s[e.key]!==u[e.key])&&n.push(l)}let i=new Map(Object.entries(e.aliases??{}));for(let e of n)`alias`in e&&(e.alias===null?i.delete(e.model):i.set(e.model,e.alias));for(let n of t){if(n.removed||r.has(n.id))continue;let t=n.model.trim(),a=new Set;for(;i.has(t);){if(a.has(t)){r.set(n.id,`Model mappings cannot form a cycle on ${e.label}.`);break}a.add(t),t=i.get(t)}}return{changes:n,errors:r}}function qt(e,t){return new Map(e.filter(e=>e.unavailable===null&&e.prices!==null).flatMap(e=>[...Kt(e,t).errors]))}async function Jt(e){await Promise.all(e.targets.map(async t=>{let n,r=e.changes.get(t.environmentId)??[],i=r.flatMap(e=>`price`in e?[[e.model,e.price]]:[]),a=r.flatMap(e=>`alias`in e?[[e.model,e.alias]]:[]);if(t.unavailable!==null)n={status:`failed`,error:t.unavailable};else if(a.length>0&&t.aliases===null)n={status:`failed`,error:`Update server to map models`};else try{n=(r.length===0?{_tag:`Success`}:await e.write({environmentId:t.environmentId,input:{patch:{...i.length>0?{usagePriceOverrides:Object.fromEntries(i)}:{},...a.length>0?{usageModelAliases:Object.fromEntries(a)}:{}}}}))._tag===`Success`?{status:`saved`}:{status:`failed`,error:`Could not save. Try again.`}}catch{n={status:`failed`,error:`Could not save. Try again.`}}e.onResult(t.environmentId,n)}))}var Yt=N(e=>[...e(ae.presentationsAtom)].map(([t,n])=>{let r=e(oe.settingsValueAtom(t)),i=e(U.sessionStateAtom(t)),a=l(d(i)),o=i._tag===`Failure`?`denied`:a===null?i.waiting?`pending`:`denied`:w(a,`settings:write`)?`granted`:`denied`;return{environmentId:t,label:n.entry.target.label,prices:r?.usagePriceOverrides??null,aliases:n.serverConfig?.environment.capabilities.usageModelAliases===!0?r?.usageModelAliases??null:null,unavailable:n.connection.phase===`connected`?r===null?`Prices not loaded`:n.serverConfig?.environment.capabilities.usagePriceOverrides===!0?o===`pending`?`Checking permissions…`:o===`denied`?`Read-only access`:null:`Update server to edit prices`:`Offline`}}));function Xt(e){let t=(0,Q.c)(119),{usage:n,initialSelectedEnvironmentIds:r,initialModel:i,onOpenChange:a}=e,o=C(Yt),[s,c]=(0,Z.useState)(r),l;if(t[0]!==o||t[1]!==s){let e;t[3]===s?e=t[4]:(e=e=>s===null||s.has(e.environmentId),t[3]=s,t[4]=e),l=o.filter(e),t[0]=o,t[1]=s,t[2]=l}else l=t[2];let u=l,d;t[5]!==i||t[6]!==u?(d=()=>i===void 0||u.some(e=>Object.hasOwn(e.prices??{},i)||Object.hasOwn(e.aliases??{},i))?[]:[{id:`new:initial`,model:i,isNew:!0,values:{}}],t[5]=i,t[6]=u,t[7]=d):d=t[7];let[m,_]=(0,Z.useState)(d),[y,S]=(0,Z.useState)(!1),[w,T]=(0,Z.useState)(null),D=(0,Z.useRef)(null),k=(0,Z.useRef)(0),j;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(j={reportFailure:!1},t[8]=j):j=t[8];let M=ce(oe.updateSettings,j),N,P,F,I,L,R,z,B,V,te,ne,re,ie,ae,se;if(t[9]!==w||t[10]!==m||t[11]!==o||t[12]!==a||t[13]!==y||t[14]!==u||t[15]!==s||t[16]!==M||t[17]!==n){let e=[...new Set(u.flatMap(mn))].sort(),r;t[33]===u?r=t[34]:(r=e=>u.some(t=>t.environmentId===e.environmentId),t[33]=u,t[34]=r);let i=[...new Set([...e,...n.filter(r).flatMap(fn)])].sort(),l;t[35]===m?l=t[36]:(l=new Set(m.filter(dn).map(un)),t[35]=m,t[36]=l);let d=l,C;t[37]!==w||t[38]!==d?(C=e=>w===null||!d.has(e),t[37]=w,t[38]=d,t[39]=C):C=t[39];let j=[...e.filter(C).map(e=>m.find(t=>t.id===`model:${e}`)??{id:`model:${e}`,model:e,isNew:!1,values:{}}),...m.filter(ln)],oe=m.filter(cn);R=qt(u,oe);for(let t of oe)t.isNew&&(t.model.trim()===``?R.set(t.id,`Enter a model ID.`):w===null&&(e.includes(t.model.trim())||m.some(e=>e.id!==t.id&&e.model.trim()===t.model.trim()))&&R.set(t.id,`This model already has a row. Edit its prices there.`));z=w?.destinations.filter(e=>w.results.get(e.environmentId)?.status===`failed`)??[];let U=y||z.length>0;B=oe.length>0,I=u.length===1?u[0].label:`${u.length} environments`;let ce=s===null?`All environments`:I,le;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(le=()=>{_([]),T(null)},t[40]=le):le=t[40],L=le;let ue;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ue=e=>{c(e),T(null)},t[41]=ue):ue=t[41];let W=ue,G;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(G=e=>{_(t=>t.some(t=>t.id===e.id)?t.map(t=>t.id===e.id?e:t):[...t,e]),T(null)},t[42]=G):G=t[42];let de=G,K=sn,fe;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(fe=e=>{!e.isNew&&Object.keys(e.values).length===0&&e.alias===void 0?_(t=>t.filter(t=>t.id!==e.id)):de(e)},t[43]=fe):fe=t[43];let pe=fe,q;t[44]===u?q=t[45]:(q=(e,t,n)=>{let r={...e.values,[t]:n},i=Gt(u,e.model,t);K(e,i,n)&&delete r[t],pe({...e,values:r})},t[44]=u,t[45]=q);let J=q,Y;t[46]===u?Y=t[47]:(Y=(e,t)=>{let{alias:n,...r}=e,i=Wt(u,e.model);pe(K(e,i,t)?r:{...r,alias:t})},t[46]=u,t[47]=Y);let me=Y;V=async e=>{let t=e!==void 0&&e;if(y)return;let n=t?z:u,r=t&&w?w.drafts:oe;if(n.length===0||r.length===0)return;let i=n.map(e=>o.find(t=>t.environmentId===e.environmentId)??{...e,prices:null,aliases:null,unavailable:`Environment removed`}),a=new Map(i.map(e=>[e.environmentId,Kt(e,r)]));S(!0),T(e=>({drafts:r,destinations:t&&e?e.destinations:i,results:new Map([...t&&e?e.results:[],...i.map(on)])}));let s=!1;await Jt({targets:i.map(e=>({...e,unavailable:e.unavailable??[...a.get(e.environmentId).errors.values()][0]??null})),changes:new Map([...a].map(an)),write:async e=>H(e.environmentId,`settings:write`)?M(e):{_tag:`Failure`},onResult:(e,t)=>{t.status===`failed`&&(s=!0),T(n=>n===null?null:{...n,results:new Map(n.results).set(e,t)})}}),S(!1),s||_([])},F=ke,ae=!0,t[48]!==a||t[49]!==y?(se=e=>{y||a(e)},t[48]=a,t[49]=y,t[50]=se):se=t[50],P=Oe,re=`max-w-4xl`,t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,$.jsxs)(Ce,{children:[(0,$.jsx)(we,{children:`Custom model prices`}),(0,$.jsx)(De,{children:`Prices and mappings apply to all past and future usage on the environments you select.`})]}),t[51]=ie):ie=t[51],N=Ee;let he;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,$.jsx)(Je,{id:`usage-prices-apply-label`,className:`shrink-0`,children:`Apply to`}),t[52]=he):he=t[52];let X;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,$.jsx)(E,{variant:`outline`,size:`sm`,className:`min-w-0`}),t[53]=X):X=t[53];let ye=y||B,be;t[54]===ce?be=t[55]:(be=(0,$.jsx)(`span`,{id:`usage-prices-selection`,className:`truncate`,children:ce}),t[54]=ce,t[55]=be);let Se;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,$.jsx)(p,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[56]=Se):Se=t[56];let Te;t[57]!==ye||t[58]!==be?(Te=(0,$.jsxs)(b,{render:X,"aria-labelledby":`usage-prices-apply-label usage-prices-selection`,disabled:ye,children:[be,Se]}),t[57]=ye,t[58]=be,t[59]=Te):Te=t[59];let Ae=s===null,je;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(je=e=>W(e?null:new Set),t[60]=je):je=t[60];let Me;t[61]===Ae?Me=t[62]:(Me=(0,$.jsx)(f,{checked:Ae,closeOnClick:!1,onCheckedChange:je,children:`All environments`}),t[61]=Ae,t[62]=Me);let Ne;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,$.jsx)(O,{}),t[63]=Ne):Ne=t[63];let Pe;if(t[64]!==o||t[65]!==u||t[66]!==s){let e;t[68]!==o.length||t[69]!==u||t[70]!==s?(e=e=>(0,$.jsx)(f,{checked:s===null||s.has(e.environmentId),closeOnClick:!1,onCheckedChange:t=>{let n=new Set(u.map(rn));t?n.add(e.environmentId):n.delete(e.environmentId),W(n.size===o.length?null:n)},children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),e.unavailable?(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.unavailable}):null]})},e.environmentId),t[68]=o.length,t[69]=u,t[70]=s,t[71]=e):e=t[71],Pe=o.map(e),t[64]=o,t[65]=u,t[66]=s,t[67]=Pe}else Pe=t[67];let Fe;t[72]!==Me||t[73]!==Pe?(Fe=(0,$.jsxs)(ee,{align:`start`,children:[Me,Ne,Pe]}),t[72]=Me,t[73]=Pe,t[74]=Fe):Fe=t[74];let Ie;t[75]!==Te||t[76]!==Fe?(Ie=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[he,(0,$.jsxs)(h,{children:[Te,Fe]})]}),t[75]=Te,t[76]=Fe,t[77]=Ie):Ie=t[77];let Le;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`USD / million tokens`}),t[78]=Le):Le=t[78],t[79]===Ie?te=t[80]:(te=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[Ie,Le]}),t[79]=Ie,t[80]=te),ne=u.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:o.length===0?`Connect an environment to set model prices.`:`Select an environment to see and change its model prices.`}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`min-w-0 overflow-hidden rounded-lg border border-border`,children:(0,$.jsxs)(Mt,{className:`min-w-180 table-fixed`,"aria-label":`Custom model prices`,children:[(0,$.jsxs)(`colgroup`,{children:[(0,$.jsx)(`col`,{className:`w-[22%]`}),(0,$.jsx)(`col`,{className:`w-[18%]`}),Rt.map(nn),(0,$.jsx)(`col`,{className:`w-10`})]}),(0,$.jsx)(Nt,{children:(0,$.jsxs)(Ft,{children:[(0,$.jsx)(It,{children:`Model ID`}),(0,$.jsx)(It,{children:`Map to`}),Rt.map(tn),(0,$.jsx)(It,{children:(0,$.jsx)(E,{size:`icon-xs`,variant:`ghost`,"aria-label":`Add model price`,disabled:U,onClick:()=>{k.current+=1;let e=`new:${k.current}`;D.current=e,de({id:e,model:``,isNew:!0,values:{}})},children:(0,$.jsx)(v,{"aria-hidden":!0})})})]})}),(0,$.jsx)(Pt,{children:j.length===0?(0,$.jsx)(Ft,{children:(0,$.jsx)(Lt,{colSpan:7,className:`text-center whitespace-normal`,children:(0,$.jsx)(`p`,{className:`py-6 text-muted-foreground`,children:u.some(en)?`Some environment prices are unavailable.`:`No custom prices or mappings. Add a row to set one.`})})}):j.map(e=>{let t=Wt(u,e.model),n=(e.alias??t.value).trim();return(0,$.jsxs)(Ft,{"data-row-id":e.id,children:[(0,$.jsxs)(Lt,{className:`whitespace-normal`,children:[e.isNew?(0,$.jsx)(xe,{size:`compact`,value:e.model,ref:t=>{t&&D.current===e.id&&(t.focus(),D.current=null)},"aria-label":`New model ID`,"aria-invalid":e.model.trim()!==``&&R.has(e.id)||void 0,list:`usage-price-models`,placeholder:`Model ID`,autoComplete:`off`,spellCheck:!1,disabled:U,onChange:t=>de({...e,model:t.target.value})}):(0,$.jsx)(`span`,{className:A(`block break-all`,e.removed&&`text-muted-foreground line-through`),children:e.model}),R.has(e.id)&&(e.model.trim()!==``||Object.values(e.values).some($t))?(0,$.jsx)(`p`,{role:`alert`,className:`mt-1 text-xs text-destructive`,children:R.get(e.id)}):null]}),e.removed?(0,$.jsx)(Lt,{colSpan:5,children:(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Automatic pricing after saving`})}):(0,$.jsx)(Lt,{children:(0,$.jsx)(xe,{size:`compact`,value:e.alias??t.value,"aria-label":`Map ${e.model||`new model`} to model`,list:`usage-alias-models`,placeholder:e.isNew?`Optional`:t.placeholder,autoComplete:`off`,spellCheck:!1,disabled:U,onChange:t=>me(e,t.target.value)})}),e.removed?null:n===``?Rt.map(t=>{let n=Gt(u,e.model,t.key);return(0,$.jsx)(Lt,{children:(0,$.jsx)(xe,{size:`compact`,inputMode:`decimal`,"aria-label":`${t.label} price for ${e.model||`new model`}`,value:e.values[t.key]??(e.isNew?``:n.value),placeholder:e.isNew?t.optional?`Input rate`:`0.00`:n.placeholder,autoComplete:`off`,disabled:U,font:`mono`,onChange:n=>J(e,t.key,n.target.value)})},t.key)}):(0,$.jsx)(Lt,{colSpan:4,className:`whitespace-normal`,children:(0,$.jsxs)(`span`,{className:`break-all text-muted-foreground`,children:[`Counted as `,n]})}),(0,$.jsx)(Lt,{children:(0,$.jsxs)(ve,{children:[(0,$.jsx)(ge,{render:(0,$.jsx)(E,{size:`icon-xs`,variant:`ghost`}),disabled:U,"aria-label":e.removed?`Undo reset for ${e.model}`:e.isNew?`Remove new model`:`Reset price for ${e.model} to automatic`,onClick:()=>{e.isNew?_(t=>t.filter(t=>t.id!==e.id)):e.removed?pe({...e,removed:!1}):de({...e,removed:!0})},children:e.isNew?(0,$.jsx)(x,{"aria-hidden":!0}):(0,$.jsx)(g,{"aria-hidden":!0})}),(0,$.jsx)(_e,{children:e.removed?`Undo reset`:e.isNew?`Remove row`:`Reset to automatic`})]})})]},e.id)})})]})}),(0,$.jsx)(`datalist`,{id:`usage-price-models`,children:i.filter(t=>!e.includes(t)).map(Qt)}),(0,$.jsx)(`datalist`,{id:`usage-alias-models`,children:i.filter(e=>u.every(t=>!Object.hasOwn(t.aliases??{},e))).map(Zt)}),(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Blank cache rates use the input price. Enter 0 for free tokens. A mapped model’s usage counts as the model it maps to.`,u.length>1?` Mixed cells keep each environment’s rate until you edit them.`:``]})]}),t[9]=w,t[10]=m,t[11]=o,t[12]=a,t[13]=y,t[14]=u,t[15]=s,t[16]=M,t[17]=n,t[18]=N,t[19]=P,t[20]=F,t[21]=I,t[22]=L,t[23]=R,t[24]=z,t[25]=B,t[26]=V,t[27]=te,t[28]=ne,t[29]=re,t[30]=ie,t[31]=ae,t[32]=se}else N=t[18],P=t[19],F=t[20],I=t[21],L=t[22],R=t[23],z=t[24],B=t[25],V=t[26],te=t[27],ne=t[28],re=t[29],ie=t[30],ae=t[31],se=t[32];let U;t[81]===w?U=t[82]:(U=w?(0,$.jsx)(`div`,{role:`status`,className:`grid gap-1 text-xs`,children:w.destinations.map(e=>{let t=w.results.get(e.environmentId);return(0,$.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,$.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e.label}),(0,$.jsx)(`span`,{className:t?.status===`failed`?`text-right text-destructive`:`text-muted-foreground`,children:t?.status===`failed`?`Not saved · ${t.error}`:t?.status===`saved`?`Saved`:`Saving…`})]},e.environmentId)})}):null,t[81]=w,t[82]=U);let le;t[83]!==N||t[84]!==U||t[85]!==te||t[86]!==ne?(le=(0,$.jsxs)(N,{children:[te,ne,U]}),t[83]=N,t[84]=U,t[85]=te,t[86]=ne,t[87]=le):le=t[87];let ue=B?`Changes apply to ${I}`:``,W;t[88]===ue?W=t[89]:(W=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:ue}),t[88]=ue,t[89]=W);let G;t[90]!==L||t[91]!==z.length||t[92]!==B||t[93]!==y?(G=B?(0,$.jsx)(E,{variant:`ghost`,disabled:y,onClick:L,children:z.length>0?`Discard pending changes`:`Discard changes`}):null,t[90]=L,t[91]=z.length,t[92]=B,t[93]=y,t[94]=G):G=t[94];let de=y||!B&&z.length===0||z.length===0&&(R.size>0||u.length===0),K;t[95]!==z.length||t[96]!==V?(K=()=>void V(z.length>0),t[95]=z.length,t[96]=V,t[97]=K):K=t[97];let fe=y?`Saving…`:z.length>0?`Retry failed saves`:`Save changes`,pe;t[98]!==de||t[99]!==K||t[100]!==fe?(pe=(0,$.jsx)(E,{disabled:de,onClick:K,children:fe}),t[98]=de,t[99]=K,t[100]=fe,t[101]=pe):pe=t[101];let q;t[102]!==G||t[103]!==pe?(q=(0,$.jsxs)(`div`,{className:`flex w-full flex-wrap justify-end gap-2 sm:w-auto`,children:[G,pe]}),t[102]=G,t[103]=pe,t[104]=q):q=t[104];let J;t[105]!==W||t[106]!==q?(J=(0,$.jsxs)(Te,{variant:`bare`,className:`items-center sm:justify-between`,children:[W,q]}),t[105]=W,t[106]=q,t[107]=J):J=t[107];let Y;t[108]!==P||t[109]!==le||t[110]!==J||t[111]!==re||t[112]!==ie?(Y=(0,$.jsxs)(P,{className:re,children:[ie,le,J]}),t[108]=P,t[109]=le,t[110]=J,t[111]=re,t[112]=ie,t[113]=Y):Y=t[113];let me;return t[114]!==F||t[115]!==Y||t[116]!==ae||t[117]!==se?(me=(0,$.jsx)(F,{open:ae,onOpenChange:se,children:Y}),t[114]=F,t[115]=Y,t[116]=ae,t[117]=se,t[118]=me):me=t[118],me}function Zt(e){return(0,$.jsx)(`option`,{value:e},e)}function Qt(e){return(0,$.jsx)(`option`,{value:e},e)}function $t(e){return e!==``}function en(e){return e.prices===null}function tn(e){return(0,$.jsx)(It,{children:e.label},e.key)}function nn(e){return(0,$.jsx)(`col`,{},e.key)}function rn(e){return e.environmentId}function an(e){let[t,n]=e;return[t,n.changes]}function on(e){return[e.environmentId,{status:`saving`}]}function sn(e,t,n){return!e.isNew&&t.placeholder!==`Mixed`&&t.placeholder!==`Unavailable`&&n===t.value}function cn(e){return!Vt(e)}function ln(e){return e.isNew}function un(e){return e.model.trim()}function dn(e){return e.isNew}function fn(e){return e.summary?.buckets.map(pn)??[]}function pn(e){return e.model}function mn(e){return[...Object.keys(e.prices??{}),...Object.keys(e.aliases??{})]}var hn=960,gn=260,_n=4,vn=8,yn=new Set;function bn(e,t,n){let r=e?.byProvider.get(t);return r===void 0?0:n===`tokens`?r.totalTokens:r.costUsd}function xn(e,t,n){return e.map(e=>{let r=t.get(e),i=Ge.map(e=>({provider:e,value:bn(r,e,n)}));return{bands:i,total:i.reduce((e,t)=>e+t.value,0)}})}function Sn(e){let t=e.length;if(t<2)return[0];let n=[];for(let r=0;r<t-1;r+=1){let t=(e[r+1]?.x??0)-(e[r]?.x??0),i=(e[r+1]?.y??0)-(e[r]?.y??0);n.push(t===0?0:i/t)}let r=Array.from({length:t},()=>0);r[0]=n[0]??0,r[t-1]=n[t-2]??0;for(let e=1;e<t-1;e+=1){let t=n[e-1]??0,i=n[e]??0;r[e]=t*i<=0?0:(t+i)/2}for(let e=0;e<t-1;e+=1){let t=n[e]??0;if(t===0){r[e]=0,r[e+1]=0;continue}let i=(r[e]??0)/t,a=(r[e+1]??0)/t,o=i*i+a*a;if(o>9){let n=3/Math.sqrt(o);r[e]=n*i*t,r[e+1]=n*a*t}}return r}function Cn(e){if(e.length<2)return[];let t=Sn(e),n=[];for(let r=0;r<e.length-1;r+=1){let i=e[r],a=e[r+1];if(i===void 0||a===void 0)continue;let o=a.x-i.x;n.push({from:i,c1:{x:i.x+o/3,y:i.y+(t[r]??0)*o/3},c2:{x:a.x-o/3,y:a.y-(t[r+1]??0)*o/3},to:a})}return n}function wn(e){let t=e[0];if(t===void 0)return``;let n=`M${t.from.x.toFixed(2)},${t.from.y.toFixed(2)}`;for(let t of e)n+=` C${t.c1.x.toFixed(2)},${t.c1.y.toFixed(2)} ${t.c2.x.toFixed(2)},${t.c2.y.toFixed(2)} ${t.to.x.toFixed(2)},${t.to.y.toFixed(2)}`;return n}function Tn(e){return e===``?``:`${e} L${hn},${gn} L0,${gn} Z`}function En(e,t){if(e<=0)return{max:0,ticks:[0]};let n=e/t,r=10**Math.floor(Math.log10(n)),i=n/r,a=(i>5?10:i>2?5:i>1?2:1)*r,o=Math.ceil(e/a)*a,s=[];for(let e=0;e<=o+a*1e-6;e+=a)s.push(e);return{max:o,ticks:s}}var Dn=Array.from({length:5},(e,t)=>t);function On(e,t){let n=e.reduce((e,t)=>t.bands.reduce((e,t)=>Math.max(e,t.value),e),0);return n===0&&t.size>0?{max:_n,ticks:Dn,labeled:!1}:{...En(n,_n),labeled:!0}}function kn(e,t){return t===0?gn:gn-e/t*252}function An(e,t,n,r,i){let a=xn(e,t,n),o=On(a,i),s=e.length<2?0:hn/(e.length-1);return{columns:a,scale:o,stepX:s,paths:r.map(e=>{let t=Ge.indexOf(e),n=wn(Cn(a.map((e,n)=>({x:n*s,y:kn(e.bands[t]?.value??0,o.max)}))));return{provider:e,loading:i.has(e),total:a.reduce((e,n)=>e+(n.bands[t]?.value??0),0),line:n,area:Tn(n)}}).toSorted((e,t)=>t.total-e.total)}}function jn(e){let t=(0,Q.c)(97),{providers:n,loadingProviders:r,days:i,daily:a,hours:o,hourly:s,metric:c,referenceTime:l,resolution:u,timeZone:d}=e,f=r===void 0?yn:r,p=u===`hour`?o:i,m;t[0]!==a||t[1]!==s||t[2]!==u?(m=u===`hour`?new Map(s.map(Pn)):new Map(a.map(Nn)),t[0]=a,t[1]=s,t[2]=u,t[3]=m):m=t[3];let h=m,[g,_]=(0,Z.useState)(null),v=(0,Z.useRef)(null),y=(0,Z.useRef)(null),b=(0,Z.useRef)(null),x;t[4]!==h||t[5]!==f||t[6]!==c||t[7]!==p||t[8]!==n?(x=An(p,h,c,n,f),t[4]=h,t[5]=f,t[6]=c,t[7]=p,t[8]=n,t[9]=x):x=t[9];let{columns:S,scale:C,paths:w,stepX:T}=x,E;t[10]===C.max?E=t[11]:(E=e=>kn(e,C.max),t[10]=C.max,t[11]=E);let D=E,ee=Mn,O=c===`tokens`?K:W,k;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>{let e=v.current,t=y.current,n=b.current;if(e===null||t===null||n===null)return;let r=t.offsetWidth,i=t.offsetHeight,a=e.clientWidth,o=e.clientHeight,s=n.x+12+r<=a?n.x+12:n.x-12-r,c=n.y+12+i<=o?n.y+12:n.y-12-i,l=Math.min(Math.max(0,s),Math.max(0,a-r)),u=Math.min(Math.max(0,c),Math.max(0,o-i));e.style.setProperty(`--usage-tooltip-left`,`${l}px`),e.style.setProperty(`--usage-tooltip-top`,`${u}px`)},t[12]=k):k=t[12];let j=k,M,N;t[13]===g?(M=t[14],N=t[15]):(M=()=>{if(g===null)return;j();let e=v.current,t=y.current;if(e!==null&&t!==null)return je([e,t],j)},N=[g,j],t[13]=g,t[14]=M,t[15]=N),(0,Z.useLayoutEffect)(M,N);let P;t[16]===p.length?P=t[17]:(P=e=>{let t=v.current;if(t===null||p.length===0)return;let n=t.getBoundingClientRect();if(n.width===0)return;let r=Math.min(n.width,Math.max(0,e.clientX-n.left)),i=Math.min(n.height,Math.max(0,e.clientY-n.top)),a=r/n.width,o=Math.round(a*(p.length-1));b.current={x:r,y:i},j(),_(Math.min(p.length-1,Math.max(0,o)))},t[16]=p.length,t[17]=P);let F=P,I=g===null?void 0:p[g],L=g===null?void 0:S[g],R;if(t[18]!==f||t[19]!==n){let e;t[21]===f?e=t[22]:(e=e=>f.has(e),t[21]=f,t[22]=e),R=n.some(e),t[18]=f,t[19]=n,t[20]=R}else R=t[20];let z=R,B;t[23]!==u||t[24]!==d?(B=e=>u===`hour`?pe(e,d):le(e),t[23]=u,t[24]=d,t[25]=B):B=t[25];let V=B,te;t[26]!==V||t[27]!==l||t[28]!==u||t[29]!==d?(te=e=>u===`hour`&&l!==void 0?ue(e,l,d):V(e),t[26]=V,t[27]=l,t[28]=u,t[29]=d,t[30]=te):te=t[30];let ne=te,re;t[31]!==O||t[32]!==C.labeled||t[33]!==C.ticks||t[34]!==D?(re=C.labeled?C.ticks.map(e=>(0,$.jsx)(`span`,{className:`absolute right-0 -translate-y-1/2 text-3xs text-muted-foreground tabular-nums`,style:{top:`${D(e)/gn*100}%`},children:e===0?`0`:O(e)},e)):null,t[31]=O,t[32]=C.labeled,t[33]=C.ticks,t[34]=D,t[35]=re):re=t[35];let ie;t[36]===re?ie=t[37]:(ie=(0,$.jsx)(`div`,{className:`relative h-56 w-14 shrink-0`,children:re}),t[36]=re,t[37]=ie);let ae;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(ae=()=>{b.current=null,_(null)},t[38]=ae):ae=t[38];let oe=`${u===`hour`?`Hourly`:`Daily`} ${c===`tokens`?`processed tokens`:`cost`} by provider`,se;if(t[39]!==C.ticks||t[40]!==D){let e;t[42]===D?e=t[43]:(e=e=>{let t=D(e);return(0,$.jsx)(`line`,{x1:0,x2:hn,y1:t,y2:t,stroke:`currentColor`,strokeWidth:1,className:`text-border`,vectorEffect:`non-scaling-stroke`},e)},t[42]=D,t[43]=e),se=C.ticks.map(e),t[39]=C.ticks,t[40]=D,t[41]=se}else se=t[41];let H;if(t[44]!==w){let e;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>{let{provider:t,loading:n,area:r}=e;return(0,$.jsx)(`path`,{d:r,className:ee(n),fill:Ke[t].color,fillOpacity:.12},t)},t[46]=e):e=t[46],H=w.map(e),t[44]=w,t[45]=H}else H=t[45];let U;if(t[47]!==w){let e;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>{let{provider:t,loading:n,line:r}=e;return(0,$.jsx)(`path`,{d:r,className:ee(n),fill:`none`,stroke:Ke[t].color,strokeWidth:2,vectorEffect:`non-scaling-stroke`},t)},t[49]=e):e=t[49],U=w.map(e),t[47]=w,t[48]=U}else U=t[48];let ce;t[50]!==g||t[51]!==T?(ce=g===null?null:(0,$.jsx)(`line`,{x1:g*T,x2:g*T,y1:vn,y2:gn,stroke:`currentColor`,strokeWidth:1,className:`text-muted-foreground`,vectorEffect:`non-scaling-stroke`}),t[50]=g,t[51]=T,t[52]=ce):ce=t[52];let G;t[53]!==oe||t[54]!==se||t[55]!==H||t[56]!==U||t[57]!==ce?(G=(0,$.jsxs)(`svg`,{className:`h-full w-full`,viewBox:`0 0 ${hn} ${gn}`,preserveAspectRatio:`none`,role:`img`,"aria-label":oe,children:[se,H,U,ce]}),t[53]=oe,t[54]=se,t[55]=H,t[56]=U,t[57]=ce,t[58]=G):G=t[58];let de;t[59]!==O||t[60]!==ne||t[61]!==L?.bands||t[62]!==L?.total||t[63]!==I||t[64]!==f||t[65]!==z||t[66]!==n?(de=I===void 0?null:(0,$.jsxs)(`div`,{ref:y,className:`surface-glass pointer-events-none absolute z-10 min-w-36 max-w-full rounded-xl border border-border/50 px-2.5 py-2 text-xs shadow-lg`,style:{left:`var(--usage-tooltip-left, 0px)`,top:`var(--usage-tooltip-top, 0px)`},children:[(0,$.jsx)(`div`,{className:`mb-1 text-muted-foreground`,children:ne(I)}),n.map(e=>{let{label:t,driverKind:n}=Ke[e];return(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[(0,$.jsx)(Le,{driverKind:n,displayName:t,iconClassName:`size-3`}),t]}),(0,$.jsx)(`span`,{className:A(`tabular-nums`,f.has(e)?`text-muted-foreground`:`text-foreground`),children:O(L?.bands.find(t=>t.provider===e)?.value??0)})]},e)}),(0,$.jsxs)(`div`,{className:`mt-1 flex items-center justify-between gap-3 border-t border-border pt-1`,children:[(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Total`}),(0,$.jsx)(`span`,{className:A(`tabular-nums`,z?`text-muted-foreground`:`text-foreground`),children:O(L?.total??0)})]})]}),t[59]=O,t[60]=ne,t[61]=L?.bands,t[62]=L?.total,t[63]=I,t[64]=f,t[65]=z,t[66]=n,t[67]=de):de=t[67];let fe;t[68]!==F||t[69]!==G||t[70]!==de?(fe=(0,$.jsxs)(`div`,{ref:v,className:`relative h-56 flex-1`,onMouseMove:F,onMouseLeave:ae,children:[G,de]}),t[68]=F,t[69]=G,t[70]=de,t[71]=fe):fe=t[71];let q;t[72]!==ie||t[73]!==fe?(q=(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[ie,fe]}),t[72]=ie,t[73]=fe,t[74]=q):q=t[74];let J;t[75]!==V||t[76]!==p[0]?(J=p[0]===void 0?``:V(p[0]),t[75]=V,t[76]=p[0],t[77]=J):J=t[77];let Y;t[78]===J?Y=t[79]:(Y=(0,$.jsx)(`span`,{children:J}),t[78]=J,t[79]=Y);let me;t[80]!==V||t[81]!==p?(me=p[Math.floor(p.length/2)]===void 0?``:V(p[Math.floor(p.length/2)]??``),t[80]=V,t[81]=p,t[82]=me):me=t[82];let he;t[83]===me?he=t[84]:(he=(0,$.jsx)(`span`,{children:me}),t[83]=me,t[84]=he);let ge;t[85]!==V||t[86]!==p?(ge=p[p.length-1]===void 0?``:V(p[p.length-1]??``),t[85]=V,t[86]=p,t[87]=ge):ge=t[87];let _e;t[88]===ge?_e=t[89]:(_e=(0,$.jsx)(`span`,{children:ge}),t[88]=ge,t[89]=_e);let ve;t[90]!==Y||t[91]!==he||t[92]!==_e?(ve=(0,$.jsxs)(`div`,{className:`flex justify-between pl-16 text-3xs text-muted-foreground uppercase`,children:[Y,he,_e]}),t[90]=Y,t[91]=he,t[92]=_e,t[93]=ve):ve=t[93];let X;return t[94]!==q||t[95]!==ve?(X=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[q,ve]}),t[94]=q,t[95]=ve,t[96]=X):X=t[96],X}function Mn(e){return A(`transition-opacity`,e&&`opacity-40 delay-150`)}function Nn(e){return[e.day,e]}function Pn(e){return[e.hourStart,e]}function Fn(e){let t=(0,Q.c)(30),{label:n,segments:r,format:i,aside:a}=e,o,s,c,l,u,d;if(t[0]!==a||t[1]!==i||t[2]!==n||t[3]!==r){d=Symbol.for(`react.early_return_sentinel`);bb0:{let e=r.filter(Ln),f=e.reduce(In,0);if(f<=0){d=null;break bb0}c=`flex min-w-0 flex-col gap-2.5`;let p;t[10]===n?p=t[11]:(p=(0,$.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:n}),t[10]=n,t[11]=p),t[12]!==a||t[13]!==p?(l=(0,$.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[p,a]}),t[12]=a,t[13]=p,t[14]=l):l=t[14];let m;t[15]===i?m=t[16]:(m=e=>`${e.label} ${i(e.value)}`,t[15]=i,t[16]=m);let h;t[17]!==i||t[18]!==f?(h=e=>(0,$.jsxs)(ve,{children:[(0,$.jsx)(ge,{render:(0,$.jsx)(`div`,{className:`h-full min-w-1 rounded-xs first:rounded-l-full last:rounded-r-full`,style:{flex:`${e.value} 1 0`,backgroundColor:e.color}})}),(0,$.jsxs)(_e,{children:[e.label,` · `,i(e.value),` · `,J(e.value/f)]})]},e.label),t[17]=i,t[18]=f,t[19]=h):h=t[19],u=(0,$.jsx)(`div`,{role:`img`,"aria-label":`${n}: ${e.map(m).join(`, `)}`,className:`flex h-2 gap-0.5`,children:e.map(h)}),o=`flex flex-wrap gap-x-4 gap-y-1 text-xs`;let g;t[20]===i?g=t[21]:(g=e=>(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-2 rounded-xs`,style:{backgroundColor:e.color}}),(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:e.label}),(0,$.jsx)(`span`,{className:`text-foreground tabular-nums`,children:i(e.value)})]},e.label),t[20]=i,t[21]=g),s=e.map(g)}t[0]=a,t[1]=i,t[2]=n,t[3]=r,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d}else o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9];if(d!==Symbol.for(`react.early_return_sentinel`))return d;let f;t[22]!==o||t[23]!==s?(f=(0,$.jsx)(`div`,{className:o,children:s}),t[22]=o,t[23]=s,t[24]=f):f=t[24];let p;return t[25]!==c||t[26]!==l||t[27]!==u||t[28]!==f?(p=(0,$.jsxs)(`div`,{className:c,children:[l,u,f]}),t[25]=c,t[26]=l,t[27]=u,t[28]=f,t[29]=p):p=t[29],p}function In(e,t){return e+t.value}function Ln(e){return e.value>0}function Rn(e){return e.toSorted((e,t)=>t.totalTokens-e.totalTokens||t.costUsd-e.costUsd)}function zn(e,t){return t===`tokens`?e.tokenShare:pt(e)?null:e.costShare}function Bn({tokens:e}){let t=e.uncachedInputTokens+e.cachedInputTokens+e.cacheCreationTokens;return t===0?null:e.cachedInputTokens/t}function Vn(e){let t=e.totalTokens-e.unpricedTokens;return t<=0||pt(e)?null:e.costUsd/t*1e6}var Hn=e=>`color-mix(in oklab, var(--foreground) ${e}%, var(--background))`,Un={input:Hn(60),cacheRead:Hn(30),cacheWrite:Hn(72),output:Hn(100),other:Hn(44)};function Wn(e){return[{label:`Input`,value:e.input,color:Un.input},{label:`Cache read`,value:e.cacheRead,color:Un.cacheRead},{label:`Cache write`,value:e.cacheWrite,color:Un.cacheWrite},{label:`Output`,value:e.output,color:Un.output},{label:`Other`,value:e.unsplit>=.005?e.unsplit:0,color:Un.other}]}function Gn(e){return[{label:`Input`,value:e.uncachedInputTokens,color:Un.input},{label:`Cache read`,value:e.cachedInputTokens,color:Un.cacheRead},{label:`Cache write`,value:e.cacheCreationTokens,color:Un.cacheWrite},{label:`Output`,value:e.outputTokens,color:Un.output}]}function Kn(e){return[{label:`Standard`,value:e.standard,color:Hn(34)},{label:`Fast`,value:e.fast,color:Hn(66)},{label:`Ultrafast`,value:e.ultrafast,color:Hn(100)}]}function qn(e){let t=(0,Q.c)(80),{model:n,environments:r,metric:i,chartWindow:a,onSetPrice:o,onClose:s}=e,c;t[0]!==n.model||t[1]!==n.provider?(c=e=>e.provider===n.provider&&e.model===n.model,t[0]=n.model,t[1]=n.provider,t[2]=c):c=t[2];let l;t[3]!==r||t[4]!==c?(l=wt(r,c),t[3]=r,t[4]=c,t[5]=l):l=t[5];let u=l,d;t[6]===n.provider?d=t[7]:(d=[n.provider],t[6]=n.provider,t[7]=d);let f=d,p=Ke[n.provider],m;t[8]===n?m=t[9]:(m=pt(n),t[8]=n,t[9]=m);let h=m,g;if(t[10]!==h||t[11]!==n){let e=Bn(n),r=Vn(n),i;t[13]!==h||t[14]!==n.costUsd?(i=h?`Unpriced`:W(n.costUsd),t[13]=h,t[14]=n.costUsd,t[15]=i):i=t[15];let a;t[16]===i?a=t[17]:(a={label:`Cost`,value:i},t[16]=i,t[17]=a);let o;t[18]===n.totalTokens?o=t[19]:(o=K(n.totalTokens),t[18]=n.totalTokens,t[19]=o);let s;t[20]===o?s=t[21]:(s={label:`Tokens`,value:o},t[20]=o,t[21]=s),g=[a,s,r===null?null:{label:`Per 1M tokens`,value:W(r)},e===null?null:{label:`Cache hit`,value:J(e)}].filter(Yn),t[10]=h,t[11]=n,t[12]=g}else g=t[12];let _=g,v;t[22]===s?v=t[23]:(v=e=>{e||s()},t[22]=s,t[23]=v);let y;t[24]!==p.driverKind||t[25]!==p.label?(y=(0,$.jsx)(Le,{driverKind:p.driverKind,displayName:p.label,iconClassName:`size-5`}),t[24]=p.driverKind,t[25]=p.label,t[26]=y):y=t[26];let b;t[27]===n.model?b=t[28]:(b=(0,$.jsx)(we,{children:n.model}),t[27]=n.model,t[28]=b);let x;t[29]!==y||t[30]!==b?(x=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[y,b]}),t[29]=y,t[30]=b,t[31]=x):x=t[31];let S;t[32]!==h||t[33]!==n.costShare?(S=h?``:` · ${J(n.costShare)} of cost`,t[32]=h,t[33]=n.costShare,t[34]=S):S=t[34];let C;t[35]!==p.label||t[36]!==S?(C=(0,$.jsxs)(De,{children:[p.label,S]}),t[35]=p.label,t[36]=S,t[37]=C):C=t[37];let w;t[38]!==C||t[39]!==x?(w=(0,$.jsxs)(Ce,{children:[x,C]}),t[38]=C,t[39]=x,t[40]=w):w=t[40];let T;t[41]===_?T=t[42]:(T=(0,$.jsx)(`div`,{className:`grid grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-4`,children:_.map(Jn)}),t[41]=_,t[42]=T);let D=h?`tokens`:i,ee;t[43]!==a.days||t[44]!==a.hours||t[45]!==a.referenceTime||t[46]!==a.resolution||t[47]!==a.timeZone||t[48]!==f||t[49]!==D||t[50]!==u.daily||t[51]!==u.hourly?(ee=(0,$.jsx)(jn,{providers:f,days:a.days,daily:u.daily,hours:a.hours,hourly:u.hourly,metric:D,referenceTime:a.referenceTime,resolution:a.resolution,timeZone:a.timeZone}),t[43]=a.days,t[44]=a.hours,t[45]=a.referenceTime,t[46]=a.resolution,t[47]=a.timeZone,t[48]=f,t[49]=D,t[50]=u.daily,t[51]=u.hourly,t[52]=ee):ee=t[52];let O;t[53]!==h||t[54]!==u.categoryCost?(O=h?null:(0,$.jsx)(Fn,{label:`Cost by type`,segments:Wn(u.categoryCost),format:W}),t[53]=h,t[54]=u.categoryCost,t[55]=O):O=t[55];let k;t[56]===n.tokens?k=t[57]:(k=Gn(n.tokens),t[56]=n.tokens,t[57]=k);let A;t[58]===k?A=t[59]:(A=(0,$.jsx)(Fn,{label:`Tokens by type`,segments:k,format:K}),t[58]=k,t[59]=A);let j;t[60]===u.speedCost?j=t[61]:(j=u.speedCost.fast+u.speedCost.ultrafast>0?(0,$.jsx)(Fn,{label:`Cost by speed`,segments:Kn(u.speedCost),format:W,aside:(0,$.jsx)(Xn,{premiumUsd:u.speedCost.premium})}):null,t[60]=u.speedCost,t[61]=j);let M;t[62]!==O||t[63]!==A||t[64]!==j?(M=(0,$.jsxs)(`div`,{className:`grid gap-x-10 gap-y-8 sm:grid-cols-2`,children:[O,A,j]}),t[62]=O,t[63]=A,t[64]=j,t[65]=M):M=t[65];let N;t[66]!==T||t[67]!==ee||t[68]!==M?(N=(0,$.jsx)(Ee,{children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[T,ee,M]})}),t[66]=T,t[67]=ee,t[68]=M,t[69]=N):N=t[69];let P;t[70]!==n.unpricedTokens||t[71]!==o?(P=n.unpricedTokens>0?(0,$.jsxs)(Te,{variant:`bare`,className:`items-center sm:justify-between`,children:[(0,$.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[K(n.unpricedTokens),` tokens have no known price`]}),(0,$.jsx)(E,{onClick:o,children:`Set price`})]}):null,t[70]=n.unpricedTokens,t[71]=o,t[72]=P):P=t[72];let F;t[73]!==w||t[74]!==N||t[75]!==P?(F=(0,$.jsxs)(Oe,{className:`max-w-3xl`,children:[w,N,P]}),t[73]=w,t[74]=N,t[75]=P,t[76]=F):F=t[76];let I;return t[77]!==F||t[78]!==v?(I=(0,$.jsx)(ke,{open:!0,onOpenChange:v,children:F}),t[77]=F,t[78]=v,t[79]=I):I=t[79],I}function Jn(e){return(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,$.jsx)(`span`,{className:`text-2xl font-semibold text-foreground`,children:e.value})]},e.label)}function Yn(e){return e!==null}function Xn(e){let t=(0,Q.c)(4),{premiumUsd:n}=e,r;t[0]===n?r=t[1]:(r=W(n),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`Premium `,(0,$.jsx)(`span`,{className:`text-foreground tabular-nums`,children:r})]}),t[2]=r,t[3]=i),i}var Zn=`p4code:usage-page-preferences:v1`,Qn=u({metric:P([`cost`,`tokens`,`limits`]),windowDays:P([1,7,30,90]),hiddenProviders:D(M(T))}),$n={metric:`limits`,windowDays:30};function er(){try{return o(Zn,Qn)??$n}catch(e){return console.error(`Could not read Usage page preferences.`,e),$n}}function tr(e){try{c(Zn,e,Qn)}catch(e){console.error(`Could not save Usage page preferences.`,e)}}function nr(e){return He.some(t=>t.value===e)}function rr(e){return Be.some(t=>t.days===e)}var ir=e=>Ke[e].label;function ar(){let[e,t]=(0,Z.useState)(er);ie();let n=C(se),r=e=>{let t=Me(n,e.command,{context:{usagePageOpen:!0}});return t?`${e.label} (${t})`:e.label},[i,a]=(0,Z.useState)(()=>({days:e.windowDays,window:G(e.windowDays,void 0,e.windowDays===1?`hour`:`day`)})),o=e.metric,s=o===`limits`,[c,l]=(0,Z.useState)(!1),[u,d]=(0,Z.useState)(()=>Date.now()),f=(0,Z.useRef)(!1),[p,m]=(0,Z.useState)(`model`),[h,g]=(0,Z.useState)(null),[v,y]=(0,Z.useState)(null),[b,x]=(0,Z.useState)(null),w=(0,Z.useMemo)(()=>new Set(e.hiddenProviders),[e.hiddenProviders]),{days:T,window:D}=i,ee=T===1,{merged:O,environments:k,selectedEnvironments:j,shown:M,isPartial:N,refresh:P}=Dt(D,b,w),F=M?.merged??O,I=M?.window??D,L=I.resolution===`hour`,R=c&&!s,z=M!==null&&M.window!==D,H=(0,Z.useMemo)(()=>{if(z)return{partial:!0,everyProvider:!0,providers:new Set};let e=ft(j,R),t=new Set([...e.providers].filter(e=>!w.has(e)));return{partial:e.everyProvider||t.size>0,everyProvider:e.everyProvider,providers:t}},[z,R,j,w]),U=e=>H.everyProvider||H.providers.has(e),ue=C(ae.presentationsAtom),me=(0,Z.useMemo)(()=>new Map([...ue].filter(([,e])=>e.entry.enabled&&e.entry.unsupportedReason===void 0)),[ue]),ge=w.has(`cursor`)?[]:at(j),_e=[...new Set(j.flatMap(e=>e.summary?.sources.flatMap(e=>e.message&&!e.action&&!w.has(e.fingerprint.provider)&&(e.status===`partial`||e.status===`failed`||e.fingerprint.provider===`cursor`)?[e.message]:[])??[]))],ve=ce(oe.refreshProviders,{reportFailure:!1}),X=j.some(e=>e.canReadDiagnostics),xe=(0,Z.useMemo)(()=>Y(I.sinceDay,I.untilDay),[I.sinceDay,I.untilDay]),Ce=(0,Z.useMemo)(()=>I.sinceTime===void 0||I.untilTime===void 0?[]:fe(I.sinceTime,I.untilTime),[I.sinceTime,I.untilTime]),we=(0,Z.useMemo)(()=>(L?F.hourly:F.daily).toReversed(),[L,F.daily,F.hourly]),Te=(0,Z.useMemo)(()=>p===`model`&&o===`tokens`?Rn(F.models):F.models,[p,F.models,o]),Ee=(0,Z.useMemo)(()=>Xe(F.providers),[F.providers]),De=(0,Z.useMemo)(()=>Ge.filter(e=>Ee.includes(e)||H.providers.has(e)),[H.providers,Ee]),Oe=(0,Z.useMemo)(()=>new Set(De.filter(e=>H.everyProvider||H.providers.has(e))),[De,H.everyProvider,H.providers]),ke=v===null?void 0:F.models.find(e=>`${e.provider}:${e.model}`===v),je=Te.reduce((e,t)=>Math.max(e,o===`tokens`?t.totalTokens:t.costUsd),0),Le=De.map(e=>({kind:`usage`,provider:e})),Je=Math.max(De.indexOf(`codex`),De.indexOf(`claude`))+1;Le.splice(Je,0,...ge.map(e=>({kind:`enable`,environment:e})));let Qe=`${60/(De.length+2)}%`,nt=n=>{let r={...e,...n};t(r),tr(r)},Q=e=>{rr(e)&&(nt({windowDays:e}),a({days:e,window:G(e,void 0,e===1?`hour`:`day`)}))},rt=e=>{e===`limits`&&d(Date.now()),nt({metric:e})},it=async(e=!1,t=!1)=>{try{await Promise.all(Array.from(me,([n,r])=>{if((b===null||b.has(n))&&r.connection.phase===`connected`&&r.serverConfig!==null)return ct(n,()=>ve({environmentId:n,input:{}}),e,t)}))}finally{d(Date.now())}},ot=(0,Z.useEffectEvent)(e=>{if(e.defaultPrevented||e.repeat||e.isComposing||qe()||Ye())return;let t=Ve(e,n),r=He.find(e=>e.command===t),i=Be.find(e=>e.command===t);(r||i)&&(e.preventDefault(),e.stopPropagation(),r&&rt(r.value),i&&!s&&Q(i.days))});(0,Z.useEffect)(()=>(globalThis.window.addEventListener(`keydown`,ot,!0),()=>globalThis.window.removeEventListener(`keydown`,ot,!0)),[]);let st=()=>{if(f.current)return;if(s){f.current=!0,l(!0),it().finally(()=>{f.current=!1,l(!1)});return}let e=G(T,void 0,ee?`hour`:`day`);(e.sinceDay!==D.sinceDay||e.untilDay!==D.untilDay||e.sinceTime!==D.sinceTime||e.untilTime!==D.untilTime)&&a({days:T,window:e}),f.current=!0,l(!0),P(e).finally(()=>{f.current=!1,l(!1)})},lt=[...me].filter(([e,t])=>t.connection.phase===`connected`&&t.serverConfig!==null&&(b===null||b.has(e))).map(([e])=>e).sort().join(`,`),ut=(0,Z.useEffectEvent)(()=>{it(!0)});(0,Z.useEffect)(()=>{s&<&&ut()},[s,lt]);let dt=L&&I.sinceTime!==void 0&&I.untilTime!==void 0?`${de(I.sinceTime,I.timeZone)} to ${de(I.untilTime,I.timeZone)}`:`${le(I.sinceDay)} to ${le(I.untilDay)}`,mt=(0,$.jsxs)(`div`,{className:`grid w-full min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 py-2 @4xl/usage-header:flex`,children:[(0,$.jsxs)(tt,{ariaLabel:`Usage breadcrumb`,className:`min-w-0`,children:[(0,$.jsx)($e,{children:(0,$.jsx)(`h1`,{children:`Usage`})}),(0,$.jsx)(et,{}),(0,$.jsx)($e,{className:`min-w-10 shrink`,children:(0,$.jsx)(vr,{environments:k,selectedEnvironments:j,selectedEnvironmentIds:b,onSelectionChange:x,showUsageStatus:!s,refreshing:R,isPartial:N,duplicateSources:F.duplicateSources,contractMismatches:F.contractMismatches,onOpenModelPrices:()=>g({})})}),(0,$.jsx)(et,{}),(0,$.jsx)($e,{current:!0,className:`min-w-10`,children:(0,$.jsx)(xr,{hiddenProviders:w,onChange:e=>nt({hiddenProviders:e})})})]}),s?null:(0,$.jsx)(`span`,{className:`hidden min-w-0 truncate text-xs text-muted-foreground @7xl/usage-header:block`,children:dt}),(0,$.jsxs)(`div`,{className:`ms-auto hidden shrink-0 items-center justify-end gap-2 @4xl/usage-header:flex`,children:[(0,$.jsx)(ye,{"aria-label":`Usage metric`,variant:`segmented`,value:[o],onValueChange:e=>{let t=e[0];nr(t)&&rt(t)},children:He.map(e=>(0,$.jsx)(be,{value:e.value,title:r(e),children:e.label},e.value))}),(0,$.jsx)(ye,{"aria-label":`Usage period`,variant:`segmented`,value:[String(T)],disabled:s,onValueChange:e=>{let t=e[0];t&&Q(Number(t))},children:Be.map(e=>(0,$.jsx)(be,{value:String(e.days),title:r(e),children:e.label},e.days))}),(0,$.jsx)(E,{onClick:st,"aria-label":s?`Refresh limits`:`Refresh usage`,"aria-busy":c,disabled:c||!s&&!X,size:`icon-sm`,variant:`ghost`,children:(0,$.jsx)(Ue,{size:`sm`,refreshing:c})})]}),(0,$.jsxs)(`div`,{className:`ms-auto flex shrink-0 items-center justify-end gap-1 @4xl/usage-header:hidden`,children:[(0,$.jsxs)(re,{value:o,onValueChange:e=>{nr(e)&&rt(e)},children:[(0,$.jsx)(ne,{"aria-label":`Usage metric`,size:`compact`,variant:`ghost`,className:`w-auto min-w-0`,children:(0,$.jsx)(V,{children:He.find(e=>e.value===o)?.label})}),(0,$.jsx)(te,{align:`end`,alignItemWithTrigger:!1,children:He.map(e=>(0,$.jsx)(B,{value:e.value,title:r(e),children:e.label},e.value))})]}),(0,$.jsxs)(re,{value:String(T),disabled:s,onValueChange:e=>Q(Number(e)),children:[(0,$.jsx)(ne,{"aria-label":`Usage period`,size:`compact`,variant:`ghost`,className:`w-auto min-w-0`,children:(0,$.jsx)(V,{children:Be.find(e=>e.days===T)?.label})}),(0,$.jsx)(te,{align:`end`,alignItemWithTrigger:!1,children:Be.map(e=>(0,$.jsx)(B,{value:String(e.days),title:r(e),children:e.label},e.days))})]}),(0,$.jsx)(E,{onClick:st,"aria-label":s?`Refresh limits`:`Refresh usage`,"aria-busy":c,disabled:c||!s&&!X,size:`icon-sm`,variant:`ghost`,children:(0,$.jsx)(Ue,{size:`sm`,refreshing:c})})]})]});return(0,$.jsxs)(Ae,{className:`h-dvh min-h-0 overflow-hidden overscroll-y-none isolate`,children:[(0,$.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col bg-background text-foreground`,children:[(0,$.jsx)(Ze,{electron:he,className:`@container/usage-header`,children:mt}),(0,$.jsx)(Se,{className:`min-h-0 flex-1`,children:(0,$.jsx)(ze,{width:`wide`,children:j.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:k.length===0?`Connect an environment to see ${s?`limits`:`usage`}.`:`Select an environment to see ${s?`limits`:`usage`}.`}):s?(0,$.jsx)(We,{selectedEnvironmentIds:b,hiddenProviders:w,now:u,cursorPrompt:ge.length>0?(0,$.jsx)(lr,{environments:ge,onEnabled:()=>{P(),it(!1,!0)}}):null}):M===null?(0,$.jsx)(Sr,{}):X?(0,$.jsxs)(`div`,{"aria-busy":H.partial,className:`flex flex-col gap-6`,children:[_e.map(e=>(0,$.jsx)(`p`,{className:`mb-4 text-sm text-muted-foreground`,children:e},e)),(0,$.jsxs)(`section`,{className:`grid gap-6 lg:grid-cols-[minmax(0,18rem)_minmax(0,1fr)]`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-5`,children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(`span`,{className:A(`text-4xl font-semibold text-foreground tabular-nums`,dr(H.partial)),children:o===`cost`?W(F.costUsd):K(F.totalTokens)}),(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,$.jsxs)(`span`,{children:[(0,$.jsxs)(`span`,{className:dr(H.partial),children:[q(F.sessions),` sessions`]}),o===`cost`&&` · API estimate`]}),o===`cost`&&F.costQuality.unpricedShare>0&&(0,$.jsxs)(Fe,{children:[(0,$.jsx)(Pe,{openOnHover:!0,render:(0,$.jsx)(S,{tone:`muted`}),"aria-label":`Unpriced usage details`,children:(0,$.jsx)(_,{className:`size-3`,"aria-hidden":!0})}),(0,$.jsxs)(Ne,{side:`top`,tooltipStyle:!0,children:[`API estimate excludes`,` `,J(F.costQuality.unpricedShare),` unpriced records.`]})]})]})]}),!w.has(`codex`)&&[...me].some(([e,t])=>(b===null||b.has(e))&&t.serverConfig?.providers.some(Ie))?(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-muted-foreground`,children:[(0,$.jsx)(`span`,{children:`ChatGPT shared usage`}),(0,$.jsx)(Re,{size:`xs`})]}):null,Le.map(e=>{if(e.kind===`enable`)return(0,$.jsx)(cr,{environmentId:e.environment.environmentId,label:e.environment.label,showEnvironment:j.length>1,onEnabled:()=>{P(),it(!1,!0)}},`enable:${e.environment.environmentId}`);let t=e.provider,n=F.providers.find(e=>e.provider===t),r=o===`cost`?n?.costShare??0:n?.tokenShare??0,i=n?.sessions??0,a=`${q(i)} ${i===1?`session`:`sessions`}`,s=U(t),c=s&&!Ee.includes(t);return(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsxs)(`div`,{className:`flex items-baseline justify-between gap-4`,children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm text-foreground`,children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-2 shrink-0 rounded-full`,style:{backgroundColor:Ke[t].color}}),(0,$.jsx)(ur,{provider:t,className:`size-4`}),(0,$.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-1.5`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:Ke[t].label}),(0,$.jsx)(`span`,{className:A(`shrink-0 whitespace-nowrap text-2xs text-muted-foreground tabular-nums`,dr(s),c&&`invisible`),children:a})]})]}),(0,$.jsx)(`span`,{className:A(`shrink-0 text-sm font-medium text-foreground tabular-nums`,dr(s)),children:c?`—`:o===`cost`?W(n?.costUsd??0):K(n?.totalTokens??0)})]}),(0,$.jsx)(`span`,{className:A(`text-xs text-muted-foreground`,dr(s),c&&`invisible`),children:o===`cost`?`${J(r)} of cost · ${K(n?.totalTokens??0)} tokens`:`${J(r)} of tokens · ${W(n?.costUsd??0)}`})]},t)})]}),(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,$.jsxs)(`h2`,{className:`text-sm font-medium text-foreground`,children:[L?`Hourly`:`Daily`,` `,o===`tokens`?`processed tokens`:`cost`]}),(0,$.jsx)(jn,{providers:De,loadingProviders:Oe,days:xe,daily:F.daily,hours:Ce,hourly:F.hourly,metric:o,referenceTime:I.untilTime,resolution:L?`hour`:`day`,timeZone:I.timeZone})]})]}),(0,$.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-medium text-foreground`,children:`Totals`}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-6 gap-y-4 py-1 md:grid-cols-5`,children:[(0,$.jsx)(fr,{loading:H.partial,label:`Processed tokens`,value:K(F.totalTokens)}),(0,$.jsx)(fr,{loading:H.partial,label:`Cached input`,value:K(F.cachedInputTokens)}),(0,$.jsx)(fr,{loading:H.partial,label:`Uncached input`,value:K(F.uncachedInputTokens)}),(0,$.jsx)(fr,{loading:H.partial,label:`Output`,value:K(F.outputTokens)}),(0,$.jsx)(fr,{loading:H.partial,label:`Cache savings`,value:W(F.costQuality.cacheSavingsUsd)})]})]}),F.totalTokens>0?(0,$.jsx)(`section`,{className:A(`grid gap-x-12 gap-y-8 lg:grid-cols-2`,dr(H.partial)),children:o===`tokens`?(0,$.jsx)(Fn,{label:`Tokens by type`,segments:Gn(F),format:K}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Fn,{label:`Cost by type`,segments:Wn(F.categoryCost),format:W}),F.speedCost.fast+F.speedCost.ultrafast>0?(0,$.jsx)(Fn,{label:`Cost by speed`,segments:Kn(F.speedCost),format:W,aside:(0,$.jsx)(Xn,{premiumUsd:F.speedCost.premium})}):null]})}):null,(0,$.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-medium text-foreground`,children:`Breakdown`}),(0,$.jsx)(ye,{"aria-label":`Usage breakdown`,variant:`segmented`,value:[p],onValueChange:e=>{let t=e[0];(t===`model`||t===`time`)&&m(t)},children:[{value:`model`,label:`Model`},{value:`time`,label:L?`Hour`:`Day`}].map(e=>(0,$.jsx)(be,{value:e.value,children:e.label},e.value))})]}),p===`model`?(0,$.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b border-border text-right text-xs text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`py-2 pr-3 text-left font-normal`,children:`#`}),(0,$.jsx)(`th`,{className:`w-full py-2 text-left font-normal`,children:`Model`}),(0,$.jsx)(`th`,{className:`py-2 pl-6 font-normal`,children:`Cost`}),(0,$.jsx)(`th`,{className:`hidden py-2 pl-6 font-normal sm:table-cell`,children:`Share`}),(0,$.jsx)(`th`,{className:`py-2 pl-6 font-normal`,children:`Tokens`})]})}),(0,$.jsx)(`tbody`,{children:Te.length===0?(0,$.jsx)(`tr`,{children:(0,$.jsx)(`td`,{colSpan:5,className:`py-6 text-center text-muted-foreground`,children:`No activity in this window.`})}):Te.map((e,t)=>{let n=`${e.provider}:${e.model}`,r=o===`tokens`?e.totalTokens:e.costUsd,i=zn(e,o===`tokens`?`tokens`:`cost`),a=dr(U(e.provider));return(0,$.jsxs)(`tr`,{className:`relative border-b border-border/50 text-right whitespace-nowrap text-muted-foreground tabular-nums transition-colors hover:bg-muted/50 has-focus-visible:bg-muted/50`,children:[(0,$.jsx)(`td`,{className:`py-2.5 pr-3 text-left text-xs`,children:t+1}),(0,$.jsxs)(`td`,{className:`py-2.5 text-left whitespace-normal`,children:[(0,$.jsxs)(`button`,{type:`button`,onClick:()=>y(n),className:`flex items-center gap-2 text-left text-foreground outline-none after:absolute after:inset-0`,children:[(0,$.jsx)(ur,{provider:e.provider,className:`size-3.5`}),e.model]}),(0,$.jsx)(`div`,{"aria-hidden":!0,className:A(`mt-1.5 h-0.5 max-w-48`,a),children:(0,$.jsx)(`div`,{className:`h-full rounded-full`,style:{width:r>0&&je>0?`max(0.5rem, ${r/je*100}%)`:0,backgroundColor:Ke[e.provider].color}})})]}),(0,$.jsx)(`td`,{className:A(`py-2.5 pl-6 text-foreground`,a),children:pt(e)?(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Unpriced`}):W(e.costUsd)}),(0,$.jsx)(`td`,{className:A(`hidden py-2.5 pl-6 sm:table-cell`,a),children:i===null?``:J(i)}),(0,$.jsx)(`td`,{className:A(`py-2.5 pl-6`,a),children:K(e.totalTokens)})]},n)})})]}):(0,$.jsxs)(`table`,{className:`w-full table-fixed text-sm`,children:[(0,$.jsxs)(`colgroup`,{children:[(0,$.jsx)(`col`,{className:`w-2/5`}),De.map(e=>(0,$.jsx)(`col`,{style:{width:Qe}},e)),(0,$.jsx)(`col`,{style:{width:Qe}}),(0,$.jsx)(`col`,{style:{width:Qe}})]}),(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b border-border text-left text-xs text-muted-foreground`,children:[(0,$.jsx)(`th`,{className:`py-2 font-normal`,children:L?`Hour`:`Day`}),De.map(e=>(0,$.jsx)(`th`,{className:`py-2 text-right font-normal`,children:Ke[e].label},e)),(0,$.jsx)(`th`,{className:`py-2 text-right font-normal`,children:`Total`}),(0,$.jsx)(`th`,{className:`py-2 text-right font-normal`,children:`Tokens`})]})}),(0,$.jsx)(`tbody`,{children:we.length===0?(0,$.jsx)(`tr`,{children:(0,$.jsx)(`td`,{colSpan:De.length+3,className:`py-6 text-center text-muted-foreground`,children:`No activity in this window.`})}):we.map(e=>(0,$.jsxs)(`tr`,{className:`border-b border-border/50 transition-colors hover:bg-muted/50`,children:[(0,$.jsx)(`td`,{className:`py-2 text-foreground`,children:`hourStart`in e?pe(e.hourStart,I.timeZone):le(e.day)}),De.map(t=>(0,$.jsx)(`td`,{className:A(`py-2 text-right text-muted-foreground tabular-nums`,dr(U(t))),children:W(e.byProvider.get(t)?.costUsd??0)},t)),(0,$.jsx)(`td`,{className:A(`py-2 text-right text-foreground tabular-nums`,dr(H.partial)),children:W(e.costUsd)}),(0,$.jsx)(`td`,{className:A(`py-2 text-right text-muted-foreground tabular-nums`,dr(H.partial)),children:K(e.totalTokens)})]},`hourStart`in e?e.hourStart:e.day))})]})]})]}):(0,$.jsx)(`div`,{className:`space-y-2 py-12 text-center text-sm text-muted-foreground`,children:j.map(e=>(0,$.jsxs)(`p`,{children:[j.length>1?`${e.label}: `:null,e.error]},e.environmentId))})})})]}),ke!==void 0&&!s?(0,$.jsx)(qn,{model:ke,environments:j,metric:o===`tokens`?`tokens`:`cost`,chartWindow:{days:xe,hours:Ce,resolution:L?`hour`:`day`,timeZone:I.timeZone,referenceTime:I.untilTime},onSetPrice:()=>{y(null),g({model:ke.model})},onClose:()=>y(null)}):null,h?(0,$.jsx)(Xt,{usage:k,initialSelectedEnvironmentIds:b,initialModel:h.model,onOpenChange:e=>{e||g(null)}}):null]})}var or=`Requires access to your Cursor login in macOS Keychain.`;function sr({environmentId:e,label:t,onEnabled:n,tooltip:r,buttonText:i=`Enable`}){let a=ce(oe.updateSettings,{label:`enable Cursor account usage`}),[o,s]=(0,Z.useState)(!1),c=async()=>{s(!0);try{(await a({environmentId:e,input:{patch:{cursorKeychainUsageEnabled:!0}}}))._tag===`Success`&&n()}finally{s(!1)}},l=r?(0,$.jsx)(S,{disabled:o,"aria-busy":o,"aria-label":`Enable Cursor usage from ${t}`,onClick:()=>void c(),children:i}):(0,$.jsx)(E,{size:`sm`,variant:`outline`,disabled:o,"aria-busy":o,"aria-label":`Enable Cursor usage from ${t}`,onClick:()=>void c(),children:i});return r?(0,$.jsxs)(ve,{children:[(0,$.jsx)(ge,{render:l}),(0,$.jsx)(_e,{children:or})]}):l}function cr(e){let t=(0,Q.c)(11),{environmentId:n,label:r,showEnvironment:i,onEnabled:a}=e,o,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-2 shrink-0 rounded-full`,style:{backgroundColor:Ke.cursor.color}}),s=(0,$.jsx)(ur,{provider:`cursor`,className:`size-4`}),t[0]=o,t[1]=s):(o=t[0],s=t[1]);let c=i?` · ${r}`:``,l;t[2]===c?l=t[3]:(l=(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm text-foreground`,children:[o,s,(0,$.jsxs)(`span`,{className:`truncate`,children:[`Cursor`,c]})]}),t[2]=c,t[3]=l);let u;t[4]!==n||t[5]!==r||t[6]!==a?(u=(0,$.jsx)(sr,{environmentId:n,label:r,onEnabled:a,tooltip:!0}),t[4]=n,t[5]=r,t[6]=a,t[7]=u):u=t[7];let d;return t[8]!==l||t[9]!==u?(d=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-baseline justify-between gap-4 text-sm`,children:[l,u]}),t[8]=l,t[9]=u,t[10]=d):d=t[10],d}function lr(e){let t=(0,Q.c)(10),{environments:n,onEnabled:r}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,$.jsx)(Le,{driverKind:i.make(`cursor`),displayName:`Cursor`,indicatorBackground:`var(--background)`,className:`size-5`,iconClassName:`size-4 text-foreground/80`}),`Cursor`]}),t[0]=a):a=t[0];let o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:or}),t[1]=o):o=t[1];let s;if(t[2]!==n||t[3]!==r){let e;t[5]!==n.length||t[6]!==r?(e=e=>(0,$.jsx)(sr,{environmentId:e.environmentId,label:e.label,buttonText:n.length>1?`Enable on ${e.label}`:`Enable`,onEnabled:r,tooltip:!1},e.environmentId),t[5]=n.length,t[6]=r,t[7]=e):e=t[7],s=n.map(e),t[2]=n,t[3]=r,t[4]=s}else s=t[4];let c;return t[8]===s?c=t[9]:(c=(0,$.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[a,(0,$.jsxs)(`div`,{className:`flex flex-col items-start gap-3 rounded-lg border border-border/60 p-4`,children:[o,(0,$.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:s})]})]}),t[8]=s,t[9]=c),c}function ur(e){let t=(0,Q.c)(4),{provider:n,className:r}=e,i=Ke[n],a;return t[0]!==r||t[1]!==i.driverKind||t[2]!==i.label?(a=(0,$.jsx)(Le,{driverKind:i.driverKind,displayName:i.label,iconClassName:r}),t[0]=r,t[1]=i.driverKind,t[2]=i.label,t[3]=a):a=t[3],a}function dr(e){return A(`transition-opacity`,e&&`opacity-40 delay-150`)}function fr(e){let t=(0,Q.c)(10),{label:n,value:r,loading:i}=e,a;t[0]===n?a=t[1]:(a=(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=A(`text-base font-medium text-foreground tabular-nums`,dr(i)),t[2]=i,t[3]=o);let s;t[4]!==o||t[5]!==r?(s=(0,$.jsx)(`span`,{className:o,children:r}),t[4]=o,t[5]=r,t[6]=s):s=t[6];let c;return t[7]!==a||t[8]!==s?(c=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5`,children:[a,s]}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function pr(e){let t=(0,Q.c)(14),{environments:n,duplicateSources:r,contractMismatches:i}=e,a,o,s,c;if(t[0]!==i||t[1]!==r||t[2]!==n){c=Symbol.for(`react.early_return_sentinel`);bb0:{let e=n.filter(_r),t=new Map(i.map(gr)),l=n.flatMap(e=>{let n=t.get(e.environmentId);return n===void 0?[]:[{environment:e,mismatch:n}]});if(e.length===0&&l.length===0&&r.length===0){c=null;break bb0}a=`flex flex-col gap-1 border-t border-border px-2 py-2 text-xs text-muted-foreground`,o=e.map(hr),s=l.map(mr)}t[0]=i,t[1]=r,t[2]=n,t[3]=a,t[4]=o,t[5]=s,t[6]=c}else a=t[3],o=t[4],s=t[5],c=t[6];if(c!==Symbol.for(`react.early_return_sentinel`))return c;let l;t[7]===r?l=t[8]:(l=r.length>0?(0,$.jsxs)(`span`,{children:[`Counted once across environments sharing a transcript directory:`,` `,r.join(`, `)]}):null,t[7]=r,t[8]=l);let u;return t[9]!==a||t[10]!==o||t[11]!==s||t[12]!==l?(u=(0,$.jsxs)(`div`,{className:a,children:[o,s,l]}),t[9]=a,t[10]=o,t[11]=s,t[12]=l,t[13]=u):u=t[13],u}function mr(e){let{environment:t,mismatch:n}=e;return(0,$.jsx)(`span`,{children:me(t.label,n)},t.environmentId)}function hr(e){return(0,$.jsxs)(`span`,{children:[e.label,`: `,e.error]},e.label)}function gr(e){return[e.environmentId,e]}function _r(e){return e.error!==null}function vr(e){let t=(0,Q.c)(56),{environments:n,selectedEnvironments:r,selectedEnvironmentIds:i,onSelectionChange:o,showUsageStatus:c,refreshing:l,isPartial:u,duplicateSources:d,contractMismatches:m,onOpenModelPrices:g}=e,_=i===null,v=_?`All environments`:r.length===1?r[0].label:`${r.length} environments`,y;t[0]!==m||t[1]!==r?(y=r.some(br)||m.length>0,t[0]=m,t[1]=r,t[2]=y):y=t[2];let x=y,C;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(S,{}),t[3]=C):C=t[3];let w;t[4]===v?w=t[5]:(w=(0,$.jsx)(Qe,{children:v}),t[4]=v,t[5]=w);let T;t[6]!==x||t[7]!==c?(T=(0,$.jsx)(`span`,{className:`flex size-3.5 shrink-0 items-center justify-center text-muted-foreground`,children:c&&x?(0,$.jsx)(s,{className:`size-3.5 text-warning-foreground`,"aria-label":`Some environments could not report usage`}):(0,$.jsx)(p,{className:`size-3.5 opacity-0 transition-opacity group-hover/usage-environment:opacity-100 group-focus-visible/usage-environment:opacity-100 group-data-popup-open/usage-environment:opacity-100`,"aria-hidden":!0})}),t[6]=x,t[7]=c,t[8]=T):T=t[8];let E;t[9]!==w||t[10]!==T?(E=(0,$.jsxs)(b,{render:C,className:`group/usage-environment min-w-0 max-w-full`,children:[w,T]}),t[9]=w,t[10]=T,t[11]=E):E=t[11];let D;t[12]===o?D=t[13]:(D=e=>o(e?null:new Set),t[12]=o,t[13]=D);let k;t[14]!==_||t[15]!==D?(k=(0,$.jsx)(f,{checked:_,closeOnClick:!1,onCheckedChange:D,children:`All environments`}),t[14]=_,t[15]=D,t[16]=k):k=t[16];let M;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(O,{}),t[17]=M):M=t[17];let N;if(t[18]!==n||t[19]!==o||t[20]!==l||t[21]!==i||t[22]!==r||t[23]!==c){let e;t[25]!==n.length||t[26]!==o||t[27]!==l||t[28]!==i||t[29]!==r||t[30]!==c?(e=e=>{let t=i===null||i.has(e.environmentId),a=ut(e,l),s=e.error===null?e.summary!==null&&!bt(e.summary.contractVersion,6)?`Update required`:e.isConnected?a.phase===`loading`?`Scanning…`:a.phase===`stale`?`Refreshing…`:a.phase===`partway`?dt(a.providers,ir):`Ready`:`Connecting…`:`Unavailable`;return(0,$.jsx)(f,{checked:t,closeOnClick:!1,onCheckedChange:t=>{let i=new Set(r.map(yr));t?i.add(e.environmentId):i.delete(e.environmentId),o(i.size===n.length?null:i)},children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3`,children:[(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),c?(0,$.jsx)(`span`,{className:A(`shrink-0 text-xs text-muted-foreground`,e.error!==null&&`text-destructive`),children:s}):null]})},e.environmentId)},t[25]=n.length,t[26]=o,t[27]=l,t[28]=i,t[29]=r,t[30]=c,t[31]=e):e=t[31],N=n.map(e),t[18]=n,t[19]=o,t[20]=l,t[21]=i,t[22]=r,t[23]=c,t[24]=N}else N=t[24];let P;t[32]===n.length?P=t[33]:(P=n.length===0?(0,$.jsx)(`p`,{className:`px-2 py-2 text-xs text-muted-foreground`,children:`No environments connected.`}):null,t[32]=n.length,t[33]=P);let F;t[34]!==u||t[35]!==c?(F=c&&u?(0,$.jsx)(`p`,{className:`px-2 py-2 text-xs text-muted-foreground`,children:`Totals are partial while selected environments scan.`}):null,t[34]=u,t[35]=c,t[36]=F):F=t[36];let I;t[37]!==m||t[38]!==d||t[39]!==r||t[40]!==c?(I=c?(0,$.jsx)(pr,{environments:r,duplicateSources:d,contractMismatches:m}):null,t[37]=m,t[38]=d,t[39]=r,t[40]=c,t[41]=I):I=t[41];let L;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(O,{}),t[42]=L):L=t[42];let R;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(a,{"aria-hidden":!0}),t[43]=R):R=t[43];let z;t[44]===g?z=t[45]:(z=(0,$.jsxs)(j,{onClick:g,children:[R,`Model prices`]}),t[44]=g,t[45]=z);let B;t[46]!==P||t[47]!==F||t[48]!==I||t[49]!==z||t[50]!==k||t[51]!==N?(B=(0,$.jsxs)(ee,{align:`start`,children:[k,M,N,P,F,I,L,z]}),t[46]=P,t[47]=F,t[48]=I,t[49]=z,t[50]=k,t[51]=N,t[52]=B):B=t[52];let V;return t[53]!==B||t[54]!==E?(V=(0,$.jsxs)(h,{children:[E,B]}),t[53]=B,t[54]=E,t[55]=V):V=t[55],V}function yr(e){return e.environmentId}function br(e){return e.error!==null}function xr(e){let t=(0,Q.c)(23),{hiddenProviders:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=Ge.filter(e=>!n.has(e)),t[0]=n,t[1]=i);let a=i,o=a.length===Ge.length?`All providers`:a.length===0?`No providers`:a.length===1?Ke[a[0]].label:`${a.length} providers`,s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(S,{}),t[2]=s):s=t[2];let c;t[3]===o?c=t[4]:(c=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:o}),t[3]=o,t[4]=c);let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(p,{className:`size-3.5 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/usage-provider:opacity-100 group-focus-visible/usage-provider:opacity-100 group-data-popup-open/usage-provider:opacity-100`,"aria-hidden":!0}),t[5]=l):l=t[5];let u;t[6]===c?u=t[7]:(u=(0,$.jsxs)(b,{render:s,className:`group/usage-provider min-w-0 max-w-full`,children:[c,l]}),t[6]=c,t[7]=u);let d=n.size===0,m;t[8]===r?m=t[9]:(m=e=>r(e?[]:Ge),t[8]=r,t[9]=m);let g;t[10]!==d||t[11]!==m?(g=(0,$.jsx)(f,{checked:d,closeOnClick:!1,onCheckedChange:m,children:`All providers`}),t[10]=d,t[11]=m,t[12]=g):g=t[12];let _;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(O,{}),t[13]=_):_=t[13];let v;t[14]!==n||t[15]!==r?(v=Ge.map(e=>(0,$.jsx)(f,{checked:!n.has(e),closeOnClick:!1,onCheckedChange:t=>r(Ge.filter(r=>r===e?!t:n.has(r))),children:(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(ur,{provider:e,className:`size-3.5`}),(0,$.jsx)(`span`,{className:`truncate`,children:Ke[e].label})]})},e)),t[14]=n,t[15]=r,t[16]=v):v=t[16];let y;t[17]!==v||t[18]!==g?(y=(0,$.jsxs)(ee,{align:`start`,children:[g,_,v]}),t[17]=v,t[18]=g,t[19]=y):y=t[19];let x;return t[20]!==y||t[21]!==u?(x=(0,$.jsxs)(h,{children:[u,y]}),t[20]=y,t[21]=u,t[22]=x):x=t[22],x}function Sr(){let e=(0,Q.c)(7),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(X,{className:`h-10 w-36`}),(0,$.jsx)(X,{className:`h-4 w-32`})]}),Ge.map(Cr)]}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(X,{className:`h-5 w-24`}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsxs)(`section`,{className:`grid gap-6 lg:grid-cols-[minmax(0,18rem)_minmax(0,1fr)]`,children:[t,(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[n,(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(X,{className:`ml-16 h-56`}),(0,$.jsx)(X,{className:`ml-16 h-4`})]})]})]}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(`h2`,{className:`text-sm font-medium text-foreground`,children:`Totals`}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[i,(0,$.jsx)(wr,{labels:[`Processed tokens`,`Cached input`,`Uncached input`,`Output`,`Cache savings`]})]}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,$.jsx)(`section`,{className:`grid gap-x-12 gap-y-8 lg:grid-cols-2`,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,$.jsx)(X,{className:`h-5 w-28`}),(0,$.jsx)(X,{className:`h-2`}),(0,$.jsx)(X,{className:`h-4 w-72`})]})}),e[5]=o):o=e[5];let s;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsxs)($.Fragment,{children:[r,a,o,(0,$.jsxs)(`section`,{className:`flex flex-col gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsx)(`h2`,{className:`text-sm font-medium text-foreground`,children:`Breakdown`}),(0,$.jsx)(X,{shape:`card`,className:`h-7 w-28`})]}),(0,$.jsx)(X,{className:`h-44`})]})]}),e[6]=s):s=e[6],s}function Cr(e){return(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsxs)(`div`,{className:`flex min-h-5 items-center justify-between gap-4`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(X,{shape:`pill`,className:`size-2 shrink-0`}),(0,$.jsx)(X,{shape:`pill`,className:`size-4 shrink-0`}),(0,$.jsx)(X,{className:`h-3.5 w-20`})]}),(0,$.jsx)(X,{className:`h-3.5 w-14`})]}),(0,$.jsx)(X,{className:`h-4 w-36`})]},e)}function wr(e){let t=(0,Q.c)(4),{labels:n}=e,r;t[0]===n?r=t[1]:(r=n.map(Tr),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,$.jsx)(`div`,{className:`grid grid-cols-2 gap-x-6 gap-y-4 py-1 md:grid-cols-5`,children:r}),t[2]=r,t[3]=i),i}function Tr(e){return(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,$.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,$.jsx)(X,{className:`h-6 w-16`})]},e)}var Er=ar;export{Er as component};
|
|
2
|
+
//# sourceMappingURL=usage-CtcqAwlu.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=usageAccess-
|
|
1
|
+
import{kv as e,sv as t}from"./utils-DjbLtxuo.js";function n(n){if(n.hasSessionError)return{canReadDiagnostics:!1,isPending:!1,error:`Could not check this connection's access to diagnostics and usage.`};if(n.session===null){let e=n.connectionPhase===`connected`||n.connectionPhase===`connecting`||n.connectionPhase===`reconnecting`;return{canReadDiagnostics:!1,isPending:e,error:e?null:`This environment is not connected.`}}let r=e(n.session,t);return{canReadDiagnostics:r,isPending:!1,error:r?null:`This connection does not have access to diagnostics and usage.`}}export{n as t};
|
|
2
|
+
//# sourceMappingURL=usageAccess-2Wks5kIN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=usageFormat-
|
|
1
|
+
import{pl as e}from"./utils-DjbLtxuo.js";var t=new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2}),n=new Intl.NumberFormat(`en-US`);function r(e){return t.format(e)}function i(e){return n.format(Math.round(e))}function a(e){let t=Math.abs(e);return t>=0xe8d4a51000?`${o(e/0xe8d4a51000)}T`:t>=1e9?`${o(e/1e9)}B`:t>=1e6?`${o(e/1e6)}M`:t>=1e3?`${o(e/1e3)}K`:n.format(Math.round(e))}function o(e){let t=Math.abs(e),n=t>=100?0:t>=10?1:2;return e.toFixed(n).replace(/\.0+$/,``)}function s(e,t=1){let n=e*100,r=10**-t;return n>0&&n<r?`<${r.toFixed(t)}%`:`${n.toFixed(t)}%`}function c(e,t){return t.direction===`serverBehind`?`${e} runs an older server version and is excluded from totals.`:`This client is older than the server on ${e}; its usage is excluded from totals.`}function l(e){let[t,n,r]=e.split(`-`).map(e=>Number(e));return t===void 0||n===void 0||r===void 0?e:`${[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][n-1]??``} ${r}`}function u(e,t){let n=[],r=Date.parse(`${e}T00:00:00Z`),i=Date.parse(`${t}T00:00:00Z`);if(Number.isNaN(r)||Number.isNaN(i)||i<r)return n;for(let e=r;e<=i;e+=864e5)n.push(new Date(e).toISOString().slice(0,10));return n}var d=36e5,f=new Map;function p(e,t){if(t.timeZone===void 0)return new Intl.DateTimeFormat(e,t);let n=JSON.stringify([e,t]),r=f.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),f.size>=16&&f.clear(),f.set(n,r)),r}function m(e,t){let n=[],r=Date.parse(e),i=Date.parse(t);if(Number.isNaN(r)||Number.isNaN(i)||i<=r)return n;for(let e=r;e<i;e+=d)n.push(new Date(e).toISOString());return n}function h(e,t){let n=new Date(e);if(Number.isNaN(n.getTime()))return e;let r=t===void 0?{}:{timeZone:t},i=p(`en-US`,{...r,hour:`numeric`}),a=p(`en-CA`,{...r,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,hourCycle:`h23`}),o=a.format(n);return[-36e5,d].some(e=>a.format(new Date(n.getTime()+e))===o)?p(`en-US`,{...t===void 0?{}:{timeZone:t},hour:`numeric`,timeZoneName:`short`}).format(n):i.format(n)}function g(e,t){let n=new Date(e);return Number.isNaN(n.getTime())?e:p(`en-US`,{...t===void 0?{}:{timeZone:t},month:`short`,day:`numeric`,hour:`numeric`}).format(n)}function _(e,t,n){let r=new Date(e),i=new Date(t);if(Number.isNaN(r.getTime())||Number.isNaN(i.getTime()))return g(e,n);let a=p(`en-CA`,{...n===void 0?{}:{timeZone:n},year:`numeric`,month:`2-digit`,day:`2-digit`}),o=Date.parse(`${a.format(r)}T00:00:00Z`),s=Date.parse(`${a.format(i)}T00:00:00Z`),c=Math.round((s-o)/(24*d)),l=h(e,n);return c===0?`${l} today`:c===1?`${l} yesterday`:g(e,n)}function v(t,n=new Date,r=`day`){let i=Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`,a;try{a=new Intl.DateTimeFormat(`en-CA`,{timeZone:i,year:`numeric`,month:`2-digit`,day:`2-digit`})}catch{i=`UTC`,a=new Intl.DateTimeFormat(`en-CA`,{timeZone:`UTC`,year:`numeric`,month:`2-digit`,day:`2-digit`})}let o=a.format(n);if(r===`hour`){let t=Math.floor(n.getTime()/6e4)*6e4,o=t-24*d,s=new Date(o),c=new Date(t);return{sinceDay:e.make(a.format(s)),untilDay:e.make(a.format(c)),timeZone:i,resolution:r,sinceTime:s.toISOString(),untilTime:c.toISOString()}}let[s=0,c=1,l=1]=o.split(`-`).map(e=>Number.parseInt(e,10)),u=new Date(Date.UTC(s,c-1,l-(t-1)));return{sinceDay:e.make(u.toISOString().slice(0,10)),untilDay:e.make(o),timeZone:i,resolution:r}}export{l as a,_ as c,r as d,v as f,g as i,a as l,m as n,h as o,i as r,s,u as t,c as u};
|
|
2
|
+
//# sourceMappingURL=usageFormat-BZJ9qCn4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e}from"./keybindings-
|
|
2
|
-
//# sourceMappingURL=usageShortcuts-
|
|
1
|
+
import{_ as e}from"./keybindings-tgj8XFFz.js";var t=[{value:`cost`,label:`Cost`,command:`usage.cost`},{value:`tokens`,label:`Tokens`,command:`usage.tokens`},{value:`limits`,label:`Limits`,command:`usage.limits`}],n=[{days:1,label:`Past 24h`,command:`usage.period.day`},{days:7,label:`7 days`,command:`usage.period.week`},{days:30,label:`30 days`,command:`usage.period.month`},{days:90,label:`90 days`,command:`usage.period.quarter`}];function r(t,n){let r=t.target;return r instanceof HTMLElement&&(r.tagName===`INPUT`||r.tagName===`TEXTAREA`||r.tagName===`SELECT`||r.isContentEditable||r.closest(`[role="dialog"], [aria-modal="true"], [data-slot$="popup"]`))?null:e(t,n,{context:{usagePageOpen:!0}})}export{n,r,t};
|
|
2
|
+
//# sourceMappingURL=usageShortcuts-BJyp1xT6.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n}from"./jsx-runtime-DJeoFXNw.js";import{as as r}from"./utils-DjbLtxuo.js";import{Sr as i}from"./runtime-BBYIQ0f-.js";var a=n(),o=e(t(),1);function s(e,t){let n=(0,a.c)(6),s=(0,o.useContext)(r),c=typeof t==`string`?t:t?.label??e.label,l=typeof t==`string`?!0:t?.reportFailure??!0,u=typeof t==`string`?!0:t?.reportDefect??!0,d;return n[0]!==e||n[1]!==c||n[2]!==s||n[3]!==u||n[4]!==l?(d=t=>i(s,e,t,{label:c,reportFailure:l,reportDefect:u}),n[0]=e,n[1]=c,n[2]=s,n[3]=u,n[4]=l,n[5]=d):d=n[5],d}export{s as t};
|
|
2
|
+
//# sourceMappingURL=use-atom-command-BbFDhw_c.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{Pa as n,Wa as r}from"./utils-DjbLtxuo.js";var i=e(t());function a(e,t,a,s=!0,c){let[l,u]=i.useState(),d=n(c?`${c}-label`:void 0),f=e??t??l;return r(()=>{let n=e||t||!s?void 0:o(a.current,d);l!==n&&u(n)}),f}function o(e,t){let n=s(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function s(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}export{a as t};
|
|
2
|
+
//# sourceMappingURL=useAriaLabelledBy-BJnK5b5h.js.map
|