@openchambery/web 1.19.4 → 1.19.5-beta.10

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 (172) hide show
  1. package/dist/assets/{AgentAvatar-CVTgW_rx.js → AgentAvatar-BceI_qBC.js} +1 -1
  2. package/dist/assets/{AssistantView-D73E__f8.js → AssistantView-lSnZ7082.js} +1 -1
  3. package/dist/assets/{ChatContainer-pWolXKsP.js → ChatContainer-DJLqUdGE.js} +39 -39
  4. package/dist/assets/ContextPanel-CfO8NpOL.js +285 -0
  5. package/dist/assets/{DiagramView-BJBf7KGE.js → DiagramView-_LIlKVbO.js} +1 -1
  6. package/dist/assets/{FadeInOnReveal-Cy3sf2M5.js → FadeInOnReveal-Cj9ZC3Ab.js} +1 -1
  7. package/dist/assets/{Icon-BLWVqBee.js → Icon-Du1LX11Q.js} +1 -1
  8. package/dist/assets/MarkdownRendererImpl-DpapNgFo.js +7 -0
  9. package/dist/assets/{MobileDetailNavigation-CUq86QUr.js → MobileDetailNavigation-Ct_3mr5K.js} +1 -1
  10. package/dist/assets/{MobileShareBridge-BMolTtSL.js → MobileShareBridge-7LjBYxHH.js} +2 -2
  11. package/dist/assets/MobileSurface-CuEJc-ya.js +2 -0
  12. package/dist/assets/{MultiRunWindow-Bv3moZF8.js → MultiRunWindow-BEM2Ucj4.js} +1 -1
  13. package/dist/assets/{OnboardingScreen-CTNi2zuA.js → OnboardingScreen-Czusf7rR.js} +1 -1
  14. package/dist/assets/{OverlayScrollbar-GQgJusKL.js → OverlayScrollbar-oOLMqq2s.js} +1 -1
  15. package/dist/assets/SettingsView-DUeyhTBn.js +25 -0
  16. package/dist/assets/{SettingsWindow-BMtwRXID.js → SettingsWindow-Qa8HXF_v.js} +1 -1
  17. package/dist/assets/{TerminalView-DwzG7zBO.js → TerminalView-CBSreprw.js} +1 -1
  18. package/dist/assets/{ToolOutputDialog-iYAB6WiK.js → ToolOutputDialog-CRIU0XUQ.js} +1 -1
  19. package/dist/assets/{angular-html-BXZQHcPZ.js → angular-html-CtgxlIZT.js} +1 -1
  20. package/dist/assets/{angular-ts-D8x7dmpg.js → angular-ts-DrvebXRV.js} +1 -1
  21. package/dist/assets/{apl-ugbjmfzm.js → apl-ct3-l_ov.js} +1 -1
  22. package/dist/assets/appThemeRegistry-CvvscooO.js +2 -0
  23. package/dist/assets/{astro-BrfzL78y.js → astro-9KCX_vNx.js} +1 -1
  24. package/dist/assets/{blade-D4cYRUdW.js → blade-DHzjLhcB.js} +1 -1
  25. package/dist/assets/{button-CeCkEpvn.js → button-p6vbd3r6.js} +1 -1
  26. package/dist/assets/{c-CMzMVpWc.js → c-CEfQ88z4.js} +1 -1
  27. package/dist/assets/{clipboard-BXC1vZwE.js → clipboard-Ca2PSbr_.js} +1 -1
  28. package/dist/assets/{cobol-DthQPUuS.js → cobol-ffQsCDPB.js} +1 -1
  29. package/dist/assets/{coffee-8Pqo9WtM.js → coffee-DtRj345i.js} +1 -1
  30. package/dist/assets/{collapsible-B-aagADh.js → collapsible-Cimoz0kx.js} +1 -1
  31. package/dist/assets/{cpp-D18L7odM.js → cpp-NWnna9VM.js} +1 -1
  32. package/dist/assets/{crystal-9GeLf5Ic.js → crystal-CnnqEH_e.js} +1 -1
  33. package/dist/assets/{css-CCmJvSl6.js → css-BRwHOW3t.js} +1 -1
  34. package/dist/assets/{desktopHosts-BrrYPqKq.js → desktopHosts-DceeVBky.js} +1 -1
  35. package/dist/assets/{desktopRelayRestore-DR60DATT.js → desktopRelayRestore-B0MRdR5y.js} +1 -1
  36. package/dist/assets/{diagram-Cxma_IKI.js → diagram-DX_MPRs3.js} +1 -1
  37. package/dist/assets/{dialog-wraJHZQ2.js → dialog-B2ieeCSR.js} +1 -1
  38. package/dist/assets/{edge-BNU68miL.js → edge-BmL4YNvW.js} +1 -1
  39. package/dist/assets/{elixir-Clm-oycI.js → elixir-m9Mcv-AW.js} +1 -1
  40. package/dist/assets/{elm-DyuJMdF4.js → elm-Dazsuz2c.js} +1 -1
  41. package/dist/assets/{erb-BGQIoPeF.js → erb-CJ1X7LGG.js} +1 -1
  42. package/dist/assets/{es-DQqFAaWT.js → es-Bj9HwM-0.js} +3 -3
  43. package/dist/assets/{fileQueries-BJKLdYos.js → fileQueries-BDld6h3B.js} +1 -1
  44. package/dist/assets/{fr-CNfGRpc1.js → fr-BgEHZGug.js} +3 -3
  45. package/dist/assets/{git-rebase-ZHVbPCu8.js → git-rebase-DHqm8iFM.js} +1 -1
  46. package/dist/assets/{gitApi-C6XQwHcm.js → gitApi-BVB4hH6A.js} +3 -3
  47. package/dist/assets/{glimmer-js-Dx29eTyZ.js → glimmer-js-529w2Uvl.js} +1 -1
  48. package/dist/assets/{glimmer-ts-7AFohuRx.js → glimmer-ts-B38MdnnB.js} +1 -1
  49. package/dist/assets/{glsl-Nbih-1pG.js → glsl-IFfKD25X.js} +1 -1
  50. package/dist/assets/{graphql-IOG_4fSc.js → graphql-m-L9qWWB.js} +1 -1
  51. package/dist/assets/{hack-DyZU34CD.js → hack-S2S7pq0v.js} +1 -1
  52. package/dist/assets/{haml-mwEldSxy.js → haml-BE8HBwbH.js} +1 -1
  53. package/dist/assets/{handlebars-BRbCg-TR.js → handlebars-DPMWj4Da.js} +1 -1
  54. package/dist/assets/{html-derivative-DpusPW9p.js → html-derivative-D0yehinc.js} +1 -1
  55. package/dist/assets/{html-DH50wxss.js → html-gfIVmLgx.js} +1 -1
  56. package/dist/assets/{http-fM2Ft62a.js → http-Yj1uQSnx.js} +1 -1
  57. package/dist/assets/{hurl-C7ZRA11y.js → hurl-CiAC6gLf.js} +1 -1
  58. package/dist/assets/{input-CyG05w-V.js → input-gaFVNq1P.js} +1 -1
  59. package/dist/assets/insertionBoundaries-Cpj9r_o6.js +4 -0
  60. package/dist/assets/{ja-CQqehnVn.js → ja-clyxf6re.js} +3 -3
  61. package/dist/assets/{java-CuLv1JzP.js → java-lPyr66Qw.js} +1 -1
  62. package/dist/assets/{javascript-e9R9mij1.js → javascript-BlmKDQ-I.js} +1 -1
  63. package/dist/assets/{jinja-BqL4dpCe.js → jinja-DrvjNn4y.js} +1 -1
  64. package/dist/assets/{jison-BU1E246U.js → jison-BZ-k3PlS.js} +1 -1
  65. package/dist/assets/{json-CWUAz4dE.js → json-CaQi8cq5.js} +1 -1
  66. package/dist/assets/{jsx-Tb9QFw4P.js → jsx-kfzB3oTi.js} +1 -1
  67. package/dist/assets/{julia-C6q7nYBJ.js → julia-Bup0jpIM.js} +1 -1
  68. package/dist/assets/{just-CLHVCPQG.js → just-XMsX5iKL.js} +1 -1
  69. package/dist/assets/{ko-kmwi8UJD.js → ko-BZb3gnuq.js} +3 -3
  70. package/dist/assets/{latex-DzR96v9w.js → latex-CHhOHp9u.js} +1 -1
  71. package/dist/assets/{liquid-UjsTutWK.js → liquid-C90FVKxw.js} +1 -1
  72. package/dist/assets/{lua-laWCoC7H.js → lua-BXPwTBAD.js} +1 -1
  73. package/dist/assets/main-BsdsPsHT.js +29 -0
  74. package/dist/assets/{main-OM6EVqFo.js → main-CQLsl_QE.js} +2 -2
  75. package/dist/assets/markdown-shiki.worker-woF2hOAN.js +349 -0
  76. package/dist/assets/{markdown-worker-DqO-GnVj.js → markdown-worker-CoO82KYF.js} +4 -4
  77. package/dist/assets/{markdownTheme-H7_7lbuh.js → markdownTheme-St8zxDvJ.js} +1 -1
  78. package/dist/assets/{marko-Cw81uHQK.js → marko-oFkW-Ef7.js} +1 -1
  79. package/dist/assets/{mdc-5VRIrvpo.js → mdc-Dt17Fv3G.js} +1 -1
  80. package/dist/assets/{miniChat-CWJejsNH.js → miniChat-w-S3l9bR.js} +2 -2
  81. package/dist/assets/mobile-CHDToW-w.js +2 -0
  82. package/dist/assets/multirun-CMEZHI5g.js +4 -0
  83. package/dist/assets/{nginx-OjbRtDTh.js → nginx-LfNI-F2k.js} +1 -1
  84. package/dist/assets/{nim-BqzUQFfL.js → nim-so0j2_Ky.js} +1 -1
  85. package/dist/assets/{perl-Bba2cEgf.js → perl-DQcGQU9O.js} +1 -1
  86. package/dist/assets/{persistence-DE9RnVcA.js → persistence-CLUawIlm.js} +1 -1
  87. package/dist/assets/{php-CkVgF6HF.js → php-Dae1IcCM.js} +1 -1
  88. package/dist/assets/{pl-Blv5o2QA.js → pl-CwZzSvrm.js} +3 -3
  89. package/dist/assets/{platform-MjT8iqKB.js → platform-BrncW9ab.js} +1 -1
  90. package/dist/assets/{projectMeta-DCJQ6I3m.js → projectMeta-ZD-iXSOT.js} +2 -2
  91. package/dist/assets/{pt-BR-BK74t-Bd.js → pt-BR-6ali2BQX.js} +3 -3
  92. package/dist/assets/{pug-Dj44SzNY.js → pug-CaHd5xEa.js} +1 -1
  93. package/dist/assets/{qml-DETHcUPx.js → qml-lLqImktD.js} +1 -1
  94. package/dist/assets/{r-CrbPkwLJ.js → r-C2VuzPsf.js} +1 -1
  95. package/dist/assets/{radio-MAnQ7sDW.js → radio-B-nm8u03.js} +1 -1
  96. package/dist/assets/{razor-56IyEPA5.js → razor-DTpzsAil.js} +1 -1
  97. package/dist/assets/{regexp-BEMDgR1N.js → regexp-DJeMtopQ.js} +1 -1
  98. package/dist/assets/renderElectronMiniChatApp-65t0A6BD.js +2 -0
  99. package/dist/assets/renderMobileApp-a3Joz-yn.js +25 -0
  100. package/dist/assets/{rst-C8BEzC8U.js → rst-c6kvN9mK.js} +1 -1
  101. package/dist/assets/{ruby-DWyeL44t.js → ruby-B68kNTjT.js} +1 -1
  102. package/dist/assets/{runtimeConfig-C2Vygqku.js → runtimeConfig-BGuiq1aJ.js} +1 -1
  103. package/dist/assets/runtimeEndpointReset-HC9CW_hT.js +4 -0
  104. package/dist/assets/{sas-Dt-MhHv8.js → sas-Br3BRi6f.js} +1 -1
  105. package/dist/assets/{scss-jmTM-KWO.js → scss-ugvUHawi.js} +1 -1
  106. package/dist/assets/{shellscript-BgI_n_Bv.js → shellscript-Ci5rJl0t.js} +1 -1
  107. package/dist/assets/{shellsession-DhmUadx_.js → shellsession-Dxn1WKgk.js} +1 -1
  108. package/dist/assets/{shikiHighlight-Bpy8sf5r.js → shikiHighlight-DFiqYozo.js} +1 -1
  109. package/dist/assets/{sortable-tabs-strip-BdbKDDAP.js → sortable-tabs-strip-CxLE1X9x.js} +1 -1
  110. package/dist/assets/{soy-qfQbh7dQ.js → soy-kgnQSRVZ.js} +1 -1
  111. package/dist/assets/{sql-CwyNz0Gh.js → sql-Cx3XaVwp.js} +1 -1
  112. package/dist/assets/src-D-LxNwlu.css +2 -0
  113. package/dist/assets/{stata-D9MlkA-a.js → stata-B5YhL3cp.js} +1 -1
  114. package/dist/assets/{store-UweBeN2y.js → store-BvrCRq6U.js} +3 -3
  115. package/dist/assets/{surrealql-xR93a923.js → surrealql-B8ysTfdK.js} +1 -1
  116. package/dist/assets/{svelte-BA7ahdky.js → svelte-D5-K3GME.js} +1 -1
  117. package/dist/assets/{templ-CxpzFYl8.js → templ-n2DDBrat.js} +1 -1
  118. package/dist/assets/{terminalApi-Bnx0KvaV.js → terminalApi-D2OzR0I3.js} +1 -1
  119. package/dist/assets/{tex-CePKgOWg.js → tex-CpNhXIXy.js} +1 -1
  120. package/dist/assets/{tooltip-B__x-HDJ.js → tooltip-D1a6rKLA.js} +1 -1
  121. package/dist/assets/{ts-tags-DP2fsj53.js → ts-tags-CrtENrUj.js} +1 -1
  122. package/dist/assets/{tsx-CI52QFY8.js → tsx-DEnzboO-.js} +1 -1
  123. package/dist/assets/{twig-BjoebDgo.js → twig-B7PeheP0.js} +1 -1
  124. package/dist/assets/{typescript-cpHrN9Ya.js → typescript-CUlPIybL.js} +1 -1
  125. package/dist/assets/{uk-6I-KXy3R.js → uk-qRqJs4GS.js} +3 -3
  126. package/dist/assets/{url-CTuw7Rjf.js → url-zwuNq3GS.js} +1 -1
  127. package/dist/assets/{useAppFontEffects-BVVxQm3q.js → useAppFontEffects-pF6rKdKM.js} +4 -4
  128. package/dist/assets/{useAssistantUIStore-D2K7ksGj.js → useAssistantUIStore-D699Sbdb.js} +1 -1
  129. package/dist/assets/{useDesktopWindowControlsLayout-BR2bI_26.js → useDesktopWindowControlsLayout-DH7Om-wY.js} +1 -1
  130. package/dist/assets/{useEffectiveDirectory-DdS6rQm9.js → useEffectiveDirectory-BvZFK9wU.js} +1 -1
  131. package/dist/assets/{useFontPreferences-CWZnNRjz.js → useFontPreferences-F2QPNE2V.js} +1 -1
  132. package/dist/assets/{useMobileNavigationStore-DFSb2gzX.js → useMobileNavigationStore-CGOeJb9D.js} +10 -10
  133. package/dist/assets/{useSessionAutoCleanup-BNC1lVkC.js → useSessionAutoCleanup-lBn8oZ8f.js} +1 -1
  134. package/dist/assets/{useUIStore-DOxLVeGb.js → useUIStore-BXjMQrel.js} +1 -1
  135. package/dist/assets/{useWorkerHighlightedLines-B9mnTmvs.js → useWorkerHighlightedLines-Bc1NJlYO.js} +2 -2
  136. package/dist/assets/{utils-C2R0YoC5.js → utils-D94hxQYq.js} +1 -1
  137. package/dist/assets/{vue-DK5KPkZ5.js → vue-C6ZZy2AI.js} +1 -1
  138. package/dist/assets/{vue-html-BlUa8woS.js → vue-html-DsvGlIY2.js} +1 -1
  139. package/dist/assets/{vue-vine-D3hlJyLi.js → vue-vine-C8VLalyn.js} +1 -1
  140. package/dist/assets/{xml-CspvrcYx.js → xml-ChNx2zKg.js} +1 -1
  141. package/dist/assets/{xsl-D10hdnv5.js → xsl-yWKkpZli.js} +1 -1
  142. package/dist/assets/{yaml-C00-kDDU.js → yaml-CENNGtdf.js} +1 -1
  143. package/dist/assets/{zh-CN-DwlzS4yK.js → zh-CN-CwZ0adcY.js} +3 -3
  144. package/dist/assets/{zh-TW-p0VriyfT.js → zh-TW-DC0jiCzA.js} +3 -3
  145. package/dist/index.html +9 -9
  146. package/dist/mini-chat.html +9 -9
  147. package/dist/mobile.html +9 -9
  148. package/package.json +1 -1
  149. package/server/index.js +40 -3
  150. package/server/lib/notifications/DOCUMENTATION.md +2 -2
  151. package/server/lib/notifications/push-runtime.js +4 -14
  152. package/server/lib/notifications/runtime.js +11 -20
  153. package/server/lib/notifications/runtime.test.js +4 -6
  154. package/server/lib/opencode/core-routes.js +56 -23
  155. package/server/lib/opencode/core-routes.test.js +206 -6
  156. package/server/lib/relay/DOCUMENTATION.md +2 -1
  157. package/server/lib/relay/service.js +223 -71
  158. package/server/lib/relay/service.test.js +96 -13
  159. package/dist/assets/ContextPanel-GBq5lSES.js +0 -285
  160. package/dist/assets/MarkdownRendererImpl-BUXY9iuu.js +0 -7
  161. package/dist/assets/MobileSurface-DDRPrlAq.js +0 -2
  162. package/dist/assets/SettingsView-Ip_jVXoD.js +0 -25
  163. package/dist/assets/appThemeRegistry-rHYlrhb5.js +0 -2
  164. package/dist/assets/insertionBoundaries-DG_1_ENK.js +0 -4
  165. package/dist/assets/main-MkZ3xcbE.js +0 -29
  166. package/dist/assets/markdown-shiki.worker-CKKjvdhc.js +0 -12
  167. package/dist/assets/mobile-D-ubuubW.js +0 -2
  168. package/dist/assets/multirun-YB7NFEGX.js +0 -4
  169. package/dist/assets/renderElectronMiniChatApp-BPZ5LfbX.js +0 -2
  170. package/dist/assets/renderMobileApp-pqjbEzlN.js +0 -23
  171. package/dist/assets/runtimeEndpointReset-CuW2UDPM.js +0 -4
  172. package/dist/assets/src-eGuNWxHc.css +0 -2
