@openchambery/web 1.19.7-beta.11 → 1.19.7-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AgentAvatar-Di8F4QJh.js → AgentAvatar-Dp_hbVcD.js} +1 -1
- package/dist/assets/AssistantView-CQHey6je.js +1 -0
- package/dist/assets/{ChatContainer-DlO3RRGp.js → ChatContainer-C04WuLo8.js} +28 -28
- package/dist/assets/{ContextPanel-Q64Mvmgj.js → ContextPanel-BJEFzgz7.js} +14 -14
- package/dist/assets/DiagramView-iX3nhWaN.js +1 -0
- package/dist/assets/FadeInOnReveal-BWJcUp5P.js +1 -0
- package/dist/assets/Icon-4My8YZwt.js +1 -0
- package/dist/assets/MarkdownRendererImpl-tDry9J76.js +7 -0
- package/dist/assets/MarkstreamRendererImpl-BDVGi72n.js +1 -0
- package/dist/assets/MobileDetailNavigation-Dcl7Upvc.js +1 -0
- package/dist/assets/MobileShareBridge-BQ79cuPX.js +4 -0
- package/dist/assets/MobileSurface-CpAbBAQ5.js +2 -0
- package/dist/assets/{MultiRunWindow-CUmvJNmC.js → MultiRunWindow-CzMbzYD3.js} +1 -1
- package/dist/assets/OnboardingScreen-CuvjeXSo.js +1 -0
- package/dist/assets/OverlayScrollbar-BZB21Yp_.js +2 -0
- package/dist/assets/SettingsView-DRiEDi23.js +25 -0
- package/dist/assets/{SettingsWindow-CfJ8Wy0Q.js → SettingsWindow-DqwoBYvU.js} +1 -1
- package/dist/assets/TerminalView-4pFqXfvj.js +8 -0
- package/dist/assets/{ToolOutputDialog-0IxCuq0J.js → ToolOutputDialog-GmD4kIoH.js} +3 -3
- package/dist/assets/{appThemeRegistry-DkKIgrgm.js → appThemeRegistry-BlEYFhXM.js} +2 -2
- package/dist/assets/{button-z0GOBtWi.js → button-Or0daT9o.js} +1 -1
- package/dist/assets/clipboard-Bu0lpyX1.js +1 -0
- package/dist/assets/{collapsible-D9zJRpeB.js → collapsible-C-kzSGkq.js} +1 -1
- package/dist/assets/desktopHosts-BzSE0sK7.js +1 -0
- package/dist/assets/desktopRelayRestore-BaKjk1kQ.js +1 -0
- package/dist/assets/{diagram-CoEqmReY.js → diagram-D0mT3mo1.js} +1 -1
- package/dist/assets/{dialog-x2hirWBd.js → dialog-D21YndEx.js} +1 -1
- package/dist/assets/fileQueries-DFY6Kiy1.js +1 -0
- package/dist/assets/fileReferenceActions-3pPDAJSl.js +1 -0
- package/dist/assets/{gitApi-CeRlAeu_.js → gitApi-CciB055B.js} +1 -1
- package/dist/assets/{input-BG3VWTIF.js → input-BUsGnzwe.js} +1 -1
- package/dist/assets/insertionBoundaries-DcS10A9Q.js +4 -0
- package/dist/assets/main-Coj1Z4LN.js +29 -0
- package/dist/assets/main-DYFky6Uj.js +2 -0
- package/dist/assets/markdown-worker-wEFz5Hm_.js +3 -0
- package/dist/assets/markdownHeightCache-Bj707yG-.js +2 -0
- package/dist/assets/markdownTheme-E_Ina01F.js +2 -0
- package/dist/assets/miniChat-DK-d_3-7.js +2 -0
- package/dist/assets/mobile-8QzXy5wz.js +2 -0
- package/dist/assets/multirun-BFHWrDOR.js +4 -0
- package/dist/assets/outsideFileGrants-BB4GPvCq.js +1 -0
- package/dist/assets/path-utils-jGozTg9d.js +1 -0
- package/dist/assets/persistence-CSZp1CNB.js +3 -0
- package/dist/assets/platform-CenlWqxu.js +2 -0
- package/dist/assets/projectMeta-CEGa4Czs.js +3 -0
- package/dist/assets/radio-Bw11T40N.js +1 -0
- package/dist/assets/renderElectronMiniChatApp-_fchgm-8.js +2 -0
- package/dist/assets/renderMobileApp-B1j1BUXB.js +28 -0
- package/dist/assets/runtimeConfig-DNsnUkyp.js +2 -0
- package/dist/assets/runtimeEndpointReset-C-Sm4wpj.js +4 -0
- package/dist/assets/{shikiHighlight-D26Z8GUK.js → shikiHighlight-GaNLBDUk.js} +1 -1
- package/dist/assets/sortable-tabs-strip-Biow4Fqu.js +1 -0
- package/dist/assets/src-BGao3JmJ.css +2 -0
- package/dist/assets/terminalApi-CIIs9vFx.js +1 -0
- package/dist/assets/{tooltip-CtH61mQh.js → tooltip-BSrJYYYc.js} +1 -1
- package/dist/assets/url-CE_gAfNa.js +1 -0
- package/dist/assets/useAppFontEffects-D0UWTJui.js +7 -0
- package/dist/assets/useAssistantUIStore-BHacrxe_.js +1 -0
- package/dist/assets/useDesktopWindowControlsLayout-_5M7NHJ8.js +1 -0
- package/dist/assets/{useEffectiveDirectory-J-DxxWnv.js → useEffectiveDirectory-DqOLKISv.js} +1 -1
- package/dist/assets/useFontPreferences-BxOHKuVw.js +1 -0
- package/dist/assets/useMobileNavigationStore-DxH1DjU-.js +412 -0
- package/dist/assets/useSessionAutoCleanup-Dpp0-zw2.js +1 -0
- package/dist/assets/useUIStore-CqqO11ZI.js +1 -0
- package/dist/assets/useWorkerHighlightedLines-BaNK-wuY.js +7 -0
- package/dist/assets/utils-B0mQXN9L.js +1 -0
- package/dist/assets/{vendor-markstream-react-CwvbEg9R.js → vendor-markstream-react-C3K8YH0d.js} +4 -4
- package/dist/index.html +9 -11
- package/dist/mini-chat.html +9 -11
- package/dist/mobile.html +9 -11
- package/package.json +1 -1
- package/dist/assets/AssistantView-CgIVx0WK.js +0 -1
- package/dist/assets/DiagramView-CdlE8flr.js +0 -1
- package/dist/assets/FadeInOnReveal-CV2s6YN8.js +0 -1
- package/dist/assets/Icon-CLpn1mIz.js +0 -1
- package/dist/assets/MarkdownRendererImpl-DxbQ83lm.js +0 -7
- package/dist/assets/MarkstreamRendererImpl-BRvprELo.js +0 -1
- package/dist/assets/MobileDetailNavigation-DDMR6cv3.js +0 -1
- package/dist/assets/MobileShareBridge-DQxOVFCr.js +0 -4
- package/dist/assets/MobileSurface-Dl_XC-FA.js +0 -2
- package/dist/assets/OnboardingScreen-D6rtE7rj.js +0 -1
- package/dist/assets/OverlayScrollbar-DlNZho3q.js +0 -2
- package/dist/assets/SettingsView-DgliMZkT.js +0 -25
- package/dist/assets/TerminalView-BC2aKRX7.js +0 -8
- package/dist/assets/clipboard-D35XSwID.js +0 -1
- package/dist/assets/desktop-CfLlmafK.js +0 -1
- package/dist/assets/desktopHosts-C1Ns3DUu.js +0 -1
- package/dist/assets/desktopRelayRestore-8pvI_dSc.js +0 -1
- package/dist/assets/fileQueries-DGHZqZHc.js +0 -1
- package/dist/assets/insertionBoundaries-DaYvfIJ_.js +0 -4
- package/dist/assets/main-CJs9U3nT.js +0 -29
- package/dist/assets/main-G1Aq8Rb1.js +0 -2
- package/dist/assets/markdown-worker-y3ewaqAK.js +0 -4
- package/dist/assets/markdownHeightCache-CvUyZT4q.js +0 -1
- package/dist/assets/markdownTheme-SPe4jOwX.js +0 -2
- package/dist/assets/miniChat-caXjDzel.js +0 -2
- package/dist/assets/mobile-BIaA9j5G.js +0 -2
- package/dist/assets/multirun-h-VSzid2.js +0 -4
- package/dist/assets/persistence-w-AiX2i4.js +0 -3
- package/dist/assets/platform-4eCmsdol.js +0 -2
- package/dist/assets/projectMeta-FUTkzc-g.js +0 -3
- package/dist/assets/radio-BOdIrExy.js +0 -1
- package/dist/assets/renderElectronMiniChatApp-BMdzQ0Ia.js +0 -2
- package/dist/assets/renderMobileApp-CAW-bjY9.js +0 -28
- package/dist/assets/runtime-switch-BkpTTbEi.js +0 -1
- package/dist/assets/runtimeConfig-CH-lTGVj.js +0 -2
- package/dist/assets/runtimeEndpointReset-Cv7hp9sG.js +0 -4
- package/dist/assets/sortable-tabs-strip-CNDgyX0B.js +0 -1
- package/dist/assets/src-DZt1nWf5.css +0 -2
- package/dist/assets/terminalApi-CGtOtc8I.js +0 -1
- package/dist/assets/url-KeihbE0d.js +0 -1
- package/dist/assets/useAppFontEffects-UStZqP0A.js +0 -7
- package/dist/assets/useAssistantUIStore-I0VWrB5V.js +0 -1
- package/dist/assets/useDesktopWindowControlsLayout-vPm1nK0I.js +0 -1
- package/dist/assets/useFontPreferences-BLZ3y6mN.js +0 -1
- package/dist/assets/useMobileNavigationStore-BBfU6rSs.js +0 -412
- package/dist/assets/useSessionAutoCleanup-DsURtSbC.js +0 -1
- package/dist/assets/useUIStore-CNLmCoPU.js +0 -1
- package/dist/assets/useWorkerHighlightedLines-BV1tolmO.js +0 -7
- package/dist/assets/utils-CTL16t2f.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{C as t,E as n,t as r}from"./useUIStore-CqqO11ZI.js";import{kn as i}from"./persistence-CSZp1CNB.js";import{a,i as o,r as s}from"./vendor-zustand-B4dlGEM2.js";import{C as c,E as l,G as u,S as d,W as f,_ as p,b as m,g as h,h as g,m as _,nt as v,p as y,rt as b,tt as x,v as S,w as C,x as w,y as T}from"./vendor-base-ui-CnHfUmDN.js";import{Ct as E,Nt as D}from"./platform-CenlWqxu.js";import{n as O}from"./vendor-react-DLPElpoQ.js";import{n as k}from"./vendor-reactuses-core-DDoDDyM9.js";import{n as A,r as j}from"./clipboard-Bu0lpyX1.js";import{Gn as M,Jn as N,Ka as P,Kn as F,Un as I,Yn as L,b as R,bo as z,l as B,qn as V,ta as ee}from"./useMobileNavigationStore-DxH1DjU-.js";import{t as H}from"./utils-B0mQXN9L.js";import{n as U}from"./Icon-4My8YZwt.js";import{t as te}from"./button-Or0daT9o.js";import{k as ne,l as W,v as G,x as K}from"./gitApi-CciB055B.js";import{t as re}from"./input-BUsGnzwe.js";import{i as ie,n as ae,t as q}from"./tooltip-BSrJYYYc.js";import{i as oe,t as se}from"./OverlayScrollbar-BZB21Yp_.js";import{_ as ce,l as le,o as ue,s as de,t as fe,v as pe,y as me}from"./vendor-dnd-kit-core-CvWxUPdb.js";import{n as he,o as ge,s as _e,t as ve}from"./vendor-dnd-kit-sortable-hHdP9lLb.js";var J=O(),Y=e(b(),1),X=v(),ye=Y.memo(function(e){let t=(0,J.c)(20),{checked:n,onChange:r,disabled:i,indeterminate:a,ariaLabel:o,className:s,iconClassName:c}=e,l=i!==void 0&&i,d=n||a,p;t[0]===r?p=t[1]:(p=e=>r(!!e),t[0]=r,t[1]=p);let m=d?`border-[color:color-mix(in_srgb,var(--primary-base)_65%,var(--interactive-border))] bg-transparent shadow-none hover:bg-[var(--interactive-hover)] hover:border-[color:color-mix(in_srgb,var(--primary-base)_75%,var(--interactive-border))]`:`border-[var(--interactive-border)] bg-transparent shadow-none hover:bg-[var(--interactive-hover)] hover:border-[var(--interactive-border)]`,h;t[2]!==s||t[3]!==m?(h=H(`group/checkbox relative flex shrink-0 self-center items-center justify-center rounded-[4px] border outline-none`,`h-[14px] w-[14px] min-h-[14px] min-w-[14px]`,`transition-[background-color,border-color,box-shadow] duration-200 ease-out`,m,`focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)] focus-visible:ring-offset-1 focus-visible:ring-offset-transparent`,`disabled:cursor-not-allowed disabled:opacity-50`,s),t[2]=s,t[3]=m,t[4]=h):h=t[4];let g;t[5]===c?g=t[6]:(g=H(`flex items-center justify-center text-[var(--primary-base)]`,`data-[unchecked]:hidden`,c),t[5]=c,t[6]=g);let _;t[7]===a?_=t[8]:(_=a?(0,X.jsx)(U,{name:`subtract`,className:H(`h-[10px] w-[10px] min-h-[10px] min-w-[10px]`,`text-[var(--primary-base)]`)}):(0,X.jsx)(U,{name:`check`,className:H(`h-[10px] w-[10px] min-h-[10px] min-w-[10px]`,`text-[var(--primary-base)]`)}),t[7]=a,t[8]=_);let v;t[9]!==g||t[10]!==_?(v=(0,X.jsx)(f,{keepMounted:!0,className:g,children:_}),t[9]=g,t[10]=_,t[11]=v):v=t[11];let y;return t[12]!==o||t[13]!==n||t[14]!==l||t[15]!==a||t[16]!==p||t[17]!==h||t[18]!==v?(y=(0,X.jsx)(u,{checked:n,onCheckedChange:p,disabled:l,indeterminate:a,"aria-label":o,className:h,children:v}),t[12]=o,t[13]=n,t[14]=l,t[15]=a,t[16]=p,t[17]=h,t[18]=v,t[19]=y):y=t[19],y}),be=e(x(),1),xe=0,Se=()=>{xe=Date.now()+800},Ce=()=>Date.now()<xe,we=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAgKADAAQAAAABAAAAgAAAAABrRiZNAAANr0lEQVR4Ae2cC/AVVR3HNR7xEhEJRB5RqGVCoilYliSOJI2akUTqIIUpCCb2GPMFoqKZMJplE5KKVmRBNqZUIFINSFmigZAKJP5HA+JhIikgKvX5/oedWZa7d8/Zu3vvnnvPb+bL3T37O7/ze5w953fO2T8HHODJe8B7wHvAe8B7wHvAe8B7wHvAe8B7wHvAe8B7wHvAe6BePNASQw6OM+Y9cQ98eV14oBVWDClnie8A5bzj9jPFdgJ4FbweZ4rvAHGecb98KibsBE+7b4q3wNYD06gwG7Swrej53ffAdzDhRdDNfVO8BbYeuIkK74KyiZ+tUM/vhgduQM3/gRvdUNdrmaUHguAvQWjbLAV7WcX3QBD811D12OKr6zXM0gNB8DX0fz1LwV5W8T0QDv7jqNu6+Cp7DbPyQDj42xE6IK1gHRQ0AukwpAfoBXoCrZEPBSrXm3Mg2APeBNvAVrARNIENe69381sEUvAnhxTRps/y0L2/xAOHgzPBLeAx8BLQtqjmShuoUyi5ehb8EkwEA0F7UAsKv/myYwU4qBaKFLHNPiilw495YBOwCbQN7zvIfg7cBYaCDqAaFA2+NnzOrkbDRW7jvSj3WfALoFMvm0BmxavOoOD0A3mRRrKovr+lrGEP89ph/JfB30DUMbW6/y+6zAWDQZYUffNln6azQVk24oosJa0XAB1x1irQSe2+jW4Pg5NBpVQq+Gpf+UjD0SeweCFICkBRnu9C17uBVh1pKC74Wo2clEagq3U6oriOOHeAogTXRo8m9B4F2gBTigu+2p0PGmbu1zxXpHneJvBh3uexoz8woXLBl8xzTYTUA88lGKFNmbAjXbt+Ev3HAG04mVBS8NchxFSWSXuF5NHS7g7gWrADfbVPsABojS5bTCkp+JL/A1NhrvKpdyvDDZyZ968SNS3fAug+bZvKUeaAwcCWTIIvvYbZCk7iL9JZQGeU1YbO6UlKp3iuPf61YBXQfPxPsAVo80iB05avEqu2oBPoBo4ARwPN3UeBuO1fTVPqtD8GWp7akoIf3tuPq7+BB8viHrperuBnvcT7NzIVmNFAAWwN0pDqfQhcBB4BrwG9ja+AW8GRIC2ZvvlqTzt/dUl6sx4FMjILLEXOxaAHyIM0MpwHKpU/CRk29k7Nw5hay2yBAvdYOiLOaX9AjhKvVqDodB0KxtkRVz6i6Eal0e/qFI6IOkjz+heBOpMLlCb472DYiS4YZ6PjUJh3gmhATe/fou50oPzBFUoTfPlDiWYfV4w00VPzpzY1TIMd5XuRumeYNFQgnm9XYO966h5SIFsqUuVAas8G0aCa3v+Juh8ALtE3UFYfcJjaGOVbS924ZahLfmjWVfO11t1RI03uH6Kea1uh+ly7kuDLL8pz2gDnSfO1erNJsKM8Cr4+BHGJFPy0nT1s/0rk2GwrF9ZHN6JZ2DDT63nUq9a3d1k5L4s3P/DPcyilXUqnqQ/abwWBUaa/f6dOV+ASfQ1lKx32w/5RwuzaC7BfvG6nJGyUyfVm6nx0P0nFLpiAem8DE/tMebSt3aXYZpfXrjePXwWmBotPc+do4BLlEXz5QqeVR7rkiKiuaXb8HkSIloyu0HgU1Y6dTSc35dV0MsgVR0T11Pr1eWBqrPg2gb7AFcrrzQ/7bLgrzojqeRYFtkuhq6JCCnyf55sf7gBXFtgHZVX7GU/DhiRdr4FfH2W4QKZvvpK4B8Ct4PcgzVRxL/Wco0PReANICnr4uZZQLpDpm6+PUvpEDBrJvRK7sN1J10vhd+5zcA3/SYaFn+srGxeWOyZv/nZsmVgmaNMsfaNRpBtwiu5E23CAk651vFt0MnnzV2DEJxMM6cfzHSDJJ8FzTRsfT5BZqMct0eYpEBiQ9Ks/eRpUKAv2V+ZSipI2ee6H5337V92vRMP5IpDkl/BzdT5n6P1oGnxAGTYi7voZ+It84JEUfNk61jI6Oi+I80ep8lmW8mvK/hlL426rqbblG08K/l+pfkJ5ESWfHkepvmwqFexSZXpJNLI6QfoIopQRcWVnFNSqpOD/EL0PTql7O+q9AOJ8Ei3fDO9hKduqerWZFobpnKBH1TVMbnAcLHFz/iaejU4WkcgxF45ooOPulQimGWkSlciDYaGFYUoWiza0KbhKTEsFYzHlyuKzoMkIKdVGXFmmW8J5bSzor2lMMuHAgau5UO8uCin4d4NWEYV0KHMHGAZWRZ6lvV1rWbG7JX9Z9rzeuja0ekjZlvd92LTvbU3vLqR1BT+6IllP2RXgVyBLkly97aYnn5nmAHmNAEpuBFPSdnERSG++cpdo8BdQNgRkHXxENn8l9ZYuDMnmxUoUmVcHaEvLmgZMSUlgrWkUCswA4eArB5gKzgFrQB60C6FKNE2pvSmjCV9eU4Dk2nSunSbK5sjzJWRr2NfUFVATF5eDR4OCnH6V+9jkP6ZThZG6NkEyEpiSSXNgrUjBvw9o1AroES5OBXkHP2ivZr95dQANacqYTalWf9gZDb5GomvBuaAJVIO00oiuNsq1m+nLktcUYDuvdSxncU7PosFfTTsTgA5oqkkdaMwmX9J3BJlRXiPAm2gomNJhpowZ8Y1Ezr0gGPbncD0EVDv4NNn8/YPNCPAfVcqK8uoAGgF0OmZKvUwZM+DTmz8LaJn6BtCJ3HmgVkvR3rRtk9hthj8zymsKUA6wyULLIyx4K2END/srEHQZeKISgRnUPcpShjaOnKAfoaUSFhOsgy/vPEDDvjZcpM/9wGarGvbc6HdINvGReLQvMSA3TTIWrDW0jWHHZ9x+WJzefI1K28DY8IMaX3ei/ZeBqZ80TXWpsc7GzWsdvQeYGqcOkwcp+O8CnTiekEcDFcg8hbrSzdRHS+HNK2+rwIzSVbtTvAWYGjcfXptkqHSr+5aO4FZr+xkg7Ucb+0rM9m4q4kz9I767sm0+X2nqqYuBqYGvw5tlMng+8v4FxoAiks4clgNT/4hPNjlFN6OtjYFXZWTdBchZCPLMKypVdTAClJeY+mc7vC79vWSzfz7NvzZ5wAvwH9RcM/0/w6l6C1CCVWR6AOVMgy8+jaYaVZ0ibXPqGNXG0EtTWijnDARnpqxfzWofpjFNeTZ+uaaaCmbZ1u2WhmoUSJOw6Si3a5aK5yhrJrJtgq9Etn+O+uQq+iSk7wY2Bk/KVaPaCh9A87Z/GLqIOs4N/4GbW3LxBLDpABoejwsE1NGvjr3nARtfiHeU6z7Qnrut0dr0yPTzpwI48asp/LCWOkVPaBNdq6RHx8O2neB7iZLdYTgaVXVAZuuDq90xMV7TVjx6JoXxWkLqIw3XqSMGLAG2wX+FOq4ktokx+mkKB8hhyoB1Xu8qad7/CbANvvivcNXoUnpfn9IJcoR2zE4uJbTgZTrbmAbSBH8l9SrdFCuUe8aldIScdw/oXChrzJT5Lmxpgq8Tws+ZNeEO15iUztB5goZRl6g1yiqBTRN81ZnlkrGmuiqZs3GINo8mmgovEJ+StrnAxtYw7zrqHl4gezJT5QYLp+jk6/zMWq6eoE/R1HIQDqjNtTq9C2cZqTw629AxWiufnqqF2lVSsjYJ2G7xRjvHlNqZkG/L+vhBWW3U4Oj9GnhOzFeVTKVrf/7z4CkQtcX2Xn+boP2SuqRjsSr4IjfOMXJi34ysz/vgRB36LDAfxNljU74EOZ1A3ZKGx3IOkSO7ZWC9vge4D+jw6VvgGJDlCkJb2pKbxRsf+ONp5PUEdUv6C5x/gMDg6K9yg0o2PBRg5QwPg10gLF/nD0+C6UBfCumPMEzbagNvbzAUTAF/BJXO8WHddL0KZDXqIcqesv4Kt5QGIyjU/FaKtFa+Eminz5YUoLPBOHCqYeUd8G0E68EGsAVoxaGNF00b6qzacOqxF1qO5TU0L0O2fNME6pYUJBka7fn6DxGuSWm1vha6BJSSG22nqPcL0F+dq+5pPBZGg6C38OIUluut1GixGkRlunQ/A/3bg7qnXlioYTYcnK3cn2Np+Ufgvw1o2A7Lcu16G/rrhWgIUmI2F4SD9DL3p1harxzlK+ANEJbl2vVf0H8gaBi6DEvDQVrBfb8KrNcoEO1QYflFvda3jdeDDhXY7lxVndsrsw6CsphrTQdZkKaPP4NAdlF/leQ+BAaAhiIFWtu5QWB+zbWWVVmSVhaaFpaBoJ2i/Go5+Rg4DTQcaYNlEQiCMZNrBSsvkuwvADk8ugEU6FCtX20QzQFDQENSS6yeDQKH38S1EsFq0fE0dDPQjuMeEOiR56+GeX3oOhkoR2lo+j7Wy9k68Lm8hp5oR9taaagDLgFbQZadYDPyNMpdCwYBHQo5TVpmVUrXIUAO1zA4FjwIikCyrSc4BvQHWoX0Bd2BdhPVWRRAbQEHpNFDnVhfImvdrn2Ml4BWMSuBRhjtR9QNVdoBvoknpoON4ELwOCg6dUBBdQChLWgN5AeNFLuBgq/lm6D9B08xHriIcjltDfhYDI8vrlMPjMYuBX8Z+GCd2ujNivHAcMqVAWv51TWGxxfXqQeGYZeSpJ8DzaWeGsgDWl4pMboTaN3vqYE8oD1tLYmmNJDN3tS9HlCS9ywY7z3SeB7ogsm/ASMbz3RvsXbKtMN3mndF43mgBSYPBQ13nt14oS5tsY5aO5d+5Eu9B7wHvAe8B7wHvAe8B7wHvAe8B7wHvAe8B7wHvAe8B1z0wP8B0FCW2NdmSosAAAAASUVORK5CYII=`,Te=`data:image/svg+xml,%3csvg%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='M4.709%2015.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0%2011.784l.055-.352.48-.321.686.06%201.52.103%202.278.158%201.652.097%202.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686%201.908%201.476%202.491%201.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97%202.97%200%2001-.104-.729L6.283.134%206.696%200l.996.134.42.364.62%201.414%201.002%202.229%201.555%203.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286%201.851-.559%202.903-.364%201.942h.212l.243-.242.985-1.306%201.652-2.064.73-.82.85-.904.547-.431h1.033l.76%201.129-.34%201.166-1.064%201.347-.881%201.142-1.264%201.7-.79%201.36.073.11.188-.02%202.856-.606%201.543-.28%201.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061%201.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093%201.068%202.006%201.81%202.509%202.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649%202.345%203.521.122%201.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674%207.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434%201.967-2.18%202.945-1.726%201.845-.414.164-.717-.37.067-.662.401-.589%202.388-3.036%201.44-1.882.93-1.086-.006-.158h-.055L4.132%2018.56l-1.13.146-.487-.456.061-.746.231-.243%201.908-1.312-.006.006z'%20fill='%23D97757'%20fill-rule='nonzero'%3e%3c/path%3e%3c/svg%3e`,Z=`data:image/svg+xml,%3csvg%20fill='currentColor'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.106%205.68L12.5.135a.998.998%200%2000-.998%200L1.893%205.68a.84.84%200%2000-.419.726v11.186c0%20.3.16.577.42.727l9.607%205.547a.999.999%200%2000.998%200l9.608-5.547a.84.84%200%2000.42-.727V6.407a.84.84%200%2000-.42-.726zm-.603%201.176L12.228%2022.92c-.063.108-.228.064-.228-.061V12.34a.59.59%200%2000-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264%200%20.428.286.296.514z'/%3e%3c/svg%3e`,Ee=`data:image/svg+xml,%3csvg%20fill='currentColor'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.106%205.68L12.5.135a.998.998%200%2000-.998%200L1.893%205.68a.84.84%200%2000-.419.726v11.186c0%20.3.16.577.42.727l9.607%205.547a.999.999%200%2000.998%200l9.608-5.547a.84.84%200%2000.42-.727V6.407a.84.84%200%2000-.42-.726zm-.603%201.176L12.228%2022.92c-.063.108-.228.064-.228-.061V12.34a.59.59%200%2000-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264%200%20.428.286.296.514z'/%3e%3c/svg%3e`,De=`data:image/svg+xml,%3csvg%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDeepSeek%3c/title%3e%3cpath%20d='M23.748%204.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434%201.202-.422%201.84.027%201.436.633%202.58%201.838%203.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526%205.526%200%2001-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365%2011.365%200%2000-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055%203.055%200%2001-.465.137%209.597%209.597%200%2000-2.883-.102c-1.885.21-3.39%201.102-4.497%202.623C.082%208.606-.231%2010.684.152%2012.85c.403%202.284%201.569%204.175%203.36%205.653%201.858%201.533%203.997%202.284%206.438%202.14%201.482-.085%203.133-.284%204.994-1.86.47.234.962.327%201.78.397.63.059%201.236-.03%201.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926%201.096-1.296%202.746-2.642%203.392-7.003.05-.347.007-.565%200-.845-.004-.17.035-.237.23-.256a4.173%204.173%200%20001.545-.475c1.396-.763%201.96-2.015%202.093-3.517.02-.23-.004-.467-.247-.588zM11.581%2018c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696%204.696%200%20011.529-.039c2.132.312%203.946%201.265%205.468%202.774.868.86%201.525%201.887%202.202%202.891.72%201.066%201.494%202.082%202.48%202.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306%200%2001.415-.287.302.302%200%2001.2.288.306.306%200%2001-.31.307.303.303%200%2001-.304-.308zm3.11%201.596c-.2.081-.399.151-.59.16a1.245%201.245%200%2001-.798-.254c-.274-.23-.47-.358-.552-.758a1.73%201.73%200%2001.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559%200%2001-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136%201.146.016.352.144.618.408%201.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'%20fill='%234D6BFE'%3e%3c/path%3e%3c/svg%3e`,Oe=`data:image/svg+xml,%3csvg%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDoubao%3c/title%3e%3cpath%20d='M5.31%2015.756c.172-3.75%201.883-5.999%202.549-6.739-3.26%202.058-5.425%205.658-6.358%208.308v1.12C1.501%2021.513%204.226%2024%207.59%2024a6.59%206.59%200%20002.2-.375c.353-.12.7-.248%201.039-.378.913-.899%201.65-1.91%202.243-2.992-4.877%202.431-7.974.072-7.763-4.5l.002.001z'%20fill='%231E37FC'%3e%3c/path%3e%3cpath%20d='M22.57%2010.283c-1.212-.901-4.109-2.404-7.397-2.8.295%203.792.093%208.766-2.1%2012.773a12.782%2012.782%200%2001-2.244%202.992c3.764-1.448%206.746-3.457%208.596-5.219%202.82-2.683%203.353-5.178%203.361-6.66a2.737%202.737%200%2000-.216-1.084v-.002z'%20fill='%2337E1BE'%3e%3c/path%3e%3cpath%20d='M14.303%201.867C12.955.7%2011.248%200%209.39%200%207.532%200%205.883.677%204.545%201.807%202.791%203.29%201.627%205.557%201.5%208.125v9.201c.932-2.65%203.097-6.25%206.357-8.307.5-.318%201.025-.595%201.569-.829%201.883-.801%203.878-.932%205.746-.706-.222-2.83-.718-5.002-.87-5.617h.001z'%20fill='%23A569FF'%3e%3c/path%3e%3cpath%20d='M17.305%204.961a199.47%20199.47%200%2001-1.08-1.094c-.202-.213-.398-.419-.586-.622l-1.333-1.378c.151.615.648%202.786.869%205.617%203.288.395%206.185%201.898%207.396%202.8-1.306-1.275-3.475-3.487-5.266-5.323z'%20fill='%231E37FC'%3e%3c/path%3e%3c/svg%3e`,ke=`data:image/svg+xml,%3csvg%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M37%2020.034C27.8809%2020.5837%2020.5808%2027.8809%2020.0326%2037H19.966C19.4163%2027.8809%2012.1177%2020.5837%203%2020.034V19.9674C12.1191%2019.4163%2019.4163%2012.1191%2019.966%203H20.0326C20.5822%2012.1191%2027.8809%2019.4163%2037%2019.9674V20.034Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ae=`data:image/svg+xml,%3csvg%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGemma%3c/title%3e%3cdefs%3e%3clinearGradient%20id='lobe-icons-gemma-_R_0_'%20x1='24.419%25'%20x2='75.194%25'%20y1='75.581%25'%20y2='25.194%25'%3e%3cstop%20offset='0%25'%20stop-color='%23446EFF'%3e%3c/stop%3e%3cstop%20offset='36.661%25'%20stop-color='%232E96FF'%3e%3c/stop%3e%3cstop%20offset='83.221%25'%20stop-color='%23B1C5FF'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M12.34%205.953a8.233%208.233%200%2001-.247-1.125V3.72a8.25%208.25%200%20015.562%202.232H12.34zm-.69%200c.113-.373.199-.755.257-1.145V3.72a8.25%208.25%200%2000-5.562%202.232h5.304zm-5.433.187h5.373a7.98%207.98%200%2001-.267.696%208.41%208.41%200%2001-1.76%202.65L6.216%206.14zm-.264-.187H2.977v.187h2.915a8.436%208.436%200%2000-2.357%205.767H0v.186h3.535a8.436%208.436%200%20002.357%205.767H2.977v.186h2.976v2.977h.187v-2.915a8.436%208.436%200%20005.767%202.357V24h.186v-3.535a8.436%208.436%200%20005.767-2.357v2.915h.186v-2.977h2.977v-.186h-2.915a8.436%208.436%200%20002.357-5.767H24v-.186h-3.535a8.436%208.436%200%2000-2.357-5.767h2.915v-.187h-2.977V2.977h-.186v2.915a8.436%208.436%200%2000-5.767-2.357V0h-.186v3.535A8.436%208.436%200%20006.14%205.892V2.977h-.187v2.976zm6.14%2014.326a8.25%208.25%200%20005.562-2.233H12.34c-.108.367-.19.743-.247%201.126v1.107zm-.186-1.087a8.015%208.015%200%2000-.258-1.146H6.345a8.25%208.25%200%20005.562%202.233v-1.087zm-8.186-7.285h1.107a8.23%208.23%200%20001.125-.247V6.345a8.25%208.25%200%2000-2.232%205.562zm1.087.186H3.72a8.25%208.25%200%20002.232%205.562v-5.304a8.012%208.012%200%2000-1.145-.258zm15.47-.186a8.25%208.25%200%2000-2.232-5.562v5.315c.367.108.743.19%201.126.247h1.107zm-1.086.186c-.39.058-.772.144-1.146.258v5.304a8.25%208.25%200%20002.233-5.562h-1.087zm-1.332%205.69V12.41a7.97%207.97%200%2000-.696.267%208.409%208.409%200%2000-2.65%201.76l3.346%203.346zm0-6.18v-5.45l-.012-.013h-5.451c.076.235.162.468.26.696a8.698%208.698%200%20001.819%202.688%208.698%208.698%200%20002.688%201.82c.228.097.46.183.696.259zM6.14%2017.848V12.41c.235.078.468.167.696.267a8.403%208.403%200%20012.688%201.799%208.404%208.404%200%20011.799%202.688c.1.228.19.46.267.696H6.152l-.012-.012zm0-6.245V6.326l3.29%203.29a8.716%208.716%200%2001-2.594%201.728%208.14%208.14%200%2001-.696.259zm6.257%206.257h5.277l-3.29-3.29a8.716%208.716%200%2000-1.728%202.594%208.135%208.135%200%2000-.259.696zm-2.347-7.81a9.435%209.435%200%2001-2.88%201.96%209.14%209.14%200%20012.88%201.94%209.14%209.14%200%20011.94%202.88%209.435%209.435%200%20011.96-2.88%209.14%209.14%200%20012.88-1.94%209.435%209.435%200%2001-2.88-1.96%209.434%209.434%200%2001-1.96-2.88%209.14%209.14%200%2001-1.94%202.88z'%20fill='url(%23lobe-icons-gemma-_R_0_)'%20fill-rule='evenodd'%3e%3c/path%3e%3c/svg%3e`,je=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.1312%207.50002L17.4088%2011.1913H5.81625L8.5375%207.50002H20.1325H20.1312ZM34.0675%2028.81L31.3475%2032.5H19.795L22.5125%2028.81H34.0675ZM35%207.50002L16.58%2032.5H5L23.42%207.50002H35Z'%20fill='currentColor'/%3e%3c/svg%3e`,Me=`data:image/svg+xml,%3csvg%20fill='black'%20fill-rule='evenodd'%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z'%3e%3c/path%3e%3c/svg%3e`,Ne=`data:image/png;base64,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`,Pe=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%20overflow='visible'%3e%3c!--%20Official%20Grok%20mark:%20scale%20past%20the%20box%20so%20ring%20fills%20the%20cell;%20slash%20tips%20may%20clip.%20--%3e%3cg%20transform='translate(12%2012)%20scale(1.12)%20translate(-12%20-12)'%3e%3cpath%20fill-rule='evenodd'%20d='M12%201.2c5.965%200%2010.8%204.835%2010.8%2010.8S17.965%2022.8%2012%2022.8%201.2%2017.965%201.2%2012%206.035%201.2%2012%201.2zm0%202.5a8.3%208.3%200%201%200%200%2016.6%208.3%208.3%200%200%200%200-16.6z'/%3e%3cpath%20d='M19.4%202.75c.52.52.52%201.36%200%201.88L4.63%2019.4a1.33%201.33%200%201%201-1.88-1.88L17.52%202.75c.52-.52%201.36-.52%201.88%200z'/%3e%3c/g%3e%3c/svg%3e`,Fe=`data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='currentColor'%20fill-rule='evenodd'%3e%3cpath%20d='M12%200c6.627%200%2012%205.373%2012%2012s-5.373%2012-12%2012S0%2018.627%200%2012%205.373%200%2012%200zm1.652%201.123l-.01-.001c.533.097%201.023.233%201.41.404%206.084%202.683%207.396%209.214%201.601%2014.338a3.781%203.781%200%2001-5.337-.328%203.654%203.654%200%2001-.884-3.044c-1.934.6-3.295%202.305-3.524%204.45-.204%201.912.324%204.044%202.056%205.634l.245.067C10.1%2022.876%2011.036%2023%2012%2023c6.075%200%2011-4.925%2011-11%200-5.513-4.056-10.08-9.348-10.877zM2.748%206.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957%2010.957%200%20001%2012c0%204.919%203.228%209.083%207.682%2010.49l.214.065C3.523%2018.528%202.84%2014.149%206.47%208.68A2.234%202.234%200%20102.748%206.21zm10.157-5.172c4.408%201.33%203.61%205.41%202.447%206.924-.86%201.117-2.922%201.46-3.708%202.238-.666.657-1.077%201.462-1.212%202.291A5.303%205.303%200%200112%2012.258a5.672%205.672%200%20001.404-11.169%2010.51%2010.51%200%2000-.5-.052z'/%3e%3c/svg%3e`,Ie=`data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='currentColor'%20fill-rule='evenodd'%3e%3cpath%20d='M12%200c6.627%200%2012%205.373%2012%2012s-5.373%2012-12%2012S0%2018.627%200%2012%205.373%200%2012%200zm1.652%201.123l-.01-.001c.533.097%201.023.233%201.41.404%206.084%202.683%207.396%209.214%201.601%2014.338a3.781%203.781%200%2001-5.337-.328%203.654%203.654%200%2001-.884-3.044c-1.934.6-3.295%202.305-3.524%204.45-.204%201.912.324%204.044%202.056%205.634l.245.067C10.1%2022.876%2011.036%2023%2012%2023c6.075%200%2011-4.925%2011-11%200-5.513-4.056-10.08-9.348-10.877zM2.748%206.21c-.178.269-.348.536-.51.803l-.235.394.078-.167A10.957%2010.957%200%20001%2012c0%204.919%203.228%209.083%207.682%2010.49l.214.065C3.523%2018.528%202.84%2014.149%206.47%208.68A2.234%202.234%200%20102.748%206.21zm10.157-5.172c4.408%201.33%203.61%205.41%202.447%206.924-.86%201.117-2.922%201.46-3.708%202.238-.666.657-1.077%201.462-1.212%202.291A5.303%205.303%200%200112%2012.258a5.672%205.672%200%20001.404-11.169%2010.51%2010.51%200%2000-.5-.052z'/%3e%3c/svg%3e`,Le=`data:image/svg+xml,%3csvg%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKimi%3c/title%3e%3cpath%20d='M21.846%200a1.923%201.923%200%20110%203.846H20.15a.226.226%200%2001-.227-.226V1.923C19.923.861%2020.784%200%2021.846%200z'%20fill='%231783FF'%3e%3c/path%3e%3cpath%20d='M11.065%2011.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164%200%2000-.117.051l-7.82%207.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103%200-.186.103-.186.23V19.77c0%20.128.083.23.186.23h2.69c.103%200%20.186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158%200%2001.205-.023l6.484%204.772a7.677%207.677%200%20003.453%201.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028%205.028%200%2001-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z'%20fill='%23fff'%3e%3c/path%3e%3c/svg%3e`,Re=`data:image/svg+xml,%3csvg%20fill='black'%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eLongCat%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M.507%2019.883a.507.507%200%2001-.489-.642L4.29%203.745a1.013%201.013%200%20011.533-.578l5.622%203.687a1.013%201.013%200%20001.11%200L18.2%203.165a1.013%201.013%200%20011.532.58l4.25%2015.497a.506.506%200%2001-.49.64H18.07a6.297%206.297%200%20001.53-4.115v-.177a6.09%206.09%200%2000-1.513-4.017l-.697-3.495a.438.438%200%2000-.694-.266L14.07%209.781a.748.748%200%2001-.654.121%205.156%205.156%200%2000-2.833%200%20.746.746%200%2001-.653-.121L7.302%207.81a.435.435%200%2000-.688.269l-.675%203.652a5.36%205.36%200%2000-1.539%203.76v.333c0%201.474.527%202.9%201.488%204.02l.032.038H.507z'%20fill='%2329E154'%20fill-rule='evenodd'%3e%3c/path%3e%3cpath%20d='M9.213%2016.843h1.52v-3.546h-1.29l-.23%203.546zm5.573%200h-1.52v-3.546h1.29l.23%203.546z'%3e%3c/path%3e%3c/svg%3e`,ze=`data:image/svg+xml,%3csvg%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eMinimax%3c/title%3e%3cdefs%3e%3clinearGradient%20id='lobe-icons-minimax-_R_0_'%20x1='0%25'%20x2='100.182%25'%20y1='50.057%25'%20y2='50.057%25'%3e%3cstop%20offset='0%25'%20stop-color='%23E2167E'%3e%3c/stop%3e%3cstop%20offset='100%25'%20stop-color='%23FE603C'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M16.278%202c1.156%200%202.093.927%202.093%202.07v12.501a.74.74%200%2000.744.709.74.74%200%2000.743-.709V9.099a2.06%202.06%200%20012.071-2.049A2.06%202.06%200%200124%209.1v6.561a.649.649%200%2001-.652.645.649.649%200%2001-.653-.645V9.1a.762.762%200%2000-.766-.758.762.762%200%2000-.766.758v7.472a2.037%202.037%200%2001-2.048%202.026%202.037%202.037%200%2001-2.048-2.026v-12.5a.785.785%200%2000-.788-.753.785.785%200%2000-.789.752l-.001%2015.904A2.037%202.037%200%200113.441%2022a2.037%202.037%200%2001-2.048-2.026V18.04c0-.356.292-.645.652-.645.36%200%20.652.289.652.645v1.934c0%20.263.142.506.372.638.23.131.514.131.744%200a.734.734%200%2000.372-.638V4.07c0-1.143.937-2.07%202.093-2.07zm-5.674%200c1.156%200%202.093.927%202.093%202.07v11.523a.648.648%200%2001-.652.645.648.648%200%2001-.652-.645V4.07a.785.785%200%2000-.789-.78.785.785%200%2000-.789.78v14.013a2.06%202.06%200%2001-2.07%202.048%202.06%202.06%200%2001-2.071-2.048V9.1a.762.762%200%2000-.766-.758.762.762%200%2000-.766.758v3.8a2.06%202.06%200%2001-2.071%202.049A2.06%202.06%200%20010%2012.9v-1.378c0-.357.292-.646.652-.646.36%200%20.653.29.653.646V12.9c0%20.418.343.757.766.757s.766-.339.766-.757V9.099a2.06%202.06%200%20012.07-2.048%202.06%202.06%200%20012.071%202.048v8.984c0%20.419.343.758.767.758.423%200%20.766-.339.766-.758V4.07c0-1.143.937-2.07%202.093-2.07z'%20fill='url(%23lobe-icons-minimax-_R_0_)'%20fill-rule='nonzero'%3e%3c/path%3e%3c/svg%3e`,Be=`data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1778321140713'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='17891'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M955%20607.2L843.6%20412.1l47.8-91.6c6.6-8.7%208.3-21.5%205.6-31.8L835.7%20178c-4.7-7.3-12.8-11.8-21.5-12H586.3l-51-89.2c-3.6-7-10.5-11.8-18.3-12.7H396.7c-8.9%200.2-15.2%206.7-19.6%2014.4l-1.9%203.1-113.8%20195.1H152.2c-9-0.2-17.5%204.3-22.3%2012L67%20400.1c-4%208-4%2017.5%200%2025.5l113.1%20196.7-51%2089.2c-4%208-4%2017.4%200%2025.5l58.1%20102c4.7%207.8%2013.2%2012.7%2022.3%2012.7h227.8l54.9%2095.5c4.2%207.2%2011.6%2011.9%2019.9%2012.8h129c8.9-0.2%2017.1-5%2021.5-12.7L775%20750.5h100.4c8.9-0.8%2016.9-5.8%2021.5-13.5L955%20634.3c5.4-8.3%205.4-18.9%200-27.1zM814.1%20620L756%20512.5%20517%20933.7l-65.3-107.5H212.8l57.4-104.3H392L153%20302.2h125L396.7%2090.3l59.7%20104.3-61.3%20107.5H873l-60.5%20106.8%20120.3%20211H814.1z'%20fill='%23605BEC'%20p-id='17892'%3e%3c/path%3e%3cpath%20d='M511.4%20660.5l149-238.9H361.7l149.7%20238.9z%20m0%200'%20fill='%23605BEC'%20p-id='17893'%3e%3c/path%3e%3c/svg%3e`,Ve=`data:image/svg+xml,%3csvg%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDoubao%3c/title%3e%3cpath%20d='M5.31%2015.756c.172-3.75%201.883-5.999%202.549-6.739-3.26%202.058-5.425%205.658-6.358%208.308v1.12C1.501%2021.513%204.226%2024%207.59%2024a6.59%206.59%200%20002.2-.375c.353-.12.7-.248%201.039-.378.913-.899%201.65-1.91%202.243-2.992-4.877%202.431-7.974.072-7.763-4.5l.002.001z'%20fill='%231E37FC'%3e%3c/path%3e%3cpath%20d='M22.57%2010.283c-1.212-.901-4.109-2.404-7.397-2.8.295%203.792.093%208.766-2.1%2012.773a12.782%2012.782%200%2001-2.244%202.992c3.764-1.448%206.746-3.457%208.596-5.219%202.82-2.683%203.353-5.178%203.361-6.66a2.737%202.737%200%2000-.216-1.084v-.002z'%20fill='%2337E1BE'%3e%3c/path%3e%3cpath%20d='M14.303%201.867C12.955.7%2011.248%200%209.39%200%207.532%200%205.883.677%204.545%201.807%202.791%203.29%201.627%205.557%201.5%208.125v9.201c.932-2.65%203.097-6.25%206.357-8.307.5-.318%201.025-.595%201.569-.829%201.883-.801%203.878-.932%205.746-.706-.222-2.83-.718-5.002-.87-5.617h.001z'%20fill='%23A569FF'%3e%3c/path%3e%3cpath%20d='M17.305%204.961a199.47%20199.47%200%2001-1.08-1.094c-.202-.213-.398-.419-.586-.622l-1.333-1.378c.151.615.648%202.786.869%205.617%203.288.395%206.185%201.898%207.396%202.8-1.306-1.275-3.475-3.487-5.266-5.323z'%20fill='%231E37FC'%3e%3c/path%3e%3c/svg%3e`,He=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M26.9568%209.88184H22.1265L30.7753%2031.7848H35.4917L26.9568%209.88184ZM13.028%209.88184L4.4917%2031.7848H9.32203L11.2305%2027.1793H20.2166L22.0126%2031.6724H26.8444L18.0832%209.88184H13.028ZM12.5783%2023.1361L15.4987%2015.3853L18.5315%2023.1361H12.5783Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ue=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M37.9998%2023.021C33.7998%2025.2889%2029.5698%2027.3649%2024.8614%2028.3069C23.8114%2028.5154%2022.6474%2028.5154%2021.5809%2028.3714C20.5639%2028.2439%2020.0554%2027.3484%2020.4169%2026.4064C20.7619%2025.5289%2021.2209%2024.635%2021.8119%2023.9C23.0899%2022.3025%2024.5329%2020.849%2025.8289%2019.268C26.6203%2018.2991%2027.3335%2017.2689%2027.9618%2016.187C28.4208%2015.4205%2028.2078%2014.4935%2027.4038%2014.111C26.0584%2013.4556%2024.6154%2012.9936%2023.1889%2012.4986C23.0239%2012.4341%2022.7779%2012.6096%2022.4509%2012.7221C22.8604%2013.0881%2023.1559%2013.3596%2023.5654%2013.727C19.3339%2014.447%2015.3305%2015.467%2011.4455%2016.874C11.4275%2016.9535%2011.396%2017.0165%2011.411%2017.0495C11.9855%2017.927%2011.723%2018.5975%2010.886%2019.1405C10.5611%2019.3531%2010.2732%2019.6176%2010.034%2019.9235C12.593%2020.6735%2014.873%2020.243%2017.0539%2018.821C16.9234%2018.6305%2016.7914%2018.455%2016.6609%2018.263C17.4799%2018.407%2017.9719%2018.854%2018.0379%2019.556C18.0544%2019.7165%2017.9569%2019.8755%2017.9074%2020.036C17.7919%2019.907%2017.6449%2019.781%2017.5474%2019.6355C17.4799%2019.5395%2017.4634%2019.4285%2017.4154%2019.268C14.8235%2020.993%2012.035%2021.425%208.96751%2020.531C8.96751%2021.137%208.93451%2021.6485%208.98401%2022.1435C9.01701%2022.574%208.83701%2022.766%208.44401%2022.9895C7.55752%2023.5325%206.63803%2024.092%205.90003%2024.8105C5.01504%2025.6879%205.34354%2026.7589%206.54053%2027.2059C7.90102%2027.7159%209.329%2027.7309%2010.7555%2027.5569C12.4445%2027.3484%2014.1005%2027.0769%2015.9394%2026.8219C13.79%2027.8269%2011.6735%2028.5319%209.4445%2028.8169C7.88452%2029.0269%206.32753%2029.1379%204.78554%2028.6909C2.57156%2028.0684%201.58607%2026.4394%202.16057%2024.251C2.70206%2022.2065%204.01455%2020.5775%205.42454%2019.076C10.133%2014.078%2016.0864%2011.5401%2022.9744%2011.0286C24.5824%2010.9176%2026.2069%2011.1246%2027.7143%2011.7951C29.8308%2012.7536%2030.7173%2014.78%2029.6838%2016.826C29.0118%2018.1835%2028.0758%2019.4285%2027.1413%2020.6585C26.2234%2021.872%2025.1899%2022.9895%2024.2224%2024.155C23.9434%2024.506%2023.6809%2024.875%2023.4679%2025.2724C23.0569%2026.0224%2023.3359%2026.5174%2024.2059%2026.4394C26.0254%2026.2624%2027.8808%2026.1199%2029.6358%2025.6729C32.2098%2025.0174%2034.7193%2024.092%2037.2618%2023.2775C37.5243%2023.213%2037.7703%2023.117%2037.9998%2023.0225V23.021Z'%20fill='currentColor'/%3e%3c/svg%3e`,We=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCursor%3c/title%3e%3cg%20transform='translate(12%2012)%20scale(0.88)%20translate(-12%20-12)'%3e%3cpath%20d='M22.106%205.68L12.5.135a.998.998%200%2000-.998%200L1.893%205.68a.84.84%200%2000-.419.726v11.186c0%20.3.16.577.42.727l9.607%205.547a.999.999%200%2000.998%200l9.608-5.547a.84.84%200%2000.42-.727V6.407a.84.84%200%2000-.42-.726zm-.603%201.176L12.228%2022.92c-.063.108-.228.064-.228-.061V12.34a.59.59%200%2000-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264%200%20.428.286.296.514z'%3e%3c/path%3e%3c/g%3e%3c/svg%3e`,Ge=`data:image/svg+xml,%3csvg%20height='24'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDeepSeek%3c/title%3e%3cpath%20d='M23.748%204.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434%201.202-.422%201.84.027%201.436.633%202.58%201.838%203.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526%205.526%200%2001-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365%2011.365%200%2000-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055%203.055%200%2001-.465.137%209.597%209.597%200%2000-2.883-.102c-1.885.21-3.39%201.102-4.497%202.623C.082%208.606-.231%2010.684.152%2012.85c.403%202.284%201.569%204.175%203.36%205.653%201.858%201.533%203.997%202.284%206.438%202.14%201.482-.085%203.133-.284%204.994-1.86.47.234.962.327%201.78.397.63.059%201.236-.03%201.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926%201.096-1.296%202.746-2.642%203.392-7.003.05-.347.007-.565%200-.845-.004-.17.035-.237.23-.256a4.173%204.173%200%20001.545-.475c1.396-.763%201.96-2.015%202.093-3.517.02-.23-.004-.467-.247-.588zM11.581%2018c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696%204.696%200%20011.529-.039c2.132.312%203.946%201.265%205.468%202.774.868.86%201.525%201.887%202.202%202.891.72%201.066%201.494%202.082%202.48%202.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306%200%2001.415-.287.302.302%200%2001.2.288.306.306%200%2001-.31.307.303.303%200%2001-.304-.308zm3.11%201.596c-.2.081-.399.151-.59.16a1.245%201.245%200%2001-.798-.254c-.274-.23-.47-.358-.552-.758a1.73%201.73%200%2001.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559%200%2001-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136%201.146.016.352.144.618.408%201.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'%20fill='currentColor'%3e%3c/path%3e%3c/svg%3e`,Ke=`data:image/svg+xml,%3csvg%20fill='%23000000'%20viewBox='0%200%2033%2025'%20role='img'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M79.01%205.863c-4.066%200-6.511%202.92-6.511%206.535%200%203.635%202.445%206.555%206.511%206.555%204.046%200%206.512-2.92%206.512-6.555s-2.466-6.535-6.512-6.535Zm0%2010.968c-2.633%200-4.172-1.933-4.172-4.433s1.539-4.455%204.172-4.455c2.635%200%204.151%201.933%204.151%204.434%200%202.521-1.516%204.454-4.15%204.454Zm14.393%202.096c3.393%200%205.542-1.808%205.837-4.539h-2.36c-.316%201.555-1.517%202.437-3.477%202.437-2.423%200-3.878-1.68-3.878-4.433%200-2.774%201.476-4.434%203.878-4.434%201.96%200%203.14.862%203.477%202.5h2.36c-.295-2.773-2.444-4.622-5.837-4.622-3.856%200-6.217%202.669-6.217%206.535%200%203.887%202.36%206.556%206.217%206.556Zm-29.543-.311h2.36v-6.01c0-2.752%201.348-4.244%203.772-4.244h2.276V6.177h-2.255c-2.128%200-3.288.735-3.898%202.605l-.443-.063.527-2.542h-2.36v12.439h.02Zm-24.445-7.332c.106-2.101%201.517-3.53%203.793-3.53%202.276%200%203.646%201.345%203.646%203.53h-7.439Zm9.778.4c0-3.426-2.381-5.821-5.943-5.821-3.73%200-6.174%202.563-6.174%206.535%200%204.013%202.423%206.555%206.28%206.555%202.929%200%205.247-1.597%205.669-3.887h-2.36c-.507%201.156-1.666%201.828-3.31%201.828-2.38%200-3.877-1.408-3.94-3.803h9.694c.042-.588.084-.861.084-1.408Zm5.69%206.932h1.939l5.5-12.44h-2.529L56%2015.99l-.316.021-3.793-9.833h-2.508l5.5%2012.439ZM32.23%2012.35c0-.882-.359-1.701-.99-2.437a8.594%208.594%200%200%201-1.497%201.093c.337.42.527.861.527%201.345%200%202.731-5.837%204.811-14.14%204.811-8.281.021-14.118-2.059-14.118-4.811%200-.463.168-.925.505-1.345a8.13%208.13%200%200%201-1.475-1.093c-.632.736-.99%201.555-.99%202.438%200%204.034%207.207%206.534%2016.1%206.534%208.87.021%2016.078-2.5%2016.078-6.535Zm-3.351%201.534c-.906-.462-1.96-.861-3.16-1.197-1.37.378-2.909.672-4.553.861%202.318.294%204.341.778%205.9%201.408.76-.336%201.37-.693%201.813-1.072Zm-17.849-.357a31.902%2031.902%200%200%201-4.467-.84c-1.18.336-2.255.735-3.16%201.197.42.379%201.01.715%201.748%201.05%201.539-.63%203.52-1.113%205.88-1.407Zm21.2-6.808c0-4.013-7.207-6.534-16.079-6.534C7.26.185.051%202.706.051%206.719c0%204.035%207.208%206.535%2016.1%206.535%208.872.021%2016.079-2.5%2016.079-6.535Zm-1.94%200c0%202.732-5.836%204.812-14.139%204.812-8.302.021-14.14-2.06-14.14-4.812%200-2.731%205.838-4.811%2014.14-4.811%207.86%200%2014.14%202.08%2014.14%204.811Zm-3.223%202.564c.758-.336%201.37-.694%201.812-1.072-2.95-1.513-7.544-2.353-12.728-2.353s-9.799.84-12.728%202.353c.422.378%201.012.715%201.75%201.05%202.507-1.05%206.363-1.68%2010.978-1.68%204.404%200%208.324.651%2010.916%201.702ZM1.042%2015.628c-.632.736-.99%201.534-.99%202.438%200%204.034%207.207%206.534%2016.1%206.534%208.892%200%2016.099-2.521%2016.099-6.534%200-.883-.359-1.702-.99-2.438-.422.4-.907.757-1.497%201.093.337.42.527.861.527%201.345%200%202.731-5.837%204.811-14.14%204.811-8.302%200-14.14-2.08-14.14-4.811%200-.463.17-.925.506-1.345a10.73%2010.73%200%200%201-1.475-1.093Z'/%3e%3c/svg%3e`,qe=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M35.3993%2026.4544C34.2871%2028.3855%2027.8314%2032.9425%2020%2032.9425C12.1686%2032.9425%205.71288%2028.3855%204.60075%2026.4544C4.5427%2026.3532%204.50826%2026.2401%204.5%2026.1237V22.418C4.51199%2022.3209%204.53496%2022.2256%204.56846%2022.1338C5.04896%2020.9261%206.30833%2019.1733%207.93325%2018.7031C8.14896%2018.149%208.468%2017.3404%208.76508%2016.7437C8.71727%2016.2776%208.69485%2015.8094%208.69792%2015.3409C8.69792%2013.6217%209.06217%2012.113%2010.1601%2010.9906C10.6729%2010.4662%2011.3097%2010.0644%2012.064%209.76091C13.871%208.29357%2016.4453%207.05745%2019.9716%207.05745C23.4978%207.05745%2026.129%208.29357%2027.936%209.76091C28.6903%2010.0644%2029.3271%2010.4662%2029.8399%2010.9906C30.9378%2012.113%2031.3021%2013.6217%2031.3021%2015.3409C31.3021%2015.8162%2031.284%2016.2877%2031.2349%2016.7437C31.532%2017.3404%2031.851%2018.149%2032.0667%2018.7031C33.6917%2019.1733%2034.951%2020.9261%2035.4315%2022.1338C35.4677%2022.2248%2035.4908%2022.3205%2035.5%2022.418V26.1237C35.4917%2026.2401%2035.4573%2026.3532%2035.3993%2026.4544ZM20.2222%2018.7147H19.7778C19.6422%2018.945%2019.4889%2019.1644%2019.3193%2019.3709C18.3247%2020.5941%2016.8419%2021.2981%2014.7881%2021.2981C12.56%2021.2981%2010.9273%2020.8344%209.90304%2019.6719C9.86495%2019.6283%209.82833%2019.5835%209.79325%2019.5375L9.66667%2019.6719V28.1775C11.5202%2029.1837%2015.4972%2030.992%2020%2030.992C24.5028%2030.992%2028.4798%2029.1837%2030.3333%2028.1775V19.6719L30.2067%2019.5375C30.2067%2019.5375%2030.1641%2019.5957%2030.097%2019.6719C29.0727%2020.8344%2027.44%2021.2981%2025.2119%2021.2981C23.1581%2021.2981%2021.6753%2020.5941%2020.6807%2019.3709C20.5111%2019.1644%2020.3578%2018.945%2020.2222%2018.7147ZM23.2292%2022.9127C23.9383%2022.9127%2024.5208%2023.4952%2024.5208%2024.2043V26.7877C24.5208%2027.4968%2023.9383%2028.0793%2023.2292%2028.0793C22.52%2028.0793%2021.9375%2027.4968%2021.9375%2026.7877V24.2043C21.9375%2023.4952%2022.52%2022.9127%2023.2292%2022.9127ZM16.7708%2022.9127C17.48%2022.9127%2018.0625%2023.4952%2018.0625%2024.2043V26.7877C18.0625%2027.4968%2017.48%2028.0793%2016.7708%2028.0793C16.0617%2028.0793%2015.4792%2027.4968%2015.4792%2026.7877V24.2043C15.4792%2023.4952%2016.0617%2022.9127%2016.7708%2022.9127ZM21.0501%2014.9237C21.2258%2016.289%2021.5707%2017.3947%2022.1842%2018.149C22.7551%2018.8517%2023.649%2019.3606%2025.2119%2019.3606C27.2437%2019.3606%2028.1724%2018.9253%2028.6438%2018.3905C29.1398%2017.8287%2029.3646%2016.9051%2029.3646%2015.3409C29.3646%2013.8684%2029.0507%2012.9552%2028.454%2012.3455C27.8378%2011.7152%2026.7502%2011.2321%2024.8063%2011.0216C22.8856%2010.8136%2021.975%2011.1998%2021.5345%2011.7049C21.187%2012.1014%2020.97%2012.7485%2020.9688%2013.7431V13.7702C20.9688%2014.1121%2020.9959%2014.4966%2021.0501%2014.9237ZM18.9499%2014.9237C19.0041%2014.4966%2019.0312%2014.1117%2019.0312%2013.7689V13.7431C19.03%2012.7485%2018.813%2012.1014%2018.4655%2011.7049C18.025%2011.1998%2017.1144%2010.8136%2015.1937%2011.0216C13.2498%2011.2321%2012.1622%2011.7152%2011.546%2012.3455C10.9493%2012.9552%2010.6354%2013.8684%2010.6354%2015.3409C10.6354%2016.9051%2010.8615%2017.8287%2011.3562%2018.3905C11.8276%2018.9253%2012.7563%2019.3606%2014.7881%2019.3606C16.351%2019.3606%2017.2449%2018.8517%2017.8158%2018.149C18.4293%2017.3947%2018.7742%2016.289%2018.9499%2014.9237Z'%20fill='currentColor'/%3e%3c/svg%3e`,Je=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20fill='%23000000'%20width='800px'%20height='800px'%20viewBox='0%200%2024%2024'%20role='img'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.702%202.29c-2.494-1.554-5.778-1.187-8.706.654C9.076%201.104%205.79.736%203.3%202.29c-3.941%202.463-4.42%208.806-1.07%2014.167%202.47%203.954%206.333%206.269%209.77%206.226%203.439.043%207.301-2.273%209.771-6.226%203.347-5.361%202.872-11.704-1.069-14.167zM4.042%2015.328a12.838%2012.838%200%200%201-1.546-3.541%2010.12%2010.12%200%200%201-.336-3.338c.15-1.98.956-3.524%202.27-4.345%201.315-.822%203.052-.87%204.903-.137.281.113.556.24.825.382A15.11%2015.11%200%200%200%207.5%207.54c-2.035%203.255-2.655%206.878-1.945%209.765a13.247%2013.247%200%200%201-1.514-1.98zm17.465-3.541a12.866%2012.866%200%200%201-1.547%203.54%2013.25%2013.25%200%200%201-1.513%201.984c.635-2.589.203-5.76-1.353-8.734a.39.39%200%200%200-.563-.153l-4.852%203.032a.397.397%200%200%200-.126.546l.712%201.139a.395.395%200%200%200%20.547.126l3.145-1.965c.101.306.203.606.28.916.296%201.086.41%202.214.335%203.337-.15%201.982-.956%203.525-2.27%204.347a4.437%204.437%200%200%201-2.25.65h-.101a4.432%204.432%200%200%201-2.25-.65c-1.314-.822-2.121-2.365-2.27-4.347a10.153%2010.153%200%200%201%20.335-3.337%2013.212%2013.212%200%200%201%204.05-6.482%2010.148%2010.148%200%200%201%202.849-1.765c1.845-.733%203.586-.685%204.9.137%201.316.822%202.122%202.365%202.271%204.345a10.146%2010.146%200%200%201-.33%203.334z'/%3e%3c/svg%3e`,Ye=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M37%2020.034C27.8809%2020.5837%2020.5808%2027.8809%2020.0326%2037H19.966C19.4163%2027.8809%2012.1177%2020.5837%203%2020.034V19.9674C12.1191%2019.4163%2019.4163%2012.1191%2019.966%203H20.0326C20.5822%2012.1191%2027.8809%2019.4163%2037%2019.9674V20.034Z'%20fill='currentColor'/%3e%3c/svg%3e`,Xe=`/assets/kimi-for-coding-eVEHug_h.svg`,Ze=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eLM%20Studio%3c/title%3e%3cpath%20d='M2.84%202a1.273%201.273%200%20100%202.547h14.107a1.273%201.273%200%20100-2.547H2.84zM7.935%205.33a1.273%201.273%200%20000%202.548H22.04a1.274%201.274%200%20000-2.547H7.935zM3.624%209.935c0-.704.57-1.274%201.274-1.274h14.106a1.274%201.274%200%20010%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM1.273%2012.188a1.273%201.273%200%20100%202.547H15.38a1.274%201.274%200%20000-2.547H1.273zM3.624%2016.792c0-.704.57-1.274%201.274-1.274h14.106a1.273%201.273%200%20110%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM13.029%2018.849a1.273%201.273%200%20100%202.547h9.698a1.273%201.273%200%20100-2.547h-9.698z'%20fill-opacity='.3'%3e%3c/path%3e%3cpath%20d='M2.84%202a1.273%201.273%200%20100%202.547h10.287a1.274%201.274%200%20000-2.547H2.84zM7.935%205.33a1.273%201.273%200%20000%202.548H18.22a1.274%201.274%200%20000-2.547H7.935zM3.624%209.935c0-.704.57-1.274%201.274-1.274h10.286a1.273%201.273%200%20010%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM1.273%2012.188a1.273%201.273%200%20100%202.547H11.56a1.274%201.274%200%20000-2.547H1.273zM3.624%2016.792c0-.704.57-1.274%201.274-1.274h10.286a1.273%201.273%200%20110%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM13.029%2018.849a1.273%201.273%200%20100%202.547h5.78a1.273%201.273%200%20100-2.547h-5.78z'%3e%3c/path%3e%3c/svg%3e`,Qe=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.8758%209.20865C17.8758%208.59461%2017.3777%208.09634%2016.7663%208.09634C16.155%208.09634%2015.6567%208.59575%2015.6567%209.20865V27.6446C15.6567%2029.0714%2014.4985%2030.2324%2013.0755%2030.2324C11.6523%2030.2324%2010.4941%2029.0714%2010.4941%2027.6446V15.8167C10.4941%2015.2027%209.99591%2014.7044%209.38453%2014.7044C8.77316%2014.7044%208.275%2015.2038%208.275%2015.8167V20.8301C8.275%2022.2567%207.11678%2023.4179%205.69364%2023.4179C4.2705%2023.4179%203.1123%2022.2567%203.1123%2020.8301V19.0129C3.1123%2018.6054%203.44177%2018.2752%203.84822%2018.2752C4.25467%2018.2752%204.58413%2018.6054%204.58413%2019.0129V20.8301C4.58413%2021.4441%205.08227%2021.9424%205.69364%2021.9424C6.30502%2021.9424%206.80317%2021.443%206.80317%2020.8301V15.8167C6.80317%2014.39%207.96139%2013.2289%209.38453%2013.2289C10.8077%2013.2289%2011.9659%2014.39%2011.9659%2015.8167V27.6446C11.9659%2028.2587%2012.4641%2028.7569%2013.0755%2028.7569C13.6868%2028.7569%2014.1849%2028.2575%2014.1849%2027.6446V20.4123V9.20865C14.1849%207.78194%2015.3431%206.62082%2016.7663%206.62082C18.1894%206.62082%2019.3476%207.78194%2019.3476%209.20865V24.4746C19.3476%2024.8821%2019.0182%2025.2123%2018.6117%2025.2123C18.2053%2025.2123%2017.8758%2024.8821%2017.8758%2024.4746V9.20865ZM31.531%2013.2289C30.1079%2013.2289%2028.9496%2014.39%2028.9496%2015.8167V25.6969C28.9496%2026.311%2028.4515%2026.8093%2027.8401%2026.8093C27.2287%2026.8093%2026.7306%2026.3099%2026.7306%2025.6969V9.20865C26.7306%207.78194%2025.5723%206.62082%2024.1492%206.62082C22.7261%206.62082%2021.5679%207.78194%2021.5679%209.20865V30.1383C21.5679%2030.7523%2021.0697%2031.2506%2020.4583%2031.2506C19.8469%2031.2506%2019.3488%2030.7511%2019.3488%2030.1383V27.5471C19.3488%2027.1396%2019.0194%2026.8093%2018.6129%2026.8093C18.2065%2026.8093%2017.877%2027.1396%2017.877%2027.5471V30.1383C17.877%2031.565%2019.0352%2032.7261%2020.4583%2032.7261C21.8815%2032.7261%2023.0397%2031.565%2023.0397%2030.1383V9.20865C23.0397%208.59461%2023.5378%208.09634%2024.1492%208.09634C24.7605%208.09634%2025.2587%208.59575%2025.2587%209.20865V25.6969C25.2587%2027.1237%2026.417%2028.2848%2027.8401%2028.2848C29.2632%2028.2848%2030.4215%2027.1237%2030.4215%2025.6969V15.8167C30.4215%2015.2027%2030.9196%2014.7044%2031.531%2014.7044C32.1424%2014.7044%2032.6405%2015.2038%2032.6405%2015.8167V24.4746C32.6405%2024.8821%2032.97%2025.2123%2033.3764%2025.2123C33.7829%2025.2123%2034.1123%2024.8821%2034.1123%2024.4746V15.8167C34.1123%2014.39%2032.9541%2013.2289%2031.531%2013.2289Z'%20fill='currentColor'/%3e%3c/svg%3e`,$e=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.8758%209.20865C17.8758%208.59461%2017.3777%208.09634%2016.7663%208.09634C16.155%208.09634%2015.6567%208.59575%2015.6567%209.20865V27.6446C15.6567%2029.0714%2014.4985%2030.2324%2013.0755%2030.2324C11.6523%2030.2324%2010.4941%2029.0714%2010.4941%2027.6446V15.8167C10.4941%2015.2027%209.99591%2014.7044%209.38453%2014.7044C8.77316%2014.7044%208.275%2015.2038%208.275%2015.8167V20.8301C8.275%2022.2567%207.11678%2023.4179%205.69364%2023.4179C4.2705%2023.4179%203.1123%2022.2567%203.1123%2020.8301V19.0129C3.1123%2018.6054%203.44177%2018.2752%203.84822%2018.2752C4.25467%2018.2752%204.58413%2018.6054%204.58413%2019.0129V20.8301C4.58413%2021.4441%205.08227%2021.9424%205.69364%2021.9424C6.30502%2021.9424%206.80317%2021.443%206.80317%2020.8301V15.8167C6.80317%2014.39%207.96139%2013.2289%209.38453%2013.2289C10.8077%2013.2289%2011.9659%2014.39%2011.9659%2015.8167V27.6446C11.9659%2028.2587%2012.4641%2028.7569%2013.0755%2028.7569C13.6868%2028.7569%2014.1849%2028.2575%2014.1849%2027.6446V20.4123V9.20865C14.1849%207.78194%2015.3431%206.62082%2016.7663%206.62082C18.1894%206.62082%2019.3476%207.78194%2019.3476%209.20865V24.4746C19.3476%2024.8821%2019.0182%2025.2123%2018.6117%2025.2123C18.2053%2025.2123%2017.8758%2024.8821%2017.8758%2024.4746V9.20865ZM31.531%2013.2289C30.1079%2013.2289%2028.9496%2014.39%2028.9496%2015.8167V25.6969C28.9496%2026.311%2028.4515%2026.8093%2027.8401%2026.8093C27.2287%2026.8093%2026.7306%2026.3099%2026.7306%2025.6969V9.20865C26.7306%207.78194%2025.5723%206.62082%2024.1492%206.62082C22.7261%206.62082%2021.5679%207.78194%2021.5679%209.20865V30.1383C21.5679%2030.7523%2021.0697%2031.2506%2020.4583%2031.2506C19.8469%2031.2506%2019.3488%2030.7511%2019.3488%2030.1383V27.5471C19.3488%2027.1396%2019.0194%2026.8093%2018.6129%2026.8093C18.2065%2026.8093%2017.877%2027.1396%2017.877%2027.5471V30.1383C17.877%2031.565%2019.0352%2032.7261%2020.4583%2032.7261C21.8815%2032.7261%2023.0397%2031.565%2023.0397%2030.1383V9.20865C23.0397%208.59461%2023.5378%208.09634%2024.1492%208.09634C24.7605%208.09634%2025.2587%208.59575%2025.2587%209.20865V25.6969C25.2587%2027.1237%2026.417%2028.2848%2027.8401%2028.2848C29.2632%2028.2848%2030.4215%2027.1237%2030.4215%2025.6969V15.8167C30.4215%2015.2027%2030.9196%2014.7044%2031.531%2014.7044C32.1424%2014.7044%2032.6405%2015.2038%2032.6405%2015.8167V24.4746C32.6405%2024.8821%2032.97%2025.2123%2033.3764%2025.2123C33.7829%2025.2123%2034.1123%2024.8821%2034.1123%2024.4746V15.8167C34.1123%2014.39%2032.9541%2013.2289%2031.531%2013.2289Z'%20fill='currentColor'/%3e%3c/svg%3e`,et=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M26.7,5.25l2.14-1.53,10.49,13.29-16.23,19.43-2.65,3L0.42,16.83l6.87-8.64,5.78,2.21,1.79-4.46L23.3,0.1l3.42,5.15ZM31.13,13.98L22.91,1.78l-7.1,4.95-5.45,13.53,20.77-6.28ZM36.74,15.57l-8.03-10.1-0.14-0.1-1.14,0.89,5.03,7.58,4.28,1.73ZM9.06,20.35l3.53-8.84-4.89-1.92-5.62,7.1,6.98,3.66ZM37.62,17.19l-5.3-2.14-9.22,19.52,14.52-17.38ZM30.95,15.24l-20.63,6.22,10.1,15.93,10.53-22.15ZM15.79,32.41l-6.86-10.82c-1.61-0.84-3.2-1.73-4.81-2.57-0.1-0.05-0.21-0.12-0.32-0.13l11.99,13.52Z'%20fill='currentColor'/%3e%3c/svg%3e`,tt=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOllama%3c/title%3e%3cpath%20d='M7.905%201.09c.216.085.411.225.588.41.295.306.544.744.734%201.263.191.522.315%201.1.362%201.68a5.054%205.054%200%20012.049-.636l.051-.004c.87-.07%201.73.087%202.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67%201.67%200%2001.589-.41c.257-.1.53-.118.796-.042.401.114.745.368%201.016.737.248.337.434.769.561%201.287.23.934.27%202.163.115%203.645l.053.04.026.019c.757.576%201.284%201.397%201.563%202.35.435%201.487.216%203.155-.534%204.088l-.018.021.002.003c.417.762.67%201.567.724%202.4l.002.03c.064%201.065-.2%202.137-.814%203.19l-.007.01.01.024c.472%201.157.62%202.322.438%203.486l-.006.039a.651.651%200%2001-.747.536.648.648%200%2001-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643%200%2001.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644%200%2001.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229%204.229%200%2000-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653%200%2001-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288%203.288%200%2000-1.772-.332c-1.245.099-2.343.801-2.67%201.686a.652.652%200%2001-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066%201.588a4.07%204.07%200%2000-.068%201.886c.112.558.331%201.02.582%201.269l.008.007c.212.207.257.53.109.785-.36.622-.629%201.549-.673%202.44-.05%201.018.186%201.902.719%202.536l.016.019a.643.643%200%2001.095.69c-.576%201.236-.753%202.252-.562%203.052a.652.652%200%2001-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339%204.339%200%2001-.598-1.309l-.005-.019a5.764%205.764%200%2001-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352%205.352%200%2001.093-2.49c.262-.915.777-1.701%201.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622%201.015-.737.266-.076.54-.059.797.042zm4.116%209.09c.936%200%201.8.313%202.446.855.63.527%201.005%201.235%201.005%201.94%200%20.888-.406%201.58-1.133%202.022-.62.375-1.451.557-2.403.557-1.009%200-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845%200-.707.398-1.417%201.056-1.946.668-.537%201.55-.849%202.485-.849zm0%20.896a3.07%203.07%200%2000-1.916.65c-.461.37-.722.835-.722%201.25%200%20.428.21.829.61%201.134.455.347%201.124.548%201.943.548.799%200%201.473-.147%201.932-.426.463-.28.7-.686.7-1.257%200-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662%201.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375%200%2001-.376.373.375.375%200%2001-.376-.373v-.46l-.271-.218a.347.347%200%2001-.052-.49.353.353%200%2001.494-.051l.215.172.22-.174a.353.353%200%2001.49.051zm-5.04-1.919c.478%200%20.867.39.867.871a.87.87%200%2001-.868.871.87.87%200%2001-.867-.87.87.87%200%2001.867-.872zm8.706%200c.48%200%20.868.39.868.871a.87.87%200%2001-.868.871.87.87%200%2001-.867-.87.87.87%200%2001.867-.872zM7.44%202.3l-.003.002a.659.659%200%2000-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216%201.631-.124%202.782.43-.128.899-.208%201.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628%200%2000-.107-.09L7.44%202.3zm9.174.04l-.002.001a.628.628%200%2000-.107.09c-.156.163-.32.45-.453.814-.29.794-.387%201.776-.23%202.572l.058.097.008.014h.03a5.184%205.184%200%20011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659%200%2000-.285-.239h-.004z'%3e%3c/path%3e%3c/svg%3e`,nt=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M32.8377%2017.282C33.2127%2016.25%2033.3072%2015.218%2033.2127%2014.1875C33.1197%2013.1571%2032.7447%2012.1251%2032.2752%2011.1876C31.4322%209.78209%2030.2127%208.6571%2028.8072%208.0001C27.3072%207.34461%2025.7127%207.15711%2024.1197%207.53211C23.3698%206.78212%2022.5253%206.12512%2021.5878%205.65713C20.6503%205.18913%2019.5253%205.00013%2018.4948%205.00013C16.8851%204.99074%2015.3125%205.48246%2013.9948%206.40712C12.6824%207.34311%2011.7449%208.6571%2011.2754%2010.1571C10.1504%2010.4376%209.21289%2010.9071%208.27539%2011.4696C7.4324%2012.1251%206.77541%2012.9696%206.21291%2013.8126C5.36992%2015.2195%205.08792%2016.8125%205.27542%2018.407C5.46399%2019.9968%206.11605%2021.496%207.1504%2022.718C6.79608%2023.7086%206.66795%2024.7659%206.77541%2025.8124C6.86991%2026.8444%207.2449%2027.8749%207.7129%2028.8124C8.55739%2030.2194%209.77538%2031.3444%2011.1824%2031.9999C12.6824%2032.6569%2014.2753%2032.8444%2015.8698%2032.4694C16.6198%2033.2194%2017.4628%2033.8749%2018.4003%2034.3444C19.3378%2034.8139%2020.4628%2034.9999%2021.4948%2034.9999C23.1043%2035.0097%2024.6769%2034.5185%2025.9947%2033.5944C27.3072%2032.6569%2028.2447%2031.3444%2028.7127%2029.8444C29.7719%2029.6432%2030.7682%2029.1934%2031.6197%2028.5319C32.4627%2027.8749%2033.2127%2027.1249%2033.6822%2026.1874C34.5251%2024.7819%2034.8071%2023.1875%2034.6196%2021.5945C34.4322%2020%2033.8697%2018.5015%2032.8377%2017.282ZM21.5878%2033.0304C20.0878%2033.0304%2018.9628%2032.5609%2017.9323%2031.7179C17.9323%2031.7179%2018.0253%2031.6234%2018.1198%2031.6234L24.1197%2028.1554C24.2862%2028.0803%2024.4196%2027.9469%2024.4947%2027.7804C24.5698%2027.636%2024.6021%2027.4731%2024.5877%2027.3109V18.875L27.1197%2020.375V27.3124C27.1455%2028.0547%2027.0215%2028.7945%2026.755%2029.4878C26.4885%2030.181%2026.085%2030.8134%2025.5687%2031.3473C25.0523%2031.8811%2024.4337%2032.3054%2023.7497%2032.5949C23.0658%2032.8843%2022.3305%2033.0314%2021.5878%2033.0304ZM9.49488%2027.8749C8.83789%2026.7499%208.55739%2025.4374%208.83789%2024.125C8.83789%2024.125%208.93239%2024.2195%209.02539%2024.2195L15.0253%2027.6874C15.1693%2027.7638%2015.3325%2027.7966%2015.4948%2027.7819C15.6823%2027.7819%2015.8698%2027.7819%2015.9628%2027.6874L23.2753%2023.4695V26.3749L17.1823%2029.9374C16.5506%2030.3042%2015.8527%2030.5427%2015.1287%2030.6393C14.4046%2030.7358%2013.6686%2030.6884%2012.9629%2030.4999C11.4629%2030.1249%2010.2449%2029.1874%209.49488%2027.8749ZM7.9004%2014.8445C8.56239%2013.7234%209.58826%2012.8627%2010.8074%2012.4056V19.532C10.8074%2019.718%2010.8074%2019.907%2010.9004%2020C10.9755%2020.1665%2011.1089%2020.2998%2011.2754%2020.375L18.5878%2024.5944L16.0573%2026.0944L10.0574%2022.625C9.41842%2022.2639%208.85742%2021.7797%208.40684%2021.2004C7.95627%2020.6211%207.62506%2019.9582%207.4324%2019.25C7.05741%2017.8445%207.1504%2016.157%207.9004%2014.8445ZM28.6197%2019.625L21.3073%2015.407L23.8377%2013.9071L29.8377%2017.375C30.7752%2017.9375%2031.5252%2018.6875%2031.9947%2019.625C32.4642%2020.5625%2032.7447%2021.5945%2032.6502%2022.7195C32.5603%2023.7755%2032.1699%2024.7837%2031.5252%2025.6249C30.8697%2026.4694%2030.0252%2027.1249%2028.9947%2027.4999V20.375C28.9947%2020.1875%2028.9947%2020%2028.9002%2019.907C28.9002%2019.907%2028.8072%2019.718%2028.6197%2019.625ZM31.1502%2015.875C31.1502%2015.875%2031.0572%2015.782%2030.9627%2015.782L24.9627%2012.3126C24.7752%2012.2196%2024.6822%2012.2196%2024.4947%2012.2196C24.3072%2012.2196%2024.1197%2012.2196%2024.0252%2012.3126L16.7128%2016.532V13.6251L22.8073%2010.0626C23.7448%209.50009%2024.7752%209.31259%2025.9002%209.31259C26.9322%209.31259%2027.9627%209.68759%2028.9002%2010.3446C29.7447%2011.0001%2030.4947%2011.8446%2030.8697%2012.7821C31.2447%2013.7196%2031.3377%2014.8445%2031.1502%2015.875ZM15.4003%2021.125L12.8699%2019.625V12.5946C12.8699%2011.5626%2013.1503%2010.4376%2013.7128%209.59459C14.2753%208.6571%2015.1198%208.0001%2016.0573%207.53211C17.0127%207.05249%2018.0956%206.88812%2019.1503%207.06261C20.1823%207.15711%2021.2128%207.62511%2022.0573%208.2821C22.0573%208.2821%2021.9628%208.3751%2021.8698%208.3751L15.8698%2011.8446C15.7033%2011.9197%2015.57%2012.0531%2015.4948%2012.2196C15.4003%2012.4071%2015.4003%2012.5001%2015.4003%2012.6876V21.125ZM16.7128%2018.125L19.9948%2016.25L23.2753%2018.125V21.875L19.9948%2023.75L16.7128%2021.875V18.125Z'%20fill='currentColor'/%3e%3c/svg%3e`,rt=`data:image/svg+xml,%3csvg%20width='24'%20height='30'%20viewBox='0%200%20256%20320'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenCode%3c/title%3e%3cpath%20d='M192%2064V256H64V64H192Z'%20fill='currentColor'%20fill-opacity='0.2'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M256%20320H0V0H256V320ZM192%2064H64V256H192V64Z'%20fill='currentColor'/%3e%3c/svg%3e`,it=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.10913%2012.07C3.65512%2012.07%205.76627%2011.5988%206.85825%2010.98C7.95023%2010.3612%207.95023%2010.3612%2010.207%208.75965C13.0642%206.73196%2015.0845%207.41088%2018.3968%207.41088'%20fill='currentColor'/%3e%3cpath%20d='M3.10913%2012.07C3.65512%2012.07%205.76627%2011.5988%206.85825%2010.98C7.95023%2010.3612%207.95023%2010.3612%2010.207%208.75965C13.0642%206.73196%2015.0845%207.41088%2018.3968%207.41088'%20stroke='currentColor'%20stroke-width='3.27593'/%3e%3cpath%20d='M21.6%207.43108L16.0037%2010.6622V4.20001L21.6%207.43108Z'%20fill='currentColor'%20stroke='currentColor'%20stroke-width='0.0363992'/%3e%3cpath%20d='M3%2012.072C3.54599%2012.072%205.65714%2012.5432%206.74912%2013.162C7.8411%2013.7808%207.8411%2013.7808%2010.0978%2015.3823C12.9551%2017.41%2014.9753%2016.7311%2018.2877%2016.7311'%20fill='currentColor'/%3e%3cpath%20d='M3%2012.072C3.54599%2012.072%205.65714%2012.5432%206.74912%2013.162C7.8411%2013.7808%207.8411%2013.7808%2010.0978%2015.3823C12.9551%2017.41%2014.9753%2016.7311%2018.2877%2016.7311'%20stroke='currentColor'%20stroke-width='3.27593'/%3e%3cpath%20d='M21.4909%2016.7109L15.8945%2013.4798V19.942L21.4909%2016.7109Z'%20fill='currentColor'%20stroke='currentColor'%20stroke-width='0.0363992'/%3e%3c/svg%3e`,at=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cimage%20width='24'%20height='24'%20xlink:href='data:image/png;base64,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'/%3e%3c/svg%3e`,ot=`data:image/svg+xml,%3csvg%20viewBox='5%205%2030%2030'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.4579%2015.6036L26.1529%2035H20.0656L6.37059%2015.6036H12.4579ZM12.4524%2026.3764L15.4974%2030.6909L12.4551%2035H6.36377L12.4524%2026.3764ZM33.6365%207.15727V35H28.647V14.2236L33.6365%207.15727ZM33.6365%205L20.0656%2024.2205L17.0206%2019.9073L27.5451%205H33.6365Z'%20fill='currentColor'/%3e%3c/svg%3e`,st=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.1312%207.50002L17.4088%2011.1913H5.81625L8.5375%207.50002H20.1325H20.1312ZM34.0675%2028.81L31.3475%2032.5H19.795L22.5125%2028.81H34.0675ZM35%207.50002L16.58%2032.5H5L23.42%207.50002H35Z'%20fill='currentColor'/%3e%3c/svg%3e`,ct=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.1312%207.5L17.4088%2011.1912H5.81625L8.5375%207.5H20.1325H20.1312ZM34.0675%2028.81L31.3475%2032.5H19.795L22.5125%2028.81H34.0675ZM35%207.5L16.58%2032.5H5L23.42%207.5H35Z'%20fill='currentColor'/%3e%3c/svg%3e`,lt=[...`claudecodeinternal.codexinternal.codebuddy.geminicli.claude.composer.cursor.deepseek.doubao.gemini.gemma.glm.gpt.grok.hunyuan.hy.imate.kimi.knot.longcat.minimax.mistral.llama.qwen.seed.tapd.with.yuanbao.claw.echo.gongfeng.ernie.baichuan`.split(`.`)].sort((e,t)=>t.length-e.length),ut={hy3:`hy`,hunyuan3:`hy`,hunyuan:`hy`,moonshot:`kimi`,anthropic:`claude`,openai:`gpt`,chatgpt:`gpt`,codex:`gpt`,xai:`grok`,google:`gemini`,aliyun:`qwen`,dashscope:`qwen`,zhipu:`glm`,zhipuai:`glm`,"z-ai":`glm`,zai:`glm`,zaicodingplan:`glm`,zhipuaicodingplan:`glm`,tencent:`hy`,meta:`llama`,"meta-llama":`llama`},dt=[`-volc-ioa`,`-ioa`,`-official`,`-external`,`-internal`,`-preview`],ft={claude:[`claude`,`anthropic`],gpt:[`gpt`,`openai`],gemini:[`google`,`gemini`],gemma:[`google`,`gemma`,`gemini`],grok:[`grok`],kimi:[`kimi`],glm:[`zai-coding-plan`,`zhipuai-coding-plan`,`glm`],qwen:[`qwen`],hy:[`hunyuan`,`hy`],hunyuan:[`hunyuan`,`hy`],deepseek:[`deepseek`],minimax:[`minimax`],doubao:[`doubao`],longcat:[`longcat`],seed:[`seed`],cursor:[`cursor`,`composer`],composer:[`cursor`,`composer`]},pt=e=>String(e||``).trim().toLowerCase(),mt=e=>pt(e).replace(/[^a-z0-9]/g,``),ht=e=>{let t=pt(e).replace(/[._]/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``),n=!0;for(;n;){n=!1;for(let e of dt)if(t.endsWith(e)&&t.length>e.length){t=t.slice(0,-e.length),n=!0;break}}return/(^|-)\d+m$/.test(t)&&(t=t.replace(/-\d+m$/,``)),ut[t]?ut[t]:t===`hy3`||t===`hunyuan-3`||t===`hunyuan3`?`hy`:t},gt=e=>{if(!e)return null;let t=e.toLowerCase();for(let e of lt)if(t.includes(e))return e;if(t.length>=3){for(let e of lt)if(e.includes(t))return e}let n=null,r=0;for(let e of lt){let i=0,a=Math.min(t.length,e.length);for(let n=0;n<a&&t[n]===e[n];n++)i++;i>=3&&i>r&&(r=i,n=e)}return n},_t=e=>ut[e]||e,vt=(e,t)=>{let n=[],r=ht(e),i=mt(r),a=mt(e),o=mt(t);i&&n.push(i),a&&a!==i&&n.push(a),o&&n.push(o),i&&o&&n.push(o+i,i+o);for(let e of n){let t=gt(e);if(t)return _t(t)}return/(^|-)o\d/.test(r)||/^o\d/.test(i)?`gpt`:o&&ut[o]?ut[o]:null},yt=e=>{if(!e)return[];let t=ft[_t(e)];return t?[...new Set(t.filter(Boolean))]:[]},bt=Object.assign({"../assets/model-icons/_check.png":we,"../assets/model-icons/claude.svg":Te,"../assets/model-icons/composer.svg":Z,"../assets/model-icons/cursor.svg":Ee,"../assets/model-icons/deepseek.svg":De,"../assets/model-icons/doubao.svg":Oe,"../assets/model-icons/gemini.svg":ke,"../assets/model-icons/gemma.svg":Ae,"../assets/model-icons/glm.svg":je,"../assets/model-icons/gpt.svg":Me,"../assets/model-icons/grok.png":Ne,"../assets/model-icons/grok.svg":Pe,"../assets/model-icons/hunyuan.svg":Fe,"../assets/model-icons/hy.svg":Ie,"../assets/model-icons/kimi.svg":Le,"../assets/model-icons/longcat.svg":Re,"../assets/model-icons/minimax.svg":ze,"../assets/model-icons/qwen.svg":Be,"../assets/model-icons/seed.svg":Ve}),xt=Object.assign({"../assets/provider-logos/anthropic.svg":He,"../assets/provider-logos/bailian-coding-plan.svg":Ue,"../assets/provider-logos/cursor.svg":We,"../assets/provider-logos/deepseek.svg":Ge,"../assets/provider-logos/evroc.svg":Ke,"../assets/provider-logos/github-copilot.svg":qe,"../assets/provider-logos/gocode.svg":Je,"../assets/provider-logos/google.svg":Ye,"../assets/provider-logos/kimi-for-coding.svg":Xe,"../assets/provider-logos/lmstudio.svg":Ze,"../assets/provider-logos/minimax-cn-coding-plan.svg":Qe,"../assets/provider-logos/minimax-coding-plan.svg":$e,"../assets/provider-logos/nano-gpt.svg":et,"../assets/provider-logos/ollama.svg":tt,"../assets/provider-logos/openai.svg":nt,"../assets/provider-logos/opencode.svg":rt,"../assets/provider-logos/openrouter.svg":it,"../assets/provider-logos/wafer.ai.svg":at,"../assets/provider-logos/xai.svg":ot,"../assets/provider-logos/zai-coding-plan.svg":st,"../assets/provider-logos/zhipuai-coding-plan.svg":ct}),St=new Map,Ct=new Map,wt=new Map([[`codex`,`openai`],[`chatgpt`,`openai`],[`claude`,`anthropic`],[`gemini`,`google`],[`evroc-ai`,`evroc`],[`evrocai`,`evroc`],[`ollama-cloud`,`ollama`],[`opencode-go`,`opencode`],[`wafer-ai`,`wafer.ai`],[`wafer`,`wafer.ai`],[`zai-coding-plan`,`zai`],[`zhipuai-coding-plan`,`zhipuai`],[`api-for-cursor`,`cursor`]]),Tt=Object.entries(bt).sort(([e],[t])=>!!e.toLowerCase().endsWith(`.png`)-+!!t.toLowerCase().endsWith(`.png`));for(let[e,t]of Tt){let n=e.match(/model-icons\/([^/]+)\.(?:svg|png)$/i);n?.[1]&&t&&St.set(n[1].toLowerCase(),t)}for(let[e,t]of Object.entries(xt)){let n=e.match(/provider-logos\/([^/]+)\.svg$/i);n?.[1]&&t&&Ct.set(n[1].toLowerCase(),t)}var Et=e=>(e??``).toLowerCase().trim().replace(/^models\./,``).replace(/^provider\./,``).replace(/\s+/g,`-`),Dt=e=>{let t=Et(e);if(!t)return[];let n=t.replace(/[^a-z0-9_\-./:]/g,``),r=n.split(/[/:]/)[0]||n,i=[wt.get(n),wt.get(r),n,r].filter(e=>!!(e&&e.length>0));return[...new Set(i)]},Ot=(e,t)=>{let n=vt(e,t),r=yt(n),i=Dt(t),a=[];for(let e of r){let t=St.get(e);t&&a.push(t)}for(let e of r){let t=Ct.get(e);t&&a.push(t)}for(let e of i){let t=Ct.get(e);t&&a.push(t)}return{brand:n,chain:[...new Set(a)]}},kt=(e,t)=>Ot(e,t).chain[0]??null;function At(e,t){let n=(0,J.c)(14),r;n[0]!==e||n[1]!==t?(r=Ot(e,t),n[0]=e,n[1]=t,n[2]=r):r=n[2];let{brand:i,chain:a}=r,[o,s]=(0,Y.useState)(0),c;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{s(0)},n[3]=c):c=n[3];let l;n[4]!==e||n[5]!==t?(l=[e,t],n[4]=e,n[5]=t,n[6]=l):l=n[6],(0,Y.useEffect)(c,l);let u;n[7]===a.length?u=n[8]:(u=()=>{s(e=>{let t=e+1;return t<a.length?t:a.length})},n[7]=a.length,n[8]=u);let d=k(u),f=o<a.length?a[o]??null:null,p=!!f,m;return n[9]!==i||n[10]!==d||n[11]!==f||n[12]!==p?(m={src:f,onError:d,hasLogo:p,brand:i},n[9]=i,n[10]=d,n[11]=f,n[12]=p,n[13]=m):m=n[13],m}var jt=/#([a-z0-9_-]+)/gi,Mt=15,Nt=e=>{let t={prepend:[],append:[]},n=e;for(let e of[`prepend`,`append`]){let r=RegExp(`<${e}>([\\s\\S]*?)(?:<\\/${e}>|$)`,`gi`);n=n.replace(r,(n,r)=>{let i=String(r).trim();return i&&t[e].push(i),``})}return n=n.replace(/<inject>[\s\S]*?(?:<\/inject>|$)/gi,``).trim(),{inline:n,prepend:t.prepend,append:t.append}},Pt=e=>{let t=new Map,n=new Set;for(let r of e){let e=r.name.toLowerCase();t.set(e,r),n.add(e)}for(let r of e)for(let e of r.aliases){let i=e.toLowerCase();!n.has(i)&&!t.has(i)&&t.set(i,r)}return t},Ft=(e,t,n,r)=>{let i=e,a=!0;for(;a;){let e=i,o=!1;jt.lastIndex=0,i=i.replace(jt,(e,i,a,s)=>{if(i.toLowerCase()===`skill`&&s[a+e.length]===`(`)return e;let c=t.get(i.toLowerCase());if(!c)return e;let l=c.name.toLowerCase(),u=(n.get(l)||0)+1;if(u>Mt)return o=!0,e;n.set(l,u);let d=Nt(c.content);for(let e of d.prepend)r.prepend.push(Ft(e,t,n,r));for(let e of d.append)r.append.push(Ft(e,t,n,r));return Ft(d.inline,t,n,r)}),a=i!==e&&!o}return i},It=(e,t)=>{if(!/#([a-z0-9_-]+)/i.test(e))return e;let n=Pt(t),r=[];jt.lastIndex=0;let i;for(;(i=jt.exec(e))!==null;){let t=i[1];(t.toLowerCase()!==`skill`||e[i.index+i[0].length]!==`(`)&&(n.has(t.toLowerCase())||r.push(t))}if(r.length>0)return null;let a={prepend:[],append:[]},o=Ft(e||``,n,new Map,a).trim();return[...a.prepend,o,...a.append].filter(Boolean).join(`
|
|
2
|
+
|
|
3
|
+
`)},Lt=5e3,Rt=0,zt=null,Bt=()=>{try{let e=E.getState().currentDirectory;if(e?.trim())return e.trim();let t=D.getDirectory();if(t?.trim())return t.trim();let n=z.getState().getActiveProject?.();if(n?.path?.trim())return n.path.trim()}catch(e){console.warn(`[SnippetsStore] Error resolving config directory:`,e)}return null},Vt=a()(s((e,t)=>({snippets:[],isLoading:!1,selectedSnippetName:null,snippetDraft:null,setSelectedSnippet:t=>e({selectedSnippetName:t}),setSnippetDraft:t=>e({snippetDraft:t}),loadSnippets:async()=>{let n=Date.now();if(t().snippets.length>0&&n-Rt<Lt)return!0;if(zt)return zt;let r=(async()=>{e({isLoading:!0});try{let t=Bt(),n=t?`?directory=${encodeURIComponent(t)}`:``,r=await i(`/api/config/snippets${n}`,{headers:{"Cache-Control":`no-cache`,...t?{"x-opencode-directory":t}:{}}});if(!r.ok)throw Error(`Failed to load snippets`);return e({snippets:await r.json(),isLoading:!1}),Rt=Date.now(),!0}catch(t){return console.error(`[SnippetsStore] Failed to load:`,t),e({isLoading:!1}),!1}})();zt=r;try{return await r}finally{zt=null}},createSnippet:async(e,n,r={})=>{try{let a=Bt(),o=a?`?directory=${encodeURIComponent(a)}`:``,s=await i(`/api/config/snippets/${encodeURIComponent(e)}${o}`,{method:`POST`,headers:{"Content-Type":`application/json`,...a?{"x-opencode-directory":a}:{}},body:JSON.stringify({content:n,aliases:r.aliases,description:r.description,scope:r.scope})});if(!s.ok){let i=await s.json().catch(()=>null);if(s.status===409)return await t().updateSnippet(e,{content:n,aliases:r.aliases,description:r.description});throw Error(i?.error||`Failed to create snippet`)}return Rt=0,await t().loadSnippets(),!0}catch(e){return console.error(`[SnippetsStore] Failed to create:`,e),!1}},updateSnippet:async(e,n)=>{try{let r=Bt(),a=r?`?directory=${encodeURIComponent(r)}`:``,o=await i(`/api/config/snippets/${encodeURIComponent(e)}${a}`,{method:`PATCH`,headers:{"Content-Type":`application/json`,...r?{"x-opencode-directory":r}:{}},body:JSON.stringify(n)});if(!o.ok)throw Error((await o.json().catch(()=>null))?.error||`Failed to update snippet`);return Rt=0,await t().loadSnippets(),!0}catch(e){return console.error(`[SnippetsStore] Failed to update:`,e),!1}},deleteSnippet:async n=>{try{let r=Bt(),a=r?`?directory=${encodeURIComponent(r)}`:``,o=await i(`/api/config/snippets/${encodeURIComponent(n)}${a}`,{method:`DELETE`,headers:r?{"x-opencode-directory":r}:void 0});if(!o.ok)throw Error((await o.json().catch(()=>null))?.error||`Failed to delete snippet`);return t().selectedSnippetName===n&&e({selectedSnippetName:null}),Rt=0,await t().loadSnippets(),!0}catch(e){return console.error(`[SnippetsStore] Failed to delete:`,e),!1}},expandText:async e=>{if(!/#[a-z0-9_-]+/i.test(e))return e;let n=()=>It(e,t().snippets),r=n();if(r!==null)return r;await t().loadSnippets();let a=n();if(a!==null)return a;let o=Bt(),s=o?`?directory=${encodeURIComponent(o)}`:``,c=await i(`/api/config/snippets/expand${s}`,{method:`POST`,headers:{"Content-Type":`application/json`,...o?{"x-opencode-directory":o}:{}},body:JSON.stringify({text:e})});if(!c.ok)throw Error((await c.json().catch(()=>null))?.error||`Failed to expand snippets`);return(await c.json()).text??e},getSnippetByName:e=>t().snippets.find(t=>t.name===e||t.aliases.includes(e))}),{name:`snippets-store`})),Ht=(e,t)=>{let n=`flex min-h-0 flex-col bg-background shadow-none`;if(e===`page`)return`${n} h-full w-full`;let r=`${n} pwa-overlay-panel`;return t===`top`?`${r} mx-auto mb-auto max-h-[calc(100dvh-0.75rem)] w-full max-w-lg rounded-b-xl border-x border-b border-border/50`:t===`left`?`${r} h-full w-[min(86vw,24rem)] rounded-r-xl border-r border-y border-border/50`:t===`right`?`${r} ml-auto h-full w-[min(86vw,24rem)] rounded-l-xl border-l border-y border-border/50`:`${r} mx-auto mt-auto max-h-[calc(100dvh-0.75rem)] w-full max-w-lg rounded-t-2xl border-x border-t border-border/50 pb-[max(0.5rem,var(--oc-app-bottom-safe,0px),var(--oc-safe-area-bottom,env(safe-area-inset-bottom,0px)))]`},Ut=e=>Math.min(1,Math.max(0,Number.isFinite(e)?e:0)),Wt=(e,t,n)=>{let r=Number.isFinite(t)&&t>0?t:1,i=Math.max(0,Number.isFinite(e)?e:0)/r,a=Ut(n[0]??1),o=Math.abs(i-a);for(let e=1;e<n.length;e+=1){let t=Ut(n[e]??a),r=Math.abs(i-t);r<o&&(a=t,o=r)}return a},Gt=(e,t)=>{let n=Ut(t),r=`${(1-n)*100}%`;return{progress:n,scrimOpacity:n,surfaceOpacity:n,surfaceTransform:e===`left`?`translate3d(-${r}, 0, 0)`:e===`right`?`translate3d(${r}, 0, 0)`:e===`top`?`translate3d(0, -${r}, 0)`:`translate3d(0, ${r}, 0)`}},Kt=(e,t)=>{let n=Ut(t);return e===`present`?n:1-n},qt=(e,t)=>e===`present`?+(t===`commit`):t===`commit`?0:1,Jt=e=>+!!e,Yt=.72,Xt=.98,Zt=[Yt,Xt],Qt=180,$t=`cubic-bezier(0.32, 0.72, 0, 1)`,en=64,tn=()=>Math.max(1,window.innerHeight),nn=(e,t,n=en,r)=>e<=an(t,r)-n,rn=(e,t,n)=>Math.min(t*Xt,Math.max(n?0:t*Yt,e)),an=(e,t)=>{let n=Math.max(1,e)*Yt;return t==null||!Number.isFinite(t)?n:Math.min(n,Math.max(0,t))},on=(e,t,n)=>{let r=an(t,n),i=Math.max(1,t)*Xt;return Math.abs(e-r)<=Math.abs(e-i)?Yt:Xt},sn=({initialSnapPoint:e=Yt,fitContent:t=!1,onDismiss:n,dismissThresholdPx:r=en}={})=>{let i=Y.useRef(null),a=Y.useRef(null),o=Y.useRef(null),s=Y.useRef(null),c=Y.useRef(null),l=Y.useRef(null),u=Y.useRef(!1),[d,f]=Y.useState(e),p=Y.useRef(e),m=Y.useRef(n);m.current=n;let h=Y.useCallback(()=>{o.current!==null&&window.cancelAnimationFrame(o.current),o.current=null},[]),g=Y.useCallback((e,n)=>{let r=i.current,a=p.current;if(p.current=e,f(e),h(),s.current=null,c.current?.cancel(),c.current=null,!r)return;let o=n??r.getBoundingClientRect().height;t&&a===.72&&l.current===null&&(l.current=an(tn(),o));let u=e===.72?an(tn(),t?l.current:void 0):tn()*Xt;if(r.style.height=``,r.style.willChange=``,Math.abs(o-u)<1||typeof r.animate!=`function`||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let d=r.animate([{height:`${o}px`},{height:`${u}px`}],{duration:Qt,easing:$t,fill:`both`});c.current=d,d.finished.catch(()=>void 0).then(()=>{c.current===d&&(c.current=null,d.cancel())})},[h,t]),_=Y.useCallback(e=>{if(!e.isPrimary||e.pointerType===`mouse`&&e.button!==0)return;let n=i.current;if(!n)return;let r=n.getBoundingClientRect().height;t&&p.current===.72&&(l.current=an(tn(),r)),c.current?.cancel(),c.current=null,n.style.height=`${r}px`,n.style.willChange=`height`,a.current={pointerId:e.pointerId,startY:e.clientY,startHeight:r,startSnapPoint:p.current,viewportHeight:tn()},u.current=!1,e.currentTarget.setPointerCapture(e.pointerId),e.preventDefault()},[t]),v=Y.useCallback(e=>{let t=a.current,n=i.current;if(!t||t.pointerId!==e.pointerId||!n)return;let r=t.startY-e.clientY;Math.abs(r)>3&&(u.current=!0),s.current=rn(t.startHeight+r,t.viewportHeight,!!m.current),o.current===null&&(o.current=window.requestAnimationFrame(()=>{o.current=null,i.current&&s.current!==null&&(i.current.style.height=`${s.current}px`)})),e.preventDefault()},[]),y=Y.useCallback((e,n)=>{let o=a.current,c=i.current;if(!o||o.pointerId!==e.pointerId||!c)return;a.current=null,h();let u=s.current??c.getBoundingClientRect().height;if(s.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),!n&&m.current&&nn(u,o.viewportHeight,r,t?l.current:void 0)){c.style.willChange=``,m.current(),e.preventDefault();return}let d=n?o.startSnapPoint:t?on(u,o.viewportHeight,l.current):Wt(u,o.viewportHeight,Zt);g(d,u),e.preventDefault()},[h,r,t,g]),b=Y.useCallback(()=>{if(u.current){u.current=!1;return}g(p.current===.98?Yt:Xt)},[g]),x=Y.useCallback(e=>{let t=null;(e.key===`ArrowUp`||e.key===`Home`)&&(t=Xt),(e.key===`ArrowDown`||e.key===`End`)&&(t=Yt),(e.key===`Enter`||e.key===` `)&&(t=p.current===.98?Yt:Xt),t!==null&&(e.preventDefault(),g(t))},[g]),S=Y.useCallback(()=>{a.current=null,h(),s.current=null,c.current?.cancel(),c.current=null,l.current=null,p.current=e,f(e),i.current&&(i.current.style.height=``,i.current.style.willChange=``)},[h,e]);return Y.useEffect(()=>()=>{h(),c.current?.cancel()},[h]),{surfaceRef:i,snapPoint:d,handlePointerDown:_,handlePointerMove:v,handlePointerUp:e=>y(e,!1),handlePointerCancel:e=>y(e,!0),handleClick:b,handleKeyDown:x,reset:S}},cn=e=>{let t=(0,J.c)(12),{controller:n,ariaLabel:r}=e,i;t[0]===n.snapPoint?i=t[1]:(i=Math.round(n.snapPoint*100),t[0]=n.snapPoint,t[1]=i);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsx)(`div`,{className:`h-1.5 w-11 rounded-full bg-[var(--interactive-border)]`}),t[2]=a):a=t[2];let o;return t[3]!==r||t[4]!==n.handleClick||t[5]!==n.handleKeyDown||t[6]!==n.handlePointerCancel||t[7]!==n.handlePointerDown||t[8]!==n.handlePointerMove||t[9]!==n.handlePointerUp||t[10]!==i?(o=(0,X.jsx)(`div`,{"data-mobile-sheet-snap-handle":!0,role:`separator`,tabIndex:0,"aria-label":r,"aria-orientation":`horizontal`,"aria-valuemin":Yt*100,"aria-valuemax":Xt*100,"aria-valuenow":i,className:`flex min-h-8 cursor-ns-resize touch-none justify-center pt-2.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--interactive-focus-ring)]`,onPointerDown:n.handlePointerDown,onPointerMove:n.handlePointerMove,onPointerUp:n.handlePointerUp,onPointerCancel:n.handlePointerCancel,onClick:n.handleClick,onKeyDown:n.handleKeyDown,children:a}),t[3]=r,t[4]=n.handleClick,t[5]=n.handleKeyDown,t[6]=n.handlePointerCancel,t[7]=n.handlePointerDown,t[8]=n.handlePointerMove,t[9]=n.handlePointerUp,t[10]=i,t[11]=o):o=t[11],o},ln=new WeakMap;function un(e){ln.set(e.currentTarget,!0)}function dn(e){if(ln.delete(e.currentTarget))return!0;if(e.detail!==0)return!1;if(typeof document>`u`)return!0;let t=document.activeElement,n=e.currentTarget;return n instanceof Node&&t instanceof Node&&n.contains(t)}function fn(e){e.target===e.currentTarget&&un(e)}function pn(e){return e.target===e.currentTarget&&dn(e)}var mn=new class{entries=[];listeners=new Set;previousOverflow=null;getSnapshot=()=>this.entries.at(-1)?.id??null;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));add(e,t){return this.entries=[...this.entries.filter(t=>t.id!==e.id),e],this.entries.length===1&&t&&(this.previousOverflow=t.style.overflow,t.style.overflow=`hidden`),this.emit(),()=>this.remove(e.id,t)}remove(e,t){let n=this.entries.length;this.entries=this.entries.filter(t=>t.id!==e),n>0&&this.entries.length===0&&t&&this.previousOverflow!==null&&(t.style.overflow=this.previousOverflow,this.previousOverflow=null),this.emit()}closeTop(){this.entries.at(-1)?.onClose()}emit(){for(let e of this.listeners)e()}},hn=`mobile-sessions`,gn=new Map,_n=e=>gn.get(e)??null,vn=(e,t)=>(gn.set(e,t),()=>{gn.get(e)===t&&gn.delete(e)}),yn=`.overlay-scrollbar-container`,bn=1,xn=e=>e===`left`||e===`right`?`x`:`y`,Sn=e=>e===`bottom`||e===`right`?1:-1,Cn=(e,t,n)=>{let r=xn(e)===`x`?t:n;return Math.max(0,r*Sn(e))},wn=(e,t,n,r,i)=>{let a=Cn(e,t,n),o=Math.abs(xn(e)===`x`?n:t);return Math.hypot(t,n)>r&&a>0&&o<a*i},Tn=(e,t)=>Math.min(1,Math.max(0,e/Math.max(1,t))),En=(e,t,n,r)=>Math.min(r,Math.max(n,e*t)),Dn=(e,t,n,r,i)=>e>=n||e>=i&&t>=r,On=(e,t,n,r,i)=>t!==0&&n>0?t*i/n:r>80?0:e,kn=(e,t,n=bn)=>{if(t===`bottom`)return e.scrollTop<=n;if(t===`top`)return e.scrollTop>=e.scrollHeight-e.clientHeight-n;if(e.matches?.(`:dir(rtl)`)){let r=e.scrollWidth-e.clientWidth;return t===`right`?Math.abs(e.scrollLeft)<=n:Math.abs(e.scrollLeft)>=r-n}return t===`right`?e.scrollLeft<=n:e.scrollLeft>=e.scrollWidth-e.clientWidth-n},An=(e,t)=>{for(let n=0;n<e.length;n+=1){let r=e.item(n);if(r?.identifier===t)return r}return null},jn=(e,t)=>{let n=window.getComputedStyle(e),r=xn(t),i=r===`x`?n.overflowX:n.overflowY,a=r===`x`?e.scrollWidth:e.scrollHeight,o=r===`x`?e.clientWidth:e.clientHeight;return(i===`auto`||i===`scroll`||i===`overlay`)&&a>o},Mn=(e,t,n,r)=>{let i=t instanceof Element?t:null,a=i instanceof HTMLElement?i:i?.parentElement??null;for(;a&&e.contains(a);){if(jn(a,n))return a;if(a===e)break;a=a.parentElement}let o=i?.closest(r)??null;return o&&e.contains(o)&&jn(o,n)?o:null},Nn=e=>{let t=Y.useRef(e),n=Y.useRef(null),r=Y.useRef(null);return t.current=e,Y.useCallback(e=>{if(n.current?.(),n.current=null,!e)return;let i=()=>{let e=r.current;r.current=null,e?.active&&e.controller?.finish(`cancel`)},a=(e,t,n)=>{let r=xn(e.edge)===`x`?t.clientX:t.clientY,i=n-e.lastTime,a=r-e.lastPrimary;e.velocity=On(e.velocity,a,i,n-e.lastVelocityTime,Sn(e.edge)),a!==0&&i>0&&(e.lastVelocityTime=n),e.lastPrimary=r,e.lastTime=n,e.distance=Cn(e.edge,t.clientX-e.startX,t.clientY-e.startY)},o=n=>{i();let a=t.current;if(a.disabled||n.touches.length!==1)return;let o=n.target instanceof Element?n.target:null,s=a.reservedTargetSelector?o?.closest(a.reservedTargetSelector):null;if(s&&e.contains(s)||o?.closest(`input, textarea, select, [contenteditable=""], [contenteditable="true"], [data-mobile-sheet-no-dismiss]`))return;let c=n.touches[0],l=Mn(e,n.target,a.edge,a.scrollContainerSelector??yn);if(l&&!kn(l,a.edge))return;let u=e.getBoundingClientRect(),d=xn(a.edge)===`x`?u.width||window.innerWidth:u.height||window.innerHeight;r.current={edge:a.edge,motionId:a.motionId,touchId:c.identifier,startX:c.clientX,startY:c.clientY,lastPrimary:xn(a.edge)===`x`?c.clientX:c.clientY,lastTime:n.timeStamp,lastVelocityTime:n.timeStamp,velocity:0,distance:0,commitDistance:En(d,a.commitDistanceRatio??.1,a.minCommitDistance??40,a.maxCommitDistance??64),motionDistance:d,intentDistance:a.intentDistance??8,maxOffAxisRatio:a.maxOffAxisRatio??1,flingVelocity:a.flingVelocity??.65,flingMinDistance:a.flingMinDistance??12,controller:null,active:!1}},s=e=>{let n=r.current;if(!n)return;if(t.current.disabled||e.touches.length!==1){i();return}let o=An(e.touches,n.touchId);if(!o){i();return}if(a(n,o,e.timeStamp),!n.active){if(Math.hypot(o.clientX-n.startX,o.clientY-n.startY)<=n.intentDistance)return;if(!wn(n.edge,o.clientX-n.startX,o.clientY-n.startY,n.intentDistance,n.maxOffAxisRatio)){r.current=null;return}let e=_n(n.motionId);if(!e){r.current=null;return}if(!e.begin(`dismiss`)){r.current=null;return}n.active=!0,n.controller=e}n.controller?.update(Tn(n.distance,n.motionDistance)),e.preventDefault()},c=e=>{let t=r.current;if(!t)return;let n=An(e.changedTouches,t.touchId);if(!n){i();return}if(r.current=null,!t.active)return;a(t,n,e.timeStamp),t.controller?.update(Tn(t.distance,t.motionDistance));let o=Dn(t.distance,t.velocity,t.commitDistance,t.flingVelocity,t.flingMinDistance);t.controller?.finish(o?`commit`:`cancel`),e.preventDefault()},l=()=>i();e.addEventListener(`touchstart`,o,{passive:!0,capture:!0}),e.addEventListener(`touchmove`,s,{passive:!1,capture:!0}),e.addEventListener(`touchend`,c,{passive:!1,capture:!0}),e.addEventListener(`touchcancel`,l,{passive:!0,capture:!0}),n.current=()=>{i(),e.removeEventListener(`touchstart`,o,!0),e.removeEventListener(`touchmove`,s,!0),e.removeEventListener(`touchend`,c,!0),e.removeEventListener(`touchcancel`,l,!0)}},[])},Pn=`mobile-overlay-root`,Fn=200,In=80,Ln=`cubic-bezier(0.32, 0.72, 0, 1)`,Rn=`a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`,zn=()=>{if(typeof document>`u`)return null;let e=document.getElementById(Pn);return e||(e=document.createElement(`div`),e.id=Pn,document.body.appendChild(e)),e},Bn=()=>typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,Vn=({id:e,open:t,onOpenChange:n,keepMounted:r=!1,presentation:i=`sheet`,edge:a=`bottom`,children:o,className:s,scrimClassName:c,surfaceClassName:l,surfaceElementRef:u,dismissGesture:d=!1,onExitComplete:f,ariaLabel:p})=>{let m=Y.useRef(null),h=Y.useRef(null),g=Y.useRef(null),_=Y.useRef(t),v=Y.useRef(n),y=Y.useRef(f),b=Y.useRef(0),x=Y.useRef(0),S=Y.useRef(null),C=Y.useRef([]),w=Y.useRef(null),T=Y.useRef(`standard`),E=Y.useRef(`present`),D=Y.useRef(0),O=Y.useRef(!1),k=Y.useRef(t),A=Y.useRef(!1),j=Y.useRef(t),M=Y.useRef(null),[N,P]=Y.useState(t),[F,I]=Y.useState(t),[L,R]=Y.useState(`standard`),[z,B]=Y.useState(!1),V=L===`interactive-present`,ee=Y.useSyncExternalStore(mn.subscribe,mn.getSnapshot,mn.getSnapshot),U=F&&!V&&ee===e,te=Nn({motionId:e,edge:a,disabled:!d,...typeof d==`object`?d:{}}),ne=Y.useCallback(e=>{g.current=e,te(e),typeof u==`function`?u(e):u&&typeof u==`object`&&(u.current=e)},[te,u]),W=Y.useCallback(()=>{j.current&&(j.current=!1,I(!1),r||P(!1),y.current?.())},[r]);_.current=t,v.current=n,y.current=f,typeof document<`u`&&!m.current&&(m.current=zn());let G=Y.useCallback(e=>{let t=Gt(a,e);b.current=t.progress,!(!h.current||!g.current)&&(h.current.style.opacity=String(t.scrimOpacity),g.current.style.transform=t.surfaceTransform,g.current.style.opacity=String(t.surfaceOpacity))},[a]),K=Y.useCallback(()=>{S.current!==null&&window.cancelAnimationFrame(S.current),S.current=null},[]),re=Y.useCallback(()=>{h.current&&(h.current.style.willChange=``),g.current&&(g.current.style.willChange=``)},[]),ie=Y.useCallback((e=C.current)=>{for(let t of e)t.cancel();C.current=[]},[]),ae=Y.useCallback(()=>{K();let e=w.current;if(e){let t=e.animations[1]?.effect?.getComputedTiming().progress;G(typeof t==`number`&&Number.isFinite(t)?e.from+(e.target-e.from)*t:b.current),ie(e.animations),w.current=null}else ie();re(),B(!1)},[G,ie,K,re]),q=Y.useCallback((e,t)=>{if(w.current?.target===e)return;ae();let n=b.current,r=h.current,i=g.current;if(B(!0),!r||!i||Bn()||n===e){G(e),re(),B(!1),t?.();return}let o=Gt(a,n),s=Gt(a,e);r.style.willChange=`opacity`,i.style.willChange=`transform, opacity`;let c=Math.max(In,Fn*Math.abs(e-n)),l=[r.animate([{opacity:o.scrimOpacity},{opacity:s.scrimOpacity}],{duration:c,easing:Ln,fill:`forwards`}),i.animate([{transform:o.surfaceTransform,opacity:o.surfaceOpacity},{transform:s.surfaceTransform,opacity:s.surfaceOpacity}],{duration:c,easing:Ln,fill:`forwards`})];C.current=l;let u={from:n,target:e,animations:l};w.current=u,Promise.all(l.map(e=>e.finished.catch(()=>void 0))).then(()=>{w.current===u&&(G(e),ie(l),w.current=null,re(),B(!1),t?.())})},[G,ie,re,a,ae]);if(Y.useLayoutEffect(()=>{A.current=N,N&&G(x.current)},[G,N]),Y.useLayoutEffect(()=>{j.current=F},[F]),Y.useEffect(()=>{t&&!A.current&&(x.current=b.current,P(!0)),t&&!j.current&&(j.current=!0,I(!0)),A.current&&T.current===`standard`&&q(Jt(t),()=>{!_.current&&T.current===`standard`&&W()})},[W,t,q]),Y.useLayoutEffect(()=>{!N||T.current!==`standard`||q(+!!t,()=>{!_.current&&T.current===`standard`&&W()})},[W,N,t,q]),Y.useEffect(()=>{if(!(!F||V))return window.dispatchEvent(new Event(`oc:mobile-overlay-opened`)),()=>{window.dispatchEvent(new Event(`oc:mobile-overlay-closed`))}},[F,V]),Y.useEffect(()=>{if(!(!F||V))return mn.add({id:e,onClose:()=>v.current(!1)},document.body)},[F,e,V]),Y.useEffect(()=>{if(!F||V||!U)return;let e=g.current,t=document.activeElement instanceof HTMLElement?document.activeElement:null;e?.focus({preventScroll:!0});let n=t=>{if(t.key===`Escape`&&mn.closeTop(),t.key!==`Tab`||!e)return;let n=Array.from(e.querySelectorAll(Rn)).filter(e=>!e.closest(`[data-mobile-sheet-snap-handle]`)),r=n[0]??e,i=n.at(-1)??e;t.shiftKey&&document.activeElement===r&&(t.preventDefault(),i.focus({preventScroll:!0})),!t.shiftKey&&document.activeElement===i&&(t.preventDefault(),r.focus({preventScroll:!0}))};return document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`keydown`,n),Ce()||t?.focus({preventScroll:!0})}},[F,V,U]),M.current={begin:e=>{if(e===`dismiss`&&(!j.current||T.current===`interactive-present`))return!1;ae(),D.current+=1,O.current=!0,E.current=e;let t=e===`present`?`interactive-present`:`interactive-dismiss`;return T.current=t,R(t),B(!0),e===`present`&&(x.current=b.current,j.current=!0,I(!0),P(!0)),!0},update:e=>{O.current&&(x.current=Kt(E.current,e),S.current===null&&(S.current=window.requestAnimationFrame(()=>{S.current=null,O.current&&G(x.current)})))},finish:e=>{if(!O.current)return;O.current=!1;let t=D.current,n=E.current,r=qt(n,e);S.current!==null&&(K(),G(x.current)),q(r,()=>{t===D.current&&(e===`commit`&&v.current(n===`present`),n===`present`&&e===`cancel`&&!_.current&&W(),T.current=`standard`,R(`standard`),r===0&&W())})},interrupt:()=>{D.current+=1,O.current=!1;let e=T.current===`interactive-present`&&!_.current;e||(T.current=`standard`,R(`standard`)),ae(),q(Jt(_.current),()=>{_.current||W(),e&&(T.current=`standard`,R(`standard`))})}},Y.useLayoutEffect(()=>{let e=k.current;k.current=t,e&&!t&&T.current!==`standard`&&M.current?.interrupt()},[t]),Y.useEffect(()=>{let t=vn(e,{begin:e=>M.current?.begin(e)??!1,update:e=>M.current?.update(e),finish:e=>M.current?.finish(e),interrupt:()=>M.current?.interrupt()});return()=>{t(),K(),ie(),w.current=null,re(),M.current=null}},[ie,K,re,e]),!N||!m.current)return null;let oe=(0,X.jsx)(`div`,{ref:h,className:H(`oc-mobile-window-motion oc-keyboard-inset-surface fixed inset-0 z-[60] flex flex-col bg-[rgb(0_0_0_/_0.45)]`,z&&`oc-mobile-window-motion-active`,!F&&!V&&`pointer-events-none invisible`,c,s),"data-mobile-overlay-active":String(F),role:V?void 0:`dialog`,"aria-label":V?void 0:p,"aria-modal":F&&U?`true`:void 0,"aria-hidden":V||!F||!U||void 0,inert:V||!F||!U||void 0,onPointerDown:fn,onClick:e=>{!F||V||!U||pn(e)&&v.current(!1)},children:(0,X.jsx)(`div`,{ref:ne,tabIndex:-1,className:H(`oc-mobile-floating-shell`,Ht(i,a),l),"data-oc-motion-id":e,style:{contain:`layout paint style`},onClick:e=>e.stopPropagation(),children:o})});return(0,be.createPortal)(oe,m.current)},Hn=Y.createContext(null),Un=e=>{let t=(0,J.c)(5),{children:n}=e,r=Y.useContext(Hn);if(!r)return null;let i;t[0]===n?i=t[1]:(i=(0,X.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:n}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,be.createPortal)(i,r),t[2]=r,t[3]=i,t[4]=a):a=t[4],a},Wn=e=>{let t=(0,J.c)(45),{id:n,open:r,onOpenChange:i,title:a,leading:o,trailing:s,ariaLabel:c,closeAriaLabel:l,resizeAriaLabel:u,initiallyExpanded:d,fitContent:f,bodyClassName:p,children:m}=e,h=d!==void 0&&d,g=f!==void 0&&f,_=h?Xt:void 0,v;t[0]===i?v=t[1]:(v=()=>i(!1),t[0]=i,t[1]=v);let y;t[2]!==g||t[3]!==_||t[4]!==v?(y={initialSnapPoint:_,fitContent:g,onDismiss:v},t[2]=g,t[3]=_,t[4]=v,t[5]=y):y=t[5];let b=sn(y),[x,S]=Y.useState(null),C=a!=null||o!=null||s!=null,w=b.snapPoint===Xt,T=w||!g,E;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(E={reservedTargetSelector:`[data-mobile-sheet-snap-handle]`},t[6]=E):E=t[6];let D=w?`h-[98dvh] max-h-[98dvh]`:g?`h-auto max-h-[72dvh]`:`h-[72dvh] max-h-[98dvh]`,O=b.surfaceRef,k=b.reset,A=T&&`flex-1`,j;t[7]===A?j=t[8]:(j=H(`flex min-h-0 flex-col`,A),t[7]=A,t[8]=j);let M;t[9]!==u||t[10]!==b?(M=(0,X.jsx)(cn,{controller:b,ariaLabel:u}),t[9]=u,t[10]=b,t[11]=M):M=t[11];let N;t[12]!==l||t[13]!==g||t[14]!==C||t[15]!==o||t[16]!==i||t[17]!==a||t[18]!==s?(N=C?(0,X.jsxs)(`div`,{className:g?`flex min-h-9 items-center gap-2 px-4 pb-1`:`flex min-h-10 items-center gap-2 px-4 pb-2`,children:[o?(0,X.jsx)(`div`,{className:`flex shrink-0 items-center`,children:o}):null,(0,X.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),s?(0,X.jsx)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:s}):null,(0,X.jsx)(`div`,{ref:S,className:`contents`}),(0,X.jsx)(te,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>i(!1),"aria-label":l,className:`shrink-0 text-muted-foreground`,style:{touchAction:`manipulation`},children:(0,X.jsx)(U,{name:`close`,className:`size-5`})})]}):null,t[12]=l,t[13]=g,t[14]=C,t[15]=o,t[16]=i,t[17]=a,t[18]=s,t[19]=N):N=t[19];let P;t[20]!==M||t[21]!==N?(P=(0,X.jsxs)(`div`,{className:`shrink-0`,children:[M,N]}),t[20]=M,t[21]=N,t[22]=P):P=t[22];let F=T&&`flex-1`,I;t[23]!==p||t[24]!==F?(I=H(`flex min-h-0 flex-col overflow-hidden`,F,p),t[23]=p,t[24]=F,t[25]=I):I=t[25];let L;t[26]!==m||t[27]!==I?(L=(0,X.jsx)(`div`,{className:I,"data-page-scroll-lock":`true`,children:m}),t[26]=m,t[27]=I,t[28]=L):L=t[28];let R;t[29]!==j||t[30]!==P||t[31]!==L?(R=(0,X.jsxs)(`div`,{className:j,children:[P,L]}),t[29]=j,t[30]=P,t[31]=L,t[32]=R):R=t[32];let z;t[33]!==c||t[34]!==n||t[35]!==i||t[36]!==r||t[37]!==b.reset||t[38]!==b.surfaceRef||t[39]!==R||t[40]!==D?(z=(0,X.jsx)(Vn,{id:n,open:r,onOpenChange:i,presentation:`sheet`,edge:`bottom`,dismissGesture:E,ariaLabel:c,surfaceClassName:D,surfaceElementRef:O,onExitComplete:k,children:R}),t[33]=c,t[34]=n,t[35]=i,t[36]=r,t[37]=b.reset,t[38]=b.surfaceRef,t[39]=R,t[40]=D,t[41]=z):z=t[41];let B;return t[42]!==x||t[43]!==z?(B=(0,X.jsx)(Hn.Provider,{value:x,children:z}),t[42]=x,t[43]=z,t[44]=B):B=t[44],B};function Gn(e,t){let n=(0,J.c)(3),r;return n[0]!==e||n[1]!==t?(r=n=>{[e,t].forEach(e=>{typeof e==`function`?e(n):e&&typeof e==`object`&&(e.current=n)})},n[0]=e,n[1]=t,n[2]=r):r=n[2],r}var Kn=Y.forwardRef((e,t)=>{let n=(0,J.c)(28),{as:r,orientation:i,offset:a,size:o,isEnabled:s,hideTopShadow:c,hideBottomShadow:l,observeMutations:u,onVisibilityChange:d,style:f,className:p,children:m,...h}=e,g=r===void 0?`div`:r,_=i===void 0?`vertical`:i,v=a===void 0?0:a,y=o===void 0?48:o,b=s===void 0||s,x=c!==void 0&&c,S=l!==void 0&&l,C=u===void 0||u,w=Y.useRef(null),T=Y.useRef(`none`),E=h[`data-scroll-shadow`];delete h[`data-scroll-shadow`];let D=f,O;n[0]!==y||n[1]!==D?(O={...D},O[`--scroll-shadow-size`]=`${y}px`,n[0]=y,n[1]=D,n[2]=O):O=n[2];let k=O,A=qn,j=Jn,M;n[3]!==S||n[4]!==x||n[5]!==b||n[6]!==v||n[7]!==d||n[8]!==_?(M=()=>{let e=w.current;if(!e)return;if(!b){j(e),T.current!==`none`&&(T.current=`none`,d?.(`none`));return}let t=_===`vertical`?e.scrollTop>v+1:e.scrollLeft>v+1,n=_===`vertical`?e.scrollHeight-(e.scrollTop+e.clientHeight)>v+1:e.scrollWidth-(e.scrollLeft+e.clientWidth)>v+1,r=x&&_===`vertical`?!1:t;S&&_===`vertical`&&(n=!1),A(e,r,n,_===`vertical`?`top`:`left`,_===`vertical`?`bottom`:`right`);let i=r&&n?`both`:r?_===`vertical`?`top`:`left`:n?_===`vertical`?`bottom`:`right`:`none`;i!==T.current&&(T.current=i,d?.(i))},n[3]=S,n[4]=x,n[5]=b,n[6]=v,n[7]=d,n[8]=_,n[9]=M):M=n[9];let N=M,P,F;n[10]!==N||n[11]!==b?(P=()=>{b||N()},F=[N,b],n[10]=N,n[11]=b,n[12]=P,n[13]=F):(P=n[12],F=n[13]),Y.useLayoutEffect(P,F);let I,L;n[14]!==N||n[15]!==b||n[16]!==C?(I=()=>{let e=w.current;if(!e||!b)return;let t=null,n=()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,N()}))},r=n,i=typeof ResizeObserver<`u`?new ResizeObserver(n):null,a=C&&typeof MutationObserver<`u`?new MutationObserver(n):null;return N(),e.addEventListener(`scroll`,r,{passive:!0}),i?.observe(e),a?.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t!==null&&cancelAnimationFrame(t),e.removeEventListener(`scroll`,r),i?.disconnect(),a?.disconnect()}},L=[N,b,C],n[14]=N,n[15]=b,n[16]=C,n[17]=I,n[18]=L):(I=n[17],L=n[18]),Y.useEffect(I,L);let R=Gn(w,t),z=E??!0,B;return n[19]!==g||n[20]!==m||n[21]!==p||n[22]!==R||n[23]!==k||n[24]!==_||n[25]!==h||n[26]!==z?(B=(0,X.jsx)(g,{...h,ref:R,className:p,"data-orientation":_,"data-scroll-shadow":z,style:k,children:m}),n[19]=g,n[20]=m,n[21]=p,n[22]=R,n[23]=k,n[24]=_,n[25]=h,n[26]=z,n[27]=B):B=n[27],B});Kn.displayName=`ScrollShadow`;function qn(e,t,n,r,i){let a=`${r}${i.charAt(0).toUpperCase()}${i.slice(1)}Scroll`;t&&n?(e.dataset[a]=`true`,e.removeAttribute(`data-${r}-scroll`),e.removeAttribute(`data-${i}-scroll`)):(e.dataset[`${r}Scroll`]=String(t),e.dataset[`${i}Scroll`]=String(n),e.removeAttribute(`data-${r}-${i}-scroll`))}function Jn(e){[`top`,`bottom`,`top-bottom`,`left`,`right`,`left-right`].forEach(t=>{e.removeAttribute(`data-${t}-scroll`)})}var Yn=Y.forwardRef((e,t)=>{let n=(0,J.c)(45),r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],d=n[9],f=n[10],p=n[11],m=n[12],h=n[13],g=n[14],_=n[15],v=n[16]):({className:i,outerClassName:s,children:r,style:d,minThumbSize:o,hideDelayMs:a,as:f,scrollbarClassName:u,disableHorizontal:p,observeMutations:m,fillContainer:h,preventOverscroll:g,useScrollShadow:_,scrollShadowSize:l,userIntentOnly:v,...c}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u,n[9]=d,n[10]=f,n[11]=p,n[12]=m,n[13]=h,n[14]=g,n[15]=_,n[16]=v);let y=f===void 0?`div`:f,b=p!==void 0&&p,x=m===void 0||m,S=h===void 0||h,C=g!==void 0&&g,w=_!==void 0&&_,T=v!==void 0&&v,E=Y.useRef(null),D,O;n[17]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>E.current,O=[],n[17]=D,n[18]=O):(D=n[17],O=n[18]),Y.useImperativeHandle(t,D,O);let k=C&&`overscroll-none`,A;n[19]!==s||n[20]!==k?(A=H(`relative flex flex-col min-h-0 w-full overflow-hidden`,k,s),n[19]=s,n[20]=k,n[21]=A):A=n[21];let j;n[22]!==y||n[23]!==r||n[24]!==i||n[25]!==b||n[26]!==S||n[27]!==x||n[28]!==C||n[29]!==c||n[30]!==l||n[31]!==d||n[32]!==w?(j=w?(0,X.jsx)(Kn,{as:y,ref:E,size:l,className:H(`overlay-scrollbar-target overlay-scrollbar-container`,C&&`overscroll-none`,S?`flex-1 min-h-0 w-full`:`flex-none w-full h-auto`,b?`overflow-y-auto overflow-x-hidden`:`overflow-auto`,i),style:d,observeMutations:x,...c,children:r}):(0,X.jsx)(y,{ref:E,className:H(`overlay-scrollbar-target overlay-scrollbar-container`,C&&`overscroll-none`,S?`flex-1 min-h-0 w-full`:`flex-none w-full h-auto`,b?`overflow-y-auto overflow-x-hidden`:`overflow-auto`,i),style:d,...c,children:r}),n[22]=y,n[23]=r,n[24]=i,n[25]=b,n[26]=S,n[27]=x,n[28]=C,n[29]=c,n[30]=l,n[31]=d,n[32]=w,n[33]=j):j=n[33];let M;n[34]!==b||n[35]!==a||n[36]!==o||n[37]!==x||n[38]!==u||n[39]!==T?(M=(0,X.jsx)(se,{containerRef:E,minThumbSize:o,hideDelayMs:a,className:u,disableHorizontal:b,observeMutations:x,userIntentOnly:T}),n[34]=b,n[35]=a,n[36]=o,n[37]=x,n[38]=u,n[39]=T,n[40]=M):M=n[40];let N;return n[41]!==A||n[42]!==j||n[43]!==M?(N=(0,X.jsxs)(`div`,{className:A,children:[j,M]}),n[41]=A,n[42]=j,n[43]=M,n[44]=N):N=n[44],N});Yn.displayName=`ScrollableOverlay`;var Xn=e=>{let t=(0,J.c)(12),{modelId:n,providerId:r,alt:i,className:a,onError:o,fallback:s}=e,{src:c,onError:l,hasLogo:u,brand:d}=At(n,r),f;t[0]!==o||t[1]!==l?(f=()=>{l(),o?.()},t[0]=o,t[1]=l,t[2]=f):f=t[2];let p=f;if(!u||!c){let e=s??null,n;return t[3]===e?n=t[4]:(n=(0,X.jsx)(X.Fragment,{children:e}),t[3]=e,t[4]=n),n}let m=i||`${d||n||r||`model`} logo`,h;t[5]===a?h=t[6]:(h=H(`brightness-0 dark:invert object-contain`,a),t[5]=a,t[6]=h);let g;return t[7]!==p||t[8]!==c||t[9]!==m||t[10]!==h?(g=(0,X.jsx)(`img`,{src:c,alt:m,className:h,loading:`eager`,decoding:`async`,fetchPriority:`high`,draggable:!1,onError:p}),t[7]=p,t[8]=c,t[9]=m,t[10]=h,t[11]=g):g=t[11],g};function Zn(e,t,n,r,i){let a=e.find(e=>e.id===n);if(!a)return null;let o=(Array.isArray(a.models)?a.models:[]).find(e=>e.id===r);return!o||t.some(e=>e.providerID===n&&e.modelID===r)?null:i===void 0?{provider:a,model:o,providerID:n,modelID:r}:{provider:a,model:o,providerID:n,modelID:r,variant:i}}var Qn=e=>{let t=(0,J.c)(30),n=ee($n),i=r(er),a=r(tr),o=r(nr),s=e?.currentProviderID??null,c=e?.currentModelID??null,l;if(t[0]!==i||t[1]!==o||t[2]!==n){let e;t[4]!==o||t[5]!==n?(e=e=>{let{providerID:t,modelID:r,variant:i}=e;return Zn(n,o,t,r,i)},t[4]=o,t[5]=n,t[6]=e):e=t[6],l=i.map(e).filter(rr),t[0]=i,t[1]=o,t[2]=n,t[3]=l}else l=t[3];let u=l,d;if(t[7]!==c||t[8]!==s||t[9]!==i||t[10]!==o||t[11]!==n||t[12]!==a){bb0:{let e;t[14]!==o||t[15]!==n?(e=e=>{let{providerID:t,modelID:r,variant:i}=e;return Zn(n,o,t,r,i)},t[14]=o,t[15]=n,t[16]=e):e=t[16];let r;t[17]===i?r=t[18]:(r=e=>{let{providerID:t,modelID:n}=e;return!i.some(e=>e.providerID===t&&e.modelID===n)},t[17]=i,t[18]=r);let l=a.map(e).filter(ir).filter(r);if(!s||!c){d=l;break bb0}if(i.some(e=>e.providerID===s&&e.modelID===c)){d=l;break bb0}let u;t[19]!==c||t[20]!==s?(u=e=>e.providerID===s&&e.modelID===c,t[19]=c,t[20]=s,t[21]=u):u=t[21];let f=l.findIndex(u);if(f===0){d=l;break bb0}if(f>0){let e=l.slice(),[t]=e.splice(f,1);e.unshift(t),d=e;break bb0}let p;t[22]!==c||t[23]!==s||t[24]!==o||t[25]!==n?(p=Zn(n,o,s,c),t[22]=c,t[23]=s,t[24]=o,t[25]=n,t[26]=p):p=t[26];let m=p;if(!m){d=l;break bb0}d=[m,...l]}t[7]=c,t[8]=s,t[9]=i,t[10]=o,t[11]=n,t[12]=a,t[13]=d}else d=t[13];let f=d,p;return t[27]!==u||t[28]!==f?(p={favoriteModelsList:u,recentModelsList:f},t[27]=u,t[28]=f,t[29]=p):p=t[29],p};function $n(e){return e.providers}function er(e){return e.favoriteModels}function tr(e){return e.recentModels}function nr(e){return e.hiddenModels}function rr(e){return e!==null}function ir(e){return e!==null}var ar=Object.assign({"../assets/provider-logos/anthropic.svg":He,"../assets/provider-logos/bailian-coding-plan.svg":Ue,"../assets/provider-logos/cursor.svg":We,"../assets/provider-logos/deepseek.svg":Ge,"../assets/provider-logos/evroc.svg":Ke,"../assets/provider-logos/github-copilot.svg":qe,"../assets/provider-logos/gocode.svg":Je,"../assets/provider-logos/google.svg":Ye,"../assets/provider-logos/kimi-for-coding.svg":Xe,"../assets/provider-logos/lmstudio.svg":Ze,"../assets/provider-logos/minimax-cn-coding-plan.svg":Qe,"../assets/provider-logos/minimax-coding-plan.svg":$e,"../assets/provider-logos/nano-gpt.svg":et,"../assets/provider-logos/ollama.svg":tt,"../assets/provider-logos/openai.svg":nt,"../assets/provider-logos/opencode.svg":rt,"../assets/provider-logos/openrouter.svg":it,"../assets/provider-logos/wafer.ai.svg":at,"../assets/provider-logos/xai.svg":ot,"../assets/provider-logos/zai-coding-plan.svg":st,"../assets/provider-logos/zhipuai-coding-plan.svg":ct}),or=new Map,sr=new Set,cr=new Map([[`codex`,`openai`],[`chatgpt`,`openai`],[`claude`,`anthropic`],[`gemini`,`google`],[`evroc-ai`,`evroc`],[`evrocai`,`evroc`],[`ollama-cloud`,`ollama`],[`opencode-go`,`opencode`],[`wafer-ai`,`wafer.ai`],[`wafer`,`wafer.ai`]]),lr=e=>(e??``).toLowerCase().trim().replace(/^models\./,``).replace(/^provider\./,``).replace(/\s+/g,`-`),ur=e=>{let t=lr(e);if(!t)return[];let n=t.replace(/[^a-z0-9_\-./:]/g,``),r=n.split(/[/:]/)[0]||n,i=[cr.get(n),cr.get(r),n,r].filter(e=>!!(e&&e.length>0));return[...new Set(i)]},dr=e=>{let t=ur(e).find(e=>or.has(e))??null;return t?or.get(t)??null:null},fr=e=>{if(typeof Image>`u`)return;let t=dr(e);if(!t||sr.has(t))return;sr.add(t);let n=new Image;n.decoding=`async`,n.onerror=()=>{sr.delete(t)},n.src=t,n.decode?.().catch(()=>void 0)},pr=e=>{for(let t of e)fr(t)};for(let[e,t]of Object.entries(ar)){let n=e.match(/provider-logos\/([^/]+)\.svg$/i);n?.[1]&&t&&or.set(n[1].toLowerCase(),t)}function mr(e){let t=(0,J.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):(r=ur(e).find(hr)??null,n=!!r,i=r?or.get(r)??null:null,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i,[o,s]=(0,Y.useState)(n?`local`:`none`),c;t[4]===n?c=t[5]:(c=()=>{s(n?`local`:`none`)},t[4]=n,t[5]=c);let l;t[6]!==n||t[7]!==r?(l=[n,r],t[6]=n,t[7]=r,t[8]=l):l=t[8],(0,Y.useEffect)(c,l);let u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{s(`none`)},t[9]=u):u=t[9];let d=k(u);if(!r){let e;return t[10]===d?e=t[11]:(e={src:null,onError:d,hasLogo:!1},t[10]=d,t[11]=e),e}if(o===`local`&&a){let e;return t[12]!==d||t[13]!==a?(e={src:a,onError:d,hasLogo:!0},t[12]=d,t[13]=a,t[14]=e):e=t[14],e}let f;return t[15]===d?f=t[16]:(f={src:null,onError:d,hasLogo:!1},t[15]=d,t[16]=f),f}function hr(e){return or.has(e)}var gr=e=>{let t=(0,J.c)(4),{className:n}=e,r;t[0]===n?r=t[1]:(r=H(`text-muted-foreground`,n),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,X.jsx)(U,{name:`stack`,className:r}),t[2]=r,t[3]=i),i},_r=e=>{let t=(0,J.c)(12),{providerId:n,alt:r,className:i,onError:a}=e,{src:o,onError:s,hasLogo:c}=mr(n),l;t[0]!==a||t[1]!==s?(l=()=>{s(),a?.()},t[0]=a,t[1]=s,t[2]=l):l=t[2];let u=l;if(!c||!o){let e;return t[3]===i?e=t[4]:(e=(0,X.jsx)(gr,{className:i}),t[3]=i,t[4]=e),e}let d=r||`${n} logo`,f;t[5]===i?f=t[6]:(f=H(`dark:invert object-contain`,i),t[5]=i,t[6]=f);let p;return t[7]!==u||t[8]!==o||t[9]!==d||t[10]!==f?(p=(0,X.jsx)(`img`,{src:o,alt:d,className:f,loading:`eager`,decoding:`async`,fetchPriority:`high`,draggable:!1,onError:u}),t[7]=u,t[8]=o,t[9]=d,t[10]=f,t[11]=p):p=t[11],p},vr=(e,t)=>{if(!e||typeof e!=`object`)return;let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0},yr=(e,t,n)=>{let r=vr(t.limit,`context`),i=vr(t.limit,`output`),a=r??n?.limit?.context,o=i??n?.limit?.output;return a===void 0&&o===void 0?n:{...n??{id:typeof t.id==`string`?t.id:``,providerId:e,name:typeof t.name==`string`?t.name:void 0},limit:{...n?.limit,...a===void 0?{}:{context:a},...o===void 0?{}:{output:o}}}};function br(e){let t=e.toLowerCase().trim();return{lower:t,compact:t.replace(/[^a-z0-9]/g,``),tokens:t.split(/[^a-z0-9]+/).filter(Boolean)}}function xr(e,t){let n=br(t);if(!n.lower)return!0;let r=br(e);return r.lower.includes(n.lower)||n.compact.length>=2&&r.compact.includes(n.compact)?!0:n.tokens.length!==0&&n.tokens.every(e=>r.tokens.some(t=>t.startsWith(e)||t.includes(e)))}var Sr=a()(o(e=>({collapsedSections:{},toggleSection:t=>e(e=>{let n={...e.collapsedSections};return n[t]?delete n[t]:n[t]=!0,{collapsedSections:n}})}),{name:`model-picker-collapsed-sections`,version:1})),Cr={image:{icon:`file-image`,labelKey:`modalityImage`},video:{icon:`file-video`,labelKey:`modalityVideo`},audio:{icon:`file-music`,labelKey:`modalityAudio`}},wr=e=>e.trim().toLowerCase(),Tr=e=>{let t=(0,J.c)(5),{iconName:n,label:r}=e,i;t[0]===n?i=t[1]:(i=(0,X.jsx)(U,{name:n,className:`size-3.5`}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,X.jsx)(`span`,{className:`flex size-4 flex-shrink-0 items-center justify-center text-muted-foreground`,title:r,"aria-label":r,role:`img`,children:i}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a},Er=(e,t)=>{let n=[];e?.tool_call&&t.capabilityToolCalling&&n.push({key:`tool_call`,icon:`tools`,label:t.capabilityToolCalling}),e?.reasoning&&t.capabilityReasoning&&n.push({key:`reasoning`,icon:`brain-ai-3`,label:t.capabilityReasoning});let r=[...e?.modalities?.input??[],...e?.modalities?.output??[]],i=Array.from(new Set(r.map(wr).filter(Boolean)));for(let e of i){let r=Cr[e];if(!r)continue;let i=t[r.labelKey];i&&n.push({key:`modality-${e}`,icon:r.icon,label:i})}return n},Dr=e=>new Intl.NumberFormat(j(),{notation:`compact`,compactDisplay:`short`,maximumFractionDigits:1,minimumFractionDigits:0}).format(e),Or=e=>new Intl.NumberFormat(j(),{style:`currency`,currency:`USD`,maximumFractionDigits:4,minimumFractionDigits:2}).format(e),kr=e=>P(e,void 0,{maxLength:40}),Ar=e=>{if(typeof e!=`number`||Number.isNaN(e))return``;if(e===0)return`0`;let t=Dr(e);return t.endsWith(`.0`)?t.slice(0,-2):t},jr=e=>typeof e!=`number`||!Number.isFinite(e)?`—`:Or(e),Mr=(e,t)=>t?!0:e?!!(e.tool_call||e.reasoning||e.cost?.input!==void 0||e.cost?.output!==void 0||(e.modalities?.input?.length??0)>0||(e.modalities?.output?.length??0)>0):!1,Nr=e=>{let t=(0,J.c)(12),{metadata:n,providerName:r,active:i,labels:a,children:o}=e,[s,c]=Y.useState(!1),l,u;if(t[0]===i?(l=t[1],u=t[2]):(l=()=>{if(!i){c(!1);return}let e=window.setTimeout(()=>c(!0),450);return()=>window.clearTimeout(e)},u=[i],t[0]=i,t[1]=l,t[2]=u),Y.useEffect(l,u),!Mr(n,r))return o;let d;if(t[3]!==i||t[4]!==o||t[5]!==s||t[6]!==a||t[7]!==n||t[8]!==r){let e=Er(n,a),c=n?.cost?.input!==void 0||n?.cost?.output!==void 0,l;t[10]===o?l=t[11]:(l=(0,X.jsx)(ie,{asChild:!0,children:o}),t[10]=o,t[11]=l),d=(0,X.jsxs)(q,{delayDuration:0,open:i&&s,onOpenChange:Hr,children:[l,i&&s?(0,X.jsx)(ae,{side:`right`,sideOffset:8,className:`min-w-52 max-w-xs text-left transition-none data-[starting-style]:opacity-100 data-[starting-style]:scale-100 data-[ending-style]:opacity-100 data-[ending-style]:scale-100`,children:(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 text-left text-xs`,children:[r&&a.provider?(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-muted-foreground`,children:[(0,X.jsx)(`span`,{className:`typography-meta font-medium`,children:a.provider}),(0,X.jsx)(`span`,{className:`typography-meta text-foreground`,children:r})]}):null,e.length>0?(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-muted-foreground`,children:[(0,X.jsx)(`span`,{className:`typography-meta font-medium shrink-0`,children:a.capabilities}),(0,X.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-1`,children:e.map(Ur)})]}):null,c?(0,X.jsxs)(`div`,{className:`flex items-start justify-between gap-3 text-muted-foreground`,children:[a.costPerMillion?(0,X.jsx)(`span`,{className:`typography-meta font-medium shrink-0`,children:a.costPerMillion}):null,(0,X.jsxs)(`div`,{className:`flex flex-col items-end gap-0.5 min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-end gap-1.5 min-w-0`,children:[a.costInput?(0,X.jsx)(`span`,{className:`typography-meta shrink-0`,children:a.costInput}):null,(0,X.jsx)(`span`,{className:`typography-meta text-foreground tabular-nums`,children:jr(n?.cost?.input)})]}),(0,X.jsxs)(`div`,{className:`flex items-center justify-end gap-1.5 min-w-0`,children:[a.costOutput?(0,X.jsx)(`span`,{className:`typography-meta shrink-0`,children:a.costOutput}):null,(0,X.jsx)(`span`,{className:`typography-meta text-foreground tabular-nums`,children:jr(n?.cost?.output)})]})]})]}):null]})}):null]}),t[3]=i,t[4]=o,t[5]=s,t[6]=a,t[7]=n,t[8]=r,t[9]=d}else d=t[9];return d},Pr=()=>{let e=0,t=new Set,n=new Map,r=e=>{let t=n.get(e);if(t)for(let e of t)e()};return{getSnapshot:()=>e,subscribe:e=>(t.add(e),()=>t.delete(e)),subscribeIndex:(e,t)=>{let r=n.get(e);return r||(r=new Set,n.set(e,r)),r.add(t),()=>{r.delete(t),r.size===0&&n.delete(e)}},set:n=>{if(e===n)return;let i=e;e=n,r(i),r(n);for(let e of t)e()}}},Fr=Y.memo(e=>{let t=(0,J.c)(12),{store:n,index:r,children:i}=e,a;t[0]!==r||t[1]!==n?(a=()=>n.getSnapshot()===r,t[0]=r,t[1]=n,t[2]=a):a=t[2];let[o,s]=Y.useState(a),c,l;t[3]!==r||t[4]!==n?(c=()=>{let e=()=>s(n.getSnapshot()===r);return e(),n.subscribeIndex(r,e)},l=[r,n],t[3]=r,t[4]=n,t[5]=c,t[6]=l):(c=t[5],l=t[6]),Y.useEffect(c,l);let u;t[7]!==i||t[8]!==o?(u=i(o),t[7]=i,t[8]=o,t[9]=u):u=t[9];let d;return t[10]===u?d=t[11]:(d=(0,X.jsx)(X.Fragment,{children:u}),t[10]=u,t[11]=d),d}),Ir=e=>{let t=(0,J.c)(11),{store:n,flatModelList:r,footerContent:i,fallback:a}=e,o;t[0]===n?o=t[1]:(o=()=>n.getSnapshot(),t[0]=n,t[1]=o);let[s,c]=Y.useState(o),l,u;t[2]===n?(l=t[3],u=t[4]):(l=()=>n.subscribe(()=>c(n.getSnapshot())),u=[n],t[2]=n,t[3]=l,t[4]=u),Y.useEffect(l,u);let d=r[s],f;t[5]!==d||t[6]!==a||t[7]!==i?(f=typeof i==`function`?i(d):i??a,t[5]=d,t[6]=a,t[7]=i,t[8]=f):f=t[8];let p;return t[9]===f?p=t[10]:(p=(0,X.jsx)(X.Fragment,{children:f}),t[9]=f,t[10]=p),p},Lr=e=>{let t=(0,J.c)(21),{id:n,disabled:r,children:i}=e,a=r!==void 0&&r,o;t[0]!==a||t[1]!==n?(o={id:n,disabled:a},t[0]=a,t[1]=n,t[2]=o):o=t[2];let{attributes:s,listeners:c,setNodeRef:l,setActivatorNodeRef:u,transform:d,transition:f,isDragging:p}=ge(o),m;t[3]===d?m=t[4]:(m=me.Transform.toString(d),t[3]=d,t[4]=m);let h;t[5]!==m||t[6]!==f?(h={transform:m,transition:f},t[5]=m,t[6]=f,t[7]=h):h=t[7];let g=p&&`opacity-60`,_;t[8]===g?_=t[9]:(_=H(g),t[8]=g,t[9]=_);let v;t[10]!==s||t[11]!==i||t[12]!==p||t[13]!==c||t[14]!==u?(v=i({attributes:s,listeners:c,setActivatorNodeRef:u,isDragging:p}),t[10]=s,t[11]=i,t[12]=p,t[13]=c,t[14]=u,t[15]=v):v=t[15];let y;return t[16]!==l||t[17]!==h||t[18]!==_||t[19]!==v?(y=(0,X.jsx)(`div`,{ref:l,style:h,className:_,children:v}),t[16]=l,t[17]=h,t[18]=_,t[19]=v,t[20]=y):y=t[20],y},Rr=e=>{let t=(0,J.c)(21),{id:n,disabled:r,children:i}=e,a=r!==void 0&&r,o;t[0]!==a||t[1]!==n?(o={id:n,disabled:a},t[0]=a,t[1]=n,t[2]=o):o=t[2];let{attributes:s,listeners:c,setNodeRef:l,setActivatorNodeRef:u,transform:d,transition:f,isDragging:p}=ge(o),m;t[3]===d?m=t[4]:(m=me.Translate.toString(d),t[3]=d,t[4]=m);let h;t[5]!==m||t[6]!==f?(h={transform:m,transition:f},t[5]=m,t[6]=f,t[7]=h):h=t[7];let g=p&&`opacity-60`,_;t[8]===g?_=t[9]:(_=H(g),t[8]=g,t[9]=_);let v;t[10]!==s||t[11]!==i||t[12]!==p||t[13]!==c||t[14]!==u?(v=i({attributes:s,listeners:c,setActivatorNodeRef:u,isDragging:p}),t[10]=s,t[11]=i,t[12]=p,t[13]=c,t[14]=u,t[15]=v):v=t[15];let y;return t[16]!==l||t[17]!==h||t[18]!==_||t[19]!==v?(y=(0,X.jsx)(`div`,{ref:l,style:h,className:_,children:v}),t[16]=l,t[17]=h,t[18]=_,t[19]=v,t[20]=y):y=t[20],y},zr=32,Br=(e,t)=>{if(!t)return;if(!e){t.scrollIntoView({block:`nearest`});return}let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=r.top-n.top+e.scrollTop,a=i+r.height,o=e.scrollTop,s=o+e.clientHeight,c=i<o+zr?i-zr:a>s?a-e.clientHeight:o,l=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTop=Math.max(0,Math.min(c,l))},Vr=({providers:e,favoriteModels:t,recentModels:n,getMetadata:r,searchQuery:i,onSearchQueryChange:a,onSelect:o,labels:s,selectedModel:c,hiddenModels:l=[],allowedProviderIds:u,allowedModelIdsByProvider:d,includeNotSelected:f=!1,onSelectNone:p,selectionCount:m,disabled:h=!1,maxHeightClassName:g=`max-h-[min(400px,calc(100dvh-12rem))] flex-1`,maxHeightStyle:_,sectionHeaderClassName:v,rowClassName:y,stickyHeaders:b=!0,autoFocus:x=!0,onEscape:S,isFavorite:C,onToggleFavorite:w,renderRowEnd:T,onActiveKeyDown:E,onActiveEntryChange:D,onVariantKey:O,onReorderFavorite:k,reorderFavoriteAriaLabel:A,reorderFavoriteTitle:j,providerOrder:M,onReorderProvider:N,reorderProviderTitle:P,footerContent:F,renderVersion:I,tooltipsEnabled:L=!0})=>{let R=Y.useRef(null);R.current||=Pr();let z=R.current,B=Y.useRef([]),V=Y.useRef(null),ee=Y.useRef(!1),te=Y.useRef(null),ne=Sr(e=>e.collapsedSections),W=Sr(e=>e.toggleSection),G=Y.useMemo(()=>new Set(Object.keys(ne).filter(e=>ne[e])),[ne]),K=i.trim().length>0,[ie,ae]=Y.useState(()=>new Set),q=K?ie:G,oe=pe(ce(de,{activationConstraint:{distance:8}})),se=pe(ce(ue,{activationConstraint:{distance:8}})),me=Y.useMemo(()=>!u||u.length===0?null:new Set(u),[u]),ge=Y.useMemo(()=>d?new Map(Object.entries(d).map(([e,t])=>[e,new Set(t)])):null,[d]),J=Y.useCallback((e,t)=>!ge||ge.get(e)?.has(t)===!0,[ge]),ye=Y.useMemo(()=>new Map(e.map(e=>[e.id,e])),[e]),be=Y.useCallback((e,t)=>l.some(n=>n.providerID===e&&n.modelID===t),[l]),xe=Y.useCallback((e,t)=>{let n=i.trim();return!n||xr(e,n)||xr(t,n)},[i]),Se=Y.useMemo(()=>t.filter(({model:e,providerID:t,modelID:n})=>{if(me&&!me.has(t)||!J(t,n)||be(t,n))return!1;let r=ye.get(t)?.name||t;return xe(kr(e),r)}),[me,t,J,be,xe,ye]),Ce=Y.useMemo(()=>n.filter(({model:e,providerID:t,modelID:n})=>{if(me&&!me.has(t)||!J(t,n)||be(t,n))return!1;let r=ye.get(t)?.name||t;return xe(kr(e),r)}),[me,J,be,xe,ye,n]),we=Y.useMemo(()=>{if(!M||M.length===0)return e;let t=new Map(M.map((e,t)=>[e,t])),n=e.filter(e=>t.has(e.id)).sort((e,n)=>(t.get(e.id)??0)-(t.get(n.id)??0)),r=e.filter(e=>!t.has(e.id));return[...n,...r]},[M,e]),Te=Y.useMemo(()=>we.filter(e=>!me||me.has(e.id)).map(e=>{let t=(Array.isArray(e.models)?e.models:[]).filter(t=>{let n=typeof t.id==`string`?t.id:``;return!n||be(e.id,n)||!J(e.id,n)?!1:xe(kr(t),e.name||e.id)});return{...e,models:t}}).filter(e=>e.models.length>0),[me,J,be,xe,we]),Z=Y.useMemo(()=>{let e=[];return q.has(`favorites`)||Se.forEach(t=>e.push(t)),q.has(`recent`)||Ce.forEach(t=>e.push(t)),Te.forEach(t=>{q.has(`provider:${t.id}`)||t.models.forEach(n=>e.push({model:n,providerID:t.id,modelID:n.id}))}),e},[q,Se,Te,Ce]),Ee=Z.length>0,De=!!k&&i.trim().length===0&&Se.length>1,Oe=!!N&&i.trim().length===0&&!me&&Te.length>1,ke=Y.useMemo(()=>new Map(Se.map(e=>[`${e.providerID}:${e.modelID}`,e])),[Se]);Y.useEffect(()=>{z.set(0)},[i,z]),Y.useEffect(()=>{K||ae(e=>e.size===0?e:new Set)},[K]);let Ae=Y.useCallback(e=>{z.set(e),D?.(Z[e])},[Z,D,z]),je=Y.useCallback(e=>{let t=Z.length;if(t===0)return;ee.current=!0,te.current=null;let n=(z.getSnapshot()+e+t)%t;z.set(n),D?.(Z[n]),requestAnimationFrame(()=>Br(V.current,B.current[n]))},[Z,D,z]);Y.useEffect(()=>{D?.(Z[z.getSnapshot()])},[Z,D,z]);let Me=Y.useCallback(e=>{if(!e.defaultPrevented){if(e.stopPropagation(),e.key===`ArrowLeft`||e.key===`ArrowRight`){let t=Z[z.getSnapshot()];if(t&&O?.(e,t))return}if(E?.(e,Z[z.getSnapshot()]),!e.defaultPrevented){if(e.key===`ArrowDown`){e.preventDefault(),je(1);return}if(e.key===`ArrowUp`){e.preventDefault(),je(-1);return}if(e.key===`Enter`){e.preventDefault();let t=Z[z.getSnapshot()];t&&!h&&o(t);return}e.key===`Escape`&&(e.preventDefault(),S?.())}}},[h,Z,je,E,S,o,O,z]),Ne=H(`typography-micro font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-2 px-2 py-1.5`,b&&`sticky top-0 z-10 [background:linear-gradient(var(--surface-elevated),var(--surface-elevated)),linear-gradient(var(--surface-background),var(--surface-background))]`,v),Pe=0,Fe=(e,t,n,i,a)=>{let l=yr(e.providerID,e.model,r?.(e.providerID,e.modelID)),u=ye.get(e.providerID)?.name||e.providerID,d=Ar(l?.limit?.context),f=m?.(e)??0,p=c?.providerID===e.providerID&&c.modelID===e.modelID,g=C?.(e)??!1,_=e=>{let t={x:e.clientX,y:e.clientY},n=te.current,r=!n||n.x!==t.x||n.y!==t.y;te.current=t,!(ee.current&&!n)&&(ee.current&&!r||(ee.current&&r&&(ee.current=!1),Ae(i)))};return(0,X.jsx)(Fr,{store:z,index:i,renderVersion:I,children:t=>{let r=(0,X.jsxs)(`div`,{ref:e=>{B.current[i]=e},role:`option`,"aria-selected":p,"aria-disabled":h||void 0,tabIndex:-1,onClick:()=>{h||o(e)},onKeyDown:t=>{h||(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),o(e))},onMouseEnter:_,onMouseMove:_,className:H(`w-full text-left px-2 py-1.5 rounded-md typography-meta flex items-center gap-2 cursor-pointer`,!h&&(t?`bg-interactive-selection`:`hover:bg-interactive-hover/50`),h&&`cursor-not-allowed opacity-60`,y),children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-1 min-w-0`,children:[a?(0,X.jsx)(`button`,{type:`button`,ref:a.setActivatorNodeRef,...a.attributes,...a.listeners,disabled:h,onClick:e=>{e.preventDefault(),e.stopPropagation()},className:`model-favorite-drag-handle flex size-4 flex-shrink-0 items-center justify-center text-muted-foreground hover:text-foreground disabled:pointer-events-none`,"aria-label":A,title:j,children:(0,X.jsx)(U,{name:`draggable`,className:`size-3.5`})}):null,n?(0,X.jsx)(Xn,{modelId:e.modelID,providerId:e.providerID,className:`h-3.5 w-3.5 flex-shrink-0`}):null,(0,X.jsx)(`span`,{className:`font-medium truncate`,children:kr(e.model)}),d?(0,X.jsx)(`span`,{className:`typography-micro text-muted-foreground flex-shrink-0`,children:d}):null]}),f>0?(0,X.jsxs)(`span`,{className:`typography-micro text-muted-foreground flex-shrink-0`,children:[`x`,f]}):null,T?.(e,{isHighlighted:t,isSelected:p}),p?(0,X.jsx)(U,{name:`check`,className:`h-4 w-4 text-primary flex-shrink-0`}):null,w?(0,X.jsx)(`button`,{type:`button`,disabled:h,onClick:t=>{t.preventDefault(),t.stopPropagation(),w(e)},className:H(`model-favorite-button flex h-4 w-4 items-center justify-center hover:text-primary/80 flex-shrink-0 disabled:pointer-events-none`,g?`text-primary`:`text-muted-foreground`),"aria-label":g?s.unfavorite:s.favorite,title:g?s.unfavorite:s.favorite,children:(0,X.jsx)(U,{name:g?`star-fill`:`star`,className:`h-3.5 w-3.5`})}):null]});return(0,X.jsx)(Nr,{metadata:l,providerName:u,active:L&&t,labels:s,children:r})}},`${t}-${e.providerID}-${e.modelID}`)},Ie=e=>{if(!k)return;let{active:t,over:n}=e;if(!n||t.id===n.id)return;let r=ke.get(String(t.id)),i=ke.get(String(n.id));!r||!i||k(r,i)},Le=e=>{if(!N)return;let{active:t,over:n}=e;if(!n||t.id===n.id)return;let r=we.map(e=>e.id),i=r.indexOf(String(t.id)),a=r.indexOf(String(n.id));i!==-1&&a!==-1&&N(he(r,i,a))},Re=e=>q.has(e),ze=e=>{if(!K){W(e);return}ae(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Be=(e,t,n,r)=>{let i=Re(e),a=t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),ze(e))};return r?(0,X.jsxs)(`div`,{ref:r.setActivatorNodeRef,...r.attributes,...r.listeners,role:`button`,tabIndex:0,"aria-expanded":!i,title:P,className:H(Ne,`w-full text-left cursor-grab select-none active:cursor-grabbing`),onClick:()=>ze(e),onKeyDown:a,children:[(0,X.jsx)(U,{name:`draggable`,className:`size-3.5 flex-shrink-0 text-muted-foreground/70`}),t,(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:n}),(0,X.jsx)(`span`,{className:`ml-auto flex size-4 flex-shrink-0 items-center justify-center text-muted-foreground`,children:(0,X.jsx)(U,{name:i?`arrow-right-s`:`arrow-down-s`,className:`size-4`})})]}):(0,X.jsxs)(`button`,{type:`button`,className:H(Ne,`w-full text-left cursor-pointer`),onClick:()=>ze(e),"aria-expanded":!i,children:[t,(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:n}),(0,X.jsx)(`span`,{className:`ml-auto flex size-4 flex-shrink-0 items-center justify-center text-muted-foreground`,children:(0,X.jsx)(U,{name:i?`arrow-right-s`:`arrow-down-s`,className:`size-4`})})]})},Ve=(e,t,n)=>(0,X.jsxs)(X.Fragment,{children:[t>0?(0,X.jsx)(`div`,{className:`h-px bg-border/40 my-1`}):null,Be(`provider:${e.id}`,(0,X.jsx)(_r,{providerId:e.id,className:`h-4 w-4 flex-shrink-0`}),e.name||e.id,n),Re(`provider:${e.id}`)?null:e.models.map(t=>Fe({model:t,providerID:e.id,modelID:t.id},`provider`,!0,Pe++))]});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{className:`p-1.5 pb-1`,children:(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(U,{name:`search`,className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground`}),(0,X.jsx)(re,{type:`text`,placeholder:s.searchPlaceholder,value:i,onChange:e=>a(e.target.value),onKeyDown:Me,className:`h-8 pl-8 typography-meta`,autoFocus:x})]})}),(0,X.jsx)(Yn,{ref:V,outerClassName:g,className:`overlay-scrollbar-target--no-gutter`,style:_,children:(0,X.jsxs)(`div`,{className:`px-1`,children:[f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 typography-meta text-muted-foreground hover:bg-interactive-hover/50`,onClick:p,children:[(0,X.jsx)(U,{name:`close`,className:`h-3.5 w-3.5`}),(0,X.jsx)(`span`,{children:s.notSelected}),c?null:(0,X.jsx)(U,{name:`check`,className:`h-4 w-4 text-primary ml-auto`})]}),(0,X.jsx)(`div`,{className:`h-px bg-border/40 my-1`})]}):null,Ee?null:(0,X.jsx)(`div`,{className:`px-2 py-4 text-center typography-meta text-muted-foreground`,children:s.noResults}),Se.length>0?(0,X.jsxs)(`div`,{children:[Be(`favorites`,(0,X.jsx)(U,{name:`star-fill`,className:`h-4 w-4 text-primary`}),s.favorites),!Re(`favorites`)&&(De?(0,X.jsx)(fe,{sensors:oe,collisionDetection:le,onDragEnd:Ie,children:(0,X.jsx)(ve,{items:Se.map(e=>`${e.providerID}:${e.modelID}`),strategy:_e,children:Se.map(e=>{let t=Pe++;return(0,X.jsx)(Lr,{id:`${e.providerID}:${e.modelID}`,disabled:h,children:n=>Fe(e,`fav`,!0,t,n)},`fav-sortable-${e.providerID}-${e.modelID}`)})})}):Se.map(e=>Fe(e,`fav`,!0,Pe++)))]}):null,Ce.length>0?(0,X.jsxs)(`div`,{children:[Se.length>0?(0,X.jsx)(`div`,{className:`h-px bg-border/40 my-1`}):null,Be(`recent`,(0,X.jsx)(U,{name:`time`,className:`h-4 w-4`}),s.recent),Re(`recent`)?null:Ce.map(e=>Fe(e,`recent`,!0,Pe++))]}):null,(Se.length>0||Ce.length>0)&&Te.length>0?(0,X.jsx)(`div`,{className:`h-px bg-border/40 my-1`}):null,Oe?(0,X.jsx)(fe,{sensors:se,collisionDetection:le,onDragEnd:Le,children:(0,X.jsx)(ve,{items:Te.map(e=>e.id),strategy:_e,children:Te.map((e,t)=>(0,X.jsx)(Rr,{id:e.id,disabled:h,children:n=>Ve(e,t,n)},e.id))})}):Te.map((e,t)=>(0,X.jsx)(`div`,{children:Ve(e,t)},e.id))]})}),(0,X.jsx)(`div`,{className:`px-3 pt-1 pb-1.5 border-t border-border/40 typography-micro text-muted-foreground`,children:(0,X.jsx)(Ir,{store:z,flatModelList:Z,footerContent:F,fallback:s.keyboardHint})})]})};function Hr(){}function Ur(e){let{key:t,icon:n,label:r}=e;return(0,X.jsx)(Tr,{iconName:n,label:r},t)}var Wr=Y.createContext(null),Gr=e=>e?e.closest(`[data-slot="dialog-content"], [role="dialog"]`):null,Kr=()=>{let e={reason:`none`,event:new Event(`change`),cancel:()=>{e.isCanceled=!0},allowPropagation:()=>{e.isPropagationAllowed=!0},isCanceled:!1,isPropagationAllowed:!1,trigger:void 0};return e};function qr({onValueChange:e,open:t,defaultOpen:n=!1,onOpenChange:r,modal:i=!1,...a}){let[o,s]=Y.useState(null),[c,l]=Y.useState(n),[u,d]=Y.useState(null),f=t??c,p=Y.useRef(f);p.current=f;let m=k((e,n)=>{r?.(e,n),!n.isCanceled&&(p.current=e,t===void 0&&l(e))}),h=k(e=>{e!==p.current&&m(e,Kr())}),g=Y.useMemo(()=>({portalContainer:o,setPortalContainer:s,open:f,setOpen:h,triggerAriaLabel:u,setTriggerAriaLabel:d}),[f,o,h,u]),_=Y.useCallback((t,n)=>{typeof t==`string`&&e?.(t,n)},[e]);return(0,X.jsx)(Wr.Provider,{value:g,children:(0,X.jsx)(C,{...a,open:f,modal:i,onOpenChange:m,onValueChange:_})})}function Jr(e){let t=(0,J.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,X.jsx)(_,{"data-slot":`select-group`,...n}),t[2]=n,t[3]=r),r}function Yr(e){let t=(0,J.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({placeholder:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]!==n||t[5]!==r?(a=e=>{let t=typeof e==`string`||e===void 0?e:e===null?void 0:String(e);return typeof n==`function`?n(t):n??(t===void 0||t===``?r:t)},t[4]=n,t[5]=r,t[6]=a):a=t[6];let o;return t[7]!==i||t[8]!==a?(o=(0,X.jsx)(d,{"data-slot":`select-value`,...i,children:a}),t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function Xr(e){let t=(0,J.c)(40),n,r,i,a,o,s,l;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7]):({className:i,size:l,children:r,asChild:n,onPointerDownCapture:o,onFocusCapture:a,...s}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l);let u=l===void 0?`default`:l,d=Y.useContext(Wr),f=typeof s[`aria-label`]==`string`?s[`aria-label`]:null,p;t[8]!==d||t[9]!==f?(p=()=>{d?.setTriggerAriaLabel(f)},t[8]=d,t[9]=f,t[10]=p):p=t[10];let m=d?.setTriggerAriaLabel,h;t[11]!==m||t[12]!==f?(h=[m,f],t[11]=m,t[12]=f,t[13]=h):h=t[13],Y.useEffect(p,h);let g;t[14]===d?g=t[15]:(g=e=>{if(!d)return;let t=e instanceof HTMLElement?e:null;d.setPortalContainer(Gr(t))},t[14]=d,t[15]=g);let _=g,v;t[16]!==n||t[17]!==r?(v=n&&Y.isValidElement(r)?{render:r}:null,t[16]=n,t[17]=r,t[18]=v):v=t[18];let y=v,b;t[19]===i?b=t[20]:(b=H(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-2 py-2 typography-ui-label whitespace-nowrap shadow-none outline-none focus-visible:outline-none hover:bg-interactive-hover data-[popup-open]:bg-interactive-active focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-6 data-[size=sm]:h-6 data-[size=lg]:h-8 data-[size=lg]:py-1.5 data-[size=chip]:h-7 data-[size=chip]:py-1 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,i),t[19]=i,t[20]=b);let x;t[21]!==o||t[22]!==_?(x=e=>{_(e.currentTarget),o?.(e)},t[21]=o,t[22]=_,t[23]=x):x=t[23];let S;t[24]!==a||t[25]!==_?(S=e=>{_(e.currentTarget),a?.(e)},t[24]=a,t[25]=_,t[26]=S):S=t[26];let C;t[27]===y?C=t[28]:(C=y??{},t[27]=y,t[28]=C);let T;t[29]!==y||t[30]!==r?(T=y?void 0:(0,X.jsxs)(X.Fragment,{children:[r,(0,X.jsx)(w,{children:(0,X.jsx)(U,{name:`arrow-down-s`,className:`size-4 opacity-50`})})]}),t[29]=y,t[30]=r,t[31]=T):T=t[31];let E;return t[32]!==s||t[33]!==u||t[34]!==C||t[35]!==T||t[36]!==b||t[37]!==x||t[38]!==S?(E=(0,X.jsx)(c,{"data-slot":`select-trigger`,"data-size":u,className:b,onPointerDownCapture:x,onFocusCapture:S,...s,...C,children:T}),t[32]=s,t[33]=u,t[34]=C,t[35]=T,t[36]=b,t[37]=x,t[38]=S,t[39]=E):E=t[39],E}function Zr(e){let t=(0,J.c)(67),n,i,a,o,s,c,l,u,d,f,p;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11]):({className:a,children:i,position:l,fitContent:u,portalToBody:d,sideOffset:c,side:s,align:n,collisionPadding:f,collisionAvoidance:p,...o}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p);let h=l===void 0?`popper`:l,g=u!==void 0&&u,_=d!==void 0&&d,v=f===void 0?8:f,y;t[12]===p?y=t[13]:(y=p===void 0?{side:`shift`,align:`shift`}:p,t[12]=p,t[13]=y);let b=y,x=Y.useContext(Wr),{t:C}=A(),w=r(Qr),{isMobile:E}=oe(),D=Y.useId(),O=h===`item-aligned`,j=x?.portalContainer??null,M=x?.open??!1,N;t[14]===x?N=t[15]:(N=e=>{x?.setOpen(e)},t[14]=x,t[15]=N);let P=k(N);if(w||E){let e=`mobile-select-sheet-${D}`,n;t[16]!==x?.triggerAriaLabel||t[17]!==C?(n=x?.triggerAriaLabel??C(`mobile.select.sheetAria`),t[16]=x?.triggerAriaLabel,t[17]=C,t[18]=n):n=t[18];let r;t[19]===C?r=t[20]:(r=C(`mobile.surface.closeAria`),t[19]=C,t[20]=r);let s;t[21]===C?s=t[22]:(s=C(`mobile.sessions.sheet.resizeAria`),t[21]=C,t[22]=s);let c;t[23]===a?c=t[24]:(c=H(a,`relative !max-h-none !w-full !min-w-0 !max-w-none bg-transparent text-foreground shadow-none outline-none`),t[23]=a,t[24]=c);let l;t[25]===i?l=t[26]:(l=(0,X.jsx)(Yn,{fillContainer:!1,outerClassName:`max-h-[calc(72dvh-5rem)]`,className:`flex max-h-[calc(72dvh-5rem)] w-full flex-col gap-1 py-1`,disableHorizontal:!0,preventOverscroll:!0,children:i}),t[25]=i,t[26]=l);let u;t[27]!==o||t[28]!==c||t[29]!==l?(u=(0,X.jsx)(T,{alignItemWithTrigger:!1,className:`!static !inset-auto !w-full !transform-none pointer-events-auto`,children:(0,X.jsx)(S,{...o,"data-slot":`select-content`,className:c,children:l})}),t[27]=o,t[28]=c,t[29]=l,t[30]=u):u=t[30];let d;return t[31]!==P||t[32]!==M||t[33]!==r||t[34]!==s||t[35]!==u||t[36]!==e||t[37]!==n?(d=(0,X.jsx)(Wn,{id:e,open:M,onOpenChange:P,fitContent:!0,ariaLabel:n,closeAriaLabel:r,resizeAriaLabel:s,bodyClassName:`px-2`,children:u}),t[31]=P,t[32]=M,t[33]=r,t[34]=s,t[35]=u,t[36]=e,t[37]=n,t[38]=d):d=t[38],d}let F=_?void 0:j||void 0,I;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(I={backgroundColor:`var(--surface-elevated)`,color:`var(--surface-elevated-foreground)`},t[39]=I):I=t[39];let L=!O&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,R=g&&`w-max min-w-0`,z;t[40]!==a||t[41]!==L||t[42]!==R?(z=H(`pointer-events-auto 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 relative z-[120] max-h-[var(--available-height)] min-w-[8rem] origin-[var(--transform-origin)] overflow-x-hidden rounded-xl 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)]`,L,R,a),t[40]=a,t[41]=L,t[42]=R,t[43]=z):z=t[43];let B=g?`w-max`:`w-full`,V;t[44]===B?V=t[45]:(V=H(`max-h-[var(--available-height)]`,B),t[44]=B,t[45]=V);let ee=!O&&(g?`w-max min-w-0 scroll-my-1`:`w-full min-w-[var(--anchor-width)] scroll-my-1`),U;t[46]===ee?U=t[47]:(U=H(`p-1`,ee),t[46]=ee,t[47]=U);let te;t[48]!==i||t[49]!==V||t[50]!==U?(te=(0,X.jsx)(Yn,{outerClassName:V,className:U,preventOverscroll:!0,children:i}),t[48]=i,t[49]=V,t[50]=U,t[51]=te):te=t[51];let ne;t[52]!==o||t[53]!==z||t[54]!==te?(ne=(0,X.jsx)(S,{"data-slot":`select-content`,style:I,className:z,...o,children:te}),t[52]=o,t[53]=z,t[54]=te,t[55]=ne):ne=t[55];let W;t[56]!==n||t[57]!==O||t[58]!==b||t[59]!==v||t[60]!==s||t[61]!==c||t[62]!==ne?(W=(0,X.jsx)(T,{alignItemWithTrigger:O,sideOffset:c,side:s,align:n,collisionPadding:v,collisionAvoidance:b,className:`absolute z-[120] pointer-events-auto`,children:ne}),t[56]=n,t[57]=O,t[58]=b,t[59]=v,t[60]=s,t[61]=c,t[62]=ne,t[63]=W):W=t[63];let G;return t[64]!==W||t[65]!==F?(G=(0,X.jsx)(m,{container:F,children:W}),t[64]=W,t[65]=F,t[66]=G):G=t[66],G}function Qr(e){return e.isMobile}function $r(e){let t=(0,J.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=H(`text-muted-foreground px-2 py-1.5 typography-meta`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(y,{"data-slot":`select-label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ei(e){let t=(0,J.c)(13),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=H(`data-[highlighted]:bg-interactive-hover hover:bg-interactive-hover data-[selected]:bg-interactive-selection data-[selected]:text-interactive-selection-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 typography-ui-label outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,r),t[4]=r,t[5]=a);let o;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,X.jsx)(h,{children:(0,X.jsx)(U,{name:`check`,className:`size-4`})})}),t[6]=o):o=t[6];let s;t[7]===n?s=t[8]:(s=(0,X.jsx)(g,{children:n}),t[7]=n,t[8]=s);let c;return t[9]!==i||t[10]!==a||t[11]!==s?(c=(0,X.jsxs)(p,{"data-slot":`select-item`,className:a,...i,children:[o,s]}),t[9]=i,t[10]=a,t[11]=s,t[12]=c):c=t[12],c}function ti(e){let t=(0,J.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=H(`bg-border pointer-events-none -mx-1 my-1 h-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(l,{"data-slot":`select-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ni=e=>{if(!e)return``;let t=e.replace(/\\/g,`/`);return t===`/`?`/`:t.replace(/\/+$/,``)};async function ri(e){let t=ni(e),n=await G(t);return{isDirty:!n.isClean,ahead:n.ahead,behind:n.behind,upstream:n.tracking}}var ii=6e4,ai=500,oi=1048576,Q=new Map,si=new Map,ci=0,li=(e,t)=>e.length+t.length,ui=(e,t)=>{Q.delete(e),Q.set(e,{root:t,resolvedAt:Date.now()});let n=0;for(let[e,t]of Q)n+=li(e,t.root);for(;Q.size>ai||n>oi&&Q.size>1;){let e=Q.entries().next().value;if(!e)break;n-=li(e[0],e[1].root),Q.delete(e[0])}};function di(e){if(ci+=1,typeof e==`string`&&e){let t=ni(e);Q.delete(t),si.delete(t);return}Q.clear(),si.clear()}var fi=async e=>ne(e).catch(()=>e),pi=async e=>{let t=Q.get(e);if(t&&Date.now()-t.resolvedAt<ii)return Q.delete(e),Q.set(e,t),t.root;t&&Q.delete(e);let n=si.get(e);if(n)return n;let r=ci,i=fi(e).then(t=>(ci===r&&ui(e,t),t)).catch(()=>e).finally(()=>{si.get(e)===i&&si.delete(e)});return si.set(e,i),i};async function mi(e,t){let n=ni(e);if(!n)return`HEAD`;try{let e=await pi(n).catch(()=>n),r=t?.knownBranch?.trim();if(r&&e===n)return r;let i=await G(e);return(typeof i.current==`string`?i.current.trim():``)||`HEAD`}catch{return`HEAD`}}var hi=e=>{let t=(e.branch||``).trim(),n=(e.head||``).trim();return t?`branch`:n?`detached`:`unborn`},gi=(e,t)=>({worktreeRoot:t,worktreeStatus:`ready`,headState:hi(e),worktreeSource:`existing`}),$=e=>{let t=e.replace(/\\/g,`/`);return t===`/`?`/`:t.length>1?t.replace(/\/+$/,``):t},_i=e=>e.trim().replace(/^refs\/heads\//,``).replace(/^heads\//,``).replace(/\s+/g,`-`).replace(/^\/+|\/+$/g,``).split(`/`).join(`-`).replace(/[^A-Za-z0-9._-]+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``).slice(0,80),vi=e=>e.trim().replace(/^refs\/heads\//,``).replace(/^heads\//,``).replace(/\s+/g,`-`).replace(/^\/+|\/+$/g,``),yi=(e,t)=>{let n=$(e);n&&B.setState(e=>{let r=!1,i=e=>$(e.path)!==n||e.worktreeStatus===t?e:(r=!0,{...e,worktreeStatus:t}),a=e.availableWorktrees,o=!1,s=e.availableWorktrees.map(e=>{let t=i(e);return t!==e&&(o=!0),t});o&&(a=s);let c=e.availableWorktreesByProject;for(let[t,n]of e.availableWorktreesByProject){let r=!1,a=n.map(e=>{let t=i(e);return t!==e&&(r=!0),t});r&&(c===e.availableWorktreesByProject&&(c=new Map(e.availableWorktreesByProject)),c.set(t,a))}let l=e.worktreeMetadata;for(let[t,n]of e.worktreeMetadata){let r=i(n);r!==n&&(l===e.worktreeMetadata&&(l=new Map(e.worktreeMetadata)),l.set(t,r))}return r?{availableWorktrees:a,availableWorktreesByProject:c,worktreeMetadata:l}:{}})},bi=e=>e?.status===`pending`?`pending`:e?.status===`failed`?`invalid`:`ready`,xi=e=>{let t=$(e),n=t.split(`/`).filter(Boolean);return n[n.length-1]??t},Si=e=>{let t=[];for(let n of e.setupCommands){let r=n.trim();r&&t.push(I(r,{rootWorktreePath:e.projectDirectory}))}let n=t.filter(Boolean).join(` && `);return n.trim().length>0?n:void 0},Ci=(e,t)=>{let n=e.mode===`existing`?`existing`:`new`,r=_i(e.worktreeName??e.preferredName??``),i=vi(e.branchName??(n===`new`?e.preferredName:void 0)??``),a=vi(e.existingBranch??e.branchName??``),o=(e.startRef||``).trim(),s=Si({projectDirectory:t,setupCommands:Array.isArray(e.setupCommands)?e.setupCommands:[]});return{mode:n,...r?{worktreeName:r}:{},...i?{branchName:i}:{},...a?{existingBranch:a}:{},...o?{startRef:o}:{},...s?{startCommand:s}:{},...e.setUpstream?{setUpstream:!0}:{},...e.upstreamRemote?{upstreamRemote:e.upstreamRemote}:{},...e.upstreamBranch?{upstreamBranch:e.upstreamBranch}:{},...e.ensureRemoteName?{ensureRemoteName:e.ensureRemoteName}:{},...e.ensureRemoteUrl?{ensureRemoteUrl:e.ensureRemoteUrl}:{},...e.returnAfterDirectoryCreated?{returnAfterDirectoryCreated:!0}:{}}},wi=(e,t)=>{if(e.size!==t.size)return!1;for(let[n,r]of e){let e=t.get(n);if(!e||e.length!==r.length)return!1;for(let t=0;t<r.length;t++){let n=r[t],i=e[t];if(n.path!==i.path||n.branch!==i.branch||n.name!==i.name||n.label!==i.label||n.projectDirectory!==i.projectDirectory||n.worktreeRoot!==i.worktreeRoot||n.headState!==i.headState||n.worktreeSource!==i.worktreeSource||n.source!==i.source)return!1}}return!0},Ti=new Map,Ei=new Map,Di=new Map,Oi=3e4,ki=e=>`${n()}\u0000${$(e)}`,Ai=(e,t=ki(e))=>Di.get(t)??0,ji=e=>{let t=ki(e);Di.set(t,Ai(e)+1),Ti.delete(t)},Mi=async e=>{let t=await pi(e).catch(()=>e),n=$(e);return(await K.worktree.list(e)).filter(e=>typeof e.path==`string`&&e.path.trim().length>0).map(e=>{let n=$(e.path),r=(e.branch||``).replace(/^refs\/heads\//,``).trim(),i=(e.name||``).trim(),a=gi(e,n);return{source:`sdk`,name:i||xi(n),path:n,projectDirectory:t,branch:r,label:r||i||xi(n),worktreeRoot:a.worktreeRoot,worktreeStatus:a.worktreeStatus,headState:a.headState,worktreeSource:a.worktreeSource}}).filter(e=>$(e.path)!==n).sort((e,t)=>{let n=(e.label||e.branch||e.path).toLowerCase(),r=(t.label||t.branch||t.path).toLowerCase();return n.localeCompare(r)})},Ni=async(e,t,r)=>{for(;;){let i=Ai(e,t),a=await Mi(e);if(i===Ai(e,t))return r===n()&&Ti.set(t,{value:a,at:Date.now()}),a}};async function Pi(e){let t=$(e.path),r=n(),i=`${r}\u0000${t}`,a=Ti.get(i);if(a&&Date.now()-a.at<Oi)return a.value;let o=Ei.get(i);if(o)return o;let s=Ni(t,i,r).finally(()=>{Ei.get(i)===s&&Ei.delete(i)});return Ei.set(i,s),s}var Fi=(e,t)=>{let n=F(e.path),r=n?.status===`pending`?`pending`:n?.status===`failed`?`invalid`:t?.worktreeStatus;return r&&r!==e.worktreeStatus?{...e,worktreeStatus:r}:e},Ii=e=>{let t=new Set([...e].map($));if(t.size===0)return;let n=B.getState().worktreeMetadata,r=new Map(n);for(let[e,i]of n)t.has($(i.path))&&r.delete(e);for(let[e,n]of R.getState().attachments){let r=typeof n.worktreeRoot==`string`&&n.worktreeRoot.trim()?$(n.worktreeRoot):``,i=typeof n.cwd==`string`&&n.cwd.trim()?$(n.cwd):``;(r&&t.has(r)||i&&t.has(i))&&R.getState().clearAttachment(e)}r.size!==n.size&&B.setState({worktreeMetadata:r})};async function Li(e,t={}){let n=$(e.path);ji(n);let r=await Pi({...e,path:n});if(t.isCurrent&&!t.isCurrent())return{worktrees:r,addedDirectories:[],removedDirectories:[]};let i=r,a=[],o=[];return B.setState(e=>{let t=e.availableWorktreesByProject,s=t.get(n)??[],c=new Map(s.map(e=>[$(e.path),e])),l=r.map(e=>Fi(e,c.get($(e.path)))),u=new Set(l.map(e=>$(e.path)));if(a=l.filter(e=>!c.has($(e.path))).map(e=>e.path),o=s.filter(e=>!u.has($(e.path))).map(e=>e.path),i=l,s.length===l.length&&s.every((e,t)=>{let n=l[t];return n&&e.path===n.path&&e.branch===n.branch&&e.name===n.name&&e.label===n.label&&e.projectDirectory===n.projectDirectory&&e.worktreeRoot===n.worktreeRoot&&e.headState===n.headState&&e.worktreeSource===n.worktreeSource&&e.source===n.source&&e.worktreeStatus===n.worktreeStatus}))return{};let d=new Map(t);return d.set(n,l),{availableWorktreesByProject:d,availableWorktrees:[...d.values()].flat()}}),Ii(o),{worktrees:i,addedDirectories:a,removedDirectories:o}}async function Ri(e,t){let n=$(e.path),r=await pi(n).catch(()=>n),i=Ci(t,n),a=await K.worktree.create(n,i),o=typeof a?.name==`string`?a.name:``,s=typeof a?.branch==`string`?a.branch:``,c=typeof a?.path==`string`?a.path:``;if(!o||!c)throw Error(`Worktree create missing name/path`);let l={source:`sdk`,name:o,path:$(c),projectDirectory:r,branch:s,label:s||o,worktreeRoot:$(c),worktreeStatus:bi(a?.bootstrapStatus),headState:s?`branch`:`unborn`,worktreeSource:`created-for-session`};a?.bootstrapStatus?N(l.path,a.bootstrapStatus):V(l.path),L(l.path,{onFailed:()=>yi(l.path,`invalid`),onReady:()=>yi(l.path,`ready`)}),ji(n),di();let u=n;return B.setState(e=>{let t=new Map(e.availableWorktreesByProject),n=t.get(u)??[];return t.set(u,[...n.filter(e=>$(e.path)!==l.path),l]),{availableWorktreesByProject:t,availableWorktrees:[...t.values()].flat()}}),l}async function zi(e,t){let n=e.path,r=Ci(t,n);return K.worktree.validate(n,r)}async function Bi(e,t,n){let r=$(e.path),i=!!n?.deleteRemoteBranch,a=n?.deleteLocalBranch===!0,o=n?.remoteName;if(!(await K.worktree.remove(r,{directory:t.path,deleteLocalBranch:a}))?.success)throw Error(`Worktree removal failed`);M(t.path),ji($(e.path)),di();let s=$(t.path),c=r,l=B.getState().availableWorktreesByProject,u=new Map(l),d=u.get(c)??[];u.set(c,d.filter(e=>$(e.path)!==s)),Ii([s]),B.setState({availableWorktreesByProject:u,availableWorktrees:B.getState().availableWorktrees.filter(e=>$(e.path)!==s)});let f=(t.branch||``).replace(/^refs\/heads\//,``).trim();i&&f&&await W(r,{branch:f,remote:o}).catch(()=>void 0)}function Vi(e){let t=(0,J.c)(4),{onResizeStart:n,ariaLabel:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":!0,children:(0,X.jsx)(`path`,{d:`M9.11111 2L2 9.11111M10 6.44444L6.44444 10`,className:`stroke-muted-foreground`,strokeLinecap:`round`})}),t[0]=i):i=t[0];let a;return t[1]!==r||t[2]!==n?(a=(0,X.jsx)(`div`,{role:`separator`,"aria-orientation":`horizontal`,"aria-label":r,onPointerDown:n,className:`pointer-events-auto -m-2 flex size-7 cursor-ns-resize items-end justify-end p-2 touch-none select-none`,children:i}),t[1]=r,t[2]=n,t[3]=a):a=t[3],a}var Hi=Y.forwardRef((e,t)=>{let n=(0,J.c)(64),r,i,a,o,s,c,l,u,d,f,p,m,h,g;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],d=n[9],f=n[10],p=n[11],m=n[12],h=n[13],g=n[14]):({className:r,outerClassName:l,scrollbarClassName:f,fillContainer:m,useScrollShadow:h,scrollShadowSize:d,hasError:s,resizedHeight:i,onResizeHeightChange:c,disabled:a,simple:p,embedded:g,endSlot:o,...u}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u,n[9]=d,n[10]=f,n[11]=p,n[12]=m,n[13]=h,n[14]=g);let _=m!==void 0&&m,v=h!==void 0&&h,y=g!==void 0&&g,{t:b}=A(),x=Y.useRef(null),S=Y.useRef(null),[C,w]=Y.useState(null),T=i??C,E;n[15]===c?E=n[16]:(E=e=>{let t=x.current;if(!t)return;S.current={startY:e.clientY,startHeight:t.getBoundingClientRect().height};let n=e.currentTarget;n.setPointerCapture(e.pointerId);let r=e=>{let t=S.current;if(!t)return;let n=t.startHeight+(e.clientY-t.startY),r=Math.max(82,n);c?c(r):w(r)},i=()=>{S.current=null,n.removeEventListener(`pointermove`,r),n.removeEventListener(`pointerup`,i),n.removeEventListener(`pointercancel`,i)};n.addEventListener(`pointermove`,r),n.addEventListener(`pointerup`,i),n.addEventListener(`pointercancel`,i),e.preventDefault()},n[15]=c,n[16]=E);let D=E,O;n[17]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{if(e.target.closest(`textarea, button, [role="separator"]`))return;let t=x.current?.querySelector(`textarea`);t&&document.activeElement!==t&&(e.preventDefault(),t.focus())},n[17]=O):O=n[17];let k=O;if(p){let e=t,i=_?`[field-sizing:fixed]`:`field-sizing-content`,o;n[18]!==r||n[19]!==i?(o=H(`block w-full appearance-none resize-none bg-transparent text-foreground typography-markdown outline-none`,`px-3 py-2 md:typography-ui-label`,`placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,i,r),n[18]=r,n[19]=i,n[20]=o):o=n[20];let s;return n[21]!==a||n[22]!==_||n[23]!==l||n[24]!==u||n[25]!==d||n[26]!==f||n[27]!==e||n[28]!==o||n[29]!==v?(s=(0,X.jsx)(Yn,{as:`textarea`,ref:e,disableHorizontal:!0,fillContainer:_,useScrollShadow:v,scrollShadowSize:d,outerClassName:l,scrollbarClassName:f,className:o,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,disabled:a,...u}),n[21]=a,n[22]=_,n[23]=l,n[24]=u,n[25]=d,n[26]=f,n[27]=e,n[28]=o,n[29]=v,n[30]=s):s=n[30],s}let j;n[31]===T?j=n[32]:(j=T===null?void 0:{height:`${T}px`},n[31]=T,n[32]=j);let M;if(n[33]!==y||n[34]!==s||n[35]!==l){let e;n[37]===s?e=n[38]:(e=s&&[`ring-[var(--status-error)]`,`focus-within:ring-2 focus-within:ring-[var(--status-error)]`],n[37]=s,n[38]=e);let t;n[39]===y?t=n[40]:(t=y&&[`rounded-none bg-transparent ring-0`,`hover:[&:not(:focus-within)]:bg-transparent`,`has-[[disabled]]:bg-transparent`],n[39]=y,n[40]=t),M=H(`group/textarea relative flex w-full flex-col rounded-[var(--radius-xl)] bg-[var(--surface-elevated)] pb-2.5`,`ring-1 ring-inset ring-border/60 transition duration-200 ease-out`,`hover:[&:not(:focus-within)]:bg-[var(--surface-subtle)]`,`has-[[disabled]]:pointer-events-none has-[[disabled]]:bg-[var(--surface-subtle)] has-[[disabled]]:ring-transparent`,!s&&[`hover:[&:not(:focus-within)]:ring-transparent`,`focus-within:ring-2 focus-within:ring-[var(--interactive-focus-ring)]`],e,t,l),n[33]=y,n[34]=s,n[35]=l,n[36]=M}else M=n[36];let N;n[41]!==r||n[42]!==a?(N=H(`block w-full flex-1 min-h-0 appearance-none resize-none bg-transparent text-foreground typography-markdown outline-none`,`min-h-[82px] pl-3 pr-2.5 pt-2.5 md:typography-ui-label`,`focus-visible:outline-none disabled:cursor-not-allowed`,!a&&[`placeholder:select-none placeholder:text-muted-foreground placeholder:transition placeholder:duration-200 placeholder:ease-out`,`group-hover/textarea:placeholder:text-foreground/80`,`focus:placeholder:text-foreground/80`],a&&`text-muted-foreground/60 placeholder:text-muted-foreground/60`,r),n[41]=r,n[42]=a,n[43]=N):N=n[43];let P;n[44]!==a||n[45]!==u||n[46]!==t||n[47]!==N?(P=(0,X.jsx)(`textarea`,{ref:t,className:N,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,disabled:a,...u}),n[44]=a,n[45]=u,n[46]=t,n[47]=N,n[48]=P):P=n[48];let F;n[49]===b?F=n[50]:(F=b(`textarea.resizeHandleAria`),n[49]=b,n[50]=F);let I;n[51]!==D||n[52]!==F?(I=(0,X.jsx)(Vi,{onResizeStart:D,ariaLabel:F}),n[51]=D,n[52]=F,n[53]=I):I=n[53];let L;n[54]!==o||n[55]!==I?(L=(0,X.jsxs)(`div`,{className:`flex items-center justify-end gap-1.5 pl-3 pr-2.5`,children:[o,I]}),n[54]=o,n[55]=I,n[56]=L):L=n[56];let R;n[57]!==L||n[58]!==P?(R=(0,X.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col gap-2`,children:[P,L]}),n[57]=L,n[58]=P,n[59]=R):R=n[59];let z;return n[60]!==R||n[61]!==j||n[62]!==M?(z=(0,X.jsx)(`div`,{ref:x,onPointerDown:k,style:j,className:M,children:R}),n[60]=R,n[61]=j,n[62]=M,n[63]=z):z=n[63],z});Hi.displayName=`Textarea`;var Ui=200,Wi=new Map,Gi=[{key:`code`,Icon:`code-box`,label:`Code`},{key:`terminal`,Icon:`terminal-box`,label:`Terminal`},{key:`rocket`,Icon:`rocket`,label:`Rocket`},{key:`flask`,Icon:`flask`,label:`Lab`},{key:`gamepad`,Icon:`gamepad`,label:`Game`},{key:`briefcase`,Icon:`briefcase`,label:`Work`},{key:`home`,Icon:`home`,label:`Home`},{key:`globe`,Icon:`global`,label:`Web`},{key:`leaf`,Icon:`leaf`,label:`Nature`},{key:`shield`,Icon:`shield`,label:`Security`},{key:`palette`,Icon:`palette`,label:`Design`},{key:`server`,Icon:`server`,label:`Server`},{key:`phone`,Icon:`smartphone`,label:`Mobile`},{key:`database`,Icon:`database-2`,label:`Data`},{key:`lightbulb`,Icon:`lightbulb`,label:`Idea`},{key:`music`,Icon:`music`,label:`Music`},{key:`camera`,Icon:`camera`,label:`Media`},{key:`book`,Icon:`book-open`,label:`Docs`},{key:`heart`,Icon:`heart`,label:`Favorite`}],Ki=Object.fromEntries(Gi.map(e=>[e.key,e.Icon])),qi=[{key:`keyword`,label:`Purple`,cssVar:`var(--syntax-keyword)`},{key:`string`,label:`Green`,cssVar:`var(--syntax-string)`},{key:`number`,label:`Pink`,cssVar:`var(--syntax-number)`},{key:`type`,label:`Gold`,cssVar:`var(--syntax-type)`},{key:`constant`,label:`Cyan`,cssVar:`var(--syntax-constant)`},{key:`comment`,label:`Muted`,cssVar:`var(--syntax-comment)`},{key:`error`,label:`Red`,cssVar:`var(--status-error)`},{key:`primary`,label:`Blue`,cssVar:`var(--primary)`},{key:`success`,label:`Green`,cssVar:`var(--status-success)`}],Ji=Object.fromEntries(qi.map(e=>[e.key,e.cssVar])),Yi=(e,t)=>{if(typeof e!=`number`||e<=0)return null;let n=new URLSearchParams({v:String(e)});return typeof t?.iconColor==`string`&&t.iconColor.trim()&&n.set(`iconColor`,t.iconColor.trim()),(t?.themeVariant===`light`||t?.themeVariant===`dark`)&&n.set(`theme`,t.themeVariant),n},Xi=(e,n)=>e?[t()||`same-origin`,e,n.toString()].join(`|`):null,Zi=(e,t,n)=>{let r=Yi(t,n);if(!r)return null;let i=Xi(e,r);return i?{cacheKey:i,projectId:e,query:r}:null},Qi=()=>{for(;Wi.size>Ui;){let e=Wi.keys().next().value;if(typeof e!=`string`)return;let t=Wi.get(e);t?.url&&typeof URL<`u`&&typeof URL.revokeObjectURL==`function`&&URL.revokeObjectURL(t.url),Wi.delete(e)}},$i=e=>{let t=Wi.get(e.cacheKey);if(t?.url)return Promise.resolve(t.url);if(t?.promise)return t.promise;let n=i(`/api/projects/${encodeURIComponent(e.projectId)}/icon`,{method:`GET`,headers:{Accept:`image/*`},query:e.query}).then(async t=>{if(!t.ok||typeof URL>`u`||typeof URL.createObjectURL!=`function`)return null;let n=await t.blob(),r=URL.createObjectURL(n);return Wi.set(e.cacheKey,{url:r}),Qi(),r}).catch(()=>null).finally(()=>{let t=Wi.get(e.cacheKey);t?.promise===n&&!t.url&&Wi.delete(e.cacheKey)});return Wi.set(e.cacheKey,{promise:n}),n},ea=(e,t)=>{let n=(0,J.c)(10),r=e.id,i=e.iconImage?.updatedAt,a=t?.themeVariant,o=t?.iconColor,s;n[0]!==o||n[1]!==r||n[2]!==a||n[3]!==i?(s=Zi(r,i,{themeVariant:a,iconColor:o}),n[0]=o,n[1]=r,n[2]=a,n[3]=i,n[4]=s):s=n[4];let c=s,l;n[5]===c?l=n[6]:(l=()=>c?Wi.get(c.cacheKey)?.url??null:null,n[5]=c,n[6]=l);let[u,d]=Y.useState(l),f,p;return n[7]===c?(f=n[8],p=n[9]):(f=()=>{if(!c){d(null);return}let e=Wi.get(c.cacheKey)?.url;if(e){d(e);return}let t=!1;return d(null),$i(c).then(e=>{t||d(e)}),()=>{t=!0}},p=[c],n[7]=c,n[8]=f,n[9]=p),Y.useEffect(f,p),u},ta=e=>{let t=(0,J.c)(21),{project:n,options:r,className:i,alt:a,draggable:o,fallback:s,onError:c}=e,l=a===void 0?``:a,u=o!==void 0&&o,d=s===void 0?null:s,f=ea(n,r),[p,m]=Y.useState(!1),h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{m(!1)},t[0]=h):h=t[0];let g=n.iconImage?.updatedAt,_;if(t[1]!==n.id||t[2]!==f||t[3]!==g?(_=[f,n.id,g],t[1]=n.id,t[2]=f,t[3]=g,t[4]=_):_=t[4],Y.useEffect(h,_),!f||p){let e;return t[5]===d?e=t[6]:(e=Y.createElement(Y.Fragment,null,d),t[5]=d,t[6]=e),e}let v;if(t[7]!==l||t[8]!==i||t[9]!==u||t[10]!==c||t[11]!==f){let e;t[13]===c?e=t[14]:(e=e=>{m(!0),c?.(e)},t[13]=c,t[14]=e);let n;t[15]!==l||t[16]!==i||t[17]!==u||t[18]!==f||t[19]!==e?(n={src:f,alt:l,className:i,draggable:u,onError:e},t[15]=l,t[16]=i,t[17]=u,t[18]=f,t[19]=e,t[20]=n):n=t[20],v=Y.createElement(`img`,n),t[7]=l,t[8]=i,t[9]=u,t[10]=c,t[11]=f,t[12]=v}else v=t[12];return v};export{Se as $,Yn as A,Dn as B,Vr as C,pr as D,_r as E,En as F,fn as G,_n as H,Cn as I,Xt as J,pn as K,Tn as L,Wn as M,Un as N,Qn as O,Vn as P,Ce as Q,On as R,Yr as S,yr as T,dn as U,hn as V,un as W,Vt as X,sn as Y,kt as Z,Jr as _,ta as a,ti as b,Li as c,zi as d,ye as et,wi as f,Zr as g,qr as h,Ki as i,Kn as j,Xn as k,Pi as l,ri as m,Ji as n,Hi as o,mi as p,cn as q,Gi as r,Ri as s,qi as t,Bi as u,ei as v,xr as w,Xr as x,$r as y,wn as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{E as t,t as n}from"./useUIStore-CqqO11ZI.js";import{Xt as r,d as i,kn as a,u as o,xn as s}from"./persistence-CSZp1CNB.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-Bu0lpyX1.js";import{$a as oe,Ja as se,Ka as ce,po as le,ta as N}from"./useMobileNavigationStore-DxH1DjU-.js";import{s as P,t as F}from"./utils-B0mQXN9L.js";import{t as ue}from"./AgentAvatar-Dp_hbVcD.js";import{n as I}from"./Icon-4My8YZwt.js";import{t as L}from"./button-Or0daT9o.js";import{A as de,C as R,E as z,M as fe,O as pe,T as B,U as me,W as he,k as ge,w as _e}from"./projectMeta-CEGa4Czs.js";import{t as ve}from"./input-BUsGnzwe.js";import{t as ye}from"./useThemeSystem-DMzWVJaW.js";import{i as be}from"./OverlayScrollbar-BZB21Yp_.js";import{t as xe}from"./vendor-codemirror-language-data-BfYFhIH1.js";var V=e(y(),1),H=v(),Se=[.2,.45,.15,.55,.35,.1,.5,.25,.4,.3,.45,.15,.55,.2,.35,.1],Ce=[.3,.15,.45,.25,.5,.35,.1,.4,.2,.55,.3,.15,.45,.25,.4,.2],we=(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},Te=({className:e=``,width:t=70,height:n=70,isAnimated:r=!1})=>{let{t:i}=re(),a=ye(),o=!0;a?o=a.currentTheme.metadata.variant!==`light`:typeof window<`u`&&(o=window.matchMedia(`(prefers-color-scheme: dark)`).matches);let s=(0,V.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,V.useMemo)(()=>typeof window>`u`||typeof CSS>`u`||typeof CSS.supports!=`function`?!1:CSS.supports(`color`,`color-mix(in srgb, white 50%, transparent)`),[]),l=(0,V.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,V.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=we(h,_,b,v),C=we(_,g,y,b);return(0,H.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,H.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,H.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,H.jsx)(`path`,{d:e.path,fill:u,opacity:Se[e.row*4+(3-e.col)]??.35},`left-${t}`)),(0,H.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,H.jsx)(`path`,{d:e.path,fill:u,opacity:Ce[e.row*4+e.col]??.35},`right-${t}`)),(0,H.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,H.jsx)(`g`,{opacity:1,className:r?`oc-logo-glow`:void 0,style:r?{"--oc-glow-color":s}:void 0,children:(0,H.jsxs)(`g`,{transform:`${x} scale(0.75)`,children:[(0,H.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,H.jsx)(`path`,{d:`M-8 -4 L8 -4 L8 12 L-8 12 Z`,fill:d,fillOpacity:`0.4`})]})})]})},U=b();function W(e){let t=(0,U.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,H.jsx)(`div`,{"data-slot":`card`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ee(e){let t=(0,U.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,H.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function G(e){let t=(0,U.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,H.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function De(e){let t=(0,U.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,H.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Oe=class extends V.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,H.jsx)(`div`,{className:`p-4 flex items-center justify-center min-h-screen`,children:(0,H.jsxs)(W,{className:`w-full max-w-md`,children:[(0,H.jsx)(Ee,{className:`text-center`,children:(0,H.jsxs)(G,{className:`flex items-center justify-center gap-2 text-destructive`,children:[(0,H.jsx)(I,{name:`error-warning`,className:`h-5 w-5`}),e.title]})}),(0,H.jsxs)(De,{className:`space-y-4`,children:[(0,H.jsx)(`p`,{className:`text-sm text-muted-foreground text-center`,children:e.description}),this.state.error&&(0,H.jsxs)(`details`,{className:`text-xs font-mono bg-muted p-3 rounded`,children:[(0,H.jsx)(`summary`,{className:`cursor-pointer hover:bg-interactive-hover/80`,children:e.detailsSummary}),(0,H.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,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsxs)(L,{onClick:this.handleReset,variant:`outline`,className:`flex-1`,children:[(0,H.jsx)(I,{name:`restart`,className:`h-4 w-4 mr-2`}),e.tryAgain]}),(0,H.jsx)(L,{onClick:this.handleCopy,variant:`outline`,className:`flex-1`,children:this.state.copied?e.copied:e.copy})]})]})]})}):this.props.children}},ke=e=>{let t=(0,U.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,H.jsx)(Oe,{fallback:r,strings:m,children:n}),t[25]=n,t[26]=r,t[27]=m,t[28]=h):h=t[28],h},K=`__unassigned__`,Ae={mod:`mod`,shift:`shift`,alt:`alt`,option:`alt`,ctrl:`ctrl`,meta:`mod`,cmd:`mod`,command:`mod`},je={mod:P()&&r()?`⌘`:`Ctrl`,shift:`⇧`,alt:`⌥`,option:`⌥`,ctrl:`⌃`},Me={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:`-`,"-":`-`},q=[`mod`,`ctrl`,`shift`,`alt`],Ne={"{":`[`,"}":`]`,":":`;`,'"':`'`,"<":`,`,">":`.`,"?":`/`,"|":`\\`,"~":"`","!":`1`,"@":`2`,"#":`3`,$:`4`,"%":`5`,"^":`6`,"&":`7`,"*":`8`,"(":`9`,")":`0`};function J(e){return e.trim().toLowerCase()===K}function Pe(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`:Ne[t]??t}var Fe=[{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 Y(e){if(J(e))return K;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=Ae[t];if(i){n.add(i);continue}r=t}return[...q.filter(e=>n.has(e)),r].filter(Boolean).join(`+`)}function X(e){return J(e)?!0:Z(e).key.trim().length>0}function Z(e){if(J(e))return{modifiers:new Set,key:K};let t=Y(e).split(`+`),n=new Set,r=``;for(let e of t){let t=Ae[e];t?n.add(t):r=e}return{modifiers:n,key:r}}function Ie(e){if(J(e))return`Unassigned`;let t=Z(e);if(!t.key&&t.modifiers.size===0)return`Unassigned`;let n=[];for(let e of q)t.modifiers.has(e)&&n.push(je[e]);if(t.key){let e=Me[t.key.toLowerCase()]||t.key.toUpperCase();n.push(e)}return n.join(` + `)}function Le(e){return Fe.find(t=>t.id===e)}function Re(){return Fe.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=Y(r);if(e===`__unassigned__`)return K;if(X(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(J(e))return!1;let t=Z(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(J(n))return!1;let i=Z(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))),Pe(f)===Pe(i.key)}function Q(){return P()&&r()?`⌘`:`Ctrl`}function Ue(e,t,n){if(He(e,n))return!0;let i=Y(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=V.createContext(null),Ye=e=>e?e.closest(`[data-slot="dialog-content"], [role="dialog"]`):null;function Xe(e,t){return e&&V.isValidElement(t)?{render:t}:{children:t}}function Ze(e){let t=(0,U.c)(9),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let[r,i]=V.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,H.jsx)(_,{...n}),t[4]=n,t[5]=s);let c;return t[6]!==o||t[7]!==s?(c=(0,H.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,U.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=V.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,H.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,U.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=V.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,H.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,H.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,H.jsx)(h,{container:w,children:k}),t[37]=k,t[38]=w,t[39]=A):A=t[39],A}function $(e){let t=(0,U.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,H.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,U.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,H.jsx)(p,{"data-slot":`dropdown-menu-radio-group`,...n}),t[2]=n,t[3]=r),r}function tt(e){let t=(0,U.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,H.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-3.5 items-center justify-center text-primary`,children:(0,H.jsx)(c,{children:(0,H.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,H.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,U.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,H.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,U.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,H.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,U.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,U.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}=be(),D=T||E,[O,k]=V.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=V.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]),V.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,H.jsx)(fe,{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,H.jsxs)(de,{useScrollShadow:!0,disableHorizontal:!0,preventOverscroll:!0,outerClassName:`min-h-0 flex-1`,className:`flex flex-col gap-1 overscroll-contain`,children:[(0,H.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,H.jsx)(ue,{name:`default`,size:16}),(0,H.jsx)(`span`,{className:F(`min-w-0 typography-meta`,r?`text-muted-foreground`:`font-medium`),children:f(`settings.commands.agentSelector.notSelected`)}),!r&&(0,H.jsx)(`div`,{className:`h-2 w-2 rounded-full bg-primary`})]}),w.map(e=>{let t=e.name===r;return(0,H.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,H.jsx)(ue,{name:e.name,size:16,className:`mt-1.5`}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`span`,{className:`typography-meta font-medium`,children:e.name}),e.description&&(0,H.jsx)(`span`,{className:`mt-0.5 block whitespace-normal break-words typography-micro text-muted-foreground`,children:e.description})]}),t&&(0,H.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,pe;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?(pe=D?(0,H.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,H.jsx)(`div`,{className:`flex items-center gap-2`,children:p?(0,H.jsxs)(H.Fragment,{children:[d?(0,H.jsx)(ue,{name:r||`default`,size:14}):null,(0,H.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:r||f(`settings.commands.agentSelector.selectAgentPlaceholder`)})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,H.jsx)(`span`,{className:`typography-meta text-muted-foreground`,children:f(m?`common.unavailable`:`common.loading`)})]})}),(0,H.jsx)(I,{name:`arrow-down-s`,className:`h-3 w-3 text-muted-foreground`})]}):p?(0,H.jsxs)(Ze,{onOpenChange:M,children:[(0,H.jsx)(Qe,{asChild:!0,children:(0,H.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,H.jsx)(ue,{name:r||`default`,size:14}):null,(0,H.jsx)(`span`,{className:`typography-micro font-medium whitespace-nowrap`,children:r||f(`settings.commands.agentSelector.notSelected`)}),(0,H.jsx)(I,{name:`arrow-down-s`,className:`h-3 w-3 flex-shrink-0 text-muted-foreground`})]})}),(0,H.jsxs)($e,{className:`max-w-[300px]`,portalToBody:u,children:[(0,H.jsxs)($,{className:`typography-meta`,onSelect:()=>L(``),children:[(0,H.jsx)(ue,{name:`default`,size:14}),(0,H.jsx)(`span`,{className:`text-muted-foreground`,children:f(`settings.commands.agentSelector.notSelected`)})]}),w.map(e=>(0,H.jsxs)($,{className:`typography-meta`,onSelect:()=>L(e.name),children:[(0,H.jsx)(ue,{name:e.name,size:14}),(0,H.jsx)(`span`,{className:`font-medium`,children:e.name})]},e.name))]})]}):(0,H.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,H.jsx)(I,{name:`loader-4`,className:`h-3 w-3 animate-spin text-muted-foreground flex-shrink-0`}),(0,H.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]=pe):pe=t[35];let B;t[36]===z?B=t[37]:(B=z(),t[36]=z,t[37]=B);let me;return t[38]!==pe||t[39]!==B?(me=(0,H.jsxs)(H.Fragment,{children:[pe,B]}),t[38]=pe,t[39]=B,t[40]=me):me=t[40],me};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,U.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=V.useId(),[E,D]=V.useState(``),O;t[2]===i?O=t[3]:(O=()=>new Set(i?[i]:[]),t[2]=i,t[3]=O);let[k,A]=V.useState(O),[j,M]=V.useState(null),[ee,te]=V.useState(`model`),[ne,ie]=V.useState(null),ae=V.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]),V.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,pe;t[12]===p?pe=t[13]:(pe=p?new Map(Object.entries(p).map(yt)):null,t[12]=p,t[13]=pe);let me=pe,ye;t[14]===S?ye=t[15]:(ye=new Set(S.map(bt)),t[14]=S,t[15]=ye);let be=ye,xe;t[16]===c?xe=t[17]:(xe=new Map(c.map(xt)),t[16]=c,t[17]=xe);let Se=xe,Ce;bb0:{if(!m?.length){Ce=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];Ce=r}let we=Ce,Te;t[25]!==me||t[26]!==R||t[27]!==be?(Te=(e,t)=>R&&!R.has(e)||me&&me.get(e)?.has(t)!==!0?!1:!be.has(`${e}:${t}`),t[25]=me,t[26]=R,t[27]=be,t[28]=Te):Te=t[28];let W=Te,Ee;t[29]!==Se||t[30]!==E?(Ee=e=>{let t=E.trim();if(!t)return!0;let n=Se.get(e.providerID)?.name||e.providerID,r=ce(e.model,e.modelID,{maxLength:40});return _e(r,t)||_e(e.modelID,t)||_e(n,t)},t[29]=Se,t[30]=E,t[31]=Ee):Ee=t[31];let G=Ee,De;if(t[32]!==l||t[33]!==W||t[34]!==G){let e;t[36]!==W||t[37]!==G?(e=e=>W(e.providerID,e.modelID)&&G(e),t[36]=W,t[37]=G,t[38]=e):e=t[38],De=l.filter(e),t[32]=l,t[33]=W,t[34]=G,t[35]=De}else De=t[35];let Oe=De,ke;if(t[39]!==W||t[40]!==G||t[41]!==u){let e;t[43]!==W||t[44]!==G?(e=e=>W(e.providerID,e.modelID)&&G(e),t[43]=W,t[44]=G,t[45]=e):e=t[45],ke=u.filter(e),t[39]=W,t[40]=G,t[41]=u,t[42]=ke}else ke=t[42];let K=ke,Ae;if(t[46]!==R||t[47]!==W||t[48]!==we||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]!==W||t[54]!==E?(n=e=>{let t=E.trim().length>0&&(_e(e.name||e.id,E.trim())||_e(e.id,E.trim()));return{provider:e,models:(e.models??[]).filter(n=>{let r=typeof n.id==`string`?n.id:``;return!r||!W(e.id,r)?!1:t||!E.trim()?!0:_e(ce(n,r,{maxLength:40}),E.trim())||_e(r,E.trim())})}},t[53]=W,t[54]=E,t[55]=n):n=t[55],Ae=we.filter(e).map(n).filter(Ct),t[46]=R,t[47]=W,t[48]=we,t[49]=E,t[50]=Ae}else Ae=t[50];let je=Ae,Me;t[56]===w?Me=t[57]:(Me=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]=Me);let q=Me,Ne;t[58]===w?Ne=t[59]:(Ne=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]=Ne);let J=Ne,Pe;t[60]===P?Pe=t[61]:(Pe=(e,t,n)=>{ie(n===void 0?{providerID:e,modelID:t}:{providerID:e,modelID:t,variant:n}),P(`variant`)},t[60]=P,t[61]=Pe);let Fe=Pe,Y;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Y={onPointerDown:he,onClickCapture:wt},t[62]=Y):Y=t[62];let X=Y,Z;t[63]!==j||t[64]!==q||t[65]!==v||t[66]!==J||t[67]!==g||t[68]!==s||t[69]!==_||t[70]!==Fe||t[71]!==Se||t[72]!==c||t[73]!==o||t[74]!==a||t[75]!==i||t[76]!==w||t[77]!==C?(Z=(e,t)=>{let n=t===void 0?{}:t,{model:r,providerID:l,modelID:u}=e,d=`${l}:${u}`,f=l===i&&u===a,p=B(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=J(p),D=p?.limit?.context?`${gt(p.limit.context)} ctx`:null;return(0,H.jsxs)(`div`,{className:F(`border-b border-border/30 last:border-b-0`,f&&`bg-interactive-selection/15 text-interactive-selection-foreground`),children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5`,children:[(0,H.jsx)(`button`,{type:`button`,...X,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,H.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[n.showProvider?(0,H.jsx)(`span`,{className:`truncate text-[10px] leading-none text-muted-foreground/60`,children:Se.get(l)?.name||l}):null,(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,H.jsx)(ge,{modelId:u,providerId:l,className:`size-3.5 flex-shrink-0`}),(0,H.jsx)(`span`,{className:`truncate typography-meta font-medium text-foreground`,children:ce(r,u,{maxLength:40})}),f?(0,H.jsx)(I,{name:`check`,className:`size-4 flex-shrink-0 text-primary`}):null]}),D||E.length>0?(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 overflow-hidden typography-micro text-muted-foreground`,children:[D?(0,H.jsx)(`span`,{className:`flex-shrink-0 whitespace-nowrap`,children:D}):null,D&&E.length>0?(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px flex-shrink-0 bg-border/50`}):null,(0,H.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,H.jsx)(`span`,{className:`flex size-4 flex-shrink-0 items-center justify-center text-muted-foreground`,title:r,"aria-label":r,children:(0,H.jsx)(I,{name:n,className:`size-3`})},`${d}-${t}`)})})]}):null]})}),m.length>0?(0,H.jsxs)(`button`,{type:`button`,...X,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,H.jsx)(`span`,{className:`whitespace-nowrap`,children:q(x)}),(0,H.jsx)(I,{name:T?`arrow-down-s`:`arrow-right-s`,className:`size-3.5`})]}):null,(0,H.jsx)(`button`,{type:`button`,...X,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,H.jsx)(I,{name:g(l,u)?`star-fill`:`star`,className:`size-4`})})]}),T&&m.length>0?(0,H.jsx)(`div`,{className:`border-t border-border/30 p-2`,children:(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[S.map(e=>{let t=e===x||!e&&!x;return(0,H.jsx)(`button`,{type:`button`,...X,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:q(e)},`${d}-${e??`default`}`)}),S.length<m.length+1?(0,H.jsx)(`button`,{type:`button`,...X,onClick:()=>Fe(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]=q,t[65]=v,t[66]=J,t[67]=g,t[68]=s,t[69]=_,t[70]=Fe,t[71]=Se,t[72]=c,t[73]=o,t[74]=a,t[75]=i,t[76]=w,t[77]=C,t[78]=Z):Z=t[78];let Ie=Z,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]!==Oe||t[82]!==je||t[83]!==K||t[84]!==q||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=Oe.length>0||K.length>0||je.length>0,p=oe===`variant`&&!!e;Re=fe,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,H.jsx)(L,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>P(`model`),"aria-label":w(`onboarding.common.actions.back`),children:(0,H.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,H.jsxs)(`div`,{className:`relative z-10 shrink-0`,"data-mobile-sheet-no-dismiss":``,"data-mobile-sheet-search":``,children:[(0,H.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,H.jsx)(ve,{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,H.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,H.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,H.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:[void 0,...l].map(t=>{let n=t===d||!t&&!d;return(0,H.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`),...X,onClick:()=>s(e.providerID,e.modelID,t),children:[(0,H.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:q(t)}),n?(0,H.jsx)(I,{name:`check`,className:`size-4 flex-shrink-0 text-primary`}):null]},t??`default`)})}):(0,H.jsxs)(H.Fragment,{children:[f?null:(0,H.jsx)(`div`,{className:`px-3 py-8 text-center typography-meta text-muted-foreground`,children:w(`chat.modelControls.noProvidersOrModelsFound`)}),Oe.length>0?(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,H.jsxs)(`div`,{className:`px-2 py-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,H.jsx)(I,{name:`star-fill`,className:`mr-1.5 inline-block size-3 text-primary`}),w(`chat.modelControls.favorites`)]}),(0,H.jsx)(`div`,{className:`flex flex-col border-t border-border/30`,children:Oe.map(e=>Ie(e,{showProvider:!0,preferRememberedVariant:!0}))})]}):null,K.length>0?(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,H.jsxs)(`div`,{className:`px-2 py-1.5 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,H.jsx)(I,{name:`time`,className:`mr-1.5 inline-block size-3`}),w(`chat.modelControls.recent`)]}),(0,H.jsx)(`div`,{className:`flex flex-col border-t border-border/30`,children:K.map(e=>Ie(e,{showProvider:!0,preferRememberedVariant:!0}))})]}):null,je.map(e=>{let{provider:t,models:n}=e,r=k.has(t.id)||E.trim().length>0;return(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border/40 bg-[var(--surface-elevated)]`,children:[(0,H.jsxs)(`button`,{type:`button`,...X,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,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(z,{providerId:t.id,className:`size-3.5`}),(0,H.jsx)(`span`,{className:`typography-meta font-medium text-foreground`,children:t.name||t.id}),t.id===i?(0,H.jsx)(`span`,{className:`typography-micro text-primary/80`,children:w(`chat.modelControls.current`)}):null]}),(0,H.jsx)(I,{name:r?`arrow-down-s`:`arrow-right-s`,className:`size-3 text-muted-foreground`})]}),r?(0,H.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]=Oe,t[82]=je,t[83]=K,t[84]=q,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,H.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,H.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,H.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,H.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){me(e)||(e.preventDefault(),e.stopPropagation())}function Tt(e){e.currentTarget.focus({preventScroll:!0})}var Et=e=>{let t=(0,U.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}=pe(A),{isMobile:ee}=be(),te=w||ee,[ie,ae]=V.useState(!1),[oe,se]=V.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]=V.useState(``),[z,fe]=V.useState(null),B=a!==void 0,me;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(me=()=>{ae(!1),se(!1),de(``),fe(null)},t[5]=me):me=t[5];let he=me,_e;t[6]===S?_e=t[7]:(_e=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]=_e);let ve=_e,ye;t[8]!==O||t[9]!==ve||t[10]!==i||t[11]!==o||t[12]!==r||t[13]!==a||t[14]!==B?(ye=e=>{let t=ve(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,B?c:void 0),O(e.providerID,e.modelID,B&&c||void 0),he()},t[8]=O,t[9]=ve,t[10]=i,t[11]=o,t[12]=r,t[13]=a,t[14]=B,t[15]=ye):ye=t[15];let xe=ye,Se;t[16]!==o||t[17]!==B?(Se=()=>{o(``,``,B?``:void 0),he()},t[16]=o,t[17]=B,t[18]=Se):Se=t[18];let Ce=Se,we;t[19]!==O||t[20]!==o||t[21]!==z?(we=e=>{z&&(o(z.providerID,z.modelID,e),O(z.providerID,z.modelID,e||void 0),he())},t[19]=O,t[20]=o,t[21]=z,t[22]=we):we=t[22];let Te=we,W;t[23]===v?W=t[24]:(W=v(`settings.agents.modelSelector.searchPlaceholder`),t[23]=v,t[24]=W);let Ee;t[25]===v?Ee=t[26]:(Ee=v(`settings.agents.modelSelector.state.noModelsFound`),t[25]=v,t[26]=Ee);let G;t[27]===v?G=t[28]:(G=v(`settings.agents.modelSelector.section.favorites`),t[27]=v,t[28]=G);let De;t[29]===v?De=t[30]:(De=v(`settings.agents.modelSelector.section.recent`),t[29]=v,t[30]=De);let Oe;t[31]===v?Oe=t[32]:(Oe=v(`settings.agents.modelSelector.keyboardHints`),t[31]=v,t[32]=Oe);let ke;t[33]!==u||t[34]!==v?(ke=u||v(`settings.agents.modelSelector.notSelected`),t[33]=u,t[34]=v,t[35]=ke):ke=t[35];let K;t[36]===v?K=t[37]:(K=v(`settings.agents.modelSelector.actions.favorite`),t[36]=v,t[37]=K);let Ae;t[38]===v?Ae=t[39]:(Ae=v(`settings.agents.modelSelector.actions.unfavorite`),t[38]=v,t[39]=Ae);let je;t[40]===v?je=t[41]:(je=v(`chat.modelControls.provider`),t[40]=v,t[41]=je);let Me;t[42]===v?Me=t[43]:(Me=v(`chat.modelControls.capabilities`),t[42]=v,t[43]=Me);let q;t[44]===v?q=t[45]:(q=v(`chat.modelControls.capability.toolCalling`),t[44]=v,t[45]=q);let Ne;t[46]===v?Ne=t[47]:(Ne=v(`chat.modelControls.capability.reasoning`),t[46]=v,t[47]=Ne);let J;t[48]===v?J=t[49]:(J=v(`chat.modelControls.modality.image`),t[48]=v,t[49]=J);let Pe;t[50]===v?Pe=t[51]:(Pe=v(`chat.modelControls.modality.video`),t[50]=v,t[51]=Pe);let Fe;t[52]===v?Fe=t[53]:(Fe=v(`chat.modelControls.modality.audio`),t[52]=v,t[53]=Fe);let Y;t[54]===v?Y=t[55]:(Y=v(`chat.modelControls.costPerMillion`),t[54]=v,t[55]=Y);let X;t[56]===v?X=t[57]:(X=v(`chat.modelControls.costInput`),t[56]=v,t[57]=X);let Z;t[58]===v?Z=t[59]:(Z=v(`chat.modelControls.costOutput`),t[58]=v,t[59]=Z);let Ie;t[60]!==W||t[61]!==Ee||t[62]!==G||t[63]!==De||t[64]!==Oe||t[65]!==ke||t[66]!==K||t[67]!==Ae||t[68]!==je||t[69]!==Me||t[70]!==q||t[71]!==Ne||t[72]!==J||t[73]!==Pe||t[74]!==Fe||t[75]!==Y||t[76]!==X||t[77]!==Z?(Ie={searchPlaceholder:W,noResults:Ee,favorites:G,recent:De,keyboardHint:Oe,notSelected:ke,favorite:K,unfavorite:Ae,provider:je,capabilities:Me,capabilityToolCalling:q,capabilityReasoning:Ne,modalityImage:J,modalityVideo:Pe,modalityAudio:Fe,costPerMillion:Y,costInput:X,costOutput:Z},t[60]=W,t[61]=Ee,t[62]=G,t[63]=De,t[64]=Oe,t[65]=ke,t[66]=K,t[67]=Ae,t[68]=je,t[69]=Me,t[70]=q,t[71]=Ne,t[72]=J,t[73]=Pe,t[74]=Fe,t[75]=Y,t[76]=X,t[77]=Z,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]!==B?(He=B?a||v(`chat.modelControls.default`):null,t[87]=v,t[88]=a,t[89]=B,t[90]=He):He=t[90];let Q=He,Ue;t[91]!==i||t[92]!==r||t[93]!==a||t[94]!==B?(Ue=(e,t)=>{if(!(!B||e!==r||t!==i))return a||void 0},t[91]=i,t[92]=r,t[93]=a,t[94]=B,t[95]=Ue):Ue=t[95];let We=Ue,Ge;t[96]!==O||t[97]!==o||t[98]!==B?(Ge=(e,t,n)=>{o(e,t,B?n??``:void 0),O(e,t,B&&n||void 0),he()},t[96]=O,t[97]=o,t[98]=B,t[99]=Ge):Ge=t[99];let Ke=Ge,qe;t[100]!==ve||t[101]!==v||t[102]!==a||t[103]!==B?(qe=(e,t)=>{let n=ve(e);if(!B||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,H.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(),fe(e)},"aria-label":v(`chat.modelControls.showThinkingModes`),children:[(0,H.jsx)(`span`,{className:`max-w-24 truncate`,children:i||v(`chat.modelControls.default`)}),(0,H.jsx)(I,{name:`arrow-right-s`,className:`size-3.5`})]})},t[100]=ve,t[101]=v,t[102]=a,t[103]=B,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]!==xe||t[117]!==Ce||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,H.jsx)(R,{providers:S,providerOrder:k,favoriteModels:j,recentModels:M,getMetadata:C,searchQuery:L,onSearchQueryChange:de,onSelect:xe,labels:Le,selectedModel:ze,hiddenModels:T,allowedProviderIds:c,allowedModelIdsByProvider:l,includeNotSelected:!0,onSelectNone:Ce,onEscape:he,maxHeightClassName:Ye,tooltipsEnabled:Xe,isFavorite:$,onToggleFavorite:et,renderRowEnd:Je}),t[112]=l,t[113]=c,t[114]=j,t[115]=C,t[116]=xe,t[117]=Ce,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]!==ve||t[132]!==z?(rt=z?ve(z):[],t[131]=ve,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]!==Te||t[135]!==v||t[136]!==z||t[137]!==st||t[138]!==at?(ct=z?(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,H.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:()=>fe(null),"aria-label":v(`header.actions.backAria`),children:[(0,H.jsx)(I,{name:`arrow-left`,className:`size-4`}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:z.modelID})]}),(0,H.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,H.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:()=>Te(e),children:[(0,H.jsx)(`span`,{className:`truncate`,children:e||v(`chat.modelControls.default`)}),t?(0,H.jsx)(I,{name:`check`,className:`size-4 shrink-0`}):null]},e||`__default`)})})]}):null,t[134]=Te,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,H.jsx)(ge,{modelId:i,providerId:r,className:`h-3.5 w-3.5 flex-shrink-0`}):_?(0,H.jsx)(I,{name:`pencil-ai`,className:`h-3 w-3 text-muted-foreground`}):null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,H.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,H.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,H.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,H.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,H.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,H.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]!==B?(w=(0,H.jsx)(vt,{open:ie,onClose:he,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:B,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]=B,t[189]=w):w=t[189];let O;return t[190]!==g||t[191]!==w?(O=(0,H.jsxs)(H.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,H.jsxs)(H.Fragment,{children:[_?r||i?(0,H.jsx)(ge,{modelId:i,providerId:r,className:`h-3.5 w-3.5 flex-shrink-0`}):(0,H.jsx)(I,{name:`pencil-ai`,className:`h-3.5 w-3.5 flex-shrink-0 text-muted-foreground`}):null,(0,H.jsx)(`span`,{className:`typography-ui-label min-w-0 flex-1 truncate text-left font-normal text-foreground`,children:Ve}),Q?(0,H.jsx)(`span`,{className:`shrink-0 typography-micro text-muted-foreground`,children:Q}):null]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(I,{name:`loader-4`,className:`h-3.5 w-3.5 animate-spin text-muted-foreground flex-shrink-0`}),(0,H.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,H.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,H.jsx)(Qe,{asChild:!0,children:(0,H.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,H.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,H.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,U.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(xe,t,!0)}}var qt=e=>e.split(`/`).pop()?.toLowerCase()??``,Jt=e=>{let t=qt(e);return t?E.matchFilename(xe,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,V.useState)(!1),[n,r]=(0,V.useState)(null),i=(0,V.useRef)(null),o=(0,V.useRef)(null),s=(0,V.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,V.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,V.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,V.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=V.memo(function(e){let t=(0,U.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,H.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,H.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,Y as B,rt as C,qe as D,We as E,Be as F,G,W as H,Q as I,Te 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,De as U,ke as V,Ee 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,K 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,Pe as z};
|