@marimo-team/frontend 0.23.10-dev16 → 0.23.10-dev17
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/{edit-page-C2zY3ykA.js → edit-page-i8CUVb2_.js} +2 -2
- package/dist/assets/file-explorer-panel-ndSjEMW1.js +26 -0
- package/dist/assets/{index-xTvcB4F3.js → index-BXAJ4fJT.js} +2 -2
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/components/storage/__tests__/storage-inspector.test.ts +55 -0
- package/src/components/storage/storage-inspector.tsx +55 -29
- package/dist/assets/file-explorer-panel-SnV3hzfA.js +0 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./home-page-BoVBmmUH.js","./app-config-button-DCJYzL07.js","./ai-model-dropdown-BxNlMRqe.js","./cells-FW8WlzJY.js","./preload-helper-DdZsAcJe.js","./badge-DOX1Xxa9.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-9t59MOqR.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-CzVJLtsG.js","./Deferred-DWBqOhWa.js","./uuid-D_zLHhNi.js","./config-DH1Le_e1.js","./constants-DMpttj8Q.js","./session-DGdfs0bJ.js","./requests-DIwGYs0l.js","./useLifecycle-DieWOfXE.js","./useNonce-DfoVjkkH.js","./useTheme-BrivXfaa.js","./arrays-DYDL-3-i.js","./strings-wdPMRf6Z.js","./capabilities-A_KhFcGV.js","./once-DRroIaBz.js","./createReducer-CI9qeK_X.js","./paths-SFhaqGlE.js","./dist-HlsDto3K.js","./dist-BrR4M-k3.js","./dist-CHcznzB-.js","./dist-DCqxOggh.js","./dist-BZr6MMV-.js","./dist-BU26XwgJ.js","./dist-COs9gIu5.js","./dist-DkA__6UI.js","./dist-C9ZB41s2.js","./stex-lcoTi-7o.js","./toDate-B5A0DFEz.js","./purify.es-DvRMX74T.js","./cjs-BRGiG41H.js","./debounce-DhnxH9Rh.js","./now-CsYTPAhW.js","./isSymbol-BT6B8Bon.js","./database-zap-kIkTfzTX.js","./main-B0OX4z33.js","./cells-BSWdJzbh.css","./spinner-UuZAUjoP.js","./renderShortcut-BTgMpqTK.js","./dropdown-menu-CR7cnzLX.js","./chevron-right-CG5QYXYk.js","./kbd-BJB2rf7K.js","./multi-map-CUuNtzHt.js","./alert-DrHguQlr.js","./card-BFWJLptH.js","./dialog-DqOQT_n4.js","./alert-dialog-BqFLkbUc.js","./textarea-C2xm11xc.js","./label-xHqFtfdz.js","./useDebounce-_BZcy6gx.js","./input-TSilD7AA.js","./numbers-mY4EY0yG.js","./useNumberFormatter-CW4V-fpE.js","./context-C1Tm_47t.js","./SSRProvider-BIDQNg9Q.js","./usePress-jH2RfcUG.js","./links-B8WzCnbo.js","./popover-Bz_0Vkyf.js","./switch-NmKFCQsT.js","./table-Bgc-inJs.js","./useHotkey-B5GI97Mf.js","./useAsyncData-Dg8E_bPh.js","./error-banner-CLO6LFll.js","./errors-iwK4b4VF.js","./copy-Ch48HVPK.js","./RSPContexts-Clr6RnG2.js","./get-C-qh_et5.js","./memoize-Tp7rARFe.js","./copy-BwrPA9zQ.js","./plus-CxkHs8QM.js","./refresh-cw-a_9k9BK7.js","./trash-2-BJLYnZpG.js","./triangle-alert-CJ0ZIqcz.js","./azure-DBVzcmvx.js","./Inputs-jVoGz1Nz.js","./Inputs-CuKU-ENz.css","./ImperativeModal-BeQmePpG.js","./settings-SnYErNWQ.js","./ErrorBoundary-DyYDV0HI.js","./icons-8tfAri2V.js","./file-icons-QWprdVWf.js","./file-headphone-B3fuktN0.js","./file-HTLbeC2b.js","./image-BIibSXT6.js","./file-name-input-4pvJeVQK.js","./tree-actions-B5athjIm.js","./ellipsis-vertical-CkwWkOQL.js","./eye-off-BT-KOYV5.js","./pathUtils-vgBYIo5B.js","./semaphore-X3ApuO41.js","./extends-Dqvpuc10.js","./marimo-icons-BmEL8W-Z.js","./useInterval-CPxPhnIz.js","./dates-DS_7IZoI.js","./en-US-C7vnqfgk.js","./isValid-DdlR4-BY.js","./links-C-_seirg.js","./maps-n3GaPJwv.js","./react-icons.esm--O4lBTlZ.js","./chart-no-axes-column-nqk474t8.js","./circle-play-CYXX2xu3.js","./external-link-BTNxSavU.js","./github-raQvpeuZ.js","./youtube-3lRHw8NU.js","./link-CoJxTwWE.js","./package-B8oXOUM-.js","./refresh-ccw-DLc784Sj.js","./run-page-CbdXCKPz.js","./panels-B4woL7Ha.js","./JsonOutput-Df7Vt26h.js","./utils-DQRuLEof.js","./vega-loader.browser-xq8miGHn.js","./precisionRound-NX56vp6K.js","./defaultLocale-DPBdGRrH.js","./defaultLocale-Lfi0pexn.js","./useInstallPackage-CKRPRNft.js","./MarimoErrorOutput-D2FUpJtG.js","./cell-link-Bnp13yqG.js","./RenderHTML-CE7-VlyN.js","./useRunCells-DigRNsVk.js","./copy-icon-z0dzhmL4.js","./datasource-BEc26F-j.js","./state-zRXtGf8W.js","./sparkles-CC9Bko6a.js","./markdown-renderer-B2dVZ8Vp.js","./html-to-image-C5f8yFhw.js","./focus-9N2kMkkO.js","./LazyAnyLanguageCodeMirror-kGFT2d8V.js","./chunk-5FQGJX7Z-WmZDj8ty.js","./micromark-factory-space-bqhKsQDn.js","./markdown-renderer-DdDKmWlR.css","./command-DUeag2QH.js","./field-B4CdIHa9.js","./download-4dvb0Tm7.js","./useIframeCapabilities-DPVTppnD.js","./formats-DP_z0P-n.js","./emotion-is-prop-valid.esm-Dangy3Bv.js","./useDateFormatter-d3yglQmW.js","./table-6NxtGaCm.js","./ellipsis-KAhMaCIV.js","./message-circle-1YLdnr8A.js","./react-resizable-panels.browser.esm-BdtIs0E-.js","./JsonOutput-B7vuddcd.css","./layout-BBgpgo8e.js","./name-cell-input-BIXiR7Jm.js","./esm-Cb2bnV6o.js","./objectWithoutPropertiesLoose-DoKw85w0.js","./name-cell-input-ujOhus_y.css","./radio-group-BMlG1iLU.js","./floating-outline-OoVdhPGt.js","./readonly-python-code-6oNL64J_.js","./process-output-DnjqFEvb.js","./esm-Dq6P6Kim.js","./dist-iKJwjAp9.js","./dist-ybU63RZQ.js","./dist-B8wPhkv1.js","./dist-D3iX7y9M.js","./dist-PZMeWHLU.js","./dist-5AtJFz6B.js","./dist-DiXKIqki.js","./dist-BhzT6R_n.js","./dist-BwWSTUw-.js","./dist-CQSMYEj3.js","./dist-DMjSJP7B.js","./dist-BXZILO7x.js","./dist-BPX8PnbM.js","./dist-Dxk5--6h.js","./apl-C1zdcQvI.js","./asciiarmor-B--OGpM1.js","./asn1-D2UnMTL5.js","./brainfuck-DrjMyC8V.js","./clike-CCdVFz-6.js","./clojure-BjmTMymc.js","./cmake-CgqRscDS.js","./cobol-DZNhVUeB.js","./coffeescript-Qp7k0WHA.js","./commonlisp-De6q7_JS.js","./crystal-BGXRJSF-.js","./css-CNKF6pC6.js","./cypher-BUDAQ7Fk.js","./d-BIAtzqpc.js","./diff-aadYO3ro.js","./dtd-uNeIl1u0.js","./dylan-CrZBaY0F.js","./ecl-ByTsrrt6.js","./eiffel-DRhIEZQi.js","./elm-BBPeNBgT.js","./erlang-EMEOk6kj.js","./factor-D7Lm0c37.js","./simple-mode-B3UD3n_i.js","./forth-BdKkHzwH.js","./fortran-DxGNM9Kj.js","./gas-hf-H6Zc4.js","./gherkin-D1O_VlrS.js","./groovy-Budmgm6I.js","./haskell-CDrggYs0.js","./haxe-CPnBkTzf.js","./idl-BTZd0S94.js","./javascript-Czx24F5X.js","./julia-OeEN0FvJ.js","./livescript-DLmsZIyI.js","./lua-BM3BXoTQ.js","./mathematica-BbPQ8-Rw.js","./mbox-D2_16jOO.js","./mirc-CzS_wutP.js","./mllike-D9b50pH5.js","./modelica-C8E83p8w.js","./mscgen-Dk-3wFOB.js","./mumps-BRQASZoy.js","./nsis-C5Oj2cBc.js","./ntriples-D6VU4eew.js","./octave-xff1drIF.js","./oz-CRz8coQc.js","./pascal-DZhgfws7.js","./perl-BKXEkch3.js","./pig-rvFhLOOE.js","./powershell-Db7zgjV-.js","./properties-BF6anRzc.js","./protobuf-De4giNfG.js","./pug-CzQlD5xP.js","./puppet-CMgcPW4L.js","./python-DOZzlkV_.js","./q-8XMigH-s.js","./r-BuEncdBJ.js","./rpm-DnfrioeJ.js","./ruby-C9f8lbWZ.js","./sas-TQvbwzLU.js","./scheme-DCJ8_Fy0.js","./shell-D8pt0LM7.js","./sieve-DGXZ82l_.js","./smalltalk-DyRmt5Ka.js","./sparql-CLILkzHY.js","./stylus-BCmjnwMM.js","./swift-BkcVjmPv.js","./tcl-B3wbfJh2.js","./textile-D12VShq0.js","./toml-XXoBgyAV.js","./troff-D9lX0BP4.js","./ttcn-cfg-pqnJIxH9.js","./ttcn-DQ5upjvU.js","./turtle-BUVCUZMx.js","./vb-CgKmZtlp.js","./vbscript-mB-oVfPH.js","./velocity-CrvX3BFT.js","./verilog-C0Wzs7-f.js","./vhdl-s8UGv0A3.js","./webidl-GTmlnawS.js","./xquery-Bq3_mXJv.js","./yacas-B1P8UzPS.js","./z80-C8FzIVqi.js","./code-xml-CZN6vNxu.js","./play-5vQl-hy9.js","./trash-wVOgGgQw.js","./prop-types-DVDiRdwc.js","./layout-BjXzDXoG.css","./types-BLEgJ92v.js","./state-BVOf8gf_.js","./events-CBm-hwqS.js","./globals-LRz1TwrD.js","./share-DQLjaPiK.js","./blob-3_FN0u9S.js","./_baseSet-CxV9N1bc.js","./requests-CgpE4HfP.js","./runs-DfHioKE-.js","./request-registry-Chp6gpar.js","./state-CcAGAozT.js","./ws-DSN-Rmiu.js","./panels-B4E3DsXP.css","./edit-page-
|
|
2
|
-
var V2=Object.defineProperty;var Rp=j=>{throw TypeError(j)};var H2=(j,Me,o)=>Me in j?V2(j,Me,{enumerable:!0,configurable:!0,writable:!0,value:o}):j[Me]=o;var B=(j,Me,o)=>H2(j,typeof Me!="symbol"?Me+"":Me,o),Jl=(j,Me,o)=>Me.has(j)||Rp("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)?Rp("Cannot add the same private member more than once"):Me instanceof WeakSet?Me.add(j):Me.set(j,o),at=(j,Me,o,Rt)=>(Jl(j,Me,"write to private field"),Rt?Rt.call(j,o):Me.set(j,o),o),Sr=(j,Me,o)=>(Jl(j,Me,"access private method"),o);var zp=(j,Me,o,Rt)=>({set _(Mn){at(j,Me,Mn,o)},get _(){return $(j,Me,Rt)}});import{r as B2,s as qr,t as es}from"./chunk-LvLJmgfZ.js";import{c as _i,i as Ve,l as Sn,n as $e,s as Si,u as ga}from"./useEvent-D91BmmQi.js";import{t as W2}from"./react-Bj1aDYRI.js";import{$ as $2,Ai as Mp,Bi as q2,Bt as ki,Ci as U2,Hi as Ur,Ii as Pp,J as Y2,Ki as Fp,Mi as G2,Oi as K2,Pi as ts,Q as Q2,Qr as X2,Ri as Z2,S as J2,Si as ej,Sr as tj,Ti as rj,Vi as nj,X as aj,Y as ij,Z as oj,at as lj,b as Op,br as sj,bt as dj,cr as Lp,dr as cj,et as uj,gi as pj,gr as Ni,ji as rs,ki as mj,nr as ns,ot as hj,rr as Dp,ut as fj,vi as gj,vr as xj,wi as vj,wr as wj,yr as Vp,yt as bj,z as yj,zi as kn,__tla as jj}from"./cells-FW8WlzJY.js";import{t as Hp}from"./react-dom-CSu739Rf.js";import{A as kr,B as Ne,C as Kt,E as Cj,F as Bp,I as ft,J as _j,N as L,O as Sj,P as F,R as I,S as Yr,T as D,U as kj,V as Nr,a as Wp,b as ye,h as Nj,i as $p,j as Tj,k as Xe,n as qp,r as Aj,s as as,t as Tr,v as Ij,w as G,x as Up,z as Qt}from"./zod-H_cgTO0M.js";import{t as ee}from"./compiler-runtime-B3qBwwSJ.js";import{t as Ej}from"./get-C-qh_et5.js";import{t as Ti}from"./pick-DqWUNly1.js";import{a as Rj,c as zj,d as is,f as Mj,g as Pj,i as Fj,l as Oj,m as Lj,o as Ar,p as Dj,r as Yp,s as os,u as Gp,w as Vj,x as Hj,__tla as Bj}from"./state-BVOf8gf_.js";import{_ as ue,a as Wj,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 $j,M as qj,b as Uj,d as Yj,j as Gj,o as Kj,t as Qj,v as Xj,w as Zj,x as Jj}from"./utils-CvI-39U6.js";import{r as ss}from"./constants-DMpttj8Q.js";import{S as ct,T as eC,a as tC,b as Kp,i as Qp,l as xa,r as ds,s as rC,t as nC,v as Xp,w as Zp}from"./config-DH1Le_e1.js";import{a as aC,i as iC,n as oC,o as lC,r as sC,t as dC}from"./switch-NmKFCQsT.js";import{t as cC}from"./globals-LRz1TwrD.js";import{t as Ai}from"./ErrorBoundary-DyYDV0HI.js";import{n as cs,t as Z}from"./cn-DCUzRj2J.js";import{t as uC}from"./jsx-runtime-BqBOg78p.js";import{C as vt,S as Jp,_ as Ii,a as pC,b as it,g as em,h as Kr,i as mC,p as hC,v as us,w as tm,y as ps}from"./fullscreen-eipL3i3Y.js";import{o as fC,s as gC}from"./dist-BdyjRhEt.js";import{d as ms,u as rm}from"./menu-items-DcP01QzW.js";import{a as nm,c as xC,i as am,l as vC,n as hs,o as wC,r as im,s as bC}from"./multi-map-CUuNtzHt.js";import{a as om,c as lm,i as sm,l as dm,n as cm,s as um,t as pm}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 yC,c as Ir,d as jC,f as CC,i as Vt,l as fs,m as mm,n as Er,o as Ei,p as hm,r as An,s as Qr,t as Rr}from"./select-DZcFyKFQ.js";import{a as fm,c as _C,i as SC,m as gm,o as kC,p as NC,r as TC,t as AC}from"./dropdown-menu-CR7cnzLX.js";import{A as IC,B as gs,C as fr,D as EC,Dt as RC,E as Xr,Et as zC,F as MC,H as PC,I as xs,L as FC,O as OC,P as LC,R as DC,S as Ri,St as VC,T as HC,Tt as BC,V as WC,X as $C,Y as qC,Z as UC,_t as xm,at as vm,b as wm,d as YC,dt as zi,et as vs,f as GC,ft as wa,gt as KC,ht as Zr,it as QC,k as XC,l as ZC,lt as JC,mt as ws,nt as e_,ot as t_,r as r_,rt as n_,s as a_,st as i_,t as bm,tt as bs,u as o_,ut as ym,wt as l_,x as s_,y as d_,z as jm,__tla as c_}from"./JsonOutput-Df7Vt26h.js";import{t as ys}from"./label-xHqFtfdz.js";import{h as Cm,i as _m,l as u_,r as p_}from"./download-4dvb0Tm7.js";import{n as m_,t as h_}from"./radio-group-BMlG1iLU.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 f_}from"./dist-BrR4M-k3.js";import{m as g_,o as x_,t as ir}from"./arrays-DYDL-3-i.js";import{n as Ns,t as v_}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 w_}from"./requests-DIwGYs0l.js";import{t as Ht}from"./createLucideIcon-D5guW7EU.js";import{A as b_,C as Sm,D as y_,O as j_,S as C_,_ as __,a as km,b as S_,c as Nm,d as ya,f as Tm,g as k_,h as N_,i as As,k as T_,l as A_,m as Am,n as I_,p as E_,r as xr,s as R_,t as z_,u as or,v as M_,y as P_}from"./spec-D1ptWKg6.js";import{n as F_,r as O_,t as L_}from"./fileToBase64-BeYUTUzO.js";import{t as D_,__tla as V_}from"./LazyAnyLanguageCodeMirror-kGFT2d8V.js";import{i as H_,n as B_,o as W_}from"./useLifecycle-DieWOfXE.js";import{i as $_,n as q_,t as Im}from"./useBoolean-DElMi9Nd.js";import{r as Em,t as Pi}from"./x-C-6liIBr.js";import{t as Is}from"./chevron-right-CG5QYXYk.js";import{__tla as U_}from"./markdown-renderer-B2dVZ8Vp.js";import{t as Y_}from"./code-xml-CZN6vNxu.js";import{t as Rm}from"./copy-BwrPA9zQ.js";import{t as G_}from"./eye-off-BT-KOYV5.js";import{n as K_}from"./file-headphone-B3fuktN0.js";import{r as Q_,t as X_}from"./file-icons-QWprdVWf.js";import{a as zm,c as pe,i as Z_,l as Mm,n as Pm,o as J_,r as eS,s as Fm,t as tS,u as rS}from"./form-CamBS9Dt.js";import{t as nS}from"./house-D2ldnAB9.js";import{n as Fi,t as Oi}from"./spinner-UuZAUjoP.js";import{i as aS,r as Om,t as Es}from"./readonly-python-code-6oNL64J_.js";import{n as iS,t as Li}from"./types-BYwxXaSY.js";import{t as Lm}from"./plus-CxkHs8QM.js";import{t as oS}from"./refresh-cw-a_9k9BK7.js";import{i as lS,n as sS,o as Dm,r as dS,t as Rs}from"./input-TSilD7AA.js";import{t as Di}from"./square-function-blYaQso8.js";import{_ as lt,a as gt,c as ut,d as Jr,f as cS,g as Vm,h as uS,i as pS,l as ht,n as mS,o as ja,p as Hm,r as hS,t as fS,u as wt,v as lr}from"./textarea-C2xm11xc.js";import{a as gS,i as xS,r as vS,t as wS}from"./column-preview-DMA6YbRX.js";import{t as bS}from"./square-rACnnz-q.js";import{t as yS}from"./trash-2-BJLYnZpG.js";import{t as Vi}from"./triangle-alert-CJ0ZIqcz.js";import{n as Bm,t as jS}from"./es-au8YY-8E.js";import{t as Ct}from"./preload-helper-DdZsAcJe.js";import"./dist-DCqxOggh.js";import"./dist-BZr6MMV-.js";import"./dist-BU26XwgJ.js";import"./dist-COs9gIu5.js";import"./dist-DkA__6UI.js";import{n as CS,t as Bt}from"./use-toast-9t59MOqR.js";import{n as Wm,t as _S}from"./paths-SFhaqGlE.js";import{l as SS,r as kS,s as NS}from"./session-DGdfs0bJ.js";import{r as In}from"./useTheme-BrivXfaa.js";import"./purify.es-DvRMX74T.js";import{n as TS,r as AS,t as IS}from"./dates-DS_7IZoI.js";import{t as zs}from"./copy-icon-z0dzhmL4.js";import{n as ES,t as Mr}from"./context-C1Tm_47t.js";import{t as RS}from"./useNumberFormatter-CW4V-fpE.js";import{t as qe}from"./RenderHTML-CE7-VlyN.js";import{n as zS,t as $m}from"./useDebounce-_BZcy6gx.js";import{i as En,r as MS}from"./numbers-mY4EY0yG.js";import{t as PS}from"./ImperativeModal-BeQmePpG.js";import"./share-DQLjaPiK.js";import{n as qm,r as Um,t as FS}from"./errors-iwK4b4VF.js";import{a as Ym,n as OS,o as LS,r as DS,t as VS}from"./utils-DQRuLEof.js";import"./vega-loader.browser-xq8miGHn.js";import"./defaultLocale-DPBdGRrH.js";import"./defaultLocale-Lfi0pexn.js";import{a as HS}from"./react-icons.esm--O4lBTlZ.js";import{a as Gm,i as BS,n as Rn,t as WS}from"./events-CBm-hwqS.js";import{n as $S,r as Ms,t as Hi}from"./alert-DrHguQlr.js";import{n as Ca,t as en}from"./error-banner-CLO6LFll.js";import{__tla as qS}from"./chunk-5FQGJX7Z-WmZDj8ty.js";import"./html-to-image-C5f8yFhw.js";import{a as US,o as YS}from"./focus-9N2kMkkO.js";import{n as Et}from"./useAsyncData-Dg8E_bPh.js";import{a as Km,i as Ps,n as Fs,o as zn,r as tn,t as Os}from"./table-Bgc-inJs.js";import"./react-resizable-panels.browser.esm-BdtIs0E-.js";import{a as Qm,c as GS,o as KS,r as QS,s as XS,t as Xm,u as ZS}from"./command-DUeag2QH.js";import{t as Zm}from"./renderShortcut-BTgMpqTK.js";import{t as JS}from"./bundle.esm-BXIlAZ6T.js";import{n as ek}from"./icons-8tfAri2V.js";import"./esm-Cb2bnV6o.js";import{a as tk,i as rk,n as nk,o as ak,t as Jm}from"./components-CtK6Njp_.js";import{t as sr}from"./useDeepCompareMemoize-CWcgQCbT.js";import{t as ik}from"./pathUtils-vgBYIo5B.js";import{i as ok,n as lk,r as sk}from"./floating-outline-OoVdhPGt.js";Promise.all([(()=>{try{return jj}catch{}})(),(()=>{try{return Bj}catch{}})(),(()=>{try{return c_}catch{}})(),(()=>{try{return V_}catch{}})(),(()=>{try{return U_}catch{}})(),(()=>{try{return qS}catch{}})()]).then(async()=>{var yt,la,Ie,Le,xn,vn,wn,sa,Lt,Wi,Ds,Vs,Br,jt,da,Wr,bn,ca,yn,ua,wi,pa,bi,yi,ji,Ci,Ap;(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(W2(),1),Me=qr(Hp(),1),o=qr(uC(),1),Rt="NavigationMenu",[Mn,Hs,eh]=ms(Rt),[$i,th,rh]=ms(Rt),[qi,dk]=Jp(Rt,[eh,rh]),[nh,zt]=qi(Rt),[ah,ih]=qi(Rt),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=rm(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:Rt}),_=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=Rt;var Ui="NavigationMenuSub",oh=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:i,orientation:l="horizontal",...s}=t,d=zt(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})})});oh.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)(nh,{scope:e,isRootMenu:r,rootNavigationMenu:n,value:s,previousValue:mm(s),baseId:em(),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)(ah,{scope:e,items:w,children:l})})})},$s="NavigationMenuList",qs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=zt($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",[lh,Ys]=qi(Us),Gs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,...a}=t,i=em(),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=hh(g))}},[]);return(0,o.jsx)(lh,{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=zt(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)(gC,{"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 sh="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}),tm(s,d),!d.defaultPrevented&&!l.metaKey&&tm(s,new CustomEvent(_a,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});Xs.displayName=sh;var Gi="NavigationMenuIndicator",Zs=j.forwardRef((t,e)=>{let{forceMount:r,...n}=t,a=zt(Gi,t.__scopeNavigationMenu),i=!!a.value;return a.indicatorTrack?Me.createPortal((0,o.jsx)(Ii,{present:r||i,children:(0,o.jsx)(dh,{...n,ref:e})}),a.indicatorTrack):null});Zs.displayName=Gi;var dh=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=zt(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=zt(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)(ch,{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 ch=j.forwardRef((t,e)=>{let{onViewportContentChange:r,onViewportContentRemove:n}=zt(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=zt(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)(hC,{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=!!zt(Ki,t.__scopeNavigationMenu).value;return(0,o.jsx)(Ii,{present:r||a,children:(0,o.jsx)(uh,{...n,ref:e})})});td.displayName=Ki;var uh=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,children:n,...a}=t,i=zt(Ki,r),l=Xt(e,i.onViewportChange),s=ih(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:Wj(b,C=>{S&&C&&p(C)})})},w)})})}),ph="FocusGroup",rd=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=zt(ph,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"],mh="FocusGroupItem",ad=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=th(r),i=zt(mh,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 hh(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,fh=Gs,dd=Ks,gh=Xs,cd=Zs,ud=Js,pd=td,xh=B2({Range:()=>co,Root:()=>Na,Slider:()=>to,SliderRange:()=>ao,SliderThumb:()=>oo,SliderTrack:()=>ro,Thumb:()=>Ta,Track:()=>so,createSliderScope:()=>bh},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,vh,wh]=ms(nn),[gd,bh]=Jp(nn,[wh]),[yh,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"?jh:Ch,[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,Th(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=Rh(i),E=hm(zh(Math.round((T-n)/i)*i+n,z),[n,a]);S((M=[])=>{let P=kh(M,E,A);if(Eh(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)(yh,{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}),jh=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=rm(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})}})})}),Ch=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=vh(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)(_h,{...t,ref:i,index:l})}),_h=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=fC(d),f=l.values[n],g=f===void 0?0:jd(f,l.min,l.max),x=Nh(n,l.values.length),w=m==null?void 0:m[s.size],b=w?Ah(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 Sh="RadioBubbleInput",yd=j.forwardRef(({__scopeSlider:t,value:e,...r},n)=>{let a=j.useRef(null),i=Xt(a,n),l=mm(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=Sh;function kh(t=[],e,r){let n=[...t];return n[r]=e,n.sort((a,i)=>a-i)}function jd(t,e,r){return hm(100/(r-e)*(t-e),[0,100])}function Nh(t,e){if(e>2)return`Value ${t+1} of ${e}`;if(e===2)return["Minimum","Maximum"][t]}function Th(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 Ah(t,e,r){let n=t/2;return(n-lo([0,50],[0,n])(e)*r)*r}function Ih(t){return t.slice(0,-1).map((e,r)=>t[r+1]-e)}function Eh(t,e){if(e>0){let r=Ih(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 Rh(t){return(String(t).split(".")[1]||"").length}function zh(t,e){let r=10**e;return Math.round(t*r)/r}var Na=to,so=ro,co=ao,Ta=oo,Mh=Ht("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"}]]),Ph=Ht("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"}]]),Fh=Ht("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"}]]),Oh=Ht("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"}]]),Lh=Ht("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"}]]),Dh=Ht("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=Ht("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"}]]),Hh=Ht("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"}]]),Bh=Ht("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=Ht("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"}]]),Wh=Ht("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=Ht("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"}]]),$h=qr(Fp(),1);const vr={INSERT:"insert",DELETE:"delete",SUBSTITUTE:"substitute",MATCH:"match"};function qh(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 Uh(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 Yh(t,e,r,n){let a=qh(t,e,r);return{merged:Uh(t,a.operations,n),edits:a}}var Aa=0,Ia="";function uo(t){return t.id?t.id:t.name==="setup"?Z2:ts.create()}function Gh(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}=Yh(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 Kh(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 Qh(t){let e=yj();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?bj(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 Xh(t,e){let{cellIds:r,sessionCellData:n,notebookCellData:a}=Gh(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]=Kh(s,c)),l[s]=Qh(d)}return{cellIds:pj.from([r]),cellData:i,cellRuntime:l,cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set}}var Zh=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}),Jh=Object.freeze({width:null,height:null}),Td=Object.freeze({...Jh,...Ea});function ef(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 tf=/[\s,]+/;function rf(t,e){e.split(tf).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=ef(r("rotate","")),rf(e,r("flip","")),e.preserveAspectRatio=r("preserveAspectRatio",r("preserveaspectratio","")),e}function nf(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 af(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=af(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 of(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 lf(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=of(t);for(let a in n){let i=n[a];i&&(e(a,lf(t,a,i)),r.push(a))}return r}var sf={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,sf))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 df(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]=df(t,e))}function Pd(t,e){return Md(e)?zd(e,(r,n)=>{n?t.icons[r]=n:t.missing.add(r)}):[]}function cf(t,e,r){try{if(typeof r.body=="string")return t.icons[e]={...r},!0}catch{}return!1}function uf(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?cf(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 Dd(t){return!!Ln(t)}function pf(t){let e=Ln(t);return e&&{...Pn,...e}}function mf(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 Vd(t,e){t.forEach(r=>{let n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(a=>a.id!==e))})}function hf(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||Vd([t],i.id),i.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),i.abort))})}))}var ff=0;function gf(t,e,r){let n=ff++,a=Vd.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 xf(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 vf={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function wf(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={...vf,...t},r=[];function n(){r=r.filter(l=>l().status==="pending")}function a(l,s,d){let c=wf(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 bf(){return Object.keys(Ma)}function $d(){}var vo=Object.create(null);function yf(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=yf(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 jf(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,hf(t)}))}function Cf(t){let e=[],r=[];return t.forEach(n=>{(n.match(Ed)?e:r).push(n)}),{valid:e,invalid:r}}function Dn(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(),jf(t)}function Yd(t,e){t instanceof Promise?t.then(r=>{e(r)}).catch(()=>{e(null)}):e(t)}function _f(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=>{Dn(t,a,c)});return}if(i){a.forEach(c=>{Yd(i(c,n,r),u=>{Dn(t,[c],u?{prefix:n,icons:{[c]:u}}:null)})});return}let{valid:l,invalid:s}=Cf(a);if(s.length&&Dn(t,s,null),!l.length)return;let d=n.match(Ed)?fo(r):null;if(!d){Dn(t,l,null);return}d.prepare(r,n,l).forEach(c=>{qd(r,c,u=>{Dn(t,c.icons,u)})})}))}var wo=(t,e)=>{let r=mf(xf(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&&_f(s,d)}),e?gf(e,r,a):Ud},Sf=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 kf(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 Nf(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 Tf=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Af=/^-?[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(Tf);if(n===null||!n.length)return t;let a=[],i=n.shift(),l=Af.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 If(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 Ef(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Rf(t,e,r){let n=If(t);return Ef(n.defs,e+n.content+r)}var zf=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=Rf(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)=>{zf(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 Mf(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Pf(t){return"data:image/svg+xml,"+Mf(t)}function Xd(t){return'url("'+Pf(t)+'")'}var Oa=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function Ff(t){Oa=t}function Of(){return Oa}function Lf(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 Df(t){return t===404}var Vf=(t,e,r)=>{let n=[],a=Lf(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 Hf(t){if(typeof t=="string"){let e=Fa(t);if(e)return e.path}return"/"}var Bf={prepare:Vf,send:(t,e,r)=>{if(!Oa){r("abort",424);return}let n=Hf(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(Df(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 Wf(t,e,r){dr(r||"",e).loadIcons=t}function $f(t,e,r){dr(r||"",e).loadIcon=t}var jo="data-style",Zd="";function qf(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("",Bf),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:Dd,iconExists:Dd,getIcon:pf,listIcons:uf,addIcon:Od,addCollection:Ld,calculateSize:bo,buildIcon:Qd,iconToHTML:yo,svgToURL:Xd,loadIcons:wo,loadIcon:Sf,addAPIProvider:Wd,setCustomIconLoader:$f,setCustomIconsLoader:Wf,appendCustomStyle:qf,_api:{getAPIConfig:Fa,setAPIModule:Hd,sendAPIQuery:qd,setFetch:Ff,getFetch:Of,listAPIProviders:bf}}}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 Uf(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 Vn;function Yf(){try{Vn=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Vn=null}}function Gf(t){return Vn===void 0&&Yf(),Vn?Vn.createHTML(t):t}function Kf(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=Gf(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=Kf(a):l=Uf(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 Qf(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||nf(d.customisations,p)||!_o(this._shadowRoot))&&this._renderIcon(d.icon,p,u)}_iconChanged(d){let c=kf(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=Nf(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:ck,disableCache:uk,iconLoaded:pk,iconExists:mk,getIcon:hk,listIcons:fk,addIcon:gk,addCollection:xk,calculateSize:vk,buildIcon:wk,iconToHTML:bk,svgToURL:yk,loadIcons:jk,loadIcon:Ck,setCustomIconLoader:_k,setCustomIconsLoader:Sk,addAPIProvider:kk,_api:Nk}=Qf()||ec();const Xf=()=>((0,Zh.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 Zf=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 Jf=ee();const e0=()=>{let t=(0,Jf.c)(25),[e,r]=Sn(Hj);if(e===null)return null;let n;t[0]===e?n=t[1]:(n=async()=>{try{await navigator.clipboard.writeText(e),Bt({title:"Copied to clipboard",description:"Error details have been copied to your clipboard."})}catch{Bt({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=t0,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)(lm,{children:[(0,o.jsxs)(dm,{className:"flex items-center gap-2 text-destructive",children:[(0,o.jsx)(tj,{className:"h-5 w-5"}),"Kernel Startup Failed"]}),(0,o.jsx)(om,{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)(Rm,{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)(nS,{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)(um,{children:[x,(0,o.jsx)(cm,{onClick:l,children:"Dismiss"})]}),t[17]=l,t[18]=w);let b;t[19]!==w||t[20]!==g?(b=(0,o.jsxs)(sm,{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)(pm,{open:!0,onOpenChange:d,children:b}),t[22]=b,t[23]=d,t[24]=v):v=t[24],v};function t0(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}var r0=ee();const n0=t=>{let e=(0,r0.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=dj(a);let _=C.textContent||C.innerText||"";try{await navigator.clipboard.writeText(_),Bt({title:"Copied to clipboard",description:"Traceback has been copied to your clipboard."})}catch{Bt({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)(dm,{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)(om,{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)(lm,{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)(Rm,{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)(um,{children:(0,o.jsx)(cm,{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)(sm,{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)(pm,{open:r,onOpenChange:d,children:y}),e[26]=r,e[27]=y,e[28]=d,e[29]=S):S=e[29],S};var a0=ee();const i0=()=>{let t=(0,a0.c)(6),[e,r]=Sn(uj);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)(n0,{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 o0=ee();const l0=()=>{let t=(0,o0.c)(5),{toasts:e}=CS(),r;t[0]===e?r=t[1]:(r=e.map(s0),t[0]=e,t[1]=r);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)($2,{}),t[2]=n):n=t[2];let a;return t[3]===r?a=t[4]:(a=(0,o.jsxs)(oj,{children:[r,n]}),t[3]=r,t[4]=a),a};function s0(t){let{id:e,title:r,description:n,action:a,...i}=t;return(0,o.jsxs)(Y2,{...i,children:[(0,o.jsxs)("div",{className:"grid gap-1",children:[r&&(0,o.jsx)(Q2,{children:r}),n&&(0,o.jsx)(aj,{children:n})]}),a,(0,o.jsx)(ij,{})]},e)}var d0=ee();const So=t=>{let e=(0,d0.c)(5),{children:r}=t,n=ga(Xj),a;e[0]===n?a=e[1]:(a=c0(n),e[0]=n,e[1]=a);let i;return e[2]!==r||e[3]!==a?(i=(0,o.jsx)(ES,{locale:a,children:r}),e[2]=r,e[3]=a,e[4]=i):i=e[4],i};function c0(t){return t&&u0(t)?t:navigator.language}function u0(t){try{return new Intl.NumberFormat(t),!0}catch{return!1}}var dc=ee(),cc=La(()=>Ct(()=>import("./home-page-BoVBmmUH.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,135]),import.meta.url)),uc=La(()=>Ct(()=>import("./run-page-CbdXCKPz.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([136,137,138,4,139,13,8,9,10,11,140,141,142,143,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,144,70,145,146,105,75,74,79,78,80,81,82,83,84,71,72,68,69,85,147,148,149,93,97,150,151,134,152,66,153,154,155,90,156,157,158,159,160,161,86,162,92,88,163,91,164,122,123,124,126,119,165,166,127,94,167,168,130,116,169,98,100,170,171,172,173,174,175,176,177,178,179,180,77,87,89,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,279,112,280,281,282,283,284,285,286,287,288,289,95,96,290,291,292,293,294,295,296,120]),import.meta.url)),pc=La(()=>Ct(()=>import("./edit-page-C2zY3ykA.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([297,4,298,10,137,138,139,13,8,9,11,140,141,142,143,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,144,70,145,146,105,75,74,79,78,80,81,82,83,84,71,72,68,69,85,147,148,149,93,97,150,151,134,152,66,153,154,155,90,156,157,158,159,160,161,86,162,92,88,163,91,164,122,123,124,126,119,165,166,127,94,167,168,130,116,169,98,100,170,171,172,173,174,175,176,177,178,179,180,77,87,89,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,279,112,280,281,282,283,284,285,286,287,288,289,95,96,290,291,292,293,294,295,296,2,67,73,76,99,101,102,1,103,104,106,299,300,108,301,118,111,302,303,109,110,304,121,305,306,307,308,309,310,311,312,135,313,131,314,315,316,317,133,120,125,132,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333]),import.meta.url)),mc=La(()=>Ct(()=>import("./gallery-page-yF5NW34t.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([334,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 p0(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]=Jj(),[r]=Uj(),n;t[0]===e.display.code_editor_font_size?n=t[1]:(n=m0(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=lj();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)(Zf,{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)(l0,{}),a=(0,o.jsx)(Xf,{}),i=(0,o.jsx)(e0,{}),l=(0,o.jsx)(i0,{}),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)(xm,{controller:wa,children:(0,o.jsx)(So,{children:(0,o.jsxs)(PS,{children:[r,n,a,i,l]})})})})})}),e[4]=r,e[5]=s),s});fc.displayName="Providers";function m0(t){return`${t/16}rem`}function h0(){NS(t=>{t.delete(ss.accessToken)})}var f0={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 g0(t,e){let r=v_(async a=>{Ve.set(Xp,{state:Zp.CONNECTING}),await a.init()});function n(a,i){let l=f0[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 qm;case"waitForConnectionOpen":return await ct(),await Om(),a(...s);case"startConnection":return await r(d),await ct(),i!=="sendInstantiate"&&await Om(),a(...s);default:throw Error(`Unknown action for "${i}"`)}}}return Gr.mapValues(t,(a,i)=>n(a,i))}function x0(t){return{body:t,bodySerializer:e=>e}}var{handleResponse:Oe,handleResponseReturnNull:Ce}=oC;function v0(){let t=Ns(()=>sC(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",x0(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)}}var w0="static-notebook";function gc(){Bt({id:w0,once:!0,title:"Static notebook",description:"This notebook is not connected to a kernel. Any interactive elements will not work."})}function b0(){let t=()=>{throw Error("Unreachable. Expected to be in run mode")};return{sendComponentValues:async()=>(gc(),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()=>(gc(),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 y0=ee();function j0(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 qm){if(Ve.get(Kp))return;let u=Bt({title:"Kernel Not Connected",description:"You need to connect to a kernel to perform this action.",variant:"default",action:(0,o.jsx)(C0,{onConnect:()=>u.dismiss()})});throw ue.error(`Failed to handle request: ${n}`,s),s}let d=e[i],c=Um(s);throw d&&Bt({title:d,description:c,variant:"danger"}),ue.error(`Failed to handle request: ${n}`,s),s}}}return r}const C0=t=>{let e=(0,y0.c)(9),{onConnect:r}=t,n=tC(),a=ga(Kp),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 _0(){let t;return t=eC()?Lj.INSTANCE:xa()?b0():g0(v0(),()=>ds()),j0(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)(wc,{}),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 S0=cs("group flex list-none gap-1",{variants:{orientation:{horizontal:"flex items-center",vertical:"flex flex-col"}},defaultVariants:{orientation:"horizontal"}}),Da=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(S0({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});Da.displayName=sd.displayName;var No=fh,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"}}),xc=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)(HS,{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});xc.displayName=dd.displayName;var vc=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});vc.displayName=ud.displayName;var Ao=gh,wc=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});wc.displayName=pd.displayName;var k0=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});k0.displayName=cd.displayName;var bc=ee(),N0=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)(T0,{...t.data})}},T0=t=>{let e=(0,bc.c)(13),{items:r,orientation:n}=t,a=A0,i=I0,l=E0,s;e[0]===n?s=e[1]:(s=m=>"items"in m?n==="horizontal"?(0,o.jsx)(ko,{orientation:"horizontal",children:(0,o.jsx)(Da,{children:(0,o.jsxs)(No,{children:[(0,o.jsx)(xc,{children:qe({html:m.label})}),(0,o.jsx)(vc,{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)(yc,{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)(Da,{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)(Da,{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},yc=j.forwardRef((t,e)=>{let r=(0,bc.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});yc.displayName="ListItem";function A0(t,e){return e?(0,o.jsx)(gr,{delayDuration:200,content:qe({html:e}),children:t}):t}function I0(t){return t.startsWith("http")?"_blank":"_self"}function E0(t){return kS({href:t,queryParams:new URL(globalThis.location.href).search,keys:[ss.filePath]})}function R0(t,e){return t===e?!0:t==null||e==null?!1:Array.isArray(t)&&Array.isArray(e)?x_(t,e):typeof t=="object"&&typeof e=="object"?z0(t,e):!1}function z0(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 M0(t,e){if(!e)return[];let r=t;if(n_(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"?IS:e.type==="time"?AS:TS;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 jc(t){return{type:"group",operator:"and",children:t.flatMap(e=>M0(e.id,e.value)),negate:!1}}var P0=ee(),F0=xC,O0=wC,L0=bC,D0=vC;const V0=t=>{let e=(0,P0.c)(16),{error:r,badData:n,shadowRoot:a}=t;if(r instanceof kj){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(B0),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)(D0,{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)(bm,{data:n}),e[6]=n,e[7]=u);let p;e[8]!==a||e[9]!==u?(p=(0,o.jsx)(F0,{type:"single",collapsible:!0,children:(0,o.jsxs)(L0,{value:"item-1",className:"text-muted-foreground border-muted-foreground-20",children:[c,(0,o.jsx)(O0,{className:"text-[0.84375rem]",children:(0,o.jsx)(ym,{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 H0(t,e,r){return(0,o.jsx)(V0,{error:t,badData:e,shadowRoot:r})}function B0(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 W0({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,BS.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 R0(v,b)||t.dispatchEvent(Gm(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=Pp.findElementThroughShadowDOMs(t))==null?void 0:A.id,N=h?Pp.parse(h):null;if(N&&!k){let R=Ve.get(Op),z=R.cellRuntime[N],E=R.cellData[N];if(X2({executionTime:z.runElapsedTimeMs??E.lastExecutionTime,status:z.status,errored:z.errored,interrupted:z.interrupted,stopped:z.stopped}))throw new FS}else ue.warn(`Cell ID ${N} cannot be found`);let T=await Fj.request({args:kc(y,C[0]),functionName:b,namespace:_});if(T.status.code!=="ok")throw ue.error(T.status),Error(T.status.message||"Unknown error");return kc(S,T.return_value)}}return w},[e.functions,t,m]);return u.success?(0,o.jsx)(pC,{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})})})})}):H0(u.error,Gr.mapValues(t.dataset,w=>typeof w=="string"?Mp(w):w),t.shadowRoot)}var $0=j.forwardRef(W0),Eo=new Map,Cc="__custom_marimo_element__";function _c(t){let e=class extends HTMLElement{constructor(){super();B(this,"mounted",!1);B(this,"pluginRef",(0,j.createRef)());B(this,"__type__",Cc);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=$h.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(Gm(Mp(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:Ve,children:(0,o.jsx)(So,{children:(0,o.jsx)($0,{hostElement:this,plugin:t,ref:this.pluginRef,getInitialValue:()=>G2(this,Rj.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:Sc(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-BoVBmmUH.js","./app-config-button-DCJYzL07.js","./ai-model-dropdown-BxNlMRqe.js","./cells-FW8WlzJY.js","./preload-helper-DdZsAcJe.js","./badge-DOX1Xxa9.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-9t59MOqR.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-CzVJLtsG.js","./Deferred-DWBqOhWa.js","./uuid-D_zLHhNi.js","./config-DH1Le_e1.js","./constants-DMpttj8Q.js","./session-DGdfs0bJ.js","./requests-DIwGYs0l.js","./useLifecycle-DieWOfXE.js","./useNonce-DfoVjkkH.js","./useTheme-BrivXfaa.js","./arrays-DYDL-3-i.js","./strings-wdPMRf6Z.js","./capabilities-A_KhFcGV.js","./once-DRroIaBz.js","./createReducer-CI9qeK_X.js","./paths-SFhaqGlE.js","./dist-HlsDto3K.js","./dist-BrR4M-k3.js","./dist-CHcznzB-.js","./dist-DCqxOggh.js","./dist-BZr6MMV-.js","./dist-BU26XwgJ.js","./dist-COs9gIu5.js","./dist-DkA__6UI.js","./dist-C9ZB41s2.js","./stex-lcoTi-7o.js","./toDate-B5A0DFEz.js","./purify.es-DvRMX74T.js","./cjs-BRGiG41H.js","./debounce-DhnxH9Rh.js","./now-CsYTPAhW.js","./isSymbol-BT6B8Bon.js","./database-zap-kIkTfzTX.js","./main-B0OX4z33.js","./cells-BSWdJzbh.css","./spinner-UuZAUjoP.js","./renderShortcut-BTgMpqTK.js","./dropdown-menu-CR7cnzLX.js","./chevron-right-CG5QYXYk.js","./kbd-BJB2rf7K.js","./multi-map-CUuNtzHt.js","./alert-DrHguQlr.js","./card-BFWJLptH.js","./dialog-DqOQT_n4.js","./alert-dialog-BqFLkbUc.js","./textarea-C2xm11xc.js","./label-xHqFtfdz.js","./useDebounce-_BZcy6gx.js","./input-TSilD7AA.js","./numbers-mY4EY0yG.js","./useNumberFormatter-CW4V-fpE.js","./context-C1Tm_47t.js","./SSRProvider-BIDQNg9Q.js","./usePress-jH2RfcUG.js","./links-B8WzCnbo.js","./popover-Bz_0Vkyf.js","./switch-NmKFCQsT.js","./table-Bgc-inJs.js","./useHotkey-B5GI97Mf.js","./useAsyncData-Dg8E_bPh.js","./error-banner-CLO6LFll.js","./errors-iwK4b4VF.js","./copy-Ch48HVPK.js","./RSPContexts-Clr6RnG2.js","./get-C-qh_et5.js","./memoize-Tp7rARFe.js","./copy-BwrPA9zQ.js","./plus-CxkHs8QM.js","./refresh-cw-a_9k9BK7.js","./trash-2-BJLYnZpG.js","./triangle-alert-CJ0ZIqcz.js","./azure-DBVzcmvx.js","./Inputs-jVoGz1Nz.js","./Inputs-CuKU-ENz.css","./ImperativeModal-BeQmePpG.js","./settings-SnYErNWQ.js","./ErrorBoundary-DyYDV0HI.js","./icons-8tfAri2V.js","./file-icons-QWprdVWf.js","./file-headphone-B3fuktN0.js","./file-HTLbeC2b.js","./image-BIibSXT6.js","./file-name-input-4pvJeVQK.js","./tree-actions-B5athjIm.js","./ellipsis-vertical-CkwWkOQL.js","./eye-off-BT-KOYV5.js","./pathUtils-vgBYIo5B.js","./semaphore-X3ApuO41.js","./extends-Dqvpuc10.js","./marimo-icons-BmEL8W-Z.js","./useInterval-CPxPhnIz.js","./dates-DS_7IZoI.js","./en-US-C7vnqfgk.js","./isValid-DdlR4-BY.js","./links-C-_seirg.js","./maps-n3GaPJwv.js","./react-icons.esm--O4lBTlZ.js","./chart-no-axes-column-nqk474t8.js","./circle-play-CYXX2xu3.js","./external-link-BTNxSavU.js","./github-raQvpeuZ.js","./youtube-3lRHw8NU.js","./link-CoJxTwWE.js","./package-B8oXOUM-.js","./refresh-ccw-DLc784Sj.js","./run-page-CbdXCKPz.js","./panels-B4woL7Ha.js","./JsonOutput-Df7Vt26h.js","./utils-DQRuLEof.js","./vega-loader.browser-xq8miGHn.js","./precisionRound-NX56vp6K.js","./defaultLocale-DPBdGRrH.js","./defaultLocale-Lfi0pexn.js","./useInstallPackage-CKRPRNft.js","./MarimoErrorOutput-D2FUpJtG.js","./cell-link-Bnp13yqG.js","./RenderHTML-CE7-VlyN.js","./useRunCells-DigRNsVk.js","./copy-icon-z0dzhmL4.js","./datasource-BEc26F-j.js","./state-zRXtGf8W.js","./sparkles-CC9Bko6a.js","./markdown-renderer-B2dVZ8Vp.js","./html-to-image-C5f8yFhw.js","./focus-9N2kMkkO.js","./LazyAnyLanguageCodeMirror-kGFT2d8V.js","./chunk-5FQGJX7Z-WmZDj8ty.js","./micromark-factory-space-bqhKsQDn.js","./markdown-renderer-DdDKmWlR.css","./command-DUeag2QH.js","./field-B4CdIHa9.js","./download-4dvb0Tm7.js","./useIframeCapabilities-DPVTppnD.js","./formats-DP_z0P-n.js","./emotion-is-prop-valid.esm-Dangy3Bv.js","./useDateFormatter-d3yglQmW.js","./table-6NxtGaCm.js","./ellipsis-KAhMaCIV.js","./message-circle-1YLdnr8A.js","./react-resizable-panels.browser.esm-BdtIs0E-.js","./JsonOutput-B7vuddcd.css","./layout-BBgpgo8e.js","./name-cell-input-BIXiR7Jm.js","./esm-Cb2bnV6o.js","./objectWithoutPropertiesLoose-DoKw85w0.js","./name-cell-input-ujOhus_y.css","./radio-group-BMlG1iLU.js","./floating-outline-OoVdhPGt.js","./readonly-python-code-6oNL64J_.js","./process-output-DnjqFEvb.js","./esm-Dq6P6Kim.js","./dist-iKJwjAp9.js","./dist-ybU63RZQ.js","./dist-B8wPhkv1.js","./dist-D3iX7y9M.js","./dist-PZMeWHLU.js","./dist-5AtJFz6B.js","./dist-DiXKIqki.js","./dist-BhzT6R_n.js","./dist-BwWSTUw-.js","./dist-CQSMYEj3.js","./dist-DMjSJP7B.js","./dist-BXZILO7x.js","./dist-BPX8PnbM.js","./dist-Dxk5--6h.js","./apl-C1zdcQvI.js","./asciiarmor-B--OGpM1.js","./asn1-D2UnMTL5.js","./brainfuck-DrjMyC8V.js","./clike-CCdVFz-6.js","./clojure-BjmTMymc.js","./cmake-CgqRscDS.js","./cobol-DZNhVUeB.js","./coffeescript-Qp7k0WHA.js","./commonlisp-De6q7_JS.js","./crystal-BGXRJSF-.js","./css-CNKF6pC6.js","./cypher-BUDAQ7Fk.js","./d-BIAtzqpc.js","./diff-aadYO3ro.js","./dtd-uNeIl1u0.js","./dylan-CrZBaY0F.js","./ecl-ByTsrrt6.js","./eiffel-DRhIEZQi.js","./elm-BBPeNBgT.js","./erlang-EMEOk6kj.js","./factor-D7Lm0c37.js","./simple-mode-B3UD3n_i.js","./forth-BdKkHzwH.js","./fortran-DxGNM9Kj.js","./gas-hf-H6Zc4.js","./gherkin-D1O_VlrS.js","./groovy-Budmgm6I.js","./haskell-CDrggYs0.js","./haxe-CPnBkTzf.js","./idl-BTZd0S94.js","./javascript-Czx24F5X.js","./julia-OeEN0FvJ.js","./livescript-DLmsZIyI.js","./lua-BM3BXoTQ.js","./mathematica-BbPQ8-Rw.js","./mbox-D2_16jOO.js","./mirc-CzS_wutP.js","./mllike-D9b50pH5.js","./modelica-C8E83p8w.js","./mscgen-Dk-3wFOB.js","./mumps-BRQASZoy.js","./nsis-C5Oj2cBc.js","./ntriples-D6VU4eew.js","./octave-xff1drIF.js","./oz-CRz8coQc.js","./pascal-DZhgfws7.js","./perl-BKXEkch3.js","./pig-rvFhLOOE.js","./powershell-Db7zgjV-.js","./properties-BF6anRzc.js","./protobuf-De4giNfG.js","./pug-CzQlD5xP.js","./puppet-CMgcPW4L.js","./python-DOZzlkV_.js","./q-8XMigH-s.js","./r-BuEncdBJ.js","./rpm-DnfrioeJ.js","./ruby-C9f8lbWZ.js","./sas-TQvbwzLU.js","./scheme-DCJ8_Fy0.js","./shell-D8pt0LM7.js","./sieve-DGXZ82l_.js","./smalltalk-DyRmt5Ka.js","./sparql-CLILkzHY.js","./stylus-BCmjnwMM.js","./swift-BkcVjmPv.js","./tcl-B3wbfJh2.js","./textile-D12VShq0.js","./toml-XXoBgyAV.js","./troff-D9lX0BP4.js","./ttcn-cfg-pqnJIxH9.js","./ttcn-DQ5upjvU.js","./turtle-BUVCUZMx.js","./vb-CgKmZtlp.js","./vbscript-mB-oVfPH.js","./velocity-CrvX3BFT.js","./verilog-C0Wzs7-f.js","./vhdl-s8UGv0A3.js","./webidl-GTmlnawS.js","./xquery-Bq3_mXJv.js","./yacas-B1P8UzPS.js","./z80-C8FzIVqi.js","./code-xml-CZN6vNxu.js","./play-5vQl-hy9.js","./trash-wVOgGgQw.js","./prop-types-DVDiRdwc.js","./layout-BjXzDXoG.css","./types-BLEgJ92v.js","./state-BVOf8gf_.js","./events-CBm-hwqS.js","./globals-LRz1TwrD.js","./share-DQLjaPiK.js","./blob-3_FN0u9S.js","./_baseSet-CxV9N1bc.js","./requests-CgpE4HfP.js","./runs-DfHioKE-.js","./request-registry-Chp6gpar.js","./state-CcAGAozT.js","./ws-DSN-Rmiu.js","./panels-B4E3DsXP.css","./edit-page-i8CUVb2_.js","./loro_wasm_bg-BFCm9sQd.js","./useDeleteCell-CdPMun7v.js","./add-cell-with-ai-DliUhk3v.js","./fileToBase64-BeYUTUzO.js","./cell-editor-D0cZ6uib.js","./useSplitCell-D9U9cqcM.js","./hooks-CSJfVKiY.js","./dist-DP9Si-4r.js","./circle-check-C17zXg7L.js","./save-DZ5aail6.js","./cell-editor-Iey559K_.css","./useNotebookActions-CVygGINk.js","./add-connection-dialog-DV3vbtpl.js","./write-secret-modal-3d81FTDU.js","./form-CamBS9Dt.js","./circle-plus-BdiiIXu5.js","./pair-with-agent-modal-E6eJ0EEu.js","./useCellActionButton-Bxc62PP9.js","./multi-icon-EmwmqsLV.js","./multi-icon-pwGWVz3d.css","./house-D2ldnAB9.js","./square-rACnnz-q.js","./CellStatus-D5Ep6nb_.js","./ban-0fKnt00i.js","./workflow-CgnDnnoN.js","./CellStatus-2Psjnl5F.css","./RunButton-DCavEI2P.js","./useDependencyPanelTab-BCDxafq1.js","./panel-context-BjAkdX44.js","./kiosk-mode-9gsbNPPE.js","./useBoolean-DElMi9Nd.js","./arrow-right-pRnMoIOW.js","./clipboard-paste-BPjPPEqD.js","./rotate-ccw-DoQtGgvU.js","./square-function-blYaQso8.js","./edit-page-Dstp9NQ5.css","./gallery-page-yF5NW34t.js","./chat-ui-KVXVRTEH.js","./chat-display-CibMHMMw.js","./isEmpty-CXeoXbuc.js","./bot-message-square-DrbHk31W.js","./glide-data-editor-DIy5fXpI.js","./types-BYwxXaSY.js","./click-outside-container-gHk0jCel.js","./dist-Cs_bgIgX.js","./glide-data-editor-BrZJn3-g.css","./ConnectedDataExplorerComponent-attuc7tD.js","./spec-D1ptWKg6.js","./react-vega-DQrwrVO-.js","./linear-D02RlXvO.js","./timer-DXL2Iyk5.js","./init-DZ5TV86b.js","./time-B06lsPiK.js","./range-Dk7lXDev.js","./treemap-BY_mNGmB.js","./path-MXGY7b8Y.js","./colors-D952IYju.js","./ordinal-BIzqP_np.js","./arc-CTRjCaaq.js","./math-BkqINfbU.js","./array-9XpbrfQ5.js","./step-vPM7ouyU.js","./line-BtYBewh-.js","./Plot-Co1-Szj8.js","./vega-component-BNkB35aS.js","./useDeepCompareMemoize-CWcgQCbT.js","./swiper-component-B-kCXqsd.js","./swiper-component-a65-SW8d.css","./slides-MCbMDtlY.css","./ImageComparisonComponent-xPoovIsx.js","./mermaid-B5ZExD6g.js","./dist-BjCIGEdQ.js","./chunk-JA3XYJ7Z-DuN1NS8L.js","./src-BRLtyMKi.js","./src-DJ8ZKoFs.js","./chunk-S3R3BYOJ-gUf_TUeJ.js","./chunk-ABZYJK2D-Djx7buCV.js","./chunk-ATLVNIR6-BIpgJe3A.js","./chunk-CVBHYZKI-BX0N_ipT.js","./chunk-DR5Q36YT-DOSR70sR.js","./chunk-EXTU4WIE-Bd7Zd-f9.js","./chunk-HN2XXSSU-ujlBpRMF.js","./chunk-JZLCHNYA-CAtbJ3N5.js","./chunk-MI3HLSF2-D9JXkg6-.js","./chunk-N4CR4FBY-CuVTMGRp.js","./chunk-QXUST7PY-C2pRcbaf.js","./katex-BGtenqy0.js","./katex-CUvM6AOy.js","./mhchem-DYFmc51f.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var V2=Object.defineProperty;var Rp=j=>{throw TypeError(j)};var H2=(j,Me,o)=>Me in j?V2(j,Me,{enumerable:!0,configurable:!0,writable:!0,value:o}):j[Me]=o;var B=(j,Me,o)=>H2(j,typeof Me!="symbol"?Me+"":Me,o),Jl=(j,Me,o)=>Me.has(j)||Rp("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)?Rp("Cannot add the same private member more than once"):Me instanceof WeakSet?Me.add(j):Me.set(j,o),at=(j,Me,o,Rt)=>(Jl(j,Me,"write to private field"),Rt?Rt.call(j,o):Me.set(j,o),o),Sr=(j,Me,o)=>(Jl(j,Me,"access private method"),o);var zp=(j,Me,o,Rt)=>({set _(Mn){at(j,Me,Mn,o)},get _(){return $(j,Me,Rt)}});import{r as B2,s as qr,t as es}from"./chunk-LvLJmgfZ.js";import{c as _i,i as Ve,l as Sn,n as $e,s as Si,u as ga}from"./useEvent-D91BmmQi.js";import{t as W2}from"./react-Bj1aDYRI.js";import{$ as $2,Ai as Mp,Bi as q2,Bt as ki,Ci as U2,Hi as Ur,Ii as Pp,J as Y2,Ki as Fp,Mi as G2,Oi as K2,Pi as ts,Q as Q2,Qr as X2,Ri as Z2,S as J2,Si as ej,Sr as tj,Ti as rj,Vi as nj,X as aj,Y as ij,Z as oj,at as lj,b as Op,br as sj,bt as dj,cr as Lp,dr as cj,et as uj,gi as pj,gr as Ni,ji as rs,ki as mj,nr as ns,ot as hj,rr as Dp,ut as fj,vi as gj,vr as xj,wi as vj,wr as wj,yr as Vp,yt as bj,z as yj,zi as kn,__tla as jj}from"./cells-FW8WlzJY.js";import{t as Hp}from"./react-dom-CSu739Rf.js";import{A as kr,B as Ne,C as Kt,E as Cj,F as Bp,I as ft,J as _j,N as L,O as Sj,P as F,R as I,S as Yr,T as D,U as kj,V as Nr,a as Wp,b as ye,h as Nj,i as $p,j as Tj,k as Xe,n as qp,r as Aj,s as as,t as Tr,v as Ij,w as G,x as Up,z as Qt}from"./zod-H_cgTO0M.js";import{t as ee}from"./compiler-runtime-B3qBwwSJ.js";import{t as Ej}from"./get-C-qh_et5.js";import{t as Ti}from"./pick-DqWUNly1.js";import{a as Rj,c as zj,d as is,f as Mj,g as Pj,i as Fj,l as Oj,m as Lj,o as Ar,p as Dj,r as Yp,s as os,u as Gp,w as Vj,x as Hj,__tla as Bj}from"./state-BVOf8gf_.js";import{_ as ue,a as Wj,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 $j,M as qj,b as Uj,d as Yj,j as Gj,o as Kj,t as Qj,v as Xj,w as Zj,x as Jj}from"./utils-CvI-39U6.js";import{r as ss}from"./constants-DMpttj8Q.js";import{S as ct,T as eC,a as tC,b as Kp,i as Qp,l as xa,r as ds,s as rC,t as nC,v as Xp,w as Zp}from"./config-DH1Le_e1.js";import{a as aC,i as iC,n as oC,o as lC,r as sC,t as dC}from"./switch-NmKFCQsT.js";import{t as cC}from"./globals-LRz1TwrD.js";import{t as Ai}from"./ErrorBoundary-DyYDV0HI.js";import{n as cs,t as Z}from"./cn-DCUzRj2J.js";import{t as uC}from"./jsx-runtime-BqBOg78p.js";import{C as vt,S as Jp,_ as Ii,a as pC,b as it,g as em,h as Kr,i as mC,p as hC,v as us,w as tm,y as ps}from"./fullscreen-eipL3i3Y.js";import{o as fC,s as gC}from"./dist-BdyjRhEt.js";import{d as ms,u as rm}from"./menu-items-DcP01QzW.js";import{a as nm,c as xC,i as am,l as vC,n as hs,o as wC,r as im,s as bC}from"./multi-map-CUuNtzHt.js";import{a as om,c as lm,i as sm,l as dm,n as cm,s as um,t as pm}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 yC,c as Ir,d as jC,f as CC,i as Vt,l as fs,m as mm,n as Er,o as Ei,p as hm,r as An,s as Qr,t as Rr}from"./select-DZcFyKFQ.js";import{a as fm,c as _C,i as SC,m as gm,o as kC,p as NC,r as TC,t as AC}from"./dropdown-menu-CR7cnzLX.js";import{A as IC,B as gs,C as fr,D as EC,Dt as RC,E as Xr,Et as zC,F as MC,H as PC,I as xs,L as FC,O as OC,P as LC,R as DC,S as Ri,St as VC,T as HC,Tt as BC,V as WC,X as $C,Y as qC,Z as UC,_t as xm,at as vm,b as wm,d as YC,dt as zi,et as vs,f as GC,ft as wa,gt as KC,ht as Zr,it as QC,k as XC,l as ZC,lt as JC,mt as ws,nt as e_,ot as t_,r as r_,rt as n_,s as a_,st as i_,t as bm,tt as bs,u as o_,ut as ym,wt as l_,x as s_,y as d_,z as jm,__tla as c_}from"./JsonOutput-Df7Vt26h.js";import{t as ys}from"./label-xHqFtfdz.js";import{h as Cm,i as _m,l as u_,r as p_}from"./download-4dvb0Tm7.js";import{n as m_,t as h_}from"./radio-group-BMlG1iLU.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 f_}from"./dist-BrR4M-k3.js";import{m as g_,o as x_,t as ir}from"./arrays-DYDL-3-i.js";import{n as Ns,t as v_}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 w_}from"./requests-DIwGYs0l.js";import{t as Ht}from"./createLucideIcon-D5guW7EU.js";import{A as b_,C as Sm,D as y_,O as j_,S as C_,_ as __,a as km,b as S_,c as Nm,d as ya,f as Tm,g as k_,h as N_,i as As,k as T_,l as A_,m as Am,n as I_,p as E_,r as xr,s as R_,t as z_,u as or,v as M_,y as P_}from"./spec-D1ptWKg6.js";import{n as F_,r as O_,t as L_}from"./fileToBase64-BeYUTUzO.js";import{t as D_,__tla as V_}from"./LazyAnyLanguageCodeMirror-kGFT2d8V.js";import{i as H_,n as B_,o as W_}from"./useLifecycle-DieWOfXE.js";import{i as $_,n as q_,t as Im}from"./useBoolean-DElMi9Nd.js";import{r as Em,t as Pi}from"./x-C-6liIBr.js";import{t as Is}from"./chevron-right-CG5QYXYk.js";import{__tla as U_}from"./markdown-renderer-B2dVZ8Vp.js";import{t as Y_}from"./code-xml-CZN6vNxu.js";import{t as Rm}from"./copy-BwrPA9zQ.js";import{t as G_}from"./eye-off-BT-KOYV5.js";import{n as K_}from"./file-headphone-B3fuktN0.js";import{r as Q_,t as X_}from"./file-icons-QWprdVWf.js";import{a as zm,c as pe,i as Z_,l as Mm,n as Pm,o as J_,r as eS,s as Fm,t as tS,u as rS}from"./form-CamBS9Dt.js";import{t as nS}from"./house-D2ldnAB9.js";import{n as Fi,t as Oi}from"./spinner-UuZAUjoP.js";import{i as aS,r as Om,t as Es}from"./readonly-python-code-6oNL64J_.js";import{n as iS,t as Li}from"./types-BYwxXaSY.js";import{t as Lm}from"./plus-CxkHs8QM.js";import{t as oS}from"./refresh-cw-a_9k9BK7.js";import{i as lS,n as sS,o as Dm,r as dS,t as Rs}from"./input-TSilD7AA.js";import{t as Di}from"./square-function-blYaQso8.js";import{_ as lt,a as gt,c as ut,d as Jr,f as cS,g as Vm,h as uS,i as pS,l as ht,n as mS,o as ja,p as Hm,r as hS,t as fS,u as wt,v as lr}from"./textarea-C2xm11xc.js";import{a as gS,i as xS,r as vS,t as wS}from"./column-preview-DMA6YbRX.js";import{t as bS}from"./square-rACnnz-q.js";import{t as yS}from"./trash-2-BJLYnZpG.js";import{t as Vi}from"./triangle-alert-CJ0ZIqcz.js";import{n as Bm,t as jS}from"./es-au8YY-8E.js";import{t as Ct}from"./preload-helper-DdZsAcJe.js";import"./dist-DCqxOggh.js";import"./dist-BZr6MMV-.js";import"./dist-BU26XwgJ.js";import"./dist-COs9gIu5.js";import"./dist-DkA__6UI.js";import{n as CS,t as Bt}from"./use-toast-9t59MOqR.js";import{n as Wm,t as _S}from"./paths-SFhaqGlE.js";import{l as SS,r as kS,s as NS}from"./session-DGdfs0bJ.js";import{r as In}from"./useTheme-BrivXfaa.js";import"./purify.es-DvRMX74T.js";import{n as TS,r as AS,t as IS}from"./dates-DS_7IZoI.js";import{t as zs}from"./copy-icon-z0dzhmL4.js";import{n as ES,t as Mr}from"./context-C1Tm_47t.js";import{t as RS}from"./useNumberFormatter-CW4V-fpE.js";import{t as qe}from"./RenderHTML-CE7-VlyN.js";import{n as zS,t as $m}from"./useDebounce-_BZcy6gx.js";import{i as En,r as MS}from"./numbers-mY4EY0yG.js";import{t as PS}from"./ImperativeModal-BeQmePpG.js";import"./share-DQLjaPiK.js";import{n as qm,r as Um,t as FS}from"./errors-iwK4b4VF.js";import{a as Ym,n as OS,o as LS,r as DS,t as VS}from"./utils-DQRuLEof.js";import"./vega-loader.browser-xq8miGHn.js";import"./defaultLocale-DPBdGRrH.js";import"./defaultLocale-Lfi0pexn.js";import{a as HS}from"./react-icons.esm--O4lBTlZ.js";import{a as Gm,i as BS,n as Rn,t as WS}from"./events-CBm-hwqS.js";import{n as $S,r as Ms,t as Hi}from"./alert-DrHguQlr.js";import{n as Ca,t as en}from"./error-banner-CLO6LFll.js";import{__tla as qS}from"./chunk-5FQGJX7Z-WmZDj8ty.js";import"./html-to-image-C5f8yFhw.js";import{a as US,o as YS}from"./focus-9N2kMkkO.js";import{n as Et}from"./useAsyncData-Dg8E_bPh.js";import{a as Km,i as Ps,n as Fs,o as zn,r as tn,t as Os}from"./table-Bgc-inJs.js";import"./react-resizable-panels.browser.esm-BdtIs0E-.js";import{a as Qm,c as GS,o as KS,r as QS,s as XS,t as Xm,u as ZS}from"./command-DUeag2QH.js";import{t as Zm}from"./renderShortcut-BTgMpqTK.js";import{t as JS}from"./bundle.esm-BXIlAZ6T.js";import{n as ek}from"./icons-8tfAri2V.js";import"./esm-Cb2bnV6o.js";import{a as tk,i as rk,n as nk,o as ak,t as Jm}from"./components-CtK6Njp_.js";import{t as sr}from"./useDeepCompareMemoize-CWcgQCbT.js";import{t as ik}from"./pathUtils-vgBYIo5B.js";import{i as ok,n as lk,r as sk}from"./floating-outline-OoVdhPGt.js";Promise.all([(()=>{try{return jj}catch{}})(),(()=>{try{return Bj}catch{}})(),(()=>{try{return c_}catch{}})(),(()=>{try{return V_}catch{}})(),(()=>{try{return U_}catch{}})(),(()=>{try{return qS}catch{}})()]).then(async()=>{var yt,la,Ie,Le,xn,vn,wn,sa,Lt,Wi,Ds,Vs,Br,jt,da,Wr,bn,ca,yn,ua,wi,pa,bi,yi,ji,Ci,Ap;(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(W2(),1),Me=qr(Hp(),1),o=qr(uC(),1),Rt="NavigationMenu",[Mn,Hs,eh]=ms(Rt),[$i,th,rh]=ms(Rt),[qi,dk]=Jp(Rt,[eh,rh]),[nh,zt]=qi(Rt),[ah,ih]=qi(Rt),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=rm(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:Rt}),_=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=Rt;var Ui="NavigationMenuSub",oh=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:a,defaultValue:i,orientation:l="horizontal",...s}=t,d=zt(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})})});oh.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)(nh,{scope:e,isRootMenu:r,rootNavigationMenu:n,value:s,previousValue:mm(s),baseId:em(),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)(ah,{scope:e,items:w,children:l})})})},$s="NavigationMenuList",qs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=zt($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",[lh,Ys]=qi(Us),Gs=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,value:n,...a}=t,i=em(),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=hh(g))}},[]);return(0,o.jsx)(lh,{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=zt(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)(gC,{"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 sh="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}),tm(s,d),!d.defaultPrevented&&!l.metaKey&&tm(s,new CustomEvent(_a,{bubbles:!0,cancelable:!0}))},{checkForDefaultPrevented:!1})})})});Xs.displayName=sh;var Gi="NavigationMenuIndicator",Zs=j.forwardRef((t,e)=>{let{forceMount:r,...n}=t,a=zt(Gi,t.__scopeNavigationMenu),i=!!a.value;return a.indicatorTrack?Me.createPortal((0,o.jsx)(Ii,{present:r||i,children:(0,o.jsx)(dh,{...n,ref:e})}),a.indicatorTrack):null});Zs.displayName=Gi;var dh=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=zt(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=zt(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)(ch,{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 ch=j.forwardRef((t,e)=>{let{onViewportContentChange:r,onViewportContentRemove:n}=zt(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=zt(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)(hC,{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=!!zt(Ki,t.__scopeNavigationMenu).value;return(0,o.jsx)(Ii,{present:r||a,children:(0,o.jsx)(uh,{...n,ref:e})})});td.displayName=Ki;var uh=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,children:n,...a}=t,i=zt(Ki,r),l=Xt(e,i.onViewportChange),s=ih(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:Wj(b,C=>{S&&C&&p(C)})})},w)})})}),ph="FocusGroup",rd=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=zt(ph,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"],mh="FocusGroupItem",ad=j.forwardRef((t,e)=>{let{__scopeNavigationMenu:r,...n}=t,a=th(r),i=zt(mh,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 hh(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,fh=Gs,dd=Ks,gh=Xs,cd=Zs,ud=Js,pd=td,xh=B2({Range:()=>co,Root:()=>Na,Slider:()=>to,SliderRange:()=>ao,SliderThumb:()=>oo,SliderTrack:()=>ro,Thumb:()=>Ta,Track:()=>so,createSliderScope:()=>bh},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,vh,wh]=ms(nn),[gd,bh]=Jp(nn,[wh]),[yh,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"?jh:Ch,[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,Th(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=Rh(i),E=hm(zh(Math.round((T-n)/i)*i+n,z),[n,a]);S((M=[])=>{let P=kh(M,E,A);if(Eh(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)(yh,{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}),jh=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=rm(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})}})})}),Ch=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=vh(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)(_h,{...t,ref:i,index:l})}),_h=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=fC(d),f=l.values[n],g=f===void 0?0:jd(f,l.min,l.max),x=Nh(n,l.values.length),w=m==null?void 0:m[s.size],b=w?Ah(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 Sh="RadioBubbleInput",yd=j.forwardRef(({__scopeSlider:t,value:e,...r},n)=>{let a=j.useRef(null),i=Xt(a,n),l=mm(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=Sh;function kh(t=[],e,r){let n=[...t];return n[r]=e,n.sort((a,i)=>a-i)}function jd(t,e,r){return hm(100/(r-e)*(t-e),[0,100])}function Nh(t,e){if(e>2)return`Value ${t+1} of ${e}`;if(e===2)return["Minimum","Maximum"][t]}function Th(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 Ah(t,e,r){let n=t/2;return(n-lo([0,50],[0,n])(e)*r)*r}function Ih(t){return t.slice(0,-1).map((e,r)=>t[r+1]-e)}function Eh(t,e){if(e>0){let r=Ih(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 Rh(t){return(String(t).split(".")[1]||"").length}function zh(t,e){let r=10**e;return Math.round(t*r)/r}var Na=to,so=ro,co=ao,Ta=oo,Mh=Ht("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"}]]),Ph=Ht("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"}]]),Fh=Ht("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"}]]),Oh=Ht("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"}]]),Lh=Ht("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"}]]),Dh=Ht("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=Ht("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"}]]),Hh=Ht("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"}]]),Bh=Ht("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=Ht("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"}]]),Wh=Ht("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=Ht("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"}]]),$h=qr(Fp(),1);const vr={INSERT:"insert",DELETE:"delete",SUBSTITUTE:"substitute",MATCH:"match"};function qh(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 Uh(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 Yh(t,e,r,n){let a=qh(t,e,r);return{merged:Uh(t,a.operations,n),edits:a}}var Aa=0,Ia="";function uo(t){return t.id?t.id:t.name==="setup"?Z2:ts.create()}function Gh(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}=Yh(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 Kh(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 Qh(t){let e=yj();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?bj(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 Xh(t,e){let{cellIds:r,sessionCellData:n,notebookCellData:a}=Gh(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]=Kh(s,c)),l[s]=Qh(d)}return{cellIds:pj.from([r]),cellData:i,cellRuntime:l,cellHandles:{},history:[],scrollKey:null,cellLogs:[],untouchedNewCells:new Set}}var Zh=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}),Jh=Object.freeze({width:null,height:null}),Td=Object.freeze({...Jh,...Ea});function ef(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 tf=/[\s,]+/;function rf(t,e){e.split(tf).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=ef(r("rotate","")),rf(e,r("flip","")),e.preserveAspectRatio=r("preserveAspectRatio",r("preserveaspectratio","")),e}function nf(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 af(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=af(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 of(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 lf(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=of(t);for(let a in n){let i=n[a];i&&(e(a,lf(t,a,i)),r.push(a))}return r}var sf={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,sf))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 df(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]=df(t,e))}function Pd(t,e){return Md(e)?zd(e,(r,n)=>{n?t.icons[r]=n:t.missing.add(r)}):[]}function cf(t,e,r){try{if(typeof r.body=="string")return t.icons[e]={...r},!0}catch{}return!1}function uf(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?cf(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 Dd(t){return!!Ln(t)}function pf(t){let e=Ln(t);return e&&{...Pn,...e}}function mf(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 Vd(t,e){t.forEach(r=>{let n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(a=>a.id!==e))})}function hf(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||Vd([t],i.id),i.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),i.abort))})}))}var ff=0;function gf(t,e,r){let n=ff++,a=Vd.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 xf(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 vf={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function wf(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={...vf,...t},r=[];function n(){r=r.filter(l=>l().status==="pending")}function a(l,s,d){let c=wf(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 bf(){return Object.keys(Ma)}function $d(){}var vo=Object.create(null);function yf(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=yf(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 jf(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,hf(t)}))}function Cf(t){let e=[],r=[];return t.forEach(n=>{(n.match(Ed)?e:r).push(n)}),{valid:e,invalid:r}}function Dn(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(),jf(t)}function Yd(t,e){t instanceof Promise?t.then(r=>{e(r)}).catch(()=>{e(null)}):e(t)}function _f(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=>{Dn(t,a,c)});return}if(i){a.forEach(c=>{Yd(i(c,n,r),u=>{Dn(t,[c],u?{prefix:n,icons:{[c]:u}}:null)})});return}let{valid:l,invalid:s}=Cf(a);if(s.length&&Dn(t,s,null),!l.length)return;let d=n.match(Ed)?fo(r):null;if(!d){Dn(t,l,null);return}d.prepare(r,n,l).forEach(c=>{qd(r,c,u=>{Dn(t,c.icons,u)})})}))}var wo=(t,e)=>{let r=mf(xf(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&&_f(s,d)}),e?gf(e,r,a):Ud},Sf=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 kf(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 Nf(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 Tf=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Af=/^-?[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(Tf);if(n===null||!n.length)return t;let a=[],i=n.shift(),l=Af.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 If(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 Ef(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Rf(t,e,r){let n=If(t);return Ef(n.defs,e+n.content+r)}var zf=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=Rf(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)=>{zf(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 Mf(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Pf(t){return"data:image/svg+xml,"+Mf(t)}function Xd(t){return'url("'+Pf(t)+'")'}var Oa=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function Ff(t){Oa=t}function Of(){return Oa}function Lf(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 Df(t){return t===404}var Vf=(t,e,r)=>{let n=[],a=Lf(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 Hf(t){if(typeof t=="string"){let e=Fa(t);if(e)return e.path}return"/"}var Bf={prepare:Vf,send:(t,e,r)=>{if(!Oa){r("abort",424);return}let n=Hf(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(Df(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 Wf(t,e,r){dr(r||"",e).loadIcons=t}function $f(t,e,r){dr(r||"",e).loadIcon=t}var jo="data-style",Zd="";function qf(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("",Bf),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:Dd,iconExists:Dd,getIcon:pf,listIcons:uf,addIcon:Od,addCollection:Ld,calculateSize:bo,buildIcon:Qd,iconToHTML:yo,svgToURL:Xd,loadIcons:wo,loadIcon:Sf,addAPIProvider:Wd,setCustomIconLoader:$f,setCustomIconsLoader:Wf,appendCustomStyle:qf,_api:{getAPIConfig:Fa,setAPIModule:Hd,sendAPIQuery:qd,setFetch:Ff,getFetch:Of,listAPIProviders:bf}}}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 Uf(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 Vn;function Yf(){try{Vn=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Vn=null}}function Gf(t){return Vn===void 0&&Yf(),Vn?Vn.createHTML(t):t}function Kf(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=Gf(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=Kf(a):l=Uf(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 Qf(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||nf(d.customisations,p)||!_o(this._shadowRoot))&&this._renderIcon(d.icon,p,u)}_iconChanged(d){let c=kf(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=Nf(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:ck,disableCache:uk,iconLoaded:pk,iconExists:mk,getIcon:hk,listIcons:fk,addIcon:gk,addCollection:xk,calculateSize:vk,buildIcon:wk,iconToHTML:bk,svgToURL:yk,loadIcons:jk,loadIcon:Ck,setCustomIconLoader:_k,setCustomIconsLoader:Sk,addAPIProvider:kk,_api:Nk}=Qf()||ec();const Xf=()=>((0,Zh.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 Zf=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 Jf=ee();const e0=()=>{let t=(0,Jf.c)(25),[e,r]=Sn(Hj);if(e===null)return null;let n;t[0]===e?n=t[1]:(n=async()=>{try{await navigator.clipboard.writeText(e),Bt({title:"Copied to clipboard",description:"Error details have been copied to your clipboard."})}catch{Bt({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=t0,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)(lm,{children:[(0,o.jsxs)(dm,{className:"flex items-center gap-2 text-destructive",children:[(0,o.jsx)(tj,{className:"h-5 w-5"}),"Kernel Startup Failed"]}),(0,o.jsx)(om,{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)(Rm,{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)(nS,{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)(um,{children:[x,(0,o.jsx)(cm,{onClick:l,children:"Dismiss"})]}),t[17]=l,t[18]=w);let b;t[19]!==w||t[20]!==g?(b=(0,o.jsxs)(sm,{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)(pm,{open:!0,onOpenChange:d,children:b}),t[22]=b,t[23]=d,t[24]=v):v=t[24],v};function t0(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}var r0=ee();const n0=t=>{let e=(0,r0.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=dj(a);let _=C.textContent||C.innerText||"";try{await navigator.clipboard.writeText(_),Bt({title:"Copied to clipboard",description:"Traceback has been copied to your clipboard."})}catch{Bt({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)(dm,{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)(om,{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)(lm,{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)(Rm,{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)(um,{children:(0,o.jsx)(cm,{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)(sm,{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)(pm,{open:r,onOpenChange:d,children:y}),e[26]=r,e[27]=y,e[28]=d,e[29]=S):S=e[29],S};var a0=ee();const i0=()=>{let t=(0,a0.c)(6),[e,r]=Sn(uj);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)(n0,{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 o0=ee();const l0=()=>{let t=(0,o0.c)(5),{toasts:e}=CS(),r;t[0]===e?r=t[1]:(r=e.map(s0),t[0]=e,t[1]=r);let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,o.jsx)($2,{}),t[2]=n):n=t[2];let a;return t[3]===r?a=t[4]:(a=(0,o.jsxs)(oj,{children:[r,n]}),t[3]=r,t[4]=a),a};function s0(t){let{id:e,title:r,description:n,action:a,...i}=t;return(0,o.jsxs)(Y2,{...i,children:[(0,o.jsxs)("div",{className:"grid gap-1",children:[r&&(0,o.jsx)(Q2,{children:r}),n&&(0,o.jsx)(aj,{children:n})]}),a,(0,o.jsx)(ij,{})]},e)}var d0=ee();const So=t=>{let e=(0,d0.c)(5),{children:r}=t,n=ga(Xj),a;e[0]===n?a=e[1]:(a=c0(n),e[0]=n,e[1]=a);let i;return e[2]!==r||e[3]!==a?(i=(0,o.jsx)(ES,{locale:a,children:r}),e[2]=r,e[3]=a,e[4]=i):i=e[4],i};function c0(t){return t&&u0(t)?t:navigator.language}function u0(t){try{return new Intl.NumberFormat(t),!0}catch{return!1}}var dc=ee(),cc=La(()=>Ct(()=>import("./home-page-BoVBmmUH.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,135]),import.meta.url)),uc=La(()=>Ct(()=>import("./run-page-CbdXCKPz.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([136,137,138,4,139,13,8,9,10,11,140,141,142,143,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,144,70,145,146,105,75,74,79,78,80,81,82,83,84,71,72,68,69,85,147,148,149,93,97,150,151,134,152,66,153,154,155,90,156,157,158,159,160,161,86,162,92,88,163,91,164,122,123,124,126,119,165,166,127,94,167,168,130,116,169,98,100,170,171,172,173,174,175,176,177,178,179,180,77,87,89,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,279,112,280,281,282,283,284,285,286,287,288,289,95,96,290,291,292,293,294,295,296,120]),import.meta.url)),pc=La(()=>Ct(()=>import("./edit-page-i8CUVb2_.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([297,4,298,10,137,138,139,13,8,9,11,140,141,142,143,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,144,70,145,146,105,75,74,79,78,80,81,82,83,84,71,72,68,69,85,147,148,149,93,97,150,151,134,152,66,153,154,155,90,156,157,158,159,160,161,86,162,92,88,163,91,164,122,123,124,126,119,165,166,127,94,167,168,130,116,169,98,100,170,171,172,173,174,175,176,177,178,179,180,77,87,89,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,279,112,280,281,282,283,284,285,286,287,288,289,95,96,290,291,292,293,294,295,296,2,67,73,76,99,101,102,1,103,104,106,299,300,108,301,118,111,302,303,109,110,304,121,305,306,307,308,309,310,311,312,135,313,131,314,315,316,317,133,120,125,132,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333]),import.meta.url)),mc=La(()=>Ct(()=>import("./gallery-page-yF5NW34t.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([334,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 p0(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]=Jj(),[r]=Uj(),n;t[0]===e.display.code_editor_font_size?n=t[1]:(n=m0(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=lj();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)(Zf,{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)(l0,{}),a=(0,o.jsx)(Xf,{}),i=(0,o.jsx)(e0,{}),l=(0,o.jsx)(i0,{}),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)(xm,{controller:wa,children:(0,o.jsx)(So,{children:(0,o.jsxs)(PS,{children:[r,n,a,i,l]})})})})})}),e[4]=r,e[5]=s),s});fc.displayName="Providers";function m0(t){return`${t/16}rem`}function h0(){NS(t=>{t.delete(ss.accessToken)})}var f0={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 g0(t,e){let r=v_(async a=>{Ve.set(Xp,{state:Zp.CONNECTING}),await a.init()});function n(a,i){let l=f0[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 qm;case"waitForConnectionOpen":return await ct(),await Om(),a(...s);case"startConnection":return await r(d),await ct(),i!=="sendInstantiate"&&await Om(),a(...s);default:throw Error(`Unknown action for "${i}"`)}}}return Gr.mapValues(t,(a,i)=>n(a,i))}function x0(t){return{body:t,bodySerializer:e=>e}}var{handleResponse:Oe,handleResponseReturnNull:Ce}=oC;function v0(){let t=Ns(()=>sC(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",x0(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)}}var w0="static-notebook";function gc(){Bt({id:w0,once:!0,title:"Static notebook",description:"This notebook is not connected to a kernel. Any interactive elements will not work."})}function b0(){let t=()=>{throw Error("Unreachable. Expected to be in run mode")};return{sendComponentValues:async()=>(gc(),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()=>(gc(),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 y0=ee();function j0(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 qm){if(Ve.get(Kp))return;let u=Bt({title:"Kernel Not Connected",description:"You need to connect to a kernel to perform this action.",variant:"default",action:(0,o.jsx)(C0,{onConnect:()=>u.dismiss()})});throw ue.error(`Failed to handle request: ${n}`,s),s}let d=e[i],c=Um(s);throw d&&Bt({title:d,description:c,variant:"danger"}),ue.error(`Failed to handle request: ${n}`,s),s}}}return r}const C0=t=>{let e=(0,y0.c)(9),{onConnect:r}=t,n=tC(),a=ga(Kp),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 _0(){let t;return t=eC()?Lj.INSTANCE:xa()?b0():g0(v0(),()=>ds()),j0(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)(wc,{}),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 S0=cs("group flex list-none gap-1",{variants:{orientation:{horizontal:"flex items-center",vertical:"flex flex-col"}},defaultVariants:{orientation:"horizontal"}}),Da=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(S0({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});Da.displayName=sd.displayName;var No=fh,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"}}),xc=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)(HS,{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});xc.displayName=dd.displayName;var vc=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});vc.displayName=ud.displayName;var Ao=gh,wc=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});wc.displayName=pd.displayName;var k0=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});k0.displayName=cd.displayName;var bc=ee(),N0=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)(T0,{...t.data})}},T0=t=>{let e=(0,bc.c)(13),{items:r,orientation:n}=t,a=A0,i=I0,l=E0,s;e[0]===n?s=e[1]:(s=m=>"items"in m?n==="horizontal"?(0,o.jsx)(ko,{orientation:"horizontal",children:(0,o.jsx)(Da,{children:(0,o.jsxs)(No,{children:[(0,o.jsx)(xc,{children:qe({html:m.label})}),(0,o.jsx)(vc,{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)(yc,{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)(Da,{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)(Da,{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},yc=j.forwardRef((t,e)=>{let r=(0,bc.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});yc.displayName="ListItem";function A0(t,e){return e?(0,o.jsx)(gr,{delayDuration:200,content:qe({html:e}),children:t}):t}function I0(t){return t.startsWith("http")?"_blank":"_self"}function E0(t){return kS({href:t,queryParams:new URL(globalThis.location.href).search,keys:[ss.filePath]})}function R0(t,e){return t===e?!0:t==null||e==null?!1:Array.isArray(t)&&Array.isArray(e)?x_(t,e):typeof t=="object"&&typeof e=="object"?z0(t,e):!1}function z0(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 M0(t,e){if(!e)return[];let r=t;if(n_(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"?IS:e.type==="time"?AS:TS;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 jc(t){return{type:"group",operator:"and",children:t.flatMap(e=>M0(e.id,e.value)),negate:!1}}var P0=ee(),F0=xC,O0=wC,L0=bC,D0=vC;const V0=t=>{let e=(0,P0.c)(16),{error:r,badData:n,shadowRoot:a}=t;if(r instanceof kj){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(B0),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)(D0,{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)(bm,{data:n}),e[6]=n,e[7]=u);let p;e[8]!==a||e[9]!==u?(p=(0,o.jsx)(F0,{type:"single",collapsible:!0,children:(0,o.jsxs)(L0,{value:"item-1",className:"text-muted-foreground border-muted-foreground-20",children:[c,(0,o.jsx)(O0,{className:"text-[0.84375rem]",children:(0,o.jsx)(ym,{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 H0(t,e,r){return(0,o.jsx)(V0,{error:t,badData:e,shadowRoot:r})}function B0(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 W0({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,BS.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 R0(v,b)||t.dispatchEvent(Gm(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=Pp.findElementThroughShadowDOMs(t))==null?void 0:A.id,N=h?Pp.parse(h):null;if(N&&!k){let R=Ve.get(Op),z=R.cellRuntime[N],E=R.cellData[N];if(X2({executionTime:z.runElapsedTimeMs??E.lastExecutionTime,status:z.status,errored:z.errored,interrupted:z.interrupted,stopped:z.stopped}))throw new FS}else ue.warn(`Cell ID ${N} cannot be found`);let T=await Fj.request({args:kc(y,C[0]),functionName:b,namespace:_});if(T.status.code!=="ok")throw ue.error(T.status),Error(T.status.message||"Unknown error");return kc(S,T.return_value)}}return w},[e.functions,t,m]);return u.success?(0,o.jsx)(pC,{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})})})})}):H0(u.error,Gr.mapValues(t.dataset,w=>typeof w=="string"?Mp(w):w),t.shadowRoot)}var $0=j.forwardRef(W0),Eo=new Map,Cc="__custom_marimo_element__";function _c(t){let e=class extends HTMLElement{constructor(){super();B(this,"mounted",!1);B(this,"pluginRef",(0,j.createRef)());B(this,"__type__",Cc);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=$h.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(Gm(Mp(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:Ve,children:(0,o.jsx)(So,{children:(0,o.jsx)($0,{hostElement:this,plugin:t,ref:this.pluginRef,getInitialValue:()=>G2(this,Rj.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:Sc(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(!Sc(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(`
|