@@ -1 +1 @@
1
- import{t as e}from"./javascript-e9R9mij1.js";import{t}from"./css-CCmJvSl6.js";import{t as n}from"./html-DH50wxss.js";const r=Object.freeze(JSON.parse(`{"displayName":"Pug","name":"pug","patterns":[{"match":"^(!!!|doctype)(\\\\s*[-0-9A-Z_a-z]+)?","name":"meta.tag.sgml.doctype.html"},{"begin":"^(\\\\s*)//-","end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"comment.unbuffered.block.pug"},{"begin":"^(\\\\s*)//","end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"string.comment.buffered.block.pug","patterns":[{"captures":{"1":{"name":"invalid.illegal.comment.comment.block.pug"}},"match":"^\\\\s*(//)(?!-)","name":"string.comment.buffered.block.pug"}]},{"begin":"<!--","end":"--\\\\s*>","name":"comment.unbuffered.block.pug","patterns":[{"match":"--","name":"invalid.illegal.comment.comment.block.pug"}]},{"begin":"^(\\\\s*)-$","end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.js","patterns":[{"include":"source.js"}]},{"begin":"^(\\\\s*)(script)((\\\\.)$|(?=[^\\\\n]*((text|application)/javascript|module).*\\\\.$))","beginCaptures":{"2":{"name":"entity.name.tag.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"meta.tag.other","patterns":[{"begin":"\\\\G(?=\\\\()","end":"$","patterns":[{"include":"#tag_attributes"}]},{"begin":"\\\\G(?=[#.])","end":"$","patterns":[{"include":"#complete_tag"}]},{"include":"source.js"}]},{"begin":"^(\\\\s*)(style)((\\\\.)$|(?=[#(.].*\\\\.$))","beginCaptures":{"2":{"name":"entity.name.tag.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"meta.tag.other","patterns":[{"begin":"\\\\G(?=\\\\()","end":"$","patterns":[{"include":"#tag_attributes"}]},{"begin":"\\\\G(?=[#.])","end":"$","patterns":[{"include":"#complete_tag"}]},{"include":"source.css"}]},{"begin":"^(\\\\s*):(sass)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.sass.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.sass.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.sass"}]},{"begin":"^(\\\\s*):(scss)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.scss.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.css.scss.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.css.scss"}]},{"begin":"^(\\\\s*):(less)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.less.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.less.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.less"}]},{"begin":"^(\\\\s*):(stylus)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.stylus.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","patterns":[{"include":"#tag_attributes"},{"include":"source.stylus"}]},{"begin":"^(\\\\s*):(coffee(-?script)?)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.coffeescript.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.coffeescript.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.coffee"}]},{"begin":"^(\\\\s*):(uglify-js)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.js.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.js.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.js"}]},{"begin":"^(\\\\s*)((:(?=.))|(:)$)","beginCaptures":{"4":{"name":"invalid.illegal.empty.generic.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","patterns":[{"begin":"\\\\G(?<=:)(?=.)","end":"$","name":"name.generic.filter.pug","patterns":[{"match":"\\\\G\\\\(","name":"invalid.illegal.name.generic.filter.pug"},{"match":"[-\\\\w]","name":"constant.language.name.generic.filter.pug"},{"include":"#tag_attributes"},{"match":"\\\\W","name":"invalid.illegal.name.generic.filter.pug"}]}]},{"begin":"^(\\\\s*)(?:(?=\\\\.$)|(?=[#.\\\\w].*?\\\\.$)(?=(?:(?:#[-\\\\w]+|\\\\.[-\\\\w]+)|(?:[!#]\\\\{[^}]*}|\\\\w(?:[-:\\\\w]+[-\\\\w]|[-\\\\w]*)))(?:#[-\\\\w]+|\\\\.[-\\\\w]+|(?:\\\\((?:[^\\"'()]*(?:'(?:[^']|(?<!\\\\\\\\)\\\\\\\\')*'|\\"(?:[^\\"]|(?<!\\\\\\\\)\\\\\\\\\\")*\\"))*[^()]*\\\\))*)*(?:(?::\\\\s+|(?<=\\\\)))(?:(?:#[-\\\\w]+|\\\\.[-\\\\w]+)|(?:[!#]\\\\{[^}]*}|\\\\w(?:[-:\\\\w]+[-\\\\w]|[-\\\\w]*)))(?:#[-\\\\w]+|\\\\.[-\\\\w]+|(?:\\\\((?:[^\\"'()]*(?:'(?:[^']|(?<!\\\\\\\\)\\\\\\\\')*'|\\"(?:[^\\"]|(?<!\\\\\\\\)\\\\\\\\\\")*\\"))*[^()]*\\\\))*)*)*\\\\.$)(?:(?:(#[-\\\\w]+)|(\\\\.[-\\\\w]+))|([!#]\\\\{[^}]*}|\\\\w(?:[-:\\\\w]+[-\\\\w]|[-\\\\w]*))))","beginCaptures":{"2":{"name":"meta.selector.css entity.other.attribute-name.id.css.pug"},"3":{"name":"meta.selector.css entity.other.attribute-name.class.css.pug"},"4":{"name":"meta.tag.other entity.name.tag.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","patterns":[{"match":"\\\\.$","name":"storage.type.function.pug.dot-block-dot"},{"include":"#tag_attributes"},{"include":"#complete_tag"},{"begin":"^(?=.)","end":"$","name":"text.block.pug","patterns":[{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]}]},{"begin":"^\\\\s*","end":"$","patterns":[{"include":"#inline_pug"},{"include":"#blocks_and_includes"},{"include":"#unbuffered_code"},{"include":"#mixin_definition"},{"include":"#mixin_call"},{"include":"#flow_control"},{"include":"#flow_control_each"},{"include":"#case_conds"},{"begin":"\\\\|","end":"$","name":"text.block.pipe.pug","patterns":[{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#printed_expression"},{"begin":"\\\\G(?=(#[^-{\\\\w])|[^#.\\\\w])","end":"$","patterns":[{"begin":"</?(?=[!#])","end":">|$","patterns":[{"include":"#inline_pug"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#complete_tag"}]}],"repository":{"babel_parens":{"begin":"\\\\(","end":"\\\\)|((\\\\{\\\\s*)?)$","patterns":[{"include":"#babel_parens"},{"include":"source.js"}]},"blocks_and_includes":{"captures":{"1":{"name":"storage.type.import.include.pug"},"4":{"name":"variable.control.import.include.pug"}},"match":"(extends|include|yield|append|prepend|block( ((?:ap|pre)pend))?)\\\\s+(.*)$","name":"meta.first-class.pug"},"case_conds":{"begin":"(default|when)((\\\\s+|(?=:))|$)","captures":{"1":{"name":"storage.type.function.pug"}},"end":"$","name":"meta.control.flow.pug","patterns":[{"begin":"\\\\G(?!:)","end":"(?=:\\\\s+)|$","name":"js.embedded.control.flow.pug","patterns":[{"include":"#case_when_paren"},{"include":"source.js"}]},{"begin":":\\\\s+","end":"$","name":"tag.case.control.flow.pug","patterns":[{"include":"#complete_tag"}]}]},"case_when_paren":{"begin":"\\\\(","end":"\\\\)","name":"js.when.control.flow.pug","patterns":[{"include":"#case_when_paren"},{"match":":","name":"invalid.illegal.name.tag.pug"},{"include":"source.js"}]},"complete_tag":{"begin":"(?=[#.\\\\w])|(:\\\\s*)","end":"(\\\\.?)$|(?=:.)","endCaptures":{"1":{"name":"storage.type.function.pug.dot-block-dot"}},"patterns":[{"include":"#blocks_and_includes"},{"include":"#unbuffered_code"},{"include":"#mixin_call"},{"include":"#flow_control"},{"include":"#flow_control_each"},{"match":"(?<=:)\\\\w.*$","name":"invalid.illegal.name.tag.pug"},{"include":"#tag_name"},{"include":"#tag_id"},{"include":"#tag_classes"},{"include":"#tag_attributes"},{"include":"#tag_mixin_attributes"},{"captures":{"2":{"name":"invalid.illegal.end.tag.pug"},"4":{"name":"invalid.illegal.end.tag.pug"}},"match":"(?:((\\\\.)\\\\s+)|((:)\\\\s*))$"},{"include":"#printed_expression"},{"include":"#tag_text"}]},"embedded_html":{"begin":"(?=<[^>]*>)","end":"$|(?=>)","name":"html","patterns":[{"include":"text.html.basic"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"flow_control":{"begin":"(for|if|else if|else|until|while|unless|case)(\\\\s+|$)","captures":{"1":{"name":"storage.type.function.pug"}},"end":"$","name":"meta.control.flow.pug","patterns":[{"begin":"","end":"$","name":"js.embedded.control.flow.pug","patterns":[{"include":"source.js"}]}]},"flow_control_each":{"begin":"(each)(\\\\s+|$)","captures":{"1":{"name":"storage.type.function.pug"}},"end":"$","name":"meta.control.flow.pug.each","patterns":[{"match":"([$_\\\\w]+)(?:\\\\s*,\\\\s*([$_\\\\w]+))?","name":"variable.other.pug.each-var"},{"begin":"","end":"$","name":"js.embedded.control.flow.pug","patterns":[{"include":"source.js"}]}]},"html_entity":{"patterns":[{"match":"(&)([0-9A-Za-z]+|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.html.text.pug"},{"match":"[\\\\&<>]","name":"invalid.illegal.html_entity.text.pug"}]},"inline_pug":{"begin":"(?<!\\\\\\\\)(#\\\\[)","captures":{"1":{"name":"entity.name.function.pug"},"2":{"name":"entity.name.function.pug"}},"end":"(])","name":"inline.pug","patterns":[{"include":"#inline_pug"},{"include":"#mixin_call"},{"begin":"(?<!])(?=[#.\\\\w])|(:\\\\s*)","end":"(?=]|(:.)|[=\\\\s])","name":"tag.inline.pug","patterns":[{"include":"#tag_name"},{"include":"#tag_id"},{"include":"#tag_classes"},{"include":"#tag_attributes"},{"include":"#tag_mixin_attributes"},{"include":"#inline_pug"},{"match":"\\\\[","name":"invalid.illegal.tag.pug"}]},{"include":"#unbuffered_code"},{"include":"#printed_expression"},{"match":"\\\\[","name":"invalid.illegal.tag.pug"},{"include":"#inline_pug_text"}]},"inline_pug_text":{"begin":"","end":"(?=])","patterns":[{"begin":"\\\\[","end":"]","patterns":[{"include":"#inline_pug_text"}]},{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"interpolated_error":{"match":"(?<!\\\\\\\\)[!#]\\\\{(?=[^}]*$)","name":"invalid.illegal.tag.pug"},"interpolated_value":{"begin":"(?<!\\\\\\\\)[!#]\\\\{(?=.*?})","end":"}","name":"string.interpolated.pug","patterns":[{"match":"\\\\{","name":"invalid.illegal.tag.pug"},{"include":"source.js"}]},"js_braces":{"begin":"\\\\{","end":"}","patterns":[{"include":"#js_braces"},{"include":"source.js"}]},"js_brackets":{"begin":"\\\\[","end":"]","patterns":[{"include":"#js_brackets"},{"include":"source.js"}]},"js_parens":{"begin":"\\\\(","end":"\\\\)","patterns":[{"include":"#js_parens"},{"include":"source.js"}]},"mixin_call":{"begin":"(mixin\\\\s+|\\\\+)([-\\\\w]+)","beginCaptures":{"1":{"name":"storage.type.function.pug"},"2":{"name":"meta.tag.other entity.name.function.pug"}},"end":"(?!\\\\()|$","patterns":[{"begin":"(?<!\\\\))\\\\(","end":"\\\\)","name":"args.mixin.pug","patterns":[{"include":"#js_parens"},{"captures":{"1":{"name":"meta.tag.other entity.other.attribute-name.tag.pug"}},"match":"([^(),/=\\\\s]+)\\\\s*=\\\\s*"},{"include":"source.js"}]},{"include":"#tag_attributes"}]},"mixin_definition":{"captures":{"1":{"name":"storage.type.function.pug"},"2":{"name":"meta.tag.other entity.name.function.pug"},"3":{"name":"punctuation.definition.parameters.begin.js"},"4":{"name":"variable.parameter.function.js"},"5":{"name":"punctuation.definition.parameters.begin.js"}},"match":"(mixin\\\\s+)([-\\\\w]+)(?:(\\\\()\\\\s*([A-Z_a-z]\\\\w*\\\\s*(?:,\\\\s*[A-Z_a-z]\\\\w*\\\\s*)*)(\\\\)))?$"},"printed_expression":{"begin":"(!?=)\\\\s*","captures":{"1":{"name":"constant"}},"end":"(?=])|$","name":"source.js","patterns":[{"include":"#js_brackets"},{"include":"source.js"}]},"tag_attribute_name":{"captures":{"1":{"name":"entity.other.attribute-name.tag.pug"}},"match":"([^!(),/=\\\\s]+)\\\\s*"},"tag_attribute_name_paren":{"begin":"\\\\(\\\\s*","end":"\\\\)","name":"entity.other.attribute-name.tag.pug","patterns":[{"include":"#tag_attribute_name_paren"},{"include":"#tag_attribute_name"}]},"tag_attributes":{"begin":"(\\\\(\\\\s*)","captures":{"1":{"name":"constant.name.attribute.tag.pug"}},"end":"(\\\\))","name":"meta.tag.other","patterns":[{"include":"#tag_attribute_name_paren"},{"include":"#tag_attribute_name"},{"match":"!(?!=)","name":"invalid.illegal.tag.pug"},{"begin":"=\\\\s*","end":"$|(?=,|\\\\s+[^-!%\\\\&*+/<>?|~]|\\\\))","name":"attribute_value","patterns":[{"include":"#js_parens"},{"include":"#js_brackets"},{"include":"#js_braces"},{"include":"source.js"}]},{"begin":"(?<=[-%\\\\&*+/:<>?|~])\\\\s+","end":"$|(?=,|\\\\s+[^-!%\\\\&*+/<>?|~]|\\\\))","name":"attribute_value2","patterns":[{"include":"#js_parens"},{"include":"#js_brackets"},{"include":"#js_braces"},{"include":"source.js"}]}]},"tag_classes":{"captures":{"1":{"name":"invalid.illegal.tag.pug"}},"match":"\\\\.([^-\\\\w])?[-\\\\w]*","name":"meta.selector.css entity.other.attribute-name.class.css.pug"},"tag_id":{"match":"#[-\\\\w]+","name":"meta.selector.css entity.other.attribute-name.id.css.pug"},"tag_mixin_attributes":{"begin":"(&attributes\\\\()","captures":{"1":{"name":"entity.name.function.pug"}},"end":"(\\\\))","name":"meta.tag.other","patterns":[{"match":"attributes(?=\\\\))","name":"storage.type.keyword.pug"},{"include":"source.js"}]},"tag_name":{"begin":"([!#]\\\\{(?=.*?}))|(\\\\w(([-:\\\\w]+[-\\\\w])|([-\\\\w]*)))","end":"\\\\G((?<!\\\\5[^-\\\\w]))|}|$","name":"meta.tag.other entity.name.tag.pug","patterns":[{"begin":"\\\\G(?<=\\\\{)","end":"(?=})","name":"meta.tag.other entity.name.tag.pug","patterns":[{"match":"\\\\{","name":"invalid.illegal.tag.pug"},{"include":"source.js"}]}]},"tag_text":{"begin":"(?=.)","end":"$","patterns":[{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"unbuffered_code":{"begin":"(-|(([0-9A-Z_a-z]+)\\\\s+=))","beginCaptures":{"3":{"name":"variable.parameter.javascript.embedded.pug"}},"end":"(?=])|((\\\\{\\\\s*)?)$","name":"source.js","patterns":[{"include":"#js_brackets"},{"include":"#babel_parens"},{"include":"source.js"}]}},"scopeName":"text.pug","embeddedLangs":["javascript","css","html"],"aliases":["jade"],"embeddedLangsLazy":["sass","scss","stylus","coffee"]}`));var i=[...e,...t,...n,r];export{i as default};
1
+ import{t as e}from"./javascript-BlmKDQ-I.js";import{t}from"./css-BRwHOW3t.js";import{t as n}from"./html-gfIVmLgx.js";const r=Object.freeze(JSON.parse(`{"displayName":"Pug","name":"pug","patterns":[{"match":"^(!!!|doctype)(\\\\s*[-0-9A-Z_a-z]+)?","name":"meta.tag.sgml.doctype.html"},{"begin":"^(\\\\s*)//-","end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"comment.unbuffered.block.pug"},{"begin":"^(\\\\s*)//","end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"string.comment.buffered.block.pug","patterns":[{"captures":{"1":{"name":"invalid.illegal.comment.comment.block.pug"}},"match":"^\\\\s*(//)(?!-)","name":"string.comment.buffered.block.pug"}]},{"begin":"<!--","end":"--\\\\s*>","name":"comment.unbuffered.block.pug","patterns":[{"match":"--","name":"invalid.illegal.comment.comment.block.pug"}]},{"begin":"^(\\\\s*)-$","end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.js","patterns":[{"include":"source.js"}]},{"begin":"^(\\\\s*)(script)((\\\\.)$|(?=[^\\\\n]*((text|application)/javascript|module).*\\\\.$))","beginCaptures":{"2":{"name":"entity.name.tag.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"meta.tag.other","patterns":[{"begin":"\\\\G(?=\\\\()","end":"$","patterns":[{"include":"#tag_attributes"}]},{"begin":"\\\\G(?=[#.])","end":"$","patterns":[{"include":"#complete_tag"}]},{"include":"source.js"}]},{"begin":"^(\\\\s*)(style)((\\\\.)$|(?=[#(.].*\\\\.$))","beginCaptures":{"2":{"name":"entity.name.tag.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"meta.tag.other","patterns":[{"begin":"\\\\G(?=\\\\()","end":"$","patterns":[{"include":"#tag_attributes"}]},{"begin":"\\\\G(?=[#.])","end":"$","patterns":[{"include":"#complete_tag"}]},{"include":"source.css"}]},{"begin":"^(\\\\s*):(sass)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.sass.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.sass.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.sass"}]},{"begin":"^(\\\\s*):(scss)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.scss.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.css.scss.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.css.scss"}]},{"begin":"^(\\\\s*):(less)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.less.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.less.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.less"}]},{"begin":"^(\\\\s*):(stylus)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.stylus.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","patterns":[{"include":"#tag_attributes"},{"include":"source.stylus"}]},{"begin":"^(\\\\s*):(coffee(-?script)?)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.coffeescript.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.coffeescript.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.coffee"}]},{"begin":"^(\\\\s*):(uglify-js)(?=\\\\(|$)","beginCaptures":{"2":{"name":"constant.language.name.js.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","name":"source.js.filter.pug","patterns":[{"include":"#tag_attributes"},{"include":"source.js"}]},{"begin":"^(\\\\s*)((:(?=.))|(:)$)","beginCaptures":{"4":{"name":"invalid.illegal.empty.generic.filter.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","patterns":[{"begin":"\\\\G(?<=:)(?=.)","end":"$","name":"name.generic.filter.pug","patterns":[{"match":"\\\\G\\\\(","name":"invalid.illegal.name.generic.filter.pug"},{"match":"[-\\\\w]","name":"constant.language.name.generic.filter.pug"},{"include":"#tag_attributes"},{"match":"\\\\W","name":"invalid.illegal.name.generic.filter.pug"}]}]},{"begin":"^(\\\\s*)(?:(?=\\\\.$)|(?=[#.\\\\w].*?\\\\.$)(?=(?:(?:#[-\\\\w]+|\\\\.[-\\\\w]+)|(?:[!#]\\\\{[^}]*}|\\\\w(?:[-:\\\\w]+[-\\\\w]|[-\\\\w]*)))(?:#[-\\\\w]+|\\\\.[-\\\\w]+|(?:\\\\((?:[^\\"'()]*(?:'(?:[^']|(?<!\\\\\\\\)\\\\\\\\')*'|\\"(?:[^\\"]|(?<!\\\\\\\\)\\\\\\\\\\")*\\"))*[^()]*\\\\))*)*(?:(?::\\\\s+|(?<=\\\\)))(?:(?:#[-\\\\w]+|\\\\.[-\\\\w]+)|(?:[!#]\\\\{[^}]*}|\\\\w(?:[-:\\\\w]+[-\\\\w]|[-\\\\w]*)))(?:#[-\\\\w]+|\\\\.[-\\\\w]+|(?:\\\\((?:[^\\"'()]*(?:'(?:[^']|(?<!\\\\\\\\)\\\\\\\\')*'|\\"(?:[^\\"]|(?<!\\\\\\\\)\\\\\\\\\\")*\\"))*[^()]*\\\\))*)*)*\\\\.$)(?:(?:(#[-\\\\w]+)|(\\\\.[-\\\\w]+))|([!#]\\\\{[^}]*}|\\\\w(?:[-:\\\\w]+[-\\\\w]|[-\\\\w]*))))","beginCaptures":{"2":{"name":"meta.selector.css entity.other.attribute-name.id.css.pug"},"3":{"name":"meta.selector.css entity.other.attribute-name.class.css.pug"},"4":{"name":"meta.tag.other entity.name.tag.pug"}},"end":"^(?!(\\\\1\\\\s)|\\\\s*$)","patterns":[{"match":"\\\\.$","name":"storage.type.function.pug.dot-block-dot"},{"include":"#tag_attributes"},{"include":"#complete_tag"},{"begin":"^(?=.)","end":"$","name":"text.block.pug","patterns":[{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]}]},{"begin":"^\\\\s*","end":"$","patterns":[{"include":"#inline_pug"},{"include":"#blocks_and_includes"},{"include":"#unbuffered_code"},{"include":"#mixin_definition"},{"include":"#mixin_call"},{"include":"#flow_control"},{"include":"#flow_control_each"},{"include":"#case_conds"},{"begin":"\\\\|","end":"$","name":"text.block.pipe.pug","patterns":[{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#printed_expression"},{"begin":"\\\\G(?=(#[^-{\\\\w])|[^#.\\\\w])","end":"$","patterns":[{"begin":"</?(?=[!#])","end":">|$","patterns":[{"include":"#inline_pug"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#complete_tag"}]}],"repository":{"babel_parens":{"begin":"\\\\(","end":"\\\\)|((\\\\{\\\\s*)?)$","patterns":[{"include":"#babel_parens"},{"include":"source.js"}]},"blocks_and_includes":{"captures":{"1":{"name":"storage.type.import.include.pug"},"4":{"name":"variable.control.import.include.pug"}},"match":"(extends|include|yield|append|prepend|block( ((?:ap|pre)pend))?)\\\\s+(.*)$","name":"meta.first-class.pug"},"case_conds":{"begin":"(default|when)((\\\\s+|(?=:))|$)","captures":{"1":{"name":"storage.type.function.pug"}},"end":"$","name":"meta.control.flow.pug","patterns":[{"begin":"\\\\G(?!:)","end":"(?=:\\\\s+)|$","name":"js.embedded.control.flow.pug","patterns":[{"include":"#case_when_paren"},{"include":"source.js"}]},{"begin":":\\\\s+","end":"$","name":"tag.case.control.flow.pug","patterns":[{"include":"#complete_tag"}]}]},"case_when_paren":{"begin":"\\\\(","end":"\\\\)","name":"js.when.control.flow.pug","patterns":[{"include":"#case_when_paren"},{"match":":","name":"invalid.illegal.name.tag.pug"},{"include":"source.js"}]},"complete_tag":{"begin":"(?=[#.\\\\w])|(:\\\\s*)","end":"(\\\\.?)$|(?=:.)","endCaptures":{"1":{"name":"storage.type.function.pug.dot-block-dot"}},"patterns":[{"include":"#blocks_and_includes"},{"include":"#unbuffered_code"},{"include":"#mixin_call"},{"include":"#flow_control"},{"include":"#flow_control_each"},{"match":"(?<=:)\\\\w.*$","name":"invalid.illegal.name.tag.pug"},{"include":"#tag_name"},{"include":"#tag_id"},{"include":"#tag_classes"},{"include":"#tag_attributes"},{"include":"#tag_mixin_attributes"},{"captures":{"2":{"name":"invalid.illegal.end.tag.pug"},"4":{"name":"invalid.illegal.end.tag.pug"}},"match":"(?:((\\\\.)\\\\s+)|((:)\\\\s*))$"},{"include":"#printed_expression"},{"include":"#tag_text"}]},"embedded_html":{"begin":"(?=<[^>]*>)","end":"$|(?=>)","name":"html","patterns":[{"include":"text.html.basic"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"flow_control":{"begin":"(for|if|else if|else|until|while|unless|case)(\\\\s+|$)","captures":{"1":{"name":"storage.type.function.pug"}},"end":"$","name":"meta.control.flow.pug","patterns":[{"begin":"","end":"$","name":"js.embedded.control.flow.pug","patterns":[{"include":"source.js"}]}]},"flow_control_each":{"begin":"(each)(\\\\s+|$)","captures":{"1":{"name":"storage.type.function.pug"}},"end":"$","name":"meta.control.flow.pug.each","patterns":[{"match":"([$_\\\\w]+)(?:\\\\s*,\\\\s*([$_\\\\w]+))?","name":"variable.other.pug.each-var"},{"begin":"","end":"$","name":"js.embedded.control.flow.pug","patterns":[{"include":"source.js"}]}]},"html_entity":{"patterns":[{"match":"(&)([0-9A-Za-z]+|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.html.text.pug"},{"match":"[\\\\&<>]","name":"invalid.illegal.html_entity.text.pug"}]},"inline_pug":{"begin":"(?<!\\\\\\\\)(#\\\\[)","captures":{"1":{"name":"entity.name.function.pug"},"2":{"name":"entity.name.function.pug"}},"end":"(])","name":"inline.pug","patterns":[{"include":"#inline_pug"},{"include":"#mixin_call"},{"begin":"(?<!])(?=[#.\\\\w])|(:\\\\s*)","end":"(?=]|(:.)|[=\\\\s])","name":"tag.inline.pug","patterns":[{"include":"#tag_name"},{"include":"#tag_id"},{"include":"#tag_classes"},{"include":"#tag_attributes"},{"include":"#tag_mixin_attributes"},{"include":"#inline_pug"},{"match":"\\\\[","name":"invalid.illegal.tag.pug"}]},{"include":"#unbuffered_code"},{"include":"#printed_expression"},{"match":"\\\\[","name":"invalid.illegal.tag.pug"},{"include":"#inline_pug_text"}]},"inline_pug_text":{"begin":"","end":"(?=])","patterns":[{"begin":"\\\\[","end":"]","patterns":[{"include":"#inline_pug_text"}]},{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"interpolated_error":{"match":"(?<!\\\\\\\\)[!#]\\\\{(?=[^}]*$)","name":"invalid.illegal.tag.pug"},"interpolated_value":{"begin":"(?<!\\\\\\\\)[!#]\\\\{(?=.*?})","end":"}","name":"string.interpolated.pug","patterns":[{"match":"\\\\{","name":"invalid.illegal.tag.pug"},{"include":"source.js"}]},"js_braces":{"begin":"\\\\{","end":"}","patterns":[{"include":"#js_braces"},{"include":"source.js"}]},"js_brackets":{"begin":"\\\\[","end":"]","patterns":[{"include":"#js_brackets"},{"include":"source.js"}]},"js_parens":{"begin":"\\\\(","end":"\\\\)","patterns":[{"include":"#js_parens"},{"include":"source.js"}]},"mixin_call":{"begin":"(mixin\\\\s+|\\\\+)([-\\\\w]+)","beginCaptures":{"1":{"name":"storage.type.function.pug"},"2":{"name":"meta.tag.other entity.name.function.pug"}},"end":"(?!\\\\()|$","patterns":[{"begin":"(?<!\\\\))\\\\(","end":"\\\\)","name":"args.mixin.pug","patterns":[{"include":"#js_parens"},{"captures":{"1":{"name":"meta.tag.other entity.other.attribute-name.tag.pug"}},"match":"([^(),/=\\\\s]+)\\\\s*=\\\\s*"},{"include":"source.js"}]},{"include":"#tag_attributes"}]},"mixin_definition":{"captures":{"1":{"name":"storage.type.function.pug"},"2":{"name":"meta.tag.other entity.name.function.pug"},"3":{"name":"punctuation.definition.parameters.begin.js"},"4":{"name":"variable.parameter.function.js"},"5":{"name":"punctuation.definition.parameters.begin.js"}},"match":"(mixin\\\\s+)([-\\\\w]+)(?:(\\\\()\\\\s*([A-Z_a-z]\\\\w*\\\\s*(?:,\\\\s*[A-Z_a-z]\\\\w*\\\\s*)*)(\\\\)))?$"},"printed_expression":{"begin":"(!?=)\\\\s*","captures":{"1":{"name":"constant"}},"end":"(?=])|$","name":"source.js","patterns":[{"include":"#js_brackets"},{"include":"source.js"}]},"tag_attribute_name":{"captures":{"1":{"name":"entity.other.attribute-name.tag.pug"}},"match":"([^!(),/=\\\\s]+)\\\\s*"},"tag_attribute_name_paren":{"begin":"\\\\(\\\\s*","end":"\\\\)","name":"entity.other.attribute-name.tag.pug","patterns":[{"include":"#tag_attribute_name_paren"},{"include":"#tag_attribute_name"}]},"tag_attributes":{"begin":"(\\\\(\\\\s*)","captures":{"1":{"name":"constant.name.attribute.tag.pug"}},"end":"(\\\\))","name":"meta.tag.other","patterns":[{"include":"#tag_attribute_name_paren"},{"include":"#tag_attribute_name"},{"match":"!(?!=)","name":"invalid.illegal.tag.pug"},{"begin":"=\\\\s*","end":"$|(?=,|\\\\s+[^-!%\\\\&*+/<>?|~]|\\\\))","name":"attribute_value","patterns":[{"include":"#js_parens"},{"include":"#js_brackets"},{"include":"#js_braces"},{"include":"source.js"}]},{"begin":"(?<=[-%\\\\&*+/:<>?|~])\\\\s+","end":"$|(?=,|\\\\s+[^-!%\\\\&*+/<>?|~]|\\\\))","name":"attribute_value2","patterns":[{"include":"#js_parens"},{"include":"#js_brackets"},{"include":"#js_braces"},{"include":"source.js"}]}]},"tag_classes":{"captures":{"1":{"name":"invalid.illegal.tag.pug"}},"match":"\\\\.([^-\\\\w])?[-\\\\w]*","name":"meta.selector.css entity.other.attribute-name.class.css.pug"},"tag_id":{"match":"#[-\\\\w]+","name":"meta.selector.css entity.other.attribute-name.id.css.pug"},"tag_mixin_attributes":{"begin":"(&attributes\\\\()","captures":{"1":{"name":"entity.name.function.pug"}},"end":"(\\\\))","name":"meta.tag.other","patterns":[{"match":"attributes(?=\\\\))","name":"storage.type.keyword.pug"},{"include":"source.js"}]},"tag_name":{"begin":"([!#]\\\\{(?=.*?}))|(\\\\w(([-:\\\\w]+[-\\\\w])|([-\\\\w]*)))","end":"\\\\G((?<!\\\\5[^-\\\\w]))|}|$","name":"meta.tag.other entity.name.tag.pug","patterns":[{"begin":"\\\\G(?<=\\\\{)","end":"(?=})","name":"meta.tag.other entity.name.tag.pug","patterns":[{"match":"\\\\{","name":"invalid.illegal.tag.pug"},{"include":"source.js"}]}]},"tag_text":{"begin":"(?=.)","end":"$","patterns":[{"include":"#inline_pug"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"unbuffered_code":{"begin":"(-|(([0-9A-Z_a-z]+)\\\\s+=))","beginCaptures":{"3":{"name":"variable.parameter.javascript.embedded.pug"}},"end":"(?=])|((\\\\{\\\\s*)?)$","name":"source.js","patterns":[{"include":"#js_brackets"},{"include":"#babel_parens"},{"include":"source.js"}]}},"scopeName":"text.pug","embeddedLangs":["javascript","css","html"],"aliases":["jade"],"embeddedLangsLazy":["sass","scss","stylus","coffee"]}`));var i=[...e,...t,...n,r];export{i as default};
@@ -1 +1 @@
1
- import{t as e}from"./javascript-e9R9mij1.js";const t=Object.freeze(JSON.parse(`{"displayName":"QML","name":"qml","patterns":[{"match":"\\\\bpragma\\\\s+Singleton\\\\b","name":"constant.language.qml"},{"include":"#import-statements"},{"include":"#object"},{"include":"#comment"}],"repository":{"attributes-dictionary":{"patterns":[{"include":"#typename"},{"include":"#keywords"},{"include":"#identifier"},{"include":"#attributes-value"},{"include":"#comment"}]},"attributes-value":{"patterns":[{"begin":"(?<=\\\\w)\\\\s*:\\\\s*(?=[A-Z]\\\\w*\\\\s*\\\\{)","description":"A QML object as value.","end":"(?<=})","patterns":[{"include":"#object"}]},{"begin":"(?<=\\\\w)\\\\s*:\\\\s*\\\\[","description":"A list as value.","end":"](.*)$","endCaptures":{"0":{"patterns":[{"include":"source.js"}]}},"patterns":[{"include":"#object"},{"include":"source.js"}]},{"begin":"(?<=\\\\w)\\\\s*:(?=\\\\s*\\\\{?\\\\s*$)","description":"A block of JavaScript code as value.","end":"(?<=})","patterns":[{"begin":"\\\\{","contentName":"meta.embedded.block.js","end":"}","patterns":[{"include":"source.js"}]}]},{"begin":"(?<=\\\\w)\\\\s*:","contentName":"meta.embedded.line.js","description":"A JavaScript expression as value.","end":";|$|(?=})","patterns":[{"include":"source.js"}]}]},"comment":{"patterns":[{"begin":"(//:)","beginCaptures":{"1":{"name":"storage.type.class.qml.tr"}},"end":"$","patterns":[{"include":"#comment-contents"}]},{"begin":"(//[=|~])\\\\s*([$A-Z_a-z][]$.\\\\[\\\\w]*)","beginCaptures":{"1":{"name":"storage.type.class.qml.tr"},"2":{"name":"variable.other.qml.tr"}},"end":"$","patterns":[{"include":"#comment-contents"}]},{"begin":"(//)","beginCaptures":{"1":{"name":"comment.line.double-slash.qml"}},"end":"$","patterns":[{"include":"#comment-contents"}]},{"begin":"(/\\\\*)","beginCaptures":{"1":{"name":"comment.line.double-slash.qml"}},"end":"(\\\\*/)","endCaptures":{"1":{"name":"comment.line.double-slash.qml"}},"patterns":[{"include":"#comment-contents"}]}]},"comment-contents":{"patterns":[{"match":"\\\\b(TODO|DEBUG|XXX)\\\\b","name":"constant.language.qml"},{"match":"\\\\b(BUG|FIXME)\\\\b","name":"invalid"},{"match":".","name":"comment.line.double-slash.qml"}]},"data-types":{"patterns":[{"description":"QML basic data types.","match":"\\\\b(bool|double|enum|int|list|real|string|url|variant|var)\\\\b","name":"storage.type.qml"},{"description":"QML modules basic data types.","match":"\\\\b(date|point|rect|size)\\\\b","name":"support.type.qml"}]},"group-attributes":{"patterns":[{"begin":"\\\\b([A-Z_a-z]\\\\w*)\\\\s*\\\\{","beginCaptures":{"1":{"name":"variable.parameter.qml"}},"end":"}","patterns":[{"include":"$self"},{"include":"#comment"},{"include":"#attributes-dictionary"}]}]},"identifier":{"description":"The name of variable, key, signal and etc.","patterns":[{"match":"\\\\b[A-Z_a-z]\\\\w*\\\\b","name":"variable.parameter.qml"}]},"import-statements":{"patterns":[{"begin":"\\\\b(import)\\\\b","beginCaptures":{"1":{"name":"keyword.control.import.qml"}},"end":"$","patterns":[{"match":"\\\\bas\\\\b","name":"keyword.control.as.qml"},{"include":"#string"},{"description":"<Version.Number>","match":"\\\\b\\\\d+\\\\.\\\\d+\\\\b","name":"constant.numeric.qml"},{"description":"as <Namespace>","match":"(?<=as)\\\\s+[A-Z]\\\\w*\\\\b","name":"entity.name.type.qml"},{"include":"#identifier"},{"include":"#comment"}]}]},"keywords":{"patterns":[{"include":"#data-types"},{"include":"#reserved-words"}]},"method-attributes":{"patterns":[{"begin":"\\\\b(function)\\\\b","beginCaptures":{"1":{"name":"storage.type.qml"}},"end":"(?<=})","patterns":[{"begin":"([A-Z_a-z]\\\\w*)\\\\s*\\\\(","beginCaptures":{"1":{"name":"entity.name.function.qml"}},"end":"\\\\)","patterns":[{"include":"#identifier"}]},{"begin":"\\\\{","contentName":"meta.embedded.block.js","end":"}","patterns":[{"include":"source.js"}]}]}]},"object":{"patterns":[{"begin":"\\\\b([A-Z]\\\\w*)\\\\s*\\\\{","beginCaptures":{"1":{"name":"entity.name.type.qml"}},"end":"}","patterns":[{"include":"$self"},{"include":"#group-attributes"},{"include":"#method-attributes"},{"include":"#signal-attributes"},{"include":"#comment"},{"include":"#attributes-dictionary"}]}]},"reserved-words":{"patterns":[{"description":"Attribute modifier.","match":"\\\\b(default|alias|readonly|required)\\\\b","name":"storage.modifier.qml"},{"match":"\\\\b(property|id|on)\\\\b","name":"keyword.other.qml"},{"description":"Special words for signal handlers including property change.","match":"\\\\b(on[A-Z]\\\\w*(Changed)?)\\\\b","name":"keyword.control.qml"}]},"signal-attributes":{"patterns":[{"begin":"\\\\b(signal)\\\\b","beginCaptures":{"1":{"name":"storage.type.qml"}},"end":"$","patterns":[{"begin":"([A-Z_a-z]\\\\w*)\\\\s*\\\\(","beginCaptures":{"1":{"name":"entity.name.function.qml"}},"end":"\\\\)","patterns":[{"include":"#keywords"},{"include":"#identifier"}]},{"include":"#identifier"},{"include":"#comment"}]}]},"string":{"description":"String literal with double or signle quote.","patterns":[{"begin":"'","end":"'","name":"string.quoted.single.qml"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.qml"}]},"typename":{"description":"The name of type. First letter must be uppercase.","patterns":[{"match":"\\\\b[A-Z]\\\\w*\\\\b","name":"entity.name.type.qml"}]}},"scopeName":"source.qml","embeddedLangs":["javascript"]}`));var n=[...e,t];export{n as default};
1
+ import{t as e}from"./javascript-BlmKDQ-I.js";const t=Object.freeze(JSON.parse(`{"displayName":"QML","name":"qml","patterns":[{"match":"\\\\bpragma\\\\s+Singleton\\\\b","name":"constant.language.qml"},{"include":"#import-statements"},{"include":"#object"},{"include":"#comment"}],"repository":{"attributes-dictionary":{"patterns":[{"include":"#typename"},{"include":"#keywords"},{"include":"#identifier"},{"include":"#attributes-value"},{"include":"#comment"}]},"attributes-value":{"patterns":[{"begin":"(?<=\\\\w)\\\\s*:\\\\s*(?=[A-Z]\\\\w*\\\\s*\\\\{)","description":"A QML object as value.","end":"(?<=})","patterns":[{"include":"#object"}]},{"begin":"(?<=\\\\w)\\\\s*:\\\\s*\\\\[","description":"A list as value.","end":"](.*)$","endCaptures":{"0":{"patterns":[{"include":"source.js"}]}},"patterns":[{"include":"#object"},{"include":"source.js"}]},{"begin":"(?<=\\\\w)\\\\s*:(?=\\\\s*\\\\{?\\\\s*$)","description":"A block of JavaScript code as value.","end":"(?<=})","patterns":[{"begin":"\\\\{","contentName":"meta.embedded.block.js","end":"}","patterns":[{"include":"source.js"}]}]},{"begin":"(?<=\\\\w)\\\\s*:","contentName":"meta.embedded.line.js","description":"A JavaScript expression as value.","end":";|$|(?=})","patterns":[{"include":"source.js"}]}]},"comment":{"patterns":[{"begin":"(//:)","beginCaptures":{"1":{"name":"storage.type.class.qml.tr"}},"end":"$","patterns":[{"include":"#comment-contents"}]},{"begin":"(//[=|~])\\\\s*([$A-Z_a-z][]$.\\\\[\\\\w]*)","beginCaptures":{"1":{"name":"storage.type.class.qml.tr"},"2":{"name":"variable.other.qml.tr"}},"end":"$","patterns":[{"include":"#comment-contents"}]},{"begin":"(//)","beginCaptures":{"1":{"name":"comment.line.double-slash.qml"}},"end":"$","patterns":[{"include":"#comment-contents"}]},{"begin":"(/\\\\*)","beginCaptures":{"1":{"name":"comment.line.double-slash.qml"}},"end":"(\\\\*/)","endCaptures":{"1":{"name":"comment.line.double-slash.qml"}},"patterns":[{"include":"#comment-contents"}]}]},"comment-contents":{"patterns":[{"match":"\\\\b(TODO|DEBUG|XXX)\\\\b","name":"constant.language.qml"},{"match":"\\\\b(BUG|FIXME)\\\\b","name":"invalid"},{"match":".","name":"comment.line.double-slash.qml"}]},"data-types":{"patterns":[{"description":"QML basic data types.","match":"\\\\b(bool|double|enum|int|list|real|string|url|variant|var)\\\\b","name":"storage.type.qml"},{"description":"QML modules basic data types.","match":"\\\\b(date|point|rect|size)\\\\b","name":"support.type.qml"}]},"group-attributes":{"patterns":[{"begin":"\\\\b([A-Z_a-z]\\\\w*)\\\\s*\\\\{","beginCaptures":{"1":{"name":"variable.parameter.qml"}},"end":"}","patterns":[{"include":"$self"},{"include":"#comment"},{"include":"#attributes-dictionary"}]}]},"identifier":{"description":"The name of variable, key, signal and etc.","patterns":[{"match":"\\\\b[A-Z_a-z]\\\\w*\\\\b","name":"variable.parameter.qml"}]},"import-statements":{"patterns":[{"begin":"\\\\b(import)\\\\b","beginCaptures":{"1":{"name":"keyword.control.import.qml"}},"end":"$","patterns":[{"match":"\\\\bas\\\\b","name":"keyword.control.as.qml"},{"include":"#string"},{"description":"<Version.Number>","match":"\\\\b\\\\d+\\\\.\\\\d+\\\\b","name":"constant.numeric.qml"},{"description":"as <Namespace>","match":"(?<=as)\\\\s+[A-Z]\\\\w*\\\\b","name":"entity.name.type.qml"},{"include":"#identifier"},{"include":"#comment"}]}]},"keywords":{"patterns":[{"include":"#data-types"},{"include":"#reserved-words"}]},"method-attributes":{"patterns":[{"begin":"\\\\b(function)\\\\b","beginCaptures":{"1":{"name":"storage.type.qml"}},"end":"(?<=})","patterns":[{"begin":"([A-Z_a-z]\\\\w*)\\\\s*\\\\(","beginCaptures":{"1":{"name":"entity.name.function.qml"}},"end":"\\\\)","patterns":[{"include":"#identifier"}]},{"begin":"\\\\{","contentName":"meta.embedded.block.js","end":"}","patterns":[{"include":"source.js"}]}]}]},"object":{"patterns":[{"begin":"\\\\b([A-Z]\\\\w*)\\\\s*\\\\{","beginCaptures":{"1":{"name":"entity.name.type.qml"}},"end":"}","patterns":[{"include":"$self"},{"include":"#group-attributes"},{"include":"#method-attributes"},{"include":"#signal-attributes"},{"include":"#comment"},{"include":"#attributes-dictionary"}]}]},"reserved-words":{"patterns":[{"description":"Attribute modifier.","match":"\\\\b(default|alias|readonly|required)\\\\b","name":"storage.modifier.qml"},{"match":"\\\\b(property|id|on)\\\\b","name":"keyword.other.qml"},{"description":"Special words for signal handlers including property change.","match":"\\\\b(on[A-Z]\\\\w*(Changed)?)\\\\b","name":"keyword.control.qml"}]},"signal-attributes":{"patterns":[{"begin":"\\\\b(signal)\\\\b","beginCaptures":{"1":{"name":"storage.type.qml"}},"end":"$","patterns":[{"begin":"([A-Z_a-z]\\\\w*)\\\\s*\\\\(","beginCaptures":{"1":{"name":"entity.name.function.qml"}},"end":"\\\\)","patterns":[{"include":"#keywords"},{"include":"#identifier"}]},{"include":"#identifier"},{"include":"#comment"}]}]},"string":{"description":"String literal with double or signle quote.","patterns":[{"begin":"'","end":"'","name":"string.quoted.single.qml"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.qml"}]},"typename":{"description":"The name of type. First letter must be uppercase.","patterns":[{"match":"\\\\b[A-Z]\\\\w*\\\\b","name":"entity.name.type.qml"}]}},"scopeName":"source.qml","embeddedLangs":["javascript"]}`));var n=[...e,t];export{n as default};
@@ -1 +1 @@
1
- import{t as e}from"./markdown-shiki.worker-CKKjvdhc.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"R","fileTypes":["R","r","Rprofile"],"foldingStartMarker":"\\\\{\\\\s*(?:#|$)","foldingStopMarker":"^\\\\s*}","name":"r","patterns":[{"include":"#roxygen-example"},{"include":"#basic"}],"repository":{"basic":{"patterns":[{"include":"#roxygen"},{"include":"#comment"},{"include":"#expression"}]},"basic-roxygen-example":{"patterns":[{"match":"^\\\\s*#+'","name":"comment.line"},{"include":"#comment"},{"include":"#expression"}]},"brackets":{"patterns":[{"begin":"\\\\{","end":"}","name":"meta.bracket","patterns":[{"include":"#basic"}]},{"begin":"\\\\[","end":"]","name":"meta.bracket","patterns":[{"captures":{"1":{"name":"variable.parameter"}},"match":"([.\\\\w]+)\\\\s*(?==[^=])"},{"include":"#basic"}]},{"begin":"\\\\(","end":"\\\\)","name":"meta.bracket","patterns":[{"captures":{"1":{"name":"variable.parameter"}},"match":"([.\\\\w]+)\\\\s*(?==[^=])"},{"include":"#basic"}]}]},"comment":{"match":"#.*","name":"comment.line"},"escape-code":{"match":"\\\\\\\\[\\"'\\\\\\\\\`abefnrtv]","name":"constant.character.escape"},"escape-hex":{"match":"\\\\\\\\x\\\\h+","name":"constant.numeric"},"escape-invalid":{"match":"\\\\\\\\.","name":"invalid"},"escape-octal":{"match":"\\\\\\\\\\\\d{1,3}","name":"constant.character.escape"},"escape-unicode":{"match":"\\\\\\\\[Uu](?:\\\\h+|\\\\{\\\\h+})","name":"constant.character.escape"},"escapes":{"patterns":[{"include":"#escape-code"},{"include":"#escape-hex"},{"include":"#escape-octal"},{"include":"#escape-unicode"},{"include":"#escape-invalid"}]},"expression":{"patterns":[{"include":"#brackets"},{"include":"#raw-strings"},{"include":"#strings"},{"include":"#function-definition"},{"include":"#keywords"},{"include":"#function-call"},{"include":"#identifiers"},{"include":"#numbers"},{"include":"#operators"}]},"function-call":{"captures":{"0":{"name":"meta.function-call"},"1":{"name":"entity.name.function"}},"match":"([.\\\\w]+)(?=\\\\()"},"function-definition":{"begin":"(function)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other"},"2":{"name":"meta.bracket"}},"end":"(\\\\))","endCaptures":{"1":{"name":"meta.bracket"}},"name":"meta.function.definition","patterns":[{"begin":"([.\\\\w]+)","beginCaptures":{"1":{"name":"variable.parameter"}},"end":"(?=[),])","patterns":[{"include":"#basic"}]},{"include":"#basic"}]},"identifier-quoted":{"begin":"\`","end":"\`","name":"variable.object","patterns":[{"match":"\\\\\\\\\`"}]},"identifier-syntactic":{"match":"[.\\\\p{L}\\\\p{Nl}][.\\\\p{L}\\\\p{Nl}\\\\p{Mn}\\\\p{Mc}\\\\d\\\\p{Pc}]*","name":"variable.object"},"identifiers":{"patterns":[{"include":"#identifier-syntactic"},{"include":"#identifier-quoted"}]},"keywords":{"patterns":[{"include":"#keywords-control"},{"include":"#keywords-builtin"},{"include":"#keywords-constant"}]},"keywords-builtin":{"match":"(?:setGroupGeneric|setRefClass|setGeneric|NextMethod|setMethod|UseMethod|tryCatch|setClass|warning|require|library|R6Class|return|switch|attach|detach|source|stop|try)(?=\\\\()","name":"keyword.other"},"keywords-constant":{"match":"(?:NA_character_|NA_integer_|NA_complex_|NA_real_|TRUE|FALSE|NULL|Inf|NaN|NA)\\\\b","name":"constant.language"},"keywords-control":{"match":"(?:\\\\\\\\|function|if|else|in|break|next|repeat|for|while)\\\\b","name":"keyword"},"latex":{"patterns":[{"match":"\\\\\\\\\\\\w+","name":"keyword.other"}]},"markdown":{"patterns":[{"begin":"(\`{3,})\\\\s*(.*)","beginCaptures":{"1":{"name":"comment.line"},"2":{"name":"entity.name.section"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"comment.line"}},"patterns":[{"match":"^\\\\s*#+'","name":"comment.line"}]},{"captures":{"1":{"name":"meta.bracket"},"2":{"name":"variable.object"},"3":{"name":"keyword.operator"},"4":{"name":"entity.name.function"},"5":{"name":"meta.bracket"},"6":{"name":"meta.bracket"}},"match":"(\\\\[)(?:(\\\\w+)(:{2,3}))?(\\\\w+)(\\\\(\\\\))?(])"},{"match":"(\\\\s+|^)(__.+?__)\\\\b","name":"markdown.bold"},{"match":"(\\\\s+|^)(_(?=[^_])(?:\\\\\\\\.|[^\\\\\\\\_])*?_)\\\\b","name":"markdown.italic"},{"match":"(\\\\*\\\\*.+?\\\\*\\\\*)","name":"markdown.bold"},{"match":"(\\\\*(?=[^*\\\\s])(?:\\\\\\\\.|[^*\\\\\\\\])*?\\\\*)","name":"markdown.italic"},{"match":"(\`(?:[^\\\\\\\\\`]|\\\\\\\\.)*\`)","name":"markup.quote"},{"match":"(<)([^>]*)(>)","name":"markup.underline.link"}]},"numbers":{"patterns":[{"match":"0[Xx]\\\\h+(?:p[-+]?\\\\d+)?[Li]?","name":"constant.numeric"},{"match":"(?:\\\\d+(?:\\\\.\\\\d*)?|\\\\.\\\\d+)(?:[Ee][-+]?\\\\d*)?[Li]?","name":"constant.numeric"}]},"operators":{"match":"%.*?%|:::?|:=|\\\\|>|=>|%%|>=|<=|==|!=|<<-|->>?|<-|\\\\|\\\\||&&|[-+=]|\\\\*\\\\*?|[!$\\\\&,/:<>?@^|~]","name":"keyword.operator"},"qqstring":{"begin":"\\"","end":"\\"","name":"string.quoted.double","patterns":[{"include":"#escapes"}]},"qstring":{"begin":"'","end":"'","name":"string.quoted.single","patterns":[{"include":"#escapes"}]},"raw-strings":{"name":"string.quoted.other","patterns":[{"begin":"[Rr]\\"(-*)\\\\{","end":"}\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\{","end":"}\\\\1'","name":"string.quoted.other"},{"begin":"[Rr]\\"(-*)\\\\[","end":"]\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\[","end":"]\\\\1'","name":"string.quoted.other"},{"begin":"[Rr]\\"(-*)\\\\(","end":"\\\\)\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\(","end":"\\\\)\\\\1'","name":"string.quoted.other"}]},"roxygen":{"begin":"^(\\\\s*#+')","beginCaptures":{"1":{"name":"comment.line.roxygen"}},"end":"$","patterns":[{"include":"#markdown"},{"include":"#roxygen-tokens"},{"include":"#latex"},{"match":".","name":"comment.line"}]},"roxygen-example":{"begin":"^(\\\\s*#+')\\\\s*(?:(@examples)\\\\s*|(@examplesIf)\\\\s+(.*))$","beginCaptures":{"1":{"name":"comment.line"},"2":{"name":"keyword.other"},"3":{"name":"keyword.other"},"4":{"patterns":[{"include":"#expression"}]}},"end":"^(?:\\\\s*(?=#+'\\\\s*@)|\\\\s*(?!#+'))","patterns":[{"match":"^\\\\s*#+'","name":"comment.line"},{"match":"[]()\\\\[{}]","name":"meta.bracket"},{"include":"#latex"},{"include":"#roxygen-tokens"},{"include":"#basic-roxygen-example"}]},"roxygen-tokens":{"patterns":[{"match":"@@","name":"constant.character.escape"},{"begin":"(@(?:param|field|slot))\\\\s*","beginCaptures":{"1":{"name":"keyword.other"}},"end":"\\\\s|$","patterns":[{"match":"([.\\\\w]+)","name":"variable.parameter"},{"match":",","name":"keyword.operator"}]},{"match":"@(?!@)\\\\w*","name":"keyword.other"}]},"strings":{"patterns":[{"include":"#qstring"},{"include":"#qqstring"}]}},"scopeName":"source.r"}`))];export{t as n,n as t};
1
+ import{t as e}from"./markdown-shiki.worker-woF2hOAN.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"R","fileTypes":["R","r","Rprofile"],"foldingStartMarker":"\\\\{\\\\s*(?:#|$)","foldingStopMarker":"^\\\\s*}","name":"r","patterns":[{"include":"#roxygen-example"},{"include":"#basic"}],"repository":{"basic":{"patterns":[{"include":"#roxygen"},{"include":"#comment"},{"include":"#expression"}]},"basic-roxygen-example":{"patterns":[{"match":"^\\\\s*#+'","name":"comment.line"},{"include":"#comment"},{"include":"#expression"}]},"brackets":{"patterns":[{"begin":"\\\\{","end":"}","name":"meta.bracket","patterns":[{"include":"#basic"}]},{"begin":"\\\\[","end":"]","name":"meta.bracket","patterns":[{"captures":{"1":{"name":"variable.parameter"}},"match":"([.\\\\w]+)\\\\s*(?==[^=])"},{"include":"#basic"}]},{"begin":"\\\\(","end":"\\\\)","name":"meta.bracket","patterns":[{"captures":{"1":{"name":"variable.parameter"}},"match":"([.\\\\w]+)\\\\s*(?==[^=])"},{"include":"#basic"}]}]},"comment":{"match":"#.*","name":"comment.line"},"escape-code":{"match":"\\\\\\\\[\\"'\\\\\\\\\`abefnrtv]","name":"constant.character.escape"},"escape-hex":{"match":"\\\\\\\\x\\\\h+","name":"constant.numeric"},"escape-invalid":{"match":"\\\\\\\\.","name":"invalid"},"escape-octal":{"match":"\\\\\\\\\\\\d{1,3}","name":"constant.character.escape"},"escape-unicode":{"match":"\\\\\\\\[Uu](?:\\\\h+|\\\\{\\\\h+})","name":"constant.character.escape"},"escapes":{"patterns":[{"include":"#escape-code"},{"include":"#escape-hex"},{"include":"#escape-octal"},{"include":"#escape-unicode"},{"include":"#escape-invalid"}]},"expression":{"patterns":[{"include":"#brackets"},{"include":"#raw-strings"},{"include":"#strings"},{"include":"#function-definition"},{"include":"#keywords"},{"include":"#function-call"},{"include":"#identifiers"},{"include":"#numbers"},{"include":"#operators"}]},"function-call":{"captures":{"0":{"name":"meta.function-call"},"1":{"name":"entity.name.function"}},"match":"([.\\\\w]+)(?=\\\\()"},"function-definition":{"begin":"(function)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"keyword.other"},"2":{"name":"meta.bracket"}},"end":"(\\\\))","endCaptures":{"1":{"name":"meta.bracket"}},"name":"meta.function.definition","patterns":[{"begin":"([.\\\\w]+)","beginCaptures":{"1":{"name":"variable.parameter"}},"end":"(?=[),])","patterns":[{"include":"#basic"}]},{"include":"#basic"}]},"identifier-quoted":{"begin":"\`","end":"\`","name":"variable.object","patterns":[{"match":"\\\\\\\\\`"}]},"identifier-syntactic":{"match":"[.\\\\p{L}\\\\p{Nl}][.\\\\p{L}\\\\p{Nl}\\\\p{Mn}\\\\p{Mc}\\\\d\\\\p{Pc}]*","name":"variable.object"},"identifiers":{"patterns":[{"include":"#identifier-syntactic"},{"include":"#identifier-quoted"}]},"keywords":{"patterns":[{"include":"#keywords-control"},{"include":"#keywords-builtin"},{"include":"#keywords-constant"}]},"keywords-builtin":{"match":"(?:setGroupGeneric|setRefClass|setGeneric|NextMethod|setMethod|UseMethod|tryCatch|setClass|warning|require|library|R6Class|return|switch|attach|detach|source|stop|try)(?=\\\\()","name":"keyword.other"},"keywords-constant":{"match":"(?:NA_character_|NA_integer_|NA_complex_|NA_real_|TRUE|FALSE|NULL|Inf|NaN|NA)\\\\b","name":"constant.language"},"keywords-control":{"match":"(?:\\\\\\\\|function|if|else|in|break|next|repeat|for|while)\\\\b","name":"keyword"},"latex":{"patterns":[{"match":"\\\\\\\\\\\\w+","name":"keyword.other"}]},"markdown":{"patterns":[{"begin":"(\`{3,})\\\\s*(.*)","beginCaptures":{"1":{"name":"comment.line"},"2":{"name":"entity.name.section"}},"end":"(\\\\1)","endCaptures":{"1":{"name":"comment.line"}},"patterns":[{"match":"^\\\\s*#+'","name":"comment.line"}]},{"captures":{"1":{"name":"meta.bracket"},"2":{"name":"variable.object"},"3":{"name":"keyword.operator"},"4":{"name":"entity.name.function"},"5":{"name":"meta.bracket"},"6":{"name":"meta.bracket"}},"match":"(\\\\[)(?:(\\\\w+)(:{2,3}))?(\\\\w+)(\\\\(\\\\))?(])"},{"match":"(\\\\s+|^)(__.+?__)\\\\b","name":"markdown.bold"},{"match":"(\\\\s+|^)(_(?=[^_])(?:\\\\\\\\.|[^\\\\\\\\_])*?_)\\\\b","name":"markdown.italic"},{"match":"(\\\\*\\\\*.+?\\\\*\\\\*)","name":"markdown.bold"},{"match":"(\\\\*(?=[^*\\\\s])(?:\\\\\\\\.|[^*\\\\\\\\])*?\\\\*)","name":"markdown.italic"},{"match":"(\`(?:[^\\\\\\\\\`]|\\\\\\\\.)*\`)","name":"markup.quote"},{"match":"(<)([^>]*)(>)","name":"markup.underline.link"}]},"numbers":{"patterns":[{"match":"0[Xx]\\\\h+(?:p[-+]?\\\\d+)?[Li]?","name":"constant.numeric"},{"match":"(?:\\\\d+(?:\\\\.\\\\d*)?|\\\\.\\\\d+)(?:[Ee][-+]?\\\\d*)?[Li]?","name":"constant.numeric"}]},"operators":{"match":"%.*?%|:::?|:=|\\\\|>|=>|%%|>=|<=|==|!=|<<-|->>?|<-|\\\\|\\\\||&&|[-+=]|\\\\*\\\\*?|[!$\\\\&,/:<>?@^|~]","name":"keyword.operator"},"qqstring":{"begin":"\\"","end":"\\"","name":"string.quoted.double","patterns":[{"include":"#escapes"}]},"qstring":{"begin":"'","end":"'","name":"string.quoted.single","patterns":[{"include":"#escapes"}]},"raw-strings":{"name":"string.quoted.other","patterns":[{"begin":"[Rr]\\"(-*)\\\\{","end":"}\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\{","end":"}\\\\1'","name":"string.quoted.other"},{"begin":"[Rr]\\"(-*)\\\\[","end":"]\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\[","end":"]\\\\1'","name":"string.quoted.other"},{"begin":"[Rr]\\"(-*)\\\\(","end":"\\\\)\\\\1\\"","name":"string.quoted.other"},{"begin":"[Rr]'(-*)\\\\(","end":"\\\\)\\\\1'","name":"string.quoted.other"}]},"roxygen":{"begin":"^(\\\\s*#+')","beginCaptures":{"1":{"name":"comment.line.roxygen"}},"end":"$","patterns":[{"include":"#markdown"},{"include":"#roxygen-tokens"},{"include":"#latex"},{"match":".","name":"comment.line"}]},"roxygen-example":{"begin":"^(\\\\s*#+')\\\\s*(?:(@examples)\\\\s*|(@examplesIf)\\\\s+(.*))$","beginCaptures":{"1":{"name":"comment.line"},"2":{"name":"keyword.other"},"3":{"name":"keyword.other"},"4":{"patterns":[{"include":"#expression"}]}},"end":"^(?:\\\\s*(?=#+'\\\\s*@)|\\\\s*(?!#+'))","patterns":[{"match":"^\\\\s*#+'","name":"comment.line"},{"match":"[]()\\\\[{}]","name":"meta.bracket"},{"include":"#latex"},{"include":"#roxygen-tokens"},{"include":"#basic-roxygen-example"}]},"roxygen-tokens":{"patterns":[{"match":"@@","name":"constant.character.escape"},{"begin":"(@(?:param|field|slot))\\\\s*","beginCaptures":{"1":{"name":"keyword.other"}},"end":"\\\\s|$","patterns":[{"match":"([.\\\\w]+)","name":"variable.parameter"},{"match":",","name":"keyword.operator"}]},{"match":"@(?!@)\\\\w*","name":"keyword.other"}]},"strings":{"patterns":[{"include":"#qstring"},{"include":"#qqstring"}]}},"scopeName":"source.r"}`))];export{t as n,n as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{E as t,t as n}from"./useUIStore-DOxLVeGb.js";import{Xt as r,d as i,kn as a,u as o,xn as s}from"./persistence-DE9RnVcA.js";import{A as c,D as l,E as u,F as d,I as f,M as p,N as m,P as h,j as g,k as _,nt as v,rt as y}from"./vendor-base-ui-CnHfUmDN.js";import{n as b}from"./vendor-react-DLPElpoQ.js";import{s as x}from"./vendor-tanstack-react-query-D7pys_c9.js";import{P as S,V as C,a as w,f as T,l as E}from"./vendor-codemirror-autocomplete-DHomsvW7.js";import{c as D,o as O,r as k}from"./vendor-codemirror-lang-angular-DShkBD6m.js";import{n as A,r as j}from"./vendor-codemirror-lang-json-CYJRHck9.js";import{n as M}from"./vendor-codemirror-lang-markdown-WORgx6ZD.js";import{n as ee}from"./vendor-codemirror-lang-python-Du6XQ8Zw.js";import{O as te}from"./vendor-codemirror-legacy-modes-DuRAjNvB.js";import{n as ne}from"./vendor-reactuses-core-DDoDDyM9.js";import{n as re,r as ie,t as ae}from"./clipboard-BXC1vZwE.js";import{Ya as oe,eo as se,mo as ce,na as N,qa as le}from"./useMobileNavigationStore-DFSb2gzX.js";import{s as P,t as F}from"./utils-C2R0YoC5.js";import{t as ue}from"./AgentAvatar-CVTgW_rx.js";import{n as I}from"./Icon-BLWVqBee.js";import{t as L}from"./button-CeCkEpvn.js";import{A as de,C as R,E as z,L as B,M as V,O as fe,R as pe,T as me,k as he,w as ge}from"./projectMeta-DCJQ6I3m.js";import{t as _e}from"./input-CyG05w-V.js";import{t as ve}from"./useThemeSystem-DMzWVJaW.js";import{i as ye}from"./OverlayScrollbar-GQgJusKL.js";import{t as be}from"./vendor-codemirror-language-data-BfYFhIH1.js";var H=e(y(),1),U=v(),xe=[.2,.45,.15,.55,.35,.1,.5,.25,.4,.3,.45,.15,.55,.2,.35,.1],Se=[.3,.15,.45,.25,.5,.35,.1,.4,.2,.55,.3,.15,.45,.25,.4,.2],Ce=(e,t,n,r,i=4)=>{let a=[];for(let o=0;o<i;o++)for(let s=0;s<i;s++){let c=s/i,l=(s+1)/i,u=o/i,d=(o+1)/i,f=(e,t,n)=>e+(t-e)*n,p=(e,t,n,r,i,a)=>{let o=f(e,t,i),s=f(r,n,i);return f(o,s,a)},m={x:p(e.x,t.x,n.x,r.x,c,u),y:p(e.y,t.y,n.y,r.y,c,u)},h={x:p(e.x,t.x,n.x,r.x,l,u),y:p(e.y,t.y,n.y,r.y,l,u)},g={x:p(e.x,t.x,n.x,r.x,l,d),y:p(e.y,t.y,n.y,r.y,l,d)},_={x:p(e.x,t.x,n.x,r.x,c,d),y:p(e.y,t.y,n.y,r.y,c,d)};a.push({path:`M${m.x} ${m.y} L${h.x} ${h.y} L${g.x} ${g.y} L${_.x} ${_.y} Z`,row:o,col:s})}return a},we=({className:e=``,width:t=70,height:n=70,isAnimated:r=!1})=>{let{t:i}=re(),a=ve(),o=!0;a?o=a.currentTheme.metadata.variant!==`light`:typeof window<`u`&&(o=window.matchMedia(`(prefers-color-scheme: dark)`).matches);let s=(0,H.useMemo)(()=>{if(a)return a.currentTheme.colors.surface.foreground;if(typeof window<`u`){let e=getComputedStyle(document.documentElement).getPropertyValue(`--splash-stroke`).trim();if(e)return e}return o?`white`:`black`},[a,o]),c=(0,H.useMemo)(()=>typeof window>`u`||typeof CSS>`u`||typeof CSS.supports!=`function`?!1:CSS.supports(`color`,`color-mix(in srgb, white 50%, transparent)`),[]),l=(0,H.useMemo)(()=>{if(a)return c?`color-mix(in srgb, ${s} 15%, transparent)`:o?`rgba(255,255,255,0.15)`:`rgba(0,0,0,0.15)`;if(typeof window<`u`){let e=getComputedStyle(document.documentElement).getPropertyValue(`--splash-face-fill`).trim();if(e)return e}return o?`rgba(255,255,255,0.15)`:`rgba(0,0,0,0.15)`},[a,c,s,o]),u=(0,H.useMemo)(()=>{if(a)return c?`color-mix(in srgb, ${s} 35%, transparent)`:o?`rgba(255,255,255,0.35)`:`rgba(0,0,0,0.4)`;if(typeof window<`u`){let e=getComputedStyle(document.documentElement).getPropertyValue(`--splash-cell-fill`).trim();if(e)return e}return o?`rgba(255,255,255,0.35)`:`rgba(0,0,0,0.4)`},[a,c,s,o]),d=s,f=.866,p=.5,m={x:50,y:2},h={x:50-48*f,y:50-48*p},g={x:91.568,y:50-48*p},_={x:50,y:50},v={x:50-48*f,y:74},y={x:91.568,y:74},b={x:50,y:98},x=`matrix(0.866, 0.5, -0.866, 0.5, 50, ${(m.y+h.y+_.y+g.y)/4})`,S=Ce(h,_,b,v),C=Ce(_,g,y,b);return(0,U.jsxs)(`svg`,{width:t,height:n,viewBox:`0 0 100 100`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,className:e,role:`img`,"aria-label":i(`openChamberLogo.aria.logo`),children:[r?(0,U.jsx)(`style`,{children:`@keyframes oc-logo-glow{0%,100%{filter:drop-shadow(0 0 0 transparent)}50%{filter:drop-shadow(0 0 4px var(--oc-glow-color))}}.oc-logo-glow{animation:oc-logo-glow 1.8s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.oc-logo-glow{animation:none}}`}):null,(0,U.jsx)(`path`,{d:`M${_.x} ${_.y} L${h.x} ${h.y} L${v.x} ${v.y} L${b.x} ${b.y} Z`,fill:l,stroke:s,strokeWidth:`2`,strokeLinejoin:`round`}),S.map((e,t)=>(0,U.jsx)(`path`,{d:e.path,fill:u,opacity:xe[e.row*4+(3-e.col)]??.35},`left-${t}`)),(0,U.jsx)(`path`,{d:`M${_.x} ${_.y} L${g.x} ${g.y} L${y.x} ${y.y} L${b.x} ${b.y} Z`,fill:l,stroke:s,strokeWidth:`2`,strokeLinejoin:`round`}),C.map((e,t)=>(0,U.jsx)(`path`,{d:e.path,fill:u,opacity:Se[e.row*4+e.col]??.35},`right-${t}`)),(0,U.jsx)(`path`,{d:`M${m.x} ${m.y} L${h.x} ${h.y} L${_.x} ${_.y} L${g.x} ${g.y} Z`,fill:`none`,stroke:s,strokeWidth:`2`,strokeLinejoin:`round`}),(0,U.jsx)(`g`,{opacity:1,className:r?`oc-logo-glow`:void 0,style:r?{"--oc-glow-color":s}:void 0,children:(0,U.jsxs)(`g`,{transform:`${x} scale(0.75)`,children:[(0,U.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M-16 -20 L16 -20 L16 20 L-16 20 Z M-8 -12 L-8 12 L8 12 L8 -12 Z`,fill:d}),(0,U.jsx)(`path`,{d:`M-8 -4 L8 -4 L8 12 L-8 12 Z`,fill:d,fillOpacity:`0.4`})]})})]})},W=b();function G(e){let t=(0,W.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=F(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(`div`,{"data-slot":`card`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Te(e){let t=(0,W.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=F(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function K(e){let t=(0,W.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=F(`leading-none font-semibold`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ee(e){let t=(0,W.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=F(`px-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var De=class extends H.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({error:e,errorInfo:t,copied:!1}),console.error(`Error caught by boundary:`,e,t)}handleReset=()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})};handleCopy=async()=>{let{strings:e}=this.props,t=`${this.state.error?String(this.state.error):e.unknownError}${this.state.error?.stack?`\n\nStack:\n${this.state.error.stack}`:``}${this.state.errorInfo?.componentStack?`\n\n${e.componentStackLabel}${this.state.errorInfo.componentStack}`:``}`;(await ae(t)).ok&&(this.setState({copied:!0}),window.setTimeout(()=>{this.setState(e=>e.copied?{copied:!1}:null)},1500))};render(){let{strings:e}=this.props;return this.state.hasError?this.props.fallback?this.props.fallback:(0,U.jsx)(`div`,{className:`p-4 flex items-center justify-center min-h-screen`,children:(0,U.jsxs)(G,{className:`w-full max-w-md`,children:[(0,U.jsx)(Te,{className:`text-center`,children:(0,U.jsxs)(K,{className:`flex items-center justify-center gap-2 text-destructive`,children:[(0,U.jsx)(I,{name:`error-warning`,className:`h-5 w-5`}),e.title]})}),(0,U.jsxs)(Ee,{className:`space-y-4`,children:[(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground text-center`,children:e.description}),this.state.error&&(0,U.jsxs)(`details`,{className:`text-xs font-mono bg-muted p-3 rounded`,children:[(0,U.jsx)(`summary`,{className:`cursor-pointer hover:bg-interactive-hover/80`,children:e.detailsSummary}),(0,U.jsxs)(`pre`,{className:`mt-2 max-h-48 overflow-auto`,children:[this.state.error.toString(),this.state.errorInfo?.componentStack?`\n\n${e.componentStackLabel}${this.state.errorInfo.componentStack}`:``]})]}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsxs)(L,{onClick:this.handleReset,variant:`outline`,className:`flex-1`,children:[(0,U.jsx)(I,{name:`restart`,className:`h-4 w-4 mr-2`}),e.tryAgain]}),(0,U.jsx)(L,{onClick:this.handleCopy,variant:`outline`,className:`flex-1`,children:this.state.copied?e.copied:e.copy})]})]})]})}):this.props.children}},Oe=e=>{let t=(0,W.c)(29),{children:n,fallback:r}=e,{t:i}=re(),a;t[0]===i?a=t[1]:(a=i(`errorBoundary.state.unknownError`),t[0]=i,t[1]=a);let o;t[2]===i?o=t[3]:(o=i(`errorBoundary.title`),t[2]=i,t[3]=o);let s;t[4]===i?s=t[5]:(s=i(`errorBoundary.description`),t[4]=i,t[5]=s);let c;t[6]===i?c=t[7]:(c=i(`errorBoundary.actions.errorDetails`),t[6]=i,t[7]=c);let l;t[8]===i?l=t[9]:(l=i(`errorBoundary.state.componentStackLabel`),t[8]=i,t[9]=l);let u;t[10]===i?u=t[11]:(u=i(`errorBoundary.actions.tryAgain`),t[10]=i,t[11]=u);let d;t[12]===i?d=t[13]:(d=i(`errorBoundary.actions.copied`),t[12]=i,t[13]=d);let f;t[14]===i?f=t[15]:(f=i(`errorBoundary.actions.copy`),t[14]=i,t[15]=f);let p;t[16]!==a||t[17]!==o||t[18]!==s||t[19]!==c||t[20]!==l||t[21]!==u||t[22]!==d||t[23]!==f?(p={unknownError:a,title:o,description:s,detailsSummary:c,componentStackLabel:l,tryAgain:u,copied:d,copy:f},t[16]=a,t[17]=o,t[18]=s,t[19]=c,t[20]=l,t[21]=u,t[22]=d,t[23]=f,t[24]=p):p=t[24];let m=p,h;return t[25]!==n||t[26]!==r||t[27]!==m?(h=(0,U.jsx)(De,{fallback:r,strings:m,children:n}),t[25]=n,t[26]=r,t[27]=m,t[28]=h):h=t[28],h},q=`__unassigned__`,ke={mod:`mod`,shift:`shift`,alt:`alt`,option:`alt`,ctrl:`ctrl`,meta:`mod`,cmd:`mod`,command:`mod`},Ae={mod:P()&&r()?`⌘`:`Ctrl`,shift:`⇧`,alt:`⌥`,option:`⌥`,ctrl:`⌃`},je={comma:`,`,period:`.`,enter:`Enter`,escape:`Esc`,tab:`Tab`,space:`Space`,backspace:`⌫`,delete:`⌦`,arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`,home:`Home`,end:`End`,pageup:`Page Up`,pagedown:`Page Down`,backtick:"`",grave:"`","=":`=`,equal:`=`,plus:`+`,minus:`-`,"-":`-`},J=[`mod`,`ctrl`,`shift`,`alt`],Me={"{":`[`,"}":`]`,":":`;`,'"':`'`,"<":`,`,">":`.`,"?":`/`,"|":`\\`,"~":"`","!":`1`,"@":`2`,"#":`3`,$:`4`,"%":`5`,"^":`6`,"&":`7`,"*":`8`,"(":`9`,")":`0`};function Y(e){return e.trim().toLowerCase()===q}function Ne(e){let t=e.toLowerCase();return t===`,`?`comma`:t===`.`?`period`:t===` `?`space`:t===`esc`?`escape`:t===`+`?`plus`:t===`-`||t===`_`?`minus`:t===`arrowup`?`arrowup`:t===`arrowdown`?`arrowdown`:t===`arrowleft`?`arrowleft`:t===`arrowright`?`arrowright`:t==="`"?`backtick`:Me[t]??t}var Pe=[{id:`open_go_to_line`,defaultCombo:`alt+g`,label:`Go to line (files editor)`,description:`Open go to line in the files editor`,customizable:!0},{id:`open_command_palette`,defaultCombo:`mod+p`,label:`Open command palette`,description:`Open the command palette`,customizable:!0},{id:`focus_input`,defaultCombo:`mod+i`,label:`Focus input`,description:`Focus the chat input field`,customizable:!0},{id:`open_status`,defaultCombo:`mod+shift+o`,label:`Open OpenCode status`,description:`Open the OpenCode status dialog`},{id:`open_settings`,defaultCombo:`mod+comma`,label:`Open settings`,description:`Open the settings panel`,customizable:!0},{id:`toggle_terminal`,defaultCombo:`ctrl+backtick`,label:`Toggle terminal`,description:`Toggle the integrated terminal`,customizable:!0},{id:`toggle_bottom_panel`,defaultCombo:`mod+j`,label:`Toggle bottom panel`,description:`Toggle the bottom panel dock`,customizable:!0},{id:`toggle_terminal_expanded`,defaultCombo:`mod+shift+j`,label:`Toggle terminal expanded`,description:`Toggle terminal expanded or collapsed`,customizable:!0},{id:`new_terminal_tab`,defaultCombo:`mod+t`,label:`New terminal tab`,description:`Create a new terminal tab when the terminal is focused`,customizable:!0},{id:`open_new_terminal`,defaultCombo:`mod+shift+backtick`,label:`Open new terminal`,description:`Open the terminal panel and create a new terminal tab`,customizable:!0},{id:`previous_terminal_tab`,defaultCombo:`mod+shift+[`,label:`Previous terminal tab`,description:`Switch to the previous terminal tab when the terminal is focused`,customizable:!0},{id:`next_terminal_tab`,defaultCombo:`mod+shift+]`,label:`Next terminal tab`,description:`Switch to the next terminal tab when the terminal is focused`,customizable:!0},{id:`toggle_files`,defaultCombo:`mod+shift+f`,label:`Toggle files`,description:`Toggle the files panel`},{id:`toggle_sidebar`,defaultCombo:`mod+b`,label:`Toggle sidebar`,description:`Toggle the session sidebar`,customizable:!0},{id:`open_timeline_dialog`,defaultCombo:`mod+t`,label:`Open conversation timeline`,description:`Search and navigate within current conversation`,customizable:!0},{id:`toggle_prompt_navigator`,defaultCombo:`mod+alt+p`,label:`Toggle prompt navigator`,description:`Show or hide the prompt navigator panel in chat`,customizable:!0},{id:`toggle_right_sidebar`,defaultCombo:`mod+alt+b`,defaultAliases:[`mod+\\`],label:`Toggle review panel`,description:`Toggle the review panel (right sidebar)`,customizable:!0},{id:`open_right_sidebar_git`,defaultCombo:`mod+shift+g`,label:`Open right sidebar Git tab`,description:`Open right sidebar and select Git`,customizable:!0},{id:`open_right_sidebar_files`,defaultCombo:`mod+shift+f`,label:`Open right sidebar Files tab`,description:`Open right sidebar and select Files`,customizable:!0},{id:`cycle_right_sidebar_tab`,defaultCombo:`mod+alt+shift+r`,label:`Cycle right sidebar tab`,description:`Cycle through right sidebar tabs`,customizable:!0},{id:`close_context_panel_tab`,defaultCombo:`mod+w`,label:`Close context panel tab`,description:`Close the active context panel tab (closes the panel when empty)`,customizable:!0},{id:`previous_session`,defaultCombo:`mod+shift+[`,defaultAliases:[`mod+arrowup`],label:`Previous session`,description:`Switch to the previous session`,customizable:!0},{id:`next_session`,defaultCombo:`mod+shift+]`,defaultAliases:[`mod+arrowdown`],label:`Next session`,description:`Switch to the next session`,customizable:!0},{id:`new_chat`,defaultCombo:`mod+n`,label:`New session`,description:`Start a new session`,customizable:!0},{id:`new_chat_worktree`,defaultCombo:`mod+shift+alt+n`,label:`New worktree draft`,description:`Create a new worktree and open a draft in it`,customizable:!0},{id:`new_mini_chat`,defaultCombo:`mod+alt+n`,label:`New Mini Chat window`,description:`Open a new Mini Chat draft window`,customizable:!0},{id:`submit_message`,defaultCombo:`mod+enter`,label:`Submit message`,description:`Submit the current message`},{id:`clear_input`,defaultCombo:`escape`,label:`Clear input`,description:`Clear the input field`},{id:`clear_all_messages`,defaultCombo:`ctrl+c`,label:`Clear all messages`,description:`Clear the composer input and queued messages`,customizable:!0},{id:`open_diff_panel`,defaultCombo:`mod+2`,label:`Open diff panel`,description:`Switch to the diff panel`},{id:`open_terminal_panel`,defaultCombo:`mod+3`,label:`Open terminal panel`,description:`Switch to the terminal panel`},{id:`open_git_panel`,defaultCombo:`mod+4`,label:`Open git panel`,description:`Switch to the git panel`},{id:`open_help`,defaultCombo:`mod+.`,label:`Open keyboard shortcuts`,description:`Show the keyboard shortcuts help`,customizable:!0},{id:`toggle_services_menu`,defaultCombo:`mod+shift+s`,label:`Toggle services menu`,description:`Open or close the services menu`,customizable:!0},{id:`open_usage`,defaultCombo:`mod+shift+c`,label:`Open usage`,description:`Open the usage panel`,customizable:!0},{id:`cycle_services_tab`,defaultCombo:`mod+alt+shift+s`,label:`Cycle services tab`,description:`Cycle through tabs in the services menu`,customizable:!0},{id:`cycle_theme`,defaultCombo:`mod+/`,label:`Cycle theme`,description:`Cycle between light, dark, and system theme`,customizable:!0},{id:`zoom_in`,defaultCombo:`mod+=`,label:`Zoom in`,description:`Increase the webview zoom level`,customizable:!0},{id:`zoom_out`,defaultCombo:`mod+-`,label:`Zoom out`,description:`Decrease the webview zoom level`,customizable:!0},{id:`zoom_reset`,defaultCombo:`mod+0`,label:`Reset zoom`,description:`Reset the webview zoom level to 100%`,customizable:!0},{id:`leader_key`,defaultCombo:`ctrl+x`,label:`Leader key`,description:`Start an OpenCode-style chord, then press M / A / N / C`,customizable:!0},{id:`open_model_selector`,defaultCombo:`mod+shift+m`,label:`Open model selector`,description:`Open model selector while in chat`,customizable:!0},{id:`cycle_thinking_variant`,defaultCombo:`mod+shift+t`,label:`Cycle thinking variant`,description:`Cycle thinking variant while in chat`},{id:`cycle_agent`,defaultCombo:`tab`,label:`Cycle agent`,description:`Cycle agent while the model selector is open`,customizable:!0},{id:`cycle_favorite_model_forward`,defaultCombo:`ctrl+]`,label:`Cycle favorite model forward`,description:`Cycle forward through starred models without opening the picker`,customizable:!0},{id:`cycle_favorite_model_backward`,defaultCombo:`ctrl+[`,label:`Cycle favorite model backward`,description:`Cycle backward through starred models without opening the picker`,customizable:!0},{id:`expand_input`,defaultCombo:`mod+shift+e`,label:`Expand input`,description:`Toggle focus mode for the chat input`,customizable:!0},{id:`toggle_dictation`,defaultCombo:`mod+alt+v`,label:`Voice input`,description:`Start dictation; press again to confirm and insert the transcript`,customizable:!0},{id:`abort_run`,defaultCombo:`escape`,label:`Abort active run`,description:`Abort the currently running task (double press)`},{id:`switch_tab_1`,defaultCombo:`mod+1`,label:`Switch to visible session 1`,description:`Switch to the first visible sidebar session`},{id:`switch_tab_2`,defaultCombo:`mod+2`,label:`Switch to visible session 2`,description:`Switch to the second visible sidebar session`},{id:`switch_tab_3`,defaultCombo:`mod+3`,label:`Switch to visible session 3`,description:`Switch to the third visible sidebar session`},{id:`switch_tab_4`,defaultCombo:`mod+4`,label:`Switch to visible session 4`,description:`Switch to the fourth visible sidebar session`},{id:`switch_tab_5`,defaultCombo:`mod+5`,label:`Switch to visible session 5`,description:`Switch to the fifth visible sidebar session`},{id:`switch_tab_6`,defaultCombo:`mod+6`,label:`Switch to visible session 6`,description:`Switch to the sixth visible sidebar session`},{id:`switch_tab_7`,defaultCombo:`mod+7`,label:`Switch to visible session 7`,description:`Switch to the seventh visible sidebar session`},{id:`switch_tab_8`,defaultCombo:`mod+8`,label:`Switch to visible session 8`,description:`Switch to the eighth visible sidebar session`},{id:`switch_tab_9`,defaultCombo:`mod+9`,label:`Switch to visible session 9`,description:`Switch to the ninth visible sidebar session`}];function X(e){if(Y(e))return q;let t=e.toLowerCase().trim().split(`+`).map(e=>e.trim()).filter(Boolean),n=new Set,r=``;for(let e of t){let t=e===`,`?`comma`:e===`.`?`period`:e,i=ke[t];if(i){n.add(i);continue}r=t}return[...J.filter(e=>n.has(e)),r].filter(Boolean).join(`+`)}function Z(e){return Y(e)?!0:Fe(e).key.trim().length>0}function Fe(e){if(Y(e))return{modifiers:new Set,key:q};let t=X(e).split(`+`),n=new Set,r=``;for(let e of t){let t=ke[e];t?n.add(t):r=e}return{modifiers:n,key:r}}function Ie(e){if(Y(e))return`Unassigned`;let t=Fe(e);if(!t.key&&t.modifiers.size===0)return`Unassigned`;let n=[];for(let e of J)t.modifiers.has(e)&&n.push(Ae[e]);if(t.key){let e=je[t.key.toLowerCase()]||t.key.toUpperCase();n.push(e)}return n.join(` + `)}function Le(e){return Pe.find(t=>t.id===e)}function Re(){return Pe.filter(e=>e.customizable===!0)}function ze(e,t){let n=Le(e);if(!n)return``;let r=t?.[e];if(typeof r==`string`){if(r.trim().toLowerCase()===`__unassigned__`)return``;let e=X(r);if(e===`__unassigned__`)return q;if(Z(e))return e}return n.defaultCombo}function Be(e,t){let n=Le(e);if(!n)return[];let r=ze(e,t);return r===n.defaultCombo?[n.defaultCombo,...n.defaultAliases??[]]:r?[r]:[]}function Ve(e){if(Y(e))return!1;let t=Fe(e);if(!t.modifiers.has(`mod`))return!1;let n=t.key.toLowerCase();return new Set([`w`,`t`,`r`,`p`,`s`,`f`,`l`,`n`]).has(n)&&!t.modifiers.has(`shift`)&&!t.modifiers.has(`alt`)}function He(e,t){let n=typeof t==`string`?t:t.defaultCombo;if(Y(n))return!1;let i=Fe(n),a=i.modifiers.has(`mod`),o=i.modifiers.has(`shift`),s=i.modifiers.has(`alt`),c=i.modifiers.has(`ctrl`),l=P()&&r(),u=P(),d=l?e.metaKey:u&&e.metaKey||e.ctrlKey;if(a&&!d||!a&&e.metaKey||o!==e.shiftKey||s!==e.altKey)return!1;if(c){if(!e.ctrlKey)return!1}else{let t=a&&!l&&e.ctrlKey;if(e.ctrlKey&&!t)return!1}let f=e.key;return(!f||f===`Dead`)&&e.code===`Backquote`&&(f="`"),e.altKey&&(e.code.startsWith(`Key`)&&e.code.length===4?f=e.code.slice(3).toLowerCase():e.code.startsWith(`Digit`)&&e.code.length===6&&(f=e.code.slice(5))),Ne(f)===Ne(i.key)}function Q(){return P()&&r()?`⌘`:`Ctrl`}function Ue(e,t,n){if(He(e,n))return!0;let i=X(n),a=P()&&r(),o=P();return!(a?e.metaKey:o&&e.metaKey||e.ctrlKey)||e.altKey||a&&e.ctrlKey&&!e.metaKey?!1:t===`in`&&i===`mod+=`?e.key===`+`||e.code===`NumpadAdd`:t===`out`&&(i===`mod+-`||i===`mod+minus`)?e.key===`_`||e.code===`NumpadSubtract`:!1}var We=`app-region-no-drag transition-all duration-150 ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 z-50 max-h-[var(--available-height)] min-w-[8rem] origin-[var(--transform-origin)] overflow-visible rounded-xl p-1 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]`,Ge=`data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover active:bg-interactive-active data-[variant=destructive]:text-destructive data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 typography-ui-label outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,Ke=`data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover active:bg-interactive-active [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 typography-ui-label outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,qe=`bg-border -mx-1 my-0.5 h-px`,Je=H.createContext(null),Ye=e=>e?e.closest(`[data-slot="dialog-content"], [role="dialog"]`):null;function Xe(e,t){return e&&H.isValidElement(t)?{render:t}:{children:t}}function Ze(e){let t=(0,W.c)(9),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let[r,i]=H.useState(null),a;t[2]===r?a=t[3]:(a={portalContainer:r,setPortalContainer:i},t[2]=r,t[3]=a);let o=a,s;t[4]===n?s=t[5]:(s=(0,U.jsx)(_,{...n}),t[4]=n,t[5]=s);let c;return t[6]!==o||t[7]!==s?(c=(0,U.jsx)(Je.Provider,{value:o,children:s}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function Qe(e){let t=(0,W.c)(22),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({asChild:n,children:r,onPointerDownCapture:a,onFocusCapture:i,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=H.useContext(Je),c;t[6]===s?c=t[7]:(c=e=>{if(!s)return;let t=e instanceof HTMLElement?e:null;s.setPortalContainer(Ye(t))},t[6]=s,t[7]=c);let u=c,d;t[8]!==n||t[9]!==r?(d=Xe(n,r),t[8]=n,t[9]=r,t[10]=d):d=t[10];let f=d,p;t[11]!==a||t[12]!==u?(p=e=>{u(e.currentTarget),a?.(e)},t[11]=a,t[12]=u,t[13]=p):p=t[13];let m;t[14]!==i||t[15]!==u?(m=e=>{u(e.currentTarget),i?.(e)},t[14]=i,t[15]=u,t[16]=m):m=t[16];let h;return t[17]!==o||t[18]!==f||t[19]!==p||t[20]!==m?(h=(0,U.jsx)(l,{"data-slot":`dropdown-menu-trigger`,onPointerDownCapture:p,onFocusCapture:m,...o,...f}),t[17]=o,t[18]=f,t[19]=p,t[20]=m,t[21]=h):h=t[21],h}function $e(e){let t=(0,W.c)(40),n,r,i,a,o,s,c,l,u,f,p,g,_;if(t[0]!==e){let{className:d,sideOffset:m,align:h,side:v,alignOffset:y,anchor:b,portalToBody:x,positionerClassName:S,style:C,children:w,onCloseAutoFocus:T,collisionPadding:E,collisionAvoidance:D,...O}=e;o=d,f=m,n=h,l=v,r=y,i=b,p=x,s=S,u=C,a=w,g=E,_=D,c=O,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]=f,t[11]=p,t[12]=g,t[13]=_}else 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],f=t[10],p=t[11],g=t[12],_=t[13];let v=f===void 0?4:f,y=p!==void 0&&p,b=g===void 0?8:g,x;t[14]===_?x=t[15]:(x=_===void 0?{side:`shift`,align:`shift`}:_,t[14]=_,t[15]=x);let S=x,C=H.useContext(Je),w=y?void 0:C?.portalContainer||void 0,T;t[16]===s?T=t[17]:(T=F(`app-region-no-drag z-50`,s),t[16]=s,t[17]=T);let E;t[18]===u?E=t[19]:(E={backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`,...u},t[18]=u,t[19]=E);let D;t[20]===o?D=t[21]:(D=F(We,o),t[20]=o,t[21]=D);let O;t[22]!==a||t[23]!==c||t[24]!==E||t[25]!==D?(O=(0,U.jsx)(d,{"data-slot":`dropdown-menu-content`,style:E,className:D,...c,children:a}),t[22]=a,t[23]=c,t[24]=E,t[25]=D,t[26]=O):O=t[26];let k;t[27]!==n||t[28]!==r||t[29]!==i||t[30]!==S||t[31]!==b||t[32]!==l||t[33]!==v||t[34]!==O||t[35]!==T?(k=(0,U.jsx)(m,{anchor:i,sideOffset:v,align:n,side:l,alignOffset:r,collisionPadding:b,collisionAvoidance:S,className:T,children:O}),t[27]=n,t[28]=r,t[29]=i,t[30]=S,t[31]=b,t[32]=l,t[33]=v,t[34]=O,t[35]=T,t[36]=k):k=t[36];let A;return t[37]!==k||t[38]!==w?(A=(0,U.jsx)(h,{container:w,children:k}),t[37]=k,t[38]=w,t[39]=A):A=t[39],A}function $(e){let t=(0,W.c)(24),n,r,i,a,o,s,c,l;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]):({className:i,inset:a,variant:l,asChild:n,children:r,onSelect:s,onClick:o,...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);let u=l===void 0?`default`:l,d;t[9]!==n||t[10]!==r?(d=Xe(n,r),t[9]=n,t[10]=r,t[11]=d):d=t[11];let p=d,m;t[12]!==o||t[13]!==s?(m=e=>{o?.(e),e.defaultPrevented||s?.(e)},t[12]=o,t[13]=s,t[14]=m):m=t[14];let h=m,g;t[15]===i?g=t[16]:(g=F(Ge,i),t[15]=i,t[16]=g);let _;return t[17]!==h||t[18]!==a||t[19]!==c||t[20]!==p||t[21]!==g||t[22]!==u?(_=(0,U.jsx)(f,{"data-slot":`dropdown-menu-item`,"data-inset":a,"data-variant":u,className:g,...c,onClick:h,...p}),t[17]=h,t[18]=a,t[19]=c,t[20]=p,t[21]=g,t[22]=u,t[23]=_):_=t[23],_}function et(e){let t=(0,W.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,U.jsx)(p,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function tt(e){let t=(0,W.c)(11),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=F(`data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover data-[checked]:bg-interactive-selection data-[checked]:text-interactive-selection-foreground relative flex cursor-pointer items-start gap-2 rounded-lg py-1 pl-2 pr-8 typography-ui-label outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,U.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-3.5 items-center justify-center text-primary`,children:(0,U.jsx)(c,{children:(0,U.jsx)(I,{name:`check`,className:`size-3`})})}),t[6]=o):o=t[6];let s;return t[7]!==n||t[8]!==i||t[9]!==a?(s=(0,U.jsxs)(g,{"data-slot":`dropdown-menu-radio-item`,className:a,...i,children:[o,n]}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function nt(e){let t=(0,W.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=F(`px-2 py-1 typography-ui-label font-medium data-[inset]:pl-8`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,U.jsx)(`div`,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function rt(e){let t=(0,W.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=F(qe,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(u,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function it(){let e=(0,W.c)(5),t=N(ct),n=N(st),r=N(ot),i=N(at),a=t||i,o=!a&&r===`init_error`,s=!a&&!o,c;return e[0]!==n||e[1]!==a||e[2]!==o||e[3]!==s?(c={isReady:a,isLoading:s,isUnavailable:o,connectionPhase:n},e[0]=n,e[1]=a,e[2]=o,e[3]=s,e[4]=c):c=e[4],c}function at(e){return e.providers.length>0}function ot(e){return e.lastDisconnectReason}function st(e){return e.connectionPhase}function ct(e){return e.isInitialized}var lt=e=>{let t=(0,W.c)(41),{agentName:r,onChange:i,className:a,filter:o,dropdownPortalToBody:s,showIcon:c,agents:l}=e,u=s!==void 0&&s,d=c===void 0||c,{t:f}=re(),{isReady:p,isUnavailable:m}=it(),h=N(ut),g=se(dt),_=N(ft),{data:v}=ce(),y;t[0]===v?y=t[1]:(y=v===void 0?[]:v,t[0]=v,t[1]=y);let b=y,x;bb0:{if(l){x=l;break bb0}if(Array.isArray(h)&&h.length>0){x=h;break bb0}x=b}let S=x,C;if(t[2]!==o||t[3]!==S){let e=oe(S);C=o?e.filter(o):e,t[2]=o,t[3]=S,t[4]=C}else C=t[4];let w=C,T=n(pt),{isMobile:E}=ye(),D=T||E,[O,k]=H.useState(!1),A;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{k(!0),N.getState().refreshCatalogsOnPickerOpen({source:`agentSelector:mobilePanel`})},t[5]=A):A=t[5];let j=ne(A),M=ne(mt),ee=H.useId(),te,ie;t[6]!==l||t[7]!==g||t[8]!==_||t[9]!==S.length?(te=()=>{l||S.length>0||(_(),g())},ie=[l,S.length,_,g],t[6]=l,t[7]=g,t[8]=_,t[9]=S.length,t[10]=te,t[11]=ie):(te=t[10],ie=t[11]),H.useEffect(te,ie);let ae;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(ae=()=>k(!1),t[12]=ae):ae=t[12];let le=ae,P;t[13]===i?P=t[14]:(P=e=>{i(e)},t[13]=i,t[14]=P);let L=P,R;t[15]!==r||t[16]!==w||t[17]!==L||t[18]!==D||t[19]!==O||t[20]!==ee||t[21]!==f?(R=()=>D?(0,U.jsx)(V,{id:`mobile-agent-selector-sheet-${ee}`,open:O,onOpenChange:e=>{e||le()},ariaLabel:f(`settings.commands.agentSelector.title`),closeAriaLabel:f(`mobile.surface.closeAria`),resizeAriaLabel:f(`mobile.sessions.sheet.resizeAria`),bodyClassName:`px-2`,children:(0,U.jsxs)(de,{useScrollShadow:!0,disableHorizontal:!0,preventOverscroll:!0,outerClassName:`min-h-0 flex-1`,className:`flex flex-col gap-1 overscroll-contain`,children:[(0,U.jsxs)(`button`,{type:`button`,className:F(`grid w-full grid-cols-[1rem_minmax(0,1fr)_auto] items-center gap-x-2 rounded-lg border border-border/40 bg-background/95 px-2 py-1.5 text-left`,r?`text-foreground`:`bg-primary/10 text-primary`),onClick:()=>{L(``),le()},children:[(0,U.jsx)(ue,{name:`default`,size:16}),(0,U.jsx)(`span`,{className:F(`min-w-0 typography-meta`,r?`text-muted-foreground`:`font-medium`),children:f(`settings.commands.agentSelector.notSelected`)}),!r&&(0,U.jsx)(`div`,{className:`h-2 w-2 rounded-full bg-primary`})]}),w.map(e=>{let t=e.name===r;return(0,U.jsxs)(`button`,{type:`button`,className:F(`grid w-full grid-cols-[1rem_minmax(0,1fr)_auto] items-start gap-x-2 rounded-lg border border-border/40 bg-background/95 px-2 py-1.5 text-left`,t?`bg-primary/10 text-primary`:`text-foreground`),onClick:()=>{L(e.name),le()},children:[(0,U.jsx)(ue,{name:e.name,size:16,className:`mt-1.5`}),(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`span`,{className:`typography-meta font-medium`,children:e.name}),e.description&&(0,U.jsx)(`span`,{className:`mt-0.5 block whitespace-normal break-words typography-micro text-muted-foreground`,children:e.description})]}),t&&(0,U.jsx)(`div`,{className:`mt-2 h-2 w-2 rounded-full bg-primary`})]},e.name)})]})}):null,t[15]=r,t[16]=w,t[17]=L,t[18]=D,t[19]=O,t[20]=ee,t[21]=f,t[22]=R):R=t[22];let z=R,B;t[23]!==r||t[24]!==w||t[25]!==a||t[26]!==u||t[27]!==L||t[28]!==M||t[29]!==D||t[30]!==p||t[31]!==m||t[32]!==j||t[33]!==d||t[34]!==f?(B=D?(0,U.jsxs)(`button`,{type:`button`,onClick:p?j:void 0,disabled:!p,className:F(`flex w-full items-center justify-between gap-2 rounded-lg border border-border/40 bg-background/95 px-2 py-1.5 text-left`,!p&&`opacity-60 cursor-not-allowed`,a),children:[(0,U.jsx)(`div`,{className:`flex items-center gap-2`,children:p?(0,U.jsxs)(U.Fragment,{children:[d?(0,U.jsx)(ue,{name:r||`default`,size:14}):null,(0,U.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:r||f(`settings.commands.agentSelector.selectAgentPlaceholder`)})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,U.jsx)(`span`,{className:`typography-meta text-muted-foreground`,children:f(m?`common.unavailable`:`common.loading`)})]})}),(0,U.jsx)(I,{name:`arrow-down-s`,className:`h-3 w-3 text-muted-foreground`})]}):p?(0,U.jsxs)(Ze,{onOpenChange:M,children:[(0,U.jsx)(Qe,{asChild:!0,children:(0,U.jsxs)(`div`,{className:F(`flex items-center gap-2 px-2 rounded-lg bg-interactive-selection/20 border border-border/20 cursor-pointer hover:bg-interactive-hover/30 h-6 w-fit`,a),children:[d?(0,U.jsx)(ue,{name:r||`default`,size:14}):null,(0,U.jsx)(`span`,{className:`typography-micro font-medium whitespace-nowrap`,children:r||f(`settings.commands.agentSelector.notSelected`)}),(0,U.jsx)(I,{name:`arrow-down-s`,className:`h-3 w-3 flex-shrink-0 text-muted-foreground`})]})}),(0,U.jsxs)($e,{className:`max-w-[300px]`,portalToBody:u,children:[(0,U.jsxs)($,{className:`typography-meta`,onSelect:()=>L(``),children:[(0,U.jsx)(ue,{name:`default`,size:14}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:f(`settings.commands.agentSelector.notSelected`)})]}),w.map(e=>(0,U.jsxs)($,{className:`typography-meta`,onSelect:()=>L(e.name),children:[(0,U.jsx)(ue,{name:e.name,size:14}),(0,U.jsx)(`span`,{className:`font-medium`,children:e.name})]},e.name))]})]}):(0,U.jsxs)(`div`,{className:F(`flex items-center gap-2 px-2 rounded-lg bg-interactive-selection/20 border border-border/20 h-6 w-fit opacity-60`,a),children:[(0,U.jsx)(I,{name:`loader-4`,className:`h-3 w-3 animate-spin text-muted-foreground flex-shrink-0`}),(0,U.jsx)(`span`,{className:`typography-micro font-medium whitespace-nowrap text-muted-foreground`,children:f(m?`common.unavailable`:`common.loading`)})]}),t[23]=r,t[24]=w,t[25]=a,t[26]=u,t[27]=L,t[28]=M,t[29]=D,t[30]=p,t[31]=m,t[32]=j,t[33]=d,t[34]=f,t[35]=B):B=t[35];let fe;t[36]===z?fe=t[37]:(fe=z(),t[36]=z,t[37]=fe);let pe;return t[38]!==B||t[39]!==fe?(pe=(0,U.jsxs)(U.Fragment,{children:[B,fe]}),t[38]=B,t[39]=fe,t[40]=pe):pe=t[40],pe};function ut(e){return e.agents}function dt(e){return e.loadAgents}function ft(e){return e.loadAgents}function pt(e){return e.isMobile}function mt(e){e&&N.getState().refreshCatalogsOnPickerOpen({source:`agentSelector:desktopMenu`})}var ht=8,gt=e=>typeof e!=`number`||Number.isNaN(e)?``:new Intl.NumberFormat(ie(),{notation:`compact`,compactDisplay:`short`,maximumFractionDigits:1}).format(e),_t=(e,t,n)=>{let r=e.find(e=>e.id===t)?.models?.find(e=>e.id===n);return r?.variants?Object.keys(r.variants):[]},vt=e=>{let t=(0,W.c)(160),{open:n,onClose:r,selectedProviderID:i,selectedModelID:a,resolveSelectedVariant:o,onSelect:s,providers:c,favoriteModels:l,recentModels:u,hiddenModels:d,allowedProviderIds:f,allowedModelIdsByProvider:p,providerOrder:m,variantSelectionEnabled:h,isFavorite:g,onToggleFavorite:_,getMetadata:v,view:y,onViewChange:b}=e,x;t[0]===d?x=t[1]:(x=d===void 0?[]:d,t[0]=d,t[1]=x);let S=x,C=h===void 0||h,{t:w}=re(),T=H.useId(),[E,D]=H.useState(``),O;t[2]===i?O=t[3]:(O=()=>new Set(i?[i]:[]),t[2]=i,t[3]=O);let[k,A]=H.useState(O),[j,M]=H.useState(null),[ee,te]=H.useState(`model`),[ne,ie]=H.useState(null),ae=H.useRef(!1),oe=y??ee,se,ce;t[4]!==n||t[5]!==i?(se=()=>{n&&!ae.current&&A(new Set(i?[i]:[])),n||(D(``),M(null),te(`model`),ie(null)),ae.current=n},ce=[n,i],t[4]=n,t[5]=i,t[6]=se,t[7]=ce):(se=t[6],ce=t[7]),H.useEffect(se,ce);let N;t[8]===b?N=t[9]:(N=e=>{te(e),b?.(e)},t[8]=b,t[9]=N);let P=N,ue;t[10]===f?ue=t[11]:(ue=f&&f.length>0?new Set(f):null,t[10]=f,t[11]=ue);let R=ue,B;t[12]===p?B=t[13]:(B=p?new Map(Object.entries(p).map(yt)):null,t[12]=p,t[13]=B);let fe=B,ve;t[14]===S?ve=t[15]:(ve=new Set(S.map(bt)),t[14]=S,t[15]=ve);let ye=ve,be;t[16]===c?be=t[17]:(be=new Map(c.map(xt)),t[16]=c,t[17]=be);let xe=be,Se;bb0:{if(!m?.length){Se=c;break bb0}let e;t[18]===m?e=t[19]:(e=new Map(m.map(St)),t[18]=m,t[19]=e);let n=e,r;if(t[20]!==c||t[21]!==n){let e;t[23]===n?e=t[24]:(e=(e,t)=>{let r=n.get(e.id),i=n.get(t.id);return r===void 0&&i===void 0?0:r===void 0?1:i===void 0?-1:r-i},t[23]=n,t[24]=e),r=[...c].sort(e),t[20]=c,t[21]=n,t[22]=r}else r=t[22];Se=r}let Ce=Se,we;t[25]!==fe||t[26]!==R||t[27]!==ye?(we=(e,t)=>R&&!R.has(e)||fe&&fe.get(e)?.has(t)!==!0?!1:!ye.has(`${e}:${t}`),t[25]=fe,t[26]=R,t[27]=ye,t[28]=we):we=t[28];let G=we,Te;t[29]!==xe||t[30]!==E?(Te=e=>{let t=E.trim();if(!t)return!0;let n=xe.get(e.providerID)?.name||e.providerID,r=le(e.model,e.modelID,{maxLength:40});return ge(r,t)||ge(e.modelID,t)||ge(n,t)},t[29]=xe,t[30]=E,t[31]=Te):Te=t[31];let K=Te,Ee;if(t[32]!==l||t[33]!==G||t[34]!==K){let e;t[36]!==G||t[37]!==K?(e=e=>G(e.providerID,e.modelID)&&K(e),t[36]=G,t[37]=K,t[38]=e):e=t[38],Ee=l.filter(e),t[32]=l,t[33]=G,t[34]=K,t[35]=Ee}else Ee=t[35];let De=Ee,Oe;if(t[39]!==G||t[40]!==K||t[41]!==u){let e;t[43]!==G||t[44]!==K?(e=e=>G(e.providerID,e.modelID)&&K(e),t[43]=G,t[44]=K,t[45]=e):e=t[45],Oe=u.filter(e),t[39]=G,t[40]=K,t[41]=u,t[42]=Oe}else Oe=t[42];let q=Oe,ke;if(t[46]!==R||t[47]!==G||t[48]!==Ce||t[49]!==E){let e;t[51]===R?e=t[52]:(e=e=>!R||R.has(e.id),t[51]=R,t[52]=e);let n;t[53]!==G||t[54]!==E?(n=e=>{let t=E.trim().length>0&&(ge(e.name||e.id,E.trim())||ge(e.id,E.trim()));return{provider:e,models:(e.models??[]).filter(n=>{let r=typeof n.id==`string`?n.id:``;return!r||!G(e.id,r)?!1:t||!E.trim()?!0:ge(le(n,r,{maxLength:40}),E.trim())||ge(r,E.trim())})}},t[53]=G,t[54]=E,t[55]=n):n=t[55],ke=Ce.filter(e).map(n).filter(Ct),t[46]=R,t[47]=G,t[48]=Ce,t[49]=E,t[50]=ke}else ke=t[50];let Ae=ke,je;t[56]===w?je=t[57]:(je=e=>{if(!e?.trim())return w(`chat.modelControls.default`);let t=e.trim();return/^\d+(\.\d+)?$/.test(t)?t:t.charAt(0).toUpperCase()+t.slice(1)},t[56]=w,t[57]=je);let J=je,Me;t[58]===w?Me=t[59]:(Me=e=>{let t=[];e?.tool_call&&t.push({key:`tool_call`,icon:`tools`,label:w(`chat.modelControls.capability.toolCalling`)}),e?.reasoning&&t.push({key:`reasoning`,icon:`brain-ai-3`,label:w(`chat.modelControls.capability.reasoning`)});let n={text:{icon:`text`,label:w(`chat.modelControls.modality.text`)},image:{icon:`file-image`,label:w(`chat.modelControls.modality.image`)},video:{icon:`file-video`,label:w(`chat.modelControls.modality.video`)},audio:{icon:`file-music`,label:w(`chat.modelControls.modality.audio`)},pdf:{icon:`file-pdf`,label:w(`chat.modelControls.modality.pdf`)}};for(let r of[...e?.modalities?.input??[],...e?.modalities?.output??[]]){let e=r.trim().toLowerCase(),i=n[e];i&&!t.some(t=>t.key===e)&&t.push({key:e,...i})}return t},t[58]=w,t[59]=Me);let Y=Me,Ne;t[60]===P?Ne=t[61]:(Ne=(e,t,n)=>{ie(n===void 0?{providerID:e,modelID:t}:{providerID:e,modelID:t,variant:n}),P(`variant`)},t[60]=P,t[61]=Ne);let Pe=Ne,X;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(X={onPointerDown:pe,onClickCapture:wt},t[62]=X):X=t[62];let Z=X,Fe;t[63]!==j||t[64]!==J||t[65]!==v||t[66]!==Y||t[67]!==g||t[68]!==s||t[69]!==_||t[70]!==Pe||t[71]!==xe||t[72]!==c||t[73]!==o||t[74]!==a||t[75]!==i||t[76]!==w||t[77]!==C?(Fe=(e,t)=>{let n=t===void 0?{}:t,{model:r,providerID:l,modelID:u}=e,d=`${l}:${u}`,f=l===i&&u===a,p=me(l,r,v?.(l,u)),m=C?_t(c,l,u):[],h=o(l,u),y=n.preferRememberedVariant&&e.variant!==void 0&&m.includes(e.variant)?e.variant:void 0,b=y===void 0?h:y,x=f||y===void 0?h:y,S=[void 0,...m].slice(0,ht),T=j===d,E=Y(p),D=p?.limit?.context?`${gt(p.limit.context)} ctx`:null;return(0,U.jsxs)(`div`,{className:F(`border-b border-border/30 last:border-b-0`,f&&`bg-interactive-selection/15 text-interactive-selection-foreground`),children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,U.jsx)(`button`,{type:`button`,...Z,onClick:()=>s(l,u,b),className:`flex min-w-0 flex-1 items-start gap-2 rounded-lg text-left focus:outline-none focus-visible:ring-1 focus-visible:ring-primary`,children:(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[n.showProvider?(0,U.jsx)(`span`,{className:`truncate text-[10px] leading-none text-muted-foreground/60`,children:xe.get(l)?.name||l}):null,(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,U.jsx)(he,{modelId:u,providerId:l,className:`size-3.5 flex-shrink-0`}),(0,U.jsx)(`span`,{className:`truncate typography-meta font-medium text-foreground`,children:le(r,u,{maxLength:40})}),f?(0,U.jsx)(I,{name:`check`,className:`size-4 flex-shrink-0 text-primary`}):null]}),D||E.length>0?(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden typography-micro text-muted-foreground`,children:[D?(0,U.jsx)(`span`,{className:`flex-shrink-0 whitespace-nowrap`,children:D}):null,D&&E.length>0?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px flex-shrink-0 bg-border/50`}):null,(0,U.jsx)(`div`,{className:`flex min-w-0 items-center gap-1 overflow-hidden whitespace-nowrap pl-0.5`,children:E.map(e=>{let{key:t,icon:n,label:r}=e;return(0,U.jsx)(`span`,{className:`flex size-4 flex-shrink-0 items-center justify-center text-muted-foreground`,title:r,"aria-label":r,children:(0,U.jsx)(I,{name:n,className:`size-3`})},`${d}-${t}`)})})]}):null]})}),m.length>0?(0,U.jsxs)(`button`,{type:`button`,...Z,onClick:()=>M(e=>e===d?null:d),className:`flex flex-shrink-0 items-center gap-0.5 typography-micro font-medium text-muted-foreground hover:text-foreground`,"aria-expanded":T,"aria-label":w(T?`chat.modelControls.hideThinkingModes`:`chat.modelControls.showThinkingModes`),children:[(0,U.jsx)(`span`,{className:`whitespace-nowrap`,children:J(x)}),(0,U.jsx)(I,{name:T?`arrow-down-s`:`arrow-right-s`,className:`size-3.5`})]}):null,(0,U.jsx)(`button`,{type:`button`,...Z,onClick:e=>{e.preventDefault(),e.stopPropagation(),_(l,u)},className:F(`model-favorite-button flex size-5 flex-shrink-0 items-center justify-center hover:text-primary/80`,g(l,u)?`text-primary`:`text-muted-foreground`),"aria-label":g(l,u)?w(`chat.modelControls.unfavoriteAria`):w(`chat.modelControls.favoriteAria`),title:g(l,u)?w(`chat.modelControls.removeFromFavorites`):w(`chat.modelControls.addToFavorites`),children:(0,U.jsx)(I,{name:g(l,u)?`star-fill`:`star`,className:`size-4`})})]}),T&&m.length>0?(0,U.jsx)(`div`,{className:`border-t border-border/30 p-2`,children:(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[S.map(e=>{let t=e===x||!e&&!x;return(0,U.jsx)(`button`,{type:`button`,...Z,onClick:()=>s(l,u,e),className:F(`inline-flex items-center rounded-full border px-2.5 py-1 typography-meta font-medium`,t?`border-primary/30 bg-primary/10 text-foreground`:`border-border/40 text-muted-foreground hover:bg-interactive-hover/50`),"aria-pressed":t,children:J(e)},`${d}-${e??`default`}`)}),S.length<m.length+1?(0,U.jsx)(`button`,{type:`button`,...Z,onClick:()=>Pe(l,u,x),className:`inline-flex items-center rounded-full border border-border/40 px-2.5 py-1 typography-meta font-medium text-muted-foreground hover:bg-interactive-hover/50`,"aria-label":w(`chat.modelControls.moreThinkingModes`),children:w(`inlineComment.actions.showMore`)}):null]})}):null]},`mobile-model-${d}`)},t[63]=j,t[64]=J,t[65]=v,t[66]=Y,t[67]=g,t[68]=s,t[69]=_,t[70]=Pe,t[71]=xe,t[72]=c,t[73]=o,t[74]=a,t[75]=i,t[76]=w,t[77]=C,t[78]=Fe):Fe=t[78];let Ie=Fe,Le,Re,ze,Be,Ve,He,Q,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,$;if(t[79]!==oe||t[80]!==k||t[81]!==De||t[82]!==Ae||t[83]!==q||t[84]!==J||t[85]!==T||t[86]!==r||t[87]!==s||t[88]!==n||t[89]!==c||t[90]!==E||t[91]!==Ie||t[92]!==o||t[93]!==a||t[94]!==i||t[95]!==P||t[96]!==w||t[97]!==ne){let e=ne??(oe===`variant`&&i&&a?{providerID:i,modelID:a}:null),l=e?_t(c,e.providerID,e.modelID):[],u;bb1:{if(!e){u=void 0;break bb1}if(e.providerID===i&&e.modelID===a){u=o(e.providerID,e.modelID);break bb1}u=(e.variant!==void 0&&l.includes(e.variant)?e.variant:void 0)??o(e.providerID,e.modelID)}let d=u,f=De.length>0||q.length>0||Ae.length>0,p=oe===`variant`&&!!e;Re=V,qe=`mobile-model-picker-sheet-${T}`,Je=n,t[117]===r?Ye=t[118]:(Ye=e=>{e||r()},t[117]=r,t[118]=Ye),t[119]!==p||t[120]!==P||t[121]!==w?(Xe=p?(0,U.jsx)(L,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>P(`model`),"aria-label":w(`onboarding.common.actions.back`),children:(0,U.jsx)(I,{name:`arrow-left`,className:`size-5`})}):void 0,t[119]=p,t[120]=P,t[121]=w,t[122]=Xe):Xe=t[122],t[123]!==p||t[124]!==w?(Ze=w(p?`chat.modelControls.thinking`:`chat.modelControls.selectModel`),t[123]=p,t[124]=w,t[125]=Ze):Ze=t[125],t[126]===w?Qe=t[127]:(Qe=w(`mobile.surface.closeAria`),t[126]=w,t[127]=Qe),t[128]===w?$e=t[129]:($e=w(`mobile.sessions.sheet.resizeAria`),t[128]=w,t[129]=$e),$=`px-2`,Ge=`flex min-h-0 flex-1 flex-col gap-2`,t[130]!==p||t[131]!==E||t[132]!==w?(Ke=p?null:(0,U.jsxs)(`div`,{className:`relative z-10 shrink-0`,"data-mobile-sheet-no-dismiss":``,"data-mobile-sheet-search":``,children:[(0,U.jsx)(I,{name:`search`,className:`pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,U.jsx)(_e,{type:`text`,value:E,onChange:e=>{D(e.target.value),M(null)},onPointerUp:Tt,placeholder:w(`chat.modelControls.searchProvidersOrModels`),className:`h-9 rounded-xl border-border/40 bg-[var(--surface-elevated)] pl-7 typography-meta`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,enterKeyHint:`search`,inputMode:`search`}),E?(0,U.jsx)(`button`,{type:`button`,onClick:()=>{D(``),M(null)},className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,"aria-label":w(`chat.modelControls.clearSearch`),children:(0,U.jsx)(I,{name:`close-circle`,className:`size-4`})}):null]}),t[130]=p,t[131]=E,t[132]=w,t[133]=Ke):Ke=t[133],Le=de,Ve=!0,He=!0,Q=!0,Ue=`min-h-0 flex-1`,We=`overscroll-contain`,ze=`flex flex-col gap-2`,Be=p&&e?(0,U.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:[void 0,...l].map(t=>{let n=t===d||!t&&!d;return(0,U.jsxs)(`button`,{type:`button`,className:F(`flex w-full items-center justify-between gap-2 rounded-xl border px-2 py-1.5 text-left focus:outline-none focus-visible:ring-1 focus-visible:ring-primary`,n?`border-primary/30 bg-primary/10`:`border-border/40`),...Z,onClick:()=>s(e.providerID,e.modelID,t),children:[(0,U.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:J(t)}),n?(0,U.jsx)(I,{name:`check`,className:`size-4 flex-shrink-0 text-primary`}):null]},t??`default`)})}):(0,U.jsxs)(U.Fragment,{children:[f?null:(0,U.jsx)(`div`,{className:`px-3 py-8 text-center typography-meta text-muted-foreground`,children:w(`chat.modelControls.noProvidersOrModelsFound`)}),De.length>0?(0,U.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,U.jsxs)(`div`,{className:`px-2 py-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,U.jsx)(I,{name:`star-fill`,className:`mr-1.5 inline-block size-3 text-primary`}),w(`chat.modelControls.favorites`)]}),(0,U.jsx)(`div`,{className:`flex flex-col border-t border-border/30`,children:De.map(e=>Ie(e,{showProvider:!0,preferRememberedVariant:!0}))})]}):null,q.length>0?(0,U.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,U.jsxs)(`div`,{className:`px-2 py-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,U.jsx)(I,{name:`time`,className:`mr-1.5 inline-block size-3`}),w(`chat.modelControls.recent`)]}),(0,U.jsx)(`div`,{className:`flex flex-col border-t border-border/30`,children:q.map(e=>Ie(e,{showProvider:!0,preferRememberedVariant:!0}))})]}):null,Ae.map(e=>{let{provider:t,models:n}=e,r=k.has(t.id)||E.trim().length>0;return(0,U.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,U.jsxs)(`button`,{type:`button`,...Z,onClick:()=>{E.trim()||A(e=>{let n=new Set(e);return n.has(t.id)?n.delete(t.id):n.add(t.id),n})},className:`flex w-full items-center justify-between gap-1.5 px-2 py-1.5 text-left`,"aria-expanded":r,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(z,{providerId:t.id,className:`size-3.5`}),(0,U.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:t.name||t.id}),t.id===i?(0,U.jsx)(`span`,{className:`typography-micro text-primary/80`,children:w(`chat.modelControls.current`)}):null]}),(0,U.jsx)(I,{name:r?`arrow-down-s`:`arrow-right-s`,className:`size-3 text-muted-foreground`})]}),r?(0,U.jsx)(`div`,{className:`flex flex-col border-t border-border/30`,children:n.map(e=>Ie({model:e,providerID:t.id,modelID:e.id}))}):null]},t.id)})]}),t[79]=oe,t[80]=k,t[81]=De,t[82]=Ae,t[83]=q,t[84]=J,t[85]=T,t[86]=r,t[87]=s,t[88]=n,t[89]=c,t[90]=E,t[91]=Ie,t[92]=o,t[93]=a,t[94]=i,t[95]=P,t[96]=w,t[97]=ne,t[98]=Le,t[99]=Re,t[100]=ze,t[101]=Be,t[102]=Ve,t[103]=He,t[104]=Q,t[105]=Ue,t[106]=We,t[107]=Ge,t[108]=Ke,t[109]=qe,t[110]=Je,t[111]=Ye,t[112]=Xe,t[113]=Ze,t[114]=Qe,t[115]=$e,t[116]=$}else Le=t[98],Re=t[99],ze=t[100],Be=t[101],Ve=t[102],He=t[103],Q=t[104],Ue=t[105],We=t[106],Ge=t[107],Ke=t[108],qe=t[109],Je=t[110],Ye=t[111],Xe=t[112],Ze=t[113],Qe=t[114],$e=t[115],$=t[116];let et;t[134]!==ze||t[135]!==Be?(et=(0,U.jsx)(`div`,{className:ze,children:Be}),t[134]=ze,t[135]=Be,t[136]=et):et=t[136];let tt;t[137]!==Le||t[138]!==Ve||t[139]!==He||t[140]!==Q||t[141]!==Ue||t[142]!==We||t[143]!==et?(tt=(0,U.jsx)(Le,{useScrollShadow:Ve,disableHorizontal:He,preventOverscroll:Q,outerClassName:Ue,className:We,children:et}),t[137]=Le,t[138]=Ve,t[139]=He,t[140]=Q,t[141]=Ue,t[142]=We,t[143]=et,t[144]=tt):tt=t[144];let nt;t[145]!==Ge||t[146]!==Ke||t[147]!==tt?(nt=(0,U.jsxs)(`div`,{className:Ge,children:[Ke,tt]}),t[145]=Ge,t[146]=Ke,t[147]=tt,t[148]=nt):nt=t[148];let rt;return t[149]!==Re||t[150]!==qe||t[151]!==Je||t[152]!==Ye||t[153]!==Xe||t[154]!==Ze||t[155]!==Qe||t[156]!==$e||t[157]!==$||t[158]!==nt?(rt=(0,U.jsx)(Re,{id:qe,open:Je,onOpenChange:Ye,leading:Xe,ariaLabel:Ze,closeAriaLabel:Qe,resizeAriaLabel:$e,bodyClassName:$,children:nt}),t[149]=Re,t[150]=qe,t[151]=Je,t[152]=Ye,t[153]=Xe,t[154]=Ze,t[155]=Qe,t[156]=$e,t[157]=$,t[158]=nt,t[159]=rt):rt=t[159],rt};function yt(e){let[t,n]=e;return[t,new Set(n)]}function bt(e){return`${e.providerID}:${e.modelID}`}function xt(e){return[e.id,e]}function St(e,t){return[e,t]}function Ct(e){return e.models.length>0}function wt(e){B(e)||(e.preventDefault(),e.stopPropagation())}function Tt(e){e.currentTarget.focus({preventScroll:!0})}var Et=e=>{let t=(0,W.c)(217),{providerId:r,modelId:i,variant:a,onChange:o,className:s,allowedProviderIds:c,allowedModelIdsByProvider:l,placeholder:u,tooltipsEnabled:d,dropdownPortalToBody:f,showIcon:p,providers:m}=e,h=d===void 0||d,g=f!==void 0&&f,_=p===void 0||p,{t:v}=re(),{isReady:y,isUnavailable:b}=it(),x=N(Dt),S=m??x,C=N(Ot),w=n(kt),T=n(At),E=n(jt),D=n(Mt),O=n(Nt),k=n(Pt),A;t[0]!==i||t[1]!==r?(A={currentProviderID:r,currentModelID:i},t[0]=i,t[1]=r,t[2]=A):A=t[2];let{favoriteModelsList:j,recentModelsList:M}=fe(A),{isMobile:ee}=ye(),te=w||ee,[ie,ae]=H.useState(!1),[oe,se]=H.useState(!1),ce;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(ce=()=>{ae(!0),N.getState().refreshCatalogsOnPickerOpen({source:`modelSelector:mobilePanel`})},t[3]=ce):ce=t[3];let le=ne(ce),P;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{se(e),e&&N.getState().refreshCatalogsOnPickerOpen({source:`modelSelector:desktopMenu`})},t[4]=P):P=t[4];let ue=ne(P),[L,de]=H.useState(``),[z,B]=H.useState(null),V=a!==void 0,pe;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(pe=()=>{ae(!1),se(!1),de(``),B(null)},t[5]=pe):pe=t[5];let me=pe,ge;t[6]===S?ge=t[7]:(ge=e=>{let t=S.find(t=>t.id===e.providerID)?.models?.find(t=>t.id===e.modelID);return t?.variants?Object.keys(t.variants):[]},t[6]=S,t[7]=ge);let _e=ge,ve;t[8]!==O||t[9]!==_e||t[10]!==i||t[11]!==o||t[12]!==r||t[13]!==a||t[14]!==V?(ve=e=>{let t=_e(e),n=e.providerID===r&&e.modelID===i,s=e.variant!==void 0&&t.includes(e.variant)?e.variant:void 0,c=n&&a&&t.includes(a)?a:s??``;o(e.providerID,e.modelID,V?c:void 0),O(e.providerID,e.modelID,V&&c||void 0),me()},t[8]=O,t[9]=_e,t[10]=i,t[11]=o,t[12]=r,t[13]=a,t[14]=V,t[15]=ve):ve=t[15];let be=ve,xe;t[16]!==o||t[17]!==V?(xe=()=>{o(``,``,V?``:void 0),me()},t[16]=o,t[17]=V,t[18]=xe):xe=t[18];let Se=xe,Ce;t[19]!==O||t[20]!==o||t[21]!==z?(Ce=e=>{z&&(o(z.providerID,z.modelID,e),O(z.providerID,z.modelID,e||void 0),me())},t[19]=O,t[20]=o,t[21]=z,t[22]=Ce):Ce=t[22];let we=Ce,G;t[23]===v?G=t[24]:(G=v(`settings.agents.modelSelector.searchPlaceholder`),t[23]=v,t[24]=G);let Te;t[25]===v?Te=t[26]:(Te=v(`settings.agents.modelSelector.state.noModelsFound`),t[25]=v,t[26]=Te);let K;t[27]===v?K=t[28]:(K=v(`settings.agents.modelSelector.section.favorites`),t[27]=v,t[28]=K);let Ee;t[29]===v?Ee=t[30]:(Ee=v(`settings.agents.modelSelector.section.recent`),t[29]=v,t[30]=Ee);let De;t[31]===v?De=t[32]:(De=v(`settings.agents.modelSelector.keyboardHints`),t[31]=v,t[32]=De);let Oe;t[33]!==u||t[34]!==v?(Oe=u||v(`settings.agents.modelSelector.notSelected`),t[33]=u,t[34]=v,t[35]=Oe):Oe=t[35];let q;t[36]===v?q=t[37]:(q=v(`settings.agents.modelSelector.actions.favorite`),t[36]=v,t[37]=q);let ke;t[38]===v?ke=t[39]:(ke=v(`settings.agents.modelSelector.actions.unfavorite`),t[38]=v,t[39]=ke);let Ae;t[40]===v?Ae=t[41]:(Ae=v(`chat.modelControls.provider`),t[40]=v,t[41]=Ae);let je;t[42]===v?je=t[43]:(je=v(`chat.modelControls.capabilities`),t[42]=v,t[43]=je);let J;t[44]===v?J=t[45]:(J=v(`chat.modelControls.capability.toolCalling`),t[44]=v,t[45]=J);let Me;t[46]===v?Me=t[47]:(Me=v(`chat.modelControls.capability.reasoning`),t[46]=v,t[47]=Me);let Y;t[48]===v?Y=t[49]:(Y=v(`chat.modelControls.modality.image`),t[48]=v,t[49]=Y);let Ne;t[50]===v?Ne=t[51]:(Ne=v(`chat.modelControls.modality.video`),t[50]=v,t[51]=Ne);let Pe;t[52]===v?Pe=t[53]:(Pe=v(`chat.modelControls.modality.audio`),t[52]=v,t[53]=Pe);let X;t[54]===v?X=t[55]:(X=v(`chat.modelControls.costPerMillion`),t[54]=v,t[55]=X);let Z;t[56]===v?Z=t[57]:(Z=v(`chat.modelControls.costInput`),t[56]=v,t[57]=Z);let Fe;t[58]===v?Fe=t[59]:(Fe=v(`chat.modelControls.costOutput`),t[58]=v,t[59]=Fe);let Ie;t[60]!==G||t[61]!==Te||t[62]!==K||t[63]!==Ee||t[64]!==De||t[65]!==Oe||t[66]!==q||t[67]!==ke||t[68]!==Ae||t[69]!==je||t[70]!==J||t[71]!==Me||t[72]!==Y||t[73]!==Ne||t[74]!==Pe||t[75]!==X||t[76]!==Z||t[77]!==Fe?(Ie={searchPlaceholder:G,noResults:Te,favorites:K,recent:Ee,keyboardHint:De,notSelected:Oe,favorite:q,unfavorite:ke,provider:Ae,capabilities:je,capabilityToolCalling:J,capabilityReasoning:Me,modalityImage:Y,modalityVideo:Ne,modalityAudio:Pe,costPerMillion:X,costInput:Z,costOutput:Fe},t[60]=G,t[61]=Te,t[62]=K,t[63]=Ee,t[64]=De,t[65]=Oe,t[66]=q,t[67]=ke,t[68]=Ae,t[69]=je,t[70]=J,t[71]=Me,t[72]=Y,t[73]=Ne,t[74]=Pe,t[75]=X,t[76]=Z,t[77]=Fe,t[78]=Ie):Ie=t[78];let Le=Ie,Re;t[79]!==i||t[80]!==r?(Re=r&&i?{providerID:r,modelID:i}:null,t[79]=i,t[80]=r,t[81]=Re):Re=t[81];let ze=Re,Be;t[82]!==i||t[83]!==u||t[84]!==r||t[85]!==v?(Be=r&&i?`${r}/${i}`:u||v(`settings.agents.modelSelector.notSelected`),t[82]=i,t[83]=u,t[84]=r,t[85]=v,t[86]=Be):Be=t[86];let Ve=Be,He;t[87]!==v||t[88]!==a||t[89]!==V?(He=V?a||v(`chat.modelControls.default`):null,t[87]=v,t[88]=a,t[89]=V,t[90]=He):He=t[90];let Q=He,Ue;t[91]!==i||t[92]!==r||t[93]!==a||t[94]!==V?(Ue=(e,t)=>{if(!(!V||e!==r||t!==i))return a||void 0},t[91]=i,t[92]=r,t[93]=a,t[94]=V,t[95]=Ue):Ue=t[95];let We=Ue,Ge;t[96]!==O||t[97]!==o||t[98]!==V?(Ge=(e,t,n)=>{o(e,t,V?n??``:void 0),O(e,t,V&&n||void 0),me()},t[96]=O,t[97]=o,t[98]=V,t[99]=Ge):Ge=t[99];let Ke=Ge,qe;t[100]!==_e||t[101]!==v||t[102]!==a||t[103]!==V?(qe=(e,t)=>{let n=_e(e);if(!V||n.length===0)return null;let r=e.variant!==void 0&&n.includes(e.variant)?e.variant:void 0,i=t.isSelected?a:r??``;return(0,U.jsxs)(`button`,{type:`button`,className:`flex min-h-9 shrink-0 items-center gap-0.5 rounded-md px-1.5 typography-micro font-medium text-muted-foreground hover:bg-interactive-hover hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),B(e)},"aria-label":v(`chat.modelControls.showThinkingModes`),children:[(0,U.jsx)(`span`,{className:`max-w-24 truncate`,children:i||v(`chat.modelControls.default`)}),(0,U.jsx)(I,{name:`arrow-right-s`,className:`size-3.5`})]})},t[100]=_e,t[101]=v,t[102]=a,t[103]=V,t[104]=qe):qe=t[104];let Je=qe,Ye=te?`max-h-none flex-1`:void 0,Xe=h&&(te?ie:oe),$;t[105]===D?$=t[106]:($=e=>D(e.providerID,e.modelID),t[105]=D,t[106]=$);let et;t[107]!==i||t[108]!==r||t[109]!==E||t[110]!==a?(et=e=>E(e.providerID,e.modelID,e.providerID===r&&e.modelID===i?a||void 0:e.variant),t[107]=i,t[108]=r,t[109]=E,t[110]=a,t[111]=et):et=t[111];let tt;t[112]!==l||t[113]!==c||t[114]!==j||t[115]!==C||t[116]!==be||t[117]!==Se||t[118]!==T||t[119]!==Le||t[120]!==k||t[121]!==S||t[122]!==M||t[123]!==Je||t[124]!==L||t[125]!==ze||t[126]!==Ye||t[127]!==Xe||t[128]!==$||t[129]!==et?(tt=(0,U.jsx)(R,{providers:S,providerOrder:k,favoriteModels:j,recentModels:M,getMetadata:C,searchQuery:L,onSearchQueryChange:de,onSelect:be,labels:Le,selectedModel:ze,hiddenModels:T,allowedProviderIds:c,allowedModelIdsByProvider:l,includeNotSelected:!0,onSelectNone:Se,onEscape:me,maxHeightClassName:Ye,tooltipsEnabled:Xe,isFavorite:$,onToggleFavorite:et,renderRowEnd:Je}),t[112]=l,t[113]=c,t[114]=j,t[115]=C,t[116]=be,t[117]=Se,t[118]=T,t[119]=Le,t[120]=k,t[121]=S,t[122]=M,t[123]=Je,t[124]=L,t[125]=ze,t[126]=Ye,t[127]=Xe,t[128]=$,t[129]=et,t[130]=tt):tt=t[130];let nt=tt,rt;t[131]!==_e||t[132]!==z?(rt=z?_e(z):[],t[131]=_e,t[132]=z,t[133]=rt):rt=t[133];let at=rt,ot;bb0:{if(!z){ot=``;break bb0}if(z.providerID===r&&z.modelID===i){ot=a||``;break bb0}ot=z.variant!==void 0&&at.includes(z.variant)?z.variant:``}let st=ot,ct;t[134]!==we||t[135]!==v||t[136]!==z||t[137]!==st||t[138]!==at?(ct=z?(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`flex min-h-11 items-center gap-2 border-b border-border/40 px-3 text-left typography-ui-label font-medium text-foreground hover:bg-interactive-hover`,onClick:()=>B(null),"aria-label":v(`header.actions.backAria`),children:[(0,U.jsx)(I,{name:`arrow-left`,className:`size-4`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:z.modelID})]}),(0,U.jsx)(`div`,{className:`space-y-1 p-2`,role:`listbox`,"aria-label":v(`chat.modelControls.thinking`),children:[``,...at].map(e=>{let t=st===e;return(0,U.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,className:F(`flex min-h-11 w-full items-center justify-between rounded-lg px-3 text-left typography-ui-label transition-colors`,t?`bg-interactive-selection text-interactive-selection-foreground`:`hover:bg-interactive-hover`),onClick:()=>we(e),children:[(0,U.jsx)(`span`,{className:`truncate`,children:e||v(`chat.modelControls.default`)}),t?(0,U.jsx)(I,{name:`check`,className:`size-4 shrink-0`}):null]},e||`__default`)})})]}):null,t[134]=we,t[135]=v,t[136]=z,t[137]=st,t[138]=at,t[139]=ct):ct=t[139];let lt=ct||nt;if(te){let e=y?le:void 0,n=!y,o=!y&&`opacity-60 cursor-not-allowed`,u;t[140]!==s||t[141]!==o?(u=F(`flex w-full items-center justify-between gap-2 rounded-lg border border-border/40 bg-[var(--surface-elevated)] px-2 py-1.5 text-left`,o,s),t[140]=s,t[141]=o,t[142]=u):u=t[142];let d;t[143]!==y||t[144]!==b||t[145]!==i||t[146]!==r||t[147]!==_||t[148]!==v?(d=y?_&&(r||i)?(0,U.jsx)(he,{modelId:i,providerId:r,className:`h-3.5 w-3.5 flex-shrink-0`}):_?(0,U.jsx)(I,{name:`pencil-ai`,className:`h-3 w-3 text-muted-foreground`}):null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,U.jsx)(`span`,{className:`typography-meta text-muted-foreground`,children:v(b?`common.unavailable`:`common.loading`)})]}),t[143]=y,t[144]=b,t[145]=i,t[146]=r,t[147]=_,t[148]=v,t[149]=d):d=t[149];let f;t[150]!==y||t[151]!==Ve?(f=y?(0,U.jsx)(`span`,{className:`typography-meta font-medium text-foreground truncate`,children:Ve}):null,t[150]=y,t[151]=Ve,t[152]=f):f=t[152];let p;t[153]!==y||t[154]!==Q?(p=y&&Q?(0,U.jsx)(`span`,{className:`shrink-0 typography-micro text-muted-foreground`,children:Q}):null,t[153]=y,t[154]=Q,t[155]=p):p=t[155];let m;t[156]!==d||t[157]!==f||t[158]!==p?(m=(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[d,f,p]}),t[156]=d,t[157]=f,t[158]=p,t[159]=m):m=t[159];let h;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,U.jsx)(I,{name:`arrow-down-s`,className:`h-3 w-3 flex-shrink-0 text-muted-foreground`}),t[160]=h):h=t[160];let g;t[161]!==e||t[162]!==n||t[163]!==u||t[164]!==m?(g=(0,U.jsxs)(`button`,{type:`button`,onClick:e,disabled:n,className:u,children:[m,h]}),t[161]=e,t[162]=n,t[163]=u,t[164]=m,t[165]=g):g=t[165];let x;t[166]!==j||t[167]!==i||t[168]!==r||t[169]!==M||t[170]!==E||t[171]!==a?(x=(e,t)=>E(e,t,e===r&&t===i?a||void 0:j.find(n=>n.providerID===e&&n.modelID===t)?.variant??M.find(n=>n.providerID===e&&n.modelID===t)?.variant),t[166]=j,t[167]=i,t[168]=r,t[169]=M,t[170]=E,t[171]=a,t[172]=x):x=t[172];let w;t[173]!==l||t[174]!==c||t[175]!==j||t[176]!==C||t[177]!==Ke||t[178]!==T||t[179]!==D||t[180]!==ie||t[181]!==i||t[182]!==r||t[183]!==k||t[184]!==S||t[185]!==M||t[186]!==We||t[187]!==x||t[188]!==V?(w=(0,U.jsx)(vt,{open:ie,onClose:me,selectedProviderID:r,selectedModelID:i,resolveSelectedVariant:We,onSelect:Ke,providers:S,favoriteModels:j,recentModels:M,getMetadata:C,hiddenModels:T,allowedProviderIds:c,allowedModelIdsByProvider:l,providerOrder:k,variantSelectionEnabled:V,isFavorite:D,onToggleFavorite:x}),t[173]=l,t[174]=c,t[175]=j,t[176]=C,t[177]=Ke,t[178]=T,t[179]=D,t[180]=ie,t[181]=i,t[182]=r,t[183]=k,t[184]=S,t[185]=M,t[186]=We,t[187]=x,t[188]=V,t[189]=w):w=t[189];let O;return t[190]!==g||t[191]!==w?(O=(0,U.jsxs)(U.Fragment,{children:[g,w]}),t[190]=g,t[191]=w,t[192]=O):O=t[192],O}let ut=y&&oe,dt=y?ue:void 0,ft=!y&&`opacity-60 cursor-not-allowed`,pt;t[193]!==s||t[194]!==ft?(pt=F(`border-input data-[placeholder]:text-muted-foreground flex min-w-0 items-center justify-between gap-2 rounded-lg border bg-transparent px-2 py-2 typography-ui-label whitespace-nowrap shadow-none outline-none hover:bg-interactive-hover data-[popup-open]:bg-interactive-active h-6 w-fit`,ft,s),t[193]=s,t[194]=ft,t[195]=pt):pt=t[195];let mt;t[196]!==y||t[197]!==b||t[198]!==i||t[199]!==r||t[200]!==_||t[201]!==v||t[202]!==Ve||t[203]!==Q?(mt=y?(0,U.jsxs)(U.Fragment,{children:[_?r||i?(0,U.jsx)(he,{modelId:i,providerId:r,className:`h-3.5 w-3.5 flex-shrink-0`}):(0,U.jsx)(I,{name:`pencil-ai`,className:`h-3.5 w-3.5 flex-shrink-0 text-muted-foreground`}):null,(0,U.jsx)(`span`,{className:`typography-ui-label min-w-0 flex-1 truncate text-left font-normal text-foreground`,children:Ve}),Q?(0,U.jsx)(`span`,{className:`shrink-0 typography-micro text-muted-foreground`,children:Q}):null]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground flex-shrink-0`}),(0,U.jsx)(`span`,{className:`typography-ui-label font-normal whitespace-nowrap text-muted-foreground`,children:v(b?`common.unavailable`:`common.loading`)})]}),t[196]=y,t[197]=b,t[198]=i,t[199]=r,t[200]=_,t[201]=v,t[202]=Ve,t[203]=Q,t[204]=mt):mt=t[204];let ht;t[205]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,U.jsx)(I,{name:`arrow-down-s`,className:`h-4 w-4 flex-shrink-0 text-muted-foreground/50`}),t[205]=ht):ht=t[205];let gt;t[206]!==pt||t[207]!==mt?(gt=(0,U.jsx)(Qe,{asChild:!0,children:(0,U.jsxs)(`div`,{className:pt,children:[mt,ht]})}),t[206]=pt,t[207]=mt,t[208]=gt):gt=t[208];let _t;t[209]!==g||t[210]!==lt?(_t=(0,U.jsx)($e,{className:`w-[min(380px,calc(100vw-2rem))] p-0 flex flex-col`,align:`start`,portalToBody:g,children:lt}),t[209]=g,t[210]=lt,t[211]=_t):_t=t[211];let yt;return t[212]!==ut||t[213]!==dt||t[214]!==gt||t[215]!==_t?(yt=(0,U.jsxs)(Ze,{open:ut,onOpenChange:dt,children:[gt,_t]}),t[212]=ut,t[213]=dt,t[214]=gt,t[215]=_t,t[216]=yt):yt=t[216],yt};function Dt(e){return e.providers}function Ot(e){return e.getModelMetadata}function kt(e){return e.isMobile}function At(e){return e.hiddenModels}function jt(e){return e.toggleFavoriteModel}function Mt(e){return e.isFavoriteModel}function Nt(e){return e.addRecentModel}function Pt(e){return e.providerOrder}var Ft=e=>e??s()?.github,It=(e=t())=>i.github.auth(e),Lt=async(e,t)=>{if(e)return e.authStatus();let n=await a(`/api/github/auth/status`,{method:`GET`,headers:{Accept:`application/json`},signal:t}),r=await n.json().catch(()=>null);if(!n.ok||!r)throw Error(r?.error||n.statusText||`Failed to load GitHub status`);return r},Rt=(e,n=t())=>{let r=Ft(e);return{queryKey:It(n),queryFn:async({signal:e})=>Lt(r,e),retry:2}},zt=e=>!!e&&typeof e==`object`&&`authStatus`in e,Bt=e=>{let t=(0,W.c)(5),n=zt(e)?e:void 0,r=zt(e)?void 0:e?.enabled,i;t[0]===n?i=t[1]:(i=Rt(n),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a={...i,enabled:r},t[2]=r,t[3]=i,t[4]=a):a=t[4],x(a)},Vt=(e=o,n=t())=>e.getQueryData(It(n))??null,Ht=async(e,n,r)=>t()===r?e.fetchQuery({...Rt(n,r),staleTime:0}):e.getQueryData(It(r))??null,Ut=(e=o,n,r=t())=>{e.setQueryData(It(r),n)},Wt=T.define(te),Gt=j.data.of({commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}}});function Kt(e){let t=e.trim().toLowerCase();switch(t){case`bash`:case`sh`:case`zsh`:case`shell`:case`shellsession`:case`console`:return Wt;case`json`:case`jsonc`:case`json5`:return A().language;case`js`:case`javascript`:return O().language;case`jsx`:return O({jsx:!0}).language;case`ts`:case`typescript`:return O({typescript:!0}).language;case`tsx`:return O({typescript:!0,jsx:!0}).language;case`html`:return k().language;case`css`:return D().language;case`py`:case`python`:return ee().language;case`md`:case`markdown`:case`mdown`:case`mkd`:return M().language;case`heex`:case`eex`:case`leex`:return k().language;default:return E.matchLanguageName(be,t,!0)}}var qt=e=>e.split(`/`).pop()?.toLowerCase()??``,Jt=e=>{let t=qt(e);return t?E.matchFilename(be,t):null},Yt=()=>S(w.define([{tag:[C.heading1,C.heading2,C.heading3,C.heading4,C.heading5,C.heading6],fontWeight:`600`},{tag:C.strong,fontWeight:`600`},{tag:C.emphasis,fontStyle:`italic`},{tag:C.strikethrough,textDecoration:`line-through`},{tag:[C.link,C.url],color:`var(--markdown-link, currentColor)`,textDecoration:`underline`},{tag:C.monospace,color:`var(--markdown-inline-code, currentColor)`,backgroundColor:`var(--markdown-inline-code-bg, transparent)`},{tag:C.quote,color:`var(--markdown-blockquote, currentColor)`,fontStyle:`italic`},{tag:C.list,color:`color-mix(in srgb, var(--muted-foreground) 40%, var(--foreground) 60%)`},{tag:C.heading,color:`var(--markdown-heading1, currentColor)`}]));function Xt(e){let t=e.toLowerCase();switch(qt(t)){case`makefile`:case`gnumakefile`:return Wt}let n=t.lastIndexOf(`.`),r=n>=0?t.slice(n+1):``;switch(r){case`ts`:case`tsx`:case`mts`:case`cts`:return O({typescript:!0,jsx:r===`tsx`});case`js`:case`jsx`:case`mjs`:case`cjs`:return O({typescript:!1,jsx:r===`jsx`});case`jsonc`:case`json5`:return[A(),Gt];case`json`:case`jsonl`:case`ndjson`:case`geojson`:return A();case`css`:case`scss`:case`sass`:case`less`:return D();case`html`:case`htm`:case`xml`:case`drawio`:case`dio`:return k();case`md`:case`mdx`:case`markdown`:case`mdown`:case`mkd`:return[M({codeLanguages:Kt}),Yt()];case`sh`:case`bash`:case`zsh`:case`fish`:case`env`:return Wt;case`py`:case`pyw`:case`pyi`:return ee();default:return null}}async function Zt(e){let t=Jt(e);if(!t)return null;if(t.support)return t.support;try{return await t.load()}catch{return null}}var Qt=60,$t=400;function en(e){let t=e.replace(/\s+/g,` `).trim();if(!t)return[];let n=t.match(/[^.!?…]+[.!?…]+["')\]]*\s*|[^.!?…]+$/g)??[t],r=[],i=``;for(let e of n)for(let t=0;t<e.length;t+=$t){let n=e.slice(t,t+$t);i&&i.length+n.length>$t&&(r.push(i.trim()),i=``),i+=n,i.length>=Qt&&/[.!?…]["')\]]*\s*$/.test(i)&&(r.push(i.trim()),i=``)}if(i.trim()&&r.push(i.trim()),r.length>0&&r[0].length>120){let e=r[0],t=/[,;:]\s/g,n=-1,i;for(;(i=t.exec(e))!==null;){let e=i.index+1;if(!(e<40)){if(e>160)break;n=e;break}}if(n>0){let t=e.slice(0,n).trim(),i=e.slice(n).trim();r.splice(0,1,t,i)}}return r}var tn=null;function nn(){return tn||=new(window.AudioContext||window.webkitAudioContext),tn}function rn(){let[e,t]=(0,H.useState)(!1),[n,r]=(0,H.useState)(null),i=(0,H.useRef)(null),o=(0,H.useRef)(null),s=(0,H.useCallback)(async()=>{try{let e=nn();e.state===`suspended`&&await e.resume();let t=e.createBuffer(1,1,22050),n=e.createBufferSource();n.buffer=t,n.connect(e.destination),n.start(0)}catch{}},[]),c=(0,H.useCallback)(()=>{let e=o.current;if(e&&(e.cancelled=!0,e.abort.abort(),o.current=null),i.current){try{i.current.onended=null,i.current.stop()}catch{}i.current=null}t(!1)},[]),l=(0,H.useCallback)(async(e,n)=>{c();let s=en(e);if(s.length===0){r(`No text to speak`),n?.onError?.(`No text to speak`);return}r(null);let l={cancelled:!1,abort:new AbortController};o.current=l;let u=async e=>{let t=await a(`/api/dictation/tts/speak`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({text:e,...typeof n?.speakerId==`number`?{speakerId:n.speakerId}:{},...typeof n?.speed==`number`?{speed:n.speed}:{}}),signal:l.abort.signal});if(!t.ok){let e=await t.json().catch(()=>({error:`Unknown error`}));throw Error(e.error||`HTTP ${t.status}`)}return(await t.blob()).arrayBuffer()},d=async e=>{let t=nn();t.state===`suspended`&&await t.resume();let n=await t.decodeAudioData(e);l.cancelled||await new Promise(e=>{let r=t.createBufferSource();r.buffer=n,r.connect(t.destination),i.current=r,r.onended=()=>{i.current===r&&(i.current=null),e()},r.start(0)})};try{t(!0),n?.onStart?.();let e=u(s[0]);for(let t=0;t<s.length;t+=1){let n=await e;if(l.cancelled||(t+1<s.length&&(e=u(s[t+1])),await d(n),l.cancelled))return}t(!1),n?.onEnd?.()}catch(e){if(e.name===`AbortError`||l.cancelled)return;let i=e instanceof Error?e.message:`Failed to speak`;r(i),n?.onError?.(i),t(!1)}finally{o.current===l&&(o.current=null)}},[c]);return(0,H.useEffect)(()=>()=>{c()},[c]),{isPlaying:e,error:n,speak:l,stop:c,unlockAudio:s}}var an=new class{recognition=null;isListening=!1;currentLang=`en-US`;onResultCallback=null;onErrorCallback=null;restartOnEnd=!1;conversationMode=!1;isSpeaking=!1;audioContext=null;audioUnlockRequired=!1;isSupported(){let e=`SpeechRecognition`in window||`webkitSpeechRecognition`in window,t=`speechSynthesis`in window;return e&&t}getSupportDetails(){return{recognition:`SpeechRecognition`in window||`webkitSpeechRecognition`in window,synthesis:`speechSynthesis`in window,prefixed:!(`SpeechRecognition`in window)&&`webkitSpeechRecognition`in window,secureContext:window.isSecureContext}}setConversationMode(e){this.conversationMode=e,e||(this.restartOnEnd=!1)}isConversationMode(){return this.conversationMode}pauseListening(){if(this.restartOnEnd=!1,this.recognition)try{this.recognition.stop()}catch{}this.isListening=!1}resumeListening(){if(this.conversationMode,this.onResultCallback,this.isSpeaking,this.currentLang,this.conversationMode&&this.onResultCallback&&!this.isSpeaking)try{this.startListeningSync(this.currentLang,this.onResultCallback,this.onErrorCallback||void 0)}catch(e){console.error(`[BrowserVoiceService] Failed to resume listening:`,e)}}async checkMicrophonePermission(){try{return`permissions`in navigator&&(await navigator.permissions.query({name:`microphone`})).state===`granted`}catch{return!1}}async prepareListening(){if(!this.isSupported())throw Error(`Web Speech API not supported in this browser`);if(typeof navigator>`u`||typeof navigator.mediaDevices?.getUserMedia!=`function`)return!0;try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(e=>e.stop()),!0}catch(e){let t=typeof e==`object`&&e&&`name`in e?String(e.name):``;if(t===`NotAllowedError`)throw Error(`Microphone permission denied`);if(t===`NotFoundError`)throw Error(`No microphone found`);let n=e instanceof Error?e.message:`Unable to access microphone`;throw Error(n)}}startListeningSync(e,t,n){if(!this.isSupported()){let e=`Web Speech API not supported in this browser`;throw n?.(e),Error(e)}this.stopListening();let r=window.SpeechRecognition||window.webkitSpeechRecognition;if(!r){let e=`Web Speech API not supported in this browser`;throw n?.(e),Error(e)}let i=new r;this.recognition=i,this.currentLang=e,this.onResultCallback=t,this.onErrorCallback=n||null,i.continuous=!0,i.interimResults=!0,i.lang=e,i.onstart=()=>{this.isListening=!0,this.restartOnEnd=!0},i.onaudiostart=()=>{},i.onsoundstart=()=>{},i.onresult=e=>{e.results.length;let t=``,n=``;for(let r=e.resultIndex;r<e.results.length;r++){let i=e.results[r];i.isFinal?t+=i[0].transcript:n+=i[0].transcript}n&&this.onResultCallback?.(n,!1),t&&this.onResultCallback?.(t,!0)},i.onerror=e=>{if(e.error===`aborted`)return;let t=this.getErrorMessage(e.error);this.onErrorCallback?.(t),(e.error===`not-allowed`||e.error===`service-not-allowed`||e.error===`network`)&&(this.restartOnEnd=!1,this.isListening=!1)},i.onend=()=>{if(this.isListening=!1,this.restartOnEnd&&this.recognition&&!this.isSpeaking)try{this.recognition.start()}catch{}};try{i.start()}catch(e){let t=e instanceof Error?e.message:`Failed to start speech recognition`;throw n?.(t),Error(t)}}async startListening(e,t,n){this.startListeningSync(e,t,n)}stopListening(){if(this.restartOnEnd=!1,this.recognition){try{this.recognition.stop()}catch{}this.recognition=null}this.isListening=!1}getIsListening(){return this.isListening}getCurrentLang(){return this.currentLang}async resumeAudioContext(){this.audioContext||=new(window.AudioContext||window.webkitAudioContext),this.audioContext.state===`suspended`&&await this.audioContext.resume()}isAudioUnlockRequired(){return this.audioUnlockRequired}async unlockAudio(){try{let e=new Audio;if(e.src=`data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA`,e.volume=.01,await e.play(),await this.resumeAudioContext(),this.isMobileDevice()&&`speechSynthesis`in window){let e=new SpeechSynthesisUtterance(``);e.volume=0,window.speechSynthesis.speak(e),window.speechSynthesis.cancel()}return this.audioUnlockRequired=!1,!0}catch(e){return console.error(`[BrowserVoiceService] Failed to unlock audio:`,e),!1}}async speakText(e,t,n,r){if(!(`speechSynthesis`in window))throw Error(`Speech synthesis not supported`);await this.resumeAudioContext();let i=await this.waitForVoices();await new Promise(e=>setTimeout(e,50)),this.isSpeaking=!0,this.pauseListening(),window.speechSynthesis.cancel();let a=new SpeechSynthesisUtterance(e);a.lang=t,a.rate=r?.rate??1,a.pitch=r?.pitch??1,a.volume=r?.volume??1;let o=null;return r?.voiceName&&(o=i.find(e=>e.name===r.voiceName)||null,o?`${o.name}${o.lang}`:console.warn(`[BrowserVoiceService] Selected voice "${r.voiceName}" not found, falling back to language match`)),o||(o=this.findBestVoice(i,t),o?`${o.name}${o.lang}`:console.warn(`[BrowserVoiceService] No voice found for language: ${t}, using default`)),o&&(a.voice=o),`${e.length}${t}`,new Promise((e,t)=>{let r=!1;a.onstart=()=>{r=!0,e()},a.onend=()=>{this.isSpeaking=!1,n?.()},a.onerror=e=>{this.isSpeaking=!1,console.error(`[BrowserVoiceService] Speech synthesis error:`,e.error),(e.error===`not-allowed`||e.error===`interrupted`)&&(this.audioUnlockRequired=!0);let n=`Speech synthesis error: ${e.error||`unknown`}`;e.error===`not-allowed`?n=`Audio blocked by browser autoplay policy. Please interact with the page first.`:e.error===`interrupted`&&(n=`Speech was interrupted. Please try again.`),t(Error(n))},setTimeout(()=>{r||(console.warn(`[BrowserVoiceService] Speech start timeout - audio may be blocked`),this.audioUnlockRequired=!0)},2e3),window.speechSynthesis.speak(a)})}cancelSpeech(){`speechSynthesis`in window&&window.speechSynthesis.cancel()}getVoices(){return`speechSynthesis`in window?window.speechSynthesis.getVoices():[]}async waitForVoices(){if(!(`speechSynthesis`in window))return[];let e=window.speechSynthesis.getVoices();return e.length>0?e:new Promise(e=>{let t=()=>{e(window.speechSynthesis.getVoices()),window.speechSynthesis.onvoiceschanged=null};window.speechSynthesis.onvoiceschanged=t,setTimeout(()=>{e(window.speechSynthesis.getVoices()),window.speechSynthesis.onvoiceschanged=null},1e3)})}findBestVoice(e,t){let n=e.find(e=>e.lang===t);if(!n){let r=t.split(`-`)[0];n=e.find(e=>e.lang.startsWith(r))}return n||=e.find(e=>e.lang.startsWith(t.split(`-`)[0])&&e.localService),n||null}isMobileDevice(){if(typeof navigator>`u`)return!1;let e=navigator.userAgent.toLowerCase();return/iphone|ipad|ipod|android|mobile|webos|blackberry|iemobile|opera mini/i.test(e)}isIOSSafari(){if(typeof navigator>`u`)return!1;let e=navigator.userAgent.toLowerCase(),t=/iphone|ipad|ipod/i.test(e),n=/safari/i.test(e)&&!/chrome|crios|crmo/i.test(e);return t&&n}getErrorMessage(e){let t=this.isMobileDevice(),n=this.isIOSSafari();return{"no-speech":`No speech detected`,aborted:`Speech recognition aborted`,"audio-capture":`No microphone found`,network:`Network error - check connection`,"not-allowed":t?`Microphone permission denied. Check Settings > Safari > Microphone`:`Microphone permission denied`,"service-not-allowed":n?`Speech recognition requires a user gesture. Please tap the microphone button again.`:`Speech recognition service not allowed`,"bad-grammar":`Grammar error`,"language-not-supported":`Language not supported`}[e]||`Speech recognition error: ${e}`}},on=e=>{if(e===`12h`)return!0;if(e===`24h`)return!1},sn=(e,t,n={})=>{let r=e instanceof Date?e:new Date(e);return Number.isFinite(r.getTime())?r.toLocaleTimeString(ie(),{hour:n.hour??`numeric`,minute:`2-digit`,second:n.precision===`second`?`2-digit`:void 0,hour12:on(t)}):n.fallback??``},cn=(e,t,n)=>{let r=e instanceof Date?e:new Date(e);return Number.isFinite(r.getTime())?r.toLocaleString(ie(),{...n,hour12:n.hour?on(t):n.hour12}):``},ln=H.memo(function(e){let t=(0,W.c)(24),{checked:n,onChange:r,disabled:i,ariaLabel:a,className:o,iconClassName:s}=e,c=i!==void 0&&i,l;t[0]!==n||t[1]!==c||t[2]!==r?(l=e=>{e.preventDefault(),e.stopPropagation(),!c&&!n&&r()},t[0]=n,t[1]=c,t[2]=r,t[3]=l):l=t[3];let u=l,d;t[4]!==n||t[5]!==c||t[6]!==r?(d=e=>{(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),!c&&!n&&r())},t[4]=n,t[5]=c,t[6]=r,t[7]=d):d=t[7];let f=d,p=n?`bg-[color-mix(in_srgb,var(--primary-base)_80%,transparent)] shadow-none hover:bg-[var(--primary-base)]`:`bg-[var(--surface-muted)] shadow-[inset_0_0_0_1px_var(--interactive-border)] hover:bg-[var(--interactive-hover)]`,m;t[8]!==o||t[9]!==p?(m=F(`group/radio relative flex h-[14px] w-[14px] min-h-[14px] min-w-[14px] shrink-0 self-center items-center justify-center rounded-full outline-none`,`transition-[background-color,box-shadow] duration-200 ease-out`,p,`focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] focus-visible:ring-offset-1 focus-visible:ring-offset-background`,`disabled:cursor-not-allowed disabled:opacity-50`,o),t[8]=o,t[9]=p,t[10]=m):m=t[10];let h=!n&&`opacity-0`,g;t[11]!==s||t[12]!==h?(g=F(`block h-[5px] w-[5px] rounded-full bg-white`,h,s),t[11]=s,t[12]=h,t[13]=g):g=t[13];let _;t[14]===g?_=t[15]:(_=(0,U.jsx)(`span`,{"aria-hidden":!0,className:g}),t[14]=g,t[15]=_);let v;return t[16]!==a||t[17]!==n||t[18]!==c||t[19]!==u||t[20]!==f||t[21]!==m||t[22]!==_?(v=(0,U.jsx)(`button`,{type:`button`,role:`radio`,onClick:u,onKeyDown:f,disabled:c,"aria-checked":n,"aria-label":a,className:m,children:_}),t[16]=a,t[17]=n,t[18]=c,t[19]=u,t[20]=f,t[21]=m,t[22]=_,t[23]=v):v=t[23],v});export{He as A,X as B,rt as C,qe as D,We as E,Be as F,K as G,G as H,Q as I,we as K,Le as L,Ie as M,Re as N,Ke as O,ze as P,Ve as R,tt as S,Ge as T,Ee as U,Oe as V,Te as W,Ze as _,rn as a,nt as b,Zt as c,Ut as d,Bt as f,it as g,lt as h,an as i,Ue as j,q as k,Vt as l,vt as m,cn as n,Kt as o,Et as p,sn as r,Xt as s,ln as t,Ht as u,$e as v,Qe as w,et as x,$ as y,Ne as z};
1
+ import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{E as t,t as n}from"./useUIStore-BXjMQrel.js";import{Xt as r,d as i,kn as a,u as o,xn as s}from"./persistence-CLUawIlm.js";import{A as c,D as l,E as u,F as d,I as f,M as p,N as m,P as h,j as g,k as _,nt as v,rt as y}from"./vendor-base-ui-CnHfUmDN.js";import{n as b}from"./vendor-react-DLPElpoQ.js";import{s as x}from"./vendor-tanstack-react-query-D7pys_c9.js";import{P as S,V as C,a as w,f as T,l as E}from"./vendor-codemirror-autocomplete-DHomsvW7.js";import{c as D,o as O,r as k}from"./vendor-codemirror-lang-angular-DShkBD6m.js";import{n as A,r as j}from"./vendor-codemirror-lang-json-CYJRHck9.js";import{n as M}from"./vendor-codemirror-lang-markdown-WORgx6ZD.js";import{n as ee}from"./vendor-codemirror-lang-python-Du6XQ8Zw.js";import{O as te}from"./vendor-codemirror-legacy-modes-DuRAjNvB.js";import{n as ne}from"./vendor-reactuses-core-DDoDDyM9.js";import{n as re,r as ie,t as ae}from"./clipboard-Ca2PSbr_.js";import{$a as oe,Ja as se,Ka as ce,po as le,ta as N}from"./useMobileNavigationStore-CGOeJb9D.js";import{s as P,t as F}from"./utils-D94hxQYq.js";import{t as ue}from"./AgentAvatar-BceI_qBC.js";import{n as I}from"./Icon-Du1LX11Q.js";import{t as L}from"./button-p6vbd3r6.js";import{A as de,C as R,E as z,L as B,M as V,O as fe,R as pe,T as me,k as he,w as ge}from"./projectMeta-ZD-iXSOT.js";import{t as _e}from"./input-gaFVNq1P.js";import{t as ve}from"./useThemeSystem-DMzWVJaW.js";import{i as ye}from"./OverlayScrollbar-oOLMqq2s.js";import{t as be}from"./vendor-codemirror-language-data-BfYFhIH1.js";var H=e(y(),1),U=v(),xe=[.2,.45,.15,.55,.35,.1,.5,.25,.4,.3,.45,.15,.55,.2,.35,.1],Se=[.3,.15,.45,.25,.5,.35,.1,.4,.2,.55,.3,.15,.45,.25,.4,.2],Ce=(e,t,n,r,i=4)=>{let a=[];for(let o=0;o<i;o++)for(let s=0;s<i;s++){let c=s/i,l=(s+1)/i,u=o/i,d=(o+1)/i,f=(e,t,n)=>e+(t-e)*n,p=(e,t,n,r,i,a)=>{let o=f(e,t,i),s=f(r,n,i);return f(o,s,a)},m={x:p(e.x,t.x,n.x,r.x,c,u),y:p(e.y,t.y,n.y,r.y,c,u)},h={x:p(e.x,t.x,n.x,r.x,l,u),y:p(e.y,t.y,n.y,r.y,l,u)},g={x:p(e.x,t.x,n.x,r.x,l,d),y:p(e.y,t.y,n.y,r.y,l,d)},_={x:p(e.x,t.x,n.x,r.x,c,d),y:p(e.y,t.y,n.y,r.y,c,d)};a.push({path:`M${m.x} ${m.y} L${h.x} ${h.y} L${g.x} ${g.y} L${_.x} ${_.y} Z`,row:o,col:s})}return a},we=({className:e=``,width:t=70,height:n=70,isAnimated:r=!1})=>{let{t:i}=re(),a=ve(),o=!0;a?o=a.currentTheme.metadata.variant!==`light`:typeof window<`u`&&(o=window.matchMedia(`(prefers-color-scheme: dark)`).matches);let s=(0,H.useMemo)(()=>{if(a)return a.currentTheme.colors.surface.foreground;if(typeof window<`u`){let e=getComputedStyle(document.documentElement).getPropertyValue(`--splash-stroke`).trim();if(e)return e}return o?`white`:`black`},[a,o]),c=(0,H.useMemo)(()=>typeof window>`u`||typeof CSS>`u`||typeof CSS.supports!=`function`?!1:CSS.supports(`color`,`color-mix(in srgb, white 50%, transparent)`),[]),l=(0,H.useMemo)(()=>{if(a)return c?`color-mix(in srgb, ${s} 15%, transparent)`:o?`rgba(255,255,255,0.15)`:`rgba(0,0,0,0.15)`;if(typeof window<`u`){let e=getComputedStyle(document.documentElement).getPropertyValue(`--splash-face-fill`).trim();if(e)return e}return o?`rgba(255,255,255,0.15)`:`rgba(0,0,0,0.15)`},[a,c,s,o]),u=(0,H.useMemo)(()=>{if(a)return c?`color-mix(in srgb, ${s} 35%, transparent)`:o?`rgba(255,255,255,0.35)`:`rgba(0,0,0,0.4)`;if(typeof window<`u`){let e=getComputedStyle(document.documentElement).getPropertyValue(`--splash-cell-fill`).trim();if(e)return e}return o?`rgba(255,255,255,0.35)`:`rgba(0,0,0,0.4)`},[a,c,s,o]),d=s,f=.866,p=.5,m={x:50,y:2},h={x:50-48*f,y:50-48*p},g={x:91.568,y:50-48*p},_={x:50,y:50},v={x:50-48*f,y:74},y={x:91.568,y:74},b={x:50,y:98},x=`matrix(0.866, 0.5, -0.866, 0.5, 50, ${(m.y+h.y+_.y+g.y)/4})`,S=Ce(h,_,b,v),C=Ce(_,g,y,b);return(0,U.jsxs)(`svg`,{width:t,height:n,viewBox:`0 0 100 100`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,className:e,role:`img`,"aria-label":i(`openChamberLogo.aria.logo`),children:[r?(0,U.jsx)(`style`,{children:`@keyframes oc-logo-glow{0%,100%{filter:drop-shadow(0 0 0 transparent)}50%{filter:drop-shadow(0 0 4px var(--oc-glow-color))}}.oc-logo-glow{animation:oc-logo-glow 1.8s ease-in-out infinite}@media (prefers-reduced-motion:reduce){.oc-logo-glow{animation:none}}`}):null,(0,U.jsx)(`path`,{d:`M${_.x} ${_.y} L${h.x} ${h.y} L${v.x} ${v.y} L${b.x} ${b.y} Z`,fill:l,stroke:s,strokeWidth:`2`,strokeLinejoin:`round`}),S.map((e,t)=>(0,U.jsx)(`path`,{d:e.path,fill:u,opacity:xe[e.row*4+(3-e.col)]??.35},`left-${t}`)),(0,U.jsx)(`path`,{d:`M${_.x} ${_.y} L${g.x} ${g.y} L${y.x} ${y.y} L${b.x} ${b.y} Z`,fill:l,stroke:s,strokeWidth:`2`,strokeLinejoin:`round`}),C.map((e,t)=>(0,U.jsx)(`path`,{d:e.path,fill:u,opacity:Se[e.row*4+e.col]??.35},`right-${t}`)),(0,U.jsx)(`path`,{d:`M${m.x} ${m.y} L${h.x} ${h.y} L${_.x} ${_.y} L${g.x} ${g.y} Z`,fill:`none`,stroke:s,strokeWidth:`2`,strokeLinejoin:`round`}),(0,U.jsx)(`g`,{opacity:1,className:r?`oc-logo-glow`:void 0,style:r?{"--oc-glow-color":s}:void 0,children:(0,U.jsxs)(`g`,{transform:`${x} scale(0.75)`,children:[(0,U.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M-16 -20 L16 -20 L16 20 L-16 20 Z M-8 -12 L-8 12 L8 12 L8 -12 Z`,fill:d}),(0,U.jsx)(`path`,{d:`M-8 -4 L8 -4 L8 12 L-8 12 Z`,fill:d,fillOpacity:`0.4`})]})})]})},W=b();function G(e){let t=(0,W.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=F(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(`div`,{"data-slot":`card`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Te(e){let t=(0,W.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=F(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function K(e){let t=(0,W.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=F(`leading-none font-semibold`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ee(e){let t=(0,W.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=F(`px-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var De=class extends H.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){this.setState({error:e,errorInfo:t,copied:!1}),console.error(`Error caught by boundary:`,e,t)}handleReset=()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})};handleCopy=async()=>{let{strings:e}=this.props,t=`${this.state.error?String(this.state.error):e.unknownError}${this.state.error?.stack?`\n\nStack:\n${this.state.error.stack}`:``}${this.state.errorInfo?.componentStack?`\n\n${e.componentStackLabel}${this.state.errorInfo.componentStack}`:``}`;(await ae(t)).ok&&(this.setState({copied:!0}),window.setTimeout(()=>{this.setState(e=>e.copied?{copied:!1}:null)},1500))};render(){let{strings:e}=this.props;return this.state.hasError?this.props.fallback?this.props.fallback:(0,U.jsx)(`div`,{className:`p-4 flex items-center justify-center min-h-screen`,children:(0,U.jsxs)(G,{className:`w-full max-w-md`,children:[(0,U.jsx)(Te,{className:`text-center`,children:(0,U.jsxs)(K,{className:`flex items-center justify-center gap-2 text-destructive`,children:[(0,U.jsx)(I,{name:`error-warning`,className:`h-5 w-5`}),e.title]})}),(0,U.jsxs)(Ee,{className:`space-y-4`,children:[(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground text-center`,children:e.description}),this.state.error&&(0,U.jsxs)(`details`,{className:`text-xs font-mono bg-muted p-3 rounded`,children:[(0,U.jsx)(`summary`,{className:`cursor-pointer hover:bg-interactive-hover/80`,children:e.detailsSummary}),(0,U.jsxs)(`pre`,{className:`mt-2 max-h-48 overflow-auto`,children:[this.state.error.toString(),this.state.errorInfo?.componentStack?`\n\n${e.componentStackLabel}${this.state.errorInfo.componentStack}`:``]})]}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsxs)(L,{onClick:this.handleReset,variant:`outline`,className:`flex-1`,children:[(0,U.jsx)(I,{name:`restart`,className:`h-4 w-4 mr-2`}),e.tryAgain]}),(0,U.jsx)(L,{onClick:this.handleCopy,variant:`outline`,className:`flex-1`,children:this.state.copied?e.copied:e.copy})]})]})]})}):this.props.children}},Oe=e=>{let t=(0,W.c)(29),{children:n,fallback:r}=e,{t:i}=re(),a;t[0]===i?a=t[1]:(a=i(`errorBoundary.state.unknownError`),t[0]=i,t[1]=a);let o;t[2]===i?o=t[3]:(o=i(`errorBoundary.title`),t[2]=i,t[3]=o);let s;t[4]===i?s=t[5]:(s=i(`errorBoundary.description`),t[4]=i,t[5]=s);let c;t[6]===i?c=t[7]:(c=i(`errorBoundary.actions.errorDetails`),t[6]=i,t[7]=c);let l;t[8]===i?l=t[9]:(l=i(`errorBoundary.state.componentStackLabel`),t[8]=i,t[9]=l);let u;t[10]===i?u=t[11]:(u=i(`errorBoundary.actions.tryAgain`),t[10]=i,t[11]=u);let d;t[12]===i?d=t[13]:(d=i(`errorBoundary.actions.copied`),t[12]=i,t[13]=d);let f;t[14]===i?f=t[15]:(f=i(`errorBoundary.actions.copy`),t[14]=i,t[15]=f);let p;t[16]!==a||t[17]!==o||t[18]!==s||t[19]!==c||t[20]!==l||t[21]!==u||t[22]!==d||t[23]!==f?(p={unknownError:a,title:o,description:s,detailsSummary:c,componentStackLabel:l,tryAgain:u,copied:d,copy:f},t[16]=a,t[17]=o,t[18]=s,t[19]=c,t[20]=l,t[21]=u,t[22]=d,t[23]=f,t[24]=p):p=t[24];let m=p,h;return t[25]!==n||t[26]!==r||t[27]!==m?(h=(0,U.jsx)(De,{fallback:r,strings:m,children:n}),t[25]=n,t[26]=r,t[27]=m,t[28]=h):h=t[28],h},q=`__unassigned__`,ke={mod:`mod`,shift:`shift`,alt:`alt`,option:`alt`,ctrl:`ctrl`,meta:`mod`,cmd:`mod`,command:`mod`},Ae={mod:P()&&r()?`⌘`:`Ctrl`,shift:`⇧`,alt:`⌥`,option:`⌥`,ctrl:`⌃`},je={comma:`,`,period:`.`,enter:`Enter`,escape:`Esc`,tab:`Tab`,space:`Space`,backspace:`⌫`,delete:`⌦`,arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`,home:`Home`,end:`End`,pageup:`Page Up`,pagedown:`Page Down`,backtick:"`",grave:"`","=":`=`,equal:`=`,plus:`+`,minus:`-`,"-":`-`},J=[`mod`,`ctrl`,`shift`,`alt`],Me={"{":`[`,"}":`]`,":":`;`,'"':`'`,"<":`,`,">":`.`,"?":`/`,"|":`\\`,"~":"`","!":`1`,"@":`2`,"#":`3`,$:`4`,"%":`5`,"^":`6`,"&":`7`,"*":`8`,"(":`9`,")":`0`};function Y(e){return e.trim().toLowerCase()===q}function Ne(e){let t=e.toLowerCase();return t===`,`?`comma`:t===`.`?`period`:t===` `?`space`:t===`esc`?`escape`:t===`+`?`plus`:t===`-`||t===`_`?`minus`:t===`arrowup`?`arrowup`:t===`arrowdown`?`arrowdown`:t===`arrowleft`?`arrowleft`:t===`arrowright`?`arrowright`:t==="`"?`backtick`:Me[t]??t}var Pe=[{id:`open_go_to_line`,defaultCombo:`alt+g`,label:`Go to line (files editor)`,description:`Open go to line in the files editor`,customizable:!0},{id:`open_command_palette`,defaultCombo:`mod+p`,label:`Open command palette`,description:`Open the command palette`,customizable:!0},{id:`focus_input`,defaultCombo:`mod+i`,label:`Focus input`,description:`Focus the chat input field`,customizable:!0},{id:`open_status`,defaultCombo:`mod+shift+o`,label:`Open OpenCode status`,description:`Open the OpenCode status dialog`},{id:`open_settings`,defaultCombo:`mod+comma`,label:`Open settings`,description:`Open the settings panel`,customizable:!0},{id:`toggle_terminal`,defaultCombo:`ctrl+backtick`,label:`Toggle terminal`,description:`Toggle the integrated terminal`,customizable:!0},{id:`toggle_bottom_panel`,defaultCombo:`mod+j`,label:`Toggle bottom panel`,description:`Toggle the bottom panel dock`,customizable:!0},{id:`toggle_terminal_expanded`,defaultCombo:`mod+shift+j`,label:`Toggle terminal expanded`,description:`Toggle terminal expanded or collapsed`,customizable:!0},{id:`new_terminal_tab`,defaultCombo:`mod+t`,label:`New terminal tab`,description:`Create a new terminal tab when the terminal is focused`,customizable:!0},{id:`open_new_terminal`,defaultCombo:`mod+shift+backtick`,label:`Open new terminal`,description:`Open the terminal panel and create a new terminal tab`,customizable:!0},{id:`previous_terminal_tab`,defaultCombo:`mod+shift+[`,label:`Previous terminal tab`,description:`Switch to the previous terminal tab when the terminal is focused`,customizable:!0},{id:`next_terminal_tab`,defaultCombo:`mod+shift+]`,label:`Next terminal tab`,description:`Switch to the next terminal tab when the terminal is focused`,customizable:!0},{id:`toggle_files`,defaultCombo:`mod+shift+f`,label:`Toggle files`,description:`Toggle the files panel`},{id:`toggle_sidebar`,defaultCombo:`mod+b`,label:`Toggle sidebar`,description:`Toggle the session sidebar`,customizable:!0},{id:`open_timeline_dialog`,defaultCombo:`mod+t`,label:`Open conversation timeline`,description:`Search and navigate within current conversation`,customizable:!0},{id:`toggle_prompt_navigator`,defaultCombo:`mod+alt+p`,label:`Toggle prompt navigator`,description:`Show or hide the prompt navigator panel in chat`,customizable:!0},{id:`toggle_right_sidebar`,defaultCombo:`mod+alt+b`,defaultAliases:[`mod+\\`],label:`Toggle review panel`,description:`Toggle the review panel (right sidebar)`,customizable:!0},{id:`open_right_sidebar_git`,defaultCombo:`mod+shift+g`,label:`Open right sidebar Git tab`,description:`Open right sidebar and select Git`,customizable:!0},{id:`open_right_sidebar_files`,defaultCombo:`mod+shift+f`,label:`Open right sidebar Files tab`,description:`Open right sidebar and select Files`,customizable:!0},{id:`cycle_right_sidebar_tab`,defaultCombo:`mod+alt+shift+r`,label:`Cycle right sidebar tab`,description:`Cycle through right sidebar tabs`,customizable:!0},{id:`close_context_panel_tab`,defaultCombo:`mod+w`,label:`Close context panel tab`,description:`Close the active context panel tab (closes the panel when empty)`,customizable:!0},{id:`previous_session`,defaultCombo:`mod+shift+[`,defaultAliases:[`mod+arrowup`],label:`Previous session`,description:`Switch to the previous session`,customizable:!0},{id:`next_session`,defaultCombo:`mod+shift+]`,defaultAliases:[`mod+arrowdown`],label:`Next session`,description:`Switch to the next session`,customizable:!0},{id:`new_chat`,defaultCombo:`mod+n`,label:`New session`,description:`Start a new session`,customizable:!0},{id:`new_chat_worktree`,defaultCombo:`mod+shift+alt+n`,label:`New worktree draft`,description:`Create a new worktree and open a draft in it`,customizable:!0},{id:`new_mini_chat`,defaultCombo:`mod+alt+n`,label:`New Mini Chat window`,description:`Open a new Mini Chat draft window`,customizable:!0},{id:`submit_message`,defaultCombo:`mod+enter`,label:`Submit message`,description:`Submit the current message`},{id:`clear_input`,defaultCombo:`escape`,label:`Clear input`,description:`Clear the input field`},{id:`clear_all_messages`,defaultCombo:`ctrl+c`,label:`Clear all messages`,description:`Clear the composer input and queued messages`,customizable:!0},{id:`open_diff_panel`,defaultCombo:`mod+2`,label:`Open diff panel`,description:`Switch to the diff panel`},{id:`open_terminal_panel`,defaultCombo:`mod+3`,label:`Open terminal panel`,description:`Switch to the terminal panel`},{id:`open_git_panel`,defaultCombo:`mod+4`,label:`Open git panel`,description:`Switch to the git panel`},{id:`open_help`,defaultCombo:`mod+.`,label:`Open keyboard shortcuts`,description:`Show the keyboard shortcuts help`,customizable:!0},{id:`toggle_services_menu`,defaultCombo:`mod+shift+s`,label:`Toggle services menu`,description:`Open or close the services menu`,customizable:!0},{id:`open_usage`,defaultCombo:`mod+shift+c`,label:`Open usage`,description:`Open the usage panel`,customizable:!0},{id:`cycle_services_tab`,defaultCombo:`mod+alt+shift+s`,label:`Cycle services tab`,description:`Cycle through tabs in the services menu`,customizable:!0},{id:`cycle_theme`,defaultCombo:`mod+/`,label:`Cycle theme`,description:`Cycle between light, dark, and system theme`,customizable:!0},{id:`zoom_in`,defaultCombo:`mod+=`,label:`Zoom in`,description:`Increase the webview zoom level`,customizable:!0},{id:`zoom_out`,defaultCombo:`mod+-`,label:`Zoom out`,description:`Decrease the webview zoom level`,customizable:!0},{id:`zoom_reset`,defaultCombo:`mod+0`,label:`Reset zoom`,description:`Reset the webview zoom level to 100%`,customizable:!0},{id:`leader_key`,defaultCombo:`ctrl+x`,label:`Leader key`,description:`Start an OpenCode-style chord, then press M / A / N / C`,customizable:!0},{id:`open_model_selector`,defaultCombo:`mod+shift+m`,label:`Open model selector`,description:`Open model selector while in chat`,customizable:!0},{id:`cycle_thinking_variant`,defaultCombo:`mod+shift+t`,label:`Cycle thinking variant`,description:`Cycle thinking variant while in chat`},{id:`cycle_agent`,defaultCombo:`tab`,label:`Cycle agent`,description:`Cycle agent while the model selector is open`,customizable:!0},{id:`cycle_favorite_model_forward`,defaultCombo:`ctrl+]`,label:`Cycle favorite model forward`,description:`Cycle forward through starred models without opening the picker`,customizable:!0},{id:`cycle_favorite_model_backward`,defaultCombo:`ctrl+[`,label:`Cycle favorite model backward`,description:`Cycle backward through starred models without opening the picker`,customizable:!0},{id:`expand_input`,defaultCombo:`mod+shift+e`,label:`Expand input`,description:`Toggle focus mode for the chat input`,customizable:!0},{id:`toggle_dictation`,defaultCombo:`mod+alt+v`,label:`Voice input`,description:`Start dictation; press again to confirm and insert the transcript`,customizable:!0},{id:`abort_run`,defaultCombo:`escape`,label:`Abort active run`,description:`Abort the currently running task (double press)`},{id:`switch_tab_1`,defaultCombo:`mod+1`,label:`Switch to visible session 1`,description:`Switch to the first visible sidebar session`},{id:`switch_tab_2`,defaultCombo:`mod+2`,label:`Switch to visible session 2`,description:`Switch to the second visible sidebar session`},{id:`switch_tab_3`,defaultCombo:`mod+3`,label:`Switch to visible session 3`,description:`Switch to the third visible sidebar session`},{id:`switch_tab_4`,defaultCombo:`mod+4`,label:`Switch to visible session 4`,description:`Switch to the fourth visible sidebar session`},{id:`switch_tab_5`,defaultCombo:`mod+5`,label:`Switch to visible session 5`,description:`Switch to the fifth visible sidebar session`},{id:`switch_tab_6`,defaultCombo:`mod+6`,label:`Switch to visible session 6`,description:`Switch to the sixth visible sidebar session`},{id:`switch_tab_7`,defaultCombo:`mod+7`,label:`Switch to visible session 7`,description:`Switch to the seventh visible sidebar session`},{id:`switch_tab_8`,defaultCombo:`mod+8`,label:`Switch to visible session 8`,description:`Switch to the eighth visible sidebar session`},{id:`switch_tab_9`,defaultCombo:`mod+9`,label:`Switch to visible session 9`,description:`Switch to the ninth visible sidebar session`}];function X(e){if(Y(e))return q;let t=e.toLowerCase().trim().split(`+`).map(e=>e.trim()).filter(Boolean),n=new Set,r=``;for(let e of t){let t=e===`,`?`comma`:e===`.`?`period`:e,i=ke[t];if(i){n.add(i);continue}r=t}return[...J.filter(e=>n.has(e)),r].filter(Boolean).join(`+`)}function Z(e){return Y(e)?!0:Fe(e).key.trim().length>0}function Fe(e){if(Y(e))return{modifiers:new Set,key:q};let t=X(e).split(`+`),n=new Set,r=``;for(let e of t){let t=ke[e];t?n.add(t):r=e}return{modifiers:n,key:r}}function Ie(e){if(Y(e))return`Unassigned`;let t=Fe(e);if(!t.key&&t.modifiers.size===0)return`Unassigned`;let n=[];for(let e of J)t.modifiers.has(e)&&n.push(Ae[e]);if(t.key){let e=je[t.key.toLowerCase()]||t.key.toUpperCase();n.push(e)}return n.join(` + `)}function Le(e){return Pe.find(t=>t.id===e)}function Re(){return Pe.filter(e=>e.customizable===!0)}function ze(e,t){let n=Le(e);if(!n)return``;let r=t?.[e];if(typeof r==`string`){if(r.trim().toLowerCase()===`__unassigned__`)return``;let e=X(r);if(e===`__unassigned__`)return q;if(Z(e))return e}return n.defaultCombo}function Be(e,t){let n=Le(e);if(!n)return[];let r=ze(e,t);return r===n.defaultCombo?[n.defaultCombo,...n.defaultAliases??[]]:r?[r]:[]}function Ve(e){if(Y(e))return!1;let t=Fe(e);if(!t.modifiers.has(`mod`))return!1;let n=t.key.toLowerCase();return new Set([`w`,`t`,`r`,`p`,`s`,`f`,`l`,`n`]).has(n)&&!t.modifiers.has(`shift`)&&!t.modifiers.has(`alt`)}function He(e,t){let n=typeof t==`string`?t:t.defaultCombo;if(Y(n))return!1;let i=Fe(n),a=i.modifiers.has(`mod`),o=i.modifiers.has(`shift`),s=i.modifiers.has(`alt`),c=i.modifiers.has(`ctrl`),l=P()&&r(),u=P(),d=l?e.metaKey:u&&e.metaKey||e.ctrlKey;if(a&&!d||!a&&e.metaKey||o!==e.shiftKey||s!==e.altKey)return!1;if(c){if(!e.ctrlKey)return!1}else{let t=a&&!l&&e.ctrlKey;if(e.ctrlKey&&!t)return!1}let f=e.key;return(!f||f===`Dead`)&&e.code===`Backquote`&&(f="`"),e.altKey&&(e.code.startsWith(`Key`)&&e.code.length===4?f=e.code.slice(3).toLowerCase():e.code.startsWith(`Digit`)&&e.code.length===6&&(f=e.code.slice(5))),Ne(f)===Ne(i.key)}function Q(){return P()&&r()?`⌘`:`Ctrl`}function Ue(e,t,n){if(He(e,n))return!0;let i=X(n),a=P()&&r(),o=P();return!(a?e.metaKey:o&&e.metaKey||e.ctrlKey)||e.altKey||a&&e.ctrlKey&&!e.metaKey?!1:t===`in`&&i===`mod+=`?e.key===`+`||e.code===`NumpadAdd`:t===`out`&&(i===`mod+-`||i===`mod+minus`)?e.key===`_`||e.code===`NumpadSubtract`:!1}var We=`app-region-no-drag transition-all duration-150 ease-out data-[starting-style]:opacity-0 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:scale-95 z-50 max-h-[var(--available-height)] min-w-[8rem] origin-[var(--transform-origin)] overflow-visible rounded-xl p-1 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.8),inset_0_0_0_1px_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.10),0_1px_2px_-0.5px_rgba(0,0,0,0.08),0_4px_8px_-2px_rgba(0,0,0,0.08),0_12px_20px_-4px_rgba(0,0,0,0.08)] dark:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.12),inset_0_0_0_1px_rgba(255,255,255,0.08),0_0_0_1px_rgba(0,0,0,0.36),0_1px_1px_-0.5px_rgba(0,0,0,0.22),0_3px_3px_-1.5px_rgba(0,0,0,0.20),0_6px_6px_-3px_rgba(0,0,0,0.16)]`,Ge=`data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover active:bg-interactive-active data-[variant=destructive]:text-destructive data-[variant=destructive]:hover:bg-destructive/10 dark:data-[variant=destructive]:hover:bg-destructive/20 data-[variant=destructive]:hover:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 typography-ui-label outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,Ke=`data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover active:bg-interactive-active [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1 typography-ui-label outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,qe=`bg-border -mx-1 my-0.5 h-px`,Je=H.createContext(null),Ye=e=>e?e.closest(`[data-slot="dialog-content"], [role="dialog"]`):null;function Xe(e,t){return e&&H.isValidElement(t)?{render:t}:{children:t}}function Ze(e){let t=(0,W.c)(9),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let[r,i]=H.useState(null),a;t[2]===r?a=t[3]:(a={portalContainer:r,setPortalContainer:i},t[2]=r,t[3]=a);let o=a,s;t[4]===n?s=t[5]:(s=(0,U.jsx)(_,{...n}),t[4]=n,t[5]=s);let c;return t[6]!==o||t[7]!==s?(c=(0,U.jsx)(Je.Provider,{value:o,children:s}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function Qe(e){let t=(0,W.c)(22),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({asChild:n,children:r,onPointerDownCapture:a,onFocusCapture:i,...o}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=H.useContext(Je),c;t[6]===s?c=t[7]:(c=e=>{if(!s)return;let t=e instanceof HTMLElement?e:null;s.setPortalContainer(Ye(t))},t[6]=s,t[7]=c);let u=c,d;t[8]!==n||t[9]!==r?(d=Xe(n,r),t[8]=n,t[9]=r,t[10]=d):d=t[10];let f=d,p;t[11]!==a||t[12]!==u?(p=e=>{u(e.currentTarget),a?.(e)},t[11]=a,t[12]=u,t[13]=p):p=t[13];let m;t[14]!==i||t[15]!==u?(m=e=>{u(e.currentTarget),i?.(e)},t[14]=i,t[15]=u,t[16]=m):m=t[16];let h;return t[17]!==o||t[18]!==f||t[19]!==p||t[20]!==m?(h=(0,U.jsx)(l,{"data-slot":`dropdown-menu-trigger`,onPointerDownCapture:p,onFocusCapture:m,...o,...f}),t[17]=o,t[18]=f,t[19]=p,t[20]=m,t[21]=h):h=t[21],h}function $e(e){let t=(0,W.c)(40),n,r,i,a,o,s,c,l,u,f,p,g,_;if(t[0]!==e){let{className:d,sideOffset:m,align:h,side:v,alignOffset:y,anchor:b,portalToBody:x,positionerClassName:S,style:C,children:w,onCloseAutoFocus:T,collisionPadding:E,collisionAvoidance:D,...O}=e;o=d,f=m,n=h,l=v,r=y,i=b,p=x,s=S,u=C,a=w,g=E,_=D,c=O,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]=f,t[11]=p,t[12]=g,t[13]=_}else 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],f=t[10],p=t[11],g=t[12],_=t[13];let v=f===void 0?4:f,y=p!==void 0&&p,b=g===void 0?8:g,x;t[14]===_?x=t[15]:(x=_===void 0?{side:`shift`,align:`shift`}:_,t[14]=_,t[15]=x);let S=x,C=H.useContext(Je),w=y?void 0:C?.portalContainer||void 0,T;t[16]===s?T=t[17]:(T=F(`app-region-no-drag z-50`,s),t[16]=s,t[17]=T);let E;t[18]===u?E=t[19]:(E={backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`,...u},t[18]=u,t[19]=E);let D;t[20]===o?D=t[21]:(D=F(We,o),t[20]=o,t[21]=D);let O;t[22]!==a||t[23]!==c||t[24]!==E||t[25]!==D?(O=(0,U.jsx)(d,{"data-slot":`dropdown-menu-content`,style:E,className:D,...c,children:a}),t[22]=a,t[23]=c,t[24]=E,t[25]=D,t[26]=O):O=t[26];let k;t[27]!==n||t[28]!==r||t[29]!==i||t[30]!==S||t[31]!==b||t[32]!==l||t[33]!==v||t[34]!==O||t[35]!==T?(k=(0,U.jsx)(m,{anchor:i,sideOffset:v,align:n,side:l,alignOffset:r,collisionPadding:b,collisionAvoidance:S,className:T,children:O}),t[27]=n,t[28]=r,t[29]=i,t[30]=S,t[31]=b,t[32]=l,t[33]=v,t[34]=O,t[35]=T,t[36]=k):k=t[36];let A;return t[37]!==k||t[38]!==w?(A=(0,U.jsx)(h,{container:w,children:k}),t[37]=k,t[38]=w,t[39]=A):A=t[39],A}function $(e){let t=(0,W.c)(24),n,r,i,a,o,s,c,l;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]):({className:i,inset:a,variant:l,asChild:n,children:r,onSelect:s,onClick:o,...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);let u=l===void 0?`default`:l,d;t[9]!==n||t[10]!==r?(d=Xe(n,r),t[9]=n,t[10]=r,t[11]=d):d=t[11];let p=d,m;t[12]!==o||t[13]!==s?(m=e=>{o?.(e),e.defaultPrevented||s?.(e)},t[12]=o,t[13]=s,t[14]=m):m=t[14];let h=m,g;t[15]===i?g=t[16]:(g=F(Ge,i),t[15]=i,t[16]=g);let _;return t[17]!==h||t[18]!==a||t[19]!==c||t[20]!==p||t[21]!==g||t[22]!==u?(_=(0,U.jsx)(f,{"data-slot":`dropdown-menu-item`,"data-inset":a,"data-variant":u,className:g,...c,onClick:h,...p}),t[17]=h,t[18]=a,t[19]=c,t[20]=p,t[21]=g,t[22]=u,t[23]=_):_=t[23],_}function et(e){let t=(0,W.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,U.jsx)(p,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function tt(e){let t=(0,W.c)(11),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=F(`data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover data-[checked]:bg-interactive-selection data-[checked]:text-interactive-selection-foreground relative flex cursor-pointer items-start gap-2 rounded-lg py-1 pl-2 pr-8 typography-ui-label outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,U.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-3.5 items-center justify-center text-primary`,children:(0,U.jsx)(c,{children:(0,U.jsx)(I,{name:`check`,className:`size-3`})})}),t[6]=o):o=t[6];let s;return t[7]!==n||t[8]!==i||t[9]!==a?(s=(0,U.jsxs)(g,{"data-slot":`dropdown-menu-radio-item`,className:a,...i,children:[o,n]}),t[7]=n,t[8]=i,t[9]=a,t[10]=s):s=t[10],s}function nt(e){let t=(0,W.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=F(`px-2 py-1 typography-ui-label font-medium data-[inset]:pl-8`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=(0,U.jsx)(`div`,{"data-slot":`dropdown-menu-label`,"data-inset":r,className:a,...i}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function rt(e){let t=(0,W.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=F(qe,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,U.jsx)(u,{"data-slot":`dropdown-menu-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function it(){let e=(0,W.c)(5),t=N(ct),n=N(st),r=N(ot),i=N(at),a=t||i,o=!a&&r===`init_error`,s=!a&&!o,c;return e[0]!==n||e[1]!==a||e[2]!==o||e[3]!==s?(c={isReady:a,isLoading:s,isUnavailable:o,connectionPhase:n},e[0]=n,e[1]=a,e[2]=o,e[3]=s,e[4]=c):c=e[4],c}function at(e){return e.providers.length>0}function ot(e){return e.lastDisconnectReason}function st(e){return e.connectionPhase}function ct(e){return e.isInitialized}var lt=e=>{let t=(0,W.c)(41),{agentName:r,onChange:i,className:a,filter:o,dropdownPortalToBody:s,showIcon:c,agents:l}=e,u=s!==void 0&&s,d=c===void 0||c,{t:f}=re(),{isReady:p,isUnavailable:m}=it(),h=N(ut),g=oe(dt),_=N(ft),{data:v}=le(),y;t[0]===v?y=t[1]:(y=v===void 0?[]:v,t[0]=v,t[1]=y);let b=y,x;bb0:{if(l){x=l;break bb0}if(Array.isArray(h)&&h.length>0){x=h;break bb0}x=b}let S=x,C;if(t[2]!==o||t[3]!==S){let e=se(S);C=o?e.filter(o):e,t[2]=o,t[3]=S,t[4]=C}else C=t[4];let w=C,T=n(pt),{isMobile:E}=ye(),D=T||E,[O,k]=H.useState(!1),A;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>{k(!0),N.getState().refreshCatalogsOnPickerOpen({source:`agentSelector:mobilePanel`})},t[5]=A):A=t[5];let j=ne(A),M=ne(mt),ee=H.useId(),te,ie;t[6]!==l||t[7]!==g||t[8]!==_||t[9]!==S.length?(te=()=>{l||S.length>0||(_(),g())},ie=[l,S.length,_,g],t[6]=l,t[7]=g,t[8]=_,t[9]=S.length,t[10]=te,t[11]=ie):(te=t[10],ie=t[11]),H.useEffect(te,ie);let ae;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(ae=()=>k(!1),t[12]=ae):ae=t[12];let ce=ae,P;t[13]===i?P=t[14]:(P=e=>{i(e)},t[13]=i,t[14]=P);let L=P,R;t[15]!==r||t[16]!==w||t[17]!==L||t[18]!==D||t[19]!==O||t[20]!==ee||t[21]!==f?(R=()=>D?(0,U.jsx)(V,{id:`mobile-agent-selector-sheet-${ee}`,open:O,onOpenChange:e=>{e||ce()},ariaLabel:f(`settings.commands.agentSelector.title`),closeAriaLabel:f(`mobile.surface.closeAria`),resizeAriaLabel:f(`mobile.sessions.sheet.resizeAria`),bodyClassName:`px-2`,children:(0,U.jsxs)(de,{useScrollShadow:!0,disableHorizontal:!0,preventOverscroll:!0,outerClassName:`min-h-0 flex-1`,className:`flex flex-col gap-1 overscroll-contain`,children:[(0,U.jsxs)(`button`,{type:`button`,className:F(`grid w-full grid-cols-[1rem_minmax(0,1fr)_auto] items-center gap-x-2 rounded-lg border border-border/40 bg-background/95 px-2 py-1.5 text-left`,r?`text-foreground`:`bg-primary/10 text-primary`),onClick:()=>{L(``),ce()},children:[(0,U.jsx)(ue,{name:`default`,size:16}),(0,U.jsx)(`span`,{className:F(`min-w-0 typography-meta`,r?`text-muted-foreground`:`font-medium`),children:f(`settings.commands.agentSelector.notSelected`)}),!r&&(0,U.jsx)(`div`,{className:`h-2 w-2 rounded-full bg-primary`})]}),w.map(e=>{let t=e.name===r;return(0,U.jsxs)(`button`,{type:`button`,className:F(`grid w-full grid-cols-[1rem_minmax(0,1fr)_auto] items-start gap-x-2 rounded-lg border border-border/40 bg-background/95 px-2 py-1.5 text-left`,t?`bg-primary/10 text-primary`:`text-foreground`),onClick:()=>{L(e.name),ce()},children:[(0,U.jsx)(ue,{name:e.name,size:16,className:`mt-1.5`}),(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`span`,{className:`typography-meta font-medium`,children:e.name}),e.description&&(0,U.jsx)(`span`,{className:`mt-0.5 block whitespace-normal break-words typography-micro text-muted-foreground`,children:e.description})]}),t&&(0,U.jsx)(`div`,{className:`mt-2 h-2 w-2 rounded-full bg-primary`})]},e.name)})]})}):null,t[15]=r,t[16]=w,t[17]=L,t[18]=D,t[19]=O,t[20]=ee,t[21]=f,t[22]=R):R=t[22];let z=R,B;t[23]!==r||t[24]!==w||t[25]!==a||t[26]!==u||t[27]!==L||t[28]!==M||t[29]!==D||t[30]!==p||t[31]!==m||t[32]!==j||t[33]!==d||t[34]!==f?(B=D?(0,U.jsxs)(`button`,{type:`button`,onClick:p?j:void 0,disabled:!p,className:F(`flex w-full items-center justify-between gap-2 rounded-lg border border-border/40 bg-background/95 px-2 py-1.5 text-left`,!p&&`opacity-60 cursor-not-allowed`,a),children:[(0,U.jsx)(`div`,{className:`flex items-center gap-2`,children:p?(0,U.jsxs)(U.Fragment,{children:[d?(0,U.jsx)(ue,{name:r||`default`,size:14}):null,(0,U.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:r||f(`settings.commands.agentSelector.selectAgentPlaceholder`)})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,U.jsx)(`span`,{className:`typography-meta text-muted-foreground`,children:f(m?`common.unavailable`:`common.loading`)})]})}),(0,U.jsx)(I,{name:`arrow-down-s`,className:`h-3 w-3 text-muted-foreground`})]}):p?(0,U.jsxs)(Ze,{onOpenChange:M,children:[(0,U.jsx)(Qe,{asChild:!0,children:(0,U.jsxs)(`div`,{className:F(`flex items-center gap-2 px-2 rounded-lg bg-interactive-selection/20 border border-border/20 cursor-pointer hover:bg-interactive-hover/30 h-6 w-fit`,a),children:[d?(0,U.jsx)(ue,{name:r||`default`,size:14}):null,(0,U.jsx)(`span`,{className:`typography-micro font-medium whitespace-nowrap`,children:r||f(`settings.commands.agentSelector.notSelected`)}),(0,U.jsx)(I,{name:`arrow-down-s`,className:`h-3 w-3 flex-shrink-0 text-muted-foreground`})]})}),(0,U.jsxs)($e,{className:`max-w-[300px]`,portalToBody:u,children:[(0,U.jsxs)($,{className:`typography-meta`,onSelect:()=>L(``),children:[(0,U.jsx)(ue,{name:`default`,size:14}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:f(`settings.commands.agentSelector.notSelected`)})]}),w.map(e=>(0,U.jsxs)($,{className:`typography-meta`,onSelect:()=>L(e.name),children:[(0,U.jsx)(ue,{name:e.name,size:14}),(0,U.jsx)(`span`,{className:`font-medium`,children:e.name})]},e.name))]})]}):(0,U.jsxs)(`div`,{className:F(`flex items-center gap-2 px-2 rounded-lg bg-interactive-selection/20 border border-border/20 h-6 w-fit opacity-60`,a),children:[(0,U.jsx)(I,{name:`loader-4`,className:`h-3 w-3 animate-spin text-muted-foreground flex-shrink-0`}),(0,U.jsx)(`span`,{className:`typography-micro font-medium whitespace-nowrap text-muted-foreground`,children:f(m?`common.unavailable`:`common.loading`)})]}),t[23]=r,t[24]=w,t[25]=a,t[26]=u,t[27]=L,t[28]=M,t[29]=D,t[30]=p,t[31]=m,t[32]=j,t[33]=d,t[34]=f,t[35]=B):B=t[35];let fe;t[36]===z?fe=t[37]:(fe=z(),t[36]=z,t[37]=fe);let pe;return t[38]!==B||t[39]!==fe?(pe=(0,U.jsxs)(U.Fragment,{children:[B,fe]}),t[38]=B,t[39]=fe,t[40]=pe):pe=t[40],pe};function ut(e){return e.agents}function dt(e){return e.loadAgents}function ft(e){return e.loadAgents}function pt(e){return e.isMobile}function mt(e){e&&N.getState().refreshCatalogsOnPickerOpen({source:`agentSelector:desktopMenu`})}var ht=8,gt=e=>typeof e!=`number`||Number.isNaN(e)?``:new Intl.NumberFormat(ie(),{notation:`compact`,compactDisplay:`short`,maximumFractionDigits:1}).format(e),_t=(e,t,n)=>{let r=e.find(e=>e.id===t)?.models?.find(e=>e.id===n);return r?.variants?Object.keys(r.variants):[]},vt=e=>{let t=(0,W.c)(160),{open:n,onClose:r,selectedProviderID:i,selectedModelID:a,resolveSelectedVariant:o,onSelect:s,providers:c,favoriteModels:l,recentModels:u,hiddenModels:d,allowedProviderIds:f,allowedModelIdsByProvider:p,providerOrder:m,variantSelectionEnabled:h,isFavorite:g,onToggleFavorite:_,getMetadata:v,view:y,onViewChange:b}=e,x;t[0]===d?x=t[1]:(x=d===void 0?[]:d,t[0]=d,t[1]=x);let S=x,C=h===void 0||h,{t:w}=re(),T=H.useId(),[E,D]=H.useState(``),O;t[2]===i?O=t[3]:(O=()=>new Set(i?[i]:[]),t[2]=i,t[3]=O);let[k,A]=H.useState(O),[j,M]=H.useState(null),[ee,te]=H.useState(`model`),[ne,ie]=H.useState(null),ae=H.useRef(!1),oe=y??ee,se,le;t[4]!==n||t[5]!==i?(se=()=>{n&&!ae.current&&A(new Set(i?[i]:[])),n||(D(``),M(null),te(`model`),ie(null)),ae.current=n},le=[n,i],t[4]=n,t[5]=i,t[6]=se,t[7]=le):(se=t[6],le=t[7]),H.useEffect(se,le);let N;t[8]===b?N=t[9]:(N=e=>{te(e),b?.(e)},t[8]=b,t[9]=N);let P=N,ue;t[10]===f?ue=t[11]:(ue=f&&f.length>0?new Set(f):null,t[10]=f,t[11]=ue);let R=ue,B;t[12]===p?B=t[13]:(B=p?new Map(Object.entries(p).map(yt)):null,t[12]=p,t[13]=B);let fe=B,ve;t[14]===S?ve=t[15]:(ve=new Set(S.map(bt)),t[14]=S,t[15]=ve);let ye=ve,be;t[16]===c?be=t[17]:(be=new Map(c.map(xt)),t[16]=c,t[17]=be);let xe=be,Se;bb0:{if(!m?.length){Se=c;break bb0}let e;t[18]===m?e=t[19]:(e=new Map(m.map(St)),t[18]=m,t[19]=e);let n=e,r;if(t[20]!==c||t[21]!==n){let e;t[23]===n?e=t[24]:(e=(e,t)=>{let r=n.get(e.id),i=n.get(t.id);return r===void 0&&i===void 0?0:r===void 0?1:i===void 0?-1:r-i},t[23]=n,t[24]=e),r=[...c].sort(e),t[20]=c,t[21]=n,t[22]=r}else r=t[22];Se=r}let Ce=Se,we;t[25]!==fe||t[26]!==R||t[27]!==ye?(we=(e,t)=>R&&!R.has(e)||fe&&fe.get(e)?.has(t)!==!0?!1:!ye.has(`${e}:${t}`),t[25]=fe,t[26]=R,t[27]=ye,t[28]=we):we=t[28];let G=we,Te;t[29]!==xe||t[30]!==E?(Te=e=>{let t=E.trim();if(!t)return!0;let n=xe.get(e.providerID)?.name||e.providerID,r=ce(e.model,e.modelID,{maxLength:40});return ge(r,t)||ge(e.modelID,t)||ge(n,t)},t[29]=xe,t[30]=E,t[31]=Te):Te=t[31];let K=Te,Ee;if(t[32]!==l||t[33]!==G||t[34]!==K){let e;t[36]!==G||t[37]!==K?(e=e=>G(e.providerID,e.modelID)&&K(e),t[36]=G,t[37]=K,t[38]=e):e=t[38],Ee=l.filter(e),t[32]=l,t[33]=G,t[34]=K,t[35]=Ee}else Ee=t[35];let De=Ee,Oe;if(t[39]!==G||t[40]!==K||t[41]!==u){let e;t[43]!==G||t[44]!==K?(e=e=>G(e.providerID,e.modelID)&&K(e),t[43]=G,t[44]=K,t[45]=e):e=t[45],Oe=u.filter(e),t[39]=G,t[40]=K,t[41]=u,t[42]=Oe}else Oe=t[42];let q=Oe,ke;if(t[46]!==R||t[47]!==G||t[48]!==Ce||t[49]!==E){let e;t[51]===R?e=t[52]:(e=e=>!R||R.has(e.id),t[51]=R,t[52]=e);let n;t[53]!==G||t[54]!==E?(n=e=>{let t=E.trim().length>0&&(ge(e.name||e.id,E.trim())||ge(e.id,E.trim()));return{provider:e,models:(e.models??[]).filter(n=>{let r=typeof n.id==`string`?n.id:``;return!r||!G(e.id,r)?!1:t||!E.trim()?!0:ge(ce(n,r,{maxLength:40}),E.trim())||ge(r,E.trim())})}},t[53]=G,t[54]=E,t[55]=n):n=t[55],ke=Ce.filter(e).map(n).filter(Ct),t[46]=R,t[47]=G,t[48]=Ce,t[49]=E,t[50]=ke}else ke=t[50];let Ae=ke,je;t[56]===w?je=t[57]:(je=e=>{if(!e?.trim())return w(`chat.modelControls.default`);let t=e.trim();return/^\d+(\.\d+)?$/.test(t)?t:t.charAt(0).toUpperCase()+t.slice(1)},t[56]=w,t[57]=je);let J=je,Me;t[58]===w?Me=t[59]:(Me=e=>{let t=[];e?.tool_call&&t.push({key:`tool_call`,icon:`tools`,label:w(`chat.modelControls.capability.toolCalling`)}),e?.reasoning&&t.push({key:`reasoning`,icon:`brain-ai-3`,label:w(`chat.modelControls.capability.reasoning`)});let n={text:{icon:`text`,label:w(`chat.modelControls.modality.text`)},image:{icon:`file-image`,label:w(`chat.modelControls.modality.image`)},video:{icon:`file-video`,label:w(`chat.modelControls.modality.video`)},audio:{icon:`file-music`,label:w(`chat.modelControls.modality.audio`)},pdf:{icon:`file-pdf`,label:w(`chat.modelControls.modality.pdf`)}};for(let r of[...e?.modalities?.input??[],...e?.modalities?.output??[]]){let e=r.trim().toLowerCase(),i=n[e];i&&!t.some(t=>t.key===e)&&t.push({key:e,...i})}return t},t[58]=w,t[59]=Me);let Y=Me,Ne;t[60]===P?Ne=t[61]:(Ne=(e,t,n)=>{ie(n===void 0?{providerID:e,modelID:t}:{providerID:e,modelID:t,variant:n}),P(`variant`)},t[60]=P,t[61]=Ne);let Pe=Ne,X;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(X={onPointerDown:pe,onClickCapture:wt},t[62]=X):X=t[62];let Z=X,Fe;t[63]!==j||t[64]!==J||t[65]!==v||t[66]!==Y||t[67]!==g||t[68]!==s||t[69]!==_||t[70]!==Pe||t[71]!==xe||t[72]!==c||t[73]!==o||t[74]!==a||t[75]!==i||t[76]!==w||t[77]!==C?(Fe=(e,t)=>{let n=t===void 0?{}:t,{model:r,providerID:l,modelID:u}=e,d=`${l}:${u}`,f=l===i&&u===a,p=me(l,r,v?.(l,u)),m=C?_t(c,l,u):[],h=o(l,u),y=n.preferRememberedVariant&&e.variant!==void 0&&m.includes(e.variant)?e.variant:void 0,b=y===void 0?h:y,x=f||y===void 0?h:y,S=[void 0,...m].slice(0,ht),T=j===d,E=Y(p),D=p?.limit?.context?`${gt(p.limit.context)} ctx`:null;return(0,U.jsxs)(`div`,{className:F(`border-b border-border/30 last:border-b-0`,f&&`bg-interactive-selection/15 text-interactive-selection-foreground`),children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,U.jsx)(`button`,{type:`button`,...Z,onClick:()=>s(l,u,b),className:`flex min-w-0 flex-1 items-start gap-2 rounded-lg text-left focus:outline-none focus-visible:ring-1 focus-visible:ring-primary`,children:(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[n.showProvider?(0,U.jsx)(`span`,{className:`truncate text-[10px] leading-none text-muted-foreground/60`,children:xe.get(l)?.name||l}):null,(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,U.jsx)(he,{modelId:u,providerId:l,className:`size-3.5 flex-shrink-0`}),(0,U.jsx)(`span`,{className:`truncate typography-meta font-medium text-foreground`,children:ce(r,u,{maxLength:40})}),f?(0,U.jsx)(I,{name:`check`,className:`size-4 flex-shrink-0 text-primary`}):null]}),D||E.length>0?(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden typography-micro text-muted-foreground`,children:[D?(0,U.jsx)(`span`,{className:`flex-shrink-0 whitespace-nowrap`,children:D}):null,D&&E.length>0?(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px flex-shrink-0 bg-border/50`}):null,(0,U.jsx)(`div`,{className:`flex min-w-0 items-center gap-1 overflow-hidden whitespace-nowrap pl-0.5`,children:E.map(e=>{let{key:t,icon:n,label:r}=e;return(0,U.jsx)(`span`,{className:`flex size-4 flex-shrink-0 items-center justify-center text-muted-foreground`,title:r,"aria-label":r,children:(0,U.jsx)(I,{name:n,className:`size-3`})},`${d}-${t}`)})})]}):null]})}),m.length>0?(0,U.jsxs)(`button`,{type:`button`,...Z,onClick:()=>M(e=>e===d?null:d),className:`flex flex-shrink-0 items-center gap-0.5 typography-micro font-medium text-muted-foreground hover:text-foreground`,"aria-expanded":T,"aria-label":w(T?`chat.modelControls.hideThinkingModes`:`chat.modelControls.showThinkingModes`),children:[(0,U.jsx)(`span`,{className:`whitespace-nowrap`,children:J(x)}),(0,U.jsx)(I,{name:T?`arrow-down-s`:`arrow-right-s`,className:`size-3.5`})]}):null,(0,U.jsx)(`button`,{type:`button`,...Z,onClick:e=>{e.preventDefault(),e.stopPropagation(),_(l,u)},className:F(`model-favorite-button flex size-5 flex-shrink-0 items-center justify-center hover:text-primary/80`,g(l,u)?`text-primary`:`text-muted-foreground`),"aria-label":g(l,u)?w(`chat.modelControls.unfavoriteAria`):w(`chat.modelControls.favoriteAria`),title:g(l,u)?w(`chat.modelControls.removeFromFavorites`):w(`chat.modelControls.addToFavorites`),children:(0,U.jsx)(I,{name:g(l,u)?`star-fill`:`star`,className:`size-4`})})]}),T&&m.length>0?(0,U.jsx)(`div`,{className:`border-t border-border/30 p-2`,children:(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[S.map(e=>{let t=e===x||!e&&!x;return(0,U.jsx)(`button`,{type:`button`,...Z,onClick:()=>s(l,u,e),className:F(`inline-flex items-center rounded-full border px-2.5 py-1 typography-meta font-medium`,t?`border-primary/30 bg-primary/10 text-foreground`:`border-border/40 text-muted-foreground hover:bg-interactive-hover/50`),"aria-pressed":t,children:J(e)},`${d}-${e??`default`}`)}),S.length<m.length+1?(0,U.jsx)(`button`,{type:`button`,...Z,onClick:()=>Pe(l,u,x),className:`inline-flex items-center rounded-full border border-border/40 px-2.5 py-1 typography-meta font-medium text-muted-foreground hover:bg-interactive-hover/50`,"aria-label":w(`chat.modelControls.moreThinkingModes`),children:w(`inlineComment.actions.showMore`)}):null]})}):null]},`mobile-model-${d}`)},t[63]=j,t[64]=J,t[65]=v,t[66]=Y,t[67]=g,t[68]=s,t[69]=_,t[70]=Pe,t[71]=xe,t[72]=c,t[73]=o,t[74]=a,t[75]=i,t[76]=w,t[77]=C,t[78]=Fe):Fe=t[78];let Ie=Fe,Le,Re,ze,Be,Ve,He,Q,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,$;if(t[79]!==oe||t[80]!==k||t[81]!==De||t[82]!==Ae||t[83]!==q||t[84]!==J||t[85]!==T||t[86]!==r||t[87]!==s||t[88]!==n||t[89]!==c||t[90]!==E||t[91]!==Ie||t[92]!==o||t[93]!==a||t[94]!==i||t[95]!==P||t[96]!==w||t[97]!==ne){let e=ne??(oe===`variant`&&i&&a?{providerID:i,modelID:a}:null),l=e?_t(c,e.providerID,e.modelID):[],u;bb1:{if(!e){u=void 0;break bb1}if(e.providerID===i&&e.modelID===a){u=o(e.providerID,e.modelID);break bb1}u=(e.variant!==void 0&&l.includes(e.variant)?e.variant:void 0)??o(e.providerID,e.modelID)}let d=u,f=De.length>0||q.length>0||Ae.length>0,p=oe===`variant`&&!!e;Re=V,qe=`mobile-model-picker-sheet-${T}`,Je=n,t[117]===r?Ye=t[118]:(Ye=e=>{e||r()},t[117]=r,t[118]=Ye),t[119]!==p||t[120]!==P||t[121]!==w?(Xe=p?(0,U.jsx)(L,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>P(`model`),"aria-label":w(`onboarding.common.actions.back`),children:(0,U.jsx)(I,{name:`arrow-left`,className:`size-5`})}):void 0,t[119]=p,t[120]=P,t[121]=w,t[122]=Xe):Xe=t[122],t[123]!==p||t[124]!==w?(Ze=w(p?`chat.modelControls.thinking`:`chat.modelControls.selectModel`),t[123]=p,t[124]=w,t[125]=Ze):Ze=t[125],t[126]===w?Qe=t[127]:(Qe=w(`mobile.surface.closeAria`),t[126]=w,t[127]=Qe),t[128]===w?$e=t[129]:($e=w(`mobile.sessions.sheet.resizeAria`),t[128]=w,t[129]=$e),$=`px-2`,Ge=`flex min-h-0 flex-1 flex-col gap-2`,t[130]!==p||t[131]!==E||t[132]!==w?(Ke=p?null:(0,U.jsxs)(`div`,{className:`relative z-10 shrink-0`,"data-mobile-sheet-no-dismiss":``,"data-mobile-sheet-search":``,children:[(0,U.jsx)(I,{name:`search`,className:`pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,U.jsx)(_e,{type:`text`,value:E,onChange:e=>{D(e.target.value),M(null)},onPointerUp:Tt,placeholder:w(`chat.modelControls.searchProvidersOrModels`),className:`h-9 rounded-xl border-border/40 bg-[var(--surface-elevated)] pl-7 typography-meta`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,enterKeyHint:`search`,inputMode:`search`}),E?(0,U.jsx)(`button`,{type:`button`,onClick:()=>{D(``),M(null)},className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,"aria-label":w(`chat.modelControls.clearSearch`),children:(0,U.jsx)(I,{name:`close-circle`,className:`size-4`})}):null]}),t[130]=p,t[131]=E,t[132]=w,t[133]=Ke):Ke=t[133],Le=de,Ve=!0,He=!0,Q=!0,Ue=`min-h-0 flex-1`,We=`overscroll-contain`,ze=`flex flex-col gap-2`,Be=p&&e?(0,U.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:[void 0,...l].map(t=>{let n=t===d||!t&&!d;return(0,U.jsxs)(`button`,{type:`button`,className:F(`flex w-full items-center justify-between gap-2 rounded-xl border px-2 py-1.5 text-left focus:outline-none focus-visible:ring-1 focus-visible:ring-primary`,n?`border-primary/30 bg-primary/10`:`border-border/40`),...Z,onClick:()=>s(e.providerID,e.modelID,t),children:[(0,U.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:J(t)}),n?(0,U.jsx)(I,{name:`check`,className:`size-4 flex-shrink-0 text-primary`}):null]},t??`default`)})}):(0,U.jsxs)(U.Fragment,{children:[f?null:(0,U.jsx)(`div`,{className:`px-3 py-8 text-center typography-meta text-muted-foreground`,children:w(`chat.modelControls.noProvidersOrModelsFound`)}),De.length>0?(0,U.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,U.jsxs)(`div`,{className:`px-2 py-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,U.jsx)(I,{name:`star-fill`,className:`mr-1.5 inline-block size-3 text-primary`}),w(`chat.modelControls.favorites`)]}),(0,U.jsx)(`div`,{className:`flex flex-col border-t border-border/30`,children:De.map(e=>Ie(e,{showProvider:!0,preferRememberedVariant:!0}))})]}):null,q.length>0?(0,U.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,U.jsxs)(`div`,{className:`px-2 py-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,U.jsx)(I,{name:`time`,className:`mr-1.5 inline-block size-3`}),w(`chat.modelControls.recent`)]}),(0,U.jsx)(`div`,{className:`flex flex-col border-t border-border/30`,children:q.map(e=>Ie(e,{showProvider:!0,preferRememberedVariant:!0}))})]}):null,Ae.map(e=>{let{provider:t,models:n}=e,r=k.has(t.id)||E.trim().length>0;return(0,U.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,U.jsxs)(`button`,{type:`button`,...Z,onClick:()=>{E.trim()||A(e=>{let n=new Set(e);return n.has(t.id)?n.delete(t.id):n.add(t.id),n})},className:`flex w-full items-center justify-between gap-1.5 px-2 py-1.5 text-left`,"aria-expanded":r,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(z,{providerId:t.id,className:`size-3.5`}),(0,U.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:t.name||t.id}),t.id===i?(0,U.jsx)(`span`,{className:`typography-micro text-primary/80`,children:w(`chat.modelControls.current`)}):null]}),(0,U.jsx)(I,{name:r?`arrow-down-s`:`arrow-right-s`,className:`size-3 text-muted-foreground`})]}),r?(0,U.jsx)(`div`,{className:`flex flex-col border-t border-border/30`,children:n.map(e=>Ie({model:e,providerID:t.id,modelID:e.id}))}):null]},t.id)})]}),t[79]=oe,t[80]=k,t[81]=De,t[82]=Ae,t[83]=q,t[84]=J,t[85]=T,t[86]=r,t[87]=s,t[88]=n,t[89]=c,t[90]=E,t[91]=Ie,t[92]=o,t[93]=a,t[94]=i,t[95]=P,t[96]=w,t[97]=ne,t[98]=Le,t[99]=Re,t[100]=ze,t[101]=Be,t[102]=Ve,t[103]=He,t[104]=Q,t[105]=Ue,t[106]=We,t[107]=Ge,t[108]=Ke,t[109]=qe,t[110]=Je,t[111]=Ye,t[112]=Xe,t[113]=Ze,t[114]=Qe,t[115]=$e,t[116]=$}else Le=t[98],Re=t[99],ze=t[100],Be=t[101],Ve=t[102],He=t[103],Q=t[104],Ue=t[105],We=t[106],Ge=t[107],Ke=t[108],qe=t[109],Je=t[110],Ye=t[111],Xe=t[112],Ze=t[113],Qe=t[114],$e=t[115],$=t[116];let et;t[134]!==ze||t[135]!==Be?(et=(0,U.jsx)(`div`,{className:ze,children:Be}),t[134]=ze,t[135]=Be,t[136]=et):et=t[136];let tt;t[137]!==Le||t[138]!==Ve||t[139]!==He||t[140]!==Q||t[141]!==Ue||t[142]!==We||t[143]!==et?(tt=(0,U.jsx)(Le,{useScrollShadow:Ve,disableHorizontal:He,preventOverscroll:Q,outerClassName:Ue,className:We,children:et}),t[137]=Le,t[138]=Ve,t[139]=He,t[140]=Q,t[141]=Ue,t[142]=We,t[143]=et,t[144]=tt):tt=t[144];let nt;t[145]!==Ge||t[146]!==Ke||t[147]!==tt?(nt=(0,U.jsxs)(`div`,{className:Ge,children:[Ke,tt]}),t[145]=Ge,t[146]=Ke,t[147]=tt,t[148]=nt):nt=t[148];let rt;return t[149]!==Re||t[150]!==qe||t[151]!==Je||t[152]!==Ye||t[153]!==Xe||t[154]!==Ze||t[155]!==Qe||t[156]!==$e||t[157]!==$||t[158]!==nt?(rt=(0,U.jsx)(Re,{id:qe,open:Je,onOpenChange:Ye,leading:Xe,ariaLabel:Ze,closeAriaLabel:Qe,resizeAriaLabel:$e,bodyClassName:$,children:nt}),t[149]=Re,t[150]=qe,t[151]=Je,t[152]=Ye,t[153]=Xe,t[154]=Ze,t[155]=Qe,t[156]=$e,t[157]=$,t[158]=nt,t[159]=rt):rt=t[159],rt};function yt(e){let[t,n]=e;return[t,new Set(n)]}function bt(e){return`${e.providerID}:${e.modelID}`}function xt(e){return[e.id,e]}function St(e,t){return[e,t]}function Ct(e){return e.models.length>0}function wt(e){B(e)||(e.preventDefault(),e.stopPropagation())}function Tt(e){e.currentTarget.focus({preventScroll:!0})}var Et=e=>{let t=(0,W.c)(217),{providerId:r,modelId:i,variant:a,onChange:o,className:s,allowedProviderIds:c,allowedModelIdsByProvider:l,placeholder:u,tooltipsEnabled:d,dropdownPortalToBody:f,showIcon:p,providers:m}=e,h=d===void 0||d,g=f!==void 0&&f,_=p===void 0||p,{t:v}=re(),{isReady:y,isUnavailable:b}=it(),x=N(Dt),S=m??x,C=N(Ot),w=n(kt),T=n(At),E=n(jt),D=n(Mt),O=n(Nt),k=n(Pt),A;t[0]!==i||t[1]!==r?(A={currentProviderID:r,currentModelID:i},t[0]=i,t[1]=r,t[2]=A):A=t[2];let{favoriteModelsList:j,recentModelsList:M}=fe(A),{isMobile:ee}=ye(),te=w||ee,[ie,ae]=H.useState(!1),[oe,se]=H.useState(!1),ce;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(ce=()=>{ae(!0),N.getState().refreshCatalogsOnPickerOpen({source:`modelSelector:mobilePanel`})},t[3]=ce):ce=t[3];let le=ne(ce),P;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(P=e=>{se(e),e&&N.getState().refreshCatalogsOnPickerOpen({source:`modelSelector:desktopMenu`})},t[4]=P):P=t[4];let ue=ne(P),[L,de]=H.useState(``),[z,B]=H.useState(null),V=a!==void 0,pe;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(pe=()=>{ae(!1),se(!1),de(``),B(null)},t[5]=pe):pe=t[5];let me=pe,ge;t[6]===S?ge=t[7]:(ge=e=>{let t=S.find(t=>t.id===e.providerID)?.models?.find(t=>t.id===e.modelID);return t?.variants?Object.keys(t.variants):[]},t[6]=S,t[7]=ge);let _e=ge,ve;t[8]!==O||t[9]!==_e||t[10]!==i||t[11]!==o||t[12]!==r||t[13]!==a||t[14]!==V?(ve=e=>{let t=_e(e),n=e.providerID===r&&e.modelID===i,s=e.variant!==void 0&&t.includes(e.variant)?e.variant:void 0,c=n&&a&&t.includes(a)?a:s??``;o(e.providerID,e.modelID,V?c:void 0),O(e.providerID,e.modelID,V&&c||void 0),me()},t[8]=O,t[9]=_e,t[10]=i,t[11]=o,t[12]=r,t[13]=a,t[14]=V,t[15]=ve):ve=t[15];let be=ve,xe;t[16]!==o||t[17]!==V?(xe=()=>{o(``,``,V?``:void 0),me()},t[16]=o,t[17]=V,t[18]=xe):xe=t[18];let Se=xe,Ce;t[19]!==O||t[20]!==o||t[21]!==z?(Ce=e=>{z&&(o(z.providerID,z.modelID,e),O(z.providerID,z.modelID,e||void 0),me())},t[19]=O,t[20]=o,t[21]=z,t[22]=Ce):Ce=t[22];let we=Ce,G;t[23]===v?G=t[24]:(G=v(`settings.agents.modelSelector.searchPlaceholder`),t[23]=v,t[24]=G);let Te;t[25]===v?Te=t[26]:(Te=v(`settings.agents.modelSelector.state.noModelsFound`),t[25]=v,t[26]=Te);let K;t[27]===v?K=t[28]:(K=v(`settings.agents.modelSelector.section.favorites`),t[27]=v,t[28]=K);let Ee;t[29]===v?Ee=t[30]:(Ee=v(`settings.agents.modelSelector.section.recent`),t[29]=v,t[30]=Ee);let De;t[31]===v?De=t[32]:(De=v(`settings.agents.modelSelector.keyboardHints`),t[31]=v,t[32]=De);let Oe;t[33]!==u||t[34]!==v?(Oe=u||v(`settings.agents.modelSelector.notSelected`),t[33]=u,t[34]=v,t[35]=Oe):Oe=t[35];let q;t[36]===v?q=t[37]:(q=v(`settings.agents.modelSelector.actions.favorite`),t[36]=v,t[37]=q);let ke;t[38]===v?ke=t[39]:(ke=v(`settings.agents.modelSelector.actions.unfavorite`),t[38]=v,t[39]=ke);let Ae;t[40]===v?Ae=t[41]:(Ae=v(`chat.modelControls.provider`),t[40]=v,t[41]=Ae);let je;t[42]===v?je=t[43]:(je=v(`chat.modelControls.capabilities`),t[42]=v,t[43]=je);let J;t[44]===v?J=t[45]:(J=v(`chat.modelControls.capability.toolCalling`),t[44]=v,t[45]=J);let Me;t[46]===v?Me=t[47]:(Me=v(`chat.modelControls.capability.reasoning`),t[46]=v,t[47]=Me);let Y;t[48]===v?Y=t[49]:(Y=v(`chat.modelControls.modality.image`),t[48]=v,t[49]=Y);let Ne;t[50]===v?Ne=t[51]:(Ne=v(`chat.modelControls.modality.video`),t[50]=v,t[51]=Ne);let Pe;t[52]===v?Pe=t[53]:(Pe=v(`chat.modelControls.modality.audio`),t[52]=v,t[53]=Pe);let X;t[54]===v?X=t[55]:(X=v(`chat.modelControls.costPerMillion`),t[54]=v,t[55]=X);let Z;t[56]===v?Z=t[57]:(Z=v(`chat.modelControls.costInput`),t[56]=v,t[57]=Z);let Fe;t[58]===v?Fe=t[59]:(Fe=v(`chat.modelControls.costOutput`),t[58]=v,t[59]=Fe);let Ie;t[60]!==G||t[61]!==Te||t[62]!==K||t[63]!==Ee||t[64]!==De||t[65]!==Oe||t[66]!==q||t[67]!==ke||t[68]!==Ae||t[69]!==je||t[70]!==J||t[71]!==Me||t[72]!==Y||t[73]!==Ne||t[74]!==Pe||t[75]!==X||t[76]!==Z||t[77]!==Fe?(Ie={searchPlaceholder:G,noResults:Te,favorites:K,recent:Ee,keyboardHint:De,notSelected:Oe,favorite:q,unfavorite:ke,provider:Ae,capabilities:je,capabilityToolCalling:J,capabilityReasoning:Me,modalityImage:Y,modalityVideo:Ne,modalityAudio:Pe,costPerMillion:X,costInput:Z,costOutput:Fe},t[60]=G,t[61]=Te,t[62]=K,t[63]=Ee,t[64]=De,t[65]=Oe,t[66]=q,t[67]=ke,t[68]=Ae,t[69]=je,t[70]=J,t[71]=Me,t[72]=Y,t[73]=Ne,t[74]=Pe,t[75]=X,t[76]=Z,t[77]=Fe,t[78]=Ie):Ie=t[78];let Le=Ie,Re;t[79]!==i||t[80]!==r?(Re=r&&i?{providerID:r,modelID:i}:null,t[79]=i,t[80]=r,t[81]=Re):Re=t[81];let ze=Re,Be;t[82]!==i||t[83]!==u||t[84]!==r||t[85]!==v?(Be=r&&i?`${r}/${i}`:u||v(`settings.agents.modelSelector.notSelected`),t[82]=i,t[83]=u,t[84]=r,t[85]=v,t[86]=Be):Be=t[86];let Ve=Be,He;t[87]!==v||t[88]!==a||t[89]!==V?(He=V?a||v(`chat.modelControls.default`):null,t[87]=v,t[88]=a,t[89]=V,t[90]=He):He=t[90];let Q=He,Ue;t[91]!==i||t[92]!==r||t[93]!==a||t[94]!==V?(Ue=(e,t)=>{if(!(!V||e!==r||t!==i))return a||void 0},t[91]=i,t[92]=r,t[93]=a,t[94]=V,t[95]=Ue):Ue=t[95];let We=Ue,Ge;t[96]!==O||t[97]!==o||t[98]!==V?(Ge=(e,t,n)=>{o(e,t,V?n??``:void 0),O(e,t,V&&n||void 0),me()},t[96]=O,t[97]=o,t[98]=V,t[99]=Ge):Ge=t[99];let Ke=Ge,qe;t[100]!==_e||t[101]!==v||t[102]!==a||t[103]!==V?(qe=(e,t)=>{let n=_e(e);if(!V||n.length===0)return null;let r=e.variant!==void 0&&n.includes(e.variant)?e.variant:void 0,i=t.isSelected?a:r??``;return(0,U.jsxs)(`button`,{type:`button`,className:`flex min-h-9 shrink-0 items-center gap-0.5 rounded-md px-1.5 typography-micro font-medium text-muted-foreground hover:bg-interactive-hover hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),B(e)},"aria-label":v(`chat.modelControls.showThinkingModes`),children:[(0,U.jsx)(`span`,{className:`max-w-24 truncate`,children:i||v(`chat.modelControls.default`)}),(0,U.jsx)(I,{name:`arrow-right-s`,className:`size-3.5`})]})},t[100]=_e,t[101]=v,t[102]=a,t[103]=V,t[104]=qe):qe=t[104];let Je=qe,Ye=te?`max-h-none flex-1`:void 0,Xe=h&&(te?ie:oe),$;t[105]===D?$=t[106]:($=e=>D(e.providerID,e.modelID),t[105]=D,t[106]=$);let et;t[107]!==i||t[108]!==r||t[109]!==E||t[110]!==a?(et=e=>E(e.providerID,e.modelID,e.providerID===r&&e.modelID===i?a||void 0:e.variant),t[107]=i,t[108]=r,t[109]=E,t[110]=a,t[111]=et):et=t[111];let tt;t[112]!==l||t[113]!==c||t[114]!==j||t[115]!==C||t[116]!==be||t[117]!==Se||t[118]!==T||t[119]!==Le||t[120]!==k||t[121]!==S||t[122]!==M||t[123]!==Je||t[124]!==L||t[125]!==ze||t[126]!==Ye||t[127]!==Xe||t[128]!==$||t[129]!==et?(tt=(0,U.jsx)(R,{providers:S,providerOrder:k,favoriteModels:j,recentModels:M,getMetadata:C,searchQuery:L,onSearchQueryChange:de,onSelect:be,labels:Le,selectedModel:ze,hiddenModels:T,allowedProviderIds:c,allowedModelIdsByProvider:l,includeNotSelected:!0,onSelectNone:Se,onEscape:me,maxHeightClassName:Ye,tooltipsEnabled:Xe,isFavorite:$,onToggleFavorite:et,renderRowEnd:Je}),t[112]=l,t[113]=c,t[114]=j,t[115]=C,t[116]=be,t[117]=Se,t[118]=T,t[119]=Le,t[120]=k,t[121]=S,t[122]=M,t[123]=Je,t[124]=L,t[125]=ze,t[126]=Ye,t[127]=Xe,t[128]=$,t[129]=et,t[130]=tt):tt=t[130];let nt=tt,rt;t[131]!==_e||t[132]!==z?(rt=z?_e(z):[],t[131]=_e,t[132]=z,t[133]=rt):rt=t[133];let at=rt,ot;bb0:{if(!z){ot=``;break bb0}if(z.providerID===r&&z.modelID===i){ot=a||``;break bb0}ot=z.variant!==void 0&&at.includes(z.variant)?z.variant:``}let st=ot,ct;t[134]!==we||t[135]!==v||t[136]!==z||t[137]!==st||t[138]!==at?(ct=z?(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`flex min-h-11 items-center gap-2 border-b border-border/40 px-3 text-left typography-ui-label font-medium text-foreground hover:bg-interactive-hover`,onClick:()=>B(null),"aria-label":v(`header.actions.backAria`),children:[(0,U.jsx)(I,{name:`arrow-left`,className:`size-4`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:z.modelID})]}),(0,U.jsx)(`div`,{className:`space-y-1 p-2`,role:`listbox`,"aria-label":v(`chat.modelControls.thinking`),children:[``,...at].map(e=>{let t=st===e;return(0,U.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":t,className:F(`flex min-h-11 w-full items-center justify-between rounded-lg px-3 text-left typography-ui-label transition-colors`,t?`bg-interactive-selection text-interactive-selection-foreground`:`hover:bg-interactive-hover`),onClick:()=>we(e),children:[(0,U.jsx)(`span`,{className:`truncate`,children:e||v(`chat.modelControls.default`)}),t?(0,U.jsx)(I,{name:`check`,className:`size-4 shrink-0`}):null]},e||`__default`)})})]}):null,t[134]=we,t[135]=v,t[136]=z,t[137]=st,t[138]=at,t[139]=ct):ct=t[139];let lt=ct||nt;if(te){let e=y?le:void 0,n=!y,o=!y&&`opacity-60 cursor-not-allowed`,u;t[140]!==s||t[141]!==o?(u=F(`flex w-full items-center justify-between gap-2 rounded-lg border border-border/40 bg-[var(--surface-elevated)] px-2 py-1.5 text-left`,o,s),t[140]=s,t[141]=o,t[142]=u):u=t[142];let d;t[143]!==y||t[144]!==b||t[145]!==i||t[146]!==r||t[147]!==_||t[148]!==v?(d=y?_&&(r||i)?(0,U.jsx)(he,{modelId:i,providerId:r,className:`h-3.5 w-3.5 flex-shrink-0`}):_?(0,U.jsx)(I,{name:`pencil-ai`,className:`h-3 w-3 text-muted-foreground`}):null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,U.jsx)(`span`,{className:`typography-meta text-muted-foreground`,children:v(b?`common.unavailable`:`common.loading`)})]}),t[143]=y,t[144]=b,t[145]=i,t[146]=r,t[147]=_,t[148]=v,t[149]=d):d=t[149];let f;t[150]!==y||t[151]!==Ve?(f=y?(0,U.jsx)(`span`,{className:`typography-meta font-medium text-foreground truncate`,children:Ve}):null,t[150]=y,t[151]=Ve,t[152]=f):f=t[152];let p;t[153]!==y||t[154]!==Q?(p=y&&Q?(0,U.jsx)(`span`,{className:`shrink-0 typography-micro text-muted-foreground`,children:Q}):null,t[153]=y,t[154]=Q,t[155]=p):p=t[155];let m;t[156]!==d||t[157]!==f||t[158]!==p?(m=(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[d,f,p]}),t[156]=d,t[157]=f,t[158]=p,t[159]=m):m=t[159];let h;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,U.jsx)(I,{name:`arrow-down-s`,className:`h-3 w-3 flex-shrink-0 text-muted-foreground`}),t[160]=h):h=t[160];let g;t[161]!==e||t[162]!==n||t[163]!==u||t[164]!==m?(g=(0,U.jsxs)(`button`,{type:`button`,onClick:e,disabled:n,className:u,children:[m,h]}),t[161]=e,t[162]=n,t[163]=u,t[164]=m,t[165]=g):g=t[165];let x;t[166]!==j||t[167]!==i||t[168]!==r||t[169]!==M||t[170]!==E||t[171]!==a?(x=(e,t)=>E(e,t,e===r&&t===i?a||void 0:j.find(n=>n.providerID===e&&n.modelID===t)?.variant??M.find(n=>n.providerID===e&&n.modelID===t)?.variant),t[166]=j,t[167]=i,t[168]=r,t[169]=M,t[170]=E,t[171]=a,t[172]=x):x=t[172];let w;t[173]!==l||t[174]!==c||t[175]!==j||t[176]!==C||t[177]!==Ke||t[178]!==T||t[179]!==D||t[180]!==ie||t[181]!==i||t[182]!==r||t[183]!==k||t[184]!==S||t[185]!==M||t[186]!==We||t[187]!==x||t[188]!==V?(w=(0,U.jsx)(vt,{open:ie,onClose:me,selectedProviderID:r,selectedModelID:i,resolveSelectedVariant:We,onSelect:Ke,providers:S,favoriteModels:j,recentModels:M,getMetadata:C,hiddenModels:T,allowedProviderIds:c,allowedModelIdsByProvider:l,providerOrder:k,variantSelectionEnabled:V,isFavorite:D,onToggleFavorite:x}),t[173]=l,t[174]=c,t[175]=j,t[176]=C,t[177]=Ke,t[178]=T,t[179]=D,t[180]=ie,t[181]=i,t[182]=r,t[183]=k,t[184]=S,t[185]=M,t[186]=We,t[187]=x,t[188]=V,t[189]=w):w=t[189];let O;return t[190]!==g||t[191]!==w?(O=(0,U.jsxs)(U.Fragment,{children:[g,w]}),t[190]=g,t[191]=w,t[192]=O):O=t[192],O}let ut=y&&oe,dt=y?ue:void 0,ft=!y&&`opacity-60 cursor-not-allowed`,pt;t[193]!==s||t[194]!==ft?(pt=F(`border-input data-[placeholder]:text-muted-foreground flex min-w-0 items-center justify-between gap-2 rounded-lg border bg-transparent px-2 py-2 typography-ui-label whitespace-nowrap shadow-none outline-none hover:bg-interactive-hover data-[popup-open]:bg-interactive-active h-6 w-fit`,ft,s),t[193]=s,t[194]=ft,t[195]=pt):pt=t[195];let mt;t[196]!==y||t[197]!==b||t[198]!==i||t[199]!==r||t[200]!==_||t[201]!==v||t[202]!==Ve||t[203]!==Q?(mt=y?(0,U.jsxs)(U.Fragment,{children:[_?r||i?(0,U.jsx)(he,{modelId:i,providerId:r,className:`h-3.5 w-3.5 flex-shrink-0`}):(0,U.jsx)(I,{name:`pencil-ai`,className:`h-3.5 w-3.5 flex-shrink-0 text-muted-foreground`}):null,(0,U.jsx)(`span`,{className:`typography-ui-label min-w-0 flex-1 truncate text-left font-normal text-foreground`,children:Ve}),Q?(0,U.jsx)(`span`,{className:`shrink-0 typography-micro text-muted-foreground`,children:Q}):null]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground flex-shrink-0`}),(0,U.jsx)(`span`,{className:`typography-ui-label font-normal whitespace-nowrap text-muted-foreground`,children:v(b?`common.unavailable`:`common.loading`)})]}),t[196]=y,t[197]=b,t[198]=i,t[199]=r,t[200]=_,t[201]=v,t[202]=Ve,t[203]=Q,t[204]=mt):mt=t[204];let ht;t[205]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,U.jsx)(I,{name:`arrow-down-s`,className:`h-4 w-4 flex-shrink-0 text-muted-foreground/50`}),t[205]=ht):ht=t[205];let gt;t[206]!==pt||t[207]!==mt?(gt=(0,U.jsx)(Qe,{asChild:!0,children:(0,U.jsxs)(`div`,{className:pt,children:[mt,ht]})}),t[206]=pt,t[207]=mt,t[208]=gt):gt=t[208];let _t;t[209]!==g||t[210]!==lt?(_t=(0,U.jsx)($e,{className:`w-[min(380px,calc(100vw-2rem))] p-0 flex flex-col`,align:`start`,portalToBody:g,children:lt}),t[209]=g,t[210]=lt,t[211]=_t):_t=t[211];let yt;return t[212]!==ut||t[213]!==dt||t[214]!==gt||t[215]!==_t?(yt=(0,U.jsxs)(Ze,{open:ut,onOpenChange:dt,children:[gt,_t]}),t[212]=ut,t[213]=dt,t[214]=gt,t[215]=_t,t[216]=yt):yt=t[216],yt};function Dt(e){return e.providers}function Ot(e){return e.getModelMetadata}function kt(e){return e.isMobile}function At(e){return e.hiddenModels}function jt(e){return e.toggleFavoriteModel}function Mt(e){return e.isFavoriteModel}function Nt(e){return e.addRecentModel}function Pt(e){return e.providerOrder}var Ft=e=>e??s()?.github,It=(e=t())=>i.github.auth(e),Lt=async(e,t)=>{if(e)return e.authStatus();let n=await a(`/api/github/auth/status`,{method:`GET`,headers:{Accept:`application/json`},signal:t}),r=await n.json().catch(()=>null);if(!n.ok||!r)throw Error(r?.error||n.statusText||`Failed to load GitHub status`);return r},Rt=(e,n=t())=>{let r=Ft(e);return{queryKey:It(n),queryFn:async({signal:e})=>Lt(r,e),retry:2}},zt=e=>!!e&&typeof e==`object`&&`authStatus`in e,Bt=e=>{let t=(0,W.c)(5),n=zt(e)?e:void 0,r=zt(e)?void 0:e?.enabled,i;t[0]===n?i=t[1]:(i=Rt(n),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a={...i,enabled:r},t[2]=r,t[3]=i,t[4]=a):a=t[4],x(a)},Vt=(e=o,n=t())=>e.getQueryData(It(n))??null,Ht=async(e,n,r)=>t()===r?e.fetchQuery({...Rt(n,r),staleTime:0}):e.getQueryData(It(r))??null,Ut=(e=o,n,r=t())=>{e.setQueryData(It(r),n)},Wt=T.define(te),Gt=j.data.of({commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}}});function Kt(e){let t=e.trim().toLowerCase();switch(t){case`bash`:case`sh`:case`zsh`:case`shell`:case`shellsession`:case`console`:return Wt;case`json`:case`jsonc`:case`json5`:return A().language;case`js`:case`javascript`:return O().language;case`jsx`:return O({jsx:!0}).language;case`ts`:case`typescript`:return O({typescript:!0}).language;case`tsx`:return O({typescript:!0,jsx:!0}).language;case`html`:return k().language;case`css`:return D().language;case`py`:case`python`:return ee().language;case`md`:case`markdown`:case`mdown`:case`mkd`:return M().language;case`heex`:case`eex`:case`leex`:return k().language;default:return E.matchLanguageName(be,t,!0)}}var qt=e=>e.split(`/`).pop()?.toLowerCase()??``,Jt=e=>{let t=qt(e);return t?E.matchFilename(be,t):null},Yt=()=>S(w.define([{tag:[C.heading1,C.heading2,C.heading3,C.heading4,C.heading5,C.heading6],fontWeight:`600`},{tag:C.strong,fontWeight:`600`},{tag:C.emphasis,fontStyle:`italic`},{tag:C.strikethrough,textDecoration:`line-through`},{tag:[C.link,C.url],color:`var(--markdown-link, currentColor)`,textDecoration:`underline`},{tag:C.monospace,color:`var(--markdown-inline-code, currentColor)`,backgroundColor:`var(--markdown-inline-code-bg, transparent)`},{tag:C.quote,color:`var(--markdown-blockquote, currentColor)`,fontStyle:`italic`},{tag:C.list,color:`color-mix(in srgb, var(--muted-foreground) 40%, var(--foreground) 60%)`},{tag:C.heading,color:`var(--markdown-heading1, currentColor)`}]));function Xt(e){let t=e.toLowerCase();switch(qt(t)){case`makefile`:case`gnumakefile`:return Wt}let n=t.lastIndexOf(`.`),r=n>=0?t.slice(n+1):``;switch(r){case`ts`:case`tsx`:case`mts`:case`cts`:return O({typescript:!0,jsx:r===`tsx`});case`js`:case`jsx`:case`mjs`:case`cjs`:return O({typescript:!1,jsx:r===`jsx`});case`jsonc`:case`json5`:return[A(),Gt];case`json`:case`jsonl`:case`ndjson`:case`geojson`:return A();case`css`:case`scss`:case`sass`:case`less`:return D();case`html`:case`htm`:case`xml`:case`drawio`:case`dio`:return k();case`md`:case`mdx`:case`markdown`:case`mdown`:case`mkd`:return[M({codeLanguages:Kt}),Yt()];case`sh`:case`bash`:case`zsh`:case`fish`:case`env`:return Wt;case`py`:case`pyw`:case`pyi`:return ee();default:return null}}async function Zt(e){let t=Jt(e);if(!t)return null;if(t.support)return t.support;try{return await t.load()}catch{return null}}var Qt=60,$t=400;function en(e){let t=e.replace(/\s+/g,` `).trim();if(!t)return[];let n=t.match(/[^.!?…]+[.!?…]+["')\]]*\s*|[^.!?…]+$/g)??[t],r=[],i=``;for(let e of n)for(let t=0;t<e.length;t+=$t){let n=e.slice(t,t+$t);i&&i.length+n.length>$t&&(r.push(i.trim()),i=``),i+=n,i.length>=Qt&&/[.!?…]["')\]]*\s*$/.test(i)&&(r.push(i.trim()),i=``)}if(i.trim()&&r.push(i.trim()),r.length>0&&r[0].length>120){let e=r[0],t=/[,;:]\s/g,n=-1,i;for(;(i=t.exec(e))!==null;){let e=i.index+1;if(!(e<40)){if(e>160)break;n=e;break}}if(n>0){let t=e.slice(0,n).trim(),i=e.slice(n).trim();r.splice(0,1,t,i)}}return r}var tn=null;function nn(){return tn||=new(window.AudioContext||window.webkitAudioContext),tn}function rn(){let[e,t]=(0,H.useState)(!1),[n,r]=(0,H.useState)(null),i=(0,H.useRef)(null),o=(0,H.useRef)(null),s=(0,H.useCallback)(async()=>{try{let e=nn();e.state===`suspended`&&await e.resume();let t=e.createBuffer(1,1,22050),n=e.createBufferSource();n.buffer=t,n.connect(e.destination),n.start(0)}catch{}},[]),c=(0,H.useCallback)(()=>{let e=o.current;if(e&&(e.cancelled=!0,e.abort.abort(),o.current=null),i.current){try{i.current.onended=null,i.current.stop()}catch{}i.current=null}t(!1)},[]),l=(0,H.useCallback)(async(e,n)=>{c();let s=en(e);if(s.length===0){r(`No text to speak`),n?.onError?.(`No text to speak`);return}r(null);let l={cancelled:!1,abort:new AbortController};o.current=l;let u=async e=>{let t=await a(`/api/dictation/tts/speak`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({text:e,...typeof n?.speakerId==`number`?{speakerId:n.speakerId}:{},...typeof n?.speed==`number`?{speed:n.speed}:{}}),signal:l.abort.signal});if(!t.ok){let e=await t.json().catch(()=>({error:`Unknown error`}));throw Error(e.error||`HTTP ${t.status}`)}return(await t.blob()).arrayBuffer()},d=async e=>{let t=nn();t.state===`suspended`&&await t.resume();let n=await t.decodeAudioData(e);l.cancelled||await new Promise(e=>{let r=t.createBufferSource();r.buffer=n,r.connect(t.destination),i.current=r,r.onended=()=>{i.current===r&&(i.current=null),e()},r.start(0)})};try{t(!0),n?.onStart?.();let e=u(s[0]);for(let t=0;t<s.length;t+=1){let n=await e;if(l.cancelled||(t+1<s.length&&(e=u(s[t+1])),await d(n),l.cancelled))return}t(!1),n?.onEnd?.()}catch(e){if(e.name===`AbortError`||l.cancelled)return;let i=e instanceof Error?e.message:`Failed to speak`;r(i),n?.onError?.(i),t(!1)}finally{o.current===l&&(o.current=null)}},[c]);return(0,H.useEffect)(()=>()=>{c()},[c]),{isPlaying:e,error:n,speak:l,stop:c,unlockAudio:s}}var an=new class{recognition=null;isListening=!1;currentLang=`en-US`;onResultCallback=null;onErrorCallback=null;restartOnEnd=!1;conversationMode=!1;isSpeaking=!1;audioContext=null;audioUnlockRequired=!1;isSupported(){let e=`SpeechRecognition`in window||`webkitSpeechRecognition`in window,t=`speechSynthesis`in window;return e&&t}getSupportDetails(){return{recognition:`SpeechRecognition`in window||`webkitSpeechRecognition`in window,synthesis:`speechSynthesis`in window,prefixed:!(`SpeechRecognition`in window)&&`webkitSpeechRecognition`in window,secureContext:window.isSecureContext}}setConversationMode(e){this.conversationMode=e,e||(this.restartOnEnd=!1)}isConversationMode(){return this.conversationMode}pauseListening(){if(this.restartOnEnd=!1,this.recognition)try{this.recognition.stop()}catch{}this.isListening=!1}resumeListening(){if(this.conversationMode,this.onResultCallback,this.isSpeaking,this.currentLang,this.conversationMode&&this.onResultCallback&&!this.isSpeaking)try{this.startListeningSync(this.currentLang,this.onResultCallback,this.onErrorCallback||void 0)}catch(e){console.error(`[BrowserVoiceService] Failed to resume listening:`,e)}}async checkMicrophonePermission(){try{return`permissions`in navigator&&(await navigator.permissions.query({name:`microphone`})).state===`granted`}catch{return!1}}async prepareListening(){if(!this.isSupported())throw Error(`Web Speech API not supported in this browser`);if(typeof navigator>`u`||typeof navigator.mediaDevices?.getUserMedia!=`function`)return!0;try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(e=>e.stop()),!0}catch(e){let t=typeof e==`object`&&e&&`name`in e?String(e.name):``;if(t===`NotAllowedError`)throw Error(`Microphone permission denied`);if(t===`NotFoundError`)throw Error(`No microphone found`);let n=e instanceof Error?e.message:`Unable to access microphone`;throw Error(n)}}startListeningSync(e,t,n){if(!this.isSupported()){let e=`Web Speech API not supported in this browser`;throw n?.(e),Error(e)}this.stopListening();let r=window.SpeechRecognition||window.webkitSpeechRecognition;if(!r){let e=`Web Speech API not supported in this browser`;throw n?.(e),Error(e)}let i=new r;this.recognition=i,this.currentLang=e,this.onResultCallback=t,this.onErrorCallback=n||null,i.continuous=!0,i.interimResults=!0,i.lang=e,i.onstart=()=>{this.isListening=!0,this.restartOnEnd=!0},i.onaudiostart=()=>{},i.onsoundstart=()=>{},i.onresult=e=>{e.results.length;let t=``,n=``;for(let r=e.resultIndex;r<e.results.length;r++){let i=e.results[r];i.isFinal?t+=i[0].transcript:n+=i[0].transcript}n&&this.onResultCallback?.(n,!1),t&&this.onResultCallback?.(t,!0)},i.onerror=e=>{if(e.error===`aborted`)return;let t=this.getErrorMessage(e.error);this.onErrorCallback?.(t),(e.error===`not-allowed`||e.error===`service-not-allowed`||e.error===`network`)&&(this.restartOnEnd=!1,this.isListening=!1)},i.onend=()=>{if(this.isListening=!1,this.restartOnEnd&&this.recognition&&!this.isSpeaking)try{this.recognition.start()}catch{}};try{i.start()}catch(e){let t=e instanceof Error?e.message:`Failed to start speech recognition`;throw n?.(t),Error(t)}}async startListening(e,t,n){this.startListeningSync(e,t,n)}stopListening(){if(this.restartOnEnd=!1,this.recognition){try{this.recognition.stop()}catch{}this.recognition=null}this.isListening=!1}getIsListening(){return this.isListening}getCurrentLang(){return this.currentLang}async resumeAudioContext(){this.audioContext||=new(window.AudioContext||window.webkitAudioContext),this.audioContext.state===`suspended`&&await this.audioContext.resume()}isAudioUnlockRequired(){return this.audioUnlockRequired}async unlockAudio(){try{let e=new Audio;if(e.src=`data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA`,e.volume=.01,await e.play(),await this.resumeAudioContext(),this.isMobileDevice()&&`speechSynthesis`in window){let e=new SpeechSynthesisUtterance(``);e.volume=0,window.speechSynthesis.speak(e),window.speechSynthesis.cancel()}return this.audioUnlockRequired=!1,!0}catch(e){return console.error(`[BrowserVoiceService] Failed to unlock audio:`,e),!1}}async speakText(e,t,n,r){if(!(`speechSynthesis`in window))throw Error(`Speech synthesis not supported`);await this.resumeAudioContext();let i=await this.waitForVoices();await new Promise(e=>setTimeout(e,50)),this.isSpeaking=!0,this.pauseListening(),window.speechSynthesis.cancel();let a=new SpeechSynthesisUtterance(e);a.lang=t,a.rate=r?.rate??1,a.pitch=r?.pitch??1,a.volume=r?.volume??1;let o=null;return r?.voiceName&&(o=i.find(e=>e.name===r.voiceName)||null,o?`${o.name}${o.lang}`:console.warn(`[BrowserVoiceService] Selected voice "${r.voiceName}" not found, falling back to language match`)),o||(o=this.findBestVoice(i,t),o?`${o.name}${o.lang}`:console.warn(`[BrowserVoiceService] No voice found for language: ${t}, using default`)),o&&(a.voice=o),`${e.length}${t}`,new Promise((e,t)=>{let r=!1;a.onstart=()=>{r=!0,e()},a.onend=()=>{this.isSpeaking=!1,n?.()},a.onerror=e=>{this.isSpeaking=!1,console.error(`[BrowserVoiceService] Speech synthesis error:`,e.error),(e.error===`not-allowed`||e.error===`interrupted`)&&(this.audioUnlockRequired=!0);let n=`Speech synthesis error: ${e.error||`unknown`}`;e.error===`not-allowed`?n=`Audio blocked by browser autoplay policy. Please interact with the page first.`:e.error===`interrupted`&&(n=`Speech was interrupted. Please try again.`),t(Error(n))},setTimeout(()=>{r||(console.warn(`[BrowserVoiceService] Speech start timeout - audio may be blocked`),this.audioUnlockRequired=!0)},2e3),window.speechSynthesis.speak(a)})}cancelSpeech(){`speechSynthesis`in window&&window.speechSynthesis.cancel()}getVoices(){return`speechSynthesis`in window?window.speechSynthesis.getVoices():[]}async waitForVoices(){if(!(`speechSynthesis`in window))return[];let e=window.speechSynthesis.getVoices();return e.length>0?e:new Promise(e=>{let t=()=>{e(window.speechSynthesis.getVoices()),window.speechSynthesis.onvoiceschanged=null};window.speechSynthesis.onvoiceschanged=t,setTimeout(()=>{e(window.speechSynthesis.getVoices()),window.speechSynthesis.onvoiceschanged=null},1e3)})}findBestVoice(e,t){let n=e.find(e=>e.lang===t);if(!n){let r=t.split(`-`)[0];n=e.find(e=>e.lang.startsWith(r))}return n||=e.find(e=>e.lang.startsWith(t.split(`-`)[0])&&e.localService),n||null}isMobileDevice(){if(typeof navigator>`u`)return!1;let e=navigator.userAgent.toLowerCase();return/iphone|ipad|ipod|android|mobile|webos|blackberry|iemobile|opera mini/i.test(e)}isIOSSafari(){if(typeof navigator>`u`)return!1;let e=navigator.userAgent.toLowerCase(),t=/iphone|ipad|ipod/i.test(e),n=/safari/i.test(e)&&!/chrome|crios|crmo/i.test(e);return t&&n}getErrorMessage(e){let t=this.isMobileDevice(),n=this.isIOSSafari();return{"no-speech":`No speech detected`,aborted:`Speech recognition aborted`,"audio-capture":`No microphone found`,network:`Network error - check connection`,"not-allowed":t?`Microphone permission denied. Check Settings > Safari > Microphone`:`Microphone permission denied`,"service-not-allowed":n?`Speech recognition requires a user gesture. Please tap the microphone button again.`:`Speech recognition service not allowed`,"bad-grammar":`Grammar error`,"language-not-supported":`Language not supported`}[e]||`Speech recognition error: ${e}`}},on=e=>{if(e===`12h`)return!0;if(e===`24h`)return!1},sn=(e,t,n={})=>{let r=e instanceof Date?e:new Date(e);return Number.isFinite(r.getTime())?r.toLocaleTimeString(ie(),{hour:n.hour??`numeric`,minute:`2-digit`,second:n.precision===`second`?`2-digit`:void 0,hour12:on(t)}):n.fallback??``},cn=(e,t,n)=>{let r=e instanceof Date?e:new Date(e);return Number.isFinite(r.getTime())?r.toLocaleString(ie(),{...n,hour12:n.hour?on(t):n.hour12}):``},ln=H.memo(function(e){let t=(0,W.c)(24),{checked:n,onChange:r,disabled:i,ariaLabel:a,className:o,iconClassName:s}=e,c=i!==void 0&&i,l;t[0]!==n||t[1]!==c||t[2]!==r?(l=e=>{e.preventDefault(),e.stopPropagation(),!c&&!n&&r()},t[0]=n,t[1]=c,t[2]=r,t[3]=l):l=t[3];let u=l,d;t[4]!==n||t[5]!==c||t[6]!==r?(d=e=>{(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),!c&&!n&&r())},t[4]=n,t[5]=c,t[6]=r,t[7]=d):d=t[7];let f=d,p=n?`bg-[color-mix(in_srgb,var(--primary-base)_80%,transparent)] shadow-none hover:bg-[var(--primary-base)]`:`bg-[var(--surface-muted)] shadow-[inset_0_0_0_1px_var(--interactive-border)] hover:bg-[var(--interactive-hover)]`,m;t[8]!==o||t[9]!==p?(m=F(`group/radio relative flex h-[14px] w-[14px] min-h-[14px] min-w-[14px] shrink-0 self-center items-center justify-center rounded-full outline-none`,`transition-[background-color,box-shadow] duration-200 ease-out`,p,`focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] focus-visible:ring-offset-1 focus-visible:ring-offset-background`,`disabled:cursor-not-allowed disabled:opacity-50`,o),t[8]=o,t[9]=p,t[10]=m):m=t[10];let h=!n&&`opacity-0`,g;t[11]!==s||t[12]!==h?(g=F(`block h-[5px] w-[5px] rounded-full bg-white`,h,s),t[11]=s,t[12]=h,t[13]=g):g=t[13];let _;t[14]===g?_=t[15]:(_=(0,U.jsx)(`span`,{"aria-hidden":!0,className:g}),t[14]=g,t[15]=_);let v;return t[16]!==a||t[17]!==n||t[18]!==c||t[19]!==u||t[20]!==f||t[21]!==m||t[22]!==_?(v=(0,U.jsx)(`button`,{type:`button`,role:`radio`,onClick:u,onKeyDown:f,disabled:c,"aria-checked":n,"aria-label":a,className:m,children:_}),t[16]=a,t[17]=n,t[18]=c,t[19]=u,t[20]=f,t[21]=m,t[22]=_,t[23]=v):v=t[23],v});export{He as A,X as B,rt as C,qe as D,We as E,Be as F,K as G,G as H,Q as I,we as K,Le as L,Ie as M,Re as N,Ke as O,ze as P,Ve as R,tt as S,Ge as T,Ee as U,Oe as V,Te as W,Ze as _,rn as a,nt as b,Zt as c,Ut as d,Bt as f,it as g,lt as h,an as i,Ue as j,q as k,Vt as l,vt as m,cn as n,Kt as o,Et as p,sn as r,Xt as s,ln as t,Ht as u,$e as v,Qe as w,et as x,$ as y,Ne as z};