@p4code/cli 0.9.18 → 0.9.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/dist/AcpMcpStdioBridge-DbCGhPmy.mjs +3 -0
  2. package/dist/{AcpMcpStdioBridge-4vUttgH1.mjs → AcpMcpStdioBridge-DxIZyDJz.mjs} +4 -4
  3. package/dist/{Effect-_Rz7VLdg.mjs → Effect-BqRgldaH.mjs} +20 -4
  4. package/dist/{Schema-APnY3Ozr.mjs → Schema-CkGB1Dgx.mjs} +2 -2
  5. package/dist/{Stream-CJtpwu3-.mjs → Stream-DZTo5F3N.mjs} +2 -2
  6. package/dist/{TraceDiagnostics-CeQ-TvdA.mjs → TraceDiagnostics-BYrlvKdA.mjs} +278 -50
  7. package/dist/bin.mjs +2 -2
  8. package/dist/{binCli-DzRO6f_z.mjs → binCli-DReuiGmk.mjs} +297 -125
  9. package/dist/claude-history-worker.mjs +1 -1
  10. package/dist/{claudeHistoryWorker-B6KX_N9G.mjs → claudeHistoryWorker-Cst8OnLH.mjs} +1 -1
  11. package/dist/{claudeHistoryWorker-DZ1Ft4NK.mjs → claudeHistoryWorker-r4mV4Dxy.mjs} +2 -2
  12. package/dist/client/.vite/manifest.json +2139 -2127
  13. package/dist/client/assets/{2NI2N5EU-Ds9jiLPm.js → 2NI2N5EU-DjM2qwkD.js} +2 -2
  14. package/dist/client/assets/{4UO7MD6I-BWEQQJHY.js → 4UO7MD6I-BJdq41GZ.js} +2 -2
  15. package/dist/client/assets/{5B3SVYGG-lcm66GRf.js → 5B3SVYGG-D21CBy6j.js} +2 -2
  16. package/dist/client/assets/{5GK6JWQ2-DegG64te.js → 5GK6JWQ2-DOIdqlC8.js} +2 -2
  17. package/dist/client/assets/{5N7A7DKN-CDv2ioO3.js → 5N7A7DKN-Bckll9rH.js} +2 -2
  18. package/dist/client/assets/{5OC2THR4-CaZVvwg8.js → 5OC2THR4-skJPz5iO.js} +2 -2
  19. package/dist/client/assets/{5S6HY5KT-B8WMtvrw.js → 5S6HY5KT-CRwXaSb1.js} +2 -2
  20. package/dist/client/assets/{6IMQ5BUJ-R-et-GtO.js → 6IMQ5BUJ-sJYhkmUL.js} +2 -2
  21. package/dist/client/assets/{6OLKWJ4F-CdOZHr7D.js → 6OLKWJ4F-DY2aNKk1.js} +2 -2
  22. package/dist/client/assets/{74OO7NKP-DVS5qE0v.js → 74OO7NKP-DpZyVE6P.js} +2 -2
  23. package/dist/client/assets/{75O6YZUN-B6bJpGs2.js → 75O6YZUN-8DIThGtQ.js} +2 -2
  24. package/dist/client/assets/{77XECAW3-DDozcJnk.js → 77XECAW3-BE-MTjvu.js} +2 -2
  25. package/dist/client/assets/{ABYRPUBD-BZd5-ucB.js → ABYRPUBD-DB_eiHX6.js} +2 -2
  26. package/dist/client/assets/AlertDialogRoot-COfNlajP.js +2 -0
  27. package/dist/client/assets/{AnimatedHeight-CsOfc5H1.js → AnimatedHeight-BoS1RBdk.js} +2 -2
  28. package/dist/client/assets/{AuthSurfaceShell--2lH1vql.js → AuthSurfaceShell-BM3c1qJe.js} +2 -2
  29. package/dist/client/assets/{BB2UYUI2-DAb-WdIu.js → BB2UYUI2-BhRNS6b8.js} +2 -2
  30. package/dist/client/assets/{BUM34MOA-DMU6CGcz.js → BUM34MOA-RvYWUXux.js} +2 -2
  31. package/dist/client/assets/{CEQABKGZ-BnDJUiDl.js → CEQABKGZ-byct14yE.js} +2 -2
  32. package/dist/client/assets/{CXAC5362-QKBU6D2s.js → CXAC5362-YcQsQFwj.js} +2 -2
  33. package/dist/client/assets/ChatGptUsageButton-BQOZ260S.js +2 -0
  34. package/dist/client/assets/ChatMarkdown-BdoTEVpd.js +49 -0
  35. package/dist/client/assets/{CheckboxIndicator-CLFg8-A1.js → CheckboxIndicator-Dj91Im5z.js} +2 -2
  36. package/dist/client/assets/{ClippedText-aNLi0IDp.js → ClippedText-CmBRrYNb.js} +2 -2
  37. package/dist/client/assets/CodexSetupSection.logic-CseyxFgK.js +2 -0
  38. package/dist/client/assets/{CollapsiblePanel-BlUD5mJC.js → CollapsiblePanel-BwDr-EKA.js} +2 -2
  39. package/dist/client/assets/{ComboboxClear-DKHwuDAL.js → ComboboxClear-DeqR6c-6.js} +2 -2
  40. package/dist/client/assets/{ComboboxGroupLabel-BaZLyLCv.js → ComboboxGroupLabel-Dk-MF4sD.js} +2 -2
  41. package/dist/client/assets/{CommandBlock-Bg2O3rbF.js → CommandBlock-Cg8P2GXg.js} +2 -2
  42. package/dist/client/assets/{CompositeRoot-_C3uLH2F.js → CompositeRoot-Cx12XSsh.js} +2 -2
  43. package/dist/client/assets/{ConnectAgentSurface-D-fMTn_R.js → ConnectAgentSurface-D9MYjA6g.js} +2 -2
  44. package/dist/client/assets/{ConnectionStatusDot-vOKtZfeV.js → ConnectionStatusDot-BnhNFCMA.js} +2 -2
  45. package/dist/client/assets/{DRLTVNUE-DvpJAT6K.js → DRLTVNUE-BZ7eTlHc.js} +2 -2
  46. package/dist/client/assets/{DYY6UVD2-DFSg5DAZ.js → DYY6UVD2-DIWnFjlV.js} +2 -2
  47. package/dist/client/assets/{DevicePanel-Dvozgov3.js → DevicePanel-CpWnw2HZ.js} +2 -2
  48. package/dist/client/assets/DeviceSetup-C02U1yvN.js +2 -0
  49. package/dist/client/assets/{DialogTitle-C9j5Tmuy.js → DialogTitle-5cBExuFs.js} +2 -2
  50. package/dist/client/assets/{DiffCommentAnnotation-CAml763Q.js → DiffCommentAnnotation-CHYeyesq.js} +3 -3
  51. package/dist/client/assets/{DiffFileTree-2Y-Da6MW.js → DiffFileTree-zq0G5Jq3.js} +2 -2
  52. package/dist/client/assets/DiffPanel-ghqOrQdi.js +2 -0
  53. package/dist/client/assets/{DiffWorkerPoolProvider-Czi5bOUV.js → DiffWorkerPoolProvider-QbRiMHeR.js} +3 -3
  54. package/dist/client/assets/{EmbeddedDesign-AHra-cLY.js → EmbeddedDesign-ExUecHKZ.js} +6 -6
  55. package/dist/client/assets/{EnvironmentMachineIcon-BnMVjB89.js → EnvironmentMachineIcon-Lz2YGk0G.js} +2 -2
  56. package/dist/client/assets/{ExpandableText-gKNgCxfU.js → ExpandableText-B034p2kF.js} +2 -2
  57. package/dist/client/assets/{FNOVOB4O-D2IqnTWb.js → FNOVOB4O-Cch7VyQQ.js} +2 -2
  58. package/dist/client/assets/{FieldControl-Bjdbc6Ii.js → FieldControl-H6iQvC-Q.js} +2 -2
  59. package/dist/client/assets/{FileDiff-Di0hvnyJ.js → FileDiff-C1_8HZ7T.js} +2 -2
  60. package/dist/client/assets/{FilePreviewPanel-2-RLs_YZ.js → FilePreviewPanel-DERxofVe.js} +6 -6
  61. package/dist/client/assets/FoldedSettingsSection-okCu3zVD.js +2 -0
  62. package/dist/client/assets/{HDGCDEEZ-AZF834xy.js → HDGCDEEZ-CJ_9BjZ0.js} +2 -2
  63. package/dist/client/assets/{HSJLKHB7-Dtz-7WMf.js → HSJLKHB7-BvfNYUiJ.js} +2 -2
  64. package/dist/client/assets/{Icons-BzIBDVKW.js → Icons-DmQwwfAN.js} +2 -2
  65. package/dist/client/assets/Input-DWc7cRWt.js +2 -0
  66. package/dist/client/assets/{IntervalSecondsField-Fdrpvkqj.js → IntervalSecondsField-S7jLIub2.js} +2 -2
  67. package/dist/client/assets/JZOYTAAL-RUIcMwMn.js +1 -0
  68. package/dist/client/assets/{K3MD6TGW-BPz_yQfQ.js → K3MD6TGW-C513S1_s.js} +2 -2
  69. package/dist/client/assets/{K7RP3OMA-C-IhAYzY.js → K7RP3OMA-zhgZmSWl.js} +2 -2
  70. package/dist/client/assets/{KeybindingsSettings.logic-DjD-8Wsr.js → KeybindingsSettings.logic-C6XG7NtX.js} +2 -2
  71. package/dist/client/assets/{LHDIQX7Q-Dw7FK-yZ.js → LHDIQX7Q-BmjYN5gQ.js} +2 -2
  72. package/dist/client/assets/{LUXOKEGN-Cp4yLfcO.js → LUXOKEGN-B0Kwi43W.js} +2 -2
  73. package/dist/client/assets/{LinkMachineSelect-v3ZAAPFG.js → LinkMachineSelect-GyKAeGYQ.js} +2 -2
  74. package/dist/client/assets/{MathTypeset-CAVYwtpt.js → MathTypeset-DfU_zRMI.js} +2 -2
  75. package/dist/client/assets/ModelLiveLayer-DjtYQpVe.js +3 -0
  76. package/dist/client/assets/{N3JZAHOW-sZve4CbV.js → N3JZAHOW-BXB2c-Us.js} +2 -2
  77. package/dist/client/assets/{NUIALGQ3-DMlKhtdq.js → NUIALGQ3-BkehuL9A.js} +2 -2
  78. package/dist/client/assets/{NoProjectsHero-B0ChXuQG.js → NoProjectsHero-C-VNr8Ui.js} +2 -2
  79. package/dist/client/assets/{O65XPQGZ-COhBlGA1.js → O65XPQGZ-CPn-XJue.js} +2 -2
  80. package/dist/client/assets/{O7XIQ6OM-D-y75rjS.js → O7XIQ6OM-DAQPVVnq.js} +2 -2
  81. package/dist/client/assets/{OFQON5FD-kw-f4mV4.js → OFQON5FD-BKoNBxEK.js} +2 -2
  82. package/dist/client/assets/{P4ConnectAccountPages-BXM_FJyy.js → P4ConnectAccountPages-C_7SfUQ2.js} +2 -2
  83. package/dist/client/assets/{P4ConnectSidebarSignIn-D8uwPPR6.js → P4ConnectSidebarSignIn-B6e-wkqI.js} +2 -2
  84. package/dist/client/assets/{PJQHF43J-Dww1R-k6.js → PJQHF43J-Byb4NdRa.js} +2 -2
  85. package/dist/client/assets/PanelLayoutControls-BpjspxNc.js +216 -0
  86. package/dist/client/assets/{PierreEntryIcon-C-5f-jFb.js → PierreEntryIcon-h4qT502J.js} +2 -2
  87. package/dist/client/assets/{PopoverHandle-BwqnKm9Y.js → PopoverHandle-DEcvmS0k.js} +2 -2
  88. package/dist/client/assets/PreviewPanel-lT6UT8SC.js +2 -0
  89. package/dist/client/assets/{ProjectDefaultsSettings-rvN_67Gu.js → ProjectDefaultsSettings-nqWOPUBM.js} +2 -2
  90. package/dist/client/assets/{ProjectFavicon-CPvmNs3J.js → ProjectFavicon-wwkvNTYJ.js} +3 -3
  91. package/dist/client/assets/{ProjectIconPickerDialog-blbck4gY.js → ProjectIconPickerDialog-CAEx0HQF.js} +2 -2
  92. package/dist/client/assets/{ProjectMonogram-Cesz5yVS.js → ProjectMonogram-C8btbogu.js} +2 -2
  93. package/dist/client/assets/{ProviderAuthTerminal-BXGE9cPY.js → ProviderAuthTerminal-Seln-0IQ.js} +2 -2
  94. package/dist/client/assets/ProviderModelPicker-p5oWTfTD.js +2 -0
  95. package/dist/client/assets/{ProviderSettingsForm-CRvI8mDe.js → ProviderSettingsForm-DP5cO9tc.js} +2 -2
  96. package/dist/client/assets/PullRequestCodeTab-BhWK4Zqq.js +6 -0
  97. package/dist/client/assets/{RHNBAITX-CY4FKVtu.js → RHNBAITX-ZKmIoa8f.js} +2 -2
  98. package/dist/client/assets/{ReadOnlySourcePreview-DK9ZCAf4.js → ReadOnlySourcePreview-C8hhN481.js} +2 -2
  99. package/dist/client/assets/{RedactedSensitiveText-DrIhPFXw.js → RedactedSensitiveText-BMXImj30.js} +2 -2
  100. package/dist/client/assets/RenderErrorBoundary-CYWiIuBa.js +23 -0
  101. package/dist/client/assets/{RightPanelResizeHandle-DBCfKzRv.js → RightPanelResizeHandle-Cog3JVw0.js} +2 -2
  102. package/dist/client/assets/{SLD4V6NK-Dtrbq5qR.js → SLD4V6NK-BW_1--rc.js} +2 -2
  103. package/dist/client/assets/{ScheduledTasksSettings-CvbQDrJp.js → ScheduledTasksSettings-D6cHBUhW.js} +6 -6
  104. package/dist/client/assets/{ScopedSwitch-DQHfQgMZ.js → ScopedSwitch-BzU8Hn6s.js} +2 -2
  105. package/dist/client/assets/{ScrollAreaCorner-B9Aiu69u.js → ScrollAreaCorner-DFCZuJ0r.js} +2 -2
  106. package/dist/client/assets/{SecretInput-CxJl9pux.js → SecretInput-CRgvNUgU.js} +2 -2
  107. package/dist/client/assets/{SelectScrollUpArrow-Dj2om6Qx.js → SelectScrollUpArrow-C-MWJdyw.js} +2 -2
  108. package/dist/client/assets/{SelfImproveSettingsSection-yFj7aCio.js → SelfImproveSettingsSection--Dcxxm73.js} +2 -2
  109. package/dist/client/assets/{SettingsPanels-H_7XUe5G.js → SettingsPanels-C79826rW.js} +7 -7
  110. package/dist/client/assets/{SettingsPanels.logic-BYLv56aj.js → SettingsPanels.logic-DPfiTtgf.js} +2 -2
  111. package/dist/client/assets/{SettingsScopeNotice-pJqEfHRd.js → SettingsScopeNotice-C9OAfACb.js} +2 -2
  112. package/dist/client/assets/{SidebarStageBackdrop-DWShR_RZ.js → SidebarStageBackdrop-syJ1VaYP.js} +2 -2
  113. package/dist/client/assets/{T3PCR2KE-BFmO9IZ-.js → T3PCR2KE-Bc51hYDo.js} +2 -2
  114. package/dist/client/assets/{TKWO2OVW-DMeVANpK.js → TKWO2OVW-mV-gJkJw.js} +2 -2
  115. package/dist/client/assets/{TSHNXIZL-COvYTPCc.js → TSHNXIZL-Bs_azRDw.js} +2 -2
  116. package/dist/client/assets/{ThemeEditorPanel-BxOl9N6E.js → ThemeEditorPanel-DvlDdC-r.js} +3 -3
  117. package/dist/client/assets/{ThreadDetailsItemsMenu-BXQbo6bY.js → ThreadDetailsItemsMenu-DFAwPwtf.js} +44 -44
  118. package/dist/client/assets/ThreadTerminalDrawer-CBRpijGu.js +5 -0
  119. package/dist/client/assets/TooltipProvider-DiV5KdTq.js +2 -0
  120. package/dist/client/assets/{UQJE5E4I-CajoppS3.js → UQJE5E4I-DL8IPyLr.js} +2 -2
  121. package/dist/client/assets/{USNYFO5S-BQLaJAkC.js → USNYFO5S-CxX5m2eb.js} +2 -2
  122. package/dist/client/assets/{Virtualizer-kAxtf9JI.js → Virtualizer-hL0IrPqB.js} +2 -2
  123. package/dist/client/assets/{WEVWDWVA-Bn1CMBLe.js → WEVWDWVA-CCg7BLOe.js} +2 -2
  124. package/dist/client/assets/{WorkspaceBreadcrumb-KdZMrP13.js → WorkspaceBreadcrumb-Cok6l_SJ.js} +2 -2
  125. package/dist/client/assets/{WorkspacePageContainer-VqvvyrKx.js → WorkspacePageContainer-_--jFIZ8.js} +2 -2
  126. package/dist/client/assets/{WorkspacePageHeader-Ca7-ugiS.js → WorkspacePageHeader-CJB6rvZc.js} +2 -2
  127. package/dist/client/assets/{X5RFHQXM-CPBgn0uR.js → X5RFHQXM-CoEhAoaG.js} +2 -2
  128. package/dist/client/assets/{X62E3GBT-DEsBFWSE.js → X62E3GBT-v3am3MF5.js} +2 -2
  129. package/dist/client/assets/{XBNEOJTC-rIiejuIa.js → XBNEOJTC-CNH8QiJb.js} +2 -2
  130. package/dist/client/assets/{YHV2MVVZ-FepTeOr1.js → YHV2MVVZ-BAtBSLld.js} +2 -2
  131. package/dist/client/assets/{YURCZMG2-Co7j1onF.js → YURCZMG2-B0qIfRPW.js} +2 -2
  132. package/dist/client/assets/{YVG2LODB-CH8YtqJ9.js → YVG2LODB-7yKJRNqu.js} +2 -2
  133. package/dist/client/assets/_chat-CPyEKO_k.js +47 -0
  134. package/dist/client/assets/_chat.design-BkPz6B_R.js +2 -0
  135. package/dist/client/assets/{_chat.index-DZmhCx_Q.js → _chat.index-DGRldHwy.js} +2 -2
  136. package/dist/client/assets/{_chat.new-BLxqLetm.js → _chat.new-Be-FWv3w.js} +2 -2
  137. package/dist/client/assets/_chat.pull-requests-Csb_f8e_.js +2 -0
  138. package/dist/client/assets/{alert-BdISKl4u.js → alert-D6WJ0q4-.js} +2 -2
  139. package/dist/client/assets/{alert-dialog-Broi1wym.js → alert-dialog-DsMTn0ZK.js} +2 -2
  140. package/dist/client/assets/{assetUrls-DyJx-URx.js → assetUrls-CsEDCYyh.js} +2 -2
  141. package/dist/client/assets/assets-CA-ZYmQr.js +2 -0
  142. package/dist/client/assets/{browserHistoryStore-zdRsIuMc.js → browserHistoryStore-BVGoot2u.js} +2 -2
  143. package/dist/client/assets/{browserLinkTarget-aye_Gpt4.js → browserLinkTarget-zjhG9Lyg.js} +2 -2
  144. package/dist/client/assets/{checkbox-ueGFMqVv.js → checkbox-Cw33xyU7.js} +2 -2
  145. package/dist/client/assets/{color-picker-CUoPp4AJ.js → color-picker-Bmtarpj9.js} +2 -2
  146. package/dist/client/assets/{combobox-BfOjf6Iu.js → combobox-D6RfzdE7.js} +2 -2
  147. package/dist/client/assets/{command-CeMH9lgx.js → command-1dJ-vX2N.js} +2 -2
  148. package/dist/client/assets/{connect-CQUjsv6p.js → connect-BdyG6QZP.js} +2 -2
  149. package/dist/client/assets/connect-agent-BZgF1WVU.js +2 -0
  150. package/dist/client/assets/{design-BL2REeQ-.js → design-9PZeJvkV.js} +2 -2
  151. package/dist/client/assets/{device-DUMKyegd.js → device-B_zaE4OU.js} +2 -2
  152. package/dist/client/assets/{dialog-BzESHWgr.js → dialog-5OaxRXCC.js} +2 -2
  153. package/dist/client/assets/{diffPanelStore-B-hQEy6C.js → diffPanelStore-D3ARjaef.js} +2 -2
  154. package/dist/client/assets/{diffRendering-BnN6RWwy.js → diffRendering-aGA2PUMV.js} +2 -2
  155. package/dist/client/assets/{dist--Lo1A95S.js → dist-DQanjDEK.js} +3 -3
  156. package/dist/client/assets/{draft-input-BozMgkbl.js → draft-input-DM7mC5ty.js} +2 -2
  157. package/dist/client/assets/{duoViewer-mOZwt5UN.js → duoViewer-WUHHsw83.js} +2 -2
  158. package/dist/client/assets/{dynamic-3CmgXeht.js → dynamic-BrZIqKQ1.js} +3 -3
  159. package/dist/client/assets/{embeddedScripts-g3gqCUmg.js → embeddedScripts-Bjon5VEq.js} +2 -2
  160. package/dist/client/assets/{empty-CeYEMFdG.js → empty-VkAC9qIO.js} +2 -2
  161. package/dist/client/assets/entities-iVR9hStG.js +2 -0
  162. package/dist/client/assets/{fileLinks-LQyYck3z.js → fileLinks-ZsyrXe-F.js} +2 -2
  163. package/dist/client/assets/{fileTreeExpansion-CY-keZ2e.js → fileTreeExpansion-CZA6X0sP.js} +2 -2
  164. package/dist/client/assets/fold-vertical-CN9ryhZz.js +2 -0
  165. package/dist/client/assets/{getDiffFileInput-ClUa7N40.js → getDiffFileInput-C973oCCO.js} +2 -2
  166. package/dist/client/assets/{htmlRender-CxBGTvqW.js → htmlRender-DYI6n9Xo.js} +2 -2
  167. package/dist/client/assets/index-ColdECgE.js +3 -0
  168. package/dist/client/assets/{input-K95B1E2P.js → input-CiPGmOLv.js} +2 -2
  169. package/dist/client/assets/{input-group-BAbOiIZs.js → input-group-DOUsG7P-.js} +2 -2
  170. package/dist/client/assets/{kbd-D9Q8zN3_.js → kbd-C8opCm5n.js} +2 -2
  171. package/dist/client/assets/{keybindings-C427DPQo.js → keybindings-CbaDrm2P.js} +2 -2
  172. package/dist/client/assets/{lazy-BDrl-IrZ.js → lazy-BWBxhQ9c.js} +4 -4
  173. package/dist/client/assets/{lazyRouteComponent-Bi84pz13.js → lazyRouteComponent-BZe6tHvz.js} +2 -2
  174. package/dist/client/assets/{link-B57I0_wC.js → link-BHR6GsRr.js} +2 -2
  175. package/dist/client/assets/{linkedPrompt-zM8XlD0_.js → linkedPrompt-CN5vzMKu.js} +2 -2
  176. package/dist/client/assets/main-i3nSjwXu.css +2 -0
  177. package/dist/client/assets/main-xeaL6Ue7.js +38 -0
  178. package/dist/client/assets/mediaReference-D4xASAKr.js +2 -0
  179. package/dist/client/assets/{mediaSource-BQkNpHYP.js → mediaSource-DJf0a3Hm.js} +2 -2
  180. package/dist/client/assets/{modelScene-DWYEc7-j.js → modelScene-Dg2T9WKU.js} +2 -2
  181. package/dist/client/assets/{number-field-D6t0GpAB.js → number-field-BkDsfSCt.js} +2 -2
  182. package/dist/client/assets/{observeResize-nOwAB2yP.js → observeResize-BESwMMOy.js} +2 -2
  183. package/dist/client/assets/{onboarding-BpYTNtvC.js → onboarding-7dyWHc7v.js} +2 -2
  184. package/dist/client/assets/{openFileInPreview-DFpXOfx7.js → openFileInPreview-l71la8rp.js} +2 -2
  185. package/dist/client/assets/{p4ProjectFile-Dkwk3dWQ.js → p4ProjectFile-CC8L8IBq.js} +2 -2
  186. package/dist/client/assets/{pair-Bc34xPWk.js → pair-CjGF7d0N.js} +2 -2
  187. package/dist/client/assets/{pendingSendStore-ettG1x40.js → pendingSendStore-CX8QB7C5.js} +2 -2
  188. package/dist/client/assets/{phoneViewer-BCeyyPaZ.js → phoneViewer-CpRP0Ylg.js} +2 -2
  189. package/dist/client/assets/{pierre-icons-C2-xRx0J.js → pierre-icons-CX8MNnZC.js} +2 -2
  190. package/dist/client/assets/{popover-CtPuvMeZ.js → popover-hyDlWUPU.js} +2 -2
  191. package/dist/client/assets/{preview-CS0uw3GP.js → preview-DX0t2QY_.js} +2 -2
  192. package/dist/client/assets/{preview-DIIM6Lws.js → preview-DnCP9Q0k.js} +2 -2
  193. package/dist/client/assets/{previewMiniPlayerStore-oJw0qrRM.js → previewMiniPlayerStore-DByen2Nk.js} +2 -2
  194. package/dist/client/assets/{primary-B0bbGdiR.js → primary-BvBZk3BL.js} +2 -2
  195. package/dist/client/assets/primaryCloudLinkState-CHXPTqr2.js +2 -0
  196. package/dist/client/assets/{projectFilesQueryState-DpLF9eJd.js → projectFilesQueryState-D1KYNZXm.js} +2 -2
  197. package/dist/client/assets/{projectScriptEditor-Bp7idsB3.js → projectScriptEditor-Dy8U6TBl.js} +2 -2
  198. package/dist/client/assets/providerSkills-CpjiWlTj.js +2 -0
  199. package/dist/client/assets/{pullRequestDetail.logic-8vF2qB9V.js → pullRequestDetail.logic-CHJRE71s.js} +3 -3
  200. package/dist/client/assets/{pullRequestIcons-6_4tgVDN.js → pullRequestIcons-1lUVOGQJ.js} +2 -2
  201. package/dist/client/assets/{pullRequestReviewStore-C8_coQYO.js → pullRequestReviewStore-CUZ0N4F2.js} +2 -2
  202. package/dist/client/assets/pullRequests-DjzqqdNY.js +2 -0
  203. package/dist/client/assets/queries-D2fZuj-t.js +2 -0
  204. package/dist/client/assets/{query-DpmTmXUV.js → query-CeIgbVxh.js} +2 -2
  205. package/dist/client/assets/{radio-group-DSfZzUu8.js → radio-group-C14CASyG.js} +2 -2
  206. package/dist/client/assets/relay-aZlRxOWS.js +2 -0
  207. package/dist/client/assets/{renderScheduler-Cvu4oEGc.js → renderScheduler-BLaTctiX.js} +2 -2
  208. package/dist/client/assets/{rightPanelStore-D-meSGn7.js → rightPanelStore-Bt0unAo8.js} +2 -2
  209. package/dist/client/assets/runtime-D5AfNyNA.js +7 -0
  210. package/dist/client/assets/{runtimeModeConfig-MYD8WQl8.js → runtimeModeConfig-DymGoV55.js} +2 -2
  211. package/dist/client/assets/{scheduledTasksSettings.logic-DmlMHwKF.js → scheduledTasksSettings.logic-BjvsiCPJ.js} +3 -3
  212. package/dist/client/assets/{scroll-area-D9QT2Odm.js → scroll-area-D2D-AlvC.js} +2 -2
  213. package/dist/client/assets/{select-BtqP8nTL.js → select-CE2f-g-3.js} +2 -2
  214. package/dist/client/assets/{selfImproveFindings-DZS7PCvJ.js → selfImproveFindings-Bhi6QF1b.js} +2 -2
  215. package/dist/client/assets/{server-BYnv0CK4.js → server-B2y_yoz_.js} +2 -2
  216. package/dist/client/assets/{session-BryEqNW-.js → session-Dt_Dt-Og.js} +2 -2
  217. package/dist/client/assets/session-logic-CPQJM-gL.js +27 -0
  218. package/dist/client/assets/{settings-A-pqSt1Y.js → settings-BIR_Igib.js} +2 -2
  219. package/dist/client/assets/{settings.appearance-C_uChPSz.js → settings.appearance-D0uNLG6m.js} +2 -2
  220. package/dist/client/assets/settings.archived-DHE_0aGh.js +2 -0
  221. package/dist/client/assets/{settings.computer-use-Dg_7f0JL.js → settings.computer-use-CNVg4Kl5.js} +2 -2
  222. package/dist/client/assets/settings.connections-Bt5upKXR.js +2 -0
  223. package/dist/client/assets/{settings.data-controls-SDdipjc2.js → settings.data-controls-Bu-fCPHf.js} +2 -2
  224. package/dist/client/assets/{settings.decisions-CoyKjdc1.js → settings.decisions-B9lckxtw.js} +2 -2
  225. package/dist/client/assets/{settings.designs-4eHPAt6y.js → settings.designs-CLLnQttY.js} +2 -2
  226. package/dist/client/assets/settings.diagnostics-Bl2X85nQ.js +2 -0
  227. package/dist/client/assets/{settings.general-DAWqQIHm.js → settings.general-CJSdSR2k.js} +2 -2
  228. package/dist/client/assets/settings.integrations-DRpNV9D5.js +2 -0
  229. package/dist/client/assets/{settings.keybindings-B0oNRJrN.js → settings.keybindings-BPtpYe84.js} +2 -2
  230. package/dist/client/assets/{settings.open-source-licenses-BI8-fEG8.js → settings.open-source-licenses-DYpshDh1.js} +2 -2
  231. package/dist/client/assets/{settings.plugins-B6My9wD7.js → settings.plugins-C9ZOoiar.js} +4 -4
  232. package/dist/client/assets/settings.projects-CMHQJUvG.js +4 -0
  233. package/dist/client/assets/settings.providers-Bfr9fIiF.js +3 -0
  234. package/dist/client/assets/{settings.scheduled-tasks-Bx6ZIK0R.js → settings.scheduled-tasks-BEYOe2xs.js} +2 -2
  235. package/dist/client/assets/{settings.secrets-Dt4ORQnt.js → settings.secrets-DIyDPOQx.js} +2 -2
  236. package/dist/client/assets/{settings.snap-shot-CytMd2pC.js → settings.snap-shot-DmjWtA3x.js} +2 -2
  237. package/dist/client/assets/settings.source-control-DvaOZ7kM.js +2 -0
  238. package/dist/client/assets/{settings.storage-BfvQd358.js → settings.storage-B4XbjYVO.js} +2 -2
  239. package/dist/client/assets/settingsLayout-Ds1fJJk7.js +3 -0
  240. package/dist/client/assets/{sidebar-DbrWNN9-.js → sidebar-4oe_dr6q.js} +2 -2
  241. package/dist/client/assets/{sidebarProjectGrouping-CZnpDNTf.js → sidebarProjectGrouping-RQlsFe56.js} +2 -2
  242. package/dist/client/assets/{skeleton-DxuQc9Kk.js → skeleton-D6RVfMa8.js} +2 -2
  243. package/dist/client/assets/{sourceControl-BbrGhAuF.js → sourceControl-BhvxhaEx.js} +2 -2
  244. package/dist/client/assets/sourceControlClients-Bs5R87fg.js +2 -0
  245. package/dist/client/assets/{spinner-DmRIQvmI.js → spinner-C-qDE4WQ.js} +2 -2
  246. package/dist/client/assets/src-R7EkrVcv.js +15 -0
  247. package/dist/client/assets/terminal-links-BohHFDfc.js +2 -0
  248. package/dist/client/assets/terminalSessions-Cnj30QDx.js +2 -0
  249. package/dist/client/assets/{textarea-C_3SxeEV.js → textarea-CWbMGhL9.js} +2 -2
  250. package/dist/client/assets/{themePalette-DSR5tBE9.js → themePalette-B_fGWNEh.js} +3 -3
  251. package/dist/client/assets/{threadCheckpoints-D0dMlqZE.js → threadCheckpoints-B88N2CXf.js} +2 -2
  252. package/dist/client/assets/{toggle-Zti3zuzr.js → toggle-CKr6iZUR.js} +2 -2
  253. package/dist/client/assets/{toggle-group-D015gcqT.js → toggle-group-B1WN0Pgy.js} +2 -2
  254. package/dist/client/assets/{tooltip-CAzkzAoH.js → tooltip-CCYU8XGM.js} +2 -2
  255. package/dist/client/assets/uiStateStore-BZ4RuLIL.js +2 -0
  256. package/dist/client/assets/unfold-vertical-CldLe1hB.js +2 -0
  257. package/dist/client/assets/{usage-BJA7zQoS.js → usage-GID8Ml88.js} +2 -2
  258. package/dist/client/assets/{usageAccess-D5FAb4jV.js → usageAccess-B0nqd8U-.js} +2 -2
  259. package/dist/client/assets/{usageFormat-Njxx7Q49.js → usageFormat-CUSzTPTq.js} +2 -2
  260. package/dist/client/assets/{usageShortcuts-DuJeedG7.js → usageShortcuts-jGu1QJHr.js} +2 -2
  261. package/dist/client/assets/{use-atom-command-DMW6SFOx.js → use-atom-command-QDd_NqJQ.js} +2 -2
  262. package/dist/client/assets/{useAriaLabelledBy-E7KNTqMb.js → useAriaLabelledBy-CJvtvui4.js} +2 -2
  263. package/dist/client/assets/useHandleNewThread-ClgC6Lcw.js +2 -0
  264. package/dist/client/assets/{useLocation-hVHAnHTx.js → useLocation-KvBZAN7v.js} +2 -2
  265. package/dist/client/assets/{useNavigate-B7EiSugn.js → useNavigate-DXSBYc-k.js} +2 -2
  266. package/dist/client/assets/{useNavigateBack-BC3GGm7e.js → useNavigateBack-DzR35iiJ.js} +2 -2
  267. package/dist/client/assets/{useP4ConnectAuthPrompt-D3qxx30I.js → useP4ConnectAuthPrompt-DMl-0U53.js} +2 -2
  268. package/dist/client/assets/{useParams-C5b2x5BH.js → useParams-D9reDvT8.js} +2 -2
  269. package/dist/client/assets/{usePermissionStatus-Zf48W2tu.js → usePermissionStatus-C5YvHVz-.js} +2 -2
  270. package/dist/client/assets/{usePopupViewport-Dtwu2x5j.js → usePopupViewport-D7yp2NvZ.js} +2 -2
  271. package/dist/client/assets/{usePullRequestActions-BtPaWuCg.js → usePullRequestActions-CJvtylIq.js} +2 -2
  272. package/dist/client/assets/{useRegisterFieldControl-BMmbsxkx.js → useRegisterFieldControl-D-hYtXkm.js} +2 -2
  273. package/dist/client/assets/{useScopedModelAvailability-BIveWOlk.js → useScopedModelAvailability-DGPFTMHL.js} +2 -2
  274. package/dist/client/assets/useSettings-BJR7Rf97.js +3 -0
  275. package/dist/client/assets/utils-DkKLB01I.js +24 -0
  276. package/dist/client/assets/vcsRefInvalidation-Bnup-5J0.js +2 -0
  277. package/dist/client/assets/welcome-CMuTnFAm.js +2 -0
  278. package/dist/client/index.html +1 -1
  279. package/dist/{mcpResponsePayloads-BBvPAlwj.mjs → mcpResponsePayloads-tqyeJD3c.mjs} +10 -9
  280. package/dist/{ProjectCloneTracker-DAE46hjz.mjs → preview-DcFC_OYY.mjs} +902 -438
  281. package/dist/{renderer-iWfzRWCX.mjs → renderer-CswgrCon.mjs} +2 -2
  282. package/dist/{runtime-CllDK9QU.mjs → runtime-Bec3_bh8.mjs} +3 -3
  283. package/dist/{runtimeLayer-D1H3yRj8.mjs → runtimeLayer-B6H9jZgZ.mjs} +1 -1
  284. package/dist/{runtimeLayer-CblMBDQ6.mjs → runtimeLayer-D4LpzNmS.mjs} +3263 -2983
  285. package/dist/{server-vm1eH-y1.mjs → server-4nWc1d6L.mjs} +385 -229
  286. package/dist/{sha2-9FUhed4s.mjs → sha2-BfCJmkJJ.mjs} +47 -8
  287. package/package.json +1 -1
  288. package/dist/AcpMcpStdioBridge-RQnwhGrw.mjs +0 -3
  289. package/dist/client/assets/AlertDialogRoot-D2Lzxp77.js +0 -2
  290. package/dist/client/assets/ChatGptUsageButton-CM16mB7z.js +0 -2
  291. package/dist/client/assets/ChatMarkdown-LYkpVHJO.js +0 -49
  292. package/dist/client/assets/CodexSetupSection.logic-CNAX4_fV.js +0 -2
  293. package/dist/client/assets/DeviceSetup-O_9LLGD9.js +0 -2
  294. package/dist/client/assets/DiffPanel-CDixqNzb.js +0 -2
  295. package/dist/client/assets/FoldedSettingsSection-CrJX4FnL.js +0 -2
  296. package/dist/client/assets/Input-BWhtnCC0.js +0 -2
  297. package/dist/client/assets/JZOYTAAL-BCdmxsmo.js +0 -1
  298. package/dist/client/assets/ModelLiveLayer-CxX5pYmA.js +0 -3
  299. package/dist/client/assets/PanelLayoutControls-CC5OYRRR.js +0 -216
  300. package/dist/client/assets/PreviewPanel-BvRNyyKQ.js +0 -2
  301. package/dist/client/assets/ProviderModelPicker-Cq3CogU6.js +0 -2
  302. package/dist/client/assets/PullRequestCodeTab-C5kr72DG.js +0 -6
  303. package/dist/client/assets/RenderErrorBoundary-DgYrYlQR.js +0 -23
  304. package/dist/client/assets/ThreadTerminalDrawer-DcYWT4k2.js +0 -5
  305. package/dist/client/assets/TooltipProvider-BzOo4iyi.js +0 -2
  306. package/dist/client/assets/_chat-DoDgVLYz.js +0 -47
  307. package/dist/client/assets/_chat.design-C593M39o.js +0 -2
  308. package/dist/client/assets/_chat.pull-requests-0Ce1mGUC.js +0 -2
  309. package/dist/client/assets/assets-lJdcWn_Q.js +0 -2
  310. package/dist/client/assets/connect-agent-DsQQcex2.js +0 -2
  311. package/dist/client/assets/entities-CpJdh0W5.js +0 -2
  312. package/dist/client/assets/fold-vertical-BscQ96iN.js +0 -2
  313. package/dist/client/assets/index-BWKkBtFt.js +0 -3
  314. package/dist/client/assets/main-C8b9a0ht.js +0 -37
  315. package/dist/client/assets/main-CCH0X0zL.css +0 -2
  316. package/dist/client/assets/mediaReference-BIsAfUoY.js +0 -2
  317. package/dist/client/assets/primaryCloudLinkState-B6CxZwAR.js +0 -2
  318. package/dist/client/assets/providerSkills-yqPKKW6i.js +0 -2
  319. package/dist/client/assets/pullRequests-u-PJpGXV.js +0 -2
  320. package/dist/client/assets/queries-DDAXRF4r.js +0 -2
  321. package/dist/client/assets/relay-CnLeC-mg.js +0 -2
  322. package/dist/client/assets/runtime-DUPVFypn.js +0 -7
  323. package/dist/client/assets/session-logic-DZfPxiBF.js +0 -26
  324. package/dist/client/assets/settings.archived-BtKfrhpi.js +0 -2
  325. package/dist/client/assets/settings.connections-CHawbHDz.js +0 -2
  326. package/dist/client/assets/settings.diagnostics-BFlcsuN0.js +0 -2
  327. package/dist/client/assets/settings.integrations-CpUf4-MX.js +0 -2
  328. package/dist/client/assets/settings.projects-hrhEEIli.js +0 -4
  329. package/dist/client/assets/settings.providers-BKeGnq6G.js +0 -3
  330. package/dist/client/assets/settings.source-control-B6eUVvNg.js +0 -2
  331. package/dist/client/assets/settingsLayout-BijX6mlS.js +0 -3
  332. package/dist/client/assets/sourceControlClients-CG8qRQgm.js +0 -2
  333. package/dist/client/assets/src-BZzGU-vc.js +0 -15
  334. package/dist/client/assets/terminal-links-FD1wyGOp.js +0 -2
  335. package/dist/client/assets/terminalSessions-D1m7FXoa.js +0 -2
  336. package/dist/client/assets/uiStateStore-B0Z02qoV.js +0 -2
  337. package/dist/client/assets/unfold-vertical-DeuiNAAp.js +0 -2
  338. package/dist/client/assets/useHandleNewThread-Cmiu3y4G.js +0 -2
  339. package/dist/client/assets/useSettings-C6RmJr-q.js +0 -3
  340. package/dist/client/assets/utils-Cs97wR6T.js +0 -24
  341. package/dist/client/assets/vcsRefInvalidation-CAa5en8i.js +0 -2
  342. package/dist/client/assets/welcome-BRX7e-eN.js +0 -2
@@ -0,0 +1,24 @@
1
+ import{a as e,n as t,t as n}from"./react-BUfh6y28.js";import{n as r,t as i}from"./jsx-runtime-DJeoFXNw.js";import{t as a}from"./activity-CbqMUSRC.js";import{t as o}from"./alarm-clock-D3-pktbt.js";import{t as s}from"./app-window-DT4yrrS-.js";import{t as c}from"./archive-Cr7-RIjC.js";import{t as l}from"./arrow-down-up-CQvYrirj.js";import{t as u}from"./arrow-down-BKghgxKI.js";import{t as d}from"./arrow-left-BWI0-vRp.js";import{t as f}from"./arrow-right-left-DXmmhGuH.js";import{t as p}from"./arrow-right-BJPYbHTL.js";import{t as m}from"./arrow-up-down-BEa_lFuV.js";import{t as h}from"./arrow-up-left-DLNjxPfK.js";import{t as g}from"./arrow-up-right-B8xNcEXp.js";import{t as _}from"./arrow-up-DMEbfkKl.js";import{t as v}from"./battery-BNMPLne0.js";import{t as y}from"./bell-vGxw63Gg.js";import{t as b}from"./blocks-CpHzQlR2.js";import{t as x}from"./book-open-DKRWS47i.js";import{t as S}from"./bookmark-DfPbwgkW.js";import{t as C}from"./bot-Cp92syL6.js";import{t as w}from"./box-D-FyjNxy.js";import{t as T}from"./bug-DH2pu6U9.js";import{t as E}from"./calendar-arrow-down-WH0xj289.js";import{t as D}from"./calendar-arrow-up-Lk-Us3ba.js";import{t as O}from"./calendar-clock-BARV5L0a.js";import{t as k}from"./calendar-DHdDnhKF.js";import{t as A}from"./camera-8ozLiwCj.js";import{t as j}from"./chart-no-axes-column-CQLqBsxb.js";import{t as M}from"./check-CdrGo1Oa.js";import{t as N}from"./chevron-down-D0M7_175.js";import{t as P}from"./chevron-left-CEWOKn-e.js";import{t as F}from"./chevron-right-DPl-L-yL.js";import{t as I}from"./chevron-up-gyDnPot_.js";import{t as ee}from"./chevrons-left-right-ellipsis-DEfsDjXt.js";import{t as te}from"./chevrons-up-down-DakHVkrx.js";import{t as ne}from"./chromium-x91nZeen.js";import{t as L}from"./circle-alert-DsKXULDS.js";import{t as re}from"./circle-arrow-up-DCmGv6Tl.js";import{t as ie}from"./circle-check-CZ31KO9m.js";import{t as ae}from"./circle-dashed-DMw11mBM.js";import{t as R}from"./circle-dot-CWCBN-HY.js";import{t as oe}from"./circle-slash-eIt5hG5T.js";import{t as se}from"./circle-stop-0Wd2uKSK.js";import{t as ce}from"./circle-x-DMkHWcTz.js";import{t as le}from"./circle-Doq0I3MA.js";import{t as ue}from"./clock-3-C5l2rPxd.js";import{t as de}from"./clock-aK6BX5Ve.js";import{t as fe}from"./cloud-download-Ddj2y2Q1.js";import{t as pe}from"./cloud-upload-BzCXws1i.js";import{t as me}from"./cloud-BhcSs4Ie.js";import{t as he}from"./code-xml-DsmxIkJL.js";import{t as ge}from"./code-Dfd-vS1O.js";import{t as _e}from"./columns-2-CgvyvCTB.js";import{t as ve}from"./copy-CO2RgESU.js";import{t as ye}from"./corner-left-up-DUJ8nnVp.js";import{t as be}from"./corner-up-right-xmYx6v5O.js";import{t as xe}from"./cpu-DBknwmfd.js";import{t as Se}from"./database-D2y6m7fG.js";import{t as Ce}from"./download-S2u-tXaE.js";import{t as we}from"./earth-CDbKfFEl.js";import{t as Te}from"./ellipsis-vertical-CY0vJAc8.js";import{t as Ee}from"./ellipsis-Zza4fevQ.js";import{t as De}from"./external-link-D1GSnnDW.js";import{t as Oe}from"./eye-off-CH68-9dO.js";import{t as ke}from"./eye-C3U51ndb.js";import{t as Ae}from"./file-braces-BzATadbM.js";import{t as je}from"./file-code-corner-eTofF8xM.js";import{t as Me}from"./file-diff-CNp_vbEN.js";import{t as Ne}from"./file-search-ymCSYDZx.js";import{t as Pe}from"./file-spreadsheet-GRfTgOTy.js";import{t as Fe}from"./file-text-Bfv40hwh.js";import{t as Ie}from"./file-Ksu7amJn.js";import{t as Le}from"./files-DlNPWYbd.js";import{t as Re}from"./film-BUU7xHiL.js";import{t as ze}from"./flask-conical-Dsv3DUqc.js";import{t as Be}from"./fold-vertical-CN9ryhZz.js";import{t as Ve}from"./folder-closed-urrrH8hq.js";import{t as He}from"./folder-cog-Dph_MIqG.js";import{t as Ue}from"./folder-git-2-BNs-MyeS.js";import{t as We}from"./folder-git-CZrtjtbc.js";import{t as Ge}from"./folder-open-glqXjO8U.js";import{t as Ke}from"./folder-plus-hbrm_0zI.js";import{t as qe}from"./folder-tree-DRc_6QzW.js";import{t as Je}from"./folder-7OwzWKex.js";import{t as Ye}from"./gauge-Bn8T6vfX.js";import{t as Xe}from"./git-branch-plus-DHrV8m4V.js";import{t as Ze}from"./git-branch-fKUdZyoj.js";import{t as Qe}from"./git-commit-horizontal-BKUdfVpN.js";import{t as $e}from"./git-fork-q7k7fP_a.js";import{t as et}from"./git-merge-B6FlDJ0L.js";import{t as tt}from"./git-pull-request-arrow-C03R6MRd.js";import{t as nt}from"./git-pull-request-closed-BmuvrrUt.js";import{t as rt}from"./git-pull-request-draft-BiETgjOy.js";import{t as it}from"./globe-rqPSVFGf.js";import{t as at}from"./grip-vertical-CDZpgHdL.js";import{t as ot}from"./hammer-D3FVtCT2.js";import{t as st}from"./hard-drive-BYq2E_is.js";import{t as ct}from"./hat-glasses-Dr2HzrbT.js";import{t as lt}from"./history-CdIQPf9A.js";import{t as ut}from"./house-ClTLFcnB.js";import{t as dt}from"./image-Dp6bFTt-.js";import{t as ft}from"./inbox-CcvYrvdu.js";import{t as pt}from"./info-D9JLmnlB.js";import{t as mt}from"./key-round-POn1aRXW.js";import{t as ht}from"./keyboard-Cwz72Cn4.js";import{t as gt}from"./laptop-BRe6y-6m.js";import{t as _t}from"./layers-DnKM4R7R.js";import{t as vt}from"./lightbulb-D4c0exHI.js";import{t as yt}from"./link-2-LC4CLD9N.js";import{t as bt}from"./link-BG0xfm4f.js";import{t as xt}from"./list-checks-D4Mjxs0W.js";import{t as St}from"./list-filter-CT2YuCdg.js";import{t as Ct}from"./list-ordered-CmlribqV.js";import{t as wt}from"./list-todo-C9Q41q8t.js";import{t as Tt}from"./list-DFOg7UCj.js";import{t as Et}from"./loader-circle-C9YTWe0R.js";import{t as Dt}from"./lock-open-ZMNlBvF_.js";import{t as Ot}from"./lock-CUPWkQFd.js";import{t as kt}from"./log-in-CmJt2PGl.js";import{t as At}from"./mail-DH8sy4L4.js";import{t as jt}from"./maximize-2-Ci1M4n4b.js";import{t as Mt}from"./maximize--OpXUP-L.js";import{t as Nt}from"./memory-stick-BfRByDz7.js";import{t as Pt}from"./message-circle-question-mark-B1TZAw6J.js";import{t as Ft}from"./message-circle-CHd5kZQY.js";import{t as It}from"./message-square-dashed-Cdozx3vh.js";import{t as Lt}from"./message-square-off-CWEe8iPZ.js";import{t as Rt}from"./message-square-text-DqZTWyZK.js";import{t as zt}from"./message-square-warning-BNloiEzN.js";import{t as Bt}from"./message-square-HrqKYo9g.js";import{t as Vt}from"./messages-square-CNMItvyI.js";import{t as Ht}from"./minimize-2-C4_6Xjo0.js";import{t as Ut}from"./minus-BIm_k5Zx.js";import{t as Wt}from"./monitor-Dsi2qeBw.js";import{t as Gt}from"./moon-CQPzCH_B.js";import{t as Kt}from"./mouse-pointer-2-4CaeeJnC.js";import{t as qt}from"./mouse-pointer-click-BPbYQy6n.js";import{t as Jt}from"./octagon-alert-EzAYxsw5.js";import{t as Yt}from"./package-plus-B0kbli0A.js";import{t as Xt}from"./package-DgK3Panc.js";import{t as Zt}from"./paintbrush-CRnk3l4s.js";import{t as Qt}from"./palette-oisfBZwg.js";import{t as $t}from"./panel-bottom-_VbUQKRM.js";import{t as en}from"./panel-left-7a6N5kup.js";import{t as tn}from"./panel-right-BeNqPQu9.js";import{t as nn}from"./paperclip-D4ApErSa.js";import{t as rn}from"./panels-top-left-DWNysJ-h.js";import{t as an}from"./pen-line-dPqyqyP8.js";import{t as on}from"./pencil-ruler-DmVfcvOi.js";import{t as sn}from"./pencil-CkBDbGEU.js";import{t as cn}from"./picture-in-picture-2-CM4GLcBZ.js";import{t as ln}from"./pilcrow-D4Yvx6IY.js";import{t as un}from"./pin-DXnYmcqx.js";import{t as dn}from"./play-3I2EkmKd.js";import{t as fn}from"./plug-2-s7zj7Hxq.js";import{t as pn}from"./plus-B2sOrZDk.js";import{t as mn}from"./plug-YkUyuPha.js";import{t as hn}from"./power-Bvdrcoxh.js";import{t as gn}from"./presentation-Dzj9KqNW.js";import{t as _n}from"./puzzle-A0RiinH5.js";import{t as vn}from"./qr-code-DliRXqLn.js";import{t as yn}from"./quote-BVm0cRnP.js";import{t as bn}from"./radio-tower-DUk4f2-O.js";import{t as xn}from"./redo-2-BJ7l6vPt.js";import{t as Sn}from"./refresh-cw-D5OcXJqv.js";import{t as Cn}from"./rotate-ccw-DpwKQVbi.js";import{t as wn}from"./rotate-cw--ORF2bp-.js";import{t as Tn}from"./route-VA8ojaMC.js";import{t as En}from"./rows-3-BtaOoWPd.js";import{t as Dn}from"./scale-CFZenX_z.js";import{t as On}from"./search-BXnNiPfE.js";import{t as kn}from"./send-rvnCC0tk.js";import{t as An}from"./server-D1-mXw9_.js";import{t as jn}from"./settings-2-Bv4a7vuX.js";import{t as Mn}from"./settings-DSIgI7hn.js";import{t as Nn}from"./shield-check-Dp6nEC76.js";import{t as Pn}from"./shield-question-mark-Ct8sQE8L.js";import{t as Fn}from"./shield-BffxaUbT.js";import{t as In}from"./sliders-horizontal-Cjgfn3-e.js";import{t as Ln}from"./smartphone-D_YX6TMp.js";import{t as Rn}from"./smile-plus-CCWLDL7I.js";import{t as zn}from"./sparkles-cGzc0RFW.js";import{t as Bn}from"./square-arrow-out-up-right-BhjBGexN.js";import{t as Vn}from"./square-pen-D43PK7SU.js";import{t as Hn}from"./square-split-horizontal-1peTt3kF.js";import{t as Un}from"./square-split-vertical-BiyS0VO4.js";import{t as Wn}from"./square-terminal-jbiJud2S.js";import{t as Gn}from"./square-ekoTCPwL.js";import{t as Kn}from"./star-DNOgk1Yn.js";import{t as qn}from"./sun-Doo18Rp9.js";import{t as Jn}from"./tag-COKMM2Nu.js";import{t as Yn}from"./target-DINbFNKH.js";import{t as Xn}from"./terminal-B0APSOls.js";import{t as Zn}from"./text-align-start-CwrzoVmt.js";import{t as Qn}from"./text-search-CmRPmwd0.js";import{t as $n}from"./text-wrap-CQL7aZBn.js";import{t as er}from"./ticket-DOLQqHse.js";import{t as tr}from"./trash-2-PlYko97C.js";import{t as nr}from"./trending-down-DVeDgUDE.js";import{t as rr}from"./trending-up-DbEIgYu9.js";import{t as ir}from"./triangle-alert-BoPMRm-g.js";import{t as ar}from"./type-CjUvBO4t.js";import{t as or}from"./undo-2-BD9xLk2R.js";import{t as sr}from"./unfold-vertical-CldLe1hB.js";import{t as cr}from"./unlink-2-D70rwDdQ.js";import{t as lr}from"./unplug-BYib3V6l.js";import{t as ur}from"./upload-Cra7ct3V.js";import{t as dr}from"./user-check-CcyAu7dq.js";import{t as fr}from"./user-lock--_mHRTC7.js";import{t as pr}from"./user-plus-zMaVgV4o.js";import{t as mr}from"./user-round-x-pYk-6fRI.js";import{t as hr}from"./user-round-4JeqoQGO.js";import{t as gr}from"./users-BZYEVbyz.js";import{t as _r}from"./wifi-off-ODm5nCE4.js";import{t as vr}from"./workflow-BefWgmas.js";import{t as yr}from"./wrench-pR-6hpnb.js";import{t as br}from"./x-C35beONT.js";import{t as xr}from"./zap-BIb9m3mg.js";import{$a as Sr,$h as Cr,$l as wr,$o as Tr,$p as Er,$r as Dr,Ah as Or,Am as kr,Bc as Ar,Bd as jr,Bf as Mr,Bi as Nr,Bl as Pr,Bm as Fr,Br as Ir,Bs as Lr,Cc as Rr,Ch as zr,Cm as Br,Co as Vr,Cp as Hr,Dc as Ur,Dd as Wr,Dh as Gr,Dm as Kr,Ds as qr,Du as Jr,Eh as Yr,Em as Xr,Eu as Zr,Fc as Qr,Ff as $r,Fh as ei,Fm as ti,Fp as ni,Fr as ri,Fu as ii,Ga as ai,Gh as oi,Gi as si,Go as ci,Gr as li,Hc as ui,Hf as di,Hi as fi,Hm as pi,Hs as mi,Ic as hi,If as gi,Ih as _i,Il as vi,Im as yi,Ir as bi,Ja as xi,Jd as Si,Jf as Ci,Jh as wi,Ji as Ti,Jm as Ei,Jr as Di,Jt as Oi,Ka as ki,Kc as Ai,Kd as ji,Kh as Mi,Ko as Ni,Kr as Pi,Ld as Fi,Lh as Ii,Li,Ll as Ri,Lr as zi,Mh as Bi,Ml as Vi,Mm as Hi,Ms as Ui,Nc as Wi,Nh as Gi,Ni as Ki,Nl as qi,No as Ji,Np as Yi,Nr as Xi,Oc as Zi,Of as Qi,Oh as $i,Oi as ea,Ol as ta,Om as na,Oo as ra,Pc as ia,Pd as aa,Ph as oa,Pl as sa,Pm as ca,Pr as la,Pu as ua,Qa as da,Qc as fa,Qd as pa,Qh as ma,Qo as ha,Qr as ga,Qs as _a,Rd as va,Rh as ya,Rl as ba,Rm as xa,Ro as Sa,Rp as Ca,Sc as wa,Sf as Ta,Sl as Ea,Sp as Da,Ss as Oa,Tc as ka,Th as Aa,Tm as ja,Tp as Ma,Ua as Na,Uc as Pa,Uf as Fa,Ui as Ia,Um as La,Ur as Ra,Vc as za,Vh as Ba,Vi as Va,Vm as Ha,Vr as Ua,Wa,Wd as Ga,Wf as Ka,Wh as qa,Wm as Ja,Wo as Ya,Wr as Xa,Ws as Za,Wu as Qa,Xa as $a,Xd as eo,Xf as to,Xh as no,Xm as ro,Xo as io,Xs as ao,Xt as oo,Ya as so,Yc as co,Yh as lo,Yp as uo,Yr as fo,Yt as po,Yu as mo,Z as ho,Za as go,Zc as _o,Zo as vo,Zr as yo,Zs as bo,Zt as xo,_f as So,_h as Co,_l as wo,_m as To,_o as Eo,_p as Do,ac as Oo,af as ko,ai as Ao,al as jo,am as Mo,an as No,ao as Po,bc as Fo,bf as Io,bh as Lo,bi as Ro,bm as zo,bo as Bo,bp as Vo,cd as Ho,cf as Uo,ch as Wo,cn as Go,cs as Ko,da as qo,dc as Jo,dd as Yo,dh as Xo,dm as Zo,dn as Qo,ds as $o,du as es,ec as ts,ef as ns,eh as rs,ei as is,ep as as,es as os,fa as ss,fc as cs,fh as ls,fm as us,fn as ds,gc as fs,gf as ps,gh as ms,gl as hs,gu as gs,hf as _s,hh as vs,hl as ys,ic as bs,id as xs,if as Ss,ih as Cs,ii as ws,im as Ts,in as Es,jf as Ds,jl as Os,jn as ks,jp as As,js,ju as Ms,kc as Ns,kd as Ps,kf as Fs,kh as Is,ki as Ls,kl as Rs,ko as zs,lc as Bs,lf as Vs,lh as Hs,ln as Us,lo as Ws,mc as z,mf as Gs,mh as Ks,ml as qs,mp as Js,nd as Ys,nl as Xs,np as Zs,ns as Qs,nu as $s,od as ec,of as tc,ol as nc,om as rc,ou as ic,pa as ac,ph as oc,pm as sc,po as cc,pp as lc,qa as uc,qd as dc,qf as fc,qh as pc,qm as mc,qo as hc,qr as gc,qs as _c,rf as vc,rh as yc,ri as bc,rm as xc,rn as Sc,rr as Cc,rt as wc,sc as Tc,sf as Ec,sn as Dc,ss as Oc,ti as kc,tl as Ac,tn as jc,tt as Mc,uc as Nc,ud as Pc,um as Fc,un as Ic,uo as Lc,uu as Rc,vc as zc,vd as Bc,vh as Vc,vo as Hc,vu as Uc,wc as Wc,wd as Gc,wh as Kc,wm as qc,xc as Jc,xd as Yc,xf as Xc,xi as Zc,xl as Qc,xo as $c,xp as el,yh as tl,ys as nl,yu as rl,zc as il,zf as al,zh as ol,zi as sl,zl as cl,zr as ll,zu as ul}from"./src-R7EkrVcv.js";import{c as dl,d as fl,f as pl,g as ml,h as hl,i as gl,l as _l,n as vl,o as yl,p as bl,r as xl,s as Sl,t as Cl,u as wl}from"./useRender-BP5vR6yH.js";var Tl=[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}],[`path`,{d:`m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98`}]],El=[[`path`,{d:`M6 12h12`}],[`path`,{d:`M12 18V6`}]],Dl=[[`path`,{d:`M8 12h8`}],[`path`,{d:`M12 16V8`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}]],Ol=[[`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10`}],[`path`,{d:`M12 8v5`}],[`path`,{strokeWidth:`2`,d:`M11.994 16h.01`}]],kl=[[`path`,{d:`M19.5 10.22V19c0 2-.5 3-3 3h-9c-2.5 0-3-1-3-3v-8.78`}],[`path`,{d:`M5 2h14q3 0 3 3v2q0 3-3 3H5q-3 0-3-3V5q0-3 3-3`}],[`path`,{d:`M10.18 14h3.64`}]],Al=[[`path`,{d:`M18.07 14.43 12 20.5l-6.07-6.07`}],[`path`,{d:`M12 3.5v16.83`}]],jl=[[`path`,{d:`M9.57 5.93 3.5 12l6.07 6.07`}],[`path`,{d:`M20.5 12H3.67`}]],Ml=[[`path`,{d:`M14.43 5.93 20.5 12l-6.07 6.07`}],[`path`,{d:`M3.5 12h16.83`}]],Nl=[[`path`,{d:`M18.07 9.57 12 3.5 5.93 9.57`}],[`path`,{d:`M12 20.5V3.67`}]],Pl=[[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10`}],[`path`,{d:`M12 15.5v-6`}],[`path`,{d:`m9 11.5 3-3 3 3`}]],Fl=[[`path`,{d:`M17.28 10.45 21 6.73l-3.72-3.72`}],[`path`,{d:`M3 6.73h18`}],[`path`,{d:`M6.72 13.55 3 17.27l3.72 3.72`}],[`path`,{d:`M21 17.27H3`}]],Il=[[`path`,{d:`M10.45 6.72 6.73 3 3.01 6.72`}],[`path`,{d:`M6.73 21V3`}],[`path`,{d:`M13.55 17.28 17.27 21l3.72-3.72`}],[`path`,{d:`M17.27 3v18`}]],Ll=[[`path`,{d:`M13 19H7c-4 0-5-1-5-5v-4c0-4 1-5 5-5h6c4 0 5 1 5 5v4c0 4-1 5-5 5`}],[`path`,{d:`M20.5 9.5C22 9.5 22 10 22 11v2c0 1 0 1.5-1.5 1.5`}]],Rl=[[`path`,{d:`M22 16.74V4.67c0-1.2-.98-2.09-2.17-1.99h-.06c-2.1.18-5.29 1.25-7.07 2.37l-.17.11c-.29.18-.77.18-1.06 0l-.25-.15C9.44 3.9 6.26 2.84 4.16 2.67 2.97 2.57 2 3.47 2 4.66v12.08c0 .96.78 1.86 1.74 1.98l.29.04c2.17.29 5.52 1.39 7.44 2.44l.04.02c.27.15.7.15.96 0 1.92-1.06 5.28-2.17 7.46-2.46l.33-.04c.96-.12 1.74-1.02 1.74-1.98`}],[`path`,{d:`M12 5.49v15`}],[`path`,{d:`M7.75 8.49H5.5`}],[`path`,{d:`M8.5 11.49h-3`}]],zl=[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}],[`path`,{d:`M17 2.44v9.98c0 1.97-1.41 2.74-3.14 1.7l-1.32-.79c-.3-.18-.78-.18-1.08 0l-1.32.79C8.41 15.15 7 14.39 7 12.42V2.44`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}],[`path`,{d:`M17 2.44v9.98c0 1.97-1.41 2.74-3.14 1.7l-1.32-.79c-.3-.18-.78-.18-1.08 0l-1.32.79C8.41 15.15 7 14.39 7 12.42V2.44`}]],Bl=[[`path`,{d:`M3.17 7.44 12 12.55l8.77-5.08`}],[`path`,{d:`M12 21.61v-9.07`}],[`path`,{d:`M9.93 2.48 4.59 5.45c-1.21.67-2.2 2.35-2.2 3.73v5.65c0 1.38.99 3.06 2.2 3.73l5.34 2.97c1.14.63 3.01.63 4.15 0l5.34-2.97c1.21-.67 2.2-2.35 2.2-3.73V9.18c0-1.38-.99-3.06-2.2-3.73l-5.34-2.97c-1.15-.64-3.01-.64-4.15 0`}],[`path`,{d:`M17 13.24V9.58L7.51 4.1`}]],Vl=[[`path`,{d:`M23 18c0 .75-.21 1.46-.58 2.06-.21.36-.48.68-.79.94-.7.63-1.62 1-2.63 1-1.22 0-2.31-.55-3.03-1.41-.02-.03-.05-.05-.07-.08-.12-.14-.23-.29-.32-.45A3.9 3.9 0 0 1 15 18c0-1.26.58-2.39 1.5-3.12.69-.55 1.56-.88 2.5-.88 1 0 1.9.36 2.6.97.12.09.23.2.33.31C22.59 16 23 16.95 23 18`}],[`path`,{d:`M20.49 17.98h-2.98`}],[`path`,{d:`M19 16.52v2.99`}],[`path`,{d:`M3.17 7.44 12 12.55l8.77-5.08`}],[`path`,{d:`M12 21.61v-9.07`}],[`path`,{d:`M21.61 9.17v5.66c0 .05 0 .09-.01.14-.7-.61-1.6-.97-2.6-.97-.94 0-1.81.33-2.5.88A3.97 3.97 0 0 0 15 18c0 .75.21 1.46.58 2.06.09.16.2.31.32.45l-1.83 1.01c-1.14.64-3 .64-4.14 0l-5.34-2.96c-1.21-.67-2.2-2.35-2.2-3.73V9.17c0-1.38.99-3.06 2.2-3.73l5.34-2.96c1.14-.64 3-.64 4.14 0l5.34 2.96c1.21.67 2.2 2.35 2.2 3.73`}]],Hl=[[`path`,{d:`M21.81 3.94c-1.54 3.84-5.4 9.06-8.63 11.65l-1.97 1.58c-.25.18-.5.34-.78.45 0-.18-.01-.38-.04-.57-.11-.84-.49-1.62-1.16-2.29-.68-.68-1.51-1.08-2.36-1.19-.2-.01-.4-.03-.6-.01.11-.31.28-.6.49-.84l1.56-1.97c2.58-3.23 7.82-7.11 11.65-8.64.59-.22 1.16-.06 1.52.31.38.37.56.94.32 1.52`}],[`path`,{d:`M10.43 17.62c0 1.1-.42 2.15-1.21 2.95-.61.61-1.44 1.03-2.43 1.16L4.33 22c-1.34.15-2.49-.99-2.33-2.35l.27-2.46c.24-2.19 2.07-3.59 4.01-3.63.2-.01.41 0 .6.01.85.11 1.68.5 2.36 1.19.67.67 1.05 1.45 1.16 2.29.01.19.03.38.03.57`}],[`path`,{d:`M14.24 14.47c0-2.61-2.12-4.73-4.73-4.73`}]],Ul=[[`path`,{d:`M6.76 22h10.48c2.76 0 3.86-1.69 3.99-3.75l.52-8.26A3.753 3.753 0 0 0 18 6c-.61 0-1.17-.35-1.45-.89l-.72-1.45C15.37 2.75 14.17 2 13.15 2h-2.29c-1.03 0-2.23.75-2.69 1.66l-.72 1.45C7.17 5.65 6.61 6 6 6 3.83 6 2.11 7.83 2.25 9.99l.52 8.26C2.89 20.31 4 22 6.76 22`}],[`path`,{d:`M10.5 8h3`}],[`path`,{d:`M12 18c1.79 0 3.25-1.46 3.25-3.25S13.79 11.5 12 11.5s-3.25 1.46-3.25 3.25S10.21 18 12 18`}]],Wl=[[`path`,{d:`M3 22h18`}],[`path`,{d:`M5.6 8.38H4c-.55 0-1 .45-1 1V18c0 .55.45 1 1 1h1.6c.55 0 1-.45 1-1V9.38c0-.55-.45-1-1-1`}],[`path`,{d:`M12.8 5.19h-1.6c-.55 0-1 .45-1 1V18c0 .55.45 1 1 1h1.6c.55 0 1-.45 1-1V6.19c0-.55-.45-1-1-1`}],[`path`,{d:`M20 2h-1.6c-.55 0-1 .45-1 1v15c0 .55.45 1 1 1H20c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1`}]],Gl=[[`path`,{d:`m5 12 4.67 4.67L19 7.33`}]],Kl=[[`path`,{d:`m19.92 8.95-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95`}]],ql=[[`path`,{d:`M15 19.92 8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08`}]],Jl=[[`path`,{d:`m8.91 19.92 6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08`}]],Yl=[[`path`,{d:`M19.92 15.05 13.4 8.53c-.77-.77-2.03-.77-2.8 0l-6.52 6.52`}]],Xl=[[`path`,{d:`M12 22c5.52 0 10-4.48 10-10S17.52 2 12 2 2 6.48 2 12s4.48 10 10 10`}],[`path`,{d:`M12 16c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4`}],[`path`,{d:`M21.17 8c-3.02-.66-6.15-.66-9.17 0`}],[`path`,{d:`m3.95 6.06.02.06C4.98 9.01 6.53 11.69 8.54 14`}],[`path`,{d:`M10.88 21.94c2.06-2.27 3.61-4.95 4.55-7.86l.03-.08`}]],Zl=[[`path`,{d:`M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18`}]],Ql=[[`path`,{d:`M2.45 14.97c1.07 3.44 3.95 6.09 7.53 6.82`}],[`path`,{d:`M2.05 10.98A9.996 9.996 0 0 1 12 2c5.18 0 9.44 3.94 9.95 8.98`}],[`path`,{d:`M14.01 21.8c3.57-.73 6.44-3.35 7.53-6.78`}]],$l=[[`path`,{d:`M11.97 22c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10`}],[`path`,{d:`M12 16.23a4.23 4.23 0 1 0 0-8.46 4.23 4.23 0 0 0 0 8.46`}]],eu=[[`path`,{d:`M6.34 17.66 17.66 6.34`}],[`path`,{d:`M17.66 17.66 6.34 6.34`}]],tu=[[`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10`}],[`path`,{d:`m9.17 14.83 5.66-5.66`}],[`path`,{d:`M14.83 14.83 9.17 9.17`}]],nu=[[`path`,{d:`M7.27 13.01a3.8 3.8 0 0 0-1.72-.41c-4.68.33-4.68 7.14 0 7.47h11.09c1.35.01 2.65-.49 3.64-1.4 3.29-2.87 1.53-8.64-2.8-9.19C15.92.11 2.39 3.67 5.6 12.6`}],[`path`,{d:`M15.85 9.92c.52-.26 1.09-.4 1.67-.41`}]],ru=[[`path`,{d:`M9 13c-.66.33-1.21.82-1.62 1.43-.23.35-.23.79 0 1.14.41.61.96 1.1 1.62 1.43`}],[`path`,{d:`M15.21 13c.66.33 1.21.82 1.62 1.43.23.35.23.79 0 1.14-.41.61-.96 1.1-1.62 1.43`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}],[`path`,{d:`M2.23 8.01 21.45 8`}]],iu=[[`path`,{d:`M10.5 19.9V4.1c0-1.5-.64-2.1-2.23-2.1H4.23C2.64 2 2 2.6 2 4.1v15.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1`}],[`path`,{d:`M22 19.9V4.1c0-1.5-.64-2.1-2.23-2.1h-4.04c-1.59 0-2.23.6-2.23 2.1v15.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1`}]],au=[[`path`,{d:`M16 12.9v4.2c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9`}],[`path`,{d:`M22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16v-3.1C16 9.4 14.6 8 11.1 8H8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9`}]],ou=[[`path`,{d:`M9.6 20h4.8c4 0 5.6-1.6 5.6-5.6V9.6c0-4-1.6-5.6-5.6-5.6H9.6C5.6 4 4 5.6 4 9.6v4.8c0 4 1.6 5.6 5.6 5.6`}],[`path`,{d:`M10.5 17h3c2.5 0 3.5-1 3.5-3.5v-3C17 8 16 7 13.5 7h-3C8 7 7 8 7 10.5v3C7 16 8 17 10.5 17`}],[`path`,{d:`M8.01 4V2`}],[`path`,{d:`M12 4V2`}],[`path`,{d:`M16 4V2`}],[`path`,{d:`M20 8h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 16h2`}],[`path`,{d:`M16 20v2`}],[`path`,{d:`M12.01 20v2`}],[`path`,{d:`M8.01 20v2`}],[`path`,{d:`M2 8h2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 16h2`}]],su=[[`path`,{d:`M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5`}],[`path`,{d:`M22 10h-4c-3 0-4-1-4-4V2z`}]],cu=[[`path`,{d:`M21 7v10c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V7c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5`}],[`path`,{d:`M14.5 4.5v2c0 1.1.9 2 2 2h2`}],[`path`,{d:`m10 13-2 2 2 2`}],[`path`,{d:`m14 13 2 2-2 2`}]],lu=[[`path`,{d:`M17 13.4v3c0 4-1.6 5.6-5.6 5.6H7.6c-4 0-5.6-1.6-5.6-5.6v-3.8C2 8.6 3.6 7 7.6 7h3`}],[`path`,{d:`M17 13.4h-3.2c-2.4 0-3.2-.8-3.2-3.2V7z`}],[`path`,{d:`M11.6 2h4`}],[`path`,{d:`M7 5c0-1.66 1.34-3 3-3h2.62`}],[`path`,{d:`M22 8v6.19c0 1.55-1.26 2.81-2.81 2.81`}],[`path`,{d:`M22 8h-3c-2.25 0-3-.75-3-3V2z`}]],uu=[[`path`,{d:`M21 7v10c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V7c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5`}],[`path`,{d:`M14.5 4.5v2c0 1.1.9 2 2 2h2`}],[`path`,{d:`M8 13h4`}],[`path`,{d:`M8 17h8`}]],du=[[`path`,{d:`M16.44 8.9c3.6.31 5.07 2.16 5.07 6.21v.13c0 4.47-1.79 6.26-6.26 6.26H8.74c-4.47 0-6.26-1.79-6.26-6.26v-.13c0-4.02 1.45-5.87 4.99-6.2`}],[`path`,{d:`M12 2v12.88`}],[`path`,{d:`M15.35 12.65 12 16l-3.35-3.35`}]],fu=[[`path`,{d:`M19.32 10H4.69c-1.48 0-2.68-1.21-2.68-2.68V4.69c0-1.48 1.21-2.68 2.68-2.68h14.63C20.8 2.01 22 3.22 22 4.69v2.63C22 8.79 20.79 10 19.32 10`}],[`path`,{d:`M19.32 22H4.69c-1.48 0-2.68-1.21-2.68-2.68v-2.63c0-1.48 1.21-2.68 2.68-2.68h14.63c1.48 0 2.68 1.21 2.68 2.68v2.63c0 1.47-1.21 2.68-2.68 2.68`}],[`path`,{d:`M6 5v2`}],[`path`,{d:`M10 5v2`}],[`path`,{d:`M6 17v2`}],[`path`,{d:`M10 17v2`}],[`path`,{d:`M14 6h4`}],[`path`,{d:`M14 18h4`}]],pu=[[`path`,{d:`M11 2H9C4 2 2 4 2 9v6c0 5 2 7 7 7h6c5 0 7-2 7-7v-2`}],[`path`,{d:`M16.04 3.02 8.16 10.9c-.3.3-.6.89-.66 1.32l-.43 3.01c-.16 1.09.61 1.85 1.7 1.7l3.01-.43c.42-.06 1.01-.36 1.32-.66l7.88-7.88c1.36-1.36 2-2.94 0-4.94s-3.58-1.36-4.94 0`}],[`path`,{d:`M14.91 4.15a7.14 7.14 0 0 0 4.94 4.94`}]],mu=[[`path`,{d:`m13 11 8.2-8.2`}],[`path`,{d:`M22 6.8V2h-4.8`}],[`path`,{d:`M11 2H9C4 2 2 4 2 9v6c0 5 2 7 7 7h6c5 0 7-2 7-7v-2`}]],hu=[[`path`,{d:`M6.09 13.28h3.09v7.2c0 1.68.91 2.02 2.02.76l7.57-8.6c.93-1.05.54-1.92-.87-1.92h-3.09v-7.2c0-1.68-.91-2.02-2.02-.76l-7.57 8.6c-.92 1.06-.53 1.92.87 1.92`}]],gu=[[`path`,{strokeLinecap:`butt`,strokeLinejoin:`miter`,strokeMiterlimit:`10`,d:`M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z`}]],_u=[[`path`,{d:`M12.06 16.5v-5`}],[`path`,{d:`M14.5 14h-5`}],[`path`,{strokeLinecap:`butt`,strokeLinejoin:`miter`,strokeMiterlimit:`10`,d:`M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z`}]],vu=[[`path`,{strokeLinecap:`butt`,strokeLinejoin:`miter`,strokeMiterlimit:`10`,d:`m21.67 14.3-.4 5c-.15 1.53-.27 2.7-2.98 2.7H5.71C3 22 2.88 20.83 2.73 19.3l-.4-5c-.08-.83.18-1.6.65-2.19l.02-.02C3.55 11.42 4.38 11 5.31 11h13.38c.93 0 1.75.42 2.29 1.07.01.01.02.02.02.03.49.59.76 1.36.67 2.2Z`}],[`path`,{d:`M3.5 11.43V6.28c0-3.4.85-4.25 4.25-4.25h1.27c1.27 0 1.56.38 2.04 1.02l1.27 1.7c.32.42.51.68 1.36.68h2.55c3.4 0 4.25.85 4.25 4.25v1.79`}],[`path`,{d:`M9.43 17h5.14`}]],yu=[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}],[`path`,{d:`M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4`}],[`path`,{d:`m2.67 18.95 4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9`}]],bu=[[`path`,{d:`M19.14 19.5a9.96 9.96 0 0 0 2.86-7c0-5.52-4.48-10-10-10S2 6.98 2 12.5c0 2.72 1.08 5.18 2.84 6.99`}],[`path`,{d:`M12 21.5a3.38 3.38 0 1 0 0-6.76 3.38 3.38 0 0 0 0 6.76`}],[`path`,{d:`M15.25 12H16c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.67-1.5 1.5v.75c0 .41.34.75.75.75`}]],xu=[[`path`,{d:`M5 9v7`}],[`path`,{d:`M5.25 8.5a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5`}],[`path`,{d:`M5 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6`}],[`path`,{d:`M19 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6`}],[`path`,{d:`M5.13 9a4.06 4.06 0 0 0 3.94 3.04l3.43-.01a5.99 5.99 0 0 1 5.67 4.01`}]],Su=[[`path`,{d:`M12 16.5a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9`}],[`path`,{d:`M2 12h5`}],[`path`,{d:`M17 12h5`}]],Cu=[[`path`,{d:`M5 15V8`}],[`path`,{d:`M5.25 22a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5`}],[`path`,{d:`M5 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6`}],[`path`,{d:`M19 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6`}],[`path`,{d:`M5.13 15a4.06 4.06 0 0 1 3.94-3.04l3.43.01c2.62.01 4.85-1.67 5.67-4.01`}]],wu=[[`path`,{d:`M19 16V6.5c0-1.1-.9-2-2-2h-4.5`}],[`path`,{d:`m15 2-3 2.5L15 7`}],[`path`,{d:`M5 9v7`}],[`path`,{d:`M5.25 8.5a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5`}],[`path`,{d:`M5 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6`}],[`path`,{d:`M19 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6`}]],Tu=[[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10`}],[`path`,{d:`M8 3h1a28.42 28.42 0 0 0 0 18H8`}],[`path`,{d:`M15 3a28.42 28.42 0 0 1 0 18`}],[`path`,{d:`M3 16v-1a28.42 28.42 0 0 0 18 0v1`}],[`path`,{d:`M3 9a28.42 28.42 0 0 1 18 0`}]],Eu=[[`path`,{d:`M22 8.27V4.23C22 2.64 21.36 2 19.77 2h-4.04c-1.59 0-2.23.64-2.23 2.23v4.04c0 1.59.64 2.23 2.23 2.23h4.04c1.59 0 2.23-.64 2.23-2.23`}],[`path`,{d:`M10.5 8.52V3.98C10.5 2.57 9.86 2 8.27 2H4.23C2.64 2 2 2.57 2 3.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97`}],[`path`,{d:`M10.5 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23H4.23c-1.59 0-2.23.64-2.23 2.23v4.04C2 21.36 2.64 22 4.23 22h4.04c1.59 0 2.23-.64 2.23-2.23`}],[`path`,{strokeLinejoin:`miter`,d:`M14.5 17.5h6`}],[`path`,{strokeLinejoin:`miter`,d:`M17.5 20.5v-6`}]],Du=[[`path`,{d:`M12 18v-3`}],[`path`,{d:`M10.07 2.82 3.14 8.37c-.78.62-1.28 1.93-1.11 2.91l1.33 7.96c.24 1.42 1.6 2.57 3.04 2.57h11.2c1.43 0 2.8-1.16 3.04-2.57l1.33-7.96c.16-.98-.34-2.29-1.11-2.91l-6.93-5.54c-1.07-.86-2.8-.86-3.86-.01`}]],Ou=[[`path`,{d:`M12 2v7l2-2`}],[`path`,{d:`m12 9-2-2`}],[`path`,{d:`M1.98 13h4.41c.38 0 .72.21.89.55l1.17 2.34A2 2 0 0 0 10.24 17h3.53a2 2 0 0 0 1.79-1.11l1.17-2.34a1 1 0 0 1 .89-.55h4.36`}],[`path`,{d:`M7 4.13c-3.54.52-5 2.6-5 6.87v4c0 5 2 7 7 7h6c5 0 7-2 7-7v-4c0-4.27-1.46-6.35-5-6.87`}]],ku=[[`path`,{d:`M2 11h20`}],[`path`,{d:`m5.5 11 1.9-6.5c.27-.92 1.26-1.42 2.16-1.08L12 4.3l2.44-.88c.9-.34 1.89.16 2.16 1.08l1.9 6.5`}],[`circle`,{cx:`6.75`,cy:`17.75`,r:`3.25`}],[`circle`,{cx:`17.25`,cy:`17.75`,r:`3.25`}],[`path`,{d:`M10 17.75c1.25-.8 2.75-.8 4 0`}]],Au=[[`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10`}],[`path`,{d:`M12 16v-5`}],[`path`,{strokeWidth:`2`,d:`M11.994 8h.01`}]],ju=[[`path`,{d:`M7.5 4h9c.62 0 1.17.02 1.66.09 2.63.29 3.34 1.53 3.34 4.91v6c0 3.38-.71 4.62-3.34 4.91-.49.07-1.04.09-1.66.09h-9c-.62 0-1.17-.02-1.66-.09C3.21 19.62 2.5 18.38 2.5 15V9c0-3.38.71-4.62 3.34-4.91C6.33 4.02 6.88 4 7.5 4`}],[`path`,{d:`M13.5 10H17`}],[`path`,{d:`M7 15.5h10`}],[`path`,{strokeWidth:`2`,d:`M10.094 10h.01`}],[`path`,{strokeWidth:`2`,d:`M7.094 10h.01`}]],Mu=[[`path`,{d:`M8.3 18.04v-1.16C6 15.49 4.11 12.78 4.11 9.9c0-4.95 4.55-8.83 9.69-7.71 2.26.5 4.24 2 5.27 4.07 2.09 4.2-.11 8.66-3.34 10.61v1.16c0 .29.11.96-.96.96H9.26c-1.1.01-.96-.42-.96-.95`}],[`path`,{d:`M8.5 22c2.29-.65 4.71-.65 7 0`}]],Nu=[[`path`,{d:`m13.01 2.92 5.9 2.62c1.7.75 1.7 1.99 0 2.74l-5.9 2.62c-.67.3-1.77.3-2.44 0l-5.9-2.62c-1.7-.75-1.7-1.99 0-2.74l5.9-2.62c.67-.3 1.77-.3 2.44 0`}],[`path`,{d:`M3 11c0 .84.63 1.81 1.4 2.15l6.79 3.02c.52.23 1.11.23 1.62 0l6.79-3.02c.77-.34 1.4-1.31 1.4-2.15`}],[`path`,{d:`M3 16c0 .93.55 1.77 1.4 2.15l6.79 3.02c.52.23 1.11.23 1.62 0l6.79-3.02c.85-.38 1.4-1.22 1.4-2.15`}]],Pu=[[`path`,{d:`M3.27 12A5.46 5.46 0 0 1 2 8.5C2 5.48 4.47 3 7.5 3h5C15.52 3 18 5.48 18 8.5S15.53 14 12.5 14H10`}],[`path`,{d:`M20.73 12A5.46 5.46 0 0 1 22 15.5c0 3.02-2.47 5.5-5.5 5.5h-5C8.48 21 6 18.52 6 15.5S8.47 10 11.5 10H14`}]],Fu=[[`path`,{d:`M13.06 10.94a5.74 5.74 0 0 1 0 8.13c-2.25 2.24-5.89 2.25-8.13 0s-2.25-5.89 0-8.13`}],[`path`,{d:`M10.59 13.41c-2.34-2.34-2.34-6.14 0-8.49s6.14-2.34 8.49 0 2.34 6.14 0 8.49`}]],Iu=[[`path`,{d:`M8.9 7.56c.31-3.6 2.16-5.07 6.21-5.07h.13c4.47 0 6.26 1.79 6.26 6.26v6.52c0 4.47-1.79 6.26-6.26 6.26h-.13c-4.02 0-5.87-1.45-6.2-4.99`}],[`path`,{d:`M2 12h12.88`}],[`path`,{d:`M12.65 8.65 16 12l-3.35 3.35`}]],Lu=[[`path`,{d:`M17 20.5H7c-3 0-5-1.5-5-5v-7c0-3.5 2-5 5-5h10c3 0 5 1.5 5 5v7c0 3.5-2 5-5 5`}],[`path`,{d:`m17 9-3.13 2.5c-1.03.82-2.72.82-3.75 0L7 9`}]],Ru=[[`path`,{d:`M21 9V3h-6`}],[`path`,{d:`M3 15v6h6`}],[`path`,{d:`m21 3-7.5 7.5`}],[`path`,{d:`M10.5 13.5 3 21`}]],zu=[[`path`,{d:`M2 9V6.5C2 4.01 4.01 2 6.5 2H9`}],[`path`,{d:`M15 2h2.5C19.99 2 22 4.01 22 6.5V9`}],[`path`,{d:`M22 16v1.5c0 2.49-2.01 4.5-4.5 4.5H16`}],[`path`,{d:`M9 22H6.5C4.01 22 2 19.99 2 17.5V15`}]],Bu=[[`path`,{d:`M8.5 19H8c-4 0-6-1-6-6V8q0-6 6-6h8q6 0 6 6v5q0 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4`}],[`path`,{strokeWidth:`2`,d:`M15.997 11h.008`}],[`path`,{strokeWidth:`2`,d:`M11.996 11h.008`}],[`path`,{strokeWidth:`2`,d:`M7.995 11h.008`}]],Vu=[[`path`,{d:`M17.25 10.18v2.63c0 .17-.01.33-.03.49-.15 1.77-1.2 2.65-3.12 2.65h-.26a.54.54 0 0 0-.42.21l-.79 1.05c-.35.47-.91.47-1.26 0l-.79-1.05a.63.63 0 0 0-.42-.21H9.9c-2.1 0-3.15-.52-3.15-3.15v-2.63c0-1.92.89-2.97 2.65-3.12.16-.02.32-.03.49-.03h4.2c2.11.02 3.16 1.07 3.16 3.16`}],[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10`}]],Hu=[[`path`,{d:`M17 18.43h-4l-4.45 2.96A.997.997 0 0 1 7 20.56v-2.13c-3 0-5-2-5-5v-6c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5`}],[`path`,{d:`M12 11.36v-.21c0-.68.42-1.04.84-1.33.41-.28.82-.64.82-1.3 0-.92-.74-1.66-1.66-1.66s-1.66.74-1.66 1.66`}],[`path`,{d:`M11.996 13.75h.008`}]],Uu=[[`path`,{d:`M16 2H8Q2 2 2 8v13c0 .55.45 1 1 1h13q6 0 6-6V8q0-6-6-6`}],[`path`,{d:`M7 9.5h10`}],[`path`,{d:`M7 14.5h7`}]],Wu=[[`path`,{d:`M17 9c0 3.87-3.36 7-7.5 7l-.93 1.12-.55.66c-.47.56-1.37.44-1.68-.23L5 14.6C3.18 13.32 2 11.29 2 9c0-3.87 3.36-7 7.5-7 3.02 0 5.63 1.67 6.8 4.07.45.89.7 1.88.7 2.93`}],[`path`,{d:`M22 12.86c0 2.29-1.18 4.32-3 5.6l-1.34 2.95c-.31.67-1.21.8-1.68.23l-1.48-1.78c-2.42 0-4.58-1.07-5.93-2.74L9.5 16c4.14 0 7.5-3.13 7.5-7 0-1.05-.25-2.04-.7-2.93 3.27.75 5.7 3.51 5.7 6.79`}],[`path`,{d:`M7 9h5`}]],Gu=[[`path`,{d:`M6 12h12`}]],Ku=[[`path`,{d:`M20 7v10c0 4-1 5-5 5H9c-4 0-5-1-5-5V7c0-4 1-5 5-5h6c4 0 5 1 5 5`}],[`path`,{d:`M14 5.5h-4`}],[`path`,{d:`M12 19.1a1.55 1.55 0 1 0 0-3.1 1.55 1.55 0 0 0 0 3.1`}]],qu=[[`path`,{d:`M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2`}],[`path`,{d:`M12 17.22V22`}],[`path`,{d:`M2 13h20`}],[`path`,{d:`M7.5 22h9`}]],Ju=[[`path`,{d:`M2.03 12.42c.36 5.15 4.73 9.34 9.96 9.57 3.69.16 6.99-1.56 8.97-4.27.82-1.11.38-1.85-.99-1.6-.67.12-1.36.17-2.08.14C13 16.06 9 11.97 8.98 7.14c-.01-1.3.26-2.53.75-3.65.54-1.24-.11-1.83-1.36-1.3C4.41 3.86 1.7 7.85 2.03 12.42`}]],Yu=[[`path`,{strokeLinecap:`butt`,strokeLinejoin:`miter`,d:`M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z`}],[`path`,{strokeLinecap:`butt`,strokeLinejoin:`miter`,d:`M19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z`}],[`path`,{strokeLinecap:`butt`,strokeLinejoin:`miter`,d:`M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z`}]],Xu=[[`path`,{d:`M12 3c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}],[`path`,{d:`M12 17c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}],[`path`,{d:`M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}]],Zu=[[`path`,{d:`M8.56 5a1.6 1.6 0 0 1 1.16-.5h9.6a1.6 1.6 0 0 1 1.6 1.6v5.6a1.6 1.6 0 0 1-1 1.48`}],[`path`,{d:`M15.32 7.5a1.6 1.6 0 0 1 1.6 1.6v6.821a1.6 1.6 0 0 0 .17.718l.854 1.702a.8.8 0 0 1-.72 1.16H3.816a.8.8 0 0 1-.72-1.16l.854-1.702a1.6 1.6 0 0 0 .17-.718V9.1a1.6 1.6 0 0 1 1.6-1.6z`}],[`path`,{d:`M16.963 16.29H4.077`}]],Qu=[[`path`,{strokeLinejoin:`miter`,strokeMiterlimit:`10`,d:`M12.02 2.91c-3.31 0-6 2.69-6 6v2.89c0 .61-.26 1.54-.57 2.06L4.3 15.77c-.71 1.18-.22 2.49 1.08 2.93 4.31 1.44 8.96 1.44 13.27 0 1.21-.4 1.74-1.83 1.08-2.93l-1.15-1.91c-.3-.52-.56-1.45-.56-2.06V8.91c0-3.3-2.7-6-6-6Z`}],[`path`,{d:`M13.87 3.2a6.75 6.75 0 0 0-3.7 0c.29-.74 1.01-1.26 1.85-1.26s1.56.52 1.85 1.26`}],[`path`,{strokeLinecap:`butt`,strokeLinejoin:`miter`,strokeMiterlimit:`10`,d:`M15.02 19.06c0 1.65-1.35 3-3 3-.82 0-1.58-.34-2.12-.88a3 3 0 0 1-.88-2.12`}]],$u=[[`path`,{d:`M11.97 12v3.5c0 1.93 1.57 3.5 3.5 3.5s3.5-1.57 3.5-3.5V10c0-3.87-3.13-7-7-7s-7 3.13-7 7v6c0 3.31 2.69 6 6 6`}]],ed=[[`path`,{d:`m13.26 3.6-8.21 8.69c-.31.33-.61.98-.67 1.43l-.37 3.24c-.13 1.17.71 1.97 1.87 1.77l3.22-.55c.45-.08 1.08-.41 1.39-.75l8.21-8.69c1.42-1.5 2.06-3.21-.15-5.3-2.2-2.07-3.87-1.34-5.29.16`}],[`path`,{d:`M11.89 5.05a6.126 6.126 0 0 0 5.45 5.15`}],[`path`,{d:`M3 22h18`}]],td=[[`path`,{strokeLinejoin:`miter`,d:`M21.47 19V5q0-3-3-3h-4q-3 0-3 3v14q0 3 3 3h4q3 0 3-3Z`}],[`path`,{strokeLinejoin:`miter`,d:`M11.47 6h5`}],[`path`,{strokeLinejoin:`miter`,d:`M11.47 18h4`}],[`path`,{strokeLinejoin:`miter`,d:`m11.47 13.95 5 .05`}],[`path`,{strokeLinejoin:`miter`,d:`M11.47 10h3`}],[`path`,{strokeLinejoin:`miter`,d:`M5.49 2C3.86 2 2.53 3.33 2.53 4.95v12.96c0 .45.19 1.13.42 1.52l.82 1.36c.94 1.57 2.49 1.57 3.43 0l.82-1.36c.23-.39.42-1.07.42-1.52V4.95C8.44 3.33 7.11 2 5.49 2Z`}],[`path`,{strokeLinejoin:`miter`,d:`M8.44 7H2.53`}]],nd=[[`path`,{d:`M4 12V8.44c0-4.42 3.13-6.23 6.96-4.02l3.09 1.78 3.09 1.78c3.83 2.21 3.83 5.83 0 8.04l-3.09 1.78-3.09 1.78C7.13 21.79 4 19.98 4 15.56z`}]],rd=[[`path`,{d:`M10.5 16h3c2.5 0 4-1.8 4-4V6.91c0-1.05-.86-1.91-1.91-1.91H8.42c-1.05 0-1.91.86-1.91 1.91V12C6.5 14.2 8 16 10.5 16`}],[`path`,{d:`M9.5 2v3`}],[`path`,{d:`M14.5 2v3`}],[`path`,{d:`M12 22v-6`}]],id=[[`path`,{d:`M5.9 17h12.19c1.9 0 2.9-1 2.9-2.9V2h-18v12.1C3 16 4 17 5.9 17`}],[`path`,{d:`M2 2h20`}],[`path`,{d:`m8 22 4-2v-3`}],[`path`,{d:`m16 22-4-2`}],[`path`,{d:`m7.5 11 3.15-2.63c.25-.21.58-.15.75.13l1.2 2c.17.28.5.33.75.13L16.5 8`}]],ad=[[`path`,{d:`M22 11.65h-5.8c-1.53 0-2.58-1.16-2.58-2.58V5.85c0-1.42 1.05-2.58 2.58-2.58h3.22c1.42 0 2.58 1.16 2.58 2.58z`}],[`path`,{d:`M22 11.65c0 6.05-1.13 7.05-4.53 9.07`}],[`path`,{d:`M10.37 11.65h-5.8c-1.53 0-2.58-1.16-2.58-2.58V5.85c0-1.42 1.05-2.58 2.58-2.58H7.8c1.42 0 2.58 1.16 2.58 2.58v5.8`}],[`path`,{d:`M10.37 11.65c0 6.05-1.13 7.05-4.53 9.07`}]],od=[[`path`,{d:`M16.87 18.31h-8c-2.76 0-5-2.24-5-5s2.24-5 5-5h11`}],[`path`,{d:`m17.57 10.81 2.56-2.56-2.56-2.56`}]],sd=[[`path`,{d:`M22 12c0 5.52-4.48 10-10 10s-8.89-5.56-8.89-5.56m0 5v-5h4.52M2 12C2 6.48 6.44 2 12 2c6.67 0 10 5.56 10 5.56m-4.44 0H22v-5`}]],cd=[[`path`,{d:`M9.11 5.08c.87-.26 1.83-.43 2.89-.43 4.79 0 8.67 3.88 8.67 8.67s-3.88 8.67-8.67 8.67-8.67-3.88-8.67-8.67c0-1.78.54-3.44 1.46-4.82`}],[`path`,{d:`M7.87 5.32 10.76 2`}],[`path`,{d:`m7.87 5.32 3.37 2.46`}]],ld=[[`path`,{d:`M14.89 5.08c-.87-.26-1.83-.43-2.89-.43-4.79 0-8.67 3.88-8.67 8.67C3.33 18.12 7.21 22 12 22s8.67-3.88 8.67-8.67c0-1.78-.54-3.44-1.46-4.82`}],[`path`,{d:`M16.13 5.32 13.24 2`}],[`path`,{d:`m16.13 5.32-3.37 2.46`}]],ud=[[`circle`,{cx:`5.5`,cy:`5.5`,r:`2.5`}],[`circle`,{cx:`18.5`,cy:`18.5`,r:`2.5`}],[`path`,{d:`M8 5.5h7.5a3.25 3.25 0 0 1 0 6.5h-7a3.25 3.25 0 0 0 0 6.5H16`}]],dd=[[`path`,{d:`M19.9 13.5H4.1c-1.5 0-2.1.64-2.1 2.23v4.04C2 21.36 2.6 22 4.1 22h15.8c1.5 0 2.1-.64 2.1-2.23v-4.04c0-1.59-.6-2.23-2.1-2.23`}],[`path`,{d:`M19.9 2H4.1C2.6 2 2 2.64 2 4.23v4.04c0 1.59.6 2.23 2.1 2.23h15.8c1.5 0 2.1-.64 2.1-2.23V4.23C22 2.64 21.4 2 19.9 2`}]],fd=[[`path`,{d:`M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19`}],[`path`,{d:`m22 22-2-2`}]],pd=[[`path`,{d:`m7.4 6.32 8.49-2.83c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92`}],[`path`,{d:`m10.11 13.65 3.58-3.59`}]],md=[[`path`,{d:`M6 6.25v2`}],[`path`,{d:`M10 6.25v2`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}],[`path`,{d:`M6 16v2`}],[`path`,{d:`M10 16v2`}],[`path`,{d:`M14 7.25h4`}],[`path`,{d:`M14 17h4`}],[`path`,{d:`M2 12h20`}]],hd=[[`path`,{d:`M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6`}],[`path`,{d:`M2 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.9 1.9 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9`}]],gd=[[`path`,{d:`M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7`}],[`path`,{d:`M22 15.5H2`}],[`path`,{d:`M14.56 8.5 12 11.06 9.44 8.5`}]],_d=[[`path`,{d:`M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7`}],[`path`,{d:`M7.97 2v20`}],[`path`,{d:`M14.97 9.44 12.41 12l2.56 2.56`}]],vd=[[`path`,{d:`M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7`}],[`path`,{d:`M14.97 2v20`}],[`path`,{d:`M7.97 9.44 10.53 12l-2.56 2.56`}]],yd=[[`path`,{d:`M12 22c5.52 0 10-4.48 10-10S17.52 2 12 2 2 6.48 2 12s4.48 10 10 10`}],[`path`,{d:`m18.9 5-14 14`}]],bd=[[`path`,{d:`M22 6.5h-6`}],[`path`,{d:`M6 6.5H2`}],[`path`,{d:`M10 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7`}],[`path`,{d:`M22 17.5h-4`}],[`path`,{d:`M8 17.5H2`}],[`path`,{d:`M14 21a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7`}]],xd=[[`path`,{strokeLinejoin:`miter`,d:`M3 7h18`}],[`path`,{strokeLinejoin:`miter`,d:`M6 12h12`}],[`path`,{strokeLinejoin:`miter`,d:`M10 17h4`}]],Sd=[[`path`,{d:`m17.29 4.14-.07 3.79c-.01.52.32 1.21.74 1.52l2.48 1.88c1.59 1.2 1.33 2.67-.57 3.27l-3.23 1.01c-.54.17-1.11.76-1.25 1.31l-.77 2.94c-.61 2.32-2.13 2.55-3.39.51l-1.76-2.85c-.32-.52-1.08-.91-1.68-.88l-3.34.17c-2.39.12-3.07-1.26-1.51-3.08l1.98-2.3c.37-.43.54-1.23.37-1.77L4.28 6.43c-.59-1.9.47-2.95 2.36-2.33l2.95.97c.5.16 1.25.05 1.67-.26l3.08-2.22c1.66-1.2 2.99-.5 2.95 1.55`}],[`path`,{d:`m21.91 22-3.03-3.03`}]],Cd=[[`path`,{d:`m13.73 3.51 1.76 3.52c.24.49.88.96 1.42 1.05l3.19.53c2.04.34 2.52 1.82 1.05 3.28l-2.48 2.48c-.42.42-.65 1.23-.52 1.81l.71 3.07c.56 2.43-.73 3.37-2.88 2.1l-2.99-1.77c-.54-.32-1.43-.32-1.98 0l-2.99 1.77c-2.14 1.27-3.44.32-2.88-2.1l.71-3.07c.13-.58-.1-1.39-.52-1.81l-2.48-2.48c-1.46-1.46-.99-2.94 1.05-3.28l3.19-.53c.53-.09 1.17-.56 1.41-1.05l1.76-3.52c.96-1.91 2.52-1.91 3.47 0`}]],wd=[[`path`,{d:`M9.3 21h5.4c4.5 0 6.3-1.8 6.3-6.3V9.3C21 4.8 19.2 3 14.7 3H9.3C4.8 3 3 4.8 3 9.3v5.4C3 19.2 4.8 21 9.3 21`}]],Td=[[`path`,{d:`M12 18.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13`}],[`path`,{strokeWidth:`2`,d:`m19.14 19.14-.13-.13m0-14.02.13-.13zM4.86 19.14l.13-.13zM12 2.08V2zM12 22v-.08zM2.08 12H2zM22 12h-.08zM4.99 4.99l-.13-.13z`}]],Ed=[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}],[`path`,{d:`M2 12h20`}],[`path`,{d:`M8.25 12v9.5`}],[`path`,{d:`M15.75 22V12`}],[`path`,{d:`M8.25 12V2`}],[`path`,{d:`M15.75 12V2.54`}]],Dd=[[`path`,{fill:`currentColor`,fillRule:`evenodd`,stroke:`none`,d:`m15.836 3.618 4.548 4.529c2.154 2.165 2.156 5.664-.001 7.82l-4.397 4.397-.001.002c-2.165 2.153-5.664 2.155-7.821-.002l-4.537-4.536a5.56 5.56 0 0 1-1.621-4.18v-.003l.24-5.01a4.62 4.62 0 0 1 4.41-4.387h.002l5.002-.24h.002a5.5 5.5 0 0 1 4.174 1.61m-1.062 1.063a4 4 0 0 0-3.035-1.173h-.004l-5.007.24h-.002a3.12 3.12 0 0 0-2.98 2.962l-.24 5.004v.002a4.06 4.06 0 0 0 1.183 3.05l4.537 4.536a4.036 4.036 0 0 0 5.699 0l4.396-4.396a4.036 4.036 0 0 0 0-5.699h-.002z`,clipRule:`evenodd`}],[`path`,{fill:`currentColor`,fillRule:`evenodd`,stroke:`none`,d:`M9.496 7.735a1.753 1.753 0 1 0 0 3.506 1.753 1.753 0 0 0 0-3.506M6.241 9.488a3.255 3.255 0 1 1 6.51 0 3.255 3.255 0 0 1-6.51 0`,clipRule:`evenodd`}]],Od=[[`path`,{d:`M12 19.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15`}],[`path`,{d:`M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6`}],[`path`,{d:`M12 4V2`}],[`path`,{d:`M4 12H2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`M20 12h2`}]],kd=[[`path`,{d:`M11 19.5h10`}],[`path`,{d:`M11 12.5h10`}],[`path`,{d:`M11 5.5h10`}],[`path`,{d:`m3 5.5 1 1 3-3`}],[`path`,{d:`m3 12.5 1 1 3-3`}],[`path`,{d:`m3 19.5 1 1 3-3`}]],Ad=[[`path`,{d:`M12.37 8.88h5.25`}],[`path`,{d:`m6.38 8.88.75.75 2.25-2.25`}],[`path`,{d:`M12.37 15.88h5.25`}],[`path`,{d:`m6.38 15.88.75.75 2.25-2.25`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}]],jd=[[`path`,{d:`M6.89 9c.98.49 1.82 1.23 2.43 2.15.35.52.35 1.19 0 1.71-.61.91-1.45 1.65-2.43 2.14`}],[`path`,{d:`M13 15h4`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7`}]],Md=[[`path`,{d:`M2.67 7.17V5.35c0-1.15.93-2.07 2.07-2.07h14.52c1.15 0 2.07.93 2.07 2.07v1.82`}],[`path`,{d:`M12 20.72V4.11`}],[`path`,{d:`M8.06 20.72h7.88`}]],Nd=[[`path`,{d:`M3 4.5h18`}],[`path`,{d:`M3 9.5h9.47`}],[`path`,{d:`M3 14.5h18`}],[`path`,{d:`M3 19.5h9.47`}]],Pd=[[`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10`}],[`path`,{d:`m7.75 12 2.83 2.83 5.67-5.66`}]],Fd=[[`path`,{fill:`currentColor`,fillRule:`evenodd`,stroke:`none`,d:`M2.248 4.248C3.26 3.237 4.843 3 6.884 3h10.232c2.041 0 3.625.237 4.636 1.248S23 6.843 23 8.884v1.023a.767.767 0 0 1-.767.767 1.792 1.792 0 0 0 0 3.582c.423 0 .767.343.767.767 0 2.041-.236 3.624-1.248 4.636-1.011 1.011-2.595 1.248-4.636 1.248H6.884c-2.041 0-3.624-.237-4.636-1.248C1.237 18.647 1 17.064 1 15.023v-.511c0-.424.344-.768.767-.768a1.792 1.792 0 0 0 0-3.581A.767.767 0 0 1 1 9.395v-.511c0-2.041.237-3.624 1.248-4.636m.288 4.47a3.328 3.328 0 0 1 0 6.472c.014 1.938.288 2.875.797 3.384.524.523 1.499.798 3.55.798h10.233c2.052 0 3.027-.275 3.55-.798.463-.463.732-1.277.788-2.875a3.328 3.328 0 0 1 .011-6.47v-.345c0-2.052-.275-3.027-.798-3.55-.524-.524-1.499-.8-3.55-.8H6.883c-2.052 0-3.027.276-3.55.8-.51.508-.784 1.445-.798 3.383`,clipRule:`evenodd`}],[`path`,{fill:`currentColor`,fillRule:`evenodd`,stroke:`none`,d:`M9.953 3c.424 0 .768.344.768.767v2.047a.767.767 0 1 1-1.535 0V3.767c0-.423.344-.767.767-.767m0 6.14c.424 0 .768.343.768.767V14a.767.767 0 0 1-1.535 0V9.907c0-.424.344-.767.767-.767m0 8.186c.424 0 .768.343.768.767v2.047a.767.767 0 1 1-1.535 0v-2.047c0-.424.344-.767.767-.767`,clipRule:`evenodd`}]],Id=[[`path`,{d:`M21 5.98c-3.33-.33-6.68-.5-10.02-.5q-2.97 0-5.94.3L3 5.98`}],[`path`,{d:`m8.5 4.97.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3`}],[`path`,{d:`m18.85 9.14-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14`}],[`path`,{d:`M10.33 16.5h3.33`}],[`path`,{d:`M9.5 12.5h5`}]],Ld=[[`path`,{d:`M7.13 18.31h8c2.76 0 5-2.24 5-5s-2.24-5-5-5h-11`}],[`path`,{d:`M6.43 10.81 3.87 8.25l2.56-2.56`}]],Rd=[[`path`,{d:`m9.32 6.5 2.56-2.56 2.56 2.56`}],[`path`,{d:`M11.88 14.18V4.01`}],[`path`,{d:`M4 12c0 4.42 3 8 8 8s8-3.58 8-8`}]],zd=[[`path`,{d:`M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10`}],[`path`,{d:`M20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7`}]],Bd=[[`path`,{d:`M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10`}],[`path`,{d:`M3.41 22c0-3.87 3.85-7 8.59-7 .96 0 1.89.13 2.76.37`}],[`path`,{d:`M22 18q0 .48-.12.93c-.09.4-.25.79-.46 1.13A3.97 3.97 0 0 1 18 22a3.92 3.92 0 0 1-2.66-1.03c-.3-.26-.56-.57-.76-.91A3.9 3.9 0 0 1 14 18a3.995 3.995 0 0 1 4-4c1.18 0 2.25.51 2.97 1.33.64.71 1.03 1.65 1.03 2.67`}],[`path`,{d:`M19.49 17.98h-2.98`}],[`path`,{d:`M18 16.52v2.99`}]],Vd=[[`path`,{d:`M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10`}],[`path`,{d:`M3.41 22c0-3.87 3.85-7 8.59-7 .96 0 1.89.13 2.76.37`}],[`path`,{d:`M22 18q0 .48-.12.93c-.09.4-.25.79-.46 1.13A3.97 3.97 0 0 1 18 22a3.92 3.92 0 0 1-2.66-1.03c-.3-.26-.56-.57-.76-.91A3.9 3.9 0 0 1 14 18a3.995 3.995 0 0 1 4-4c1.18 0 2.25.51 2.97 1.33.64.71 1.03 1.65 1.03 2.67`}],[`path`,{d:`m19.03 16.94-2.11 2.11`}],[`path`,{d:`m16.94 16.96 2.12 2.11`}]],Hd=[[`path`,{d:`M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10`}],[`path`,{d:`M3.41 22c0-3.87 3.85-7 8.59-7 .96 0 1.89.13 2.76.37`}],[`path`,{d:`M22 18c0 .75-.21 1.46-.58 2.06-.21.36-.48.68-.79.94-.7.63-1.62 1-2.63 1a3.97 3.97 0 0 1-3.42-1.94A3.9 3.9 0 0 1 14 18c0-1.26.58-2.39 1.5-3.12A3.999 3.999 0 0 1 22 18`}],[`path`,{d:`m16.44 18 .99.99 2.13-1.97`}]],Ud=[[`path`,{d:`M9.16 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43C4.56 3.99 6.54 2 9 2a4.435 4.435 0 0 1 .16 8.87`}],[`path`,{d:`M16.41 4c1.94 0 3.5 1.57 3.5 3.5 0 1.89-1.5 3.43-3.37 3.5a1 1 0 0 0-.26 0`}],[`path`,{d:`M4.16 14.56c-2.42 1.62-2.42 4.26 0 5.87 2.75 1.84 7.26 1.84 10.01 0 2.42-1.62 2.42-4.26 0-5.87-2.74-1.83-7.25-1.83-10.01 0`}],[`path`,{d:`M18.34 20c.72-.15 1.4-.44 1.96-.87 1.56-1.17 1.56-3.1 0-4.27-.55-.42-1.22-.7-1.93-.86`}]],Wd=[[`path`,{strokeLinecap:`butt`,strokeLinejoin:`miter`,d:`M2 10v4q0 3 3 3h1.43c.37 0 .74.11 1.06.3l2.92 1.83c2.52 1.58 4.59.43 4.59-2.54V7.41c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5q-3 0-3 3Z`}],[`path`,{d:`M18 8a6.66 6.66 0 0 1 0 8`}],[`path`,{d:`M19.83 5.5a10.83 10.83 0 0 1 0 13`}]],Gd=[[`path`,{d:`M15 8.37v-.96c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5q-3 0-3 3v4q0 3 3 3h2`}],[`path`,{d:`M10.41 19.13c2.52 1.58 4.59.43 4.59-2.54v-3.64`}],[`path`,{d:`M18.81 9.42c.9 2.15.63 4.66-.81 6.58`}],[`path`,{d:`M21.15 7.8a10.82 10.82 0 0 1-1.32 10.7`}],[`path`,{d:`M22 2 2 22`}]],Kd=[[`path`,{d:`M12 9v5`}],[`path`,{d:`M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12z`}],[`path`,{strokeWidth:`2`,d:`M11.994 17h.01`}]],qd=[[`path`,{d:`M12 7.75V13`}],[`path`,{d:`M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73`}],[`path`,{strokeWidth:`2`,d:`M12 16.2v.1`}]],B=r(),V=e(n(),1),H=e(i(),1);function Jd(e){return Object.keys(e).some(e=>e.startsWith(`aria-`)||e===`role`||e===`title`)}function U(e,t){let n=(0,V.forwardRef)(function(n,r){let i=(0,B.c)(30),a,o,s,c,l,u,d,f,p,m,h,g,_;if(i[0]!==r||i[1]!==n){let{size:e,color:t,strokeWidth:v,absoluteStrokeWidth:y,children:b,...x}=n;a=b,o=x;let S=e===void 0?24:e,C=t===void 0?`currentColor`:t,w=v===void 0?1.5:v;s=r,u=`http://www.w3.org/2000/svg`,d=S,f=S,p=`0 0 24 24`,m=`none`,h=C,g=y?Number(w)*24/Number(S):w,_=`round`,c=`round`,l=a||Jd(o)?void 0:!0,i[0]=r,i[1]=n,i[2]=a,i[3]=o,i[4]=s,i[5]=c,i[6]=l,i[7]=u,i[8]=d,i[9]=f,i[10]=p,i[11]=m,i[12]=h,i[13]=g,i[14]=_}else a=i[2],o=i[3],s=i[4],c=i[5],l=i[6],u=i[7],d=i[8],f=i[9],p=i[10],m=i[11],h=i[12],g=i[13],_=i[14];let v;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(v=t.map(Yd),i[15]=v):v=i[15];let y;return i[16]!==a||i[17]!==o||i[18]!==s||i[19]!==c||i[20]!==l||i[21]!==u||i[22]!==d||i[23]!==f||i[24]!==p||i[25]!==m||i[26]!==h||i[27]!==g||i[28]!==_?(y=(0,H.jsxs)(`svg`,{ref:s,xmlns:u,width:d,height:f,viewBox:p,fill:m,stroke:h,strokeWidth:g,strokeLinecap:_,strokeLinejoin:c,"aria-hidden":l,"data-icon":e,...o,children:[v,a]}),i[16]=a,i[17]=o,i[18]=s,i[19]=c,i[20]=l,i[21]=u,i[22]=d,i[23]=f,i[24]=p,i[25]=m,i[26]=h,i[27]=g,i[28]=_,i[29]=y):y=i[29],y});return n.displayName=`${e}Icon`,n}function Yd(e,t){let[n,r]=e;return(0,V.createElement)(n,{key:t,...r})}var Xd=U(`activity`,Tl),Zd=U(`add`,El),Qd=U(`add-square`,Dl),$d=U(`alert-circle`,Ol),ef=U(`archive`,kl),tf=U(`arrow-down`,Al),nf=U(`arrow-left`,jl),rf=U(`arrow-right`,Ml),af=U(`arrow-up`,Nl),of=U(`arrow-up-circle`,Pl),sf=U(`arrows-left-right`,Fl),cf=U(`arrows-up-down`,Il),lf=U(`battery`,Ll),uf=U(`book`,Rl),df=U(`bookmark`,zl),ff=U(`box`,Bl),pf=U(`box-add`,Vl),mf=U(`brush`,Hl),hf=U(`camera`,Ul),gf=U(`chart`,Wl),_f=U(`check`,Gl),vf=U(`chevron-down`,Kl),yf=U(`chevron-left`,ql),bf=U(`chevron-right`,Jl),xf=U(`chevron-up`,Yl),Sf=U(`chrome`,Xl),Cf=U(`circle`,Zl),wf=U(`circle-dashed`,Ql),Tf=U(`circle-dot`,$l),Ef=U(`close`,eu),Df=U(`close-circle`,tu),Of=U(`cloud`,nu),kf=U(`code`,ru),Af=U(`columns`,iu),jf=U(`copy`,au),Mf=U(`cpu`,ou),Nf=U(`document`,su),Pf=U(`document-code`,cu),Ff=U(`document-copy`,lu),If=U(`document-text`,uu),Lf=U(`download`,du),Rf=U(`driver`,fu),zf=U(`edit`,pu),Bf=U(`external-link`,mu),Vf=U(`flash`,hu),Hf=U(`folder`,gu),Uf=U(`folder-add`,_u),Wf=U(`folder-open`,vu),Gf=U(`gallery`,yu),Kf=U(`gauge`,bu),qf=U(`git-branch`,xu),Jf=U(`git-commit`,Su),Yf=U(`git-fork`,Cu),Xf=U(`git-pull-request`,wu),Zf=U(`global`,Tu),Qf=U(`grid`,Eu),$f=U(`home`,Du),ep=U(`inbox`,Ou),tp=U(`incognito`,ku),np=U(`info`,Au),rp=U(`keyboard`,ju),ip=U(`lamp`,Mu),ap=U(`layers`,Nu),op=U(`link`,Pu),sp=U(`link-2`,Fu),cp=U(`login`,Iu),lp=U(`mail`,Lu),up=U(`maximize`,Ru),dp=U(`maximize-corners`,zu),fp=U(`message`,Bu),pp=U(`message-circle`,Vu),mp=U(`message-question`,Hu),hp=U(`message-text`,Uu),gp=U(`messages`,Wu),_p=U(`minus`,Gu),vp=U(`mobile`,Ku),yp=U(`monitor`,qu),bp=U(`moon`,Ju),xp=U(`more`,Yu),Sp=U(`more-vertical`,Xu),Cp=U(`multiple-machines`,Zu),wp=U(`notification`,Qu),Tp=U(`paperclip`,$u),Ep=U(`pencil`,ed),Dp=U(`pencil-ruler`,td),Op=U(`play`,nd),kp=U(`plug`,rd),Ap=U(`presentation`,id),jp=U(`quote`,ad),Mp=U(`redo`,od),Np=U(`refresh`,sd),Pp=U(`rotate-left`,cd),Fp=U(`rotate-right`,ld),Ip=U(`route`,ud),Lp=U(`rows`,dd),Rp=U(`search`,fd),zp=U(`send`,pd),Bp=U(`server`,md),Vp=U(`setting`,hd),Hp=U(`sidebar-bottom`,gd),Up=U(`sidebar-left`,_d),Wp=U(`sidebar-right`,vd),Gp=U(`slash`,yd),Kp=U(`sliders`,bd),qp=U(`sort`,xd),Jp=U(`sparkles`,Sd),Yp=U(`star`,Cd),Xp=U(`stop`,wd),Zp=U(`sun`,Td),Qp=U(`table`,Ed),$p=U(`tag`,Dd),em=U(`target`,Od),tm=U(`task`,kd),nm=U(`task-square`,Ad),rm=U(`terminal`,jd),im=U(`text`,Md),am=U(`text-align-left`,Nd),om=U(`tick-circle`,Pd),sm=U(`ticket`,Fd),cm=U(`trash`,Id),lm=U(`undo`,Ld),um=U(`upload`,Rd),dm=U(`user`,zd),fm=U(`user-add`,Bd),pm=U(`user-remove`,Vd),mm=U(`user-tick`,Hd),hm=U(`users`,Ud),gm=U(`volume-high`,Wd),_m=U(`volume-slash`,Gd),vm=U(`warning`,Kd),ym=U(`warning-octagon`,qd),bm=(e,t)=>()=>{let n=Ns(Tc(e),t);return ha((e,t)=>Ga(Ms(e,e=>n(e))))},xm=`~effect/encoding/Sse/SseError`,Sm=class extends Ts(`EventTooLarge`){get message(){return`Pending SSE event exceeded the maximum size of ${this.maxEventSize}`}},Cm=class extends Ts(`SseError`){[xm]=xm;get message(){return this.reason.message}},wm=10485760,Tm=e=>ha((t,n)=>dc(()=>{let n=[],r,i=Dm(e=>{e._tag===`Retry`?r=e:n.push(e)},e),a=Ms(t,e=>{for(let t=0;t<e.length;t++){let n=i.feed(e[t]);if(n!==void 0)return Zr(n)}return tc});return ji(function e(){if(xa(n)){let e=n;return n=[],Ga(e)}return r?Zr(r):Ms(a,e)})})),Em=(e,t,n)=>Tr(Tm(t),bm(Mm.pipe(ia(e,Nm)),n)());function Dm(e,t){let n=t?.maxEventSize??wm,r=t?.dispatchEmptyNamedEvents===!0,i,a,o,s,c=0,l,u,d;return f(),{feed:p,reset:f};function f(){c++,i=!0,a=[],o=0,s=!1,l=void 0,u=void 0,d=``}function p(e){i&&e.startsWith(Om)&&(e=e.slice(Om.length)),i=!1;let t=e.length,r=c,l=0;for(;l<t;){if(s&&(s=!1,e.charCodeAt(l)===km)){++l;continue}let n=l;for(;n<t;){let t=e.charCodeAt(n);if(t===Am||t===km)break;++n}if(n===t){a.push(e.slice(l)),o+=t-l;break}s=e.charCodeAt(n)===Am;let i=e.slice(l,n);if(a.length>0&&(a.push(i),i=a.join(``),a=[],o=0),m(i),c!==r)return;l=n+1}if(o+d.length>n){let e=new Cm({reason:new Sm({maxEventSize:n})});return f(),e}}function m(t){if(t.length===0){let t=u!==void 0&&u!==``,n=u||`message`,i=d;u=void 0,d=``,(i.length>0||r&&t)&&e({_tag:`Event`,id:l,event:n,data:i.slice(0,-1)});return}let n=t.indexOf(`:`),i=t,a=``;n>=0&&(i=t.slice(0,n),a=t.slice(t.charCodeAt(n+1)===jm?n+2:n+1)),i===`data`?d+=a+`
2
+ `:i===`event`?u=a:i===`id`&&!a.includes(`\0`)?l=a:i===`retry`&&/^\d+$/.test(a)&&e(new Fm({duration:sc(parseInt(a,10)),lastEventId:l}))}}var Om=``,km=10,Am=13,jm=32,Mm=fs({_tag:Ac(`Event`),id:wa(z),event:z,data:z}),Nm=Qc({decode:e=>e.id===void 0?{event:e.event,data:e.data}:{id:e.id,event:e.event,data:e.data},encode:e=>({_tag:`Event`,id:e.id,event:e.event??`message`,data:e.data})}),Pm=`~effect/encoding/Sse/Retry`,Fm=class e extends xc(`Retry`){[Pm]=Pm;static is(e){return ol(e,Pm)}static filter(t){return e.is(t)?rs(t):mc(t)}},Im=`~effect/reactivity/Reactivity`,Lm=qc(`effect/reactivity/Reactivity`),Rm=dc(()=>{let e=new Map,t=t=>{Wm(t,t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})},n=e=>rl(n=>{let r=na(n,zm);return r?Wm(e,e=>{r.add(e)}):t(e),tc}),r=(e,t)=>Si(t,n(e)),i=(t,n)=>{let r=[];return Wm(t,t=>{r.push(t);let i=e.get(t);i===void 0&&(i=new Set,e.set(t,i)),i.add(n)}),()=>{for(let t=0;t<r.length;t++){let i=e.get(r[t]);i!==void 0&&(i.delete(n),i.size===0&&e.delete(r[t]))}}},a=(e,t)=>Qa(function*(){let n=yield*Uc(),r=Kr(n,fc),a=yield*Ko(),o=lo(Ps(n),Ui(r)),s=!1,c=!1,l=e=>{e._tag===`Failure`?Oc(a,e.cause):$o(a,e.value),c?(c=!1,o(t).addObserver(l)):s=!1};function u(){s?c=!0:(s=!0,o(t).addObserver(l))}let d=i(e,u);return yield*Ci(r,dc(d)),u(),a}),o=(e,t)=>a(e,t).pipe(Ys(Hc),hc),s=t=>ji(()=>{let n=new Set;return t.pipe(Bc(zm,n),Pc(t=>dc(()=>{n.forEach(t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})})))});return Lm.of({[Im]:Im,mutation:r,query:a,stream:o,invalidateUnsafe:t,invalidate:n,registerUnsafe:i,withBatch:s})}),zm=class extends qc()(`effect/reactivity/Reactivity/PendingInvalidation`){},Bm=wi(2,(e,t)=>Lm.use(n=>n.mutation(t,e))),Vm=e=>Lm.use(t=>t.invalidate(e)),Hm=gi(Lm)(Rm);function Um(e){switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:return String(e);default:return _i(e)}}var Wm=(e,t)=>{if(Array.isArray(e))for(let n=0;n<e.length;n++)t(Um(e[n]));else for(let n in e){t(n);let r=e[n];for(let e=0;e<r.length;e++)t(`${n}:${Um(r[e])}`)}},Gm=wi(2,(e,t)=>e===void 0?void 0:t(e)),Km=`~effect/SubscriptionRef`,qm=e=>ol(e,Km),Jm={...Yr,[Km]:{_A:no},toJSON(){return{_id:`SubscriptionRef`,value:this.value}}},Ym=e=>Ys(Oa({replay:1}),t=>{let n=Object.create(Jm);return n.semaphore=Qs(1),n.value=e,n.pubsub=t,nl(n.pubsub,e),n}),Xm=e=>Eo(e.pubsub),Zm=e=>dc(()=>e.value),Qm=(e,t)=>{e.value=t,nl(e.pubsub,t)},$m=wi(2,(e,t)=>e.semaphore.withPermit(dc(()=>{let[n,r]=t(e.value);return Qm(e,r),n}))),eh=wi(2,(e,t)=>e.semaphore.withPermit(ji(()=>Ys(t(e.value),([t,n])=>(Qm(e,n),t))))),th=wi(2,(e,t)=>e.semaphore.withPermit(dc(()=>Qm(e,t)))),nh=wi(2,(e,t)=>e.semaphore.withPermit(dc(()=>Qm(e,t(e.value))))),rh=wi(2,(e,t)=>e.semaphore.withPermit(dc(()=>{let n=t(e.value);return Qm(e,n),n}))),ih=wi(2,(e,t)=>e.semaphore.withPermit(dc(()=>{let n=t(e.value);oc(n)||Qm(e,n.value)}))),ah=(0,V.createContext)(ks.iconSet);function oh(){return(0,V.useContext)(ah)}var sh=.75;function ch(e){return Number(e??2)*sh}function W(e,t,n=`lucide`){let r=(0,V.forwardRef)(function(r,i){let a=(0,B.c)(20),o,s;if(a[0]===r?(o=a[1],s=a[2]):({strokeWidth:s,...o}=r,a[0]=r,a[1]=o,a[2]=s),oh()===`lucide`){let t;return a[3]!==o||a[4]!==i||a[5]!==s?(t=(0,H.jsx)(e,{ref:i,strokeWidth:s,...o}),a[3]=o,a[4]=i,a[5]=s,a[6]=t):t=a[6],t}if(t){let e;a[7]===s?e=a[8]:(e=ch(s),a[7]=s,a[8]=e);let r=o.className?`${n} ${o.className}`:n,c;return a[9]!==o||a[10]!==i||a[11]!==e||a[12]!==r?(c=(0,H.jsx)(t,{ref:i,strokeWidth:e,...o,className:r}),a[9]=o,a[10]=i,a[11]=e,a[12]=r,a[13]=c):c=a[13],c}let c;a[14]===s?c=a[15]:(c=ch(s),a[14]=s,a[15]=c);let l;return a[16]!==o||a[17]!==i||a[18]!==c?(l=(0,H.jsx)(e,{ref:i,strokeWidth:c,...o}),a[16]=o,a[17]=i,a[18]=c,a[19]=l):l=a[19],l});return r.displayName=e.displayName,r}function lh(e,t){return{lucide:e,p4:t}}var uh=W(a,Xd,`lucide lucide-activity`),dh=W(o,null,`lucide lucide-alarm-clock`),fh=W(ir,vm,`lucide lucide-triangle-alert`),ph=W(s,null,`lucide lucide-app-window`),mh=W(c,ef,`lucide lucide-archive`),hh=W(u,tf,`lucide lucide-arrow-down`),gh=W(l,cf,`lucide lucide-arrow-down-up`),_h=W(d,nf,`lucide lucide-arrow-left`),vh=W(p,rf,`lucide lucide-arrow-right`),yh=W(f,sf,`lucide lucide-arrow-right-left`),bh=W(_,af,`lucide lucide-arrow-up`),xh=W(re,of,`lucide lucide-circle-arrow-up`),Sh=W(m,cf,`lucide lucide-arrow-up-down`),Ch=W(h,null,`lucide lucide-arrow-up-left`),wh=W(g,null,`lucide lucide-arrow-up-right`),Th=W(v,lf,`lucide lucide-battery`),Eh=W(y,wp,`lucide lucide-bell`),Dh=W(b,Qf,`lucide lucide-blocks`),Oh=W(x,uf,`lucide lucide-book-open`),kh=W(S,df,`lucide lucide-bookmark`),Ah=W(C,null,`lucide lucide-bot`),jh=W(w,ff,`lucide lucide-box`),Mh=W(T,null,`lucide lucide-bug`),Nh=W(k,null,`lucide lucide-calendar`),Ph=W(E,null,`lucide lucide-calendar-arrow-down`),Fh=W(D,null,`lucide lucide-calendar-arrow-up`),Ih=W(O,null,`lucide lucide-calendar-clock`),Lh=W(A,hf,`lucide lucide-camera`),Rh=W(j,gf,`lucide lucide-chart-no-axes-column`),zh=W(M,_f,`lucide lucide-check`),Bh=W(N,vf,`lucide lucide-chevron-down`),Vh=W(P,yf,`lucide lucide-chevron-left`),Hh=W(F,bf,`lucide lucide-chevron-right`),Uh=W(I,xf,`lucide lucide-chevron-up`),Wh=W(ee,null,`lucide lucide-chevrons-left-right-ellipsis`),Gh=W(te,null,`lucide lucide-chevrons-up-down`),Kh=W(ne,Sf,`lucide lucide-chromium`),qh=W(le,Cf,`lucide lucide-circle`),Jh=W(L,$d,`lucide lucide-circle-alert`),Yh=W(re,of,`lucide lucide-circle-arrow-up`),Xh=W(ie,om,`lucide lucide-circle-check`),Zh=W(ae,wf,`lucide lucide-circle-dashed`),Qh=W(R,Tf,`lucide lucide-circle-dot`),$h=W(oe,Gp,`lucide lucide-circle-slash`),eg=W(se,null,`lucide lucide-circle-stop`),tg=W(ce,Df,`lucide lucide-circle-x`),ng=W(de,null,`lucide lucide-clock`),rg=W(ue,null,`lucide lucide-clock3 lucide-clock-3`),ig=W(me,Of,`lucide lucide-cloud`),ag=W(fe,null,`lucide lucide-cloud-download`),og=W(pe,null,`lucide lucide-cloud-upload`),sg=W(ge,kf,`lucide lucide-code`),cg=W(he,kf,`lucide lucide-code-xml`),lg=W(_e,Af,`lucide lucide-columns2 lucide-columns-2`),ug=W(ve,jf,`lucide lucide-copy`),dg=W(ye,null,`lucide lucide-corner-left-up`),fg=W(be,null,`lucide lucide-corner-up-right`),pg=W(xe,Mf,`lucide lucide-cpu`),mg=W(Se,null,`lucide lucide-database`),hg=W(Ce,Lf,`lucide lucide-download`),gg=W(Ee,xp,`lucide lucide-ellipsis`),_g=W(De,Bf,`lucide lucide-external-link`),vg=W(ke,null,`lucide lucide-eye`),yg=W(Oe,null,`lucide lucide-eye-off`),bg=W(Ie,Nf,`lucide lucide-file`),xg=W(je,Pf,`lucide lucide-file-code-corner`),Sg=W(Me,null,`lucide lucide-file-diff`),Cg=W(Ae,null,`lucide lucide-file-braces`),wg=W(Ne,null,`lucide lucide-file-search`),Tg=W(Pe,null,`lucide lucide-file-spreadsheet`),Eg=W(Fe,If,`lucide lucide-file-text`),Dg=W(Le,Ff,`lucide lucide-files`),Og=W(Re,null,`lucide lucide-film`),kg=W(ze,null,`lucide lucide-flask-conical`),Ag=W(Be,null,`lucide lucide-fold-vertical`),jg=W(Je,Hf,`lucide lucide-folder`),Mg=W(Ve,Hf,`lucide lucide-folder-closed`),Ng=W(He,null,`lucide lucide-folder-cog`),Pg=W(We,null,`lucide lucide-folder-git`),Fg=W(Ue,null,`lucide lucide-folder-git2 lucide-folder-git-2`),Ig=W(Ge,Wf,`lucide lucide-folder-open`),Lg=W(Ke,Uf,`lucide lucide-folder-plus`),Rg=W(qe,null,`lucide lucide-folder-tree`),zg=W(Ye,Kf,`lucide lucide-gauge`),Bg=W(Ze,qf,`lucide lucide-git-branch`),Vg=W(Xe,null,`lucide lucide-git-branch-plus`),Hg=W(Qe,Jf,`lucide lucide-git-commit-horizontal`),Ug=W(Qe,Jf,`lucide lucide-git-commit-horizontal`),Wg=W($e,Yf,`lucide lucide-git-fork`),Gg=W(et,null,`lucide lucide-git-merge`),Kg=W(tt,Xf,`lucide lucide-git-pull-request-arrow`),qg=W(nt,null,`lucide lucide-git-pull-request-closed`),Jg=W(rt,null,`lucide lucide-git-pull-request-draft`),Yg=W(it,Zf,`lucide lucide-globe`),Xg=W(we,Zf,`lucide lucide-earth`),Zg=W(at,null,`lucide lucide-grip-vertical`),Qg=W(ot,null,`lucide lucide-hammer`),$g=W(st,Rf,`lucide lucide-hard-drive`),e_=W(ct,tp,`lucide lucide-hat-glasses`),t_=W(lt,null,`lucide lucide-history`),n_=W(ut,$f,`lucide lucide-house`),r_=W(dt,Gf,`lucide lucide-image`),i_=W(ft,ep,`lucide lucide-inbox`),a_=W(pt,np,`lucide lucide-info`),o_=W(mt,null,`lucide lucide-key-round`),s_=W(ht,rp,`lucide lucide-keyboard`),c_=W(gt,null,`lucide lucide-laptop`),l_=W(_t,ap,`lucide lucide-layers`),u_=W(vt,ip,`lucide lucide-lightbulb`),d_=W(bt,op,`lucide lucide-link`),f_=W(yt,sp,`lucide lucide-link2 lucide-link-2`),p_=W(Tt,null,`lucide lucide-list`),m_=W(xt,tm,`lucide lucide-list-checks`),h_=W(St,qp,`lucide lucide-list-filter`),g_=W(Ct,null,`lucide lucide-list-ordered`),__=W(wt,nm,`lucide lucide-list-todo`),v_=W(Et,null,`lucide lucide-loader-circle`),y_=W(Ot,null,`lucide lucide-lock`),b_=W(Dt,null,`lucide lucide-lock-open`),x_=W(kt,cp,`lucide lucide-log-in`),S_=W(At,lp,`lucide lucide-mail`),C_=W(Mt,dp,`lucide lucide-maximize`),w_=W(jt,up,`lucide lucide-maximize2 lucide-maximize-2`),T_=W(Nt,null,`lucide lucide-memory-stick`),E_=W(Ft,pp,`lucide lucide-message-circle`),D_=W(Pt,mp,`lucide lucide-message-circle-question-mark`),O_=W(Bt,fp,`lucide lucide-message-square`),k_=W(It,null,`lucide lucide-message-square-dashed`),A_=W(Lt,null,`lucide lucide-message-square-off`),j_=W(Rt,hp,`lucide lucide-message-square-text`),M_=W(zt,null,`lucide lucide-message-square-warning`),N_=W(Vt,gp,`lucide lucide-messages-square`),P_=W(Ht,null,`lucide lucide-minimize2 lucide-minimize-2`),F_=W(Ut,_p,`lucide lucide-minus`),I_=W(Wt,yp,`lucide lucide-monitor`),L_=W(Gt,bp,`lucide lucide-moon`),R_=W(Ee,xp,`lucide lucide-ellipsis`),z_=W(Te,Sp,`lucide lucide-ellipsis-vertical`),B_=W(Kt,null,`lucide lucide-mouse-pointer2 lucide-mouse-pointer-2`),V_=W(qt,null,`lucide lucide-mouse-pointer-click`),H_=W(Jt,ym,`lucide lucide-octagon-alert`),U_=W(Xt,ff,`lucide lucide-package`),W_=W(Yt,pf,`lucide lucide-package-plus`),G_=W(Zt,mf,`lucide lucide-paintbrush`),K_=W(Qt,null,`lucide lucide-palette`),q_=W($t,Hp,`lucide lucide-panel-bottom`),J_=W(en,Up,`lucide lucide-panel-left`),Y_=W(tn,Wp,`lucide lucide-panel-right`),X_=W(rn,null,`lucide lucide-panels-top-left`),Z_=W(nn,Tp,`lucide lucide-paperclip`),Q_=W(an,Ep,`lucide lucide-pen-line`),$_=W(sn,Ep,`lucide lucide-pencil`),ev=W(on,Dp,`lucide lucide-pencil-ruler`),tv=W(cn,null,`lucide lucide-picture-in-picture2 lucide-picture-in-picture-2`),nv=W(ln,null,`lucide lucide-pilcrow`),rv=W(un,null,`lucide lucide-pin`),iv=W(dn,Op,`lucide lucide-play`),av=W(mn,kp,`lucide lucide-plug`),ov=W(fn,kp,`lucide lucide-plug2 lucide-plug-2`),sv=W(pn,Zd,`lucide lucide-plus`),cv=W(hn,null,`lucide lucide-power`),lv=W(gn,Ap,`lucide lucide-presentation`),uv=W(_n,null,`lucide lucide-puzzle`),dv=W(vn,null,`lucide lucide-qr-code`),fv=W(yn,jp,`lucide lucide-quote`),pv=W(bn,null,`lucide lucide-radio-tower`),mv=W(xn,Mp,`lucide lucide-redo2 lucide-redo-2`),hv=W(Sn,Np,`lucide lucide-refresh-cw`),gv=W(Cn,Pp,`lucide lucide-rotate-ccw`),_v=W(wn,Fp,`lucide lucide-rotate-cw`),vv=W(Tn,Ip,`lucide lucide-route`),yv=W(En,Lp,`lucide lucide-rows3 lucide-rows-3`),bv=W(Dn,null,`lucide lucide-scale`),xv=W(On,Rp,`lucide lucide-search`),Sv=W(kn,zp,`lucide lucide-send`),Cv=W(An,Bp,`lucide lucide-server`),wv=W(Mn,Vp,`lucide lucide-settings`),Tv=W(jn,Kp,`lucide lucide-settings2 lucide-settings-2`),Ev=W(Fn,null,`lucide lucide-shield`),Dv=W(Nn,null,`lucide lucide-shield-check`),Ov=W(Pn,null,`lucide lucide-shield-question-mark`),kv=W(In,Kp,`lucide lucide-sliders-horizontal`),Av=W(Ln,vp,`lucide lucide-smartphone`),jv=W(Rn,null,`lucide lucide-smile-plus`),Mv=W(zn,Jp,`lucide lucide-sparkles`),Nv=W(Gn,Xp,`lucide lucide-square`),Pv=W(Bn,Bf,`lucide lucide-square-arrow-out-up-right`),Fv=W(Vn,zf,`lucide lucide-square-pen`),Iv=W(Hn,null,`lucide lucide-square-split-horizontal`),Lv=W(Un,null,`lucide lucide-square-split-vertical`),Rv=W(Wn,rm,`lucide lucide-square-terminal`),zv=W(Kn,Yp,`lucide lucide-star`),Bv=W(qn,Zp,`lucide lucide-sun`),Vv=W(Jn,$p,`lucide lucide-tag`),Hv=W(Yn,em,`lucide lucide-target`),Uv=W(Xn,rm,`lucide lucide-terminal`),Wv=W(Wn,rm,`lucide lucide-square-terminal`),Gv=W(Zn,am,`lucide lucide-text-align-start`),Kv=W(Qn,null,`lucide lucide-text-search`),qv=W($n,null,`lucide lucide-text-wrap`),Jv=W(er,sm,`lucide lucide-ticket`),Yv=W(tr,cm,`lucide lucide-trash2 lucide-trash-2`),Xv=W(nr,null,`lucide lucide-trending-down`),Zv=W(rr,null,`lucide lucide-trending-up`),Qv=W(ir,vm,`lucide lucide-triangle-alert`),$v=W(ar,im,`lucide lucide-type`),ey=W(or,lm,`lucide lucide-undo2 lucide-undo-2`),ty=W(sr,null,`lucide lucide-unfold-vertical`),ny=W(cr,null,`lucide lucide-unlink2 lucide-unlink-2`),ry=W(lr,null,`lucide lucide-unplug`),iy=W(ur,um,`lucide lucide-upload`),ay=W(dr,mm,`lucide lucide-user-check`),oy=W(fr,null,`lucide lucide-user-lock`),sy=W(pr,fm,`lucide lucide-user-plus`),cy=W(hr,dm,`lucide lucide-user-round`),ly=W(mr,pm,`lucide lucide-user-round-x`),uy=W(gr,hm,`lucide lucide-users`),dy=W(_r,null,`lucide lucide-wifi-off`),fy=W(vr,null,`lucide lucide-workflow`),py=W($n,null,`lucide lucide-text-wrap`),my=W(yr,null,`lucide lucide-wrench`),hy=W(br,Ef,`lucide lucide-x`),gy=W(ce,Df,`lucide lucide-circle-x`),_y=W(xr,Vf,`lucide lucide-zap`),vy={activity:Xd,"alert-triangle":vm,archive:ef,"arrow-down":tf,"arrow-down-up":cf,"arrow-left":nf,"arrow-right":rf,"arrow-right-left":sf,"arrow-up":af,"arrow-up-circle":of,"arrow-up-down":cf,battery:lf,bell:wp,blocks:Qf,"book-open":uf,bookmark:df,box:ff,camera:hf,"chart-no-axes-column":gf,check:_f,"check-circle-2":om,"chevron-down":vf,"chevron-left":yf,"chevron-right":bf,"chevron-up":xf,chrome:Sf,chromium:Sf,circle:Cf,"circle-alert":$d,"circle-arrow-up":of,"circle-check":om,"circle-dashed":wf,"circle-dot":Tf,"circle-slash":Gp,"circle-x":Df,cloud:Of,code:kf,"code-2":kf,"code-xml":kf,"columns-2":Af,copy:jf,cpu:Mf,download:Lf,earth:Zf,ellipsis:xp,"ellipsis-vertical":Sp,"external-link":Bf,file:Nf,"file-code-2":Pf,"file-code-corner":Pf,"file-text":If,files:Ff,folder:Hf,"folder-closed":Hf,"folder-open":Wf,"folder-plus":Uf,gauge:Kf,"git-branch":qf,"git-commit":Jf,"git-commit-horizontal":Jf,"git-fork":Yf,"git-pull-request-arrow":Xf,globe:Zf,"globe-2":Zf,"hard-drive":Rf,"hat-glasses":tp,home:$f,house:$f,image:Gf,inbox:ep,info:np,keyboard:rp,layers:ap,lightbulb:ip,link:op,"link-2":sp,"list-checks":tm,"list-filter":qp,"list-todo":nm,"log-in":cp,mail:lp,maximize:dp,"maximize-2":up,"message-circle":pp,"message-circle-question":mp,"message-circle-question-mark":mp,"message-square":fp,"message-square-text":hp,"messages-square":gp,minus:_p,monitor:yp,moon:bp,"more-horizontal":xp,"more-vertical":Sp,"octagon-alert":ym,package:ff,"package-plus":pf,paintbrush:mf,"panel-bottom":Hp,"panel-left":Up,"panel-right":Wp,paperclip:Tp,"pen-line":Ep,pencil:Ep,"pencil-ruler":Dp,play:Op,plug:kp,"plug-2":kp,plus:Zd,presentation:Ap,quote:jp,"redo-2":Mp,"refresh-cw":Np,"rotate-ccw":Pp,"rotate-cw":Fp,route:Ip,"rows-3":Lp,search:Rp,send:zp,server:Bp,settings:Vp,"settings-2":Kp,"sliders-horizontal":Kp,smartphone:vp,sparkles:Jp,square:Xp,"square-arrow-out-up-right":Bf,"square-pen":zf,"square-plus":Qd,"square-terminal":rm,star:Yp,sun:Zp,"table-2":Qp,tag:$p,target:em,terminal:rm,"terminal-square":rm,text:am,"text-align-start":am,ticket:sm,"trash-2":cm,"triangle-alert":vm,type:im,"undo-2":lm,upload:um,"user-check":mm,"user-plus":fm,"user-round":dm,"user-round-x":pm,users:hm,"volume-2":gm,"volume-off":_m,x:Ef,"x-circle":Df,zap:Vf},yy=e=>Ri({b3:`${e.traceId}-${e.spanId}-${e.sampled?`1`:`0`}${ms(e.parent,{onNone:()=>``,onSome:e=>`-${e.spanId}`})}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?`01`:`00`}`}),by={"http:":80,"https:":443,"ws:":80,"wss:":443},xy=(e,t)=>{let n=t.search.slice(1);if(e.attribute(`url.full`,t.toString()),e.attribute(`url.path`,t.pathname),n!==``&&e.attribute(`url.query`,n),e.attribute(`url.scheme`,t.protocol.slice(0,-1)),t.hostname!==``){e.attribute(`server.address`,t.hostname.startsWith(`[`)?t.hostname.slice(1,-1):t.hostname);let n=t.port===``?by[t.protocol]:Number(t.port);n!==void 0&&e.attribute(`server.port`,n)}},Sy=(e,t,n,r,i)=>{for(let a in n)r(a,t)&&e.attribute(`http.${t}.header.${a}`,ba(a,i)?`<redacted>`:n[a])},Cy=`~effect/http/HttpClient`,wy=qc(`effect/HttpClient`),Ty=(e=>(...t)=>Ms(wy,n=>n[e](...t)))(`get`),Ey=wi(2,(e,t)=>Oy(n=>t(e.postprocess(n)),e.preprocess)),Dy=Ey(Ms(la)),Oy=(e,t)=>{let n=Object.create(ky);return n.preprocess=t,n.postprocess=e,n.execute=function(n){return e(t(n))},n},ky={[Cy]:Cy,pipe(){return Cr(this,arguments)},...Is,toJSON(){return{_id:`effect/HttpClient`}},...Object.fromEntries(io.map(([e,t])=>[t,function(t,n){return this.execute(Ua(e)(t,n))}]))},Ay=e=>Oy(t=>Ms(t,t=>Uo(n=>{let r=Wy.get(t),i=r??new AbortController,a=gc(t.url,t.urlParams,ls(t.hash));if(ro(a))return Zr(new fo({reason:new yo({request:t,cause:a.failure})}));let o=a.success;if(n.getRef(uo)||n.getRef(Ry)(t)){let a=e(t,o,i.signal,n);return r?a:vc(e=>ec(e(a),{onSuccess(e){return Uy.register(e,i),Ga(new Gy(e,i))},onFailure(e){return As(e)&&i.abort(),Jr(e)}}))}return ko(n.getRef(Vy)(t),{kind:`client`},a=>{a.attribute(`http.request.method`,t.method);let s=n.getRef(sa);xy(a,o);let c=n.getRef(zy);return Sy(a,`request`,t.headers,c,s),t=n.getRef(By)?li(t,yy(a)):t,vc(l=>l(e(t,o,i.signal,n)).pipe(Vs(a,{captureStackTrace:!1}),ec({onSuccess:e=>(a.attribute(`http.response.status_code`,e.status),Sy(a,`response`,e.headers,c,s),e.status>=400&&e.status<600&&(a.attribute(`error.type`,String(e.status)),jy(n,a,t,e)),r?Ga(e):(Uy.register(e,i),Ga(new Gy(e,i)))),onFailure(e){return!r&&As(e)&&i.abort(),Jr(e)}})))})})),Ga),jy=(e,t,n,r)=>{let i=Gr();$i(0);let a;try{a=lc(new fo({reason:new ga({request:n,response:r})}))}finally{$i(i)}t.end(e.getRef(Zs)?e.getRef(Ds).currentTimeNanosUnsafe():BigInt(0),a)},My=wi(2,(e,t)=>Oy(e.postprocess,n=>Ys(e.preprocess(n),t))),Ny=wi(2,(e,t)=>Oy(e.postprocess,n=>Ms(e.preprocess(n),t))),Py=wi(2,(e,t)=>{let n=Ta(t),r=n?`errors-and-responses`:t.retryOn??`errors-and-responses`,i=Yy(n?t:t.schedule??Io),a=n?void 0:t.times;return Ey(e,lo(r===`errors-only`?no:Yc({schedule:i,times:a,while:Xy}),r===`response-only`?no:Gc({while:n||t.while===void 0?Ky:qa(Ky,t.while),schedule:i,times:a})))}),Fy=(e,t)=>{if(t===void 0)return;let n=t.trim();if(/^\d+(?:\.\d+)?$/.test(n)){let e=Number(n);return Number.isFinite(e)?us(To(e),sc(1)):void 0}let r=Date.parse(n);if(Number.isNaN(r))return;let i=r-e;return sc(i<=0?1:i)},Iy=wi(2,(e,t)=>Ey(e,Si(t))),Ly=wi(2,(e,t)=>Ey(e,eo(t))),Ry=Br(`effect/http/HttpClient/TracerDisabledWhen`,{defaultValue:()=>oi}),zy=Br(`effect/http/HttpClient/TracerHeaderFilter`,{defaultValue:()=>oi}),By=Br(`effect/http/HttpClient/TracerPropagationEnabled`,{defaultValue:Mi}),Vy=Br(`effect/http/HttpClient/SpanNameGenerator`,{defaultValue:()=>e=>e.method}),Hy=e=>gi(wy)(rl(t=>Ys(e,e=>Ey(e,Ss(e=>Hi(t,e)))))),Uy=(()=>{if(`FinalizationRegistry`in globalThis&&globalThis.FinalizationRegistry){let e=new FinalizationRegistry(e=>{e.abort()});return{register(t,n){e.register(t,n,t)},unregister(t){e.unregister(t)}}}let e=new WeakMap;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){let n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}})(),Wy=new WeakMap,Gy=class{original;controller;constructor(e,t){this.original=e,this.controller=t}[Xi]=Xi;[bi]=bi;applyInterrupt(e){return ji(()=>(Uy.unregister(this.original),Yo(e,()=>dc(()=>{this.controller.abort()}))))}get request(){return this.original.request}get url(){return this.original.url}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return Sa(()=>(Uy.unregister(this.original),Lc(this.original.stream,dc(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[Or](){return this.original[Or]()}pipe(){return Cr(this,arguments)}},Ky=e=>Ca(e)||qy(e),qy=e=>is(e)&&(e.reason._tag===`TransportError`||e.reason._tag===`StatusCodeError`&&Xy(e.reason.response)),Jy=(e,t)=>Fy(t,(is(e)?e.response:ol(e,`~effect/http/HttpClientResponse`)?e:void 0)?.headers[`retry-after`]),Yy=e=>Xc(Ys(Qi(e),e=>(t,n)=>{let r=Jy(n,t);return r===void 0?e(t,n):Ys(e(t,n),([e,t])=>[e,us(t,r)])})),Xy=e=>e.status===408||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504,Zy=new Set;function Qy(e){if(e===void 0)return Zy;let t=qs(e.ast);return hs(t)&&t.indexSignatures.length===0?new Set(t.propertySignatures.map(e=>String(e.name))):void 0}var $y={Backquote:"`",Backslash:`\\`,BracketLeft:`[`,BracketRight:`]`,Comma:`,`,Digit0:`0`,Digit1:`1`,Digit2:`2`,Digit3:`3`,Digit4:`4`,Digit5:`5`,Digit6:`6`,Digit7:`7`,Digit8:`8`,Digit9:`9`,Equal:`=`,Minus:`-`,Period:`.`,Quote:`'`,Semicolon:`;`,Slash:`/`};function eb(e){return/mac|iphone|ipad|ipod/i.test(e)}function tb(e){let t=e.toLowerCase();return t===`esc`?`escape`:t}function nb(e){let t=tb(e.key);return/^[a-z]$/.test(t)?t:(e.code?$y[e.code]:void 0)??t}function rb(e){let t=tb(e.key),n=new Set([t]),r=e.code?.match(/^Key([A-Z])$/)?.[1];return r&&!/^[a-z]$/.test(t)&&n.add(r.toLowerCase()),n.add(nb(e)),n}function ib(e,t,n){let r=eb(n),i=t.metaKey||t.modKey&&r,a=t.ctrlKey||t.modKey&&!r;return e.metaKey===i&&e.ctrlKey===a&&e.shiftKey===t.shiftKey&&e.altKey===t.altKey}function ab(e,t,n){return!eb(n)&&e.getModifierState?.(`AltGraph`)&&!/^[a-z0-9]$/i.test(e.key)||!ib(e,t,n)?!1:rb(e).has(t.key)}var ob=[{key:`mod+b`,command:`sidebar.toggle`},{key:`mod+[`,command:`navigation.back`,when:`!terminalFocus`},{key:`mod+]`,command:`navigation.forward`,when:`!terminalFocus`},{key:`mod+j`,command:`terminal.toggle`},{key:`mod+alt+b`,command:`rightPanel.toggle`},{key:`mod+shift+b`,command:`threadPanel.toggle`,when:`!terminalFocus`},{key:`mod+t`,command:`rightPanel.new`,when:`rightPanelOpen && !terminalFocus`},{key:`mod+d`,command:`terminal.split`,when:`terminalFocus`},{key:`mod+shift+d`,command:`terminal.splitVertical`,when:`terminalFocus`},{key:`mod+n`,command:`terminal.new`,when:`terminalFocus`},{key:`mod+w`,command:`terminal.close`,when:`terminalFocus`},{key:`mod+w`,command:`rightPanel.close`,when:`!terminalFocus`},{key:`mod+shift+t`,command:`view.reopenClosed`},{key:`mod+d`,command:`diff.toggle`,when:`!terminalFocus`},{key:`mod+shift+j`,command:`preview.toggle`},{key:`mod+r`,command:`preview.refresh`,when:`previewFocus`},{key:`mod+l`,command:`preview.focusUrl`,when:`previewFocus`},{key:`mod+=`,command:`preview.zoomIn`,when:`previewFocus`},{key:`mod++`,command:`preview.zoomIn`,when:`previewFocus`},{key:`mod+-`,command:`preview.zoomOut`,when:`previewFocus`},{key:`mod+0`,command:`preview.resetZoom`,when:`previewFocus`},{key:`mod+k`,command:`commandPalette.toggle`,when:`!terminalFocus`},{key:`mod+p`,command:`filePicker.toggle`,when:`!terminalFocus`},{key:`mod+shift+f`,command:`projectSearch.toggle`,when:`!terminalFocus`},{key:`mod+u`,command:`usage.open`,when:`!terminalFocus`},{key:`mod+alt+a`,command:`theme.select`,when:`!terminalFocus`},{key:`mod+alt+shift+a`,command:`appearance.cycle`,when:`!terminalFocus`},{key:`mod+alt+shift+t`,command:`themeEditor.toggle`},{key:`mod+s`,command:`composer.stash`,when:`!terminalFocus`},{key:`mod+/`,command:`composer.toggleRichText`,when:`!terminalFocus`},{key:`mod+shift+enter`,command:`thread.steerQueuedMessage`,when:`!terminalFocus`},{key:`alt+arrowup`,command:`thread.editQueuedMessage`,when:`composerFocus`},{key:`mod+enter`,command:`composer.sendAlternate`,when:`composerFocus && turnRunning`},{key:`mod+enter`,command:`composer.sendBackground`,when:`composerFocus && draftThreadRoute`},{key:`mod+alt+enter`,command:`composer.sendBackground`,when:`composerFocus && draftThreadRoute`},{key:`mod+alt+enter`,command:`composer.sendAndNewThread`,when:`composerFocus && !draftThreadRoute`},{key:`mod+n`,command:`chat.new`,when:`!terminalFocus`},{key:`mod+shift+o`,command:`chat.new`,when:`!terminalFocus`},{key:`mod+shift+n`,command:`chat.newLocal`,when:`!terminalFocus`},{key:`mod+alt+n`,command:`chat.newWithoutProject`,when:`!terminalFocus`},{key:`mod+f`,command:`chat.find`,when:`!terminalFocus && !previewFocus`},{key:`mod+shift+m`,command:`modelPicker.toggle`,when:`!terminalFocus`},{key:`mod+shift+h`,command:`composer.host`,when:`!terminalFocus`},{key:`mod+shift+e`,command:`composer.effort`,when:`!terminalFocus`},{key:`mod+shift+a`,command:`composer.mode`,when:`!terminalFocus`},{key:`mod+shift+x`,command:`composer.workspace`,when:`!terminalFocus`},{key:`mod+shift+g`,command:`composer.branch`,when:`!terminalFocus`},{key:`mod+shift+l`,command:`composer.previousWorktree`,when:`!terminalFocus`},{key:`mod+shift+k`,command:`pullRequest.copyNumber`,when:`!terminalFocus`},{key:`mod+shift+arrowup`,command:`modelPicker.previousProvider`,when:`modelPickerOpen`},{key:`mod+shift+arrowdown`,command:`modelPicker.nextProvider`,when:`modelPickerOpen`},{key:`mod+o`,command:`editor.openFavorite`},{key:`mod+shift+[`,command:`thread.previous`},{key:`mod+shift+]`,command:`thread.next`},{key:`mod+shift+c`,command:`thread.copyReference`,when:`!terminalFocus`},{key:`mod+shift+p`,command:`thread.pin`,when:`!terminalFocus`},{key:`mod+z`,command:`thread.undo`,when:`!terminalFocus && !editableFocus`},...Ti.map((e,t)=>({key:`mod+${t+1}`,command:e,when:`!modelPickerOpen && isDesktop`})),...si.map((e,t)=>({key:`mod+${t+1}`,command:e,when:`modelPickerOpen && isDesktop`})),{key:`c`,command:`usage.cost`,when:`usagePageOpen`},{key:`t`,command:`usage.tokens`,when:`usagePageOpen`},{key:`l`,command:`usage.limits`,when:`usagePageOpen`},{key:`mod+shift+1`,command:`usage.period.day`,when:`usagePageOpen`},{key:`mod+shift+2`,command:`usage.period.week`,when:`usagePageOpen`},{key:`mod+shift+3`,command:`usage.period.month`,when:`usagePageOpen`},{key:`mod+shift+4`,command:`usage.period.quarter`,when:`usagePageOpen`}];function sb(e){return e===`space`?` `:e===`esc`?`escape`:e}function cb(e){let t=[...e.toLowerCase().split(`+`).map(e=>e.trim())],n=0;for(;t[t.length-1]===``;)n+=1,t.pop();if(n>0&&t.push(`+`),t.some(e=>e.length===0)||t.length===0)return null;let r=null,i=!1,a=!1,o=!1,s=!1,c=!1;for(let e of t)switch(e){case`cmd`:case`meta`:i=!0;break;case`ctrl`:case`control`:a=!0;break;case`shift`:o=!0;break;case`alt`:case`option`:s=!0;break;case`mod`:c=!0;break;default:if(r!==null)return null;r=sb(e)}return r===null?null:{key:r,metaKey:i,ctrlKey:a,shiftKey:o,altKey:s,modKey:c}}function lb(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(!r)break;if(/\s/.test(r)){n+=1;continue}if(e.startsWith(`&&`,n)){t.push({type:`and`}),n+=2;continue}if(e.startsWith(`||`,n)){t.push({type:`or`}),n+=2;continue}if(r===`!`){t.push({type:`not`}),n+=1;continue}if(r===`(`){t.push({type:`lparen`}),n+=1;continue}if(r===`)`){t.push({type:`rparen`}),n+=1;continue}let i=/^[A-Za-z_][A-Za-z0-9_.-]*/.exec(e.slice(n));if(!i)return null;t.push({type:`identifier`,value:i[0]}),n+=i[0].length}return t}function ub(e){let t=lb(e);if(!t||t.length===0)return null;let n=0,r=e=>{if(e>64)return null;let r=t[n];if(!r)return null;if(r.type===`identifier`)return n+=1,{type:`identifier`,name:r.value};if(r.type===`lparen`){n+=1;let r=o(e+1),i=t[n];return!r||!i||i.type!==`rparen`?null:(n+=1,r)}return null},i=e=>{let i=0;for(;t[n]?.type===`not`;)if(n+=1,i+=1,i>64)return null;let a=r(e);if(!a)return null;for(;i>0;)a={type:`not`,node:a},--i;return a},a=e=>{let r=i(e);if(!r)return null;for(;t[n]?.type===`and`;){n+=1;let t=i(e);if(!t)return null;r={type:`and`,left:r,right:t}}return r},o=e=>{let r=a(e);if(!r)return null;for(;t[n]?.type===`or`;){n+=1;let t=a(e);if(!t)return null;r={type:`or`,left:r,right:t}}return r},s=o(0);return!s||n!==t.length?null:s}function db(e){let t=cb(e.key);if(!t)return null;if(e.when!==void 0){let n=ub(e.when);return n?{command:e.command,shortcut:t,whenAst:n}:null}return{command:e.command,shortcut:t}}function fb(e){let t=[];for(let n of e){let e=db(n);e&&t.push(e)}return t.slice(-256)}var pb=fb(ob);function mb(e){if(e.length===0)return[...pb];let t=new Set(e.map(e=>e.command)),n=[...pb.filter(e=>!t.has(e.command)),...e];return n.length<=256?n:n.slice(-256)}var hb=`p4-context://v1/`,gb=/^[a-z][a-z0-9-]{0,39}$/,_b=/^[a-z0-9_-]{1,128}$/i,vb=new RegExp(String.raw`(!?)\[([^\]\n]{0,${512}})\]\((${hb}[^\s)]{1,200})\)`,`g`);function yb(e,t){return`${hb}${e}/${t}`}function bb(e){if(!e.startsWith(hb))return null;let t=e.slice(hb.length).split(`/`);if(t.length!==2)return null;let[n,r]=t;return!gb.test(n)||!_b.test(r)?null:{kind:n,contextId:r}}function xb(e,t){let n=e.replace(/[[\]\\\r\n]/g,` `).replace(/\s+/g,` `).trim(),r=200,i=n.charCodeAt(r-1),a=n.charCodeAt(r);i>=55296&&i<=56319&&a>=56320&&a<=57343&&r--;let o=n.slice(0,r);return o.length>0?o:t}function Sb(e){let t=2166136261,n=2646966556;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619)>>>0,n^=e.charCodeAt(e.length-1-r),n=Math.imul(n,16777619)>>>0;return`${t.toString(16).padStart(8,`0`)}${n.toString(16).padStart(8,`0`)}`}function Cb(e){return _b.test(e)?e:`${e.replace(/[^a-z0-9_-]+/gi,`-`).replace(/^-+|-+$/g,``).slice(0,48)||`ctx`}-${Sb(e)}`}function wb(e,t){return Cb(`${`${e}_`}${t}`)}function Tb(e,t){let n=xb(t,`thread`);return{version:1,kind:`thread`,contextId:wb(`thread`,e.threadId),label:n,environmentId:e.environmentId,threadId:e.threadId,title:n}}function Eb(e){let t=xb(e.label,e.kind),n=yb(e.kind,e.contextId);return`${e.kind===`image`?`!`:``}[${t}](${n})`}function Db(e){let t=[];if(!e.includes(`](p4-context:`))return t;for(let n of e.matchAll(vb)){let e=bb(n[3]);e&&t.push({...e,label:xb(n[2],e.kind),image:n[1]===`!`,source:n[0],start:n.index,end:n.index+n[0].length})}return t}var Ob=`[User attached one or more files without additional text. Respond using the conversation context and the attached files.]`;function kb(e){return e.replace(/^Ultrathink:\s*/i,``)===Ob}function Ab(e){return kb(e)?e.slice(0,-121).trimEnd():e}function jb(e,t){if(!t)return e;let n=e.trim();return n.length===0?Ob:/^Ultrathink:\s*$/i.test(n)?`Ultrathink:\n${Ob}`:e}function Mb(e,t){let n=``,r=0;for(let i of Db(e))n+=e.slice(r,i.start)+t(i),r=i.end;return n+e.slice(r)}function Nb(e,t,n){if(e===void 0)return;let r=new Map(t.flatMap((e,t)=>{let r=n[t];return e.id!==void 0&&r!==void 0?[[e.id,r.id]]:[]}));return{...e,records:e.records.map(e=>(e.kind===`image`||e.kind===`file`)&&`attachmentId`in e?{...e,attachmentId:r.get(e.attachmentId)??e.attachmentId}:e)}}function Pb(e,t){let n=`${e}_`;return t.startsWith(n)?t.slice(n.length):t}function Fb(e){return Eb({kind:e.kind,contextId:e.contextId,label:e.label})}function Ib(e){return Array.from(new Set(Db(e).map(e=>e.contextId)))}function Lb(e){return Mb(e,()=>``)}function Rb(e){return e===void 0||e===` `||e===`
3
+ `||e===` `||e===`\r`}function zb(e,t,n){let r=Math.max(0,Math.min(e.length,Math.floor(t.start))),i=Math.max(r,Math.min(e.length,Math.floor(t.end))),a=!Rb(e[r-1]);return{start:r,end:e[i]===` `?i+1:i,text:`${a?` `:``}${n.map(Fb).join(` `)} `}}function Bb(e,t,n){let r=zb(e,{start:t,end:t},[n]);return{prompt:`${e.slice(0,r.start)}${r.text}${e.slice(r.end)}`,cursor:r.start+r.text.length}}function Vb(e,t){return Bb(e,e.length,t).prompt}function Hb(e,t){let n=Db(e).filter(e=>e.contextId===t);if(n.length===0)return{prompt:e,cursor:e.length};let r=e,i=e.length;for(let e of n.reverse()){let{start:t,end:n}=e;r[n]===` `?n+=1:r[t-1]===` `&&--t,r=`${r.slice(0,t)}${r.slice(n)}`,i=t}return i>=r.length&&(r=r.trimEnd(),i=r.length),{prompt:r,cursor:i}}function Ub(e,t){let n=new Set(Ib(e)),r=e;for(let e of t)n.has(e.contextId)||(n.add(e.contextId),r=Vb(r,e));return r}var Wb=4e3,Gb=4e3;function Kb(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}function qb(e){return e.replace(/\r\n/g,`
4
+ `).replace(/^\n+|\n+$/g,``)}function Jb(e){let t=e.pageUrl.trim(),n=e.tagName.trim().toLowerCase();if(t.length===0||n.length===0)return null;let r=e.source??e.stack[0]??null;return{pageUrl:t,pageTitle:e.pageTitle?.trim()??null,tagName:n,selector:e.selector?.trim()||null,htmlPreview:Kb(qb(e.htmlPreview),Wb),componentName:e.componentName?.trim()||null,source:r?{functionName:r.functionName?.trim()||null,fileName:r.fileName?.trim()||null,lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null}:null,styles:Kb(qb(e.styles),Gb)}}function Yb(e,t,n){return{id:t,pageUrl:e.pageUrl,pageTitle:e.pageTitle,comment:``,elements:[{id:t,element:{...e,stack:[],pickedAt:n},rect:{x:0,y:0,width:0,height:0}}],regions:[],strokes:[],styleChanges:[],screenshot:null,createdAt:n}}var Xb=(e,t)=>{let n=new URL(e);return n.pathname=t,n.search=``,n.hash=``,n.toString()},Zb=gi(sa,Ys(sa,e=>[...e,`dpop`,`expo-session`])),Qb=Br(`effect/http/FetchHttpClient/Fetch`,{defaultValue:()=>globalThis.fetch}),$b=class extends qc()(`effect/http/FetchHttpClient/RequestInit`){},ex=Hy(Ga(Ay((e,t,n,r)=>{let i=r.getRef(Qb),a=na(r.context,$b)??{},o=a.headers?cl(vi(a.headers),e.headers):e.headers;o[`content-length`]&&(o=Pr(o,`content-length`));let s=r=>Ys(ns({try:()=>i(t,{...a,method:e.method,headers:o,body:r,duplex:typeof ReadableStream<`u`&&r instanceof ReadableStream?`half`:void 0,signal:n}),catch:t=>new fo({reason:new Dr({request:e,cause:t})})}),t=>ri(e,t));switch(e.body._tag){case`Raw`:case`Uint8Array`:return s(e.body.body);case`FormData`:return s(e.body.formData);case`Stream`:return Ms(ci(e.body.stream),s)}return s(void 0)}))),tx=(e,t)=>Qa(function*(){let n=yield*Uc(),r=t.httpClient.pipe(t?.baseUrl===void 0?no:My(Ra(t.baseUrl.toString())));function i(e,t,a,o,s){if(s===-1)return r.execute(a);let c=n.mapUnsafe.get(o[s]);return c===void 0?i(e,t,a,o,s-1):c({endpoint:t,group:e,request:a,next(n){return i(e,t,n,o,s-1)}})}po(e,{predicate:t?.predicate,onGroup(e){t.onGroup?.(e)},onEndpoint(e){let{group:n,endpoint:r,errors:a,successes:o,mergedAnnotations:s}=e,c=Oi(s),l=sx(r.path,r.params),u={orElse:Dx},d=new Map;for(let[e,t]of a.entries()){let n=px(t);for(let[t,r]of n.entries())dx(d,e,t,cx(r,c.error,c.headers))}for(let[e,t]of d.entries()){let n=fx(t);u[e]=e=>Ms(es(n(e),t=>Jr(Hr(Ma(new fo({reason:new ga({request:e.request,response:e})})),t))),Zr)}let f=new Map;for(let[e,t]of o.entries()){let n=px(t);for(let[t,r]of n.entries())dx(f,e,t,cx(r,c.success,c.headers))}for(let e of _x(r)){let t=gx(e)?e.schema:e;dx(f,ki(e),t.contentType,vx(e,c.success,c.headers))}for(let[e,t]of f.entries())u[e]=fx(t);let p=Gm(r.params,e=>Ar(e,c.params)),m=oo(r),h=xa(m)?Ar(vo(r.method)?kx(m,r.method):Rr(m),c.payload):void 0,g=Gm(r.headers,e=>Ar(e,c.headers)),_=Gm(r.query,e=>Ar(e,c.query)),v=Array.from(e.middleware,e=>`${e.key}/Client`),y=ii(function*(e){let a=Ua(r.method)(r.path);if(e!==void 0){if(p!==void 0){let t=yield*p(e.params);a=Pi(a,l(t))}if(h!==void 0){if(vo(r.method)){if(e.payload instanceof FormData)a=ll(a,e.payload);else{let t=yield*h(e.payload);a=Xa(a,t)}}else{let t=yield*h(e.payload);a=zi(a,t)}}if(g!==void 0){let t=yield*g(e.headers);a=li(a,t)}if(_!==void 0){let t=yield*_(e.query);a=zi(a,t)}}let o=yield*i(n,r,a,v,v.length-1);if(e?.responseMode===`response-only`)return o;let s=(u[o.status]??u.orElse)(o,e?.sseOptions),c=yield*t.transformResponse===void 0?s:t.transformResponse(s);return e?.responseMode===`decoded-and-response`?[c,o]:c});t.onEndpoint({...e,endpointFn:y})}})}),nx=(e,t)=>Ms(wy,n=>rx(e,{...t,httpClient:t?.transformClient?t.transformClient(n):n})),rx=(e,t)=>{let n={};return tx(e,{...t,onGroup({group:e}){e.topLevel||Bi(n,e.identifier,{})},onEndpoint({endpoint:e,endpointFn:t,group:r}){Bi(r.topLevel?n:n[r.identifier],e.identifier,t)}}).pipe(ic(n))},ix=(e,t)=>{let n={};return tx(e,{...t,predicate:({group:e})=>e.identifier===t.group,onEndpoint({endpoint:e,endpointFn:t}){Bi(n,e.identifier,t)}}).pipe(Ys(()=>n))},ax=(e,t)=>{let n={};return po(e,{onGroup({group:e}){e.topLevel||Bi(n,e.identifier,{})},onEndpoint({group:e,endpoint:r,mergedAnnotations:i}){let a=Oi(i),o=sx(r.path,r.params),s=r.params===void 0?void 0:il(r.params,a.params),c=r.query===void 0?void 0:il(r.query,a.query);Bi(e.topLevel?n:n[e.identifier],r.identifier,e=>{let n=e?.params,i=n===void 0?r.path:o(s===void 0?n:s(n)),a=e?.query===void 0?void 0:c===void 0?e.query:c(e.query),l=a===void 0?Os:Vi(a);if(t?.baseUrl===void 0){let e=qi(l);return e===``?i:`${i}?${e}`}let u=new URL(Ra(Ir(i),t.baseUrl.toString()).url);for(let[e,t]of l.params)t!==void 0&&u.searchParams.append(e,t);return u.toString()})}}),n},ox=/(\/?):(\w+)(\?)?/g,sx=(e,t)=>{if(t===void 0||!e.includes(`:`))return t=>e;let n=Qy(t);return t=>e.replace(ox,(e,r,i,a)=>{if(n!==void 0&&!n.has(i))return e;let o=t[i];if(o===void 0){if(a!==void 0)return``;throw Error(`Missing path parameter: ${i}`)}return`${r}${encodeURIComponent(o)}`})};function cx(e,t,n){let r=e.some(e=>go(e)||uc(e.ast)!==void 0),i=r?Rr(e.map(e=>ux(e,t,n))):Tx(e),a=Qr(i,t);return e=>Ms(e.arrayBuffer,r?t=>a({body:t,headers:e.headers}):a)}var lx=fs({body:Wc,headers:Wc});function ux(e,t,n){let r=uc(e.ast),i=r===void 0?go(e)?{body:e.schema,headers:e.headers,toValue:da}:{body:e,headers:Wc,toValue:e=>e.body}:{body:r.bodyCodec,headers:r.headersCodec,toValue:r.transformation.decode},a=Qr(Ex(i.body).pipe(ia(i.body)),t),o=Qr(i.headers,n);return lx.pipe(ia(go(e)?e:jo(e),Ea({decode:e=>$s({body:a(e.body),headers:o(e.headers)}).pipe(Ys(i.toValue),xs(e=>e.issue)),encode:(e,t)=>Zr(new ta({message:`Decode only schema`},e,t))})))}function dx(e,t,n,r){let i=xo(n),a=e.get(t);a===void 0?e.set(t,[{contentType:i,decode:r}]):a.push({contentType:i,decode:r})}function fx(e){let t=e[0];return e.length===1&&t!==void 0?t.decode:(t,n)=>{let r=xo(t.headers[`content-type`]??``),i=e.find(e=>e.contentType===r);return i===void 0?mx(t,r,e):i.decode(t,n)}}function px(e){let t=new Map;for(let n of e){let e=go(n)?n.schema:n,r=xi(e.ast)?``:xo(ai(n).contentType),i=t.get(r);i===void 0?t.set(r,[n]):i.push(n)}return t}function mx(e,t,n){let r=Array.from(new Set(n.map(e=>e.contentType))).join(`, `);return Zr(new fo({reason:new Di({request:e.request,response:e,description:`Unsupported response content-type for status ${e.status}: ${t||`<missing>`}. Expected one of: ${r}`})}))}var hx=`effect/http-api/stream/failure`,gx=e=>go(e);function _x(e){let t=[];for(let n of e.success){let e=go(n)?n.schema:n;so(e)&&t.push(n)}return t}function vx(e,t,n){let r=gx(e),i=r?e.schema:e,a=$a(i)?void 0:{declaration:i,decoder:yx(i,t)},o=(e,t)=>Ys(Uc(),n=>zs(a===void 0?e.stream:bx(e.stream,a.declaration,a.decoder(t)),n));if(!r)return o;let s=Qr(e.headers,n);return(e,t)=>Ms(s(e.headers),n=>Ys(o(e,t),e=>da({body:e,headers:n})))}function yx(e,t){let n=Rr([fs({id:_o(z),event:bs(hx),data:za(Xs(_a(e.error,ts())))}),e.events]),r=Em(n,void 0,t);return e=>e===void 0?r:Em(n,e,t)}function bx(e,t,n){let r=Ni(e.pipe(Po,ra(n)),e=>dc(()=>{let t;return ji(()=>t===void 0?Ms(e,e=>{for(let n=0;n<e.length;n++){let r=e[n];if(r.event===hx&&ni(r.data)){if(n===0)return Jr(r.data);t=r.data,e=e.slice(0,n);break}}return Ga(e)}):Jr(t))}));return t.sseMode===`data`?$c(r,e=>e.data):r}var xx=ui(globalThis.ArrayBuffer,{expected:`ArrayBuffer`}),Sx=xx.pipe(ia(Fo,Qc({decode(e){return new Uint8Array(e)},encode(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}))),Cx=xx.pipe(ia(z,Qc({decode(e){return new TextDecoder().decode(e)},encode(e){let t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}))),wx=Cx.pipe(ia(Rr([bs(``).pipe(ia(Jc,Qc({decode:()=>void 0,encode:()=>``}))),ka])));function Tx(e){return Rr(e.map(t));function t(e){return Ex(e).pipe(ia(e))}}function Ex(e){switch(Wa(e.ast)._tag){case`Json`:return ys(wo(e.ast))?wx.pipe(ia(Wc,Qc({decode:e=>e===void 0?null:e,encode:e=>e===null?void 0:e}))):wx;case`FormUrlEncoded`:return Cx.pipe(ia(cs,Qc({decode:e=>Vi(new URLSearchParams(e)),encode:qi})));case`Uint8Array`:return Sx;case`Text`:return Cx}}var Dx=e=>Zr(new fo({reason:new Di({request:e.request,response:e})})),Ox=Zi(kc);function kx(e,t){return Rr(e.map(e=>jx(e,t)))}var Ax=new WeakMap;function jx(e,t){let n=e.ast,r=Ax.get(n);if(r!==void 0)return r;let i=Na(n,t),a=Ox.pipe(ia(e,Ea({decode(e,t){return Zr(new ta({message:`Encode only schema`},e,t))},encode(e,t){switch(i._tag){case`Multipart`:return Zr(new ta({message:`Payload must be a FormData`},e,t));case`Json`:try{let t=JSON.stringify(e);return Ga(bc(t,i.contentType))}catch{return Zr(new Rs({expected:`a JSON-serializable request body`},e,t))}case`Text`:return typeof e==`string`?Ga(bc(e,i.contentType)):Zr(new Rs({message:`Expected a string`},e,t));case`FormUrlEncoded`:return Ba(e)?Ga(Ao(Vi(e),i.contentType)):Zr(new Rs({message:`Expected a record`},e,t));case`Uint8Array`:return e instanceof Uint8Array?Ga(ws(e,i.contentType)):Zr(new Rs({message:`Expected a Uint8Array`},e,t))}}})));return Ax.set(n,a),a}var Mx=Pa(wc),Nx=class extends Ts(`RemoteEnvironmentAuthFetchError`){},Px=class extends Ts(`RemoteEnvironmentAuthInvalidJsonError`){},Fx=class extends Ts(`RemoteEnvironmentAuthUndeclaredStatusError`){constructor(e,t){super({message:`Remote environment endpoint ${e} returned undeclared status ${t}.`,requestUrl:e,status:t})}},Ix=class extends Ts(`RemoteEnvironmentAuthTimeoutError`){constructor(e,t){super({message:`Remote environment endpoint ${e} timed out after ${t}ms.`,requestUrl:e,timeoutMs:t})}},Lx=e=>Mr(ex.pipe(di(Ka(Qb,e))),Zb),Rx=e=>{let t=new URL(e);return t.pathname=`/`,t.search=``,t.hash=``,t.toString()},zx=e=>nx(Mc,{baseUrl:Rx(e)}),Bx=(e,t)=>Ms(wy,n=>ix(Mc,{httpClient:n,group:t,baseUrl:Rx(e)})),Vx=e=>ax(Mc,{baseUrl:Rx(e)}),Hx=(e,t)=>{if(t instanceof Ix||Mx(t))return Zr(t);if(co(t))return Zr(new Px({message:`Remote environment endpoint returned an invalid response from ${e}.`,cause:t}));if(is(t)&&t.response!==void 0){let n=t.response;return n.status<200||n.status>=300?Zr(new Fx(e,n.status)):Zr(new Px({message:`Remote environment endpoint returned an invalid response from ${e}.`,cause:t}))}return Zr(new Nx({message:`Failed to fetch remote environment endpoint ${e} (${String(t)}).`,cause:t}))},Ux=(e,t,n)=>n.pipe(pa(sc(t)),Ms(ms({onNone:()=>Zr(new Ix(e,t)),onSome:Ga})),gs(t=>Hx(e,t))),Wx=1e4,Gx=ua(`clientRuntime.environment.fetchRemoteEnvironmentDescriptor`)(function*(e){let t=yield*Bx(e.httpBaseUrl,`metadata`);return yield*Ux(Xb(e.httpBaseUrl,`/.well-known/p4/environment`),e.timeoutMs??Wx,t.descriptor())});function Kx(e,t){return{environmentId:e,projectId:t}}function qx(e,t){return{environmentId:e,threadId:t}}function Jx(e){let t=`projectId`in e?e.projectId:e.threadId;return`${e.environmentId}:${t}`}function Yx(e){return Jx(e)}function Xx(e){return Jx(e)}function Zx(e){let t=e.indexOf(`:`);return t<=0||t>=e.length-1?null:{environmentId:Lr.make(e.slice(0,t)),localId:e.slice(t+1)}}function Qx(e){let t=Zx(e);return t?{environmentId:t.environmentId,projectId:Za.make(t.localId)}:null}function $x(e){let t=Zx(e);return t?{environmentId:t.environmentId,threadId:_c.make(t.localId)}:null}var eS=qo.make(`codex`);function tS(e,t){return e===t.instanceId?`thread.model-selection.set`:`provider.switch`}function nS(e){let t=e.trim(),n=t.replace(/^Claude[ -]+(?=(?:Opus|Sonnet|Haiku|Fable)\b)/i,``);if(n!==t)return n;let r=/^(?:GPT|Codex)[ -]+(\d+(?:\.\d+)*)(?:[ -]+Codex)?[ -]+(Astra|Sol|Luna|Terra)(.*)$/i.exec(t);if(r){let e=r[2];return`${e[0].toUpperCase()}${e.slice(1).toLowerCase()} ${r[1]}${r[3]}`}return t.replace(/^Codex\s+(?=(?:Astra|Sol|Luna|Terra)\b)/i,``)}function rS(e){return{optionDescriptors:e.optionDescriptors.map(lS)}}function iS(e,t){return e?.find(e=>e.id===t)?.value}function aS(e,t){return iS(e,t)}function oS(e,t){let n=aS(e,t);return typeof n==`string`?n:void 0}function sS(e,t){return oS(e?.options,t)}function cS(e,t){let n=DS(t);return n?e.options.length===0?n:e.promptInjectedValues?.includes(n)&&e.options.some(e=>e.id===n)?e.options.find(e=>e.isDefault)?.id:e.options.some(e=>e.id===n)?n:e.currentValue??e.options.find(e=>e.isDefault)?.id:e.currentValue??e.options.find(e=>e.isDefault)?.id}function lS(e){return e.type===`select`?{...e,options:[...e.options],...e.promptInjectedValues?{promptInjectedValues:[...e.promptInjectedValues]}:{}}:{...e}}function uS(e){return{...e}}function dS(e,t){if(e.type===`boolean`)return typeof t==`boolean`?{...e,currentValue:t}:e;let n=typeof t==`string`?cS(e,t):cS(e,e.currentValue);if(!n){let{currentValue:t,...n}=e;return n}return{...e,currentValue:n}}function fS(e){let{caps:t,selections:n}=e;return(t.optionDescriptors??[]).map(lS).map(e=>dS(e,iS(n,e.id)??e.currentValue))}function pS(e,t,n){if(t&&n&&t.instanceId===n.instanceId&&t.model===n.model&&!t.options?.some(t=>t.id===e))return iS(n.options,e)}function mS(e,t,n){if(!e)return;let r=t?.options?.some(t=>t.id===e.id),i=pS(e.id,t,n);if(i!==void 0)return i;if(e.id!==`variant`||!t||r)return e.type===`boolean`||e.currentValue?e.currentValue:e.options.find(e=>e.isDefault)?.id}function hS(e,t,n){if(!e)return;if(e.type===`boolean`)return typeof e.currentValue==`boolean`?e.currentValue?`On`:`Off`:void 0;let r=mS(e,t,n);return e.options.find(e=>e.id===r)?.label??(pS(e.id,t,n)==="default"?`Default`:e.id===`variant`?`Unknown`:void 0)}function gS(e){if(!e||e.length===0)return;let t=[];for(let n of e){let e=mS(n);(typeof e==`string`||typeof e==`boolean`)&&t.push({id:n.id,value:e})}return t.length>0?t:void 0}function _S(e,t){if(!t||t.length===0)return;let n=new Set(t.map(e=>e.id)),r=gS(e)?.filter(e=>n.has(e.id));return r&&r.length>0?r:void 0}function vS(e){return typeof e==`string`&&/\bultrathink\b/i.test(e)}function yS(e){return e.replace(/^gpt/i,`GPT`).replace(/-([a-z])/g,(e,t)=>`-`+t.toUpperCase())}function bS(e){let t=e.lastIndexOf(`/`)+1,n=e.slice(0,t),r=e.slice(t);return/^gpt-\d/i.test(r)?n+yS(r):/^(claude-(opus|sonnet|haiku|fable)|gemini|grok|composer)-\d/i.test(r)?n+r.replace(/^(claude-[a-z]+-\d+)-(\d{1,2})(?=-|\[|$)/i,`$1.$2`).split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):e}function xS(e,t=eS){let n=SS(e);if(!n)return null;let r=Nr[t]??{},i=Object.prototype.hasOwnProperty.call(r,n)?r[n]:void 0;return typeof i==`string`?i:n}function SS(e){return typeof e==`string`&&e.trim()||null}var CS=hi(Va);function wS(e){if(!Array.isArray(e))return[];let t=[],n=new Set;for(let r of e){let e=typeof r==`string`?{slug:r}:typeof r==`object`&&r?r:null;if(!e)continue;let i=SS(typeof e.slug==`string`?e.slug:null);if(!i||n.has(i))continue;n.add(i);let a=(typeof e.name==`string`?SS(e.name):null)??i,o=e.capabilities===void 0||e.capabilities===null?null:Hs(CS(e.capabilities));t.push({slug:i,name:a,capabilities:o?rS({optionDescriptors:o.optionDescriptors??[]}):null})}return t}function TS(e){let t=e.capabilities?.optionDescriptors??[],n=e.name===e.slug?void 0:e.name;return!n&&t.length===0?e.slug:{slug:e.slug,...n?{name:n}:{},...t.length>0?{capabilities:rS({optionDescriptors:t})}:{}}}function ES(e,t,n){if(typeof t!=`string`)return null;let r=t.trim();if(!r)return null;let i=n.find(e=>e.slug===r);if(i)return i.slug;let a=n.find(e=>e.name.toLowerCase()===r.toLowerCase());if(a)return a.slug;let o=n.find(e=>e.aliases?.some(e=>e.toLowerCase()===r.toLowerCase()));if(o)return o.slug;let s=xS(r,e);if(!s)return null;let c=n.find(e=>e.slug===s);return c?c.slug:null}function DS(e){return typeof e==`string`&&e.trim()||null}function OS(e){return e.map(uS)}function kS(e,t,n){let r=n?OS(n):[],i={instanceId:e,model:t};return r.length>0?{...i,options:r}:i}function AS(e,t){let n=DS(t);if(!n)return null;let r=fS({caps:e});for(let e of r)if(e.type===`select`&&e.promptInjectedValues?.includes(n))return n;return null}function jS(e,t){let n=e.trim();return!n||t!==`ultrathink`||/^\/[^\s/]+(?:\s|$)/u.test(n)||n.startsWith(`Ultrathink:`)?n:`Ultrathink:\n${n}`}var MS=class extends zc()(`LocalStorageOperationError`,{operation:Oo([`read`,`decode`,`encode`,`update`,`write`,`remove`,`notify`]),storageKey:z,cause:ts()}){get message(){return`Failed to ${this.operation} local storage item ${this.storageKey}.`}},NS=(()=>{let e=new Map;return{clear:()=>e.clear(),getItem:t=>e.get(t)??null,key:t=>Ja(e).at(t)??null,get length(){return e.size},removeItem:t=>e.delete(t),setItem:(t,n)=>e.set(t,n)}})(),PS=()=>typeof window<`u`?window.localStorage:NS,FS=e=>{try{return PS().getItem(e)}catch(t){throw new MS({operation:`read`,storageKey:e,cause:t})}},IS=(e,t,n)=>{try{return Wi(za(t))(n)}catch(t){throw new MS({operation:`decode`,storageKey:e,cause:t})}},LS=(e,t,n)=>{try{return il(za(t))(n)}catch(t){throw new MS({operation:`encode`,storageKey:e,cause:t})}},RS=(e,t)=>{let n=FS(e);return n===null?null:IS(e,t,n)},zS=(e,t,n)=>{let r=LS(e,n,t);try{PS().setItem(e,r)}catch(t){throw new MS({operation:`write`,storageKey:e,cause:t})}},BS=e=>{try{PS().removeItem(e)}catch(t){throw new MS({operation:`remove`,storageKey:e,cause:t})}},VS=`p4code:local_storage_change`;function HS(e){if(typeof window<`u`)try{window.dispatchEvent(new CustomEvent(VS,{detail:{key:e}}))}catch(t){throw new MS({operation:`notify`,storageKey:e,cause:t})}}function US(e,t,n){let r=(0,V.useCallback)(()=>{try{return FS(e)}catch(e){return console.error(`[LOCALSTORAGE] Could not read stored value.`,e),null}},[e]),i=(0,V.useCallback)(t=>{let n=n=>{n.key===e&&t()},r=n=>{n.detail.key===e&&t()};return window.addEventListener(`storage`,n),window.addEventListener(VS,r),()=>{window.removeEventListener(`storage`,n),window.removeEventListener(VS,r)}},[e]),a=(0,V.useSyncExternalStore)(i,r,r);return[(0,V.useMemo)(()=>{if(a===null)return t;try{return IS(e,n,a)}catch(e){return console.error(`[LOCALSTORAGE] Could not decode stored value.`,e),t}},[t,e,n,a]),(0,V.useCallback)(r=>{try{let i;if(typeof r==`function`){let a=t;try{a=RS(e,n)??t}catch(e){console.error(`[LOCALSTORAGE] Could not read stored value.`,e)}try{i=r(a)}catch(t){throw new MS({operation:`update`,storageKey:e,cause:t})}}else i=r;i===null?BS(e):zS(e,i,n),HS(e)}catch(e){console.error(`[LOCALSTORAGE] Could not update stored value.`,e)}},[t,e,n])]}var WS=`~effect/reactivity/AsyncResult`,GS=e=>ol(e,WS),KS={[WS]:{E:no,A:no},pipe(){return Cr(this,arguments)},[oa](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case`Initial`:return!0;case`Success`:return Gi(this.value,e.value);case`Failure`:return Gi(this.cause,e.cause)}},[ya](){let e=Ii(`${this._tag}:${this.waiting}`);return this._tag===`Initial`?e:ei(e)(this._tag===`Success`?_i(this.value):_i(this.cause))}},qS=e=>e._tag===`Success`?$S(e.value):tC(e.cause),JS=(e,t)=>e._tag===`Success`?$S(e.value):nC(e.cause,{previous:t}),YS=e=>e._tag===`None`?ZS(!0):iC(e.value),XS=e=>e._tag!==`Initial`,ZS=(e=!1)=>{let t=Object.create(KS);return t._tag=`Initial`,t.waiting=e,t},QS=e=>e._tag===`Success`,$S=(e,t)=>{let n=Object.create(KS);return n._tag=`Success`,n.value=e,n.waiting=t?.waiting??!1,n.timestamp=t?.timestamp??Date.now(),n},eC=e=>e._tag===`Failure`,tC=(e,t)=>{let n=Object.create(KS);return n._tag=`Failure`,n.cause=e,n.previousSuccess=t?.previousSuccess??Co(),n.waiting=t?.waiting??!1,n},nC=(e,t)=>tC(e,{previousSuccess:yc(t.previous,e=>QS(e)?Vc(e):eC(e)?e.previousSuccess:Co()),waiting:t.waiting}),rC=(e,t)=>nC(Ma(e),t),iC=wi(e=>GS(e[0]),(e,t)=>{if(e.waiting)return t?.touch?aC(e):e;let n=Object.assign(Object.create(KS),e);return n.waiting=!0,t?.touch&&QS(n)&&(n.timestamp=Date.now()),n}),aC=e=>QS(e)?$S(e.value,{waiting:e.waiting}):e,oC=wi(2,(e,t)=>e._tag===`Failure`?nC(e.cause,{previous:t,waiting:e.waiting}):e),sC=e=>e._tag===`Success`?Vc(e.value):e._tag===`Failure`?vs(e.previousSuccess,e=>e.value):Co(),cC=wi(2,(e,t)=>Wo(sC(e),t)),lC=e=>Xo(sC(e),()=>new Da(`AsyncResult.getOrThrow: no value found`)),uC=e=>{switch(e._tag){case`Success`:return Vo(e.value);case`Failure`:return Js(e.cause);default:return lc(new Da)}},dC=wi(2,(e,t)=>{switch(e._tag){case`Initial`:return e;case`Failure`:return tC(e.cause,{previousSuccess:vs(e.previousSuccess,e=>$S(t(e.value),e)),waiting:e.waiting});case`Success`:return $S(t(e.value),e)}}),fC=`~effect/reactivity/AtomRegistry`,pC=e=>ol(e,fC),mC=e=>new TC(e?.initialValues,e?.scheduleTask,e?.timeoutResolution,e?.defaultIdleTTL),hC=qc(fC),gC=wi(2,(e,t)=>Sr(n=>ji(()=>{let r=qr(),i=kr(r.context,fc),a=e.subscribe(t,e=>$o(n,e),{immediate:!0});return Ci(i,dc(a))}))),_C=wi(e=>pC(e[0]),(e,t,n)=>{let r=n?.suspendOnWaiting??!1;return Rc(n=>{let i=e.get(t);if(i._tag!==`Initial`&&!(r&&i.waiting))return n(uC(i));let a=e.subscribe(t,e=>{e._tag!==`Initial`&&!(r&&e.waiting)&&(n(uC(e)),a())});return dc(a)})}),vC=wi(2,(e,t)=>wr(dc(()=>e.mount(t)),e=>dc(e))),yC={immediate:!0},bC=e=>{e()},xC={};function SC(e,t){let n=xC;for(let r of e)try{t(r)}catch(e){n===xC&&(n=e)}if(n!==xC)throw n}var CC=`~effect-atom/atom/Atom/Serializable`,wC=e=>CC in e?e[CC].key:e,TC=class{[fC];timeoutResolution;defaultIdleTTL;scheduler;schedulerAsync;dispatcher;onNodeAdded;onNodeRemoved;constructor(e,t,n,r){if(this[fC]=fC,this.scheduler=new Mo(`sync`,t),this.schedulerAsync=new Mo(`async`,t),this.dispatcher=this.schedulerAsync.makeDispatcher(),this.defaultIdleTTL=r,this.timeoutResolution=n===void 0&&r!==void 0?Math.round(r/2):n??1e3,e!==void 0)for(let[t,n]of e){let e=t;for(;e.initialValueTarget;)e=e.initialValueTarget;this.ensureNode(e).setInitialValue(n)}}nodes=new Map;preloadedSerializable=new Map;timeoutBuckets=new Map;nodeTimeoutBucket=new Map;disposed=!1;getNodes(){return this.nodes}get(e){return this.ensureNode(e).value()}set(e,t){e.write(this.ensureNode(e).writeContext,t)}setSerializable(e,t){this.preloadedSerializable.set(e,t)}modify(e,t){let n=this.ensureNode(e),r=t(n.value());return e.write(n.writeContext,r[1]),r[0]}update(e,t){let n=this.ensureNode(e);e.write(n.writeContext,t(n.value()))}refresh=e=>{e.refresh===void 0?this.invalidateAtom(e):e.refresh(this.refresh)};subscribe(e,t,n){let r=this.ensureNode(e);n?.immediate?t(r.value()):r.state===DC.stale&&r.value();let i=r.subscribe(function(){t(r._value)});return()=>{i(),r.canBeRemoved&&this.scheduleNodeRemoval(r)}}mount(e){return this.subscribe(e,pc,yC)}atomHasTtl(e){return!e.keepAlive&&e.idleTTL!==0&&(e.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(e){let t=wC(e),n=this.nodes.get(t);if(n===void 0?(n=this.createNode(e),this.nodes.set(t,n),this.onNodeAdded?.(n)):this.atomHasTtl(e)&&this.removeNodeTimeout(n),typeof t==`string`&&this.preloadedSerializable.has(t)){let r=this.preloadedSerializable.get(t);this.preloadedSerializable.delete(t);let i=e[CC].decode(r),a=e;for(;a.initialValueTarget;)a=a.initialValueTarget;a===e?n.setValue(i):this.ensureNode(a).setInitialValue(i)}return n}createNode(e){if(this.disposed)throw Error(`Cannot access Atom ${e}: registry is disposed`);return e.keepAlive||this.scheduleAtomRemoval(e),new OC(this,e)}invalidateAtom=e=>{this.ensureNode(e).invalidate()};scheduleAtomRemoval(e){this.dispatcher.scheduleTask(()=>{let t=this.nodes.get(wC(e));t!==void 0&&t.canBeRemoved&&this.removeNode(t)},0)}scheduleNodeRemoval(e){this.dispatcher.scheduleTask(()=>{e.canBeRemoved&&this.removeNode(e)},0)}removeNode(e){this.atomHasTtl(e.atom)?this.setNodeTimeout(e):(this.nodes.delete(wC(e.atom)),e.remove(),this.onNodeRemoved?.(e))}setNodeTimeout(e){if(this.nodeTimeoutBucket.has(e))return;let t=e.atom.idleTTL??this.defaultIdleTTL;if(this.#e!==null&&(t-=this.#e,t<=0)){this.nodes.delete(wC(e.atom)),e.remove(),this.onNodeRemoved?.(e);return}let n=Math.ceil(t/this.timeoutResolution)*this.timeoutResolution,r=Date.now()+n,i=r-r%this.timeoutResolution+this.timeoutResolution,a=this.timeoutBuckets.get(i);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(i),i-Date.now())],this.timeoutBuckets.set(i,a)),a[0].add(e),this.nodeTimeoutBucket.set(e,i)}removeNodeTimeout(e){let t=this.nodeTimeoutBucket.get(e);if(t===void 0)return;this.nodeTimeoutBucket.delete(e),this.scheduleNodeRemoval(e);let[n,r]=this.timeoutBuckets.get(t);n.delete(e),n.size===0&&(clearTimeout(r),this.timeoutBuckets.delete(t))}#e=null;sweepBucket(e){let t=this.timeoutBuckets.get(e)[0];this.timeoutBuckets.delete(e),SC(t,this.removeIdleNode)}removeIdleNode=e=>{if(this.nodeTimeoutBucket.delete(e),e.canBeRemoved){this.nodes.delete(wC(e.atom)),this.onNodeRemoved?.(e),this.#e=e.atom.idleTTL??this.defaultIdleTTL;try{e.remove()}finally{this.#e=null}}};reset(){this.timeoutBuckets.forEach(([,e])=>clearTimeout(e)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear();let e=Array.from(this.nodes.values());this.nodes.clear();for(let t of e)t.state=DC.removed;SC(e,this.destroyNode)}destroyNode=e=>{e.remove(),this.onNodeRemoved?.(e)};dispose(){this.disposed=!0,this.reset()}},EC={alive:1,initialized:2,waitingForValue:4},DC={uninitialized:EC.alive|EC.waitingForValue,stale:EC.alive|EC.initialized|EC.waitingForValue,valid:EC.alive|EC.initialized,removed:0},OC=class{constructor(e,t){this.registry=e,this.atom=t,this.writeContext=new jC(e,this)}registry;atom;state=DC.uninitialized;lifetime;writeContext;preserveInitialValueOnBuild=!1;invalidatedDuringBuild=!1;failed=!1;parents=new Set;children=new Set;listeners=new Set;observedChildren=0;currentState(){switch(this.state){case DC.uninitialized:return`uninitialized`;case DC.stale:return`stale`;case DC.valid:return`valid`;default:return`removed`}}get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.size===0&&this.children.size===0&&this.state!==0}get building(){return this.lifetime!==void 0&&this.lifetime.reads!==void 0}get isObserved(){return!this.atom.lazy||this.listeners.size>0||this.observedChildren>0}childObserved(e){let t=this.isObserved;this.observedChildren+=e,t!==this.isObserved&&this.observedChanged(e)}observedChanged(e){for(let t of this.parents)t.childObserved(e)}_value=void 0;value(){for(;(this.state&EC.waitingForValue)!==0;)this.build();return this._value}build(){this.disposeLifetime(),this.invalidatedDuringBuild=!1;let e=AC(this);this.lifetime=e;let t,n=!1;try{t=this.atom.read(e),n=!0}finally{let t=e.reads;e.reads=void 0,this.lifetime===e&&(this.dropUnread(t),n||this.fail())}if(this.lifetime===e&&(this.state&EC.waitingForValue)!==0&&(this.preserveInitialValueOnBuild?(this.preserveInitialValueOnBuild=!1,this.failed=!1,this.state=DC.valid):this.setValue(t)),e.failure!==xC)throw e.failure}fail(){this.failed=!0;try{this.invalidateChildren()}catch{}}readTracked(e,t){let n=this.registry.ensureNode(e);this.parents.has(n)||(this.parents.add(n),n.children.add(this),this.isObserved&&n.childObserved(1));try{return n.value()}catch(e){if(t.reads===void 0||n.state!==DC.valid)throw e;return t.failure===xC&&(t.failure=e),n._value}finally{t.reads!==void 0&&!t.disposed&&t.reads.add(n)}}dropUnread(e){if(e.size===this.parents.size)return;let t=this.isObserved;for(let n of this.parents)e.has(n)||(this.parents.delete(n),n.children.delete(this),t&&n.childObserved(-1),n.canBeRemoved&&this.registry.scheduleNodeRemoval(n))}valueOption(){return(this.state&EC.initialized)===0?Co():Vc(this._value)}setInitialValue(e){(this.state&EC.initialized)===0?(this.preserveInitialValueOnBuild=!0,this.state=DC.stale,this._value=e,this.listeners.size>0&&this.announce()):this.setValue(e)}setValue(e){let t=this.failed;this.failed=!1;let n=(this.state&EC.initialized)!==0;if(this.state=DC.valid,n&&this.atom.equals(this._value,e)){t&&this.invalidateChildren();return}this._value=e;let r=xC;try{this.invalidateChildren()}catch(e){r=e}if(this.listeners.size>0)try{this.announce()}catch(e){r===xC&&(r=e)}if(r!==xC)throw r}announce(){NC.phase===MC.collect?NC.notify.add(this):this.notify()}invalidate(){if(this.state===DC.valid){this.state=DC.stale;try{this.disposeLifetime()}finally{this.propagate()}}else this.building&&NC.phase!==MC.collect?this.build():this.propagate()}propagate(){NC.phase===MC.collect?(this.building&&(this.invalidatedDuringBuild=!0),NC.stale.push(this)):this.isObserved?this.value():this.invalidateChildren()}invalidateChildren(){if(this.children.size===0)return;let e=xC;for(let t of Array.from(this.children))if(t.affectedBy(this))try{t.invalidate()}catch(t){e===xC&&(e=t)}if(e!==xC)throw e}affectedBy(e){if(this.state===DC.valid)return!0;let t=this.lifetime?.reads;return t===void 0?this.isObserved&&e.state===DC.valid:t.has(e)}notify(){NC.phase===MC.commit&&NC.notify.delete(this),SC(this.listeners,bC)}disposeLifetime(){let e=this.lifetime;e!==void 0&&(this.lifetime=void 0,e.dispose())}remove(){let e=this.isObserved;this.state=DC.removed,this.listeners.clear();try{this.disposeLifetime()}finally{let t=Array.from(this.parents);this.parents.clear(),SC(t,t=>{t.children.delete(this),e&&t.childObserved(-1),t.canBeRemoved&&this.registry.removeNode(t)})}}subscribe(e){let t=this.isObserved;return this.listeners.add(e),t||this.observedChanged(1),()=>{this.listeners.delete(e)&&!this.isObserved&&this.observedChanged(-1)}}},kC={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)return e();this.finalizers??=[],this.finalizers.push(e)},get(e){return this.disposed?this.node.registry.get(e):this.node.readTracked(e,this)},result(e,t){if(this.disposed||this.isFn)return this.resultOnce(e,t);let n=this.get(e);if(t?.suspendOnWaiting&&n.waiting)return Ho;switch(n._tag){case`Initial`:return Ho;case`Failure`:return Js(n.cause);case`Success`:return Ga(n.value)}},resultOnce(e,t){return Rc(n=>{let r=this.once(e);if(r._tag!==`Initial`&&!(t?.suspendOnWaiting&&r.waiting))return n(uC(r));let i=this.node.registry.subscribe(e,e=>{e._tag===`Initial`||t?.suspendOnWaiting&&e.waiting||(i(),n(uC(e)))},{immediate:!1});return dc(i)})},setResult(e,t){return this.disposed?Ho:(this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0}))},some(e){if(this.disposed||this.isFn)return this.someOnce(e);let t=this.get(e);return t._tag===`None`?Ho:Ga(t.value)},someOnce(e){return Rc(t=>{let n=this.once(e);if(Ks(n))return t(Ga(n.value));let r=this.node.registry.subscribe(e,e=>{oc(e)||(r(),t(Ga(e.value)))},{immediate:!1});return dc(r)})},once(e){return this.node.registry.get(e)},self(){return this.disposed?Co():this.node.valueOption()},refresh(e){this.disposed||this.node.registry.refresh(e)},refreshSelf(){this.disposed||this.node.invalidate()},mount(e){this.disposed||this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){this.disposed||this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){this.disposed||this.node.setValue(e)},set(e,t){this.disposed||this.node.registry.set(e,t)},stream(e,t){return this.disposed?Ws:Sr(n=>dc(()=>{this.subscribe(e,e=>$o(n,e),{immediate:!t?.withoutInitialValue})}))},streamResult(e,t){return this.stream(e,t).pipe(cc(XS),Vr(e=>e._tag===`Success`?Ga(e.value):Jr(e.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;let e=this.finalizers;this.finalizers=void 0,SC(e.reverse(),bC)}},AC=e=>{function t(n){return t.disposed||t.isFn?e.registry.get(n):e.readTracked(n,t)}return Object.setPrototypeOf(t,kC),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t.reads=new Set,t.failure=xC,t},jC=class{constructor(e,t){this.registry=e,this.node=t}registry;node;get(e){return this.registry.get(e)}set(e,t){return this.registry.set(e,t)}setSelf(e){return this.node.setValue(e)}refreshSelf(){return this.node.invalidate()}},MC={disabled:0,collect:1,commit:2},NC={phase:MC.disabled,depth:0,stale:[],notify:new Set};function PC(e){let t=NC.phase;NC.phase=MC.collect,NC.depth++;let n=xC;try{e()}catch(e){n=e}if(NC.depth===1){let{notify:e,stale:t}=NC,r=0;do{for(NC.phase=MC.collect;r<t.length;r++)try{FC(t[r])}catch(e){n===xC&&(n=e)}NC.phase=MC.commit;for(let t of e)try{t.notify()}catch(e){n===xC&&(n=e)}}while(r<t.length);NC.stale=[],e.clear()}if(NC.depth--,NC.phase=t,n!==xC)throw n}function FC(e){if(e.state===DC.valid){if(!e.invalidatedDuringBuild)return;e.invalidatedDuringBuild=!1,e.state=DC.stale,e.disposeLifetime()}e.value()}var IC=`~effect/reactivity/Atom`,LC=e=>ol(e,IC),RC=`~effect/reactivity/Atom/Writable`,zC=wi(2,(e,t)=>{let n=Fc(t),r=Zo(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?zo(n):void 0})}),BC=zC(0),VC={[IC]:IC,equals:Object.is,...Yr,toJSON(){return{_id:`Atom`,keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}}},HC={...VC,atom(e,t){let n=XC(e,t);return KC(e=>{let t=e.self(),r=e(this);return r._tag===`Success`?n(e,r.value):oC(r,t)})},fn(e,t){return arguments.length===0?(e,t)=>UC(this,e,t):UC(this,e,t)},pull(e,t){let n=BC($C(0));return pw(n,KC(r=>{let i=r.self(),a=r(this);return a._tag===`Success`?tw(r,fw(r,n,e,t),ZS(!0),a.value):oC(a,i)}))},subscriptionRef(e){return cw(BC(KC(t=>{let n=t.self(),r=t(this);if(r._tag!==`Success`)return oC(r,n);let i=typeof e==`function`?e(t):e;return qm(i)?i:tw(t,i,ZS(!0),r.value)})),(e,t)=>sw(e,t,lC(e(this))))}},UC=(e,t,n)=>{let[r,i,a]=dw(n?.reactivityKeys?(e,r)=>{let i=t(e,r);return mo(i)?Bm(i,n.reactivityKeys):Lc(i,Vm(n.reactivityKeys))}:t,n);return qC(t=>{t.get(a);let n=t.self(),i=t.get(e);return i._tag===`Success`?r(t,i.value):oC(i,n)},i)},WC={...VC,[RC]:RC},GC=e=>RC in e,KC=(e,t)=>{let n=Object.create(VC);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},qC=(e,t,n)=>{let r=Object.create(WC);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function JC(e,t){e.setSelf(t)}var YC=(e,t)=>{let n=XC(e,t);return`~effect/reactivity/Atom`in n?n:KC(n)},XC=(e,t)=>{if(typeof e==`function`&&!mo(e)&&!Bo(e)){let n=e;return function(e,r){let i=n(e);switch(typeof i){case`function`:case`object`:return i===null?i:ZC in i?ew(e,i,t,r):QC in i?aw(e,i,t,r):i;default:return i}}}return mo(e)?function(n,r){return ew(n,e,t,r)}:Bo(e)?function(n,r){return aw(n,e,t,r)}:$C(e)},ZC=`~effect/Effect`,QC=`~effect/Stream`,$C=e=>qC(function(t){return e},JC),ew=(e,t,n,r)=>tw(e,t,n?.initialValue===void 0?ZS():$S(n.initialValue),r,n?.uninterruptible);function tw(e,t,n,r=Xr(),i=!1){let a=e.self(),o=as();e.addFinalizer(()=>{Ps(r)(to(o,el))});let s,c=!1,l=nw(r.pipe(ja(fc,o),ja(hC,e.registry),ja(rc,e.registry.scheduler)),t,function(t){s=JS(t,a),c&&e.setSelf(s)},i);return c=!0,l!==void 0&&e.addFinalizer(l),s===void 0?a._tag===`Some`?YS(a):iC(n):s}function nw(e,t,n,r=!1){if(Do(t)){n(t);return}let i=Ps(e)(t);i.currentDispatcher?.flush();let a=i.pollUnsafe();if(a){n(a);return}let o=i.addObserver(n);function s(){o(),r||i.interruptUnsafe()}return s}function rw(e){let t=e?.memoMap??BC(YC(()=>al())),n=e=>LC(t)?e(t):t,r=Hm;function i(e){let t=Object.create(HC);t.keepAlive=!1,t.lazy=!0,t.refresh=void 0,t.factory=i;let a=hw(KC(typeof e==`function`?t=>Fa(e(t),r):()=>Fa(e,r)));return t.layer=a,t.read=function(e){let t=e(a);return ew(e,Ms(va,r=>$r(t,n(e),r)),{uninterruptible:!0})},t}i.memoMap=t,i.addGlobalLayer=e=>{r=Fa(r,di(e,Hm))};let a=BC(YC(e=>rl(t=>$r(Hm,n(e),Kr(t,fc))).pipe(Ys(Kr(Lm)))));return i.withReactivity=e=>t=>vw(t,n=>{let r=lC(n(a));return n.addFinalizer(r.registerUnsafe(e,()=>{n.refresh(t)})),n.subscribe(t,e=>n.setSelf(e)),n.once(t)},{initialValueTarget:t}),i}var iw=rw();iw.withReactivity;var aw=(e,t,n,r)=>ow(e,t,n?.initialValue===void 0?ZS():$S(n.initialValue),r);function ow(e,t,n,r=Xr()){let i=e.self();r=ja(r,hC,e.registry);let a=jr(n=>Ms(os(t.channel,n),t=>Ec({while:Mi,body:()=>t,step(t){e.setSelf($S(Ha(t),{waiting:!0}))}}))).pipe(es(t=>(Fs(t)?ma(e.self(),yc(sC),ms({onNone:()=>e.setSelf(rC(new Da,{previous:e.self()})),onSome:t=>e.setSelf($S(t))})):e.setSelf(nC(t,{previous:e.self()})),tc))),o=nw(r.pipe(ja(hC,e.registry),ja(rc,e.registry.scheduler)),a,pc,!1);return o!==void 0&&e.addFinalizer(o),i._tag===`Some`?YS(i):iC(n)}var sw=(e,t,n=Xr())=>qm(t)?(e.addFinalizer(Xm(t).pipe(Ji(t=>{for(let n=0;n<t.length;n++)e.setSelf(t[n]);return tc}),Wr(n))),Fi(n)(Zm(t))):t._tag===`Success`?ow(e,Xm(t.value),ZS(!0),n):t,cw=(e,t)=>{function n(t,n){let r=t.get(e);qm(r)?aa(th(r,n)):QS(r)&&aa(th(r.value,n))}return qC(n=>{let r=n(e);return qm(r)||QS(r)?t(n,r):r},n)},lw=Symbol.for(`effect/reactivity/atom/Atom/Reset`),uw=Symbol.for(`effect/reactivity/atom/Atom/Interrupt`);function dw(e,t){let n=BC($C([0,void 0])),r=t?.initialValue===void 0?ZS():$S(t.initialValue),i=t?.concurrent?BC(KC(e=>{let t=new Set;return e.addFinalizer(()=>t.forEach(e=>e.interruptUnsafe())),t})):void 0;function a(t,a){let o=i?t(i):void 0;t.isFn=!0;let[s,c]=t.get(n);if(s===0)return r;if(c===uw)return nC(Yi(),{previous:t.self()});let l=e(c,t);return ZC in l?(o&&(l=Ms(ul(l,{startImmediately:!0}),e=>{o.add(e);let t=Array.from(o);return e.addObserver(()=>o.delete(e)),Ys(js(t),e=>e[0])})),tw(t,l,r,a,!1)):ow(t,l,r,a)}function o(e,t){Ew(()=>{t===lw?e.set(n,[0,void 0]):t===uw?e.set(n,[e.get(n)[0]+1,uw]):e.set(n,[e.get(n)[0]+1,t]),e.refreshSelf()})}return[a,o,n]}var fw=(e,t,n,r)=>Ms(Ya(typeof n==`function`?n(e):n),n=>{let i=qr().context,a=ti(),o=ec(n,{onFailure(e){return Fs(e)?Fr(a)?Ga({done:!0,items:a}):Zr(new Da(`Atom.pull: no items`)):Jr(e)},onSuccess(e){let t;return r?.disableAccumulation?t=e:(t=ca(a,e),a=t),Ga({done:!1,items:t})}}),s=new Set;return e.addFinalizer(()=>{for(let e of s)e()}),e.once(t),e.subscribe(t,()=>{e.setSelf(YS(e.self()));let t;t=nw(i,o,n=>{t&&s.delete(t);let r=JS(n,e.self()),i=s.size>0;e.setSelf(i?iC(r):r)}),t&&s.add(t)}),o}),pw=(e,t)=>qC(t.read,function(t,n){t.set(e,t.get(e)+1)}),mw=typeof WeakRef>`u`||typeof FinalizationRegistry>`u`?e=>{let t=Gs();return function(n){let r=_s(t,n);if(r._tag===`Some`)return r.value;let i=e(n);return So(t,n,i),i}}:e=>{let t=Gs(),n=new FinalizationRegistry(e=>{let n=_s(t,e);n._tag===`Some`&&n.value.deref()===void 0&&ps(t,e)});return function(r){let i=_s(t,r).pipe(Cs(e=>e.deref()));if(i._tag===`Some`)return i.value;let a=e(r);return So(t,r,new WeakRef(a)),n.register(a,r),a}},hw=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),gw=wi(2,(e,t)=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,equals:t})),_w=wi(2,(e,t)=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,label:[t,Gr()===0?``:Error().stack?.split(`
5
+ `)[5]??``]})),vw=wi(e=>LC(e[0]),(e,t,n)=>{let r=BC(GC(e)?qC(n=>t(n,e),function(t,n){t.set(e,n)},e.refresh??function(t){t(e)}):KC(n=>t(n,e),e.refresh??function(t){t(e)}));return n?.initialValueTarget&&(r.initialValueTarget=yw(n.initialValueTarget)),r}),yw=e=>{let t=e;for(;t.initialValueTarget;)t=t.initialValueTarget;return t},bw=wi(2,(e,t)=>vw(e,n=>t(n(e)))),xw=wi(2,(e,t)=>{let n=zo(Fc(t));return vw(e,function(t){let r=setTimeout(()=>t.refresh(e),n);return t.addFinalizer(()=>clearTimeout(r)),t(e)},{initialValueTarget:e})}),Sw=wi(2,(e,t)=>{let n=zo(Fc(t.staleTime));return vw(e,r=>{let i=r.once(e);if(r.subscribe(e,e=>{r.setSelf(e)}),t.revalidateOnFocus&&t.focusSignal&&(r.once(t.focusSignal),r.subscribe(t.focusSignal,t.revalidateOnFocus===`always`?()=>r.refresh(e):()=>{Tw(r.once(e),n)&&r.refresh(e)})),oc(r.self())&&t.revalidateOnMount===!1)return i;if(Tw(i,n)){let t=!0;r.addFinalizer(()=>{t=!1}),r.registry.schedulerAsync.makeDispatcher().scheduleTask(()=>{t&&Tw(r.once(e),n)&&r.refresh(e)},0)}return i},{initialValueTarget:e})}),Cw=e=>e._tag===`Success`?Vc(e.timestamp):e._tag===`Failure`?vs(e.previousSuccess,e=>e.timestamp):Co(),ww=(e,t,n)=>n-e<t,Tw=(e,t)=>{if(e.waiting)return!1;let n=ls(Cw(e));return n===void 0?e._tag!==`Initial`:!ww(n,t,Date.now())},Ew=PC,Dw=e=>t=>vw(t,n=>(n.once(e),n.subscribe(e,e=>n.refresh(t)),n.subscribe(t,e=>n.setSelf(e)),n.once(t)),{initialValueTarget:t}),Ow=`~effect-atom/atom/Atom/Serializable`,kw=e=>Ow in e,Aw=`~effect-atom/atom/Atom/ServerValue`,jw=wi(2,(e,t)=>`~effect-atom/atom/Atom/ServerValue`in e?e[Aw](e=>t.get(e)):t.get(e)),Mw=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Nw=e(t(((e,t)=>{t.exports=Mw()}))(),1);function Pw(e){let t=Nw.unstable_scheduleCallback(4,e);return()=>Nw.unstable_cancelCallback(t)}var Fw=V.createContext(mC({scheduleTask:Pw,defaultIdleTTL:400})),Iw=new WeakMap;function Lw(e,t){let n=Iw.get(e);n===void 0&&(n=new WeakMap,Iw.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i=0,a,o={subscribe(n){i++;let r=e.subscribe(t,n);return()=>{i--,r()}},snapshot(){return e.get(t)},getServerSnapshot(){return(i===0||a===void 0)&&(a={value:jw(t,e)}),a.value}};return n.set(t,o),o}function Rw(e,t){let n=Lw(e,t);return V.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}function zw(e,t,n){let r=Lw(e,t),i=V.useMemo(()=>{let e;return t=>(e!==void 0&&Object.is(e.source,t)||(e={source:t,value:n(t)}),e.value)},[n]);return V.useSyncExternalStore(r.subscribe,()=>i(r.snapshot()),()=>i(r.getServerSnapshot()))}var Bw=(e,t)=>{let n=V.useContext(Fw);return t?zw(n,e,t):Rw(n,e)};function Vw(e,t){V.useEffect(()=>e.mount(t),[t,e])}var Hw=e=>{Vw(V.useContext(Fw),e)},Uw=e=>{let t=V.useContext(Fw);return Vw(t,e),V.useCallback(()=>{t.refresh(e)},[t,e])},Ww=Object.freeze({ERR_NAME_NOT_RESOLVED:`DNS address could not be found`,ERR_NAME_RESOLUTION_FAILED:`DNS address could not be found`,ERR_CONNECTION_REFUSED:`Connection refused`,ERR_CONNECTION_RESET:`Connection was reset`,ERR_CONNECTION_CLOSED:`Connection was closed`,ERR_CONNECTION_TIMED_OUT:`Connection timed out`,ERR_INTERNET_DISCONNECTED:`No internet connection`,ERR_TIMED_OUT:`Connection timed out`,ERR_CERT_AUTHORITY_INVALID:`Certificate authority is not trusted`,ERR_CERT_COMMON_NAME_INVALID:`Certificate hostname mismatch`,ERR_CERT_DATE_INVALID:`Certificate is expired or not yet valid`,ERR_TOO_MANY_REDIRECTS:`Too many redirects`}),Gw=mC();function Kw({children:e}){return(0,V.createElement)(Fw.Provider,{value:Gw},e)}var qw=Object.freeze({snapshot:null,sessions:{},suppressedTabIds:new Set,activeTabId:null,desktopOverlay:null,desktopByTabId:{},recentlySeenUrls:[],listLoaded:!1,serverEpoch:null,serverRevision:0}),Jw=YC(qw).pipe(_w(`preview:empty-thread`)),Yw=mw(e=>YC(qw).pipe(hw,_w(`preview:thread:${e}`))),Xw=YC({keys:new Set}).pipe(hw,_w(`preview:active-thread-keys`)),Zw=YC(e=>{let t={};for(let n of e(Xw).keys){let r=e(Yw(n));Object.keys(r.sessions).length>0&&(t[n]=r)}return t}).pipe(_w(`preview:active-sessions`)),Qw=new Set;function $w(e,t){let n=Object.keys(t.sessions).length>0;Gw.update(Xw,t=>{if(t.keys.has(e)===n)return t;let r=new Set(t.keys);return n?r.add(e):r.delete(e),{keys:r}})}function eT(e,t){let n=Xx(e),r=Yw(n),i=Gw.get(r);Gw.modify(r,e=>(i=t(e),[i!==e,i]))&&(Qw.add(n),$w(n,i))}var tT=(e,t)=>[t,...e.filter(e=>e!==t)].slice(0,10),nT=(e,t)=>t.navStatus._tag===`Idle`?e:tT(e,t.navStatus.url),rT=e=>Object.values(e).toSorted((e,t)=>e.updatedAt.localeCompare(t.updatedAt)).at(-1)??null,iT=(e,t)=>{if(!e.sessions[t])return e;let{[t]:n,...r}=e.sessions,{[t]:i,...a}=e.desktopByTabId,o=rT(r),s=e.activeTabId===t?o?.tabId??null:e.activeTabId,c=s?r[s]??o:o;return{...e,sessions:r,desktopByTabId:a,activeTabId:c?.tabId??null,snapshot:c,desktopOverlay:c?a[c.tabId]??null:null}};function aT(e){let t=(0,B.c)(2),n;return t[0]===e?n=t[1]:(n=e?Yw(Xx(e)):Jw,t[0]=e,t[1]=n),Bw(n)}function oT(){return Bw(Zw)}function sT(e){return Gw.get(Yw(Xx(e)))}function cT(e,t){eT(e,e=>{if(e.serverEpoch!==null&&t.serverEpoch!==e.serverEpoch||t.revision<e.serverRevision)return e;let n=(()=>{switch(t.type){case`opened`:case`navigated`:case`resized`:{let n=t.snapshot;if(e.suppressedTabIds.has(n.tabId))return e;let r=n.navStatus._tag===`Idle`?e.recentlySeenUrls:tT(e.recentlySeenUrls,n.navStatus.url),i={...e.sessions,[n.tabId]:n},a=t.type===`opened`?n.tabId:e.activeTabId,o=i[a??n.tabId]??n;return{...e,sessions:i,activeTabId:a??n.tabId,snapshot:o,desktopOverlay:e.desktopByTabId[o.tabId]??null,recentlySeenUrls:r}}case`failed`:{let n=e.sessions[t.tabId];if(!n)return e;let r={...n,navStatus:{_tag:`LoadFailed`,url:t.url,title:t.title,code:t.code,description:t.description,...t.download===void 0?{}:{download:t.download}},updatedAt:t.createdAt},i={...e.sessions,[t.tabId]:r};return{...e,sessions:i,snapshot:e.activeTabId===t.tabId?r:e.snapshot}}case`closed`:{let n=iT(e,t.tabId);if(!n.suppressedTabIds.has(t.tabId))return n;let r=new Set(n.suppressedTabIds);return r.delete(t.tabId),{...n,suppressedTabIds:r}}}})();return n.serverRevision===t.revision&&n.serverEpoch===t.serverEpoch?n:{...n,serverEpoch:t.serverEpoch,serverRevision:t.revision}})}function lT(e,t){eT(e,e=>{if(!t&&e.snapshot===null)return e;if(!t)return{...e,snapshot:null,sessions:{},activeTabId:null,desktopOverlay:null,desktopByTabId:{}};if(e.suppressedTabIds.has(t.tabId))return e;let n=e.sessions[t.tabId];if(n&&n.updatedAt>t.updatedAt)return e;let r=nT(e.recentlySeenUrls,t);return{...e,snapshot:t,sessions:{...e.sessions,[t.tabId]:t},activeTabId:t.tabId,desktopOverlay:e.desktopByTabId[t.tabId]??null,recentlySeenUrls:r}})}function uT(e,t){eT(e,e=>{if(e.suppressedTabIds.has(t.tabId))return e;let n=e.sessions[t.tabId];if(n&&n.updatedAt>t.updatedAt)return e;let r={...e.sessions,[t.tabId]:t},i=e.activeTabId&&r[e.activeTabId]?e.activeTabId:t.tabId,a=r[i]??t;return{...e,sessions:r,activeTabId:i,snapshot:a,desktopOverlay:e.desktopByTabId[i]??null,recentlySeenUrls:nT(e.recentlySeenUrls,t)}})}function dT(e,t){eT(e,e=>{let n=e.serverEpoch===t.serverEpoch;if(n&&t.revision<e.serverRevision)return e;let r=t.sessions,i={},a=n?e.suppressedTabIds:new Set,o=e.recentlySeenUrls;for(let t of r){if(a.has(t.tabId))continue;let r=n?e.sessions[t.tabId]:void 0,s=r&&r.updatedAt>t.updatedAt?r:t;i[s.tabId]=s,o=nT(o,s)}let s=rT(i),c=e.activeTabId&&i[e.activeTabId]?e.activeTabId:s?.tabId??null,l=c?i[c]??null:null,u=n?Object.fromEntries(Object.entries(e.desktopByTabId).filter(([e])=>i[e]!==void 0)):{},d=new Set([...a].filter(e=>r.some(t=>t.tabId===e)));return{...e,sessions:i,suppressedTabIds:d,activeTabId:c,snapshot:l,desktopByTabId:u,desktopOverlay:c?u[c]??null:null,recentlySeenUrls:o,listLoaded:!0,serverEpoch:t.serverEpoch,serverRevision:t.revision}})}function fT(e,t){return e===t||e!==null&&t!==null&&e.hasWebContents===t.hasWebContents&&e.canGoBack===t.canGoBack&&e.canGoForward===t.canGoForward&&e.loading===t.loading&&e.zoomFactor===t.zoomFactor&&e.pictureInPicture===t.pictureInPicture&&e.colorScheme===t.colorScheme&&e.audioMuted===t.audioMuted&&e.audible===t.audible&&e.controller===t.controller&&e.favicon?.dataUrl===t.favicon?.dataUrl&&e.favicon?.pageUrl===t.favicon?.pageUrl&&e.favicon?.capturedAt===t.favicon?.capturedAt}function pT(e,t,n){eT(e,e=>{if(fT(e.desktopByTabId[t]??null,n))return e;let r={...e.desktopByTabId};return n?r[t]=n:delete r[t],{...e,desktopByTabId:r,desktopOverlay:e.activeTabId===t?n:e.desktopOverlay}})}function mT(e,t){eT(e,e=>{let n=new Set(e.suppressedTabIds);return n.add(t),{...iT(e,t),suppressedTabIds:n}})}function hT(e,t,n){eT(e,e=>{if(!e.suppressedTabIds.has(n))return e;let r=new Set(e.suppressedTabIds);if(r.delete(n),!t)return{...e,suppressedTabIds:r};let i=t.navStatus._tag===`Idle`?e.recentlySeenUrls:tT(e.recentlySeenUrls,t.navStatus.url);return{...e,snapshot:t,sessions:{...e.sessions,[t.tabId]:t},suppressedTabIds:r,activeTabId:t.tabId,desktopOverlay:e.desktopByTabId[t.tabId]??null,recentlySeenUrls:i}})}function gT(e,t){eT(e,e=>{let n=e.sessions[t];return!n||e.activeTabId===t?e:{...e,activeTabId:t,snapshot:n,desktopOverlay:e.desktopByTabId[t]??null}})}function _T(e,t,n,r=5e3){let i=Yw(Xx(e));if(Gw.get(i).sessions[t])return n(),()=>{};let a=()=>{clearTimeout(s),o()},o=Gw.subscribe(i,e=>{e.sessions[t]&&(a(),n())}),s=setTimeout(a,r);return a}function vT(e,t){t.trim().length!==0&&eT(e,e=>({...e,recentlySeenUrls:tT(e.recentlySeenUrls,t)}))}function yT(){return typeof window>`u`?!1:!!window.desktopBridge?.preview}function bT(e){eT(e,e=>Object.keys(e.sessions).length===0?e:qw)}var xT=rS({optionDescriptors:[]}),ST=qo.make(`codex`);function CT(e){return e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).trim().replace(/\b\w/g,e=>e.toUpperCase())}function wT(e,t){return TT(e,t)?.models??[]}function TT(e,t){let n=ac(t);return e.find(e=>e.instanceId===n)}function ET(e,t){let n=e.find(e=>e.instanceId===t);return n?.enabled?n.driver:e.find(e=>e.enabled)?.driver??ST}function DT(e,t,n,r=!0){let i=ES(n,t,e),a=e.find(e=>e.slug===i)?.capabilities??xT;return r?a:OT(a)}function OT(e){return{...e,optionDescriptors:(e.optionDescriptors??[]).flatMap(e=>{if(e.type!==`select`||e.id!==`agent`)return[e];let t=e.options.filter(e=>e.id!==`plan`);if(t.length===0)return[];let n=e.currentValue&&t.some(t=>t.id===e.currentValue)?e.currentValue:t.find(e=>e.isDefault)?.id??t[0]?.id;return[{...e,options:t,...n?{currentValue:n}:{}}]})}}function kT(e,t){let n=wT(e,t);return n.find(e=>e.isDefault&&!e.isCustom)?.slug??n.find(e=>!e.isCustom)?.slug??n[0]?.slug??Li[t]??`gpt-6-astra`}var AT=V.createContext(void 0);function jT(e){let t=V.useContext(AT);if(t===void 0&&!e)throw Error(pl(33));return t}var MT=V.createContext(void 0);function NT(e){let t=V.useContext(MT);if(t===void 0&&!e)throw Error(pl(36));return t}var PT=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),FT={[PT.startingStyle]:``},IT={[PT.endingStyle]:``},LT={transitionStatus(e){return e===`starting`?FT:e===`ending`?IT:null}},RT=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=PT.startingStyle]=`startingStyle`,e[e.endingStyle=PT.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),zT=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),BT={[zT.popupOpen]:``},VT={[zT.popupOpen]:``,[zT.pressed]:``},HT={[RT.open]:``},UT={[RT.closed]:``},WT={[RT.anchorHidden]:``},GT={open(e){return e?BT:null}},KT={open(e){return e?VT:null}},qT={open(e){return e?HT:UT},anchorHidden(e){return e?WT:null}},JT=V.createContext(void 0);function YT(e=!0){let t=V.useContext(JT);if(t===void 0&&!e)throw Error(pl(25));return t}var XT=`none`,ZT=`trigger-press`,QT=`trigger-hover`,$T=`trigger-focus`,eE=`outside-press`,tE=`item-press`,nE=`close-press`,rE=`clear-press`,iE=`increment-press`,aE=`decrement-press`,oE=`input-change`,sE=`input-clear`,cE=`input-blur`,lE=`input-paste`,uE=`input-press`,dE=`focus-out`,fE=`escape-key`,pE=`list-navigation`,mE=`keyboard`,hE=`pointer`,gE=`cancel-open`,_E=`sibling-open`,vE=`disabled`,yE=`imperative-action`,bE=`window-resize`;function xE({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=V.useRef(e!==void 0),[a,o]=V.useState(t);return[i?e:a,V.useCallback(e=>{i||o(e)},[])]}var SE=V.createContext(void 0);function CE(){let e=V.useContext(SE);if(e===void 0)throw Error(pl(30));return e}function wE(){return typeof window<`u`}function TE(e){return OE(e)?(e.nodeName||``).toLowerCase():`#document`}function EE(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function DE(e){return((OE(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function OE(e){return wE()?e instanceof Node||e instanceof EE(e).Node:!1}function G(e){return wE()?e instanceof Element||e instanceof EE(e).Element:!1}function kE(e){return wE()?e instanceof HTMLElement||e instanceof EE(e).HTMLElement:!1}function AE(e){return!wE()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof EE(e).ShadowRoot}function jE(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=HE(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ME(e){return/^(table|td|th)$/.test(TE(e))}function NE(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var PE=/transform|translate|scale|rotate|perspective|filter/,FE=/paint|layout|strict|content/,IE=e=>!!e&&e!==`none`,LE;function RE(e){let t=G(e)?HE(e):e;return IE(t.transform)||IE(t.translate)||IE(t.scale)||IE(t.rotate)||IE(t.perspective)||!BE()&&(IE(t.backdropFilter)||IE(t.filter))||PE.test(t.willChange||``)||FE.test(t.contain||``)}function zE(e){let t=WE(e);for(;kE(t)&&!VE(t);){if(RE(t))return t;if(NE(t))return null;t=WE(t)}return null}function BE(){return LE??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),LE}function VE(e){return/^(html|body|#document)$/.test(TE(e))}function HE(e){return EE(e).getComputedStyle(e)}function UE(e){return G(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function WE(e){if(TE(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||AE(e)&&e.host||DE(e);return AE(t)?t.host:t}function GE(e){let t=WE(e);return VE(t)?e.ownerDocument?e.ownerDocument.body:e.body:kE(t)&&jE(t)?t:GE(t)}function KE(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=GE(e),i=r===e.ownerDocument?.body,a=EE(r);if(i){let e=qE(a);return t.concat(a,a.visualViewport||[],jE(r)?r:[],e&&n?KE(e):[])}return t.concat(r,KE(r,[],n))}function qE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var JE={...V},YE=JE.useInsertionEffect,XE=YE&&YE!==JE.useLayoutEffect?YE:e=>e();function K(e){let t=fl(ZE).current;return t.next=e,XE(t.effect),t.trampoline}function ZE(){let e={next:void 0,callback:QE,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function QE(){}var q=typeof document<`u`?V.useLayoutEffect:()=>{},$E=V.createContext(void 0);function eD(e=!1){let t=V.useContext($E);if(t===void 0&&!e)throw Error(pl(16));return t}function tD(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:V.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function nD(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=V.useRef(null),s=eD(!0),c=a??s!==void 0,{props:l}=tD({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=V.useCallback(()=>{let e=o.current;rD(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return q(u,[u]),{getButtonProps:V.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return gl({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(xl(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=rD(a),l=!i&&iD(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler())}else u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){t||(xl(e),a?.(e),e.target===e.currentTarget&&i&&c&&rD(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:K(e=>{o.current=e,u()})}}function rD(e){return kE(e)&&e.tagName===`BUTTON`}function iD(e){return!!(e?.tagName===`A`&&e?.href)}var aD=typeof navigator<`u`,oD=gD(),sD=vD(),cD=_D(),lD=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),uD=oD.platform===`MacIntel`&&oD.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(oD.platform),dD=aD&&/firefox/i.test(cD),fD=aD&&/apple/i.test(navigator.vendor);aD&&/Edg/i.test(cD);var pD=aD&&/android/i.test(sD)||/android/i.test(cD),mD=aD&&sD.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,hD=cD.includes(`jsdom/`);function gD(){if(!aD)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function _D(){if(!aD)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function vD(){if(!aD)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function yD(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=YT(!0),d=u!==void 0;return V.useMemo(()=>({id:r,role:`menuitem`,tabIndex:n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:tE})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,d&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||d&&!mD&&e.button===2)return}!s.current||!a.context.allowMouseUpTriggerRef.current||d&&e.button!==2||c&&c.type!==`regular-item`||s.current.click()}}),[t,n,r,l,i,a,o,s,u,d,c])}var bD={type:`regular-item`};function xD(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=V.useRef(null),{getButtonProps:d,buttonRef:f}=nD({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=yD({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=V.useCallback(e=>gl(p,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,d),[p,d,c]),h=wl(u,f);return V.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var SD=V.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function CD(){return V.useContext(SD)}var wD=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function TD(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=CD(),f=V.useRef(-1),[p,m]=V.useState(a??(i===wD.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=V.useRef(null),g=V.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return q(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),q(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),V.useMemo(()=>({ref:g,index:p}),[p,g])}var ED=0;function DD(e,t=`mui`){let[n,r]=V.useState(e),i=e||n;return V.useEffect(()=>{n??(ED+=1,r(`${t}-${ED}`))},[n,t]),i}var OD=JE.useId;function kD(e,t){if(OD!==void 0){let n=OD();return e??(t?`${t}-${n}`:n)}return DD(e,t)}function AD(e){return kD(e,`base-ui`)}var jD=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.highlighted=`data-highlighted`,e}({}),MD={checked(e){return e?{[jD.checked]:``}:{[jD.unchecked]:``}},...LT};function J(e,t,n,r){let i=!1,a=!1,o=r??Sl;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function ND(e,t,n){let r=n??Sl;return{reason:e,event:t??new Event(`base-ui`),...r}}var PD=V.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,checked:l,defaultChecked:u,onCheckedChange:d,style:f,...p}=e,m=TD({label:a}),h=jT(!0),g=AD(i),{store:_}=NT(),v=_.useState(`isActive`,m.index),y=_.useState(`itemProps`),[b,x]=xE({controlled:l,default:u??!1,name:`MenuCheckboxItem`,state:`checked`}),{getItemProps:S,itemRef:C}=xD({closeOnClick:c,disabled:s,highlighted:v,id:g,store:_,nativeButton:o,nodeId:h?.context.nodeId,itemMetadata:bD}),w=V.useMemo(()=>({disabled:s,highlighted:v,checked:b}),[s,v,b]);function T(e){let t=J(tE,e.nativeEvent,void 0,{preventUnmountOnClose(){}});d?.(!b,t),!t.isCanceled&&x(e=>!e)}let E=vl(`div`,e,{state:w,stateAttributesMapping:MD,props:[y,{role:`menuitemcheckbox`,"aria-checked":b,onClick:T},p,S],ref:[C,t,m.ref]});return(0,H.jsx)(SE.Provider,{value:w,children:E})}),FD=[];function ID(e){V.useEffect(e,FD)}var LD=null;globalThis.requestAnimationFrame;var RD=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},zD=class e{static create(){return new e}static request(e){return RD.request(e)}static cancel(e){return RD.cancel(e)}currentId=LD;request(e){this.cancel(),this.currentId=RD.request(()=>{this.currentId=LD,e()})}cancel=()=>{this.currentId!==LD&&(RD.cancel(this.currentId),this.currentId=LD)};disposeEffect=()=>this.cancel};function BD(){let e=fl(zD.create).current;return ID(e.disposeEffect),e}function VD(e,t=!1,n=!1){let[r,i]=V.useState(e&&t?`idle`:void 0),[a,o]=V.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),q(()=>{if(!e&&a&&r!==`ending`&&n){let e=zD.request(()=>{i(`ending`)});return()=>{zD.cancel(e)}}},[e,a,r,n]),q(()=>{if(!e||t)return;let n=zD.request(()=>{i(void 0)});return()=>{zD.cancel(n)}},[t,e]),q(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=zD.request(()=>{i(`idle`)});return()=>{zD.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var HD=t((e=>{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.6`})),UD=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=HD()})),WD=e(UD());function GD(e){return e==null?e:`current`in e?e.current:e}function KD(e,t=!1,n=!0){let r=BD();return K((i,a=null)=>{r.cancel();let o=GD(e);if(o==null)return;let s=o,c=()=>{WD.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=PT.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function qD(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=K(i),o=KD(r,n,!1);V.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}var JD=V.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=CE(),c=V.useRef(null),{transitionStatus:l,setMounted:u}=VD(s.checked);qD({open:s.checked,ref:c,onComplete(){s.checked||u(!1)}});let d={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return vl(`span`,e,{state:d,ref:[t,c],stateAttributesMapping:MD,props:{"aria-hidden":!0,...o},enabled:a||s.checked})}),YD=V.createContext(void 0);function XD(){let e=V.useContext(YD);if(e===void 0)throw Error(pl(31));return e}var ZD=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=V.useState(void 0),c=vl(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,H.jsx)(YD.Provider,{value:s,children:c})}),QD=V.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=AD(a),c=XD();return q(()=>(c(s),()=>{c(void 0)}),[c,s]),vl(`div`,e,{ref:t,props:{id:s,role:`presentation`,...o}})}),$D=V.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=TD({label:a}),f=jT(!0),p=AD(i),{store:m}=NT(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=xD({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:bD});return vl(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),eO=0,tO=class e{static create(){return new e}currentId=eO;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=eO,t()},e)}isStarted(){return this.currentId!==eO}clear=()=>{this.currentId!==eO&&(clearTimeout(this.currentId),this.currentId=eO)};disposeEffect=()=>this.clear};function nO(){let e=fl(tO.create).current;return ID(e.disposeEffect),e}function rO(e){e.preventDefault(),e.stopPropagation()}function iO(e){return`nativeEvent`in e}function aO(e){return e.pointerType===``&&e.isTrusted?!0:pD&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function oO(e){return hD?!1:!pD&&e.width===0&&e.height===0||pD&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function sO(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function cO(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var lO=`data-base-ui-focusable`,uO=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,dO=`ArrowLeft`,fO=`ArrowRight`,pO=`ArrowUp`,mO=`ArrowDown`;function hO(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Y(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&AE(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function gO(e){return`composedPath`in e?e.composedPath()[0]:e.target}function _O(e,t){if(!G(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(Y(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function vO(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function yO(e){return e.matches(`html,body`)}function bO(e){return kE(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function xO(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${uO}`)!=null}function SO(e){return e?e.getAttribute(`role`)===`combobox`&&bO(e):!1}function CO(e){if(!e||hD)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function wO(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function TO(e,t){return t!=null&&!sO(t)?0:typeof e==`function`?e():e}function EO(e,t,n){let r=TO(e,n);return typeof r==`number`?r:r?.[t]}function DO(e){return typeof e==`function`?e():e}function OO(e,t){return t||e===`click`||e===`mousedown`}function kO(e){return e?.includes(`mouse`)&&e!==`mousedown`}function X(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function AO(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function jO(e){let t=fl(MO,e).current;return t.next=e,q(t.effect),t}function MO(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Z(e){return e?.ownerDocument||document}var NO={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},PO={...NO,position:`fixed`,top:0,left:0},FO={...NO,position:`absolute`},IO=V.forwardRef(function(e,t){let[n,r]=V.useState();q(()=>{fD&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,H.jsx)(`span`,{...e,ref:t,style:PO,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),LO=[`top`,`right`,`bottom`,`left`],RO=Math.min,zO=Math.max,BO=Math.round,VO=Math.floor,HO=e=>({x:e,y:e}),UO={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function WO(e,t,n){return zO(e,RO(t,n))}function GO(e,t){return typeof e==`function`?e(t):e}function KO(e){return e.split(`-`)[0]}function qO(e){return e.split(`-`)[1]}function JO(e){return e===`x`?`y`:`x`}function YO(e){return e===`y`?`height`:`width`}function XO(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ZO(e){return JO(XO(e))}function QO(e,t,n){n===void 0&&(n=!1);let r=qO(e),i=ZO(e),a=YO(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=sk(o)),[o,sk(o)]}function $O(e){let t=sk(e);return[ek(e),t,ek(t)]}function ek(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var tk=[`left`,`right`],nk=[`right`,`left`],rk=[`top`,`bottom`],ik=[`bottom`,`top`];function ak(e,t,n){switch(e){case`top`:case`bottom`:return n?t?nk:tk:t?tk:nk;case`left`:case`right`:return t?rk:ik;default:return[]}}function ok(e,t,n,r){let i=qO(e),a=ak(KO(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ek)))),a}function sk(e){let t=KO(e);return UO[t]+e.slice(t.length)}function ck(e){return{top:0,right:0,bottom:0,left:0,...e}}function lk(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ck(e)}function uk(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function dk(e,t,n){return Math.floor(e/t)!==n}function fk(e,t){return t<0||t>=e.length}function pk(e,t){return hk(e.current,{disabledIndices:t})}function mk(e,t){return hk(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function hk(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&bk(e,a,r));return a}function gk(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!bk(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=VO(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!bk(e,r,s))return r}};d&&rO(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=hk(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=hk(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}fk(e,f)&&(f=u)}if(n===`both`){let n=VO(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&rO(t),u%o===o-1?r&&(f=hk(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=hk(e,{startingIndex:u,disabledIndices:s}),r&&dk(f,o,n)&&(f=hk(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),dk(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&rO(t),u%o===0?r&&(f=hk(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=hk(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&dk(f,o,n)&&(f=hk(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),dk(f,o,n)&&(f=u));let c=VO(l/o)===n;fk(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:hk(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function _k(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function vk(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function yk(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function bk(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Sk(r)||!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function xk(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Sk(e,t=e?HE(e):null){return!e||!e.isConnected||!t||xk(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Ck=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function wk(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return AE(n)?n.host:null}function Tk(e){for(let t of Array.from(e.children))if(TE(t)===`summary`)return t;return null}function Ek(e,t){let n=Tk(t);return!!n&&(e===n||Y(n,e))}function Dk(e){let t=e?TE(e):``;return e!=null&&e.matches(Ck)&&(t!==`summary`||e.parentElement!=null&&TE(e.parentElement)===`details`&&Tk(e.parentElement)===e)&&(t!==`details`||Tk(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Ok(e){if(!Dk(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=wk(t)){let n=t!==e,r=TE(t)===`slot`;if(t.hasAttribute(`inert`)||n&&TE(t)===`details`&&!t.open&&!Ek(e,t)||t.hasAttribute(`hidden`)||!r&&!kk(t,n))return!1}return!0}function kk(e,t){let n=HE(e);return t?n.display!==`none`:Sk(e,n)}function Ak(e){let t=e.tabIndex;if(t<0){let t=TE(e);if(t===`details`||t===`audio`||t===`video`||kE(e)&&e.isContentEditable)return 0}return t}function jk(e){if(TE(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Mk(e,t){let n=jk(e);if(!n)return!0;let r=t.find(e=>{let t=jk(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=jk(e);return t?.name===n.name&&t.form===n.form})===n}function Nk(e){if(kE(e)&&TE(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return kE(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Pk(e,t){Nk(e).forEach(e=>{Dk(e)&&t.push(e),Pk(e,t)})}function Fk(e,t,n){Nk(e).forEach(e=>{kE(e)&&e.matches(t)&&n.push(e),Fk(e,t,n)})}function Ik(e){return Ok(e)&&Ak(e)>=0}function Lk(e){let t=[];return Pk(e,t),t.filter(Ok)}function Rk(e){let t=Lk(e);return t.filter(e=>Ak(e)>=0&&Mk(e,t))}function zk(e,t){let n=Rk(e),r=n.length;if(r===0)return;let i=hO(Z(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Bk(e){return zk(Z(e).body,1)||e}function Vk(e){return zk(Z(e).body,-1)||e}function Hk(e,t){if(!e)return null;let n=Rk(Z(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Uk(e){return Hk(e,1)}function Wk(e){return Hk(e,-1)}function Gk(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Y(n,r)}function Kk(e){Rk(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function qk(e){let t=[];Fk(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Jk(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Jk(e,t.id,n)])}function Yk(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Xk(e){return`data-base-ui-${e}`}var Zk=0;function Qk(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Zk);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),dl;let o=requestAnimationFrame(a);return Zk=o,()=>{Zk===o&&(cancelAnimationFrame(o),Zk=0)}}var $k={inert:new WeakMap,"aria-hidden":new WeakMap},eA=`data-base-ui-inert`,tA={inert:new WeakSet,"aria-hidden":new WeakSet},nA=new WeakMap,rA=0;function iA(e){return tA[e]}function aA(e){return e?AE(e)?e.host:aA(e.parentNode):null}var oA=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=aA(t);return e.contains(n)?n:null}).filter(e=>e!=null),sA=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},cA=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{TE(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function lA(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=oA(t,e),u=i?oA(t,a):[],d=new Set(u),f=i?cA(t,sA(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=$k[o],n=iA(o);c=n,s=e;let r=oA(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);cA(t,sA(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(nA.get(e)||0)+1;nA.set(e,t),m.push(e),t===1&&e.setAttribute(eA,``)}),rA+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(nA.get(e)||0)-1;nA.set(e,t),t||e.removeAttribute(eA)}),--rA,rA||($k.inert=new WeakMap,$k[`aria-hidden`]=new WeakMap,tA.inert=new WeakSet,tA[`aria-hidden`]=new WeakSet,nA=new WeakMap)}}function uA(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=Z(e[0]).body;return lA(e,o,n,r,{mark:i,markerIgnoreElements:a})}var dA={style:{transition:`none`}},fA=`data-base-ui-click-trigger`,pA=`data-base-ui-swipe-ignore`,mA=`data-swipe-ignore`,hA=`[${pA}]`,gA=`[${mA}]`,_A={fallbackAxisSide:`none`},vA={fallbackAxisSide:`end`},yA={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},bA=V.createContext(null),xA=()=>V.useContext(bA),SA=Xk(`portal`);function CA(e={}){let{ref:t,container:n,componentProps:r=Sl,elementProps:i}=e,a=kD(),o=xA()?.portalNode,[s,c]=V.useState(null),[l,u]=V.useState(null),d=K(e=>{e!==null&&u(e)}),f=V.useRef(null);q(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(OE(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=vl(`div`,r,{ref:[t,d],props:[{id:a,[SA]:``},i]});return{portalNode:l,portalSubtree:s&&p?WD.createPortal(p,s):null}}var wA=V.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=CA({container:o,ref:t,componentProps:e,elementProps:c}),d=V.useRef(null),f=V.useRef(null),p=V.useRef(null),m=V.useRef(null),[h,g]=V.useState(null),_=V.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;V.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&Gk(e)&&(e.type===`focusin`?_.current&&=(qk(l),!1):(Kk(l),_.current=!0))}return AO(X(l,`focusin`,e,!0),X(l,`focusout`,e,!0))},[l,v]),V.useEffect(()=>{l&&y===!1&&(qk(l),_.current=!1)},[y,l]);let x=V.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,H.jsxs)(V.Fragment,{children:[u,(0,H.jsxs)(bA.Provider,{value:x,children:[b&&l&&(0,H.jsx)(IO,{"data-type":`outside`,ref:d,onFocus:e=>{Gk(e,l)?p.current?.focus():Vk(h?h.domReference:null)?.focus()}}),b&&l&&(0,H.jsx)(`span`,{"aria-owns":l.id,style:yA}),l&&WD.createPortal(a,l),b&&l&&(0,H.jsx)(IO,{"data-type":`outside`,ref:f,onFocus:e=>{Gk(e,l)?m.current?.focus():(Bk(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,J(`focus-out`,e.nativeEvent)))}})]})]})});function TA(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var EA=class{nodesRef={current:[]};events=TA();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},DA=V.createContext(null),OA=V.createContext(null),kA=()=>V.useContext(DA)?.id||null,AA=e=>{let t=V.useContext(OA);return e??t};function jA(e){let t=kD(),n=AA(e),r=kA();return q(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function MA(e){let{children:t,id:n}=e,r=kA();return(0,H.jsx)(DA.Provider,{value:V.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function NA(e){let{children:t,externalTree:n}=e,r=fl(()=>n??new EA).current;return(0,H.jsx)(OA.Provider,{value:r,children:t})}function PA(e,t){let n=EE(gO(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var FA=20,IA=[];function LA(){IA=IA.filter(e=>e.deref()?.isConnected)}function RA(e){LA(),e&&TE(e)!==`body`&&(IA.push(new WeakRef(e)),IA.length>FA&&(IA=IA.slice(-20)))}function zA(){return LA(),IA[IA.length-1]?.deref()}function BA(e){return e?Ik(e)?e:Rk(e)[0]||e:null}function VA(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=Lk(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ik(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function HA(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=K(()=>b.current.floatingContext?.nodeId),S=i===!1,C=SO(_)&&S,w=V.useRef([`content`]),T=jO(i),E=jO(a),D=jO(l),O=AA(p),k=xA(),A=V.useRef(!1),j=V.useRef(!1),M=V.useRef(!1),N=V.useRef(null),P=V.useRef(``),F=V.useRef(``),I=V.useRef(null),ee=V.useRef(null),te=wl(I,f,k?.beforeInsideRef),ne=wl(ee,k?.afterInsideRef),L=nO(),re=nO(),ie=BD(),ae=k!=null,R=wO(v),oe=K((e=R)=>e?Rk(e):[]),se=K(()=>m?.().filter(e=>e!=null)??[]);V.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&Y(R,hO(Z(R)))&&oe().length===0&&!C&&rO(e)}return X(Z(R),`keydown`,e)},[r,R,s,C,oe]),V.useEffect(()=>{if(r||!g)return;let e=Z(R);function t(){M.current=!1}function n(e){let t=gO(e),n=se(),r=Y(v,t)||Y(_,t)||Y(k?.portalNode,t)||n.some(e=>e===t||Y(e,t));M.current=!r,F.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(j.current=!0)}function i(){F.current=`keyboard`}return AO(X(e,`pointerdown`,n,!0),X(e,`pointerup`,t,!0),X(e,`pointercancel`,t,!0),X(e,`keydown`,i,!0))},[r,v,_,R,g,k,se]),V.useEffect(()=>{if(r||!c)return;let e=Z(R);function t(){j.current=!0,re.start(0,()=>{j.current=!1})}function n(e){let t=gO(e);Ik(t)&&(N.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=gO(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=se(),f=n?.hasAttribute(Xk(`focus-guard`))&&[I.current,ee.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,GD(d),GD(u)].includes(n),p=!(Y(_,n)||Y(v,n)||Y(n,v)||Y(k?.portalNode,n)||l.some(e=>e===n||Y(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>Y(e,n))||f||O&&(Jk(O.nodesRef.current,a).find(e=>Y(e.context?.elements.floating,n)||Y(e.context?.elements.domReference,n))||Yk(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,wO(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&R&&VA(R,w),o&&r!==_&&!Sk(i)&&hO(e)===e.body){if(kE(R)&&(R.focus(),o===`popup`)){ie.request(()=>{R.focus()});return}let e=oe(),t=N.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||R;kE(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!s)&&n&&p&&!j.current&&(C||n!==zA())&&(A.current=!0,h.setOpen(!1,J(dE,t)))})}function a(){M.current||(b.current.insideReactTree=!0,L.start(0,()=>{b.current.insideReactTree=!1}))}let l=kE(_)?_:null;if(v||l)return AO(l&&X(l,`focusout`,i),l&&X(l,`pointerdown`,t),v&&X(v,`focusin`,n),v&&X(v,`focusout`,i),v&&k&&X(v,`focusout`,a,!0))},[r,_,v,R,s,O,k,h,c,o,oe,C,x,w,b,L,re,ie,u,d,se]),V.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${Xk(`portal`)}]`)||[]),t=(O?Yk(O.nodesRef.current,x()):[]).find(e=>SO(e.context?.elements.domReference||null))?.context?.elements.domReference,n=uA([v,...e,I.current,ee.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...se(),t,GD(d),GD(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=uA([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,se]),q(()=>{if(!g||r||!kE(R))return;let e=Z(R),t=hO(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||Y(R,t))return;let i=null,a=()=>(i??=oe(R),i[0]||R),o;o=r===!0||r===null?a():GD(r),o||=a();let s=Y(R,hO(e));Qk(o,{preventScroll:o===R,shouldFocus(){if(s)return!0;let t=hO(e);return!(t!==o&&Y(R,t))}})})},[r,g,R,oe,T,D]),q(()=>{if(r||!R)return;let e=Z(R);RA(hO(e));function t(e){if(e.open||(P.current=PA(e.nativeEvent,F.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`){if(e.nested)A.current=!1;else if(aO(e.nativeEvent)||oO(e.nativeEvent))A.current=!1;else{let e=!1;Z(R).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(P.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`)return _?.isConnected?_:zA()||null;let n=_?.isConnected?_:zA();return GD(t)||n||null}return()=>{y.off(`openchange`,t);let r=hO(e),i=se(),a=Y(v,r)||i.some(e=>e===r||Y(e,r))||O&&Jk(O.nodesRef.current,x(),!1).some(e=>Y(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=BA(s),n=typeof o!=`boolean`;o&&!A.current&&kE(t)&&(n||t===r||r===e.body||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,v,R,E,y,O,_,x,se]),q(()=>{if(!lD||g||!v)return;let e=hO(Z(v));kE(e)&&bO(e)&&Y(v,e)&&e.blur()},[g,v]),q(()=>{if(!r&&k)return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),q(()=>{if(!r&&R)return VA(R,w),()=>{queueMicrotask(LA)}},[r,R,w]);let ce=!r&&(!s||!C)&&(ae||s);return(0,H.jsxs)(V.Fragment,{children:[ce&&(0,H.jsx)(IO,{"data-type":`inside`,ref:te,onFocus:e=>{if(s){let e=oe();Qk(e[e.length-1])}else k?.portalNode&&(A.current=!1,Gk(e,k.portalNode)?Bk(_)?.focus():GD(d??k.beforeOutsideRef)?.focus())}}),n,ce&&(0,H.jsx)(IO,{"data-type":`inside`,ref:ne,onFocus:e=>{s?Qk(oe()[0]):k?.portalNode&&(c&&(A.current=!0),Gk(e,k.portalNode)?Vk(_)?.focus():GD(u??k.afterOutsideRef)?.focus())}})]})}function UA(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=ZT}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=V.useRef(void 0),f=BD(),p=nO(),m=V.useMemo(()=>{function e(e,t,n,r){let i=J(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||sO(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=gO(o);if(bO(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;r===`mousedown`&&i?d.current=void 0:sO(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return V.useMemo(()=>n?{reference:m}:Sl,[n,m])}var WA={intentional:`onClick`,sloppy:`onPointerDown`};function GA(){return!1}function KA(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function qA(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=GA,referencePressEvent:s=`sloppy`,bubbles:c,externalTree:l}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=u.useState(`floatingElement`),{dataRef:p}=u.context,m=AA(l),h=K(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=K(()=>a),{escapeKey:y,outsidePress:b}=KA(c),x=V.useRef(!1),S=V.useRef(!1),C=V.useRef(!1),w=V.useRef(!1),T=V.useRef(``),E=V.useRef(null),D=nO(),O=nO(),k=K(()=>{O.clear(),p.current.insideReactTree=!1}),A=K(e=>{let t=p.current.floatingContext?.nodeId;return(m?Jk(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),j=K(e=>vO(e,u.select(`floatingElement`))||vO(e,u.select(`domReferenceElement`))),M=K(e=>{o()&&u.setOpen(!1,J(ZT,e.nativeEvent))}),N=K(e=>{if(!d||!n||!r||e.key!==`Escape`||w.current||!y&&A(`__escapeKeyBubbles`))return;let t=J(fE,iO(e)?e.nativeEvent:e);u.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),P=K(()=>{p.current.insideReactTree=!0,O.start(0,k)}),F=K(e=>{if(!d||!n||e.button!==0)return;let t=gO(e.nativeEvent);Y(u.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),I=K(e=>{d&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});V.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=b;let e=new tO,t=new tO;function i(){e.clear(),w.current=!0}function a(){e.start(BE()?5:0,()=>{w.current=!1})}function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function s(){x.current=!1,S.current=!1}function c(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function l(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=p.current.floatingContext?.nodeId,n=m&&Jk(m.nodesRef.current,t).some(t=>vO(e,t.context?.elements.floating));return j(e)||n}function O(e){if(l(e)){e.type!==`click`&&!j(e)&&(t.clear(),C.current=!1),k();return}if(p.current.insideReactTree){k();return}let n=gO(e),r=`[${Xk(`inert`)}]`,i=G(n)?n.getRootNode():null,a=Array.from((AE(i)?i:Z(u.select(`floatingElement`))).querySelectorAll(r)),o=u.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>Y(e,n))))return;let s=G(n)?n:null;for(;s&&!VE(s);){let e=WE(s);if(VE(e)||!G(e))break;s=e}if(!(a.length&&G(n)&&!yO(n)&&!Y(n,u.select(`floatingElement`))&&a.every(e=>!Y(s,e)))){if(kE(n)&&!(`touches`in e)){let t=VE(n),r=HE(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}h(e)||(c()===`intentional`&&C.current?(t.clear(),C.current=!1):typeof g==`function`&&!g(e)||A(`__outsidePressBubbles`)||(u.setOpen(!1,J(eE,e)),k()))}}function M(e){c()===`sloppy`&&e.pointerType!==`touch`&&u.select(`open`)&&n&&!j(e)&&O(e)}function P(e){if(c()!==`sloppy`||!u.select(`open`)||!n||j(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function F(e,t){let n=gO(e);if(!n)return;let r=X(n,e.type,()=>{t(e),r()})}function I(e){T.current=`touch`,F(e,P)}function ee(e){D.clear(),e.type===`pointerdown`&&(T.current=e.pointerType),(e.type!==`mousedown`||!E.current||E.current.dismissOnMouseDown)&&F(e,e=>{e.type===`pointerdown`?M(e):O(e)})}function te(e){if(!x.current)return;let n=S.current;s(),c()===`intentional`&&(e.type===`pointercancel`?n&&o():h(e)||(n?o():(typeof g!=`function`||g(e))&&(t.clear(),C.current=!0,k())))}function ne(e){if(c()!==`sloppy`||!E.current||j(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(O(e),D.clear(),E.current=null)}function L(e){F(e,ne)}function re(e){c()===`sloppy`&&E.current&&!j(e)&&(E.current.dismissOnTouchEnd&&O(e),D.clear(),E.current=null)}function ie(e){F(e,re)}let ae=Z(f),R=AO(r&&AO(X(ae,`keydown`,N),X(ae,`compositionstart`,i),X(ae,`compositionend`,a)),_&&AO(X(ae,`click`,ee,!0),X(ae,`pointerdown`,ee,!0),X(ae,`pointerup`,te,!0),X(ae,`pointercancel`,te,!0),X(ae,`mousedown`,ee,!0),X(ae,`mouseup`,te,!0),X(ae,`touchstart`,I,!0),X(ae,`touchmove`,L,!0),X(ae,`touchend`,ie,!0)));return()=>{R(),e.clear(),t.clear(),s(),C.current=!1}},[p,f,r,_,g,d,n,y,b,N,k,v,A,j,m,u,D]),V.useEffect(k,[g,k]);let ee=V.useMemo(()=>({onKeyDown:N,[WA[s]]:M,...s!==`intentional`&&{onClick:M}}),[N,M,s]),te=V.useMemo(()=>({onKeyDown:N,onPointerDown:I,onMouseDown:I,onClickCapture:P,onMouseDownCapture(e){P(),F(e)},onPointerDownCapture(e){P(),F(e)},onMouseUpCapture:P,onTouchEndCapture:P,onTouchMoveCapture:P}),[N,P,F,I]);return V.useMemo(()=>n?{reference:ee,floating:te,trigger:ee}:{},[n,ee,te])}function JA(e,t,n){let{reference:r,floating:i}=e,a=XO(t),o=ZO(t),s=YO(o),c=KO(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(qO(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}async function YA(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=GO(t,e),p=lk(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=uk(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=uk(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var XA=50,ZA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:YA},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=JA(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<XA&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=JA(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},QA=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=GO(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=KO(r),_=XO(o),v=KO(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[sk(o)]:$O(o)),x=p!==`none`;!d&&x&&b.push(...ok(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=QO(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===XO(t)||T.every(e=>XO(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=XO(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function $A(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ej(e){return LO.some(t=>e[t]>=0)}var tj=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=GO(e,t);switch(i){case`referenceHidden`:{let e=$A(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ej(e)}}}case`escaped`:{let e=$A(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:ej(e)}}}default:return{}}}}},nj=new Set([`left`,`top`]);async function rj(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=KO(n),s=qO(n),c=XO(n)===`y`,l=nj.has(o)?-1:1,u=a&&c?-1:1,d=GO(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ij=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await rj(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},aj=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=GO(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=XO(KO(i)),p=JO(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=WO(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=WO(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},oj=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=GO(e,t),u={x:n,y:r},d=XO(i),f=JO(d),p=u[f],m=u[d],h=GO(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=nj.has(KO(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},sj=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=GO(e,t),u=await o.detectOverflow(t,l),d=KO(i),f=qO(i),p=XO(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=RO(h-u[g],v),x=RO(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=zO(u.left,0),t=zO(u.right,0),n=zO(u.top,0),r=zO(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:zO(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:zO(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function cj(e){let t=HE(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=kE(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=BO(n)!==a||BO(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function lj(e){return G(e)?e:e.contextElement}function uj(e){let t=lj(e);if(!kE(t))return HO(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=cj(t),o=(a?BO(n.width):n.width)/r,s=(a?BO(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var dj=HO(0);function fj(e){let t=EE(e);return!BE()||!t.visualViewport?dj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pj(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==EE(e)?!1:t}function mj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=lj(e),o=HO(1);t&&(r?G(r)&&(o=uj(r)):o=uj(e));let s=pj(a,n,r)?fj(a):HO(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=EE(a),t=r&&G(r)?EE(r):r,n=e,i=qE(n);for(;i&&r&&t!==n;){let e=uj(i),t=i.getBoundingClientRect(),r=HE(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=EE(i),i=qE(n)}}return uk({width:u,height:d,x:c,y:l})}function hj(e,t){let n=UE(e).scrollLeft;return t?t.left+n:mj(DE(e)).left+n}function gj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-hj(e,n),y:n.top+t.scrollTop}}function _j(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=DE(r),s=t?NE(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=HO(1),u=HO(0),d=kE(r);if((d||!d&&!a)&&((TE(r)!==`body`||jE(o))&&(c=UE(r)),d)){let e=mj(r);l=uj(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?gj(o,c):HO(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function vj(e){return Array.from(e.getClientRects())}function yj(e){let t=DE(e),n=UE(e),r=e.ownerDocument.body,i=zO(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=zO(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+hj(e),s=-n.scrollTop;return HE(r).direction===`rtl`&&(o+=zO(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var bj=25;function xj(e,t){let n=EE(e),r=DE(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=BE();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=hj(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=bj&&(a-=o)}else l<=bj&&(a+=l);return{width:a,height:o,x:s,y:c}}function Sj(e,t){let n=mj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=kE(e)?uj(e):HO(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Cj(e,t,n){let r;if(t===`viewport`)r=xj(e,n);else if(t===`document`)r=yj(DE(e));else if(G(t))r=Sj(t,n);else{let n=fj(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return uk(r)}function wj(e,t){let n=WE(e);return n===t||!G(n)||VE(n)?!1:HE(n).position===`fixed`||wj(n,t)}function Tj(e,t){let n=t.get(e);if(n)return n;let r=KE(e,[],!1).filter(e=>G(e)&&TE(e)!==`body`),i=null,a=HE(e).position===`fixed`,o=a?WE(e):e;for(;G(o)&&!VE(o);){let t=HE(o),n=RE(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||jE(o)&&!n&&wj(e,o))?r=r.filter(e=>e!==o):i=t,o=WE(o)}return t.set(e,r),r}function Ej(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?NE(t)?[]:Tj(t,this._c):[].concat(n),r],o=Cj(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Cj(t,a[e],i);s=zO(n.top,s),c=RO(n.right,c),l=RO(n.bottom,l),u=zO(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Dj(e){let{width:t,height:n}=cj(e);return{width:t,height:n}}function Oj(e,t,n){let r=kE(t),i=DE(t),a=n===`fixed`,o=mj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=HO(0);function l(){c.x=hj(i)}if(r||!r&&!a){if((TE(t)!==`body`||jE(i))&&(s=UE(t)),r){let e=mj(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l()}a&&!r&&i&&l();let u=i&&!r&&!a?gj(i,s):HO(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function kj(e){return HE(e).position===`static`}function Aj(e,t){if(!kE(e)||HE(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return DE(e)===n&&(n=n.ownerDocument.body),n}function jj(e,t){let n=EE(e);if(NE(e))return n;if(!kE(e)){let t=WE(e);for(;t&&!VE(t);){if(G(t)&&!kj(t))return t;t=WE(t)}return n}let r=Aj(e,t);for(;r&&ME(r)&&kj(r);)r=Aj(r,t);return r&&VE(r)&&kj(r)&&!RE(r)?n:r||zE(e)||n}var Mj=async function(e){let t=this.getOffsetParent||jj,n=this.getDimensions,r=await n(e.floating);return{reference:Oj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Nj(e){return HE(e).direction===`rtl`}var Pj={convertOffsetParentRelativeRectToViewportRelativeRect:_j,getDocumentElement:DE,getClippingRect:Ej,getOffsetParent:jj,getElementRects:Mj,getClientRects:vj,getDimensions:Dj,getScale:uj,isElement:G,isRTL:Nj};function Fj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ij(e,t){let n=null,r,i=DE(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=VO(d),h=VO(i.clientWidth-(u+f)),g=VO(i.clientHeight-(d+p)),_=VO(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:zO(0,RO(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Fj(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Lj(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=lj(e),u=i||a?[...l?KE(l):[],...t?KE(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ij(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?mj(e):null;c&&g();function g(){let t=mj(e);h&&!Fj(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Rj=ij,zj=aj,Bj=QA,Vj=sj,Hj=tj,Uj=oj,Wj=(e,t,n)=>{let r=new Map,i={platform:Pj,...n},a={...i.platform,_c:r};return ZA(e,t,{...i,platform:a})},Gj=typeof document<`u`?V.useLayoutEffect:function(){};function Kj(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Kj(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Kj(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function qj(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jj(e,t){let n=qj(e);return Math.round(t*n)/n}function Yj(e){let t=V.useRef(e);return Gj(()=>{t.current=e}),t}function Xj(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=V.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=V.useState(r);Kj(f,r)||p(r);let[m,h]=V.useState(null),[g,_]=V.useState(null),v=V.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=V.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=V.useRef(null),C=V.useRef(null),w=V.useRef(u),T=c!=null,E=Yj(c),D=Yj(i),O=Yj(l),k=V.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Wj(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Kj(w.current,t)&&(w.current=t,WD.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Gj(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=V.useRef(!1);Gj(()=>(A.current=!0,()=>{A.current=!1}),[]),Gj(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=V.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=V.useMemo(()=>({reference:b,floating:x}),[b,x]),N=V.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Jj(M.floating,u.x),r=Jj(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...qj(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return V.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Zj=(e,t)=>{let n=Rj(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qj=(e,t)=>{let n=zj(e);return{name:n.name,fn:n.fn,options:[e,t]}},$j=(e,t)=>({fn:Uj(e).fn,options:[e,t]}),eM=(e,t)=>{let n=Bj(e);return{name:n.name,fn:n.fn,options:[e,t]}},tM=(e,t)=>{let n=Vj(e);return{name:n.name,fn:n.fn,options:[e,t]}},nM=(e,t)=>{let n=Hj(e);return{name:n.name,fn:n.fn,options:[e,t]}},Q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(pl(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},rM=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),iM=t(((e,t)=>{t.exports=rM()})),aM=t((e=>{var t=n(),r=iM();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),oM=t(((e,t)=>{t.exports=aM()})),sM=iM(),cM=oM(),lM=[],uM=void 0;function dM(){return uM}function fM(e){lM.push(e)}function pM(e){let t=(t,n)=>{let r=fl(hM).current,i;try{uM=r;for(let e of lM)e.before(r);i=e(t,n);for(let e of lM)e.after(r);r.didInitialize=!0}finally{uM=void 0}return i};return t.displayName=e.displayName||e.name,t}function mM(e){return V.forwardRef(pM(e))}function hM(){return{didInitialize:!1}}var gM=_l(19)?yM:bM;function _M(e,t,n,r,i){return gM(e,t,n,r,i)}function vM(e,t,n,r,i){let a=V.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,sM.useSyncExternalStore)(e.subscribe,a,a)}fM({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,sM.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function yM(e,t,n,r,i){let a=dM();if(!a)return vM(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function bM(e,t,n,r,i){return(0,cM.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var xM=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return _M(this,e,t,n,r)}},SM=class extends xM{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){V.useDebugValue(e);let n=this;q(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;q(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;q(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){V.useDebugValue(e);let n=this,r=t!==void 0;q(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return V.useDebugValue(e),_M(this,this.selectors[e],t,n,r)}useContextCallback(e,t){V.useDebugValue(e);let n=K(t??dl);this.context[e]=n}useStateSetter(e){let t=V.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},CM={open:Q(e=>e.open),transitionStatus:Q(e=>e.transitionStatus),domReferenceElement:Q(e=>e.domReferenceElement),referenceElement:Q(e=>e.positionReference??e.referenceElement),floatingElement:Q(e=>e.floatingElement),floatingId:Q(e=>e.floatingId)},wM=class extends SM{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:TA(),nested:n,triggerElements:i},CM),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&cO(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function TM(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=V.useRef(null);r===void 0&&f.current===null&&(f.current=new wM({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),q(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};G(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}var EM={tabIndex:-1,[lO]:``};function DM(e,t,n=!1){let r=kD(),i=kA()!=null,a=V.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return TM({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function OM(e,t){let n=V.useRef(null),r=V.useRef(null);return V.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function kM(e,t,n){let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function AM(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=OM(e,n),o=K(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);o===e?n.update({activeTriggerElement:t,...i?r:null}):o==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return q(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function jM(e){let t=e.useState(`open`);q(()=>{if(!t){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let n=e.context.triggerElements.size,r={};if(e.state.triggerCount!==n&&(r.triggerCount=n),!e.select(`activeTriggerId`)&&n===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;r.activeTriggerId=e,r.activeTriggerElement=n}}(r.triggerCount!==void 0||r.activeTriggerId!==void 0)&&e.update(r)},[t,e,e.useState(`triggerCount`)])}function MM(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=VD(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=K(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),s=t.useState(`preventUnmountingOnClose`);return qD({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}function NM(e,t){e.useSyncedValues(t),q(()=>()=>{e.update({activeTriggerProps:Sl,inactiveTriggerProps:Sl,popupProps:Sl})},[e])}function PM(e,t){q(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),q(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var FM=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function IM(){return new wM({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new FM,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function LM(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:IM(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Sl,inactiveTriggerProps:Sl,popupProps:Sl}}function RM(e,t,n=!1){return new wM({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var zM=Q(e=>e.triggerIdProp??e.activeTriggerId),BM=Q(e=>e.openProp??e.open),VM=Q(e=>(e.popupElement?.id??e.floatingId)||void 0);function HM(e,t){return t!==void 0&&BM(e)&&zM(e)===t}function UM(e,t){return HM(e,t)?!0:t!==void 0&&BM(e)&&zM(e)==null&&e.triggerCount===1}var WM={open:BM,mounted:Q(e=>e.mounted),transitionStatus:Q(e=>e.transitionStatus),floatingRootContext:Q(e=>e.floatingRootContext),triggerCount:Q(e=>e.triggerCount),preventUnmountingOnClose:Q(e=>e.preventUnmountingOnClose),payload:Q(e=>e.payload),activeTriggerId:zM,activeTriggerElement:Q(e=>e.mounted?e.activeTriggerElement:null),popupId:VM,isTriggerActive:Q((e,t)=>t!==void 0&&zM(e)===t),isOpenedByTrigger:Q((e,t)=>HM(e,t)),isMountedByTrigger:Q((e,t)=>t!==void 0&&zM(e)===t&&e.mounted),triggerProps:Q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:Q((e,t)=>UM(e,t)?VM(e):void 0),popupProps:Q(e=>e.popupProps),popupElement:Q(e=>e.popupElement),positionerElement:Q(e=>e.positionerElement)};function GM(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=kD(),a=kA()!=null,o=fl(()=>new wM({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new FM,floatingId:i,syncOnly:!1,nested:a})).current;return q(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=G(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function KM(e={}){let{nodeId:t,externalTree:n}=e,r=GM(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=V.useState(null),[f,p]=V.useState(void 0),[m,h]=V.useState(void 0),g=V.useRef(null),_=AA(n),v=V.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=Xj({...e,elements:{...v,...u&&{reference:u}}}),b=G(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=V.useCallback(e=>{let t=G(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=V.useCallback(e=>{(G(e)||e===null)&&(g.current=e,p(e)),(G(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!G(e))&&y.refs.setReference(e)},[y.refs,p]),w=V.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=V.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=V.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=V.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return q(()=>{s&&(g.current=s)},[s]),q(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),V.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var qM=mD&&fD;function JM(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=V.useRef(!1),c=V.useRef(null),l=V.useRef(!0),u=nO();V.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=EE(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&kE(e)&&e===hO(Z(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return AO(X(t,`blur`,r),qM&&X(t,`keydown`,a,!0),qM&&X(t,`pointerdown`,o,!0))},[i,n]),V.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);G(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=V.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=gO(t.nativeEvent);if(G(a)){if(qM&&!t.relatedTarget){if(!l.current&&!bO(a))return}else if(!CO(a))return}let o=_O(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;i.select(`open`)&&o||p===0||p===void 0?i.setOpen(!0,J($T,d,f)):u.start(p,()=>{s.current||i.setOpen(!0,J($T,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=G(n)&&n.hasAttribute(Xk(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=hO(Z(e));!n&&t===e||Y(o.current.floatingContext?.refs.floating.current,t)||Y(e,t)||a||_O(n??t,i.context.triggerElements)||i.setOpen(!1,J($T,r))})}}},[o,r,i,u]);return V.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var YM=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new tO,this.restTimeout=new tO,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},XM=new WeakMap;function ZM(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&XM.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),XM.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function QM(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=XM.get(n);a&&a!==e&&ZM(a),ZM(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,XM.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function $M(e){let t=e.context.dataRef.current,n=fl(()=>t.hoverInteractionState??YM.create()).current;return t.hoverInteractionState||=n,ID(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function eN(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=AA(),d=kA(),f=$M(a),p=nO(),m=K(()=>OO(l.current.openEvent?.type,f.interactedInside)),h=K(()=>kO(l.current.openEvent?.type)),g=K(()=>{ZM(f)});q(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),V.useEffect(()=>g,[g]),q(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&G(c)&&s){let e=c,t=s,n=Z(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,o=f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return QM(f,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),V.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&Jk(u.nodesRef.current,d).length>0)}function t(e){let t=EO(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,J(QT,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=gO(e);xO(t)?f.interactedInside=t?.closest(`[aria-haspopup]`)!=null:f.interactedInside=!1}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,_),g()}function h(n){if(e()&&u){u.events.on(`floating.closed`,_);return}if(_O(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;u&&r&&G(o)&&Jk(u.nodesRef.current,r,!1).some(e=>Y(e.context?.elements.floating,o))||(f.handler?f.handler(n):(g(),m()||t(n)))}function _(t){u&&d&&!e()&&p.start(0,()=>{u.events.off(`floating.closed`,_),a.setOpen(!1,J(QT,t)),u.events.emit(`floating.closed`,t)})}let v=s;return AO(v&&X(v,`mouseenter`,c),v&&X(v,`mouseleave`,h),v&&X(v,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,_)})},[n,s,a,l,r,i,m,g,f,u,d,p])}var tN={current:null};function nN(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=tN,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=AA(l),v=$M(m),y=V.useRef(!1),b=jO(i),x=jO(r),S=jO(o),C=jO(n),w=jO(p),T=jO(f),E=K(()=>OO(h.current.openEvent?.type,v.interactedInside)),D=K(()=>w.current?.()!==!1),O=K((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!Y(e,t);if(!G(n))return!1;let i=n;return r.hasMatchingElement(e=>Y(e,i))&&(!e||!Y(e,i))}),k=K(()=>{v.handler&&=(Z(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=K(()=>{ZM(v)});return u&&(v.handleCloseOptions=b.current?.__options),V.useEffect(()=>k,[k]),V.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===QT,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),V.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=EO(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,J(QT,e)),_?.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,J(QT,e)),_?.events.emit(`floating.closed`,e))}let t=c.current??(u?m.select(`domReferenceElement`):null);if(!G(t))return;function r(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!sO(v.pointerType))return;let t=DO(S.current),n=EO(x.current,`open`,v.pointerType),r=gO(e),i=e.currentTarget??null,o=m.select(`domReferenceElement`),s=i;if(G(r)&&!m.context.triggerElements.hasElement(r)){for(let e of m.context.triggerElements.elements())if(Y(e,r)){s=e;break}}G(i)&&G(o)&&!m.context.triggerElements.hasElement(i)&&Y(i,o)&&(s=o);let c=s!=null&&O(o,s,r),l=m.select(`open`),u=T.current?.()??m.select(`transitionStatus`)===`ending`,d=!l&&u&&y.current,f=!c&&G(s)&&G(o)&&Y(o,s)&&d,p=t>0&&!n,h=c&&(l||d)||f,g=!l||c;h?D()&&m.setOpen(!0,J(QT,e,s)):p||(n?v.openChangeTimeout.start(n,()=>{g&&D()&&m.setOpen(!0,J(QT,e,s))}):g&&D()&&m.setOpen(!0,J(QT,e,s)))}function i(t){if(E()){A();return}k();let n=Z(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let r=h.current.floatingContext??d?.();if(!_O(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select(`open`)||v.openChangeTimeout.clear();let i=c.current;v.handler=b.current({...r,tree:_,x:t.clientX,y:t.clientY,onClose(){A(),k(),C.current&&!E()&&i===m.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,v.handler),v.handler(t)}else v.pointerType===`touch`&&Y(m.select(`floatingElement`),t.relatedTarget)||e(t)}}return s?AO(X(t,`mousemove`,r,{once:!0}),X(t,`mouseenter`,r),X(t,`mouseleave`,i)):AO(X(t,`mouseenter`,r),X(t,`mouseleave`,i))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),V.useMemo(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=m.select(`domReferenceElement`),i=m.select(`open`),o=O(r,n,e.target);if(a&&!sO(v.pointerType))return;if(i&&o&&v.handleCloseOptions?.blockPointerEvents){let e=m.select(`floatingElement`);if(e){let t=v.handleCloseOptions?.getScope?.()??n.ownerDocument.body;QM(v,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=DO(S.current);if(i&&!o||s===0||!o&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function c(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||o)&&D()&&m.setOpen(!0,J(QT,t,n))}v.pointerType===`touch`?WD.flushSync(()=>{c()}):o&&i?c():(v.restTimeoutPending=!0,v.restTimeout.start(s,c))}}},[n,v,E,O,a,m,S,D])}var rN=`Escape`;function iN(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function aN(e,t){return iN(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function oN(e,t,n){return iN(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function sN(e,t,n){return iN(t,n?e===dO:e===fO,e===mO)}function cN(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===rN:iN(t,n?e===fO:e===dO,e===pO)}function lN(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,cols:v=1,id:y,resetOnPointerLeave:b=!0,externalTree:x}=t,S=`rootStore`in e?e.rootStore:e,C=S.useState(`open`),w=S.useState(`floatingElement`),T=S.useState(`domReferenceElement`),E=S.context.dataRef,D=wO(w),O=SO(T),k=jO(D),A=kA(),j=AA(x),M=V.useRef(f),N=V.useRef(o??-1),P=V.useRef(null),F=V.useRef(!0),I=K(e=>{i(N.current===-1?null:N.current,e)}),ee=V.useRef(I),te=V.useRef(!!w),ne=V.useRef(C),L=V.useRef(!1),re=V.useRef(!1),ie=V.useRef(null),ae=jO(h),R=jO(C),oe=jO(o),se=jO(b),ce=BD(),le=BD(),ue=K(()=>{function e(e){d?j?.events.emit(`virtualfocus`,e):ie.current=Qk(e,{sync:L.current,preventScroll:!0})}let t=n.current[N.current],r=re.current;t&&e(t),(L.current?e=>e():e=>ce.request(e))(()=>{let i=n.current[N.current]||t;i&&(t||e(i),ge&&(r||!F.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});q(()=>{E.current.orientation=g},[E,g]),q(()=>{a&&(C&&w?(N.current=o??-1,M.current&&o!=null&&(re.current=!0,I())):te.current&&(N.current=-1,ee.current()))},[a,C,w,o,I]),q(()=>{if(a){if(!C)L.current=!1;else if(w){if(r==null){if(L.current=!1,oe.current!=null)return;if(te.current&&(N.current=-1,ue()),(!ne.current||!te.current)&&M.current&&(P.current!=null||M.current===!0&&P.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>le.request(e):queueMicrotask)(t),e+=1):(N.current=P.current==null||oN(P.current,g,u)||l?pk(n):mk(n),P.current=null,I())};t()}}else fk(n.current,r)||(N.current=r,ue(),re.current=!1)}}},[a,C,w,r,oe,l,n,g,u,I,ue,le]),q(()=>{if(!a||w||!j||d||!te.current)return;let e=j.nodesRef.current,t=e.find(e=>e.id===A)?.context?.elements.floating,n=hO(Z(w)),r=e.some(e=>e.context&&Y(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[a,w,j,A,d]),q(()=>{ee.current=I,ne.current=C,te.current=!!w}),q(()=>{C||(P.current=null,M.current=f)},[C,f]);let de=r!=null,fe=K(e=>{if(!R.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(N.current!==t||r!==t)&&(N.current=t,I(e))}),pe=K(()=>_??j?.nodesRef.current.find(e=>e.id===A)?.context?.dataRef?.current.orientation),me=K(()=>pk(n,ae.current)),he=K(e=>{if(F.current=!1,L.current=!0,e.which===229||!R.current&&e.currentTarget===k.current)return;if(l&&cN(e.key,g,u,v)){aN(e.key,pe())||rO(e),S.setOpen(!1,J(pE,e.nativeEvent)),kE(T)&&(d?j?.events.emit(`virtualfocus`,T):T.focus());return}let t=N.current,r=pk(n,h),i=mk(n,h);if(O||(e.key===`Home`&&(rO(e),N.current=r,I(e)),e.key===`End`&&(rO(e),N.current=i,I(e))),v>1){let t=Array.from({length:n.current.length},()=>({width:1,height:1})),a=_k(t,v,!1),o=a.findIndex(e=>e!=null&&!bk(n.current,e,h)),s=a.reduce((e,t,r)=>t!=null&&!bk(n.current,t,h)?r:e,-1),l=a[gk(a.map(e=>e==null?null:n.current[e]),{event:e,orientation:g,loopFocus:c,rtl:u,cols:v,disabledIndices:yk([...(typeof h==`function`?null:h)||n.current.map((e,t)=>bk(n.current,t,h)?t:void 0),void 0],a),minIndex:o,maxIndex:s,prevIndex:vk(N.current>i?r:N.current,t,a,v,e.key===`ArrowDown`?`bl`:e.key===(u?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(l!=null&&(N.current=l,I(e)),g===`both`)return}if(aN(e.key,g)){if(rO(e),C&&!d&&hO(e.currentTarget.ownerDocument)===e.currentTarget){N.current=oN(e.key,g,u)?r:i,I(e);return}oN(e.key,g,u)?c?t>=i?s&&t!==n.current.length?N.current=-1:(L.current=!1,N.current=r):N.current=hk(n.current,{startingIndex:t,disabledIndices:h}):N.current=Math.min(i,hk(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?N.current=n.current.length:(L.current=!1,N.current=i):N.current=hk(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):N.current=Math.max(r,hk(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),fk(n.current,N.current)&&(N.current=-1),I(e)}}),ge=V.useMemo(()=>({onFocus(e){L.current=!0,fe(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){L.current=!0,re.current=!1,p&&fe(e)},onPointerLeave(e){if(!R.current||!F.current||e.pointerType===`touch`)return;L.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&se.current&&(ie.current?.(),ie.current=null,N.current=-1,I(e),!d)){let e=k.current,t=hO(Z(e));e&&Y(e,t)&&e.focus({preventScroll:!0})}}}),[fe,R,k,p,n,I,se,d]),_e=V.useMemo(()=>d&&C&&de&&{"aria-activedescendant":`${y}-${r}`},[d,C,de,y,r]),ve=V.useMemo(()=>({"aria-orientation":g===`both`?void 0:g,...O?{}:_e,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&C&&!d){let t=gO(e.nativeEvent);if(t&&!Y(k.current,t))return;rO(e),S.setOpen(!1,J(dE,e.nativeEvent)),kE(T)&&T.focus()}else he(e)},onPointerMove(){F.current=!0}}),[_e,he,k,g,O,S,C,d,T]),ye=V.useMemo(()=>{function e(e){S.setOpen(!0,J(pE,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&aO(e.nativeEvent)&&(M.current=!d)}function n(e){M.current=f,f===`auto`&&oO(e.nativeEvent)&&(M.current=!0)}return{onKeyDown(t){let n=S.select(`open`);F.current=!1;let r=t.key.startsWith(`Arrow`),i=sN(t.key,pe(),u),a=aN(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return he(t);if(n||m||!r){if(o){let e=aN(t.key,pe());P.current=l&&e?null:t.key}l?i&&(rO(t),n?(N.current=me(),I(t)):e(t)):a&&(oe.current!=null&&(N.current=oe.current),rO(t),!n&&m?e(t):he(t),n&&I(t))}},onFocus(e){S.select(`open`)&&!d&&(N.current=-1,I(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[he,f,me,l,I,S,m,g,pe,u,oe,d]),be=V.useMemo(()=>({..._e,...ye}),[_e,ye]);return V.useMemo(()=>a?{reference:be,floating:ve,item:ge,trigger:ye}:{},[a,be,ve,ye,ge])}function uN(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,onTyping:o,enabled:s=!0,resetMs:c=750,selectedIndex:l=null}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=nO(),p=V.useRef(``),m=V.useRef(l??i??-1),h=V.useRef(null),g=K(e=>{function t(e){let t=r?.current[e];return!t||Sk(t)}function s(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(e[r]?.toLocaleLowerCase().startsWith(a)&&t(r))return r}return-1}let u=n.current;if(p.current.length>0&&e.key===` `&&(rO(e),o?.(!0)),p.current.length>0&&p.current[0]!==` `&&s(u,p.current)===-1&&e.key!==` `&&o?.(!1),u==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;d&&e.key!==` `&&(rO(e),o?.(!0));let g=p.current===``;g&&(m.current=l??i??-1),u.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&p.current===e.key&&(p.current=``,m.current=h.current),p.current+=e.key,f.start(c,()=>{p.current=``,m.current=h.current,o?.(!1)});let _=((g?l??i??-1:m.current)??0)+1,v=s(u,p.current,_);v===-1?e.key!==` `&&(p.current=``,o?.(!1)):(a?.(v),h.current=v)}),_=K(e=>{let t=e.relatedTarget,n=u.select(`domReferenceElement`),r=u.select(`floatingElement`);Y(n,t)||Y(r,t)||(f.clear(),p.current=``,m.current=h.current,o?.(!1))});q(()=>{(d||l===null)&&(f.clear(),h.current=null,p.current!==``&&(p.current=``))},[d,l,f]),q(()=>{d&&p.current===``&&(m.current=l??i??-1)},[d,l,i]);let v=V.useMemo(()=>({onKeyDown:g,onBlur:_}),[g,_]);return V.useMemo(()=>s?{reference:v,floating:v}:{},[s,v])}var dN=.1,fN=dN*dN,pN=.5;function mN(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function hN(e,t,n,r,i,a,o,s,c,l){let u=!1;return mN(e,t,n,r,i,a)&&(u=!u),mN(e,t,i,a,o,s)&&(u=!u),mN(e,t,o,s,c,l)&&(u=!u),mN(e,t,c,l,n,r)&&(u=!u),u}function gN(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function _N(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function vN(e={}){let{blockPointerEvents:t=!1}=e,n=new tO,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*fN;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=gO(r),g=r.type===`mouseleave`,_=Y(u,h),v=Y(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&G(r.relatedTarget)&&Y(u,r.relatedTarget))return;function y(){return!!(s&&Jk(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=_N(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=_N(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=_N(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=_N(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!gN(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?pN/2:pN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+pN+1,o=C||T?S.bottom-pN:S.top,s=C?T?S.bottom-pN:S.top:S.bottom-pN;M=hN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?pN/2:pN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-pN,o=C||T?S.top+pN:S.bottom,s=C?T?S.top+pN:S.bottom:S.top+pN;M=hN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?pN/2:pN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+pN+1,o=w||E?S.right-pN:S.left,s=w?E?S.right-pN:S.left:S.right-pN;M=hN(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?pN/2:pN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-pN,o=w||E?S.left+pN:S.right,s=w?E?S.left+pN:S.right:S.left+pN;M=hN(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var yN=V.createContext(void 0);function bN(e){let t=V.useContext(yN);if(t===void 0&&!e)throw Error(pl(69));return t}var xN=`ArrowUp`,SN=`ArrowDown`,CN=`ArrowLeft`,wN=`ArrowRight`,TN=`Home`,EN=new Set([CN,wN]),DN=new Set([CN,wN,TN,`End`]),ON=new Set([xN,SN]),kN=new Set([xN,SN,TN,`End`]),AN=new Set([...EN,...ON]),jN=new Set([...AN,TN,`End`]),MN=`Shift`,NN=new Set([MN,`Control`,`Alt`,`Meta`]);function PN(e){return kE(e)&&e.tagName===`INPUT`}function FN(e){return!!(PN(e)&&e.selectionStart!=null||kE(e)&&e.tagName===`TEXTAREA`)}function IN(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=LN(e,t,`left`),a=RN(e),o=RN(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginRight<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=LN(e,t,`top`),r=RN(e),i=RN(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function LN(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function RN(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function zN(e){return e===`starting`?dA:Sl}var BN={...qT,...LT},VN=V.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=NT(),{side:c,align:l}=jT(),u=bN(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`activeTriggerElement`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=_.type===`context-menu`;qD({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),V.useEffect(()=>{function e(e){s.setOpen(!1,J(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]),eN(b,{enabled:w&&!T&&!E&&_.type!==`menubar`,closeDelay:S});let D=V.useCallback(e=>{s.set(`popupElement`,e)},[s]),O={transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},k=vl(`div`,e,{state:O,ref:[t,s.context.popupRef,D],stateAttributesMapping:BN,props:[p,{onKeyDown(e){u&&jN.has(e.key)&&e.stopPropagation()}},zN(f),o,{"data-rootownerid":y}]}),A=_.type===void 0||E;return(g||_.type===`menubar`&&v!==`outside-press`)&&(A=!0),(0,H.jsx)(HA,{context:b,modal:E,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})}),HN=V.createContext(void 0);function UN(){let e=V.useContext(HN);if(e===void 0)throw Error(pl(32));return e}var WN=V.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=NT();return i.useState(`mounted`)||n?(0,H.jsx)(HN.Provider,{value:n,children:(0,H.jsx)(wA,{ref:t,...r})}):null});function GN(e){return _l(19)?e:e?`true`:void 0}var KN=V.createContext(void 0);function qN(){return V.useContext(KN)?.direction??`ltr`}var JN=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=GO(e,t)||{};if(l==null)return{};let f=lk(u),p={x:n,y:r},m=ZO(i),h=YO(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];w&&await o.isElement?.(C)||(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=WO(k,j,A),N=!c.arrow&&qO(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),YN=(e,t)=>({...JN(e),options:[e,t]}),XN={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await nM().fn(e)).data?.referenceHidden||a}}}},ZN={sideX:`left`,sideY:`top`},QN={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=EE(i),l=c.getComputedStyle(i);if(l.transitionDuration===`0s`||l.transitionDuration===``)return{x:t,y:n,data:ZN};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=Z(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=KO(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:ZN.sideX,g=f===`top`?`bottom`:ZN.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function $N(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function eP(e,t,n){let{rects:r,placement:i}=e;return{side:$N(t,KO(i),n),align:qO(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function tP(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=V.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=K(D),k=D?O:t,A=jO(t),j=jO(h),M=qN()===`rtl`,N=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],P=a===`center`?N:`${N}-${a}`,F=c,I=+(r===`bottom`),ee=+(r===`top`),te=+(r===`right`),ne=+(r===`left`);typeof F==`number`?F={top:F+I,right:F+ne,bottom:F+ee,left:F+te}:F&&={top:(F.top||0)+I,right:(F.right||0)+ne,bottom:(F.bottom||0)+ee,left:(F.left||0)+te};let L={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:F},re=V.useRef(null),ie=jO(i),ae=jO(o),R=typeof i==`function`?0:i,oe=typeof o==`function`?0:o,se=[];f&&se.push(f),se.push(Zj(e=>{let t=eP(e,r,M),n=typeof ie.current==`function`?ie.current(t):ie.current,i=typeof ae.current==`function`?ae.current(t):ae.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[R,oe,M,r]));let ce=T===`none`&&w!==`shift`,le=!ce&&(l||_||w===`shift`),ue=w===`none`?null:eM({...L,padding:{top:F.top+1,right:F.right+1,bottom:F.bottom+1,left:F.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),de=ce?null:Qj(e=>{let t=Z(e.elements.floating).documentElement;return{...L,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:le,limiter:l||_?void 0:$j(e=>{if(!re.current)return{};let{width:t,height:n}=re.current.getBoundingClientRect(),r=XO(KO(e.placement)),i=r===`y`?t:n,a=r===`y`?F.left+F.right:F.top+F.bottom;return{offset:i/2+a/2}})}},[L,l,_,F,T]);w===`shift`||T===`shift`||a===`center`?se.push(de,ue):se.push(ue,de),se.push(tM({...L,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=EE(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),YN(e=>({element:re.current||Z(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=KO(a),l=XO(c),u=re.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(eP(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,le&&l===`y`&&b?S:x),{}}},XN,y),q(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let fe=V.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:pe,elements:me,x:he,y:ge,middlewareData:_e,update:ve,placement:ye,context:be,isPositioned:xe,floatingStyles:Se}=KM({rootContext:m,open:p?h:void 0,placement:P,middleware:se,strategy:n,whileElementsMounted:p?void 0:(...e)=>Lj(...e,fe),nodeId:v,externalTree:x}),{sideX:Ce,sideY:we}=_e.adaptiveOrigin||ZN,Te=xe?n:`fixed`,Ee=V.useMemo(()=>{let e=y?{position:Te,[Ce]:he,[we]:ge}:{position:Te,...Se};return xe||(e.opacity=0),e},[y,Te,Ce,he,we,ge,Se,xe]),De=V.useRef(null);q(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(nP(t)?t.current:t)||null;n!==De.current&&(pe.setPositionReference(n),De.current=n)},[h,pe,k,A]),V.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&nP(e)&&e.current!==De.current&&(pe.setPositionReference(e.current),De.current=e.current)},[h,pe,k,A]),V.useEffect(()=>{if(p&&h&&me.domReference&&me.floating)return Lj(me.domReference,me.floating,ve,fe)},[p,h,me,ve,fe]);let Oe=KO(ye),ke=$N(r,Oe,M),Ae=qO(ye)||`center`,je=!!_e.hide?.referenceHidden;q(()=>{b&&h&&xe&&C(Oe)},[b,h,xe,Oe]);let Me=V.useMemo(()=>({position:`absolute`,top:_e.arrow?.y,left:_e.arrow?.x}),[_e.arrow]),Ne=_e.arrow?.centerOffset!==0;return V.useMemo(()=>({positionerStyles:Ee,arrowStyles:Me,arrowRef:re,arrowUncentered:Ne,side:ke,align:Ae,physicalSide:Oe,anchorHidden:je,refs:pe,context:be,isPositioned:xe,update:ve}),[Ee,Me,re,Ne,ke,Ae,Oe,je,pe,be,xe,ve])}function nP(e){return e!=null&&`current`in e}function rP(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=K(i),o=V.useRef(0),s=fl(aP).current,c=fl(iP).current,[l,u]=V.useState(0),d=V.useRef(l),f=K((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=K(e=>{c.delete(e),d.current+=1,u(d.current)}),m=V.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(oP).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);q(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),q(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),q(()=>()=>{n.current=[]},[n]),q(()=>()=>{r&&(r.current=[])},[r]);let h=K(e=>(s.add(e),()=>{s.delete(e)}));q(()=>{s.forEach(e=>e(m))},[s,m]);let g=V.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,H.jsx)(SD.Provider,{value:g,children:t})}function iP(){return new Map}function aP(){return new Set}function oP(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var sP=V.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,H.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function cP(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),vl(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},zN(r),i],stateAttributesMapping:qT})}var lP={},uP={},dP=``;function fP(e){if(typeof document>`u`)return!1;let t=Z(e);return EE(t).innerWidth-t.documentElement.clientWidth>0}function pP(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Z(e),n=t.documentElement,r=t.body,i=jE(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function mP(e){let t=Z(e),n=t.documentElement,r=t.body,i=jE(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function hP(e){let t=Z(e),n=t.documentElement,r=t.body,i=EE(n),a=0,o=0,s=!1,c=zD.create();if(lD&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,lP={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},dP=n.style.scrollBehavior,uP={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=jE(n)?n:r;s=pP(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,lP),Object.assign(r.style,uP),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=dP)}function d(){u(),c.request(l)}l();let f=X(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var gP=new class{lockCount=0;restore=null;timeoutLock=tO.create();timeoutUnlock=tO.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Z(e).documentElement,n=EE(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=dl;return}let r=uD||!fP(e);this.restore=r?mP(e):hP(e)}};function _P(e=!0,t=null){q(()=>{if(e)return gP.acquire(t)},[e,t])}var vP=20;function yP(e,t,n,r){let[i,a]=V.useState(!1);q(()=>{if(!e||!t||n==null){a(!1);return}let r=Z(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-vP)},[e,t,n]),_P(e&&(!t||i),r)}var bP=V.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=_A,style:g,..._}=e,{store:v}=NT(),y=UN(),b=YT(!0),x=v.useState(`parent`),S=v.useState(`floatingRootContext`),C=v.useState(`floatingTreeRoot`),w=v.useState(`mounted`),T=v.useState(`open`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`activeTriggerElement`),k=v.useState(`transitionStatus`),A=v.useState(`positionerElement`),j=v.useState(`instantType`),M=v.useState(`hasViewport`),N=v.useState(`lastOpenChangeReason`),P=v.useState(`floatingNodeId`),F=v.useState(`floatingParentNodeId`),I=S.useState(`domReferenceElement`),ee=V.useRef(null),te=KD(A,!1,!1),ne=n,L=c,re=l,ie=s,ae=h;x.type===`context-menu`&&(ne=n??x.context?.anchor,ie??=`start`,!o&&ie!==`center`&&(re=e.alignOffset??2,L=e.sideOffset??-5));let R=o,oe=ie;x.type===`menu`?(R??=`inline-end`,oe??=`start`,ae=e.collisionAvoidance??vA):x.type===`menubar`&&(R??=`bottom`,oe??=`start`);let se=x.type===`context-menu`,ce=tP({anchor:ne,floatingRootContext:S,positionMethod:b?`fixed`:r,mounted:w,side:R,sideOffset:L,align:oe,alignOffset:re,arrowPadding:se?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:P,keepMounted:y,disableAnchorTracking:m,collisionAvoidance:ae,shiftCrossAxis:se&&!(`side`in ae&&ae.side===`flip`),externalTree:C,adaptiveOrigin:M?QN:void 0});V.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===P&&v.set(`hoverEnabled`,!1),e.nodeId!==P&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,J(_E)))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[v,C.events,P]),V.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,J(t))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[C.events,v]);let le=nO();V.useEffect(()=>{T||le.clear()},[T,le]),V.useEffect(()=>{function e(e){if(T&&e.nodeId===v.select(`floatingParentNodeId`)){if(e.target&&O&&O!==e.target){let e=v.select(`closeDelay`);e>0?le.isStarted()||le.start(e,()=>{v.setOpen(!1,J(_E))}):v.setOpen(!1,J(_E))}else le.clear()}}return C.events.on(`itemhover`,e),()=>{C.events.off(`itemhover`,e)}},[C.events,T,O,v,le]),V.useEffect(()=>{let e={open:T,nodeId:P,parentNodeId:F,reason:v.select(`lastOpenChangeReason`)};C.events.emit(`menuopenchange`,e)},[C.events,T,v,P,F]),q(()=>{let e=I,t=ee.current;if(e&&(ee.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return te(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[I,te,v]);let ue={open:T,side:ce.side,align:ce.align,anchorHidden:ce.anchorHidden,nested:x.type===`menu`,instant:j},de=x.type===`menubar`&&x.context.modal;yP(T&&(de||E&&N!==`trigger-hover`),D===`touch`,A,O);let fe=cP(e,ue,{styles:ce.positionerStyles,transitionStatus:k,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!w,inert:!T}),pe=w&&x.type!==`menu`&&(x.type!==`menubar`&&E&&N!==`trigger-hover`||x.type===`menubar`&&x.context.modal),me=null;return x.type===`menubar`?me=x.context.contentElement:x.type===void 0&&(me=O),(0,H.jsxs)(AT.Provider,{value:ce,children:[pe&&(0,H.jsx)(sP,{ref:x.type===`context-menu`||x.type===`nested-context-menu`?x.context.internalBackdropRef:null,inert:GN(!T),cutout:me}),(0,H.jsx)(MA,{id:P,children:(0,H.jsx)(rP,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,children:fe})})]})}),xP=V.createContext(void 0);function SP(){let e=V.useContext(xP);if(e===void 0)throw Error(pl(34));return e}var CP=V.memo(V.forwardRef(function(e,t){let{render:n,className:r,value:i,defaultValue:a,onValueChange:o,disabled:s=!1,style:c,"aria-labelledby":l,...u}=e,[d,f]=V.useState(void 0),[p,m]=xE({controlled:i,default:a,name:`MenuRadioGroup`}),h=K((e,t)=>{o?.(e,t),!t.isCanceled&&m(e)}),g=vl(`div`,e,{state:{disabled:s},ref:t,props:{role:`group`,"aria-labelledby":l??d,"aria-disabled":s||void 0,...u}}),_=V.useMemo(()=>({value:p,setValue:h,disabled:s}),[p,h,s]);return(0,H.jsx)(YD.Provider,{value:f,children:(0,H.jsx)(xP.Provider,{value:_,children:g})})})),wP=V.createContext(void 0);function TP(){let e=V.useContext(wP);if(e===void 0)throw Error(pl(35));return e}var EP=V.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!1,value:l,style:u,...d}=e,f=TD({label:a}),p=jT(!0),m=AD(i),{store:h}=NT(),g=h.useState(`isActive`,f.index),_=h.useState(`itemProps`),{value:v,setValue:y,disabled:b}=SP(),x=b||s,S=v===l,{getItemProps:C,itemRef:w}=xD({closeOnClick:c,disabled:x,highlighted:g,id:m,store:h,nativeButton:o,nodeId:p?.context.nodeId,itemMetadata:bD}),T=V.useMemo(()=>({disabled:x,highlighted:g,checked:S}),[x,g,S]);function E(e){let t=J(tE,e.nativeEvent,void 0,{preventUnmountOnClose(){}});y(l,t)}let D=vl(`div`,e,{state:T,stateAttributesMapping:MD,props:[_,{role:`menuitemradio`,"aria-checked":S,onClick:E},d,C],ref:[w,t,f.ref]});return(0,H.jsx)(wP.Provider,{value:T,children:D})}),DP=V.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=TP(),c=V.useRef(null),{transitionStatus:l,setMounted:u}=VD(s.checked);qD({open:s.checked,ref:c,onComplete(){s.checked||u(!1)}});let d={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return vl(`span`,e,{state:d,stateAttributesMapping:MD,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||s.checked})});function OP(e){let t=V.useRef(!0);t.current&&(t.current=!1,e())}var kP=V.createContext(null);function AP(e){let t=V.useContext(kP);if(t===null&&!e)throw Error(pl(5));return t}function jP(e){let t=V.useRef(``),n=V.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:V.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function MP(e,t){let n=V.useRef(e),r=K(t);q(()=>{n.current!==e&&r(n.current)},[e,r]),q(()=>{n.current=e},[e])}function NP(e,t){let{onClick:n,onPointerDown:r}=jP(K((n,r)=>{(typeof e==`function`?e():e)||t(r||(uD?`touch`:``))}));return V.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function PP(e){let[t,n]=V.useState(null),r=NP(e,n);return MP(e,t=>{t&&!e&&n(null)}),V.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var FP={...WM,disabled:Q(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:Q(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:Q(e=>e.openMethod),allowMouseEnter:Q(e=>e.allowMouseEnter),stickIfOpen:Q(e=>e.stickIfOpen),parent:Q(e=>e.parent),rootId:Q(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:Q(e=>e.activeIndex),isActive:Q((e,t)=>e.activeIndex===t),hoverEnabled:Q(e=>e.hoverEnabled),instantType:Q(e=>e.instantType),lastOpenChangeReason:Q(e=>e.openChangeReason),floatingTreeRoot:Q(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:Q(e=>e.floatingNodeId),floatingParentNodeId:Q(e=>e.floatingParentNodeId),itemProps:Q(e=>e.itemProps),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport),keyboardEventRelay:Q(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},IP=class e extends SM{constructor(e){super({...LP(),...e},{positionerRef:V.createRef(),popupRef:V.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:V.createRef(),beforeContentFocusGuardRef:V.createRef(),onOpenChangeComplete:void 0,triggerElements:new FM},FP),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef}else e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=fl(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function LP(){return{...LM(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new EA,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Sl,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var RP=V.createContext(void 0);function zP(){return V.useContext(RP)}var BP=pM(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:h=!0}=e,g=YT(!0),_=NT(!0),v=AP(!0),y=zP(),b=V.useMemo(()=>y&&_?{type:`menu`,store:_.store}:v?{type:`menubar`,context:v}:g&&!_?{type:`context-menu`,context:g}:{type:void 0},[g,_,v,y]),x=IP.useStore(f?.store,{open:a,openProp:n,activeTriggerId:m,triggerIdProp:p,parent:b});OP(()=>{n===void 0&&x.state.open===!1&&a===!0&&x.update({open:!0,activeTriggerId:m})}),x.useControlledProp(`openProp`,n),x.useControlledProp(`triggerIdProp`,p),x.useContextCallback(`onOpenChangeComplete`,i);let S=kD(),C=kD(),w=x.useState(`floatingTreeRoot`),T=jA(w),E=kA(),D=x.useState(`open`),O=x.useState(`activeTriggerElement`),k=x.useState(`positionerElement`),A=x.useState(`hoverEnabled`),j=x.useState(`disabled`),M=x.useState(`lastOpenChangeReason`),N=x.useState(`parent`),P=x.useState(`activeIndex`),F=x.useState(`payload`),I=x.useState(`floatingParentNodeId`),ee=V.useRef(null),te=V.useRef(N.type!==`context-menu`),ne=nO(),L=V.useRef(!0),re=nO(),ie=I!=null,{openMethod:ae,triggerProps:R}=PP(D);x.useSyncedValues({disabled:o,modal:N.type===void 0?s:void 0,openMethod:ae,rootId:S}),jM(x);let{forceUnmount:oe}=MM(D,x,()=>{x.update({allowMouseEnter:!1,stickIfOpen:!0})});q(()=>{g&&!_?x.update({parent:{type:`context-menu`,context:g},floatingNodeId:T,floatingParentNodeId:E}):_&&x.update({floatingNodeId:T,floatingParentNodeId:E})},[g,_,T,E,x]),V.useEffect(()=>{D||(ee.current=null),N.type===`context-menu`&&(D?ne.start(500,()=>{te.current=!0}):(ne.clear(),te.current=!1))},[ne,D,N.type]),q(()=>{!D&&!A&&x.set(`hoverEnabled`,!0)},[D,A,x]);let se=K((e,t)=>{let n=t.reason;if(D===e&&t.trigger===O&&M===n||(t.preventUnmountOnClose=()=>{x.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=O??void 0),r?.(e,t),t.isCanceled))return;x.state.floatingRootContext.dispatchOpenChange(e,t);let i=t.event;if(e===!1&&i?.type===`click`&&i.pointerType===`touch`&&!L.current)return;if(!e&&P!==null){let e=x.context.itemDomElements.current[P];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(L.current=!1,re.start(300,()=>{L.current=!0})):(L.current=!0,re.clear());let a=(n===`trigger-press`||n===`item-press`)&&i.detail===0&&i?.isTrusted,o=!e&&(n===`escape-key`||n==null),s={open:e,openChangeReason:n};ee.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),x.update(s),N.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?x.set(`instantType`,`group`):a||o?x.set(`instantType`,a?`click`:`dismiss`):x.set(`instantType`,void 0)}),ce=TM({popupStore:x,floatingId:C,nested:E!=null,onOpenChange:se}),le=ce.context.events;V.useEffect(()=>{let e=({open:e,eventDetails:t})=>se(e,t);return le.on(`setOpen`,e),()=>{le?.off(`setOpen`,e)}},[le,se]);let ue=V.useCallback(()=>{x.setOpen(!1,J(yE))},[x]);V.useImperativeHandle(u,()=>({unmount:oe,close:ue}),[oe,ue]);let de;N.type===`context-menu`&&(de=N.context),V.useImperativeHandle(de?.positionerRef,()=>k,[k]),V.useImperativeHandle(de?.actionsRef,()=>({setOpen:se}),[se]);let fe=qA(ce,{enabled:!j,bubbles:{escapeKey:d&&N.type===`menu`},outsidePress(){return N.type!==`context-menu`||ee.current?.type===`contextmenu`||te.current},externalTree:ie?w:void 0}),pe=qN(),me=V.useCallback(e=>{x.select(`activeIndex`)!==e&&x.set(`activeIndex`,e)},[x]),he=lN(ce,{enabled:!j,listRef:x.context.itemDomElements,activeIndex:P,nested:N.type!==void 0,loopFocus:c,orientation:l,parentOrientation:N.type===`menubar`?N.context.orientation:void 0,rtl:pe===`rtl`,disabledIndices:yl,onNavigate:me,openOnArrowKeyDown:N.type!==`context-menu`,externalTree:ie?w:void 0,focusItemOnHover:h}),ge=V.useCallback(e=>{x.context.typingRef.current=e},[x]),_e=uN(ce,{listRef:x.context.itemLabels,elementsRef:x.context.itemDomElements,activeIndex:P,resetMs:500,onMatch:e=>{D&&e!==P&&x.set(`activeIndex`,e)},onTyping:ge});NM(x,{floatingRootContext:ce,activeTriggerProps:V.useMemo(()=>{let e=gl(_e.reference,he.reference,fe.reference,{onMouseMove(){x.set(`allowMouseEnter`,!0)}},R);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=D,e},[x,_e.reference,he.reference,fe.reference,R,D]),inactiveTriggerProps:V.useMemo(()=>{let e=gl(he.trigger,fe.trigger,R);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[he.trigger,fe.trigger,R]),popupProps:V.useMemo(()=>gl(EM,{id:C,role:`menu`,"aria-labelledby":O?.id,onMouseMove(){x.set(`allowMouseEnter`,!0),N.type===`menu`&&x.set(`hoverEnabled`,!1)},onClick(){x.select(`hoverEnabled`)&&x.set(`hoverEnabled`,!1)},onKeyDown(e){let t=x.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},_e.floating,he.floating,fe.floating),[O,C,N.type,x,_e.floating,he.floating,fe.floating]),itemProps:he.item??Sl});let ve=V.useMemo(()=>({store:x,parent:b}),[x,b]),ye=(0,H.jsx)(MT.Provider,{value:ve,children:typeof t==`function`?t({payload:F}):t});return N.type===void 0||N.type===`context-menu`?(0,H.jsx)(NA,{externalTree:w,children:ye}):ye});function VP(e){let t=NT().store,n=V.useMemo(()=>({parentMenu:t}),[t]);return(0,H.jsx)(RP.Provider,{value:n,children:(0,H.jsx)(BP,{...e})})}function HP(e){let t=e.getBoundingClientRect(),n=EE(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function UP(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=eD(),{ref:i,index:a}=TD(e),o=n===a,s=V.useRef(null),c=wl(i,s);return{compositeProps:V.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}function WP(e){let{render:t,className:n,style:r,state:i=Sl,props:a=yl,refs:o=yl,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=UP({metadata:s});return vl(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}function GP(e){if(kE(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!VE(e))return GP(WE(e))}function KP(e,t){let n=V.useRef(null);function r(t){WD.flushSync(()=>{e.setOpen(!1,J(dE,t.nativeEvent,t.currentTarget))}),Wk(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&Gk(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{WD.flushSync(()=>{e.setOpen(!1,J(dE,n.nativeEvent,n.currentTarget))});let i=Uk(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&Y(r,i);){let e=i;if(i=Bk(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function qP(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=V.useRef(!1);return V.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,Z(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:Sl,[t,n,r])}var JP=2,YP=mM(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=NT(!0),h=d?.store??m?.store;if(!h)throw Error(pl(85));let g=AD(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=V.useRef(null),S=ZP(),C=eD(!0),w=AA(),T=V.useMemo(()=>w??new EA,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=AM(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:jA(T),floatingParentNodeId:kA(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=nD({disabled:A,native:o});V.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=V.useRef(null),P=nO(),F=K(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(Y(N.current,t)||Y(h.select(`positionerElement`),t)||t===N.current||t!=null&&GP(t)===h.select(`rootId`))return;let n=HP(N.current);e.clientX>=n.left-JP&&e.clientX<=n.right+JP&&e.clientY>=n.top-JP&&e.clientY<=n.bottom+JP||T.events.emit(`close`,{domEvent:e,reason:gE})});V.useEffect(()=>{y&&h.select(`lastOpenChangeReason`)===`trigger-hover`&&Z(N.current).addEventListener(`mouseup`,F,{once:!0})},[y,F,h]);let I=O&&S.context.hasSubmenuOpen,ee=nN(v,{enabled:(c??I)&&!A&&S.type!==`context-menu`&&(!O||I&&!D),handleClose:vN({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),te=XP(y,h.select(`lastOpenChangeReason`)),ne=UA(v,{enabled:!A&&S.type!==`context-menu`,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&te}),L=JM(v,{enabled:!A&&I}),re=qP({open:y,enabled:O,mouseDownAction:`open`}),ie=V.useMemo(()=>gl(L.reference,ne.reference),[L.reference,ne.reference]),ae=h.useState(`triggerProps`,D),{preFocusGuardRef:R,handlePreFocusGuardFocus:oe,handleFocusTargetFocus:se}=KP(h,x),ce={disabled:A,open:y},le=[N,t,M,E,x],ue=[ie,ee??Sl,ae,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),Z(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},O?{role:`menuitem`}:{},re,p,j],de=vl(`button`,e,{enabled:!O,stateAttributesMapping:KT,state:ce,ref:le,props:ue});return O?(0,H.jsx)(WP,{tag:`button`,render:n,className:r,style:i,state:ce,refs:le,props:ue,stateAttributesMapping:KT}):y?(0,H.jsxs)(V.Fragment,{children:[(0,H.jsx)(IO,{ref:R,onFocus:oe},`${g}-pre-focus-guard`),(0,H.jsx)(V.Fragment,{children:de},g),(0,H.jsx)(IO,{ref:h.context.triggerFocusTargetRef,onFocus:se},`${g}-post-focus-guard`)]}):(0,H.jsx)(V.Fragment,{children:de},g)});function XP(e,t){let n=nO(),[r,i]=V.useState(!1);return q(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function ZP(){let e=YT(!0),t=NT(!0),n=AP(!0);return V.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}var QP=V.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return vl(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})}),$P=V.forwardRef(function(e,t){let{render:n,className:r,style:i,label:a,id:o,nativeButton:s=!1,openOnHover:c=!0,delay:l=100,closeDelay:u=0,disabled:d=!1,...f}=e,p=TD(),m=jT(),{store:h}=NT(),g=AD(o),_=h.useState(`open`),v=h.useState(`floatingRootContext`),y=h.useState(`floatingTreeRoot`),b=h.useState(`triggerPopupId`,g),x=OM(g,h),S=V.useCallback(e=>{let t=x(e);return e!==null&&h.select(`open`)&&h.select(`activeTriggerId`)==null&&h.update({activeTriggerId:g,activeTriggerElement:e,closeDelay:u}),t},[x,u,h,g]),C=V.useRef(null),w=V.useCallback(e=>{C.current=e,h.set(`activeTriggerElement`,e)},[h]),T=zP();if(!T?.parentMenu)throw Error(pl(37));h.useSyncedValue(`closeDelay`,u);let E=T.parentMenu,D=E.useState(`itemProps`),O=E.useState(`isActive`,p.index),k=V.useMemo(()=>({type:`submenu-trigger`,setActive(){E.set(`activeIndex`,p.index)}}),[E,p.index]),A=h.useState(`disabled`),j=d||A,{getItemProps:M,itemRef:N}=xD({closeOnClick:!1,disabled:j,highlighted:O,id:g,store:h,typingRef:E.context.typingRef,nativeButton:s,itemMetadata:k,nodeId:m?.context.nodeId}),P=h.useState(`hoverEnabled`),F=E.useState(`allowMouseEnter`),I=nN(v,{enabled:P&&c&&!j,handleClose:vN({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:l,delay:F?{open:l,close:u}:0,triggerElementRef:C,externalTree:y,isClosing:()=>h.select(`transitionStatus`)===`ending`}),ee=UA(v,{enabled:!j,event:`mousedown`,toggle:!c,ignoreMouse:c,stickIfOpen:!1}).reference??Sl,te=h.useState(`triggerProps`,!0);return delete te.id,vl(`div`,e,{state:{disabled:j,highlighted:O,open:_},stateAttributesMapping:GT,props:[ee,I,te,D,{"aria-controls":b,tabIndex:_||O?0:-1,onBlur(){O&&E.set(`activeIndex`,null)}},f,M],ref:[t,p.ref,N,S,w]})}),eF=hl(`[--control-icon-color:currentColor] [&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-[var(--control-radius)] border font-medium text-base outline-none transition-[box-shadow,scale] [&:not([aria-haspopup]):not(:disabled):not([aria-disabled=true])]:hover:will-change-[scale] [&:active:not([aria-haspopup])]:scale-[0.97] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--control-radius)-1px)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 aria-disabled:cursor-not-allowed aria-disabled:opacity-64 sm:text-sm [&_svg:not([class*='text-'])]:text-[var(--control-icon-color)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,{compoundVariants:[{size:[`icon`,`icon-lg`,`icon-micro`,`icon-tiny`,`icon-sm`,`icon-xl`,`icon-xs`],variant:[`ghost`,`ghost-muted`,`navigation`,`ghost-destructive`],className:`focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:bg-(--navigation-active-background) focus-visible:text-foreground`}],defaultVariants:{size:`default`,variant:`default`},variants:{size:{compact:`h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] [&_svg:not([class*='size-'])]:size-3.5`,default:`h-9 px-[calc(--spacing(3)-1px)] sm:h-8`,icon:`size-9 sm:size-8`,"icon-lg":`size-10 sm:size-9`,"icon-micro":`size-5 rounded-sm p-0 before:rounded-[calc(var(--radius-sm)-1px)] [&_svg:not([class*='size-'])]:size-3`,"icon-tiny":`size-4 p-0 [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8 sm:size-7`,"icon-xl":`size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5`,"icon-xs":`size-7 sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5`,lg:`h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9`,micro:`h-5 gap-1 rounded-sm px-[calc(--spacing(1.5)-1px)] text-[11px] before:rounded-[calc(var(--radius-sm)-1px)] sm:text-[11px] [&_svg:not([class*='size-'])]:size-3 sm:[&_svg:not([class*='size-'])]:size-3`,multiline:`min-h-9 px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] whitespace-normal sm:min-h-8`,sm:`h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:h-7`,"sm-multiline":`min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)] whitespace-normal sm:min-h-7`,xl:`h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5`,xs:`h-7 gap-1 px-[calc(--spacing(2)-1px)] text-sm sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5`},variant:{"solid-neutral":`rounded-lg border-transparent bg-foreground text-background [:hover,[data-pressed]]:bg-foreground/90`,soft:`rounded-lg border-transparent bg-accent text-accent-foreground [:hover,[data-pressed]]:bg-muted`,default:`not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-button-primary bg-button-primary text-button-primary-foreground shadow-button-primary/24 shadow-xs [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-button-primary-hover`,destructive:`[--control-icon-color:currentColor] rounded-lg border-transparent bg-destructive/10 text-destructive-foreground shadow-none [:hover,[data-pressed]]:bg-destructive/16 [:active,[data-pressed]]:bg-destructive/20`,"destructive-outline":`[--control-icon-color:currentColor] rounded-lg border-transparent bg-destructive/10 text-destructive-foreground shadow-none [:hover,[data-pressed]]:bg-destructive/16 [:active,[data-pressed]]:bg-destructive/20`,ghost:`[--control-icon-color:var(--contrast-muted-foreground)] border-transparent text-foreground data-pressed:bg-accent [:hover,[data-pressed]]:bg-accent`,"ghost-muted":`[--control-icon-color:currentColor] border-transparent text-muted-foreground data-pressed:bg-accent [:hover,[data-pressed]]:bg-accent [:hover,[data-pressed]]:text-foreground`,navigation:`[--control-icon-color:currentColor] rounded-lg border-transparent text-muted-foreground [:hover,:focus-visible,[data-pressed]]:bg-(--navigation-hover-background) [:hover,:focus-visible,[data-pressed]]:text-foreground aria-[current=page]:bg-(--navigation-active-background) aria-[current=page]:hover:bg-(--navigation-active-background) aria-[current=page]:focus-visible:bg-(--navigation-active-background) aria-[current=page]:data-pressed:bg-(--navigation-active-background) aria-[current=page]:text-foreground`,"ghost-destructive":`[--control-icon-color:currentColor] border-transparent text-muted-foreground data-pressed:bg-accent [:hover,[data-pressed]]:bg-accent [:hover,[data-pressed]]:text-destructive`,glass:`surface-glass [--control-icon-color:var(--contrast-muted-foreground)] rounded-full border-border/60 text-foreground shadow-sm before:rounded-full [:hover,[data-pressed]]:border-border`,link:`border-transparent underline-offset-4 [:hover,[data-pressed]]:underline`,"media-close":`[--control-icon-color:currentColor] border-transparent bg-black/65 text-white shadow-sm ring-1 ring-white/20 [:hover,[data-pressed]]:bg-black/80 focus-visible:ring-white`,"media-navigation":`[--control-icon-color:currentColor] absolute top-1/2 z-20 -translate-y-1/2 border-transparent text-white/90 [:hover,[data-pressed]]:bg-white/10 [:hover,[data-pressed]]:text-white focus-visible:ring-white focus-visible:ring-offset-transparent`,outline:`[--control-icon-color:var(--contrast-muted-foreground)] border-input bg-popover not-dark:bg-clip-padding text-foreground shadow-xs/5 not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64`,overlay:`border-transparent bg-black/70 text-white/65 [:hover,[data-pressed]]:bg-black/90`,secondary:`border-transparent bg-secondary text-secondary-foreground [:active,[data-pressed]]:bg-secondary/80 [:hover,[data-pressed]]:bg-secondary/90`,"warning-outline":`border-warning/32 bg-warning-surface text-warning-foreground shadow-xs/5 [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-warning/40 [:hover,[data-pressed]]:bg-warning/16 dark:[:hover,[data-pressed]]:bg-warning/24`}}});function tF(e){let t=(0,B.c)(9),n,r,i,a;if(t[0]!==e){let{className:o,variant:s,size:c,render:l,...u}=e;n=l;let d=n?void 0:`button`,f={className:wH(eF({className:o,size:c,variant:s})),"data-slot":`button`,"data-variant":s??`default`,type:d};a=Cl,r=`button`,i=gl(f,u),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;return t[5]!==n||t[6]!==r||t[7]!==i?(o={defaultTagName:r,props:i,render:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8],a(o)}var nF=hl(`inline-flex shrink-0 cursor-pointer items-center gap-0.5 font-medium underline-offset-2 [text-align:var(--inline-button-text-align,center)] [white-space:var(--inline-button-white-space,nowrap)] hover:underline focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-64`,{defaultVariants:{tone:`default`},variants:{tone:{default:`text-foreground`,muted:`text-muted-foreground hover:text-foreground`,destructive:`text-destructive/80 hover:text-destructive`,picker:`gap-1.5 text-foreground underline decoration-foreground/30 decoration-dotted decoration-from-font underline-offset-4 hover:decoration-foreground hover:decoration-solid data-popup-open:decoration-foreground data-popup-open:decoration-solid`}}});function rF(e){let t=(0,B.c)(9),n,r,i,a;if(t[0]!==e){let{className:o,tone:s,render:c,...l}=e;n=c;let u={className:wH(nF({tone:s}),o),"data-slot":`inline-button`,type:n?void 0:`button`};a=Cl,r=`button`,i=gl(u,l),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;return t[5]!==n||t[6]!==r||t[7]!==i?(o={defaultTagName:r,props:i,render:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8],a(o)}var iF=[`position`,`top`,`right`,`bottom`,`left`,`transform`];function aF(e){let t=(0,B.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({open:n,style:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a={},t[4]=a):a=t[4];let[o,s]=(0,V.useState)(a);if(n&&i&&iF.some(e=>i[e]!==o[e])){let{position:e,top:t,right:n,bottom:r,left:a,transform:o}=i;s({position:e,top:t,right:n,bottom:r,left:a,transform:o})}let c;t[5]!==n||t[6]!==o||t[7]!==i?(c=n?i:{...i,...o},t[5]=n,t[6]=o,t[7]=i,t[8]=c):c=t[8];let l;return t[9]!==r||t[10]!==c?(l=(0,H.jsx)(`div`,{...r,style:c}),t[9]=r,t[10]=c,t[11]=l):l=t[11],l}function oF(e,t){return(0,H.jsx)(aF,{...e,open:t.open})}var sF=BP;function cF(e){let t=(0,B.c)(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;return t[4]!==n||t[5]!==r||t[6]!==i?(a=(0,H.jsx)(YP,{className:r,"data-slot":`menu-trigger`,...i,children:n}),t[4]=n,t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function lF(e){let t=(0,B.c)(30),n,r,i,a,o,s,c,l,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10]):({children:i,className:a,sideOffset:s,align:c,alignOffset:n,side:l,anchor:r,keepMounted:u,variant:d,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d);let f=s===void 0?4:s,p=c===void 0?`center`:c,m=l===void 0?`bottom`:l,h=u!==void 0&&u,g=(d===void 0?`default`:d)===`choice`&&`rounded-2xl`,_;t[11]!==a||t[12]!==g?(_=wH(`dropdown-glass relative flex origin-(--transform-origin) rounded-2xl shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] outline-none focus:outline-none dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]`,`[-webkit-app-region:no-drag]`,`min-w-[min(10rem,calc(100vw-2rem))] max-w-[calc(100vw-2rem)]`,g,a),t[11]=a,t[12]=g,t[13]=_):_=t[13];let v;t[14]===i?v=t[15]:(v=(0,H.jsx)(`div`,{className:`max-h-(--available-height) w-full overflow-y-auto p-1`,children:i}),t[14]=i,t[15]=v);let y;t[16]!==o||t[17]!==_||t[18]!==v?(y=(0,H.jsx)(VN,{className:_,"data-slot":`menu-popup`,...o,children:v}),t[16]=o,t[17]=_,t[18]=v,t[19]=y):y=t[19];let b;t[20]!==p||t[21]!==n||t[22]!==r||t[23]!==m||t[24]!==f||t[25]!==y?(b=(0,H.jsx)(bP,{align:p,alignOffset:n,anchor:r,className:`z-[130]`,"data-slot":`menu-positioner`,render:oF,side:m,sideOffset:f,children:y}),t[20]=p,t[21]=n,t[22]=r,t[23]=m,t[24]=f,t[25]=y,t[26]=b):b=t[26];let x;return t[27]!==h||t[28]!==b?(x=(0,H.jsx)(WN,{keepMounted:h,children:b}),t[27]=h,t[28]=b,t[29]=x):x=t[29],x}function uF(e){let t=(0,B.c)(2),n;return t[0]===e?n=t[1]:(n=(0,H.jsx)(ZD,{"data-slot":`menu-group`,...e}),t[0]=e,t[1]=n),n}function dF(e){let t=(0,B.c)(16),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:n,inset:r,density:a,variant:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`default`:a,c=o===void 0?`default`:o,l;t[6]!==n||t[7]!==s||t[8]!==c?(l=wH(`[&>svg]:-mx-0.5 flex min-h-8 cursor-pointer select-none items-center gap-2 rounded-xl px-2 py-1 text-base text-foreground outline-none data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-highlighted:bg-accent data-inset:ps-8 data-[variant=destructive]:text-destructive-foreground data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&>svg:not([class*='text-'])]:text-current [&>svg]:pointer-events-none [&>svg]:shrink-0`,c===`ghost`&&eF({variant:`ghost`,size:`compact`,className:`h-auto min-h-7 w-full sm:text-xs`}),s===`touch`&&`min-h-10 sm:min-h-10`,n),t[6]=n,t[7]=s,t[8]=c,t[9]=l):l=t[9];let u;return t[10]!==s||t[11]!==r||t[12]!==i||t[13]!==l||t[14]!==c?(u=(0,H.jsx)($D,{className:l,"data-density":s,"data-inset":r,"data-slot":`menu-item`,"data-variant":c,...i}),t[10]=s,t[11]=r,t[12]=i,t[13]=l,t[14]=c,t[15]=u):u=t[15],u}function fF(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=wH(`min-w-0 truncate in-data-[density=touch]:[text-box:trim-both_cap_alphabetic] supports-[text-box:trim-both_cap_alphabetic]:in-data-[density=touch]:py-[0.5em]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,H.jsx)(`span`,{"data-slot":`menu-item-label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function pF(e){let t=(0,B.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:i,children:r,checked:n,variant:o,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=o===void 0?`default`:o,c=s===`switch`?`grid-cols-[1fr_auto] gap-4 pe-1.5`:`grid-cols-[1rem_minmax(0,1fr)] pe-4`,l;t[6]!==i||t[7]!==c?(l=wH(`grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-pointer items-center gap-2 rounded-xl py-1 ps-2 text-base text-foreground outline-none data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,c,i),t[6]=i,t[7]=c,t[8]=l):l=t[8];let u;t[9]!==r||t[10]!==s?(u=s===`switch`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`col-start-1`,children:r}),(0,H.jsx)(JD,{className:`inset-shadow-[0_1px_--theme(--color-black/4%)] inline-flex h-[calc(var(--thumb-size)+2px)] w-[calc(var(--thumb-size)*2-2px)] shrink-0 items-center rounded-full p-px outline-none transition-[background-color,box-shadow] duration-200 [--thumb-size:--spacing(4)] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-checked:bg-primary data-unchecked:bg-input data-disabled:opacity-64 sm:[--thumb-size:--spacing(3)]`,keepMounted:!0,children:(0,H.jsx)(`span`,{className:`pointer-events-none block aspect-square h-full in-[[data-slot=menu-checkbox-item][data-checked]]:origin-[var(--thumb-size)_50%] origin-left in-[[data-slot=menu-checkbox-item][data-checked]]:translate-x-[calc(var(--thumb-size)-4px)] in-[[data-slot=menu-checkbox-item]:active]:not-data-disabled:scale-x-110 in-[[data-slot=menu-checkbox-item]:active]:rounded-[var(--thumb-size)/calc(var(--thumb-size)*1.10)] rounded-(--thumb-size) bg-background shadow-sm/5 [transition:translate_.15s,border-radius_.15s,scale_.1s_.1s,transform-origin_.15s]`})})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(JD,{className:`col-start-1`,children:(0,H.jsx)(`svg`,{fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,H.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})}),(0,H.jsx)(`span`,{className:`col-start-2`,children:r})]}),t[9]=r,t[10]=s,t[11]=u):u=t[11];let d;return t[12]!==n||t[13]!==a||t[14]!==l||t[15]!==u?(d=(0,H.jsx)(PD,{checked:n,className:l,"data-slot":`menu-checkbox-item`,...a,children:u}),t[12]=n,t[13]=a,t[14]=l,t[15]=u,t[16]=d):d=t[16],d}function mF(e){let t=(0,B.c)(2),n;return t[0]===e?n=t[1]:(n=(0,H.jsx)(CP,{"data-slot":`menu-radio-group`,...e}),t[0]=e,t[1]=n),n}function hF(e){let t=(0,B.c)(16),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,variant:a,hideIndicator:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`default`:a,c=s===`choice`&&`rounded-xl px-3 py-3 data-checked:bg-transparent`,l=s===`rounded`&&`px-2.5 py-1.5`,u;t[6]!==r||t[7]!==c||t[8]!==l?(u=wH(`[&_svg]:-mx-0.5 flex min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-pointer items-center rounded-xl px-2 py-1 text-base text-foreground outline-none data-checked:bg-accent data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,c,l,r),t[6]=r,t[7]=c,t[8]=l,t[9]=u):u=t[9];let d;t[10]===n?d=t[11]:(d=(0,H.jsx)(`span`,{className:`min-w-0 flex-1`,children:n}),t[10]=n,t[11]=d);let f;return t[12]!==i||t[13]!==u||t[14]!==d?(f=(0,H.jsx)(EP,{className:u,"data-slot":`menu-radio-item`,...i,children:d}),t[12]=i,t[13]=u,t[14]=d,t[15]=f):f=t[15],f}function gF(e){let t=(0,B.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=wH(`flex shrink-0`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=n??(0,H.jsx)(zh,{className:`size-3.5`}),t[6]=n,t[7]=o);let s;return t[8]!==i||t[9]!==a||t[10]!==o?(s=(0,H.jsx)(DP,{"aria-hidden":!0,className:a,"data-slot":`menu-radio-item-indicator`,...i,children:o}),t[8]=i,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}function _F(e){let t=(0,B.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,inset:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=wH(`px-2 py-1.5 font-medium text-muted-foreground text-xs data-inset:ps-9 sm:data-inset:ps-8`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,H.jsx)(QD,{className:a,"data-inset":r,"data-slot":`menu-label`,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function vF(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=wH(`mx-2 my-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,H.jsx)(QP,{className:i,"data-slot":`menu-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function yF(e){let t=(0,B.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=wH(`ms-auto font-medium font-sans text-secondary-label text-xs tracking-widest`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,H.jsx)(`kbd`,{className:i,"data-slot":`menu-shortcut`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function bF(e){let t=(0,B.c)(2),n;return t[0]===e?n=t[1]:(n=(0,H.jsx)(VP,{"data-slot":`menu-sub`,...e}),t[0]=e,t[1]=n),n}function xF(e){let t=(0,B.c)(16),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,inset:i,density:o,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=o===void 0?`default`:o,c=s===`touch`&&`min-h-10 sm:min-h-10`,l;t[6]!==r||t[7]!==c?(l=wH(`[&>svg:not(:last-child)]:-mx-0.5 flex min-h-8 cursor-pointer items-center gap-2 rounded-xl px-2 py-1 text-base text-foreground outline-none data-disabled:cursor-not-allowed data-disabled:pointer-events-none data-highlighted:bg-accent data-popup-open:bg-accent data-inset:ps-8 data-highlighted:text-accent-foreground data-popup-open:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&>svg:not(:last-child):not([class*='opacity-'])]:opacity-80 [&_svg]:pointer-events-none [&>svg]:shrink-0`,c,r),t[6]=r,t[7]=c,t[8]=l):l=t[8];let u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,H.jsx)(Hh,{className:`-me-0.5 ms-auto opacity-80`}),t[9]=u):u=t[9];let d;return t[10]!==n||t[11]!==s||t[12]!==i||t[13]!==a||t[14]!==l?(d=(0,H.jsxs)($P,{className:l,"data-density":s,"data-inset":i,"data-slot":`menu-sub-trigger`,...a,children:[n,u]}),t[10]=n,t[11]=s,t[12]=i,t[13]=a,t[14]=l,t[15]=d):d=t[15],d}function SF(e){let t=(0,B.c)(12),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,sideOffset:a,alignOffset:n,align:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?0:a,c=o===void 0?`start`:o,l=n??(c===`center`?void 0:-5),u;return t[6]!==c||t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==l?(u=(0,H.jsx)(lF,{align:c,alignOffset:l,className:r,"data-slot":`menu-sub-content`,side:`inline-end`,sideOffset:s,...i}),t[6]=c,t[7]=r,t[8]=i,t[9]=s,t[10]=l,t[11]=u):u=t[11],u}var CF=hl(`relative inline-flex shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-sm border border-transparent font-medium outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [button&,a&]:cursor-pointer [button&,a&]:pointer-coarse:after:absolute [button&,a&]:pointer-coarse:after:size-full [button&,a&]:pointer-coarse:after:min-h-11 [button&,a&]:pointer-coarse:after:min-w-11`,{defaultVariants:{size:`default`,variant:`default`},variants:{size:{control:`h-7 min-w-7 rounded-[var(--control-radius)] px-[calc(--spacing(2)-1px)] text-sm sm:h-6 sm:min-w-6 sm:text-xs`,default:`h-5.5 min-w-5.5 px-[calc(--spacing(1)-1px)] text-sm sm:h-4.5 sm:min-w-4.5 sm:text-xs`,lg:`h-6.5 min-w-6.5 px-[calc(--spacing(1.5)-1px)] text-base sm:h-5.5 sm:min-w-5.5 sm:text-sm`,sm:`h-5 min-w-5 rounded-[.25rem] px-[calc(--spacing(1)-1px)] text-xs leading-none sm:h-4 sm:min-w-4 sm:text-[.625rem]`},variant:{default:`bg-primary text-primary-foreground [button&,a&]:hover:bg-primary/90`,destructive:`bg-destructive text-white [button&,a&]:hover:bg-destructive/90`,error:`bg-destructive/8 text-destructive-foreground dark:bg-destructive/16`,info:`bg-info/8 text-info-foreground dark:bg-info/16`,outline:`border-input bg-background text-foreground dark:bg-input/32 [button&,a&]:hover:bg-accent/50 dark:[button&,a&]:hover:bg-input/48`,secondary:`bg-secondary text-secondary-foreground [button&,a&]:hover:bg-secondary/90`,success:`bg-success/8 text-success-foreground dark:bg-success/16`,warning:`bg-warning/8 text-warning-foreground dark:bg-warning/16`,label:`bg-[color-mix(in_srgb,var(--label)_8%,transparent)] text-[color-mix(in_srgb,var(--label)_30%,var(--color-foreground))] dark:bg-[color-mix(in_srgb,var(--label)_12%,transparent)] dark:text-[color-mix(in_srgb,var(--label)_45%,var(--color-foreground))]`}}});function wF(e){let t=(0,B.c)(9),n,r,i,a;if(t[0]!==e){let{className:o,variant:s,size:c,render:l,...u}=e;n=l;let d={className:wH(CF({className:o,size:c,variant:s})),"data-slot":`badge`};a=Cl,r=`span`,i=gl(d,u),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;return t[5]!==n||t[6]!==r||t[7]!==i?(o={defaultTagName:r,props:i,render:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8],a(o)}var TF=V.createContext(null),EF=V.createContext(null);function DF(){let e=V.useContext(TF);if(e===null)throw Error(pl(60));return e}function OF(){let e=V.useContext(EF);if(e===null)throw Error(pl(61));return e}var kF=function(e){return e.disabled=`data-disabled`,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}({}),AF={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},jF={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},MF={disabled:!1,...jF},NF={valid(e){return e===null?null:e?{[kF.valid]:``}:{[kF.invalid]:``}}},PF={invalid:void 0,name:void 0,validityData:{state:AF,errors:[],error:``,value:``,initialValue:null},setValidityData:dl,disabled:void 0,touched:jF.touched,setTouched:dl,dirty:jF.dirty,setDirty:dl,filled:jF.filled,setFilled:dl,focused:jF.focused,setFocused:dl,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:MF,markedDirtyRef:{current:!1},registerFieldControl:dl,validation:{getValidationProps:(e=Sl)=>e,getInputValidationProps:(e=Sl)=>e,inputRef:{current:null},commit:async()=>{}}},FF=V.createContext(PF);function IF(e=!0){let t=V.useContext(FF);if(t.setValidityData===dl&&!e)throw Error(pl(28));return t}var LF=V.createContext({controlId:void 0,registerControlId:dl,labelId:void 0,setLabelId:dl,messageIds:[],setMessageIds:dl,getDescriptionProps:e=>e});function RF(){return V.useContext(LF)}function zF(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=RF(),o=AD(t),s=n?i:void 0,c=fl(()=>Symbol(`labelable-control`)),l=V.useRef(!1),u=V.useRef(t!=null),d=K(()=>{l.current&&a!==dl&&(l.current=!1,a(c.current,void 0))});return q(()=>{if(a===dl)return;let e;if(n){let n=r?.current;e=G(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}e===void 0?d():(l.current=!0,a(c.current,e))},[t,r,s,a,n,o,c,d]),V.useEffect(()=>d,[d]),i??o}var BF=(e,t)=>Object.is(e,t);function VF(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function HF(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&VF(t,e,n))}function UF(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&VF(e,t,n))}function WF(e,t,n){return e.filter(e=>!VF(t,e,n))}function GF(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function KF(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function qF(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(KF(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function JF(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return GF(e)}function YF(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?GF(e.value):GF(e)}function XF(e,t,n){function r(){return JF(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=KF(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function ZF(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,H.jsx)(V.Fragment,{children:XF(r,t,n)},i)),e),[])}var QF={id:Q(e=>e.id),labelId:Q(e=>e.labelId),modal:Q(e=>e.modal),multiple:Q(e=>e.multiple),items:Q(e=>e.items),itemToStringLabel:Q(e=>e.itemToStringLabel),itemToStringValue:Q(e=>e.itemToStringValue),isItemEqualToValue:Q(e=>e.isItemEqualToValue),value:Q(e=>e.value),hasSelectedValue:Q(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:YF(t,r)!==``}),hasNullItemLabel:Q((e,t)=>t?qF(e.items):!1),open:Q(e=>e.open),mounted:Q(e=>e.mounted),forceMount:Q(e=>e.forceMount),transitionStatus:Q(e=>e.transitionStatus),openMethod:Q(e=>e.openMethod),activeIndex:Q(e=>e.activeIndex),selectedIndex:Q(e=>e.selectedIndex),isActive:Q((e,t)=>e.activeIndex===t),isSelected:Q((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>VF(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null||VF(n,i,r)}),isSelectedByFocus:Q((e,t)=>e.selectedIndex===t),popupProps:Q(e=>e.popupProps),triggerProps:Q(e=>e.triggerProps),triggerElement:Q(e=>e.triggerElement),positionerElement:Q(e=>e.positionerElement),listElement:Q(e=>e.listElement),popupSide:Q(e=>e.popupSide),scrollUpArrowVisible:Q(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:Q(e=>e.scrollDownArrowVisible),hasScrollArrows:Q(e=>e.hasScrollArrows)};function $F(e,t){return e??t}var eI=2,tI=400,nI={...KT,...NF,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},rI=V.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,setFocused:u,validationMode:d,state:f,disabled:p}=IF(),{labelId:m}=RF(),{store:h,setOpen:g,selectionRef:_,validation:v,readOnly:y,required:b,alignItemWithTriggerActiveRef:x,disabled:S,keyboardActiveRef:C}=DF(),w=p||S||a,T=_M(h,QF.open),E=_M(h,QF.mounted),D=_M(h,QF.value),O=_M(h,QF.triggerProps),k=_M(h,QF.positionerElement),A=_M(h,QF.listElement),j=_M(h,QF.popupSide),M=_M(h,QF.id),N=_M(h,QF.labelId),P=_M(h,QF.hasSelectedValue),F=E&&k?j:null,I=i??M,ee=$F(m,N);zF({id:I});let te=jO(k),ne=V.useRef(null),{getButtonProps:L,buttonRef:re}=nD({disabled:w,native:o}),ie=K(e=>{h.set(`triggerElement`,e)}),ae=wl(t,ne,re,ie),R=nO(),oe=nO(),se=nO();V.useEffect(()=>{if(T)return se.start(tI,()=>{_.current.allowUnselectedMouseUp=!0,_.current.allowSelectedMouseUp=!0}),()=>{se.clear()};_.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},oe.clear()},[T,_,oe,se]);let ce=gl(O,{id:I,role:`combobox`,"aria-expanded":T?`true`:`false`,"aria-haspopup":`listbox`,"aria-controls":T?A?.id??wO(k)?.id:void 0,"aria-labelledby":ee,"aria-readonly":y||void 0,"aria-required":b||void 0,tabIndex:w?-1:0,ref:ae,onFocus(e){u(!0),T&&x.current&&g(!1,J(XT,e.nativeEvent)),R.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Y(k,e.relatedTarget)||(l(!0),u(!1),d===`onBlur`&&v.commit(D))},onPointerMove(){C.current=!1},onKeyDown(){C.current=!0},onMouseDown(e){if(T)return;let t=Z(e.currentTarget);function n(e){if(!ne.current)return;let t=e.target;if(Y(ne.current,t)||Y(te.current,t)||t===ne.current)return;let n=HP(ne.current);e.clientX>=n.left-eI&&e.clientX<=n.right+eI&&e.clientY>=n.top-eI&&e.clientY<=n.bottom+eI||g(!1,J(gE,e))}oe.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},v.getValidationProps,c,L);ce.role=`combobox`;let le={...f,open:T,disabled:w,value:D,readOnly:y,popupSide:F,placeholder:!P};return vl(`button`,e,{ref:[t,ne],state:le,stateAttributesMapping:nI,props:ce})}),iI=V.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=DF(),s={open:_M(o,QF.open)};return vl(`span`,e,{state:s,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:GT})});function aI(e){let t=(0,B.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`horizontal`:i,o;t[4]===n?o=t[5]:(o=wH(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:not-[[class^='h-']]:not-[[class*='_h-']]:self-stretch`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,H.jsx)(QP,{className:o,"data-slot":`separator`,orientation:a,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function oI(e,t){return wH(`relative inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap rounded-(--control-radius) border border-transparent text-base outline-none hover:bg-accent data-pressed:bg-accent focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 data-disabled:pointer-events-none data-disabled:opacity-64 pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&:active:not([aria-haspopup])]:scale-[0.97] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:-mx-0.5 [&_svg[data-composer-control-icon]]:mx-0`,e===`xs`?`h-7 gap-1 has-[[data-composer-label]]:gap-1.5 px-1.75 font-normal text-muted-foreground/70 text-sm hover:text-foreground/80 sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5 [&_svg]:mx-0 [&_svg[data-composer-control-chevron]]:ms-0 [&_svg[data-composer-control-chevron]]:-me-1`:`h-7 gap-1.5 px-2.5 font-medium text-secondary-label [&_svg:not([class*='text-'])]:text-muted-foreground hover:text-foreground sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,`aria-pressed:bg-accent aria-pressed:text-accent-foreground aria-pressed:hover:bg-accent/80`,t)}function sI(e){let t=(0,B.c)(9),n,r,i,a;if(t[0]!==e){let{className:o,size:s,render:c,...l}=e;n=c;let u={className:oI(s===void 0?`sm`:s,o),type:n?void 0:`button`};a=Cl,r=`button`,i=gl(u,l),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;return t[5]!==n||t[6]!==r||t[7]!==i?(o={defaultTagName:r,props:i,render:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8],a(o)}function cI(e){let t=(0,B.c)(6),{icon:n,className:r,opticalSize:i,size:a}=e,o=(a===void 0?`sm`:a)===`xs`?`size-3`:(i===void 0?`default`:i)===`large`?`size-4.5`:`size-4`,s;t[0]!==r||t[1]!==o?(s=wH(`shrink-0`,o,r),t[0]=r,t[1]=o,t[2]=s):s=t[2];let c;return t[3]!==n||t[4]!==s?(c=(0,H.jsx)(n,{"aria-hidden":`true`,className:s,"data-composer-control-icon":!0}),t[3]=n,t[4]=s,t[5]=c):c=t[5],c}function lI(e){let t=(0,B.c)(7),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{className:r,size:i}=n,a=(i===void 0?`sm`:i)===`xs`?`size-3 text-current opacity-50`:`size-3.5 text-icon-muted`,o;t[2]!==r||t[3]!==a?(o=wH(`shrink-0`,a,r),t[2]=r,t[3]=a,t[4]=o):o=t[4];let s;return t[5]===o?s=t[6]:(s=(0,H.jsx)(Bh,{"aria-hidden":`true`,className:o,"data-composer-control-chevron":!0,strokeWidth:2.25}),t[5]=o,t[6]=s),s}function uI(e){let t=(0,B.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,size:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(i===void 0?`sm`:i)===`xs`?`h-3.5!`:`h-4`,o;t[4]!==n||t[5]!==a?(o=wH(`mx-0.5 hidden sm:block`,a,n),t[4]=n,t[5]=a,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,H.jsx)(aI,{orientation:`vertical`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function dI(e){let t=(0,B.c)(15),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,size:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`sm`:a,s;t[5]!==r||t[6]!==o?(s=oI(o,r),t[5]=r,t[6]=o,t[7]=s):s=t[7];let c;t[8]===o?c=t[9]:(c=(0,H.jsx)(iI,{children:(0,H.jsx)(lI,{size:o})}),t[8]=o,t[9]=c);let l;return t[10]!==n||t[11]!==i||t[12]!==s||t[13]!==c?(l=(0,H.jsxs)(rI,{className:s,...i,children:[n,c]}),t[10]=n,t[11]=i,t[12]=s,t[13]=c,t[14]=l):l=t[14],l}var fI=(0,V.createContext)(null);function pI(){return(0,V.use)(fI)}var mI=`[data-composer-drawer-layer="true"],[data-chat-composer-floating-layer="true"]`,hI={"data-chat-composer-floating-layer":`true`};function gI(){let e=(0,B.c)(4),t=pI(),n;e[0]===t?n=e[1]:(n=t?()=>{let e=document.activeElement;return e!==document.body&&!SI(e)||t.current?.focusAtEnd(),!1}:void 0,e[0]=t,e[1]=n);let r;return e[2]===n?r=e[3]:(r={...hI,finalFocus:n},e[2]=n,e[3]=r),r}var _I=`[data-chat-embedded]`,vI=null;typeof document<`u`&&document.addEventListener(`focusin`,e=>{e.target instanceof Element&&!SI(e.target)&&(vI=e.target.closest(_I))},!0);function yI(e){return e?.getAttribute(`data-chat-embedded`)??null}function bI(e){return e instanceof Element?SI(e)?yI(vI):yI(e.closest(_I)):null}function xI(e,t){if(t===null)return!1;let n=yI(t.closest(_I)),r=bI(e);return r===null?n===null&&t.closest(`[hidden]`)===null:r===n}function SI(e){return e instanceof Element&&e.closest(mI)!==null}function CI(e){return e instanceof Element&&e.closest(`[data-chat-composer-collapsed-controls="true"]`)!==null}function wI(e){return e instanceof Element&&(e.closest(`[data-chat-composer-resting-controls="true"]`)!==null||e.closest(`[data-chat-composer-resting-images="true"]`)!==null||e.closest(`[data-composer-context-control]`)!==null||SI(e))}function TI(e){let t=(0,B.c)(2),n=e!==void 0&&e,[r,i]=(0,V.useState)(!1);n&&r&&i(!1);let a=r&&!n,o;return t[0]===a?o=t[1]:(o=[a,i],t[0]=a,t[1]=o),o}function EI(e){return vS(e)?vS(e.replace(/^Ultrathink:\s*/i,``))?`body`:`prefix`:`none`}var DI={agent:`Agent`,effort:`Effort`,reasoningEffort:`Reasoning effort`,variant:`Reasoning`};function OI(e){return DI[e]??e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/^./,e=>e.toUpperCase())}function kI(e){return(e??[]).map(e=>typeof e.value==`boolean`?{id:e.id,label:OI(e.id),type:`boolean`,currentValue:e.value}:{id:e.id,label:OI(e.id),type:`select`,options:[{id:e.value,label:e.value}],currentValue:e.value})}var AI=`Ultrathink:
6
+ `,jI=new Set([`reasoningEffort`,`reasoning`,`effort`,`variant`,`thinking`]);function MI(){let e=(0,B.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,H.jsx)(wF,{variant:`outline`,size:`sm`,className:`min-w-0`,children:`Default`}),e[0]=t):t=e[0],t}function NI(e,t,n){return e.map(e=>e.id===t?e.type===`boolean`?{...e,...typeof n==`boolean`?{currentValue:n}:{}}:{...e,...typeof n==`string`?{currentValue:n}:{}}:e)}function PI(e,t,n){if(!e)return null;let r=mS(e,t,n);return typeof r==`string`?r:null}function FI(e,t,n,r,i,a,o){let s=DT(t,n,e,o),c=e===`opencode`&&!t.some(t=>t.slug===xS(n,e)),l=c?kI(o?i:i?.filter(e=>e.id!==`agent`||e.value!==`plan`)):fS({caps:s,selections:i}),u=l.filter(e=>e.type===`select`),d=l.filter(e=>e.type===`boolean`),f=u[0]??null,p=u.find(e=>e.id===`contextWindow`)??null,m=u.find(e=>e.id===`agent`)??null,h=d.find(e=>e.id===`fastMode`)??null,g=d.find(e=>e.id===`thinking`)??null,_=a&&(f?.promptInjectedValues?.length??0)>0&&r!==`none`,v=_&&r===`body`;return{caps:s,descriptors:l,selectDescriptors:u,booleanDescriptors:d,primarySelectDescriptor:f,contextWindowDescriptor:p,agentDescriptor:m,fastModeDescriptor:h,thinkingDescriptor:g,effort:(_?`ultrathink`:PI(f))??null,thinkingEnabled:typeof g?.currentValue==`boolean`?g.currentValue:null,contextWindow:PI(p),ultrathinkPromptControlled:_,ultrathinkInBodyText:v,selectedAgent:PI(m),selectedAgentLabel:m?hS(m):null,modelIsUnavailable:c}}function II(e){let t=FI(e.provider,e.models,e.model,e.promptUltrathink??`none`,e.modelOptions,e.allowPromptInjectedEffort??!0,e.planModeEnabled),n=t.primarySelectDescriptor!==null,r=t.thinkingDescriptor!==null,i=t.fastModeDescriptor!==null,a=t.contextWindowDescriptor!==null,o=t.agentDescriptor!==null;return{...t,showEffort:n,showThinking:r,showFastMode:i,showContextWindow:a,showAgent:o,hasAnyControls:n||r||i||a||o||t.modelIsUnavailable&&t.descriptors.length>0}}function LI(e,t,n,r){if(!r)return null;if(t.promptInjectedValues?.includes(r))return{prompt:n.trim().length===0?AI:jS(n,`ultrathink`)};let i=t.id===e.primarySelectDescriptor?.id;return i&&e.ultrathinkInBodyText?null:{prompt:i&&e.ultrathinkPromptControlled?n.replace(/^Ultrathink:\s*/i,``):n,modelOptions:gS(NI(e.descriptors,t.id,r))}}function RI(e){let t=FI(e.provider,e.models,e.model,EI(e.prompt),e.modelOptions,!0,e.planModeEnabled);if(t.modelIsUnavailable||t.ultrathinkInBodyText)return null;let n=t.selectDescriptors.find(e=>jI.has(e.id));if(!n||n.options.length<2)return null;let r=n.id===t.primarySelectDescriptor?.id&&t.ultrathinkPromptControlled?`ultrathink`:PI(n,{instanceId:e.instanceId,model:e.model,options:e.modelOptions??[]},e.reportedModelSelection),i=e.direction>0?n.options:n.options.toReversed(),a=[r,PI(n)].map(e=>i.findIndex(t=>t.id===e)).find(e=>e>=0)??-1;for(let r of[...i.slice(a+1),...i.slice(0,Math.max(a,0))]){let i=LI(t,n,e.prompt,r.id);if(!i)return null;if(`modelOptions`in i)return i.modelOptions?{prompt:i.prompt,modelOptions:i.modelOptions}:null;if(i.prompt.startsWith(AI))return i}return null}function zI(e){return II(e).hasAnyControls}function BI(e){let t=(0,B.c)(49),n,r,i,a,o,s,c,l,u,d,f;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11]):({provider:u,instanceId:n,models:a,model:r,promptUltrathink:l,onPromptEdit:o,modelOptions:i,reportedModelSelection:d,allowPromptInjectedEffort:f,planModeEnabled:c,...s}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f);let p=f===void 0||f,m;t[12]!==n||t[13]!==r||t[14]!==i?(m=n&&r?{instanceId:n,model:r,options:i??[]}:null,t[12]=n,t[13]=r,t[14]=i,t[15]=m):m=t[15];let h=m,g=fH(VI),_;t[16]!==n||t[17]!==r||t[18]!==s||t[19]!==u||t[20]!==g?(_=e=>{if(`onModelOptionsChange`in s){s.onModelOptionsChange(e);return}let t=s.threadRef??s.draftId;t&&g(t,u,e,{...n?{instanceId:n}:{},model:r,persistSticky:!0})},t[16]=n,t[17]=r,t[18]=s,t[19]=u,t[20]=g,t[21]=_):_=t[21];let v=_,y;t[22]!==p||t[23]!==r||t[24]!==i||t[25]!==a||t[26]!==c||t[27]!==l||t[28]!==u?(y=II({provider:u,models:a,model:r,promptUltrathink:l,modelOptions:i,allowPromptInjectedEffort:p,planModeEnabled:c}),t[22]=p,t[23]=r,t[24]=i,t[25]=a,t[26]=c,t[27]=l,t[28]=u,t[29]=y):y=t[29];let b=y,{descriptors:x,selectDescriptors:S,booleanDescriptors:C,primarySelectDescriptor:w,ultrathinkPromptControlled:T,ultrathinkInBodyText:E,hasAnyControls:D,modelIsUnavailable:O}=b,k;t[30]===v?k=t[31]:(k=e=>{v(gS(e))},t[30]=v,t[31]=k);let A=k,j;t[32]!==o||t[33]!==b||t[34]!==v?(j=(e,t)=>{let n=LI(b,e,``,t);n&&(o?.(n=>LI(b,e,n,t)?.prompt??n),`modelOptions`in n&&v(n.modelOptions))},t[32]=o,t[33]=b,t[34]=v,t[35]=j):j=t[35];let M=j,N;return t[36]!==C||t[37]!==x||t[38]!==M||t[39]!==D||t[40]!==O||t[41]!==h||t[42]!==w||t[43]!==d||t[44]!==S||t[45]!==E||t[46]!==T||t[47]!==A?(N={descriptors:x,selectDescriptors:S,booleanDescriptors:C,primarySelectDescriptor:w,ultrathinkPromptControlled:T,ultrathinkInBodyText:E,hasAnyControls:D,modelIsUnavailable:O,modelSelection:h,reportedModelSelection:d,handleSelectChange:M,updateDescriptors:A},t[36]=C,t[37]=x,t[38]=M,t[39]=D,t[40]=O,t[41]=h,t[42]=w,t[43]=d,t[44]=S,t[45]=E,t[46]=T,t[47]=A,t[48]=N):N=t[48],N}function VI(e){return e.setProviderModelOptions}var HI=(0,V.memo)(function(e){let t=(0,B.c)(36),{descriptors:n,selectDescriptors:r,booleanDescriptors:i,primarySelectDescriptor:a,ultrathinkPromptControlled:o,ultrathinkInBodyText:s,hasAnyControls:c,modelIsUnavailable:l,modelSelection:u,reportedModelSelection:d,handleSelectChange:f,updateDescriptors:p}=BI(e);if(!c)return null;if(l){let e;if(t[0]!==n||t[1]!==u||t[2]!==d){let r;t[4]!==u||t[5]!==d?(r=(e,t)=>{let n=hS(e,u,d);return n?(0,H.jsxs)(`div`,{children:[t>0?(0,H.jsx)(vF,{}):null,(0,H.jsxs)(uF,{children:[(0,H.jsx)(`div`,{className:`px-2 pt-1.5 pb-1 font-medium text-muted-foreground text-xs`,children:e.label}),(0,H.jsx)(`div`,{className:`px-2 pb-1.5 text-muted-foreground/80 text-xs`,children:n})]})]},e.id):null},t[4]=u,t[5]=d,t[6]=r):r=t[6],e=n.map(r),t[0]=n,t[1]=u,t[2]=d,t[3]=e}else e=t[3];let r;return t[7]===e?r=t[8]:(r=(0,H.jsx)(H.Fragment,{children:e}),t[7]=e,t[8]=r),r}let m;if(t[9]!==f||t[10]!==u||t[11]!==a?.id||t[12]!==d||t[13]!==r||t[14]!==s||t[15]!==o){let e;t[17]!==f||t[18]!==u||t[19]!==a?.id||t[20]!==d||t[21]!==s||t[22]!==o?(e=(e,t)=>{let n=o&&e.id===a?.id?`ultrathink`:PI(e,u,d)??``;return(0,H.jsxs)(`div`,{children:[t>0?(0,H.jsx)(vF,{}):null,(0,H.jsxs)(uF,{children:[(0,H.jsx)(`div`,{className:`px-2 pt-1.5 pb-1 font-medium text-muted-foreground text-xs`,children:e.label}),s&&e.id===a?.id?(0,H.jsx)(`div`,{className:`px-2 pb-1.5 text-muted-foreground/80 text-xs`,children:`Your prompt contains "ultrathink" in the text. Remove it to change this option.`}):null,(0,H.jsx)(mF,{value:n,onValueChange:t=>f(e,t),children:e.options.map(t=>(0,H.jsx)(hF,{value:t.id,hideIndicator:!0,closeOnClick:!0,disabled:s&&e.id===a?.id,children:(0,H.jsxs)(`span`,{className:`flex w-full min-w-0 flex-col`,children:[(0,H.jsx)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:(0,H.jsxs)(`span`,{className:`min-w-0 truncate`,children:[t.label,t.isDefault?(0,H.jsxs)(H.Fragment,{children:[` `,(0,H.jsx)(MI,{})]}):null]})}),t.description?(0,H.jsx)(`span`,{className:`max-w-56 text-pretty text-muted-foreground/80 text-xs`,children:t.description}):null]})},t.id))})]})]},e.id)},t[17]=f,t[18]=u,t[19]=a?.id,t[20]=d,t[21]=s,t[22]=o,t[23]=e):e=t[23],m=r.map(e),t[9]=f,t[10]=u,t[11]=a?.id,t[12]=d,t[13]=r,t[14]=s,t[15]=o,t[16]=m}else m=t[16];let h;if(t[24]!==i||t[25]!==n||t[26]!==r.length||t[27]!==p){let e;t[29]!==n||t[30]!==r.length||t[31]!==p?(e=(e,t)=>{let i=e.currentValue===!0?`on`:`off`;return(0,H.jsxs)(`div`,{children:[t>0||r.length>0?(0,H.jsx)(vF,{}):null,(0,H.jsxs)(uF,{children:[(0,H.jsx)(`div`,{className:`px-2 py-1.5 font-medium text-muted-foreground text-xs`,children:e.label}),(0,H.jsx)(mF,{value:i,onValueChange:t=>{p(NI(n,e.id,t===`on`))},children:[`on`,`off`].map(GI)})]})]},e.id)},t[29]=n,t[30]=r.length,t[31]=p,t[32]=e):e=t[32],h=i.map(e),t[24]=i,t[25]=n,t[26]=r.length,t[27]=p,t[28]=h}else h=t[28];let g;return t[33]!==m||t[34]!==h?(g=(0,H.jsxs)(H.Fragment,{children:[m,h]}),t[33]=m,t[34]=h,t[35]=g):g=t[35],g});function UI(e){let t=null,n=null,r=-1,i=[];for(let a of e.descriptors){if(a.id===`fastMode`&&a.type===`boolean`){n=a.currentValue===!0?`Fast`:null,t=n??`Normal`;continue}if(e.provider===`codex`&&a.id===`serviceTier`&&a.type===`select`){let e=mS(a),r=a.options.find(({label:e})=>e===`Fast`),i=a.options.find(({label:e})=>e===`Ultrafast`);if((r||i)&&e==="default"||r&&e===r.id||i&&e===i.id){n=i&&e===i.id?`Ultrafast`:r&&e===r.id?`Fast`:null,t=a.options.find(({id:t})=>t===e)?.label??`Normal`;continue}}let o=e.ultrathinkPromptControlled&&a.id===e.primarySelectDescriptorId?`Ultrathink`:a.type===`boolean`?`${a.label} ${a.currentValue===!0?`On`:`Off`}`:hS(a,e.modelSelection,e.reportedModelSelection);typeof o==`string`&&o.length>0&&(r===-1&&a.type===`select`&&jI.has(a.id)&&(r=i.length),i.push(o))}return i.length===0&&t!==null?{label:t}:(n&&(r>=0?i[r]=`${i[r]} ${n}`:i.push(n)),{label:i.join(` · `)})}var WI=(0,V.memo)(function(e){let t=(0,B.c)(74),n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14],g=t[15],_=t[16]):({provider:d,instanceId:n,models:o,model:i,promptUltrathink:u,onPromptEdit:s,modelOptions:a,reportedModelSelection:f,allowPromptInjectedEffort:p,planModeEnabled:l,triggerClassName:_,isComposerOwned:r,size:m,hidden:h,disabled:g,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h,t[15]=g,t[16]=_);let v=p===void 0||p,y=m===void 0?`sm`:m,b=h!==void 0&&h,x=g!==void 0&&g,S=gI(),[C,w]=TI(b||x),T,E;if(t[17]!==v||t[18]!==n||t[19]!==i||t[20]!==a||t[21]!==o||t[22]!==l||t[23]!==u||t[24]!==d||t[25]!==f){E=Symbol.for(`react.early_return_sentinel`);bb0:{let{descriptors:e,primarySelectDescriptor:t,ultrathinkPromptControlled:r}=II({provider:d,models:o,model:i,promptUltrathink:u,modelOptions:a,allowPromptInjectedEffort:v,planModeEnabled:l});if(!zI({provider:d,models:o,model:i,promptUltrathink:u,modelOptions:a,allowPromptInjectedEffort:v,planModeEnabled:l})){E=null;break bb0}T=UI({provider:d,descriptors:e,primarySelectDescriptorId:t?.id??null,ultrathinkPromptControlled:r,modelSelection:n&&i?{instanceId:n,model:i,options:a??[]}:null,reportedModelSelection:f})}t[17]=v,t[18]=n,t[19]=i,t[20]=a,t[21]=o,t[22]=l,t[23]=u,t[24]=d,t[25]=f,t[26]=T,t[27]=E}else T=t[26],E=t[27];if(E!==Symbol.for(`react.early_return_sentinel`))return E;let{label:D}=T,O=d===`codex`,k;t[28]!==x||t[29]!==w?(k=e=>{w(e&&!x)},t[28]=x,t[29]=w,t[30]=k):k=t[30];let A=r?`composer.effort`:void 0,j=O?`min-w-0 max-w-40 shrink justify-start overflow-hidden whitespace-nowrap sm:max-w-48`:`shrink-0 whitespace-nowrap`,M;t[31]!==j||t[32]!==_?(M=wH(j,_),t[31]=j,t[32]=_,t[33]=M):M=t[33];let N;t[34]!==x||t[35]!==y||t[36]!==M||t[37]!==A||t[38]!==D?(N=(0,H.jsx)(sI,{disabled:x,"aria-label":D,"data-composer-shortcut":A,size:y,className:M}),t[34]=x,t[35]=y,t[36]=M,t[37]=A,t[38]=D,t[39]=N):N=t[39];let P;t[40]!==O||t[41]!==y||t[42]!==D?(P=O?(0,H.jsxs)(`span`,{className:wH(`flex min-w-0 w-full items-center`,y===`xs`?`gap-1`:`gap-1.5`),children:[(0,H.jsx)(cI,{icon:vv,size:y}),(0,H.jsx)(`span`,{"data-composer-control-label":!0,className:`min-w-0 truncate`,children:D}),(0,H.jsx)(lI,{size:y})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(cI,{icon:vv,size:y}),(0,H.jsx)(`span`,{"data-composer-control-label":!0,children:D}),(0,H.jsx)(lI,{size:y})]}),t[40]=O,t[41]=y,t[42]=D,t[43]=P):P=t[43];let F;t[44]!==N||t[45]!==P?(F=(0,H.jsx)(cF,{render:N,children:P}),t[44]=N,t[45]=P,t[46]=F):F=t[46];let I;t[47]!==S||t[48]!==r?(I=r?S:{},t[47]=S,t[48]=r,t[49]=I):I=t[49];let ee;t[50]===n?ee=t[51]:(ee=n?{instanceId:n}:{},t[50]=n,t[51]=ee);let te;t[52]===s?te=t[53]:(te=s?{onPromptEdit:s}:{},t[52]=s,t[53]=te);let ne;t[54]!==v||t[55]!==i||t[56]!==a||t[57]!==o||t[58]!==c||t[59]!==l||t[60]!==u||t[61]!==d||t[62]!==f||t[63]!==ee||t[64]!==te?(ne=(0,H.jsx)(HI,{provider:d,...ee,models:o,model:i,promptUltrathink:u,...te,modelOptions:a,reportedModelSelection:f,allowPromptInjectedEffort:v,planModeEnabled:l,...c}),t[54]=v,t[55]=i,t[56]=a,t[57]=o,t[58]=c,t[59]=l,t[60]=u,t[61]=d,t[62]=f,t[63]=ee,t[64]=te,t[65]=ne):ne=t[65];let L;t[66]!==I||t[67]!==ne?(L=(0,H.jsx)(lF,{align:`start`,...I,children:ne}),t[66]=I,t[67]=ne,t[68]=L):L=t[68];let re;return t[69]!==C||t[70]!==F||t[71]!==L||t[72]!==k?(re=(0,H.jsxs)(sF,{open:C,onOpenChange:k,children:[F,L]}),t[69]=C,t[70]=F,t[71]=L,t[72]=k,t[73]=re):re=t[73],re});function GI(e){return(0,H.jsx)(hF,{value:e,hideIndicator:!0,closeOnClick:!0,children:(0,H.jsx)(`span`,{className:`flex w-full min-w-0 items-center justify-between gap-3`,children:(0,H.jsx)(`span`,{children:e===`on`?`On`:`Off`})})},e)}function KI(e){return vS(e)?`ultrathink`:`none`}function qI(e,t){return t?.some(e=>e.id===`fastMode`)||!e.optionDescriptors?.some(e=>e.type===`boolean`&&e.id===`fastMode`)?t??void 0:[...t??[],{id:`fastMode`,value:!1}]}function JI(e,t,n,r,i){let a=DT(e,t,n,i);return{caps:a,selections:qI(a,r)}}function YI(e){let{provider:t,model:n,models:r,modelOptions:i,promptInjectionState:a=`none`,planModeEnabled:o}=e;if(t===`opencode`){let e=xS(n,t);if(!r.some(t=>t.slug===e)){let e=i?.filter(e=>o||e.id!==`agent`||e.value!==`plan`);return{provider:t,promptEffort:null,modelOptionsForDispatch:e&&e.length>0?e:void 0}}}let{caps:s,selections:c}=JI(r,n,t,i,o),l=fS({caps:s,selections:c}),u=l.find(e=>e.type===`select`),d=mS(u??null),f=typeof d==`string`?d:null,p=(u?.promptInjectedValues?.length??0)>0&&a===`ultrathink`;return{provider:t,promptEffort:f,modelOptionsForDispatch:_S(l,c),...p?{composerFrameClassName:`ultrathink-frame`,composerSurfaceClassName:`shadow-[0_0_0_1px_rgba(255,255,255,0.07)_inset]`,modelPickerIconClassName:`ultrathink-chroma`}:{}}}function XI(e){let{prompt:t,cursor:n}=e,{selections:r}=JI(e.models,e.model,e.provider,e.modelOptions,e.planModeEnabled),i=RI({provider:e.provider,instanceId:e.instanceId,model:e.model,models:e.models,modelOptions:r,reportedModelSelection:e.reportedModelSelection,prompt:t,planModeEnabled:e.planModeEnabled,direction:e.direction});if(!i)return null;let a=`modelOptions`in i?{modelOptions:i.modelOptions}:{};if(i.prompt===t)return{prompt:t,cursor:n,...a};let o=`modelOptions`in i?0:i.prompt.length-t.trim().length,s=`modelOptions`in i?i.prompt.length-t.length:o-(t.length-t.trimStart().length);return{prompt:i.prompt,cursor:Math.min(i.prompt.length,Math.max(o,n+s)),...a}}function ZI(e,t){let{provider:n,instanceId:r,threadRef:i,draftId:a,model:o,models:s,modelOptions:c,reportedModelSelection:l,promptUltrathink:u,onPromptEdit:d,planModeEnabled:f,size:p,hidden:m,triggerClassName:h,isComposerOwned:g}=t,_=i!==void 0||a!==void 0,{selections:v}=JI(s,o,n,c,f);return!_||!zI({provider:n,models:s,model:o,modelOptions:v,promptUltrathink:u,planModeEnabled:f})?null:(0,H.jsx)(e,{provider:n,...r?{instanceId:r}:{},models:s,...i?{threadRef:i}:{},...a?{draftId:a}:{},model:o,modelOptions:v,reportedModelSelection:l,promptUltrathink:u,onPromptEdit:d,planModeEnabled:f,...p===void 0?{}:{size:p},...m===void 0?{}:{hidden:m},...h===void 0?{}:{triggerClassName:h},...g?{isComposerOwned:g}:{}})}function QI(e){return ZI(HI,e)}function $I(e){return e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).trim().replace(/\b\w/g,e=>e.toUpperCase())}function eL(e){let t=e.displayName?.trim(),n=fi[e.driver]??$I(e.driver);if(t&&t!==n)return t;if(e.instanceId!==ac(e.driver)){let t=$I(e.instanceId);if(t.length>0)return t}return t||n}function tL(e){let t=e.replace(/[^\P{P}'’]+/gu,` `).split(/\s+/u).map(e=>e.replace(/^['’]+|['’]+$/gu,``)).filter(Boolean);return t.length===0?``:t.length===1?Array.from(t[0]).slice(0,2).join(``).toUpperCase():t.slice(0,2).map(e=>Array.from(e)[0]?.toUpperCase()??``).join(``)}function nL(e){let t=e?.trim();if(t)return/^#[0-9a-fA-F]{6}$/u.test(t)?t:void 0}function rL(e,t){if(e.accentColor)return!0;let n=0;for(let r of t)if(r.driverKind===e.driverKind&&(e.driverKind!==`acpRegistry`||r.acpRegistryAgentId===e.acpRegistryAgentId)&&++n>1)return!0;return!1}var iL={instanceId:ss.make(`p4code_no_provider`),model:``};function aL(e){return e.enabled&&e.isAvailable&&e.status===`ready`}function oL(e){return e.enabled}function sL(e){return e.map(e=>{let t=e.instanceId,n=e.driver,r=t===ac(n);return{instanceId:t,driverKind:n,displayName:eL(e),accentColor:nL(e.accentColor),...n===`acpRegistry`&&e.iconUrl?{acpRegistryIconUrl:e.iconUrl}:{},continuationGroupKey:e.continuation?.groupKey,enabled:e.enabled,installed:e.installed,status:e.status,isDefault:r,isAvailable:e.availability!==`unavailable`,snapshot:e,models:e.models}})}function cL(e,t,n){return e.map(e=>{let r=Object.hasOwn(t.providerInstances,e.instanceId)?t.providerInstances[e.instanceId]:void 0,i=Cc(t,n,e.instanceId);if(e.driverKind!==`acpRegistry`||r===void 0)return i===e.enabled?e:{...e,enabled:i};let a=r.config!==null&&typeof r.config==`object`?r.config:null;if(a?.source===`local`)return{...e,enabled:i,acpRegistryAgentId:void 0,acpRegistryIconUrl:void 0};let o=a?.agentId,s=a?.registryIconUrl;return{...e,enabled:i,...typeof o==`string`&&o.trim()?{acpRegistryAgentId:o.trim()}:{},...typeof s==`string`&&s.trim()?{acpRegistryIconUrl:s.trim()}:{}}})}function lL(e){let t=new Map;for(let n of e){let e=t.get(n.driverKind);e?e.push(n):t.set(n.driverKind,[n])}let n=[];for(let e of t.values()){let t=e.filter(e=>e.isDefault),r=e.filter(e=>!e.isDefault);n.push(...t,...r)}return n}function uL(e,t){return sL(e).find(e=>e.instanceId===t)}function dL(e,t){let n=uL(e,t);if(n)return n.models.find(e=>e.isDefault&&!e.isCustom)?.slug??n.models.find(e=>!e.isCustom)?.slug??n.models[0]?.slug??Li[n.driverKind]}var fL=e=>e.enabled&&e.isAvailable;function pL(e,t){if(t!==void 0){let n=e.find(e=>e.instanceId===t);if(n&&fL(n))return n}return e.find(aL)??e.find(e=>fL(e)&&e.status!==`error`)}function mL(e,t){return pL(sL(e),t)?.instanceId}function hL(e,t){let n=mL(e,t?.instanceId);if(n===void 0)return null;if(t?.instanceId===n)return t;let r=dL(e,n);return r?{instanceId:n,model:r}:null}function gL(e,t){return`${e}:${t}`}function _L(e){return new Map(pi(e,(e,t)=>[e,t]))}function vL(e){return e instanceof Set?e:new Set(e??[])}function yL(e){return Aa(Lo,t=>e(t)??1/0)}function bL(e){return Aa(Kc(tl),e)}function xL(e,t){let n=t?.modelOrder??[],r=vL(t?.favoriteModels),i=_L(n),a=_L(pi(e,e=>e.slug)),o=[...t?.groupFavorites===!0?[bL(e=>r.has(e.slug))]:[],yL(e=>i.get(e.slug)),yL(e=>a.get(e.slug))];return La(e,zr(o))}function SL(e,t){let n=vL(t?.favoriteModelKeys),r=new Map(pi(t?.instanceOrder??[],(e,t)=>[e,t])),i=_L(pi(e,e=>gL(e.instanceId,e.slug))),a=[...t?.groupFavorites===!0?[bL(e=>n.has(gL(e.instanceId,e.slug)))]:[],yL(e=>r.get(e.instanceId)),yL(e=>i.get(gL(e.instanceId,e.slug)))];return La(e,zr(a))}var CL=32,wL=ss.make(`codex`);function TL(e,t,n){if(n===`antigravity`)return[];let r=e.providerInstances?.[t]?.config;if(typeof r==`object`&&r){let e=r.customModels;if(Array.isArray(e))return wS(e)}return[]}function EL(e,t,n,r,i){if(n!==`opencode`&&n!==`antigravity`)return e;let a=SS(r);return!a||n===`antigravity`&&a===`antigravity-default`||ES(n,a,t)!==null||i.includes(a)||e.some(e=>e.slug===a)?e:[...e,{slug:a,name:a,isCustom:!1,isUnavailable:!0}]}function DL(e){let t={slug:e.slug,name:e.name,isCustom:e.isCustom};return e.shortName&&(t.shortName=e.shortName),e.subProvider&&(t.subProvider=e.subProvider),e.aliases&&(t.aliases=e.aliases),e.badge&&(t.badge=e.badge),e.isDefault&&(t.isDefault=!0),e.isLegacy&&(t.isLegacy=!0),t}function OL(e,t){return e.providerModelPreferences?.[t]??{hiddenModels:[],modelOrder:[]}}function kL(e,t){let n=new Set(t.hiddenModels);return xL(e.filter(e=>e.isCustom||!n.has(e.slug)),{modelOrder:t.modelOrder})}function AL(e,t){let n=[],r=new Set;for(let i of e)if(!(i.slug.length>256||t.has(i.slug)||r.has(i.slug))&&(r.add(i.slug),n.push(i),n.length>=CL))break;return n}function jL(e,t,n,r){let i=wT(t,n),a=i.filter(e=>!e.isCustom).map(DL),o=new Set(a.map(e=>e.slug)),s=new Set(yi(wT(t,n),e=>e.isCustom?Ei:rs(e.slug))),c=ac(n),l=TL(e,c,n);for(let e of AL(l,s))o.has(e.slug)||(o.add(e.slug),a.push({slug:e.slug,name:e.name,isCustom:!0}));let u=OL(e,c);return EL(kL(a,u),i,n,r,u.hiddenModels)}function ML(e,t,n){let r=t.models.filter(e=>!e.isCustom).map(DL),i=new Set(r.map(e=>e.slug)),a=new Set(yi(t.models,e=>e.isCustom?Ei:rs(e.slug))),o=TL(e,t.instanceId,t.driverKind);for(let e of AL(o,a))i.has(e.slug)||(i.add(e.slug),r.push({slug:e.slug,name:e.name,isCustom:!0}));let s=OL(e,t.instanceId);return EL(kL(r,s),t.models,t.driverKind,n,s.hiddenModels)}function NL(e,t,n,r){let i=ET(n,e);return ES(i,r,jL(t,n,i,r))??kT(n,i)}function PL(e,t,n,r,i){let a=sL(n).find(t=>t.instanceId===e);if(!a)return null;let o=ML(t,a,i?.preserveUnavailableSelection?r:null),s=ES(a.driverKind,r,o);if(s)return s;if(i?.preserveUnavailableSelection&&(a.driverKind===`opencode`||a.driverKind===`antigravity`)){let e=SS(r),n=OL(t,a.instanceId).hiddenModels;if(e&&!n.includes(e)&&ES(a.driverKind,r,a.models)===null&&(a.driverKind!==`antigravity`||e!==`antigravity-default`))return e}return o.find(e=>e.isDefault)?.slug??o[0]?.slug??null}function FL(e,t,n,r){let i=new Map;for(let a of sL(t))i.set(a.instanceId,ML(e,a,a.instanceId===n?r:null));return i}function IL(e){return e?.some(e=>e.id===`agent`&&e.value===`plan`)??!1}function LL(e,t){let n=e.textGenerationModelSelection??{instanceId:wL,model:`gpt-6-luna`},r=t.filter(e=>e.supportsTextGeneration!==!1),i=sL(r),a=i.find(e=>e.instanceId===n.instanceId&&e.enabled&&e.isAvailable),o=a??i.find(e=>e.enabled&&e.isAvailable);if(o){let t=a?n.model:null,i=PL(o.instanceId,e,r,t)??o.models[0]?.slug??sl[o.driverKind];if(!i)return kS(o.instanceId,``,[]);let s=o.driverKind,{modelOptionsForDispatch:c}=YI({provider:s,model:i,models:o.models,modelOptions:a?n.options:void 0,planModeEnabled:e.planModeEnabled||IL(n.options)});return kS(o.instanceId,i,c)}return iL}var RL=new Map([[`gif`,`image/gif`],[`jpeg`,`image/jpeg`],[`jpg`,`image/jpeg`],[`png`,`image/png`],[`webp`,`image/webp`]]),zL=new Set(RL.values()),BL=new Set([`application/octet-stream`,`binary/octet-stream`,`application/unknown`,`video/mp2t`,`video/vnd.dlna.mpeg-tts`]);function VL(e){let t=e.mimeType.split(`;`,1)[0]?.trim().toLowerCase()??``;if(zL.has(t))return t;if(t.startsWith(`image/`)||t!==``&&!BL.has(t))return null;let n=e.name.lastIndexOf(`.`);return n<0?null:RL.get(e.name.slice(n+1).trim().toLowerCase())??null}var HL=new Map([[`avi`,`video/x-msvideo`],[`m4v`,`video/mp4`],[`mkv`,`video/x-matroska`],[`mov`,`video/quicktime`],[`mp4`,`video/mp4`],[`ogv`,`video/ogg`],[`webm`,`video/webm`]]),UL=Object.freeze([...HL.keys()]);function WL(e){let t=e.mimeType.split(`;`,1)[0]?.trim().toLowerCase()??``;if(t.startsWith(`video/`)&&!BL.has(t))return t;if(t!==``&&!BL.has(t))return null;let n=e.name.lastIndexOf(`.`);return n<0?null:HL.get(e.name.slice(n+1).toLowerCase())??null}var GL=`full-access`,KL=`default`,qL=`term-1`;function JL(e){return e.type===`image`||e.type===`file`&&VL(e)!==null}function YL(e){return e.type===`file`&&!JL(e)}function XL(e){return WL(e)!==null}function ZL(e){return Eb({kind:`terminal`,contextId:wb(`terminal`,e.id),label:rR(e)})}function QL(e){return e.replace(/\r\n/g,`
7
+ `).replace(/^\n+|\n+$/g,``)}function $L(e){return QL(e.text).length>0}function eR(e){return!$L(e)}function tR(e){return e.filter(e=>$L(e))}function nR(e){return e.lineStart===e.lineEnd?`line ${e.lineStart}`:`lines ${e.lineStart}-${e.lineEnd}`}function rR(e){return`${e.terminalLabel} ${nR(e)}`}function iR(e,t){if(!e.includes(``))return e;let n=0;return e.replaceAll(``,()=>{let e=t[n];return n+=1,e?ZL(e):``})}var aR=``,oR=/\n*<terminal_context>\n((?:(?!\n<\/terminal_context>)[\s\S])*)\n<\/terminal_context>\s*$/,sR=/\n*<element_context>\n((?:(?!\n<\/element_context>)[\s\S])*)\n<\/element_context>\s*$/,cR=/\n*<preview_annotation>\n((?:(?!\n<\/preview_annotation>)[\s\S])*)\n<\/preview_annotation>\s*$/,lR=/<review_comment\b([^>]*)>|^<(terminal_context|element_context|preview_annotation)>\n[\s\S]*?\n<\/\2>/gm,uR=/([a-zA-Z][a-zA-Z0-9_-]*)="([^"]*)"/g,dR=/(`{3,})([^\s`]*)[^\n]*\n([\s\S]*?)\n\1/g,fR=``,pR=/<(?:terminal_context|element_context|preview_annotation|review_comment)\b|/,mR=Pa(Qo),hR=Pa(ao(Dc).check(Ai(200)));function gR(e){let t=[],n=null,r=()=>{n&&=(t.push({header:n.header,body:n.bodyLines.join(`
8
+ `).trimEnd()}),null)};for(let t of e.split(`
9
+ `)){let e=/^- (.+):$/.exec(t);if(e)r(),n={header:e[1],bodyLines:[]};else if(n&&t.startsWith(` `))n.bodyLines.push(t.slice(2));else if(t.trim().length>0)return null;else n&&n.bodyLines.push(``)}return r(),t}function _R(e){return`@${e.terminalLabel.trim().toLowerCase().replace(/\s+/g,`-`)}:${e.lineStart===e.lineEnd?`${e.lineStart}`:`${e.lineStart}-${e.lineEnd}`}`}function vR(e,t){return`legacy_${e}_${t}`}function yR(e,t){let n=/^(.*?) (?:line (\d+)|lines (\d+)-(\d+))$/.exec(e.header);if(!n)return null;let r=n[1].trim();if(!r)return null;let i=Number(n[2]??n[3]),a=Number(n[2]??n[4]),o=e.body.split(`
10
+ `).map(e=>e.replace(/^\d+ \| ?/,``)).join(`
11
+ `);return{version:1,contextId:vR(`terminal`,t),kind:`terminal`,label:e.header,terminalId:r.toLowerCase().replace(/\s+/g,`-`),terminalLabel:r,lineStart:i,lineEnd:a,text:o}}function bR(e){let t=/^(.*?)(?::(\d+))?(?::(\d+))?$/.exec(e);return!t||!t[1]?null:{functionName:null,fileName:t[1],lineNumber:t[2]===void 0?null:Number(t[2]),columnNumber:t[3]===void 0?null:Number(t[3])}}function xR(e,t){let n=/^<([^>]+)>/.exec(e.header);if(!n)return null;let r=n[1],i={},a={},o=null;for(let t of e.body.split(`
12
+ `)){if(o&&(t.startsWith(` `)||t.length===0)){a[o].push(t.slice(2));continue}o=null;let e=/^([a-z]+): (.*)$/.exec(t);if(e){i[e[1]]=e[2];continue}let n=/^(html|styles):$/.exec(t);n&&(o=n[1],a[o]=[])}return{version:1,contextId:vR(`element`,t),kind:`element`,label:`<${r}>`,pageUrl:i.url??``,pageTitle:null,tagName:r.toLowerCase(),selector:i.selector??null,htmlPreview:(a.html??[]).join(`
13
+ `).trimEnd(),componentName:/[A-Z]/.test(r)?r:null,source:i.source?bR(i.source):null,styles:(a.styles??[]).join(`
14
+ `).trimEnd()}}function SR(e,t){let n=e.split(`
15
+ `),r=[`Preview annotation:`,`Id: `,`Page: `,`Comment: `,`Targets: `],i=/^<\/?(?:terminal_context|element_context|preview_annotation|review_comment)\b/,a=e=>r.some(t=>e.startsWith(t))||e===`Requested visual changes:`||i.test(e)||e===`The attached screenshot is the annotated preview crop.`,o=e=>{let t=n.findIndex(t=>t.startsWith(e));if(t<0)return``;let r=t+1;for(;r<n.length&&!a(n[r]);)r+=1;return[n[t].slice(e.length),...n.slice(t+1,r)].join(`
16
+ `).trim()},s=n.indexOf(`Requested visual changes:`),c=[];if(s>=0)for(let e of n.slice(s+1)){if(!e.startsWith(`- `))break;c.push(e.slice(2))}let l=o(`Page: `),u=/^https?:\/\//i.test(l),d=[];for(let t of e.matchAll(/<element_context>\n([\s\S]*?)\n<\/element_context>/g)){let e=gR(t[1]??``);if(e===null)return null;for(let t of e){let e=xR(t,d.length+1);if(e===null)return null;let{version:n,contextId:r,kind:i,label:a,...o}=e;d.push(o)}}return{version:1,contextId:vR(`preview-annotation`,t),kind:`preview-annotation`,label:l||`Preview annotation`,annotationId:o(`Id: `),pageUrl:u?l:d[0]?.pageUrl??``,pageTitle:u?null:l||null,comment:o(`Comment: `),targetSummary:o(`Targets: `),styleChanges:c,...d.length>0?{elements:d}:{}}}function CR(e){return e.replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).replace(/&quot;/g,`"`).replace(/&amp;/g,`&`)}function wR(e,t,n){let r={};for(let t of e.matchAll(uR))r[t[1]]=CR(t[2]??``);let i=r.filePath?.trim(),a=r.sectionId?.trim(),o=r.startIndex,s=r.endIndex;if(!i||!a||!/^\d+$/.test(o??``)||!/^\d+$/.test(s??``))return null;let c=Array.from(t.matchAll(dR)).at(-1),l=r.rangeLabel?.trim()||`line`,u=i.split(/[\\/]/).at(-1)??i;return{version:1,contextId:vR(`review-comment`,n),kind:`review-comment`,label:`${u} ${l}`,sectionId:a,sectionTitle:r.sectionTitle?.trim()||`Review`,filePath:i,startIndex:Math.min(Number(o),Number(s)),endIndex:Math.max(Number(o),Number(s)),rangeLabel:l,text:t.slice(0,c?.index??t.length).trim(),diff:c?.[3]??``,fenceLanguage:c?.[2]?.trim()||`diff`}}function TR(e,t){let n=t.exec(e);return n?{text:e.slice(0,n.index).replace(/\n+$/,``),match:n}:null}function ER(e,t){let n=[],r=new RegExp(lR),i=0;for(let a=r.exec(e);a;a=r.exec(e)){if(a[2])continue;let o=r.lastIndex,s=/^(`{3,})([^\n]*)$|<\/review_comment>/gm;s.lastIndex=o;let c=0;for(let l=s.exec(e);l;l=s.exec(e))if(l[1])c===0?c=l[1].length:l[1].length>=c&&!l[2]?.trim()&&(c=0);else if(c===0){n.push(e.slice(i,a.index)),i=s.lastIndex,n.push(t(e.slice(a.index,i),a[1],e.slice(o,l.index))),r.lastIndex=i;break}if(i<o)break}return n.push(e.slice(i)),n.join(``)}function DR(e){if(!pR.test(e))return{text:e,records:[]};let t=[],n=[],r=[],i=[],a=fR;for(;e.includes(a);)a+=a;let o=RegExp(`${a}(\\d+)${a}`,`g`),s=RegExp(`(?:\\s*${a}\\d+${a})+\\s*$`),c=ER(e,(e,t,n)=>{let r=wR(t,n,i.length+1);return!r||!mR(r)?e:(i.push(r),`${a}${i.length-1}${a}`)}),l=[],u=s.exec(c);if(u&&u[0].length>0){let e=c.slice(0,u.index);(cR.test(e)||sR.test(e)||oR.test(e))&&(l.push(...Array.from(u[0].matchAll(o),e=>Number(e[1]))),c=e)}for(;;){let i=TR(c,cR);if(i){c=i.text,r.unshift(i.match[1]??``);continue}let a=TR(c,sR);if(a){let t=gR(a.match[1]??``);if(!t?.length||t.some(e=>xR(e,1)===null))return{text:e,records:[]};c=a.text,n.unshift(...t);continue}let o=TR(c,oR);if(o){let n=gR(o.match[1]??``);if(!n?.length||n.some(e=>yR(e,1)===null))return{text:e,records:[]};c=o.text,t.unshift(...n)}else break}let d=t.map((e,t)=>yR(e,t+1)).filter(e=>e!==null),f=n.map((e,t)=>xR(e,t+1)).filter(e=>e!==null),p=[];for(let[t,n]of r.entries()){let r=SR(n,t+1);if(r===null)return{text:e,records:[]};p.push(r)}let m=l.map(e=>i[e]),h=c.replace(o,(e,t)=>Eb(i[Number(t)])),g=0;h=h.replace(new RegExp(aR,`g`),()=>{let e=d[g];return g+=1,e?Eb(e):``});let _=new Set(d.slice(0,g));for(let e of d){if(_.has(e))continue;let t=_R(e),n=h.indexOf(t);for(;n!==-1&&(/[\p{L}\p{N}\p{M}_@.-]$/u.test(h.slice(0,n))||/^(?:[\p{L}\p{N}\p{M}_-]|[.@]+[\p{L}\p{N}\p{M}_-])/u.test(h.slice(n+t.length)));)n=h.indexOf(t,n+1);n!==-1&&(h=`${h.slice(0,n)}${Eb(e)}${h.slice(n+t.length)}`,_.add(e))}h=h.trimEnd();let v=[...d.filter(e=>!_.has(e)),...f,...p,...m].map(e=>Eb(e)),y=v.length===0?h:h.length>0?`${h}\n\n${v.join(` `)}`:v.join(` `),b=[...d,...f,...p,...i];return hR(b)?{text:y,records:b}:{text:e,records:[]}}var OR=16e6,kR=hi(jc);function AR(e){let t=JSON.stringify(e);return t.length<=OR?t:null}function jR(e,t,n){if(n!==void 0)return`<div data-p4-context-fragment="${encodeURIComponent(t)}">${n}</div>`;let r=e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`);return`<pre data-p4-context-fragment="${encodeURIComponent(t)}">${r}</pre>`}function MR(e){if(!e||e.length>144004096)return null;let t=/data-p4-context-fragment=(?:"([^"]+)"|'([^']+)')/.exec(e),n=t?.[1]??t?.[2];if(!n)return null;try{return NR(decodeURIComponent(n))}catch{return null}}function NR(e){if(!e||e.length>OR)return null;try{return Hs(kR(JSON.parse(e)))}catch{return null}}var PR=48,FR=`
17
+ … truncated …`;function IR(e,t){if(e.length<=t)return e;let n=Math.max(0,t-14),r=e.charCodeAt(n-1);return r>=55296&&r<=56319&&--n,`${e.slice(0,n)}${FR}`}function LR(e){return e.split(/[\\/]/).at(-1)??e}function RR(e){let t=BR(e);if(zR(e)&&t!==null)return`#${t}`;let n=/^([+-])(\d+)(?: to \1(\d+))?$/u.exec(e.rangeLabel),r=n?`L${n[2]}${n[3]?` to L${n[3]}`:``}${n[1]===`-`?` (before)`:``}`:e.rangeLabel;return`${LR(e.filePath)} ${r}`}function zR(e){return e.pullRequest!==void 0||e.sectionId.startsWith(`pull-request:`)&&e.diff.trim().length===0&&/^PR #\d+$/u.test(e.filePath)}function BR(e){if(e.pullRequest!==void 0)return e.pullRequest.number;let t=/^PR #(\d+)$/u.exec(e.filePath)?.[1];return t===void 0?null:Number(t)}function VR(e){let t=e.pullRequest;return t===void 0?null:t.state===`open`&&t.isDraft?`draft`:t.state}function HR(e){let t=VR(e);return t===null?`Pull request`:`${t[0].toUpperCase()}${t.slice(1)} pull request`}function UR(e){let t=e.comment.trim().replace(/\s+/g,` `);return t?t.length>PR?`${t.slice(0,47)}…`:t:e.pageTitle?.trim()||`Preview annotation`}function WR(e){return{kind:`terminal`,contextId:wb(`terminal`,e.id),label:rR(e)}}function GR(e){return wb(`review-comment`,e)}function KR(e){return wb(`preview-annotation`,e)}function qR(e){return{kind:`review-comment`,contextId:GR(e.id),label:RR(e)}}function JR(e){return{kind:`preview-annotation`,contextId:KR(e.id),label:UR(e)}}function YR(e){return{kind:`thread`,contextId:e.contextId,label:e.label}}function XR(e){return{kind:`environment`,contextId:e.contextId,label:e.label}}function ZR(e,t){return{version:1,kind:`environment`,contextId:wb(`environment`,e),label:xb(t,`environment`),environmentId:e}}function QR(e){return{version:1,contextId:wb(`terminal`,e.id),kind:`terminal`,label:xb(rR(e),`terminal`),terminalId:e.terminalId,terminalLabel:e.terminalLabel,lineStart:e.lineStart,lineEnd:e.lineEnd,text:IR(QL(e.text),No)}}function $R(e){return{version:1,contextId:GR(e.id),kind:`review-comment`,label:xb(RR(e),`review-comment`),sectionId:e.sectionId,sectionTitle:e.sectionTitle,filePath:e.filePath,startIndex:e.startIndex,endIndex:e.endIndex,rangeLabel:e.rangeLabel,text:IR(e.text,Es),diff:IR(e.diff,Sc),...e.fenceLanguage===void 0?{}:{fenceLanguage:e.fenceLanguage},...e.pullRequest===void 0?{}:{pullRequest:e.pullRequest}}}function ez(e){let t=[],n=(e,t)=>`${e} ${t}${e===1?``:`s`}`;return e.elements.length>0&&t.push(n(e.elements.length,`selected element`)),e.regions.length>0&&t.push(n(e.regions.length,`marked region`)),e.strokes.length>0&&t.push(n(e.strokes.length,`drawing`)),t.join(`, `)}function tz(e,t){let n=e.elements.flatMap(e=>{let t=Jb(e.element);return t?[{id:e.id,element:t}]:[]});return{version:1,contextId:KR(e.id),kind:`preview-annotation`,label:xb(UR(e),`preview-annotation`),annotationId:e.id,pageUrl:e.pageUrl,pageTitle:e.pageTitle,comment:e.comment.trim(),targetSummary:ez(e),styleChanges:e.styleChanges.map(e=>`${e.property}: ${e.previousValue||`(unset)`} → ${e.value}`),...n.length>0?{elements:n.map(e=>e.element),elementIds:n.map(e=>e.id)}:{},styleChangeDetails:e.styleChanges.map(e=>({...e})),...e.regions.length>0?{regionCount:e.regions.length}:{},...e.strokes.length>0?{strokeCount:e.strokes.length}:{},...t?.screenshotContextId===void 0?{}:{screenshotContextId:wb(`image`,t.screenshotContextId)}}}function nz(e){return{kind:`image`,contextId:wb(`image`,e.id),label:e.name}}function rz(e){return{kind:`file`,contextId:wb(`file`,e.id),label:e.name}}function iz(e,t){let n=e.type===`file`&&e.uploadedAttachmentId!==void 0?e.uploadedAttachmentId:t?.status===`ready`?t.attachmentId:void 0;return n===void 0?null:az({attachment:e,attachmentId:n})}function az(e){let{attachment:t,attachmentId:n}=e,r={version:1,contextId:wb(t.type,t.id),label:xb(t.name,t.type),attachmentId:n,name:t.name,mimeType:t.mimeType,sizeBytes:t.sizeBytes};return t.type===`image`?{...r,kind:`image`}:{...r,kind:`file`}}function oz(e){let t=new Set((e.attachments??[]).flatMap(({attachment:e})=>e.type===`image`?[e.id]:[])),n=[...e.terminalContexts.map(QR),...e.reviewComments.map($R),...e.threadContexts??[],...e.environmentContexts??[],...e.previewAnnotations.map(e=>tz(e,{screenshotContextId:t.has(e.id)?e.id:void 0})),...(e.attachments??[]).map(az)];return n.length===0?void 0:{version:1,records:n}}function sz(e){if(!(!e||`payload`in e))return e}function cz(e){let t=wb(e.kind,Pb(e.kind,e.contextId));return t===e.contextId?[e.contextId]:[t,e.contextId]}function lz(e){let t=new Set(Db(e.markdown).map(e=>e.contextId)),n=e.records.filter(e=>t.has(e.contextId));return n.length===0?null:AR({version:1,source:{environmentId:e.environmentId,...e.threadId?{threadId:e.threadId}:{},messageId:e.messageId},records:n})}function uz(e){let t=e.context?{text:e.text,records:e.context.records}:DR(e.text);return{text:t.text,records:t.records,recordsById:new Map(t.records.map(e=>[e.contextId,e]))}}function dz(e,t){return{id:Pb(`terminal`,e.contextId),threadId:t,createdAt:new Date().toISOString(),terminalId:e.terminalId,terminalLabel:e.terminalLabel,lineStart:e.lineStart,lineEnd:e.lineEnd,text:e.text}}function fz(e){return{id:Pb(`review-comment`,e.contextId),sectionId:e.sectionId,sectionTitle:e.sectionTitle,filePath:e.filePath,startIndex:e.startIndex,endIndex:e.endIndex,rangeLabel:e.rangeLabel,text:e.text,diff:e.diff,...e.fenceLanguage===void 0?{}:{fenceLanguage:e.fenceLanguage},...e.pullRequest===void 0?{}:{pullRequest:e.pullRequest}}}function pz(e){return{id:e.annotationId||Pb(`preview-annotation`,e.contextId),pageUrl:e.pageUrl,pageTitle:e.pageTitle,comment:e.comment,elements:(e.elements??[]).map((t,n)=>({id:e.elementIds?.[n]??`${e.contextId}-element-${n+1}`,rect:{x:0,y:0,width:0,height:0},element:{...t,stack:[],pickedAt:new Date().toISOString()}})),regions:Array.from({length:e.regionCount??0},(t,n)=>({id:`${e.contextId}-region-${n+1}`,rect:{x:0,y:0,width:0,height:0}})),strokes:Array.from({length:e.strokeCount??0},(t,n)=>({id:`${e.contextId}-stroke-${n+1}`,color:``,width:0,points:[],bounds:{x:0,y:0,width:0,height:0}})),styleChanges:e.styleChangeDetails??e.styleChanges.flatMap(t=>{let n=/^(.+?): ([\s\S]*?) → ([\s\S]*)$/.exec(t);return n?[{targetId:e.elementIds?.[0]??`${e.contextId}-element-1`,selector:null,property:n[1],previousValue:n[2]===`(unset)`?``:n[2],value:n[3]}]:[]}),screenshot:null,createdAt:new Date().toISOString()}}function mz(e,t){if(e.kind!==t.kind)return!1;let n=e=>{let{label:t,contextId:n,...r}=e,i=e=>Array.isArray(e)?e.map(i):typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).toSorted(([e],[t])=>e.localeCompare(t)).map(([e,t])=>[e,i(t)]));return JSON.stringify(i(r))};return n(e)===n(t)}var hz=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},gz=(e=>e?hz(e):hz),_z=e=>e;function vz(e,t=_z){let n=V.useSyncExternalStore(e.subscribe,V.useCallback(()=>t(e.getState()),[e,t]),V.useCallback(()=>t(e.getInitialState()),[e,t]));return V.useDebugValue(n),n}var yz=e=>{let t=gz(e),n=e=>vz(t,e);return Object.assign(n,t),n},bz=(e=>e?yz(e):yz);function xz(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var Sz=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return Sz(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return Sz(t)(e)}}}},Cz=(e,t)=>(n,r,i)=>{let a={storage:xz(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return Sz(u.getItem.bind(u))(a.name).then(e=>{if(e){if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state]}return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p},wz=e=>Symbol.iterator in e,Tz=e=>`entries`in e,Ez=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},Dz=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function Oz(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:wz(e)&&wz(t)?Tz(e)&&Tz(t)?Ez(e,t):Dz(e,t):Ez({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function kz(e){let t=V.useRef(void 0);return n=>{let r=e(n);return Oz(t.current,r)?t.current:t.current=r}}function Az(e){return typeof e==`function`}function jz(e,...t){return Az(e)?e(...t):e}var Mz=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{this.#c<this.#l?(this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{})):(this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop())};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)this.debugLog(`Event bus client is disabled, not emitting event`,e,t);else if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d)this.debugLog(`Previously failed to connect, not emitting to bus`);else if(!this.#a)this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());else return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},Nz=class extends Mz{constructor(e){super({pluginId:`pacer`,debug:e?.debug})}},Pz=(e,t)=>{t.key&&Fz.emit(e,t)},Fz=new Nz,Iz=new WeakMap,Lz=new WeakMap,Rz={current:[]},zz=!1,Bz=0,Vz=new Set,Hz=new Map;function Uz(e){let t=Array.from(e).sort((e,t)=>e instanceof Yz&&e.options.deps.includes(t)?1:t instanceof Yz&&t.options.deps.includes(e)?-1:0);for(let e of t){if(Rz.current.includes(e))continue;Rz.current.push(e),e.recompute();let t=Lz.get(e);if(t)for(let e of t){let t=Iz.get(e);t&&Uz(t)}}}function Wz(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Gz(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Kz(e){if(Bz>0&&!Hz.has(e)&&Hz.set(e,e.prevState),Vz.add(e),!(Bz>0)&&!zz)try{for(zz=!0;Vz.size>0;){let e=Array.from(Vz);Vz.clear();for(let t of e)t.prevState=Hz.get(t)??t.prevState,Wz(t);for(let t of e){let e=Iz.get(t);e&&(Rz.current.push(t),Uz(e))}for(let t of e){let e=Iz.get(t);if(e)for(let t of e)Gz(t)}}}finally{zz=!1,Rz.current=[],Hz.clear()}}function qz(e){return typeof e==`function`}var Jz=class{constructor(e,t){this.listeners=new Set,this.subscribe=e=>{var t;this.listeners.add(e);let n=((t=this.options)?.onSubscribe)?.call(t,e,this);return()=>{this.listeners.delete(e),n?.()}},this.prevState=e,this.state=e,this.options=t}setState(e){var t,n;this.prevState=this.state,this.state=this.options?.updateFn?this.options.updateFn(this.prevState)(e):qz(e)?e(this.prevState):e,(n=(t=this.options)?.onUpdate)==null||n.call(t),Kz(this)}},Yz=class e{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{let e=this.options.deps.length,t=Array(e),n=Array(e);for(let r=0;r<e;r++){let e=this.options.deps[r];t[r]=e.prevState,n[r]=e.state}return this.lastSeenDepValues=n,{prevDepVals:t,currDepVals:n,prevVal:this.prevState??void 0}},this.recompute=()=>{var e,t;this.prevState=this.state;let n=this.getDepVals();this.state=this.options.fn(n),(t=(e=this.options).onUpdate)==null||t.call(e)},this.checkIfRecalculationNeededDeeply=()=>{for(let t of this.options.deps)t instanceof e&&t.checkIfRecalculationNeededDeeply();let t=!1,n=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let e=0;e<r.length;e++)if(r[e]!==n[e]){t=!0;break}t&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(let e of this._subscriptions)e()}),this.subscribe=e=>{var t;this.listeners.add(e);let n=(t=this.options).onSubscribe?.call(t,e,this);return()=>{this.listeners.delete(e),n?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(let n of t)if(n instanceof e)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof Jz){let e=Iz.get(n);e||(e=new Set,Iz.set(n,e)),e.add(this);let t=Lz.get(this);t||(t=new Set,Lz.set(this,t)),t.add(n)}}unregisterFromGraph(t=this.options.deps){for(let n of t)if(n instanceof e)this.unregisterFromGraph(n.options.deps);else if(n instanceof Jz){let e=Iz.get(n);e&&e.delete(this);let t=Lz.get(this);t&&t.delete(n)}}};function Xz(){return{canLeadingExecute:!0,executionCount:0,isPending:!1,lastArgs:void 0,status:`idle`,maybeExecuteCount:0}}var Zz={enabled:!0,leading:!1,trailing:!0,wait:0},Qz=class{#e;constructor(e,t){this.fn=e,this.store=new Jz(Xz()),this.setOptions=e=>{this.options={...this.options,...e},this.#n()||this.cancel()},this.maybeExecute=(...e)=>{if(!this.#n())return;this.#t({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#t({canLeadingExecute:!1}),t=!0,this.#i(...e)),this.options.trailing&&this.#t({isPending:!0,lastArgs:e}),this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{this.#t({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#i(...e)},this.#r())},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#a(),this.#i(...this.store.state.lastArgs))},this.cancel=()=>{this.#a(),this.#t({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#t(Xz())},this.key=t.key,this.options={...Zz,...t},this.#t(this.options.initialState??{}),this.key&&Fz.on(`d-Debouncer`,e=>{e.payload.key===this.key&&(this.#t(e.payload.store.state),this.setOptions(e.payload.options))})}#t=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:r}=n;return{...n,status:this.#n()?r?`pending`:`idle`:`disabled`}}),Pz(`Debouncer`,this)};#n=()=>!!jz(this.options.enabled,this);#r=()=>jz(this.options.wait,this);#i=(...e)=>{this.#n()&&(this.fn(...e),this.#t({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))};#a=()=>{this.#e&&=(clearTimeout(this.#e),void 0)}};function $z(){let e=new Map;return{getItem:t=>e.get(t)??null,setItem:(t,n)=>{e.set(t,n)},removeItem:t=>{e.delete(t)}}}function eB(e){return e!=null&&typeof e.getItem==`function`&&typeof e.setItem==`function`&&typeof e.removeItem==`function`}function tB(e){return eB(e)?e:$z()}function nB(e,t,n=300){let r=tB(e),i=new Qz((e,n)=>{r.setItem(e,t(n))},{wait:n});return{getItem:e=>r.getItem(e),setItem:(e,t)=>{i.maybeExecute(e,t)},removeItem:e=>{i.cancel(),i.reset(),r.removeItem(e)},flush:()=>{i.flush()}}}var rB=fs({start:Nc,side:Oo([`additions`,`deletions`]),end:Nc,endSide:Oo([`additions`,`deletions`])}),iB=fs({id:z,sectionId:z,sectionTitle:z,filePath:z,startIndex:Nc,endIndex:Nc,rangeLabel:z,text:z,diff:z,fenceLanguage:_o(z),selection:_o(rB),pullRequest:_o(Ic)});function aB(e,t){let n=Math.max(0,...Array.from(t.matchAll(/`+/g),e=>e[0].length)),r="`".repeat(Math.max(3,n+1));return[`${r}${e}`,t.trimEnd(),r].join(`
18
+ `)}function oB(e){let t=Math.max(1,Math.min(e.startLine,e.endLine)),n=Math.max(t,Math.max(e.startLine,e.endLine)),r=e.contents.split(`
19
+ `).slice(t-1,n);return{id:e.id,sectionId:`file:${e.filePath}`,sectionTitle:`File comment`,filePath:e.filePath,startIndex:t-1,endIndex:n-1,rangeLabel:t===n?`L${t}`:`L${t} to L${n}`,text:e.text.trim(),diff:r.join(`
20
+ `),fenceLanguage:sB(e.filePath)}}function sB(e){let t=e.replaceAll(`\\`,`/`),n=t.slice(t.lastIndexOf(`/`)+1).toLowerCase(),r=n.lastIndexOf(`.`);return r>0&&r<n.length-1?n.slice(r+1):n.startsWith(`.`)&&n.length>1?n.slice(1):`text`}function cB(e){return e.endsWith(`
21
+ `)?e.slice(0,-1):e}function lB(e,t,n){let r=[],i=0,a=1,o=1,s=e=>{(!n||i>=n.startIndex&&i<=n.endIndex)&&r.push(e),i+=1},c=(t,a,o)=>{let s=Math.max(0,o),c=n?Math.max(0,n.startIndex-i):0,l=n?Math.min(s-1,n.endIndex-i):s-1;for(let n=c;n<=l;n+=1)r.push({change:`context`,oldLineNumber:t+n,newLineNumber:a+n,content:cB(e.additionLines[a+n-1]??``)});i+=s};for(let n of e.hunks){if(t){let e=n.deletionStart+ +(n.deletionCount===0),t=n.additionStart+ +(n.additionCount===0),r=Math.min(e-a,t-o);c(a,o,r)}let r=n.deletionStart,i=n.additionStart,l=n.deletionLineIndex,u=n.additionLineIndex;for(let t of n.hunkContent)if(t.type===`context`)for(let n=0;n<t.lines;n+=1)s({change:`context`,oldLineNumber:r,newLineNumber:i,content:cB(e.additionLines[u]??e.deletionLines[l]??``)}),r+=1,i+=1,l+=1,u+=1;else{for(let n=0;n<t.deletions;n+=1)s({change:`delete`,oldLineNumber:r,newLineNumber:null,content:cB(e.deletionLines[l]??``)}),r+=1,l+=1;for(let n=0;n<t.additions;n+=1)s({change:`add`,oldLineNumber:null,newLineNumber:i,content:cB(e.additionLines[u]??``)}),i+=1,u+=1}a=n.deletionStart+n.deletionCount,o=n.additionStart+n.additionCount,n.deletionCount===0&&(a+=1),n.additionCount===0&&(o+=1)}if(t){let t=Math.min(e.deletionLines.length-a+1,e.additionLines.length-o+1);c(a,o,t)}return r}function uB(e){return e.change===`delete`&&e.oldLineNumber!==null?{lineNumber:e.oldLineNumber,side:`deletions`}:e.newLineNumber===null?e.oldLineNumber===null?null:{lineNumber:e.oldLineNumber,side:`deletions`}:{lineNumber:e.newLineNumber,side:`additions`}}function dB(e,t){if(t.selection)return t.selection;let n=!e.isPartial,r=lB(e,n,{startIndex:t.startIndex,endIndex:t.startIndex})[0],i=t.endIndex===t.startIndex?r:lB(e,n,{startIndex:t.endIndex,endIndex:t.endIndex})[0];if(!r||!i)return null;let a=uB(r),o=uB(i);return!a||!o?null:{start:a.lineNumber,side:a.side,end:o.lineNumber,endSide:o.side}}function fB(e,t,n,r=!e.isPartial){let i=n=>{let i=0,a=1,o=1,s=(e,r,a)=>{let o=Math.max(0,a),s=t-(n===`left`?e:r);return s>=0&&s<o?i+s:-1};for(let c of e.hunks){if(r){let e=c.deletionStart+ +(c.deletionCount===0),t=c.additionStart+ +(c.additionCount===0),n=Math.min(e-a,t-o),r=s(a,o,n);if(r>=0)return r;i+=Math.max(0,n)}let e=c.deletionStart,l=c.additionStart;for(let r of c.hunkContent)if(r.type===`context`){let t=s(e,l,r.lines);if(t>=0)return t;i+=r.lines,e+=r.lines,l+=r.lines}else{if(n===`left`&&t>=e&&t<e+r.deletions)return i+t-e;if(i+=r.deletions,e+=r.deletions,n===`right`&&t>=l&&t<l+r.additions)return i+t-l;i+=r.additions,l+=r.additions}a=c.deletionStart+c.deletionCount,o=c.additionStart+c.additionCount,c.deletionCount===0&&(a+=1),c.additionCount===0&&(o+=1)}if(!r)return-1;let c=Math.min(e.deletionLines.length-a+1,e.additionLines.length-o+1);return s(a,o,c)},a=n===`deletions`?`left`:`right`,o=i(a);return o>=0?o:i(a===`left`?`right`:`left`)}function pB(e,t,n){let r=fB(e,t,n);if(r<0)return null;let i=lB(e,!e.isPartial,{startIndex:r,endIndex:r})[0];if(i===void 0)return null;switch(i.change){case`add`:return i.newLineNumber===null?null:{kind:`added`,newLine:i.newLineNumber};case`delete`:return i.oldLineNumber===null?null:{kind:`deleted`,oldLine:i.oldLineNumber};case`context`:return i.oldLineNumber===null||i.newLineNumber===null?null:{kind:`context`,oldLine:i.oldLineNumber,newLine:i.newLineNumber,side:n===`deletions`?`left`:`right`}}}function mB(e,t){let n=e.filter(e=>e[t]!==null);return{start:n[0]?.[t]??0,count:n.length}}function hB(e){return e===`add`?`+`:e===`delete`?`-`:` `}function gB(e){let t=e[0],n=e.at(-1);if(!t||!n)return`line`;let r=t.newLineNumber??t.oldLineNumber,i=n.newLineNumber??n.oldLineNumber;if(r===null||i===null)return e.length===1?`line`:`${e.length} lines`;let a=hB(t.change).trim(),o=a.length>0&&e.every(e=>e.change===t.change)?a:``;return r===i?`${o}${r}`:`${o}${r} to ${o}${i}`}function _B(e){let t=!e.fileDiff.isPartial,n=fB(e.fileDiff,e.range.start,e.range.side,t),r=fB(e.fileDiff,e.range.end,e.range.endSide??e.range.side,t);if(n<0||r<0)return null;let i=Math.min(n,r),a=Math.max(n,r),o=lB(e.fileDiff,t,{startIndex:i,endIndex:a}),s=mB(o,`oldLineNumber`),c=mB(o,`newLineNumber`);return{id:e.id,sectionId:e.sectionId,sectionTitle:e.sectionTitle,filePath:e.filePath,startIndex:i,endIndex:a,rangeLabel:gB(o),text:e.text.trim(),diff:[`@@ -${s.start},${s.count} +${c.start},${c.count} @@`,...o.map(e=>`${hB(e.change)}${e.content}`)].join(`
22
+ `),fenceLanguage:`diff`,selection:{start:e.range.start,side:e.range.side??`additions`,end:e.range.end,endSide:e.range.endSide??e.range.side??`additions`}}}function vB(e){if((e.fenceLanguage??`diff`)!==`diff`||e.diff.trim().length===0)return``;let t=e.diff.trimStart().replace(/\n+$/,``);if(t.startsWith(`diff --git `))return t;let n=e.filePath.replaceAll(`\\`,`/`);return[`diff --git a/${n} b/${n}`,`--- a/${n}`,`+++ b/${n}`,t].join(`
23
+ `)}var yB=Pa(Zc),bB=Pa(qo),xB=Pa(iB),SB=Pa(ds),CB=Pa(Us),wB=Pa(Ls),TB=Pa(ho),EB=`p4code:composer-drafts:v1`,DB=9,OB=Oo([`auto`,`local`,`worktree`]),kB=z.pipe(Ur(`DraftId`)),AB=nB(typeof localStorage<`u`?localStorage:$z(),e=>JSON.stringify({state:`capturedState`in e.state?iH(e.state.capturedState):e.state,version:e.version}),300),jB={getItem:e=>{let t=AB.getItem(e);return typeof t==`string`?JSON.parse(t):null},setItem:(e,t)=>AB.setItem(e,t),removeItem:e=>AB.removeItem(e)};typeof window<`u`&&typeof window.addEventListener==`function`&&window.addEventListener(`beforeunload`,()=>{AB.flush()});var MB=fs({id:z,name:z,mimeType:z,sizeBytes:Nc,source:_o(Ls),dataUrl:z});function NB(e){return e.file===null&&e.uploadedAttachmentId===void 0}function PB(e,t){let n=!1,r=e.files.map(e=>{if(e.uploadedAttachmentId===void 0&&e.uploadEnvironmentId===void 0||e.uploadEnvironmentId===t)return e;n=!0;let r={...e};return delete r.uploadedAttachmentId,delete r.uploadEnvironmentId,r});return n?{...e,files:r}:e}var FB=fs({id:z,name:z,mimeType:z,sizeBytes:Nc,attachmentId:z,environmentId:Lr,source:_o(ea)}),IB=fs({id:z,name:z,mimeType:z,sizeBytes:Nc,attachmentId:fa(z),environmentId:fa(Lr),source:_o(ea)}),LB=Pa(IB),RB=fs({id:z,threadId:_c,createdAt:z,terminalId:z,terminalLabel:z,lineStart:Nc,lineEnd:Nc,text:fa(z)}),zB=fs({prompt:z,attachments:ao(MB),files:fa(ao(IB)),terminalContexts:fa(ao(RB)),previewAnnotations:fa(ao(ho)),reviewComments:fa(ao(iB)),threadContexts:fa(ao(ds)),environmentContexts:fa(ao(Us)),modelSelectionByProvider:fa(Jo(ss,Ki)),activeProvider:fa(Bs(ss)),modelSelectionExplicit:fa(bo),runtimeMode:fa(Zc),interactionMode:fa(Ro)}),BB=fs({threadId:_c,environmentId:z,projectId:Za,logicalProjectKey:fa(z),environmentSelection:fa(Oo([`auto`,`manual`])),loadBalancedEnvironmentId:fa(Bs(z)),createdAt:z,runtimeMode:Zc,interactionMode:Ro,branch:Bs(z),worktreePath:Bs(z),envMode:OB,startFromOrigin:bo.pipe(nc(Ga(!1))),promotedTo:fa(Bs(fs({environmentId:z,threadId:z})))}),VB=fs({draftsByThreadKey:Jo(z,zB),draftThreadsByThreadKey:Jo(z,BB),logicalProjectDraftThreadKeyByLogicalProjectKey:Jo(z,z),stickyModelSelectionByProvider:fa(Jo(ss,Ki)),stickyOptionsByModelByProvider:fa(Jo(ss,Jo(z,Ia))),stickyActiveProvider:fa(Bs(ss))}),HB=fs({version:Nc,state:VB}),UB=new Map;function WB(e){return e?e.prompt.trim().length>0||e.images.length>0||e.files.length>0||e.persistedAttachments.length>0||e.terminalContexts.length>0||e.previewAnnotations.length>0||e.reviewComments.length>0||e.threadContexts.length>0||e.environmentContexts.length>0:!1}function GB(e){return e?{[e.instanceId]:e}:null}function KB(e){if(!e)return null;let t={};for(let[n,r]of Object.entries(e))r?.options&&r.options.length>0&&(t[n]=r.options);return Object.keys(t).length>0?t:null}function qB(e){return{...e,...e.options?{options:e.options.map(e=>({...e}))}:{}}}function JB(e){let t=[];for(let[n,r]of Object.entries(e))r!==void 0&&t.push([n,qB(r)]);return Object.fromEntries(t)}function YB(e){let t={};for(let[n,r]of Object.entries(e))for(let[e,i]of Object.entries(r??{}))i!==void 0&&i.length!==0&&(t[n]??={},t[n][e]=i);return t}function XB(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&r.options!==void 0&&r.options.length!==0&&(t[n]={[r.model]:r.options});return t}var ZB=Object.freeze({draftsByThreadKey:{},draftThreadsByThreadKey:{},logicalProjectDraftThreadKeyByLogicalProjectKey:{},stickyModelSelectionByProvider:{},stickyOptionsByModelByProvider:{},stickyActiveProvider:null}),QB=[],$B=[],eV=[],tV=[],nV=[],rV=[],iV=[],aV=[],oV=[];Object.freeze(QB),Object.freeze($B),Object.freeze(eV),Object.freeze(tV),Object.freeze(rV),Object.freeze(iV),Object.freeze(aV),Object.freeze(oV);var sV=Object.freeze({}),cV=Object.freeze({activeProvider:null,modelSelectionByProvider:sV}),lV=Object.freeze({prompt:``,images:QB,files:$B,nonPersistedImageIds:eV,persistedAttachments:tV,terminalContexts:nV,previewAnnotations:rV,reviewComments:iV,threadContexts:aV,environmentContexts:oV,modelSelectionByProvider:sV,activeProvider:null,runtimeMode:null,interactionMode:null});function uV(){return{prompt:``,images:[],files:[],nonPersistedImageIds:[],persistedAttachments:[],terminalContexts:[],previewAnnotations:[],reviewComments:[],threadContexts:[],environmentContexts:[],modelSelectionByProvider:{},activeProvider:null,runtimeMode:null,interactionMode:null}}function dV(e){return`${e.mimeType}\u0000${e.sizeBytes}\u0000${e.name}`}function fV(e){return`${e.mimeType}\u0000${e.sizeBytes}\u0000${e.name}`}function pV(e,t){if(e.name!==t.name||e.sizeBytes!==t.sizeBytes)return!1;if(e.mimeType===t.mimeType)return!0;let n=e.mimeType.toLowerCase();return(n===``||n===`application/octet-stream`)&&WL(e)!==null&&WL(t)!==null}function mV(e){return`${e.terminalId}\u0000${e.lineStart}\u0000${e.lineEnd}`}function hV(e,t){let n=t.terminalId.trim(),r=t.terminalLabel.trim();if(n.length===0||r.length===0)return null;let i=Math.max(1,Math.floor(t.lineStart)),a=Math.max(i,Math.floor(t.lineEnd));return{...t,id:Cb(t.id),threadId:e,terminalId:n,terminalLabel:r,lineStart:i,lineEnd:a,text:QL(t.text)}}function gV(e,t){let n=new Set,r=new Set,i=[];for(let a of t){let t=hV(e,a);if(!t)continue;let o=mV(t);n.has(t.id)||r.has(o)||(i.push(t),n.add(t.id),r.add(o))}return i}function _V(e){return e.prompt.length===0&&e.images.length===0&&e.files.length===0&&e.persistedAttachments.length===0&&e.terminalContexts.length===0&&e.previewAnnotations.length===0&&e.reviewComments.length===0&&e.threadContexts.length===0&&e.environmentContexts.length===0&&Object.keys(e.modelSelectionByProvider).length===0&&e.activeProvider===null&&e.runtimeMode===null&&e.interactionMode===null}function vV(e){return bB(e)?e:null}var yV=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/;function bV(e){return typeof e!=`string`||!yV.test(e)?null:e}function xV(e){if(Array.isArray(e)){let t=[];for(let n of e){if(!n||typeof n!=`object`)continue;let e=n,r=e.id,i=e.value;typeof r==`string`&&r.length!==0&&(typeof i==`string`||typeof i==`boolean`)&&t.push({id:r,value:i})}return t.length>0?t:void 0}if(e&&typeof e==`object`){let t=e,n=[];for(let[e,r]of Object.entries(t))(typeof r==`string`||typeof r==`boolean`)&&n.push({id:e,value:r});return n.length>0?n:void 0}}function SV(e,t,n){let r=e&&typeof e==`object`?e:null,i={};for(let e of[`codex`,`claudeAgent`,`cursor`,`opencode`]){let t=xV(r?.[e]);t&&(i[e]=t)}if(t===`codex`&&n){let e=[];if(typeof n.effort==`string`&&n.effort.length>0&&e.push({id:`reasoningEffort`,value:n.effort}),(n.codexFastMode===!0||typeof n.serviceTier==`string`&&n.serviceTier===`fast`)&&e.push({id:`fastMode`,value:!0}),e.length>0){let t=i.codex??[],n=new Set(t.map(e=>e.id)),r=[...t];for(let t of e)n.has(t.id)||r.push(t);i.codex=r}}return Object.keys(i).length>0?i:null}function CV(e,t){let n=e&&typeof e==`object`?e:null,r=bV(n?.instanceId??n?.provider??t?.provider);if(r===null)return null;let i=n?.model??t?.model;if(typeof i!=`string`)return null;let a=vV(n?.provider??t?.provider)??qo.make(`codex`),o=n?.instanceId===void 0?xS(i,a):SS(i);if(!o)return null;if(Array.isArray(n?.options))return kS(r,o,xV(n.options));let s=vV(r),c=s?SV(n?.options?{[s]:n.options}:t?.modelOptions,s,s===`codex`?t?.legacyCodex:void 0):null;return kS(r,o,s?c?.[s]:void 0)}function wV(e,t){if(e===null)return null;let n=vV(e.instanceId),r=n?t?.[n]:void 0;return kS(e.instanceId,e.model,r)}function TV(e,t){if(!e?.options||e.options.length===0)return SV(t);let n=vV(e.instanceId);return n?EV(SV(t),n,e.options):SV(t)}function EV(e,t,n){let{[t]:r,...i}=e??{},a={...i};return n&&n.length>0&&(a[t]=n),Object.keys(a).length>0?a:null}function DV(e,t){let n={};if(t)for(let r of[`codex`,`claudeAgent`,`cursor`,`opencode`]){let i=t[r];if(i&&i.length>0){let t=qo.make(r),a=ac(t);n[a]=kS(a,e?.instanceId===a?e.model:Li[t]??`gpt-6-astra`,i)}}return e&&(n[e.instanceId]=e),n}function OV(e){let t=e.threadModelSelection?.model??e.projectModelSelection?.model??null,n=e.selectedInstanceId!==null&&e.selectedInstanceId!==void 0&&e.threadModelSelection?.instanceId===e.selectedInstanceId,r=(e.selectedInstanceId?PL(e.selectedInstanceId,e.settings,e.providers,t,{preserveUnavailableSelection:n}):null)??(e.selectedProvider===`antigravity`&&e.selectedInstanceId?``:null)??NL(e.selectedProvider,e.settings,e.providers,t)??xS(t,e.selectedProvider)??kT(e.providers,e.selectedProvider),i=e.selectedInstanceId?e.draft?.modelSelectionByProvider?.[e.selectedInstanceId]:void 0,a=e.selectedInstanceId&&e.selectedInstanceId!==ac(e.selectedProvider)?void 0:e.draft?.modelSelectionByProvider?.[ss.make(e.selectedProvider)],o=i??a,s=i?e.selectedInstanceId??ss.make(e.selectedProvider):ss.make(e.selectedProvider),c=o?.model?PL(s,e.settings,e.providers,o.model,{preserveUnavailableSelection:!0})??(e.selectedProvider===`antigravity`?``:null)??NL(e.selectedProvider,e.settings,e.providers,o.model):r,l=[e.draft?.modelSelectionByProvider,GB(e.threadModelSelection),GB(e.projectModelSelection)].find(e=>KB(e)!==null)??null,u=KB(l);return{selectedModel:c,modelOptions:kV({...e,modelOptions:u,optionSelections:l,selectedModel:c})}}function kV(e){let{modelOptions:t,selectedInstanceId:n,requestedInstanceId:r}=e;if(!t||!n||!r||n===r||t[n]!==void 0)return t;let i=t[r],a=e.providers.find(e=>e.instanceId===r)?.driver,o=e.optionSelections?.[r]?.model;return!i||a!==e.selectedProvider||o!==e.selectedModel?t:{...t,[n]:i}}function AV(e){typeof URL<`u`&&e.startsWith(`blob:`)&&URL.revokeObjectURL(e)}function jV(e){if(e)for(let t of e.images)AV(t.previewUrl)}function MV(e){if(!e||typeof e!=`object`)return null;let t=e,n=t.id,r=t.name,i=t.mimeType,a=t.sizeBytes,o=t.dataUrl;return typeof n!=`string`||typeof r!=`string`||typeof i!=`string`||typeof a!=`number`||!Number.isFinite(a)||typeof o!=`string`||n.length===0||o.length===0?null:{id:n,name:r,mimeType:i,sizeBytes:a,dataUrl:o,...wB(t.source)?{source:t.source}:{}}}function NV(e){if(!e||typeof e!=`object`)return null;let t=e,n=t.id,r=t.threadId,i=t.createdAt,a=t.lineStart,o=t.lineEnd;if(typeof n!=`string`||n.length===0||typeof r!=`string`||r.length===0||typeof i!=`string`||i.length===0||typeof a!=`number`||!Number.isFinite(a)||typeof o!=`number`||!Number.isFinite(o))return null;let s=typeof t.terminalId==`string`?t.terminalId.trim():``,c=typeof t.terminalLabel==`string`?t.terminalLabel.trim():``;if(s.length===0||c.length===0)return null;let l=Math.max(1,Math.floor(a)),u=Math.max(l,Math.floor(o));return{id:Cb(n),threadId:r,createdAt:i,terminalId:s,terminalLabel:c,lineStart:l,lineEnd:u,...typeof t.text==`string`?{text:t.text}:{}}}function PV(e,t){return e===`auto`||e===`local`||e===`worktree`?e:t?`worktree`:`local`}function FV(e){return Yx(e)}function IV(e){return e.trim()}function LV(e){return typeof e==`string`?e.trim():Xx(e)}function RV(e,t){let n=$x(e);return n?LV(n):t?.environmentId?LV(qx(t.environmentId,e)):e}function zV(e){return $x(e)}function BV(e,t){if(typeof t==`string`){let e=t.trim();return e.length>0?kB.make(e):null}return t}function $(e,t){let n=BV(e,t);if(!n)return null;if(typeof n!=`string`){let t=LV(n);if(e.draftsByThreadKey[t])return t;for(let[t,r]of Object.entries(e.draftThreadsByThreadKey))if(r.environmentId===n.environmentId&&r.threadId===n.threadId)return t;return t}let r=LV(n);return r.length>0?r:null}function VV(e,t){let n=BV(e,t);return n?typeof n==`string`?e.draftThreadsByThreadKey[n]?.threadId??null:n.threadId:null}function HV(e,t){let n=$(e,t);return n?e.draftsByThreadKey[n]??null:null}function UV(e){if(e===void 0)return!1;let t=qx(e.environmentId,e.threadId);return Object.keys(sT(t).sessions).length>0}function WV(e,t){return Object.values(e).includes(t)}function GV(e,t){return{draftId:e,...t}}function KV(e,t,n,r,i){let a=r!==void 0&&(r.environmentId!==e.environmentId||r.projectId!==e.projectId),o=i?.worktreePath===void 0?a?null:r?.worktreePath??null:i.worktreePath??null,s=i?.branch===void 0?a?null:r?.branch??null:i.branch??null,c=i?.startFromOrigin===void 0?r?.startFromOrigin??!1:i.startFromOrigin,l=i?.environmentSelection??r?.environmentSelection;return{threadId:t,environmentId:e.environmentId,projectId:e.projectId,logicalProjectKey:n,...l?{environmentSelection:l}:{},...i?.loadBalancedEnvironmentId===void 0?r?.loadBalancedEnvironmentId===void 0?{}:{loadBalancedEnvironmentId:a?null:r.loadBalancedEnvironmentId}:{loadBalancedEnvironmentId:i.loadBalancedEnvironmentId},createdAt:i?.createdAt??r?.createdAt??new Date().toISOString(),runtimeMode:i?.runtimeMode??r?.runtimeMode??`full-access`,interactionMode:i?.interactionMode??r?.interactionMode??`default`,branch:s,worktreePath:o,envMode:i?.envMode??(o?`worktree`:r?.envMode??`local`),startFromOrigin:c,promotedTo:null}}function qV(e,t){return!e||!t?e===t:e.environmentId===t.environmentId&&e.threadId===t.threadId}function JV(e){return e?.promotedTo!==null&&e?.promotedTo!==void 0}function YV(e,t){return!!e&&e.threadId===t.threadId&&e.environmentId===t.environmentId&&e.projectId===t.projectId&&e.logicalProjectKey===t.logicalProjectKey&&e.environmentSelection===t.environmentSelection&&e.loadBalancedEnvironmentId===t.loadBalancedEnvironmentId&&e.createdAt===t.createdAt&&e.runtimeMode===t.runtimeMode&&e.interactionMode===t.interactionMode&&e.branch===t.branch&&e.worktreePath===t.worktreePath&&e.envMode===t.envMode&&e.startFromOrigin===t.startFromOrigin&&qV(e.promotedTo,t.promotedTo)}function XV(e,t,n){let r=Object.fromEntries(Object.entries(e.logicalProjectDraftThreadKeyByLogicalProjectKey).filter(([,e])=>e!==t)),{[t]:i,...a}=e.draftThreadsByThreadKey,{[t]:o,...s}=e.draftsByThreadKey;return n&&o?s[LV(n)]=o:jV(o),{draftsByThreadKey:s,draftThreadsByThreadKey:a,logicalProjectDraftThreadKeyByLogicalProjectKey:r}}function ZV(e,t){let n={},r=new Map;if(t&&typeof t==`object`)for(let[e,n]of Object.entries(t)){if(typeof n!=`string`||n.length===0)continue;let t=Qx(e);if(!t)continue;let i=$x(n);i?r.set(i.threadId,i.environmentId):r.set(n,t.environmentId)}if(e&&typeof e==`object`)for(let[t,i]of Object.entries(e)){if(typeof t!=`string`||t.length===0||!i||typeof i!=`object`)continue;let e=i,a=$x(t),o=RV(t),s=a?.threadId??(typeof e.threadId==`string`&&e.threadId.length>0?e.threadId:t),c=a?.environmentId??(typeof e.environmentId==`string`&&e.environmentId.length>0?e.environmentId:r.get(t)),l=e.projectId,u=e.createdAt,d=e.branch,f=e.worktreePath,p=e.startFromOrigin===!0,m=typeof f==`string`?f:null,h=e.promotedTo,g=h&&typeof h==`object`?h:null,_=g&&typeof g.environmentId==`string`&&g.environmentId.length>0&&typeof g.threadId==`string`&&g.threadId.length>0?qx(g.environmentId,g.threadId):null;if(typeof l!=`string`||l.length===0||c===void 0)continue;let v=c;n[o]={threadId:s,environmentId:v,projectId:l,logicalProjectKey:typeof e.logicalProjectKey==`string`&&e.logicalProjectKey.length>0?e.logicalProjectKey:a?FV(Kx(v,l)):t,createdAt:typeof u==`string`&&u.length>0?u:new Date().toISOString(),runtimeMode:yB(e.runtimeMode)?e.runtimeMode:GL,interactionMode:e.interactionMode===`plan`||e.interactionMode==="default"?e.interactionMode:KL,branch:typeof d==`string`?d:null,worktreePath:m,envMode:PV(e.envMode,m),startFromOrigin:p,...e.environmentSelection===`manual`||e.environmentSelection===`auto`?{environmentSelection:e.environmentSelection}:{},...typeof e.loadBalancedEnvironmentId==`string`&&e.loadBalancedEnvironmentId.length>0?{loadBalancedEnvironmentId:e.loadBalancedEnvironmentId}:e.loadBalancedEnvironmentId===null?{loadBalancedEnvironmentId:null}:{},promotedTo:_}}let i={};if(t&&typeof t==`object`)for(let[e,a]of Object.entries(t)){if(typeof a!=`string`||a.length===0)continue;let t=Qx(e),o=$x(a),s=RV(a);i[e]=s;let c=n[s];o&&r.set(o.threadId,o.environmentId),c?.logicalProjectKey!==e&&(t?c?(c.projectId!==t.projectId||c.environmentId!==t.environmentId)&&(n[s]={...c,threadId:c.threadId,environmentId:t.environmentId,projectId:t.projectId,logicalProjectKey:e}):n[s]={threadId:o?.threadId??s,environmentId:t.environmentId,projectId:t.projectId,logicalProjectKey:e,createdAt:new Date().toISOString(),runtimeMode:GL,interactionMode:KL,branch:null,worktreePath:null,envMode:`local`,startFromOrigin:!1,promotedTo:null}:c&&(n[s]={...c,logicalProjectKey:e}))}return{draftThreadsByThreadKey:n,logicalProjectDraftThreadKeyByLogicalProjectKey:i}}var QV=hi(Ki);function $V(e){return Object.fromEntries(Object.entries(e).flatMap(([e,t])=>ms(QV(t),{onNone:()=>[],onSome:t=>[[e,t]]})))}function eH(e,t){if(!e||typeof e!=`object`)return{};let n=new Map;for(let[e,r]of Object.entries(t)){let t=zV(e);t&&n.set(t.threadId,r.environmentId)}let r={};for(let[i,a]of Object.entries(e)){if(typeof i!=`string`||i.length===0||!a||typeof a!=`object`)continue;let e=a,o=typeof e.prompt==`string`?e.prompt:``,s=Array.isArray(e.attachments)?e.attachments.flatMap(e=>{let t=MV(e);return t?[t]:[]}):[],c=Array.isArray(e.files)?e.files.filter(LB):[],l=Array.isArray(e.terminalContexts)?e.terminalContexts.flatMap(e=>{let t=NV(e);return t?[t]:[]}):[],u=Array.isArray(e.reviewComments)?e.reviewComments.filter(xB):[],d=Array.isArray(e.threadContexts)?e.threadContexts.filter(SB):[],f=Array.isArray(e.environmentContexts)?e.environmentContexts.filter(CB):[],p=Array.isArray(e.previewAnnotations)?e.previewAnnotations.filter(TB):[],m=`elementContexts`in a&&Array.isArray(a.elementContexts)?a.elementContexts:[];for(let e of m)Pa(Go)(e)&&`id`in e&&typeof e.id==`string`&&`pickedAt`in e&&typeof e.pickedAt==`string`&&(p.some(t=>t.id===e.id)||p.push(Yb(e,e.id,e.pickedAt)));let h=yB(e.runtimeMode)?e.runtimeMode:null,g=e.interactionMode===`plan`||e.interactionMode==="default"?e.interactionMode:null,_=new Map;for(let[e,t]of[[`image`,s],[`file`,c],[`terminal`,l],[`review-comment`,u],[`preview-annotation`,p]]){for(let n of t){let t=wb(e,n.id);_.set(`${e}/${n.id}`,t),_.set(`${e}/${Cb(n.id)}`,t),e===`preview-annotation`&&_.set(`${e}/${Cb(`annotation-${n.id}`)}`,t)}for(let n of t){let t=wb(e,n.id);_.set(`${e}/${t}`,t)}}let v=Ub(iR(o.replace(/!?\[([^\]\r\n]*)\]\(p4-context:\/\/v1\/([a-z-]+)\/([^/()\r\n]+)\)/g,(e,t,n,r)=>{let i=_.get(`${n}/${r}`);return i?Fb({kind:n,contextId:i,label:t}):e}),l),l.map(e=>WR({...e,text:``}))),y=a,b={},x=null,S;if(e.modelSelectionByProvider&&typeof e.modelSelectionByProvider==`object`)b=$V(e.modelSelectionByProvider),x=bV(e.activeProvider),S=e.modelSelectionExplicit===!0||void 0;else{let e=SV(y.modelOptions,void 0,y)??null,t=CV(y.modelSelection,{provider:y.provider,model:y.model,modelOptions:e??y.modelOptions,legacyCodex:y}),n=TV(t,e),r=wV(t,n);b=DV(r,n),x=r?.instanceId??null}let C=Object.keys(b).length>0||x!==null;if(o.length===0&&s.length===0&&c.length===0&&l.length===0&&p.length===0&&u.length===0&&d.length===0&&f.length===0&&!C&&!h&&!g)continue;let w=$x(i)===null?t[i]===void 0?(()=>{let e=n.get(i);return e?RV(i,{environmentId:e}):i})():i:RV(i);r[w]={prompt:v,attachments:s,...c.length>0?{files:c}:{},...l.length>0?{terminalContexts:l}:{},...p.length>0?{previewAnnotations:p}:{},...u.length>0?{reviewComments:u}:{},...d.length>0?{threadContexts:d}:{},...f.length>0?{environmentContexts:f}:{},...C?{modelSelectionByProvider:JB(b),activeProvider:x,...S?{modelSelectionExplicit:!0}:{}}:{},...h?{runtimeMode:h}:{},...g?{interactionMode:g}:{}}}return r}function tH(e){return e.prompt.trim().length>0||e.attachments.length>0||(e.files?.length??0)>0||(e.terminalContexts?.length??0)>0||(e.previewAnnotations?.length??0)>0||(e.reviewComments?.length??0)>0||(e.threadContexts?.length??0)>0||(e.environmentContexts?.length??0)>0}function nH(e,t){return Object.fromEntries(Object.entries(e).flatMap(([e,n])=>{if(t[e]===void 0||n.modelSelectionExplicit===!0||tH(n))return[[e,n]];let{activeProvider:r,modelSelectionByProvider:i,modelSelectionExplicit:a,...o}=n;return o.runtimeMode||o.interactionMode?[[e,o]]:[]}))}function rH(e){let t=aH(e);return{...t,draftsByThreadKey:nH(t.draftsByThreadKey,t.draftThreadsByThreadKey)}}function iH(e){let t=new Set(Object.values(e.logicalProjectDraftThreadKeyByLogicalProjectKey)),n=new Set(Object.entries(e.draftThreadsByThreadKey).filter(([n,r])=>t.has(n)||JV(r)||WB(e.draftsByThreadKey[n])||UV(r)).map(([e])=>e)),r={};for(let[t,i]of Object.entries(e.draftsByThreadKey)){if(typeof t!=`string`||t.length===0||e.draftThreadsByThreadKey[t]!==void 0&&!n.has(t))continue;let a=Object.keys(i.modelSelectionByProvider).length>0||i.activeProvider!==null;(i.prompt.length!==0||i.persistedAttachments.length!==0||i.files.length!==0||i.terminalContexts.length!==0||i.previewAnnotations.length!==0||i.reviewComments.length!==0||i.threadContexts.length!==0||i.environmentContexts.length!==0||a||i.runtimeMode!==null||i.interactionMode!==null)&&(r[t]={prompt:i.prompt,attachments:i.persistedAttachments,...i.files.length>0?{files:i.files.map(e=>({id:e.id,name:e.name,mimeType:e.mimeType,sizeBytes:e.sizeBytes,...e.source?{source:e.source}:{},...e.uploadedAttachmentId&&e.uploadEnvironmentId?{attachmentId:e.uploadedAttachmentId,environmentId:e.uploadEnvironmentId}:{}}))}:{},...i.terminalContexts.length>0?{terminalContexts:i.terminalContexts.map(e=>({id:e.id,threadId:e.threadId,createdAt:e.createdAt,terminalId:e.terminalId,terminalLabel:e.terminalLabel,lineStart:e.lineStart,lineEnd:e.lineEnd,text:e.text}))}:{},...i.previewAnnotations.length>0?{previewAnnotations:i.previewAnnotations.map(e=>({...e}))}:{},...i.reviewComments.length>0?{reviewComments:i.reviewComments.map(e=>({...e}))}:{},...i.threadContexts.length>0?{threadContexts:i.threadContexts.map(e=>({...e}))}:{},...i.environmentContexts.length>0?{environmentContexts:i.environmentContexts.map(e=>({...e}))}:{},...a?{modelSelectionByProvider:JB(i.modelSelectionByProvider),activeProvider:i.activeProvider,...i.modelSelectionExplicit?{modelSelectionExplicit:!0}:{}}:{},...i.runtimeMode?{runtimeMode:i.runtimeMode}:{},...i.interactionMode?{interactionMode:i.interactionMode}:{}})}let i={};for(let[t,r]of Object.entries(e.draftThreadsByThreadKey))n.has(t)&&(i[t]=r);return{draftsByThreadKey:r,draftThreadsByThreadKey:i,logicalProjectDraftThreadKeyByLogicalProjectKey:e.logicalProjectDraftThreadKeyByLogicalProjectKey,stickyModelSelectionByProvider:JB(e.stickyModelSelectionByProvider),stickyOptionsByModelByProvider:YB(e.stickyOptionsByModelByProvider),stickyActiveProvider:e.stickyActiveProvider}}function aH(e){if(!e||typeof e!=`object`)return ZB;let t=e,{draftThreadsByThreadKey:n,logicalProjectDraftThreadKeyByLogicalProjectKey:r}=ZV(t.draftThreadsByThreadKey??t.draftThreadsByThreadId,t.logicalProjectDraftThreadKeyByLogicalProjectKey??t.projectDraftThreadKeyByProjectKey??t.projectDraftThreadIdByProjectKey??t.projectDraftThreadIdByProjectId),i={},a=null;if(t.stickyModelSelectionByProvider&&typeof t.stickyModelSelectionByProvider==`object`)i=$V(t.stickyModelSelectionByProvider),a=bV(t.stickyActiveProvider);else{let e=SV(t.stickyModelOptions)??{},n=CV(t.stickyModelSelection,{provider:t.stickyProvider??`codex`,model:t.stickyModel,modelOptions:e}),r=TV(n,e);i=DV(wV(n,r),r),a=bV(t.stickyProvider)}return{draftsByThreadKey:eH(t.draftsByThreadKey??t.draftsByThreadId,n),draftThreadsByThreadKey:n,logicalProjectDraftThreadKeyByLogicalProjectKey:r,stickyModelSelectionByProvider:JB(i),stickyOptionsByModelByProvider:t.stickyOptionsByModelByProvider===void 0?XB(i):YB(t.stickyOptionsByModelByProvider),stickyActiveProvider:a}}function oH(e){if(e.length===0)return[];try{let t=RS(EB,HB);return!t||t.version!==DB?[]:(t.state.draftsByThreadKey[e]?.attachments??[]).map(e=>e.id)}catch{return[]}}function sH(e,t,n){let r=new Set;try{AB.flush(),r=new Set(oH(e))}catch{r=new Set}n(n=>{let i=n.draftsByThreadKey[e];if(!i)return n;let a=new Set(i.images.map(e=>e.id)),o=t.filter(e=>a.has(e.id)&&r.has(e.id)),s=[];for(let e of i.images)r.has(e.id)||s.push(e.id);let c={...i,persistedAttachments:o,nonPersistedImageIds:s},l={...n.draftsByThreadKey};return _V(c)?delete l[e]:l[e]=c,{draftsByThreadKey:l}})}function cH(e){let t=e.dataUrl.indexOf(`,`),n=t===-1?e.dataUrl:e.dataUrl.slice(0,t),r=t===-1?``:e.dataUrl.slice(t+1);if(r.length===0)return null;try{if(!n.includes(`;base64`)){let t=decodeURIComponent(r),i=n.startsWith(`data:`)&&n.includes(`;`)?n.slice(5,n.indexOf(`;`)):e.mimeType;return new File([t],e.name,{type:i||e.mimeType})}let t=atob(r),i=new Uint8Array(t.length);for(let e=0;e<t.length;e+=1)i[e]=t.charCodeAt(e);return new File([i],e.name,{type:e.mimeType})}catch{return null}}function lH(e){return e.flatMap(e=>{let t=cH(e);return t?[{type:`image`,id:e.id,name:e.name,mimeType:e.mimeType,sizeBytes:e.sizeBytes,previewUrl:e.dataUrl,file:t,...e.source?{source:e.source}:{}}]:[]})}function uH(e){let t=e.modelSelectionByProvider??{},n=bV(e.activeProvider)??null,r=e.files?.map(e=>({type:`file`,id:e.id,name:e.name,mimeType:e.mimeType,sizeBytes:e.sizeBytes,file:null,...e.source?{source:e.source}:{},...e.attachmentId!==void 0&&e.environmentId!==void 0?{uploadedAttachmentId:e.attachmentId,uploadEnvironmentId:e.environmentId}:{}}))??[];return{prompt:Ub(e.prompt,[...(e.reviewComments??[]).map(qR),...(e.previewAnnotations??[]).map(JR),...(e.threadContexts??[]).map(YR),...(e.environmentContexts??[]).map(XR),...r.map(rz)]),images:lH(e.attachments),files:r,nonPersistedImageIds:[],persistedAttachments:[...e.attachments],terminalContexts:e.terminalContexts?.map(e=>({...e,text:e.text??``}))??[],previewAnnotations:e.previewAnnotations?.map(e=>({...e}))??[],reviewComments:e.reviewComments?.map(e=>({...e}))??[],threadContexts:e.threadContexts?.map(e=>({...e}))??[],environmentContexts:e.environmentContexts?.map(e=>({...e}))??[],modelSelectionByProvider:t,activeProvider:n,...e.modelSelectionExplicit?{modelSelectionExplicit:!0}:{},runtimeMode:e.runtimeMode??null,interactionMode:e.interactionMode??null}}function dH(e){return{threadId:e.threadId,environmentId:e.environmentId,projectId:e.projectId,logicalProjectKey:e.logicalProjectKey??FV(Kx(e.environmentId,e.projectId)),createdAt:e.createdAt,runtimeMode:e.runtimeMode,interactionMode:e.interactionMode,branch:e.branch,worktreePath:e.worktreePath,envMode:e.envMode,startFromOrigin:e.startFromOrigin,...e.environmentSelection?{environmentSelection:e.environmentSelection}:{},...e.loadBalancedEnvironmentId===void 0?{}:{loadBalancedEnvironmentId:e.loadBalancedEnvironmentId},promotedTo:e.promotedTo?qx(e.promotedTo.environmentId,e.promotedTo.threadId):null}}var fH=bz()(Cz((e,t)=>{let n=e;return{draftsByThreadKey:{},draftThreadsByThreadKey:{},logicalProjectDraftThreadKeyByLogicalProjectKey:{},backgroundSubmissionThreadKeys:{},rewindingThreadKeys:new Set,stickyModelSelectionByProvider:{},stickyOptionsByModelByProvider:{},stickyActiveProvider:null,getComposerDraft:e=>HV(t(),e),getDraftThreadByLogicalProjectKey:e=>t().getDraftSessionByLogicalProjectKey(e),getDraftSessionByLogicalProjectKey:e=>{let n=IV(e);if(n.length===0)return null;let r=t().logicalProjectDraftThreadKeyByLogicalProjectKey[n];if(!r)return null;let i=t().draftThreadsByThreadKey[r];return!i||JV(i)?null:GV(kB.make(r),i)},getDraftThreadByProjectRef:e=>t().getDraftSessionByProjectRef(e),getDraftSessionByProjectRef:e=>{let n=t();for(let t of Object.values(n.logicalProjectDraftThreadKeyByLogicalProjectKey)){let r=n.draftThreadsByThreadKey[t];if(r&&!JV(r)&&r.projectId===e.projectId&&r.environmentId===e.environmentId)return GV(kB.make(t),r)}for(let[t,r]of Object.entries(n.draftThreadsByThreadKey))if(!JV(r)&&r.projectId===e.projectId&&r.environmentId===e.environmentId)return GV(kB.make(t),r);return null},getDraftSession:e=>t().draftThreadsByThreadKey[e]??null,getDraftSessionByRef:e=>{for(let n of Object.values(t().draftThreadsByThreadKey))if(n.environmentId===e.environmentId&&n.threadId===e.threadId)return n;return null},getDraftIdByRef:e=>{for(let[n,r]of Object.entries(t().draftThreadsByThreadKey))if(r.environmentId===e.environmentId&&r.threadId===e.threadId)return kB.make(n);return null},getDraftThread:e=>typeof e==`string`?t().getDraftSession(kB.make(e)):t().getDraftSessionByRef(e),getDraftThreadByRef:e=>t().getDraftSessionByRef(e),listDraftThreadKeys:()=>Object.values(t().draftThreadsByThreadKey).map(e=>Xx(qx(e.environmentId,e.threadId))),hasDraftThreadsInEnvironment:e=>Object.values(t().draftThreadsByThreadKey).some(t=>t.environmentId===e),setLogicalProjectDraftThreadId:(e,t,r,i)=>{let a=IV(e);a.length!==0&&r.length!==0&&n(e=>{let n=e.draftThreadsByThreadKey[r],o=e.logicalProjectDraftThreadKeyByLogicalProjectKey[a],s=KV(t,i?.threadId??n?.threadId??_c.make(r),a,n,i),c=o===r,l=Object.entries(e.logicalProjectDraftThreadKeyByLogicalProjectKey).every(([e,t])=>t!==r||e===a);if(c&&l&&YV(n,s))return e;let u=Object.fromEntries(Object.entries(e.logicalProjectDraftThreadKeyByLogicalProjectKey).filter(([e,t])=>t!==r||e===a));u[a]=r;let d={...e.draftThreadsByThreadKey,[r]:s},f=e.draftsByThreadKey[r],p=e.draftsByThreadKey;if(n&&n.environmentId!==t.environmentId&&f!==void 0){let n=PB(f,t.environmentId);n!==f&&(p={...e.draftsByThreadKey,[r]:n})}let m=o===void 0?void 0:d[o];return!o||o===r||WV(u,o)||JV(m)||WB(e.draftsByThreadKey[o])||UV(m)||(delete d[o],e.draftsByThreadKey[o]!==void 0&&(p={...p},delete p[o])),{draftsByThreadKey:p,draftThreadsByThreadKey:d,logicalProjectDraftThreadKeyByLogicalProjectKey:u}})},setProjectDraftThreadId:(e,n,r)=>{t().setLogicalProjectDraftThreadId(FV(e),e,n,r)},setDraftThreadContext:(e,r)=>{let i=$(t(),e)??``;i.length!==0&&n(e=>{let t=e.draftThreadsByThreadKey[i];if(!t)return e;let n=r.projectRef??{environmentId:t.environmentId,projectId:t.projectId};if(n.projectId.length===0||n.environmentId.length===0)return e;let a=n.environmentId!==t.environmentId||n.projectId!==t.projectId,o=r.worktreePath===void 0?a?null:t.worktreePath:r.worktreePath??null,s=r.branch===void 0?a?null:t.branch:r.branch??null,c=r.startFromOrigin===void 0?t.startFromOrigin:r.startFromOrigin,l=r.environmentSelection??(r.branch!=null||r.worktreePath!=null?`manual`:t.environmentSelection),u={threadId:t.threadId,environmentId:n.environmentId,projectId:n.projectId,logicalProjectKey:t.logicalProjectKey,...l?{environmentSelection:l}:{},loadBalancedEnvironmentId:r.loadBalancedEnvironmentId===void 0?a?null:t.loadBalancedEnvironmentId??null:r.loadBalancedEnvironmentId,createdAt:r.createdAt===void 0?t.createdAt:r.createdAt||t.createdAt,runtimeMode:r.runtimeMode??t.runtimeMode,interactionMode:r.interactionMode??t.interactionMode,branch:s,worktreePath:o,envMode:r.envMode??(o?`worktree`:t.envMode??`local`),startFromOrigin:c,promotedTo:t.promotedTo??null};return u.environmentId===t.environmentId&&u.projectId===t.projectId&&u.logicalProjectKey===t.logicalProjectKey&&u.environmentSelection===t.environmentSelection&&u.loadBalancedEnvironmentId===t.loadBalancedEnvironmentId&&u.createdAt===t.createdAt&&u.runtimeMode===t.runtimeMode&&u.interactionMode===t.interactionMode&&u.branch===t.branch&&u.worktreePath===t.worktreePath&&u.envMode===t.envMode&&u.startFromOrigin===t.startFromOrigin&&qV(u.promotedTo,t.promotedTo)?e:{draftThreadsByThreadKey:{...e.draftThreadsByThreadKey,[i]:u}}})},clearProjectDraftThreadId:e=>{n(t=>{let n=Object.entries(t.draftThreadsByThreadKey).filter(([,t])=>t.projectId===e.projectId&&t.environmentId===e.environmentId).map(([e])=>e);if(n.length===0)return t;let r={draftsByThreadKey:t.draftsByThreadKey,draftThreadsByThreadKey:t.draftThreadsByThreadKey,logicalProjectDraftThreadKeyByLogicalProjectKey:t.logicalProjectDraftThreadKeyByLogicalProjectKey};for(let e of n)r=XV(r,e);return r})},clearProjectDraftThreadById:(e,r)=>{let i=$(t(),r)??``;i.length!==0&&n(t=>{let n=t.draftThreadsByThreadKey[i];return!n||n.projectId!==e.projectId||n.environmentId!==e.environmentId?t:XV(t,i)})},markDraftThreadPromoting:(e,r)=>{let i=$(t(),e);i&&n(e=>{let t=e.draftThreadsByThreadKey[i];if(!t)return e;let n=r??qx(t.environmentId,t.threadId);return qV(t.promotedTo,n)?e:{draftThreadsByThreadKey:{...e.draftThreadsByThreadKey,[i]:{...t,promotedTo:n}}}})},finalizePromotedDraftThread:e=>{let r=$(t(),e)??``;r.length!==0&&n(e=>{let t=e.draftThreadsByThreadKey[r];return!t||!JV(t)?e:XV(e,r,t.promotedTo??void 0)})},clearDraftThread:e=>{let r=$(t(),e)??``;r.length!==0&&n(e=>{let t=e.draftThreadsByThreadKey[r]!==void 0,n=Object.values(e.logicalProjectDraftThreadKeyByLogicalProjectKey).includes(r),i=e.draftsByThreadKey[r]!==void 0;return!t&&!n&&!i?e:XV(e,r)})},setStickyModelSelection:e=>{let t=CV(e);n(e=>{if(!t)return e;let n=e.stickyModelSelectionByProvider[t.instanceId],r=t.options===void 0?kS(t.instanceId,t.model,n?.options):t,i={...e.stickyModelSelectionByProvider,[t.instanceId]:r};return Gi(e.stickyModelSelectionByProvider,i)?e.stickyActiveProvider===t.instanceId?e:{stickyActiveProvider:t.instanceId}:{stickyModelSelectionByProvider:i,stickyActiveProvider:t.instanceId}})},applyStickyState:e=>{let r=$(t(),e)??``;r.length!==0&&n(e=>{let t=e.stickyModelSelectionByProvider,n=e.stickyActiveProvider,i=e.draftsByThreadKey[r]??uV(),a=JB(t);if(Gi(i.modelSelectionByProvider,a)&&i.activeProvider===n&&i.modelSelectionExplicit===void 0)return e;let{modelSelectionExplicit:o,...s}=i,c={...s,modelSelectionByProvider:a,activeProvider:n},l={...e.draftsByThreadKey};return _V(c)?delete l[r]:l[r]=c,{draftsByThreadKey:l}})},setPrompt:(e,r)=>{let i=$(t(),e)??``;i.length!==0&&n(e=>{let t={...e.draftsByThreadKey[i]??uV(),prompt:r},n={...e.draftsByThreadKey};return _V(t)?delete n[i]:n[i]=t,{draftsByThreadKey:n}})},setTerminalContexts:(e,r)=>{let i=$(t(),e),a=VV(t(),e);if(!i||!a)return;let o=gV(a,r);n(e=>{let t=e.draftsByThreadKey[i]??uV(),n={...t,prompt:Ub(t.terminalContexts.filter(e=>!o.some(t=>t.id===e.id)).reduce((e,t)=>Hb(e,WR(t).contextId).prompt,t.prompt),o.map(WR)),terminalContexts:o},r={...e.draftsByThreadKey};return _V(n)?delete r[i]:r[i]=n,{draftsByThreadKey:r}})},setModelSelection:(e,r,i)=>{let a=$(t(),e)??``;if(a.length===0)return;let o=CV(r);n(e=>{let t=e.draftsByThreadKey[a];if(!t&&o===null)return e;let n=t??uV(),r={...n.modelSelectionByProvider};if(o){let e=r[o.instanceId];o.options!==void 0||i?.replaceOptions?r[o.instanceId]=o:r[o.instanceId]=kS(o.instanceId,o.model,e?.options)}let s=o?.instanceId??n.activeProvider;if(Gi(n.modelSelectionByProvider,r)&&n.activeProvider===s&&(n.modelSelectionExplicit??!1)===(i?.explicit===!0))return e;let{modelSelectionExplicit:c,...l}=n,u={...l,modelSelectionByProvider:r,activeProvider:s,...i?.explicit===!0?{modelSelectionExplicit:!0}:{}},d={...e.draftsByThreadKey};return _V(u)?delete d[a]:d[a]=u,{draftsByThreadKey:d}})},setModelOptions:(e,r)=>{let i=$(t(),e)??``;i.length!==0&&n(e=>{let t=e.draftsByThreadKey[i];if(!t&&(!r||Object.keys(r).length===0))return e;let n=t??uV(),a={...n.modelSelectionByProvider};for(let e of[`codex`,`claudeAgent`,`cursor`,`opencode`]){if(!r||!(e in r))continue;let t=r[e],n=qo.make(e),i=ac(n),o=a[i];if(t&&t.length>0)a[i]=kS(i,o?.model??Li[n]??`gpt-6-astra`,t);else if(o?.options){let{options:e,...t}=o;a[i]=t}}if(Gi(n.modelSelectionByProvider,a))return e;let o={...n,modelSelectionByProvider:a},s={...e.draftsByThreadKey};return _V(o)?delete s[i]:s[i]=o,{draftsByThreadKey:s}})},setProviderModelOptions:(e,r,i,a)=>{let o=$(t(),e)??``;if(o.length===0)return;let s=vV(r);if(s===null)return;let c=a?.instanceId??ac(s),l=SS(a?.model)??Li[s]??`gpt-6-astra`,u=i&&i.length>0?i:void 0;n(e=>{let t=e.draftsByThreadKey[o]??uV(),n={...t.modelSelectionByProvider},r=n[c];if(u)n[c]=kS(c,r?.model??l,u);else if(r&&(r.options?.length??0)>0){let{options:e,...t}=r;n[c]=t}let i=e.stickyModelSelectionByProvider,s=e.stickyOptionsByModelByProvider,d=e.stickyActiveProvider;if(a?.persistSticky===!0){i={...e.stickyModelSelectionByProvider};let n=i[c]??t.modelSelectionByProvider[c]??kS(c,l),r=SS(a?.model)??n.model;if(u)i[c]=kS(c,n.model,u),s={...e.stickyOptionsByModelByProvider,[c]:{...e.stickyOptionsByModelByProvider[c],[r]:u}};else if((n.options?.length??0)>0){let{options:t,...a}=n;i[c]=a;let o={...e.stickyOptionsByModelByProvider[c]};delete o[r],s={...e.stickyOptionsByModelByProvider,[c]:o}}d=a.instanceId?c:t.activeProvider??c}if(Gi(t.modelSelectionByProvider,n)&&Gi(e.stickyModelSelectionByProvider,i)&&Gi(e.stickyOptionsByModelByProvider,s)&&e.stickyActiveProvider===d)return e;let{modelSelectionExplicit:f,...p}=t,m={...p,...a?.instanceId?{activeProvider:c}:{},modelSelectionByProvider:n,modelSelectionExplicit:!0},h={...e.draftsByThreadKey};return _V(m)?delete h[o]:h[o]=m,{draftsByThreadKey:h,...a?.persistSticky===!0?{stickyModelSelectionByProvider:i,stickyOptionsByModelByProvider:s,stickyActiveProvider:d}:{}}})},setRuntimeMode:(e,r)=>{let i=$(t(),e)??``;if(i.length===0)return;let a=yB(r)?r:null;n(e=>{let t=e.draftsByThreadKey[i];if(!t&&a===null)return e;let n=t??uV();if(n.runtimeMode===a)return e;let r={...n,runtimeMode:a},o={...e.draftsByThreadKey};return _V(r)?delete o[i]:o[i]=r,{draftsByThreadKey:o}})},setInteractionMode:(e,r)=>{let i=$(t(),e)??``;if(i.length===0)return;let a=r===`plan`||r==="default"?r:null;n(e=>{let t=e.draftsByThreadKey[i];if(!t&&a===null)return e;let n=t??uV();if(n.interactionMode===a)return e;let r={...n,interactionMode:a},o={...e.draftsByThreadKey};return _V(r)?delete o[i]:o[i]=r,{draftsByThreadKey:o}})},addImage:(e,n)=>{let r=$(t(),e),i=VV(t(),e);return!r||!i?!1:t().addImages(typeof e==`string`?kB.make(r):e,[n]).includes(n.id)},addImages:(e,r,i)=>{let a=$(t(),e)??``;if(a.length===0||r.length===0)return[];let o=[];return n(e=>{let t=e.draftsByThreadKey[a]??uV(),n=new Set(t.images.map(e=>e.id)),s=new Set(t.images.map(e=>dV(e))),c=new Set(t.images.map(e=>e.previewUrl)),l=[];for(let e of r){let r=dV(e);n.has(e.id)||!i?.allowDuplicates&&s.has(r)||t.images.length+t.files.length+l.length>=100?c.has(e.previewUrl)||AV(e.previewUrl):(l.push(e),n.add(e.id),s.add(r),c.add(e.previewUrl))}return l.length===0?e:(o=l.map(e=>e.id),{draftsByThreadKey:{...e.draftsByThreadKey,[a]:{...t,images:[...t.images,...l]}}})}),o},removeImage:(e,r)=>{let i=$(t(),e)??``;if(i.length===0)return;let a=t().draftsByThreadKey[i];if(!a)return;let o=a.images.find(e=>e.id===r);o&&AV(o.previewUrl),n(e=>{let t=e.draftsByThreadKey[i];if(!t)return e;let n={...t,prompt:Hb(t.prompt,wb(`image`,r)).prompt,images:t.images.filter(e=>e.id!==r),nonPersistedImageIds:t.nonPersistedImageIds.filter(e=>e!==r),persistedAttachments:t.persistedAttachments.filter(e=>e.id!==r)},a={...e.draftsByThreadKey};return _V(n)?delete a[i]:a[i]=n,{draftsByThreadKey:a}})},addFiles:(e,r,i)=>{let a=$(t(),e)??``;if(a.length===0||r.length===0)return[];let o=[];return n(e=>{let t=e.draftsByThreadKey[a]??uV(),n=new Set(t.files.map(e=>e.id)),s=new Map(t.files.map(e=>[fV(e),e])),c=[],l=new Map;for(let e of r){let r=fV(e);if(n.has(e.id))continue;let a=i?.allowDuplicates?void 0:s.get(r)??t.files.find(t=>NB(t)&&!l.has(t.id)&&pV(t,e));if(a)NB(a)&&!l.has(a.id)&&(l.set(a.id,e),n.add(e.id),s.set(r,e));else{if(t.images.length+t.files.length+c.length>=100)break;c.push(e),n.add(e.id),s.set(r,e)}}if(c.length===0&&l.size===0)return e;o=c.map(e=>e.id);let u=t.files.map(e=>l.get(e.id)??e),d=l.size===0?t.prompt:Mb(t.prompt,e=>{let n=t.files.find(t=>rz(t).contextId===e.contextId),r=n?l.get(n.id):void 0;return r?Fb(rz(r)):e.source});return{draftsByThreadKey:{...e.draftsByThreadKey,[a]:{...t,prompt:i?.appendReference?Ub(d,[...c,...l.values()].map(rz)):d,files:[...u,...c]}}}}),o},removeFile:(e,r)=>{let i=$(t(),e)??``;i.length!==0&&n(e=>{let t=e.draftsByThreadKey[i];if(!t?.files.some(e=>e.id===r))return e;let n={...t,prompt:Hb(t.prompt,wb(`file`,r)).prompt,files:t.files.filter(e=>e.id!==r)},a={...e.draftsByThreadKey};return _V(n)?delete a[i]:a[i]=n,{draftsByThreadKey:a}})},setFileUpload:(e,r,i,a)=>{let o=$(t(),e)??``;o.length!==0&&n(e=>{let t=e.draftsByThreadKey[o],n=t?.files.find(e=>e.id===r);return!t||!n||n.uploadEnvironmentId===i&&n.uploadedAttachmentId===a?e:{draftsByThreadKey:{...e.draftsByThreadKey,[o]:{...t,files:t.files.map(e=>e.id===r?{...e,uploadedAttachmentId:a,uploadEnvironmentId:i}:e)}}}})},markFileUploadMissing:(e,r,i,a)=>{let o=$(t(),e)??``;if(o.length===0)return!1;let s=!1;return n(e=>{let t=e.draftsByThreadKey[o],n=t?.files.find(e=>e.id===r);return!t||!n||n.file!==null||n.uploadEnvironmentId!==i||n.uploadedAttachmentId!==a?e:(s=!0,{draftsByThreadKey:{...e.draftsByThreadKey,[o]:{...t,files:t.files.map(e=>{if(e.id!==r)return e;let t={...e};return delete t.uploadedAttachmentId,delete t.uploadEnvironmentId,t})}}})}),s},insertTerminalContext:(e,r,i,a)=>{let o=$(t(),e),s=VV(t(),e);if(!o||!s)return!1;let c=!1;return n(e=>{let t=e.draftsByThreadKey[o]??uV(),n=hV(s,i);if(!n)return e;let l=mV(n);if(t.terminalContexts.some(e=>e.id===n.id)||t.terminalContexts.some(e=>mV(e)===l))return e;c=!0;let u=Math.max(0,Math.min(t.terminalContexts.length,a)),d={...t,prompt:r,terminalContexts:[...t.terminalContexts.slice(0,u),n,...t.terminalContexts.slice(u)]};return{draftsByThreadKey:{...e.draftsByThreadKey,[o]:d}}}),c},addTerminalContext:(e,n)=>{let r=$(t(),e),i=VV(t(),e);r&&i&&t().addTerminalContexts(typeof e==`string`?kB.make(r):e,[n])},addTerminalContexts:(e,r,i)=>{let a=$(t(),e),o=VV(t(),e);if(!a||!o||r.length===0)return;let s=t().draftsByThreadKey[a]?.terminalContexts??[],c=gV(o,[...s,...r]).slice(s.length);if(c.length===0)return;let l=i?.appendReference!==!1&&i?.insertAtCaret!==!1&&(UB.get(a)?.(c.map(WR))??!1);n(e=>{let t=e.draftsByThreadKey[a]??uV(),n=gV(o,[...t.terminalContexts,...r]).slice(t.terminalContexts.length);return n.length===0?e:{draftsByThreadKey:{...e.draftsByThreadKey,[a]:{...t,prompt:l||i?.appendReference===!1?t.prompt:Ub(t.prompt,[...t.terminalContexts,...n].map(WR)),terminalContexts:[...t.terminalContexts,...n]}}}})},removeTerminalContext:(e,r)=>{let i=$(t(),e)??``;i.length!==0&&r.length!==0&&n(e=>{let t=e.draftsByThreadKey[i];if(!t)return e;let n={...t,prompt:Hb(t.prompt,wb(`terminal`,r)).prompt,terminalContexts:t.terminalContexts.filter(e=>e.id!==r)},a={...e.draftsByThreadKey};return _V(n)?delete a[i]:a[i]=n,{draftsByThreadKey:a}})},clearTerminalContexts:e=>{let r=$(t(),e)??``;r.length!==0&&n(e=>{let t=e.draftsByThreadKey[r];if(!t||t.terminalContexts.length===0)return e;let n={...t,prompt:t.terminalContexts.reduce((e,t)=>Hb(e,WR(t).contextId).prompt,t.prompt),terminalContexts:[]},i={...e.draftsByThreadKey};return _V(n)?delete i[r]:i[r]=n,{draftsByThreadKey:i}})},addPreviewAnnotation:(e,r,i)=>{let a=$(t(),e);if(!a)return;let o={...r,screenshot:r.screenshot?{...r.screenshot,dataUrl:``}:null},s=JR(o),c=t().draftsByThreadKey[a]?.previewAnnotations.some(e=>e.id===r.id)??!1,l=!c&&i?.appendReference!==!1&&i?.insertAtCaret!==!1&&(UB.get(a)?.([s])??!1);n(e=>{let t=e.draftsByThreadKey[a]??uV(),n=t.previewAnnotations.filter(e=>e.id!==r.id);return{draftsByThreadKey:{...e.draftsByThreadKey,[a]:{...t,prompt:c||l||i?.appendReference===!1?t.prompt:Vb(t.prompt,s),previewAnnotations:[...n,o]}}}})},setPreviewAnnotations:(e,r)=>{let i=$(t(),e);i&&n(e=>{let t=e.draftsByThreadKey[i]??uV(),n=new Set(r.map(e=>e.id)),a=t.prompt;for(let e of t.previewAnnotations)n.has(e.id)||(a=Hb(a,KR(e.id)).prompt);a=Ub(a,r.map(JR));let o={...t,prompt:a,previewAnnotations:[...r]},s={...e.draftsByThreadKey};return _V(o)?delete s[i]:s[i]=o,{draftsByThreadKey:s}})},removePreviewAnnotation:(e,r)=>{let i=$(t(),e);i&&r&&n(e=>{let t=e.draftsByThreadKey[i];if(!t)return e;let n=t.previewAnnotations.filter(e=>e.id!==r);if(n.length===t.previewAnnotations.length)return e;let a={...t,prompt:Hb(t.prompt,KR(r)).prompt,previewAnnotations:n,images:t.images.filter(e=>e.id!==r),persistedAttachments:t.persistedAttachments.filter(e=>e.id!==r),nonPersistedImageIds:t.nonPersistedImageIds.filter(e=>e!==r)},o={...e.draftsByThreadKey};return _V(a)?delete o[i]:o[i]=a,{draftsByThreadKey:o}})},addReviewComment:(e,r,i)=>{let a=$(t(),e);if(!a||!xB(r))return;let o=qR(r),s=t().draftsByThreadKey[a]?.reviewComments.some(e=>e.id===r.id)??!1,c=i?.appendReference!==!1&&(!s||i?.allowDuplicateReference===!0),l=c&&i?.insertAtCaret!==!1&&(UB.get(a)?.([o])??!1);n(e=>{let t=e.draftsByThreadKey[a]??uV(),n=t.reviewComments.filter(e=>e.id!==r.id);return{draftsByThreadKey:{...e.draftsByThreadKey,[a]:{...t,prompt:!c||l?t.prompt:Vb(t.prompt,o),reviewComments:[...n,{...r}]}}}})},setContextInsertionHandler:(e,n)=>{let r=$(t(),e);if(r)return n?UB.set(r,n):UB.delete(r),()=>{UB.get(r)===n&&UB.delete(r)}},setReviewComments:(e,r)=>{let i=$(t(),e);if(!i)return;let a=r.filter(xB).map(e=>({...e}));n(e=>{let t=e.draftsByThreadKey[i]??uV(),n=new Set(a.map(e=>e.id)),r=t.prompt;for(let e of t.reviewComments)n.has(e.id)||(r=Hb(r,GR(e.id)).prompt);r=Ub(r,a.map(qR));let o={...t,prompt:r,reviewComments:a},s={...e.draftsByThreadKey};return _V(o)?delete s[i]:s[i]=o,{draftsByThreadKey:s}})},addThreadContexts:(e,r,i)=>{let a=$(t(),e);if(!a)return;let o=new Set((t().draftsByThreadKey[a]?.threadContexts??[]).map(e=>e.contextId)),s=r.filter(e=>!o.has(e.contextId)&&(o.add(e.contextId),!0));if(s.length===0)return;let c=s.map(YR),l=i?.appendReference!==!1&&i?.insertAtCaret!==!1&&(UB.get(a)?.(c)??!1);n(e=>{let t=e.draftsByThreadKey[a]??uV(),n=new Set(t.threadContexts.map(e=>e.contextId)),r=s.filter(e=>!n.has(e.contextId));return r.length===0?e:{draftsByThreadKey:{...e.draftsByThreadKey,[a]:{...t,prompt:l||i?.appendReference===!1?t.prompt:Ub(t.prompt,r.map(YR)),threadContexts:[...t.threadContexts,...r]}}}})},setThreadContexts:(e,r)=>{let i=$(t(),e);if(!i)return;let a=r.filter(SB).map(e=>({...e}));n(e=>{let t=e.draftsByThreadKey[i]??uV(),n=new Set(a.map(e=>e.contextId)),r=t.prompt;for(let e of t.threadContexts)n.has(e.contextId)||(r=Hb(r,e.contextId).prompt);r=Ub(r,a.map(YR));let o={...t,prompt:r,threadContexts:a},s={...e.draftsByThreadKey};return _V(o)?delete s[i]:s[i]=o,{draftsByThreadKey:s}})},addEnvironmentContexts:(e,r,i)=>{let a=$(t(),e);if(!a)return;let o=new Set((t().draftsByThreadKey[a]?.environmentContexts??[]).map(e=>e.contextId)),s=r.filter(e=>!o.has(e.contextId)&&(o.add(e.contextId),!0));if(s.length===0)return;let c=s.map(XR),l=i?.appendReference!==!1&&i?.insertAtCaret!==!1&&(UB.get(a)?.(c)??!1);n(e=>{let t=e.draftsByThreadKey[a]??uV(),n=new Set(t.environmentContexts.map(e=>e.contextId)),r=s.filter(e=>!n.has(e.contextId));return r.length===0?e:{draftsByThreadKey:{...e.draftsByThreadKey,[a]:{...t,prompt:l||i?.appendReference===!1?t.prompt:Ub(t.prompt,r.map(XR)),environmentContexts:[...t.environmentContexts,...r]}}}})},setEnvironmentContexts:(e,r)=>{let i=$(t(),e);if(!i)return;let a=r.filter(CB).map(e=>({...e}));n(e=>{let t=e.draftsByThreadKey[i]??uV(),n=new Set(a.map(e=>e.contextId)),r=t.prompt;for(let e of t.environmentContexts)n.has(e.contextId)||(r=Hb(r,e.contextId).prompt);r=Ub(r,a.map(XR));let o={...t,prompt:r,environmentContexts:a},s={...e.draftsByThreadKey};return _V(o)?delete s[i]:s[i]=o,{draftsByThreadKey:s}})},removeReviewComment:(e,r)=>{let i=$(t(),e);i&&r&&n(e=>{let t=e.draftsByThreadKey[i];if(!t)return e;let n=t.reviewComments.filter(e=>e.id!==r);if(n.length===t.reviewComments.length)return e;let a={...t,prompt:Hb(t.prompt,GR(r)).prompt,reviewComments:n},o={...e.draftsByThreadKey};return _V(a)?delete o[i]:o[i]=a,{draftsByThreadKey:o}})},clearPersistedAttachments:e=>{let r=$(t(),e)??``;r.length!==0&&n(e=>{let t=e.draftsByThreadKey[r];if(!t)return e;let n={...t,persistedAttachments:[],nonPersistedImageIds:[]},i={...e.draftsByThreadKey};return _V(n)?delete i[r]:i[r]=n,{draftsByThreadKey:i}})},syncPersistedAttachments:async(e,r)=>{let i=$(t(),e);if(!i)return;let a=new Set(r.map(e=>e.id));n(e=>{let t=e.draftsByThreadKey[i];if(!t)return e;let n={...t,persistedAttachments:r,nonPersistedImageIds:t.nonPersistedImageIds.filter(e=>!a.has(e))},o={...e.draftsByThreadKey};return _V(n)?delete o[i]:o[i]=n,{draftsByThreadKey:o}}),await Promise.resolve(),sH(i,r,n)},clearComposerContent:e=>{let r=$(t(),e)??``;r.length!==0&&n(e=>{let t=e.draftsByThreadKey[r];if(!t)return e;let n={...t,prompt:``,images:[],files:[],nonPersistedImageIds:[],persistedAttachments:[],terminalContexts:[],previewAnnotations:[],reviewComments:[],threadContexts:[],environmentContexts:[]},i={...e.draftsByThreadKey};return _V(n)?delete i[r]:i[r]=n,{draftsByThreadKey:i}})},clearComposerPromptAndImages:e=>{let r=$(t(),e)??``;r.length!==0&&n(e=>{let t=e.draftsByThreadKey[r];if(!t)return e;for(let e of t.images)AV(e.previewUrl);let n={...t,prompt:Ub(``,[...t.terminalContexts.map(WR),...t.reviewComments.map(qR),...t.threadContexts.map(YR),...t.environmentContexts.map(XR),...t.previewAnnotations.map(JR)]),images:[],files:[],nonPersistedImageIds:[],persistedAttachments:[]},i={...e.draftsByThreadKey};return _V(n)?delete i[r]:i[r]=n,{draftsByThreadKey:i}})},moveComposerPromptAndImages:(e,r)=>{let i=$(t(),e)??``,a=$(t(),r)??``;i.length!==0&&a.length!==0&&i!==a&&n(e=>{let t=e.draftsByThreadKey[i];if(!t)return e;let n=e.draftsByThreadKey[a]??uV(),o=typeof r==`string`?e.draftThreadsByThreadKey[a]?.environmentId??$x(a)?.environmentId??null:r.environmentId,s=new Set(n.files.map(e=>e.id)),c=new Set(n.files.map(fV)),l=t.files.filter(e=>(e.file!==null||e.uploadEnvironmentId===o)&&!s.has(e.id)&&!c.has(fV(e))),u=Math.max(0,100-n.images.length-n.files.length),d=t.images.slice(0,u),f=new Set(d.map(e=>e.id)),p=t.images.filter(e=>!f.has(e.id)),m=l.slice(0,u-d.length).map(e=>{if(e.file===null||e.uploadEnvironmentId===void 0||e.uploadEnvironmentId===o)return e;let{uploadedAttachmentId:t,uploadEnvironmentId:n,...r}=e;return r}),h=new Set(m.map(e=>e.id)),g=t.files.filter(e=>!h.has(e.id)),_=Ub(Lb(t.prompt),n.terminalContexts.map(WR)),v={...n,prompt:_,images:[...n.images,...d],files:[...n.files,...m],nonPersistedImageIds:[...n.nonPersistedImageIds,...t.nonPersistedImageIds.filter(e=>f.has(e))],persistedAttachments:[...n.persistedAttachments,...t.persistedAttachments.filter(e=>f.has(e.id))]},y={...t,prompt:Ub(``,t.terminalContexts.map(WR)),images:p,files:g,nonPersistedImageIds:t.nonPersistedImageIds.filter(e=>!f.has(e)),persistedAttachments:t.persistedAttachments.filter(e=>!f.has(e.id))},b={...e.draftsByThreadKey};return _V(y)?delete b[i]:b[i]=y,_V(v)?delete b[a]:b[a]=v,{draftsByThreadKey:b}})}}},{name:EB,version:DB,storage:jB,migrate:rH,partialize:e=>({capturedState:e}),merge:(e,t)=>{let n=aH(e),r=Object.fromEntries(Object.entries(n.draftsByThreadKey).map(([e,t])=>[e,uH(t)])),i=Object.fromEntries(Object.entries(n.draftThreadsByThreadKey).map(([e,t])=>[e,dH(t)]));return{...t,draftsByThreadKey:r,draftThreadsByThreadKey:i,logicalProjectDraftThreadKeyByLogicalProjectKey:n.logicalProjectDraftThreadKeyByLogicalProjectKey,stickyModelSelectionByProvider:n.stickyModelSelectionByProvider??{},stickyOptionsByModelByProvider:n.stickyOptionsByModelByProvider??{},stickyActiveProvider:n.stickyActiveProvider??null}}}));function pH(e){let t=Xx(e);fH.setState(e=>({backgroundSubmissionThreadKeys:{...e.backgroundSubmissionThreadKeys,[t]:!0}}))}function mH(e){let t=Xx(e);fH.setState(e=>{if(!e.backgroundSubmissionThreadKeys[t])return e;let n={...e.backgroundSubmissionThreadKeys};return delete n[t],{backgroundSubmissionThreadKeys:n}})}function hH(e){let t=(0,B.c)(4),n;t[0]===e?n=t[1]:(n=e?Xx(e):null,t[0]=e,t[1]=n);let r=n,i;return t[2]===r?i=t[3]:(i=e=>r!==null&&e.backgroundSubmissionThreadKeys[r]===!0,t[2]=r,t[3]=i),fH(i)}function gH(e){fH.setState(t=>{let n=new Set;for(let[r,i]of Object.entries(t.draftThreadsByThreadKey))i.environmentId===e&&n.add(r);for(let r of Object.keys(t.draftsByThreadKey))$x(r)?.environmentId===e&&n.add(r);for(let[r,i]of Object.entries(t.logicalProjectDraftThreadKeyByLogicalProjectKey))Qx(r)?.environmentId===e&&n.add(i);let r=Object.fromEntries(Object.entries(t.logicalProjectDraftThreadKeyByLogicalProjectKey).filter(([t,r])=>Qx(t)?.environmentId!==e&&!n.has(r))),i=Object.fromEntries(Object.entries(t.draftThreadsByThreadKey).filter(([t,r])=>r.environmentId!==e&&!n.has(t)));return{draftsByThreadKey:Object.fromEntries(Object.entries(t.draftsByThreadKey).filter(([e,t])=>!n.has(e)||(jV(t),!1))),draftThreadsByThreadKey:i,logicalProjectDraftThreadKeyByLogicalProjectKey:r,backgroundSubmissionThreadKeys:Object.fromEntries(Object.entries(t.backgroundSubmissionThreadKeys).filter(([t])=>$x(t)?.environmentId!==e)),rewindingThreadKeys:new Set([...t.rewindingThreadKeys].filter(t=>$x(t)?.environmentId!==e))}}),AB.flush()}function _H(e){let t=(0,B.c)(2),n;return t[0]===e?n=t[1]:(n=t=>HV(t,e)??lV,t[0]=e,t[1]=n),fH(n)}function vH(e){let t=(0,B.c)(2),n;return t[0]===e?n=t[1]:(n=t=>{let n=HV(t,e);return n?{activeProvider:n.activeProvider,modelSelectionByProvider:n.modelSelectionByProvider}:cV},t[0]=e,t[1]=n),fH(kz(n))}function yH(e){let t=(0,B.c)(12),n;t[0]!==e.draftId||t[1]!==e.threadRef?(n=e.threadRef??e.draftId??kB.make(``),t[0]=e.draftId,t[1]=e.threadRef,t[2]=n):n=t[2];let r=vH(n),i;return t[3]!==r||t[4]!==e.projectModelSelection||t[5]!==e.providers||t[6]!==e.requestedInstanceId||t[7]!==e.selectedInstanceId||t[8]!==e.selectedProvider||t[9]!==e.settings||t[10]!==e.threadModelSelection?(i=OV({draft:r,providers:e.providers,selectedProvider:e.selectedProvider,selectedInstanceId:e.selectedInstanceId,requestedInstanceId:e.requestedInstanceId,threadModelSelection:e.threadModelSelection,projectModelSelection:e.projectModelSelection,settings:e.settings}),t[3]=r,t[4]=e.projectModelSelection,t[5]=e.providers,t[6]=e.requestedInstanceId,t[7]=e.selectedInstanceId,t[8]=e.selectedProvider,t[9]=e.settings,t[10]=e.threadModelSelection,t[11]=i):i=t[11],i}function bH(e){let t=fH.getState();for(let[n,r]of Object.entries(t.draftThreadsByThreadKey))r.environmentId===e.environmentId&&r.threadId===e.threadId&&t.markDraftThreadPromoting(kB.make(n),e)}function xH(e,t,n){fH.setState(r=>({draftThreadsByThreadKey:{...r.draftThreadsByThreadKey,[e]:{...t,threadId:n,promotedTo:null}}}))}function SH(e){let t=fH.getState();for(let[n,r]of Object.entries(t.draftThreadsByThreadKey)){let i=r.promotedTo;if(i?i.environmentId===e.environmentId&&i.threadId===e.threadId:r.environmentId===e.environmentId&&r.threadId===e.threadId){let r=kB.make(n);t.markDraftThreadPromoting(r,e),t.finalizePromotedDraftThread(r)}}mH(e)}var CH=bl({extend:{theme:{text:[`2xs`,`3xs`,`4xs`,`5xs`]}}});function wH(...e){return CH(ml(e))}function TH(e){return/^win(dows)?/i.test(e)}function EH(e){return e.normalize(`NFKD`).replace(/\p{M}/gu,``).toLowerCase().replace(/\s+/g,` `).trim()}function DH(e){return eb(e)?`Finder`:TH(e)?`File Explorer`:`Files`}function OH(){let e=globalThis.crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Er(e);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}var kH=()=>Za.make(OH()),AH=()=>_c.make(OH()),jH=()=>kB.make(OH()),MH=()=>mi.make(OH());export{mz as $,vE as $a,dh as $c,uv as $d,uy as $f,gk as $i,dg as $l,uF as $n,hw as $o,MN as $r,Ix as $s,rL as $t,f_ as $u,_B as A,ID as Aa,ob as Ac,H_ as Ad,Vv as Af,mM as Ai,Hh as Al,XF as An,lT as Ao,ru as Ap,bP as Ar,rS as As,XL as At,Ug as Au,kz as B,lD as Ba,rb as Bc,Z_ as Bd,Zv as Bf,jA as Bi,qh as Bl,RF as Bn,oT as Bo,_d as Bp,WN as Br,wS as Bs,xL as Bt,Qg as Bu,bH as C,$D as Ca,bb as Cc,F_ as Cd,Nv as Cf,PM as Ci,Ih as Cl,iI as Cn,GT as Co,Dl as Cp,VP as Cr,$S as Cs,tR as Ct,jg as Cu,fH as D,VD as Da,Ab as Dc,z_ as Dd,Rv as Df,xM as Di,zh as Dl,qF as Dn,DT as Do,Jl as Dp,NP as Dr,zS as Ds,qL as Dt,zg as Du,hH as E,UD as Ea,jb as Ec,R_ as Ed,Lv as Ef,SM as Ei,Rh as El,QF as En,CT as Eo,Kl as Ep,PP as Er,BS as Es,KL as Et,Rg as Eu,pB as F,wD as Fa,ib as Fc,K_ as Fd,Kv as Ff,qA as Fi,Jh as Fl,BF as Fn,sT as Fo,yu as Fp,rP as Fr,mS as Fs,FL as Ft,qg as Fu,sz as G,HE as Ga,Dy as Gc,nv as Gd,ny as Gf,fA as Gi,ng as Gl,NF as Gn,Ww as Go,Wd as Gp,CN as Gr,Qx as Gs,uL as Gt,r_ as Gu,xz as H,$E as Ha,wy as Hc,$_ as Hd,$v as Hf,wA as Hi,eg as Hl,FF as Hn,_T as Ho,Ed as Hp,zN as Hr,AS as Hs,iL as Ht,e_ as Hu,dB as I,TD as Ia,mb as Ic,q_ as Id,qv as If,UA as Ii,Yh as Il,UF as In,dT as Io,Pu as Ip,tP as Ir,fS as Is,PL as It,Jg as Iu,ZR as J,kE as Ja,Py as Jc,ov as Jd,ay as Jf,vA as Ji,og as Jl,OF as Jn,Bw as Jo,jN as Jr,qx as Js,hL as Jt,o_ as Ju,oz as K,EE as Ka,Ty as Kc,rv as Kd,ry as Kf,_A as Ki,ag as Kl,EF as Kn,Hw as Ko,Gd as Kp,wN as Kr,$x as Ks,aL as Kt,i_ as Ku,$z as L,pD as La,tb as Lc,J_ as Ld,Jv as Lf,HA as Li,Xh as Ll,WF as Ln,vT as Lo,Ru as Lp,QN as Lr,tS as Ls,LL as Lt,Xg as Lu,vB as M,ND as Ma,$y as Mc,U_ as Md,Uv as Mf,iM as Mi,Wh as Ml,YF as Mn,hT as Mo,au as Mp,_P as Mr,bS as Ms,WL as Mt,Wg as Mu,aB as N,AD as Na,eb as Nc,W_ as Nd,Wv as Nf,Q as Ni,Gh as Nl,GF as Nn,bT as No,gu as Np,cP as Nr,sS as Ns,BL as Nt,Gg as Nu,_H as O,zD as Oa,Tb as Oc,B_ as Od,zv as Of,_M as Oi,Bh as Ol,KF as On,pT as Oo,Yl as Op,MP as Or,US as Os,YL as Ot,Bg as Ou,sB as P,kD as Pa,ab as Pc,G_ as Pd,Gv as Pf,Pj as Pi,Kh as Pl,VF as Pn,yT as Po,vu as Pp,sP as Pr,hS as Ps,ML as Pt,Kg as Pu,zR as Q,aE as Qa,uh as Qc,lv as Qd,ly as Qf,yk as Qi,ug as Ql,pF as Qn,kw as Qo,NN as Qr,Nx as Qs,tL as Qt,u_ as Qu,tB as R,dD as Ra,cb as Rc,Y_ as Rd,Yv as Rf,MA as Ri,Zh as Rl,HF as Rn,gT as Ro,Gu as Rp,qN as Rr,SS as Rs,IL as Rt,Yg as Ru,lH as S,nO as Sa,kb as Sc,P_ as Sd,Pv as Sf,NM as Si,Fh as Sl,aI as Sn,KT as So,El as Sp,HP as Sr,dC as Ss,AR as St,Pg as Su,xH as T,KD as Ta,Mb as Tc,L_ as Td,Iv as Tf,AM as Ti,Lh as Tl,$F as Tn,LT as To,Gl as Tp,IP as Tr,RS as Ts,eR as Tt,Lg as Tu,Cz as U,q as Ua,Ry as Uc,ev as Ud,ey as Uf,CA as Ui,tg as Ul,IF as Un,Kw as Uo,Nd as Up,SN as Ur,ES as Us,cL as Ut,t_ as Uu,Oz as V,nD as Va,nb as Vc,Q_ as Vd,Qv as Vf,kA as Vi,$h as Vl,PF as Vn,aT as Vo,Td as Vp,VN as Vr,nS as Vs,SL as Vt,$g as Vu,bz as W,K as Wa,By as Wc,tv as Wd,ty as Wf,hA as Wi,rg as Wl,jF as Wn,Gw as Wo,Pd as Wp,AN as Wr,TS as Ws,sL as Wt,n_ as Wu,rz as X,rE as Xa,Ly as Xc,sv as Xd,sy as Xf,hk as Xi,sg as Xl,wF as Xn,Ow as Xo,EN as Xr,Xx as Xs,lL as Xt,c_ as Xu,XR as Y,xE as Ya,Iy as Yc,av as Yd,oy as Yf,_k as Yi,cg as Yl,DF as Yn,Fw as Yo,TN as Yr,Yx as Ys,pL as Yt,s_ as Yu,nz as Z,nE as Za,Ey as Zc,cv as Zd,cy as Zf,vk as Zi,lg as Zl,sF as Zn,mw as Zo,DN as Zr,Gx as Zs,nL as Zt,l_ as Zu,fV as _,gO as _a,Hb as _c,O_ as _d,Ov as _f,FM as _i,kh as _l,sI as _n,ZT as _o,th as _p,$P as _r,nC as _s,YR as _t,kg as _u,MH as a,BO as aa,Vx as ac,__ as ad,gv as af,bN as ai,_h as al,WI as an,oE as ao,hy as ap,hF as ar,zC as as,VR as at,_g as au,LV as b,rO as ba,Db as bc,M_ as bd,jv as bf,jM as bi,Mh as bl,uI as bn,zT as bo,ih as bp,KP as br,ZS as bs,NR as bt,Ng as bu,EH as c,FO as ca,$b as cc,b_ as cd,yv as cf,lN as ci,xh as cl,TI as cn,uE as co,lh as cp,yF as cr,gw as cs,GR as ct,xg as cu,FB as d,AO as da,Yb as dc,w_ as dd,Sv as df,$M as di,Ch as dl,xI as dn,pE as do,oh as dp,xF as dr,qC as ds,qR as dt,Cg as du,mk as ea,Fx as ec,d_ as ed,dv as ef,ON as ei,fh as el,KI as en,fE as eo,dy as ep,_F as er,YC as es,KR as et,fg as eu,MB as f,X as fa,Ib as fc,C_ as fd,Cv as ff,JM as fi,wh as fl,CI as fn,XT as fo,Xm as fp,cF as fr,hC as fs,fz as ft,wg as fu,WB as g,Y as ga,Bb as gc,k_ as gd,Ev as gf,WM as gi,Oh as gl,pI as gn,QT as go,eh as gp,eF as gr,tC as gs,WR as gt,Og as gu,gH as h,hO as ha,zb as hc,D_ as hd,Dv as hf,RM as hi,Dh as hl,fI as hn,$T as ho,$m as hp,rF as hr,gC as hs,QR as ht,Dg as hu,jH as i,uk as ia,Bx as ic,g_ as id,hv as if,yN as ii,gh as il,qI as in,cE as io,gy as ip,mF as ir,iw as is,pz as it,gg as iu,oB as j,J as ja,pb as jc,vy as jd,Hv as jf,oM as ji,Uh as jl,JF as jn,mT as jo,iu as jp,yP as jr,kS as js,UL as jt,Hg as ju,yH as k,BD as ka,wb as kc,V_ as kd,Bv as kf,pM as ki,Vh as kl,ZF as kn,cT as ko,Zl as kp,OP as kr,jS as ks,JL as kt,Vg as ku,OH as l,Z as la,ex as lc,x_ as ld,bv as lf,nN as li,Sh as ll,bI as ln,tE as lo,ch as lp,bF as lr,_w as ls,RR as lt,Sg as lu,mH as m,CO as ma,Fb as mc,E_ as md,wv as mf,LM as mi,Eh as ml,gI as mn,hE as mo,Ym as mp,tF as mr,vC as ms,dz as mt,Eg as mu,DH as n,fk as na,Lx as nc,h_ as nd,pv as nf,FN as ni,mh as nl,XI as nn,yE as no,py as np,fF as nr,bw as ns,tz as nt,mg as nu,kH as o,IO as oa,nx as oc,v_ as od,_v as of,vN as oi,vh as ol,EI as on,sE as oo,_y as op,gF as or,Sw as os,HR as ot,vg as ou,pH as p,EO as pa,Ub as pc,T_ as pd,Tv as pf,GM as pi,Th as pl,wI as pn,eE as po,Zm as pp,oF as pr,_C as ps,lz as pt,Tg as pu,cz as q,G as qa,Ny as qc,iv as qd,iy as qf,gA as qi,ig as ql,TF as qn,Uw as qo,xN as qr,Kx as qs,oL as qt,a_ as qu,TH as r,bk as ra,zx as rc,p_ as rd,mv as rf,IN as ri,hh as rl,QI as rn,iE as ro,my as rp,lF as rr,KC as rs,JR as rt,hg as ru,AH as s,PO as sa,ax as sc,y_ as sd,vv as sf,uN as si,yh as sl,BI as sn,lE as so,W as sp,vF as sr,vw as ss,uz as st,yg as su,wH as t,pk as ta,Ux as tc,m_ as td,fv as tf,kN as ti,ph as tl,YI as tn,dE as to,fy as tp,dF as tr,Dw as ts,UR as tt,pg as tu,kB as u,jO as ua,Xb as uc,S_ as ud,xv as uf,eN as ui,bh as ul,hI as un,mE as uo,ah as up,SF as ur,xw as us,$R as ut,bg as uu,pV as v,sO as va,Lb as vc,A_ as vd,kv as vf,EM as vi,Ah as vl,lI as vn,bE as vo,nh as vp,QP as vr,qS as vs,iz as vt,Ag as vu,$ as w,qD as wa,Nb as wc,I_ as wd,Fv as wf,DM as wi,Nh as wl,rI as wn,PT as wo,Ol as wp,BP as wr,sC as ws,rR as wt,Ig as wu,SH as x,tO as xa,Eb as xc,N_ as xd,Mv as xf,MM as xi,Ph as xl,dI as xn,qT as xo,Cp as xp,WP as xr,QS as xs,jR as xt,Fg as xu,NB as y,aO as ya,Ob as yc,j_ as yd,Av as yf,kM as yi,jh as yl,cI as yn,RT as yo,rh as yp,YP as yr,cC as ys,MR as yt,Mg as yu,Qz as z,uD as za,ub as zc,X_ as zd,Xv as zf,NA as zi,Qh as zl,zF as zn,uT as zo,Ju as zp,GN as zr,xS as zs,gL as zt,Zg as zu};
24
+ //# sourceMappingURL=utils-DkKLB01I.js.map