@p4code/cli 0.9.18 → 0.9.19
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-DbCGhPmy.mjs +3 -0
- package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
- package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
- package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
- package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
- package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BU8mTsuy.mjs} +278 -50
- package/dist/bin.mjs +2 -2
- package/dist/{binCli-DzRO6f_z.mjs → binCli-CJGD6FcB.mjs} +297 -125
- package/dist/claude-history-worker.mjs +1 -1
- package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
- package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
- package/dist/client/.vite/manifest.json +2143 -2131
- package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-dXNVRqH0.js} +2 -2
- package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BnTV2LIU.js} +2 -2
- package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-BW_NJOn9.js} +2 -2
- package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-zR4M88FU.js} +2 -2
- package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-DIzrmjXm.js} +2 -2
- package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-D9gz0spY.js} +2 -2
- package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-BFO1LsJz.js} +2 -2
- package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-CflGSI2z.js} +2 -2
- package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-B_-tUtQE.js} +2 -2
- package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-CNFGk064.js} +2 -2
- package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-DSw7e3qz.js} +2 -2
- package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-C1endahg.js} +2 -2
- package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DGyrlbqz.js} +2 -2
- package/dist/client/assets/AlertDialogRoot-CfwItD_i.js +2 -0
- package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-DG3oq8Fl.js} +2 -2
- package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-uHFuClfP.js} +2 -2
- package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-DJtfqV3f.js} +2 -2
- package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-B4MgXIYY.js} +2 -2
- package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-CnWbDLSz.js} +2 -2
- package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-DdZ6n5qP.js} +2 -2
- package/dist/client/assets/ChatGptUsageButton-Dg1SR7pz.js +2 -0
- package/dist/client/assets/ChatMarkdown-eJNo9q4b.js +49 -0
- package/dist/client/assets/CheckboxIndicator-BpGIx6Ze.js +2 -0
- package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-Cny-j-4e.js} +2 -2
- package/dist/client/assets/CodexSetupSection.logic-C4KEUUA1.js +2 -0
- package/dist/client/assets/CollapsiblePanel-vHsKk5wM.js +2 -0
- package/dist/client/assets/ComboboxClear-DI8al7ca.js +2 -0
- package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-9alK0hYt.js} +2 -2
- package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-BOYakQHx.js} +2 -2
- package/dist/client/assets/CompositeRoot-OiiGu5cn.js +2 -0
- package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9vE8btn.js} +2 -2
- package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-DL0Hsk-v.js} +2 -2
- package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-D99K7hWK.js} +2 -2
- package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-BF6iP9-o.js} +2 -2
- package/dist/client/assets/DevicePanel-BzIRsUjQ.js +2 -0
- package/dist/client/assets/DeviceSetup-DQqwNSXQ.js +2 -0
- package/dist/client/assets/DialogTitle-BNEjkHZl.js +2 -0
- package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-DOn5F9Vx.js} +3 -3
- package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-C7d_tSjH.js} +2 -2
- package/dist/client/assets/DiffPanel-zzTYLQBt.js +2 -0
- package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-CHaL1Ona.js} +3 -3
- package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-DZezJSS1.js} +8 -8
- package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-BrYDn6tR.js} +2 -2
- package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-BsOIEd28.js} +2 -2
- package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-B07Bu4_g.js} +2 -2
- package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-Ua5R3Une.js} +2 -2
- package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-CAhD0qa4.js} +2 -2
- package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-Ptxxfl5h.js} +6 -6
- package/dist/client/assets/FoldedSettingsSection-C-4eZXtv.js +2 -0
- package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-BiCUaNcl.js} +2 -2
- package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-MsC8mniI.js} +2 -2
- package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-D8Idteuf.js} +2 -2
- package/dist/client/assets/Input-BtekXNnW.js +2 -0
- package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-Aqwzi0Sz.js} +2 -2
- package/dist/client/assets/JZOYTAAL-B8yh1QUr.js +1 -0
- package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-CkU_KXkd.js} +2 -2
- package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-DLs66X2w.js} +2 -2
- package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-DNTed1xn.js} +2 -2
- package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BOSadp0O.js} +2 -2
- package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-qg2nPaOP.js} +2 -2
- package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-CQIJcmq4.js} +2 -2
- package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-B_2pC76G.js} +2 -2
- package/dist/client/assets/ModelLiveLayer-BdDN1RwJ.js +3 -0
- package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-DkFZrX8t.js} +2 -2
- package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-DF_hOTNF.js} +2 -2
- package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-DIDw2XWy.js} +2 -2
- package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-DX7_CzKu.js} +2 -2
- package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-mHLqolvI.js} +2 -2
- package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-Suig0WTF.js} +2 -2
- package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-naPvNZLz.js} +2 -2
- package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-D2rgfUAh.js} +2 -2
- package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-7rnsehAx.js} +2 -2
- package/dist/client/assets/PanelLayoutControls-D6h4yyW-.js +216 -0
- package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-0R4z7KQU.js} +2 -2
- package/dist/client/assets/PopoverHandle-BxV9_kh8.js +2 -0
- package/dist/client/assets/PreviewPanel-DCN5UudG.js +2 -0
- package/dist/client/assets/ProjectDefaultsSettings-BVdLNACE.js +2 -0
- package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-DJmxMkvz.js} +3 -3
- package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-3Bcbbvvc.js} +2 -2
- package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-Bb9wZVNY.js} +2 -2
- package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-mgY-tn0M.js} +2 -2
- package/dist/client/assets/ProviderModelPicker-D3VH0Z__.js +2 -0
- package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-CGySH9bP.js} +2 -2
- package/dist/client/assets/PullRequestCodeTab-D-J3laup.js +6 -0
- package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-Ddcb7a4G.js} +2 -2
- package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-CUrcvaQB.js} +2 -2
- package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-DiLAhy4C.js} +2 -2
- package/dist/client/assets/RenderErrorBoundary-DNjP1Gq4.js +23 -0
- package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-BKZPxtjZ.js} +2 -2
- package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-CAdpUQd9.js} +2 -2
- package/dist/client/assets/ScheduledTasksSettings-BIqva7uG.js +6 -0
- package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-CjWqxV6P.js} +2 -2
- package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-BNGMax5h.js} +2 -2
- package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-F_2AS4sm.js} +2 -2
- package/dist/client/assets/SelectScrollUpArrow-r18qpNEu.js +2 -0
- package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection-dyJbezur.js} +2 -2
- package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-BwrWyM3f.js} +7 -7
- package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DWRYwc9b.js} +2 -2
- package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-DpC9Q9ae.js} +2 -2
- package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-ByWEF0y2.js} +2 -2
- package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-BsP9x4U3.js} +2 -2
- package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-BONiqXri.js} +2 -2
- package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-CLTZIB-s.js} +2 -2
- package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-C7o3GtWa.js} +3 -3
- package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-Bq_XM62t.js} +40 -40
- package/dist/client/assets/ThreadTerminalDrawer-CD5oxZhC.js +5 -0
- package/dist/client/assets/TooltipProvider-DPt8xz_3.js +2 -0
- package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-BS_wwVFT.js} +2 -2
- package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CpDVNtuT.js} +2 -2
- package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-BWztABfX.js} +2 -2
- package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-4IVaqPOG.js} +2 -2
- package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-BHensDdi.js} +2 -2
- package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-CCJOwHlv.js} +2 -2
- package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-C9Tpr_np.js} +2 -2
- package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-DO1k5hPx.js} +2 -2
- package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-DR5ebldd.js} +2 -2
- package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-D6Kx02Ci.js} +2 -2
- package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-B7xQdu1d.js} +2 -2
- package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-vpRi9ruy.js} +2 -2
- package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-BPr-N_Eh.js} +2 -2
- package/dist/client/assets/_chat-B7MuBHoN.js +47 -0
- package/dist/client/assets/{_chat.design-C593M39o.js → _chat.design-JY93KEj-.js} +2 -2
- package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-BLQil4HT.js} +2 -2
- package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-BUUjlaam.js} +3 -3
- package/dist/client/assets/_chat.pull-requests-hoMASTBm.js +2 -0
- package/dist/client/assets/{alert-BdISKl4u.js → alert-Eh-IusVP.js} +2 -2
- package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-BxwvNOYD.js} +2 -2
- package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-Bk8CvVQ5.js} +2 -2
- package/dist/client/assets/assets-w0TTeveX.js +2 -0
- package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-CQgs_U0x.js} +2 -2
- package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-BD9wK52f.js} +2 -2
- package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-CDoyvSyH.js} +2 -2
- package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-BOsv4n_B.js} +2 -2
- package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-BJsEk7ze.js} +2 -2
- package/dist/client/assets/{command-CeMH9lgx.js → command-Cg83G2rG.js} +2 -2
- package/dist/client/assets/{connect-CQUjsv6p.js → connect-C7ENaX3L.js} +2 -2
- package/dist/client/assets/connect-agent-BEYL9KOm.js +2 -0
- package/dist/client/assets/{design-BL2REeQ-.js → design-pZfTAgOJ.js} +2 -2
- package/dist/client/assets/{device-DUMKyegd.js → device-CG5GzxuX.js} +2 -2
- package/dist/client/assets/{dialog-BzESHWgr.js → dialog-wBelv1Ac.js} +2 -2
- package/dist/client/assets/diffPanelStore-C8bCQWTi.js +2 -0
- package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-C_l9f0DJ.js} +2 -2
- package/dist/client/assets/{dist--Lo1A95S.js → dist-1X_vspyy.js} +3 -3
- package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-BhYlt4Pu.js} +2 -2
- package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-C9zEhnho.js} +2 -2
- package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic--1QgBotz.js} +3 -3
- package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-B_jWJYkI.js} +2 -2
- package/dist/client/assets/{empty-CeYEMFdG.js → empty-CJnssipy.js} +2 -2
- package/dist/client/assets/entities-CRXY8xy3.js +2 -0
- package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-Bg40qEqI.js} +2 -2
- package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-C_MZA2Fb.js} +2 -2
- package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
- package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-PLuWhYlb.js} +2 -2
- package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DNX1FsUO.js} +2 -2
- package/dist/client/assets/index-BeP8Inse.js +3 -0
- package/dist/client/assets/{input-K95B1E2P.js → input-Cd-93Wp0.js} +2 -2
- package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-CsS-Psw7.js} +2 -2
- package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-DB5SHS11.js} +2 -2
- package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-DBugaGH3.js} +2 -2
- package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-8c6T_8yh.js} +4 -4
- package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-DtOhACEQ.js} +2 -2
- package/dist/client/assets/{link-B57I0_wC.js → link-BrJlIcQX.js} +2 -2
- package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN6Qis59.js} +2 -2
- package/dist/client/assets/main-CNyrs4J_.js +37 -0
- package/dist/client/assets/main-h6l_SQzg.css +2 -0
- package/dist/client/assets/mediaReference-CJpFszQ0.js +2 -0
- package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-D0cInV6V.js} +2 -2
- package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-BmBrNhLd.js} +2 -2
- package/dist/client/assets/number-field-CSK9SRbZ.js +2 -0
- package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-CFw3_anS.js} +2 -2
- package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-Eqww5SU9.js} +2 -2
- package/dist/client/assets/openFileInPreview-D0wySgTe.js +2 -0
- package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-BBI5SxD4.js} +2 -2
- package/dist/client/assets/{pair-Bc34xPWk.js → pair-DQR36eTM.js} +2 -2
- package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-Dxq1oBH6.js} +2 -2
- package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-DLo78qRr.js} +2 -2
- package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-uaZzWTro.js} +2 -2
- package/dist/client/assets/{popover-CtPuvMeZ.js → popover-DU7x_UNP.js} +2 -2
- package/dist/client/assets/{preview-DIIM6Lws.js → preview-CiDRJw3K.js} +2 -2
- package/dist/client/assets/{preview-CS0uw3GP.js → preview-DpJtvz_q.js} +2 -2
- package/dist/client/assets/previewMiniPlayerStore-D98YBqjW.js +2 -0
- package/dist/client/assets/primary-B5Ds-X9y.js +2 -0
- package/dist/client/assets/primaryCloudLinkState-7otRI1yH.js +2 -0
- package/dist/client/assets/projectFilesQueryState-CgQDudyR.js +2 -0
- package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-BvwaSAI1.js} +2 -2
- package/dist/client/assets/providerSkills-BzFbjrTC.js +2 -0
- package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-D9w_E_Dv.js} +3 -3
- package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-gBL3Yt9x.js} +2 -2
- package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CDUFfLmu.js} +2 -2
- package/dist/client/assets/pullRequests-BZ7PzmTm.js +2 -0
- package/dist/client/assets/queries-CzRpIoRQ.js +2 -0
- package/dist/client/assets/query-B8d0w621.js +2 -0
- package/dist/client/assets/radio-group-XlBZKXvU.js +2 -0
- package/dist/client/assets/relay-BWVOLzv_.js +2 -0
- package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-B6SrQg1c.js} +2 -2
- package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-BuudmoUr.js} +2 -2
- package/dist/client/assets/runtime-DYDOkR3G.js +7 -0
- package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DyiI0NS9.js} +2 -2
- package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-DK9Z9azP.js} +3 -3
- package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-B1iVi_db.js} +2 -2
- package/dist/client/assets/{select-BtqP8nTL.js → select-Dn3MxyiK.js} +2 -2
- package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-D5ELz2sX.js} +2 -2
- package/dist/client/assets/server-DQkamj54.js +2 -0
- package/dist/client/assets/session-A0FOa5Fv.js +2 -0
- package/dist/client/assets/session-logic-21koHfxl.js +27 -0
- package/dist/client/assets/{settings-A-pqSt1Y.js → settings-RZUSGfch.js} +2 -2
- package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-C2NUZQFB.js} +2 -2
- package/dist/client/assets/settings.archived-BOhwFyi3.js +2 -0
- package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-BhT0XlhO.js} +2 -2
- package/dist/client/assets/settings.connections-CVIPNlOU.js +2 -0
- package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-GIrtB4_J.js} +2 -2
- package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-BBnbf4E4.js} +2 -2
- package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-BrpJ4wJk.js} +2 -2
- package/dist/client/assets/settings.diagnostics-H0YPr7JD.js +2 -0
- package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CuMxiE8w.js} +2 -2
- package/dist/client/assets/settings.integrations-bw-NYX6w.js +2 -0
- package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-Mqx8YmX-.js} +2 -2
- package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DppmDqdO.js} +2 -2
- package/dist/client/assets/settings.plugins-PhsBK5Nz.js +5 -0
- package/dist/client/assets/settings.projects-DvjxFMyV.js +4 -0
- package/dist/client/assets/settings.providers-DZac28bF.js +3 -0
- package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-_8iDYzJF.js} +2 -2
- package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-B5WZy_fN.js} +2 -2
- package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-BThcjeQt.js} +2 -2
- package/dist/client/assets/settings.source-control-Cj9K4HE8.js +2 -0
- package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-D3QQPs1U.js} +2 -2
- package/dist/client/assets/settingsLayout-LNYGC372.js +3 -0
- package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-CCcDCy-Q.js} +2 -2
- package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-Bj_Qatcf.js} +2 -2
- package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-dlFZVmO8.js} +2 -2
- package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-Tyc4OKDH.js} +2 -2
- package/dist/client/assets/sourceControlClients-ECBkjM0e.js +2 -0
- package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-fU7Q2OR1.js} +2 -2
- package/dist/client/assets/src-B7vcPG0D.js +15 -0
- package/dist/client/assets/terminal-links-CPJORRle.js +2 -0
- package/dist/client/assets/terminalSessions-B00GvWIU.js +2 -0
- package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CEng2dlo.js} +2 -2
- package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-CcasVi_y.js} +3 -3
- package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-D7P5EX0m.js} +2 -2
- package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-DN8nwGi8.js} +2 -2
- package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-Dx-ruC5S.js} +2 -2
- package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-Da633nbs.js} +2 -2
- package/dist/client/assets/uiStateStore-aIXF8Zlu.js +2 -0
- package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
- package/dist/client/assets/{usage-BJA7zQoS.js → usage-DXoXMoKb.js} +2 -2
- package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-RRnEiTSy.js} +2 -2
- package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-D95Lw1XX.js} +2 -2
- package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-3UXG3hMD.js} +2 -2
- package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-BkSai4ZH.js} +2 -2
- package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-rzE7PQnj.js} +2 -2
- package/dist/client/assets/useHandleNewThread-CT3UAzyB.js +2 -0
- package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-D7ZCVKu2.js} +2 -2
- package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-C6_wm78C.js} +2 -2
- package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-iqJmvild.js} +2 -2
- package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-CKTZ-MxU.js} +2 -2
- package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-DND-Jy5h.js} +2 -2
- package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-DFJ-2rdQ.js} +2 -2
- package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-EARvZG9w.js} +2 -2
- package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-DRrQpPhD.js} +3 -3
- package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-Byb-EJOb.js} +2 -2
- package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-tXU_0tMY.js} +2 -2
- package/dist/client/assets/useSettings-BOuYsEM0.js +3 -0
- package/dist/client/assets/utils-DsOiwDNN.js +24 -0
- package/dist/client/assets/vcsRefInvalidation-CnjZD1r1.js +2 -0
- package/dist/client/assets/welcome-BgxI7gmD.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
- package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-C_h8Tda3.mjs} +894 -438
- package/dist/{renderer-iWfzRWCX.mjs → renderer-BeTlHpQk.mjs} +2 -2
- package/dist/{runtime-CllDK9QU.mjs → runtime-BUfUqrrw.mjs} +3 -3
- package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-5R-ZfBsl.mjs} +3152 -2949
- package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-DurN_FAN.mjs} +1 -1
- package/dist/{server-vm1eH-y1.mjs → server-DuD96ZSr.mjs} +347 -228
- package/dist/{sha2-9FUhed4s.mjs → sha2-oCwRxj9g.mjs} +13 -7
- package/package.json +1 -1
- package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
- package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
- package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
- package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
- package/dist/client/assets/CheckboxIndicator-CLFg8-A1.js +0 -2
- package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
- package/dist/client/assets/CollapsiblePanel-BlUD5mJC.js +0 -2
- package/dist/client/assets/ComboboxClear-DKHwuDAL.js +0 -2
- package/dist/client/assets/CompositeRoot-_C3uLH2F.js +0 -2
- package/dist/client/assets/DevicePanel-Dvozgov3.js +0 -2
- package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
- package/dist/client/assets/DialogTitle-C9j5Tmuy.js +0 -2
- package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
- package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
- package/dist/client/assets/Input-BWhtnCC0.js +0 -2
- package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
- package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
- package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
- package/dist/client/assets/PopoverHandle-BwqnKm9Y.js +0 -2
- package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
- package/dist/client/assets/ProjectDefaultsSettings-rvN_67Gu.js +0 -2
- package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
- package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
- package/dist/client/assets/ScheduledTasksSettings-CvbQDrJp.js +0 -6
- package/dist/client/assets/SelectScrollUpArrow-Dj2om6Qx.js +0 -2
- package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
- package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
- package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
- package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
- package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
- package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
- package/dist/client/assets/diffPanelStore-B-hQEy6C.js +0 -2
- package/dist/client/assets/entities-CpJdh0W5.js +0 -2
- package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
- package/dist/client/assets/index-BWKkBtFt.js +0 -3
- package/dist/client/assets/main-C8b9a0ht.js +0 -37
- package/dist/client/assets/main-CCH0X0zL.css +0 -2
- package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
- package/dist/client/assets/number-field-D6t0GpAB.js +0 -2
- package/dist/client/assets/openFileInPreview-DFpXOfx7.js +0 -2
- package/dist/client/assets/previewMiniPlayerStore-oJw0qrRM.js +0 -2
- package/dist/client/assets/primary-B0bbGdiR.js +0 -2
- package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
- package/dist/client/assets/projectFilesQueryState-DpLF9eJd.js +0 -2
- package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
- package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
- package/dist/client/assets/queries-DDAXRF4r.js +0 -2
- package/dist/client/assets/query-DpmTmXUV.js +0 -2
- package/dist/client/assets/radio-group-DSfZzUu8.js +0 -2
- package/dist/client/assets/relay-CnLeC-mg.js +0 -2
- package/dist/client/assets/runtime-DUPVFypn.js +0 -7
- package/dist/client/assets/server-BYnv0CK4.js +0 -2
- package/dist/client/assets/session-BryEqNW-.js +0 -2
- package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
- package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
- package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
- package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
- package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
- package/dist/client/assets/settings.plugins-B6My9wD7.js +0 -5
- package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
- package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
- package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
- package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
- package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
- package/dist/client/assets/src-BZzGU-vc.js +0 -15
- package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
- package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
- package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
- package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
- package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
- package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
- package/dist/client/assets/utils-Cs97wR6T.js +0 -24
- package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
- package/dist/client/assets/welcome-BRX7e-eN.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{Aa as r,Bn as i,Da as a,Gn as o,Ia as ee,Ka as s,Oo as te,Or as ne,Pa as c,Qa as l,Un as u,Wa as d,Ya as f,da as p,ho as m,ua as h}from"./utils-DsOiwDNN.js";import{c as g,d as _,f as v,i as re,n as ie,s as ae,u as oe}from"./useRender-BP5vR6yH.js";import{t as se}from"./useRegisterFieldControl-Byb-EJOb.js";import{t as ce}from"./FormContext-CXpUoAJn.js";import{t as le}from"./useAriaLabelledBy-rzE7PQnj.js";import{t as ue}from"./FieldItemContext-sr3mCd2v.js";var y=e(t()),b=y.createContext(void 0);function de(e=!0){let t=y.useContext(b);if(t===void 0&&!e)throw Error(v(3));return t}function fe(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var x=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.indeterminate=`data-indeterminate`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({});function S(e){return y.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[x.checked]:``}:{[x.unchecked]:``}},...o}),[e.indeterminate])}var C=y.createContext(void 0);function w(){let e=y.useContext(C);if(e===void 0)throw Error(v(14));return e}var T=e(n()),pe=`data-parent`,me=y.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:a=!1,"aria-labelledby":o,disabled:te=!1,form:v,id:b,indeterminate:x=!1,inputRef:w,name:me,onCheckedChange:he,parent:E=!1,readOnly:D=!1,render:ge,required:O=!1,uncheckedValue:k,value:A,nativeButton:j=!1,style:_e,...ve}=e,{clearErrors:ye}=ce(),{disabled:be,name:xe,setDirty:Se,setFilled:M,setFocused:N,setTouched:Ce,state:P,validationMode:we,validityData:Te,shouldValidateOnChange:Ee,validation:De}=u(),Oe=ue(),{labelId:ke,controlId:Ae,registerControlId:F,getDescriptionProps:I}=i(),L=de(),R=L?.parent,z=R&&L.allValues,B=be||Oe.disabled||L?.disabled||te,V=xe??me,H=A??V,je=ee(),Me=ee(),U=Ae;z?U=E?Me:`${R.id}-${H}`:b&&(U=b);let W={};z&&(E?W=L.parent.getParentProps():H&&(W=L.parent.getChildProps(H)));let{checked:Ne=n,indeterminate:G=x,onCheckedChange:Pe,...Fe}=W,K=L?.value,Ie=L?.setValue,Le=L?.defaultValue,q=y.useRef(null),J=_(()=>Symbol(`checkbox-control`)),Y=y.useRef(!1),{getButtonProps:Re,buttonRef:ze}=d({disabled:B,native:j}),X=L?.validation??De,[Z,Be]=l({controlled:H&&K&&!E?K.includes(H):Ne,default:H&&Le&&!E?Le.includes(H):a,name:`Checkbox`,state:`checked`});s(()=>{F!==g&&(Y.current=!0,F(J.current,U))},[U,F,J]),y.useEffect(()=>{let e=J.current;return()=>{Y.current&&F!==g&&(Y.current=!1,F(e,void 0))}},[F,J]),se(q,je,Z,void 0,!L);let Q=y.useRef(null),Ve=oe(w,Q,X.inputRef),He=le(o,ke,Q,!j,U??void 0);s(()=>{Q.current&&(Q.current.indeterminate=G,Z&&M(!0))},[Z,G,M]),ne(Z,()=>{(!L||E)&&(ye(V),M(Z),Se(Z!==Te.initialValue),Ee()?X.commit(Z):X.commit(Z,!0))});let Ue=re({checked:Z,disabled:B,form:v,name:E?void 0:V,id:j?void 0:U??void 0,required:O,ref:Ve,style:V?p:h,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(D){e.preventDefault();return}let t=e.currentTarget.checked,n=c(m,e.nativeEvent);if(Pe?.(t,n),he?.(t,n),!n.isCanceled&&(Be(t),H&&K&&Ie&&!E&&!z)){let e=t?[...K,H]:K.filter(e=>e!==H);Ie(e,n)}},onFocus(){q.current?.focus()}},A===void 0?ae:{value:(L?Z&&A:A)||``},I,L?X.getValidationProps:X.getInputValidationProps),We=z?!!Ne:Z,Ge=z&&G||x;y.useEffect(()=>{if(!R||!H)return;let e=R.disabledStatesRef.current;return e.set(H,B),()=>{e.delete(H)}},[R,B,H]);let $=y.useMemo(()=>({...P,checked:We,disabled:B,readOnly:D,required:O,indeterminate:Ge}),[P,We,B,D,O,Ge]),Ke=S($),qe=ie(`span`,e,{state:$,ref:[ze,q,t,L?.registerControlRef],props:[{id:j?U??void 0:je,role:`checkbox`,"aria-checked":G?`mixed`:Z,"aria-readonly":D||void 0,"aria-required":O||void 0,"aria-labelledby":He,[pe]:E?``:void 0,onFocus(){N(!0)},onBlur(){let e=Q.current;e&&(Ce(!0),N(!1),we===`onBlur`&&X.commit(L?K:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=Q.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),f(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||fe(t)?.click()})},onClick(e){if(D||B)return;e.preventDefault();let t=Q.current;t&&t.dispatchEvent(new(f(t)).PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}))}},I,X.getValidationProps,ve,Fe,Re],stateAttributesMapping:Ke});return(0,T.jsxs)(C.Provider,{value:$,children:[qe,!Z&&!L&&V&&!E&&k!==void 0&&(0,T.jsx)(`input`,{type:`hidden`,form:v,name:V,value:k}),(0,T.jsx)(`input`,{...Ue,suppressHydrationWarning:!0})]})}),he=y.forwardRef(function(e,t){let{render:n,className:i,style:ee,keepMounted:s=!1,...ne}=e,c=w(),l=c.checked||c.indeterminate,{mounted:u,transitionStatus:d,setMounted:f}=r(l),p=y.useRef(null),m={...c,transitionStatus:d};a({open:l,ref:p,onComplete(){l||f(!1)}});let h={...S(c),...te,...o},g=s||u,_=ie(`span`,e,{ref:[t,p],state:m,stateAttributesMapping:h,props:ne});return g?_:null});export{me as n,he as t};
|
|
2
|
+
//# sourceMappingURL=CheckboxIndicator-BpGIx6Ze.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"./utils-
|
|
2
|
-
//# sourceMappingURL=ClippedText-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import"./utils-DsOiwDNN.js";import{g as i,m as a,n as o}from"./useRender-BP5vR6yH.js";import{a as s,i as c,l,n as u,o as d,r as f,s as p}from"./TooltipProvider-DPt8xz_3.js";import{t as m}from"./usePopupViewport-EARvZG9w.js";var h=e(t()),g=function(e){return e.popupWidth=`--popup-width`,e.popupHeight=`--popup-height`,e}({}),_={activationDirection:e=>e?{"data-activation-direction":e}:null},v=h.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...s}=e,u=l(),d=c(),f=u.useState(`instantType`),{children:p,state:h}=m({store:u,side:d.side,cssVars:g,children:a}),v={activationDirection:h.activationDirection,transitioning:h.transitioning,instant:f};return o(`div`,e,{state:v,ref:t,props:[s,{children:p}],stateAttributesMapping:_})}),y=n();function b(...e){return a(i(e))}var x=e(r(),1),S=p;function C(e){let t=(0,y.c)(2),n;return t[0]===e?n=t[1]:(n=(0,x.jsx)(d,{"data-slot":`tooltip-trigger`,...e}),t[0]=e,t[1]=n),n}function w(e){let t=(0,y.c)(28),n,r,i,a,o,c,l,d,p;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],c=t[6],l=t[7],d=t[8],p=t[9]):({className:i,positionerClassName:a,align:c,sideOffset:l,side:d,variant:p,anchor:n,children:r,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=c,t[7]=l,t[8]=d,t[9]=p);let m=c===void 0?`center`:c,h=l===void 0?4:l,g=d===void 0?`top`:d,_=p===void 0?`default`:p,S;t[10]===a?S=t[11]:(S=b(`pointer-events-none z-[70] h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom,transform] data-instant:transition-none`,a),t[10]=a,t[11]=S);let C=_===`glass`?`dropdown-glass shadow-xl shadow-black/25 before:hidden`:`border bg-popover not-dark:bg-clip-padding shadow-md/5`,w;t[12]!==i||t[13]!==C?(w=b(`relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) text-balance rounded-md text-popover-foreground text-xs transition-[width,height,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%)]`,C,i),t[12]=i,t[13]=C,t[14]=w):w=t[14];let T;t[15]===r?T=t[16]:(T=(0,x.jsx)(v,{className:`relative size-full overflow-clip px-(--viewport-inline-padding) py-1 [--viewport-inline-padding:--spacing(2)] data-instant:transition-none **:data-current:data-ending-style:opacity-0 **:data-current:data-starting-style:opacity-0 **:data-previous:data-ending-style:opacity-0 **:data-previous:data-starting-style:opacity-0 **:data-current:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:w-[calc(var(--popup-width)-2*var(--viewport-inline-padding)-2px)] **:data-previous:truncate **:data-current:opacity-100 **:data-previous:opacity-100 **:data-current:transition-opacity **:data-previous:transition-opacity`,"data-slot":`tooltip-viewport`,children:r}),t[15]=r,t[16]=T);let E;t[17]!==o||t[18]!==w||t[19]!==T?(E=(0,x.jsx)(u,{className:w,"data-slot":`tooltip-popup`,...o,children:T}),t[17]=o,t[18]=w,t[19]=T,t[20]=E):E=t[20];let D;return t[21]!==m||t[22]!==n||t[23]!==g||t[24]!==h||t[25]!==S||t[26]!==E?(D=(0,x.jsx)(s,{children:(0,x.jsx)(f,{align:m,anchor:n,className:S,"data-slot":`tooltip-positioner`,side:g,sideOffset:h,children:E})}),t[21]=m,t[22]=n,t[23]=g,t[24]=h,t[25]=S,t[26]=E,t[27]=D):D=t[27],D}var T=e=>!!(e&&e.scrollWidth>e.clientWidth);function E(e,t){let n=(0,y.c)(5),[r,i]=(0,h.useState)(!1),a;n[0]===e?a=n[1]:(a=()=>{let t=e.current;if(!t)return;let n=()=>i(T(t));n();let r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()},n[0]=e,n[1]=a);let o;return n[2]!==e||n[3]!==t?(o=[e,t],n[2]=e,n[3]=t,n[4]=o):o=n[4],(0,h.useLayoutEffect)(a,o),r}function D(e){let t=(0,y.c)(15),{children:n,full:r,className:i}=e,a=r===void 0?n:r,o=i===void 0?`design-truncate`:i,s=(0,h.useRef)(null),c=E(s,n),[l,u]=(0,h.useState)(!1),d=l&&c,f;t[0]===c?f=t[1]:(f=e=>u(e&&c),t[0]=c,t[1]=f);let p=c?0:void 0,m;t[2]!==o||t[3]!==p?(m=(0,x.jsx)(`span`,{ref:s,className:o,tabIndex:p}),t[2]=o,t[3]=p,t[4]=m):m=t[4];let g;t[5]!==n||t[6]!==m?(g=(0,x.jsx)(C,{render:m,children:n}),t[5]=n,t[6]=m,t[7]=g):g=t[7];let _;t[8]===a?_=t[9]:(_=(0,x.jsx)(w,{children:a}),t[8]=a,t[9]=_);let v;return t[10]!==d||t[11]!==f||t[12]!==g||t[13]!==_?(v=(0,x.jsxs)(S,{open:d,onOpenChange:f,children:[g,_]}),t[10]=d,t[11]=f,t[12]=g,t[13]=_,t[14]=v):v=t[14],v}function O(e){let t=(0,y.c)(12),{full:n,labelRef:r,render:i,children:a}=e,[o,s]=(0,h.useState)(!1),c;t[0]===r?c=t[1]:(c=e=>s(e&&T(r.current)),t[0]=r,t[1]=c);let l;t[2]!==a||t[3]!==i?(l=(0,x.jsx)(C,{render:i,children:a}),t[2]=a,t[3]=i,t[4]=l):l=t[4];let u;t[5]===n?u=t[6]:(u=(0,x.jsx)(w,{children:n}),t[5]=n,t[6]=u);let d;return t[7]!==o||t[8]!==c||t[9]!==l||t[10]!==u?(d=(0,x.jsxs)(S,{open:o,onOpenChange:c,children:[l,u]}),t[7]=o,t[8]=c,t[9]=l,t[10]=u,t[11]=d):d=t[11],d}export{C as a,w as i,O as n,b as o,S as r,D as t};
|
|
2
|
+
//# sourceMappingURL=ClippedText-Cny-j-4e.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{Al as i,Nl as a,Zo as o,cu as s,l as c,mr as l,t as u}from"./utils-DsOiwDNN.js";import{Ic as d,Sn as f,da as p,fa as m,ka as h,mh as g,wn as _}from"./src-B7vcPG0D.js";import{Dr as v,Sr as y}from"./runtime-DYDOkR3G.js";import{C as b,S as x,f as ee,k as te,q as S}from"./useSettings-BOuYsEM0.js";import{f as C}from"./server-DQkamj54.js";import{i as w,n as ne}from"./session-A0FOa5Fv.js";import{n as re}from"./query-B8d0w621.js";import{t as T}from"./use-atom-command-BkSai4ZH.js";import{n as E,t as D}from"./radio-group-XlBZKXvU.js";import{t as ie}from"./input-Cd-93Wp0.js";import{a as O,c as k,i as A,r as j,s as M,t as ae}from"./dialog-wBelv1Ac.js";import{S as N}from"./Icons-D8Idteuf.js";import{t as P}from"./preview-CiDRJw3K.js";import{S as F,t as I}from"./ChatGptUsageButton-Dg1SR7pz.js";import{t as L}from"./RedactedSensitiveText-DiLAhy4C.js";import{a as oe}from"./settingsLayout-LNYGC372.js";import{Ao as se,Do as R,Eo as ce,Ia as le,La as ue,To as de,ko as fe,wo as z}from"./main-CNyrs4J_.js";var B=e(t(),1),V=n(),H=e(r(),1);function pe(e){let t=(0,V.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):({children:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,H.jsx)(N,{className:`size-4 shrink-0`,"aria-hidden":`true`}),t[3]=i):i=t[3];let a=n??`Continue with ChatGPT`,o;return t[4]!==r||t[5]!==a?(o=(0,H.jsxs)(l,{...r,children:[i,a]}),t[4]=r,t[5]=a,t[6]=o):o=t[6],o}function me(e){let t=(0,V.c)(23),{open:n,methods:r,onClose:i,onSelect:a}=e,o=r.filter(ge),[s,c]=(0,B.useState)(null),l=s===`chatgpt-change-account`?s:o.find(e=>e.id===s)?.id??o[0]?.id??`chatgpt-change-account`,u=ae,d;t[0]===i?d=t[1]:(d=e=>{e||i()},t[0]=i,t[1]=d);let f=M,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,H.jsxs)(O,{children:[(0,H.jsx)(k,{children:`Reconnect ChatGPT`}),(0,H.jsx)(j,{children:`On OpenAI, sign in with the account you choose here.`})]}),t[2]=p):p=t[2];let m=E,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>c(e),t[3]=h):h=t[3];let g=o.map(he),_;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,H.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-sm`,children:[(0,H.jsx)(D,{value:`chatgpt-change-account`}),(0,H.jsx)(`span`,{className:`font-medium`,children:`Use a different account`})]}),t[4]=_):_=t[4];let v;t[5]!==m||t[6]!==l||t[7]!==h||t[8]!==g?(v=(0,H.jsx)(`div`,{className:`px-6 pb-6`,children:(0,H.jsxs)(m,{"aria-label":`ChatGPT account to connect`,value:l,onValueChange:h,children:[g,_]})}),t[5]=m,t[6]=l,t[7]=h,t[8]=g,t[9]=v):v=t[9];let y;t[10]!==a||t[11]!==l?(y=(0,H.jsx)(A,{children:(0,H.jsx)(pe,{onClick:()=>a(l)})}),t[10]=a,t[11]=l,t[12]=y):y=t[12];let b;t[13]!==f||t[14]!==p||t[15]!==v||t[16]!==y?(b=(0,H.jsxs)(f,{children:[p,v,y]}),t[13]=f,t[14]=p,t[15]=v,t[16]=y,t[17]=b):b=t[17];let x;return t[18]!==u||t[19]!==n||t[20]!==d||t[21]!==b?(x=(0,H.jsx)(u,{open:n,onOpenChange:d,children:b}),t[18]=u,t[19]=n,t[20]=d,t[21]=b,t[22]=x):x=t[22],x}function he(e){return(0,H.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 rounded-lg border px-3 py-3 text-sm`,children:[(0,H.jsx)(D,{value:e.id}),(0,H.jsx)(`span`,{className:`min-w-0 break-all font-medium`,children:e.name})]},e.id)}function ge(e){return e.id.startsWith(`chatgpt-profile:`)}function _e(e){let t=(0,V.c)(58),{environmentId:n,onClose:r,renderSetup:i,onAccountCreated:a}=e,s=w(n,h),u=ee(n),d;t[0]===n?d=t[1]:(d=C.providersValueAtom(n),t[0]=n,t[1]=d);let f=o(d),g=T(C.updateSettings,`Add ChatGPT account`),[_,v]=(0,B.useState)(`Personal`),y;t[2]===_?y=t[3]:(y=_.trim(),t[2]=_,t[3]=y);let b=`ChatGPT - ${y}`,[x,te]=(0,B.useState)(null),[S,re]=(0,B.useState)(!1),E,D,O,k,A,j,M,N,P;if(t[4]!==b||t[5]!==n||t[6]!==x||t[7]!==_||t[8]!==a||t[9]!==r||t[10]!==S||t[11]!==f||t[12]!==i||t[13]!==u||t[14]!==g){let e=f?.find(e=>e.instanceId===x),o=F(e),s;t[24]!==b||t[25]!==n||t[26]!==_||t[27]!==a||t[28]!==r||t[29]!==S||t[30]!==u||t[31]!==g?(s=async()=>{if(S||!_.trim()||!ne(n,`providers:manage`))return;re(!0);let e=m.make(`codex_${c()}`);(await g({environmentId:n,input:{patch:{providerInstances:{...u.providerInstances,[e]:{driver:p.make(`codex`),displayName:b,enabled:!0,config:{enabled:!0,setupMode:`managed`}}}}}}))._tag===`Success`&&(a?(a(e,b),r()):te(e)),re(!1)},t[24]=b,t[25]=n,t[26]=_,t[27]=a,t[28]=r,t[29]=S,t[30]=u,t[31]=g,t[32]=s):s=t[32];let l=s;O=ae,M=!o,t[33]===r?N=t[34]:(N=e=>{e||r()},t[33]=r,t[34]=N),P=e=>{!e&&o&&r()},D=R,A=`wide`;let d=x?b:`Add ChatGPT account`;t[35]===d?j=t[36]:(j=(0,H.jsx)(de,{title:d,description:`Each account has its own Codex instance and sign-in. Choose the other account on the sign-in page.`}),t[35]=d,t[36]=j),E=ce,k=x?e?.setup?i(x,e):(0,H.jsx)(oe,{title:`Codex runtime`,description:`Preparing managed setup.`}):(0,H.jsx)(`form`,{id:`add-codex-account`,onSubmit:e=>{e.preventDefault(),l()},children:(0,H.jsx)(oe,{title:`Account name`,description:`Shown in the provider list and model picker.`,control:(0,H.jsx)(ie,{"aria-label":`Account name`,value:_,disabled:S,onChange:e=>v(e.target.value),placeholder:`e.g. Personal or Work`})})}),t[4]=b,t[5]=n,t[6]=x,t[7]=_,t[8]=a,t[9]=r,t[10]=S,t[11]=f,t[12]=i,t[13]=u,t[14]=g,t[15]=E,t[16]=D,t[17]=O,t[18]=k,t[19]=A,t[20]=j,t[21]=M,t[22]=N,t[23]=P}else E=t[15],D=t[16],O=t[17],k=t[18],A=t[19],j=t[20],M=t[21],N=t[22],P=t[23];let I;t[37]!==E||t[38]!==k?(I=(0,H.jsx)(E,{children:k}),t[37]=E,t[38]=k,t[39]=I):I=t[39];let L;t[40]!==s||t[41]!==x||t[42]!==_||t[43]!==r||t[44]!==S?(L=(0,H.jsx)(z,{children:x?(0,H.jsx)(l,{variant:`outline`,onClick:r,children:`Finish later`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(l,{variant:`outline`,disabled:S,onClick:r,children:`Cancel`}),(0,H.jsx)(l,{type:`submit`,form:`add-codex-account`,disabled:S||!_.trim()||!s,children:S?`Adding account…`:`Continue`})]})}),t[40]=s,t[41]=x,t[42]=_,t[43]=r,t[44]=S,t[45]=L):L=t[45];let se;t[46]!==D||t[47]!==L||t[48]!==A||t[49]!==j||t[50]!==I?(se=(0,H.jsxs)(D,{size:A,children:[j,I,L]}),t[46]=D,t[47]=L,t[48]=A,t[49]=j,t[50]=I,t[51]=se):se=t[51];let le;return t[52]!==O||t[53]!==se||t[54]!==M||t[55]!==N||t[56]!==P?(le=(0,H.jsx)(O,{open:M,onOpenChange:N,onOpenChangeComplete:P,children:se}),t[52]=O,t[53]=se,t[54]=M,t[55]=N,t[56]=P,t[57]=le):le=t[57],le}var ve=d(f),ye=d(_),be=/^[A-Za-z0-9_./:\\-]+$/;function xe(e,t,n){return be.test(e)&&(n===`windows`||!e.includes(`\\`))?e:n===`windows`?`& '${e.replaceAll(`'`,`''`)}'`:n===`darwin`||n===`linux`?e.startsWith(`~/`)||e.startsWith(`~\\`)?`~/'${e.slice(2).replaceAll(`'`,`'"'"'`)}'`:`'${e.replaceAll(`'`,`'"'"'`)}'`:t}function Se(e){return e===void 0?`checking`:!e.enabled||e.status===`disabled`?`disabled`:!e.installed&&e.status===`warning`&&e.auth.status===`unknown`?`checking`:e.installed?e.auth.status===`unauthenticated`?`signIn`:e.status===`ready`?`ready`:`attention`:`install`}var U={checking:0,disabled:1,install:2,attention:3,signIn:4,ready:5};function Ce(e){let t=new Map;for(let n of e??[]){let e=t.get(n.driver);(e===void 0||U[Se(n)]>U[Se(e)])&&t.set(n.driver,n)}return t}var we={claudeAgent:{windows:`irm https://claude.ai/install.ps1 | iex`,posix:`curl -fsSL https://claude.ai/install.sh | bash`},codex:{windows:`irm https://chatgpt.com/codex/install.ps1 | iex`,posix:`curl -fsSL https://chatgpt.com/codex/install.sh | sh`}};function Te(e,t){let n=we[e];return t===`windows`?n.windows:n.posix}function Ee(e,t,n){let r=t.providerInstances[e.instanceId];if(e.driver===`claudeAgent`){let e=ve(r?.config??{});return`${xe(g(e)?e.value.binaryPath:`claude`,`claude`,n)} auth login`}if(e.driver===`codex`){let e=ye(r?.config??{});return`${xe(g(e)?e.value.binaryPath:`codex`,`codex`,n)} login`}return e.driver}var De={disabled:{dot:`bg-muted-foreground/50`},error:{dot:`bg-destructive`},ready:{dot:`bg-success`},warning:{dot:`bg-warning`}};function W(e){if(!e)return{headline:`Checking provider status`,detail:`Waiting for the server to report installation and authentication details.`};if(!e.enabled||e.status===`disabled`)return{headline:`Disabled`,detail:e.message??`This provider is installed but disabled for new sessions in P4 Code.`};if(!e.installed)return{headline:`Not found`,detail:e.message??`CLI not detected on PATH.`};if(e.auth.status===`unauthenticated`){let t=e.auth.label??e.auth.type;return{headline:t?`Not authenticated · ${t}`:`Not authenticated`,detail:e.message??null}}if(e.status===`warning`)return{headline:`Needs attention`,detail:e.message??`The provider is installed, but the server could not fully verify it.`};if(e.status===`error`)return{headline:`Unavailable`,detail:e.message??`The provider failed its startup checks.`};if(e.auth.status===`authenticated`){let t=e.auth.label??e.auth.type;return{headline:t?`Authenticated · ${t}`:`Authenticated`,detail:e.message??null}}return{headline:`Available`,detail:e.message??null}}function Oe(e){if(!e)return null;let t=/^agy_acp_server_(\d{4})(\d{2})(\d{2})_\d+(?:_(\w+))?$/.exec(e);if(t){let[,e,n,r,i]=t;return`${e}-${n}-${r}${i?` ${i}`:``}`}return/^\d/.test(e)?`v${e}`:e}var ke={graceful:`Limited support`,unsupported:`Unsupported version`,broken:`Known broken version`};function Ae(e,t,n=!0){let r=t?.latestVersionStatus===`broken`||t?.latestVersionStatus===`unsupported`;if(n&&t&&(t.status===`graceful`||t.status===`unsupported`||t.status===`broken`)){let n=t.recommendedVersion,i=Oe(n)??t.recommendedRange;return{title:ke[t.status],detail:t.message??(i?`Use ${i} for full support.`:`Update for full support.`),updateCommand:n||r?null:e?.updateCommand??null,emphasis:t.status===`graceful`?`normal`:`strong`,targetVersion:n}}if(!e||e.status===`current`||e.status===`unknown`||r)return null;let i=`Update available`,a=e.latestVersion,o=Oe(a);return{title:i,detail:e.message??(o?`${i}: install ${o}.`:`${i}: install the latest provider version.`),updateCommand:e.updateCommand,emphasis:`normal`,targetVersion:null}}var je=()=>void 0;function Me(e){let t=(0,V.c)(11),[n,r]=(0,B.useState)(!1),a;t[0]===e.provider?a=t[1]:(a=Se(e.provider),t[0]=e.provider,t[1]=a);let o=a,s=e.enabled&&o===`ready`,c=e.provider?.auth.status===`authenticated`,u=o===`checking`,d;t[2]===e.provider?d=t[3]:(d=W(e.provider),t[2]=e.provider,t[3]=d);let f=d,p;return t[4]!==c||t[5]!==u||t[6]!==s||t[7]!==f||t[8]!==e||t[9]!==n?(p=e.mode===`existing`&&e.presentation===`onboarding`?(0,H.jsx)(Ie,{title:e.displayName||e.provider?.displayName||`Codex`,description:s?e.provider?.auth.email?.trim()?(0,H.jsxs)(H.Fragment,{children:[`Signed in as`,` `,(0,H.jsx)(L,{value:e.provider.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`,className:`break-all`}),`.`]}):`Connected with your Codex CLI.`:u?`Checking your Codex CLI...`:e.provider?.installed?f.headline:`Code with your ChatGPT subscription.`,control:s?(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,H.jsx)(i,{className:`size-3.5`}),`Ready`]}):u?(0,H.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Checking...`}):c?(0,H.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:f.headline}):(0,H.jsx)(pe,{size:`sm`,disabled:e.readOnly,onClick:()=>{r(!0),e.onModeChange(`managed`)},children:`Continue with ChatGPT`}),secondaryControl:!c&&!s&&!u?(0,H.jsx)(l,{size:`sm`,variant:`ghost-muted`,onClick:()=>e.onModeChange(`existing`),children:`Use existing CLI`}):null}):e.mode===`existing`?null:e.provider?.setup===void 0?e.presentation===`onboarding`?(0,H.jsx)(Ie,{title:e.displayName||e.provider?.displayName||`Codex`,description:(0,H.jsx)(Fe,{}),control:(0,H.jsx)(l,{size:`sm`,variant:`outline`,className:`min-w-44`,disabled:!0,children:`Open sign-in page`}),secondaryControl:(0,H.jsx)(l,{size:`sm`,variant:`ghost-muted`,disabled:!0,children:`Cancel`})}):(0,H.jsx)(oe,{title:`ChatGPT account`,description:`Preparing sign-in.`}):(0,H.jsx)(Pe,{...e,autoStart:n||e.autoStart===!0,onAutoStartConsumed:()=>{r(!1),e.onAutoStartConsumed?.()}},`${e.environmentId}:${e.instanceId}`),t[4]=c,t[5]=u,t[6]=s,t[7]=f,t[8]=e,t[9]=n,t[10]=p):p=t[10],p}function Ne(e){let t=(0,V.c)(9),{environmentId:n,onClose:r,onAccountCreated:i}=e,a=w(n,h),o;t[0]!==a||t[1]!==n||t[2]!==r?(o=(e,t)=>(0,H.jsx)(Pe,{environmentId:n,instanceId:e,provider:t,mode:`managed`,enabled:!0,readOnly:!a,autoStart:!0,onAutoStartConsumed:je,onModeChange:je,onSignInCancelled:r,allowExistingCli:!1},e),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3];let s;return t[4]!==n||t[5]!==i||t[6]!==r||t[7]!==o?(s=(0,H.jsx)(_e,{environmentId:n,onClose:r,onAccountCreated:i,renderSetup:o}),t[4]=n,t[5]=i,t[6]=r,t[7]=o,t[8]=s):s=t[8],s}function Pe({environmentId:e,instanceId:t,provider:n,enabled:r,readOnly:a,onModeChange:o,autoStart:c,onAutoStartConsumed:d,allowExistingCli:f=!0,presentation:p,displayName:m,onSignInCancelled:h}){let g={environmentId:e,input:{instanceId:t}},_=re(C.providerAuthState(g)),ee=re(C.providerInstallState(g)),[w,ne]=(0,B.useState)(null),E=re(w?C.chatGptHandoffState(w):null),D=E.data?.phase===`auth`?E.data.state:_.data,[O,k]=(0,B.useState)(!1),[A,j]=(0,B.useState)(`chatgpt`),M=D?.methods?.find(e=>e.id===`chatgpt`)?.accountEmail,ae=D?.methods?.find(e=>e.id===A)?.accountEmail,N=D?.methods?.some(e=>e.id.startsWith(`chatgpt-profile:`)),F=D?.interaction?.type===`browser`?D.interaction.url:D?.authorizationUrl,R=ee.data,ce=b(e),de=ce!==null&&P(new URL(ce).hostname),z={reportFailure:!1,reportDefect:!1},V=T(C.startProviderAuth,z),he=T(C.refreshProviders,z),ge=T(C.completeProviderAuth,z),_e=T(C.cancelProviderAuth,z),ve=T(C.logoutProviderAuth,z),ye=T(C.startProviderInstall,z),be=T(C.cancelProviderInstall,z),xe=T(C.chatGptReconnectProfile,z),Se=T(C.chatGptImportProfile,z),U=!w&&(!de||window.desktopBridge?.receiveProviderAuthCallback!==void 0),Ce=U&&!window.desktopBridge?.receiveProviderAuthCallback,we=te(),Te=x(we),Ee=b(we),De=!de&&we&&Te?.connection.phase===`connected`&&Ee&&P(new URL(Ee).hostname)&&(window.desktopBridge!==void 0||P(window.location.hostname))?we:null,W=new URL(window.location.href);W.pathname===`/welcome`&&(W.hash=`agents:${e}`),W.pathname===`/settings/providers`&&W.searchParams.set(`instanceId`,t);let Oe=Ce,ke=(0,B.useId)(),[Ae,je]=(0,B.useState)(!1),[Me,Ne]=(0,B.useState)({flowId:``,value:``}),Pe=Me.flowId===D?.flowId?Me.value:``,[G,Le]=(0,B.useState)(!1),[Re,ze]=(0,B.useState)(null),Be=(0,B.useRef)(!1),[Ve,He]=(0,B.useState)(null),K=(0,B.useRef)(null),Ue=(0,B.useRef)(!1),We=(0,B.useRef)(null),[Ge,Ke]=(0,B.useState)(!1),q=R?.installedVersion!=null,J=n?.auth.status===`authenticated`,qe=q&&R?.source!==`local`&&R?.version!=null&&R.version!==R.installedVersion,Je=Re!==null&&!J&&(D?.phase===`succeeded`||Re===`handoff`);(0,B.useEffect)(()=>{(J||D?.phase===`failed`||D?.phase===`cancelled`)&&ze(null)},[J,D?.phase]),(0,B.useEffect)(()=>{Re&&D?.phase===`succeeded`&&he({environmentId:e,input:{instanceId:t}})},[Re,D?.phase,he,e,t]);let Ye=c&&!Ge,Xe=Re===`sign-in`&&!J&&(D===null||D.phase===`idle`),Ze=Je||Xe||w!==null||D?.phase===`starting`||D?.phase===`waiting`||D?.phase===`verifying`,Y=R?.phase===`downloading`||R?.phase===`extracting`||R?.phase===`verifying`,X=Ye||Ze||G&&!Y,Z=a||!r||G||_.error!==null||ee.error!==null,Q=G||Ze||Y,$=(0,B.useCallback)(async(e,t)=>{if(Be.current)return!1;Be.current=!0,Le(!0),He(null);let n=!1;try{let r=await e();if(r._tag===`Failure`){if(!y(r)){let e=v(r);He(e instanceof Error?e.message:`Codex setup failed. Try again.`)}}else n=!0,t?.(r.value)}catch{He(`Codex setup failed. Try again.`)}return Be.current=!1,Le(!1),n},[]),Qe=(0,B.useId)(),$e=(0,B.useRef)(0),et=(0,B.useRef)(null),[tt,nt]=(0,B.useState)(!1),rt=(0,B.useCallback)(async n=>{let r=await $(()=>Se({environmentId:e,input:{instanceId:t,profile:n}}));r&&(ze(`handoff`),ne(null)),nt(!r)},[$,Se,e,t]);(0,B.useEffect)(()=>{if(!w||E.data?.phase!==`finished`)return;let e=w.input.attemptId;et.current!==e&&(et.current=e,rt(E.data.profile))},[w,E.data,rt]),(0,B.useEffect)(()=>{w&&(E.error||E.data?.phase===`auth`&&[`failed`,`cancelled`].includes(E.data.state.phase))&&(He(E.data?.phase===`auth`?E.data.state.message??`ChatGPT sign-in could not finish. Try again.`:`ChatGPT sign-in on the primary environment was interrupted. Try again.`),ne(null))},[w,E.data,E.error]);let it=(0,B.useCallback)(()=>(ze(null),w?(ne(null),Promise.resolve()):$(()=>_e({environmentId:e,input:{instanceId:t,flowId:D.flowId}}))),[w,$,_e,e,t,D]),at=(0,B.useCallback)(async(n=`chatgpt`)=>{if(Be.current)return;Ue.current=!0,nt(!1),j(n);let r=new URL(window.location.href);if(r.pathname===`/welcome`&&(r.hash=`agents:${e}`),r.pathname===`/settings/providers`&&r.searchParams.set(`instanceId`,t),De){let i=`${Qe}:${++$e.current}`;await $(()=>xe({environmentId:e,input:{instanceId:t,methodId:n}}),n=>ne({environmentId:De,input:{instanceId:t,environmentId:e,attemptId:i,returnUrl:r.toString(),profile:n}}))||(Ue.current=!1)}else await $(()=>V({environmentId:e,input:{instanceId:t,methodId:n,returnUrl:r.toString(),callbackMode:U?`client`:`server`}}),()=>ze(`sign-in`))||(Ue.current=!1)},[e,t,$,V,U,De,xe,Qe]),ot=(0,B.useCallback)(async(n=`chatgpt`)=>{Z||Q||(q&&!qe?await at(n):(K.current=n,await $(()=>ye({environmentId:e,input:{instanceId:t}}))||(K.current=null)))},[Z,Q,q,qe,at,$,ye,e,t]);(0,B.useEffect)(()=>{!c||Ge||Z||Q||R===null||!n?.setup?.canInstall||(Ke(!0),d(),ot())},[c,Ge,Z,Q,R,n?.setup?.canInstall,d,ot]),(0,B.useEffect)(()=>{if(!(!K.current||G||Y)){if(R?.phase===`failed`||R?.phase===`cancelled`)K.current=null;else if(q){let e=K.current;K.current=null,at(e)}}},[G,Y,R?.phase,q,at]);let st=(0,B.useRef)(null),ct=D?.flowId,lt=(0,B.useCallback)(async n=>{try{let r=window.desktopBridge?.receiveProviderAuthCallback;if(r&&U&&ct){if(st.current===n){await S().shell.openExternal(n);return}st.current=n;let i=await r(n);if(st.current!==n)return;st.current=null,await $(()=>ge({environmentId:e,input:{instanceId:t,flowId:ct,callbackUrl:i}}))}else await S().shell.openExternal(n)}catch{He(`Could not finish sign-in on this computer. Try again or paste the redirect URL below.`)}},[U,ct,$,ge,e,t]);(0,B.useEffect)(()=>{if(U&&F&&window.desktopBridge?.cancelProviderAuthCallback)return()=>{st.current===F&&(st.current=null),window.desktopBridge?.cancelProviderAuthCallback?.(F).catch(()=>void 0)}},[U,F]),(0,B.useEffect)(()=>{Ue.current&&D?.phase===`waiting`&&D.flowId&&F&&We.current!==D.flowId&&(We.current=D.flowId,Ue.current=!1,Ce||lt(F))},[D?.phase,D?.flowId,F,lt,Ce]);let ut=R?.phase===`downloading`?`Downloading ${(R.downloadedBytes/1e6).toFixed(1)}${R.totalBytes===null?``:` of ${(R.totalBytes/1e6).toFixed(1)}`} MB.`:R?.phase===`extracting`?`Installing Codex.`:R?.phase===`verifying`?`Checking Codex.`:q?`${R?.source===`local`?`Using your installed Codex`:`Managed by P4 Code`}${R?.installedVersion?` · v${R.installedVersion}`:``}.`:R?.message??`P4 Code downloads and manages Codex for you.`,dt=Je?`Finishing sign-in...`:Y?ut:X||D?.phase===`failed`||D?.phase===`cancelled`?D?.phase===`waiting`&&ae?`Continue as ${ae} on OpenAI.`:D?.message??`Finish signing in in your browser.`:J?n?.auth.email?.trim()?(0,H.jsxs)(H.Fragment,{children:[`Signed in as`,` `,(0,H.jsx)(L,{value:n.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`}),`.`]}):`Signed in with ChatGPT.`:M??`Use your ChatGPT subscription.`,ft=Oe&&F&&D?.flowId&&ue(W.toString())?le({authorizationUrl:F,returnUrl:W.toString(),environmentId:e,instanceId:t,flowId:D.flowId},!1):null,pt=(0,H.jsx)(l,{size:`sm`,variant:Ce?`default`:`outline`,className:p===`onboarding`?`min-w-44`:void 0,disabled:E.data?.phase===`finished`?G||!tt:!F||D?.phase!==`waiting`,onClick:()=>{E.data?.phase===`finished`?rt(E.data.profile):F&<(F)},children:Je?`Finishing sign-in...`:E.data?.phase===`finished`?tt?`Retry connection`:`Finishing sign-in...`:D?.phase===`waiting`?Ce?`Open ChatGPT sign-in`:`Open sign-in page`:p===`onboarding`?`Open sign-in page`:`Signing in...`}),mt=!w&&D?.phase===`waiting`&&F?(0,H.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-xs leading-relaxed text-muted-foreground`,children:[(0,H.jsx)(`p`,{children:`If sign-in doesn't return to P4 Code, paste the URL from the final localhost page.`}),(0,H.jsxs)(`form`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,onSubmit:n=>{if(n.preventDefault(),!D.flowId||!Pe.trim())return;let r=Pe.trim(),i=D.flowId;$(()=>ge({environmentId:e,input:{instanceId:t,flowId:i,callbackUrl:r}})).then(e=>{e&&Ne({flowId:i,value:``})})},children:[(0,H.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,H.jsx)(ie,{"aria-label":`ChatGPT sign-in redirect URL`,type:`password`,autoComplete:`off`,placeholder:`Paste the URL from the sign-in tab`,value:Pe,maxLength:16384,disabled:G||a,onChange:e=>Ne({flowId:D.flowId??``,value:e.target.value})})}),(0,H.jsx)(l,{variant:`outline`,type:`submit`,disabled:G||a||!Pe.trim(),children:`Connect`})]}),Ce?null:(0,H.jsx)(`div`,{children:(0,H.jsxs)(l,{size:`xs`,variant:`ghost-muted`,onClick:()=>void S().shell.openExternal(F),children:[`Try sign-in in your browser`,(0,H.jsx)(s,{className:`size-3.5`})]})}),ft?(0,H.jsxs)(`details`,{children:[(0,H.jsx)(`summary`,{className:`cursor-pointer`,children:`Other ways to connect`}),(0,H.jsx)(l,{className:`mt-2`,size:`sm`,variant:`outline`,render:(0,H.jsx)(`a`,{href:ft}),children:`Use P4 Code desktop for automatic return`})]}):null]}):null,ht=e=>mt?(0,H.jsx)(fe,{open:Ae,children:(0,H.jsx)(se,{children:(0,H.jsx)(`div`,{id:ke,className:u(`w-full border-t border-border/50 pt-3`,e),children:mt})})}):null,gt=Oe?mt:mt?(0,H.jsxs)(`div`,{className:`text-xs leading-relaxed text-muted-foreground`,children:[(0,H.jsx)(Fe,{label:`Having trouble signing in?`,expanded:Ae,controls:ke,onToggle:()=>je(e=>!e)}),ht(`mt-3`)]}):null,_t=(0,H.jsx)(me,{open:O,methods:D?.methods??[],onClose:()=>k(!1),onSelect:e=>{k(!1),ot(D?.methods?.some(t=>t.id===e)?e:`chatgpt-change-account`)}}),vt=D?.phase===`idle`&&D.message?.startsWith(`Signed out locally.`)?D.message:null;if(p===`onboarding`){let r=vt??Ve??(_.error||ee.error?`Could not read setup status. Reconnect and try again.`:R?.phase===`failed`?R.message:null);return(0,H.jsxs)(H.Fragment,{children:[_t,(0,H.jsxs)(Ie,{title:m||n?.displayName||`Codex`,description:Y?ut:J?n?.auth.email?.trim()?(0,H.jsxs)(H.Fragment,{children:[`Signed in as`,` `,(0,H.jsx)(L,{value:n.auth.email.trim(),ariaLabel:`Toggle account email visibility`,revealTooltip:`Click to reveal email`,hideTooltip:`Click to hide email`,className:`break-all`}),`.`]}):`Connected to ChatGPT.`:mt&&!Oe?(0,H.jsx)(Fe,{expanded:Ae,controls:ke,onToggle:()=>je(e=>!e)}):Ye||Xe||D?.phase===`starting`||D?.phase===`waiting`||G&&!Y?(0,H.jsx)(Fe,{}):X||D?.phase===`failed`||D?.phase===`cancelled`?dt:`Code with your ChatGPT subscription.`,control:J&&!Q?(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-xs font-medium text-success-foreground`,children:[(0,H.jsx)(i,{className:`size-3.5`}),`Ready`]}):X?pt:(0,H.jsx)(pe,{size:`sm`,disabled:Z||Q||(q?!n?.setup?.canAuthenticate:!n?.setup?.canInstall),onClick:()=>{N?k(!0):ot()},children:Y||G?`Setting up...`:N?`Reconnect account`:`Continue with ChatGPT`}),secondaryControl:X&&!Je||Y?(0,H.jsx)(l,{size:`sm`,variant:`ghost-muted`,disabled:G||a,onClick:()=>{Ue.current=!1,K.current=null,w||X&&D?.flowId?it():R?.operationId&&$(()=>be({environmentId:e,input:{instanceId:t,operationId:R.operationId}}))},children:`Cancel`}):!X&&!J&&N?(0,H.jsx)(l,{size:`sm`,variant:`ghost-muted`,disabled:Z||Q,onClick:()=>void ot(`chatgpt-change-account`),children:`Use a different account`}):!X&&!J&&f?(0,H.jsx)(l,{size:`sm`,variant:`ghost-muted`,disabled:a||Q,onClick:()=>o(`existing`),children:`Use existing CLI`}):null,children:[Oe?gt:ht(),r?(0,H.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:r}):null]})]})}return(0,H.jsxs)(`section`,{"aria-label":`Codex setup`,className:`divide-y divide-border/50`,children:[_t,(0,H.jsx)(oe,{title:`ChatGPT account`,description:dt,control:(0,H.jsx)(`div`,{className:`flex max-w-88 flex-wrap items-center justify-end gap-2`,children:X?(0,H.jsxs)(H.Fragment,{children:[pt,!Je&&(0,H.jsx)(l,{size:`sm`,variant:`ghost`,disabled:G||a,onClick:()=>{(w||D?.flowId)&&(Ue.current=!1,it(),h?.())},children:`Cancel`})]}):Y?(0,H.jsx)(l,{size:`sm`,variant:`ghost`,disabled:G||a,onClick:()=>{R?.operationId&&(K.current=null,$(()=>be({environmentId:e,input:{instanceId:t,operationId:R.operationId}})))},children:`Cancel`}):J?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(l,{size:`sm`,variant:`outline`,disabled:Z||Q,onClick:()=>k(!0),children:`Change account`}),(0,H.jsx)(l,{size:`sm`,variant:`ghost`,disabled:Z||Q,onClick:()=>void $(()=>ve(g)),children:`Disconnect`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(pe,{size:`sm`,disabled:Z||Q||(q?!n?.setup?.canAuthenticate:!n?.setup?.canInstall),onClick:()=>{N?k(!0):ot()},children:G?`Setting up...`:N?`Reconnect account`:`Continue with ChatGPT`}),N?(0,H.jsx)(l,{size:`sm`,variant:`ghost`,disabled:Z||Q,onClick:()=>void ot(`chatgpt-change-account`),children:`Use a different account`}):null,f?(0,H.jsx)(l,{size:`sm`,variant:`ghost`,disabled:a||Q,onClick:()=>o(`existing`),children:`Use existing CLI`}):null]})})}),J?(0,H.jsx)(`div`,{className:`flex justify-end px-3 py-1 sm:px-4`,children:(0,H.jsx)(I,{})}):null,vt?(0,H.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-muted-foreground sm:px-4`,children:vt}):null,gt?(0,H.jsx)(`div`,{className:`px-3 py-3 sm:px-4`,children:gt}):null,Ve||_.error||ee.error||R?.phase===`failed`?(0,H.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-destructive sm:px-4`,children:Ve??(R?.phase===`failed`?R.message:`Could not read Codex setup status. Reconnect and try again.`)}):null]})}function G(e){let t=(0,V.c)(20),{environmentId:n,instanceId:r,provider:i}=e,a;t[0]!==n||t[1]!==r?(a=C.providerInstallState({environmentId:n,input:{instanceId:r}}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o=re(a),s=o.data?.executablePath??``,c=o.error?`Could not read runtime path`:`Not installed`,l;t[3]!==s||t[4]!==c?(l=(0,H.jsx)(oe,{title:`Binary path`,description:`Selected by P4 Code.`,control:(0,H.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,H.jsx)(ie,{"aria-label":`Codex binary path`,value:s,title:s,placeholder:c,disabled:!0})})}),t[3]=s,t[4]=c,t[5]=l):l=t[5];let u=i?.runtimePaths?.homePath??``,d=i?.runtimePaths?.homePath,f;t[6]!==u||t[7]!==d?(f=(0,H.jsx)(oe,{title:`CODEX_HOME path`,description:`Shared Codex config, sessions, and state.`,control:(0,H.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,H.jsx)(ie,{"aria-label":`Codex home path`,value:u,title:d,placeholder:`Unavailable`,disabled:!0})})}),t[6]=u,t[7]=d,t[8]=f):f=t[8];let p=i?.runtimePaths?.shadowHomePath?`Account-specific home sharing the Codex state above.`:`This instance uses the shared Codex home directly.`,m=i?.runtimePaths?.shadowHomePath??``,h=i?.runtimePaths?.shadowHomePath??void 0,g=i?.runtimePaths?`Not used`:`Unavailable`,_;t[9]!==g||t[10]!==m||t[11]!==h?(_=(0,H.jsx)(`div`,{className:`w-full sm:w-80`,children:(0,H.jsx)(ie,{"aria-label":`Codex shadow home path`,value:m,title:h,placeholder:g,disabled:!0})}),t[9]=g,t[10]=m,t[11]=h,t[12]=_):_=t[12];let v;t[13]!==_||t[14]!==p?(v=(0,H.jsx)(oe,{title:`Shadow home path`,description:p,control:_}),t[13]=_,t[14]=p,t[15]=v):v=t[15];let y;return t[16]!==v||t[17]!==l||t[18]!==f?(y=(0,H.jsxs)(H.Fragment,{children:[l,f,v]}),t[16]=v,t[17]=l,t[18]=f,t[19]=y):y=t[19],y}function Fe(e){let t=(0,V.c)(10),{label:n,expanded:r,controls:i,onToggle:o}=e,s=n===void 0?`Complete sign-in in your browser.`:n,c=r!==void 0&&r;if(!o){let e;return t[0]===s?e=t[1]:(e=(0,H.jsx)(`div`,{className:`leading-relaxed`,children:s}),t[0]=s,t[1]=e),e}let l=`size-3 shrink-0 ${c?`rotate-90`:``}`,u;t[2]===l?u=t[3]:(u=(0,H.jsx)(a,{"aria-hidden":!0,className:l}),t[2]=l,t[3]=u);let d;return t[4]!==i||t[5]!==c||t[6]!==s||t[7]!==o||t[8]!==u?(d=(0,H.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 rounded-sm text-left leading-relaxed outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring`,"aria-label":`Having trouble signing in?`,"aria-expanded":c,"aria-controls":i,onClick:o,children:[s,u]}),t[4]=i,t[5]=c,t[6]=s,t[7]=o,t[8]=u,t[9]=d):d=t[9],d}function Ie(e){let t=(0,V.c)(21),{title:n,description:r,control:i,secondaryControl:a,children:o}=e,s;t[0]===o?s=t[1]:(s=B.Children.toArray(o),t[0]=o,t[1]=s);let c=s,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,H.jsx)(N,{className:`size-5 shrink-0 fill-foreground`}),t[2]=l):l=t[2];let u;t[3]===n?u=t[4]:(u=(0,H.jsx)(`h3`,{className:`text-sm font-medium`,children:n}),t[3]=n,t[4]=u);let d;t[5]===r?d=t[6]:(d=(0,H.jsx)(`div`,{className:`mt-0.5 text-xs leading-relaxed text-muted-foreground`,children:r}),t[5]=r,t[6]=d);let f;t[7]!==u||t[8]!==d?(f=(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9];let p;t[10]!==i||t[11]!==a?(p=i||a?(0,H.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-2 has-[button]:w-full has-[button]:flex-col-reverse has-[button]:items-end sm:has-[button]:w-auto sm:has-[button]:flex-row sm:has-[button]:items-center`,children:[a,i]}):null,t[10]=i,t[11]=a,t[12]=p):p=t[12];let m;t[13]!==f||t[14]!==p?(m=(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[l,f,p]}),t[13]=f,t[14]=p,t[15]=m):m=t[15];let h;t[16]===c?h=t[17]:(h=c.length>0?(0,H.jsx)(`div`,{className:`ml-8 mt-2 flex flex-wrap items-center gap-2`,children:c}):null,t[16]=c,t[17]=h);let g;return t[18]!==m||t[19]!==h?(g=(0,H.jsxs)(`div`,{className:`rounded-lg border border-border bg-background px-4 py-4`,children:[m,h]}),t[18]=m,t[19]=h,t[20]=g):g=t[20],g}function Le(e){return typeof e==`object`&&e&&`setupMode`in e&&e.setupMode===`managed`?`managed`:`existing`}export{De as a,Oe as c,Ee as d,Ce as f,Me as i,Se as l,Ne as n,W as o,pe as p,G as r,Ae as s,Le as t,Te as u};
|
|
2
|
+
//# sourceMappingURL=CodexSetupSection.logic-C4KEUUA1.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{Aa as r,Da as i,Do as a,Ia as o,Ka as s,Oa as c,Oo as l,Pa as u,Qa as d,Wa as f,Ya as p,bo as m,ha as h,ho as g,ja as _,pa as v,qa as y}from"./utils-DsOiwDNN.js";import{a as b,f as x,n as S,u as C}from"./useRender-BP5vR6yH.js";var w=e(t());function T(e){let{open:t,defaultOpen:n,onOpenChange:i,disabled:a}=e,[s,c]=d({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:l,setMounted:f,transitionStatus:p}=r(s,!0,!0),h=o(),[g,_]=w.useState(),v=g??h,b=y(e=>{let t=!s,n=u(m,e.nativeEvent);i(t,n),!n.isCanceled&&c(t)});return w.useMemo(()=>({disabled:a,handleTrigger:b,mounted:l,open:s,panelId:v,setMounted:f,setOpen:c,setPanelIdState:_,transitionStatus:p}),[a,b,l,s,v,f,c,_,p])}var E=w.createContext(void 0);function D(){let e=w.useContext(E);if(e===void 0)throw Error(x(15));return e}var O=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=a.startingStyle]=`startingStyle`,e[e.endingStyle=a.endingStyle]=`endingStyle`,e}({}),k=function(e){return e.panelOpen=`data-panel-open`,e}({}),A={[O.open]:``},j={[O.closed]:``},M={open(e){return e?{[k.panelOpen]:``}:null}},N={open(e){return e?A:j},...l},P=e(n()),F=w.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=y(o),d=T({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=w.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=w.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=S(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:N});return(0,P.jsx)(E.Provider,{value:p,children:m})}),I={...M,...l},L=w.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=D(),{className:s,disabled:c=o,id:l,render:u,nativeButton:d=!0,style:p,...m}=e,{getButtonProps:h,buttonRef:g}=f({disabled:c,focusableWhenDisabled:!0,native:d});return S(`button`,e,{state:a,ref:[t,g],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},m,h],stateAttributesMapping:I})}),R={height:void 0,width:void 0};function z(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:a,mounted:o,onOpenChange:l,open:d,setMounted:f,setOpen:p,transitionStatus:m}=e,b=w.useRef(null),x=w.useRef(null),[S,T]=w.useState(R),E=w.useRef(R),D=w.useRef(!1),k=w.useRef(d),A=w.useRef(!1),[j,M]=w.useState(!1),N=w.useRef(null),P=C(t,b),F=v({mounted:o,open:d}),I=c(b,!1,!1),L=!d&&!o,z=j?`idle`:m,H=d&&(k.current||A.current),G=!d&&o&&x.current===`css-animation`&&S.height===void 0&&S.width===void 0?E.current:S,K=n&&L&&x.current!==`css-animation`,q=y((e,t=!0)=>{t&&(E.current=e),T(e)}),J=y(()=>{N.current?.(),N.current=null}),Y=y(e=>{J(),N.current=()=>{N.current=null,e()}}),X=y(()=>{d&&o&&x.current===`css-animation`&&(A.current=!0)});s(()=>{j&&m!==`starting`&&M(!1)},[j,m]),w.useEffect(()=>()=>{X(),J()},[X,J]),s(()=>{let e=b.current;if(!e)return;!d&&N.current&&J();let t=V(e,H);if(x.current=t,d&&m===`idle`&&k.current&&t===`css-animation`){E.current=B(e);return}if(d&&m===`starting`){let n=D.current;if(D.current=!1,t===`none`){q(B(e)),M(!0);return}if(t===`css-transition`){let t=W(e);if(q(B(e)),!n)return t;let r=U(e,`transition-duration`,`0s`);return Y(r),M(!0),t}if(t===`css-animation`){if(q(B(e)),!n){U(e,`animation-name`,`none`)();return}let t=U(e,`animation-name`,`none`),r=U(e,`animation-duration`,`0s`);t(),Y(r),M(!0);return}}if(!d&&o&&(m===`idle`||m===`starting`)){if(t===`none`){q(R,!1),f(!1);return}t===`css-animation`&&(k.current=!1,A.current=!1),q(B(e));return}if(m!==`ending`)return;if(t===`none`){f(!1);return}let n=B(e);(n.height??0)>0||(n.width??0)>0?(q(n),t===`css-animation`&&U(e,`animation-name`,`none`)()):f(!1)},[o,d,J,q,f,Y,H,m]),i({enabled:d&&o&&z===`idle`,open:!0,ref:b,onComplete(){d&&q(R,!1)}}),w.useEffect(()=>{if(d||!o||z!==`ending`||!b.current)return;let e=new AbortController,t=-1;function n(){F.current.open||(f(!1),q(R,!1))}return t=_.request(()=>{e.signal.aborted||I(n,e.signal)}),()=>{_.cancel(t),e.abort()}},[F,o,d,z,I,q,f]),s(()=>{let e=b.current;e&&n&&L&&e.setAttribute(`hidden`,`until-found`)},[L,n]),w.useEffect(function(){let e=b.current;if(!e)return;function t(e){D.current=!0,p(!0),l(!0,u(g,e))}return h(e,`beforematch`,t)},[l,p]);let Z=a||n||o||d;return{height:G.height,props:{...K?{[O.startingStyle]:``}:void 0,hidden:L,id:r},ref:P,shouldPreventOpenAnimation:H,shouldRender:Z,transitionStatus:z,width:G.width}}function B(e){return{height:e.scrollHeight,width:e.scrollWidth}}function V(e,t=!1){let n=p(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&H(n.animationDuration),i=H(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function H(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function U(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function W(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=_.request(n);return()=>{_.cancel(r),n()}}var G=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),K=w.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:c,...l}=e,{mounted:u,onOpenChange:d,open:f,panelId:p,setMounted:m,setPanelIdState:h,setOpen:g,state:_,transitionStatus:v}=D(),y=r??!1,x=i??!1;s(()=>{if(o)return h(o),()=>{h(void 0)}},[o,h]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:O,transitionStatus:k,width:A}=z({externalRef:t,hiddenUntilFound:y,id:p,keepMounted:x,mounted:u,onOpenChange:d,open:f,setMounted:m,setOpen:g,transitionStatus:v}),j={..._,transitionStatus:k},M=b(c,j),P=S(`div`,{...e,style:void 0},{state:j,ref:T,props:[w,{style:{[G.collapsiblePanelHeight]:C===void 0?`auto`:`${C}px`,[G.collapsiblePanelWidth]:A===void 0?`auto`:`${A}px`}},l,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:N});return O?P:null});export{L as n,F as r,K as t};
|
|
2
|
+
//# sourceMappingURL=CollapsiblePanel-vHsKk5wM.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{$a as r,Aa as i,Ai as a,Ba as o,Bi as s,Bn as c,Ca as l,Da as u,Dn as d,Eo as ee,Er as f,Fa as p,Fn as te,Gi as m,Gn as h,Gr as g,Ha as _,Hn as v,Hr as y,Ia as b,Ii as x,In as S,Ir as C,Ka as w,Ln as ne,Lr as T,Mn as E,On as D,Oo as O,Or as re,Pa as k,Pn as ie,Pr as ae,Qa as oe,Ra as se,Ri as A,Rn as ce,Rr as le,Sr as ue,Ta as de,Tn as fe,To as j,Un as pe,Va as M,Vn as me,Vr as he,Wa as ge,Wn as _e,Yi as ve,ba as ye,co as be,da as xe,di as Se,do as Ce,eo as N,fa as we,fo as Te,gi as Ee,ho as P,ji as F,jn as I,ka as De,kr as Oe,lo as ke,mo as Ae,pa as je,qa as L,ro as Me,ua as Ne,ui as Pe,wo as Fe,xi as Ie,ya as R,za as Le,zi as Re,zn as ze,zr as Be}from"./utils-DsOiwDNN.js";import{c as Ve,d as He,f as Ue,i as We,n as Ge,o as Ke,s as qe,u as Je}from"./useRender-BP5vR6yH.js";import{t as Ye}from"./useRegisterFieldControl-Byb-EJOb.js";import{t as Xe}from"./FormContext-CXpUoAJn.js";var z=e(t()),Ze=z.createContext(void 0),Qe=z.createContext(void 0),$e=z.createContext(void 0),et=z.createContext(``);function B(){let e=z.useContext(Ze);if(!e)throw Error(Ue(22));return e}function tt(){let e=z.useContext(Qe);if(!e)throw Error(Ue(23));return e}function nt(){let e=z.useContext($e);if(!e)throw Error(Ue(24));return e}function rt(){return z.useContext(et)}var V={id:x(e=>e.id),labelId:x(e=>e.labelId),items:x(e=>e.items),selectedValue:x(e=>e.selectedValue),hasSelectionChips:x(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:x(e=>{let{selectedValue:t,selectionMode:n}=e;return t==null?!1:n===`multiple`&&Array.isArray(t)?t.length>0:!0}),hasNullItemLabel:x((e,t)=>t?d(e.items):!1),open:x(e=>e.open),mounted:x(e=>e.mounted),forceMounted:x(e=>e.forceMounted),inline:x(e=>e.inline),activeIndex:x(e=>e.activeIndex),selectedIndex:x(e=>e.selectedIndex),isActive:x((e,t)=>e.activeIndex===t),isSelected:x((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>ie(t,e,n)):ie(t,r,n)}),transitionStatus:x(e=>e.transitionStatus),popupProps:x(e=>e.popupProps),inputProps:x(e=>e.inputProps),triggerProps:x(e=>e.triggerProps),itemProps:x(e=>e.itemProps),positionerElement:x(e=>e.positionerElement),listElement:x(e=>e.listElement),triggerElement:x(e=>e.triggerElement),inputElement:x(e=>e.inputElement),inputGroupElement:x(e=>e.inputGroupElement),popupSide:x(e=>e.popupSide),openMethod:x(e=>e.openMethod),inputInsidePopup:x(e=>e.inputInsidePopup),inputOwnsFormValue:x(e=>e.inputOwnsFormValue),selectionMode:x(e=>e.selectionMode),name:x(e=>e.name),form:x(e=>e.form),disabled:x(e=>e.disabled),readOnly:x(e=>e.readOnly),required:x(e=>e.required),grid:x(e=>e.grid),virtualized:x(e=>e.virtualized),itemToStringLabel:x(e=>e.itemToStringLabel),isItemEqualToValue:x(e=>e.isItemEqualToValue),modal:x(e=>e.modal),autoHighlight:x(e=>e.autoHighlight),submitOnItemClick:x(e=>e.submitOnItemClick)};function it(e,t){return(n,r)=>{if(n==null)return!1;let i=I(n,t);return e.contains(i,r)}}function at(e,t,n){return(r,i)=>{if(r==null)return!1;if(!i)return!0;let a=I(r,t),o=n==null?``:I(n,t);return o&&e.contains(o,i)&&o.length===i.length?!0:e.contains(a,i)}}var H=new Map;function ot(e={}){let t={usage:`search`,sensitivity:`base`,ignorePunctuation:!0,...e},n=`${st(e.locale)}|${JSON.stringify(t)}`,r=H.get(n);if(r)return r;let i=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=I(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(i.compare(r.slice(e,e+t.length),t)===0)return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=I(e,n);return i.compare(r.slice(0,t.length),t)===0},endsWith(e,t,n){if(!t)return!0;let r=I(e,n),a=t.length;return r.length>=a&&i.compare(r.slice(r.length-a),t)===0}};return H.set(n,a),a}function st(e){return Array.isArray(e)?e.map(e=>st(e)).join(`,`):e==null?``:String(e)}var ct=ot;function lt(e={}){let{multiple:t=!1,value:n,...r}=e,i=ot(r),a=z.useCallback((e,r,a)=>t?it(i,a)(e,r):at(i,a,n)(e,r),[i,n,t]);return z.useMemo(()=>({contains:a,startsWith:i.startsWith,endsWith:i.endsWith}),[a,i])}var ut=Symbol(`none`),dt={value:ut,index:-1},U=e(n());function ft(e){let{id:t,onOpenChangeComplete:n,defaultSelectedValue:r=null,selectedValue:o,onSelectedValueChange:s,defaultInputValue:c,inputValue:l,open:d,defaultOpen:ee=!1,selectionMode:m=`none`,onItemHighlighted:h,name:g,form:_,disabled:v=!1,readOnly:y=!1,required:b=!1,inputRef:x,grid:C=!1,items:T,filteredItems:O,filter:ae,openOnInputClick:se=!0,autoHighlight:le=!1,keepHighlight:ue=!1,highlightItemOnHover:de=!0,loopFocus:fe=!0,itemToStringLabel:j,itemToStringValue:M,isItemEqualToValue:me=te,virtualized:ge=!1,inline:_e=!1,fillInputOnItemPress:ve=!0,modal:be=!1,limit:N=-1,autoComplete:we=`list`,formAutoComplete:De,locale:Ae,submitOnItemClick:Me=!1}=e,{clearErrors:Pe}=Xe(),{setDirty:Fe,validityData:Le,shouldValidateOnChange:Be,setFilled:Ue,name:Ge,disabled:B,setTouched:tt,setFocused:nt,validationMode:rt,validation:H}=pe(),ot=he(),st=ze({id:t}),lt=ct({locale:Ae}),[ft,pt]=z.useState(!1),[mt,ht]=z.useState(null),gt=z.useRef([]),_t=z.useRef([]),vt=z.useRef(null),W=z.useRef(null),yt=z.useRef(null),bt=z.useRef(null),xt=z.useRef(null),St=z.useRef(!0),Ct=z.useRef(!1),wt=z.useRef(null),Tt=z.useRef(null),Et=z.useRef(null),Dt=z.useRef(dt),Ot=z.useRef(null),kt=z.useRef([]),At=z.useRef([]),jt=B||v,Mt=Ge??g,G=m===`multiple`,K=m===`single`,Nt=l!==void 0||c!==void 0,Pt=T!==void 0,Ft=O!==void 0,q;q=le===`always`?`always`:le?`input-change`:!1;let[J,It]=oe({controlled:o,default:G?r??Ke:r,name:`Combobox`,state:`selectedValue`}),Lt=z.useMemo(()=>ae===null?()=>!0:ae===void 0?K&&!ft?at(lt,j,J):it(lt,j):ae,[ae,K,J,ft,lt,j]),Rt=He(()=>Nt?c??``:K?I(J,j):``).current,[Y,zt]=oe({controlled:l,default:Rt,name:`Combobox`,state:`inputValue`}),[X,Bt]=oe({controlled:d,default:ee,name:`Combobox`,state:`open`}),Vt=D(T),Z=mt??(Y===``?``:String(Y).trim()),Ht=K?I(J,j):``,Ut=K&&!ft&&Z!==``&&Ht!==``&&Ht.length===Z.length&<.contains(Ht,Z),Wt=Ut?``:Z,Gt=Pt&&Ft&&Ut,Kt=z.useMemo(()=>T?Vt?T.flatMap(e=>e.items):T:Ke,[T,Vt]),qt=z.useMemo(()=>{if(O&&!Gt)return O;if(!T)return Ke;if(Vt){let e=T,t=[],n=0;for(let r of e){if(N>-1&&n>=N)break;let e=Wt===``?r.items:r.items.filter(e=>Lt(e,Wt,j));if(e.length===0)continue;let i=N>-1?N-n:1/0,a=e.slice(0,i);if(a.length>0){let e={...r,items:a};t.push(e),n+=a.length}}return t}if(Wt===``)return N>-1?Kt.slice(0,N):Kt;let e=[];for(let t of Kt){if(N>-1&&e.length>=N)break;Lt(t,Wt,j)&&e.push(t)}return e},[O,Gt,T,Vt,Wt,N,Lt,j,Kt]),Jt=z.useMemo(()=>Vt?qt.flatMap(e=>e.items):qt,[qt,Vt]),Q=He(()=>new a({id:st,labelId:void 0,selectedValue:J,open:X,filter:Lt,query:Z,items:T,selectionMode:m,listRef:gt,labelsRef:_t,popupRef:vt,emptyRef:xt,inputRef:W,startDismissRef:yt,endDismissRef:bt,keyboardActiveRef:St,chipsContainerRef:wt,clearRef:Tt,valuesRef:kt,allValuesRef:At,selectionEventRef:Et,name:Mt,form:_,disabled:jt,readOnly:y,required:b,grid:C,isGrouped:Vt,virtualized:ge,openOnInputClick:se,itemToStringLabel:j,isItemEqualToValue:me,modal:be,autoHighlight:q,submitOnItemClick:Me,hasInputValue:Nt,mounted:!1,forceMounted:!1,transitionStatus:`idle`,inline:_e,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},itemProps:qe,positionerElement:null,listElement:null,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:m===`none`,onOpenChangeComplete:n||Ve,setOpen:Ve,setInputValue:Ve,setSelectedValue:Ve,setIndices:Ve,onItemHighlighted:Ve,handleSelection:Ve,forceMount:Ve,requestSubmit:Ve})).current,Yt=m===`none`?Y:J,Xt=z.useMemo(()=>m===`none`?Yt:Array.isArray(J)?J.map(e=>E(e,M)):E(J,M),[Yt,M,m,J]),Zt=L(h),Qt=L(n),$t=F(Q,V.activeIndex),en=F(Q,V.selectedIndex),tn=F(Q,V.positionerElement),nn=F(Q,V.listElement),rn=F(Q,V.triggerElement),an=F(Q,V.inputElement),on=F(Q,V.inputGroupElement),$=F(Q,V.inline),sn=F(Q,V.inputInsidePopup),cn=F(Q,V.inputOwnsFormValue),ln=je(rn),{mounted:un,setMounted:dn,transitionStatus:fn}=i(X),{openMethod:pn,triggerProps:mn}=f(X),hn=L(()=>Xt);Ye(sn?ln:W,st,Yt,hn);let gn=L(()=>{T?_t.current=Jt.map(e=>I(e,j)):Q.set(`forceMounted`,!0)}),_n=z.useRef(J);w(()=>{J!==_n.current&&gn()},[gn,J]);let vn=L(e=>{Q.update(e);let t=e.type||`none`;if(e.activeIndex!==void 0){if(e.activeIndex===null)Dt.current!==dt&&(Dt.current=dt,Zt(void 0,p(t,void 0,{index:-1})));else{let n=kt.current[e.activeIndex];Dt.current={value:n,index:e.activeIndex},Zt(n,p(t,void 0,{index:e.activeIndex}))}}}),yn=L((t,n)=>{if(Ct.current=n.reason===ke,e.onInputValueChange?.(t,n),!n.isCanceled){if(n.reason===`input-change`){let e=n.event,r=e.inputType;if(e.type===`compositionend`||r!=null&&r!==``&&r!==`insertReplacementText`){let e=t.trim()!==``;e&&pt(!0),Ot.current={hasQuery:e},e&&q&&Q.state.activeIndex==null&&Q.set(`activeIndex`,0)}}zt(t)}}),bn=L((t,n)=>{if(X!==t&&(n.reason===`escape-key`&&Pt&&Jt.length===0&&!Q.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&G&&sn&&!$&&mt!==null&&(pt(!1),ht(null),Y!==``&&yn(``,k(ke,n.event))),!t&&ft&&(K?($||ht(Z),Z===``&&pt(!1)):G&&($||ht(Z),sn&&vn({activeIndex:null}),(!sn||$)&&yn(``,k(ke,n.event)))),Bt(t),!t&&sn&&(n.reason===`focus-out`||n.reason===`outside-press`)&&(tt(!0),nt(!1),rt===`onBlur`)))){let e=m===`none`?Y:J;H.commit(e)}}),xn=L((e,t)=>{s?.(e,t),!t.isCanceled&&(It(e),(m===`none`&&vt.current&&ve||K&&!Q.state.inputInsidePopup)&&yn(I(e,j),k(t.reason,t.event)),K&&e!=null&&t.reason!==`input-change`&&ft&&!$&&ht(Z))}),Sn=L((e,t)=>{let n=t;if(n===void 0){if($t===null)return;n=kt.current[$t]}let r=ye(e),i=Et.current??e;Et.current=null;let a=k(Te,i),o=r?.closest(`a`)?.getAttribute(`href`);if(o)o.startsWith(`#`)&&bn(!1,a);else if(G){let e=Array.isArray(J)?J:[],t=ce(e,n,Q.state.isItemEqualToValue)?ne(e,n,Q.state.isItemEqualToValue):[...e,n];if(xn(t,a),!(W.current&&W.current.value.trim()!==``))return;Q.state.inputInsidePopup?yn(``,k(ke,a.event)):bn(!1,a)}else xn(n,a),bn(!1,a)}),Cn=L(()=>{if(!Q.state.submitOnItemClick)return;let e=H.inputRef.current?.form??Q.state.inputElement?.form;e&&typeof e.requestSubmit==`function`&&e.requestSubmit()}),wn=L(()=>{if(dn(!1),Qt?.(!1),pt(!1),ht(null),vn(m===`none`?{activeIndex:null,selectedIndex:null}:{activeIndex:null}),G&&W.current&&W.current.value!==``&&!Ct.current&&yn(``,k(ke)),K){if(Q.state.inputInsidePopup)W.current&&W.current.value!==``&&yn(``,k(ke));else{let e=I(J,j);W.current&&W.current.value!==e&&yn(e,k(e===``?ke:P))}}}),Tn=z.useMemo(()=>$&&tn?{current:tn.closest(`[role="dialog"]`)}:vt,[$,tn]);u({enabled:!e.actionsRef,open:X,ref:Tn,onComplete(){X||wn()}}),z.useImperativeHandle(e.actionsRef,()=>({unmount:wn}),[wn]),w(function(){if(X||m===`none`)return;let e=T?Kt:At.current;if(G){let t=Array.isArray(J)?J:[],n=t[t.length-1],r=S(e,n,me);vn({selectedIndex:r===-1?null:r})}else{let t=S(e,J,me);vn({selectedIndex:t===-1?null:t})}},[X,J,T,m,Kt,G,me,vn]),w(()=>{T&&(kt.current=Jt,gt.current.length=Jt.length)},[T,Jt]),w(()=>{let e=Ot.current;if(e&&(e.hasQuery?q&&Q.set(`activeIndex`,0):q===`always`&&Q.set(`activeIndex`,0),Ot.current=null),!X&&!$)return;let t=Pt||Ft?Jt:kt.current,n=Q.state.activeIndex;if(n==null){if(q===`always`&&t.length>0){Q.set(`activeIndex`,0);return}Dt.current!==dt&&(Dt.current=dt,Q.state.onItemHighlighted(void 0,p(P,void 0,{index:-1})));return}if(n>=t.length){Dt.current!==dt&&(Dt.current=dt,Q.state.onItemHighlighted(void 0,p(P,void 0,{index:-1}))),Q.set(`activeIndex`,null);return}let r=t[n],i=Dt.current.value,a=i!==ut&&ie(r,i,Q.state.isItemEqualToValue);Dt.current.index===n&&a||(Dt.current={value:r,index:n},Q.state.onItemHighlighted(r,p(P,void 0,{index:n})))},[$t,q,Ft,Pt,Jt,$,X,Q]),w(()=>{Ue(m===`none`?String(Y)!==``:G?Array.isArray(J)&&J.length>0:J!=null)},[Ue,m,Y,J,G]),z.useEffect(()=>{Pt&&q&&Jt.length===0&&vn({activeIndex:null})},[Pt,q,Jt.length,vn]),re(Z,()=>{X&&Z!==``&&Z!==String(Rt)&&pt(!0)}),re(J,()=>{if(m!==`none`&&(Pe(Mt),Fe(J!==Le.initialValue),Be()?H.commit(J):H.commit(J,!0),K&&!Nt&&!sn)){let e=I(J,j);Y!==e&&yn(e,k(P))}}),re(Y,()=>{m===`none`&&(Pe(Mt),Fe(Y!==Le.initialValue),Be()?H.commit(Y):H.commit(Y,!0))}),re(T,()=>{if(!K||Nt||sn||ft)return;let e=I(J,j);Y!==e&&yn(e,k(P))});let En=Ee({open:$?!0:X,onOpenChange:bn,elements:{reference:sn?rn:an,floating:tn}}),Dn,On;$||(Dn=C?`grid`:`listbox`,On=X?`true`:`false`);let kn=z.useMemo(()=>{let e=an?.tagName===`INPUT`,t=an==null||e,n=t||X,r=t?{autoComplete:`off`,spellCheck:`false`,autoCorrect:`off`,autoCapitalize:`none`}:{};return n&&(r.role=`combobox`,r[`aria-expanded`]=On,r[`aria-haspopup`]=Dn,r[`aria-controls`]=X?nn?.id:void 0,r[`aria-autocomplete`]=we),{reference:r,floating:{role:`presentation`}}},[an,X,On,Dn,nn?.id,we]),An=Re(En,{enabled:!y&&!jt&&se,event:`mousedown-only`,toggle:!1,touchOpenDelay:sn?0:100,reason:Ce}),jn=A(En,{enabled:!y&&!jt&&!$,outsidePressEvent:{mouse:`sloppy`,touch:`intentional`},bubbles:$?!0:void 0,outsidePress(e){let t=ye(e);return!R(rn,t)&&!R(Tt.current,t)&&!R(wt.current,t)&&!R(on,t)}}),Mn=Se(En,{enabled:!y&&!jt,id:st,listRef:gt,activeIndex:$t,selectedIndex:en,virtual:!0,loopFocus:fe,allowEscape:fe&&!q,focusItemOnOpen:ft||m===`none`&&!q?!1:`auto`,focusItemOnHover:de,resetOnPointerLeave:!ue,cols:C?2:1,orientation:C?`horizontal`:void 0,rtl:ot===`rtl`,disabledIndices:Ke,onNavigate(e,t){(t||X)&&fn!==`ending`&&vn(t?{activeIndex:e,type:St.current?`keyboard`:`pointer`}:{activeIndex:e})}}),Nn=z.useMemo(()=>We(Mn.reference,jn.reference,An.reference,kn.reference),[Mn.reference,jn.reference,An.reference,kn.reference]),Pn=z.useMemo(()=>We(Ie,Mn.floating,jn.floating,kn.floating),[Mn.floating,jn.floating,kn.floating]),Fn=z.useMemo(()=>{let e=Mn.item;return e?{...e,onFocus:void 0}:qe},[Mn.item]);Oe(()=>{Q.update({inline:_e,popupProps:Pn,inputProps:Nn,triggerProps:mn,itemProps:Fn,setOpen:bn,setInputValue:yn,setSelectedValue:xn,setIndices:vn,onItemHighlighted:Zt,handleSelection:Sn,forceMount:gn,requestSubmit:Cn})}),w(()=>{Q.update({id:st,selectedValue:J,open:X,mounted:un,transitionStatus:fn,items:T,inline:_e,popupProps:Pn,inputProps:Nn,triggerProps:mn,openMethod:pn,itemProps:Fn,selectionMode:m,name:Mt,form:_,disabled:jt,readOnly:y,required:b,grid:C,isGrouped:Vt,virtualized:ge,onOpenChangeComplete:Qt,openOnInputClick:se,itemToStringLabel:j,modal:be,autoHighlight:q,isItemEqualToValue:me,submitOnItemClick:Me,hasInputValue:Nt,requestSubmit:Cn,inputOwnsFormValue:m===`none`&&(_e||!Q.state.inputInsidePopup)})},[Q,st,J,X,un,fn,T,Pn,Nn,Fn,pn,mn,m,Mt,jt,y,b,H,C,Vt,ge,Qt,se,j,be,me,Me,Nt,_e,Cn,q,_]);let In=Je(x,H.inputRef),Ln=z.useMemo(()=>({query:Z,hasItems:Pt,filteredItems:qt,flatFilteredItems:Jt}),[Z,Pt,qt,Jt]),Rn=z.useMemo(()=>Array.isArray(Yt)?``:E(Yt,M),[Yt,M]),zn=G&&Array.isArray(J)&&J.length>0,Bn=G||m===`none`&&cn?void 0:Mt,Vn=z.useMemo(()=>!G||!Array.isArray(J)||!Mt?null:J.map(e=>{let t=E(e,M);return(0,U.jsx)(`input`,{type:`hidden`,form:_,name:Mt,value:t},t)}),[G,J,_,Mt,M]),Hn=(0,U.jsxs)(z.Fragment,{children:[e.children,(0,U.jsx)(`input`,{...H.getInputValidationProps({onFocus(){sn?rn?.focus():(W.current||rn)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||jt||y){e.preventBaseUIHandler?.();return}let t=e.currentTarget.value,n=k(P,e.nativeEvent);function r(){if(G)return;if(m===`none`){Fe(t!==Le.initialValue),yn(t,n),Be()&&H.commit(t);return}let e=kt.current.find(e=>E(e,M).toLowerCase()===t.toLowerCase()||I(e,j).toLowerCase()===t.toLowerCase());e!=null&&(Fe(e!==Le.initialValue),xn?.(e,n),Be()&&H.commit(e))}T?r():(gn(),queueMicrotask(r))}}),id:st&&Bn==null?`${st}-hidden-input`:void 0,form:_,name:Bn,autoComplete:De,disabled:jt,required:b&&!zn,readOnly:y,value:Rn,ref:In,style:Bn?xe:Ne,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Vn]});return(0,U.jsx)(Ze.Provider,{value:Q,children:(0,U.jsx)(Qe.Provider,{value:En,children:(0,U.jsx)($e.Provider,{value:Ln,children:(0,U.jsx)(et.Provider,{value:Y,children:Hn})})})})}var pt={...j,...h,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":``}:null},mt=z.createContext(void 0);function ht(){return z.useContext(mt)}var gt=z.createContext(void 0);function _t(e){let t=z.useContext(gt);if(t===void 0&&!e)throw Error(Ue(21));return t}var vt=z.forwardRef(function(e,t){let n=B(),{buttonRef:r,getButtonProps:i}=ge({native:!1}),a=Je(t,r);function o(e){n.state.setOpen(!1,k(N,e.nativeEvent,e.currentTarget))}let s=i({onClick:o});return(0,U.jsx)(`span`,{ref:a,...s,"aria-label":`Dismiss`,tabIndex:void 0,style:xe})}),W=z.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,id:a,style:s,...u}=e,{state:d,disabled:ee,setTouched:f,setFocused:p,validationMode:te,validation:m}=pe(),{labelId:h}=c(),g=ht(),_=!!_t(!0),y=B(),{filteredItems:x}=nt(),S=rt(),C=he(),w=F(y,V.required),ne=F(y,V.disabled),T=F(y,V.readOnly),E=F(y,V.name),D=F(y,V.form),O=F(y,V.selectionMode),re=F(y,V.autoHighlight),ie=F(y,V.inputProps),ae=F(y,V.triggerProps),oe=F(y,V.open),se=F(y,V.mounted),A=F(y,V.selectedValue),ce=F(y,V.popupSide),le=F(y,V.positionerElement),ue=F(y,V.id),de=F(y,V.inline),j=F(y,V.modal),ge=!!re,ve=se&&le?ce:null,ye=ee||ne||i,xe=x.length===0,Se=_||de,Ce=!Se||j,N=b(a??(Se?void 0:ue)),we=fe(h,void 0),Te=_?_e:d,[Ee,I]=z.useState(null),De=z.useRef(!1),Oe=z.useRef(null),Ae=z.useRef(!1),je=O===`none`&&!_,Ne=L(e=>{let t=_||y.state.inline;t&&!y.state.hasInputValue&&y.state.setInputValue(``,k(P)),y.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:je})}),Pe=_||!m?u:m.getValidationProps(u),Fe={...Te,open:oe,disabled:ye,readOnly:T,popupSide:ve,listEmpty:xe};function Ie(e){if(!g)return;let t,{highlightedChipIndex:n}=g,r=g.chipsRef.current.length,i=C===`rtl`,a=i?`ArrowRight`:`ArrowLeft`,o=i?`ArrowLeft`:`ArrowRight`;if(n!==void 0){if(e.key===a)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===o)e.preventDefault(),t=n<r-1?n+1:void 0;else if(e.key===`Backspace`||e.key===`Delete`){e.preventDefault();let r=n>=A.length-1?A.length-2:n;t=r>=0?r:void 0,y.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`})}return t}return e.key===a&&(e.currentTarget.selectionStart??0)===0&&A.length>0?(e.preventDefault(),t=r>0?r-1:void 0):e.key===`Backspace`&&e.currentTarget.value===``&&A.length>0&&(y.state.setIndices({activeIndex:null,selectedIndex:null,type:`keyboard`}),e.preventDefault()),t}let R=Ge(`input`,e,{state:Fe,ref:[t,y.state.inputRef,Ne],props:[ie,ae,{type:`text`,value:e.value??Ee??S,"aria-readonly":T||void 0,"aria-required":w||void 0,"aria-labelledby":we,disabled:ye,readOnly:T,required:O===`none`?w:void 0,form:D,...je&&E&&{name:E},id:N,onFocus(){if(p(!0),!de||!Ae.current)return;Ae.current=!1;let e=Oe.current;e!=null&&Object.hasOwn(y.state.valuesRef.current,e)&&y.state.setIndices({activeIndex:e})},onBlur(){f(!0),p(!1);let e=y.state.activeIndex;if(de&&e!==null&&re!==`always`&&(Oe.current=e,Ae.current=!0,y.state.setIndices({activeIndex:null})),te===`onBlur`){let e=O===`none`?S:A;m.commit(e)}},onCompositionStart(e){o||(De.current=!0,I(e.currentTarget.value))},onCompositionEnd(e){De.current=!1;let t=e.currentTarget.value;I(null),y.state.setInputValue(t,k(be,e.nativeEvent))},onChange(e){let t=e.nativeEvent.inputType,n=!t||t===`insertReplacementText`,r=De.current||!n;if(De.current){let t=e.currentTarget.value;I(t),t===``&&!y.state.openOnInputClick&&!y.state.inputInsidePopup&&y.state.setOpen(!1,k(ke,e.nativeEvent));let n=t.trim(),i=ge&&n!==``;!T&&!ye&&n&&r&&(y.state.setOpen(!0,k(be,e.nativeEvent)),ge||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})),oe&&y.state.activeIndex!==null&&!i&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`});return}y.state.setInputValue(e.currentTarget.value,k(be,e.nativeEvent));let i=e.currentTarget.value===``,a=k(ke,e.nativeEvent);i&&!y.state.inputInsidePopup&&(O===`single`&&y.state.setSelectedValue(null,a),y.state.openOnInputClick||y.state.setOpen(!1,a));let o=e.currentTarget.value.trim();!T&&!ye&&o&&r&&(y.state.setOpen(!0,k(be,e.nativeEvent)),ge||y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})),oe&&y.state.activeIndex!==null&&!ge&&y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`})},onKeyDown(e){if(ye||T||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;y.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r=C===`rtl`;if(e.key===`Home`){l(e);let n=M&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if(e.key===`End`){l(e);let i=M&&r?0:t.value.length;t.setSelectionRange(i,i),t.scrollLeft=r?-n:n;return}if(!se&&e.key===`Escape`){let t=O===`multiple`&&Array.isArray(A)?A.length===0:A===null,n=k(Me,e.nativeEvent),r=O===`multiple`?[]:null;y.state.setInputValue(``,n),y.state.setSelectedValue(r,n),t||y.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(g&&e.key===`Backspace`&&t.value===``&&g.highlightedChipIndex===void 0&&Array.isArray(A)&&A.length>0){let t=g.chipsRef.current.length,n=t>0?t-1:A.length-1,r=A.filter((e,t)=>t!==n);y.state.setIndices({activeIndex:null,selectedIndex:null,type:y.state.keyboardActiveRef.current?`keyboard`:`pointer`}),y.state.setSelectedValue(r,k(P,e.nativeEvent));return}let i=g?.highlightedChipIndex!==void 0,a=Ie(e);if(g?.setHighlightedChipIndex(a),a===void 0?i&&y.state.inputRef.current?.focus():g?.chipsRef.current[a]?.focus(),e.which!==229&&e.key===`Enter`&&oe){let t=y.state.activeIndex,n=e.nativeEvent;if(t===null){if(de)return;y.state.setOpen(!1,k(P,n));return}l(e);let r=y.state.listRef.current[t];r&&(y.state.selectionEventRef.current=n,r.click(),y.state.selectionEventRef.current=null)}},onPointerMove(){y.state.keyboardActiveRef.current=!1},onPointerDown(){y.state.keyboardActiveRef.current=!1}},Pe],stateAttributesMapping:pt}),Le=_?(0,U.jsx)(v.Provider,{value:me,children:R}):R;return(0,U.jsxs)(z.Fragment,{children:[oe&&Ce&&(0,U.jsx)(vt,{ref:y.state.startDismissRef}),Le]})}),yt=2,bt=z.forwardRef(function(e,t){let{render:n,className:r,nativeButton:i=!0,disabled:a=!1,id:o,style:s,...u}=e,{state:d,disabled:ee,setTouched:f,setFocused:p,validationMode:te,validation:m}=pe(),{labelId:h}=c(),g=B(),{filteredItems:_}=nt(),v=F(g,V.selectionMode),y=F(g,V.disabled),b=F(g,V.readOnly),x=F(g,V.required),S=F(g,V.mounted),C=F(g,V.popupSide),w=F(g,V.positionerElement),ne=F(g,V.listElement),T=F(g,V.triggerProps),E=F(g,V.triggerElement),D=F(g,V.inputInsidePopup),O=F(g,V.id),re=F(g,V.labelId),ie=F(g,V.open),ae=F(g,V.selectedValue),oe=F(g,V.activeIndex),se=F(g,V.selectedIndex),A=F(g,V.hasSelectedValue),ce=tt(),le=rt(),j=de(),M=ee||y||a,me=_.length===0,he=S&&w?C:null;ze({id:D?o:void 0});let _e=D?o??O:o,ve=fe(h,re),be=z.useRef(``);function xe(e){be.current=e.pointerType}let Se=ce.useState(`domReferenceElement`);z.useEffect(()=>{D&&E&&E!==Se&&ce.set(`domReferenceElement`,E)},[E,Se,ce,D]);let{reference:Ce}=Pe(ce,{enabled:!ie&&!b&&!y&&v===`single`,listRef:g.state.labelsRef,activeIndex:oe,selectedIndex:se,onMatch(e){let t=g.state.valuesRef.current[e];t!==void 0&&g.state.setSelectedValue(t,k(`none`))}}),{reference:N}=Re(ce,{enabled:!b&&!y,event:`mousedown`}),{buttonRef:Te,getButtonProps:Ee}=ge({native:i,disabled:M}),P={...d,open:ie,disabled:M,popupSide:he,listEmpty:me,placeholder:v!==`none`&&!A},I=L(e=>{g.set(`triggerElement`,e)});return Ge(`button`,e,{ref:[t,Te,I],state:P,props:[T,N,Ce,{id:_e,tabIndex:D?0:-1,role:D?`combobox`:void 0,"aria-expanded":ie?`true`:`false`,"aria-haspopup":D?`dialog`:`listbox`,"aria-controls":ie?ne?.id:void 0,"aria-required":D&&x||void 0,"aria-labelledby":ve,onPointerDown:xe,onPointerEnter:xe,onFocus(){p(!0),!(M||b)&&j.start(0,g.state.forceMount)},onBlur(e){if(!R(w,e.relatedTarget)&&(f(!0),p(!1),te===`onBlur`)){let e=v===`none`?le:ae;m.commit(e)}},onMouseDown(e){if(M||b||(D||ce.set(`domReferenceElement`,e.currentTarget),g.state.forceMount(),be.current!==`touch`&&(g.state.inputRef.current?.focus(),D||e.preventDefault()),ie))return;let t=we(e.currentTarget);function n(e){if(!E)return;let t=ye(e),n=g.state.positionerElement,r=g.state.listElement;if(R(E,t)||R(n,t)||R(r,t)||t===E)return;let i=ue(E),a=e.clientX>=i.left-yt&&e.clientX<=i.right+yt,o=e.clientY>=i.top-yt&&e.clientY<=i.bottom+yt;a&&o||g.state.setOpen(!1,k(`cancel-open`,e))}D&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){M||b||(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(l(e),g.state.setOpen(!0,k(Ae,e.nativeEvent)),g.state.inputRef.current?.focus())}},m?m.getValidationProps(u):u,Ee],stateAttributesMapping:pt})}),xt=z.createContext(null);function St(){return z.useContext(xt)}function Ct(e){let{children:t,items:n}=e,r=z.useMemo(()=>({items:n}),[n]);return(0,U.jsx)(xt.Provider,{value:r,children:t})}function wt(e){let{children:t}=e,{filteredItems:n}=nt(),r=St(),i=r?r.items:n;return i?(0,U.jsx)(z.Fragment,{children:i.map(t)}):null}var Tt=z.forwardRef(function(e,t){var n;let{render:r,className:i,style:a,children:o,...s}=e,c=B(),u=tt(),d=!!_t(!0),{filteredItems:ee,hasItems:f}=nt(),p=F(c,V.selectionMode),te=F(c,V.grid),m=F(c,V.popupProps),h=F(c,V.virtualized),g=p===`multiple`,_=ee.length===0,v=L(e=>{c.set(`positionerElement`,e)}),y=L(e=>{c.set(`listElement`,e)}),b=z.useMemo(()=>typeof o==`function`?n||=(0,U.jsx)(wt,{children:o}):o,[o]),x={empty:_},S=u.useState(`floatingId`),C=Ge(`div`,e,{state:x,ref:[t,y,d?null:v],props:[m,{children:b,tabIndex:-1,id:S,role:te?`grid`:`listbox`,"aria-multiselectable":g?`true`:void 0,onKeyDown(e){if(!(c.state.disabled||c.state.readOnly)&&e.key===`Enter`){let t=c.state.activeIndex;if(t==null)return;l(e);let n=e.nativeEvent,r=c.state.listRef.current[t];r&&(c.state.selectionEventRef.current=n,r.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},s]});return h?C:(0,U.jsx)(le,{elementsRef:c.state.listRef,labelsRef:f?void 0:c.state.labelsRef,children:C})}),Et=e(De()),Dt=``;function Ot(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;e.nodeValue!==``&&(n=e)}return n}function kt(){let e=de(),t=z.useRef(null);return z.useEffect(()=>{if(_)return;let n=t.current;if(n==null)return;let r=Ot(n);if(r==null)return;let i=r.nodeValue??``,a=`${i}${Dt}`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=i)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=i)}},[t,e]),t}var At=z.createContext(void 0);function jt(){let e=z.useContext(At);if(e===void 0)throw Error(Ue(20));return e}var Mt=z.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=B(),a=F(i,V.mounted),o=F(i,V.forceMounted);return a||n||o?(0,U.jsx)(At.Provider,{value:n,children:(0,U.jsx)(m,{ref:t,...r})}):null}),G=z.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:ee=5,sticky:f=!1,disableAnchorTracking:p=!1,collisionAvoidance:te=ve,style:m,...h}=e,g=B(),{filteredItems:_}=nt(),v=tt(),b=jt(),x=F(g,V.modal),S=F(g,V.open),ne=F(g,V.mounted),E=F(g,V.openMethod),D=F(g,V.positionerElement),O=F(g,V.triggerElement),re=F(g,V.inputElement),k=F(g,V.inputGroupElement),ie=F(g,V.inputInsidePopup),oe=F(g,V.transitionStatus),se=_.length===0,A=Be({anchor:i??(ie?O:k??re),floatingRootContext:v,positionMethod:a,mounted:ne,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:ee,collisionBoundary:u,collisionPadding:d,sticky:f,disableAnchorTracking:p,keepMounted:b,collisionAvoidance:te,lazyFlip:!0});ae(S&&x,E===`touch`,D,O);let ce={open:S,side:A.side,align:A.align,anchorHidden:A.anchorHidden,empty:se};w(()=>{g.set(`popupSide`,A.side)},[g,A.side]);let le=L(e=>{g.set(`positionerElement`,e)}),ue=C(e,ce,{styles:A.positionerStyles,transitionStatus:oe,props:h,refs:[t,le],hidden:!ne,inert:!S});return(0,U.jsxs)(gt.Provider,{value:A,children:[ne&&x&&(0,U.jsx)(T,{inert:y(!S),cutout:k??re??O}),ue]})}),K={...Fe,...O},Nt=z.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...c}=e,l=B(),d=_t(),ee=tt(),{filteredItems:f}=nt(),p=F(l,V.mounted),te=F(l,V.open),m=F(l,V.openMethod),h=F(l,V.transitionStatus),_=F(l,V.inputInsidePopup),v=F(l,V.inputElement),y=F(l,V.modal),b=f.length===0;u({open:te,ref:l.state.popupRef,onComplete(){te&&l.state.onOpenChangeComplete(!0)}});let x={open:te,side:d.side,align:d.align,anchorHidden:d.anchorHidden,transitionStatus:h,empty:b},S=Ge(`div`,e,{state:x,ref:[t,l.state.popupRef],props:[{role:_?`dialog`:`presentation`,tabIndex:-1,onFocus(e){let t=ye(e.nativeEvent);m!==`touch`&&(R(l.state.listElement,t)||t===e.currentTarget)&&l.state.inputRef.current?.focus()}},g(h),c],stateAttributesMapping:K}),C=a===void 0?_?e=>e===`touch`?l.state.popupRef.current:v:!1:a,w;w=o??(_?void 0:!1);let ne=!_||y;return(0,U.jsx)(s,{context:ee,disabled:!p,modal:ne,openInteractionType:m,initialFocus:C,returnFocus:w,getInsideElements:()=>[l.state.startDismissRef.current,l.state.endDismissRef.current],children:(0,U.jsxs)(z.Fragment,{children:[S,ne&&(0,U.jsx)(vt,{ref:l.state.endDismissRef})]})})}),Pt=z.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return Ge(`span`,e,{ref:t,props:[{"aria-hidden":!0,children:`▼`},a]})}),Ft=z.createContext(void 0),q=z.createContext(!1);function J(){return z.useContext(q)}var It=z.memo(z.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,index:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=z.useRef(!1),d=z.useRef(null),ee=Le({index:o,textRef:d,indexGuessBehavior:se.GuessFromOrder}),f=B(),p=J(),{flatFilteredItems:te,hasItems:m}=nt(),h=F(f,V.open),g=F(f,V.selectionMode),_=F(f,V.readOnly),v=F(f,V.virtualized),y=F(f,V.isItemEqualToValue),b=g!==`none`,x=o??(v?S(te,a,y):ee.index),C=ee.index!==-1,ne=F(f,V.id),T=F(f,V.isActive,x),E=F(f,V.isSelected,a),D=F(f,V.itemProps),O=z.useRef(null),re=ne!=null&&C?`${ne}-${x}`:void 0,k=E&&b;w(()=>{if(!C||!v&&o==null)return;let e=f.state.listRef.current;return e[x]=O.current,()=>{delete e[x]}},[C,v,x,o,f]),w(()=>{if(!C||m)return;let e=f.state.valuesRef.current;return e[x]=a,g!==`none`&&f.state.allValuesRef.current.push(a),()=>{delete e[x]}},[C,m,x,a,f,g]),w(()=>{if(!h){u.current=!1;return}if(!C||m)return;let e=f.state.selectedValue,t=Array.isArray(e)?e[e.length-1]:e;ie(a,t,y)&&f.set(`selectedIndex`,x)},[C,m,h,f,x,a,y]);let{getButtonProps:ae,buttonRef:oe}=ge({disabled:s,focusableWhenDisabled:!0,native:c,composite:!0}),A={disabled:s,selected:k,highlighted:T};function ce(e){function t(){f.state.handleSelection(e,a)}f.state.submitOnItemClick?(Et.flushSync(t),f.state.requestSubmit()):t()}let le={id:re,role:p?`gridcell`:`option`,"aria-selected":b?k:void 0,tabIndex:void 0,onPointerDownCapture(e){u.current=!0,e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){s||_||ce(e.nativeEvent)},onMouseUp(e){let t=u.current;u.current=!1,!(s||_||e.button!==0||t||!T)&&ce(e.nativeEvent)}},ue=Ge(`div`,e,{ref:[oe,t,ee.ref,O],state:A,props:[D,le,l,ae]}),de=z.useMemo(()=>({selected:k,textRef:d}),[k,d]);return(0,U.jsx)(Ft.Provider,{value:de,children:ue})})),Lt=z.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,{filteredItems:s}=nt(),c=B(),l=kt(),u=s.length===0?a:null;return Ge(`div`,e,{ref:[t,c.state.emptyRef,l],props:[{children:u,role:`status`,"aria-live":`polite`,"aria-atomic":!0},o]})}),Rt={...O,...ee},Y=z.forwardRef(function(e,t){let{render:n,className:a,disabled:o=!1,nativeButton:s=!0,keepMounted:c=!1,style:l,...d}=e,{disabled:ee}=pe(),f=B(),p=F(f,V.selectionMode),te=F(f,V.disabled),m=F(f,V.readOnly),h=F(f,V.open),g=F(f,V.selectedValue),_=F(f,V.hasSelectionChips),v=rt(),y=!1;y=p===`none`?v!==``:p===`single`?g!=null:_;let b=ee||te||o,{buttonRef:x,getButtonProps:S}=ge({native:s,disabled:b}),{mounted:C,transitionStatus:w,setMounted:ne}=i(y),T={disabled:b,visible:y,open:h,transitionStatus:w};u({open:y,ref:f.state.clearRef,onComplete(){y||ne(!1)}});let E=Ge(`button`,e,{state:T,ref:[t,x,f.state.clearRef],props:[{tabIndex:-1,children:`x`,onMouseDown(e){e.preventDefault()},onClick(e){if(b||m)return;let t=f.state.keyboardActiveRef;f.state.setInputValue(``,k(r,e.nativeEvent)),p===`none`?f.state.setIndices({activeIndex:null,type:t.current?`keyboard`:`pointer`}):(f.state.setSelectedValue(Array.isArray(g)?[]:null,k(r,e.nativeEvent)),f.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?`keyboard`:`pointer`})),f.state.inputRef.current?.focus()}},d,S],stateAttributesMapping:Rt});return c||C?E:null});export{Nt as a,kt as c,Ct as d,bt as f,ct as g,lt as h,Pt as i,Tt as l,ft as m,Lt as n,G as o,W as p,It as r,Mt as s,Y as t,wt as u};
|
|
2
|
+
//# sourceMappingURL=ComboboxClear-DI8al7ca.js.map
|
package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-9alK0hYt.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{
|
|
2
|
-
//# sourceMappingURL=ComboboxGroupLabel-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{Ia as r,Ka as i}from"./utils-DsOiwDNN.js";import{f as a,n as o}from"./useRender-BP5vR6yH.js";import{d as s}from"./ComboboxClear-DI8al7ca.js";var c=e(t()),l=c.createContext(void 0);function u(){let e=c.useContext(l);if(e===void 0)throw Error(a(18));return e}var d=e(n()),f=c.forwardRef(function(e,t){let{render:n,className:r,style:i,items:a,...u}=e,[f,p]=c.useState(),m=c.useMemo(()=>({labelId:f,setLabelId:p,items:a}),[f,p,a]),h=o(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":f},u]}),g=(0,d.jsx)(l.Provider,{value:m,children:h});return a?(0,d.jsx)(s,{items:a,children:g}):g}),p=c.forwardRef(function(e,t){let{render:n,className:a,style:s,id:c,...l}=e,{setLabelId:d}=u(),f=r(c);return i(()=>(d(f),()=>{d(void 0)}),[f,d]),o(`div`,e,{ref:t,props:[{id:f},l]})});export{f as n,p as t};
|
|
2
|
+
//# sourceMappingURL=ComboboxGroupLabel-9alK0hYt.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{mr as r,t as i}from"./utils-
|
|
2
|
-
//# sourceMappingURL=CommandBlock-
|
|
1
|
+
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{mr as r,t as i}from"./utils-DsOiwDNN.js";import{C as a,f as o,u as s}from"./TooltipProvider-DPt8xz_3.js";import{m as c}from"./relay-BWVOLzv_.js";var l=t(),u=e(n(),1);function d(e){let t=(0,l.c)(19),{command:n,className:d,prominent:f}=e,p=f!==void 0&&f,m;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(m={timeout:1500,target:`command`},t[0]=m):m=t[0];let{copyToClipboard:h,isCopied:g}=c(m),_=p?`px-4 py-3.5 text-base`:`px-3 py-2.5 text-sm`,v;t[1]!==d||t[2]!==_?(v=i(`flex items-center justify-between gap-3 rounded-lg border border-border bg-muted/50 font-mono`,_,d),t[1]=d,t[2]=_,t[3]=v):v=t[3];let y;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,u.jsx)(`span`,{className:`mr-2 text-muted-foreground`,children:`$`}),t[4]=y):y=t[4];let b;t[5]===n?b=t[6]:(b=(0,u.jsxs)(`span`,{className:`min-w-0 truncate`,children:[y,n]}),t[5]=n,t[6]=b);let x;t[7]!==n||t[8]!==h?(x=()=>h(n,void 0),t[7]=n,t[8]=h,t[9]=x):x=t[9];let S=g?o:a,C;t[10]===S?C=t[11]:(C=(0,u.jsx)(s,{className:`size-3.5`,icon:S}),t[10]=S,t[11]=C);let w;t[12]!==x||t[13]!==C?(w=(0,u.jsx)(r,{size:`icon-xs`,variant:`ghost`,"aria-label":`Copy command`,onClick:x,children:C}),t[12]=x,t[13]=C,t[14]=w):w=t[14];let T;return t[15]!==w||t[16]!==v||t[17]!==b?(T=(0,u.jsxs)(`div`,{className:v,children:[b,w]}),t[15]=w,t[16]=v,t[17]=b,t[18]=T):T=t[18],T}export{d as t};
|
|
2
|
+
//# sourceMappingURL=CommandBlock-BOYakQHx.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{$i as r,$r as i,Ga as a,Jr as o,Kr as s,Qi as c,Rr as l,Vr as u,Xr as d,Yr as f,Zr as p,aa as m,ai as h,ba as g,ea as _,ei as v,ia as y,ii as b,na as x,oa as S,oi as C,qa as w,qr as T,ra as E,ri as D,ta as O,ti as k}from"./utils-DsOiwDNN.js";import{n as A,o as j,s as M,u as N}from"./useRender-BP5vR6yH.js";var P=e(t());function F(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var I=`data-composite-item-active`,L=[];function R(e){let{itemSizes:t,cols:n=1,loopFocus:a=!0,onLoop:l,dense:u=!1,orientation:k=`both`,direction:A,highlightedIndex:j,onHighlightedIndexChange:M,rootRef:I,enableHomeAndEndKeys:R=!1,stopEventPropagation:B=!1,disabledIndices:V,modifierKeys:H=L}=e,[U,W]=P.useState(0),G=n>1,K=P.useRef(null),q=N(K,I),J=P.useRef([]),Y=P.useRef(!1),X=j??U,Z=w((e,t=!1)=>{if((M??W)(e),t){let t=J.current[e];C(K.current,t,A,k)}}),Q=w(e=>{if(e.size===0||Y.current)return;Y.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,r=n?t.indexOf(n):-1;r!==-1&&Z(r),C(K.current,n,A,k)}),ee=w((e,t,n)=>l?l?.(e,t,n,J):n),$=P.useMemo(()=>({"aria-orientation":k===`both`?void 0:k,ref:q,onFocus(e){let t=K.current,n=g(e.nativeEvent);t&&n!=null&&h(n)&&n.setSelectionRange(0,n.value.length??0)},onKeyDown(e){let C=R?p:T;if(!C.has(e.key)||z(e,H)||!K.current)return;let w=A===`rtl`,j=w?o:f,M={horizontal:j,vertical:s,both:j}[k],N=w?f:o,P={horizontal:N,vertical:d,both:N}[k],I=g(e.nativeEvent);if(I!=null&&h(I)&&!F(I)){let t=I.selectionStart,n=I.selectionEnd,r=I.value??``;if(t==null||e.shiftKey||t!==n||e.key!==P&&t<r.length||e.key!==M&&t>0)return}let L=X,U=y(J,V),W=E(J,V);if(G){let r=t||Array.from({length:J.current.length},()=>({width:1,height:1})),i=c(r,n,u),o=i.findIndex(e=>e!=null&&!S(J.current,e,V)),s=i.reduce((e,t,n)=>t!=null&&!S(J.current,t,V)?n:e,-1);L=i[x(i.map(e=>e==null?null:J.current[e]),{event:e,orientation:k,loopFocus:a,onLoop:ee,cols:n,disabledIndices:O([...V||J.current.map((e,t)=>S(J.current,t)?t:void 0),void 0],i),minIndex:o,maxIndex:s,prevIndex:_(X>W?U:X,r,i,n,e.key===`ArrowDown`?`bl`:e.key===`ArrowRight`?`tr`:`tl`),rtl:w})]}let q={horizontal:[j],vertical:[s],both:[j,s]}[k],Y={horizontal:[N],vertical:[d],both:[N,d]}[k],Q=G?C:{horizontal:R?v:i,vertical:R?b:D,both:C}[k];R&&(e.key===`Home`?L=U:e.key===`End`&&(L=W)),L===X&&(q.includes(e.key)||Y.includes(e.key))&&(a&&L===W&&q.includes(e.key)?(L=U,l&&(L=l(e,X,L,J))):a&&L===U&&Y.includes(e.key)?(L=W,l&&(L=l(e,X,L,J))):L=r(J.current,{startingIndex:L,decrement:Y.includes(e.key),disabledIndices:V})),L!==X&&!m(J.current,L)&&(B&&e.stopPropagation(),Q.has(e.key)&&e.preventDefault(),Z(L,!0),queueMicrotask(()=>{J.current[L]?.focus()}))}}),[n,u,A,V,J,R,X,G,t,a,l,ee,q,H,Z,k,B]);return P.useMemo(()=>({props:$,highlightedIndex:X,onHighlightedIndexChange:Z,elementsRef:J,disabledIndices:V,onMapChange:Q,relayKeyboardEvent:$.onKeyDown}),[$,X,Z,J,V,Q])}function z(e,t){for(let n of k.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var B=e(n());function V(e){let{render:t,className:n,style:r,refs:i=j,props:o=j,state:s=M,stateAttributesMapping:c,highlightedIndex:d,onHighlightedIndexChange:f,orientation:p,dense:m,itemSizes:h,loopFocus:g,onLoop:_,cols:v,enableHomeAndEndKeys:y,onMapChange:b,stopEventPropagation:x=!0,rootRef:S,disabledIndices:C,modifierKeys:w,highlightItemOnHover:T=!1,tag:E=`div`,...D}=e,{props:O,highlightedIndex:k,onHighlightedIndexChange:N,elementsRef:F,onMapChange:I,relayKeyboardEvent:L}=R({itemSizes:h,cols:v,loopFocus:g,onLoop:_,dense:m,orientation:p,highlightedIndex:d,onHighlightedIndexChange:f,rootRef:S,stopEventPropagation:x,enableHomeAndEndKeys:y,direction:u(),disabledIndices:C,modifierKeys:w}),z=A(E,e,{state:s,ref:i,props:[O,...o,D],stateAttributesMapping:c}),V=P.useMemo(()=>({highlightedIndex:k,onHighlightedIndexChange:N,highlightItemOnHover:T,relayKeyboardEvent:L}),[k,N,T,L]);return(0,B.jsx)(a.Provider,{value:V,children:(0,B.jsx)(l,{elementsRef:F,onMapChange:e=>{b?.(e),I(e)},children:z})})}export{I as n,V as t};
|
|
2
|
+
//# sourceMappingURL=CompositeRoot-OiiGu5cn.js.map
|
package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9vE8btn.js}
RENAMED
|
@@ -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=ConnectAgentSurface-
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{n,t as r}from"./jsx-runtime-DJeoFXNw.js";import{lu as i,mr as a,t as o}from"./utils-DsOiwDNN.js";import{Ta as s,Uc as c,Wd as l,gu as u,ju as d,nd as f,wa as p}from"./src-B7vcPG0D.js";import{B as m,nt as h}from"./runtime-DYDOkR3G.js";import{t as g}from"./spinner-fU7Q2OR1.js";import{i as _,n as ee}from"./radio-group-XlBZKXvU.js";import{t as te}from"./input-Cd-93Wp0.js";import{t as v}from"./preview-CiDRJw3K.js";import{r as ne,t as re}from"./alert-Eh-IusVP.js";import{t as y}from"./runtimeModeConfig-DyiI0NS9.js";import{t as b}from"./AuthSurfaceShell-uHFuClfP.js";var x=n(),S=e(t(),1),C=e(r(),1),w={"read-only":{label:`Read only`,description:`Read projects and threads. Cannot start, message or change anything.`,icon:i},...y};function ie(e){return v(new URL(`http://${e}`).hostname)}var T=`Could not reach this environment. Try again.`,E=c(p);function ae(e){return m(h.pipe(d(e),f(e=>typeof e==`object`&&e&&`redirectTo`in e?{kind:`redirect`,url:e.redirectTo}:{kind:`ok`,value:e}),u(e=>l({kind:`error`,message:E(e)?e.message:T})))).catch(()=>({kind:`error`,message:T}))}function oe(){return Object.fromEntries(new URL(window.location.href).searchParams)}function D(e,t){return e.csrfToken!==void 0&&(e.oneClickAccess??[]).includes(t)}function O(){let e=(0,x.c)(71),[t]=(0,S.useState)(oe),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={status:`loading`},e[0]=n):n=e[0];let[r,i]=(0,S.useState)(n),[o,c]=(0,S.useState)(`read-only`),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)(``),[p,m]=(0,S.useState)(null),h,_;e[1]===t?(h=e[2],_=e[3]):(h=()=>{let e=!1;return ae(e=>e.mcpOAuth.approval({payload:t})).then(t=>{e||(t.kind===`redirect`?window.location.replace(t.url):i(t.kind===`error`?{status:`invalid`,message:t.message}:{status:`ready`,details:t.value}))}),()=>{e=!0}},_=[t],e[1]=t,e[2]=h,e[3]=_),(0,S.useEffect)(h,_);let v;e[4]!==o||e[5]!==t||e[6]!==r.details||e[7]!==r.status||e[8]!==l?(v=async e=>{if(r.status!==`ready`)return;m(e),f(``);let{csrfToken:n}=r.details,i=e===`deny`?{_tag:`deny`}:n!==void 0&&D(r.details,o)?{_tag:`browser-session`,access:o,csrfToken:n}:{_tag:`pairing-code`,access:o,code:l.trim()},a=await ae(e=>e.mcpOAuth.decision({payload:{authorization:t,decision:i}}));a.kind===`redirect`?window.location.replace(a.url):(m(null),f(a.kind===`error`?a.message:`The sign-in could not continue.`))},e[4]=o,e[5]=t,e[6]=r.details,e[7]=r.status,e[8]=l,e[9]=v):v=e[9];let y=v;if(r.status===`loading`){let t;return e[10]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsxs)(b,{children:[(0,C.jsx)(k,{title:`Checking the sign-in request`,description:`One moment while this environment verifies the agent's request.`}),(0,C.jsx)(g,{className:`mt-6`,size:`lg`,tone:`muted`})]}),e[10]=t):t=e[10],t}if(r.status===`invalid`){let t;e[11]===r.message?t=e[12]:(t=(0,C.jsx)(k,{title:`This sign-in cannot continue`,description:r.message}),e[11]=r.message,e[12]=t);let n;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,C.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`Close this page and start the sign-in again from your agent.`}),e[13]=n):n=e[13];let i;return e[14]===t?i=e[15]:(i=(0,C.jsxs)(b,{children:[t,n]}),e[14]=t,e[15]=i),i}let{details:w}=r,T;e[16]!==o||e[17]!==w?(T=D(w,o),e[16]=o,e[17]=w,e[18]=T):T=e[18];let E=T,O;e[19]!==E||e[20]!==l||e[21]!==p?(O=p===null&&(E||l.trim().length>0),e[19]=E,e[20]=l,e[21]=p,e[22]=O):O=e[22];let A=O,j=`Connect ${w.clientName}`,M;e[23]===w.environmentHost?M=e[24]:(M=(0,C.jsxs)(C.Fragment,{children:[`This agent wants to use the threads in every project on`,` `,(0,C.jsx)(`span`,{className:`font-medium text-foreground`,children:w.environmentHost}),`.`]}),e[23]=w.environmentHost,e[24]=M);let N;e[25]!==j||e[26]!==M?(N=(0,C.jsx)(k,{title:j,description:M}),e[25]=j,e[26]=M,e[27]=N):N=e[27];let P;e[28]===w.redirectHost?P=e[29]:(P=(0,C.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:ie(w.redirectHost)?(0,C.jsxs)(C.Fragment,{children:[`The name is chosen by the agent. Approval returns to `,w.redirectHost,` on the computer that opened this page. Only approve a sign-in you just started.`]}):(0,C.jsxs)(C.Fragment,{children:[`The name is chosen by the agent. Approval gives access to whoever runs`,` `,(0,C.jsx)(`span`,{className:`font-medium text-foreground`,children:w.redirectHost}),`. Only approve a sign-in you just started there.`]})}),e[28]=w.redirectHost,e[29]=P);let F;e[30]!==A||e[31]!==y?(F=e=>{e.preventDefault(),A&&y(`approve`)},e[30]=A,e[31]=y,e[32]=F):F=e[32];let I;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,C.jsx)(`span`,{id:`connect-agent-access-label`,className:`text-sm font-medium`,children:`What it may do`}),e[33]=I):I=e[33];let L;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>c(e),e[34]=L):L=e[34];let R;e[35]===o?R=e[36]:(R=s.literals.map(e=>(0,C.jsx)(se,{access:e,selected:e===o},e)),e[35]=o,e[36]=R);let z;e[37]!==o||e[38]!==R?(z=(0,C.jsx)(ee,{"aria-labelledby":`connect-agent-access-label`,value:o,onValueChange:L,children:R}),e[37]=o,e[38]=R,e[39]=z):z=e[39];let B;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Beyond read only, it can start, message and stop threads, and none of them can run with more than the mode you pick.`}),e[40]=B):B=e[40];let V;e[41]===z?V=e[42]:(V=(0,C.jsxs)(`div`,{className:`space-y-2`,children:[I,z,B]}),e[41]=z,e[42]=V);let H;e[43]!==E||e[44]!==l||e[45]!==p?(H=E?null:(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:`connect-agent-pairing-code`,children:`Pairing code`}),(0,C.jsx)(te,{id:`connect-agent-pairing-code`,autoCapitalize:`none`,autoComplete:`one-time-code`,autoCorrect:`off`,disabled:p!==null,nativeInput:!0,onChange:e=>u(e.currentTarget.value),placeholder:`Paste a one-time pairing code`,spellCheck:!1,value:l}),(0,C.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Create one in Settings → Connections, or run `,(0,C.jsx)(`code`,{children:`p4c auth pairing create`}),` on this machine.`]})]}),e[43]=E,e[44]=l,e[45]=p,e[46]=H):H=e[46];let U;e[47]===d?U=e[48]:(U=d?(0,C.jsx)(re,{variant:`error`,children:(0,C.jsx)(ne,{children:d})}):null,e[47]=d,e[48]=U);let W=!A,G=p===`approve`?`Approving…`:`Approve`,K;e[49]!==W||e[50]!==G?(K=(0,C.jsx)(a,{disabled:W,type:`submit`,children:G}),e[49]=W,e[50]=G,e[51]=K):K=e[51];let q=p!==null,J;e[52]===y?J=e[53]:(J=()=>void y(`deny`),e[52]=y,e[53]=J);let Y=p===`deny`?`Denying…`:`Deny`,X;e[54]!==q||e[55]!==J||e[56]!==Y?(X=(0,C.jsx)(a,{disabled:q,onClick:J,type:`button`,variant:`outline`,children:Y}),e[54]=q,e[55]=J,e[56]=Y,e[57]=X):X=e[57];let Z;e[58]!==K||e[59]!==X?(Z=(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[K,X]}),e[58]=K,e[59]=X,e[60]=Z):Z=e[60];let Q;e[61]!==F||e[62]!==V||e[63]!==H||e[64]!==U||e[65]!==Z?(Q=(0,C.jsxs)(`form`,{className:`mt-6 space-y-5`,onSubmit:F,children:[V,H,U,Z]}),e[61]=F,e[62]=V,e[63]=H,e[64]=U,e[65]=Z,e[66]=Q):Q=e[66];let $;return e[67]!==Q||e[68]!==N||e[69]!==P?($=(0,C.jsxs)(b,{children:[N,P,Q]}),e[67]=Q,e[68]=N,e[69]=P,e[70]=$):$=e[70],$}function k(e){let t=(0,x.c)(8),{title:n,description:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,C.jsx)(`p`,{className:`text-3xs font-semibold tracking-widest text-primary uppercase`,children:`Agent sign-in`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,C.jsx)(`h1`,{className:`mt-2 text-2xl font-semibold tracking-tight sm:text-3xl`,children:n}),t[1]=n,t[2]=a);let o;t[3]===r?o=t[4]:(o=(0,C.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:r}),t[3]=r,t[4]=o);let s;return t[5]!==a||t[6]!==o?(s=(0,C.jsxs)(C.Fragment,{children:[i,a,o]}),t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function se(e){let t=(0,x.c)(19),{access:n,selected:r}=e,{label:i,description:a,icon:s}=w[n],c=r?`border-primary bg-background ring-2 ring-inset ring-primary/25 dark:border-transparent dark:bg-primary/10 dark:ring-1 dark:ring-primary/30`:`border-border bg-background hover:bg-muted/50 dark:border-transparent dark:bg-white/[0.035] dark:hover:bg-accent`,l;t[0]===c?l=t[1]:(l=o(`flex cursor-pointer items-start gap-3 rounded-lg border px-3 py-2.5 text-left outline-none transition-[background-color,border-color,box-shadow]`,`focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,c),t[0]=c,t[1]=l);let u=r?`text-primary`:`text-muted-foreground`,d;t[2]===u?d=t[3]:(d=o(`mt-0.5 size-4 shrink-0`,u),t[2]=u,t[3]=d);let f;t[4]!==s||t[5]!==d?(f=(0,C.jsx)(s,{"aria-hidden":!0,className:d}),t[4]=s,t[5]=d,t[6]=f):f=t[6];let p;t[7]===i?p=t[8]:(p=(0,C.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:i}),t[7]=i,t[8]=p);let m;t[9]===a?m=t[10]:(m=(0,C.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:a}),t[9]=a,t[10]=m);let h;t[11]!==p||t[12]!==m?(h=(0,C.jsxs)(`span`,{className:`min-w-0`,children:[p,m]}),t[11]=p,t[12]=m,t[13]=h):h=t[13];let g;return t[14]!==n||t[15]!==l||t[16]!==f||t[17]!==h?(g=(0,C.jsxs)(_,{value:n,className:l,children:[f,h]}),t[14]=n,t[15]=l,t[16]=f,t[17]=h,t[18]=g):g=t[18],g}export{w as n,O as t};
|
|
2
|
+
//# sourceMappingURL=ConnectAgentSurface-D9vE8btn.js.map
|
package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-DL0Hsk-v.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-
|
|
2
|
-
//# sourceMappingURL=ConnectionStatusDot-
|
|
1
|
+
import{a as e}from"./react-BUfh6y28.js";import{n as t,t as n}from"./jsx-runtime-DJeoFXNw.js";import{t as r}from"./utils-DsOiwDNN.js";import{a as i,n as a,t as o}from"./tooltip-Da633nbs.js";var s=t(),c=e(n(),1);function l(e){switch(e){case`connected`:return`bg-success`;case`connecting`:case`reconnecting`:return`bg-warning`;case`error`:return`bg-destructive`;default:return`bg-muted-foreground/40`}}function u(e){return e===`connecting`||e===`reconnecting`?`bg-warning/60 duration-2000`:null}function d(e){let t=(0,s.c)(21),{tooltipText:n,dotClassName:l,pingClassName:u}=e,d;t[0]===u?d=t[1]:(d=u?(0,c.jsx)(`span`,{className:r(`absolute inline-flex h-full w-full animate-status-ping rounded-full`,u)}):null,t[0]=u,t[1]=d);let f;t[2]===l?f=t[3]:(f=r(`relative inline-flex size-2 rounded-full`,l),t[2]=l,t[3]=f);let p;t[4]===f?p=t[5]:(p=(0,c.jsx)(`span`,{className:f}),t[4]=f,t[5]=p);let m;t[6]!==d||t[7]!==p?(m=(0,c.jsxs)(c.Fragment,{children:[d,p]}),t[6]=d,t[7]=p,t[8]=m):m=t[8];let h=m;if(!n){let e;return t[9]===h?e=t[10]:(e=(0,c.jsx)(`span`,{className:`relative flex size-3 shrink-0 items-center justify-center`,children:h}),t[9]=h,t[10]=e),e}let g;t[11]!==h||t[12]!==n?(g=(0,c.jsx)(`button`,{type:`button`,"aria-label":n,className:`relative flex size-3 shrink-0 cursor-help items-center justify-center rounded-full outline-hidden`,children:h}),t[11]=h,t[12]=n,t[13]=g):g=t[13];let _=g,v;t[14]===_?v=t[15]:(v=(0,c.jsx)(i,{render:_}),t[14]=_,t[15]=v);let y;t[16]===n?y=t[17]:(y=(0,c.jsx)(a,{side:`top`,className:`whitespace-pre-wrap`,children:n}),t[16]=n,t[17]=y);let b;return t[18]!==v||t[19]!==y?(b=(0,c.jsxs)(o,{children:[v,y]}),t[18]=v,t[19]=y,t[20]=b):b=t[20],b}export{l as n,u as r,d as t};
|
|
2
|
+
//# sourceMappingURL=ConnectionStatusDot-DL0Hsk-v.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{c as e,d as t,g as n,h as r,i,n as a,o,r as s,s as c}from"./6OLKWJ4F-
|
|
1
|
+
import{c as e,d as t,g as n,h as r,i,n as a,o,r as s,s as c}from"./6OLKWJ4F-B_-tUtQE.js";import{f as l,g as u,m as d,r as f,s as p,t as m,u as ee,y as h}from"./77XECAW3-C1endahg.js";import{o as te,r as ne}from"./DKTLEL5E-DciMwFJ1.js";import{PeleError as g,_ as re,m as _}from"./lazy-8c6T_8yh.js";function v(e){return e===32||e>=9&&e<=13||e>127&&/\s/.test(String.fromCharCode(e))}function y(){let e=1/0;return(t,n)=>{if(!t.startsWith(`accDescr`,n))return-1;let r=t.length,i=n+8;for(;i<r&&(t.charCodeAt(i)===32||t.charCodeAt(i)===9);)i++;if(t.charCodeAt(i)===58){for(i++;i<r;i++){let e=t.charCodeAt(i);if(e===10||e===13||e===37&&t.charCodeAt(i+1)===37)break}return i}for(;i<r&&v(t.charCodeAt(i));)i++;if(t.charCodeAt(i)!==123||i>=e)return-1;let a=t.indexOf(`}`,i+1);return a===-1&&(e=i),a+1||-1}}var b=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,x={name:`TITLE`,pattern:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/y,first:`t`},S={name:`ACC_TITLE`,pattern:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/y,first:`a`},C={name:`ACC_DESCR`,pattern:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/y,first:`a`,scanner:y};function w(e,t){return{name:e,pattern:e,longer:t}}function T(e,t){return{...i(e),longer:[t]}}function E(e){return{name:e,pattern:/[A-Z_a-z][\w-]*/y,first:b+`_`}}function D(e){return{name:e,pattern:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/y,first:`"'`}}function O(e){return[{name:e+`_WHITESPACE`,pattern:/[\t \r\n]+/y,hidden:!0,first:` \r
|
|
2
2
|
`},{...s,name:e+`_YAML`,first:`-`},{...o,name:e+`_DIRECTIVE`,first:` %`},{...c,name:e+`_SINGLE_LINE_COMMENT`,first:` %`}]}function k(e){if(!e.includes(`\\`))return e.slice(1,-1);let t=e.length-1,n=``;for(let r=1;r<t;r++){let i=e[r];i===`\\`&&r+1<t?(i=e[++r],n+=i===`n`?`
|
|
3
3
|
`:i===`r`?`\r`:i===`t`?` `:i):n+=i}return n}function A(i,o,s,c,l,u){let d=new r(a(i,o,`railroad`),o,`railroad`),f={$type:s,rules:[]};for(d.expect(0);;){let r=d.kind;if(r===c){let e=t(d.take()),n=e[0];f.title=(n===`"`||n===`'`)&&e.endsWith(n)?l(e):e}else if(r===c+1)f.accTitle=n(d.take());else if(r===c+2)f.accDescr=e(d.take());else break}for(;d.kind!==-1;)f.rules.push(u(d));return f}var ie=[];function j(e){let t=e,n=t.element??t.primary??t.suffix,r=t.alternatives??t.elements??(n?[n]:ie);if(t.base){r=[t.base];for(let e of t.postfixes)e.except&&r.push(e.except)}return r}var M=e=>({type:`terminal`,value:e}),N=e=>({type:`nonterminal`,name:e}),P=e=>({type:`special`,text:e}),F=e=>({type:`optional`,element:e}),I=(e,t,n=1/0)=>({type:`repetition`,element:e,min:t,max:n});function L(e){return e.length===1?e[0]:{type:`sequence`,elements:e}}function R(e){return e.length===1?e[0]:{type:`choice`,alternatives:e}}function z(e,t){return e.rules.map(e=>({name:e.name,definition:B(e.definition,j,t)}))}function B(e,t,n){let r=[e],i=[t(e)],a=[[]];for(;;){let e=r.length-1,o=a[e];if(o.length<i[e].length){let n=i[e][o.length];r.push(n),i.push(t(n)),a.push([])}else{let t=n(r[e],o);if(e===0)return t;r.pop(),i.pop(),a.pop(),a[e-1].push(t)}}}var V=`0123456789`,H={name:`ABNF_RULENAME`,pattern:/[A-Za-z][A-Za-z0-9-]*/y,first:b},U={name:`ABNF_COMMENT`,pattern:/;[^\n\r]*/y,hidden:!0,first:`;`},W=[T(`railroad-abnf-beta`,H),w(`=`),w(`;`,[U]),w(`/`),w(`(`),w(`)`),w(`[`),w(`]`),x,S,C,H,{name:`ABNF_STRING`,pattern:/"[^"]*"/y,first:`"`},{name:`ABNF_NUMVAL`,pattern:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/y,first:`%`},{name:`ABNF_REPEAT`,pattern:/[0-9]*\*[0-9]*/y,first:V+`*`},{name:`ABNF_EXACT_REPEAT`,pattern:/[0-9]+/y,first:V},...O(`ABNF`),U];function G(e,t,n,r){let i={$type:`AbnfConcatenation`,elements:[]};return t.alternatives.push(i),{alternation:t,concatenation:i,node:e,close:n,repeat:r}}function ae(e){let t=[],n=G(void 0,{$type:`AbnfAlternation`,alternatives:[]},-2,void 0);for(;;){let r=e.kind===14||e.kind===15?e.take():void 0,i,a=e.kind;switch(a){case 12:i={$type:`AbnfStringLiteral`,value:e.take().slice(1,-1)};break;case 13:i={$type:`AbnfNumVal`,value:e.take()};break;case 11:i={$type:`AbnfRuleName`,name:e.take()};break;case 4:case 6:{e.i++;let i={$type:`AbnfAlternation`,alternatives:[]};t.push(n),n=G({$type:a===4?`AbnfGroup`:`AbnfOptionalGroup`,element:i},i,a+1,r);continue}default:e.fail(`a string, a number, a name, or an opening bracket`)}for(;;){n.concatenation.elements.push(r===void 0?{$type:`AbnfElement`,primary:i}:{$type:`AbnfElement`,repeat:r,primary:i});let a=e.kind;if(a===n.close)e.i++,i=n.node,r=n.repeat,n=t.pop();else{if(a===3)e.i++,n.concatenation={$type:`AbnfConcatenation`,elements:[]},n.alternation.alternatives.push(n.concatenation);else if(a!==12&&a!==13&&a!==11&&a!==4&&a!==6&&a!==14&&a!==15){if(t.length===0)return n.alternation;e.fail(`token of type '${W[n.close].name}'`)}break}}}}function oe(e){return A(e,W,`RailroadAbnf`,8,e=>e.slice(1,-1),e=>{let t=e.expect(11);e.expect(1);let n=ae(e);return e.expect(2),{$type:`AbnfRule`,name:t,definition:n}})}function se(e,t){switch(e.$type){case`AbnfAlternation`:return R(t);case`AbnfConcatenation`:return L(t);case`AbnfElement`:{let n=e.repeat;if(!n)return t[0];let r=n.indexOf(`*`),i=r===-1,a=r>0||i?parseInt(n,10):0,o=i?a:r<n.length-1?parseInt(n.slice(r+1),10):1/0;return a===0&&o===1?F(t[0]):I(t[0],a,o)}case`AbnfStringLiteral`:case`AbnfNumVal`:return M(e.value);case`AbnfRuleName`:return N(e.name);case`AbnfGroup`:return t[0];case`AbnfOptionalGroup`:return F(t[0])}}var ce=e=>z(e,se);function le(e,t){if(e.charCodeAt(t)!==63)return-1;let n=!1;for(let r=t+1;r<e.length;r++){let t=e.charCodeAt(r);if(t===63)return n?r+1:-1;if(t===59)return-1;n||=!v(t)}return-1}var ue=E(`EBNF_ID`),de={name:`EBNF_SPECIAL_SEQUENCE`,pattern:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/y,first:`?`,scanner:()=>le},fe=O(`EBNF`),pe={name:`EBNF_ISO_COMMENT`,pattern:/\(\*[\s\S]*?\*\)/y,hidden:!0,first:`(`,opener:/\(\*/y},me=[T(`railroad-ebnf-beta`,ue),w(`::=`),w(`=`),w(`;`),w(`|`),w(`,`),w(`(`,[pe]),w(`)`),w(`[`),w(`]`),w(`{`),w(`}`),w(`?`,[de]),w(`*`),w(`+`),w(`-`,[fe[1]]),x,S,C,ue,D(`EBNF_STRING`),de,...fe,{name:`EBNF_BLOCK_COMMENT`,pattern:/\/\*[\s\S]*?\*\//y,hidden:!0,first:`/`,opener:/\/\*/y},pe];function he(e,t,n,r){let i={$type:`EbnfSequence`,elements:[]};return t.alternatives.push(i),{choice:t,sequence:i,term:void 0,node:e,close:n,except:r}}var ge=[`EbnfGroup`,`EbnfOptional`,`EbnfRepetition`];function _e(e){let t=[],n=he(void 0,{$type:`EbnfChoice`,alternatives:[]},-2,!1),r=!1;for(;;){let i,a=e.kind;switch(a){case 20:i={$type:`EbnfTerminal`,value:k(e.take())};break;case 19:i={$type:`EbnfNonTerminal`,name:e.take()};break;case 21:i={$type:`EbnfSpecial`,text:e.take().slice(1,-1).trim()};break;case 6:case 8:case 10:{e.i++;let i={$type:`EbnfChoice`,alternatives:[]};t.push(n),n=he({$type:ge[a-6>>1],element:i},i,a+1,r),r=!1;continue}default:e.fail(`a terminal, a name, or an opening bracket`)}for(;;){r?(n.term.postfixes.push({$type:`EbnfExceptionPostfix`,except:i}),r=!1):(n.term={$type:`EbnfTerm`,base:i,postfixes:[]},n.sequence.elements.push(n.term));let a=n.term.postfixes;for(;;){let t=e.kind;if(t===12)a.push({$type:`EbnfOptionalPostfix`,operator:e.take()});else if(t===13)a.push({$type:`EbnfZeroOrMorePostfix`,operator:e.take()});else if(t===14)a.push({$type:`EbnfOneOrMorePostfix`,operator:e.take()});else break}let o=e.kind;if(o===n.close)e.i++,i=n.node,r=n.except,n=t.pop();else{if(o===15)e.i++,r=!0;else if(o===5)e.i++;else if(o===4)e.i++,n.sequence={$type:`EbnfSequence`,elements:[]},n.choice.alternatives.push(n.sequence);else if(o!==20&&o!==19&&o!==21&&o!==6&&o!==8&&o!==10){if(t.length===0)return n.choice;e.fail(`token of type '${me[n.close].name}'`)}break}}}}function ve(e){return A(e,me,`RailroadEbnf`,16,k,e=>{let t=e.expect(19);e.accept(2)||e.expect(1);let n={$type:`EbnfRule`,name:t,definition:_e(e)};return e.expect(3),n})}function ye(e,t){switch(e.$type){case`EbnfChoice`:return R(t);case`EbnfSequence`:return L(t);case`EbnfTerm`:{let n=t[0],r=1;for(let i of e.postfixes)n=i.$type===`EbnfOptionalPostfix`?F(n):i.$type===`EbnfExceptionPostfix`?{type:`sequence`,elements:[n,M(`-`),t[r++]]}:I(n,+(i.$type===`EbnfOneOrMorePostfix`));return n}case`EbnfTerminal`:return M(e.value);case`EbnfNonTerminal`:return N(e.name);case`EbnfSpecial`:return P(e.text);case`EbnfGroup`:return t[0];case`EbnfOptional`:return F(t[0]);case`EbnfRepetition`:return I(t[0],0)}}var be=e=>z(e,ye),K=E(`RR_ID`),q=e=>w(e,[K]),xe=[T(`railroad-beta`,K),q(`nonterminal`),q(`zeroOrMore`),q(`oneOrMore`),q(`sequence`),q(`optional`),q(`terminal`),q(`special`),q(`choice`),w(`=`),w(`;`),w(`(`),w(`,`),w(`)`),x,S,C,K,D(`RR_STRING`),...O(`RR`),{name:`RR_BLOCK_COMMENT`,pattern:/\/\*[\s\S]*?\*\//y,hidden:!0,first:`/`,opener:/\/\*/y}];function J(e){e.i++,e.expect(11);let t=k(e.expect(18));return e.expect(13),t}function Se(e){return{$type:e,element:void 0}}function Ce(e){let t=[];for(;;){let n;switch(e.kind){case 6:n={$type:`RailroadTerminalExpr`,value:J(e)};break;case 1:n={$type:`RailroadNonTerminalExpr`,name:J(e)};break;case 7:n={$type:`RailroadSpecialExpr`,text:J(e)};break;case 4:n={$type:`RailroadSequenceExpr`,elements:[]};break;case 8:n={$type:`RailroadChoiceExpr`,alternatives:[]};break;case 5:n=Se(`RailroadOptionalExpr`);break;case 3:n=Se(`RailroadOneOrMoreExpr`);break;case 2:n=Se(`RailroadZeroOrMoreExpr`);break;default:e.fail(`an expression`)}if(`elements`in n||`alternatives`in n||`element`in n)e.i++,e.expect(11),t.push(n);else for(;;){let r=t[t.length-1];if(r===void 0)return n;if(`element`in r)r.element=n;else if((`elements`in r?r.elements:r.alternatives).push(n),e.accept(12))break;e.expect(13),t.pop(),n=r}}}function we(e){return A(e,xe,`Railroad`,14,k,e=>{let t=e.expect(17);e.expect(9);let n=Ce(e);return e.expect(10),{$type:`RailroadRule`,name:t,definition:n}})}function Te(e,t){switch(e.$type){case`RailroadTerminalExpr`:return M(e.value);case`RailroadNonTerminalExpr`:return N(e.name);case`RailroadSpecialExpr`:return P(e.text);case`RailroadSequenceExpr`:return L(t);case`RailroadChoiceExpr`:return R(t);case`RailroadOptionalExpr`:return F(t[0]);default:return I(t[0],+(e.$type===`RailroadOneOrMoreExpr`))}}var Ee=e=>z(e,Te),De=E(`PEG_ID`),Oe=[T(`railroad-peg-beta`,De),w(`<-`),w(`;`),w(`/`),w(`&`),w(`!`),w(`?`),w(`*`),w(`+`),w(`(`),w(`)`),w(`.`),x,S,C,De,D(`PEG_STRING`),...O(`PEG`),{name:`PEG_LINE_COMMENT`,pattern:/#[^\n\r]*/y,hidden:!0,first:`#`}];function ke(e,t,n){let r={$type:`PegSequence`,elements:[]};return t.alternatives.push(r),{choice:t,sequence:r,node:e,operator:n}}function Ae(e){let t=[],n=ke(void 0,{$type:`PegOrderedChoice`,alternatives:[]},void 0);for(;;){let r=e.kind===4||e.kind===5?e.take():void 0,i;switch(e.kind){case 16:i={$type:`PegLiteral`,value:k(e.take())};break;case 15:i={$type:`PegIdentifier`,name:e.take()};break;case 11:i={$type:`PegAny`,dot:e.take()};break;case 9:{e.i++;let i={$type:`PegOrderedChoice`,alternatives:[]};t.push(n),n=ke({$type:`PegGroup`,element:i},i,r);continue}default:e.fail(`a literal, a name, a dot, or an opening parenthesis`)}for(;;){let a={$type:`PegSuffix`,primary:i};(e.kind===6||e.kind===7||e.kind===8)&&(a.operator=e.take()),n.sequence.elements.push(r===void 0?{$type:`PegPrefix`,suffix:a}:{$type:`PegPrefix`,operator:r,suffix:a});let o=e.kind;if(o===10&&t.length>0)e.i++,i=n.node,r=n.operator,n=t.pop();else{if(o===3)e.i++,n.sequence={$type:`PegSequence`,elements:[]},n.choice.alternatives.push(n.sequence);else if(o!==4&&o!==5&&o!==16&&o!==15&&o!==11&&o!==9){if(t.length===0)return n.choice;e.fail(`token of type ')'`)}break}}}}function je(e){return A(e,Oe,`RailroadPeg`,12,k,e=>{let t=e.expect(15);e.expect(1);let n={$type:`PegRule`,name:t,definition:Ae(e)};return e.expect(2),n})}function Me(e){switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}}function Ne(e,t){let n=t[0];switch(e.$type){case`PegOrderedChoice`:return R(t);case`PegSequence`:return L(t);case`PegPrefix`:return e.operator?P(e.operator+Me(n)):n;case`PegSuffix`:return e.operator?e.operator===`?`?F(n):I(n,+(e.operator===`+`)):n;case`PegLiteral`:return M(e.value);case`PegIdentifier`:return N(e.name);case`PegAny`:return P(e.dot);case`PegGroup`:return n}}var Pe=e=>z(e,Ne),Fe=class{type=`railroad`;notation=`railroad`;title;accTitle;accDescr;rules=[];byName=new Map;setTitle(e){this.title=e}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
4
4
|
`)}addRule(e){this.rules.push(e),this.byName.set(e.name,e)}getRule(e){return this.byName.get(e)}},Ie=/^\s*railroad-(ebnf-|abnf-|peg-)?beta/i;function Le(e){let t=Ie.exec(e);if(t===null)return;let n=t[1]?.toLowerCase();return n===`ebnf-`?`ebnf`:n===`abnf-`?`abnf`:n===`peg-`?`peg`:`railroad`}function Re(e,t){switch(t){case`ebnf`:{let t=ve(e);return[t,be(t)]}case`abnf`:{let t=oe(e);return[t,ce(t)]}case`peg`:{let t=je(e);return[t,Pe(t)]}default:{let t=we(e);return[t,Ee(t)]}}}function ze(e,t,n){let[r,i]=Re(t,n);e.notation=n,r.accDescr&&e.setAccDescription(r.accDescr),r.accTitle&&e.setAccTitle(r.accTitle),r.title&&e.setTitle(r.title);for(let t of i)e.addRule(t)}function Be(e,t){let n=Le(e);if(n===void 0)throw new g(`No railroad diagram keyword found.`,`syntax`,{type:`railroad`});let r=new Fe;return t&&(r.title=t),ze(r,e,n),r}var Ve=12,He=6,Ue=18,Y=12,X=7;function Z(e,t,n,r){let i=e.railroad?.[t];return typeof i==`number`&&i>=0?Math.min(i,r):n}var We=/[\n\r\t]/g;function Q(e){return(e.includes(`¶ß`)?_(e.replace(/&/g,`&`)):e).replace(We,e=>e===`
|
|
5
5
|
`?`\\n`:e===`\r`?`\\r`:`\\t`)}function $(e,t){for(let n=t,r=e.length-1;n<r;n++,r--){let t=e[n];e[n]=e[r],e[r]=t}}function Ge(e){return Math.ceil(e/2)*2}function Ke(e,t,n,r,i){let a=i.height/2;return{kind:e,width:Math.max(Ge(i.measurer.width(t,i.size,r)+2*i.padding),i.height),up:a,down:a,kids:ie,text:t,id:n,reach:0}}function qe(e,t){if(t===1/0&&e<=1)return``;let n=e=>Number.isFinite(e)?String(e):`∞`;return e===t?n(e)+`×`:t===1/0?`≥`+n(e)+`×`:e===0?`≤`+n(t)+`×`:n(e)+`–`+n(t)+`×`}function Je(e,t,n,r){return Math.max(e+t.down+r.sep+n.up,2*r.arc)}function Ye(e,t){let n=Math.max(e.up+t.sep,2*t.arc);return{kind:5,width:e.width+4*t.arc,up:n,down:e.down,kids:[e],text:``,id:``,reach:n}}function Xe(e,t,n=1/0){let r=new Map,i=[[e,n]];for(let e=0;n!==1/0&&e<i.length;e++){let[n,a]=i[e];r.set(n,a);let o=n.type===`choice`||n.type===`optional`?4*t.arc:n.type===`repetition`?(n.min===0?6:2)*t.arc:n.type===`sequence`?6*t.arc:0;for(let e of j(n))i.push([e,Math.max(40,a-o)])}return B(e,j,(e,n)=>{let i=r.get(e)??1/0;switch(e.type){case`terminal`:{let n=Q(e.value);return Ke(0,/^ +$/.test(n)?`␣`.repeat(n.length):n,``,4,t)}case`nonterminal`:return Ke(1,Q(e.name),e.name,0,t);case`special`:return Ke(2,`? `+Q(e.text)+` ?`,``,2,t);case`sequence`:{let e=Math.max(0,n.length-1)*t.gap,r=0,a=0;for(let t of n)e+=t.width,r=Math.max(r,t.up),a=Math.max(a,t.down);let o={kind:3,width:e,up:r,down:a,kids:n,text:``,id:``,reach:0};if(e<=i||n.length<2)return o;let s=[],c=[],l=0,u=()=>{let e=0,t=0;for(let n of c)e=Math.max(e,n.up),t=Math.max(t,n.down);s.push({kind:3,width:l,up:e,down:t,kids:c,text:``,id:``,reach:0}),c=[],l=0};for(let e of n)c.length&&l+t.gap+e.width>Math.max(40,i-6*t.arc)&&u(),l+=(c.length?t.gap:0)+e.width,c.push(e);if(u(),s.length<2)return o;let d=0,f=0;for(let e=0;e<s.length;e++)d=Math.max(d,s[e].width),e&&(f+=s[e-1].down+Math.max(t.sep,2*t.arc)+s[e].up);return{kind:7,width:d+6*t.arc,up:s[0].up,down:f+s[s.length-1].down,kids:s,text:``,id:``,reach:0}}case`choice`:{let e=0,r=0;for(let i=0;i<n.length;i++)e=Math.max(e,n[i].width),i>0&&(r=Je(r,n[i-1],n[i],t));let i=n[n.length-1];return{kind:4,width:e+4*t.arc,up:n.length>0?n[0].up:0,down:i?r+i.down:0,kids:n,text:``,id:``,reach:0}}case`optional`:return Ye(n[0],t);case`repetition`:{let{min:r,max:i}=e,a=n[0];if(r===1&&i===1)return a;let o=qe(r,i),s=Math.max(a.down+t.sep,2*t.arc),c=o===``?0:Ge(t.measurer.width(o,Y,0)),l={kind:6,width:Math.max(a.width,c)+2*t.arc,up:a.up,down:s+(o===``?X/2+1:Y+6),kids:[a],text:o,id:``,reach:s};return r===0?Ye(l,t):l}}})}function Ze(e,t,n){return te(n,r=>Qe(e,t,n,r))}function Qe(e,t,n,r){let i=n.fontSize??16,a=Z(t,`fontSize`,0,200),o=a||Math.round(i*.875),s=a||i,c=Z(t,`padding`,-1,200),te=Math.round(o*1.5),g={measurer:n.measurer??re(n.fontFamily,n.fontFamilyMono),size:o,padding:c<0?12:c,height:Ge(te+(c<0?9:2*c)),gap:Math.min(Z(t,`horizontalSeparation`,16,500),r?12:1/0),sep:Z(t,`verticalSeparation`,10,500),arc:Math.min(Z(t,`arcRadius`,10,200),r?6:1/0)},_=t.railroad?.showMarkers===!1?0:Z(t,`markerRadius`,4,50),v=Z(t,`strokeWidth`,0,20),y=v>0?` stroke-width="${l(v)}"`:``,b=n.padding??8,{arc:x}=g,S=l(x),C=(e,t,n)=>`a${S},${S} 0 0 ${e} ${t}${S},${n}${S}`,w=C(1,``,``),T=C(0,``,``),E=C(0,``,`-`),D=C(1,``,`-`),O=C(0,`-`,``),k=C(0,`-`,`-`),A=p(e.title,!1,g.measurer,i,r?ne(n):4e3,1),ie=A.height>0?A.height+16:0,j=Math.round(s*1.5),M=o*.35,N=g.height/2,P=``,F=``,I=``,L=(e,t,n)=>{n>e&&(P+=`M${l(e)},${l(t)}H${l(n)}`)},R=(e,t,n)=>{let r=[e],i=[t,n];for(;r.length>0;){let e=r.pop(),t=i.pop(),n=i.pop(),a=e.kids,o=n+e.width;switch(e.kind){case 3:{let e=o;for(let n=a.length-1;n>=0;n--)e-=a[n].width,r.push(a[n]),i.push(e,t),n>0&&L(e-g.gap,t,e),e-=g.gap;break}case 7:{let e=n+2*x,s=r.length,c=0;L(n,t,e);for(let s=0;s<a.length;s++){let u=a[s],d=t+c;if(r.push(u),i.push(d,e),s+1<a.length){let r=a[s+1],i=c+u.down+Math.max(g.sep,2*x)+r.up,f=t+c+u.down+Math.max(g.sep,2*x)/2;P+=`M${l(e+u.width)},${l(d)}H${l(o-2*x)}V${l(f)}H${l(n+x)}V${l(t+i)}H${l(e)}`,F+=`M${l(e-X)},${l(t+i-X/2)}l${X},${X/2}l${-X},${X/2}z`,c=i}else P+=`M${l(e+u.width)},${l(d)}H${l(o-x)}V${l(t)}H${l(o)}`}$(r,s),$(i,2*s);break}case 4:{let s=e.width-4*x,c=n+x,u=o-x,d=r.length,f=0;for(let e=0;e<a.length;e++){let d=a[e];e>0&&(f=Je(f,a[e-1],d,g));let p=t+f,m=n+2*x+(s-d.width)/2,ee=e===a.length-1;e===0?(L(n,t,m),L(m+d.width,t,o)):P+=(ee?`M${l(n)},${l(t)}${w}V${l(p-x)}`:`M${l(c)},${l(p-x)}`)+T+(m>c+x?`H${l(m)}`:``)+`M${l(m+d.width)},${l(p)}`+(m>c+x?`H${l(u-x)}`:``)+E+(ee?`V${l(t+x)}${D}`:``),r.push(d),i.push(p,m)}$(r,d),$(i,2*d);break}case 5:{let s=a[0],c=n+2*x;L(n,t,c),L(c+s.width,t,o),P+=`M${l(n)},${l(t)}${E}V${l(t-e.reach+x)}${D}H${l(o-2*x)}${w}V${l(t-x)}${T}`,r.push(s),i.push(c,t);break}case 6:{let s=a[0],c=n+(e.width-s.width)/2,u=t+e.reach,d=n+e.width/2;L(n,t,c),L(c+s.width,t,o),P+=`M${l(n+x)},${l(t)}${O}V${l(u-x)}${T}H${l(o-x)}${E}V${l(t+x)}${k}`,F+=`M${l(d-X/2)},${l(u)}l${X},${-X/2}v${X}z`,e.text!==``&&(I+=`<text class="pele-edge-label pele-count" x="${l(d)}" y="${l(u+Y+3)}" font-size="${Y}" fill="var(--_m)">${h(e.text)}</text>`),r.push(s),i.push(c,t);break}default:{let r=e.text,i=r.startsWith(` `)||r.endsWith(` `)||r.includes(` `)?` xml:space="preserve"`:``,a=`<rect x="${l(n)}" y="${l(t-N)}" width="${l(e.width)}" height="${l(g.height)}"`,o=`<text x="${l(n+e.width/2)}" y="${l(t+M)}"${i}`;e.kind===0?I+=`<g class="pele-node pele-terminal">${a} rx="${l(N)}" fill="var(--_s)" stroke="var(--_b)"${y}/>${o} font-family="${ee}">${h(r)}</text></g>`:e.kind===1?I+=`<g class="pele-node pele-nonterminal" data-id="${f(e.id)}">${a} fill="var(--_bg)" stroke="var(--_b)"${y}${d}/>${o}>${h(r)}</text></g>`:I+=`<g class="pele-node pele-special">${a} fill="var(--_bg)" stroke="var(--_b)" stroke-dasharray="4 3"${y}${d}/>${o} font-style="italic"><tspan fill="var(--_m)">? </tspan>${h(r.slice(2,-2))}<tspan fill="var(--_m)"> ?</tspan></text></g>`}}}},z=``,B=A.width,V=b+ie,H=b+A.height;for(let t of e.rules){let e=Xe(t.definition,g,r?Math.max(80,(n.maxWidth??320)-2*b-4*_-2*Ve-1):1/0),i=Q(t.name),a=V+j+He+e.up,o=b+2*_,c=o+Ve,u=c+e.width+Ve;P=``,F=``,I=``,L(o,a,c),L(c+e.width,a,u),R(e,c,a);let d=_>0?`<circle class="pele-marker pele-start" cx="${l(b+_)}" cy="${l(a)}" r="${l(_)}" fill="var(--_l)"/><circle class="pele-marker pele-end" cx="${l(u+_)}" cy="${l(a)}" r="${l(_)}" fill="var(--_l)"/>`:``;z+=`<g class="pele-rule" data-id="${f(t.name)}"><text class="pele-rule-name" x="${l(b)}" y="${l(V+j/2+s*.35)}" font-size="${l(s)}" font-weight="var(--_hw)" text-anchor="start">${h(i)}</text><path class="pele-edge pele-track" d="${P}" fill="none" stroke="var(--_l)"${y}/>`+(F?`<path class="pele-marker" d="${F}" fill="var(--_l)"/>`:``)+d+I+`</g>`,B=Math.max(B,u+2*_-b,g.measurer.width(i,s,1)),H=a+e.down,V=H+g.sep+Ue}let U=Math.ceil(B+2*b),W=Math.ceil(H+b),G=m(A,U/2,b+A.height/2,` class="pele-title" font-weight="var(--_tw)"`)+(z?`<g class="pele-rules" transform="translate(0.5,0.5)" font-size="${l(o)}" text-anchor="middle">${z}</g>`:``);return{svg:u(`railroad`,U,W,i,n,e,G),width:U,height:W,links:[]}}var $e={type:`railroad`,parse:(e,t,n)=>Be(e,n),render:Ze};export{$e as railroad};
|
|
6
|
-
//# sourceMappingURL=DRLTVNUE-
|
|
6
|
+
//# sourceMappingURL=DRLTVNUE-D99K7hWK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{_ as e,c as t,f as n,g as r,h as i,i as a,m as o,n as s,r as c,s as l,t as u,v as d,y as f}from"./77XECAW3-
|
|
1
|
+
import{_ as e,c as t,f as n,g as r,h as i,i as a,m as o,n as s,r as c,s as l,t as u,v as d,y as f}from"./77XECAW3-C1endahg.js";import{r as p}from"./DKTLEL5E-DciMwFJ1.js";import{t as m}from"./TSHNXIZL-CLTZIB-s.js";import{i as h,o as ee,t as te}from"./5N7A7DKN-DIzrmjXm.js";import{n as ne,r as g,t as _}from"./CXAC5362-DdZ6n5qP.js";import{PeleError as v,_ as re,g as y,n as b}from"./lazy-8c6T_8yh.js";var x=class{type=`kanban`;title;sections=[];getType=_;last;sectionLevel=0;misplaced;addNode(e,t,n,r,i){let a={id:t,level:e,label:n};if(i!==void 0){let e=i.includes(`
|
|
2
2
|
`)?i+`
|
|
3
3
|
`:`{
|
|
4
4
|
`+i+`
|
|
5
5
|
}`,t;try{t=b(e)}catch(e){throw new v(`Metadata of "${a.id}" is not valid YAML. ${e.message}`,`syntax`,{type:`kanban`})}if(typeof t==`object`&&t&&!Array.isArray(t)){let e=t.shape?String(t.shape):``;if(e!==e.toLowerCase()||e.includes(`_`))throw new v(`No such shape: ${e}. Shape names should be lowercase.`,`semantic`,{type:`kanban`});t.label&&(a.label=String(t.label)),t.icon&&(a.icon=String(t.icon)),t.assigned&&(a.assigned=String(t.assigned)),t.ticket&&(a.ticket=String(t.ticket)),t.priority&&(a.priority=String(t.priority))}}if(this.misplaced)throw new v(`Items without section detected, found section ("${this.misplaced.label}")`,`semantic`,{type:`kanban`});let o=this.sections;if(o.length===0&&(this.sectionLevel=e),this.last=a,e===this.sectionLevel){let e=a;e.items=[],o.push(e)}else o[o.length-1].items.push(a),e<this.sectionLevel&&(this.misplaced=a)}decorateNode(e){let t=this.last;!e||!t||(e.icon&&(t.icon=e.icon),e.class&&(t.cssClasses=e.class))}};function S(e,t){g(e,t,!0)}var C=12,w=8,T=10,E=8,ie=4,D=6,ae=new Map([[`very high`,`stroke="${t}"`],[`high`,`stroke="${t}" opacity="0.5"`],[`low`,`stroke="var(--_m)" opacity="0.5"`],[`very low`,`stroke="var(--_m)"`]]);function O(e,t,n,r,i,o=0){let s=l(e,t,n,r,i,o);if(s.width<=i)return s;let c=[],u=[],d=0,f=[],p=0,m=()=>{c.push(f),u.push(p),d=Math.max(d,p),f=[],p=0};for(let e=0;e<s.lines.length;e++)if(s.widths[e]<=i)f=s.lines[e],p=s.widths[e],m();else{for(let t of s.lines[e]){if(t.icon!==void 0||t.math){p>0&&p+t.width>i&&m(),f.push(t),p+=t.width;continue}let e=``,a=p;for(let o of t.text){let s=n.width(o,r,t.style);p>0&&p+s>i&&(e&&f.push({text:e,style:t.style,width:p-a}),m(),e=``,a=0),e+=o,p+=s}e&&f.push({text:e,style:t.style,width:p-a})}m()}let h={...s,lines:c,widths:u,width:d,height:c.length*s.lineHeight};return s.heights?a(h):h}function k(e,t,r,a,o,c=!1){let l=``;for(let p=0;p<e.lines.length;p++){let m=e.lines[p],h=r+i(e,p);if(m.length===1&&m[0].icon===void 0&&m[0].math===void 0)l+=`<text${d(a,m[0].style)} x="${n(t)}" y="${n(h+e.size*.35)}"${c?` text-anchor="end"`:``}>${f(m[0].text)}</text>`;else{let n=e.widths[p];l+=u(s(e,p),t+(c?-n:n)/2,h,a,o)}}return l}var A=e=>!!e&&y(e)!==``;function j(t,i,a){let s=a.fontSize??16,d=Math.round(s*.875),g=Math.round(s*1.5),_=Math.round(d*1.5),v=a.measurer??re(a.fontFamily),y=a.padding??8,b=a.icons,x=i.kanban??{},S=x.sectionWidth,j=d*1.25,M=0,N=(e,t,n)=>{if(e&&e.includes(`$$`))for(let r of l(e,!0,v,t,1/0).lines)for(let e of r)e.math&&(M=Math.max(M,e.math.width+n))};for(let e of t.sections){let t=v.width(String(e.items.length),d,0);N(e.label,s,2*w+8+t+12+(A(e.icon)?j+D:0));for(let t of e.items){let e=2*(w+T);N(t.label,d,e+(A(t.icon)?j+D:0)),N(t.ticket,d,e),N(t.assigned,d,e)}}let P=Math.max(typeof S==`number`&&S>0?Math.min(Math.max(S,80),2e3):200,Math.ceil(M)),F=a.maxWidth!==void 0&&a.maxWidth>0?a.maxWidth-2*y:1/0,I=t.sections.length,L=I*(P+C)-C<=F,R=L?Math.max(I,1):Math.max(1,Math.floor((F+C)/(P+C))),z=L?P:Math.max(Math.min(P,F),Math.min(Math.floor((F+C)/R)-C,P*2),Math.ceil(M)),oe=typeof x.ticketBaseUrl==`string`?x.ticketBaseUrl:``,B=z-2*w,V=B-2*T,H=[],U=t.sections,W=[],G=[],K=[],q=g,J=[];for(let e of U){let t=v.width(String(e.items.length),d,0),n=t+12+(A(e.icon)?j+D:0),r=O(e.label,!0,v,s,B-8-n,1);q=Math.max(q,r.height),G.push(t),W.push(r);let i=[],a=0;for(let t of e.items){let e=O(t.label,!0,v,d,V-(A(t.icon)?j+D:0)),n=O(t.ticket,!1,v,d,V),r=O(t.assigned,!1,v,d,V),o=n.width+r.width+8>V?n.height+r.height:Math.max(n.height,r.height),s=2*T+Math.max(e.height,_)+(o?ie+o:0);i.push({item:t,label:e,ticket:n,assigned:r,meta:o,height:s}),a+=s+E}K.push(i),J.push(a)}q+=2*w;let Y=[],X=[];for(let e=0,t=0;e<U.length;e+=R){let n=E;for(let t=e;t<Math.min(e+R,U.length);t++)n=Math.max(n,J[t]);X.push(t),Y.push(q+n),t+=q+n+C}let se=Y.length>0?X[X.length-1]+Y[Y.length-1]:0,Z=m(t.title,v,s,p(a)),ce=Z.height>0?Z.height+16:0,le=Math.max(Math.min(U.length,R)*(z+C)-C,0),Q=Math.max(le,Z.width),ue=y+(Q-le)/2,de=z-w-4,fe=``;for(let t=0;t<U.length;t++){let r=U[t],i=Math.floor(t/R),s=`<rect width="${z}" height="${n(Y[i])}" fill="var(--_s)"${o}/>`+k(W[t],w+4,w,` class="pele-cluster-label" font-weight="var(--_hw)"`,b)+`<text class="pele-count" x="${de}" y="${n(w+g/2+d*.35)}" text-anchor="end" font-size="${d}" fill="var(--_m)">${r.items.length}</text>`;A(r.icon)&&(s+=ne(r.icon,de-G[t]-D-j,w+(g-j)/2,j,b));let l=q;for(let r of K[t]){let t=r.item,i=(t.priority??``).trim().toLowerCase(),u=ae.get(i),p=`<rect width="${B}" height="${n(r.height)}" fill="var(--_bg)" stroke="var(--_b)"${o}/>`;u!==void 0&&(p+=`<path class="pele-priority" d="M2.5,5V${n(r.height-5)}" fill="none" ${u} stroke-width="3" stroke-linecap="round"/>`),p+=k(r.label,T,T,` class="pele-label"`,b),A(t.icon)&&(p+=ne(t.icon,B-T-j,T+(_-j)/2,j,b));let m=r.height-T;if(t.ticket){let e=m-r.meta,n=oe?h(te(oe.replace(`#TICKET#`,()=>t.ticket)),a):void 0;n===void 0?p+=k(r.ticket,T,e,` class="pele-ticket" fill="var(--_m)"`,b):(p+=`<a href="${f(n)}" target="_blank"${ee(a)}>`+k(r.ticket,T,e,` class="pele-ticket" fill="var(--_c)"`,b)+`</a>`,H.push({id:t.id,href:n,internal:!1}))}t.assigned&&(p+=k(r.assigned,B-T,m-r.assigned.height,` class="pele-assigned" fill="var(--_m)"`,b,!0)),s+=`<g class="pele-node pele-card${u===void 0?``:` pele-priority-`+i.replace(` `,`-`)}${e(t.cssClasses??``)}" data-id="${c(t.id)}" transform="translate(${w},${n(l)})" font-size="${d}">${p}</g>`,l+=r.height+E}fe+=`<g class="pele-cluster pele-column${e(r.cssClasses??``)}" data-id="${c(r.id)}" transform="translate(${n(ue+t%R*(z+C))},${n(y+ce+X[i])})">${s}</g>`}let $=Math.ceil(Q+2*y),pe=Math.ceil(se+ce+2*y),me=u(Z,$/2,y+Z.height/2,` class="pele-title" font-weight="var(--_tw)"`)+fe;return{svg:r(`kanban`,$,pe,s,a,{},me),width:$,height:pe,links:H}}var M={type:`kanban`,math:!0,parse(e,t,n){let r=new x;return r.title=n,S(e,r),r},render:j};export{M as kanban};
|
|
6
|
-
//# sourceMappingURL=DYY6UVD2-
|
|
6
|
+
//# sourceMappingURL=DYY6UVD2-BF6iP9-o.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{Ef as i,Gf as a,Ml as o,Ol as s,Qu as c,Rl as l,Sf as u,Sl as d,Xd as f,Zn as p,ar as m,cf as h,cp as g,ef as _,fr as v,hd as y,hl as b,ir as x,jl as S,kd as C,mr as w,or as T,qd as E,qu as D,rr as O,sr as k,t as ee,tr as A,xf as j}from"./utils-DsOiwDNN.js";import{R as te,U as ne,u as M}from"./TooltipProvider-DPt8xz_3.js";import{a as N,c as P,o as F,s as re,t as I}from"./select-Dn3MxyiK.js";import{t as ie}from"./spinner-fU7Q2OR1.js";import{t as L}from"./query-B8d0w621.js";import{t as R}from"./use-atom-command-BkSai4ZH.js";import{u as ae}from"./rightPanelStore-BuudmoUr.js";import{N as z}from"./PanelLayoutControls-D6h4yyW-.js";import{a as B,n as V,t as H}from"./tooltip-Da633nbs.js";import{n as oe,t as se}from"./toggle-group-Dx-ruC5S.js";import{t as U}from"./input-Cd-93Wp0.js";import{t as ce}from"./dialog-wBelv1Ac.js";import{i as W,n as G,r as le,t as K}from"./device-CG5GzxuX.js";import{t as ue}from"./hubAccess-CsZ8CNmg.js";import{c as de,r as fe,s as q,u as J}from"./DeviceSetup-DQqwNSXQ.js";import{i as Y}from"./previewMiniPlayerStore-D98YBqjW.js";import{t as X}from"./discovery-list-VELXPQtS.js";import{Ao as pe,Do as me,Mo as he,jo as ge,ko as _e}from"./main-CNyrs4J_.js";import{_ as ve,g as ye,h as be,x as xe}from"./_chat-B7MuBHoN.js";var Z=e(t(),1),Q=n(),Se=class extends Error{status;constructor(e){super(`Screenshot capture failed (${e}). Try again.`),this.status=e}};async function Ce(e,t){let n=e.platform===`ios`?`serve-sim`:`serve-emu`,r=ue(`${e.access.httpBase}/vendor/${n}/api/screenshot?device=${encodeURIComponent(e.deviceId)}`,e.access),i=await fetch(r,{method:`POST`,credentials:e.access.credentials?`include`:`omit`,signal:AbortSignal.any([t,AbortSignal.timeout(2e4)])});if(!i.ok)throw new Se(i.status);let a=await i.blob();if(!a.size)throw Error(`The device returned an empty screenshot. Try again.`);return a}var $=e(r(),1);function we(e){let t=(0,Q.c)(71),{view:n,handle:r,controls:l}=e,f=l.detail?.settings,m=!r?.inputConnected,b=e.hostKind===`local`||e.hostKind===`ssh`,S=f?.appearance===`dark`?`light`:`dark`,T;t[0]===r?T=t[1]:(T=()=>r?.pressButton(`home`),t[0]=r,t[1]=T);let ee;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(D,{}),t[2]=ee):ee=t[2];let N;t[3]!==m||t[4]!==T?(N=(0,$.jsx)(De,{tooltipSide:`left`,label:`Home`,disabled:m,onClick:T,children:ee}),t[3]=m,t[4]=T,t[5]=N):N=t[5];let P;t[6]!==l||t[7]!==r||t[8]!==m||t[9]!==e.platform||t[10]!==b||t[11]!==n.keyboard?.attached?(P=e.platform===`android`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(De,{tooltipSide:`left`,label:`Back`,disabled:m,onClick:()=>r?.pressButton(`back`),children:(0,$.jsx)(o,{})}),(0,$.jsx)(De,{tooltipSide:`left`,label:`Recents`,disabled:m,onClick:()=>r?.pressButton(`recents`),children:(0,$.jsx)(i,{})}),b?(0,$.jsxs)(p,{children:[(0,$.jsx)(v,{render:(0,$.jsx)(w,{size:`icon-sm`,variant:`ghost`,"aria-label":`Rotate device`,disabled:l.disabled}),children:(0,$.jsx)(h,{})}),(0,$.jsxs)(O,{side:`left`,children:[(0,$.jsx)(A,{onClick:()=>void l.act({type:`setOrientation`,value:`portrait`}),children:`Portrait`}),(0,$.jsx)(A,{onClick:()=>void l.act({type:`setOrientation`,value:`landscape_left`}),children:`Landscape`})]})]}):null]}):(0,$.jsx)(De,{tooltipSide:`left`,label:`Rotate device`,disabled:m||!!n.keyboard?.attached,onClick:()=>r?.rotate(),children:(0,$.jsx)(h,{})}),t[6]=l,t[7]=r,t[8]=m,t[9]=e.platform,t[10]=b,t[11]=n.keyboard?.attached,t[12]=P):P=t[12];let F;t[13]!==l||t[14]!==S||t[15]!==e.onTools||t[16]!==e.toolsOpen||t[17]!==b||t[18]!==f?.appearance||t[19]!==f?.textSize?(F=b?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Ee,{}),(0,$.jsx)(De,{tooltipSide:`left`,label:`Switch device to ${S} mode`,disabled:l.disabled||!f?.appearance,onClick:()=>void l.act({type:`setAppearance`,value:S}),children:(0,$.jsx)(M,{icon:f?.appearance===`dark`?ne:te})}),(0,$.jsxs)(p,{children:[(0,$.jsx)(v,{render:(0,$.jsx)(w,{size:`icon-sm`,variant:`ghost`,"aria-label":`Device text size`,title:`Device text size`,disabled:l.disabled||!f?.textSize}),children:(0,$.jsx)(a,{})}),(0,$.jsx)(O,{side:`left`,className:`min-w-40`,children:(0,$.jsx)(x,{value:f?.textSize??``,onValueChange:e=>{(e===`small`||e==="default"||e===`large`||e===`extra-large`)&&l.act({type:`setTextSize`,value:e})},children:[[`small`,`Small`],[`default`,`Default`],[`large`,`Large`],[`extra-large`,`Extra large`]].map(Te)})})]}),(0,$.jsx)(De,{tooltipSide:`left`,label:`Device tools`,pressed:e.toolsOpen,onClick:e.onTools,children:(0,$.jsx)(j,{})})]}):null,t[13]=l,t[14]=S,t[15]=e.onTools,t[16]=e.toolsOpen,t[17]=b,t[18]=f?.appearance,t[19]=f?.textSize,t[20]=F):F=t[20];let re=e.screenshotPending?`Capturing screenshot`:`Save screenshot`,I=!n.streaming||e.screenshotPending,ie;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,$.jsx)(s,{}),t[21]=ie):ie=t[21];let L;t[22]!==e.onScreenshot||t[23]!==re||t[24]!==I?(L=(0,$.jsx)(De,{tooltipSide:`left`,label:re,disabled:I,onClick:e.onScreenshot,children:ie}),t[22]=e.onScreenshot,t[23]=re,t[24]=I,t[25]=L):L=t[25];let R;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(v,{render:(0,$.jsx)(w,{size:`icon-sm`,variant:`ghost`,"aria-label":`More device actions`,title:`More device actions`}),children:(0,$.jsx)(C,{})}),t[26]=R):R=t[26];let ae;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,$.jsx)(E,{}),t[27]=ae):ae=t[27];let z;t[28]===e.onFloat?z=t[29]:(z=(0,$.jsxs)(A,{onClick:e.onFloat,children:[ae,`Float device over chat`]}),t[28]=e.onFloat,t[29]=z);let B;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(g,{}),t[30]=B):B=t[30];let V;t[31]===e.onClose?V=t[32]:(V=(0,$.jsxs)(A,{onClick:e.onClose,children:[B,`Close device panel`]}),t[31]=e.onClose,t[32]=V);let H;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(k,{}),t[33]=H):H=t[33];let oe;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(_,{}),t[34]=oe):oe=t[34];let se;t[35]===e.onPowerOff?se=t[36]:(se=(0,$.jsxs)(A,{variant:`destructive`,onClick:e.onPowerOff,children:[oe,`Power off device`]}),t[35]=e.onPowerOff,t[36]=se);let U;t[37]!==z||t[38]!==V||t[39]!==se?(U=(0,$.jsxs)(p,{children:[R,(0,$.jsxs)(O,{side:`left`,align:`end`,children:[z,V,H,se]})]}),t[37]=z,t[38]=V,t[39]=se,t[40]=U):U=t[40];let ce;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,$.jsx)(Ee,{}),t[41]=ce):ce=t[41];let W=!n.streaming||!!n.phoneUnavailableReason,G=n.phoneUnavailableReason??void 0,le;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,$.jsx)(d,{}),t[42]=le):le=t[42];let K;t[43]!==W||t[44]!==G||t[45]!==n.phone||t[46]!==n.showPhone?(K=(0,$.jsx)(De,{tooltipSide:`left`,label:`3D view`,pressed:n.phone,disabled:W,description:G,onClick:n.showPhone,children:le}),t[43]=W,t[44]=G,t[45]=n.phone,t[46]=n.showPhone,t[47]=K):K=t[47];let ue=!n.phone,de=!n.streaming,fe;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,$.jsx)(u,{}),t[48]=fe):fe=t[48];let q;t[49]!==ue||t[50]!==de||t[51]!==n.showFlat?(q=(0,$.jsx)(De,{tooltipSide:`left`,label:`Flat view`,pressed:ue,disabled:de,onClick:n.showFlat,children:fe}),t[49]=ue,t[50]=de,t[51]=n.showFlat,t[52]=q):q=t[52];let J;t[53]===n.keyboard?J=t[54]:(J=n.keyboard?(0,$.jsx)(De,{tooltipSide:`left`,label:n.keyboard.attached?`Detach Magic Keyboard`:`Attach Magic Keyboard`,pressed:n.keyboard.attached,onClick:n.keyboard.toggle,children:(0,$.jsx)(c,{})}):null,t[53]=n.keyboard,t[54]=J);let Y;t[55]!==n.phone||t[56]!==n.resetView?(Y=n.phone?(0,$.jsx)(De,{tooltipSide:`left`,label:`Restore 3D view`,onClick:n.resetView,children:(0,$.jsx)(y,{})}):null,t[55]=n.phone,t[56]=n.resetView,t[57]=Y):Y=t[57];let X;t[58]!==U||t[59]!==N||t[60]!==K||t[61]!==q||t[62]!==J||t[63]!==Y||t[64]!==P||t[65]!==F||t[66]!==L?(X=(0,$.jsxs)(`div`,{className:`pointer-events-auto flex shrink-0 flex-col items-center gap-1 overflow-y-auto rounded-full border border-border/50 bg-background/80 p-2 shadow-sm [scrollbar-width:none]`,children:[N,P,F,L,U,ce,K,q,J,Y]}),t[58]=U,t[59]=N,t[60]=K,t[61]=q,t[62]=J,t[63]=Y,t[64]=P,t[65]=F,t[66]=L,t[67]=X):X=t[67];let pe;return t[68]!==X||t[69]!==n.foldingControls?(pe=(0,$.jsxs)(`aside`,{"aria-label":`Device controls`,"data-layout":`rail`,className:`pointer-events-none absolute inset-y-0 right-0 z-10 flex w-14 flex-col items-center gap-2 overflow-y-auto [justify-content:safe_center] py-3 pr-2 [scrollbar-width:none]`,children:[X,n.foldingControls]}),t[68]=X,t[69]=n.foldingControls,t[70]=pe):pe=t[70],pe}function Te(e){let[t,n]=e;return(0,$.jsx)(m,{value:t,children:(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`flex-1`,children:n}),(0,$.jsx)(T,{})]})},t)}function Ee(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`div`,{"aria-hidden":!0,className:`my-1 h-px w-5 shrink-0 bg-border/70`}),e[0]=t):t=e[0],t}function De(e){let t=(0,Q.c)(18),n=e.pressed?`secondary`:`ghost`,r;t[0]!==e.children||t[1]!==e.disabled||t[2]!==e.label||t[3]!==e.onClick||t[4]!==e.pressed||t[5]!==n?(r=(0,$.jsx)(w,{size:`icon-sm`,variant:n,"aria-label":e.label,"aria-pressed":e.pressed,disabled:e.disabled,onClick:e.onClick,children:e.children}),t[0]=e.children,t[1]=e.disabled,t[2]=e.label,t[3]=e.onClick,t[4]=e.pressed,t[5]=n,t[6]=r):r=t[6];let i=r,a;t[7]!==i||t[8]!==e.description||t[9]!==e.disabled||t[10]!==e.label?(a=e.disabled&&e.description?(0,$.jsx)(B,{render:(0,$.jsx)(`span`,{className:`inline-flex`,tabIndex:0,role:`group`,"aria-label":e.label}),children:i}):(0,$.jsx)(B,{render:i}),t[7]=i,t[8]=e.description,t[9]=e.disabled,t[10]=e.label,t[11]=a):a=t[11];let o=e.description??e.label,s;t[12]!==e.tooltipSide||t[13]!==o?(s=(0,$.jsx)(V,{side:e.tooltipSide,children:o}),t[12]=e.tooltipSide,t[13]=o,t[14]=s):s=t[14];let c;return t[15]!==a||t[16]!==s?(c=(0,$.jsxs)(H,{children:[a,s]}),t[15]=a,t[16]=s,t[17]=c):c=t[17],c}var Oe=[{value:`small`,label:`Small`},{value:`default`,label:`Default`},{value:`large`,label:`Large`},{value:`extra-large`,label:`Extra large`}],ke=[{value:`none`,label:`None`},{value:`grayscale`,label:`Grayscale`},{value:`red-green`,label:`Red / green (protanopia)`},{value:`green-red`,label:`Green / red (deuteranopia)`},{value:`blue-yellow`,label:`Blue / yellow (tritanopia)`}],Ae=[{value:`portrait`,label:`Portrait`},{value:`landscape_left`,label:`Landscape left`},{value:`portrait_upside_down`,label:`Upside down`},{value:`landscape_right`,label:`Landscape right`}],je=[{value:`camera`,label:`Camera`},{value:`microphone`,label:`Microphone`},{value:`photos`,label:`Photos`},{value:`contacts`,label:`Contacts`},{value:`calendar`,label:`Calendar`},{value:`reminders`,label:`Reminders`},{value:`location`,label:`Location`},{value:`notifications`,label:`Notifications`},{value:`motion`,label:`Motion`},{value:`media-library`,label:`Media library`},{value:`faceid`,label:`Face ID`}],Me=[{value:`camera`,label:`Camera`},{value:`microphone`,label:`Microphone`},{value:`photos`,label:`Photos`},{value:`contacts`,label:`Contacts`},{value:`calendar`,label:`Calendar`},{value:`location`,label:`Location`},{value:`notifications`,label:`Notifications`},{value:`motion`,label:`Physical activity`}],Ne=[{label:`San Francisco`,latitude:37.7749,longitude:-122.4194},{label:`New York`,latitude:40.7128,longitude:-74.006},{label:`London`,latitude:51.5074,longitude:-.1278},{label:`Stockholm`,latitude:59.3293,longitude:18.0686},{label:`Tokyo`,latitude:35.6762,longitude:139.6503}];function Pe(e){let t=(0,Q.c)(129),{device:n,controls:r}=e,{detail:i,pending:a,error:o,foregroundApp:s,disabled:c,act:l}=r,u=i?.settings,d=n.platform===`ios`,f;t[0]===e.className?f=t[1]:(f=ee(`flex min-h-0 flex-col border-border bg-background text-sm`,e.className),t[0]=e.className,t[1]=f);let p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`font-medium`,children:`Tools`}),t[2]=p):p=t[2];let m;t[3]===a?m=t[4]:(m=a?(0,$.jsx)(ie,{size:`sm`}):null,t[3]=a,t[4]=m);let h;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(g,{}),t[5]=h):h=t[5];let _;t[6]===e.onClose?_=t[7]:(_=(0,$.jsx)(w,{size:`icon-xs`,variant:`ghost-muted`,"aria-label":`Close tools`,className:`ml-auto`,onClick:e.onClose,children:h}),t[6]=e.onClose,t[7]=_);let v;t[8]!==m||t[9]!==_?(v=(0,$.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center gap-2 border-b px-3`,children:[p,m,_]}),t[8]=m,t[9]=_,t[10]=v):v=t[10];let y;t[11]===o?y=t[12]:(y=o?(0,$.jsx)(`p`,{className:`border-b bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:o}):null,t[11]=o,t[12]=y);let b;t[13]!==i||t[14]!==o?(b=i===null&&!o?(0,$.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-3 text-xs text-muted-foreground`,children:[(0,$.jsx)(ie,{size:`sm`}),` Reading device settings…`]}):null,t[13]=i,t[14]=o,t[15]=b):b=t[15];let x;t[16]===e.hostDiagnostics?x=t[17]:(x=e.hostDiagnostics?(0,$.jsx)(Fe,{title:`Host diagnostics`,children:(0,$.jsx)(`p`,{className:`whitespace-pre-line text-xs text-muted-foreground`,children:e.hostDiagnostics})}):null,t[16]=e.hostDiagnostics,t[17]=x);let S=s?.id??`—`,C;t[18]===S?C=t[19]:(C=(0,$.jsx)(Ie,{label:`Foreground`,children:(0,$.jsx)(`span`,{className:`truncate font-mono text-xs`,children:S})}),t[18]=S,t[19]=C);let T;t[20]!==l||t[21]!==c||t[22]!==s?(T=s?(0,$.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,$.jsx)(w,{size:`xs`,variant:`outline`,disabled:c,onClick:()=>void l({type:`terminateApp`,appId:s.id}),children:`Terminate`}),(0,$.jsx)(w,{size:`xs`,variant:`outline`,disabled:c,onClick:()=>void l({type:`launchApp`,appId:s.id}),children:`Relaunch`})]}):null,t[20]=l,t[21]=c,t[22]=s,t[23]=T):T=t[23];let E;t[24]===l?E=t[25]:(E=e=>l({type:`openUrl`,url:e}),t[24]=l,t[25]=E);let D;t[26]!==c||t[27]!==E?(D=(0,$.jsx)(Be,{placeholder:`https://… or myapp://`,action:`Open`,disabled:c,onSubmit:E}),t[26]=c,t[27]=E,t[28]=D):D=t[28];let O=d?`Bundle ID to launch`:`Package name to launch`,k;t[29]===l?k=t[30]:(k=e=>l({type:`launchApp`,appId:e}),t[29]=l,t[30]=k);let A;t[31]!==c||t[32]!==O||t[33]!==k?(A=(0,$.jsx)(Be,{placeholder:O,action:`Launch`,disabled:c,onSubmit:k}),t[31]=c,t[32]=O,t[33]=k,t[34]=A):A=t[34];let j;t[35]!==C||t[36]!==T||t[37]!==D||t[38]!==A?(j=(0,$.jsxs)(Fe,{title:`App`,children:[C,T,D,A]}),t[35]=C,t[36]=T,t[37]=D,t[38]=A,t[39]=j):j=t[39];let te=d?`Simulator`:`Emulator`,ne;t[40]===u?ne=t[41]:(ne=u?.appearance?[u.appearance]:[],t[40]=u,t[41]=ne);let M;t[42]===l?M=t[43]:(M=e=>{let t=e[0];(t===`light`||t===`dark`)&&l({type:`setAppearance`,value:t})},t[42]=l,t[43]=M);let N,P;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(se,{value:`light`,children:`Light`}),P=(0,$.jsx)(se,{value:`dark`,children:`Dark`}),t[44]=N,t[45]=P):(N=t[44],P=t[45]);let F;t[46]!==c||t[47]!==ne||t[48]!==M?(F=(0,$.jsx)(Ie,{label:`Appearance`,children:(0,$.jsxs)(oe,{"aria-label":`Appearance`,value:ne,disabled:c,onValueChange:M,children:[N,P]})}),t[46]=c,t[47]=ne,t[48]=M,t[49]=F):F=t[49];let re=u?.textSize??null,I;t[50]===l?I=t[51]:(I=e=>l({type:`setTextSize`,value:e}),t[50]=l,t[51]=I);let L;t[52]!==c||t[53]!==re||t[54]!==I?(L=(0,$.jsx)(Ie,{label:`Text size`,children:(0,$.jsx)(Re,{ariaLabel:`Text size`,value:re,options:Oe,disabled:c,onChange:I})}),t[52]=c,t[53]=re,t[54]=I,t[55]=L):L=t[55];let R;t[56]!==l||t[57]!==c||t[58]!==d||t[59]!==u?(R=d?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Ie,{label:`Liquid Glass`,children:(0,$.jsxs)(oe,{"aria-label":`Liquid Glass`,value:u?.liquidGlass?[u.liquidGlass]:[],disabled:c||u?.liquidGlass===void 0,onValueChange:e=>{let t=e[0];(t===`clear`||t===`tinted`)&&l({type:`setLiquidGlass`,value:t})},children:[(0,$.jsx)(se,{value:`clear`,children:`Clear`}),(0,$.jsx)(se,{value:`tinted`,children:`Tinted`})]})}),(0,$.jsx)(Ie,{label:`Color filter`,children:(0,$.jsx)(Re,{ariaLabel:`Color filter`,value:u?.colorFilter??null,options:ke,disabled:c,onChange:e=>l({type:`setColorFilter`,value:e})})})]}):(0,$.jsx)(Ie,{label:`Orientation`,children:(0,$.jsx)(Re,{ariaLabel:`Orientation`,value:null,placeholder:`Rotate to…`,options:Ae,disabled:c,onChange:e=>l({type:`setOrientation`,value:e})})}),t[56]=l,t[57]=c,t[58]=d,t[59]=u,t[60]=R):R=t[60];let ae=u?.reduceMotion,z;t[61]===l?z=t[62]:(z=e=>l({type:`setToggle`,setting:`reduceMotion`,value:e}),t[61]=l,t[62]=z);let B;t[63]!==c||t[64]!==ae||t[65]!==z?(B=(0,$.jsx)(Le,{label:`Reduce Motion`,checked:ae,disabled:c,onChange:z}),t[63]=c,t[64]=ae,t[65]=z,t[66]=B):B=t[66];let V;t[67]!==l||t[68]!==c||t[69]!==d||t[70]!==u?.increaseContrast||t[71]!==u?.networkEnabled||t[72]!==u?.reduceTransparency||t[73]!==u?.showBorders||t[74]!==u?.voiceOver?(V=d?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Le,{label:`Increase Contrast`,checked:u?.increaseContrast,disabled:c,onChange:e=>l({type:`setToggle`,setting:`increaseContrast`,value:e})}),(0,$.jsx)(Le,{label:`Reduce Transparency`,checked:u?.reduceTransparency,disabled:c,onChange:e=>l({type:`setToggle`,setting:`reduceTransparency`,value:e})}),(0,$.jsx)(Le,{label:`Show Borders`,checked:u?.showBorders,disabled:c,onChange:e=>l({type:`setToggle`,setting:`showBorders`,value:e})}),(0,$.jsx)(Le,{label:`VoiceOver`,checked:u?.voiceOver,disabled:c,onChange:e=>l({type:`setToggle`,setting:`voiceOver`,value:e})})]}):(0,$.jsx)(Le,{label:`Network`,checked:u?.networkEnabled,disabled:c,onChange:e=>l({type:`setToggle`,setting:`networkEnabled`,value:e})}),t[67]=l,t[68]=c,t[69]=d,t[70]=u?.increaseContrast,t[71]=u?.networkEnabled,t[72]=u?.reduceTransparency,t[73]=u?.showBorders,t[74]=u?.voiceOver,t[75]=V):V=t[75];let H;t[76]!==te||t[77]!==F||t[78]!==L||t[79]!==R||t[80]!==B||t[81]!==V?(H=(0,$.jsxs)(Fe,{title:te,children:[F,L,R,B,V]}),t[76]=te,t[77]=F,t[78]=L,t[79]=R,t[80]=B,t[81]=V,t[82]=H):H=t[82];let U=e.access===null,ce;t[83]===e?ce=t[84]:(ce=t=>(e.onAxOverlayChange(t),Promise.resolve()),t[83]=e,t[84]=ce);let W;t[85]!==e.axOverlay||t[86]!==U||t[87]!==ce?(W=(0,$.jsx)(Fe,{title:`Accessibility`,children:(0,$.jsx)(Le,{label:`Overlay element frames`,checked:e.axOverlay,disabled:U,onChange:ce})}),t[85]=e.axOverlay,t[86]=U,t[87]=ce,t[88]=W):W=t[88];let G,le;t[89]===l?(G=t[90],le=t[91]):(G=(e,t)=>l({type:`setLocation`,latitude:e,longitude:t}),le=()=>l({type:`clearLocation`}),t[89]=l,t[90]=G,t[91]=le);let K;t[92]!==c||t[93]!==d||t[94]!==G||t[95]!==le?(K=(0,$.jsx)(Ve,{disabled:c,canClear:d,onSet:G,onClear:le}),t[92]=c,t[93]=d,t[94]=G,t[95]=le,t[96]=K):K=t[96];let ue=d?je:Me,de=s?.id??``,fe;t[97]===l?fe=t[98]:(fe=(e,t,n)=>l({type:`setPermission`,appId:e,permission:t,decision:n}),t[97]=l,t[98]=fe);let q;t[99]!==c||t[100]!==d||t[101]!==ue||t[102]!==de||t[103]!==fe?(q=(0,$.jsx)(Ue,{permissions:ue,canReset:d,defaultAppId:de,disabled:c,onDecide:fe}),t[99]=c,t[100]=d,t[101]=ue,t[102]=de,t[103]=fe,t[104]=q):q=t[104];let J;t[105]!==l||t[106]!==c||t[107]!==s||t[108]!==d?(J=d?(0,$.jsxs)(Fe,{title:`Push notification`,children:[(0,$.jsx)(Be,{placeholder:`Alert text`,action:`Send`,disabled:c||!s,onSubmit:e=>s?l({type:`sendPush`,appId:s.id,payload:e}):Promise.resolve(!1)}),s?null:(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Open an app first.`})]}):null,t[105]=l,t[106]=c,t[107]=s,t[108]=d,t[109]=J):J=t[109];let Y;t[110]!==n||t[111]!==d||t[112]!==e.access?(Y=d&&e.access?(0,$.jsx)(Ge,{access:e.access,device:n}):null,t[110]=n,t[111]=d,t[112]=e.access,t[113]=Y):Y=t[113];let X;t[114]!==j||t[115]!==H||t[116]!==W||t[117]!==K||t[118]!==q||t[119]!==J||t[120]!==Y||t[121]!==y||t[122]!==b||t[123]!==x?(X=(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[y,b,x,j,H,W,K,q,J,Y]}),t[114]=j,t[115]=H,t[116]=W,t[117]=K,t[118]=q,t[119]=J,t[120]=Y,t[121]=y,t[122]=b,t[123]=x,t[124]=X):X=t[124];let pe;return t[125]!==f||t[126]!==X||t[127]!==v?(pe=(0,$.jsxs)(`div`,{className:f,children:[v,X]}),t[125]=f,t[126]=X,t[127]=v,t[128]=pe):pe=t[128],pe}function Fe(e){let t=(0,Q.c)(5),n;t[0]===e.title?n=t[1]:(n=(0,$.jsx)(`h3`,{className:`text-xs font-medium text-muted-foreground`,children:e.title}),t[0]=e.title,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,$.jsxs)(`section`,{className:`flex flex-col gap-2 border-b px-3 py-2.5 last:border-b-0`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function Ie(e){let t=(0,Q.c)(7),n;t[0]===e.label?n=t[1]:(n=(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:e.label}),t[0]=e.label,t[1]=n);let r;t[2]===e.children?r=t[3]:(r=(0,$.jsx)(`div`,{className:`flex min-w-0 items-center justify-end`,children:e.children}),t[2]=e.children,t[3]=r);let i;return t[4]!==n||t[5]!==r?(i=(0,$.jsxs)(`div`,{className:`flex min-h-7 items-center justify-between gap-3`,children:[n,r]}),t[4]=n,t[5]=r,t[6]=i):i=t[6],i}function Le(e){let t=(0,Q.c)(10),n=e.checked??!1,r=e.disabled||e.checked===void 0,i;t[0]===e?i=t[1]:(i=t=>void e.onChange(t),t[0]=e,t[1]=i);let a;t[2]!==e.label||t[3]!==n||t[4]!==r||t[5]!==i?(a=(0,$.jsx)(he,{size:`sm`,"aria-label":e.label,checked:n,disabled:r,onCheckedChange:i}),t[2]=e.label,t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6];let o;return t[7]!==e.label||t[8]!==a?(o=(0,$.jsx)(Ie,{label:e.label,children:a}),t[7]=e.label,t[8]=a,t[9]=o):o=t[9],o}function Re(e){let t=(0,Q.c)(25),n;if(t[0]!==e.options||t[1]!==e.value){let r;t[3]===e.value?r=t[4]:(r=t=>t.value===e.value,t[3]=e.value,t[4]=r),n=e.options.find(r),t[0]=e.options,t[1]=e.value,t[2]=n}else n=t[2];let r=n,i=e.value,a=e.disabled,o;t[5]===e?o=t[6]:(o=t=>{t!==null&&t!==e.value&&e.onChange(t)},t[5]=e,t[6]=o);let s;t[7]!==r||t[8]!==e.placeholder?(s=r?r.label:(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:e.placeholder??`Unknown`}),t[7]=r,t[8]=e.placeholder,t[9]=s):s=t[9];let c;t[10]===s?c=t[11]:(c=(0,$.jsx)(P,{children:s}),t[10]=s,t[11]=c);let l;t[12]!==e.ariaLabel||t[13]!==c?(l=(0,$.jsx)(re,{size:`xs`,className:`w-40`,"aria-label":e.ariaLabel,children:c}),t[12]=e.ariaLabel,t[13]=c,t[14]=l):l=t[14];let u;t[15]===e.options?u=t[16]:(u=e.options.map(ze),t[15]=e.options,t[16]=u);let d;t[17]===u?d=t[18]:(d=(0,$.jsx)(F,{align:`end`,alignItemWithTrigger:!1,children:u}),t[17]=u,t[18]=d);let f;return t[19]!==e.disabled||t[20]!==e.value||t[21]!==o||t[22]!==l||t[23]!==d?(f=(0,$.jsxs)(I,{value:i,disabled:a,onValueChange:o,children:[l,d]}),t[19]=e.disabled,t[20]=e.value,t[21]=o,t[22]=l,t[23]=d,t[24]=f):f=t[24],f}function ze(e){return(0,$.jsx)(N,{value:e.value,children:e.label},e.value)}function Be(e){let t=(0,Q.c)(20),[n,r]=(0,Z.useState)(``),i;t[0]!==e||t[1]!==n?(i=()=>{let t=n.trim();t&&e.onSubmit(t).then(e=>{e&&r(``)})},t[0]=e,t[1]=n,t[2]=i):i=t[2];let a=i,o;t[3]===a?o=t[4]:(o=e=>{e.preventDefault(),a()},t[3]=a,t[4]=o);let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=e=>r(e.target.value),t[5]=s):s=t[5];let c;t[6]!==e.disabled||t[7]!==e.placeholder||t[8]!==n?(c=(0,$.jsx)(U,{size:`compact`,font:`mono`,className:`min-w-0 flex-1`,placeholder:e.placeholder,value:n,disabled:e.disabled,onChange:s}),t[6]=e.disabled,t[7]=e.placeholder,t[8]=n,t[9]=c):c=t[9];let l;t[10]!==e.disabled||t[11]!==n?(l=e.disabled||n.trim().length===0,t[10]=e.disabled,t[11]=n,t[12]=l):l=t[12];let u;t[13]!==e.action||t[14]!==l?(u=(0,$.jsx)(w,{type:`submit`,size:`xs`,variant:`outline`,disabled:l,children:e.action}),t[13]=e.action,t[14]=l,t[15]=u):u=t[15];let d;return t[16]!==o||t[17]!==c||t[18]!==u?(d=(0,$.jsxs)(`form`,{className:`flex gap-1.5`,onSubmit:o,children:[c,u]}),t[16]=o,t[17]=c,t[18]=u,t[19]=d):d=t[19],d}function Ve(e){let t=(0,Q.c)(40),[n,r]=(0,Z.useState)(``),[i,a]=(0,Z.useState)(``),o=Number(n),s=Number(i),c,l;t[0]!==n||t[1]!==i||t[2]!==o||t[3]!==s?(c={latitude:o,longitude:s},l=n.trim()!==``&&i.trim()!==``&&Math.abs(c.latitude)<=90&&Math.abs(c.longitude)<=180,t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=c,t[5]=l):(c=t[4],l=t[5]);let u=l,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>r(e.target.value),t[6]=d):d=t[6];let f;t[7]!==n||t[8]!==e.disabled?(f=(0,$.jsx)(U,{size:`compact`,font:`mono`,className:`min-w-0 flex-1`,placeholder:`Latitude`,inputMode:`decimal`,value:n,disabled:e.disabled,onChange:d}),t[7]=n,t[8]=e.disabled,t[9]=f):f=t[9];let p;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>a(e.target.value),t[10]=p):p=t[10];let m;t[11]!==i||t[12]!==e.disabled?(m=(0,$.jsx)(U,{size:`compact`,font:`mono`,className:`min-w-0 flex-1`,placeholder:`Longitude`,inputMode:`decimal`,value:i,disabled:e.disabled,onChange:p}),t[11]=i,t[12]=e.disabled,t[13]=m):m=t[13];let h;t[14]!==f||t[15]!==m?(h=(0,$.jsxs)(`div`,{className:`flex gap-1.5`,children:[f,m]}),t[14]=f,t[15]=m,t[16]=h):h=t[16];let g;t[17]===e?g=t[18]:(g=t=>{let n=Ne.find(e=>e.label===t);n&&(r(String(n.latitude)),a(String(n.longitude)),e.onSet(n.latitude,n.longitude))},t[17]=e,t[18]=g);let _;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(re,{size:`xs`,className:`w-32`,"aria-label":`Location preset`,children:(0,$.jsx)(P,{children:(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:`Preset…`})})}),t[19]=_):_=t[19];let v;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(F,{align:`start`,alignItemWithTrigger:!1,children:Ne.map(He)}),t[20]=v):v=t[20];let y;t[21]!==e.disabled||t[22]!==g?(y=(0,$.jsxs)(I,{value:null,disabled:e.disabled,onValueChange:g,children:[_,v]}),t[21]=e.disabled,t[22]=g,t[23]=y):y=t[23];let b=e.disabled||!u,x;t[24]!==c.latitude||t[25]!==c.longitude||t[26]!==e?(x=()=>void e.onSet(c.latitude,c.longitude),t[24]=c.latitude,t[25]=c.longitude,t[26]=e,t[27]=x):x=t[27];let S;t[28]!==b||t[29]!==x?(S=(0,$.jsx)(w,{size:`xs`,variant:`outline`,disabled:b,onClick:x,children:`Set`}),t[28]=b,t[29]=x,t[30]=S):S=t[30];let C;t[31]===e?C=t[32]:(C=e.canClear?(0,$.jsx)(w,{size:`xs`,variant:`ghost`,disabled:e.disabled,onClick:()=>{r(``),a(``),e.onClear()},children:`Clear`}):null,t[31]=e,t[32]=C);let T;t[33]!==y||t[34]!==S||t[35]!==C?(T=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[y,S,C]}),t[33]=y,t[34]=S,t[35]=C,t[36]=T):T=t[36];let E;return t[37]!==T||t[38]!==h?(E=(0,$.jsxs)(Fe,{title:`Location`,children:[h,T]}),t[37]=T,t[38]=h,t[39]=E):E=t[39],E}function He(e){return(0,$.jsx)(N,{value:e.label,children:e.label},e.label)}function Ue(e){let t=(0,Q.c)(40),[n,r]=(0,Z.useState)(``),[i,a]=(0,Z.useState)(`camera`),o;t[0]!==n||t[1]!==e.defaultAppId?(o=n.trim()||e.defaultAppId,t[0]=n,t[1]=e.defaultAppId,t[2]=o):o=t[2];let s=o,c;t[3]!==i||t[4]!==e||t[5]!==s?(c=t=>void e.onDecide(s,i,t),t[3]=i,t[4]=e,t[5]=s,t[6]=c):c=t[6];let l=c,u=e.defaultAppId||`App ID`,d;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=e=>r(e.target.value),t[7]=d):d=t[7];let f;t[8]!==n||t[9]!==e.disabled||t[10]!==u?(f=(0,$.jsx)(U,{size:`compact`,font:`mono`,placeholder:u,value:n,disabled:e.disabled,onChange:d}),t[8]=n,t[9]=e.disabled,t[10]=u,t[11]=f):f=t[11];let p;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=e=>(a(e),Promise.resolve()),t[12]=p):p=t[12];let m;t[13]!==i||t[14]!==e.disabled||t[15]!==e.permissions?(m=(0,$.jsx)(Re,{ariaLabel:`Permission`,value:i,options:e.permissions,disabled:e.disabled,onChange:p}),t[13]=i,t[14]=e.disabled,t[15]=e.permissions,t[16]=m):m=t[16];let h=e.disabled||!s,g;t[17]===l?g=t[18]:(g=()=>l(`grant`),t[17]=l,t[18]=g);let _;t[19]!==h||t[20]!==g?(_=(0,$.jsx)(w,{size:`xs`,variant:`outline`,disabled:h,onClick:g,children:`Grant`}),t[19]=h,t[20]=g,t[21]=_):_=t[21];let v=e.disabled||!s,y;t[22]===l?y=t[23]:(y=()=>l(`revoke`),t[22]=l,t[23]=y);let b;t[24]!==v||t[25]!==y?(b=(0,$.jsx)(w,{size:`xs`,variant:`outline`,disabled:v,onClick:y,children:`Revoke`}),t[24]=v,t[25]=y,t[26]=b):b=t[26];let x;t[27]!==l||t[28]!==e.canReset||t[29]!==e.disabled||t[30]!==s?(x=e.canReset?(0,$.jsx)(w,{size:`xs`,variant:`ghost`,disabled:e.disabled||!s,onClick:()=>l(`reset`),children:`Reset`}):null,t[27]=l,t[28]=e.canReset,t[29]=e.disabled,t[30]=s,t[31]=x):x=t[31];let S;t[32]!==b||t[33]!==x||t[34]!==m||t[35]!==_?(S=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[m,_,b,x]}),t[32]=b,t[33]=x,t[34]=m,t[35]=_,t[36]=S):S=t[36];let C;return t[37]!==S||t[38]!==f?(C=(0,$.jsxs)(Fe,{title:`Permissions`,children:[f,S]}),t[37]=S,t[38]=f,t[39]=C):C=t[39],C}var We=100;function Ge(e){let t=(0,Q.c)(19),[n,r]=(0,Z.useState)(!1),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[],t[0]=i):i=t[0];let[a,o]=(0,Z.useState)(i),s,c;t[1]!==n||t[2]!==e.access||t[3]!==e.device.id||t[4]!==e.device.platform?(s=()=>{if(!n)return;let t=ye({access:e.access,platform:e.device.platform,deviceId:e.device.id},(e,t)=>{o(n=>{let r=t?[...e]:[...n,...e];return r.length>We?r.slice(-100):r})});return()=>{t(),o([])}},c=[n,e.access,e.device.id,e.device.platform],t[1]=n,t[2]=e.access,t[3]=e.device.id,t[4]=e.device.platform,t[5]=s,t[6]=c):(s=t[5],c=t[6]),(0,Z.useEffect)(s,c);let l=n&&`rotate-180`,u;t[7]===l?u=t[8]:(u=ee(`ml-auto size-3.5 transition-transform`,l),t[7]=l,t[8]=u);let d;t[9]===u?d=t[10]:(d=(0,$.jsxs)(ge,{className:`flex w-full items-center gap-1.5 border-b px-3 py-2.5 text-left text-xs font-medium text-muted-foreground`,children:[`Event log`,(0,$.jsx)(S,{className:u})]}),t[9]=u,t[10]=d);let f;t[11]===a?f=t[12]:(f=a.length===0?(0,$.jsx)(`li`,{className:`text-muted-foreground`,children:`No events yet.`}):a.map(Ke),t[11]=a,t[12]=f);let p;t[13]===f?p=t[14]:(p=(0,$.jsx)(pe,{children:(0,$.jsx)(`ol`,{className:`max-h-64 overflow-y-auto px-3 py-2 font-mono text-2xs leading-relaxed`,children:f})}),t[13]=f,t[14]=p);let m;return t[15]!==n||t[16]!==d||t[17]!==p?(m=(0,$.jsxs)(_e,{open:n,onOpenChange:r,children:[d,p]}),t[15]=n,t[16]=d,t[17]=p,t[18]=m):m=t[18],m}function Ke(e){return(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.timestamp.slice(11,19)}),(0,$.jsx)(`span`,{className:`truncate`,children:e.summary})]},e.id)}function qe(e){let t=(0,Q.c)(30),{environmentId:n,device:r,access:i,visible:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={reportFailure:!1},t[0]=o):o=t[0];let s=R(K.detail,o),c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c={reportFailure:!1},t[1]=c):c=t[1];let l=R(K.action,c),[u,d]=(0,Z.useState)(null),[f,p]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(null),[g,_]=(0,Z.useState)(),v=(0,Z.useRef)(!1),y=(0,Z.useRef)(0),b=(0,Z.useRef)(null),x;t[2]!==r.hostId||t[3]!==r.id?(x={hostId:r.hostId,deviceId:r.id},t[2]=r.hostId,t[3]=r.id,t[4]=x):x=t[4];let S=x,C,w;t[5]!==n||t[6]!==s||t[7]!==S||t[8]!==a?(C=()=>{let e=y.current+=1;if(!a)return;let t={environmentId:n,input:S};return b.current=t,s(t).then(t=>{y.current===e&&(t._tag===`Success`?(d(t.value),h(null)):(d(null),h(L(t.cause))))}),()=>{b.current=null,y.current+=1}},w=[n,s,S,a],t[5]=n,t[6]=s,t[7]=S,t[8]=a,t[9]=C,t[10]=w):(C=t[9],w=t[10]),(0,Z.useEffect)(C,w);let T,E;t[11]!==i||t[12]!==r.id||t[13]!==r.platform||t[14]!==a?(T=()=>{if(!i||!a)return;let e=!0,t=ve({access:i,platform:r.platform,deviceId:r.id},t=>{e&&_(t)});return()=>{e=!1,t(),_(void 0)}},E=[i,r.id,r.platform,a],t[11]=i,t[12]=r.id,t[13]=r.platform,t[14]=a,t[15]=T,t[16]=E):(T=t[15],E=t[16]),(0,Z.useEffect)(T,E);let D=u!==null&&a,O;t[17]!==D||t[18]!==n||t[19]!==s||t[20]!==l||t[21]!==S?(O=async e=>{if(v.current||!D)return!1;v.current=!0;let t=y.current+=1;return p(!0),h(null),l({environmentId:n,input:{...S,...e}}).then(e=>{if(y.current!==t){let t=b.current;if(!t)return e._tag===`Success`;let n=y.current+=1;return s(t).then(t=>(y.current===n&&(t._tag===`Success`?(d(t.value),h(null)):(d(null),h(L(t.cause)))),e._tag===`Success`))}return e._tag===`Success`?d(e.value):h(L(e.cause)),e._tag===`Success`}).finally(()=>{v.current=!1,p(!1)})},t[17]=D,t[18]=n,t[19]=s,t[20]=l,t[21]=S,t[22]=O):O=t[22];let k=O,ee=f||!u||!a,A=g===void 0?u?.foregroundApp??null:g,j;return t[23]!==k||t[24]!==u||t[25]!==m||t[26]!==f||t[27]!==ee||t[28]!==A?(j={detail:u,pending:f,error:m,act:k,disabled:ee,foregroundApp:A},t[23]=k,t[24]=u,t[25]=m,t[26]=f,t[27]=ee,t[28]=A,t[29]=j):j=t[29],j}function Je(e){let t=(0,Q.c)(53),[n,r]=(0,Z.useState)(null),[i,a]=(0,Z.useState)(!1),[o,s]=(0,Z.useState)(!1),[c,l]=(0,Z.useState)(!1),[u,d]=(0,Z.useState)(null),f=(0,Z.useRef)(null),p=(0,Z.useRef)(null),m=le(e.environmentId,e.device.hostId),h=e.hostKind===`local`||e.hostKind===`ssh`,g=e.visible&&h,_;t[0]!==m||t[1]!==e||t[2]!==g?(_={...e,access:m,visible:g},t[0]=m,t[1]=e,t[2]=g,t[3]=_):_=t[3];let v=qe(_),y,b;t[4]!==m||t[5]!==e.visible?(y=()=>(m&&e.visible||f.current?.abort(),()=>{f.current?.abort(),p.current&&URL.revokeObjectURL(p.current),p.current=null}),b=[m,e.visible],t[4]=m,t[5]=e.visible,t[6]=y,t[7]=b):(y=t[6],b=t[7]),(0,Z.useEffect)(y,b);let x;t[8]!==m||t[9]!==e.device.id||t[10]!==e.device.name||t[11]!==e.device.platform||t[12]!==e.environmentId||t[13]!==e.visible?(x=()=>{if(!m||f.current||!e.visible)return;let t=new AbortController;return f.current=t,l(!0),d(null),Ce({access:m,platform:e.device.platform,deviceId:e.device.id},t.signal).then(n=>{if(t.signal.aborted)return;p.current&&URL.revokeObjectURL(p.current);let r=URL.createObjectURL(n);p.current=r;let i=document.createElement(`a`);i.href=r,i.download=`${e.device.name.replace(/[^a-z0-9-]/gi,`-`)}-${Date.now()}.png`,document.body.append(i),i.click(),i.remove()}).catch(n=>{t.signal.aborted||(n instanceof Se&&n.status===401&&G(e.environmentId),d(n instanceof Error?n.message:`Screenshot capture failed. Try again.`))}).finally(()=>{f.current===t&&(f.current=null,l(!1))})},t[8]=m,t[9]=e.device.id,t[10]=e.device.name,t[11]=e.device.platform,t[12]=e.environmentId,t[13]=e.visible,t[14]=x):x=t[14];let S=x,C;t[15]!==v||t[16]!==u||t[17]!==i?(C=u||v.error&&!i?(0,$.jsx)(`p`,{role:`alert`,className:`px-3 py-2 text-xs text-destructive`,children:u??v.error}):null,t[15]=v,t[16]=u,t[17]=i,t[18]=C):C=t[18];let w=`${e.hostLabel} · ${e.device.version}`,T;t[19]!==v||t[20]!==n||t[21]!==e.device.platform||t[22]!==e.hostKind||t[23]!==e.onClose||t[24]!==e.onFloat||t[25]!==e.onPowerOff||t[26]!==S||t[27]!==c||t[28]!==i?(T=t=>(0,$.jsx)(we,{platform:e.device.platform,hostKind:e.hostKind,handle:n,view:t,controls:v,screenshotPending:c,onScreenshot:()=>void S(),toolsOpen:i,onTools:()=>a(!i),onFloat:e.onFloat,onClose:e.onClose,onPowerOff:e.onPowerOff}),t[19]=v,t[20]=n,t[21]=e.device.platform,t[22]=e.hostKind,t[23]=e.onClose,t[24]=e.onFloat,t[25]=e.onPowerOff,t[26]=S,t[27]=c,t[28]=i,t[29]=T):T=t[29];let E;t[30]!==o||t[31]!==e.device.hostId||t[32]!==e.device.id||t[33]!==e.device.name||t[34]!==e.device.platform||t[35]!==e.environmentId||t[36]!==e.visible||t[37]!==w||t[38]!==T?(E=(0,$.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,$.jsx)(be,{environmentId:e.environmentId,platform:e.device.platform,deviceName:e.device.name,deviceDescription:w,deviceId:e.device.id,hostId:e.device.hostId,visible:e.visible,axOverlay:o,allowPhoneView:!0,onHandle:r,renderControls:T})}),t[30]=o,t[31]=e.device.hostId,t[32]=e.device.id,t[33]=e.device.name,t[34]=e.device.platform,t[35]=e.environmentId,t[36]=e.visible,t[37]=w,t[38]=T,t[39]=E):E=t[39];let D;t[40]!==C||t[41]!==E?(D=(0,$.jsxs)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col`,children:[C,E]}),t[40]=C,t[41]=E,t[42]=D):D=t[42];let O;t[43]!==m||t[44]!==o||t[45]!==v||t[46]!==e.device||t[47]!==e.hostDiagnostics||t[48]!==i?(O=i?(0,$.jsx)(Pe,{device:e.device,controls:v,hostDiagnostics:e.hostDiagnostics,access:m,axOverlay:o,onAxOverlayChange:s,onClose:()=>a(!1),className:`absolute inset-y-0 right-0 z-10 w-full max-w-72 border-l shadow-lg @[700px]:static @[700px]:w-72 @[700px]:shrink-0 @[700px]:shadow-none`}):null,t[43]=m,t[44]=o,t[45]=v,t[46]=e.device,t[47]=e.hostDiagnostics,t[48]=i,t[49]=O):O=t[49];let k;return t[50]!==O||t[51]!==D?(k=(0,$.jsxs)($.Fragment,{children:[D,O]}),t[50]=O,t[51]=D,t[52]=k):k=t[52],k}var Ye=e=>e===`ios`?`iOS Simulators`:`Android Emulators`,Xe=e=>`${e.hostId}\u0000${e.id}`;function Ze(e){let t=(0,Q.c)(87),{environmentId:n,threadId:r}=e.threadRef,{state:i,loaded:a,error:o,refresh:s}=W(n),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={reportFailure:!1},t[0]=c):c=t[0];let l=R(K.list,c),d=R(K.open),p=R(K.close),m=`${n}\u0000${r}`,[h,g]=(0,Z.useState)(null),_=h?.scope===m?h.pending:null,v=h?.scope===m?h.error:null,y;t[1]===_?y=t[2]:(y=_?Xe(_):null,t[1]=_,t[2]=y);let x=y,S=i.hostStatus===`disabled`,C,T;t[3]!==n||t[4]!==S||t[5]!==l||t[6]!==a||t[7]!==e.visible?(C=()=>{e.visible&&a&&!S&&l({environmentId:n,input:{}})},T=[n,l,a,e.visible,S],t[3]=n,t[4]=S,t[5]=l,t[6]=a,t[7]=e.visible,t[8]=C,t[9]=T):(C=t[8],T=t[9]),(0,Z.useEffect)(C,T);let E;if(t[10]!==e.surface.target||t[11]!==i.sessions||t[12]!==r){let n;t[14]===r?n=t[15]:(n=e=>e.threadId===r,t[14]=r,t[15]=n);let a=i.sessions.filter(n);E=e.surface.target?a.find(t=>t.deviceId===e.surface.target?.deviceId&&t.hostId===e.surface.target.hostId):void 0,t[10]=e.surface.target,t[11]=i.sessions,t[12]=r,t[13]=E}else E=t[13];let D=E,O,k,A,j,te,ne,M;if(t[16]!==D||t[17]!==p||t[18]!==n||t[19]!==S||t[20]!==l||t[21]!==a||t[22]!==d||t[23]!==v||t[24]!==_||t[25]!==x||t[26]!==e||t[27]!==s||t[28]!==m||t[29]!==i||t[30]!==o||t[31]!==r){k=Symbol.for(`react.early_return_sentinel`);bb0:{let c=D?i.devices.find(e=>e.hostId===D.hostId&&e.id===D.deviceId):void 0,h=at(i),y;t[39]===m?y=t[40]:(y=e=>{let t={scope:m,pending:e,error:null};return g(t),e=>g(n=>n===t?{...t,pending:null,error:e}:n)},t[39]=m,t[40]=y);let C=y,T;t[41]!==n||t[42]!==d||t[43]!==e.threadRef||t[44]!==C||t[45]!==i.devices||t[46]!==r?(T=async t=>{let a=i.devices.find(e=>Xe(e)===t);if(!a)return;let o=C(a),s=await d({environmentId:n,input:{threadId:r,hostId:a.hostId,deviceId:a.id,platform:a.platform}});s._tag===`Failure`?o(L(s.cause)):(ae.getState().openDevice(e.threadRef,{hostId:s.value.hostId,deviceId:s.value.deviceId,platform:a.platform,name:a.name}),o(null))},t[41]=n,t[42]=d,t[43]=e.threadRef,t[44]=C,t[45]=i.devices,t[46]=r,t[47]=T):T=t[47];let E=T,N=()=>{c&&(Y.getState().open(e.threadRef,{kind:`device`,hostId:c.hostId,deviceId:c.id,platform:c.platform,name:c.name}),ae.getState().close(e.threadRef))},P;t[48]!==D||t[49]!==p||t[50]!==n||t[51]!==e.surface.id||t[52]!==e.threadRef||t[53]!==C||t[54]!==r?(P=t=>{if(!t){ae.getState().closeSurface(e.threadRef,e.surface.id);return}if(!D)return;let i=C(null);p({environmentId:n,input:{threadId:r,hostId:D.hostId,deviceId:D.deviceId,shutdown:t}}).then(t=>{t._tag===`Failure`?i(L(t.cause)):ae.getState().closeSurface(e.threadRef,e.surface.id)})},t[48]=D,t[49]=p,t[50]=n,t[51]=e.surface.id,t[52]=e.threadRef,t[53]=C,t[54]=r,t[55]=P):P=t[55];let F=P,re=i.bootingDevices?.filter(e=>e.threadId===r)??[],{ready:I,busy:R}=q(i),B=!c&&(_!==null||R||!a),V=a?null:o,H;t[56]!==i.hostStatus||t[57]!==i.hostStatusDetail||t[58]!==i.hostStatuses?(H=e=>{let t=i.hostStatuses[e.id],n=t?.detail??(e.kind===`local`?i.hostStatusDetail:void 0);return n&&(t?.status??i.hostStatus)===`ready`?[{hostId:e.id,label:e.label,detail:n}]:[]},t[56]=i.hostStatus,t[57]=i.hostStatusDetail,t[58]=i.hostStatuses,t[59]=H):H=t[59];let oe=i.hosts.flatMap(H),se=i.hosts.flatMap(tt);if(a&&(!i.onboardingCompleted||S)){let r;t[60]===e?r=t[61]:(r=t=>{t||e.onDismissSetup()},t[60]=e,t[61]=r);let a;t[62]!==n||t[63]!==i?(a=(0,$.jsx)(me,{children:(0,$.jsx)(fe,{environmentId:n,state:i})}),t[62]=n,t[63]=i,t[64]=a):a=t[64];let o;t[65]!==e.visible||t[66]!==r||t[67]!==a?(o=(0,$.jsx)(ce,{open:e.visible,onOpenChange:r,children:a}),t[65]=e.visible,t[66]=r,t[67]=a,t[68]=o):o=t[68],k=o;break bb0}O=z,M=e.mode,te=`relative flex min-h-0 flex-1 flex-col`;let U;t[69]===n?U=t[70]:(U=e=>(0,$.jsx)(it,{label:e.label,detail:e.detail},`${n}\u0000${e.hostId}\u0000${e.detail}`),t[69]=n,t[70]=U);let W;t[71]!==n||t[72]!==i?(W=(0,$.jsx)(J,{state:i,environmentId:n}),t[71]=n,t[72]=i,t[73]=W):W=t[73];let G;t[74]===v?G=t[75]:(G=v?(0,$.jsx)(rt,{tone:`error`,onDismiss:()=>g(null),children:v}):null,t[74]=v,t[75]=G),ne=(0,$.jsxs)(`div`,{className:ee(`shrink-0 bg-background`,B&&`absolute inset-x-0 top-0 z-10 max-h-[40%] overflow-y-auto`),children:[(0,$.jsx)(`div`,{hidden:!!c,children:oe.map(U)}),W,re.length>0?(0,$.jsxs)(`div`,{role:`status`,className:`border-b px-3 py-2 text-xs text-muted-foreground`,children:[`Starting `,re.map(et).join(`, `),`… This can take a minute.`]}):null,G]}),A=`@container relative flex min-h-0 flex-1`,j=c&&D?(0,$.jsx)(Je,{environmentId:n,device:c,hostLabel:i.hosts.find(e=>e.id===c.hostId)?.label??`Device host`,hostKind:i.hosts.find(e=>e.id===c.hostId)?.kind,hostDiagnostics:oe.find(e=>{let{hostId:t}=e;return t===c.hostId})?.detail,visible:e.visible,onFloat:N,onClose:()=>F(!1),onPowerOff:()=>F(!0)},`${n}\u0000${Xe(c)}`):B?(0,$.jsx)(xe,{name:_?.name??`Devices`,description:_?`${i.hosts.find(e=>e.id===_.hostId)?.label??`Device host`} · ${_.version}`:``,stage:`opening`,message:V??(_?_.booted?`Opening device…`:`Starting device…`:i.hostStatus===`installing`?i.hostStatusDetail??`Installing device support…`:`Finding devices…`),error:V!==null,children:V===null?null:(0,$.jsx)(w,{size:`sm`,variant:`outline`,onClick:s,children:`Retry`})}):(0,$.jsx)(`div`,{className:`scrollbar-gutter-both flex size-full flex-col overflow-y-auto px-5 py-8 text-sm text-muted-foreground`,children:(0,$.jsxs)(`div`,{className:ee(`mx-auto flex w-full max-w-xl flex-col gap-6`,h.length===0&&`my-auto items-center text-center`),children:[h.length===0?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(u,{className:`size-6 opacity-60`}),(0,$.jsx)(`p`,{className:`max-h-32 w-full max-w-sm overflow-y-auto whitespace-pre-line break-words`,tabIndex:i.hostStatus===`failed`?0:void 0,children:i.hostStatus===`failed`?i.hostStatusDetail??`The device hub failed to start.`:`No simulators or emulators were found on this environment.`})]}):null,I&&h.length>0?(0,$.jsx)(`div`,{className:`w-full space-y-6 text-left`,children:h.map(e=>(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,$.jsx)(u,{className:`size-4 shrink-0`}),(0,$.jsx)(`h3`,{className:`font-medium`,children:Ye(e.platform)})]}),(0,$.jsx)(X,{children:e.devices.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-3`,children:[(0,$.jsx)(`span`,{className:`grid size-8 shrink-0 place-items-center rounded-md border border-border/60`,children:(0,$.jsx)(u,{className:`size-4`})}),(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,$.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e.name}),(0,$.jsx)(`span`,{className:`truncate text-xs text-muted-foreground`,children:`${i.hosts.find(t=>t.id===e.hostId)?.label} · ${e.version} · ${e.booted?`Running`:`Stopped`}`})]}),(0,$.jsxs)(w,{variant:`outline`,size:`sm`,disabled:x!==null,"aria-label":`${e.booted?`Open`:`Start`} ${e.name}`,onClick:()=>void E(Xe(e)),children:[x===Xe(e)?(0,$.jsx)(ie,{size:`xs`}):e.booted?(0,$.jsx)(b,{}):(0,$.jsx)(f,{}),e.booted?`Open`:`Start`]})]},Xe(e)))})]},e.platform))}):null,I&&!de(i)&&!i.devices.some($e)&&!se.some(Qe)?(0,$.jsx)(`p`,{className:`max-w-sm text-xs`,children:`No Android virtual devices found. Create one in Android Studio's Device Manager, then refresh.`}):null,a&&!R?(0,$.jsx)(w,{className:h.length>0?`self-start`:`self-center`,variant:`outline`,size:`sm`,onClick:()=>void l({environmentId:n,input:{}}),children:`Refresh devices`}):null]})})}t[16]=D,t[17]=p,t[18]=n,t[19]=S,t[20]=l,t[21]=a,t[22]=d,t[23]=v,t[24]=_,t[25]=x,t[26]=e,t[27]=s,t[28]=m,t[29]=i,t[30]=o,t[31]=r,t[32]=O,t[33]=k,t[34]=A,t[35]=j,t[36]=te,t[37]=ne,t[38]=M}else O=t[32],k=t[33],A=t[34],j=t[35],te=t[36],ne=t[37],M=t[38];if(k!==Symbol.for(`react.early_return_sentinel`))return k;let N;t[76]!==A||t[77]!==j?(N=(0,$.jsx)(`div`,{className:A,children:j}),t[76]=A,t[77]=j,t[78]=N):N=t[78];let P;t[79]!==N||t[80]!==te||t[81]!==ne?(P=(0,$.jsxs)(`div`,{className:te,children:[ne,N]}),t[79]=N,t[80]=te,t[81]=ne,t[82]=P):P=t[82];let F;return t[83]!==O||t[84]!==P||t[85]!==M?(F=(0,$.jsx)(O,{mode:M,children:P}),t[83]=O,t[84]=P,t[85]=M,t[86]=F):F=t[86],F}function Qe(e){return e.platform===`android`}function $e(e){return e.platform===`android`}function et(e){return e.name}function tt(e){return e.platforms.filter(nt).map(t=>({...t,hostId:e.id,hostLabel:e.label}))}function nt(e){return!e.available}function rt(e){let t=(0,Q.c)(13),n=e.tone===`warning`?`bg-warning-surface text-warning-foreground`:`bg-destructive/5 text-destructive`,r;t[0]===n?r=t[1]:(r=ee(`flex items-start gap-2 border-b px-3 py-2 text-xs`,n),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(l,{className:`mt-1 size-3.5 shrink-0`}),t[2]=i):i=t[2];let a;t[3]===e.children?a=t[4]:(a=(0,$.jsx)(`div`,{className:`max-h-32 min-w-0 flex-1 overflow-y-auto whitespace-pre-wrap break-words`,tabIndex:0,children:e.children}),t[3]=e.children,t[4]=a);let o=e.tone===`warning`?`Dismiss device warning`:`Dismiss device error`,s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(g,{}),t[5]=s):s=t[5];let c;t[6]!==e.onDismiss||t[7]!==o?(c=(0,$.jsx)(w,{size:`icon-xs`,variant:`ghost`,"aria-label":o,onClick:e.onDismiss,children:s}),t[6]=e.onDismiss,t[7]=o,t[8]=c):c=t[8];let u;return t[9]!==r||t[10]!==a||t[11]!==c?(u=(0,$.jsxs)(`div`,{role:`alert`,className:r,children:[i,a,c]}),t[9]=r,t[10]=a,t[11]=c,t[12]=u):u=t[12],u}function it(e){let t=(0,Q.c)(6),[n,r]=(0,Z.useState)(!1);if(n)return null;let i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>r(!0),t[0]=i):i=t[0];let a;t[1]===e.label?a=t[2]:(a=(0,$.jsxs)(`p`,{className:`font-medium`,children:[`Device discovery warning · `,e.label]}),t[1]=e.label,t[2]=a);let o;return t[3]!==e.detail||t[4]!==a?(o=(0,$.jsxs)(rt,{tone:`warning`,onDismiss:i,children:[a,e.detail]}),t[3]=e.detail,t[4]=a,t[5]=o):o=t[5],o}function at(e){let t=[];for(let n of[`ios`,`android`]){let r=e.devices.filter(e=>e.platform===n).toSorted((e,t)=>Number(t.booted)-Number(e.booted)||e.name.localeCompare(t.name));r.length>0&&t.push({platform:n,devices:r})}return t}export{Ze as DevicePanel};
|
|
2
|
+
//# sourceMappingURL=DevicePanel-BzIRsUjQ.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{Al as i,mr as a,t as o}from"./utils-DsOiwDNN.js";import{Ma as s}from"./src-B7vcPG0D.js";import{f as c,u as l,y as u}from"./TooltipProvider-DPt8xz_3.js";import{t as d}from"./spinner-fU7Q2OR1.js";import{i as f,n as p}from"./session-A0FOa5Fv.js";import{t as m}from"./use-atom-command-BkSai4ZH.js";import{n as h}from"./dialog-wBelv1Ac.js";import{t as g}from"./device-CG5GzxuX.js";import{Eo as _,Mo as v,Oo as y,To as ee,wo as b}from"./main-CNyrs4J_.js";var x=n(),S=e(t(),1),C=e(r(),1);function w(e){let t=(0,x.c)(15),{state:n,environmentId:r}=e,i=m(g.list),[o,s]=(0,S.useState)(null);if(n.hostStatus===`disabled`)return null;let c;if(t[0]!==r||t[1]!==o||t[2]!==i||t[3]!==n.hostStatuses||t[4]!==n.hosts||t[5]!==n.supportsHostRetry){let e;t[7]!==r||t[8]!==o||t[9]!==i||t[10]!==n.hostStatuses||t[11]!==n.supportsHostRetry?(e=e=>{let t=n.hostStatuses[e.id];if(!t||![`installing`,`starting`,`failed`].includes(t.status))return null;let c=t.status===`failed`;return(0,C.jsxs)(`div`,{role:c?`alert`:`status`,className:`flex items-start gap-3 rounded-md border border-border/60 px-3 py-2 text-xs`,children:[(0,C.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,C.jsx)(`p`,{className:`font-medium`,children:e.label}),(0,C.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-muted-foreground`,children:t.detail??(c?`Device support could not start.`:t.status===`installing`?`Installing device tools…`:`Starting device tools…`)}),c?(0,C.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:`Check the host connection and network access, then retry. Your device settings are saved.`}):null]}),c&&n.supportsHostRetry?(0,C.jsx)(a,{size:`compact`,variant:`outline`,disabled:o!==null,onClick:()=>{s(e.id),i({environmentId:r,input:{retryHostId:e.id}}).finally(()=>s(null))},children:o===e.id?`Retrying…`:`Retry`}):null]},e.id)},t[7]=r,t[8]=o,t[9]=i,t[10]=n.hostStatuses,t[11]=n.supportsHostRetry,t[12]=e):e=t[12],c=n.hosts.map(e),t[0]=r,t[1]=o,t[2]=i,t[3]=n.hostStatuses,t[4]=n.hosts,t[5]=n.supportsHostRetry,t[6]=c}else c=t[6];let l;return t[13]===c?l=t[14]:(l=(0,C.jsx)(`div`,{className:`space-y-2`,children:c}),t[13]=c,t[14]=l),l}var T=e=>e===`ios`?`iOS`:`Android`,E=`Enable this environment to open simulators and emulators, whether they run here or on a remote device host.`,D=`Allow new agent sessions in this environment to start and control local and remote devices, with required tools set up automatically.`,O=e=>Object.values(e.hostStatuses).some(e=>e.status===`ready`&&e.androidDiscoveryIncomplete);function k(e){let t=Object.values(e.hostStatuses).map(e=>e.status),n=e.hostStatus===`ready`||t.includes(`ready`);return{ready:n,busy:!n&&[e.hostStatus,...t].some(e=>e===`installing`||e===`starting`)}}function A(e,t){let n=e.devices.some(e=>e.platform===t);if(t===`android`&&!n&&O(e))return{ready:!1,message:`The Android device list may be incomplete. Check the device host and try again.`};let r=e.hosts.flatMap(e=>e.platforms.filter(e=>e.platform===t).map(t=>({...t,host:e}))),i=r.filter(e=>e.available).map(e=>e.host);if(i.length===0)return{ready:!1,message:r[0]?.reason??`${T(t)} support was not detected.`};if(i.filter(t=>e.hostStatuses[t.id]?.status===`ready`||t.kind===`local`&&e.hostStatus===`ready`).length>0&&!n)return{ready:!1,message:t===`ios`?`Xcode is installed, but no iOS Simulator is available. Install a runtime in Xcode Settings → Components.`:`The Android SDK is installed, but no virtual device exists. Create one in Android Studio → Device Manager.`};let a=i.every(e=>e.kind!==`local`)?i[0]:void 0,o=a?` on ${a.label}`:``;return{ready:!0,message:a?.kind===`eas`?`${a.label} starts ${t===`ios`?`iOS Simulators`:`Android emulators`} in the cloud with EAS Simulator.`:t===`ios`?`Xcode and iOS Simulator are available${o}.`:`The Android SDK and Emulator are available${o}.`}}function j(e){let t=(0,x.c)(75),n=f(e.environmentId,s),r=m(g.configure),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={reportFailure:!1},t[0]=i):i=t[0];let c=m(g.list,i),[l,u]=(0,S.useState)(null),[d,T]=(0,S.useState)(0),O=e.state.hostStatus!==`disabled`,A;t[1]===e.state?A=t[2]:(A=k(e.state),t[1]=e.state,t[2]=A);let{ready:j,busy:M}=A,F;t[3]===e.state.hosts?F=t[4]:(F=e.state.hosts.some(te),t[3]=e.state.hosts,t[4]=F);let I=F,L,R;t[5]!==O||t[6]!==c||t[7]!==e.environmentId?(L=()=>{O&&c({environmentId:e.environmentId,input:{}})},R=[O,c,e.environmentId],t[5]=O,t[6]=c,t[7]=e.environmentId,t[8]=L,t[9]=R):(L=t[8],R=t[9]),(0,S.useEffect)(L,R);let z;t[10]!==r||t[11]!==e?(z=async(t,n)=>{if(!p(e.environmentId,`settings:write`))return;u(t);let i=await r({environmentId:e.environmentId,input:n});u(null),t===`complete`&&i._tag===`Success`&&e.onComplete?.()},t[10]=r,t[11]=e,t[12]=z):z=t[12];let B=z,V;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(V=[`Device hub`,`Simulators`,`Agent access`],t[13]=V):V=t[13];let H;t[14]!==M||t[15]!==l||t[16]!==d?(H=e=>M||l!==null||e>d,t[14]=M,t[15]=l,t[16]=d,t[17]=H):H=t[17];let U;t[18]!==d||t[19]!==H?(U=(0,C.jsx)(ee,{title:`Set up devices`,description:`Review what runs on this environment before using simulators and emulators.`,children:(0,C.jsx)(y,{steps:V,currentStep:d,onStepChange:T,isStepDisabled:H})}),t[18]=d,t[19]=H,t[20]=U):U=t[20];let W;t[21]!==e.environmentId||t[22]!==e.state?(W=(0,C.jsx)(w,{state:e.state,environmentId:e.environmentId}),t[21]=e.environmentId,t[22]=e.state,t[23]=W):W=t[23];let G;t[24]!==M||t[25]!==n||t[26]!==O||t[27]!==l||t[28]!==e.state||t[29]!==d||t[30]!==B?(G=d===0?(0,C.jsxs)(`section`,{className:`space-y-3 text-sm`,children:[(0,C.jsx)(`h3`,{className:`font-medium`,children:`Enable the device hub`}),(0,C.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:E}),(0,C.jsx)(v,{checked:O,disabled:!n||M||l!==null,"aria-label":`Enable device hub`,onCheckedChange:e=>void B(`hub`,{enabled:!!e,...e?{}:{agentAccessEnabled:!1}})})]}),(0,C.jsx)(N,{state:e.state,pending:l===`hub`||M&&l!==`agent`})]}):null,t[24]=M,t[25]=n,t[26]=O,t[27]=l,t[28]=e.state,t[29]=d,t[30]=B,t[31]=G):G=t[31];let K;t[32]!==M||t[33]!==O||t[34]!==c||t[35]!==I||t[36]!==l||t[37]!==e.environmentId||t[38]!==e.state||t[39]!==d?(K=d===1||d===0&&O&&I?(0,C.jsxs)(`section`,{className:o(`space-y-3 text-sm`,d===0&&`mt-4`),children:[(0,C.jsx)(`h3`,{className:`font-medium`,children:`Check simulator support`}),(0,C.jsx)(ne,{state:e.state,checking:l===`check`,disabled:!O||M||l!==null,onCheck:()=>{u(`check`),c({environmentId:e.environmentId,input:{}}).finally(()=>u(null))}})]}):null,t[32]=M,t[33]=O,t[34]=c,t[35]=I,t[36]=l,t[37]=e.environmentId,t[38]=e.state,t[39]=d,t[40]=K):K=t[40];let q;t[41]!==M||t[42]!==n||t[43]!==O||t[44]!==l||t[45]!==e.state||t[46]!==d||t[47]!==B?(q=d===2?(0,C.jsxs)(`section`,{className:`space-y-3 text-sm`,children:[(0,C.jsx)(`h3`,{className:`font-medium`,children:`Allow agent control`}),(0,C.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:D}),(0,C.jsx)(v,{checked:e.state.agentAccessEnabled,disabled:!n||!O||M||l!==null,"aria-label":`Allow agents to control devices`,onCheckedChange:e=>void B(`agent`,{agentAccessEnabled:!!e})})]}),(0,C.jsx)(P,{state:e.state,pending:l===`agent`}),(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Leave this off to keep manual device controls without giving agents access.`})]}):null,t[41]=M,t[42]=n,t[43]=O,t[44]=l,t[45]=e.state,t[46]=d,t[47]=B,t[48]=q):q=t[48];let J;t[49]!==e.state.hostStatus||t[50]!==e.state.hostStatusDetail?(J=e.state.hostStatus===`failed`&&e.state.hostStatusDetail?(0,C.jsx)(`p`,{role:`alert`,className:`mt-3 text-xs text-destructive`,children:e.state.hostStatusDetail}):null,t[49]=e.state.hostStatus,t[50]=e.state.hostStatusDetail,t[51]=J):J=t[51];let Y;t[52]!==G||t[53]!==K||t[54]!==q||t[55]!==J||t[56]!==W?(Y=(0,C.jsxs)(_,{children:[W,G,K,q,J]}),t[52]=G,t[53]=K,t[54]=q,t[55]=J,t[56]=W,t[57]=Y):Y=t[57];let X;t[58]!==M||t[59]!==l||t[60]!==d?(X=d===0?(0,C.jsx)(h,{render:(0,C.jsx)(a,{variant:`outline`}),children:`Cancel`}):(0,C.jsx)(a,{variant:`outline`,disabled:M||l!==null,onClick:()=>T(d-1),children:`Back`}),t[58]=M,t[59]=l,t[60]=d,t[61]=X):X=t[61];let Z;t[62]!==n||t[63]!==l||t[64]!==j||t[65]!==d||t[66]!==B?(Z=d<2?(0,C.jsx)(a,{disabled:!j||l!==null,onClick:()=>T(d+1),children:`Continue`}):(0,C.jsx)(a,{disabled:!n||!j||l!==null,onClick:()=>void B(`complete`,{onboardingCompleted:!0}),children:l===`complete`?`Saving…`:`Done`}),t[62]=n,t[63]=l,t[64]=j,t[65]=d,t[66]=B,t[67]=Z):Z=t[67];let Q;t[68]!==X||t[69]!==Z?(Q=(0,C.jsxs)(b,{children:[X,Z]}),t[68]=X,t[69]=Z,t[70]=Q):Q=t[70];let $;return t[71]!==Y||t[72]!==Q||t[73]!==U?($=(0,C.jsxs)(C.Fragment,{children:[U,Y,Q]}),t[71]=Y,t[72]=Q,t[73]=U,t[74]=$):$=t[74],$}function te(e){return e.kind===`local`&&!e.platforms.some(M)}function M(e){return e.available}function N(e){let t=(0,x.c)(5),{state:n,pending:r,compact:a}=e,o=a!==void 0&&a;if(!r&&!k(n).ready)return null;let s;t[0]===r?s=t[1]:(s=r?(0,C.jsx)(d,{size:`xs`}):(0,C.jsx)(i,{className:`size-3 text-success`}),t[0]=r,t[1]=s);let c=r?n.hostStatus===`installing`?o?`Installing…`:`Installing device hub…`:n.hostStatus===`starting`?o?`Starting…`:`Starting device hub…`:o?`Updating…`:`Updating device hub…`:`Device hub is ready.`,l;return t[2]!==s||t[3]!==c?(l=(0,C.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[s,c]}),t[2]=s,t[3]=c,t[4]=l):l=t[4],l}function ne(e){let t=(0,x.c)(20),n;t[0]===e.state?n=t[1]:(n=A(e.state,`ios`),t[0]=e.state,t[1]=n);let r;t[2]===n?r=t[3]:(r=(0,C.jsx)(I,{platform:`iOS`,status:n}),t[2]=n,t[3]=r);let i;t[4]===e.state?i=t[5]:(i=A(e.state,`android`),t[4]=e.state,t[5]=i);let o;t[6]===i?o=t[7]:(o=(0,C.jsx)(I,{platform:`Android`,status:i}),t[6]=i,t[7]=o);let s;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`You can use either platform. Fixing a missing platform does not block the other one.`}),t[8]=s):s=t[8];let c;t[9]===e.checking?c=t[10]:(c=e.checking?(0,C.jsx)(d,{size:`xs`}):null,t[9]=e.checking,t[10]=c);let l=e.checking?`Checking…`:`Check again`,u;t[11]!==e.disabled||t[12]!==e.onCheck||t[13]!==c||t[14]!==l?(u=(0,C.jsxs)(a,{size:`compact`,variant:`outline`,disabled:e.disabled,onClick:e.onCheck,children:[c,l]}),t[11]=e.disabled,t[12]=e.onCheck,t[13]=c,t[14]=l,t[15]=u):u=t[15];let f;return t[16]!==r||t[17]!==o||t[18]!==u?(f=(0,C.jsxs)(`div`,{className:`space-y-3`,children:[r,o,s,u]}),t[16]=r,t[17]=o,t[18]=u,t[19]=f):f=t[19],f}function P(e){let t=(0,x.c)(4);if(e.pending){let n=e.state.hostStatus===`installing`?e.compact?`Installing…`:`Installing agent tools…`:e.state.hostStatus===`starting`?e.compact?`Starting…`:`Starting agent tools…`:e.compact?`Updating…`:`Updating agent access…`,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,C.jsx)(d,{size:`xs`}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,C.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[r,n]}),t[1]=n,t[2]=i),i}if(e.state.agentAccessEnabled&&k(e.state).ready&&e.state.hosts.some(F)){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsxs)(`p`,{role:`status`,className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,C.jsx)(i,{className:`size-3 text-success`}),`Agent tools are ready.`]}),t[3]=e):e=t[3],e}return null}function F(e){return e.agentDeviceInstalled}function I(e){let t=(0,x.c)(21),n=!e.compact&&`rounded-md border border-border/60 px-3 py-2`,r;t[0]===n?r=t[1]:(r=o(`flex gap-2`,n),t[0]=n,t[1]=r);let i=e.status.ready?`text-success`:`text-muted-foreground`,a;t[2]===i?a=t[3]:(a=o(`mt-0.5 size-4 shrink-0`,i),t[2]=i,t[3]=a);let s=e.status.ready?c:u,d;t[4]!==a||t[5]!==s?(d=(0,C.jsx)(l,{className:a,icon:s}),t[4]=a,t[5]=s,t[6]=d):d=t[6];let f=e.compact&&e.status.ready&&`flex items-center gap-2`,p;t[7]===f?p=t[8]:(p=o(f),t[7]=f,t[8]=p);let m;t[9]===e.platform?m=t[10]:(m=(0,C.jsx)(`p`,{className:`font-medium`,children:e.platform}),t[9]=e.platform,t[10]=m);let h=e.compact&&e.status.ready?`Ready`:e.status.message,g;t[11]===h?g=t[12]:(g=(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:h}),t[11]=h,t[12]=g);let _;t[13]!==g||t[14]!==p||t[15]!==m?(_=(0,C.jsxs)(`div`,{className:p,children:[m,g]}),t[13]=g,t[14]=p,t[15]=m,t[16]=_):_=t[16];let v;return t[17]!==r||t[18]!==_||t[19]!==d?(v=(0,C.jsxs)(`div`,{className:r,children:[d,_]}),t[17]=r,t[18]=_,t[19]=d,t[20]=v):v=t[20],v}export{D as a,O as c,I as i,A as l,N as n,E as o,j as r,k as s,P as t,w as u};
|
|
2
|
+
//# sourceMappingURL=DeviceSetup-DQqwNSXQ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e,t}from"./react-BUfh6y28.js";import{t as n}from"./jsx-runtime-DJeoFXNw.js";import{Bi as r,Ci as i,Da as a,Di as o,Ei as s,Fr as c,Gi as l,Hr as u,Ia as d,Ii as f,Lr as p,Oo as m,Pa as h,Ri as g,Si as _,So as v,Ti as y,Wa as b,Zr as x,_i as S,ao as C,ba as w,bi as T,eo as E,ki as D,kr as O,vi as k,wi as A,wo as j,xi as M,ya as N,yi as P}from"./utils-DsOiwDNN.js";import{f as F,i as I,n as L,s as R}from"./useRender-BP5vR6yH.js";var z=e(t()),B=z.createContext(!1),V=z.createContext(void 0);function H(e){let t=z.useContext(V);if(e===!1&&t===void 0)throw Error(F(27));return t}var U={...j,...m},ee=z.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=H(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return L(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:U,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),te=z.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{store:c}=H(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=b({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,h(E,e.nativeEvent))}return L(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),ne=z.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=H(),c=d(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),L(`p`,e,{ref:t,props:[{id:c},o]})}),W=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),G=function(e){return e[e.open=v.open]=`open`,e[e.closed=v.closed]=`closed`,e[e.startingStyle=v.startingStyle]=`startingStyle`,e[e.endingStyle=v.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),K=z.createContext(void 0);function q(){let e=z.useContext(K);if(e===void 0)throw Error(F(26));return e}var J=e(n()),Y={...j,...m,nestedDialogOpen(e){return e?{[G.nestedDialogOpen]:``}:null}},X=z.forwardRef(function(e,t){let{render:n,className:i,style:o,finalFocus:s,initialFocus:c,...l}=e,{store:u}=H(),d=u.useState(`descriptionElementId`),f=u.useState(`disablePointerDismissal`),p=u.useState(`floatingRootContext`),m=u.useState(`popupProps`),h=u.useState(`modal`),g=u.useState(`mounted`),_=u.useState(`nested`),v=u.useState(`nestedOpenDialogCount`),y=u.useState(`open`),b=u.useState(`openMethod`),S=u.useState(`titleElementId`),C=u.useState(`transitionStatus`),w=u.useState(`role`),T=p.useState(`floatingId`),E=l.id??T;q(),a({open:y,ref:u.context.popupRef,onComplete(){y&&u.context.onOpenChangeComplete?.(!0)}});function D(e){return e!==`touch`||u.context.popupRef.current}let O=c===void 0?D:c,k=v>0,A=u.useStateSetter(`popupElement`),j=L(`div`,e,{state:{open:y,nested:_,transitionStatus:C,nestedDialogOpen:k},props:[m,{id:E,"aria-labelledby":S??void 0,"aria-describedby":d??void 0,role:w,...M,hidden:!g,onKeyDown(e){x.has(e.key)&&e.stopPropagation()},style:{[W.nestedDialogs]:v}},l],ref:[t,u.context.popupRef,A],stateAttributesMapping:Y});return(0,J.jsx)(r,{context:p,openInteractionType:b,disabled:!g,closeOnFocusOut:!f,initialFocus:O,returnFocus:s,modal:h!==!1,restoreFocus:`popup`,children:j})}),re=z.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=H(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,J.jsx)(K.Provider,{value:n,children:(0,J.jsxs)(l,{ref:t,...r,children:[a&&o===!0&&(0,J.jsx)(p,{ref:i.context.internalBackdropRef,inert:u(!s)}),e.children]})}):null});function ie(e){let{store:t,parentContext:n,actionsRef:r,isDrawer:a}=e,o=t.useState(`open`);s(t,o),i(t);let{forceUnmount:c}=A(o,t),l=z.useCallback(()=>{t.setOpen(!1,h(C))},[t]);return z.useImperativeHandle(r,()=>({unmount:c,close:l}),[c,l]),{parentContext:n,isDrawer:a}}function ae({store:e,dialogRoot:t}){let{parentContext:n,isDrawer:r}=t,i=e.useState(`open`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),l=e.useState(`floatingRootContext`),[u,d]=z.useState(0),[f,p]=z.useState(0),m=u===0,h=g(l,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=w(t);if(m&&!a){let t=n;return o&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===t||e.context.backdropRef.current===t||N(t,s)&&!t?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:m});c(i&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{d(e),p(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{d(0),p(0)}),z.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(u+1,f+ +!!r),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[r,i,u,f,n]);let _=h.reference??R,v=h.trigger??R,b=z.useMemo(()=>I(M,h.floating),[h.floating]);return y(e,{activeTriggerProps:_,inactiveTriggerProps:v,popupProps:b,nestedOpenDialogCount:u,nestedOpenDrawerCount:f}),null}var oe={...P,modal:f(e=>e.modal),nested:f(e=>e.nested),nestedOpenDialogCount:f(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:f(e=>e.nestedOpenDrawerCount),disablePointerDismissal:f(e=>e.disablePointerDismissal),openMethod:f(e=>e.openMethod),descriptionElementId:f(e=>e.descriptionElementId),titleElementId:f(e=>e.titleElementId),viewportElement:f(e=>e.viewportElement),role:f(e=>e.role)},Z=class e extends D{constructor(e,t,n=!1){let r=new T,i=se(e);i.floatingRootContext=k(r,t,n),super(i,{popupRef:z.createRef(),backdropRef:z.createRef(),internalBackdropRef:z.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},oe)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};_(n,e,t.trigger),this.update(n)};static useStore(t,n){return o(t,(t,r)=>new e(n,t,r),!0).store}};function se(e={}){return{...S(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Q(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=H(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=Z.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});O(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`),w=ie({store:b,actionsRef:l,parentContext:v?.store.context,isDrawer:p}),T=x||S,E=z.useMemo(()=>({store:b}),[b]);return(0,J.jsx)(B.Provider,{value:!1,children:(0,J.jsxs)(V.Provider,{value:E,children:[T&&(0,J.jsx)(ae,{store:b,dialogRoot:w}),typeof n==`function`?n({payload:C}):n]})})}function ce(e){return Q(e,z.useContext(B)?`drawer`:`dialog`)}var $=function(e){return e[e.open=v.open]=`open`,e[e.closed=v.closed]=`closed`,e[e.startingStyle=v.startingStyle]=`startingStyle`,e[e.endingStyle=v.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),le={...j,...m,nested(e){return e?{[$.nested]:``}:null},nestedDialogOpen(e){return e?{[$.nestedDialogOpen]:``}:null}},ue=z.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,s=q(),{store:c}=H(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`transitionStatus`),f=c.useState(`nestedOpenDialogCount`),p=c.useState(`mounted`),m=c.useStateSetter(`viewportElement`);return L(`div`,e,{enabled:s||p,state:{open:l,nested:u,transitionStatus:d,nestedDialogOpen:f>0},ref:[t,m],stateAttributesMapping:le,props:[{role:`presentation`,hidden:!p,style:{pointerEvents:l?void 0:`none`},children:a},o]})}),de=z.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=H(),c=d(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),L(`h2`,e,{ref:t,props:[{id:c},o]})});export{Z as a,ne as c,H as d,Q as i,te as l,ue as n,re as o,ce as r,X as s,de as t,ee as u};
|
|
2
|
+
//# sourceMappingURL=DialogTitle-BNEjkHZl.js.map
|