@yuriai/web 0.2.27 → 0.2.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/assets/{AgentAvatar-DNm_jMna.js → AgentAvatar-BybF1ayP.js} +1 -1
  2. package/dist/assets/{AssistantContactStatus-BPRpgMFh.js → AssistantContactStatus-BwpxTn0d.js} +3 -3
  3. package/dist/assets/{AssistantUnreadBadge-BssH-RvV.js → AssistantUnreadBadge-DqThZdCe.js} +1 -1
  4. package/dist/assets/{AssistantView-CxQv-9Ms.js → AssistantView-DPUDCXoY.js} +1 -1
  5. package/dist/assets/{DiagramView-DPpG0fwx.js → DiagramView-CHVLoYrV.js} +1 -1
  6. package/dist/assets/{FadeInOnReveal-S6UbimjB.js → FadeInOnReveal-Cj3JXYvE.js} +1 -1
  7. package/dist/assets/{GuiPluginSurface-BOf0JA1T.js → GuiPluginSurface-CBZYeKHb.js} +1 -1
  8. package/dist/assets/{GuiPluginWindow-OrYkfQ4m.js → GuiPluginWindow-_Z5wycnH.js} +1 -1
  9. package/dist/assets/{Icon-BE4mEwzV.js → Icon-CeRMtJa8.js} +1 -1
  10. package/dist/assets/{ImageLoadingPlaceholder-CBFJC_KD.js → ImageLoadingPlaceholder-DjLaKB4o.js} +1 -1
  11. package/dist/assets/{LoadingImage-NLq7_P-i.js → LoadingImage-DG3otL5V.js} +1 -1
  12. package/dist/assets/{MarkdownRenderer-BaMotAOQ.js → MarkdownRenderer-C8rv6z7p.js} +2 -2
  13. package/dist/assets/{MarkdownRendererImpl-Cv6UnGG7.js → MarkdownRendererImpl-_plqOlsV.js} +1 -1
  14. package/dist/assets/{MarkstreamRendererImpl-Rb9O6wkW.js → MarkstreamRendererImpl-bs8HZ4Ra.js} +1 -1
  15. package/dist/assets/{MobileDetailNavigation-CK4KbkeS.js → MobileDetailNavigation-SeT764Ps.js} +1 -1
  16. package/dist/assets/{MobileResizableSheet-Deidw1br.js → MobileResizableSheet-BY1-oo_E.js} +1 -1
  17. package/dist/assets/{MobileShareBridge-CO_OWEfq.js → MobileShareBridge-Dw8gLtJD.js} +1 -1
  18. package/dist/assets/MobileTabPageHeader-EsrOCLyg.js +2 -0
  19. package/dist/assets/{MultiRunWindow-DtVW9NTV.js → MultiRunWindow-C-Qw_g7N.js} +1 -1
  20. package/dist/assets/{OnboardingScreen-C8ld4wO7.js → OnboardingScreen-CGqabMbp.js} +1 -1
  21. package/dist/assets/{OverlayScrollbar-B3auC2WH.js → OverlayScrollbar-AGSWQKg-.js} +1 -1
  22. package/dist/assets/{SettingsView-Cm7woZWl.js → SettingsView-BLfFnnnX.js} +2 -2
  23. package/dist/assets/{SettingsWindow-CdL4PFxW.js → SettingsWindow-lyYO8Byy.js} +1 -1
  24. package/dist/assets/{TerminalView-CwRB6Yyr.js → TerminalView-OHqpkHzz.js} +1 -1
  25. package/dist/assets/{ToolOutputDialog-B4BfmoVH.js → ToolOutputDialog-DU4Pb1s0.js} +1 -1
  26. package/dist/assets/{YuriLogo-BOx0s0Ue.js → YuriLogo-Bb6yHagP.js} +1 -1
  27. package/dist/assets/{appThemeRegistry-B6woJIX5.js → appThemeRegistry-9j-rCSlE.js} +1 -1
  28. package/dist/assets/{button-BXxwtxsG.js → button-Bjh2BSXh.js} +1 -1
  29. package/dist/assets/{capgoAdapter-C5HFS-rx.js → capgoAdapter-DERfot6h.js} +1 -1
  30. package/dist/assets/{collapsible-BEm0787p.js → collapsible-BEAHoxNi.js} +1 -1
  31. package/dist/assets/{context-menu-DUwvVUDY.js → context-menu-BxLcot-3.js} +1 -1
  32. package/dist/assets/{diagram-DyY8dxjZ.js → diagram-CXVm2vzI.js} +1 -1
  33. package/dist/assets/{dialog-CLca6ojn.js → dialog-nshKUSE5.js} +1 -1
  34. package/dist/assets/{dropdown-menu.styles-DGaALKP0.js → dropdown-menu.styles-M78xpvb2.js} +1 -1
  35. package/dist/assets/{es-CrsHvgue.js → es-N9ZkQwG9.js} +1 -1
  36. package/dist/assets/{fileMentionTouchSelection-C4dvP8GY.js → fileMentionTouchSelection-B9NbPN9D.js} +1 -1
  37. package/dist/assets/{fr-CEgiRlfa.js → fr-CIGqV46N.js} +1 -1
  38. package/dist/assets/{gitApi-D2G9ny2O.js → gitApi-CY3D5CF0.js} +1 -1
  39. package/dist/assets/{image-loading-D5UhMj7Z.js → image-loading-D6kOgU4w.js} +1 -1
  40. package/dist/assets/{input-D59Q2pm8.js → input-3Re4pmHm.js} +1 -1
  41. package/dist/assets/{insertionBoundaries-CedfTSM5.js → insertionBoundaries-DK7XYF8d.js} +1 -1
  42. package/dist/assets/{ja-CX-_p9jZ.js → ja-DAhnTq6V.js} +1 -1
  43. package/dist/assets/{ko-D5xlLYJM.js → ko-FbMgNKcI.js} +1 -1
  44. package/dist/assets/{main-CxpUooVS.js → main-B_THXYMs.js} +2 -2
  45. package/dist/assets/main-CpcudEZb.js +169 -0
  46. package/dist/assets/{markdownHeightCache-D2VWb_4E.js → markdownHeightCache-DVWGXtAX.js} +1 -1
  47. package/dist/assets/{mcpQueries-DQ3KthDF.js → mcpQueries-CdOYmUdO.js} +1 -1
  48. package/dist/assets/{miniChat-CTdj8Ug9.js → miniChat-DxZiTnAZ.js} +2 -2
  49. package/dist/assets/{mobile-ChbA3Q8j.js → mobile-BJuATiaC.js} +2 -2
  50. package/dist/assets/{mobileBackNavigation-BJqt3oHk.js → mobileBackNavigation-CgZndzFA.js} +1 -1
  51. package/dist/assets/{multirun-BILeETbd.js → multirun-BlaYsQi2.js} +1 -1
  52. package/dist/assets/{native-config-BIY0Cr-l.js → native-config-BpsFKLGl.js} +1 -1
  53. package/dist/assets/{pl-BjH81A_q.js → pl-DzX0cbiQ.js} +1 -1
  54. package/dist/assets/{projectMeta-B9_Uh8YH.js → projectMeta-CnXHTolN.js} +1 -1
  55. package/dist/assets/{pt-BR-Dp5oK2x3.js → pt-BR-C5yvwyDK.js} +1 -1
  56. package/dist/assets/{queue-abort-optimistic-CS5jTJq-.js → queue-abort-optimistic-DCLBpirg.js} +1 -1
  57. package/dist/assets/{readiness-BNIgH81X.js → readiness-U16Qor79.js} +1 -1
  58. package/dist/assets/{renderElectronMiniChatApp-asOqV7FB.js → renderElectronMiniChatApp-n-nhgy1V.js} +2 -2
  59. package/dist/assets/{renderMobileApp-DAfque7-.js → renderMobileApp-DBj_7RlD.js} +4 -4
  60. package/dist/assets/{runtimeConfig-BX8JirIc.js → runtimeConfig-BBgkLVr_.js} +1 -1
  61. package/dist/assets/{runtimeEndpointReset-CFQgUiUr.js → runtimeEndpointReset-BvSQVFfx.js} +3 -3
  62. package/dist/assets/{sessionLookup-BxAaxPOw.js → sessionLookup-C_CCp7MJ.js} +1 -1
  63. package/dist/assets/{sortable-tabs-strip-DpbW5MqX.js → sortable-tabs-strip-p16Pn6Zz.js} +1 -1
  64. package/dist/assets/{speechSettingsQueries-CC0fusUo.js → speechSettingsQueries-CBSEAKyj.js} +1 -1
  65. package/dist/assets/src-u-YDfCVw.css +2 -0
  66. package/dist/assets/{store-CkIHVrmT.js → store-DVfZQktm.js} +2 -2
  67. package/dist/assets/{textarea-7eTptEtD.js → textarea-C6VQ7dHH.js} +1 -1
  68. package/dist/assets/{tooltip-BPwoSTzO.js → tooltip-Dnc6GA-X.js} +1 -1
  69. package/dist/assets/{types-CUtSV1V8.js → types-DnZw0gLD.js} +1 -1
  70. package/dist/assets/{uk-BEfkaLtM.js → uk-zbDcUpBy.js} +1 -1
  71. package/dist/assets/{useAppFontEffects-Ck2PdQRx.js → useAppFontEffects-CEgDiZHu.js} +54 -54
  72. package/dist/assets/{useDesktopWindowControlsLayout-DxxOUZj1.js → useDesktopWindowControlsLayout-B2o4IFmd.js} +1 -1
  73. package/dist/assets/{useEffectiveDirectory-CNCQfN_x.js → useEffectiveDirectory-BOYMJ6k7.js} +1 -1
  74. package/dist/assets/{useMobileNavigationStore-BmVr5a5c.js → useMobileNavigationStore-DlvrZQ49.js} +7 -7
  75. package/dist/assets/{useWorkerHighlightedLines-CN_RGaSw.js → useWorkerHighlightedLines-EcJThS4x.js} +1 -1
  76. package/dist/assets/{zh-CN-DipfA56P.js → zh-CN-BHRJ7CF3.js} +1 -1
  77. package/dist/assets/{zh-TW-B7pXMVjt.js → zh-TW-BFI_YFd-.js} +1 -1
  78. package/dist/index.html +6 -6
  79. package/dist/mini-chat.html +6 -6
  80. package/dist/mobile.html +6 -6
  81. package/package.json +1 -1
  82. package/server/lib/assistants/DOCUMENTATION.md +7 -0
  83. package/server/lib/assistants/channel-output.integration.test.js +15 -1
  84. package/server/lib/assistants/harness.js +1 -0
  85. package/server/lib/assistants/harness.test.js +16 -0
  86. package/dist/assets/MobileTabPageHeader-DbC8L6A4.js +0 -2
  87. package/dist/assets/main-Dpm4KxWX.js +0 -169
  88. package/dist/assets/src-BMKjN2ip.css +0 -2
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,Q as n,X as r,Z as i,at as a,it as o,tt as s}from"./vendor-base-ui-BQjbsJ43.js";import{n as c}from"./vendor-react-D5d-V1vN.js";import{f as l,r as u}from"./button-BXxwtxsG.js";import{t as d}from"./SettingsView-Cm7woZWl.js";var f=c(),p=e(a(),1),m=o(),h=e=>{let a=(0,f.c)(19),{open:o,onOpenChange:c}=e,{t:h}=l(),_=p.useId(),v=g,y;a[0]===c?y=a[1]:(y=e=>{!e&&v()||c(e)},a[0]=c,a[1]=y);let b;a[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,m.jsx)(s,{className:u(`fixed inset-0 z-50 bg-black/50 dark:bg-black/75`,`transition-opacity duration-150 ease-out`,`data-[starting-style]:opacity-0 data-[ending-style]:opacity-0`)}),a[2]=b):b=a[2];let x;a[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=u(`relative pointer-events-auto`,`w-[90vw] max-w-[1200px] h-[85vh] max-h-[900px]`,`rounded-xl border shadow-none overflow-hidden origin-center`,`bg-background`,`transition-all duration-150 ease-out`,`data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98]`,`data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]`,`data-[nested-dialog-open]:brightness-[0.55] dark:data-[nested-dialog-open]:brightness-[0.4]`),a[3]=x):x=a[3];let S;a[4]===h?S=a[5]:(S=h(`settings.window.description`),a[4]=h,a[5]=S);let C;a[6]!==_||a[7]!==S?(C=(0,m.jsx)(t,{id:_,className:`sr-only`,children:S}),a[6]=_,a[7]=S,a[8]=C):C=a[8];let w;a[9]===c?w=a[10]:(w=(0,m.jsx)(d,{onClose:()=>c(!1),isWindowed:!0}),a[9]=c,a[10]=w);let T;a[11]!==_||a[12]!==C||a[13]!==w?(T=(0,m.jsxs)(i,{children:[b,(0,m.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center pointer-events-none`,children:(0,m.jsxs)(n,{"aria-describedby":_,className:x,children:[C,w]})})]}),a[11]=_,a[12]=C,a[13]=w,a[14]=T):T=a[14];let E;return a[15]!==o||a[16]!==y||a[17]!==T?(E=(0,m.jsx)(r,{open:o,onOpenChange:y,children:T}),a[15]=o,a[16]=y,a[17]=T,a[18]=E):E=a[18],E};function g(){return typeof document>`u`?!1:!!document.querySelector(`[data-slot="dropdown-menu-content"][data-open], [data-slot="select-content"][data-open]`)}export{h as SettingsWindow};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,Q as n,X as r,Z as i,at as a,it as o,tt as s}from"./vendor-base-ui-BQjbsJ43.js";import{n as c}from"./vendor-react-D5d-V1vN.js";import{f as l,r as u}from"./button-Bjh2BSXh.js";import{t as d}from"./SettingsView-BLfFnnnX.js";var f=c(),p=e(a(),1),m=o(),h=e=>{let a=(0,f.c)(19),{open:o,onOpenChange:c}=e,{t:h}=l(),_=p.useId(),v=g,y;a[0]===c?y=a[1]:(y=e=>{!e&&v()||c(e)},a[0]=c,a[1]=y);let b;a[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,m.jsx)(s,{className:u(`fixed inset-0 z-50 bg-black/50 dark:bg-black/75`,`transition-opacity duration-150 ease-out`,`data-[starting-style]:opacity-0 data-[ending-style]:opacity-0`)}),a[2]=b):b=a[2];let x;a[3]===Symbol.for(`react.memo_cache_sentinel`)?(x=u(`relative pointer-events-auto`,`w-[90vw] max-w-[1200px] h-[85vh] max-h-[900px]`,`rounded-xl border shadow-none overflow-hidden origin-center`,`bg-background`,`transition-all duration-150 ease-out`,`data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.98]`,`data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]`,`data-[nested-dialog-open]:brightness-[0.55] dark:data-[nested-dialog-open]:brightness-[0.4]`),a[3]=x):x=a[3];let S;a[4]===h?S=a[5]:(S=h(`settings.window.description`),a[4]=h,a[5]=S);let C;a[6]!==_||a[7]!==S?(C=(0,m.jsx)(t,{id:_,className:`sr-only`,children:S}),a[6]=_,a[7]=S,a[8]=C):C=a[8];let w;a[9]===c?w=a[10]:(w=(0,m.jsx)(d,{onClose:()=>c(!1),isWindowed:!0}),a[9]=c,a[10]=w);let T;a[11]!==_||a[12]!==C||a[13]!==w?(T=(0,m.jsxs)(i,{children:[b,(0,m.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center pointer-events-none`,children:(0,m.jsxs)(n,{"aria-describedby":_,className:x,children:[C,w]})})]}),a[11]=_,a[12]=C,a[13]=w,a[14]=T):T=a[14];let E;return a[15]!==o||a[16]!==y||a[17]!==T?(E=(0,m.jsx)(r,{open:o,onOpenChange:y,children:T}),a[15]=o,a[16]=y,a[17]=T,a[18]=E):E=a[18],E};function g(){return typeof document>`u`?!1:!!document.querySelector(`[data-slot="dropdown-menu-content"][data-open], [data-slot="select-content"][data-open]`)}export{h as SettingsWindow};
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t}from"./runtime-fetch-D0YWp3FJ.js";import{x as n}from"./desktop-JwYqThiw.js";import{at as r,it as i,rt as a}from"./vendor-base-ui-BQjbsJ43.js";import{c as o,l as s,n as c}from"./useUIStore-C6CE42oh.js";import{u as l}from"./fileQueries-BeXkd3o6.js";import{o as u}from"./terminalApi-rl9mZAlB.js";import{n as d,r as f,t as p}from"./vendor-ghostty-web-DbBrwBII.js";import{d as m,f as h,r as g,t as _}from"./button-BXxwtxsG.js";import{p as v}from"./useMobileNavigationStore-BmVr5a5c.js";import{n as y}from"./useThemeSystem-CGF5jnIh.js";import{n as b}from"./Icon-BE4mEwzV.js";import{r as ee}from"./device-BcRP6Tjd.js";import{n as x}from"./useEffectiveDirectory-CNCQfN_x.js";import{t as te}from"./OverlayScrollbar-B3auC2WH.js";import{t as S}from"./sortable-tabs-strip-DpbW5MqX.js";import{n as C,t as w}from"./useFontPreferences-DeqW9nRx.js";import{r as T}from"./projectActions-BX0cjZoq.js";var E=e(r(),1);function ne(e){let{colors:t}=e,n=t.syntax.base;return{background:t.surface.background,foreground:n.foreground,cursor:t.interactive.cursor,cursorAccent:t.surface.background,selectionBackground:t.interactive.selection,selectionForeground:t.interactive.selectionForeground,selectionInactiveBackground:t.interactive.selection+`50`,black:t.surface.muted,red:t.status.error,green:t.status.success,yellow:t.status.warning,blue:n.function,magenta:n.keyword,cyan:n.type,white:n.foreground,brightBlack:n.comment,brightRed:t.status.error,brightGreen:t.status.success,brightYellow:t.status.warning,brightBlue:n.function,brightMagenta:n.keyword,brightCyan:n.type,brightWhite:t.surface.elevatedForeground}}function re(e,t,n,r,i=!1){return{cursorBlink:!1,cursorStyle:`bar`,fontSize:t,lineHeight:1.15,fontFamily:`${e}, "JetBrainsMonoNL Nerd Font", "FiraCode Nerd Font", "Cascadia Code PL", "Fira Code", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace`,allowTransparency:!1,theme:{background:n.background,foreground:n.foreground,cursor:n.cursor,cursorAccent:n.cursorAccent,selectionBackground:n.selectionBackground,selectionForeground:n.selectionForeground,black:n.black,red:n.red,green:n.green,yellow:n.yellow,blue:n.blue,magenta:n.magenta,cyan:n.cyan,white:n.white,brightBlack:n.brightBlack,brightRed:n.brightRed,brightGreen:n.brightGreen,brightYellow:n.brightYellow,brightBlue:n.brightBlue,brightMagenta:n.brightMagenta,brightCyan:n.brightCyan,brightWhite:n.brightWhite},scrollback:1e4,ghostty:r,disableStdin:i}}var ie=e(a(),1),D=i(),O=null;function k(){return O||=f.load(),O}function ae(e){if(typeof window>`u`)return null;let t=[e,...Array.from(e.querySelectorAll(`*`))],n=null;for(let e of t){let t=window.getComputedStyle(e).overflowY;if(t===`auto`||t===`scroll`){if(e.scrollHeight-e.clientHeight>2)return e;n||=e}}return n}var oe=E.forwardRef(({sessionKey:e,chunks:t,onInput:n,onResize:r,theme:i,fontFamily:a,fontSize:o,className:s,enableTouchScroll:c,autoFocus:l=!0,isVisible:u=!0},f)=>{let{t:_}=h(),v=E.useRef(null),y=E.useRef(null),b=E.useRef(null),ee=E.useRef(null),x=E.useRef(n),S=E.useRef(r),C=E.useRef(null),w=E.useRef(``),T=E.useRef(null),ne=E.useRef(!1),O=E.useRef(null),oe=E.useRef(!0),A=E.useRef(null),j=E.useRef(null),se=E.useRef(0),ce=E.useRef(null),M=E.useRef(null),N=E.useRef(!1),P=E.useRef(!1),le=E.useRef(null),ue=E.useRef(null),de=E.useRef(null),F=E.useRef(``),fe=E.useRef(null),pe=E.useRef(!c),me=E.useRef(u),[,he]=E.useReducer(e=>e+1,0),[ge,_e]=E.useReducer(e=>e+1,0);x.current=n,S.current=r;let ve=typeof navigator<`u`&&(/Android/i.test(navigator.userAgent)||navigator.userAgentData?.platform===`Android`),I=!!c;E.useEffect(()=>{if(!c){pe.current=!0,me.current=u;return}!me.current&&u&&(pe.current=!1),me.current=u},[c,u]);let ye=E.useCallback(()=>{if(!I)return;let e=v.current,t=ce.current;if(!e)return;let n=[];e.getAttribute(`contenteditable`)===`true`&&n.push(e),n.push(...Array.from(e.querySelectorAll(`[contenteditable="true"]`))),n.forEach(e=>{e.setAttribute(`data-terminal-disabled-contenteditable`,`true`),e.setAttribute(`contenteditable`,`false`),e.setAttribute(`aria-hidden`,`true`),e.tabIndex=-1,e.style.setProperty(`caret-color`,`transparent`),e.style.color=`transparent`,e.style.setProperty(`-webkit-text-fill-color`,`transparent`),e.style.background=`transparent`,e.style.outline=`none`,e.style.boxShadow=`none`,e.style.textShadow=`none`,e.style.setProperty(`user-select`,`none`),e.style.setProperty(`-webkit-user-select`,`none`)}),e.tabIndex=-1,e.removeAttribute(`role`),e.removeAttribute(`aria-multiline`),Array.from(e.querySelectorAll(`textarea`)).forEach(e=>{e.style.setProperty(`caret-color`,`transparent`),e.style.color=`transparent`,e.style.setProperty(`-webkit-text-fill-color`,`transparent`),e.style.background=`transparent`,e.style.border=`0`,e.style.outline=`none`,e.style.boxShadow=`none`,e.style.textShadow=`none`,e.style.fontSize=`0`,e.style.lineHeight=`0`,e!==t&&e.getAttribute(`data-terminal-disabled-input`)!==`true`&&(e.setAttribute(`data-terminal-disabled-input`,`true`),e.setAttribute(`aria-hidden`,`true`),e.tabIndex=-1,e.disabled=!0,e.style.position=`absolute`,e.style.opacity=`0`,e.style.width=`0px`,e.style.height=`0px`,e.style.pointerEvents=`none`,e.style.zIndex=`-1`)})},[I]),L=E.useCallback(e=>{if(fe.current===e)return;let t=b.current;if(t)try{if(typeof t.setOption==`function`){t.setOption(`cursorBlink`,e),fe.current=e;return}t.options&&(t.options.cursorBlink=e,fe.current=e)}catch{}},[]),R=I&&ve,z=E.useCallback((e,t)=>{let n=R?M.current:ce.current,r=v.current;if(!n||!r)return;let i=r.getBoundingClientRect(),a=typeof window<`u`?window.innerWidth:i.width,o=typeof window<`u`?window.innerHeight:i.height,s=i.left+i.width/2,c=i.top+i.height-12,l=typeof e==`number`?e:s,u=typeof t==`number`?t:c,d=Math.max(8,Math.min(a-8,l)),f=Math.max(8,Math.min(o-8,u));n.style.left=`${d}px`,n.style.top=`${f}px`,n.style.bottom=``,(n instanceof HTMLTextAreaElement||n instanceof HTMLInputElement)&&(n.disabled=!1,n.readOnly=!1,n.removeAttribute(`disabled`),n.removeAttribute(`readonly`));try{n.focus({preventScroll:!0})}catch{try{n.focus()}catch{}}},[R]),B=E.useCallback(()=>{if(I){z(),L(!0);return}b.current?.focus(),L(!0)},[z,L,I]),V=E.useCallback(e=>e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement?e.value:e.textContent??``,[]),H=E.useCallback(e=>{if(e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement){e.value=``;return}e.textContent=``},[]),be=E.useCallback(e=>{if(typeof window>`u`||R)return;de.current!==null&&(window.clearTimeout(de.current),de.current=null);let t=0,n=()=>{de.current=window.setTimeout(()=>{de.current=null;let r=V(e);if(!r){if(t+=1,t<3){n();return}return}let i=F.current;F.current=r;let a=r.startsWith(i)?r.slice(i.length):r;a&&x.current(a.replace(/\r\n|\r|\n/g,`\r`)),H(e),F.current=``},t===0?0:24)};n()},[H,V,R]);E.useEffect(()=>{let e=v.current;if(!I||!e||c)return;let t=t=>{let n=t.target;if(n&&n.getAttribute(`data-terminal-hidden-input`)!==`true`&&e.contains(n)){try{n.blur()}catch{}z()}};return e.addEventListener(`focusin`,t,!0),()=>{e.removeEventListener(`focusin`,t,!0)}},[c,I,z]);let U=E.useCallback(()=>{let e=b.current;if(!e||typeof e.getSelection!=`function`)return``;let t=e.getSelection();return typeof t==`string`?t:``},[]),xe=E.useCallback(()=>{if(typeof window>`u`)return``;let e=window.getSelection();if(!e)return``;let t=e.toString();if(!t.trim())return``;let n=v.current;if(!n)return``;let r=e.anchorNode,i=e.focusNode;return r&&!n.contains(r)||i&&!n.contains(i)?``:t},[]),Se=E.useCallback(async()=>{if(typeof document>`u`)return;let e=U()||xe();e.trim()&&await m(e)},[xe,U]),Ce=E.useCallback(()=>U().trim()?!0:!!xe().trim(),[xe,U]);E.useEffect(()=>{if(typeof window>`u`)return;let e=e=>{Ce()&&(e.preventDefault(),Se())};return window.addEventListener(`yuri:copy`,e),()=>{window.removeEventListener(`yuri:copy`,e)}},[Se,Ce]);let W=E.useCallback(()=>{w.current=``,T.current!==null&&typeof window<`u`&&window.cancelAnimationFrame(T.current),T.current=null,ne.current=!1,O.current=null},[]),G=E.useCallback(()=>{let e=ee.current,t=b.current,n=v.current;if(!e||!t||!n)return;let r=n.getBoundingClientRect();if(!(r.width<24||r.height<24))try{e.fit();let n={cols:t.cols,rows:t.rows},r=C.current;(!r||r.cols!==n.cols||r.rows!==n.rows)&&(C.current=n,S.current(n.cols,n.rows))}catch{}},[]),K=E.useCallback(()=>{if(ne.current)return;let e=b.current;if(!e){W();return}if(!w.current)return;let t=w.current;w.current=``,ne.current=!0,e.write(t,()=>{ne.current=!1,w.current&&(typeof window<`u`?T.current=window.requestAnimationFrame(()=>{T.current=null,K()}):K())})},[W]),we=E.useCallback(()=>{T.current===null&&(typeof window<`u`?T.current=window.requestAnimationFrame(()=>{T.current=null,K()}):K())},[K]),q=E.useCallback(e=>{e&&(w.current+=e,we())},[we]),Te=E.useCallback(()=>{if(A.current?.(),A.current=null,j.current!==null&&typeof window<`u`&&(window.clearTimeout(j.current),j.current=null),!c){se.current=0;return}let e=v.current;if(!e)return;let t=b.current;if(!t)return;se.current=0;let n=2.2,r=2.8,i=.25,a=.05,s=.015,l={lastY:null,lastTime:null,velocity:0,rafId:null,startX:null,startY:null,didMove:!1},u=()=>typeof performance<`u`?performance.now():Date.now(),d=Math.max(12,Math.round(o*1.35)),f=0,p=e=>{if(!e)return!1;let n=t.getViewportY(),r=f+e,i=Math.trunc(r/d);return f=r-i*d,i!==0&&t.scrollLines(i),t.getViewportY()!==n},m=()=>{l.rafId!==null&&typeof window<`u`&&window.cancelAnimationFrame(l.rafId),l.rafId=null},h={passive:!1,capture:!1};if(typeof window<`u`&&`PointerEvent`in window){let t=Object.assign(l,{pointerId:null,startX:null,startY:null,moved:!1}),o=n=>{if(n.pointerType===`touch`){m(),t.pointerId=n.pointerId,t.startX=n.clientX,t.startY=n.clientY,t.moved=!1,t.lastY=n.clientY,t.lastTime=u(),t.velocity=0;try{e.setPointerCapture(n.pointerId)}catch{}}},d=e=>{if(e.pointerType!==`touch`||t.pointerId!==e.pointerId)return;if(t.startX!==null&&t.startY!==null&&!t.moved){let n=e.clientX-t.startX,r=e.clientY-t.startY;Math.hypot(n,r)>=6&&(t.moved=!0)}if(t.lastY===null){t.lastY=e.clientY,t.lastTime=u();return}let a=t.lastY,o=t.lastTime??u(),s=u();t.lastY=e.clientY,t.lastTime=s;let c=a-e.clientY;if(Math.abs(c)<1)return;let l=Math.max(s-o,8),d=c*(n+Math.min(r,Math.abs(c)/25)),f=d/l;t.velocity=t.velocity*.75+f*i,t.velocity>8?t.velocity=8:t.velocity<-8&&(t.velocity=-8),t.moved&&(e.cancelable&&e.preventDefault(),e.stopPropagation()),p(d)},f=n=>{if(n.pointerType!==`touch`||t.pointerId!==n.pointerId)return;let r=!t.moved;t.pointerId=null,t.startX=null,t.startY=null,t.moved=!1,t.lastY=null,t.lastTime=null;try{e.releasePointerCapture(n.pointerId)}catch{}if(r){I?z(n.clientX,n.clientY):c&&!pe.current&&(pe.current=!0,b.current?.focus());return}if(typeof window>`u`)return;if(Math.abs(t.velocity)<a){t.velocity=0;return}let i=u(),o=()=>{let e=u(),n=Math.max(e-i,8);i=e;let r=p(t.velocity*n)??!1,c=Math.sign(t.velocity),l=Math.max(0,Math.abs(t.velocity)-s*n);if(t.velocity=l*c,!r||l<=a){m(),t.velocity=0;return}t.rafId=window.requestAnimationFrame(o)};t.rafId=window.requestAnimationFrame(o)};e.addEventListener(`pointerdown`,o,h),e.addEventListener(`pointermove`,d,h),e.addEventListener(`pointerup`,f,h),e.addEventListener(`pointercancel`,f,h);let g=e.style.touchAction,_=e.style.overscrollBehaviorY;e.style.touchAction=`none`,e.style.overscrollBehaviorY=`contain`,A.current=()=>{m(),j.current!==null&&typeof window<`u`&&(window.clearTimeout(j.current),j.current=null),se.current=0,e.removeEventListener(`pointerdown`,o,h),e.removeEventListener(`pointermove`,d,h),e.removeEventListener(`pointerup`,f,h),e.removeEventListener(`pointercancel`,f,h),e.style.touchAction=g,e.style.overscrollBehaviorY=_};return}let g=e=>{e.touches.length===1&&(m(),l.lastY=e.touches[0].clientY,l.lastTime=u(),l.velocity=0,l.startX=e.touches[0].clientX,l.startY=e.touches[0].clientY,l.didMove=!1)},_=e=>{if(e.touches.length!==1){l.lastY=null,l.lastTime=null,l.velocity=0,l.startX=null,l.startY=null,l.didMove=!1,m();return}let t=e.touches[0].clientX,a=e.touches[0].clientY;if(l.startX!==null&&l.startY!==null&&!l.didMove){let e=t-l.startX,n=a-l.startY;Math.hypot(e,n)>=6&&(l.didMove=!0)}if(l.lastY===null){l.lastY=a,l.lastTime=u();return}let o=l.lastY,s=l.lastTime??u(),c=u();l.lastY=a,l.lastTime=c;let d=o-a;if(Math.abs(d)<1)return;let f=Math.max(c-s,8),h=d*(n+Math.min(r,Math.abs(d)/25)),g=h/f;l.velocity=l.velocity*.75+g*i,l.velocity>8?l.velocity=8:l.velocity<-8&&(l.velocity=-8),l.didMove&&(e.preventDefault(),e.stopPropagation()),p(h)},y=e=>{let t=!l.didMove;l.lastY=null,l.lastTime=null;let n=l.velocity;if(l.startX=null,l.startY=null,l.didMove=!1,t){let t=e.changedTouches?.[0];I?z(t?.clientX,t?.clientY):c&&!pe.current&&(pe.current=!0,b.current?.focus());return}if(typeof window>`u`)return;if(Math.abs(n)<a){l.velocity=0;return}let r=u(),i=()=>{let e=u(),t=Math.max(e-r,8);r=e;let n=p(l.velocity*t)??!1,o=Math.sign(l.velocity),c=Math.max(0,Math.abs(l.velocity)-s*t);if(l.velocity=c*o,!n||c<=a){m(),l.velocity=0;return}l.rafId=window.requestAnimationFrame(i)};l.rafId=window.requestAnimationFrame(i)};e.addEventListener(`touchstart`,g,h),e.addEventListener(`touchmove`,_,h),e.addEventListener(`touchend`,y,h),e.addEventListener(`touchcancel`,y,h);let ee=e.style.touchAction,x=e.style.overscrollBehaviorY;e.style.touchAction=`none`,e.style.overscrollBehaviorY=`contain`,A.current=()=>{m(),j.current!==null&&typeof window<`u`&&(window.clearTimeout(j.current),j.current=null),se.current=0,e.removeEventListener(`touchstart`,g,h),e.removeEventListener(`touchmove`,_,h),e.removeEventListener(`touchend`,y,h),e.removeEventListener(`touchcancel`,y,h),e.style.touchAction=ee,e.style.overscrollBehaviorY=x}},[c,I,z,o]);E.useEffect(()=>{let e=!1,t=null,n=null,r=null,s=[],l=null,u=null,f=null,m=v.current;if(!m)return;if(m.tabIndex=I?-1:0,I){let e=m.focus.bind(m),t=m;t.focus=((...e)=>{z()}),f=()=>{t.focus=e}}let h=()=>{L(!0)},g=()=>{L(!1)},_=e=>{let t=e.target;if(t&&m.contains(t)){if(I&&t instanceof HTMLElement){window.setTimeout(()=>{t.blur(),z()},0),L(!1);return}if(c&&!pe.current&&t instanceof HTMLElement){window.setTimeout(()=>{t.blur()},0),L(!1);return}L(!0);return}L(!1)},te=()=>{L(!1)},S=null;return(async()=>{try{let f=await k();if(e)return;let _=re(a,o,i,f,!1),v=new d(_);oe.current=!0,I&&(v.focus=()=>{});let te=v;if(typeof te.scrollToBottom==`function`){let e=te.scrollToBottom.bind(te);te.scrollToBottom=()=>{oe.current&&e()},l=()=>{te.scrollToBottom=e}}let C=new p;if(t=v,b.current=v,ee.current=C,v.loadAddon(C),v.open(m),c){let e=v.renderer;if(e&&typeof e.renderScrollbar==`function`){let t=e.renderScrollbar.bind(e);e.renderScrollbar=()=>{},u=()=>{e.renderScrollbar=t}}}_e(),fe.current=!1,S=v.textarea??m.querySelector(`textarea`),S&&(S.addEventListener(`focus`,h),S.addEventListener(`blur`,g)),ye(),typeof MutationObserver<`u`&&(r=new MutationObserver(()=>{ye()}),r.observe(m,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`contenteditable`,`role`,`tabindex`,`aria-label`]}));let w=ae(m);w?(w.classList.add(`overlay-scrollbar-target`,`overlay-scrollbar-container`),y.current=w,he()):y.current=null,G();let T=C;typeof T.observeResize==`function`&&T.observeResize(),Te(),s=[v.onData(e=>{x.current(e)}),v.onScroll(e=>{if(typeof e==`number`&&Number.isFinite(e)){let t=typeof v.hasSelection==`function`&&v.hasSelection();oe.current=!t&&e<=.5}}),v.onSelectionChange(()=>{if(typeof v.hasSelection==`function`&&v.hasSelection()){oe.current=!1;return}let e=typeof v.getViewportY==`function`?v.getViewportY():0;oe.current=e<=.5})],n=new ResizeObserver(()=>{G()}),n.observe(m),typeof window<`u`&&window.setTimeout(()=>{G()},0)}catch{}})(),document.addEventListener(`focusin`,_,!0),window.addEventListener(`blur`,te),()=>{e=!0,A.current?.(),A.current=null,document.removeEventListener(`focusin`,_,!0),window.removeEventListener(`blur`,te),s.forEach(e=>e.dispose()),l?.(),l=null,u?.(),u=null,S&&(S.removeEventListener(`focus`,h),S.removeEventListener(`blur`,g)),n?.disconnect(),r?.disconnect(),f?.(),t?.dispose(),b.current=null,ee.current=null,y.current=null,C.current=null,fe.current=null,W()}},[ye,c,G,z,a,o,Te,i,W,L,I]),E.useEffect(()=>{let e=b.current;e&&(e.reset(),W(),C.current=null,G())},[e,ge,G,W]),E.useEffect(()=>{l&&b.current&&B()},[l,B,e,ge]),E.useEffect(()=>(Te(),()=>{A.current?.(),A.current=null}),[Te,e]),E.useEffect(()=>{let e=b.current;if(!e)return;if(t.length===0){O.current!==null&&(e.reset(),W(),G());return}let n=O.current,r;if(n===null)r=t;else{let e=t.findIndex(e=>e.id===n);r=e>=0?t.slice(e+1):t}r.length>0&&q(r.map(e=>e.data).join(``)),O.current=t[t.length-1].id},[t,ge,q,G,W]),E.useImperativeHandle(f,()=>({focus:()=>{B()},clear:()=>{let e=b.current;e&&(e.reset(),W(),G())},fit:()=>{G()}}),[B,G,W]);let J=E.useCallback(e=>{if(!I)return;let t=v.current,n=e.relatedTarget,r=n?.tagName;r===`INPUT`||r===`TEXTAREA`||n?.isContentEditable,n?.getAttribute(`data-terminal-hidden-input`),n&&t?.contains(n)},[I]),Y=E.useCallback(e=>{let t=e.nativeEvent,n=t?.inputType??``,r=typeof t?.data==`string`?t.data:``;if(ue.current=typeof performance<`u`?performance.now():Date.now(),n===`insertCompositionText`){N.current=!0;return}if(!n&&r){if(N.current)return;e.preventDefault(),x.current(r),le.current={type:`insertText`,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0;return}if(n===`insertText`&&r){if(N.current)return;e.preventDefault(),x.current(r),le.current={type:n,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0;return}if(n===`insertLineBreak`){if(N.current)return;e.preventDefault(),x.current(`\r`),le.current={type:n,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0;return}if(n===`deleteContentBackward`){if(N.current)return;e.preventDefault(),x.current(``),le.current={type:n,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0}},[]),X=E.useCallback(e=>{let t=e.currentTarget;if(ue.current=typeof performance<`u`?performance.now():Date.now(),N.current)return;if(P.current){let e=le.current,n=typeof performance<`u`?performance.now():Date.now();if(e&&n-e.at<50){P.current=!1,H(t);return}P.current=!1}let n=V(t);if(!n)return;F.current=n;let r=n.replace(/\r\n|\r|\n/g,`\r`);x.current(r),H(t),F.current=``},[H,V]),Ee=E.useCallback(e=>{e.stopPropagation();let t=e.key.toLowerCase(),n=e.metaKey&&!e.ctrlKey&&!e.altKey&&t===`c`,r=e.ctrlKey&&e.shiftKey&&!e.metaKey&&!e.altKey&&t===`c`;if((n||r)&&Ce()){e.preventDefault(),Se();return}if(e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1){let t=e.key.toUpperCase();if(t>=`A`&&t<=`Z`){e.preventDefault(),e.nativeEvent?.stopImmediatePropagation(),x.current(String.fromCharCode(t.charCodeAt(0)-64)),H(e.currentTarget);return}}if(e.altKey&&!e.ctrlKey&&!e.metaKey&&e.key.length===1){e.preventDefault(),e.nativeEvent?.stopImmediatePropagation(),x.current(`\x1B`+e.key),H(e.currentTarget);return}let i={ArrowUp:`\x1B[A`,ArrowDown:`\x1B[B`,ArrowRight:`\x1B[C`,ArrowLeft:`\x1B[D`,Escape:`\x1B`,Tab:` `,Delete:`\x1B[3~`,Home:`\x1B[H`,End:`\x1B[F`}[e.key];if(i){e.preventDefault(),x.current(i),H(e.currentTarget);return}let a=e.currentTarget;if(e.nativeEvent?.isComposing)return;let o=le.current,s=typeof performance<`u`?performance.now():Date.now(),c=!!(o&&s-o.at<50);if(e.key===`Enter`){if(c&&o?.type===`insertLineBreak`)return;e.preventDefault(),x.current(`\r`),H(a);return}if(e.key===`Backspace`){if(e.preventDefault(),c&&o?.type===`deleteContentBackward`)return;V(a)||x.current(``)}if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let t=ue.current;t&&s-t<50||(e.preventDefault(),x.current(e.key),P.current=!0,le.current={type:`keydown-text`,at:s})}be(a)},[H,Se,Ce,V,be]),De=E.useCallback(e=>{e.stopPropagation();let t=e.currentTarget;e.nativeEvent?.isComposing||be(t)},[be]),Oe=E.useCallback(e=>{let t=e.currentTarget;N.current=!1;let n=e.data||V(t);if(ue.current=typeof performance<`u`?performance.now():Date.now(),!n)return;let r=n.replace(/\r\n|\r|\n/g,`\r`);x.current(r),H(t),le.current={type:`compositionend`,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0},[H,V]),ke=E.useCallback(e=>{e.stopPropagation();let t=e.clipboardData?.getData(`text`)??``;if(!t)return;e.preventDefault();let n=b.current?.hasBracketedPaste?.()?`\x1b[200~${t}\x1b[201~`:t;x.current(n)},[]),Ae={position:`fixed`,left:0,top:0,width:1,height:1,opacity:0,zIndex:-1,background:`transparent`,color:`transparent`,WebkitTextFillColor:`transparent`,caretColor:`transparent`,textShadow:`none`,WebkitAppearance:`none`,appearance:`none`,resize:`none`,overflow:`hidden`,whiteSpace:`nowrap`,border:`0`,padding:0,margin:0,outline:`none`,outlineOffset:0,fontSize:16,fontWeight:400,pointerEvents:`none`,WebkitUserSelect:`none`,userSelect:`none`};return(0,D.jsxs)(`div`,{ref:v,className:g(`relative h-full w-full terminal-viewport-container`,s),"data-hidden-input-overlay-active":I?`true`:void 0,style:{backgroundColor:i.background},onTouchStart:e=>{if(!(!I||c)&&!Ce()){let t=e.touches?.[0];z(t?.clientX,t?.clientY)}},onClick:e=>{if(!c)if(I){if(Ce())return;z(e.clientX,e.clientY)}else b.current?.focus()},onMouseUp:()=>{!c&&Ce()&&Se()},onTouchEnd:()=>{!c&&Ce()&&Se()},children:[I&&typeof document<`u`?(0,ie.createPortal)((0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`input`,{ref:M,type:`text`,inputMode:`text`,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,tabIndex:-1,enterKeyHint:`send`,"data-terminal-hidden-input":`true`,"aria-label":_(`terminalView.viewport.inputAria`),"aria-hidden":`true`,style:{...Ae,display:R?`block`:`none`},onBlur:J,onBeforeInput:Y,onCompositionStart:()=>{N.current=!0},onInput:X,onKeyDown:Ee,onKeyUp:De,onCompositionEnd:Oe,onPaste:ke}),(0,D.jsx)(`textarea`,{ref:ce,inputMode:`text`,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,tabIndex:-1,enterKeyHint:`send`,"data-terminal-hidden-input":`true`,"aria-label":_(`terminalView.viewport.inputAria`),"aria-hidden":`true`,style:{...Ae,display:R?`none`:`block`},onBlur:J,onBeforeInput:Y,onCompositionStart:()=>{N.current=!0},onInput:X,onKeyDown:Ee,onKeyUp:De,onCompositionEnd:Oe,onPaste:ke})]}),document.body):null,y.current&&!c?(0,D.jsx)(te,{containerRef:y,disableHorizontal:!0,className:`overlay-scrollbar--flush overlay-scrollbar--dense overlay-scrollbar--zero`}):null]})});oe.displayName=`TerminalViewport`;var A=RegExp(`\x1B\\[[0-9;?]*[ -/]*[@-~]`,`g`),j=/(https?:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0|\[(?:::1|::)\])(?::\d{2,5})?(?:\/[^\s<>'"`]*)?)/gi,se=/(?:➜\s*(?:Local|Network):)|\b(?:local|network|loopback|serving|listening|available|ready|started|running|server|vite|webpack|next\.js|astro|sveltekit|nuxt)\b/i,ce=/Serving HTTP on .*? port (\d{2,5})/i,M=new Set([`.`,`,`,`;`,`:`,`!`,`?`]),N=e=>{let t=e;for(;t.length>0;){let e=t[t.length-1];if(e===`)`||e===`]`||e===`}`||e===`>`){let n=e===`)`?`(`:e===`]`?`[`:e===`}`?`{`:`<`,r=t.slice(0,-1);if((r.match(RegExp(`\\${n}`,`g`))||[]).length>(r.match(RegExp(`\\${e}`,`g`))||[]).length)break;t=r;continue}if(M.has(e)){t=t.slice(0,-1);continue}break}return t},P=e=>{let t=N(e);return t=t.replace(`0.0.0.0`,`127.0.0.1`),t=t.replace(`[::1]`,`127.0.0.1`),t=t.replace(`[::]`,`127.0.0.1`),t},le=e=>{if(!e)return null;let t=e.replace(A,``),n=t.match(ce);if(n?.[1]){let e=Number.parseInt(n[1],10);if(Number.isFinite(e)&&e>0&&e<=65535)return`http://127.0.0.1:${e}/`}let r=t.split(`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t}from"./runtime-fetch-D0YWp3FJ.js";import{x as n}from"./desktop-JwYqThiw.js";import{at as r,it as i,rt as a}from"./vendor-base-ui-BQjbsJ43.js";import{c as o,l as s,n as c}from"./useUIStore-C6CE42oh.js";import{u as l}from"./fileQueries-BeXkd3o6.js";import{o as u}from"./terminalApi-rl9mZAlB.js";import{n as d,r as f,t as p}from"./vendor-ghostty-web-DbBrwBII.js";import{d as m,f as h,r as g,t as _}from"./button-Bjh2BSXh.js";import{p as v}from"./useMobileNavigationStore-DlvrZQ49.js";import{n as y}from"./useThemeSystem-CGF5jnIh.js";import{n as b}from"./Icon-CeRMtJa8.js";import{r as ee}from"./device-BcRP6Tjd.js";import{n as x}from"./useEffectiveDirectory-BOYMJ6k7.js";import{t as te}from"./OverlayScrollbar-AGSWQKg-.js";import{t as S}from"./sortable-tabs-strip-p16Pn6Zz.js";import{n as C,t as w}from"./useFontPreferences-DeqW9nRx.js";import{r as T}from"./projectActions-BX0cjZoq.js";var E=e(r(),1);function ne(e){let{colors:t}=e,n=t.syntax.base;return{background:t.surface.background,foreground:n.foreground,cursor:t.interactive.cursor,cursorAccent:t.surface.background,selectionBackground:t.interactive.selection,selectionForeground:t.interactive.selectionForeground,selectionInactiveBackground:t.interactive.selection+`50`,black:t.surface.muted,red:t.status.error,green:t.status.success,yellow:t.status.warning,blue:n.function,magenta:n.keyword,cyan:n.type,white:n.foreground,brightBlack:n.comment,brightRed:t.status.error,brightGreen:t.status.success,brightYellow:t.status.warning,brightBlue:n.function,brightMagenta:n.keyword,brightCyan:n.type,brightWhite:t.surface.elevatedForeground}}function re(e,t,n,r,i=!1){return{cursorBlink:!1,cursorStyle:`bar`,fontSize:t,lineHeight:1.15,fontFamily:`${e}, "JetBrainsMonoNL Nerd Font", "FiraCode Nerd Font", "Cascadia Code PL", "Fira Code", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace`,allowTransparency:!1,theme:{background:n.background,foreground:n.foreground,cursor:n.cursor,cursorAccent:n.cursorAccent,selectionBackground:n.selectionBackground,selectionForeground:n.selectionForeground,black:n.black,red:n.red,green:n.green,yellow:n.yellow,blue:n.blue,magenta:n.magenta,cyan:n.cyan,white:n.white,brightBlack:n.brightBlack,brightRed:n.brightRed,brightGreen:n.brightGreen,brightYellow:n.brightYellow,brightBlue:n.brightBlue,brightMagenta:n.brightMagenta,brightCyan:n.brightCyan,brightWhite:n.brightWhite},scrollback:1e4,ghostty:r,disableStdin:i}}var ie=e(a(),1),D=i(),O=null;function k(){return O||=f.load(),O}function ae(e){if(typeof window>`u`)return null;let t=[e,...Array.from(e.querySelectorAll(`*`))],n=null;for(let e of t){let t=window.getComputedStyle(e).overflowY;if(t===`auto`||t===`scroll`){if(e.scrollHeight-e.clientHeight>2)return e;n||=e}}return n}var oe=E.forwardRef(({sessionKey:e,chunks:t,onInput:n,onResize:r,theme:i,fontFamily:a,fontSize:o,className:s,enableTouchScroll:c,autoFocus:l=!0,isVisible:u=!0},f)=>{let{t:_}=h(),v=E.useRef(null),y=E.useRef(null),b=E.useRef(null),ee=E.useRef(null),x=E.useRef(n),S=E.useRef(r),C=E.useRef(null),w=E.useRef(``),T=E.useRef(null),ne=E.useRef(!1),O=E.useRef(null),oe=E.useRef(!0),A=E.useRef(null),j=E.useRef(null),se=E.useRef(0),ce=E.useRef(null),M=E.useRef(null),N=E.useRef(!1),P=E.useRef(!1),le=E.useRef(null),ue=E.useRef(null),de=E.useRef(null),F=E.useRef(``),fe=E.useRef(null),pe=E.useRef(!c),me=E.useRef(u),[,he]=E.useReducer(e=>e+1,0),[ge,_e]=E.useReducer(e=>e+1,0);x.current=n,S.current=r;let ve=typeof navigator<`u`&&(/Android/i.test(navigator.userAgent)||navigator.userAgentData?.platform===`Android`),I=!!c;E.useEffect(()=>{if(!c){pe.current=!0,me.current=u;return}!me.current&&u&&(pe.current=!1),me.current=u},[c,u]);let ye=E.useCallback(()=>{if(!I)return;let e=v.current,t=ce.current;if(!e)return;let n=[];e.getAttribute(`contenteditable`)===`true`&&n.push(e),n.push(...Array.from(e.querySelectorAll(`[contenteditable="true"]`))),n.forEach(e=>{e.setAttribute(`data-terminal-disabled-contenteditable`,`true`),e.setAttribute(`contenteditable`,`false`),e.setAttribute(`aria-hidden`,`true`),e.tabIndex=-1,e.style.setProperty(`caret-color`,`transparent`),e.style.color=`transparent`,e.style.setProperty(`-webkit-text-fill-color`,`transparent`),e.style.background=`transparent`,e.style.outline=`none`,e.style.boxShadow=`none`,e.style.textShadow=`none`,e.style.setProperty(`user-select`,`none`),e.style.setProperty(`-webkit-user-select`,`none`)}),e.tabIndex=-1,e.removeAttribute(`role`),e.removeAttribute(`aria-multiline`),Array.from(e.querySelectorAll(`textarea`)).forEach(e=>{e.style.setProperty(`caret-color`,`transparent`),e.style.color=`transparent`,e.style.setProperty(`-webkit-text-fill-color`,`transparent`),e.style.background=`transparent`,e.style.border=`0`,e.style.outline=`none`,e.style.boxShadow=`none`,e.style.textShadow=`none`,e.style.fontSize=`0`,e.style.lineHeight=`0`,e!==t&&e.getAttribute(`data-terminal-disabled-input`)!==`true`&&(e.setAttribute(`data-terminal-disabled-input`,`true`),e.setAttribute(`aria-hidden`,`true`),e.tabIndex=-1,e.disabled=!0,e.style.position=`absolute`,e.style.opacity=`0`,e.style.width=`0px`,e.style.height=`0px`,e.style.pointerEvents=`none`,e.style.zIndex=`-1`)})},[I]),L=E.useCallback(e=>{if(fe.current===e)return;let t=b.current;if(t)try{if(typeof t.setOption==`function`){t.setOption(`cursorBlink`,e),fe.current=e;return}t.options&&(t.options.cursorBlink=e,fe.current=e)}catch{}},[]),R=I&&ve,z=E.useCallback((e,t)=>{let n=R?M.current:ce.current,r=v.current;if(!n||!r)return;let i=r.getBoundingClientRect(),a=typeof window<`u`?window.innerWidth:i.width,o=typeof window<`u`?window.innerHeight:i.height,s=i.left+i.width/2,c=i.top+i.height-12,l=typeof e==`number`?e:s,u=typeof t==`number`?t:c,d=Math.max(8,Math.min(a-8,l)),f=Math.max(8,Math.min(o-8,u));n.style.left=`${d}px`,n.style.top=`${f}px`,n.style.bottom=``,(n instanceof HTMLTextAreaElement||n instanceof HTMLInputElement)&&(n.disabled=!1,n.readOnly=!1,n.removeAttribute(`disabled`),n.removeAttribute(`readonly`));try{n.focus({preventScroll:!0})}catch{try{n.focus()}catch{}}},[R]),B=E.useCallback(()=>{if(I){z(),L(!0);return}b.current?.focus(),L(!0)},[z,L,I]),V=E.useCallback(e=>e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement?e.value:e.textContent??``,[]),H=E.useCallback(e=>{if(e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement){e.value=``;return}e.textContent=``},[]),be=E.useCallback(e=>{if(typeof window>`u`||R)return;de.current!==null&&(window.clearTimeout(de.current),de.current=null);let t=0,n=()=>{de.current=window.setTimeout(()=>{de.current=null;let r=V(e);if(!r){if(t+=1,t<3){n();return}return}let i=F.current;F.current=r;let a=r.startsWith(i)?r.slice(i.length):r;a&&x.current(a.replace(/\r\n|\r|\n/g,`\r`)),H(e),F.current=``},t===0?0:24)};n()},[H,V,R]);E.useEffect(()=>{let e=v.current;if(!I||!e||c)return;let t=t=>{let n=t.target;if(n&&n.getAttribute(`data-terminal-hidden-input`)!==`true`&&e.contains(n)){try{n.blur()}catch{}z()}};return e.addEventListener(`focusin`,t,!0),()=>{e.removeEventListener(`focusin`,t,!0)}},[c,I,z]);let U=E.useCallback(()=>{let e=b.current;if(!e||typeof e.getSelection!=`function`)return``;let t=e.getSelection();return typeof t==`string`?t:``},[]),xe=E.useCallback(()=>{if(typeof window>`u`)return``;let e=window.getSelection();if(!e)return``;let t=e.toString();if(!t.trim())return``;let n=v.current;if(!n)return``;let r=e.anchorNode,i=e.focusNode;return r&&!n.contains(r)||i&&!n.contains(i)?``:t},[]),Se=E.useCallback(async()=>{if(typeof document>`u`)return;let e=U()||xe();e.trim()&&await m(e)},[xe,U]),Ce=E.useCallback(()=>U().trim()?!0:!!xe().trim(),[xe,U]);E.useEffect(()=>{if(typeof window>`u`)return;let e=e=>{Ce()&&(e.preventDefault(),Se())};return window.addEventListener(`yuri:copy`,e),()=>{window.removeEventListener(`yuri:copy`,e)}},[Se,Ce]);let W=E.useCallback(()=>{w.current=``,T.current!==null&&typeof window<`u`&&window.cancelAnimationFrame(T.current),T.current=null,ne.current=!1,O.current=null},[]),G=E.useCallback(()=>{let e=ee.current,t=b.current,n=v.current;if(!e||!t||!n)return;let r=n.getBoundingClientRect();if(!(r.width<24||r.height<24))try{e.fit();let n={cols:t.cols,rows:t.rows},r=C.current;(!r||r.cols!==n.cols||r.rows!==n.rows)&&(C.current=n,S.current(n.cols,n.rows))}catch{}},[]),K=E.useCallback(()=>{if(ne.current)return;let e=b.current;if(!e){W();return}if(!w.current)return;let t=w.current;w.current=``,ne.current=!0,e.write(t,()=>{ne.current=!1,w.current&&(typeof window<`u`?T.current=window.requestAnimationFrame(()=>{T.current=null,K()}):K())})},[W]),we=E.useCallback(()=>{T.current===null&&(typeof window<`u`?T.current=window.requestAnimationFrame(()=>{T.current=null,K()}):K())},[K]),q=E.useCallback(e=>{e&&(w.current+=e,we())},[we]),Te=E.useCallback(()=>{if(A.current?.(),A.current=null,j.current!==null&&typeof window<`u`&&(window.clearTimeout(j.current),j.current=null),!c){se.current=0;return}let e=v.current;if(!e)return;let t=b.current;if(!t)return;se.current=0;let n=2.2,r=2.8,i=.25,a=.05,s=.015,l={lastY:null,lastTime:null,velocity:0,rafId:null,startX:null,startY:null,didMove:!1},u=()=>typeof performance<`u`?performance.now():Date.now(),d=Math.max(12,Math.round(o*1.35)),f=0,p=e=>{if(!e)return!1;let n=t.getViewportY(),r=f+e,i=Math.trunc(r/d);return f=r-i*d,i!==0&&t.scrollLines(i),t.getViewportY()!==n},m=()=>{l.rafId!==null&&typeof window<`u`&&window.cancelAnimationFrame(l.rafId),l.rafId=null},h={passive:!1,capture:!1};if(typeof window<`u`&&`PointerEvent`in window){let t=Object.assign(l,{pointerId:null,startX:null,startY:null,moved:!1}),o=n=>{if(n.pointerType===`touch`){m(),t.pointerId=n.pointerId,t.startX=n.clientX,t.startY=n.clientY,t.moved=!1,t.lastY=n.clientY,t.lastTime=u(),t.velocity=0;try{e.setPointerCapture(n.pointerId)}catch{}}},d=e=>{if(e.pointerType!==`touch`||t.pointerId!==e.pointerId)return;if(t.startX!==null&&t.startY!==null&&!t.moved){let n=e.clientX-t.startX,r=e.clientY-t.startY;Math.hypot(n,r)>=6&&(t.moved=!0)}if(t.lastY===null){t.lastY=e.clientY,t.lastTime=u();return}let a=t.lastY,o=t.lastTime??u(),s=u();t.lastY=e.clientY,t.lastTime=s;let c=a-e.clientY;if(Math.abs(c)<1)return;let l=Math.max(s-o,8),d=c*(n+Math.min(r,Math.abs(c)/25)),f=d/l;t.velocity=t.velocity*.75+f*i,t.velocity>8?t.velocity=8:t.velocity<-8&&(t.velocity=-8),t.moved&&(e.cancelable&&e.preventDefault(),e.stopPropagation()),p(d)},f=n=>{if(n.pointerType!==`touch`||t.pointerId!==n.pointerId)return;let r=!t.moved;t.pointerId=null,t.startX=null,t.startY=null,t.moved=!1,t.lastY=null,t.lastTime=null;try{e.releasePointerCapture(n.pointerId)}catch{}if(r){I?z(n.clientX,n.clientY):c&&!pe.current&&(pe.current=!0,b.current?.focus());return}if(typeof window>`u`)return;if(Math.abs(t.velocity)<a){t.velocity=0;return}let i=u(),o=()=>{let e=u(),n=Math.max(e-i,8);i=e;let r=p(t.velocity*n)??!1,c=Math.sign(t.velocity),l=Math.max(0,Math.abs(t.velocity)-s*n);if(t.velocity=l*c,!r||l<=a){m(),t.velocity=0;return}t.rafId=window.requestAnimationFrame(o)};t.rafId=window.requestAnimationFrame(o)};e.addEventListener(`pointerdown`,o,h),e.addEventListener(`pointermove`,d,h),e.addEventListener(`pointerup`,f,h),e.addEventListener(`pointercancel`,f,h);let g=e.style.touchAction,_=e.style.overscrollBehaviorY;e.style.touchAction=`none`,e.style.overscrollBehaviorY=`contain`,A.current=()=>{m(),j.current!==null&&typeof window<`u`&&(window.clearTimeout(j.current),j.current=null),se.current=0,e.removeEventListener(`pointerdown`,o,h),e.removeEventListener(`pointermove`,d,h),e.removeEventListener(`pointerup`,f,h),e.removeEventListener(`pointercancel`,f,h),e.style.touchAction=g,e.style.overscrollBehaviorY=_};return}let g=e=>{e.touches.length===1&&(m(),l.lastY=e.touches[0].clientY,l.lastTime=u(),l.velocity=0,l.startX=e.touches[0].clientX,l.startY=e.touches[0].clientY,l.didMove=!1)},_=e=>{if(e.touches.length!==1){l.lastY=null,l.lastTime=null,l.velocity=0,l.startX=null,l.startY=null,l.didMove=!1,m();return}let t=e.touches[0].clientX,a=e.touches[0].clientY;if(l.startX!==null&&l.startY!==null&&!l.didMove){let e=t-l.startX,n=a-l.startY;Math.hypot(e,n)>=6&&(l.didMove=!0)}if(l.lastY===null){l.lastY=a,l.lastTime=u();return}let o=l.lastY,s=l.lastTime??u(),c=u();l.lastY=a,l.lastTime=c;let d=o-a;if(Math.abs(d)<1)return;let f=Math.max(c-s,8),h=d*(n+Math.min(r,Math.abs(d)/25)),g=h/f;l.velocity=l.velocity*.75+g*i,l.velocity>8?l.velocity=8:l.velocity<-8&&(l.velocity=-8),l.didMove&&(e.preventDefault(),e.stopPropagation()),p(h)},y=e=>{let t=!l.didMove;l.lastY=null,l.lastTime=null;let n=l.velocity;if(l.startX=null,l.startY=null,l.didMove=!1,t){let t=e.changedTouches?.[0];I?z(t?.clientX,t?.clientY):c&&!pe.current&&(pe.current=!0,b.current?.focus());return}if(typeof window>`u`)return;if(Math.abs(n)<a){l.velocity=0;return}let r=u(),i=()=>{let e=u(),t=Math.max(e-r,8);r=e;let n=p(l.velocity*t)??!1,o=Math.sign(l.velocity),c=Math.max(0,Math.abs(l.velocity)-s*t);if(l.velocity=c*o,!n||c<=a){m(),l.velocity=0;return}l.rafId=window.requestAnimationFrame(i)};l.rafId=window.requestAnimationFrame(i)};e.addEventListener(`touchstart`,g,h),e.addEventListener(`touchmove`,_,h),e.addEventListener(`touchend`,y,h),e.addEventListener(`touchcancel`,y,h);let ee=e.style.touchAction,x=e.style.overscrollBehaviorY;e.style.touchAction=`none`,e.style.overscrollBehaviorY=`contain`,A.current=()=>{m(),j.current!==null&&typeof window<`u`&&(window.clearTimeout(j.current),j.current=null),se.current=0,e.removeEventListener(`touchstart`,g,h),e.removeEventListener(`touchmove`,_,h),e.removeEventListener(`touchend`,y,h),e.removeEventListener(`touchcancel`,y,h),e.style.touchAction=ee,e.style.overscrollBehaviorY=x}},[c,I,z,o]);E.useEffect(()=>{let e=!1,t=null,n=null,r=null,s=[],l=null,u=null,f=null,m=v.current;if(!m)return;if(m.tabIndex=I?-1:0,I){let e=m.focus.bind(m),t=m;t.focus=((...e)=>{z()}),f=()=>{t.focus=e}}let h=()=>{L(!0)},g=()=>{L(!1)},_=e=>{let t=e.target;if(t&&m.contains(t)){if(I&&t instanceof HTMLElement){window.setTimeout(()=>{t.blur(),z()},0),L(!1);return}if(c&&!pe.current&&t instanceof HTMLElement){window.setTimeout(()=>{t.blur()},0),L(!1);return}L(!0);return}L(!1)},te=()=>{L(!1)},S=null;return(async()=>{try{let f=await k();if(e)return;let _=re(a,o,i,f,!1),v=new d(_);oe.current=!0,I&&(v.focus=()=>{});let te=v;if(typeof te.scrollToBottom==`function`){let e=te.scrollToBottom.bind(te);te.scrollToBottom=()=>{oe.current&&e()},l=()=>{te.scrollToBottom=e}}let C=new p;if(t=v,b.current=v,ee.current=C,v.loadAddon(C),v.open(m),c){let e=v.renderer;if(e&&typeof e.renderScrollbar==`function`){let t=e.renderScrollbar.bind(e);e.renderScrollbar=()=>{},u=()=>{e.renderScrollbar=t}}}_e(),fe.current=!1,S=v.textarea??m.querySelector(`textarea`),S&&(S.addEventListener(`focus`,h),S.addEventListener(`blur`,g)),ye(),typeof MutationObserver<`u`&&(r=new MutationObserver(()=>{ye()}),r.observe(m,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`contenteditable`,`role`,`tabindex`,`aria-label`]}));let w=ae(m);w?(w.classList.add(`overlay-scrollbar-target`,`overlay-scrollbar-container`),y.current=w,he()):y.current=null,G();let T=C;typeof T.observeResize==`function`&&T.observeResize(),Te(),s=[v.onData(e=>{x.current(e)}),v.onScroll(e=>{if(typeof e==`number`&&Number.isFinite(e)){let t=typeof v.hasSelection==`function`&&v.hasSelection();oe.current=!t&&e<=.5}}),v.onSelectionChange(()=>{if(typeof v.hasSelection==`function`&&v.hasSelection()){oe.current=!1;return}let e=typeof v.getViewportY==`function`?v.getViewportY():0;oe.current=e<=.5})],n=new ResizeObserver(()=>{G()}),n.observe(m),typeof window<`u`&&window.setTimeout(()=>{G()},0)}catch{}})(),document.addEventListener(`focusin`,_,!0),window.addEventListener(`blur`,te),()=>{e=!0,A.current?.(),A.current=null,document.removeEventListener(`focusin`,_,!0),window.removeEventListener(`blur`,te),s.forEach(e=>e.dispose()),l?.(),l=null,u?.(),u=null,S&&(S.removeEventListener(`focus`,h),S.removeEventListener(`blur`,g)),n?.disconnect(),r?.disconnect(),f?.(),t?.dispose(),b.current=null,ee.current=null,y.current=null,C.current=null,fe.current=null,W()}},[ye,c,G,z,a,o,Te,i,W,L,I]),E.useEffect(()=>{let e=b.current;e&&(e.reset(),W(),C.current=null,G())},[e,ge,G,W]),E.useEffect(()=>{l&&b.current&&B()},[l,B,e,ge]),E.useEffect(()=>(Te(),()=>{A.current?.(),A.current=null}),[Te,e]),E.useEffect(()=>{let e=b.current;if(!e)return;if(t.length===0){O.current!==null&&(e.reset(),W(),G());return}let n=O.current,r;if(n===null)r=t;else{let e=t.findIndex(e=>e.id===n);r=e>=0?t.slice(e+1):t}r.length>0&&q(r.map(e=>e.data).join(``)),O.current=t[t.length-1].id},[t,ge,q,G,W]),E.useImperativeHandle(f,()=>({focus:()=>{B()},clear:()=>{let e=b.current;e&&(e.reset(),W(),G())},fit:()=>{G()}}),[B,G,W]);let J=E.useCallback(e=>{if(!I)return;let t=v.current,n=e.relatedTarget,r=n?.tagName;r===`INPUT`||r===`TEXTAREA`||n?.isContentEditable,n?.getAttribute(`data-terminal-hidden-input`),n&&t?.contains(n)},[I]),Y=E.useCallback(e=>{let t=e.nativeEvent,n=t?.inputType??``,r=typeof t?.data==`string`?t.data:``;if(ue.current=typeof performance<`u`?performance.now():Date.now(),n===`insertCompositionText`){N.current=!0;return}if(!n&&r){if(N.current)return;e.preventDefault(),x.current(r),le.current={type:`insertText`,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0;return}if(n===`insertText`&&r){if(N.current)return;e.preventDefault(),x.current(r),le.current={type:n,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0;return}if(n===`insertLineBreak`){if(N.current)return;e.preventDefault(),x.current(`\r`),le.current={type:n,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0;return}if(n===`deleteContentBackward`){if(N.current)return;e.preventDefault(),x.current(``),le.current={type:n,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0}},[]),X=E.useCallback(e=>{let t=e.currentTarget;if(ue.current=typeof performance<`u`?performance.now():Date.now(),N.current)return;if(P.current){let e=le.current,n=typeof performance<`u`?performance.now():Date.now();if(e&&n-e.at<50){P.current=!1,H(t);return}P.current=!1}let n=V(t);if(!n)return;F.current=n;let r=n.replace(/\r\n|\r|\n/g,`\r`);x.current(r),H(t),F.current=``},[H,V]),Ee=E.useCallback(e=>{e.stopPropagation();let t=e.key.toLowerCase(),n=e.metaKey&&!e.ctrlKey&&!e.altKey&&t===`c`,r=e.ctrlKey&&e.shiftKey&&!e.metaKey&&!e.altKey&&t===`c`;if((n||r)&&Ce()){e.preventDefault(),Se();return}if(e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1){let t=e.key.toUpperCase();if(t>=`A`&&t<=`Z`){e.preventDefault(),e.nativeEvent?.stopImmediatePropagation(),x.current(String.fromCharCode(t.charCodeAt(0)-64)),H(e.currentTarget);return}}if(e.altKey&&!e.ctrlKey&&!e.metaKey&&e.key.length===1){e.preventDefault(),e.nativeEvent?.stopImmediatePropagation(),x.current(`\x1B`+e.key),H(e.currentTarget);return}let i={ArrowUp:`\x1B[A`,ArrowDown:`\x1B[B`,ArrowRight:`\x1B[C`,ArrowLeft:`\x1B[D`,Escape:`\x1B`,Tab:` `,Delete:`\x1B[3~`,Home:`\x1B[H`,End:`\x1B[F`}[e.key];if(i){e.preventDefault(),x.current(i),H(e.currentTarget);return}let a=e.currentTarget;if(e.nativeEvent?.isComposing)return;let o=le.current,s=typeof performance<`u`?performance.now():Date.now(),c=!!(o&&s-o.at<50);if(e.key===`Enter`){if(c&&o?.type===`insertLineBreak`)return;e.preventDefault(),x.current(`\r`),H(a);return}if(e.key===`Backspace`){if(e.preventDefault(),c&&o?.type===`deleteContentBackward`)return;V(a)||x.current(``)}if(e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey){let t=ue.current;t&&s-t<50||(e.preventDefault(),x.current(e.key),P.current=!0,le.current={type:`keydown-text`,at:s})}be(a)},[H,Se,Ce,V,be]),De=E.useCallback(e=>{e.stopPropagation();let t=e.currentTarget;e.nativeEvent?.isComposing||be(t)},[be]),Oe=E.useCallback(e=>{let t=e.currentTarget;N.current=!1;let n=e.data||V(t);if(ue.current=typeof performance<`u`?performance.now():Date.now(),!n)return;let r=n.replace(/\r\n|\r|\n/g,`\r`);x.current(r),H(t),le.current={type:`compositionend`,at:typeof performance<`u`?performance.now():Date.now()},P.current=!0},[H,V]),ke=E.useCallback(e=>{e.stopPropagation();let t=e.clipboardData?.getData(`text`)??``;if(!t)return;e.preventDefault();let n=b.current?.hasBracketedPaste?.()?`\x1b[200~${t}\x1b[201~`:t;x.current(n)},[]),Ae={position:`fixed`,left:0,top:0,width:1,height:1,opacity:0,zIndex:-1,background:`transparent`,color:`transparent`,WebkitTextFillColor:`transparent`,caretColor:`transparent`,textShadow:`none`,WebkitAppearance:`none`,appearance:`none`,resize:`none`,overflow:`hidden`,whiteSpace:`nowrap`,border:`0`,padding:0,margin:0,outline:`none`,outlineOffset:0,fontSize:16,fontWeight:400,pointerEvents:`none`,WebkitUserSelect:`none`,userSelect:`none`};return(0,D.jsxs)(`div`,{ref:v,className:g(`relative h-full w-full terminal-viewport-container`,s),"data-hidden-input-overlay-active":I?`true`:void 0,style:{backgroundColor:i.background},onTouchStart:e=>{if(!(!I||c)&&!Ce()){let t=e.touches?.[0];z(t?.clientX,t?.clientY)}},onClick:e=>{if(!c)if(I){if(Ce())return;z(e.clientX,e.clientY)}else b.current?.focus()},onMouseUp:()=>{!c&&Ce()&&Se()},onTouchEnd:()=>{!c&&Ce()&&Se()},children:[I&&typeof document<`u`?(0,ie.createPortal)((0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`input`,{ref:M,type:`text`,inputMode:`text`,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,tabIndex:-1,enterKeyHint:`send`,"data-terminal-hidden-input":`true`,"aria-label":_(`terminalView.viewport.inputAria`),"aria-hidden":`true`,style:{...Ae,display:R?`block`:`none`},onBlur:J,onBeforeInput:Y,onCompositionStart:()=>{N.current=!0},onInput:X,onKeyDown:Ee,onKeyUp:De,onCompositionEnd:Oe,onPaste:ke}),(0,D.jsx)(`textarea`,{ref:ce,inputMode:`text`,autoCapitalize:`off`,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,tabIndex:-1,enterKeyHint:`send`,"data-terminal-hidden-input":`true`,"aria-label":_(`terminalView.viewport.inputAria`),"aria-hidden":`true`,style:{...Ae,display:R?`none`:`block`},onBlur:J,onBeforeInput:Y,onCompositionStart:()=>{N.current=!0},onInput:X,onKeyDown:Ee,onKeyUp:De,onCompositionEnd:Oe,onPaste:ke})]}),document.body):null,y.current&&!c?(0,D.jsx)(te,{containerRef:y,disableHorizontal:!0,className:`overlay-scrollbar--flush overlay-scrollbar--dense overlay-scrollbar--zero`}):null]})});oe.displayName=`TerminalViewport`;var A=RegExp(`\x1B\\[[0-9;?]*[ -/]*[@-~]`,`g`),j=/(https?:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0|\[(?:::1|::)\])(?::\d{2,5})?(?:\/[^\s<>'"`]*)?)/gi,se=/(?:➜\s*(?:Local|Network):)|\b(?:local|network|loopback|serving|listening|available|ready|started|running|server|vite|webpack|next\.js|astro|sveltekit|nuxt)\b/i,ce=/Serving HTTP on .*? port (\d{2,5})/i,M=new Set([`.`,`,`,`;`,`:`,`!`,`?`]),N=e=>{let t=e;for(;t.length>0;){let e=t[t.length-1];if(e===`)`||e===`]`||e===`}`||e===`>`){let n=e===`)`?`(`:e===`]`?`[`:e===`}`?`{`:`<`,r=t.slice(0,-1);if((r.match(RegExp(`\\${n}`,`g`))||[]).length>(r.match(RegExp(`\\${e}`,`g`))||[]).length)break;t=r;continue}if(M.has(e)){t=t.slice(0,-1);continue}break}return t},P=e=>{let t=N(e);return t=t.replace(`0.0.0.0`,`127.0.0.1`),t=t.replace(`[::1]`,`127.0.0.1`),t=t.replace(`[::]`,`127.0.0.1`),t},le=e=>{if(!e)return null;let t=e.replace(A,``),n=t.match(ce);if(n?.[1]){let e=Number.parseInt(n[1],10);if(Number.isFinite(e)&&e>0&&e<=65535)return`http://127.0.0.1:${e}/`}let r=t.split(`
2
2
  `);for(let e of r){if(!se.test(e))continue;let t=Array.from(e.matchAll(j));if(t.length!==0)return P((t.find(e=>{try{return!!new URL(P(e[1])).port}catch{return!1}})??t[0])[1])}return null},ue=async(e,n=1500)=>{if(!e||typeof window>`u`)return!1;let r;try{r=new URL(e)}catch{return!1}if(r.protocol!==`http:`&&r.protocol!==`https:`)return!1;let i=r.hostname.toLowerCase();if(i!==`localhost`&&i!==`127.0.0.1`&&i!==`0.0.0.0`&&i!==`::1`&&i!==`::`)return!1;let a=new AbortController,o=window.setTimeout(()=>a.abort(),n);try{let e=await t(`/api/system/probe-url`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:r.toString()}),cache:`no-store`,signal:a.signal});return e.ok?(await e.json().catch(()=>null))?.ok===!0:!1}catch{return!1}finally{window.clearTimeout(o)}},de={esc:`\x1B`,tab:` `,enter:`\r`,"arrow-up":`\x1B[A`,"arrow-down":`\x1B[B`,"arrow-left":`\x1B[D`,"arrow-right":`\x1B[C`},F={ctrl:`5`,cmd:`3`},fe={retry:{maxRetries:3,initialDelayMs:500,maxDelayMs:8e3},connectionTimeoutMs:1e4},pe={retry:{maxRetries:8,initialDelayMs:400,maxDelayMs:8e3},connectionTimeoutMs:15e3},me=(e,t)=>{if(t)switch(e){case`arrow-up`:return`\u001b[1;${F[t]}A`;case`arrow-down`:return`\u001b[1;${F[t]}B`;case`arrow-right`:return`\u001b[1;${F[t]}C`;case`arrow-left`:return`\u001b[1;${F[t]}D`}return de[e]??null},he=()=>{let{t:e}=h(),{terminal:t,runtime:r}=l(),{currentTheme:i}=y(),{monoFont:a}=w(),d=c(e=>e.terminalFontSize),f=c(e=>e.bottomTerminalHeight),p=c(e=>e.isBottomTerminalExpanded),{isMobile:m,isTablet:te,hasTouchOnlyPointer:re}=ee(),ie=m||te,O=(ie||re)&&r.platform===`web`,k=r.platform!==`vscode`,ae=c(e=>e.showTerminalQuickKeysOnDesktop),A=!n()&&(ie||ae),j=v(e=>e.currentSessionId),se=v(e=>e.newSessionDraft),ce=j!==null||se?.open===!0,M=x()??null,N=C(e=>e.sessions),P=C(e=>e.hasHydrated),de=C(e=>e.ensureDirectory),F=C(e=>e.createTab),he=C(e=>e.setActiveTab),ge=C(e=>e.closeTab),_e=C(e=>e.setTabSessionId),ve=C(e=>e.setTabLifecycle),I=C(e=>e.setConnecting),ye=C(e=>e.appendToBuffer),L=C(e=>e.setTabPreviewUrl),R=C(e=>e.clearBuffer),z=c(e=>e.openContextPreview),B=E.useMemo(()=>{if(M)return N.get(M)},[N,M]),V=E.useMemo(()=>B?k?B.activeTabId??B.tabs[0]?.id??null:B.tabs[0]?.id??null:null,[B,k]),H=E.useMemo(()=>{if(B)return V?B.tabs.find(e=>e.id===V)??B.tabs[0]:B.tabs[0]},[B,V]),be=E.useMemo(()=>(B?.tabs??[]).map(t=>({icon:(()=>{let e=t.iconKey?T[t.iconKey]??`terminal`:`terminal`;return(0,D.jsx)(b,{name:e,className:`h-4 w-4`})})(),id:t.id,label:t.label,title:t.label,closeLabel:e(`terminalView.tabs.closeTabTitle`)})),[B?.tabs,e]),U=H?.terminalSessionId??null,xe=H?.lifecycle??`idle`,Se=H?.bufferChunks??[],Ce=H?.isConnecting??!1,W=H?.previewUrl??null,[G,K]=E.useState(null),[we,q]=E.useState(!1),[Te,J]=E.useState(!1),[Y,X]=E.useState(null),[Ee,De]=E.useState(!1),[Oe,ke]=E.useState(0),Ae=E.useRef(null),je=E.useRef(null),Me=E.useRef(V),Ne=E.useRef(U),Pe=E.useRef(M),Fe=E.useRef(null),Ie=E.useRef(null),Le=E.useRef(!1),Re=E.useRef(!1),ze=E.useRef(null),Be=E.useRef(null),Ve=E.useRef(new Set),He=E.useRef(!1),Ue=E.useRef(``),We=E.useRef(new Set),Ge=E.useRef(0),Ke=E.useCallback(()=>{Ue.current=``,We.current.clear(),Ge.current+=1},[]),qe=E.useCallback(()=>{O||typeof document<`u`&&!document.hasFocus()||Fe.current?.focus()},[O]),Je=E.useCallback(()=>{O||Fe.current?.focus()},[O]);E.useEffect(()=>{if(!P||He.current)return;He.current=!0;let e=new Set;for(let[,t]of C.getState().sessions.entries())for(let n of t.tabs)n.terminalSessionId&&e.add(n.terminalSessionId);Ve.current=e},[P]);let Ye=c(e=>e.activeMainTab),Xe=c(e=>e.isBottomTerminalOpen),Ze=c(e=>e.setBottomTerminalOpen),Qe=c(e=>e.setBottomTerminalExpanded),$e=Ye===`terminal`,Z=$e||Xe,[et,tt]=E.useState(Z);E.useEffect(()=>{!Z||r.platform===`vscode`||u()},[Z,r.platform]),E.useEffect(()=>{Z&&tt(!0)},[Z]),E.useEffect(()=>{Re.current=Z},[Z]),E.useEffect(()=>{Ne.current=U},[U]),E.useEffect(()=>{Me.current=V,Ke()},[V,Ke]),E.useEffect(()=>{Pe.current=M},[M]),E.useEffect(()=>{!A&&Y!==null&&X(null)},[A,Y,X]),E.useEffect(()=>{!U&&Y!==null&&X(null)},[U,Y,X]);let Q=E.useCallback(()=>{Ae.current?.(),Ae.current=null,je.current=null,ze.current=null,J(!1)},[]);E.useEffect(()=>()=>{Q(),Ne.current=null},[Q]);let nt=E.useCallback((e,t,n)=>{if(!n)return;let r=`${Ue.current}${n}`.replace(/\r\n|\r/g,`
3
3
  `),i=r.split(`
4
4
  `),a=r.endsWith(`
@@ -1,4 +1,4 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{_ as t,t as n,v as r,w as i}from"./runtime-auth-DBn9yahL.js";import{c as a,i as o}from"./runtime-switch-DEZ1K7qW.js";import{n as s}from"./runtime-fetch-D0YWp3FJ.js";import{w as c}from"./desktop-JwYqThiw.js";import{t as l}from"./runtimeAPIRegistry-C2VogTny.js";import{at as u,it as d,rt as f}from"./vendor-base-ui-BQjbsJ43.js";import{_ as p}from"./useUIStore-C6CE42oh.js";import{n as m}from"./vendor-react-D5d-V1vN.js";import{s as h}from"./vendor-tanstack-react-query-C4SG3JZB.js";import{c as g,f as _,o as v,s as y}from"./runtime-file-resource-UJjHUF2C.js";import{a as b,n as x}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as S,t as C}from"./runtime-file-download-Cf1WxfeW.js";import{n as w}from"./platform-DFJEtBlo.js";import{a as T,i as E}from"./vendor-pierre-diffs-Bj9Nqn6w.js";import{r as D}from"./vendor-reactuses-core-BcebBLwF.js";import{f as O,r as k,t as A}from"./button-BXxwtxsG.js";import{n as j,t as ee}from"./useThemeSystem-CGF5jnIh.js";import{l as te,o as ne,s as M,u as N}from"./vendor-framer-motion-C1twy-GF.js";import{n as P}from"./Icon-BE4mEwzV.js";import{n as F,t as I}from"./dialog-CLca6ojn.js";import{t as L}from"./tap-LkQum5bB.js";import{a as R,c as z,d as B,i as V,o as re}from"./image-loading-D5UhMj7Z.js";import{t as ie}from"./MobileWindowStack-DGLdgoGr.js";import{t as ae}from"./appThemeRegistry-B6woJIX5.js";import{a as oe,n as H}from"./MarkdownRenderer-BaMotAOQ.js";import{a as se}from"./toolHelpers-iEHVHQ9p.js";import{n as ce}from"./useEffectiveDirectory-CNCQfN_x.js";import{t as le}from"./ImageLoadingPlaceholder-CBFJC_KD.js";import{c as ue,d as de,f as fe,h as U,l as pe,m as me,n as W,o as G,p as K,t as he,u as ge,y as _e}from"./useWorkerHighlightedLines-CN_RGaSw.js";import{t as q}from"./vendor-tanstack-react-virtual-BeZn51tF.js";import{n as J}from"./markdownTheme-hpURsgju.js";import{n as ve}from"./mobileBackNavigation-BJqt3oHk.js";import{t as ye}from"./touch-gestures-K2_ZOkKW.js";var Y=m(),X=e(u(),1),Z=d(),be=80,xe=20,Se=X.memo(e=>{let t=(0,Y.c)(26),{lines:n,language:r,maxHeight:i,showLineNumbers:a,lineStyles:o}=e,s=i===void 0?`60vh`:i,c=a===void 0||a,{currentTheme:l}=j(),u;t[0]===l?u=t[1]:(u=J(l),t[0]=l,t[1]=u);let d=u,f;t[2]===n?f=t[3]:(f=n.map(Te).join(`
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{_ as t,t as n,v as r,w as i}from"./runtime-auth-DBn9yahL.js";import{c as a,i as o}from"./runtime-switch-DEZ1K7qW.js";import{n as s}from"./runtime-fetch-D0YWp3FJ.js";import{w as c}from"./desktop-JwYqThiw.js";import{t as l}from"./runtimeAPIRegistry-C2VogTny.js";import{at as u,it as d,rt as f}from"./vendor-base-ui-BQjbsJ43.js";import{_ as p}from"./useUIStore-C6CE42oh.js";import{n as m}from"./vendor-react-D5d-V1vN.js";import{s as h}from"./vendor-tanstack-react-query-C4SG3JZB.js";import{c as g,f as _,o as v,s as y}from"./runtime-file-resource-UJjHUF2C.js";import{a as b,n as x}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as S,t as C}from"./runtime-file-download-Cf1WxfeW.js";import{n as w}from"./platform-DFJEtBlo.js";import{a as T,i as E}from"./vendor-pierre-diffs-Bj9Nqn6w.js";import{r as D}from"./vendor-reactuses-core-BcebBLwF.js";import{f as O,r as k,t as A}from"./button-Bjh2BSXh.js";import{n as j,t as ee}from"./useThemeSystem-CGF5jnIh.js";import{l as te,o as ne,s as M,u as N}from"./vendor-framer-motion-C1twy-GF.js";import{n as P}from"./Icon-CeRMtJa8.js";import{n as F,t as I}from"./dialog-nshKUSE5.js";import{t as L}from"./tap-LkQum5bB.js";import{a as R,c as z,d as B,i as V,o as re}from"./image-loading-D6kOgU4w.js";import{t as ie}from"./MobileWindowStack-DGLdgoGr.js";import{t as ae}from"./appThemeRegistry-9j-rCSlE.js";import{a as oe,n as H}from"./MarkdownRenderer-C8rv6z7p.js";import{a as se}from"./toolHelpers-iEHVHQ9p.js";import{n as ce}from"./useEffectiveDirectory-BOYMJ6k7.js";import{t as le}from"./ImageLoadingPlaceholder-DjLaKB4o.js";import{c as ue,d as de,f as fe,h as U,l as pe,m as me,n as W,o as G,p as K,t as he,u as ge,y as _e}from"./useWorkerHighlightedLines-EcJThS4x.js";import{t as q}from"./vendor-tanstack-react-virtual-BeZn51tF.js";import{n as J}from"./markdownTheme-hpURsgju.js";import{n as ve}from"./mobileBackNavigation-CgZndzFA.js";import{t as ye}from"./touch-gestures-K2_ZOkKW.js";var Y=m(),X=e(u(),1),Z=d(),be=80,xe=20,Se=X.memo(e=>{let t=(0,Y.c)(26),{lines:n,language:r,maxHeight:i,showLineNumbers:a,lineStyles:o}=e,s=i===void 0?`60vh`:i,c=a===void 0||a,{currentTheme:l}=j(),u;t[0]===l?u=t[1]:(u=J(l),t[0]=l,t[1]=u);let d=u,f;t[2]===n?f=t[3]:(f=n.map(Te).join(`
2
2
  `),t[2]=n,t[3]=f);let p=he(f,r);if(!(n.length>be)){let e=d,r;t[4]!==s||t[5]!==e?(r={...e,maxHeight:s,overflow:`auto`},t[4]=s,t[5]=e,t[6]=r):r=t[6];let i;if(t[7]!==p||t[8]!==o||t[9]!==n||t[10]!==c){let e;t[12]!==p||t[13]!==o||t[14]!==c?(e=(e,t)=>(0,Z.jsx)(we,{line:e,html:p?.[t],showLineNumbers:c,style:o?.(e)},t),t[12]=p,t[13]=o,t[14]=c,t[15]=e):e=t[15],i=n.map(e),t[7]=p,t[8]=o,t[9]=n,t[10]=c,t[11]=i}else i=t[11];let a;return t[16]!==r||t[17]!==i?(a=(0,Z.jsx)(`div`,{className:`typography-code font-mono w-full min-w-0`,style:r,children:i}),t[16]=r,t[17]=i,t[18]=a):a=t[18],a}let m;return t[19]!==p||t[20]!==o||t[21]!==n||t[22]!==s||t[23]!==c||t[24]!==d?(m=(0,Z.jsx)(Ce,{lines:n,highlighted:p,syntaxVars:d,maxHeight:s,showLineNumbers:c,lineStyles:o}),t[19]=p,t[20]=o,t[21]=n,t[22]=s,t[23]=c,t[24]=d,t[25]=m):m=t[25],m});Se.displayName=`VirtualizedCodeBlock`;var Ce=X.memo(({lines:e,highlighted:t,syntaxVars:n,maxHeight:r,showLineNumbers:i,lineStyles:a})=>{let o=X.useRef(null),s=`min(${e.length*xe}px, ${r})`,c=q({count:e.length,getScrollElement:()=>o.current,estimateSize:()=>xe,overscan:20}),l=c.getVirtualItems();return(0,Z.jsx)(`div`,{ref:o,className:`typography-code font-mono w-full min-w-0`,style:{...n,height:s,maxHeight:r,overflow:`auto`},children:(0,Z.jsx)(`div`,{style:{height:c.getTotalSize(),position:`relative`},children:l.map(n=>{let r=e[n.index];return r?(0,Z.jsx)(`div`,{"data-index":n.index,ref:c.measureElement,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${n.start}px)`},children:(0,Z.jsx)(we,{line:r,html:t?.[n.index],showLineNumbers:i,style:a?.(r)})},n.index):null})})})});Ce.displayName=`VirtualizedRows`;var we=X.memo(e=>{let t=(0,Y.c)(12),{line:n,html:r,showLineNumbers:i,style:a}=e,o;t[0]!==n.isInfo||t[1]!==n.lineNumber||t[2]!==i?(o=i&&(0,Z.jsx)(`span`,{className:`w-10 flex-shrink-0 text-right pr-3 select-none border-r mr-3 -my-0.5 py-0.5`,style:{color:`var(--tools-edit-line-number)`,borderColor:`var(--tools-border)`},children:!n.isInfo&&n.lineNumber!=null?n.lineNumber:``}),t[0]=n.isInfo,t[1]=n.lineNumber,t[2]=i,t[3]=o):o=t[3];let s;t[4]!==r||t[5]!==n.isInfo||t[6]!==n.text?(s=(0,Z.jsx)(`div`,{className:`flex-1 min-w-0`,children:n.isInfo?(0,Z.jsx)(`div`,{className:`whitespace-pre-wrap break-words text-muted-foreground/70 italic`,children:n.text}):r===void 0?(0,Z.jsx)(`div`,{className:`whitespace-pre`,children:n.text}):(0,Z.jsx)(`div`,{className:`whitespace-pre`,dangerouslySetInnerHTML:{__html:r}})}),t[4]=r,t[5]=n.isInfo,t[6]=n.text,t[7]=s):s=t[7];let c;return t[8]!==a||t[9]!==o||t[10]!==s?(c=(0,Z.jsxs)(`div`,{className:`typography-code font-mono flex w-full min-w-0`,style:a,children:[o,s]}),t[8]=a,t[9]=o,t[10]=s,t[11]=c):c=t[11],c});we.displayName=`VirtualizedCodeBlock.Row`;function Te(e){return e.text}var Ee={maxDepth:50,maxNodes:1e5,initiallyExpandedDepth:2};function De(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e==`object`?`object`:typeof e==`string`?`string`:typeof e==`number`?`number`:typeof e==`boolean`?`boolean`:`null`}function Oe(e){if(e.length===0)return`root`;let t=`root`;for(let n of e)/^\d+$/.test(n)?t+=`[${n}]`:t+=`.${n}`;return t}var ke=0;function Ae(e,t,n,r,i){if(ke>=i.maxNodes)return null;ke++;let a=De(e),o=Oe(n),s=a===`object`||a===`array`,c={id:o,key:t,value:e,type:a,depth:r,path:n,isExpandable:s};if(s&&r<i.maxDepth){let t=a===`array`?e.map((e,t)=>[String(t),e]):Object.entries(e);c.childCount=t.length,c.children=[];for(let[e,a]of t){let t=Ae(a,e,[...n,e],r+1,i);t&&c.children.push(t)}}else s&&(c.childCount=a===`array`?e.length:Object.keys(e).length);return c}function je(e,t){let n={...Ee,...t};ke=0;try{let t=e.trim();return t?Ae(JSON.parse(t),`root`,[],0,n):null}catch{return null}}function Me(e,t){if(!e)return[];let n=[];function r(e){let i=!t.has(e.id);if(n.push({node:e,isExpanded:i}),e.isExpandable&&i&&e.children)for(let t of e.children)r(t)}return r(e),n}function Ne(e){if(!e)return[];let t=[];function n(e){if(e.isExpandable&&(t.push(e.id),e.children))for(let t of e.children)n(t)}return n(e),t}function Pe(e,t){if(!e)return[];let n=[];function r(e){if(e.isExpandable&&e.depth>=t&&n.push(e.id),e.children)for(let t of e.children)r(t)}return r(e),n}var Fe=[`var(--syntax-key)`,`color-mix(in oklch, var(--syntax-key) 85%, var(--syntax-string))`,`color-mix(in oklch, var(--syntax-key) 70%, var(--syntax-number))`,`color-mix(in oklch, var(--syntax-key) 55%, var(--syntax-function))`,`color-mix(in oklch, var(--syntax-key) 40%, var(--syntax-type))`,`color-mix(in oklch, var(--syntax-key) 30%, var(--syntax-keyword))`];function Ie(e){return Fe[e%Fe.length]}function Le(e){switch(e.type){case`string`:return`var(--syntax-string)`;case`number`:return`var(--syntax-number)`;case`boolean`:return`var(--syntax-keyword)`;case`null`:return`var(--syntax-comment)`;default:return`var(--surface-foreground)`}}function Re(e){switch(e.type){case`string`:{let t=e.value;return t.length>60?`"${t.slice(0,57)}..."`:`"${t}"`}case`number`:case`boolean`:return String(e.value);case`null`:return`null`;case`object`:return`{${e.childCount??0} ${e.childCount===1?`item`:`items`}}`;case`array`:return`[${e.childCount??0}]`;default:return String(e.value)}}function ze(e){if(e.type===`object`){let t=e.children?.map(e=>e.key).slice(0,3)??[],n=(e.childCount??0)>3?`, ...`:``;return`{ ${t.map(e=>`"${e}": ...`).join(`, `)}${n} }`}if(e.type===`array`){let t=e.childCount??0;return t<=3?`[${e.children?.map(e=>Re(e)).join(`, `)??``}]`:`[${t} items]`}return Re(e)}var Be=X.memo(e=>{let t=(0,Y.c)(29),{flatNode:n,onToggle:r,onCopyPath:i}=e,{node:a,isExpanded:o}=n,s=a.depth*20,c;t[0]!==a.id||t[1]!==r?(c=()=>{r(a.id)},t[0]=a.id,t[1]=r,t[2]=c):c=t[2];let l=c,u;t[3]!==a.id||t[4]!==i?(u=e=>{i&&(e.preventDefault(),i(a.id))},t[3]=a.id,t[4]=i,t[5]=u):u=t[5];let d=u,f;t[6]===a.depth?f=t[7]:(f=Ie(a.depth),t[6]=a.depth,t[7]=f);let p=f,m;t[8]===a?m=t[9]:(m=Le(a),t[8]=a,t[9]=m);let h=m,g=a.isExpandable&&a.children&&a.children.length>0,_=`${s+8}px`,v;t[10]===_?v=t[11]:(v={paddingLeft:_},t[10]=_,t[11]=v);let y;t[12]!==l||t[13]!==g||t[14]!==o?(y=g?(0,Z.jsx)(`button`,{type:`button`,onClick:l,className:`mr-1 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm hover:bg-[var(--interactive-hover)] text-muted-foreground`,children:o?(0,Z.jsx)(P,{name:`arrow-down-s`,className:`h-3 w-3`}):(0,Z.jsx)(P,{name:`arrow-right-s`,className:`h-3 w-3`})}):(0,Z.jsx)(`span`,{className:`mr-1 w-4`}),t[12]=l,t[13]=g,t[14]=o,t[15]=y):y=t[15];let b;t[16]!==p||t[17]!==a.key?(b=a.key!==`root`&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`mr-1 font-semibold`,style:{color:p},children:/^\d+$/.test(a.key)?a.key:`"${a.key}"`}),(0,Z.jsx)(`span`,{className:`mr-1 text-[var(--surface-foreground)]`,children:`:`})]}),t[16]=p,t[17]=a.key,t[18]=b):b=t[18];let x;t[19]!==o||t[20]!==a||t[21]!==h?(x=a.isExpandable?o?(0,Z.jsx)(`span`,{className:`text-[var(--surface-foreground)]`,children:a.type===`object`?`{`:`[`}):(0,Z.jsx)(`span`,{style:{color:`var(--surface-mutedForeground)`},children:ze(a)}):(0,Z.jsx)(`span`,{style:{color:h},children:Re(a)}),t[19]=o,t[20]=a,t[21]=h,t[22]=x):x=t[22];let S;return t[23]!==d||t[24]!==v||t[25]!==y||t[26]!==b||t[27]!==x?(S=(0,Z.jsxs)(`div`,{className:`flex items-center py-0.5 px-2 hover:bg-[var(--surface-hover)] rounded-sm cursor-default font-mono text-xs leading-5 whitespace-nowrap`,style:v,onContextMenu:d,children:[y,b,x]}),t[23]=d,t[24]=v,t[25]=y,t[26]=b,t[27]=x,t[28]=S):S=t[28],S});Be.displayName=`JsonRow`;var Ve=200,He=22,Ue=X.forwardRef(function({data:e,className:t,maxHeight:n=`100%`,initiallyExpandedDepth:r=2,onCopyPath:i},a){let o=X.useMemo(()=>{try{return JSON.stringify(e)}catch{return null}},[e]),s=X.useMemo(()=>o?je(o):null,[o]),[c,l]=X.useState(()=>s?new Set(Pe(s,r)):new Set),u=X.useMemo(()=>Me(s,c),[s,c]),d=u.length>Ve,f=X.useRef(null),p=q({count:u.length,enabled:d,getScrollElement:()=>f.current,estimateSize:()=>He,overscan:20,getItemKey:e=>u[e]?.node.id??e}),m=X.useCallback(e=>{l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),h=X.useCallback(()=>{l(new Set)},[]),g=X.useCallback(()=>{s&&l(new Set(Ne(s)))},[s]);return X.useImperativeHandle(a,()=>({expandAll:h,collapseAll:g}),[h,g]),s?d?(0,Z.jsx)(`div`,{ref:f,className:t,style:{maxHeight:n,overflow:`auto`},children:(0,Z.jsx)(`div`,{style:{height:p.getTotalSize(),position:`relative`},children:p.getVirtualItems().map(e=>{let t=u[e.index];return t?(0,Z.jsx)(`div`,{"data-index":e.index,ref:p.measureElement,style:{position:`absolute`,top:0,left:0,width:`100%`,transform:`translateY(${e.start}px)`},children:(0,Z.jsx)(Be,{flatNode:t,onToggle:m,onCopyPath:i})},t.node.id):null})})}):(0,Z.jsx)(`div`,{ref:f,className:t,style:{maxHeight:n,overflow:`auto`},children:u.map(e=>(0,Z.jsx)(Be,{flatNode:e,onToggle:m,onCopyPath:i},e.node.id))}):null}),We=X.memo(function({jsonString:e,className:t,maxHeight:n=`100%`,initiallyExpandedDepth:r=2}){let{t:i}=O(),a=X.useRef(null),[o,s]=X.useState(null),c=X.useMemo(()=>{try{let t=e.trim();if(!t)return s(i(`jsonTreeView.error.emptyJson`)),null;let n=JSON.parse(t);return s(null),n}catch(e){return s(e instanceof Error?e.message:i(`jsonTreeView.error.invalidJson`)),null}},[e,i]),l=X.useCallback(()=>{a.current?.expandAll()},[]),u=X.useCallback(()=>{a.current?.collapseAll()},[]);return o?(0,Z.jsx)(`div`,{className:t,children:(0,Z.jsxs)(`div`,{className:`rounded-md border border-[var(--interactive-border)] bg-[var(--syntax-base-background)] p-4`,children:[(0,Z.jsx)(`div`,{className:`mb-1 font-medium text-[var(--surface-foreground)]`,children:i(`jsonTreeView.error.invalidJsonTitle`)}),(0,Z.jsx)(`div`,{className:`font-mono text-xs text-[var(--surface-mutedForeground)]`,children:o})]})}):c===null?null:(0,Z.jsxs)(`div`,{className:t,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-1 border-b border-[var(--interactive-border)] px-2 py-1`,children:[(0,Z.jsxs)(A,{variant:`ghost`,size:`xs`,onClick:l,className:`gap-1 text-xs text-muted-foreground`,children:[(0,Z.jsx)(P,{name:`arrow-down-s`,className:`h-3 w-3`}),i(`jsonTreeView.actions.expandAll`)]}),(0,Z.jsxs)(A,{variant:`ghost`,size:`xs`,onClick:u,className:`gap-1 text-xs text-muted-foreground`,children:[(0,Z.jsx)(P,{name:`arrow-up-s`,className:`h-3 w-3`}),i(`jsonTreeView.actions.collapseAll`)]})]}),(0,Z.jsx)(`div`,{className:`bg-[var(--syntax-base-background)] py-1`,style:{maxHeight:n,overflow:`auto`},children:(0,Z.jsx)(Ue,{ref:a,data:c,maxHeight:n,initiallyExpandedDepth:r})})]})}),Ge=class extends Error{key;params;constructor(e,t){super(e),this.name=`MermaidLoadFailure`,this.key=e,this.params=t}},Ke=(e,t)=>new Ge(e,t),qe=e=>e instanceof Ge,Je=e=>e+1,Ye=(e,t)=>e===t,Xe=e=>{let t=e.indexOf(`,`);if(t<0)throw Ke(`chat.toolOutputDialog.mermaid.dataUrlMalformed`);let n=e.slice(0,t).toLowerCase(),r=e.slice(t+1);return n.includes(`;base64`)?atob(r):decodeURIComponent(r)},Ze=e=>Promise.resolve().then(()=>Xe(e)),Qe=1,$e=56,Q=(e,t,n)=>Math.min(n,Math.max(t,e)),et=({isMobile:e,pointerType:t,cancelled:n,moved:r,suppressTap:i,targetWasCanvas:a,start:o,end:s,startScale:c,hasMultipleImages:l})=>{if(n||i)return`none`;let u={x:s.x-o.x,y:s.y-o.y},d=Math.hypot(u.x,u.y),f=t!==`mouse`;if(e&&f&&c<=1.01&&Math.abs(u.x)>=$e&&Math.abs(u.x)>Math.abs(u.y)*1.2)return l?u.x<0?`next`:`previous`:`none`;let p=!r&&d<=10;return e&&f&&p||!e&&t===`mouse`&&p&&a?`close`:`none`},tt=(e,t)=>{if(e.width<=0||e.height<=0||t.width<=0||t.height<=0)return{width:1,height:1};let n=Math.min(t.width/e.width,t.height/e.height);return{width:Math.max(1,e.width*n),height:Math.max(1,e.height*n)}},nt=(e,t)=>{let n=t.minScale??Qe,r=t.maxScale??5,i=Q(e.scale,n,r),a=Math.max(0,(t.image.width*i-t.viewport.width)/2),o=Math.max(0,(t.image.height*i-t.viewport.height)/2);return{scale:i,x:Q(e.x,-a,a),y:Q(e.y,-o,o)}},rt=(e,t,n,r,i)=>{let a=Q(t,i.minScale??Qe,i.maxScale??5),o=a/e.scale;return nt({scale:a,x:n.x-r.x-(n.x-r.x-e.x)*o,y:n.y-r.y-(n.y-r.y-e.y)*o},i)},it=(e,t,n)=>nt({...e,x:e.x+t.x,y:e.y+t.y},n),at=.25,ot=32,st=(e,t)=>({scale:1-Math.min(.45,e/t*.65),opacity:Q(1-e/(t*.55),.15,1)}),ct=(e,t,n,r)=>n?t.y>ot?`y`:r&&Math.abs(t.x)>ot?`x`:null:Math.hypot(e.x,e.y)<=10?null:!r||e.y>0&&e.y>=Math.abs(e.x)*.6?`y`:Math.abs(e.x)>=Math.abs(e.y)?`x`:`y`,lt=(e,t,n,r,i)=>{let a=it(e,t,n),o={x:e.x+t.x-a.x,y:e.y+t.y-a.y},s=e.scale>1.01;r??=ct(t,o,s,i);let c=s?ot:0,l=r===`x`&&i?Math.sign(o.x)*Math.max(0,Math.abs(o.x)-c):0,u=r===`y`?Math.max(0,o.y-c):0,d=st(u,n.viewport.height);return{transform:a,axis:r,galleryX:Q(l,-n.viewport.width,n.viewport.width),dismissY:u,dismissX:u>0?t.x*at:0,dismissScale:d.scale,backdropOpacity:d.opacity}},ut=e=>{let t=e[e.length-1];if(!t)return{x:0,y:0};let n=e.find(e=>t.time-e.time<=100)??t,r=t.time-n.time;return r>0?{x:(t.x-n.x)/r,y:(t.y-n.y)/r}:{x:0,y:0}},dt=280,ft=(e,t)=>L(e,t),pt=(e,t,n)=>{let r=Math.abs(e.galleryX);return r>=Math.min(96,n.width*.22)||r>18&&Math.abs(t.x)>.55&&t.x*e.galleryX>0?e.galleryX<0?`next`:`previous`:e.dismissY>=Math.min(140,n.height*.18)||e.dismissY>48&&t.y>.65?`close`:`none`},mt=(e,t,n,r,i,a)=>{let o=Q(r,a.minScale??Qe,a.maxScale??5),s=o/e.scale;return nt({scale:o,x:n.x-i.x-(t.x-i.x-e.x)*s,y:n.y-i.y-(t.y-i.y-e.y)*s},a)};function ht(e){let t=(0,Y.c)(39),{url:n,directory:r,label:i,active:a,returnToSource:o,sourceElement:s,viewport:c,isMobile:l,position:u,onActiveImage:d}=e,{t:f}=O(),p=re(n,r,`preview`),m=p.source||s?.currentSrc||``,h=`${p.key}\n${m}`,g=X.useRef(null),[_,v]=X.useState(null),[y,b]=X.useState(null),x;t[0]!==_||t[1]!==h||t[2]!==s?(x=_?.key===h?_.size:s?.naturalWidth&&s.naturalHeight?{width:s.naturalWidth,height:s.naturalHeight}:null,t[0]=_,t[1]=h,t[2]=s,t[3]=x):x=t[3];let S=x,C=!!S,w=!!(p.error||y===h),T=S??c,E=Math.max(1,c.width*(l?1:.8)),D=Math.max(1,c.height*(l?1:.95)),k;t[4]!==T||t[5]!==E||t[6]!==D?(k=tt(T,{width:E,height:D}),t[4]=T,t[5]=E,t[6]=D,t[7]=k):k=t[7];let A=k,j,ee;t[8]!==a||t[9]!==w||t[10]!==C||t[11]!==S||t[12]!==d||t[13]!==p.key||t[14]!==m?(j=()=>{a&&d({element:g.current,source:m,resourceKey:p.key,naturalSize:S,loaded:C,error:w})},ee=[a,m,p.key,S,C,w,d],t[8]=a,t[9]=w,t[10]=C,t[11]=S,t[12]=d,t[13]=p.key,t[14]=m,t[15]=j,t[16]=ee):(j=t[15],ee=t[16]),X.useLayoutEffect(j,ee);let te=!a||void 0,ne=`translate3d(${u*(c.width+16)}px, 0, 0)`,M;t[17]===ne?M=t[18]:(M={transform:ne},t[17]=ne,t[18]=M);let N;t[19]!==a||t[20]!==w||t[21]!==C?(N=!C&&!w&&(0,Z.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,role:a?`status`:void 0,children:(0,Z.jsx)(le,{className:`aspect-square w-64 max-w-[80vw] rounded-xl`})}),t[19]=a,t[20]=w,t[21]=C,t[22]=N):N=t[22];let P;t[23]!==a||t[24]!==h||t[25]!==w||t[26]!==i||t[27]!==C||t[28]!==o||t[29]!==A||t[30]!==m||t[31]!==f?(P=w?(0,Z.jsx)(`p`,{role:a?`status`:void 0,className:`px-6 text-center typography-ui-label`,children:f(`filesView.error.readFileFailed`)}):(0,Z.jsx)(`img`,{ref:g,"data-preview-transition-target":a?``:void 0,"data-preview-return":o,src:m||void 0,alt:a?i:``,className:`block max-w-none touch-none object-contain will-change-transform ${a?`pointer-events-auto`:``} ${C?`opacity-100`:`opacity-0`}`,style:{width:`${A.width}px`,height:`${A.height}px`},loading:`eager`,draggable:!1,onLoad:e=>{let t=e.currentTarget;t.naturalWidth&&t.naturalHeight&&v({key:h,size:{width:t.naturalWidth,height:t.naturalHeight}})},onError:()=>b(h)}),t[23]=a,t[24]=h,t[25]=w,t[26]=i,t[27]=C,t[28]=o,t[29]=A,t[30]=m,t[31]=f,t[32]=P):P=t[32];let F;return t[33]!==u||t[34]!==M||t[35]!==N||t[36]!==P||t[37]!==te?(F=(0,Z.jsxs)(`div`,{"data-image-viewer-slide":u,"aria-hidden":te,className:`pointer-events-none absolute inset-0 flex items-center justify-center overflow-hidden`,style:M,children:[N,P]}),t[33]=u,t[34]=M,t[35]=N,t[36]=P,t[37]=te,t[38]=F):F=t[38],F}var gt=500,_t=24,vt=(e,t={})=>{let n=t.target??(typeof document>`u`?null:document);if(!n)return()=>{};let r=t.durationMs??gt,i=t.maxDistance??_t,a=!0,o,s=()=>{a&&(a=!1,n.removeEventListener(`click`,c,!0),o!==void 0&&globalThis.clearTimeout(o))},c=t=>{let n=t;typeof n.clientX==`number`&&typeof n.clientY==`number`&&(Math.hypot(n.clientX-e.x,n.clientY-e.y)>i||(s(),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()))};return n.addEventListener(`click`,c,!0),o=globalThis.setTimeout(s,r),s},yt=(e,t,n={})=>{vt(e,n),t()},bt=e(f(),1);function xt(e,t,n,r,i){let a=e instanceof HTMLImageElement?e:e.querySelector(`img`);if(!a||!t.complete||!t.naturalWidth||!t.animate)return;let o=t.getBoundingClientRect(),s=a.getBoundingClientRect();if(!o.width||!o.height||!s.width||!s.height)return;let c=getComputedStyle(a),l=t.naturalWidth/t.naturalHeight,u=c.objectFit===`cover`?Math.max(s.width,s.height*l):Math.min(s.width,s.height*l),d=u/l,f=c.objectPosition.split(` `);if(!f.every(e=>e.endsWith(`%`)))return;let p=(s.width-u)*parseFloat(f[0])/100,m=(s.height-d)*parseFloat(f[1]??f[0])/100,h=s.left,g=s.top,_=s.right,v=s.bottom,y=c.borderRadius;for(let e=a.parentElement;e;e=e.parentElement){let t=getComputedStyle(e),n=e.getBoundingClientRect();[`hidden`,`clip`,`auto`,`scroll`].includes(t.overflowX)&&(h=Math.max(h,n.left),_=Math.min(_,n.right)),[`hidden`,`clip`,`auto`,`scroll`].includes(t.overflowY)&&(g=Math.max(g,n.top),v=Math.min(v,n.bottom)),n.width===s.width&&n.height===s.height&&t.borderRadius!==`0px`&&(y=t.borderRadius)}if(_<=h||v<=g)return;let b=document.createElement(`div`);b.dataset.mediaCropAnimation=``,b.setAttribute(`aria-hidden`,`true`),Object.assign(b.style,{position:`fixed`,left:`0`,top:`0`,overflow:`hidden`,pointerEvents:`none`,zIndex:`51`,contain:`paint`});let x=document.createElement(`img`);x.src=t.currentSrc||t.src,x.alt=``,Object.assign(x.style,{display:`block`,width:`${o.width}px`,height:`${o.height}px`,maxWidth:`none`,transformOrigin:`0 0`}),b.append(x),document.body.append(b);let S={transform:`translate(${o.left}px, ${o.top}px)`,width:`${o.width}px`,height:`${o.height}px`,borderRadius:`0px`},C={transform:`translate(${h}px, ${g}px)`,width:`${_-h}px`,height:`${v-g}px`,borderRadius:y},w={transform:`translate(0px, 0px) scale(1)`},T={transform:`translate(${s.left+p-h}px, ${s.top+m-g}px) scale(${u/o.width})`},E={duration:280,easing:`cubic-bezier(0.2, 0, 0, 1)`,fill:`both`},D=t.style.visibility;t.style.visibility=`hidden`;let O=[b.animate(r?[S,C]:[C,S],E),x.animate(r?[w,T]:[T,w],E),n.animate({opacity:r?[1,0]:[0,1]},E)],k=!1,A=(e=!1)=>{b.remove(),t.style.visibility=D,O.forEach((t,n)=>{(!e||n!==2)&&t.cancel()})};return Promise.all(O.map(e=>e.finished)).then(()=>{k||(A(r),i())},()=>{k||(A(),i())}),()=>{k=!0,A()}}function St(e,t,n,r,i=()=>{}){let a=e?.getBoundingClientRect(),o=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;if(!o&&e?.isConnected&&t instanceof HTMLImageElement&&n&&a?.width&&a.height&&a.bottom>0&&a.top<window.innerHeight&&a.right>0&&a.left<window.innerWidth){let a=xt(e,t,n,r,i);if(a)return a}if(!document.startViewTransition||o||!e?.isConnected||!t||!n||!a?.width||!a.height||a.bottom<=0||a.top>=window.innerHeight||a.right<=0||a.left>=window.innerWidth){if(!n?.animate||o)return i(),()=>{};let e=n.animate({opacity:r?[1,0]:[0,1]},{duration:150,fill:`forwards`}),t=!1;return e.finished.then(()=>{t||i()},()=>{}),()=>{t=!0,e.cancel()}}let s=e.style.viewTransitionName,c=t.style.viewTransitionName,l=n.style.visibility,u=!1,d=`yuri-media-preview`;e.style.viewTransitionName=r?`none`:d,t.style.viewTransitionName=r?d:`none`,r||(n.style.visibility=`hidden`);let f=document.startViewTransition(()=>{u||(e.style.viewTransitionName=r?d:`none`,t.style.viewTransitionName=r?`none`:d,n.style.visibility=r?`hidden`:l)}),p=()=>{e.style.viewTransitionName=s,t.style.viewTransitionName=c,n.style.visibility=l};f.ready.catch(()=>{});let m=()=>{u||(p(),i())};return f.finished.then(m,m),()=>{u=!0,f.skipTransition(),p()}}function Ct(e){let t=(0,Y.c)(12),{onClose:n,isMobile:r,size:i}=e,{t:a}=O(),o;t[0]!==r||t[1]!==i?(o=r?{top:`calc(var(--yuri-safe-area-top, 0px) + 0.5rem)`,right:`calc(var(--yuri-safe-area-right, 0px) + 0.75rem)`}:{top:i?`calc(50% - ${i.height/2}px + 0.5rem)`:`0.5rem`,right:i?`calc(50% - ${i.width/2}px + 0.5rem)`:`0.5rem`},t[0]=r,t[1]=i,t[2]=o):o=t[2];let s;t[3]===a?s=t[4]:(s=a(`dialog.common.actions.close`),t[3]=a,t[4]=s);let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(P,{name:`close`,className:`size-5`}),t[5]=c):c=t[5];let l;t[6]!==n||t[7]!==s?(l=(0,Z.jsx)(A,{variant:`mobileGlass`,size:`mobileIcon`,"aria-label":s,onClick:n,children:c}),t[6]=n,t[7]=s,t[8]=l):l=t[8];let u;return t[9]!==o||t[10]!==l?(u=(0,Z.jsx)(`div`,{className:`absolute right-3 z-20`,style:o,children:l}),t[9]=o,t[10]=l,t[11]=u):u=t[11],u}function wt(e){let t=(0,Y.c)(9),{children:n,isMobile:r}=e,i;t[0]===r?i=t[1]:(i=r?{bottom:`calc(var(--yuri-safe-area-bottom, 0px) + 0.75rem)`,right:`calc(var(--yuri-safe-area-right, 0px) + 0.75rem)`}:{bottom:`1rem`,left:`1rem`},t[0]=r,t[1]=i);let a=r?`mobile`:`desktop`,o=`pointer-events-auto flex items-center text-[var(--yuri-media-preview-foreground)] ${r?`gap-1.5`:`gap-2`}`,s;t[2]!==n||t[3]!==a||t[4]!==o?(s=(0,Z.jsx)(`div`,{"data-media-preview-toolbar":a,className:o,onPointerDown:Et,onDoubleClick:Tt,children:n}),t[2]=n,t[3]=a,t[4]=o,t[5]=s):s=t[5];let c;return t[6]!==i||t[7]!==s?(c=(0,Z.jsx)(`div`,{className:`pointer-events-none absolute z-20`,style:i,children:s}),t[6]=i,t[7]=s,t[8]=c):c=t[8],c}function Tt(e){return e.stopPropagation()}function Et(e){return e.stopPropagation()}function Dt(e){let t=(0,Y.c)(30),{open:n,title:r,kind:i,source:a,isMobile:o,onOpenChange:s,children:c}=e,l=X.useRef(null),u=X.useId(),d=X.useRef(null),f=X.useRef(!1),[p,m]=X.useState(!1),h;t[0]!==s||t[1]!==a?(h=()=>{if(f.current)return;f.current=!0,l.current&&(l.current.dataset.mediaPreviewClosing=`true`),d.current?.();let e=l.current?.querySelector(`[data-preview-transition-target]`)??null;d.current=St(e?.dataset.previewReturn===`false`?void 0:a,e,l.current,!0,()=>{m(!0),s(!1)})},t[0]=s,t[1]=a,t[2]=h):h=t[2];let g=D(h),_=`${i}-preview`,v=n&&!p&&o,y;t[3]!==g||t[4]!==_||t[5]!==v?(y={id:_,active:v,layer:`overlay`,onBack:g,surfaceRef:l},t[3]=g,t[4]=_,t[5]=v,t[6]=y):y=t[6],ve(y);let b,x;if(t[7]!==g||t[8]!==p||t[9]!==o||t[10]!==u||t[11]!==n||t[12]!==a?(b=()=>{if(!n){m(!1),f.current=!1;return}if(p)return;let e=l.current;e&&delete e.dataset.mediaPreviewClosing;let t=document.activeElement instanceof HTMLElement?document.activeElement:null,r=o?ie.add({id:u,onClose:g},document.body):void 0;return e?.querySelector(`button`)?.focus({preventScroll:!0}),d.current=St(a,e?.querySelector(`[data-preview-transition-target]`)??null,e,!1),()=>{d.current?.(),d.current=null,f.current=!1,r?.(),t?.isConnected&&t.focus({preventScroll:!0})}},x=[p,n,a,o,u,g],t[7]=g,t[8]=p,t[9]=o,t[10]=u,t[11]=n,t[12]=a,t[13]=b,t[14]=x):(b=t[13],x=t[14]),X.useLayoutEffect(b,x),!n||p||typeof document>`u`)return null;let S;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(S={color:`var(--yuri-media-preview-foreground)`},t[15]=S):S=t[15];let C;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>{if(f.current){e.preventDefault(),e.stopPropagation();return}d.current?.(),d.current=null},t[16]=C):C=t[16];let w;t[17]===g?w=t[18]:(w=e=>{if(!e.currentTarget.contains(e.target)||(e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),g()),e.key!==`Tab`))return;let t=Array.from(e.currentTarget.querySelectorAll(`button:not([disabled]), a[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex="0"]`)),n=t[0],r=t.at(-1);e.shiftKey&&document.activeElement===n?(e.preventDefault(),r?.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n?.focus())},t[17]=g,t[18]=w);let T=o?`var(--yuri-media-preview-background)`:`color-mix(in srgb, var(--yuri-media-preview-background) ${i===`mermaid`?90:70}%, transparent)`,E;t[19]===T?E=t[20]:(E=(0,Z.jsx)(`div`,{"data-media-preview-backdrop":``,"aria-hidden":`true`,className:`pointer-events-none absolute inset-0`,style:{backgroundColor:T}}),t[19]=T,t[20]=E);let O;t[21]!==c||t[22]!==g?(O=c(g),t[21]=c,t[22]=g,t[23]=O):O=t[23];let k;return t[24]!==i||t[25]!==E||t[26]!==O||t[27]!==w||t[28]!==r?(k=(0,bt.createPortal)((0,Z.jsxs)(`div`,{ref:l,role:`dialog`,"aria-modal":`true`,"aria-label":r,"data-media-preview":i,"data-page-scroll-lock":`true`,tabIndex:-1,className:`fixed inset-0 z-[80] overflow-hidden select-none [-webkit-touch-callout:none]`,style:S,onClick:Ot,onPointerDownCapture:C,onKeyDown:w,children:[E,O]}),document.body),t[24]=i,t[25]=E,t[26]=O,t[27]=w,t[28]=r,t[29]=k):k=t[29],k}function Ot(e){e.stopPropagation()}var kt=1048576,$=b(`YuriVideo`),At=e=>{let t=/^bytes=(\d*)-(\d*)$/.exec(e||`bytes=0-1048575`);if(!t||!t[1]&&!t[2])throw Error(`Invalid media range`);if(!t[1]){let e=Number(t[2]);if(!Number.isSafeInteger(e)||e<=0)throw Error(`Invalid media range`);return`bytes=-${Math.min(e,kt)}`}let n=Number(t[1]),r=t[2]?Number(t[2]):n+kt-1;if(!Number.isSafeInteger(n)||!Number.isSafeInteger(r)||r<n)throw Error(`Invalid media range`);return`bytes=${n}-${Math.min(r,n+kt-1)}`},jt=e=>{let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)};async function Mt(e,n,r){if(!x.isNativePlatform()||x.getPlatform()!==`ios`||!x.isPluginAvailable(`YuriVideo`))return null;let i=o(),c=crypto.randomUUID(),l=new Map,u=!1,d=()=>{},f=()=>{},p=async()=>{if(!u){u=!0,d(),f(),r.removeEventListener(`abort`,m);for(let e of l.values())e.abort();l.clear(),await Promise.allSettled([g?.remove(),$.release({assetId:c})])}},m=()=>{p()},h=async t=>{if(t.assetId!==c||u)return;if(t.cancelled){l.get(t.requestId)?.abort();return}if(l.has(t.requestId))return;let a=new AbortController;l.set(t.requestId,a);let d;try{if(i!==o()||r.aborted)throw Error(`Video runtime changed`);let c=t.method===`HEAD`?`bytes=0-0`:At(t.range),l=new URLSearchParams(e.split(`?`)[1]??``);(n.query instanceof URLSearchParams?n.query:new URLSearchParams(n.query)).forEach((e,t)=>l.set(t,e));let f=l.get(`path`);d=e.split(`?`)[0]===`/api/fs/raw`&&f?await y({path:f,range:c,signal:a.signal,directory:new Headers(n.headers).get(`x-opencode-directory`)??l.get(`directory`)??void 0,allowOutsideWorkspace:l.get(`allowOutsideWorkspace`)===`true`,outsideFileGrant:l.get(`outsideFileGrant`)??void 0}):await s(e,{...n,headers:{Range:c},signal:a.signal});let p=d.headers.get(`content-range`)||``;if(d.status===416&&/^bytes \*\/\d+$/.test(p)){await $.respond({requestId:t.requestId,status:416,contentRange:p,dataBase64:``});return}let m=/^bytes (\d+)-(\d+)\/(\d+)$/.exec(p);if(d.status!==206||!m)throw Error(`Host does not support video ranges`);let[h,g,_]=m.slice(1).map(Number),v=g-h+1;if(![h,g,_].every(Number.isSafeInteger)||v<=0||v>1048576||g>=_)throw Error(`Invalid video range response`);let b=d.body?.getReader();if(!b)throw Error(`Missing video response body`);let x=new Uint8Array(v),S=0;try{for(;;){let{done:e,value:t}=await b.read();if(e)break;if(S+t.length>v)throw Error(`Oversized video range`);x.set(t,S),S+=t.length}}finally{await b.cancel().catch(()=>{}),b.releaseLock()}if(S!==v)throw Error(`Truncated video range`);if(u||a.signal.aborted||i!==o())return;let C=d.headers.get(`content-type`)?.split(`;`)[0]||`application/octet-stream`;await $.respond({requestId:t.requestId,status:t.method===`HEAD`?200:206,contentType:C,contentRange:t.method===`HEAD`?void 0:p,contentLength:t.method===`HEAD`?_:v,dataBase64:t.method===`HEAD`?``:jt(x)})}catch{!u&&!a.signal.aborted&&await $.respond({requestId:t.requestId,status:502,dataBase64:``}).catch(()=>{})}finally{d?.body&&!d.body.locked&&await d.body.cancel().catch(()=>{}),l.delete(t.requestId)}},g=await $.addListener(`request`,e=>{h(e)});r.addEventListener(`abort`,m,{once:!0}),d=a(m),f=t(m);try{r.throwIfAborted();let{url:e}=await $.create({assetId:c});if(u||r.aborted)throw await $.release({assetId:c}),new DOMException(`Aborted`,`AbortError`);return{url:e,release:p}}catch(e){throw await p(),e}}var Nt=`image/png`,Pt=b(`YuriMedia`),Ft=e=>{let t=e.toLowerCase().split(`;`)[0]?.trim()||Nt;if(t===`image/jpeg`||t===`image/jpg`)return`jpg`;if(t===`image/webp`)return`webp`;if(t===`image/gif`)return`gif`;if(t===`image/svg+xml`)return`svg`;if(t===`image/png`)return`png`;if(t===`video/quicktime`)return`mov`;let n=t.split(`/`)[1];return n&&/^[a-z0-9.+-]+$/i.test(n)?n:`png`},It=(e,t)=>{let n=`${t.startsWith(`video/`)?`video`:`image`}.${Ft(t)}`,r=(((e||``).trim()||n).split(/[\\/]/).pop()||n).replace(/[^\w.\- ()[\]]+/g,`_`).replace(/^\.+/,``);return r?/\.[a-z0-9]{1,8}$/i.test(r)?r:`${r}.${Ft(t)}`:n},Lt=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(typeof r.result==`string`){t(r.result);return}n(Error(`Failed to encode image`))},r.onerror=()=>n(r.error??Error(`Failed to encode image`)),r.readAsDataURL(e)}),Rt=async e=>{let t=await Lt(e),n=t.indexOf(`,`);return n>=0?t.slice(n+1):t},zt=(e,t)=>{let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)},Bt=async(e,t,n)=>{if(e.startsWith(`yuri-asset:`)){let r=await _(e,t,n);if(r)return r;if(w())throw Error(`Image display stream is no longer available`)}return v(e,t,n)},Vt=async(e,t,n)=>g({path:e,signal:t},n),Ht=async(e,t,n)=>{let r=e.effectiveDirectory??``,i=null;e.prefetchedBlob&&e.prefetchedBlob.size>0&&(i=e.prefetchedBlob);let a=e.displayUrl?.trim();if(!i&&a&&(!/^https?:/i.test(a)||!V(R(e.sourceUrl,r))))try{i=await Bt(a,t,n)}catch{t?.throwIfAborted(),i=null,n?.(0)}if(!i){let a=e.sourceUrl.trim();if(!a)throw Error(`Image source is empty`);if(/^(?:data|blob):/i.test(a)||/^https?:/i.test(a)||/^\/api(?=\/|[?#]|$)/.test(a))i=await Bt(a,t,n);else{let e=R(a,r);i=V(e)?await Vt(e.path,t,n):await Bt(e.source,t,n)}}if(!i||i.size<=0)throw Error(`Image is empty`);n?.(100);let o=(e.mimeType||(i.type&&/^(image|video)\//.test(i.type)?i.type:``)||(e.kind===`video`?`video/mp4`:``)||Nt).split(`;`)[0].trim()||Nt;return{blob:i,filename:It(e.filename,o),mimeType:o}},Ut=()=>!w()||x===void 0?!1:x.isPluginAvailable(`YuriMedia`),Wt=async(e,t,n)=>{let r=R(e.sourceUrl,e.effectiveDirectory??``);if(c()&&e.kind===`video`&&!Ut()){let e=l()?.files;if(V(r)&&e?.downloadFile)return t?.throwIfAborted(),await e.downloadFile(r.path),`saved`;throw Error(`Video download is unavailable for this source in VS Code`)}if(V(r)&&!e.prefetchedBlob&&!/^(?:blob|data|yuri-asset):/i.test(e.displayUrl??``)&&!Ut()&&!c())return await C({path:r.path,filename:e.filename,signal:t},n),`downloaded`;let{blob:i,filename:a,mimeType:o}=await Ht(e,t,n);if(t?.throwIfAborted(),Ut()){let n=await Rt(i);if(t?.throwIfAborted(),e.kind===`video`){if((await Pt.saveFile({dataBase64:n,mimeType:o,filename:a}))?.cancelled)throw new DOMException(`Save cancelled`,`AbortError`);return`saved`}return await Pt.saveImage({dataBase64:n,mimeType:o,filename:a}),`saved`}if(c()){let e=l()?.vscode;if(e?.saveImage){let t=await Lt(i);return await e.saveImage({fileName:a,dataUrl:t}),`saved`}}return zt(i,a),`downloaded`};function Gt(e){let t=(0,Y.c)(34),{target:n,isMobile:r}=e,{t:i}=O(),[a,o]=X.useState(`idle`),[s,c]=X.useState(0),l=X.useRef(null),u,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>()=>l.current?.abort(),d=[],t[0]=u,t[1]=d):(u=t[0],d=t[1]),X.useEffect(u,d);let f;t[2]===n?f=t[3]:(f=async()=>{if(l.current)return;let e=new AbortController;l.current=e,o(`saving`),c(0);try{await Wt(n,e.signal,t=>{e.signal.aborted||c(t)}),e.signal.aborted||o(`saved`)}catch(t){let n=t;if(e.signal.aborted)return;l.current=null,o(n instanceof DOMException&&n.name===`AbortError`?`idle`:`error`)}},t[2]=n,t[3]=f);let p=D(f),m=a===`saving`,h=a===`saved`,g;t[4]!==h||t[5]!==m||t[6]!==i||t[7]!==n?(g=i(m?`chat.image.actions.saving`:h?`filesView.editor.saved`:n.kind===`video`?`filesView.editor.saveFile`:`chat.image.actions.saveImage`),t[4]=h,t[5]=m,t[6]=i,t[7]=n,t[8]=g):g=t[8];let _=g,v=r?`ghost`:`mobileGlass`,y=r?`icon`:`mobileIcon`,b=m||h,x;t[9]!==r||t[10]!==_||t[11]!==s||t[12]!==h||t[13]!==m?(x=m?(0,Z.jsxs)(`svg`,{viewBox:`0 0 24 24`,className:r?`size-4`:`size-6`,role:`progressbar`,"aria-label":_,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s??void 0,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,Z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,opacity:`0.25`}),(0,Z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,pathLength:`100`,strokeDasharray:`${s??0} 100`,transform:`rotate(-90 12 12)`})]}):h?(0,Z.jsx)(P,{name:`check`,weight:`medium`,className:r?`size-4`:`size-6`}):(0,Z.jsx)(P,{name:`download-2-fill`,className:r?`size-4`:`size-6`}),t[9]=r,t[10]=_,t[11]=s,t[12]=h,t[13]=m,t[14]=x):x=t[14];let S;t[15]!==_||t[16]!==p||t[17]!==m||t[18]!==a||t[19]!==v||t[20]!==y||t[21]!==b||t[22]!==x?(S=(0,Z.jsx)(A,{variant:v,size:y,"data-media-save":a,className:`rounded-full [corner-shape:round] disabled:opacity-100`,"aria-label":_,"aria-busy":m,disabled:b,onClick:p,children:x}),t[15]=_,t[16]=p,t[17]=m,t[18]=a,t[19]=v,t[20]=y,t[21]=b,t[22]=x,t[23]=S):S=t[23];let C;t[24]!==_||t[25]!==a||t[26]!==i||t[27]!==n?(C=a===`error`?i(n.kind===`video`?`filesView.toast.saveFailed`:`chat.image.actions.saveFailed`):a===`idle`?``:_,t[24]=_,t[25]=a,t[26]=i,t[27]=n,t[28]=C):C=t[28];let w;t[29]===C?w=t[30]:(w=(0,Z.jsx)(`span`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:C}),t[29]=C,t[30]=w);let T;return t[31]!==w||t[32]!==S?(T=(0,Z.jsxs)(Z.Fragment,{children:[S,w]}),t[31]=w,t[32]=S,t[33]=T):T=t[33],T}function Kt({video:e,onClose:t,isMobile:a}){let{t:o}=O(),s=ce()??``,c=e.directory??s,l=z(),u=R(e.url,c),d=V(u)?u.path:``,f=/^\/api(?=\/|[?#]|$)/.test(e.url)?e.url:``,p=!!(d||f),m=`${l}\n${c}\n${e.url}`,[_,y]=X.useState();X.useEffect(()=>{if(!p)return;let e=new AbortController,t;return Mt(f||`/api/fs/raw`,{query:d?{path:d}:void 0},e.signal).then(async n=>{if(e.signal.aborted){await n?.release();return}t=n?.release,y({key:m,url:n?.url,unsupported:!n})}).catch(()=>{e.signal.aborted||y({key:m,error:!0})}),()=>{e.abort(),t?.()}},[p,d,f,m]);let b=_?.key===m?_:void 0,[x,C]=X.useState(0);X.useEffect(()=>{if(!p||i())return;let e=n(),t=r(()=>C(e=>e+1));return()=>{t(),e()}},[p,l]);let w=h({queryKey:[`video-preview`,l,c,e.url,x],enabled:p&&b?.unsupported===!0,gcTime:0,staleTime:1/0,retry:!1,queryFn:async({signal:e})=>{if(!i()){let t=await S(f||`/api/fs/raw`,d?{path:d}:void 0);return e.throwIfAborted(),{url:t,blob:void 0}}return{blob:d?await g({path:d,signal:e}):await v(f,e),url:void 0}}}),[T,E]=X.useState(null);X.useEffect(()=>{if(!w.data?.blob)return;let e=URL.createObjectURL(w.data.blob);return E({blob:w.data.blob,url:e}),()=>URL.revokeObjectURL(e)},[w.data]);let D=p?b?.url||w.data?.url||(T?.blob===w.data?.blob?T?.url:``):u.source,[k,A]=X.useState(),j=b?.error||w.isError||!!(D&&k===D);return(0,Z.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-3 p-4`,children:[(0,Z.jsx)(Ct,{onClose:t,isMobile:a}),!D&&!j&&(0,Z.jsx)(`p`,{role:`status`,children:o(`common.loading`)}),j&&(0,Z.jsx)(`p`,{role:`alert`,children:o(`filesView.error.readFileFailed`)}),D&&(0,Z.jsx)(`video`,{src:D,controls:!0,playsInline:!0,preload:`metadata`,"aria-label":e.filename,className:`max-h-[80dvh] w-full max-w-5xl object-contain`,onError:()=>A(D),controlsList:`nodownload`,onContextMenu:e=>e.preventDefault()},D),(0,Z.jsx)(wt,{isMobile:a,children:(0,Z.jsx)(Gt,{isMobile:a,target:{kind:`video`,sourceUrl:e.url,displayUrl:b?.url||w.data?.url?void 0:D,filename:e.filename,mimeType:e.mimeType,effectiveDirectory:c,prefetchedBlob:w.data?.blob}},m)})]})}var qt=400,Jt=(e,t,n)=>{e&&e.style[t]!==n&&(e.style[t]=n)},Yt=(e,t)=>new Ge(e,t),Xt=e=>{let t=`h-3.5 w-3.5 flex-shrink-0`,n=e.toLowerCase();return n===`reasoning`?(0,Z.jsx)(P,{name:`brain-ai-3`,className:t}):n===`image-preview`?(0,Z.jsx)(P,{name:`file-image`,className:t}):n===`mermaid-preview`?(0,Z.jsx)(P,{name:`file-list-2`,className:t}):n===`edit`||n===`multiedit`||n===`apply_patch`||n===`str_replace`||n===`str_replace_based_edit_tool`?(0,Z.jsx)(P,{name:`pencil-ai`,className:t}):n===`write`||n===`create`||n===`file_write`||n===`read`||n===`view`||n===`file_read`||n===`cat`?(0,Z.jsx)(P,{name:`file-pdf`,className:t}):n===`bash`||n===`shell`||n===`cmd`||n===`terminal`?(0,Z.jsx)(P,{name:`terminal-box`,className:t}):n===`list`||n===`ls`||n===`dir`||n===`list_files`?(0,Z.jsx)(P,{name:`folder-6`,className:t}):n===`search`||n===`grep`||n===`find`||n===`ripgrep`?(0,Z.jsx)(P,{name:`search`,className:t}):n===`glob`?(0,Z.jsx)(P,{name:`file-search`,className:t}):n===`fetch`||n===`curl`||n===`wget`||n===`webfetch`?(0,Z.jsx)(P,{name:`global`,className:t}):n===`web-search`||n===`websearch`||n===`search_web`||n===`google`||n===`bing`||n===`duckduckgo`?(0,Z.jsx)(P,{name:`search`,className:t}):n===`todowrite`||n===`todoread`?(0,Z.jsx)(_e,{className:k(`text-current`,t)}):n.startsWith(`git`)?(0,Z.jsx)(P,{name:`git-branch`,className:t}):(0,Z.jsx)(P,{name:`tools`,className:t})},Zt={style:{background:`transparent`,backgroundColor:`transparent`,fontSize:`inherit`}},Qt={download:!1,copy:!1,showPanZoomControls:!0},$t=`
3
3
  [data-diff-header],
4
4
  [data-diff] {
@@ -1 +1 @@
1
- import"./rolldown-runtime-hePW80VL.js";import{at as e,it as t}from"./vendor-base-ui-BQjbsJ43.js";import{n}from"./vendor-react-D5d-V1vN.js";import{f as r}from"./button-BXxwtxsG.js";import{t as i}from"./useThemeSystem-CGF5jnIh.js";var a=n();e();var o=t(),s=e=>{let t=(0,a.c)(14),{className:n,width:s,height:c,isAnimated:l}=e,u=n===void 0?``:n,d=s===void 0?70:s,f=c===void 0?70:c,p=l!==void 0&&l,{t:m}=r(),h=i(),g=h?h.currentTheme.metadata.variant!==`light`:typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches,_;t[0]===m?_=t[1]:(_=m(`yuriLogo.aria.logo`),t[0]=m,t[1]=_);let v;t[2]===p?v=t[3]:(v=p?(0,o.jsx)(`style`,{children:`@keyframes yuri-logo-breathe{50%{opacity:.65}}.yuri-logo-breathe{animation:yuri-logo-breathe 1.8s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.yuri-logo-breathe{animation:none}}`}):null,t[2]=p,t[3]=v);let y=g?`white`:`black`,b=p?`yuri-logo-breathe`:void 0,x;t[4]!==y||t[5]!==b?(x=(0,o.jsx)(`path`,{fill:y,fillRule:`evenodd`,className:b,d:`M48.34 6.03L47.62 6.07L46.95 6.12L46.64 6.15L46.20 6.21L45.36 6.34L44.97 6.42L44.61 6.48L43.53 6.73L43.27 6.79L43.01 6.86L42.16 7.13L41.77 7.24L41.22 7.41L40.38 7.70L39.25 8.13L38.84 8.30L38.28 8.57L37.62 8.85L37.30 9.01L36.95 9.20L36.25 9.59L35.44 10.06L34.74 10.46L34.40 10.67L33.76 11.16L33.51 11.34L32.95 11.71L32.41 12.10L31.98 12.42L31.81 12.56L31.64 12.71L31.06 13.26L30.53 13.75L29.89 14.37L29.30 14.91L29.11 15.10L28.90 15.33L28.71 15.57L28.17 16.29L27.78 16.77L27.42 17.22L27.26 17.44L26.87 17.99L26.58 18.43L26.27 18.87L25.98 19.32L25.77 19.71L25.04 21.09L24.83 21.54L24.51 22.27L24.32 22.73L24.11 23.31L23.97 23.69L23.84 24.11L23.62 24.79L23.45 25.39L23.37 25.79L23.26 26.22L23.20 26.52L23.10 27.10L23.04 27.49L22.92 28.38L22.88 28.87L22.85 29.36L22.84 29.89L22.83 30.38L22.83 31.01L22.84 31.45L22.87 31.85L22.89 32.21L23.02 33.41L23.08 33.89L23.14 34.20L23.24 34.63L23.36 35.06L23.46 35.50L23.62 36.10L23.79 36.66L23.96 37.16L24.14 37.67L24.41 38.37L24.55 38.70L24.93 39.51L25.38 40.48L25.73 41.20L25.85 41.44L26.10 41.86L26.38 42.32L26.89 43.21L27.25 43.83L27.50 44.30L27.83 44.88L27.96 45.16L28.19 45.65L28.34 46.02L28.52 46.48L28.66 46.90L28.85 47.54L29.02 48.19L29.06 48.41L29.14 48.89L29.23 49.42L29.27 49.82L29.30 50.58L29.30 51.24L29.27 52.09L29.25 52.45L29.23 52.67L29.15 53.38L29.06 53.99L28.78 55.40L28.71 55.79L28.52 56.62L28.36 57.22L28.11 57.93L27.59 59.31L27.47 59.60L27.33 59.88L26.73 61.12L26.64 61.28L26.25 61.92L25.96 62.38L25.53 63.10L25.31 63.44L24.96 63.96L23.92 65.41L23.70 65.69L23.25 66.19L23.05 66.42L22.89 66.64L22.52 67.14L22.14 67.58L21.72 68.10L21.36 68.56L21.25 68.70L21.23 68.74L21.23 68.78L21.26 68.82L21.30 68.83L21.34 68.83L22.18 68.73L23.16 68.63L23.38 68.61L24.10 68.60L25.08 68.60L25.43 68.61L25.97 68.64L26.63 68.72L27.08 68.75L27.25 68.78L28.22 68.92L29.19 69.11L29.41 69.15L30.10 69.33L30.70 69.49L31.08 69.61L31.72 69.81L32.23 69.99L32.97 70.28L33.75 70.61L34.40 70.92L34.80 71.11L35.31 71.38L36.00 71.79L36.55 72.09L36.85 72.28L37.58 72.79L38.10 73.14L38.46 73.41L38.70 73.60L39.82 74.49L40.06 74.68L40.49 75.00L40.77 75.22L41.10 75.52L41.55 75.96L41.98 76.35L42.17 76.53L42.39 76.76L42.72 77.18L42.90 77.38L43.02 77.51L43.47 77.94L43.74 78.24L44.15 78.71L44.64 79.29L44.98 79.71L45.13 79.92L45.26 80.16L45.28 80.20L45.29 80.24L45.27 80.27L45.23 80.29L45.19 80.27L44.95 80.08L44.75 79.90L44.40 79.56L44.07 79.26L43.64 78.87L43.44 78.70L42.77 78.16L42.42 77.89L41.51 77.25L40.74 76.64L39.96 76.05L39.26 75.58L38.54 75.12L37.39 74.44L36.59 73.96L36.31 73.81L35.95 73.63L34.83 73.09L33.89 72.67L33.57 72.52L33.11 72.34L31.78 71.84L31.61 71.78L31.23 71.66L30.79 71.55L29.81 71.27L29.20 71.11L29.03 71.07L28.33 70.93L27.71 70.84L27.32 70.77L27.10 70.74L26.83 70.71L26.39 70.68L25.86 70.61L25.28 70.57L24.96 70.56L24.52 70.56L24.03 70.56L23.76 70.58L23.10 70.64L22.30 70.73L22.08 70.76L21.15 70.92L20.72 71.03L20.33 71.12L19.74 71.31L19.15 71.51L18.77 71.64L18.40 71.80L17.87 72.03L17.71 72.11L17.55 72.20L17.21 72.41L16.74 72.75L16.22 73.09L15.90 73.33L15.61 73.54L15.30 73.80L14.97 74.09L14.52 74.53L14.27 74.78L13.90 75.23L13.34 75.92L13.09 76.24L12.89 76.53L12.31 77.49L12.16 77.76L12.06 77.96L11.97 78.16L11.86 78.45L11.84 78.49L11.84 78.54L11.85 78.58L11.88 78.61L11.93 78.62L12.88 78.37L13.40 78.26L14.01 78.14L14.54 78.03L14.84 77.97L15.59 77.87L16.57 77.77L17.32 77.67L17.50 77.66L17.72 77.65L18.52 77.63L19.82 77.63L20.58 77.63L21.87 77.67L22.31 77.70L22.62 77.72L23.65 77.82L24.00 77.86L24.57 77.95L25.24 78.04L25.98 78.16L26.42 78.24L26.91 78.33L27.26 78.39L27.65 78.47L28.13 78.56L28.57 78.67L28.96 78.74L29.31 78.83L29.74 78.92L30.12 79.04L30.94 79.26L31.54 79.44L32.18 79.64L32.98 79.91L33.79 80.15L33.96 80.21L35.30 80.71L36.63 81.22L37.04 81.39L37.58 81.60L38.49 81.98L39.48 82.39L39.92 82.59L40.36 82.81L40.60 82.92L41.18 83.18L41.92 83.49L42.44 83.73L42.84 83.92L43.73 84.34L44.42 84.66L45.15 85.00L45.51 85.18L46.29 85.60L46.66 85.77L47.13 86.01L47.74 86.29L48.22 86.52L49.54 87.17L50.10 87.46L50.94 87.87L52.09 88.45L53.85 89.22L54.05 89.31L54.52 89.56L54.88 89.74L55.21 89.89L55.58 90.05L56.65 90.50L57.21 90.77L57.70 90.99L58.15 91.17L58.48 91.31L58.94 91.47L59.54 91.67L59.92 91.79L60.30 91.92L60.88 92.13L61.59 92.40L62.01 92.55L62.78 92.78L63.99 93.10L64.68 93.28L65.12 93.37L65.55 93.47L66.25 93.62L67.39 93.81L67.75 93.85L68.06 93.88L69.17 93.95L69.70 93.99L70.02 94.00L70.24 93.99L70.28 93.98L70.32 93.96L70.31 93.92L70.28 93.89L70.21 93.84L70.09 93.79L69.55 93.57L69.06 93.35L68.46 93.06L66.66 92.08L66.00 91.71L65.73 91.55L65.35 91.31L64.91 91.01L64.23 90.58L63.75 90.25L63.32 89.94L63.03 89.73L61.99 88.89L61.42 88.46L61.01 88.12L60.74 87.88L60.22 87.39L59.66 86.82L59.10 86.24L58.62 85.78L58.43 85.59L58.24 85.40L57.95 85.06L57.51 84.56L57.09 84.04L56.42 83.25L56.03 82.77L55.87 82.56L55.64 82.23L55.40 81.91L54.98 81.28L54.78 80.98L54.25 80.10L54.00 79.68L53.37 78.55L53.20 78.23L52.81 77.43L52.64 77.07L52.48 76.66L52.12 75.69L51.96 75.23L51.85 74.89L51.76 74.60L51.60 74.04L51.41 73.21L51.34 72.82L51.25 72.38L51.14 71.77L50.98 71.03L50.79 70.29L50.61 69.65L50.45 69.14L50.26 68.59L50.00 67.97L49.91 67.77L49.82 67.61L49.60 67.23L49.21 66.63L49.05 66.42L48.85 66.17L48.71 66.00L48.56 65.84L48.18 65.46L47.95 65.25L47.74 65.08L46.72 64.29L46.52 64.11L46.12 63.75L45.29 62.94L45.10 62.75L44.65 62.26L44.37 61.91L43.99 61.41L43.64 60.90L43.38 60.48L43.16 60.10L43.03 59.86L42.63 59.06L42.31 58.33L42.23 58.12L42.16 57.91L42.15 57.87L42.15 57.82L42.17 57.78L42.21 57.77L42.25 57.78L42.32 57.84L42.41 57.94L42.49 58.04L42.67 58.30L42.80 58.48L43.19 58.96L43.99 59.86L44.18 60.05L44.38 60.24L44.55 60.38L45.02 60.78L45.97 61.60L46.35 61.91L46.63 62.13L46.99 62.39L47.56 62.75L47.79 62.88L49.13 63.59L49.77 63.91L50.54 64.27L51.31 64.62L51.59 64.74L51.97 64.89L53.02 65.27L53.77 65.53L54.40 65.77L55.12 66.01L55.67 66.18L56.58 66.42L57.52 66.70L59.15 67.14L59.84 67.35L60.30 67.51L60.75 67.69L60.96 67.78L61.20 67.90L61.40 68.00L61.59 68.11L61.81 68.26L62.10 68.47L62.28 68.61L62.41 68.72L62.66 68.97L62.81 69.14L62.93 69.28L63.06 69.46L63.21 69.68L64.12 71.16L64.32 71.46L64.45 71.64L64.65 71.88L65.19 72.53L65.49 72.86L65.84 73.20L66.11 73.44L66.31 73.61L66.91 74.08L67.41 74.45L67.67 74.63L68.04 74.87L68.23 74.98L68.28 74.99L68.32 74.97L68.32 74.92L68.32 74.88L68.31 74.84L68.23 74.67L67.56 73.27L67.47 73.06L67.27 72.52L67.16 72.23L66.93 71.46L66.89 71.28L66.85 71.06L66.81 70.75L66.79 70.49L66.78 70.27L66.77 70.00L66.77 69.60L66.78 69.37L66.81 68.97L66.84 68.71L66.90 68.40L66.95 68.14L67.06 67.75L67.12 67.54L67.27 67.12L67.44 66.66L67.51 66.49L67.61 66.29L67.98 65.58L68.38 64.78L68.51 64.50L68.57 64.38L68.64 64.27L68.74 64.12L68.77 64.09L68.81 64.08L68.85 64.11L68.86 64.16L68.85 64.20L68.83 64.33L68.79 64.46L68.73 64.67L68.60 65.05L68.51 65.35L68.39 65.78L68.33 66.04L68.21 66.61L68.07 67.49L68.01 67.98L67.98 68.29L67.96 68.87L67.96 69.31L67.98 69.76L68.01 70.11L68.06 70.47L68.18 71.03L68.22 71.21L68.37 71.72L68.43 71.89L68.53 72.14L68.75 72.63L68.93 72.98L69.39 73.80L69.56 74.11L69.75 74.51L70.07 75.20L70.25 75.71L70.69 76.97L71.04 77.88L71.14 78.18L71.28 78.65L71.46 79.20L71.58 79.54L71.69 79.78L71.78 79.98L71.94 80.30L72.22 80.81L72.62 81.56L72.82 81.91L72.98 82.17L73.30 82.66L73.62 83.14L73.81 83.39L74.24 83.96L74.41 84.17L74.58 84.37L74.83 84.63L75.05 84.84L75.26 85.02L75.30 85.04L75.34 85.05L75.37 85.02L75.37 84.98L75.36 84.94L75.24 84.65L74.99 84.08L74.62 83.21L74.43 82.67L74.06 81.57L73.92 81.01L73.69 79.91L73.57 79.26L73.52 78.90L73.37 77.53L73.33 77.17L73.32 76.86L73.29 76.06L73.28 75.75L73.29 75.44L73.32 74.81L73.34 74.55L73.57 72.78L73.69 72.07L73.82 71.46L73.98 70.54L74.02 70.28L74.10 69.70L74.17 69.04L74.20 68.64L74.22 68.14L74.21 67.83L74.20 67.61L74.19 67.39L74.14 66.99L74.01 66.20L73.95 65.94L73.83 65.51L73.67 65.05L73.51 64.68L73.27 64.19L72.81 63.28L72.70 63.04L72.65 62.91L72.59 62.75L72.54 62.53L72.51 62.35L72.50 62.18L72.50 62.00L72.50 61.86L72.52 61.69L72.55 61.56L72.58 61.43L72.65 61.26L72.72 61.10L72.81 60.94L72.93 60.76L73.02 60.66L73.11 60.56L73.31 60.38L73.69 60.08L73.82 59.95L73.93 59.82L73.98 59.74L74.02 59.66L74.06 59.58L74.10 59.46L74.12 59.33L74.14 59.24L74.14 59.15L74.14 59.06L74.12 58.97L74.09 58.84L74.05 58.72L74.02 58.63L73.96 58.52L73.91 58.44L73.83 58.33L73.78 58.27L73.68 58.18L73.61 58.13L73.53 58.08L73.45 58.05L73.28 58.00L73.06 57.97L72.74 57.96L72.48 57.97L72.25 57.99L71.86 58.03L71.59 58.08L70.33 58.35L70.11 58.41L69.47 58.59L69.17 58.69L68.58 58.87L68.44 58.89L68.31 58.91L68.27 58.90L68.25 58.87L68.26 58.83L68.28 58.80L68.46 58.66L68.67 58.50L68.93 58.32L69.20 58.16L69.59 57.95L69.79 57.85L70.00 57.76L70.20 57.69L71.26 57.34L71.78 57.19L71.95 57.15L72.56 57.02L72.78 56.98L73.14 56.94L73.71 56.90L73.85 56.88L73.97 56.85L74.10 56.81L74.22 56.75L74.34 56.69L74.46 56.62L74.57 56.55L74.67 56.47L74.77 56.38L74.83 56.31L74.89 56.25L74.97 56.14L75.05 55.98L75.11 55.81L75.13 55.73L75.15 55.60L75.16 55.46L75.16 55.33L75.14 54.93L75.10 54.49L75.07 54.31L75.05 54.18L75.00 54.01L74.92 53.80L74.85 53.64L74.76 53.48L74.61 53.26L74.44 53.05L74.23 52.82L73.98 52.57L73.89 52.47L73.86 52.43L73.85 52.39L73.86 52.35L73.88 52.31L73.92 52.29L73.96 52.28L74.09 52.26L74.27 52.26L74.58 52.26L74.94 52.29L75.11 52.31L75.29 52.35L75.59 52.41L75.94 52.48L76.51 52.61L76.86 52.67L77.17 52.70L77.48 52.72L77.75 52.71L77.97 52.68L78.19 52.64L78.36 52.59L78.53 52.53L78.69 52.45L78.85 52.37L79.00 52.27L79.10 52.19L79.20 52.10L79.29 52.00L79.36 51.89L79.45 51.73L79.50 51.61L79.54 51.48L79.57 51.35L79.58 51.22L79.57 51.09L79.56 50.91L79.53 50.78L79.50 50.65L79.36 50.13L79.25 49.75L79.13 49.27L78.88 48.47L78.48 47.14L78.34 46.72L78.08 45.86L77.99 45.57L77.89 45.22L77.64 44.41L77.48 43.86L77.37 43.42L77.27 43.08L77.11 42.48L76.94 41.83L76.86 41.44L76.77 41.09L76.69 40.66L76.56 40.09L76.39 39.21L76.25 38.47L76.18 38.16L76.14 38.04L76.08 37.87L75.99 37.72L75.88 37.53L75.59 37.13L75.39 36.88L75.28 36.75L75.04 36.49L74.65 36.12L74.48 35.97L74.30 35.84L73.80 35.47L73.35 35.17L72.97 34.95L72.42 34.66L71.81 34.38L70.44 33.83L69.90 33.62L69.39 33.45L68.28 33.11L67.77 32.98L67.64 32.93L67.48 32.86L67.44 32.84L67.41 32.81L67.41 32.78L67.44 32.75L67.49 32.74L67.71 32.73L67.98 32.74L68.20 32.77L68.82 32.86L69.30 32.93L70.14 33.07L70.84 33.21L71.10 33.28L72.17 33.58L72.72 33.75L72.94 33.81L73.44 33.99L73.65 34.07L73.86 34.15L74.54 34.48L74.94 34.67L75.30 34.86L75.69 35.08L75.99 35.27L76.28 35.48L76.58 35.74L76.98 36.10L77.21 36.30L77.32 36.38L77.40 36.40L77.48 36.41L77.56 36.39L77.63 36.35L77.74 36.28L77.84 36.19L77.96 36.06L78.07 35.92L78.14 35.80L78.20 35.69L78.26 35.56L78.30 35.44L78.33 35.31L78.35 35.18L78.36 35.04L78.34 34.73L78.31 34.51L78.28 34.34L78.03 33.25L77.92 32.64L77.82 32.20L77.79 32.02L77.77 31.80L77.72 31.27L77.65 30.16L77.57 29.18L77.39 27.94L77.36 27.72L77.28 27.33L77.20 26.89L77.04 26.20L77.00 26.02L76.85 25.51L76.69 24.95L76.49 24.36L76.40 24.11L76.31 23.81L76.23 23.60L76.14 23.39L76.05 23.19L75.61 22.27L75.23 21.51L74.93 20.96L74.38 19.99L73.64 18.82L73.18 18.17L72.96 17.89L72.11 16.91L71.27 15.87L70.77 15.30L70.49 15.02L70.16 14.71L69.60 14.20L69.17 13.81L68.94 13.60L68.54 13.25L68.16 12.94L67.75 12.59L67.54 12.42L67.22 12.18L66.68 11.79L65.94 11.29L65.20 10.79L64.71 10.48L64.05 10.10L62.65 9.33L62.29 9.14L62.01 9.01L61.73 8.87L60.87 8.51L60.34 8.27L59.93 8.08L59.61 7.94L59.15 7.77L58.13 7.42L57.79 7.32L57.50 7.23L56.86 7.03L56.26 6.86L55.39 6.64L54.74 6.49L54.34 6.42L53.86 6.33L53.29 6.24L52.58 6.15L52.36 6.12L51.11 6.04L50.53 6.01L50.13 6.00L49.38 6.00L48.66 6.01ZM84.78 23.79L84.64 23.81L84.51 23.84L84.08 23.95L83.87 24.03L83.63 24.14L83.51 24.21L83.40 24.28L83.18 24.44L82.99 24.62L82.84 24.79L82.66 25.04L82.52 25.27L82.46 25.39L82.39 25.55L82.33 25.72L82.28 25.84L82.18 26.23L82.13 26.49L82.12 26.63L82.11 26.76L82.12 26.89L82.13 27.07L82.15 27.20L82.18 27.38L82.23 27.60L82.28 27.77L82.36 27.98L82.49 28.26L82.55 28.38L82.62 28.49L82.70 28.60L82.79 28.70L82.97 28.90L83.07 28.99L83.20 29.10L83.42 29.26L83.54 29.32L83.66 29.39L84.06 29.57L84.19 29.61L84.32 29.65L84.58 29.70L84.71 29.72L84.84 29.73L85.16 29.74L85.33 29.73L85.47 29.71L85.82 29.65L86.03 29.60L86.16 29.55L86.36 29.47L86.61 29.35L86.76 29.26L86.91 29.16L87.16 28.98L87.43 28.74L87.52 28.65L87.61 28.55L87.73 28.36L87.88 28.09L87.99 27.84L88.04 27.67L88.08 27.55L88.13 27.28L88.15 27.11L88.16 26.97L88.16 26.66L88.14 26.35L88.10 26.09L88.07 25.95L88.03 25.83L87.92 25.53L87.87 25.41L87.78 25.25L87.72 25.14L87.64 25.03L87.48 24.82L87.29 24.63L87.08 24.46L86.83 24.28L86.59 24.15L86.35 24.04L86.10 23.95L85.62 23.83L85.40 23.79L85.27 23.78L85.09 23.77L84.91 23.78ZM63.90 37.84L63.95 37.83L63.99 37.83L64.15 37.92L64.63 38.23L65.01 38.47L65.60 38.87L66.10 39.16L66.54 39.39L66.78 39.50L67.02 39.61L67.44 39.77L68.36 40.10L68.88 40.25L69.05 40.30L69.22 40.34L69.92 40.46L70.15 40.49L70.37 40.52L71.66 40.61L72.15 40.63L72.59 40.62L72.68 40.63L72.72 40.65L72.75 40.68L72.77 40.72L72.76 40.77L72.74 40.81L72.71 40.84L72.60 40.91L72.41 41.03L72.22 41.13L72.01 41.22L71.68 41.35L71.51 41.41L71.00 41.56L70.87 41.59L70.65 41.62L70.25 41.67L69.98 41.69L69.63 41.68L69.31 41.66L69.00 41.62L68.83 41.59L68.66 41.55L68.11 41.37L67.78 41.24L67.41 41.07L67.09 40.91L66.82 40.76L66.63 40.64L66.45 40.51L65.95 40.13L65.68 39.90L65.38 39.64L65.05 39.33L64.77 39.04L64.51 38.74L64.11 38.26L63.92 38.01L63.90 37.98L63.88 37.93L63.88 37.89Z`}),t[4]=y,t[5]=b,t[6]=x):x=t[6];let S;return t[7]!==u||t[8]!==f||t[9]!==_||t[10]!==v||t[11]!==x||t[12]!==d?(S=(0,o.jsxs)(`svg`,{width:d,height:f,viewBox:`0 0 100 100`,xmlns:`http://www.w3.org/2000/svg`,className:u,role:`img`,"aria-label":_,children:[v,x]}),t[7]=u,t[8]=f,t[9]=_,t[10]=v,t[11]=x,t[12]=d,t[13]=S):S=t[13],S};export{s as t};
1
+ import"./rolldown-runtime-hePW80VL.js";import{at as e,it as t}from"./vendor-base-ui-BQjbsJ43.js";import{n}from"./vendor-react-D5d-V1vN.js";import{f as r}from"./button-Bjh2BSXh.js";import{t as i}from"./useThemeSystem-CGF5jnIh.js";var a=n();e();var o=t(),s=e=>{let t=(0,a.c)(14),{className:n,width:s,height:c,isAnimated:l}=e,u=n===void 0?``:n,d=s===void 0?70:s,f=c===void 0?70:c,p=l!==void 0&&l,{t:m}=r(),h=i(),g=h?h.currentTheme.metadata.variant!==`light`:typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches,_;t[0]===m?_=t[1]:(_=m(`yuriLogo.aria.logo`),t[0]=m,t[1]=_);let v;t[2]===p?v=t[3]:(v=p?(0,o.jsx)(`style`,{children:`@keyframes yuri-logo-breathe{50%{opacity:.65}}.yuri-logo-breathe{animation:yuri-logo-breathe 1.8s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.yuri-logo-breathe{animation:none}}`}):null,t[2]=p,t[3]=v);let y=g?`white`:`black`,b=p?`yuri-logo-breathe`:void 0,x;t[4]!==y||t[5]!==b?(x=(0,o.jsx)(`path`,{fill:y,fillRule:`evenodd`,className:b,d:`M48.34 6.03L47.62 6.07L46.95 6.12L46.64 6.15L46.20 6.21L45.36 6.34L44.97 6.42L44.61 6.48L43.53 6.73L43.27 6.79L43.01 6.86L42.16 7.13L41.77 7.24L41.22 7.41L40.38 7.70L39.25 8.13L38.84 8.30L38.28 8.57L37.62 8.85L37.30 9.01L36.95 9.20L36.25 9.59L35.44 10.06L34.74 10.46L34.40 10.67L33.76 11.16L33.51 11.34L32.95 11.71L32.41 12.10L31.98 12.42L31.81 12.56L31.64 12.71L31.06 13.26L30.53 13.75L29.89 14.37L29.30 14.91L29.11 15.10L28.90 15.33L28.71 15.57L28.17 16.29L27.78 16.77L27.42 17.22L27.26 17.44L26.87 17.99L26.58 18.43L26.27 18.87L25.98 19.32L25.77 19.71L25.04 21.09L24.83 21.54L24.51 22.27L24.32 22.73L24.11 23.31L23.97 23.69L23.84 24.11L23.62 24.79L23.45 25.39L23.37 25.79L23.26 26.22L23.20 26.52L23.10 27.10L23.04 27.49L22.92 28.38L22.88 28.87L22.85 29.36L22.84 29.89L22.83 30.38L22.83 31.01L22.84 31.45L22.87 31.85L22.89 32.21L23.02 33.41L23.08 33.89L23.14 34.20L23.24 34.63L23.36 35.06L23.46 35.50L23.62 36.10L23.79 36.66L23.96 37.16L24.14 37.67L24.41 38.37L24.55 38.70L24.93 39.51L25.38 40.48L25.73 41.20L25.85 41.44L26.10 41.86L26.38 42.32L26.89 43.21L27.25 43.83L27.50 44.30L27.83 44.88L27.96 45.16L28.19 45.65L28.34 46.02L28.52 46.48L28.66 46.90L28.85 47.54L29.02 48.19L29.06 48.41L29.14 48.89L29.23 49.42L29.27 49.82L29.30 50.58L29.30 51.24L29.27 52.09L29.25 52.45L29.23 52.67L29.15 53.38L29.06 53.99L28.78 55.40L28.71 55.79L28.52 56.62L28.36 57.22L28.11 57.93L27.59 59.31L27.47 59.60L27.33 59.88L26.73 61.12L26.64 61.28L26.25 61.92L25.96 62.38L25.53 63.10L25.31 63.44L24.96 63.96L23.92 65.41L23.70 65.69L23.25 66.19L23.05 66.42L22.89 66.64L22.52 67.14L22.14 67.58L21.72 68.10L21.36 68.56L21.25 68.70L21.23 68.74L21.23 68.78L21.26 68.82L21.30 68.83L21.34 68.83L22.18 68.73L23.16 68.63L23.38 68.61L24.10 68.60L25.08 68.60L25.43 68.61L25.97 68.64L26.63 68.72L27.08 68.75L27.25 68.78L28.22 68.92L29.19 69.11L29.41 69.15L30.10 69.33L30.70 69.49L31.08 69.61L31.72 69.81L32.23 69.99L32.97 70.28L33.75 70.61L34.40 70.92L34.80 71.11L35.31 71.38L36.00 71.79L36.55 72.09L36.85 72.28L37.58 72.79L38.10 73.14L38.46 73.41L38.70 73.60L39.82 74.49L40.06 74.68L40.49 75.00L40.77 75.22L41.10 75.52L41.55 75.96L41.98 76.35L42.17 76.53L42.39 76.76L42.72 77.18L42.90 77.38L43.02 77.51L43.47 77.94L43.74 78.24L44.15 78.71L44.64 79.29L44.98 79.71L45.13 79.92L45.26 80.16L45.28 80.20L45.29 80.24L45.27 80.27L45.23 80.29L45.19 80.27L44.95 80.08L44.75 79.90L44.40 79.56L44.07 79.26L43.64 78.87L43.44 78.70L42.77 78.16L42.42 77.89L41.51 77.25L40.74 76.64L39.96 76.05L39.26 75.58L38.54 75.12L37.39 74.44L36.59 73.96L36.31 73.81L35.95 73.63L34.83 73.09L33.89 72.67L33.57 72.52L33.11 72.34L31.78 71.84L31.61 71.78L31.23 71.66L30.79 71.55L29.81 71.27L29.20 71.11L29.03 71.07L28.33 70.93L27.71 70.84L27.32 70.77L27.10 70.74L26.83 70.71L26.39 70.68L25.86 70.61L25.28 70.57L24.96 70.56L24.52 70.56L24.03 70.56L23.76 70.58L23.10 70.64L22.30 70.73L22.08 70.76L21.15 70.92L20.72 71.03L20.33 71.12L19.74 71.31L19.15 71.51L18.77 71.64L18.40 71.80L17.87 72.03L17.71 72.11L17.55 72.20L17.21 72.41L16.74 72.75L16.22 73.09L15.90 73.33L15.61 73.54L15.30 73.80L14.97 74.09L14.52 74.53L14.27 74.78L13.90 75.23L13.34 75.92L13.09 76.24L12.89 76.53L12.31 77.49L12.16 77.76L12.06 77.96L11.97 78.16L11.86 78.45L11.84 78.49L11.84 78.54L11.85 78.58L11.88 78.61L11.93 78.62L12.88 78.37L13.40 78.26L14.01 78.14L14.54 78.03L14.84 77.97L15.59 77.87L16.57 77.77L17.32 77.67L17.50 77.66L17.72 77.65L18.52 77.63L19.82 77.63L20.58 77.63L21.87 77.67L22.31 77.70L22.62 77.72L23.65 77.82L24.00 77.86L24.57 77.95L25.24 78.04L25.98 78.16L26.42 78.24L26.91 78.33L27.26 78.39L27.65 78.47L28.13 78.56L28.57 78.67L28.96 78.74L29.31 78.83L29.74 78.92L30.12 79.04L30.94 79.26L31.54 79.44L32.18 79.64L32.98 79.91L33.79 80.15L33.96 80.21L35.30 80.71L36.63 81.22L37.04 81.39L37.58 81.60L38.49 81.98L39.48 82.39L39.92 82.59L40.36 82.81L40.60 82.92L41.18 83.18L41.92 83.49L42.44 83.73L42.84 83.92L43.73 84.34L44.42 84.66L45.15 85.00L45.51 85.18L46.29 85.60L46.66 85.77L47.13 86.01L47.74 86.29L48.22 86.52L49.54 87.17L50.10 87.46L50.94 87.87L52.09 88.45L53.85 89.22L54.05 89.31L54.52 89.56L54.88 89.74L55.21 89.89L55.58 90.05L56.65 90.50L57.21 90.77L57.70 90.99L58.15 91.17L58.48 91.31L58.94 91.47L59.54 91.67L59.92 91.79L60.30 91.92L60.88 92.13L61.59 92.40L62.01 92.55L62.78 92.78L63.99 93.10L64.68 93.28L65.12 93.37L65.55 93.47L66.25 93.62L67.39 93.81L67.75 93.85L68.06 93.88L69.17 93.95L69.70 93.99L70.02 94.00L70.24 93.99L70.28 93.98L70.32 93.96L70.31 93.92L70.28 93.89L70.21 93.84L70.09 93.79L69.55 93.57L69.06 93.35L68.46 93.06L66.66 92.08L66.00 91.71L65.73 91.55L65.35 91.31L64.91 91.01L64.23 90.58L63.75 90.25L63.32 89.94L63.03 89.73L61.99 88.89L61.42 88.46L61.01 88.12L60.74 87.88L60.22 87.39L59.66 86.82L59.10 86.24L58.62 85.78L58.43 85.59L58.24 85.40L57.95 85.06L57.51 84.56L57.09 84.04L56.42 83.25L56.03 82.77L55.87 82.56L55.64 82.23L55.40 81.91L54.98 81.28L54.78 80.98L54.25 80.10L54.00 79.68L53.37 78.55L53.20 78.23L52.81 77.43L52.64 77.07L52.48 76.66L52.12 75.69L51.96 75.23L51.85 74.89L51.76 74.60L51.60 74.04L51.41 73.21L51.34 72.82L51.25 72.38L51.14 71.77L50.98 71.03L50.79 70.29L50.61 69.65L50.45 69.14L50.26 68.59L50.00 67.97L49.91 67.77L49.82 67.61L49.60 67.23L49.21 66.63L49.05 66.42L48.85 66.17L48.71 66.00L48.56 65.84L48.18 65.46L47.95 65.25L47.74 65.08L46.72 64.29L46.52 64.11L46.12 63.75L45.29 62.94L45.10 62.75L44.65 62.26L44.37 61.91L43.99 61.41L43.64 60.90L43.38 60.48L43.16 60.10L43.03 59.86L42.63 59.06L42.31 58.33L42.23 58.12L42.16 57.91L42.15 57.87L42.15 57.82L42.17 57.78L42.21 57.77L42.25 57.78L42.32 57.84L42.41 57.94L42.49 58.04L42.67 58.30L42.80 58.48L43.19 58.96L43.99 59.86L44.18 60.05L44.38 60.24L44.55 60.38L45.02 60.78L45.97 61.60L46.35 61.91L46.63 62.13L46.99 62.39L47.56 62.75L47.79 62.88L49.13 63.59L49.77 63.91L50.54 64.27L51.31 64.62L51.59 64.74L51.97 64.89L53.02 65.27L53.77 65.53L54.40 65.77L55.12 66.01L55.67 66.18L56.58 66.42L57.52 66.70L59.15 67.14L59.84 67.35L60.30 67.51L60.75 67.69L60.96 67.78L61.20 67.90L61.40 68.00L61.59 68.11L61.81 68.26L62.10 68.47L62.28 68.61L62.41 68.72L62.66 68.97L62.81 69.14L62.93 69.28L63.06 69.46L63.21 69.68L64.12 71.16L64.32 71.46L64.45 71.64L64.65 71.88L65.19 72.53L65.49 72.86L65.84 73.20L66.11 73.44L66.31 73.61L66.91 74.08L67.41 74.45L67.67 74.63L68.04 74.87L68.23 74.98L68.28 74.99L68.32 74.97L68.32 74.92L68.32 74.88L68.31 74.84L68.23 74.67L67.56 73.27L67.47 73.06L67.27 72.52L67.16 72.23L66.93 71.46L66.89 71.28L66.85 71.06L66.81 70.75L66.79 70.49L66.78 70.27L66.77 70.00L66.77 69.60L66.78 69.37L66.81 68.97L66.84 68.71L66.90 68.40L66.95 68.14L67.06 67.75L67.12 67.54L67.27 67.12L67.44 66.66L67.51 66.49L67.61 66.29L67.98 65.58L68.38 64.78L68.51 64.50L68.57 64.38L68.64 64.27L68.74 64.12L68.77 64.09L68.81 64.08L68.85 64.11L68.86 64.16L68.85 64.20L68.83 64.33L68.79 64.46L68.73 64.67L68.60 65.05L68.51 65.35L68.39 65.78L68.33 66.04L68.21 66.61L68.07 67.49L68.01 67.98L67.98 68.29L67.96 68.87L67.96 69.31L67.98 69.76L68.01 70.11L68.06 70.47L68.18 71.03L68.22 71.21L68.37 71.72L68.43 71.89L68.53 72.14L68.75 72.63L68.93 72.98L69.39 73.80L69.56 74.11L69.75 74.51L70.07 75.20L70.25 75.71L70.69 76.97L71.04 77.88L71.14 78.18L71.28 78.65L71.46 79.20L71.58 79.54L71.69 79.78L71.78 79.98L71.94 80.30L72.22 80.81L72.62 81.56L72.82 81.91L72.98 82.17L73.30 82.66L73.62 83.14L73.81 83.39L74.24 83.96L74.41 84.17L74.58 84.37L74.83 84.63L75.05 84.84L75.26 85.02L75.30 85.04L75.34 85.05L75.37 85.02L75.37 84.98L75.36 84.94L75.24 84.65L74.99 84.08L74.62 83.21L74.43 82.67L74.06 81.57L73.92 81.01L73.69 79.91L73.57 79.26L73.52 78.90L73.37 77.53L73.33 77.17L73.32 76.86L73.29 76.06L73.28 75.75L73.29 75.44L73.32 74.81L73.34 74.55L73.57 72.78L73.69 72.07L73.82 71.46L73.98 70.54L74.02 70.28L74.10 69.70L74.17 69.04L74.20 68.64L74.22 68.14L74.21 67.83L74.20 67.61L74.19 67.39L74.14 66.99L74.01 66.20L73.95 65.94L73.83 65.51L73.67 65.05L73.51 64.68L73.27 64.19L72.81 63.28L72.70 63.04L72.65 62.91L72.59 62.75L72.54 62.53L72.51 62.35L72.50 62.18L72.50 62.00L72.50 61.86L72.52 61.69L72.55 61.56L72.58 61.43L72.65 61.26L72.72 61.10L72.81 60.94L72.93 60.76L73.02 60.66L73.11 60.56L73.31 60.38L73.69 60.08L73.82 59.95L73.93 59.82L73.98 59.74L74.02 59.66L74.06 59.58L74.10 59.46L74.12 59.33L74.14 59.24L74.14 59.15L74.14 59.06L74.12 58.97L74.09 58.84L74.05 58.72L74.02 58.63L73.96 58.52L73.91 58.44L73.83 58.33L73.78 58.27L73.68 58.18L73.61 58.13L73.53 58.08L73.45 58.05L73.28 58.00L73.06 57.97L72.74 57.96L72.48 57.97L72.25 57.99L71.86 58.03L71.59 58.08L70.33 58.35L70.11 58.41L69.47 58.59L69.17 58.69L68.58 58.87L68.44 58.89L68.31 58.91L68.27 58.90L68.25 58.87L68.26 58.83L68.28 58.80L68.46 58.66L68.67 58.50L68.93 58.32L69.20 58.16L69.59 57.95L69.79 57.85L70.00 57.76L70.20 57.69L71.26 57.34L71.78 57.19L71.95 57.15L72.56 57.02L72.78 56.98L73.14 56.94L73.71 56.90L73.85 56.88L73.97 56.85L74.10 56.81L74.22 56.75L74.34 56.69L74.46 56.62L74.57 56.55L74.67 56.47L74.77 56.38L74.83 56.31L74.89 56.25L74.97 56.14L75.05 55.98L75.11 55.81L75.13 55.73L75.15 55.60L75.16 55.46L75.16 55.33L75.14 54.93L75.10 54.49L75.07 54.31L75.05 54.18L75.00 54.01L74.92 53.80L74.85 53.64L74.76 53.48L74.61 53.26L74.44 53.05L74.23 52.82L73.98 52.57L73.89 52.47L73.86 52.43L73.85 52.39L73.86 52.35L73.88 52.31L73.92 52.29L73.96 52.28L74.09 52.26L74.27 52.26L74.58 52.26L74.94 52.29L75.11 52.31L75.29 52.35L75.59 52.41L75.94 52.48L76.51 52.61L76.86 52.67L77.17 52.70L77.48 52.72L77.75 52.71L77.97 52.68L78.19 52.64L78.36 52.59L78.53 52.53L78.69 52.45L78.85 52.37L79.00 52.27L79.10 52.19L79.20 52.10L79.29 52.00L79.36 51.89L79.45 51.73L79.50 51.61L79.54 51.48L79.57 51.35L79.58 51.22L79.57 51.09L79.56 50.91L79.53 50.78L79.50 50.65L79.36 50.13L79.25 49.75L79.13 49.27L78.88 48.47L78.48 47.14L78.34 46.72L78.08 45.86L77.99 45.57L77.89 45.22L77.64 44.41L77.48 43.86L77.37 43.42L77.27 43.08L77.11 42.48L76.94 41.83L76.86 41.44L76.77 41.09L76.69 40.66L76.56 40.09L76.39 39.21L76.25 38.47L76.18 38.16L76.14 38.04L76.08 37.87L75.99 37.72L75.88 37.53L75.59 37.13L75.39 36.88L75.28 36.75L75.04 36.49L74.65 36.12L74.48 35.97L74.30 35.84L73.80 35.47L73.35 35.17L72.97 34.95L72.42 34.66L71.81 34.38L70.44 33.83L69.90 33.62L69.39 33.45L68.28 33.11L67.77 32.98L67.64 32.93L67.48 32.86L67.44 32.84L67.41 32.81L67.41 32.78L67.44 32.75L67.49 32.74L67.71 32.73L67.98 32.74L68.20 32.77L68.82 32.86L69.30 32.93L70.14 33.07L70.84 33.21L71.10 33.28L72.17 33.58L72.72 33.75L72.94 33.81L73.44 33.99L73.65 34.07L73.86 34.15L74.54 34.48L74.94 34.67L75.30 34.86L75.69 35.08L75.99 35.27L76.28 35.48L76.58 35.74L76.98 36.10L77.21 36.30L77.32 36.38L77.40 36.40L77.48 36.41L77.56 36.39L77.63 36.35L77.74 36.28L77.84 36.19L77.96 36.06L78.07 35.92L78.14 35.80L78.20 35.69L78.26 35.56L78.30 35.44L78.33 35.31L78.35 35.18L78.36 35.04L78.34 34.73L78.31 34.51L78.28 34.34L78.03 33.25L77.92 32.64L77.82 32.20L77.79 32.02L77.77 31.80L77.72 31.27L77.65 30.16L77.57 29.18L77.39 27.94L77.36 27.72L77.28 27.33L77.20 26.89L77.04 26.20L77.00 26.02L76.85 25.51L76.69 24.95L76.49 24.36L76.40 24.11L76.31 23.81L76.23 23.60L76.14 23.39L76.05 23.19L75.61 22.27L75.23 21.51L74.93 20.96L74.38 19.99L73.64 18.82L73.18 18.17L72.96 17.89L72.11 16.91L71.27 15.87L70.77 15.30L70.49 15.02L70.16 14.71L69.60 14.20L69.17 13.81L68.94 13.60L68.54 13.25L68.16 12.94L67.75 12.59L67.54 12.42L67.22 12.18L66.68 11.79L65.94 11.29L65.20 10.79L64.71 10.48L64.05 10.10L62.65 9.33L62.29 9.14L62.01 9.01L61.73 8.87L60.87 8.51L60.34 8.27L59.93 8.08L59.61 7.94L59.15 7.77L58.13 7.42L57.79 7.32L57.50 7.23L56.86 7.03L56.26 6.86L55.39 6.64L54.74 6.49L54.34 6.42L53.86 6.33L53.29 6.24L52.58 6.15L52.36 6.12L51.11 6.04L50.53 6.01L50.13 6.00L49.38 6.00L48.66 6.01ZM84.78 23.79L84.64 23.81L84.51 23.84L84.08 23.95L83.87 24.03L83.63 24.14L83.51 24.21L83.40 24.28L83.18 24.44L82.99 24.62L82.84 24.79L82.66 25.04L82.52 25.27L82.46 25.39L82.39 25.55L82.33 25.72L82.28 25.84L82.18 26.23L82.13 26.49L82.12 26.63L82.11 26.76L82.12 26.89L82.13 27.07L82.15 27.20L82.18 27.38L82.23 27.60L82.28 27.77L82.36 27.98L82.49 28.26L82.55 28.38L82.62 28.49L82.70 28.60L82.79 28.70L82.97 28.90L83.07 28.99L83.20 29.10L83.42 29.26L83.54 29.32L83.66 29.39L84.06 29.57L84.19 29.61L84.32 29.65L84.58 29.70L84.71 29.72L84.84 29.73L85.16 29.74L85.33 29.73L85.47 29.71L85.82 29.65L86.03 29.60L86.16 29.55L86.36 29.47L86.61 29.35L86.76 29.26L86.91 29.16L87.16 28.98L87.43 28.74L87.52 28.65L87.61 28.55L87.73 28.36L87.88 28.09L87.99 27.84L88.04 27.67L88.08 27.55L88.13 27.28L88.15 27.11L88.16 26.97L88.16 26.66L88.14 26.35L88.10 26.09L88.07 25.95L88.03 25.83L87.92 25.53L87.87 25.41L87.78 25.25L87.72 25.14L87.64 25.03L87.48 24.82L87.29 24.63L87.08 24.46L86.83 24.28L86.59 24.15L86.35 24.04L86.10 23.95L85.62 23.83L85.40 23.79L85.27 23.78L85.09 23.77L84.91 23.78ZM63.90 37.84L63.95 37.83L63.99 37.83L64.15 37.92L64.63 38.23L65.01 38.47L65.60 38.87L66.10 39.16L66.54 39.39L66.78 39.50L67.02 39.61L67.44 39.77L68.36 40.10L68.88 40.25L69.05 40.30L69.22 40.34L69.92 40.46L70.15 40.49L70.37 40.52L71.66 40.61L72.15 40.63L72.59 40.62L72.68 40.63L72.72 40.65L72.75 40.68L72.77 40.72L72.76 40.77L72.74 40.81L72.71 40.84L72.60 40.91L72.41 41.03L72.22 41.13L72.01 41.22L71.68 41.35L71.51 41.41L71.00 41.56L70.87 41.59L70.65 41.62L70.25 41.67L69.98 41.69L69.63 41.68L69.31 41.66L69.00 41.62L68.83 41.59L68.66 41.55L68.11 41.37L67.78 41.24L67.41 41.07L67.09 40.91L66.82 40.76L66.63 40.64L66.45 40.51L65.95 40.13L65.68 39.90L65.38 39.64L65.05 39.33L64.77 39.04L64.51 38.74L64.11 38.26L63.92 38.01L63.90 37.98L63.88 37.93L63.88 37.89Z`}),t[4]=y,t[5]=b,t[6]=x):x=t[6];let S;return t[7]!==u||t[8]!==f||t[9]!==_||t[10]!==v||t[11]!==x||t[12]!==d?(S=(0,o.jsxs)(`svg`,{width:d,height:f,viewBox:`0 0 100 100`,xmlns:`http://www.w3.org/2000/svg`,className:u,role:`img`,"aria-label":_,children:[v,x]}),t[7]=u,t[8]=f,t[9]=_,t[10]=v,t[11]=x,t[12]=d,t[13]=S):S=t[13],S};export{s as t};
@@ -1 +1 @@
1
- import{a as e}from"./vendor-zustand-B43HCgwC.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{a as t,n}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as r,t as i}from"./platform-DFJEtBlo.js";import{r as a}from"./vendor-pierre-diffs-Bj9Nqn6w.js";import{s as o}from"./useMobileNavigationStore-BmVr5a5c.js";import{t as s}from"./agentColors-DWSbQXy2.js";import{t as c}from"./rasterizePng-056Poix7.js";var l=`yuri.iosNativeUi`,u=()=>{if(typeof window>`u`)return!1;try{return window.localStorage.getItem(l)===`1`}catch{return!1}},d=e=>{if(!(typeof window>`u`))try{e?window.localStorage.setItem(l,`1`):window.localStorage.removeItem(l)}catch{}},f=e(e=>({enabled:u(),setEnabled:t=>{d(t),e({enabled:t})}})),p=()=>f.getState().enabled,m=()=>f(te),ee=()=>r()&&i()===`ios`;function te(e){return e.enabled}var h=5,g=Math.ceil(h/2);function _(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t>>>0}function ne(e){let t=Array.from({length:h},()=>Array.from({length:h},()=>!1));if(!e)return t;let n=_(e);for(let e=0;e<h;e++)for(let r=0;r<g;r++){let i=(n&1)==1;n>>>=1,t[e][r]=i,t[e][4-r]=i}return t}var re=`yuri-native-ios-composer`,v=`--yuri-native-composer-height`,y=`--yuri-native-composer-accessory`,b=33554432,x=`YuriComposer`,S=`#22c55e`,C=32,w=()=>({open:!1,highlightedIndex:0,query:``,highlightColor:``,rows:[]}),T=()=>({text:``,placeholder:``,modelLabel:``,modelVariantLabel:``,modelIcon:``,canSend:!1,canAbort:!1,attachmentCount:0,attachmentPreviews:[],citationRanges:[],chipRanges:[],appearance:`dark`,attachAria:``,attachTitle:``,attachPhotosLabel:``,attachFilesLabel:``,attachCancelLabel:``,sendAria:``,queueAria:``,stopAria:``,modelAria:``,agentAria:``,agentLabel:``,agentColor:S,agentIdenticon:Array.from({length:25},()=>0),agentIcon:``,suppressed:!0,showScrollToBottom:!1,scrollAria:``,autocomplete:w()}),ie=t(x),ae=e=>e.isCapacitor&&e.platform===`ios`&&e.pluginAvailable&&e.isMobile&&e.nativeUiEnabled!==!1;function oe(e){return typeof window>`u`?!1:ae({isCapacitor:r(),platform:i(),pluginAvailable:n.isPluginAvailable(x),isMobile:e,nativeUiEnabled:p()})}var se=e=>e.classList.contains(`dark`)?`dark`:`light`,ce=e=>{let t=e?.height;return typeof t!=`number`||!Number.isFinite(t)||t<0?0:t},le=(e,t)=>{if(!(t>0)){e.style.removeProperty(v);return}e.style.setProperty(v,`${Math.round(t)}px`)},ue=(e,t)=>{if(!(t>0)){e.style.removeProperty(y);return}e.style.setProperty(y,`${Math.round(t)}px`)},E=(e,t)=>{e.classList.toggle(re,t),t||(e.style.removeProperty(v),e.style.removeProperty(y))},de=e=>ne(e).flat().map(e=>+!!e),D=new Map,O=null,k=e=>{let t=D.get(e);if(t!==void 0)return t;if(typeof document>`u`||typeof getComputedStyle>`u`)return S;!O&&typeof MutationObserver<`u`&&(O=new MutationObserver(()=>{D.clear()}),O.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`style`]}));let n=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=document.createElement(`span`);r.style.color=n||`var(${e})`,document.documentElement.appendChild(r);let i=getComputedStyle(r).color;r.remove();let a=/rgba?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*,\s*|\s+)([\d.]+)/.exec(i);if(!a)return D.set(e,S),S;let o=e=>Math.max(0,Math.min(255,Math.round(Number(e)))).toString(16).padStart(2,`0`),s=`#${o(a[1])}${o(a[2])}${o(a[3])}`;return D.set(e,s),s},fe=e=>k(s(e).var),A=(e,t)=>e.text===t.text&&e.placeholder===t.placeholder&&e.modelLabel===t.modelLabel&&e.modelVariantLabel===t.modelVariantLabel&&e.modelIcon===t.modelIcon&&e.canSend===t.canSend&&e.canAbort===t.canAbort&&e.attachmentCount===t.attachmentCount&&M(e.attachmentPreviews,t.attachmentPreviews)&&N(e.citationRanges,t.citationRanges)&&P(e.chipRanges,t.chipRanges)&&e.appearance===t.appearance&&e.attachAria===t.attachAria&&e.attachTitle===t.attachTitle&&e.attachPhotosLabel===t.attachPhotosLabel&&e.attachFilesLabel===t.attachFilesLabel&&e.attachCancelLabel===t.attachCancelLabel&&e.sendAria===t.sendAria&&e.queueAria===t.queueAria&&e.stopAria===t.stopAria&&e.modelAria===t.modelAria&&e.agentAria===t.agentAria&&e.agentLabel===t.agentLabel&&e.agentColor===t.agentColor&&e.agentIdenticon.join(``)===t.agentIdenticon.join(``)&&e.agentIcon===t.agentIcon&&e.suppressed===t.suppressed&&e.showScrollToBottom===t.showScrollToBottom&&e.scrollAria===t.scrollAria&&j(e.autocomplete,t.autocomplete),j=(e,t)=>e.open===t.open&&e.highlightedIndex===t.highlightedIndex&&e.query===t.query&&e.highlightColor===t.highlightColor&&e.rows.length===t.rows.length&&e.rows.every((e,n)=>{let r=t.rows[n];return!!(r&&e.id===r.id&&e.title===r.title&&e.subtitle===r.subtitle&&e.badge===r.badge&&e.iconBase64===r.iconBase64)}),M=(e,t)=>e.length===t.length&&e.every((e,n)=>{let r=t[n];return!!(r&&e.id===r.id&&e.filename===r.filename&&e.mime===r.mime&&e.thumbnailBase64===r.thumbnailBase64&&e.removeAria===r.removeAria)}),N=(e,t)=>e.length===t.length&&e.every((e,n)=>e.start===t[n]?.start&&e.end===t[n]?.end),P=(e,t)=>e.length===t.length&&e.every((e,n)=>{let r=t[n];return!!(r&&e.start===r.start&&e.end===r.end&&e.triggerLength===r.triggerLength&&e.color===r.color)}),F=(e,t)=>{if(!e||!t||t.length===0)return[];let n=[],r=0;for(let e of t){let t=r;r+=e.text.length;let i=e.visual;if(!i)continue;let a=i.trigger.length;a<1||t+a>r||i.icon&&n.push({start:t,end:r,triggerLength:a,iconName:i.icon})}return n},I=(e,t)=>e.map(e=>({start:e.start,end:e.end,triggerLength:e.triggerLength,color:t})),L=e=>e.map(e=>`${e.id}:${e.filename}:${e.mimeType}:${e.dataUrl?.length??0}`).join(`|`),R=e=>{let t=e?.id;return typeof t==`string`&&t.trim()?t:``},z=e=>{if(typeof e==`number`&&Number.isFinite(e)&&e>=0)return Math.floor(e);if(typeof e==`string`&&e.trim()){let t=Number(e);if(Number.isFinite(t)&&t>=0)return Math.floor(t)}return null},B=e=>{let t=z(e?.selectionStart);if(t===null)return null;let n=z(e?.selectionEnd);return{start:t,end:n!==null&&n>=t?n:t}},V=e=>z(e?.index)??0,pe=(e,t)=>{let n=Math.max(0,e);return typeof t!=`number`||!Number.isFinite(t)?n:Math.max(0,Math.min(Math.floor(t),n))},me=e=>e.nextText===e.nativeOwnedText?{omitText:!0,forceText:!1}:e.nextText.length===0&&e.nativeOwnedText.length>0||e.preset?{omitText:!1,forceText:!0}:e.echoingNative?{omitText:!0,forceText:!1}:{omitText:!1,forceText:!0},he=e=>e.replacedText!==null&&e.incoming===e.replacedText,ge=e=>setTimeout(e,0),_e=e=>{e.applyDocument(e.text),ge(e.submit)},H=(e,t)=>e===t,ve=(e,t,n,r)=>{if(n.omitText&&e&&A(e,t))return null;let i={};if(n.omitText||(i.text=t.text,n.forceText&&(i.forceText=!0),n.forceText&&typeof r?.caret==`number`&&Number.isFinite(r.caret)&&(i.caret=Math.max(0,Math.floor(r.caret)))),!e){let{text:e,...n}=t;return Object.assign(i,n),i}let a=(n,r)=>{r(e[n],t[n])||(i[n]=t[n])};return a(`placeholder`,H),a(`modelLabel`,H),a(`modelVariantLabel`,H),a(`modelIcon`,H),a(`canSend`,H),a(`canAbort`,H),a(`attachmentCount`,H),a(`attachmentPreviews`,M),a(`citationRanges`,N),a(`chipRanges`,P),a(`appearance`,H),a(`attachAria`,H),a(`attachTitle`,H),a(`attachPhotosLabel`,H),a(`attachFilesLabel`,H),a(`attachCancelLabel`,H),a(`sendAria`,H),a(`queueAria`,H),a(`stopAria`,H),a(`modelAria`,H),a(`agentAria`,H),a(`agentLabel`,H),a(`agentColor`,H),a(`agentIdenticon`,(e,t)=>e.join(``)===t.join(``)),a(`agentIcon`,H),a(`suppressed`,H),a(`showScrollToBottom`,H),a(`scrollAria`,H),a(`autocomplete`,j),Object.keys(i).length===0?null:i},ye=e=>{let t=Array.isArray(e?.skipped)?e.skipped:[],n=[];for(let e of t){if(!e||typeof e!=`object`)continue;let t=e.name;typeof t==`string`&&t.trim()&&n.push(t)}return n},be=e=>{try{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}catch{return null}},xe=(e,t=b)=>{let n=Array.isArray(e?.files)?e.files:[],r=[];for(let e of n){if(!e||typeof e!=`object`)continue;let n=e;if(typeof n.dataBase64!=`string`||n.dataBase64.length===0)continue;let i=be(n.dataBase64);if(!i||i.byteLength===0||i.byteLength>t)continue;let a=typeof n.name==`string`&&n.name.trim()?n.name:`file`,o=typeof n.mime==`string`&&n.mime.trim()?n.mime:`application/octet-stream`;r.push(new File([new Uint8Array(i)],a,{type:o}))}return r},U=80,Se=e=>typeof document>`u`||!e||!e.startsWith(`data:image/`)?Promise.resolve(null):new Promise(t=>{let n=new Image;n.decoding=`async`,n.onload=()=>{try{let e=document.createElement(`canvas`);e.width=U,e.height=U;let r=e.getContext(`2d`);if(!r){t(null);return}r.clearRect(0,0,U,U),r.drawImage(n,0,0,U,U);let i=e.toDataURL(`image/jpeg`,.72),a=i.indexOf(`,`);t(a>=0?i.slice(a+1):null)}catch{t(null)}},n.onerror=()=>t(null),n.src=e}),Ce=e=>c(e,C),W=()=>ie,G=((e=W)=>{let t=0,n=null,r=[],i=null,a=``,o=!1,s=!1,c=()=>{n!==null&&(clearTimeout(n),n=null)},l=(e,...t)=>{let n=i;n&&n[e](...t)},u=async()=>{if(r.length>0)return;let t=e(),n=await Promise.all([t.addListener(`textChanged`,e=>{let t=typeof e.text==`string`?e.text:``;a=t,l(`onText`,t,e.composing===!0,B(e))}),t.addListener(`send`,e=>{let t=typeof e.text==`string`?e.text:a;a=t,l(`onSend`,t)}),t.addListener(`abort`,()=>{l(`onAbort`)}),t.addListener(`attach`,()=>{l(`onAttach`)}),t.addListener(`filesPicked`,t=>{l(`onFiles`,xe(t),ye(t)),e().focus()}),t.addListener(`removeAttachment`,e=>{let t=R(e);t&&l(`onRemoveAttachment`,t)}),t.addListener(`openModel`,()=>{l(`onOpenModel`)}),t.addListener(`cycleAgent`,()=>{l(`onCycleAgent`)}),t.addListener(`openAgent`,()=>{l(`onOpenAgent`)}),t.addListener(`heightChanged`,e=>{l(`onHeight`,ce(e))}),t.addListener(`scrollToBottom`,()=>{l(`onScrollToBottom`)}),t.addListener(`autocompleteAccept`,e=>{l(`onAutocompleteAccept`,V(e))}),t.addListener(`autocompleteDismiss`,()=>{l(`onAutocompleteDismiss`)})]);if(r.length>0){for(let e of n)e.remove();return}r=n},d=n=>{t>0||(i=null,o=!1,E(n,!1),e().dismiss())};return{bind(e){i=e},rememberText(e){a=e},rememberState(e){a=e.text},conceal(){o||t===0||(o=!0,e().hide())},reveal(){!o||t===0||(o=!1,e().show())},async warm(){s||t>0||(s=!0,await e().present(T()))},async retain(n,i){c(),t+=1,o=!1,s=!0,a=i.text,E(n,!0),r.length===0&&await u(),await e().present(i)},release(e){t=Math.max(0,t-1),!(t>0)&&(c(),n=setTimeout(()=>{n=null,d(e)},0))},shutdown(n=document.documentElement){c();let r=s||t>0;t=0,s=!1,o=!1,i=null,E(n,!1),r&&e().dismiss()},snapshot(){return{retainCount:t,listenerCount:r.length,hidePending:n!==null,concealed:o,warmed:s}}}})(),we=()=>t(`YuriNavigation`),K=e=>e?.kind===`chat`||e?.kind===`draft`,q=e=>e?e.kind===`draft`||e.kind===`chat`&&e.routes.length<=1:!1,Te=(e,t)=>K(e)&&!K(t),Ee=(e=G)=>{q(o.getState().secondary)&&e.conceal()},De=(e=G)=>{let t=o.subscribe((t,n)=>{Te(n.secondary,t.secondary)&&e.conceal()}),r=[],i=!1;return n.getPlatform()===`ios`&&(async()=>{let t=we(),n=await t.addListener(`backStarted`,()=>{q(o.getState().secondary)&&e.conceal()}),a=await t.addListener(`backCancelled`,()=>{e.reveal()});if(i){n.remove(),a.remove();return}r=[n,a]})(),()=>{i=!0,t();for(let e of r)e.remove();r=[]}},Oe=e=>/^#[0-9a-fA-F]{6}$/.test(e),ke=e=>/^#[0-9a-fA-F]{8}$/.test(e),Ae=(e,t)=>/^[0-9a-fA-F]{2}$/.test(t)?Oe(e)?`${e}${t}`:ke(e)?`${e.slice(0,7)}${t}`:e:e,J=(e,t)=>typeof e==`string`&&e.trim().length>0?e:t,je=e=>{let t=e.colors.syntax.base,n=e.colors.syntax.tokens??{},r=(e,t)=>J(n[e],t);return[{name:`plain`,scope:[`source`,`support.type.property-name.css`],settings:{foreground:t.foreground}},{name:`classes`,scope:[`entity.name.type.class`],settings:{foreground:r(`className`,r(`class`,t.function))}},{name:`interfaces`,scope:[`entity.name.type.interface`,`entity.name.type`],settings:{foreground:r(`interface`,t.type)}},{name:`structs`,scope:[`entity.name.type.struct`],settings:{foreground:r(`struct`,t.function)}},{name:`enums`,scope:[`entity.name.type.enum`],settings:{foreground:r(`enum`,t.function)}},{name:`keys`,scope:[`meta.object-literal.key`,`support.type.property-name`],settings:{foreground:r(`key`,t.function)}},{name:`methods`,scope:[`entity.name.function.method`,`meta.function.method`],settings:{foreground:r(`method`,e.colors.status.success)}},{name:`functions`,scope:[`entity.name.function`,`support.function`,`meta.function-call.generic`],settings:{foreground:t.function,fontStyle:`bold`}},{name:`variables`,scope:[`variable`,`meta.variable`,`variable.other.object.property`],settings:{foreground:t.variable}},{name:`variablesOther`,scope:[`variable.other.object`,`variable.other.readwrite.alias`],settings:{foreground:r(`variableOther`,r(`method`,e.colors.status.success))}},{name:`globalVariables`,scope:[`variable.other.global`,`variable.language.this`],settings:{foreground:r(`variableGlobal`,t.number)}},{name:`localVariables`,scope:[`variable.other.local`],settings:{foreground:r(`variableLocal`,e.colors.surface.elevated)}},{name:`parameters`,scope:[`variable.parameter`,`meta.parameter`],settings:{foreground:r(`parameter`,t.foreground)}},{name:`properties`,scope:[`variable.other.property`,`meta.property`],settings:{foreground:r(`variableProperty`,e.colors.status.info)}},{name:`strings`,scope:[`string`,`string.other.link`,`markup.inline.raw.string.markdown`],settings:{foreground:t.string}},{name:`stringEscapeSequences`,scope:[`constant.character.escape`,`constant.other.placeholder`],settings:{foreground:r(`stringEscape`,t.foreground)}},{name:`keywords`,scope:[`keyword`],settings:{foreground:t.keyword}},{name:`keywordsControl`,scope:[`keyword.control.import`,`keyword.control.from`,`keyword.import`],settings:{foreground:r(`keywordImport`,t.operator)}},{name:`storageModifiers`,scope:[`storage.modifier`,`keyword.modifier`,`storage.type`],settings:{foreground:r(`storageModifier`,t.keyword)}},{name:`comments`,scope:[`comment`,`punctuation.definition.comment`],settings:{foreground:t.comment}},{name:`docComments`,scope:[`comment.documentation`,`comment.line.documentation`],settings:{foreground:r(`commentDoc`,e.colors.surface.mutedForeground)}},{name:`numbers`,scope:[`constant.numeric`],settings:{foreground:t.number}},{name:`booleans`,scope:[`constant.language`],settings:{foreground:r(`boolean`,t.type)}},{name:`operators`,scope:[`keyword.operator`],settings:{foreground:t.operator}},{name:`macros`,scope:[`entity.name.function.preprocessor`,`meta.preprocessor`],settings:{foreground:r(`macro`,t.keyword)}},{name:`preprocessor`,scope:[`meta.preprocessor`],settings:{foreground:r(`preprocessor`,r(`label`,t.number))}},{name:`urls`,scope:[`markup.underline.link`],settings:{foreground:r(`url`,e.colors.status.info)}},{name:`tags`,scope:[`entity.name.tag`],settings:{foreground:r(`tag`,t.keyword)}},{name:`jsxTags`,scope:[`support.class.component`],settings:{foreground:r(`jsxTag`,r(`label`,t.number))}},{name:`attributes`,scope:[`entity.other.attribute-name`,`meta.attribute`],settings:{foreground:r(`tagAttribute`,t.type)}},{name:`types`,scope:[`support.type`],settings:{foreground:t.type}},{name:`constants`,scope:[`variable.other.constant`,`variable.readonly`],settings:{foreground:r(`constant`,t.foreground)}},{name:`labels`,scope:[`entity.name.label`,`punctuation.definition.label`],settings:{foreground:r(`label`,r(`variableGlobal`,t.number))}},{name:`namespaces`,scope:[`entity.name.namespace`,`storage.modifier.namespace`,`markup.bold.markdown`],settings:{foreground:r(`namespace`,t.type)}},{name:`modules`,scope:[`entity.name.module`,`storage.modifier.module`],settings:{foreground:r(`module`,t.operator)}},{name:`typeParameters`,scope:[`variable.type.parameter`,`variable.parameter.type`],settings:{foreground:r(`typeParameter`,t.function)}},{name:`exceptions`,scope:[`keyword.control.exception`,`keyword.control.trycatch`],settings:{foreground:r(`exception`,r(`label`,t.number))}},{name:`decorators`,scope:[`meta.decorator`,`punctuation.decorator`,`entity.name.function.decorator`],settings:{foreground:r(`decorator`,t.type)}},{name:`calls`,scope:[`variable.function`],settings:{foreground:t.foreground}},{name:`punctuation`,scope:[`punctuation`,`punctuation.terminator`,`punctuation.definition.tag`,`punctuation.separator`,`punctuation.definition.string`,`punctuation.section.block`],settings:{foreground:r(`punctuation`,t.comment)}},{name:`yellow`,scope:[`storage.type.numeric.go`,`storage.type.byte.go`,`storage.type.boolean.go`,`storage.type.string.go`,`storage.type.uintptr.go`,`storage.type.error.go`,`storage.type.rune.go`,`constant.language.go`,`support.class.dart`,`keyword.other.documentation`,`storage.modifier.import.java`,`punctuation.definition.list.begin.markdown`,`punctuation.definition.quote.begin.markdown`,`meta.separator.markdown`,`entity.name.section.markdown`],settings:{foreground:t.type}},{name:`green`,scope:[],settings:{foreground:r(`method`,e.colors.status.success)}},{name:`cyan`,scope:[`markup.italic.markdown`,`support.type.python`,`variable.legacy.builtin.python`,`support.constant.property-value.css`,`storage.modifier.attribute.swift`],settings:{foreground:t.string}},{name:`blue`,scope:[],settings:{foreground:t.keyword}},{name:`purple`,scope:[`keyword.channel.go`,`keyword.other.platform.os.swift`],settings:{foreground:t.number}},{name:`magenta`,scope:[`punctuation.definition.heading.markdown`],settings:{foreground:r(`label`,r(`variableGlobal`,t.number))}},{name:`red`,scope:[],settings:{foreground:t.operator}},{name:`orange`,scope:[],settings:{foreground:t.function}}]},Y=e=>{let t=e.colors.surface,n=e.colors.interactive,r=e.colors.status,i=e.colors.syntax.base,a=e.colors.syntax.highlights??{},o=J(a.diffAddedBackground,r.successBackground),s=J(a.diffRemovedBackground,r.errorBackground);return{"editor.background":t.background,"editor.foreground":t.foreground,"editor.hoverHighlightBackground":J(n.hover,t.subtle),"editor.lineHighlightBackground":t.muted,"editor.selectionBackground":n.selection,"editor.selectionHighlightBackground":n.selection,"editor.findMatchBackground":i.type,"editor.findMatchHighlightBackground":Ae(i.type,`cc`),"editor.findRangeHighlightBackground":t.muted,"editor.inactiveSelectionBackground":t.elevated,"editor.lineHighlightBorder":t.elevated,"editor.rangeHighlightBackground":J(n.active,n.borderHover),"notifications.background":t.elevated,"editorInlayHint.typeBackground":t.subtle,"editorInlayHint.typeForeground":t.foreground,"editorWhitespace.foreground":n.borderHover,"editorIndentGuide.background1":t.subtle,"editorHoverWidget.background":t.elevated,"editorLineNumber.activeForeground":J(a.lineNumberActive,t.foreground),"editorLineNumber.foreground":J(a.lineNumber,t.mutedForeground),"editorGutter.background":t.background,"editorGutter.modifiedBackground":r.info,"editorGutter.addedBackground":r.success,"editorGutter.deletedBackground":r.error,"editorBracketMatch.background":t.elevated,"editorBracketMatch.border":t.subtle,"editorError.foreground":r.error,"editorWarning.foreground":r.warning,"editorInfo.foreground":r.info,"diffEditor.insertedTextBackground":o,"diffEditor.removedTextBackground":s,"editorGroupHeader.tabsBackground":t.background,"editorGroup.border":n.border,"tab.activeBackground":t.background,"tab.inactiveBackground":t.muted,"tab.inactiveForeground":t.mutedForeground,"tab.activeForeground":t.foreground,"tab.hoverBackground":t.subtle,"tab.unfocusedHoverBackground":t.subtle,"tab.border":n.border,"tab.activeModifiedBorder":i.type,"tab.inactiveModifiedBorder":r.info,"tab.unfocusedActiveModifiedBorder":i.type,"tab.unfocusedInactiveModifiedBorder":r.info,"editorWidget.background":t.muted,"editorWidget.border":n.border,"editorSuggestWidget.background":t.background,"editorSuggestWidget.border":n.border,"editorSuggestWidget.foreground":t.foreground,"editorSuggestWidget.highlightForeground":t.mutedForeground,"editorSuggestWidget.selectedBackground":t.subtle,"peekView.border":n.border,"peekViewEditor.background":t.background,"peekViewEditor.matchHighlightBackground":t.subtle,"peekViewResult.background":t.muted,"peekViewResult.fileForeground":t.foreground,"peekViewResult.lineForeground":t.mutedForeground,"peekViewResult.matchHighlightBackground":t.subtle,"peekViewResult.selectionBackground":t.elevated,"peekViewResult.selectionForeground":t.mutedForeground,"peekViewTitle.background":t.subtle,"peekViewTitleDescription.foreground":t.mutedForeground,"peekViewTitleLabel.foreground":t.foreground,"merge.currentHeaderBackground":r.success,"merge.currentContentBackground":J(a.diffAdded,r.success),"merge.incomingHeaderBackground":r.info,"merge.incomingContentBackground":J(a.diffModified,r.info),"merge.border":n.border,"merge.commonContentBackground":t.subtle,"merge.commonHeaderBackground":t.muted,"panel.background":t.background,"panel.border":n.border,"panelTitle.activeBorder":n.borderHover,"panelTitle.activeForeground":t.foreground,"panelTitle.inactiveForeground":t.mutedForeground,"statusBar.background":t.background,"statusBar.foreground":t.foreground,"statusBar.border":n.border,"statusBar.debuggingBackground":r.error,"statusBar.debuggingForeground":r.errorForeground,"statusBar.noFolderBackground":t.subtle,"statusBar.noFolderForeground":t.mutedForeground,"titleBar.activeBackground":t.background,"titleBar.activeForeground":t.foreground,"titleBar.inactiveBackground":t.muted,"titleBar.inactiveForeground":t.mutedForeground,"titleBar.border":n.border,"menu.foreground":t.foreground,"menu.background":t.background,"menu.selectionForeground":t.foreground,"menu.selectionBackground":t.subtle,"menu.border":n.border,"editorInlayHint.foreground":t.mutedForeground,"editorInlayHint.background":t.subtle,"terminal.foreground":t.foreground,"terminal.background":t.background,"terminalCursor.foreground":t.foreground,"terminalCursor.background":t.background,"terminal.ansiRed":J(a.diffRemoved,r.error),"terminal.ansiGreen":J(a.diffAdded,r.success),"terminal.ansiYellow":r.warning,"terminal.ansiBlue":J(a.diffModified,r.info),"terminal.ansiMagenta":i.keyword,"terminal.ansiCyan":i.type,"activityBar.background":t.background,"activityBar.foreground":t.foreground,"activityBar.inactiveForeground":t.mutedForeground,"activityBar.activeBorder":t.foreground,"activityBar.border":n.border,"sideBar.background":t.background,"sideBar.foreground":t.foreground,"sideBar.border":n.border,"sideBarTitle.foreground":t.foreground,"sideBarSectionHeader.background":t.muted,"sideBarSectionHeader.foreground":t.foreground,"sideBarSectionHeader.border":n.border,"sideBar.activeBackground":t.subtle,"sideBar.activeForeground":t.foreground,"sideBar.hoverBackground":t.muted,"sideBar.hoverForeground":t.foreground,"list.warningForeground":r.warning,"list.errorForeground":r.error,"list.inactiveSelectionBackground":t.subtle,"list.activeSelectionBackground":t.elevated,"list.inactiveSelectionForeground":t.foreground,"list.activeSelectionForeground":t.foreground,"list.hoverForeground":t.foreground,"list.hoverBackground":t.muted,"input.background":t.muted,"input.foreground":t.foreground,"input.border":n.border,"input.placeholderForeground":t.mutedForeground,"inputOption.activeBorder":n.border,"inputOption.activeBackground":t.elevated,"inputOption.activeForeground":t.foreground,"inputValidation.infoBackground":r.infoBackground,"inputValidation.infoBorder":r.infoBorder,"inputValidation.warningBackground":r.warningBackground,"inputValidation.warningBorder":r.warningBorder,"inputValidation.errorBackground":r.errorBackground,"inputValidation.errorBorder":r.errorBorder,"dropdown.background":t.muted,"dropdown.foreground":t.foreground,"dropdown.border":n.border,"dropdown.listBackground":t.background,"badge.background":e.colors.primary.base,"activityBarBadge.background":e.colors.primary.base,"button.background":e.colors.primary.base,"button.foreground":J(e.colors.primary.foreground,t.background),"badge.foreground":J(e.colors.primary.foreground,t.background),"activityBarBadge.foreground":J(e.colors.primary.foreground,t.background)}};function Me(e){return{name:e.metadata.name,type:e.metadata.variant,colors:Y(e),tokenColors:je(e)}}var Ne=e=>/^#[0-9a-fA-F]{8}$/.test(e),X=e=>Ne(e)?e.slice(0,7):e;function Pe(e,t){return Object.defineProperty(e,"toString",{value:()=>t,enumerable:!1,configurable:!0}),Object.defineProperty(e,Symbol.toPrimitive,{value:()=>t,enumerable:!1,configurable:!0}),e}var Z=new Map,Q=new Set,Fe=(e,t)=>{let n=e.colors?.[`editor.background`],r=e.colors?.[`editor.foreground`],i=n?X(n):void 0,a=r?X(r):void 0;if(!i||!a)throw Error(`Theme "${t}" is missing editor.background/editor.foreground`);let o=e.tokenColors??[];return Pe({...e,name:t,fg:a,bg:i,settings:o},t)},Ie=e=>Me(e),$=e=>{let t=Z.get(e.metadata.id);if(t)return t;let n=Fe(Ie(e),e.metadata.id);return Z.set(e.metadata.id,n),n},Le=e=>{let t=e.metadata.id;if(Q.has(t))return;let n=$(e);a(t,async()=>n),Q.add(t)};export{p as A,Ce as C,E as D,me as E,f as M,he as O,Se as S,k as T,F as _,G as a,se as b,le as c,ve as d,oe as f,j as g,_e as h,Ee as i,m as j,ee as k,L as l,W as m,$ as n,v as o,w as p,De as r,ue as s,Le as t,I as u,A as v,pe as w,de as x,fe as y};
1
+ import{a as e}from"./vendor-zustand-B43HCgwC.js";import"./brand-storage-bootstrap-D4BW3w-M.js";import{a as t,n}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{n as r,t as i}from"./platform-DFJEtBlo.js";import{r as a}from"./vendor-pierre-diffs-Bj9Nqn6w.js";import{s as o}from"./useMobileNavigationStore-DlvrZQ49.js";import{t as s}from"./agentColors-DWSbQXy2.js";import{t as c}from"./rasterizePng-056Poix7.js";var l=`yuri.iosNativeUi`,u=()=>{if(typeof window>`u`)return!1;try{return window.localStorage.getItem(l)===`1`}catch{return!1}},d=e=>{if(!(typeof window>`u`))try{e?window.localStorage.setItem(l,`1`):window.localStorage.removeItem(l)}catch{}},f=e(e=>({enabled:u(),setEnabled:t=>{d(t),e({enabled:t})}})),p=()=>f.getState().enabled,m=()=>f(te),ee=()=>r()&&i()===`ios`;function te(e){return e.enabled}var h=5,g=Math.ceil(h/2);function _(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t>>>0}function ne(e){let t=Array.from({length:h},()=>Array.from({length:h},()=>!1));if(!e)return t;let n=_(e);for(let e=0;e<h;e++)for(let r=0;r<g;r++){let i=(n&1)==1;n>>>=1,t[e][r]=i,t[e][4-r]=i}return t}var re=`yuri-native-ios-composer`,v=`--yuri-native-composer-height`,y=`--yuri-native-composer-accessory`,b=33554432,x=`YuriComposer`,S=`#22c55e`,C=32,w=()=>({open:!1,highlightedIndex:0,query:``,highlightColor:``,rows:[]}),T=()=>({text:``,placeholder:``,modelLabel:``,modelVariantLabel:``,modelIcon:``,canSend:!1,canAbort:!1,attachmentCount:0,attachmentPreviews:[],citationRanges:[],chipRanges:[],appearance:`dark`,attachAria:``,attachTitle:``,attachPhotosLabel:``,attachFilesLabel:``,attachCancelLabel:``,sendAria:``,queueAria:``,stopAria:``,modelAria:``,agentAria:``,agentLabel:``,agentColor:S,agentIdenticon:Array.from({length:25},()=>0),agentIcon:``,suppressed:!0,showScrollToBottom:!1,scrollAria:``,autocomplete:w()}),ie=t(x),ae=e=>e.isCapacitor&&e.platform===`ios`&&e.pluginAvailable&&e.isMobile&&e.nativeUiEnabled!==!1;function oe(e){return typeof window>`u`?!1:ae({isCapacitor:r(),platform:i(),pluginAvailable:n.isPluginAvailable(x),isMobile:e,nativeUiEnabled:p()})}var se=e=>e.classList.contains(`dark`)?`dark`:`light`,ce=e=>{let t=e?.height;return typeof t!=`number`||!Number.isFinite(t)||t<0?0:t},le=(e,t)=>{if(!(t>0)){e.style.removeProperty(v);return}e.style.setProperty(v,`${Math.round(t)}px`)},ue=(e,t)=>{if(!(t>0)){e.style.removeProperty(y);return}e.style.setProperty(y,`${Math.round(t)}px`)},E=(e,t)=>{e.classList.toggle(re,t),t||(e.style.removeProperty(v),e.style.removeProperty(y))},de=e=>ne(e).flat().map(e=>+!!e),D=new Map,O=null,k=e=>{let t=D.get(e);if(t!==void 0)return t;if(typeof document>`u`||typeof getComputedStyle>`u`)return S;!O&&typeof MutationObserver<`u`&&(O=new MutationObserver(()=>{D.clear()}),O.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`,`style`]}));let n=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=document.createElement(`span`);r.style.color=n||`var(${e})`,document.documentElement.appendChild(r);let i=getComputedStyle(r).color;r.remove();let a=/rgba?\(\s*([\d.]+)(?:\s*,\s*|\s+)([\d.]+)(?:\s*,\s*|\s+)([\d.]+)/.exec(i);if(!a)return D.set(e,S),S;let o=e=>Math.max(0,Math.min(255,Math.round(Number(e)))).toString(16).padStart(2,`0`),s=`#${o(a[1])}${o(a[2])}${o(a[3])}`;return D.set(e,s),s},fe=e=>k(s(e).var),A=(e,t)=>e.text===t.text&&e.placeholder===t.placeholder&&e.modelLabel===t.modelLabel&&e.modelVariantLabel===t.modelVariantLabel&&e.modelIcon===t.modelIcon&&e.canSend===t.canSend&&e.canAbort===t.canAbort&&e.attachmentCount===t.attachmentCount&&M(e.attachmentPreviews,t.attachmentPreviews)&&N(e.citationRanges,t.citationRanges)&&P(e.chipRanges,t.chipRanges)&&e.appearance===t.appearance&&e.attachAria===t.attachAria&&e.attachTitle===t.attachTitle&&e.attachPhotosLabel===t.attachPhotosLabel&&e.attachFilesLabel===t.attachFilesLabel&&e.attachCancelLabel===t.attachCancelLabel&&e.sendAria===t.sendAria&&e.queueAria===t.queueAria&&e.stopAria===t.stopAria&&e.modelAria===t.modelAria&&e.agentAria===t.agentAria&&e.agentLabel===t.agentLabel&&e.agentColor===t.agentColor&&e.agentIdenticon.join(``)===t.agentIdenticon.join(``)&&e.agentIcon===t.agentIcon&&e.suppressed===t.suppressed&&e.showScrollToBottom===t.showScrollToBottom&&e.scrollAria===t.scrollAria&&j(e.autocomplete,t.autocomplete),j=(e,t)=>e.open===t.open&&e.highlightedIndex===t.highlightedIndex&&e.query===t.query&&e.highlightColor===t.highlightColor&&e.rows.length===t.rows.length&&e.rows.every((e,n)=>{let r=t.rows[n];return!!(r&&e.id===r.id&&e.title===r.title&&e.subtitle===r.subtitle&&e.badge===r.badge&&e.iconBase64===r.iconBase64)}),M=(e,t)=>e.length===t.length&&e.every((e,n)=>{let r=t[n];return!!(r&&e.id===r.id&&e.filename===r.filename&&e.mime===r.mime&&e.thumbnailBase64===r.thumbnailBase64&&e.removeAria===r.removeAria)}),N=(e,t)=>e.length===t.length&&e.every((e,n)=>e.start===t[n]?.start&&e.end===t[n]?.end),P=(e,t)=>e.length===t.length&&e.every((e,n)=>{let r=t[n];return!!(r&&e.start===r.start&&e.end===r.end&&e.triggerLength===r.triggerLength&&e.color===r.color)}),F=(e,t)=>{if(!e||!t||t.length===0)return[];let n=[],r=0;for(let e of t){let t=r;r+=e.text.length;let i=e.visual;if(!i)continue;let a=i.trigger.length;a<1||t+a>r||i.icon&&n.push({start:t,end:r,triggerLength:a,iconName:i.icon})}return n},I=(e,t)=>e.map(e=>({start:e.start,end:e.end,triggerLength:e.triggerLength,color:t})),L=e=>e.map(e=>`${e.id}:${e.filename}:${e.mimeType}:${e.dataUrl?.length??0}`).join(`|`),R=e=>{let t=e?.id;return typeof t==`string`&&t.trim()?t:``},z=e=>{if(typeof e==`number`&&Number.isFinite(e)&&e>=0)return Math.floor(e);if(typeof e==`string`&&e.trim()){let t=Number(e);if(Number.isFinite(t)&&t>=0)return Math.floor(t)}return null},B=e=>{let t=z(e?.selectionStart);if(t===null)return null;let n=z(e?.selectionEnd);return{start:t,end:n!==null&&n>=t?n:t}},V=e=>z(e?.index)??0,pe=(e,t)=>{let n=Math.max(0,e);return typeof t!=`number`||!Number.isFinite(t)?n:Math.max(0,Math.min(Math.floor(t),n))},me=e=>e.nextText===e.nativeOwnedText?{omitText:!0,forceText:!1}:e.nextText.length===0&&e.nativeOwnedText.length>0||e.preset?{omitText:!1,forceText:!0}:e.echoingNative?{omitText:!0,forceText:!1}:{omitText:!1,forceText:!0},he=e=>e.replacedText!==null&&e.incoming===e.replacedText,ge=e=>setTimeout(e,0),_e=e=>{e.applyDocument(e.text),ge(e.submit)},H=(e,t)=>e===t,ve=(e,t,n,r)=>{if(n.omitText&&e&&A(e,t))return null;let i={};if(n.omitText||(i.text=t.text,n.forceText&&(i.forceText=!0),n.forceText&&typeof r?.caret==`number`&&Number.isFinite(r.caret)&&(i.caret=Math.max(0,Math.floor(r.caret)))),!e){let{text:e,...n}=t;return Object.assign(i,n),i}let a=(n,r)=>{r(e[n],t[n])||(i[n]=t[n])};return a(`placeholder`,H),a(`modelLabel`,H),a(`modelVariantLabel`,H),a(`modelIcon`,H),a(`canSend`,H),a(`canAbort`,H),a(`attachmentCount`,H),a(`attachmentPreviews`,M),a(`citationRanges`,N),a(`chipRanges`,P),a(`appearance`,H),a(`attachAria`,H),a(`attachTitle`,H),a(`attachPhotosLabel`,H),a(`attachFilesLabel`,H),a(`attachCancelLabel`,H),a(`sendAria`,H),a(`queueAria`,H),a(`stopAria`,H),a(`modelAria`,H),a(`agentAria`,H),a(`agentLabel`,H),a(`agentColor`,H),a(`agentIdenticon`,(e,t)=>e.join(``)===t.join(``)),a(`agentIcon`,H),a(`suppressed`,H),a(`showScrollToBottom`,H),a(`scrollAria`,H),a(`autocomplete`,j),Object.keys(i).length===0?null:i},ye=e=>{let t=Array.isArray(e?.skipped)?e.skipped:[],n=[];for(let e of t){if(!e||typeof e!=`object`)continue;let t=e.name;typeof t==`string`&&t.trim()&&n.push(t)}return n},be=e=>{try{let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}catch{return null}},xe=(e,t=b)=>{let n=Array.isArray(e?.files)?e.files:[],r=[];for(let e of n){if(!e||typeof e!=`object`)continue;let n=e;if(typeof n.dataBase64!=`string`||n.dataBase64.length===0)continue;let i=be(n.dataBase64);if(!i||i.byteLength===0||i.byteLength>t)continue;let a=typeof n.name==`string`&&n.name.trim()?n.name:`file`,o=typeof n.mime==`string`&&n.mime.trim()?n.mime:`application/octet-stream`;r.push(new File([new Uint8Array(i)],a,{type:o}))}return r},U=80,Se=e=>typeof document>`u`||!e||!e.startsWith(`data:image/`)?Promise.resolve(null):new Promise(t=>{let n=new Image;n.decoding=`async`,n.onload=()=>{try{let e=document.createElement(`canvas`);e.width=U,e.height=U;let r=e.getContext(`2d`);if(!r){t(null);return}r.clearRect(0,0,U,U),r.drawImage(n,0,0,U,U);let i=e.toDataURL(`image/jpeg`,.72),a=i.indexOf(`,`);t(a>=0?i.slice(a+1):null)}catch{t(null)}},n.onerror=()=>t(null),n.src=e}),Ce=e=>c(e,C),W=()=>ie,G=((e=W)=>{let t=0,n=null,r=[],i=null,a=``,o=!1,s=!1,c=()=>{n!==null&&(clearTimeout(n),n=null)},l=(e,...t)=>{let n=i;n&&n[e](...t)},u=async()=>{if(r.length>0)return;let t=e(),n=await Promise.all([t.addListener(`textChanged`,e=>{let t=typeof e.text==`string`?e.text:``;a=t,l(`onText`,t,e.composing===!0,B(e))}),t.addListener(`send`,e=>{let t=typeof e.text==`string`?e.text:a;a=t,l(`onSend`,t)}),t.addListener(`abort`,()=>{l(`onAbort`)}),t.addListener(`attach`,()=>{l(`onAttach`)}),t.addListener(`filesPicked`,t=>{l(`onFiles`,xe(t),ye(t)),e().focus()}),t.addListener(`removeAttachment`,e=>{let t=R(e);t&&l(`onRemoveAttachment`,t)}),t.addListener(`openModel`,()=>{l(`onOpenModel`)}),t.addListener(`cycleAgent`,()=>{l(`onCycleAgent`)}),t.addListener(`openAgent`,()=>{l(`onOpenAgent`)}),t.addListener(`heightChanged`,e=>{l(`onHeight`,ce(e))}),t.addListener(`scrollToBottom`,()=>{l(`onScrollToBottom`)}),t.addListener(`autocompleteAccept`,e=>{l(`onAutocompleteAccept`,V(e))}),t.addListener(`autocompleteDismiss`,()=>{l(`onAutocompleteDismiss`)})]);if(r.length>0){for(let e of n)e.remove();return}r=n},d=n=>{t>0||(i=null,o=!1,E(n,!1),e().dismiss())};return{bind(e){i=e},rememberText(e){a=e},rememberState(e){a=e.text},conceal(){o||t===0||(o=!0,e().hide())},reveal(){!o||t===0||(o=!1,e().show())},async warm(){s||t>0||(s=!0,await e().present(T()))},async retain(n,i){c(),t+=1,o=!1,s=!0,a=i.text,E(n,!0),r.length===0&&await u(),await e().present(i)},release(e){t=Math.max(0,t-1),!(t>0)&&(c(),n=setTimeout(()=>{n=null,d(e)},0))},shutdown(n=document.documentElement){c();let r=s||t>0;t=0,s=!1,o=!1,i=null,E(n,!1),r&&e().dismiss()},snapshot(){return{retainCount:t,listenerCount:r.length,hidePending:n!==null,concealed:o,warmed:s}}}})(),we=()=>t(`YuriNavigation`),K=e=>e?.kind===`chat`||e?.kind===`draft`,q=e=>e?e.kind===`draft`||e.kind===`chat`&&e.routes.length<=1:!1,Te=(e,t)=>K(e)&&!K(t),Ee=(e=G)=>{q(o.getState().secondary)&&e.conceal()},De=(e=G)=>{let t=o.subscribe((t,n)=>{Te(n.secondary,t.secondary)&&e.conceal()}),r=[],i=!1;return n.getPlatform()===`ios`&&(async()=>{let t=we(),n=await t.addListener(`backStarted`,()=>{q(o.getState().secondary)&&e.conceal()}),a=await t.addListener(`backCancelled`,()=>{e.reveal()});if(i){n.remove(),a.remove();return}r=[n,a]})(),()=>{i=!0,t();for(let e of r)e.remove();r=[]}},Oe=e=>/^#[0-9a-fA-F]{6}$/.test(e),ke=e=>/^#[0-9a-fA-F]{8}$/.test(e),Ae=(e,t)=>/^[0-9a-fA-F]{2}$/.test(t)?Oe(e)?`${e}${t}`:ke(e)?`${e.slice(0,7)}${t}`:e:e,J=(e,t)=>typeof e==`string`&&e.trim().length>0?e:t,je=e=>{let t=e.colors.syntax.base,n=e.colors.syntax.tokens??{},r=(e,t)=>J(n[e],t);return[{name:`plain`,scope:[`source`,`support.type.property-name.css`],settings:{foreground:t.foreground}},{name:`classes`,scope:[`entity.name.type.class`],settings:{foreground:r(`className`,r(`class`,t.function))}},{name:`interfaces`,scope:[`entity.name.type.interface`,`entity.name.type`],settings:{foreground:r(`interface`,t.type)}},{name:`structs`,scope:[`entity.name.type.struct`],settings:{foreground:r(`struct`,t.function)}},{name:`enums`,scope:[`entity.name.type.enum`],settings:{foreground:r(`enum`,t.function)}},{name:`keys`,scope:[`meta.object-literal.key`,`support.type.property-name`],settings:{foreground:r(`key`,t.function)}},{name:`methods`,scope:[`entity.name.function.method`,`meta.function.method`],settings:{foreground:r(`method`,e.colors.status.success)}},{name:`functions`,scope:[`entity.name.function`,`support.function`,`meta.function-call.generic`],settings:{foreground:t.function,fontStyle:`bold`}},{name:`variables`,scope:[`variable`,`meta.variable`,`variable.other.object.property`],settings:{foreground:t.variable}},{name:`variablesOther`,scope:[`variable.other.object`,`variable.other.readwrite.alias`],settings:{foreground:r(`variableOther`,r(`method`,e.colors.status.success))}},{name:`globalVariables`,scope:[`variable.other.global`,`variable.language.this`],settings:{foreground:r(`variableGlobal`,t.number)}},{name:`localVariables`,scope:[`variable.other.local`],settings:{foreground:r(`variableLocal`,e.colors.surface.elevated)}},{name:`parameters`,scope:[`variable.parameter`,`meta.parameter`],settings:{foreground:r(`parameter`,t.foreground)}},{name:`properties`,scope:[`variable.other.property`,`meta.property`],settings:{foreground:r(`variableProperty`,e.colors.status.info)}},{name:`strings`,scope:[`string`,`string.other.link`,`markup.inline.raw.string.markdown`],settings:{foreground:t.string}},{name:`stringEscapeSequences`,scope:[`constant.character.escape`,`constant.other.placeholder`],settings:{foreground:r(`stringEscape`,t.foreground)}},{name:`keywords`,scope:[`keyword`],settings:{foreground:t.keyword}},{name:`keywordsControl`,scope:[`keyword.control.import`,`keyword.control.from`,`keyword.import`],settings:{foreground:r(`keywordImport`,t.operator)}},{name:`storageModifiers`,scope:[`storage.modifier`,`keyword.modifier`,`storage.type`],settings:{foreground:r(`storageModifier`,t.keyword)}},{name:`comments`,scope:[`comment`,`punctuation.definition.comment`],settings:{foreground:t.comment}},{name:`docComments`,scope:[`comment.documentation`,`comment.line.documentation`],settings:{foreground:r(`commentDoc`,e.colors.surface.mutedForeground)}},{name:`numbers`,scope:[`constant.numeric`],settings:{foreground:t.number}},{name:`booleans`,scope:[`constant.language`],settings:{foreground:r(`boolean`,t.type)}},{name:`operators`,scope:[`keyword.operator`],settings:{foreground:t.operator}},{name:`macros`,scope:[`entity.name.function.preprocessor`,`meta.preprocessor`],settings:{foreground:r(`macro`,t.keyword)}},{name:`preprocessor`,scope:[`meta.preprocessor`],settings:{foreground:r(`preprocessor`,r(`label`,t.number))}},{name:`urls`,scope:[`markup.underline.link`],settings:{foreground:r(`url`,e.colors.status.info)}},{name:`tags`,scope:[`entity.name.tag`],settings:{foreground:r(`tag`,t.keyword)}},{name:`jsxTags`,scope:[`support.class.component`],settings:{foreground:r(`jsxTag`,r(`label`,t.number))}},{name:`attributes`,scope:[`entity.other.attribute-name`,`meta.attribute`],settings:{foreground:r(`tagAttribute`,t.type)}},{name:`types`,scope:[`support.type`],settings:{foreground:t.type}},{name:`constants`,scope:[`variable.other.constant`,`variable.readonly`],settings:{foreground:r(`constant`,t.foreground)}},{name:`labels`,scope:[`entity.name.label`,`punctuation.definition.label`],settings:{foreground:r(`label`,r(`variableGlobal`,t.number))}},{name:`namespaces`,scope:[`entity.name.namespace`,`storage.modifier.namespace`,`markup.bold.markdown`],settings:{foreground:r(`namespace`,t.type)}},{name:`modules`,scope:[`entity.name.module`,`storage.modifier.module`],settings:{foreground:r(`module`,t.operator)}},{name:`typeParameters`,scope:[`variable.type.parameter`,`variable.parameter.type`],settings:{foreground:r(`typeParameter`,t.function)}},{name:`exceptions`,scope:[`keyword.control.exception`,`keyword.control.trycatch`],settings:{foreground:r(`exception`,r(`label`,t.number))}},{name:`decorators`,scope:[`meta.decorator`,`punctuation.decorator`,`entity.name.function.decorator`],settings:{foreground:r(`decorator`,t.type)}},{name:`calls`,scope:[`variable.function`],settings:{foreground:t.foreground}},{name:`punctuation`,scope:[`punctuation`,`punctuation.terminator`,`punctuation.definition.tag`,`punctuation.separator`,`punctuation.definition.string`,`punctuation.section.block`],settings:{foreground:r(`punctuation`,t.comment)}},{name:`yellow`,scope:[`storage.type.numeric.go`,`storage.type.byte.go`,`storage.type.boolean.go`,`storage.type.string.go`,`storage.type.uintptr.go`,`storage.type.error.go`,`storage.type.rune.go`,`constant.language.go`,`support.class.dart`,`keyword.other.documentation`,`storage.modifier.import.java`,`punctuation.definition.list.begin.markdown`,`punctuation.definition.quote.begin.markdown`,`meta.separator.markdown`,`entity.name.section.markdown`],settings:{foreground:t.type}},{name:`green`,scope:[],settings:{foreground:r(`method`,e.colors.status.success)}},{name:`cyan`,scope:[`markup.italic.markdown`,`support.type.python`,`variable.legacy.builtin.python`,`support.constant.property-value.css`,`storage.modifier.attribute.swift`],settings:{foreground:t.string}},{name:`blue`,scope:[],settings:{foreground:t.keyword}},{name:`purple`,scope:[`keyword.channel.go`,`keyword.other.platform.os.swift`],settings:{foreground:t.number}},{name:`magenta`,scope:[`punctuation.definition.heading.markdown`],settings:{foreground:r(`label`,r(`variableGlobal`,t.number))}},{name:`red`,scope:[],settings:{foreground:t.operator}},{name:`orange`,scope:[],settings:{foreground:t.function}}]},Y=e=>{let t=e.colors.surface,n=e.colors.interactive,r=e.colors.status,i=e.colors.syntax.base,a=e.colors.syntax.highlights??{},o=J(a.diffAddedBackground,r.successBackground),s=J(a.diffRemovedBackground,r.errorBackground);return{"editor.background":t.background,"editor.foreground":t.foreground,"editor.hoverHighlightBackground":J(n.hover,t.subtle),"editor.lineHighlightBackground":t.muted,"editor.selectionBackground":n.selection,"editor.selectionHighlightBackground":n.selection,"editor.findMatchBackground":i.type,"editor.findMatchHighlightBackground":Ae(i.type,`cc`),"editor.findRangeHighlightBackground":t.muted,"editor.inactiveSelectionBackground":t.elevated,"editor.lineHighlightBorder":t.elevated,"editor.rangeHighlightBackground":J(n.active,n.borderHover),"notifications.background":t.elevated,"editorInlayHint.typeBackground":t.subtle,"editorInlayHint.typeForeground":t.foreground,"editorWhitespace.foreground":n.borderHover,"editorIndentGuide.background1":t.subtle,"editorHoverWidget.background":t.elevated,"editorLineNumber.activeForeground":J(a.lineNumberActive,t.foreground),"editorLineNumber.foreground":J(a.lineNumber,t.mutedForeground),"editorGutter.background":t.background,"editorGutter.modifiedBackground":r.info,"editorGutter.addedBackground":r.success,"editorGutter.deletedBackground":r.error,"editorBracketMatch.background":t.elevated,"editorBracketMatch.border":t.subtle,"editorError.foreground":r.error,"editorWarning.foreground":r.warning,"editorInfo.foreground":r.info,"diffEditor.insertedTextBackground":o,"diffEditor.removedTextBackground":s,"editorGroupHeader.tabsBackground":t.background,"editorGroup.border":n.border,"tab.activeBackground":t.background,"tab.inactiveBackground":t.muted,"tab.inactiveForeground":t.mutedForeground,"tab.activeForeground":t.foreground,"tab.hoverBackground":t.subtle,"tab.unfocusedHoverBackground":t.subtle,"tab.border":n.border,"tab.activeModifiedBorder":i.type,"tab.inactiveModifiedBorder":r.info,"tab.unfocusedActiveModifiedBorder":i.type,"tab.unfocusedInactiveModifiedBorder":r.info,"editorWidget.background":t.muted,"editorWidget.border":n.border,"editorSuggestWidget.background":t.background,"editorSuggestWidget.border":n.border,"editorSuggestWidget.foreground":t.foreground,"editorSuggestWidget.highlightForeground":t.mutedForeground,"editorSuggestWidget.selectedBackground":t.subtle,"peekView.border":n.border,"peekViewEditor.background":t.background,"peekViewEditor.matchHighlightBackground":t.subtle,"peekViewResult.background":t.muted,"peekViewResult.fileForeground":t.foreground,"peekViewResult.lineForeground":t.mutedForeground,"peekViewResult.matchHighlightBackground":t.subtle,"peekViewResult.selectionBackground":t.elevated,"peekViewResult.selectionForeground":t.mutedForeground,"peekViewTitle.background":t.subtle,"peekViewTitleDescription.foreground":t.mutedForeground,"peekViewTitleLabel.foreground":t.foreground,"merge.currentHeaderBackground":r.success,"merge.currentContentBackground":J(a.diffAdded,r.success),"merge.incomingHeaderBackground":r.info,"merge.incomingContentBackground":J(a.diffModified,r.info),"merge.border":n.border,"merge.commonContentBackground":t.subtle,"merge.commonHeaderBackground":t.muted,"panel.background":t.background,"panel.border":n.border,"panelTitle.activeBorder":n.borderHover,"panelTitle.activeForeground":t.foreground,"panelTitle.inactiveForeground":t.mutedForeground,"statusBar.background":t.background,"statusBar.foreground":t.foreground,"statusBar.border":n.border,"statusBar.debuggingBackground":r.error,"statusBar.debuggingForeground":r.errorForeground,"statusBar.noFolderBackground":t.subtle,"statusBar.noFolderForeground":t.mutedForeground,"titleBar.activeBackground":t.background,"titleBar.activeForeground":t.foreground,"titleBar.inactiveBackground":t.muted,"titleBar.inactiveForeground":t.mutedForeground,"titleBar.border":n.border,"menu.foreground":t.foreground,"menu.background":t.background,"menu.selectionForeground":t.foreground,"menu.selectionBackground":t.subtle,"menu.border":n.border,"editorInlayHint.foreground":t.mutedForeground,"editorInlayHint.background":t.subtle,"terminal.foreground":t.foreground,"terminal.background":t.background,"terminalCursor.foreground":t.foreground,"terminalCursor.background":t.background,"terminal.ansiRed":J(a.diffRemoved,r.error),"terminal.ansiGreen":J(a.diffAdded,r.success),"terminal.ansiYellow":r.warning,"terminal.ansiBlue":J(a.diffModified,r.info),"terminal.ansiMagenta":i.keyword,"terminal.ansiCyan":i.type,"activityBar.background":t.background,"activityBar.foreground":t.foreground,"activityBar.inactiveForeground":t.mutedForeground,"activityBar.activeBorder":t.foreground,"activityBar.border":n.border,"sideBar.background":t.background,"sideBar.foreground":t.foreground,"sideBar.border":n.border,"sideBarTitle.foreground":t.foreground,"sideBarSectionHeader.background":t.muted,"sideBarSectionHeader.foreground":t.foreground,"sideBarSectionHeader.border":n.border,"sideBar.activeBackground":t.subtle,"sideBar.activeForeground":t.foreground,"sideBar.hoverBackground":t.muted,"sideBar.hoverForeground":t.foreground,"list.warningForeground":r.warning,"list.errorForeground":r.error,"list.inactiveSelectionBackground":t.subtle,"list.activeSelectionBackground":t.elevated,"list.inactiveSelectionForeground":t.foreground,"list.activeSelectionForeground":t.foreground,"list.hoverForeground":t.foreground,"list.hoverBackground":t.muted,"input.background":t.muted,"input.foreground":t.foreground,"input.border":n.border,"input.placeholderForeground":t.mutedForeground,"inputOption.activeBorder":n.border,"inputOption.activeBackground":t.elevated,"inputOption.activeForeground":t.foreground,"inputValidation.infoBackground":r.infoBackground,"inputValidation.infoBorder":r.infoBorder,"inputValidation.warningBackground":r.warningBackground,"inputValidation.warningBorder":r.warningBorder,"inputValidation.errorBackground":r.errorBackground,"inputValidation.errorBorder":r.errorBorder,"dropdown.background":t.muted,"dropdown.foreground":t.foreground,"dropdown.border":n.border,"dropdown.listBackground":t.background,"badge.background":e.colors.primary.base,"activityBarBadge.background":e.colors.primary.base,"button.background":e.colors.primary.base,"button.foreground":J(e.colors.primary.foreground,t.background),"badge.foreground":J(e.colors.primary.foreground,t.background),"activityBarBadge.foreground":J(e.colors.primary.foreground,t.background)}};function Me(e){return{name:e.metadata.name,type:e.metadata.variant,colors:Y(e),tokenColors:je(e)}}var Ne=e=>/^#[0-9a-fA-F]{8}$/.test(e),X=e=>Ne(e)?e.slice(0,7):e;function Pe(e,t){return Object.defineProperty(e,"toString",{value:()=>t,enumerable:!1,configurable:!0}),Object.defineProperty(e,Symbol.toPrimitive,{value:()=>t,enumerable:!1,configurable:!0}),e}var Z=new Map,Q=new Set,Fe=(e,t)=>{let n=e.colors?.[`editor.background`],r=e.colors?.[`editor.foreground`],i=n?X(n):void 0,a=r?X(r):void 0;if(!i||!a)throw Error(`Theme "${t}" is missing editor.background/editor.foreground`);let o=e.tokenColors??[];return Pe({...e,name:t,fg:a,bg:i,settings:o},t)},Ie=e=>Me(e),$=e=>{let t=Z.get(e.metadata.id);if(t)return t;let n=Fe(Ie(e),e.metadata.id);return Z.set(e.metadata.id,n),n},Le=e=>{let t=e.metadata.id;if(Q.has(t))return;let n=$(e);a(t,async()=>n),Q.add(t)};export{p as A,Ce as C,E as D,me as E,f as M,he as O,Se as S,k as T,F as _,G as a,se as b,le as c,ve as d,oe as f,j as g,_e as h,Ee as i,m as j,ee as k,L as l,W as m,$ as n,v as o,w as p,De as r,ue as s,Le as t,I as u,A as v,pe as w,de as x,fe as y};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{_ as t,v as n,x as r}from"./desktop-JwYqThiw.js";import{at as i,it as a}from"./vendor-base-ui-BQjbsJ43.js";import{n as o}from"./vendor-react-D5d-V1vN.js";import{a as s,i as c,o as l,t as u}from"./store-CkIHVrmT.js";import{n as d,t as f}from"./vendor-class-variance-authority-BLUaYARZ.js";import{t as p}from"./vendor-tailwind-merge-BicNWLTg.js";var m=e(i(),1),h=o(),g=async(e,r)=>{if(!t())throw Error(`Desktop runtime is not available`);return n(e,r)},_=async()=>{if(r())try{await g(`desktop_start_window_drag`)}catch{}},v=async e=>{if(r())try{await g(`desktop_set_window_title`,{title:e})}catch{}},y=async(e,t)=>{if(r())try{await g(`desktop_set_window_theme`,{themeMode:e,themeVariant:t})}catch{}},ee=async e=>{if(r())try{await g(`desktop_set_menu_locale`,{locale:e})}catch{}},b=async()=>{if(!r())return null;try{let e=await g(`desktop_get_app_version`);return typeof e==`string`&&e.trim().length>0?e:null}catch{return null}},x=m.createContext(null),S=a(),C=e=>{let t=(0,h.c)(19),{children:n}=e,r=c(w),i=c(te),a=c(T),o=c(ne),d,f;t[0]===r?(d=t[1],f=t[2]):(d=()=>{typeof document>`u`||(document.documentElement.lang=r)},f=[r],t[0]=r,t[1]=d,t[2]=f),m.useEffect(d,f);let p,g;t[3]!==a||t[4]!==r?(p=()=>{a===null&&ee(r)},g=[r,a],t[3]=a,t[4]=r,t[5]=p,t[6]=g):(p=t[5],g=t[6]),m.useEffect(p,g);let _;t[7]===i?_=t[8]:(_=(e,t)=>u(i,e,t),t[7]=i,t[8]=_);let v=_,y;t[9]===v?y=t[10]:(y=e=>v(l[e]),t[9]=v,t[10]=y);let b;t[11]!==r||t[12]!==o||t[13]!==v||t[14]!==y?(b={locale:r,locales:s,setLocale:o,label:y,t:v},t[11]=r,t[12]=o,t[13]=v,t[14]=y,t[15]=b):b=t[15];let C=b,E;return t[16]!==n||t[17]!==C?(E=(0,S.jsx)(x.Provider,{value:C,children:n}),t[16]=n,t[17]=C,t[18]=E):E=t[18],E};function w(e){return e.locale}function te(e){return e.dictionary}function T(e){return e.loadingLocale}function ne(e){return e.setLocale}var E={startingApi:`Starting OpenCode API…`,initializing:`Initializing…`,connecting:`Connecting…`,connected:`Connected!`,connectionError:`Connection error`,disconnected:`Disconnected`,reconnecting:`Reconnecting…`,initialDataLoadFailed:`OpenCode connected, but initial data load failed.`,cliNotFound:`OpenCode CLI not found. Please install it first.`,providersReady:`✓ Providers`,providersLoading:`… Providers`,agentsReady:`✓ Agents`,agentsLoading:`… Agents`,startingDevServer:e=>`Starting webview dev server (${e})...`,waitingDevServer:(e,t)=>`Waiting for webview dev server (${e})... attempt ${t}`,loadingData:(e,t)=>`Loading data (${e}, ${t})…`},re={startingApi:`Démarrage de l’API OpenCode…`,initializing:`Initialisation…`,connecting:`Connexion…`,connected:`Connecté !`,connectionError:`Erreur de connexion`,disconnected:`Déconnecté`,reconnecting:`Reconnexion…`,initialDataLoadFailed:`OpenCode est connecté, mais le chargement initial des données a échoué.`,cliNotFound:`L’interface en ligne de commande OpenCode est introuvable. Veuillez l’installer d’abord.`,providersReady:`✓ Fournisseurs`,providersLoading:`… Fournisseurs`,agentsReady:`✓ Agents`,agentsLoading:`… Agents`,startingDevServer:e=>`Démarrage du serveur de développement de la webview (${e})...`,waitingDevServer:(e,t)=>`En attente du serveur de développement de la webview (${e})... tentative ${t}`,loadingData:(e,t)=>`Chargement des données (${e}, ${t})…`},D={startingApi:`正在启动 OpenCode API…`,initializing:`正在初始化…`,connecting:`正在连接…`,connected:`已连接!`,connectionError:`连接错误`,disconnected:`已断开连接`,reconnecting:`正在重新连接…`,initialDataLoadFailed:`OpenCode 已连接,但初始数据加载失败。`,cliNotFound:`未找到 OpenCode CLI。请先安装它。`,providersReady:`✓ 提供商`,providersLoading:`… 提供商`,agentsReady:`✓ Agent`,agentsLoading:`… Agent`,startingDevServer:e=>`正在启动 webview 开发服务器 (${e})...`,waitingDevServer:(e,t)=>`正在等待 webview 开发服务器 (${e})... 第 ${t} 次尝试`,loadingData:(e,t)=>`正在加载数据 (${e}, ${t})…`},O={startingApi:`正在啟動 OpenCode API…`,initializing:`正在初始化…`,connecting:`正在連線…`,connected:`已連線!`,connectionError:`連線錯誤`,disconnected:`已中斷連線`,reconnecting:`正在重新連線…`,initialDataLoadFailed:`OpenCode 已連線,但初始資料載入失敗。`,cliNotFound:`找不到 OpenCode CLI。請先安裝。`,providersReady:`✓ 提供者`,providersLoading:`… 提供者`,agentsReady:`✓ 代理`,agentsLoading:`… 代理`,startingDevServer:e=>`正在啟動 webview 開發伺服器 (${e})...`,waitingDevServer:(e,t)=>`正在等待 webview 開發伺服器 (${e})... 第 ${t} 次嘗試`,loadingData:(e,t)=>`正在載入資料 (${e}, ${t})…`},k={startingApi:`Запуск OpenCode API…`,initializing:`Ініціалізація…`,connecting:`Підключення…`,connected:`Підключено!`,connectionError:`Помилка підключення`,disconnected:`Відключено`,reconnecting:`Повторне підключення…`,initialDataLoadFailed:`OpenCode підключено, але початкове завантаження даних не вдалося.`,cliNotFound:`OpenCode CLI не знайдено. Спершу встановіть його.`,providersReady:`✓ Провайдери`,providersLoading:`… Провайдери`,agentsReady:`✓ Агенти`,agentsLoading:`… Агенти`,startingDevServer:e=>`Запуск dev-сервера webview (${e})...`,waitingDevServer:(e,t)=>`Очікування dev-сервера webview (${e})... спроба ${t}`,loadingData:(e,t)=>`Завантаження даних (${e}, ${t})…`},A={startingApi:`Iniciando la API de OpenCode…`,initializing:`Inicializando…`,connecting:`Conectando…`,connected:`¡Conectado!`,connectionError:`Error de conexión`,disconnected:`Desconectado`,reconnecting:`Reconectando…`,initialDataLoadFailed:`OpenCode se conectó, pero falló la carga inicial de datos.`,cliNotFound:`No se encontró OpenCode CLI. Instálalo primero.`,providersReady:`✓ Proveedores`,providersLoading:`… Proveedores`,agentsReady:`✓ Agentes`,agentsLoading:`… Agentes`,startingDevServer:e=>`Iniciando el servidor de desarrollo de webview (${e})...`,waitingDevServer:(e,t)=>`Esperando el servidor de desarrollo de webview (${e})... intento ${t}`,loadingData:(e,t)=>`Cargando datos (${e}, ${t})…`},j={startingApi:`Iniciando a API do OpenCode…`,initializing:`Inicializando…`,connecting:`Conectando…`,connected:`Conectado!`,connectionError:`Erro de conexão`,disconnected:`Desconectado`,reconnecting:`Reconectando…`,initialDataLoadFailed:`OpenCode conectado, mas o carregamento inicial dos dados falhou.`,cliNotFound:`OpenCode CLI não encontrado. Instale-o primeiro.`,providersReady:`✓ Provedores`,providersLoading:`… Provedores`,agentsReady:`✓ Agentes`,agentsLoading:`… Agentes`,startingDevServer:e=>`Iniciando o servidor de desenvolvimento da webview (${e})...`,waitingDevServer:(e,t)=>`Aguardando o servidor de desenvolvimento da webview (${e})... tentativa ${t}`,loadingData:(e,t)=>`Carregando dados (${e}, ${t})…`},M={startingApi:`OpenCode API 시작 중…`,initializing:`초기화 중…`,connecting:`연결 중…`,connected:`연결됨!`,connectionError:`연결 오류`,disconnected:`연결 끊김`,reconnecting:`다시 연결 중…`,initialDataLoadFailed:`OpenCode에 연결되었지만 초기 데이터 로드에 실패했습니다.`,cliNotFound:`OpenCode CLI를 찾을 수 없습니다. 먼저 설치하세요.`,providersReady:`✓ 공급자`,providersLoading:`… 공급자`,agentsReady:`✓ 에이전트`,agentsLoading:`… 에이전트`,startingDevServer:e=>`webview 개발 서버 시작 중 (${e})...`,waitingDevServer:(e,t)=>`webview 개발 서버 대기 중 (${e})... ${t}번째 시도`,loadingData:(e,t)=>`데이터 로드 중 (${e}, ${t})…`},N={startingApi:`Uruchamianie API OpenCode…`,initializing:`Inicjalizacja…`,connecting:`Łączenie…`,connected:`Połączono!`,connectionError:`Błąd połączenia`,disconnected:`Rozłączono`,reconnecting:`Ponowne łączenie…`,initialDataLoadFailed:`OpenCode połączony, ale początkowe ładowanie danych nie powiodło się.`,cliNotFound:`Nie znaleziono OpenCode CLI. Najpierw go zainstaluj.`,providersReady:`✓ Dostawcy`,providersLoading:`… Dostawcy`,agentsReady:`✓ Agenci`,agentsLoading:`… Agenci`,startingDevServer:e=>`Uruchamianie serwera deweloperskiego webview (${e})...`,waitingDevServer:(e,t)=>`Oczekiwanie na serwer deweloperski webview (${e})... próba ${t}`,loadingData:(e,t)=>`Ładowanie danych (${e}, ${t})…`},P={startingApi:`OpenCode API を起動中…`,initializing:`初期化中…`,connecting:`接続中…`,connected:`接続完了!`,connectionError:`接続エラー`,disconnected:`切断されました`,reconnecting:`再接続中…`,initialDataLoadFailed:`OpenCode に接続しましたが、初期データの読み込みに失敗しました。`,cliNotFound:`OpenCode CLI が見つかりません。先にインストールしてください。`,providersReady:`✓ プロバイダ`,providersLoading:`… プロバイダ`,agentsReady:`✓ エージェント`,agentsLoading:`… エージェント`,startingDevServer:e=>`Webview 開発サーバーを起動中 (${e})...`,waitingDevServer:(e,t)=>`Webview 開発サーバーを待機中 (${e})... 試行 ${t}`,loadingData:(e,t)=>`データを読み込み中 (${e}, ${t})…`},F=e=>I[e],I={en:E,fr:re,"zh-CN":D,"zh-TW":O,uk:k,es:A,"pt-BR":j,ko:M,pl:N,ja:P},L={en:`en-US`,fr:`fr-FR`,"zh-CN":`zh-CN`,"zh-TW":`zh-TW`,uk:`uk-UA`,es:`es-ES`,"pt-BR":`pt-BR`,ko:`ko-KR`,pl:`pl-PL`,ja:`ja-JP`},R=e=>L[e]??`en-US`,z=()=>R(c.getState().locale);function B(){let e=m.useContext(x);if(!e)throw Error(`useI18n must be used within I18nProvider`);return e}async function V(e){let t=null;if(typeof navigator<`u`&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),{ok:!0,method:`clipboard`}}catch(e){t=e instanceof Error?e.message:String(e)}if(typeof document<`u`&&document.body){let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`-1000px`,t.style.left=`-1000px`,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length);let n=document.execCommand(`copy`);if(document.body.removeChild(t),n)return{ok:!0,method:`execCommand`}}return{ok:!1,error:t??`Clipboard access denied in current context`}}function H(...e){return p(d(e))}var U=()=>typeof navigator>`u`?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||``),W=()=>typeof navigator>`u`?!1:/Windows/.test(navigator.userAgent||``),G=()=>U()?`common.revealPath.finder`:W()?`common.revealPath.fileExplorer`:`common.revealPath.fileManager`,K=e=>U()&&r()?e.metaKey:e.ctrlKey,q=()=>U()&&r()?`⌘`:`Ctrl`,J=(e,t)=>{let n=e??``,r=Math.max(16,t?.maxLength??45);if(n.length<=r)return n;let i=n.split(`/`);if(i.length<=1)return n;let a=i.pop()??``;if(!a)return n;let o=Math.max(0,r-(a.length+2));if(o<=0)return`…/${a}`;let s=``;for(let e of i){if(!e)continue;let t=s?`${s}/${e}`:e;if(t.length>o)break;s=t}if(!s){let e=i[0]??``;s=e?e.slice(0,o):``}return s?`${s}…/${a}`:`…/${a}`},Y=e=>e?e===`/`?`/`:e.replace(/\/+$/,``):``;function X(e,t){if(!e)return``;let n=Y(e);if(n===`/`)return`/`;let r=t?Y(t):void 0;if(r&&r!==`/`){if(n===r)return`~`;if(n.startsWith(`${r}/`)){let e=n.slice(r.length+1);return e?`~/${e}`:`~`}}return n}function ie(e,t){if(!e)return`/`;let n=Y(e);if(!n||n===`/`)return`/`;let r=t?Y(t):void 0;return r&&r!==`/`&&n===r?`~`:n.split(`/`).pop()||n||`/`}function ae(e,t){let n=(0,h.c)(3),r;return n[0]!==e||n[1]!==t?(r=n=>{for(let r of[e,t])r&&(typeof r==`function`?r(n):r.current=n)},n[0]=e,n[1]=t,n[2]=r):r=n[2],r}function oe(e,t){let n={...t};for(let r in e){let i=t[r],a=e[r];n[r]=/^on[A-Z]/.test(r)&&typeof i==`function`&&typeof a==`function`?(...e)=>{a(...e),i(...e)}:r===`className`&&typeof i==`string`&&typeof a==`string`?`${a} ${i}`:r===`style`&&typeof i==`object`&&typeof a==`object`?{...a,...i}:a}return n}var Z=m.forwardRef(function(e,t){let n=(0,h.c)(3),{children:r,...i}=e,a=m.isValidElement(r)?r:null,o=ae(t,a?a.ref:void 0);if(!a)return null;let s=oe(a.props,i),c;return n[0]!==o||n[1]!==s?(c={...s,ref:o},n[0]=o,n[1]=s,n[2]=c):c=n[2],m.cloneElement(a,c)}),Q=[`bg-[var(--surface-muted)] text-foreground border-0 shadow-none`,`hover:bg-[color-mix(in_srgb,var(--foreground)_6%,var(--surface-muted))]`,`active:bg-[color-mix(in_srgb,var(--foreground)_12%,var(--surface-muted))]`,`focus-visible:border-transparent focus-visible:ring-foreground/20`].join(` `),$=[`bg-[color-mix(in_srgb,var(--status-error)_7%,var(--background))]`,`text-[var(--status-error)]`,`border border-[color-mix(in_srgb,var(--status-error)_9%,transparent)]`,`hover:bg-[color-mix(in_srgb,var(--status-error)_11%,var(--background))]`,`active:bg-[color-mix(in_srgb,var(--status-error)_16%,var(--background))]`,`dark:bg-[color-mix(in_srgb,var(--status-error)_9%,transparent)]`,`dark:border-[color-mix(in_srgb,var(--status-error)_14%,transparent)]`,`dark:hover:bg-[color-mix(in_srgb,var(--status-error)_14%,transparent)]`,`dark:active:bg-[color-mix(in_srgb,var(--status-error)_20%,transparent)]`].join(` `),se=f([`group relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[10px] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[50px] typography-ui-label font-medium tracking-[0.01em] shrink-0 select-none`,`transition-[background-color,border-color,color,opacity,filter,transform] duration-150 ease-out outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,`disabled:pointer-events-none disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`],{variants:{variant:{default:Q,destructive:H($,`focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40`),neutral:Q,outline:Q,mobileGlass:`yuri-mobile-floating-action text-foreground hover:brightness-105 active:bg-interactive-active focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)]`,chip:H(Q,`aria-pressed:bg-[color-mix(in_srgb,var(--foreground)_6%,var(--surface-muted))]`,`aria-pressed:hover:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--surface-muted))]`,`aria-pressed:active:bg-[color-mix(in_srgb,var(--foreground)_10%,var(--surface-muted))]`),secondary:`bg-interactive-hover text-foreground hover:bg-interactive-active`,ghost:`text-foreground hover:bg-interactive-hover hover:text-foreground active:bg-interactive-active`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-3.5 has-[>svg]:px-3`,sm:`h-8 gap-1.5 px-2.5 has-[>svg]:px-2 rounded-[9px] supports-[corner-shape:squircle]:rounded-[50px]`,xs:`h-6 gap-1 px-2 typography-micro has-[>svg]:px-1.5 rounded-[7px] supports-[corner-shape:squircle]:rounded-[50px]`,lg:`h-10 px-4 has-[>svg]:px-3.5 rounded-[12px] supports-[corner-shape:squircle]:rounded-[50px]`,icon:`size-9`,mobileIcon:`size-10 min-h-10 min-w-10 rounded-full`}},defaultVariants:{variant:`default`,size:`default`}}),ce=new Set([`icon`,`mobileIcon`,`xs`]);function le(e){let t=(0,h.c)(20),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:n,variant:s,size:i,asChild:a,type:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a!==void 0&&a,l=c?Z:`button`,u;t[7]!==c||t[8]!==o?(u=c?o===void 0?{}:{type:o}:{type:o??`button`},t[7]=c,t[8]=o,t[9]=u):u=t[9];let d=u,f=i!=null&&ce.has(i)?`compact`:void 0,p;t[10]!==n||t[11]!==i||t[12]!==s?(p=H(se({variant:s,size:i,className:n})),t[10]=n,t[11]=i,t[12]=s,t[13]=p):p=t[13];let m;return t[14]!==l||t[15]!==f||t[16]!==r||t[17]!==p||t[18]!==d?(m=(0,S.jsx)(l,{"data-slot":`button`,"data-mobile-press-feedback":f,className:p,...d,...r}),t[14]=l,t[15]=f,t[16]=r,t[17]=p,t[18]=d,t[19]=m):m=t[19],m}export{g as _,X as a,_ as b,K as c,V as d,B as f,b as g,C as h,ie as i,U as l,F as m,Z as n,q as o,z as p,H as r,G as s,le as t,J as u,y as v,v as y};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{_ as t,v as n,x as r}from"./desktop-JwYqThiw.js";import{at as i,it as a}from"./vendor-base-ui-BQjbsJ43.js";import{n as o}from"./vendor-react-D5d-V1vN.js";import{a as s,i as c,o as l,t as u}from"./store-DVfZQktm.js";import{n as d,t as f}from"./vendor-class-variance-authority-BLUaYARZ.js";import{t as p}from"./vendor-tailwind-merge-BicNWLTg.js";var m=e(i(),1),h=o(),g=async(e,r)=>{if(!t())throw Error(`Desktop runtime is not available`);return n(e,r)},_=async()=>{if(r())try{await g(`desktop_start_window_drag`)}catch{}},v=async e=>{if(r())try{await g(`desktop_set_window_title`,{title:e})}catch{}},y=async(e,t)=>{if(r())try{await g(`desktop_set_window_theme`,{themeMode:e,themeVariant:t})}catch{}},ee=async e=>{if(r())try{await g(`desktop_set_menu_locale`,{locale:e})}catch{}},b=async()=>{if(!r())return null;try{let e=await g(`desktop_get_app_version`);return typeof e==`string`&&e.trim().length>0?e:null}catch{return null}},x=m.createContext(null),S=a(),C=e=>{let t=(0,h.c)(19),{children:n}=e,r=c(w),i=c(te),a=c(T),o=c(ne),d,f;t[0]===r?(d=t[1],f=t[2]):(d=()=>{typeof document>`u`||(document.documentElement.lang=r)},f=[r],t[0]=r,t[1]=d,t[2]=f),m.useEffect(d,f);let p,g;t[3]!==a||t[4]!==r?(p=()=>{a===null&&ee(r)},g=[r,a],t[3]=a,t[4]=r,t[5]=p,t[6]=g):(p=t[5],g=t[6]),m.useEffect(p,g);let _;t[7]===i?_=t[8]:(_=(e,t)=>u(i,e,t),t[7]=i,t[8]=_);let v=_,y;t[9]===v?y=t[10]:(y=e=>v(l[e]),t[9]=v,t[10]=y);let b;t[11]!==r||t[12]!==o||t[13]!==v||t[14]!==y?(b={locale:r,locales:s,setLocale:o,label:y,t:v},t[11]=r,t[12]=o,t[13]=v,t[14]=y,t[15]=b):b=t[15];let C=b,E;return t[16]!==n||t[17]!==C?(E=(0,S.jsx)(x.Provider,{value:C,children:n}),t[16]=n,t[17]=C,t[18]=E):E=t[18],E};function w(e){return e.locale}function te(e){return e.dictionary}function T(e){return e.loadingLocale}function ne(e){return e.setLocale}var E={startingApi:`Starting OpenCode API…`,initializing:`Initializing…`,connecting:`Connecting…`,connected:`Connected!`,connectionError:`Connection error`,disconnected:`Disconnected`,reconnecting:`Reconnecting…`,initialDataLoadFailed:`OpenCode connected, but initial data load failed.`,cliNotFound:`OpenCode CLI not found. Please install it first.`,providersReady:`✓ Providers`,providersLoading:`… Providers`,agentsReady:`✓ Agents`,agentsLoading:`… Agents`,startingDevServer:e=>`Starting webview dev server (${e})...`,waitingDevServer:(e,t)=>`Waiting for webview dev server (${e})... attempt ${t}`,loadingData:(e,t)=>`Loading data (${e}, ${t})…`},re={startingApi:`Démarrage de l’API OpenCode…`,initializing:`Initialisation…`,connecting:`Connexion…`,connected:`Connecté !`,connectionError:`Erreur de connexion`,disconnected:`Déconnecté`,reconnecting:`Reconnexion…`,initialDataLoadFailed:`OpenCode est connecté, mais le chargement initial des données a échoué.`,cliNotFound:`L’interface en ligne de commande OpenCode est introuvable. Veuillez l’installer d’abord.`,providersReady:`✓ Fournisseurs`,providersLoading:`… Fournisseurs`,agentsReady:`✓ Agents`,agentsLoading:`… Agents`,startingDevServer:e=>`Démarrage du serveur de développement de la webview (${e})...`,waitingDevServer:(e,t)=>`En attente du serveur de développement de la webview (${e})... tentative ${t}`,loadingData:(e,t)=>`Chargement des données (${e}, ${t})…`},D={startingApi:`正在启动 OpenCode API…`,initializing:`正在初始化…`,connecting:`正在连接…`,connected:`已连接!`,connectionError:`连接错误`,disconnected:`已断开连接`,reconnecting:`正在重新连接…`,initialDataLoadFailed:`OpenCode 已连接,但初始数据加载失败。`,cliNotFound:`未找到 OpenCode CLI。请先安装它。`,providersReady:`✓ 提供商`,providersLoading:`… 提供商`,agentsReady:`✓ Agent`,agentsLoading:`… Agent`,startingDevServer:e=>`正在启动 webview 开发服务器 (${e})...`,waitingDevServer:(e,t)=>`正在等待 webview 开发服务器 (${e})... 第 ${t} 次尝试`,loadingData:(e,t)=>`正在加载数据 (${e}, ${t})…`},O={startingApi:`正在啟動 OpenCode API…`,initializing:`正在初始化…`,connecting:`正在連線…`,connected:`已連線!`,connectionError:`連線錯誤`,disconnected:`已中斷連線`,reconnecting:`正在重新連線…`,initialDataLoadFailed:`OpenCode 已連線,但初始資料載入失敗。`,cliNotFound:`找不到 OpenCode CLI。請先安裝。`,providersReady:`✓ 提供者`,providersLoading:`… 提供者`,agentsReady:`✓ 代理`,agentsLoading:`… 代理`,startingDevServer:e=>`正在啟動 webview 開發伺服器 (${e})...`,waitingDevServer:(e,t)=>`正在等待 webview 開發伺服器 (${e})... 第 ${t} 次嘗試`,loadingData:(e,t)=>`正在載入資料 (${e}, ${t})…`},k={startingApi:`Запуск OpenCode API…`,initializing:`Ініціалізація…`,connecting:`Підключення…`,connected:`Підключено!`,connectionError:`Помилка підключення`,disconnected:`Відключено`,reconnecting:`Повторне підключення…`,initialDataLoadFailed:`OpenCode підключено, але початкове завантаження даних не вдалося.`,cliNotFound:`OpenCode CLI не знайдено. Спершу встановіть його.`,providersReady:`✓ Провайдери`,providersLoading:`… Провайдери`,agentsReady:`✓ Агенти`,agentsLoading:`… Агенти`,startingDevServer:e=>`Запуск dev-сервера webview (${e})...`,waitingDevServer:(e,t)=>`Очікування dev-сервера webview (${e})... спроба ${t}`,loadingData:(e,t)=>`Завантаження даних (${e}, ${t})…`},A={startingApi:`Iniciando la API de OpenCode…`,initializing:`Inicializando…`,connecting:`Conectando…`,connected:`¡Conectado!`,connectionError:`Error de conexión`,disconnected:`Desconectado`,reconnecting:`Reconectando…`,initialDataLoadFailed:`OpenCode se conectó, pero falló la carga inicial de datos.`,cliNotFound:`No se encontró OpenCode CLI. Instálalo primero.`,providersReady:`✓ Proveedores`,providersLoading:`… Proveedores`,agentsReady:`✓ Agentes`,agentsLoading:`… Agentes`,startingDevServer:e=>`Iniciando el servidor de desarrollo de webview (${e})...`,waitingDevServer:(e,t)=>`Esperando el servidor de desarrollo de webview (${e})... intento ${t}`,loadingData:(e,t)=>`Cargando datos (${e}, ${t})…`},j={startingApi:`Iniciando a API do OpenCode…`,initializing:`Inicializando…`,connecting:`Conectando…`,connected:`Conectado!`,connectionError:`Erro de conexão`,disconnected:`Desconectado`,reconnecting:`Reconectando…`,initialDataLoadFailed:`OpenCode conectado, mas o carregamento inicial dos dados falhou.`,cliNotFound:`OpenCode CLI não encontrado. Instale-o primeiro.`,providersReady:`✓ Provedores`,providersLoading:`… Provedores`,agentsReady:`✓ Agentes`,agentsLoading:`… Agentes`,startingDevServer:e=>`Iniciando o servidor de desenvolvimento da webview (${e})...`,waitingDevServer:(e,t)=>`Aguardando o servidor de desenvolvimento da webview (${e})... tentativa ${t}`,loadingData:(e,t)=>`Carregando dados (${e}, ${t})…`},M={startingApi:`OpenCode API 시작 중…`,initializing:`초기화 중…`,connecting:`연결 중…`,connected:`연결됨!`,connectionError:`연결 오류`,disconnected:`연결 끊김`,reconnecting:`다시 연결 중…`,initialDataLoadFailed:`OpenCode에 연결되었지만 초기 데이터 로드에 실패했습니다.`,cliNotFound:`OpenCode CLI를 찾을 수 없습니다. 먼저 설치하세요.`,providersReady:`✓ 공급자`,providersLoading:`… 공급자`,agentsReady:`✓ 에이전트`,agentsLoading:`… 에이전트`,startingDevServer:e=>`webview 개발 서버 시작 중 (${e})...`,waitingDevServer:(e,t)=>`webview 개발 서버 대기 중 (${e})... ${t}번째 시도`,loadingData:(e,t)=>`데이터 로드 중 (${e}, ${t})…`},N={startingApi:`Uruchamianie API OpenCode…`,initializing:`Inicjalizacja…`,connecting:`Łączenie…`,connected:`Połączono!`,connectionError:`Błąd połączenia`,disconnected:`Rozłączono`,reconnecting:`Ponowne łączenie…`,initialDataLoadFailed:`OpenCode połączony, ale początkowe ładowanie danych nie powiodło się.`,cliNotFound:`Nie znaleziono OpenCode CLI. Najpierw go zainstaluj.`,providersReady:`✓ Dostawcy`,providersLoading:`… Dostawcy`,agentsReady:`✓ Agenci`,agentsLoading:`… Agenci`,startingDevServer:e=>`Uruchamianie serwera deweloperskiego webview (${e})...`,waitingDevServer:(e,t)=>`Oczekiwanie na serwer deweloperski webview (${e})... próba ${t}`,loadingData:(e,t)=>`Ładowanie danych (${e}, ${t})…`},P={startingApi:`OpenCode API を起動中…`,initializing:`初期化中…`,connecting:`接続中…`,connected:`接続完了!`,connectionError:`接続エラー`,disconnected:`切断されました`,reconnecting:`再接続中…`,initialDataLoadFailed:`OpenCode に接続しましたが、初期データの読み込みに失敗しました。`,cliNotFound:`OpenCode CLI が見つかりません。先にインストールしてください。`,providersReady:`✓ プロバイダ`,providersLoading:`… プロバイダ`,agentsReady:`✓ エージェント`,agentsLoading:`… エージェント`,startingDevServer:e=>`Webview 開発サーバーを起動中 (${e})...`,waitingDevServer:(e,t)=>`Webview 開発サーバーを待機中 (${e})... 試行 ${t}`,loadingData:(e,t)=>`データを読み込み中 (${e}, ${t})…`},F=e=>I[e],I={en:E,fr:re,"zh-CN":D,"zh-TW":O,uk:k,es:A,"pt-BR":j,ko:M,pl:N,ja:P},L={en:`en-US`,fr:`fr-FR`,"zh-CN":`zh-CN`,"zh-TW":`zh-TW`,uk:`uk-UA`,es:`es-ES`,"pt-BR":`pt-BR`,ko:`ko-KR`,pl:`pl-PL`,ja:`ja-JP`},R=e=>L[e]??`en-US`,z=()=>R(c.getState().locale);function B(){let e=m.useContext(x);if(!e)throw Error(`useI18n must be used within I18nProvider`);return e}async function V(e){let t=null;if(typeof navigator<`u`&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),{ok:!0,method:`clipboard`}}catch(e){t=e instanceof Error?e.message:String(e)}if(typeof document<`u`&&document.body){let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`-1000px`,t.style.left=`-1000px`,document.body.appendChild(t),t.select(),t.setSelectionRange(0,t.value.length);let n=document.execCommand(`copy`);if(document.body.removeChild(t),n)return{ok:!0,method:`execCommand`}}return{ok:!1,error:t??`Clipboard access denied in current context`}}function H(...e){return p(d(e))}var U=()=>typeof navigator>`u`?!1:/Macintosh|Mac OS X/.test(navigator.userAgent||``),W=()=>typeof navigator>`u`?!1:/Windows/.test(navigator.userAgent||``),G=()=>U()?`common.revealPath.finder`:W()?`common.revealPath.fileExplorer`:`common.revealPath.fileManager`,K=e=>U()&&r()?e.metaKey:e.ctrlKey,q=()=>U()&&r()?`⌘`:`Ctrl`,J=(e,t)=>{let n=e??``,r=Math.max(16,t?.maxLength??45);if(n.length<=r)return n;let i=n.split(`/`);if(i.length<=1)return n;let a=i.pop()??``;if(!a)return n;let o=Math.max(0,r-(a.length+2));if(o<=0)return`…/${a}`;let s=``;for(let e of i){if(!e)continue;let t=s?`${s}/${e}`:e;if(t.length>o)break;s=t}if(!s){let e=i[0]??``;s=e?e.slice(0,o):``}return s?`${s}…/${a}`:`…/${a}`},Y=e=>e?e===`/`?`/`:e.replace(/\/+$/,``):``;function X(e,t){if(!e)return``;let n=Y(e);if(n===`/`)return`/`;let r=t?Y(t):void 0;if(r&&r!==`/`){if(n===r)return`~`;if(n.startsWith(`${r}/`)){let e=n.slice(r.length+1);return e?`~/${e}`:`~`}}return n}function ie(e,t){if(!e)return`/`;let n=Y(e);if(!n||n===`/`)return`/`;let r=t?Y(t):void 0;return r&&r!==`/`&&n===r?`~`:n.split(`/`).pop()||n||`/`}function ae(e,t){let n=(0,h.c)(3),r;return n[0]!==e||n[1]!==t?(r=n=>{for(let r of[e,t])r&&(typeof r==`function`?r(n):r.current=n)},n[0]=e,n[1]=t,n[2]=r):r=n[2],r}function oe(e,t){let n={...t};for(let r in e){let i=t[r],a=e[r];n[r]=/^on[A-Z]/.test(r)&&typeof i==`function`&&typeof a==`function`?(...e)=>{a(...e),i(...e)}:r===`className`&&typeof i==`string`&&typeof a==`string`?`${a} ${i}`:r===`style`&&typeof i==`object`&&typeof a==`object`?{...a,...i}:a}return n}var Z=m.forwardRef(function(e,t){let n=(0,h.c)(3),{children:r,...i}=e,a=m.isValidElement(r)?r:null,o=ae(t,a?a.ref:void 0);if(!a)return null;let s=oe(a.props,i),c;return n[0]!==o||n[1]!==s?(c={...s,ref:o},n[0]=o,n[1]=s,n[2]=c):c=n[2],m.cloneElement(a,c)}),Q=[`bg-[var(--surface-muted)] text-foreground border-0 shadow-none`,`hover:bg-[color-mix(in_srgb,var(--foreground)_6%,var(--surface-muted))]`,`active:bg-[color-mix(in_srgb,var(--foreground)_12%,var(--surface-muted))]`,`focus-visible:border-transparent focus-visible:ring-foreground/20`].join(` `),$=[`bg-[color-mix(in_srgb,var(--status-error)_7%,var(--background))]`,`text-[var(--status-error)]`,`border border-[color-mix(in_srgb,var(--status-error)_9%,transparent)]`,`hover:bg-[color-mix(in_srgb,var(--status-error)_11%,var(--background))]`,`active:bg-[color-mix(in_srgb,var(--status-error)_16%,var(--background))]`,`dark:bg-[color-mix(in_srgb,var(--status-error)_9%,transparent)]`,`dark:border-[color-mix(in_srgb,var(--status-error)_14%,transparent)]`,`dark:hover:bg-[color-mix(in_srgb,var(--status-error)_14%,transparent)]`,`dark:active:bg-[color-mix(in_srgb,var(--status-error)_20%,transparent)]`].join(` `),se=f([`group relative inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[10px] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[50px] typography-ui-label font-medium tracking-[0.01em] shrink-0 select-none`,`transition-[background-color,border-color,color,opacity,filter,transform] duration-150 ease-out outline-none`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,`disabled:pointer-events-none disabled:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`],{variants:{variant:{default:Q,destructive:H($,`focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40`),neutral:Q,outline:Q,mobileGlass:`yuri-mobile-floating-action text-foreground hover:brightness-105 active:bg-interactive-active focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-[var(--interactive-focus-ring)]`,chip:H(Q,`aria-pressed:bg-[color-mix(in_srgb,var(--foreground)_6%,var(--surface-muted))]`,`aria-pressed:hover:bg-[color-mix(in_srgb,var(--foreground)_8%,var(--surface-muted))]`,`aria-pressed:active:bg-[color-mix(in_srgb,var(--foreground)_10%,var(--surface-muted))]`),secondary:`bg-interactive-hover text-foreground hover:bg-interactive-active`,ghost:`text-foreground hover:bg-interactive-hover hover:text-foreground active:bg-interactive-active`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-3.5 has-[>svg]:px-3`,sm:`h-8 gap-1.5 px-2.5 has-[>svg]:px-2 rounded-[9px] supports-[corner-shape:squircle]:rounded-[50px]`,xs:`h-6 gap-1 px-2 typography-micro has-[>svg]:px-1.5 rounded-[7px] supports-[corner-shape:squircle]:rounded-[50px]`,lg:`h-10 px-4 has-[>svg]:px-3.5 rounded-[12px] supports-[corner-shape:squircle]:rounded-[50px]`,icon:`size-9`,mobileIcon:`size-10 min-h-10 min-w-10 rounded-full`}},defaultVariants:{variant:`default`,size:`default`}}),ce=new Set([`icon`,`mobileIcon`,`xs`]);function le(e){let t=(0,h.c)(20),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:n,variant:s,size:i,asChild:a,type:o,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a!==void 0&&a,l=c?Z:`button`,u;t[7]!==c||t[8]!==o?(u=c?o===void 0?{}:{type:o}:{type:o??`button`},t[7]=c,t[8]=o,t[9]=u):u=t[9];let d=u,f=i!=null&&ce.has(i)?`compact`:void 0,p;t[10]!==n||t[11]!==i||t[12]!==s?(p=H(se({variant:s,size:i,className:n})),t[10]=n,t[11]=i,t[12]=s,t[13]=p):p=t[13];let m;return t[14]!==l||t[15]!==f||t[16]!==r||t[17]!==p||t[18]!==d?(m=(0,S.jsx)(l,{"data-slot":`button`,"data-mobile-press-feedback":f,className:p,...d,...r}),t[14]=l,t[15]=f,t[16]=r,t[17]=p,t[18]=d,t[19]=m):m=t[19],m}export{g as _,X as a,_ as b,K as c,V as d,B as f,b as g,C as h,ie as i,U as l,F as m,Z as n,q as o,z as p,H as r,G as s,le as t,J as u,y as v,v as y};
@@ -1 +1 @@
1
- import{a as e,n as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{t as n}from"./types-CUtSV1V8.js";var r=e(`CapacitorUpdater`),i=()=>{if(typeof window>`u`)return!1;try{return t.isNativePlatform()&&t.isPluginAvailable(`CapacitorUpdater`)}catch{return!1}},a=()=>{throw new n},o=()=>({async notifyAppReady(){return i()||a(),r.notifyAppReady()},async download(e){return i()||a(),r.download(e)},async next(e){return i()||a(),r.next(e)},async reload(){return i()||a(),r.reload()},async current(){return i()||a(),r.current()},async getDeviceId(){return i()||a(),r.getDeviceId()},async list(){return i()||a(),r.list()},addListener:(async(e,t)=>(i()||a(),r.addListener(e,t)))}),s,c=async()=>s===void 0?i()?(s=o(),s):(s=null,null):s,l=()=>i();export{l as n,c as t};
1
+ import{a as e,n as t}from"./vendor-aparajita-capacitor-secure-storage-xol_6BsB.js";import{t as n}from"./types-DnZw0gLD.js";var r=e(`CapacitorUpdater`),i=()=>{if(typeof window>`u`)return!1;try{return t.isNativePlatform()&&t.isPluginAvailable(`CapacitorUpdater`)}catch{return!1}},a=()=>{throw new n},o=()=>({async notifyAppReady(){return i()||a(),r.notifyAppReady()},async download(e){return i()||a(),r.download(e)},async next(e){return i()||a(),r.next(e)},async reload(){return i()||a(),r.reload()},async current(){return i()||a(),r.current()},async getDeviceId(){return i()||a(),r.getDeviceId()},async list(){return i()||a(),r.list()},addListener:(async(e,t)=>(i()||a(),r.addListener(e,t)))}),s,c=async()=>s===void 0?i()?(s=o(),s):(s=null,null):s,l=()=>i();export{l as n,c as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{at as t,it as n,n as r,r as i,t as a}from"./vendor-base-ui-BQjbsJ43.js";import{n as o}from"./vendor-react-D5d-V1vN.js";import{r as s}from"./button-BXxwtxsG.js";var c=o(),l=e(t(),1),u=n(),d=i,f=e=>{let t=(0,c.c)(14),n,i,a,o;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4]):({className:a,asChild:n,children:i,...o}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o);let d;t[5]!==n||t[6]!==i?(d=n&&l.isValidElement(i)?{render:i}:{children:i},t[5]=n,t[6]=i,t[7]=d):d=t[7];let f=d,p;t[8]===a?p=t[9]:(p=s(`flex w-full items-center justify-between rounded-lg px-2 py-1.5 text-left text-foreground hover:bg-interactive-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary`,a),t[8]=a,t[9]=p);let m;return t[10]!==o||t[11]!==f||t[12]!==p?(m=(0,u.jsx)(r,{className:p,...o,...f}),t[10]=o,t[11]=f,t[12]=p,t[13]=m):m=t[13],m},p=e=>{let t=(0,c.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=s(`overflow-hidden data-[closed]:animate-collapsible-up data-[open]:animate-collapsible-down`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,u.jsx)(a,{className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o};export{p as n,f as r,d as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{at as t,it as n,n as r,r as i,t as a}from"./vendor-base-ui-BQjbsJ43.js";import{n as o}from"./vendor-react-D5d-V1vN.js";import{r as s}from"./button-Bjh2BSXh.js";var c=o(),l=e(t(),1),u=n(),d=i,f=e=>{let t=(0,c.c)(14),n,i,a,o;t[0]===e?(n=t[1],i=t[2],a=t[3],o=t[4]):({className:a,asChild:n,children:i,...o}=e,t[0]=e,t[1]=n,t[2]=i,t[3]=a,t[4]=o);let d;t[5]!==n||t[6]!==i?(d=n&&l.isValidElement(i)?{render:i}:{children:i},t[5]=n,t[6]=i,t[7]=d):d=t[7];let f=d,p;t[8]===a?p=t[9]:(p=s(`flex w-full items-center justify-between rounded-lg px-2 py-1.5 text-left text-foreground hover:bg-interactive-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary`,a),t[8]=a,t[9]=p);let m;return t[10]!==o||t[11]!==f||t[12]!==p?(m=(0,u.jsx)(r,{className:p,...o,...f}),t[10]=o,t[11]=f,t[12]=p,t[13]=m):m=t[13],m},p=e=>{let t=(0,c.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=s(`overflow-hidden data-[closed]:animate-collapsible-up data-[open]:animate-collapsible-down`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,u.jsx)(a,{className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o};export{p as n,f as r,d as t};
@@ -1 +1 @@
1
- import"./rolldown-runtime-hePW80VL.js";import{F as e,I as t,L as n,O as r,R as i,a,at as o,i as s,it as c}from"./vendor-base-ui-BQjbsJ43.js";import{n as l}from"./vendor-react-D5d-V1vN.js";import{r as u}from"./button-BXxwtxsG.js";import{n as d,r as f,t as p}from"./dropdown-menu.styles-DGaALKP0.js";var m=l();o();var h=c();function g(e){let t=(0,m.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)(a,{...n}),t[2]=n,t[3]=r),r}function _(e){let t=(0,m.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)(s,{...n}),t[2]=n,t[3]=r),r}function v(r){let i=(0,m.c)(20),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({className:o,positionerClassName:s,children:a,style:l,...c}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let f;i[6]===s?f=i[7]:(f=u(`app-region-no-drag z-50`,s),i[6]=s,i[7]=f);let p;i[8]===l?p=i[9]:(p={color:`var(--surface-elevated-foreground)`,...l},i[8]=l,i[9]=p);let g;i[10]===o?g=i[11]:(g=u(d,o),i[10]=o,i[11]=g);let _;i[12]!==a||i[13]!==c||i[14]!==p||i[15]!==g?(_=(0,h.jsx)(n,{"data-slot":`dropdown-menu-content`,style:p,className:g,...c,children:a}),i[12]=a,i[13]=c,i[14]=p,i[15]=g,i[16]=_):_=i[16];let v;return i[17]!==f||i[18]!==_?(v=(0,h.jsx)(t,{children:(0,h.jsx)(e,{className:f,children:_})}),i[17]=f,i[18]=_,i[19]=v):v=i[19],v}function y(e){let t=(0,m.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 a;t[3]===n?a=t[4]:(a=u(p,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(i,{className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function b(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=u(f,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(r,{className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}export{_ as a,b as i,v as n,y as r,g as t};
1
+ import"./rolldown-runtime-hePW80VL.js";import{F as e,I as t,L as n,O as r,R as i,a,at as o,i as s,it as c}from"./vendor-base-ui-BQjbsJ43.js";import{n as l}from"./vendor-react-D5d-V1vN.js";import{r as u}from"./button-Bjh2BSXh.js";import{n as d,r as f,t as p}from"./dropdown-menu.styles-M78xpvb2.js";var m=l();o();var h=c();function g(e){let t=(0,m.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)(a,{...n}),t[2]=n,t[3]=r),r}function _(e){let t=(0,m.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)(s,{...n}),t[2]=n,t[3]=r),r}function v(r){let i=(0,m.c)(20),a,o,s,c,l;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4],l=i[5]):({className:o,positionerClassName:s,children:a,style:l,...c}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=l);let f;i[6]===s?f=i[7]:(f=u(`app-region-no-drag z-50`,s),i[6]=s,i[7]=f);let p;i[8]===l?p=i[9]:(p={color:`var(--surface-elevated-foreground)`,...l},i[8]=l,i[9]=p);let g;i[10]===o?g=i[11]:(g=u(d,o),i[10]=o,i[11]=g);let _;i[12]!==a||i[13]!==c||i[14]!==p||i[15]!==g?(_=(0,h.jsx)(n,{"data-slot":`dropdown-menu-content`,style:p,className:g,...c,children:a}),i[12]=a,i[13]=c,i[14]=p,i[15]=g,i[16]=_):_=i[16];let v;return i[17]!==f||i[18]!==_?(v=(0,h.jsx)(t,{children:(0,h.jsx)(e,{className:f,children:_})}),i[17]=f,i[18]=_,i[19]=v):v=i[19],v}function y(e){let t=(0,m.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 a;t[3]===n?a=t[4]:(a=u(p,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,h.jsx)(i,{className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function b(e){let t=(0,m.c)(8),n,i;t[0]===e?(n=t[1],i=t[2]):({className:n,...i}=e,t[0]=e,t[1]=n,t[2]=i);let a;t[3]===n?a=t[4]:(a=u(f,n),t[3]=n,t[4]=a);let o;return t[5]!==i||t[6]!==a?(o=(0,h.jsx)(r,{className:a,...i}),t[5]=i,t[6]=a,t[7]=o):o=t[7],o}export{_ as a,b as i,v as n,y as r,g as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{at as t,it as n}from"./vendor-base-ui-BQjbsJ43.js";import{r}from"./button-BXxwtxsG.js";import{t as i}from"./vendor-react-drawio-C-iPmmED.js";var a=e(t(),1),o=n(),s=`<mxfile><diagram id="new" name="Page-1"><mxGraphModel dx="0" dy="0" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel></diagram></mxfile>`;function c(){if(typeof document>`u`)return!1;let e=document.documentElement.getAttribute(`data-theme`);return e===`dark`||!e&&window.matchMedia(`(prefers-color-scheme: dark)`).matches}var l=a.forwardRef(function({xml:e,readOnly:t,className:n,onChange:l},u){let d=a.useRef(e),f=a.useRef(null),p=a.useRef(!1),[m,h]=a.useState(c),g=a.useRef(e),_=a.useRef(e);_.current!==e&&(_.current=e,g.current=e,d.current=e);let v=a.useRef(m);v.current!==m&&(v.current=m,g.current=d.current);let y=a.useRef(null);a.useEffect(()=>{let e=()=>h(c());e();let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]}),()=>t.disconnect()},[]),a.useEffect(()=>{let e=setTimeout(()=>{y.current?.querySelector(`.diagrams-iframe`)?.focus()},600);return()=>clearTimeout(e)},[]),a.useImperativeHandle(u,()=>({getXml:()=>d.current}));let b=a.useCallback(()=>{!e&&!p.current&&(p.current=!0,setTimeout(()=>{f.current?.template({})},500))},[e]),x=a.useCallback(e=>{d.current=e.xml,l?.(e.xml)},[l]);return(0,o.jsx)(`div`,{ref:y,className:r(`h-full w-full`,n),children:(0,o.jsx)(i,{ref:f,xml:g.current||s,autosave:!0,urlParameters:{ui:t?`simple`:m?`dark`:`kennedy`,spin:!0,libraries:!t,chrome:t,nav:t,layers:t,noSaveBtn:!0,noExitBtn:!0,saveAndExit:!1},onLoad:b,onAutoSave:x},m?`dark`:`light`)})});export{l as t};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{at as t,it as n}from"./vendor-base-ui-BQjbsJ43.js";import{r}from"./button-Bjh2BSXh.js";import{t as i}from"./vendor-react-drawio-C-iPmmED.js";var a=e(t(),1),o=n(),s=`<mxfile><diagram id="new" name="Page-1"><mxGraphModel dx="0" dy="0" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel></diagram></mxfile>`;function c(){if(typeof document>`u`)return!1;let e=document.documentElement.getAttribute(`data-theme`);return e===`dark`||!e&&window.matchMedia(`(prefers-color-scheme: dark)`).matches}var l=a.forwardRef(function({xml:e,readOnly:t,className:n,onChange:l},u){let d=a.useRef(e),f=a.useRef(null),p=a.useRef(!1),[m,h]=a.useState(c),g=a.useRef(e),_=a.useRef(e);_.current!==e&&(_.current=e,g.current=e,d.current=e);let v=a.useRef(m);v.current!==m&&(v.current=m,g.current=d.current);let y=a.useRef(null);a.useEffect(()=>{let e=()=>h(c());e();let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]}),()=>t.disconnect()},[]),a.useEffect(()=>{let e=setTimeout(()=>{y.current?.querySelector(`.diagrams-iframe`)?.focus()},600);return()=>clearTimeout(e)},[]),a.useImperativeHandle(u,()=>({getXml:()=>d.current}));let b=a.useCallback(()=>{!e&&!p.current&&(p.current=!0,setTimeout(()=>{f.current?.template({})},500))},[e]),x=a.useCallback(e=>{d.current=e.xml,l?.(e.xml)},[l]);return(0,o.jsx)(`div`,{ref:y,className:r(`h-full w-full`,n),children:(0,o.jsx)(i,{ref:f,xml:g.current||s,autosave:!0,urlParameters:{ui:t?`simple`:m?`dark`:`kennedy`,spin:!0,libraries:!t,chrome:t,nav:t,layers:t,noSaveBtn:!0,noExitBtn:!0,saveAndExit:!1},onLoad:b,onAutoSave:x},m?`dark`:`light`)})});export{l as t};