@marimo-team/frontend 0.25.2-dev12 → 0.25.2-dev3

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 (131) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-BFDHLGyp.js → ConnectedDataExplorerComponent-DJ5jwKfp.js} +1 -1
  2. package/dist/assets/{ErrorBoundary-CtGZ1MAN.js → ErrorBoundary-BeE1cdgM.js} +2 -2
  3. package/dist/assets/{LazyAnyLanguageCodeMirror-CaEYnB8x.js → LazyAnyLanguageCodeMirror-B_IYTCX5.js} +2 -2
  4. package/dist/assets/{RunButton-YN1KKz4a.js → RunButton-C2kFUhyO.js} +1 -1
  5. package/dist/assets/{abnfDiagram-VCTEODGH-CqPJWAgx.js → abnfDiagram-VCTEODGH-CSPJSGaM.js} +1 -1
  6. package/dist/assets/{add-cell-with-ai-Dceg80EG.js → add-cell-with-ai-BFgdVPaN.js} +1 -1
  7. package/dist/assets/{agent-panel-CEG8eS3F.js → agent-panel-Dh7yWh9P.js} +1 -1
  8. package/dist/assets/{ai-model-dropdown-SOxGsjRY.js → ai-model-dropdown-DJ2elMLM.js} +1 -1
  9. package/dist/assets/{alert-dialog-BsB0FYEL.js → alert-dialog-CeE3i3Qa.js} +1 -1
  10. package/dist/assets/{any-language-editor-b9spizfh.js → any-language-editor-Cj_HzlZY.js} +1 -1
  11. package/dist/assets/{app-config-button-CTTg_TIX.js → app-config-button-DBCTefOX.js} +1 -1
  12. package/dist/assets/{architectureDiagram-5GKGNRK7-DXjBUUE6.js → architectureDiagram-5GKGNRK7-7iukRoC9.js} +1 -1
  13. package/dist/assets/{blockDiagram-I7D4REHJ-DS6I1u-N.js → blockDiagram-I7D4REHJ-cuhpQB60.js} +1 -1
  14. package/dist/assets/{button-qFeU84ax.js → button-BoklZTGL.js} +1 -1
  15. package/dist/assets/{cache-panel-Ct9EFgP7.js → cache-panel-C0oB1kE2.js} +1 -1
  16. package/dist/assets/{capabilities-BqUNf14U.js → capabilities-Bj3s1hGN.js} +1 -1
  17. package/dist/assets/{cells-CU9huD49.js → cells-CzugpTQu.js} +1 -1
  18. package/dist/assets/{chat-display-DWPnai8M.js → chat-display-DevO4F8W.js} +1 -1
  19. package/dist/assets/{chat-panel-DGnu6v96.js → chat-panel-BGw0bqDk.js} +1 -1
  20. package/dist/assets/{chat-ui-BqLN7iW4.js → chat-ui-CZZFGlZi.js} +1 -1
  21. package/dist/assets/{chunk-IMKFNOWR-s8kQsL8K.js → chunk-IMKFNOWR-BIILwBhp.js} +1 -1
  22. package/dist/assets/{chunk-SHT3W25Y-CM7-8w1-.js → chunk-SHT3W25Y-BtLGdeDB.js} +1 -1
  23. package/dist/assets/{chunk-SVP7TREG-BErtDMhh.js → chunk-SVP7TREG-B0UfxhUP.js} +1 -1
  24. package/dist/assets/{chunk-TICWLB2K-CGVR3aYq.js → chunk-TICWLB2K-BP7vel_P.js} +1 -1
  25. package/dist/assets/{circle-CzTMKZwz.js → circle-CeQt3rdW.js} +1 -1
  26. package/dist/assets/{classDiagram-ZZMXUADV-isldMhyu.js → classDiagram-ZZMXUADV-CoNXKNMZ.js} +1 -1
  27. package/dist/assets/{classDiagram-v2-VYDZK3BY-isldMhyu.js → classDiagram-v2-VYDZK3BY-CoNXKNMZ.js} +1 -1
  28. package/dist/assets/{code-visibility-BGq9NyQN.js → code-visibility-BFNYI7hr.js} +1 -1
  29. package/dist/assets/{command-palette-CyBHUvlK.js → command-palette-DN4JoOLD.js} +1 -1
  30. package/dist/assets/{common-CdJQaC_v.js → common-DUCPhoyP.js} +1 -1
  31. package/dist/assets/{components-DsJLlugL.js → components-CK7CeYlo.js} +1 -1
  32. package/dist/assets/{components-zfCkpDjF.js → components-DAmFBASm.js} +1 -1
  33. package/dist/assets/{config-2Nts63h2.js → config-B4VJJibu.js} +1 -1
  34. package/dist/assets/{config-BdH5RvM0.js → config-BxZgoFvi.js} +1 -1
  35. package/dist/assets/{config-D7CP5wR5.js → config-DpGPGznL.js} +1 -1
  36. package/dist/assets/{copy-B--GzTEX.js → copy-BhJktFeI.js} +1 -1
  37. package/dist/assets/{copy-icon-DQuttmjH.js → copy-icon-DFhUGBjO.js} +1 -1
  38. package/dist/assets/{createReducer-CI8rlZE9.js → createReducer-BPvK7C_R.js} +1 -1
  39. package/dist/assets/{cynefinDiagram-5FMLGOSQ-B7iZDq2a.js → cynefinDiagram-5FMLGOSQ-BARZRQBb.js} +1 -1
  40. package/dist/assets/{dagre-DkKsNZNe.js → dagre-DVyyr7Cb.js} +1 -1
  41. package/dist/assets/{dagre-GXQ25YYZ-CLT8-BB_.js → dagre-GXQ25YYZ-79s0lOP0.js} +1 -1
  42. package/dist/assets/{data-grid-overlay-editor-Bt4aaHfB.js → data-grid-overlay-editor-DPfnIudL.js} +1 -1
  43. package/dist/assets/{dependency-graph-panel-DPFdz5rd.js → dependency-graph-panel-BN4CLayU.js} +1 -1
  44. package/dist/assets/{diagram-S7CK7UJ4-SuzEYncV.js → diagram-S7CK7UJ4-BCviGhvd.js} +1 -1
  45. package/dist/assets/{diagram-UQ7AKVKN-cuBTTzq8.js → diagram-UQ7AKVKN-Ds-BT46T.js} +1 -1
  46. package/dist/assets/{diagram-VX7I27RA-h6SkZKIl.js → diagram-VX7I27RA-BtL2eh0t.js} +1 -1
  47. package/dist/assets/{diagram-Z3DM3KII-C-Vebae0.js → diagram-Z3DM3KII-C6SmbLBS.js} +1 -1
  48. package/dist/assets/{dist-DFI04FfI.js → dist-CyYN7zJg.js} +1 -1
  49. package/dist/assets/{documentation-panel-YTTKKIe_.js → documentation-panel-CzRbXV5u.js} +1 -1
  50. package/dist/assets/{dropdown-menu-Crx6knLg.js → dropdown-menu-VuyoeQOD.js} +1 -1
  51. package/dist/assets/{ebnfDiagram-PWID7BFC-Bm_qbW1t.js → ebnfDiagram-PWID7BFC-D_JU4cMQ.js} +1 -1
  52. package/dist/assets/{edit-page-CWbb1Sdk.js → edit-page-jGNYBqQo.js} +45 -45
  53. package/dist/assets/{erDiagram-RLTQ6QDP-Dwwt91bq.js → erDiagram-RLTQ6QDP-Z9MJ6X-r.js} +1 -1
  54. package/dist/assets/{error-entries-DvgFKvod.js → error-entries-CDSsy76p.js} +1 -1
  55. package/dist/assets/{error-panel-D1XBOiHc.js → error-panel-ABvjFG3p.js} +1 -1
  56. package/dist/assets/{feedback-button-CXjDdARJ.js → feedback-button-CZhLiwkO.js} +1 -1
  57. package/dist/assets/{file-explorer-panel-BKJMBA3O.js → file-explorer-panel-DTiEpmVE.js} +1 -1
  58. package/dist/assets/{file-name-input-Bd3Q-WUK.js → file-name-input-C1C8xrjA.js} +1 -1
  59. package/dist/assets/{filename-rhW-R6K2.js → filename-fxG7K_MU.js} +1 -1
  60. package/dist/assets/{flowDiagram-HODETNUW-CqLwY5NX.js → flowDiagram-HODETNUW-ncLciK2K.js} +1 -1
  61. package/dist/assets/{fullscreen-3wS6IaIC.js → fullscreen-BmzAqMKq.js} +1 -1
  62. package/dist/assets/{gallery-page-CrkxyZTA.js → gallery-page-Moi4ZdJ0.js} +1 -1
  63. package/dist/assets/{glide-data-editor-B5WqL5gm.js → glide-data-editor-CbsCWu-K.js} +4 -4
  64. package/dist/assets/{graphlib-6Yb0YQgW.js → graphlib-3maKwbRO.js} +1 -1
  65. package/dist/assets/has-cJsIKK9t.js +1 -0
  66. package/dist/assets/{home-page-BNKKAvoF.js → home-page-UAgVOkCZ.js} +1 -1
  67. package/dist/assets/{index-C9FPQNuH.js → index-DafnX1Xx.js} +8 -8
  68. package/dist/assets/{infoDiagram-27XIBGKW-dRXMROiS.js → infoDiagram-27XIBGKW-Dk8U81nJ.js} +1 -1
  69. package/dist/assets/{input-D4bMj5Nb.js → input-BDakodZ2.js} +1 -1
  70. package/dist/assets/{ishikawaDiagram-5VMMS53U-CvBCDJJe.js → ishikawaDiagram-5VMMS53U-CzHQlMUQ.js} +1 -1
  71. package/dist/assets/{kanban-definition-UXKFOSKX-fIKpyolW.js → kanban-definition-UXKFOSKX-CVyVYiI6.js} +1 -1
  72. package/dist/assets/{logs-panel-adAvx6o3.js → logs-panel-Bz5ysVX4.js} +1 -1
  73. package/dist/assets/{menu-items-D-vbZmqL.js → menu-items-BBdeXCvU.js} +1 -1
  74. package/dist/assets/{mermaid-DpSqZGNM.js → mermaid-D_jPUVqz.js} +4 -4
  75. package/dist/assets/{mindmap-definition-YA3MSWOX-B95LGKLt.js → mindmap-definition-YA3MSWOX-D5t6Aq5Z.js} +1 -1
  76. package/dist/assets/{number-overlay-editor-Bs5xzKX-.js → number-overlay-editor-FAD8sjFU.js} +1 -1
  77. package/dist/assets/{numbers-DyJNv6Vk.js → numbers-DsgsDslU.js} +1 -1
  78. package/dist/assets/{outline-panel-B9u6Wgol.js → outline-panel-85oiQ0XX.js} +1 -1
  79. package/dist/assets/{packages-panel-D-g71io7.js → packages-panel-ClKIaP5S.js} +1 -1
  80. package/dist/assets/{panels-C5xQNcZv.js → panels-B48zp96D.js} +3 -3
  81. package/dist/assets/{pegDiagram-XKGWAZYB-CMaSc5Ln.js → pegDiagram-XKGWAZYB-BTkTm4ej.js} +1 -1
  82. package/dist/assets/{pieDiagram-E7YTZNPT-CZY0tLgh.js → pieDiagram-E7YTZNPT-Bq6X88M1.js} +1 -1
  83. package/dist/assets/{process-output-CpF79y4D.js → process-output-Cg2ta3vY.js} +1 -1
  84. package/dist/assets/{railroadDiagram-O6MQD6OU-BSMijs6s.js → railroadDiagram-O6MQD6OU-fv8HXW_g.js} +1 -1
  85. package/dist/assets/{requirementDiagram-BXWQKSXE-DjzkUUZk.js → requirementDiagram-BXWQKSXE-DDOOMUfC.js} +1 -1
  86. package/dist/assets/{reveal-component-ZyDayfDQ.js → reveal-component-CR43gpTZ.js} +1 -1
  87. package/dist/assets/{run-page-Ba_64fL5.js → run-page-NR_KFWk8.js} +1 -1
  88. package/dist/assets/{scratchpad-panel-7bxRkpPb.js → scratchpad-panel-DHc-oVb1.js} +1 -1
  89. package/dist/assets/{scroll-to-bottom-button-BLNi0TGS.js → scroll-to-bottom-button-BSCkDXet.js} +1 -1
  90. package/dist/assets/{secrets-panel-DmKgIV5x.js → secrets-panel-C-65ZjnM.js} +1 -1
  91. package/dist/assets/{select-CWHHoM53.js → select-BplWpfFo.js} +1 -1
  92. package/dist/assets/{sequenceDiagram-WJ2MYXX4-Dp7JdkJ6.js → sequenceDiagram-WJ2MYXX4-DdpBhQaS.js} +1 -1
  93. package/dist/assets/{session-ztCnZJHI.js → session-DXKMv4Bs.js} +1 -1
  94. package/dist/assets/{session-panel-D9qVJogC.js → session-panel-DiwQqIbt.js} +1 -1
  95. package/dist/assets/{snippets-panel-QdZvjlBm.js → snippets-panel-BLmXrneD.js} +1 -1
  96. package/dist/assets/{state-0NZOvqJz.js → state-Ozzur_f2.js} +1 -1
  97. package/dist/assets/{stateDiagram-D77RDMKH-CR5QDK_-.js → stateDiagram-D77RDMKH-D3p19fac.js} +1 -1
  98. package/dist/assets/{stateDiagram-v2-MP3YSRHH-BmMYN-vz.js → stateDiagram-v2-MP3YSRHH-CplsDaDl.js} +1 -1
  99. package/dist/assets/{strings-LjhpYwmx.js → strings-BHZPE0Mc.js} +1 -1
  100. package/dist/assets/{swimlanes-42K2YHIH-By_1jYHM.js → swimlanes-42K2YHIH-CLxCSvU4.js} +1 -1
  101. package/dist/assets/{swimlanesDiagram-VR7AAH4N-DjMyvNFc.js → swimlanesDiagram-VR7AAH4N-DPoIFx8T.js} +1 -1
  102. package/dist/assets/{swiper-component-Cbtej5b-.js → swiper-component-rqJChT_P.js} +1 -1
  103. package/dist/assets/{terminal-Ri8br8XX.js → terminal-CY4h1UmO.js} +1 -1
  104. package/dist/assets/{timeline-definition-24CTP7MA-BjNxu6yh.js → timeline-definition-24CTP7MA-Cw2PY--x.js} +1 -1
  105. package/dist/assets/{toast-DXkezxWI.js → toast-KNfsFUiB.js} +1 -1
  106. package/dist/assets/{tooltip-CamoSiGF.js → tooltip-DR2Z2N4w.js} +1 -1
  107. package/dist/assets/{tooltip-BQ9qHrrN.js → tooltip-PLkI_UfK.js} +1 -1
  108. package/dist/assets/{tracing-BxMH9HGb.js → tracing-Q8NAdlrA.js} +1 -1
  109. package/dist/assets/{tracing-panel-EeL3md5x.js → tracing-panel-Ci4kY4dr.js} +2 -2
  110. package/dist/assets/{use-restore-focus-D0UtBPD6.js → use-restore-focus-B98SEiGc.js} +1 -1
  111. package/dist/assets/{useCellActionButton-Di4NkDbT.js → useCellActionButton-DpYtVfFe.js} +1 -1
  112. package/dist/assets/{useEventListener-CUPWI_1X.js → useEventListener-BdZUApHd.js} +1 -1
  113. package/dist/assets/{useInterval-DluQa5sq.js → useInterval-ChchS0Rl.js} +1 -1
  114. package/dist/assets/{useTheme-CnWB5G1X.js → useTheme-DcnXlv0_.js} +1 -1
  115. package/dist/assets/{vega-component-DGTXJwmx.js → vega-component-BpoSew4K.js} +1 -1
  116. package/dist/assets/{vega-embed-container-Din5FYpB.js → vega-embed-container-BOJG8mCA.js} +1 -1
  117. package/dist/assets/{vennDiagram-4TSXK5OY-BR66J2hx.js → vennDiagram-4TSXK5OY-D8bN6lVl.js} +1 -1
  118. package/dist/assets/{wardleyDiagram-VM6X3IG4-Kg0-lASD.js → wardleyDiagram-VM6X3IG4-CbZdo0SA.js} +1 -1
  119. package/dist/assets/{write-secret-modal-wFgr-1dA.js → write-secret-modal-BiG2tahJ.js} +1 -1
  120. package/dist/assets/{xychartDiagram-S5SC5T6Z-BSXFWSRW.js → xychartDiagram-S5SC5T6Z-DUUQ9tau.js} +1 -1
  121. package/dist/assets/{youtube-Ck_NlGi9.js → youtube-A9VT7NHb.js} +1 -1
  122. package/dist/index.html +31 -31
  123. package/package.json +1 -1
  124. package/src/components/editor/actions/useNotebookActions.tsx +0 -20
  125. package/src/core/edit-app.tsx +0 -16
  126. package/src/core/hotkeys/hotkeys.ts +0 -12
  127. package/src/plugins/impl/FileBrowserPlugin.tsx +15 -45
  128. package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +2 -85
  129. package/dist/assets/has-B4C7ywdy.js +0 -1
  130. package/src/components/editor/actions/__tests__/useSetOutputsExpanded.test.ts +0 -42
  131. package/src/components/editor/actions/useSetOutputsExpanded.ts +0 -67
@@ -1,4 +1,4 @@
1
- import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";import{a as n,c as r,f as i,l as a,r as o,t as s,u as c}from"./useEvent-Dc9HkKI2.js";import{t as l}from"./react-CUdNIagt.js";import{$i as u,$n as d,$t as f,An as p,Ar as m,Bn as h,Ca as g,En as _,G as v,Hr as y,Ia as b,Ka as x,On as S,Or as C,Qn as w,Qr as T,Qt as E,Sa as D,Sr as O,Xn as k,Xt as A,Yt as j,Zn as M,Zt as N,_r as P,cn as F,dn as I,do as L,ea as R,en as z,kr as B,nn as V,no as H,oo as ee,tn as U,to as te,un as ne,uo as re,wr as W,xr as ie,ya as ae}from"./cells-CU9huD49.js";import{t as G}from"./react-dom-CKsE8sC1.js";import{t as oe}from"./compiler-runtime-BQ9S8nyo.js";import{t as se}from"./isObject-BCaOs5rp.js";import{t as ce}from"./get-DjNf4SIX.js";import{t as le}from"./debounce-aFmHgJZY.js";import{A as ue,C as de,T as fe,h as pe,j as me,k as he,l as ge,m as _e,t as ve,u as ye,x as be,y as xe}from"./config-BdH5RvM0.js";import{t as Se}from"./has-B4C7ywdy.js";import{_ as Ce,f as we,g as K,l as Te,m as Ee,t as De}from"./useEventListener-CUPWI_1X.js";import{t as Oe}from"./invariant-Ci2dTZ72.js";import{i as ke}from"./utils-B4K466FK.js";import{_ as Ae,t as je}from"./session-ztCnZJHI.js";import{M as Me,O as Ne,S as Pe,n as Fe,o as Ie,r as Le}from"./config-D7CP5wR5.js";import{t as Re}from"./cn-ldLVeaqm.js";import{t as ze}from"./jsx-runtime-B74pBk57.js";import{a as Be,i as Ve,n as He,o as Ue,r as We,t as Ge}from"./config-2Nts63h2.js";import{d as Ke,i as qe,l as Je,n as Ye,r as Xe,s as Ze,t as Qe}from"./select-CWHHoM53.js";import{a as $e,c as et,d as tt,f as nt,p as rt,r as it,s as at,t as ot,u as st}from"./dropdown-menu-Crx6knLg.js";import{t as ct}from"./tooltip-CamoSiGF.js";import{n as lt,r as ut,t as q}from"./button-qFeU84ax.js";import{t as dt}from"./createLucideIcon-rHn2EdoM.js";import{t as ft}from"./check-Wea4hZ6R.js";import{a as pt,r as mt}from"./useNumberFormatter-C4-_TnkF.js";import{t as ht}from"./chevron-right-DOPs2jx8.js";import{u as gt}from"./toDate-BbJ1_N2T.js";import{t as _t}from"./copy-RyCOE8jo.js";import{C as vt,b as yt,p as bt}from"./write-secret-modal-wFgr-1dA.js";import{t as xt}from"./plus-gbN72xHe.js";import{$ as St,At as Ct,Bt as wt,Dt as Tt,F as Et,Ft as Dt,Gt as Ot,H as kt,Ht as At,Jt as jt,Kt as Mt,Lt as Nt,M as Pt,Mt as Ft,N as It,Nt as Lt,Pt as Rt,Q as zt,R as Bt,S as Vt,U as Ht,Ut,V as Wt,Vt as Gt,Wt as Kt,X as qt,Xt as Jt,Yt,Z as Xt,_ as Zt,_t as Qt,bt as $t,g as en,gt as tn,ht as nn,jt as rn,kt as an,lt as on,mt as sn,nt as cn,o as ln,pt as un,q as dn,qt as fn,r as pn,rt as mn,st as hn,xt as gn,yt as _n,z as vn,zt as yn}from"./input-D4bMj5Nb.js";import{t as bn}from"./trash-2-BJG-7Qob.js";import{n as xn}from"./copy-B--GzTEX.js";import{t as Sn}from"./use-toast-CC89xOwH.js";import{Tt as Cn,qt as wn,st as Tn,ut as En}from"./dist-BczecT6V.js";import{F as Dn,L as On,M as kn,N as An,P as jn,R as Mn,b as Nn,f as Pn,g as Fn,h as In,k as Ln,p as Rn,x as zn,y as Bn}from"./dist-BTskHGpb.js";import{s as Vn}from"./arrays-BqUx5USx.js";import{n as Hn}from"./once-Haz_uxEL.js";import{i as Un,n as Wn,r as Gn,t as Kn}from"./strings-LjhpYwmx.js";import{r as qn,t as Jn}from"./requests-yTHMxhVa.js";import{t as Yn}from"./badge-DFf033uX.js";import{t as Xn}from"./useTheme-CnWB5G1X.js";import{r as Zn,t as Qn}from"./context-BFOBKCJB.js";import{n as $n,t as er}from"./shell-BSnvn9t7.js";import{r as tr}from"./useDebounce-DMbg9X18.js";import{n as nr}from"./useAsyncData-DucTwMkf.js";import{a as rr}from"./errors-D9vyuMar.js";import{t as ir}from"./filename-rhW-R6K2.js";import{$i as ar,Fr as or,Hi as sr,Hn as cr,In as lr,Ir as ur,Ji as dr,Ki as fr,Ln as pr,Lr as mr,Lt as hr,Pr as gr,Qi as _r,Qr as vr,Rn as yr,Sn as br,Ui as xr,Va as Sr,Vn as Cr,Wi as wr,Xi as Tr,Yi as Er,Zi as Dr,_n as Or,aa as kr,bn as Ar,da as jr,di as Mr,ea as Nr,ha as Pr,ta as Fr,vn as Ir,xn as Lr,xt as Rr,yn as zr,za as Br,zn as Vr}from"./index-C9FPQNuH.js";import{a as Hr,i as Ur,n as Wr,r as Gr,t as Kr}from"./card-BYZGhhhx.js";var qr=`Expected a function`;function Jr(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(qr);return se(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),le(e,t,{leading:r,maxWait:t,trailing:i})}var Yr=t((e=>{var t=l();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,l=r[1];return o(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),a(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Xr=t(((e,t)=>{t.exports=Yr()})),Zr=dt(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Qr=dt(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),$r=dt(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),ei=dt(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),ti=dt(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),ni=dt(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),ri=dt(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),ii=dt(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),J=e(l(),1);function ai(e,t){let n=(0,J.useRef)(!0),r=(0,J.useRef)(null);At(()=>(n.current=!0,()=>{n.current=!1}),[]),At(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function oi(e,t){let{collection:n,onLoadMore:r,scrollOffset:i=1}=e,a=(0,J.useRef)(null),o=sn(e=>{for(let t of e)t.isIntersecting&&r&&r()});At(()=>(t.current&&(a.current=new IntersectionObserver(o,{root:_r(t?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),a.current.observe(t.current)),()=>{a.current&&a.current.disconnect()}),[n,t,i])}function si(e){let t=J.version.split(`.`);return parseInt(t[0],10)>=19?e:e?`true`:void 0}var ci=`react-aria-clear-focus`,li=`react-aria-focus`,ui=500;function di(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=ui,accessibilityDescription:o}=e,s=(0,J.useRef)(void 0),{addGlobalListener:c,removeGlobalListener:l}=Qt(),{pressProps:u}=Ht({isDisabled:t,onPressStart(e){if(e.continuePropagation(),(e.pointerType===`mouse`||e.pointerType===`touch`)&&(n&&n({...e,type:`longpressstart`}),s.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),Nt(e.target).activeElement!==e.target&&an(e.target),i&&i({...e,type:`longpress`}),s.current=void 0},a),e.pointerType===`touch`)){let t=e=>{e.preventDefault()};c(e.target,`contextmenu`,t,{once:!0}),c(window,`pointerup`,()=>{setTimeout(()=>{l(e.target,`contextmenu`,t)},30)},{once:!0})}},onPressEnd(e){s.current&&clearTimeout(s.current),r&&(e.pointerType===`mouse`||e.pointerType===`touch`)&&r({...e,type:`longpressend`})}}),d=Tr(i&&!t?o:void 0);return{longPressProps:rn(u,d)}}function fi(e,t){let n=t?.isDisabled,[r,i]=(0,J.useState)(!1);return At(()=>{if(e?.current&&!n){let t=()=>{if(e.current){let t=wr(e.current,{tabbable:!0});i(!!t.nextNode())}};t();let n=new MutationObserver(t);return n.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabIndex`,`disabled`]}),()=>{n.disconnect()}}}),!n&&r}function pi(e){let t=gi(Nt(e));t!==e&&(t&&mi(t,e),e&&hi(e,t))}function mi(e,t){e.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:t}))}function hi(e,t){e.dispatchEvent(new FocusEvent(`focus`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusin`,{bubbles:!0,relatedTarget:t}))}function gi(e){let t=Rt(e),n=t?.getAttribute(`aria-activedescendant`);return n&&e.getElementById(n)||t}function _i(e){return Tt()?e.altKey:e.ctrlKey}function vi(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var yi=new WeakMap;function bi(e){let t=Gt();return yi.set(e,t),t}function xi(e){return yi.get(e)}var Si=1e3;function Ci(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,J.useRef)({search:``,timeout:void 0}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=wi(e.key);if(!(!a||e.ctrlKey||e.metaKey||!Ft(e.currentTarget,Dt(e))||i.search.length===0&&a===` `)){if(a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.search,n.focusedKey);e??=t.getKeyForSearch(i.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},Si)}}:void 0}}}function wi(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}var Ti=e(G(),1);function Ei(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c=`clearSelection`,selectOnFocus:l=t.selectionBehavior===`replace`,disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,scrollRef:p=r,linkBehavior:m=`action`}=e,{direction:h}=Qn(),g=$t(),_=e=>{if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!r.current||!Ft(r.current,Dt(e)))return;let i=(n,i)=>{if(n!=null){if(t.isLink(n)&&m===`selection`&&l&&!_i(e)){(0,Ti.flushSync)(()=>{t.setFocusedKey(n,i)});let a=vi(r,n),o=t.getItemProps(n);a&&g.open(a,e,o.href,o.routerOptions);return}if(t.setFocusedKey(n,i),t.isLink(n)&&m===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):l&&!_i(e)&&t.replaceSelection(n)}};switch(e.key){case`ArrowDown`:if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.call(n):n.getKeyBelow?.call(n,t.focusedKey);r==null&&a&&(r=n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowUp`:if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.call(n):n.getKeyAbove?.call(n,t.focusedKey);r==null&&a&&(r=n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowLeft`:if(n.getKeyLeftOf){let r=t.focusedKey==null?null:n.getKeyLeftOf?.call(n,t.focusedKey);r==null&&a&&(r=h===`rtl`?n.getFirstKey?.call(n,t.focusedKey):n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r,h===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(n.getKeyRightOf){let r=t.focusedKey==null?null:n.getKeyRightOf?.call(n,t.focusedKey);r==null&&a&&(r=h===`rtl`?n.getLastKey?.call(n,t.focusedKey):n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r,h===`rtl`?`last`:`first`))}break;case`Home`:if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getFirstKey(t.focusedKey,Dr(e));t.setFocusedKey(r),r!=null&&(Dr(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`End`:if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getLastKey(t.focusedKey,Dr(e));t.setFocusedKey(r),r!=null&&(Dr(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`PageDown`:if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`PageUp`:if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`a`:Dr(e)&&t.selectionMode===`multiple`&&s!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:c===`clearSelection`&&!o&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!f){if(e.shiftKey)r.current.focus();else{let e=wr(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);let i=Rt();t&&(!Lt(t)||i&&!on(i))&&an(t)}break}}},v=(0,J.useRef)({top:0,left:0});un(p,`scroll`,()=>{v.current={top:p.current?.scrollTop??0,left:p.current?.scrollLeft??0}});let y=e=>{if(t.isFocused){Ft(e.currentTarget,Dt(e))||t.setFocused(!1);return}if(Ft(e.currentTarget,Dt(e))){if(t.setFocused(!0),t.focusedKey==null){let r=e=>{e!=null&&(t.setFocusedKey(e),l&&!t.isSelected(e)&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey??n.getLastKey?.call(n)):r(t.firstSelectedKey??n.getFirstKey?.call(n))}else p.current&&(p.current.scrollTop=v.current.top,p.current.scrollLeft=v.current.left);if(t.focusedKey!=null&&p.current){let e=vi(r,t.focusedKey);e instanceof HTMLElement&&(!Lt(e)&&!d&&an(e),vn()===`keyboard`&&Er(e,{containingElement:r.current}))}}},b=e=>{Ft(e.currentTarget,e.relatedTarget)||t.setFocused(!1)},x=(0,J.useRef)(!1);un(r,li,d?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(x.current=!0)}:void 0),ai(()=>{if(x.current){let e=n.getFirstKey?.call(n)??null;if(e==null){let e=Rt();pi(r.current),hi(e,null),t.collection.size>0&&(x.current=!1)}else t.setFocusedKey(e),x.current=!1}},[t.collection]),ai(()=>{t.collection.size>0&&(x.current=!1)},[t.focusedKey]),un(r,ci,d?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let S=(0,J.useRef)(i),C=(0,J.useRef)(!1);(0,J.useEffect)(()=>{if(S.current){let e=null;i===`first`&&(e=n.getFirstKey?.call(n)??null),i===`last`&&(e=n.getLastKey?.call(n)??null);let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!d&&r.current&&Bt(r.current),t.collection.size>0&&(S.current=!1,C.current=!0)}});let w=(0,J.useRef)(t.focusedKey),T=(0,J.useRef)(null);(0,J.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==w.current||C.current)&&p.current&&r.current){let e=vn(),n=vi(r,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||C.current)&&(T.current&&cancelAnimationFrame(T.current),T.current=requestAnimationFrame(()=>{p.current&&(dr(p.current,n),e!==`virtual`&&Er(n,{containingElement:r.current}))}))}!d&&t.isFocused&&t.focusedKey==null&&w.current!=null&&r.current&&Bt(r.current),w.current=t.focusedKey,C.current=!1}),(0,J.useEffect)(()=>()=>{T.current&&cancelAnimationFrame(T.current)},[]),un(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let E={onKeyDown:_,onFocus:y,onBlur:b,onMouseDown(e){p.current===Dt(e)&&e.preventDefault()}},{typeSelectProps:D}=Ci({keyboardDelegate:n,selectionManager:t});u||(E=rn(D,E));let O;d||(O=t.focusedKey==null?0:-1);let k=bi(t.collection);return{collectionProps:rn(E,{tabIndex:O,"data-collection":k})}}function Di(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,f=$t();t=Gt(t);let p=e=>{if(e.pointerType===`keyboard`&&_i(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);f.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(Dr(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,J.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?pi(i.current):s?s():Rt()!==i.current&&i.current&&Bt(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c||=n.isDisabled(r);let m={};!o&&!c?m={tabIndex:r===n.focusedKey?0:-1,onFocus(e){Dt(e)===i.current&&n.setFocusedKey(r)}}:c&&(m.onMouseDown=e=>{e.preventDefault()}),(0,J.useEffect)(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let h=n.isLink(r)&&d===`override`,g=l&&e.UNSTABLE_itemBehavior===`action`,_=n.isLink(r)&&d!==`selection`&&d!==`none`,v=!c&&n.canSelectItem(r)&&!h&&!g,y=(l||_)&&!c,b=y&&(n.selectionBehavior===`replace`?!v:!v||n.isEmpty),x=y&&v&&n.selectionBehavior===`replace`,S=b||x,C=(0,J.useRef)(null),w=S&&v,T=(0,J.useRef)(!1),E=(0,J.useRef)(!1),D=n.getItemProps(r),O=e=>{if(l){var t;l(),(t=i.current)==null||t.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))}_&&i.current&&f.open(i.current,e,D.href,D.routerOptions)},k={ref:i};if(a?(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,e.pointerType===`keyboard`&&(!S||ki(e.key))&&p(e)},u?(k.onPressUp=b?void 0:e=>{e.pointerType===`mouse`&&v&&p(e)},k.onPress=b?O:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&v&&p(e)}):k.onPress=e=>{if(b||x&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!Oi(e.key))return;O(e)}else e.pointerType!==`keyboard`&&v&&p(e)}):(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,E.current=b,v&&(e.pointerType===`mouse`&&!b||e.pointerType===`keyboard`&&(!y||ki(e.key)))&&p(e)},k.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&S&&Oi(e.key)||e.pointerType===`mouse`&&E.current)&&(S?O(e):v&&p(e))}),m[`data-collection`]=xi(n.collection),m[`data-key`]=r,k.preventFocusOnPress=o,o&&(k=rn(k,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),D)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])D[e]&&(k[e]=yn(k[e],D[e]));let{pressProps:A,isPressed:j}=Ht(k),M=x?e=>{C.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),O(e))}:void 0,{longPressProps:N}=di({isDisabled:!w,onLongPress(e){e.pointerType===`touch`&&(p(e),n.setSelectionBehavior(`toggle`))}}),P=e=>{C.current===`touch`&&T.current&&e.preventDefault()},F=d!==`none`&&n.isLink(r)?e=>{_n.isOpening||e.preventDefault()}:void 0;return{itemProps:rn(m,v||b||o&&!c?A:{},w?N:{},{onDoubleClick:M,onDragStartCapture:P,onClick:F,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:j,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:v,hasAction:S}}function Oi(e){return e===`Enter`}function ki(e){return e===` `}var Ai=class{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:vi(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}constructor(e){this.ref=e}},ji=class{isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let e=this.collection.getItem(n);if(e?.type===`item`&&!this.isDisabled(e))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,e=>this.collection.getKeyAfter(e))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,e=>this.collection.getKeyBefore(e))}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`):null}getKeyLeftOf(e){let t=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!ar(t))return this.getFirstKey();let r=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!ar(t))return this.getLastKey();let r=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r);if(!t)return null;let i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new Ai(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new Ai(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function Mi(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o}=e,s=fr({usage:`search`,sensitivity:`base`}),c=t.disabledBehavior,l=(0,J.useMemo)(()=>a||new ji({collection:n,disabledKeys:r,disabledBehavior:c,ref:i,collator:s,layoutDelegate:o}),[a,o,n,r,i,s,c]),{collectionProps:u}=Ei({...e,ref:i,selectionManager:t,keyboardDelegate:l});return{listProps:u}}var Ni=class{build(e,t){return this.context=t,Pi(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(J.isValidElement(t)&&t.type===J.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];J.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(J.isValidElement(e.element)&&e.element.type===J.Fragment){let i=[];J.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(J.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Fi(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${Ii(t.type)}> in <${Ii(r?.type??`unknown parent type`)}>. Only <${Ii(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Pi(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Pi(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function Fi(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Ii(e){return e[0].toUpperCase()+e.slice(1)}function Li(e,t,n){let r=(0,J.useMemo)(()=>new Ni,[]),{children:i,items:a,collection:o}=e;return(0,J.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function Ri(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function zi(e){return Bi(e,0)}function Bi(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function Vi(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Hi(e,t),t],i=[...Hi(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function Hi(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Ui=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},Wi=class extends Ui{filter(e,t,n){let[r,i]=Xi(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},Gi=class extends Ui{};Gi.type=`header`;var Ki=class extends Ui{};Ki.type=`loader`;var qi=class extends Wi{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};qi.type=`item`;var Ji=class extends Wi{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};Ji.type=`section`;var Yi=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=Xi(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function Xi(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var Zi=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},Qi=class e extends Zi{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.parentNode.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},$i=class extends Zi{get isConnected(){return!0}createElement(e){return new Qi(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof Qi&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof Qi?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};function ea(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,J.useMemo)(()=>new WeakMap,a);return(0,J.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=o.get(a);if(!n){n=t(a);let e=n.props.id??a.key??a.id;if(e==null)throw Error(`Could not determine key for item`);r!=null&&(e=r+`:`+e),n=(0,J.cloneElement)(n,i?{key:e,id:e,value:a}:{key:e}),o.set(a,n)}e.push(n)}return e}if(typeof t!=`function`)return t},[t,n,o,r,i])}var ta=Xr(),na=(0,J.createContext)(!1),ra=(0,J.createContext)(null);function ia(e){if((0,J.useContext)(ra))return e.content;let{collection:t,document:n}=ca(e.createCollection);return J.createElement(J.Fragment,null,J.createElement(Vt,null,J.createElement(ra.Provider,{value:n},e.content)),J.createElement(aa,{render:e.children,collection:t}))}function aa({collection:e,render:t}){return t(e)}function oa(e,t,n){let r=Zn(),i=(0,J.useRef)(r);i.current=r;let a=(0,J.useCallback)(()=>i.current?n():t(),[t,n]);return(0,ta.useSyncExternalStore)(e,a)}var sa=typeof J.useSyncExternalStore==`function`?J.useSyncExternalStore:oa;function ca(e){let[t]=(0,J.useState)(()=>new $i(e?.()||new Yi));return{collection:sa((0,J.useCallback)(e=>t.subscribe(e),[t]),(0,J.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,J.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t])),document:t}}var la=(0,J.createContext)(null);function ua(e){var t;return t=class extends Ui{},t.type=e,t}function da(e,t,n,r,i,a){typeof e==`string`&&(e=ua(e));let o=(0,J.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,J.useContext)(la);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?J.createElement(la.Provider,{value:o},i):null}return J.createElement(e.type,{ref:o},i)}function fa(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,J.forwardRef)((r,i)=>{let a=(0,J.useContext)(Et);if(!(0,J.useContext)(na)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return da(e,r,i,`children`in r?r.children:null,null,e=>J.createElement(Et.Provider,{value:a},J.createElement(n,{node:e})))});return r.displayName=t.name,r}function pa(e,t,n=ma){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,J.forwardRef)((t,i)=>da(e,t,i,null,n(t),e=>J.createElement(r,{node:e}))??J.createElement(J.Fragment,null));return i.displayName=t.name,i}function ma(e){return ea({...e,addIdAndValue:!0})}var ha=(0,J.createContext)(null);function ga(e){let t=(0,J.useContext)(ha),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope??t?.idScope,i=ma({...e,idScope:r,dependencies:n});return(0,J.useContext)(ra)&&(i=J.createElement(_a,null,i)),t=(0,J.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),J.createElement(ha.Provider,{value:t},i)}function _a({children:e}){let t=(0,J.useContext)(ra),n=(0,J.useMemo)(()=>J.createElement(ra.Provider,{value:null},J.createElement(na.Provider,{value:!0},e)),[e]);return Zn()?J.createElement(la.Provider,{value:t},n):(0,Ti.createPortal)(n,t)}var va=(0,J.createContext)(null),ya={CollectionRoot({collection:e,renderDropIndicator:t}){return ba(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return ba(e,t,n)}};function ba(e,t,n){return ea({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){if(t.type===`content`)return J.createElement(J.Fragment,null);let r=t.render(t);return!n||t.type!==`item`?r:J.createElement(J.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,xa(e,t,n))}})}function xa(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r?.type===`item`&&(!a||r.parentKey!==a.parentKey&&a.level<r.level);){let t=n({type:`item`,key:r.key,dropPosition:`after`});(0,J.isValidElement)(t)&&s.push((0,J.cloneElement)(t,{key:`${r.key}-after`})),r=r.parentKey==null?null:e.getItem(r.parentKey)}}return s}var Sa=(0,J.createContext)(ya),Ca=new WeakMap;function wa(e,t){let{id:n}=Ca.get(e)??{};if(!n)throw Error(`Unknown list`);return`${n}-${Ta(t)}`}function Ta(e){return typeof e==`string`?e.replace(/\s*/g,``):``+e}var Ea={};Ea={deselectedItem:e=>`${e.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,longPressToSelect:`اضغط مطولًا للدخول إلى وضع التحديد.`,select:`تحديد`,selectedAll:`جميع العناصر المحددة.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`لم يتم تحديد عناصر`,one:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`,other:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`})}.`,selectedItem:e=>`${e.item} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`};var Da={};Da={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,longPressToSelect:`Натиснете и задръжте за да влезете в избирателен режим.`,select:`Изберете`,selectedAll:`Всички елементи са избрани.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Няма избрани елементи`,one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`})}.`,selectedItem:e=>`${e.item} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`};var Oa={};Oa={deselectedItem:e=>`Polo\u{17E}ka ${e.item} nen\xed vybr\xe1na.`,longPressToSelect:`Dlouhým stisknutím přejdete do režimu výběru.`,select:`Vybrat`,selectedAll:`Vybrány všechny položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nevybrány žádné položky`,one:()=>`Vybr\xe1na ${t.number(e.count)} polo\u{17E}ka`,other:()=>`Vybr\xe1no ${t.number(e.count)} polo\u{17E}ek`})}.`,selectedItem:e=>`Vybr\xe1na polo\u{17E}ka ${e.item}.`};var ka={};ka={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:`Lav et langt tryk for at aktivere valgtilstand.`,select:`Vælg`,selectedAll:`Alle elementer valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer valgt`,one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var Aa={};Aa={deselectedItem:e=>`${e.item} nicht ausgew\xe4hlt.`,longPressToSelect:`Gedrückt halten, um Auswahlmodus zu öffnen.`,select:`Auswählen`,selectedAll:`Alle Elemente ausgewählt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Keine Elemente ausgewählt`,one:()=>`${t.number(e.count)} Element ausgew\xe4hlt`,other:()=>`${t.number(e.count)} Elemente ausgew\xe4hlt`})}.`,selectedItem:e=>`${e.item} ausgew\xe4hlt.`};var ja={};ja={deselectedItem:e=>`\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`,longPressToSelect:`Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.`,select:`Επιλογή`,selectedAll:`Επιλέχθηκαν όλα τα στοιχεία.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Δεν επιλέχθηκαν στοιχεία`,one:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B1}\u{3BD} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}.`,selectedItem:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`};var Ma={};Ma={deselectedItem:e=>`${e.item} not selected.`,select:`Select`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`No items selected`,one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:`All items selected.`,selectedItem:e=>`${e.item} selected.`,longPressToSelect:`Long press to enter selection mode.`};var Na={};Na={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:`Mantenga pulsado para abrir el modo de selección.`,select:`Seleccionar`,selectedAll:`Todos los elementos seleccionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ningún elemento seleccionado`,one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var Pa={};Pa={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:`Valikurežiimi sisenemiseks vajutage pikalt.`,select:`Vali`,selectedAll:`Kõik üksused valitud.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Üksusi pole valitud`,one:()=>`${t.number(e.count)} \xfcksus valitud`,other:()=>`${t.number(e.count)} \xfcksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var Fa={};Fa={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:`Siirry valintatilaan painamalla pitkään.`,select:`Valitse`,selectedAll:`Kaikki kohteet valittu.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ei yhtään kohdetta valittu`,one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var Ia={};Ia={deselectedItem:e=>`${e.item} non s\xe9lectionn\xe9.`,longPressToSelect:`Appuyez de manière prolongée pour passer en mode de sélection.`,select:`Sélectionner`,selectedAll:`Tous les éléments sélectionnés.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Aucun élément sélectionné`,one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}.`,selectedItem:e=>`${e.item} s\xe9lectionn\xe9.`};var La={};La={deselectedItem:e=>`${e.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,longPressToSelect:`הקשה ארוכה לכניסה למצב בחירה.`,select:`בחר`,selectedAll:`כל הפריטים נבחרו.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`לא נבחרו פריטים`,one:()=>`\u{5E4}\u{5E8}\u{5D9}\u{5D8} ${t.number(e.count)} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}.`,selectedItem:e=>`${e.item} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`};var Ra={};Ra={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:`Dugo pritisnite za ulazak u način odabira.`,select:`Odaberite`,selectedAll:`Odabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije odabrana nijedna stavka`,one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var za={};za={deselectedItem:e=>`${e.item} nincs kijel\xf6lve.`,longPressToSelect:`Nyomja hosszan a kijelöléshez.`,select:`Kijelölés`,selectedAll:`Az összes elem kijelölve.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Egy elem sincs kijelölve`,one:()=>`${t.number(e.count)} elem kijel\xf6lve`,other:()=>`${t.number(e.count)} elem kijel\xf6lve`})}.`,selectedItem:e=>`${e.item} kijel\xf6lve.`};var Ba={};Ba={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:`Premi a lungo per passare alla modalità di selezione.`,select:`Seleziona`,selectedAll:`Tutti gli elementi selezionati.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nessun elemento selezionato`,one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var Va={};Va={deselectedItem:e=>`${e.item} \u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}\u{3002}`,longPressToSelect:`長押しして選択モードを開きます。`,select:`選択`,selectedAll:`すべての項目を選択しました。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`項目が選択されていません`,one:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`,other:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`})}\u{3002}`,selectedItem:e=>`${e.item} \u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`};var Ha={};Ha={deselectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,longPressToSelect:`선택 모드로 들어가려면 길게 누르십시오.`,select:`선택`,selectedAll:`모든 항목이 선택되었습니다.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`선택된 항목이 없습니다`,one:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`})}.`,selectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`};var Ua={};Ua={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:`Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.`,select:`Pasirinkti`,selectedAll:`Pasirinkti visi elementai.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nepasirinktas nė vienas elementas`,one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta element\u{173}: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var Wa={};Wa={deselectedItem:e=>`Vienums ${e.item} nav atlas\u{12B}ts.`,longPressToSelect:`Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.`,select:`Atlasīt`,selectedAll:`Atlasīti visi vienumi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nav atlasīts neviens vienums`,one:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlas\u{12B}ts vienums ${e.item}.`};var Ga={};Ga={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:`Bruk et langt trykk for å gå inn i valgmodus.`,select:`Velg`,selectedAll:`Alle elementer er valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer er valgt`,one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var Ka={};Ka={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:`Druk lang om de selectiemodus te openen.`,select:`Selecteren`,selectedAll:`Alle items geselecteerd.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Geen items geselecteerd`,one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var qa={};qa={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:`Naciśnij i przytrzymaj, aby wejść do trybu wyboru.`,select:`Zaznacz`,selectedAll:`Wszystkie zaznaczone elementy.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nie zaznaczono żadnych elementów`,one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych element\xf3w`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var Ja={};Ja={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Mantenha pressionado para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Ya={};Ya={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Prima continuamente para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Xa={};Xa={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:`Apăsați lung pentru a intra în modul de selectare.`,select:`Selectare`,selectedAll:`Toate elementele selectate.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Niciun element selectat`,one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var Za={};Za={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`Нажмите и удерживайте для входа в режим выбора.`,select:`Выбрать`,selectedAll:`Выбраны все элементы.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Нет выбранных элементов`,one:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}`,other:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var Qa={};Qa={deselectedItem:e=>`Nevybrat\xe9 polo\u{17E}ky: ${e.item}.`,longPressToSelect:`Dlhším stlačením prejdite do režimu výberu.`,select:`Vybrať`,selectedAll:`Všetky vybraté položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Žiadne vybraté položky`,one:()=>`${t.number(e.count)} vybrat\xe1 polo\u{17E}ka`,other:()=>`Po\u{10D}et vybrat\xfdch polo\u{17E}iek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybrat\xe9 polo\u{17E}ky: ${e.item}.`};var $a={};$a={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:`Za izbirni način pritisnite in dlje časa držite.`,select:`Izberite`,selectedAll:`Vsi elementi so izbrani.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Noben element ni izbran`,one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var eo={};eo={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:`Dugo pritisnite za ulazak u režim biranja.`,select:`Izaberite`,selectedAll:`Izabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije izabrana nijedna stavka`,one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var to={};to={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:`Tryck länge när du vill öppna väljarläge.`,select:`Markera`,selectedAll:`Alla markerade objekt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Inga markerade objekt`,one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var no={};no={deselectedItem:e=>`${e.item} se\xe7ilmedi.`,longPressToSelect:`Seçim moduna girmek için uzun basın.`,select:`Seç`,selectedAll:`Tüm ögeler seçildi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Hiçbir öge seçilmedi`,one:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`,other:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`})}.`,selectedItem:e=>`${e.item} se\xe7ildi.`};var ro={};ro={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`Виконайте довге натиснення, щоб перейти в режим вибору.`,select:`Вибрати`,selectedAll:`Усі елементи вибрано.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Жодних елементів не вибрано`,one:()=>`${t.number(e.count)} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}`,other:()=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{456}\u{432}: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var io={};io={deselectedItem:e=>`\u{672A}\u{9009}\u{62E9} ${e.item}\u{3002}`,longPressToSelect:`长按以进入选择模式。`,select:`选择`,selectedAll:`已选择所有项目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未选择项目`,one:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`,other:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.item}\u{3002}`};var ao={};ao={deselectedItem:e=>`\u{672A}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`,longPressToSelect:`長按以進入選擇模式。`,select:`選取`,selectedAll:`已選取所有項目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未選取任何項目`,one:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`,other:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`};var oo={};oo={"ar-AE":Ea,"bg-BG":Da,"cs-CZ":Oa,"da-DK":ka,"de-DE":Aa,"el-GR":ja,"en-US":Ma,"es-ES":Na,"et-EE":Pa,"fi-FI":Fa,"fr-FR":Ia,"he-IL":La,"hr-HR":Ra,"hu-HU":za,"it-IT":Ba,"ja-JP":Va,"ko-KR":Ha,"lt-LT":Ua,"lv-LV":Wa,"nb-NO":Ga,"nl-NL":Ka,"pl-PL":qa,"pt-BR":Ja,"pt-PT":Ya,"ro-RO":Xa,"ru-RU":Za,"sk-SK":Qa,"sl-SI":$a,"sr-SP":eo,"sv-SE":to,"tr-TR":no,"uk-UA":ro,"zh-CN":io,"zh-TW":ao};function so(e){return e&&e.__esModule?e.default:e}function co(e,t){let{getRowText:n=e=>{var n;return(n=t.collection).getTextValue?.call(n,e)??t.collection.getItem(e)?.textValue}}=e,r=dn(so(oo),`@react-aria/grid`),i=t.selectionManager.rawSelection,a=(0,J.useRef)(i),o=(0,J.useCallback)(()=>{if(!t.selectionManager.isFocused||i===a.current){a.current=i;return}let e=lo(i,a.current),o=lo(a.current,i),s=t.selectionManager.selectionBehavior===`replace`,c=[];if(t.selectionManager.selectedKeys.size===1&&s){let e=t.selectionManager.selectedKeys.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`selectedItem`,{item:t}))}}else if(e.size===1&&o.size===0){let t=e.keys().next().value;if(t!=null){let e=n(t);e&&c.push(r.format(`selectedItem`,{item:e}))}}else if(o.size===1&&e.size===0){let e=o.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`deselectedItem`,{item:t}))}}t.selectionManager.selectionMode===`multiple`&&(c.length===0||i===`all`||i.size>1||a.current===`all`||a.current?.size>1)&&c.push(i===`all`?r.format(`selectedAll`):r.format(`selectedCount`,{count:i.size})),c.length>0&&qt(c.join(` `)),a.current=i},[i,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,n,r]);Nr(()=>{if(t.selectionManager.isFocused)o();else{let e=requestAnimationFrame(o);return()=>cancelAnimationFrame(e)}},[i,t.selectionManager.isFocused])}function lo(e,t){let n=new Set;if(e===`all`||t===`all`)return n;for(let r of e.keys())t.has(r)||n.add(r);return n}function uo(e){return e&&e.__esModule?e.default:e}function fo(e){let t=dn(uo(oo),`@react-aria/grid`),n=Wt(),r=(n===`pointer`||n===`virtual`||n==null)&&typeof window<`u`&&`ontouchstart`in window,i=(0,J.useMemo)(()=>{let n=e.selectionManager.selectionMode,i=e.selectionManager.selectionBehavior,a;return r&&(a=t.format(`longPressToSelect`)),i===`replace`&&n!==`none`&&e.hasItemActions?a:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,r]);return Tr(i)}function po(e){return e&&e.__esModule?e.default:e}function mo(e,t){let{key:n}=e,r=t.selectionManager,i=Gt(),a=!t.selectionManager.canSelectItem(n),o=t.selectionManager.isSelected(n);return{checkboxProps:{id:i,"aria-label":dn(po(oo),`@react-aria/grid`).format(`select`),isSelected:o,isDisabled:a,onChange:()=>r.toggleSelection(n)}}}function ho(e,t,n){let{isVirtualized:r,keyboardDelegate:i,layoutDelegate:a,onAction:o,disallowTypeAhead:s,linkBehavior:c=`action`,keyboardNavigationBehavior:l=`arrow`,escapeKeyBehavior:u=`clearSelection`,shouldSelectOnPressUp:d}=e;!e[`aria-label`]&&!e[`aria-labelledby`]&&console.warn(`An aria-label or aria-labelledby prop is required for accessibility.`);let{listProps:f}=Mi({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:n,keyboardDelegate:i,layoutDelegate:a,isVirtualized:r,selectOnFocus:t.selectionManager.selectionBehavior===`replace`,shouldFocusWrap:e.shouldFocusWrap,linkBehavior:c,disallowTypeAhead:s,autoFocus:e.autoFocus,escapeKeyBehavior:u}),p=Gt(e.id);Ca.set(t,{id:p,onAction:o,linkBehavior:c,keyboardNavigationBehavior:l,shouldSelectOnPressUp:d});let m=fo({selectionManager:t.selectionManager,hasItemActions:!!o}),h=fi(n,{isDisabled:t.collection.size!==0}),g=Ct(e,{labelable:!0}),_=rn(g,{role:`grid`,id:p,"aria-multiselectable":t.selectionManager.selectionMode===`multiple`?`true`:void 0},t.collection.size===0?{tabIndex:h?-1:0}:f,m);return r&&(_[`aria-rowcount`]=t.collection.size,_[`aria-colcount`]=1),co({},t),{gridProps:_}}var go={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function _o(e,t,n){let{node:r,isVirtualized:i}=e,{direction:a}=Qn(),{onAction:o,linkBehavior:s,keyboardNavigationBehavior:c,shouldSelectOnPressUp:l}=Ca.get(t),u=wt(),d=(0,J.useRef)(null),f=()=>{n.current!==null&&(d.current!=null&&r.key!==d.current||!Lt(n.current))&&Bt(n.current)},p={},m=e.hasChildItems,h=t.selectionManager.isLink(r.key);if(r!=null&&`expandedKeys`in t){var g;let e=(g=t.collection).getChildren?.call(g,r.key);m||=[...e??[]].length>1,o==null&&!h&&t.selectionManager.selectionMode===`none`&&m&&(o=()=>t.toggleKey(r.key));let n=m?t.expandedKeys.has(r.key):void 0,i=1,a=r.index;if(r.level>=0&&r?.parentKey!=null){let e=t.collection.getItem(r.parentKey);if(e){let n=yo(e,t.collection);i=[...n].filter(e=>e.type===`item`).length,a>0&&n[0].type!==`item`&&--a}}else i=[...t.collection].filter(e=>e.level===0&&e.type===`item`).length;p={"aria-expanded":n,"aria-level":r.level+1,"aria-posinset":a+1,"aria-setsize":i}}let{itemProps:_,...v}=Di({selectionManager:t.selectionManager,key:r.key,ref:n,isVirtualized:i,shouldSelectOnPressUp:e.shouldSelectOnPressUp||l,onAction:o||r.props?.onAction?yn(r.props?.onAction,o?()=>o(r.key):void 0):void 0,focus:f,linkBehavior:s}),y=e=>{let i=Rt();if(!Ft(e.currentTarget,Dt(e))||!n.current||!i)return;let o=wr(n.current);if(o.currentNode=i,`expandedKeys`in t&&i===n.current){if(e.key===go.expand[a]&&t.selectionManager.focusedKey===r.key&&m&&!t.expandedKeys.has(r.key)){t.toggleKey(r.key),e.stopPropagation();return}if(e.key===go.collapse[a]&&t.selectionManager.focusedKey===r.key&&m&&t.expandedKeys.has(r.key)){t.toggleKey(r.key),e.stopPropagation();return}}switch(e.key){case`ArrowLeft`:if(c===`arrow`){let t=a===`rtl`?o.nextNode():o.previousNode();if(t)e.preventDefault(),e.stopPropagation(),Bt(t),Er(t,{containingElement:_r(n.current)});else if(e.preventDefault(),e.stopPropagation(),a===`rtl`)Bt(n.current),Er(n.current,{containingElement:_r(n.current)});else{o.currentNode=n.current;let e=vo(o);e&&(Bt(e),Er(e,{containingElement:_r(n.current)}))}}break;case`ArrowRight`:if(c===`arrow`){let t=a===`rtl`?o.previousNode():o.nextNode();if(t)e.preventDefault(),e.stopPropagation(),Bt(t),Er(t,{containingElement:_r(n.current)});else if(e.preventDefault(),e.stopPropagation(),a===`ltr`)Bt(n.current),Er(n.current,{containingElement:_r(n.current)});else{o.currentNode=n.current;let e=vo(o);e&&(Bt(e),Er(e,{containingElement:_r(n.current)}))}}break;case`ArrowUp`:case`ArrowDown`:if(!e.altKey&&Ft(n.current,Dt(e))){var s;e.stopPropagation(),e.preventDefault(),(s=n.current.parentElement)==null||s.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))}}},b=e=>{if(d.current=r.key,Dt(e)!==n.current){kt()||t.selectionManager.setFocusedKey(r.key);return}},x=e=>{let t=Rt();if(!(!Ft(e.currentTarget,Dt(e))||!n.current||!t)&&e.key===`Tab`&&c===`tab`){let r=wr(n.current,{tabbable:!0});r.currentNode=t,(e.shiftKey?r.previousNode():r.nextNode())&&e.stopPropagation()}},S=gn(r.props),C=v.hasAction?S:{},w=rn(_,C,{role:`row`,onKeyDownCapture:y,onKeyDown:x,onFocus:b,"aria-label":r[`aria-label`]||r.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(r.key)?t.selectionManager.isSelected(r.key):void 0,"aria-disabled":t.selectionManager.isDisabled(r.key)||void 0,"aria-labelledby":u&&(r[`aria-label`]||r.textValue)?`${wa(t,r.key)} ${u}`:void 0,id:wa(t,r.key)});if(i){let{collection:e}=t;w[`aria-rowindex`]=[...e].find(e=>e.type===`section`)?[...e.getKeys()].filter(t=>e.getItem(t)?.type!==`section`).findIndex(e=>e===r.key)+1:r.index+1}let T={role:`gridcell`,"aria-colindex":1};return{rowProps:{...rn(w,p)},gridCellProps:T,descriptionProps:{id:u},...v}}function vo(e){let t=null,n=null;do n=e.lastChild(),n&&(t=n);while(n);return t}function yo(e,t){let n=t.getChildren?.call(t,e.key),r=n?Array.from(n):[],i=r.length>0?r[0]:null,a=[];for(;i;)a.push(i),i=i.nextKey==null?null:t.getItem(i.nextKey);return a}function bo(e,t){let{key:n}=e,{checkboxProps:r}=mo(e,t);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${wa(t,n)}`}}}function xo(e,t,n){let{gridProps:r}=ho(e,t,n);return r.role=`treegrid`,{gridProps:r}}var So={};So={collapse:`طي`,expand:`تمديد`};var Co={};Co={collapse:`Свиване`,expand:`Разширяване`};var wo={};wo={collapse:`Sbalit`,expand:`Roztáhnout`};var To={};To={collapse:`Skjul`,expand:`Udvid`};var Eo={};Eo={collapse:`Reduzieren`,expand:`Erweitern`};var Do={};Do={collapse:`Σύμπτυξη`,expand:`Ανάπτυξη`};var Oo={};Oo={expand:`Expand`,collapse:`Collapse`};var ko={};ko={collapse:`Contraer`,expand:`Ampliar`};var Ao={};Ao={collapse:`Ahenda`,expand:`Laienda`};var jo={};jo={collapse:`Pienennä`,expand:`Laajenna`};var Mo={};Mo={collapse:`Réduire`,expand:`Développer`};var No={};No={collapse:`כווץ`,expand:`הרחב`};var Po={};Po={collapse:`Sažmi`,expand:`Proširi`};var Fo={};Fo={collapse:`Összecsukás`,expand:`Kibontás`};var Io={};Io={collapse:`Comprimi`,expand:`Espandi`};var Lo={};Lo={collapse:`折りたたむ`,expand:`展開`};var Ro={};Ro={collapse:`접기`,expand:`펼치기`};var zo={};zo={collapse:`Sutraukti`,expand:`Išskleisti`};var Bo={};Bo={collapse:`Sakļaut`,expand:`Izvērst`};var Vo={};Vo={collapse:`Skjul`,expand:`Utvid`};var Ho={};Ho={collapse:`Samenvouwen`,expand:`Uitvouwen`};var Uo={};Uo={collapse:`Zwiń`,expand:`Rozwiń`};var Wo={};Wo={collapse:`Recolher`,expand:`Expandir`};var Go={};Go={collapse:`Colapsar`,expand:`Expandir`};var Ko={};Ko={collapse:`Restrângeți`,expand:`Extindeți`};var qo={};qo={collapse:`Свернуть`,expand:`Развернуть`};var Jo={};Jo={collapse:`Zbaliť`,expand:`Rozbaliť`};var Yo={};Yo={collapse:`Strni`,expand:`Razširi`};var Xo={};Xo={collapse:` Skupi`,expand:`Proširi`};var Zo={};Zo={collapse:`Dölj`,expand:`Expandera`};var Qo={};Qo={collapse:`Daralt`,expand:`Genişlet`};var $o={};$o={collapse:`Згорнути`,expand:`Розгорнути`};var es={};es={collapse:`折叠`,expand:`扩展`};var ts={};ts={collapse:`收合`,expand:`展開`};var ns={};ns={"ar-AE":So,"bg-BG":Co,"cs-CZ":wo,"da-DK":To,"de-DE":Eo,"el-GR":Do,"en-US":Oo,"es-ES":ko,"et-EE":Ao,"fi-FI":jo,"fr-FR":Mo,"he-IL":No,"hr-HR":Po,"hu-HU":Fo,"it-IT":Io,"ja-JP":Lo,"ko-KR":Ro,"lt-LT":zo,"lv-LV":Bo,"nb-NO":Vo,"nl-NL":Ho,"pl-PL":Uo,"pt-BR":Wo,"pt-PT":Go,"ro-RO":Ko,"ru-RU":qo,"sk-SK":Jo,"sl-SI":Yo,"sr-SP":Xo,"sv-SE":Zo,"tr-TR":Qo,"uk-UA":$o,"zh-CN":es,"zh-TW":ts};function rs(e){return e&&e.__esModule?e.default:e}function is(e,t,n){let{node:r}=e,i=_o(e,t,n),a=i.rowProps[`aria-expanded`]===!0,o=dn(rs(ns),`@react-aria/tree`),s={onPress:()=>{i.isDisabled||(t.toggleKey(r.key),t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(r.key))},excludeFromTabOrder:!0,preventFocusOnPress:!0,"data-react-aria-prevent-focus":!0,...tn({"aria-label":a?o.format(`collapse`):o.format(`expand`),"aria-labelledby":i.rowProps.id})};return{...i,expandButtonProps:s}}var as=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function os(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ss(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,J.useRef)(!1),[,s]=(0,J.useState)(!1),c=(0,J.useRef)(null),l=(0,J.useRef)(null),[,u]=(0,J.useState)(null),d=(0,J.useMemo)(()=>cs(e.selectedKeys),[e.selectedKeys]),f=(0,J.useMemo)(()=>cs(e.defaultSelectedKeys,new as),[e.defaultSelectedKeys]),[p,m]=hn(d,f,e.onSelectionChange),h=(0,J.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[g,_]=(0,J.useState)(i);i===`replace`&&g===`toggle`&&typeof p==`object`&&p.size===0&&_(`replace`);let v=(0,J.useRef)(i);return(0,J.useEffect)(()=>{i!==v.current&&(_(i),v.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:g,setSelectionBehavior:_,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:p,setSelectedKeys(e){(r||!os(e,p))&&m(e)},disabledKeys:h,disabledBehavior:a}}function cs(e,t){return e?e===`all`?`all`:new as(e):t}var ls=class e{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Vi(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Vi(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new as([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new as(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?Vi(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new as(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new as([t],t,t):new as;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new as;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){let r=this.collection.getItem(n);r?.type===`item`&&e.push(n),r?.hasChildNodes&&(this.allowsCellSelection||r.type!==`item`)&&t(zi(Ri(r,this.collection))?.key??null)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new as)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let t=this.collection.getItem(e);return!(!t||t!=null&&t.props?.isDisabled||t.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){var t;return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!((t=this.collection.getItem(e))!=null&&t.props?.isDisabled))}isLink(e){var t;return!!((t=this.collection.getItem(e))!=null&&t.props?.href)}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null}},us=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t||=new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}};function ds(e){let{onExpandedChange:t}=e,[n,r]=hn(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=ss(e),a=(0,J.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=Li(e,(0,J.useCallback)(e=>new us(e,{expandedKeys:n}),[n]),null);return(0,J.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(fs(n,e))},setExpandedKeys:r,selectionManager:new ls(o,i)}}function fs(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var ps=(0,J.createContext)({}),ms=(0,J.createContext)(null),hs=(0,J.forwardRef)(function(e,t){let{render:n}=(0,J.useContext)(ms);return J.createElement(J.Fragment,null,n(e,t))});function gs(e,t){let n=e?.renderDropIndicator,r=e?.isVirtualDragging?.call(e),i=(0,J.useCallback)(e=>{if(r||t?.isDropTarget(e))return n?n(e):J.createElement(hs,{target:e})},[t?.target,r,n]);return e?.useDropIndicator?i:void 0}function _s(e,t,n){let r=e.focusedKey,i=null;if(t!=null&&t.isVirtualDragging?.call(t)&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return(0,J.useMemo)(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}var vs=(0,J.createContext)(null);function ys(e){let t=(0,J.useRef)({});return J.createElement(vs.Provider,{value:t},e.children)}var bs=10,xs=5,Ss=class{setup(e,t,n){this.delegate=e,this.state=t,this.direction=n}getDropTargetFromPoint(e,t,n){let r=this.delegate.getDropTargetFromPoint(e,t,n);return!r||r.type===`root`?r:this.resolveDropTarget(r,e,t,n)}resolveDropTarget(e,t,n,r){let i=this.pointerTracking,a=n-i.lastY,o=t-i.lastX,s=i.yDirection,c=i.xDirection;if(Math.abs(a)>xs&&(s=a>0?`down`:`up`,i.yDirection=s,i.lastY=n),Math.abs(o)>bs&&(c=o>0?`right`:`left`,i.xDirection=c,i.lastX=t),e.dropPosition===`before`){let t=this.state.collection.getKeyBefore(e.key);if(t!=null){let n={type:`item`,key:t,dropPosition:`after`};r(n)&&(e=n)}}let l=this.getPotentialTargets(e,r);if(l.length===0)return{type:`root`};let u;return l.length>1?u=this.selectTarget(l,e,t,n,s,c):(u=l[0],i.boundaryContext=null),u}getPotentialTargets(e,t){if(e.dropPosition===`on`)return[e];let n=e,r=this.state.collection,i=r.getItem(n.key);for(;i&&i?.type!==`item`&&i.nextKey!=null;)n.key=i.nextKey,i=r.getItem(i.nextKey);let a=[n];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&r.getChildren&&n.dropPosition===`after`){let e=null;for(let t of r.getChildren(i.key))if(t.type===`item`){e=t;break}if(e){let n={type:`item`,key:e.key,dropPosition:`before`};return t(n)?[n]:[]}}if(i?.nextKey!=null)return[e];let o=i?.parentKey,s=[];for(;o;){let e=r.getItem(o),n=e?.nextKey?r.getItem(e.nextKey):null;if(!n||n.parentKey!==o){let e={type:`item`,key:o,dropPosition:`after`};if(t(e)&&s.push(e),n)break}o=e?.parentKey}if(s.length>0&&a.push(...s),a.length===1){let e=r.getKeyAfter(n.key),a=e?r.getItem(e):null;if(e!=null&&a&&i&&a.level!=null&&i.level!=null&&a.level>i.level){let n={type:`item`,key:e,dropPosition:`before`};if(t(n))return[n]}}return a.filter(t)}selectTarget(e,t,n,r,i,a){if(e.length<2)return e[0];let o=this.pointerTracking,s=this.state.collection.getItem(t.key)?.parentKey;if(!s)return e[0];(!o.boundaryContext||o.boundaryContext.parentKey!==s)&&(o.boundaryContext={parentKey:s,preferredTargetIndex:o.yDirection===`up`?e.length-1:0,lastSwitchY:r,lastSwitchX:n});let c=o.boundaryContext,l=Math.abs(n-c.lastSwitchX);if(Math.abs(r-c.lastSwitchY)>xs&&i){let t=c.preferredTargetIndex||0;i===`down`&&t===0?c.preferredTargetIndex=e.length-1:i===`up`&&t===e.length-1&&(c.preferredTargetIndex=0),o.xDirection=null}if(l>bs&&a){let t=c.preferredTargetIndex||0;a===`left`?this.direction===`ltr`?t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n):t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):a===`right`&&(this.direction===`ltr`?t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n)),o.yDirection=null}return e[Math.max(0,Math.min(c.preferredTargetIndex||0,e.length-1))]}constructor(){this.delegate=null,this.state=null,this.direction=`ltr`,this.pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null}}},Cs=class e extends Yi{withExpandedKeys(t,n){let r=this.clone();return r.expandedKeys=n,e.cloneAncestorSections(n,t,r),e.cloneAncestorSections(t,n,r),r.frozen=this.frozen,r}static cloneAncestorSections(e,t,n){for(let r of e)if(!t.has(r)){let e=r;for(;e!=null;){let t=n.getItem(e);if(t?.type===`section`){n.keyMap.set(e,t.clone());break}e=t?.parentKey??null}}}*[Symbol.iterator](){let e=this.getFirstKey(),t=e==null?null:this.getItem(e);for(;t;)if(yield t,t.type===`section`)t=t.nextKey?this.getItem(t.nextKey):null;else{let e=this.getKeyAfter(t.key);t=e?this.getItem(e):null}}getLastKey(){let e=this.lastKey;if(e==null)return null;let t=this.getItem(e);for(;t?.lastChildKey!=null&&(t.type!==`item`||this.expandedKeys.has(t.key));)t=this.getItem(t.lastChildKey);return t?.key}getKeyAfter(e){let t=this.getItem(e);if(!t)return null;if((this.expandedKeys.has(t.key)||t.type!==`item`)&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.getItem(t.parentKey);else return null}return null}getKeyBefore(e){let t=this.getItem(e);if(!t)return null;if(t.prevKey!=null){for(t=this.getItem(t.prevKey);t&&(t.type!==`item`||this.expandedKeys.has(t.key))&&t.lastChildKey!=null;)t=this.getItem(t.lastChildKey);return t?.key??null}return t.parentKey}getChildren(e){let t=this;return{*[Symbol.iterator](){let n=t.getItem(e),r=n?.firstChildKey==null?null:t.getItem(n.firstChildKey);if(n&&n.type===`section`&&r)for(;r&&r.key!==n.nextKey;){yield t.getItem(r.key);let e=t.getKeyAfter(r.key);r=e==null?null:t.getItem(e)}else for(;r;)yield r,r=r.nextKey==null?null:t.getItem(r.nextKey)}}}getTextValue(e){let t=this.getItem(e);return t?t.textValue:``}constructor(...e){super(...e),this.expandedKeys=new Set}},ws=(0,J.createContext)(null),Ts=(0,J.createContext)(null),Es=(0,J.forwardRef)(function(e,t){return[e,t]=zt(e,t,ws),J.createElement(ia,{content:J.createElement(ga,e),createCollection:()=>new Cs},n=>J.createElement(Os,{props:e,collection:n,treeRef:t}))}),Ds={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function Os({props:e,collection:t,treeRef:n}){let{dragAndDropHooks:r}=e,{direction:i}=Qn(),a=fr({usage:`search`,sensitivity:`base`}),o=!!r?.useDraggableCollectionState,s=!!r?.useDroppableCollectionState,c=(0,J.useRef)(o),l=(0,J.useRef)(s);(0,J.useEffect)(()=>{c.current!==o&&console.warn(`Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.`),l.current!==s&&console.warn(`Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.`)},[o,s]);let{selectionMode:u=`none`,expandedKeys:d,defaultExpandedKeys:f,onExpandedChange:p,disabledBehavior:m=`all`}=e,{CollectionRoot:h,isVirtualized:g,layoutDelegate:_,dropTargetDelegate:v}=(0,J.useContext)(Sa),[y,b]=hn(d?new Set(d):void 0,f?new Set(f):new Set,p),[x,S]=(0,J.useState)(t),[C,w]=(0,J.useState)(y),[T,E]=(0,J.useState)(()=>t.withExpandedKeys(C,y));(!Rs(C,y)||t!==x)&&(E(t.withExpandedKeys(C,y)),S(t),w(y));let D=ds({...e,selectionMode:u,expandedKeys:y,onExpandedChange:b,collection:T,children:void 0,disabledBehavior:m}),{gridProps:O}=xo({...e,isVirtualized:g,layoutDelegate:_},D,n),k,A,j,M=!1,N=null,P=(0,J.useRef)(null);if(o&&r){k=r.useDraggableCollectionState({collection:D.collection,selectionManager:D.selectionManager,preview:r.renderDragPreview?P:void 0}),r.useDraggableCollection({},k,n);let e=r.DragPreview;N=r.renderDragPreview?J.createElement(e,{ref:P},r.renderDragPreview):null}let[F]=(0,J.useState)(()=>new Ss);if(s&&r){A=r.useDroppableCollectionState({collection:D.collection,selectionManager:D.selectionManager});let e=r.dropTargetDelegate||v||new r.ListDropTargetDelegate(D.collection,n,{direction:i});F.setup(e,D,i);let t=new ji({collection:D.collection,collator:a,ref:n,disabledKeys:D.selectionManager.disabledKeys,disabledBehavior:D.selectionManager.disabledBehavior,direction:i,layoutDelegate:_});j=r.useDroppableCollection({keyboardDelegate:t,dropTargetDelegate:F,onDropActivate:e=>{if(e.target.type===`item`){let t=e.target.key,n=D.collection.getItem(t),i=y.has(t);n&&n.hasChildNodes&&(!i||r!=null&&r.isVirtualDragging?.call(r))&&D.toggleKey(t)}},onKeyDown:e=>{let t=A?.target;if(t&&t.type===`item`&&t.dropPosition===`on`){let n=D.collection.getItem(t.key);(e.key===Ds.expand[i]&&n?.hasChildNodes&&!D.expandedKeys.has(t.key)||e.key===Ds.collapse[i]&&n?.hasChildNodes&&D.expandedKeys.has(t.key))&&D.toggleKey(t.key)}}},A,n);let o=A.getDropOperation;A.getDropOperation=e=>{let{target:t,isInternal:n}=e,r=k?.draggingKeys??new Set;if(n&&t.type===`item`&&r.size>0){if(r.has(t.key)&&t.dropPosition===`on`)return`cancel`;let e=t.key;for(;e!=null;){let t=D.collection.getItem(e)?.parentKey;if(t!=null&&r.has(t))return`cancel`;e=t??null}}return o(e)},M=A.isDropTarget({type:`root`})}let I=!!(o&&!k?.isDisabled),{focusProps:L,isFocused:R,isFocusVisible:z}=Pt(),B={isEmpty:D.collection.size===0,isFocused:R,isFocusVisible:z,isDropTarget:M,selectionMode:D.selectionManager.selectionMode,allowsDragging:!!I,state:D},V=St({...e,children:void 0,defaultClassName:`react-aria-Tree`,values:B}),H=null;if(D.collection.size===0&&e.renderEmptyState){let{isEmpty:t,...n}=B,r=e.renderEmptyState({...n});H=J.createElement(`div`,{role:`row`,style:{display:`contents`},"aria-level":1},J.createElement(`div`,{role:`gridcell`,style:{display:`contents`}},r))}let ee=Ct(e,{global:!0});return J.createElement(J.Fragment,null,J.createElement(xr,null,J.createElement(mn.div,{...rn(ee,V,O,L,j?.collectionProps),ref:n,slot:e.slot||void 0,"data-empty":D.collection.size===0||void 0,"data-focused":R||void 0,"data-drop-target":M||void 0,"data-focus-visible":z||void 0,"data-selection-mode":D.selectionManager.selectionMode===`none`?void 0:D.selectionManager.selectionMode,"data-allows-dragging":!!I||void 0},J.createElement(Xt,{values:[[Ts,D],[ps,{dragAndDropHooks:r,dragState:k,dropState:A}],[ms,{render:Ps}]]},s&&J.createElement(Ls,null),J.createElement(ys,null,J.createElement(h,{collection:D.collection,persistedKeys:_s(D.selectionManager,r,A),scrollRef:n,renderDropIndicator:gs(r,A)}))),H)),N)}var ks=class extends Ui{};ks.type=`content`;var As=fa(ks,function(e){let t=(0,J.useContext)(js),n=St({children:e.children,values:t});return J.createElement(Sa.Provider,{value:ya},n.children)}),js=(0,J.createContext)(null),Ms=class extends Ui{};Ms.type=`item`;var Ns=pa(Ms,(e,t,n)=>{let r=(0,J.useContext)(Ts);t=nn(t);let{dragAndDropHooks:i,dragState:a,dropState:o}=(0,J.useContext)(ps),{rowProps:s,gridCellProps:c,expandButtonProps:l,descriptionProps:u,...d}=is({node:n,shouldSelectOnPressUp:!!a},r,t),f=s[`aria-expanded`]===!0,p=e.hasChildItems||[...r.collection.getChildren(n.key)].length>1,m=s[`aria-level`]||1,{hoverProps:h,isHovered:g}=It({isDisabled:!d.allowsSelection&&!d.hasAction,onHoverStart:e.onHoverStart,onHoverChange:e.onHoverChange,onHoverEnd:e.onHoverEnd}),{isFocusVisible:_,focusProps:v}=Pt(),{isFocusVisible:y,focusProps:b}=Pt({within:!0}),{checkboxProps:x}=bo({key:n.key},r),S=null;a&&i&&(S=i.useDraggableItem({key:n.key,hasDragButton:!0},a));let C=null,w=(0,J.useRef)(null),T=(0,J.useRef)(null),E=(0,J.useRef)(null),{visuallyHiddenProps:D}=sr();o&&i&&(C=i.useDropIndicator({target:{type:`item`,key:n.key,dropPosition:`on`},activateButtonRef:E},o,T));let O=a&&a.isDragging(n.key),k=C?.isDropTarget,A=r.selectionManager.selectionMode,j=r.selectionManager.selectionBehavior,M=J.useMemo(()=>({...d,isHovered:g,isFocusVisible:_,isExpanded:f,hasChildItems:p,level:m,selectionMode:A,selectionBehavior:j,isFocusVisibleWithin:y,state:r,id:n.key,allowsDragging:!!a,isDragging:O,isDropTarget:k}),[d,g,_,f,p,m,y,r,n.key,a,O,k,j,A]),N=St({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-TreeItem`,defaultStyle:{"--tree-item-level":m},values:M});(0,J.useEffect)(()=>{n.textValue},[n.textValue]),(0,J.useEffect)(()=>{p&&w.current},[]);let P=(0,J.useRef)(null);(0,J.useEffect)(()=>{a&&P.current},[]);let F=ea({items:r.collection.getChildren(n.key),children:e=>{switch(e.type){case`content`:return e.render(e);case`loader`:case`item`:return J.createElement(J.Fragment,null);default:throw Error(`Unsupported element type in TreeRow: `+e.type)}}}),I=Gt(),L=Ct(e,{global:!0});return delete L.id,delete L.onClick,J.createElement(J.Fragment,null,C&&!C.isHidden&&J.createElement(`div`,{role:`row`,"aria-level":s[`aria-level`],"aria-expanded":s[`aria-expanded`],"aria-label":C.dropIndicatorProps[`aria-label`]},J.createElement(`div`,{role:`gridcell`,"aria-colindex":1,style:{display:`contents`}},J.createElement(`div`,{role:`button`,...D,...C.dropIndicatorProps,ref:T}),s[`aria-expanded`]==null?null:J.createElement(`div`,{role:`button`,...D,id:I,"aria-label":l[`aria-label`],"aria-labelledby":`${I} ${s.id}`,tabIndex:-1,ref:E}))),J.createElement(mn.div,{...rn(L,s,v,h,b,S?.dragProps),...N,ref:t,"data-expanded":p&&f||void 0,"data-has-child-items":p||void 0,"data-level":m,"data-selected":d.isSelected||void 0,"data-disabled":d.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":d.isFocused||void 0,"data-focus-visible":_||void 0,"data-pressed":d.isPressed||void 0,"data-selection-mode":r.selectionManager.selectionMode===`none`?void 0:r.selectionManager.selectionMode,"data-allows-dragging":!!a||void 0,"data-dragging":O||void 0,"data-drop-target":k||void 0},J.createElement(`div`,{...c,style:{display:`contents`}},J.createElement(Xt,{values:[[Fr,{slots:{selection:x}}],[en,{slots:{[cn]:{},chevron:{...l,ref:w},drag:{...S?.dragButtonProps,ref:P,style:{pointerEvents:`none`}}}}],[js,{...M}],[$n,{isSelected:d.isSelected}]]},F))))});fa(Ki,function(e,t,n){let{isVirtualized:r}=(0,J.useContext)(Sa),i=(0,J.useContext)(Ts),{isLoading:a,onLoadMore:o,scrollOffset:s,...c}=e,l=(0,J.useRef)(null);oi((0,J.useMemo)(()=>({onLoadMore:o,collection:i?.collection,sentinelRef:l,scrollOffset:s}),[o,s,i?.collection]),l),t=nn(t);let{rowProps:u,gridCellProps:d}=is({node:n},i,t),f=u[`aria-level`]||1,p={role:`row`,"aria-level":u[`aria-level`]},m=St({...c,id:void 0,children:n.rendered,defaultClassName:`react-aria-TreeLoader`,values:{level:f}}),h={};return r&&(h={display:`contents`}),J.createElement(J.Fragment,null,J.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:si(!0)},J.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:l,style:{position:`absolute`,height:1,width:1}})),a&&m.children&&J.createElement(mn.div,{ref:t,...rn(Ct(e),p),...m,"data-level":f},J.createElement(`div`,{...d,style:h},m.children)))});function Ps(e,t){t=nn(t);let{dragAndDropHooks:n,dropState:r}=(0,J.useContext)(ps),i=(0,J.useRef)(null),{dropIndicatorProps:a,isHidden:o,isDropTarget:s}=n.useDropIndicator(e,r,i);if(o)return null;let c=r&&e.target.type===`item`?(r.collection.getItem(e.target.key)?.level||0)+1:1;return J.createElement(Is,{...e,dropIndicatorProps:a,isDropTarget:s,ref:t,buttonRef:i,level:c})}function Fs(e,t){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:i,level:a,...o}=e,{visuallyHiddenProps:s}=sr(),c=St({...o,defaultClassName:`react-aria-DropIndicator`,defaultStyle:{position:`relative`,"--tree-item-level":a},values:{isDropTarget:r}});return J.createElement(mn.div,{...c,role:`row`,"aria-level":a,ref:t,"data-drop-target":r||void 0},J.createElement(`div`,{role:`gridcell`},J.createElement(`div`,{...s,role:`button`,...n,ref:i}),c.children))}var Is=(0,J.forwardRef)(Fs);function Ls(){let{dragAndDropHooks:e,dropState:t}=(0,J.useContext)(ps),n=(0,J.useRef)(null),{dropIndicatorProps:r}=e.useDropIndicator({target:{type:`root`}},t,n),i=t.isDropTarget({type:`root`}),{visuallyHiddenProps:a}=sr();return!i&&r[`aria-hidden`]?null:J.createElement(`div`,{role:`row`,"aria-hidden":r[`aria-hidden`],style:{position:`absolute`}},J.createElement(`div`,{role:`gridcell`},J.createElement(`div`,{role:`button`,...a,...r,ref:n})))}function Rs(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var zs=[`openai`,`github`,`anthropic`,`google`,`ollama`,`bedrock`,`deepseek`,`azure`,`openrouter`,`wandb`,`opencode-go`,`marimo`],Bs=class e{providerId;shortModelId;constructor(e,t){this.providerId=e,this.shortModelId=t}get id(){return`${this.providerId}/${this.shortModelId}`}static parse(t){if(!t.includes(`/`)){let n=Vs(t);return new e(n,t)}let[n,...r]=t.split(`/`);return new e(n,r.join(`/`))}};function Vs(e){return e.startsWith(`gpt`)||e.startsWith(`o3`)||e.startsWith(`o1`)?`openai`:e.startsWith(`claude`)?`anthropic`:e.startsWith(`gemini`)||e.startsWith(`google`)?`google`:e.startsWith(`deepseek`)?`deepseek`:`ollama`}function Hs(e){return zs.includes(e)}var Us=JSON.parse(`{"anthropic":[{"name":"Claude Opus 5.5","model":"claude-opus-5-5","description":"Anthropic's strongest Opus model for coding, agents, and knowledge work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":4,"output":20}},{"name":"Claude Fable 5.1","model":"claude-fable-5-1","description":"Anthropic model for ambitious, long-running coding, agentic, research, and enterprise workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-01","cost":{"input":10,"output":50}},{"name":"Claude Opus 5","model":"claude-opus-5","description":"Anthropic's flagship model for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-24","cost":{"input":5,"output":25}},{"name":"Claude Fable 5","model":"claude-fable-5","description":"Anthropic's Mythos-class model built for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-09","cost":{"input":10,"output":50}},{"name":"Claude Sonnet 5","model":"claude-sonnet-5","description":"Anthropic's most agentic Sonnet model yet, built for planning, tool use, and autonomous multi-step work at Sonnet pricing","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"Claude Opus 4.8","model":"claude-opus-4-8","description":"Modest but tangible improvement over Claude Opus 4.7","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-28","cost":{"input":5,"output":25}},{"name":"Claude Sonnet 4.6","model":"claude-sonnet-4-6","description":"Anthropic Sonnet model for coding, agents, and professional work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-02-17","cost":{"input":3,"output":15}},{"name":"Claude Haiku 4.5","model":"claude-haiku-4-5","description":"Anthropic's fastest and most efficient model, delivering near-frontier intelligence at a fraction of the cost and latency of larger Claude models","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2025-10-15","cost":{"input":1,"output":5}}],"openai":[{"name":"GPT-6 Luna","model":"gpt-6-luna","description":"OpenAI's most efficient model for focused, high-volume tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.1,"output":0.5}},{"name":"GPT-6 Sol","model":"gpt-6-sol","description":"OpenAI reasoning model for demanding tasks that balances capability, latency, and cost","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":2,"output":10}},{"name":"Daybreak Blue","model":"gpt-daybreak-blue-latest","description":"OpenAI model alias for authorized defensive cybersecurity work with reduced refusals","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-07","cost":{"input":4,"output":20}},{"name":"Daybreak Red","model":"gpt-daybreak-red-latest","description":"OpenAI model alias for advanced authorized cybersecurity work, including penetration testing and exploit validation","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-07","cost":{"input":12.5,"output":75}},{"name":"GPT-6 Astra","model":"gpt-6-astra","description":"OpenAI model for advanced analysis, software engineering, deep research, scientific work, and document creation","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-04","cost":{"input":10,"output":50}},{"name":"GPT-5.6","model":"gpt-5.6","description":"OpenAI's GPT-5.6 flagship tier for frontier reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5,"output":30}},{"name":"GPT-5.6 Luna","model":"gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":1,"output":6}},{"name":"GPT-5.6 Sol","model":"gpt-5.6-sol","description":"Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5,"output":30}},{"name":"GPT-5.6 Terra","model":"gpt-5.6-terra","description":"Balanced model in OpenAI's GPT-5.6 series, suited for everyday coding, reasoning, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":2.5,"output":15}},{"name":"GPT-5.5","model":"gpt-5.5","description":"OpenAI model for complex professional workloads, with stronger reasoning, reliability, and token efficiency than GPT-5.4 on hard tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-04-23","cost":{"input":5,"output":30}}],"google":[{"name":"Claude Opus 5.5","model":"claude-opus-5-5@default","description":"Anthropic's strongest Opus model for coding, agents, and knowledge work, available through Vertex AI only","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":4,"output":20}},{"name":"Grok 4.6","model":"xai/grok-4.6","description":"xAI frontier model for coding, knowledge work, and STEM","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-12","cost":{"input":2,"output":6}},{"name":"Gemini 3.8 Flash","model":"gemini-3.8-flash","description":"Google's most intelligent Flash model, with gains in software engineering, agentic tasks, and multi-step reasoning","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-02","cost":{"input":0.75,"output":3.75}},{"name":"Claude Fable 5.1","model":"claude-fable-5-1@default","description":"Anthropic model for ambitious, long-running coding, agentic, research, and enterprise workflows, available through Vertex AI only","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-01","cost":{"input":10,"output":50}},{"name":"Gemini Flash Latest","model":"gemini-flash-latest","description":"Alias that points to the latest Gemini Flash release and can change when Google updates the model family","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-13","cost":{"input":0.75,"output":3.75}},{"name":"Gemini 3.7 Flash","model":"gemini-3.7-flash","description":"High-efficiency Gemini model for agentic workflows, coding, and multimodal reasoning","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-13","cost":{"input":0.75,"output":3.75}},{"name":"Gemma 4 26B A4B IT","model":"gemma-4-26b-a4b-it","description":"Instruction-tuned Mixture-of-Experts (MoE) model from Google DeepMind","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-04-02"},{"name":"Gemma 4 31B IT","model":"gemma-4-31b-it","description":"Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-04-02"},{"name":"Nano Banana 2 Lite","model":"gemini-3.1-flash-lite-image","description":"Google's fastest, most cost-efficient Gemini image model for high-velocity text-to-image generation and visual exploration","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text","image"],"release_date":"2026-06-30","cost":{"input":0.25,"output":30}},{"name":"Nano Banana 2","model":"gemini-3.1-flash-image","description":"Google's image generation and editing model, delivering Pro-level visual quality at Flash speed","roles":["chat","edit"],"capabilities":["thinking"],"input_types":["text","image","pdf"],"output_types":["text","image"],"release_date":"2026-05-28","cost":{"input":0.5,"output":60}},{"name":"Claude Opus 5","model":"claude-opus-5@default","description":"Anthropic Claude Opus 5 on Google Vertex AI only (not available via the Gemini API)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-24","cost":{"input":5,"output":25}},{"name":"Claude Sonnet 5","model":"claude-sonnet-5@default","description":"Anthropic Claude Sonnet 5 on Google Vertex AI only (not available via the Gemini API)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"Claude Opus 4.8","model":"claude-opus-4-8@default","description":"Anthropic Claude Opus 4.8 on Google Vertex AI only (not available via the Gemini API)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-28","cost":{"input":5,"output":25}}],"bedrock":[{"name":"Claude Opus 5.5 (Global)","model":"global.anthropic.claude-opus-5-5","description":"Anthropic's strongest Opus model for coding, agents, and knowledge work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":4,"output":20}},{"name":"GPT-6 Luna (Global)","model":"global.openai.gpt-6-luna","description":"OpenAI's most efficient model for focused, high-volume tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.1,"output":0.5}},{"name":"GPT-6 Astra (Global)","model":"global.openai.gpt-6-astra","description":"OpenAI model for advanced analysis, software engineering, deep research, scientific work, and document creation","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-04","cost":{"input":10,"output":50}},{"name":"Grok 4.6 (Global)","model":"global.xai.grok-4.6","description":"xAI frontier model for coding, knowledge work, and STEM","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-12","cost":{"input":2,"output":6}},{"name":"Claude Fable 5.1 (Global)","model":"global.anthropic.claude-fable-5-1","description":"Anthropic model for ambitious, long-running coding, agentic, research, and enterprise workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-01","cost":{"input":10,"output":50}},{"name":"Grok 4.6","model":"xai.grok-4.6","description":"xAI's frontier model for coding, agentic tasks, knowledge work, and visual reasoning","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-12","cost":{"input":2.2,"output":6.6}},{"name":"GPT-5.6 Luna (Global)","model":"global.openai.gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":0.22,"output":1.32}},{"name":"GPT-5.6 Sol (Global)","model":"global.openai.gpt-5.6-sol","description":"Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5.5,"output":33}},{"name":"Claude Opus 5 (Global)","model":"global.anthropic.claude-opus-5","description":"Anthropic's flagship model for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-24","cost":{"input":5,"output":25}},{"name":"GPT-5.6 Luna","model":"openai.gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":1,"output":6}},{"name":"GPT-5.6 Sol","model":"openai.gpt-5.6-sol","description":"Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5,"output":30}},{"name":"GPT-5.6 Terra","model":"openai.gpt-5.6-terra","description":"Balanced model in OpenAI's GPT-5.6 series, suited for everyday coding, reasoning, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":2.5,"output":15}},{"name":"Claude Fable 5 (Global)","model":"global.anthropic.claude-fable-5","description":"Anthropic's Mythos-class model built for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-09","cost":{"input":10,"output":50}},{"name":"Claude Sonnet 5 (Global)","model":"global.anthropic.claude-sonnet-5","description":"Anthropic's most agentic Sonnet model yet, built for planning, tool use, and autonomous multi-step work at Sonnet pricing","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"Claude Fable 5 (Global)","model":"global.anthropic.claude-fable-5","description":"Anthropic's Mythos-class model built for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-09","cost":{"input":10,"output":50}},{"name":"Claude Sonnet 5 (Global)","model":"global.anthropic.claude-sonnet-5","description":"Anthropic's most agentic Sonnet model yet, built for planning, tool use, and autonomous multi-step work at Sonnet pricing","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"Claude Opus 4.8 (Global)","model":"global.anthropic.claude-opus-4-8","description":"Modest but tangible improvement over Claude Opus 4.7","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-28","cost":{"input":5,"output":25}},{"name":"GLM-5","model":"zai.glm-5","description":"Z.ai's flagship open-source foundation model engineered for complex systems design and long-horizon agent workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-18","cost":{"input":1,"output":3.2}},{"name":"NVIDIA Nemotron 3 Super 120B A12B","model":"nvidia.nemotron-super-3-120b","description":"120B-parameter open hybrid MoE model, activating just 12B parameters for maximum compute efficiency and accuracy in complex multi-agent applications","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-11","cost":{"input":0.15,"output":0.65}},{"name":"Claude Sonnet 4.6","model":"anthropic.claude-sonnet-4-6","description":"Anthropic Sonnet model for coding, agents, and professional work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-02-17","cost":{"input":3,"output":15}}],"azure":[{"name":"Claude Opus 5.5","model":"claude-opus-5-5","description":"Anthropic's strongest Opus model for coding, agents, and knowledge work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":4,"output":20}},{"name":"GPT-6 Luna","model":"gpt-6-luna","description":"OpenAI's most efficient model for focused, high-volume tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.1,"output":0.5}},{"name":"GPT-6 Sol","model":"gpt-6-sol","description":"OpenAI reasoning model for demanding tasks that balances capability, latency, and cost","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":2,"output":10}},{"name":"GPT Image 2.5 Flare","model":"gpt-image-2.5-flare","description":"Small image generation and editing model optimized for speed and high-quality everyday use","roles":["chat","edit"],"capabilities":[],"input_types":["text","image"],"output_types":["image"],"release_date":"2026-09-08","cost":{"input":5,"output":30}},{"name":"GPT Image 2.5 Sunburst","model":"gpt-image-2.5-sunburst","description":"Image generation and editing model optimized for quality, precise editing, and subject preservation","roles":["chat","edit"],"capabilities":[],"input_types":["text","image"],"output_types":["image"],"release_date":"2026-09-08","cost":{"input":5,"output":30}},{"name":"GPT-6 Astra","model":"gpt-6-astra","description":"OpenAI model for advanced analysis, software engineering, deep research, scientific work, and document creation","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-04","cost":{"input":10,"output":50}},{"name":"Claude Fable 5.1","model":"claude-fable-5-1","description":"Anthropic model for ambitious, long-running coding, agentic, research, and enterprise workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-01","cost":{"input":10,"output":50}},{"name":"Grok 4.6","model":"grok-4.6","description":"xAI frontier model for coding, knowledge work, and STEM","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-12"},{"name":"Claude Opus 5","model":"claude-opus-5","description":"Anthropic's flagship model for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-24","cost":{"input":5,"output":25}},{"name":"GPT-5.6 Luna","model":"gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":1,"output":6}},{"name":"GPT-5.6 Sol","model":"gpt-5.6-sol","description":"Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5,"output":30}},{"name":"GPT-5.6 Terra","model":"gpt-5.6-terra","description":"Balanced model in OpenAI's GPT-5.6 series, suited for everyday coding, reasoning, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":2.5,"output":15}},{"name":"GPT Chat Latest","model":"gpt-chat-latest","description":"OpenAI's stable chat-latest alias that always resolves to the latest Instant chat model used in ChatGPT","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-05","cost":{"input":5,"output":30}},{"name":"Claude Fable 5","model":"claude-fable-5","description":"Anthropic's Mythos-class model built for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-09","cost":{"input":10,"output":50}},{"name":"Claude Sonnet 5","model":"claude-sonnet-5","description":"Anthropic's most agentic Sonnet model yet, built for planning, tool use, and autonomous multi-step work at Sonnet pricing","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"GPT-5.5","model":"gpt-5.5","description":"OpenAI model for complex professional workloads, with stronger reasoning, reliability, and token efficiency than GPT-5.4 on hard tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":5,"output":30}},{"name":"Grok 4.20 (Non-Reasoning)","model":"grok-4-20-non-reasoning","description":"Reasoning model from xAI with industry-leading speed and agentic tool calling capabilities","roles":["chat","edit"],"capabilities":["tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-08","cost":{"input":2,"output":6}},{"name":"Grok 4.20 (Reasoning)","model":"grok-4-20-reasoning","description":"Reasoning model from xAI with industry-leading speed and agentic tool calling capabilities","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-08","cost":{"input":2,"output":6}},{"name":"Claude Opus 4.8","model":"claude-opus-4-8","description":"Modest but tangible improvement over Claude Opus 4.7","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-28","cost":{"input":5,"output":25}},{"name":"Claude Sonnet 4.6","model":"claude-sonnet-4-6","description":"Anthropic Sonnet model for coding, agents, and professional work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-02-17","cost":{"input":3,"output":15}},{"name":"DeepSeek-V4-Flash","model":"deepseek-v4-flash","description":"Efficiency-optimized Mixture-of-Experts model from DeepSeek with 284B total parameters and 13B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":0.19,"output":0.51}},{"name":"DeepSeek-V4-Pro","model":"deepseek-v4-pro","description":"Large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":1.74,"output":3.48}}],"ollama":[{"name":"DeepSeek V4.1 Flash","model":"deepseek-v4.1-flash","description":"Sparse Mixture-of-Experts model from DeepSeek built on a Causal Encoder-Decoder architecture","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-10"},{"name":"DeepSeek V4 Pro 0813","model":"deepseek-v4-pro:0813","description":"Large-scale Mixture-of-Experts model and generally available release of DeepSeek V4 Pro","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-12"},{"name":"GLM-5.3-Flash","model":"glm-5.3-flash","description":"Native multimodal model from Z.ai optimized for efficient coding and long-horizon agent tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-26"},{"name":"GLM-5.3","model":"glm-5.3","description":"Large-scale reasoning model from Z.ai built for complex software engineering and long-horizon agent tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-14"},{"name":"DeepSeek V4 Flash 0731","model":"deepseek-v4-flash:0731","description":"DeepSeek V4 Flash 0731 is a sparse mixture-of-experts model from DeepSeek, with 13B active parameters out of 284B total","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-07-31"},{"name":"kimi-k3","model":"kimi-k3","description":"Moonshot AI's 2.8T-parameter open-weight multimodal reasoning model for complex coding, knowledge work, and long-horizon agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-07-16"},{"name":"DeepSeek V4 Flash","model":"deepseek-v4-flash","description":"Efficiency-optimized Mixture-of-Experts model from DeepSeek with 284B total parameters and 13B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24"},{"name":"DeepSeek V4 Pro","model":"deepseek-v4-pro","description":"Large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24"},{"name":"Gemma 4 31B","model":"gemma4:31b","description":"Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-04-02"},{"name":"GLM 5.2","model":"glm-5.2","description":"Large-scale reasoning model from Z.ai with a 1M-token context window, suited for long-horizon agent workflows and project-level software engineering","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-13"},{"name":"MiniMax M3","model":"minimax-m3","description":"Multimodal foundation model from MiniMax with a 1M-token context window, suited for long-horizon agentic work and coding","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-05-31"},{"name":"MiniMax M2.7","model":"minimax-m2.7","description":"Large language model designed for autonomous, real-world productivity and continuous improvement","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-18"},{"name":"NVIDIA Nemotron 3 Ultra","model":"nemotron-3-ultra","description":"Open reasoning and orchestration model from NVIDIA with 55B active parameters out of 550B total (MoE)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-04"},{"name":"NVIDIA Nemotron 3 Super 120B","model":"nemotron-3-super","description":"120B-parameter open hybrid MoE model, activating just 12B parameters for maximum compute efficiency and accuracy in complex multi-agent applications","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-11"},{"name":"Qwen 3.5 397B","model":"qwen3.5:397b","description":"Built on a hybrid architecture that integrates a linear attention mechanism with a sparse mixture-of-experts model, achieving higher inference efficiency","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-02-15"}],"wandb":[{"name":"DeepSeek V4.1 Flash","model":"deepseek-ai/DeepSeek-V4.1-Flash","description":"Sparse Mixture-of-Experts model from DeepSeek built on a Causal Encoder-Decoder architecture","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-10","cost":{"input":0.2,"output":0.65}},{"name":"GLM 5.3 Flash","model":"zai-org/GLM-5.3-Flash","description":"Native multimodal model from Z.ai optimized for efficient coding and long-horizon agent tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-26","cost":{"input":0.15,"output":0.5}},{"name":"Granite 4.2 8B","model":"ibm-granite/granite-4.2-8b","description":"Dense reasoning model from IBM for mathematics, code generation, multilingual dialogue, and multi-step agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-24","cost":{"input":0.1,"output":0.15}},{"name":"DeepSeek V4 Pro 0813","model":"deepseek-ai/DeepSeek-V4-Pro-0813","description":"Large-scale Mixture-of-Experts model and generally available release of DeepSeek V4 Pro","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-13","cost":{"input":1.31,"output":3.96}},{"name":"Qwen3.8 27B","model":"Qwen/Qwen3.8-27B","description":"Alibaba's 27B dense multimodal model for coding, professional work, research, and long-horizon agentic tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-14","cost":{"input":0.4,"output":3}},{"name":"Nemotron 3.5 Lightning","model":"nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B","description":"MoE model built for fast, reliable agentic tasks across financial services, cybersecurity, telecom, and retail","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-11","cost":{"input":0.1,"output":0.25}},{"name":"DeepSeek V4 Flash 0731","model":"deepseek-ai/DeepSeek-V4-Flash-0731","description":"DeepSeek V4 Flash 0731 is a sparse mixture-of-experts model from DeepSeek, with 13B active parameters out of 284B total","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-07-31","cost":{"input":0.13,"output":0.28}},{"name":"MiniMax M3","model":"MiniMaxAI/MiniMax-M3","description":"Multimodal foundation model from MiniMax with a 1M-token context window, suited for long-horizon agentic work and coding","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-06-12","cost":{"input":0.23,"output":0.96}},{"name":"DeepSeek V4-Flash","model":"deepseek-ai/DeepSeek-V4-Flash","description":"DeepSeek V4-Flash is an MoE model with 1M context length great for coding, reasoning, and agentic workloads","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":0.14,"output":0.28}},{"name":"DeepSeek V4 Pro","model":"deepseek-ai/DeepSeek-V4-Pro","description":"DeepSeek V4-Pro is a 1.6T-parameter MoE model with 49B active parameters excelling at advanced reasoning, coding, and complex agentic workloads","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":1.15,"output":2.55}},{"name":"GLM 5.2","model":"zai-org/GLM-5.2","description":"GLM-5.2 is a Mixture-of-Experts language model featuring 40 billion activated parameters and a total of 744 billion parameters","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-16","cost":{"input":0.76,"output":2.42}},{"name":"Nemotron 3 Ultra","model":"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B","description":"Open reasoning and orchestration model from NVIDIA with 55B active parameters out of 550B total (MoE)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-04","cost":{"input":0.75,"output":2.75}},{"name":"NVIDIA Nemotron 3 Super 120B","model":"nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8","description":"120B-parameter open hybrid MoE model, activating just 12B parameters for maximum compute efficiency and accuracy in complex multi-agent applications","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-11","cost":{"input":0.2,"output":0.8}},{"name":"gpt-oss-120b","model":"openai/gpt-oss-120b","description":"Open-weight, 117B-parameter Mixture-of-Experts (MoE) language model from OpenAI designed for high-reasoning, agentic, and general-purpose production use cases","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2025-08-05","cost":{"input":0.04,"output":0.14}},{"name":"gpt-oss-20b","model":"openai/gpt-oss-20b","description":"Open-weight 21B parameter model released by OpenAI under the Apache 2.0 license","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2025-08-05","cost":{"input":0.03,"output":0.13}},{"name":"Mellum2 12B A2.5B","model":"JetBrains/Mellum2-12B-A2.5B-Instruct","description":"Mellum2-12B-A2.5B-Instruct is a fast MoE model with 131K context built for coding, tool use, and low-latency AI workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-01","cost":{"input":0.05,"output":0.1}}],"opencode-go":[{"name":"LongCat 2.5 Preview Free","model":"longcat-2.5-preview-free","description":"Multimodal reasoning model from Meituan for coding and agentic workflows, with a one-million-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-25","cost":{"input":0,"output":0}},{"name":"Space Bunny Free","model":"space-bunny-free","description":"Anonymous model with fast inference, strong coding capabilities, native multimodal input, and adjustable reasoning effort","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-23","cost":{"input":0,"output":0}},{"name":"GPT-6 Luna","model":"gpt-6-luna","description":"OpenAI's most efficient model for focused, high-volume tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.1,"output":0.5}},{"name":"MiMo-V2.6-Flash","model":"mimo-v2.6-flash","description":"Open-source Mixture-of-Experts foundation model from Xiaomi with 309B total parameters and 15B activated per token","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.14,"output":0.28}},{"name":"MiMo-V2.6-Pro","model":"mimo-v2.6-pro","description":"Xiaomi's flagship foundation model with over one trillion parameters, designed for demanding coding and agentic tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.435,"output":0.87}},{"name":"DeepSeek V4.1 Flash","model":"deepseek-v4.1-flash","description":"Sparse Mixture-of-Experts model from DeepSeek built on a Causal Encoder-Decoder architecture","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-10","cost":{"input":0.15,"output":0.6}},{"name":"Muse Spark 1.3 Contributor","model":"muse-spark-1.3-contributor","description":"Cost-efficient contributor tier of Meta's multimodal reasoning model for experimentation, learning, and early-stage agentic, multi-agent, and coding workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-02","cost":{"input":0.1,"output":0.2}},{"name":"Hy4 preview","model":"hy4-preview","description":"Mixture-of-Experts model from Tencent designed for coding agents, complex tool use, and productivity tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-28","cost":{"input":0.834,"output":2.501}},{"name":"GLM-5.3-Flash (2x usage)","model":"glm-5.3-flash","description":"Native multimodal model from Z.ai optimized for efficient coding and long-horizon agent tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-26","cost":{"input":0.075,"output":0.25}},{"name":"Qwen3.8 Flash","model":"qwen3.8-flash","description":"Multimodal reasoning model from Alibaba for coding, agentic workflows, visual understanding, document and codebase analysis, and desktop interaction","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-26","cost":{"input":0.15,"output":0.47}},{"name":"DeepSeek V4 Flash Vision Exp","model":"deepseek-v4-flash-vision-exp","description":"Experimental multimodal variant of DeepSeek V4 Flash that adds image understanding while retaining its text and agent capabilities","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-21","cost":{"input":0.22,"output":0.66}},{"name":"GLM-5.3","model":"glm-5.3","description":"Flagship GLM model for long-horizon coding, agents, and complex project delivery","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-14","cost":{"input":1.4,"output":4.4}},{"name":"Qwen3.8 Max","model":"qwen3.8-max","description":"Flagship multimodal reasoning model in Alibaba's Qwen3.8 series, intended for complex reasoning, visual understanding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-03","cost":{"input":2,"output":6}},{"name":"GPT-5.6 Luna (2x usage)","model":"gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":0.1,"output":0.6}},{"name":"Kimi K3 (2x usage)","model":"kimi-k3","description":"Moonshot AI's 2.8T-parameter open-weight multimodal reasoning model for complex coding, knowledge work, and long-horizon agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-07-16","cost":{"input":3,"output":15}},{"name":"DeepSeek V4 Flash","model":"deepseek-v4-flash","description":"Efficiency-optimized Mixture-of-Experts model from DeepSeek with 284B total parameters and 13B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":0.14,"output":0.28}},{"name":"DeepSeek V4 Pro","model":"deepseek-v4-pro","description":"Large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":1.74,"output":3.48}},{"name":"GLM 5.2","model":"glm-5.2","description":"Large-scale reasoning model from Z.ai with a 1M-token context window, suited for long-horizon agent workflows and project-level software engineering","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-13","cost":{"input":1.4,"output":4.4}},{"name":"Qwen3.7 Plus","model":"qwen3.7-plus","description":"Cost-effective model in Alibaba's Qwen3.7 series supporting text and image input with upgraded text capabilities","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-06-02","cost":{"input":0.4,"output":1.6}},{"name":"Qwen3.7 Max","model":"qwen3.7-max","description":"Capable of writing and debugging code, and sustaining autonomous execution across hundreds or thousands of steps","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-05-21","cost":{"input":2.5,"output":7.5}},{"name":"MiniMax M3 (3x usage)","model":"minimax-m3","description":"Multimodal foundation model from MiniMax with a 1M-token context window, suited for long-horizon agentic work and coding","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-05-31","cost":{"input":0.1,"output":0.4}}]}`),Ws=[{name:`OpenAI`,id:`openai`,description:`OpenAI's API for GPT models, including GPT-3.5 and GPT-4.`,url:`https://platform.openai.com/`},{name:`GitHub Copilot`,id:`github`,description:`GitHub Copilot provides model inference through a Copilot subscription.`,url:`https://pydantic.dev/docs/ai/models/github-copilot/`},{name:`Amazon Bedrock`,id:`bedrock`,description:`Amazon Bedrock provides access to foundation models from Amazon and leading AI startups via a unified API.`,url:`https://aws.amazon.com/bedrock/`},{name:`Azure`,id:`azure`,description:`Azure provides access to models via the Azure cloud.`,url:`https://azure.microsoft.com/en-us/products/ai-services/`},{name:`Anthropic`,id:`anthropic`,description:`Anthropic's Claude models for conversational and completion tasks.`,url:`https://www.anthropic.com/`},{name:`Google AI`,id:`google`,description:`Google's Vertex AI and PaLM APIs for generative and conversational models.`,url:`https://cloud.google.com/vertex-ai/docs/generative-ai/learn/overview`},{name:`Ollama`,id:`ollama`,description:`Ollama is a lightweight, open-source model server for running and sharing LLMs.`,url:`https://ollama.ai/`},{name:`marimo`,id:`marimo`,description:`marimo's hosted models.`,url:`https://docs.marimo.io/guides/editor_features/ai_completion/`},{name:`DeepSeek`,id:`deepseek`,description:`DeepSeek's API for GPT models.`,url:`https://deepseek.com/`},{name:`LM Studio`,id:`lmstudio`,description:`LM Studio's API for GPT models.`,url:`https://lmstudio.ai/`},{name:`OpenRouter`,id:`openrouter`,description:`OpenRouter's API for GPT models.`,url:`https://openrouter.ai/`},{name:`Mistral`,id:`mistral`,description:`Mistral's API for GPT models.`,url:`https://mistral.ai/`},{name:`Vercel v0`,id:`vercel`,description:`Vercel's API for GPT models.`,url:`https://vercel.com/`},{name:`Together AI`,id:`together`,description:`Together AI's API for GPT models.`,url:`https://together.ai/`},{name:`xAI`,id:`xai`,description:`xAI's API for GPT models.`,url:`https://x.ai/`},{name:`Weights & Biases`,id:`wandb`,description:`Weights & Biases' hosted models for ML development and AI inference.`,url:`https://wandb.ai/`},{name:`OpenCode Go`,id:`opencode-go`,description:`Low-cost subscription for reliable access to popular open coding models.`,url:`https://opencode.ai/docs/go/`}],Gs=Us,Ks=Ws,qs=Hn(()=>{let e=new Map,t=new Map;for(let[n,r]of Object.entries(Gs)){if(!r)continue;let i=n;for(let n of r){let r=n.model,a={...n,model:r,provider:i,custom:!1},o=`${i}/${r}`;e.set(o,a),(a.roles.includes(`chat`)||a.roles.includes(`edit`))&&!t.has(i)&&t.set(i,o)}}return{modelMap:e,defaultModelByProvider:t}}),Js=Hn(()=>{let e=new Map,t=new Map;return Ks.forEach((n,r)=>{e.set(n.id,n),t.set(n.id,r)}),{providerMap:e,providerToOrderIdx:t}}),Ys=class e{modelsByProviderMap=new He;modelsMap;customModels;displayedModels;constructor(e,t){this.customModels=new Set(e),this.displayedModels=new Set(t),this.modelsMap=new Map,this.buildMaps()}static getProviderInfo(e){let{providerMap:t}=Js();return t.get(e)}static create(t){let{customModels:n=[],displayedModels:r=[]}=t;return new e(n.map(e=>Bs.parse(e).id),r.map(e=>Bs.parse(e).id))}buildMaps(){let t=e.buildMapsFromConfig({displayedModels:this.displayedModels,customModels:this.customModels});t.modelsMap.size===0&&(K.error(`The configured displayed_models have filtered out all registered models. Reverting back to showing all models.`,[...this.displayedModels]),t=e.buildMapsFromConfig({displayedModels:new Set,customModels:this.customModels})),this.modelsByProviderMap=t.modelsByProviderMap,this.modelsMap=t.modelsMap}static buildMapsFromConfig(e){let{displayedModels:t,customModels:n}=e,r=t.size>0,i=qs().modelMap,a=new Map,o=new Map,s=new He;for(let e of n){if(r&&!t.has(e))continue;let n=Bs.parse(e),i={name:n.shortModelId,model:n.shortModelId,description:`Custom model`,provider:n.providerId,roles:[],capabilities:[],input_types:[],output_types:[],release_date:`1970-01-01`,custom:!0};a.set(e,i)}if(r)for(let e of t){let t=i.get(e);t&&o.set(e,t)}else o=new Map(i);o=new Map([...a,...o]);for(let[e,t]of o.entries()){let n=Bs.parse(e);s.add(n.providerId,t)}return{modelsByProviderMap:s,modelsMap:o}}getDisplayedModels(){return this.displayedModels}getCustomModels(){return this.customModels}getModelsByProvider(e){return this.modelsByProviderMap.get(e)||[]}getGroupedModelsByProvider(){return this.modelsByProviderMap}getListModelsByProvider(){let e=[...this.getGroupedModelsByProvider().entries()],t=Js().providerToOrderIdx;return e.sort((e,n)=>{let r=e[0],i=n[0];return(t.get(r)??0)-(t.get(i)??0)}),e}getModelsMap(){return this.modelsMap}getModel(e){return this.modelsMap.get(e)}},Xs=Ne(`marimo:accept-completion-on-enter`,!0,T,{getOnInit:!0});function Zs(e){`scheduler`in window?window.scheduler.postTask(e,{priority:`background`}):`requestIdleCallback`in window?requestIdleCallback(e):setTimeout(e,0)}var Qs=null,$s=class{view;abortController=new AbortController;constructor(e){this.view=e.view,this.view.dom.addEventListener(`focus`,()=>{Qs=new WeakRef(this.view)},{signal:this.abortController.signal,capture:!0}),this.update()}update(){let e=this.view.dom.querySelector(`.cm-vimCursorLayer`);if(e instanceof HTMLElement){if(v())e.style.display=`none`;else{let t=Qs?.deref()===this.view;e.style.display=t?``:`none`}}}destroy(){this.abortController.abort()}},ec={map:{args:[`lhs`,`rhs`]},nmap:{mode:`normal`,args:[`lhs`,`rhs`]},vmap:{mode:`visual`,args:[`lhs`,`rhs`]},imap:{mode:`insert`,args:[`lhs`,`rhs`]},noremap:{args:[`lhs`,`rhs`]},nnoremap:{mode:`normal`,args:[`lhs`,`rhs`]},vnoremap:{mode:`visual`,args:[`lhs`,`rhs`]},inoremap:{mode:`insert`,args:[`lhs`,`rhs`]},unmap:{args:[`lhs`]},nunmap:{mode:`normal`,args:[`lhs`]},vunmap:{mode:`visual`,args:[`lhs`]},iunmap:{mode:`insert`,args:[`lhs`]},mapclear:{},nmapclear:{mode:`normal`},vmapclear:{mode:`visual`},imapclear:{mode:`insert`}};function tc(e,t){let n=[];for(let r of e.split(`
1
+ import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";import{a as n,c as r,f as i,l as a,r as o,t as s,u as c}from"./useEvent-Dc9HkKI2.js";import{t as l}from"./react-CUdNIagt.js";import{$i as u,$n as d,$t as f,An as p,Ar as m,Bn as h,Ca as g,En as _,G as v,Hr as y,Ia as b,Ka as x,On as S,Or as C,Qn as w,Qr as T,Qt as E,Sa as D,Sr as O,Xn as k,Xt as A,Yt as j,Zn as M,Zt as N,_r as P,cn as F,dn as I,do as L,ea as R,en as z,kr as B,nn as V,no as H,oo as ee,tn as U,to as te,un as ne,uo as re,wr as W,xr as ie,ya as ae}from"./cells-CzugpTQu.js";import{t as G}from"./react-dom-CKsE8sC1.js";import{t as oe}from"./compiler-runtime-BQ9S8nyo.js";import{t as se}from"./isObject-BCaOs5rp.js";import{t as ce}from"./get-DjNf4SIX.js";import{t as le}from"./debounce-aFmHgJZY.js";import{A as ue,C as de,T as fe,h as pe,j as me,k as he,l as ge,m as _e,t as ve,u as ye,x as be,y as xe}from"./config-BxZgoFvi.js";import{t as Se}from"./has-cJsIKK9t.js";import{_ as Ce,f as we,g as K,l as Te,m as Ee,t as De}from"./useEventListener-BdZUApHd.js";import{t as Oe}from"./invariant-Ci2dTZ72.js";import{i as ke}from"./utils-B4K466FK.js";import{_ as Ae,t as je}from"./session-DXKMv4Bs.js";import{M as Me,O as Ne,S as Pe,n as Fe,o as Ie,r as Le}from"./config-DpGPGznL.js";import{t as Re}from"./cn-ldLVeaqm.js";import{t as ze}from"./jsx-runtime-B74pBk57.js";import{a as Be,i as Ve,n as He,o as Ue,r as We,t as Ge}from"./config-B4VJJibu.js";import{d as Ke,i as qe,l as Je,n as Ye,r as Xe,s as Ze,t as Qe}from"./select-BplWpfFo.js";import{a as $e,c as et,d as tt,f as nt,p as rt,r as it,s as at,t as ot,u as st}from"./dropdown-menu-VuyoeQOD.js";import{t as ct}from"./tooltip-DR2Z2N4w.js";import{n as lt,r as ut,t as q}from"./button-BoklZTGL.js";import{t as dt}from"./createLucideIcon-rHn2EdoM.js";import{t as ft}from"./check-Wea4hZ6R.js";import{a as pt,r as mt}from"./useNumberFormatter-C4-_TnkF.js";import{t as ht}from"./chevron-right-DOPs2jx8.js";import{u as gt}from"./toDate-BbJ1_N2T.js";import{t as _t}from"./copy-RyCOE8jo.js";import{C as vt,b as yt,p as bt}from"./write-secret-modal-BiG2tahJ.js";import{t as xt}from"./plus-gbN72xHe.js";import{$ as St,At as Ct,Bt as wt,Dt as Tt,F as Et,Ft as Dt,Gt as Ot,H as kt,Ht as At,Jt as jt,Kt as Mt,Lt as Nt,M as Pt,Mt as Ft,N as It,Nt as Lt,Pt as Rt,Q as zt,R as Bt,S as Vt,U as Ht,Ut,V as Wt,Vt as Gt,Wt as Kt,X as qt,Xt as Jt,Yt,Z as Xt,_ as Zt,_t as Qt,bt as $t,g as en,gt as tn,ht as nn,jt as rn,kt as an,lt as on,mt as sn,nt as cn,o as ln,pt as un,q as dn,qt as fn,r as pn,rt as mn,st as hn,xt as gn,yt as _n,z as vn,zt as yn}from"./input-BDakodZ2.js";import{t as bn}from"./trash-2-BJG-7Qob.js";import{n as xn}from"./copy-BhJktFeI.js";import{t as Sn}from"./use-toast-CC89xOwH.js";import{Tt as Cn,qt as wn,st as Tn,ut as En}from"./dist-BczecT6V.js";import{F as Dn,L as On,M as kn,N as An,P as jn,R as Mn,b as Nn,f as Pn,g as Fn,h as In,k as Ln,p as Rn,x as zn,y as Bn}from"./dist-BTskHGpb.js";import{s as Vn}from"./arrays-BqUx5USx.js";import{n as Hn}from"./once-Haz_uxEL.js";import{i as Un,n as Wn,r as Gn,t as Kn}from"./strings-BHZPE0Mc.js";import{r as qn,t as Jn}from"./requests-yTHMxhVa.js";import{t as Yn}from"./badge-DFf033uX.js";import{t as Xn}from"./useTheme-DcnXlv0_.js";import{r as Zn,t as Qn}from"./context-BFOBKCJB.js";import{n as $n,t as er}from"./shell-BSnvn9t7.js";import{r as tr}from"./useDebounce-DMbg9X18.js";import{n as nr}from"./useAsyncData-DucTwMkf.js";import{a as rr}from"./errors-D9vyuMar.js";import{t as ir}from"./filename-fxG7K_MU.js";import{$i as ar,Fr as or,Hi as sr,Hn as cr,In as lr,Ir as ur,Ji as dr,Ki as fr,Ln as pr,Lr as mr,Lt as hr,Pr as gr,Qi as _r,Qr as vr,Rn as yr,Sn as br,Ui as xr,Va as Sr,Vn as Cr,Wi as wr,Xi as Tr,Yi as Er,Zi as Dr,_n as Or,aa as kr,bn as Ar,da as jr,di as Mr,ea as Nr,ha as Pr,ta as Fr,vn as Ir,xn as Lr,xt as Rr,yn as zr,za as Br,zn as Vr}from"./index-DafnX1Xx.js";import{a as Hr,i as Ur,n as Wr,r as Gr,t as Kr}from"./card-BYZGhhhx.js";var qr=`Expected a function`;function Jr(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(qr);return se(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),le(e,t,{leading:r,maxWait:t,trailing:i})}var Yr=t((e=>{var t=l();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,l=r[1];return o(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),a(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Xr=t(((e,t)=>{t.exports=Yr()})),Zr=dt(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Qr=dt(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),$r=dt(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),ei=dt(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),ti=dt(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),ni=dt(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),ri=dt(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),ii=dt(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),J=e(l(),1);function ai(e,t){let n=(0,J.useRef)(!0),r=(0,J.useRef)(null);At(()=>(n.current=!0,()=>{n.current=!1}),[]),At(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function oi(e,t){let{collection:n,onLoadMore:r,scrollOffset:i=1}=e,a=(0,J.useRef)(null),o=sn(e=>{for(let t of e)t.isIntersecting&&r&&r()});At(()=>(t.current&&(a.current=new IntersectionObserver(o,{root:_r(t?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),a.current.observe(t.current)),()=>{a.current&&a.current.disconnect()}),[n,t,i])}function si(e){let t=J.version.split(`.`);return parseInt(t[0],10)>=19?e:e?`true`:void 0}var ci=`react-aria-clear-focus`,li=`react-aria-focus`,ui=500;function di(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=ui,accessibilityDescription:o}=e,s=(0,J.useRef)(void 0),{addGlobalListener:c,removeGlobalListener:l}=Qt(),{pressProps:u}=Ht({isDisabled:t,onPressStart(e){if(e.continuePropagation(),(e.pointerType===`mouse`||e.pointerType===`touch`)&&(n&&n({...e,type:`longpressstart`}),s.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),Nt(e.target).activeElement!==e.target&&an(e.target),i&&i({...e,type:`longpress`}),s.current=void 0},a),e.pointerType===`touch`)){let t=e=>{e.preventDefault()};c(e.target,`contextmenu`,t,{once:!0}),c(window,`pointerup`,()=>{setTimeout(()=>{l(e.target,`contextmenu`,t)},30)},{once:!0})}},onPressEnd(e){s.current&&clearTimeout(s.current),r&&(e.pointerType===`mouse`||e.pointerType===`touch`)&&r({...e,type:`longpressend`})}}),d=Tr(i&&!t?o:void 0);return{longPressProps:rn(u,d)}}function fi(e,t){let n=t?.isDisabled,[r,i]=(0,J.useState)(!1);return At(()=>{if(e?.current&&!n){let t=()=>{if(e.current){let t=wr(e.current,{tabbable:!0});i(!!t.nextNode())}};t();let n=new MutationObserver(t);return n.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabIndex`,`disabled`]}),()=>{n.disconnect()}}}),!n&&r}function pi(e){let t=gi(Nt(e));t!==e&&(t&&mi(t,e),e&&hi(e,t))}function mi(e,t){e.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:t}))}function hi(e,t){e.dispatchEvent(new FocusEvent(`focus`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusin`,{bubbles:!0,relatedTarget:t}))}function gi(e){let t=Rt(e),n=t?.getAttribute(`aria-activedescendant`);return n&&e.getElementById(n)||t}function _i(e){return Tt()?e.altKey:e.ctrlKey}function vi(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var yi=new WeakMap;function bi(e){let t=Gt();return yi.set(e,t),t}function xi(e){return yi.get(e)}var Si=1e3;function Ci(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,J.useRef)({search:``,timeout:void 0}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=wi(e.key);if(!(!a||e.ctrlKey||e.metaKey||!Ft(e.currentTarget,Dt(e))||i.search.length===0&&a===` `)){if(a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.search,n.focusedKey);e??=t.getKeyForSearch(i.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},Si)}}:void 0}}}function wi(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}var Ti=e(G(),1);function Ei(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c=`clearSelection`,selectOnFocus:l=t.selectionBehavior===`replace`,disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,scrollRef:p=r,linkBehavior:m=`action`}=e,{direction:h}=Qn(),g=$t(),_=e=>{if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!r.current||!Ft(r.current,Dt(e)))return;let i=(n,i)=>{if(n!=null){if(t.isLink(n)&&m===`selection`&&l&&!_i(e)){(0,Ti.flushSync)(()=>{t.setFocusedKey(n,i)});let a=vi(r,n),o=t.getItemProps(n);a&&g.open(a,e,o.href,o.routerOptions);return}if(t.setFocusedKey(n,i),t.isLink(n)&&m===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):l&&!_i(e)&&t.replaceSelection(n)}};switch(e.key){case`ArrowDown`:if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.call(n):n.getKeyBelow?.call(n,t.focusedKey);r==null&&a&&(r=n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowUp`:if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.call(n):n.getKeyAbove?.call(n,t.focusedKey);r==null&&a&&(r=n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowLeft`:if(n.getKeyLeftOf){let r=t.focusedKey==null?null:n.getKeyLeftOf?.call(n,t.focusedKey);r==null&&a&&(r=h===`rtl`?n.getFirstKey?.call(n,t.focusedKey):n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r,h===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(n.getKeyRightOf){let r=t.focusedKey==null?null:n.getKeyRightOf?.call(n,t.focusedKey);r==null&&a&&(r=h===`rtl`?n.getLastKey?.call(n,t.focusedKey):n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r,h===`rtl`?`last`:`first`))}break;case`Home`:if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getFirstKey(t.focusedKey,Dr(e));t.setFocusedKey(r),r!=null&&(Dr(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`End`:if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getLastKey(t.focusedKey,Dr(e));t.setFocusedKey(r),r!=null&&(Dr(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`PageDown`:if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`PageUp`:if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`a`:Dr(e)&&t.selectionMode===`multiple`&&s!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:c===`clearSelection`&&!o&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!f){if(e.shiftKey)r.current.focus();else{let e=wr(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);let i=Rt();t&&(!Lt(t)||i&&!on(i))&&an(t)}break}}},v=(0,J.useRef)({top:0,left:0});un(p,`scroll`,()=>{v.current={top:p.current?.scrollTop??0,left:p.current?.scrollLeft??0}});let y=e=>{if(t.isFocused){Ft(e.currentTarget,Dt(e))||t.setFocused(!1);return}if(Ft(e.currentTarget,Dt(e))){if(t.setFocused(!0),t.focusedKey==null){let r=e=>{e!=null&&(t.setFocusedKey(e),l&&!t.isSelected(e)&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey??n.getLastKey?.call(n)):r(t.firstSelectedKey??n.getFirstKey?.call(n))}else p.current&&(p.current.scrollTop=v.current.top,p.current.scrollLeft=v.current.left);if(t.focusedKey!=null&&p.current){let e=vi(r,t.focusedKey);e instanceof HTMLElement&&(!Lt(e)&&!d&&an(e),vn()===`keyboard`&&Er(e,{containingElement:r.current}))}}},b=e=>{Ft(e.currentTarget,e.relatedTarget)||t.setFocused(!1)},x=(0,J.useRef)(!1);un(r,li,d?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(x.current=!0)}:void 0),ai(()=>{if(x.current){let e=n.getFirstKey?.call(n)??null;if(e==null){let e=Rt();pi(r.current),hi(e,null),t.collection.size>0&&(x.current=!1)}else t.setFocusedKey(e),x.current=!1}},[t.collection]),ai(()=>{t.collection.size>0&&(x.current=!1)},[t.focusedKey]),un(r,ci,d?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let S=(0,J.useRef)(i),C=(0,J.useRef)(!1);(0,J.useEffect)(()=>{if(S.current){let e=null;i===`first`&&(e=n.getFirstKey?.call(n)??null),i===`last`&&(e=n.getLastKey?.call(n)??null);let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!d&&r.current&&Bt(r.current),t.collection.size>0&&(S.current=!1,C.current=!0)}});let w=(0,J.useRef)(t.focusedKey),T=(0,J.useRef)(null);(0,J.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==w.current||C.current)&&p.current&&r.current){let e=vn(),n=vi(r,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||C.current)&&(T.current&&cancelAnimationFrame(T.current),T.current=requestAnimationFrame(()=>{p.current&&(dr(p.current,n),e!==`virtual`&&Er(n,{containingElement:r.current}))}))}!d&&t.isFocused&&t.focusedKey==null&&w.current!=null&&r.current&&Bt(r.current),w.current=t.focusedKey,C.current=!1}),(0,J.useEffect)(()=>()=>{T.current&&cancelAnimationFrame(T.current)},[]),un(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let E={onKeyDown:_,onFocus:y,onBlur:b,onMouseDown(e){p.current===Dt(e)&&e.preventDefault()}},{typeSelectProps:D}=Ci({keyboardDelegate:n,selectionManager:t});u||(E=rn(D,E));let O;d||(O=t.focusedKey==null?0:-1);let k=bi(t.collection);return{collectionProps:rn(E,{tabIndex:O,"data-collection":k})}}function Di(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,f=$t();t=Gt(t);let p=e=>{if(e.pointerType===`keyboard`&&_i(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);f.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(Dr(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,J.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?pi(i.current):s?s():Rt()!==i.current&&i.current&&Bt(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c||=n.isDisabled(r);let m={};!o&&!c?m={tabIndex:r===n.focusedKey?0:-1,onFocus(e){Dt(e)===i.current&&n.setFocusedKey(r)}}:c&&(m.onMouseDown=e=>{e.preventDefault()}),(0,J.useEffect)(()=>{c&&n.focusedKey===r&&n.setFocusedKey(null)},[n,c,r]);let h=n.isLink(r)&&d===`override`,g=l&&e.UNSTABLE_itemBehavior===`action`,_=n.isLink(r)&&d!==`selection`&&d!==`none`,v=!c&&n.canSelectItem(r)&&!h&&!g,y=(l||_)&&!c,b=y&&(n.selectionBehavior===`replace`?!v:!v||n.isEmpty),x=y&&v&&n.selectionBehavior===`replace`,S=b||x,C=(0,J.useRef)(null),w=S&&v,T=(0,J.useRef)(!1),E=(0,J.useRef)(!1),D=n.getItemProps(r),O=e=>{if(l){var t;l(),(t=i.current)==null||t.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))}_&&i.current&&f.open(i.current,e,D.href,D.routerOptions)},k={ref:i};if(a?(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,e.pointerType===`keyboard`&&(!S||ki(e.key))&&p(e)},u?(k.onPressUp=b?void 0:e=>{e.pointerType===`mouse`&&v&&p(e)},k.onPress=b?O:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&v&&p(e)}):k.onPress=e=>{if(b||x&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!Oi(e.key))return;O(e)}else e.pointerType!==`keyboard`&&v&&p(e)}):(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,E.current=b,v&&(e.pointerType===`mouse`&&!b||e.pointerType===`keyboard`&&(!y||ki(e.key)))&&p(e)},k.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&S&&Oi(e.key)||e.pointerType===`mouse`&&E.current)&&(S?O(e):v&&p(e))}),m[`data-collection`]=xi(n.collection),m[`data-key`]=r,k.preventFocusOnPress=o,o&&(k=rn(k,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),D)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])D[e]&&(k[e]=yn(k[e],D[e]));let{pressProps:A,isPressed:j}=Ht(k),M=x?e=>{C.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),O(e))}:void 0,{longPressProps:N}=di({isDisabled:!w,onLongPress(e){e.pointerType===`touch`&&(p(e),n.setSelectionBehavior(`toggle`))}}),P=e=>{C.current===`touch`&&T.current&&e.preventDefault()},F=d!==`none`&&n.isLink(r)?e=>{_n.isOpening||e.preventDefault()}:void 0;return{itemProps:rn(m,v||b||o&&!c?A:{},w?N:{},{onDoubleClick:M,onDragStartCapture:P,onClick:F,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:j,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:v,hasAction:S}}function Oi(e){return e===`Enter`}function ki(e){return e===` `}var Ai=class{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:vi(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}constructor(e){this.ref=e}},ji=class{isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let e=this.collection.getItem(n);if(e?.type===`item`&&!this.isDisabled(e))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,e=>this.collection.getKeyAfter(e))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,e=>this.collection.getKeyBefore(e))}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`):null}getKeyLeftOf(e){let t=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!ar(t))return this.getFirstKey();let r=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!ar(t))return this.getLastKey();let r=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r);if(!t)return null;let i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new Ai(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new Ai(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function Mi(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o}=e,s=fr({usage:`search`,sensitivity:`base`}),c=t.disabledBehavior,l=(0,J.useMemo)(()=>a||new ji({collection:n,disabledKeys:r,disabledBehavior:c,ref:i,collator:s,layoutDelegate:o}),[a,o,n,r,i,s,c]),{collectionProps:u}=Ei({...e,ref:i,selectionManager:t,keyboardDelegate:l});return{listProps:u}}var Ni=class{build(e,t){return this.context=t,Pi(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(J.isValidElement(t)&&t.type===J.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];J.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(J.isValidElement(e.element)&&e.element.type===J.Fragment){let i=[];J.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(J.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Fi(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${Ii(t.type)}> in <${Ii(r?.type??`unknown parent type`)}>. Only <${Ii(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Pi(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Pi(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function Fi(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Ii(e){return e[0].toUpperCase()+e.slice(1)}function Li(e,t,n){let r=(0,J.useMemo)(()=>new Ni,[]),{children:i,items:a,collection:o}=e;return(0,J.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function Ri(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function zi(e){return Bi(e,0)}function Bi(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function Vi(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Hi(e,t),t],i=[...Hi(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function Hi(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Ui=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},Wi=class extends Ui{filter(e,t,n){let[r,i]=Xi(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},Gi=class extends Ui{};Gi.type=`header`;var Ki=class extends Ui{};Ki.type=`loader`;var qi=class extends Wi{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};qi.type=`item`;var Ji=class extends Wi{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};Ji.type=`section`;var Yi=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=Xi(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function Xi(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var Zi=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},Qi=class e extends Zi{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.parentNode.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},$i=class extends Zi{get isConnected(){return!0}createElement(e){return new Qi(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof Qi&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof Qi?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};function ea(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,J.useMemo)(()=>new WeakMap,a);return(0,J.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=o.get(a);if(!n){n=t(a);let e=n.props.id??a.key??a.id;if(e==null)throw Error(`Could not determine key for item`);r!=null&&(e=r+`:`+e),n=(0,J.cloneElement)(n,i?{key:e,id:e,value:a}:{key:e}),o.set(a,n)}e.push(n)}return e}if(typeof t!=`function`)return t},[t,n,o,r,i])}var ta=Xr(),na=(0,J.createContext)(!1),ra=(0,J.createContext)(null);function ia(e){if((0,J.useContext)(ra))return e.content;let{collection:t,document:n}=ca(e.createCollection);return J.createElement(J.Fragment,null,J.createElement(Vt,null,J.createElement(ra.Provider,{value:n},e.content)),J.createElement(aa,{render:e.children,collection:t}))}function aa({collection:e,render:t}){return t(e)}function oa(e,t,n){let r=Zn(),i=(0,J.useRef)(r);i.current=r;let a=(0,J.useCallback)(()=>i.current?n():t(),[t,n]);return(0,ta.useSyncExternalStore)(e,a)}var sa=typeof J.useSyncExternalStore==`function`?J.useSyncExternalStore:oa;function ca(e){let[t]=(0,J.useState)(()=>new $i(e?.()||new Yi));return{collection:sa((0,J.useCallback)(e=>t.subscribe(e),[t]),(0,J.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,J.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t])),document:t}}var la=(0,J.createContext)(null);function ua(e){var t;return t=class extends Ui{},t.type=e,t}function da(e,t,n,r,i,a){typeof e==`string`&&(e=ua(e));let o=(0,J.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,J.useContext)(la);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?J.createElement(la.Provider,{value:o},i):null}return J.createElement(e.type,{ref:o},i)}function fa(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,J.forwardRef)((r,i)=>{let a=(0,J.useContext)(Et);if(!(0,J.useContext)(na)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return da(e,r,i,`children`in r?r.children:null,null,e=>J.createElement(Et.Provider,{value:a},J.createElement(n,{node:e})))});return r.displayName=t.name,r}function pa(e,t,n=ma){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,J.forwardRef)((t,i)=>da(e,t,i,null,n(t),e=>J.createElement(r,{node:e}))??J.createElement(J.Fragment,null));return i.displayName=t.name,i}function ma(e){return ea({...e,addIdAndValue:!0})}var ha=(0,J.createContext)(null);function ga(e){let t=(0,J.useContext)(ha),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope??t?.idScope,i=ma({...e,idScope:r,dependencies:n});return(0,J.useContext)(ra)&&(i=J.createElement(_a,null,i)),t=(0,J.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),J.createElement(ha.Provider,{value:t},i)}function _a({children:e}){let t=(0,J.useContext)(ra),n=(0,J.useMemo)(()=>J.createElement(ra.Provider,{value:null},J.createElement(na.Provider,{value:!0},e)),[e]);return Zn()?J.createElement(la.Provider,{value:t},n):(0,Ti.createPortal)(n,t)}var va=(0,J.createContext)(null),ya={CollectionRoot({collection:e,renderDropIndicator:t}){return ba(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return ba(e,t,n)}};function ba(e,t,n){return ea({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){if(t.type===`content`)return J.createElement(J.Fragment,null);let r=t.render(t);return!n||t.type!==`item`?r:J.createElement(J.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,xa(e,t,n))}})}function xa(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r?.type===`item`&&(!a||r.parentKey!==a.parentKey&&a.level<r.level);){let t=n({type:`item`,key:r.key,dropPosition:`after`});(0,J.isValidElement)(t)&&s.push((0,J.cloneElement)(t,{key:`${r.key}-after`})),r=r.parentKey==null?null:e.getItem(r.parentKey)}}return s}var Sa=(0,J.createContext)(ya),Ca=new WeakMap;function wa(e,t){let{id:n}=Ca.get(e)??{};if(!n)throw Error(`Unknown list`);return`${n}-${Ta(t)}`}function Ta(e){return typeof e==`string`?e.replace(/\s*/g,``):``+e}var Ea={};Ea={deselectedItem:e=>`${e.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,longPressToSelect:`اضغط مطولًا للدخول إلى وضع التحديد.`,select:`تحديد`,selectedAll:`جميع العناصر المحددة.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`لم يتم تحديد عناصر`,one:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`,other:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`})}.`,selectedItem:e=>`${e.item} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`};var Da={};Da={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,longPressToSelect:`Натиснете и задръжте за да влезете в избирателен режим.`,select:`Изберете`,selectedAll:`Всички елементи са избрани.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Няма избрани елементи`,one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`})}.`,selectedItem:e=>`${e.item} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`};var Oa={};Oa={deselectedItem:e=>`Polo\u{17E}ka ${e.item} nen\xed vybr\xe1na.`,longPressToSelect:`Dlouhým stisknutím přejdete do režimu výběru.`,select:`Vybrat`,selectedAll:`Vybrány všechny položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nevybrány žádné položky`,one:()=>`Vybr\xe1na ${t.number(e.count)} polo\u{17E}ka`,other:()=>`Vybr\xe1no ${t.number(e.count)} polo\u{17E}ek`})}.`,selectedItem:e=>`Vybr\xe1na polo\u{17E}ka ${e.item}.`};var ka={};ka={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:`Lav et langt tryk for at aktivere valgtilstand.`,select:`Vælg`,selectedAll:`Alle elementer valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer valgt`,one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var Aa={};Aa={deselectedItem:e=>`${e.item} nicht ausgew\xe4hlt.`,longPressToSelect:`Gedrückt halten, um Auswahlmodus zu öffnen.`,select:`Auswählen`,selectedAll:`Alle Elemente ausgewählt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Keine Elemente ausgewählt`,one:()=>`${t.number(e.count)} Element ausgew\xe4hlt`,other:()=>`${t.number(e.count)} Elemente ausgew\xe4hlt`})}.`,selectedItem:e=>`${e.item} ausgew\xe4hlt.`};var ja={};ja={deselectedItem:e=>`\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`,longPressToSelect:`Πατήστε παρατεταμένα για να μπείτε σε λειτουργία επιλογής.`,select:`Επιλογή`,selectedAll:`Επιλέχθηκαν όλα τα στοιχεία.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Δεν επιλέχθηκαν στοιχεία`,one:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B1}\u{3BD} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}.`,selectedItem:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`};var Ma={};Ma={deselectedItem:e=>`${e.item} not selected.`,select:`Select`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`No items selected`,one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:`All items selected.`,selectedItem:e=>`${e.item} selected.`,longPressToSelect:`Long press to enter selection mode.`};var Na={};Na={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:`Mantenga pulsado para abrir el modo de selección.`,select:`Seleccionar`,selectedAll:`Todos los elementos seleccionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ningún elemento seleccionado`,one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var Pa={};Pa={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:`Valikurežiimi sisenemiseks vajutage pikalt.`,select:`Vali`,selectedAll:`Kõik üksused valitud.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Üksusi pole valitud`,one:()=>`${t.number(e.count)} \xfcksus valitud`,other:()=>`${t.number(e.count)} \xfcksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var Fa={};Fa={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:`Siirry valintatilaan painamalla pitkään.`,select:`Valitse`,selectedAll:`Kaikki kohteet valittu.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ei yhtään kohdetta valittu`,one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var Ia={};Ia={deselectedItem:e=>`${e.item} non s\xe9lectionn\xe9.`,longPressToSelect:`Appuyez de manière prolongée pour passer en mode de sélection.`,select:`Sélectionner`,selectedAll:`Tous les éléments sélectionnés.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Aucun élément sélectionné`,one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}.`,selectedItem:e=>`${e.item} s\xe9lectionn\xe9.`};var La={};La={deselectedItem:e=>`${e.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,longPressToSelect:`הקשה ארוכה לכניסה למצב בחירה.`,select:`בחר`,selectedAll:`כל הפריטים נבחרו.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`לא נבחרו פריטים`,one:()=>`\u{5E4}\u{5E8}\u{5D9}\u{5D8} ${t.number(e.count)} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}.`,selectedItem:e=>`${e.item} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`};var Ra={};Ra={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:`Dugo pritisnite za ulazak u način odabira.`,select:`Odaberite`,selectedAll:`Odabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije odabrana nijedna stavka`,one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var za={};za={deselectedItem:e=>`${e.item} nincs kijel\xf6lve.`,longPressToSelect:`Nyomja hosszan a kijelöléshez.`,select:`Kijelölés`,selectedAll:`Az összes elem kijelölve.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Egy elem sincs kijelölve`,one:()=>`${t.number(e.count)} elem kijel\xf6lve`,other:()=>`${t.number(e.count)} elem kijel\xf6lve`})}.`,selectedItem:e=>`${e.item} kijel\xf6lve.`};var Ba={};Ba={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:`Premi a lungo per passare alla modalità di selezione.`,select:`Seleziona`,selectedAll:`Tutti gli elementi selezionati.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nessun elemento selezionato`,one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var Va={};Va={deselectedItem:e=>`${e.item} \u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}\u{3002}`,longPressToSelect:`長押しして選択モードを開きます。`,select:`選択`,selectedAll:`すべての項目を選択しました。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`項目が選択されていません`,one:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`,other:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`})}\u{3002}`,selectedItem:e=>`${e.item} \u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`};var Ha={};Ha={deselectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,longPressToSelect:`선택 모드로 들어가려면 길게 누르십시오.`,select:`선택`,selectedAll:`모든 항목이 선택되었습니다.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`선택된 항목이 없습니다`,one:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`})}.`,selectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`};var Ua={};Ua={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:`Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.`,select:`Pasirinkti`,selectedAll:`Pasirinkti visi elementai.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nepasirinktas nė vienas elementas`,one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta element\u{173}: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var Wa={};Wa={deselectedItem:e=>`Vienums ${e.item} nav atlas\u{12B}ts.`,longPressToSelect:`Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.`,select:`Atlasīt`,selectedAll:`Atlasīti visi vienumi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nav atlasīts neviens vienums`,one:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlas\u{12B}ts vienums ${e.item}.`};var Ga={};Ga={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:`Bruk et langt trykk for å gå inn i valgmodus.`,select:`Velg`,selectedAll:`Alle elementer er valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer er valgt`,one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var Ka={};Ka={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:`Druk lang om de selectiemodus te openen.`,select:`Selecteren`,selectedAll:`Alle items geselecteerd.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Geen items geselecteerd`,one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var qa={};qa={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:`Naciśnij i przytrzymaj, aby wejść do trybu wyboru.`,select:`Zaznacz`,selectedAll:`Wszystkie zaznaczone elementy.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nie zaznaczono żadnych elementów`,one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych element\xf3w`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var Ja={};Ja={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Mantenha pressionado para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Ya={};Ya={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Prima continuamente para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var Xa={};Xa={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:`Apăsați lung pentru a intra în modul de selectare.`,select:`Selectare`,selectedAll:`Toate elementele selectate.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Niciun element selectat`,one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var Za={};Za={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`Нажмите и удерживайте для входа в режим выбора.`,select:`Выбрать`,selectedAll:`Выбраны все элементы.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Нет выбранных элементов`,one:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}`,other:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var Qa={};Qa={deselectedItem:e=>`Nevybrat\xe9 polo\u{17E}ky: ${e.item}.`,longPressToSelect:`Dlhším stlačením prejdite do režimu výberu.`,select:`Vybrať`,selectedAll:`Všetky vybraté položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Žiadne vybraté položky`,one:()=>`${t.number(e.count)} vybrat\xe1 polo\u{17E}ka`,other:()=>`Po\u{10D}et vybrat\xfdch polo\u{17E}iek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybrat\xe9 polo\u{17E}ky: ${e.item}.`};var $a={};$a={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:`Za izbirni način pritisnite in dlje časa držite.`,select:`Izberite`,selectedAll:`Vsi elementi so izbrani.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Noben element ni izbran`,one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var eo={};eo={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:`Dugo pritisnite za ulazak u režim biranja.`,select:`Izaberite`,selectedAll:`Izabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije izabrana nijedna stavka`,one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var to={};to={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:`Tryck länge när du vill öppna väljarläge.`,select:`Markera`,selectedAll:`Alla markerade objekt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Inga markerade objekt`,one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var no={};no={deselectedItem:e=>`${e.item} se\xe7ilmedi.`,longPressToSelect:`Seçim moduna girmek için uzun basın.`,select:`Seç`,selectedAll:`Tüm ögeler seçildi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Hiçbir öge seçilmedi`,one:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`,other:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`})}.`,selectedItem:e=>`${e.item} se\xe7ildi.`};var ro={};ro={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`Виконайте довге натиснення, щоб перейти в режим вибору.`,select:`Вибрати`,selectedAll:`Усі елементи вибрано.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Жодних елементів не вибрано`,one:()=>`${t.number(e.count)} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}`,other:()=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{456}\u{432}: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var io={};io={deselectedItem:e=>`\u{672A}\u{9009}\u{62E9} ${e.item}\u{3002}`,longPressToSelect:`长按以进入选择模式。`,select:`选择`,selectedAll:`已选择所有项目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未选择项目`,one:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`,other:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.item}\u{3002}`};var ao={};ao={deselectedItem:e=>`\u{672A}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`,longPressToSelect:`長按以進入選擇模式。`,select:`選取`,selectedAll:`已選取所有項目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未選取任何項目`,one:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`,other:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`};var oo={};oo={"ar-AE":Ea,"bg-BG":Da,"cs-CZ":Oa,"da-DK":ka,"de-DE":Aa,"el-GR":ja,"en-US":Ma,"es-ES":Na,"et-EE":Pa,"fi-FI":Fa,"fr-FR":Ia,"he-IL":La,"hr-HR":Ra,"hu-HU":za,"it-IT":Ba,"ja-JP":Va,"ko-KR":Ha,"lt-LT":Ua,"lv-LV":Wa,"nb-NO":Ga,"nl-NL":Ka,"pl-PL":qa,"pt-BR":Ja,"pt-PT":Ya,"ro-RO":Xa,"ru-RU":Za,"sk-SK":Qa,"sl-SI":$a,"sr-SP":eo,"sv-SE":to,"tr-TR":no,"uk-UA":ro,"zh-CN":io,"zh-TW":ao};function so(e){return e&&e.__esModule?e.default:e}function co(e,t){let{getRowText:n=e=>{var n;return(n=t.collection).getTextValue?.call(n,e)??t.collection.getItem(e)?.textValue}}=e,r=dn(so(oo),`@react-aria/grid`),i=t.selectionManager.rawSelection,a=(0,J.useRef)(i),o=(0,J.useCallback)(()=>{if(!t.selectionManager.isFocused||i===a.current){a.current=i;return}let e=lo(i,a.current),o=lo(a.current,i),s=t.selectionManager.selectionBehavior===`replace`,c=[];if(t.selectionManager.selectedKeys.size===1&&s){let e=t.selectionManager.selectedKeys.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`selectedItem`,{item:t}))}}else if(e.size===1&&o.size===0){let t=e.keys().next().value;if(t!=null){let e=n(t);e&&c.push(r.format(`selectedItem`,{item:e}))}}else if(o.size===1&&e.size===0){let e=o.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`deselectedItem`,{item:t}))}}t.selectionManager.selectionMode===`multiple`&&(c.length===0||i===`all`||i.size>1||a.current===`all`||a.current?.size>1)&&c.push(i===`all`?r.format(`selectedAll`):r.format(`selectedCount`,{count:i.size})),c.length>0&&qt(c.join(` `)),a.current=i},[i,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,n,r]);Nr(()=>{if(t.selectionManager.isFocused)o();else{let e=requestAnimationFrame(o);return()=>cancelAnimationFrame(e)}},[i,t.selectionManager.isFocused])}function lo(e,t){let n=new Set;if(e===`all`||t===`all`)return n;for(let r of e.keys())t.has(r)||n.add(r);return n}function uo(e){return e&&e.__esModule?e.default:e}function fo(e){let t=dn(uo(oo),`@react-aria/grid`),n=Wt(),r=(n===`pointer`||n===`virtual`||n==null)&&typeof window<`u`&&`ontouchstart`in window,i=(0,J.useMemo)(()=>{let n=e.selectionManager.selectionMode,i=e.selectionManager.selectionBehavior,a;return r&&(a=t.format(`longPressToSelect`)),i===`replace`&&n!==`none`&&e.hasItemActions?a:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,r]);return Tr(i)}function po(e){return e&&e.__esModule?e.default:e}function mo(e,t){let{key:n}=e,r=t.selectionManager,i=Gt(),a=!t.selectionManager.canSelectItem(n),o=t.selectionManager.isSelected(n);return{checkboxProps:{id:i,"aria-label":dn(po(oo),`@react-aria/grid`).format(`select`),isSelected:o,isDisabled:a,onChange:()=>r.toggleSelection(n)}}}function ho(e,t,n){let{isVirtualized:r,keyboardDelegate:i,layoutDelegate:a,onAction:o,disallowTypeAhead:s,linkBehavior:c=`action`,keyboardNavigationBehavior:l=`arrow`,escapeKeyBehavior:u=`clearSelection`,shouldSelectOnPressUp:d}=e;!e[`aria-label`]&&!e[`aria-labelledby`]&&console.warn(`An aria-label or aria-labelledby prop is required for accessibility.`);let{listProps:f}=Mi({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:n,keyboardDelegate:i,layoutDelegate:a,isVirtualized:r,selectOnFocus:t.selectionManager.selectionBehavior===`replace`,shouldFocusWrap:e.shouldFocusWrap,linkBehavior:c,disallowTypeAhead:s,autoFocus:e.autoFocus,escapeKeyBehavior:u}),p=Gt(e.id);Ca.set(t,{id:p,onAction:o,linkBehavior:c,keyboardNavigationBehavior:l,shouldSelectOnPressUp:d});let m=fo({selectionManager:t.selectionManager,hasItemActions:!!o}),h=fi(n,{isDisabled:t.collection.size!==0}),g=Ct(e,{labelable:!0}),_=rn(g,{role:`grid`,id:p,"aria-multiselectable":t.selectionManager.selectionMode===`multiple`?`true`:void 0},t.collection.size===0?{tabIndex:h?-1:0}:f,m);return r&&(_[`aria-rowcount`]=t.collection.size,_[`aria-colcount`]=1),co({},t),{gridProps:_}}var go={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function _o(e,t,n){let{node:r,isVirtualized:i}=e,{direction:a}=Qn(),{onAction:o,linkBehavior:s,keyboardNavigationBehavior:c,shouldSelectOnPressUp:l}=Ca.get(t),u=wt(),d=(0,J.useRef)(null),f=()=>{n.current!==null&&(d.current!=null&&r.key!==d.current||!Lt(n.current))&&Bt(n.current)},p={},m=e.hasChildItems,h=t.selectionManager.isLink(r.key);if(r!=null&&`expandedKeys`in t){var g;let e=(g=t.collection).getChildren?.call(g,r.key);m||=[...e??[]].length>1,o==null&&!h&&t.selectionManager.selectionMode===`none`&&m&&(o=()=>t.toggleKey(r.key));let n=m?t.expandedKeys.has(r.key):void 0,i=1,a=r.index;if(r.level>=0&&r?.parentKey!=null){let e=t.collection.getItem(r.parentKey);if(e){let n=yo(e,t.collection);i=[...n].filter(e=>e.type===`item`).length,a>0&&n[0].type!==`item`&&--a}}else i=[...t.collection].filter(e=>e.level===0&&e.type===`item`).length;p={"aria-expanded":n,"aria-level":r.level+1,"aria-posinset":a+1,"aria-setsize":i}}let{itemProps:_,...v}=Di({selectionManager:t.selectionManager,key:r.key,ref:n,isVirtualized:i,shouldSelectOnPressUp:e.shouldSelectOnPressUp||l,onAction:o||r.props?.onAction?yn(r.props?.onAction,o?()=>o(r.key):void 0):void 0,focus:f,linkBehavior:s}),y=e=>{let i=Rt();if(!Ft(e.currentTarget,Dt(e))||!n.current||!i)return;let o=wr(n.current);if(o.currentNode=i,`expandedKeys`in t&&i===n.current){if(e.key===go.expand[a]&&t.selectionManager.focusedKey===r.key&&m&&!t.expandedKeys.has(r.key)){t.toggleKey(r.key),e.stopPropagation();return}if(e.key===go.collapse[a]&&t.selectionManager.focusedKey===r.key&&m&&t.expandedKeys.has(r.key)){t.toggleKey(r.key),e.stopPropagation();return}}switch(e.key){case`ArrowLeft`:if(c===`arrow`){let t=a===`rtl`?o.nextNode():o.previousNode();if(t)e.preventDefault(),e.stopPropagation(),Bt(t),Er(t,{containingElement:_r(n.current)});else if(e.preventDefault(),e.stopPropagation(),a===`rtl`)Bt(n.current),Er(n.current,{containingElement:_r(n.current)});else{o.currentNode=n.current;let e=vo(o);e&&(Bt(e),Er(e,{containingElement:_r(n.current)}))}}break;case`ArrowRight`:if(c===`arrow`){let t=a===`rtl`?o.previousNode():o.nextNode();if(t)e.preventDefault(),e.stopPropagation(),Bt(t),Er(t,{containingElement:_r(n.current)});else if(e.preventDefault(),e.stopPropagation(),a===`ltr`)Bt(n.current),Er(n.current,{containingElement:_r(n.current)});else{o.currentNode=n.current;let e=vo(o);e&&(Bt(e),Er(e,{containingElement:_r(n.current)}))}}break;case`ArrowUp`:case`ArrowDown`:if(!e.altKey&&Ft(n.current,Dt(e))){var s;e.stopPropagation(),e.preventDefault(),(s=n.current.parentElement)==null||s.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))}}},b=e=>{if(d.current=r.key,Dt(e)!==n.current){kt()||t.selectionManager.setFocusedKey(r.key);return}},x=e=>{let t=Rt();if(!(!Ft(e.currentTarget,Dt(e))||!n.current||!t)&&e.key===`Tab`&&c===`tab`){let r=wr(n.current,{tabbable:!0});r.currentNode=t,(e.shiftKey?r.previousNode():r.nextNode())&&e.stopPropagation()}},S=gn(r.props),C=v.hasAction?S:{},w=rn(_,C,{role:`row`,onKeyDownCapture:y,onKeyDown:x,onFocus:b,"aria-label":r[`aria-label`]||r.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(r.key)?t.selectionManager.isSelected(r.key):void 0,"aria-disabled":t.selectionManager.isDisabled(r.key)||void 0,"aria-labelledby":u&&(r[`aria-label`]||r.textValue)?`${wa(t,r.key)} ${u}`:void 0,id:wa(t,r.key)});if(i){let{collection:e}=t;w[`aria-rowindex`]=[...e].find(e=>e.type===`section`)?[...e.getKeys()].filter(t=>e.getItem(t)?.type!==`section`).findIndex(e=>e===r.key)+1:r.index+1}let T={role:`gridcell`,"aria-colindex":1};return{rowProps:{...rn(w,p)},gridCellProps:T,descriptionProps:{id:u},...v}}function vo(e){let t=null,n=null;do n=e.lastChild(),n&&(t=n);while(n);return t}function yo(e,t){let n=t.getChildren?.call(t,e.key),r=n?Array.from(n):[],i=r.length>0?r[0]:null,a=[];for(;i;)a.push(i),i=i.nextKey==null?null:t.getItem(i.nextKey);return a}function bo(e,t){let{key:n}=e,{checkboxProps:r}=mo(e,t);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${wa(t,n)}`}}}function xo(e,t,n){let{gridProps:r}=ho(e,t,n);return r.role=`treegrid`,{gridProps:r}}var So={};So={collapse:`طي`,expand:`تمديد`};var Co={};Co={collapse:`Свиване`,expand:`Разширяване`};var wo={};wo={collapse:`Sbalit`,expand:`Roztáhnout`};var To={};To={collapse:`Skjul`,expand:`Udvid`};var Eo={};Eo={collapse:`Reduzieren`,expand:`Erweitern`};var Do={};Do={collapse:`Σύμπτυξη`,expand:`Ανάπτυξη`};var Oo={};Oo={expand:`Expand`,collapse:`Collapse`};var ko={};ko={collapse:`Contraer`,expand:`Ampliar`};var Ao={};Ao={collapse:`Ahenda`,expand:`Laienda`};var jo={};jo={collapse:`Pienennä`,expand:`Laajenna`};var Mo={};Mo={collapse:`Réduire`,expand:`Développer`};var No={};No={collapse:`כווץ`,expand:`הרחב`};var Po={};Po={collapse:`Sažmi`,expand:`Proširi`};var Fo={};Fo={collapse:`Összecsukás`,expand:`Kibontás`};var Io={};Io={collapse:`Comprimi`,expand:`Espandi`};var Lo={};Lo={collapse:`折りたたむ`,expand:`展開`};var Ro={};Ro={collapse:`접기`,expand:`펼치기`};var zo={};zo={collapse:`Sutraukti`,expand:`Išskleisti`};var Bo={};Bo={collapse:`Sakļaut`,expand:`Izvērst`};var Vo={};Vo={collapse:`Skjul`,expand:`Utvid`};var Ho={};Ho={collapse:`Samenvouwen`,expand:`Uitvouwen`};var Uo={};Uo={collapse:`Zwiń`,expand:`Rozwiń`};var Wo={};Wo={collapse:`Recolher`,expand:`Expandir`};var Go={};Go={collapse:`Colapsar`,expand:`Expandir`};var Ko={};Ko={collapse:`Restrângeți`,expand:`Extindeți`};var qo={};qo={collapse:`Свернуть`,expand:`Развернуть`};var Jo={};Jo={collapse:`Zbaliť`,expand:`Rozbaliť`};var Yo={};Yo={collapse:`Strni`,expand:`Razširi`};var Xo={};Xo={collapse:` Skupi`,expand:`Proširi`};var Zo={};Zo={collapse:`Dölj`,expand:`Expandera`};var Qo={};Qo={collapse:`Daralt`,expand:`Genişlet`};var $o={};$o={collapse:`Згорнути`,expand:`Розгорнути`};var es={};es={collapse:`折叠`,expand:`扩展`};var ts={};ts={collapse:`收合`,expand:`展開`};var ns={};ns={"ar-AE":So,"bg-BG":Co,"cs-CZ":wo,"da-DK":To,"de-DE":Eo,"el-GR":Do,"en-US":Oo,"es-ES":ko,"et-EE":Ao,"fi-FI":jo,"fr-FR":Mo,"he-IL":No,"hr-HR":Po,"hu-HU":Fo,"it-IT":Io,"ja-JP":Lo,"ko-KR":Ro,"lt-LT":zo,"lv-LV":Bo,"nb-NO":Vo,"nl-NL":Ho,"pl-PL":Uo,"pt-BR":Wo,"pt-PT":Go,"ro-RO":Ko,"ru-RU":qo,"sk-SK":Jo,"sl-SI":Yo,"sr-SP":Xo,"sv-SE":Zo,"tr-TR":Qo,"uk-UA":$o,"zh-CN":es,"zh-TW":ts};function rs(e){return e&&e.__esModule?e.default:e}function is(e,t,n){let{node:r}=e,i=_o(e,t,n),a=i.rowProps[`aria-expanded`]===!0,o=dn(rs(ns),`@react-aria/tree`),s={onPress:()=>{i.isDisabled||(t.toggleKey(r.key),t.selectionManager.setFocused(!0),t.selectionManager.setFocusedKey(r.key))},excludeFromTabOrder:!0,preventFocusOnPress:!0,"data-react-aria-prevent-focus":!0,...tn({"aria-label":a?o.format(`collapse`):o.format(`expand`),"aria-labelledby":i.rowProps.id})};return{...i,expandButtonProps:s}}var as=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function os(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ss(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,J.useRef)(!1),[,s]=(0,J.useState)(!1),c=(0,J.useRef)(null),l=(0,J.useRef)(null),[,u]=(0,J.useState)(null),d=(0,J.useMemo)(()=>cs(e.selectedKeys),[e.selectedKeys]),f=(0,J.useMemo)(()=>cs(e.defaultSelectedKeys,new as),[e.defaultSelectedKeys]),[p,m]=hn(d,f,e.onSelectionChange),h=(0,J.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[g,_]=(0,J.useState)(i);i===`replace`&&g===`toggle`&&typeof p==`object`&&p.size===0&&_(`replace`);let v=(0,J.useRef)(i);return(0,J.useEffect)(()=>{i!==v.current&&(_(i),v.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:g,setSelectionBehavior:_,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:p,setSelectedKeys(e){(r||!os(e,p))&&m(e)},disabledKeys:h,disabledBehavior:a}}function cs(e,t){return e?e===`all`?`all`:new as(e):t}var ls=class e{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Vi(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Vi(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new as([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new as(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?Vi(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new as(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new as([t],t,t):new as;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new as;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){let r=this.collection.getItem(n);r?.type===`item`&&e.push(n),r?.hasChildNodes&&(this.allowsCellSelection||r.type!==`item`)&&t(zi(Ri(r,this.collection))?.key??null)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new as)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let t=this.collection.getItem(e);return!(!t||t!=null&&t.props?.isDisabled||t.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){var t;return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!((t=this.collection.getItem(e))!=null&&t.props?.isDisabled))}isLink(e){var t;return!!((t=this.collection.getItem(e))!=null&&t.props?.href)}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null}},us=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t||=new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}};function ds(e){let{onExpandedChange:t}=e,[n,r]=hn(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=ss(e),a=(0,J.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=Li(e,(0,J.useCallback)(e=>new us(e,{expandedKeys:n}),[n]),null);return(0,J.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(fs(n,e))},setExpandedKeys:r,selectionManager:new ls(o,i)}}function fs(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var ps=(0,J.createContext)({}),ms=(0,J.createContext)(null),hs=(0,J.forwardRef)(function(e,t){let{render:n}=(0,J.useContext)(ms);return J.createElement(J.Fragment,null,n(e,t))});function gs(e,t){let n=e?.renderDropIndicator,r=e?.isVirtualDragging?.call(e),i=(0,J.useCallback)(e=>{if(r||t?.isDropTarget(e))return n?n(e):J.createElement(hs,{target:e})},[t?.target,r,n]);return e?.useDropIndicator?i:void 0}function _s(e,t,n){let r=e.focusedKey,i=null;if(t!=null&&t.isVirtualDragging?.call(t)&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return(0,J.useMemo)(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}var vs=(0,J.createContext)(null);function ys(e){let t=(0,J.useRef)({});return J.createElement(vs.Provider,{value:t},e.children)}var bs=10,xs=5,Ss=class{setup(e,t,n){this.delegate=e,this.state=t,this.direction=n}getDropTargetFromPoint(e,t,n){let r=this.delegate.getDropTargetFromPoint(e,t,n);return!r||r.type===`root`?r:this.resolveDropTarget(r,e,t,n)}resolveDropTarget(e,t,n,r){let i=this.pointerTracking,a=n-i.lastY,o=t-i.lastX,s=i.yDirection,c=i.xDirection;if(Math.abs(a)>xs&&(s=a>0?`down`:`up`,i.yDirection=s,i.lastY=n),Math.abs(o)>bs&&(c=o>0?`right`:`left`,i.xDirection=c,i.lastX=t),e.dropPosition===`before`){let t=this.state.collection.getKeyBefore(e.key);if(t!=null){let n={type:`item`,key:t,dropPosition:`after`};r(n)&&(e=n)}}let l=this.getPotentialTargets(e,r);if(l.length===0)return{type:`root`};let u;return l.length>1?u=this.selectTarget(l,e,t,n,s,c):(u=l[0],i.boundaryContext=null),u}getPotentialTargets(e,t){if(e.dropPosition===`on`)return[e];let n=e,r=this.state.collection,i=r.getItem(n.key);for(;i&&i?.type!==`item`&&i.nextKey!=null;)n.key=i.nextKey,i=r.getItem(i.nextKey);let a=[n];if(i&&i.hasChildNodes&&this.state.expandedKeys.has(i.key)&&r.getChildren&&n.dropPosition===`after`){let e=null;for(let t of r.getChildren(i.key))if(t.type===`item`){e=t;break}if(e){let n={type:`item`,key:e.key,dropPosition:`before`};return t(n)?[n]:[]}}if(i?.nextKey!=null)return[e];let o=i?.parentKey,s=[];for(;o;){let e=r.getItem(o),n=e?.nextKey?r.getItem(e.nextKey):null;if(!n||n.parentKey!==o){let e={type:`item`,key:o,dropPosition:`after`};if(t(e)&&s.push(e),n)break}o=e?.parentKey}if(s.length>0&&a.push(...s),a.length===1){let e=r.getKeyAfter(n.key),a=e?r.getItem(e):null;if(e!=null&&a&&i&&a.level!=null&&i.level!=null&&a.level>i.level){let n={type:`item`,key:e,dropPosition:`before`};if(t(n))return[n]}}return a.filter(t)}selectTarget(e,t,n,r,i,a){if(e.length<2)return e[0];let o=this.pointerTracking,s=this.state.collection.getItem(t.key)?.parentKey;if(!s)return e[0];(!o.boundaryContext||o.boundaryContext.parentKey!==s)&&(o.boundaryContext={parentKey:s,preferredTargetIndex:o.yDirection===`up`?e.length-1:0,lastSwitchY:r,lastSwitchX:n});let c=o.boundaryContext,l=Math.abs(n-c.lastSwitchX);if(Math.abs(r-c.lastSwitchY)>xs&&i){let t=c.preferredTargetIndex||0;i===`down`&&t===0?c.preferredTargetIndex=e.length-1:i===`up`&&t===e.length-1&&(c.preferredTargetIndex=0),o.xDirection=null}if(l>bs&&a){let t=c.preferredTargetIndex||0;a===`left`?this.direction===`ltr`?t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n):t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):a===`right`&&(this.direction===`ltr`?t>0&&(c.preferredTargetIndex=t-1,c.lastSwitchX=n):t<e.length-1&&(c.preferredTargetIndex=t+1,c.lastSwitchX=n)),o.yDirection=null}return e[Math.max(0,Math.min(c.preferredTargetIndex||0,e.length-1))]}constructor(){this.delegate=null,this.state=null,this.direction=`ltr`,this.pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null}}},Cs=class e extends Yi{withExpandedKeys(t,n){let r=this.clone();return r.expandedKeys=n,e.cloneAncestorSections(n,t,r),e.cloneAncestorSections(t,n,r),r.frozen=this.frozen,r}static cloneAncestorSections(e,t,n){for(let r of e)if(!t.has(r)){let e=r;for(;e!=null;){let t=n.getItem(e);if(t?.type===`section`){n.keyMap.set(e,t.clone());break}e=t?.parentKey??null}}}*[Symbol.iterator](){let e=this.getFirstKey(),t=e==null?null:this.getItem(e);for(;t;)if(yield t,t.type===`section`)t=t.nextKey?this.getItem(t.nextKey):null;else{let e=this.getKeyAfter(t.key);t=e?this.getItem(e):null}}getLastKey(){let e=this.lastKey;if(e==null)return null;let t=this.getItem(e);for(;t?.lastChildKey!=null&&(t.type!==`item`||this.expandedKeys.has(t.key));)t=this.getItem(t.lastChildKey);return t?.key}getKeyAfter(e){let t=this.getItem(e);if(!t)return null;if((this.expandedKeys.has(t.key)||t.type!==`item`)&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.getItem(t.parentKey);else return null}return null}getKeyBefore(e){let t=this.getItem(e);if(!t)return null;if(t.prevKey!=null){for(t=this.getItem(t.prevKey);t&&(t.type!==`item`||this.expandedKeys.has(t.key))&&t.lastChildKey!=null;)t=this.getItem(t.lastChildKey);return t?.key??null}return t.parentKey}getChildren(e){let t=this;return{*[Symbol.iterator](){let n=t.getItem(e),r=n?.firstChildKey==null?null:t.getItem(n.firstChildKey);if(n&&n.type===`section`&&r)for(;r&&r.key!==n.nextKey;){yield t.getItem(r.key);let e=t.getKeyAfter(r.key);r=e==null?null:t.getItem(e)}else for(;r;)yield r,r=r.nextKey==null?null:t.getItem(r.nextKey)}}}getTextValue(e){let t=this.getItem(e);return t?t.textValue:``}constructor(...e){super(...e),this.expandedKeys=new Set}},ws=(0,J.createContext)(null),Ts=(0,J.createContext)(null),Es=(0,J.forwardRef)(function(e,t){return[e,t]=zt(e,t,ws),J.createElement(ia,{content:J.createElement(ga,e),createCollection:()=>new Cs},n=>J.createElement(Os,{props:e,collection:n,treeRef:t}))}),Ds={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function Os({props:e,collection:t,treeRef:n}){let{dragAndDropHooks:r}=e,{direction:i}=Qn(),a=fr({usage:`search`,sensitivity:`base`}),o=!!r?.useDraggableCollectionState,s=!!r?.useDroppableCollectionState,c=(0,J.useRef)(o),l=(0,J.useRef)(s);(0,J.useEffect)(()=>{c.current!==o&&console.warn(`Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.`),l.current!==s&&console.warn(`Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.`)},[o,s]);let{selectionMode:u=`none`,expandedKeys:d,defaultExpandedKeys:f,onExpandedChange:p,disabledBehavior:m=`all`}=e,{CollectionRoot:h,isVirtualized:g,layoutDelegate:_,dropTargetDelegate:v}=(0,J.useContext)(Sa),[y,b]=hn(d?new Set(d):void 0,f?new Set(f):new Set,p),[x,S]=(0,J.useState)(t),[C,w]=(0,J.useState)(y),[T,E]=(0,J.useState)(()=>t.withExpandedKeys(C,y));(!Rs(C,y)||t!==x)&&(E(t.withExpandedKeys(C,y)),S(t),w(y));let D=ds({...e,selectionMode:u,expandedKeys:y,onExpandedChange:b,collection:T,children:void 0,disabledBehavior:m}),{gridProps:O}=xo({...e,isVirtualized:g,layoutDelegate:_},D,n),k,A,j,M=!1,N=null,P=(0,J.useRef)(null);if(o&&r){k=r.useDraggableCollectionState({collection:D.collection,selectionManager:D.selectionManager,preview:r.renderDragPreview?P:void 0}),r.useDraggableCollection({},k,n);let e=r.DragPreview;N=r.renderDragPreview?J.createElement(e,{ref:P},r.renderDragPreview):null}let[F]=(0,J.useState)(()=>new Ss);if(s&&r){A=r.useDroppableCollectionState({collection:D.collection,selectionManager:D.selectionManager});let e=r.dropTargetDelegate||v||new r.ListDropTargetDelegate(D.collection,n,{direction:i});F.setup(e,D,i);let t=new ji({collection:D.collection,collator:a,ref:n,disabledKeys:D.selectionManager.disabledKeys,disabledBehavior:D.selectionManager.disabledBehavior,direction:i,layoutDelegate:_});j=r.useDroppableCollection({keyboardDelegate:t,dropTargetDelegate:F,onDropActivate:e=>{if(e.target.type===`item`){let t=e.target.key,n=D.collection.getItem(t),i=y.has(t);n&&n.hasChildNodes&&(!i||r!=null&&r.isVirtualDragging?.call(r))&&D.toggleKey(t)}},onKeyDown:e=>{let t=A?.target;if(t&&t.type===`item`&&t.dropPosition===`on`){let n=D.collection.getItem(t.key);(e.key===Ds.expand[i]&&n?.hasChildNodes&&!D.expandedKeys.has(t.key)||e.key===Ds.collapse[i]&&n?.hasChildNodes&&D.expandedKeys.has(t.key))&&D.toggleKey(t.key)}}},A,n);let o=A.getDropOperation;A.getDropOperation=e=>{let{target:t,isInternal:n}=e,r=k?.draggingKeys??new Set;if(n&&t.type===`item`&&r.size>0){if(r.has(t.key)&&t.dropPosition===`on`)return`cancel`;let e=t.key;for(;e!=null;){let t=D.collection.getItem(e)?.parentKey;if(t!=null&&r.has(t))return`cancel`;e=t??null}}return o(e)},M=A.isDropTarget({type:`root`})}let I=!!(o&&!k?.isDisabled),{focusProps:L,isFocused:R,isFocusVisible:z}=Pt(),B={isEmpty:D.collection.size===0,isFocused:R,isFocusVisible:z,isDropTarget:M,selectionMode:D.selectionManager.selectionMode,allowsDragging:!!I,state:D},V=St({...e,children:void 0,defaultClassName:`react-aria-Tree`,values:B}),H=null;if(D.collection.size===0&&e.renderEmptyState){let{isEmpty:t,...n}=B,r=e.renderEmptyState({...n});H=J.createElement(`div`,{role:`row`,style:{display:`contents`},"aria-level":1},J.createElement(`div`,{role:`gridcell`,style:{display:`contents`}},r))}let ee=Ct(e,{global:!0});return J.createElement(J.Fragment,null,J.createElement(xr,null,J.createElement(mn.div,{...rn(ee,V,O,L,j?.collectionProps),ref:n,slot:e.slot||void 0,"data-empty":D.collection.size===0||void 0,"data-focused":R||void 0,"data-drop-target":M||void 0,"data-focus-visible":z||void 0,"data-selection-mode":D.selectionManager.selectionMode===`none`?void 0:D.selectionManager.selectionMode,"data-allows-dragging":!!I||void 0},J.createElement(Xt,{values:[[Ts,D],[ps,{dragAndDropHooks:r,dragState:k,dropState:A}],[ms,{render:Ps}]]},s&&J.createElement(Ls,null),J.createElement(ys,null,J.createElement(h,{collection:D.collection,persistedKeys:_s(D.selectionManager,r,A),scrollRef:n,renderDropIndicator:gs(r,A)}))),H)),N)}var ks=class extends Ui{};ks.type=`content`;var As=fa(ks,function(e){let t=(0,J.useContext)(js),n=St({children:e.children,values:t});return J.createElement(Sa.Provider,{value:ya},n.children)}),js=(0,J.createContext)(null),Ms=class extends Ui{};Ms.type=`item`;var Ns=pa(Ms,(e,t,n)=>{let r=(0,J.useContext)(Ts);t=nn(t);let{dragAndDropHooks:i,dragState:a,dropState:o}=(0,J.useContext)(ps),{rowProps:s,gridCellProps:c,expandButtonProps:l,descriptionProps:u,...d}=is({node:n,shouldSelectOnPressUp:!!a},r,t),f=s[`aria-expanded`]===!0,p=e.hasChildItems||[...r.collection.getChildren(n.key)].length>1,m=s[`aria-level`]||1,{hoverProps:h,isHovered:g}=It({isDisabled:!d.allowsSelection&&!d.hasAction,onHoverStart:e.onHoverStart,onHoverChange:e.onHoverChange,onHoverEnd:e.onHoverEnd}),{isFocusVisible:_,focusProps:v}=Pt(),{isFocusVisible:y,focusProps:b}=Pt({within:!0}),{checkboxProps:x}=bo({key:n.key},r),S=null;a&&i&&(S=i.useDraggableItem({key:n.key,hasDragButton:!0},a));let C=null,w=(0,J.useRef)(null),T=(0,J.useRef)(null),E=(0,J.useRef)(null),{visuallyHiddenProps:D}=sr();o&&i&&(C=i.useDropIndicator({target:{type:`item`,key:n.key,dropPosition:`on`},activateButtonRef:E},o,T));let O=a&&a.isDragging(n.key),k=C?.isDropTarget,A=r.selectionManager.selectionMode,j=r.selectionManager.selectionBehavior,M=J.useMemo(()=>({...d,isHovered:g,isFocusVisible:_,isExpanded:f,hasChildItems:p,level:m,selectionMode:A,selectionBehavior:j,isFocusVisibleWithin:y,state:r,id:n.key,allowsDragging:!!a,isDragging:O,isDropTarget:k}),[d,g,_,f,p,m,y,r,n.key,a,O,k,j,A]),N=St({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-TreeItem`,defaultStyle:{"--tree-item-level":m},values:M});(0,J.useEffect)(()=>{n.textValue},[n.textValue]),(0,J.useEffect)(()=>{p&&w.current},[]);let P=(0,J.useRef)(null);(0,J.useEffect)(()=>{a&&P.current},[]);let F=ea({items:r.collection.getChildren(n.key),children:e=>{switch(e.type){case`content`:return e.render(e);case`loader`:case`item`:return J.createElement(J.Fragment,null);default:throw Error(`Unsupported element type in TreeRow: `+e.type)}}}),I=Gt(),L=Ct(e,{global:!0});return delete L.id,delete L.onClick,J.createElement(J.Fragment,null,C&&!C.isHidden&&J.createElement(`div`,{role:`row`,"aria-level":s[`aria-level`],"aria-expanded":s[`aria-expanded`],"aria-label":C.dropIndicatorProps[`aria-label`]},J.createElement(`div`,{role:`gridcell`,"aria-colindex":1,style:{display:`contents`}},J.createElement(`div`,{role:`button`,...D,...C.dropIndicatorProps,ref:T}),s[`aria-expanded`]==null?null:J.createElement(`div`,{role:`button`,...D,id:I,"aria-label":l[`aria-label`],"aria-labelledby":`${I} ${s.id}`,tabIndex:-1,ref:E}))),J.createElement(mn.div,{...rn(L,s,v,h,b,S?.dragProps),...N,ref:t,"data-expanded":p&&f||void 0,"data-has-child-items":p||void 0,"data-level":m,"data-selected":d.isSelected||void 0,"data-disabled":d.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":d.isFocused||void 0,"data-focus-visible":_||void 0,"data-pressed":d.isPressed||void 0,"data-selection-mode":r.selectionManager.selectionMode===`none`?void 0:r.selectionManager.selectionMode,"data-allows-dragging":!!a||void 0,"data-dragging":O||void 0,"data-drop-target":k||void 0},J.createElement(`div`,{...c,style:{display:`contents`}},J.createElement(Xt,{values:[[Fr,{slots:{selection:x}}],[en,{slots:{[cn]:{},chevron:{...l,ref:w},drag:{...S?.dragButtonProps,ref:P,style:{pointerEvents:`none`}}}}],[js,{...M}],[$n,{isSelected:d.isSelected}]]},F))))});fa(Ki,function(e,t,n){let{isVirtualized:r}=(0,J.useContext)(Sa),i=(0,J.useContext)(Ts),{isLoading:a,onLoadMore:o,scrollOffset:s,...c}=e,l=(0,J.useRef)(null);oi((0,J.useMemo)(()=>({onLoadMore:o,collection:i?.collection,sentinelRef:l,scrollOffset:s}),[o,s,i?.collection]),l),t=nn(t);let{rowProps:u,gridCellProps:d}=is({node:n},i,t),f=u[`aria-level`]||1,p={role:`row`,"aria-level":u[`aria-level`]},m=St({...c,id:void 0,children:n.rendered,defaultClassName:`react-aria-TreeLoader`,values:{level:f}}),h={};return r&&(h={display:`contents`}),J.createElement(J.Fragment,null,J.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:si(!0)},J.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:l,style:{position:`absolute`,height:1,width:1}})),a&&m.children&&J.createElement(mn.div,{ref:t,...rn(Ct(e),p),...m,"data-level":f},J.createElement(`div`,{...d,style:h},m.children)))});function Ps(e,t){t=nn(t);let{dragAndDropHooks:n,dropState:r}=(0,J.useContext)(ps),i=(0,J.useRef)(null),{dropIndicatorProps:a,isHidden:o,isDropTarget:s}=n.useDropIndicator(e,r,i);if(o)return null;let c=r&&e.target.type===`item`?(r.collection.getItem(e.target.key)?.level||0)+1:1;return J.createElement(Is,{...e,dropIndicatorProps:a,isDropTarget:s,ref:t,buttonRef:i,level:c})}function Fs(e,t){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:i,level:a,...o}=e,{visuallyHiddenProps:s}=sr(),c=St({...o,defaultClassName:`react-aria-DropIndicator`,defaultStyle:{position:`relative`,"--tree-item-level":a},values:{isDropTarget:r}});return J.createElement(mn.div,{...c,role:`row`,"aria-level":a,ref:t,"data-drop-target":r||void 0},J.createElement(`div`,{role:`gridcell`},J.createElement(`div`,{...s,role:`button`,...n,ref:i}),c.children))}var Is=(0,J.forwardRef)(Fs);function Ls(){let{dragAndDropHooks:e,dropState:t}=(0,J.useContext)(ps),n=(0,J.useRef)(null),{dropIndicatorProps:r}=e.useDropIndicator({target:{type:`root`}},t,n),i=t.isDropTarget({type:`root`}),{visuallyHiddenProps:a}=sr();return!i&&r[`aria-hidden`]?null:J.createElement(`div`,{role:`row`,"aria-hidden":r[`aria-hidden`],style:{position:`absolute`}},J.createElement(`div`,{role:`gridcell`},J.createElement(`div`,{role:`button`,...a,...r,ref:n})))}function Rs(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var zs=[`openai`,`github`,`anthropic`,`google`,`ollama`,`bedrock`,`deepseek`,`azure`,`openrouter`,`wandb`,`opencode-go`,`marimo`],Bs=class e{providerId;shortModelId;constructor(e,t){this.providerId=e,this.shortModelId=t}get id(){return`${this.providerId}/${this.shortModelId}`}static parse(t){if(!t.includes(`/`)){let n=Vs(t);return new e(n,t)}let[n,...r]=t.split(`/`);return new e(n,r.join(`/`))}};function Vs(e){return e.startsWith(`gpt`)||e.startsWith(`o3`)||e.startsWith(`o1`)?`openai`:e.startsWith(`claude`)?`anthropic`:e.startsWith(`gemini`)||e.startsWith(`google`)?`google`:e.startsWith(`deepseek`)?`deepseek`:`ollama`}function Hs(e){return zs.includes(e)}var Us=JSON.parse(`{"anthropic":[{"name":"Claude Opus 5.5","model":"claude-opus-5-5","description":"Anthropic's strongest Opus model for coding, agents, and knowledge work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":4,"output":20}},{"name":"Claude Fable 5.1","model":"claude-fable-5-1","description":"Anthropic model for ambitious, long-running coding, agentic, research, and enterprise workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-01","cost":{"input":10,"output":50}},{"name":"Claude Opus 5","model":"claude-opus-5","description":"Anthropic's flagship model for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-24","cost":{"input":5,"output":25}},{"name":"Claude Fable 5","model":"claude-fable-5","description":"Anthropic's Mythos-class model built for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-09","cost":{"input":10,"output":50}},{"name":"Claude Sonnet 5","model":"claude-sonnet-5","description":"Anthropic's most agentic Sonnet model yet, built for planning, tool use, and autonomous multi-step work at Sonnet pricing","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"Claude Opus 4.8","model":"claude-opus-4-8","description":"Modest but tangible improvement over Claude Opus 4.7","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-28","cost":{"input":5,"output":25}},{"name":"Claude Sonnet 4.6","model":"claude-sonnet-4-6","description":"Anthropic Sonnet model for coding, agents, and professional work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-02-17","cost":{"input":3,"output":15}},{"name":"Claude Haiku 4.5","model":"claude-haiku-4-5","description":"Anthropic's fastest and most efficient model, delivering near-frontier intelligence at a fraction of the cost and latency of larger Claude models","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2025-10-15","cost":{"input":1,"output":5}}],"openai":[{"name":"GPT-6 Luna","model":"gpt-6-luna","description":"OpenAI's most efficient model for focused, high-volume tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.1,"output":0.5}},{"name":"GPT-6 Sol","model":"gpt-6-sol","description":"OpenAI reasoning model for demanding tasks that balances capability, latency, and cost","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":2,"output":10}},{"name":"Daybreak Blue","model":"gpt-daybreak-blue-latest","description":"OpenAI model alias for authorized defensive cybersecurity work with reduced refusals","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-07","cost":{"input":4,"output":20}},{"name":"Daybreak Red","model":"gpt-daybreak-red-latest","description":"OpenAI model alias for advanced authorized cybersecurity work, including penetration testing and exploit validation","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-07","cost":{"input":12.5,"output":75}},{"name":"GPT-6 Astra","model":"gpt-6-astra","description":"OpenAI model for advanced analysis, software engineering, deep research, scientific work, and document creation","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-04","cost":{"input":10,"output":50}},{"name":"GPT-5.6","model":"gpt-5.6","description":"OpenAI's GPT-5.6 flagship tier for frontier reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5,"output":30}},{"name":"GPT-5.6 Luna","model":"gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":1,"output":6}},{"name":"GPT-5.6 Sol","model":"gpt-5.6-sol","description":"Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5,"output":30}},{"name":"GPT-5.6 Terra","model":"gpt-5.6-terra","description":"Balanced model in OpenAI's GPT-5.6 series, suited for everyday coding, reasoning, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":2.5,"output":15}},{"name":"GPT-5.5","model":"gpt-5.5","description":"OpenAI model for complex professional workloads, with stronger reasoning, reliability, and token efficiency than GPT-5.4 on hard tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-04-23","cost":{"input":5,"output":30}}],"google":[{"name":"Claude Opus 5.5","model":"claude-opus-5-5@default","description":"Anthropic's strongest Opus model for coding, agents, and knowledge work, available through Vertex AI only","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":4,"output":20}},{"name":"Grok 4.6","model":"xai/grok-4.6","description":"xAI frontier model for coding, knowledge work, and STEM","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-12","cost":{"input":2,"output":6}},{"name":"Gemini 3.8 Flash","model":"gemini-3.8-flash","description":"Google's most intelligent Flash model, with gains in software engineering, agentic tasks, and multi-step reasoning","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-02","cost":{"input":0.75,"output":3.75}},{"name":"Claude Fable 5.1","model":"claude-fable-5-1@default","description":"Anthropic model for ambitious, long-running coding, agentic, research, and enterprise workflows, available through Vertex AI only","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-01","cost":{"input":10,"output":50}},{"name":"Gemini Flash Latest","model":"gemini-flash-latest","description":"Alias that points to the latest Gemini Flash release and can change when Google updates the model family","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-13","cost":{"input":0.75,"output":3.75}},{"name":"Gemini 3.7 Flash","model":"gemini-3.7-flash","description":"High-efficiency Gemini model for agentic workflows, coding, and multimodal reasoning","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-13","cost":{"input":0.75,"output":3.75}},{"name":"Gemma 4 26B A4B IT","model":"gemma-4-26b-a4b-it","description":"Instruction-tuned Mixture-of-Experts (MoE) model from Google DeepMind","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-04-02"},{"name":"Gemma 4 31B IT","model":"gemma-4-31b-it","description":"Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-04-02"},{"name":"Nano Banana 2 Lite","model":"gemini-3.1-flash-lite-image","description":"Google's fastest, most cost-efficient Gemini image model for high-velocity text-to-image generation and visual exploration","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text","image"],"release_date":"2026-06-30","cost":{"input":0.25,"output":30}},{"name":"Nano Banana 2","model":"gemini-3.1-flash-image","description":"Google's image generation and editing model, delivering Pro-level visual quality at Flash speed","roles":["chat","edit"],"capabilities":["thinking"],"input_types":["text","image","pdf"],"output_types":["text","image"],"release_date":"2026-05-28","cost":{"input":0.5,"output":60}},{"name":"Claude Opus 5","model":"claude-opus-5@default","description":"Anthropic Claude Opus 5 on Google Vertex AI only (not available via the Gemini API)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-24","cost":{"input":5,"output":25}},{"name":"Claude Sonnet 5","model":"claude-sonnet-5@default","description":"Anthropic Claude Sonnet 5 on Google Vertex AI only (not available via the Gemini API)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"Claude Opus 4.8","model":"claude-opus-4-8@default","description":"Anthropic Claude Opus 4.8 on Google Vertex AI only (not available via the Gemini API)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-28","cost":{"input":5,"output":25}}],"bedrock":[{"name":"Claude Opus 5.5 (Global)","model":"global.anthropic.claude-opus-5-5","description":"Anthropic's strongest Opus model for coding, agents, and knowledge work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":4,"output":20}},{"name":"GPT-6 Luna (Global)","model":"global.openai.gpt-6-luna","description":"OpenAI's most efficient model for focused, high-volume tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.1,"output":0.5}},{"name":"GPT-6 Astra (Global)","model":"global.openai.gpt-6-astra","description":"OpenAI model for advanced analysis, software engineering, deep research, scientific work, and document creation","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-04","cost":{"input":10,"output":50}},{"name":"Grok 4.6 (Global)","model":"global.xai.grok-4.6","description":"xAI frontier model for coding, knowledge work, and STEM","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-12","cost":{"input":2,"output":6}},{"name":"Claude Fable 5.1 (Global)","model":"global.anthropic.claude-fable-5-1","description":"Anthropic model for ambitious, long-running coding, agentic, research, and enterprise workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-01","cost":{"input":10,"output":50}},{"name":"Grok 4.6","model":"xai.grok-4.6","description":"xAI's frontier model for coding, agentic tasks, knowledge work, and visual reasoning","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-12","cost":{"input":2.2,"output":6.6}},{"name":"GPT-5.6 Luna (Global)","model":"global.openai.gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":0.22,"output":1.32}},{"name":"GPT-5.6 Sol (Global)","model":"global.openai.gpt-5.6-sol","description":"Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5.5,"output":33}},{"name":"Claude Opus 5 (Global)","model":"global.anthropic.claude-opus-5","description":"Anthropic's flagship model for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-24","cost":{"input":5,"output":25}},{"name":"GPT-5.6 Luna","model":"openai.gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":1,"output":6}},{"name":"GPT-5.6 Sol","model":"openai.gpt-5.6-sol","description":"Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5,"output":30}},{"name":"GPT-5.6 Terra","model":"openai.gpt-5.6-terra","description":"Balanced model in OpenAI's GPT-5.6 series, suited for everyday coding, reasoning, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":2.5,"output":15}},{"name":"Claude Fable 5 (Global)","model":"global.anthropic.claude-fable-5","description":"Anthropic's Mythos-class model built for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-09","cost":{"input":10,"output":50}},{"name":"Claude Sonnet 5 (Global)","model":"global.anthropic.claude-sonnet-5","description":"Anthropic's most agentic Sonnet model yet, built for planning, tool use, and autonomous multi-step work at Sonnet pricing","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"Claude Fable 5 (Global)","model":"global.anthropic.claude-fable-5","description":"Anthropic's Mythos-class model built for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-09","cost":{"input":10,"output":50}},{"name":"Claude Sonnet 5 (Global)","model":"global.anthropic.claude-sonnet-5","description":"Anthropic's most agentic Sonnet model yet, built for planning, tool use, and autonomous multi-step work at Sonnet pricing","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"Claude Opus 4.8 (Global)","model":"global.anthropic.claude-opus-4-8","description":"Modest but tangible improvement over Claude Opus 4.7","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-28","cost":{"input":5,"output":25}},{"name":"GLM-5","model":"zai.glm-5","description":"Z.ai's flagship open-source foundation model engineered for complex systems design and long-horizon agent workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-18","cost":{"input":1,"output":3.2}},{"name":"NVIDIA Nemotron 3 Super 120B A12B","model":"nvidia.nemotron-super-3-120b","description":"120B-parameter open hybrid MoE model, activating just 12B parameters for maximum compute efficiency and accuracy in complex multi-agent applications","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-11","cost":{"input":0.15,"output":0.65}},{"name":"Claude Sonnet 4.6","model":"anthropic.claude-sonnet-4-6","description":"Anthropic Sonnet model for coding, agents, and professional work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-02-17","cost":{"input":3,"output":15}}],"azure":[{"name":"Claude Opus 5.5","model":"claude-opus-5-5","description":"Anthropic's strongest Opus model for coding, agents, and knowledge work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":4,"output":20}},{"name":"GPT-6 Luna","model":"gpt-6-luna","description":"OpenAI's most efficient model for focused, high-volume tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.1,"output":0.5}},{"name":"GPT-6 Sol","model":"gpt-6-sol","description":"OpenAI reasoning model for demanding tasks that balances capability, latency, and cost","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":2,"output":10}},{"name":"GPT Image 2.5 Flare","model":"gpt-image-2.5-flare","description":"Small image generation and editing model optimized for speed and high-quality everyday use","roles":["chat","edit"],"capabilities":[],"input_types":["text","image"],"output_types":["image"],"release_date":"2026-09-08","cost":{"input":5,"output":30}},{"name":"GPT Image 2.5 Sunburst","model":"gpt-image-2.5-sunburst","description":"Image generation and editing model optimized for quality, precise editing, and subject preservation","roles":["chat","edit"],"capabilities":[],"input_types":["text","image"],"output_types":["image"],"release_date":"2026-09-08","cost":{"input":5,"output":30}},{"name":"GPT-6 Astra","model":"gpt-6-astra","description":"OpenAI model for advanced analysis, software engineering, deep research, scientific work, and document creation","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-04","cost":{"input":10,"output":50}},{"name":"Claude Fable 5.1","model":"claude-fable-5-1","description":"Anthropic model for ambitious, long-running coding, agentic, research, and enterprise workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-01","cost":{"input":10,"output":50}},{"name":"Grok 4.6","model":"grok-4.6","description":"xAI frontier model for coding, knowledge work, and STEM","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-12"},{"name":"Claude Opus 5","model":"claude-opus-5","description":"Anthropic's flagship model for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-24","cost":{"input":5,"output":25}},{"name":"GPT-5.6 Luna","model":"gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":1,"output":6}},{"name":"GPT-5.6 Sol","model":"gpt-5.6-sol","description":"Flagship model in OpenAI's GPT-5.6 series, suited for complex reasoning, coding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":5,"output":30}},{"name":"GPT-5.6 Terra","model":"gpt-5.6-terra","description":"Balanced model in OpenAI's GPT-5.6 series, suited for everyday coding, reasoning, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":2.5,"output":15}},{"name":"GPT Chat Latest","model":"gpt-chat-latest","description":"OpenAI's stable chat-latest alias that always resolves to the latest Instant chat model used in ChatGPT","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-05","cost":{"input":5,"output":30}},{"name":"Claude Fable 5","model":"claude-fable-5","description":"Anthropic's Mythos-class model built for demanding reasoning, coding, and long-horizon agentic work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-09","cost":{"input":10,"output":50}},{"name":"Claude Sonnet 5","model":"claude-sonnet-5","description":"Anthropic's most agentic Sonnet model yet, built for planning, tool use, and autonomous multi-step work at Sonnet pricing","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-06-30","cost":{"input":2,"output":10}},{"name":"GPT-5.5","model":"gpt-5.5","description":"OpenAI model for complex professional workloads, with stronger reasoning, reliability, and token efficiency than GPT-5.4 on hard tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":5,"output":30}},{"name":"Grok 4.20 (Non-Reasoning)","model":"grok-4-20-non-reasoning","description":"Reasoning model from xAI with industry-leading speed and agentic tool calling capabilities","roles":["chat","edit"],"capabilities":["tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-08","cost":{"input":2,"output":6}},{"name":"Grok 4.20 (Reasoning)","model":"grok-4-20-reasoning","description":"Reasoning model from xAI with industry-leading speed and agentic tool calling capabilities","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-08","cost":{"input":2,"output":6}},{"name":"Claude Opus 4.8","model":"claude-opus-4-8","description":"Modest but tangible improvement over Claude Opus 4.7","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-05-28","cost":{"input":5,"output":25}},{"name":"Claude Sonnet 4.6","model":"claude-sonnet-4-6","description":"Anthropic Sonnet model for coding, agents, and professional work","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-02-17","cost":{"input":3,"output":15}},{"name":"DeepSeek-V4-Flash","model":"deepseek-v4-flash","description":"Efficiency-optimized Mixture-of-Experts model from DeepSeek with 284B total parameters and 13B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":0.19,"output":0.51}},{"name":"DeepSeek-V4-Pro","model":"deepseek-v4-pro","description":"Large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":1.74,"output":3.48}}],"ollama":[{"name":"DeepSeek V4.1 Flash","model":"deepseek-v4.1-flash","description":"Sparse Mixture-of-Experts model from DeepSeek built on a Causal Encoder-Decoder architecture","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-10"},{"name":"DeepSeek V4 Pro 0813","model":"deepseek-v4-pro:0813","description":"Large-scale Mixture-of-Experts model and generally available release of DeepSeek V4 Pro","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-12"},{"name":"GLM-5.3-Flash","model":"glm-5.3-flash","description":"Native multimodal model from Z.ai optimized for efficient coding and long-horizon agent tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-26"},{"name":"GLM-5.3","model":"glm-5.3","description":"Large-scale reasoning model from Z.ai built for complex software engineering and long-horizon agent tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-14"},{"name":"DeepSeek V4 Flash 0731","model":"deepseek-v4-flash:0731","description":"DeepSeek V4 Flash 0731 is a sparse mixture-of-experts model from DeepSeek, with 13B active parameters out of 284B total","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-07-31"},{"name":"kimi-k3","model":"kimi-k3","description":"Moonshot AI's 2.8T-parameter open-weight multimodal reasoning model for complex coding, knowledge work, and long-horizon agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-07-16"},{"name":"DeepSeek V4 Flash","model":"deepseek-v4-flash","description":"Efficiency-optimized Mixture-of-Experts model from DeepSeek with 284B total parameters and 13B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24"},{"name":"DeepSeek V4 Pro","model":"deepseek-v4-pro","description":"Large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24"},{"name":"Gemma 4 31B","model":"gemma4:31b","description":"Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-04-02"},{"name":"GLM 5.2","model":"glm-5.2","description":"Large-scale reasoning model from Z.ai with a 1M-token context window, suited for long-horizon agent workflows and project-level software engineering","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-13"},{"name":"MiniMax M3","model":"minimax-m3","description":"Multimodal foundation model from MiniMax with a 1M-token context window, suited for long-horizon agentic work and coding","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-05-31"},{"name":"MiniMax M2.7","model":"minimax-m2.7","description":"Large language model designed for autonomous, real-world productivity and continuous improvement","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-18"},{"name":"NVIDIA Nemotron 3 Ultra","model":"nemotron-3-ultra","description":"Open reasoning and orchestration model from NVIDIA with 55B active parameters out of 550B total (MoE)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-04"},{"name":"NVIDIA Nemotron 3 Super 120B","model":"nemotron-3-super","description":"120B-parameter open hybrid MoE model, activating just 12B parameters for maximum compute efficiency and accuracy in complex multi-agent applications","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-11"},{"name":"Qwen 3.5 397B","model":"qwen3.5:397b","description":"Built on a hybrid architecture that integrates a linear attention mechanism with a sparse mixture-of-experts model, achieving higher inference efficiency","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-02-15"}],"wandb":[{"name":"DeepSeek V4.1 Flash","model":"deepseek-ai/DeepSeek-V4.1-Flash","description":"Sparse Mixture-of-Experts model from DeepSeek built on a Causal Encoder-Decoder architecture","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-10","cost":{"input":0.2,"output":0.65}},{"name":"GLM 5.3 Flash","model":"zai-org/GLM-5.3-Flash","description":"Native multimodal model from Z.ai optimized for efficient coding and long-horizon agent tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-26","cost":{"input":0.15,"output":0.5}},{"name":"Granite 4.2 8B","model":"ibm-granite/granite-4.2-8b","description":"Dense reasoning model from IBM for mathematics, code generation, multilingual dialogue, and multi-step agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-24","cost":{"input":0.1,"output":0.15}},{"name":"DeepSeek V4 Pro 0813","model":"deepseek-ai/DeepSeek-V4-Pro-0813","description":"Large-scale Mixture-of-Experts model and generally available release of DeepSeek V4 Pro","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-13","cost":{"input":1.31,"output":3.96}},{"name":"Qwen3.8 27B","model":"Qwen/Qwen3.8-27B","description":"Alibaba's 27B dense multimodal model for coding, professional work, research, and long-horizon agentic tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-14","cost":{"input":0.4,"output":3}},{"name":"Nemotron 3.5 Lightning","model":"nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B","description":"MoE model built for fast, reliable agentic tasks across financial services, cybersecurity, telecom, and retail","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-11","cost":{"input":0.1,"output":0.25}},{"name":"DeepSeek V4 Flash 0731","model":"deepseek-ai/DeepSeek-V4-Flash-0731","description":"DeepSeek V4 Flash 0731 is a sparse mixture-of-experts model from DeepSeek, with 13B active parameters out of 284B total","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-07-31","cost":{"input":0.13,"output":0.28}},{"name":"MiniMax M3","model":"MiniMaxAI/MiniMax-M3","description":"Multimodal foundation model from MiniMax with a 1M-token context window, suited for long-horizon agentic work and coding","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-06-12","cost":{"input":0.23,"output":0.96}},{"name":"DeepSeek V4-Flash","model":"deepseek-ai/DeepSeek-V4-Flash","description":"DeepSeek V4-Flash is an MoE model with 1M context length great for coding, reasoning, and agentic workloads","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":0.14,"output":0.28}},{"name":"DeepSeek V4 Pro","model":"deepseek-ai/DeepSeek-V4-Pro","description":"DeepSeek V4-Pro is a 1.6T-parameter MoE model with 49B active parameters excelling at advanced reasoning, coding, and complex agentic workloads","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":1.15,"output":2.55}},{"name":"GLM 5.2","model":"zai-org/GLM-5.2","description":"GLM-5.2 is a Mixture-of-Experts language model featuring 40 billion activated parameters and a total of 744 billion parameters","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-16","cost":{"input":0.76,"output":2.42}},{"name":"Nemotron 3 Ultra","model":"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B","description":"Open reasoning and orchestration model from NVIDIA with 55B active parameters out of 550B total (MoE)","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-04","cost":{"input":0.75,"output":2.75}},{"name":"NVIDIA Nemotron 3 Super 120B","model":"nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-FP8","description":"120B-parameter open hybrid MoE model, activating just 12B parameters for maximum compute efficiency and accuracy in complex multi-agent applications","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-03-11","cost":{"input":0.2,"output":0.8}},{"name":"gpt-oss-120b","model":"openai/gpt-oss-120b","description":"Open-weight, 117B-parameter Mixture-of-Experts (MoE) language model from OpenAI designed for high-reasoning, agentic, and general-purpose production use cases","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2025-08-05","cost":{"input":0.04,"output":0.14}},{"name":"gpt-oss-20b","model":"openai/gpt-oss-20b","description":"Open-weight 21B parameter model released by OpenAI under the Apache 2.0 license","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2025-08-05","cost":{"input":0.03,"output":0.13}},{"name":"Mellum2 12B A2.5B","model":"JetBrains/Mellum2-12B-A2.5B-Instruct","description":"Mellum2-12B-A2.5B-Instruct is a fast MoE model with 131K context built for coding, tool use, and low-latency AI workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-01","cost":{"input":0.05,"output":0.1}}],"opencode-go":[{"name":"LongCat 2.5 Preview Free","model":"longcat-2.5-preview-free","description":"Multimodal reasoning model from Meituan for coding and agentic workflows, with a one-million-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-25","cost":{"input":0,"output":0}},{"name":"Space Bunny Free","model":"space-bunny-free","description":"Anonymous model with fast inference, strong coding capabilities, native multimodal input, and adjustable reasoning effort","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-23","cost":{"input":0,"output":0}},{"name":"GPT-6 Luna","model":"gpt-6-luna","description":"OpenAI's most efficient model for focused, high-volume tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.1,"output":0.5}},{"name":"MiMo-V2.6-Flash","model":"mimo-v2.6-flash","description":"Open-source Mixture-of-Experts foundation model from Xiaomi with 309B total parameters and 15B activated per token","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.14,"output":0.28}},{"name":"MiMo-V2.6-Pro","model":"mimo-v2.6-pro","description":"Xiaomi's flagship foundation model with over one trillion parameters, designed for demanding coding and agentic tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-22","cost":{"input":0.435,"output":0.87}},{"name":"DeepSeek V4.1 Flash","model":"deepseek-v4.1-flash","description":"Sparse Mixture-of-Experts model from DeepSeek built on a Causal Encoder-Decoder architecture","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-09-10","cost":{"input":0.15,"output":0.6}},{"name":"Muse Spark 1.3 Contributor","model":"muse-spark-1.3-contributor","description":"Cost-efficient contributor tier of Meta's multimodal reasoning model for experimentation, learning, and early-stage agentic, multi-agent, and coding workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-09-02","cost":{"input":0.1,"output":0.2}},{"name":"Hy4 preview","model":"hy4-preview","description":"Mixture-of-Experts model from Tencent designed for coding agents, complex tool use, and productivity tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-28","cost":{"input":0.834,"output":2.501}},{"name":"GLM-5.3-Flash (2x usage)","model":"glm-5.3-flash","description":"Native multimodal model from Z.ai optimized for efficient coding and long-horizon agent tasks","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-08-26","cost":{"input":0.075,"output":0.25}},{"name":"Qwen3.8 Flash","model":"qwen3.8-flash","description":"Multimodal reasoning model from Alibaba for coding, agentic workflows, visual understanding, document and codebase analysis, and desktop interaction","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-26","cost":{"input":0.15,"output":0.47}},{"name":"DeepSeek V4 Flash Vision Exp","model":"deepseek-v4-flash-vision-exp","description":"Experimental multimodal variant of DeepSeek V4 Flash that adds image understanding while retaining its text and agent capabilities","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-21","cost":{"input":0.22,"output":0.66}},{"name":"GLM-5.3","model":"glm-5.3","description":"Flagship GLM model for long-horizon coding, agents, and complex project delivery","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-08-14","cost":{"input":1.4,"output":4.4}},{"name":"Qwen3.8 Max","model":"qwen3.8-max","description":"Flagship multimodal reasoning model in Alibaba's Qwen3.8 series, intended for complex reasoning, visual understanding, and agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-08-03","cost":{"input":2,"output":6}},{"name":"GPT-5.6 Luna (2x usage)","model":"gpt-5.6-luna","description":"Fast, cost-efficient model in OpenAI's GPT-5.6 series, suited for high-volume, latency-sensitive chat and lightweight agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image","pdf"],"output_types":["text"],"release_date":"2026-07-09","cost":{"input":0.1,"output":0.6}},{"name":"Kimi K3 (2x usage)","model":"kimi-k3","description":"Moonshot AI's 2.8T-parameter open-weight multimodal reasoning model for complex coding, knowledge work, and long-horizon agentic workflows","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-07-16","cost":{"input":3,"output":15}},{"name":"DeepSeek V4 Flash","model":"deepseek-v4-flash","description":"Efficiency-optimized Mixture-of-Experts model from DeepSeek with 284B total parameters and 13B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":0.14,"output":0.28}},{"name":"DeepSeek V4 Pro","model":"deepseek-v4-pro","description":"Large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-04-24","cost":{"input":1.74,"output":3.48}},{"name":"GLM 5.2","model":"glm-5.2","description":"Large-scale reasoning model from Z.ai with a 1M-token context window, suited for long-horizon agent workflows and project-level software engineering","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-06-13","cost":{"input":1.4,"output":4.4}},{"name":"Qwen3.7 Plus","model":"qwen3.7-plus","description":"Cost-effective model in Alibaba's Qwen3.7 series supporting text and image input with upgraded text capabilities","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-06-02","cost":{"input":0.4,"output":1.6}},{"name":"Qwen3.7 Max","model":"qwen3.7-max","description":"Capable of writing and debugging code, and sustaining autonomous execution across hundreds or thousands of steps","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text"],"output_types":["text"],"release_date":"2026-05-21","cost":{"input":2.5,"output":7.5}},{"name":"MiniMax M3 (3x usage)","model":"minimax-m3","description":"Multimodal foundation model from MiniMax with a 1M-token context window, suited for long-horizon agentic work and coding","roles":["chat","edit"],"capabilities":["thinking","tool_calling"],"input_types":["text","image"],"output_types":["text"],"release_date":"2026-05-31","cost":{"input":0.1,"output":0.4}}]}`),Ws=[{name:`OpenAI`,id:`openai`,description:`OpenAI's API for GPT models, including GPT-3.5 and GPT-4.`,url:`https://platform.openai.com/`},{name:`GitHub Copilot`,id:`github`,description:`GitHub Copilot provides model inference through a Copilot subscription.`,url:`https://pydantic.dev/docs/ai/models/github-copilot/`},{name:`Amazon Bedrock`,id:`bedrock`,description:`Amazon Bedrock provides access to foundation models from Amazon and leading AI startups via a unified API.`,url:`https://aws.amazon.com/bedrock/`},{name:`Azure`,id:`azure`,description:`Azure provides access to models via the Azure cloud.`,url:`https://azure.microsoft.com/en-us/products/ai-services/`},{name:`Anthropic`,id:`anthropic`,description:`Anthropic's Claude models for conversational and completion tasks.`,url:`https://www.anthropic.com/`},{name:`Google AI`,id:`google`,description:`Google's Vertex AI and PaLM APIs for generative and conversational models.`,url:`https://cloud.google.com/vertex-ai/docs/generative-ai/learn/overview`},{name:`Ollama`,id:`ollama`,description:`Ollama is a lightweight, open-source model server for running and sharing LLMs.`,url:`https://ollama.ai/`},{name:`marimo`,id:`marimo`,description:`marimo's hosted models.`,url:`https://docs.marimo.io/guides/editor_features/ai_completion/`},{name:`DeepSeek`,id:`deepseek`,description:`DeepSeek's API for GPT models.`,url:`https://deepseek.com/`},{name:`LM Studio`,id:`lmstudio`,description:`LM Studio's API for GPT models.`,url:`https://lmstudio.ai/`},{name:`OpenRouter`,id:`openrouter`,description:`OpenRouter's API for GPT models.`,url:`https://openrouter.ai/`},{name:`Mistral`,id:`mistral`,description:`Mistral's API for GPT models.`,url:`https://mistral.ai/`},{name:`Vercel v0`,id:`vercel`,description:`Vercel's API for GPT models.`,url:`https://vercel.com/`},{name:`Together AI`,id:`together`,description:`Together AI's API for GPT models.`,url:`https://together.ai/`},{name:`xAI`,id:`xai`,description:`xAI's API for GPT models.`,url:`https://x.ai/`},{name:`Weights & Biases`,id:`wandb`,description:`Weights & Biases' hosted models for ML development and AI inference.`,url:`https://wandb.ai/`},{name:`OpenCode Go`,id:`opencode-go`,description:`Low-cost subscription for reliable access to popular open coding models.`,url:`https://opencode.ai/docs/go/`}],Gs=Us,Ks=Ws,qs=Hn(()=>{let e=new Map,t=new Map;for(let[n,r]of Object.entries(Gs)){if(!r)continue;let i=n;for(let n of r){let r=n.model,a={...n,model:r,provider:i,custom:!1},o=`${i}/${r}`;e.set(o,a),(a.roles.includes(`chat`)||a.roles.includes(`edit`))&&!t.has(i)&&t.set(i,o)}}return{modelMap:e,defaultModelByProvider:t}}),Js=Hn(()=>{let e=new Map,t=new Map;return Ks.forEach((n,r)=>{e.set(n.id,n),t.set(n.id,r)}),{providerMap:e,providerToOrderIdx:t}}),Ys=class e{modelsByProviderMap=new He;modelsMap;customModels;displayedModels;constructor(e,t){this.customModels=new Set(e),this.displayedModels=new Set(t),this.modelsMap=new Map,this.buildMaps()}static getProviderInfo(e){let{providerMap:t}=Js();return t.get(e)}static create(t){let{customModels:n=[],displayedModels:r=[]}=t;return new e(n.map(e=>Bs.parse(e).id),r.map(e=>Bs.parse(e).id))}buildMaps(){let t=e.buildMapsFromConfig({displayedModels:this.displayedModels,customModels:this.customModels});t.modelsMap.size===0&&(K.error(`The configured displayed_models have filtered out all registered models. Reverting back to showing all models.`,[...this.displayedModels]),t=e.buildMapsFromConfig({displayedModels:new Set,customModels:this.customModels})),this.modelsByProviderMap=t.modelsByProviderMap,this.modelsMap=t.modelsMap}static buildMapsFromConfig(e){let{displayedModels:t,customModels:n}=e,r=t.size>0,i=qs().modelMap,a=new Map,o=new Map,s=new He;for(let e of n){if(r&&!t.has(e))continue;let n=Bs.parse(e),i={name:n.shortModelId,model:n.shortModelId,description:`Custom model`,provider:n.providerId,roles:[],capabilities:[],input_types:[],output_types:[],release_date:`1970-01-01`,custom:!0};a.set(e,i)}if(r)for(let e of t){let t=i.get(e);t&&o.set(e,t)}else o=new Map(i);o=new Map([...a,...o]);for(let[e,t]of o.entries()){let n=Bs.parse(e);s.add(n.providerId,t)}return{modelsByProviderMap:s,modelsMap:o}}getDisplayedModels(){return this.displayedModels}getCustomModels(){return this.customModels}getModelsByProvider(e){return this.modelsByProviderMap.get(e)||[]}getGroupedModelsByProvider(){return this.modelsByProviderMap}getListModelsByProvider(){let e=[...this.getGroupedModelsByProvider().entries()],t=Js().providerToOrderIdx;return e.sort((e,n)=>{let r=e[0],i=n[0];return(t.get(r)??0)-(t.get(i)??0)}),e}getModelsMap(){return this.modelsMap}getModel(e){return this.modelsMap.get(e)}},Xs=Ne(`marimo:accept-completion-on-enter`,!0,T,{getOnInit:!0});function Zs(e){`scheduler`in window?window.scheduler.postTask(e,{priority:`background`}):`requestIdleCallback`in window?requestIdleCallback(e):setTimeout(e,0)}var Qs=null,$s=class{view;abortController=new AbortController;constructor(e){this.view=e.view,this.view.dom.addEventListener(`focus`,()=>{Qs=new WeakRef(this.view)},{signal:this.abortController.signal,capture:!0}),this.update()}update(){let e=this.view.dom.querySelector(`.cm-vimCursorLayer`);if(e instanceof HTMLElement){if(v())e.style.display=`none`;else{let t=Qs?.deref()===this.view;e.style.display=t?``:`none`}}}destroy(){this.abortController.abort()}},ec={map:{args:[`lhs`,`rhs`]},nmap:{mode:`normal`,args:[`lhs`,`rhs`]},vmap:{mode:`visual`,args:[`lhs`,`rhs`]},imap:{mode:`insert`,args:[`lhs`,`rhs`]},noremap:{args:[`lhs`,`rhs`]},nnoremap:{mode:`normal`,args:[`lhs`,`rhs`]},vnoremap:{mode:`visual`,args:[`lhs`,`rhs`]},inoremap:{mode:`insert`,args:[`lhs`,`rhs`]},unmap:{args:[`lhs`]},nunmap:{mode:`normal`,args:[`lhs`]},vunmap:{mode:`visual`,args:[`lhs`]},iunmap:{mode:`insert`,args:[`lhs`]},mapclear:{},nmapclear:{mode:`normal`},vmapclear:{mode:`visual`},imapclear:{mode:`insert`}};function tc(e,t){let n=[];for(let r of e.split(`
2
2
  `)){if(r.startsWith(`"`)||r.trim()===``)continue;let e=nc(r,t);e&&n.push(e)}return n}function nc(e,t){let n=e.split(/\s+/),r=n[0],i=0;if(r in ec){let a=ec[r],o={};for(let s of a.args||[])if(i+=1,i<n.length)o[s]=n[i];else{t&&t(`Not enough arguments for "${r}" command: "${e}"`);return}let s={name:r};return`args`in a&&(s.args=o),`mode`in a&&(s.mode=a.mode),s}t&&t(`Unknown vimrc command: "${e}"`)}function rc(){return ac(),oc(),[Cn.of([{key:`j`,run:e=>{if(ie(e,!0)&&W(e)){let t=e.state.facet(u),n=e.state.facet(R);return t.moveToNextCell({cellId:n,before:!1,noCreate:!0}),!0}return!1}}]),Cn.of([{key:`k`,run:e=>{if(O(e)&&W(e)){let t=e.state.facet(u),n=e.state.facet(R);return t.moveToNextCell({cellId:n,before:!0,noCreate:!0}),!0}return!1}}]),Cn.of([{linux:`Ctrl-[`,win:`Ctrl-[`,run:e=>{let t=B(e);return t?dc(t)?t.state.vim.insertMode?(C.exitInsertMode(t,!0),!0):!1:(K.warn(`Expected CodeMirror instance to have Vim state`),!1):(K.warn(`Expected CodeMirror instance to have CodeMirror instance state`),!1)}}]),En.define(e=>(requestAnimationFrame(()=>{uc.INSTANCES.addInstance(e)}),{destroy(){uc.INSTANCES.removeInstance(e)}})),En.define(e=>new $s({view:e})),Tn.domEventHandlers({keydown(e,t){return e.ctrlKey&&e.key===`Escape`?(t.dom.dispatchEvent(new KeyboardEvent(e.type,e)),!0):!1}})]}function ic(e,t){let n=e.cm6;if(!n)return;let r=n.coordsAtPos(n.state.selection.main.head);if(!r)return;let i=document.getElementById(`App`);if(!i)return;let a=i.clientHeight,o;switch(t){case`center`:o=(r.top+r.bottom)/2-a/2;break;case`start`:o=r.top;break;case`end`:o=r.bottom-a}i.scrollBy({top:o,behavior:`smooth`})}var ac=Hn(()=>{C.defineAction(`goToDefinition`,e=>{let t=e.cm6;return P(t)}),C.mapCommand(`gd`,`action`,`goToDefinition`,{},{context:`normal`}),C.defineAction(`scrollCursorToCenter`,e=>ic(e,`center`)),C.mapCommand(`zz`,`action`,`scrollCursorToCenter`,{},{context:`normal`}),C.defineAction(`scrollCursorToTop`,e=>ic(e,`start`)),C.mapCommand(`zt`,`action`,`scrollCursorToTop`,{},{context:`normal`}),C.defineAction(`scrollCursorToBottom`,e=>ic(e,`end`)),C.mapCommand(`zb`,`action`,`scrollCursorToBottom`,{},{context:`normal`}),C.defineEx(`write`,`w`,e=>{let t=e.cm6;t&&t.state.facet(u).saveNotebook()})}),oc=Hn(async()=>{let e=o.get(be).keymap?.vimrc;if(e)try{K.log(`Loading vimrc from ${e}`);let t=(await Jn().sendFileDetails({path:e})).contents;if(!t){K.error(`Failed to load vimrc from ${e}`);return}sc(tc(t,K.warn))}catch(e){K.error(`Failed to load vimrc:`,e)}});function sc(e){function t(e){if(!e.args){K.warn(`Could not execute vimrc command "${e.name}: expected arguments"`);return}if(!e.args.lhs||!e.args.rhs){K.warn(`Could not execute vimrc command "${e.name}: expected arguments"`);return}e.mode?C.map(e.args.lhs,e.args.rhs,e.mode):C.map(e.args.lhs,e.args.rhs)}function n(e){if(!e.args){K.warn(`Could not execute vimrc command "${e.name}: expected arguments"`);return}if(!e.args.lhs||!e.args.rhs){K.warn(`Could not execute vimrc command "${e.name}: expected arguments"`);return}e.mode?C.noremap(e.args.lhs,e.args.rhs,e.mode):C.noremap(e.args.lhs,e.args.rhs)}function r(e){if(!e.args){K.warn(`Could not execute vimrc command "${e.name}: expected arguments"`);return}if(!e.args.lhs){K.warn(`Could not execute vimrc command "${e.name}: expected arguments"`);return}e.mode?C.unmap(e.args.lhs,e.mode):C.unmap(e.args.lhs)}function i(e){e.mode?C.mapclear(e.mode):C.mapclear()}for(let a of e)`map|nmap|vmap|imap`.split(`|`).includes(a.name)?t(a):`noremap|nnoremap|vnoremap|inoremap`.split(`|`).includes(a.name)?n(a):`unmap|nunmap|vunmap|iunmap`.split(`|`).includes(a.name)?r(a):`mapclear|nmapclear|vmapclear|imapclear`.split(`|`).includes(a.name)?i(a):K.warn(`Could not execute vimrc command "${a.name}: unknown command"`)}function cc(e){return`getVimGlobalState_`in e&&typeof e.getVimGlobalState_==`function`}function lc(){if(!cc(C))return!1;let e=C.getVimGlobalState_()?.macroModeState;return e?!!(e.isRecording||e.isPlaying):!1}var uc=class e{instances=new Set;isBroadcasting=!1;static INSTANCES=new e;constructor(){}addInstance(e){this.instances.add(e);let t=B(e);if(!t){K.warn(`Expected CodeMirror instance to have CodeMirror instance state`);return}t.on(`vim-mode-change`,t=>{if(this.isBroadcasting)return;Oe(`mode`in t,`Expected event to have a "mode" property`);let n=lc();this.isBroadcasting=!0,Zs(()=>{n||this.broadcastModeChange(e,t.mode,t.subMode),this.isBroadcasting=!1})})}removeInstance(e){this.instances.delete(e)}broadcastModeChange(e,t,n){Oe(`exitInsertMode`in C,`Vim does not have an exitInsertMode method`),Oe(`exitVisualMode`in C,`Vim does not have an exitVisualMode method`);for(let n of this.instances)if(n!==e){let e=B(n);if(!e){K.warn(`Expected CodeMirror instance to have CodeMirror instance state`);continue}let r=e.setSelections.bind(e);if(e.setSelections=()=>[],!dc(e)){K.warn(`Expected CodeMirror instance to have Vim state`);continue}let i=e.state.vim;switch(t){case`normal`:i.insertMode&&C.exitInsertMode(e,!0),i.visualMode&&C.exitVisualMode(e,!0);break;case`insert`:i.insertMode||C.handleKey(e,`i`,`mapping`)}e.setSelections=r}}};function dc(e){return e.state.vim!==void 0}var fc=[`default`,`vim`];function pc(e,t){switch(e.preset){case`default`:return[Cn.of(hc()),Cn.of(gc(t))];case`vim`:return[Cn.of(_c()),Cn.of(gc(t)),Cn.of([{key:`Enter`,run:e=>B(e)?.state.vim?.insertMode?Ln(e):!1}]),wn.high(vc(`d`,e=>e.state.doc.toString()===``,e=>e.state.doc.toString()===``&&(e.state.facet(u).deleteCell(),!0))),Cn.of(bc()),m({status:!1}),wn.high(rc())];default:return Un(e.preset),[]}}var mc=new Set([Mn,On,Rn,Pn]),hc=Hn(()=>zn.filter(e=>!mc.has(e.run))),gc=e=>[{key:e.getHotkey(`cell.toggleComment`).key,run:Mn},{key:e.getHotkey(`cell.toggleBlockComment`).key,run:On},{key:e.getHotkey(`cell.copyLineUp`).key,run:Rn},{key:e.getHotkey(`cell.copyLineDown`).key,run:Pn}],_c=Hn(()=>{let e=new Set([`Enter`,`Ctrl-v`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);return hc().filter(t=>!e.has(t.key||t.mac||t.linux||t.win||``))});function vc(e,t,n){let r=``,i=0;return Cn.of([{any:(a,o)=>{let s=o.key,c=o.timeStamp;return s!==e||!t(a)?(r=``,i=0,!1):r===e&&c-i<500&&n(a)?(r=``,i=0,!0):(r=s,i=c,!1)}}])}function yc(e){return e?.state.vim?.visualMode===!0}function bc(){let e=e=>t=>!yc(B(t))&&e(t);return[{key:`ArrowDown`,run:e(Bn),shift:e(jn)},{key:`ArrowUp`,run:e(Nn),shift:e(Dn)},{key:`ArrowLeft`,run:e(In),shift:e(kn)},{key:`ArrowRight`,run:e(Fn),shift:e(An)}]}function xc(){return[`compact`,`medium`,`full`,`columns`]}var Sc={openai:e=>!!e?.open_ai?.api_key,github:e=>!!e?.github?.api_key,anthropic:e=>!!e?.anthropic?.api_key,google:e=>!!e?.google?.api_key,openrouter:e=>!!e?.openrouter?.api_key,azure:e=>!!(e?.azure?.api_key&&e?.azure?.base_url),wandb:e=>!!e?.wandb?.api_key,"opencode-go":e=>!!e?.opencode_go?.api_key,bedrock:e=>!!e?.bedrock?.region_name,ollama:e=>!!e?.ollama?.base_url,deepseek:()=>!1,marimo:e=>!!e?.open_ai_compatible?.base_url};function Cc(e){let t=zs.filter(t=>Sc[t](e)),n=Object.entries(e?.custom_providers??{}).filter(([,e])=>!!e?.base_url).map(([e])=>e);return[...t,...n]}function wc(e,t){let n=new Set(Cc(t));return e.filter(([e])=>n.has(e))}function Tc(e,t){return t?.allow_provider_config===!1?wc(e,t):[...e]}function Ec(e){let t=Cc(e)[0];if(t)return qs().defaultModelByProvider.get(t)}function Dc(e){let t={chatModel:void 0,editModel:void 0},n=!e?.models?.chat_model,r=!e?.models?.edit_model;if(!n&&!r)return t;let i=Ec(e);return i?(n&&(t.chatModel=i),r&&(t.editModel=i),t):t}var Y=oe();function Oc(e){return e.toLowerCase().replaceAll(`+`,`-`).trim()}function kc(e,t){let n=e.getHotkeyGroups(),r=t?new Set(n[t]||[]):new Set,i=new Map;for(let t of e.iterate()){if(r.has(t))continue;let n=e.getHotkey(t);if(!n.key||n.key.trim()===``)continue;let a=Oc(n.key);i.has(a)||i.set(a,[]);let o=i.get(a);o&&o.push({action:t,name:n.name})}let a=[],o=new Set;for(let[e,t]of i.entries())if(t.length>1){a.push({key:e,actions:t});for(let{action:e}of t)o.add(e)}return{duplicates:a,hasDuplicate:e=>o.has(e),getDuplicatesFor:t=>{let n=e.getHotkey(t);if(!n.key||n.key.trim()===``)return[];let r=Oc(n.key),i=a.find(e=>e.key===r);return!i||i.actions.length<=1?[]:i.actions.filter(e=>e.action!==t).map(e=>e.action)}}}function Ac(e,t){let n=(0,Y.c)(3),r;return n[0]!==e||n[1]!==t?(r=kc(e,t),n[0]=e,n[1]=t,n[2]=r):r=n[2],r}var jc=i({});function Mc(){return a(jc)}function Nc(){let e=c(jc);return{registerAction:s((t,n)=>{e(e=>({...e,[t]:n}))}),unregisterAction:s(t=>{e(e=>{let{[t]:n,...r}=e;return r})})}}function Pc(e,t,n){let r=(0,Y.c)(17),i;r[0]===n?i=r[1]:(i=n===void 0?{}:n,r[0]=n,r[1]=i);let{disabled:o}=i,c=o!==void 0&&o,{registerAction:l,unregisterAction:u}=Nc(),d=a(pe),f=t===Ce.NOOP,p;r[2]===t?p=r[3]:(p=e=>t(e),r[2]=t,r[3]=p);let m=s(p),h;r[4]!==t||r[5]!==c||r[6]!==d||r[7]!==e?(h=n=>{if(c||n.defaultPrevented)return;let r=d.getHotkey(e).key;Ee(r)(n)&&t(n)!==!1&&(n.preventDefault(),n.stopPropagation())},r[4]=t,r[5]=c,r[6]=d,r[7]=e,r[8]=h):h=r[8];let g=s(h);De(document,`keydown`,g);let _,v;r[9]!==c||r[10]!==f||r[11]!==m||r[12]!==l||r[13]!==e||r[14]!==u?(_=()=>{if(!f&&!c)return l(e,m),()=>u(e)},v=[m,e,f,c,l,u],r[9]=c,r[10]=f,r[11]=m,r[12]=l,r[13]=e,r[14]=u,r[15]=_,r[16]=v):(_=r[15],v=r[16]),(0,J.useEffect)(_,v)}var X=ze(),Fc=e=>{let t=(0,Y.c)(7),{duplicates:n}=e;if(n.length===0)return null;let r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(kr,{className:`h-4 w-4`}),i=(0,X.jsx)(ur,{children:`Duplicate shortcuts`}),t[0]=r,t[1]=i):(r=t[0],i=t[1]);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsx)(`p`,{className:`mb-2`,children:`Multiple actions are assigned to the same keyboard shortcut:`}),t[2]=a):a=t[2];let o;t[3]===n?o=t[4]:(o=n.map(Lc),t[3]=n,t[4]=o);let s;return t[5]===o?s=t[6]:(s=(0,X.jsxs)(gr,{variant:`warning`,className:`mb-4`,children:[r,i,(0,X.jsxs)(or,{children:[a,(0,X.jsx)(`ul`,{className:`space-y-2`,children:o})]})]}),t[5]=o,t[6]=s),s};function Ic(e){let{action:t,name:n}=e;return(0,X.jsx)(`li`,{children:n},t)}function Lc(e){let{key:t,actions:n}=e;return(0,X.jsxs)(`li`,{className:`text-xs`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,X.jsx)(Rr,{shortcut:t}),(0,X.jsx)(`span`,{className:`font-semibold`,children:`is used by:`})]}),(0,X.jsx)(`ul`,{className:`ml-6 list-disc`,children:n.map(Ic)})]},t)}var Rc=i(!1),zc=()=>{let e=(0,Y.c)(89),[t,n]=r(Rc),[i,o]=(0,J.useState)(null),s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=[],e[0]=s):s=e[0];let[c,l]=(0,J.useState)(s),[u,d]=de(),f=a(pe),{saveUserConfig:p}=qn(),{duplicates:m,hasDuplicate:h,getDuplicatesFor:g}=Ac(f,`Markdown`),_;e[1]===n?_=e[2]:(_=()=>n(Bc),e[1]=n,e[2]=_),Pc(`global.showHelp`,_);let v;e[3]!==u||e[4]!==p||e[5]!==d?(v=async e=>{let t={...u};d(t=>({...t,...e})),await p({config:e}).catch(e=>{throw d(t),e})},e[3]=u,e[4]=p,e[5]=d,e[6]=v):v=e[6];let y=v,b;e[7]!==u||e[8]!==i||e[9]!==y?(b=async e=>{if(!i)return;let t=e.join(`-`),n={keymap:{...u.keymap,overrides:{...u.keymap.overrides,[i]:t}}};o(null),l([]),await y(n)},e[7]=u,e[8]=i,e[9]=y,e[10]=b):b=e[10];let S=b,C;e[11]!==u||e[12]!==i||e[13]!==y?(C=async()=>{if(!i)return;let e={keymap:{...u.keymap,overrides:{...u.keymap.overrides}}};delete e.keymap.overrides[i],o(null),l([]),await y(e)},e[11]=u,e[12]=i,e[13]=y,e[14]=C):C=e[14];let w=C,T;e[15]!==u||e[16]!==y?(T=async()=>{if(!window.confirm(`Are you sure you want to reset all shortcuts to their default values?`))return;let e={keymap:{...u.keymap,overrides:{}}};o(null),l([]),await y(e)},e[15]=u,e[16]=y,e[17]=T):T=e[17];let E=T;if(!t)return null;let D;e[18]!==i||e[19]!==g||e[20]!==S||e[21]!==w||e[22]!==h||e[23]!==f||e[24]!==c?(D=e=>{let t=f.getHotkey(e);if(i===e){let n=Te(e);return(0,X.jsxs)(`div`,{children:[(0,X.jsx)(pn,{defaultValue:c.join(`+`),placeholder:t.name,onKeyDown:e=>{e.preventDefault();let t=[];if(e.key===`Meta`||e.key===`Control`||e.key===`Alt`||e.key===`Shift`||(e.metaKey&&t.push(we()?`Cmd`:`Meta`),e.ctrlKey&&t.push(`Ctrl`),e.altKey&&t.push(`Alt`),e.shiftKey&&t.push(`Shift`),e.key===`-`))return;if(e.key===`Escape`&&t.length===0){o(null),l([]);return}let n=e.key.length===1?e.key.toLowerCase():e.key;e.key===` `&&(n=`Space`),t.push(n),S(t)},autoFocus:!0,endAdornment:(0,X.jsx)(q,{variant:`text`,size:`xs`,className:`mb-0`,onClick:()=>{o(null),l([])},children:(0,X.jsx)(mt,{className:`w-4 h-4`})})}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Press a key combination`}),n.key!==t.key&&(0,X.jsxs)(`span`,{className:`text-xs cursor-pointer text-primary`,onClick:w,children:[`Reset to default:`,` `,(0,X.jsx)(`span`,{className:`font-mono`,children:n.key})]})]})]},e)}let n=h(e),r=n?g(e):[];return(0,X.jsxs)(`div`,{className:`grid grid-cols-[auto_2fr_3fr] gap-2 items-center`,children:[f.isEditable(e)?(0,X.jsx)(x,{className:`cursor-pointer opacity-60 hover:opacity-100 text-muted-foreground w-3 h-3`,onClick:()=>{l([]),o(e)}}):(0,X.jsx)(`div`,{className:`w-3 h-3`}),(0,X.jsx)(Rr,{className:`justify-end`,shortcut:t.key}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(`span`,{children:t.name.toLowerCase()}),n&&(0,X.jsxs)(`div`,{className:`group relative inline-flex`,children:[(0,X.jsx)(kr,{className:`w-3 h-3 text-(--yellow-11)`}),(0,X.jsxs)(`div`,{className:`invisible group-hover:visible absolute left-0 top-5 z-10 w-max max-w-xs rounded-md bg-(--yellow-2) border border-(--yellow-7) p-2 text-xs text-(--yellow-11) shadow-md`,children:[`Also used by:`,` `,r.map(e=>f.getHotkey(e).name.toLowerCase()).join(`, `)]})]})]})]},e)},e[18]=i,e[19]=g,e[20]=S,e[21]=w,e[22]=h,e[23]=f,e[24]=c,e[25]=D):D=e[25];let O=D,k,A,j,M,N,P,F,I,L,R,z,B,V,H,ee,U,te,ne,re;if(e[26]!==u.keymap.preset||e[27]!==m||e[28]!==f||e[29]!==t||e[30]!==O||e[31]!==n){let r=f.getHotkeyGroups(),i=(e,t)=>{let n=r[e];return(0,X.jsxs)(`div`,{className:`mb-[40px] gap-2 flex flex-col`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-lg font-medium`,children:e}),t]}),n.map(O)]})};j=Ut,ee=t,e[51]===n?U=e[52]:(U=e=>n(e),e[51]=n,e[52]=U),A=Yt,V=`sm:items-center sm:top-0`,e[53]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,X.jsx)(jt,{}),e[53]=H):H=e[53],k=Kt,L=!1,R=`max-h-screen sm:max-h-[90vh] overflow-y-auto sm:max-w-[850px]`,e[54]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,X.jsx)(fn,{children:(0,X.jsx)(Jt,{children:`Shortcuts`})}),e[54]=z):z=e[54],e[55]===m?B=e[56]:(B=(0,X.jsx)(Fc,{duplicates:m}),e[55]=m,e[56]=B),F=`flex flex-row gap-3`,I=(0,X.jsxs)(`div`,{className:`w-1/2`,children:[i(`Editing`),i(`Markdown`)]}),te=`w-1/2`,ne=i(`Navigation`),re=i(`Running Cells`),M=i(`Creation and Ordering`),N=(e=>i(e,(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground flex items-center gap-1`,children:[`Press`,` `,u.keymap.preset===`vim`?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Rr,{shortcut:we()?`Cmd`:`Ctrl`}),(0,X.jsx)(mr,{children:`Esc`})]}):(0,X.jsx)(mr,{children:`Esc`}),` `,`in a cell to enter command mode`]})))(`Command`),P=i(`Other`),e[26]=u.keymap.preset,e[27]=m,e[28]=f,e[29]=t,e[30]=O,e[31]=n,e[32]=k,e[33]=A,e[34]=j,e[35]=M,e[36]=N,e[37]=P,e[38]=F,e[39]=I,e[40]=L,e[41]=R,e[42]=z,e[43]=B,e[44]=V,e[45]=H,e[46]=ee,e[47]=U,e[48]=te,e[49]=ne,e[50]=re}else k=e[32],A=e[33],j=e[34],M=e[35],N=e[36],P=e[37],F=e[38],I=e[39],L=e[40],R=e[41],z=e[42],B=e[43],V=e[44],H=e[45],ee=e[46],U=e[47],te=e[48],ne=e[49],re=e[50];let W;e[57]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,X.jsx)(`span`,{className:`text-destructive`,children:`Reset all to default`}),e[57]=W):W=e[57];let ie;e[58]===E?ie=e[59]:(ie=(0,X.jsx)(q,{className:`mt-4 hover:bg-destructive/10 border-destructive hover:border-destructive`,variant:`outline`,size:`xs`,onClick:E,tabIndex:-1,children:W}),e[58]=E,e[59]=ie);let ae;e[60]!==M||e[61]!==N||e[62]!==P||e[63]!==ie||e[64]!==te||e[65]!==ne||e[66]!==re?(ae=(0,X.jsxs)(`div`,{className:te,children:[ne,re,M,N,P,ie]}),e[60]=M,e[61]=N,e[62]=P,e[63]=ie,e[64]=te,e[65]=ne,e[66]=re,e[67]=ae):ae=e[67];let G;e[68]!==F||e[69]!==I||e[70]!==ae?(G=(0,X.jsxs)(`div`,{className:F,children:[I,ae]}),e[68]=F,e[69]=I,e[70]=ae,e[71]=G):G=e[71];let oe;e[72]!==k||e[73]!==L||e[74]!==R||e[75]!==z||e[76]!==B||e[77]!==G?(oe=(0,X.jsxs)(k,{usePortal:L,className:R,children:[z,B,G]}),e[72]=k,e[73]=L,e[74]=R,e[75]=z,e[76]=B,e[77]=G,e[78]=oe):oe=e[78];let se;e[79]!==A||e[80]!==V||e[81]!==H||e[82]!==oe?(se=(0,X.jsxs)(A,{className:V,children:[H,oe]}),e[79]=A,e[80]=V,e[81]=H,e[82]=oe,e[83]=se):se=e[83];let ce;return e[84]!==j||e[85]!==ee||e[86]!==U||e[87]!==se?(ce=(0,X.jsx)(j,{open:ee,onOpenChange:U,children:se}),e[84]=j,e[85]=ee,e[86]=U,e[87]=se,e[88]=ce):ce=e[88],ce};function Bc(e){return!e}var Vc=`marimo:copilot:signedIn`,Hc=Ne(Vc,null,T,{getOnInit:!0}),Uc=i(null),Wc=i(null),Gc=i({busy:!1,kind:null,message:null});function Kc(e){o.set(Wc,e)}function qc(e){o.get(Wc)===e&&o.set(Wc,null)}function Jc(){return b.getItem(Vc)===`true`}function Yc(){let e=Jc(),t=_e();return e&&t.completion.copilot===`github`}function Xc(){return n(be,e=>e.completion.copilot===`github`)}var Zc=g(),Qc=K.get(`@github/copilot-language-server`),$c=1e4,el=`python`;function tl(e){Oe(d(e)&&w(e,`request`)&&w(e,`notify`),`LanguageServerClient is missing request/notify`)}function nl(e){if(!d(e))return null;let{busy:t,kind:n,message:r,status:i}=e;return{busy:typeof t==`boolean`&&t,kind:typeof n==`string`?n:null,message:typeof r==`string`?r:null,status:typeof i==`string`?i:void 0}}function rl(e){return d(e)&&typeof e.type==`number`&&typeof e.message==`string`}var il=class extends D{documentVersion=0;openDocumentCount=0;lastOpenedDocument;copilotSettings={};constructor(e){super(e),this.copilotSettings=e.copilotSettings??{},this.onNotification(this.handleNotification),this.attachInitializeListener()}attachInitializeListener(){this.initializePromise.then(()=>this.sendConfiguration()).catch(e=>{Qc.warn(`#initialize: Failed to send configuration`,e)})}async reInitialize(){Qc.log(`#reInitialize: Re-initializing LSP connection`),this.initializePromise=this.initialize(),await this.initializePromise,await this.sendConfiguration(),this.openDocumentCount>0&&this.lastOpenedDocument&&await this.sendNotification(`textDocument/didOpen`,this.lastOpenedDocument)}async sendConfiguration(){let e=this.copilotSettings;!e||Object.keys(e).length===0||(await this.sendNotification(`workspace/didChangeConfiguration`,{settings:e}),Qc.debug(`#sendConfiguration: Configuration sent`,e))}async _request(e,t){return tl(this),await this.request(e,t,$c)}async sendNotification(e,t){return Qc.debug(`#notify`,e,t),tl(this),this.notify(e,t)}getInitializationOptions(){let e={name:`marimo`,version:`0.1.0`};return{...super.getInitializationOptions(),workspaceFolders:[],capabilities:{workspace:{workspaceFolders:!1}},initializationOptions:{editorInfo:e,editorPluginInfo:e}}}isDisabled(){return!Yc()}async textDocumentDidOpen(e){return!this.isDisabled()&&(this.openDocumentCount++,this.lastOpenedDocument=e,this.documentVersion=Math.max(this.documentVersion,e.textDocument.version),super.textDocumentDidOpen(e))}async textDocumentDidClose(e){if(this.openDocumentCount!==0)return this.openDocumentCount--,super.textDocumentDidClose(e)}async textDocumentCompletion(e){return[]}async textDocumentDidChange(e){if(this.isDisabled())return;let t=e.contentChanges[0];if(!t){Qc.warn(`#textDocumentDidChange: Ignoring an update with no content changes.`,e);return}this.openDocumentCount===0&&await this.textDocumentDidOpen({textDocument:{uri:e.textDocument.uri,languageId:el,version:e.textDocument.version,text:t.text}});let n=e.contentChanges;n.length!==1&&Qc.warn(`#textDocumentDidChange: Multiple changes detected. This is not supported.`,n),`range`in t&&Qc.warn(`#textDocumentDidChange: Copilot doesn't support range changes.`,t);let r=M(t.text),i=++this.documentVersion;return this.lastOpenedDocument={textDocument:{uri:e.textDocument.uri,languageId:this.lastOpenedDocument?.textDocument.languageId??el,version:i,text:r}},super.textDocumentDidChange({...e,contentChanges:[{text:r}],textDocument:Zc.VersionedTextDocumentIdentifier.create(e.textDocument.uri,i)})}textDocumentHover(e){return Promise.resolve({contents:[]})}signOut(){return this._request(`signOut`,{})}async signInInitiate(){Qc.log(`#signInInitiate: Starting sign-in flow`);try{let e=await this._request(`signIn`,{});return Qc.log(`#signInInitiate: Sign-in flow started successfully`),e}catch(e){throw Qc.warn(`#signInInitiate: Failed to start sign-in flow`,e),e}}async signInConfirm(e){Qc.log(`#signInConfirm: Confirming sign-in`);try{let t=await this._request(`signInConfirm`,e);return Qc.log(`#signInConfirm: Sign-in confirmed successfully`),t}catch(e){throw Qc.warn(`#signInConfirm: Failed to confirm sign-in`,e),e}}async signedIn(){try{let{status:e}=await this._request(`checkStatus`,{});return Qc.log(`#checkStatus: Status check completed`,{status:e}),e===`SignedIn`||e===`AlreadySignedIn`||e===`OK`}catch(e){throw Qc.warn(`#signedIn: Failed to check sign-in status`,e),e}}getCompletionInternal=async(e,t)=>await this._request(`textDocument/inlineCompletion`,{...e,textDocument:{...Zc.VersionedTextDocumentIdentifier.create(e.textDocument.uri,t)}});throttledGetCompletionInternal=Jr(this.getCompletionInternal,200);async getCompletion(e){if(this.isDisabled())return null;let t=this.documentVersion;if(t===0)return null;Kc(t);let n;try{n=await this.throttledGetCompletionInternal({...e,textDocument:Zc.VersionedTextDocumentIdentifier.create(e.textDocument.uri,t)},t)}catch(e){return Qc.warn(`#getCompletion: Failed to fetch completions`,e),null}finally{qc(t)}return t===this.documentVersion?n??null:null}handleNotification=e=>{if(!(!d(e)||typeof e.method!=`string`)){if(e.method===`statusNotification`||e.method===`didChangeStatus`){let t=nl(e.params);t?o.set(Gc,t):Qc.warn(`#statusNotification: Ignoring a status update with no params`,e.params);return}if(e.method===`window/logMessage`&&rl(e.params)){let{type:t,message:n}=e.params;switch(t){case 1:Qc.error(`[GitHub Copilot]`,n);break;case 2:Qc.warn(`[GitHub Copilot]`,n);break;case 3:Qc.debug(`[GitHub Copilot]`,n);break;default:Qc.log(`[GitHub Copilot]`,n)}}}}},al=class extends k{constructor(e){super({getWsUrl:e.getWsUrl,waitForConnection:e.waitForReady,retries:e.retries??3,retryDelayMs:e.retryDelayMs??1e3,onConnectionFailure:t=>{e.showError(`GitHub Copilot Connection Error`,`Failed to connect to GitHub Copilot. Please check your settings and try again.\n\n${rr(t)}`)}})}},ol=`/__marimo_copilot__.py`,sl=`copilot`,cl=`file://${ol}`,ll=Hn(()=>{let e=Le();return new al({getWsUrl:()=>e.getLSPURL(`copilot`).toString(),waitForReady:async()=>{await Xc(),await Pe()},showError:(e,t)=>{Sn({variant:`danger`,title:e,description:t})}})}),ul=Hn(()=>{let e=o.get(be).ai?.github?.copilot_settings??{},t=ll(),n=new il({rootUri:cl,workspaceFolders:null,transport:t,copilotSettings:e});return t.onReconnect=()=>n.reInitialize(),n});function dl(){return ae({documentUri:cl,client:ul(),languageId:sl,hoverEnabled:!1,completionEnabled:!1,definitionEnabled:!1,renameEnabled:!1,codeActionsEnabled:!1,signatureHelpEnabled:!1,diagnosticsEnabled:!1,sendIncrementalChanges:!1})}var fl=(0,J.memo)(()=>{let[e,t]=r(Hc),[n,i]=r(Uc),[a,o]=(0,J.useState)(),[s,c]=(0,J.useState)(!1),l=async e=>{e.preventDefault(),c(!0);try{let e=await hl();if(!e?.verificationUri||!e.userCode){K.error(`Copilot#trySignIn: Invalid response from sign-in`,{result:e}),i(`connectionError`),Sn({title:`GitHub Copilot Connection Error`,description:`Unable to connect to GitHub Copilot. Please check your settings and try again.`,variant:`danger`});return}let{verificationUri:n,status:r,userCode:a}=e;bl(r)?t(!0):(i(`signingIn`),o({url:n,code:a}))}catch(e){K.error(`Copilot#trySignIn: Error during sign-in`,e),i(`connectionError`),Sn({title:`GitHub Copilot Connection Error`,description:e instanceof Error?e.message:`Unable to connect to GitHub Copilot. Please check your settings and try again.`,variant:`danger`})}finally{c(!1)}},u=async e=>{if(e.preventDefault(),a){c(!0);try{let e=await gl(a.code);e.success?(t(!0),i(`signedIn`)):e.error===`connection`?(i(`connectionError`),Sn({title:`GitHub Copilot Connection Error`,description:`Lost connection during sign-in. Please try again.`,variant:`danger`,action:(0,X.jsx)(q,{onClick:l,children:`Retry`})})):i(`signInFailed`)}finally{c(!1)}}},d=async e=>{e.preventDefault(),await vl(),t(!1),i(`signedOut`)};return(()=>{switch(n??(e?`signedIn`:`connecting`)){case`connecting`:return(0,X.jsx)(Ke,{className:`font-normal flex`,children:`Connecting...`});case`signedOut`:return(0,X.jsx)(q,{onClick:l,size:`xs`,variant:`link`,children:`Sign in to GitHub Copilot`});case`signingIn`:return(0,X.jsxs)(`ol`,{className:`ml-4 text-sm list-decimal [&>li]:mt-2`,children:[(0,X.jsx)(`li`,{children:(0,X.jsxs)(`div`,{className:`flex items-center`,children:[`Copy this code:`,(0,X.jsx)(`strong`,{className:`ml-2`,children:a?.code}),(0,X.jsx)(_t,{className:`ml-2 cursor-pointer opacity-60 hover:opacity-100 h-3 w-3`,onClick:async()=>{a&&(await xn(a.code),Sn({description:`Copied to clipboard`}))}})]})}),(0,X.jsxs)(`li`,{children:[`Enter the code at this link:`,(0,X.jsx)(`a`,{href:a?.url,target:`_blank`,rel:`noreferrer`,className:lt({variant:`link`,size:`xs`}),children:a?.url})]}),(0,X.jsxs)(`li`,{children:[`Click here when done:`,(0,X.jsxs)(q,{size:`xs`,onClick:u,className:`ml-1`,children:[s&&(0,X.jsx)(Pr,{className:`h-3 w-3 mr-1 animate-spin`}),`Done`]})]})]});case`signInFailed`:return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsx)(`div`,{className:`text-destructive text-sm`,children:`Sign in failed. Please try again.`}),s?(0,X.jsx)(Pr,{className:`h-3 w-3 mr-1 animate-spin`}):(0,X.jsx)(q,{onClick:l,size:`xs`,variant:`link`,children:`Connect to GitHub Copilot`})]});case`signedIn`:return(0,X.jsxs)(`div`,{className:`flex items-center gap-5`,children:[(0,X.jsxs)(Ke,{className:`font-normal flex items-center`,children:[(0,X.jsx)(`div`,{className:`inline-flex items-center justify-center bg-(--grass-7) rounded-full p-1 mr-2`,children:(0,X.jsx)(ft,{className:`h-3 w-3 text-white`})}),`Connected`]}),(0,X.jsx)(q,{onClick:d,size:`xs`,variant:`text`,children:`Disconnect`})]});case`connectionError`:return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsxs)(Ke,{className:`font-normal flex`,children:[(0,X.jsx)(mt,{className:`h-4 w-4 mr-1`}),`Connection Error`]}),(0,X.jsx)(`div`,{className:`text-sm`,children:`Unable to connect to GitHub Copilot.`}),(0,X.jsx)(q,{onClick:l,size:`xs`,variant:`link`,children:`Retry Connection`})]});case`notConnected`:return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsxs)(Ke,{className:`font-normal flex`,children:[(0,X.jsx)(mt,{className:`h-4 w-4 mr-1`}),`Unable to connect`]}),(0,X.jsxs)(`div`,{className:`text-sm`,children:[`For troubleshooting, see the`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/getting_started/index.html#github-copilot`,children:`docs`}),`.`]})]})}})()});fl.displayName=`CopilotConfig`;var pl=5,ml=3e3;async function hl(){return await ul().signInInitiate()}async function gl(e){let t=ul();try{K.log(`Copilot#tryFinishSignIn: Attempting to confirm sign-in`);let{status:n}=await t.signInConfirm({userCode:e});return bl(n)?(K.log(`Copilot#tryFinishSignIn: Sign-in confirmed successfully`),{success:!0}):(K.warn(`Copilot#tryFinishSignIn: Sign-in confirmation returned unexpected status`,{status:n}),{success:!1})}catch(e){return yl(e)?(K.error(`Copilot#tryFinishSignIn: Connection error during sign-in`,e),{success:!1,error:`connection`}):await _l(t)}}async function _l(e){for(let t=0;t<pl;t++)try{if(await new Promise(e=>setTimeout(e,ml)),await e.signedIn())return K.log(`Copilot#tryFinishSignIn: Successfully signed in after retry`),{success:!0}}catch(e){if(K.warn(`Copilot#tryFinishSignIn: Retry attempt failed`,{attempt:t+1,maxRetries:pl}),yl(e))return{success:!1,error:`connection`}}return K.error(`Copilot#tryFinishSignIn: All sign-in attempts failed`),{success:!1}}async function vl(){await ul().signOut()}function yl(e){return e instanceof Error&&(e.message.includes(`ECONNREFUSED`)||e.message.includes(`WebSocket`)||e.message.includes(`network`))}function bl(e){return e===`SignedIn`||e===`AlreadySignedIn`||e===`OK`}var xl=`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAnthropic%3c/title%3e%3cpath%20d='M17.3041%203.541h-3.6718l6.696%2016.918H24Zm-10.6082%200L0%2020.459h3.7442l1.3693-3.5527h7.0052l1.3693%203.5528h3.7442L10.5363%203.5409Zm-.3712%2010.2232%202.2914-5.9456%202.2914%205.9456Z'/%3e%3c/svg%3e`,Sl=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20y='0'%20x='0'%20id='Layer_1'%20version='1.1'%20viewBox='0%200%20300.67%20179.8'%3e%3cstyle%20id='style1855'%20type='text/css'%3e.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23f90}%3c/style%3e%3cg%20transform='translate(-1.668%20-1.1)'%20id='g1865'%3e%3cpath%20id='path1857'%20d='M86.4%2066.4c0%203.7.4%206.7%201.1%208.9.8%202.2%201.8%204.6%203.2%207.2.5.8.7%201.6.7%202.3%200%201-.6%202-1.9%203L83.2%2092c-.9.6-1.8.9-2.6.9-1%200-2-.5-3-1.4-1.4-1.5-2.6-3.1-3.6-4.7-1-1.7-2-3.6-3.1-5.9-7.8%209.2-17.6%2013.8-29.4%2013.8-8.4%200-15.1-2.4-20-7.2-4.9-4.8-7.4-11.2-7.4-19.2%200-8.5%203-15.4%209.1-20.6%206.1-5.2%2014.2-7.8%2024.5-7.8%203.4%200%206.9.3%2010.6.8%203.7.5%207.5%201.3%2011.5%202.2v-7.3c0-7.6-1.6-12.9-4.7-16-3.2-3.1-8.6-4.6-16.3-4.6-3.5%200-7.1.4-10.8%201.3-3.7.9-7.3%202-10.8%203.4-1.6.7-2.8%201.1-3.5%201.3-.7.2-1.2.3-1.6.3-1.4%200-2.1-1-2.1-3.1v-4.9c0-1.6.2-2.8.7-3.5.5-.7%201.4-1.4%202.8-2.1%203.5-1.8%207.7-3.3%2012.6-4.5C41%201.9%2046.2%201.3%2051.7%201.3c11.9%200%2020.6%202.7%2026.2%208.1%205.5%205.4%208.3%2013.6%208.3%2024.6v32.4zM45.8%2081.6c3.3%200%206.7-.6%2010.3-1.8%203.6-1.2%206.8-3.4%209.5-6.4%201.6-1.9%202.8-4%203.4-6.4.6-2.4%201-5.3%201-8.7v-4.2c-2.9-.7-6-1.3-9.2-1.7-3.2-.4-6.3-.6-9.4-.6-6.7%200-11.6%201.3-14.9%204-3.3%202.7-4.9%206.5-4.9%2011.5%200%204.7%201.2%208.2%203.7%2010.6%202.4%202.5%205.9%203.7%2010.5%203.7zm80.3%2010.8c-1.8%200-3-.3-3.8-1-.8-.6-1.5-2-2.1-3.9L96.7%2010.2c-.6-2-.9-3.3-.9-4%200-1.6.8-2.5%202.4-2.5h9.8c1.9%200%203.2.3%203.9%201%20.8.6%201.4%202%202%203.9l16.8%2066.2%2015.6-66.2c.5-2%201.1-3.3%201.9-3.9.8-.6%202.2-1%204-1h8c1.9%200%203.2.3%204%201%20.8.6%201.5%202%201.9%203.9l15.8%2067%2017.3-67c.6-2%201.3-3.3%202-3.9.8-.6%202.1-1%203.9-1h9.3c1.6%200%202.5.8%202.5%202.5%200%20.5-.1%201-.2%201.6-.1.6-.3%201.4-.7%202.5l-24.1%2077.3c-.6%202-1.3%203.3-2.1%203.9-.8.6-2.1%201-3.8%201h-8.6c-1.9%200-3.2-.3-4-1-.8-.7-1.5-2-1.9-4L156%2023l-15.4%2064.4c-.5%202-1.1%203.3-1.9%204-.8.7-2.2%201-4%201zm128.5%202.7c-5.2%200-10.4-.6-15.4-1.8-5-1.2-8.9-2.5-11.5-4-1.6-.9-2.7-1.9-3.1-2.8-.4-.9-.6-1.9-.6-2.8v-5.1c0-2.1.8-3.1%202.3-3.1.6%200%201.2.1%201.8.3.6.2%201.5.6%202.5%201%203.4%201.5%207.1%202.7%2011%203.5%204%20.8%207.9%201.2%2011.9%201.2%206.3%200%2011.2-1.1%2014.6-3.3%203.4-2.2%205.2-5.4%205.2-9.5%200-2.8-.9-5.1-2.7-7-1.8-1.9-5.2-3.6-10.1-5.2L246%2052c-7.3-2.3-12.7-5.7-16-10.2-3.3-4.4-5-9.3-5-14.5%200-4.2.9-7.9%202.7-11.1%201.8-3.2%204.2-6%207.2-8.2%203-2.3%206.4-4%2010.4-5.2%204-1.2%208.2-1.7%2012.6-1.7%202.2%200%204.5.1%206.7.4%202.3.3%204.4.7%206.5%201.1%202%20.5%203.9%201%205.7%201.6%201.8.6%203.2%201.2%204.2%201.8%201.4.8%202.4%201.6%203%202.5.6.8.9%201.9.9%203.3v4.7c0%202.1-.8%203.2-2.3%203.2-.8%200-2.1-.4-3.8-1.2-5.7-2.6-12.1-3.9-19.2-3.9-5.7%200-10.2.9-13.3%202.8-3.1%201.9-4.7%204.8-4.7%208.9%200%202.8%201%205.2%203%207.1%202%201.9%205.7%203.8%2011%205.5l14.2%204.5c7.2%202.3%2012.4%205.5%2015.5%209.6%203.1%204.1%204.6%208.8%204.6%2014%200%204.3-.9%208.2-2.6%2011.6-1.8%203.4-4.2%206.4-7.3%208.8-3.1%202.5-6.8%204.3-11.1%205.6-4.5%201.4-9.2%202.1-14.3%202.1z'%20fill='%23252f3e'/%3e%3cg%20id='g1863'%3e%3cpath%20id='path1859'%20d='M273.5%20143.7c-32.9%2024.3-80.7%2037.2-121.8%2037.2-57.6%200-109.5-21.3-148.7-56.7-3.1-2.8-.3-6.6%203.4-4.4%2042.4%2024.6%2094.7%2039.5%20148.8%2039.5%2036.5%200%2076.6-7.6%20113.5-23.2%205.5-2.5%2010.2%203.6%204.8%207.6z'%20class='st1'/%3e%3cpath%20id='path1861'%20d='M287.2%20128.1c-4.2-5.4-27.8-2.6-38.5-1.3-3.2.4-3.7-2.4-.8-4.5%2018.8-13.2%2049.7-9.4%2053.3-5%203.6%204.5-1%2035.4-18.6%2050.2-2.7%202.3-5.3%201.1-4.1-1.9%204-9.9%2012.9-32.2%208.7-37.5z'%20class='st1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,Cl=`data:image/svg+xml,%3csvg%20width='150'%20height='150'%20viewBox='0%200%2096%2096'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='e399c19f-b68f-429d-b176-18c2117ff73c'%20x1='-1032.172'%20x2='-1059.213'%20y1='145.312'%20y2='65.426'%20gradientTransform='matrix(1%200%200%20-1%201075%20158)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%23114a8b'/%3e%3cstop%20offset='1'%20stop-color='%230669bc'/%3e%3c/linearGradient%3e%3clinearGradient%20id='ac2a6fc2-ca48-4327-9a3c-d4dcc3256e15'%20x1='-1023.725'%20x2='-1029.98'%20y1='108.083'%20y2='105.968'%20gradientTransform='matrix(1%200%200%20-1%201075%20158)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-opacity='.3'/%3e%3cstop%20offset='.071'%20stop-opacity='.2'/%3e%3cstop%20offset='.321'%20stop-opacity='.1'/%3e%3cstop%20offset='.623'%20stop-opacity='.05'/%3e%3cstop%20offset='1'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='a7fee970-a784-4bb1-af8d-63d18e5f7db9'%20x1='-1027.165'%20x2='-997.482'%20y1='147.642'%20y2='68.561'%20gradientTransform='matrix(1%200%200%20-1%201075%20158)'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0'%20stop-color='%233ccbf4'/%3e%3cstop%20offset='1'%20stop-color='%232892df'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20fill='url(%23e399c19f-b68f-429d-b176-18c2117ff73c)'%20d='M33.338%206.544h26.038l-27.03%2080.087a4.152%204.152%200%200%201-3.933%202.824H8.149a4.145%204.145%200%200%201-3.928-5.47L29.404%209.368a4.152%204.152%200%200%201%203.934-2.825z'/%3e%3cpath%20fill='%230078d4'%20d='M71.175%2060.261h-41.29a1.911%201.911%200%200%200-1.305%203.309l26.532%2024.764a4.171%204.171%200%200%200%202.846%201.121h23.38z'/%3e%3cpath%20fill='url(%23ac2a6fc2-ca48-4327-9a3c-d4dcc3256e15)'%20d='M33.338%206.544a4.118%204.118%200%200%200-3.943%202.879L4.252%2083.917a4.14%204.14%200%200%200%203.908%205.538h20.787a4.443%204.443%200%200%200%203.41-2.9l5.014-14.777%2017.91%2016.705a4.237%204.237%200%200%200%202.666.972H81.24L71.024%2060.261l-29.781.007L59.47%206.544z'/%3e%3cpath%20fill='url(%23a7fee970-a784-4bb1-af8d-63d18e5f7db9)'%20d='M66.595%209.364a4.145%204.145%200%200%200-3.928-2.82H33.648a4.146%204.146%200%200%201%203.928%202.82l25.184%2074.62a4.146%204.146%200%200%201-3.928%205.472h29.02a4.146%204.146%200%200%200%203.927-5.472z'/%3e%3c/svg%3e`,wl=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--%20Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)%20--%3e%3cdefs%3e%3cstyle%3e%20.st0%20{%20fill:%20%2326251e;%20}%20%3c/style%3e%3c/defs%3e%3cpath%20class='st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e`,Tl=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDeepSeek%3c/title%3e%3cpath%20d='M23.748%204.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434%201.202-.422%201.84.027%201.436.633%202.58%201.838%203.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526%205.526%200%2001-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365%2011.365%200%2000-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055%203.055%200%2001-.465.137%209.597%209.597%200%2000-2.883-.102c-1.885.21-3.39%201.102-4.497%202.623C.082%208.606-.231%2010.684.152%2012.85c.403%202.284%201.569%204.175%203.36%205.653%201.858%201.533%203.997%202.284%206.438%202.14%201.482-.085%203.133-.284%204.994-1.86.47.234.962.327%201.78.397.63.059%201.236-.03%201.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926%201.096-1.296%202.746-2.642%203.392-7.003.05-.347.007-.565%200-.845-.004-.17.035-.237.23-.256a4.173%204.173%200%20001.545-.475c1.396-.763%201.96-2.015%202.093-3.517.02-.23-.004-.467-.247-.588zM11.581%2018c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696%204.696%200%20011.529-.039c2.132.312%203.946%201.265%205.468%202.774.868.86%201.525%201.887%202.202%202.891.72%201.066%201.494%202.082%202.48%202.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306%200%2001.415-.287.302.302%200%2001.2.288.306.306%200%2001-.31.307.303.303%200%2001-.304-.308zm3.11%201.596c-.2.081-.399.151-.59.16a1.245%201.245%200%2001-.798-.254c-.274-.23-.47-.358-.552-.758a1.73%201.73%200%2001.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559%200%2001-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136%201.146.016.352.144.618.408%201.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z'%3e%3c/path%3e%3c/svg%3e`,El=`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGoogle%20Gemini%3c/title%3e%3cpath%20d='M11.04%2019.32Q12%2021.51%2012%2024q0-2.49.93-4.68.96-2.19%202.58-3.81t3.81-2.55Q21.51%2012%2024%2012q-2.49%200-4.68-.93a12.3%2012.3%200%200%201-3.81-2.58%2012.3%2012.3%200%200%201-2.58-3.81Q12%202.49%2012%200q0%202.49-.96%204.68-.93%202.19-2.55%203.81a12.3%2012.3%200%200%201-3.81%202.58Q2.49%2012%200%2012q2.49%200%204.68.96%202.19.93%203.81%202.55t2.55%203.81'/%3e%3c/svg%3e`,Dl=`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGitHub%3c/title%3e%3cpath%20d='M12%20.297c-6.63%200-12%205.373-12%2012%200%205.303%203.438%209.8%208.205%2011.385.6.113.82-.258.82-.577%200-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422%2018.07%203.633%2017.7%203.633%2017.7c-1.087-.744.084-.729.084-.729%201.205.084%201.838%201.236%201.838%201.236%201.07%201.835%202.809%201.305%203.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93%200-1.31.465-2.38%201.235-3.22-.135-.303-.54-1.523.105-3.176%200%200%201.005-.322%203.3%201.23.96-.267%201.98-.399%203-.405%201.02.006%202.04.138%203%20.405%202.28-1.552%203.285-1.23%203.285-1.23.645%201.653.24%202.873.12%203.176.765.84%201.23%201.91%201.23%203.22%200%204.61-2.805%205.625-5.475%205.92.42.36.81%201.096.81%202.22%200%201.606-.015%202.896-.015%203.286%200%20.315.21.69.825.57C20.565%2022.092%2024%2017.592%2024%2012.297c0-6.627-5.373-12-12-12'/%3e%3c/svg%3e`,Ol=`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOllama%3c/title%3e%3cpath%20d='M16.361%2010.26a.894.894%200%200%200-.558.47l-.072.148.001.207c0%20.193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86%200%200%200%20.517-.436.752.752%200%200%200%20.08-.498c-.064-.453-.33-.782-.724-.897a1.06%201.06%200%200%200-.466%200zm-9.203.005c-.305.096-.533.32-.65.639a1.187%201.187%200%200%200-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894%200%200%200-.565-.472%201.02%201.02%200%200%200-.474.007Zm4.184%202c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365%200%200%200-.175-.48.394.394%200%200%200-.181-.033c-.126%200-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396%200%200%200-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589%201.226-1.787%202.114-.04.176-.045.234-.045.53%200%20.294.005.357.043.524.264%201.16%201.332%202.017%202.714%202.173.3.033%201.596.033%201.896%200%201.11-.125%202.064-.727%202.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523%200-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873%206.873%200%200%200-.855-.031zm.645.937a3.283%203.283%200%200%201%201.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115%203.115%200%200%201-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46%201.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653%201.653%200%200%200-.683.298C5.617.74%205.173%201.666%204.985%202.819c-.07.436-.119%201.04-.119%201.503%200%20.544.064%201.24.155%201.721.02.107.031.202.023.208a8.12%208.12%200%200%201-.187.152%205.324%205.324%200%200%200-.949%201.02%205.49%205.49%200%200%200-.94%202.339%206.625%206.625%200%200%200-.023%201.357c.091.78.325%201.438.727%202.04l.13.195-.037.064c-.269.452-.498%201.105-.605%201.732-.084.496-.095.629-.095%201.294%200%20.67.009.803.088%201.266.095.555.288%201.143.503%201.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405%207.405%200%200%200-.548%201.873c-.062.417-.071.552-.071.991%200%20.56.031.832.148%201.279L3.42%2024h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915%200%200%200-.194-.25%201.74%201.74%200%200%201-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787%200%200%200%20.223-.531c0-.195-.07-.355-.224-.522a3.136%203.136%200%200%201-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814%201.353-1.336%202.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467%201.352-.561.17-.035.25-.04.569-.04.319%200%20.398.005.569.04a4.07%204.07%200%200%201%201.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016%201.144.23%202.14%201.173%202.581%202.437.385%201.108.276%202.267-.296%203.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001%201.053.493.539.801%201.866.708%203.036-.062.772-.26%201.463-.533%201.854a2.096%202.096%200%200%201-.224.258.916.916%200%200%200-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498%201.295.253%201.008.231%202.01-.059%202.581a.845.845%200%200%200-.044.098c0%20.006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016%200-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378%200-1.628-.083-.645-.182-1.082-.348-1.525a6.083%206.083%200%200%200-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625%206.625%200%200%200-.024-1.358%205.512%205.512%200%200%200-.939-2.339%205.325%205.325%200%200%200-.95-1.02%208.097%208.097%200%200%201-.186-.152.692.692%200%200%201%20.023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8%201.205-2.116%203.01a6.805%206.805%200%200%200-.097.726c0%20.036-.007.066-.015.066a.96.96%200%200%201-.149-.078A4.857%204.857%200%200%200%2012%203.03c-.832%200-1.687.243-2.456.698a.958.958%200%200%201-.148.078c-.008%200-.015-.03-.015-.066a6.71%206.71%200%200%200-.097-.725C8.997%201.392%208.337.319%207.46.048a2.096%202.096%200%200%200-.585-.041Zm.293%201.402c.248.197.523.759.682%201.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102%201.24l.002.475-.12.175-.118.178h-.278c-.324%200-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438%208.438%200%200%201%20.016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36%202.028.212%203.145-.019.14-.024.151-.057.144l-.238-.06a3.693%203.693%200%200%200-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z'/%3e%3c/svg%3e`,kl=`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M22.2819%209.8211a5.9847%205.9847%200%200%200-.5157-4.9108%206.0462%206.0462%200%200%200-6.5098-2.9A6.0651%206.0651%200%200%200%204.9807%204.1818a5.9847%205.9847%200%200%200-3.9977%202.9%206.0462%206.0462%200%200%200%20.7427%207.0966%205.98%205.98%200%200%200%20.511%204.9107%206.051%206.051%200%200%200%206.5146%202.9001A5.9847%205.9847%200%200%200%2013.2599%2024a6.0557%206.0557%200%200%200%205.7718-4.2058%205.9894%205.9894%200%200%200%203.9977-2.9001%206.0557%206.0557%200%200%200-.7475-7.0729zm-9.022%2012.6081a4.4755%204.4755%200%200%201-2.8764-1.0408l.1419-.0804%204.7783-2.7582a.7948.7948%200%200%200%20.3927-.6813v-6.7369l2.02%201.1686a.071.071%200%200%201%20.038.052v5.5826a4.504%204.504%200%200%201-4.4945%204.4944zm-9.6607-4.1254a4.4708%204.4708%200%200%201-.5346-3.0137l.142.0852%204.783%202.7582a.7712.7712%200%200%200%20.7806%200l5.8428-3.3685v2.3324a.0804.0804%200%200%201-.0332.0615L9.74%2019.9502a4.4992%204.4992%200%200%201-6.1408-1.6464zM2.3408%207.8956a4.485%204.485%200%200%201%202.3655-1.9728V11.6a.7664.7664%200%200%200%20.3879.6765l5.8144%203.3543-2.0201%201.1685a.0757.0757%200%200%201-.071%200l-4.8303-2.7865A4.504%204.504%200%200%201%202.3408%207.872zm16.5963%203.8558L13.1038%208.364%2015.1192%207.2a.0757.0757%200%200%201%20.071%200l4.8303%202.7913a4.4944%204.4944%200%200%201-.6765%208.1042v-5.6772a.79.79%200%200%200-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759%200%200%200-.7854%200L9.409%209.2297V6.8974a.0662.0662%200%200%201%20.0284-.0615l4.8303-2.7866a4.4992%204.4992%200%200%201%206.6802%204.66zM8.3065%2012.863l-2.02-1.1638a.0804.0804%200%200%201-.038-.0567V6.0742a4.4992%204.4992%200%200%201%207.3757-3.4537l-.142.0805L8.704%205.459a.7948.7948%200%200%200-.3927.6813zm1.0976-2.3654l2.602-1.4998%202.6069%201.4998v2.9994l-2.5974%201.4997-2.6067-1.4997Z'/%3e%3c/svg%3e`,Al=`data:image/svg+xml,%3csvg%20width='240'%20height='300'%20viewBox='0%200%20240%20300'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1401_86274)'%3e%3cmask%20id='mask0_1401_86274'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='240'%20height='300'%3e%3cpath%20d='M240%200H0V300H240V0Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_1401_86274)'%3e%3cpath%20d='M180%20240H60V120H180V240Z'%20fill='%23CFCECD'/%3e%3cpath%20d='M180%2060H60V240H180V60ZM240%20300H0V0H240V300Z'%20fill='%23211E1E'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1401_86274'%3e%3crect%20width='240'%20height='300'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`,jl={openai:kl,github:Dl,anthropic:xl,claude:xl,gemini:El,google:El,codex:kl,ollama:Ol,azure:Cl,bedrock:Sl,deepseek:Tl,openrouter:`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenRouter%3c/title%3e%3cpath%20d='M16.804%201.957l7.22%204.105v.087L16.73%2010.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147%201.352L8.345%2011.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314%201.17.796%202.701%201.866%201.11.775%202.083%201.177%203.147%201.352l.3.045c.694.091%201.375.094%202.825.033l.022-2.159%207.22%204.105v.087L16.589%2022l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997%2021.997%200%2000-.755-.498l-.467-.28a55.927%2055.927%200%2000-.76-.43C2.908%2014.73.563%2014.116%200%2014.116V9.888l.14.004c.564-.007%202.91-.622%203.809-1.124l1.016-.58.438-.274c.428-.28%201.072-.726%202.686-1.853%201.621-1.133%203.186-1.78%204.881-2.059%201.152-.19%201.974-.213%203.814-.138l.02-1.907z'%3e%3c/path%3e%3c/svg%3e`,wandb:`data:image/svg+xml,%3csvg%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eWeights%20&amp;%20Biases%3c/title%3e%3cpath%20d='M2.48%200a1.55%201.55%200%201%200%200%203.1%201.55%201.55%200%200%200%200-3.1zm19.04%200a1.55%201.55%200%201%200%200%203.101%201.55%201.55%200%200%200%200-3.101zM12%202.295a1.55%201.55%200%201%200%200%203.1%201.55%201.55%200%200%200%200-3.1zM2.48%205.272a2.48%202.48%200%201%200%200%204.96%202.48%202.48%200%200%200%200-4.96zm19.04%200a2.48%202.48%200%201%200%200%204.96%202.48%202.48%200%200%200%200-4.96zM12%208.496a1.55%201.55%200%201%200%200%203.1%201.55%201.55%200%200%200%200-3.1zm-9.52%203.907a1.55%201.55%200%201%200%200%203.1%201.55%201.55%200%200%200%200-3.1zm19.04%200a1.55%201.55%200%201%200%200%203.102%201.55%201.55%200%200%200%200-3.102zM12%2013.767a2.48%202.48%200%201%200%200%204.962%202.48%202.48%200%200%200%200-4.962zm-9.52%203.907a2.48%202.48%200%201%200%20.001%204.962%202.48%202.48%200%200%200%200-4.962zm19.04.93a1.55%201.55%200%201%200%200%203.102%201.55%201.55%200%200%200%200-3.101zM12%2020.9a1.55%201.55%200%201%200%200%203.1%201.55%201.55%200%200%200%200-3.1Z'/%3e%3c/svg%3e`,"opencode-go":Al,marimo:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABtlJREFUWEetV21QlNcVfs67y67KV/EjJIRdBIxJrB9BotFqAtERTIKkk8SxNiGt7Ipa46DsxvjR0rVTKuKKJFYTE1SIxmhFbR0Kwc4YNSraqmNswhSFIrBUBD8QVGTZfU/nvrDLroqQ4Pm179nnnvvc5557zr2EXlj05hSfhgvO10AUB/A4AOHEFMCADOJrBFQx0zki+ajkkA9eyslr6kVYBUIPA8ZaLOr/ttQtYJKXgRHSy6B2EBVKwMZqa+6hnsZ0S2DY8jlD2uxSIYDxPQVx/S+CSZIEpyx3rI5wXIZsslm3neouxoMJMEhvNv6JwcvcwYkw8kk9xoZFYOjgYAT2HwBZlnH99i1UNtbj9KVKVDZcho9KhX4+GtgdDrQ52sVwGYQcbduAFRUbNrTdS+R+AhaLpL9Vu4kZ8wTYV6vFrydNxTsTY/Bk0KCHinHxymVsP/E1vjz1jRvXSQIEOqGxO39esWFbo2cQbwIzZ6r0QwPSWUa6APlp++GgyYLgwCB8dqQEs8a/iEF+/j3uSPW1RqTt2orTVRfBHmgCyjQaObZidRcJLwJPL032b3XSEQaixMqTJr6s7GlDcxNOVpZj13wz9IOG9EhAABxOJ5buyUfB6RNeeCKU+vnpYsssFrvXKYhImzvcQfJXDISH/GQg5kyeiqzifYh5eiSss+ZgoK9fryb2BMnMeG/HZhR+e/peEmtqrFuU/OpQwGKRdC21pSLjJZKwMuEtZBbtw6ujx+LDXxohfD/WWu12JH6UgfL6OncIAtpVKh5VlbW1XCGgMxlnA7xT/H4zeiLO26oVCUtMv1cyuq/2na0aMz7KcB/PzjO6rdaam6wQ0JuNx5h5EhFhybQZyD54AJuS5iNhzPN9nds9fsXeHdhRetgz3m2nv+ox6ig4qnqAped04UqWn6utwr/SrVBLKmWAkPHClS4Jw4c8jsbmmzheUYaA/r6YPjJKUcp24yqOlH8PiQgvDv8pQj2Obf3NG5i8erlSH9wmcTyFmQ2vyQxR8ZASE48vTh7BlGdGYWOSUgYU+76uBtPXW9zfyZOnYnvpYbQ7nYovSh+BJXGvY27en13FB1ofH+Qlp2LyUyPc4xZ/uQX7zohUcxmvJJ05OQ1M64TrMf9ANLTcxOK4RKTFJXZLQKxQZLin9ffRoLVdOVluGxsWib8tWun+/uZCGd7+NNsTkk+hJkMOAanCK2S8225HeuIsGF+a1i2B0KDBGB4cgkP/Oe/GaNRqxI14DkcvlqG59Y7iF/Eurv7EjRGKjU5Pxe22uy7fYdKZjflgfteT1gevvIGFU1/tlsCnv1qIV0ZFY8If30dd0zUFN2PMOGxKWoDMogJsPFSk+IRS1Wu3eKky6+O1KK0sV3xEKBdNZzszv+OJSvpZLDLe6HLdmwP5hsWY8uxoxK5ZoTQiYTOfn4TsXxiw/h8HkF3y124JLCv4HDtPHu2YjtBIOpNhI4DfeBKIDovE/kXLu1WgLwQy/74Xm74udsVuIr3JsJSBNZ4EREs9tyoH/v36K+5HqUBG4R5sPlzSqQDZSG8yTmPwQReBwX7+uHqrBetnG5Sq+KgJpO7Mxf6zJztzgI5TsDnJV8PaRoCV5Y4bOkyp2888EYqChR8owLob15TG5LJ5sdMxIkSHjMK/oKH5puIeHzEcb0+IwVffnUXx+TOuCZAz2+iVhFOyfoeKhsudKUAbOkuxoYAZbwqvODqvR43H7n8ew/73liN6aKRXgL58VDbU4+Ws37pDSISEDgL3bIOQvvjfZ/FsSCj2LlymHKdHYaZdW7Gn835AwBU//2a9KzLpTMYTAE8QE4kJxfWr9vpVrEyYiXmx8X2ev+j8GSzY/gm4s4ISsaXGunWVe2mh5pQXiJ3i+uLV/EVD+vjd+YgfGfWjSYjtFN2w3dnZiAg2lZ9z1CVLXpOXtnqzIZMZHZnnYYLEkvhEpMTEQav26TWR/zVdxx8O7IZYvYexxJRQnZ2rlEsvAuIhUtliKwK4qxF4jBStetqIMYgKi0TEkGA8ERiEwf4BGKDRulFCYtHOd586hr1nSt3d0QUgolU11lx3a70vu8TF9I5MxWBM8qT9eEAQ1CoJthsdtd9LIfEWUPsouWN3OnC3XXkP3G+E7FrrFjPQdVl+YHqHWFIGqG/J+cz8lmcUX41WSU5R/12vn17uRxskMtWuzRVl38sedr5It3TuPJI5k5kDe5yIqAqACoyBAHtcoamE4EyrWbet7MGi9BA5PNUY7FDjfYCTAQT1SKQDcAmMQiLKq1mX65WBP0QBL+ywRYu0dk3rSwx+AUAkCEFg8eLCHWJcYeYaSVKXOyT527qsXFsvieL/FjzLIPLjeMUAAAAASUVORK5CYII=`,opencode:Al,cursor:wl},Ml=e=>{let t=(0,Y.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({provider:r,className:i,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?``:i;if(r===`openai-compatible`||!(r in jl)){let e;t[4]===a?e=t[5]:(e=Re(`h-4 w-4`,a),t[4]=a,t[5]=e);let n;return t[6]===e?n=t[7]:(n=(0,X.jsx)(L,{className:e}),t[6]=e,t[7]=n),n}let o=jl[r],s;t[8]===a?s=t[9]:(s=Re(`h-4 w-4 grayscale dark:invert`,a),t[8]=a,t[9]=s);let c;return t[10]!==o||t[11]!==n||t[12]!==r||t[13]!==s?(c=(0,X.jsx)(`img`,{src:o,alt:r,className:s,...n}),t[10]=o,t[11]=n,t[12]=r,t[13]=s,t[14]=c):c=t[14],c};function Nl(e){switch(e){case`chat`:return`bg-(--purple-3) text-(--purple-11)`;case`autocomplete`:return`bg-(--green-3) text-(--green-11)`;case`edit`:return`bg-(--blue-3) text-(--blue-11)`;case`thinking`:return`bg-(--purple-4) text-(--purple-12)`}return`bg-(--mauve-3) text-(--mauve-11)`}function Pl(e){switch(e){case`chat`:return`Current model used for chat conversations`;case`autocomplete`:return`Current model used for autocomplete autocomplete`;case`edit`:return`Current model used for code edits`;case`rerank`:return`Current model used for reranking completions`;case`embed`:return`Current model used for embedding`}}var Fl=[`claude`,`codex`,`opencode`],Il=[`claude`,`codex`,`opencode`,`prompt`],Ll={claude:`Claude`,codex:`Codex`,opencode:`OpenCode`,prompt:`Prompt`};function Rl(){return`uvx marimo@latest`}function zl(e){let t=new URL(e).searchParams.get(ke.filePath);return t===null||t===``?void 0:t}function Bl(e){return e?` --file ${er(e)}`:``}function Vl(e,{url:t,file:n,session:r},i,a){let o=a?.command??Rl(),s=[`${a?`MARIMO_PAIR_NEXT=1 `:``}${o} pair prompt`,`--url ${er(t)}`,n?`--file ${er(n)}`:``,a&&r?`--session ${er(r)}`:``,i?`--with-token`:``,a?``:`--${e}`].filter(Boolean).join(a?` \\
3
3
  `:` `);switch(e){case`claude`:return`claude "$(${s})"`;case`codex`:return`codex "$(${s})"`;case`opencode`:return`opencode --prompt "$(${s})"`;default:Gn(e)}}function Hl({url:e,file:t,session:n},r,i){if(i){let{command:a,templates:o}=i;return Ul(o.prompt,{command:a,url:e,file:t?Ul(o.file,{file:t}):``,session:n?Ul(o.session,{session:n}):``,authentication:r?Ul(o.token,{token:er(r)}):``})}let a=Bl(t),o=t?` (file ${t})`:``,s=`execute-code.sh --url ${er(e)}${a}`,c=r?`\n\nUse this auth token when calling \`execute-code.sh\`: \`${s} --token ${er(r)}\`.`:``;return[`Use the /marimo-pair skill to pair-program on a running marimo notebook.`,``,`Connect to the notebook at: ${e}${o}`,``,`Use \`${s}\` from the marimo-pair skill to execute code in the notebook.${c}`,``,`Once you are connected, send a fun toast (mo.status.toast(...)) to the user inside marimo letting them know you're ready to pair.`].join(`
4
4
  `)}function Ul(e,t){return e.replaceAll(/\{(\w+)\}/g,(e,n)=>t[n]??e)}function Wl(e){return e.length<=4?`****`:`${`*`.repeat(Math.min(e.length-4,8))}${e.slice(-4)}`}function Gl(){let e=(0,Y.c)(2),[t,n]=(0,J.useState)(null),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(Fe(`/auth/token`).href,{headers:Mr.headers()}).then(Kl).then(e=>n(e?.token??null)).catch(()=>n(null))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,J.useEffect)(r,i),t}function Kl(e){return e.ok?e.json():null}var ql=e=>{let t=(0,Y.c)(70),{onClose:n}=e,[r,i]=(0,J.useState)(`claude`),o=Ie(),s=a(Sr),c=ir(),l=s?1:2,u=Gl(),d=!!u,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j;if(t[0]!==r||t[1]!==u||t[2]!==l||t[3]!==c||t[4]!==d||t[5]!==s||t[6]!==o.httpURL){let e;t[27]!==c||t[28]!==s?(e=zl(window.location.href)??(s&&c||void 0),t[27]=c,t[28]=s,t[29]=e):e=t[29];let n={url:o.httpURL.toString(),file:e,session:s?je():void 0};g=Kt,S=`sm:max-w-2xl`;let a;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,X.jsx)(Jt,{children:`Pair with an agent`}),t[30]=a):a=t[30],t[31]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,X.jsxs)(fn,{children:[a,(0,X.jsxs)(Ot,{children:[`Use an AI coding agent to pair-program on this notebook.`,` `,(0,X.jsxs)(`a`,{href:`https://links.marimo.app/marimo-pair`,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:[`Learn more`,(0,X.jsx)(`span`,{className:`sr-only`,children:` about pairing marimo with an agent`})]}),`.`]})]}),t[31]=C):C=t[31],x=`flex flex-col gap-4 py-2`,h=lr,j=r,t[32]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>i(e),t[32]=v):v=t[32],t[33]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(yr,{className:`w-full`,children:Il.map(Xl)}),t[33]=y):y=t[33],b=Fl.map(e=>(0,X.jsxs)(pr,{value:e,className:`mt-4 flex flex-col gap-4`,children:[!s&&(0,X.jsx)(Jl,{index:1,title:`Install the skill`,hint:`Run once per machine.`,children:(0,X.jsx)(Yl,{command:`npx skills add marimo-team/marimo-pair`})}),(0,X.jsx)(Jl,{index:l,title:`Run in your terminal`,children:(0,X.jsx)(Yl,{command:Vl(e,n,d,s)})}),d&&u&&(0,X.jsx)(Jl,{index:l+1,title:`Paste when prompted for a token`,children:(0,X.jsx)(Yl,{command:u,display:Wl(u),copyLabel:`Copy token`})})]},e)),m=pr,O=`prompt`,k=`mt-4 flex flex-col gap-4`,t[34]===s?A=t[35]:(A=!s&&(0,X.jsx)(Jl,{index:1,title:`Make sure the marimo-pair skill is available to your agent`,hint:`Skip if your agent already has it.`,children:(0,X.jsx)(Yl,{command:`npx skills add marimo-team/marimo-pair`})}),t[34]=s,t[35]=A),p=Jl,T=l,E=`Copy this prompt into your agent`,D=d?`Includes your auth token — keep it private.`:void 0,f=Yl,_=Hl(n,u,s),w=Hl(n,u?Wl(u):null,s),t[0]=r,t[1]=u,t[2]=l,t[3]=c,t[4]=d,t[5]=s,t[6]=o.httpURL,t[7]=f,t[8]=p,t[9]=m,t[10]=h,t[11]=g,t[12]=_,t[13]=v,t[14]=y,t[15]=b,t[16]=x,t[17]=S,t[18]=C,t[19]=w,t[20]=T,t[21]=E,t[22]=D,t[23]=O,t[24]=k,t[25]=A,t[26]=j}else f=t[7],p=t[8],m=t[9],h=t[10],g=t[11],_=t[12],v=t[13],y=t[14],b=t[15],x=t[16],S=t[17],C=t[18],w=t[19],T=t[20],E=t[21],D=t[22],O=t[23],k=t[24],A=t[25],j=t[26];let M;t[36]!==f||t[37]!==_||t[38]!==w?(M=(0,X.jsx)(f,{command:_,display:w,multiline:!0}),t[36]=f,t[37]=_,t[38]=w,t[39]=M):M=t[39];let N;t[40]!==p||t[41]!==M||t[42]!==T||t[43]!==E||t[44]!==D?(N=(0,X.jsx)(p,{index:T,title:E,hint:D,children:M}),t[40]=p,t[41]=M,t[42]=T,t[43]=E,t[44]=D,t[45]=N):N=t[45];let P;t[46]!==m||t[47]!==N||t[48]!==O||t[49]!==k||t[50]!==A?(P=(0,X.jsxs)(m,{value:O,className:k,children:[A,N]}),t[46]=m,t[47]=N,t[48]=O,t[49]=k,t[50]=A,t[51]=P):P=t[51];let F;t[52]!==h||t[53]!==v||t[54]!==y||t[55]!==b||t[56]!==P||t[57]!==j?(F=(0,X.jsxs)(h,{value:j,onValueChange:v,children:[y,b,P]}),t[52]=h,t[53]=v,t[54]=y,t[55]=b,t[56]=P,t[57]=j,t[58]=F):F=t[58];let I;t[59]!==x||t[60]!==F?(I=(0,X.jsx)(`div`,{className:x,children:F}),t[59]=x,t[60]=F,t[61]=I):I=t[61];let L;t[62]===n?L=t[63]:(L=(0,X.jsx)(Mt,{children:(0,X.jsx)(q,{variant:`secondary`,onClick:n,children:`Close`})}),t[62]=n,t[63]=L);let R;return t[64]!==g||t[65]!==S||t[66]!==C||t[67]!==I||t[68]!==L?(R=(0,X.jsxs)(g,{className:S,children:[C,I,L]}),t[64]=g,t[65]=S,t[66]=C,t[67]=I,t[68]=L,t[69]=R):R=t[69],R},Jl=e=>{let t=(0,Y.c)(11),{index:n,title:r,hint:i,children:a}=e,o;t[0]!==n||t[1]!==r?(o=(0,X.jsxs)(`span`,{className:`text-sm font-medium`,children:[n,`. `,r]}),t[0]=n,t[1]=r,t[2]=o):o=t[2];let s;t[3]===i?s=t[4]:(s=i&&(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:i}),t[3]=i,t[4]=s);let c;t[5]!==o||t[6]!==s?(c=(0,X.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[o,s]}),t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==a||t[9]!==c?(l=(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[c,a]}),t[8]=a,t[9]=c,t[10]=l):l=t[10],l},Yl=e=>{let t=(0,Y.c)(29),{command:n,display:r,multiline:i,copyLabel:a}=e,o=i!==void 0&&i,s=a===void 0?`Copy command`:a,[c,l]=(0,J.useState)(!1),u;t[0]===n?u=t[1]:(u=ut.stopPropagation(async e=>{e.preventDefault(),await xn(n),l(!0),setTimeout(()=>l(!1),2e3)}),t[0]=n,t[1]=u);let d=u;if(o){let e=r??n,i;t[2]===e?i=t[3]:(i=(0,X.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap wrap-break-word px-3 py-2 pr-10 font-mono text-xs select-all`,children:e}),t[2]=e,t[3]=i);let a;t[4]===c?a=t[5]:(a=c?(0,X.jsx)(ft,{size:14,strokeWidth:1.5}):(0,X.jsx)(_t,{size:14,strokeWidth:1.5}),t[4]=c,t[5]=a);let o;t[6]!==d||t[7]!==a?(o=(0,X.jsx)(q,{"aria-label":`Copy prompt`,onClick:d,size:`xs`,variant:`ghost`,className:`absolute right-1 top-1`,children:a}),t[6]=d,t[7]=a,t[8]=o):o=t[8];let s;t[9]!==c||t[10]!==o?(s=(0,X.jsx)(ct,{content:`Copied!`,open:c,children:o}),t[9]=c,t[10]=o,t[11]=s):s=t[11];let l;return t[12]!==i||t[13]!==s?(l=(0,X.jsxs)(`div`,{className:`relative rounded-md bg-muted`,children:[i,s]}),t[12]=i,t[13]=s,t[14]=l):l=t[14],l}let f=r??n,p;t[15]===f?p=t[16]:(p=(0,X.jsx)(`code`,{className:`flex-1 whitespace-pre-wrap select-all wrap-break-word`,children:f}),t[15]=f,t[16]=p);let m;t[17]===c?m=t[18]:(m=c?(0,X.jsx)(ft,{size:14,strokeWidth:1.5}):(0,X.jsx)(_t,{size:14,strokeWidth:1.5}),t[17]=c,t[18]=m);let h;t[19]!==d||t[20]!==s||t[21]!==m?(h=(0,X.jsx)(q,{"aria-label":s,onClick:d,size:`xs`,variant:`ghost`,children:m}),t[19]=d,t[20]=s,t[21]=m,t[22]=h):h=t[22];let g;t[23]!==c||t[24]!==h?(g=(0,X.jsx)(ct,{content:`Copied!`,open:c,children:h}),t[23]=c,t[24]=h,t[25]=g):g=t[25];let _;return t[26]!==p||t[27]!==g?(_=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-xs`,children:[p,g]}),t[26]=p,t[27]=g,t[28]=_):_=t[28],_};function Xl(e){return(0,X.jsx)(Vr,{value:e,className:`flex-1`,children:Ll[e]},e)}var Zl=[{id:`claude`,label:`Claude Code`},{id:`codex`,label:`Codex`},{id:`cursor`,label:`Cursor`},{id:`gemini`,label:`Gemini CLI`},{id:`opencode`,label:`OpenCode`},{id:`github`,label:`GitHub Copilot`},{id:`openai-compatible`,label:`Any local agent`}],Ql=()=>{let e=(0,Y.c)(3),{openModal:t,closeModal:n}=yt(),r;return e[0]!==n||e[1]!==t?(r=()=>t((0,X.jsx)(ql,{onClose:n})),e[0]=n,e[1]=t,e[2]=r):r=e[2],r},$l=e=>{let t=(0,Y.c)(15),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,label:a,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`Connect your agent`:a,s=Ql();if(Me())return null;let c;t[5]===n?c=t[6]:(c=Re(`h-auto gap-1 px-0`,n),t[5]=n,t[6]=c);let l;t[7]!==r||t[8]!==s?(l=e=>{r?.(e),e.defaultPrevented||s()},t[7]=r,t[8]=s,t[9]=l):l=t[9];let u;return t[10]!==o||t[11]!==i||t[12]!==c||t[13]!==l?(u=(0,X.jsx)(q,{type:`button`,variant:`link`,size:`xs`,className:c,onClick:l,...i,children:o}),t[10]=o,t[11]=i,t[12]=c,t[13]=l,t[14]=u):u=t[14],u},eu=e=>{let t=(0,Y.c)(12),{label:n,className:r}=e,i=n===void 0?`Connect your agent`:n,a=Ql();if(Me())return null;let o;t[0]===r?o=t[1]:(o=Re(`rounded-lg border border-(--blue-6) bg-(--blue-2)/50 p-3`,r),t[0]=r,t[1]=o);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(`fieldset`,{className:`m-0 flex min-w-0 -space-x-1.5 border-0 p-0 mb-0.5`,"aria-label":`Supported agents`,children:Zl.map(tu)}),t[2]=s):s=t[2];let c;t[3]===i?c=t[4]:(c=(0,X.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold`,children:[i,s]}),t[3]=i,t[4]=c);let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(`p`,{className:`inline`,children:`Use your AI coding agent to pair-program on this notebook.`}),t[5]=l):l=t[5];let u;t[6]===a?u=t[7]:(u=(0,X.jsxs)(`div`,{className:`mt-1 text-xs leading-relaxed`,children:[l,(0,X.jsx)(`button`,{type:`button`,onClick:a,className:`text-link hover:underline ml-1`,children:`Learn more.`})]}),t[6]=a,t[7]=u);let d;return t[8]!==o||t[9]!==c||t[10]!==u?(d=(0,X.jsxs)(`div`,{className:o,children:[c,u]}),t[8]=o,t[9]=c,t[10]=u,t[11]=d):d=t[11],d};function tu(e){let{id:t,label:n}=e;return(0,X.jsx)(`figure`,{title:n,"aria-label":n,className:`flex size-6 items-center justify-center rounded-full border bg-background shadow-xs`,children:t===`openai-compatible`?(0,X.jsx)(L,{className:`size-3.5`,"aria-hidden":!0}):(0,X.jsx)(Ml,{provider:t,className:`size-3.5`,"aria-hidden":!0})},t)}var Z=`flex flex-row items-center space-x-1 space-y-0`,nu=e=>{let t=(0,Y.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,X.jsx)(`div`,{className:`text-md font-semibold text-muted-foreground uppercase tracking-wide mb-1`,children:n}),t[0]=n,t[1]=r),r},ru=e=>{let t=(0,Y.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,className:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=Re(`text-base font-semibold underline-offset-2 text-accent-foreground uppercase tracking-wide`,r),t[4]=r,t[5]=a);let o;return t[6]!==n||t[7]!==i||t[8]!==a?(o=(0,X.jsx)(`div`,{...i,className:a,children:n}),t[6]=n,t[7]=i,t[8]=a,t[9]=o):o=t[9],o},iu=e=>{let t=(0,Y.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n}),t[0]=n,t[1]=r),r},au=e=>{let t=(0,Y.c)(5),{title:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,X.jsx)(ru,{children:n}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,X.jsxs)(`div`,{className:`flex flex-col gap-4 pb-4`,children:[i,r]}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a},ou=[{label:`Auto (Default)`,value:`auto`},{label:`Native`,value:`native`},{label:`Polars`,value:`polars`},{label:`Lazy Polars`,value:`lazy-polars`},{label:`Pandas`,value:`pandas`}],su=`us-east-1.us-east-2.us-west-1.us-west-2.ap-northeast-1.ap-northeast-2.ap-northeast-3.ap-south-1.ap-south-2.ap-southeast-1.ap-southeast-2.ap-southeast-3.ap-southeast-4.ap-southeast-5.ap-southeast-7.ap-east-2.ca-central-1.eu-central-1.eu-central-2.eu-north-1.eu-south-1.eu-south-2.eu-west-1.eu-west-2.eu-west-3.il-central-1.me-central-1.sa-east-1.us-gov-east-1.us-gov-west-1`.split(`.`),cu=e=>{let t=(0,Y.c)(12),{value:n,includeSuggestion:r}=e,i=r===void 0||r;if(!n||n.includes(`/`))return null;let a;t[0]===n?a=t[1]:(a=Bs.parse(n),t[0]=n,t[1]=a);let o=a.id,s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(`code`,{className:`font-bold`,children:`provider/model`}),t[2]=s):s=t[2];let c;t[3]===n?c=t[4]:(c=(0,X.jsxs)(`span`,{children:[`Model id should be in the form`,` `,s,`. `,n,` is missing a provider.`]}),t[3]=n,t[4]=c);let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(`br`,{}),t[5]=l):l=t[5];let u;t[6]!==i||t[7]!==o?(u=i&&o&&(0,X.jsxs)(`span`,{children:[`Did you mean `,(0,X.jsx)(`code`,{className:`font-bold`,children:o}),`?`]}),t[6]=i,t[7]=o,t[8]=u):u=t[8];let d;return t[9]!==c||t[10]!==u?(d=(0,X.jsxs)(Cr,{kind:`danger`,className:`mt-1`,children:[c,l,u]}),t[9]=c,t[10]=u,t[11]=d):d=t[11],d};function lu({userConfig:e,overrides:t,name:n,value:r}){let i=ce(e,n),a=ce(t,n),o=Se(t,n);return{isOverridden:o,userValue:i,projectValue:a,value:o?a:r}}function uu(){let e=(0,Y.c)(3),[t]=fe(),n=a(ye),r;return e[0]!==n||e[1]!==t?(r=(e,r)=>lu({userConfig:t,overrides:n,name:e,value:r}),e[0]=n,e[1]=t,e[2]=r):r=e[2],r}function Q(e){let t=(0,Y.c)(9),{control:n,name:r,disabled:i,render:a}=e,o=uu(),s;t[0]!==o||t[1]!==r||t[2]!==a?(s=e=>{let{field:t}=e;return a({field:t,override:o(r,t.value)})},t[0]=o,t[1]=r,t[2]=a,t[3]=s):s=t[3];let c;return t[4]!==n||t[5]!==i||t[6]!==r||t[7]!==s?(c=(0,X.jsx)(f,{control:n,name:r,disabled:i,render:s}),t[4]=n,t[5]=i,t[6]=r,t[7]=s,t[8]=c):c=t[8],c}var du=()=>{let e=(0,Y.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsxs)(`p`,{children:[`This setting is overridden by the`,` `,(0,X.jsx)(mr,{className:`inline mx-px`,children:`pyproject.toml`}),` config.`]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsxs)(X.Fragment,{children:[t,(0,X.jsxs)(`p`,{children:[`To change it, edit the project config`,` `,(0,X.jsx)(mr,{className:`inline mx-px`,children:`pyproject.toml`}),` directly.`]})]}),e[1]=n):n=e[1],n},fu=e=>{let t=(0,Y.c)(6),{name:n,children:r}=e,i=uu(),a;t[0]!==n||t[1]!==i?(a=i(n,void 0),t[0]=n,t[1]=i,t[2]=a):a=t[2];let{isOverridden:o}=a,s;return t[3]!==r||t[4]!==o?(s=o?(0,X.jsx)(ct,{delayDuration:200,content:(0,X.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,X.jsx)(du,{})}),children:(0,X.jsx)(`div`,{className:`text-muted-foreground opacity-80 cursor-not-allowed *:pointer-events-none`,children:r})}):r,t[3]=r,t[4]=o,t[5]=s):s=t[5],s},$=e=>{let t=(0,Y.c)(12),{override:n}=e;if(!n.isOverridden)return null;let r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,X.jsx)(du,{}),t[0]=r):r=t[0];let i=String(n.userValue),a;t[1]===i?a=t[2]:(a=(0,X.jsx)(`strong`,{children:i}),t[1]=i,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(`br`,{}),t[3]=o):o=t[3];let s=String(n.projectValue),c;t[4]===s?c=t[5]:(c=(0,X.jsx)(`strong`,{children:s}),t[4]=s,t[5]=c);let l;t[6]!==a||t[7]!==c?(l=(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[r,(0,X.jsxs)(`p`,{children:[`User value: `,a,o,`Project value: `,c]})]}),t[6]=a,t[7]=c,t[8]=l):l=t[8];let u;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsxs)(`span`,{className:`text-(--amber-12) text-xs flex items-center gap-1 border rounded px-2 py-1 bg-(--amber-2) border-(--amber-6) ml-1`,children:[(0,X.jsx)(ti,{className:`w-3 h-3`}),`Overridden by pyproject.toml`]}),t[9]=u):u=t[9];let d;return t[10]===l?d=t[11]:(d=(0,X.jsx)(ct,{content:l,children:u}),t[10]=l,t[11]=d),d};function pu(){let e=(0,Y.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],nr(mu,t)}async function mu(){return Mr.get(`/ai/mcp/status`)}function hu(){let[e,t]=(0,J.useState)(!1);return{refresh:async()=>{t(!0);try{await Mr.post(`/ai/mcp/refresh`,{}),Sn({title:`MCP refreshed`,description:`MCP server configuration has been refreshed successfully`})}catch(e){Sn({title:`Refresh failed`,description:e instanceof Error?e.message:`Failed to refresh MCP`,variant:`danger`})}finally{t(!1)}},isRefreshing:e}}var gu=()=>{let e=(0,Y.c)(29),{data:t,refetch:n,isFetching:r}=pu(),i;e[0]===n?i=e[1]:(i=async()=>{try{await Mr.post(`/ai/mcp/refresh`,{}),Sn({title:`MCP refreshed`,description:`MCP server configuration has been refreshed`}),n()}catch(e){let t=e;Sn({title:`Refresh failed`,description:t instanceof Error?t.message:`Failed to refresh MCP`,variant:`danger`})}},e[0]=n,e[1]=i);let a=i,o;e[2]===t?.servers?o=e[3]:(o=t?.servers||{},e[2]=t?.servers,e[3]=o);let s=o,c;e[4]===s?c=e[5]:(c=Object.keys(s),e[4]=s,e[5]=c);let l=c.length>0,u=t?.status===`ok`&&`text-green-500`,d=t?.status===`partial`&&`text-yellow-500`,f=t?.status===`error`&&l&&`text-red-500`,p;e[6]!==u||e[7]!==d||e[8]!==f?(p=Re(`h-4 w-4`,u,d,f),e[6]=u,e[7]=d,e[8]=f,e[9]=p):p=e[9];let m;e[10]===p?m=e[11]:(m=(0,X.jsx)(ct,{content:`MCP Status`,children:(0,X.jsx)(I,{asChild:!0,children:(0,X.jsx)(q,{variant:`text`,size:`icon`,children:(0,X.jsx)(ri,{className:p})})})}),e[10]=p,e[11]=m);let h;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,X.jsx)(`h4`,{className:`font-medium text-sm`,children:`MCP Server Status`}),e[12]=h):h=e[12];let g;e[13]===r?g=e[14]:(g=r?(0,X.jsx)(Pr,{className:`h-3 w-3 animate-spin`}):(0,X.jsx)(jr,{className:`h-3 w-3`}),e[13]=r,e[14]=g);let _;e[15]!==a||e[16]!==r||e[17]!==g?(_=(0,X.jsxs)(`div`,{className:`flex items-center justify-between`,children:[h,(0,X.jsx)(q,{variant:`ghost`,size:`xs`,onClick:a,disabled:r,children:g})]}),e[15]=a,e[16]=r,e[17]=g,e[18]=_):_=e[18];let v;e[19]!==l||e[20]!==s||e[21]!==t?(v=t&&(0,X.jsxs)(`div`,{className:`text-xs space-y-2`,children:[l&&(0,X.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:`Overall:`}),(0,X.jsx)(_u,{status:t.status})]}),t.error&&(0,X.jsx)(`div`,{className:`text-xs text-red-500 bg-red-50 dark:bg-red-950/20 p-2 rounded`,children:t.error}),l&&(0,X.jsxs)(`div`,{className:`space-y-1`,children:[(0,X.jsx)(`div`,{className:`text-muted-foreground font-medium`,children:`Servers:`}),Object.entries(s).map(vu)]}),!l&&(0,X.jsxs)(`div`,{className:`text-muted-foreground text-center py-2`,children:[`No MCP servers configured. `,(0,X.jsx)(`br`,{}),` Configure under`,` `,(0,X.jsx)(`b`,{children:`Settings > AI > MCP`})]})]}),e[19]=l,e[20]=s,e[21]=t,e[22]=v):v=e[22];let y;e[23]!==_||e[24]!==v?(y=(0,X.jsx)(ne,{className:`w-[320px]`,align:`start`,side:`right`,children:(0,X.jsxs)(`div`,{className:`space-y-3`,children:[_,v]})}),e[23]=_,e[24]=v,e[25]=y):y=e[25];let b;return e[26]!==y||e[27]!==m?(b=(0,X.jsxs)(F,{children:[m,y]}),e[26]=y,e[27]=m,e[28]=b):b=e[28],b},_u=e=>{let t=(0,Y.c)(11),{status:n}=e,r=n===`ok`&&`text-green-500`,i=n===`partial`&&`text-yellow-500`,a=n===`error`&&`text-red-500`,o=n===`failed`&&`text-red-500`,s=n===`disconnected`&&`text-gray-500`,c=n===`pending`&&`text-yellow-500`,l=n===`connected`&&`text-green-500`,u;t[0]!==r||t[1]!==i||t[2]!==a||t[3]!==o||t[4]!==s||t[5]!==c||t[6]!==l?(u=Re(`text-xs font-medium`,r,i,a,o,s,c,l),t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;return t[8]!==n||t[9]!==u?(d=(0,X.jsx)(`span`,{className:u,children:n}),t[8]=n,t[9]=u,t[10]=d):d=t[10],d};function vu(e){let[t,n]=e;return(0,X.jsxs)(`div`,{className:`flex justify-between items-center pl-2`,children:[(0,X.jsx)(`span`,{className:`text-muted-foreground truncate max-w-[180px]`,children:t}),(0,X.jsx)(_u,{status:n})]},t)}var yu=[{id:`marimo`,title:`marimo (docs)`,description:`Access marimo documentation`},{id:`context7`,title:`Context7`,description:`Connect to Context7 MCP server`}],bu=e=>{let t=(0,Y.c)(36),{form:n,onSubmit:r}=e,{handleClick:i}=sf(),{data:a,refetch:o,isFetching:s}=pu(),{refresh:c,isRefreshing:l}=hu(),u;t[0]!==o||t[1]!==c?(u=async()=>{await c(),o()},t[0]=o,t[1]=c,t[2]=u):u=t[2];let d=u,p;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(ru,{children:`MCP Servers`}),t[3]=p):p=t[3];let m;t[4]===a?m=t[5]:(m=a&&(0,X.jsx)(_u,{status:a.status}),t[4]=a,t[5]=m);let h=l||s,g;t[6]!==s||t[7]!==l?(g=l||s?(0,X.jsx)(Pr,{className:`h-3 w-3 animate-spin`}):(0,X.jsx)(jr,{className:`h-3 w-3`}),t[6]=s,t[7]=l,t[8]=g):g=t[8];let _;t[9]!==d||t[10]!==h||t[11]!==g?(_=(0,X.jsx)(q,{variant:`outline`,size:`xs`,onClick:d,disabled:h,children:g}),t[9]=d,t[10]=h,t[11]=g,t[12]=_):_=t[12];let v;t[13]!==m||t[14]!==_?(v=(0,X.jsxs)(`div`,{className:`flex items-center justify-between`,children:[p,(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[m,_]})]}),t[13]=m,t[14]=_,t[15]=v):v=t[15];let y;t[16]===a?y=t[17]:(y=a?.error&&(0,X.jsx)(`div`,{className:`text-xs text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950/20 p-2 rounded`,children:a.error}),t[16]=a,t[17]=y);let b;t[18]===a?b=t[19]:(b=a?.servers&&(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:Object.entries(a.servers).map(xu)}),t[18]=a,t[19]=b);let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Enable Model Context Protocol (MCP) servers to provide additional capabilities and data sources for AI features.`}),t[20]=x):x=t[20];let S;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,X.jsx)(mr,{className:`inline`,children:`marimo[mcp]`}),t[21]=S):S=t[21];let C;t[22]===i?C=t[23]:(C=(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`This feature requires the `,S,` `,`package. See`,` `,(0,X.jsx)(q,{variant:`link`,onClick:()=>i(`optionalDeps`),size:`xs`,children:`Optional Features`}),` `,`for more details.`]}),t[22]=i,t[23]=C);let w;t[24]!==n||t[25]!==r?(w=e=>{let{field:t}=e,i=t.value||[],a=e=>{let a=i.includes(e)?i.filter(t=>t!==e):[...i,e];t.onChange(a),r(n.getValues())};return(0,X.jsx)(z,{children:(0,X.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:yu.map(e=>{let t=i.includes(e.id);return(0,X.jsxs)(Kr,{className:`cursor-pointer transition-all ${t?`border-(--blue-9) bg-(--blue-2)`:`hover:border-(--blue-7)`}`,onClick:()=>a(e.id),children:[(0,X.jsx)(Ur,{children:(0,X.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,X.jsx)(Hr,{className:`text-base`,children:e.title}),(0,X.jsx)(`span`,{className:`h-5 w-5 flex items-center justify-center rounded border ${t?`border-(--blue-7) bg-(--blue-7) text-foreground`:`border-muted bg-background text-muted-foreground`}`,children:t?(0,X.jsx)(ii,{}):null})]})}),(0,X.jsx)(Wr,{children:(0,X.jsx)(Gr,{children:e.description})})]},e.id)})})})},t[24]=n,t[25]=r,t[26]=w):w=t[26];let T;t[27]!==n.control||t[28]!==w?(T=(0,X.jsx)(f,{control:n.control,name:`mcp.presets`,render:w}),t[27]=n.control,t[28]=w,t[29]=T):T=t[29];let E;return t[30]!==C||t[31]!==T||t[32]!==v||t[33]!==y||t[34]!==b?(E=(0,X.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[v,y,b,x,C,T]}),t[30]=C,t[31]=T,t[32]=v,t[33]=y,t[34]=b,t[35]=E):E=t[35],E};function xu(e){let[t,n]=e;return(0,X.jsxs)(`div`,{children:[t,`: `,(0,X.jsx)(_u,{status:n})]},t)}var Su=new Set(zs);Su.delete(`deepseek`);var Cu=e=>{let t=(0,Y.c)(5),{provider:n,children:r}=e,i;t[0]===n?i=t[1]:(i=n&&(0,X.jsx)(Ml,{provider:n,className:`mr-2`}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,X.jsxs)(`div`,{className:`flex items-center text-base font-semibold`,children:[i,r]}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a},wu=e=>{let t=(0,Y.c)(9),{form:n,name:r,placeholder:i,testId:a,description:o,onChange:s}=e,c;t[0]!==o||t[1]!==s||t[2]!==i||t[3]!==a?(c=e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`API Key`}),(0,X.jsx)(A,{children:(0,X.jsx)(pn,{"data-testid":a,rootClassName:`flex-1`,className:`m-0 inline-flex h-7`,placeholder:i,type:`password`,...t,value:Tu(n.value),disabled:n.isOverridden,onChange:e=>{let n=e.target.value;n.includes(`*`)||(t.onChange(n),s?.(n))}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),o&&(0,X.jsx)(N,{children:o})]})},t[0]=o,t[1]=s,t[2]=i,t[3]=a,t[4]=c):c=t[4];let l;return t[5]!==n.control||t[6]!==r||t[7]!==c?(l=(0,X.jsx)(Q,{control:n.control,name:r,render:c}),t[5]=n.control,t[6]=r,t[7]=c,t[8]=l):l=t[8],l};function Tu(e){return e==null?``:typeof e==`string`?e:String(e)}var Eu=e=>{let t=(0,Y.c)(10),{form:n,name:r,placeholder:i,testId:a,description:o,disabled:s,onChange:c}=e,l=s!==void 0&&s,u;t[0]!==o||t[1]!==l||t[2]!==c||t[3]!==i||t[4]!==a?(u=e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Base URL`}),(0,X.jsx)(A,{children:(0,X.jsx)(pn,{"data-testid":a,rootClassName:`flex-1`,className:`m-0 inline-flex h-7`,placeholder:i,...t,value:Tu(n.value),disabled:l||n.isOverridden,onChange:e=>{t.onChange(e.target.value),c?.(e.target.value)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),o&&(0,X.jsx)(N,{children:o})]})},t[0]=o,t[1]=l,t[2]=c,t[3]=i,t[4]=a,t[5]=u):u=t[5];let d;return t[6]!==n.control||t[7]!==r||t[8]!==u?(d=(0,X.jsx)(Q,{control:n.control,name:r,render:u}),t[6]=n.control,t[7]=r,t[8]=u,t[9]=d):d=t[9],d},Du=e=>{let t=(0,Y.c)(11),{form:n,name:r,placeholder:i,description:a,label:o,forRole:s,onSubmit:c}=e,l;t[0]!==a||t[1]!==s||t[2]!==n||t[3]!==o||t[4]!==c||t[5]!==i?(l=e=>{let{field:t,override:r}=e,l=Tu(r.value),u=r.isOverridden;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:o}),(0,X.jsx)(A,{children:(0,X.jsx)(cf,{value:l,placeholder:i,onSelect:e=>{t.onChange(e),c(n.getValues())},disabled:u,triggerClassName:`text-sm`,customDropdownContent:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(et,{}),(0,X.jsxs)(`p`,{className:`px-2 py-1.5 text-sm text-muted-secondary flex items-center gap-1`,children:[`Enter a custom model`,(0,X.jsx)(ct,{content:`Models should include the provider prefix, e.g. 'openai/gpt-4o'`,children:(0,X.jsx)(H,{className:`h-3 w-3`})})]}),(0,X.jsxs)(`div`,{className:`px-2 py-1`,children:[(0,X.jsx)(pn,{className:`w-full border-border shadow-none focus-visible:shadow-xs`,placeholder:i,...t,value:l,disabled:u,onKeyDown:ut.stopPropagation()}),l&&(0,X.jsx)(cu,{value:l,includeSuggestion:!1})]})]}),forRole:s})}),(0,X.jsx)(V,{})]}),(0,X.jsx)($,{override:r}),(0,X.jsx)(cu,{value:l}),a&&(0,X.jsx)(N,{children:a})]})},t[0]=a,t[1]=s,t[2]=n,t[3]=o,t[4]=c,t[5]=i,t[6]=l):l=t[6];let u;return t[7]!==n.control||t[8]!==r||t[9]!==l?(u=(0,X.jsx)(Q,{control:n.control,name:r,render:l}),t[7]=n.control,t[8]=r,t[9]=l,t[10]=u):u=t[10],u},Ou=e=>{let t=(0,Y.c)(8),{form:n,name:r,options:i,testId:a,disabled:o}=e,s=o!==void 0&&o,c;t[0]!==s||t[1]!==i||t[2]!==a?(c=e=>{let{field:t,override:n}=e;return(0,X.jsx)(`div`,{className:`flex flex-col space-y-1`,children:(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Provider`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":a,onChange:e=>{e.target.value===`none`?t.onChange(!1):t.onChange(e.target.value)},value:Tu(n.value===!0?`github`:n.value===!1?`none`:n.value),disabled:s||n.isOverridden,className:`inline-flex mr-2`,children:i.map(Ku)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]})})},t[0]=s,t[1]=i,t[2]=a,t[3]=c):c=t[3];let l;return t[4]!==n.control||t[5]!==r||t[6]!==c?(l=(0,X.jsx)(Q,{control:n.control,name:r,render:c}),t[4]=n.control,t[5]=r,t[6]=c,t[7]=l):l=t[7],l},ku=({form:e,config:t,onSubmit:n,copilot:r})=>{if(r===!1)return null;if(r===`codeium`)return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{className:`text-sm text-muted-secondary`,children:[`To get a Windsurf API key, follow`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/guides/editor_features/ai_completion.html#windsurf-copilot`,children:`these instructions`}),`.`]}),(0,X.jsx)(wu,{form:e,config:t,name:`completion.codeium_api_key`,placeholder:`key`,testId:`codeium-api-key-input`})]});if(r===`github`)return(0,X.jsx)(fl,{});if(r===`custom`)return(0,X.jsx)(Du,{label:`Autocomplete Model`,form:e,config:t,name:`ai.models.autocomplete_model`,placeholder:`ollama/qwen2.5-coder:1.5b`,description:`Model to use for code completion when using a custom provider.`,onSubmit:n,forRole:`autocomplete`})},Au=e=>{let t=(0,Y.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=Re(`flex flex-col gap-4 pb-4`,r),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,X.jsx)(`div`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a},ju=e=>{let t=(0,Y.c)(23),{qualifiedId:n,model:r,isEnabled:i,onToggle:a,onDelete:o}=e,s;t[0]!==a||t[1]!==n?(s=()=>{a(n)},t[0]=a,t[1]=n,t[2]=s):s=t[2];let c=s,l;t[3]!==o||t[4]!==n?(l=e=>{e.stopPropagation(),e.preventDefault(),o(n)},t[3]=o,t[4]=n,t[5]=l):l=t[5];let u=l,d;t[6]===r?d=t[7]:(d=(0,X.jsx)(Mu,{model:r}),t[6]=r,t[7]=d);let f;t[8]!==u||t[9]!==r.custom?(f=r.custom&&(0,X.jsx)(q,{variant:`ghost`,size:`icon`,onClick:u,className:`mr-2 hover:bg-transparent`,children:(0,X.jsx)(bn,{className:`h-3.5 w-3.5 text-muted-foreground`})}),t[8]=u,t[9]=r.custom,t[10]=f):f=t[10];let p;t[11]!==c||t[12]!==i?(p=(0,X.jsx)(hr,{checked:i,onClick:c,size:`sm`}),t[11]=c,t[12]=i,t[13]=p):p=t[13];let m;t[14]!==d||t[15]!==f||t[16]!==p?(m=(0,X.jsx)(As,{children:(0,X.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2.5 border-b last:border-b-0 cursor-pointer outline-hidden`,children:[d,f,p]})}),t[14]=d,t[15]=f,t[16]=p,t[17]=m):m=t[17];let h;return t[18]!==c||t[19]!==r.name||t[20]!==n||t[21]!==m?(h=(0,X.jsx)(Ns,{id:n,textValue:r.name,className:`pl-6 outline-hidden data-focused:bg-muted/50 hover:bg-muted/50`,onAction:c,children:m}),t[18]=c,t[19]=r.name,t[20]=n,t[21]=m,t[22]=h):h=t[22],h},Mu=e=>{let t=(0,Y.c)(18),{model:n}=e,r;t[0]===n.name?r=t[1]:(r=(0,X.jsx)(`h3`,{className:`font-medium text-sm`,children:n.name}),t[0]=n.name,t[1]=r);let i;t[2]===n.custom?i=t[3]:(i=n.custom&&(0,X.jsx)(L,{className:`h-4 w-4`}),t[2]=n.custom,t[3]=i);let a;t[4]===i?a=t[5]:(a=(0,X.jsx)(ct,{content:`Custom model`,children:i}),t[4]=i,t[5]=a);let o;t[6]===n.capabilities?o=t[7]:(o=n.capabilities.includes(`thinking`)&&(0,X.jsxs)(`div`,{className:Re(`flex items-center gap-1 rounded px-1 py-0.5 w-fit`,Nl(`thinking`)),children:[(0,X.jsx)(Zr,{className:`h-3 w-3`}),(0,X.jsx)(`span`,{className:`text-xs font-medium`,children:`Reasoning`})]}),t[6]=n.capabilities,t[7]=o);let s;t[8]!==r||t[9]!==a||t[10]!==o?(s=(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r,a,o]}),t[8]=r,t[9]=a,t[10]=o,t[11]=s):s=t[11];let c;t[12]!==n.custom||t[13]!==n.description?(c=n.description&&!n.custom&&(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground line-clamp-2`,children:n.description}),t[12]=n.custom,t[13]=n.description,t[14]=c):c=t[14];let l;return t[15]!==s||t[16]!==c?(l=(0,X.jsxs)(`div`,{className:`flex flex-col flex-1 gap-0.5`,children:[s,c]}),t[15]=s,t[16]=c,t[17]=l):l=t[17],l},Nu=e=>{let t=(0,Y.c)(14),{form:n,config:r,onSubmit:i}=e,a=uu(),o;t[0]===n.control?o=t[1]:(o={control:n.control,name:`completion.copilot`},t[0]=n.control,t[1]=o);let s=p(o),c;if(t[2]!==r||t[3]!==n||t[4]!==a||t[5]!==i||t[6]!==s){let{value:e}=a(`completion.copilot`,s),o,l;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(ru,{children:`Code Completion`}),l=(0,X.jsx)(`p`,{className:`text-sm text-muted-secondary`,children:`Choose GitHub Copilot, Codeium, or a custom provider (such as Ollama) to enable AI-powered code completion.`}),t[8]=o,t[9]=l):(o=t[8],l=t[9]);let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=[`none`,`github`,`codeium`,`custom`],t[10]=u):u=t[10];let d;t[11]!==r||t[12]!==n?(d=(0,X.jsx)(Ou,{form:n,config:r,name:`completion.copilot`,options:u,testId:`copilot-select`}),t[11]=r,t[12]=n,t[13]=d):d=t[13],c=(0,X.jsxs)(Au,{children:[o,l,d,ku({form:n,config:r,onSubmit:i,copilot:e})]}),t[2]=r,t[3]=n,t[4]=a,t[5]=i,t[6]=s,t[7]=c}else c=t[7];return c};function Pu(){return a(be).ai?.allow_provider_config!==!1}var Fu=e=>{let t=(0,Y.c)(15),{title:n,triggerClassName:r,provider:i,children:a,isConfigured:o,value:s}=e,c=s??i,l;t[0]===o?l=t[1]:(l=o&&(0,X.jsx)(`span`,{className:`ml-2 px-1 rounded bg-muted text-xs font-medium border`,children:`Configured`}),t[0]=o,t[1]=l);let u;t[2]!==i||t[3]!==l||t[4]!==n?(u=(0,X.jsxs)(Cu,{provider:i,children:[n,l]}),t[2]=i,t[3]=l,t[4]=n,t[5]=u):u=t[5];let d;t[6]!==u||t[7]!==r?(d=(0,X.jsx)(Ue,{className:r,children:u}),t[6]=u,t[7]=r,t[8]=d):d=t[8];let f;t[9]===a?f=t[10]:(f=(0,X.jsx)(Ve,{wrapperClassName:`flex flex-col gap-4`,children:a}),t[9]=a,t[10]=f);let p;return t[11]!==c||t[12]!==d||t[13]!==f?(p=(0,X.jsxs)(Be,{value:c,children:[d,f]}),t[11]=c,t[12]=d,t[13]=f,t[14]=p):p=t[14],p},Iu=({form:e,config:t,onSubmit:n})=>{let[r,i]=(0,J.useState)(!1),[a,o]=(0,J.useState)(``),[s,c]=(0,J.useState)(``),[l,u]=(0,J.useState)(``),d=(0,J.useId)(),p=(0,J.useId)(),m=(0,J.useId)(),h=a.toLowerCase().replaceAll(/\s+/g,`_`),g=e.watch(`ai.custom_providers`),_=Su.has(h)||g&&Object.keys(g).includes(h),v=h.includes(`.`),y=h.trim()&&l.trim()&&!_&&!v,b=()=>{o(``),c(``),u(``),i(!1)};return(0,X.jsx)(f,{control:e.control,name:`ai.custom_providers`,render:({field:f})=>{let g=f.value||{},x=Object.entries(g),S=()=>{y&&(f.onChange({...g,[h]:{api_key:s||void 0,base_url:l}}),n(e.getValues()),b())},C=t=>{let{[t]:r,...i}=g;e.resetField(`ai.custom_providers`),e.setValue(`ai.custom_providers`,i,{shouldDirty:!0}),n(e.getValues())},w=(0,X.jsxs)(`div`,{className:`flex flex-col gap-3 p-4 border border-border rounded-md bg-muted/20`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,X.jsx)(Ke,{htmlFor:d,children:`Provider Name`}),(0,X.jsx)(pn,{id:d,placeholder:`e.g., together, groq, mistral`,value:a,onChange:e=>o(e.target.value)}),_&&(0,X.jsx)(`p`,{className:`text-xs text-destructive`,children:`A provider with this name already exists.`}),v&&(0,X.jsx)(`p`,{className:`text-xs text-destructive`,children:`Provider names cannot contain '.' characters.`}),a&&!v&&(0,X.jsxs)(`p`,{className:`text-xs text-muted-secondary`,children:[`Use models with prefix:`,` `,(0,X.jsxs)(mr,{className:`inline text-xs`,children:[h,`/`]})]})]}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,X.jsxs)(Ke,{htmlFor:m,children:[`Base URL `,(0,X.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,X.jsx)(pn,{id:m,placeholder:`e.g., https://api.together.xyz/v1`,value:l,onChange:e=>u(e.target.value)})]}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,X.jsx)(Ke,{htmlFor:p,children:`API Key (optional)`}),(0,X.jsx)(pn,{id:p,placeholder:`sk-...`,type:`password`,value:s,onChange:e=>c(e.target.value)})]}),(0,X.jsxs)(`div`,{className:`flex gap-2 mt-1`,children:[(0,X.jsx)(q,{onClick:S,disabled:!y,size:`xs`,children:`Add Provider`}),(0,X.jsx)(q,{variant:`outline`,onClick:b,size:`xs`,children:`Cancel`})]})]}),T=e=>{f.onChange({...g,[e.providerName]:{...g[e.providerName],[e.fieldName]:e.value||void 0}})},E=({providerName:n,providerConfig:r,onRemove:i})=>{let a=Kn.startCase(n),o=!!r.api_key||!!r.base_url;return(0,X.jsxs)(Fu,{title:a,provider:n,value:`custom-${n}`,isConfigured:o,children:[(0,X.jsx)(wu,{form:e,config:t,name:`ai.custom_providers.${n}.api_key`,placeholder:`sk-...`,testId:`custom-provider-${n}-api-key`,onChange:e=>T({providerName:n,fieldName:`api_key`,value:e})}),(0,X.jsx)(Eu,{form:e,config:t,name:`ai.custom_providers.${n}.base_url`,placeholder:`https://api.example.com/v1`,testId:`custom-provider-${n}-base-url`,onChange:e=>T({providerName:n,fieldName:`base_url`,value:e})}),(0,X.jsxs)(q,{variant:`destructive`,size:`xs`,onClick:e=>{e.stopPropagation(),e.preventDefault(),i(n)},className:`w-fit self-end`,children:[(0,X.jsx)(bn,{className:`h-4 w-4 mr-2`}),`Remove Provider`]})]},`custom-${n}`)};return(0,X.jsxs)(Au,{children:[(0,X.jsx)(ru,{children:`Custom Providers`}),(0,X.jsx)(`p`,{className:`text-sm text-muted-secondary`,children:`Add your own OpenAI-compatible provider. Once added, you can configure models in the AI Models tab.`}),x.length>0&&(0,X.jsx)(We,{type:`multiple`,className:`-mt-4`,children:x.map(([e,t])=>E({providerName:e,providerConfig:t,onRemove:C}))}),r?w:(0,X.jsx)(Uu,{className:`self-start`,isFormOpen:r,setIsFormOpen:i,label:`Add Provider`})]})}})},Lu=()=>{let e=(0,Y.c)(3),t=a(be).ai,n;if(e[0]!==t){let r=Cc(t),i;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,X.jsx)(`p`,{className:`text-sm text-muted-secondary`,children:`AI providers are configured for this environment. You cannot add your own keys or custom providers.`}),e[2]=i):i=e[2],n=(0,X.jsxs)(Au,{children:[i,r.length===0?(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No AI providers are configured.`}):(0,X.jsx)(`div`,{className:`flex flex-col divide-y border rounded-md`,children:r.map(qu)})]}),e[0]=t,e[1]=n}else n=e[1];return n},Ru=e=>{let t=(0,Y.c)(121),{form:n,config:r,onSubmit:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=Me(),t[0]=a):a=t[0];let o=a,s=Pu(),c;t[1]===n?c=t[2]:(c=e=>!!n.getValues(e),t[1]=n,t[2]=c);let l=c;if(!s){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,X.jsx)(Lu,{}),t[3]=e):e=t[3],e}let u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsx)(mr,{className:`inline`,children:`marimo.toml`}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsxs)(`p`,{className:`text-sm text-muted-secondary`,children:[`Add your API keys below or to `,u,` `,`to set up a provider for the Code Completion and Assistant features; see`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/guides/editor_features/ai_completion/#connecting-to-an-llm`,children:`docs`}),` `,`for more info.`]}),t[5]=d):d=t[5];let f=l(`ai.open_ai.api_key`),p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsxs)(X.Fragment,{children:[`Your OpenAI API key from`,` `,(0,X.jsx)(bt,{href:`https://platform.openai.com/account/api-keys`,children:`platform.openai.com`}),`.`]}),t[6]=p):p=t[6];let m,h;t[7]!==r||t[8]!==n?(m=(0,X.jsx)(wu,{form:n,config:r,name:`ai.open_ai.api_key`,placeholder:`sk-proj...`,testId:`ai-openai-api-key-input`,description:p}),h=(0,X.jsx)(Eu,{form:n,config:r,name:`ai.open_ai.base_url`,placeholder:`https://api.openai.com/v1`,testId:`ai-base-url-input`,disabled:o}),t[7]=r,t[8]=n,t[9]=m,t[10]=h):(m=t[9],h=t[10]);let g;t[11]!==f||t[12]!==m||t[13]!==h?(g=(0,X.jsxs)(Fu,{title:`OpenAI`,provider:`openai`,triggerClassName:`pt-0`,isConfigured:f,children:[m,h]}),t[11]=f,t[12]=m,t[13]=h,t[14]=g):g=t[14];let _=l(`ai.github.api_key`),v;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(mr,{className:`inline`,children:`gh auth token`}),t[15]=v):v=t[15];let y;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsxs)(X.Fragment,{children:[`Your GitHub OAuth token. Run`,` `,v,` after you sign in with the GitHub CLI. A GitHub Copilot subscription is required. See the`,` `,(0,X.jsx)(bt,{href:`https://pydantic.dev/docs/ai/models/github-copilot/`,children:`authentication guide`}),`.`]}),t[16]=y):y=t[16];let b,x;t[17]!==r||t[18]!==n?(b=(0,X.jsx)(wu,{form:n,config:r,name:`ai.github.api_key`,placeholder:`gho_...`,testId:`ai-github-copilot-api-key-input`,description:y}),x=(0,X.jsx)(Eu,{form:n,config:r,name:`ai.github.base_url`,placeholder:`https://api.githubcopilot.com`,testId:`ai-github-copilot-base-url-input`}),t[17]=r,t[18]=n,t[19]=b,t[20]=x):(b=t[19],x=t[20]);let S;t[21]!==_||t[22]!==b||t[23]!==x?(S=(0,X.jsxs)(Fu,{title:`GitHub Copilot`,provider:`github`,isConfigured:_,children:[b,x]}),t[21]=_,t[22]=b,t[23]=x,t[24]=S):S=t[24];let C=l(`ai.anthropic.api_key`),w;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,X.jsxs)(X.Fragment,{children:[`Your Anthropic API key from`,` `,(0,X.jsx)(bt,{href:`https://console.anthropic.com/settings/keys`,children:`console.anthropic.com`}),`.`]}),t[25]=w):w=t[25];let T;t[26]!==r||t[27]!==n?(T=(0,X.jsx)(wu,{form:n,config:r,name:`ai.anthropic.api_key`,placeholder:`sk-ant...`,testId:`ai-anthropic-api-key-input`,description:w}),t[26]=r,t[27]=n,t[28]=T):T=t[28];let E;t[29]!==C||t[30]!==T?(E=(0,X.jsx)(Fu,{title:`Anthropic`,provider:`anthropic`,isConfigured:C,children:T}),t[29]=C,t[30]=T,t[31]=E):E=t[31];let D=l(`ai.google.api_key`),O;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,X.jsxs)(X.Fragment,{children:[`Your Google AI API key from`,` `,(0,X.jsx)(bt,{href:`https://aistudio.google.com/app/apikey`,children:`aistudio.google.com`}),`.`]}),t[32]=O):O=t[32];let k;t[33]!==r||t[34]!==n?(k=(0,X.jsx)(wu,{form:n,config:r,name:`ai.google.api_key`,placeholder:`AI...`,testId:`ai-google-api-key-input`,description:O}),t[33]=r,t[34]=n,t[35]=k):k=t[35];let A;t[36]!==D||t[37]!==k?(A=(0,X.jsx)(Fu,{title:`Google`,provider:`google`,isConfigured:D,children:k}),t[36]=D,t[37]=k,t[38]=A):A=t[38];let j=l(`ai.ollama.base_url`),M;t[39]!==r||t[40]!==n?(M=(0,X.jsx)(Eu,{form:n,config:r,name:`ai.ollama.base_url`,placeholder:`http://localhost:11434/v1`,testId:`ollama-base-url-input`}),t[39]=r,t[40]=n,t[41]=M):M=t[41];let N;t[42]!==j||t[43]!==M?(N=(0,X.jsx)(Fu,{title:`Ollama`,provider:`ollama`,isConfigured:j,children:M}),t[42]=j,t[43]=M,t[44]=N):N=t[44];let P=l(`ai.openrouter.api_key`),F;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,X.jsxs)(X.Fragment,{children:[`Your OpenRouter API key from `,``,(0,X.jsx)(bt,{href:`https://openrouter.ai/keys`,children:`openrouter.ai`}),`.`]}),t[45]=F):F=t[45];let I,L;t[46]!==r||t[47]!==n?(I=(0,X.jsx)(wu,{form:n,config:r,name:`ai.openrouter.api_key`,placeholder:`or-...`,testId:`ai-openrouter-api-key-input`,description:F}),L=(0,X.jsx)(Eu,{form:n,config:r,name:`ai.openrouter.base_url`,placeholder:`https://openrouter.ai/api/v1/`,testId:`ai-openrouter-base-url-input`}),t[46]=r,t[47]=n,t[48]=I,t[49]=L):(I=t[48],L=t[49]);let R;t[50]!==P||t[51]!==I||t[52]!==L?(R=(0,X.jsxs)(Fu,{title:`OpenRouter`,provider:`openrouter`,isConfigured:P,children:[I,L]}),t[50]=P,t[51]=I,t[52]=L,t[53]=R):R=t[53];let z=l(`ai.wandb.api_key`),B;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,X.jsxs)(X.Fragment,{children:[`Your Weights & Biases API key from`,` `,(0,X.jsx)(bt,{href:`https://wandb.ai/authorize`,children:`wandb.ai`}),`.`]}),t[54]=B):B=t[54];let V,H;t[55]!==r||t[56]!==n?(V=(0,X.jsx)(wu,{form:n,config:r,name:`ai.wandb.api_key`,placeholder:`your-wandb-api-key`,testId:`ai-wandb-api-key-input`,description:B}),H=(0,X.jsx)(Eu,{form:n,config:r,name:`ai.wandb.base_url`,placeholder:`https://api.inference.wandb.ai/v1/`,testId:`ai-wandb-base-url-input`}),t[55]=r,t[56]=n,t[57]=V,t[58]=H):(V=t[57],H=t[58]);let ee;t[59]!==z||t[60]!==V||t[61]!==H?(ee=(0,X.jsxs)(Fu,{title:`Weights & Biases`,provider:`wandb`,isConfigured:z,children:[V,H]}),t[59]=z,t[60]=V,t[61]=H,t[62]=ee):ee=t[62];let U=l(`ai.opencode_go.api_key`),te;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,X.jsxs)(X.Fragment,{children:[`Your OpenCode API key from`,` `,(0,X.jsx)(bt,{href:`https://opencode.ai/auth`,children:`opencode.ai`}),`. OpenCode Go is a low-cost subscription for open coding models.`]}),t[63]=te):te=t[63];let ne,re;t[64]!==r||t[65]!==n?(ne=(0,X.jsx)(wu,{form:n,config:r,name:`ai.opencode_go.api_key`,placeholder:`your-opencode-api-key`,testId:`ai-opencode-go-api-key-input`,description:te}),re=(0,X.jsx)(Eu,{form:n,config:r,name:`ai.opencode_go.base_url`,placeholder:`https://opencode.ai/zen/go/v1/`,testId:`ai-opencode-go-base-url-input`}),t[64]=r,t[65]=n,t[66]=ne,t[67]=re):(ne=t[66],re=t[67]);let W;t[68]!==U||t[69]!==ne||t[70]!==re?(W=(0,X.jsxs)(Fu,{title:`OpenCode Go`,provider:`opencode-go`,isConfigured:U,children:[ne,re]}),t[68]=U,t[69]=ne,t[70]=re,t[71]=W):W=t[71];let ie=l(`ai.azure.api_key`)&&l(`ai.azure.base_url`),ae;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,X.jsxs)(X.Fragment,{children:[`Your Azure API key from`,` `,(0,X.jsx)(bt,{href:`https://portal.azure.com/`,children:`portal.azure.com`}),`.`]}),t[72]=ae):ae=t[72];let G,oe;t[73]!==r||t[74]!==n?(G=(0,X.jsx)(wu,{form:n,config:r,name:`ai.azure.api_key`,placeholder:`sk-proj...`,testId:`ai-azure-api-key-input`,description:ae}),oe=(0,X.jsx)(Eu,{form:n,config:r,name:`ai.azure.base_url`,placeholder:`https://<your-resource-name>.openai.azure.com/openai/deployments/<deployment-name>?api-version=<api-version>`,testId:`ai-azure-base-url-input`}),t[73]=r,t[74]=n,t[75]=G,t[76]=oe):(G=t[75],oe=t[76]);let se;t[77]!==ie||t[78]!==G||t[79]!==oe?(se=(0,X.jsxs)(Fu,{title:`Azure`,provider:`azure`,isConfigured:ie,children:[G,oe]}),t[77]=ie,t[78]=G,t[79]=oe,t[80]=se):se=t[80];let ce=l(`ai.bedrock.region_name`),le;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,X.jsxs)(`p`,{className:`text-sm text-muted-secondary mb-2`,children:[`To use AWS Bedrock, you need to configure AWS credentials and region. See the`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/guides/editor_features/ai_completion.html#aws-bedrock`,children:`documentation`}),` `,`for more details.`]}),t[81]=le):le=t[81];let ue,de;t[82]===n.control?(ue=t[83],de=t[84]):(ue=(0,X.jsx)(Q,{control:n.control,disabled:o,name:`ai.bedrock.region_name`,render:Yu}),de=(0,X.jsx)(Q,{control:n.control,disabled:o,name:`ai.bedrock.profile_name`,render:Xu}),t[82]=n.control,t[83]=ue,t[84]=de);let fe;t[85]!==ce||t[86]!==ue||t[87]!==de?(fe=(0,X.jsxs)(Fu,{title:`AWS Bedrock`,provider:`bedrock`,isConfigured:ce,children:[le,ue,de]}),t[85]=ce,t[86]=ue,t[87]=de,t[88]=fe):fe=t[88];let pe=l(`ai.open_ai_compatible.api_key`)&&l(`ai.open_ai_compatible.base_url`),me;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,X.jsx)(`p`,{className:`text-sm text-amber-600 dark:text-amber-400 mb-2`,children:`Consider using Custom Providers instead, which allows you to add multiple providers with distinct names.`}),t[89]=me):me=t[89];let he;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,X.jsx)(X.Fragment,{children:`API key for any OpenAI-compatible provider (e.g., Together, Groq, Mistral, Perplexity, etc).`}),t[90]=he):he=t[90];let ge;t[91]!==r||t[92]!==n?(ge=(0,X.jsx)(wu,{form:n,config:r,name:`ai.open_ai_compatible.api_key`,placeholder:`sk-...`,testId:`ai-openai-compatible-api-key-input`,description:he}),t[91]=r,t[92]=n,t[93]=ge):ge=t[93];let _e;t[94]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,X.jsx)(X.Fragment,{children:`Base URL for your OpenAI-compatible provider.`}),t[94]=_e):_e=t[94];let ve;t[95]!==r||t[96]!==n?(ve=(0,X.jsx)(Eu,{form:n,config:r,name:`ai.open_ai_compatible.base_url`,placeholder:`https://api.together.xyz/v1`,testId:`ai-openai-compatible-base-url-input`,description:_e}),t[95]=r,t[96]=n,t[97]=ve):ve=t[97];let ye;t[98]!==pe||t[99]!==ge||t[100]!==ve?(ye=(0,X.jsxs)(Fu,{title:`OpenAI-Compatible (Legacy)`,provider:`openai-compatible`,isConfigured:pe,children:[me,ge,ve]}),t[98]=pe,t[99]=ge,t[100]=ve,t[101]=ye):ye=t[101];let be;t[102]!==S||t[103]!==E||t[104]!==A||t[105]!==N||t[106]!==R||t[107]!==ee||t[108]!==W||t[109]!==se||t[110]!==fe||t[111]!==ye||t[112]!==g?(be=(0,X.jsxs)(We,{type:`multiple`,children:[g,S,E,A,N,R,ee,W,se,fe,ye]}),t[102]=S,t[103]=E,t[104]=A,t[105]=N,t[106]=R,t[107]=ee,t[108]=W,t[109]=se,t[110]=fe,t[111]=ye,t[112]=g,t[113]=be):be=t[113];let xe;t[114]!==r||t[115]!==n||t[116]!==i?(xe=(0,X.jsx)(Iu,{form:n,config:r,onSubmit:i}),t[114]=r,t[115]=n,t[116]=i,t[117]=xe):xe=t[117];let Se;return t[118]!==be||t[119]!==xe?(Se=(0,X.jsxs)(Au,{children:[d,be,xe]}),t[118]=be,t[119]=xe,t[120]=Se):Se=t[120],Se},zu=e=>{let t=(0,Y.c)(29),{form:n,config:r,onSubmit:i}=e,[a,o]=(0,J.useState)(r.ai?.max_tokens!=null),s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,X.jsx)(ru,{children:`AI Assistant`}),t[0]=s):s=t[0];let c;t[1]===n.control?c=t[2]:(c=(0,X.jsx)(f,{control:n.control,name:`ai.inline_tooltip`,render:Zu}),t[1]=n.control,t[2]=c);let l;t[3]!==n||t[4]!==a||t[5]!==i?(l=e=>{let{field:t}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-x-2`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Max output tokens`}),(0,X.jsx)(A,{children:(0,X.jsx)(pn,{"data-testid":`ai-max-tokens-input`,type:`number`,min:1,disabled:!a,className:`w-28 h-6`,value:t.value??(a?``:32768),onChange:e=>{let n=Number.parseInt(e.target.value,10);t.onChange(Number.isFinite(n)&&n>0?n:null)}})})]}),(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(h,{"data-testid":`ai-max-tokens-checkbox`,checked:a,onCheckedChange:e=>{let r=e===!0;o(r);let a=r?t.value??32768:null;n.setValue(`ai.max_tokens`,a,{shouldDirty:!0,shouldTouch:!0}),i(n.getValues())}}),(0,X.jsx)(U,{className:`font-normal`,children:`Override`})]})]}),(0,X.jsx)(N,{children:`Each provider sets its own max output tokens (Anthropic uses a recommended default). Adjust to control costs or enable more output.`})]})},t[3]=n,t[4]=a,t[5]=i,t[6]=l):l=t[6];let u;t[7]!==n.control||t[8]!==l?(u=(0,X.jsx)(f,{control:n.control,name:`ai.max_tokens`,render:l}),t[7]=n.control,t[8]=l,t[9]=u):u=t[9];let d;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsx)(E,{}),t[10]=d):d=t[10];let p;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsx)(`span`,{children:`Model to use for chat conversations in the Chat panel.`}),t[11]=p):p=t[11];let m;t[12]!==r||t[13]!==n||t[14]!==i?(m=(0,X.jsx)(Du,{label:`Chat Model`,form:n,config:r,name:`ai.models.chat_model`,placeholder:he,description:p,forRole:`chat`,onSubmit:i}),t[12]=r,t[13]=n,t[14]=i,t[15]=m):m=t[15];let g;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,X.jsxs)(`span`,{children:[`Model to use for code editing with the`,` `,(0,X.jsx)(mr,{className:`inline`,children:`Generate with AI`}),` button.`]}),t[16]=g):g=t[16];let _;t[17]!==r||t[18]!==n||t[19]!==i?(_=(0,X.jsx)(Du,{label:`Edit Model`,form:n,config:r,name:`ai.models.edit_model`,placeholder:he,description:g,forRole:`edit`,onSubmit:i}),t[17]=r,t[18]=n,t[19]=i,t[20]=_):_=t[20];let v;t[21]===n.control?v=t[22]:(v=(0,X.jsx)(Q,{control:n.control,name:`ai.rules`,render:Qu}),t[21]=n.control,t[22]=v);let y;return t[23]!==v||t[24]!==c||t[25]!==u||t[26]!==m||t[27]!==_?(y=(0,X.jsxs)(Au,{children:[s,c,u,d,m,_,v]}),t[23]=v,t[24]=c,t[25]=u,t[26]=m,t[27]=_,t[28]=y):y=t[28],y},Bu=e=>{let t=(0,Y.c)(51),{providerId:n,models:r,enabledModels:i,onToggleModel:a,onToggleProvider:o,onDeleteModel:c}=e,l;if(t[0]!==i||t[1]!==r||t[2]!==n){let e;t[4]!==i||t[5]!==n?(e=e=>i.has(new Bs(n,e.model).id),t[4]=i,t[5]=n,t[6]=e):e=t[6],l=r.filter(e),t[0]=i,t[1]=r,t[2]=n,t[3]=l}else l=t[3];let u=l.length,d=r.length,f;t[7]===n?f=t[8]:(f=Ys.getProviderInfo(n),t[7]=n,t[8]=f);let p=f,m;t[9]!==p?.name||t[10]!==n?(m=p?.name||Kn.startCase(n),t[9]=p?.name,t[10]=n,t[11]=m):m=t[11];let g=m,_=u===0?!1:u===d||`indeterminate`,v;t[12]!==u||t[13]!==o||t[14]!==n||t[15]!==d?(v=()=>{let e=u<d/2;o(n,e)},t[12]=u,t[13]=o,t[14]=n,t[15]=d,t[16]=v):v=t[16];let y=s(v),b;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(b=ut.stopPropagation(),t[17]=b):b=t[17];let x;t[18]!==_||t[19]!==y?(x=(0,X.jsx)(h,{checked:_,onCheckedChange:y,onClick:b}),t[18]=_,t[19]=y,t[20]=x):x=t[20];let S;t[21]===n?S=t[22]:(S=(0,X.jsx)(Ml,{provider:n,className:`h-5 w-5`}),t[21]=n,t[22]=S);let C;t[23]===g?C=t[24]:(C=(0,X.jsx)(`h2`,{className:`font-semibold`,children:g}),t[23]=g,t[24]=C);let w;t[25]!==u||t[26]!==d?(w=(0,X.jsxs)(`p`,{className:`text-sm text-muted-secondary`,children:[u,`/`,d,` models`]}),t[25]=u,t[26]=d,t[27]=w):w=t[27];let T;t[28]!==C||t[29]!==w?(T=(0,X.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[C,w]}),t[28]=C,t[29]=w,t[30]=T):T=t[30];let E;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,X.jsx)(Zt,{slot:`chevron`,children:(0,X.jsx)(ht,{className:`h-4 w-4 text-muted-foreground shrink-0 transition-transform duration-200 group-data-expanded:rotate-90`})}),t[31]=E):E=t[31];let D;t[32]!==T||t[33]!==x||t[34]!==S?(D=(0,X.jsx)(As,{children:(0,X.jsxs)(`div`,{className:`flex items-center gap-3 px-2 py-3 hover:bg-muted/50 cursor-pointer outline-hidden focus-visible:outline-hidden border-b group-data-expanded:border-b-0 rounded-sm`,children:[x,S,T,E]})}),t[32]=T,t[33]=x,t[34]=S,t[35]=D):D=t[35];let O;if(t[36]!==i||t[37]!==r||t[38]!==c||t[39]!==a||t[40]!==n){let e;t[42]!==i||t[43]!==c||t[44]!==a||t[45]!==n?(e=e=>{let t=new Bs(n,e.model).id;return(0,X.jsx)(ju,{qualifiedId:t,model:e,isEnabled:i.has(t),onToggle:a,onDelete:c},t)},t[42]=i,t[43]=c,t[44]=a,t[45]=n,t[46]=e):e=t[46],O=r.map(e),t[36]=i,t[37]=r,t[38]=c,t[39]=a,t[40]=n,t[41]=O}else O=t[41];let k;return t[47]!==n||t[48]!==D||t[49]!==O?(k=(0,X.jsxs)(Ns,{id:n,hasChildItems:!0,textValue:n,className:`outline-hidden data-focused:bg-muted/50 group`,children:[D,O]}),t[47]=n,t[48]=D,t[49]=O,t[50]=k):k=t[50],k},Vu=e=>{let t=(0,Y.c)(56),{form:n,onSubmit:r}=e,i=a(be).ai,o;t[0]===n.control?o=t[1]:(o={control:n.control,name:`ai.models.custom_models`},t[0]=n.control,t[1]=o);let c=p(o),l;t[2]===n.control?l=t[3]:(l={control:n.control,name:`ai.custom_providers`},t[2]=n.control,t[3]=l);let u=p(l),d;t[4]===u?d=t[5]:(d=Object.keys(u||{}),t[4]=u,t[5]=d);let f;t[6]===i?.custom_providers?f=t[7]:(f=Object.keys(i?.custom_providers||{}),t[6]=i?.custom_providers,t[7]=f);let m;t[8]!==d||t[9]!==f?(m=new Set([...d,...f]),t[8]=d,t[9]=f,t[10]=m):m=t[10];let h;t[11]===m?h=t[12]:(h=[...m],t[11]=m,t[12]=h);let g=h,_;t[13]===c?_=t[14]:(_=Ys.create({displayedModels:[],customModels:c}),t[13]=c,t[14]=_);let v=_,y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[15]=y):y=t[15];let b;t[16]===n.control?b=t[17]:(b={control:n.control,name:`ai.models.displayed_models`,defaultValue:y},t[16]=n.control,t[17]=b);let x=p(b),S;t[18]===x?S=t[19]:(S=new Set(x),t[18]=x,t[19]=S);let C=S,w;t[20]===v?w=t[21]:(w=v.getGroupedModelsByProvider(),t[20]=v,t[21]=w);let T=w,E=Tc(v.getListModelsByProvider(),i),D;t[22]!==x||t[23]!==C||t[24]!==n||t[25]!==r?(D=e=>{let t=C.has(e)?x.filter(t=>t!==e):[...x,e];n.setValue(`ai.models.displayed_models`,t,{shouldDirty:!0,shouldTouch:!0}),r(n.getValues())},t[22]=x,t[23]=C,t[24]=n,t[25]=r,t[26]=D):D=t[26];let O=s(D),k;t[27]!==x||t[28]!==n||t[29]!==T||t[30]!==r?(k=async(e,t)=>{let i=T.get(e)||[],a=new Set(i.map(t=>new Bs(e,t.model).id)),o=t?[...new Set([...x,...a])]:x.filter(e=>!a.has(e));n.setValue(`ai.models.displayed_models`,o,{shouldDirty:!0,shouldTouch:!0}),r(n.getValues())},t[27]=x,t[28]=n,t[29]=T,t[30]=r,t[31]=k):k=t[31];let A=s(k),j;t[32]!==x||t[33]!==c||t[34]!==n||t[35]!==r?(j=e=>{let t=c.filter(t=>t!==e),i=x.filter(t=>t!==e);n.setValue(`ai.models.displayed_models`,i,{shouldDirty:!0,shouldTouch:!0}),n.setValue(`ai.models.custom_models`,t,{shouldDirty:!0,shouldTouch:!0}),r(n.getValues())},t[32]=x,t[33]=c,t[34]=n,t[35]=r,t[36]=j):j=t[36];let M=s(j),N=Au,P;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,X.jsx)(`p`,{className:`text-sm text-muted-secondary`,children:`Control which AI models are displayed in model selection dropdowns. When no models are selected, all available models will be shown.`}),t[37]=P):P=t[37];let F=Es,I;t[38]!==C||t[39]!==M||t[40]!==O||t[41]!==A?(I=e=>{let[t,n]=e;return(0,X.jsx)(Bu,{providerId:t,models:n,enabledModels:C,onToggleModel:O,onToggleProvider:A,onDeleteModel:M},t)},t[38]=C,t[39]=M,t[40]=O,t[41]=A,t[42]=I):I=t[42];let L=E.map(I),R;t[43]!==F||t[44]!==L?(R=(0,X.jsx)(`div`,{className:`bg-background`,children:(0,X.jsx)(F,{"aria-label":`AI Models by Provider`,className:`flex-1 overflow-auto outline-hidden focus-visible:outline-hidden`,selectionMode:`none`,children:L})}),t[43]=F,t[44]=L,t[45]=R):R=t[45];let z;t[46]!==c||t[47]!==g||t[48]!==n||t[49]!==r?(z=(0,X.jsx)(Hu,{form:n,customModels:c,customProviderNames:g,onSubmit:r}),t[46]=c,t[47]=g,t[48]=n,t[49]=r,t[50]=z):z=t[50];let B;return t[51]!==N||t[52]!==P||t[53]!==R||t[54]!==z?(B=(0,X.jsxs)(N,{className:`gap-2`,children:[P,R,z]}),t[51]=N,t[52]=P,t[53]=R,t[54]=z,t[55]=B):B=t[55],B},Hu=e=>{let t=(0,Y.c)(97),{form:n,customModels:r,customProviderNames:i,onSubmit:a}=e,[o,s]=(0,J.useState)(!1),[c,l]=(0,J.useState)(!1),[u,d]=(0,J.useState)(null),[f,p]=(0,J.useState)(``),[m,h]=(0,J.useState)(``),g=(0,J.useId)(),_=(0,J.useId)(),v=(0,J.useId)(),y=u===`custom`,b=y?f:u,x;t[0]!==m||t[1]!==b?(x=b?.trim()&&m?.trim(),t[0]=m,t[1]=b,t[2]=x):x=t[2];let S=x,C;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>{d(null),p(``),h(``),s(!1)},t[3]=C):C=t[3];let w=C,T;t[4]!==r||t[5]!==n||t[6]!==S||t[7]!==m||t[8]!==a||t[9]!==b?(T=()=>{if(!S)return;let e=new Bs(b,m);n.setValue(`ai.models.custom_models`,[e.id,...r],{shouldDirty:!0,shouldTouch:!0}),a(n.getValues()),w(),l(!0),setTimeout(()=>l(!1),2e3)},t[4]=r,t[5]=n,t[6]=S,t[7]=m,t[8]=a,t[9]=b,t[10]=T):T=t[10];let E=T,D,O,k,A,j,M,N,P,F,I,L;if(t[11]!==i||t[12]!==u||t[13]!==g){let e;t[25]===i?e=t[26]:(e=e=>e!==`marimo`&&!i.includes(e),t[25]=i,t[26]=e);let n=zs.filter(e);j=`flex flex-col gap-2`,L=`flex items-center gap-2`,t[27]===g?A=t[28]:(A=(0,X.jsx)(Ke,{htmlFor:g,className:`text-sm font-medium text-muted-foreground min-w-12`,children:`Provider`}),t[27]=g,t[28]=A),k=Qe,P=u||``,t[29]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>d(e),t[29]=F):F=t[29];let r;t[30]===u?r=t[31]:(r=u?(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,X.jsx)(Ml,{provider:u,className:`h-3.5 w-3.5`}),(0,X.jsx)(`span`,{children:ff(u)})]}):(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:`Select...`}),t[30]=u,t[31]=r),t[32]!==g||t[33]!==r?(I=(0,X.jsx)(Ze,{id:g,className:`w-40 truncate`,children:r}),t[32]=g,t[33]=r,t[34]=I):I=t[34],O=Ye,D=Xe,M=i.length>0&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`p`,{className:`px-2 py-1 text-xs text-muted-secondary font-medium`,children:`Custom Providers`}),i.map($u),n.length>0&&(0,X.jsx)(`p`,{className:`px-2 py-1 text-xs text-muted-secondary font-medium mt-1`,children:`Built-in Providers`})]}),N=n.map(ed),t[11]=i,t[12]=u,t[13]=g,t[14]=D,t[15]=O,t[16]=k,t[17]=A,t[18]=j,t[19]=M,t[20]=N,t[21]=P,t[22]=F,t[23]=I,t[24]=L}else D=t[14],O=t[15],k=t[16],A=t[17],j=t[18],M=t[19],N=t[20],P=t[21],F=t[22],I=t[23],L=t[24];let R;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,X.jsx)(`p`,{className:`px-2 py-1 text-xs text-muted-secondary font-medium mt-1`,children:`Other`}),t[35]=R):R=t[35];let z;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,X.jsxs)(X.Fragment,{children:[R,(0,X.jsx)(qe,{value:`custom`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Ml,{provider:`openai-compatible`,className:`h-4 w-4`}),(0,X.jsx)(`span`,{children:`Enter provider name`})]})})]}),t[36]=z):z=t[36];let B;t[37]!==D||t[38]!==M||t[39]!==N?(B=(0,X.jsxs)(D,{children:[M,N,z]}),t[37]=D,t[38]=M,t[39]=N,t[40]=B):B=t[40];let V;t[41]!==O||t[42]!==B?(V=(0,X.jsx)(O,{children:B}),t[41]=O,t[42]=B,t[43]=V):V=t[43];let H;t[44]!==k||t[45]!==V||t[46]!==P||t[47]!==F||t[48]!==I?(H=(0,X.jsxs)(k,{value:P,onValueChange:F,children:[I,V]}),t[44]=k,t[45]=V,t[46]=P,t[47]=F,t[48]=I,t[49]=H):H=t[49];let ee;t[50]!==A||t[51]!==H||t[52]!==L?(ee=(0,X.jsxs)(`div`,{className:L,children:[A,H]}),t[50]=A,t[51]=H,t[52]=L,t[53]=ee):ee=t[53];let U;t[54]!==_||t[55]!==f||t[56]!==y?(U=y&&(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Ke,{htmlFor:_,className:`text-sm font-medium text-muted-foreground min-w-12`,children:`Name`}),(0,X.jsx)(pn,{id:_,value:f,onChange:e=>p(e.target.value),placeholder:`openrouter`,className:`w-40 truncate`})]}),t[54]=_,t[55]=f,t[56]=y,t[57]=U):U=t[57];let te;t[58]!==j||t[59]!==ee||t[60]!==U?(te=(0,X.jsxs)(`div`,{className:j,children:[ee,U]}),t[58]=j,t[59]=ee,t[60]=U,t[61]=te):te=t[61];let ne=te,re=y&&`self-start`,W;t[62]===re?W=t[63]:(W=Re(`flex items-center gap-2`,re),t[62]=re,t[63]=W);let ie;t[64]===v?ie=t[65]:(ie=(0,X.jsx)(Ke,{htmlFor:v,className:`text-sm font-medium text-muted-foreground`,children:`Model`}),t[64]=v,t[65]=ie);let ae;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>h(e.target.value),t[66]=ae):ae=t[66];let G;t[67]!==m||t[68]!==v?(G=(0,X.jsx)(pn,{id:v,value:m,onChange:ae,placeholder:`gpt-4`,className:`text-xs mb-0`}),t[67]=m,t[68]=v,t[69]=G):G=t[69];let oe;t[70]!==W||t[71]!==ie||t[72]!==G?(oe=(0,X.jsxs)(`div`,{className:W,children:[ie,G]}),t[70]=W,t[71]=ie,t[72]=G,t[73]=oe):oe=t[73];let se=oe,ce=y&&`self-end`,le;t[74]===ce?le=t[75]:(le=Re(`flex gap-1.5 ml-auto`,ce),t[74]=ce,t[75]=le);let ue=!S,de;t[76]!==E||t[77]!==ue?(de=(0,X.jsx)(q,{onClick:E,disabled:ue,size:`xs`,children:`Add`}),t[76]=E,t[77]=ue,t[78]=de):de=t[78];let fe;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,X.jsx)(q,{variant:`outline`,onClick:w,size:`xs`,children:`Cancel`}),t[79]=fe):fe=t[79];let pe;t[80]!==le||t[81]!==de?(pe=(0,X.jsxs)(`div`,{className:le,children:[de,fe]}),t[80]=le,t[81]=de,t[82]=pe):pe=t[82];let me;t[83]!==se||t[84]!==ne||t[85]!==pe?(me=(0,X.jsxs)(`div`,{className:`flex items-center gap-3 p-3 border border-border rounded-md`,children:[ne,se,pe]}),t[83]=se,t[84]=ne,t[85]=pe,t[86]=me):me=t[86];let he=o&&me,ge;t[87]===o?ge=t[88]:(ge=(0,X.jsx)(Uu,{isFormOpen:o,setIsFormOpen:s,label:`Add Model`,className:`pl-2`}),t[87]=o,t[88]=ge);let _e;t[89]===c?_e=t[90]:(_e=c&&(0,X.jsx)(`div`,{className:`flex items-center gap-1 text-green-700 bg-green-500/10 px-2 py-1 rounded-md ml-auto`,children:`✓ Model added`}),t[89]=c,t[90]=_e);let ve;t[91]!==ge||t[92]!==_e?(ve=(0,X.jsxs)(`div`,{className:`flex flex-row text-sm`,children:[ge,_e]}),t[91]=ge,t[92]=_e,t[93]=ve):ve=t[93];let ye;return t[94]!==he||t[95]!==ve?(ye=(0,X.jsxs)(`div`,{children:[he,ve]}),t[94]=he,t[95]=ve,t[96]=ye):ye=t[96],ye},Uu=e=>{let t=(0,Y.c)(10),{isFormOpen:n,setIsFormOpen:r,label:i,className:a}=e,o;t[0]===r?o=t[1]:(o=e=>{e.stopPropagation(),e.preventDefault(),r(!0)},t[0]=r,t[1]=o);let s;t[2]===a?s=t[3]:(s=Re(`px-0`,a),t[2]=a,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,X.jsx)(xt,{className:`h-4 w-4 mr-2 mb-0.5`}),t[4]=c):c=t[4];let l;return t[5]!==n||t[6]!==i||t[7]!==o||t[8]!==s?(l=(0,X.jsxs)(q,{onClick:o,variant:`link`,disabled:n,className:s,children:[c,i]}),t[5]=n,t[6]=i,t[7]=o,t[8]=s,t[9]=l):l=t[9],l},Wu=e=>{let t=(0,Y.c)(2),{form:n}=e,r;return t[0]===n.control?r=t[1]:(r=(0,X.jsx)(Au,{children:(0,X.jsx)(Q,{control:n.control,name:`ai.enabled`,render:td})}),t[0]=n.control,t[1]=r),r},Gu=e=>{let t=(0,Y.c)(38),{form:n,config:i,onSubmit:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=Me(),t[0]=o):o=t[0];let s=o,[c,l]=r(af),u=uu(),d;t[1]===n.control?d=t[2]:(d={control:n.control,name:`ai.enabled`},t[1]=n.control,t[2]=d);let f=p(d),m;t[3]!==u||t[4]!==f?(m=u(`ai.enabled`,f),t[3]=u,t[4]=f,t[5]=m):m=t[5];let{value:h}=m,g=h===!1&&c!==`ai-features`?`ai-features`:c,_;t[6]===l?_=t[7]:(_=e=>l(e),t[6]=l,t[7]=_);let v;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(Vr,{value:`ai-features`,children:`AI Features`}),t[8]=v):v=t[8];let y;t[9]===h?y=t[10]:(y=h!==!1&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Vr,{value:`ai-providers`,children:`AI Providers`}),(0,X.jsx)(Vr,{value:`ai-models`,children:`AI Models`}),!s&&(0,X.jsx)(Vr,{value:`mcp`,children:`MCP`})]}),t[9]=h,t[10]=y);let b;t[11]===y?b=t[12]:(b=(0,X.jsxs)(yr,{className:`mb-2`,children:[v,y]}),t[11]=y,t[12]=b);let x,S;t[13]!==i||t[14]!==n||t[15]!==a?(x=(0,X.jsx)(Nu,{form:n,config:i,onSubmit:a}),S=(0,X.jsx)(Wu,{form:n,config:i,onSubmit:a}),t[13]=i,t[14]=n,t[15]=a,t[16]=x,t[17]=S):(x=t[16],S=t[17]);let C;t[18]!==h||t[19]!==i||t[20]!==n||t[21]!==a?(C=h!==!1&&(0,X.jsx)(zu,{form:n,config:i,onSubmit:a}),t[18]=h,t[19]=i,t[20]=n,t[21]=a,t[22]=C):C=t[22];let w;t[23]!==C||t[24]!==x||t[25]!==S?(w=(0,X.jsxs)(pr,{value:`ai-features`,children:[x,S,C]}),t[23]=C,t[24]=x,t[25]=S,t[26]=w):w=t[26];let T;t[27]!==h||t[28]!==i||t[29]!==n||t[30]!==a?(T=h!==!1&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(pr,{value:`ai-providers`,children:[(0,X.jsx)(eu,{className:`mb-4`}),(0,X.jsx)(Ru,{form:n,config:i,onSubmit:a})]}),(0,X.jsx)(pr,{value:`ai-models`,children:(0,X.jsx)(Vu,{form:n,config:i,onSubmit:a})}),!s&&(0,X.jsx)(pr,{value:`mcp`,children:(0,X.jsx)(bu,{form:n,onSubmit:a})})]}),t[27]=h,t[28]=i,t[29]=n,t[30]=a,t[31]=T):T=t[31];let E;return t[32]!==g||t[33]!==w||t[34]!==T||t[35]!==_||t[36]!==b?(E=(0,X.jsxs)(lr,{value:g,onValueChange:_,className:`flex-1`,children:[b,w,T]}),t[32]=g,t[33]=w,t[34]=T,t[35]=_,t[36]=b,t[37]=E):E=t[37],E};function Ku(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function qu(e){return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,X.jsx)(Ml,{provider:e,className:`h-4 w-4`}),(0,X.jsx)(`span`,{className:`text-sm font-medium`,children:ff(e)}),(0,X.jsx)(`span`,{className:`ml-auto px-1 rounded bg-muted text-xs font-medium border`,children:`Configured`})]},e)}function Ju(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function Yu(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`AWS Region`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`bedrock-region-select`,onChange:e=>t.onChange(e.target.value),value:typeof n.value==`string`?n.value:`us-east-1`,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:su.map(Ju)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`The AWS region where Bedrock service is available.`})]})}function Xu(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`AWS Profile Name (Optional)`}),(0,X.jsx)(A,{children:(0,X.jsx)(pn,{"data-testid":`bedrock-profile-input`,rootClassName:`flex-1`,className:`m-0 inline-flex h-7`,placeholder:`default`,...t,value:n.value||``,disabled:t.disabled||n.isOverridden})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`The AWS profile name from your ~/.aws/credentials file. Leave blank to use your default AWS credentials.`})]})}function Zu(e){let{field:t}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`AI Edit Tooltip`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`inline-ai-checkbox`,checked:t.value===!0,onCheckedChange:t.onChange})})]}),(0,X.jsx)(N,{children:`Enable "Edit with AI" tooltip when selecting code.`})]})}function Qu(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col`,children:[(0,X.jsxs)(z,{children:[(0,X.jsx)(U,{children:`Custom Rules`}),(0,X.jsx)(A,{children:(0,X.jsx)(vt,{"data-testid":`ai-rules-input`,className:`m-0 inline-flex w-full h-32 p-2 text-sm`,placeholder:`e.g. Always use type hints; prefer polars over pandas`,...t,value:n.value,disabled:n.isOverridden})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Custom rules to include in all AI completion prompts.`})]})}function $u(e){return(0,X.jsx)(qe,{value:e,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Ml,{provider:e,className:`h-4 w-4`}),(0,X.jsx)(`span`,{children:Kn.startCase(e)})]})},e)}function ed(e){return(0,X.jsx)(qe,{value:e,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Ml,{provider:e,className:`h-4 w-4`}),(0,X.jsx)(`span`,{children:ff(e)})]})},e)}function td(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Enable AI features`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`ai-enabled-checkbox`,checked:n.value!==!1,disabled:n.isOverridden,onCheckedChange:e=>t.onChange(e===!0)})}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`When disabled, AI actions and panels are hidden from the marimo UI.`})]})}var nd=[`auto`,`true`,`false`],rd=e=>{let t=(0,Y.c)(34),{form:n,onSubmit:r}=e,i;t[0]===n.control?i=t[1]:(i=(e,t)=>(0,X.jsx)(Q,{control:n.control,name:e,render:e=>{let{field:n,override:r}=e;return(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`text-sm font-normal w-16`,children:t}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`auto-discover-schemas-select`,onChange:e=>{let t=e.target.value;n.onChange(t===`true`||t!==`false`&&t)},value:r.value===void 0?`auto`:r.value.toString(),disabled:n.disabled||r.isOverridden,className:`w-[100px]`,children:nd.map(id)})}),(0,X.jsx)($,{override:r})]})}}),t[0]=n.control,t[1]=i);let a=i,o;t[2]===n.control?o=t[3]:(o=(0,X.jsx)(Q,{control:n.control,name:`display.dataframes`,render:od}),t[2]=n.control,t[3]=o);let s;t[4]!==n||t[5]!==r?(s=e=>{let{field:t,override:i}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Default table page size`}),(0,X.jsx)(A,{children:(0,X.jsx)(ln,{"aria-label":`Default table page size`,"data-testid":`default-table-page-size-input`,className:`m-0 w-24`,...t,value:i.value,isDisabled:i.isOverridden,minValue:1,step:1,onChange:e=>{t.onChange(e),Number.isNaN(e)||r(n.getValues())}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:i})]}),(0,X.jsx)(N,{children:`The default number of rows displayed in dataframes and SQL results.`})]})},t[4]=n,t[5]=r,t[6]=s):s=t[6];let c;t[7]!==n.control||t[8]!==s?(c=(0,X.jsx)(Q,{control:n.control,name:`display.default_table_page_size`,render:s}),t[7]=n.control,t[8]=s,t[9]=c):c=t[9];let l;t[10]!==n||t[11]!==r?(l=e=>{let{field:t,override:i}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Default table max columns`}),(0,X.jsx)(A,{children:(0,X.jsx)(ln,{"aria-label":`Default table max columns`,"data-testid":`default-table-max-columns-input`,className:`m-0 w-24`,...t,value:i.value,isDisabled:i.isOverridden,minValue:1,step:1,onChange:e=>{t.onChange(e),Number.isNaN(e)||r(n.getValues())}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:i})]}),(0,X.jsx)(N,{children:`The default maximum number of columns displayed in dataframes and SQL results.`})]})},t[10]=n,t[11]=r,t[12]=l):l=t[12];let u;t[13]!==n.control||t[14]!==l?(u=(0,X.jsx)(Q,{control:n.control,name:`display.default_table_max_columns`,render:l}),t[13]=n.control,t[14]=l,t[15]=u):u=t[15];let d;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsx)(`div`,{className:`text-sm text-foreground`,children:`Database Schema Discovery`}),t[16]=d):d=t[16];let f,p;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,X.jsx)(`br`,{}),p=(0,X.jsx)(`span`,{className:`font-semibold`,children:`Can be expensive for large databases.`}),t[17]=f,t[18]=p):(f=t[17],p=t[18]);let m;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsxs)(`div`,{className:`text-sm text-muted-foreground mb-2`,children:[`Whether database schemas, tables, and columns are automatically discovered.`,f,p,` `,`Use 'auto' to determine introspection based on the`,` `,(0,X.jsx)(`a`,{className:`text-link hover:underline`,rel:`noopener noreferrer`,target:`_blank`,href:`https://docs.marimo.io/guides/working_with_data/sql/?h=database#database-schema-and-table-auto-discovery`,children:`database`}),`.`]}),t[19]=m):m=t[19];let h;t[20]===a?h=t[21]:(h=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[d,m,a(`datasources.auto_discover_schemas`,`Schemas`),a(`datasources.auto_discover_tables`,`Tables`),a(`datasources.auto_discover_columns`,`Columns`)]}),t[20]=a,t[21]=h);let g,_;t[22]===n.control?(g=t[23],_=t[24]):(g=(0,X.jsx)(Q,{control:n.control,name:`diagnostics.sql_linter`,render:sd}),_=(0,X.jsx)(Q,{control:n.control,name:`runtime.default_sql_output`,render:ld}),t[22]=n.control,t[23]=g,t[24]=_);let v;t[25]!==h||t[26]!==g||t[27]!==_?(v=(0,X.jsxs)(au,{title:`SQL`,children:[h,g,_]}),t[25]=h,t[26]=g,t[27]=_,t[28]=v):v=t[28];let y;return t[29]!==v||t[30]!==o||t[31]!==c||t[32]!==u?(y=(0,X.jsxs)(X.Fragment,{children:[o,c,u,v]}),t[29]=v,t[30]=o,t[31]=c,t[32]=u,t[33]=y):y=t[33],y};function id(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function ad(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function od(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Dataframe viewer`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`display-dataframes-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:[`rich`,`plain`].map(ad)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Whether to use marimo's rich dataframe viewer or a plain HTML table. This requires restarting your notebook to take effect.`})]})}function sd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`SQL Linter`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`sql-linter-checkbox`,checked:n.value,disabled:n.isOverridden,onCheckedChange:t.onChange})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Better linting and autocompletions for SQL cells.`})]})}function cd(e){return(0,X.jsx)(`option`,{value:e.value,children:e.label},e.value)}function ld(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Default SQL output`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`user-config-sql-output-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:ou.map(cd)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`The default SQL output type for new notebooks; overridden by "sql_output" in the application config.`})]})}function ud(e,t){let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];if(a!==void 0){if(i===!0)n[r]=a;else if(typeof i==`object`&&i){let e=ud(a,i);Object.keys(e).length>0&&(n[r]=e)}}}return n}var dd=(e,t)=>{t.ai={...t.ai,models:{...t.ai?.models,displayed_models:e.ai?.models?.displayed_models??[],custom_models:e.ai?.models?.custom_models??[]}}},fd=new Map([[`ai.models.displayed_models`,dd],[`ai.models.custom_models`,dd]]),pd=(e,t)=>{if(!e)return!1;let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return!1;n=n[e]}return n===!0},md=e=>{let{values:t,dirtyValues:n,touchedFields:r}=e;for(let[e,i]of fd)pd(r,e)&&i(t,n)};function hd(e,t){let n=/^(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?(?:\+([\w.-]+))?$/,r=e=>{let t=e.match(n);if(!t)return null;let[,r,i,a,o]=t;return{major:Number.parseInt(r,10),minor:Number.parseInt(i,10),patch:Number.parseInt(a,10),preRelease:o||``}};try{let n=r(e),i=r(t);return!n||!i?e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`}):n.major===i.major?n.minor===i.minor?n.patch===i.patch?n.preRelease===``&&i.preRelease!==``?1:n.preRelease!==``&&i.preRelease===``?-1:n.preRelease.localeCompare(i.preRelease):n.patch-i.patch:n.minor-i.minor:n.major-i.major}catch{return e.localeCompare(t,void 0,{numeric:!0,sensitivity:`base`})}}var gd=(e,t)=>hd(t,e);function _d(e){return e.replaceAll(/\[.*]/g,``).trim()}var vd=/^((?:\d+!)?\d+(?:\.\d+)*)(?:[-_.]?(?:a|b|c|rc|alpha|beta|pre|preview|dev)\d*)/i;function yd(e,t){let n=e.name.split(`[`)[0],r=t.find(e=>e.name===n);if(!r)return!1;if(!e.minVersion)return!0;let i=r.version.match(vd);return i?hd(i[1],e.minVersion)>0:hd(r.version,e.minVersion)>=0}var bd=[{id:`sql`,packagesRequired:[{name:`duckdb`},{name:`sqlglot`}],additionalPackageInstalls:[{name:`polars[pyarrow]`}],description:`SQL cells`},{id:`charts`,packagesRequired:[{name:`altair`}],additionalPackageInstalls:[],description:`Charts in datasource viewer`},{id:`fast-charts`,packagesRequired:[{name:`vegafusion`},{name:`vl-convert-python`}],additionalPackageInstalls:[],description:`Fast server-side charts`},{id:`formatting`,packagesRequired:[Me()?{name:`black`}:{name:`ruff`}],additionalPackageInstalls:[],description:`Formatting`},{id:`ai`,packagesRequired:[{name:`openai`}],additionalPackageInstalls:[],description:`AI features`},{id:`lens`,packagesRequired:[{name:`marimo-lens`,minVersion:`0.2.3`}],additionalPackageInstalls:[],description:`Select outputs for agents`},{id:`mcp`,packagesRequired:[{name:`mcp`,minVersion:`2.0.0`}],additionalPackageInstalls:[],description:`Connect to MCP servers`},{id:`ipy-export`,packagesRequired:[{name:`nbformat`}],additionalPackageInstalls:[],description:`Export as IPYNB`},{id:`testing`,packagesRequired:[{name:`pytest`}],additionalPackageInstalls:[],description:`Autorun unit tests`}];Me()||bd.push({id:`lsp`,packagesRequired:[{name:`python-lsp-server`},{name:`websockets`}],additionalPackageInstalls:[{name:`python-lsp-ruff`}],description:`Language Server Protocol*`});var xd=()=>{let e=(0,Y.c)(21),[t]=de(),n=t.package_management.manager,{getPackageList:r}=qn(),i;e[0]===r?i=e[1]:(i=()=>r(),e[0]=r,e[1]=i);let a;e[2]===n?a=e[3]:(a=[n],e[2]=n,e[3]=a);let{data:o,error:s,refetch:c,isPending:l}=nr(i,a);if(l){let t;return e[4]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(vr,{size:`medium`,centered:!0}),e[4]=t):t=e[4],t}if(s){let t;return e[5]===s?t=e[6]:(t=(0,X.jsx)(cr,{error:s}),e[5]=s,e[6]=t),t}let u;e[7]===o?.packages?u=e[8]:(u=o?.packages||[],e[7]=o?.packages,e[8]=u);let d=u,f;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,X.jsx)(ru,{children:`Optional Features`}),e[9]=f):f=e[9];let p;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`marimo is lightweight, with few dependencies, to maximize compatibility with your own environments.`,(0,X.jsx)(`br`,{}),`To unlock additional features in the marimo editor, you can install these optional dependencies:`]}),e[10]=p):p=e[10];let m;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(Lr,{children:(0,X.jsxs)(br,{children:[(0,X.jsx)(Ar,{children:`Dependency`}),(0,X.jsx)(Ar,{children:`Feature`}),(0,X.jsx)(Ar,{children:`Status`}),(0,X.jsx)(Ar,{})]})}),e[11]=m):m=e[11];let h;e[12]!==d||e[13]!==n||e[14]!==c?(h=bd.map(e=>{let t=e.packagesRequired.every(e=>yd(e,d)),r=e.packagesRequired.map(Cd).join(`, `);return(0,X.jsxs)(br,{className:`text-sm`,children:[(0,X.jsx)(zr,{children:e.description}),(0,X.jsx)(zr,{className:`font-mono text-xs`,children:r}),(0,X.jsx)(zr,{children:t?(0,X.jsxs)(`div`,{className:`flex items-center`,children:[(0,X.jsx)(Qr,{className:`h-4 w-4 text-(--grass-10) mr-2`}),(0,X.jsx)(`span`,{children:`Installed`})]}):(0,X.jsxs)(`div`,{className:`flex items-center`,children:[(0,X.jsx)(ee,{className:`h-4 w-4 text-(--red-10) mr-2`}),(0,X.jsx)(Sd,{packageSpecs:[...e.packagesRequired,...e.additionalPackageInstalls],packageManager:n,onSuccess:c})]})})]},e.id)}),e[12]=d,e[13]=n,e[14]=c,e[15]=h):h=e[15];let g;e[16]===h?g=e[17]:(g=(0,X.jsxs)(Or,{children:[m,(0,X.jsx)(Ir,{children:h})]}),e[16]=h,e[17]=g);let _;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,X.jsx)(`p`,{className:`text-muted-foreground mt-2`,children:`*Requires server restart`}),e[18]=_):_=e[18];let v;return e[19]===g?v=e[20]:(v=(0,X.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden gap-2`,children:[f,p,g,_]}),e[19]=g,e[20]=v),v},Sd=({packageSpecs:e,packageManager:t,onSuccess:n})=>{let[r,i]=J.useState(!1),{addPackage:a}=qn();return(0,X.jsxs)(q,{size:`xs`,variant:`outline`,className:Re(`text-xs`,r&&`opacity-50 cursor-not-allowed`),onClick:async()=>{try{i(!0);let t=e.map(e=>e.minVersion?`${e.name}>=${e.minVersion}`:e.name).join(` `),r=await a({package:t,group:`dev`});r.success?(n(),Sn({title:`Package installed`,description:(0,X.jsxs)(`span`,{children:[`The packages`,` `,(0,X.jsx)(mr,{className:`inline`,children:e.map(e=>e.name).join(`, `)}),` `,`have been added to your environment.`]})})):Sn({title:`Failed to install package`,description:r.error,variant:`danger`})}finally{i(!1)}},disabled:r,children:[r?(0,X.jsx)(vr,{size:`small`,className:`mr-2 h-3 w-3`}):(0,X.jsx)(re,{className:`mr-2 h-3 w-3`}),`Install with `,t]})};function Cd(e){return e.name}var wd=[{id:`editor`,label:`Editor`,Icon:x,className:`bg-(--blue-4)`},{id:`display`,label:`Display`,Icon:ni,className:`bg-(--grass-4)`},{id:`packageManagementAndData`,label:`Packages & Data`,Icon:te,className:`bg-(--red-4)`},{id:`runtime`,label:`Runtime`,Icon:$r,className:`bg-(--amber-4)`},{id:`ai`,label:`AI`,Icon:Zr,className:`bg-[linear-gradient(45deg,var(--purple-5),var(--cyan-5))]`},{id:`optionalDeps`,label:`Optional Dependencies`,Icon:ti,className:`bg-(--orange-4)`},{id:`labs`,label:`Labs`,Icon:ei,className:`bg-(--slate-4)`}],Td=i(wd[0].id),Ed=100,Dd=`__system__`,Od=()=>{let e=(0,Y.c)(62),[t,n]=fe(),[i,o]=r(Xs),s=(0,J.useRef)(null),l=c(Rc),[u,d]=r(Td),p=a(y);a(Ae).mode===`home`&&(p={terminal:!0,pylsp:!0,ty:!0,basedpyright:!0,pyrefly:!0});let m=a(Br),{locale:g}=Qn(),{saveUserConfig:v}=qn(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=_(me),e[0]=b):b=e[0];let x;e[1]===t?x=e[2]:(x={resolver:b,defaultValues:t},e[1]=t,e[2]=x);let C=S(x),w;e[3]===C?w=e[4]:(w=(e,t)=>{let{chatModel:n,editModel:r}=Dc(e);return(n||r)&&(t={...t,models:{...t?.models,...n&&{chat_model:n},...r&&{edit_model:r}}},n&&C.setValue(`ai.models.chat_model`,n),r&&C.setValue(`ai.models.edit_model`,r)),t},e[3]=C,e[4]=w);let T=w,E;e[5]!==C.formState.dirtyFields||e[6]!==C.formState.touchedFields||e[7]!==v||e[8]!==T||e[9]!==n?(E=async e=>{let t=ud(e,C.formState.dirtyFields);md({values:e,dirtyValues:t,touchedFields:C.formState.touchedFields}),Object.keys(t).length!==0&&(t.ai&&=T(e.ai,t.ai),await v({config:t}),n(e=>xe(e,t)))},e[5]=C.formState.dirtyFields,e[6]=C.formState.touchedFields,e[7]=v,e[8]=T,e[9]=n,e[10]=E):E=e[10];let D=tr(E,Ed),O;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(O=Me(),e[11]=O):O=e[11];let k=O,M=uu(),P=(0,J.useId)(),F=(0,J.useId)(),I;e[12]!==i||e[13]!==u||e[14]!==p||e[15]!==t||e[16]!==C||e[17]!==M||e[18]!==P||e[19]!==F||e[20]!==D||e[21]!==o||e[22]!==d||e[23]!==l?(I=()=>{switch(u){case`editor`:return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(au,{title:`Autosave`,children:[(0,X.jsx)(Q,{control:C.control,name:`save.autosave`,render:kd}),(0,X.jsx)(Q,{control:C.control,name:`save.autosave_delay`,render:e=>{let{field:t,override:n}=e,r=M(`save.autosave`,C.getValues(`save.autosave`));return(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Autosave delay (seconds)`}),(0,X.jsx)(A,{children:(0,X.jsx)(ln,{"aria-label":`Autosave delay`,"data-testid":`autosave-delay-input`,className:`m-0 w-24`,isDisabled:r.value!==`after_delay`||n.isOverridden,...t,value:n.value/1e3,minValue:1,onChange:e=>{t.onChange(e*1e3),Number.isNaN(e)||D(C.getValues())}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]})}}),(0,X.jsx)(Q,{control:C.control,name:`runtime.default_auto_download`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Save cell outputs as`}),(0,X.jsx)(A,{children:(0,X.jsxs)(`div`,{className:`flex gap-4`,children:[(0,X.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,X.jsx)(h,{id:P,checked:Array.isArray(n.value)&&n.value.includes(`html`),disabled:n.isOverridden,onCheckedChange:()=>{let e=Array.isArray(t.value)?t.value:[];t.onChange(Vn(e,`html`))}}),(0,X.jsx)(U,{htmlFor:P,children:`HTML`})]}),(0,X.jsxs)(`div`,{className:`flex items-center space-x-2`,children:[(0,X.jsx)(h,{id:F,checked:Array.isArray(n.value)&&n.value.includes(`ipynb`),disabled:n.isOverridden,onCheckedChange:()=>{let e=Array.isArray(t.value)?t.value:[];t.onChange(Vn(e,`ipynb`))}}),(0,X.jsx)(U,{htmlFor:F,children:`IPYNB`})]})]})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsxs)(N,{children:[`When enabled, marimo will periodically save notebooks in your selected formats (HTML, IPYNB) to a folder named`,` `,(0,X.jsx)(mr,{className:`inline`,children:`__marimo__`}),` next to your notebook file.`]})]})}})]}),(0,X.jsxs)(au,{title:`Formatting`,children:[(0,X.jsx)(Q,{control:C.control,name:`save.format_on_save`,render:Ad}),(0,X.jsx)(Q,{control:C.control,name:`formatting.line_length`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Line length`}),(0,X.jsx)(A,{children:(0,X.jsx)(ln,{"aria-label":`Line length`,"data-testid":`line-length-input`,className:`m-0 w-24`,...t,value:n.value,isDisabled:n.isOverridden,minValue:1,maxValue:1e3,onChange:e=>{t.onChange(e),Number.isNaN(e)||D(C.getValues())}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Maximum line length when formatting code.`})]})}})]}),(0,X.jsxs)(au,{title:`Autocomplete`,children:[(0,X.jsx)(Q,{control:C.control,name:`completion.activate_on_typing`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Autocomplete`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`autocomplete-checkbox`,checked:n.value,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`When unchecked, code completion is still available through a hotkey.`}),(0,X.jsx)(`div`,{children:(0,X.jsx)(q,{variant:`link`,className:`mb-0 px-0`,type:`button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),d(`ai`)},children:`Edit AI autocomplete`})})]})}}),(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Accept suggestion on Enter`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`accept-completion-on-enter-checkbox`,checked:i,onCheckedChange:e=>o(!!e)})})]}),(0,X.jsx)(N,{children:`When unchecked, pressing Enter inserts a new line instead of accepting an autocomplete suggestion. Use Tab to accept suggestions.`})]}),(0,X.jsx)(Q,{control:C.control,name:`completion.signature_hint_on_typing`,render:jd}),(0,X.jsx)(Q,{control:C.control,name:`completion.auto_close_pairs`,render:Md})]}),(0,X.jsxs)(au,{title:`Language Servers`,children:[(0,X.jsxs)(N,{children:[`See the`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/guides/editor_features/language_server/`,children:`docs`}),` `,`for more information about language server support.`]}),(0,X.jsxs)(N,{children:[(0,X.jsx)(`strong`,{children:`Note:`}),` When using multiple language servers, different features may conflict.`]}),(0,X.jsx)(Q,{control:C.control,name:`language_servers.pylsp.enabled`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsxs)(U,{children:[(0,X.jsx)(Yn,{variant:`defaultOutline`,className:`mr-2`,children:`Beta`}),`Python Language Server (`,(0,X.jsx)(bt,{href:`https://github.com/python-lsp/python-lsp-server`,children:`docs`}),`)`]}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`pylsp-checkbox`,checked:n.value,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),n.value&&!p.pylsp&&(0,X.jsxs)(Cr,{kind:`danger`,children:[`The Python Language Server is not available in your current environment. Please install`,` `,(0,X.jsx)(mr,{className:`inline`,children:`python-lsp-server`}),` in your environment.`]})]})}}),(0,X.jsx)(Q,{control:C.control,name:`language_servers.basedpyright.enabled`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsxs)(U,{children:[(0,X.jsx)(Yn,{variant:`defaultOutline`,className:`mr-2`,children:`Beta`}),`basedpyright (`,(0,X.jsx)(bt,{href:`https://github.com/DetachHead/basedpyright`,children:`docs`}),`)`]}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`basedpyright-checkbox`,checked:n.value,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),n.value&&!p.basedpyright&&(0,X.jsxs)(Cr,{kind:`danger`,children:[`basedpyright is not available in your current environment. Please install`,` `,(0,X.jsx)(mr,{className:`inline`,children:`basedpyright`}),` in your environment.`]})]})}}),(0,X.jsx)(Q,{control:C.control,name:`language_servers.pyrefly.enabled`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsxs)(U,{children:[(0,X.jsx)(Yn,{variant:`defaultOutline`,className:`mr-2`,children:`Beta`}),`Pyrefly (`,(0,X.jsx)(bt,{href:`https://github.com/facebook/pyrefly`,children:`docs`}),`)`]}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`pyrefly-checkbox`,checked:n.value,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),n.value&&!p.pyrefly&&(0,X.jsxs)(Cr,{kind:`danger`,children:[`Pyrefly is not available in your current environment. Please install `,(0,X.jsx)(mr,{className:`inline`,children:`pyrefly`}),` in your environment.`]})]})}}),(0,X.jsx)(Q,{control:C.control,name:`language_servers.ty.enabled`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsxs)(U,{children:[(0,X.jsx)(Yn,{variant:`defaultOutline`,className:`mr-2`,children:`Beta`}),`ty (`,(0,X.jsx)(bt,{href:`https://github.com/astral-sh/ty`,children:`docs`}),`)`]}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`ty-checkbox`,checked:n.value,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),n.value&&!p.ty&&(0,X.jsxs)(Cr,{kind:`danger`,children:[`ty is not available in your current environment. Please install `,(0,X.jsx)(mr,{className:`inline`,children:`ty`}),` in your environment.`]})]})}}),(0,X.jsx)(Q,{control:C.control,name:`diagnostics.enabled`,render:Nd})]}),(0,X.jsxs)(au,{title:`Keymap`,children:[(0,X.jsx)(Q,{control:C.control,name:`keymap.preset`,render:Fd}),(0,X.jsx)(Q,{control:C.control,name:`keymap.destructive_delete`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Destructive delete`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`destructive-delete-checkbox`,checked:n.value,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsxs)(N,{className:`flex items-center gap-1`,children:[`Allow deleting non-empty cells`,(0,X.jsx)(ct,{content:(0,X.jsxs)(`div`,{className:`max-w-xs`,children:[(0,X.jsx)(`strong`,{children:`Use with caution:`}),` Deleting cells with code can lose work and computed results since variables are removed from memory.`]}),children:(0,X.jsx)(kr,{className:`w-3 h-3 text-(--amber-11)`})})]}),(0,X.jsx)(`div`,{children:(0,X.jsx)(q,{variant:`link`,className:`mb-0 px-0`,type:`button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!0)},children:`Edit Keyboard Shortcuts`})})]})}})]})]});case`display`:return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(au,{title:`Display`,children:[(0,X.jsx)(Q,{control:C.control,name:`display.default_width`,render:Ld}),(0,X.jsx)(Q,{control:C.control,name:`display.theme`,render:zd}),(0,X.jsx)(Q,{control:C.control,name:`display.code_editor_font_size`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Code editor font size (px)`}),(0,X.jsx)(A,{children:(0,X.jsx)(`span`,{className:`inline-flex mr-2`,children:(0,X.jsx)(ln,{"aria-label":`Code editor font size`,"data-testid":`code-editor-font-size-input`,className:`m-0 w-24`,...t,value:n.value,isDisabled:n.isOverridden,minValue:8,maxValue:32,onChange:e=>{t.onChange(e),D(C.getValues())}})})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]})}}),(0,X.jsx)(Q,{control:C.control,name:`display.locale`,render:Vd}),(0,X.jsx)(Q,{control:C.control,name:`display.reference_highlighting`,render:Hd}),(0,X.jsx)(Q,{control:C.control,name:`display.code_lens`,render:Ud})]}),(0,X.jsx)(au,{title:`Outputs`,children:(0,X.jsx)(Q,{control:C.control,name:`display.cell_output`,render:Gd})})]});case`packageManagementAndData`:return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(au,{title:`Package Management`,children:(0,X.jsx)(Q,{control:C.control,disabled:k,name:`package_management.manager`,render:qd})}),(0,X.jsx)(au,{title:`Data`,children:(0,X.jsx)(rd,{form:C,onSubmit:D})})]});case`runtime`:return(0,X.jsxs)(au,{title:`Runtime configuration`,children:[(0,X.jsx)(Q,{control:C.control,name:`runtime.auto_instantiate`,render:Jd}),(0,X.jsx)(Q,{control:C.control,name:`runtime.on_cell_change`,render:Xd}),(0,X.jsx)(Q,{control:C.control,name:`runtime.auto_reload`,render:e=>{let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`On module change`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`auto-reload-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:k||n.isOverridden,className:`inline-flex mr-2`,children:[`off`,`lazy`,`autorun`].map(Zd)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Whether marimo should automatically reload modules before executing cells. If "lazy", marimo will mark cells affected by module modifications as stale; if "autorun", affected cells will be automatically re-run.`})]})}}),(0,X.jsx)(Q,{control:C.control,name:`runtime.reactive_tests`,render:Qd}),(0,X.jsxs)(N,{children:[`Learn more in the`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/guides/reactivity/#configuring-how-marimo-runs-cells`,children:`docs`}),`.`]})]});case`ai`:return(0,X.jsx)(Gu,{form:C,config:t,onSubmit:D});case`optionalDeps`:return(0,X.jsx)(xd,{});case`labs`:return(0,X.jsxs)(au,{title:`Experimental Features`,children:[(0,X.jsx)(`p`,{className:`text-sm text-muted-secondary mb-4`,children:`⚠️ These features are experimental and may require restarting your notebook to take effect.`}),(0,X.jsx)(f,{control:C.control,name:`experimental.rtc_v2`,render:$d}),(0,X.jsx)(Q,{control:C.control,name:`experimental.external_agents`,render:ef}),(0,X.jsx)(Q,{control:C.control,name:`experimental.debugger`,render:tf}),(0,X.jsx)(Q,{control:C.control,name:`experimental.line_timing`,render:nf})]})}},e[12]=i,e[13]=u,e[14]=p,e[15]=t,e[16]=C,e[17]=M,e[18]=P,e[19]=F,e[20]=D,e[21]=o,e[22]=d,e[23]=l,e[24]=I):I=e[24];let L=I,R,B;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,X.jsx)(mr,{className:`inline`,children:`marimo.toml`}),B=(0,X.jsx)(`br`,{}),e[25]=R,e[26]=B):(R=e[25],B=e[26]);let H;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,X.jsxs)(`p`,{className:`text-muted-secondary`,children:[`User configuration is stored in `,R,B,`Run `,(0,X.jsx)(mr,{className:`inline`,children:`marimo config show`}),` in your terminal to show your current configuration and file location.`]}),e[27]=H):H=e[27];let ee=H,te;if(e[28]!==C||e[29]!==D){let t;e[31]===D?t=e[32]:(t=e=>D(e),e[31]=D,e[32]=t),te=C.handleSubmit(t),e[28]=C,e[29]=D,e[30]=te}else te=e[30];let ne;e[33]===d?ne=e[34]:(ne=e=>d(e),e[33]=d,e[34]=ne);let re;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(re=wd.map(rf),e[35]=re):re=e[35];let W;e[36]===m?W=e[37]:(W=(0,X.jsxs)(`span`,{children:[`Version: `,m]}),e[36]=m,e[37]=W);let ie;e[38]===g?ie=e[39]:(ie=(0,X.jsxs)(`span`,{children:[`Locale: `,g]}),e[38]=g,e[39]=ie);let ae;e[40]!==W||e[41]!==ie?(ae=(0,X.jsxs)(`div`,{className:`p-2 text-xs text-muted-foreground self-start flex flex-col gap-1`,children:[W,ie]}),e[40]=W,e[41]=ie,e[42]=ae):ae=e[42];let G,oe;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,X.jsx)(`div`,{className:`flex-1`}),oe=!Me()&&ee,e[43]=G,e[44]=oe):(G=e[43],oe=e[44]);let se;e[45]===ae?se=e[46]:(se=(0,X.jsxs)(yr,{className:`self-start max-h-none flex flex-col gap-2 shrink-0 bg-background flex-1 min-h-full`,children:[re,ae,G,oe]}),e[45]=ae,e[46]=se);let ce;e[47]!==u||e[48]!==ne||e[49]!==se?(ce=(0,X.jsx)(lr,{value:u,onValueChange:ne,orientation:`vertical`,className:`w-1/3 border-r h-full overflow-auto p-3`,children:se}),e[47]=u,e[48]=ne,e[49]=se,e[50]=ce):ce=e[50];let le;e[51]===L?le=e[52]:(le=L(),e[51]=L,e[52]=le);let ue;e[53]===le?ue=e[54]:(ue=(0,X.jsx)(`div`,{className:`w-2/3 pl-6 gap-2 flex flex-col overflow-auto p-6`,children:le}),e[53]=le,e[54]=ue);let de;e[55]!==ce||e[56]!==ue||e[57]!==te?(de=(0,X.jsxs)(`form`,{ref:s,onChange:te,className:`flex text-pretty overflow-hidden`,children:[ce,ue]}),e[55]=ce,e[56]=ue,e[57]=te,e[58]=de):de=e[58];let pe;return e[59]!==C||e[60]!==de?(pe=(0,X.jsx)(j,{...C,children:de}),e[59]=C,e[60]=de,e[61]=pe):pe=e[61],pe};function kd(e){let{field:t,override:n}=e;return(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Autosave enabled`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`autosave-checkbox`,checked:n.value===`after_delay`,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(e?`after_delay`:`off`)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]})}function Ad(e){let{field:t,override:n}=e;return(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Format on save`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`format-on-save-checkbox`,checked:n.value,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]})}function jd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Signature hints`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`signature-hint-on-type-checkbox`,checked:n.value??!1,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Display signature hints while typing within function calls.`})]})}function Md(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Auto-close pairs`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`auto-close-pairs-checkbox`,checked:n.value??!0,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsxs)(N,{children:[`Automatically insert closing brackets`,` `,(0,X.jsx)(`code`,{className:`text-xs`,children:`()`}),`,`,` `,(0,X.jsx)(`code`,{className:`text-xs`,children:`[]`}),`,`,` `,(0,X.jsx)(`code`,{className:`text-xs`,children:`{}`}),`, and quotes`,` `,(0,X.jsx)(`code`,{className:`text-xs`,children:`""`}),`,`,` `,(0,X.jsx)(`code`,{className:`text-xs`,children:`''`}),` when opening one.`]})]})}function Nd(e){let{field:t,override:n}=e;return(0,X.jsxs)(z,{className:Z,children:[(0,X.jsxs)(U,{children:[(0,X.jsx)(Yn,{variant:`defaultOutline`,className:`mr-2`,children:`Beta`}),`Diagnostics`]}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`diagnostics-checkbox`,checked:n.value,disabled:t.disabled||n.isOverridden,onCheckedChange:e=>{t.onChange(!!e)}})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]})}function Pd(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function Fd(e){let{field:t,override:n}=e;return(0,X.jsx)(`div`,{className:`flex flex-col space-y-1`,children:(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Keymap`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`keymap-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:fc.map(Pd)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]})})}function Id(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function Ld(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Default width`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`user-config-width-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:xc().map(Id)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`The default app width for new notebooks; overridden by "width" in the application config.`})]})}function Rd(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function zd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Theme`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`theme-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:Xn.map(Rd)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`This theme will be applied to the user's configuration; it does not affect theme when sharing the notebook.`})]})}function Bd(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function Vd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Locale`}),(0,X.jsx)(A,{children:(0,X.jsxs)(Je,{"data-testid":`locale-select`,onChange:e=>{e.target.value===Dd?t.onChange(void 0):t.onChange(e.target.value)},value:n.value||Dd,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:[(0,X.jsx)(`option`,{value:Dd,children:`System`}),navigator.languages.map(Bd)]})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsxs)(N,{children:[`The locale to use for the notebook. If your desired locale is not listed, you can change it manually via`,` `,(0,X.jsx)(mr,{className:`inline`,children:`marimo config show`}),`.`]})]})}function Hd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Reference highlighting`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`reference-highlighting-checkbox`,checked:n.value,disabled:n.isOverridden,onCheckedChange:t.onChange})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Visually emphasizes variables in a cell that are defined elsewhere in the notebook.`})]})}function Ud(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Code lens`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`code-lens-checkbox`,checked:n.value,disabled:n.isOverridden,onCheckedChange:t.onChange})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Shows inline icons in cell editors for datasources and storage buckets.`})]})}function Wd(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function Gd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Cell output area`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`cell-output-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:[`above`,`below`].map(Wd)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Where to display cell's output.`})]})}function Kd(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function qd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col space-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{children:`Manager`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`package-manager-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:t.disabled||n.isOverridden,className:`inline-flex mr-2`,children:ue.map(Kd)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsxs)(N,{children:[`When marimo comes across a module that is not installed, you will be prompted to install it using your preferred package manager. Learn more in the`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/guides/editor_features/package_management.html`,children:`docs`}),`.`,(0,X.jsx)(`br`,{}),(0,X.jsx)(`br`,{}),`Running marimo in a`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/guides/package_management/inlining_dependencies.html`,children:`sandboxed environment`}),` `,`is only supported by `,(0,X.jsx)(mr,{className:`inline`,children:`uv`})]})]})}function Jd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Autorun on startup`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`auto-instantiate-checkbox`,disabled:t.disabled||n.isOverridden,checked:n.value,onCheckedChange:t.onChange})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Whether to automatically run all cells on startup.`})]})}function Yd(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function Xd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`On cell change`}),(0,X.jsx)(A,{children:(0,X.jsx)(Je,{"data-testid":`on-cell-change-select`,onChange:e=>t.onChange(e.target.value),value:n.value,disabled:n.isOverridden,className:`inline-flex mr-2`,children:[`lazy`,`autorun`].map(Yd)})}),(0,X.jsx)(V,{}),(0,X.jsx)($,{override:n})]}),(0,X.jsx)(N,{children:`Whether marimo should automatically run cells or just mark them as stale. If "autorun", marimo will automatically run affected cells when a cell is run or a UI element is interacted with; if "lazy", marimo will mark affected cells as stale but won't re-run them.`})]})}function Zd(e){return(0,X.jsx)(`option`,{value:e,children:e},e)}function Qd(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Autorun Unit Tests`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`reactive-test-checkbox`,checked:n.value,disabled:n.isOverridden,onCheckedChange:t.onChange})})]}),(0,X.jsx)($,{override:n}),(0,X.jsx)(V,{}),(0,X.jsx)(N,{children:`Enable reactive pytest tests in notebook. When a cell contains only test functions (test_*) and classes (Test_*), marimo will automatically run them with pytest (requires notebook restart).`}),` `]})}function $d(e){let{field:t}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Real-Time Collaboration`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`rtc-checkbox`,checked:t.value===!0,onCheckedChange:t.onChange})})]}),(0,X.jsx)(N,{children:`Enable experimental real-time collaboration. This change requires a page refresh to take effect.`})]})}function ef(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`External Agents`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`external-agents-checkbox`,checked:n.value===!0,disabled:n.isOverridden,onCheckedChange:t.onChange})})]}),(0,X.jsx)($,{override:n}),(0,X.jsxs)(N,{children:[`Enable experimental external agents such as Claude Code and Codex. Learn more in the`,` `,(0,X.jsx)(bt,{href:`https://docs.marimo.io/guides/editor_features/agents/`,children:`docs`}),`.`]})]})}function tf(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Debugger`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`debugger-checkbox`,checked:n.value===!0,disabled:n.isOverridden,onCheckedChange:t.onChange})})]}),(0,X.jsx)($,{override:n}),(0,X.jsxs)(N,{children:[`Enable the live debugger: a clickable breakpoint gutter, current-line highlighting while a cell runs, and dropping into `,(0,X.jsx)(mr,{className:`inline`,children:`pdb`}),` at breakpoints. This change requires a page refresh to take effect.`]})]})}function nf(e){let{field:t,override:n}=e;return(0,X.jsxs)(`div`,{className:`flex flex-col gap-y-1`,children:[(0,X.jsxs)(z,{className:Z,children:[(0,X.jsx)(U,{className:`font-normal`,children:`Line Timing`}),(0,X.jsx)(A,{children:(0,X.jsx)(h,{"data-testid":`line-timing-checkbox`,checked:n.value===!0,disabled:n.isOverridden,onCheckedChange:t.onChange})})]}),(0,X.jsx)($,{override:n}),(0,X.jsx)(N,{children:`Highlight the line a cell is currently executing in green, with an elapsed timer next to long-running lines. Adds tracing overhead to every run while enabled. This change requires a page refresh to take effect.`})]})}function rf(e){return(0,X.jsx)(Vr,{value:e.id,className:`w-full text-left p-2 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground justify-start`,children:(0,X.jsxs)(`div`,{className:`flex gap-4 items-center text-lg overflow-hidden`,children:[(0,X.jsx)(`span`,{className:Re(e.className,`w-8 h-8 rounded flex items-center justify-center text-muted-foreground shrink-0`),children:(0,X.jsx)(e.Icon,{className:`w-4 h-4`})}),(0,X.jsx)(`span`,{className:`truncate`,children:e.label})]})},e.id)}var af=i(`ai-features`),of=i(!1);function sf(){let e=(0,Y.c)(4),t=c(Td),n=c(of),r=c(af),i;return e[0]!==t||e[1]!==r||e[2]!==n?(i={handleClick:(e,i)=>{t(e),e===`ai`&&r(i??`ai-features`),n(!0)}},e[0]=t,e[1]=r,e[2]=n,e[3]=i):i=e[3],i}var cf=e=>{let t=(0,Y.c)(58),{value:n,placeholder:r,onSelect:i,triggerClassName:o,customDropdownContent:s,iconSize:c,showAddCustomModelDocs:l,forRole:u,displayIconOnly:d,disabled:f}=e,p=c===void 0?`medium`:c,m=l!==void 0&&l,h=d!==void 0&&d,g=f!==void 0&&f,[_,v]=J.useState(!1),y=a(ve),b=a(ge),{saveModelChange:x}=Ge(),{handleClick:S}=sf(),C=b.copilot===`custom`?y?.models?.autocomplete_model:void 0,w,T,E,D,O,k,A,j,M;if(t[0]!==y||t[1]!==C||t[2]!==g||t[3]!==h||t[4]!==u||t[5]!==p||t[6]!==_||t[7]!==i||t[8]!==r||t[9]!==x||t[10]!==o||t[11]!==n){let e=Ys.create({customModels:[...y?.models?.custom_models??[],y?.models?.chat_model,C,y?.models?.edit_model].filter(Boolean),displayedModels:y?.models?.displayed_models}),a=Tc(e.getListModelsByProvider(),y),s=u===`autocomplete`?y?.models?.autocomplete_model:u===`chat`?y?.models?.chat_model:u===`edit`?y?.models?.edit_model:void 0,c=n?Bs.parse(n):s?Bs.parse(s):void 0,l=p===`medium`?`h-4 w-4`:`h-3 w-3`,d=(t,n)=>{let r=e.getModel(t.id);return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 w-full px-2 py-1`,children:[(0,X.jsx)(Ml,{provider:t.providerId,className:l}),(0,X.jsxs)(`div`,{className:`flex flex-col`,children:[(0,X.jsx)(`span`,{children:r?.name||t.shortModelId}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t.id})]}),(0,X.jsx)(`div`,{className:`ml-auto flex gap-1`,children:(0,X.jsx)(ct,{content:Pl(n),children:(0,X.jsx)(`span`,{className:`text-xs px-1.5 py-0.5 rounded font-medium ${Nl(n)}`,children:n},n)})})]})},f;t[21]!==g||t[22]!==u||t[23]!==i||t[24]!==x?(f=e=>{g||(i?i(e):x(e,u),v(!1))},t[21]=g,t[22]=u,t[23]=i,t[24]=x,t[25]=f):f=t[25];let m=f;T=ot,M=_,E=v;let b=`flex items-center justify-between px-2 py-0.5 border rounded-md