@marimo-team/frontend 0.23.9-dev40 → 0.23.9-dev41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{CellStatus-CDmf0H9L.js → CellStatus-B0Fz0F4Y.js} +1 -1
- package/dist/assets/{JsonOutput-BL_9GLRI.js → JsonOutput-B2v_Stn9.js} +1 -1
- package/dist/assets/{MarimoErrorOutput-Br13I8D-.js → MarimoErrorOutput-DWt3lI06.js} +1 -1
- package/dist/assets/{RenderHTML-DuOQ2W9H.js → RenderHTML-CP7UDK5X.js} +1 -1
- package/dist/assets/{add-cell-with-ai-DKKRfjjW.js → add-cell-with-ai-CAC7vFzu.js} +1 -1
- package/dist/assets/{add-connection-dialog-C9SIx5Ft.js → add-connection-dialog-C6y-WHQz.js} +1 -1
- package/dist/assets/{agent-panel-BCH0Z9mF.js → agent-panel-CztVh0_v.js} +1 -1
- package/dist/assets/{ai-model-dropdown-BJIy7LuP.js → ai-model-dropdown-BToySVta.js} +1 -1
- package/dist/assets/{app-config-button-DLAD7P0p.js → app-config-button-BjRm2yh5.js} +1 -1
- package/dist/assets/{cell-editor-uRXZvpu3.js → cell-editor-BQRxBkmz.js} +1 -1
- package/dist/assets/{cell-link-BR4kOQi7.js → cell-link-CW22jH60.js} +1 -1
- package/dist/assets/{cells-DXgqbrAE.js → cells-CFd8A4_A.js} +36 -36
- package/dist/assets/{chat-display-D-QA6PMp.js → chat-display-BnWhAO8B.js} +1 -1
- package/dist/assets/{chat-panel-DL_Dt73D.js → chat-panel-DXiPy2pt.js} +1 -1
- package/dist/assets/{chat-ui-d-LWtUox.js → chat-ui-CHaOV403.js} +1 -1
- package/dist/assets/{column-preview-Bd5100Qy.js → column-preview-CCTTw4tm.js} +1 -1
- package/dist/assets/{command-palette-De4byTmd.js → command-palette-BNMRH6ou.js} +1 -1
- package/dist/assets/{common-B-Cr_8ZO.js → common-C1B2sLXd.js} +1 -1
- package/dist/assets/{components-gf-SwZrH.js → components-BYC1jwIq.js} +1 -1
- package/dist/assets/{components-50GpNl6A.js → components-D_5hgeFU.js} +1 -1
- package/dist/assets/{datasource-DR0QFV6Y.js → datasource-DiYrzHFG.js} +1 -1
- package/dist/assets/{dependency-graph-panel-Cr3iMThM.js → dependency-graph-panel-BIsy_CIT.js} +1 -1
- package/dist/assets/{documentation-panel-C4bvn4zd.js → documentation-panel-B2yxm9NW.js} +1 -1
- package/dist/assets/{download-B8ILZtGq.js → download-BaGnGHOq.js} +1 -1
- package/dist/assets/{edit-page-BJbYVEP8.js → edit-page-B59sKLMa.js} +3 -3
- package/dist/assets/{error-panel-kpQXdDr1.js → error-panel-Btthwogx.js} +1 -1
- package/dist/assets/{file-explorer-panel-ej84F3PE.js → file-explorer-panel-BwlHcepA.js} +1 -1
- package/dist/assets/{file-icons-CSwRcBuU.js → file-icons-CIKQdTpO.js} +1 -1
- package/dist/assets/{floating-outline-JLZtB4ZJ.js → floating-outline-CEy7C9R6.js} +1 -1
- package/dist/assets/{focus-BwkisUyg.js → focus-DjmSWsDI.js} +1 -1
- package/dist/assets/{form-DCNt2gF_.js → form-PMq9H-I_.js} +1 -1
- package/dist/assets/{home-page-_lNrwuiF.js → home-page-CNWhDe7y.js} +1 -1
- package/dist/assets/{hooks-JDaShNWJ.js → hooks-h3Z7JHnR.js} +1 -1
- package/dist/assets/{html-to-image-Dl6Pl7To.js → html-to-image-CJxTFjQz.js} +1 -1
- package/dist/assets/{index-CH_RsUP0.js → index-CG_ckx5R.js} +3 -3
- package/dist/assets/{kiosk-mode-ZY8OUzPH.js → kiosk-mode-CtlXE_Xv.js} +1 -1
- package/dist/assets/{layout-KQw9kX6O.js → layout-CfRdiox1.js} +3 -3
- package/dist/assets/{logs-panel-B2WiXHrR.js → logs-panel-DFXVtdbp.js} +1 -1
- package/dist/assets/{markdown-renderer-CvYV9lL7.js → markdown-renderer-B1eFOa7V.js} +1 -1
- package/dist/assets/{name-cell-input-_J4ynFyz.js → name-cell-input-DdwASAQy.js} +1 -1
- package/dist/assets/{outline-panel-dU_lN6TG.js → outline-panel-CCgZPS64.js} +1 -1
- package/dist/assets/{packages-panel-kCWTPzGK.js → packages-panel-j1RhwwPL.js} +1 -1
- package/dist/assets/{panels-CzRHRHWA.js → panels-CwtNk2-W.js} +1 -1
- package/dist/assets/{process-output-plEiV4WI.js → process-output-DaNYZ78d.js} +1 -1
- package/dist/assets/{radio-group-BErew8H9.js → radio-group-PmOgsvro.js} +1 -1
- package/dist/assets/{readonly-python-code-BRmBzKfz.js → readonly-python-code-A3C9oCts.js} +1 -1
- package/dist/assets/{reveal-component-DTiyZ39F.js → reveal-component-DtAc0F6-.js} +1 -1
- package/dist/assets/{run-page-Ck3HK1tB.js → run-page-By67zzFX.js} +1 -1
- package/dist/assets/{scratchpad-panel-9zeHPoqW.js → scratchpad-panel-9whssk_-.js} +1 -1
- package/dist/assets/{session-panel-DG4l1G47.js → session-panel-D8BxQC75.js} +1 -1
- package/dist/assets/{snippets-panel-Bef-aULK.js → snippets-panel-DlmVBDpu.js} +1 -1
- package/dist/assets/{state-CRNHV5MK.js → state-CAn3OpIa.js} +1 -1
- package/dist/assets/{state-BJvYHxJQ.js → state-CEiXUajw.js} +1 -1
- package/dist/assets/{textarea-DjkngBZQ.js → textarea-DQ0XiNGe.js} +1 -1
- package/dist/assets/{tracing-mW6aZKPi.js → tracing-BV9mu9dM.js} +1 -1
- package/dist/assets/{tracing-panel-BHz2HzE_.js → tracing-panel-DhP3ygQA.js} +2 -2
- package/dist/assets/{useCellActionButton-4n5c9odP.js → useCellActionButton-CXkISThQ.js} +1 -1
- package/dist/assets/{useDeleteCell-CIkPRSXH.js → useDeleteCell-CH_1gU2V.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-BeS_vwLC.js → useDependencyPanelTab-CLNYiwom.js} +1 -1
- package/dist/assets/{useNotebookActions-DAQqu_bi.js → useNotebookActions-B9KqjQmK.js} +1 -1
- package/dist/assets/{useRunCells-DKDAEJ5k.js → useRunCells-DQDFDt2R.js} +1 -1
- package/dist/assets/{useSplitCell-Peyozvrj.js → useSplitCell-Cle-KXDv.js} +1 -1
- package/dist/index.html +22 -22
- package/package.json +1 -1
- package/src/core/codemirror/completion/hints.ts +4 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./home-page-
|
|
2
|
-
var L2=Object.defineProperty;var Ep=j=>{throw TypeError(j)};var V2=(j,Me,o)=>Me in j?L2(j,Me,{enumerable:!0,configurable:!0,writable:!0,value:o}):j[Me]=o;var B=(j,Me,o)=>V2(j,typeof Me!="symbol"?Me+"":Me,o),Jl=(j,Me,o)=>Me.has(j)||Ep("Cannot "+o);var $=(j,Me,o)=>(Jl(j,Me,"read from private field"),o?o.call(j):Me.get(j)),Qe=(j,Me,o)=>Me.has(j)?Ep("Cannot add the same private member more than once"):Me instanceof WeakSet?Me.add(j):Me.set(j,o),at=(j,Me,o,zt)=>(Jl(j,Me,"write to private field"),zt?zt.call(j,o):Me.set(j,o),o),Sr=(j,Me,o)=>(Jl(j,Me,"access private method"),o);var Rp=(j,Me,o,zt)=>({set _(Mn){at(j,Me,Mn,o)},get _(){return $(j,Me,zt)}});import{r as D2,s as qr,t as es}from"./chunk-LvLJmgfZ.js";import{c as _i,i as De,l as Sn,n as $e,s as Si,u as ga}from"./useEvent-D91BmmQi.js";import{t as H2}from"./react-Bj1aDYRI.js";import{$ as B2,Ai as zp,Bi as W2,Bt as ki,Ci as $2,Hi as Ur,Ii as Mp,J as q2,Ki as Pp,Mi as U2,Oi as Y2,Pi as ts,Q as G2,Qr as K2,Ri as Q2,S as X2,Si as Z2,Sr as J2,Ti as ej,Vi as tj,X as rj,Y as nj,Z as aj,at as ij,b as Fp,br as oj,bt as lj,cr as Op,dr as sj,et as dj,gi as cj,gr as Ni,ji as rs,ki as uj,nr as ns,ot as pj,rr as Lp,ut as mj,vi as hj,vr as fj,wi as gj,wr as xj,yr as Vp,yt as vj,z as wj,zi as kn,__tla as bj}from"./cells-DXgqbrAE.js";import{t as Dp}from"./react-dom-CSu739Rf.js";import{A as kr,B as Ne,C as Kt,E as yj,F as Hp,I as ft,J as jj,N as L,O as Cj,P as F,R as I,S as Yr,T as V,U as _j,V as Nr,a as Bp,b as ye,h as Sj,i as Wp,j as kj,k as Xe,n as $p,r as Nj,s as as,t as Tr,v as Tj,w as G,x as qp,z as Qt}from"./zod-H_cgTO0M.js";import{t as ee}from"./compiler-runtime-B3qBwwSJ.js";import{t as Aj}from"./get-C-qh_et5.js";import{t as Ti}from"./pick-DqWUNly1.js";import{a as Ij,c as Ej,d as is,f as Rj,g as zj,i as Mj,l as Pj,m as Fj,o as Ar,p as Oj,r as Up,s as os,u as Yp,w as Lj,x as Vj,__tla as Dj}from"./state-CRNHV5MK.js";import{_ as ue,a as Hj,d as Gr,o as Xt,t as ls,v as hr}from"./useEventListener-DvoEXWke.js";import{t as Nn}from"./invariant-BUdrueMv.js";import{A as Bj,M as Wj,b as $j,d as qj,j as Uj,o as Yj,t as Gj,v as Kj,w as Qj,x as Xj}from"./utils-CvI-39U6.js";import{r as ss}from"./constants-DMpttj8Q.js";import{S as ct,T as Zj,a as Jj,b as Gp,i as Kp,l as xa,r as ds,s as eC,t as tC,v as Qp,w as Xp}from"./config-DdDKNgb1.js";import{a as rC,i as nC,n as aC,o as iC,r as oC,t as lC}from"./switch-35WUzMpb.js";import{t as sC}from"./globals-FM_XB1In.js";import{t as Ai}from"./ErrorBoundary-DyYDV0HI.js";import{n as cs,t as Z}from"./cn-DCUzRj2J.js";import{t as dC}from"./jsx-runtime-BqBOg78p.js";import{C as vt,S as Zp,_ as Ii,a as cC,b as it,g as Jp,h as Kr,i as uC,p as pC,v as us,w as em,y as ps}from"./fullscreen-eipL3i3Y.js";import{o as mC,s as hC}from"./dist-BdyjRhEt.js";import{d as ms,u as tm}from"./menu-items-DcP01QzW.js";import{a as rm,c as fC,i as nm,l as gC,n as hs,o as xC,r as am,s as vC}from"./multi-map-CUuNtzHt.js";import{a as im,c as om,i as lm,l as sm,n as dm,s as cm,t as um}from"./alert-dialog-BqFLkbUc.js";import{a as Tn,c as ar,o as Dt,s as va}from"./popover-Bz_0Vkyf.js";import{a as wC,c as Ir,d as bC,f as yC,i as Ht,l as fs,m as pm,n as Er,o as Ei,p as mm,r as An,s as Qr,t as Rr}from"./select-DZcFyKFQ.js";import{a as hm,c as jC,i as CC,m as fm,o as _C,p as SC,r as kC,t as NC}from"./dropdown-menu-CR7cnzLX.js";import{A as TC,B as gs,C as fr,D as AC,Dt as IC,E as Xr,Et as EC,F as RC,H as zC,I as xs,L as MC,O as PC,P as FC,R as OC,S as Ri,St as LC,T as VC,Tt as DC,V as HC,X as BC,Y as WC,Z as $C,_t as gm,at as xm,b as vm,d as qC,dt as zi,et as vs,f as UC,ft as wa,gt as YC,ht as Zr,it as GC,k as KC,l as QC,lt as XC,mt as ws,nt as ZC,ot as JC,r as e_,rt as t_,s as r_,st as n_,t as wm,tt as bs,u as a_,ut as bm,wt as i_,x as o_,y as l_,z as ym,__tla as s_}from"./JsonOutput-BL_9GLRI.js";import{t as ys}from"./label-xHqFtfdz.js";import{g as jm,h as d_,i as Cm,l as c_,r as u_}from"./download-B8ILZtGq.js";import{n as p_,t as m_}from"./radio-group-BErew8H9.js";import{a as js,i as ba,n as Cs,o as _s,r as Ss,t as gr}from"./tooltip-DTV9tlSr.js";import{n as ks,t as ze}from"./button-BbCh-29a.js";import{at as h_}from"./dist-BrR4M-k3.js";import{m as f_,o as g_,t as ir}from"./arrays-DYDL-3-i.js";import{n as Ns,t as x_}from"./once-DRroIaBz.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{n as zr,r as Mi,t as Ts}from"./strings-wdPMRf6Z.js";import{n as v_}from"./requests-DIwGYs0l.js";import{t as Bt}from"./createLucideIcon-D5guW7EU.js";import{A as w_,C as _m,D as b_,O as y_,S as j_,_ as C_,a as Sm,b as __,c as km,d as ya,f as Nm,g as S_,h as k_,i as As,k as N_,l as T_,m as Tm,n as A_,p as I_,r as xr,s as E_,t as R_,u as or,v as z_,y as M_}from"./spec-CPQR_o92.js";import{n as P_,r as F_,t as O_}from"./fileToBase64-DZfwJMrG.js";import{t as L_,__tla as V_}from"./LazyAnyLanguageCodeMirror-BEvXb3VX.js";import{i as D_,n as H_,o as B_}from"./useLifecycle-DieWOfXE.js";import{i as W_,n as $_,t as Am}from"./useBoolean-_e4hdH_M.js";import{r as Im,t as Pi}from"./x-C-6liIBr.js";import{t as Is}from"./chevron-right-CG5QYXYk.js";import{__tla as q_}from"./markdown-renderer-CvYV9lL7.js";import{t as U_}from"./code-xml-CZN6vNxu.js";import{t as Em}from"./copy-BwrPA9zQ.js";import{n as Y_}from"./file-headphone-BrQspHac.js";import{r as G_,t as K_}from"./file-icons-CSwRcBuU.js";import{a as Rm,c as pe,i as Q_,l as zm,n as Mm,o as X_,r as Z_,s as Pm,t as J_,u as eS}from"./form-DCNt2gF_.js";import{t as tS}from"./house-mGK3v0Mm.js";import{n as Fi,t as Oi}from"./spinner-Bhir8k53.js";import{i as rS,r as Fm,t as Es}from"./readonly-python-code-BRmBzKfz.js";import{n as nS,t as Li}from"./types-W8WWuumF.js";import{t as Om}from"./plus-BgB18UzY.js";import{t as aS}from"./refresh-cw-DHwG4Mac.js";import{i as iS,n as oS,o as Lm,r as lS,t as Rs}from"./input-C3Hrdlqq.js";import{t as Vi}from"./square-function-uY_yJr5g.js";import{_ as lt,a as gt,c as ut,d as Jr,f as sS,g as Vm,h as dS,i as cS,l as ht,n as uS,o as ja,p as Dm,r as pS,t as mS,u as wt,v as lr}from"./textarea-DjkngBZQ.js";import{a as hS,i as fS,r as gS,t as xS}from"./column-preview-Bd5100Qy.js";import{t as vS}from"./square-B5xWCt0a.js";import{t as wS}from"./trash-2-rVklqqFF.js";import{t as Di}from"./triangle-alert-D2p96PEF.js";import{n as Hm,t as bS}from"./es-DGgq-Wes.js";import{t as Ct}from"./preload-helper-BPPi7vOr.js";import"./dist-CBSMxaO_.js";import"./dist-CpTFpfm_.js";import"./dist-B1U1kGCR.js";import"./dist-ChF5Ln9c.js";import"./dist-CPczQFlJ.js";import{n as yS,t as Et}from"./use-toast-IPAtJGea.js";import{n as Bm,t as jS}from"./paths-D5zczhUD.js";import{l as CS,r as _S,s as SS}from"./session-0B5NBztP.js";import{r as In}from"./useTheme-CI2eq4XN.js";import"./purify.es-B9KxLTTS.js";import{n as kS,r as NS,t as TS}from"./dates-CTxr0EqQ.js";import{t as zs}from"./copy-icon-OjtDb4gO.js";import{n as AS,t as Mr}from"./context-QkTujrKn.js";import{t as IS}from"./useNumberFormatter-ByUv-u9o.js";import{t as qe}from"./RenderHTML-DuOQ2W9H.js";import{n as ES,t as Wm}from"./useDebounce-7xZwVnnu.js";import{i as En,r as RS}from"./numbers-C3BAdHZE.js";import{t as zS}from"./ImperativeModal-B3Th7k4R.js";import"./share-DMwTZOTH.js";import{n as $m,r as qm,t as MS}from"./errors-vr57w7Ul.js";import{a as Um,n as PS,o as FS,r as OS,t as LS}from"./utils-DCL4n9wx.js";import"./vega-loader.browser-C8wT63Va.js";import"./defaultLocale-BLUna9fQ.js";import"./defaultLocale-DzliDDTm.js";import{a as VS}from"./react-icons.esm-BNzu6e7h.js";import{a as Ym,i as DS,n as Rn,t as HS}from"./events-CPoJAfgx.js";import{n as BS,r as Ms,t as Hi}from"./alert-yTS3WpF4.js";import{n as Ca,t as en}from"./error-banner-LdWZDbqd.js";import{__tla as WS}from"./chunk-5FQGJX7Z-D9iBG0F7.js";import"./html-to-image-Dl6Pl7To.js";import{a as $S,o as qS}from"./focus-BwkisUyg.js";import{n as Rt}from"./useAsyncData-bgszE9F0.js";import{a as Gm,i as Ps,n as Fs,o as zn,r as tn,t as Os}from"./table-BGPSHfig.js";import"./react-resizable-panels.browser.esm-CV8-hvjx.js";import{a as Km,c as US,o as YS,r as GS,s as KS,t as Qm,u as QS}from"./command-KARR7KMq.js";import{t as Xm}from"./renderShortcut-CcFk3m01.js";import{t as XS}from"./bundle.esm-DjhGJy4I.js";import{n as ZS}from"./icons-Ol38nIbL.js";import"./esm-CqWdmSnV.js";import{a as JS,i as ek,n as tk,o as rk,t as Zm}from"./components-gf-SwZrH.js";import{t as sr}from"./useDeepCompareMemoize-zUHU--0D.js";import{t as nk}from"./pathUtils-CJjndqMI.js";import{i as ak,n as ik,r as ok}from"./floating-outline-JLZtB4ZJ.js";Promise.all([(()=>{try{return bj}catch{}})(),(()=>{try{return Dj}catch{}})(),(()=>{try{return s_}catch{}})(),(()=>{try{return V_}catch{}})(),(()=>{try{return q_}catch{}})(),(()=>{try{return WS}catch{}})()]).then(async()=>{var yt,la,Ie,Le,xn,vn,wn,sa,Vt,Wi,Vs,Ds,Br,jt,da,Wr,bn,ca,yn,ua,wi,pa,bi,yi,ji,Ci,Tp;(function(){let t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(let n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(let a of n)if(a.type==="childList")for(let i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function e(n){let a={};return n.integrity&&(a.integrity=n.integrity),n.referrerPolicy&&(a.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?a.credentials="include":n.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(n){if(n.ep)return;n.ep=!0;let a=e(n);fetch(n.href,a)}})();var j=qr(H2(),1),Me=qr(Dp(),1),o=qr(dC(),1),zt="NavigationMenu",[Mn,Hs,Jm]=ms(zt),[$i,eh,th]=ms(zt),[qi,lk]=Zp(zt,[Jm,th]),[rh,Mt]=qi(zt),[nh,ah]=qi(zt),Bs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:i,delayDuration:l=200,skipDelayDuration:s=300,orientation:d="horizontal",dir:c,...u}=t,[p,m]=j.useState(null),f=Xt(e,N=>m(N)),g=tm(c),x=j.useRef(0),w=j.useRef(0),b=j.useRef(0),[v,y]=j.useState(!0),[S,C]=us({prop:n,onChange:N=>{let T=N!=="",A=s>0;T?(window.clearTimeout(b.current),A&&y(!1)):(window.clearTimeout(b.current),b.current=window.setTimeout(()=>y(!0),s)),a==null||a(N)},defaultProp:i??"",caller:zt}),_=j.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>C(""),150)},[C]),k=j.useCallback(N=>{window.clearTimeout(w.current),C(N)},[C]),h=j.useCallback(N=>{S===N?window.clearTimeout(w.current):x.current=window.setTimeout(()=>{window.clearTimeout(w.current),C(N)},l)},[S,C,l]);return j.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(w.current),window.clearTimeout(b.current)},[]),(0,o.jsx)(Ws,{scope:r,isRootMenu:!0,value:S,dir:g,orientation:d,rootNavigationMenu:p,onTriggerEnter:N=>{window.clearTimeout(x.current),v?h(N):k(N)},onTriggerLeave:()=>{window.clearTimeout(x.current),_()},onContentEnter:()=>window.clearTimeout(w.current),onContentLeave:_,onItemSelect:N=>{C(T=>T===N?"":N)},onItemDismiss:()=>C(""),children:(0,o.jsx)(vt.nav,{"aria-label":"Main","data-orientation":d,dir:g,...u,ref:f})})});Bs.displayName=zt;var Ui="NavigationMenuSub",ih=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:i,orientation:l="horizontal",...s}=t,d=Mt(Ui,r),[c,u]=us({prop:n,onChange:a,defaultProp:i??"",caller:Ui});return(0,o.jsx)(Ws,{scope:r,isRootMenu:!1,value:c,dir:d.dir,orientation:l,rootNavigationMenu:d.rootNavigationMenu,onTriggerEnter:p=>u(p),onItemSelect:p=>u(p),onItemDismiss:()=>u(""),children:(0,o.jsx)(vt.div,{"data-orientation":l,...s,ref:e})})});ih.displayName=Ui;var Ws=t=>{let{scope:e,isRootMenu:r,rootNavigationMenu:n,dir:a,orientation:i,children:l,value:s,onItemSelect:d,onItemDismiss:c,onTriggerEnter:u,onTriggerLeave:p,onContentEnter:m,onContentLeave:f}=t,[g,x]=j.useState(null),[w,b]=j.useState(new Map),[v,y]=j.useState(null);return(0,o.jsx)(rh,{scope:e,isRootMenu:r,rootNavigationMenu:n,value:s,previousValue:pm(s),baseId:Jp(),dir:a,orientation:i,viewport:g,onViewportChange:x,indicatorTrack:v,onIndicatorTrackChange:y,onTriggerEnter:Kr(u),onTriggerLeave:Kr(p),onContentEnter:Kr(m),onContentLeave:Kr(f),onItemSelect:Kr(d),onItemDismiss:Kr(c),onViewportContentChange:j.useCallback((S,C)=>{b(_=>(_.set(S,C),new Map(_)))},[]),onViewportContentRemove:j.useCallback(S=>{b(C=>C.has(S)?(C.delete(S),new Map(C)):C)},[]),children:(0,o.jsx)(Mn.Provider,{scope:e,children:(0,o.jsx)(nh,{scope:e,items:w,children:l})})})},$s="NavigationMenuList",qs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=Mt($s,r),i=(0,o.jsx)(vt.ul,{"data-orientation":a.orientation,...n,ref:e});return(0,o.jsx)(vt.div,{style:{position:"relative"},ref:a.onIndicatorTrackChange,children:(0,o.jsx)(Mn.Slot,{scope:r,children:a.isRootMenu?(0,o.jsx)(rd,{asChild:!0,children:i}):i})})});qs.displayName=$s;var Us="NavigationMenuItem",[oh,Ys]=qi(Us),Gs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,...a}=t,i=Jp(),l=n||i||"LEGACY_REACT_AUTO_VALUE",s=j.useRef(null),d=j.useRef(null),c=j.useRef(null),u=j.useRef(()=>{}),p=j.useRef(!1),m=j.useCallback((g="start")=>{if(s.current){u.current();let x=Qi(s.current);x.length&&Xi(g==="start"?x:x.reverse())}},[]),f=j.useCallback(()=>{if(s.current){let g=Qi(s.current);g.length&&(u.current=mh(g))}},[]);return(0,o.jsx)(oh,{scope:r,value:l,triggerRef:d,contentRef:s,focusProxyRef:c,wasEscapeCloseRef:p,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:f,onContentFocusOutside:f,children:(0,o.jsx)(vt.li,{...a,ref:e})})});Gs.displayName=Us;var Yi="NavigationMenuTrigger",Ks=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,disabled:n,...a}=t,i=Mt(Yi,t.__scopeNavigationMenu),l=Ys(Yi,t.__scopeNavigationMenu),s=j.useRef(null),d=Xt(s,l.triggerRef,e),c=id(i.baseId,l.value),u=od(i.baseId,l.value),p=j.useRef(!1),m=j.useRef(!1),f=l.value===i.value;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Mn.ItemSlot,{scope:r,value:l.value,children:(0,o.jsx)(ad,{asChild:!0,children:(0,o.jsx)(vt.button,{id:c,disabled:n,"data-disabled":n?"":void 0,"data-state":Ji(f),"aria-expanded":f,"aria-controls":u,...a,ref:d,onPointerEnter:it(t.onPointerEnter,()=>{m.current=!1,l.wasEscapeCloseRef.current=!1}),onPointerMove:it(t.onPointerMove,Sa(()=>{n||m.current||l.wasEscapeCloseRef.current||p.current||(i.onTriggerEnter(l.value),p.current=!0)})),onPointerLeave:it(t.onPointerLeave,Sa(()=>{n||(i.onTriggerLeave(),p.current=!1)})),onClick:it(t.onClick,()=>{i.onItemSelect(l.value),m.current=f}),onKeyDown:it(t.onKeyDown,g=>{let x={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];f&&g.key===x&&(l.onEntryKeyDown(),g.preventDefault())})})})}),f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(hC,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:g=>{let x=l.contentRef.current,w=g.relatedTarget,b=w===s.current,v=x==null?void 0:x.contains(w);(b||!v)&&l.onFocusProxyEnter(b?"start":"end")}}),i.viewport&&(0,o.jsx)("span",{"aria-owns":u})]})]})});Ks.displayName=Yi;var lh="NavigationMenuLink",Qs="navigationMenu.linkSelect",Xs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,active:n,onSelect:a,...i}=t;return(0,o.jsx)(ad,{asChild:!0,children:(0,o.jsx)(vt.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...i,ref:e,onClick:it(t.onClick,l=>{let s=l.target,d=new CustomEvent(Qs,{bubbles:!0,cancelable:!0});s.addEventListener(Qs,c=>a==null?void 0:a(c),{once:!0}),em(s,d),!d.defaultPrevented&&!l.metaKey&&em(s,new CustomEvent(_a,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});Xs.displayName=lh;var Gi="NavigationMenuIndicator",Zs=j.forwardRef((t,e)=>{let{forceMount:r,...n}=t,a=Mt(Gi,t.__scopeNavigationMenu),i=!!a.value;return a.indicatorTrack?Me.createPortal((0,o.jsx)(Ii,{present:r||i,children:(0,o.jsx)(sh,{...n,ref:e})}),a.indicatorTrack):null});Zs.displayName=Gi;var sh=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=Mt(Gi,r),i=Hs(r),[l,s]=j.useState(null),[d,c]=j.useState(null),u=a.orientation==="horizontal",p=!!a.value;j.useEffect(()=>{var g;let f=(g=i().find(x=>x.value===a.value))==null?void 0:g.ref.current;f&&s(f)},[i,a.value]);let m=()=>{l&&c({size:u?l.offsetWidth:l.offsetHeight,offset:u?l.offsetLeft:l.offsetTop})};return Zi(l,m),Zi(a.indicatorTrack,m),d?(0,o.jsx)(vt.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":a.orientation,...n,ref:e,style:{position:"absolute",...u?{left:0,width:d.size+"px",transform:`translateX(${d.offset}px)`}:{top:0,height:d.size+"px",transform:`translateY(${d.offset}px)`},...n.style}}):null}),rn="NavigationMenuContent",Js=j.forwardRef((t,e)=>{let{forceMount:r,...n}=t,a=Mt(rn,t.__scopeNavigationMenu),i=Ys(rn,t.__scopeNavigationMenu),l=Xt(i.contentRef,e),s=i.value===a.value,d={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...n};return a.viewport?(0,o.jsx)(dh,{forceMount:r,...d,ref:l}):(0,o.jsx)(Ii,{present:r||s,children:(0,o.jsx)(ed,{"data-state":Ji(s),...d,ref:l,onPointerEnter:it(t.onPointerEnter,a.onContentEnter),onPointerLeave:it(t.onPointerLeave,Sa(a.onContentLeave)),style:{pointerEvents:!s&&a.isRootMenu?"none":void 0,...d.style}})})});Js.displayName=rn;var dh=j.forwardRef((t,e)=>{let{onViewportContentChange:r,onViewportContentRemove:n}=Mt(rn,t.__scopeNavigationMenu);return ps(()=>{r(t.value,{ref:e,...t})},[t,e,r]),ps(()=>()=>n(t.value),[t.value,n]),null}),_a="navigationMenu.rootContentDismiss",ed=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,triggerRef:a,focusProxyRef:i,wasEscapeCloseRef:l,onRootContentClose:s,onContentFocusOutside:d,...c}=t,u=Mt(rn,r),p=j.useRef(null),m=Xt(p,e),f=id(u.baseId,n),g=od(u.baseId,n),x=Hs(r),w=j.useRef(null),{onItemDismiss:b}=u;j.useEffect(()=>{let y=p.current;if(u.isRootMenu&&y){let S=()=>{var C;b(),s(),y.contains(document.activeElement)&&((C=a.current)==null||C.focus())};return y.addEventListener(_a,S),()=>y.removeEventListener(_a,S)}},[u.isRootMenu,t.value,a,b,s]);let v=j.useMemo(()=>{let y=x().map(N=>N.value);u.dir==="rtl"&&y.reverse();let S=y.indexOf(u.value),C=y.indexOf(u.previousValue),_=n===u.value,k=C===y.indexOf(n);if(!_&&!k)return w.current;let h=(()=>{if(S!==C){if(_&&C!==-1)return S>C?"from-end":"from-start";if(k&&S!==-1)return S>C?"to-start":"to-end"}return null})();return w.current=h,h},[u.previousValue,u.value,u.dir,x,n]);return(0,o.jsx)(rd,{asChild:!0,children:(0,o.jsx)(pC,{id:g,"aria-labelledby":f,"data-motion":v,"data-orientation":u.orientation,...c,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{var S;let y=new Event(_a,{bubbles:!0,cancelable:!0});(S=p.current)==null||S.dispatchEvent(y)},onFocusOutside:it(t.onFocusOutside,y=>{var C;d();let S=y.target;(C=u.rootNavigationMenu)!=null&&C.contains(S)&&y.preventDefault()}),onPointerDownOutside:it(t.onPointerDownOutside,y=>{var k;let S=y.target,C=x().some(h=>{var N;return(N=h.ref.current)==null?void 0:N.contains(S)}),_=u.isRootMenu&&((k=u.viewport)==null?void 0:k.contains(S));(C||_||!u.isRootMenu)&&y.preventDefault()}),onKeyDown:it(t.onKeyDown,y=>{var C;let S=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!S){let _=Qi(y.currentTarget),k=document.activeElement,h=_.findIndex(N=>N===k);Xi(y.shiftKey?_.slice(0,h).reverse():_.slice(h+1,_.length))?y.preventDefault():(C=i.current)==null||C.focus()}}),onEscapeKeyDown:it(t.onEscapeKeyDown,y=>{l.current=!0})})})}),Ki="NavigationMenuViewport",td=j.forwardRef((t,e)=>{let{forceMount:r,...n}=t,a=!!Mt(Ki,t.__scopeNavigationMenu).value;return(0,o.jsx)(Ii,{present:r||a,children:(0,o.jsx)(ch,{...n,ref:e})})});td.displayName=Ki;var ch=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,children:n,...a}=t,i=Mt(Ki,r),l=Xt(e,i.onViewportChange),s=ah(rn,t.__scopeNavigationMenu),[d,c]=j.useState(null),[u,p]=j.useState(null),m=d?(d==null?void 0:d.width)+"px":void 0,f=d?(d==null?void 0:d.height)+"px":void 0,g=!!i.value,x=g?i.value:i.previousValue;return Zi(u,()=>{u&&c({width:u.offsetWidth,height:u.offsetHeight})}),(0,o.jsx)(vt.div,{"data-state":Ji(g),"data-orientation":i.orientation,...a,ref:l,style:{pointerEvents:!g&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":m,"--radix-navigation-menu-viewport-height":f,...a.style},onPointerEnter:it(t.onPointerEnter,i.onContentEnter),onPointerLeave:it(t.onPointerLeave,Sa(i.onContentLeave)),children:Array.from(s.items).map(([w,{ref:b,forceMount:v,...y}])=>{let S=x===w;return(0,o.jsx)(Ii,{present:v||S,children:(0,o.jsx)(ed,{...y,ref:Hj(b,C=>{S&&C&&p(C)})})},w)})})}),uh="FocusGroup",rd=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=Mt(uh,r);return(0,o.jsx)($i.Provider,{scope:r,children:(0,o.jsx)($i.Slot,{scope:r,children:(0,o.jsx)(vt.div,{dir:a.dir,...n,ref:e})})})}),nd=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],ph="FocusGroupItem",ad=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=eh(r),i=Mt(ph,r);return(0,o.jsx)($i.ItemSlot,{scope:r,children:(0,o.jsx)(vt.button,{...n,ref:e,onKeyDown:it(t.onKeyDown,l=>{if(["Home","End",...nd].includes(l.key)){let s=a().map(d=>d.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(l.key)&&s.reverse(),nd.includes(l.key)){let d=s.indexOf(l.currentTarget);s=s.slice(d+1)}setTimeout(()=>Xi(s)),l.preventDefault()}})})})});function Qi(t){let e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Xi(t){let e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}function mh(t){return t.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{t.forEach(e=>{let r=e.dataset.tabindex;e.setAttribute("tabindex",r)})}}function Zi(t,e){let r=Kr(e);ps(()=>{let n=0;if(t){let a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(t),()=>{window.cancelAnimationFrame(n),a.unobserve(t)}}},[t,r])}function Ji(t){return t?"open":"closed"}function id(t,e){return`${t}-trigger-${e}`}function od(t,e){return`${t}-content-${e}`}function Sa(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ld=Bs,sd=qs,hh=Gs,dd=Ks,fh=Xs,cd=Zs,ud=Js,pd=td,gh=D2({Range:()=>co,Root:()=>Na,Slider:()=>to,SliderRange:()=>ao,SliderThumb:()=>oo,SliderTrack:()=>ro,Thumb:()=>Ta,Track:()=>so,createSliderScope:()=>wh},1),md=["PageUp","PageDown"],hd=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fd={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},nn="Slider",[eo,xh,vh]=ms(nn),[gd,wh]=Zp(nn,[vh]),[bh,ka]=gd(nn),to=j.forwardRef((t,e)=>{let{name:r,min:n=0,max:a=100,step:i=1,orientation:l="horizontal",disabled:s=!1,minStepsBetweenThumbs:d=0,defaultValue:c=[n],value:u,onValueChange:p=()=>{},onValueCommit:m=()=>{},inverted:f=!1,form:g,...x}=t,w=j.useRef(new Set),b=j.useRef(0),v=l==="horizontal"?yh:jh,[y=[],S]=us({prop:u,defaultProp:c,onChange:T=>{var A;(A=[...w.current][b.current])==null||A.focus(),p(T)}}),C=j.useRef(y);function _(T){N(T,Nh(y,T))}function k(T){N(T,b.current)}function h(){let T=C.current[b.current];y[b.current]!==T&&m(y)}function N(T,A,{commit:R}={commit:!1}){let z=Eh(i),E=mm(Rh(Math.round((T-n)/i)*i+n,z),[n,a]);S((M=[])=>{let P=Sh(M,E,A);if(Ih(P,d*i)){b.current=P.indexOf(E);let O=String(P)!==String(M);return O&&R&&m(P),O?P:M}else return M})}return(0,o.jsx)(bh,{scope:t.__scopeSlider,name:r,disabled:s,min:n,max:a,valueIndexToChangeRef:b,thumbs:w.current,values:y,orientation:l,form:g,children:(0,o.jsx)(eo.Provider,{scope:t.__scopeSlider,children:(0,o.jsx)(eo.Slot,{scope:t.__scopeSlider,children:(0,o.jsx)(v,{"aria-disabled":s,"data-disabled":s?"":void 0,...x,ref:e,onPointerDown:it(x.onPointerDown,()=>{s||(C.current=y)}),min:n,max:a,inverted:f,onSlideStart:s?void 0:_,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:h,onHomeKeyDown:()=>!s&&N(n,0,{commit:!0}),onEndKeyDown:()=>!s&&N(a,y.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:A})=>{if(!s){let R=md.includes(T.key)||T.shiftKey&&hd.includes(T.key)?10:1,z=b.current,E=y[z];N(E+i*R*A,z,{commit:!0})}}})})})})});to.displayName=nn;var[xd,vd]=gd(nn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),yh=j.forwardRef((t,e)=>{let{min:r,max:n,dir:a,inverted:i,onSlideStart:l,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=t,[p,m]=j.useState(null),f=Xt(e,y=>m(y)),g=j.useRef(void 0),x=tm(a),w=x==="ltr",b=w&&!i||!w&&i;function v(y){let S=g.current||p.getBoundingClientRect(),C=lo([0,S.width],b?[r,n]:[n,r]);return g.current=S,C(y-S.left)}return(0,o.jsx)(xd,{scope:t.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,o.jsx)(wd,{dir:x,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{let S=v(y.clientX);l==null||l(S)},onSlideMove:y=>{let S=v(y.clientX);s==null||s(S)},onSlideEnd:()=>{g.current=void 0,d==null||d()},onStepKeyDown:y=>{let S=fd[b?"from-left":"from-right"].includes(y.key);c==null||c({event:y,direction:S?-1:1})}})})}),jh=j.forwardRef((t,e)=>{let{min:r,max:n,inverted:a,onSlideStart:i,onSlideMove:l,onSlideEnd:s,onStepKeyDown:d,...c}=t,u=j.useRef(null),p=Xt(e,u),m=j.useRef(void 0),f=!a;function g(x){let w=m.current||u.current.getBoundingClientRect(),b=lo([0,w.height],f?[n,r]:[r,n]);return m.current=w,b(x-w.top)}return(0,o.jsx)(xd,{scope:t.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,o.jsx)(wd,{"data-orientation":"vertical",...c,ref:p,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:x=>{let w=g(x.clientY);i==null||i(w)},onSlideMove:x=>{let w=g(x.clientY);l==null||l(w)},onSlideEnd:()=>{m.current=void 0,s==null||s()},onStepKeyDown:x=>{let w=fd[f?"from-bottom":"from-top"].includes(x.key);d==null||d({event:x,direction:w?-1:1})}})})}),wd=j.forwardRef((t,e)=>{let{__scopeSlider:r,onSlideStart:n,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:l,onEndKeyDown:s,onStepKeyDown:d,...c}=t,u=ka(nn,r);return(0,o.jsx)(vt.span,{...c,ref:e,onKeyDown:it(t.onKeyDown,p=>{p.key==="Home"?(l(p),p.preventDefault()):p.key==="End"?(s(p),p.preventDefault()):md.concat(hd).includes(p.key)&&(d(p),p.preventDefault())}),onPointerDown:it(t.onPointerDown,p=>{let m=p.target;m.setPointerCapture(p.pointerId),p.preventDefault(),u.thumbs.has(m)?m.focus():n(p)}),onPointerMove:it(t.onPointerMove,p=>{p.target.hasPointerCapture(p.pointerId)&&a(p)}),onPointerUp:it(t.onPointerUp,p=>{let m=p.target;m.hasPointerCapture(p.pointerId)&&(m.releasePointerCapture(p.pointerId),i(p))})})}),bd="SliderTrack",ro=j.forwardRef((t,e)=>{let{__scopeSlider:r,...n}=t,a=ka(bd,r);return(0,o.jsx)(vt.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...n,ref:e})});ro.displayName=bd;var no="SliderRange",ao=j.forwardRef((t,e)=>{let{__scopeSlider:r,...n}=t,a=ka(no,r),i=vd(no,r),l=Xt(e,j.useRef(null)),s=a.values.length,d=a.values.map(p=>jd(p,a.min,a.max)),c=s>1?Math.min(...d):0,u=100-Math.max(...d);return(0,o.jsx)(vt.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...n,ref:l,style:{...t.style,[i.startEdge]:c+"%",[i.endEdge]:u+"%"}})});ao.displayName=no;var io="SliderThumb",oo=j.forwardRef((t,e)=>{let r=xh(t.__scopeSlider),[n,a]=j.useState(null),i=Xt(e,s=>a(s)),l=j.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return(0,o.jsx)(Ch,{...t,ref:i,index:l})}),Ch=j.forwardRef((t,e)=>{let{__scopeSlider:r,index:n,name:a,...i}=t,l=ka(io,r),s=vd(io,r),[d,c]=j.useState(null),u=Xt(e,v=>c(v)),p=d?l.form||!!d.closest("form"):!0,m=mC(d),f=l.values[n],g=f===void 0?0:jd(f,l.min,l.max),x=kh(n,l.values.length),w=m==null?void 0:m[s.size],b=w?Th(w,g,s.direction):0;return j.useEffect(()=>{if(d)return l.thumbs.add(d),()=>{l.thumbs.delete(d)}},[d,l.thumbs]),(0,o.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${b}px)`},children:[(0,o.jsx)(eo.ItemSlot,{scope:t.__scopeSlider,children:(0,o.jsx)(vt.span,{role:"slider","aria-label":t["aria-label"]||x,"aria-valuemin":l.min,"aria-valuenow":f,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:t.style,onFocus:it(t.onFocus,()=>{l.valueIndexToChangeRef.current=n})})}),p&&(0,o.jsx)(yd,{name:a??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:f},n)]})});oo.displayName=io;var _h="RadioBubbleInput",yd=j.forwardRef(({__scopeSlider:t,value:e,...r},n)=>{let a=j.useRef(null),i=Xt(a,n),l=pm(e);return j.useEffect(()=>{let s=a.current;if(!s)return;let d=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==e&&c){let u=new Event("input",{bubbles:!0});c.call(s,e),s.dispatchEvent(u)}},[l,e]),(0,o.jsx)(vt.input,{style:{display:"none"},...r,ref:i,defaultValue:e})});yd.displayName=_h;function Sh(t=[],e,r){let n=[...t];return n[r]=e,n.sort((a,i)=>a-i)}function jd(t,e,r){return mm(100/(r-e)*(t-e),[0,100])}function kh(t,e){if(e>2)return`Value ${t+1} of ${e}`;if(e===2)return["Minimum","Maximum"][t]}function Nh(t,e){if(t.length===1)return 0;let r=t.map(a=>Math.abs(a-e)),n=Math.min(...r);return r.indexOf(n)}function Th(t,e,r){let n=t/2;return(n-lo([0,50],[0,n])(e)*r)*r}function Ah(t){return t.slice(0,-1).map((e,r)=>t[r+1]-e)}function Ih(t,e){if(e>0){let r=Ah(t);return Math.min(...r)>=e}return!0}function lo(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];let n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function Eh(t){return(String(t).split(".")[1]||"").length}function Rh(t,e){let r=10**e;return Math.round(t*r)/r}var Na=to,so=ro,co=ao,Ta=oo,zh=Bt("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),Mh=Bt("arrow-up-wide-narrow",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h4",key:"1krc32"}]]),Ph=Bt("binary",[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]]),Fh=Bt("brackets",[["path",{d:"M16 3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-3",key:"1kt8lf"}],["path",{d:"M8 21H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h3",key:"gduv9"}]]),Oh=Bt("combine",[["path",{d:"M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1",key:"1l7d7l"}],["path",{d:"M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1",key:"9955pe"}],["path",{d:"m7 15 3 3",key:"4hkfgk"}],["path",{d:"m7 21 3-3H5a2 2 0 0 1-2-2v-2",key:"1xljwe"}],["rect",{x:"14",y:"14",width:"7",height:"7",rx:"1",key:"1cdgtw"}],["rect",{x:"3",y:"3",width:"7",height:"7",rx:"1",key:"zi3rio"}]]),Lh=Bt("copy-slash",[["line",{x1:"12",x2:"18",y1:"18",y2:"12",key:"ebkxgr"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Vh=Bt("corner-left-up",[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]),Dh=Bt("group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]),Hh=Bt("shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]),Cd=Bt("square-dashed-mouse-pointer",[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h2",key:"1qve2z"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v2",key:"p14lih"}],["path",{d:"M3 14v1",key:"vnatye"}]]),Bh=Bt("square-mouse-pointer",[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]]),_d=Bt("triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]),Wh=qr(Pp(),1);const vr={INSERT:"insert",DELETE:"delete",SUBSTITUTE:"substitute",MATCH:"match"};function $h(t,e,r){let n=t.length,a=e.length,i=Array.from({length:n+1},()=>Array.from({length:a+1}).fill(0));for(let c=0;c<=n;c++)i[c][0]=c;for(let c=0;c<=a;c++)i[0][c]=c;for(let c=1;c<=n;c++)for(let u=1;u<=a;u++)i[c][u]=r(t[c-1],e[u-1])?i[c-1][u-1]:1+Math.min(i[c-1][u],i[c][u-1],i[c-1][u-1]);let l=[],s=n,d=a;for(;s>0||d>0;)s>0&&d>0&&r(t[s-1],e[d-1])?(l.unshift({type:vr.MATCH,position:s-1}),s--,d--):s>0&&d>0&&i[s][d]===i[s-1][d-1]+1?(l.unshift({type:vr.SUBSTITUTE,position:s-1}),s--,d--):s>0&&i[s][d]===i[s-1][d]+1?(l.unshift({type:vr.DELETE,position:s-1}),s--):d>0&&i[s][d]===i[s][d-1]+1&&(l.unshift({type:vr.INSERT,position:s}),d--);return{distance:i[n][a],operations:l}}function qh(t,e,r){let n=[],a=0;for(let i of e)switch(i.type){case vr.MATCH:n.push(t[a]),a++;break;case vr.DELETE:a++;break;case vr.INSERT:n.push(r);break;case vr.SUBSTITUTE:n.push(r),a++;break}return n}function Uh(t,e,r,n){let a=$h(t,e,r);return{merged:qh(t,a.operations,n),edits:a}}var Aa=0,Ia="";function uo(t){return t.id?t.id:t.name==="setup"?Q2:ts.create()}function Yh(t,e){let r=new Map,n=new Map;if(!t&&!e)return{cellIds:[],sessionCellData:r,notebookCellData:n};if(!t){let s=(e==null?void 0:e.cells.map(d=>uo(d)))||[];return{cellIds:s,sessionCellData:new Map(s.map((d,c)=>[d,null])),notebookCellData:new Map(s.map((d,c)=>[d,(e==null?void 0:e.cells[c])||Sd()]))}}if(!e){let s=t.cells.map(d=>uo(d));return{cellIds:s,sessionCellData:new Map(s.map((d,c)=>[d,t.cells[c]])),notebookCellData:new Map(s.map(d=>[d,Sd()]))}}let{merged:a,edits:i}=Uh(t.cells,e.cells,(s,d)=>{let c=s.code_hash;return c?d.code_hash===c:!1},kd());i.distance>0&&ue.warn("Session and notebook have different cells, attempted merge.");let l=[];for(let s=0;s<e.cells.length;s++){let d=e.cells[s];if(d){let c=uo(d);l.push(c);let u=a[s]||kd();u.id=c,r.set(c,u),n.set(c,d)}else ue.warn("Merged notebook cell is null at index",s)}return{cellIds:l,sessionCellData:r,notebookCellData:n}}function Sd(){return{id:ts.create(),name:Ia,code:Ia,code_hash:null,config:{column:null,disabled:!1,hide_code:!1}}}function kd(){return{id:ts.create(),code_hash:null,console:[],outputs:[]}}function Gh(t,e){var r,n,a;return{id:t,name:e.name??Ia,code:e.code??Ia,edited:!1,lastCodeRun:null,lastExecutionTime:null,config:{column:((r=e.config)==null?void 0:r.column)??null,disabled:((n=e.config)==null?void 0:n.disabled)??!1,hide_code:((a=e.config)==null?void 0:a.hide_code)??!1},serializedEditorState:null}}function Kh(t){let e=wj();if(!t)return e;let r=t.outputs||[],n=r.find(i=>i.type==="data")||r.find(i=>i.type==="error")||r[0];if(n){if(n.type==="error")e.output={channel:"marimo-error",data:[{type:"unknown",msg:n.evalue}],mimetype:"application/vnd.marimo+error",timestamp:Aa};else if(n.type==="data"){let i=Object.keys(n.data)[0];e.output={channel:"output",data:Object.values(n.data)[0],mimetype:i,timestamp:Aa}}}let a=t.console||[];return{...e,outline:e.output?vj(e.output):null,consoleOutputs:a.map(i=>i.type==="streamMedia"?{channel:"media",data:i.data,mimetype:i.mimetype,timestamp:Aa}:{channel:i.name==="stderr"?"stderr":"stdout",data:i.text,mimetype:i.mimetype??"text/plain",timestamp:Aa})}}function Qh(t,e){let{cellIds:r,sessionCellData:n,notebookCellData:a}=Yh(t,e);if(r.length===0)return null;let i={},l={};for(let s of r){let d=n.get(s),c=a.get(s);c&&(i[s]=Gh(s,c)),l[s]=Kh(d)}return{cellIds:cj.from([r]),cellData:i,cellRuntime:l,cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set}}var Xh=ee(),Nd=Object.freeze({left:0,top:0,width:16,height:16}),Ea=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Pn=Object.freeze({...Nd,...Ea}),po=Object.freeze({...Pn,body:"",hidden:!1}),Zh=Object.freeze({width:null,height:null}),Td=Object.freeze({...Zh,...Ea});function Jh(t,e=0){let r=t.replace(/^-?[0-9.]*/,"");function n(a){for(;a<0;)a+=4;return a%4}if(r===""){let a=parseInt(t);return isNaN(a)?0:n(a)}else if(r!==t){let a=0;switch(r){case"%":a=25;break;case"deg":a=90}if(a){let i=parseFloat(t.slice(0,t.length-r.length));return isNaN(i)?0:(i/=a,i%1==0?n(i):0)}}return e}var ef=/[\s,]+/;function tf(t,e){e.split(ef).forEach(r=>{switch(r.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}var Ad={...Td,preserveAspectRatio:""};function Id(t){let e={...Ad},r=(n,a)=>t.getAttribute(n)||a;return e.width=r("width",null),e.height=r("height",null),e.rotate=Jh(r("rotate","")),tf(e,r("flip","")),e.preserveAspectRatio=r("preserveAspectRatio",r("preserveaspectratio","")),e}function rf(t,e){for(let r in Ad)if(t[r]!==e[r])return!0;return!1}var Ed=/^[a-z0-9]+(-[a-z0-9]+)*$/,Fn=(t,e,r,n="")=>{let a=t.split(":");if(t.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){let s=a.pop(),d=a.pop(),c={provider:a.length>0?a[0]:n,prefix:d,name:s};return e&&!Ra(c)?null:c}let i=a[0],l=i.split("-");if(l.length>1){let s={provider:n,prefix:l.shift(),name:l.join("-")};return e&&!Ra(s)?null:s}if(r&&n===""){let s={provider:n,prefix:"",name:i};return e&&!Ra(s,r)?null:s}return null},Ra=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function nf(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function Rd(t,e){let r=nf(t,e);for(let n in po)n in Ea?n in t&&!(n in r)&&(r[n]=Ea[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function af(t,e){let r=t.icons,n=t.aliases||Object.create(null),a=Object.create(null);function i(l){if(r[l])return a[l]=[];if(!(l in a)){a[l]=null;let s=n[l]&&n[l].parent,d=s&&i(s);d&&(a[l]=[s].concat(d))}return a[l]}return Object.keys(r).concat(Object.keys(n)).forEach(i),a}function of(t,e,r){let n=t.icons,a=t.aliases||Object.create(null),i={};function l(s){i=Rd(n[s]||a[s],i)}return l(e),r.forEach(l),Rd(t,i)}function zd(t,e){let r=[];if(typeof t!="object"||typeof t.icons!="object")return r;t.not_found instanceof Array&&t.not_found.forEach(a=>{e(a,null),r.push(a)});let n=af(t);for(let a in n){let i=n[a];i&&(e(a,of(t,a,i)),r.push(a))}return r}var lf={provider:"",aliases:{},not_found:{},...Nd};function mo(t,e){for(let r in e)if(r in t&&typeof t[r]!=typeof e[r])return!1;return!0}function Md(t){if(typeof t!="object"||!t)return null;let e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!mo(t,lf))return null;let r=e.icons;for(let a in r){let i=r[a];if(!a||typeof i.body!="string"||!mo(i,po))return null}let n=e.aliases||Object.create(null);for(let a in n){let i=n[a],l=i.parent;if(!a||typeof l!="string"||!r[l]&&!n[l]||!mo(i,po))return null}return e}var za=Object.create(null);function sf(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function dr(t,e){let r=za[t]||(za[t]=Object.create(null));return r[e]||(r[e]=sf(t,e))}function Pd(t,e){return Md(e)?zd(e,(r,n)=>{n?t.icons[r]=n:t.missing.add(r)}):[]}function df(t,e,r){try{if(typeof r.body=="string")return t.icons[e]={...r},!0}catch{}return!1}function cf(t,e){let r=[];return(typeof t=="string"?[t]:Object.keys(za)).forEach(n=>{(typeof n=="string"&&typeof e=="string"?[e]:Object.keys(za[n]||{})).forEach(a=>{let i=dr(n,a);r=r.concat(Object.keys(i.icons).map(l=>(n===""?"":"@"+n+":")+a+":"+l))})}),r}var On=!1;function Fd(t){return typeof t=="boolean"&&(On=t),On}function Ln(t){let e=typeof t=="string"?Fn(t,!0,On):t;if(e){let r=dr(e.provider,e.prefix),n=e.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Od(t,e){let r=Fn(t,!0,On);if(!r)return!1;let n=dr(r.provider,r.prefix);return e?df(n,r.name,e):(n.missing.add(r.name),!0)}function Ld(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),On&&!e&&!t.prefix){let n=!1;return Md(t)&&(t.prefix="",zd(t,(a,i)=>{Od(a,i)&&(n=!0)})),n}let r=t.prefix;return Ra({provider:e,prefix:r,name:"a"})?!!Pd(dr(e,r),t):!1}function Vd(t){return!!Ln(t)}function uf(t){let e=Ln(t);return e&&{...Pn,...e}}function pf(t){let e={loaded:[],missing:[],pending:[]},r=Object.create(null);t.sort((a,i)=>a.provider===i.provider?a.prefix===i.prefix?a.name.localeCompare(i.name):a.prefix.localeCompare(i.prefix):a.provider.localeCompare(i.provider));let n={provider:"",prefix:"",name:""};return t.forEach(a=>{if(n.name===a.name&&n.prefix===a.prefix&&n.provider===a.provider)return;n=a;let i=a.provider,l=a.prefix,s=a.name,d=r[i]||(r[i]=Object.create(null)),c=d[l]||(d[l]=dr(i,l)),u;u=s in c.icons?e.loaded:l===""||c.missing.has(s)?e.missing:e.pending;let p={provider:i,prefix:l,name:s};u.push(p)}),e}function Dd(t,e){t.forEach(r=>{let n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(a=>a.id!==e))})}function mf(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;let e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let r=!1,n=t.provider,a=t.prefix;e.forEach(i=>{let l=i.icons,s=l.pending.length;l.pending=l.pending.filter(d=>{if(d.prefix!==a)return!0;let c=d.name;if(t.icons[c])l.loaded.push({provider:n,prefix:a,name:c});else if(t.missing.has(c))l.missing.push({provider:n,prefix:a,name:c});else return r=!0,!0;return!1}),l.pending.length!==s&&(r||Dd([t],i.id),i.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),i.abort))})}))}var hf=0;function ff(t,e,r){let n=hf++,a=Dd.bind(null,r,n);if(!e.pending.length)return a;let i={id:n,icons:e,callback:t,abort:a};return r.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(i)}),a}var ho=Object.create(null);function Hd(t,e){ho[t]=e}function fo(t){return ho[t]||ho[""]}function gf(t,e=!0,r=!1){let n=[];return t.forEach(a=>{let i=typeof a=="string"?Fn(a,e,r):a;i&&n.push(i)}),n}var xf={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function vf(t,e,r,n){let a=t.resources.length,i=t.random?Math.floor(Math.random()*a):t.index,l;if(t.random){let _=t.resources.slice(0);for(l=[];_.length>1;){let k=Math.floor(Math.random()*_.length);l.push(_[k]),_=_.slice(0,k).concat(_.slice(k+1))}l=l.concat(_)}else l=t.resources.slice(i).concat(t.resources.slice(0,i));let s=Date.now(),d="pending",c=0,u,p=null,m=[],f=[];typeof n=="function"&&f.push(n);function g(){p&&(p=(clearTimeout(p),null))}function x(){d==="pending"&&(d="aborted"),g(),m.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),m=[]}function w(_,k){k&&(f=[]),typeof _=="function"&&f.push(_)}function b(){return{startTime:s,payload:e,status:d,queriesSent:c,queriesPending:m.length,subscribe:w,abort:x}}function v(){d="failed",f.forEach(_=>{_(void 0,u)})}function y(){m.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),m=[]}function S(_,k,h){let N=k!=="success";switch(m=m.filter(T=>T!==_),d){case"pending":break;case"failed":if(N||!t.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=h,v();return}if(N){u=h,m.length||(l.length?C():v());return}if(g(),y(),!t.random){let T=t.resources.indexOf(_.resource);T!==-1&&T!==t.index&&(t.index=T)}d="completed",f.forEach(T=>{T(h)})}function C(){if(d!=="pending")return;g();let _=l.shift();if(_===void 0){if(m.length){p=setTimeout(()=>{g(),d==="pending"&&(y(),v())},t.timeout);return}v();return}let k={status:"pending",resource:_,callback:(h,N)=>{S(k,h,N)}};m.push(k),c++,p=setTimeout(C,t.rotate),r(_,e,k.callback)}return setTimeout(C),b}function Bd(t){let e={...xf,...t},r=[];function n(){r=r.filter(l=>l().status==="pending")}function a(l,s,d){let c=vf(e,l,s,(u,p)=>{n(),d&&d(u,p)});return r.push(c),c}function i(l){return r.find(s=>l(s))||null}return{query:a,find:i,setIndex:l=>{e.index=l},getIndex:()=>e.index,cleanup:n}}function go(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}for(var Ma=Object.create(null),Pa=["https://api.simplesvg.com","https://api.unisvg.com"],xo=[];Pa.length>0;)Pa.length===1||Math.random()>.5?xo.push(Pa.shift()):xo.push(Pa.pop());Ma[""]=go({resources:["https://api.iconify.design"].concat(xo)});function Wd(t,e){let r=go(e);return r===null?!1:(Ma[t]=r,!0)}function Fa(t){return Ma[t]}function wf(){return Object.keys(Ma)}function $d(){}var vo=Object.create(null);function bf(t){if(!vo[t]){let e=Fa(t);if(!e)return;vo[t]={config:e,redundancy:Bd(e)}}return vo[t]}function qd(t,e,r){let n,a;if(typeof t=="string"){let i=fo(t);if(!i)return r(void 0,424),$d;a=i.send;let l=bf(t);l&&(n=l.redundancy)}else{let i=go(t);if(i){n=Bd(i);let l=fo(t.resources?t.resources[0]:"");l&&(a=l.send)}}return!n||!a?(r(void 0,424),$d):n.query(e,a,r)().abort}function Ud(){}function yf(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,mf(t)}))}function jf(t){let e=[],r=[];return t.forEach(n=>{(n.match(Ed)?e:r).push(n)}),{valid:e,invalid:r}}function Vn(t,e,r){function n(){let a=t.pendingIcons;e.forEach(i=>{a&&a.delete(i),t.icons[i]||t.missing.add(i)})}if(r&&typeof r=="object")try{if(!Pd(t,r).length){n();return}}catch(a){console.error(a)}n(),yf(t)}function Yd(t,e){t instanceof Promise?t.then(r=>{e(r)}).catch(()=>{e(null)}):e(t)}function Cf(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;let{provider:r,prefix:n}=t,a=t.iconsToLoad;if(delete t.iconsToLoad,!a||!a.length)return;let i=t.loadIcon;if(t.loadIcons&&(a.length>1||!i)){Yd(t.loadIcons(a,n,r),c=>{Vn(t,a,c)});return}if(i){a.forEach(c=>{Yd(i(c,n,r),u=>{Vn(t,[c],u?{prefix:n,icons:{[c]:u}}:null)})});return}let{valid:l,invalid:s}=jf(a);if(s.length&&Vn(t,s,null),!l.length)return;let d=n.match(Ed)?fo(r):null;if(!d){Vn(t,l,null);return}d.prepare(r,n,l).forEach(c=>{qd(r,c,u=>{Vn(t,c.icons,u)})})}))}var wo=(t,e)=>{let r=pf(gf(t,!0,Fd()));if(!r.pending.length){let s=!0;return e&&setTimeout(()=>{s&&e(r.loaded,r.missing,r.pending,Ud)}),()=>{s=!1}}let n=Object.create(null),a=[],i,l;return r.pending.forEach(s=>{let{provider:d,prefix:c}=s;if(c===l&&d===i)return;i=d,l=c,a.push(dr(d,c));let u=n[d]||(n[d]=Object.create(null));u[c]||(u[c]=[])}),r.pending.forEach(s=>{let{provider:d,prefix:c,name:u}=s,p=dr(d,c),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(u)||(m.add(u),n[d][c].push(u))}),a.forEach(s=>{let d=n[s.provider][s.prefix];d.length&&Cf(s,d)}),e?ff(e,r,a):Ud},_f=t=>new Promise((e,r)=>{let n=typeof t=="string"?Fn(t,!0):t;if(!n){r(t);return}wo([n||t],a=>{if(a.length&&n){let i=Ln(n);if(i){e({...Pn,...i});return}}r(t)})});function Gd(t){try{let e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function Sf(t,e){if(typeof t=="object")return{data:Gd(t),value:t};if(typeof t!="string")return{value:t};if(t.includes("{")){let a=Gd(t);if(a)return{data:a,value:t}}let r=Fn(t,!0,!0);if(!r)return{value:t};let n=Ln(r);return n!==void 0||!r.prefix?{value:t,name:r,data:n}:{value:t,name:r,loading:wo([r],()=>e(t,r,Ln(r)))}}var Kd=!1;try{Kd=navigator.vendor.indexOf("Apple")===0}catch{}function kf(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(Kd||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}var Nf=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Tf=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function bo(t,e,r){if(e===1)return t;if(r||(r=100),typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let n=t.split(Nf);if(n===null||!n.length)return t;let a=[],i=n.shift(),l=Tf.test(i);for(;;){if(l){let s=parseFloat(i);isNaN(s)?a.push(i):a.push(Math.ceil(s*e*r)/r)}else a.push(i);if(i=n.shift(),i===void 0)return a.join("");l=!l}}function Af(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let a=t.indexOf(">",n),i=t.indexOf("</"+e);if(a===-1||i===-1)break;let l=t.indexOf(">",i);if(l===-1)break;r+=t.slice(a+1,i).trim(),t=t.slice(0,n).trim()+t.slice(l+1)}return{defs:r,content:t}}function If(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Ef(t,e,r){let n=Af(t);return If(n.defs,e+n.content+r)}var Rf=t=>t==="unset"||t==="undefined"||t==="none";function Qd(t,e){let r={...Pn,...t},n={...Td,...e},a={left:r.left,top:r.top,width:r.width,height:r.height},i=r.body;[r,n].forEach(x=>{let w=[],b=x.hFlip,v=x.vFlip,y=x.rotate;b?v?y+=2:(w.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),w.push("scale(-1 1)"),a.top=a.left=0):v&&(w.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),w.push("scale(1 -1)"),a.top=a.left=0);let S;switch(y<0&&(y-=Math.floor(y/4)*4),y%=4,y){case 1:S=a.height/2+a.top,w.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:w.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:S=a.width/2+a.left,w.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}y%2==1&&(a.left!==a.top&&(S=a.left,a.left=a.top,a.top=S),a.width!==a.height&&(S=a.width,a.width=a.height,a.height=S)),w.length&&(i=Ef(i,'<g transform="'+w.join(" ")+'">',"</g>"))});let l=n.width,s=n.height,d=a.width,c=a.height,u,p;l===null?(p=s===null?"1em":s==="auto"?c:s,u=bo(p,d/c)):(u=l==="auto"?d:l,p=s===null?bo(u,c/d):s==="auto"?c:s);let m={},f=(x,w)=>{Rf(w)||(m[x]=w.toString())};f("width",u),f("height",p);let g=[a.left,a.top,d,c];return m.viewBox=g.join(" "),{attributes:m,viewBox:g,body:i}}function yo(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}function zf(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mf(t){return"data:image/svg+xml,"+zf(t)}function Xd(t){return'url("'+Mf(t)+'")'}var Oa=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function Pf(t){Oa=t}function Ff(){return Oa}function Of(t,e){let r=Fa(t);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let a=0;r.resources.forEach(l=>{a=Math.max(a,l.length)});let i=e+".json?icons=";n=r.maxURL-a-r.path.length-i.length}return n}function Lf(t){return t===404}var Vf=(t,e,r)=>{let n=[],a=Of(t,e),i="icons",l={type:i,provider:t,prefix:e,icons:[]},s=0;return r.forEach((d,c)=>{s+=d.length+1,s>=a&&c>0&&(n.push(l),l={type:i,provider:t,prefix:e,icons:[]},s=d.length),l.icons.push(d)}),n.push(l),n};function Df(t){if(typeof t=="string"){let e=Fa(t);if(e)return e.path}return"/"}var Hf={prepare:Vf,send:(t,e,r)=>{if(!Oa){r("abort",424);return}let n=Df(e.provider);switch(e.type){case"icons":{let i=e.prefix,l=e.icons.join(","),s=new URLSearchParams({icons:l});n+=i+".json?"+s.toString();break}case"custom":{let i=e.uri;n+=i.slice(0,1)==="/"?i.slice(1):i;break}default:r("abort",400);return}let a=503;Oa(t+n).then(i=>{let l=i.status;if(l!==200){setTimeout(()=>{r(Lf(l)?"abort":"next",l)});return}return a=501,i.json()}).then(i=>{if(typeof i!="object"||!i){setTimeout(()=>{i===404?r("abort",i):r("next",a)});return}setTimeout(()=>{r("success",i)})}).catch(()=>{r("next",a)})}};function Bf(t,e,r){dr(r||"",e).loadIcons=t}function Wf(t,e,r){dr(r||"",e).loadIcon=t}var jo="data-style",Zd="";function $f(t){Zd=t}function Jd(t,e){let r=Array.from(t.childNodes).find(n=>n.hasAttribute&&n.hasAttribute(jo));r||(r=document.createElement("style"),r.setAttribute(jo,jo),t.appendChild(r)),r.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block;margin:auto}"+Zd}function ec(){Hd("",Hf),Fd(!0);let t;try{t=window}catch{}if(t){if(t.IconifyPreload!==void 0){let e=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof e=="object"&&e&&(e instanceof Array?e:[e]).forEach(n=>{try{(typeof n!="object"||!n||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Ld(n))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){let e=t.IconifyProviders;if(typeof e=="object"&&e)for(let r in e){let n="IconifyProviders["+r+"] is invalid.";try{let a=e[r];if(typeof a!="object"||!a||a.resources===void 0)continue;Wd(r,a)||console.error(n)}catch{console.error(n)}}}}return{enableCache:e=>{},disableCache:e=>{},iconLoaded:Vd,iconExists:Vd,getIcon:uf,listIcons:cf,addIcon:Od,addCollection:Ld,calculateSize:bo,buildIcon:Qd,iconToHTML:yo,svgToURL:Xd,loadIcons:wo,loadIcon:_f,addAPIProvider:Wd,setCustomIconLoader:Wf,setCustomIconsLoader:Bf,appendCustomStyle:$f,_api:{getAPIConfig:Fa,setAPIModule:Hd,sendAPIQuery:qd,setFetch:Pf,getFetch:Ff,listAPIProviders:wf}}}var Co={"background-color":"currentColor"},tc={"background-color":"transparent"},rc={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},nc={"-webkit-mask":Co,mask:Co,background:tc};for(let t in nc){let e=nc[t];for(let r in rc)e[t+"-"+r]=rc[r]}function ac(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function qf(t,e,r){let n=document.createElement("span"),a=t.body;a.indexOf("<a")!==-1&&(a+="<!-- "+Date.now()+" -->");let i=t.attributes,l=Xd(yo(a,{...i,width:e.width+"",height:e.height+""})),s=n.style,d={"--svg":l,width:ac(i.width),height:ac(i.height),...r?Co:tc};for(let c in d)s.setProperty(c,d[c]);return n}var Dn;function Uf(){try{Dn=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Dn=null}}function Yf(t){return Dn===void 0&&Uf(),Dn?Dn.createHTML(t):t}function Gf(t){let e=document.createElement("span"),r=t.attributes,n="";return r.width||(n="width: inherit;"),r.height||(n+="height: inherit;"),n&&(r.style=n),e.innerHTML=Yf(yo(t.body,r)),e.firstChild}function _o(t){return Array.from(t.childNodes).find(e=>{let r=e.tagName&&e.tagName.toUpperCase();return r==="SPAN"||r==="SVG"})}function ic(t,e){let r=e.icon.data,n=e.customisations,a=Qd(r,n);n.preserveAspectRatio&&(a.attributes.preserveAspectRatio=n.preserveAspectRatio);let i=e.renderedMode,l;i==="svg"?l=Gf(a):l=qf(a,{...Pn,...r},i==="mask");let s=_o(t);s?l.tagName==="SPAN"&&s.tagName===l.tagName?s.setAttribute("style",l.getAttribute("style")):t.replaceChild(l,s):t.appendChild(l)}function oc(t,e,r){return{rendered:!1,inline:e,icon:t,lastRender:r&&(r.rendered?r:r.lastRender)}}function Kf(t="iconify-icon"){let e,r;try{e=window.customElements,r=window.HTMLElement}catch{return}if(!e||!r)return;let n=e.get(t);if(n)return n;let a=["icon","mode","inline","noobserver","width","height","rotate","flip"],i=class extends r{constructor(){super();B(this,"_shadowRoot");B(this,"_initialised",!1);B(this,"_state");B(this,"_checkQueued",!1);B(this,"_connected",!1);B(this,"_observer",null);B(this,"_visible",!0);let d=this._shadowRoot=this.attachShadow({mode:"open"}),c=this.hasAttribute("inline");Jd(d,c),this._state=oc({value:""},c),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return a.slice(0)}attributeChangedCallback(d){switch(d){case"inline":{let c=this.hasAttribute("inline"),u=this._state;c!==u.inline&&(u.inline=c,Jd(this._shadowRoot,c));break}case"noobserver":this.hasAttribute("noobserver")?this.startObserver():this.stopObserver();break;default:this._queueCheck()}}get icon(){let d=this.getAttribute("icon");if(d&&d.slice(0,1)==="{")try{return JSON.parse(d)}catch{}return d}set icon(d){typeof d=="object"&&(d=JSON.stringify(d)),this.setAttribute("icon",d)}get inline(){return this.hasAttribute("inline")}set inline(d){d?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(d){d?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){let d=this._state;if(d.rendered){let c=this._shadowRoot;if(d.renderedMode==="svg")try{c.lastChild.setCurrentTime(0);return}catch{}ic(c,d)}}get status(){let d=this._state;return d.rendered?"rendered":d.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;let d=this._state,c=this.getAttribute("icon");if(c!==d.icon.value){this._iconChanged(c);return}if(!d.rendered||!this._visible)return;let u=this.getAttribute("mode"),p=Id(this);(d.attrMode!==u||rf(d.customisations,p)||!_o(this._shadowRoot))&&this._renderIcon(d.icon,p,u)}_iconChanged(d){let c=Sf(d,(u,p,m)=>{let f=this._state;if(f.rendered||this.getAttribute("icon")!==u)return;let g={value:u,name:p,data:m};g.data?this._gotIconData(g):f.icon=g});c.data?this._gotIconData(c):this._state=oc(c,this._state.inline,this._state)}_forceRender(){if(!this._visible){let d=_o(this._shadowRoot);d&&this._shadowRoot.removeChild(d);return}this._queueCheck()}_gotIconData(d){this._checkQueued=!1,this._renderIcon(d,Id(this),this.getAttribute("mode"))}_renderIcon(d,c,u){let p=kf(d.data.body,u),m=this._state.inline;ic(this._shadowRoot,this._state={rendered:!0,icon:d,inline:m,customisations:c,attrMode:u,renderedMode:p})}startObserver(){if(!this._observer&&!this.hasAttribute("noobserver"))try{this._observer=new IntersectionObserver(d=>{let c=d.some(u=>u.isIntersecting);c!==this._visible&&(this._visible=c,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};a.forEach(s=>{s in i.prototype||Object.defineProperty(i.prototype,s,{get:function(){return this.getAttribute(s)},set:function(d){d===null?this.removeAttribute(s):this.setAttribute(s,d)}})});let l=ec();for(let s in l)i[s]=i.prototype[s]=l[s];return e.define(t,i),i}var{enableCache:sk,disableCache:dk,iconLoaded:ck,iconExists:uk,getIcon:pk,listIcons:mk,addIcon:hk,addCollection:fk,calculateSize:gk,buildIcon:xk,iconToHTML:vk,svgToURL:wk,loadIcons:bk,loadIcon:yk,setCustomIconLoader:jk,setCustomIconsLoader:Ck,addAPIProvider:_k,_api:Sk}=Kf()||ec();const Qf=()=>((0,Xh.c)(1),null);var lc=ee();const sc=(0,j.memo)(t=>{let e=(0,lc.c)(3),{children:r}=t,{theme:n}=In(),a,i;return e[0]===n?(a=e[1],i=e[2]):(a=()=>(document.body.classList.add(n,`${n}-theme`),document.body.dataset.theme=n,()=>{document.body.classList.remove(n,`${n}-theme`),delete document.body.dataset.theme}),i=[n],e[0]=n,e[1]=a,e[2]=i),(0,j.useLayoutEffect)(a,i),r});sc.displayName="ThemeProvider";const Xf=t=>{let e=(0,lc.c)(3),{variables:r,children:n}=t,a;return e[0]!==n||e[1]!==r?(a=(0,o.jsx)("div",{className:"contents",style:r,children:n}),e[0]=n,e[1]=r,e[2]=a):a=e[2],a},La=t=>{let e=null,r=async()=>(e||(e=t()),e);return{preload:r,Component:j.lazy(()=>r())}};var Zf=ee();const Jf=()=>{let t=(0,Zf.c)(25),[e,r]=Sn(Vj);if(e===null)return null;let n;t[0]===e?n=t[1]:(n=async()=>{try{await navigator.clipboard.writeText(e),Et({title:"Copied to clipboard",description:"Error details have been copied to your clipboard."})}catch{Et({title:"Failed to copy",description:"Could not copy to clipboard.",variant:"danger"})}},t[0]=e,t[1]=n);let a=n,i;t[2]===r?i=t[3]:(i=()=>{r(null)},t[2]=r,t[3]=i);let l=i,s=e0,d;t[4]===l?d=t[5]:(d=y=>!y&&l(),t[4]=l,t[5]=d);let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsxs)(om,{children:[(0,o.jsxs)(sm,{className:"flex items-center gap-2 text-destructive",children:[(0,o.jsx)(J2,{className:"h-5 w-5"}),"Kernel Startup Failed"]}),(0,o.jsx)(im,{children:"The kernel failed to start. This usually happens when the package manager can't install your notebook's dependencies."})]}),t[6]=c):c=t[6];let u;t[7]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)("span",{className:"text-sm font-medium text-muted-foreground",children:"Error Details"}),t[7]=u):u=t[7];let p;t[8]===Symbol.for("react.memo_cache_sentinel")?(p=(0,o.jsx)(Em,{className:"h-3 w-3"}),t[8]=p):p=t[8];let m;t[9]===a?m=t[10]:(m=(0,o.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[u,(0,o.jsxs)(ze,{variant:"outline",size:"xs",onClick:a,className:"flex items-center gap-1",children:[p,"Copy"]})]}),t[9]=a,t[10]=m);let f;t[11]===e?f=t[12]:(f=(0,o.jsx)("pre",{className:"bg-muted p-4 rounded-md text-sm font-mono overflow-auto max-h-80",children:e}),t[11]=e,t[12]=f);let g;t[13]!==m||t[14]!==f?(g=(0,o.jsxs)("div",{className:"my-4 overflow-hidden",children:[m,f]}),t[13]=m,t[14]=f,t[15]=g):g=t[15];let x;t[16]===Symbol.for("react.memo_cache_sentinel")?(x=(0,o.jsxs)(ze,{variant:"outline",onClick:s,className:"flex items-center gap-2",children:[(0,o.jsx)(tS,{className:"h-4 w-4"}),"Return to Home"]}),t[16]=x):x=t[16];let w;t[17]===l?w=t[18]:(w=(0,o.jsxs)(cm,{children:[x,(0,o.jsx)(dm,{onClick:l,children:"Dismiss"})]}),t[17]=l,t[18]=w);let b;t[19]!==w||t[20]!==g?(b=(0,o.jsxs)(lm,{className:"max-w-2xl",children:[c,g,w]}),t[19]=w,t[20]=g,t[21]=b):b=t[21];let v;return t[22]!==b||t[23]!==d?(v=(0,o.jsx)(um,{open:!0,onOpenChange:d,children:b}),t[22]=b,t[23]=d,t[24]=v):v=t[24],v};function e0(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}var t0=ee();const r0=t=>{let e=(0,t0.c)(30),{isOpen:r,onClose:n,traceback:a,errorMessage:i}=t,l;e[0]===a?l=e[1]:(l=async()=>{let C=document.createElement("div");C.innerHTML=lj(a);let _=C.textContent||C.innerText||"";try{await navigator.clipboard.writeText(_),Et({title:"Copied to clipboard",description:"Traceback has been copied to your clipboard."})}catch{Et({title:"Failed to copy",description:"Could not copy to clipboard.",variant:"danger"})}},e[0]=a,e[1]=l);let s=l,d;e[2]===n?d=e[3]:(d=C=>!C&&n(),e[2]=n,e[3]=d);let c;e[4]===i?c=e[5]:(c=(0,o.jsx)(sm,{className:"text-destructive",children:i}),e[4]=i,e[5]=c);let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)(im,{children:"Click the traceback to select and copy."}),e[6]=u):u=e[6];let p;e[7]===c?p=e[8]:(p=(0,o.jsxs)(om,{children:[c,u]}),e[7]=c,e[8]=p);let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsx)("span",{className:"text-sm font-medium text-muted-foreground",children:"Traceback"}),e[9]=m):m=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=(0,o.jsx)(Em,{className:"h-3 w-3"}),e[10]=f):f=e[10];let g;e[11]===s?g=e[12]:(g=(0,o.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[m,(0,o.jsxs)(ze,{variant:"outline",size:"xs",onClick:s,className:"flex items-center gap-1",children:[f,"Copy"]})]}),e[11]=s,e[12]=g);let x;e[13]===a?x=e[14]:(x=qe({html:a}),e[13]=a,e[14]=x);let w;e[15]===x?w=e[16]:(w=(0,o.jsx)("div",{className:"font-code text-sm p-4 bg-muted rounded border overflow-auto max-h-[50vh] cursor-text select-text",children:x}),e[15]=x,e[16]=w);let b;e[17]!==w||e[18]!==g?(b=(0,o.jsxs)("div",{className:"my-4 overflow-auto",children:[g,w]}),e[17]=w,e[18]=g,e[19]=b):b=e[19];let v;e[20]===n?v=e[21]:(v=(0,o.jsx)(cm,{children:(0,o.jsx)(dm,{onClick:n,children:"Close"})}),e[20]=n,e[21]=v);let y;e[22]!==b||e[23]!==v||e[24]!==p?(y=(0,o.jsxs)(lm,{className:"max-w-4xl max-h-[80vh]",children:[p,b,v]}),e[22]=b,e[23]=v,e[24]=p,e[25]=y):y=e[25];let S;return e[26]!==r||e[27]!==y||e[28]!==d?(S=(0,o.jsx)(um,{open:r,onOpenChange:d,children:y}),e[26]=r,e[27]=y,e[28]=d,e[29]=S):S=e[29],S};var n0=ee();const a0=()=>{let t=(0,n0.c)(6),[e,r]=Sn(dj);if(!e)return null;let n;t[0]===r?n=t[1]:(n=()=>r(null),t[0]=r,t[1]=n);let a;return t[2]!==n||t[3]!==e.errorMessage||t[4]!==e.traceback?(a=(0,o.jsx)(r0,{isOpen:!0,onClose:n,traceback:e.traceback,errorMessage:e.errorMessage}),t[2]=n,t[3]=e.errorMessage,t[4]=e.traceback,t[5]=a):a=t[5],a};var i0=ee();const o0=()=>{let t=(0,i0.c)(5),{toasts:e}=yS(),r;t[0]===e?r=t[1]:(r=e.map(l0),t[0]=e,t[1]=r);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(B2,{}),t[2]=n):n=t[2];let a;return t[3]===r?a=t[4]:(a=(0,o.jsxs)(aj,{children:[r,n]}),t[3]=r,t[4]=a),a};function l0(t){let{id:e,title:r,description:n,action:a,...i}=t;return(0,o.jsxs)(q2,{...i,children:[(0,o.jsxs)("div",{className:"grid gap-1",children:[r&&(0,o.jsx)(G2,{children:r}),n&&(0,o.jsx)(rj,{children:n})]}),a,(0,o.jsx)(nj,{})]},e)}var s0=ee();const So=t=>{let e=(0,s0.c)(5),{children:r}=t,n=ga(Kj),a;e[0]===n?a=e[1]:(a=d0(n),e[0]=n,e[1]=a);let i;return e[2]!==r||e[3]!==a?(i=(0,o.jsx)(AS,{locale:a,children:r}),e[2]=r,e[3]=a,e[4]=i):i=e[4],i};function d0(t){return t&&c0(t)?t:navigator.language}function c0(t){try{return new Intl.NumberFormat(t),!0}catch{return!1}}var dc=ee(),cc=La(()=>Ct(()=>import("./home-page-_lNrwuiF.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134]),import.meta.url)),uc=La(()=>Ct(()=>import("./run-page-Ck3HK1tB.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([135,136,137,4,138,13,8,9,10,11,139,140,141,142,3,5,6,7,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,107,143,70,144,145,105,75,74,79,78,80,81,82,83,84,71,72,68,69,85,146,147,148,93,97,149,150,133,151,66,152,153,154,90,155,156,157,158,159,160,86,161,92,88,162,91,163,121,122,123,125,118,164,165,126,94,166,167,129,168,98,100,169,170,171,172,173,174,175,176,177,178,179,77,87,89,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,112,279,280,281,282,283,284,285,286,287,288,95,96,289,290,291,292,293,294,295,119]),import.meta.url)),pc=La(()=>Ct(()=>import("./edit-page-BJbYVEP8.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([296,4,297,10,136,137,138,13,8,9,11,139,140,141,142,3,5,6,7,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,107,143,70,144,145,105,75,74,79,78,80,81,82,83,84,71,72,68,69,85,146,147,148,93,97,149,150,133,151,66,152,153,154,90,155,156,157,158,159,160,86,161,92,88,162,91,163,121,122,123,125,118,164,165,126,94,166,167,129,168,98,100,169,170,171,172,173,174,175,176,177,178,179,77,87,89,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,112,279,280,281,282,283,284,285,286,287,288,95,96,289,290,291,292,293,294,295,2,67,73,76,99,101,102,1,103,104,106,298,299,108,300,117,111,301,302,109,110,303,120,304,305,306,307,308,309,310,311,134,312,130,313,314,315,316,132,119,124,131,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332]),import.meta.url)),mc=La(()=>Ct(()=>import("./gallery-page-Bcf7fYLy.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([333,107,12,13,8,9,10,11,6,7,35,66,20,73,14,15,79,78,25,60,29,61,62,80,44,41,26,81,82,83,84,21,36,37,90,91,75,92,30,46]),import.meta.url));function u0(t){switch(t){case"home":cc.preload();break;case"gallery":mc.preload();break;case"read":uc.preload();break;default:pc.preload()}}const hc=(0,j.memo)(()=>{let t=(0,dc.c)(12),[e]=Xj(),[r]=$j(),n;t[0]===e.display.code_editor_font_size?n=t[1]:(n=p0(e.display.code_editor_font_size),t[0]=e.display.code_editor_font_size,t[1]=n);let a=n,i;t[2]!==r||t[3]!==e?(i=()=>{let u=ij();return u==="home"?(0,o.jsx)(cc.Component,{}):u==="gallery"?(0,o.jsx)(mc.Component,{}):u==="read"?(0,o.jsx)(uc.Component,{appConfig:r}):(0,o.jsx)(pc.Component,{userConfig:e,appConfig:r})},t[2]=r,t[3]=e,t[4]=i):i=t[4];let l=i,s;t[5]===a?s=t[6]:(s={"--marimo-code-editor-font-size":a},t[5]=a,t[6]=s);let d;t[7]===l?d=t[8]:(d=(0,o.jsx)(So,{children:l()}),t[7]=l,t[8]=d);let c;return t[9]!==s||t[10]!==d?(c=(0,o.jsx)(fc,{children:(0,o.jsx)(Xf,{variables:s,children:d})}),t[9]=s,t[10]=d,t[11]=c):c=t[11],c});hc.displayName="MarimoApp";var fc=(0,j.memo)(t=>{let e=(0,dc.c)(6),{children:r}=t,n,a,i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(o0,{}),a=(0,o.jsx)(Qf,{}),i=(0,o.jsx)(Jf,{}),l=(0,o.jsx)(a0,{}),e[0]=n,e[1]=a,e[2]=i,e[3]=l):(n=e[0],a=e[1],i=e[2],l=e[3]);let s;return e[4]===r?s=e[5]:(s=(0,o.jsx)(Ai,{children:(0,o.jsx)(j.Suspense,{children:(0,o.jsx)(ba,{children:(0,o.jsx)(gm,{controller:wa,children:(0,o.jsx)(So,{children:(0,o.jsxs)(zS,{children:[r,n,a,i,l]})})})})})}),e[4]=r,e[5]=s),s});fc.displayName="Providers";function p0(t){return`${t/16}rem`}function m0(){SS(t=>{t.delete(ss.accessToken)})}var h0={sendComponentValues:"startConnection",sendModelValue:"startConnection",sendInstantiate:"startConnection",sendRun:"startConnection",sendDeleteCell:"startConnection",sendRunScratchpad:"startConnection",saveAppConfig:"startConnection",saveCellConfig:"startConnection",exportAsHTML:"startConnection",exportAsIPYNB:"startConnection",exportAsMarkdown:"startConnection",exportAsPDF:"startConnection",readCode:"startConnection",sendCopy:"throwError",sendFormat:"throwError",sendRestart:"throwError",sendSave:"waitForConnectionOpen",invokeAiTool:"waitForConnectionOpen",sendFunctionRequest:"waitForConnectionOpen",sendRename:"waitForConnectionOpen",autoExportAsHTML:"waitForConnectionOpen",autoExportAsMarkdown:"waitForConnectionOpen",autoExportAsIPYNB:"waitForConnectionOpen",updateCellOutputs:"waitForConnectionOpen",listSecretKeys:"throwError",writeSecret:"throwError",clearCache:"throwError",getCacheInfo:"throwError",saveUserConfig:"throwError",sendShutdown:"throwError",getPackageList:"throwError",getDependencyTree:"throwError",addPackage:"throwError",removePackage:"throwError",sendListFiles:"startConnection",sendSearchFiles:"startConnection",sendCreateFileOrFolder:"throwError",sendDeleteFileOrFolder:"throwError",sendCopyFileOrFolder:"throwError",sendRenameFileOrFolder:"throwError",sendUpdateFile:"throwError",sendFileDetails:"throwError",openFile:"throwError",getRecentFiles:"startConnection",getWorkspaceFiles:"startConnection",getRunningNotebooks:"startConnection",shutdownSession:"startConnection",openTutorial:"startConnection",getUsageStats:"waitForConnectionOpen",sendStdin:"waitForConnectionOpen",sendInterrupt:"waitForConnectionOpen",sendPdb:"waitForConnectionOpen",sendInstallMissingPackages:"waitForConnectionOpen",readSnippets:"waitForConnectionOpen",previewDatasetColumn:"waitForConnectionOpen",previewSQLTable:"waitForConnectionOpen",previewSQLTableList:"waitForConnectionOpen",previewSQLSchemaList:"waitForConnectionOpen",previewDataSourceConnection:"waitForConnectionOpen",validateSQL:"waitForConnectionOpen",listStorageEntries:"waitForConnectionOpen",downloadStorage:"waitForConnectionOpen",sendDocumentTransaction:"waitForConnectionOpen",sendCodeCompletionRequest:"waitForConnectionOpen"};function f0(t,e){let r=x_(async a=>{De.set(Qp,{state:Xp.CONNECTING}),await a.init()});function n(a,i){let l=h0[i];return async(...s)=>{let d=e();if(!d.isLazy)return a(...s);switch(l){case"dropRequest":ue.debug(`Dropping request: ${i}, since not connected to a kernel.`);return;case"throwError":throw new $m;case"waitForConnectionOpen":return await ct(),await Fm(),a(...s);case"startConnection":return await r(d),await ct(),i!=="sendInstantiate"&&await Fm(),a(...s);default:throw Error(`Unknown action for "${i}"`)}}}return Gr.mapValues(t,(a,i)=>n(a,i))}function g0(t){return{body:t,bodySerializer:e=>e}}var{handleResponse:Oe,handleResponseReturnNull:Ce}=aC;function x0(){let t=Ns(()=>oC(ds())),e=()=>ds().sessionHeaders(),r=()=>({header:e()});return{sendComponentValues:n=>t().POST("/api/kernel/set_ui_element_value",{body:n,params:r()}).then(Ce),sendModelValue:n=>t().POST("/api/kernel/set_model_value",{body:n,params:r()}).then(Ce),sendRestart:()=>t().POST("/api/kernel/restart_session",{params:r()}).then(Ce),sendDocumentTransaction:async n=>(await ct(),t().POST("/api/document/transaction",{body:n,params:r()}).then(Ce)),sendRename:n=>t().POST("/api/kernel/rename",{body:n,params:r()}).then(Ce),sendSave:n=>t().POST("/api/kernel/save",{body:n,parseAs:"text",params:r()}).then(Ce),sendCopy:n=>t().POST("/api/kernel/copy",{body:n,parseAs:"text",params:r()}).then(Ce),sendFormat:n=>t().POST("/api/kernel/format",{body:n}).then(Oe),sendInterrupt:()=>t().POST("/api/kernel/interrupt",{params:r()}).then(Ce),sendShutdown:()=>t().POST("/api/kernel/shutdown").then(Ce),sendRun:async n=>(await ct(),t().POST("/api/kernel/run",{body:n,params:r()}).then(Ce)),sendRunScratchpad:async n=>(await ct(),t().POST("/api/kernel/scratchpad/run",{body:n,params:r()}).then(Ce)),sendInstantiate:async n=>(await ct(),t().POST("/api/kernel/instantiate",{body:n,params:r()}).then(Ce)),sendDeleteCell:n=>t().POST("/api/kernel/delete",{body:n,params:r()}).then(Ce),sendCodeCompletionRequest:async n=>(await ct(),t().POST("/api/kernel/code_autocomplete",{body:n,params:r()}).then(Ce)),saveUserConfig:n=>t().POST("/api/kernel/save_user_config",{body:n}).then(Ce),saveAppConfig:n=>t().POST("/api/kernel/save_app_config",{body:n,parseAs:"text",params:r()}).then(Ce),saveCellConfig:n=>t().POST("/api/kernel/set_cell_config",{body:n,params:r()}).then(Ce),sendFunctionRequest:n=>t().POST("/api/kernel/function_call",{body:n,params:r()}).then(Ce),sendStdin:n=>t().POST("/api/kernel/stdin",{body:n,params:r()}).then(Ce),sendInstallMissingPackages:n=>t().POST("/api/kernel/install_missing_packages",{body:n,params:r()}).then(Ce),readCode:async()=>(await ct(),t().POST("/api/kernel/read_code",{params:r()}).then(Oe)),readSnippets:async()=>(await ct(),t().GET("/api/documentation/snippets",{params:r()}).then(Oe)),previewDatasetColumn:n=>t().POST("/api/datasources/preview_column",{body:n,params:r()}).then(Ce),previewSQLTable:n=>t().POST("/api/datasources/preview_sql_table",{body:n,params:r()}).then(Ce),previewSQLTableList:n=>t().POST("/api/datasources/preview_sql_table_list",{body:n,params:r()}).then(Ce),previewSQLSchemaList:n=>t().POST("/api/datasources/preview_sql_schema_list",{body:n,params:r()}).then(Ce),previewDataSourceConnection:n=>t().POST("/api/datasources/preview_datasource_connection",{body:n,params:r()}).then(Ce),validateSQL:n=>t().POST("/api/sql/validate",{body:n,params:r()}).then(Ce),openFile:async n=>(await ct(),await t().POST("/api/files/open",{body:n}).then(Ce),null),getUsageStats:async()=>(await ct(),t().GET("/api/usage").then(Oe)),sendPdb:n=>t().POST("/api/kernel/pdb/pm",{body:n,params:r()}).then(Ce),sendListFiles:async n=>(await ct(),t().POST("/api/files/list_files",{body:n}).then(Oe)),sendSearchFiles:async n=>(await ct(),t().POST("/api/files/search",{body:n}).then(Oe)),sendCreateFileOrFolder:async n=>{await ct();let a=new FormData;return a.append("path",n.path),a.append("type",n.type),a.append("name",n.name),n.file&&a.append("file",n.file,n.name),t().POST("/api/files/create",g0(a)).then(Oe)},sendDeleteFileOrFolder:async n=>t().POST("/api/files/delete",{body:n}).then(Oe),sendCopyFileOrFolder:async n=>t().POST("/api/files/copy",{body:n}).then(Oe),sendRenameFileOrFolder:async n=>t().POST("/api/files/move",{body:n}).then(Oe),sendUpdateFile:async n=>(await ct(),t().POST("/api/files/update",{body:n}).then(Oe)),sendFileDetails:async n=>(await ct(),t().POST("/api/files/file_details",{body:n}).then(Oe)),openTutorial:n=>t().POST("/api/home/tutorial/open",{body:n}).then(Oe),getRecentFiles:()=>t().POST("/api/home/recent_files").then(Oe),getWorkspaceFiles:n=>t().POST("/api/home/workspace_files",{body:n}).then(Oe),getRunningNotebooks:()=>t().POST("/api/home/running_notebooks").then(Oe),shutdownSession:n=>t().POST("/api/home/shutdown_session",{body:n}).then(Oe),exportAsHTML:async n=>t().POST("/api/export/html",{body:n,parseAs:"text",params:r()}).then(Oe),exportAsMarkdown:async n=>t().POST("/api/export/markdown",{body:n,parseAs:"text",params:r()}).then(Oe),exportAsIPYNB:async n=>t().POST("/api/export/ipynb",{body:n,parseAs:"text",params:r()}).then(Oe),exportAsPDF:async n=>t().POST("/api/export/pdf",{body:n,parseAs:"blob",params:r()}).then(Oe),autoExportAsHTML:async n=>t().POST("/api/export/auto_export/html",{body:n,params:r()}).then(Ce),autoExportAsMarkdown:async n=>t().POST("/api/export/auto_export/markdown",{body:n,params:r()}).then(Ce),autoExportAsIPYNB:async n=>t().POST("/api/export/auto_export/ipynb",{body:n,params:r()}).then(Ce),updateCellOutputs:async n=>t().POST("/api/export/update_cell_outputs",{body:n,params:r()}).then(Ce),addPackage:n=>t().POST("/api/packages/add",{body:n}).then(Oe),removePackage:n=>t().POST("/api/packages/remove",{body:n}).then(Oe),getPackageList:async()=>(await ct(),t().GET("/api/packages/list").then(Oe)),getDependencyTree:async()=>(await ct(),t().GET("/api/packages/tree").then(Oe)),listSecretKeys:async n=>(await ct(),t().POST("/api/secrets/keys",{body:n,params:r()}).then(Ce)),writeSecret:async n=>t().POST("/api/secrets/create",{body:n,params:r()}).then(Ce),invokeAiTool:async n=>t().POST("/api/ai/invoke_tool",{body:n,params:r()}).then(Oe),clearCache:async()=>t().POST("/api/cache/clear",{body:{},params:r()}).then(Ce),getCacheInfo:async()=>t().POST("/api/cache/info",{body:{},params:r()}).then(Ce),listStorageEntries:n=>t().POST("/api/storage/list_entries",{body:n,params:r()}).then(Ce),downloadStorage:n=>t().POST("/api/storage/download",{body:n,params:r()}).then(Ce)}}function v0(){let t=()=>{throw Error("Unreachable. Expected to be in run mode")};return{sendComponentValues:async()=>(Et({title:"Static notebook",description:"This notebook is not connected to a kernel. Any interactive elements will not work."}),ue.log("Updating UI elements is not supported in static mode"),null),sendModelValue:async()=>(ue.log("Updating model values is not supported in static mode"),null),sendInstantiate:async()=>(ue.log("Viewing as static notebook"),null),sendFunctionRequest:async()=>(Et({title:"Static notebook",description:"This notebook is not connected to a kernel. Any interactive elements will not work."}),ue.log("Function requests are not supported in static mode"),null),sendRestart:t,sendDocumentTransaction:t,sendRun:t,sendRunScratchpad:t,sendRename:t,sendSave:t,sendCopy:t,sendInterrupt:t,sendShutdown:t,sendFormat:t,sendDeleteCell:t,sendCodeCompletionRequest:t,saveUserConfig:t,saveAppConfig:t,saveCellConfig:t,sendStdin:t,readCode:t,readSnippets:t,previewDatasetColumn:t,previewSQLTable:t,previewSQLTableList:t,previewSQLSchemaList:t,previewDataSourceConnection:t,validateSQL:t,openFile:t,getUsageStats:t,sendListFiles:t,sendSearchFiles:t,sendPdb:t,sendCreateFileOrFolder:t,sendDeleteFileOrFolder:t,sendCopyFileOrFolder:t,sendRenameFileOrFolder:t,sendUpdateFile:t,sendFileDetails:t,openTutorial:t,sendInstallMissingPackages:t,getRecentFiles:t,getWorkspaceFiles:t,getRunningNotebooks:t,shutdownSession:t,exportAsHTML:t,exportAsIPYNB:t,exportAsMarkdown:t,exportAsPDF:t,autoExportAsHTML:t,autoExportAsMarkdown:t,autoExportAsIPYNB:t,updateCellOutputs:t,addPackage:t,removePackage:t,getPackageList:t,getDependencyTree:t,listSecretKeys:t,writeSecret:t,invokeAiTool:t,clearCache:t,getCacheInfo:t,listStorageEntries:t,downloadStorage:t}}var w0=ee();function b0(t){let e={sendComponentValues:"Failed update value",sendModelValue:"Failed to update model value",sendInstantiate:"Failed to instantiate",sendFunctionRequest:"Failed to send function request",sendRestart:"Failed to restart",sendDocumentTransaction:"Failed to sync document transaction",sendRun:"Failed to run",sendRunScratchpad:"Failed to run scratchpad",sendRename:"Failed to rename",sendSave:"Failed to save",sendCopy:"Failed to copy",sendInterrupt:"Failed to interrupt",sendShutdown:"Failed to shutdown",sendFormat:"Failed to format",sendDeleteCell:"Failed to delete cell",sendCodeCompletionRequest:"Failed to complete code",saveUserConfig:"Failed to save user config",saveAppConfig:"Failed to save app config",saveCellConfig:"Failed to save cell config",sendStdin:"Failed to send stdin",readCode:"Failed to read code",readSnippets:"Failed to fetch snippets",previewDatasetColumn:"Failed to fetch data sources",previewSQLTable:"Failed to fetch SQL table",previewSQLTableList:"Failed to fetch SQL table list",previewSQLSchemaList:"Failed to fetch SQL schema list",previewDataSourceConnection:"Failed to preview data source connection",validateSQL:"Failed to validate SQL",openFile:"Failed to open file",getUsageStats:"",sendListFiles:"Failed to list files",sendSearchFiles:"Failed to search files",sendPdb:"Failed to start debug session",sendCreateFileOrFolder:"Failed to create file or folder",sendDeleteFileOrFolder:"Failed to delete file or folder",sendCopyFileOrFolder:"Failed to duplicate file or folder",sendRenameFileOrFolder:"Failed to rename file or folder",sendUpdateFile:"Failed to update file",sendFileDetails:"Failed to get file details",openTutorial:"Failed to open tutorial",sendInstallMissingPackages:"Failed to install missing packages",getRecentFiles:"Failed to get recent files",getWorkspaceFiles:"Failed to get workspace files",getRunningNotebooks:"Failed to get running notebooks",shutdownSession:"Failed to shutdown session",exportAsHTML:"Failed to export HTML",exportAsIPYNB:"Failed to export ipynb",exportAsMarkdown:"Failed to export Markdown",exportAsPDF:"Failed to export PDF",autoExportAsHTML:"",autoExportAsMarkdown:"",autoExportAsIPYNB:"",updateCellOutputs:"",addPackage:"Failed to add package",removePackage:"Failed to remove package",getPackageList:"Failed to get package list",getDependencyTree:"Failed to get dependency tree",listSecretKeys:"Failed to fetch secrets",writeSecret:"Failed to write secret",invokeAiTool:"Failed to invoke AI tool",clearCache:"Failed to clear cache",getCacheInfo:"",listStorageEntries:"Failed to list storage entries",downloadStorage:"Failed to download storage entry"},r={};for(let[n,a]of Object.entries(t)){let i=n;r[i]=async(...l)=>{try{return await a(...l)}catch(s){if(s instanceof $m){if(De.get(Gp))return;let u=Et({title:"Kernel Not Connected",description:"You need to connect to a kernel to perform this action.",variant:"default",action:(0,o.jsx)(y0,{onConnect:()=>u.dismiss()})});throw ue.error(`Failed to handle request: ${n}`,s),s}let d=e[i],c=qm(s);throw d&&Et({title:d,description:c,variant:"danger"}),ue.error(`Failed to handle request: ${n}`,s),s}}}return r}const y0=t=>{let e=(0,w0.c)(9),{onConnect:r}=t,n=Jj(),a=ga(Gp),i;e[0]!==n||e[1]!==r?(i=()=>{n(),setTimeout(()=>{r()},800)},e[0]=n,e[1]=r,e[2]=i):i=e[2];let l;e[3]===a?l=e[4]:(l=a&&(0,o.jsx)(Oi,{size:"small",className:"mr-1"}),e[3]=a,e[4]=l);let s;return e[5]!==a||e[6]!==i||e[7]!==l?(s=(0,o.jsxs)(ze,{size:"xs",onClick:i,disabled:a,children:[l,"Connect"]}),e[5]=a,e[6]=i,e[7]=l,e[8]=s):s=e[8],s};function j0(){let t;return t=Zj()?Fj.INSTANCE:xa()?v0():f0(x0(),()=>ds()),b0(t)}var an=ee(),ko=j.forwardRef((t,e)=>{let r=(0,an.c)(16),n,a,i,l;r[0]===t?(n=r[1],a=r[2],i=r[3],l=r[4]):({className:a,children:n,orientation:i,...l}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i,r[4]=l);let s=i==="horizontal"&&"max-w-max flex-1 items-center justify-center",d=i==="vertical"&&"",c;r[5]!==a||r[6]!==s||r[7]!==d?(c=Z(s,d,"relative z-10",a),r[5]=a,r[6]=s,r[7]=d,r[8]=c):c=r[8];let u;r[9]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)(vc,{}),r[9]=u):u=r[9];let p;return r[10]!==n||r[11]!==i||r[12]!==l||r[13]!==e||r[14]!==c?(p=(0,o.jsxs)(ld,{ref:e,className:c,orientation:i,...l,children:[n,u]}),r[10]=n,r[11]=i,r[12]=l,r[13]=e,r[14]=c,r[15]=p):p=r[15],p});ko.displayName=ld.displayName;var C0=cs("group flex list-none gap-1",{variants:{orientation:{horizontal:"flex items-center",vertical:"flex flex-col"}},defaultVariants:{orientation:"horizontal"}}),Va=j.forwardRef((t,e)=>{let r=(0,an.c)(11),n,a,i;r[0]===t?(n=r[1],a=r[2],i=r[3]):({className:n,orientation:a,...i}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i);let l;r[4]!==n||r[5]!==a?(l=Z(C0({orientation:a}),n),r[4]=n,r[5]=a,r[6]=l):l=r[6];let s;return r[7]!==i||r[8]!==e||r[9]!==l?(s=(0,o.jsx)(sd,{ref:e,className:l,...i}),r[7]=i,r[8]=e,r[9]=l,r[10]=s):s=r[10],s});Va.displayName=sd.displayName;var No=hh,To=cs("group inline-flex rounded-md bg-background px-4 py-2 text-lg font-medium text-(--slate-12) transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50",{variants:{orientation:{horizontal:"w-max items-center justify-center",vertical:"w-full"}},defaultVariants:{orientation:"horizontal"}}),gc=j.forwardRef((t,e)=>{let r=(0,an.c)(12),n,a,i;r[0]===t?(n=r[1],a=r[2],i=r[3]):({className:a,children:n,...i}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i);let l;r[4]===a?l=r[5]:(l=Z(To(),"group",a),r[4]=a,r[5]=l);let s;r[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)(VS,{className:"relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"}),r[6]=s):s=r[6];let d;return r[7]!==n||r[8]!==i||r[9]!==e||r[10]!==l?(d=(0,o.jsxs)(dd,{ref:e,className:l,...i,children:[n," ",s]}),r[7]=n,r[8]=i,r[9]=e,r[10]=l,r[11]=d):d=r[11],d});gc.displayName=dd.displayName;var xc=j.forwardRef((t,e)=>{let r=(0,an.c)(9),n,a;r[0]===t?(n=r[1],a=r[2]):({className:n,...a}=t,r[0]=t,r[1]=n,r[2]=a);let i;r[3]===n?i=r[4]:(i=Z("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",n),r[3]=n,r[4]=i);let l;return r[5]!==a||r[6]!==e||r[7]!==i?(l=(0,o.jsx)(ud,{ref:e,className:i,...a}),r[5]=a,r[6]=e,r[7]=i,r[8]=l):l=r[8],l});xc.displayName=ud.displayName;var Ao=fh,vc=j.forwardRef((t,e)=>{let r=(0,an.c)(10),n,a;r[0]===t?(n=r[1],a=r[2]):({className:n,...a}=t,r[0]=t,r[1]=n,r[2]=a);let i;r[3]===Symbol.for("react.memo_cache_sentinel")?(i=Z("absolute left-0 top-full flex justify-center"),r[3]=i):i=r[3];let l;r[4]===n?l=r[5]:(l=Z("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)",n),r[4]=n,r[5]=l);let s;return r[6]!==a||r[7]!==e||r[8]!==l?(s=(0,o.jsx)("div",{className:i,children:(0,o.jsx)(pd,{className:l,ref:e,...a})}),r[6]=a,r[7]=e,r[8]=l,r[9]=s):s=r[9],s});vc.displayName=pd.displayName;var _0=j.forwardRef((t,e)=>{let r=(0,an.c)(10),n,a;r[0]===t?(n=r[1],a=r[2]):({className:n,...a}=t,r[0]=t,r[1]=n,r[2]=a);let i;r[3]===n?i=r[4]:(i=Z("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",n),r[3]=n,r[4]=i);let l;r[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsx)("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"}),r[5]=l):l=r[5];let s;return r[6]!==a||r[7]!==e||r[8]!==i?(s=(0,o.jsx)(cd,{ref:e,className:i,...a,children:l}),r[6]=a,r[7]=e,r[8]=i,r[9]=s):s=r[9],s});_0.displayName=cd.displayName;var wc=ee(),S0=class{constructor(){B(this,"tagName","marimo-nav-menu");B(this,"menuItemValidator",F({label:I(),href:I(),description:I().nullish()}));B(this,"menuItemGroupValidator",F({label:I(),items:G(this.menuItemValidator)}));B(this,"validator",F({items:G(Ne([this.menuItemValidator,this.menuItemGroupValidator])),orientation:ye(["horizontal","vertical"])}))}render(t){return(0,o.jsx)(k0,{...t.data})}},k0=t=>{let e=(0,wc.c)(13),{items:r,orientation:n}=t,a=N0,i=T0,l=A0,s;e[0]===n?s=e[1]:(s=m=>"items"in m?n==="horizontal"?(0,o.jsx)(ko,{orientation:"horizontal",children:(0,o.jsx)(Va,{children:(0,o.jsxs)(No,{children:[(0,o.jsx)(gc,{children:qe({html:m.label})}),(0,o.jsx)(xc,{children:(0,o.jsx)("ul",{className:"grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ",children:m.items.map(f=>(0,o.jsx)(bc,{label:f.label,href:l(f.href),target:i(f.href),children:f.description&&qe({html:f.description})},f.label))})})]})})},m.label):(0,o.jsxs)(No,{children:[(0,o.jsx)("div",{className:"inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-base font-medium text-muted-foreground/80 tracking-wide font-semibold",children:qe({html:m.label})}),(0,o.jsx)(Va,{className:"ml-4 auto-collapse-nav",orientation:n,children:m.items.map(f=>(0,o.jsx)(j.Fragment,{children:a((0,o.jsx)(Ao,{href:l(f.href),target:i(f.href),className:To({orientation:n}),children:qe({html:f.label})},f.label),f.description)},f.label))})]},m.label):(0,o.jsx)(No,{children:(0,o.jsx)(Ao,{href:l(m.href),target:i(m.href),className:To({orientation:n}),children:qe({html:m.label})})},m.label),e[0]=n,e[1]=s);let d=s,c;if(e[2]!==r||e[3]!==d){let m;e[5]===d?m=e[6]:(m=f=>d(f),e[5]=d,e[6]=m),c=r.map(m),e[2]=r,e[3]=d,e[4]=c}else c=e[4];let u;e[7]!==n||e[8]!==c?(u=(0,o.jsx)(Va,{className:"auto-collapse-nav",orientation:n,children:c}),e[7]=n,e[8]=c,e[9]=u):u=e[9];let p;return e[10]!==n||e[11]!==u?(p=(0,o.jsx)(ko,{orientation:n,children:u}),e[10]=n,e[11]=u,e[12]=p):p=e[12],p},bc=j.forwardRef((t,e)=>{let r=(0,wc.c)(19),n,a,i,l;r[0]===t?(n=r[1],a=r[2],i=r[3],l=r[4]):({className:a,label:i,children:n,...l}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i,r[4]=l);let s;r[5]===a?s=r[6]:(s=Z("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",a),r[5]=a,r[6]=s);let d;r[7]===i?d=r[8]:(d=qe({html:i}),r[7]=i,r[8]=d);let c;r[9]===d?c=r[10]:(c=(0,o.jsx)("div",{className:"text-base font-medium leading-none",children:d}),r[9]=d,r[10]=c);let u;r[11]===n?u=r[12]:(u=n&&(0,o.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:n}),r[11]=n,r[12]=u);let p;return r[13]!==l||r[14]!==e||r[15]!==s||r[16]!==c||r[17]!==u?(p=(0,o.jsx)("li",{children:(0,o.jsx)(Ao,{asChild:!0,children:(0,o.jsxs)("a",{ref:e,className:s,...l,children:[c,u]})})}),r[13]=l,r[14]=e,r[15]=s,r[16]=c,r[17]=u,r[18]=p):p=r[18],p});bc.displayName="ListItem";function N0(t,e){return e?(0,o.jsx)(gr,{delayDuration:200,content:qe({html:e}),children:t}):t}function T0(t){return t.startsWith("http")?"_blank":"_self"}function A0(t){return _S({href:t,queryParams:new URL(globalThis.location.href).search,keys:[ss.filePath]})}function I0(t,e){return t===e?!0:t==null||e==null?!1:Array.isArray(t)&&Array.isArray(e)?g_(t,e):typeof t=="object"&&typeof e=="object"?E0(t,e):!1}function E0(t,e){return Object.keys(t).length===Object.keys(e).length&&Gr.keys(t).every(r=>t[r]===e[r])}function Io(t,e){if(!(window!=null&&window.customElements)){ue.warn("Custom elements not supported");return}if(window.customElements.get(t)){ue.warn(`Custom element ${t} already defined`);return}window.customElements.define(t,e)}function R0(t,e){if(!e)return[];let r=t;if(t_(e))return[{column_id:r,operator:e.operator,type:"condition",negate:!1}];switch(e.type){case"number":switch(e.operator){case"between":return[{column_id:r,operator:"between",value:{min:e.min,max:e.max},type:"condition",negate:!1}];case"==":case"!=":case">":case">=":case"<":case"<=":return[{column_id:r,operator:e.operator,value:e.value,type:"condition",negate:!1}];case"in":case"not_in":return[{column_id:r,operator:e.operator,value:e.values,type:"condition",negate:!1}];default:Mi(e)}case"text":switch(e.operator){case"contains":case"equals":case"does_not_equal":case"regex":case"starts_with":case"ends_with":return[{column_id:r,operator:e.operator,value:e.text,type:"condition",negate:!1}];case"in":case"not_in":return[{column_id:r,operator:e.operator,value:e.values,type:"condition",negate:!1}];case"is_empty":return[{column_id:r,operator:"is_empty",type:"condition",negate:!1}];default:Mi(e)}case"date":case"datetime":case"time":{let n=e.type==="date"?TS:e.type==="time"?NS:kS;switch(e.operator){case"between":return[{column_id:r,operator:"between",value:{min:n(e.min),max:n(e.max)},type:"condition",negate:!1}];case"==":case"!=":case">":case">=":case"<":case"<=":return[{column_id:r,operator:e.operator,value:n(e.value),type:"condition",negate:!1}];default:Mi(e)}}case"boolean":return[{column_id:r,operator:e.operator,type:"condition",negate:!1}];default:Mi(e)}}function yc(t){return{type:"group",operator:"and",children:t.flatMap(e=>R0(e.id,e.value)),negate:!1}}var z0=ee(),M0=fC,P0=xC,F0=vC,O0=gC;const L0=t=>{let e=(0,z0.c)(16),{error:r,badData:n,shadowRoot:a}=t;if(r instanceof _j){let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsx)(Ms,{children:"Bad Data"}),e[0]=l):l=e[0];let s;e[1]===r.issues?s=e[2]:(s=r.issues.map(D0),e[1]=r.issues,e[2]=s);let d;e[3]===s?d=e[4]:(d=(0,o.jsx)("div",{className:"text-md prose dark:prose-invert",children:(0,o.jsx)("ul",{children:s})}),e[3]=s,e[4]=d);let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsx)(O0,{className:"py-2 text-[0.84375rem]",children:"View Data:"}),e[5]=c):c=e[5];let u;e[6]===n?u=e[7]:(u=(0,o.jsx)(wm,{data:n}),e[6]=n,e[7]=u);let p;e[8]!==a||e[9]!==u?(p=(0,o.jsx)(M0,{type:"single",collapsible:!0,children:(0,o.jsxs)(F0,{value:"item-1",className:"text-muted-foreground border-muted-foreground-20",children:[c,(0,o.jsx)(P0,{className:"text-[0.84375rem]",children:(0,o.jsx)(bm,{container:a,children:u})})]})}),e[8]=a,e[9]=u,e[10]=p):p=e[10];let m;return e[11]!==d||e[12]!==p?(m=(0,o.jsxs)(Hi,{variant:"destructive",children:[l,d,p]}),e[11]=d,e[12]=p,e[13]=m):m=e[13],m}let i;return e[14]===r.message?i=e[15]:(i=(0,o.jsx)("div",{children:r.message}),e[14]=r.message,e[15]=i),i};function V0(t,e,r){return(0,o.jsx)(L0,{error:t,badData:e,shadowRoot:r})}function D0(t){let e=t.path.join(".");return(0,o.jsxs)("li",{children:[(0,o.jsx)("span",{className:"font-bold",children:e}),": ",t.message]},e)}function H0({hostElement:t,plugin:e,children:r,getInitialValue:n},a){let[i,l]=(0,j.useState)(r),[s,d]=(0,j.useState)(n()),{theme:c}=In(),[u,p]=(0,j.useState)(()=>e.validator.safeParse(rs(t))),[m,f]=(0,j.useState)(0);(0,j.useImperativeHandle)(a,()=>({reset:()=>{d(n()),p(e.validator.safeParse(rs(t))),f(w=>w+1)},setChildren:w=>{l(w)}})),ls(t,DS.TYPE,w=>{w.detail.element===t&&d(w.detail.value)}),(0,j.useEffect)(()=>{let w=new MutationObserver(b=>{b.some(v=>{var y;return v.type==="attributes"&&((y=v.attributeName)==null?void 0:y.startsWith("data-"))})&&p(e.validator.safeParse(rs(t)))});return w.observe(t,{attributes:!0}),()=>{w.disconnect()}},[t,e.validator]);let g=$e(w=>{d(b=>{let v=hr.asUpdater(w)(b);return I0(v,b)||t.dispatchEvent(Ym(v,t)),v})}),x=(0,j.useMemo)(()=>{if(!e.functions)return{};let w={};for(let[b,v]of Gr.entries(e.functions)){let{input:y,output:S}=v;w[b]=async(...C)=>{var A;Nn(C.length<=1,`Plugin functions only supports a single argument. Called ${b}`);let _=zo(t);Nn(_,"Object ID should exist");let k=xa(),h=(A=Mp.findElementThroughShadowDOMs(t))==null?void 0:A.id,N=h?Mp.parse(h):null;if(N&&!k){let R=De.get(Fp),z=R.cellRuntime[N],E=R.cellData[N];if(K2({executionTime:z.runElapsedTimeMs??E.lastExecutionTime,status:z.status,errored:z.errored,interrupted:z.interrupted,stopped:z.stopped}))throw new MS}else ue.warn(`Cell ID ${N} cannot be found`);let T=await Mj.request({args:Sc(y,C[0]),functionName:b,namespace:_});if(T.status.code!=="ok")throw ue.error(T.status),Error(T.status.message||"Unknown error");return Sc(S,T.return_value)}}return w},[e.functions,t,m]);return u.success?(0,o.jsx)(cC,{children:(0,o.jsx)("div",{className:`contents ${c}`,children:(0,o.jsx)(j.Suspense,{fallback:(0,o.jsx)("div",{}),children:(0,o.jsx)(ba,{children:e.render({setValue:g,value:s,data:u.data,children:i,host:t,functions:x})})})})}):V0(u.error,Gr.mapValues(t.dataset,w=>typeof w=="string"?zp(w):w),t.shadowRoot)}var B0=j.forwardRef(H0),Eo=new Map,jc="__custom_marimo_element__";function Cc(t){let e=class extends HTMLElement{constructor(){super();B(this,"mounted",!1);B(this,"pluginRef",(0,j.createRef)());B(this,"__type__",jc);this.attachShadow({mode:"open"}),this.copyStyles(),this.observer=new MutationObserver(()=>{var n;(n=this.pluginRef.current)==null||n.setChildren(this.getChildren())})}connectedCallback(){this.isLightDOMChildOfMarimoElement()||(this.mounted||(Nn(this.shadowRoot,"Shadow root should exist"),this.root&&this.root.unmount(),this.root=Wh.createRoot(this.shadowRoot),this.mountReactComponent()),this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0,characterData:!0}))}disconnectedCallback(){var n;this.observer.disconnect(),(n=this.root)==null||n.unmount(),this.mounted&&(this.mounted=!1)}isLightDOMChildOfMarimoElement(){let n=this.parentElement;for(;n;){if(Ro(n))return!0;n=n.parentElement}return!1}reset(){this.dispatchEvent(Ym(zp(this.dataset.initialValue),this)),this.rerender()}rerender(){var n;(n=this.pluginRef.current)==null||n.reset()}getChildren(){return this.children.length===0?null:this.children.length===1?qe({html:this.innerHTML,alwaysSanitizeHtml:!1}):Array.from(this.children).map((n,a)=>(0,o.jsx)(j.Fragment,{children:qe({html:n.outerHTML,alwaysSanitizeHtml:!1})},a))}async mountReactComponent(){this.mounted=!0,Nn(this.root,"Root must be defined"),this.root.render((0,o.jsx)(_i,{store:De,children:(0,o.jsx)(So,{children:(0,o.jsx)(B0,{hostElement:this,plugin:t,ref:this.pluginRef,getInitialValue:()=>U2(this,Ij.INSTANCE),children:this.getChildren()})})}))}async copyStyles(){let n=this.shadowRoot;if(Nn(n,"Shadow root should exist"),!this.isAdoptedStyleSheetsSupported()){ue.warn("adoptedStyleSheets not supported, copying stylesheets in a less performance way. Please consider upgrading your browser."),this.copyStylesFallback();return}let a=Array.from(document.styleSheets).filter(i=>i.ownerNode instanceof HTMLElement&&i.ownerNode.dataset.viteDevId?!0:_c(i));for(let i of a){let l=i.href??(i.ownerNode instanceof HTMLElement?i.ownerNode.dataset.viteDevId:void 0)??i.title;if(l&&!Eo.has(l)){let s=new CSSStyleSheet;try{s.replaceSync(Array.from(i.cssRules).map(d=>d.cssText.includes("@import")?"":d.cssText).join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./home-page-CNWhDe7y.js","./app-config-button-BjRm2yh5.js","./ai-model-dropdown-BToySVta.js","./cells-CFd8A4_A.js","./preload-helper-BPPi7vOr.js","./badge-j3NGjqhR.js","./cn-DCUzRj2J.js","./clsx-Dz_KRrWq.js","./compiler-runtime-B3qBwwSJ.js","./react-Bj1aDYRI.js","./chunk-LvLJmgfZ.js","./jsx-runtime-BqBOg78p.js","./button-BbCh-29a.js","./useEventListener-DvoEXWke.js","./fullscreen-eipL3i3Y.js","./react-dom-CSu739Rf.js","./menu-items-DcP01QzW.js","./select-DZcFyKFQ.js","./dist-BdyjRhEt.js","./check-BH35Ndha.js","./createLucideIcon-D5guW7EU.js","./x-C-6liIBr.js","./tooltip-DTV9tlSr.js","./use-toast-IPAtJGea.js","./utils-CvI-39U6.js","./useEvent-D91BmmQi.js","./invariant-BUdrueMv.js","./merge-_9WLTEyt.js","./_baseFor-DKD1r8uL.js","./isObject-DvLSfCY5.js","./zod-H_cgTO0M.js","./DeferredRequestRegistry-CNldVcrP.js","./Deferred-CP7vq682.js","./uuid-e9lSomwA.js","./config-DdDKNgb1.js","./constants-DMpttj8Q.js","./session-0B5NBztP.js","./requests-DIwGYs0l.js","./useLifecycle-DieWOfXE.js","./useNonce-DfoVjkkH.js","./useTheme-CI2eq4XN.js","./arrays-DYDL-3-i.js","./strings-wdPMRf6Z.js","./capabilities-A_KhFcGV.js","./once-DRroIaBz.js","./createReducer-CI9qeK_X.js","./paths-D5zczhUD.js","./dist-HlsDto3K.js","./dist-BrR4M-k3.js","./dist-CHcznzB-.js","./dist-CBSMxaO_.js","./dist-CpTFpfm_.js","./dist-B1U1kGCR.js","./dist-ChF5Ln9c.js","./dist-CPczQFlJ.js","./dist-C9ZB41s2.js","./stex-BGrE-q7N.js","./toDate-B5A0DFEz.js","./purify.es-B9KxLTTS.js","./cjs-BRGiG41H.js","./debounce-DhnxH9Rh.js","./now-CsYTPAhW.js","./isSymbol-BT6B8Bon.js","./database-zap-kIkTfzTX.js","./main-B0OX4z33.js","./cells-jmgGt1lS.css","./spinner-Bhir8k53.js","./renderShortcut-CcFk3m01.js","./dropdown-menu-CR7cnzLX.js","./chevron-right-CG5QYXYk.js","./kbd-CTUAEnEx.js","./multi-map-CUuNtzHt.js","./alert-yTS3WpF4.js","./card--6HRj4T9.js","./dialog-DzC_QCtT.js","./alert-dialog-BqFLkbUc.js","./textarea-DQ0XiNGe.js","./label-xHqFtfdz.js","./useDebounce-7xZwVnnu.js","./input-C3Hrdlqq.js","./numbers-C3BAdHZE.js","./useNumberFormatter-ByUv-u9o.js","./context-QkTujrKn.js","./SSRProvider-CkFAAHXw.js","./usePress-DQ_tAz5W.js","./links-D1JoyKTt.js","./popover-Bz_0Vkyf.js","./switch-35WUzMpb.js","./table-BGPSHfig.js","./useHotkey-TKvjHf1m.js","./useAsyncData-bgszE9F0.js","./error-banner-LdWZDbqd.js","./errors-vr57w7Ul.js","./copy-LK56fFow.js","./RSPContexts-CdN1NyAt.js","./get-C-qh_et5.js","./memoize-Tp7rARFe.js","./copy-BwrPA9zQ.js","./plus-BgB18UzY.js","./refresh-cw-DHwG4Mac.js","./trash-2-rVklqqFF.js","./triangle-alert-D2p96PEF.js","./azure-B42ls0Ui.js","./Inputs-C6ftxLAJ.js","./Inputs-CuKU-ENz.css","./ImperativeModal-B3Th7k4R.js","./settings-DfFe0dWD.js","./ErrorBoundary-DyYDV0HI.js","./icons-Ol38nIbL.js","./file-icons-CIKQdTpO.js","./file-headphone-BrQspHac.js","./file-BrdxGLRX.js","./image-DQHXdEQn.js","./file-name-input-BNHbCr1E.js","./tree-actions-BM_EJr3E.js","./ellipsis-vertical-CkwWkOQL.js","./pathUtils-CJjndqMI.js","./semaphore-FlZezxaf.js","./extends-BiFDv3jB.js","./marimo-icons-CiwvnnsT.js","./useInterval-2YvvhIZI.js","./dates-CTxr0EqQ.js","./en-US-Cb8rIK52.js","./isValid-CklTTytn.js","./links-1rtF1-eC.js","./maps-n3GaPJwv.js","./react-icons.esm-BNzu6e7h.js","./chart-no-axes-column-nqk474t8.js","./circle-play-CYXX2xu3.js","./external-link-BTNxSavU.js","./github-BKS_2Qwn.js","./youtube-CbdpN8oL.js","./link-CfEtM3Rl.js","./package-Tv6ztuzw.js","./refresh-ccw-C-n2VFP5.js","./run-page-By67zzFX.js","./panels-CwtNk2-W.js","./JsonOutput-B2v_Stn9.js","./utils-DCL4n9wx.js","./vega-loader.browser-C8wT63Va.js","./precisionRound-Cl9k9ZmS.js","./defaultLocale-BLUna9fQ.js","./defaultLocale-DzliDDTm.js","./useInstallPackage-DUF4IRRI.js","./MarimoErrorOutput-DWt3lI06.js","./cell-link-CW22jH60.js","./RenderHTML-CP7UDK5X.js","./useRunCells-DQDFDt2R.js","./copy-icon-OjtDb4gO.js","./datasource-DiYrzHFG.js","./state-CEiXUajw.js","./sparkles-lWUAsPhp.js","./markdown-renderer-B1eFOa7V.js","./html-to-image-CJxTFjQz.js","./focus-DjmSWsDI.js","./LazyAnyLanguageCodeMirror-BEvXb3VX.js","./chunk-5FQGJX7Z-D9iBG0F7.js","./micromark-factory-space-BygYYKhs.js","./markdown-renderer-DdDKmWlR.css","./command-KARR7KMq.js","./field-zLmMOSA4.js","./download-BaGnGHOq.js","./useIframeCapabilities-CcI1zSdn.js","./formats-b7Sf6DAK.js","./emotion-is-prop-valid.esm-C59xfSYt.js","./useDateFormatter-ICIDGgHf.js","./table-6NxtGaCm.js","./ellipsis-KAhMaCIV.js","./message-circle-CWm2KnSx.js","./react-resizable-panels.browser.esm-CV8-hvjx.js","./JsonOutput-B7vuddcd.css","./layout-CfRdiox1.js","./name-cell-input-DdwASAQy.js","./esm-CqWdmSnV.js","./objectWithoutPropertiesLoose-DfWeGRFv.js","./name-cell-input-ujOhus_y.css","./radio-group-PmOgsvro.js","./floating-outline-CEy7C9R6.js","./readonly-python-code-A3C9oCts.js","./process-output-DaNYZ78d.js","./esm-DeiyaVAJ.js","./dist-BQeNY9Zl.js","./dist-CXBpwk_w.js","./dist-DUHHizRG.js","./dist-CocyeH0q.js","./dist-D70Tz1Kr.js","./dist-CciFN1z_.js","./dist-CpcTHxTt.js","./dist-BF6UNR6V.js","./dist-CsvFAFh9.js","./dist-DqVEVg0c.js","./dist-CNyMUs19.js","./dist-A7swzSTR.js","./dist-BlOtCkpT.js","./dist-C78V1LRz.js","./apl-Byte72fT.js","./asciiarmor-BU-VnG1Y.js","./asn1-hTvH3S4T.js","./brainfuck-C-q1Rv8J.js","./clike-BE-9Ct_H.js","./clojure-Co-TLeNo.js","./cmake-B-Nm_Opd.js","./cobol-BGdihAZT.js","./coffeescript-BUZXkMUO.js","./commonlisp-CFkPbxvX.js","./crystal-CqfqDl34.js","./css-DPEtZWJi.js","./cypher-B0t8FJvU.js","./d-DRa_XRSB.js","./diff-GLneonpD.js","./dtd-uVrZNVF0.js","./dylan-DkNeA4FZ.js","./ecl-CldUgvc9.js","./eiffel-CoMDRbRL.js","./elm-Cb5XC6ev.js","./erlang-8H3fTZ3L.js","./factor-C-_cRSDM.js","./simple-mode-CFlvn0Mm.js","./forth-B8kC4npz.js","./fortran-CNWGEL3c.js","./gas-DnZQNTHK.js","./gherkin-JfGcGvci.js","./groovy-D0FWiAVm.js","./haskell-wUB3uX-G.js","./haxe-g0JY6eL-.js","./idl-CV2cLkPc.js","./javascript-CT6okXEZ.js","./julia-CKC48ufo.js","./livescript-C43pZ6Ue.js","./lua-Cs2mb10K.js","./mathematica-B5FMK3ma.js","./mbox-36Zrn5Bd.js","./mirc-BKTAABSX.js","./mllike-DbuClUqc.js","./modelica-CKRvBm7N.js","./mscgen-B4BRgnCi.js","./mumps-BFiMcyFV.js","./nsis-BGZ5EB-j.js","./ntriples-QQAkJYAR.js","./octave-DsTphmGZ.js","./oz-CD9rr5Iz.js","./pascal-DdHEIlJE.js","./perl-DHPJBQ1u.js","./pig-Yz7ERgca.js","./powershell-CHPZ_bsU.js","./properties-CI9nc7K4.js","./protobuf-BYSIv2pY.js","./pug-CYW0agOo.js","./puppet-CEpLafZX.js","./python-BndVuwG1.js","./q-L_cetpiW.js","./r-Dd37AKWk.js","./rpm-CHrvhtlN.js","./ruby-BPOowfX6.js","./sas-BsEFSvEP.js","./scheme-B42INBu7.js","./shell-BPea12OI.js","./sieve-C-yPcLw5.js","./smalltalk-e7OO1ATb.js","./sparql-B4I2Ledx.js","./stylus-CBRbZwhN.js","./swift-B2hnU7ha.js","./tcl-BtyamtaZ.js","./textile-M9mhyNE9.js","./toml-YxyxhyRy.js","./troff-C7xpi05X.js","./ttcn-cfg-DlZ5vA9E.js","./ttcn-D3YytrJU.js","./turtle-BSHvAsUe.js","./vb-DdkIDLlO.js","./vbscript-DhYGmk_p.js","./velocity-DAXJNEw4.js","./verilog-jmuT_L3b.js","./vhdl-DcVQ97RU.js","./webidl-B-YB_4OQ.js","./xquery-DOmY3Oe8.js","./yacas-pL3kJRXV.js","./z80-VwVuI_MT.js","./code-xml-CZN6vNxu.js","./play-C7DcCsoO.js","./trash-DqeDe-Ua.js","./prop-types-DaaA-ptl.js","./layout-BjXzDXoG.css","./types-a-yURniQ.js","./state-CAn3OpIa.js","./events-CPoJAfgx.js","./globals-FM_XB1In.js","./share-DMwTZOTH.js","./blob-Bgnx1kuY.js","./_baseSet-CxV9N1bc.js","./requests-DqJEWJ-Q.js","./runs-BD0G-C2A.js","./request-registry--h6PWG50.js","./state-DTislnZA.js","./ws-BnE9sl8z.js","./panels-B4E3DsXP.css","./edit-page-B59sKLMa.js","./loro_wasm_bg-CXnd80ne.js","./useDeleteCell-CH_1gU2V.js","./add-cell-with-ai-CAC7vFzu.js","./fileToBase64-DZfwJMrG.js","./cell-editor-BQRxBkmz.js","./useSplitCell-Cle-KXDv.js","./hooks-h3Z7JHnR.js","./dist-4ni0fia5.js","./circle-check-C17zXg7L.js","./save-Clg5dMoP.js","./cell-editor-Iey559K_.css","./useNotebookActions-B9KqjQmK.js","./add-connection-dialog-C6y-WHQz.js","./write-secret-modal-BFLlHwgU.js","./form-PMq9H-I_.js","./circle-plus-BdiiIXu5.js","./pair-with-agent-modal-D8eOWIWE.js","./useCellActionButton-CXkISThQ.js","./multi-icon-NVkxesVZ.js","./multi-icon-pwGWVz3d.css","./house-mGK3v0Mm.js","./square-B5xWCt0a.js","./CellStatus-B0Fz0F4Y.js","./ban-0fKnt00i.js","./workflow-Bm8qF7yj.js","./CellStatus-2Psjnl5F.css","./RunButton-BIFIZ7Iv.js","./useDependencyPanelTab-CLNYiwom.js","./panel-context-BJbBGfoL.js","./kiosk-mode-CtlXE_Xv.js","./useBoolean-_e4hdH_M.js","./arrow-right-pRnMoIOW.js","./clipboard-paste-BPjPPEqD.js","./rotate-ccw-CNsAb2VZ.js","./square-function-uY_yJr5g.js","./edit-page-Dstp9NQ5.css","./gallery-page-Bcf7fYLy.js","./chat-ui-CHaOV403.js","./chat-display-BnWhAO8B.js","./isEmpty-CXeoXbuc.js","./bot-message-square-DrbHk31W.js","./glide-data-editor-DqKNgyfg.js","./types-W8WWuumF.js","./click-outside-container-BNVqwewc.js","./dist-BQWswd1A.js","./glide-data-editor-BrZJn3-g.css","./ConnectedDataExplorerComponent-W0UfNkj7.js","./spec-CPQR_o92.js","./react-vega-CXIQBUis.js","./linear-CW_ww8od.js","./timer-B6DpdVnC.js","./init-DsZRk2YA.js","./time-DLdI7jB3.js","./range-gMGfxVwZ.js","./treemap-DeGcO9km.js","./path-DvTahePH.js","./colors-BG8Z91CW.js","./ordinal-_nQ2r1qQ.js","./arc-CWuN1tfc.js","./math-B-ZqhQTL.js","./array-CC7vZNGO.js","./step-D7xg1Moj.js","./line-x4bpd_8D.js","./Plot-Ba3WGWNu.js","./vega-component-BTe5wXGH.js","./useDeepCompareMemoize-zUHU--0D.js","./swiper-component-YGJlBaCp.js","./swiper-component-a65-SW8d.css","./slides-MCbMDtlY.css","./ImageComparisonComponent-BIetTBDq.js","./mermaid-Bes0ynI8.js","./dist-BXRWfNwi.js","./chunk-JA3XYJ7Z-B5b2QHOb.js","./src-BnrQkOKh.js","./src-CvyFXpBy.js","./chunk-S3R3BYOJ-Cl0iW04v.js","./chunk-ABZYJK2D-BG7Eb4WW.js","./chunk-ATLVNIR6-CqLn9HI1.js","./chunk-CVBHYZKI-C-NWvPQL.js","./chunk-DR5Q36YT-OB6tC_dd.js","./chunk-EXTU4WIE-BmVk7Fyq.js","./chunk-HN2XXSSU-Bcaj5fRB.js","./chunk-JZLCHNYA-1_sVfAnw.js","./chunk-MI3HLSF2-DqzZqBCh.js","./chunk-N4CR4FBY-CFJoD-EQ.js","./chunk-QXUST7PY-Cu1nR-L2.js","./katex-CzQ1KdW3.js","./katex-BE4UDS50.js","./mhchem-8N2oE3tb.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var L2=Object.defineProperty;var Ep=j=>{throw TypeError(j)};var V2=(j,Me,o)=>Me in j?L2(j,Me,{enumerable:!0,configurable:!0,writable:!0,value:o}):j[Me]=o;var B=(j,Me,o)=>V2(j,typeof Me!="symbol"?Me+"":Me,o),Jl=(j,Me,o)=>Me.has(j)||Ep("Cannot "+o);var $=(j,Me,o)=>(Jl(j,Me,"read from private field"),o?o.call(j):Me.get(j)),Qe=(j,Me,o)=>Me.has(j)?Ep("Cannot add the same private member more than once"):Me instanceof WeakSet?Me.add(j):Me.set(j,o),at=(j,Me,o,zt)=>(Jl(j,Me,"write to private field"),zt?zt.call(j,o):Me.set(j,o),o),Sr=(j,Me,o)=>(Jl(j,Me,"access private method"),o);var Rp=(j,Me,o,zt)=>({set _(Mn){at(j,Me,Mn,o)},get _(){return $(j,Me,zt)}});import{r as D2,s as qr,t as es}from"./chunk-LvLJmgfZ.js";import{c as _i,i as De,l as Sn,n as $e,s as Si,u as ga}from"./useEvent-D91BmmQi.js";import{t as H2}from"./react-Bj1aDYRI.js";import{$ as B2,Ai as zp,Bi as W2,Bt as ki,Ci as $2,Hi as Ur,Ii as Mp,J as q2,Ki as Pp,Mi as U2,Oi as Y2,Pi as ts,Q as G2,Qr as K2,Ri as Q2,S as X2,Si as Z2,Sr as J2,Ti as ej,Vi as tj,X as rj,Y as nj,Z as aj,at as ij,b as Fp,br as oj,bt as lj,cr as Op,dr as sj,et as dj,gi as cj,gr as Ni,ji as rs,ki as uj,nr as ns,ot as pj,rr as Lp,ut as mj,vi as hj,vr as fj,wi as gj,wr as xj,yr as Vp,yt as vj,z as wj,zi as kn,__tla as bj}from"./cells-CFd8A4_A.js";import{t as Dp}from"./react-dom-CSu739Rf.js";import{A as kr,B as Ne,C as Kt,E as yj,F as Hp,I as ft,J as jj,N as L,O as Cj,P as F,R as I,S as Yr,T as V,U as _j,V as Nr,a as Bp,b as ye,h as Sj,i as Wp,j as kj,k as Xe,n as $p,r as Nj,s as as,t as Tr,v as Tj,w as G,x as qp,z as Qt}from"./zod-H_cgTO0M.js";import{t as ee}from"./compiler-runtime-B3qBwwSJ.js";import{t as Aj}from"./get-C-qh_et5.js";import{t as Ti}from"./pick-DqWUNly1.js";import{a as Ij,c as Ej,d as is,f as Rj,g as zj,i as Mj,l as Pj,m as Fj,o as Ar,p as Oj,r as Up,s as os,u as Yp,w as Lj,x as Vj,__tla as Dj}from"./state-CAn3OpIa.js";import{_ as ue,a as Hj,d as Gr,o as Xt,t as ls,v as hr}from"./useEventListener-DvoEXWke.js";import{t as Nn}from"./invariant-BUdrueMv.js";import{A as Bj,M as Wj,b as $j,d as qj,j as Uj,o as Yj,t as Gj,v as Kj,w as Qj,x as Xj}from"./utils-CvI-39U6.js";import{r as ss}from"./constants-DMpttj8Q.js";import{S as ct,T as Zj,a as Jj,b as Gp,i as Kp,l as xa,r as ds,s as eC,t as tC,v as Qp,w as Xp}from"./config-DdDKNgb1.js";import{a as rC,i as nC,n as aC,o as iC,r as oC,t as lC}from"./switch-35WUzMpb.js";import{t as sC}from"./globals-FM_XB1In.js";import{t as Ai}from"./ErrorBoundary-DyYDV0HI.js";import{n as cs,t as Z}from"./cn-DCUzRj2J.js";import{t as dC}from"./jsx-runtime-BqBOg78p.js";import{C as vt,S as Zp,_ as Ii,a as cC,b as it,g as Jp,h as Kr,i as uC,p as pC,v as us,w as em,y as ps}from"./fullscreen-eipL3i3Y.js";import{o as mC,s as hC}from"./dist-BdyjRhEt.js";import{d as ms,u as tm}from"./menu-items-DcP01QzW.js";import{a as rm,c as fC,i as nm,l as gC,n as hs,o as xC,r as am,s as vC}from"./multi-map-CUuNtzHt.js";import{a as im,c as om,i as lm,l as sm,n as dm,s as cm,t as um}from"./alert-dialog-BqFLkbUc.js";import{a as Tn,c as ar,o as Dt,s as va}from"./popover-Bz_0Vkyf.js";import{a as wC,c as Ir,d as bC,f as yC,i as Ht,l as fs,m as pm,n as Er,o as Ei,p as mm,r as An,s as Qr,t as Rr}from"./select-DZcFyKFQ.js";import{a as hm,c as jC,i as CC,m as fm,o as _C,p as SC,r as kC,t as NC}from"./dropdown-menu-CR7cnzLX.js";import{A as TC,B as gs,C as fr,D as AC,Dt as IC,E as Xr,Et as EC,F as RC,H as zC,I as xs,L as MC,O as PC,P as FC,R as OC,S as Ri,St as LC,T as VC,Tt as DC,V as HC,X as BC,Y as WC,Z as $C,_t as gm,at as xm,b as vm,d as qC,dt as zi,et as vs,f as UC,ft as wa,gt as YC,ht as Zr,it as GC,k as KC,l as QC,lt as XC,mt as ws,nt as ZC,ot as JC,r as e_,rt as t_,s as r_,st as n_,t as wm,tt as bs,u as a_,ut as bm,wt as i_,x as o_,y as l_,z as ym,__tla as s_}from"./JsonOutput-B2v_Stn9.js";import{t as ys}from"./label-xHqFtfdz.js";import{g as jm,h as d_,i as Cm,l as c_,r as u_}from"./download-BaGnGHOq.js";import{n as p_,t as m_}from"./radio-group-PmOgsvro.js";import{a as js,i as ba,n as Cs,o as _s,r as Ss,t as gr}from"./tooltip-DTV9tlSr.js";import{n as ks,t as ze}from"./button-BbCh-29a.js";import{at as h_}from"./dist-BrR4M-k3.js";import{m as f_,o as g_,t as ir}from"./arrays-DYDL-3-i.js";import{n as Ns,t as x_}from"./once-DRroIaBz.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{n as zr,r as Mi,t as Ts}from"./strings-wdPMRf6Z.js";import{n as v_}from"./requests-DIwGYs0l.js";import{t as Bt}from"./createLucideIcon-D5guW7EU.js";import{A as w_,C as _m,D as b_,O as y_,S as j_,_ as C_,a as Sm,b as __,c as km,d as ya,f as Nm,g as S_,h as k_,i as As,k as N_,l as T_,m as Tm,n as A_,p as I_,r as xr,s as E_,t as R_,u as or,v as z_,y as M_}from"./spec-CPQR_o92.js";import{n as P_,r as F_,t as O_}from"./fileToBase64-DZfwJMrG.js";import{t as L_,__tla as V_}from"./LazyAnyLanguageCodeMirror-BEvXb3VX.js";import{i as D_,n as H_,o as B_}from"./useLifecycle-DieWOfXE.js";import{i as W_,n as $_,t as Am}from"./useBoolean-_e4hdH_M.js";import{r as Im,t as Pi}from"./x-C-6liIBr.js";import{t as Is}from"./chevron-right-CG5QYXYk.js";import{__tla as q_}from"./markdown-renderer-B1eFOa7V.js";import{t as U_}from"./code-xml-CZN6vNxu.js";import{t as Em}from"./copy-BwrPA9zQ.js";import{n as Y_}from"./file-headphone-BrQspHac.js";import{r as G_,t as K_}from"./file-icons-CIKQdTpO.js";import{a as Rm,c as pe,i as Q_,l as zm,n as Mm,o as X_,r as Z_,s as Pm,t as J_,u as eS}from"./form-PMq9H-I_.js";import{t as tS}from"./house-mGK3v0Mm.js";import{n as Fi,t as Oi}from"./spinner-Bhir8k53.js";import{i as rS,r as Fm,t as Es}from"./readonly-python-code-A3C9oCts.js";import{n as nS,t as Li}from"./types-W8WWuumF.js";import{t as Om}from"./plus-BgB18UzY.js";import{t as aS}from"./refresh-cw-DHwG4Mac.js";import{i as iS,n as oS,o as Lm,r as lS,t as Rs}from"./input-C3Hrdlqq.js";import{t as Vi}from"./square-function-uY_yJr5g.js";import{_ as lt,a as gt,c as ut,d as Jr,f as sS,g as Vm,h as dS,i as cS,l as ht,n as uS,o as ja,p as Dm,r as pS,t as mS,u as wt,v as lr}from"./textarea-DQ0XiNGe.js";import{a as hS,i as fS,r as gS,t as xS}from"./column-preview-CCTTw4tm.js";import{t as vS}from"./square-B5xWCt0a.js";import{t as wS}from"./trash-2-rVklqqFF.js";import{t as Di}from"./triangle-alert-D2p96PEF.js";import{n as Hm,t as bS}from"./es-DGgq-Wes.js";import{t as Ct}from"./preload-helper-BPPi7vOr.js";import"./dist-CBSMxaO_.js";import"./dist-CpTFpfm_.js";import"./dist-B1U1kGCR.js";import"./dist-ChF5Ln9c.js";import"./dist-CPczQFlJ.js";import{n as yS,t as Et}from"./use-toast-IPAtJGea.js";import{n as Bm,t as jS}from"./paths-D5zczhUD.js";import{l as CS,r as _S,s as SS}from"./session-0B5NBztP.js";import{r as In}from"./useTheme-CI2eq4XN.js";import"./purify.es-B9KxLTTS.js";import{n as kS,r as NS,t as TS}from"./dates-CTxr0EqQ.js";import{t as zs}from"./copy-icon-OjtDb4gO.js";import{n as AS,t as Mr}from"./context-QkTujrKn.js";import{t as IS}from"./useNumberFormatter-ByUv-u9o.js";import{t as qe}from"./RenderHTML-CP7UDK5X.js";import{n as ES,t as Wm}from"./useDebounce-7xZwVnnu.js";import{i as En,r as RS}from"./numbers-C3BAdHZE.js";import{t as zS}from"./ImperativeModal-B3Th7k4R.js";import"./share-DMwTZOTH.js";import{n as $m,r as qm,t as MS}from"./errors-vr57w7Ul.js";import{a as Um,n as PS,o as FS,r as OS,t as LS}from"./utils-DCL4n9wx.js";import"./vega-loader.browser-C8wT63Va.js";import"./defaultLocale-BLUna9fQ.js";import"./defaultLocale-DzliDDTm.js";import{a as VS}from"./react-icons.esm-BNzu6e7h.js";import{a as Ym,i as DS,n as Rn,t as HS}from"./events-CPoJAfgx.js";import{n as BS,r as Ms,t as Hi}from"./alert-yTS3WpF4.js";import{n as Ca,t as en}from"./error-banner-LdWZDbqd.js";import{__tla as WS}from"./chunk-5FQGJX7Z-D9iBG0F7.js";import"./html-to-image-CJxTFjQz.js";import{a as $S,o as qS}from"./focus-DjmSWsDI.js";import{n as Rt}from"./useAsyncData-bgszE9F0.js";import{a as Gm,i as Ps,n as Fs,o as zn,r as tn,t as Os}from"./table-BGPSHfig.js";import"./react-resizable-panels.browser.esm-CV8-hvjx.js";import{a as Km,c as US,o as YS,r as GS,s as KS,t as Qm,u as QS}from"./command-KARR7KMq.js";import{t as Xm}from"./renderShortcut-CcFk3m01.js";import{t as XS}from"./bundle.esm-DjhGJy4I.js";import{n as ZS}from"./icons-Ol38nIbL.js";import"./esm-CqWdmSnV.js";import{a as JS,i as ek,n as tk,o as rk,t as Zm}from"./components-BYC1jwIq.js";import{t as sr}from"./useDeepCompareMemoize-zUHU--0D.js";import{t as nk}from"./pathUtils-CJjndqMI.js";import{i as ak,n as ik,r as ok}from"./floating-outline-CEy7C9R6.js";Promise.all([(()=>{try{return bj}catch{}})(),(()=>{try{return Dj}catch{}})(),(()=>{try{return s_}catch{}})(),(()=>{try{return V_}catch{}})(),(()=>{try{return q_}catch{}})(),(()=>{try{return WS}catch{}})()]).then(async()=>{var yt,la,Ie,Le,xn,vn,wn,sa,Vt,Wi,Vs,Ds,Br,jt,da,Wr,bn,ca,yn,ua,wi,pa,bi,yi,ji,Ci,Tp;(function(){let t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(let n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(let a of n)if(a.type==="childList")for(let i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function e(n){let a={};return n.integrity&&(a.integrity=n.integrity),n.referrerPolicy&&(a.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?a.credentials="include":n.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(n){if(n.ep)return;n.ep=!0;let a=e(n);fetch(n.href,a)}})();var j=qr(H2(),1),Me=qr(Dp(),1),o=qr(dC(),1),zt="NavigationMenu",[Mn,Hs,Jm]=ms(zt),[$i,eh,th]=ms(zt),[qi,lk]=Zp(zt,[Jm,th]),[rh,Mt]=qi(zt),[nh,ah]=qi(zt),Bs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:i,delayDuration:l=200,skipDelayDuration:s=300,orientation:d="horizontal",dir:c,...u}=t,[p,m]=j.useState(null),f=Xt(e,N=>m(N)),g=tm(c),x=j.useRef(0),w=j.useRef(0),b=j.useRef(0),[v,y]=j.useState(!0),[S,C]=us({prop:n,onChange:N=>{let T=N!=="",A=s>0;T?(window.clearTimeout(b.current),A&&y(!1)):(window.clearTimeout(b.current),b.current=window.setTimeout(()=>y(!0),s)),a==null||a(N)},defaultProp:i??"",caller:zt}),_=j.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>C(""),150)},[C]),k=j.useCallback(N=>{window.clearTimeout(w.current),C(N)},[C]),h=j.useCallback(N=>{S===N?window.clearTimeout(w.current):x.current=window.setTimeout(()=>{window.clearTimeout(w.current),C(N)},l)},[S,C,l]);return j.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(w.current),window.clearTimeout(b.current)},[]),(0,o.jsx)(Ws,{scope:r,isRootMenu:!0,value:S,dir:g,orientation:d,rootNavigationMenu:p,onTriggerEnter:N=>{window.clearTimeout(x.current),v?h(N):k(N)},onTriggerLeave:()=>{window.clearTimeout(x.current),_()},onContentEnter:()=>window.clearTimeout(w.current),onContentLeave:_,onItemSelect:N=>{C(T=>T===N?"":N)},onItemDismiss:()=>C(""),children:(0,o.jsx)(vt.nav,{"aria-label":"Main","data-orientation":d,dir:g,...u,ref:f})})});Bs.displayName=zt;var Ui="NavigationMenuSub",ih=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:i,orientation:l="horizontal",...s}=t,d=Mt(Ui,r),[c,u]=us({prop:n,onChange:a,defaultProp:i??"",caller:Ui});return(0,o.jsx)(Ws,{scope:r,isRootMenu:!1,value:c,dir:d.dir,orientation:l,rootNavigationMenu:d.rootNavigationMenu,onTriggerEnter:p=>u(p),onItemSelect:p=>u(p),onItemDismiss:()=>u(""),children:(0,o.jsx)(vt.div,{"data-orientation":l,...s,ref:e})})});ih.displayName=Ui;var Ws=t=>{let{scope:e,isRootMenu:r,rootNavigationMenu:n,dir:a,orientation:i,children:l,value:s,onItemSelect:d,onItemDismiss:c,onTriggerEnter:u,onTriggerLeave:p,onContentEnter:m,onContentLeave:f}=t,[g,x]=j.useState(null),[w,b]=j.useState(new Map),[v,y]=j.useState(null);return(0,o.jsx)(rh,{scope:e,isRootMenu:r,rootNavigationMenu:n,value:s,previousValue:pm(s),baseId:Jp(),dir:a,orientation:i,viewport:g,onViewportChange:x,indicatorTrack:v,onIndicatorTrackChange:y,onTriggerEnter:Kr(u),onTriggerLeave:Kr(p),onContentEnter:Kr(m),onContentLeave:Kr(f),onItemSelect:Kr(d),onItemDismiss:Kr(c),onViewportContentChange:j.useCallback((S,C)=>{b(_=>(_.set(S,C),new Map(_)))},[]),onViewportContentRemove:j.useCallback(S=>{b(C=>C.has(S)?(C.delete(S),new Map(C)):C)},[]),children:(0,o.jsx)(Mn.Provider,{scope:e,children:(0,o.jsx)(nh,{scope:e,items:w,children:l})})})},$s="NavigationMenuList",qs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=Mt($s,r),i=(0,o.jsx)(vt.ul,{"data-orientation":a.orientation,...n,ref:e});return(0,o.jsx)(vt.div,{style:{position:"relative"},ref:a.onIndicatorTrackChange,children:(0,o.jsx)(Mn.Slot,{scope:r,children:a.isRootMenu?(0,o.jsx)(rd,{asChild:!0,children:i}):i})})});qs.displayName=$s;var Us="NavigationMenuItem",[oh,Ys]=qi(Us),Gs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,...a}=t,i=Jp(),l=n||i||"LEGACY_REACT_AUTO_VALUE",s=j.useRef(null),d=j.useRef(null),c=j.useRef(null),u=j.useRef(()=>{}),p=j.useRef(!1),m=j.useCallback((g="start")=>{if(s.current){u.current();let x=Qi(s.current);x.length&&Xi(g==="start"?x:x.reverse())}},[]),f=j.useCallback(()=>{if(s.current){let g=Qi(s.current);g.length&&(u.current=mh(g))}},[]);return(0,o.jsx)(oh,{scope:r,value:l,triggerRef:d,contentRef:s,focusProxyRef:c,wasEscapeCloseRef:p,onEntryKeyDown:m,onFocusProxyEnter:m,onRootContentClose:f,onContentFocusOutside:f,children:(0,o.jsx)(vt.li,{...a,ref:e})})});Gs.displayName=Us;var Yi="NavigationMenuTrigger",Ks=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,disabled:n,...a}=t,i=Mt(Yi,t.__scopeNavigationMenu),l=Ys(Yi,t.__scopeNavigationMenu),s=j.useRef(null),d=Xt(s,l.triggerRef,e),c=id(i.baseId,l.value),u=od(i.baseId,l.value),p=j.useRef(!1),m=j.useRef(!1),f=l.value===i.value;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Mn.ItemSlot,{scope:r,value:l.value,children:(0,o.jsx)(ad,{asChild:!0,children:(0,o.jsx)(vt.button,{id:c,disabled:n,"data-disabled":n?"":void 0,"data-state":Ji(f),"aria-expanded":f,"aria-controls":u,...a,ref:d,onPointerEnter:it(t.onPointerEnter,()=>{m.current=!1,l.wasEscapeCloseRef.current=!1}),onPointerMove:it(t.onPointerMove,Sa(()=>{n||m.current||l.wasEscapeCloseRef.current||p.current||(i.onTriggerEnter(l.value),p.current=!0)})),onPointerLeave:it(t.onPointerLeave,Sa(()=>{n||(i.onTriggerLeave(),p.current=!1)})),onClick:it(t.onClick,()=>{i.onItemSelect(l.value),m.current=f}),onKeyDown:it(t.onKeyDown,g=>{let x={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];f&&g.key===x&&(l.onEntryKeyDown(),g.preventDefault())})})})}),f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(hC,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:g=>{let x=l.contentRef.current,w=g.relatedTarget,b=w===s.current,v=x==null?void 0:x.contains(w);(b||!v)&&l.onFocusProxyEnter(b?"start":"end")}}),i.viewport&&(0,o.jsx)("span",{"aria-owns":u})]})]})});Ks.displayName=Yi;var lh="NavigationMenuLink",Qs="navigationMenu.linkSelect",Xs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,active:n,onSelect:a,...i}=t;return(0,o.jsx)(ad,{asChild:!0,children:(0,o.jsx)(vt.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...i,ref:e,onClick:it(t.onClick,l=>{let s=l.target,d=new CustomEvent(Qs,{bubbles:!0,cancelable:!0});s.addEventListener(Qs,c=>a==null?void 0:a(c),{once:!0}),em(s,d),!d.defaultPrevented&&!l.metaKey&&em(s,new CustomEvent(_a,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});Xs.displayName=lh;var Gi="NavigationMenuIndicator",Zs=j.forwardRef((t,e)=>{let{forceMount:r,...n}=t,a=Mt(Gi,t.__scopeNavigationMenu),i=!!a.value;return a.indicatorTrack?Me.createPortal((0,o.jsx)(Ii,{present:r||i,children:(0,o.jsx)(sh,{...n,ref:e})}),a.indicatorTrack):null});Zs.displayName=Gi;var sh=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=Mt(Gi,r),i=Hs(r),[l,s]=j.useState(null),[d,c]=j.useState(null),u=a.orientation==="horizontal",p=!!a.value;j.useEffect(()=>{var g;let f=(g=i().find(x=>x.value===a.value))==null?void 0:g.ref.current;f&&s(f)},[i,a.value]);let m=()=>{l&&c({size:u?l.offsetWidth:l.offsetHeight,offset:u?l.offsetLeft:l.offsetTop})};return Zi(l,m),Zi(a.indicatorTrack,m),d?(0,o.jsx)(vt.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":a.orientation,...n,ref:e,style:{position:"absolute",...u?{left:0,width:d.size+"px",transform:`translateX(${d.offset}px)`}:{top:0,height:d.size+"px",transform:`translateY(${d.offset}px)`},...n.style}}):null}),rn="NavigationMenuContent",Js=j.forwardRef((t,e)=>{let{forceMount:r,...n}=t,a=Mt(rn,t.__scopeNavigationMenu),i=Ys(rn,t.__scopeNavigationMenu),l=Xt(i.contentRef,e),s=i.value===a.value,d={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...n};return a.viewport?(0,o.jsx)(dh,{forceMount:r,...d,ref:l}):(0,o.jsx)(Ii,{present:r||s,children:(0,o.jsx)(ed,{"data-state":Ji(s),...d,ref:l,onPointerEnter:it(t.onPointerEnter,a.onContentEnter),onPointerLeave:it(t.onPointerLeave,Sa(a.onContentLeave)),style:{pointerEvents:!s&&a.isRootMenu?"none":void 0,...d.style}})})});Js.displayName=rn;var dh=j.forwardRef((t,e)=>{let{onViewportContentChange:r,onViewportContentRemove:n}=Mt(rn,t.__scopeNavigationMenu);return ps(()=>{r(t.value,{ref:e,...t})},[t,e,r]),ps(()=>()=>n(t.value),[t.value,n]),null}),_a="navigationMenu.rootContentDismiss",ed=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,triggerRef:a,focusProxyRef:i,wasEscapeCloseRef:l,onRootContentClose:s,onContentFocusOutside:d,...c}=t,u=Mt(rn,r),p=j.useRef(null),m=Xt(p,e),f=id(u.baseId,n),g=od(u.baseId,n),x=Hs(r),w=j.useRef(null),{onItemDismiss:b}=u;j.useEffect(()=>{let y=p.current;if(u.isRootMenu&&y){let S=()=>{var C;b(),s(),y.contains(document.activeElement)&&((C=a.current)==null||C.focus())};return y.addEventListener(_a,S),()=>y.removeEventListener(_a,S)}},[u.isRootMenu,t.value,a,b,s]);let v=j.useMemo(()=>{let y=x().map(N=>N.value);u.dir==="rtl"&&y.reverse();let S=y.indexOf(u.value),C=y.indexOf(u.previousValue),_=n===u.value,k=C===y.indexOf(n);if(!_&&!k)return w.current;let h=(()=>{if(S!==C){if(_&&C!==-1)return S>C?"from-end":"from-start";if(k&&S!==-1)return S>C?"to-start":"to-end"}return null})();return w.current=h,h},[u.previousValue,u.value,u.dir,x,n]);return(0,o.jsx)(rd,{asChild:!0,children:(0,o.jsx)(pC,{id:g,"aria-labelledby":f,"data-motion":v,"data-orientation":u.orientation,...c,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{var S;let y=new Event(_a,{bubbles:!0,cancelable:!0});(S=p.current)==null||S.dispatchEvent(y)},onFocusOutside:it(t.onFocusOutside,y=>{var C;d();let S=y.target;(C=u.rootNavigationMenu)!=null&&C.contains(S)&&y.preventDefault()}),onPointerDownOutside:it(t.onPointerDownOutside,y=>{var k;let S=y.target,C=x().some(h=>{var N;return(N=h.ref.current)==null?void 0:N.contains(S)}),_=u.isRootMenu&&((k=u.viewport)==null?void 0:k.contains(S));(C||_||!u.isRootMenu)&&y.preventDefault()}),onKeyDown:it(t.onKeyDown,y=>{var C;let S=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!S){let _=Qi(y.currentTarget),k=document.activeElement,h=_.findIndex(N=>N===k);Xi(y.shiftKey?_.slice(0,h).reverse():_.slice(h+1,_.length))?y.preventDefault():(C=i.current)==null||C.focus()}}),onEscapeKeyDown:it(t.onEscapeKeyDown,y=>{l.current=!0})})})}),Ki="NavigationMenuViewport",td=j.forwardRef((t,e)=>{let{forceMount:r,...n}=t,a=!!Mt(Ki,t.__scopeNavigationMenu).value;return(0,o.jsx)(Ii,{present:r||a,children:(0,o.jsx)(ch,{...n,ref:e})})});td.displayName=Ki;var ch=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,children:n,...a}=t,i=Mt(Ki,r),l=Xt(e,i.onViewportChange),s=ah(rn,t.__scopeNavigationMenu),[d,c]=j.useState(null),[u,p]=j.useState(null),m=d?(d==null?void 0:d.width)+"px":void 0,f=d?(d==null?void 0:d.height)+"px":void 0,g=!!i.value,x=g?i.value:i.previousValue;return Zi(u,()=>{u&&c({width:u.offsetWidth,height:u.offsetHeight})}),(0,o.jsx)(vt.div,{"data-state":Ji(g),"data-orientation":i.orientation,...a,ref:l,style:{pointerEvents:!g&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":m,"--radix-navigation-menu-viewport-height":f,...a.style},onPointerEnter:it(t.onPointerEnter,i.onContentEnter),onPointerLeave:it(t.onPointerLeave,Sa(i.onContentLeave)),children:Array.from(s.items).map(([w,{ref:b,forceMount:v,...y}])=>{let S=x===w;return(0,o.jsx)(Ii,{present:v||S,children:(0,o.jsx)(ed,{...y,ref:Hj(b,C=>{S&&C&&p(C)})})},w)})})}),uh="FocusGroup",rd=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=Mt(uh,r);return(0,o.jsx)($i.Provider,{scope:r,children:(0,o.jsx)($i.Slot,{scope:r,children:(0,o.jsx)(vt.div,{dir:a.dir,...n,ref:e})})})}),nd=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],ph="FocusGroupItem",ad=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=eh(r),i=Mt(ph,r);return(0,o.jsx)($i.ItemSlot,{scope:r,children:(0,o.jsx)(vt.button,{...n,ref:e,onKeyDown:it(t.onKeyDown,l=>{if(["Home","End",...nd].includes(l.key)){let s=a().map(d=>d.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(l.key)&&s.reverse(),nd.includes(l.key)){let d=s.indexOf(l.currentTarget);s=s.slice(d+1)}setTimeout(()=>Xi(s)),l.preventDefault()}})})})});function Qi(t){let e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Xi(t){let e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}function mh(t){return t.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{t.forEach(e=>{let r=e.dataset.tabindex;e.setAttribute("tabindex",r)})}}function Zi(t,e){let r=Kr(e);ps(()=>{let n=0;if(t){let a=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return a.observe(t),()=>{window.cancelAnimationFrame(n),a.unobserve(t)}}},[t,r])}function Ji(t){return t?"open":"closed"}function id(t,e){return`${t}-trigger-${e}`}function od(t,e){return`${t}-content-${e}`}function Sa(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ld=Bs,sd=qs,hh=Gs,dd=Ks,fh=Xs,cd=Zs,ud=Js,pd=td,gh=D2({Range:()=>co,Root:()=>Na,Slider:()=>to,SliderRange:()=>ao,SliderThumb:()=>oo,SliderTrack:()=>ro,Thumb:()=>Ta,Track:()=>so,createSliderScope:()=>wh},1),md=["PageUp","PageDown"],hd=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fd={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},nn="Slider",[eo,xh,vh]=ms(nn),[gd,wh]=Zp(nn,[vh]),[bh,ka]=gd(nn),to=j.forwardRef((t,e)=>{let{name:r,min:n=0,max:a=100,step:i=1,orientation:l="horizontal",disabled:s=!1,minStepsBetweenThumbs:d=0,defaultValue:c=[n],value:u,onValueChange:p=()=>{},onValueCommit:m=()=>{},inverted:f=!1,form:g,...x}=t,w=j.useRef(new Set),b=j.useRef(0),v=l==="horizontal"?yh:jh,[y=[],S]=us({prop:u,defaultProp:c,onChange:T=>{var A;(A=[...w.current][b.current])==null||A.focus(),p(T)}}),C=j.useRef(y);function _(T){N(T,Nh(y,T))}function k(T){N(T,b.current)}function h(){let T=C.current[b.current];y[b.current]!==T&&m(y)}function N(T,A,{commit:R}={commit:!1}){let z=Eh(i),E=mm(Rh(Math.round((T-n)/i)*i+n,z),[n,a]);S((M=[])=>{let P=Sh(M,E,A);if(Ih(P,d*i)){b.current=P.indexOf(E);let O=String(P)!==String(M);return O&&R&&m(P),O?P:M}else return M})}return(0,o.jsx)(bh,{scope:t.__scopeSlider,name:r,disabled:s,min:n,max:a,valueIndexToChangeRef:b,thumbs:w.current,values:y,orientation:l,form:g,children:(0,o.jsx)(eo.Provider,{scope:t.__scopeSlider,children:(0,o.jsx)(eo.Slot,{scope:t.__scopeSlider,children:(0,o.jsx)(v,{"aria-disabled":s,"data-disabled":s?"":void 0,...x,ref:e,onPointerDown:it(x.onPointerDown,()=>{s||(C.current=y)}),min:n,max:a,inverted:f,onSlideStart:s?void 0:_,onSlideMove:s?void 0:k,onSlideEnd:s?void 0:h,onHomeKeyDown:()=>!s&&N(n,0,{commit:!0}),onEndKeyDown:()=>!s&&N(a,y.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:A})=>{if(!s){let R=md.includes(T.key)||T.shiftKey&&hd.includes(T.key)?10:1,z=b.current,E=y[z];N(E+i*R*A,z,{commit:!0})}}})})})})});to.displayName=nn;var[xd,vd]=gd(nn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),yh=j.forwardRef((t,e)=>{let{min:r,max:n,dir:a,inverted:i,onSlideStart:l,onSlideMove:s,onSlideEnd:d,onStepKeyDown:c,...u}=t,[p,m]=j.useState(null),f=Xt(e,y=>m(y)),g=j.useRef(void 0),x=tm(a),w=x==="ltr",b=w&&!i||!w&&i;function v(y){let S=g.current||p.getBoundingClientRect(),C=lo([0,S.width],b?[r,n]:[n,r]);return g.current=S,C(y-S.left)}return(0,o.jsx)(xd,{scope:t.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,o.jsx)(wd,{dir:x,"data-orientation":"horizontal",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{let S=v(y.clientX);l==null||l(S)},onSlideMove:y=>{let S=v(y.clientX);s==null||s(S)},onSlideEnd:()=>{g.current=void 0,d==null||d()},onStepKeyDown:y=>{let S=fd[b?"from-left":"from-right"].includes(y.key);c==null||c({event:y,direction:S?-1:1})}})})}),jh=j.forwardRef((t,e)=>{let{min:r,max:n,inverted:a,onSlideStart:i,onSlideMove:l,onSlideEnd:s,onStepKeyDown:d,...c}=t,u=j.useRef(null),p=Xt(e,u),m=j.useRef(void 0),f=!a;function g(x){let w=m.current||u.current.getBoundingClientRect(),b=lo([0,w.height],f?[n,r]:[r,n]);return m.current=w,b(x-w.top)}return(0,o.jsx)(xd,{scope:t.__scopeSlider,startEdge:f?"bottom":"top",endEdge:f?"top":"bottom",size:"height",direction:f?1:-1,children:(0,o.jsx)(wd,{"data-orientation":"vertical",...c,ref:p,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:x=>{let w=g(x.clientY);i==null||i(w)},onSlideMove:x=>{let w=g(x.clientY);l==null||l(w)},onSlideEnd:()=>{m.current=void 0,s==null||s()},onStepKeyDown:x=>{let w=fd[f?"from-bottom":"from-top"].includes(x.key);d==null||d({event:x,direction:w?-1:1})}})})}),wd=j.forwardRef((t,e)=>{let{__scopeSlider:r,onSlideStart:n,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:l,onEndKeyDown:s,onStepKeyDown:d,...c}=t,u=ka(nn,r);return(0,o.jsx)(vt.span,{...c,ref:e,onKeyDown:it(t.onKeyDown,p=>{p.key==="Home"?(l(p),p.preventDefault()):p.key==="End"?(s(p),p.preventDefault()):md.concat(hd).includes(p.key)&&(d(p),p.preventDefault())}),onPointerDown:it(t.onPointerDown,p=>{let m=p.target;m.setPointerCapture(p.pointerId),p.preventDefault(),u.thumbs.has(m)?m.focus():n(p)}),onPointerMove:it(t.onPointerMove,p=>{p.target.hasPointerCapture(p.pointerId)&&a(p)}),onPointerUp:it(t.onPointerUp,p=>{let m=p.target;m.hasPointerCapture(p.pointerId)&&(m.releasePointerCapture(p.pointerId),i(p))})})}),bd="SliderTrack",ro=j.forwardRef((t,e)=>{let{__scopeSlider:r,...n}=t,a=ka(bd,r);return(0,o.jsx)(vt.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...n,ref:e})});ro.displayName=bd;var no="SliderRange",ao=j.forwardRef((t,e)=>{let{__scopeSlider:r,...n}=t,a=ka(no,r),i=vd(no,r),l=Xt(e,j.useRef(null)),s=a.values.length,d=a.values.map(p=>jd(p,a.min,a.max)),c=s>1?Math.min(...d):0,u=100-Math.max(...d);return(0,o.jsx)(vt.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...n,ref:l,style:{...t.style,[i.startEdge]:c+"%",[i.endEdge]:u+"%"}})});ao.displayName=no;var io="SliderThumb",oo=j.forwardRef((t,e)=>{let r=xh(t.__scopeSlider),[n,a]=j.useState(null),i=Xt(e,s=>a(s)),l=j.useMemo(()=>n?r().findIndex(s=>s.ref.current===n):-1,[r,n]);return(0,o.jsx)(Ch,{...t,ref:i,index:l})}),Ch=j.forwardRef((t,e)=>{let{__scopeSlider:r,index:n,name:a,...i}=t,l=ka(io,r),s=vd(io,r),[d,c]=j.useState(null),u=Xt(e,v=>c(v)),p=d?l.form||!!d.closest("form"):!0,m=mC(d),f=l.values[n],g=f===void 0?0:jd(f,l.min,l.max),x=kh(n,l.values.length),w=m==null?void 0:m[s.size],b=w?Th(w,g,s.direction):0;return j.useEffect(()=>{if(d)return l.thumbs.add(d),()=>{l.thumbs.delete(d)}},[d,l.thumbs]),(0,o.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${b}px)`},children:[(0,o.jsx)(eo.ItemSlot,{scope:t.__scopeSlider,children:(0,o.jsx)(vt.span,{role:"slider","aria-label":t["aria-label"]||x,"aria-valuemin":l.min,"aria-valuenow":f,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:u,style:f===void 0?{display:"none"}:t.style,onFocus:it(t.onFocus,()=>{l.valueIndexToChangeRef.current=n})})}),p&&(0,o.jsx)(yd,{name:a??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:f},n)]})});oo.displayName=io;var _h="RadioBubbleInput",yd=j.forwardRef(({__scopeSlider:t,value:e,...r},n)=>{let a=j.useRef(null),i=Xt(a,n),l=pm(e);return j.useEffect(()=>{let s=a.current;if(!s)return;let d=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==e&&c){let u=new Event("input",{bubbles:!0});c.call(s,e),s.dispatchEvent(u)}},[l,e]),(0,o.jsx)(vt.input,{style:{display:"none"},...r,ref:i,defaultValue:e})});yd.displayName=_h;function Sh(t=[],e,r){let n=[...t];return n[r]=e,n.sort((a,i)=>a-i)}function jd(t,e,r){return mm(100/(r-e)*(t-e),[0,100])}function kh(t,e){if(e>2)return`Value ${t+1} of ${e}`;if(e===2)return["Minimum","Maximum"][t]}function Nh(t,e){if(t.length===1)return 0;let r=t.map(a=>Math.abs(a-e)),n=Math.min(...r);return r.indexOf(n)}function Th(t,e,r){let n=t/2;return(n-lo([0,50],[0,n])(e)*r)*r}function Ah(t){return t.slice(0,-1).map((e,r)=>t[r+1]-e)}function Ih(t,e){if(e>0){let r=Ah(t);return Math.min(...r)>=e}return!0}function lo(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];let n=(e[1]-e[0])/(t[1]-t[0]);return e[0]+n*(r-t[0])}}function Eh(t){return(String(t).split(".")[1]||"").length}function Rh(t,e){let r=10**e;return Math.round(t*r)/r}var Na=to,so=ro,co=ao,Ta=oo,zh=Bt("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]),Mh=Bt("arrow-up-wide-narrow",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h4",key:"1krc32"}]]),Ph=Bt("binary",[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]]),Fh=Bt("brackets",[["path",{d:"M16 3h3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-3",key:"1kt8lf"}],["path",{d:"M8 21H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h3",key:"gduv9"}]]),Oh=Bt("combine",[["path",{d:"M14 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1",key:"1l7d7l"}],["path",{d:"M19 3a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1",key:"9955pe"}],["path",{d:"m7 15 3 3",key:"4hkfgk"}],["path",{d:"m7 21 3-3H5a2 2 0 0 1-2-2v-2",key:"1xljwe"}],["rect",{x:"14",y:"14",width:"7",height:"7",rx:"1",key:"1cdgtw"}],["rect",{x:"3",y:"3",width:"7",height:"7",rx:"1",key:"zi3rio"}]]),Lh=Bt("copy-slash",[["line",{x1:"12",x2:"18",y1:"18",y2:"12",key:"ebkxgr"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Vh=Bt("corner-left-up",[["path",{d:"M14 9 9 4 4 9",key:"1af5af"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]),Dh=Bt("group",[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]]),Hh=Bt("shuffle",[["path",{d:"m18 14 4 4-4 4",key:"10pe0f"}],["path",{d:"m18 2 4 4-4 4",key:"pucp1d"}],["path",{d:"M2 18h1.973a4 4 0 0 0 3.3-1.7l5.454-8.6a4 4 0 0 1 3.3-1.7H22",key:"1ailkh"}],["path",{d:"M2 6h1.972a4 4 0 0 1 3.6 2.2",key:"km57vx"}],["path",{d:"M22 18h-6.041a4 4 0 0 1-3.3-1.8l-.359-.45",key:"os18l9"}]]),Cd=Bt("square-dashed-mouse-pointer",[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h2",key:"1qve2z"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v2",key:"p14lih"}],["path",{d:"M3 14v1",key:"vnatye"}]]),Bh=Bt("square-mouse-pointer",[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]]),_d=Bt("triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]),Wh=qr(Pp(),1);const vr={INSERT:"insert",DELETE:"delete",SUBSTITUTE:"substitute",MATCH:"match"};function $h(t,e,r){let n=t.length,a=e.length,i=Array.from({length:n+1},()=>Array.from({length:a+1}).fill(0));for(let c=0;c<=n;c++)i[c][0]=c;for(let c=0;c<=a;c++)i[0][c]=c;for(let c=1;c<=n;c++)for(let u=1;u<=a;u++)i[c][u]=r(t[c-1],e[u-1])?i[c-1][u-1]:1+Math.min(i[c-1][u],i[c][u-1],i[c-1][u-1]);let l=[],s=n,d=a;for(;s>0||d>0;)s>0&&d>0&&r(t[s-1],e[d-1])?(l.unshift({type:vr.MATCH,position:s-1}),s--,d--):s>0&&d>0&&i[s][d]===i[s-1][d-1]+1?(l.unshift({type:vr.SUBSTITUTE,position:s-1}),s--,d--):s>0&&i[s][d]===i[s-1][d]+1?(l.unshift({type:vr.DELETE,position:s-1}),s--):d>0&&i[s][d]===i[s][d-1]+1&&(l.unshift({type:vr.INSERT,position:s}),d--);return{distance:i[n][a],operations:l}}function qh(t,e,r){let n=[],a=0;for(let i of e)switch(i.type){case vr.MATCH:n.push(t[a]),a++;break;case vr.DELETE:a++;break;case vr.INSERT:n.push(r);break;case vr.SUBSTITUTE:n.push(r),a++;break}return n}function Uh(t,e,r,n){let a=$h(t,e,r);return{merged:qh(t,a.operations,n),edits:a}}var Aa=0,Ia="";function uo(t){return t.id?t.id:t.name==="setup"?Q2:ts.create()}function Yh(t,e){let r=new Map,n=new Map;if(!t&&!e)return{cellIds:[],sessionCellData:r,notebookCellData:n};if(!t){let s=(e==null?void 0:e.cells.map(d=>uo(d)))||[];return{cellIds:s,sessionCellData:new Map(s.map((d,c)=>[d,null])),notebookCellData:new Map(s.map((d,c)=>[d,(e==null?void 0:e.cells[c])||Sd()]))}}if(!e){let s=t.cells.map(d=>uo(d));return{cellIds:s,sessionCellData:new Map(s.map((d,c)=>[d,t.cells[c]])),notebookCellData:new Map(s.map(d=>[d,Sd()]))}}let{merged:a,edits:i}=Uh(t.cells,e.cells,(s,d)=>{let c=s.code_hash;return c?d.code_hash===c:!1},kd());i.distance>0&&ue.warn("Session and notebook have different cells, attempted merge.");let l=[];for(let s=0;s<e.cells.length;s++){let d=e.cells[s];if(d){let c=uo(d);l.push(c);let u=a[s]||kd();u.id=c,r.set(c,u),n.set(c,d)}else ue.warn("Merged notebook cell is null at index",s)}return{cellIds:l,sessionCellData:r,notebookCellData:n}}function Sd(){return{id:ts.create(),name:Ia,code:Ia,code_hash:null,config:{column:null,disabled:!1,hide_code:!1}}}function kd(){return{id:ts.create(),code_hash:null,console:[],outputs:[]}}function Gh(t,e){var r,n,a;return{id:t,name:e.name??Ia,code:e.code??Ia,edited:!1,lastCodeRun:null,lastExecutionTime:null,config:{column:((r=e.config)==null?void 0:r.column)??null,disabled:((n=e.config)==null?void 0:n.disabled)??!1,hide_code:((a=e.config)==null?void 0:a.hide_code)??!1},serializedEditorState:null}}function Kh(t){let e=wj();if(!t)return e;let r=t.outputs||[],n=r.find(i=>i.type==="data")||r.find(i=>i.type==="error")||r[0];if(n){if(n.type==="error")e.output={channel:"marimo-error",data:[{type:"unknown",msg:n.evalue}],mimetype:"application/vnd.marimo+error",timestamp:Aa};else if(n.type==="data"){let i=Object.keys(n.data)[0];e.output={channel:"output",data:Object.values(n.data)[0],mimetype:i,timestamp:Aa}}}let a=t.console||[];return{...e,outline:e.output?vj(e.output):null,consoleOutputs:a.map(i=>i.type==="streamMedia"?{channel:"media",data:i.data,mimetype:i.mimetype,timestamp:Aa}:{channel:i.name==="stderr"?"stderr":"stdout",data:i.text,mimetype:i.mimetype??"text/plain",timestamp:Aa})}}function Qh(t,e){let{cellIds:r,sessionCellData:n,notebookCellData:a}=Yh(t,e);if(r.length===0)return null;let i={},l={};for(let s of r){let d=n.get(s),c=a.get(s);c&&(i[s]=Gh(s,c)),l[s]=Kh(d)}return{cellIds:cj.from([r]),cellData:i,cellRuntime:l,cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set}}var Xh=ee(),Nd=Object.freeze({left:0,top:0,width:16,height:16}),Ea=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Pn=Object.freeze({...Nd,...Ea}),po=Object.freeze({...Pn,body:"",hidden:!1}),Zh=Object.freeze({width:null,height:null}),Td=Object.freeze({...Zh,...Ea});function Jh(t,e=0){let r=t.replace(/^-?[0-9.]*/,"");function n(a){for(;a<0;)a+=4;return a%4}if(r===""){let a=parseInt(t);return isNaN(a)?0:n(a)}else if(r!==t){let a=0;switch(r){case"%":a=25;break;case"deg":a=90}if(a){let i=parseFloat(t.slice(0,t.length-r.length));return isNaN(i)?0:(i/=a,i%1==0?n(i):0)}}return e}var ef=/[\s,]+/;function tf(t,e){e.split(ef).forEach(r=>{switch(r.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}var Ad={...Td,preserveAspectRatio:""};function Id(t){let e={...Ad},r=(n,a)=>t.getAttribute(n)||a;return e.width=r("width",null),e.height=r("height",null),e.rotate=Jh(r("rotate","")),tf(e,r("flip","")),e.preserveAspectRatio=r("preserveAspectRatio",r("preserveaspectratio","")),e}function rf(t,e){for(let r in Ad)if(t[r]!==e[r])return!0;return!1}var Ed=/^[a-z0-9]+(-[a-z0-9]+)*$/,Fn=(t,e,r,n="")=>{let a=t.split(":");if(t.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){let s=a.pop(),d=a.pop(),c={provider:a.length>0?a[0]:n,prefix:d,name:s};return e&&!Ra(c)?null:c}let i=a[0],l=i.split("-");if(l.length>1){let s={provider:n,prefix:l.shift(),name:l.join("-")};return e&&!Ra(s)?null:s}if(r&&n===""){let s={provider:n,prefix:"",name:i};return e&&!Ra(s,r)?null:s}return null},Ra=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function nf(t,e){let r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);let n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function Rd(t,e){let r=nf(t,e);for(let n in po)n in Ea?n in t&&!(n in r)&&(r[n]=Ea[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function af(t,e){let r=t.icons,n=t.aliases||Object.create(null),a=Object.create(null);function i(l){if(r[l])return a[l]=[];if(!(l in a)){a[l]=null;let s=n[l]&&n[l].parent,d=s&&i(s);d&&(a[l]=[s].concat(d))}return a[l]}return Object.keys(r).concat(Object.keys(n)).forEach(i),a}function of(t,e,r){let n=t.icons,a=t.aliases||Object.create(null),i={};function l(s){i=Rd(n[s]||a[s],i)}return l(e),r.forEach(l),Rd(t,i)}function zd(t,e){let r=[];if(typeof t!="object"||typeof t.icons!="object")return r;t.not_found instanceof Array&&t.not_found.forEach(a=>{e(a,null),r.push(a)});let n=af(t);for(let a in n){let i=n[a];i&&(e(a,of(t,a,i)),r.push(a))}return r}var lf={provider:"",aliases:{},not_found:{},...Nd};function mo(t,e){for(let r in e)if(r in t&&typeof t[r]!=typeof e[r])return!1;return!0}function Md(t){if(typeof t!="object"||!t)return null;let e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!mo(t,lf))return null;let r=e.icons;for(let a in r){let i=r[a];if(!a||typeof i.body!="string"||!mo(i,po))return null}let n=e.aliases||Object.create(null);for(let a in n){let i=n[a],l=i.parent;if(!a||typeof l!="string"||!r[l]&&!n[l]||!mo(i,po))return null}return e}var za=Object.create(null);function sf(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function dr(t,e){let r=za[t]||(za[t]=Object.create(null));return r[e]||(r[e]=sf(t,e))}function Pd(t,e){return Md(e)?zd(e,(r,n)=>{n?t.icons[r]=n:t.missing.add(r)}):[]}function df(t,e,r){try{if(typeof r.body=="string")return t.icons[e]={...r},!0}catch{}return!1}function cf(t,e){let r=[];return(typeof t=="string"?[t]:Object.keys(za)).forEach(n=>{(typeof n=="string"&&typeof e=="string"?[e]:Object.keys(za[n]||{})).forEach(a=>{let i=dr(n,a);r=r.concat(Object.keys(i.icons).map(l=>(n===""?"":"@"+n+":")+a+":"+l))})}),r}var On=!1;function Fd(t){return typeof t=="boolean"&&(On=t),On}function Ln(t){let e=typeof t=="string"?Fn(t,!0,On):t;if(e){let r=dr(e.provider,e.prefix),n=e.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function Od(t,e){let r=Fn(t,!0,On);if(!r)return!1;let n=dr(r.provider,r.prefix);return e?df(n,r.name,e):(n.missing.add(r.name),!0)}function Ld(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),On&&!e&&!t.prefix){let n=!1;return Md(t)&&(t.prefix="",zd(t,(a,i)=>{Od(a,i)&&(n=!0)})),n}let r=t.prefix;return Ra({provider:e,prefix:r,name:"a"})?!!Pd(dr(e,r),t):!1}function Vd(t){return!!Ln(t)}function uf(t){let e=Ln(t);return e&&{...Pn,...e}}function pf(t){let e={loaded:[],missing:[],pending:[]},r=Object.create(null);t.sort((a,i)=>a.provider===i.provider?a.prefix===i.prefix?a.name.localeCompare(i.name):a.prefix.localeCompare(i.prefix):a.provider.localeCompare(i.provider));let n={provider:"",prefix:"",name:""};return t.forEach(a=>{if(n.name===a.name&&n.prefix===a.prefix&&n.provider===a.provider)return;n=a;let i=a.provider,l=a.prefix,s=a.name,d=r[i]||(r[i]=Object.create(null)),c=d[l]||(d[l]=dr(i,l)),u;u=s in c.icons?e.loaded:l===""||c.missing.has(s)?e.missing:e.pending;let p={provider:i,prefix:l,name:s};u.push(p)}),e}function Dd(t,e){t.forEach(r=>{let n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(a=>a.id!==e))})}function mf(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;let e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let r=!1,n=t.provider,a=t.prefix;e.forEach(i=>{let l=i.icons,s=l.pending.length;l.pending=l.pending.filter(d=>{if(d.prefix!==a)return!0;let c=d.name;if(t.icons[c])l.loaded.push({provider:n,prefix:a,name:c});else if(t.missing.has(c))l.missing.push({provider:n,prefix:a,name:c});else return r=!0,!0;return!1}),l.pending.length!==s&&(r||Dd([t],i.id),i.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),i.abort))})}))}var hf=0;function ff(t,e,r){let n=hf++,a=Dd.bind(null,r,n);if(!e.pending.length)return a;let i={id:n,icons:e,callback:t,abort:a};return r.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(i)}),a}var ho=Object.create(null);function Hd(t,e){ho[t]=e}function fo(t){return ho[t]||ho[""]}function gf(t,e=!0,r=!1){let n=[];return t.forEach(a=>{let i=typeof a=="string"?Fn(a,e,r):a;i&&n.push(i)}),n}var xf={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function vf(t,e,r,n){let a=t.resources.length,i=t.random?Math.floor(Math.random()*a):t.index,l;if(t.random){let _=t.resources.slice(0);for(l=[];_.length>1;){let k=Math.floor(Math.random()*_.length);l.push(_[k]),_=_.slice(0,k).concat(_.slice(k+1))}l=l.concat(_)}else l=t.resources.slice(i).concat(t.resources.slice(0,i));let s=Date.now(),d="pending",c=0,u,p=null,m=[],f=[];typeof n=="function"&&f.push(n);function g(){p&&(p=(clearTimeout(p),null))}function x(){d==="pending"&&(d="aborted"),g(),m.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),m=[]}function w(_,k){k&&(f=[]),typeof _=="function"&&f.push(_)}function b(){return{startTime:s,payload:e,status:d,queriesSent:c,queriesPending:m.length,subscribe:w,abort:x}}function v(){d="failed",f.forEach(_=>{_(void 0,u)})}function y(){m.forEach(_=>{_.status==="pending"&&(_.status="aborted")}),m=[]}function S(_,k,h){let N=k!=="success";switch(m=m.filter(T=>T!==_),d){case"pending":break;case"failed":if(N||!t.dataAfterTimeout)return;break;default:return}if(k==="abort"){u=h,v();return}if(N){u=h,m.length||(l.length?C():v());return}if(g(),y(),!t.random){let T=t.resources.indexOf(_.resource);T!==-1&&T!==t.index&&(t.index=T)}d="completed",f.forEach(T=>{T(h)})}function C(){if(d!=="pending")return;g();let _=l.shift();if(_===void 0){if(m.length){p=setTimeout(()=>{g(),d==="pending"&&(y(),v())},t.timeout);return}v();return}let k={status:"pending",resource:_,callback:(h,N)=>{S(k,h,N)}};m.push(k),c++,p=setTimeout(C,t.rotate),r(_,e,k.callback)}return setTimeout(C),b}function Bd(t){let e={...xf,...t},r=[];function n(){r=r.filter(l=>l().status==="pending")}function a(l,s,d){let c=vf(e,l,s,(u,p)=>{n(),d&&d(u,p)});return r.push(c),c}function i(l){return r.find(s=>l(s))||null}return{query:a,find:i,setIndex:l=>{e.index=l},getIndex:()=>e.index,cleanup:n}}function go(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}for(var Ma=Object.create(null),Pa=["https://api.simplesvg.com","https://api.unisvg.com"],xo=[];Pa.length>0;)Pa.length===1||Math.random()>.5?xo.push(Pa.shift()):xo.push(Pa.pop());Ma[""]=go({resources:["https://api.iconify.design"].concat(xo)});function Wd(t,e){let r=go(e);return r===null?!1:(Ma[t]=r,!0)}function Fa(t){return Ma[t]}function wf(){return Object.keys(Ma)}function $d(){}var vo=Object.create(null);function bf(t){if(!vo[t]){let e=Fa(t);if(!e)return;vo[t]={config:e,redundancy:Bd(e)}}return vo[t]}function qd(t,e,r){let n,a;if(typeof t=="string"){let i=fo(t);if(!i)return r(void 0,424),$d;a=i.send;let l=bf(t);l&&(n=l.redundancy)}else{let i=go(t);if(i){n=Bd(i);let l=fo(t.resources?t.resources[0]:"");l&&(a=l.send)}}return!n||!a?(r(void 0,424),$d):n.query(e,a,r)().abort}function Ud(){}function yf(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,mf(t)}))}function jf(t){let e=[],r=[];return t.forEach(n=>{(n.match(Ed)?e:r).push(n)}),{valid:e,invalid:r}}function Vn(t,e,r){function n(){let a=t.pendingIcons;e.forEach(i=>{a&&a.delete(i),t.icons[i]||t.missing.add(i)})}if(r&&typeof r=="object")try{if(!Pd(t,r).length){n();return}}catch(a){console.error(a)}n(),yf(t)}function Yd(t,e){t instanceof Promise?t.then(r=>{e(r)}).catch(()=>{e(null)}):e(t)}function Cf(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;let{provider:r,prefix:n}=t,a=t.iconsToLoad;if(delete t.iconsToLoad,!a||!a.length)return;let i=t.loadIcon;if(t.loadIcons&&(a.length>1||!i)){Yd(t.loadIcons(a,n,r),c=>{Vn(t,a,c)});return}if(i){a.forEach(c=>{Yd(i(c,n,r),u=>{Vn(t,[c],u?{prefix:n,icons:{[c]:u}}:null)})});return}let{valid:l,invalid:s}=jf(a);if(s.length&&Vn(t,s,null),!l.length)return;let d=n.match(Ed)?fo(r):null;if(!d){Vn(t,l,null);return}d.prepare(r,n,l).forEach(c=>{qd(r,c,u=>{Vn(t,c.icons,u)})})}))}var wo=(t,e)=>{let r=pf(gf(t,!0,Fd()));if(!r.pending.length){let s=!0;return e&&setTimeout(()=>{s&&e(r.loaded,r.missing,r.pending,Ud)}),()=>{s=!1}}let n=Object.create(null),a=[],i,l;return r.pending.forEach(s=>{let{provider:d,prefix:c}=s;if(c===l&&d===i)return;i=d,l=c,a.push(dr(d,c));let u=n[d]||(n[d]=Object.create(null));u[c]||(u[c]=[])}),r.pending.forEach(s=>{let{provider:d,prefix:c,name:u}=s,p=dr(d,c),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(u)||(m.add(u),n[d][c].push(u))}),a.forEach(s=>{let d=n[s.provider][s.prefix];d.length&&Cf(s,d)}),e?ff(e,r,a):Ud},_f=t=>new Promise((e,r)=>{let n=typeof t=="string"?Fn(t,!0):t;if(!n){r(t);return}wo([n||t],a=>{if(a.length&&n){let i=Ln(n);if(i){e({...Pn,...i});return}}r(t)})});function Gd(t){try{let e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function Sf(t,e){if(typeof t=="object")return{data:Gd(t),value:t};if(typeof t!="string")return{value:t};if(t.includes("{")){let a=Gd(t);if(a)return{data:a,value:t}}let r=Fn(t,!0,!0);if(!r)return{value:t};let n=Ln(r);return n!==void 0||!r.prefix?{value:t,name:r,data:n}:{value:t,name:r,loading:wo([r],()=>e(t,r,Ln(r)))}}var Kd=!1;try{Kd=navigator.vendor.indexOf("Apple")===0}catch{}function kf(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(Kd||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}var Nf=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Tf=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function bo(t,e,r){if(e===1)return t;if(r||(r=100),typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;let n=t.split(Nf);if(n===null||!n.length)return t;let a=[],i=n.shift(),l=Tf.test(i);for(;;){if(l){let s=parseFloat(i);isNaN(s)?a.push(i):a.push(Math.ceil(s*e*r)/r)}else a.push(i);if(i=n.shift(),i===void 0)return a.join("");l=!l}}function Af(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;n>=0;){let a=t.indexOf(">",n),i=t.indexOf("</"+e);if(a===-1||i===-1)break;let l=t.indexOf(">",i);if(l===-1)break;r+=t.slice(a+1,i).trim(),t=t.slice(0,n).trim()+t.slice(l+1)}return{defs:r,content:t}}function If(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Ef(t,e,r){let n=Af(t);return If(n.defs,e+n.content+r)}var Rf=t=>t==="unset"||t==="undefined"||t==="none";function Qd(t,e){let r={...Pn,...t},n={...Td,...e},a={left:r.left,top:r.top,width:r.width,height:r.height},i=r.body;[r,n].forEach(x=>{let w=[],b=x.hFlip,v=x.vFlip,y=x.rotate;b?v?y+=2:(w.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),w.push("scale(-1 1)"),a.top=a.left=0):v&&(w.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),w.push("scale(1 -1)"),a.top=a.left=0);let S;switch(y<0&&(y-=Math.floor(y/4)*4),y%=4,y){case 1:S=a.height/2+a.top,w.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:w.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:S=a.width/2+a.left,w.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}y%2==1&&(a.left!==a.top&&(S=a.left,a.left=a.top,a.top=S),a.width!==a.height&&(S=a.width,a.width=a.height,a.height=S)),w.length&&(i=Ef(i,'<g transform="'+w.join(" ")+'">',"</g>"))});let l=n.width,s=n.height,d=a.width,c=a.height,u,p;l===null?(p=s===null?"1em":s==="auto"?c:s,u=bo(p,d/c)):(u=l==="auto"?d:l,p=s===null?bo(u,c/d):s==="auto"?c:s);let m={},f=(x,w)=>{Rf(w)||(m[x]=w.toString())};f("width",u),f("height",p);let g=[a.left,a.top,d,c];return m.viewBox=g.join(" "),{attributes:m,viewBox:g,body:i}}function yo(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}function zf(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mf(t){return"data:image/svg+xml,"+zf(t)}function Xd(t){return'url("'+Mf(t)+'")'}var Oa=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function Pf(t){Oa=t}function Ff(){return Oa}function Of(t,e){let r=Fa(t);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let a=0;r.resources.forEach(l=>{a=Math.max(a,l.length)});let i=e+".json?icons=";n=r.maxURL-a-r.path.length-i.length}return n}function Lf(t){return t===404}var Vf=(t,e,r)=>{let n=[],a=Of(t,e),i="icons",l={type:i,provider:t,prefix:e,icons:[]},s=0;return r.forEach((d,c)=>{s+=d.length+1,s>=a&&c>0&&(n.push(l),l={type:i,provider:t,prefix:e,icons:[]},s=d.length),l.icons.push(d)}),n.push(l),n};function Df(t){if(typeof t=="string"){let e=Fa(t);if(e)return e.path}return"/"}var Hf={prepare:Vf,send:(t,e,r)=>{if(!Oa){r("abort",424);return}let n=Df(e.provider);switch(e.type){case"icons":{let i=e.prefix,l=e.icons.join(","),s=new URLSearchParams({icons:l});n+=i+".json?"+s.toString();break}case"custom":{let i=e.uri;n+=i.slice(0,1)==="/"?i.slice(1):i;break}default:r("abort",400);return}let a=503;Oa(t+n).then(i=>{let l=i.status;if(l!==200){setTimeout(()=>{r(Lf(l)?"abort":"next",l)});return}return a=501,i.json()}).then(i=>{if(typeof i!="object"||!i){setTimeout(()=>{i===404?r("abort",i):r("next",a)});return}setTimeout(()=>{r("success",i)})}).catch(()=>{r("next",a)})}};function Bf(t,e,r){dr(r||"",e).loadIcons=t}function Wf(t,e,r){dr(r||"",e).loadIcon=t}var jo="data-style",Zd="";function $f(t){Zd=t}function Jd(t,e){let r=Array.from(t.childNodes).find(n=>n.hasAttribute&&n.hasAttribute(jo));r||(r=document.createElement("style"),r.setAttribute(jo,jo),t.appendChild(r)),r.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block;margin:auto}"+Zd}function ec(){Hd("",Hf),Fd(!0);let t;try{t=window}catch{}if(t){if(t.IconifyPreload!==void 0){let e=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof e=="object"&&e&&(e instanceof Array?e:[e]).forEach(n=>{try{(typeof n!="object"||!n||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Ld(n))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){let e=t.IconifyProviders;if(typeof e=="object"&&e)for(let r in e){let n="IconifyProviders["+r+"] is invalid.";try{let a=e[r];if(typeof a!="object"||!a||a.resources===void 0)continue;Wd(r,a)||console.error(n)}catch{console.error(n)}}}}return{enableCache:e=>{},disableCache:e=>{},iconLoaded:Vd,iconExists:Vd,getIcon:uf,listIcons:cf,addIcon:Od,addCollection:Ld,calculateSize:bo,buildIcon:Qd,iconToHTML:yo,svgToURL:Xd,loadIcons:wo,loadIcon:_f,addAPIProvider:Wd,setCustomIconLoader:Wf,setCustomIconsLoader:Bf,appendCustomStyle:$f,_api:{getAPIConfig:Fa,setAPIModule:Hd,sendAPIQuery:qd,setFetch:Pf,getFetch:Ff,listAPIProviders:wf}}}var Co={"background-color":"currentColor"},tc={"background-color":"transparent"},rc={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},nc={"-webkit-mask":Co,mask:Co,background:tc};for(let t in nc){let e=nc[t];for(let r in rc)e[t+"-"+r]=rc[r]}function ac(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function qf(t,e,r){let n=document.createElement("span"),a=t.body;a.indexOf("<a")!==-1&&(a+="<!-- "+Date.now()+" -->");let i=t.attributes,l=Xd(yo(a,{...i,width:e.width+"",height:e.height+""})),s=n.style,d={"--svg":l,width:ac(i.width),height:ac(i.height),...r?Co:tc};for(let c in d)s.setProperty(c,d[c]);return n}var Dn;function Uf(){try{Dn=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Dn=null}}function Yf(t){return Dn===void 0&&Uf(),Dn?Dn.createHTML(t):t}function Gf(t){let e=document.createElement("span"),r=t.attributes,n="";return r.width||(n="width: inherit;"),r.height||(n+="height: inherit;"),n&&(r.style=n),e.innerHTML=Yf(yo(t.body,r)),e.firstChild}function _o(t){return Array.from(t.childNodes).find(e=>{let r=e.tagName&&e.tagName.toUpperCase();return r==="SPAN"||r==="SVG"})}function ic(t,e){let r=e.icon.data,n=e.customisations,a=Qd(r,n);n.preserveAspectRatio&&(a.attributes.preserveAspectRatio=n.preserveAspectRatio);let i=e.renderedMode,l;i==="svg"?l=Gf(a):l=qf(a,{...Pn,...r},i==="mask");let s=_o(t);s?l.tagName==="SPAN"&&s.tagName===l.tagName?s.setAttribute("style",l.getAttribute("style")):t.replaceChild(l,s):t.appendChild(l)}function oc(t,e,r){return{rendered:!1,inline:e,icon:t,lastRender:r&&(r.rendered?r:r.lastRender)}}function Kf(t="iconify-icon"){let e,r;try{e=window.customElements,r=window.HTMLElement}catch{return}if(!e||!r)return;let n=e.get(t);if(n)return n;let a=["icon","mode","inline","noobserver","width","height","rotate","flip"],i=class extends r{constructor(){super();B(this,"_shadowRoot");B(this,"_initialised",!1);B(this,"_state");B(this,"_checkQueued",!1);B(this,"_connected",!1);B(this,"_observer",null);B(this,"_visible",!0);let d=this._shadowRoot=this.attachShadow({mode:"open"}),c=this.hasAttribute("inline");Jd(d,c),this._state=oc({value:""},c),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return a.slice(0)}attributeChangedCallback(d){switch(d){case"inline":{let c=this.hasAttribute("inline"),u=this._state;c!==u.inline&&(u.inline=c,Jd(this._shadowRoot,c));break}case"noobserver":this.hasAttribute("noobserver")?this.startObserver():this.stopObserver();break;default:this._queueCheck()}}get icon(){let d=this.getAttribute("icon");if(d&&d.slice(0,1)==="{")try{return JSON.parse(d)}catch{}return d}set icon(d){typeof d=="object"&&(d=JSON.stringify(d)),this.setAttribute("icon",d)}get inline(){return this.hasAttribute("inline")}set inline(d){d?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(d){d?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){let d=this._state;if(d.rendered){let c=this._shadowRoot;if(d.renderedMode==="svg")try{c.lastChild.setCurrentTime(0);return}catch{}ic(c,d)}}get status(){let d=this._state;return d.rendered?"rendered":d.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;let d=this._state,c=this.getAttribute("icon");if(c!==d.icon.value){this._iconChanged(c);return}if(!d.rendered||!this._visible)return;let u=this.getAttribute("mode"),p=Id(this);(d.attrMode!==u||rf(d.customisations,p)||!_o(this._shadowRoot))&&this._renderIcon(d.icon,p,u)}_iconChanged(d){let c=Sf(d,(u,p,m)=>{let f=this._state;if(f.rendered||this.getAttribute("icon")!==u)return;let g={value:u,name:p,data:m};g.data?this._gotIconData(g):f.icon=g});c.data?this._gotIconData(c):this._state=oc(c,this._state.inline,this._state)}_forceRender(){if(!this._visible){let d=_o(this._shadowRoot);d&&this._shadowRoot.removeChild(d);return}this._queueCheck()}_gotIconData(d){this._checkQueued=!1,this._renderIcon(d,Id(this),this.getAttribute("mode"))}_renderIcon(d,c,u){let p=kf(d.data.body,u),m=this._state.inline;ic(this._shadowRoot,this._state={rendered:!0,icon:d,inline:m,customisations:c,attrMode:u,renderedMode:p})}startObserver(){if(!this._observer&&!this.hasAttribute("noobserver"))try{this._observer=new IntersectionObserver(d=>{let c=d.some(u=>u.isIntersecting);c!==this._visible&&(this._visible=c,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};a.forEach(s=>{s in i.prototype||Object.defineProperty(i.prototype,s,{get:function(){return this.getAttribute(s)},set:function(d){d===null?this.removeAttribute(s):this.setAttribute(s,d)}})});let l=ec();for(let s in l)i[s]=i.prototype[s]=l[s];return e.define(t,i),i}var{enableCache:sk,disableCache:dk,iconLoaded:ck,iconExists:uk,getIcon:pk,listIcons:mk,addIcon:hk,addCollection:fk,calculateSize:gk,buildIcon:xk,iconToHTML:vk,svgToURL:wk,loadIcons:bk,loadIcon:yk,setCustomIconLoader:jk,setCustomIconsLoader:Ck,addAPIProvider:_k,_api:Sk}=Kf()||ec();const Qf=()=>((0,Xh.c)(1),null);var lc=ee();const sc=(0,j.memo)(t=>{let e=(0,lc.c)(3),{children:r}=t,{theme:n}=In(),a,i;return e[0]===n?(a=e[1],i=e[2]):(a=()=>(document.body.classList.add(n,`${n}-theme`),document.body.dataset.theme=n,()=>{document.body.classList.remove(n,`${n}-theme`),delete document.body.dataset.theme}),i=[n],e[0]=n,e[1]=a,e[2]=i),(0,j.useLayoutEffect)(a,i),r});sc.displayName="ThemeProvider";const Xf=t=>{let e=(0,lc.c)(3),{variables:r,children:n}=t,a;return e[0]!==n||e[1]!==r?(a=(0,o.jsx)("div",{className:"contents",style:r,children:n}),e[0]=n,e[1]=r,e[2]=a):a=e[2],a},La=t=>{let e=null,r=async()=>(e||(e=t()),e);return{preload:r,Component:j.lazy(()=>r())}};var Zf=ee();const Jf=()=>{let t=(0,Zf.c)(25),[e,r]=Sn(Vj);if(e===null)return null;let n;t[0]===e?n=t[1]:(n=async()=>{try{await navigator.clipboard.writeText(e),Et({title:"Copied to clipboard",description:"Error details have been copied to your clipboard."})}catch{Et({title:"Failed to copy",description:"Could not copy to clipboard.",variant:"danger"})}},t[0]=e,t[1]=n);let a=n,i;t[2]===r?i=t[3]:(i=()=>{r(null)},t[2]=r,t[3]=i);let l=i,s=e0,d;t[4]===l?d=t[5]:(d=y=>!y&&l(),t[4]=l,t[5]=d);let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsxs)(om,{children:[(0,o.jsxs)(sm,{className:"flex items-center gap-2 text-destructive",children:[(0,o.jsx)(J2,{className:"h-5 w-5"}),"Kernel Startup Failed"]}),(0,o.jsx)(im,{children:"The kernel failed to start. This usually happens when the package manager can't install your notebook's dependencies."})]}),t[6]=c):c=t[6];let u;t[7]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)("span",{className:"text-sm font-medium text-muted-foreground",children:"Error Details"}),t[7]=u):u=t[7];let p;t[8]===Symbol.for("react.memo_cache_sentinel")?(p=(0,o.jsx)(Em,{className:"h-3 w-3"}),t[8]=p):p=t[8];let m;t[9]===a?m=t[10]:(m=(0,o.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[u,(0,o.jsxs)(ze,{variant:"outline",size:"xs",onClick:a,className:"flex items-center gap-1",children:[p,"Copy"]})]}),t[9]=a,t[10]=m);let f;t[11]===e?f=t[12]:(f=(0,o.jsx)("pre",{className:"bg-muted p-4 rounded-md text-sm font-mono overflow-auto max-h-80",children:e}),t[11]=e,t[12]=f);let g;t[13]!==m||t[14]!==f?(g=(0,o.jsxs)("div",{className:"my-4 overflow-hidden",children:[m,f]}),t[13]=m,t[14]=f,t[15]=g):g=t[15];let x;t[16]===Symbol.for("react.memo_cache_sentinel")?(x=(0,o.jsxs)(ze,{variant:"outline",onClick:s,className:"flex items-center gap-2",children:[(0,o.jsx)(tS,{className:"h-4 w-4"}),"Return to Home"]}),t[16]=x):x=t[16];let w;t[17]===l?w=t[18]:(w=(0,o.jsxs)(cm,{children:[x,(0,o.jsx)(dm,{onClick:l,children:"Dismiss"})]}),t[17]=l,t[18]=w);let b;t[19]!==w||t[20]!==g?(b=(0,o.jsxs)(lm,{className:"max-w-2xl",children:[c,g,w]}),t[19]=w,t[20]=g,t[21]=b):b=t[21];let v;return t[22]!==b||t[23]!==d?(v=(0,o.jsx)(um,{open:!0,onOpenChange:d,children:b}),t[22]=b,t[23]=d,t[24]=v):v=t[24],v};function e0(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}var t0=ee();const r0=t=>{let e=(0,t0.c)(30),{isOpen:r,onClose:n,traceback:a,errorMessage:i}=t,l;e[0]===a?l=e[1]:(l=async()=>{let C=document.createElement("div");C.innerHTML=lj(a);let _=C.textContent||C.innerText||"";try{await navigator.clipboard.writeText(_),Et({title:"Copied to clipboard",description:"Traceback has been copied to your clipboard."})}catch{Et({title:"Failed to copy",description:"Could not copy to clipboard.",variant:"danger"})}},e[0]=a,e[1]=l);let s=l,d;e[2]===n?d=e[3]:(d=C=>!C&&n(),e[2]=n,e[3]=d);let c;e[4]===i?c=e[5]:(c=(0,o.jsx)(sm,{className:"text-destructive",children:i}),e[4]=i,e[5]=c);let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)(im,{children:"Click the traceback to select and copy."}),e[6]=u):u=e[6];let p;e[7]===c?p=e[8]:(p=(0,o.jsxs)(om,{children:[c,u]}),e[7]=c,e[8]=p);let m;e[9]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsx)("span",{className:"text-sm font-medium text-muted-foreground",children:"Traceback"}),e[9]=m):m=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=(0,o.jsx)(Em,{className:"h-3 w-3"}),e[10]=f):f=e[10];let g;e[11]===s?g=e[12]:(g=(0,o.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[m,(0,o.jsxs)(ze,{variant:"outline",size:"xs",onClick:s,className:"flex items-center gap-1",children:[f,"Copy"]})]}),e[11]=s,e[12]=g);let x;e[13]===a?x=e[14]:(x=qe({html:a}),e[13]=a,e[14]=x);let w;e[15]===x?w=e[16]:(w=(0,o.jsx)("div",{className:"font-code text-sm p-4 bg-muted rounded border overflow-auto max-h-[50vh] cursor-text select-text",children:x}),e[15]=x,e[16]=w);let b;e[17]!==w||e[18]!==g?(b=(0,o.jsxs)("div",{className:"my-4 overflow-auto",children:[g,w]}),e[17]=w,e[18]=g,e[19]=b):b=e[19];let v;e[20]===n?v=e[21]:(v=(0,o.jsx)(cm,{children:(0,o.jsx)(dm,{onClick:n,children:"Close"})}),e[20]=n,e[21]=v);let y;e[22]!==b||e[23]!==v||e[24]!==p?(y=(0,o.jsxs)(lm,{className:"max-w-4xl max-h-[80vh]",children:[p,b,v]}),e[22]=b,e[23]=v,e[24]=p,e[25]=y):y=e[25];let S;return e[26]!==r||e[27]!==y||e[28]!==d?(S=(0,o.jsx)(um,{open:r,onOpenChange:d,children:y}),e[26]=r,e[27]=y,e[28]=d,e[29]=S):S=e[29],S};var n0=ee();const a0=()=>{let t=(0,n0.c)(6),[e,r]=Sn(dj);if(!e)return null;let n;t[0]===r?n=t[1]:(n=()=>r(null),t[0]=r,t[1]=n);let a;return t[2]!==n||t[3]!==e.errorMessage||t[4]!==e.traceback?(a=(0,o.jsx)(r0,{isOpen:!0,onClose:n,traceback:e.traceback,errorMessage:e.errorMessage}),t[2]=n,t[3]=e.errorMessage,t[4]=e.traceback,t[5]=a):a=t[5],a};var i0=ee();const o0=()=>{let t=(0,i0.c)(5),{toasts:e}=yS(),r;t[0]===e?r=t[1]:(r=e.map(l0),t[0]=e,t[1]=r);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(B2,{}),t[2]=n):n=t[2];let a;return t[3]===r?a=t[4]:(a=(0,o.jsxs)(aj,{children:[r,n]}),t[3]=r,t[4]=a),a};function l0(t){let{id:e,title:r,description:n,action:a,...i}=t;return(0,o.jsxs)(q2,{...i,children:[(0,o.jsxs)("div",{className:"grid gap-1",children:[r&&(0,o.jsx)(G2,{children:r}),n&&(0,o.jsx)(rj,{children:n})]}),a,(0,o.jsx)(nj,{})]},e)}var s0=ee();const So=t=>{let e=(0,s0.c)(5),{children:r}=t,n=ga(Kj),a;e[0]===n?a=e[1]:(a=d0(n),e[0]=n,e[1]=a);let i;return e[2]!==r||e[3]!==a?(i=(0,o.jsx)(AS,{locale:a,children:r}),e[2]=r,e[3]=a,e[4]=i):i=e[4],i};function d0(t){return t&&c0(t)?t:navigator.language}function c0(t){try{return new Intl.NumberFormat(t),!0}catch{return!1}}var dc=ee(),cc=La(()=>Ct(()=>import("./home-page-CNWhDe7y.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134]),import.meta.url)),uc=La(()=>Ct(()=>import("./run-page-By67zzFX.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([135,136,137,4,138,13,8,9,10,11,139,140,141,142,3,5,6,7,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,107,143,70,144,145,105,75,74,79,78,80,81,82,83,84,71,72,68,69,85,146,147,148,93,97,149,150,133,151,66,152,153,154,90,155,156,157,158,159,160,86,161,92,88,162,91,163,121,122,123,125,118,164,165,126,94,166,167,129,168,98,100,169,170,171,172,173,174,175,176,177,178,179,77,87,89,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,112,279,280,281,282,283,284,285,286,287,288,95,96,289,290,291,292,293,294,295,119]),import.meta.url)),pc=La(()=>Ct(()=>import("./edit-page-B59sKLMa.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([296,4,297,10,136,137,138,13,8,9,11,139,140,141,142,3,5,6,7,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,107,143,70,144,145,105,75,74,79,78,80,81,82,83,84,71,72,68,69,85,146,147,148,93,97,149,150,133,151,66,152,153,154,90,155,156,157,158,159,160,86,161,92,88,162,91,163,121,122,123,125,118,164,165,126,94,166,167,129,168,98,100,169,170,171,172,173,174,175,176,177,178,179,77,87,89,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,112,279,280,281,282,283,284,285,286,287,288,95,96,289,290,291,292,293,294,295,2,67,73,76,99,101,102,1,103,104,106,298,299,108,300,117,111,301,302,109,110,303,120,304,305,306,307,308,309,310,311,134,312,130,313,314,315,316,132,119,124,131,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332]),import.meta.url)),mc=La(()=>Ct(()=>import("./gallery-page-Bcf7fYLy.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([333,107,12,13,8,9,10,11,6,7,35,66,20,73,14,15,79,78,25,60,29,61,62,80,44,41,26,81,82,83,84,21,36,37,90,91,75,92,30,46]),import.meta.url));function u0(t){switch(t){case"home":cc.preload();break;case"gallery":mc.preload();break;case"read":uc.preload();break;default:pc.preload()}}const hc=(0,j.memo)(()=>{let t=(0,dc.c)(12),[e]=Xj(),[r]=$j(),n;t[0]===e.display.code_editor_font_size?n=t[1]:(n=p0(e.display.code_editor_font_size),t[0]=e.display.code_editor_font_size,t[1]=n);let a=n,i;t[2]!==r||t[3]!==e?(i=()=>{let u=ij();return u==="home"?(0,o.jsx)(cc.Component,{}):u==="gallery"?(0,o.jsx)(mc.Component,{}):u==="read"?(0,o.jsx)(uc.Component,{appConfig:r}):(0,o.jsx)(pc.Component,{userConfig:e,appConfig:r})},t[2]=r,t[3]=e,t[4]=i):i=t[4];let l=i,s;t[5]===a?s=t[6]:(s={"--marimo-code-editor-font-size":a},t[5]=a,t[6]=s);let d;t[7]===l?d=t[8]:(d=(0,o.jsx)(So,{children:l()}),t[7]=l,t[8]=d);let c;return t[9]!==s||t[10]!==d?(c=(0,o.jsx)(fc,{children:(0,o.jsx)(Xf,{variables:s,children:d})}),t[9]=s,t[10]=d,t[11]=c):c=t[11],c});hc.displayName="MarimoApp";var fc=(0,j.memo)(t=>{let e=(0,dc.c)(6),{children:r}=t,n,a,i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)(o0,{}),a=(0,o.jsx)(Qf,{}),i=(0,o.jsx)(Jf,{}),l=(0,o.jsx)(a0,{}),e[0]=n,e[1]=a,e[2]=i,e[3]=l):(n=e[0],a=e[1],i=e[2],l=e[3]);let s;return e[4]===r?s=e[5]:(s=(0,o.jsx)(Ai,{children:(0,o.jsx)(j.Suspense,{children:(0,o.jsx)(ba,{children:(0,o.jsx)(gm,{controller:wa,children:(0,o.jsx)(So,{children:(0,o.jsxs)(zS,{children:[r,n,a,i,l]})})})})})}),e[4]=r,e[5]=s),s});fc.displayName="Providers";function p0(t){return`${t/16}rem`}function m0(){SS(t=>{t.delete(ss.accessToken)})}var h0={sendComponentValues:"startConnection",sendModelValue:"startConnection",sendInstantiate:"startConnection",sendRun:"startConnection",sendDeleteCell:"startConnection",sendRunScratchpad:"startConnection",saveAppConfig:"startConnection",saveCellConfig:"startConnection",exportAsHTML:"startConnection",exportAsIPYNB:"startConnection",exportAsMarkdown:"startConnection",exportAsPDF:"startConnection",readCode:"startConnection",sendCopy:"throwError",sendFormat:"throwError",sendRestart:"throwError",sendSave:"waitForConnectionOpen",invokeAiTool:"waitForConnectionOpen",sendFunctionRequest:"waitForConnectionOpen",sendRename:"waitForConnectionOpen",autoExportAsHTML:"waitForConnectionOpen",autoExportAsMarkdown:"waitForConnectionOpen",autoExportAsIPYNB:"waitForConnectionOpen",updateCellOutputs:"waitForConnectionOpen",listSecretKeys:"throwError",writeSecret:"throwError",clearCache:"throwError",getCacheInfo:"throwError",saveUserConfig:"throwError",sendShutdown:"throwError",getPackageList:"throwError",getDependencyTree:"throwError",addPackage:"throwError",removePackage:"throwError",sendListFiles:"startConnection",sendSearchFiles:"startConnection",sendCreateFileOrFolder:"throwError",sendDeleteFileOrFolder:"throwError",sendCopyFileOrFolder:"throwError",sendRenameFileOrFolder:"throwError",sendUpdateFile:"throwError",sendFileDetails:"throwError",openFile:"throwError",getRecentFiles:"startConnection",getWorkspaceFiles:"startConnection",getRunningNotebooks:"startConnection",shutdownSession:"startConnection",openTutorial:"startConnection",getUsageStats:"waitForConnectionOpen",sendStdin:"waitForConnectionOpen",sendInterrupt:"waitForConnectionOpen",sendPdb:"waitForConnectionOpen",sendInstallMissingPackages:"waitForConnectionOpen",readSnippets:"waitForConnectionOpen",previewDatasetColumn:"waitForConnectionOpen",previewSQLTable:"waitForConnectionOpen",previewSQLTableList:"waitForConnectionOpen",previewSQLSchemaList:"waitForConnectionOpen",previewDataSourceConnection:"waitForConnectionOpen",validateSQL:"waitForConnectionOpen",listStorageEntries:"waitForConnectionOpen",downloadStorage:"waitForConnectionOpen",sendDocumentTransaction:"waitForConnectionOpen",sendCodeCompletionRequest:"waitForConnectionOpen"};function f0(t,e){let r=x_(async a=>{De.set(Qp,{state:Xp.CONNECTING}),await a.init()});function n(a,i){let l=h0[i];return async(...s)=>{let d=e();if(!d.isLazy)return a(...s);switch(l){case"dropRequest":ue.debug(`Dropping request: ${i}, since not connected to a kernel.`);return;case"throwError":throw new $m;case"waitForConnectionOpen":return await ct(),await Fm(),a(...s);case"startConnection":return await r(d),await ct(),i!=="sendInstantiate"&&await Fm(),a(...s);default:throw Error(`Unknown action for "${i}"`)}}}return Gr.mapValues(t,(a,i)=>n(a,i))}function g0(t){return{body:t,bodySerializer:e=>e}}var{handleResponse:Oe,handleResponseReturnNull:Ce}=aC;function x0(){let t=Ns(()=>oC(ds())),e=()=>ds().sessionHeaders(),r=()=>({header:e()});return{sendComponentValues:n=>t().POST("/api/kernel/set_ui_element_value",{body:n,params:r()}).then(Ce),sendModelValue:n=>t().POST("/api/kernel/set_model_value",{body:n,params:r()}).then(Ce),sendRestart:()=>t().POST("/api/kernel/restart_session",{params:r()}).then(Ce),sendDocumentTransaction:async n=>(await ct(),t().POST("/api/document/transaction",{body:n,params:r()}).then(Ce)),sendRename:n=>t().POST("/api/kernel/rename",{body:n,params:r()}).then(Ce),sendSave:n=>t().POST("/api/kernel/save",{body:n,parseAs:"text",params:r()}).then(Ce),sendCopy:n=>t().POST("/api/kernel/copy",{body:n,parseAs:"text",params:r()}).then(Ce),sendFormat:n=>t().POST("/api/kernel/format",{body:n}).then(Oe),sendInterrupt:()=>t().POST("/api/kernel/interrupt",{params:r()}).then(Ce),sendShutdown:()=>t().POST("/api/kernel/shutdown").then(Ce),sendRun:async n=>(await ct(),t().POST("/api/kernel/run",{body:n,params:r()}).then(Ce)),sendRunScratchpad:async n=>(await ct(),t().POST("/api/kernel/scratchpad/run",{body:n,params:r()}).then(Ce)),sendInstantiate:async n=>(await ct(),t().POST("/api/kernel/instantiate",{body:n,params:r()}).then(Ce)),sendDeleteCell:n=>t().POST("/api/kernel/delete",{body:n,params:r()}).then(Ce),sendCodeCompletionRequest:async n=>(await ct(),t().POST("/api/kernel/code_autocomplete",{body:n,params:r()}).then(Ce)),saveUserConfig:n=>t().POST("/api/kernel/save_user_config",{body:n}).then(Ce),saveAppConfig:n=>t().POST("/api/kernel/save_app_config",{body:n,parseAs:"text",params:r()}).then(Ce),saveCellConfig:n=>t().POST("/api/kernel/set_cell_config",{body:n,params:r()}).then(Ce),sendFunctionRequest:n=>t().POST("/api/kernel/function_call",{body:n,params:r()}).then(Ce),sendStdin:n=>t().POST("/api/kernel/stdin",{body:n,params:r()}).then(Ce),sendInstallMissingPackages:n=>t().POST("/api/kernel/install_missing_packages",{body:n,params:r()}).then(Ce),readCode:async()=>(await ct(),t().POST("/api/kernel/read_code",{params:r()}).then(Oe)),readSnippets:async()=>(await ct(),t().GET("/api/documentation/snippets",{params:r()}).then(Oe)),previewDatasetColumn:n=>t().POST("/api/datasources/preview_column",{body:n,params:r()}).then(Ce),previewSQLTable:n=>t().POST("/api/datasources/preview_sql_table",{body:n,params:r()}).then(Ce),previewSQLTableList:n=>t().POST("/api/datasources/preview_sql_table_list",{body:n,params:r()}).then(Ce),previewSQLSchemaList:n=>t().POST("/api/datasources/preview_sql_schema_list",{body:n,params:r()}).then(Ce),previewDataSourceConnection:n=>t().POST("/api/datasources/preview_datasource_connection",{body:n,params:r()}).then(Ce),validateSQL:n=>t().POST("/api/sql/validate",{body:n,params:r()}).then(Ce),openFile:async n=>(await ct(),await t().POST("/api/files/open",{body:n}).then(Ce),null),getUsageStats:async()=>(await ct(),t().GET("/api/usage").then(Oe)),sendPdb:n=>t().POST("/api/kernel/pdb/pm",{body:n,params:r()}).then(Ce),sendListFiles:async n=>(await ct(),t().POST("/api/files/list_files",{body:n}).then(Oe)),sendSearchFiles:async n=>(await ct(),t().POST("/api/files/search",{body:n}).then(Oe)),sendCreateFileOrFolder:async n=>{await ct();let a=new FormData;return a.append("path",n.path),a.append("type",n.type),a.append("name",n.name),n.file&&a.append("file",n.file,n.name),t().POST("/api/files/create",g0(a)).then(Oe)},sendDeleteFileOrFolder:async n=>t().POST("/api/files/delete",{body:n}).then(Oe),sendCopyFileOrFolder:async n=>t().POST("/api/files/copy",{body:n}).then(Oe),sendRenameFileOrFolder:async n=>t().POST("/api/files/move",{body:n}).then(Oe),sendUpdateFile:async n=>(await ct(),t().POST("/api/files/update",{body:n}).then(Oe)),sendFileDetails:async n=>(await ct(),t().POST("/api/files/file_details",{body:n}).then(Oe)),openTutorial:n=>t().POST("/api/home/tutorial/open",{body:n}).then(Oe),getRecentFiles:()=>t().POST("/api/home/recent_files").then(Oe),getWorkspaceFiles:n=>t().POST("/api/home/workspace_files",{body:n}).then(Oe),getRunningNotebooks:()=>t().POST("/api/home/running_notebooks").then(Oe),shutdownSession:n=>t().POST("/api/home/shutdown_session",{body:n}).then(Oe),exportAsHTML:async n=>t().POST("/api/export/html",{body:n,parseAs:"text",params:r()}).then(Oe),exportAsMarkdown:async n=>t().POST("/api/export/markdown",{body:n,parseAs:"text",params:r()}).then(Oe),exportAsIPYNB:async n=>t().POST("/api/export/ipynb",{body:n,parseAs:"text",params:r()}).then(Oe),exportAsPDF:async n=>t().POST("/api/export/pdf",{body:n,parseAs:"blob",params:r()}).then(Oe),autoExportAsHTML:async n=>t().POST("/api/export/auto_export/html",{body:n,params:r()}).then(Ce),autoExportAsMarkdown:async n=>t().POST("/api/export/auto_export/markdown",{body:n,params:r()}).then(Ce),autoExportAsIPYNB:async n=>t().POST("/api/export/auto_export/ipynb",{body:n,params:r()}).then(Ce),updateCellOutputs:async n=>t().POST("/api/export/update_cell_outputs",{body:n,params:r()}).then(Ce),addPackage:n=>t().POST("/api/packages/add",{body:n}).then(Oe),removePackage:n=>t().POST("/api/packages/remove",{body:n}).then(Oe),getPackageList:async()=>(await ct(),t().GET("/api/packages/list").then(Oe)),getDependencyTree:async()=>(await ct(),t().GET("/api/packages/tree").then(Oe)),listSecretKeys:async n=>(await ct(),t().POST("/api/secrets/keys",{body:n,params:r()}).then(Ce)),writeSecret:async n=>t().POST("/api/secrets/create",{body:n,params:r()}).then(Ce),invokeAiTool:async n=>t().POST("/api/ai/invoke_tool",{body:n,params:r()}).then(Oe),clearCache:async()=>t().POST("/api/cache/clear",{body:{},params:r()}).then(Ce),getCacheInfo:async()=>t().POST("/api/cache/info",{body:{},params:r()}).then(Ce),listStorageEntries:n=>t().POST("/api/storage/list_entries",{body:n,params:r()}).then(Ce),downloadStorage:n=>t().POST("/api/storage/download",{body:n,params:r()}).then(Ce)}}function v0(){let t=()=>{throw Error("Unreachable. Expected to be in run mode")};return{sendComponentValues:async()=>(Et({title:"Static notebook",description:"This notebook is not connected to a kernel. Any interactive elements will not work."}),ue.log("Updating UI elements is not supported in static mode"),null),sendModelValue:async()=>(ue.log("Updating model values is not supported in static mode"),null),sendInstantiate:async()=>(ue.log("Viewing as static notebook"),null),sendFunctionRequest:async()=>(Et({title:"Static notebook",description:"This notebook is not connected to a kernel. Any interactive elements will not work."}),ue.log("Function requests are not supported in static mode"),null),sendRestart:t,sendDocumentTransaction:t,sendRun:t,sendRunScratchpad:t,sendRename:t,sendSave:t,sendCopy:t,sendInterrupt:t,sendShutdown:t,sendFormat:t,sendDeleteCell:t,sendCodeCompletionRequest:t,saveUserConfig:t,saveAppConfig:t,saveCellConfig:t,sendStdin:t,readCode:t,readSnippets:t,previewDatasetColumn:t,previewSQLTable:t,previewSQLTableList:t,previewSQLSchemaList:t,previewDataSourceConnection:t,validateSQL:t,openFile:t,getUsageStats:t,sendListFiles:t,sendSearchFiles:t,sendPdb:t,sendCreateFileOrFolder:t,sendDeleteFileOrFolder:t,sendCopyFileOrFolder:t,sendRenameFileOrFolder:t,sendUpdateFile:t,sendFileDetails:t,openTutorial:t,sendInstallMissingPackages:t,getRecentFiles:t,getWorkspaceFiles:t,getRunningNotebooks:t,shutdownSession:t,exportAsHTML:t,exportAsIPYNB:t,exportAsMarkdown:t,exportAsPDF:t,autoExportAsHTML:t,autoExportAsMarkdown:t,autoExportAsIPYNB:t,updateCellOutputs:t,addPackage:t,removePackage:t,getPackageList:t,getDependencyTree:t,listSecretKeys:t,writeSecret:t,invokeAiTool:t,clearCache:t,getCacheInfo:t,listStorageEntries:t,downloadStorage:t}}var w0=ee();function b0(t){let e={sendComponentValues:"Failed update value",sendModelValue:"Failed to update model value",sendInstantiate:"Failed to instantiate",sendFunctionRequest:"Failed to send function request",sendRestart:"Failed to restart",sendDocumentTransaction:"Failed to sync document transaction",sendRun:"Failed to run",sendRunScratchpad:"Failed to run scratchpad",sendRename:"Failed to rename",sendSave:"Failed to save",sendCopy:"Failed to copy",sendInterrupt:"Failed to interrupt",sendShutdown:"Failed to shutdown",sendFormat:"Failed to format",sendDeleteCell:"Failed to delete cell",sendCodeCompletionRequest:"Failed to complete code",saveUserConfig:"Failed to save user config",saveAppConfig:"Failed to save app config",saveCellConfig:"Failed to save cell config",sendStdin:"Failed to send stdin",readCode:"Failed to read code",readSnippets:"Failed to fetch snippets",previewDatasetColumn:"Failed to fetch data sources",previewSQLTable:"Failed to fetch SQL table",previewSQLTableList:"Failed to fetch SQL table list",previewSQLSchemaList:"Failed to fetch SQL schema list",previewDataSourceConnection:"Failed to preview data source connection",validateSQL:"Failed to validate SQL",openFile:"Failed to open file",getUsageStats:"",sendListFiles:"Failed to list files",sendSearchFiles:"Failed to search files",sendPdb:"Failed to start debug session",sendCreateFileOrFolder:"Failed to create file or folder",sendDeleteFileOrFolder:"Failed to delete file or folder",sendCopyFileOrFolder:"Failed to duplicate file or folder",sendRenameFileOrFolder:"Failed to rename file or folder",sendUpdateFile:"Failed to update file",sendFileDetails:"Failed to get file details",openTutorial:"Failed to open tutorial",sendInstallMissingPackages:"Failed to install missing packages",getRecentFiles:"Failed to get recent files",getWorkspaceFiles:"Failed to get workspace files",getRunningNotebooks:"Failed to get running notebooks",shutdownSession:"Failed to shutdown session",exportAsHTML:"Failed to export HTML",exportAsIPYNB:"Failed to export ipynb",exportAsMarkdown:"Failed to export Markdown",exportAsPDF:"Failed to export PDF",autoExportAsHTML:"",autoExportAsMarkdown:"",autoExportAsIPYNB:"",updateCellOutputs:"",addPackage:"Failed to add package",removePackage:"Failed to remove package",getPackageList:"Failed to get package list",getDependencyTree:"Failed to get dependency tree",listSecretKeys:"Failed to fetch secrets",writeSecret:"Failed to write secret",invokeAiTool:"Failed to invoke AI tool",clearCache:"Failed to clear cache",getCacheInfo:"",listStorageEntries:"Failed to list storage entries",downloadStorage:"Failed to download storage entry"},r={};for(let[n,a]of Object.entries(t)){let i=n;r[i]=async(...l)=>{try{return await a(...l)}catch(s){if(s instanceof $m){if(De.get(Gp))return;let u=Et({title:"Kernel Not Connected",description:"You need to connect to a kernel to perform this action.",variant:"default",action:(0,o.jsx)(y0,{onConnect:()=>u.dismiss()})});throw ue.error(`Failed to handle request: ${n}`,s),s}let d=e[i],c=qm(s);throw d&&Et({title:d,description:c,variant:"danger"}),ue.error(`Failed to handle request: ${n}`,s),s}}}return r}const y0=t=>{let e=(0,w0.c)(9),{onConnect:r}=t,n=Jj(),a=ga(Gp),i;e[0]!==n||e[1]!==r?(i=()=>{n(),setTimeout(()=>{r()},800)},e[0]=n,e[1]=r,e[2]=i):i=e[2];let l;e[3]===a?l=e[4]:(l=a&&(0,o.jsx)(Oi,{size:"small",className:"mr-1"}),e[3]=a,e[4]=l);let s;return e[5]!==a||e[6]!==i||e[7]!==l?(s=(0,o.jsxs)(ze,{size:"xs",onClick:i,disabled:a,children:[l,"Connect"]}),e[5]=a,e[6]=i,e[7]=l,e[8]=s):s=e[8],s};function j0(){let t;return t=Zj()?Fj.INSTANCE:xa()?v0():f0(x0(),()=>ds()),b0(t)}var an=ee(),ko=j.forwardRef((t,e)=>{let r=(0,an.c)(16),n,a,i,l;r[0]===t?(n=r[1],a=r[2],i=r[3],l=r[4]):({className:a,children:n,orientation:i,...l}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i,r[4]=l);let s=i==="horizontal"&&"max-w-max flex-1 items-center justify-center",d=i==="vertical"&&"",c;r[5]!==a||r[6]!==s||r[7]!==d?(c=Z(s,d,"relative z-10",a),r[5]=a,r[6]=s,r[7]=d,r[8]=c):c=r[8];let u;r[9]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)(vc,{}),r[9]=u):u=r[9];let p;return r[10]!==n||r[11]!==i||r[12]!==l||r[13]!==e||r[14]!==c?(p=(0,o.jsxs)(ld,{ref:e,className:c,orientation:i,...l,children:[n,u]}),r[10]=n,r[11]=i,r[12]=l,r[13]=e,r[14]=c,r[15]=p):p=r[15],p});ko.displayName=ld.displayName;var C0=cs("group flex list-none gap-1",{variants:{orientation:{horizontal:"flex items-center",vertical:"flex flex-col"}},defaultVariants:{orientation:"horizontal"}}),Va=j.forwardRef((t,e)=>{let r=(0,an.c)(11),n,a,i;r[0]===t?(n=r[1],a=r[2],i=r[3]):({className:n,orientation:a,...i}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i);let l;r[4]!==n||r[5]!==a?(l=Z(C0({orientation:a}),n),r[4]=n,r[5]=a,r[6]=l):l=r[6];let s;return r[7]!==i||r[8]!==e||r[9]!==l?(s=(0,o.jsx)(sd,{ref:e,className:l,...i}),r[7]=i,r[8]=e,r[9]=l,r[10]=s):s=r[10],s});Va.displayName=sd.displayName;var No=hh,To=cs("group inline-flex rounded-md bg-background px-4 py-2 text-lg font-medium text-(--slate-12) transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50",{variants:{orientation:{horizontal:"w-max items-center justify-center",vertical:"w-full"}},defaultVariants:{orientation:"horizontal"}}),gc=j.forwardRef((t,e)=>{let r=(0,an.c)(12),n,a,i;r[0]===t?(n=r[1],a=r[2],i=r[3]):({className:a,children:n,...i}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i);let l;r[4]===a?l=r[5]:(l=Z(To(),"group",a),r[4]=a,r[5]=l);let s;r[6]===Symbol.for("react.memo_cache_sentinel")?(s=(0,o.jsx)(VS,{className:"relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"}),r[6]=s):s=r[6];let d;return r[7]!==n||r[8]!==i||r[9]!==e||r[10]!==l?(d=(0,o.jsxs)(dd,{ref:e,className:l,...i,children:[n," ",s]}),r[7]=n,r[8]=i,r[9]=e,r[10]=l,r[11]=d):d=r[11],d});gc.displayName=dd.displayName;var xc=j.forwardRef((t,e)=>{let r=(0,an.c)(9),n,a;r[0]===t?(n=r[1],a=r[2]):({className:n,...a}=t,r[0]=t,r[1]=n,r[2]=a);let i;r[3]===n?i=r[4]:(i=Z("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",n),r[3]=n,r[4]=i);let l;return r[5]!==a||r[6]!==e||r[7]!==i?(l=(0,o.jsx)(ud,{ref:e,className:i,...a}),r[5]=a,r[6]=e,r[7]=i,r[8]=l):l=r[8],l});xc.displayName=ud.displayName;var Ao=fh,vc=j.forwardRef((t,e)=>{let r=(0,an.c)(10),n,a;r[0]===t?(n=r[1],a=r[2]):({className:n,...a}=t,r[0]=t,r[1]=n,r[2]=a);let i;r[3]===Symbol.for("react.memo_cache_sentinel")?(i=Z("absolute left-0 top-full flex justify-center"),r[3]=i):i=r[3];let l;r[4]===n?l=r[5]:(l=Z("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)",n),r[4]=n,r[5]=l);let s;return r[6]!==a||r[7]!==e||r[8]!==l?(s=(0,o.jsx)("div",{className:i,children:(0,o.jsx)(pd,{className:l,ref:e,...a})}),r[6]=a,r[7]=e,r[8]=l,r[9]=s):s=r[9],s});vc.displayName=pd.displayName;var _0=j.forwardRef((t,e)=>{let r=(0,an.c)(10),n,a;r[0]===t?(n=r[1],a=r[2]):({className:n,...a}=t,r[0]=t,r[1]=n,r[2]=a);let i;r[3]===n?i=r[4]:(i=Z("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",n),r[3]=n,r[4]=i);let l;r[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsx)("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"}),r[5]=l):l=r[5];let s;return r[6]!==a||r[7]!==e||r[8]!==i?(s=(0,o.jsx)(cd,{ref:e,className:i,...a,children:l}),r[6]=a,r[7]=e,r[8]=i,r[9]=s):s=r[9],s});_0.displayName=cd.displayName;var wc=ee(),S0=class{constructor(){B(this,"tagName","marimo-nav-menu");B(this,"menuItemValidator",F({label:I(),href:I(),description:I().nullish()}));B(this,"menuItemGroupValidator",F({label:I(),items:G(this.menuItemValidator)}));B(this,"validator",F({items:G(Ne([this.menuItemValidator,this.menuItemGroupValidator])),orientation:ye(["horizontal","vertical"])}))}render(t){return(0,o.jsx)(k0,{...t.data})}},k0=t=>{let e=(0,wc.c)(13),{items:r,orientation:n}=t,a=N0,i=T0,l=A0,s;e[0]===n?s=e[1]:(s=m=>"items"in m?n==="horizontal"?(0,o.jsx)(ko,{orientation:"horizontal",children:(0,o.jsx)(Va,{children:(0,o.jsxs)(No,{children:[(0,o.jsx)(gc,{children:qe({html:m.label})}),(0,o.jsx)(xc,{children:(0,o.jsx)("ul",{className:"grid w-[400px] gap-3 p-4 md:w-[500px] md:grid-cols-2 lg:w-[600px] ",children:m.items.map(f=>(0,o.jsx)(bc,{label:f.label,href:l(f.href),target:i(f.href),children:f.description&&qe({html:f.description})},f.label))})})]})})},m.label):(0,o.jsxs)(No,{children:[(0,o.jsx)("div",{className:"inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-base font-medium text-muted-foreground/80 tracking-wide font-semibold",children:qe({html:m.label})}),(0,o.jsx)(Va,{className:"ml-4 auto-collapse-nav",orientation:n,children:m.items.map(f=>(0,o.jsx)(j.Fragment,{children:a((0,o.jsx)(Ao,{href:l(f.href),target:i(f.href),className:To({orientation:n}),children:qe({html:f.label})},f.label),f.description)},f.label))})]},m.label):(0,o.jsx)(No,{children:(0,o.jsx)(Ao,{href:l(m.href),target:i(m.href),className:To({orientation:n}),children:qe({html:m.label})})},m.label),e[0]=n,e[1]=s);let d=s,c;if(e[2]!==r||e[3]!==d){let m;e[5]===d?m=e[6]:(m=f=>d(f),e[5]=d,e[6]=m),c=r.map(m),e[2]=r,e[3]=d,e[4]=c}else c=e[4];let u;e[7]!==n||e[8]!==c?(u=(0,o.jsx)(Va,{className:"auto-collapse-nav",orientation:n,children:c}),e[7]=n,e[8]=c,e[9]=u):u=e[9];let p;return e[10]!==n||e[11]!==u?(p=(0,o.jsx)(ko,{orientation:n,children:u}),e[10]=n,e[11]=u,e[12]=p):p=e[12],p},bc=j.forwardRef((t,e)=>{let r=(0,wc.c)(19),n,a,i,l;r[0]===t?(n=r[1],a=r[2],i=r[3],l=r[4]):({className:a,label:i,children:n,...l}=t,r[0]=t,r[1]=n,r[2]=a,r[3]=i,r[4]=l);let s;r[5]===a?s=r[6]:(s=Z("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",a),r[5]=a,r[6]=s);let d;r[7]===i?d=r[8]:(d=qe({html:i}),r[7]=i,r[8]=d);let c;r[9]===d?c=r[10]:(c=(0,o.jsx)("div",{className:"text-base font-medium leading-none",children:d}),r[9]=d,r[10]=c);let u;r[11]===n?u=r[12]:(u=n&&(0,o.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:n}),r[11]=n,r[12]=u);let p;return r[13]!==l||r[14]!==e||r[15]!==s||r[16]!==c||r[17]!==u?(p=(0,o.jsx)("li",{children:(0,o.jsx)(Ao,{asChild:!0,children:(0,o.jsxs)("a",{ref:e,className:s,...l,children:[c,u]})})}),r[13]=l,r[14]=e,r[15]=s,r[16]=c,r[17]=u,r[18]=p):p=r[18],p});bc.displayName="ListItem";function N0(t,e){return e?(0,o.jsx)(gr,{delayDuration:200,content:qe({html:e}),children:t}):t}function T0(t){return t.startsWith("http")?"_blank":"_self"}function A0(t){return _S({href:t,queryParams:new URL(globalThis.location.href).search,keys:[ss.filePath]})}function I0(t,e){return t===e?!0:t==null||e==null?!1:Array.isArray(t)&&Array.isArray(e)?g_(t,e):typeof t=="object"&&typeof e=="object"?E0(t,e):!1}function E0(t,e){return Object.keys(t).length===Object.keys(e).length&&Gr.keys(t).every(r=>t[r]===e[r])}function Io(t,e){if(!(window!=null&&window.customElements)){ue.warn("Custom elements not supported");return}if(window.customElements.get(t)){ue.warn(`Custom element ${t} already defined`);return}window.customElements.define(t,e)}function R0(t,e){if(!e)return[];let r=t;if(t_(e))return[{column_id:r,operator:e.operator,type:"condition",negate:!1}];switch(e.type){case"number":switch(e.operator){case"between":return[{column_id:r,operator:"between",value:{min:e.min,max:e.max},type:"condition",negate:!1}];case"==":case"!=":case">":case">=":case"<":case"<=":return[{column_id:r,operator:e.operator,value:e.value,type:"condition",negate:!1}];case"in":case"not_in":return[{column_id:r,operator:e.operator,value:e.values,type:"condition",negate:!1}];default:Mi(e)}case"text":switch(e.operator){case"contains":case"equals":case"does_not_equal":case"regex":case"starts_with":case"ends_with":return[{column_id:r,operator:e.operator,value:e.text,type:"condition",negate:!1}];case"in":case"not_in":return[{column_id:r,operator:e.operator,value:e.values,type:"condition",negate:!1}];case"is_empty":return[{column_id:r,operator:"is_empty",type:"condition",negate:!1}];default:Mi(e)}case"date":case"datetime":case"time":{let n=e.type==="date"?TS:e.type==="time"?NS:kS;switch(e.operator){case"between":return[{column_id:r,operator:"between",value:{min:n(e.min),max:n(e.max)},type:"condition",negate:!1}];case"==":case"!=":case">":case">=":case"<":case"<=":return[{column_id:r,operator:e.operator,value:n(e.value),type:"condition",negate:!1}];default:Mi(e)}}case"boolean":return[{column_id:r,operator:e.operator,type:"condition",negate:!1}];default:Mi(e)}}function yc(t){return{type:"group",operator:"and",children:t.flatMap(e=>R0(e.id,e.value)),negate:!1}}var z0=ee(),M0=fC,P0=xC,F0=vC,O0=gC;const L0=t=>{let e=(0,z0.c)(16),{error:r,badData:n,shadowRoot:a}=t;if(r instanceof _j){let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,o.jsx)(Ms,{children:"Bad Data"}),e[0]=l):l=e[0];let s;e[1]===r.issues?s=e[2]:(s=r.issues.map(D0),e[1]=r.issues,e[2]=s);let d;e[3]===s?d=e[4]:(d=(0,o.jsx)("div",{className:"text-md prose dark:prose-invert",children:(0,o.jsx)("ul",{children:s})}),e[3]=s,e[4]=d);let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsx)(O0,{className:"py-2 text-[0.84375rem]",children:"View Data:"}),e[5]=c):c=e[5];let u;e[6]===n?u=e[7]:(u=(0,o.jsx)(wm,{data:n}),e[6]=n,e[7]=u);let p;e[8]!==a||e[9]!==u?(p=(0,o.jsx)(M0,{type:"single",collapsible:!0,children:(0,o.jsxs)(F0,{value:"item-1",className:"text-muted-foreground border-muted-foreground-20",children:[c,(0,o.jsx)(P0,{className:"text-[0.84375rem]",children:(0,o.jsx)(bm,{container:a,children:u})})]})}),e[8]=a,e[9]=u,e[10]=p):p=e[10];let m;return e[11]!==d||e[12]!==p?(m=(0,o.jsxs)(Hi,{variant:"destructive",children:[l,d,p]}),e[11]=d,e[12]=p,e[13]=m):m=e[13],m}let i;return e[14]===r.message?i=e[15]:(i=(0,o.jsx)("div",{children:r.message}),e[14]=r.message,e[15]=i),i};function V0(t,e,r){return(0,o.jsx)(L0,{error:t,badData:e,shadowRoot:r})}function D0(t){let e=t.path.join(".");return(0,o.jsxs)("li",{children:[(0,o.jsx)("span",{className:"font-bold",children:e}),": ",t.message]},e)}function H0({hostElement:t,plugin:e,children:r,getInitialValue:n},a){let[i,l]=(0,j.useState)(r),[s,d]=(0,j.useState)(n()),{theme:c}=In(),[u,p]=(0,j.useState)(()=>e.validator.safeParse(rs(t))),[m,f]=(0,j.useState)(0);(0,j.useImperativeHandle)(a,()=>({reset:()=>{d(n()),p(e.validator.safeParse(rs(t))),f(w=>w+1)},setChildren:w=>{l(w)}})),ls(t,DS.TYPE,w=>{w.detail.element===t&&d(w.detail.value)}),(0,j.useEffect)(()=>{let w=new MutationObserver(b=>{b.some(v=>{var y;return v.type==="attributes"&&((y=v.attributeName)==null?void 0:y.startsWith("data-"))})&&p(e.validator.safeParse(rs(t)))});return w.observe(t,{attributes:!0}),()=>{w.disconnect()}},[t,e.validator]);let g=$e(w=>{d(b=>{let v=hr.asUpdater(w)(b);return I0(v,b)||t.dispatchEvent(Ym(v,t)),v})}),x=(0,j.useMemo)(()=>{if(!e.functions)return{};let w={};for(let[b,v]of Gr.entries(e.functions)){let{input:y,output:S}=v;w[b]=async(...C)=>{var A;Nn(C.length<=1,`Plugin functions only supports a single argument. Called ${b}`);let _=zo(t);Nn(_,"Object ID should exist");let k=xa(),h=(A=Mp.findElementThroughShadowDOMs(t))==null?void 0:A.id,N=h?Mp.parse(h):null;if(N&&!k){let R=De.get(Fp),z=R.cellRuntime[N],E=R.cellData[N];if(K2({executionTime:z.runElapsedTimeMs??E.lastExecutionTime,status:z.status,errored:z.errored,interrupted:z.interrupted,stopped:z.stopped}))throw new MS}else ue.warn(`Cell ID ${N} cannot be found`);let T=await Mj.request({args:Sc(y,C[0]),functionName:b,namespace:_});if(T.status.code!=="ok")throw ue.error(T.status),Error(T.status.message||"Unknown error");return Sc(S,T.return_value)}}return w},[e.functions,t,m]);return u.success?(0,o.jsx)(cC,{children:(0,o.jsx)("div",{className:`contents ${c}`,children:(0,o.jsx)(j.Suspense,{fallback:(0,o.jsx)("div",{}),children:(0,o.jsx)(ba,{children:e.render({setValue:g,value:s,data:u.data,children:i,host:t,functions:x})})})})}):V0(u.error,Gr.mapValues(t.dataset,w=>typeof w=="string"?zp(w):w),t.shadowRoot)}var B0=j.forwardRef(H0),Eo=new Map,jc="__custom_marimo_element__";function Cc(t){let e=class extends HTMLElement{constructor(){super();B(this,"mounted",!1);B(this,"pluginRef",(0,j.createRef)());B(this,"__type__",jc);this.attachShadow({mode:"open"}),this.copyStyles(),this.observer=new MutationObserver(()=>{var n;(n=this.pluginRef.current)==null||n.setChildren(this.getChildren())})}connectedCallback(){this.isLightDOMChildOfMarimoElement()||(this.mounted||(Nn(this.shadowRoot,"Shadow root should exist"),this.root&&this.root.unmount(),this.root=Wh.createRoot(this.shadowRoot),this.mountReactComponent()),this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0,characterData:!0}))}disconnectedCallback(){var n;this.observer.disconnect(),(n=this.root)==null||n.unmount(),this.mounted&&(this.mounted=!1)}isLightDOMChildOfMarimoElement(){let n=this.parentElement;for(;n;){if(Ro(n))return!0;n=n.parentElement}return!1}reset(){this.dispatchEvent(Ym(zp(this.dataset.initialValue),this)),this.rerender()}rerender(){var n;(n=this.pluginRef.current)==null||n.reset()}getChildren(){return this.children.length===0?null:this.children.length===1?qe({html:this.innerHTML,alwaysSanitizeHtml:!1}):Array.from(this.children).map((n,a)=>(0,o.jsx)(j.Fragment,{children:qe({html:n.outerHTML,alwaysSanitizeHtml:!1})},a))}async mountReactComponent(){this.mounted=!0,Nn(this.root,"Root must be defined"),this.root.render((0,o.jsx)(_i,{store:De,children:(0,o.jsx)(So,{children:(0,o.jsx)(B0,{hostElement:this,plugin:t,ref:this.pluginRef,getInitialValue:()=>U2(this,Ij.INSTANCE),children:this.getChildren()})})}))}async copyStyles(){let n=this.shadowRoot;if(Nn(n,"Shadow root should exist"),!this.isAdoptedStyleSheetsSupported()){ue.warn("adoptedStyleSheets not supported, copying stylesheets in a less performance way. Please consider upgrading your browser."),this.copyStylesFallback();return}let a=Array.from(document.styleSheets).filter(i=>i.ownerNode instanceof HTMLElement&&i.ownerNode.dataset.viteDevId?!0:_c(i));for(let i of a){let l=i.href??(i.ownerNode instanceof HTMLElement?i.ownerNode.dataset.viteDevId:void 0)??i.title;if(l&&!Eo.has(l)){let s=new CSSStyleSheet;try{s.replaceSync(Array.from(i.cssRules).map(d=>d.cssText.includes("@import")?"":d.cssText).join(`
|
|
3
3
|
`))}catch{}Eo.set(l,s)}}if(n.adoptedStyleSheets=[...Eo.values()],t.cssStyles){let i=new CSSStyleSheet;i.replaceSync(t.cssStyles.join(`
|
|
4
4
|
`)),n.adoptedStyleSheets=[...n.adoptedStyleSheets,i]}}copyStylesFallback(){let n=this.shadowRoot;Nn(n,"Shadow root should exist"),ue.warn("adoptedStyleSheets not supported, copying stylesheets in a less performance way. Please consider upgrading your browser.");let a=Array.from(document.styleSheets).flatMap(i=>{if(!_c(i))return[];let l=document.createElement("style");try{l.textContent=Array.from(i.cssRules).map(s=>s.cssText).join(`
|
|
5
5
|
`)}catch{return[]}return[l]});if(n.append(...a),t.cssStyles){let i=document.createElement("style");i.textContent=t.cssStyles.join(`
|
|
6
|
-
`),n.append(i)}}isAdoptedStyleSheetsSupported(){return"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype}};Io(t.tagName,e)}function _c(t){var e;return(e=t.title)!=null&&e.startsWith("marimo")?!0:!t.href||!t.href.endsWith(".css")?!1:(t.href.includes("127.0.0.1"),t.href.includes("/@marimo-team/")?!0:t.href.startsWith(window.location.origin))}function Ro(t){return!t||!(t instanceof HTMLElement)?!1:"__type__"in t&&t.__type__===jc}function Sc(t,e){let r=t.safeParse(e);if(!r.success)throw ue.log("Failed to parse data",e,r.error),Error(jj(r.error));return r.data}var Da="MARIMO-UI-ELEMENT";function W0(){class t extends HTMLElement{constructor(){super(...arguments);B(this,"initialized",!1);B(this,"inputListener",hr.NOOP)}init(){if(this.initialized)return;let n=kn.parseOrThrow(this);this.inputListener=i=>{n!==null&&i.detail.element===this.firstElementChild&&(Ar.has(n)||Ar.registerInstance(n,a),Ar.broadcastValueUpdate(a,n,i.detail.value))};let a=this.firstElementChild;if(n===null){ue.error("[marimo-ui-element] missing object-id attribute");return}if(a===null){ue.error("[marimo-ui-element] has no child");return}if(!(a instanceof HTMLElement)){ue.error("[marimo-ui-element] first child must be instance of HTMLElement");return}this.initialized=!0}connectedCallback(){if(this.init(),this.initialized){let n=kn.parseOrThrow(this),a=this.firstElementChild;Ar.registerInstance(n,a),document.addEventListener(Rn.TYPE,this.inputListener)}}disconnectedCallback(){if(this.initialized){document.removeEventListener(Rn.TYPE,this.inputListener);let n=kn.parseOrThrow(this);Ar.removeInstance(n,this.firstElementChild)}}reset(){let n=this.firstElementChild;Ro(n)?n.reset():ue.error("[marimo-ui-element] first child must have a reset method")}static get observedAttributes(){return[Ur]}attributeChangedCallback(n,a,i){if(this.initialized&&n==="random-id"&&a!==i){this.disconnectedCallback();let l=this.firstElementChild;Ro(l)?l.rerender():ue.error("[marimo-ui-element] first child must have a rerender method"),this.initialized=!1,this.connectedCallback()}}}Io(Da.toLowerCase(),t)}function zo(t){if(!t)return null;if(t.nodeName===Da)return kn.parseOrThrow(t);let e=t.parentElement;return(e==null?void 0:e.nodeName)===Da?kn.parseOrThrow(e):null}function $0(t){return t.tagName===Da}var q0=(0,CS().init)({length:6});function U0(){Io("marimo-sidebar",class extends HTMLElement{constructor(){super(...arguments);B(this,"uniqueId",Symbol(q0()))}connectedCallback(){this.mountReactComponent(),this.observer=new MutationObserver(()=>{this.updateReactComponent()}),this.style.display="none",this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.observer&&(this.observer.disconnect(),this.unmountReactComponent())}mountReactComponent(){this.syncWidth(),wa.mount({name:zi.SIDEBAR,ref:this.uniqueId,children:this.getContents()})}unmountReactComponent(){wa.unmount({name:zi.SIDEBAR,ref:this.uniqueId})}updateReactComponent(){this.syncWidth(),wa.update({name:zi.SIDEBAR,ref:this.uniqueId,children:this.getContents()})}syncWidth(){try{let e=this.dataset.width;e?De.set(Up,{type:"setWidth",width:JSON.parse(e)}):De.set(Up,{type:"setWidth",width:void 0})}catch(e){ue.error(e)}}getContents(){return qe({html:this.innerHTML})}})}function Pt(t,e={}){return{withData(r){return{withFunctions(n){return{renderer(a){return{...e,tagName:t,validator:r,functions:n,render:a}}}},renderer(n){return{...e,tagName:t,validator:r,render:n}}}}}}var Mo=ee();function Y0(t){let e=(0,Mo.c)(16),{jsUrl:r,jsHash:n}=t,a;e[0]!==n||e[1]!==r?(a=async()=>await Yp.getModule(r,n),e[0]=n,e[1]=r,e[2]=a):a=e[2];let i;e[3]===n?i=e[4]:(i=[n],e[3]=n,e[4]=i);let{data:l,error:s,refetch:d}=Rt(a,i),c=!!s,u;e[5]!==c||e[6]!==n||e[7]!==r||e[8]!==d?(u=()=>{c&&r&&(Yp.invalidate(n),d())},e[5]=c,e[6]=n,e[7]=r,e[8]=d,e[9]=u):u=e[9];let p;e[10]!==c||e[11]!==r?(p=[c,r],e[10]=c,e[11]=r,e[12]=p):p=e[12],(0,j.useEffect)(u,p);let m;return e[13]!==s||e[14]!==l?(m={jsModule:l,error:s},e[13]=s,e[14]=l,e[15]=m):m=e[15],m}function G0(t,e){(0,j.useEffect)(()=>{let r=e.shadowRoot;if(!t||!r)return;if("adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype){let a=new CSSStyleSheet;try{return a.replaceSync(t),r&&(r.adoptedStyleSheets=[...r.adoptedStyleSheets,a]),()=>{r&&(r.adoptedStyleSheets=r.adoptedStyleSheets.filter(i=>i!==a))}}catch{}}let n=document.createElement("style");return n.innerHTML=t,r.append(n),()=>{n.remove()}},[t,e])}const K0=Pt("marimo-anywidget").withData(F({jsUrl:I(),jsHash:I(),modelId:I().transform(t=>t)})).withFunctions({}).renderer(t=>(0,o.jsx)(Q0,{...t}));var Q0=t=>{let e=(0,Mo.c)(14),{jsUrl:r,jsHash:n,modelId:a}=t.data,i=t.host,l;e[0]!==n||e[1]!==r?(l={jsUrl:r,jsHash:n},e[0]=n,e[1]=r,e[2]=l):l=e[2];let{jsModule:s,error:d}=Y0(l);if(d){let p;return e[3]===d?p=e[4]:(p=(0,o.jsx)(Ca,{error:d}),e[3]=d,e[4]=p),p}if(!s)return null;if(!Z0(s)){let p=`Module at ${r} does not appear to be a valid anywidget`,m;e[5]===p?m=e[6]:(m=Error(p),e[5]=p,e[6]=m);let f=m,g;return e[7]===f?g=e[8]:(g=(0,o.jsx)(Ca,{error:f}),e[7]=f,e[8]=g),g}let c=`${n}:${a}`,u;return e[9]!==i||e[10]!==s.default||e[11]!==a||e[12]!==c?(u=(0,o.jsx)(J0,{widget:s.default,modelId:a,host:i},c),e[9]=i,e[10]=s.default,e[11]=a,e[12]=c,e[13]=u):u=e[13],u};async function X0(t,e,r,n,a){n.innerHTML="";try{await(await Pj.getOrCreate(r).bind(t,e))(n,a)}catch(i){ue.error("Error rendering anywidget",i),n.classList.add("text-error"),n.innerHTML=`Error rendering anywidget: ${qm(i)}`}}function Z0(t){var e,r;return t.default?typeof t.default=="function"||typeof((e=t.default)==null?void 0:e.render)=="function"||typeof((r=t.default)==null?void 0:r.initialize)=="function":!1}var J0=t=>{let e=(0,Mo.c)(9),{widget:r,modelId:n,host:a}=t,i=(0,j.useRef)(null),l,s;e[0]===n?(l=e[1],s=e[2]):(l=os.getSync(n),l||ue.error("Model not found for modelId",n),s=l==null?void 0:l.get("_css"),e[0]=n,e[1]=l,e[2]=s),G0(s,a);let d,c;e[3]!==l||e[4]!==n||e[5]!==r?(d=()=>{if(!i.current||!l)return;let p=new AbortController;return X0(r,l,n,i.current,p.signal),()=>p.abort()},c=[r,n,l],e[3]=l,e[4]=n,e[5]=r,e[6]=d,e[7]=c):(d=e[6],c=e[7]),(0,j.useEffect)(d,c);let u;return e[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)("div",{ref:i}),e[8]=u):u=e[8],u};const kc=ye(["neutral","success","warn","danger","info","alert"]).default("neutral");var eg=class{constructor(){B(this,"tagName","marimo-button");B(this,"validator",F({label:I(),kind:kc,disabled:V().default(!1),fullWidth:V().default(!1),tooltip:I().optional(),keyboardShortcut:I().optional()}))}render(t){let{data:{disabled:e,kind:r,label:n,fullWidth:a,tooltip:i,keyboardShortcut:l}}=t,s=(0,o.jsx)(ze,{"data-testid":"marimo-plugin-button",variant:tg(r),disabled:e,size:"xs",keyboardShortcut:l,className:Z({"w-full":a,"w-fit":!a}),onClick:c=>{e||(c.stopPropagation(),t.setValue(u=>u+1))},type:"submit",children:qe({html:n})}),d=l&&!i?(0,o.jsx)(Xm,{shortcut:l}):i;return d?(0,o.jsx)(gr,{content:d,delayDuration:200,children:s}):s}};function tg(t){switch(t){case"neutral":return"secondary";case"danger":return"destructive";case"warn":return"warn";case"success":return"success"}}var rg=ee();const Je=t=>{let e=(0,rg.c)(27),{label:r,children:n,align:a,className:i,labelClassName:l,fullWidth:s,id:d}=t,c=a===void 0?"left":a;if(s&&(c="top"),!r){if(c==="top"){let k;return e[0]!==n||e[1]!==i?(k=(0,o.jsx)("div",{className:i,children:n}),e[0]=n,e[1]=i,e[2]=k):k=e[2],k}let C;e[3]===i?C=e[4]:(C=Z("inline-flex",i),e[3]=i,e[4]=C);let _;return e[5]!==n||e[6]!==C?(_=(0,o.jsx)("div",{className:C,children:n}),e[5]=n,e[6]=C,e[7]=_):_=e[7],_}let u;e[8]===l?u=e[9]:(u=Z("font-prose",l),e[8]=l,e[9]=u);let p;e[10]===r?p=e[11]:(p=qe({html:r}),e[10]=r,e[11]=p);let m;e[12]!==d||e[13]!==u||e[14]!==p?(m=(0,o.jsx)("div",{part:"label",className:"inline-flex items-center m-0 p-0",children:(0,o.jsx)(ys,{htmlFor:d,className:u,children:p})}),e[12]=d,e[13]=u,e[14]=p,e[15]=m):m=e[15];let f=m,g=c==="top"&&"flex-col items-start gap-y-2",x=c==="left"&&"flex-row items-center gap-x-1.5 pr-2",w=c==="right"&&"flex-row-reverse items-center gap-x-1.5 pr-2",b=s&&"block space-y-2",v=!s&&"w-fit",y;e[16]!==i||e[17]!==g||e[18]!==x||e[19]!==w||e[20]!==b||e[21]!==v?(y=Z("mo-label inline-flex","pt-0 pb-0 pl-0",g,x,w,b,v,i),e[16]=i,e[17]=g,e[18]=x,e[19]=w,e[20]=b,e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==n||e[24]!==f||e[25]!==y?(S=(0,o.jsxs)("div",{className:y,children:[f,n]}),e[23]=n,e[24]=f,e[25]=y,e[26]=S):S=e[26],S};var ng=ee(),ag=class{constructor(){B(this,"tagName","marimo-checkbox");B(this,"validator",F({initialValue:V(),label:I().nullable(),disabled:V().optional()}))}render(t){return(0,o.jsx)(ig,{...t})}},ig=t=>{let e=(0,ng.c)(11),{value:r,setValue:n,data:a}=t,i;e[0]===n?i=e[1]:(i=u=>{u!=="indeterminate"&&n(u)},e[0]=n,e[1]=i);let l=i,s=(0,j.useId)(),d;e[2]!==a.disabled||e[3]!==s||e[4]!==l||e[5]!==r?(d=(0,o.jsx)(ki,{"data-testid":"marimo-plugin-checkbox",checked:r,onCheckedChange:l,id:s,disabled:a.disabled}),e[2]=a.disabled,e[3]=s,e[4]=l,e[5]=r,e[6]=d):d=e[6];let c;return e[7]!==a.label||e[8]!==s||e[9]!==d?(c=(0,o.jsx)(Je,{label:a.label,align:"right",id:s,children:d}),e[7]=a.label,e[8]=s,e[9]=d,e[10]=c):c=e[10],c},og=ee(),lg=class{constructor(){B(this,"tagName","marimo-code-editor");B(this,"validator",F({initialValue:I(),language:I().default("python"),placeholder:I(),theme:ye(["light","dark"]).optional(),label:I().nullable(),disabled:V().optional(),minHeight:L().optional(),maxHeight:L().optional(),showCopyButton:V().optional(),debounce:Ne([V(),L()]).default(!1)}))}render(t){return(0,o.jsx)(sg,{...t.data,value:t.value,setValue:t.setValue})}},sg=t=>{let e=(0,og.c)(34),{theme:r}=In(),n=t.theme||r,a=t.minHeight?`${t.minHeight}px`:"70px",i=t.maxHeight?`${t.maxHeight}px`:void 0,[l,s]=(0,j.useState)(t.value),d=Number.isFinite(t.debounce)?t.debounce:0,c=!Number.isFinite(t.debounce),u;e[0]!==t.setValue||e[1]!==t.value||e[2]!==d||e[3]!==c?(u={initialValue:t.value,delay:d,onChange:t.setValue,disabled:c},e[0]=t.setValue,e[1]=t.value,e[2]=d,e[3]=c,e[4]=u):u=e[4];let{onChange:p}=Wm(u),m;e[5]!==t||e[6]!==p?(m=N=>{s(T=>N),typeof t.debounce=="number"?p(N):t.debounce||t.setValue(N)},e[5]=t,e[6]=p,e[7]=m):m=e[7];let f=$e(m),g,x;e[8]===t.value?(g=e[9],x=e[10]):(g=()=>{s(t.value)},x=[t.value],e[8]=t.value,e[9]=g,e[10]=x),(0,j.useEffect)(g,x);let w;e[11]!==l||e[12]!==t?(w=()=>{t.setValue(l)},e[11]=l,e[12]=t,e[13]=w):w=e[13];let b=$e(w),v;e:{if(t.debounce===!0){let T;e[14]===b?T=e[15]:(T=h_.domEventHandlers({blur:b}),e[14]=b,e[15]=T);let A;e[16]===T?A=e[17]:(A=[T],e[16]=T,e[17]=A),v=A;break e}let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[18]=N):N=e[18],v=N}let y=v,S=`cm *:outline-hidden border rounded overflow-hidden ${n}`,C=n==="dark"?"dark":"light",_=!t.disabled,k;e[19]!==y||e[20]!==f||e[21]!==l||e[22]!==i||e[23]!==a||e[24]!==t.language||e[25]!==t.placeholder||e[26]!==t.showCopyButton||e[27]!==_||e[28]!==S||e[29]!==C?(k=(0,o.jsx)(L_,{className:S,theme:C,minHeight:a,maxHeight:i,placeholder:t.placeholder,editable:_,value:l,language:t.language,onChange:f,showCopyButton:t.showCopyButton,extensions:y}),e[19]=y,e[20]=f,e[21]=l,e[22]=i,e[23]=a,e[24]=t.language,e[25]=t.placeholder,e[26]=t.showCopyButton,e[27]=_,e[28]=S,e[29]=C,e[30]=k):k=e[30];let h;return e[31]!==t.label||e[32]!==k?(h=(0,o.jsx)(Je,{label:t.label,align:"top",fullWidth:!0,children:k}),e[31]=t.label,e[32]=k,e[33]=h):h=e[33],h};const et={input(t){return{output(e){return{input:t,output:e}}}}};var dg=j.lazy(()=>Ct(()=>import("./chat-ui-d-LWtUox.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([334,299,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,298,108,147,145,105,179,152,153,154,155,156,157,158,149,288,300,117,173,118,174,111,112,279,151,335,146,148,336,320,337,129,285,126,106,318]),import.meta.url).then(t=>({default:t.Chatbot}))),Nc=G(F({id:I(),role:ye(["system","user","assistant"]),content:I().nullable(),parts:G(Kt()),metadata:Kt().nullable()})),Tc=F({max_tokens:L().nullable(),temperature:L().nullable(),top_p:L().nullable(),top_k:L().nullable(),frequency_penalty:L().nullable(),presence_penalty:L().nullable()});const cg=Pt("marimo-chatbot").withData(F({prompts:G(I()).default(ir.EMPTY),showConfigurationControls:V(),maxHeight:L().optional(),config:Tc,allowAttachments:Ne([V(),I().array()]),disabled:V().default(!1)})).withFunctions({get_chat_history:et.input(F({})).output(F({messages:Nc})),delete_chat_history:et.input(F({})).output(Yr()),delete_chat_message:et.input(F({index:L()})).output(Yr()),send_prompt:et.input(F({request_id:I(),messages:Nc,config:Tc})).output(Nr()),cancel_prompt:et.input(F({request_id:I()})).output(Yr())}).renderer(t=>{var e;return(0,o.jsx)(j.Suspense,{children:(0,o.jsx)(dg,{prompts:t.data.prompts,showConfigurationControls:t.data.showConfigurationControls,maxHeight:t.data.maxHeight,allowAttachments:t.data.allowAttachments,disabled:t.data.disabled,config:t.data.config,get_chat_history:t.functions.get_chat_history,delete_chat_history:t.functions.delete_chat_history,delete_chat_message:t.functions.delete_chat_message,send_prompt:t.functions.send_prompt,cancel_prompt:t.functions.cancel_prompt,value:((e=t.value)==null?void 0:e.messages)||ir.EMPTY,setValue:r=>t.setValue({messages:r}),host:t.host})})});var ug='.gdg-r17m35ur{background-color:var(--gdg-bg-header-has-focus);box-shadow:0 0 0 1px var(--gdg-border-color);color:var(--gdg-text-group-header);font:var(--gdg-header-font-style)var(--gdg-font-family);min-height:var(--r17m35ur-0);border:none;border-radius:9px;outline:none;flex-grow:1;padding:0 8px}.gdg-c1tqibwd{background-color:var(--gdg-bg-header);align-items:center;padding:0 8px}.gdg-c1tqibwd,.gdg-d19meir1{display:flex}.gdg-d19meir1{box-sizing:border-box;--overlay-top:var(--d19meir1-0);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);left:var(--d19meir1-1);max-height:calc(100vh - var(--d19meir1-4));max-width:400px;min-height:var(--d19meir1-3);min-width:var(--d19meir1-2);text-align:start;top:var(--d19meir1-0);flex-direction:column;width:max-content;position:absolute;overflow:hidden}@keyframes glide_fade_in-gdg-d19meir1{0%{opacity:0}to{opacity:1}}.gdg-d19meir1.gdg-style{background-color:var(--gdg-bg-cell);box-shadow:0 0 0 1px var(--gdg-accent-color),0 0 1px #3e415666,0 6px 12px #3e415626;border-radius:2px;animation:60ms glide_fade_in-gdg-d19meir1}.gdg-d19meir1.gdg-pad{padding:var(--d19meir1-5)8.5px 3px}.gdg-d19meir1 .gdg-clip-region{border-radius:2px;flex-direction:column;flex-grow:1;display:flex;overflow:hidden auto}.gdg-d19meir1 .gdg-clip-region .gdg-growing-entry{height:100%}.gdg-d19meir1 .gdg-clip-region input.gdg-input{border:0;outline:none;width:100%}.gdg-d19meir1 .gdg-clip-region textarea.gdg-input{border:0;outline:none}.gdg-b1ygi5by{flex-wrap:wrap;margin-top:auto;margin-bottom:auto}.gdg-b1ygi5by,.gdg-b1ygi5by .boe-bubble{display:flex}.gdg-b1ygi5by .boe-bubble{background-color:var(--gdg-bg-bubble);border-radius:var(--gdg-rounding-radius,10px);color:var(--gdg-text-dark);justify-content:center;align-items:center;height:20px;margin:2px;padding:0 8px}.gdg-b1ygi5by textarea{opacity:0;width:0;height:0;position:absolute;top:0;left:0}.gdg-u1rrojo{align-items:center;min-height:21px;display:flex}.gdg-u1rrojo,.gdg-u1rrojo .gdg-link-area{flex-grow:1}.gdg-u1rrojo .gdg-link-area{color:var(--gdg-link-color);cursor:pointer;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;margin-right:8px;overflow:hidden;-webkit-text-decoration:underline!important;text-decoration:underline!important}.gdg-u1rrojo .gdg-edit-icon{color:var(--gdg-accent-color);cursor:pointer;flex-shrink:0;justify-content:center;align-items:center;width:32px;display:flex}.gdg-u1rrojo .gdg-edit-icon>*{width:24px;height:24px}.gdg-u1rrojo textarea{opacity:0;width:0;height:0;position:absolute;top:0;left:0}.gdg-n15fjm3e{color:var(--gdg-text-dark);margin:6px 0 3px;display:flex}.gdg-n15fjm3e>input{background-color:var(--gdg-bg-cell);color:var(--gdg-text-dark);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);padding:0}.gdg-i2iowwq,.gdg-i2iowwq .gdg-centering-container{height:100%;display:flex}.gdg-i2iowwq .gdg-centering-container{justify-content:center;align-items:center}.gdg-i2iowwq .gdg-centering-container canvas,.gdg-i2iowwq .gdg-centering-container img{max-height:calc(100vh - var(--overlay-top) - 20px);object-fit:contain;user-select:none}.gdg-i2iowwq .gdg-centering-container canvas{max-width:380px}.gdg-i2iowwq .gdg-edit-icon{color:var(--gdg-accent-color);cursor:pointer;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:absolute;top:12px;right:0}.gdg-i2iowwq .gdg-edit-icon>*{width:24px;height:24px}.gdg-i2iowwq textarea{opacity:0;width:0;height:0;position:absolute;top:0;left:0}.gdg-m1pnx84e{min-width:var(--m1pnx84e-0);-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;width:100%;color:var(--gdg-text-dark);justify-content:space-between;align-items:flex-start;display:flex;position:relative}.gdg-m1pnx84e .gdg-g1y0xocz{flex-shrink:1;min-width:0}.gdg-m1pnx84e .gdg-spacer{flex:1}.gdg-m1pnx84e .gdg-edit-icon{cursor:pointer;color:var(--gdg-accent-color);width:24px;height:24px;-webkit-transition:all "0.125s ease";transition:all "0.125s ease";border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex;position:relative}.gdg-m1pnx84e .gdg-edit-icon>*{width:16px;height:16px}.gdg-m1pnx84e .gdg-edit-hover:hover{background-color:var(--gdg-accent-light);transition:background-color .15s}.gdg-m1pnx84e .gdg-checkmark-hover:hover{background-color:var(--gdg-accent-color);color:#fff}.gdg-m1pnx84e .gdg-md-edit-textarea{opacity:0;width:0;height:0;margin-top:25px;padding:0;position:relative;top:0;left:0}.gdg-m1pnx84e .gdg-ml-6{margin-left:6px}.gdg-d4zsq0x{flex-wrap:wrap}.gdg-d4zsq0x,.gdg-d4zsq0x .doe-bubble{display:flex}.gdg-d4zsq0x .doe-bubble{background-color:var(--gdg-bg-cell);border-radius:var(--gdg-rounding-radius,6px);color:var(--gdg-text-dark);justify-content:center;align-items:center;height:24px;margin:2px;padding:0 8px;box-shadow:0 0 1px #3e415666,0 1px 3px #3e415666}.gdg-d4zsq0x .doe-bubble img{object-fit:contain;height:16px;margin-right:4px}.gdg-d4zsq0x textarea{opacity:0;width:0;height:0;position:absolute;top:0;left:0}.gdg-s1dgczr6 .dvn-scroller{overflow:var(--s1dgczr6-0);transform:translateZ(0)}.gdg-s1dgczr6 .dvn-hidden{visibility:hidden}.gdg-s1dgczr6 .dvn-scroll-inner{pointer-events:none;display:flex}.gdg-s1dgczr6 .dvn-scroll-inner>*{flex-shrink:0}.gdg-s1dgczr6 .dvn-scroll-inner .dvn-spacer{flex-grow:1}.gdg-s1dgczr6 .dvn-scroll-inner .dvn-stack{flex-direction:column;display:flex}.gdg-s1dgczr6 .dvn-underlay>*{position:absolute;top:0;left:0}.gdg-s1dgczr6 canvas{outline:none}.gdg-s1dgczr6 canvas *{height:0}.gdg-izpuzkl{font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);resize:none;white-space:pre-wrap;-webkit-text-fill-color:var(--gdg-text-dark);width:100%;min-width:100%;height:100%;color:var(--gdg-text-dark);background-color:#0000;border:0;border-radius:0;margin:0;padding:0;line-height:16px;position:absolute;inset:0;overflow:hidden}.gdg-izpuzkl::-webkit-input-placeholder{color:var(--gdg-text-light)}.gdg-izpuzkl::placeholder{color:var(--gdg-text-light)}.gdg-izpuzkl:-ms-placeholder-shown{color:var(--gdg-text-light)}.gdg-izpuzkl::placeholder{color:var(--gdg-text-light)}.gdg-invalid .gdg-izpuzkl{text-decoration:underline #d60606}.gdg-s69h75o{visibility:hidden;white-space:pre-wrap;word-wrap:break-word;color:var(--gdg-text-dark);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);width:max-content;min-width:100%;max-width:100%;margin:0;padding:0 0 2px;line-height:16px}.gdg-g1y0xocz{margin-top:6px;position:relative}.gdg-wmyidgi{height:var(--wmyidgi-1);min-width:10px;max-width:100%;min-height:10px;max-height:100%;width:var(--wmyidgi-0);direction:ltr;position:relative;overflow:clip}.gdg-wmyidgi>:first-child{width:100%;height:100%;position:absolute;top:0;left:0}.gdg-seveqep{background-color:var(--gdg-bg-cell);border:1px solid var(--gdg-border-color);color:var(--gdg-text-dark);font-size:var(--gdg-editor-font-size);border-radius:6px;padding:8px;animation:.15s forwards gdg-search-fadein-gdg-seveqep;position:absolute;top:4px;right:20px}.gdg-seveqep.out{animation:.15s forwards gdg-search-fadeout-gdg-seveqep}.gdg-seveqep .gdg-search-bar-inner{display:flex}.gdg-seveqep .gdg-search-status{padding-top:4px;font-size:11px}.gdg-seveqep .gdg-search-progress{background-color:var(--gdg-text-light);height:4px;position:absolute;bottom:0;left:0}.gdg-seveqep input{background-color:var(--gdg-bg-cell);color:var(--gdg-textDark);border:0;outline:none;width:220px}.gdg-seveqep button{width:24px;height:24px;color:var(--gdg-text-medium);cursor:pointer;background:0 0;border:none;outline:none;justify-content:center;align-items:center;padding:0;display:flex}.gdg-seveqep button:hover{color:var(--gdg-text-dark)}.gdg-seveqep button .button-icon{width:16px;height:16px}.gdg-seveqep button:disabled{opacity:.4;pointer-events:none}@keyframes gdg-search-fadeout-gdg-seveqep{0%{transform:translate(0)}to{transform:translate(400px)}}@keyframes gdg-search-fadein-gdg-seveqep{0%{transform:translate(400px)}to{transform:translate(0)}}.gdg-mnuv029{word-break:break-word;-webkit-touch-callout:default;padding-top:6px}.gdg-mnuv029>*{margin:0}.gdg-mnuv029 :last-child{margin-bottom:0}.gdg-mnuv029 p img{width:100%}',pg=ee();const Ac=t=>{let e=(0,pg.c)(14),{wrapperClassName:r,className:n,pageSize:a}=t,i=a===void 0?10:a,l;e[0]===r?l=e[1]:(l=Z(r,"flex flex-col space-y-2"),e[0]=r,e[1]=l);let s=n||"rounded-md border",d;e[2]===s?d=e[3]:(d=Z(s),e[2]=s,e[3]=d);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsx)(Gm,{children:Array.from({length:1}).map(hg)}),e[4]=c):c=e[4];let u;e[5]===i?u=e[6]:(u=(0,o.jsxs)(Os,{children:[c,(0,o.jsx)(Fs,{children:Array.from({length:i}).map(gg)})]}),e[5]=i,e[6]=u);let p;e[7]!==d||e[8]!==u?(p=(0,o.jsx)("div",{part:"table-wrapper",className:d,children:u}),e[7]=d,e[8]=u,e[9]=p):p=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsx)("div",{className:"flex align-items justify-between shrink-0 h-8"}),e[10]=m):m=e[10];let f;return e[11]!==l||e[12]!==p?(f=(0,o.jsxs)("div",{className:l,children:[p,m]}),e[11]=l,e[12]=p,e[13]=f):f=e[13],f};function mg(t,e){return(0,o.jsx)(Ps,{children:(0,o.jsx)("div",{className:"h-4 bg-(--slate-5) animate-pulse rounded-md w-[70%]"})},e)}function hg(t,e){return(0,o.jsx)(zn,{children:Array.from({length:8}).map(mg)},e)}function fg(t,e){return(0,o.jsx)(tn,{children:(0,o.jsx)("div",{className:"h-4 bg-(--slate-5) animate-pulse rounded-md w-[90%]"})},e)}function gg(t,e){return(0,o.jsx)(zn,{children:Array.from({length:8}).map(fg)},e)}const Ha=["string","boolean","integer","number","date","datetime","time","unknown"];var xg=ee(),vg=j.lazy(()=>Ct(()=>import("./glide-data-editor-DqKNgyfg.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([338,4,107,12,13,8,9,10,11,6,7,35,68,14,15,16,18,20,19,69,79,78,25,60,29,61,62,80,44,41,26,81,82,83,84,21,77,17,23,39,339,40,24,27,28,30,42,93,340,341,164,97,98,280,281,342]),import.meta.url));const wg=Pt("marimo-data-editor",{cssStyles:[ug]}).withData(F({initialValue:F({edits:G(F({rowIdx:L(),columnId:I(),value:Nr()}))}),label:I().nullable(),data:Ne([I(),G(F({}).passthrough())]),fieldTypes:G(Qt([Wp(),Qt([ye(Ha),I()])])).nullish(),editableColumns:Ne([G(I()),Xe("all")]),columnSizingMode:ye(["auto","fit"]).default("auto")})).withFunctions({}).renderer(t=>(0,o.jsx)(bg,{data:t.data.data,fieldTypes:t.data.fieldTypes,edits:t.value,onEdits:t.setValue,host:t.host,editableColumns:t.data.editableColumns}));var bg=t=>{let e=(0,xg.c)(31),r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],e[0]=r):r=e[0];let[n,a]=(0,j.useState)(r),i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=new Map,e[1]=i):i=e[1];let[l,s]=(0,j.useState)(i),d,c;e[2]!==t.data||e[3]!==t.fieldTypes?(d=async()=>{let v=bs(t.fieldTypes??[]),y=Array.isArray(t.data)?t.data:await Um(t.data,{type:"csv",parse:PS(Object.fromEntries(v))},{handleBigIntAndNumberLike:!0});a(y),s(bs(t.fieldTypes??xs(y)))},c=[t.fieldTypes,t.data],e[2]=t.data,e[3]=t.fieldTypes,e[4]=d,e[5]=c):(d=e[4],c=e[5]);let{error:u}=Rt(d,c);if(u){let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=(0,o.jsx)(Ms,{children:"Error"}),e[6]=v):v=e[6];let y=u.message||"An unknown error occurred",S;return e[7]===y?S=e[8]:(S=(0,o.jsxs)(Hi,{variant:"destructive",className:"mb-2",children:[v,(0,o.jsx)("div",{className:"text-md",children:y})]}),e[7]=y,e[8]=S),S}if(!n){let v;return e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,o.jsx)(gs,{milliseconds:200,children:(0,o.jsx)(Ac,{pageSize:10})}),e[9]=v):v=e[9],v}let p;e[10]===t?p=e[11]:(p=v=>{t.onEdits(y=>({...y,edits:[...y.edits,...v]}))},e[10]=t,e[11]=p);let m;e[12]!==n||e[13]!==t?(m=v=>{let y=v.flatMap((S,C)=>Object.entries(S).map(_=>{let[k,h]=_;return{rowIdx:n.length+C,columnId:k,value:h}}));t.onEdits(S=>({...S,edits:[...S.edits,...y]}))},e[12]=n,e[13]=t,e[14]=m):m=e[14];let f,g,x,w;e[15]===t?(f=e[16],g=e[17],x=e[18],w=e[19]):(f=v=>{t.onEdits(y=>{let S=v.map(yg);return{...y,edits:[...y.edits,...S]}})},g=(v,y)=>{t.onEdits(S=>({...S,edits:[...S.edits,{columnIdx:v,newName:y,type:Li.Rename}]}))},x=v=>{t.onEdits(y=>({...y,edits:[...y.edits,{columnIdx:v,type:Li.Remove}]}))},w=(v,y)=>{t.onEdits(S=>({...S,edits:[...S.edits,{columnIdx:v,newName:y,type:Li.Insert}]}))},e[15]=t,e[16]=f,e[17]=g,e[18]=x,e[19]=w);let b;return e[20]!==l||e[21]!==n||e[22]!==t.editableColumns||e[23]!==t.edits.edits||e[24]!==p||e[25]!==m||e[26]!==f||e[27]!==g||e[28]!==x||e[29]!==w?(b=(0,o.jsx)(vg,{data:n,setData:a,columnFields:l,setColumnFields:s,editableColumns:t.editableColumns,edits:t.edits.edits,onAddEdits:p,onAddRows:m,onDeleteRows:f,onRenameColumn:g,onDeleteColumn:x,onAddColumn:w}),e[20]=l,e[21]=n,e[22]=t.editableColumns,e[23]=t.edits.edits,e[24]=p,e[25]=m,e[26]=f,e[27]=g,e[28]=x,e[29]=w,e[30]=b):b=e[30],b};function yg(t,e){return{rowIdx:t-e,type:Li.Remove}}var jg=" ";function Ba(t){return t.split(`
|
|
6
|
+
`),n.append(i)}}isAdoptedStyleSheetsSupported(){return"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype}};Io(t.tagName,e)}function _c(t){var e;return(e=t.title)!=null&&e.startsWith("marimo")?!0:!t.href||!t.href.endsWith(".css")?!1:(t.href.includes("127.0.0.1"),t.href.includes("/@marimo-team/")?!0:t.href.startsWith(window.location.origin))}function Ro(t){return!t||!(t instanceof HTMLElement)?!1:"__type__"in t&&t.__type__===jc}function Sc(t,e){let r=t.safeParse(e);if(!r.success)throw ue.log("Failed to parse data",e,r.error),Error(jj(r.error));return r.data}var Da="MARIMO-UI-ELEMENT";function W0(){class t extends HTMLElement{constructor(){super(...arguments);B(this,"initialized",!1);B(this,"inputListener",hr.NOOP)}init(){if(this.initialized)return;let n=kn.parseOrThrow(this);this.inputListener=i=>{n!==null&&i.detail.element===this.firstElementChild&&(Ar.has(n)||Ar.registerInstance(n,a),Ar.broadcastValueUpdate(a,n,i.detail.value))};let a=this.firstElementChild;if(n===null){ue.error("[marimo-ui-element] missing object-id attribute");return}if(a===null){ue.error("[marimo-ui-element] has no child");return}if(!(a instanceof HTMLElement)){ue.error("[marimo-ui-element] first child must be instance of HTMLElement");return}this.initialized=!0}connectedCallback(){if(this.init(),this.initialized){let n=kn.parseOrThrow(this),a=this.firstElementChild;Ar.registerInstance(n,a),document.addEventListener(Rn.TYPE,this.inputListener)}}disconnectedCallback(){if(this.initialized){document.removeEventListener(Rn.TYPE,this.inputListener);let n=kn.parseOrThrow(this);Ar.removeInstance(n,this.firstElementChild)}}reset(){let n=this.firstElementChild;Ro(n)?n.reset():ue.error("[marimo-ui-element] first child must have a reset method")}static get observedAttributes(){return[Ur]}attributeChangedCallback(n,a,i){if(this.initialized&&n==="random-id"&&a!==i){this.disconnectedCallback();let l=this.firstElementChild;Ro(l)?l.rerender():ue.error("[marimo-ui-element] first child must have a rerender method"),this.initialized=!1,this.connectedCallback()}}}Io(Da.toLowerCase(),t)}function zo(t){if(!t)return null;if(t.nodeName===Da)return kn.parseOrThrow(t);let e=t.parentElement;return(e==null?void 0:e.nodeName)===Da?kn.parseOrThrow(e):null}function $0(t){return t.tagName===Da}var q0=(0,CS().init)({length:6});function U0(){Io("marimo-sidebar",class extends HTMLElement{constructor(){super(...arguments);B(this,"uniqueId",Symbol(q0()))}connectedCallback(){this.mountReactComponent(),this.observer=new MutationObserver(()=>{this.updateReactComponent()}),this.style.display="none",this.observer.observe(this,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.observer&&(this.observer.disconnect(),this.unmountReactComponent())}mountReactComponent(){this.syncWidth(),wa.mount({name:zi.SIDEBAR,ref:this.uniqueId,children:this.getContents()})}unmountReactComponent(){wa.unmount({name:zi.SIDEBAR,ref:this.uniqueId})}updateReactComponent(){this.syncWidth(),wa.update({name:zi.SIDEBAR,ref:this.uniqueId,children:this.getContents()})}syncWidth(){try{let e=this.dataset.width;e?De.set(Up,{type:"setWidth",width:JSON.parse(e)}):De.set(Up,{type:"setWidth",width:void 0})}catch(e){ue.error(e)}}getContents(){return qe({html:this.innerHTML})}})}function Pt(t,e={}){return{withData(r){return{withFunctions(n){return{renderer(a){return{...e,tagName:t,validator:r,functions:n,render:a}}}},renderer(n){return{...e,tagName:t,validator:r,render:n}}}}}}var Mo=ee();function Y0(t){let e=(0,Mo.c)(16),{jsUrl:r,jsHash:n}=t,a;e[0]!==n||e[1]!==r?(a=async()=>await Yp.getModule(r,n),e[0]=n,e[1]=r,e[2]=a):a=e[2];let i;e[3]===n?i=e[4]:(i=[n],e[3]=n,e[4]=i);let{data:l,error:s,refetch:d}=Rt(a,i),c=!!s,u;e[5]!==c||e[6]!==n||e[7]!==r||e[8]!==d?(u=()=>{c&&r&&(Yp.invalidate(n),d())},e[5]=c,e[6]=n,e[7]=r,e[8]=d,e[9]=u):u=e[9];let p;e[10]!==c||e[11]!==r?(p=[c,r],e[10]=c,e[11]=r,e[12]=p):p=e[12],(0,j.useEffect)(u,p);let m;return e[13]!==s||e[14]!==l?(m={jsModule:l,error:s},e[13]=s,e[14]=l,e[15]=m):m=e[15],m}function G0(t,e){(0,j.useEffect)(()=>{let r=e.shadowRoot;if(!t||!r)return;if("adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype){let a=new CSSStyleSheet;try{return a.replaceSync(t),r&&(r.adoptedStyleSheets=[...r.adoptedStyleSheets,a]),()=>{r&&(r.adoptedStyleSheets=r.adoptedStyleSheets.filter(i=>i!==a))}}catch{}}let n=document.createElement("style");return n.innerHTML=t,r.append(n),()=>{n.remove()}},[t,e])}const K0=Pt("marimo-anywidget").withData(F({jsUrl:I(),jsHash:I(),modelId:I().transform(t=>t)})).withFunctions({}).renderer(t=>(0,o.jsx)(Q0,{...t}));var Q0=t=>{let e=(0,Mo.c)(14),{jsUrl:r,jsHash:n,modelId:a}=t.data,i=t.host,l;e[0]!==n||e[1]!==r?(l={jsUrl:r,jsHash:n},e[0]=n,e[1]=r,e[2]=l):l=e[2];let{jsModule:s,error:d}=Y0(l);if(d){let p;return e[3]===d?p=e[4]:(p=(0,o.jsx)(Ca,{error:d}),e[3]=d,e[4]=p),p}if(!s)return null;if(!Z0(s)){let p=`Module at ${r} does not appear to be a valid anywidget`,m;e[5]===p?m=e[6]:(m=Error(p),e[5]=p,e[6]=m);let f=m,g;return e[7]===f?g=e[8]:(g=(0,o.jsx)(Ca,{error:f}),e[7]=f,e[8]=g),g}let c=`${n}:${a}`,u;return e[9]!==i||e[10]!==s.default||e[11]!==a||e[12]!==c?(u=(0,o.jsx)(J0,{widget:s.default,modelId:a,host:i},c),e[9]=i,e[10]=s.default,e[11]=a,e[12]=c,e[13]=u):u=e[13],u};async function X0(t,e,r,n,a){n.innerHTML="";try{await(await Pj.getOrCreate(r).bind(t,e))(n,a)}catch(i){ue.error("Error rendering anywidget",i),n.classList.add("text-error"),n.innerHTML=`Error rendering anywidget: ${qm(i)}`}}function Z0(t){var e,r;return t.default?typeof t.default=="function"||typeof((e=t.default)==null?void 0:e.render)=="function"||typeof((r=t.default)==null?void 0:r.initialize)=="function":!1}var J0=t=>{let e=(0,Mo.c)(9),{widget:r,modelId:n,host:a}=t,i=(0,j.useRef)(null),l,s;e[0]===n?(l=e[1],s=e[2]):(l=os.getSync(n),l||ue.error("Model not found for modelId",n),s=l==null?void 0:l.get("_css"),e[0]=n,e[1]=l,e[2]=s),G0(s,a);let d,c;e[3]!==l||e[4]!==n||e[5]!==r?(d=()=>{if(!i.current||!l)return;let p=new AbortController;return X0(r,l,n,i.current,p.signal),()=>p.abort()},c=[r,n,l],e[3]=l,e[4]=n,e[5]=r,e[6]=d,e[7]=c):(d=e[6],c=e[7]),(0,j.useEffect)(d,c);let u;return e[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,o.jsx)("div",{ref:i}),e[8]=u):u=e[8],u};const kc=ye(["neutral","success","warn","danger","info","alert"]).default("neutral");var eg=class{constructor(){B(this,"tagName","marimo-button");B(this,"validator",F({label:I(),kind:kc,disabled:V().default(!1),fullWidth:V().default(!1),tooltip:I().optional(),keyboardShortcut:I().optional()}))}render(t){let{data:{disabled:e,kind:r,label:n,fullWidth:a,tooltip:i,keyboardShortcut:l}}=t,s=(0,o.jsx)(ze,{"data-testid":"marimo-plugin-button",variant:tg(r),disabled:e,size:"xs",keyboardShortcut:l,className:Z({"w-full":a,"w-fit":!a}),onClick:c=>{e||(c.stopPropagation(),t.setValue(u=>u+1))},type:"submit",children:qe({html:n})}),d=l&&!i?(0,o.jsx)(Xm,{shortcut:l}):i;return d?(0,o.jsx)(gr,{content:d,delayDuration:200,children:s}):s}};function tg(t){switch(t){case"neutral":return"secondary";case"danger":return"destructive";case"warn":return"warn";case"success":return"success"}}var rg=ee();const Je=t=>{let e=(0,rg.c)(27),{label:r,children:n,align:a,className:i,labelClassName:l,fullWidth:s,id:d}=t,c=a===void 0?"left":a;if(s&&(c="top"),!r){if(c==="top"){let k;return e[0]!==n||e[1]!==i?(k=(0,o.jsx)("div",{className:i,children:n}),e[0]=n,e[1]=i,e[2]=k):k=e[2],k}let C;e[3]===i?C=e[4]:(C=Z("inline-flex",i),e[3]=i,e[4]=C);let _;return e[5]!==n||e[6]!==C?(_=(0,o.jsx)("div",{className:C,children:n}),e[5]=n,e[6]=C,e[7]=_):_=e[7],_}let u;e[8]===l?u=e[9]:(u=Z("font-prose",l),e[8]=l,e[9]=u);let p;e[10]===r?p=e[11]:(p=qe({html:r}),e[10]=r,e[11]=p);let m;e[12]!==d||e[13]!==u||e[14]!==p?(m=(0,o.jsx)("div",{part:"label",className:"inline-flex items-center m-0 p-0",children:(0,o.jsx)(ys,{htmlFor:d,className:u,children:p})}),e[12]=d,e[13]=u,e[14]=p,e[15]=m):m=e[15];let f=m,g=c==="top"&&"flex-col items-start gap-y-2",x=c==="left"&&"flex-row items-center gap-x-1.5 pr-2",w=c==="right"&&"flex-row-reverse items-center gap-x-1.5 pr-2",b=s&&"block space-y-2",v=!s&&"w-fit",y;e[16]!==i||e[17]!==g||e[18]!==x||e[19]!==w||e[20]!==b||e[21]!==v?(y=Z("mo-label inline-flex","pt-0 pb-0 pl-0",g,x,w,b,v,i),e[16]=i,e[17]=g,e[18]=x,e[19]=w,e[20]=b,e[21]=v,e[22]=y):y=e[22];let S;return e[23]!==n||e[24]!==f||e[25]!==y?(S=(0,o.jsxs)("div",{className:y,children:[f,n]}),e[23]=n,e[24]=f,e[25]=y,e[26]=S):S=e[26],S};var ng=ee(),ag=class{constructor(){B(this,"tagName","marimo-checkbox");B(this,"validator",F({initialValue:V(),label:I().nullable(),disabled:V().optional()}))}render(t){return(0,o.jsx)(ig,{...t})}},ig=t=>{let e=(0,ng.c)(11),{value:r,setValue:n,data:a}=t,i;e[0]===n?i=e[1]:(i=u=>{u!=="indeterminate"&&n(u)},e[0]=n,e[1]=i);let l=i,s=(0,j.useId)(),d;e[2]!==a.disabled||e[3]!==s||e[4]!==l||e[5]!==r?(d=(0,o.jsx)(ki,{"data-testid":"marimo-plugin-checkbox",checked:r,onCheckedChange:l,id:s,disabled:a.disabled}),e[2]=a.disabled,e[3]=s,e[4]=l,e[5]=r,e[6]=d):d=e[6];let c;return e[7]!==a.label||e[8]!==s||e[9]!==d?(c=(0,o.jsx)(Je,{label:a.label,align:"right",id:s,children:d}),e[7]=a.label,e[8]=s,e[9]=d,e[10]=c):c=e[10],c},og=ee(),lg=class{constructor(){B(this,"tagName","marimo-code-editor");B(this,"validator",F({initialValue:I(),language:I().default("python"),placeholder:I(),theme:ye(["light","dark"]).optional(),label:I().nullable(),disabled:V().optional(),minHeight:L().optional(),maxHeight:L().optional(),showCopyButton:V().optional(),debounce:Ne([V(),L()]).default(!1)}))}render(t){return(0,o.jsx)(sg,{...t.data,value:t.value,setValue:t.setValue})}},sg=t=>{let e=(0,og.c)(34),{theme:r}=In(),n=t.theme||r,a=t.minHeight?`${t.minHeight}px`:"70px",i=t.maxHeight?`${t.maxHeight}px`:void 0,[l,s]=(0,j.useState)(t.value),d=Number.isFinite(t.debounce)?t.debounce:0,c=!Number.isFinite(t.debounce),u;e[0]!==t.setValue||e[1]!==t.value||e[2]!==d||e[3]!==c?(u={initialValue:t.value,delay:d,onChange:t.setValue,disabled:c},e[0]=t.setValue,e[1]=t.value,e[2]=d,e[3]=c,e[4]=u):u=e[4];let{onChange:p}=Wm(u),m;e[5]!==t||e[6]!==p?(m=N=>{s(T=>N),typeof t.debounce=="number"?p(N):t.debounce||t.setValue(N)},e[5]=t,e[6]=p,e[7]=m):m=e[7];let f=$e(m),g,x;e[8]===t.value?(g=e[9],x=e[10]):(g=()=>{s(t.value)},x=[t.value],e[8]=t.value,e[9]=g,e[10]=x),(0,j.useEffect)(g,x);let w;e[11]!==l||e[12]!==t?(w=()=>{t.setValue(l)},e[11]=l,e[12]=t,e[13]=w):w=e[13];let b=$e(w),v;e:{if(t.debounce===!0){let T;e[14]===b?T=e[15]:(T=h_.domEventHandlers({blur:b}),e[14]=b,e[15]=T);let A;e[16]===T?A=e[17]:(A=[T],e[16]=T,e[17]=A),v=A;break e}let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[18]=N):N=e[18],v=N}let y=v,S=`cm *:outline-hidden border rounded overflow-hidden ${n}`,C=n==="dark"?"dark":"light",_=!t.disabled,k;e[19]!==y||e[20]!==f||e[21]!==l||e[22]!==i||e[23]!==a||e[24]!==t.language||e[25]!==t.placeholder||e[26]!==t.showCopyButton||e[27]!==_||e[28]!==S||e[29]!==C?(k=(0,o.jsx)(L_,{className:S,theme:C,minHeight:a,maxHeight:i,placeholder:t.placeholder,editable:_,value:l,language:t.language,onChange:f,showCopyButton:t.showCopyButton,extensions:y}),e[19]=y,e[20]=f,e[21]=l,e[22]=i,e[23]=a,e[24]=t.language,e[25]=t.placeholder,e[26]=t.showCopyButton,e[27]=_,e[28]=S,e[29]=C,e[30]=k):k=e[30];let h;return e[31]!==t.label||e[32]!==k?(h=(0,o.jsx)(Je,{label:t.label,align:"top",fullWidth:!0,children:k}),e[31]=t.label,e[32]=k,e[33]=h):h=e[33],h};const et={input(t){return{output(e){return{input:t,output:e}}}}};var dg=j.lazy(()=>Ct(()=>import("./chat-ui-CHaOV403.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([334,299,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,298,108,147,145,105,179,152,153,154,155,156,157,158,149,288,300,117,173,118,174,111,112,279,151,335,146,148,336,320,337,129,285,126,106,318]),import.meta.url).then(t=>({default:t.Chatbot}))),Nc=G(F({id:I(),role:ye(["system","user","assistant"]),content:I().nullable(),parts:G(Kt()),metadata:Kt().nullable()})),Tc=F({max_tokens:L().nullable(),temperature:L().nullable(),top_p:L().nullable(),top_k:L().nullable(),frequency_penalty:L().nullable(),presence_penalty:L().nullable()});const cg=Pt("marimo-chatbot").withData(F({prompts:G(I()).default(ir.EMPTY),showConfigurationControls:V(),maxHeight:L().optional(),config:Tc,allowAttachments:Ne([V(),I().array()]),disabled:V().default(!1)})).withFunctions({get_chat_history:et.input(F({})).output(F({messages:Nc})),delete_chat_history:et.input(F({})).output(Yr()),delete_chat_message:et.input(F({index:L()})).output(Yr()),send_prompt:et.input(F({request_id:I(),messages:Nc,config:Tc})).output(Nr()),cancel_prompt:et.input(F({request_id:I()})).output(Yr())}).renderer(t=>{var e;return(0,o.jsx)(j.Suspense,{children:(0,o.jsx)(dg,{prompts:t.data.prompts,showConfigurationControls:t.data.showConfigurationControls,maxHeight:t.data.maxHeight,allowAttachments:t.data.allowAttachments,disabled:t.data.disabled,config:t.data.config,get_chat_history:t.functions.get_chat_history,delete_chat_history:t.functions.delete_chat_history,delete_chat_message:t.functions.delete_chat_message,send_prompt:t.functions.send_prompt,cancel_prompt:t.functions.cancel_prompt,value:((e=t.value)==null?void 0:e.messages)||ir.EMPTY,setValue:r=>t.setValue({messages:r}),host:t.host})})});var ug='.gdg-r17m35ur{background-color:var(--gdg-bg-header-has-focus);box-shadow:0 0 0 1px var(--gdg-border-color);color:var(--gdg-text-group-header);font:var(--gdg-header-font-style)var(--gdg-font-family);min-height:var(--r17m35ur-0);border:none;border-radius:9px;outline:none;flex-grow:1;padding:0 8px}.gdg-c1tqibwd{background-color:var(--gdg-bg-header);align-items:center;padding:0 8px}.gdg-c1tqibwd,.gdg-d19meir1{display:flex}.gdg-d19meir1{box-sizing:border-box;--overlay-top:var(--d19meir1-0);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);left:var(--d19meir1-1);max-height:calc(100vh - var(--d19meir1-4));max-width:400px;min-height:var(--d19meir1-3);min-width:var(--d19meir1-2);text-align:start;top:var(--d19meir1-0);flex-direction:column;width:max-content;position:absolute;overflow:hidden}@keyframes glide_fade_in-gdg-d19meir1{0%{opacity:0}to{opacity:1}}.gdg-d19meir1.gdg-style{background-color:var(--gdg-bg-cell);box-shadow:0 0 0 1px var(--gdg-accent-color),0 0 1px #3e415666,0 6px 12px #3e415626;border-radius:2px;animation:60ms glide_fade_in-gdg-d19meir1}.gdg-d19meir1.gdg-pad{padding:var(--d19meir1-5)8.5px 3px}.gdg-d19meir1 .gdg-clip-region{border-radius:2px;flex-direction:column;flex-grow:1;display:flex;overflow:hidden auto}.gdg-d19meir1 .gdg-clip-region .gdg-growing-entry{height:100%}.gdg-d19meir1 .gdg-clip-region input.gdg-input{border:0;outline:none;width:100%}.gdg-d19meir1 .gdg-clip-region textarea.gdg-input{border:0;outline:none}.gdg-b1ygi5by{flex-wrap:wrap;margin-top:auto;margin-bottom:auto}.gdg-b1ygi5by,.gdg-b1ygi5by .boe-bubble{display:flex}.gdg-b1ygi5by .boe-bubble{background-color:var(--gdg-bg-bubble);border-radius:var(--gdg-rounding-radius,10px);color:var(--gdg-text-dark);justify-content:center;align-items:center;height:20px;margin:2px;padding:0 8px}.gdg-b1ygi5by textarea{opacity:0;width:0;height:0;position:absolute;top:0;left:0}.gdg-u1rrojo{align-items:center;min-height:21px;display:flex}.gdg-u1rrojo,.gdg-u1rrojo .gdg-link-area{flex-grow:1}.gdg-u1rrojo .gdg-link-area{color:var(--gdg-link-color);cursor:pointer;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;margin-right:8px;overflow:hidden;-webkit-text-decoration:underline!important;text-decoration:underline!important}.gdg-u1rrojo .gdg-edit-icon{color:var(--gdg-accent-color);cursor:pointer;flex-shrink:0;justify-content:center;align-items:center;width:32px;display:flex}.gdg-u1rrojo .gdg-edit-icon>*{width:24px;height:24px}.gdg-u1rrojo textarea{opacity:0;width:0;height:0;position:absolute;top:0;left:0}.gdg-n15fjm3e{color:var(--gdg-text-dark);margin:6px 0 3px;display:flex}.gdg-n15fjm3e>input{background-color:var(--gdg-bg-cell);color:var(--gdg-text-dark);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);padding:0}.gdg-i2iowwq,.gdg-i2iowwq .gdg-centering-container{height:100%;display:flex}.gdg-i2iowwq .gdg-centering-container{justify-content:center;align-items:center}.gdg-i2iowwq .gdg-centering-container canvas,.gdg-i2iowwq .gdg-centering-container img{max-height:calc(100vh - var(--overlay-top) - 20px);object-fit:contain;user-select:none}.gdg-i2iowwq .gdg-centering-container canvas{max-width:380px}.gdg-i2iowwq .gdg-edit-icon{color:var(--gdg-accent-color);cursor:pointer;justify-content:center;align-items:center;width:48px;height:48px;display:flex;position:absolute;top:12px;right:0}.gdg-i2iowwq .gdg-edit-icon>*{width:24px;height:24px}.gdg-i2iowwq textarea{opacity:0;width:0;height:0;position:absolute;top:0;left:0}.gdg-m1pnx84e{min-width:var(--m1pnx84e-0);-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;width:100%;color:var(--gdg-text-dark);justify-content:space-between;align-items:flex-start;display:flex;position:relative}.gdg-m1pnx84e .gdg-g1y0xocz{flex-shrink:1;min-width:0}.gdg-m1pnx84e .gdg-spacer{flex:1}.gdg-m1pnx84e .gdg-edit-icon{cursor:pointer;color:var(--gdg-accent-color);width:24px;height:24px;-webkit-transition:all "0.125s ease";transition:all "0.125s ease";border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex;position:relative}.gdg-m1pnx84e .gdg-edit-icon>*{width:16px;height:16px}.gdg-m1pnx84e .gdg-edit-hover:hover{background-color:var(--gdg-accent-light);transition:background-color .15s}.gdg-m1pnx84e .gdg-checkmark-hover:hover{background-color:var(--gdg-accent-color);color:#fff}.gdg-m1pnx84e .gdg-md-edit-textarea{opacity:0;width:0;height:0;margin-top:25px;padding:0;position:relative;top:0;left:0}.gdg-m1pnx84e .gdg-ml-6{margin-left:6px}.gdg-d4zsq0x{flex-wrap:wrap}.gdg-d4zsq0x,.gdg-d4zsq0x .doe-bubble{display:flex}.gdg-d4zsq0x .doe-bubble{background-color:var(--gdg-bg-cell);border-radius:var(--gdg-rounding-radius,6px);color:var(--gdg-text-dark);justify-content:center;align-items:center;height:24px;margin:2px;padding:0 8px;box-shadow:0 0 1px #3e415666,0 1px 3px #3e415666}.gdg-d4zsq0x .doe-bubble img{object-fit:contain;height:16px;margin-right:4px}.gdg-d4zsq0x textarea{opacity:0;width:0;height:0;position:absolute;top:0;left:0}.gdg-s1dgczr6 .dvn-scroller{overflow:var(--s1dgczr6-0);transform:translateZ(0)}.gdg-s1dgczr6 .dvn-hidden{visibility:hidden}.gdg-s1dgczr6 .dvn-scroll-inner{pointer-events:none;display:flex}.gdg-s1dgczr6 .dvn-scroll-inner>*{flex-shrink:0}.gdg-s1dgczr6 .dvn-scroll-inner .dvn-spacer{flex-grow:1}.gdg-s1dgczr6 .dvn-scroll-inner .dvn-stack{flex-direction:column;display:flex}.gdg-s1dgczr6 .dvn-underlay>*{position:absolute;top:0;left:0}.gdg-s1dgczr6 canvas{outline:none}.gdg-s1dgczr6 canvas *{height:0}.gdg-izpuzkl{font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);resize:none;white-space:pre-wrap;-webkit-text-fill-color:var(--gdg-text-dark);width:100%;min-width:100%;height:100%;color:var(--gdg-text-dark);background-color:#0000;border:0;border-radius:0;margin:0;padding:0;line-height:16px;position:absolute;inset:0;overflow:hidden}.gdg-izpuzkl::-webkit-input-placeholder{color:var(--gdg-text-light)}.gdg-izpuzkl::placeholder{color:var(--gdg-text-light)}.gdg-izpuzkl:-ms-placeholder-shown{color:var(--gdg-text-light)}.gdg-izpuzkl::placeholder{color:var(--gdg-text-light)}.gdg-invalid .gdg-izpuzkl{text-decoration:underline #d60606}.gdg-s69h75o{visibility:hidden;white-space:pre-wrap;word-wrap:break-word;color:var(--gdg-text-dark);font-family:var(--gdg-font-family);font-size:var(--gdg-editor-font-size);width:max-content;min-width:100%;max-width:100%;margin:0;padding:0 0 2px;line-height:16px}.gdg-g1y0xocz{margin-top:6px;position:relative}.gdg-wmyidgi{height:var(--wmyidgi-1);min-width:10px;max-width:100%;min-height:10px;max-height:100%;width:var(--wmyidgi-0);direction:ltr;position:relative;overflow:clip}.gdg-wmyidgi>:first-child{width:100%;height:100%;position:absolute;top:0;left:0}.gdg-seveqep{background-color:var(--gdg-bg-cell);border:1px solid var(--gdg-border-color);color:var(--gdg-text-dark);font-size:var(--gdg-editor-font-size);border-radius:6px;padding:8px;animation:.15s forwards gdg-search-fadein-gdg-seveqep;position:absolute;top:4px;right:20px}.gdg-seveqep.out{animation:.15s forwards gdg-search-fadeout-gdg-seveqep}.gdg-seveqep .gdg-search-bar-inner{display:flex}.gdg-seveqep .gdg-search-status{padding-top:4px;font-size:11px}.gdg-seveqep .gdg-search-progress{background-color:var(--gdg-text-light);height:4px;position:absolute;bottom:0;left:0}.gdg-seveqep input{background-color:var(--gdg-bg-cell);color:var(--gdg-textDark);border:0;outline:none;width:220px}.gdg-seveqep button{width:24px;height:24px;color:var(--gdg-text-medium);cursor:pointer;background:0 0;border:none;outline:none;justify-content:center;align-items:center;padding:0;display:flex}.gdg-seveqep button:hover{color:var(--gdg-text-dark)}.gdg-seveqep button .button-icon{width:16px;height:16px}.gdg-seveqep button:disabled{opacity:.4;pointer-events:none}@keyframes gdg-search-fadeout-gdg-seveqep{0%{transform:translate(0)}to{transform:translate(400px)}}@keyframes gdg-search-fadein-gdg-seveqep{0%{transform:translate(400px)}to{transform:translate(0)}}.gdg-mnuv029{word-break:break-word;-webkit-touch-callout:default;padding-top:6px}.gdg-mnuv029>*{margin:0}.gdg-mnuv029 :last-child{margin-bottom:0}.gdg-mnuv029 p img{width:100%}',pg=ee();const Ac=t=>{let e=(0,pg.c)(14),{wrapperClassName:r,className:n,pageSize:a}=t,i=a===void 0?10:a,l;e[0]===r?l=e[1]:(l=Z(r,"flex flex-col space-y-2"),e[0]=r,e[1]=l);let s=n||"rounded-md border",d;e[2]===s?d=e[3]:(d=Z(s),e[2]=s,e[3]=d);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,o.jsx)(Gm,{children:Array.from({length:1}).map(hg)}),e[4]=c):c=e[4];let u;e[5]===i?u=e[6]:(u=(0,o.jsxs)(Os,{children:[c,(0,o.jsx)(Fs,{children:Array.from({length:i}).map(gg)})]}),e[5]=i,e[6]=u);let p;e[7]!==d||e[8]!==u?(p=(0,o.jsx)("div",{part:"table-wrapper",className:d,children:u}),e[7]=d,e[8]=u,e[9]=p):p=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=(0,o.jsx)("div",{className:"flex align-items justify-between shrink-0 h-8"}),e[10]=m):m=e[10];let f;return e[11]!==l||e[12]!==p?(f=(0,o.jsxs)("div",{className:l,children:[p,m]}),e[11]=l,e[12]=p,e[13]=f):f=e[13],f};function mg(t,e){return(0,o.jsx)(Ps,{children:(0,o.jsx)("div",{className:"h-4 bg-(--slate-5) animate-pulse rounded-md w-[70%]"})},e)}function hg(t,e){return(0,o.jsx)(zn,{children:Array.from({length:8}).map(mg)},e)}function fg(t,e){return(0,o.jsx)(tn,{children:(0,o.jsx)("div",{className:"h-4 bg-(--slate-5) animate-pulse rounded-md w-[90%]"})},e)}function gg(t,e){return(0,o.jsx)(zn,{children:Array.from({length:8}).map(fg)},e)}const Ha=["string","boolean","integer","number","date","datetime","time","unknown"];var xg=ee(),vg=j.lazy(()=>Ct(()=>import("./glide-data-editor-DqKNgyfg.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([338,4,107,12,13,8,9,10,11,6,7,35,68,14,15,16,18,20,19,69,79,78,25,60,29,61,62,80,44,41,26,81,82,83,84,21,77,17,23,39,339,40,24,27,28,30,42,93,340,341,164,97,98,280,281,342]),import.meta.url));const wg=Pt("marimo-data-editor",{cssStyles:[ug]}).withData(F({initialValue:F({edits:G(F({rowIdx:L(),columnId:I(),value:Nr()}))}),label:I().nullable(),data:Ne([I(),G(F({}).passthrough())]),fieldTypes:G(Qt([Wp(),Qt([ye(Ha),I()])])).nullish(),editableColumns:Ne([G(I()),Xe("all")]),columnSizingMode:ye(["auto","fit"]).default("auto")})).withFunctions({}).renderer(t=>(0,o.jsx)(bg,{data:t.data.data,fieldTypes:t.data.fieldTypes,edits:t.value,onEdits:t.setValue,host:t.host,editableColumns:t.data.editableColumns}));var bg=t=>{let e=(0,xg.c)(31),r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],e[0]=r):r=e[0];let[n,a]=(0,j.useState)(r),i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=new Map,e[1]=i):i=e[1];let[l,s]=(0,j.useState)(i),d,c;e[2]!==t.data||e[3]!==t.fieldTypes?(d=async()=>{let v=bs(t.fieldTypes??[]),y=Array.isArray(t.data)?t.data:await Um(t.data,{type:"csv",parse:PS(Object.fromEntries(v))},{handleBigIntAndNumberLike:!0});a(y),s(bs(t.fieldTypes??xs(y)))},c=[t.fieldTypes,t.data],e[2]=t.data,e[3]=t.fieldTypes,e[4]=d,e[5]=c):(d=e[4],c=e[5]);let{error:u}=Rt(d,c);if(u){let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=(0,o.jsx)(Ms,{children:"Error"}),e[6]=v):v=e[6];let y=u.message||"An unknown error occurred",S;return e[7]===y?S=e[8]:(S=(0,o.jsxs)(Hi,{variant:"destructive",className:"mb-2",children:[v,(0,o.jsx)("div",{className:"text-md",children:y})]}),e[7]=y,e[8]=S),S}if(!n){let v;return e[9]===Symbol.for("react.memo_cache_sentinel")?(v=(0,o.jsx)(gs,{milliseconds:200,children:(0,o.jsx)(Ac,{pageSize:10})}),e[9]=v):v=e[9],v}let p;e[10]===t?p=e[11]:(p=v=>{t.onEdits(y=>({...y,edits:[...y.edits,...v]}))},e[10]=t,e[11]=p);let m;e[12]!==n||e[13]!==t?(m=v=>{let y=v.flatMap((S,C)=>Object.entries(S).map(_=>{let[k,h]=_;return{rowIdx:n.length+C,columnId:k,value:h}}));t.onEdits(S=>({...S,edits:[...S.edits,...y]}))},e[12]=n,e[13]=t,e[14]=m):m=e[14];let f,g,x,w;e[15]===t?(f=e[16],g=e[17],x=e[18],w=e[19]):(f=v=>{t.onEdits(y=>{let S=v.map(yg);return{...y,edits:[...y.edits,...S]}})},g=(v,y)=>{t.onEdits(S=>({...S,edits:[...S.edits,{columnIdx:v,newName:y,type:Li.Rename}]}))},x=v=>{t.onEdits(y=>({...y,edits:[...y.edits,{columnIdx:v,type:Li.Remove}]}))},w=(v,y)=>{t.onEdits(S=>({...S,edits:[...S.edits,{columnIdx:v,newName:y,type:Li.Insert}]}))},e[15]=t,e[16]=f,e[17]=g,e[18]=x,e[19]=w);let b;return e[20]!==l||e[21]!==n||e[22]!==t.editableColumns||e[23]!==t.edits.edits||e[24]!==p||e[25]!==m||e[26]!==f||e[27]!==g||e[28]!==x||e[29]!==w?(b=(0,o.jsx)(vg,{data:n,setData:a,columnFields:l,setColumnFields:s,editableColumns:t.editableColumns,edits:t.edits.edits,onAddEdits:p,onAddRows:m,onDeleteRows:f,onRenameColumn:g,onDeleteColumn:x,onAddColumn:w}),e[20]=l,e[21]=n,e[22]=t.editableColumns,e[23]=t.edits.edits,e[24]=p,e[25]=m,e[26]=f,e[27]=g,e[28]=x,e[29]=w,e[30]=b):b=e[30],b};function yg(t,e){return{rowIdx:t-e,type:Li.Remove}}var jg=" ";function Ba(t){return t.split(`
|
|
7
7
|
`).map(e=>jg+e).join(`
|
|
8
8
|
`)}function Cg(t){return`
|
|
9
9
|
${Ba(t.map(Wa).join(`,
|