@elizaos/client 1.6.5-alpha.16 → 1.6.5-alpha.17
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/{_basePickBy-DQuJ1nn4.js → _basePickBy-DrjfzehT.js} +2 -2
- package/dist/assets/{_basePickBy-DQuJ1nn4.js.map → _basePickBy-DrjfzehT.js.map} +1 -1
- package/dist/assets/{_baseUniq-CPJMUVcU.js → _baseUniq-C9f3RlhH.js} +2 -2
- package/dist/assets/{_baseUniq-CPJMUVcU.js.map → _baseUniq-C9f3RlhH.js.map} +1 -1
- package/dist/assets/{arc-BzfRaX_1.js → arc-DCNl1cLi.js} +2 -2
- package/dist/assets/{arc-BzfRaX_1.js.map → arc-DCNl1cLi.js.map} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-BQ1okAH5.js → architectureDiagram-VXUJARFQ-ukQ30H71.js} +2 -2
- package/dist/assets/{architectureDiagram-VXUJARFQ-BQ1okAH5.js.map → architectureDiagram-VXUJARFQ-ukQ30H71.js.map} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-CTvfKaPH.js → blockDiagram-VD42YOAC-ChWYDfqB.js} +2 -2
- package/dist/assets/{blockDiagram-VD42YOAC-CTvfKaPH.js.map → blockDiagram-VD42YOAC-ChWYDfqB.js.map} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-Dnnbke9y.js → c4Diagram-YG6GDRKO-C985mClW.js} +2 -2
- package/dist/assets/{c4Diagram-YG6GDRKO-Dnnbke9y.js.map → c4Diagram-YG6GDRKO-C985mClW.js.map} +1 -1
- package/dist/assets/{channel-CnyCydsr.js → channel-D4RXs-md.js} +2 -2
- package/dist/assets/{channel-CnyCydsr.js.map → channel-D4RXs-md.js.map} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-DtlR-O8_.js → chunk-4BX2VUAB-JzlZ8S9g.js} +2 -2
- package/dist/assets/{chunk-4BX2VUAB-DtlR-O8_.js.map → chunk-4BX2VUAB-JzlZ8S9g.js.map} +1 -1
- package/dist/assets/{chunk-55IACEB6-Do3P2gDL.js → chunk-55IACEB6-Ce6_QscB.js} +2 -2
- package/dist/assets/{chunk-55IACEB6-Do3P2gDL.js.map → chunk-55IACEB6-Ce6_QscB.js.map} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-C0rZbxsQ.js → chunk-B4BG7PRW-DrYi__g4.js} +2 -2
- package/dist/assets/{chunk-B4BG7PRW-C0rZbxsQ.js.map → chunk-B4BG7PRW-DrYi__g4.js.map} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-BLZ3IKZp.js → chunk-DI55MBZ5-NFTXMt5A.js} +2 -2
- package/dist/assets/{chunk-DI55MBZ5-BLZ3IKZp.js.map → chunk-DI55MBZ5-NFTXMt5A.js.map} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-D2LsXodW.js → chunk-FMBD7UC4-BCCzOsCC.js} +2 -2
- package/dist/assets/{chunk-FMBD7UC4-D2LsXodW.js.map → chunk-FMBD7UC4-BCCzOsCC.js.map} +1 -1
- package/dist/assets/{chunk-QN33PNHL-DIJ9uIsS.js → chunk-QN33PNHL-UzVIA0Kn.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-DIJ9uIsS.js.map → chunk-QN33PNHL-UzVIA0Kn.js.map} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BALo-O-N.js → chunk-QZHKN3VN-BtYiCe00.js} +2 -2
- package/dist/assets/{chunk-QZHKN3VN-BALo-O-N.js.map → chunk-QZHKN3VN-BtYiCe00.js.map} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-DZqF0Erv.js → chunk-TZMSLE5B-D14OQI-i.js} +2 -2
- package/dist/assets/{chunk-TZMSLE5B-DZqF0Erv.js.map → chunk-TZMSLE5B-D14OQI-i.js.map} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-Sxshy6y_.js +2 -0
- package/dist/assets/{classDiagram-2ON5EDUG-O-pl8c_n.js.map → classDiagram-2ON5EDUG-Sxshy6y_.js.map} +1 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-Sxshy6y_.js +2 -0
- package/dist/assets/{classDiagram-v2-WZHVMYZB-O-pl8c_n.js.map → classDiagram-v2-WZHVMYZB-Sxshy6y_.js.map} +1 -1
- package/dist/assets/{clone-BadpO7x5.js → clone-DS9trnRN.js} +2 -2
- package/dist/assets/{clone-BadpO7x5.js.map → clone-DS9trnRN.js.map} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-B7O9iZC0.js → cose-bilkent-S5V4N54A-Bo5USdmM.js} +2 -2
- package/dist/assets/{cose-bilkent-S5V4N54A-B7O9iZC0.js.map → cose-bilkent-S5V4N54A-Bo5USdmM.js.map} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-CJ5Xm21W.js → dagre-6UL2VRFP-CJB19Lwv.js} +2 -2
- package/dist/assets/{dagre-6UL2VRFP-CJ5Xm21W.js.map → dagre-6UL2VRFP-CJB19Lwv.js.map} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-DPh9GVTE.js → diagram-PSM6KHXK-DKhUOPOa.js} +2 -2
- package/dist/assets/{diagram-PSM6KHXK-DPh9GVTE.js.map → diagram-PSM6KHXK-DKhUOPOa.js.map} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-Dot6Qi1W.js → diagram-QEK2KX5R-IHiRzRgI.js} +2 -2
- package/dist/assets/{diagram-QEK2KX5R-Dot6Qi1W.js.map → diagram-QEK2KX5R-IHiRzRgI.js.map} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-Byy64ITo.js → diagram-S2PKOQOG-CkFnqs2W.js} +2 -2
- package/dist/assets/{diagram-S2PKOQOG-Byy64ITo.js.map → diagram-S2PKOQOG-CkFnqs2W.js.map} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-C21emkO2.js → erDiagram-Q2GNP2WA-DKnvEgCf.js} +2 -2
- package/dist/assets/{erDiagram-Q2GNP2WA-C21emkO2.js.map → erDiagram-Q2GNP2WA-DKnvEgCf.js.map} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-D5BMWTZ-.js → flowDiagram-NV44I4VS-DROGKtdM.js} +2 -2
- package/dist/assets/{flowDiagram-NV44I4VS-D5BMWTZ-.js.map → flowDiagram-NV44I4VS-DROGKtdM.js.map} +1 -1
- package/dist/assets/{ganttDiagram-LVOFAZNH-hOLRWeZj.js → ganttDiagram-LVOFAZNH-DWx7Bx4x.js} +2 -2
- package/dist/assets/{ganttDiagram-LVOFAZNH-hOLRWeZj.js.map → ganttDiagram-LVOFAZNH-DWx7Bx4x.js.map} +1 -1
- package/dist/assets/{gitGraphDiagram-NY62KEGX-C3PIArQc.js → gitGraphDiagram-NY62KEGX-jZmYIk9v.js} +2 -2
- package/dist/assets/{gitGraphDiagram-NY62KEGX-C3PIArQc.js.map → gitGraphDiagram-NY62KEGX-jZmYIk9v.js.map} +1 -1
- package/dist/assets/{graph-rFdy6QQg.js → graph-D9TsS-mp.js} +2 -2
- package/dist/assets/{graph-rFdy6QQg.js.map → graph-D9TsS-mp.js.map} +1 -1
- package/dist/assets/{infoDiagram-ER5ION4S-B2FodK5l.js → infoDiagram-ER5ION4S-BKYp1LUo.js} +2 -2
- package/dist/assets/{infoDiagram-ER5ION4S-B2FodK5l.js.map → infoDiagram-ER5ION4S-BKYp1LUo.js.map} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-C09_7pgj.js → journeyDiagram-XKPGCS4Q-CxUiues_.js} +2 -2
- package/dist/assets/{journeyDiagram-XKPGCS4Q-C09_7pgj.js.map → journeyDiagram-XKPGCS4Q-CxUiues_.js.map} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-C9DcPmSl.js → kanban-definition-3W4ZIXB7-Cw8iDh82.js} +2 -2
- package/dist/assets/{kanban-definition-3W4ZIXB7-C9DcPmSl.js.map → kanban-definition-3W4ZIXB7-Cw8iDh82.js.map} +1 -1
- package/dist/assets/{layout-kl8bEf4w.js → layout-EcIA6AxC.js} +2 -2
- package/dist/assets/{layout-kl8bEf4w.js.map → layout-EcIA6AxC.js.map} +1 -1
- package/dist/assets/{linear-MGG9iSe0.js → linear-Bme9wI_2.js} +2 -2
- package/dist/assets/{linear-MGG9iSe0.js.map → linear-Bme9wI_2.js.map} +1 -1
- package/dist/assets/{main-R77JUZJg.js → main-1SnvDP-X.js} +3 -3
- package/dist/assets/{main-R77JUZJg.js.map → main-1SnvDP-X.js.map} +1 -1
- package/dist/assets/{main-CoyjBX9p.css → main-BEqp8HHb.css} +86 -1
- package/dist/assets/{main-ANj7JK_a.js → main-xPSh2mEk.js} +5 -5
- package/dist/assets/{main-ANj7JK_a.js.map → main-xPSh2mEk.js.map} +1 -1
- package/dist/assets/{mermaid.core-rcskblvS.js → mermaid.core-wcUI7FVN.js} +6 -6
- package/dist/assets/{mermaid.core-rcskblvS.js.map → mermaid.core-wcUI7FVN.js.map} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-D9bSqzES.js → mindmap-definition-VGOIOE7T-Cn2owU5t.js} +2 -2
- package/dist/assets/{mindmap-definition-VGOIOE7T-D9bSqzES.js.map → mindmap-definition-VGOIOE7T-Cn2owU5t.js.map} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-Bfq9uIsR.js → pieDiagram-ADFJNKIX-BHfdPdkb.js} +2 -2
- package/dist/assets/{pieDiagram-ADFJNKIX-Bfq9uIsR.js.map → pieDiagram-ADFJNKIX-BHfdPdkb.js.map} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-K9V5O8p2.js → quadrantDiagram-AYHSOK5B-B0PMfePs.js} +2 -2
- package/dist/assets/{quadrantDiagram-AYHSOK5B-K9V5O8p2.js.map → quadrantDiagram-AYHSOK5B-B0PMfePs.js.map} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-Bx0fNR1-.js → requirementDiagram-UZGBJVZJ-CUJTHALr.js} +2 -2
- package/dist/assets/{requirementDiagram-UZGBJVZJ-Bx0fNR1-.js.map → requirementDiagram-UZGBJVZJ-CUJTHALr.js.map} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-BLOOHpb0.js → sankeyDiagram-TZEHDZUN-JZH4ha-z.js} +2 -2
- package/dist/assets/{sankeyDiagram-TZEHDZUN-BLOOHpb0.js.map → sankeyDiagram-TZEHDZUN-JZH4ha-z.js.map} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-P9ZCOVQb.js → sequenceDiagram-WL72ISMW-Dv9AmAvb.js} +2 -2
- package/dist/assets/{sequenceDiagram-WL72ISMW-P9ZCOVQb.js.map → sequenceDiagram-WL72ISMW-Dv9AmAvb.js.map} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-Bjorv5pW.js → stateDiagram-FKZM4ZOC-rjRrucVt.js} +2 -2
- package/dist/assets/{stateDiagram-FKZM4ZOC-Bjorv5pW.js.map → stateDiagram-FKZM4ZOC-rjRrucVt.js.map} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D6_Rcpu0.js +2 -0
- package/dist/assets/{stateDiagram-v2-4FDKWEC3-DRU95Nzx.js.map → stateDiagram-v2-4FDKWEC3-D6_Rcpu0.js.map} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-BXnmQ4Qc.js → timeline-definition-IT6M3QCI-CGMo4vLX.js} +2 -2
- package/dist/assets/{timeline-definition-IT6M3QCI-BXnmQ4Qc.js.map → timeline-definition-IT6M3QCI-CGMo4vLX.js.map} +1 -1
- package/dist/assets/{treemap-KMMF4GRG-CQE7y3n-.js → treemap-KMMF4GRG-gywCUDvs.js} +2 -2
- package/dist/assets/{treemap-KMMF4GRG-CQE7y3n-.js.map → treemap-KMMF4GRG-gywCUDvs.js.map} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-CPYupQMG.js → xychartDiagram-PRI3JC2R-BH76UPLh.js} +2 -2
- package/dist/assets/{xychartDiagram-PRI3JC2R-CPYupQMG.js.map → xychartDiagram-PRI3JC2R-BH76UPLh.js.map} +1 -1
- package/dist/index.html +1 -1
- package/package.json +5 -5
- package/src/components/ai-elements/response.tsx +1 -1
- package/src/index.css +105 -0
- package/dist/assets/classDiagram-2ON5EDUG-O-pl8c_n.js +0 -2
- package/dist/assets/classDiagram-v2-WZHVMYZB-O-pl8c_n.js +0 -2
- package/dist/assets/stateDiagram-v2-4FDKWEC3-DRU95Nzx.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BUKiar2Z.js","assets/tex-Cppo0RY3.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-WgofotgN.js","assets/csharp-CX12Zw3r.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-CCoi5OLL.js","assets/vue-html-DAAvJJDi.js","assets/vue-vine-_Ih-lPRR.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/mermaid.core-
|
|
2
|
-
var zU=Object.defineProperty;var a=(e,t)=>zU(e,"name",{value:t,configurable:!0});import{g as Kp,j as y,S as Ku,r as H,R as Fk,a as Hk,T as Gk,P as Vk,C as Wp,b as Yk,X as wi,O as qp,c as em,D as tm,d as UU,e as FU,f as HU,h as GU,i as Zk,k as VU,l as $k,m as Jk,L as L2,n as D2,o as Xk,p as YU,V as ZU,G as $U,q as Qk,I as JU,s as as,t as XU,u as Kk,v as QU,w as Wk,x as KU,y as Qs,z as WU,A as qk,B as eA,E as tA,F as rA,H as nA,J as Ln,K as qU,M as eF,N as tF,Q as rF,U as nF,W as iF,Y as aF,Z as sF,_ as oF,$ as iA,a0 as aA,a1 as sA,a2 as oA,a3 as lA,a4 as uA,a5 as ea,a6 as lF,a7 as cA,a8 as dA,a9 as uF,aa as hA,ab as Fn,ac as j2,ad as xh,ae as fA,af as pA,ag as cF,ah as dF,ai as B2,aj as mA,ak as hF,al as fF,am as gA,an as pF,ao as bl,ap as Ug,aq as Ps,ar as Ya,as as p_,at as Nl,au as mF,av as Ja,aw as Yn,ax as Dn,ay as vA,az as bA,aA as yA,aB as wA,aC as _A,aD as Di,aE as rm,aF as gF,aG as vF,aH as bF,aI as nm,aJ as im,aK as qc,aL as Cl,aM as Io,aN as m_,aO as yF,aP as Eh,aQ as am,aR as Td,aS as wF,aT as g_,aU as _F,aV as xA,aW as xF,aX as EA,aY as SA,aZ as kA,a_ as AA,a$ as TA,b0 as EF,b1 as z2,b2 as By,b3 as NA,b4 as SF,b5 as D0,b6 as U2,b7 as Nd,b8 as af,b9 as zy,ba as F2,bb as v_,bc as b_,bd as y_,be as sm,bf as Sh,bg as H2,bh as CA,bi as qn,bj as IA,bk as MA,bl as Gl,bm as OA,bn as w_,bo as _i,bp as yc,bq as G2,br as yl,bs as ju,bt as V2,bu as kh,bv as j0,bw as RA,bx as kF,by as Y2,bz as Cd,bA as AF,bB as TF,bC as Ki,bD as Wi,bE as pu,bF as NF,bG as Z2,bH as CF,bI as $2,bJ as PA,bK as LA,bL as IF,bM as MF,bN as OF,bO as RF,bP as PF,bQ as LF,bR as J2,bS as DF,bT as jF,bU as BF,bV as X2,bW as Q2,bX as zF,bY as DA,bZ as Uy,b_ as UF,b$ as jA,c0 as FF,c1 as HF,c2 as GF,c3 as VF,c4 as YF,c5 as ZF,c6 as $F,c7 as JF,c8 as XF,c9 as BA,ca as zA,cb as UA,cc as FA,cd as QF,ce as KF,cf as WF,cg as Fy,ch as qF,ci as eH,cj as om,ck as tH,cl as HA,cm as rH,cn as nH,co as Fg,cp as __,cq as x_,cr as iH,cs as K2,ct as aH,cu as sH,cv as oH,cw as lH,cx as uH,cy as cH,cz as dH,cA as hH,cB as fH,cC as pH,cD as sa,cE as mH}from"./react-vendor-BZsmEqKa.js";import{_ as me}from"./main-R77JUZJg.js";function GA(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=GA(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}a(GA,"r$3");function lm(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=GA(e))&&(n&&(n+=" "),n+=t);return n}a(lm,"clsx");const E_=a(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),S_=lm,no=a((e,t)=>r=>{var n;if(t?.variants==null)return S_(e,r?.class,r?.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(c=>{const h=r?.[c],d=s?.[c];if(h===null)return null;const g=E_(h)||E_(d);return i[c][g]}),l=r&&Object.entries(r).reduce((c,h)=>{let[d,g]=h;return g===void 0||(c[d]=g),c},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,h)=>{let{class:d,className:g,...m}=h;return Object.entries(m).every(b=>{let[x,A]=b;return Array.isArray(A)?A.includes({...s,...l}[x]):{...s,...l}[x]===A})?[...c,d,g]:c},[]);return S_(e,o,u,r?.class,r?.className)},"cva"),wu="user",sf="client_chat",ed="client_group_chat",Id=512;var c0=(e=>(e.REQUIRED="required",e.OPTIONAL="optional",e))(c0||{});const iu={name:"required",username:"optional",system:"required","settings.voice.model":"optional",bio:"optional",topics:"optional",adjectives:"optional","style.all":"optional","style.chat":"optional","style.post":"optional"};var d0={exports:{}},gH=d0.exports,k_;function vH(){return k_||(k_=1,(function(e,t){(function(r,n){e.exports=n()})(gH,(function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",l="minute",u="hour",c="day",h="week",d="month",g="quarter",m="year",b="date",x="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(v){var _=["th","st","nd","rd"],S=v%100;return"["+v+(_[(S-20)%10]||_[S]||_[0])+"]"},"ordinal")},O=a(function(v,_,S){var T=String(v);return!T||T.length>=_?v:""+Array(_+1-T.length).join(S)+v},"m"),P={s:O,z:a(function(v){var _=-v.utcOffset(),S=Math.abs(_),T=Math.floor(S/60),N=S%60;return(_<=0?"+":"-")+O(T,2,"0")+":"+O(N,2,"0")},"z"),m:a(function v(_,S){if(_.date()<S.date())return-v(S,_);var T=12*(S.year()-_.year())+(S.month()-_.month()),N=_.clone().add(T,d),k=S-N<0,p=_.clone().add(T+(k?-1:1),d);return+(-(T+(S-N)/(k?N-p:p-N))||0)},"t2"),a:a(function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},"a"),p:a(function(v){return{M:d,y:m,w:h,d:c,D:b,h:u,m:l,s:o,ms:s,Q:g}[v]||String(v||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(v){return v===void 0},"u")},L="en",U={};U[L]=M;var Z="$isDayjsObject",Y=a(function(v){return v instanceof f||!(!v||!v[Z])},"S"),re=a(function v(_,S,T){var N;if(!_)return L;if(typeof _=="string"){var k=_.toLowerCase();U[k]&&(N=k),S&&(U[k]=S,N=k);var p=_.split("-");if(!N&&p.length>1)return v(p[0])}else{var E=_.name;U[E]=_,N=E}return!T&&N&&(L=N),N||!T&&L},"t2"),F=a(function(v,_){if(Y(v))return v.clone();var S=typeof _=="object"?_:{};return S.date=v,S.args=arguments,new f(S)},"O"),$=P;$.l=re,$.i=Y,$.w=function(v,_){return F(v,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var f=(function(){function v(S){this.$L=re(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[Z]=!0}a(v,"M2");var _=v.prototype;return _.parse=function(S){this.$d=(function(T){var N=T.date,k=T.utc;if(N===null)return new Date(NaN);if($.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var p=N.match(A);if(p){var E=p[2]-1||0,I=(p[7]||"0").substring(0,3);return k?new Date(Date.UTC(p[1],E,p[3]||1,p[4]||0,p[5]||0,p[6]||0,I)):new Date(p[1],E,p[3]||1,p[4]||0,p[5]||0,p[6]||0,I)}}return new Date(N)})(S),this.init()},_.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},_.$utils=function(){return $},_.isValid=function(){return this.$d.toString()!==x},_.isSame=function(S,T){var N=F(S);return this.startOf(T)<=N&&N<=this.endOf(T)},_.isAfter=function(S,T){return F(S)<this.startOf(T)},_.isBefore=function(S,T){return this.endOf(T)<F(S)},_.$g=function(S,T,N){return $.u(S)?this[T]:this.set(N,S)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(S,T){var N=this,k=!!$.u(T)||T,p=$.p(S),E=a(function(ne,ie){var Ve=$.w(N.$u?Date.UTC(N.$y,ie,ne):new Date(N.$y,ie,ne),N);return k?Ve:Ve.endOf(c)},"l2"),I=a(function(ne,ie){return $.w(N.toDate()[ne].apply(N.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(ie)),N)},"$2"),R=this.$W,z=this.$M,B=this.$D,V="set"+(this.$u?"UTC":"");switch(p){case m:return k?E(1,0):E(31,11);case d:return k?E(1,z):E(0,z+1);case h:var W=this.$locale().weekStart||0,oe=(R<W?R+7:R)-W;return E(k?B-oe:B+(6-oe),z);case c:case b:return I(V+"Hours",0);case u:return I(V+"Minutes",1);case l:return I(V+"Seconds",2);case o:return I(V+"Milliseconds",3);default:return this.clone()}},_.endOf=function(S){return this.startOf(S,!1)},_.$set=function(S,T){var N,k=$.p(S),p="set"+(this.$u?"UTC":""),E=(N={},N[c]=p+"Date",N[b]=p+"Date",N[d]=p+"Month",N[m]=p+"FullYear",N[u]=p+"Hours",N[l]=p+"Minutes",N[o]=p+"Seconds",N[s]=p+"Milliseconds",N)[k],I=k===c?this.$D+(T-this.$W):T;if(k===d||k===m){var R=this.clone().set(b,1);R.$d[E](I),R.init(),this.$d=R.set(b,Math.min(this.$D,R.daysInMonth())).$d}else E&&this.$d[E](I);return this.init(),this},_.set=function(S,T){return this.clone().$set(S,T)},_.get=function(S){return this[$.p(S)]()},_.add=function(S,T){var N,k=this;S=Number(S);var p=$.p(T),E=a(function(z){var B=F(k);return $.w(B.date(B.date()+Math.round(z*S)),k)},"y2");if(p===d)return this.set(d,this.$M+S);if(p===m)return this.set(m,this.$y+S);if(p===c)return E(1);if(p===h)return E(7);var I=(N={},N[l]=n,N[u]=i,N[o]=r,N)[p]||1,R=this.$d.getTime()+S*I;return $.w(R,this)},_.subtract=function(S,T){return this.add(-1*S,T)},_.format=function(S){var T=this,N=this.$locale();if(!this.isValid())return N.invalidDate||x;var k=S||"YYYY-MM-DDTHH:mm:ssZ",p=$.z(this),E=this.$H,I=this.$m,R=this.$M,z=N.weekdays,B=N.months,V=N.meridiem,W=a(function(ie,Ve,Te,we){return ie&&(ie[Ve]||ie(T,k))||Te[Ve].slice(0,we)},"h2"),oe=a(function(ie){return $.s(E%12||12,ie,"0")},"d2"),ne=V||function(ie,Ve,Te){var we=ie<12?"AM":"PM";return Te?we.toLowerCase():we};return k.replace(C,(function(ie,Ve){return Ve||(function(Te){switch(Te){case"YY":return String(T.$y).slice(-2);case"YYYY":return $.s(T.$y,4,"0");case"M":return R+1;case"MM":return $.s(R+1,2,"0");case"MMM":return W(N.monthsShort,R,B,3);case"MMMM":return W(B,R);case"D":return T.$D;case"DD":return $.s(T.$D,2,"0");case"d":return String(T.$W);case"dd":return W(N.weekdaysMin,T.$W,z,2);case"ddd":return W(N.weekdaysShort,T.$W,z,3);case"dddd":return z[T.$W];case"H":return String(E);case"HH":return $.s(E,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ne(E,I,!0);case"A":return ne(E,I,!1);case"m":return String(I);case"mm":return $.s(I,2,"0");case"s":return String(T.$s);case"ss":return $.s(T.$s,2,"0");case"SSS":return $.s(T.$ms,3,"0");case"Z":return p}return null})(ie)||p.replace(":","")}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(S,T,N){var k,p=this,E=$.p(T),I=F(S),R=(I.utcOffset()-this.utcOffset())*n,z=this-I,B=a(function(){return $.m(p,I)},"D2");switch(E){case m:k=B()/12;break;case d:k=B();break;case g:k=B()/3;break;case h:k=(z-R)/6048e5;break;case c:k=(z-R)/864e5;break;case u:k=z/i;break;case l:k=z/n;break;case o:k=z/r;break;default:k=z}return N?k:$.a(k)},_.daysInMonth=function(){return this.endOf(d).$D},_.$locale=function(){return U[this.$L]},_.locale=function(S,T){if(!S)return this.$L;var N=this.clone(),k=re(S,T,!0);return k&&(N.$L=k),N},_.clone=function(){return $.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},v})(),w=f.prototype;return F.prototype=w,[["$ms",s],["$s",o],["$m",l],["$H",u],["$W",c],["$M",d],["$y",m],["$D",b]].forEach((function(v){w[v[1]]=function(_){return this.$g(_,v[0],v[1])}})),F.extend=function(v,_){return v.$i||(v(_,f,F),v.$i=!0),F},F.locale=re,F.isDayjs=Y,F.unix=function(v){return F(1e3*v)},F.en=U[L],F.Ls=U,F.p={},F}))})(d0)),d0.exports}a(vH,"requireDayjs_min");var bH=vH();const VA=Kp(bH);var h0={exports:{}},yH=h0.exports,A_;function wH(){return A_||(A_=1,(function(e,t){(function(r,n){e.exports=n()})(yH,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(n,i,s){var o=i.prototype,l=o.format;s.en.formats=r,o.format=function(u){u===void 0&&(u="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,h=(function(d,g){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,b,x){var A=x&&x.toUpperCase();return b||g[x]||r[x]||g[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(C,M,O){return M||O.slice(1)}))}))})(u,c===void 0?{}:c);return l.call(this,h)}}}))})(h0)),h0.exports}a(wH,"requireLocalizedFormat");var _H=wH();const xH=Kp(_H),EH=a((e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},"concatArrays"),SH=a((e,t)=>({classGroupId:e,validator:t}),"createClassValidatorObject"),YA=a((e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),"createClassPartObject"),B0="-",T_=[],kH="arbitrary..",AH=a(e=>{const t=NH(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a(o=>{if(o.startsWith("[")&&o.endsWith("]"))return TH(o);const l=o.split(B0),u=l[0]===""&&l.length>1?1:0;return ZA(l,u,t)},"getClassGroupId"),getConflictingClassGroupIds:a((o,l)=>{if(l){const u=n[o],c=r[o];return u?c?EH(c,u):u:c||T_}return r[o]||T_},"getConflictingClassGroupIds")}},"createClassGroupUtils"),ZA=a((e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],s=r.nextPart.get(i);if(s){const c=ZA(e,t+1,s);if(c)return c}const o=r.validators;if(o===null)return;const l=t===0?e.join(B0):e.slice(t).join(B0),u=o.length;for(let c=0;c<u;c++){const h=o[c];if(h.validator(l))return h.classGroupId}},"getGroupRecursive"),TH=a(e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?kH+n:void 0})(),"getGroupIdForArbitraryProperty"),NH=a(e=>{const{theme:t,classGroups:r}=e;return CH(r,t)},"createClassMap"),CH=a((e,t)=>{const r=YA();for(const n in e){const i=e[n];W2(i,r,n,t)}return r},"processClassGroups"),W2=a((e,t,r,n)=>{const i=e.length;for(let s=0;s<i;s++){const o=e[s];IH(o,t,r,n)}},"processClassesRecursively"),IH=a((e,t,r,n)=>{if(typeof e=="string"){MH(e,t,r);return}if(typeof e=="function"){OH(e,t,r,n);return}RH(e,t,r,n)},"processClassDefinition"),MH=a((e,t,r)=>{const n=e===""?t:$A(t,e);n.classGroupId=r},"processStringDefinition"),OH=a((e,t,r,n)=>{if(PH(e)){W2(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(SH(r,e))},"processFunctionDefinition"),RH=a((e,t,r,n)=>{const i=Object.entries(e),s=i.length;for(let o=0;o<s;o++){const[l,u]=i[o];W2(u,$A(t,l),r,n)}},"processObjectDefinition"),$A=a((e,t)=>{let r=e;const n=t.split(B0),i=n.length;for(let s=0;s<i;s++){const o=n[s];let l=r.nextPart.get(o);l||(l=YA(),r.nextPart.set(o,l)),r=l}return r},"getPart"),PH=a(e=>"isThemeGetter"in e&&e.isThemeGetter===!0,"isThemeGetter"),LH=a(e=>{if(e<1)return{get:a(()=>{},"get"),set:a(()=>{},"set")};let t=0,r=Object.create(null),n=Object.create(null);const i=a((s,o)=>{r[s]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))},"update");return{get(s){let o=r[s];if(o!==void 0)return o;if((o=n[s])!==void 0)return i(s,o),o},set(s,o){s in r?r[s]=o:i(s,o)}}},"createLruCache"),Hy="!",N_=":",DH=[],C_=a((e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),"createResultObject"),jH=a(e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a(i=>{const s=[];let o=0,l=0,u=0,c;const h=i.length;for(let x=0;x<h;x++){const A=i[x];if(o===0&&l===0){if(A===N_){s.push(i.slice(u,x)),u=x+1;continue}if(A==="/"){c=x;continue}}A==="["?o++:A==="]"?o--:A==="("?l++:A===")"&&l--}const d=s.length===0?i:i.slice(u);let g=d,m=!1;d.endsWith(Hy)?(g=d.slice(0,-1),m=!0):d.startsWith(Hy)&&(g=d.slice(1),m=!0);const b=c&&c>u?c-u:void 0;return C_(s,m,g,b)},"parseClassName");if(t){const i=t+N_,s=n;n=a(o=>o.startsWith(i)?s(o.slice(i.length)):C_(DH,!1,o,void 0,!0),"parseClassName")}if(r){const i=n;n=a(s=>r({className:s,parseClassName:i}),"parseClassName")}return n},"createParseClassName"),BH=a(e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let s=0;s<r.length;s++){const o=r[s],l=o[0]==="[",u=t.has(o);l||u?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},"createSortModifiers"),zH=a(e=>({cache:LH(e.cacheSize),parseClassName:jH(e),sortModifiers:BH(e),...AH(e)}),"createConfigUtils"),UH=/\s+/,FH=a((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:s}=t,o=[],l=e.trim().split(UH);let u="";for(let c=l.length-1;c>=0;c-=1){const h=l[c],{isExternal:d,modifiers:g,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:x}=r(h);if(d){u=h+(u.length>0?" "+u:u);continue}let A=!!x,C=n(A?b.substring(0,x):b);if(!C){if(!A){u=h+(u.length>0?" "+u:u);continue}if(C=n(b),!C){u=h+(u.length>0?" "+u:u);continue}A=!1}const M=g.length===0?"":g.length===1?g[0]:s(g).join(":"),O=m?M+Hy:M,P=O+C;if(o.indexOf(P)>-1)continue;o.push(P);const L=i(C,A);for(let U=0;U<L.length;++U){const Z=L[U];o.push(O+Z)}u=h+(u.length>0?" "+u:u)}return u},"mergeClassList"),HH=a((...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=JA(r))&&(i&&(i+=" "),i+=n);return i},"twJoin"),JA=a(e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=JA(e[n]))&&(r&&(r+=" "),r+=t);return r},"toValue"),GH=a((e,...t)=>{let r,n,i,s;const o=a(u=>{const c=t.reduce((h,d)=>d(h),e());return r=zH(c),n=r.cache.get,i=r.cache.set,s=l,l(u)},"initTailwindMerge"),l=a(u=>{const c=n(u);if(c)return c;const h=FH(u,r);return i(u,h),h},"tailwindMerge");return s=o,(...u)=>s(HH(...u))},"createTailwindMerge"),VH=[],_n=a(e=>{const t=a(r=>r[e]||VH,"themeGetter");return t.isThemeGetter=!0,t},"fromTheme"),XA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,QA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,YH=/^\d+\/\d+$/,ZH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$H=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,JH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,au=a(e=>YH.test(e),"isFraction"),dr=a(e=>!!e&&!Number.isNaN(Number(e)),"isNumber$1"),co=a(e=>!!e&&Number.isInteger(Number(e)),"isInteger"),Hg=a(e=>e.endsWith("%")&&dr(e.slice(0,-1)),"isPercent"),bs=a(e=>ZH.test(e),"isTshirtSize"),KH=a(()=>!0,"isAny"),WH=a(e=>$H.test(e)&&!JH.test(e),"isLengthOnly"),KA=a(()=>!1,"isNever"),qH=a(e=>XH.test(e),"isShadow"),eG=a(e=>QH.test(e),"isImage"),tG=a(e=>!Bt(e)&&!zt(e),"isAnyNonArbitrary"),rG=a(e=>Wu(e,eT,KA),"isArbitrarySize"),Bt=a(e=>XA.test(e),"isArbitraryValue"),Jo=a(e=>Wu(e,tT,WH),"isArbitraryLength"),Gg=a(e=>Wu(e,oG,dr),"isArbitraryNumber"),I_=a(e=>Wu(e,WA,KA),"isArbitraryPosition"),nG=a(e=>Wu(e,qA,eG),"isArbitraryImage"),of=a(e=>Wu(e,rT,qH),"isArbitraryShadow"),zt=a(e=>QA.test(e),"isArbitraryVariable"),wc=a(e=>qu(e,tT),"isArbitraryVariableLength"),iG=a(e=>qu(e,lG),"isArbitraryVariableFamilyName"),M_=a(e=>qu(e,WA),"isArbitraryVariablePosition"),aG=a(e=>qu(e,eT),"isArbitraryVariableSize"),sG=a(e=>qu(e,qA),"isArbitraryVariableImage"),lf=a(e=>qu(e,rT,!0),"isArbitraryVariableShadow"),Wu=a((e,t,r)=>{const n=XA.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},"getIsArbitraryValue"),qu=a((e,t,r=!1)=>{const n=QA.exec(e);return n?n[1]?t(n[1]):r:!1},"getIsArbitraryVariable"),WA=a(e=>e==="position"||e==="percentage","isLabelPosition"),qA=a(e=>e==="image"||e==="url","isLabelImage"),eT=a(e=>e==="length"||e==="size"||e==="bg-size","isLabelSize"),tT=a(e=>e==="length","isLabelLength"),oG=a(e=>e==="number","isLabelNumber"),lG=a(e=>e==="family-name","isLabelFamilyName"),rT=a(e=>e==="shadow","isLabelShadow"),uG=a(()=>{const e=_n("color"),t=_n("font"),r=_n("text"),n=_n("font-weight"),i=_n("tracking"),s=_n("leading"),o=_n("breakpoint"),l=_n("container"),u=_n("spacing"),c=_n("radius"),h=_n("shadow"),d=_n("inset-shadow"),g=_n("text-shadow"),m=_n("drop-shadow"),b=_n("blur"),x=_n("perspective"),A=_n("aspect"),C=_n("ease"),M=_n("animate"),O=a(()=>["auto","avoid","all","avoid-page","page","left","right","column"],"scaleBreak"),P=a(()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],"scalePosition"),L=a(()=>[...P(),zt,Bt],"scalePositionWithArbitrary"),U=a(()=>["auto","hidden","clip","visible","scroll"],"scaleOverflow"),Z=a(()=>["auto","contain","none"],"scaleOverscroll"),Y=a(()=>[zt,Bt,u],"scaleUnambiguousSpacing"),re=a(()=>[au,"full","auto",...Y()],"scaleInset"),F=a(()=>[co,"none","subgrid",zt,Bt],"scaleGridTemplateColsRows"),$=a(()=>["auto",{span:["full",co,zt,Bt]},co,zt,Bt],"scaleGridColRowStartAndEnd"),f=a(()=>[co,"auto",zt,Bt],"scaleGridColRowStartOrEnd"),w=a(()=>["auto","min","max","fr",zt,Bt],"scaleGridAutoColsRows"),v=a(()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],"scaleAlignPrimaryAxis"),_=a(()=>["start","end","center","stretch","center-safe","end-safe"],"scaleAlignSecondaryAxis"),S=a(()=>["auto",...Y()],"scaleMargin"),T=a(()=>[au,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],"scaleSizing"),N=a(()=>[e,zt,Bt],"scaleColor"),k=a(()=>[...P(),M_,I_,{position:[zt,Bt]}],"scaleBgPosition"),p=a(()=>["no-repeat",{repeat:["","x","y","space","round"]}],"scaleBgRepeat"),E=a(()=>["auto","cover","contain",aG,rG,{size:[zt,Bt]}],"scaleBgSize"),I=a(()=>[Hg,wc,Jo],"scaleGradientStopPosition"),R=a(()=>["","none","full",c,zt,Bt],"scaleRadius"),z=a(()=>["",dr,wc,Jo],"scaleBorderWidth"),B=a(()=>["solid","dashed","dotted","double"],"scaleLineStyle"),V=a(()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],"scaleBlendMode"),W=a(()=>[dr,Hg,M_,I_],"scaleMaskImagePosition"),oe=a(()=>["","none",b,zt,Bt],"scaleBlur"),ne=a(()=>["none",dr,zt,Bt],"scaleRotate"),ie=a(()=>["none",dr,zt,Bt],"scaleScale"),Ve=a(()=>[dr,zt,Bt],"scaleSkew"),Te=a(()=>[au,"full",...Y()],"scaleTranslate");return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bs],breakpoint:[bs],color:[KH],container:[bs],"drop-shadow":[bs],ease:["in","out","in-out"],font:[tG],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bs],shadow:[bs],spacing:["px",dr],text:[bs],"text-shadow":[bs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",au,Bt,zt,A]}],container:["container"],columns:[{columns:[dr,Bt,zt,l]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[co,"auto",zt,Bt]}],basis:[{basis:[au,"full","auto",l,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dr,au,"auto","initial","none",Bt]}],grow:[{grow:["",dr,zt,Bt]}],shrink:[{shrink:["",dr,zt,Bt]}],order:[{order:[co,"first","last","none",zt,Bt]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":f()}],"col-end":[{"col-end":f()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":f()}],"row-end":[{"row-end":f()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":w()}],"auto-rows":[{"auto-rows":w()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...v(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...v()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":v()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:T()}],w:[{w:[l,"screen",...T()]}],"min-w":[{"min-w":[l,"screen","none",...T()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...T()]}],h:[{h:["screen","lh",...T()]}],"min-h":[{"min-h":["screen","lh","none",...T()]}],"max-h":[{"max-h":["screen","lh",...T()]}],"font-size":[{text:["base",r,wc,Jo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,zt,Gg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hg,Bt]}],"font-family":[{font:[iG,Bt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,zt,Bt]}],"line-clamp":[{"line-clamp":[dr,"none",zt,Gg]}],leading:[{leading:[s,...Y()]}],"list-image":[{"list-image":["none",zt,Bt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",zt,Bt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[dr,"from-font","auto",zt,Jo]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[dr,"auto",zt,Bt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",zt,Bt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",zt,Bt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:p()}],"bg-size":[{bg:E()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},co,zt,Bt],radial:["",zt,Bt],conic:[co,zt,Bt]},sG,nG]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dr,zt,Bt]}],"outline-w":[{outline:["",dr,wc,Jo]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",h,lf,of]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,lf,of]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[dr,Jo]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",g,lf,of]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[dr,zt,Bt]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dr]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[zt,Bt]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[dr]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:p()}],"mask-size":[{mask:E()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",zt,Bt]}],filter:[{filter:["","none",zt,Bt]}],blur:[{blur:oe()}],brightness:[{brightness:[dr,zt,Bt]}],contrast:[{contrast:[dr,zt,Bt]}],"drop-shadow":[{"drop-shadow":["","none",m,lf,of]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",dr,zt,Bt]}],"hue-rotate":[{"hue-rotate":[dr,zt,Bt]}],invert:[{invert:["",dr,zt,Bt]}],saturate:[{saturate:[dr,zt,Bt]}],sepia:[{sepia:["",dr,zt,Bt]}],"backdrop-filter":[{"backdrop-filter":["","none",zt,Bt]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[dr,zt,Bt]}],"backdrop-contrast":[{"backdrop-contrast":[dr,zt,Bt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dr,zt,Bt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dr,zt,Bt]}],"backdrop-invert":[{"backdrop-invert":["",dr,zt,Bt]}],"backdrop-opacity":[{"backdrop-opacity":[dr,zt,Bt]}],"backdrop-saturate":[{"backdrop-saturate":[dr,zt,Bt]}],"backdrop-sepia":[{"backdrop-sepia":["",dr,zt,Bt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",zt,Bt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dr,"initial",zt,Bt]}],ease:[{ease:["linear","initial",C,zt,Bt]}],delay:[{delay:[dr,zt,Bt]}],animate:[{animate:["none",M,zt,Bt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,zt,Bt]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ve()}],"skew-x":[{"skew-x":Ve()}],"skew-y":[{"skew-y":Ve()}],transform:[{transform:[zt,Bt,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",zt,Bt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",zt,Bt]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[dr,wc,Jo,Gg]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},"getDefaultConfig"),nT=GH(uG);function He(...e){return nT(lm(e))}a(He,"cn$1");VA.extend(xH);const wl=VA,Il=a(e=>e.substring(0,2),"formatAgentName");function Us(){return URL.createObjectURL(new Blob).split("/").pop()}a(Us,"randomUUID");function Ks(){const e="elizaos-client-user-id",t=localStorage.getItem(e);if(t)return t;const r=Us();return localStorage.setItem(e,r),r}a(Ks,"getEntityId");const iT=a((e,t=Id,r=.8)=>new Promise((n,i)=>{const s=new FileReader;s.onload=o=>{if(o.target?.result){const l=new Image;l.src=o.target.result,l.onload=()=>{const u=document.createElement("canvas");let c=l.width,h=l.height;c>h?c>t&&(h*=t/c,c=t):h>t&&(c*=t/h,h=t),u.width=c,u.height=h,u.getContext("2d")?.drawImage(l,0,0,c,h);const g=u.toDataURL("image/jpeg",r);n(g)},l.onerror=i}},s.onerror=i,s.readAsDataURL(e)}),"compressImage"),O_=["/images/agents/agent1.png","/images/agents/agent2.png","/images/agents/agent3.png","/images/agents/agent4.png","/images/agents/agent5.png"],Md=a(e=>{if(e?.settings?.avatar)return e.settings.avatar;if(e?.id){let t=0;for(let n=0;n<e.id.length;n++){const i=e.id.charCodeAt(n);t=(t<<5)-t+i,t|=0}const r=Math.abs(t)%O_.length;return O_[r]}return"/elizaos-icon.png"},"getAgentAvatar"),q2=a((e,t,r)=>{if(e?.name&&e.name.trim()!=="")return e.name;if(t&&t.length>0){const n=t.filter(i=>i.id!==r&&i.name);if(n.length===0&&t.some(i=>i.id===r&&i.name)){const i=t.find(s=>s.id===r);return i&&i.name||"Unnamed Group"}if(n.length>0)return n.map(i=>i.name).slice(0,3).join(", ")+(n.length>3?"...":"")}return"Unnamed Group"},"generateGroupName"),e4=no("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-red-800 text-white shadow-xs hover:bg-red-600 focus-visible:ring-red-400/20 dark:focus-visible:ring-red-500",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-auto w-auto"}},defaultVariants:{variant:"default",size:"default"}});function ct({className:e,variant:t,size:r,asChild:n=!1,...i}){const s=n?Ku:"button";return y.jsx(s,{"data-slot":"button",className:He(e4({variant:t,size:r,className:e})),...i})}a(ct,"Button$1");const pn=H.forwardRef(({className:e,type:t,...r},n)=>y.jsx("input",{type:t,className:He("flex h-12 w-full rounded border border-input bg-card px-4 py-3 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,"data-testid":r["data-testid"]||"input",...r}));pn.displayName="Input";const Ui=H.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>y.jsx(Fk,{ref:i,decorative:r,orientation:t,className:He("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),"data-testid":n["data-testid"]||"separator",...n}));Ui.displayName=Fk.displayName;const aT=Hk,cG=Gk,dG=Vk,sT=H.forwardRef(({className:e,...t},r)=>y.jsx(qp,{className:He("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));sT.displayName=qp.displayName;const hG=no("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),t4=H.forwardRef(({side:e="right",className:t,children:r,...n},i)=>y.jsxs(dG,{children:[y.jsx(sT,{}),y.jsxs(Wp,{ref:i,className:He(hG({side:e}),t),...n,children:[y.jsxs(Yk,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[y.jsx(wi,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));t4.displayName=Wp.displayName;const fG=H.forwardRef(({className:e,...t},r)=>y.jsx(em,{ref:r,className:He("text-lg font-semibold text-foreground",e),...t}));fG.displayName=em.displayName;const pG=H.forwardRef(({className:e,...t},r)=>y.jsx(tm,{ref:r,className:He("text-sm text-muted-foreground",e),...t}));pG.displayName=tm.displayName;function Od({className:e,...t}){return y.jsx("div",{className:He("animate-pulse rounded-md bg-primary/10",e),"data-testid":t["data-testid"]||"skeleton",...t})}a(Od,"Skeleton");const Tu=UU,dn=FU,hn=HU,nn=H.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(GU,{children:y.jsx(Zk,{ref:n,sideOffset:t,className:He("z-50 overflow-hidden select-none rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));nn.displayName=Zk.displayName;const Vg=768;function mG(){const[e,t]=H.useState(void 0);return H.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Vg-1}px)`),n=a(()=>{t(window.innerWidth<Vg)},"onChange");return r.addEventListener("change",n),t(window.innerWidth<Vg),()=>r.removeEventListener("change",n)},[]),!!e}a(mG,"useIsMobile");const gG="sidebar:state",vG=3600*24*7,bG="16rem",yG="18rem",wG="3rem",_G="b",oT=H.createContext(null);function um(){const e=H.useContext(oT);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}a(um,"useSidebar");const lT=H.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:i,children:s,...o},l)=>{const u=mG(),[c,h]=H.useState(!1),[d,g]=H.useState(e),m=t??d,b=H.useCallback(M=>{const O=typeof M=="function"?M(m):M;r?r(O):g(O),document.cookie=`${gG}=${O}; path=/; max-age=${vG}`},[r,m]),x=H.useCallback(()=>u?h(M=>!M):b(M=>!M),[u,b,h]);H.useEffect(()=>{const M=a(O=>{O.key===_G&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),x())},"handleKeyDown");return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[x]);const A=m?"expanded":"collapsed",C=H.useMemo(()=>({state:A,open:m,setOpen:b,isMobile:u,openMobile:c,setOpenMobile:h,toggleSidebar:x}),[A,m,b,u,c,h,x]);return y.jsx(oT.Provider,{value:C,children:y.jsx(Tu,{delayDuration:0,children:y.jsx("div",{style:{"--sidebar-width":bG,"--sidebar-width-icon":wG,...i},className:He("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-card",n),ref:l,...o,children:s})})})});lT.displayName="SidebarProvider";const uT=H.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:i,...s},o)=>{const{isMobile:l,state:u,openMobile:c,setOpenMobile:h}=um();return r==="none"?y.jsx("div",{className:He("flex h-full w-[--sidebar-width] flex-col bg-card text-sidebar-foreground",n),ref:o,...s,children:i}):l?y.jsx(aT,{open:c,onOpenChange:h,...s,children:y.jsx(t4,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-card p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yG},side:e,children:y.jsx("div",{className:"flex h-full w-full flex-col",children:i})})}):y.jsxs("div",{ref:o,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[y.jsx("div",{className:He("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),y.jsx("div",{className:He("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...s,children:y.jsx("div",{"data-sidebar":"sidebar",className:"flex m-4 rounded-md w-full flex-col group-data-[variant=floating]:rounded-md group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:i})})]})});uT.displayName="Sidebar";const xG=H.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:i}=um();return y.jsxs(ct,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:He("h-7 w-7",e),onClick:a(s=>{t?.(s),i()},"onClick"),"data-testid":"sidebar-toggle",...r,children:[y.jsx(VU,{}),y.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});xG.displayName="SidebarTrigger";const EG=H.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=um();return y.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:He("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-card-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-card","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});EG.displayName="SidebarRail";const cT=H.forwardRef(({className:e,...t},r)=>y.jsx("main",{ref:r,className:He("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));cT.displayName="SidebarInset";const SG=H.forwardRef(({className:e,...t},r)=>y.jsx(pn,{ref:r,"data-sidebar":"input",className:He("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));SG.displayName="SidebarInput";const dT=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"header",className:He("flex flex-col gap-2 p-2",e),...t}));dT.displayName="SidebarHeader";const hT=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"footer",className:He("flex flex-col gap-2 p-2",e),...t}));hT.displayName="SidebarFooter";const kG=H.forwardRef(({className:e,...t},r)=>y.jsx(Ui,{ref:r,"data-sidebar":"separator",className:He("mx-2 w-auto bg-card-border",e),...t}));kG.displayName="SidebarSeparator";const fT=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"content",className:He("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden group-data-[collapsible=icon]:overflow-hidden",e),...t}));fT.displayName="SidebarContent";const cm=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"group",className:He("relative flex w-full min-w-0 flex-col p-0.5",e),...t}));cm.displayName="SidebarGroup";const AG=H.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const i=t?Ku:"div";return y.jsx(i,{ref:n,"data-sidebar":"group-label",className:He("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});AG.displayName="SidebarGroupLabel";const TG=H.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const i=t?Ku:"button";return y.jsx(i,{ref:n,"data-sidebar":"group-action",className:He("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});TG.displayName="SidebarGroupAction";const dm=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"group-content",className:He("w-full text-sm p-0 m-0",e),...t}));dm.displayName="SidebarGroupContent";const _l=H.forwardRef(({className:e,...t},r)=>y.jsx("ul",{ref:r,"data-sidebar":"menu",className:He("flex w-full min-w-0 flex-col gap-0.5",e),...t}));_l.displayName="SidebarMenu";const Ta=H.forwardRef(({className:e,...t},r)=>y.jsx("li",{ref:r,"data-sidebar":"menu-item",className:He("group/menu-item relative",e),...t}));Ta.displayName="SidebarMenuItem";const NG=no("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ml=H.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:i,className:s,...o},l)=>{const u=e?Ku:"button",{isMobile:c,state:h}=um(),d=y.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:He(NG({variant:r,size:n}),s),...o});return i?(typeof i=="string"&&(i={children:i}),y.jsxs(dn,{children:[y.jsx(hn,{asChild:!0,children:d}),y.jsx(nn,{side:"right",align:"center",hidden:h!=="collapsed"||c,...i})]})):d});Ml.displayName="SidebarMenuButton";const CG=H.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},i)=>{const s=t?Ku:"button";return y.jsx(s,{ref:i,"data-sidebar":"menu-action",className:He("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});CG.displayName="SidebarMenuAction";const IG=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:He("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));IG.displayName="SidebarMenuBadge";const hm=H.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const i=H.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return y.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:He("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&y.jsx(Od,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),y.jsx(Od,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});hm.displayName="SidebarMenuSkeleton";const MG=H.forwardRef(({className:e,...t},r)=>y.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:He("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));MG.displayName="SidebarMenuSub";const OG=H.forwardRef(({...e},t)=>y.jsx("li",{ref:t,...e}));OG.displayName="SidebarMenuSubItem";const RG=H.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...i},s)=>{const o=e?Ku:"a";return y.jsx(o,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:He("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-card-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-card-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...i})});RG.displayName="SidebarMenuSubButton";const PG=no("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ya({className:e,variant:t,...r}){return y.jsx("div",{className:He(PG({variant:t}),e),"data-testid":r["data-testid"]||"badge",...r})}a(ya,"Badge$1");const LG=no("text-sm font-normal text-muted-foreground leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nu=H.forwardRef(({className:e,...t},r)=>y.jsx($k,{ref:r,className:He(LG(),e),...t}));Nu.displayName=$k.displayName;const DG=a(({tag:e,onRemove:t})=>y.jsxs(ya,{variant:"outline",className:"flex items-center gap-1.5 pr-1.5 text-sm py-1 px-2 transition-colors hover:bg-accent hover:text-accent-foreground",children:[e,y.jsxs(ct,{type:"button",variant:"ghost",size:"icon",onClick:a(()=>t(e),"onClick"),className:"hover:bg-accent/20 rounded-full p-0.5 transition-colors h-auto w-auto min-w-0 min-h-0",children:[y.jsx(wi,{className:"h-3 w-3"}),y.jsxs("span",{className:"sr-only",children:["Remove ",e]})]})]}),"Tag"),jG=a(({tags:e,onRemove:t})=>y.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:e.map(r=>y.jsx(DG,{tag:r,onRemove:t},r))}),"TagList"),BG=a(({value:e,onChange:t,onKeyDown:r,onAdd:n})=>y.jsxs("div",{className:"relative",children:[y.jsx(pn,{value:e,onChange:t,onKeyDown:r,placeholder:"Type and press Enter or click Add...",className:He("bg-background pr-16",!e&&"text-muted-foreground")}),e.trim()&&y.jsx(ct,{size:"sm",onClick:n,className:"absolute top-1/2 -translate-y-1/2 right-2 h-7 px-3",children:"Add"})]}),"TagInput");function zG({title:e,data:t,onChange:r}){const[n,i]=H.useState(""),s=a(()=>{const u=n.trim();u&&!t.includes(u)&&(r([...t,u]),i(""))},"addTag"),o=a(u=>{u.key==="Enter"&&(u.preventDefault(),s())},"handleKeyDown"),l=a(u=>{r(t.filter(c=>c!==u))},"removeTag");return y.jsxs("div",{className:"space-y-2",children:[y.jsx(Nu,{children:e}),y.jsxs("div",{className:"p-2 bg-card rounded border border-input",children:[y.jsx(jG,{tags:t,onRemove:l}),y.jsx(BG,{value:n,onChange:a(u=>i(u.target.value),"onChange"),onKeyDown:o,onAdd:s})]})]})}a(zG,"ArrayInput");const r4=Jk,fm=H.forwardRef(({className:e,...t},r)=>y.jsx(L2,{ref:r,className:He("inline-flex items-center bg-transparent border-b border-sidebar-border w-full",e),...t}));fm.displayName=L2.displayName;const Rd=H.forwardRef(({className:e,...t},r)=>y.jsx(D2,{ref:r,className:He("inline-flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-medium text-muted-foreground bg-transparent transition-all hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground data-[state=active]:border-b-2 data-[state=active]:border-b-primary relative",e),...t}));Rd.displayName=D2.displayName;const va=H.forwardRef(({className:e,...t},r)=>y.jsx(Xk,{ref:r,className:He("text-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));va.displayName=Xk.displayName;const Ah=H.forwardRef(({className:e,...t},r)=>y.jsx("textarea",{className:He("flex min-h-[120px] w-full rounded border border-input bg-card px-4 py-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,"data-testid":t["data-testid"]||"textarea",...t}));Ah.displayName="Textarea";const UG=1,FG=3e3;let Yg=0;function HG(){return Yg=(Yg+1)%Number.MAX_SAFE_INTEGER,Yg.toString()}a(HG,"genId");const Zg=new Map,R_=a(e=>{if(Zg.has(e))return;const t=setTimeout(()=>{Zg.delete(e),fd({type:"REMOVE_TOAST",toastId:e})},FG);Zg.set(e,t)},"addToRemoveQueue"),GG=a((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,UG)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;if(r)R_(r);else for(const n of e.toasts)R_(n.id);return{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},"reducer"),f0=[];let p0={toasts:[]};function fd(e){p0=GG(p0,e);for(const t of f0)t(p0)}a(fd,"dispatch");function VG({...e}){const t=HG(),r=a(i=>fd({type:"UPDATE_TOAST",toast:{...i,id:t}}),"update"),n=a(()=>fd({type:"DISMISS_TOAST",toastId:t}),"dismiss");return fd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a(i=>{i||n()},"onOpenChange")}}),{id:t,dismiss:n,update:r}}a(VG,"toast");function Ur(){const[e,t]=H.useState(p0);return H.useEffect(()=>(f0.push(t),()=>{const r=f0.indexOf(t);r>-1&&f0.splice(r,1)}),[]),{...e,toast:VG,dismiss:a(r=>fd({type:"DISMISS_TOAST",toastId:r}),"dismiss")}}a(Ur,"useToast");function YG(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}a(YG,"sanitizeFilename");function ZG(e){const t={id:e.id,name:e.name,username:e.username,system:e.system,templates:e.templates,bio:e.bio,messageExamples:e.messageExamples,postExamples:e.postExamples,topics:e.topics,adjectives:e.adjectives,knowledge:e.knowledge,plugins:e.plugins,settings:e.settings?{...e.settings}:void 0,style:e.style};if(t.settings&&"secrets"in t.settings){const{secrets:r,...n}=t.settings;t.settings=n}return Object.fromEntries(Object.entries(t).filter(([r,n])=>n!=null))}a(ZG,"agentToCharacterData");function $G(e){const t=new Date().toISOString().split("T")[0];return`${YG(e||"agent")}-${t}.json`}a($G,"generateExportFilename");function JG(e,t){const r=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),n=URL.createObjectURL(r),i=document.createElement("a");i.href=n,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}a(JG,"downloadJsonFile");function n4(e,t){try{const r=ZG(e),n=$G(e.name);return JG(r,n),t&&t({title:"Character Exported",description:`${e.name}'s character data has been downloaded as ${n}`}),{success:!0,filename:n}}catch(r){return console.error("Failed to export character:",r),t&&t({title:"Export Failed",description:"Failed to export character data. Please try again.",variant:"destructive"}),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}a(n4,"exportCharacterAsJson");const Ys=YU,$g=$U,Zs=ZU,es=H.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(Qk,{ref:n,className:He("flex h-12 w-full items-center justify-between whitespace-nowrap rounded border border-input bg-card px-4 py-3 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,y.jsx(JU,{asChild:!0,children:y.jsx(as,{className:"h-4 w-4 opacity-50"})})]}));es.displayName=Qk.displayName;const pT=H.forwardRef(({className:e,...t},r)=>y.jsx(tA,{ref:r,className:He("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(rA,{className:"h-4 w-4"})}));pT.displayName=tA.displayName;const mT=H.forwardRef(({className:e,...t},r)=>y.jsx(nA,{ref:r,className:He("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(as,{className:"h-4 w-4"})}));mT.displayName=nA.displayName;const ts=H.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>y.jsx(XU,{children:y.jsxs(Kk,{ref:i,className:He("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-input bg-card text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[y.jsx(pT,{}),y.jsx(QU,{className:He("p-2",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),y.jsx(mT,{})]})}));ts.displayName=Kk.displayName;const Gy=H.forwardRef(({className:e,...t},r)=>y.jsx(eA,{ref:r,className:He("px-4 py-2 text-xs font-medium text-muted-foreground uppercase tracking-wider",e),...t}));Gy.displayName=eA.displayName;const Nr=H.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(Wk,{ref:n,className:He("relative flex w-full cursor-default select-none items-center rounded py-3 pl-4 pr-8 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[y.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(KU,{children:y.jsx(Qs,{className:"h-4 w-4"})})}),y.jsx(WU,{children:t})]}));Nr.displayName=Wk.displayName;const Vy=H.forwardRef(({className:e,...t},r)=>y.jsx(qk,{ref:r,className:He("-mx-1 my-1 h-px bg-muted",e),...t}));Vy.displayName=qk.displayName;const gT={elevenlabs:"@elizaos/plugin-elevenlabs",openai:"@elizaos/plugin-openai",none:""},XG=[{value:"none",label:"No Voice",provider:"none"}],QG=[],i4=[{value:"EXAVITQu4vr4xnSDxMaL",label:"ElevenLabs - Rachel (Default)",provider:"elevenlabs",gender:"female",language:"en",features:["natural","professional"]},{value:"21m00Tcm4TlvDq8ikWAM",label:"ElevenLabs - Adam",provider:"elevenlabs",gender:"male",language:"en",features:["natural","professional"]},{value:"AZnzlk1XvdvUeBnXmlld",label:"ElevenLabs - Domi",provider:"elevenlabs",gender:"female",language:"en",features:["natural","friendly"]},{value:"MF3mGyEYCl7XYWbV9V6O",label:"ElevenLabs - Elli",provider:"elevenlabs",gender:"female",language:"en",features:["natural","friendly"]},{value:"TxGEqnHWrfWFTfGW9XjX",label:"ElevenLabs - Josh",provider:"elevenlabs",gender:"male",language:"en",features:["natural","professional"]}],vT=[{value:"alloy",label:"OpenAI - Alloy",provider:"openai",gender:"female",language:"en",features:["natural","versatile"]},{value:"echo",label:"OpenAI - Echo",provider:"openai",gender:"male",language:"en",features:["natural","professional"]},{value:"fable",label:"OpenAI - Fable",provider:"openai",gender:"male",language:"en",features:["natural","narrative"]},{value:"onyx",label:"OpenAI - Onyx",provider:"openai",gender:"male",language:"en",features:["natural","deep"]},{value:"nova",label:"OpenAI - Nova",provider:"openai",gender:"female",language:"en",features:["natural","friendly"]},{value:"shimmer",label:"OpenAI - Shimmer",provider:"openai",gender:"female",language:"en",features:["natural","bright"]},{value:"ash",label:"OpenAI - Ash",provider:"openai",gender:"male",language:"en",features:["natural","calm"]},{value:"coral",label:"OpenAI - Coral",provider:"openai",gender:"female",language:"en",features:["natural","warm"]},{value:"sage",label:"OpenAI - Sage",provider:"openai",gender:"female",language:"en",features:["natural","wise"]},{value:"ballad",label:"OpenAI - Ballad",provider:"openai",gender:"male",language:"en",features:["natural","melodic"]}],bT=a(()=>[...XG,...QG,...i4,...vT],"getAllVoiceModels"),Yy=a(e=>bT().find(t=>t.value===e),"getVoiceModelByValue");function KG(){const[e,t]=H.useState(null);return H.useEffect(()=>{const r=localStorage.getItem("ELEVENLABS_API_KEY");t(r)},[]),Ln({queryKey:["elevenlabs-voices",e],queryFn:a(async()=>{if(!e)return[];try{const r=await fetch("https://api.elevenlabs.io/v2/voices",{method:"GET",headers:{"xi-api-key":e}});if(!r.ok)return console.error("Failed to fetch ElevenLabs voices:",r.statusText),[];const n=await r.json(),i=i4.map(l=>l.value);return n.voices.filter(l=>!i.includes(l.voice_id)).map(l=>({value:l.voice_id,label:`ElevenLabs - ${l.name} (Custom)`,provider:"elevenlabs",gender:l.labels?.gender==="female"?"female":"male",language:"en",features:[l.category||"professional",l.labels?.description||"natural"]}))}catch(r){return console.error("Error fetching ElevenLabs voices:",r),[]}},"queryFn"),staleTime:3600*1e3,refetchOnWindowFocus:!1})}a(KG,"useElevenLabsVoices");function Pd({...e}){return y.jsx(qU,{"data-slot":"dropdown-menu",...e})}a(Pd,"DropdownMenu");function Ld({...e}){return y.jsx(eF,{"data-slot":"dropdown-menu-trigger",...e})}a(Ld,"DropdownMenuTrigger");function Dd({className:e,sideOffset:t=4,onPointerDown:r,onPointerDownOutside:n,onCloseAutoFocus:i,...s}){const o=H.useRef(!1),l=H.useCallback(h=>{o.current=!0,r?.(h)},[r]),u=H.useCallback(h=>{o.current=!0,n?.(h)},[n]),c=H.useCallback(h=>{if(i)return i(h);o.current&&(h.preventDefault(),o.current=!1)},[i]);return y.jsx(tF,{children:y.jsx(rF,{"data-slot":"dropdown-menu-content",sideOffset:t,className:He("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border p-1 shadow-lg",e),onPointerDown:l,onPointerDownOutside:u,onCloseAutoFocus:c,...s})})}a(Dd,"DropdownMenuContent");function Xa({className:e,inset:t,variant:r="default",...n}){return y.jsx(nF,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:He("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground data-[variant=destructive]:font-normal relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm font-medium outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n})}a(Xa,"DropdownMenuItem");function WG({className:e,inset:t,...r}){return y.jsx(aF,{"data-slot":"dropdown-menu-label","data-inset":t,className:He("text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8",e),...r})}a(WG,"DropdownMenuLabel");function z0({className:e,...t}){return y.jsx(iF,{"data-slot":"dropdown-menu-separator",className:He("bg-border -mx-1 my-1 h-px",e),...t})}a(z0,"DropdownMenuSeparator");const yT=[{id:"none",label:"None (Start Blank)",description:"Start with an empty configuration",template:{name:"",username:"",system:"",bio:[],topics:[],adjectives:[],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap"],settings:{secrets:{}}}},{id:"discord-bot",label:"Discord Bot",description:"Interactive Discord bot that handles server interactions",template:{name:"Discord Assistant",username:"discordbot",system:"You are a Discord bot designed to assist users in a Discord server. You respond to messages, handle commands, and provide helpful information to community members. You should be friendly, helpful, and maintain a consistent personality. Focus on providing value to the community through clear, concise responses.",bio:["Helpful Discord community assistant","Responds to commands and natural language queries","Assists with server-specific information and resources","Maintains a friendly and helpful tone"],topics:["Discord server","Community assistance","Command handling","Server information"],adjectives:["Helpful","Responsive","Friendly","Informative","Reliable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-discord"],style:{all:["Be friendly and helpful","Use clear, concise language","Follow Discord conventions"],chat:["Respond promptly to queries","Use appropriate formatting for clarity","Reference relevant commands when helpful"],post:["Structure longer responses with clear sections","Use embeds for rich content when appropriate"]},settings:{secrets:{}}}},{id:"telegram-bot",label:"Telegram Bot",description:"Interactive bot for Telegram channels and groups",template:{name:"Telegram Assistant",username:"telegrambot",system:"You are a helpful Telegram bot designed to assist users in channels and groups. You respond to commands and natural language queries, providing information, assistance, and engaging with users in a friendly manner. You can handle both one-on-one conversations and group interactions, adapting your tone and content accordingly while respecting privacy and community guidelines.",bio:["Interactive Telegram bot","Assists users in channels and groups","Responds to commands and natural language"],topics:["Channel information","User assistance","Content sharing","Group moderation","FAQ responses"],adjectives:["Helpful","Responsive","Friendly","Informative","Reliable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-telegram"],style:{all:["Be concise and clear","Use Telegram-friendly formatting","Respond promptly to user queries"],chat:["Handle commands efficiently","Include relevant emoji when appropriate","Maintain conversation context"],post:["Structure longer messages clearly","Use formatting for better readability","Include relevant links when helpful"]},settings:{clients:["telegram"],allowDirectMessages:!0,shouldOnlyJoinInAllowedGroups:!1,messageTrackingLimit:100,secrets:{}}}},{id:"slack-bot",label:"Slack Bot",description:"Interactive bot for Slack workspaces",template:{name:"Slack Assistant",username:"slackbot",system:"You are a specialized assistant for Slack workspaces. You help teams by answering questions, providing information, and facilitating collaboration. You can respond to direct messages and channel mentions, maintaining a helpful and professional tone that aligns with the organization's culture. Keep responses concise and relevant to the conversation context.",bio:["Specialized Slack workspace assistant","Facilitates team collaboration","Provides timely responses to queries"],topics:["Workspace information","Team collaboration","Company policies","Resource access","Task management"],adjectives:["Responsive","Helpful","Organized","Team-oriented","Professional"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-slack"],style:{all:["Be concise and clear","Match the tone of the workspace","Use Slack-appropriate formatting"],chat:["Reference relevant messages when appropriate","Use thread replies for detailed responses","Include emojis when fitting the workspace culture"],post:["Structure information with clear sections","Use bullet points for lists","Include relevant links when helpful"]},settings:{secrets:{}}}},{id:"twitter-agent",label:"Twitter/X Agent",description:"Manages Twitter presence and engagement",template:{name:"Twitter Agent",username:"twitteragent",system:"You are a Twitter engagement specialist designed to help create and manage effective Twitter content. You assist with drafting tweets, responding to mentions, analyzing engagement metrics, and suggesting content strategies. Your tone should match the brand voice while maintaining authenticity and encouraging audience interaction. Keep tweets concise and impactful within character limits.",bio:["Twitter engagement specialist","Creates compelling social content","Manages audience interactions"],topics:["Tweet creation","Audience engagement","Content strategy","Trend analysis","Brand voice"],adjectives:["Engaging","Concise","Strategic","Conversational","Creative"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-twitter"],style:{all:["Be concise and impactful","Stay within character limits","Use platform-appropriate formatting"],chat:["Match brand voice in replies","Be conversational and authentic","Use hashtags strategically"],post:["Draft varied content types","Suggest engaging visuals or polls","Include call-to-actions when appropriate"]},settings:{TWITTER_DRY_RUN:!1,MAX_TWEET_LENGTH:280,TWITTER_ENABLE_POST_GENERATION:!0,TWITTER_POST_INTERVAL_MIN:90,TWITTER_POST_INTERVAL_MAX:180,secrets:{}}}},{id:"github-bot",label:"GitHub Repository Assistant",description:"Helps manage GitHub repositories and development workflows",template:{name:"GitHub Assistant",username:"githubasst",system:"You are a GitHub repository assistant designed to help development teams manage their workflow and codebase. You can assist with pull request reviews, issue triage, documentation updates, and providing information about repository structure and conventions. Maintain a technical but approachable tone, and prioritize accuracy in all technical information.",bio:["GitHub repository management specialist","Assists with development workflows","Provides code and documentation support"],topics:["Pull requests","Issue tracking","Repository structure","Code reviews","Development workflows"],adjectives:["Technical","Precise","Helpful","Organized","Knowledgeable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-github"],style:{all:["Use technically precise language","Reference GitHub concepts appropriately","Link to relevant documentation when helpful"],chat:["Be concise in comments","Format code snippets properly","Summarize technical points clearly"],post:["Structure longer responses with clear headings","Use code blocks with syntax highlighting","Link to specific lines of code when relevant"]},settings:{secrets:{}}}},{id:"instagram-agent",label:"Instagram Content Manager",description:"Creates and manages content for Instagram",template:{name:"Instagram Manager",username:"instagrammgr",system:"You are an Instagram content specialist designed to help create and manage engaging Instagram presence. You assist with content creation, caption writing, hashtag strategy, engagement tactics, and understanding analytics. Your approach emphasizes visual storytelling, authenticity, and building connections with followers. Maintain a voice that matches the brand identity while adapting to Instagram's evolving features and trends.",bio:["Instagram content creation specialist","Develops engaging visual storytelling","Optimizes profile engagement"],topics:["Content creation","Caption writing","Hashtag strategy","Engagement tactics","Visual aesthetics"],adjectives:["Creative","Visual","Engaging","Trend-aware","Authentic"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-instagram"],style:{all:["Balance visual description with compelling text","Maintain brand voice consistency","Consider current platform trends"],chat:["Provide actionable content suggestions","Reference visual elements clearly","Include relevant hashtag recommendations"],post:["Craft captions that enhance visual content","Suggest content series and themes","Balance promotional with authentic content"]},settings:{POST_INTERVAL_MIN:90,POST_INTERVAL_MAX:180,ENABLE_ACTION_PROCESSING:!0,ACTION_INTERVAL:5,MAX_ACTIONS_PROCESSING:1,secrets:{}}}}];function wT(e){return yT.find(t=>t.id===e)}a(wT,"getTemplateById");const a4=sF,qG=oF,_T=H.forwardRef(({className:e,...t},r)=>y.jsx(uA,{className:He("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));_T.displayName=uA.displayName;const pm=H.forwardRef(({className:e,...t},r)=>y.jsxs(qG,{children:[y.jsx(_T,{}),y.jsx(iA,{ref:r,className:He("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));pm.displayName=iA.displayName;const mm=a(({className:e,...t})=>y.jsx("div",{className:He("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader");mm.displayName="AlertDialogHeader";const gm=a(({className:e,...t})=>y.jsx("div",{className:He("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter");gm.displayName="AlertDialogFooter";const vm=H.forwardRef(({className:e,...t},r)=>y.jsx(aA,{ref:r,className:He("text-lg font-semibold",e),...t}));vm.displayName=aA.displayName;const bm=H.forwardRef(({className:e,...t},r)=>y.jsx(sA,{ref:r,className:He("text-sm text-muted-foreground",e),...t}));bm.displayName=sA.displayName;const ym=H.forwardRef(({className:e,...t},r)=>y.jsx(lA,{ref:r,className:He(e4(),e),...t}));ym.displayName=lA.displayName;const wm=H.forwardRef(({className:e,...t},r)=>y.jsx(oA,{ref:r,className:He(e4({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));wm.displayName=oA.displayName;function eV({open:e,onOpenChange:t,missingSecrets:r,onConfirm:n,onCancel:i}){return y.jsx(a4,{open:e,onOpenChange:t,children:y.jsxs(pm,{children:[y.jsxs(mm,{children:[y.jsxs(vm,{className:"flex items-center gap-2",children:[y.jsx(ea,{className:"h-5 w-5 text-yellow-500"}),"Missing Required Configuration"]}),y.jsxs(bm,{className:"space-y-3",children:[y.jsx("p",{children:"The following required secrets are missing or empty. Your agent may not function properly without these values."}),y.jsx("div",{className:"bg-muted rounded-md p-3 space-y-2",children:r.map(s=>y.jsxs("div",{className:"text-sm",children:[y.jsx("code",{className:"font-mono font-semibold",children:s.name}),s.plugin&&y.jsxs("span",{className:"text-muted-foreground ml-2",children:["(required by ",s.plugin,")"]}),s.description&&y.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:s.description})]},s.name))}),y.jsx("p",{className:"text-sm",children:"Do you want to save anyway?"})]})]}),y.jsxs(gm,{children:[y.jsx(wm,{onClick:i,children:"Go Back"}),y.jsx(ym,{onClick:n,className:"bg-yellow-600 hover:bg-yellow-700",children:"Save Anyway"})]})]})})}a(eV,"MissingSecretsDialog");var gi={},tV=Object.create,{getPrototypeOf:rV,defineProperty:jd,getOwnPropertyNames:xT,getOwnPropertyDescriptor:nV}=Object,ET=Object.prototype.hasOwnProperty,xi=a((e,t,r)=>{r=e!=null?tV(rV(e)):{};let n=t||!e||!e.__esModule?jd(r,"default",{value:e,enumerable:!0}):r;for(let i of xT(e))ET.call(n,i)||jd(n,i,{get:a(()=>e[i],"get"),enumerable:!0});return n},"rq"),P_=new WeakMap,pr=a(e=>{var t=P_.get(e),r;return t||(t=jd({},"__esModule",{value:!0}),(e&&typeof e=="object"||typeof e=="function")&&xT(e).map(n=>!ET.call(t,n)&&jd(t,n,{get:a(()=>e[n],"get"),enumerable:!(r=nV(e,n))||r.enumerable})),P_.set(e,t),t)},"H6"),dt=a((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),"S$"),Ei=a((e,t)=>{for(var r in t)jd(e,r,{get:t[r],enumerable:!0,configurable:!0,set:a(n=>t[r]=()=>n,"set")})},"oq"),Th=a((e,t)=>()=>(e&&(t=e(e=0)),t),"d_"),m0=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:a((t,r)=>(typeof require<"u"?require:t)[r],"get")}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),iV=dt((e,t)=>{t.exports=function(r,n){if(typeof r!="string")throw TypeError("Expected a string");return n=typeof n>"u"?"_":n,r.replace(/([a-z\d])([A-Z])/g,"$1"+n+"$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1"+n+"$2").toLowerCase()}}),aV=dt((e,t)=>{var r=/[\p{Lu}]/u,n=/[\p{Ll}]/u,i=/^[\p{Lu}](?![\p{Lu}])/gu,s=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,l=new RegExp("^"+o.source),u=new RegExp(o.source+s.source,"gu"),c=new RegExp("\\d+"+s.source,"gu"),h=a((b,x,A)=>{let C=!1,M=!1,O=!1;for(let P=0;P<b.length;P++){let L=b[P];C&&r.test(L)?(b=b.slice(0,P)+"-"+b.slice(P),C=!1,O=M,M=!0,P++):M&&O&&n.test(L)?(b=b.slice(0,P-1)+"-"+b.slice(P-1),O=M,M=!1,C=!0):(C=x(L)===L&&A(L)!==L,O=M,M=A(L)===L&&x(L)!==L)}return b},"DN"),d=a((b,x)=>(i.lastIndex=0,b.replace(i,A=>x(A))),"LN"),g=a((b,x)=>(u.lastIndex=0,c.lastIndex=0,b.replace(u,(A,C)=>x(C)).replace(c,A=>x(A))),"gN"),m=a((b,x)=>{if(!(typeof b=="string"||Array.isArray(b)))throw TypeError("Expected the input to be `string | string[]`");if(x={pascalCase:!1,preserveConsecutiveUppercase:!1,...x},Array.isArray(b)?b=b.map(M=>M.trim()).filter(M=>M.length).join("-"):b=b.trim(),b.length===0)return"";let A=x.locale===!1?M=>M.toLowerCase():M=>M.toLocaleLowerCase(x.locale),C=x.locale===!1?M=>M.toUpperCase():M=>M.toLocaleUpperCase(x.locale);return b.length===1?x.pascalCase?C(b):A(b):(b!==A(b)&&(b=h(b,A,C)),b=b.replace(l,""),x.preserveConsecutiveUppercase?b=d(b,A):b=A(b),x.pascalCase&&(b=C(b.charAt(0))+b.slice(1)),g(b,C))},"_T");t.exports=m,t.exports.default=m}),sV=dt((e,t)=>{function r(n,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}a(r,"H8"),t.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(n){if(this._timeout&&clearTimeout(this._timeout),!n)return!1;var i=new Date().getTime();if(n&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(n),this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var s=this._timeouts.shift();if(s===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),s=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},s),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(n,i){this._fn=n,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var s=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){s._operationTimeoutCb()},s._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},r.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)},r.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var n={},i=null,s=0,o=0;o<this._errors.length;o++){var l=this._errors[o],u=l.message,c=(n[u]||0)+1;n[u]=c,c>=s&&(i=l,s=c)}return i}}),oV=dt(e=>{var t=sV();e.operation=function(r){var n=e.timeouts(r);return new t(n,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},e.timeouts=function(r){if(r instanceof Array)return[].concat(r);var n={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var i in r)n[i]=r[i];if(n.minTimeout>n.maxTimeout)throw Error("minTimeout is greater than maxTimeout");for(var s=[],o=0;o<n.retries;o++)s.push(this.createTimeout(o,n));return r&&r.forever&&!s.length&&s.push(this.createTimeout(o,n)),s.sort(function(l,u){return l-u}),s},e.createTimeout=function(r,n){var i=n.randomize?Math.random()+1:1,s=Math.round(i*Math.max(n.minTimeout,1)*Math.pow(n.factor,r));return s=Math.min(s,n.maxTimeout),s},e.wrap=function(r,n,i){if(n instanceof Array&&(i=n,n=null),!i){i=[];for(var s in r)typeof r[s]=="function"&&i.push(s)}for(var o=0;o<i.length;o++){var l=i[o],u=r[l];r[l]=function(c){var h=e.operation(n),d=Array.prototype.slice.call(arguments,1),g=d.pop();d.push(function(m){h.retry(m)||(m&&(arguments[0]=h.mainError()),g.apply(this,arguments))}),h.attempt(function(){c.apply(r,d)})}.bind(r,u),r[l].options=n}}}),s4=dt((e,t)=>{var r=oV(),n=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class i extends Error{static{a(this,"H2")}constructor(c){super(),c instanceof Error?(this.originalError=c,{message:c}=c):(this.originalError=Error(c),this.originalError.stack=this.stack),this.name="AbortError",this.message=c}}var s=a((u,c,h)=>{let d=h.retries-(c-1);return u.attemptNumber=c,u.retriesLeft=d,u},"uC"),o=a(u=>n.includes(u),"xC"),l=a((u,c)=>new Promise((h,d)=>{c={onFailedAttempt:a(()=>{},"onFailedAttempt"),retries:10,...c};let g=r.operation(c);g.attempt(async m=>{try{h(await u(m))}catch(b){if(!(b instanceof Error)){d(TypeError(`Non-error was thrown: "${b}". You should only throw errors.`));return}if(b instanceof i)g.stop(),d(b.originalError);else if(b instanceof TypeError&&!o(b.message))g.stop(),d(b);else{s(b,m,c);try{await c.onFailedAttempt(b)}catch(x){d(x);return}g.retry(b)||d(g.mainError())}}})}),"ow");t.exports=l,t.exports.default=l,t.exports.AbortError=i}),lV=dt((e,t)=>{var r=Object.prototype.hasOwnProperty,n="~";function i(){}a(i,"JP"),Object.create&&(i.prototype=Object.create(null),!new i().__proto__&&(n=!1));function s(c,h,d){this.fn=c,this.context=h,this.once=d||!1}a(s,"cC");function o(c,h,d,g,m){if(typeof d!="function")throw TypeError("The listener must be a function");var b=new s(d,g||c,m),x=n?n+h:h;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],b]:c._events[x].push(b):(c._events[x]=b,c._eventsCount++),c}a(o,"nw");function l(c,h){--c._eventsCount===0?c._events=new i:delete c._events[h]}a(l,"I1");function u(){this._events=new i,this._eventsCount=0}a(u,"Cq"),u.prototype.eventNames=function(){var c=[],h,d;if(this._eventsCount===0)return c;for(d in h=this._events)r.call(h,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},u.prototype.listeners=function(c){var h=n?n+c:c,d=this._events[h];if(!d)return[];if(d.fn)return[d.fn];for(var g=0,m=d.length,b=Array(m);g<m;g++)b[g]=d[g].fn;return b},u.prototype.listenerCount=function(c){var h=n?n+c:c,d=this._events[h];return d?d.fn?1:d.length:0},u.prototype.emit=function(c,h,d,g,m,b){var x=n?n+c:c;if(!this._events[x])return!1;var A=this._events[x],C=arguments.length,M,O;if(A.fn){switch(A.once&&this.removeListener(c,A.fn,void 0,!0),C){case 1:return A.fn.call(A.context),!0;case 2:return A.fn.call(A.context,h),!0;case 3:return A.fn.call(A.context,h,d),!0;case 4:return A.fn.call(A.context,h,d,g),!0;case 5:return A.fn.call(A.context,h,d,g,m),!0;case 6:return A.fn.call(A.context,h,d,g,m,b),!0}for(O=1,M=Array(C-1);O<C;O++)M[O-1]=arguments[O];A.fn.apply(A.context,M)}else{var P=A.length,L;for(O=0;O<P;O++)switch(A[O].once&&this.removeListener(c,A[O].fn,void 0,!0),C){case 1:A[O].fn.call(A[O].context);break;case 2:A[O].fn.call(A[O].context,h);break;case 3:A[O].fn.call(A[O].context,h,d);break;case 4:A[O].fn.call(A[O].context,h,d,g);break;default:if(!M)for(L=1,M=Array(C-1);L<C;L++)M[L-1]=arguments[L];A[O].fn.apply(A[O].context,M)}}return!0},u.prototype.on=function(c,h,d){return o(this,c,h,d,!1)},u.prototype.once=function(c,h,d){return o(this,c,h,d,!0)},u.prototype.removeListener=function(c,h,d,g){var m=n?n+c:c;if(!this._events[m])return this;if(!h)return l(this,m),this;var b=this._events[m];if(b.fn)b.fn===h&&(!g||b.once)&&(!d||b.context===d)&&l(this,m);else{for(var x=0,A=[],C=b.length;x<C;x++)(b[x].fn!==h||g&&!b[x].once||d&&b[x].context!==d)&&A.push(b[x]);A.length?this._events[m]=A.length===1?A[0]:A:l(this,m)}return this},u.prototype.removeAllListeners=function(c){var h;return c?(h=n?n+c:c,this._events[h]&&l(this,h)):(this._events=new i,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,typeof t<"u"&&(t.exports=u)}),uV=dt((e,t)=>{t.exports=(r,n)=>(n=n||(()=>{}),r.then(i=>new Promise(s=>{s(n())}).then(()=>i),i=>new Promise(s=>{s(n())}).then(()=>{throw i})))}),cV=dt((e,t)=>{var r=uV();class n extends Error{static{a(this,"T2")}constructor(o){super(o),this.name="TimeoutError"}}var i=a((s,o,l)=>new Promise((u,c)=>{if(typeof o!="number"||o<0)throw TypeError("Expected `milliseconds` to be a positive number");if(o===1/0){u(s);return}let h=setTimeout(()=>{if(typeof l=="function"){try{u(l())}catch(m){c(m)}return}let d=typeof l=="string"?l:`Promise timed out after ${o} milliseconds`,g=l instanceof Error?l:new n(d);typeof s.cancel=="function"&&s.cancel(),c(g)},o);r(s.then(u,c),()=>{clearTimeout(h)})}),"Uw");t.exports=i,t.exports.default=i,t.exports.TimeoutError=n}),dV=dt(e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(r,n,i){let s=0,o=r.length;for(;o>0;){let l=o/2|0,u=s+l;i(r[u],n)<=0?(s=++u,o-=l+1):o=l}return s}a(t,"dC"),e.default=t}),hV=dt(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=dV();class r{static{a(this,"ew")}constructor(){this._queue=[]}enqueue(i,s){s=Object.assign({priority:0},s);let o={priority:s.priority,run:i};if(this.size&&this._queue[this.size-1].priority>=s.priority){this._queue.push(o);return}let l=t.default(this._queue,o,(u,c)=>c.priority-u.priority);this._queue.splice(l,0,o)}dequeue(){let i=this._queue.shift();return i?.run}filter(i){return this._queue.filter(s=>s.priority===i.priority).map(s=>s.run)}get size(){return this._queue.length}}e.default=r}),o4=dt(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=lV(),r=cV(),n=hV(),i=a(()=>{},"L1"),s=new r.TimeoutError;class o extends t{static{a(this,"Kf")}constructor(u){var c,h,d,g;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=i,this._resolveIdle=i,u=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:n.default},u),!(typeof u.intervalCap=="number"&&u.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(h=(c=u.intervalCap)===null||c===void 0?void 0:c.toString())!==null&&h!==void 0?h:""}\` (${typeof u.intervalCap})`);if(u.interval===void 0||!(Number.isFinite(u.interval)&&u.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(g=(d=u.interval)===null||d===void 0?void 0:d.toString())!==null&&g!==void 0?g:""}\` (${typeof u.interval})`);this._carryoverConcurrencyCount=u.carryoverConcurrencyCount,this._isIntervalIgnored=u.intervalCap===1/0||u.interval===0,this._intervalCap=u.intervalCap,this._interval=u.interval,this._queue=new u.queueClass,this._queueClass=u.queueClass,this.concurrency=u.concurrency,this._timeout=u.timeout,this._throwOnTimeout=u.throwOnTimeout===!0,this._isPaused=u.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=i,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=i,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){let u=Date.now();if(this._intervalId===void 0){let c=this._intervalEnd-u;if(c<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},c)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let u=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let c=this._queue.dequeue();return c?(this.emit("active"),c(),u&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(u){if(!(typeof u=="number"&&u>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${u}\` (${typeof u})`);this._concurrency=u,this._processQueue()}async add(u,c={}){return new Promise((h,d)=>{let g=a(async()=>{this._pendingCount++,this._intervalCount++;try{let m=this._timeout===void 0&&c.timeout===void 0?u():r.default(Promise.resolve(u()),c.timeout===void 0?this._timeout:c.timeout,()=>{(c.throwOnTimeout===void 0?this._throwOnTimeout:c.throwOnTimeout)&&d(s)});h(await m)}catch(m){d(m)}this._next()},"_");this._queue.enqueue(g,c),this._tryToStartAnother(),this.emit("add")})}async addAll(u,c){return Promise.all(u.map(async h=>this.add(h,c)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(u=>{let c=this._resolveEmpty;this._resolveEmpty=()=>{c(),u()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(u=>{let c=this._resolveIdle;this._resolveIdle=()=>{c(),u()}})}get size(){return this._queue.size}sizeBy(u){return this._queue.filter(u).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(u){this._timeout=u}}e.default=o}),_m=dt((e,t)=>{var r=Number.MAX_SAFE_INTEGER||9007199254740991,n=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:r,RELEASE_TYPES:n,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}),xm=dt((e,t)=>{var r=typeof process=="object"&&gi&&gi.NODE_DEBUG&&/\bsemver\b/i.test(gi.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};t.exports=r}),Nh=dt((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=_m(),s=xm();e=t.exports={};var o=e.re=[],l=e.safeRe=[],u=e.src=[],c=e.safeSrc=[],h=e.t={},d=0,g="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",i],[g,n]],b=a(A=>{for(let[C,M]of m)A=A.split(`${C}*`).join(`${C}{0,${M}}`).split(`${C}+`).join(`${C}{1,${M}}`);return A},"YE"),x=a((A,C,M)=>{let O=b(C),P=d++;s(A,P,C),h[A]=P,u[P]=C,c[P]=O,o[P]=new RegExp(C,M?"g":void 0),l[P]=new RegExp(O,M?"g":void 0)},"Y6");x("NUMERICIDENTIFIER","0|[1-9]\\d*"),x("NUMERICIDENTIFIERLOOSE","\\d+"),x("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${g}*`),x("MAINVERSION",`(${u[h.NUMERICIDENTIFIER]})\\.(${u[h.NUMERICIDENTIFIER]})\\.(${u[h.NUMERICIDENTIFIER]})`),x("MAINVERSIONLOOSE",`(${u[h.NUMERICIDENTIFIERLOOSE]})\\.(${u[h.NUMERICIDENTIFIERLOOSE]})\\.(${u[h.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASEIDENTIFIER",`(?:${u[h.NONNUMERICIDENTIFIER]}|${u[h.NUMERICIDENTIFIER]})`),x("PRERELEASEIDENTIFIERLOOSE",`(?:${u[h.NONNUMERICIDENTIFIER]}|${u[h.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASE",`(?:-(${u[h.PRERELEASEIDENTIFIER]}(?:\\.${u[h.PRERELEASEIDENTIFIER]})*))`),x("PRERELEASELOOSE",`(?:-?(${u[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[h.PRERELEASEIDENTIFIERLOOSE]})*))`),x("BUILDIDENTIFIER",`${g}+`),x("BUILD",`(?:\\+(${u[h.BUILDIDENTIFIER]}(?:\\.${u[h.BUILDIDENTIFIER]})*))`),x("FULLPLAIN",`v?${u[h.MAINVERSION]}${u[h.PRERELEASE]}?${u[h.BUILD]}?`),x("FULL",`^${u[h.FULLPLAIN]}$`),x("LOOSEPLAIN",`[v=\\s]*${u[h.MAINVERSIONLOOSE]}${u[h.PRERELEASELOOSE]}?${u[h.BUILD]}?`),x("LOOSE",`^${u[h.LOOSEPLAIN]}$`),x("GTLT","((?:<|>)?=?)"),x("XRANGEIDENTIFIERLOOSE",`${u[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),x("XRANGEIDENTIFIER",`${u[h.NUMERICIDENTIFIER]}|x|X|\\*`),x("XRANGEPLAIN",`[v=\\s]*(${u[h.XRANGEIDENTIFIER]})(?:\\.(${u[h.XRANGEIDENTIFIER]})(?:\\.(${u[h.XRANGEIDENTIFIER]})(?:${u[h.PRERELEASE]})?${u[h.BUILD]}?)?)?`),x("XRANGEPLAINLOOSE",`[v=\\s]*(${u[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[h.XRANGEIDENTIFIERLOOSE]})(?:${u[h.PRERELEASELOOSE]})?${u[h.BUILD]}?)?)?`),x("XRANGE",`^${u[h.GTLT]}\\s*${u[h.XRANGEPLAIN]}$`),x("XRANGELOOSE",`^${u[h.GTLT]}\\s*${u[h.XRANGEPLAINLOOSE]}$`),x("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),x("COERCE",`${u[h.COERCEPLAIN]}(?:$|[^\\d])`),x("COERCEFULL",u[h.COERCEPLAIN]+`(?:${u[h.PRERELEASE]})?(?:${u[h.BUILD]})?(?:$|[^\\d])`),x("COERCERTL",u[h.COERCE],!0),x("COERCERTLFULL",u[h.COERCEFULL],!0),x("LONETILDE","(?:~>?)"),x("TILDETRIM",`(\\s*)${u[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",x("TILDE",`^${u[h.LONETILDE]}${u[h.XRANGEPLAIN]}$`),x("TILDELOOSE",`^${u[h.LONETILDE]}${u[h.XRANGEPLAINLOOSE]}$`),x("LONECARET","(?:\\^)"),x("CARETTRIM",`(\\s*)${u[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",x("CARET",`^${u[h.LONECARET]}${u[h.XRANGEPLAIN]}$`),x("CARETLOOSE",`^${u[h.LONECARET]}${u[h.XRANGEPLAINLOOSE]}$`),x("COMPARATORLOOSE",`^${u[h.GTLT]}\\s*(${u[h.LOOSEPLAIN]})$|^$`),x("COMPARATOR",`^${u[h.GTLT]}\\s*(${u[h.FULLPLAIN]})$|^$`),x("COMPARATORTRIM",`(\\s*)${u[h.GTLT]}\\s*(${u[h.LOOSEPLAIN]}|${u[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",x("HYPHENRANGE",`^\\s*(${u[h.XRANGEPLAIN]})\\s+-\\s+(${u[h.XRANGEPLAIN]})\\s*$`),x("HYPHENRANGELOOSE",`^\\s*(${u[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[h.XRANGEPLAINLOOSE]})\\s*$`),x("STAR","(<|>)?=?\\s*\\*"),x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}),l4=dt((e,t)=>{var r=Object.freeze({loose:!0}),n=Object.freeze({}),i=a(s=>s?typeof s!="object"?r:s:n,"zE");t.exports=i}),ST=dt((e,t)=>{var r=/^[0-9]+$/,n=a((s,o)=>{if(typeof s=="number"&&typeof o=="number")return s===o?0:s<o?-1:1;let l=r.test(s),u=r.test(o);return l&&u&&(s=+s,o=+o),s===o?0:l&&!u?-1:u&&!l?1:s<o?-1:1},"Wf"),i=a((s,o)=>n(o,s),"WE");t.exports={compareIdentifiers:n,rcompareIdentifiers:i}}),ai=dt((e,t)=>{var r=xm(),{MAX_LENGTH:n,MAX_SAFE_INTEGER:i}=_m(),{safeRe:s,t:o}=Nh(),l=l4(),{compareIdentifiers:u}=ST();class c{static{a(this,"E8")}constructor(d,g){if(g=l(g),d instanceof c){if(d.loose===!!g.loose&&d.includePrerelease===!!g.includePrerelease)return d;d=d.version}else if(typeof d!="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof d}".`);if(d.length>n)throw TypeError(`version is longer than ${n} characters`);r("SemVer",d,g),this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease;let m=d.trim().match(g.loose?s[o.LOOSE]:s[o.FULL]);if(!m)throw TypeError(`Invalid Version: ${d}`);if(this.raw=d,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>i||this.major<0)throw TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map(b=>{if(/^[0-9]+$/.test(b)){let x=+b;if(x>=0&&x<i)return x}return b}):this.prerelease=[],this.build=m[5]?m[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(d){if(r("SemVer.compare",this.version,this.options,d),!(d instanceof c)){if(typeof d=="string"&&d===this.version)return 0;d=new c(d,this.options)}return d.version===this.version?0:this.compareMain(d)||this.comparePre(d)}compareMain(d){return d instanceof c||(d=new c(d,this.options)),this.major<d.major?-1:this.major>d.major?1:this.minor<d.minor?-1:this.minor>d.minor?1:this.patch<d.patch?-1:this.patch>d.patch?1:0}comparePre(d){if(d instanceof c||(d=new c(d,this.options)),this.prerelease.length&&!d.prerelease.length)return-1;if(!this.prerelease.length&&d.prerelease.length)return 1;if(!this.prerelease.length&&!d.prerelease.length)return 0;let g=0;do{let m=this.prerelease[g],b=d.prerelease[g];if(r("prerelease compare",g,m,b),m===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(m===void 0)return-1;if(m===b)continue;return u(m,b)}while(++g)}compareBuild(d){d instanceof c||(d=new c(d,this.options));let g=0;do{let m=this.build[g],b=d.build[g];if(r("build compare",g,m,b),m===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(m===void 0)return-1;if(m===b)continue;return u(m,b)}while(++g)}inc(d,g,m){if(d.startsWith("pre")){if(!g&&m===!1)throw Error("invalid increment argument: identifier is empty");if(g){let b=`-${g}`.match(this.options.loose?s[o.PRERELEASELOOSE]:s[o.PRERELEASE]);if(!b||b[1]!==g)throw Error(`invalid identifier: ${g}`)}}switch(d){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",g,m);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",g,m);break;case"prepatch":this.prerelease.length=0,this.inc("patch",g,m),this.inc("pre",g,m);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",g,m),this.inc("pre",g,m);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let b=Number(m)?1:0;if(this.prerelease.length===0)this.prerelease=[b];else{let x=this.prerelease.length;for(;--x>=0;)typeof this.prerelease[x]=="number"&&(this.prerelease[x]++,x=-2);if(x===-1){if(g===this.prerelease.join(".")&&m===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(b)}}if(g){let x=[g,b];m===!1&&(x=[g]),u(this.prerelease[0],g)===0?isNaN(this.prerelease[1])&&(this.prerelease=x):this.prerelease=x}break}default:throw Error(`invalid increment argument: ${d}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=c}),ec=dt((e,t)=>{var r=ai(),n=a((i,s,o=!1)=>{if(i instanceof r)return i;try{return new r(i,s)}catch(l){if(!o)return null;throw l}},"JE");t.exports=n}),fV=dt((e,t)=>{var r=ec(),n=a((i,s)=>{let o=r(i,s);return o?o.version:null},"wE");t.exports=n}),pV=dt((e,t)=>{var r=ec(),n=a((i,s)=>{let o=r(i.trim().replace(/^[=v]+/,""),s);return o?o.version:null},"ZE");t.exports=n}),mV=dt((e,t)=>{var r=ai(),n=a((i,s,o,l,u)=>{typeof o=="string"&&(u=l,l=o,o=void 0);try{return new r(i instanceof r?i.version:i,o).inc(s,l,u).version}catch{return null}},"XE");t.exports=n}),gV=dt((e,t)=>{var r=ec(),n=a((i,s)=>{let o=r(i,null,!0),l=r(s,null,!0),u=o.compare(l);if(u===0)return null;let c=u>0,h=c?o:l,d=c?l:o,g=!!h.prerelease.length;if(d.prerelease.length&&!g){if(!d.patch&&!d.minor)return"major";if(d.compareMain(h)===0)return d.minor&&!d.patch?"minor":"patch"}let m=g?"pre":"";return o.major!==l.major?m+"major":o.minor!==l.minor?m+"minor":o.patch!==l.patch?m+"patch":"prerelease"},"AE");t.exports=n}),vV=dt((e,t)=>{var r=ai(),n=a((i,s)=>new r(i,s).major,"GE");t.exports=n}),bV=dt((e,t)=>{var r=ai(),n=a((i,s)=>new r(i,s).minor,"SE");t.exports=n}),yV=dt((e,t)=>{var r=ai(),n=a((i,s)=>new r(i,s).patch,"NE");t.exports=n}),wV=dt((e,t)=>{var r=ec(),n=a((i,s)=>{let o=r(i,s);return o&&o.prerelease.length?o.prerelease:null},"EE");t.exports=n}),Ma=dt((e,t)=>{var r=ai(),n=a((i,s,o)=>new r(i,o).compare(new r(s,o)),"hE");t.exports=n}),_V=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(s,i,o),"IE");t.exports=n}),xV=dt((e,t)=>{var r=Ma(),n=a((i,s)=>r(i,s,!0),"LE");t.exports=n}),u4=dt((e,t)=>{var r=ai(),n=a((i,s,o)=>{let l=new r(i,o),u=new r(s,o);return l.compare(u)||l.compareBuild(u)},"gE");t.exports=n}),EV=dt((e,t)=>{var r=u4(),n=a((i,s)=>i.sort((o,l)=>r(o,l,s)),"yE");t.exports=n}),SV=dt((e,t)=>{var r=u4(),n=a((i,s)=>i.sort((o,l)=>r(l,o,s)),"xE");t.exports=n}),Em=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)>0,"cE");t.exports=n}),c4=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)<0,"dE");t.exports=n}),kT=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)===0,"rE");t.exports=n}),AT=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)!==0,"nE");t.exports=n}),d4=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)>=0,"tE");t.exports=n}),h4=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)<=0,"UE");t.exports=n}),TT=dt((e,t)=>{var r=kT(),n=AT(),i=Em(),s=d4(),o=c4(),l=h4(),u=a((c,h,d,g)=>{switch(h){case"===":return typeof c=="object"&&(c=c.version),typeof d=="object"&&(d=d.version),c===d;case"!==":return typeof c=="object"&&(c=c.version),typeof d=="object"&&(d=d.version),c!==d;case"":case"=":case"==":return r(c,d,g);case"!=":return n(c,d,g);case">":return i(c,d,g);case">=":return s(c,d,g);case"<":return o(c,d,g);case"<=":return l(c,d,g);default:throw TypeError(`Invalid operator: ${h}`)}},"qh");t.exports=u}),kV=dt((e,t)=>{var r=ai(),n=ec(),{safeRe:i,t:s}=Nh(),o=a((l,u)=>{if(l instanceof r)return l;if(typeof l=="number"&&(l=String(l)),typeof l!="string")return null;u=u||{};let c=null;if(!u.rtl)c=l.match(u.includePrerelease?i[s.COERCEFULL]:i[s.COERCE]);else{let x=u.includePrerelease?i[s.COERCERTLFULL]:i[s.COERCERTL],A;for(;(A=x.exec(l))&&(!c||c.index+c[0].length!==l.length);)(!c||A.index+A[0].length!==c.index+c[0].length)&&(c=A),x.lastIndex=A.index+A[1].length+A[2].length;x.lastIndex=-1}if(c===null)return null;let h=c[2],d=c[3]||"0",g=c[4]||"0",m=u.includePrerelease&&c[5]?`-${c[5]}`:"",b=u.includePrerelease&&c[6]?`+${c[6]}`:"";return n(`${h}.${d}.${g}${m}${b}`,u)},"Ph");t.exports=o}),AV=dt((e,t)=>{class r{static{a(this,"KZ")}constructor(){this.max=1e3,this.map=new Map}get(i){let s=this.map.get(i);if(s!==void 0)return this.map.delete(i),this.map.set(i,s),s}delete(i){return this.map.delete(i)}set(i,s){if(!this.delete(i)&&s!==void 0){if(this.map.size>=this.max){let o=this.map.keys().next().value;this.delete(o)}this.map.set(i,s)}return this}}t.exports=r}),Oa=dt((e,t)=>{var r=/\s+/g;class n{static{a(this,"ZP")}constructor(T,N){if(N=o(N),T instanceof n)return T.loose===!!N.loose&&T.includePrerelease===!!N.includePrerelease?T:new n(T.raw,N);if(T instanceof l)return this.raw=T.value,this.set=[[T]],this.formatted=void 0,this;if(this.options=N,this.loose=!!N.loose,this.includePrerelease=!!N.includePrerelease,this.raw=T.trim().replace(r," "),this.set=this.raw.split("||").map(k=>this.parseRange(k.trim())).filter(k=>k.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let k=this.set[0];if(this.set=this.set.filter(p=>!C(p[0])),this.set.length===0)this.set=[k];else if(this.set.length>1){for(let p of this.set)if(p.length===1&&M(p[0])){this.set=[p];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let T=0;T<this.set.length;T++){T>0&&(this.formatted+="||");let N=this.set[T];for(let k=0;k<N.length;k++)k>0&&(this.formatted+=" "),this.formatted+=N[k].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(T){let N=((this.options.includePrerelease&&x)|(this.options.loose&&A))+":"+T,k=s.get(N);if(k)return k;let p=this.options.loose,E=p?h[d.HYPHENRANGELOOSE]:h[d.HYPHENRANGE];T=T.replace(E,v(this.options.includePrerelease)),u("hyphen replace",T),T=T.replace(h[d.COMPARATORTRIM],g),u("comparator trim",T),T=T.replace(h[d.TILDETRIM],m),u("tilde trim",T),T=T.replace(h[d.CARETTRIM],b),u("caret trim",T);let I=T.split(" ").map(V=>P(V,this.options)).join(" ").split(/\s+/).map(V=>w(V,this.options));p&&(I=I.filter(V=>(u("loose invalid filter",V,this.options),!!V.match(h[d.COMPARATORLOOSE])))),u("range list",I);let R=new Map,z=I.map(V=>new l(V,this.options));for(let V of z){if(C(V))return[V];R.set(V.value,V)}R.size>1&&R.has("")&&R.delete("");let B=[...R.values()];return s.set(N,B),B}intersects(T,N){if(!(T instanceof n))throw TypeError("a Range is required");return this.set.some(k=>O(k,N)&&T.set.some(p=>O(p,N)&&k.every(E=>p.every(I=>E.intersects(I,N)))))}test(T){if(!T)return!1;if(typeof T=="string")try{T=new c(T,this.options)}catch{return!1}for(let N=0;N<this.set.length;N++)if(_(this.set[N],T,this.options))return!0;return!1}}t.exports=n;var i=AV(),s=new i,o=l4(),l=Sm(),u=xm(),c=ai(),{safeRe:h,t:d,comparatorTrimReplace:g,tildeTrimReplace:m,caretTrimReplace:b}=Nh(),{FLAG_INCLUDE_PRERELEASE:x,FLAG_LOOSE:A}=_m(),C=a(S=>S.value==="<0.0.0-0","YZ"),M=a(S=>S.value==="","wh"),O=a((S,T)=>{let N=!0,k=S.slice(),p=k.pop();for(;N&&k.length;)N=k.every(E=>p.intersects(E,T)),p=k.pop();return N},"jZ"),P=a((S,T)=>(S=S.replace(h[d.BUILD],""),u("comp",S,T),S=Y(S,T),u("caret",S),S=U(S,T),u("tildes",S),S=F(S,T),u("xrange",S),S=f(S,T),u("stars",S),S),"fh"),L=a(S=>!S||S.toLowerCase()==="x"||S==="*","bq"),U=a((S,T)=>S.trim().split(/\s+/).map(N=>Z(N,T)).join(" "),"Zh"),Z=a((S,T)=>{let N=T.loose?h[d.TILDELOOSE]:h[d.TILDE];return S.replace(N,(k,p,E,I,R)=>{u("tilde",S,k,p,E,I,R);let z;return L(p)?z="":L(E)?z=`>=${p}.0.0 <${+p+1}.0.0-0`:L(I)?z=`>=${p}.${E}.0 <${p}.${+E+1}.0-0`:R?(u("replaceTilde pr",R),z=`>=${p}.${E}.${I}-${R} <${p}.${+E+1}.0-0`):z=`>=${p}.${E}.${I} <${p}.${+E+1}.0-0`,u("tilde return",z),z})},"Xh"),Y=a((S,T)=>S.trim().split(/\s+/).map(N=>re(N,T)).join(" "),"Ah"),re=a((S,T)=>{u("caret",S,T);let N=T.loose?h[d.CARETLOOSE]:h[d.CARET],k=T.includePrerelease?"-0":"";return S.replace(N,(p,E,I,R,z)=>{u("caret",S,p,E,I,R,z);let B;return L(E)?B="":L(I)?B=`>=${E}.0.0${k} <${+E+1}.0.0-0`:L(R)?E==="0"?B=`>=${E}.${I}.0${k} <${E}.${+I+1}.0-0`:B=`>=${E}.${I}.0${k} <${+E+1}.0.0-0`:z?(u("replaceCaret pr",z),E==="0"?I==="0"?B=`>=${E}.${I}.${R}-${z} <${E}.${I}.${+R+1}-0`:B=`>=${E}.${I}.${R}-${z} <${E}.${+I+1}.0-0`:B=`>=${E}.${I}.${R}-${z} <${+E+1}.0.0-0`):(u("no pr"),E==="0"?I==="0"?B=`>=${E}.${I}.${R}${k} <${E}.${I}.${+R+1}-0`:B=`>=${E}.${I}.${R}${k} <${E}.${+I+1}.0-0`:B=`>=${E}.${I}.${R} <${+E+1}.0.0-0`),u("caret return",B),B})},"kh"),F=a((S,T)=>(u("replaceXRanges",S,T),S.split(/\s+/).map(N=>$(N,T)).join(" ")),"Gh"),$=a((S,T)=>{S=S.trim();let N=T.loose?h[d.XRANGELOOSE]:h[d.XRANGE];return S.replace(N,(k,p,E,I,R,z)=>{u("xRange",S,k,p,E,I,R,z);let B=L(E),V=B||L(I),W=V||L(R),oe=W;return p==="="&&oe&&(p=""),z=T.includePrerelease?"-0":"",B?p===">"||p==="<"?k="<0.0.0-0":k="*":p&&oe?(V&&(I=0),R=0,p===">"?(p=">=",V?(E=+E+1,I=0,R=0):(I=+I+1,R=0)):p==="<="&&(p="<",V?E=+E+1:I=+I+1),p==="<"&&(z="-0"),k=`${p+E}.${I}.${R}${z}`):V?k=`>=${E}.0.0${z} <${+E+1}.0.0-0`:W&&(k=`>=${E}.${I}.0${z} <${E}.${+I+1}.0-0`),u("xRange return",k),k})},"Vh"),f=a((S,T)=>(u("replaceStars",S,T),S.trim().replace(h[d.STAR],"")),"Sh"),w=a((S,T)=>(u("replaceGTE0",S,T),S.trim().replace(h[T.includePrerelease?d.GTE0PRE:d.GTE0],"")),"Mh"),v=a(S=>(T,N,k,p,E,I,R,z,B,V,W,oe)=>(L(k)?N="":L(p)?N=`>=${k}.0.0${S?"-0":""}`:L(E)?N=`>=${k}.${p}.0${S?"-0":""}`:I?N=`>=${N}`:N=`>=${N}${S?"-0":""}`,L(B)?z="":L(V)?z=`<${+B+1}.0.0-0`:L(W)?z=`<${B}.${+V+1}.0-0`:oe?z=`<=${B}.${V}.${W}-${oe}`:S?z=`<${B}.${V}.${+W+1}-0`:z=`<=${z}`,`${N} ${z}`.trim()),"Nh"),_=a((S,T,N)=>{for(let k=0;k<S.length;k++)if(!S[k].test(T))return!1;if(T.prerelease.length&&!N.includePrerelease){for(let k=0;k<S.length;k++)if(u(S[k].semver),S[k].semver!==l.ANY&&S[k].semver.prerelease.length>0){let p=S[k].semver;if(p.major===T.major&&p.minor===T.minor&&p.patch===T.patch)return!0}return!1}return!0},"Ch")}),Sm=dt((e,t)=>{var r=Symbol("SemVer ANY");class n{static{a(this,"t1")}static get ANY(){return r}constructor(g,m){if(m=i(m),g instanceof n){if(g.loose===!!m.loose)return g;g=g.value}g=g.trim().split(/\s+/).join(" "),u("comparator",g,m),this.options=m,this.loose=!!m.loose,this.parse(g),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(g){let m=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR],b=g.match(m);if(!b)throw TypeError(`Invalid comparator: ${g}`);this.operator=b[1]!==void 0?b[1]:"",this.operator==="="&&(this.operator=""),b[2]?this.semver=new c(b[2],this.options.loose):this.semver=r}toString(){return this.value}test(g){if(u("Comparator.test",g,this.options.loose),this.semver===r||g===r)return!0;if(typeof g=="string")try{g=new c(g,this.options)}catch{return!1}return l(g,this.operator,this.semver,this.options)}intersects(g,m){if(!(g instanceof n))throw TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new h(g.value,m).test(this.value):g.operator===""?g.value===""?!0:new h(this.value,m).test(g.semver):(m=i(m),m.includePrerelease&&(this.value==="<0.0.0-0"||g.value==="<0.0.0-0")||!m.includePrerelease&&(this.value.startsWith("<0.0.0")||g.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&g.operator.startsWith(">")||this.operator.startsWith("<")&&g.operator.startsWith("<")||this.semver.version===g.semver.version&&this.operator.includes("=")&&g.operator.includes("=")||l(this.semver,"<",g.semver,m)&&this.operator.startsWith(">")&&g.operator.startsWith("<")||l(this.semver,">",g.semver,m)&&this.operator.startsWith("<")&&g.operator.startsWith(">")))}}t.exports=n;var i=l4(),{safeRe:s,t:o}=Nh(),l=TT(),u=xm(),c=ai(),h=Oa()}),km=dt((e,t)=>{var r=Oa(),n=a((i,s,o)=>{try{s=new r(s,o)}catch{return!1}return s.test(i)},"hh");t.exports=n}),TV=dt((e,t)=>{var r=Oa(),n=a((i,s)=>new r(i,s).set.map(o=>o.map(l=>l.value).join(" ").trim().split(" ")),"Ih");t.exports=n}),NV=dt((e,t)=>{var r=ai(),n=Oa(),i=a((s,o,l)=>{let u=null,c=null,h=null;try{h=new n(o,l)}catch{return null}return s.forEach(d=>{h.test(d)&&(!u||c.compare(d)===-1)&&(u=d,c=new r(u,l))}),u},"gh");t.exports=i}),CV=dt((e,t)=>{var r=ai(),n=Oa(),i=a((s,o,l)=>{let u=null,c=null,h=null;try{h=new n(o,l)}catch{return null}return s.forEach(d=>{h.test(d)&&(!u||c.compare(d)===1)&&(u=d,c=new r(u,l))}),u},"uh");t.exports=i}),IV=dt((e,t)=>{var r=ai(),n=Oa(),i=Em(),s=a((o,l)=>{o=new n(o,l);let u=new r("0.0.0");if(o.test(u)||(u=new r("0.0.0-0"),o.test(u)))return u;u=null;for(let c=0;c<o.set.length;++c){let h=o.set[c],d=null;h.forEach(g=>{let m=new r(g.semver.version);switch(g.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!d||i(m,d))&&(d=m);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${g.operator}`)}}),d&&(!u||i(u,d))&&(u=d)}return u&&o.test(u)?u:null},"ph");t.exports=s}),MV=dt((e,t)=>{var r=Oa(),n=a((i,s)=>{try{return new r(i,s).range||"*"}catch{return null}},"mh");t.exports=n}),f4=dt((e,t)=>{var r=ai(),n=Sm(),{ANY:i}=n,s=Oa(),o=km(),l=Em(),u=c4(),c=h4(),h=d4(),d=a((g,m,b,x)=>{g=new r(g,x),m=new s(m,x);let A,C,M,O,P;switch(b){case">":A=l,C=c,M=u,O=">",P=">=";break;case"<":A=u,C=h,M=l,O="<",P="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(o(g,m,x))return!1;for(let L=0;L<m.set.length;++L){let U=m.set[L],Z=null,Y=null;if(U.forEach(re=>{re.semver===i&&(re=new n(">=0.0.0")),Z=Z||re,Y=Y||re,A(re.semver,Z.semver,x)?Z=re:M(re.semver,Y.semver,x)&&(Y=re)}),Z.operator===O||Z.operator===P||(!Y.operator||Y.operator===O)&&C(g,Y.semver))return!1;if(Y.operator===P&&M(g,Y.semver))return!1}return!0},"th");t.exports=d}),OV=dt((e,t)=>{var r=f4(),n=a((i,s,o)=>r(i,s,">",o),"Uh");t.exports=n}),RV=dt((e,t)=>{var r=f4(),n=a((i,s,o)=>r(i,s,"<",o),"ah");t.exports=n}),PV=dt((e,t)=>{var r=Oa(),n=a((i,s,o)=>(i=new r(i,o),s=new r(s,o),i.intersects(s,o)),"Qh");t.exports=n}),LV=dt((e,t)=>{var r=km(),n=Ma();t.exports=(i,s,o)=>{let l=[],u=null,c=null,h=i.sort((b,x)=>n(b,x,o));for(let b of h)r(b,s,o)?(c=b,!u&&(u=b)):(c&&l.push([u,c]),c=null,u=null);u&&l.push([u,null]);let d=[];for(let[b,x]of l)b===x?d.push(b):!x&&b===h[0]?d.push("*"):x?b===h[0]?d.push(`<=${x}`):d.push(`${b} - ${x}`):d.push(`>=${b}`);let g=d.join(" || "),m=typeof s.raw=="string"?s.raw:String(s);return g.length<m.length?g:s}}),DV=dt((e,t)=>{var r=Oa(),n=Sm(),{ANY:i}=n,s=km(),o=Ma(),l=a((m,b,x={})=>{if(m===b)return!0;m=new r(m,x),b=new r(b,x);let A=!1;e:for(let C of m.set){for(let M of b.set){let O=h(C,M,x);if(A=A||O!==null,O)continue e}if(A)return!1}return!0},"$R"),u=[new n(">=0.0.0-0")],c=[new n(">=0.0.0")],h=a((m,b,x)=>{if(m===b)return!0;if(m.length===1&&m[0].semver===i){if(b.length===1&&b[0].semver===i)return!0;x.includePrerelease?m=u:m=c}if(b.length===1&&b[0].semver===i){if(x.includePrerelease)return!0;b=c}let A=new Set,C,M;for(let F of m)F.operator===">"||F.operator===">="?C=d(C,F,x):F.operator==="<"||F.operator==="<="?M=g(M,F,x):A.add(F.semver);if(A.size>1)return null;let O;if(C&&M){if(O=o(C.semver,M.semver,x),O>0)return null;if(O===0&&(C.operator!==">="||M.operator!=="<="))return null}for(let F of A){if(C&&!s(F,String(C),x)||M&&!s(F,String(M),x))return null;for(let $ of b)if(!s(F,String($),x))return!1;return!0}let P,L,U,Z,Y=M&&!x.includePrerelease&&M.semver.prerelease.length?M.semver:!1,re=C&&!x.includePrerelease&&C.semver.prerelease.length?C.semver:!1;Y&&Y.prerelease.length===1&&M.operator==="<"&&Y.prerelease[0]===0&&(Y=!1);for(let F of b){if(Z=Z||F.operator===">"||F.operator===">=",U=U||F.operator==="<"||F.operator==="<=",C){if(re&&F.semver.prerelease&&F.semver.prerelease.length&&F.semver.major===re.major&&F.semver.minor===re.minor&&F.semver.patch===re.patch&&(re=!1),F.operator===">"||F.operator===">="){if(P=d(C,F,x),P===F&&P!==C)return!1}else if(C.operator===">="&&!s(C.semver,String(F),x))return!1}if(M){if(Y&&F.semver.prerelease&&F.semver.prerelease.length&&F.semver.major===Y.major&&F.semver.minor===Y.minor&&F.semver.patch===Y.patch&&(Y=!1),F.operator==="<"||F.operator==="<="){if(L=g(M,F,x),L===F&&L!==M)return!1}else if(M.operator==="<="&&!s(M.semver,String(F),x))return!1}if(!F.operator&&(M||C)&&O!==0)return!1}return!(C&&U&&!M&&O!==0||M&&Z&&!C&&O!==0||re||Y)},"KR"),d=a((m,b,x)=>{if(!m)return b;let A=o(m.semver,b.semver,x);return A>0?m:A<0||b.operator===">"&&m.operator===">="?b:m},"rZ"),g=a((m,b,x)=>{if(!m)return b;let A=o(m.semver,b.semver,x);return A<0?m:A>0||b.operator==="<"&&m.operator==="<="?b:m},"oZ");t.exports=l}),jV=dt((e,t)=>{var r=Nh(),n=_m(),i=ai(),s=ST(),o=ec(),l=fV(),u=pV(),c=mV(),h=gV(),d=vV(),g=bV(),m=yV(),b=wV(),x=Ma(),A=_V(),C=xV(),M=u4(),O=EV(),P=SV(),L=Em(),U=c4(),Z=kT(),Y=AT(),re=d4(),F=h4(),$=TT(),f=kV(),w=Sm(),v=Oa(),_=km(),S=TV(),T=NV(),N=CV(),k=IV(),p=MV(),E=f4(),I=OV(),R=RV(),z=PV(),B=LV(),V=DV();t.exports={parse:o,valid:l,clean:u,inc:c,diff:h,major:d,minor:g,patch:m,prerelease:b,compare:x,rcompare:A,compareLoose:C,compareBuild:M,sort:O,rsort:P,gt:L,lt:U,eq:Z,neq:Y,gte:re,lte:F,cmp:$,coerce:f,Comparator:w,Range:v,satisfies:_,toComparators:S,maxSatisfying:T,minSatisfying:N,minVersion:k,validRange:p,outside:E,gtr:I,ltr:R,intersects:z,simplifyRange:B,subset:V,SemVer:i,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,RELEASE_TYPES:n.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}}),BV=dt((e,t)=>{var r=a((s=0)=>o=>`\x1B[${38+s};5;${o}m`,"JX"),n=a((s=0)=>(o,l,u)=>`\x1B[${38+s};2;${o};${l};${u}m`,"TX");function i(){let s=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(let[l,u]of Object.entries(o)){for(let[c,h]of Object.entries(u))o[c]={open:`\x1B[${h[0]}m`,close:`\x1B[${h[1]}m`},u[c]=o[c],s.set(h[0],h[1]);Object.defineProperty(o,l,{value:u,enumerable:!1})}return Object.defineProperty(o,"codes",{value:s,enumerable:!1}),o.color.close="\x1B[39m",o.bgColor.close="\x1B[49m",o.color.ansi256=r(),o.color.ansi16m=n(),o.bgColor.ansi256=r(10),o.bgColor.ansi16m=n(10),Object.defineProperties(o,{rgbToAnsi256:{value:a((l,u,c)=>l===u&&u===c?l<8?16:l>248?231:Math.round((l-8)/247*24)+232:16+36*Math.round(l/255*5)+6*Math.round(u/255*5)+Math.round(c/255*5),"value"),enumerable:!1},hexToRgb:{value:a(l=>{let u=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(l.toString(16));if(!u)return[0,0,0];let{colorString:c}=u.groups;c.length===3&&(c=c.split("").map(d=>d+d).join(""));let h=Number.parseInt(c,16);return[h>>16&255,h>>8&255,h&255]},"value"),enumerable:!1},hexToAnsi256:{value:a(l=>o.rgbToAnsi256(...o.hexToRgb(l)),"value"),enumerable:!1}}),o}a(i,"vI"),Object.defineProperty(t,"exports",{enumerable:!0,get:i})}),zV=dt(e=>{e.byteLength=u,e.toByteArray=h,e.fromByteArray=m;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s=0,o=i.length;s<o;++s)t[s]=i[s],r[i.charCodeAt(s)]=s;var s,o;r[45]=62,r[95]=63;function l(b){var x=b.length;if(x%4>0)throw Error("Invalid string. Length must be a multiple of 4");var A=b.indexOf("=");A===-1&&(A=x);var C=A===x?0:4-A%4;return[A,C]}a(l,"UA");function u(b){var x=l(b),A=x[0],C=x[1];return(A+C)*3/4-C}a(u,"wy");function c(b,x,A){return(x+A)*3/4-A}a(c,"fy");function h(b){var x,A=l(b),C=A[0],M=A[1],O=new n(c(b,C,M)),P=0,L=M>0?C-4:C,U;for(U=0;U<L;U+=4)x=r[b.charCodeAt(U)]<<18|r[b.charCodeAt(U+1)]<<12|r[b.charCodeAt(U+2)]<<6|r[b.charCodeAt(U+3)],O[P++]=x>>16&255,O[P++]=x>>8&255,O[P++]=x&255;return M===2&&(x=r[b.charCodeAt(U)]<<2|r[b.charCodeAt(U+1)]>>4,O[P++]=x&255),M===1&&(x=r[b.charCodeAt(U)]<<10|r[b.charCodeAt(U+1)]<<4|r[b.charCodeAt(U+2)]>>2,O[P++]=x>>8&255,O[P++]=x&255),O}a(h,"Zy");function d(b){return t[b>>18&63]+t[b>>12&63]+t[b>>6&63]+t[b&63]}a(d,"Xy");function g(b,x,A){for(var C,M=[],O=x;O<A;O+=3)C=(b[O]<<16&16711680)+(b[O+1]<<8&65280)+(b[O+2]&255),M.push(d(C));return M.join("")}a(g,"Ay");function m(b){for(var x,A=b.length,C=A%3,M=[],O=16383,P=0,L=A-C;P<L;P+=O)M.push(g(b,P,P+O>L?L:P+O));return C===1?(x=b[A-1],M.push(t[x>>2]+t[x<<4&63]+"==")):C===2&&(x=(b[A-2]<<8)+b[A-1],M.push(t[x>>10]+t[x>>4&63]+t[x<<2&63]+"=")),M.join("")}a(m,"ky")}),Si=dt(e=>{e.__esModule=!0,e.extend=s,e.indexOf=c,e.escapeExpression=h,e.isEmpty=d,e.createFrame=g,e.blockParams=m,e.appendContextPath=b;var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,n=/[&<>"'`=]/;function i(x){return t[x]}a(i,"xy");function s(x){for(var A=1;A<arguments.length;A++)for(var C in arguments[A])Object.prototype.hasOwnProperty.call(arguments[A],C)&&(x[C]=arguments[A][C]);return x}a(s,"eA");var o=Object.prototype.toString;e.toString=o;var l=a(function(x){return typeof x=="function"},"uz");l(/x/)&&(e.isFunction=l=a(function(x){return typeof x=="function"&&o.call(x)==="[object Function]"},"uz")),e.isFunction=l;var u=Array.isArray||function(x){return x&&typeof x=="object"?o.call(x)==="[object Array]":!1};e.isArray=u;function c(x,A){for(var C=0,M=x.length;C<M;C++)if(x[C]===A)return C;return-1}a(c,"py");function h(x){if(typeof x!="string"){if(x&&x.toHTML)return x.toHTML();if(x==null)return"";if(!x)return x+"";x=""+x}return n.test(x)?x.replace(r,i):x}a(h,"cy");function d(x){return!x&&x!==0?!0:!!(u(x)&&x.length===0)}a(d,"my");function g(x){var A=s({},x);return A._parent=x,A}a(g,"dy");function m(x,A){return x.path=A,x}a(m,"ly");function b(x,A){return(x?x+".":"")+A}a(b,"ry")}),Ra=dt((e,t)=>{e.__esModule=!0;var r=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function n(i,s){var o=s&&s.loc,l=void 0,u=void 0,c=void 0,h=void 0;o&&(l=o.start.line,u=o.end.line,c=o.start.column,h=o.end.column,i+=" - "+l+":"+c);for(var d=Error.prototype.constructor.call(this,i),g=0;g<r.length;g++)this[r[g]]=d[r[g]];Error.captureStackTrace&&Error.captureStackTrace(this,n);try{o&&(this.lineNumber=l,this.endLineNumber=u,Object.defineProperty?(Object.defineProperty(this,"column",{value:c,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:h,enumerable:!0})):(this.column=c,this.endColumn=h))}catch{}}a(n,"cz"),n.prototype=Error(),e.default=n,t.exports=e.default}),UV=dt((e,t)=>{e.__esModule=!0;var r=Si();e.default=function(n){n.registerHelper("blockHelperMissing",function(i,s){var{inverse:o,fn:l}=s;if(i===!0)return l(this);if(i===!1||i==null)return o(this);if(r.isArray(i))return i.length>0?(s.ids&&(s.ids=[s.name]),n.helpers.each(i,s)):o(this);if(s.data&&s.ids){var u=r.createFrame(s.data);u.contextPath=r.appendContextPath(s.data.contextPath,s.name),s={data:u}}return l(i,s)})},t.exports=e.default}),FV=dt((e,t)=>{e.__esModule=!0;function r(o){return o&&o.__esModule?o:{default:o}}a(r,"Ou");var n=Si(),i=Ra(),s=r(i);e.default=function(o){o.registerHelper("each",function(l,u){if(!u)throw new s.default("Must pass iterator to #each");var{fn:c,inverse:h}=u,d=0,g="",m=void 0,b=void 0;u.data&&u.ids&&(b=n.appendContextPath(u.data.contextPath,u.ids[0])+"."),n.isFunction(l)&&(l=l.call(this)),u.data&&(m=n.createFrame(u.data));function x(P,L,U){m&&(m.key=P,m.index=L,m.first=L===0,m.last=!!U,b&&(m.contextPath=b+P)),g=g+c(l[P],{data:m,blockParams:n.blockParams([l[P],P],[b+P,null])})}if(a(x,"T"),l&&typeof l=="object")if(n.isArray(l))for(var A=l.length;d<A;d++)d in l&&x(d,d,d===l.length-1);else if(typeof Symbol=="function"&&l[Symbol.iterator]){for(var C=[],M=l[Symbol.iterator](),O=M.next();!O.done;O=M.next())C.push(O.value);l=C;for(var A=l.length;d<A;d++)x(d,d,d===l.length-1)}else(function(){var P=void 0;Object.keys(l).forEach(function(L){P!==void 0&&x(P,d-1),P=L,d++}),P!==void 0&&x(P,d-1,!0)})();return d===0&&(g=h(this)),g})},t.exports=e.default}),HV=dt((e,t)=>{e.__esModule=!0;function r(s){return s&&s.__esModule?s:{default:s}}a(r,"Wu");var n=Ra(),i=r(n);e.default=function(s){s.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new i.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e.default}),GV=dt((e,t)=>{e.__esModule=!0;function r(o){return o&&o.__esModule?o:{default:o}}a(r,"fu");var n=Si(),i=Ra(),s=r(i);e.default=function(o){o.registerHelper("if",function(l,u){if(arguments.length!=2)throw new s.default("#if requires exactly one argument");return n.isFunction(l)&&(l=l.call(this)),!u.hash.includeZero&&!l||n.isEmpty(l)?u.inverse(this):u.fn(this)}),o.registerHelper("unless",function(l,u){if(arguments.length!=2)throw new s.default("#unless requires exactly one argument");return o.helpers.if.call(this,l,{fn:u.inverse,inverse:u.fn,hash:u.hash})})},t.exports=e.default}),VV=dt((e,t)=>{e.__esModule=!0,e.default=function(r){r.registerHelper("log",function(){for(var n=[void 0],i=arguments[arguments.length-1],s=0;s<arguments.length-1;s++)n.push(arguments[s]);var o=1;i.hash.level!=null?o=i.hash.level:i.data&&i.data.level!=null&&(o=i.data.level),n[0]=o,r.log.apply(r,n)})},t.exports=e.default}),YV=dt((e,t)=>{e.__esModule=!0,e.default=function(r){r.registerHelper("lookup",function(n,i,s){return n&&s.lookupProperty(n,i)})},t.exports=e.default}),ZV=dt((e,t)=>{e.__esModule=!0;function r(o){return o&&o.__esModule?o:{default:o}}a(r,"Mu");var n=Si(),i=Ra(),s=r(i);e.default=function(o){o.registerHelper("with",function(l,u){if(arguments.length!=2)throw new s.default("#with requires exactly one argument");n.isFunction(l)&&(l=l.call(this));var c=u.fn;if(n.isEmpty(l))return u.inverse(this);var h=u.data;return u.data&&u.ids&&(h=n.createFrame(u.data),h.contextPath=n.appendContextPath(u.data.contextPath,u.ids[0])),c(l,{data:h,blockParams:n.blockParams([l],[h&&h.contextPath])})})},t.exports=e.default}),NT=dt(e=>{e.__esModule=!0,e.registerDefaultHelpers=A,e.moveHelperToHooks=C;function t(M){return M&&M.__esModule?M:{default:M}}a(t,"E_");var r=UV(),n=t(r),i=FV(),s=t(i),o=HV(),l=t(o),u=GV(),c=t(u),h=VV(),d=t(h),g=YV(),m=t(g),b=ZV(),x=t(b);function A(M){n.default(M),s.default(M),l.default(M),c.default(M),d.default(M),m.default(M),x.default(M)}a(A,"ru");function C(M,O,P){M.helpers[O]&&(M.hooks[O]=M.helpers[O],!P&&delete M.helpers[O])}a(C,"ou")}),$V=dt((e,t)=>{e.__esModule=!0;var r=Si();e.default=function(n){n.registerDecorator("inline",function(i,s,o,l){var u=i;return s.partials||(s.partials={},u=a(function(c,h){var d=o.partials;o.partials=r.extend({},d,s.partials);var g=i(c,h);return o.partials=d,g},"Y")),s.partials[l.args[0]]=l.fn,u})},t.exports=e.default}),JV=dt(e=>{e.__esModule=!0,e.registerDefaultDecorators=i;function t(s){return s&&s.__esModule?s:{default:s}}a(t,"Qu");var r=$V(),n=t(r);function i(s){n.default(s)}a(i,"$x")}),CT=dt((e,t)=>{e.__esModule=!0;var r=Si(),n={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:a(function(i){if(typeof i=="string"){var s=r.indexOf(n.methodMap,i.toLowerCase());s>=0?i=s:i=parseInt(i,10)}return i},"lookupLevel"),log:a(function(i){if(i=n.lookupLevel(i),typeof console<"u"&&n.lookupLevel(n.level)<=i){var s=n.methodMap[i];console[s]||(s="log");for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u<o;u++)l[u-1]=arguments[u];console[s].apply(console,l)}},"log")};e.default=n,t.exports=e.default}),XV=dt(e=>{e.__esModule=!0,e.createNewLookupObject=r;var t=Si();function r(){for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return t.extend.apply(void 0,[Object.create(null)].concat(i))}a(r,"vx")}),IT=dt(e=>{e.__esModule=!0,e.createProtoAccessControl=o,e.resultIsAllowed=l,e.resetLoggedProperties=h;function t(d){return d&&d.__esModule?d:{default:d}}a(t,"Jx");var r=XV(),n=CT(),i=t(n),s=Object.create(null);function o(d){var g=Object.create(null);g.constructor=!1,g.__defineGetter__=!1,g.__defineSetter__=!1,g.__lookupGetter__=!1;var m=Object.create(null);return m.__proto__=!1,{properties:{whitelist:r.createNewLookupObject(m,d.allowedProtoProperties),defaultValue:d.allowProtoPropertiesByDefault},methods:{whitelist:r.createNewLookupObject(g,d.allowedProtoMethods),defaultValue:d.allowProtoMethodsByDefault}}}a(o,"fx");function l(d,g,m){return u(typeof d=="function"?g.methods:g.properties,m)}a(l,"Zx");function u(d,g){return d.whitelist[g]!==void 0?d.whitelist[g]===!0:d.defaultValue!==void 0?d.defaultValue:(c(g),!1)}a(u,"bk");function c(d){s[d]!==!0&&(s[d]=!0,i.default.log("error",'Handlebars: Access has been denied to resolve the property "'+d+`" because it is not an "own property" of its parent.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BUKiar2Z.js","assets/tex-Cppo0RY3.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-WgofotgN.js","assets/csharp-CX12Zw3r.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-CCoi5OLL.js","assets/vue-html-DAAvJJDi.js","assets/vue-vine-_Ih-lPRR.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/mermaid.core-wcUI7FVN.js","assets/main-1SnvDP-X.js","assets/katex-XSfRedCB.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var zU=Object.defineProperty;var a=(e,t)=>zU(e,"name",{value:t,configurable:!0});import{g as Kp,j as y,S as Ku,r as H,R as Fk,a as Hk,T as Gk,P as Vk,C as Wp,b as Yk,X as wi,O as qp,c as em,D as tm,d as UU,e as FU,f as HU,h as GU,i as Zk,k as VU,l as $k,m as Jk,L as L2,n as D2,o as Xk,p as YU,V as ZU,G as $U,q as Qk,I as JU,s as as,t as XU,u as Kk,v as QU,w as Wk,x as KU,y as Qs,z as WU,A as qk,B as eA,E as tA,F as rA,H as nA,J as Ln,K as qU,M as eF,N as tF,Q as rF,U as nF,W as iF,Y as aF,Z as sF,_ as oF,$ as iA,a0 as aA,a1 as sA,a2 as oA,a3 as lA,a4 as uA,a5 as ea,a6 as lF,a7 as cA,a8 as dA,a9 as uF,aa as hA,ab as Fn,ac as j2,ad as xh,ae as fA,af as pA,ag as cF,ah as dF,ai as B2,aj as mA,ak as hF,al as fF,am as gA,an as pF,ao as bl,ap as Ug,aq as Ps,ar as Ya,as as p_,at as Nl,au as mF,av as Ja,aw as Yn,ax as Dn,ay as vA,az as bA,aA as yA,aB as wA,aC as _A,aD as Di,aE as rm,aF as gF,aG as vF,aH as bF,aI as nm,aJ as im,aK as qc,aL as Cl,aM as Io,aN as m_,aO as yF,aP as Eh,aQ as am,aR as Td,aS as wF,aT as g_,aU as _F,aV as xA,aW as xF,aX as EA,aY as SA,aZ as kA,a_ as AA,a$ as TA,b0 as EF,b1 as z2,b2 as By,b3 as NA,b4 as SF,b5 as D0,b6 as U2,b7 as Nd,b8 as af,b9 as zy,ba as F2,bb as v_,bc as b_,bd as y_,be as sm,bf as Sh,bg as H2,bh as CA,bi as qn,bj as IA,bk as MA,bl as Gl,bm as OA,bn as w_,bo as _i,bp as yc,bq as G2,br as yl,bs as ju,bt as V2,bu as kh,bv as j0,bw as RA,bx as kF,by as Y2,bz as Cd,bA as AF,bB as TF,bC as Ki,bD as Wi,bE as pu,bF as NF,bG as Z2,bH as CF,bI as $2,bJ as PA,bK as LA,bL as IF,bM as MF,bN as OF,bO as RF,bP as PF,bQ as LF,bR as J2,bS as DF,bT as jF,bU as BF,bV as X2,bW as Q2,bX as zF,bY as DA,bZ as Uy,b_ as UF,b$ as jA,c0 as FF,c1 as HF,c2 as GF,c3 as VF,c4 as YF,c5 as ZF,c6 as $F,c7 as JF,c8 as XF,c9 as BA,ca as zA,cb as UA,cc as FA,cd as QF,ce as KF,cf as WF,cg as Fy,ch as qF,ci as eH,cj as om,ck as tH,cl as HA,cm as rH,cn as nH,co as Fg,cp as __,cq as x_,cr as iH,cs as K2,ct as aH,cu as sH,cv as oH,cw as lH,cx as uH,cy as cH,cz as dH,cA as hH,cB as fH,cC as pH,cD as sa,cE as mH}from"./react-vendor-BZsmEqKa.js";import{_ as me}from"./main-1SnvDP-X.js";function GA(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=GA(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}a(GA,"r$3");function lm(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=GA(e))&&(n&&(n+=" "),n+=t);return n}a(lm,"clsx");const E_=a(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),S_=lm,no=a((e,t)=>r=>{var n;if(t?.variants==null)return S_(e,r?.class,r?.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(c=>{const h=r?.[c],d=s?.[c];if(h===null)return null;const g=E_(h)||E_(d);return i[c][g]}),l=r&&Object.entries(r).reduce((c,h)=>{let[d,g]=h;return g===void 0||(c[d]=g),c},{}),u=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,h)=>{let{class:d,className:g,...m}=h;return Object.entries(m).every(b=>{let[x,A]=b;return Array.isArray(A)?A.includes({...s,...l}[x]):{...s,...l}[x]===A})?[...c,d,g]:c},[]);return S_(e,o,u,r?.class,r?.className)},"cva"),wu="user",sf="client_chat",ed="client_group_chat",Id=512;var c0=(e=>(e.REQUIRED="required",e.OPTIONAL="optional",e))(c0||{});const iu={name:"required",username:"optional",system:"required","settings.voice.model":"optional",bio:"optional",topics:"optional",adjectives:"optional","style.all":"optional","style.chat":"optional","style.post":"optional"};var d0={exports:{}},gH=d0.exports,k_;function vH(){return k_||(k_=1,(function(e,t){(function(r,n){e.exports=n()})(gH,(function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",l="minute",u="hour",c="day",h="week",d="month",g="quarter",m="year",b="date",x="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:a(function(v){var _=["th","st","nd","rd"],S=v%100;return"["+v+(_[(S-20)%10]||_[S]||_[0])+"]"},"ordinal")},O=a(function(v,_,S){var T=String(v);return!T||T.length>=_?v:""+Array(_+1-T.length).join(S)+v},"m"),P={s:O,z:a(function(v){var _=-v.utcOffset(),S=Math.abs(_),T=Math.floor(S/60),N=S%60;return(_<=0?"+":"-")+O(T,2,"0")+":"+O(N,2,"0")},"z"),m:a(function v(_,S){if(_.date()<S.date())return-v(S,_);var T=12*(S.year()-_.year())+(S.month()-_.month()),N=_.clone().add(T,d),k=S-N<0,p=_.clone().add(T+(k?-1:1),d);return+(-(T+(S-N)/(k?N-p:p-N))||0)},"t2"),a:a(function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},"a"),p:a(function(v){return{M:d,y:m,w:h,d:c,D:b,h:u,m:l,s:o,ms:s,Q:g}[v]||String(v||"").toLowerCase().replace(/s$/,"")},"p"),u:a(function(v){return v===void 0},"u")},L="en",U={};U[L]=M;var Z="$isDayjsObject",Y=a(function(v){return v instanceof f||!(!v||!v[Z])},"S"),re=a(function v(_,S,T){var N;if(!_)return L;if(typeof _=="string"){var k=_.toLowerCase();U[k]&&(N=k),S&&(U[k]=S,N=k);var p=_.split("-");if(!N&&p.length>1)return v(p[0])}else{var E=_.name;U[E]=_,N=E}return!T&&N&&(L=N),N||!T&&L},"t2"),F=a(function(v,_){if(Y(v))return v.clone();var S=typeof _=="object"?_:{};return S.date=v,S.args=arguments,new f(S)},"O"),$=P;$.l=re,$.i=Y,$.w=function(v,_){return F(v,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var f=(function(){function v(S){this.$L=re(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[Z]=!0}a(v,"M2");var _=v.prototype;return _.parse=function(S){this.$d=(function(T){var N=T.date,k=T.utc;if(N===null)return new Date(NaN);if($.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var p=N.match(A);if(p){var E=p[2]-1||0,I=(p[7]||"0").substring(0,3);return k?new Date(Date.UTC(p[1],E,p[3]||1,p[4]||0,p[5]||0,p[6]||0,I)):new Date(p[1],E,p[3]||1,p[4]||0,p[5]||0,p[6]||0,I)}}return new Date(N)})(S),this.init()},_.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},_.$utils=function(){return $},_.isValid=function(){return this.$d.toString()!==x},_.isSame=function(S,T){var N=F(S);return this.startOf(T)<=N&&N<=this.endOf(T)},_.isAfter=function(S,T){return F(S)<this.startOf(T)},_.isBefore=function(S,T){return this.endOf(T)<F(S)},_.$g=function(S,T,N){return $.u(S)?this[T]:this.set(N,S)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(S,T){var N=this,k=!!$.u(T)||T,p=$.p(S),E=a(function(ne,ie){var Ve=$.w(N.$u?Date.UTC(N.$y,ie,ne):new Date(N.$y,ie,ne),N);return k?Ve:Ve.endOf(c)},"l2"),I=a(function(ne,ie){return $.w(N.toDate()[ne].apply(N.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(ie)),N)},"$2"),R=this.$W,z=this.$M,B=this.$D,V="set"+(this.$u?"UTC":"");switch(p){case m:return k?E(1,0):E(31,11);case d:return k?E(1,z):E(0,z+1);case h:var W=this.$locale().weekStart||0,oe=(R<W?R+7:R)-W;return E(k?B-oe:B+(6-oe),z);case c:case b:return I(V+"Hours",0);case u:return I(V+"Minutes",1);case l:return I(V+"Seconds",2);case o:return I(V+"Milliseconds",3);default:return this.clone()}},_.endOf=function(S){return this.startOf(S,!1)},_.$set=function(S,T){var N,k=$.p(S),p="set"+(this.$u?"UTC":""),E=(N={},N[c]=p+"Date",N[b]=p+"Date",N[d]=p+"Month",N[m]=p+"FullYear",N[u]=p+"Hours",N[l]=p+"Minutes",N[o]=p+"Seconds",N[s]=p+"Milliseconds",N)[k],I=k===c?this.$D+(T-this.$W):T;if(k===d||k===m){var R=this.clone().set(b,1);R.$d[E](I),R.init(),this.$d=R.set(b,Math.min(this.$D,R.daysInMonth())).$d}else E&&this.$d[E](I);return this.init(),this},_.set=function(S,T){return this.clone().$set(S,T)},_.get=function(S){return this[$.p(S)]()},_.add=function(S,T){var N,k=this;S=Number(S);var p=$.p(T),E=a(function(z){var B=F(k);return $.w(B.date(B.date()+Math.round(z*S)),k)},"y2");if(p===d)return this.set(d,this.$M+S);if(p===m)return this.set(m,this.$y+S);if(p===c)return E(1);if(p===h)return E(7);var I=(N={},N[l]=n,N[u]=i,N[o]=r,N)[p]||1,R=this.$d.getTime()+S*I;return $.w(R,this)},_.subtract=function(S,T){return this.add(-1*S,T)},_.format=function(S){var T=this,N=this.$locale();if(!this.isValid())return N.invalidDate||x;var k=S||"YYYY-MM-DDTHH:mm:ssZ",p=$.z(this),E=this.$H,I=this.$m,R=this.$M,z=N.weekdays,B=N.months,V=N.meridiem,W=a(function(ie,Ve,Te,we){return ie&&(ie[Ve]||ie(T,k))||Te[Ve].slice(0,we)},"h2"),oe=a(function(ie){return $.s(E%12||12,ie,"0")},"d2"),ne=V||function(ie,Ve,Te){var we=ie<12?"AM":"PM";return Te?we.toLowerCase():we};return k.replace(C,(function(ie,Ve){return Ve||(function(Te){switch(Te){case"YY":return String(T.$y).slice(-2);case"YYYY":return $.s(T.$y,4,"0");case"M":return R+1;case"MM":return $.s(R+1,2,"0");case"MMM":return W(N.monthsShort,R,B,3);case"MMMM":return W(B,R);case"D":return T.$D;case"DD":return $.s(T.$D,2,"0");case"d":return String(T.$W);case"dd":return W(N.weekdaysMin,T.$W,z,2);case"ddd":return W(N.weekdaysShort,T.$W,z,3);case"dddd":return z[T.$W];case"H":return String(E);case"HH":return $.s(E,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ne(E,I,!0);case"A":return ne(E,I,!1);case"m":return String(I);case"mm":return $.s(I,2,"0");case"s":return String(T.$s);case"ss":return $.s(T.$s,2,"0");case"SSS":return $.s(T.$ms,3,"0");case"Z":return p}return null})(ie)||p.replace(":","")}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(S,T,N){var k,p=this,E=$.p(T),I=F(S),R=(I.utcOffset()-this.utcOffset())*n,z=this-I,B=a(function(){return $.m(p,I)},"D2");switch(E){case m:k=B()/12;break;case d:k=B();break;case g:k=B()/3;break;case h:k=(z-R)/6048e5;break;case c:k=(z-R)/864e5;break;case u:k=z/i;break;case l:k=z/n;break;case o:k=z/r;break;default:k=z}return N?k:$.a(k)},_.daysInMonth=function(){return this.endOf(d).$D},_.$locale=function(){return U[this.$L]},_.locale=function(S,T){if(!S)return this.$L;var N=this.clone(),k=re(S,T,!0);return k&&(N.$L=k),N},_.clone=function(){return $.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},v})(),w=f.prototype;return F.prototype=w,[["$ms",s],["$s",o],["$m",l],["$H",u],["$W",c],["$M",d],["$y",m],["$D",b]].forEach((function(v){w[v[1]]=function(_){return this.$g(_,v[0],v[1])}})),F.extend=function(v,_){return v.$i||(v(_,f,F),v.$i=!0),F},F.locale=re,F.isDayjs=Y,F.unix=function(v){return F(1e3*v)},F.en=U[L],F.Ls=U,F.p={},F}))})(d0)),d0.exports}a(vH,"requireDayjs_min");var bH=vH();const VA=Kp(bH);var h0={exports:{}},yH=h0.exports,A_;function wH(){return A_||(A_=1,(function(e,t){(function(r,n){e.exports=n()})(yH,(function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(n,i,s){var o=i.prototype,l=o.format;s.en.formats=r,o.format=function(u){u===void 0&&(u="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,h=(function(d,g){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,b,x){var A=x&&x.toUpperCase();return b||g[x]||r[x]||g[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(C,M,O){return M||O.slice(1)}))}))})(u,c===void 0?{}:c);return l.call(this,h)}}}))})(h0)),h0.exports}a(wH,"requireLocalizedFormat");var _H=wH();const xH=Kp(_H),EH=a((e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},"concatArrays"),SH=a((e,t)=>({classGroupId:e,validator:t}),"createClassValidatorObject"),YA=a((e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),"createClassPartObject"),B0="-",T_=[],kH="arbitrary..",AH=a(e=>{const t=NH(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:a(o=>{if(o.startsWith("[")&&o.endsWith("]"))return TH(o);const l=o.split(B0),u=l[0]===""&&l.length>1?1:0;return ZA(l,u,t)},"getClassGroupId"),getConflictingClassGroupIds:a((o,l)=>{if(l){const u=n[o],c=r[o];return u?c?EH(c,u):u:c||T_}return r[o]||T_},"getConflictingClassGroupIds")}},"createClassGroupUtils"),ZA=a((e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],s=r.nextPart.get(i);if(s){const c=ZA(e,t+1,s);if(c)return c}const o=r.validators;if(o===null)return;const l=t===0?e.join(B0):e.slice(t).join(B0),u=o.length;for(let c=0;c<u;c++){const h=o[c];if(h.validator(l))return h.classGroupId}},"getGroupRecursive"),TH=a(e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?kH+n:void 0})(),"getGroupIdForArbitraryProperty"),NH=a(e=>{const{theme:t,classGroups:r}=e;return CH(r,t)},"createClassMap"),CH=a((e,t)=>{const r=YA();for(const n in e){const i=e[n];W2(i,r,n,t)}return r},"processClassGroups"),W2=a((e,t,r,n)=>{const i=e.length;for(let s=0;s<i;s++){const o=e[s];IH(o,t,r,n)}},"processClassesRecursively"),IH=a((e,t,r,n)=>{if(typeof e=="string"){MH(e,t,r);return}if(typeof e=="function"){OH(e,t,r,n);return}RH(e,t,r,n)},"processClassDefinition"),MH=a((e,t,r)=>{const n=e===""?t:$A(t,e);n.classGroupId=r},"processStringDefinition"),OH=a((e,t,r,n)=>{if(PH(e)){W2(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(SH(r,e))},"processFunctionDefinition"),RH=a((e,t,r,n)=>{const i=Object.entries(e),s=i.length;for(let o=0;o<s;o++){const[l,u]=i[o];W2(u,$A(t,l),r,n)}},"processObjectDefinition"),$A=a((e,t)=>{let r=e;const n=t.split(B0),i=n.length;for(let s=0;s<i;s++){const o=n[s];let l=r.nextPart.get(o);l||(l=YA(),r.nextPart.set(o,l)),r=l}return r},"getPart"),PH=a(e=>"isThemeGetter"in e&&e.isThemeGetter===!0,"isThemeGetter"),LH=a(e=>{if(e<1)return{get:a(()=>{},"get"),set:a(()=>{},"set")};let t=0,r=Object.create(null),n=Object.create(null);const i=a((s,o)=>{r[s]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))},"update");return{get(s){let o=r[s];if(o!==void 0)return o;if((o=n[s])!==void 0)return i(s,o),o},set(s,o){s in r?r[s]=o:i(s,o)}}},"createLruCache"),Hy="!",N_=":",DH=[],C_=a((e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),"createResultObject"),jH=a(e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a(i=>{const s=[];let o=0,l=0,u=0,c;const h=i.length;for(let x=0;x<h;x++){const A=i[x];if(o===0&&l===0){if(A===N_){s.push(i.slice(u,x)),u=x+1;continue}if(A==="/"){c=x;continue}}A==="["?o++:A==="]"?o--:A==="("?l++:A===")"&&l--}const d=s.length===0?i:i.slice(u);let g=d,m=!1;d.endsWith(Hy)?(g=d.slice(0,-1),m=!0):d.startsWith(Hy)&&(g=d.slice(1),m=!0);const b=c&&c>u?c-u:void 0;return C_(s,m,g,b)},"parseClassName");if(t){const i=t+N_,s=n;n=a(o=>o.startsWith(i)?s(o.slice(i.length)):C_(DH,!1,o,void 0,!0),"parseClassName")}if(r){const i=n;n=a(s=>r({className:s,parseClassName:i}),"parseClassName")}return n},"createParseClassName"),BH=a(e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let s=0;s<r.length;s++){const o=r[s],l=o[0]==="[",u=t.has(o);l||u?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},"createSortModifiers"),zH=a(e=>({cache:LH(e.cacheSize),parseClassName:jH(e),sortModifiers:BH(e),...AH(e)}),"createConfigUtils"),UH=/\s+/,FH=a((e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:s}=t,o=[],l=e.trim().split(UH);let u="";for(let c=l.length-1;c>=0;c-=1){const h=l[c],{isExternal:d,modifiers:g,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:x}=r(h);if(d){u=h+(u.length>0?" "+u:u);continue}let A=!!x,C=n(A?b.substring(0,x):b);if(!C){if(!A){u=h+(u.length>0?" "+u:u);continue}if(C=n(b),!C){u=h+(u.length>0?" "+u:u);continue}A=!1}const M=g.length===0?"":g.length===1?g[0]:s(g).join(":"),O=m?M+Hy:M,P=O+C;if(o.indexOf(P)>-1)continue;o.push(P);const L=i(C,A);for(let U=0;U<L.length;++U){const Z=L[U];o.push(O+Z)}u=h+(u.length>0?" "+u:u)}return u},"mergeClassList"),HH=a((...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=JA(r))&&(i&&(i+=" "),i+=n);return i},"twJoin"),JA=a(e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=JA(e[n]))&&(r&&(r+=" "),r+=t);return r},"toValue"),GH=a((e,...t)=>{let r,n,i,s;const o=a(u=>{const c=t.reduce((h,d)=>d(h),e());return r=zH(c),n=r.cache.get,i=r.cache.set,s=l,l(u)},"initTailwindMerge"),l=a(u=>{const c=n(u);if(c)return c;const h=FH(u,r);return i(u,h),h},"tailwindMerge");return s=o,(...u)=>s(HH(...u))},"createTailwindMerge"),VH=[],_n=a(e=>{const t=a(r=>r[e]||VH,"themeGetter");return t.isThemeGetter=!0,t},"fromTheme"),XA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,QA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,YH=/^\d+\/\d+$/,ZH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$H=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,JH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,au=a(e=>YH.test(e),"isFraction"),dr=a(e=>!!e&&!Number.isNaN(Number(e)),"isNumber$1"),co=a(e=>!!e&&Number.isInteger(Number(e)),"isInteger"),Hg=a(e=>e.endsWith("%")&&dr(e.slice(0,-1)),"isPercent"),bs=a(e=>ZH.test(e),"isTshirtSize"),KH=a(()=>!0,"isAny"),WH=a(e=>$H.test(e)&&!JH.test(e),"isLengthOnly"),KA=a(()=>!1,"isNever"),qH=a(e=>XH.test(e),"isShadow"),eG=a(e=>QH.test(e),"isImage"),tG=a(e=>!Bt(e)&&!zt(e),"isAnyNonArbitrary"),rG=a(e=>Wu(e,eT,KA),"isArbitrarySize"),Bt=a(e=>XA.test(e),"isArbitraryValue"),Jo=a(e=>Wu(e,tT,WH),"isArbitraryLength"),Gg=a(e=>Wu(e,oG,dr),"isArbitraryNumber"),I_=a(e=>Wu(e,WA,KA),"isArbitraryPosition"),nG=a(e=>Wu(e,qA,eG),"isArbitraryImage"),of=a(e=>Wu(e,rT,qH),"isArbitraryShadow"),zt=a(e=>QA.test(e),"isArbitraryVariable"),wc=a(e=>qu(e,tT),"isArbitraryVariableLength"),iG=a(e=>qu(e,lG),"isArbitraryVariableFamilyName"),M_=a(e=>qu(e,WA),"isArbitraryVariablePosition"),aG=a(e=>qu(e,eT),"isArbitraryVariableSize"),sG=a(e=>qu(e,qA),"isArbitraryVariableImage"),lf=a(e=>qu(e,rT,!0),"isArbitraryVariableShadow"),Wu=a((e,t,r)=>{const n=XA.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},"getIsArbitraryValue"),qu=a((e,t,r=!1)=>{const n=QA.exec(e);return n?n[1]?t(n[1]):r:!1},"getIsArbitraryVariable"),WA=a(e=>e==="position"||e==="percentage","isLabelPosition"),qA=a(e=>e==="image"||e==="url","isLabelImage"),eT=a(e=>e==="length"||e==="size"||e==="bg-size","isLabelSize"),tT=a(e=>e==="length","isLabelLength"),oG=a(e=>e==="number","isLabelNumber"),lG=a(e=>e==="family-name","isLabelFamilyName"),rT=a(e=>e==="shadow","isLabelShadow"),uG=a(()=>{const e=_n("color"),t=_n("font"),r=_n("text"),n=_n("font-weight"),i=_n("tracking"),s=_n("leading"),o=_n("breakpoint"),l=_n("container"),u=_n("spacing"),c=_n("radius"),h=_n("shadow"),d=_n("inset-shadow"),g=_n("text-shadow"),m=_n("drop-shadow"),b=_n("blur"),x=_n("perspective"),A=_n("aspect"),C=_n("ease"),M=_n("animate"),O=a(()=>["auto","avoid","all","avoid-page","page","left","right","column"],"scaleBreak"),P=a(()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],"scalePosition"),L=a(()=>[...P(),zt,Bt],"scalePositionWithArbitrary"),U=a(()=>["auto","hidden","clip","visible","scroll"],"scaleOverflow"),Z=a(()=>["auto","contain","none"],"scaleOverscroll"),Y=a(()=>[zt,Bt,u],"scaleUnambiguousSpacing"),re=a(()=>[au,"full","auto",...Y()],"scaleInset"),F=a(()=>[co,"none","subgrid",zt,Bt],"scaleGridTemplateColsRows"),$=a(()=>["auto",{span:["full",co,zt,Bt]},co,zt,Bt],"scaleGridColRowStartAndEnd"),f=a(()=>[co,"auto",zt,Bt],"scaleGridColRowStartOrEnd"),w=a(()=>["auto","min","max","fr",zt,Bt],"scaleGridAutoColsRows"),v=a(()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],"scaleAlignPrimaryAxis"),_=a(()=>["start","end","center","stretch","center-safe","end-safe"],"scaleAlignSecondaryAxis"),S=a(()=>["auto",...Y()],"scaleMargin"),T=a(()=>[au,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],"scaleSizing"),N=a(()=>[e,zt,Bt],"scaleColor"),k=a(()=>[...P(),M_,I_,{position:[zt,Bt]}],"scaleBgPosition"),p=a(()=>["no-repeat",{repeat:["","x","y","space","round"]}],"scaleBgRepeat"),E=a(()=>["auto","cover","contain",aG,rG,{size:[zt,Bt]}],"scaleBgSize"),I=a(()=>[Hg,wc,Jo],"scaleGradientStopPosition"),R=a(()=>["","none","full",c,zt,Bt],"scaleRadius"),z=a(()=>["",dr,wc,Jo],"scaleBorderWidth"),B=a(()=>["solid","dashed","dotted","double"],"scaleLineStyle"),V=a(()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],"scaleBlendMode"),W=a(()=>[dr,Hg,M_,I_],"scaleMaskImagePosition"),oe=a(()=>["","none",b,zt,Bt],"scaleBlur"),ne=a(()=>["none",dr,zt,Bt],"scaleRotate"),ie=a(()=>["none",dr,zt,Bt],"scaleScale"),Ve=a(()=>[dr,zt,Bt],"scaleSkew"),Te=a(()=>[au,"full",...Y()],"scaleTranslate");return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bs],breakpoint:[bs],color:[KH],container:[bs],"drop-shadow":[bs],ease:["in","out","in-out"],font:[tG],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bs],shadow:[bs],spacing:["px",dr],text:[bs],"text-shadow":[bs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",au,Bt,zt,A]}],container:["container"],columns:[{columns:[dr,Bt,zt,l]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[co,"auto",zt,Bt]}],basis:[{basis:[au,"full","auto",l,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dr,au,"auto","initial","none",Bt]}],grow:[{grow:["",dr,zt,Bt]}],shrink:[{shrink:["",dr,zt,Bt]}],order:[{order:[co,"first","last","none",zt,Bt]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":f()}],"col-end":[{"col-end":f()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":f()}],"row-end":[{"row-end":f()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":w()}],"auto-rows":[{"auto-rows":w()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...v(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...v()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":v()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:S()}],mx:[{mx:S()}],my:[{my:S()}],ms:[{ms:S()}],me:[{me:S()}],mt:[{mt:S()}],mr:[{mr:S()}],mb:[{mb:S()}],ml:[{ml:S()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:T()}],w:[{w:[l,"screen",...T()]}],"min-w":[{"min-w":[l,"screen","none",...T()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...T()]}],h:[{h:["screen","lh",...T()]}],"min-h":[{"min-h":["screen","lh","none",...T()]}],"max-h":[{"max-h":["screen","lh",...T()]}],"font-size":[{text:["base",r,wc,Jo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,zt,Gg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hg,Bt]}],"font-family":[{font:[iG,Bt,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,zt,Bt]}],"line-clamp":[{"line-clamp":[dr,"none",zt,Gg]}],leading:[{leading:[s,...Y()]}],"list-image":[{"list-image":["none",zt,Bt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",zt,Bt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:[dr,"from-font","auto",zt,Jo]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[dr,"auto",zt,Bt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",zt,Bt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",zt,Bt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:p()}],"bg-size":[{bg:E()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},co,zt,Bt],radial:["",zt,Bt],conic:[co,zt,Bt]},sG,nG]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...B(),"hidden","none"]}],"divide-style":[{divide:[...B(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...B(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dr,zt,Bt]}],"outline-w":[{outline:["",dr,wc,Jo]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",h,lf,of]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,lf,of]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[dr,Jo]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",g,lf,of]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[dr,zt,Bt]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dr]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[zt,Bt]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[dr]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:p()}],"mask-size":[{mask:E()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",zt,Bt]}],filter:[{filter:["","none",zt,Bt]}],blur:[{blur:oe()}],brightness:[{brightness:[dr,zt,Bt]}],contrast:[{contrast:[dr,zt,Bt]}],"drop-shadow":[{"drop-shadow":["","none",m,lf,of]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",dr,zt,Bt]}],"hue-rotate":[{"hue-rotate":[dr,zt,Bt]}],invert:[{invert:["",dr,zt,Bt]}],saturate:[{saturate:[dr,zt,Bt]}],sepia:[{sepia:["",dr,zt,Bt]}],"backdrop-filter":[{"backdrop-filter":["","none",zt,Bt]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[dr,zt,Bt]}],"backdrop-contrast":[{"backdrop-contrast":[dr,zt,Bt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dr,zt,Bt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dr,zt,Bt]}],"backdrop-invert":[{"backdrop-invert":["",dr,zt,Bt]}],"backdrop-opacity":[{"backdrop-opacity":[dr,zt,Bt]}],"backdrop-saturate":[{"backdrop-saturate":[dr,zt,Bt]}],"backdrop-sepia":[{"backdrop-sepia":["",dr,zt,Bt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",zt,Bt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dr,"initial",zt,Bt]}],ease:[{ease:["linear","initial",C,zt,Bt]}],delay:[{delay:[dr,zt,Bt]}],animate:[{animate:["none",M,zt,Bt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,zt,Bt]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ie()}],"scale-x":[{"scale-x":ie()}],"scale-y":[{"scale-y":ie()}],"scale-z":[{"scale-z":ie()}],"scale-3d":["scale-3d"],skew:[{skew:Ve()}],"skew-x":[{"skew-x":Ve()}],"skew-y":[{"skew-y":Ve()}],transform:[{transform:[zt,Bt,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",zt,Bt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",zt,Bt]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[dr,wc,Jo,Gg]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},"getDefaultConfig"),nT=GH(uG);function He(...e){return nT(lm(e))}a(He,"cn$1");VA.extend(xH);const wl=VA,Il=a(e=>e.substring(0,2),"formatAgentName");function Us(){return URL.createObjectURL(new Blob).split("/").pop()}a(Us,"randomUUID");function Ks(){const e="elizaos-client-user-id",t=localStorage.getItem(e);if(t)return t;const r=Us();return localStorage.setItem(e,r),r}a(Ks,"getEntityId");const iT=a((e,t=Id,r=.8)=>new Promise((n,i)=>{const s=new FileReader;s.onload=o=>{if(o.target?.result){const l=new Image;l.src=o.target.result,l.onload=()=>{const u=document.createElement("canvas");let c=l.width,h=l.height;c>h?c>t&&(h*=t/c,c=t):h>t&&(c*=t/h,h=t),u.width=c,u.height=h,u.getContext("2d")?.drawImage(l,0,0,c,h);const g=u.toDataURL("image/jpeg",r);n(g)},l.onerror=i}},s.onerror=i,s.readAsDataURL(e)}),"compressImage"),O_=["/images/agents/agent1.png","/images/agents/agent2.png","/images/agents/agent3.png","/images/agents/agent4.png","/images/agents/agent5.png"],Md=a(e=>{if(e?.settings?.avatar)return e.settings.avatar;if(e?.id){let t=0;for(let n=0;n<e.id.length;n++){const i=e.id.charCodeAt(n);t=(t<<5)-t+i,t|=0}const r=Math.abs(t)%O_.length;return O_[r]}return"/elizaos-icon.png"},"getAgentAvatar"),q2=a((e,t,r)=>{if(e?.name&&e.name.trim()!=="")return e.name;if(t&&t.length>0){const n=t.filter(i=>i.id!==r&&i.name);if(n.length===0&&t.some(i=>i.id===r&&i.name)){const i=t.find(s=>s.id===r);return i&&i.name||"Unnamed Group"}if(n.length>0)return n.map(i=>i.name).slice(0,3).join(", ")+(n.length>3?"...":"")}return"Unnamed Group"},"generateGroupName"),e4=no("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-red-800 text-white shadow-xs hover:bg-red-600 focus-visible:ring-red-400/20 dark:focus-visible:ring-red-500",outline:"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-auto w-auto"}},defaultVariants:{variant:"default",size:"default"}});function ct({className:e,variant:t,size:r,asChild:n=!1,...i}){const s=n?Ku:"button";return y.jsx(s,{"data-slot":"button",className:He(e4({variant:t,size:r,className:e})),...i})}a(ct,"Button$1");const pn=H.forwardRef(({className:e,type:t,...r},n)=>y.jsx("input",{type:t,className:He("flex h-12 w-full rounded border border-input bg-card px-4 py-3 text-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,"data-testid":r["data-testid"]||"input",...r}));pn.displayName="Input";const Ui=H.forwardRef(({className:e,orientation:t="horizontal",decorative:r=!0,...n},i)=>y.jsx(Fk,{ref:i,decorative:r,orientation:t,className:He("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),"data-testid":n["data-testid"]||"separator",...n}));Ui.displayName=Fk.displayName;const aT=Hk,cG=Gk,dG=Vk,sT=H.forwardRef(({className:e,...t},r)=>y.jsx(qp,{className:He("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));sT.displayName=qp.displayName;const hG=no("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),t4=H.forwardRef(({side:e="right",className:t,children:r,...n},i)=>y.jsxs(dG,{children:[y.jsx(sT,{}),y.jsxs(Wp,{ref:i,className:He(hG({side:e}),t),...n,children:[y.jsxs(Yk,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[y.jsx(wi,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));t4.displayName=Wp.displayName;const fG=H.forwardRef(({className:e,...t},r)=>y.jsx(em,{ref:r,className:He("text-lg font-semibold text-foreground",e),...t}));fG.displayName=em.displayName;const pG=H.forwardRef(({className:e,...t},r)=>y.jsx(tm,{ref:r,className:He("text-sm text-muted-foreground",e),...t}));pG.displayName=tm.displayName;function Od({className:e,...t}){return y.jsx("div",{className:He("animate-pulse rounded-md bg-primary/10",e),"data-testid":t["data-testid"]||"skeleton",...t})}a(Od,"Skeleton");const Tu=UU,dn=FU,hn=HU,nn=H.forwardRef(({className:e,sideOffset:t=4,...r},n)=>y.jsx(GU,{children:y.jsx(Zk,{ref:n,sideOffset:t,className:He("z-50 overflow-hidden select-none rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));nn.displayName=Zk.displayName;const Vg=768;function mG(){const[e,t]=H.useState(void 0);return H.useEffect(()=>{const r=window.matchMedia(`(max-width: ${Vg-1}px)`),n=a(()=>{t(window.innerWidth<Vg)},"onChange");return r.addEventListener("change",n),t(window.innerWidth<Vg),()=>r.removeEventListener("change",n)},[]),!!e}a(mG,"useIsMobile");const gG="sidebar:state",vG=3600*24*7,bG="16rem",yG="18rem",wG="3rem",_G="b",oT=H.createContext(null);function um(){const e=H.useContext(oT);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}a(um,"useSidebar");const lT=H.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:r,className:n,style:i,children:s,...o},l)=>{const u=mG(),[c,h]=H.useState(!1),[d,g]=H.useState(e),m=t??d,b=H.useCallback(M=>{const O=typeof M=="function"?M(m):M;r?r(O):g(O),document.cookie=`${gG}=${O}; path=/; max-age=${vG}`},[r,m]),x=H.useCallback(()=>u?h(M=>!M):b(M=>!M),[u,b,h]);H.useEffect(()=>{const M=a(O=>{O.key===_G&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),x())},"handleKeyDown");return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[x]);const A=m?"expanded":"collapsed",C=H.useMemo(()=>({state:A,open:m,setOpen:b,isMobile:u,openMobile:c,setOpenMobile:h,toggleSidebar:x}),[A,m,b,u,c,h,x]);return y.jsx(oT.Provider,{value:C,children:y.jsx(Tu,{delayDuration:0,children:y.jsx("div",{style:{"--sidebar-width":bG,"--sidebar-width-icon":wG,...i},className:He("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-card",n),ref:l,...o,children:s})})})});lT.displayName="SidebarProvider";const uT=H.forwardRef(({side:e="left",variant:t="sidebar",collapsible:r="offcanvas",className:n,children:i,...s},o)=>{const{isMobile:l,state:u,openMobile:c,setOpenMobile:h}=um();return r==="none"?y.jsx("div",{className:He("flex h-full w-[--sidebar-width] flex-col bg-card text-sidebar-foreground",n),ref:o,...s,children:i}):l?y.jsx(aT,{open:c,onOpenChange:h,...s,children:y.jsx(t4,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-card p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":yG},side:e,children:y.jsx("div",{className:"flex h-full w-full flex-col",children:i})})}):y.jsxs("div",{ref:o,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":e,children:[y.jsx("div",{className:He("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),y.jsx("div",{className:He("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...s,children:y.jsx("div",{"data-sidebar":"sidebar",className:"flex m-4 rounded-md w-full flex-col group-data-[variant=floating]:rounded-md group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:i})})]})});uT.displayName="Sidebar";const xG=H.forwardRef(({className:e,onClick:t,...r},n)=>{const{toggleSidebar:i}=um();return y.jsxs(ct,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:He("h-7 w-7",e),onClick:a(s=>{t?.(s),i()},"onClick"),"data-testid":"sidebar-toggle",...r,children:[y.jsx(VU,{}),y.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});xG.displayName="SidebarTrigger";const EG=H.forwardRef(({className:e,...t},r)=>{const{toggleSidebar:n}=um();return y.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:n,title:"Toggle Sidebar",className:He("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-card-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-card","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});EG.displayName="SidebarRail";const cT=H.forwardRef(({className:e,...t},r)=>y.jsx("main",{ref:r,className:He("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));cT.displayName="SidebarInset";const SG=H.forwardRef(({className:e,...t},r)=>y.jsx(pn,{ref:r,"data-sidebar":"input",className:He("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));SG.displayName="SidebarInput";const dT=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"header",className:He("flex flex-col gap-2 p-2",e),...t}));dT.displayName="SidebarHeader";const hT=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"footer",className:He("flex flex-col gap-2 p-2",e),...t}));hT.displayName="SidebarFooter";const kG=H.forwardRef(({className:e,...t},r)=>y.jsx(Ui,{ref:r,"data-sidebar":"separator",className:He("mx-2 w-auto bg-card-border",e),...t}));kG.displayName="SidebarSeparator";const fT=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"content",className:He("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden group-data-[collapsible=icon]:overflow-hidden",e),...t}));fT.displayName="SidebarContent";const cm=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"group",className:He("relative flex w-full min-w-0 flex-col p-0.5",e),...t}));cm.displayName="SidebarGroup";const AG=H.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const i=t?Ku:"div";return y.jsx(i,{ref:n,"data-sidebar":"group-label",className:He("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});AG.displayName="SidebarGroupLabel";const TG=H.forwardRef(({className:e,asChild:t=!1,...r},n)=>{const i=t?Ku:"button";return y.jsx(i,{ref:n,"data-sidebar":"group-action",className:He("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});TG.displayName="SidebarGroupAction";const dm=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"group-content",className:He("w-full text-sm p-0 m-0",e),...t}));dm.displayName="SidebarGroupContent";const _l=H.forwardRef(({className:e,...t},r)=>y.jsx("ul",{ref:r,"data-sidebar":"menu",className:He("flex w-full min-w-0 flex-col gap-0.5",e),...t}));_l.displayName="SidebarMenu";const Ta=H.forwardRef(({className:e,...t},r)=>y.jsx("li",{ref:r,"data-sidebar":"menu-item",className:He("group/menu-item relative",e),...t}));Ta.displayName="SidebarMenuItem";const NG=no("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ml=H.forwardRef(({asChild:e=!1,isActive:t=!1,variant:r="default",size:n="default",tooltip:i,className:s,...o},l)=>{const u=e?Ku:"button",{isMobile:c,state:h}=um(),d=y.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":n,"data-active":t,className:He(NG({variant:r,size:n}),s),...o});return i?(typeof i=="string"&&(i={children:i}),y.jsxs(dn,{children:[y.jsx(hn,{asChild:!0,children:d}),y.jsx(nn,{side:"right",align:"center",hidden:h!=="collapsed"||c,...i})]})):d});Ml.displayName="SidebarMenuButton";const CG=H.forwardRef(({className:e,asChild:t=!1,showOnHover:r=!1,...n},i)=>{const s=t?Ku:"button";return y.jsx(s,{ref:i,"data-sidebar":"menu-action",className:He("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...n})});CG.displayName="SidebarMenuAction";const IG=H.forwardRef(({className:e,...t},r)=>y.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:He("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));IG.displayName="SidebarMenuBadge";const hm=H.forwardRef(({className:e,showIcon:t=!1,...r},n)=>{const i=H.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return y.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:He("rounded-md h-8 flex gap-2 px-2 items-center",e),...r,children:[t&&y.jsx(Od,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),y.jsx(Od,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});hm.displayName="SidebarMenuSkeleton";const MG=H.forwardRef(({className:e,...t},r)=>y.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:He("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));MG.displayName="SidebarMenuSub";const OG=H.forwardRef(({...e},t)=>y.jsx("li",{ref:t,...e}));OG.displayName="SidebarMenuSubItem";const RG=H.forwardRef(({asChild:e=!1,size:t="md",isActive:r,className:n,...i},s)=>{const o=e?Ku:"a";return y.jsx(o,{ref:s,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:He("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-card-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-card-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-card-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...i})});RG.displayName="SidebarMenuSubButton";const PG=no("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ya({className:e,variant:t,...r}){return y.jsx("div",{className:He(PG({variant:t}),e),"data-testid":r["data-testid"]||"badge",...r})}a(ya,"Badge$1");const LG=no("text-sm font-normal text-muted-foreground leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nu=H.forwardRef(({className:e,...t},r)=>y.jsx($k,{ref:r,className:He(LG(),e),...t}));Nu.displayName=$k.displayName;const DG=a(({tag:e,onRemove:t})=>y.jsxs(ya,{variant:"outline",className:"flex items-center gap-1.5 pr-1.5 text-sm py-1 px-2 transition-colors hover:bg-accent hover:text-accent-foreground",children:[e,y.jsxs(ct,{type:"button",variant:"ghost",size:"icon",onClick:a(()=>t(e),"onClick"),className:"hover:bg-accent/20 rounded-full p-0.5 transition-colors h-auto w-auto min-w-0 min-h-0",children:[y.jsx(wi,{className:"h-3 w-3"}),y.jsxs("span",{className:"sr-only",children:["Remove ",e]})]})]}),"Tag"),jG=a(({tags:e,onRemove:t})=>y.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:e.map(r=>y.jsx(DG,{tag:r,onRemove:t},r))}),"TagList"),BG=a(({value:e,onChange:t,onKeyDown:r,onAdd:n})=>y.jsxs("div",{className:"relative",children:[y.jsx(pn,{value:e,onChange:t,onKeyDown:r,placeholder:"Type and press Enter or click Add...",className:He("bg-background pr-16",!e&&"text-muted-foreground")}),e.trim()&&y.jsx(ct,{size:"sm",onClick:n,className:"absolute top-1/2 -translate-y-1/2 right-2 h-7 px-3",children:"Add"})]}),"TagInput");function zG({title:e,data:t,onChange:r}){const[n,i]=H.useState(""),s=a(()=>{const u=n.trim();u&&!t.includes(u)&&(r([...t,u]),i(""))},"addTag"),o=a(u=>{u.key==="Enter"&&(u.preventDefault(),s())},"handleKeyDown"),l=a(u=>{r(t.filter(c=>c!==u))},"removeTag");return y.jsxs("div",{className:"space-y-2",children:[y.jsx(Nu,{children:e}),y.jsxs("div",{className:"p-2 bg-card rounded border border-input",children:[y.jsx(jG,{tags:t,onRemove:l}),y.jsx(BG,{value:n,onChange:a(u=>i(u.target.value),"onChange"),onKeyDown:o,onAdd:s})]})]})}a(zG,"ArrayInput");const r4=Jk,fm=H.forwardRef(({className:e,...t},r)=>y.jsx(L2,{ref:r,className:He("inline-flex items-center bg-transparent border-b border-sidebar-border w-full",e),...t}));fm.displayName=L2.displayName;const Rd=H.forwardRef(({className:e,...t},r)=>y.jsx(D2,{ref:r,className:He("inline-flex items-center justify-center gap-2 px-4 py-2.5 text-sm font-medium text-muted-foreground bg-transparent transition-all hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:text-foreground data-[state=active]:border-b-2 data-[state=active]:border-b-primary relative",e),...t}));Rd.displayName=D2.displayName;const va=H.forwardRef(({className:e,...t},r)=>y.jsx(Xk,{ref:r,className:He("text-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));va.displayName=Xk.displayName;const Ah=H.forwardRef(({className:e,...t},r)=>y.jsx("textarea",{className:He("flex min-h-[120px] w-full rounded border border-input bg-card px-4 py-3 text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,"data-testid":t["data-testid"]||"textarea",...t}));Ah.displayName="Textarea";const UG=1,FG=3e3;let Yg=0;function HG(){return Yg=(Yg+1)%Number.MAX_SAFE_INTEGER,Yg.toString()}a(HG,"genId");const Zg=new Map,R_=a(e=>{if(Zg.has(e))return;const t=setTimeout(()=>{Zg.delete(e),fd({type:"REMOVE_TOAST",toastId:e})},FG);Zg.set(e,t)},"addToRemoveQueue"),GG=a((e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,UG)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;if(r)R_(r);else for(const n of e.toasts)R_(n.id);return{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},"reducer"),f0=[];let p0={toasts:[]};function fd(e){p0=GG(p0,e);for(const t of f0)t(p0)}a(fd,"dispatch");function VG({...e}){const t=HG(),r=a(i=>fd({type:"UPDATE_TOAST",toast:{...i,id:t}}),"update"),n=a(()=>fd({type:"DISMISS_TOAST",toastId:t}),"dismiss");return fd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a(i=>{i||n()},"onOpenChange")}}),{id:t,dismiss:n,update:r}}a(VG,"toast");function Ur(){const[e,t]=H.useState(p0);return H.useEffect(()=>(f0.push(t),()=>{const r=f0.indexOf(t);r>-1&&f0.splice(r,1)}),[]),{...e,toast:VG,dismiss:a(r=>fd({type:"DISMISS_TOAST",toastId:r}),"dismiss")}}a(Ur,"useToast");function YG(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}a(YG,"sanitizeFilename");function ZG(e){const t={id:e.id,name:e.name,username:e.username,system:e.system,templates:e.templates,bio:e.bio,messageExamples:e.messageExamples,postExamples:e.postExamples,topics:e.topics,adjectives:e.adjectives,knowledge:e.knowledge,plugins:e.plugins,settings:e.settings?{...e.settings}:void 0,style:e.style};if(t.settings&&"secrets"in t.settings){const{secrets:r,...n}=t.settings;t.settings=n}return Object.fromEntries(Object.entries(t).filter(([r,n])=>n!=null))}a(ZG,"agentToCharacterData");function $G(e){const t=new Date().toISOString().split("T")[0];return`${YG(e||"agent")}-${t}.json`}a($G,"generateExportFilename");function JG(e,t){const r=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),n=URL.createObjectURL(r),i=document.createElement("a");i.href=n,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)}a(JG,"downloadJsonFile");function n4(e,t){try{const r=ZG(e),n=$G(e.name);return JG(r,n),t&&t({title:"Character Exported",description:`${e.name}'s character data has been downloaded as ${n}`}),{success:!0,filename:n}}catch(r){return console.error("Failed to export character:",r),t&&t({title:"Export Failed",description:"Failed to export character data. Please try again.",variant:"destructive"}),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}a(n4,"exportCharacterAsJson");const Ys=YU,$g=$U,Zs=ZU,es=H.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(Qk,{ref:n,className:He("flex h-12 w-full items-center justify-between whitespace-nowrap rounded border border-input bg-card px-4 py-3 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,y.jsx(JU,{asChild:!0,children:y.jsx(as,{className:"h-4 w-4 opacity-50"})})]}));es.displayName=Qk.displayName;const pT=H.forwardRef(({className:e,...t},r)=>y.jsx(tA,{ref:r,className:He("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(rA,{className:"h-4 w-4"})}));pT.displayName=tA.displayName;const mT=H.forwardRef(({className:e,...t},r)=>y.jsx(nA,{ref:r,className:He("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(as,{className:"h-4 w-4"})}));mT.displayName=nA.displayName;const ts=H.forwardRef(({className:e,children:t,position:r="popper",...n},i)=>y.jsx(XU,{children:y.jsxs(Kk,{ref:i,className:He("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-input bg-card text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[y.jsx(pT,{}),y.jsx(QU,{className:He("p-2",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),y.jsx(mT,{})]})}));ts.displayName=Kk.displayName;const Gy=H.forwardRef(({className:e,...t},r)=>y.jsx(eA,{ref:r,className:He("px-4 py-2 text-xs font-medium text-muted-foreground uppercase tracking-wider",e),...t}));Gy.displayName=eA.displayName;const Nr=H.forwardRef(({className:e,children:t,...r},n)=>y.jsxs(Wk,{ref:n,className:He("relative flex w-full cursor-default select-none items-center rounded py-3 pl-4 pr-8 text-sm outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[y.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(KU,{children:y.jsx(Qs,{className:"h-4 w-4"})})}),y.jsx(WU,{children:t})]}));Nr.displayName=Wk.displayName;const Vy=H.forwardRef(({className:e,...t},r)=>y.jsx(qk,{ref:r,className:He("-mx-1 my-1 h-px bg-muted",e),...t}));Vy.displayName=qk.displayName;const gT={elevenlabs:"@elizaos/plugin-elevenlabs",openai:"@elizaos/plugin-openai",none:""},XG=[{value:"none",label:"No Voice",provider:"none"}],QG=[],i4=[{value:"EXAVITQu4vr4xnSDxMaL",label:"ElevenLabs - Rachel (Default)",provider:"elevenlabs",gender:"female",language:"en",features:["natural","professional"]},{value:"21m00Tcm4TlvDq8ikWAM",label:"ElevenLabs - Adam",provider:"elevenlabs",gender:"male",language:"en",features:["natural","professional"]},{value:"AZnzlk1XvdvUeBnXmlld",label:"ElevenLabs - Domi",provider:"elevenlabs",gender:"female",language:"en",features:["natural","friendly"]},{value:"MF3mGyEYCl7XYWbV9V6O",label:"ElevenLabs - Elli",provider:"elevenlabs",gender:"female",language:"en",features:["natural","friendly"]},{value:"TxGEqnHWrfWFTfGW9XjX",label:"ElevenLabs - Josh",provider:"elevenlabs",gender:"male",language:"en",features:["natural","professional"]}],vT=[{value:"alloy",label:"OpenAI - Alloy",provider:"openai",gender:"female",language:"en",features:["natural","versatile"]},{value:"echo",label:"OpenAI - Echo",provider:"openai",gender:"male",language:"en",features:["natural","professional"]},{value:"fable",label:"OpenAI - Fable",provider:"openai",gender:"male",language:"en",features:["natural","narrative"]},{value:"onyx",label:"OpenAI - Onyx",provider:"openai",gender:"male",language:"en",features:["natural","deep"]},{value:"nova",label:"OpenAI - Nova",provider:"openai",gender:"female",language:"en",features:["natural","friendly"]},{value:"shimmer",label:"OpenAI - Shimmer",provider:"openai",gender:"female",language:"en",features:["natural","bright"]},{value:"ash",label:"OpenAI - Ash",provider:"openai",gender:"male",language:"en",features:["natural","calm"]},{value:"coral",label:"OpenAI - Coral",provider:"openai",gender:"female",language:"en",features:["natural","warm"]},{value:"sage",label:"OpenAI - Sage",provider:"openai",gender:"female",language:"en",features:["natural","wise"]},{value:"ballad",label:"OpenAI - Ballad",provider:"openai",gender:"male",language:"en",features:["natural","melodic"]}],bT=a(()=>[...XG,...QG,...i4,...vT],"getAllVoiceModels"),Yy=a(e=>bT().find(t=>t.value===e),"getVoiceModelByValue");function KG(){const[e,t]=H.useState(null);return H.useEffect(()=>{const r=localStorage.getItem("ELEVENLABS_API_KEY");t(r)},[]),Ln({queryKey:["elevenlabs-voices",e],queryFn:a(async()=>{if(!e)return[];try{const r=await fetch("https://api.elevenlabs.io/v2/voices",{method:"GET",headers:{"xi-api-key":e}});if(!r.ok)return console.error("Failed to fetch ElevenLabs voices:",r.statusText),[];const n=await r.json(),i=i4.map(l=>l.value);return n.voices.filter(l=>!i.includes(l.voice_id)).map(l=>({value:l.voice_id,label:`ElevenLabs - ${l.name} (Custom)`,provider:"elevenlabs",gender:l.labels?.gender==="female"?"female":"male",language:"en",features:[l.category||"professional",l.labels?.description||"natural"]}))}catch(r){return console.error("Error fetching ElevenLabs voices:",r),[]}},"queryFn"),staleTime:3600*1e3,refetchOnWindowFocus:!1})}a(KG,"useElevenLabsVoices");function Pd({...e}){return y.jsx(qU,{"data-slot":"dropdown-menu",...e})}a(Pd,"DropdownMenu");function Ld({...e}){return y.jsx(eF,{"data-slot":"dropdown-menu-trigger",...e})}a(Ld,"DropdownMenuTrigger");function Dd({className:e,sideOffset:t=4,onPointerDown:r,onPointerDownOutside:n,onCloseAutoFocus:i,...s}){const o=H.useRef(!1),l=H.useCallback(h=>{o.current=!0,r?.(h)},[r]),u=H.useCallback(h=>{o.current=!0,n?.(h)},[n]),c=H.useCallback(h=>{if(i)return i(h);o.current&&(h.preventDefault(),o.current=!1)},[i]);return y.jsx(tF,{children:y.jsx(rF,{"data-slot":"dropdown-menu-content",sideOffset:t,className:He("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-md border p-1 shadow-lg",e),onPointerDown:l,onPointerDownOutside:u,onCloseAutoFocus:c,...s})})}a(Dd,"DropdownMenuContent");function Xa({className:e,inset:t,variant:r="default",...n}){return y.jsx(nF,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:He("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground data-[variant=destructive]:font-normal relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm font-medium outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",e),...n})}a(Xa,"DropdownMenuItem");function WG({className:e,inset:t,...r}){return y.jsx(aF,{"data-slot":"dropdown-menu-label","data-inset":t,className:He("text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8",e),...r})}a(WG,"DropdownMenuLabel");function z0({className:e,...t}){return y.jsx(iF,{"data-slot":"dropdown-menu-separator",className:He("bg-border -mx-1 my-1 h-px",e),...t})}a(z0,"DropdownMenuSeparator");const yT=[{id:"none",label:"None (Start Blank)",description:"Start with an empty configuration",template:{name:"",username:"",system:"",bio:[],topics:[],adjectives:[],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap"],settings:{secrets:{}}}},{id:"discord-bot",label:"Discord Bot",description:"Interactive Discord bot that handles server interactions",template:{name:"Discord Assistant",username:"discordbot",system:"You are a Discord bot designed to assist users in a Discord server. You respond to messages, handle commands, and provide helpful information to community members. You should be friendly, helpful, and maintain a consistent personality. Focus on providing value to the community through clear, concise responses.",bio:["Helpful Discord community assistant","Responds to commands and natural language queries","Assists with server-specific information and resources","Maintains a friendly and helpful tone"],topics:["Discord server","Community assistance","Command handling","Server information"],adjectives:["Helpful","Responsive","Friendly","Informative","Reliable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-discord"],style:{all:["Be friendly and helpful","Use clear, concise language","Follow Discord conventions"],chat:["Respond promptly to queries","Use appropriate formatting for clarity","Reference relevant commands when helpful"],post:["Structure longer responses with clear sections","Use embeds for rich content when appropriate"]},settings:{secrets:{}}}},{id:"telegram-bot",label:"Telegram Bot",description:"Interactive bot for Telegram channels and groups",template:{name:"Telegram Assistant",username:"telegrambot",system:"You are a helpful Telegram bot designed to assist users in channels and groups. You respond to commands and natural language queries, providing information, assistance, and engaging with users in a friendly manner. You can handle both one-on-one conversations and group interactions, adapting your tone and content accordingly while respecting privacy and community guidelines.",bio:["Interactive Telegram bot","Assists users in channels and groups","Responds to commands and natural language"],topics:["Channel information","User assistance","Content sharing","Group moderation","FAQ responses"],adjectives:["Helpful","Responsive","Friendly","Informative","Reliable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-telegram"],style:{all:["Be concise and clear","Use Telegram-friendly formatting","Respond promptly to user queries"],chat:["Handle commands efficiently","Include relevant emoji when appropriate","Maintain conversation context"],post:["Structure longer messages clearly","Use formatting for better readability","Include relevant links when helpful"]},settings:{clients:["telegram"],allowDirectMessages:!0,shouldOnlyJoinInAllowedGroups:!1,messageTrackingLimit:100,secrets:{}}}},{id:"slack-bot",label:"Slack Bot",description:"Interactive bot for Slack workspaces",template:{name:"Slack Assistant",username:"slackbot",system:"You are a specialized assistant for Slack workspaces. You help teams by answering questions, providing information, and facilitating collaboration. You can respond to direct messages and channel mentions, maintaining a helpful and professional tone that aligns with the organization's culture. Keep responses concise and relevant to the conversation context.",bio:["Specialized Slack workspace assistant","Facilitates team collaboration","Provides timely responses to queries"],topics:["Workspace information","Team collaboration","Company policies","Resource access","Task management"],adjectives:["Responsive","Helpful","Organized","Team-oriented","Professional"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-slack"],style:{all:["Be concise and clear","Match the tone of the workspace","Use Slack-appropriate formatting"],chat:["Reference relevant messages when appropriate","Use thread replies for detailed responses","Include emojis when fitting the workspace culture"],post:["Structure information with clear sections","Use bullet points for lists","Include relevant links when helpful"]},settings:{secrets:{}}}},{id:"twitter-agent",label:"Twitter/X Agent",description:"Manages Twitter presence and engagement",template:{name:"Twitter Agent",username:"twitteragent",system:"You are a Twitter engagement specialist designed to help create and manage effective Twitter content. You assist with drafting tweets, responding to mentions, analyzing engagement metrics, and suggesting content strategies. Your tone should match the brand voice while maintaining authenticity and encouraging audience interaction. Keep tweets concise and impactful within character limits.",bio:["Twitter engagement specialist","Creates compelling social content","Manages audience interactions"],topics:["Tweet creation","Audience engagement","Content strategy","Trend analysis","Brand voice"],adjectives:["Engaging","Concise","Strategic","Conversational","Creative"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-twitter"],style:{all:["Be concise and impactful","Stay within character limits","Use platform-appropriate formatting"],chat:["Match brand voice in replies","Be conversational and authentic","Use hashtags strategically"],post:["Draft varied content types","Suggest engaging visuals or polls","Include call-to-actions when appropriate"]},settings:{TWITTER_DRY_RUN:!1,MAX_TWEET_LENGTH:280,TWITTER_ENABLE_POST_GENERATION:!0,TWITTER_POST_INTERVAL_MIN:90,TWITTER_POST_INTERVAL_MAX:180,secrets:{}}}},{id:"github-bot",label:"GitHub Repository Assistant",description:"Helps manage GitHub repositories and development workflows",template:{name:"GitHub Assistant",username:"githubasst",system:"You are a GitHub repository assistant designed to help development teams manage their workflow and codebase. You can assist with pull request reviews, issue triage, documentation updates, and providing information about repository structure and conventions. Maintain a technical but approachable tone, and prioritize accuracy in all technical information.",bio:["GitHub repository management specialist","Assists with development workflows","Provides code and documentation support"],topics:["Pull requests","Issue tracking","Repository structure","Code reviews","Development workflows"],adjectives:["Technical","Precise","Helpful","Organized","Knowledgeable"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-github"],style:{all:["Use technically precise language","Reference GitHub concepts appropriately","Link to relevant documentation when helpful"],chat:["Be concise in comments","Format code snippets properly","Summarize technical points clearly"],post:["Structure longer responses with clear headings","Use code blocks with syntax highlighting","Link to specific lines of code when relevant"]},settings:{secrets:{}}}},{id:"instagram-agent",label:"Instagram Content Manager",description:"Creates and manages content for Instagram",template:{name:"Instagram Manager",username:"instagrammgr",system:"You are an Instagram content specialist designed to help create and manage engaging Instagram presence. You assist with content creation, caption writing, hashtag strategy, engagement tactics, and understanding analytics. Your approach emphasizes visual storytelling, authenticity, and building connections with followers. Maintain a voice that matches the brand identity while adapting to Instagram's evolving features and trends.",bio:["Instagram content creation specialist","Develops engaging visual storytelling","Optimizes profile engagement"],topics:["Content creation","Caption writing","Hashtag strategy","Engagement tactics","Visual aesthetics"],adjectives:["Creative","Visual","Engaging","Trend-aware","Authentic"],plugins:["@elizaos/plugin-sql","@elizaos/plugin-openai","@elizaos/plugin-bootstrap","@elizaos/plugin-instagram"],style:{all:["Balance visual description with compelling text","Maintain brand voice consistency","Consider current platform trends"],chat:["Provide actionable content suggestions","Reference visual elements clearly","Include relevant hashtag recommendations"],post:["Craft captions that enhance visual content","Suggest content series and themes","Balance promotional with authentic content"]},settings:{POST_INTERVAL_MIN:90,POST_INTERVAL_MAX:180,ENABLE_ACTION_PROCESSING:!0,ACTION_INTERVAL:5,MAX_ACTIONS_PROCESSING:1,secrets:{}}}}];function wT(e){return yT.find(t=>t.id===e)}a(wT,"getTemplateById");const a4=sF,qG=oF,_T=H.forwardRef(({className:e,...t},r)=>y.jsx(uA,{className:He("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));_T.displayName=uA.displayName;const pm=H.forwardRef(({className:e,...t},r)=>y.jsxs(qG,{children:[y.jsx(_T,{}),y.jsx(iA,{ref:r,className:He("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));pm.displayName=iA.displayName;const mm=a(({className:e,...t})=>y.jsx("div",{className:He("flex flex-col space-y-2 text-center sm:text-left",e),...t}),"AlertDialogHeader");mm.displayName="AlertDialogHeader";const gm=a(({className:e,...t})=>y.jsx("div",{className:He("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),"AlertDialogFooter");gm.displayName="AlertDialogFooter";const vm=H.forwardRef(({className:e,...t},r)=>y.jsx(aA,{ref:r,className:He("text-lg font-semibold",e),...t}));vm.displayName=aA.displayName;const bm=H.forwardRef(({className:e,...t},r)=>y.jsx(sA,{ref:r,className:He("text-sm text-muted-foreground",e),...t}));bm.displayName=sA.displayName;const ym=H.forwardRef(({className:e,...t},r)=>y.jsx(lA,{ref:r,className:He(e4(),e),...t}));ym.displayName=lA.displayName;const wm=H.forwardRef(({className:e,...t},r)=>y.jsx(oA,{ref:r,className:He(e4({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));wm.displayName=oA.displayName;function eV({open:e,onOpenChange:t,missingSecrets:r,onConfirm:n,onCancel:i}){return y.jsx(a4,{open:e,onOpenChange:t,children:y.jsxs(pm,{children:[y.jsxs(mm,{children:[y.jsxs(vm,{className:"flex items-center gap-2",children:[y.jsx(ea,{className:"h-5 w-5 text-yellow-500"}),"Missing Required Configuration"]}),y.jsxs(bm,{className:"space-y-3",children:[y.jsx("p",{children:"The following required secrets are missing or empty. Your agent may not function properly without these values."}),y.jsx("div",{className:"bg-muted rounded-md p-3 space-y-2",children:r.map(s=>y.jsxs("div",{className:"text-sm",children:[y.jsx("code",{className:"font-mono font-semibold",children:s.name}),s.plugin&&y.jsxs("span",{className:"text-muted-foreground ml-2",children:["(required by ",s.plugin,")"]}),s.description&&y.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:s.description})]},s.name))}),y.jsx("p",{className:"text-sm",children:"Do you want to save anyway?"})]})]}),y.jsxs(gm,{children:[y.jsx(wm,{onClick:i,children:"Go Back"}),y.jsx(ym,{onClick:n,className:"bg-yellow-600 hover:bg-yellow-700",children:"Save Anyway"})]})]})})}a(eV,"MissingSecretsDialog");var gi={},tV=Object.create,{getPrototypeOf:rV,defineProperty:jd,getOwnPropertyNames:xT,getOwnPropertyDescriptor:nV}=Object,ET=Object.prototype.hasOwnProperty,xi=a((e,t,r)=>{r=e!=null?tV(rV(e)):{};let n=t||!e||!e.__esModule?jd(r,"default",{value:e,enumerable:!0}):r;for(let i of xT(e))ET.call(n,i)||jd(n,i,{get:a(()=>e[i],"get"),enumerable:!0});return n},"rq"),P_=new WeakMap,pr=a(e=>{var t=P_.get(e),r;return t||(t=jd({},"__esModule",{value:!0}),(e&&typeof e=="object"||typeof e=="function")&&xT(e).map(n=>!ET.call(t,n)&&jd(t,n,{get:a(()=>e[n],"get"),enumerable:!(r=nV(e,n))||r.enumerable})),P_.set(e,t),t)},"H6"),dt=a((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),"S$"),Ei=a((e,t)=>{for(var r in t)jd(e,r,{get:t[r],enumerable:!0,configurable:!0,set:a(n=>t[r]=()=>n,"set")})},"oq"),Th=a((e,t)=>()=>(e&&(t=e(e=0)),t),"d_"),m0=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:a((t,r)=>(typeof require<"u"?require:t)[r],"get")}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),iV=dt((e,t)=>{t.exports=function(r,n){if(typeof r!="string")throw TypeError("Expected a string");return n=typeof n>"u"?"_":n,r.replace(/([a-z\d])([A-Z])/g,"$1"+n+"$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1"+n+"$2").toLowerCase()}}),aV=dt((e,t)=>{var r=/[\p{Lu}]/u,n=/[\p{Ll}]/u,i=/^[\p{Lu}](?![\p{Lu}])/gu,s=/([\p{Alpha}\p{N}_]|$)/u,o=/[_.\- ]+/,l=new RegExp("^"+o.source),u=new RegExp(o.source+s.source,"gu"),c=new RegExp("\\d+"+s.source,"gu"),h=a((b,x,A)=>{let C=!1,M=!1,O=!1;for(let P=0;P<b.length;P++){let L=b[P];C&&r.test(L)?(b=b.slice(0,P)+"-"+b.slice(P),C=!1,O=M,M=!0,P++):M&&O&&n.test(L)?(b=b.slice(0,P-1)+"-"+b.slice(P-1),O=M,M=!1,C=!0):(C=x(L)===L&&A(L)!==L,O=M,M=A(L)===L&&x(L)!==L)}return b},"DN"),d=a((b,x)=>(i.lastIndex=0,b.replace(i,A=>x(A))),"LN"),g=a((b,x)=>(u.lastIndex=0,c.lastIndex=0,b.replace(u,(A,C)=>x(C)).replace(c,A=>x(A))),"gN"),m=a((b,x)=>{if(!(typeof b=="string"||Array.isArray(b)))throw TypeError("Expected the input to be `string | string[]`");if(x={pascalCase:!1,preserveConsecutiveUppercase:!1,...x},Array.isArray(b)?b=b.map(M=>M.trim()).filter(M=>M.length).join("-"):b=b.trim(),b.length===0)return"";let A=x.locale===!1?M=>M.toLowerCase():M=>M.toLocaleLowerCase(x.locale),C=x.locale===!1?M=>M.toUpperCase():M=>M.toLocaleUpperCase(x.locale);return b.length===1?x.pascalCase?C(b):A(b):(b!==A(b)&&(b=h(b,A,C)),b=b.replace(l,""),x.preserveConsecutiveUppercase?b=d(b,A):b=A(b),x.pascalCase&&(b=C(b.charAt(0))+b.slice(1)),g(b,C))},"_T");t.exports=m,t.exports.default=m}),sV=dt((e,t)=>{function r(n,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}a(r,"H8"),t.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(n){if(this._timeout&&clearTimeout(this._timeout),!n)return!1;var i=new Date().getTime();if(n&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(n),this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var s=this._timeouts.shift();if(s===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),s=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},s),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(n,i){this._fn=n,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var s=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){s._operationTimeoutCb()},s._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},r.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)},r.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var n={},i=null,s=0,o=0;o<this._errors.length;o++){var l=this._errors[o],u=l.message,c=(n[u]||0)+1;n[u]=c,c>=s&&(i=l,s=c)}return i}}),oV=dt(e=>{var t=sV();e.operation=function(r){var n=e.timeouts(r);return new t(n,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},e.timeouts=function(r){if(r instanceof Array)return[].concat(r);var n={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var i in r)n[i]=r[i];if(n.minTimeout>n.maxTimeout)throw Error("minTimeout is greater than maxTimeout");for(var s=[],o=0;o<n.retries;o++)s.push(this.createTimeout(o,n));return r&&r.forever&&!s.length&&s.push(this.createTimeout(o,n)),s.sort(function(l,u){return l-u}),s},e.createTimeout=function(r,n){var i=n.randomize?Math.random()+1:1,s=Math.round(i*Math.max(n.minTimeout,1)*Math.pow(n.factor,r));return s=Math.min(s,n.maxTimeout),s},e.wrap=function(r,n,i){if(n instanceof Array&&(i=n,n=null),!i){i=[];for(var s in r)typeof r[s]=="function"&&i.push(s)}for(var o=0;o<i.length;o++){var l=i[o],u=r[l];r[l]=function(c){var h=e.operation(n),d=Array.prototype.slice.call(arguments,1),g=d.pop();d.push(function(m){h.retry(m)||(m&&(arguments[0]=h.mainError()),g.apply(this,arguments))}),h.attempt(function(){c.apply(r,d)})}.bind(r,u),r[l].options=n}}}),s4=dt((e,t)=>{var r=oV(),n=["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed"];class i extends Error{static{a(this,"H2")}constructor(c){super(),c instanceof Error?(this.originalError=c,{message:c}=c):(this.originalError=Error(c),this.originalError.stack=this.stack),this.name="AbortError",this.message=c}}var s=a((u,c,h)=>{let d=h.retries-(c-1);return u.attemptNumber=c,u.retriesLeft=d,u},"uC"),o=a(u=>n.includes(u),"xC"),l=a((u,c)=>new Promise((h,d)=>{c={onFailedAttempt:a(()=>{},"onFailedAttempt"),retries:10,...c};let g=r.operation(c);g.attempt(async m=>{try{h(await u(m))}catch(b){if(!(b instanceof Error)){d(TypeError(`Non-error was thrown: "${b}". You should only throw errors.`));return}if(b instanceof i)g.stop(),d(b.originalError);else if(b instanceof TypeError&&!o(b.message))g.stop(),d(b);else{s(b,m,c);try{await c.onFailedAttempt(b)}catch(x){d(x);return}g.retry(b)||d(g.mainError())}}})}),"ow");t.exports=l,t.exports.default=l,t.exports.AbortError=i}),lV=dt((e,t)=>{var r=Object.prototype.hasOwnProperty,n="~";function i(){}a(i,"JP"),Object.create&&(i.prototype=Object.create(null),!new i().__proto__&&(n=!1));function s(c,h,d){this.fn=c,this.context=h,this.once=d||!1}a(s,"cC");function o(c,h,d,g,m){if(typeof d!="function")throw TypeError("The listener must be a function");var b=new s(d,g||c,m),x=n?n+h:h;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],b]:c._events[x].push(b):(c._events[x]=b,c._eventsCount++),c}a(o,"nw");function l(c,h){--c._eventsCount===0?c._events=new i:delete c._events[h]}a(l,"I1");function u(){this._events=new i,this._eventsCount=0}a(u,"Cq"),u.prototype.eventNames=function(){var c=[],h,d;if(this._eventsCount===0)return c;for(d in h=this._events)r.call(h,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},u.prototype.listeners=function(c){var h=n?n+c:c,d=this._events[h];if(!d)return[];if(d.fn)return[d.fn];for(var g=0,m=d.length,b=Array(m);g<m;g++)b[g]=d[g].fn;return b},u.prototype.listenerCount=function(c){var h=n?n+c:c,d=this._events[h];return d?d.fn?1:d.length:0},u.prototype.emit=function(c,h,d,g,m,b){var x=n?n+c:c;if(!this._events[x])return!1;var A=this._events[x],C=arguments.length,M,O;if(A.fn){switch(A.once&&this.removeListener(c,A.fn,void 0,!0),C){case 1:return A.fn.call(A.context),!0;case 2:return A.fn.call(A.context,h),!0;case 3:return A.fn.call(A.context,h,d),!0;case 4:return A.fn.call(A.context,h,d,g),!0;case 5:return A.fn.call(A.context,h,d,g,m),!0;case 6:return A.fn.call(A.context,h,d,g,m,b),!0}for(O=1,M=Array(C-1);O<C;O++)M[O-1]=arguments[O];A.fn.apply(A.context,M)}else{var P=A.length,L;for(O=0;O<P;O++)switch(A[O].once&&this.removeListener(c,A[O].fn,void 0,!0),C){case 1:A[O].fn.call(A[O].context);break;case 2:A[O].fn.call(A[O].context,h);break;case 3:A[O].fn.call(A[O].context,h,d);break;case 4:A[O].fn.call(A[O].context,h,d,g);break;default:if(!M)for(L=1,M=Array(C-1);L<C;L++)M[L-1]=arguments[L];A[O].fn.apply(A[O].context,M)}}return!0},u.prototype.on=function(c,h,d){return o(this,c,h,d,!1)},u.prototype.once=function(c,h,d){return o(this,c,h,d,!0)},u.prototype.removeListener=function(c,h,d,g){var m=n?n+c:c;if(!this._events[m])return this;if(!h)return l(this,m),this;var b=this._events[m];if(b.fn)b.fn===h&&(!g||b.once)&&(!d||b.context===d)&&l(this,m);else{for(var x=0,A=[],C=b.length;x<C;x++)(b[x].fn!==h||g&&!b[x].once||d&&b[x].context!==d)&&A.push(b[x]);A.length?this._events[m]=A.length===1?A[0]:A:l(this,m)}return this},u.prototype.removeAllListeners=function(c){var h;return c?(h=n?n+c:c,this._events[h]&&l(this,h)):(this._events=new i,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=n,u.EventEmitter=u,typeof t<"u"&&(t.exports=u)}),uV=dt((e,t)=>{t.exports=(r,n)=>(n=n||(()=>{}),r.then(i=>new Promise(s=>{s(n())}).then(()=>i),i=>new Promise(s=>{s(n())}).then(()=>{throw i})))}),cV=dt((e,t)=>{var r=uV();class n extends Error{static{a(this,"T2")}constructor(o){super(o),this.name="TimeoutError"}}var i=a((s,o,l)=>new Promise((u,c)=>{if(typeof o!="number"||o<0)throw TypeError("Expected `milliseconds` to be a positive number");if(o===1/0){u(s);return}let h=setTimeout(()=>{if(typeof l=="function"){try{u(l())}catch(m){c(m)}return}let d=typeof l=="string"?l:`Promise timed out after ${o} milliseconds`,g=l instanceof Error?l:new n(d);typeof s.cancel=="function"&&s.cancel(),c(g)},o);r(s.then(u,c),()=>{clearTimeout(h)})}),"Uw");t.exports=i,t.exports.default=i,t.exports.TimeoutError=n}),dV=dt(e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(r,n,i){let s=0,o=r.length;for(;o>0;){let l=o/2|0,u=s+l;i(r[u],n)<=0?(s=++u,o-=l+1):o=l}return s}a(t,"dC"),e.default=t}),hV=dt(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=dV();class r{static{a(this,"ew")}constructor(){this._queue=[]}enqueue(i,s){s=Object.assign({priority:0},s);let o={priority:s.priority,run:i};if(this.size&&this._queue[this.size-1].priority>=s.priority){this._queue.push(o);return}let l=t.default(this._queue,o,(u,c)=>c.priority-u.priority);this._queue.splice(l,0,o)}dequeue(){let i=this._queue.shift();return i?.run}filter(i){return this._queue.filter(s=>s.priority===i.priority).map(s=>s.run)}get size(){return this._queue.length}}e.default=r}),o4=dt(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=lV(),r=cV(),n=hV(),i=a(()=>{},"L1"),s=new r.TimeoutError;class o extends t{static{a(this,"Kf")}constructor(u){var c,h,d,g;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=i,this._resolveIdle=i,u=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:n.default},u),!(typeof u.intervalCap=="number"&&u.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(h=(c=u.intervalCap)===null||c===void 0?void 0:c.toString())!==null&&h!==void 0?h:""}\` (${typeof u.intervalCap})`);if(u.interval===void 0||!(Number.isFinite(u.interval)&&u.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(g=(d=u.interval)===null||d===void 0?void 0:d.toString())!==null&&g!==void 0?g:""}\` (${typeof u.interval})`);this._carryoverConcurrencyCount=u.carryoverConcurrencyCount,this._isIntervalIgnored=u.intervalCap===1/0||u.interval===0,this._intervalCap=u.intervalCap,this._interval=u.interval,this._queue=new u.queueClass,this._queueClass=u.queueClass,this.concurrency=u.concurrency,this._timeout=u.timeout,this._throwOnTimeout=u.throwOnTimeout===!0,this._isPaused=u.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=i,this._pendingCount===0&&(this._resolveIdle(),this._resolveIdle=i,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){let u=Date.now();if(this._intervalId===void 0){let c=this._intervalEnd-u;if(c<0)this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0;else return this._timeoutId===void 0&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},c)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let u=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let c=this._queue.dequeue();return c?(this.emit("active"),c(),u&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(u){if(!(typeof u=="number"&&u>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${u}\` (${typeof u})`);this._concurrency=u,this._processQueue()}async add(u,c={}){return new Promise((h,d)=>{let g=a(async()=>{this._pendingCount++,this._intervalCount++;try{let m=this._timeout===void 0&&c.timeout===void 0?u():r.default(Promise.resolve(u()),c.timeout===void 0?this._timeout:c.timeout,()=>{(c.throwOnTimeout===void 0?this._throwOnTimeout:c.throwOnTimeout)&&d(s)});h(await m)}catch(m){d(m)}this._next()},"_");this._queue.enqueue(g,c),this._tryToStartAnother(),this.emit("add")})}async addAll(u,c){return Promise.all(u.map(async h=>this.add(h,c)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(u=>{let c=this._resolveEmpty;this._resolveEmpty=()=>{c(),u()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(u=>{let c=this._resolveIdle;this._resolveIdle=()=>{c(),u()}})}get size(){return this._queue.size}sizeBy(u){return this._queue.filter(u).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(u){this._timeout=u}}e.default=o}),_m=dt((e,t)=>{var r=Number.MAX_SAFE_INTEGER||9007199254740991,n=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:r,RELEASE_TYPES:n,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}),xm=dt((e,t)=>{var r=typeof process=="object"&&gi&&gi.NODE_DEBUG&&/\bsemver\b/i.test(gi.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};t.exports=r}),Nh=dt((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=_m(),s=xm();e=t.exports={};var o=e.re=[],l=e.safeRe=[],u=e.src=[],c=e.safeSrc=[],h=e.t={},d=0,g="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",i],[g,n]],b=a(A=>{for(let[C,M]of m)A=A.split(`${C}*`).join(`${C}{0,${M}}`).split(`${C}+`).join(`${C}{1,${M}}`);return A},"YE"),x=a((A,C,M)=>{let O=b(C),P=d++;s(A,P,C),h[A]=P,u[P]=C,c[P]=O,o[P]=new RegExp(C,M?"g":void 0),l[P]=new RegExp(O,M?"g":void 0)},"Y6");x("NUMERICIDENTIFIER","0|[1-9]\\d*"),x("NUMERICIDENTIFIERLOOSE","\\d+"),x("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${g}*`),x("MAINVERSION",`(${u[h.NUMERICIDENTIFIER]})\\.(${u[h.NUMERICIDENTIFIER]})\\.(${u[h.NUMERICIDENTIFIER]})`),x("MAINVERSIONLOOSE",`(${u[h.NUMERICIDENTIFIERLOOSE]})\\.(${u[h.NUMERICIDENTIFIERLOOSE]})\\.(${u[h.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASEIDENTIFIER",`(?:${u[h.NONNUMERICIDENTIFIER]}|${u[h.NUMERICIDENTIFIER]})`),x("PRERELEASEIDENTIFIERLOOSE",`(?:${u[h.NONNUMERICIDENTIFIER]}|${u[h.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASE",`(?:-(${u[h.PRERELEASEIDENTIFIER]}(?:\\.${u[h.PRERELEASEIDENTIFIER]})*))`),x("PRERELEASELOOSE",`(?:-?(${u[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[h.PRERELEASEIDENTIFIERLOOSE]})*))`),x("BUILDIDENTIFIER",`${g}+`),x("BUILD",`(?:\\+(${u[h.BUILDIDENTIFIER]}(?:\\.${u[h.BUILDIDENTIFIER]})*))`),x("FULLPLAIN",`v?${u[h.MAINVERSION]}${u[h.PRERELEASE]}?${u[h.BUILD]}?`),x("FULL",`^${u[h.FULLPLAIN]}$`),x("LOOSEPLAIN",`[v=\\s]*${u[h.MAINVERSIONLOOSE]}${u[h.PRERELEASELOOSE]}?${u[h.BUILD]}?`),x("LOOSE",`^${u[h.LOOSEPLAIN]}$`),x("GTLT","((?:<|>)?=?)"),x("XRANGEIDENTIFIERLOOSE",`${u[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),x("XRANGEIDENTIFIER",`${u[h.NUMERICIDENTIFIER]}|x|X|\\*`),x("XRANGEPLAIN",`[v=\\s]*(${u[h.XRANGEIDENTIFIER]})(?:\\.(${u[h.XRANGEIDENTIFIER]})(?:\\.(${u[h.XRANGEIDENTIFIER]})(?:${u[h.PRERELEASE]})?${u[h.BUILD]}?)?)?`),x("XRANGEPLAINLOOSE",`[v=\\s]*(${u[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[h.XRANGEIDENTIFIERLOOSE]})(?:${u[h.PRERELEASELOOSE]})?${u[h.BUILD]}?)?)?`),x("XRANGE",`^${u[h.GTLT]}\\s*${u[h.XRANGEPLAIN]}$`),x("XRANGELOOSE",`^${u[h.GTLT]}\\s*${u[h.XRANGEPLAINLOOSE]}$`),x("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),x("COERCE",`${u[h.COERCEPLAIN]}(?:$|[^\\d])`),x("COERCEFULL",u[h.COERCEPLAIN]+`(?:${u[h.PRERELEASE]})?(?:${u[h.BUILD]})?(?:$|[^\\d])`),x("COERCERTL",u[h.COERCE],!0),x("COERCERTLFULL",u[h.COERCEFULL],!0),x("LONETILDE","(?:~>?)"),x("TILDETRIM",`(\\s*)${u[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",x("TILDE",`^${u[h.LONETILDE]}${u[h.XRANGEPLAIN]}$`),x("TILDELOOSE",`^${u[h.LONETILDE]}${u[h.XRANGEPLAINLOOSE]}$`),x("LONECARET","(?:\\^)"),x("CARETTRIM",`(\\s*)${u[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",x("CARET",`^${u[h.LONECARET]}${u[h.XRANGEPLAIN]}$`),x("CARETLOOSE",`^${u[h.LONECARET]}${u[h.XRANGEPLAINLOOSE]}$`),x("COMPARATORLOOSE",`^${u[h.GTLT]}\\s*(${u[h.LOOSEPLAIN]})$|^$`),x("COMPARATOR",`^${u[h.GTLT]}\\s*(${u[h.FULLPLAIN]})$|^$`),x("COMPARATORTRIM",`(\\s*)${u[h.GTLT]}\\s*(${u[h.LOOSEPLAIN]}|${u[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",x("HYPHENRANGE",`^\\s*(${u[h.XRANGEPLAIN]})\\s+-\\s+(${u[h.XRANGEPLAIN]})\\s*$`),x("HYPHENRANGELOOSE",`^\\s*(${u[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[h.XRANGEPLAINLOOSE]})\\s*$`),x("STAR","(<|>)?=?\\s*\\*"),x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}),l4=dt((e,t)=>{var r=Object.freeze({loose:!0}),n=Object.freeze({}),i=a(s=>s?typeof s!="object"?r:s:n,"zE");t.exports=i}),ST=dt((e,t)=>{var r=/^[0-9]+$/,n=a((s,o)=>{if(typeof s=="number"&&typeof o=="number")return s===o?0:s<o?-1:1;let l=r.test(s),u=r.test(o);return l&&u&&(s=+s,o=+o),s===o?0:l&&!u?-1:u&&!l?1:s<o?-1:1},"Wf"),i=a((s,o)=>n(o,s),"WE");t.exports={compareIdentifiers:n,rcompareIdentifiers:i}}),ai=dt((e,t)=>{var r=xm(),{MAX_LENGTH:n,MAX_SAFE_INTEGER:i}=_m(),{safeRe:s,t:o}=Nh(),l=l4(),{compareIdentifiers:u}=ST();class c{static{a(this,"E8")}constructor(d,g){if(g=l(g),d instanceof c){if(d.loose===!!g.loose&&d.includePrerelease===!!g.includePrerelease)return d;d=d.version}else if(typeof d!="string")throw TypeError(`Invalid version. Must be a string. Got type "${typeof d}".`);if(d.length>n)throw TypeError(`version is longer than ${n} characters`);r("SemVer",d,g),this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease;let m=d.trim().match(g.loose?s[o.LOOSE]:s[o.FULL]);if(!m)throw TypeError(`Invalid Version: ${d}`);if(this.raw=d,this.major=+m[1],this.minor=+m[2],this.patch=+m[3],this.major>i||this.major<0)throw TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw TypeError("Invalid patch version");m[4]?this.prerelease=m[4].split(".").map(b=>{if(/^[0-9]+$/.test(b)){let x=+b;if(x>=0&&x<i)return x}return b}):this.prerelease=[],this.build=m[5]?m[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(d){if(r("SemVer.compare",this.version,this.options,d),!(d instanceof c)){if(typeof d=="string"&&d===this.version)return 0;d=new c(d,this.options)}return d.version===this.version?0:this.compareMain(d)||this.comparePre(d)}compareMain(d){return d instanceof c||(d=new c(d,this.options)),this.major<d.major?-1:this.major>d.major?1:this.minor<d.minor?-1:this.minor>d.minor?1:this.patch<d.patch?-1:this.patch>d.patch?1:0}comparePre(d){if(d instanceof c||(d=new c(d,this.options)),this.prerelease.length&&!d.prerelease.length)return-1;if(!this.prerelease.length&&d.prerelease.length)return 1;if(!this.prerelease.length&&!d.prerelease.length)return 0;let g=0;do{let m=this.prerelease[g],b=d.prerelease[g];if(r("prerelease compare",g,m,b),m===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(m===void 0)return-1;if(m===b)continue;return u(m,b)}while(++g)}compareBuild(d){d instanceof c||(d=new c(d,this.options));let g=0;do{let m=this.build[g],b=d.build[g];if(r("build compare",g,m,b),m===void 0&&b===void 0)return 0;if(b===void 0)return 1;if(m===void 0)return-1;if(m===b)continue;return u(m,b)}while(++g)}inc(d,g,m){if(d.startsWith("pre")){if(!g&&m===!1)throw Error("invalid increment argument: identifier is empty");if(g){let b=`-${g}`.match(this.options.loose?s[o.PRERELEASELOOSE]:s[o.PRERELEASE]);if(!b||b[1]!==g)throw Error(`invalid identifier: ${g}`)}}switch(d){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",g,m);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",g,m);break;case"prepatch":this.prerelease.length=0,this.inc("patch",g,m),this.inc("pre",g,m);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",g,m),this.inc("pre",g,m);break;case"release":if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let b=Number(m)?1:0;if(this.prerelease.length===0)this.prerelease=[b];else{let x=this.prerelease.length;for(;--x>=0;)typeof this.prerelease[x]=="number"&&(this.prerelease[x]++,x=-2);if(x===-1){if(g===this.prerelease.join(".")&&m===!1)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(b)}}if(g){let x=[g,b];m===!1&&(x=[g]),u(this.prerelease[0],g)===0?isNaN(this.prerelease[1])&&(this.prerelease=x):this.prerelease=x}break}default:throw Error(`invalid increment argument: ${d}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=c}),ec=dt((e,t)=>{var r=ai(),n=a((i,s,o=!1)=>{if(i instanceof r)return i;try{return new r(i,s)}catch(l){if(!o)return null;throw l}},"JE");t.exports=n}),fV=dt((e,t)=>{var r=ec(),n=a((i,s)=>{let o=r(i,s);return o?o.version:null},"wE");t.exports=n}),pV=dt((e,t)=>{var r=ec(),n=a((i,s)=>{let o=r(i.trim().replace(/^[=v]+/,""),s);return o?o.version:null},"ZE");t.exports=n}),mV=dt((e,t)=>{var r=ai(),n=a((i,s,o,l,u)=>{typeof o=="string"&&(u=l,l=o,o=void 0);try{return new r(i instanceof r?i.version:i,o).inc(s,l,u).version}catch{return null}},"XE");t.exports=n}),gV=dt((e,t)=>{var r=ec(),n=a((i,s)=>{let o=r(i,null,!0),l=r(s,null,!0),u=o.compare(l);if(u===0)return null;let c=u>0,h=c?o:l,d=c?l:o,g=!!h.prerelease.length;if(d.prerelease.length&&!g){if(!d.patch&&!d.minor)return"major";if(d.compareMain(h)===0)return d.minor&&!d.patch?"minor":"patch"}let m=g?"pre":"";return o.major!==l.major?m+"major":o.minor!==l.minor?m+"minor":o.patch!==l.patch?m+"patch":"prerelease"},"AE");t.exports=n}),vV=dt((e,t)=>{var r=ai(),n=a((i,s)=>new r(i,s).major,"GE");t.exports=n}),bV=dt((e,t)=>{var r=ai(),n=a((i,s)=>new r(i,s).minor,"SE");t.exports=n}),yV=dt((e,t)=>{var r=ai(),n=a((i,s)=>new r(i,s).patch,"NE");t.exports=n}),wV=dt((e,t)=>{var r=ec(),n=a((i,s)=>{let o=r(i,s);return o&&o.prerelease.length?o.prerelease:null},"EE");t.exports=n}),Ma=dt((e,t)=>{var r=ai(),n=a((i,s,o)=>new r(i,o).compare(new r(s,o)),"hE");t.exports=n}),_V=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(s,i,o),"IE");t.exports=n}),xV=dt((e,t)=>{var r=Ma(),n=a((i,s)=>r(i,s,!0),"LE");t.exports=n}),u4=dt((e,t)=>{var r=ai(),n=a((i,s,o)=>{let l=new r(i,o),u=new r(s,o);return l.compare(u)||l.compareBuild(u)},"gE");t.exports=n}),EV=dt((e,t)=>{var r=u4(),n=a((i,s)=>i.sort((o,l)=>r(o,l,s)),"yE");t.exports=n}),SV=dt((e,t)=>{var r=u4(),n=a((i,s)=>i.sort((o,l)=>r(l,o,s)),"xE");t.exports=n}),Em=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)>0,"cE");t.exports=n}),c4=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)<0,"dE");t.exports=n}),kT=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)===0,"rE");t.exports=n}),AT=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)!==0,"nE");t.exports=n}),d4=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)>=0,"tE");t.exports=n}),h4=dt((e,t)=>{var r=Ma(),n=a((i,s,o)=>r(i,s,o)<=0,"UE");t.exports=n}),TT=dt((e,t)=>{var r=kT(),n=AT(),i=Em(),s=d4(),o=c4(),l=h4(),u=a((c,h,d,g)=>{switch(h){case"===":return typeof c=="object"&&(c=c.version),typeof d=="object"&&(d=d.version),c===d;case"!==":return typeof c=="object"&&(c=c.version),typeof d=="object"&&(d=d.version),c!==d;case"":case"=":case"==":return r(c,d,g);case"!=":return n(c,d,g);case">":return i(c,d,g);case">=":return s(c,d,g);case"<":return o(c,d,g);case"<=":return l(c,d,g);default:throw TypeError(`Invalid operator: ${h}`)}},"qh");t.exports=u}),kV=dt((e,t)=>{var r=ai(),n=ec(),{safeRe:i,t:s}=Nh(),o=a((l,u)=>{if(l instanceof r)return l;if(typeof l=="number"&&(l=String(l)),typeof l!="string")return null;u=u||{};let c=null;if(!u.rtl)c=l.match(u.includePrerelease?i[s.COERCEFULL]:i[s.COERCE]);else{let x=u.includePrerelease?i[s.COERCERTLFULL]:i[s.COERCERTL],A;for(;(A=x.exec(l))&&(!c||c.index+c[0].length!==l.length);)(!c||A.index+A[0].length!==c.index+c[0].length)&&(c=A),x.lastIndex=A.index+A[1].length+A[2].length;x.lastIndex=-1}if(c===null)return null;let h=c[2],d=c[3]||"0",g=c[4]||"0",m=u.includePrerelease&&c[5]?`-${c[5]}`:"",b=u.includePrerelease&&c[6]?`+${c[6]}`:"";return n(`${h}.${d}.${g}${m}${b}`,u)},"Ph");t.exports=o}),AV=dt((e,t)=>{class r{static{a(this,"KZ")}constructor(){this.max=1e3,this.map=new Map}get(i){let s=this.map.get(i);if(s!==void 0)return this.map.delete(i),this.map.set(i,s),s}delete(i){return this.map.delete(i)}set(i,s){if(!this.delete(i)&&s!==void 0){if(this.map.size>=this.max){let o=this.map.keys().next().value;this.delete(o)}this.map.set(i,s)}return this}}t.exports=r}),Oa=dt((e,t)=>{var r=/\s+/g;class n{static{a(this,"ZP")}constructor(T,N){if(N=o(N),T instanceof n)return T.loose===!!N.loose&&T.includePrerelease===!!N.includePrerelease?T:new n(T.raw,N);if(T instanceof l)return this.raw=T.value,this.set=[[T]],this.formatted=void 0,this;if(this.options=N,this.loose=!!N.loose,this.includePrerelease=!!N.includePrerelease,this.raw=T.trim().replace(r," "),this.set=this.raw.split("||").map(k=>this.parseRange(k.trim())).filter(k=>k.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let k=this.set[0];if(this.set=this.set.filter(p=>!C(p[0])),this.set.length===0)this.set=[k];else if(this.set.length>1){for(let p of this.set)if(p.length===1&&M(p[0])){this.set=[p];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let T=0;T<this.set.length;T++){T>0&&(this.formatted+="||");let N=this.set[T];for(let k=0;k<N.length;k++)k>0&&(this.formatted+=" "),this.formatted+=N[k].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(T){let N=((this.options.includePrerelease&&x)|(this.options.loose&&A))+":"+T,k=s.get(N);if(k)return k;let p=this.options.loose,E=p?h[d.HYPHENRANGELOOSE]:h[d.HYPHENRANGE];T=T.replace(E,v(this.options.includePrerelease)),u("hyphen replace",T),T=T.replace(h[d.COMPARATORTRIM],g),u("comparator trim",T),T=T.replace(h[d.TILDETRIM],m),u("tilde trim",T),T=T.replace(h[d.CARETTRIM],b),u("caret trim",T);let I=T.split(" ").map(V=>P(V,this.options)).join(" ").split(/\s+/).map(V=>w(V,this.options));p&&(I=I.filter(V=>(u("loose invalid filter",V,this.options),!!V.match(h[d.COMPARATORLOOSE])))),u("range list",I);let R=new Map,z=I.map(V=>new l(V,this.options));for(let V of z){if(C(V))return[V];R.set(V.value,V)}R.size>1&&R.has("")&&R.delete("");let B=[...R.values()];return s.set(N,B),B}intersects(T,N){if(!(T instanceof n))throw TypeError("a Range is required");return this.set.some(k=>O(k,N)&&T.set.some(p=>O(p,N)&&k.every(E=>p.every(I=>E.intersects(I,N)))))}test(T){if(!T)return!1;if(typeof T=="string")try{T=new c(T,this.options)}catch{return!1}for(let N=0;N<this.set.length;N++)if(_(this.set[N],T,this.options))return!0;return!1}}t.exports=n;var i=AV(),s=new i,o=l4(),l=Sm(),u=xm(),c=ai(),{safeRe:h,t:d,comparatorTrimReplace:g,tildeTrimReplace:m,caretTrimReplace:b}=Nh(),{FLAG_INCLUDE_PRERELEASE:x,FLAG_LOOSE:A}=_m(),C=a(S=>S.value==="<0.0.0-0","YZ"),M=a(S=>S.value==="","wh"),O=a((S,T)=>{let N=!0,k=S.slice(),p=k.pop();for(;N&&k.length;)N=k.every(E=>p.intersects(E,T)),p=k.pop();return N},"jZ"),P=a((S,T)=>(S=S.replace(h[d.BUILD],""),u("comp",S,T),S=Y(S,T),u("caret",S),S=U(S,T),u("tildes",S),S=F(S,T),u("xrange",S),S=f(S,T),u("stars",S),S),"fh"),L=a(S=>!S||S.toLowerCase()==="x"||S==="*","bq"),U=a((S,T)=>S.trim().split(/\s+/).map(N=>Z(N,T)).join(" "),"Zh"),Z=a((S,T)=>{let N=T.loose?h[d.TILDELOOSE]:h[d.TILDE];return S.replace(N,(k,p,E,I,R)=>{u("tilde",S,k,p,E,I,R);let z;return L(p)?z="":L(E)?z=`>=${p}.0.0 <${+p+1}.0.0-0`:L(I)?z=`>=${p}.${E}.0 <${p}.${+E+1}.0-0`:R?(u("replaceTilde pr",R),z=`>=${p}.${E}.${I}-${R} <${p}.${+E+1}.0-0`):z=`>=${p}.${E}.${I} <${p}.${+E+1}.0-0`,u("tilde return",z),z})},"Xh"),Y=a((S,T)=>S.trim().split(/\s+/).map(N=>re(N,T)).join(" "),"Ah"),re=a((S,T)=>{u("caret",S,T);let N=T.loose?h[d.CARETLOOSE]:h[d.CARET],k=T.includePrerelease?"-0":"";return S.replace(N,(p,E,I,R,z)=>{u("caret",S,p,E,I,R,z);let B;return L(E)?B="":L(I)?B=`>=${E}.0.0${k} <${+E+1}.0.0-0`:L(R)?E==="0"?B=`>=${E}.${I}.0${k} <${E}.${+I+1}.0-0`:B=`>=${E}.${I}.0${k} <${+E+1}.0.0-0`:z?(u("replaceCaret pr",z),E==="0"?I==="0"?B=`>=${E}.${I}.${R}-${z} <${E}.${I}.${+R+1}-0`:B=`>=${E}.${I}.${R}-${z} <${E}.${+I+1}.0-0`:B=`>=${E}.${I}.${R}-${z} <${+E+1}.0.0-0`):(u("no pr"),E==="0"?I==="0"?B=`>=${E}.${I}.${R}${k} <${E}.${I}.${+R+1}-0`:B=`>=${E}.${I}.${R}${k} <${E}.${+I+1}.0-0`:B=`>=${E}.${I}.${R} <${+E+1}.0.0-0`),u("caret return",B),B})},"kh"),F=a((S,T)=>(u("replaceXRanges",S,T),S.split(/\s+/).map(N=>$(N,T)).join(" ")),"Gh"),$=a((S,T)=>{S=S.trim();let N=T.loose?h[d.XRANGELOOSE]:h[d.XRANGE];return S.replace(N,(k,p,E,I,R,z)=>{u("xRange",S,k,p,E,I,R,z);let B=L(E),V=B||L(I),W=V||L(R),oe=W;return p==="="&&oe&&(p=""),z=T.includePrerelease?"-0":"",B?p===">"||p==="<"?k="<0.0.0-0":k="*":p&&oe?(V&&(I=0),R=0,p===">"?(p=">=",V?(E=+E+1,I=0,R=0):(I=+I+1,R=0)):p==="<="&&(p="<",V?E=+E+1:I=+I+1),p==="<"&&(z="-0"),k=`${p+E}.${I}.${R}${z}`):V?k=`>=${E}.0.0${z} <${+E+1}.0.0-0`:W&&(k=`>=${E}.${I}.0${z} <${E}.${+I+1}.0-0`),u("xRange return",k),k})},"Vh"),f=a((S,T)=>(u("replaceStars",S,T),S.trim().replace(h[d.STAR],"")),"Sh"),w=a((S,T)=>(u("replaceGTE0",S,T),S.trim().replace(h[T.includePrerelease?d.GTE0PRE:d.GTE0],"")),"Mh"),v=a(S=>(T,N,k,p,E,I,R,z,B,V,W,oe)=>(L(k)?N="":L(p)?N=`>=${k}.0.0${S?"-0":""}`:L(E)?N=`>=${k}.${p}.0${S?"-0":""}`:I?N=`>=${N}`:N=`>=${N}${S?"-0":""}`,L(B)?z="":L(V)?z=`<${+B+1}.0.0-0`:L(W)?z=`<${B}.${+V+1}.0-0`:oe?z=`<=${B}.${V}.${W}-${oe}`:S?z=`<${B}.${V}.${+W+1}-0`:z=`<=${z}`,`${N} ${z}`.trim()),"Nh"),_=a((S,T,N)=>{for(let k=0;k<S.length;k++)if(!S[k].test(T))return!1;if(T.prerelease.length&&!N.includePrerelease){for(let k=0;k<S.length;k++)if(u(S[k].semver),S[k].semver!==l.ANY&&S[k].semver.prerelease.length>0){let p=S[k].semver;if(p.major===T.major&&p.minor===T.minor&&p.patch===T.patch)return!0}return!1}return!0},"Ch")}),Sm=dt((e,t)=>{var r=Symbol("SemVer ANY");class n{static{a(this,"t1")}static get ANY(){return r}constructor(g,m){if(m=i(m),g instanceof n){if(g.loose===!!m.loose)return g;g=g.value}g=g.trim().split(/\s+/).join(" "),u("comparator",g,m),this.options=m,this.loose=!!m.loose,this.parse(g),this.semver===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(g){let m=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR],b=g.match(m);if(!b)throw TypeError(`Invalid comparator: ${g}`);this.operator=b[1]!==void 0?b[1]:"",this.operator==="="&&(this.operator=""),b[2]?this.semver=new c(b[2],this.options.loose):this.semver=r}toString(){return this.value}test(g){if(u("Comparator.test",g,this.options.loose),this.semver===r||g===r)return!0;if(typeof g=="string")try{g=new c(g,this.options)}catch{return!1}return l(g,this.operator,this.semver,this.options)}intersects(g,m){if(!(g instanceof n))throw TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new h(g.value,m).test(this.value):g.operator===""?g.value===""?!0:new h(this.value,m).test(g.semver):(m=i(m),m.includePrerelease&&(this.value==="<0.0.0-0"||g.value==="<0.0.0-0")||!m.includePrerelease&&(this.value.startsWith("<0.0.0")||g.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&g.operator.startsWith(">")||this.operator.startsWith("<")&&g.operator.startsWith("<")||this.semver.version===g.semver.version&&this.operator.includes("=")&&g.operator.includes("=")||l(this.semver,"<",g.semver,m)&&this.operator.startsWith(">")&&g.operator.startsWith("<")||l(this.semver,">",g.semver,m)&&this.operator.startsWith("<")&&g.operator.startsWith(">")))}}t.exports=n;var i=l4(),{safeRe:s,t:o}=Nh(),l=TT(),u=xm(),c=ai(),h=Oa()}),km=dt((e,t)=>{var r=Oa(),n=a((i,s,o)=>{try{s=new r(s,o)}catch{return!1}return s.test(i)},"hh");t.exports=n}),TV=dt((e,t)=>{var r=Oa(),n=a((i,s)=>new r(i,s).set.map(o=>o.map(l=>l.value).join(" ").trim().split(" ")),"Ih");t.exports=n}),NV=dt((e,t)=>{var r=ai(),n=Oa(),i=a((s,o,l)=>{let u=null,c=null,h=null;try{h=new n(o,l)}catch{return null}return s.forEach(d=>{h.test(d)&&(!u||c.compare(d)===-1)&&(u=d,c=new r(u,l))}),u},"gh");t.exports=i}),CV=dt((e,t)=>{var r=ai(),n=Oa(),i=a((s,o,l)=>{let u=null,c=null,h=null;try{h=new n(o,l)}catch{return null}return s.forEach(d=>{h.test(d)&&(!u||c.compare(d)===1)&&(u=d,c=new r(u,l))}),u},"uh");t.exports=i}),IV=dt((e,t)=>{var r=ai(),n=Oa(),i=Em(),s=a((o,l)=>{o=new n(o,l);let u=new r("0.0.0");if(o.test(u)||(u=new r("0.0.0-0"),o.test(u)))return u;u=null;for(let c=0;c<o.set.length;++c){let h=o.set[c],d=null;h.forEach(g=>{let m=new r(g.semver.version);switch(g.operator){case">":m.prerelease.length===0?m.patch++:m.prerelease.push(0),m.raw=m.format();case"":case">=":(!d||i(m,d))&&(d=m);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${g.operator}`)}}),d&&(!u||i(u,d))&&(u=d)}return u&&o.test(u)?u:null},"ph");t.exports=s}),MV=dt((e,t)=>{var r=Oa(),n=a((i,s)=>{try{return new r(i,s).range||"*"}catch{return null}},"mh");t.exports=n}),f4=dt((e,t)=>{var r=ai(),n=Sm(),{ANY:i}=n,s=Oa(),o=km(),l=Em(),u=c4(),c=h4(),h=d4(),d=a((g,m,b,x)=>{g=new r(g,x),m=new s(m,x);let A,C,M,O,P;switch(b){case">":A=l,C=c,M=u,O=">",P=">=";break;case"<":A=u,C=h,M=l,O="<",P="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(o(g,m,x))return!1;for(let L=0;L<m.set.length;++L){let U=m.set[L],Z=null,Y=null;if(U.forEach(re=>{re.semver===i&&(re=new n(">=0.0.0")),Z=Z||re,Y=Y||re,A(re.semver,Z.semver,x)?Z=re:M(re.semver,Y.semver,x)&&(Y=re)}),Z.operator===O||Z.operator===P||(!Y.operator||Y.operator===O)&&C(g,Y.semver))return!1;if(Y.operator===P&&M(g,Y.semver))return!1}return!0},"th");t.exports=d}),OV=dt((e,t)=>{var r=f4(),n=a((i,s,o)=>r(i,s,">",o),"Uh");t.exports=n}),RV=dt((e,t)=>{var r=f4(),n=a((i,s,o)=>r(i,s,"<",o),"ah");t.exports=n}),PV=dt((e,t)=>{var r=Oa(),n=a((i,s,o)=>(i=new r(i,o),s=new r(s,o),i.intersects(s,o)),"Qh");t.exports=n}),LV=dt((e,t)=>{var r=km(),n=Ma();t.exports=(i,s,o)=>{let l=[],u=null,c=null,h=i.sort((b,x)=>n(b,x,o));for(let b of h)r(b,s,o)?(c=b,!u&&(u=b)):(c&&l.push([u,c]),c=null,u=null);u&&l.push([u,null]);let d=[];for(let[b,x]of l)b===x?d.push(b):!x&&b===h[0]?d.push("*"):x?b===h[0]?d.push(`<=${x}`):d.push(`${b} - ${x}`):d.push(`>=${b}`);let g=d.join(" || "),m=typeof s.raw=="string"?s.raw:String(s);return g.length<m.length?g:s}}),DV=dt((e,t)=>{var r=Oa(),n=Sm(),{ANY:i}=n,s=km(),o=Ma(),l=a((m,b,x={})=>{if(m===b)return!0;m=new r(m,x),b=new r(b,x);let A=!1;e:for(let C of m.set){for(let M of b.set){let O=h(C,M,x);if(A=A||O!==null,O)continue e}if(A)return!1}return!0},"$R"),u=[new n(">=0.0.0-0")],c=[new n(">=0.0.0")],h=a((m,b,x)=>{if(m===b)return!0;if(m.length===1&&m[0].semver===i){if(b.length===1&&b[0].semver===i)return!0;x.includePrerelease?m=u:m=c}if(b.length===1&&b[0].semver===i){if(x.includePrerelease)return!0;b=c}let A=new Set,C,M;for(let F of m)F.operator===">"||F.operator===">="?C=d(C,F,x):F.operator==="<"||F.operator==="<="?M=g(M,F,x):A.add(F.semver);if(A.size>1)return null;let O;if(C&&M){if(O=o(C.semver,M.semver,x),O>0)return null;if(O===0&&(C.operator!==">="||M.operator!=="<="))return null}for(let F of A){if(C&&!s(F,String(C),x)||M&&!s(F,String(M),x))return null;for(let $ of b)if(!s(F,String($),x))return!1;return!0}let P,L,U,Z,Y=M&&!x.includePrerelease&&M.semver.prerelease.length?M.semver:!1,re=C&&!x.includePrerelease&&C.semver.prerelease.length?C.semver:!1;Y&&Y.prerelease.length===1&&M.operator==="<"&&Y.prerelease[0]===0&&(Y=!1);for(let F of b){if(Z=Z||F.operator===">"||F.operator===">=",U=U||F.operator==="<"||F.operator==="<=",C){if(re&&F.semver.prerelease&&F.semver.prerelease.length&&F.semver.major===re.major&&F.semver.minor===re.minor&&F.semver.patch===re.patch&&(re=!1),F.operator===">"||F.operator===">="){if(P=d(C,F,x),P===F&&P!==C)return!1}else if(C.operator===">="&&!s(C.semver,String(F),x))return!1}if(M){if(Y&&F.semver.prerelease&&F.semver.prerelease.length&&F.semver.major===Y.major&&F.semver.minor===Y.minor&&F.semver.patch===Y.patch&&(Y=!1),F.operator==="<"||F.operator==="<="){if(L=g(M,F,x),L===F&&L!==M)return!1}else if(M.operator==="<="&&!s(M.semver,String(F),x))return!1}if(!F.operator&&(M||C)&&O!==0)return!1}return!(C&&U&&!M&&O!==0||M&&Z&&!C&&O!==0||re||Y)},"KR"),d=a((m,b,x)=>{if(!m)return b;let A=o(m.semver,b.semver,x);return A>0?m:A<0||b.operator===">"&&m.operator===">="?b:m},"rZ"),g=a((m,b,x)=>{if(!m)return b;let A=o(m.semver,b.semver,x);return A<0?m:A>0||b.operator==="<"&&m.operator==="<="?b:m},"oZ");t.exports=l}),jV=dt((e,t)=>{var r=Nh(),n=_m(),i=ai(),s=ST(),o=ec(),l=fV(),u=pV(),c=mV(),h=gV(),d=vV(),g=bV(),m=yV(),b=wV(),x=Ma(),A=_V(),C=xV(),M=u4(),O=EV(),P=SV(),L=Em(),U=c4(),Z=kT(),Y=AT(),re=d4(),F=h4(),$=TT(),f=kV(),w=Sm(),v=Oa(),_=km(),S=TV(),T=NV(),N=CV(),k=IV(),p=MV(),E=f4(),I=OV(),R=RV(),z=PV(),B=LV(),V=DV();t.exports={parse:o,valid:l,clean:u,inc:c,diff:h,major:d,minor:g,patch:m,prerelease:b,compare:x,rcompare:A,compareLoose:C,compareBuild:M,sort:O,rsort:P,gt:L,lt:U,eq:Z,neq:Y,gte:re,lte:F,cmp:$,coerce:f,Comparator:w,Range:v,satisfies:_,toComparators:S,maxSatisfying:T,minSatisfying:N,minVersion:k,validRange:p,outside:E,gtr:I,ltr:R,intersects:z,simplifyRange:B,subset:V,SemVer:i,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,RELEASE_TYPES:n.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}}),BV=dt((e,t)=>{var r=a((s=0)=>o=>`\x1B[${38+s};5;${o}m`,"JX"),n=a((s=0)=>(o,l,u)=>`\x1B[${38+s};2;${o};${l};${u}m`,"TX");function i(){let s=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(let[l,u]of Object.entries(o)){for(let[c,h]of Object.entries(u))o[c]={open:`\x1B[${h[0]}m`,close:`\x1B[${h[1]}m`},u[c]=o[c],s.set(h[0],h[1]);Object.defineProperty(o,l,{value:u,enumerable:!1})}return Object.defineProperty(o,"codes",{value:s,enumerable:!1}),o.color.close="\x1B[39m",o.bgColor.close="\x1B[49m",o.color.ansi256=r(),o.color.ansi16m=n(),o.bgColor.ansi256=r(10),o.bgColor.ansi16m=n(10),Object.defineProperties(o,{rgbToAnsi256:{value:a((l,u,c)=>l===u&&u===c?l<8?16:l>248?231:Math.round((l-8)/247*24)+232:16+36*Math.round(l/255*5)+6*Math.round(u/255*5)+Math.round(c/255*5),"value"),enumerable:!1},hexToRgb:{value:a(l=>{let u=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(l.toString(16));if(!u)return[0,0,0];let{colorString:c}=u.groups;c.length===3&&(c=c.split("").map(d=>d+d).join(""));let h=Number.parseInt(c,16);return[h>>16&255,h>>8&255,h&255]},"value"),enumerable:!1},hexToAnsi256:{value:a(l=>o.rgbToAnsi256(...o.hexToRgb(l)),"value"),enumerable:!1}}),o}a(i,"vI"),Object.defineProperty(t,"exports",{enumerable:!0,get:i})}),zV=dt(e=>{e.byteLength=u,e.toByteArray=h,e.fromByteArray=m;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(s=0,o=i.length;s<o;++s)t[s]=i[s],r[i.charCodeAt(s)]=s;var s,o;r[45]=62,r[95]=63;function l(b){var x=b.length;if(x%4>0)throw Error("Invalid string. Length must be a multiple of 4");var A=b.indexOf("=");A===-1&&(A=x);var C=A===x?0:4-A%4;return[A,C]}a(l,"UA");function u(b){var x=l(b),A=x[0],C=x[1];return(A+C)*3/4-C}a(u,"wy");function c(b,x,A){return(x+A)*3/4-A}a(c,"fy");function h(b){var x,A=l(b),C=A[0],M=A[1],O=new n(c(b,C,M)),P=0,L=M>0?C-4:C,U;for(U=0;U<L;U+=4)x=r[b.charCodeAt(U)]<<18|r[b.charCodeAt(U+1)]<<12|r[b.charCodeAt(U+2)]<<6|r[b.charCodeAt(U+3)],O[P++]=x>>16&255,O[P++]=x>>8&255,O[P++]=x&255;return M===2&&(x=r[b.charCodeAt(U)]<<2|r[b.charCodeAt(U+1)]>>4,O[P++]=x&255),M===1&&(x=r[b.charCodeAt(U)]<<10|r[b.charCodeAt(U+1)]<<4|r[b.charCodeAt(U+2)]>>2,O[P++]=x>>8&255,O[P++]=x&255),O}a(h,"Zy");function d(b){return t[b>>18&63]+t[b>>12&63]+t[b>>6&63]+t[b&63]}a(d,"Xy");function g(b,x,A){for(var C,M=[],O=x;O<A;O+=3)C=(b[O]<<16&16711680)+(b[O+1]<<8&65280)+(b[O+2]&255),M.push(d(C));return M.join("")}a(g,"Ay");function m(b){for(var x,A=b.length,C=A%3,M=[],O=16383,P=0,L=A-C;P<L;P+=O)M.push(g(b,P,P+O>L?L:P+O));return C===1?(x=b[A-1],M.push(t[x>>2]+t[x<<4&63]+"==")):C===2&&(x=(b[A-2]<<8)+b[A-1],M.push(t[x>>10]+t[x>>4&63]+t[x<<2&63]+"=")),M.join("")}a(m,"ky")}),Si=dt(e=>{e.__esModule=!0,e.extend=s,e.indexOf=c,e.escapeExpression=h,e.isEmpty=d,e.createFrame=g,e.blockParams=m,e.appendContextPath=b;var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,n=/[&<>"'`=]/;function i(x){return t[x]}a(i,"xy");function s(x){for(var A=1;A<arguments.length;A++)for(var C in arguments[A])Object.prototype.hasOwnProperty.call(arguments[A],C)&&(x[C]=arguments[A][C]);return x}a(s,"eA");var o=Object.prototype.toString;e.toString=o;var l=a(function(x){return typeof x=="function"},"uz");l(/x/)&&(e.isFunction=l=a(function(x){return typeof x=="function"&&o.call(x)==="[object Function]"},"uz")),e.isFunction=l;var u=Array.isArray||function(x){return x&&typeof x=="object"?o.call(x)==="[object Array]":!1};e.isArray=u;function c(x,A){for(var C=0,M=x.length;C<M;C++)if(x[C]===A)return C;return-1}a(c,"py");function h(x){if(typeof x!="string"){if(x&&x.toHTML)return x.toHTML();if(x==null)return"";if(!x)return x+"";x=""+x}return n.test(x)?x.replace(r,i):x}a(h,"cy");function d(x){return!x&&x!==0?!0:!!(u(x)&&x.length===0)}a(d,"my");function g(x){var A=s({},x);return A._parent=x,A}a(g,"dy");function m(x,A){return x.path=A,x}a(m,"ly");function b(x,A){return(x?x+".":"")+A}a(b,"ry")}),Ra=dt((e,t)=>{e.__esModule=!0;var r=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function n(i,s){var o=s&&s.loc,l=void 0,u=void 0,c=void 0,h=void 0;o&&(l=o.start.line,u=o.end.line,c=o.start.column,h=o.end.column,i+=" - "+l+":"+c);for(var d=Error.prototype.constructor.call(this,i),g=0;g<r.length;g++)this[r[g]]=d[r[g]];Error.captureStackTrace&&Error.captureStackTrace(this,n);try{o&&(this.lineNumber=l,this.endLineNumber=u,Object.defineProperty?(Object.defineProperty(this,"column",{value:c,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:h,enumerable:!0})):(this.column=c,this.endColumn=h))}catch{}}a(n,"cz"),n.prototype=Error(),e.default=n,t.exports=e.default}),UV=dt((e,t)=>{e.__esModule=!0;var r=Si();e.default=function(n){n.registerHelper("blockHelperMissing",function(i,s){var{inverse:o,fn:l}=s;if(i===!0)return l(this);if(i===!1||i==null)return o(this);if(r.isArray(i))return i.length>0?(s.ids&&(s.ids=[s.name]),n.helpers.each(i,s)):o(this);if(s.data&&s.ids){var u=r.createFrame(s.data);u.contextPath=r.appendContextPath(s.data.contextPath,s.name),s={data:u}}return l(i,s)})},t.exports=e.default}),FV=dt((e,t)=>{e.__esModule=!0;function r(o){return o&&o.__esModule?o:{default:o}}a(r,"Ou");var n=Si(),i=Ra(),s=r(i);e.default=function(o){o.registerHelper("each",function(l,u){if(!u)throw new s.default("Must pass iterator to #each");var{fn:c,inverse:h}=u,d=0,g="",m=void 0,b=void 0;u.data&&u.ids&&(b=n.appendContextPath(u.data.contextPath,u.ids[0])+"."),n.isFunction(l)&&(l=l.call(this)),u.data&&(m=n.createFrame(u.data));function x(P,L,U){m&&(m.key=P,m.index=L,m.first=L===0,m.last=!!U,b&&(m.contextPath=b+P)),g=g+c(l[P],{data:m,blockParams:n.blockParams([l[P],P],[b+P,null])})}if(a(x,"T"),l&&typeof l=="object")if(n.isArray(l))for(var A=l.length;d<A;d++)d in l&&x(d,d,d===l.length-1);else if(typeof Symbol=="function"&&l[Symbol.iterator]){for(var C=[],M=l[Symbol.iterator](),O=M.next();!O.done;O=M.next())C.push(O.value);l=C;for(var A=l.length;d<A;d++)x(d,d,d===l.length-1)}else(function(){var P=void 0;Object.keys(l).forEach(function(L){P!==void 0&&x(P,d-1),P=L,d++}),P!==void 0&&x(P,d-1,!0)})();return d===0&&(g=h(this)),g})},t.exports=e.default}),HV=dt((e,t)=>{e.__esModule=!0;function r(s){return s&&s.__esModule?s:{default:s}}a(r,"Wu");var n=Ra(),i=r(n);e.default=function(s){s.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new i.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e.default}),GV=dt((e,t)=>{e.__esModule=!0;function r(o){return o&&o.__esModule?o:{default:o}}a(r,"fu");var n=Si(),i=Ra(),s=r(i);e.default=function(o){o.registerHelper("if",function(l,u){if(arguments.length!=2)throw new s.default("#if requires exactly one argument");return n.isFunction(l)&&(l=l.call(this)),!u.hash.includeZero&&!l||n.isEmpty(l)?u.inverse(this):u.fn(this)}),o.registerHelper("unless",function(l,u){if(arguments.length!=2)throw new s.default("#unless requires exactly one argument");return o.helpers.if.call(this,l,{fn:u.inverse,inverse:u.fn,hash:u.hash})})},t.exports=e.default}),VV=dt((e,t)=>{e.__esModule=!0,e.default=function(r){r.registerHelper("log",function(){for(var n=[void 0],i=arguments[arguments.length-1],s=0;s<arguments.length-1;s++)n.push(arguments[s]);var o=1;i.hash.level!=null?o=i.hash.level:i.data&&i.data.level!=null&&(o=i.data.level),n[0]=o,r.log.apply(r,n)})},t.exports=e.default}),YV=dt((e,t)=>{e.__esModule=!0,e.default=function(r){r.registerHelper("lookup",function(n,i,s){return n&&s.lookupProperty(n,i)})},t.exports=e.default}),ZV=dt((e,t)=>{e.__esModule=!0;function r(o){return o&&o.__esModule?o:{default:o}}a(r,"Mu");var n=Si(),i=Ra(),s=r(i);e.default=function(o){o.registerHelper("with",function(l,u){if(arguments.length!=2)throw new s.default("#with requires exactly one argument");n.isFunction(l)&&(l=l.call(this));var c=u.fn;if(n.isEmpty(l))return u.inverse(this);var h=u.data;return u.data&&u.ids&&(h=n.createFrame(u.data),h.contextPath=n.appendContextPath(u.data.contextPath,u.ids[0])),c(l,{data:h,blockParams:n.blockParams([l],[h&&h.contextPath])})})},t.exports=e.default}),NT=dt(e=>{e.__esModule=!0,e.registerDefaultHelpers=A,e.moveHelperToHooks=C;function t(M){return M&&M.__esModule?M:{default:M}}a(t,"E_");var r=UV(),n=t(r),i=FV(),s=t(i),o=HV(),l=t(o),u=GV(),c=t(u),h=VV(),d=t(h),g=YV(),m=t(g),b=ZV(),x=t(b);function A(M){n.default(M),s.default(M),l.default(M),c.default(M),d.default(M),m.default(M),x.default(M)}a(A,"ru");function C(M,O,P){M.helpers[O]&&(M.hooks[O]=M.helpers[O],!P&&delete M.helpers[O])}a(C,"ou")}),$V=dt((e,t)=>{e.__esModule=!0;var r=Si();e.default=function(n){n.registerDecorator("inline",function(i,s,o,l){var u=i;return s.partials||(s.partials={},u=a(function(c,h){var d=o.partials;o.partials=r.extend({},d,s.partials);var g=i(c,h);return o.partials=d,g},"Y")),s.partials[l.args[0]]=l.fn,u})},t.exports=e.default}),JV=dt(e=>{e.__esModule=!0,e.registerDefaultDecorators=i;function t(s){return s&&s.__esModule?s:{default:s}}a(t,"Qu");var r=$V(),n=t(r);function i(s){n.default(s)}a(i,"$x")}),CT=dt((e,t)=>{e.__esModule=!0;var r=Si(),n={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:a(function(i){if(typeof i=="string"){var s=r.indexOf(n.methodMap,i.toLowerCase());s>=0?i=s:i=parseInt(i,10)}return i},"lookupLevel"),log:a(function(i){if(i=n.lookupLevel(i),typeof console<"u"&&n.lookupLevel(n.level)<=i){var s=n.methodMap[i];console[s]||(s="log");for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u<o;u++)l[u-1]=arguments[u];console[s].apply(console,l)}},"log")};e.default=n,t.exports=e.default}),XV=dt(e=>{e.__esModule=!0,e.createNewLookupObject=r;var t=Si();function r(){for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return t.extend.apply(void 0,[Object.create(null)].concat(i))}a(r,"vx")}),IT=dt(e=>{e.__esModule=!0,e.createProtoAccessControl=o,e.resultIsAllowed=l,e.resetLoggedProperties=h;function t(d){return d&&d.__esModule?d:{default:d}}a(t,"Jx");var r=XV(),n=CT(),i=t(n),s=Object.create(null);function o(d){var g=Object.create(null);g.constructor=!1,g.__defineGetter__=!1,g.__defineSetter__=!1,g.__lookupGetter__=!1;var m=Object.create(null);return m.__proto__=!1,{properties:{whitelist:r.createNewLookupObject(m,d.allowedProtoProperties),defaultValue:d.allowProtoPropertiesByDefault},methods:{whitelist:r.createNewLookupObject(g,d.allowedProtoMethods),defaultValue:d.allowProtoMethodsByDefault}}}a(o,"fx");function l(d,g,m){return u(typeof d=="function"?g.methods:g.properties,m)}a(l,"Zx");function u(d,g){return d.whitelist[g]!==void 0?d.whitelist[g]===!0:d.defaultValue!==void 0?d.defaultValue:(c(g),!1)}a(u,"bk");function c(d){s[d]!==!0&&(s[d]=!0,i.default.log("error",'Handlebars: Access has been denied to resolve the property "'+d+`" because it is not an "own property" of its parent.
|
|
3
3
|
You can add a runtime option to disable the check or this warning:
|
|
4
4
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}a(c,"Xx");function h(){Object.keys(s).forEach(function(d){delete s[d]})}a(h,"Ax")}),p4=dt(e=>{e.__esModule=!0,e.HandlebarsEnvironment=x;function t(C){return C&&C.__esModule?C:{default:C}}a(t,"yk");var r=Si(),n=Ra(),i=t(n),s=NT(),o=JV(),l=CT(),u=t(l),c=IT(),h="4.7.8";e.VERSION=h;var d=8;e.COMPILER_REVISION=d;var g=7;e.LAST_COMPATIBLE_COMPILER_REVISION=g;var m={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};e.REVISION_CHANGES=m;var b="[object Object]";function x(C,M,O){this.helpers=C||{},this.partials=M||{},this.decorators=O||{},s.registerDefaultHelpers(this),o.registerDefaultDecorators(this)}a(x,"iz"),x.prototype={constructor:x,logger:u.default,log:u.default.log,registerHelper:a(function(C,M){if(r.toString.call(C)===b){if(M)throw new i.default("Arg not supported with multiple helpers");r.extend(this.helpers,C)}else this.helpers[C]=M},"registerHelper"),unregisterHelper:a(function(C){delete this.helpers[C]},"unregisterHelper"),registerPartial:a(function(C,M){if(r.toString.call(C)===b)r.extend(this.partials,C);else{if(typeof M>"u")throw new i.default('Attempting to register a partial called "'+C+'" as undefined');this.partials[C]=M}},"registerPartial"),unregisterPartial:a(function(C){delete this.partials[C]},"unregisterPartial"),registerDecorator:a(function(C,M){if(r.toString.call(C)===b){if(M)throw new i.default("Arg not supported with multiple decorators");r.extend(this.decorators,C)}else this.decorators[C]=M},"registerDecorator"),unregisterDecorator:a(function(C){delete this.decorators[C]},"unregisterDecorator"),resetLoggedPropertyAccesses:a(function(){c.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var A=u.default.log;e.log=A,e.createFrame=r.createFrame,e.logger=u.default}),QV=dt((e,t)=>{e.__esModule=!0;function r(n){this.string=n}a(r,"tz"),r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},e.default=r,t.exports=e.default}),KV=dt(e=>{e.__esModule=!0,e.wrapHelper=t;function t(r,n){if(typeof r!="function")return r;var i=a(function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=n(s),r.apply(this,arguments)},"K");return i}a(t,"tx")}),WV=dt(e=>{e.__esModule=!0,e.checkRevision=d,e.template=g,e.wrapProgram=m,e.resolvePartial=b,e.invokePartial=x,e.noop=A;function t(L){return L&&L.__esModule?L:{default:L}}a(t,"ax");function r(L){if(L&&L.__esModule)return L;var U={};if(L!=null)for(var Z in L)Object.prototype.hasOwnProperty.call(L,Z)&&(U[Z]=L[Z]);return U.default=L,U}a(r,"Qx");var n=Si(),i=r(n),s=Ra(),o=t(s),l=p4(),u=NT(),c=KV(),h=IT();function d(L){var U=L&&L[0]||1,Z=l.COMPILER_REVISION;if(!(U>=l.LAST_COMPATIBLE_COMPILER_REVISION&&U<=l.COMPILER_REVISION))if(U<l.LAST_COMPATIBLE_COMPILER_REVISION){var Y=l.REVISION_CHANGES[Z],re=l.REVISION_CHANGES[U];throw new o.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+Y+") or downgrade your runtime to an older version ("+re+").")}else throw new o.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+L[1]+").")}a(d,"qp");function g(L,U){if(!U)throw new o.default("No environment passed to template");if(!L||!L.main)throw new o.default("Unknown template object: "+typeof L);L.main.decorator=L.main_d,U.VM.checkRevision(L.compiler);var Z=L.compiler&&L.compiler[0]===7;function Y($,f,w){w.hash&&(f=i.extend({},f,w.hash),w.ids&&(w.ids[0]=!0)),$=U.VM.resolvePartial.call(this,$,f,w);var v=i.extend({},w,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),_=U.VM.invokePartial.call(this,$,f,v);if(_==null&&U.compile&&(w.partials[w.name]=U.compile($,L.compilerOptions,U),_=w.partials[w.name](f,v)),_!=null){if(w.indent){for(var S=_.split(`
|
|
5
5
|
`),T=0,N=S.length;T<N&&!(!S[T]&&T+1===N);T++)S[T]=w.indent+S[T];_=S.join(`
|
|
@@ -725,7 +725,7 @@ ${e}</tr>
|
|
|
725
725
|
`+this.renderer.text(l);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,r=this.renderer){let n="";for(let i=0;i<t.length;i++){let s=t[i];if(this.options.extensions?.renderers?.[s.type]){let l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=l||"";continue}}let o=s;switch(o.type){case"escape":{n+=r.text(o);break}case"html":{n+=r.html(o);break}case"link":{n+=r.link(o);break}case"image":{n+=r.image(o);break}case"strong":{n+=r.strong(o);break}case"em":{n+=r.em(o);break}case"codespan":{n+=r.codespan(o);break}case"br":{n+=r.br(o);break}case"del":{n+=r.del(o);break}case"text":{n+=r.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},hd=class{static{a(this,"S")}options;block;constructor(t){this.options=t||ru}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Qi.lex:Qi.lexInline}provideParser(){return this.block?ba.parse:ba.parseInline}},U4e=class{static{a(this,"B")}defaults=X3();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ba;Renderer=Qp;TextRenderer=n_;Lexer=Qi;Tokenizer=Xp;Hooks=hd;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{let i=n;for(let s of i.header)r=r.concat(this.walkTokens(s.tokens,t));for(let s of i.rows)for(let o of s)r=r.concat(this.walkTokens(o.tokens,t));break}case"list":{let i=n;r=r.concat(this.walkTokens(i.items,t));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let o=i[s].flat(1/0);r=r.concat(this.walkTokens(o,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=t.renderers[i.name];s?t.renderers[i.name]=function(...o){let l=i.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=t[i.level];s?s.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new Qp(this.defaults);for(let s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=r.renderer[o],u=i[o];i[o]=(...c)=>{let h=l.apply(i,c);return h===!1&&(h=u.apply(i,c)),h||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Xp(this.defaults);for(let s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=r.tokenizer[o],u=i[o];i[o]=(...c)=>{let h=l.apply(i,c);return h===!1&&(h=u.apply(i,c)),h}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new hd;for(let s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=r.hooks[o],u=i[o];hd.passThroughHooks.has(s)?i[o]=c=>{if(this.defaults.async&&hd.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(i,c);return u.call(i,d)})();let h=l.call(i,c);return u.call(i,h)}:i[o]=(...c)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(i,c);return d===!1&&(d=await u.apply(i,c)),d})();let h=l.apply(i,c);return h===!1&&(h=u.apply(i,c)),h}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,s=r.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),i&&(l=l.concat(i.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Qi.lex(e,t??this.defaults)}parser(e,t){return ba.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(t):t,l=await(i.hooks?await i.hooks.provideLexer():e?Qi.lex:Qi.lexInline)(o,i),u=i.hooks?await i.hooks.processAllTokens(l):l;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let c=await(i.hooks?await i.hooks.provideParser():e?ba.parse:ba.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(c):c})().catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let o=(i.hooks?i.hooks.provideLexer():e?Qi.lex:Qi.lexInline)(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let l=(i.hooks?i.hooks.provideParser():e?ba.parse:ba.parseInline)(o,i);return i.hooks&&(l=i.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(e,t){return r=>{if(r.message+=`
|
|
726
726
|
Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+Ga(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Hl=new U4e;function Cr(e,t){return Hl.parse(e,t)}a(Cr,"k");Cr.options=Cr.setOptions=function(e){return Hl.setOptions(e),Cr.defaults=Hl.defaults,pz(Cr.defaults),Cr};Cr.getDefaults=X3;Cr.defaults=ru;Cr.use=function(...e){return Hl.use(...e),Cr.defaults=Hl.defaults,pz(Cr.defaults),Cr};Cr.walkTokens=function(e,t){return Hl.walkTokens(e,t)};Cr.parseInline=Hl.parseInline;Cr.Parser=ba;Cr.parser=ba.parse;Cr.Renderer=Qp;Cr.TextRenderer=n_;Cr.Lexer=Qi;Cr.lexer=Qi.lex;Cr.Tokenizer=Xp;Cr.Hooks=hd;Cr.parse=Cr;Cr.options;Cr.setOptions;Cr.use;Cr.walkTokens;Cr.parseInline;ba.parse;Qi.lex;var fr=a((...e)=>nT(lm(e)),"u"),i_=a((e,t,r)=>{let n=typeof t=="string"?new Blob([t],{type:r}):t,i=URL.createObjectURL(n),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)},"A"),a_=H.createContext({code:""});function F4e(e,t=200,r=50){let[n,i]=H.useState(e),s=H.useRef(0),o=H.useRef(null);return H.useEffect(()=>{let l=Date.now(),u=l-s.current;return o.current&&window.clearTimeout(o.current),u>=t?(i(e),s.current=l):o.current=window.setTimeout(()=>{i(e),s.current=Date.now()},r),()=>{o.current&&window.clearTimeout(o.current)}},[e,t,r]),n}a(F4e,"vt");var H4e=a(e=>e<50?{minHighlightInterval:100,debounceMs:500}:e<150?{minHighlightInterval:500,debounceMs:800}:e<300?{minHighlightInterval:1500,debounceMs:1200}:{minHighlightInterval:Number.POSITIVE_INFINITY,debounceMs:1500},"Tt"),G4e=a(e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),"Ct"),V4e=a(e=>{let t=e.lastIndexOf(`
|
|
727
727
|
`),r=t>=0?e.slice(0,t+1):"",n=t>=0?e.slice(t+1):e;return[r,n]},"Mt"),Y4e=a(e=>e?[{pre(t){return this.addClassToHast(t,e),t}}]:[],"Pt"),Z4e=class{static{a(this,"oe")}constructor(){this.lightHighlighter=null,this.darkHighlighter=null,this.lightTheme=null,this.darkTheme=null,this.loadedLanguages=new Set,this.initializationPromise=null,this.loadLanguagePromise=null,this.cache=new Map,this.cacheKeys=[],this.MAX_CACHE_SIZE=50,this.highlightQueue=new Map}isLanguageSupported(e){return Object.hasOwn(HB,e)}getFallbackLanguage(){return"text"}getCacheKey(e,t,r){return`${t}::${r||""}::${e}`}addToCache(e,t){if(this.cache.size>=this.MAX_CACHE_SIZE){let r=this.cacheKeys.shift();r&&this.cache.delete(r)}this.cache.set(e,t),this.cacheKeys.push(e)}needsHighlightersInitialization(e){let[t,r]=e,n=!this.lightHighlighter||this.lightTheme!==t,i=!this.darkHighlighter||this.darkTheme!==r;return[n,i]}async ensureHighlightersInitialized(e,t){let[r,n]=t,[i,s]=e,o=n4e({forgiving:!0});this.loadedLanguages.clear(),this.cache.clear(),this.cacheKeys=[],this.highlightQueue.clear(),r&&(this.lightHighlighter=await YS({themes:[i],langs:[],engine:o}),this.lightTheme=i),n&&(this.darkHighlighter=await YS({themes:[s],langs:[],engine:o}),this.darkTheme=s)}async loadLanguage(e){var t,r;await((t=this.darkHighlighter)==null?void 0:t.loadLanguage(e)),await((r=this.lightHighlighter)==null?void 0:r.loadLanguage(e)),this.loadedLanguages.add(e)}async initializeHighlighters(e){this.initializationPromise&&await this.initializationPromise;let t=this.needsHighlightersInitialization(e),[r,n]=t;(r||n)&&(this.initializationPromise=this.ensureHighlightersInitialized(e,t),await this.initializationPromise,this.initializationPromise=null)}performHighlights(e,t,r){let n=this.isLanguageSupported(t)?t:this.getFallbackLanguage();if(this.lightHighlighter===null||this.darkHighlighter===null||this.lightTheme===null||this.darkTheme===null)throw new Error("highlightCode must be called after initializeHighlighters.");let i=Y4e(r),s=this.lightHighlighter.codeToHtml(e,{lang:n,theme:this.lightTheme,transformers:i}),o=this.darkHighlighter.codeToHtml(e,{lang:n,theme:this.darkTheme,transformers:i});return[s,o]}async highlightCode(e,t,r,n){let i=this.getCacheKey(e,t,r),s=this.cache.get(i);if(s)return this.cacheKeys=this.cacheKeys.filter(c=>c!==i),this.cacheKeys.push(i),s;let o=this.highlightQueue.get(i);if(o)return o;let l=a(()=>{if(n!=null&&n.aborted)throw new DOMException("Aborted","AbortError")},"l"),u=(async()=>{try{await new Promise(h=>setTimeout(h,0)),l(),this.initializationPromise&&await this.initializationPromise,l(),this.loadLanguagePromise&&await this.loadLanguagePromise,l(),!this.loadedLanguages.has(t)&&this.isLanguageSupported(t)&&(this.loadLanguagePromise=this.loadLanguage(t),await this.loadLanguagePromise,this.loadLanguagePromise=null),l();let c=this.performHighlights(e,t,r);return this.addToCache(i,c),c}finally{this.highlightQueue.delete(i)}})();return this.highlightQueue.set(i,u),u}},Ny=new Z4e,$4e=a(({code:e,language:t,className:r,children:n,preClassName:i,...s})=>{let[o,l]=H.useState(""),[u,c]=H.useState(""),[h,d]=H.useState(""),[g,m]=H.useState(""),b=F4e(e),x=H.useRef(0),A=H.useRef(!1),C=H.useRef(null),M=H.useRef(0),[O,P]=H.useContext(eU);H.useEffect(()=>{Ny.initializeHighlighters([O,P])},[O,P]),H.useEffect(()=>{A.current=!0,C.current&&C.current.abort(),C.current=new AbortController;let U=C.current.signal;x.current&&clearTimeout(x.current);let[Z,Y]=V4e(b),re=b.split(`
|
|
728
|
-
`).length,{minHighlightInterval:F,debounceMs:$}=H4e(re);if(Z&&Z!==h){let f=Date.now();f-M.current>F||!Y?(M.current=f,Ny.highlightCode(Z,t,i,U).then(([w,v])=>{A.current&&!U.aborted&&H.startTransition(()=>{l(w),c(v),d(Z),m(Y)})}).catch(w=>{if(w.name!=="AbortError")throw w})):m(Y)}else m(Y);return x.current=window.setTimeout(()=>{Y&&b!==h&&!U.aborted&&Ny.highlightCode(b,t,i,U).then(([f,w])=>{A.current&&!U.aborted&&H.startTransition(()=>{l(f),c(w),d(b),m("")})}).catch(f=>{if(f.name!=="AbortError")throw f})},$),()=>{var f;A.current=!1,(f=C.current)==null||f.abort()}},[b,t,i]);let L=g?`<span class="line"><span>${G4e(g)}</span></span>`:"";return y.jsx(a_.Provider,{value:{code:e},children:y.jsxs("div",{className:"my-4 w-full overflow-hidden rounded-xl border border-border","data-code-block-container":!0,"data-language":t,children:[y.jsxs("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-code-block-header":!0,"data-language":t,children:[y.jsx("span",{className:"ml-1 font-mono lowercase",children:t}),y.jsx("div",{className:"flex items-center gap-2",children:n})]}),y.jsx("div",{className:"w-full",children:y.jsxs("div",{className:"min-w-full",children:[y.jsx("div",{className:fr("overflow-x-auto dark:hidden",r),dangerouslySetInnerHTML:{__html:L?o+L:o},"data-code-block":!0,"data-language":t,...s}),y.jsx("div",{className:fr("hidden overflow-x-auto dark:block",r),dangerouslySetInnerHTML:{__html:L?u+L:u},"data-code-block":!0,"data-language":t,...s})]})})]})})},"Me"),bk={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},yk=a(({onDownload:e,onError:t,language:r,children:n,className:i,code:s,...o})=>{let{code:l}=H.useContext(a_),{isAnimating:u}=H.useContext(vc),c=s??l,h=`file.${r&&r in bk?bk[r]:"txt"}`,d="text/plain",g=a(()=>{try{i_(h,c,d),e?.()}catch(m){t?.(m)}},"h");return y.jsx("button",{className:fr("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:g,title:"Download file",type:"button",...o,children:n??y.jsx($2,{size:14})})},"re"),wk=a(({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:s,...o})=>{let[l,u]=H.useState(!1),c=H.useRef(0),{code:h}=H.useContext(a_),{isAnimating:d}=H.useContext(vc),g=s??h,m=a(async()=>{var x;if(typeof window>"u"||!((x=navigator?.clipboard)!=null&&x.writeText)){t?.(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(g),u(!0),e?.(),c.current=window.setTimeout(()=>u(!1),r))}catch(A){t?.(A)}},"h");H.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let b=l?PA:LA;return y.jsx("button",{className:fr("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:m,type:"button",...o,children:n??y.jsx(b,{size:14})})},"se"),J4e=/\.[^/.]+$/,X4e=a(({node:e,className:t,src:r,alt:n,...i})=>{let s=a(async()=>{if(r)try{let o=await(await fetch(r)).blob(),l=new URL(r,window.location.origin).pathname.split("/").pop()||"",u=l.split(".").pop(),c=l.includes(".")&&u!==void 0&&u.length<=4,h="";if(c)h=l;else{let d=o.type,g="png";d.includes("jpeg")||d.includes("jpg")?g="jpg":d.includes("png")?g="png":d.includes("svg")?g="svg":d.includes("gif")?g="gif":d.includes("webp")&&(g="webp"),h=`${(n||l||"image").replace(J4e,"")}.${g}`}i_(h,o,o.type)}catch(o){console.error("Failed to download image:",o)}},"r");return r?y.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[y.jsx("img",{alt:n,className:fr("max-w-full rounded-lg",t),"data-streamdown":"image",src:r,...i}),y.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),y.jsx("button",{className:fr("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:s,title:"Download image",type:"button",children:y.jsx($2,{size:14})})]}):null},"Pe"),Ad=0,Q4e=a(()=>{Ad+=1,Ad===1&&(document.body.style.overflow="hidden")},"Bt"),K4e=a(()=>{Ad=Math.max(0,Ad-1),Ad===0&&(document.body.style.overflow="")},"At"),W4e=a(async e=>{let t={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0,...e},r=(await me(async()=>{const{default:n}=await import("./mermaid.core-rcskblvS.js").then(i=>i.bB);return{default:n}},__vite__mapDeps([97,98]))).default;return r.initialize(t),r},"$t"),q4e=a(({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...s})=>{let[o,l]=H.useState(!1),{isAnimating:u}=H.useContext(vc),c=a(()=>{l(!o)},"c");return H.useEffect(()=>{if(o){Q4e();let h=a(d=>{d.key==="Escape"&&l(!1)},"d");return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),K4e()}}},[o]),H.useEffect(()=>{o?r?.():n&&n()},[o,r,n]),y.jsxs(y.Fragment,{children:[y.jsx("button",{className:fr("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:c,title:"View fullscreen",type:"button",...s,children:y.jsx(IF,{size:14})}),o&&y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:c,onKeyDown:a(h=>{h.key==="Escape"&&c()},"onKeyDown"),role:"button",tabIndex:0,children:[y.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:c,title:"Exit fullscreen",type:"button",children:y.jsx(MF,{size:20})}),y.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",onClick:a(h=>h.stopPropagation(),"onClick"),onKeyDown:a(h=>h.stopPropagation(),"onKeyDown"),role:"presentation",children:y.jsx("div",{className:"max-h-full max-w-full",children:y.jsx(kz,{chart:e,className:"[&>div]:my-0 [&_svg]:h-auto [&_svg]:min-h-[60vh] [&_svg]:w-auto [&_svg]:min-w-[60vw]",config:t})})})]})]})},"Ne"),kz=a(({chart:e,className:t,config:r})=>{let[n,i]=H.useState(null),[s,o]=H.useState(!0),[l,u]=H.useState(""),[c,h]=H.useState("");if(H.useEffect(()=>{(async()=>{try{i(null),o(!0);let g=await W4e(r),m=e.split("").reduce((A,C)=>(A<<5)-A+C.charCodeAt(0)|0,0),b=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:x}=await g.render(b,e);u(x),h(x)}catch(g){if(!(c||l)){let m=g instanceof Error?g.message:"Failed to render Mermaid chart";i(m)}}finally{o(!1)}})()},[e,r]),s&&!l&&!c)return y.jsx("div",{className:fr("my-4 flex justify-center p-4",t),children:y.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[y.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),y.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(n&&!l&&!c)return y.jsxs("div",{className:fr("rounded-lg border border-red-200 bg-red-50 p-4",t),children:[y.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",n]}),y.jsxs("details",{className:"mt-2",children:[y.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),y.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let d=l||c;return y.jsx("div",{"aria-label":"Mermaid chart",className:fr("my-4 flex justify-center",t),dangerouslySetInnerHTML:{__html:d},role:"img"})},"le");function Az(e){var t,r;let n=[],i=[],s=e.querySelectorAll("thead th");for(let l of s)n.push(((t=l.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let l of o){let u=[],c=l.querySelectorAll("td");for(let h of c)u.push(((r=h.textContent)==null?void 0:r.trim())||"");i.push(u)}return{headers:n,rows:i}}a(Az,"Le");function Tz(e){let{headers:t,rows:r}=e,n=a(s=>s.includes(",")||s.includes('"')||s.includes(`
|
|
728
|
+
`).length,{minHighlightInterval:F,debounceMs:$}=H4e(re);if(Z&&Z!==h){let f=Date.now();f-M.current>F||!Y?(M.current=f,Ny.highlightCode(Z,t,i,U).then(([w,v])=>{A.current&&!U.aborted&&H.startTransition(()=>{l(w),c(v),d(Z),m(Y)})}).catch(w=>{if(w.name!=="AbortError")throw w})):m(Y)}else m(Y);return x.current=window.setTimeout(()=>{Y&&b!==h&&!U.aborted&&Ny.highlightCode(b,t,i,U).then(([f,w])=>{A.current&&!U.aborted&&H.startTransition(()=>{l(f),c(w),d(b),m("")})}).catch(f=>{if(f.name!=="AbortError")throw f})},$),()=>{var f;A.current=!1,(f=C.current)==null||f.abort()}},[b,t,i]);let L=g?`<span class="line"><span>${G4e(g)}</span></span>`:"";return y.jsx(a_.Provider,{value:{code:e},children:y.jsxs("div",{className:"my-4 w-full overflow-hidden rounded-xl border border-border","data-code-block-container":!0,"data-language":t,children:[y.jsxs("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-code-block-header":!0,"data-language":t,children:[y.jsx("span",{className:"ml-1 font-mono lowercase",children:t}),y.jsx("div",{className:"flex items-center gap-2",children:n})]}),y.jsx("div",{className:"w-full",children:y.jsxs("div",{className:"min-w-full",children:[y.jsx("div",{className:fr("overflow-x-auto dark:hidden",r),dangerouslySetInnerHTML:{__html:L?o+L:o},"data-code-block":!0,"data-language":t,...s}),y.jsx("div",{className:fr("hidden overflow-x-auto dark:block",r),dangerouslySetInnerHTML:{__html:L?u+L:u},"data-code-block":!0,"data-language":t,...s})]})})]})})},"Me"),bk={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},yk=a(({onDownload:e,onError:t,language:r,children:n,className:i,code:s,...o})=>{let{code:l}=H.useContext(a_),{isAnimating:u}=H.useContext(vc),c=s??l,h=`file.${r&&r in bk?bk[r]:"txt"}`,d="text/plain",g=a(()=>{try{i_(h,c,d),e?.()}catch(m){t?.(m)}},"h");return y.jsx("button",{className:fr("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:g,title:"Download file",type:"button",...o,children:n??y.jsx($2,{size:14})})},"re"),wk=a(({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:s,...o})=>{let[l,u]=H.useState(!1),c=H.useRef(0),{code:h}=H.useContext(a_),{isAnimating:d}=H.useContext(vc),g=s??h,m=a(async()=>{var x;if(typeof window>"u"||!((x=navigator?.clipboard)!=null&&x.writeText)){t?.(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(g),u(!0),e?.(),c.current=window.setTimeout(()=>u(!1),r))}catch(A){t?.(A)}},"h");H.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let b=l?PA:LA;return y.jsx("button",{className:fr("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:m,type:"button",...o,children:n??y.jsx(b,{size:14})})},"se"),J4e=/\.[^/.]+$/,X4e=a(({node:e,className:t,src:r,alt:n,...i})=>{let s=a(async()=>{if(r)try{let o=await(await fetch(r)).blob(),l=new URL(r,window.location.origin).pathname.split("/").pop()||"",u=l.split(".").pop(),c=l.includes(".")&&u!==void 0&&u.length<=4,h="";if(c)h=l;else{let d=o.type,g="png";d.includes("jpeg")||d.includes("jpg")?g="jpg":d.includes("png")?g="png":d.includes("svg")?g="svg":d.includes("gif")?g="gif":d.includes("webp")&&(g="webp"),h=`${(n||l||"image").replace(J4e,"")}.${g}`}i_(h,o,o.type)}catch(o){console.error("Failed to download image:",o)}},"r");return r?y.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[y.jsx("img",{alt:n,className:fr("max-w-full rounded-lg",t),"data-streamdown":"image",src:r,...i}),y.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),y.jsx("button",{className:fr("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:s,title:"Download image",type:"button",children:y.jsx($2,{size:14})})]}):null},"Pe"),Ad=0,Q4e=a(()=>{Ad+=1,Ad===1&&(document.body.style.overflow="hidden")},"Bt"),K4e=a(()=>{Ad=Math.max(0,Ad-1),Ad===0&&(document.body.style.overflow="")},"At"),W4e=a(async e=>{let t={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0,...e},r=(await me(async()=>{const{default:n}=await import("./mermaid.core-wcUI7FVN.js").then(i=>i.bB);return{default:n}},__vite__mapDeps([97,98]))).default;return r.initialize(t),r},"$t"),q4e=a(({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...s})=>{let[o,l]=H.useState(!1),{isAnimating:u}=H.useContext(vc),c=a(()=>{l(!o)},"c");return H.useEffect(()=>{if(o){Q4e();let h=a(d=>{d.key==="Escape"&&l(!1)},"d");return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),K4e()}}},[o]),H.useEffect(()=>{o?r?.():n&&n()},[o,r,n]),y.jsxs(y.Fragment,{children:[y.jsx("button",{className:fr("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:c,title:"View fullscreen",type:"button",...s,children:y.jsx(IF,{size:14})}),o&&y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:c,onKeyDown:a(h=>{h.key==="Escape"&&c()},"onKeyDown"),role:"button",tabIndex:0,children:[y.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:c,title:"Exit fullscreen",type:"button",children:y.jsx(MF,{size:20})}),y.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",onClick:a(h=>h.stopPropagation(),"onClick"),onKeyDown:a(h=>h.stopPropagation(),"onKeyDown"),role:"presentation",children:y.jsx("div",{className:"max-h-full max-w-full",children:y.jsx(kz,{chart:e,className:"[&>div]:my-0 [&_svg]:h-auto [&_svg]:min-h-[60vh] [&_svg]:w-auto [&_svg]:min-w-[60vw]",config:t})})})]})]})},"Ne"),kz=a(({chart:e,className:t,config:r})=>{let[n,i]=H.useState(null),[s,o]=H.useState(!0),[l,u]=H.useState(""),[c,h]=H.useState("");if(H.useEffect(()=>{(async()=>{try{i(null),o(!0);let g=await W4e(r),m=e.split("").reduce((A,C)=>(A<<5)-A+C.charCodeAt(0)|0,0),b=`mermaid-${Math.abs(m)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:x}=await g.render(b,e);u(x),h(x)}catch(g){if(!(c||l)){let m=g instanceof Error?g.message:"Failed to render Mermaid chart";i(m)}}finally{o(!1)}})()},[e,r]),s&&!l&&!c)return y.jsx("div",{className:fr("my-4 flex justify-center p-4",t),children:y.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[y.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),y.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(n&&!l&&!c)return y.jsxs("div",{className:fr("rounded-lg border border-red-200 bg-red-50 p-4",t),children:[y.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",n]}),y.jsxs("details",{className:"mt-2",children:[y.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),y.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let d=l||c;return y.jsx("div",{"aria-label":"Mermaid chart",className:fr("my-4 flex justify-center",t),dangerouslySetInnerHTML:{__html:d},role:"img"})},"le");function Az(e){var t,r;let n=[],i=[],s=e.querySelectorAll("thead th");for(let l of s)n.push(((t=l.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let l of o){let u=[],c=l.querySelectorAll("td");for(let h of c)u.push(((r=h.textContent)==null?void 0:r.trim())||"");i.push(u)}return{headers:n,rows:i}}a(Az,"Le");function Tz(e){let{headers:t,rows:r}=e,n=a(s=>s.includes(",")||s.includes('"')||s.includes(`
|
|
729
729
|
`)?`"${s.replace(/"/g,'""')}"`:s,"n"),i=[];t.length>0&&i.push(t.map(n).join(","));for(let s of r)i.push(s.map(n).join(","));return i.join(`
|
|
730
730
|
`)}a(Tz,"xe");function e6e(e){let{headers:t,rows:r}=e,n=a(s=>s.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),"n"),i=[];t.length>0&&i.push(t.map(n).join(" "));for(let s of r)i.push(s.map(n).join(" "));return i.join(`
|
|
731
731
|
`)}a(e6e,"qt");function t6e(e){let{headers:t,rows:r}=e;if(t.length===0)return"";let n=[],i=t.map(s=>s.replace(/\|/g,"\\|"));n.push(`| ${i.join(" | ")} |`),n.push(`| ${t.map(()=>"---").join(" | ")} |`);for(let s of r){let o=[...s];for(;o.length<t.length;)o.push("");let l=o.map(u=>u.replace(/\|/g,"\\|"));n.push(`| ${l.join(" | ")} |`)}return n.join(`
|
|
@@ -740,7 +740,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error
|
|
|
740
740
|
`)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2===0)return e;let n=e.match(b6e);if(n&&!r){let i=n[2];if(!i||nu.test(i))return e;if(O6e(e)%2===1)return`${e}\``}return e},"fo"),P6e=a(e=>{let t=e.match(y6e);if(t){let r=t[2];if(!r||nu.test(r))return e;if((e.match(/~~/g)||[]).length%2===1)return`${e}~~`}return e},"bo"),L6e=a(e=>{if((e.match(/\$\$/g)||[]).length%2===0)return e;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
741
741
|
`,t)!==-1&&!e.endsWith(`
|
|
742
742
|
`)?`${e}
|
|
743
|
-
$$`:`${e}$$`},"wo"),D6e=a(e=>{let t=0,r=e.match(/\*+/g)||[];for(let n of r){let i=n.length;i>=3&&(t+=Math.floor(i/3))}return t},"yo"),j6e=a(e=>{if(Rg(e)||E6e.test(e))return e;let t=e.match(m6e);if(t){let r=t[2];if(!r||nu.test(r))return e;if(D6e(e)%2===1)return`${e}***`}return e},"ko"),B6e=a(e=>{if(!e||typeof e!="string")return e;let t=e,r=S6e(t);return r.endsWith("](streamdown:incomplete-link)")?r:(t=r,t=j6e(t),t=k6e(t),t=A6e(t),t=N6e(t),t=I6e(t),t=R6e(t),t=P6e(t),t=L6e(t),t)},"be"),z6e={harden:[Zue,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],defaultOrigin:void 0,allowDataImages:!0}],raw:Ipe,katex:[a2,{errorColor:"var(--color-muted-foreground)"}]},U6e={gfm:[cve,{}],math:[_ve,{singleDollarTextMath:!1}],cjkFriendly:[eme,{}],cjkFriendlyGfmStrikethrough:[rme,{}]},eU=H.createContext(["github-light","github-dark"]),tU=H.createContext(void 0),o_=H.createContext(!0),vc=H.createContext({isAnimating:!1}),rU=H.memo(({content:e,shouldParseIncompleteMarkdown:t,...r})=>{let n=H.useMemo(()=>typeof e=="string"&&t?B6e(e.trim()):e,[e,t]);return y.jsx(CF,{...r,children:n})},(e,t)=>e.content===t.content);rU.displayName="Block";var F6e=["github-light","github-dark"],nU=H.memo(({children:e,parseIncompleteMarkdown:t=!0,components:r,rehypePlugins:n=Object.values(z6e),remarkPlugins:i=Object.values(U6e),className:s,shikiTheme:o=F6e,mermaidConfig:l,controls:u=!0,isAnimating:c=!1,urlTransform:h=a(b=>b,"d"),BlockComponent:d=rU,parseMarkdownIntoBlocksFn:g=d6e,...m})=>{let b=H.useId(),x=H.useMemo(()=>g(typeof e=="string"?e:""),[e,g]);H.useEffect(()=>{Array.isArray(n)&&n.some(C=>Array.isArray(C)?C[0]===a2:C===a2)&&me(()=>Promise.resolve({}),__vite__mapDeps([99]))},[n]);let A=H.useMemo(()=>({isAnimating:c}),[c]);return y.jsx(eU.Provider,{value:o,children:y.jsx(tU.Provider,{value:l,children:y.jsx(o_.Provider,{value:u,children:y.jsx(vc.Provider,{value:A,children:y.jsx("div",{className:fr("space-y-4",s),children:x.map((C,M)=>y.jsx(d,{components:{...s6e,...r},content:C,index:M,rehypePlugins:n,remarkPlugins:i,shouldParseIncompleteMarkdown:t,urlTransform:h,...m},`${b}-block-${M}`))})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating);nU.displayName="Streamdown";const iU=H.memo(({className:e,shikiTheme:t=["github-dark","github-dark"],...r})=>y.jsx(nU,{className:He("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),shikiTheme:t,...r}),(e,t)=>e.children===t.children&&e.className===t.className&&e.isAnimating===t.isAnimating&&JSON.stringify(e.shikiTheme)===JSON.stringify(t.shikiTheme));iU.displayName="Response";const H6e={damping:.7,stiffness:.05,mass:1.25},G6e=70,V6e=1e3/60,Y6e=350;let Pg=!1;globalThis.document?.addEventListener("mousedown",()=>{Pg=!0});globalThis.document?.addEventListener("mouseup",()=>{Pg=!1});globalThis.document?.addEventListener("click",()=>{Pg=!1});const Z6e=a((e={})=>{const[t,r]=H.useState(!1),[n,i]=H.useState(e.initial!==!1),[s,o]=H.useState(!1),l=H.useRef(null);l.current=e;const u=H.useCallback(()=>{if(!Pg)return!1;const M=window.getSelection();if(!M||!M.rangeCount)return!1;const O=M.getRangeAt(0);return O.commonAncestorContainer.contains(A.current)||A.current?.contains(O.commonAncestorContainer)},[]),c=H.useCallback(M=>{d.isAtBottom=M,i(M)},[]),h=H.useCallback(M=>{d.escapedFromLock=M,r(M)},[]),d=H.useMemo(()=>{let M;return{escapedFromLock:t,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return A.current?.scrollTop??0},set scrollTop(O){A.current&&(A.current.scrollTop=O,d.ignoreScrollToTop=A.current.scrollTop)},get targetScrollTop(){return!A.current||!C.current?0:A.current.scrollHeight-1-A.current.clientHeight},get calculatedTargetScrollTop(){if(!A.current||!C.current)return 0;const{targetScrollTop:O}=this;if(!e.targetScrollTop)return O;if(M?.targetScrollTop===O)return M.calculatedScrollTop;const P=Math.max(Math.min(e.targetScrollTop(O,{scrollElement:A.current,contentElement:C.current}),O),0);return M={targetScrollTop:O,calculatedScrollTop:P},requestAnimationFrame(()=>{M=void 0}),P},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=G6e}}},[]),g=H.useCallback((M={})=>{typeof M=="string"&&(M={animation:M}),M.preserveScrollPosition||c(!0);const O=Date.now()+(Number(M.wait)||0),P=My(l.current,M.animation),{ignoreEscapes:L=!1}=M;let U,Z=d.calculatedTargetScrollTop;M.duration instanceof Promise?M.duration.finally(()=>{U=Date.now()}):U=O+(M.duration??0);const Y=a(async()=>{const re=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:F}=d,$=performance.now(),f=($-(d.lastTick??$))/V6e;if(d.animation||(d.animation={behavior:P,promise:re,ignoreEscapes:L}),d.animation.behavior===P&&(d.lastTick=$),u()||O>Date.now())return Y();if(F<Math.min(Z,d.calculatedTargetScrollTop)){if(d.animation?.behavior===P){if(P==="instant")return d.scrollTop=d.calculatedTargetScrollTop,Y();d.velocity=(P.damping*d.velocity+P.stiffness*d.scrollDifference)/P.mass,d.accumulated+=d.velocity*f,d.scrollTop+=d.accumulated,d.scrollTop!==F&&(d.accumulated=0)}return Y()}return U>Date.now()?(Z=d.calculatedTargetScrollTop,Y()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?g({animation:My(l.current,l.current.resize),ignoreEscapes:L,duration:Math.max(0,U-Date.now())||void 0}):d.isAtBottom)});return re.then(F=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),F))},"next");return M.wait!==!0&&(d.animation=void 0),d.animation?.behavior===P?d.animation.promise:Y()},[c,u,d]),m=H.useCallback(()=>{h(!0),c(!1)},[h,c]),b=H.useCallback(({target:M})=>{if(M!==A.current)return;const{scrollTop:O,ignoreScrollToTop:P}=d;let{lastScrollTop:L=O}=d;d.lastScrollTop=O,d.ignoreScrollToTop=void 0,P&&P>O&&(L=P),o(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||O===P)return;if(u()){h(!0),c(!1);return}const U=O>L,Z=O<L;if(d.animation?.ignoreEscapes){d.scrollTop=L;return}Z&&(h(!0),c(!1)),U&&h(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[h,c,u,d]),x=H.useCallback(({target:M,deltaY:O})=>{let P=M;for(;!["scroll","auto"].includes(getComputedStyle(P).overflow);){if(!P.parentElement)return;P=P.parentElement}P===A.current&&O<0&&A.current.scrollHeight>A.current.clientHeight&&!d.animation?.ignoreEscapes&&(h(!0),c(!1))},[h,c,d]),A=_k(M=>{A.current?.removeEventListener("scroll",b),A.current?.removeEventListener("wheel",x),M?.addEventListener("scroll",b,{passive:!0}),M?.addEventListener("wheel",x,{passive:!0})},[]),C=_k(M=>{if(d.resizeObserver?.disconnect(),!M)return;let O;d.resizeObserver=new ResizeObserver(([P])=>{const{height:L}=P.contentRect,U=L-(O??L);if(d.resizeDifference=U,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),o(d.isNearBottom),U>=0){const Z=My(l.current,O?l.current.resize:l.current.initial);g({animation:Z,wait:!0,preserveScrollPosition:!0,duration:Z==="instant"?void 0:Y6e})}else d.isNearBottom&&(h(!1),c(!0));O=L,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===U&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(M)},[]);return{contentRef:C,scrollRef:A,scrollToBottom:g,stopScroll:m,isAtBottom:n||s,isNearBottom:s,escapedFromLock:t,state:d}},"useStickToBottom");function _k(e,t){const r=H.useCallback(n=>(r.current=n,e(n)),t);return r}a(_k,"useRefCallback");const Iy=new Map;function My(...e){const t={...H6e};let r=!1;for(const i of e){if(i==="instant"){r=!0;continue}typeof i=="object"&&(r=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const n=JSON.stringify(t);return Iy.has(n)||Iy.set(n,Object.freeze(t)),r?"instant":Iy.get(n)}a(My,"mergeAnimations");function $6e(e={}){const{smooth:t=!1}=e,r=H.useRef(!1),n=Z6e({initial:t?"smooth":"instant",resize:t?"smooth":"instant"}),[i,s]=H.useState({isAtBottom:!0,autoScrollEnabled:!0});H.useEffect(()=>{n.isAtBottom?(r.current=!1,s({isAtBottom:!0,autoScrollEnabled:!0})):s(c=>({...c,isAtBottom:!1,autoScrollEnabled:r.current?!1:c.autoScrollEnabled}))},[n.isAtBottom]);const o=H.useCallback(u=>{const c=u?"instant":t?"smooth":"instant";n.scrollToBottom({animation:c,preserveScrollPosition:!1}),s({isAtBottom:!0,autoScrollEnabled:!0}),r.current=!1},[n.scrollToBottom,t]),l=H.useCallback(()=>{n.isAtBottom||(r.current=!0,n.stopScroll(),s(u=>({...u,autoScrollEnabled:!1})))},[n.isAtBottom,n.stopScroll]);return{scrollRef:n.scrollRef,contentRef:n.contentRef,isAtBottom:i.isAtBottom,autoScrollEnabled:i.autoScrollEnabled,scrollToBottom:a(()=>o(!1),"scrollToBottom"),disableAutoScroll:l,_stickToBottom:n}}a($6e,"useAutoScroll");const J6e=a(({className:e,...t})=>y.jsx(RF,{className:He("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),"ResizablePanelGroup"),xk=OF,X6e=a(({withHandle:e,className:t,...r})=>y.jsx(PF,{className:He("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...r,children:e&&y.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:y.jsx(LF,{className:"h-2.5 w-2.5"})})}),"ResizableHandle"),R2=H.forwardRef(({mainAction:e,actions:t,variant:r="default",size:n="default",disabled:i,className:s,mainButtonClassName:o,dropdownButtonClassName:l},u)=>{const c=H.useRef(null),[h,d]=H.useState();return H.useImperativeHandle(u,()=>c.current,[]),H.useLayoutEffect(()=>{c.current&&d(c.current.offsetWidth)},[t.length,e.label]),y.jsxs("div",{ref:c,className:He("flex w-full",s),children:[y.jsxs(ct,{type:"button",variant:r,size:n,onClick:e.onClick,disabled:i||e.disabled,className:He("rounded-r-none flex-1",r==="destructive"?"border-r border-red-700":"border-r-0",o),children:[e.icon&&y.jsx("span",{className:"mr-2",children:e.icon}),e.label]}),y.jsxs(Pd,{children:[y.jsx(Ld,{asChild:!0,children:y.jsxs(ct,{type:"button",variant:r,size:n,disabled:i,className:He("rounded-l-none px-2 flex-shrink-0",l),children:[y.jsx(as,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"More options"})]})}),y.jsx(Dd,{align:"end",style:{width:h},children:t.map((g,m)=>y.jsxs(H.Fragment,{children:[y.jsxs(Xa,{onClick:g.onClick,disabled:g.disabled,className:He(g.variant==="destructive"&&"text-destructive focus:text-destructive hover:bg-red-50 dark:hover:bg-red-950/50"),children:[g.icon,g.label]}),m<t.length-1&&y.jsx(z0,{})]},m))})]})]})});R2.displayName="SplitButton";const Q6e=J2,K6e=DF,W6e=jF,q6e=a(({toolPart:e,defaultOpen:t=!1,className:r})=>{const[n,i]=H.useState(t),{state:s,input:o,output:l,toolCallId:u}=e,c=a(()=>{switch(s){case"input-streaming":return y.jsx(Fn,{className:"h-4 w-4 animate-spin text-blue-500"});case"input-available":return y.jsx(Cl,{className:"h-4 w-4 text-orange-500"});case"output-available":return y.jsx(vA,{className:"h-4 w-4 text-green-500"});case"output-error":return y.jsx(BF,{className:"h-4 w-4 text-red-500"});default:return y.jsx(Cl,{className:"text-muted-foreground h-4 w-4"})}},"getStateIcon"),h=a(()=>{const g="px-2 py-1 rounded-full text-xs font-medium";switch(s){case"input-streaming":return y.jsx("span",{className:He(g,"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"),children:"Processing"});case"input-available":return y.jsx("span",{className:He(g,"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400"),children:"Ready"});case"output-available":return y.jsx("span",{className:He(g,"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400"),children:"Completed"});case"output-error":return y.jsx("span",{className:He(g,"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400"),children:"Error"});default:return y.jsx("span",{className:He(g,"bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-400"),children:"Pending"})}},"getStateBadge"),d=a(g=>g===null?"null":g===void 0?"undefined":typeof g=="string"?g:typeof g=="object"?JSON.stringify(g,null,2):String(g),"formatValue");return y.jsx("div",{className:He("border-border mt-3 overflow-hidden rounded-lg border",r),children:y.jsxs(Q6e,{open:n,onOpenChange:i,children:[y.jsx(K6e,{asChild:!0,children:y.jsxs(ct,{variant:"ghost",className:"bg-background h-auto w-full justify-between rounded-b-none px-3 py-2 font-normal",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[c(),y.jsx("span",{className:"font-mono text-sm font-medium",children:e.type}),h()]}),y.jsx(as,{className:He("h-4 w-4",n&&"rotate-180")})]})}),y.jsx(W6e,{className:He("border-border border-t","data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden"),children:y.jsxs("div",{className:"bg-background space-y-3 p-3",children:[o&&Object.keys(o).length>0&&y.jsxs("div",{children:[y.jsx("h4",{className:"text-muted-foreground mb-2 text-sm font-medium",children:"Input"}),y.jsx("div",{className:"bg-background rounded border p-2 font-mono text-sm",children:Object.entries(o).map(([g,m])=>y.jsxs("div",{className:"mb-1",children:[y.jsxs("span",{className:"text-muted-foreground",children:[g,":"]})," ",y.jsx("span",{children:d(m)})]},g))})]}),l&&y.jsxs("div",{children:[y.jsx("h4",{className:"text-muted-foreground mb-2 text-sm font-medium",children:"Output"}),y.jsx("div",{className:"bg-background max-h-60 overflow-auto rounded border p-2 font-mono text-sm",children:y.jsx("pre",{className:"whitespace-pre-wrap",children:d(l)})})]}),s==="output-error"&&e.errorText&&y.jsxs("div",{children:[y.jsx("h4",{className:"mb-2 text-sm font-medium text-red-500",children:"Error"}),y.jsx("div",{className:"bg-background rounded border border-red-200 p-2 text-sm dark:border-red-950 dark:bg-red-900/20",children:e.errorText})]}),s==="input-streaming"&&y.jsx("div",{className:"text-muted-foreground text-sm",children:"Processing tool call..."}),u&&y.jsx("div",{className:"text-muted-foreground border-t border-blue-200 pt-2 text-xs",children:y.jsxs("span",{className:"font-mono",children:["Call ID: ",u]})})]})})]})})},"Tool");function ewe({agentId:e,channelId:t,chatType:r}){const[n,i]=H.useState([]),s=H.useRef(new Set),{toast:o}=Ur(),l=Or();H.useEffect(()=>()=>{s.current.forEach(b=>URL.revokeObjectURL(b)),s.current.clear()},[]);const u=H.useCallback(b=>{const M=Array.from(b.target.files||[]).filter(O=>O.type.startsWith("image/")||O.type.startsWith("video/")||O.type.startsWith("audio/")||O.type==="application/pdf"||O.type==="application/msword"||O.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||O.type==="application/vnd.ms-excel"||O.type==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"||O.type==="application/vnd.ms-powerpoint"||O.type==="application/vnd.openxmlformats-officedocument.presentationml.presentation"||O.type.startsWith("text/")).filter(O=>!n.some(P=>P.file.name===O.name&&P.file.size===O.size&&P.file.lastModified===O.lastModified)).map(O=>({file:O,id:Us(),isUploading:!1}));i(O=>{const P=[...O,...M];return Array.from(new Map(P.map(L=>[`${L.file.name}-${L.file.size}`,L])).values())}),b.target&&(b.target.value="")},[n]),c=H.useCallback(b=>{i(x=>{const A=x.find(C=>C.id===b);return A?.blobUrl&&(URL.revokeObjectURL(A.blobUrl),s.current.delete(A.blobUrl)),x.filter(C=>C.id!==b)})},[]),h=H.useCallback(b=>b.map(A=>{const C=URL.createObjectURL(A.file);return s.current.add(C),A.blobUrl=C,{id:A.id,url:C,title:A.file.name,contentType:Uv(A.file.type),isUploading:!0}}).filter(A=>A.contentType!==void 0),[]),d=H.useCallback(async b=>{if(!b.length)return{uploaded:[],failed:[],blobUrls:[]};const x=b.map(async P=>{try{const L=r===Gt.DM&&e?await l.media.uploadAgentMedia(e,{file:P.file,filename:P.file.name}):await l.media.uploadChannelMedia(t,P.file);return{success:!0,media:{id:P.id,url:L.url,title:P.file.name,source:"file_upload",contentType:Uv(P.file.type)}}}catch(L){return Je.error(`Failed to upload ${P.file.name}:`,L),o({title:`Upload Failed: ${P.file.name}`,description:L instanceof Error?L.message:"Upload failed",variant:"destructive"}),{success:!1,file:P,error:L instanceof Error?L.message:"Upload failed"}}}),A=await Promise.allSettled(x),C=[],M=[],O=[];return A.forEach((P,L)=>{P.status==="fulfilled"?P.value.success&&"media"in P.value?C.push(P.value.media):"file"in P.value&&M.push(P.value):M.push({file:b[L],error:P.reason?.message||"Upload failed"})}),b.forEach(P=>{P.blobUrl&&O.push(P.blobUrl)}),{uploaded:C,failed:M,blobUrls:O}},[r,e,t,o]),g=H.useCallback(b=>{b.forEach(x=>{URL.revokeObjectURL(x),s.current.delete(x)})},[]),m=H.useCallback(()=>{n.forEach(b=>{b.blobUrl&&(URL.revokeObjectURL(b.blobUrl),s.current.delete(b.blobUrl))}),i([])},[n]);return{selectedFiles:n,setSelectedFiles:i,handleFileChange:u,removeFile:c,createBlobUrls:h,uploadFiles:d,cleanupBlobUrls:g,clearFiles:m,getContentTypeFromMimeType:Uv}}a(ewe,"useFileUpload");function twe({channelId:e,currentUserId:t,contextId:r,chatType:n,allAgents:i,messages:s,onAddMessage:o,onUpdateMessage:l,onDeleteMessage:u,onClearMessages:c,onInputDisabledChange:h}){const d=Ri.getInstance(),{getApiKey:g}=eue(),m=H.useRef(null),b=H.useRef(null),x=H.useCallback(async(A,C,M,O,P,L,U)=>{const Z=U||e;if(!Z){Je.error("[useSocketChat] Cannot send message: no channel ID available");return}const Y={...L,channelType:n,...n===Gt.DM&&{isDm:!0,targetUserId:r}};await d.sendMessage(A,Z,C,M,O,P,Y)},[e,d,n,r]);return H.useEffect(()=>{if(!e||!t){b.current&&(Je.info(`[useSocketChat] useEffect: channelId is now null/undefined, resetting joinedChannelRef from ${b.current}`),b.current=null);return}const A=g();d.initialize(t,A??void 0),e!==b.current?(Je.info(`[useSocketChat] useEffect: Joining channel ${e}. Previous joinedChannelRef: ${b.current}`),d.joinChannel(e),b.current=e):Je.info(`[useSocketChat] useEffect: Channel ${e} already marked as joined by this instance. Skipping joinChannel call.`);const C=a(v=>{if(Je.info("[useSocketChat] Received raw messageBroadcast data:",JSON.stringify(v)),(v.channelId||v.roomId)!==e)return;const S=v.senderId===t,T=n===Gt.DM?v.senderId===r:i.some(k=>k.id===v.senderId);!S&&T&&h(!1);const N=v.clientMessageId;if(N&&S)l(N,{id:v.id||Us(),isLoading:!1,createdAt:typeof v.createdAt=="number"?v.createdAt:Date.parse(v.createdAt),text:v.text,attachments:v.attachments,isAgent:!1});else{const k={id:v.id||Us(),text:v.text,name:v.senderName,senderId:v.senderId,isAgent:T,createdAt:typeof v.createdAt=="number"?v.createdAt:Date.parse(v.createdAt),channelId:v.channelId||v.roomId,serverId:v.serverId,source:v.source,attachments:v.attachments,thought:v.thought,actions:v.actions,isLoading:!1,prompt:v.prompt,rawMessage:v.rawMessage};s.some(E=>E.id===v.id)||(Je.info("[useSocketChat] Adding new UiMessage:",JSON.stringify(k)),o(k),T&&k.id?m.current=k.id:m.current=null)}},"handleMessageBroadcasting"),M=a(v=>{(v.channelId||v.roomId)===e&&h(!1)},"handleMessageComplete"),O=a(v=>{(v.channelId||v.roomId)===e&&(v.action==="disable_input"?h(!0):v.action==="enable_input"&&h(!1))},"handleControlMessage"),P=a(v=>{(v.channelId||v.roomId)===e&&v.messageId&&u(v.messageId)},"handleMessageDeleted"),L=a(v=>{(v.channelId||v.roomId)===e&&c()},"handleChannelCleared"),U=a(v=>{(v.channelId||v.roomId)===e&&c()},"handleChannelDeleted"),Z=d.evtMessageBroadcast.attach(v=>(v.channelId||v.roomId)===e,C),Y=d.evtMessageComplete.attach(v=>(v.channelId||v.roomId)===e,M),re=d.evtControlMessage.attach(v=>(v.channelId||v.roomId)===e,O),F=d.evtMessageDeleted.attach(v=>(v.channelId||v.roomId)===e,P),$=d.evtChannelCleared.attach(v=>(v.channelId||v.roomId)===e,L),f=d.evtChannelDeleted.attach(v=>(v.channelId||v.roomId)===e,U);return()=>{e&&(Je.info(`[useSocketChat] useEffect cleanup: Leaving channel ${e}. Current joinedChannelRef: ${b.current}`),d.leaveChannel(e),e===b.current&&(b.current=null,Je.info(`[useSocketChat] useEffect cleanup: Reset joinedChannelRef for ${e}`))),w([Z,Y,re,F,$,f])};function w(v){v.forEach(_=>_?.detach())}},[e,t,d]),{sendMessage:x,animatedMessageId:m.current}}a(twe,"useSocketChat");const rwe=new Set(["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","avif"]),nwe=new Set(["mp4","webm","mov","avi","mkv","flv","wmv","m4v","ogv"]),iwe={youtube:{patterns:[/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/,/(?:https?:\/\/)?(?:www\.)?youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/],getEmbedUrl:a(e=>`https://www.youtube.com/embed/${e}`,"getEmbedUrl")},vimeo:{patterns:[/(?:https?:\/\/)?(?:www\.)?vimeo\.com\/(\d+)/],getEmbedUrl:a(e=>`https://player.vimeo.com/video/${e}`,"getEmbedUrl")}};function aU(e){try{return new URL(e).pathname.split(".").pop()?.toLowerCase()||""}catch{return""}}a(aU,"getFileExtension");function awe(e){const t=aU(e);return rwe.has(t)}a(awe,"isImageUrl");function swe(e){const t=aU(e);return nwe.has(t)}a(swe,"isVideoFileUrl");function sU(e){for(const[t,r]of Object.entries(iwe))for(const n of r.patterns){const i=e.match(n);if(i&&i[1])return{platform:t,id:i[1],embedUrl:r.getEmbedUrl(i[1])}}return null}a(sU,"getVideoPlatformInfo");function oU(e){if(!e)return[];const t=/(https?:\/\/[^\s]+)/g;return(e.match(t)||[]).map(n=>{const i=n.replace(/[.,!?;)]*$/,"");if(awe(i))return{url:i,type:"image",isEmbed:!1};if(swe(i))return{url:i,type:"video",isEmbed:!1};const s=sU(i);return s?{url:s.embedUrl,type:"video",isEmbed:!0}:{url:i,type:"unknown",isEmbed:!1}}).filter(n=>n.type!=="unknown")}a(oU,"parseMediaFromText");function owe(e,t){let r=e;return t.forEach(n=>{if(n.isEmbed){const i=/(https?:\/\/[^\s]+)/g,s=e.match(i)||[];for(const o of s){const l=o.replace(/[.,!?;)]*$/,""),u=sU(l);if(u&&u.embedUrl===n.url){r=r.replace(o,"").trim();break}}}else r=r.replace(n.url,"").trim()}),r}a(owe,"removeMediaUrlsFromText");const s0=15;function lU(e){return(e.includes("TEXT")||e.includes("OBJECT"))&&!e.includes("EMBEDDING")&&!e.includes("TRANSCRIPTION")?"LLM":e.includes("EMBEDDING")?"Embedding":e.includes("TRANSCRIPTION")?"Transcription":e.includes("IMAGE")?"Image":!e.includes("TEXT")&&!e.includes("IMAGE")&&!e.includes("EMBEDDING")&&!e.includes("TRANSCRIPTION")?"Other":"Unknown"}a(lU,"getModelUsageType");function lwe(e){if(!e)return"Unknown date";const t=new Date(e),r=new Date,n=(r.getTime()-t.getTime())/(1e3*60*60);return n<1?`${Math.floor((r.getTime()-t.getTime())/6e4)}m ago`:n<24?`${Math.floor(n)}h ago`:n<168?t.toLocaleDateString([],{weekday:"short",hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}a(lwe,"formatDate");function uwe(e=""){return e==="ACTION"?X2:e.includes("TEXT_EMBEDDING")?D0:e.includes("TRANSCRIPTION")?bl:e.includes("TEXT")||e.includes("OBJECT")?Q2:e.includes("IMAGE")?zF:DA}a(uwe,"getModelIcon");function cwe(e){if(!e)return null;const{prompt_tokens:t,completion_tokens:r,total_tokens:n}=e;return n?{prompt:t||0,completion:r||0,total:n}:null}a(cwe,"formatTokenUsage");function Ek(e,t=100){return e.length<=t?e:e.substring(0,t)+"..."}a(Ek,"truncateText");function o0(e){navigator.clipboard.writeText(e).catch(console.error)}a(o0,"copyToClipboard");function dwe(e){const t={};for(const r of e){const n=r.createdAt||r.timestamp||0,s=new Date(n).toLocaleDateString();t[s]||(t[s]=[]),t[s].push(r)}return t}a(dwe,"groupActionsByDate");function hwe({action:e,onDelete:t}){const[r,n]=H.useState(!1),[i,s]=H.useState(!1),[o,l]=H.useState(!1),u=e.body?.modelType||"",c=e.body?.modelKey||"",h=e.type==="action",d=e.body?.action||"",g=uwe(h?"ACTION":u),m=h?"Action":lU(u),b=cwe(e.body?.response?.usage||e.body?.usage),x=e.body?.prompts,A=a(()=>{const O=e.body?.params;if(!O&&!x)return null;if(u.includes("TRANSCRIPTION")&&Array.isArray(O))return y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(bl,{className:"h-3 w-3"}),y.jsx("span",{children:"Audio input data"})]});const{prompt:P,...L}=O||{};return y.jsxs("div",{className:"space-y-4",children:[x&&Array.isArray(x)&&x.length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"flex items-center justify-between",children:y.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:["Prompts (",x.length,")"]})}),y.jsx("div",{className:"space-y-3",children:x.map((U,Z)=>y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("span",{className:"text-xs text-muted-foreground",children:[U.modelType||"Prompt"," #",Z+1]}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>o0(U.prompt),"onClick"),className:"h-5 px-1 text-xs",title:"Copy prompt",children:y.jsx(Ja,{className:"h-3 w-3"})})]}),y.jsx("div",{className:"bg-muted/30 rounded-md p-2",children:y.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:U.prompt})})]},Z))})]}),!x&&P&&y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Prompt"}),y.jsxs(ct,{variant:"ghost",size:"sm",onClick:a(()=>o0(P),"onClick"),className:"h-6 px-2 text-xs",title:"Copy prompt",children:[y.jsx(Ja,{className:"h-3 w-3 mr-1"}),"Copy"]})]}),y.jsx("div",{className:"bg-muted/30 rounded-md p-3 relative",children:y.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:typeof P=="string"?P:JSON.stringify(P,null,2)})})]}),Object.keys(L).length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Other Parameters"}),JSON.stringify(L,null,2).length>200?y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>s(!i),"onClick"),className:"h-6 px-2 text-xs",children:i?"Show less":"Show more"}):null]}),y.jsxs("div",{className:"bg-muted/30 rounded-md p-3 relative group",children:[y.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:(()=>{const U=JSON.stringify(L,null,2),Z=U.length>200;return i||!Z?U:Ek(U,200)})()}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>o0(JSON.stringify(L,null,2)),"onClick"),className:"absolute top-1 right-1 h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity",title:"Copy parameters",children:y.jsx(Ja,{className:"h-3 w-3"})})]})]})]})},"renderParams"),C=a(()=>{const O=e.body?.response;if(!O)return null;if(O==="[array]")return y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(Io,{className:"h-3 w-3"}),y.jsx("span",{children:"Array response data"})]});const P=typeof O=="object"?JSON.stringify(O,null,2):String(O),L=P.length>300;return y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Response"}),L&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>l(!o),"onClick"),className:"h-6 px-2 text-xs",children:o?"Show less":"Show more"})]}),y.jsxs("div",{className:"bg-muted/30 rounded-md p-3 relative group max-h-64 overflow-y-auto",children:[y.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:o||!L?P:Ek(P,300)}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>o0(P),"onClick"),className:"absolute top-1 right-1 h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity",title:"Copy response",children:y.jsx(Ja,{className:"h-3 w-3"})})]})]})},"renderResponse"),M=e.body?.params||e.body?.response||e.message||e.details;return y.jsxs("div",{className:"border rounded-lg bg-card hover:shadow-sm transition-all duration-200 group",children:[y.jsx("div",{className:"p-4 pb-3",children:y.jsxs("div",{className:"flex items-start justify-between",children:[y.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[y.jsx("div",{className:"p-2 rounded-lg bg-muted",children:y.jsx(g,{className:"h-4 w-4 text-muted-foreground"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("h4",{className:"font-semibold text-sm",children:h?d:m}),y.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:h?"Action":u}),e.body?.promptCount&&e.body.promptCount>1&&y.jsxs(ya,{variant:"secondary",className:"text-xs px-1.5",children:[e.body.promptCount," prompts"]})]}),y.jsxs("div",{className:"space-y-1",children:[(c||h)&&y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(X2,{className:"h-3 w-3"}),y.jsx("code",{className:"font-mono",children:h?`Action ID: ${e.body?.actionId?.slice(-8)||"N/A"}`:c})]}),y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(am,{className:"h-3 w-3"}),y.jsx("span",{children:lwe(e.createdAt||e.timestamp)}),e.id&&y.jsxs(y.Fragment,{children:[y.jsx("span",{children:"•"}),y.jsx("code",{className:"text-[10px] bg-muted px-1 rounded",children:e.id.slice(-8)})]})]})]}),b&&y.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),y.jsx("span",{className:"font-mono",children:b.total.toLocaleString()})]}),b.prompt>0&&y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsx("span",{children:"In:"}),y.jsx("span",{className:"font-mono",children:b.prompt.toLocaleString()})]}),b.completion>0&&y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsx("span",{children:"Out:"}),y.jsx("span",{className:"font-mono",children:b.completion.toLocaleString()})]})]})]})]}),y.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[M&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>n(!r),"onClick"),className:"h-8 w-8 p-0",title:r?"Collapse details":"Expand details",children:r?y.jsx(rA,{className:"h-3 w-3"}):y.jsx(as,{className:"h-3 w-3"})}),e.id&&t&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>{typeof e.id=="string"&&t(e.id)},"onClick"),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:"Delete log entry",children:y.jsx(Nl,{className:"h-3 w-3"})})]})]})}),r&&M&&y.jsxs(y.Fragment,{children:[y.jsx(Ui,{}),y.jsxs("div",{className:"p-4 pt-3 space-y-4",children:[A(),C(),(e.message||e.details)&&y.jsxs("div",{className:"space-y-2",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Additional Info"}),y.jsxs("div",{className:"bg-muted/30 rounded-md p-3",children:[e.message&&y.jsxs("div",{className:"text-xs mb-2",children:[y.jsx("span",{className:"font-medium text-muted-foreground",children:"Message: "}),y.jsx("span",{children:e.message})]}),e.details&&y.jsxs("div",{className:"text-xs",children:[y.jsx("span",{className:"font-medium text-muted-foreground",children:"Details: "}),y.jsx("span",{children:e.details})]})]})]})]})]}),!r&&M&&y.jsxs(y.Fragment,{children:[y.jsx(Ui,{}),y.jsx("div",{className:"p-4 pt-3",children:y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(ea,{className:"h-3 w-3"}),y.jsx("span",{children:(()=>{const O=[];return e.body?.promptCount&&e.body.promptCount>0&&O.push(`${e.body.promptCount} prompt${e.body.promptCount>1?"s":""}`),e.body?.params&&O.push("parameters"),e.body?.response&&O.push("response data"),O.length>0?`Contains ${O.join(" and ")}`:"Contains additional data"})()}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>n(!0),"onClick"),className:"h-5 px-2 text-xs ml-auto",children:"View details"})]})})]})]})}a(hwe,"ActionCard");function fwe({loadingMore:e,onLoadMore:t}){return y.jsx("div",{className:"flex justify-center py-6",children:e?y.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[y.jsx(Td,{className:"h-4 w-4 animate-spin"}),y.jsx("span",{className:"text-sm",children:"Loading more actions..."})]}):y.jsx(ct,{variant:"outline",onClick:t,className:"px-8",children:"Load More"})})}a(fwe,"LoadingIndicator");function pwe({selectedType:e,searchQuery:t}){return y.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center p-8",children:[y.jsx(Io,{className:"h-16 w-16 text-muted-foreground/30 mb-4"}),y.jsx("h3",{className:"text-lg font-medium mb-2",children:"No Actions Found"}),y.jsx("p",{className:"text-muted-foreground max-w-md mb-4",children:t?`No actions match "${t}". Try adjusting your search or filter.`:e==="all"?"Actions will appear here once the agent has performed operations.":`No ${e} actions found.`}),t&&y.jsx(ct,{variant:"outline",onClick:a(()=>{},"onClick"),children:"Clear Search"})]})}a(pwe,"EmptyState");function mwe({agentId:e,roomId:t}){const[r,n]=H.useState("all"),[i,s]=H.useState(""),[o,l]=H.useState(s0),[u,c]=H.useState(!1),h=H.useRef(null),d=["embedding","text_embedding"],{data:g=[],isLoading:m,error:b}=wle(e,t,d),{mutate:x}=_le(),{confirm:A,isOpen:C,onOpenChange:M,onConfirm:O,options:P}=Ql(),L=g.filter(f=>{if(r!=="all"){const w=f.body?.modelType||"",v=lU(w),_=f.type==="action";switch(r){case"llm":if(v!=="LLM"&&!_)return!1;break;case"transcription":if(v!=="Transcription")return!1;break;case"image":if(v!=="Image")return!1;break;case"other":if(v!=="Other"&&v!=="Unknown"&&!_)return!1;break}}if(i.trim()){const w=i.toLowerCase();return[f.body?.modelType,f.body?.modelKey,f.id,f.message,JSON.stringify(f.body?.params),JSON.stringify(f.body?.response)].filter(Boolean).join(" ").toLowerCase().includes(w)}return!0}),U=H.useCallback(()=>{if(!h.current||u||o>=L.length)return;const{scrollTop:f,scrollHeight:w,clientHeight:v}=h.current;f+v>=w-200&&(c(!0),setTimeout(()=>{l(S=>Math.min(S+s0,L.length)),c(!1)},500))},[u,o,L.length]);H.useEffect(()=>{l(s0)},[r,i]),H.useEffect(()=>{const f=h.current;if(f)return f.addEventListener("scroll",U),()=>f.removeEventListener("scroll",U)},[U]);const Z=L.slice(0,o),Y=o<L.length,re=dwe(Z),F=a(f=>{A({title:"Delete Log Entry",description:"Are you sure you want to permanently delete this log entry? This action cannot be undone.",confirmText:"Delete",variant:"destructive"},()=>{x({agentId:e,logId:f})})},"handleDelete"),$=a(()=>{l(f=>f+s0)},"handleLoadMore");return m&&g.length===0?y.jsx("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("div",{className:"flex flex-col items-center gap-4",children:[y.jsx(Td,{className:"h-8 w-8 animate-spin text-muted-foreground"}),y.jsxs("div",{className:"text-center",children:[y.jsx("h3",{className:"font-medium",children:"Loading Actions"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"Fetching agent action history..."})]})]})})}):b?y.jsx("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("div",{className:"text-center",children:[y.jsx(Io,{className:"h-12 w-12 text-destructive mx-auto mb-4"}),y.jsx("h3",{className:"font-medium text-destructive",children:"Failed to Load Actions"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"There was an error loading the agent actions."})]})})}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:[y.jsxs("div",{className:"flex justify-between items-center mb-4 px-4 pt-4 flex-none border-b pb-3",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("h3",{className:"text-lg font-medium",children:" Actions"}),!m&&y.jsx("span",{className:"ml-2 text-xs px-2 py-1 rounded bg-muted text-muted-foreground",children:L.length})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs("div",{className:"relative",children:[y.jsx(Eh,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),y.jsx(pn,{placeholder:"Search actions...",value:i,onChange:a(f=>s(f.target.value),"onChange"),className:"pl-10 w-64"})]}),y.jsxs(Ys,{value:r,onValueChange:a(f=>n(f),"onValueChange"),children:[y.jsx(es,{className:"w-40",children:y.jsx(Zs,{placeholder:"Filter actions"})}),y.jsxs(ts,{children:[y.jsx(Nr,{value:"all",children:"All Actions"}),y.jsx(Nr,{value:"llm",children:"LLM Calls"}),y.jsx(Nr,{value:"transcription",children:"Transcriptions"}),y.jsx(Nr,{value:"image",children:"Image Operations"}),y.jsx(Nr,{value:"other",children:"Other"})]})]})]})]}),y.jsx("div",{ref:h,className:"flex-1 overflow-y-auto px-4",children:L.length===0?y.jsx(pwe,{selectedType:r,searchQuery:i}):y.jsxs("div",{className:"space-y-4",children:[Object.entries(re).map(([f,w])=>y.jsxs("div",{className:"space-y-3",children:[y.jsxs("div",{className:"flex items-center gap-3 py-2",children:[y.jsx(Ui,{className:"flex-1"}),y.jsx("span",{className:"text-sm font-medium text-muted-foreground px-2",children:f}),y.jsx(Ui,{className:"flex-1"})]}),y.jsx("div",{className:"space-y-3",children:w.map((v,_)=>y.jsx(hwe,{action:v,onDelete:F},v.id||_))})]},f)),Y&&y.jsx(fwe,{loadingMore:u,onLoadMore:$})]})})]}),y.jsx(Xl,{open:C,onOpenChange:M,title:P?.title||"",description:P?.description||"",confirmText:P?.confirmText,cancelText:P?.cancelText,variant:P?.variant,onConfirm:O})]})}a(mwe,"AgentActionViewer");function gwe({isOpen:e,onClose:t,memory:r,agentId:n}){const{toast:i}=Ur(),{mutate:s,isPending:o}=Ele(),{mutate:l,isPending:u}=xle(),[c,h]=H.useState(""),[d,g]=H.useState(!0),[m,b]=H.useState(!1),[x,A]=H.useState(!1),C=H.useRef(null),M=o||u,O=JSON.stringify(r.content,null,2),{confirm:P,isOpen:L,onOpenChange:U,onConfirm:Z,options:Y}=Ql();H.useEffect(()=>{e&&(h(O),g(!0),A(!1),b(!1),setTimeout(()=>{C.current?.focus()},100))},[e,O]),H.useEffect(()=>{A(c!==O)},[c,O]),H.useEffect(()=>{if(!c.trim()){g(!1);return}try{JSON.parse(c),g(!0)}catch{g(!1)}},[c]),H.useEffect(()=>{const S=a(T=>{T.key==="Escape"&&e&&(x?P({title:"Discard Unsaved Changes?",description:"You have unsaved changes. Are you sure you want to close without saving?",confirmText:"Discard",variant:"destructive"},()=>{t()}):t())},"handleEscape");return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[e,x,t]);const re=H.useCallback(()=>{if(!c.trim()){i({title:"Error",description:"Memory content cannot be empty",variant:"destructive"});return}if(!d){i({title:"Invalid JSON",description:"Please fix JSON syntax errors before saving",variant:"destructive"});return}try{const S=JSON.parse(c);s({agentId:n,memoryId:r.id,memoryData:{content:S}},{onSuccess:a(()=>{t(),i({title:"Memory Updated",description:"The memory content has been successfully updated"})},"onSuccess"),onError:a(T=>{i({title:"Update Failed",description:T.message||"Failed to update memory",variant:"destructive"})},"onError")})}catch{i({title:"Invalid JSON",description:"Please enter valid JSON format",variant:"destructive"})}},[c,d,s,n,r.id,t,i]),F=H.useCallback(()=>{P({title:"Delete Memory",description:"Are you sure you want to delete this memory? This action cannot be undone.",confirmText:"Delete",variant:"destructive"},()=>{l({agentId:n,memoryId:r.id},{onSuccess:a(()=>{t(),i({title:"Memory Deleted",description:"The memory has been successfully removed"})},"onSuccess"),onError:a(S=>{i({title:"Delete Failed",description:S.message||"Failed to delete memory",variant:"destructive"})},"onError")})})},[l,n,r.id,t,i]),$=H.useCallback(()=>{try{const S=JSON.parse(c);h(JSON.stringify(S,null,2)),i({title:"Formatted",description:"JSON has been formatted"})}catch{i({title:"Format Error",description:"Cannot format invalid JSON",variant:"destructive"})}},[c,i]),f=H.useCallback(()=>{P({title:"Reset Changes",description:"Reset to original content? All unsaved changes will be lost.",confirmText:"Reset",variant:"destructive"},()=>{h(O)})},[O]),w=H.useCallback(async()=>{try{await navigator.clipboard.writeText(c),i({title:"Copied",description:"Content copied to clipboard"})}catch{i({title:"Copy Failed",description:"Failed to copy to clipboard",variant:"destructive"})}},[c,i]),v=a(S=>new Date(S).toLocaleString(),"formatTimestamp"),_=a(S=>{S.target===S.currentTarget&&(x?P({title:"Discard Unsaved Changes?",description:"You have unsaved changes. Are you sure you want to close without saving?",confirmText:"Discard",variant:"destructive"},()=>{t()}):t())},"handleOverlayClick");return e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-50 p-4",onClick:_,role:"dialog","aria-modal":"true","aria-labelledby":"memory-edit-title",children:y.jsxs(ds,{className:"w-full max-w-4xl h-[85vh] max-h-[800px] flex flex-col",onClick:a(S=>S.stopPropagation(),"onClick"),children:[y.jsxs(ag,{className:"flex flex-row items-center justify-between space-y-0 pb-2 flex-shrink-0",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Kw,{id:"memory-edit-title",className:"text-xl font-semibold",children:"Edit Memory Content"}),x&&y.jsx("span",{className:"text-xs px-2 py-1 rounded bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",children:"Unsaved changes"})]}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:t,"aria-label":"Close dialog",children:y.jsx(wi,{className:"h-4 w-4"})})]}),y.jsx(Ui,{}),y.jsxs(Kl,{className:"pt-4 flex-1 overflow-hidden flex flex-col",children:[y.jsxs("div",{className:"mb-4 flex items-start bg-amber-50 dark:bg-amber-950/50 border border-amber-200 dark:border-amber-800 rounded-md p-3",children:[y.jsx(Uy,{className:"h-4 w-4 text-amber-600 dark:text-amber-400 mr-2 mt-0.5 flex-shrink-0"}),y.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-200",children:[y.jsx("p",{className:"font-medium mb-1",children:"Editing Raw Memory Content"}),y.jsx("p",{children:"Changes may affect agent behavior. Ensure JSON format is valid before saving."})]})]}),y.jsxs("div",{className:"mb-4 grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"ID:"}),y.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:r.id})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Created:"}),y.jsx("span",{children:v(r.createdAt||0)})]})]}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Room:"}),y.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:r.roomId})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Type:"}),y.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${r.entityId===n?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":"bg-white-100 text-white dark:bg-white-800 dark:text-white"}`,children:r.entityId===n?"Agent Message":"User Message"})]})]})]}),y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("label",{htmlFor:"memory-content",className:"text-sm font-medium",children:"Memory Content"}),y.jsxs("div",{className:"flex items-center gap-1",children:[d?y.jsx(Qs,{className:"h-3 w-3 text-green-500"}):y.jsx(Uy,{className:"h-3 w-3 text-red-500"}),y.jsx("span",{className:`text-xs ${d?"text-green-600":"text-red-600"}`,children:d?"Valid JSON":"Invalid JSON"})]})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(ct,{variant:"outline",size:"sm",onClick:a(()=>b(!m),"onClick"),disabled:M,title:m?"Switch to edit mode":"Switch to preview mode",children:m?y.jsx(Ps,{className:"h-3 w-3"}):y.jsx(Ya,{className:"h-3 w-3"})}),y.jsx(ct,{variant:"outline",size:"sm",onClick:w,disabled:M,title:"Copy to clipboard",children:y.jsx(Ja,{className:"h-3 w-3"})}),y.jsx(ct,{variant:"outline",size:"sm",onClick:$,disabled:M||!d,title:"Format JSON",children:"Format"}),y.jsx(ct,{variant:"outline",size:"sm",onClick:f,disabled:M||!x,title:"Reset to original",children:y.jsx(fA,{className:"h-3 w-3"})})]})]}),y.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[m?y.jsx("div",{className:"flex-1 border rounded-md p-3 bg-muted/50 overflow-auto",children:y.jsx("pre",{className:"text-sm whitespace-pre-wrap",children:d?JSON.stringify(JSON.parse(c),null,2):c})}):y.jsx(Ah,{ref:C,id:"memory-content",value:c,onChange:a(S=>h(S.target.value),"onChange"),className:`flex-1 resize-none font-mono text-sm min-h-[300px] ${d?"":"border-red-300 focus:border-red-500"}`,placeholder:"Memory content in JSON format...",disabled:M,"aria-describedby":"json-help"}),y.jsx("p",{id:"json-help",className:"text-xs text-muted-foreground mt-2 flex-shrink-0",children:"Edit the JSON directly. Use Ctrl+A to select all, Ctrl+Z to undo."})]})]}),y.jsxs(sg,{className:"flex justify-between flex-shrink-0",children:[y.jsxs(ct,{variant:"destructive",onClick:F,disabled:M,children:[y.jsx(xh,{className:"mr-2 h-4 w-4"}),"Delete Memory"]}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx(ct,{variant:"outline",onClick:t,disabled:M,children:"Cancel"}),y.jsxs(ct,{onClick:re,disabled:M||!d||!x,children:[y.jsx(pA,{className:"mr-2 h-4 w-4"}),o?"Saving...":"Save Changes"]})]})]})]})}),y.jsx(Xl,{open:L,onOpenChange:U,title:Y?.title||"",description:Y?.description||"",confirmText:Y?.confirmText,cancelText:Y?.cancelText,variant:Y?.variant,onConfirm:Z})]}):null}a(gwe,"MemoryEditOverlay");const l0=15;function vwe({agentId:e,agentName:t,channelId:r}){const[n,i]=H.useState("all"),[s,o]=H.useState(""),[l,u]=H.useState(null),[c,h]=H.useState(l0),[d,g]=H.useState(!1),m=H.useRef(null),{data:b}=$w(),x=n==="facts"?void 0:"messages",A=n==="facts"||n==="all"?"facts":void 0,C=n==="currentChat"&&r?r:void 0,{data:M=[],isLoading:O,error:P}=mE(e,x,C),{data:L=[],isLoading:U,error:Z}=mE(e,A,C),Y=[...M,...L],re=O||U,F=P||Z,$=Y.filter(I=>{if(n!=="all"&&n!=="currentChat"){if(n==="facts")return!0;if(n==="messagesSent"&&I.entityId!==I.agentId||n==="messagesReceived"&&I.entityId===I.agentId)return!1}if(s.trim()){const R=s.toLowerCase(),z=I.content;return[z?.text,z?.thought,I.id,I.metadata].filter(Boolean).join(" ").toLowerCase().includes(R)}return!0}),f=H.useCallback(()=>{if(!m.current||d||c>=$.length)return;const{scrollTop:I,scrollHeight:R,clientHeight:z}=m.current;I+z>=R-200&&(g(!0),setTimeout(()=>{h(V=>Math.min(V+l0,$.length)),g(!1)},500))},[d,c,$.length]);H.useEffect(()=>{h(l0)},[n,s]),H.useEffect(()=>{const I=m.current;if(I)return I.addEventListener("scroll",f),()=>I.removeEventListener("scroll",f)},[f]);const w=a(I=>{const R=new Date(I),B=(new Date().getTime()-R.getTime())/(1e3*60*60);return B<24?R.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):B<168?R.toLocaleDateString([],{weekday:"short",hour:"2-digit",minute:"2-digit"}):R.toLocaleDateString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},"formatDate"),v=a((I,R)=>R?.thought?D0:I.entityId===I.agentId?Q2:jA,"getMemoryIcon"),_=a(async I=>{try{await navigator.clipboard.writeText(I)}catch(R){console.error("Failed to copy:",R)}},"copyToClipboard"),S=a(I=>{const R={};for(const z of I){const V=new Date(z.createdAt||0).toLocaleDateString();R[V]||(R[V]=[]),R[V].push(z)}return R},"groupMessagesByDate"),T=$.slice(0,c),N=c<$.length,k=S(T);if(re&&Y.length===0)return y.jsx("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("div",{className:"flex flex-col items-center gap-4",children:[y.jsx(Td,{className:"h-8 w-8 animate-spin text-muted-foreground"}),y.jsxs("div",{className:"text-center",children:[y.jsx("h3",{className:"font-medium",children:"Loading Memories"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"Fetching agent conversation history..."})]})]})})});if(F)return y.jsx("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("div",{className:"text-center",children:[y.jsx(Io,{className:"h-12 w-12 text-destructive mx-auto mb-4"}),y.jsx("h3",{className:"font-medium text-destructive",children:"Failed to Load Memories"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"There was an error loading the agent memories."})]})})});const p=a(()=>y.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center p-8",children:[y.jsx(Io,{className:"h-16 w-16 text-muted-foreground/30 mb-4"}),y.jsx("h3",{className:"text-lg font-medium mb-2",children:"No Memories Found"}),y.jsx("p",{className:"text-muted-foreground max-w-md mb-4",children:s?`No memories match "${s}". Try adjusting your search or filter.`:"This agent hasn't created any memories yet. Memories will appear here as the agent interacts."}),s&&y.jsx(ct,{variant:"outline",onClick:a(()=>o(""),"onClick"),children:"Clear Search"})]}),"EmptyState"),E=a(({memory:I})=>{const R=I.content,z=v(I,R),B=I.entityId===I.agentId,W=a(()=>B?b?.data?.agents?.find(ne=>ne.id===I.entityId)?.name||t:I.metadata?.raw?.senderName||I.metadata?.source||"User","getEntityName")();return y.jsxs("div",{className:"border rounded-lg p-4 bg-card hover:bg-accent/5 transition-colors group",children:[y.jsxs("div",{className:"flex items-start justify-between mb-3",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"p-2 rounded-md bg-muted",children:y.jsx(z,{className:"h-4 w-4"})}),y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"font-medium text-sm",children:W}),y.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:R?.thought?"Thought":B?"Agent":"User"})]}),y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mt-1",children:[y.jsx(am,{className:"h-3 w-3"}),y.jsx("span",{children:w(I.createdAt||0)}),I.id&&y.jsxs(y.Fragment,{children:[y.jsx("span",{children:"•"}),y.jsx("code",{className:"text-[10px] bg-muted px-1 rounded",children:I.id.slice(-8)})]})]})]})]}),y.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[R?.text&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>_(R.text||""),"onClick"),className:"h-8 w-8 p-0",title:"Copy text",children:y.jsx(Ja,{className:"h-3 w-3"})}),I.id&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>u(I),"onClick"),className:"h-8 w-8 p-0",title:"Edit memory",children:y.jsx(UF,{className:"h-3 w-3"})})]})]}),y.jsxs("div",{className:"space-y-3",children:[R?.text&&y.jsx("div",{className:"bg-muted/50 rounded-md p-3",children:y.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:R.text})}),R?.thought&&y.jsxs("div",{className:"border-l-2 border-muted pl-3",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx(D0,{className:"h-3 w-3 text-muted-foreground"}),y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Thought Process"})]}),y.jsx("p",{className:"text-xs text-muted-foreground italic leading-relaxed",children:String(R.thought)})]}),(R?.actions||R?.providers||R?.source)&&y.jsxs("div",{className:"flex flex-wrap gap-1",children:[R.actions?.map(oe=>y.jsx("span",{className:"text-xs px-2 py-1 bg-muted rounded text-muted-foreground",title:"Action",children:oe},oe)),R.providers?.map(oe=>y.jsx("span",{className:"text-xs px-2 py-1 bg-muted rounded text-muted-foreground",title:"Provider",children:oe},oe)),R.source&&y.jsx("span",{className:"text-xs px-2 py-1 bg-muted rounded text-muted-foreground",children:R.source})]}),I.metadata&&Object.keys(I.metadata).length>0&&y.jsxs("details",{className:"text-xs",children:[y.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"View metadata"}),y.jsx("div",{className:"mt-2 p-2 bg-muted/30 rounded text-[10px] font-mono overflow-x-auto",children:y.jsx("pre",{children:JSON.stringify(I.metadata,null,2)})})]})]})]})},"MemoryCard");return y.jsxs("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:[y.jsxs("div",{className:"flex justify-between items-center mb-4 px-4 pt-4 flex-none border-b pb-3",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("h3",{className:"text-lg font-medium",children:"Memories"}),!re&&y.jsx("span",{className:"ml-2 text-xs px-2 py-1 rounded bg-muted text-muted-foreground",children:$.length})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs("div",{className:"relative",children:[y.jsx(Eh,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),y.jsx(pn,{placeholder:"Search memories...",value:s,onChange:a(I=>o(I.target.value),"onChange"),className:"pl-10 w-full min-w-0 max-w-64"})]}),y.jsxs(Ys,{value:n,onValueChange:a(I=>i(I),"onValueChange"),children:[y.jsx(es,{className:"w-40",children:y.jsx(Zs,{placeholder:"Filter memories"})}),y.jsxs(ts,{children:[y.jsx(Nr,{value:"all",children:"All Messages"}),r&&y.jsx(Nr,{value:"currentChat",children:"Current Chat"}),y.jsx(Nr,{value:"messagesSent",children:"Agent Messages"}),y.jsx(Nr,{value:"messagesReceived",children:"User Messages"}),y.jsx(Nr,{value:"facts",children:"Facts"})]})]})]})]}),y.jsx("div",{ref:m,className:"flex-1 overflow-y-auto px-4",children:$.length===0?y.jsx(p,{}):y.jsxs("div",{className:"space-y-4",children:[Object.entries(k).map(([I,R])=>y.jsxs("div",{className:"space-y-3",children:[y.jsxs("div",{className:"flex items-center gap-3 py-2",children:[y.jsx(Ui,{className:"flex-1"}),y.jsx("span",{className:"text-sm font-medium text-muted-foreground px-2",children:I}),y.jsx(Ui,{className:"flex-1"})]}),y.jsx("div",{className:"space-y-3",children:R.map(z=>y.jsx(E,{memory:z},z.id||z.createdAt))})]},I)),N&&y.jsx("div",{className:"flex justify-center py-6",children:d?y.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[y.jsx(Td,{className:"h-4 w-4 animate-spin"}),y.jsx("span",{className:"text-sm",children:"Loading more memories..."})]}):y.jsx(ct,{variant:"outline",onClick:a(()=>h(I=>I+l0),"onClick"),className:"px-8",children:"Load More"})})]})}),l&&y.jsx(gwe,{isOpen:!!l,onClose:a(()=>u(null),"onClose"),memory:l,agentId:e})]})}a(vwe,"AgentMemoryViewer");function uU(e){const[t,r]=H.useState(!1),{toast:n}=Ur(),i=Yn(),s=Dn();return{handleDelete:H.useCallback(async()=>{r(!0),n({title:"Deleting...",description:`Deleting agent "${e.name}"`});let l=!1,u=null;try{u=setTimeout(()=>{l||(s.invalidateQueries({queryKey:["agents"]}),i("/"),n({title:"Note",description:"Deletion is still processing in the background."}))},8e3);const c=Or();if(!e.id)throw new Error("Agent ID is required for deletion");const h=await c.agents.deleteAgent(e.id);l=!0,u&&clearTimeout(u);const d=h?.partial;n(d?{title:"Processing",description:"Deletion is still in progress and will complete in the background."}:{title:"Success",description:"Agent deleted successfully"}),s.invalidateQueries({queryKey:["agents"]}),i("/")}catch(c){l=!0,u&&clearTimeout(u);const h=c?.message??"Failed to delete agent",d=c?.statusCode||c?.response?.status;d===409||h.includes("409")||h.includes("Conflict")||h.includes("foreign key constraint")||h.includes("active references")?n({title:"Cannot Delete",description:"This agent cannot be deleted because it has active references. Try stopping the agent first.",variant:"destructive"}):d===408||d===504||h.includes("408")||h.includes("504")||h.includes("timeout")||h.includes("timed out")?(n({title:"Operation Timeout",description:"The deletion is taking longer than expected and will continue in the background.",variant:"destructive"}),s.invalidateQueries({queryKey:["agents"]}),i("/")):n({title:"Error",description:h,variant:"destructive"})}finally{r(!1)}},[e,n,i,s]),isDeleting:t}}a(uU,"useDeleteAgent");function cU({agent:e,agentId:t,onSaveComplete:r}){const{toast:n}=Ur(),i=Yn(),s=Dn(),{confirm:o,isOpen:l,onOpenChange:u,onConfirm:c,options:h}=Ql(),d=e?.status===vn.ACTIVE,g=H.useRef(null),[m,b]=H.useState({}),{handleDelete:x,isDeleting:A}=uU(e),C=$L(e),{stopAgent:M,isAgentStopping:O}=oc(),P=a(async()=>{try{await M(e),n({title:"Success",description:"Agent stopped successfully"})}catch(Z){n({title:"Error",description:Z instanceof Error?Z.message:"Failed to stop agent",variant:"destructive"})}},"handleStopAgent"),L=a(async()=>{if(!t){n({title:"Error",description:"Agent ID is missing",variant:"destructive"});return}const Z=a(async()=>{try{const Y=Or(),re=Object.keys(m).length>0?m:g.current?.getSecrets()||{},F=C.getChangedFields();if(re&&Object.keys(re).length>0){F.settings||(F.settings={});const f=Object.entries(re).filter(([w,v])=>v!==null).reduce((w,[v,_])=>({...w,[v]:_}),{});F.settings.secrets=f}if(Object.keys(F).length===0){const f=C.agent?.settings?.secrets;if(f&&Object.keys(f).length>0){const w={id:t,settings:{secrets:f}};await Y.agents.updateAgent(t,w),s.invalidateQueries({queryKey:["agent",t]}),s.invalidateQueries({queryKey:["agents"]}),n({title:"Success",description:"Agent secrets updated successfully"}),r?r():i("/");return}n({title:"No Changes",description:"No changes were made to the agent"}),r?r():i("/");return}const $={id:t,...F};await Y.agents.updateAgent(t,$),s.invalidateQueries({queryKey:["agent",t]}),s.invalidateQueries({queryKey:["agents"]}),n({title:"Success",description:"Agent updated successfully"}),r?r():i("/")}catch(Y){throw n({title:"Error",description:Y instanceof Error?Y.message:"Failed to update agent",variant:"destructive"}),Y}},"performSave");if(g?.current){const Y=g.current.validateSecrets();if(!Y.isValid){o({title:"Missing Required Secrets",description:`The following required secrets are missing: ${Y.missingSecrets.join(", ")}. Do you want to save anyway?`,confirmText:"Save Anyway",cancelText:"Cancel",variant:"destructive"},Z);return}}await Z()},"handleSubmit"),U=a(()=>{A||o({title:"Delete Agent",description:`Are you sure you want to delete the agent "${e.name}"? This action cannot be undone.`,confirmText:"Delete",variant:"destructive"},x)},"handleDelete");return y.jsxs(y.Fragment,{children:[y.jsx(FL,{characterValue:C.agent,setCharacterValue:C,title:"Agent Settings",description:"Configure your AI agent's behaviour and capabilities.",onSubmit:L,onReset:C.reset,onDelete:U,onStopAgent:d?P:void 0,isAgent:!0,isDeleting:A,isStopping:O(t),customComponents:[{name:"Plugins",component:y.jsx(VL,{characterValue:C.agent,setCharacterValue:C,initialPlugins:e.plugins})},{name:"Secret",component:y.jsx(Dw,{characterValue:C.agent,ref:g,onChange:a(Z=>{b(Z),C.updateSettings({secrets:Z})},"onChange")})},{name:"Avatar",component:y.jsx(HL,{characterValue:C.agent,setCharacterValue:C})}]}),y.jsx(Xl,{open:l,onOpenChange:u,title:h?.title||"",description:h?.description||"",confirmText:h?.confirmText,cancelText:h?.cancelText,variant:h?.variant,onConfirm:c})]})}a(cU,"AgentSettings");const Sk="eliza-agent-tab-states";function bwe(e){const[t,r]=H.useState("details"),n=H.useCallback(()=>{try{const o=localStorage.getItem(Sk);return o?JSON.parse(o):{}}catch(o){return Je.error("Error reading agent tab states from localStorage:",o),{}}},[]),i=H.useCallback(o=>{try{localStorage.setItem(Sk,JSON.stringify(o))}catch(l){Je.error("Error saving agent tab states to localStorage:",l)}},[]);H.useEffect(()=>{if(!e){r("details");return}const l=n()[e]||"details";r(l)},[e,n]);const s=H.useCallback(o=>{if(r(o),e){const u={...n(),[e]:o};i(u)}},[e,n,i]);return{currentTab:t,setTab:s}}a(bwe,"useAgentTabState");class ywe{static{a(this,"ElizaSpanAdapter")}convertRunDetailToTraceSpans(t){const r=t.events;if(!r||r.length===0)return[];const n=[...r].sort((l,u)=>l.timestamp-u.timestamp),i=new Map,s=new Map,o=[];return n.forEach((l,u)=>{switch(l.type){case"RUN_STARTED":{const c=this.createRunSpan(t,l);o.push(c);break}case"ACTION_STARTED":{const c=l.data.actionName||l.data.actionId||`Action ${u}`,h=l.data.actionId||c;let d=i.get(h);d||(d={id:`action-${h}`,title:c,type:"agent_invocation",status:"pending",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp),duration:0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data),children:[]},i.set(h,d),o.push(d));const g=(d.children?.length||0)+1,m={id:`attempt-${h}-${g}`,title:`Attempt ${g}`,type:"span",status:"pending",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp),duration:0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data),children:[]};d.children=[...d.children||[],m],s.set(h,m);break}case"ACTION_COMPLETED":{const c=l.data.actionName||l.data.actionId||`Action ${u}`,h=l.data.actionId||c,d=i.get(h),g=s.get(h),m=this.extractPrompt(l.data),b=this.extractResponse(l.data);if(g){const x=l.data.success!==!1;g.status=x?"success":"error",g.endTime=new Date(l.timestamp),g.duration=l.timestamp-g.startTime.getTime(),m&&(g.input=m),b&&(g.output=b),s.delete(h)}if(d){const x=l.data.success!==!1;d.status=x?"success":"error",d.endTime=new Date(l.timestamp),d.duration=l.timestamp-d.startTime.getTime(),m&&!d.input&&(d.input=m),b&&!d.output&&(d.output=b)}break}case"MODEL_USED":{const c=l.data.modelType||"Model Call",h=this.extractPrompt(l.data),d=this.extractResponse(l.data),g={id:`model-${u}`,title:c,type:"llm_call",status:"success",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp+(l.data.executionTime||0)),duration:l.data.executionTime||0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data),input:h,output:d,tokensCount:this.extractTokensCount(l.data),cost:this.extractCost(l.data)},b=l.data.actionContext||void 0||Array.from(s.keys()).pop();if(b){const x=s.get(b);if(x)x.children=[...x.children||[],g];else{const A=i.get(b);if(A&&A.children&&A.children.length>0){const C=A.children[A.children.length-1];C.children=[...C.children||[],g]}}}else o.push(g);break}case"EVALUATOR_COMPLETED":{const c=l.data.evaluatorName||`Evaluator ${u}`,h={id:`evaluator-${u}`,title:c,type:"chain_operation",status:"success",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp),duration:0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data)};o.push(h);break}case"EMBEDDING_EVENT":{const c=l.data.status||"completed",h={id:`embedding-${u}`,title:`Embedding ${c}`,type:"embedding",status:c==="failed"?"error":"success",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp+(l.data.durationMs||0)),duration:l.data.durationMs||0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data)},d=Array.from(s.keys()).pop();if(d){const g=s.get(d);g&&(g.children=[...g.children||[],h])}else o.push(h);break}}}),o}createRunSpan(t,r){const n=t.summary,i=n.durationMs||0,s=new Date(r.timestamp),o=new Date(r.timestamp+i);return{id:n.runId,title:`Run ${new Date(n.startedAt||Date.now()).toLocaleTimeString()}`,type:"agent_invocation",status:this.convertRunStatus(n.status),startTime:s,endTime:o,duration:i,raw:JSON.stringify(t,null,2),attributes:[{key:"run.id",value:{stringValue:n.runId}},{key:"run.status",value:{stringValue:n.status}},...n.messageId?[{key:"message.id",value:{stringValue:n.messageId}}]:[],...n.roomId?[{key:"room.id",value:{stringValue:n.roomId}}]:[]],children:[]}}convertRunStatus(t){switch(t){case"completed":return"success";case"error":return"error";case"timeout":return"warning";case"started":return"pending";default:return"pending"}}convertEventDataToAttributes(t){return Object.entries(t).map(([r,n])=>({key:r,value:this.convertValueToAttributeValue(n)}))}convertValueToAttributeValue(t){return typeof t=="string"?{stringValue:t}:typeof t=="number"?{intValue:t.toString()}:typeof t=="boolean"?{boolValue:t}:{stringValue:JSON.stringify(t)}}coerceToNumber(t){if(typeof t=="number")return Number.isFinite(t)?t:void 0;if(typeof t=="string"){const r=Number(t);return Number.isFinite(r)?r:void 0}}extractTokensCount(t){const r=Object.prototype.hasOwnProperty.call(t,"inputTokens"),n=Object.prototype.hasOwnProperty.call(t,"outputTokens");if(r||n){const o=this.coerceToNumber(t.inputTokens)??0,l=this.coerceToNumber(t.outputTokens)??0;return o+l}const i=a(o=>{if(!o||typeof o!="object")return;const l=o,u=this.coerceToNumber(l.total_tokens);if(u!==void 0)return u;const c=Object.prototype.hasOwnProperty.call(l,"prompt_tokens"),h=Object.prototype.hasOwnProperty.call(l,"completion_tokens");if(c||h){const d=this.coerceToNumber(l.prompt_tokens)??0,g=this.coerceToNumber(l.completion_tokens)??0;return d+g}},"extractFromUsage");if(t.response&&typeof t.response=="object"){const o=t.response,l=i(o.usage);if(l!==void 0)return l}const s=i(t.usage);if(s!==void 0)return s}extractCost(t){if(t.cost&&typeof t.cost=="number")return t.cost;if(t.response&&typeof t.response=="object"){const r=t.response;if(r.cost&&typeof r.cost=="number")return r.cost}}extractPrompt(t){if(t.prompts&&Array.isArray(t.prompts)){const r=t.prompts;if(r.length>0)return r.map((n,i)=>(r.length>1?`[Prompt ${i+1}${n.modelType?` - ${n.modelType}`:""}]
|
|
743
|
+
$$`:`${e}$$`},"wo"),D6e=a(e=>{let t=0,r=e.match(/\*+/g)||[];for(let n of r){let i=n.length;i>=3&&(t+=Math.floor(i/3))}return t},"yo"),j6e=a(e=>{if(Rg(e)||E6e.test(e))return e;let t=e.match(m6e);if(t){let r=t[2];if(!r||nu.test(r))return e;if(D6e(e)%2===1)return`${e}***`}return e},"ko"),B6e=a(e=>{if(!e||typeof e!="string")return e;let t=e,r=S6e(t);return r.endsWith("](streamdown:incomplete-link)")?r:(t=r,t=j6e(t),t=k6e(t),t=A6e(t),t=N6e(t),t=I6e(t),t=R6e(t),t=P6e(t),t=L6e(t),t)},"be"),z6e={harden:[Zue,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],defaultOrigin:void 0,allowDataImages:!0}],raw:Ipe,katex:[a2,{errorColor:"var(--color-muted-foreground)"}]},U6e={gfm:[cve,{}],math:[_ve,{singleDollarTextMath:!1}],cjkFriendly:[eme,{}],cjkFriendlyGfmStrikethrough:[rme,{}]},eU=H.createContext(["github-light","github-dark"]),tU=H.createContext(void 0),o_=H.createContext(!0),vc=H.createContext({isAnimating:!1}),rU=H.memo(({content:e,shouldParseIncompleteMarkdown:t,...r})=>{let n=H.useMemo(()=>typeof e=="string"&&t?B6e(e.trim()):e,[e,t]);return y.jsx(CF,{...r,children:n})},(e,t)=>e.content===t.content);rU.displayName="Block";var F6e=["github-light","github-dark"],nU=H.memo(({children:e,parseIncompleteMarkdown:t=!0,components:r,rehypePlugins:n=Object.values(z6e),remarkPlugins:i=Object.values(U6e),className:s,shikiTheme:o=F6e,mermaidConfig:l,controls:u=!0,isAnimating:c=!1,urlTransform:h=a(b=>b,"d"),BlockComponent:d=rU,parseMarkdownIntoBlocksFn:g=d6e,...m})=>{let b=H.useId(),x=H.useMemo(()=>g(typeof e=="string"?e:""),[e,g]);H.useEffect(()=>{Array.isArray(n)&&n.some(C=>Array.isArray(C)?C[0]===a2:C===a2)&&me(()=>Promise.resolve({}),__vite__mapDeps([99]))},[n]);let A=H.useMemo(()=>({isAnimating:c}),[c]);return y.jsx(eU.Provider,{value:o,children:y.jsx(tU.Provider,{value:l,children:y.jsx(o_.Provider,{value:u,children:y.jsx(vc.Provider,{value:A,children:y.jsx("div",{className:fr("space-y-4",s),children:x.map((C,M)=>y.jsx(d,{components:{...s6e,...r},content:C,index:M,rehypePlugins:n,remarkPlugins:i,shouldParseIncompleteMarkdown:t,urlTransform:h,...m},`${b}-block-${M}`))})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating);nU.displayName="Streamdown";const iU=H.memo(({className:e,shikiTheme:t=["github-dark","github-dark"],...r})=>y.jsx(nU,{className:He("!space-y-0 size-full markdown-content",e),shikiTheme:t,...r}),(e,t)=>e.children===t.children&&e.className===t.className&&e.isAnimating===t.isAnimating&&JSON.stringify(e.shikiTheme)===JSON.stringify(t.shikiTheme));iU.displayName="Response";const H6e={damping:.7,stiffness:.05,mass:1.25},G6e=70,V6e=1e3/60,Y6e=350;let Pg=!1;globalThis.document?.addEventListener("mousedown",()=>{Pg=!0});globalThis.document?.addEventListener("mouseup",()=>{Pg=!1});globalThis.document?.addEventListener("click",()=>{Pg=!1});const Z6e=a((e={})=>{const[t,r]=H.useState(!1),[n,i]=H.useState(e.initial!==!1),[s,o]=H.useState(!1),l=H.useRef(null);l.current=e;const u=H.useCallback(()=>{if(!Pg)return!1;const M=window.getSelection();if(!M||!M.rangeCount)return!1;const O=M.getRangeAt(0);return O.commonAncestorContainer.contains(A.current)||A.current?.contains(O.commonAncestorContainer)},[]),c=H.useCallback(M=>{d.isAtBottom=M,i(M)},[]),h=H.useCallback(M=>{d.escapedFromLock=M,r(M)},[]),d=H.useMemo(()=>{let M;return{escapedFromLock:t,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return A.current?.scrollTop??0},set scrollTop(O){A.current&&(A.current.scrollTop=O,d.ignoreScrollToTop=A.current.scrollTop)},get targetScrollTop(){return!A.current||!C.current?0:A.current.scrollHeight-1-A.current.clientHeight},get calculatedTargetScrollTop(){if(!A.current||!C.current)return 0;const{targetScrollTop:O}=this;if(!e.targetScrollTop)return O;if(M?.targetScrollTop===O)return M.calculatedScrollTop;const P=Math.max(Math.min(e.targetScrollTop(O,{scrollElement:A.current,contentElement:C.current}),O),0);return M={targetScrollTop:O,calculatedScrollTop:P},requestAnimationFrame(()=>{M=void 0}),P},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=G6e}}},[]),g=H.useCallback((M={})=>{typeof M=="string"&&(M={animation:M}),M.preserveScrollPosition||c(!0);const O=Date.now()+(Number(M.wait)||0),P=My(l.current,M.animation),{ignoreEscapes:L=!1}=M;let U,Z=d.calculatedTargetScrollTop;M.duration instanceof Promise?M.duration.finally(()=>{U=Date.now()}):U=O+(M.duration??0);const Y=a(async()=>{const re=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:F}=d,$=performance.now(),f=($-(d.lastTick??$))/V6e;if(d.animation||(d.animation={behavior:P,promise:re,ignoreEscapes:L}),d.animation.behavior===P&&(d.lastTick=$),u()||O>Date.now())return Y();if(F<Math.min(Z,d.calculatedTargetScrollTop)){if(d.animation?.behavior===P){if(P==="instant")return d.scrollTop=d.calculatedTargetScrollTop,Y();d.velocity=(P.damping*d.velocity+P.stiffness*d.scrollDifference)/P.mass,d.accumulated+=d.velocity*f,d.scrollTop+=d.accumulated,d.scrollTop!==F&&(d.accumulated=0)}return Y()}return U>Date.now()?(Z=d.calculatedTargetScrollTop,Y()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?g({animation:My(l.current,l.current.resize),ignoreEscapes:L,duration:Math.max(0,U-Date.now())||void 0}):d.isAtBottom)});return re.then(F=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),F))},"next");return M.wait!==!0&&(d.animation=void 0),d.animation?.behavior===P?d.animation.promise:Y()},[c,u,d]),m=H.useCallback(()=>{h(!0),c(!1)},[h,c]),b=H.useCallback(({target:M})=>{if(M!==A.current)return;const{scrollTop:O,ignoreScrollToTop:P}=d;let{lastScrollTop:L=O}=d;d.lastScrollTop=O,d.ignoreScrollToTop=void 0,P&&P>O&&(L=P),o(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||O===P)return;if(u()){h(!0),c(!1);return}const U=O>L,Z=O<L;if(d.animation?.ignoreEscapes){d.scrollTop=L;return}Z&&(h(!0),c(!1)),U&&h(!1),!d.escapedFromLock&&d.isNearBottom&&c(!0)},1)},[h,c,u,d]),x=H.useCallback(({target:M,deltaY:O})=>{let P=M;for(;!["scroll","auto"].includes(getComputedStyle(P).overflow);){if(!P.parentElement)return;P=P.parentElement}P===A.current&&O<0&&A.current.scrollHeight>A.current.clientHeight&&!d.animation?.ignoreEscapes&&(h(!0),c(!1))},[h,c,d]),A=_k(M=>{A.current?.removeEventListener("scroll",b),A.current?.removeEventListener("wheel",x),M?.addEventListener("scroll",b,{passive:!0}),M?.addEventListener("wheel",x,{passive:!0})},[]),C=_k(M=>{if(d.resizeObserver?.disconnect(),!M)return;let O;d.resizeObserver=new ResizeObserver(([P])=>{const{height:L}=P.contentRect,U=L-(O??L);if(d.resizeDifference=U,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),o(d.isNearBottom),U>=0){const Z=My(l.current,O?l.current.resize:l.current.initial);g({animation:Z,wait:!0,preserveScrollPosition:!0,duration:Z==="instant"?void 0:Y6e})}else d.isNearBottom&&(h(!1),c(!0));O=L,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===U&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(M)},[]);return{contentRef:C,scrollRef:A,scrollToBottom:g,stopScroll:m,isAtBottom:n||s,isNearBottom:s,escapedFromLock:t,state:d}},"useStickToBottom");function _k(e,t){const r=H.useCallback(n=>(r.current=n,e(n)),t);return r}a(_k,"useRefCallback");const Iy=new Map;function My(...e){const t={...H6e};let r=!1;for(const i of e){if(i==="instant"){r=!0;continue}typeof i=="object"&&(r=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const n=JSON.stringify(t);return Iy.has(n)||Iy.set(n,Object.freeze(t)),r?"instant":Iy.get(n)}a(My,"mergeAnimations");function $6e(e={}){const{smooth:t=!1}=e,r=H.useRef(!1),n=Z6e({initial:t?"smooth":"instant",resize:t?"smooth":"instant"}),[i,s]=H.useState({isAtBottom:!0,autoScrollEnabled:!0});H.useEffect(()=>{n.isAtBottom?(r.current=!1,s({isAtBottom:!0,autoScrollEnabled:!0})):s(c=>({...c,isAtBottom:!1,autoScrollEnabled:r.current?!1:c.autoScrollEnabled}))},[n.isAtBottom]);const o=H.useCallback(u=>{const c=u?"instant":t?"smooth":"instant";n.scrollToBottom({animation:c,preserveScrollPosition:!1}),s({isAtBottom:!0,autoScrollEnabled:!0}),r.current=!1},[n.scrollToBottom,t]),l=H.useCallback(()=>{n.isAtBottom||(r.current=!0,n.stopScroll(),s(u=>({...u,autoScrollEnabled:!1})))},[n.isAtBottom,n.stopScroll]);return{scrollRef:n.scrollRef,contentRef:n.contentRef,isAtBottom:i.isAtBottom,autoScrollEnabled:i.autoScrollEnabled,scrollToBottom:a(()=>o(!1),"scrollToBottom"),disableAutoScroll:l,_stickToBottom:n}}a($6e,"useAutoScroll");const J6e=a(({className:e,...t})=>y.jsx(RF,{className:He("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),"ResizablePanelGroup"),xk=OF,X6e=a(({withHandle:e,className:t,...r})=>y.jsx(PF,{className:He("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...r,children:e&&y.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:y.jsx(LF,{className:"h-2.5 w-2.5"})})}),"ResizableHandle"),R2=H.forwardRef(({mainAction:e,actions:t,variant:r="default",size:n="default",disabled:i,className:s,mainButtonClassName:o,dropdownButtonClassName:l},u)=>{const c=H.useRef(null),[h,d]=H.useState();return H.useImperativeHandle(u,()=>c.current,[]),H.useLayoutEffect(()=>{c.current&&d(c.current.offsetWidth)},[t.length,e.label]),y.jsxs("div",{ref:c,className:He("flex w-full",s),children:[y.jsxs(ct,{type:"button",variant:r,size:n,onClick:e.onClick,disabled:i||e.disabled,className:He("rounded-r-none flex-1",r==="destructive"?"border-r border-red-700":"border-r-0",o),children:[e.icon&&y.jsx("span",{className:"mr-2",children:e.icon}),e.label]}),y.jsxs(Pd,{children:[y.jsx(Ld,{asChild:!0,children:y.jsxs(ct,{type:"button",variant:r,size:n,disabled:i,className:He("rounded-l-none px-2 flex-shrink-0",l),children:[y.jsx(as,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"More options"})]})}),y.jsx(Dd,{align:"end",style:{width:h},children:t.map((g,m)=>y.jsxs(H.Fragment,{children:[y.jsxs(Xa,{onClick:g.onClick,disabled:g.disabled,className:He(g.variant==="destructive"&&"text-destructive focus:text-destructive hover:bg-red-50 dark:hover:bg-red-950/50"),children:[g.icon,g.label]}),m<t.length-1&&y.jsx(z0,{})]},m))})]})]})});R2.displayName="SplitButton";const Q6e=J2,K6e=DF,W6e=jF,q6e=a(({toolPart:e,defaultOpen:t=!1,className:r})=>{const[n,i]=H.useState(t),{state:s,input:o,output:l,toolCallId:u}=e,c=a(()=>{switch(s){case"input-streaming":return y.jsx(Fn,{className:"h-4 w-4 animate-spin text-blue-500"});case"input-available":return y.jsx(Cl,{className:"h-4 w-4 text-orange-500"});case"output-available":return y.jsx(vA,{className:"h-4 w-4 text-green-500"});case"output-error":return y.jsx(BF,{className:"h-4 w-4 text-red-500"});default:return y.jsx(Cl,{className:"text-muted-foreground h-4 w-4"})}},"getStateIcon"),h=a(()=>{const g="px-2 py-1 rounded-full text-xs font-medium";switch(s){case"input-streaming":return y.jsx("span",{className:He(g,"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400"),children:"Processing"});case"input-available":return y.jsx("span",{className:He(g,"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400"),children:"Ready"});case"output-available":return y.jsx("span",{className:He(g,"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400"),children:"Completed"});case"output-error":return y.jsx("span",{className:He(g,"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400"),children:"Error"});default:return y.jsx("span",{className:He(g,"bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-400"),children:"Pending"})}},"getStateBadge"),d=a(g=>g===null?"null":g===void 0?"undefined":typeof g=="string"?g:typeof g=="object"?JSON.stringify(g,null,2):String(g),"formatValue");return y.jsx("div",{className:He("border-border mt-3 overflow-hidden rounded-lg border",r),children:y.jsxs(Q6e,{open:n,onOpenChange:i,children:[y.jsx(K6e,{asChild:!0,children:y.jsxs(ct,{variant:"ghost",className:"bg-background h-auto w-full justify-between rounded-b-none px-3 py-2 font-normal",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[c(),y.jsx("span",{className:"font-mono text-sm font-medium",children:e.type}),h()]}),y.jsx(as,{className:He("h-4 w-4",n&&"rotate-180")})]})}),y.jsx(W6e,{className:He("border-border border-t","data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down overflow-hidden"),children:y.jsxs("div",{className:"bg-background space-y-3 p-3",children:[o&&Object.keys(o).length>0&&y.jsxs("div",{children:[y.jsx("h4",{className:"text-muted-foreground mb-2 text-sm font-medium",children:"Input"}),y.jsx("div",{className:"bg-background rounded border p-2 font-mono text-sm",children:Object.entries(o).map(([g,m])=>y.jsxs("div",{className:"mb-1",children:[y.jsxs("span",{className:"text-muted-foreground",children:[g,":"]})," ",y.jsx("span",{children:d(m)})]},g))})]}),l&&y.jsxs("div",{children:[y.jsx("h4",{className:"text-muted-foreground mb-2 text-sm font-medium",children:"Output"}),y.jsx("div",{className:"bg-background max-h-60 overflow-auto rounded border p-2 font-mono text-sm",children:y.jsx("pre",{className:"whitespace-pre-wrap",children:d(l)})})]}),s==="output-error"&&e.errorText&&y.jsxs("div",{children:[y.jsx("h4",{className:"mb-2 text-sm font-medium text-red-500",children:"Error"}),y.jsx("div",{className:"bg-background rounded border border-red-200 p-2 text-sm dark:border-red-950 dark:bg-red-900/20",children:e.errorText})]}),s==="input-streaming"&&y.jsx("div",{className:"text-muted-foreground text-sm",children:"Processing tool call..."}),u&&y.jsx("div",{className:"text-muted-foreground border-t border-blue-200 pt-2 text-xs",children:y.jsxs("span",{className:"font-mono",children:["Call ID: ",u]})})]})})]})})},"Tool");function ewe({agentId:e,channelId:t,chatType:r}){const[n,i]=H.useState([]),s=H.useRef(new Set),{toast:o}=Ur(),l=Or();H.useEffect(()=>()=>{s.current.forEach(b=>URL.revokeObjectURL(b)),s.current.clear()},[]);const u=H.useCallback(b=>{const M=Array.from(b.target.files||[]).filter(O=>O.type.startsWith("image/")||O.type.startsWith("video/")||O.type.startsWith("audio/")||O.type==="application/pdf"||O.type==="application/msword"||O.type==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"||O.type==="application/vnd.ms-excel"||O.type==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"||O.type==="application/vnd.ms-powerpoint"||O.type==="application/vnd.openxmlformats-officedocument.presentationml.presentation"||O.type.startsWith("text/")).filter(O=>!n.some(P=>P.file.name===O.name&&P.file.size===O.size&&P.file.lastModified===O.lastModified)).map(O=>({file:O,id:Us(),isUploading:!1}));i(O=>{const P=[...O,...M];return Array.from(new Map(P.map(L=>[`${L.file.name}-${L.file.size}`,L])).values())}),b.target&&(b.target.value="")},[n]),c=H.useCallback(b=>{i(x=>{const A=x.find(C=>C.id===b);return A?.blobUrl&&(URL.revokeObjectURL(A.blobUrl),s.current.delete(A.blobUrl)),x.filter(C=>C.id!==b)})},[]),h=H.useCallback(b=>b.map(A=>{const C=URL.createObjectURL(A.file);return s.current.add(C),A.blobUrl=C,{id:A.id,url:C,title:A.file.name,contentType:Uv(A.file.type),isUploading:!0}}).filter(A=>A.contentType!==void 0),[]),d=H.useCallback(async b=>{if(!b.length)return{uploaded:[],failed:[],blobUrls:[]};const x=b.map(async P=>{try{const L=r===Gt.DM&&e?await l.media.uploadAgentMedia(e,{file:P.file,filename:P.file.name}):await l.media.uploadChannelMedia(t,P.file);return{success:!0,media:{id:P.id,url:L.url,title:P.file.name,source:"file_upload",contentType:Uv(P.file.type)}}}catch(L){return Je.error(`Failed to upload ${P.file.name}:`,L),o({title:`Upload Failed: ${P.file.name}`,description:L instanceof Error?L.message:"Upload failed",variant:"destructive"}),{success:!1,file:P,error:L instanceof Error?L.message:"Upload failed"}}}),A=await Promise.allSettled(x),C=[],M=[],O=[];return A.forEach((P,L)=>{P.status==="fulfilled"?P.value.success&&"media"in P.value?C.push(P.value.media):"file"in P.value&&M.push(P.value):M.push({file:b[L],error:P.reason?.message||"Upload failed"})}),b.forEach(P=>{P.blobUrl&&O.push(P.blobUrl)}),{uploaded:C,failed:M,blobUrls:O}},[r,e,t,o]),g=H.useCallback(b=>{b.forEach(x=>{URL.revokeObjectURL(x),s.current.delete(x)})},[]),m=H.useCallback(()=>{n.forEach(b=>{b.blobUrl&&(URL.revokeObjectURL(b.blobUrl),s.current.delete(b.blobUrl))}),i([])},[n]);return{selectedFiles:n,setSelectedFiles:i,handleFileChange:u,removeFile:c,createBlobUrls:h,uploadFiles:d,cleanupBlobUrls:g,clearFiles:m,getContentTypeFromMimeType:Uv}}a(ewe,"useFileUpload");function twe({channelId:e,currentUserId:t,contextId:r,chatType:n,allAgents:i,messages:s,onAddMessage:o,onUpdateMessage:l,onDeleteMessage:u,onClearMessages:c,onInputDisabledChange:h}){const d=Ri.getInstance(),{getApiKey:g}=eue(),m=H.useRef(null),b=H.useRef(null),x=H.useCallback(async(A,C,M,O,P,L,U)=>{const Z=U||e;if(!Z){Je.error("[useSocketChat] Cannot send message: no channel ID available");return}const Y={...L,channelType:n,...n===Gt.DM&&{isDm:!0,targetUserId:r}};await d.sendMessage(A,Z,C,M,O,P,Y)},[e,d,n,r]);return H.useEffect(()=>{if(!e||!t){b.current&&(Je.info(`[useSocketChat] useEffect: channelId is now null/undefined, resetting joinedChannelRef from ${b.current}`),b.current=null);return}const A=g();d.initialize(t,A??void 0),e!==b.current?(Je.info(`[useSocketChat] useEffect: Joining channel ${e}. Previous joinedChannelRef: ${b.current}`),d.joinChannel(e),b.current=e):Je.info(`[useSocketChat] useEffect: Channel ${e} already marked as joined by this instance. Skipping joinChannel call.`);const C=a(v=>{if(Je.info("[useSocketChat] Received raw messageBroadcast data:",JSON.stringify(v)),(v.channelId||v.roomId)!==e)return;const S=v.senderId===t,T=n===Gt.DM?v.senderId===r:i.some(k=>k.id===v.senderId);!S&&T&&h(!1);const N=v.clientMessageId;if(N&&S)l(N,{id:v.id||Us(),isLoading:!1,createdAt:typeof v.createdAt=="number"?v.createdAt:Date.parse(v.createdAt),text:v.text,attachments:v.attachments,isAgent:!1});else{const k={id:v.id||Us(),text:v.text,name:v.senderName,senderId:v.senderId,isAgent:T,createdAt:typeof v.createdAt=="number"?v.createdAt:Date.parse(v.createdAt),channelId:v.channelId||v.roomId,serverId:v.serverId,source:v.source,attachments:v.attachments,thought:v.thought,actions:v.actions,isLoading:!1,prompt:v.prompt,rawMessage:v.rawMessage};s.some(E=>E.id===v.id)||(Je.info("[useSocketChat] Adding new UiMessage:",JSON.stringify(k)),o(k),T&&k.id?m.current=k.id:m.current=null)}},"handleMessageBroadcasting"),M=a(v=>{(v.channelId||v.roomId)===e&&h(!1)},"handleMessageComplete"),O=a(v=>{(v.channelId||v.roomId)===e&&(v.action==="disable_input"?h(!0):v.action==="enable_input"&&h(!1))},"handleControlMessage"),P=a(v=>{(v.channelId||v.roomId)===e&&v.messageId&&u(v.messageId)},"handleMessageDeleted"),L=a(v=>{(v.channelId||v.roomId)===e&&c()},"handleChannelCleared"),U=a(v=>{(v.channelId||v.roomId)===e&&c()},"handleChannelDeleted"),Z=d.evtMessageBroadcast.attach(v=>(v.channelId||v.roomId)===e,C),Y=d.evtMessageComplete.attach(v=>(v.channelId||v.roomId)===e,M),re=d.evtControlMessage.attach(v=>(v.channelId||v.roomId)===e,O),F=d.evtMessageDeleted.attach(v=>(v.channelId||v.roomId)===e,P),$=d.evtChannelCleared.attach(v=>(v.channelId||v.roomId)===e,L),f=d.evtChannelDeleted.attach(v=>(v.channelId||v.roomId)===e,U);return()=>{e&&(Je.info(`[useSocketChat] useEffect cleanup: Leaving channel ${e}. Current joinedChannelRef: ${b.current}`),d.leaveChannel(e),e===b.current&&(b.current=null,Je.info(`[useSocketChat] useEffect cleanup: Reset joinedChannelRef for ${e}`))),w([Z,Y,re,F,$,f])};function w(v){v.forEach(_=>_?.detach())}},[e,t,d]),{sendMessage:x,animatedMessageId:m.current}}a(twe,"useSocketChat");const rwe=new Set(["jpg","jpeg","png","gif","webp","svg","bmp","ico","tiff","avif"]),nwe=new Set(["mp4","webm","mov","avi","mkv","flv","wmv","m4v","ogv"]),iwe={youtube:{patterns:[/(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/,/(?:https?:\/\/)?(?:www\.)?youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/],getEmbedUrl:a(e=>`https://www.youtube.com/embed/${e}`,"getEmbedUrl")},vimeo:{patterns:[/(?:https?:\/\/)?(?:www\.)?vimeo\.com\/(\d+)/],getEmbedUrl:a(e=>`https://player.vimeo.com/video/${e}`,"getEmbedUrl")}};function aU(e){try{return new URL(e).pathname.split(".").pop()?.toLowerCase()||""}catch{return""}}a(aU,"getFileExtension");function awe(e){const t=aU(e);return rwe.has(t)}a(awe,"isImageUrl");function swe(e){const t=aU(e);return nwe.has(t)}a(swe,"isVideoFileUrl");function sU(e){for(const[t,r]of Object.entries(iwe))for(const n of r.patterns){const i=e.match(n);if(i&&i[1])return{platform:t,id:i[1],embedUrl:r.getEmbedUrl(i[1])}}return null}a(sU,"getVideoPlatformInfo");function oU(e){if(!e)return[];const t=/(https?:\/\/[^\s]+)/g;return(e.match(t)||[]).map(n=>{const i=n.replace(/[.,!?;)]*$/,"");if(awe(i))return{url:i,type:"image",isEmbed:!1};if(swe(i))return{url:i,type:"video",isEmbed:!1};const s=sU(i);return s?{url:s.embedUrl,type:"video",isEmbed:!0}:{url:i,type:"unknown",isEmbed:!1}}).filter(n=>n.type!=="unknown")}a(oU,"parseMediaFromText");function owe(e,t){let r=e;return t.forEach(n=>{if(n.isEmbed){const i=/(https?:\/\/[^\s]+)/g,s=e.match(i)||[];for(const o of s){const l=o.replace(/[.,!?;)]*$/,""),u=sU(l);if(u&&u.embedUrl===n.url){r=r.replace(o,"").trim();break}}}else r=r.replace(n.url,"").trim()}),r}a(owe,"removeMediaUrlsFromText");const s0=15;function lU(e){return(e.includes("TEXT")||e.includes("OBJECT"))&&!e.includes("EMBEDDING")&&!e.includes("TRANSCRIPTION")?"LLM":e.includes("EMBEDDING")?"Embedding":e.includes("TRANSCRIPTION")?"Transcription":e.includes("IMAGE")?"Image":!e.includes("TEXT")&&!e.includes("IMAGE")&&!e.includes("EMBEDDING")&&!e.includes("TRANSCRIPTION")?"Other":"Unknown"}a(lU,"getModelUsageType");function lwe(e){if(!e)return"Unknown date";const t=new Date(e),r=new Date,n=(r.getTime()-t.getTime())/(1e3*60*60);return n<1?`${Math.floor((r.getTime()-t.getTime())/6e4)}m ago`:n<24?`${Math.floor(n)}h ago`:n<168?t.toLocaleDateString([],{weekday:"short",hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}a(lwe,"formatDate");function uwe(e=""){return e==="ACTION"?X2:e.includes("TEXT_EMBEDDING")?D0:e.includes("TRANSCRIPTION")?bl:e.includes("TEXT")||e.includes("OBJECT")?Q2:e.includes("IMAGE")?zF:DA}a(uwe,"getModelIcon");function cwe(e){if(!e)return null;const{prompt_tokens:t,completion_tokens:r,total_tokens:n}=e;return n?{prompt:t||0,completion:r||0,total:n}:null}a(cwe,"formatTokenUsage");function Ek(e,t=100){return e.length<=t?e:e.substring(0,t)+"..."}a(Ek,"truncateText");function o0(e){navigator.clipboard.writeText(e).catch(console.error)}a(o0,"copyToClipboard");function dwe(e){const t={};for(const r of e){const n=r.createdAt||r.timestamp||0,s=new Date(n).toLocaleDateString();t[s]||(t[s]=[]),t[s].push(r)}return t}a(dwe,"groupActionsByDate");function hwe({action:e,onDelete:t}){const[r,n]=H.useState(!1),[i,s]=H.useState(!1),[o,l]=H.useState(!1),u=e.body?.modelType||"",c=e.body?.modelKey||"",h=e.type==="action",d=e.body?.action||"",g=uwe(h?"ACTION":u),m=h?"Action":lU(u),b=cwe(e.body?.response?.usage||e.body?.usage),x=e.body?.prompts,A=a(()=>{const O=e.body?.params;if(!O&&!x)return null;if(u.includes("TRANSCRIPTION")&&Array.isArray(O))return y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(bl,{className:"h-3 w-3"}),y.jsx("span",{children:"Audio input data"})]});const{prompt:P,...L}=O||{};return y.jsxs("div",{className:"space-y-4",children:[x&&Array.isArray(x)&&x.length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"flex items-center justify-between",children:y.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:["Prompts (",x.length,")"]})}),y.jsx("div",{className:"space-y-3",children:x.map((U,Z)=>y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("span",{className:"text-xs text-muted-foreground",children:[U.modelType||"Prompt"," #",Z+1]}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>o0(U.prompt),"onClick"),className:"h-5 px-1 text-xs",title:"Copy prompt",children:y.jsx(Ja,{className:"h-3 w-3"})})]}),y.jsx("div",{className:"bg-muted/30 rounded-md p-2",children:y.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:U.prompt})})]},Z))})]}),!x&&P&&y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Prompt"}),y.jsxs(ct,{variant:"ghost",size:"sm",onClick:a(()=>o0(P),"onClick"),className:"h-6 px-2 text-xs",title:"Copy prompt",children:[y.jsx(Ja,{className:"h-3 w-3 mr-1"}),"Copy"]})]}),y.jsx("div",{className:"bg-muted/30 rounded-md p-3 relative",children:y.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:typeof P=="string"?P:JSON.stringify(P,null,2)})})]}),Object.keys(L).length>0&&y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Other Parameters"}),JSON.stringify(L,null,2).length>200?y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>s(!i),"onClick"),className:"h-6 px-2 text-xs",children:i?"Show less":"Show more"}):null]}),y.jsxs("div",{className:"bg-muted/30 rounded-md p-3 relative group",children:[y.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:(()=>{const U=JSON.stringify(L,null,2),Z=U.length>200;return i||!Z?U:Ek(U,200)})()}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>o0(JSON.stringify(L,null,2)),"onClick"),className:"absolute top-1 right-1 h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity",title:"Copy parameters",children:y.jsx(Ja,{className:"h-3 w-3"})})]})]})]})},"renderParams"),C=a(()=>{const O=e.body?.response;if(!O)return null;if(O==="[array]")return y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(Io,{className:"h-3 w-3"}),y.jsx("span",{children:"Array response data"})]});const P=typeof O=="object"?JSON.stringify(O,null,2):String(O),L=P.length>300;return y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Response"}),L&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>l(!o),"onClick"),className:"h-6 px-2 text-xs",children:o?"Show less":"Show more"})]}),y.jsxs("div",{className:"bg-muted/30 rounded-md p-3 relative group max-h-64 overflow-y-auto",children:[y.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:o||!L?P:Ek(P,300)}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>o0(P),"onClick"),className:"absolute top-1 right-1 h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity",title:"Copy response",children:y.jsx(Ja,{className:"h-3 w-3"})})]})]})},"renderResponse"),M=e.body?.params||e.body?.response||e.message||e.details;return y.jsxs("div",{className:"border rounded-lg bg-card hover:shadow-sm transition-all duration-200 group",children:[y.jsx("div",{className:"p-4 pb-3",children:y.jsxs("div",{className:"flex items-start justify-between",children:[y.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[y.jsx("div",{className:"p-2 rounded-lg bg-muted",children:y.jsx(g,{className:"h-4 w-4 text-muted-foreground"})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("h4",{className:"font-semibold text-sm",children:h?d:m}),y.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:h?"Action":u}),e.body?.promptCount&&e.body.promptCount>1&&y.jsxs(ya,{variant:"secondary",className:"text-xs px-1.5",children:[e.body.promptCount," prompts"]})]}),y.jsxs("div",{className:"space-y-1",children:[(c||h)&&y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(X2,{className:"h-3 w-3"}),y.jsx("code",{className:"font-mono",children:h?`Action ID: ${e.body?.actionId?.slice(-8)||"N/A"}`:c})]}),y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(am,{className:"h-3 w-3"}),y.jsx("span",{children:lwe(e.createdAt||e.timestamp)}),e.id&&y.jsxs(y.Fragment,{children:[y.jsx("span",{children:"•"}),y.jsx("code",{className:"text-[10px] bg-muted px-1 rounded",children:e.id.slice(-8)})]})]})]}),b&&y.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("span",{className:"text-muted-foreground",children:"Tokens:"}),y.jsx("span",{className:"font-mono",children:b.total.toLocaleString()})]}),b.prompt>0&&y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsx("span",{children:"In:"}),y.jsx("span",{className:"font-mono",children:b.prompt.toLocaleString()})]}),b.completion>0&&y.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[y.jsx("span",{children:"Out:"}),y.jsx("span",{className:"font-mono",children:b.completion.toLocaleString()})]})]})]})]}),y.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[M&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>n(!r),"onClick"),className:"h-8 w-8 p-0",title:r?"Collapse details":"Expand details",children:r?y.jsx(rA,{className:"h-3 w-3"}):y.jsx(as,{className:"h-3 w-3"})}),e.id&&t&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>{typeof e.id=="string"&&t(e.id)},"onClick"),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:"Delete log entry",children:y.jsx(Nl,{className:"h-3 w-3"})})]})]})}),r&&M&&y.jsxs(y.Fragment,{children:[y.jsx(Ui,{}),y.jsxs("div",{className:"p-4 pt-3 space-y-4",children:[A(),C(),(e.message||e.details)&&y.jsxs("div",{className:"space-y-2",children:[y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Additional Info"}),y.jsxs("div",{className:"bg-muted/30 rounded-md p-3",children:[e.message&&y.jsxs("div",{className:"text-xs mb-2",children:[y.jsx("span",{className:"font-medium text-muted-foreground",children:"Message: "}),y.jsx("span",{children:e.message})]}),e.details&&y.jsxs("div",{className:"text-xs",children:[y.jsx("span",{className:"font-medium text-muted-foreground",children:"Details: "}),y.jsx("span",{children:e.details})]})]})]})]})]}),!r&&M&&y.jsxs(y.Fragment,{children:[y.jsx(Ui,{}),y.jsx("div",{className:"p-4 pt-3",children:y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[y.jsx(ea,{className:"h-3 w-3"}),y.jsx("span",{children:(()=>{const O=[];return e.body?.promptCount&&e.body.promptCount>0&&O.push(`${e.body.promptCount} prompt${e.body.promptCount>1?"s":""}`),e.body?.params&&O.push("parameters"),e.body?.response&&O.push("response data"),O.length>0?`Contains ${O.join(" and ")}`:"Contains additional data"})()}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>n(!0),"onClick"),className:"h-5 px-2 text-xs ml-auto",children:"View details"})]})})]})]})}a(hwe,"ActionCard");function fwe({loadingMore:e,onLoadMore:t}){return y.jsx("div",{className:"flex justify-center py-6",children:e?y.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[y.jsx(Td,{className:"h-4 w-4 animate-spin"}),y.jsx("span",{className:"text-sm",children:"Loading more actions..."})]}):y.jsx(ct,{variant:"outline",onClick:t,className:"px-8",children:"Load More"})})}a(fwe,"LoadingIndicator");function pwe({selectedType:e,searchQuery:t}){return y.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center p-8",children:[y.jsx(Io,{className:"h-16 w-16 text-muted-foreground/30 mb-4"}),y.jsx("h3",{className:"text-lg font-medium mb-2",children:"No Actions Found"}),y.jsx("p",{className:"text-muted-foreground max-w-md mb-4",children:t?`No actions match "${t}". Try adjusting your search or filter.`:e==="all"?"Actions will appear here once the agent has performed operations.":`No ${e} actions found.`}),t&&y.jsx(ct,{variant:"outline",onClick:a(()=>{},"onClick"),children:"Clear Search"})]})}a(pwe,"EmptyState");function mwe({agentId:e,roomId:t}){const[r,n]=H.useState("all"),[i,s]=H.useState(""),[o,l]=H.useState(s0),[u,c]=H.useState(!1),h=H.useRef(null),d=["embedding","text_embedding"],{data:g=[],isLoading:m,error:b}=wle(e,t,d),{mutate:x}=_le(),{confirm:A,isOpen:C,onOpenChange:M,onConfirm:O,options:P}=Ql(),L=g.filter(f=>{if(r!=="all"){const w=f.body?.modelType||"",v=lU(w),_=f.type==="action";switch(r){case"llm":if(v!=="LLM"&&!_)return!1;break;case"transcription":if(v!=="Transcription")return!1;break;case"image":if(v!=="Image")return!1;break;case"other":if(v!=="Other"&&v!=="Unknown"&&!_)return!1;break}}if(i.trim()){const w=i.toLowerCase();return[f.body?.modelType,f.body?.modelKey,f.id,f.message,JSON.stringify(f.body?.params),JSON.stringify(f.body?.response)].filter(Boolean).join(" ").toLowerCase().includes(w)}return!0}),U=H.useCallback(()=>{if(!h.current||u||o>=L.length)return;const{scrollTop:f,scrollHeight:w,clientHeight:v}=h.current;f+v>=w-200&&(c(!0),setTimeout(()=>{l(S=>Math.min(S+s0,L.length)),c(!1)},500))},[u,o,L.length]);H.useEffect(()=>{l(s0)},[r,i]),H.useEffect(()=>{const f=h.current;if(f)return f.addEventListener("scroll",U),()=>f.removeEventListener("scroll",U)},[U]);const Z=L.slice(0,o),Y=o<L.length,re=dwe(Z),F=a(f=>{A({title:"Delete Log Entry",description:"Are you sure you want to permanently delete this log entry? This action cannot be undone.",confirmText:"Delete",variant:"destructive"},()=>{x({agentId:e,logId:f})})},"handleDelete"),$=a(()=>{l(f=>f+s0)},"handleLoadMore");return m&&g.length===0?y.jsx("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("div",{className:"flex flex-col items-center gap-4",children:[y.jsx(Td,{className:"h-8 w-8 animate-spin text-muted-foreground"}),y.jsxs("div",{className:"text-center",children:[y.jsx("h3",{className:"font-medium",children:"Loading Actions"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"Fetching agent action history..."})]})]})})}):b?y.jsx("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("div",{className:"text-center",children:[y.jsx(Io,{className:"h-12 w-12 text-destructive mx-auto mb-4"}),y.jsx("h3",{className:"font-medium text-destructive",children:"Failed to Load Actions"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"There was an error loading the agent actions."})]})})}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:[y.jsxs("div",{className:"flex justify-between items-center mb-4 px-4 pt-4 flex-none border-b pb-3",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("h3",{className:"text-lg font-medium",children:" Actions"}),!m&&y.jsx("span",{className:"ml-2 text-xs px-2 py-1 rounded bg-muted text-muted-foreground",children:L.length})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs("div",{className:"relative",children:[y.jsx(Eh,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),y.jsx(pn,{placeholder:"Search actions...",value:i,onChange:a(f=>s(f.target.value),"onChange"),className:"pl-10 w-64"})]}),y.jsxs(Ys,{value:r,onValueChange:a(f=>n(f),"onValueChange"),children:[y.jsx(es,{className:"w-40",children:y.jsx(Zs,{placeholder:"Filter actions"})}),y.jsxs(ts,{children:[y.jsx(Nr,{value:"all",children:"All Actions"}),y.jsx(Nr,{value:"llm",children:"LLM Calls"}),y.jsx(Nr,{value:"transcription",children:"Transcriptions"}),y.jsx(Nr,{value:"image",children:"Image Operations"}),y.jsx(Nr,{value:"other",children:"Other"})]})]})]})]}),y.jsx("div",{ref:h,className:"flex-1 overflow-y-auto px-4",children:L.length===0?y.jsx(pwe,{selectedType:r,searchQuery:i}):y.jsxs("div",{className:"space-y-4",children:[Object.entries(re).map(([f,w])=>y.jsxs("div",{className:"space-y-3",children:[y.jsxs("div",{className:"flex items-center gap-3 py-2",children:[y.jsx(Ui,{className:"flex-1"}),y.jsx("span",{className:"text-sm font-medium text-muted-foreground px-2",children:f}),y.jsx(Ui,{className:"flex-1"})]}),y.jsx("div",{className:"space-y-3",children:w.map((v,_)=>y.jsx(hwe,{action:v,onDelete:F},v.id||_))})]},f)),Y&&y.jsx(fwe,{loadingMore:u,onLoadMore:$})]})})]}),y.jsx(Xl,{open:C,onOpenChange:M,title:P?.title||"",description:P?.description||"",confirmText:P?.confirmText,cancelText:P?.cancelText,variant:P?.variant,onConfirm:O})]})}a(mwe,"AgentActionViewer");function gwe({isOpen:e,onClose:t,memory:r,agentId:n}){const{toast:i}=Ur(),{mutate:s,isPending:o}=Ele(),{mutate:l,isPending:u}=xle(),[c,h]=H.useState(""),[d,g]=H.useState(!0),[m,b]=H.useState(!1),[x,A]=H.useState(!1),C=H.useRef(null),M=o||u,O=JSON.stringify(r.content,null,2),{confirm:P,isOpen:L,onOpenChange:U,onConfirm:Z,options:Y}=Ql();H.useEffect(()=>{e&&(h(O),g(!0),A(!1),b(!1),setTimeout(()=>{C.current?.focus()},100))},[e,O]),H.useEffect(()=>{A(c!==O)},[c,O]),H.useEffect(()=>{if(!c.trim()){g(!1);return}try{JSON.parse(c),g(!0)}catch{g(!1)}},[c]),H.useEffect(()=>{const S=a(T=>{T.key==="Escape"&&e&&(x?P({title:"Discard Unsaved Changes?",description:"You have unsaved changes. Are you sure you want to close without saving?",confirmText:"Discard",variant:"destructive"},()=>{t()}):t())},"handleEscape");return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[e,x,t]);const re=H.useCallback(()=>{if(!c.trim()){i({title:"Error",description:"Memory content cannot be empty",variant:"destructive"});return}if(!d){i({title:"Invalid JSON",description:"Please fix JSON syntax errors before saving",variant:"destructive"});return}try{const S=JSON.parse(c);s({agentId:n,memoryId:r.id,memoryData:{content:S}},{onSuccess:a(()=>{t(),i({title:"Memory Updated",description:"The memory content has been successfully updated"})},"onSuccess"),onError:a(T=>{i({title:"Update Failed",description:T.message||"Failed to update memory",variant:"destructive"})},"onError")})}catch{i({title:"Invalid JSON",description:"Please enter valid JSON format",variant:"destructive"})}},[c,d,s,n,r.id,t,i]),F=H.useCallback(()=>{P({title:"Delete Memory",description:"Are you sure you want to delete this memory? This action cannot be undone.",confirmText:"Delete",variant:"destructive"},()=>{l({agentId:n,memoryId:r.id},{onSuccess:a(()=>{t(),i({title:"Memory Deleted",description:"The memory has been successfully removed"})},"onSuccess"),onError:a(S=>{i({title:"Delete Failed",description:S.message||"Failed to delete memory",variant:"destructive"})},"onError")})})},[l,n,r.id,t,i]),$=H.useCallback(()=>{try{const S=JSON.parse(c);h(JSON.stringify(S,null,2)),i({title:"Formatted",description:"JSON has been formatted"})}catch{i({title:"Format Error",description:"Cannot format invalid JSON",variant:"destructive"})}},[c,i]),f=H.useCallback(()=>{P({title:"Reset Changes",description:"Reset to original content? All unsaved changes will be lost.",confirmText:"Reset",variant:"destructive"},()=>{h(O)})},[O]),w=H.useCallback(async()=>{try{await navigator.clipboard.writeText(c),i({title:"Copied",description:"Content copied to clipboard"})}catch{i({title:"Copy Failed",description:"Failed to copy to clipboard",variant:"destructive"})}},[c,i]),v=a(S=>new Date(S).toLocaleString(),"formatTimestamp"),_=a(S=>{S.target===S.currentTarget&&(x?P({title:"Discard Unsaved Changes?",description:"You have unsaved changes. Are you sure you want to close without saving?",confirmText:"Discard",variant:"destructive"},()=>{t()}):t())},"handleOverlayClick");return e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-50 p-4",onClick:_,role:"dialog","aria-modal":"true","aria-labelledby":"memory-edit-title",children:y.jsxs(ds,{className:"w-full max-w-4xl h-[85vh] max-h-[800px] flex flex-col",onClick:a(S=>S.stopPropagation(),"onClick"),children:[y.jsxs(ag,{className:"flex flex-row items-center justify-between space-y-0 pb-2 flex-shrink-0",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Kw,{id:"memory-edit-title",className:"text-xl font-semibold",children:"Edit Memory Content"}),x&&y.jsx("span",{className:"text-xs px-2 py-1 rounded bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200",children:"Unsaved changes"})]}),y.jsx(ct,{variant:"ghost",size:"sm",onClick:t,"aria-label":"Close dialog",children:y.jsx(wi,{className:"h-4 w-4"})})]}),y.jsx(Ui,{}),y.jsxs(Kl,{className:"pt-4 flex-1 overflow-hidden flex flex-col",children:[y.jsxs("div",{className:"mb-4 flex items-start bg-amber-50 dark:bg-amber-950/50 border border-amber-200 dark:border-amber-800 rounded-md p-3",children:[y.jsx(Uy,{className:"h-4 w-4 text-amber-600 dark:text-amber-400 mr-2 mt-0.5 flex-shrink-0"}),y.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-200",children:[y.jsx("p",{className:"font-medium mb-1",children:"Editing Raw Memory Content"}),y.jsx("p",{children:"Changes may affect agent behavior. Ensure JSON format is valid before saving."})]})]}),y.jsxs("div",{className:"mb-4 grid grid-cols-1 md:grid-cols-2 gap-2 text-sm",children:[y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"ID:"}),y.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:r.id})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Created:"}),y.jsx("span",{children:v(r.createdAt||0)})]})]}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Room:"}),y.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:r.roomId})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Type:"}),y.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${r.entityId===n?"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200":"bg-white-100 text-white dark:bg-white-800 dark:text-white"}`,children:r.entityId===n?"Agent Message":"User Message"})]})]})]}),y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("label",{htmlFor:"memory-content",className:"text-sm font-medium",children:"Memory Content"}),y.jsxs("div",{className:"flex items-center gap-1",children:[d?y.jsx(Qs,{className:"h-3 w-3 text-green-500"}):y.jsx(Uy,{className:"h-3 w-3 text-red-500"}),y.jsx("span",{className:`text-xs ${d?"text-green-600":"text-red-600"}`,children:d?"Valid JSON":"Invalid JSON"})]})]}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(ct,{variant:"outline",size:"sm",onClick:a(()=>b(!m),"onClick"),disabled:M,title:m?"Switch to edit mode":"Switch to preview mode",children:m?y.jsx(Ps,{className:"h-3 w-3"}):y.jsx(Ya,{className:"h-3 w-3"})}),y.jsx(ct,{variant:"outline",size:"sm",onClick:w,disabled:M,title:"Copy to clipboard",children:y.jsx(Ja,{className:"h-3 w-3"})}),y.jsx(ct,{variant:"outline",size:"sm",onClick:$,disabled:M||!d,title:"Format JSON",children:"Format"}),y.jsx(ct,{variant:"outline",size:"sm",onClick:f,disabled:M||!x,title:"Reset to original",children:y.jsx(fA,{className:"h-3 w-3"})})]})]}),y.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[m?y.jsx("div",{className:"flex-1 border rounded-md p-3 bg-muted/50 overflow-auto",children:y.jsx("pre",{className:"text-sm whitespace-pre-wrap",children:d?JSON.stringify(JSON.parse(c),null,2):c})}):y.jsx(Ah,{ref:C,id:"memory-content",value:c,onChange:a(S=>h(S.target.value),"onChange"),className:`flex-1 resize-none font-mono text-sm min-h-[300px] ${d?"":"border-red-300 focus:border-red-500"}`,placeholder:"Memory content in JSON format...",disabled:M,"aria-describedby":"json-help"}),y.jsx("p",{id:"json-help",className:"text-xs text-muted-foreground mt-2 flex-shrink-0",children:"Edit the JSON directly. Use Ctrl+A to select all, Ctrl+Z to undo."})]})]}),y.jsxs(sg,{className:"flex justify-between flex-shrink-0",children:[y.jsxs(ct,{variant:"destructive",onClick:F,disabled:M,children:[y.jsx(xh,{className:"mr-2 h-4 w-4"}),"Delete Memory"]}),y.jsxs("div",{className:"flex gap-2",children:[y.jsx(ct,{variant:"outline",onClick:t,disabled:M,children:"Cancel"}),y.jsxs(ct,{onClick:re,disabled:M||!d||!x,children:[y.jsx(pA,{className:"mr-2 h-4 w-4"}),o?"Saving...":"Save Changes"]})]})]})]})}),y.jsx(Xl,{open:L,onOpenChange:U,title:Y?.title||"",description:Y?.description||"",confirmText:Y?.confirmText,cancelText:Y?.cancelText,variant:Y?.variant,onConfirm:Z})]}):null}a(gwe,"MemoryEditOverlay");const l0=15;function vwe({agentId:e,agentName:t,channelId:r}){const[n,i]=H.useState("all"),[s,o]=H.useState(""),[l,u]=H.useState(null),[c,h]=H.useState(l0),[d,g]=H.useState(!1),m=H.useRef(null),{data:b}=$w(),x=n==="facts"?void 0:"messages",A=n==="facts"||n==="all"?"facts":void 0,C=n==="currentChat"&&r?r:void 0,{data:M=[],isLoading:O,error:P}=mE(e,x,C),{data:L=[],isLoading:U,error:Z}=mE(e,A,C),Y=[...M,...L],re=O||U,F=P||Z,$=Y.filter(I=>{if(n!=="all"&&n!=="currentChat"){if(n==="facts")return!0;if(n==="messagesSent"&&I.entityId!==I.agentId||n==="messagesReceived"&&I.entityId===I.agentId)return!1}if(s.trim()){const R=s.toLowerCase(),z=I.content;return[z?.text,z?.thought,I.id,I.metadata].filter(Boolean).join(" ").toLowerCase().includes(R)}return!0}),f=H.useCallback(()=>{if(!m.current||d||c>=$.length)return;const{scrollTop:I,scrollHeight:R,clientHeight:z}=m.current;I+z>=R-200&&(g(!0),setTimeout(()=>{h(V=>Math.min(V+l0,$.length)),g(!1)},500))},[d,c,$.length]);H.useEffect(()=>{h(l0)},[n,s]),H.useEffect(()=>{const I=m.current;if(I)return I.addEventListener("scroll",f),()=>I.removeEventListener("scroll",f)},[f]);const w=a(I=>{const R=new Date(I),B=(new Date().getTime()-R.getTime())/(1e3*60*60);return B<24?R.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):B<168?R.toLocaleDateString([],{weekday:"short",hour:"2-digit",minute:"2-digit"}):R.toLocaleDateString([],{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},"formatDate"),v=a((I,R)=>R?.thought?D0:I.entityId===I.agentId?Q2:jA,"getMemoryIcon"),_=a(async I=>{try{await navigator.clipboard.writeText(I)}catch(R){console.error("Failed to copy:",R)}},"copyToClipboard"),S=a(I=>{const R={};for(const z of I){const V=new Date(z.createdAt||0).toLocaleDateString();R[V]||(R[V]=[]),R[V].push(z)}return R},"groupMessagesByDate"),T=$.slice(0,c),N=c<$.length,k=S(T);if(re&&Y.length===0)return y.jsx("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("div",{className:"flex flex-col items-center gap-4",children:[y.jsx(Td,{className:"h-8 w-8 animate-spin text-muted-foreground"}),y.jsxs("div",{className:"text-center",children:[y.jsx("h3",{className:"font-medium",children:"Loading Memories"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"Fetching agent conversation history..."})]})]})})});if(F)return y.jsx("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:y.jsx("div",{className:"flex items-center justify-center flex-1",children:y.jsxs("div",{className:"text-center",children:[y.jsx(Io,{className:"h-12 w-12 text-destructive mx-auto mb-4"}),y.jsx("h3",{className:"font-medium text-destructive",children:"Failed to Load Memories"}),y.jsx("p",{className:"text-sm text-muted-foreground",children:"There was an error loading the agent memories."})]})})});const p=a(()=>y.jsxs("div",{className:"flex flex-col items-center justify-center flex-1 text-center p-8",children:[y.jsx(Io,{className:"h-16 w-16 text-muted-foreground/30 mb-4"}),y.jsx("h3",{className:"text-lg font-medium mb-2",children:"No Memories Found"}),y.jsx("p",{className:"text-muted-foreground max-w-md mb-4",children:s?`No memories match "${s}". Try adjusting your search or filter.`:"This agent hasn't created any memories yet. Memories will appear here as the agent interacts."}),s&&y.jsx(ct,{variant:"outline",onClick:a(()=>o(""),"onClick"),children:"Clear Search"})]}),"EmptyState"),E=a(({memory:I})=>{const R=I.content,z=v(I,R),B=I.entityId===I.agentId,W=a(()=>B?b?.data?.agents?.find(ne=>ne.id===I.entityId)?.name||t:I.metadata?.raw?.senderName||I.metadata?.source||"User","getEntityName")();return y.jsxs("div",{className:"border rounded-lg p-4 bg-card hover:bg-accent/5 transition-colors group",children:[y.jsxs("div",{className:"flex items-start justify-between mb-3",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"p-2 rounded-md bg-muted",children:y.jsx(z,{className:"h-4 w-4"})}),y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"font-medium text-sm",children:W}),y.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:R?.thought?"Thought":B?"Agent":"User"})]}),y.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mt-1",children:[y.jsx(am,{className:"h-3 w-3"}),y.jsx("span",{children:w(I.createdAt||0)}),I.id&&y.jsxs(y.Fragment,{children:[y.jsx("span",{children:"•"}),y.jsx("code",{className:"text-[10px] bg-muted px-1 rounded",children:I.id.slice(-8)})]})]})]})]}),y.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[R?.text&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>_(R.text||""),"onClick"),className:"h-8 w-8 p-0",title:"Copy text",children:y.jsx(Ja,{className:"h-3 w-3"})}),I.id&&y.jsx(ct,{variant:"ghost",size:"sm",onClick:a(()=>u(I),"onClick"),className:"h-8 w-8 p-0",title:"Edit memory",children:y.jsx(UF,{className:"h-3 w-3"})})]})]}),y.jsxs("div",{className:"space-y-3",children:[R?.text&&y.jsx("div",{className:"bg-muted/50 rounded-md p-3",children:y.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",children:R.text})}),R?.thought&&y.jsxs("div",{className:"border-l-2 border-muted pl-3",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx(D0,{className:"h-3 w-3 text-muted-foreground"}),y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Thought Process"})]}),y.jsx("p",{className:"text-xs text-muted-foreground italic leading-relaxed",children:String(R.thought)})]}),(R?.actions||R?.providers||R?.source)&&y.jsxs("div",{className:"flex flex-wrap gap-1",children:[R.actions?.map(oe=>y.jsx("span",{className:"text-xs px-2 py-1 bg-muted rounded text-muted-foreground",title:"Action",children:oe},oe)),R.providers?.map(oe=>y.jsx("span",{className:"text-xs px-2 py-1 bg-muted rounded text-muted-foreground",title:"Provider",children:oe},oe)),R.source&&y.jsx("span",{className:"text-xs px-2 py-1 bg-muted rounded text-muted-foreground",children:R.source})]}),I.metadata&&Object.keys(I.metadata).length>0&&y.jsxs("details",{className:"text-xs",children:[y.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"View metadata"}),y.jsx("div",{className:"mt-2 p-2 bg-muted/30 rounded text-[10px] font-mono overflow-x-auto",children:y.jsx("pre",{children:JSON.stringify(I.metadata,null,2)})})]})]})]})},"MemoryCard");return y.jsxs("div",{className:"flex flex-col h-[calc(100vh-100px)] min-h-[400px] w-full",children:[y.jsxs("div",{className:"flex justify-between items-center mb-4 px-4 pt-4 flex-none border-b pb-3",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("h3",{className:"text-lg font-medium",children:"Memories"}),!re&&y.jsx("span",{className:"ml-2 text-xs px-2 py-1 rounded bg-muted text-muted-foreground",children:$.length})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs("div",{className:"relative",children:[y.jsx(Eh,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),y.jsx(pn,{placeholder:"Search memories...",value:s,onChange:a(I=>o(I.target.value),"onChange"),className:"pl-10 w-full min-w-0 max-w-64"})]}),y.jsxs(Ys,{value:n,onValueChange:a(I=>i(I),"onValueChange"),children:[y.jsx(es,{className:"w-40",children:y.jsx(Zs,{placeholder:"Filter memories"})}),y.jsxs(ts,{children:[y.jsx(Nr,{value:"all",children:"All Messages"}),r&&y.jsx(Nr,{value:"currentChat",children:"Current Chat"}),y.jsx(Nr,{value:"messagesSent",children:"Agent Messages"}),y.jsx(Nr,{value:"messagesReceived",children:"User Messages"}),y.jsx(Nr,{value:"facts",children:"Facts"})]})]})]})]}),y.jsx("div",{ref:m,className:"flex-1 overflow-y-auto px-4",children:$.length===0?y.jsx(p,{}):y.jsxs("div",{className:"space-y-4",children:[Object.entries(k).map(([I,R])=>y.jsxs("div",{className:"space-y-3",children:[y.jsxs("div",{className:"flex items-center gap-3 py-2",children:[y.jsx(Ui,{className:"flex-1"}),y.jsx("span",{className:"text-sm font-medium text-muted-foreground px-2",children:I}),y.jsx(Ui,{className:"flex-1"})]}),y.jsx("div",{className:"space-y-3",children:R.map(z=>y.jsx(E,{memory:z},z.id||z.createdAt))})]},I)),N&&y.jsx("div",{className:"flex justify-center py-6",children:d?y.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[y.jsx(Td,{className:"h-4 w-4 animate-spin"}),y.jsx("span",{className:"text-sm",children:"Loading more memories..."})]}):y.jsx(ct,{variant:"outline",onClick:a(()=>h(I=>I+l0),"onClick"),className:"px-8",children:"Load More"})})]})}),l&&y.jsx(gwe,{isOpen:!!l,onClose:a(()=>u(null),"onClose"),memory:l,agentId:e})]})}a(vwe,"AgentMemoryViewer");function uU(e){const[t,r]=H.useState(!1),{toast:n}=Ur(),i=Yn(),s=Dn();return{handleDelete:H.useCallback(async()=>{r(!0),n({title:"Deleting...",description:`Deleting agent "${e.name}"`});let l=!1,u=null;try{u=setTimeout(()=>{l||(s.invalidateQueries({queryKey:["agents"]}),i("/"),n({title:"Note",description:"Deletion is still processing in the background."}))},8e3);const c=Or();if(!e.id)throw new Error("Agent ID is required for deletion");const h=await c.agents.deleteAgent(e.id);l=!0,u&&clearTimeout(u);const d=h?.partial;n(d?{title:"Processing",description:"Deletion is still in progress and will complete in the background."}:{title:"Success",description:"Agent deleted successfully"}),s.invalidateQueries({queryKey:["agents"]}),i("/")}catch(c){l=!0,u&&clearTimeout(u);const h=c?.message??"Failed to delete agent",d=c?.statusCode||c?.response?.status;d===409||h.includes("409")||h.includes("Conflict")||h.includes("foreign key constraint")||h.includes("active references")?n({title:"Cannot Delete",description:"This agent cannot be deleted because it has active references. Try stopping the agent first.",variant:"destructive"}):d===408||d===504||h.includes("408")||h.includes("504")||h.includes("timeout")||h.includes("timed out")?(n({title:"Operation Timeout",description:"The deletion is taking longer than expected and will continue in the background.",variant:"destructive"}),s.invalidateQueries({queryKey:["agents"]}),i("/")):n({title:"Error",description:h,variant:"destructive"})}finally{r(!1)}},[e,n,i,s]),isDeleting:t}}a(uU,"useDeleteAgent");function cU({agent:e,agentId:t,onSaveComplete:r}){const{toast:n}=Ur(),i=Yn(),s=Dn(),{confirm:o,isOpen:l,onOpenChange:u,onConfirm:c,options:h}=Ql(),d=e?.status===vn.ACTIVE,g=H.useRef(null),[m,b]=H.useState({}),{handleDelete:x,isDeleting:A}=uU(e),C=$L(e),{stopAgent:M,isAgentStopping:O}=oc(),P=a(async()=>{try{await M(e),n({title:"Success",description:"Agent stopped successfully"})}catch(Z){n({title:"Error",description:Z instanceof Error?Z.message:"Failed to stop agent",variant:"destructive"})}},"handleStopAgent"),L=a(async()=>{if(!t){n({title:"Error",description:"Agent ID is missing",variant:"destructive"});return}const Z=a(async()=>{try{const Y=Or(),re=Object.keys(m).length>0?m:g.current?.getSecrets()||{},F=C.getChangedFields();if(re&&Object.keys(re).length>0){F.settings||(F.settings={});const f=Object.entries(re).filter(([w,v])=>v!==null).reduce((w,[v,_])=>({...w,[v]:_}),{});F.settings.secrets=f}if(Object.keys(F).length===0){const f=C.agent?.settings?.secrets;if(f&&Object.keys(f).length>0){const w={id:t,settings:{secrets:f}};await Y.agents.updateAgent(t,w),s.invalidateQueries({queryKey:["agent",t]}),s.invalidateQueries({queryKey:["agents"]}),n({title:"Success",description:"Agent secrets updated successfully"}),r?r():i("/");return}n({title:"No Changes",description:"No changes were made to the agent"}),r?r():i("/");return}const $={id:t,...F};await Y.agents.updateAgent(t,$),s.invalidateQueries({queryKey:["agent",t]}),s.invalidateQueries({queryKey:["agents"]}),n({title:"Success",description:"Agent updated successfully"}),r?r():i("/")}catch(Y){throw n({title:"Error",description:Y instanceof Error?Y.message:"Failed to update agent",variant:"destructive"}),Y}},"performSave");if(g?.current){const Y=g.current.validateSecrets();if(!Y.isValid){o({title:"Missing Required Secrets",description:`The following required secrets are missing: ${Y.missingSecrets.join(", ")}. Do you want to save anyway?`,confirmText:"Save Anyway",cancelText:"Cancel",variant:"destructive"},Z);return}}await Z()},"handleSubmit"),U=a(()=>{A||o({title:"Delete Agent",description:`Are you sure you want to delete the agent "${e.name}"? This action cannot be undone.`,confirmText:"Delete",variant:"destructive"},x)},"handleDelete");return y.jsxs(y.Fragment,{children:[y.jsx(FL,{characterValue:C.agent,setCharacterValue:C,title:"Agent Settings",description:"Configure your AI agent's behaviour and capabilities.",onSubmit:L,onReset:C.reset,onDelete:U,onStopAgent:d?P:void 0,isAgent:!0,isDeleting:A,isStopping:O(t),customComponents:[{name:"Plugins",component:y.jsx(VL,{characterValue:C.agent,setCharacterValue:C,initialPlugins:e.plugins})},{name:"Secret",component:y.jsx(Dw,{characterValue:C.agent,ref:g,onChange:a(Z=>{b(Z),C.updateSettings({secrets:Z})},"onChange")})},{name:"Avatar",component:y.jsx(HL,{characterValue:C.agent,setCharacterValue:C})}]}),y.jsx(Xl,{open:l,onOpenChange:u,title:h?.title||"",description:h?.description||"",confirmText:h?.confirmText,cancelText:h?.cancelText,variant:h?.variant,onConfirm:c})]})}a(cU,"AgentSettings");const Sk="eliza-agent-tab-states";function bwe(e){const[t,r]=H.useState("details"),n=H.useCallback(()=>{try{const o=localStorage.getItem(Sk);return o?JSON.parse(o):{}}catch(o){return Je.error("Error reading agent tab states from localStorage:",o),{}}},[]),i=H.useCallback(o=>{try{localStorage.setItem(Sk,JSON.stringify(o))}catch(l){Je.error("Error saving agent tab states to localStorage:",l)}},[]);H.useEffect(()=>{if(!e){r("details");return}const l=n()[e]||"details";r(l)},[e,n]);const s=H.useCallback(o=>{if(r(o),e){const u={...n(),[e]:o};i(u)}},[e,n,i]);return{currentTab:t,setTab:s}}a(bwe,"useAgentTabState");class ywe{static{a(this,"ElizaSpanAdapter")}convertRunDetailToTraceSpans(t){const r=t.events;if(!r||r.length===0)return[];const n=[...r].sort((l,u)=>l.timestamp-u.timestamp),i=new Map,s=new Map,o=[];return n.forEach((l,u)=>{switch(l.type){case"RUN_STARTED":{const c=this.createRunSpan(t,l);o.push(c);break}case"ACTION_STARTED":{const c=l.data.actionName||l.data.actionId||`Action ${u}`,h=l.data.actionId||c;let d=i.get(h);d||(d={id:`action-${h}`,title:c,type:"agent_invocation",status:"pending",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp),duration:0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data),children:[]},i.set(h,d),o.push(d));const g=(d.children?.length||0)+1,m={id:`attempt-${h}-${g}`,title:`Attempt ${g}`,type:"span",status:"pending",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp),duration:0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data),children:[]};d.children=[...d.children||[],m],s.set(h,m);break}case"ACTION_COMPLETED":{const c=l.data.actionName||l.data.actionId||`Action ${u}`,h=l.data.actionId||c,d=i.get(h),g=s.get(h),m=this.extractPrompt(l.data),b=this.extractResponse(l.data);if(g){const x=l.data.success!==!1;g.status=x?"success":"error",g.endTime=new Date(l.timestamp),g.duration=l.timestamp-g.startTime.getTime(),m&&(g.input=m),b&&(g.output=b),s.delete(h)}if(d){const x=l.data.success!==!1;d.status=x?"success":"error",d.endTime=new Date(l.timestamp),d.duration=l.timestamp-d.startTime.getTime(),m&&!d.input&&(d.input=m),b&&!d.output&&(d.output=b)}break}case"MODEL_USED":{const c=l.data.modelType||"Model Call",h=this.extractPrompt(l.data),d=this.extractResponse(l.data),g={id:`model-${u}`,title:c,type:"llm_call",status:"success",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp+(l.data.executionTime||0)),duration:l.data.executionTime||0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data),input:h,output:d,tokensCount:this.extractTokensCount(l.data),cost:this.extractCost(l.data)},b=l.data.actionContext||void 0||Array.from(s.keys()).pop();if(b){const x=s.get(b);if(x)x.children=[...x.children||[],g];else{const A=i.get(b);if(A&&A.children&&A.children.length>0){const C=A.children[A.children.length-1];C.children=[...C.children||[],g]}}}else o.push(g);break}case"EVALUATOR_COMPLETED":{const c=l.data.evaluatorName||`Evaluator ${u}`,h={id:`evaluator-${u}`,title:c,type:"chain_operation",status:"success",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp),duration:0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data)};o.push(h);break}case"EMBEDDING_EVENT":{const c=l.data.status||"completed",h={id:`embedding-${u}`,title:`Embedding ${c}`,type:"embedding",status:c==="failed"?"error":"success",startTime:new Date(l.timestamp),endTime:new Date(l.timestamp+(l.data.durationMs||0)),duration:l.data.durationMs||0,raw:JSON.stringify(l,null,2),attributes:this.convertEventDataToAttributes(l.data)},d=Array.from(s.keys()).pop();if(d){const g=s.get(d);g&&(g.children=[...g.children||[],h])}else o.push(h);break}}}),o}createRunSpan(t,r){const n=t.summary,i=n.durationMs||0,s=new Date(r.timestamp),o=new Date(r.timestamp+i);return{id:n.runId,title:`Run ${new Date(n.startedAt||Date.now()).toLocaleTimeString()}`,type:"agent_invocation",status:this.convertRunStatus(n.status),startTime:s,endTime:o,duration:i,raw:JSON.stringify(t,null,2),attributes:[{key:"run.id",value:{stringValue:n.runId}},{key:"run.status",value:{stringValue:n.status}},...n.messageId?[{key:"message.id",value:{stringValue:n.messageId}}]:[],...n.roomId?[{key:"room.id",value:{stringValue:n.roomId}}]:[]],children:[]}}convertRunStatus(t){switch(t){case"completed":return"success";case"error":return"error";case"timeout":return"warning";case"started":return"pending";default:return"pending"}}convertEventDataToAttributes(t){return Object.entries(t).map(([r,n])=>({key:r,value:this.convertValueToAttributeValue(n)}))}convertValueToAttributeValue(t){return typeof t=="string"?{stringValue:t}:typeof t=="number"?{intValue:t.toString()}:typeof t=="boolean"?{boolValue:t}:{stringValue:JSON.stringify(t)}}coerceToNumber(t){if(typeof t=="number")return Number.isFinite(t)?t:void 0;if(typeof t=="string"){const r=Number(t);return Number.isFinite(r)?r:void 0}}extractTokensCount(t){const r=Object.prototype.hasOwnProperty.call(t,"inputTokens"),n=Object.prototype.hasOwnProperty.call(t,"outputTokens");if(r||n){const o=this.coerceToNumber(t.inputTokens)??0,l=this.coerceToNumber(t.outputTokens)??0;return o+l}const i=a(o=>{if(!o||typeof o!="object")return;const l=o,u=this.coerceToNumber(l.total_tokens);if(u!==void 0)return u;const c=Object.prototype.hasOwnProperty.call(l,"prompt_tokens"),h=Object.prototype.hasOwnProperty.call(l,"completion_tokens");if(c||h){const d=this.coerceToNumber(l.prompt_tokens)??0,g=this.coerceToNumber(l.completion_tokens)??0;return d+g}},"extractFromUsage");if(t.response&&typeof t.response=="object"){const o=t.response,l=i(o.usage);if(l!==void 0)return l}const s=i(t.usage);if(s!==void 0)return s}extractCost(t){if(t.cost&&typeof t.cost=="number")return t.cost;if(t.response&&typeof t.response=="object"){const r=t.response;if(r.cost&&typeof r.cost=="number")return r.cost}}extractPrompt(t){if(t.prompts&&Array.isArray(t.prompts)){const r=t.prompts;if(r.length>0)return r.map((n,i)=>(r.length>1?`[Prompt ${i+1}${n.modelType?` - ${n.modelType}`:""}]
|
|
744
744
|
`:"")+(n.prompt||"")).join(`
|
|
745
745
|
|
|
746
746
|
---
|
|
@@ -759,4 +759,4 @@ $$`:`${e}$$`},"wo"),D6e=a(e=>{let t=0,r=e.match(/\*+/g)||[];for(let n of r){let
|
|
|
759
759
|
transition-all duration-300 ease-in-out
|
|
760
760
|
${C==="agents"&&o>0?"opacity-100 scale-100":"opacity-0 scale-75 pointer-events-none"}
|
|
761
761
|
`,children:o})]}),y.jsx(Rd,{value:"groups",className:"rounded-full data-[state=active]:border-b-0 data-[state=active]:bg-white data-[state=active]:text-black data-[state=active]:font-bold cursor-pointer text-lg py-1",children:"Groups"})]}),y.jsxs(ct,{variant:"ghost",onClick:a(()=>{C==="agents"?i("/create"):L()},"onClick"),className:"create-agent-button cursor-pointer gap-1",children:[y.jsx(nm,{className:"w-4 h-4"}),C==="agents"?"Create New Agent":"Create New Group"]})]}),y.jsx(Ui,{})]})}),y.jsx(va,{value:"agents",className:"flex-1 mt-0 bg-background",children:y.jsxs("div",{className:"flex flex-col gap-6 w-full md:max-w-4xl mx-auto px-6 py-2",children:[t&&y.jsx("div",{className:"text-center py-8",children:"Loading agents..."}),r&&y.jsxs("div",{className:"text-center py-8",children:["Error loading agents: ",n instanceof Error?n.message:"Unknown error"]}),s.length===0&&!t&&y.jsx("div",{className:"text-center py-8 flex flex-col items-center gap-4",children:y.jsx("p",{className:"text-muted-foreground",children:"No agents currently running. Start a character to begin."})}),!t&&!r&&y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-2 gap-3 agents-section",children:s.sort((U,Z)=>{const Y=U.status===vn.ACTIVE?1:0;return(Z.status===vn.ACTIVE?1:0)-Y}).map(U=>y.jsx(C3e,{agent:U,onChat:a(Z=>P(U,Z),"onChat")},U.id))})]})}),y.jsx(va,{value:"groups",className:"flex-1 mt-0 bg-background",children:y.jsx("div",{className:"flex flex-col gap-6 w-full md:max-w-4xl mx-auto px-6 py-2",children:!t&&!r&&y.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-2 gap-3 groups-section",children:u.map(U=>y.jsx(LU,{serverId:U.id},U.id))})})})]})})}),m?.id&&y.jsx(MD,{isOpen:c,onClose:O,agentId:m.id}),d&&y.jsx(Dg,{onClose:a(()=>{A(null),g(!1)},"onClose"),channelId:x??void 0})]})}a(M3e,"Home");const LU=om.memo(({serverId:e})=>{const{data:t,isLoading:r}=Jw(e),n=H.useMemo(()=>t?.data?.channels?.filter(i=>i.type===Gt.GROUP)||[],[t]);return r?y.jsx("p",{children:"Loading channels for server..."}):!n||n.length===0?y.jsx("p",{className:"text-sm text-muted-foreground",children:"No group channels in this server."}):y.jsx(y.Fragment,{children:n.map(i=>y.jsx(I3e,{group:{...i,server_id:e}},i.id))})});LU.displayName="ServerChannels";function O3e(){const t=rm().pathname,r=t.startsWith("/api/")||t.includes("/agents/")||t.includes("/memory/")||t.includes("/speech/");return y.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[70vh] px-4 text-center",children:[y.jsx("div",{className:"flex items-center justify-center mb-8",children:y.jsx("div",{className:"bg-red-900/20 h-24 w-24 rounded-full flex items-center justify-center",children:y.jsx(ea,{className:"h-14 w-14 text-red-500"})})}),y.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Page Not Found"}),y.jsxs("div",{className:"max-w-lg",children:[r?y.jsxs(y.Fragment,{children:[y.jsxs("p",{className:"text-lg mb-6 text-muted-foreground",children:["The endpoint ",y.jsx("span",{className:"font-mono text-red-400",children:t})," does not exist."]}),y.jsxs("div",{className:"bg-red-900/20 border border-red-800/30 rounded-md p-4 mb-8 text-left",children:[y.jsxs("h3",{className:"text-red-400 font-medium mb-2 flex items-center",children:[y.jsx(ea,{className:"h-4 w-4 mr-2"}),"Endpoint Not Found"]}),y.jsx("p",{className:"text-sm text-red-300/80 mb-2",children:"The requested API endpoint does not exist on this server. Please check that:"}),y.jsxs("ul",{className:"text-sm text-red-300/80 list-disc pl-5 space-y-1",children:[y.jsx("li",{children:"The URL is spelled correctly"}),y.jsx("li",{children:"You're using the correct version of the API"}),y.jsx("li",{children:"The endpoint is available in this version of Eliza"})]})]})]}):y.jsx("p",{className:"text-lg mb-6 text-muted-foreground",children:"Sorry, the page you're looking for doesn't exist or has been moved."}),y.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[y.jsx(ct,{asChild:!0,variant:"default",children:y.jsxs(oH,{to:"/",children:[y.jsx(lH,{className:"h-4 w-4 mr-2"}),"Go to Home"]})}),y.jsx(ct,{asChild:!0,variant:"outline",children:y.jsxs("a",{onClick:a(()=>window.history.back(),"onClick"),children:[y.jsx(Fy,{className:"h-4 w-4 mr-2"}),"Go Back"]})})]})]})]})}a(O3e,"NotFound");function R3e(){const{channelId:e}=K2(),[t]=uH(),r=t.get("messageServerId"),n=ch(e),i=ch(r||"");return!n||!i?y.jsx("div",{className:"flex flex-1 justify-center items-center",children:y.jsx("p",{children:"Missing channel or server information."})}):y.jsx(PU,{chatType:Gt.GROUP,contextId:n,messageServerId:i},n)}a(R3e,"GroupRouteContent");function P3e(){return y.jsx(R3e,{})}a(P3e,"GroupRoute");function L3e(){const e=Yn();return y.jsx("div",{className:"pt-4 md:pt-8",children:y.jsx(Dg,{onClose:a(()=>e(-1),"onClose")})})}a(L3e,"GroupNew");function D3e(){const{agentId:e}=K2(),t=Yn(),{data:r,isLoading:n}=$h(e);if(n)return y.jsx("div",{className:"flex items-center justify-center h-full",children:y.jsx(Fn,{className:"h-8 w-8 animate-spin"})});if(!r?.data)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[y.jsx("p",{className:"text-muted-foreground",children:"Agent not found"}),y.jsx(ct,{onClick:a(()=>t("/"),"onClick"),children:"Back to Home"})]});const i={...r.data,createdAt:r.data.createdAt??Date.now(),bio:r.data.bio??[],topics:r.data.topics??[],adjectives:r.data.adjectives??[],style:r.data.style??{all:[],chat:[],post:[]},settings:r.data.settings??{secrets:{}}};return y.jsx("div",{className:"flex w-full justify-center px-4 sm:px-6 overflow-y-auto",children:y.jsx("div",{className:"w-full md:max-w-4xl py-6",children:y.jsx(cU,{agent:i,agentId:e,onSaveComplete:a(()=>{},"onSaveComplete")})})})}a(D3e,"AgentSettingsRoute");const DU=new dH({defaultOptions:{queries:{staleTime:Ir.STANDARD,refetchInterval:!1,retry:a((e,t)=>t?.response?.status===401||t?.response?.status===403?!1:e<3,"retry"),retryDelay:a(e=>Math.min(1e3*2**e,3e4),"retryDelay"),refetchOnWindowFocus:!0,refetchOnReconnect:!0},mutations:{retry:a((e,t)=>t?.response?.status===401||t?.response?.status===403?!1:e<3,"retry"),retryDelay:a(e=>Math.min(1e3*2**e,3e4),"retryDelay")}}}),j3e=a(async()=>{try{await DU.prefetchQuery({queryKey:["agents"],queryFn:a(async()=>({data:await Or().agents.listAgents()}),"queryFn"),staleTime:Ir.FREQUENT})}catch(e){console.error("Error prefetching initial data:",e)}},"prefetchInitialData");function B3e(){Nue();const{status:e}=Yw(),[t,r]=H.useState(!1),[n,i]=H.useState(Date.now()),s=Dn();H.useEffect(()=>{Je.info("[AppContent] Mounted/Updated"),j3e()},[]);const o=a(()=>{Je.info("[AppContent] refreshHomePage called. Current homeKey:",n);const l=Date.now();i(l),Je.info("[AppContent] New homeKey set to:",l),Je.info("[AppContent] Invalidating queries for Home page refresh."),s.invalidateQueries({queryKey:["agents"]}),s.invalidateQueries({queryKey:["servers"]})},"refreshHomePage");return y.jsxs(Tu,{delayDuration:0,children:[y.jsxs(lT,{children:[y.jsx(gE,{refreshHomePage:o}),y.jsxs(cT,{className:"h-screen flex flex-col md:ml-72 overflow-hidden",children:[y.jsx("div",{className:"md:hidden absolute top-4 left-4 z-50",children:y.jsxs(aT,{open:t,onOpenChange:r,children:[y.jsx(cG,{asChild:!0,children:y.jsxs(ct,{variant:"ghost",size:"icon","data-testid":"mobile-menu-button",children:[y.jsx(fH,{className:"h-5 w-5"}),y.jsx("span",{className:"sr-only",children:"Toggle menu"})]})}),y.jsx(t4,{side:"left",className:"w-80 p-0 z-50",children:y.jsx(gE,{isMobile:!0,refreshHomePage:o})})]})}),y.jsx("div",{className:"flex w-full justify-center pt-16 md:pt-0 flex-shrink-0",children:y.jsx("div",{className:"w-full md:max-w-4xl",children:y.jsx(Dle,{})})}),y.jsx("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:y.jsxs(pH,{children:[y.jsx(sa,{path:"/",element:y.jsx(M3e,{},n)}),y.jsx(sa,{path:"chat/:agentId/:channelId",element:y.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:y.jsx(Uk,{})})}),y.jsx(sa,{path:"chat/:agentId",element:y.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:y.jsx(Uk,{})})}),y.jsx(sa,{path:"settings/:agentId",element:y.jsx(D3e,{})}),y.jsx(sa,{path:"group/new",element:y.jsx(L3e,{})}),y.jsx(sa,{path:"agents/new",element:y.jsx(T3e,{})}),y.jsx(sa,{path:"/create",element:y.jsx("div",{className:"flex w-full justify-center px-4 sm:px-6 overflow-y-auto",children:y.jsx("div",{className:"w-full md:max-w-4xl",children:y.jsx(JL,{})})})}),y.jsx(sa,{path:"/logs",element:y.jsx("div",{className:"flex w-full justify-center",children:y.jsxs("div",{className:"w-full md:max-w-4xl",children:[y.jsx("div",{className:"flex items-center justify-between mb-4",children:y.jsx("h2",{className:"text-2xl p-4 font-bold",children:"System Logs"})}),y.jsx(yD,{})]})})}),y.jsx(sa,{path:"group/:channelId",element:y.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:y.jsx(P3e,{})})}),y.jsx(sa,{path:"settings/",element:y.jsx("div",{className:"flex w-full justify-center overflow-y-auto",children:y.jsx("div",{className:"w-full md:max-w-4xl",children:y.jsx(zle,{})})})}),y.jsx(sa,{path:"*",element:y.jsx(O3e,{})})]})})]})]}),y.jsx(Kle,{}),e!=="unauthorized"&&y.jsx(Jle,{})]})}a(B3e,"AppContent");function z3e(){return y.jsx(cH,{client:DU,children:y.jsx("div",{className:"dark antialiased font-sans",style:{colorScheme:"dark"},children:y.jsx(hH,{children:y.jsx(qle,{children:y.jsx(lle,{children:y.jsx(B3e,{})})})})})})}a(z3e,"App");const jU=document.getElementById("root");if(!jU)throw new Error("Root element not found");mH.createRoot(jU).render(y.jsx(H.StrictMode,{children:y.jsx(z3e,{})}));const Q3e=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{Y3e as a,VA as d,Cr as k,Q3e as m};
|
|
762
|
-
//# sourceMappingURL=main-
|
|
762
|
+
//# sourceMappingURL=main-xPSh2mEk.js.map
|