@intent-hq/web 2.381.2 → 2.383.0
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/package.json +1 -1
- package/web/app/immutable/assets/0.BmwjvpSF.css +1 -0
- package/web/app/immutable/chunks/{BeKKPzED.js → -K3ARgq0.js} +1 -1
- package/web/app/immutable/chunks/{DlZ4XLhX.js → 0HRWclfL.js} +1 -1
- package/web/app/immutable/chunks/{B1TqZZyd.js → 1WR8MecL.js} +3 -3
- package/web/app/immutable/chunks/{BROVaoRF.js → 1mf839wD.js} +1 -1
- package/web/app/immutable/chunks/{zFOAQ-fV.js → 3xK9OOJy.js} +1 -1
- package/web/app/immutable/chunks/{e9FnhdhA.js → 4BrIaRe_.js} +1 -1
- package/web/app/immutable/chunks/{C9RagC2N.js → 518Fef2L.js} +1 -1
- package/web/app/immutable/chunks/{zOXOu59X.js → 6-uYidyP.js} +3 -3
- package/web/app/immutable/chunks/{E-ElQTlm.js → 68Tuqjp3.js} +1 -1
- package/web/app/immutable/chunks/{CuMJ0LCw.js → 6Bqipt1r.js} +1 -1
- package/web/app/immutable/chunks/{CyczJyMt.js → 7UPrdiE9.js} +1 -1
- package/web/app/immutable/chunks/{Cywj8P1v.js → 8r75D0ru.js} +1 -1
- package/web/app/immutable/chunks/{gtC5KXEz.js → 9bukzQMK.js} +1 -1
- package/web/app/immutable/chunks/{H_09C3Qv.js → 9gSjzhYc.js} +1 -1
- package/web/app/immutable/chunks/A9niI_uA.js +1 -0
- package/web/app/immutable/chunks/{CEUJ2SOA.js → AlEhxd2n.js} +1 -1
- package/web/app/immutable/chunks/{B4Uud3OJ.js → B-ef1MlI.js} +1 -1
- package/web/app/immutable/chunks/{DN6qgMae.js → B2Ym4lhl.js} +1 -1
- package/web/app/immutable/chunks/{CDnYwtBR.js → B2f9w8eB.js} +1 -1
- package/web/app/immutable/chunks/{DVHfIJ_U.js → B2kb4xeF.js} +1 -1
- package/web/app/immutable/chunks/{CkEbA_As.js → B2nCyo89.js} +1 -1
- package/web/app/immutable/chunks/{D2MSvsFH.js → B3Bfek34.js} +1 -1
- package/web/app/immutable/chunks/{BmQQcH5z.js → B4SiDSWP.js} +1 -1
- package/web/app/immutable/chunks/{Dq39ODex.js → B4WuQori.js} +1 -1
- package/web/app/immutable/chunks/{B4K17hnI.js → B4xSB_Hx.js} +1 -1
- package/web/app/immutable/chunks/{DRdEaij1.js → B5M0SkuR.js} +1 -1
- package/web/app/immutable/chunks/{BZKoidWB.js → B6S6VNu7.js} +1 -1
- package/web/app/immutable/chunks/{Bg4SPgrZ.js → B6STvYyK.js} +1 -1
- package/web/app/immutable/chunks/{qE-X6VV1.js → B8-Q1tED.js} +1 -1
- package/web/app/immutable/chunks/{BIIYZtt3.js → B9oKJyXc.js} +1 -1
- package/web/app/immutable/chunks/{C-931TJ0.js → BA-rwlhs.js} +1 -1
- package/web/app/immutable/chunks/{BX63FB9x.js → BAKPnd3w.js} +1 -1
- package/web/app/immutable/chunks/{Bt_5d6KS.js → BAOaoX22.js} +1 -1
- package/web/app/immutable/chunks/{D5Rd8qkd.js → BE6Cp7Qp.js} +1 -1
- package/web/app/immutable/chunks/{Ue-wYmxq.js → BETzmOvF.js} +1 -1
- package/web/app/immutable/chunks/{Bmt71DMB.js → BFEzojY2.js} +1 -1
- package/web/app/immutable/chunks/{9mNi8996.js → BFIcslMA.js} +2 -2
- package/web/app/immutable/chunks/{CKFaA258.js → BFeEPayU.js} +1 -1
- package/web/app/immutable/chunks/{BOzF_1jP.js → BG9tvqwj.js} +1 -1
- package/web/app/immutable/chunks/{CVuT-llE.js → BGTRTFMR.js} +1 -1
- package/web/app/immutable/chunks/BIVeXMBl.js +1 -0
- package/web/app/immutable/chunks/{DMhc83bo.js → BJWt3PU_.js} +1 -1
- package/web/app/immutable/chunks/{CL_Wu5hL.js → BJ_CKcUH.js} +1 -1
- package/web/app/immutable/chunks/{bT3v1QYj.js → BO_DS0RP.js} +1 -1
- package/web/app/immutable/chunks/{B3TTR8D_.js → BP3Sccje.js} +1 -1
- package/web/app/immutable/chunks/{DAY78LgA.js → BP4Hm_tD.js} +2 -2
- package/web/app/immutable/chunks/{xlIh55VB.js → BP5uGGO_.js} +1 -1
- package/web/app/immutable/chunks/{BavAnT42.js → BPL5Fo2b.js} +1 -1
- package/web/app/immutable/chunks/{DnbNqDYS.js → BSKFIBj2.js} +1 -1
- package/web/app/immutable/chunks/{BJGbabcl.js → BSKf8bnG.js} +1 -1
- package/web/app/immutable/chunks/{CkyY-zEo.js → BTrqJIJZ.js} +1 -1
- package/web/app/immutable/chunks/{DPCjIvYy.js → BUGeL7WE.js} +1 -1
- package/web/app/immutable/chunks/{vnEDE6VU.js → BUQUek8g.js} +1 -1
- package/web/app/immutable/chunks/{CoHtEoLb.js → BURZJh0r.js} +1 -1
- package/web/app/immutable/chunks/{CgbisBm3.js → BWGnuS1v.js} +1 -1
- package/web/app/immutable/chunks/{Besc4d7d.js → BWYuMy_r.js} +1 -1
- package/web/app/immutable/chunks/{dzRbajCR.js → BX-0SVP7.js} +1 -1
- package/web/app/immutable/chunks/{DZTelE6-.js → BX-LCSle.js} +1 -1
- package/web/app/immutable/chunks/{Bkn9MGZb.js → BYq9VtBF.js} +1 -1
- package/web/app/immutable/chunks/{7Co-pRoL.js → B_LcgbLl.js} +1 -1
- package/web/app/immutable/chunks/{B-wL6Wzy.js → Ba8ctcpl.js} +1 -1
- package/web/app/immutable/chunks/{DQdDAxOz.js → BaujsV9k.js} +1 -1
- package/web/app/immutable/chunks/{s7AiPAor.js → BcpfdNy8.js} +1 -1
- package/web/app/immutable/chunks/{BQyGe_6f.js → BeNn_MBw.js} +1 -1
- package/web/app/immutable/chunks/{BB82Eb4D.js → BeOwB_6G.js} +1 -1
- package/web/app/immutable/chunks/{DDHXn0gy.js → BfojStRz.js} +1 -1
- package/web/app/immutable/chunks/{DtV42LL1.js → BfvZe-kN.js} +6 -6
- package/web/app/immutable/chunks/{jExJ4qw0.js → Bir0Y4gf.js} +2 -2
- package/web/app/immutable/chunks/{pGhuLhmB.js → BlDljC9y.js} +1 -1
- package/web/app/immutable/chunks/{Ah-onPNG.js → BmTMWrby.js} +1 -1
- package/web/app/immutable/chunks/{CLbTxOfk.js → BmUPAQa9.js} +1 -1
- package/web/app/immutable/chunks/{BCl5zPXa.js → Bn880vDO.js} +1 -1
- package/web/app/immutable/chunks/{De9e0mT0.js → Bs2WE18g.js} +1 -1
- package/web/app/immutable/chunks/{D5zGpim8.js → Bs9K_x5H.js} +1 -1
- package/web/app/immutable/chunks/{oLeo92vY.js → BsN2abqQ.js} +1 -1
- package/web/app/immutable/chunks/{HWtwQJMe.js → Bsh6nUhU.js} +1 -1
- package/web/app/immutable/chunks/{CTzwWQun.js → BsrrIQeo.js} +1 -1
- package/web/app/immutable/chunks/{CE-ONoWm.js → BtTA7CNV.js} +1 -1
- package/web/app/immutable/chunks/{BWLItowS.js → Bty1UglO.js} +1 -1
- package/web/app/immutable/chunks/{BORX4QsI.js → Bu7LYnzn.js} +1 -1
- package/web/app/immutable/chunks/{DwzqUxIw.js → Bvi-fRGz.js} +1 -1
- package/web/app/immutable/chunks/{Dpd18D9E.js → BwG2vfja.js} +1 -1
- package/web/app/immutable/chunks/{DLs0Gu12.js → BxEf7uwl.js} +1 -1
- package/web/app/immutable/chunks/{D1BWZmii.js → BxJ6X-Sl.js} +1 -1
- package/web/app/immutable/chunks/{BzWnUeNO.js → BypvqIQM.js} +1 -1
- package/web/app/immutable/chunks/{BEGsYnq4.js → Bz7R1ahj.js} +4 -4
- package/web/app/immutable/chunks/{D2KaVfIR.js → C0I_aIej.js} +2 -2
- package/web/app/immutable/chunks/C0QTy0Sy.js +1 -0
- package/web/app/immutable/chunks/{Bz7B58eG.js → C1EvfTg-.js} +1 -1
- package/web/app/immutable/chunks/{CtJr8Pwg.js → C45U06qp.js} +1 -1
- package/web/app/immutable/chunks/{DVkTXE2a.js → C4JXGtw1.js} +1 -1
- package/web/app/immutable/chunks/{C1hbmGxM.js → C4JbSg3f.js} +1 -1
- package/web/app/immutable/chunks/{Fh9R4BHC.js → C4QKwtCH.js} +1 -1
- package/web/app/immutable/chunks/{BgdV71H8.js → C5yhcKTW.js} +1 -1
- package/web/app/immutable/chunks/{CsY5Dftt.js → C6mS8uZB.js} +1 -1
- package/web/app/immutable/chunks/{B3Muoj7H.js → C7LIHk5_.js} +1 -1
- package/web/app/immutable/chunks/{Cr-iZ9Tf.js → C8HkqBCb.js} +1 -1
- package/web/app/immutable/chunks/{Da_Z6CgM.js → C8y9EItt.js} +1 -1
- package/web/app/immutable/chunks/{B6jOBMKj.js → CAgnBDaV.js} +3 -3
- package/web/app/immutable/chunks/{BE66F_G_.js → CAvYeStH.js} +1 -1
- package/web/app/immutable/chunks/{Dy2ZTySC.js → CCqqosml.js} +1 -1
- package/web/app/immutable/chunks/{KWmquGlL.js → CDK_hSiv.js} +1 -1
- package/web/app/immutable/chunks/{CXCeVP0_.js → CDjpuJh0.js} +1 -1
- package/web/app/immutable/chunks/{3Tv2tBbo.js → CE7VCun2.js} +3 -3
- package/web/app/immutable/chunks/{Yy6hnibL.js → CE7dsja4.js} +1 -1
- package/web/app/immutable/chunks/{CPvBbiM1.js → CEgeN2ws.js} +1 -1
- package/web/app/immutable/chunks/{RNoFqjp6.js → CFny5dMa.js} +1 -1
- package/web/app/immutable/chunks/{DaYz5Oxb.js → CFvBUo4R.js} +3 -3
- package/web/app/immutable/chunks/{C9K8tC7J.js → CHLX1QZz.js} +1 -1
- package/web/app/immutable/chunks/{Bwqr9iPo.js → CJ4Z96pe.js} +1 -1
- package/web/app/immutable/chunks/{CngHTAnD.js → CMrw-y4l.js} +13 -13
- package/web/app/immutable/chunks/{B828qkf6.js → CMu-09q3.js} +1 -1
- package/web/app/immutable/chunks/{CYDXSK8a.js → CNAgTnv2.js} +1 -1
- package/web/app/immutable/chunks/{I_40sZHA.js → CO5zWp8I.js} +1 -1
- package/web/app/immutable/chunks/{b16NDDfn.js → COhRCR9P.js} +2 -2
- package/web/app/immutable/chunks/CPQ-kfy2.js +1 -0
- package/web/app/immutable/chunks/{lEWu7gpF.js → CPTZJWC9.js} +1 -1
- package/web/app/immutable/chunks/{BQzm8t-k.js → CRZZ_hOy.js} +1 -1
- package/web/app/immutable/chunks/{Cy0xJYMG.js → CRs9zG2A.js} +1 -1
- package/web/app/immutable/chunks/{BFjAz9so.js → CSRYV6LQ.js} +1 -1
- package/web/app/immutable/chunks/{C7vw9rpc.js → CSVgdt55.js} +1 -1
- package/web/app/immutable/chunks/{F6tZeezN.js → CU5jKGma.js} +1 -1
- package/web/app/immutable/chunks/{BIGXb0qV.js → CUkDMZwP.js} +1 -1
- package/web/app/immutable/chunks/{B_L3BWUb.js → CXS2Ba3S.js} +1 -1
- package/web/app/immutable/chunks/{wQP9H0b5.js → CY4fyoCV.js} +1 -1
- package/web/app/immutable/chunks/{B_9Y0vrL.js → CYtPXqgK.js} +1 -1
- package/web/app/immutable/chunks/C_1hI7HP.js +1 -0
- package/web/app/immutable/chunks/{CN0TD23u.js → C_78iNNC.js} +1 -1
- package/web/app/immutable/chunks/{B2JbncL-.js → C_KuQ05a.js} +1 -1
- package/web/app/immutable/chunks/{C4Fxj3Dv.js → CbqxWBi7.js} +1 -1
- package/web/app/immutable/chunks/{C9qmiGPA.js → Cf4fmkfL.js} +1 -1
- package/web/app/immutable/chunks/{Cy1eIaf4.js → ChTVnFH2.js} +1 -1
- package/web/app/immutable/chunks/{P-6iyz0U.js → CiMmbOsB.js} +1 -1
- package/web/app/immutable/chunks/{CHDBPeiu.js → CjTo2K46.js} +1 -1
- package/web/app/immutable/chunks/{76a0x163.js → CkA2ItLw.js} +1 -1
- package/web/app/immutable/chunks/{oxrHj9WB.js → Cmq0pZIQ.js} +2 -2
- package/web/app/immutable/chunks/{hOsZO8to.js → CmrjfWYI.js} +1 -1
- package/web/app/immutable/chunks/{CvmogvXF.js → Co4vj0dC.js} +1 -1
- package/web/app/immutable/chunks/{BzpQRjDP.js → Cqa6LF3b.js} +1 -1
- package/web/app/immutable/chunks/CqcqWJoa.js +1 -0
- package/web/app/immutable/chunks/CrD0jtXE.js +1 -0
- package/web/app/immutable/chunks/{CHiOQIO1.js → CrkMZYjb.js} +1 -1
- package/web/app/immutable/chunks/{CVQJ3G9r.js → Cs2lHsyA.js} +1 -1
- package/web/app/immutable/chunks/{B_TGsMEB.js → Csc9ETIC.js} +1 -1
- package/web/app/immutable/chunks/{nMcdiCb6.js → CtNkh9GR.js} +1 -1
- package/web/app/immutable/chunks/{Cgjp6r06.js → Ct_q9q1G.js} +1 -1
- package/web/app/immutable/chunks/{DLncssSx.js → Ctbo6mXV.js} +1 -1
- package/web/app/immutable/chunks/{8OEJW7fY.js → CuW3cq2w.js} +1 -1
- package/web/app/immutable/chunks/{wJF9cAcZ.js → CuewocoW.js} +1 -1
- package/web/app/immutable/chunks/{D_2nAvGE.js → CxOmNieJ.js} +1 -1
- package/web/app/immutable/chunks/D-zjf2Af.js +1 -0
- package/web/app/immutable/chunks/{DhkuGmLb.js → D37getya.js} +1 -1
- package/web/app/immutable/chunks/{BtCfKiJI.js → D3O8Vtuw.js} +1 -1
- package/web/app/immutable/chunks/{BgfkQ05m.js → D3p_bZm7.js} +1 -1
- package/web/app/immutable/chunks/{B6v6locT.js → D51XIZYq.js} +1 -1
- package/web/app/immutable/chunks/{BGr1zUsV.js → D5tDp1i8.js} +1 -1
- package/web/app/immutable/chunks/{SCoe-XeJ.js → D5xMHmv3.js} +1 -1
- package/web/app/immutable/chunks/{DT_2ysGq.js → D6dlPeEM.js} +1 -1
- package/web/app/immutable/chunks/{CMzQ5CXp.js → D73nBZuu.js} +1 -1
- package/web/app/immutable/chunks/{Do7ouyXz.js → D8ohaX19.js} +1 -1
- package/web/app/immutable/chunks/{dnTowHeA.js → D9XKwVJX.js} +3 -3
- package/web/app/immutable/chunks/{B4GJOofT.js → DA5opfEp.js} +1 -1
- package/web/app/immutable/chunks/{BOSZ-Hrc.js → DB7RVYiL.js} +1 -1
- package/web/app/immutable/chunks/{CfRm3l5p.js → DC8keNAk.js} +1 -1
- package/web/app/immutable/chunks/{C8SLclsn.js → DCK8dPAL.js} +1 -1
- package/web/app/immutable/chunks/{Bl3Cuor0.js → DCRuihKm.js} +2 -2
- package/web/app/immutable/chunks/{CxSmnqpJ.js → DE7dSDHO.js} +1 -1
- package/web/app/immutable/chunks/{D2ZHHwj-.js → DEVX5wOm.js} +2 -2
- package/web/app/immutable/chunks/{ByhEuqgY.js → DF2_1gr9.js} +1 -1
- package/web/app/immutable/chunks/{zdyRQTcF.js → DFcppVBl.js} +1 -1
- package/web/app/immutable/chunks/{EW9Oxsda.js → DGa13zF2.js} +1 -1
- package/web/app/immutable/chunks/{CfHaUU8C.js → DIFhl0he.js} +1 -1
- package/web/app/immutable/chunks/{6eBy--fo.js → DIG1mTAN.js} +2 -2
- package/web/app/immutable/chunks/{mg5SY1J3.js → DIKTPgAK.js} +1 -1
- package/web/app/immutable/chunks/{BiKalUOw.js → DK-ttWlY.js} +1 -1
- package/web/app/immutable/chunks/{CnT7X_Ka.js → DKHY8q_S.js} +1 -1
- package/web/app/immutable/chunks/{DJS9lO4g.js → DLbcryNV.js} +1 -1
- package/web/app/immutable/chunks/{C4_TlGj0.js → DLwWVKiF.js} +1 -1
- package/web/app/immutable/chunks/{Bw803iNn.js → DMDFfHqn.js} +3 -3
- package/web/app/immutable/chunks/{3BCA27_7.js → DMQmPhTl.js} +1 -1
- package/web/app/immutable/chunks/{CmLRC7-r.js → DN6OUhsP.js} +1 -1
- package/web/app/immutable/chunks/{BUfNfMkk.js → DO19lrhU.js} +1 -1
- package/web/app/immutable/chunks/{CHyLxrMv.js → DOEI9gYY.js} +1 -1
- package/web/app/immutable/chunks/{CJotcdQg.js → DPA45OJk.js} +1 -1
- package/web/app/immutable/chunks/{tFT894m3.js → DPYlDye0.js} +1 -1
- package/web/app/immutable/chunks/{BLCYnNxp.js → DQ_mNIfK.js} +1 -1
- package/web/app/immutable/chunks/{CZpxXUzD.js → DR4Kh2SL.js} +1 -1
- package/web/app/immutable/chunks/{CpCzAUi8.js → DSbNJBwA.js} +1 -1
- package/web/app/immutable/chunks/{CrtOf2Rt.js → DTuql3Rj.js} +1 -1
- package/web/app/immutable/chunks/{Ckr4n1ss.js → DUIwUF5m.js} +1 -1
- package/web/app/immutable/chunks/{CpxnRRai.js → DVROSXw1.js} +1 -1
- package/web/app/immutable/chunks/{Dk_2gwLu.js → DWWC1JsA.js} +1 -1
- package/web/app/immutable/chunks/{BG_RlrpY.js → DWiU4388.js} +1 -1
- package/web/app/immutable/chunks/{CplGIhI5.js → DX-Wrapd.js} +1 -1
- package/web/app/immutable/chunks/{C1Zw9RUp.js → DXBEIeJu.js} +1 -1
- package/web/app/immutable/chunks/{BKMwkk7g.js → DY0qeQe8.js} +1 -1
- package/web/app/immutable/chunks/{CaBTNP9L.js → D_Xpj-6r.js} +1 -1
- package/web/app/immutable/chunks/{o9vqVVAE.js → D_ovLyyd.js} +1 -1
- package/web/app/immutable/chunks/{CbUxbw3N.js → Db3Wob9h.js} +1 -1
- package/web/app/immutable/chunks/{BD4C_b2Z.js → DdXBqrnq.js} +1 -1
- package/web/app/immutable/chunks/{C__OzIly.js → DeHvIzqj.js} +2 -2
- package/web/app/immutable/chunks/{aDC6CW-9.js → Dfg3lB2h.js} +1 -1
- package/web/app/immutable/chunks/{DqfOHbUh.js → Djp7mdlG.js} +1 -1
- package/web/app/immutable/chunks/{DgQzilAi.js → DjxLojU4.js} +1 -1
- package/web/app/immutable/chunks/{3ozr1vad.js → DlJZrxef.js} +2 -2
- package/web/app/immutable/chunks/{IPb2sVOc.js → DliHiH6M.js} +4 -4
- package/web/app/immutable/chunks/{BZRdDiLW.js → Dlk4BhFg.js} +1 -1
- package/web/app/immutable/chunks/{DCfPUdw9.js → DlliJA4a.js} +3 -3
- package/web/app/immutable/chunks/{D6uQnPIb.js → DnJ4jlPB.js} +1 -1
- package/web/app/immutable/chunks/{gWn9PDXZ.js → DpHn84BV.js} +1 -1
- package/web/app/immutable/chunks/{Cg1tTx8i.js → DpMOdl0E.js} +1 -1
- package/web/app/immutable/chunks/{Bz8C2v0s.js → DpyfxjgC.js} +1 -1
- package/web/app/immutable/chunks/{ko5zX9YA.js → Dqdvt4Zr.js} +1 -1
- package/web/app/immutable/chunks/{CKt7lvPP.js → DrIA1Azf.js} +1 -1
- package/web/app/immutable/chunks/{BX43DT22.js → DrxfcnSy.js} +1 -1
- package/web/app/immutable/chunks/{CE095mBY.js → DsGUBv3k.js} +1 -1
- package/web/app/immutable/chunks/{DtqWU30y.js → Dsr4GELp.js} +1 -1
- package/web/app/immutable/chunks/DtF9DVpp.js +1 -0
- package/web/app/immutable/chunks/{BkliVAqJ.js → DvSURWC2.js} +4 -4
- package/web/app/immutable/chunks/{Gi8kzv-V.js → DvUGkiYP.js} +1 -1
- package/web/app/immutable/chunks/{CLiKsUcS.js → DvYUfzNR.js} +1 -1
- package/web/app/immutable/chunks/{BIon5kwa.js → Dw8wIAFi.js} +1 -1
- package/web/app/immutable/chunks/{D4XZeMXl.js → DwL1A1su.js} +1 -1
- package/web/app/immutable/chunks/{B-4Cm2na.js → DzWZGIya.js} +1 -1
- package/web/app/immutable/chunks/{D81Tox6K.js → EK6zOAHM.js} +1 -1
- package/web/app/immutable/chunks/{CESUeVmp.js → FzlZUztb.js} +1 -1
- package/web/app/immutable/chunks/{rdao0YQj.js → IQ13JH5A.js} +1 -1
- package/web/app/immutable/chunks/{DgW5R9bn.js → J8_M56d9.js} +1 -1
- package/web/app/immutable/chunks/{y7Ugu8WS.js → KHteWVFN.js} +1 -1
- package/web/app/immutable/chunks/{CxRJqvXa.js → KYuLFpkq.js} +1 -1
- package/web/app/immutable/chunks/{5DxHNwZe.js → L4HdMFBq.js} +1 -1
- package/web/app/immutable/chunks/{c5MBfH9F.js → L7j-Q29w.js} +1 -1
- package/web/app/immutable/chunks/{DvQWx7ZN.js → L_tYoUCb.js} +1 -1
- package/web/app/immutable/chunks/{BFqSYY_K.js → M5Dwuu-X.js} +1 -1
- package/web/app/immutable/chunks/{BNrkXLIB.js → No1eCFy3.js} +1 -1
- package/web/app/immutable/chunks/{DEelt7b0.js → OFhgRaUm.js} +1 -1
- package/web/app/immutable/chunks/{Q7XiOE5T.js → OtomGvb3.js} +1 -1
- package/web/app/immutable/chunks/{DIQ23RZn.js → PIgqsYsQ.js} +1 -1
- package/web/app/immutable/chunks/{CV9F7g3O.js → PO_5m99x.js} +1 -1
- package/web/app/immutable/chunks/{BCx2RJGr.js → QeBH-DWE.js} +1 -1
- package/web/app/immutable/chunks/{D7kKwL53.js → RFsxwSsB.js} +1 -1
- package/web/app/immutable/chunks/{Be5foFms.js → S845NCb3.js} +1 -1
- package/web/app/immutable/chunks/{BzJwOhb5.js → S8ugWfAx.js} +1 -1
- package/web/app/immutable/chunks/{DQEQvBuM.js → U9jJmfYa.js} +1 -1
- package/web/app/immutable/chunks/{CfC-LCr9.js → U_OQY9n3.js} +1 -1
- package/web/app/immutable/chunks/{BR1_dE35.js → UhL0ohiG.js} +1 -1
- package/web/app/immutable/chunks/{DkPs4gWX.js → W2WLehNu.js} +1 -1
- package/web/app/immutable/chunks/{DYTNWFlt.js → XCWZeNYo.js} +1 -1
- package/web/app/immutable/chunks/{xAGiw113.js → Y5Ky10uA.js} +1 -1
- package/web/app/immutable/chunks/{Do1K3fjZ.js → _SYFiE9N.js} +1 -1
- package/web/app/immutable/chunks/{DdtN-mI9.js → a3TFelkn.js} +1 -1
- package/web/app/immutable/chunks/{Bxk8XeS_.js → baWz1QxB.js} +1 -1
- package/web/app/immutable/chunks/{Gpf-ce3t.js → bhKPSdq4.js} +1 -1
- package/web/app/immutable/chunks/{CcrFwPvM.js → c5QZsH9t.js} +1 -1
- package/web/app/immutable/chunks/{DYXQ0DvL.js → cebxNJuC.js} +4 -4
- package/web/app/immutable/chunks/{CYodIWBo.js → chjnSxvZ.js} +1 -1
- package/web/app/immutable/chunks/{DYltC5LY.js → duDdSCAT.js} +1 -1
- package/web/app/immutable/chunks/{Bfi3_8Hc.js → eElW3aeh.js} +1 -1
- package/web/app/immutable/chunks/{BdSrsYxv.js → eQVXRlbn.js} +1 -1
- package/web/app/immutable/chunks/{_Juvw-ie.js → eTsHzcIE.js} +3 -3
- package/web/app/immutable/chunks/{CNXu44c3.js → ebbVP0tp.js} +1 -1
- package/web/app/immutable/chunks/{0chz2rsS.js → f24VwgrA.js} +1 -1
- package/web/app/immutable/chunks/{BGozEqB2.js → fiz8N_zQ.js} +1 -1
- package/web/app/immutable/chunks/{Cr4NRN2o.js → hHMYoFyG.js} +1 -1
- package/web/app/immutable/chunks/{Ba-gJiCF.js → haN7a3Sc.js} +1 -1
- package/web/app/immutable/chunks/{J4xkCilS.js → hb4NYXGo.js} +1 -1
- package/web/app/immutable/chunks/{DsbDY3sD.js → jcl0zObl.js} +2 -2
- package/web/app/immutable/chunks/{Dxv5pbru.js → jn4zbMQy.js} +1 -1
- package/web/app/immutable/chunks/k0JmlCVk.js +2 -0
- package/web/app/immutable/chunks/{Cc08a9kX.js → kS6Z7jzP.js} +1 -1
- package/web/app/immutable/chunks/{D5CeMpEM.js → kjxbkPQZ.js} +1 -1
- package/web/app/immutable/chunks/{DwgOf6Jh.js → lJeex2Gh.js} +1 -1
- package/web/app/immutable/chunks/{BTQKLXYi.js → lVh2oAeQ.js} +1 -1
- package/web/app/immutable/chunks/{DVIpt_-b.js → lwlI9u_5.js} +1 -1
- package/web/app/immutable/chunks/{DQzjOLwV.js → nXfD7jHz.js} +2 -2
- package/web/app/immutable/chunks/{C5BT0KwE.js → ozVAo4aX.js} +1 -1
- package/web/app/immutable/chunks/{EfOpqeLT.js → p9X2tUBM.js} +1 -1
- package/web/app/immutable/chunks/{COWdAscC.js → pYQh_Bw_.js} +1 -1
- package/web/app/immutable/chunks/{CDGdQPZ3.js → puJFvQs5.js} +1 -1
- package/web/app/immutable/chunks/{DwlFFy2U.js → pwJelZzH.js} +1 -1
- package/web/app/immutable/chunks/{Bf8Z3F34.js → sdV4t8T0.js} +1 -1
- package/web/app/immutable/chunks/{VtSYBFwm.js → tZyAiGvb.js} +1 -1
- package/web/app/immutable/chunks/{9xo585Vy.js → tr-2J8Mf.js} +1 -1
- package/web/app/immutable/chunks/{DhKLQ_6L.js → ujhgjK1k.js} +1 -1
- package/web/app/immutable/chunks/{CCHulQ4M.js → v0ybYtGc.js} +1 -1
- package/web/app/immutable/chunks/{Cf9FKQ2t.js → viB2mzAd.js} +1 -1
- package/web/app/immutable/chunks/{CFhJzMqD.js → wIMcEpgB.js} +1 -1
- package/web/app/immutable/chunks/{BnV5imkg.js → wUSGg9l9.js} +1 -1
- package/web/app/immutable/chunks/{DQGxxGZP.js → wl2qP2wF.js} +1 -1
- package/web/app/immutable/chunks/{DZldOwzL.js → yFcbscNn.js} +1 -1
- package/web/app/immutable/entry/app.PfV9Bd5g.js +4 -0
- package/web/app/immutable/entry/start.kviRYMjm.js +1 -0
- package/web/app/immutable/nodes/{0.XjTeJo8S.js → 0.N3QFhxpx.js} +1 -1
- package/web/app/immutable/nodes/{1.WAn52SGO.js → 1.Cuki-Q-c.js} +1 -1
- package/web/app/immutable/nodes/{10.BCt95gGF.js → 10.CzZBTiyD.js} +5 -5
- package/web/app/immutable/nodes/{11.D9nZjMrf.js → 11.Cc53X5P2.js} +1 -1
- package/web/app/immutable/nodes/{12.J0j9wF8Z.js → 12.BpXDHhXi.js} +1 -1
- package/web/app/immutable/nodes/{13.BGHXM182.js → 13.CCKyw-_o.js} +1 -1
- package/web/app/immutable/nodes/{14.BpDGhzOE.js → 14.BD92xFv4.js} +3 -3
- package/web/app/immutable/nodes/{15.DTHSLR65.js → 15.D2GMHiSb.js} +1 -1
- package/web/app/immutable/nodes/{16.WKc2P4l3.js → 16.CVCm-nfj.js} +1 -1
- package/web/app/immutable/nodes/{17.f0RTyi1E.js → 17.CjKvJw8X.js} +1 -1
- package/web/app/immutable/nodes/{18.BCr1DqlF.js → 18.DDY8Eqsn.js} +1 -1
- package/web/app/immutable/nodes/{19.kyknfcua.js → 19.DvFJngD4.js} +2 -2
- package/web/app/immutable/nodes/{2.BhjQOmpc.js → 2.B94-26jU.js} +4 -4
- package/web/app/immutable/nodes/{20.DJSk2vW3.js → 20.CLsq1QLL.js} +1 -1
- package/web/app/immutable/nodes/{3.B5ONUR90.js → 3.D7lbuuWp.js} +1 -1
- package/web/app/immutable/nodes/{4.9E3WAn5x.js → 4.YSZzuDIT.js} +1 -1
- package/web/app/immutable/nodes/5.ymicNL_Y.js +1 -0
- package/web/app/immutable/nodes/{6.DC2CoHu2.js → 6.CtS0PFqR.js} +1 -1
- package/web/app/immutable/nodes/{7.ipL23qll.js → 7.BVAyauMB.js} +1 -1
- package/web/app/immutable/nodes/{8.H6jtZ1r2.js → 8.CHlBOO6u.js} +1 -1
- package/web/app/immutable/nodes/9.CNAqB0x1.js +14 -0
- package/web/app/immutable/workers/html-file-preview.worker-BfFljPK-.js +1 -0
- package/web/app/version.json +1 -1
- package/web/generated/paraglide.js +46 -46
- package/web/index.html +19 -19
- package/web/app/immutable/assets/0.MRSSdFvi.css +0 -1
- package/web/app/immutable/chunks/B8JLAqaa.js +0 -1
- package/web/app/immutable/chunks/BEwMx-58.js +0 -1
- package/web/app/immutable/chunks/ChxY4HYP.js +0 -1
- package/web/app/immutable/chunks/DRhX_2TI.js +0 -1
- package/web/app/immutable/chunks/DWOJ689M.js +0 -1
- package/web/app/immutable/chunks/LCTocMEs.js +0 -1
- package/web/app/immutable/chunks/LNBns0B-.js +0 -1
- package/web/app/immutable/chunks/RXLk0Kpm.js +0 -1
- package/web/app/immutable/chunks/_FHZ2hc1.js +0 -2
- package/web/app/immutable/chunks/lZXQR9AV.js +0 -1
- package/web/app/immutable/entry/app.C9XhrjLK.js +0 -4
- package/web/app/immutable/entry/start.CkQDADa5.js +0 -1
- package/web/app/immutable/nodes/5.51b5Mc5a.js +0 -1
- package/web/app/immutable/nodes/9.qiIDO-mm.js +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./3SdAC2_C.js";import{p as De}from"./BZKoidWB.js";import"./CyczJyMt.js";import{j as Oe,k as we,c as We,l as ke}from"./C4_TlGj0.js";import{s as qe}from"./CpxnRRai.js";import{i as _e}from"./Bu13V5mO.js";function Ze(t,i={}){const l=(i.axis??"y")==="y"?"height":"width",o=parseFloat(getComputedStyle(t)[l]);if(!Number.isFinite(o))return{duration:0};const v=i.duration??160,y=v<=80?"fast":v<=160?"moderate":"slow";return Oe(t,{axis:i.axis,tier:y},{direction:"in"})}function $e(){return qe.get("enableComponentTransitions")}const Ae={request(){},settle(){}},O=new WeakMap,He=2,ze=2e3,re=2,Pe=1e3,Ve=3e3;function et(t,i){let l=i.enabled??!0,o=i.follow,v=i.onFollowChange,y=i.onScrollStateChange,T=i.threshold??100,w=!1,h=null,u=null,m=null,x=null,d=null,b=null,M=null,F=null,S=0,R=null,g=!1,$=null;const L=new Set,W=new Map,P=new WeakSet,k=new Map,A=document.createElement("div");A.dataset.followBottomAnchor="",A.setAttribute("aria-hidden","true"),A.style.cssText=`height:1px;${i.layoutNeutralBottomAnchor?"margin-top:-1px;":""}overflow-anchor:auto;pointer-events:none;flex:0 0 auto;`;function G(e){e===A||k.has(e)||(k.set(e,e.style.overflowAnchor),e.style.overflowAnchor="none")}function V(e){const n=k.get(e);n!==void 0&&(e.style.overflowAnchor=n,k.delete(e))}function I(e){if(e)for(const r of t.children)r instanceof HTMLElement&&G(r);else for(const r of k.keys())V(r);const n=e?"auto":"none";A.style.overflowAnchor!==n&&(A.style.overflowAnchor=n),e?(A.parentElement!==t||A.nextSibling)&&t.append(A):A.remove()}function H(){I(o)}function C(){A.remove();for(const e of k.keys())V(e)}function Y(e){P.add(e),x?.observe(e)}function j(){d!==null&&cancelAnimationFrame(d),F!==null&&cancelAnimationFrame(F),d=null,F=null,S=0,R=null}function c(){return Math.max(0,t.scrollHeight-t.clientHeight)}function D(){return $??=getComputedStyle(t).overflowAnchor!=="none",$}function q(){const e=c(),n=t.scrollTop,r=h??void 0;h={maximum:e,scrollTop:n};const f={maximum:e,scrollTop:n,previous:r};return p.observe(f),f}function U(e=q()){return e.scrollTop!==e.maximum&&(t.scrollTop=e.maximum),h={maximum:e.maximum,scrollTop:e.maximum},{maximum:e.maximum,scrollTop:e.maximum}}function N(e=q()){const n=Math.max(0,e.maximum-e.scrollTop),r=n<=T;u?.distanceFromBottom===n&&u.isAtBottom===r&&u.isFollowing===o||(u={distanceFromBottom:n,isAtBottom:r,isFollowing:o},y?.({distanceFromBottom:n,isAtBottom:r,isFollowing:o}))}function _(e,n=!0){if(p.cancel(),!l){o=e;return}const r=o!==e;r&&(o=e,I(e)),r&&n&&v?.(e),e||j(),N()}function ee(e,n=!0){if(!L.delete(e))return;const r=(W.get(e.element)??1)-1;r>0?W.set(e.element,r):(W.delete(e.element),P.has(e.element)||x?.unobserve?.(e.element)),S=0,n&&X()}function te(e=!0){if(L.size===0)return;const n=performance.now();for(const r of L)(!t.contains(r.element)||n>=r.expiresAt)&&ee(r,e)}function oe(){if(d=null,g||!l||!o)return;if(te(!1),L.size>0){d=requestAnimationFrame(oe);return}const e=U(),{maximum:n}=e;N(e),n===R?S+=1:(S=0,R=n),S<He&&(d=requestAnimationFrame(oe))}function X(){g||!l||!o||d!==null||(d=requestAnimationFrame(oe))}function z(e=!0){if(g||!l||!o)return;const n=U(),{maximum:r}=n;N(n),S=0,R=r,e&&X()}function ne(){M===null&&(M=requestAnimationFrame(()=>{M=null,!(g||!l)&&N()}))}function Te(){if(F=null,g||!l)return;let e=q();const n=e.scrollTop!==e.maximum;e=U(e),(n||e.maximum!==R||L.size>0)&&(S=0,R=e.maximum,X()),N(e)}function Fe(){if(!(g||!l)){if(o){if(d!==null||F!==null)return;F=requestAnimationFrame(Te);return}ne()}}function Se(){if(!(g||!l)){if(o){z(F===null);return}ne()}}const K={followAndScroll(){_(!0),z()},isFollowing:()=>o,isNativeScrollAnchoringActive:()=>!o&&getComputedStyle(t).overflowAnchor!=="none",hasActiveMutation:()=>o?(te(),L.size>0):!1,beforeMutation(e,n){if(g||!l||!o)return Ae;const r={element:e,expiresAt:performance.now()+(n.maxHoldMs??ze)};L.add(r);const f=W.get(e)??0;return W.set(e,f+1),f===0&&!P.has(e)&&x?.observe(e),S=0,X(),{request(){!L.has(r)||g||(D()?X():z())},settle(){if(!(g||!L.has(r))){if(D()){ee(r);return}ee(r,!1),z()}}}}};function Le(){let e=null,n=null,r=null,f;function Q(s){return!e||s&&e.wheel!==s?!1:!e.wheel?.defaultPrevented&&performance.now()<e.expiresAt}function Me(s,a){if(s.maximum-s.scrollTop<=re)return!0;const B=s.previous;return a&&B!==void 0&&B.maximum<s.maximum&&B.maximum-s.scrollTop<=re}function Z(s,a){return Me(s,a)?(K.followAndScroll(),!0):!1}function ge(s){const a=q();return Q(s)&&Z(a,!0)}function Re(s){f=s,r===null&&(r=requestAnimationFrame(()=>{r=null;const a=f;f=void 0,!(g||!l||!Q(a))&&(ge(a)||N())}))}function Ne(s,a){const B=Math.max(0,a.maximum-a.scrollTop);if(a.maximum!==s.maximum)return s.maximum=a.maximum,s.distance=B,s.movedTowardBottom=!1,!1;const ve=B-s.distance;return s.distance=B,ve>0?(s.movedTowardBottom=!1,_(!1),!0):ve===0?!1:(s.movedTowardBottom=!0,Z(a,!1))}function Ce(s){if(o||!e)return!1;const a=s.previous;return a&&s.scrollTop<a.scrollTop?(e=null,!1):(!a||s.scrollTop>a.scrollTop)&&Q()&&Z(s,!0)}return{isDragging:()=>n!==null,start(s,a){const B=s==="touch"?Ve:Pe;e={wheel:a,expiresAt:performance.now()+B}},grab(s){if(e=null,!s){n=null;return}const a=c();n={maximum:a,distance:Math.max(0,a-t.scrollTop),movedTowardBottom:!1}},move(s){return n?Ne(n,s):Ce(s)},land(s,a){if(s==="frame"){Re(a);return}if(s==="scrollend"){Q()&&ge(),e=null;return}if(!n)return;const{movedTowardBottom:B}=n;n=null,B&&Z(q(),!1)||N()},observe(s){const a=s.previous;e&&a!==void 0&&s.maximum<a.maximum&&s.maximum-s.scrollTop<=re&&(e=null)},cancel(){e=null},requestBottom(){K.followAndScroll()},reset(){e=null,n=null,f=void 0,r!==null&&cancelAnimationFrame(r),r=null}}}const p=Le();function ie(e){e.deltaY<0?_(!1):e.deltaY>0&&(p.start("wheel",e),p.land("frame",e))}function le(e){e.target===t?p.land("scrollend"):p.cancel()}let se=0;function ae(e){p.cancel(),w=!1,se=e.touches[0]?.clientY??0}function ue(e){const n=e.touches[0]?.clientY??0,r=se-n;w=r>0,r<0&&_(!1)}function ce(){w&&p.start("touch"),p.land("frame")}function fe(e){if(p.cancel(),["ArrowUp","PageUp","Home"].includes(e.key))_(!1);else if(["ArrowDown","PageDown","End"].includes(e.key)){if(e.target instanceof Element&&_e(e.target))return;if(e.key==="End"){p.requestBottom();return}p.start("keyboard"),p.land("frame")}}function Be(e){if(e.button!==0||e.target!==t)return!1;const n=Math.max(0,t.offsetWidth-t.clientWidth);if(n===0)return!1;const r=t.getBoundingClientRect(),f=t.offsetWidth>0?n*(r.width/t.offsetWidth):n;return getComputedStyle(t).direction==="rtl"?e.clientX<=r.left+f:e.clientX>=r.right-f}function me(){const e=p.isDragging();if(!e&&o&&d!==null)return;let n=q();p.move(n)||(o&&!e&&(n=U(n)),N(n))}function de(e){p.grab(Be(e))}function J(){p.land("release")}function Ee(){if(!m){m=new MutationObserver(e=>{let n=!1;for(const r of e)if(r.type==="childList"){for(const f of r.removedNodes)n=!0,f instanceof HTMLElement&&V(f);for(const f of r.addedNodes)f instanceof HTMLElement&&f!==A&&x&&(Y(f),o&&f.parentElement===t&&G(f))}n&&te(),I(o),Fe()}),m.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),x=new ResizeObserver(Se),Y(t);for(const e of t.children)e instanceof HTMLElement&&e!==A&&Y(e)}}function be(){m?.disconnect(),m=null,x?.disconnect(),x=null}function pe(e=!1){if(!l||g)return;if(O.set(t,K),t.addEventListener("scroll",me,{passive:!0}),t.addEventListener("scrollend",le,{passive:!0,capture:!0}),t.addEventListener("wheel",ie,{passive:!0}),t.addEventListener("touchstart",ae,{passive:!0}),t.addEventListener("touchmove",ue,{passive:!0}),t.addEventListener("touchend",ce,{passive:!0}),t.addEventListener("keydown",fe),t.addEventListener("pointerdown",de,{passive:!0}),window.addEventListener("pointerup",J,{passive:!0}),window.addEventListener("pointercancel",J,{passive:!0}),H(),Ee(),e){b=requestAnimationFrame(()=>{b=null,!(g||!l)&&(D(),o?z():N())});return}D();let n=q();o&&(n=U(n),R=n.maximum),N(n)}function he(){p.reset(),w=!1,h=null,L.clear(),W.clear(),j(),b!==null&&cancelAnimationFrame(b),b=null,M!==null&&cancelAnimationFrame(M),M=null,u=null,$=null,O.get(t)===K&&O.delete(t),be(),C(),t.removeEventListener("scroll",me),t.removeEventListener("scrollend",le,!0),t.removeEventListener("wheel",ie),t.removeEventListener("touchstart",ae),t.removeEventListener("touchmove",ue),t.removeEventListener("touchend",ce),t.removeEventListener("keydown",fe),t.removeEventListener("pointerdown",de),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",J)}return pe(!0),{update(e){v=e.onFollowChange,y=e.onScrollStateChange,T=e.threshold??100;const n=e.enabled??!0;if(l!==n&&(n||he(),l=n,l)){o=e.follow,pe(!0);return}l?e.follow&&!o?(_(!0,!1),z()):!e.follow&&o?_(!1,!1):b===null&&ne():o=e.follow},destroy(){g=!0,he()}}}function tt(t){return O.get(t)?.isFollowing()??!1}function ot(t){return O.get(t)?.isNativeScrollAnchoringActive()??!1}function nt(t){return O.get(t)?.hasActiveMutation()??!1}function xe(t,i={}){let l=t;for(;l;){const o=O.get(l);if(o)return o.beforeMutation(t,i);l=l.parentElement}return Ae}function Ie(t){const{scrollTop:i,scrollHeight:l,clientHeight:o}=t;return l-i-o}function Ye(t,i=100){return Ie(t)<=i}function Ue(t,i=!1){t.scrollTo({top:t.scrollHeight,behavior:i?"smooth":"auto"})}function rt(t){const i=O.get(t);if(i){i.followAndScroll();return}Ue(t)}function it(t,i,l=150,o){const v=t();if(!v)return;const y=v.scrollTop,T=performance.now();function w(u){return 1-Math.pow(1-u,3)}function h(u){const m=t();if(!m)return;const x=u-T,d=Math.min(x/l,1),b=typeof i=="function"?i(m):i;m.scrollTop=y+(b-y)*w(d),d<1?requestAnimationFrame(h):o?.(m)}requestAnimationFrame(h)}function lt(t,i="[data-message-id], [data-lazy-turn-key]"){const l=t.scrollTop,o=t.getBoundingClientRect(),v=Ye(t,100);if(v&&O.get(t)?.isFollowing()!==!1)return{element:null,offsetFromViewport:0,scrollTop:l,isNearBottom:v};const y=t.querySelectorAll(i);let T=null,w=0,h;for(const u of y){const m=u.getBoundingClientRect();if(m.top>=o.bottom)break;if(m.top>=o.top){T||(T=u,w=m.top-o.top);const x=u.getAttribute("data-message-id");if(x){h={id:x,offsetFromViewport:m.top-o.top};break}}}return{element:T,offsetFromViewport:w,scrollTop:l,isNearBottom:v,...h?{message:h}:{}}}function ye(t,i){if(i.message){const l=t.querySelector(`[data-message-id="${CSS.escape(i.message.id)}"]`);if(l)return{element:l,offsetFromViewport:i.message.offsetFromViewport}}return i.element?.isConnected?{element:i.element,offsetFromViewport:i.offsetFromViewport}:null}function st(t,i){return ye(t,i)!==null}function at(t,i){const l=ye(t,i);if(l){const{element:o,offsetFromViewport:v}=l,y=t.getBoundingClientRect(),h=o.getBoundingClientRect().top-y.top-v;Math.abs(h)>5&&(t.scrollTop+=h)}}function E(t,i){const l=Number.parseFloat(String(t[i]));return Number.isFinite(l)?l:0}function ut(t,i={},l={}){const o=t,y={maxHoldMs:we[i.tier??"moderate"].settleMs*2+500};let T=xe(o,y);const w=()=>{T?.settle(),T=null},h=()=>{T??=xe(o,y)};if(!$e()||De())return w(),{duration:0};const u=getComputedStyle(o),m=i.axis??"y",x=o.getBoundingClientRect(),d=m==="y"?E(u,"height")||x.height:E(u,"width")||x.width;if(!Number.isFinite(d)||d<=0)return w(),{duration:0};const b=E(u,"opacity")||1,M=i.tier??"moderate",F=we[M],S=l.direction==="out",R=typeof u.getPropertyValue=="function"?S?We(o,{tier:M}):ke(o,{tier:M}):{duration:S?F.exit.duration:F.settleMs,easing:F.exit.easing},g=R.duration??(S?F.exit.duration:F.settleMs),$=i.y??-4,L=E(u,"paddingTop"),W=E(u,"paddingBottom"),P=E(u,"marginTop"),k=E(u,"marginBottom"),A=E(u,"paddingLeft"),G=E(u,"paddingRight"),V=E(u,"marginLeft"),I=E(u,"marginRight");let H=null,C=l.direction==="out"?"outro":l.direction==="in"?"intro":"idle";const Y=(c,D)=>{o.style.overflow="hidden",m==="y"?(o.style.height=`${c*d}px`,o.style.paddingTop=`${c*L}px`,o.style.paddingBottom=`${c*W}px`,o.style.marginTop=`${c*P}px`,o.style.marginBottom=`${c*k}px`):(o.style.width=`${c*d}px`,o.style.paddingLeft=`${c*A}px`,o.style.paddingRight=`${c*G}px`,o.style.marginLeft=`${c*V}px`,o.style.marginRight=`${c*I}px`),o.style.opacity=`${c*b}`,o.style.transform=m==="y"?`translateY(${$*D}px)`:`translateX(${$*D}px)`},j=()=>{o.style.overflow="",o.style.height="",o.style.width="",o.style.paddingTop="",o.style.paddingBottom="",o.style.marginTop="",o.style.marginBottom="",o.style.paddingLeft="",o.style.paddingRight="",o.style.marginLeft="",o.style.marginRight="",o.style.opacity="",o.style.transform=""};return{duration:g,easing:R.easing,tick:(c,D)=>{if(l.direction==="both"&&(H===null?c<1&&(C="outro"):c<H?(h(),C="outro"):c>H&&(h(),C="intro")),H=c,c===1&&C!=="outro"){j(),w(),C="idle";return}Y(c,D),T?.request(),c===0&&C==="outro"&&(w(),C="idle")}}}export{it as a,$e as b,xe as c,st as d,lt as e,et as f,rt as g,nt as h,tt as i,ot as j,Ze as k,Ue as l,at as r,ut as s};
|
|
1
|
+
import"./3SdAC2_C.js";import{p as De}from"./B6S6VNu7.js";import"./7UPrdiE9.js";import{j as Oe,k as we,c as We,l as ke}from"./DLwWVKiF.js";import{s as qe}from"./DVROSXw1.js";import{i as _e}from"./Bu13V5mO.js";function Ze(t,i={}){const l=(i.axis??"y")==="y"?"height":"width",o=parseFloat(getComputedStyle(t)[l]);if(!Number.isFinite(o))return{duration:0};const v=i.duration??160,y=v<=80?"fast":v<=160?"moderate":"slow";return Oe(t,{axis:i.axis,tier:y},{direction:"in"})}function $e(){return qe.get("enableComponentTransitions")}const Ae={request(){},settle(){}},O=new WeakMap,He=2,ze=2e3,re=2,Pe=1e3,Ve=3e3;function et(t,i){let l=i.enabled??!0,o=i.follow,v=i.onFollowChange,y=i.onScrollStateChange,T=i.threshold??100,w=!1,h=null,u=null,m=null,x=null,d=null,b=null,M=null,F=null,S=0,R=null,g=!1,$=null;const L=new Set,W=new Map,P=new WeakSet,k=new Map,A=document.createElement("div");A.dataset.followBottomAnchor="",A.setAttribute("aria-hidden","true"),A.style.cssText=`height:1px;${i.layoutNeutralBottomAnchor?"margin-top:-1px;":""}overflow-anchor:auto;pointer-events:none;flex:0 0 auto;`;function G(e){e===A||k.has(e)||(k.set(e,e.style.overflowAnchor),e.style.overflowAnchor="none")}function V(e){const n=k.get(e);n!==void 0&&(e.style.overflowAnchor=n,k.delete(e))}function I(e){if(e)for(const r of t.children)r instanceof HTMLElement&&G(r);else for(const r of k.keys())V(r);const n=e?"auto":"none";A.style.overflowAnchor!==n&&(A.style.overflowAnchor=n),e?(A.parentElement!==t||A.nextSibling)&&t.append(A):A.remove()}function H(){I(o)}function C(){A.remove();for(const e of k.keys())V(e)}function Y(e){P.add(e),x?.observe(e)}function j(){d!==null&&cancelAnimationFrame(d),F!==null&&cancelAnimationFrame(F),d=null,F=null,S=0,R=null}function c(){return Math.max(0,t.scrollHeight-t.clientHeight)}function D(){return $??=getComputedStyle(t).overflowAnchor!=="none",$}function q(){const e=c(),n=t.scrollTop,r=h??void 0;h={maximum:e,scrollTop:n};const f={maximum:e,scrollTop:n,previous:r};return p.observe(f),f}function U(e=q()){return e.scrollTop!==e.maximum&&(t.scrollTop=e.maximum),h={maximum:e.maximum,scrollTop:e.maximum},{maximum:e.maximum,scrollTop:e.maximum}}function N(e=q()){const n=Math.max(0,e.maximum-e.scrollTop),r=n<=T;u?.distanceFromBottom===n&&u.isAtBottom===r&&u.isFollowing===o||(u={distanceFromBottom:n,isAtBottom:r,isFollowing:o},y?.({distanceFromBottom:n,isAtBottom:r,isFollowing:o}))}function _(e,n=!0){if(p.cancel(),!l){o=e;return}const r=o!==e;r&&(o=e,I(e)),r&&n&&v?.(e),e||j(),N()}function ee(e,n=!0){if(!L.delete(e))return;const r=(W.get(e.element)??1)-1;r>0?W.set(e.element,r):(W.delete(e.element),P.has(e.element)||x?.unobserve?.(e.element)),S=0,n&&X()}function te(e=!0){if(L.size===0)return;const n=performance.now();for(const r of L)(!t.contains(r.element)||n>=r.expiresAt)&&ee(r,e)}function oe(){if(d=null,g||!l||!o)return;if(te(!1),L.size>0){d=requestAnimationFrame(oe);return}const e=U(),{maximum:n}=e;N(e),n===R?S+=1:(S=0,R=n),S<He&&(d=requestAnimationFrame(oe))}function X(){g||!l||!o||d!==null||(d=requestAnimationFrame(oe))}function z(e=!0){if(g||!l||!o)return;const n=U(),{maximum:r}=n;N(n),S=0,R=r,e&&X()}function ne(){M===null&&(M=requestAnimationFrame(()=>{M=null,!(g||!l)&&N()}))}function Te(){if(F=null,g||!l)return;let e=q();const n=e.scrollTop!==e.maximum;e=U(e),(n||e.maximum!==R||L.size>0)&&(S=0,R=e.maximum,X()),N(e)}function Fe(){if(!(g||!l)){if(o){if(d!==null||F!==null)return;F=requestAnimationFrame(Te);return}ne()}}function Se(){if(!(g||!l)){if(o){z(F===null);return}ne()}}const K={followAndScroll(){_(!0),z()},isFollowing:()=>o,isNativeScrollAnchoringActive:()=>!o&&getComputedStyle(t).overflowAnchor!=="none",hasActiveMutation:()=>o?(te(),L.size>0):!1,beforeMutation(e,n){if(g||!l||!o)return Ae;const r={element:e,expiresAt:performance.now()+(n.maxHoldMs??ze)};L.add(r);const f=W.get(e)??0;return W.set(e,f+1),f===0&&!P.has(e)&&x?.observe(e),S=0,X(),{request(){!L.has(r)||g||(D()?X():z())},settle(){if(!(g||!L.has(r))){if(D()){ee(r);return}ee(r,!1),z()}}}}};function Le(){let e=null,n=null,r=null,f;function Q(s){return!e||s&&e.wheel!==s?!1:!e.wheel?.defaultPrevented&&performance.now()<e.expiresAt}function Me(s,a){if(s.maximum-s.scrollTop<=re)return!0;const B=s.previous;return a&&B!==void 0&&B.maximum<s.maximum&&B.maximum-s.scrollTop<=re}function Z(s,a){return Me(s,a)?(K.followAndScroll(),!0):!1}function ge(s){const a=q();return Q(s)&&Z(a,!0)}function Re(s){f=s,r===null&&(r=requestAnimationFrame(()=>{r=null;const a=f;f=void 0,!(g||!l||!Q(a))&&(ge(a)||N())}))}function Ne(s,a){const B=Math.max(0,a.maximum-a.scrollTop);if(a.maximum!==s.maximum)return s.maximum=a.maximum,s.distance=B,s.movedTowardBottom=!1,!1;const ve=B-s.distance;return s.distance=B,ve>0?(s.movedTowardBottom=!1,_(!1),!0):ve===0?!1:(s.movedTowardBottom=!0,Z(a,!1))}function Ce(s){if(o||!e)return!1;const a=s.previous;return a&&s.scrollTop<a.scrollTop?(e=null,!1):(!a||s.scrollTop>a.scrollTop)&&Q()&&Z(s,!0)}return{isDragging:()=>n!==null,start(s,a){const B=s==="touch"?Ve:Pe;e={wheel:a,expiresAt:performance.now()+B}},grab(s){if(e=null,!s){n=null;return}const a=c();n={maximum:a,distance:Math.max(0,a-t.scrollTop),movedTowardBottom:!1}},move(s){return n?Ne(n,s):Ce(s)},land(s,a){if(s==="frame"){Re(a);return}if(s==="scrollend"){Q()&&ge(),e=null;return}if(!n)return;const{movedTowardBottom:B}=n;n=null,B&&Z(q(),!1)||N()},observe(s){const a=s.previous;e&&a!==void 0&&s.maximum<a.maximum&&s.maximum-s.scrollTop<=re&&(e=null)},cancel(){e=null},requestBottom(){K.followAndScroll()},reset(){e=null,n=null,f=void 0,r!==null&&cancelAnimationFrame(r),r=null}}}const p=Le();function ie(e){e.deltaY<0?_(!1):e.deltaY>0&&(p.start("wheel",e),p.land("frame",e))}function le(e){e.target===t?p.land("scrollend"):p.cancel()}let se=0;function ae(e){p.cancel(),w=!1,se=e.touches[0]?.clientY??0}function ue(e){const n=e.touches[0]?.clientY??0,r=se-n;w=r>0,r<0&&_(!1)}function ce(){w&&p.start("touch"),p.land("frame")}function fe(e){if(p.cancel(),["ArrowUp","PageUp","Home"].includes(e.key))_(!1);else if(["ArrowDown","PageDown","End"].includes(e.key)){if(e.target instanceof Element&&_e(e.target))return;if(e.key==="End"){p.requestBottom();return}p.start("keyboard"),p.land("frame")}}function Be(e){if(e.button!==0||e.target!==t)return!1;const n=Math.max(0,t.offsetWidth-t.clientWidth);if(n===0)return!1;const r=t.getBoundingClientRect(),f=t.offsetWidth>0?n*(r.width/t.offsetWidth):n;return getComputedStyle(t).direction==="rtl"?e.clientX<=r.left+f:e.clientX>=r.right-f}function me(){const e=p.isDragging();if(!e&&o&&d!==null)return;let n=q();p.move(n)||(o&&!e&&(n=U(n)),N(n))}function de(e){p.grab(Be(e))}function J(){p.land("release")}function Ee(){if(!m){m=new MutationObserver(e=>{let n=!1;for(const r of e)if(r.type==="childList"){for(const f of r.removedNodes)n=!0,f instanceof HTMLElement&&V(f);for(const f of r.addedNodes)f instanceof HTMLElement&&f!==A&&x&&(Y(f),o&&f.parentElement===t&&G(f))}n&&te(),I(o),Fe()}),m.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),x=new ResizeObserver(Se),Y(t);for(const e of t.children)e instanceof HTMLElement&&e!==A&&Y(e)}}function be(){m?.disconnect(),m=null,x?.disconnect(),x=null}function pe(e=!1){if(!l||g)return;if(O.set(t,K),t.addEventListener("scroll",me,{passive:!0}),t.addEventListener("scrollend",le,{passive:!0,capture:!0}),t.addEventListener("wheel",ie,{passive:!0}),t.addEventListener("touchstart",ae,{passive:!0}),t.addEventListener("touchmove",ue,{passive:!0}),t.addEventListener("touchend",ce,{passive:!0}),t.addEventListener("keydown",fe),t.addEventListener("pointerdown",de,{passive:!0}),window.addEventListener("pointerup",J,{passive:!0}),window.addEventListener("pointercancel",J,{passive:!0}),H(),Ee(),e){b=requestAnimationFrame(()=>{b=null,!(g||!l)&&(D(),o?z():N())});return}D();let n=q();o&&(n=U(n),R=n.maximum),N(n)}function he(){p.reset(),w=!1,h=null,L.clear(),W.clear(),j(),b!==null&&cancelAnimationFrame(b),b=null,M!==null&&cancelAnimationFrame(M),M=null,u=null,$=null,O.get(t)===K&&O.delete(t),be(),C(),t.removeEventListener("scroll",me),t.removeEventListener("scrollend",le,!0),t.removeEventListener("wheel",ie),t.removeEventListener("touchstart",ae),t.removeEventListener("touchmove",ue),t.removeEventListener("touchend",ce),t.removeEventListener("keydown",fe),t.removeEventListener("pointerdown",de),window.removeEventListener("pointerup",J),window.removeEventListener("pointercancel",J)}return pe(!0),{update(e){v=e.onFollowChange,y=e.onScrollStateChange,T=e.threshold??100;const n=e.enabled??!0;if(l!==n&&(n||he(),l=n,l)){o=e.follow,pe(!0);return}l?e.follow&&!o?(_(!0,!1),z()):!e.follow&&o?_(!1,!1):b===null&&ne():o=e.follow},destroy(){g=!0,he()}}}function tt(t){return O.get(t)?.isFollowing()??!1}function ot(t){return O.get(t)?.isNativeScrollAnchoringActive()??!1}function nt(t){return O.get(t)?.hasActiveMutation()??!1}function xe(t,i={}){let l=t;for(;l;){const o=O.get(l);if(o)return o.beforeMutation(t,i);l=l.parentElement}return Ae}function Ie(t){const{scrollTop:i,scrollHeight:l,clientHeight:o}=t;return l-i-o}function Ye(t,i=100){return Ie(t)<=i}function Ue(t,i=!1){t.scrollTo({top:t.scrollHeight,behavior:i?"smooth":"auto"})}function rt(t){const i=O.get(t);if(i){i.followAndScroll();return}Ue(t)}function it(t,i,l=150,o){const v=t();if(!v)return;const y=v.scrollTop,T=performance.now();function w(u){return 1-Math.pow(1-u,3)}function h(u){const m=t();if(!m)return;const x=u-T,d=Math.min(x/l,1),b=typeof i=="function"?i(m):i;m.scrollTop=y+(b-y)*w(d),d<1?requestAnimationFrame(h):o?.(m)}requestAnimationFrame(h)}function lt(t,i="[data-message-id], [data-lazy-turn-key]"){const l=t.scrollTop,o=t.getBoundingClientRect(),v=Ye(t,100);if(v&&O.get(t)?.isFollowing()!==!1)return{element:null,offsetFromViewport:0,scrollTop:l,isNearBottom:v};const y=t.querySelectorAll(i);let T=null,w=0,h;for(const u of y){const m=u.getBoundingClientRect();if(m.top>=o.bottom)break;if(m.top>=o.top){T||(T=u,w=m.top-o.top);const x=u.getAttribute("data-message-id");if(x){h={id:x,offsetFromViewport:m.top-o.top};break}}}return{element:T,offsetFromViewport:w,scrollTop:l,isNearBottom:v,...h?{message:h}:{}}}function ye(t,i){if(i.message){const l=t.querySelector(`[data-message-id="${CSS.escape(i.message.id)}"]`);if(l)return{element:l,offsetFromViewport:i.message.offsetFromViewport}}return i.element?.isConnected?{element:i.element,offsetFromViewport:i.offsetFromViewport}:null}function st(t,i){return ye(t,i)!==null}function at(t,i){const l=ye(t,i);if(l){const{element:o,offsetFromViewport:v}=l,y=t.getBoundingClientRect(),h=o.getBoundingClientRect().top-y.top-v;Math.abs(h)>5&&(t.scrollTop+=h)}}function E(t,i){const l=Number.parseFloat(String(t[i]));return Number.isFinite(l)?l:0}function ut(t,i={},l={}){const o=t,y={maxHoldMs:we[i.tier??"moderate"].settleMs*2+500};let T=xe(o,y);const w=()=>{T?.settle(),T=null},h=()=>{T??=xe(o,y)};if(!$e()||De())return w(),{duration:0};const u=getComputedStyle(o),m=i.axis??"y",x=o.getBoundingClientRect(),d=m==="y"?E(u,"height")||x.height:E(u,"width")||x.width;if(!Number.isFinite(d)||d<=0)return w(),{duration:0};const b=E(u,"opacity")||1,M=i.tier??"moderate",F=we[M],S=l.direction==="out",R=typeof u.getPropertyValue=="function"?S?We(o,{tier:M}):ke(o,{tier:M}):{duration:S?F.exit.duration:F.settleMs,easing:F.exit.easing},g=R.duration??(S?F.exit.duration:F.settleMs),$=i.y??-4,L=E(u,"paddingTop"),W=E(u,"paddingBottom"),P=E(u,"marginTop"),k=E(u,"marginBottom"),A=E(u,"paddingLeft"),G=E(u,"paddingRight"),V=E(u,"marginLeft"),I=E(u,"marginRight");let H=null,C=l.direction==="out"?"outro":l.direction==="in"?"intro":"idle";const Y=(c,D)=>{o.style.overflow="hidden",m==="y"?(o.style.height=`${c*d}px`,o.style.paddingTop=`${c*L}px`,o.style.paddingBottom=`${c*W}px`,o.style.marginTop=`${c*P}px`,o.style.marginBottom=`${c*k}px`):(o.style.width=`${c*d}px`,o.style.paddingLeft=`${c*A}px`,o.style.paddingRight=`${c*G}px`,o.style.marginLeft=`${c*V}px`,o.style.marginRight=`${c*I}px`),o.style.opacity=`${c*b}`,o.style.transform=m==="y"?`translateY(${$*D}px)`:`translateX(${$*D}px)`},j=()=>{o.style.overflow="",o.style.height="",o.style.width="",o.style.paddingTop="",o.style.paddingBottom="",o.style.marginTop="",o.style.marginBottom="",o.style.paddingLeft="",o.style.paddingRight="",o.style.marginLeft="",o.style.marginRight="",o.style.opacity="",o.style.transform=""};return{duration:g,easing:R.easing,tick:(c,D)=>{if(l.direction==="both"&&(H===null?c<1&&(C="outro"):c<H?(h(),C="outro"):c>H&&(h(),C="intro")),H=c,c===1&&C!=="outro"){j(),w(),C="idle";return}Y(c,D),T?.request(),c===0&&C==="outro"&&(w(),C="idle")}}}export{it as a,$e as b,xe as c,st as d,lt as e,et as f,rt as g,nt as h,tt as i,ot as j,Ze as k,Ue as l,at as r,ut as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var W_=Object.defineProperty;var Fg=n=>{throw TypeError(n)};var U_=(n,r,a)=>r in n?W_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>U_(n,typeof r!="symbol"?r+"":r,a),z_=(n,r,a)=>r.has(n)||Fg("Cannot "+a);var To=(n,r,a)=>(z_(n,r,"read from private field"),a?a.call(n):r.get(n)),Dg=(n,r,a)=>r.has(n)?Fg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as un,bo as Z,bw as gn,bp as uf,b as pn,bm as u,bq as Ur,bs as ue,br as qi}from"./BEwMx-58.js";import{bs as fn,a5 as S,bf as fs,bA as y,W as p,bn as vn,aA as ee,aB as E,ca as se,a7 as Wt,ay as ye,aD as e,cd as Bn,c9 as o,bS as _,bl as de,be as dn,b_ as L,bO as j,c5 as it,bH as w,bV as me,bj as Es,bk as ro,b$ as ln,ai as Bd,aj as ps,bo as jl,br as Mr,c0 as Dt,ak as j_,cb as sd,aw as wi,a as G_}from"./3SdAC2_C.js";import{i as B}from"./Gpf-ce3t.js";import{k as xi}from"./BeKKPzED.js";import{g as Dn,i as V_,I as eo,p as Lo,e as Eo}from"./BZKoidWB.js";import{n as Nt,l as ma,c as to,j as Ng,k as Fo,h as K_}from"./C4_TlGj0.js";import{b as gf,e as Wd,f as ke,s as ze,c as zt,g as gs}from"./CyczJyMt.js";import{b as Q_}from"./goTpbPhD.js";import{b as wr}from"./Dn334wJv.js";import{m as J_,U as Y_,Z as X_,X as Z_,Y as ew,I as Bg,o as tw,l as nw,a2 as rw,x as Wg,$ as aw,a0 as Ug,r as sw,s as ow}from"./_Juvw-ie.js";import{Jv as F,fo as iw,eW as lw,f3 as cw,eX as dw,f1 as uw,f0 as gw,eZ as pw,e$ as fw,eY as vw,ru as hw,c6 as mw,i as $i,J4 as _w,Dc as pf,Dh as ww,Dj as zg,Dg as bw,Di as yw,vD as Iw,vF as Sw,Cp as ff,cp as $w,cn as kw,By as xw,bE as Cw,A3 as Pw,Ce as od,u$ as Rw,cq as jg,dB as Tw,dC as Aw,Co as Mw,el as Ew,CI as qw,CH as Lw,CM as Hw,CL as Ow,cQ as Fw,cT as Dw,nC as Nw,er as Bw,wR as Ww,CN as Uw,wT as zw,CO as jw,cU as Gw,cV as Vw,nK as Kw,Ah as Qw,Iq as Jw,Ag as Yw,Dt as Xw,wm as Zw,wn as eb,y$ as tb,z3 as id,wi as nb,wj as rb,rS as ab,rf as sb,rd as ob,f_ as ib,HO as lb,Lj as cb,GM as db,gn as ub,p2 as gb,Jj as pb,oj as fb,A2 as vb,ft as Gg,r2 as Vg,fm as hb,fl as mb,tB as _b,g3 as Kg,re as wb,fe as bb,C9 as yb,m as Ib,nL as Sb,zH as $b,yZ as kb,Ez as xb,Eo as Qg,xh as Cb,xi as Jg,u_ as Yg,p3 as Pb,DF as Rb,gj as Tb,g1 as Ab,eU as Mb,cM as Eb,A6 as qb,Lo as Lb,Cu as Hb,LG as Ob,y2 as Fb,ga as Db,fd as Nb,cL as Bb,cI as Wb,cH as Ub,vr as zb,xo as jb,xm as Gb,cF as Vb,cE as Kb,z5 as Qb,z0 as Jb,xn as Yb}from"./9xo585Vy.js";import{a as Ud}from"./CC7to1B5.js";import{aM as Xb,aL as Zb,bg as ey,a7 as ty,aD as ny,aO as ry,M as vf,a0 as hf,b8 as ay,b2 as sy,as as Xg,P as bl,b0 as Zg,a$ as ep,a_ as tp}from"./BEGsYnq4.js";import{l as mf,G as oy,I as Cd,at as iy,b1 as El,a9 as _f,S as ly,aW as ld,aq as cy,aJ as dy,C as uy,z as wf,s as gy,A as py,v as fy,a$ as vy,aH as bf,aG as yf,aI as hy,j as np,aM as cd,aT as rp,aS as yl,aU as ap,Q as sp,d as my,e as _y,ax as wy,V as op,aE as by,c as yy,m as Iy,aV as ip,ap as Sy,aw as lp,a as $y,aA as ky,ad as cp,aD as xy,aX as dp,a_ as up,n as gp,ae as Cy,R as Py,ay as pp,am as Ry,O as Ty,as as Ay,h as My,q as Ey,$ as dd,_ as qy,aC as fp,a8 as Ly,f as Hy,i as Oy,a6 as Fy,ac as Dy}from"./BkliVAqJ.js";import{f as Ny,o as By,E as Wy,C as Uy,m as zy,a2 as vp,aa as jy,K as Gy,e as Vy,y as Ky}from"./CsY5Dftt.js";import{g as Pi}from"./DypB-Dwi.js";import{dW as Dl,cU as If,O as Sf,W as Qy,bv as Jy,aF as $f,dH as kf,aU as qo,e8 as Yy,dw as xf,aw as zd,dV as jd,aN as Cf,cP as Xy,V as ha,a3 as Xs,B as Zy,a7 as eI,a4 as tI,M as nI,a6 as rI,ar as aI,aG as Pf,aO as ql,b6 as sI,ay as Rf,r as oI,n as Pd,H as iI,dY as lI,aQ as cI,aK as dI,c9 as uI,aW as gI,bM as pI,bK as fI,bL as vI,c8 as hI,c7 as mI,cN as _I,cM as wI,aS as bI,bb as yI,bd as II,bg as SI,bc as $I,bl as kI,bf as xI,be as CI,bh as PI,bi as RI,bk as TI,bj as AI,ax as MI,cj as EI,ck as qI,dv as LI,du as HI,a$ as OI,G as FI,b3 as DI,cf as NI,C as hp,d0 as BI,ba as ds,b$ as WI,X as UI,bq as zI,E as jI,ad as GI,t as VI,cW as KI,d3 as mp,Q as _p,dt as QI,cQ as ud}from"./DQdDAxOz.js";import{u as Tf,a as Il,ag as JI,x as YI,ad as Af,af as XI,ac as Mf,a4 as ZI,F as wp,D as eS,e as tS,n as nS,s as rS,m as aS,Y as sS,k as oS}from"./9mNi8996.js";import{a2 as iS,b5 as lS,cM as cS,a_ as dS,b4 as uS,c2 as gS,c9 as pS,w as fS,x as vS,cd as hS}from"./CpxnRRai.js";import{n as mS,P as Ef,F as _S,ai as wS,r as bS,ac as yS}from"./CplGIhI5.js";import{I as IS,s as SS,H as bp}from"./Bqd7fdCF.js";import{e as $S}from"./CL3a4Hm1.js";import{e as kS,f as xS}from"./Ba-gJiCF.js";import{s as CS,o as Zs,b as PS,g as Nl,d as RS,l as bi}from"./CIyUrgF0.js";import{a5 as TS,a7 as AS,D as MS,N as ES,ac as yp,X as qS,i as LS,r as dr,v as Ri,u as na,p as ki,x as br,S as Gd,m as Gl,s as Ho,y as Ti,o as ao,n as so,t as Ip,aa as oo,w as io,a9 as Vd,q as _a,z as Oo,J as Rd,_ as Sp,g as HS,F as OS,U as qf,I as Lf,a8 as Hf,a6 as Ll,O as FS,E as Of,V as DS,A as NS,b as BS,ab as WS,ad as Sl,G as US,e as gd,l as zS,C as jS,f as Ys,j as $p,H as us,Q as GS,d as $l,c as VS,a as kp,h as KS,L as QS,Y as xp,a4 as pd,a1 as Cp,a0 as JS,a3 as Pp,$ as Rp,T as YS,B as XS,k as ZS,a2 as e$,K as t$,R as n$,P as r$,W as a$}from"./ByhEuqgY.js";import{m as s$}from"./Dms_DO28.js";import{g as Ff}from"./B4GJOofT.js";import{b as o$}from"./D81Tox6K.js";import{g as i$}from"./DIQ23RZn.js";import{a as l$}from"./Fh9R4BHC.js";import{q as Df,d as ur,r as c$,e as Bl,j as d$,g as Td,i as u$,f as Ad,c as g$,A as p$,O as Tp,k as f$}from"./3BCA27_7.js";import{P as v$}from"./CaBTNP9L.js";import{e as h$}from"./BOSZ-Hrc.js";import{b as m$,a as _$,g as w$,c as b$,i as y$}from"./BX43DT22.js";import{R as I$,g as S$,W as kl,c as $$}from"./B_L3BWUb.js";import"./LCTocMEs.js";import"./Bwqr9iPo.js";import{s as Ai}from"./LNBns0B-.js";import{F as k$,h as x$}from"./Bl3Cuor0.js";import"./DwgOf6Jh.js";import{C as C$,e as Br,L as P$,l as Vl,d as Kl,K as Ql,h as Kd,M as Jl,S as Da}from"./BGozEqB2.js";import{D as R$}from"./C9RagC2N.js";import{f as Ap}from"./CYodIWBo.js";import"./DU3vNstz.js";import{i as Nf}from"./BjLb7AHW.js";import{h as Mp,i as Ep,g as qp,P as Lp,C as T$,m as Hl,R as A$}from"./Ah-onPNG.js";import{f as bt,ae as M$}from"./CESUeVmp.js";import{F as ct,bs as E$,cd as q$,aw as Na,a2 as Bf,c9 as L$,bf as H$,be as O$,bg as F$,aO as Hp,aj as fd,aB as vd,bB as Wf,d3 as Wl,cF as D$,aM as Op,cb as Fp,cK as Ul,bu as N$,aS as B$,d0 as W$,a8 as Uf,ac as U$,ag as z$,cr as j$,ba as G$,aC as zf,cT as Dp,cz as V$,ax as K$,cD as Q$,c3 as J$}from"./DQEQvBuM.js";import{c as jf}from"./ChTqQfQN.js";import"./BmQQcH5z.js";import{c as Et}from"./BIGXb0qV.js";import{a5 as Gf,bg as Y$,ar as X$,k as Z$,Y as ek,W as tk,a2 as nk,Z as rk,bw as ak,V as sk,a1 as ok,ah as ik}from"./EfOpqeLT.js";import{d as zl,f as lk,e as ck}from"./CxSmnqpJ.js";import{A as dk}from"./DQGxxGZP.js";import{D as uk}from"./BzpQRjDP.js";import"./BCx2RJGr.js";import{a as gk,C as pk}from"./Dy2ZTySC.js";import"./HWtwQJMe.js";import{C as fk}from"./CcrFwPvM.js";import{h as Md,r as vk,a as hk}from"./6eBy--fo.js";import{s as mk}from"./DhkuGmLb.js";import{I as _k,a as Vf}from"./BX63FB9x.js";import{L as wk}from"./CE095mBY.js";import{g as bk,f as yk,b as Ik}from"./CnT7X_Ka.js";import{s as Mi,g as Yn,i as Sk,j as $k,e as Np,r as Bp,f as kk,d as xk,a as hd,h as Ck}from"./zFOAQ-fV.js";import{i as Wp,a as Pk}from"./Bu13V5mO.js";import{seekConversationToMessage as Up}from"./BzJwOhb5.js";import{l as Jt,o as md,h as Qd,n as Ed,q as Rk}from"./Yy6hnibL.js";import{o as Tk}from"./DQzjOLwV.js";import{A as Kf}from"./CxRJqvXa.js";import{b as Qf}from"./Bkn9MGZb.js";import{g as Ak,e as Jf,v as Mk,f as Ek,N as qk,M as Lk,K as Hk,k as Yf,l as Ok,H as Xf,s as Zf}from"./CkEbA_As.js";import{selectCurrentWorkspaceTabId as _d}from"./Be5foFms.js";import{o as Fk}from"./lEWu7gpF.js";import{d as Dk}from"./B0Z-1lwJ.js";import{P as Nk}from"./DLncssSx.js";import{g as Bk}from"./CHyLxrMv.js";import{H as ev,M as Wk,y as Uk,J as zk,g as jk,i as Gk,u as Vk,e as tv,c as nv,d as Kk}from"./Bfi3_8Hc.js";import{c as Qk,h as Jd,f as rv,Q as Jk}from"./C8SLclsn.js";import{t as Yk}from"./DAsc1V4f.js";import{s as Xk}from"./BsieX9dN.js";import{i as av}from"./s7AiPAor.js";import{d as Zk,i as ex,r as tx}from"./DvQWx7ZN.js";import{g as nx}from"./DZldOwzL.js";var rx=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ax=E("<div><!></div>");function sv(n,r){if(new.target)return un({component:sv,...n});fn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=uf(r,rx);var f={get ref(){return a()},set ref(h=null){a(h),ee()},get class(){return i()},set class(h){i(h),ee()},get children(){return c()},set children(h){c(h),ee()},$set:gn,$on:(h,P)=>pn(r,h,P)},g=ax();gf(g,h=>({"data-slot":"card-header",class:h,...l}),[()=>Wd("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",fk,i())]);var b=S(g);return Ai(b,()=>c()??fs),y(g),wr(g,h=>a(h),()=>a()),p(n,g),vn(f)}var sx=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ox=E("<div><!></div>");function ov(n,r){if(new.target)return un({component:ov,...n});fn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=uf(r,sx);var f={get ref(){return a()},set ref(h=null){a(h),ee()},get class(){return i()},set class(h){i(h),ee()},get children(){return c()},set children(h){c(h),ee()},$set:gn,$on:(h,P)=>pn(r,h,P)},g=ox();gf(g,h=>({"data-slot":"card-title",class:h,...l}),[()=>Wd("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var b=S(g);return Ai(b,()=>c()??fs),y(g),wr(g,h=>a(h),()=>a()),p(n,g),vn(f)}const xl=IS.CHAT_MEDIA,wd=CS().min(1).max(512);Zs({workspaceId:wd,agentId:wd,draftId:Nl(),principalId:wd,media:PS(mS).min(1).max(20)}).strict();const ix=Zs({sessionId:Nl()}).strict();ix.extend({control:RS("action",[Zs({action:bi("readiness")}).strict(),Zs({action:bi("export"),request:kS}).strict(),Zs({action:bi("transcribe"),request:xS}).strict(),Zs({action:bi("release"),jobId:Nl()}).strict(),Zs({action:bi("adopt"),jobId:Nl()}).strict()])}).strict();function Yd(n,r,a,i=async(c,l)=>typeof window>"u"||SS(window)!=="electron"?{ok:!1,error:"unavailable"}:$S().invoke(c,l)){let c=null,l=null,f=!1;async function g(){f=!0,a.removeEventListener("abort",b);const x=c;c=null,x&&await i(xl.CLOSE,{sessionId:x}).catch(()=>{})}const b=()=>{g()};a.addEventListener("abort",b,{once:!0});const h=()=>{if(f||a.aborted||!r())throw new Error("media-send-retired")};async function P(){if(h(),c)return c;if(l)return l;l=(async()=>{const x=await i(xl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");c=x.value.sessionId;try{return h(),c}catch(D){throw await g(),D}})();try{return await l}finally{l=null}}async function I(x){const D=await P();h();const N=await i(xl.CONTROL,{sessionId:D,control:x});return h(),N}return{service:{exportMedia:x=>I({action:"export",request:x}),adoptMediaJob:x=>I({action:"adopt",jobId:x}),transcribeMedia:x=>I({action:"transcribe",request:x}),releaseMediaJob:async x=>c?await i(xl.CONTROL,{sessionId:c,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:g,readiness:()=>I({action:"readiness"})}}const bd=new Set;async function lx(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:f,agentId:g}=i,b=Pi(F.state),h=Dl.select(F.state,f),P=If.select(F.state),I=mf(),q=JSON.stringify([b,f,g]);if(!b||!h||!P||l.wsId!==f||bd.has(q))return!1;bd.add(q);const x=new AbortController,D=()=>x.abort();a.addEventListener("abort",D,{once:!0});const N=()=>!a.aborted&&!x.signal.aborted&&Pi(F.state)===b&&Dl.select(F.state,f)===h&&_f(I)&&r.isCurrentDraft(i),T=F.getReadableState().subscribe(()=>{N()||x.abort()});let O=null;try{if(!N()||iS(c))return!1;const V=Tf(i.attachments),ie=Ef(_S(f,g),V,c.map(pe=>({contextItemId:pe.id,attachmentId:pe.attachmentId,path:pe.path}))),R=new Set([...ie.images,...ie.clips].map(pe=>pe.contextItemId));if(V.some(([pe])=>!R.has(pe))||ie.images.some(pe=>pe.mediaError)||ie.clips.some(pe=>pe.mediaError)||!wS(l.text,ie))throw new Error("invalid-evidence");if(O=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!N())return!1;const k=await Ny.agents.get(g,f);if(!N())return!1;if(!k||k.workspaceId!==f||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const Q=ie.clips.flatMap(pe=>pe.media?[pe.media]:[]);Q.length&&!O&&(O=Yd({workspaceId:f,agentId:g,draftId:crypto.randomUUID(),principalId:P.principal.id,media:Q},N,x.signal));const ge=oy(c,ie),Re=Cd(ge),he=await iy({workspaceId:f,agentId:g,evidence:ie,clickedItems:c,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Re.imageBlocks,fileBlocks:Re.fileBlocks},binding:I,service:O?.service??null,current:N,onRecord:()=>{}});return!he||!N()?!1:El(F,g,he)}catch{return N()&&F.dispatch(iw(g,u.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",D),await O?.dispose(),bd.delete(q)}}const iv=1e4,zp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function jp(n){return TS(n.messageMetadata)}function cx(n,r){if(n.some(jp)){const a=n[0];return a&&!jp(a)&&Gp(a,r)?[a.id]:[]}return n.filter(a=>Gp(a,r)).map(a=>a.id)}function dx(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function Gp(n,r){return!n.requeuedAfterFailure&&AS(n,r)}function ux(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,f=r.blocked||r.interrupted,g=r.timeoutMs??iv;let b=n.prediction;if(b){const x=new Set(i.map(O=>O.id)),D=b.ids.filter(O=>x.has(O)&&!c.has(O)),N=l-b.startedAt>=g,T=n.wasBusy&&!a;!D.length||N||f&&!a||T?b=null:D.length!==b.ids.length&&(b={...b,ids:D})}const h=n.wasBusy&&!a,P=n.wasBusy?n.busySince:a?l:null,I=n.wasBusy&&n.preempted||P!==null&&r.directSendAt!==null&&r.directSendAt>P;if(!b&&h&&!f&&!I){const x=cx(i,l).filter(D=>!c.has(D));x.length&&(b={ids:x,startedAt:l})}const q={wasBusy:a,busySince:a?P:null,preempted:a&&I,prediction:b};return n.wasBusy===q.wasBusy&&n.busySince===q.busySince&&n.preempted===q.preempted&&n.prediction===q.prediction?n:q}class gx{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let c;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(f=>{c=setTimeout(()=>f(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function px(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Vp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var fx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function lv(n,r){if(new.target)return un({component:lv,...n});fn(r,!0);const a=()=>ue(P,"$typing$",i),[i,c]=Ur();let l=Z(r,"workspaceId",7),f=Z(r,"agentId",7),g=Z(r,"class",7,"");const b=Bn(""),h=Bn("");se(()=>{b.set(l())}),se(()=>{h.set(f())});const P=lS(b,h),I=o(()=>h$(a()));var q={get workspaceId(){return l()},set workspaceId(O){l(O),ee()},get agentId(){return f()},set agentId(O){f(O),ee()},get class(){return g()},set class(O=""){g(O),ee()},$set:gn,$on:(O,V)=>pn(r,O,V)},x=Wt(),D=ye(x);{var N=O=>{var V=fx(),ie=S(V),R=S(ie);v$(R,{get people(){return a()},size:12,decorative:!0}),y(ie);var k=_(ie,2),Q=de(k,!0);dn(2),y(V),L(()=>{ke(V,1,`${Df} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${g()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(Q,e(I))}),p(O,V)};B(D,O=>{e(I)&&O(N)})}p(n,x);var T=vn(q);return c(),T}const vx=50,hx=5e3,mx=500,_x=()=>({authority:()=>Pi(F.state),persistSnapshot:cy,dispatch:n=>F.dispatch(n),ownerView:n=>dy.withStore(F)(n)});function wx(n){const r=n.store??_x(),a=crypto.randomUUID();let i=me(!1),c=me(!1),l=me(!1),f=null,g=null,b=0,h=!1,P=null,I=null,q=null,x=0,D=null,N=null;const T={};let O,V=me([]),ie=null,R=0,k="",Q=0,ge="";const Re=()=>{const W=n.workspaceId(),C=n.agentId();if(!W||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||h)return null;const Me=n.inputValue(),H=pe(),Y=O?.shared,X=Y?.workspaceId===W&&Y.agentId===C?Y.lifetime:null,Ie=JSON.stringify([re,W,C,x,X,H.map(z=>[z.id,z.attachmentId,z.path])]);Ie!==ge&&(ge=Ie,Q+=1);const Ne=JSON.stringify([re,W,C,Me,H,x]);return Ne!==k&&(k=Ne,R+=1),{authority:re,ownerId:a,workspaceId:W,agentId:C,text:Me,attachments:JSON.parse(JSON.stringify(H)),generation:R,attachmentEpoch:Q}};let he=null;const pe=()=>JI(n.contextItems(),YI(n.contextItems(),e(V))),qe=W=>{if(O=W,!W||h)return;const C=W.restore;if(N&&C?.requestId===N.requestId&&C.status!=="pending"){const{apply:H}=N;N=null,w(c,!1),C.status==="restored"&&w(V,C.draft?.attachments??[]),H(C)}const re=W.shared;if(re&&!e(c)&&g===`${re.workspaceId}\0${re.agentId}`){const H=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(ie!==H){ie=H;const Y=he??f,X=Y&&n.inputValue()===Y.text&&JSON.stringify(pe())===Y.attachmentsJson;re.origin===a?he={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:X&&(b+=1,q&&clearTimeout(q),w(V,re.snapshot.attachments),he=f={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(Il(e(V))),n.applyEditorContent(re.snapshot.text))}}it(Re);const Me=[];for(const H of W.saves){if(H.status==="pending")continue;Me.push(H.id);const Y=T[H.id];delete T[H.id],Y?.(H)}Me.length>0&&queueMicrotask(()=>r.dispatch(uw(a,Me)))},fe=(W,C,re)=>{const Me=crypto.randomUUID();N={requestId:Me,apply:re},w(c,!0),r.dispatch(pw(a,Me,W,C))},oe=()=>{N&&(N=null,w(c,!1),r.dispatch(vw(a)))},Te=()=>{const W=D;W&&(D=null,r.dispatch(fw(a)),O?.saves.some(C=>C.id===W)||delete T[W])};r.dispatch(lw(a));const J=r.ownerView(a).subscribe(W=>it(()=>qe(W))),ae=()=>{I&&(clearTimeout(I),I=null),w(l,!1)},Ae=()=>{D&&(D=null,r.dispatch(gw(a)))};se(()=>{const W=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!W){it(()=>{b+=1,g=null,oe(),P&&clearTimeout(P),P=null,ae(),q&&clearTimeout(q),q=null,w(i,!1),Ae()});return}if(!C||!re)return;const Me=`${C}\0${re}`;if(g===Me)return;const H=g!==null;g=Me;const Y=++b;it(()=>{f=null,he=null,ie=null,w(V,[]),P&&clearTimeout(P),ae(),q&&(clearTimeout(q),q=null),H&&(Ae(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const X=ly(C,re);if(X){w(V,X.attachments),w(i,!1);const Ne=n.contextItems().length>0,z=X.text,Se=JSON.stringify(X.attachments);n.setInputValue(X.text),Ne||n.setContextItems(Il(X.attachments)),n.applyEditorContent(X.text),f={text:X.text,attachmentsJson:Se},fe(C,re,Ce=>{if(Ce.status!=="restored")return;const De=Ce.draft;if(h||!(n.active?.()??!0)||g!==Me||b!==Y)return;const at=De?.text??"",Xe=De?.attachments??[],Fe=JSON.stringify(Xe);ld(C,re,{text:at,attachments:Xe});const Pe=n.inputValue()===z&&JSON.stringify(pe())===Se;Ne||!Pe||(at!==z&&(n.setInputValue(at),n.applyEditorContent(at)),Fe!==Se&&n.setContextItems(Il(Xe)),f={text:at,attachmentsJson:Fe})});return}w(i,!0),I=setTimeout(()=>{I=null,(n.active?.()??!0)&&w(l,!0)},mx),P=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),ae())},hx);const Ie=()=>{!(n.active?.()??!0)||g!==Me||b!==Y||(P&&clearTimeout(P),w(i,!1),ae())};fe(C,re,Ne=>{if(Ne.status!=="restored"){Ie();return}const z=Ne.draft;if(h||!(n.active?.()??!0)||g!==Me||b!==Y)return;const Se=!!n.inputValue();if(!Se&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Il(z.attachments)),!Se&&z?.text&&(n.setInputValue(z.text),q=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},vx)),f===null){const Ce=z?.text??"",De=z?.attachments??[];f={text:Ce,attachmentsJson:JSON.stringify(De)},ld(C,re,{text:Ce,attachments:De})}Ie()})})}),se(()=>{const W=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Me=e(i);if(!W){it(Te);return}if(!C||!re)return;const H=n.inputValue(),Y=pe();if(it(Re),it(Te),Me||f===null&&!H&&Y.length===0)return;const X=JSON.stringify(Y);if(f!==null&&f.text===H&&f.attachmentsJson===X)return;JSON.stringify(e(V))!==X&&w(V,Y);const Ie=`${C}\0${re}`,Ne=x,z=crypto.randomUUID();T[z]=Se=>{if(n.active?.()??!0){if(Se.status==="saved"){g===Ie&&x===Ne&&(f={text:H,attachmentsJson:X});return}n.onSaveError?.(new Error(Se.error))}},it(()=>{D=z,r.dispatch(cw(a,z,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:H,attachments:Y,rollback:f?{text:f.text,attachments:JSON.parse(f.attachmentsJson)}:null}))})}),se(()=>()=>{h=!0,P&&clearTimeout(P),I&&clearTimeout(I),q&&clearTimeout(q),Ae(),J(),r.dispatch(dw(a))});const He=W=>{const C=Re();return C!==null&&C.authority===W.authority&&C.ownerId===W.ownerId&&C.workspaceId===W.workspaceId&&C.agentId===W.agentId&&C.generation===W.generation&&C.text===W.text&&JSON.stringify(C.attachments)===JSON.stringify(W.attachments)};return{captureDraft:Re,isCurrentDraft:He,updateAttachmentScreen(W,C,re){return!He(W)||!W.attachments.some(Me=>Me.id===C)?null:(w(V,W.attachments.map(Me=>Me.id===C?{...Me,screen:structuredClone(re)}:Me)),Re())},async flushDraft(W){if(!He(W))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,W.workspaceId,W.agentId,W,W.authority),He(W)},get restorePending(){return e(c)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(b+=1,x+=1,oe(),P&&(clearTimeout(P),P=null),q&&(clearTimeout(q),q=null),w(i,!1),ae(),Te(),g!==null){const[W,C]=g.split("\0");ld(W,C,{text:"",attachments:[]}),he=null,w(V,[]),f={text:"",attachmentsJson:"[]"}}}}}function Ei(n){if(!n)return null;const r=Ef(JSON.stringify([n.workspaceId,n.agentId]),Tf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(c=>c.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function bx(n,r,a){const i=F.state.principal.snapshot,c=()=>Pi(F.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,f=Yd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const g=await f.readiness();return!c()||!g.ok?{ready:!1}:g.value.find(b=>b.sourceId===r.source.id)??{ready:!1}}finally{await f.dispose()}}function Kp(n){let r=me(null),a=me(!1),i=me(!1),c=null,l=!0,f=0,g=null;Es(()=>{l=!1,f++}),se(()=>{const I=n.capture();e(r)&&(!I||I.authority!==e(r).capture.authority||I.ownerId!==e(r).capture.ownerId||I.workspaceId!==e(r).capture.workspaceId||I.agentId!==e(r).capture.agentId||I.attachmentEpoch!==e(r).capture.attachmentEpoch)&&w(r,null)});async function b(I){if(n.disabled()||e(a))return;const q=n.drafts.captureDraft(),x=Ei(q),D=x?.clips.find(V=>V.contextItemId===I);if(!q||!D?.media||!x)return;const N=uy({workspaceId:q.workspaceId,agentId:q.agentId,clip:D,evidence:x,marks:x.marks}),T=wf(q.workspaceId,D.path);if(!N||!T)return;const O=++f;c=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||f!==O||!n.drafts.isCurrentDraft(q))return;const V=await(n.prepareOutput??bx)(q,D.media,n.drafts);if(!l||f!==O||!n.drafts.isCurrentDraft(q))return;const{attachmentPath:ie,...R}=N;w(r,{capture:q,contextItemId:I,snapshot:{...R,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&f===O&&w(i,!0)}finally{l&&f===O&&w(a,!1)}}async function h(I){const q=crypto.randomUUID(),x=e(r),D=n.drafts.captureDraft();if(!x||!D||D.authority!==x.capture.authority||D.ownerId!==x.capture.ownerId||D.workspaceId!==x.capture.workspaceId||D.agentId!==x.capture.agentId||D.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:q,result:"stale-source"};const N=Ei(D),T=N?.clips.find(Q=>Q.contextItemId===x.contextItemId);if(!N||!T?.media)return{requestId:q,result:"stale-source"};const V=g?.openId===x.snapshot.openId&&g.inputRevision===I.revision&&JSON.stringify(g.media)===JSON.stringify(T.media)?{...I,revision:T.media.saved?.revision??0}:I,ie=bS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:D.workspaceId,agentId:D.agentId},sourceId:I.sourceId,sourceRevision:I.sourceRevision,expectedEditRevision:V.revision,edit:V});if(ie.status!=="saved")return{requestId:q,result:ie.status==="invalid-edit"?"failed":ie.status};const R=yS({...N,clips:N.clips.map(Q=>Q.id===T.id?{...Q,media:ie.media}:Q)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(D,x.contextItemId,R);if(!k)return{requestId:q,result:"stale-source"};g={openId:x.snapshot.openId,media:ie.media,inputRevision:I.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:q,result:"stale-source"};await n.drafts.flushDraft(k);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!Q||Q.attachmentEpoch!==x.capture.attachmentEpoch||Q.authority!==k.authority||Q.ownerId!==k.ownerId||Q.workspaceId!==k.workspaceId||Q.agentId!==k.agentId||JSON.stringify(Q.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(R)?{requestId:q,result:"stale-source"}:(g=null,{requestId:q,result:"saved",saved:ie.media.saved??void 0})}catch{return{requestId:q,result:"failed"}}}function P(I){return n.disabled()||!n.onRemove(I)?!1:(e(r)?.contextItemId===I&&w(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:b,save:h,remove:P,close(){w(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var yx=E('<p role="alert"> </p>'),Ix=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),Sx=E("<!> <!> <!>",1);function cv(n,r){if(new.target)return un({component:cv,...n});fn(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),c=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),f=Z(r,"controllerFactory",7,Kp),g=Z(r,"beforeOpen",7),b=Z(r,"onReviewChange",7);const h=it(()=>f()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:R=>l()(R),beforeOpen:()=>g()?.()??Promise.resolve()}));se(()=>{const R=h.opening,k=h.session;it(()=>b()?.(R,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const P=o(gy),I=o(()=>Ei(a())),q=o(()=>e(I)?.clips.map(R=>({id:R.contextItemId,kind:"clip",owner:"evidence",duration:Ap(R.durationMs),recording:!1,url:a()?wf(a().workspaceId,R.path):void 0,...R.media?.saved?{summary:py(R.media.saved)}:{}}))??[]);let x=me(null);var D={get capture(){return a()},set capture(R){a(R),ee()},get drafts(){return i()},set drafts(R){i(R),ee()},get disabled(){return c()},set disabled(R=!1){c(R),ee()},get onRemove(){return l()},set onRemove(R){l(R),ee()},get controllerFactory(){return f()},set controllerFactory(R=Kp){f(R),ee()},get beforeOpen(){return g()},set beforeOpen(R){g(R),ee()},get onReviewChange(){return b()},set onReviewChange(R){b(R),ee()},$set:gn,$on:(R,k)=>pn(r,R,k)},N=Sx(),T=ye(N);{let R=o(()=>c()||h.opening);MS(T,{get items(){return e(q)},get labels(){return e(P)},get disabled(){return e(R)},onEdit:k=>void h.open(k),onMarkUp:k=>void h.open(k),get onRemove(){return h.remove}})}var O=_(T,2);{var V=R=>{var k=yx(),Q=de(k,!0);L(ge=>j(Q,ge),[()=>u.dock_captureEditor_saveFailed_label()]),p(R,k)};B(O,R=>{h.problem&&R(V)})}var ie=_(O,2);{let R=o(()=>!!h.session),k=o(()=>u.dock_captureEditor_recording_title({duration:h.session?Ap(h.session.snapshot.durationMs??0):""}));C$(ie,{get open(){return e(R)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>h.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),h.restoreFocus()},get contentRef(){return e(x)},set contentRef(Q){w(x,Q,!0)},children:(Q,ge)=>{var Re=Wt(),he=ye(Re);{var pe=qe=>{var fe=Wt(),oe=ye(fe);xi(oe,()=>h.session.snapshot.openId,Te=>{var J=Ix(),ae=S(J);R$(ae,{get snapshot(){return h.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>h.close(),get onSave(){return h.save},onDelete:async()=>!!h.session&&h.remove(h.session.contextItemId)}),y(J),p(Te,J)}),p(qe,fe)};B(he,qe=>{h.session&&qe(pe)})}p(Q,Re)},$$slots:{default:!0}})}return p(n,N),vn(D)}const Cl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function $x(n){let r=me(!1),a=me(!1),i=me(null),c=!1,l=0,f=null,g=null;async function b(I){I.abort.abort(),I.slot?.cancel(),await I.native?.dispose()}async function h(){l++;const I=g;g=null,I&&await b(I)}ro(()=>{const I=()=>{w(r,document.hasFocus(),!0)};return I(),window.addEventListener("focus",I),window.addEventListener("blur",I),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",I)}});const P=F.getReadableState().subscribe(()=>{g&&!g.current()&&h()});return Es(()=>{c=!0,P(),h()}),se(()=>{const I=n.capture(),q=I?Cl(I):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===q);it(()=>{if(!x||!I){h();return}if(g?.key===q)return;if(f===q){h();return}h();const N=Ei(I)?.clips.flatMap(Re=>!Re.mediaError&&Re.media?[Re.media]:[])??[],T=N[0],O=F.state.principal.snapshot,V=Dl.select(F.state,I.workspaceId);if(!T||!O||!V||n.drafts.gateActive)return;const ie=mf(),R=new AbortController,k=()=>!c&&!R.signal.aborted&&Pi(F.state)===I.authority&&Dl.select(F.state,I.workspaceId)===V&&_f(ie)&&!!n.capture()&&Cl(n.capture())===q,Q={key:q,capture:I,abort:R,native:null,slot:null,current:k};g=Q;const ge=l;n.drafts.flushDraft(I).then(async Re=>{if(!(g!==Q||ge!==l||!k())){if(!Re){f=q,await h();return}Q.native=Yd({workspaceId:I.workspaceId,agentId:I.agentId,draftId:crypto.randomUUID(),principalId:O.principal.id,media:structuredClone(N)},k,R.signal),Q.slot=fy(Q.native.service),f=q,Q.slot.warm(q,T,k)}}).catch(()=>{g===Q&&h()})})}),{cancel:h,async beforeEditorOpen(){w(a,!0),f=null,await h()},editorState(I,q){w(a,I,!0);const x=q?Cl(q.capture):null;q&&e(i)?.openId!==q.openId&&(f=null),w(i,q&&x?{openId:q.openId,key:x}:null)},take(I,q){const x=g;if(!x?.native||!x.slot||x.key!==Cl(I)||!x.current())return h(),null;g=null,l++;const D=x.native,N=x.slot,T=()=>x.abort.abort();return q.addEventListener("abort",T,{once:!0}),q.aborted&&T(),{service:{...D.service,takePreparedRecording:O=>N.take(x.key,O,()=>!q.aborted&&x.current())},async dispose(){q.removeEventListener("abort",T),await b(x)}}}}}var kx=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function dv(n,r){if(new.target)return un({component:dv,...n});fn(r,!1);var a={$set:gn,$on:(f,g)=>pn(r,f,g)};Nf();var i=kx(),c=S(i),l=de(c,!0);return y(i),L(f=>j(l,f),[()=>u.chat_draftGate_loading_label()]),p(n,i),vn(a)}var xx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function qd(n,r){if(new.target)return un({component:qd,...n});fn(r,!1);var a={$set:gn,$on:(f,g)=>pn(r,f,g)};Nf();var i=xx(),c=_(S(i),2),l=de(c,!0);return dn(2),y(i),L((f,g)=>{ze(i,"aria-label",f),j(l,g)},[()=>u.chat_newMessagesDivider_label(),()=>u.chat_newMessagesDivider_label()]),p(n,i),vn(a)}function Cx(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Px(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Rx(n,r){return r&&n.includes(r)?r:null}function Qp(n,r,a){return r-n<=a}const Tx=.2;function Jp(n,r,a){const i=Math.max(0,a-r),c=n-Tx*r;return Math.min(Math.max(0,c),i)}function Ax(n,r,a){return n!==null&&a&&n===r}function Mx(n){return n?hw(n)&&mw(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Ex(n){const r=[],a=new Set;let i,c;for(const O of n.messages){if(O.agentId&&O.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(O.id))continue;a.add(O.id),n.breakBeforeMessageIds?.has(O.id)&&(i=void 0,c=void 0);const V=ES(O);if(V?.kind!=="turn-failure")c=void 0;else{const ie=i?.seq!==void 0&&O.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(O.seq)&&O.seq===i.seq+1;(!c||!ie)&&(c={key:JSON.stringify([n.agentId,"notice",O.id]),anchorMessageId:O.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:O.id,reason:V.reason,timestamp:O.timestamp}),c.recordedFailureCount+=1}i=O}const l=new Map;for(const O of n.queue){if(!O.requeuedAfterFailure)continue;const V=O.turnId||void 0,ie=JSON.stringify([n.agentId,V?"turn":"queue",V??O.id]);let R=l.get(ie);R||(R={key:ie,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(ie,R)),R.queueIds.includes(O.id)||R.queueIds.push(O.id)}const f=[...l.values()],g=n.session?.id===n.agentId?n.session:void 0,b=g?.status===$i.Error,h=n.transientError||b&&g.stopReason||null,P=b&&!h,I=b&&(!n.transientError||n.transientError===g.stopReason)?g.stopReasonTimestamp:void 0,q=I?yp(I):null,x=q&&h&&h===g?.stopReason?r.flatMap(O=>O.records).filter(O=>O.reason===h&&yp(O.timestamp)===q):[],D=x.length===1?x[0].messageId:void 0,T=(g?Sf(g):!1)?"attempting":f.length?"queued":h||P?"action-needed":"inactive";return{history:r,queueRecovery:f,current:{state:T,error:h,needsFallbackReason:P,timestamp:I,noticeId:D}}}function qx(n,r){const a=n.hiddenTail[0]?.id,i=Ex({...r,messages:[...n.groups.flatMap(g=>g.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(g=>({...g,records:g.records.filter(b=>b.messageId!==c)})).filter(g=>g.records.length>0),f=new Set(l.map(g=>g.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(g=>[g.records[0].messageId,g])),collapsedMessageIds:new Set(i.history.flatMap(g=>g.records.map(b=>b.messageId).filter(b=>!f.has(b))))}}var Lx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Hx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Ox=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Fx=E('<div class="mb-5"><!></div>'),Dx=E('<p data-testid="agent-welcome-description"> </p> <!>',1),Nx=E("<!> <!>",1),Bx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),Wx=E("<!> <span> </span>",1),Ux=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function uv(n,r){if(new.target)return un({component:uv,...n});fn(r,!0);const a=()=>ue(x,"$userOverrides$",f),i=()=>ue(q,"$specialists$",f),c=()=>ue(O,"$isGitHubAuth$",f),l=()=>ue(V,"$recentSpecialistIds$",f),[f,g]=Ur();let b=Z(r,"onSpecialistChange",7),h=Z(r,"session",7),P=Z(r,"workspaceId",7);const I=Bn(P()??"");se(()=>I.set(P()??""));const q=Gf(I),x=Y$();se(()=>{a()});const D=o(()=>{if(!h()||Qy(h()))return null;const W=h().metadata?.specialist||h().agentMetadata?.specialist;return W&&i().find(C=>C.id===W)||null});async function N(W){W?await zl({specialist:W,hash:"specialists"}):await zl({view:"create-specialist"})}let T=me(!1);const O=X$(),V=cS(),ie=o(()=>_w(Z$(i(),c()),l()));let R=me(!1);const k=o(()=>u.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(D)?.name??u.chat_shared_general_fallback()),ge=o(()=>e(D)?.description??u.chat_shared_noSpecializedBehavior_label()),Re=o(()=>e(D)?e(D).defaultBehaviorPrompt||"":e(k));var he={get onSpecialistChange(){return b()},set onSpecialistChange(W){b(W),ee()},get session(){return h()},set session(W){h(W),ee()},get workspaceId(){return P()},set workspaceId(W){P(W),ee()},$set:gn,$on:(W,C)=>pn(r,W,C)},pe=Ux(),qe=S(pe);{var fe=W=>{var C=Fx(),re=S(C);uk(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(R)},set open(Y){w(R,Y,!0)},trigger:(Y,X)=>{let Ie=()=>(X?.()).props;{let Ne=o(()=>Wd("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));bt(Y,qi(Ie,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(Ne)},"data-testid":"specialist-picker-trigger",children:(z,Se)=>{var Ce=Lx(),De=ye(Ce),at=S(De);{let Ge=o(()=>e(D)?.id??null),Qe=o(()=>e(D)?.icon??null);dk(at,{agentId:"blank",variant:"emphasized",get specialist(){return e(Ge)},get icon(){return e(Qe)}})}y(De);var Xe=_(De,2),Fe=S(Xe),Pe=de(Fe,!0),G=_(Fe,2),te=de(G,!0);y(Xe);var Oe=_(Xe,2),we=S(Oe);ct(we,{get icon(){return Na},size:10}),y(Oe),L(()=>{j(Pe,e(Q)),j(te,e(ge))}),p(z,Ce)},$$slots:{default:!0}}))}},content:Y=>{var X=Ox(),Ie=S(X),Ne=S(Ie),z=de(Ne,!0),Se=_(Ne,2),Ce=de(Se,!0);y(Ie);var De=_(Ie,2),at=S(De);{let Pe=o(()=>e(D)?.id??null);J_(at,{get specialists(){return e(ie)},get value(){return e(Pe)},onchange:G=>{w(R,!1),b()?.(G)}})}y(De);var Xe=_(De,2),Fe=S(Xe);Et(Fe,()=>Br,(Pe,G)=>{G(Pe,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{w(R,!1),N()},children:(te,Oe)=>{var we=Hx(),Ge=ye(we),Qe=S(Ge);ct(Qe,{get icon(){return q$},size:12}),y(Ge);var dt=_(Ge,2),ft=de(dt,!0);L(lt=>j(ft,lt),[()=>u.chat_regularAgentWelcome_createSpecialist_label()]),p(te,we)},$$slots:{default:!0}})}),y(Xe),y(X),L((Pe,G)=>{j(z,Pe),j(Ce,G)},[()=>u.workspace_createAgentSection_specialists_label(),()=>u.workspace_createAgentSection_specialists_description()]),p(Y,X)},$$slots:{trigger:!0,content:!0}}),y(C),p(W,C)};B(qe,W=>{b()&&W(fe)})}var oe=_(qe,2);{var Te=W=>{var C=Wt(),re=ye(C);{let Me=o(()=>u.chat_specialistSelector_prompt_label());Et(re,()=>pk,(H,Y)=>{Y(H,{class:"mb-3",role:"region",get"aria-label"(){return e(Me)},children:(X,Ie)=>{var Ne=Nx(),z=ye(Ne);Et(z,()=>sv,(Ce,De)=>{De(Ce,{children:(at,Xe)=>{var Fe=Wt(),Pe=ye(Fe);Et(Pe,()=>ov,(G,te)=>{te(G,{class:"type-caption font-medium",children:(Oe,we)=>{dn();var Ge=ln();L(Qe=>j(Ge,Qe),[()=>u.chat_specialistSelector_prompt_label()]),p(Oe,Ge)},$$slots:{default:!0}})}),p(at,Fe)},$$slots:{default:!0}})});var Se=_(z,2);Et(Se,()=>gk,(Ce,De)=>{De(Ce,{children:(at,Xe)=>{var Fe=Dx(),Pe=ye(Fe),G=de(Pe,!0),te=_(Pe,2);bt(te,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>w(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Oe,we)=>{dn();var Ge=ln();L(Qe=>j(Ge,Qe),[()=>e(T)?u.chat_regularAgentWelcome_showLess_label():u.chat_regularAgentWelcome_showMore_label()]),p(Oe,Ge)},$$slots:{default:!0}}),L(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(G,e(Re))}),p(at,Fe)},$$slots:{default:!0}})}),p(X,Ne)},$$slots:{default:!0}})})}p(W,C)},J=W=>{var C=Bx(),re=de(C,!0);L(()=>j(re,e(Re))),p(W,C)};B(oe,W=>{e(D)?W(Te):W(J,-1)})}var ae=_(oe,2);{var Ae=W=>{bt(W,{variant:"ghost-light",size:"sm",onclick:()=>N(e(D).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(C,re)=>{var Me=Wx(),H=ye(Me);ct(H,{get icon(){return E$},size:12,class:"opacity-60"});var Y=_(H,2),X=de(Y,!0);L(Ie=>j(X,Ie),[()=>u.chat_regularAgentWelcome_customize_label()]),p(C,Me)},$$slots:{default:!0}})};B(ae,W=>{e(D)&&W(Ae)})}y(pe),p(n,pe);var He=vn(he);return g(),He}var zx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),jx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Gx=E('<span class="type-caption"> </span>'),Vx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Kx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Xd(n,r){if(new.target)return un({component:Xd,...n});fn(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),c=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),f=Z(r,"showShortcutHints",7,!1),g=Z(r,"reserveShortcutHintSpace",7,!1),b=Z(r,"workspaceId",7);const P=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",I=d$.replace("text-ui","type-caption");function q(k){i()(k)}function x(k,Q){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),q(Q))}function D(k,Q){k.preventDefault(),k.stopPropagation(),Md(Q,{workspaceId:b(),event:k})}function N(k,Q){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Md(Q,{workspaceId:b(),event:k}))}function T(k){return k<3}var O={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return c()},set onEdit(k){c(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return f()},set showShortcutHints(k=!1){f(k),ee()},get reserveShortcutHintSpace(){return g()},set reserveShortcutHintSpace(k=!1){g(k),ee()},get workspaceId(){return b()},set workspaceId(k){b(k),ee()},$set:gn,$on:(k,Q)=>pn(r,k,Q)},V=Wt(),ie=ye(V);{var R=k=>{var Q=Kx(),ge=S(Q);{const Re=(pe,qe)=>{let fe=()=>(qe?.()).item,oe=()=>(qe?.()).index;const Te=o(()=>ey(fe())),J=o(()=>e(Te)[0]?.type==="text"?e(Te)[0].content:"");var ae=Vx(),Ae=S(ae),He=S(Ae);ct(He,{get icon(){return Bf},size:16,get class(){return ur}}),y(Ae);var W=_(Ae,2),C=S(W),re=de(C,!0),Me=_(C);Dn(Me,17,()=>e(Te).slice(e(J)?1:0),V_,(z,Se)=>{var Ce=Wt(),De=ye(Ce);{var at=Fe=>{const Pe=o(()=>Zb(e(Se).url));var G=zx(),te=de(G,!0);L(()=>{ze(G,"href",e(Pe)),ze(G,"title",e(Pe)),j(te,e(Se).label)}),ps("click",G,Oe=>D(Oe,e(Pe))),ps("keydown",G,Oe=>N(Oe,e(Pe))),p(Fe,G)},Xe=Fe=>{var Pe=ln();L(()=>j(Pe,e(Se).content)),p(Fe,Pe)};B(De,Fe=>{e(Se).type==="link"?Fe(at):Fe(Xe,-1)})}p(z,Ce)}),y(W);var H=_(W,2);{var Y=z=>{var Se=jx();let Ce;var De=de(Se);L(()=>{Ce=ke(Se,1,`${I??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!f()}),ze(Se,"aria-hidden",f()?void 0:"true"),ze(Se,"data-hint-visible",f()),j(De,`${P}${oe()+1}`)}),p(z,Se)},X=o(()=>T(oe())&&(f()||g()));B(H,z=>{e(X)&&z(Y)})}var Ie=_(H,2);{var Ne=z=>{M$(z,{side:"top",delayDuration:300,trigger:De=>{{let at=o(()=>u.chat_suggestedPrompts_editInInput_ariaLabel());bt(De,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:Xe=>{Xe.stopPropagation(),c()(fe())},get"aria-label"(){return e(at)},children:(Xe,Fe)=>{ct(Xe,{get icon(){return L$},size:"xs"})},$$slots:{default:!0}})}},content:De=>{var at=Gx(),Xe=de(at,!0);L(Fe=>j(Xe,Fe),[()=>u.chat_suggestedPrompts_edit_tooltip()]),p(De,at)},$$slots:{trigger:!0,content:!0}})};B(Ie,z=>{c()&&z(Ne)})}y(ae),L(z=>{ke(ae,1,`${Df} ${c$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),ke(Ae,1,`${Bl??""} mt-px self-start`),ze(C,"aria-label",z),j(re,e(J))},[()=>Xb(fe())]),ps("click",C,z=>{z.stopPropagation(),q(fe())}),ps("keydown",C,z=>x(z,fe())),p(pe,ae)};let he=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");P$(ge,{get items(){return a()},virtualize:!1,onActivate:q,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(he)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Re,$$slots:{row:!0}})}y(Q),Nt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Nt(2,Q,()=>to,()=>({tier:"fast"})),p(k,Q)};B(ie,k=>{a().length>0&&k(R)})}return p(n,V),vn(O)}Bd(["click","keydown"]);var Qx=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function gv(n,r){if(new.target)return un({component:gv,...n});fn(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const c=o(()=>[{label:u.chat_chiefEmptyState_assignedPrs_label(),prompt:u.chat_chiefEmptyState_assignedPrs_prompt()},{label:u.chat_chiefEmptyState_staleWorkspaces_label(),prompt:u.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:u.chat_chiefEmptyState_agentPerformance_label(),prompt:u.chat_chiefEmptyState_agentPerformance_prompt()},{label:u.chat_chiefEmptyState_morningBrief_label(),prompt:u.chat_chiefEmptyState_morningBrief_prompt()},{label:u.chat_chiefEmptyState_randomTheme_label(),prompt:u.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(q=>q.label));function f(q){const x=e(c).find(D=>D.label===q);x&&a()(x.prompt)}var g={get onSelect(){return a()},set onSelect(q){a(q),ee()},get compact(){return i()},set compact(q=!1){i(q),ee()},$set:gn,$on:(q,x)=>pn(r,q,x)},b=Qx(),h=S(b),P=de(h,!0),I=_(h,2);return Xd(I,{get prompts(){return e(l)},onSelect:f,get compact(){return i()}}),y(b),L(q=>j(P,q),[()=>u.chat_chiefEmptyState_intro_label()]),p(n,b),vn(g)}const Zd=2e3,Jx=4e3,Yx=Jx-Zd-2;function Xx(n,r=Zd){const a=[];let i=0;for(let c=n.length-1;c>=0&&i<r;c-=1){const l=n[c];if(l.role!=="user"&&l.role!=="assistant")continue;const f=(l.contentBlocks??[]).filter(b=>b.type==="text").map(b=>b.text||b.content||"").join(""),g=(l.role==="assistant"?Y_(f).cleanedContent:f).trim();g&&(a.unshift({role:l.role,text:g}),i+=g.length)}return a}function Zx(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
|
|
1
|
+
var W_=Object.defineProperty;var Fg=n=>{throw TypeError(n)};var U_=(n,r,a)=>r in n?W_(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var Js=(n,r,a)=>U_(n,typeof r!="symbol"?r+"":r,a),z_=(n,r,a)=>r.has(n)||Fg("Cannot "+a);var To=(n,r,a)=>(z_(n,r,"read from private field"),a?a.call(n):r.get(n)),Dg=(n,r,a)=>r.has(n)?Fg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,a);import{t as un,bo as Z,bw as gn,bp as uf,b as pn,bm as u,bq as Ur,bs as ue,br as qi}from"./C0QTy0Sy.js";import{bs as fn,a5 as S,bf as fs,bA as y,W as p,bn as vn,aA as ee,aB as E,ca as se,a7 as Wt,ay as ye,aD as e,cd as Bn,c9 as o,bS as _,bl as de,be as dn,b_ as L,bO as j,c5 as it,bH as w,bV as me,bj as Es,bk as ro,b$ as ln,ai as Bd,aj as ps,bo as jl,br as Mr,c0 as Dt,ak as j_,cb as sd,aw as wi,a as G_}from"./3SdAC2_C.js";import{i as B}from"./bhKPSdq4.js";import{k as xi}from"./-K3ARgq0.js";import{g as Dn,i as V_,I as eo,p as Lo,e as Eo}from"./B6S6VNu7.js";import{n as Nt,l as ma,c as to,j as Ng,k as Fo,h as K_}from"./DLwWVKiF.js";import{b as gf,e as Wd,f as ke,s as ze,c as zt,g as gs}from"./7UPrdiE9.js";import{b as Q_}from"./goTpbPhD.js";import{b as wr}from"./Dn334wJv.js";import{m as J_,U as Y_,Z as X_,X as Z_,Y as ew,I as Bg,o as tw,l as nw,a2 as rw,x as Wg,$ as aw,a0 as Ug,r as sw,s as ow}from"./eTsHzcIE.js";import{Jv as F,fo as iw,eW as lw,f3 as cw,eX as dw,f1 as uw,f0 as gw,eZ as pw,e$ as fw,eY as vw,ru as hw,c6 as mw,i as $i,J4 as _w,Dc as pf,Dh as ww,Dj as zg,Dg as bw,Di as yw,vD as Iw,vF as Sw,Cp as ff,cp as $w,cn as kw,By as xw,bE as Cw,A3 as Pw,Ce as od,u$ as Rw,cq as jg,dB as Tw,dC as Aw,Co as Mw,el as Ew,CI as qw,CH as Lw,CM as Hw,CL as Ow,cQ as Fw,cT as Dw,nC as Nw,er as Bw,wR as Ww,CN as Uw,wT as zw,CO as jw,cU as Gw,cV as Vw,nK as Kw,Ah as Qw,Iq as Jw,Ag as Yw,Dt as Xw,wm as Zw,wn as eb,y$ as tb,z3 as id,wi as nb,wj as rb,rS as ab,rf as sb,rd as ob,f_ as ib,HO as lb,Lj as cb,GM as db,gn as ub,p2 as gb,Jj as pb,oj as fb,A2 as vb,ft as Gg,r2 as Vg,fm as hb,fl as mb,tB as _b,g3 as Kg,re as wb,fe as bb,C9 as yb,m as Ib,nL as Sb,zH as $b,yZ as kb,Ez as xb,Eo as Qg,xh as Cb,xi as Jg,u_ as Yg,p3 as Pb,DF as Rb,gj as Tb,g1 as Ab,eU as Mb,cM as Eb,A6 as qb,Lo as Lb,Cu as Hb,LG as Ob,y2 as Fb,ga as Db,fd as Nb,cL as Bb,cI as Wb,cH as Ub,vr as zb,xo as jb,xm as Gb,cF as Vb,cE as Kb,z5 as Qb,z0 as Jb,xn as Yb}from"./tr-2J8Mf.js";import{a as Ud}from"./CC7to1B5.js";import{aM as Xb,aL as Zb,bg as ey,a7 as ty,aD as ny,aO as ry,M as vf,a0 as hf,b8 as ay,b2 as sy,as as Xg,P as bl,b0 as Zg,a$ as ep,a_ as tp}from"./Bz7R1ahj.js";import{l as mf,G as oy,I as Cd,at as iy,b1 as El,a9 as _f,S as ly,aW as ld,aq as cy,aJ as dy,C as uy,z as wf,s as gy,A as py,v as fy,a$ as vy,aH as bf,aG as yf,aI as hy,j as np,aM as cd,aT as rp,aS as yl,aU as ap,Q as sp,d as my,e as _y,ax as wy,V as op,aE as by,c as yy,m as Iy,aV as ip,ap as Sy,aw as lp,a as $y,aA as ky,ad as cp,aD as xy,aX as dp,a_ as up,n as gp,ae as Cy,R as Py,ay as pp,am as Ry,O as Ty,as as Ay,h as My,q as Ey,$ as dd,_ as qy,aC as fp,a8 as Ly,f as Hy,i as Oy,a6 as Fy,ac as Dy}from"./DvSURWC2.js";import{f as Ny,o as By,E as Wy,C as Uy,m as zy,a2 as vp,aa as jy,K as Gy,e as Vy,y as Ky}from"./C6mS8uZB.js";import{g as Pi}from"./DypB-Dwi.js";import{dW as Dl,cU as If,O as Sf,W as Qy,bv as Jy,aF as $f,dH as kf,aU as qo,e8 as Yy,dw as xf,aw as zd,dV as jd,aN as Cf,cP as Xy,V as ha,a3 as Xs,B as Zy,a7 as eI,a4 as tI,M as nI,a6 as rI,ar as aI,aG as Pf,aO as ql,b6 as sI,ay as Rf,r as oI,n as Pd,H as iI,dY as lI,aQ as cI,aK as dI,c9 as uI,aW as gI,bM as pI,bK as fI,bL as vI,c8 as hI,c7 as mI,cN as _I,cM as wI,aS as bI,bb as yI,bd as II,bg as SI,bc as $I,bl as kI,bf as xI,be as CI,bh as PI,bi as RI,bk as TI,bj as AI,ax as MI,cj as EI,ck as qI,dv as LI,du as HI,a$ as OI,G as FI,b3 as DI,cf as NI,C as hp,d0 as BI,ba as ds,b$ as WI,X as UI,bq as zI,E as jI,ad as GI,t as VI,cW as KI,d3 as mp,Q as _p,dt as QI,cQ as ud}from"./BaujsV9k.js";import{u as Tf,a as Il,ag as JI,x as YI,ad as Af,af as XI,ac as Mf,a4 as ZI,F as wp,D as eS,e as tS,n as nS,s as rS,m as aS,Y as sS,k as oS}from"./BFIcslMA.js";import{a2 as iS,b5 as lS,cM as cS,a_ as dS,b4 as uS,c2 as gS,c9 as pS,w as fS,x as vS,cd as hS}from"./DVROSXw1.js";import{n as mS,P as Ef,F as _S,ai as wS,r as bS,ac as yS}from"./DX-Wrapd.js";import{I as IS,s as SS,H as bp}from"./Bqd7fdCF.js";import{e as $S}from"./CL3a4Hm1.js";import{e as kS,f as xS}from"./haN7a3Sc.js";import{s as CS,o as Zs,b as PS,g as Nl,d as RS,l as bi}from"./CIyUrgF0.js";import{a5 as TS,a7 as AS,D as MS,N as ES,ac as yp,X as qS,i as LS,r as dr,v as Ri,u as na,p as ki,x as br,S as Gd,m as Gl,s as Ho,y as Ti,o as ao,n as so,t as Ip,aa as oo,w as io,a9 as Vd,q as _a,z as Oo,J as Rd,_ as Sp,g as HS,F as OS,U as qf,I as Lf,a8 as Hf,a6 as Ll,O as FS,E as Of,V as DS,A as NS,b as BS,ab as WS,ad as Sl,G as US,e as gd,l as zS,C as jS,f as Ys,j as $p,H as us,Q as GS,d as $l,c as VS,a as kp,h as KS,L as QS,Y as xp,a4 as pd,a1 as Cp,a0 as JS,a3 as Pp,$ as Rp,T as YS,B as XS,k as ZS,a2 as e$,K as t$,R as n$,P as r$,W as a$}from"./DF2_1gr9.js";import{m as s$}from"./Dms_DO28.js";import{g as Ff}from"./DA5opfEp.js";import{b as o$}from"./EK6zOAHM.js";import{g as i$}from"./PIgqsYsQ.js";import{a as l$}from"./C4QKwtCH.js";import{q as Df,d as ur,r as c$,e as Bl,j as d$,g as Td,i as u$,f as Ad,c as g$,A as p$,O as Tp,k as f$}from"./DMQmPhTl.js";import{P as v$}from"./D_Xpj-6r.js";import{e as h$}from"./DB7RVYiL.js";import{b as m$,a as _$,g as w$,c as b$,i as y$}from"./DrxfcnSy.js";import{R as I$,g as S$,W as kl,c as $$}from"./CXS2Ba3S.js";import"./A9niI_uA.js";import"./CJ4Z96pe.js";import{t as Ai}from"./CrD0jtXE.js";import{F as k$,h as x$}from"./DCRuihKm.js";import"./lJeex2Gh.js";import{C as C$,e as Br,L as P$,l as Vl,d as Kl,K as Ql,h as Kd,M as Jl,S as Da}from"./fiz8N_zQ.js";import{D as R$}from"./518Fef2L.js";import{f as Ap}from"./chjnSxvZ.js";import"./DU3vNstz.js";import{i as Nf}from"./BjLb7AHW.js";import{h as Mp,i as Ep,g as qp,P as Lp,C as T$,m as Hl,R as A$}from"./BmTMWrby.js";import{f as bt,ae as M$}from"./FzlZUztb.js";import{F as ct,bs as E$,cd as q$,aw as Na,a2 as Bf,c9 as L$,bf as H$,be as O$,bg as F$,aO as Hp,aj as fd,aB as vd,bB as Wf,d3 as Wl,cF as D$,aM as Op,cb as Fp,cK as Ul,bu as N$,aS as B$,d0 as W$,a8 as Uf,ac as U$,ag as z$,cr as j$,ba as G$,aC as zf,cT as Dp,cz as V$,ax as K$,cD as Q$,c3 as J$}from"./U9jJmfYa.js";import{c as jf}from"./ChTqQfQN.js";import"./B4SiDSWP.js";import{c as Et}from"./CUkDMZwP.js";import{a5 as Gf,bg as Y$,ar as X$,k as Z$,Y as ek,W as tk,a2 as nk,Z as rk,bw as ak,V as sk,a1 as ok,ah as ik}from"./p9X2tUBM.js";import{d as zl,f as lk,e as ck}from"./DE7dSDHO.js";import{A as dk}from"./wl2qP2wF.js";import{D as uk}from"./Cqa6LF3b.js";import"./QeBH-DWE.js";import{a as gk,C as pk}from"./CCqqosml.js";import"./Bsh6nUhU.js";import{C as fk}from"./c5QZsH9t.js";import{h as Md,r as vk,a as hk}from"./DIG1mTAN.js";import{s as mk}from"./D37getya.js";import{I as _k,a as Vf}from"./BAKPnd3w.js";import{L as wk}from"./DsGUBv3k.js";import{g as bk,f as yk,b as Ik}from"./DKHY8q_S.js";import{s as Mi,g as Yn,i as Sk,j as $k,e as Np,r as Bp,f as kk,d as xk,a as hd,h as Ck}from"./3xK9OOJy.js";import{i as Wp,a as Pk}from"./Bu13V5mO.js";import{seekConversationToMessage as Up}from"./S8ugWfAx.js";import{l as Jt,o as md,h as Qd,n as Ed,q as Rk}from"./CE7dsja4.js";import{o as Tk}from"./nXfD7jHz.js";import{A as Kf}from"./KYuLFpkq.js";import{b as Qf}from"./BYq9VtBF.js";import{g as Ak,e as Jf,v as Mk,f as Ek,N as qk,M as Lk,K as Hk,k as Yf,l as Ok,H as Xf,s as Zf}from"./B2nCyo89.js";import{selectCurrentWorkspaceTabId as _d}from"./S845NCb3.js";import{o as Fk}from"./CPTZJWC9.js";import{d as Dk}from"./B0Z-1lwJ.js";import{P as Nk}from"./Ctbo6mXV.js";import{g as Bk}from"./DOEI9gYY.js";import{H as ev,M as Wk,y as Uk,J as zk,g as jk,i as Gk,u as Vk,e as tv,c as nv,d as Kk}from"./eElW3aeh.js";import{c as Qk,h as Jd,f as rv,Q as Jk}from"./DCK8dPAL.js";import{t as Yk}from"./DAsc1V4f.js";import{s as Xk}from"./BsieX9dN.js";import{i as av}from"./BcpfdNy8.js";import{d as Zk,i as ex,r as tx}from"./L_tYoUCb.js";import{g as nx}from"./yFcbscNn.js";var rx=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ax=E("<div><!></div>");function sv(n,r){if(new.target)return un({component:sv,...n});fn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=uf(r,rx);var f={get ref(){return a()},set ref(h=null){a(h),ee()},get class(){return i()},set class(h){i(h),ee()},get children(){return c()},set children(h){c(h),ee()},$set:gn,$on:(h,P)=>pn(r,h,P)},g=ax();gf(g,h=>({"data-slot":"card-header",class:h,...l}),[()=>Wd("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-x-4 gap-y-1.5 pt-4 pb-2 has-data-[slot=card-action]:grid-cols-[minmax(0,1fr)_auto]",fk,i())]);var b=S(g);return Ai(b,()=>c()??fs),y(g),wr(g,h=>a(h),()=>a()),p(n,g),vn(f)}var sx=new Set(["$$slots","$$events","$$legacy","ref","class","children"]),ox=E("<div><!></div>");function ov(n,r){if(new.target)return un({component:ov,...n});fn(r,!0);let a=Z(r,"ref",15,null),i=Z(r,"class",7),c=Z(r,"children",7),l=uf(r,sx);var f={get ref(){return a()},set ref(h=null){a(h),ee()},get class(){return i()},set class(h){i(h),ee()},get children(){return c()},set children(h){c(h),ee()},$set:gn,$on:(h,P)=>pn(r,h,P)},g=ox();gf(g,h=>({"data-slot":"card-title",class:h,...l}),[()=>Wd("type-title min-w-0 break-words font-semibold leading-tight text-foreground",i())]);var b=S(g);return Ai(b,()=>c()??fs),y(g),wr(g,h=>a(h),()=>a()),p(n,g),vn(f)}const xl=IS.CHAT_MEDIA,wd=CS().min(1).max(512);Zs({workspaceId:wd,agentId:wd,draftId:Nl(),principalId:wd,media:PS(mS).min(1).max(20)}).strict();const ix=Zs({sessionId:Nl()}).strict();ix.extend({control:RS("action",[Zs({action:bi("readiness")}).strict(),Zs({action:bi("export"),request:kS}).strict(),Zs({action:bi("transcribe"),request:xS}).strict(),Zs({action:bi("release"),jobId:Nl()}).strict(),Zs({action:bi("adopt"),jobId:Nl()}).strict()])}).strict();function Yd(n,r,a,i=async(c,l)=>typeof window>"u"||SS(window)!=="electron"?{ok:!1,error:"unavailable"}:$S().invoke(c,l)){let c=null,l=null,f=!1;async function g(){f=!0,a.removeEventListener("abort",b);const x=c;c=null,x&&await i(xl.CLOSE,{sessionId:x}).catch(()=>{})}const b=()=>{g()};a.addEventListener("abort",b,{once:!0});const h=()=>{if(f||a.aborted||!r())throw new Error("media-send-retired")};async function P(){if(h(),c)return c;if(l)return l;l=(async()=>{const x=await i(xl.BEGIN,n);if(!x.ok)throw new Error("media-export-unavailable");c=x.value.sessionId;try{return h(),c}catch(D){throw await g(),D}})();try{return await l}finally{l=null}}async function I(x){const D=await P();h();const N=await i(xl.CONTROL,{sessionId:D,control:x});return h(),N}return{service:{exportMedia:x=>I({action:"export",request:x}),adoptMediaJob:x=>I({action:"adopt",jobId:x}),transcribeMedia:x=>I({action:"transcribe",request:x}),releaseMediaJob:async x=>c?await i(xl.CONTROL,{sessionId:c,control:{action:"release",jobId:x}}):{ok:!0,value:void 0}},dispose:g,readiness:()=>I({action:"readiness"})}}const bd=new Set;async function lx(n){const{drafts:r,signal:a}=n,i=structuredClone(n.capture),c=structuredClone(n.items),l=structuredClone(n.payload),{workspaceId:f,agentId:g}=i,b=Pi(F.state),h=Dl.select(F.state,f),P=If.select(F.state),I=mf(),q=JSON.stringify([b,f,g]);if(!b||!h||!P||l.wsId!==f||bd.has(q))return!1;bd.add(q);const x=new AbortController,D=()=>x.abort();a.addEventListener("abort",D,{once:!0});const N=()=>!a.aborted&&!x.signal.aborted&&Pi(F.state)===b&&Dl.select(F.state,f)===h&&_f(I)&&r.isCurrentDraft(i),T=F.getReadableState().subscribe(()=>{N()||x.abort()});let O=null;try{if(!N()||iS(c))return!1;const V=Tf(i.attachments),ie=Ef(_S(f,g),V,c.map(pe=>({contextItemId:pe.id,attachmentId:pe.attachmentId,path:pe.path}))),R=new Set([...ie.images,...ie.clips].map(pe=>pe.contextItemId));if(V.some(([pe])=>!R.has(pe))||ie.images.some(pe=>pe.mediaError)||ie.clips.some(pe=>pe.mediaError)||!wS(l.text,ie))throw new Error("invalid-evidence");if(O=n.warm?.take(i,x.signal)??null,!await r.flushDraft(i)||!N())return!1;const k=await Ny.agents.get(g,f);if(!N())return!1;if(!k||k.workspaceId!==f||k.retiredAt||k.pendingDeleteAt||k.status==="deleted")throw new Error("unavailable");const Q=ie.clips.flatMap(pe=>pe.media?[pe.media]:[]);Q.length&&!O&&(O=Yd({workspaceId:f,agentId:g,draftId:crypto.randomUUID(),principalId:P.principal.id,media:Q},N,x.signal));const ge=oy(c,ie),Re=Cd(ge),he=await iy({workspaceId:f,agentId:g,evidence:ie,clickedItems:c,sendItems:ge,clickedPayload:{...l,contextItems:ge,imageBlocks:Re.imageBlocks,fileBlocks:Re.fileBlocks},binding:I,service:O?.service??null,current:N,onRecord:()=>{}});return!he||!N()?!1:El(F,g,he)}catch{return N()&&F.dispatch(iw(g,u.dock_conversation_sendFailed_error())),!1}finally{T(),a.removeEventListener("abort",D),await O?.dispose(),bd.delete(q)}}const iv=1e4,zp={wasBusy:!1,busySince:null,preempted:!1,prediction:null};function jp(n){return TS(n.messageMetadata)}function cx(n,r){if(n.some(jp)){const a=n[0];return a&&!jp(a)&&Gp(a,r)?[a.id]:[]}return n.filter(a=>Gp(a,r)).map(a=>a.id)}function dx(n){let r=null;for(const a of n)(a.status==="preparing"||a.status==="sending")&&a.createdAt>(r??-1/0)&&(r=a.createdAt);return r}function Gp(n,r){return!n.requeuedAfterFailure&&AS(n,r)}function ux(n,r){const{busy:a,queue:i,delivered:c,now:l}=r,f=r.blocked||r.interrupted,g=r.timeoutMs??iv;let b=n.prediction;if(b){const x=new Set(i.map(O=>O.id)),D=b.ids.filter(O=>x.has(O)&&!c.has(O)),N=l-b.startedAt>=g,T=n.wasBusy&&!a;!D.length||N||f&&!a||T?b=null:D.length!==b.ids.length&&(b={...b,ids:D})}const h=n.wasBusy&&!a,P=n.wasBusy?n.busySince:a?l:null,I=n.wasBusy&&n.preempted||P!==null&&r.directSendAt!==null&&r.directSendAt>P;if(!b&&h&&!f&&!I){const x=cx(i,l).filter(D=>!c.has(D));x.length&&(b={ids:x,startedAt:l})}const q={wasBusy:a,busySince:a?P:null,preempted:a&&I,prediction:b};return n.wasBusy===q.wasBusy&&n.busySince===q.busySince&&n.preempted===q.preempted&&n.prediction===q.prediction?n:q}class gx{constructor(){Js(this,"previousWorkspaceId",null);Js(this,"_isRebinding",!1);Js(this,"_generation",0);Js(this,"_rebindPromise",null);Js(this,"_rebindResolve",null)}recordMount(r){return this.previousWorkspaceId=r,r}wasWorkspaceChangedDuringMount(r){return this.previousWorkspaceId!==r}shouldRebind(r){return!r||this.previousWorkspaceId===null?!1:r!==this.previousWorkspaceId}recordRebind(r){this.previousWorkspaceId=r}hasWorkspaceChanged(r){return r!==this.previousWorkspaceId}get trackedWorkspaceId(){return this.previousWorkspaceId}get isRebinding(){return this._isRebinding}startRebind(){return this._generation++,this._isRebinding=!0,this._rebindResolve?.(),this._rebindPromise=new Promise(r=>{this._rebindResolve=r}),this._generation}endRebind(r){r!==void 0&&r!==this._generation||(this._isRebinding=!1,this._rebindResolve?.(),this._rebindPromise=null,this._rebindResolve=null)}async waitForRebind(r=5e3){if(!this._isRebinding||!this._rebindPromise)return!1;const a=Date.now()+r;for(;this._isRebinding&&this._rebindPromise;){const i=a-Date.now();if(i<=0)return!1;let c;const l=await Promise.race([this._rebindPromise.then(()=>!1),new Promise(f=>{c=setTimeout(()=>f(!0),i)})]);if(clearTimeout(c),l)return!1}return!0}}function px(n,r){return!(n?.tabType!=="agent"||n.agentId!==r.agentId||!r.isActive||n.workspaceId&&n.workspaceId!==r.workspaceId||r.panelId&&(n.source!=="dictation"&&!r.isPanelFocused||n.panelId&&n.panelId!==r.panelId))}function Vp(n){const r=typeof n=="string"?n:n&&typeof n=="object"&&typeof n.script=="string"?n.script:void 0;return r||void 0}var fx=E('<div role="status" aria-live="polite" data-presence-typing-indicator=""><span class="inline-flex min-w-[var(--operational-leading-slot-size)] shrink-0 items-center justify-center svelte-lm4khl"><!></span> <span class="min-w-0 truncate svelte-lm4khl"> </span> <span class="inline-flex shrink-0 items-center gap-0.5 svelte-lm4khl" aria-hidden="true"><span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.2s"></span> <span class="typing-dot size-1 rounded-full bg-current svelte-lm4khl" style="animation-delay: 0.4s"></span></span></div>');function lv(n,r){if(new.target)return un({component:lv,...n});fn(r,!0);const a=()=>ue(P,"$typing$",i),[i,c]=Ur();let l=Z(r,"workspaceId",7),f=Z(r,"agentId",7),g=Z(r,"class",7,"");const b=Bn(""),h=Bn("");se(()=>{b.set(l())}),se(()=>{h.set(f())});const P=lS(b,h),I=o(()=>h$(a()));var q={get workspaceId(){return l()},set workspaceId(O){l(O),ee()},get agentId(){return f()},set agentId(O){f(O),ee()},get class(){return g()},set class(O=""){g(O),ee()},$set:gn,$on:(O,V)=>pn(r,O,V)},x=Wt(),D=ye(x);{var N=O=>{var V=fx(),ie=S(V),R=S(ie);v$(R,{get people(){return a()},size:12,decorative:!0}),y(ie);var k=_(ie,2),Q=de(k,!0);dn(2),y(V),L(()=>{ke(V,1,`${Df} flex h-4 min-w-0 items-center gap-[var(--operational-leading-gap)] px-[var(--operational-row-inline-padding)] font-family-child font-normal text-muted-foreground text-[11px] leading-4 ${g()??""} /* a11y-ignore: user-requested compact typing status in the composer gap */`,"svelte-lm4khl"),j(Q,e(I))}),p(O,V)};B(D,O=>{e(I)&&O(N)})}p(n,x);var T=vn(q);return c(),T}const vx=50,hx=5e3,mx=500,_x=()=>({authority:()=>Pi(F.state),persistSnapshot:cy,dispatch:n=>F.dispatch(n),ownerView:n=>dy.withStore(F)(n)});function wx(n){const r=n.store??_x(),a=crypto.randomUUID();let i=me(!1),c=me(!1),l=me(!1),f=null,g=null,b=0,h=!1,P=null,I=null,q=null,x=0,D=null,N=null;const T={};let O,V=me([]),ie=null,R=0,k="",Q=0,ge="";const Re=()=>{const W=n.workspaceId(),C=n.agentId();if(!W||!C||!(n.active?.()??!0))return null;const re=r.authority?.();if(!re||h)return null;const Me=n.inputValue(),H=pe(),Y=O?.shared,X=Y?.workspaceId===W&&Y.agentId===C?Y.lifetime:null,Ie=JSON.stringify([re,W,C,x,X,H.map(z=>[z.id,z.attachmentId,z.path])]);Ie!==ge&&(ge=Ie,Q+=1);const Ne=JSON.stringify([re,W,C,Me,H,x]);return Ne!==k&&(k=Ne,R+=1),{authority:re,ownerId:a,workspaceId:W,agentId:C,text:Me,attachments:JSON.parse(JSON.stringify(H)),generation:R,attachmentEpoch:Q}};let he=null;const pe=()=>JI(n.contextItems(),YI(n.contextItems(),e(V))),qe=W=>{if(O=W,!W||h)return;const C=W.restore;if(N&&C?.requestId===N.requestId&&C.status!=="pending"){const{apply:H}=N;N=null,w(c,!1),C.status==="restored"&&w(V,C.draft?.attachments??[]),H(C)}const re=W.shared;if(re&&!e(c)&&g===`${re.workspaceId}\0${re.agentId}`){const H=JSON.stringify([re.provenance,re.workspaceId,re.agentId,re.lifetime,re.revision]);if(ie!==H){ie=H;const Y=he??f,X=Y&&n.inputValue()===Y.text&&JSON.stringify(pe())===Y.attachmentsJson;re.origin===a?he={text:re.snapshot.text,attachmentsJson:JSON.stringify(re.snapshot.attachments)}:X&&(b+=1,q&&clearTimeout(q),w(V,re.snapshot.attachments),he=f={text:re.snapshot.text,attachmentsJson:JSON.stringify(e(V))},n.setInputValue(re.snapshot.text),n.setContextItems(Il(e(V))),n.applyEditorContent(re.snapshot.text))}}it(Re);const Me=[];for(const H of W.saves){if(H.status==="pending")continue;Me.push(H.id);const Y=T[H.id];delete T[H.id],Y?.(H)}Me.length>0&&queueMicrotask(()=>r.dispatch(uw(a,Me)))},fe=(W,C,re)=>{const Me=crypto.randomUUID();N={requestId:Me,apply:re},w(c,!0),r.dispatch(pw(a,Me,W,C))},oe=()=>{N&&(N=null,w(c,!1),r.dispatch(vw(a)))},Te=()=>{const W=D;W&&(D=null,r.dispatch(fw(a)),O?.saves.some(C=>C.id===W)||delete T[W])};r.dispatch(lw(a));const J=r.ownerView(a).subscribe(W=>it(()=>qe(W))),ae=()=>{I&&(clearTimeout(I),I=null),w(l,!1)},Ae=()=>{D&&(D=null,r.dispatch(gw(a)))};se(()=>{const W=n.active?.()??!0,C=n.workspaceId(),re=n.agentId();if(!W){it(()=>{b+=1,g=null,oe(),P&&clearTimeout(P),P=null,ae(),q&&clearTimeout(q),q=null,w(i,!1),Ae()});return}if(!C||!re)return;const Me=`${C}\0${re}`;if(g===Me)return;const H=g!==null;g=Me;const Y=++b;it(()=>{f=null,he=null,ie=null,w(V,[]),P&&clearTimeout(P),ae(),q&&(clearTimeout(q),q=null),H&&(Ae(),n.setInputValue(""),n.contextItemsAreScoped||n.setContextItems([]),n.applyEditorContent(""));const X=ly(C,re);if(X){w(V,X.attachments),w(i,!1);const Ne=n.contextItems().length>0,z=X.text,Se=JSON.stringify(X.attachments);n.setInputValue(X.text),Ne||n.setContextItems(Il(X.attachments)),n.applyEditorContent(X.text),f={text:X.text,attachmentsJson:Se},fe(C,re,Ce=>{if(Ce.status!=="restored")return;const De=Ce.draft;if(h||!(n.active?.()??!0)||g!==Me||b!==Y)return;const at=De?.text??"",Xe=De?.attachments??[],Fe=JSON.stringify(Xe);ld(C,re,{text:at,attachments:Xe});const Pe=n.inputValue()===z&&JSON.stringify(pe())===Se;Ne||!Pe||(at!==z&&(n.setInputValue(at),n.applyEditorContent(at)),Fe!==Se&&n.setContextItems(Il(Xe)),f={text:at,attachmentsJson:Fe})});return}w(i,!0),I=setTimeout(()=>{I=null,(n.active?.()??!0)&&w(l,!0)},mx),P=setTimeout(()=>{(n.active?.()??!0)&&(w(i,!1),ae())},hx);const Ie=()=>{!(n.active?.()??!0)||g!==Me||b!==Y||(P&&clearTimeout(P),w(i,!1),ae())};fe(C,re,Ne=>{if(Ne.status!=="restored"){Ie();return}const z=Ne.draft;if(h||!(n.active?.()??!0)||g!==Me||b!==Y)return;const Se=!!n.inputValue();if(!Se&&z?.attachments?.length&&n.contextItems().length===0&&n.setContextItems(Il(z.attachments)),!Se&&z?.text&&(n.setInputValue(z.text),q=setTimeout(()=>{(n.active?.()??!0)&&n.inputValue()===z.text&&n.applyEditorContent(z.text)},vx)),f===null){const Ce=z?.text??"",De=z?.attachments??[];f={text:Ce,attachmentsJson:JSON.stringify(De)},ld(C,re,{text:Ce,attachments:De})}Ie()})})}),se(()=>{const W=n.active?.()??!0,C=n.workspaceId(),re=n.agentId(),Me=e(i);if(!W){it(Te);return}if(!C||!re)return;const H=n.inputValue(),Y=pe();if(it(Re),it(Te),Me||f===null&&!H&&Y.length===0)return;const X=JSON.stringify(Y);if(f!==null&&f.text===H&&f.attachmentsJson===X)return;JSON.stringify(e(V))!==X&&w(V,Y);const Ie=`${C}\0${re}`,Ne=x,z=crypto.randomUUID();T[z]=Se=>{if(n.active?.()??!0){if(Se.status==="saved"){g===Ie&&x===Ne&&(f={text:H,attachmentsJson:X});return}n.onSaveError?.(new Error(Se.error))}},it(()=>{D=z,r.dispatch(cw(a,z,{authority:r.authority?.()??void 0,workspaceId:C,agentId:re,text:H,attachments:Y,rollback:f?{text:f.text,attachments:JSON.parse(f.attachmentsJson)}:null}))})}),se(()=>()=>{h=!0,P&&clearTimeout(P),I&&clearTimeout(I),q&&clearTimeout(q),Ae(),J(),r.dispatch(dw(a))});const He=W=>{const C=Re();return C!==null&&C.authority===W.authority&&C.ownerId===W.ownerId&&C.workspaceId===W.workspaceId&&C.agentId===W.agentId&&C.generation===W.generation&&C.text===W.text&&JSON.stringify(C.attachments)===JSON.stringify(W.attachments)};return{captureDraft:Re,isCurrentDraft:He,updateAttachmentScreen(W,C,re){return!He(W)||!W.attachments.some(Me=>Me.id===C)?null:(w(V,W.attachments.map(Me=>Me.id===C?{...Me,screen:structuredClone(re)}:Me)),Re())},async flushDraft(W){if(!He(W))return!1;if(!r.persistSnapshot)throw new Error("draft-shared-transport-unavailable");return await r.persistSnapshot(a,W.workspaceId,W.agentId,W,W.authority),He(W)},get restorePending(){return e(c)},get gateActive(){return e(i)},get gateVisible(){return e(l)},invalidatePendingRestore(){if(b+=1,x+=1,oe(),P&&(clearTimeout(P),P=null),q&&(clearTimeout(q),q=null),w(i,!1),ae(),Te(),g!==null){const[W,C]=g.split("\0");ld(W,C,{text:"",attachments:[]}),he=null,w(V,[]),f={text:"",attachmentsJson:"[]"}}}}}function Ei(n){if(!n)return null;const r=Ef(JSON.stringify([n.workspaceId,n.agentId]),Tf(n.attachments),n.attachments.map(a=>({contextItemId:a.id,attachmentId:a.attachmentId,path:a.path})));return{...r,clips:r.clips.filter(a=>{const i=n.attachments.find(c=>c.id===a.contextItemId);return!!a.media&&!a.mediaError&&!!i&&a.path===i.path})}}async function bx(n,r,a){const i=F.state.principal.snapshot,c=()=>Pi(F.state)===n.authority&&a.isCurrentDraft(n);if(!i||!c()||!await a.flushDraft(n)||!c())return{ready:!1};const l=new AbortController,f=Yd({workspaceId:n.workspaceId,agentId:n.agentId,principalId:i.principal.id,draftId:crypto.randomUUID(),media:[r]},c,l.signal);try{const g=await f.readiness();return!c()||!g.ok?{ready:!1}:g.value.find(b=>b.sourceId===r.source.id)??{ready:!1}}finally{await f.dispose()}}function Kp(n){let r=me(null),a=me(!1),i=me(!1),c=null,l=!0,f=0,g=null;Es(()=>{l=!1,f++}),se(()=>{const I=n.capture();e(r)&&(!I||I.authority!==e(r).capture.authority||I.ownerId!==e(r).capture.ownerId||I.workspaceId!==e(r).capture.workspaceId||I.agentId!==e(r).capture.agentId||I.attachmentEpoch!==e(r).capture.attachmentEpoch)&&w(r,null)});async function b(I){if(n.disabled()||e(a))return;const q=n.drafts.captureDraft(),x=Ei(q),D=x?.clips.find(V=>V.contextItemId===I);if(!q||!D?.media||!x)return;const N=uy({workspaceId:q.workspaceId,agentId:q.agentId,clip:D,evidence:x,marks:x.marks}),T=wf(q.workspaceId,D.path);if(!N||!T)return;const O=++f;c=document.activeElement instanceof HTMLElement?document.activeElement:null,w(a,!0),w(i,!1);try{if(await n.beforeOpen?.(),!l||f!==O||!n.drafts.isCurrentDraft(q))return;const V=await(n.prepareOutput??bx)(q,D.media,n.drafts);if(!l||f!==O||!n.drafts.isCurrentDraft(q))return;const{attachmentPath:ie,...R}=N;w(r,{capture:q,contextItemId:I,snapshot:{...R,openId:crypto.randomUUID(),mediaUrl:T,output:V,deleteReady:!0}})}catch{l&&f===O&&w(i,!0)}finally{l&&f===O&&w(a,!1)}}async function h(I){const q=crypto.randomUUID(),x=e(r),D=n.drafts.captureDraft();if(!x||!D||D.authority!==x.capture.authority||D.ownerId!==x.capture.ownerId||D.workspaceId!==x.capture.workspaceId||D.agentId!==x.capture.agentId||D.attachmentEpoch!==x.capture.attachmentEpoch)return{requestId:q,result:"stale-source"};const N=Ei(D),T=N?.clips.find(Q=>Q.contextItemId===x.contextItemId);if(!N||!T?.media)return{requestId:q,result:"stale-source"};const V=g?.openId===x.snapshot.openId&&g.inputRevision===I.revision&&JSON.stringify(g.media)===JSON.stringify(T.media)?{...I,revision:T.media.saved?.revision??0}:I,ie=bS(T.media,{openId:x.snapshot.openId,...x.snapshot.output?.version===2?{outputVersion:2}:{},pair:{workspaceId:D.workspaceId,agentId:D.agentId},sourceId:I.sourceId,sourceRevision:I.sourceRevision,expectedEditRevision:V.revision,edit:V});if(ie.status!=="saved")return{requestId:q,result:ie.status==="invalid-edit"?"failed":ie.status};const R=yS({...N,clips:N.clips.map(Q=>Q.id===T.id?{...Q,media:ie.media}:Q)})[x.contextItemId],k=n.drafts.updateAttachmentScreen(D,x.contextItemId,R);if(!k)return{requestId:q,result:"stale-source"};g={openId:x.snapshot.openId,media:ie.media,inputRevision:I.revision};try{if(!n.drafts.isCurrentDraft(k))return{requestId:q,result:"stale-source"};await n.drafts.flushDraft(k);const Q=n.drafts.captureDraft();return!l||e(r)?.snapshot.openId!==x.snapshot.openId||!Q||Q.attachmentEpoch!==x.capture.attachmentEpoch||Q.authority!==k.authority||Q.ownerId!==k.ownerId||Q.workspaceId!==k.workspaceId||Q.agentId!==k.agentId||JSON.stringify(Q.attachments.find(ge=>ge.id===x.contextItemId)?.screen)!==JSON.stringify(R)?{requestId:q,result:"stale-source"}:(g=null,{requestId:q,result:"saved",saved:ie.media.saved??void 0})}catch{return{requestId:q,result:"failed"}}}function P(I){return n.disabled()||!n.onRemove(I)?!1:(e(r)?.contextItemId===I&&w(r,null),!0)}return{get session(){return e(r)},get opening(){return e(a)},get problem(){return e(i)},open:b,save:h,remove:P,close(){w(r,null)},restoreFocus(){c?.isConnected&&c.focus()}}}var yx=E('<p role="alert"> </p>'),Ix=E('<div class="recording-editor-surface svelte-cdb16"><!></div>'),Sx=E("<!> <!> <!>",1);function cv(n,r){if(new.target)return un({component:cv,...n});fn(r,!0);let a=Z(r,"capture",7),i=Z(r,"drafts",7),c=Z(r,"disabled",7,!1),l=Z(r,"onRemove",7),f=Z(r,"controllerFactory",7,Kp),g=Z(r,"beforeOpen",7),b=Z(r,"onReviewChange",7);const h=it(()=>f()({drafts:i(),capture:()=>a(),disabled:()=>c(),onRemove:R=>l()(R),beforeOpen:()=>g()?.()??Promise.resolve()}));se(()=>{const R=h.opening,k=h.session;it(()=>b()?.(R,k?.snapshot.output?.ready?{openId:k.snapshot.openId,capture:k.capture}:null))});const P=o(gy),I=o(()=>Ei(a())),q=o(()=>e(I)?.clips.map(R=>({id:R.contextItemId,kind:"clip",owner:"evidence",duration:Ap(R.durationMs),recording:!1,url:a()?wf(a().workspaceId,R.path):void 0,...R.media?.saved?{summary:py(R.media.saved)}:{}}))??[]);let x=me(null);var D={get capture(){return a()},set capture(R){a(R),ee()},get drafts(){return i()},set drafts(R){i(R),ee()},get disabled(){return c()},set disabled(R=!1){c(R),ee()},get onRemove(){return l()},set onRemove(R){l(R),ee()},get controllerFactory(){return f()},set controllerFactory(R=Kp){f(R),ee()},get beforeOpen(){return g()},set beforeOpen(R){g(R),ee()},get onReviewChange(){return b()},set onReviewChange(R){b(R),ee()},$set:gn,$on:(R,k)=>pn(r,R,k)},N=Sx(),T=ye(N);{let R=o(()=>c()||h.opening);MS(T,{get items(){return e(q)},get labels(){return e(P)},get disabled(){return e(R)},onEdit:k=>void h.open(k),onMarkUp:k=>void h.open(k),get onRemove(){return h.remove}})}var O=_(T,2);{var V=R=>{var k=yx(),Q=de(k,!0);L(ge=>j(Q,ge),[()=>u.dock_captureEditor_saveFailed_label()]),p(R,k)};B(O,R=>{h.problem&&R(V)})}var ie=_(O,2);{let R=o(()=>!!h.session),k=o(()=>u.dock_captureEditor_recording_title({duration:h.session?Ap(h.session.snapshot.durationMs??0):""}));C$(ie,{get open(){return e(R)},size:"editor",showCloseButton:!1,get title(){return e(k)},escapeKeydownBehavior:"ignore",dismissOnInteractOutside:!1,onClose:()=>h.close(),onCloseAutoFocus:Q=>{Q.preventDefault(),h.restoreFocus()},get contentRef(){return e(x)},set contentRef(Q){w(x,Q,!0)},children:(Q,ge)=>{var Re=Wt(),he=ye(Re);{var pe=qe=>{var fe=Wt(),oe=ye(fe);xi(oe,()=>h.session.snapshot.openId,Te=>{var J=Ix(),ae=S(J);R$(ae,{get snapshot(){return h.session.snapshot},get shortcutDialog(){return e(x)},onClose:()=>h.close(),get onSave(){return h.save},onDelete:async()=>!!h.session&&h.remove(h.session.contextItemId)}),y(J),p(Te,J)}),p(qe,fe)};B(he,qe=>{h.session&&qe(pe)})}p(Q,Re)},$$slots:{default:!0}})}return p(n,N),vn(D)}const Cl=n=>JSON.stringify([n.authority,n.ownerId,n.workspaceId,n.agentId,n.attachmentEpoch,n.attachments]);function $x(n){let r=me(!1),a=me(!1),i=me(null),c=!1,l=0,f=null,g=null;async function b(I){I.abort.abort(),I.slot?.cancel(),await I.native?.dispose()}async function h(){l++;const I=g;g=null,I&&await b(I)}ro(()=>{const I=()=>{w(r,document.hasFocus(),!0)};return I(),window.addEventListener("focus",I),window.addEventListener("blur",I),()=>{window.removeEventListener("focus",I),window.removeEventListener("blur",I)}});const P=F.getReadableState().subscribe(()=>{g&&!g.current()&&h()});return Es(()=>{c=!0,P(),h()}),se(()=>{const I=n.capture(),q=I?Cl(I):"",x=e(r)&&!e(a)&&(n.active()||e(i)?.key===q);it(()=>{if(!x||!I){h();return}if(g?.key===q)return;if(f===q){h();return}h();const N=Ei(I)?.clips.flatMap(Re=>!Re.mediaError&&Re.media?[Re.media]:[])??[],T=N[0],O=F.state.principal.snapshot,V=Dl.select(F.state,I.workspaceId);if(!T||!O||!V||n.drafts.gateActive)return;const ie=mf(),R=new AbortController,k=()=>!c&&!R.signal.aborted&&Pi(F.state)===I.authority&&Dl.select(F.state,I.workspaceId)===V&&_f(ie)&&!!n.capture()&&Cl(n.capture())===q,Q={key:q,capture:I,abort:R,native:null,slot:null,current:k};g=Q;const ge=l;n.drafts.flushDraft(I).then(async Re=>{if(!(g!==Q||ge!==l||!k())){if(!Re){f=q,await h();return}Q.native=Yd({workspaceId:I.workspaceId,agentId:I.agentId,draftId:crypto.randomUUID(),principalId:O.principal.id,media:structuredClone(N)},k,R.signal),Q.slot=fy(Q.native.service),f=q,Q.slot.warm(q,T,k)}}).catch(()=>{g===Q&&h()})})}),{cancel:h,async beforeEditorOpen(){w(a,!0),f=null,await h()},editorState(I,q){w(a,I,!0);const x=q?Cl(q.capture):null;q&&e(i)?.openId!==q.openId&&(f=null),w(i,q&&x?{openId:q.openId,key:x}:null)},take(I,q){const x=g;if(!x?.native||!x.slot||x.key!==Cl(I)||!x.current())return h(),null;g=null,l++;const D=x.native,N=x.slot,T=()=>x.abort.abort();return q.addEventListener("abort",T,{once:!0}),q.aborted&&T(),{service:{...D.service,takePreparedRecording:O=>N.take(x.key,O,()=>!q.aborted&&x.current())},async dispose(){q.removeEventListener("abort",T),await b(x)}}}}}var kx=E('<div role="status" class="px-3 py-1.5 text-xs text-muted-foreground" data-testid="chat-draft-loading-gate"><span> </span></div>');function dv(n,r){if(new.target)return un({component:dv,...n});fn(r,!1);var a={$set:gn,$on:(f,g)=>pn(r,f,g)};Nf();var i=kx(),c=S(i),l=de(c,!0);return y(i),L(f=>j(l,f),[()=>u.chat_draftGate_loading_label()]),p(n,i),vn(a)}var xx=E('<div data-new-messages-divider="" class="type-caption font-family-child my-6 flex items-center gap-2 px-2" role="separator"><div class="h-px flex-1 bg-border"></div> <span class="whitespace-nowrap px-1 font-medium text-foreground"> </span> <div class="h-px flex-1 bg-border"></div></div>');function qd(n,r){if(new.target)return un({component:qd,...n});fn(r,!1);var a={$set:gn,$on:(f,g)=>pn(r,f,g)};Nf();var i=xx(),c=_(S(i),2),l=de(c,!0);return dn(2),y(i),L((f,g)=>{ze(i,"aria-label",f),j(l,g)},[()=>u.chat_newMessagesDivider_label(),()=>u.chat_newMessagesDivider_label()]),p(n,i),vn(a)}function Cx(n,r){if(!r||n.length===0)return null;const a=n.indexOf(r);return a===-1||a===n.length-1?null:r}function Px(n,r,a){if(!r||n.length===0)return"none";const i=n.indexOf(r);return i===n.length-1?"none":i!==-1?"marker-loaded":a.complete?a.truncated?"marker-beyond-window":"none":"marker-pending"}function Rx(n,r){return r&&n.includes(r)?r:null}function Qp(n,r,a){return r-n<=a}const Tx=.2;function Jp(n,r,a){const i=Math.max(0,a-r),c=n-Tx*r;return Math.min(Math.max(0,c),i)}function Ax(n,r,a){return n!==null&&a&&n===r}function Mx(n){return n?hw(n)&&mw(n)!==null&&typeof n.metadata?.taskNoteId=="string":!1}function Ex(n){const r=[],a=new Set;let i,c;for(const O of n.messages){if(O.agentId&&O.agentId!==n.agentId){i=void 0,c=void 0;continue}if(a.has(O.id))continue;a.add(O.id),n.breakBeforeMessageIds?.has(O.id)&&(i=void 0,c=void 0);const V=ES(O);if(V?.kind!=="turn-failure")c=void 0;else{const ie=i?.seq!==void 0&&O.seq!==void 0&&Number.isSafeInteger(i.seq)&&Number.isSafeInteger(O.seq)&&O.seq===i.seq+1;(!c||!ie)&&(c={key:JSON.stringify([n.agentId,"notice",O.id]),anchorMessageId:O.id,correlation:"unavailable",records:[],recordedFailureCount:0},r.push(c)),c.records.push({messageId:O.id,reason:V.reason,timestamp:O.timestamp}),c.recordedFailureCount+=1}i=O}const l=new Map;for(const O of n.queue){if(!O.requeuedAfterFailure)continue;const V=O.turnId||void 0,ie=JSON.stringify([n.agentId,V?"turn":"queue",V??O.id]);let R=l.get(ie);R||(R={key:ie,correlation:V?"turn":"queue-entry",turnId:V,queueIds:[],state:"queued"},l.set(ie,R)),R.queueIds.includes(O.id)||R.queueIds.push(O.id)}const f=[...l.values()],g=n.session?.id===n.agentId?n.session:void 0,b=g?.status===$i.Error,h=n.transientError||b&&g.stopReason||null,P=b&&!h,I=b&&(!n.transientError||n.transientError===g.stopReason)?g.stopReasonTimestamp:void 0,q=I?yp(I):null,x=q&&h&&h===g?.stopReason?r.flatMap(O=>O.records).filter(O=>O.reason===h&&yp(O.timestamp)===q):[],D=x.length===1?x[0].messageId:void 0,T=(g?Sf(g):!1)?"attempting":f.length?"queued":h||P?"action-needed":"inactive";return{history:r,queueRecovery:f,current:{state:T,error:h,needsFallbackReason:P,timestamp:I,noticeId:D}}}function qx(n,r){const a=n.hiddenTail[0]?.id,i=Ex({...r,messages:[...n.groups.flatMap(g=>g.messages),...n.hiddenTail],breakBeforeMessageIds:new Set(a?[a]:[])}),c=i.current.noticeId,l=i.history.map(g=>({...g,records:g.records.filter(b=>b.messageId!==c)})).filter(g=>g.records.length>0),f=new Set(l.map(g=>g.records[0].messageId));return{...i,runsByAnchor:new Map(l.map(g=>[g.records[0].messageId,g])),collapsedMessageIds:new Set(i.history.flatMap(g=>g.records.map(b=>b.messageId).filter(b=>!f.has(b))))}}var Lx=E('<div class="flex size-10 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <div class="min-w-0 flex-1"><div class="type-body truncate font-medium text-foreground"> </div> <div class="type-caption mt-0.5 line-clamp-2 text-muted-foreground"> </div></div> <div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-muted/50 text-muted-foreground transition-colors group-hover:bg-muted"><!></div>',1),Hx=E('<div class="flex size-9 shrink-0 items-center justify-center rounded-md bg-muted/50"><!></div> <span class="type-body font-medium"> </span>',1),Ox=E('<div><div class="border-b border-border bg-muted/20 px-4 py-3"><p class="type-body font-medium text-foreground"> </p> <p class="type-caption mt-0.5 text-muted-foreground"> </p></div> <div class="max-h-[21rem] overflow-y-auto p-2"><!></div> <div class="border-t border-border bg-popover p-2"><!></div></div>'),Fx=E('<div class="mb-5"><!></div>'),Dx=E('<p data-testid="agent-welcome-description"> </p> <!>',1),Nx=E("<!> <!>",1),Bx=E('<p class="mb-3 px-4 text-sm text-subtle leading-relaxed whitespace-pre-wrap" data-testid="agent-welcome-description"> </p>'),Wx=E("<!> <span> </span>",1),Ux=E('<div class="mx-auto flex w-full max-w-[40rem] flex-1 flex-col px-4 pb-6 pt-4 text-subtle"><!> <!> <!></div>');function uv(n,r){if(new.target)return un({component:uv,...n});fn(r,!0);const a=()=>ue(x,"$userOverrides$",f),i=()=>ue(q,"$specialists$",f),c=()=>ue(O,"$isGitHubAuth$",f),l=()=>ue(V,"$recentSpecialistIds$",f),[f,g]=Ur();let b=Z(r,"onSpecialistChange",7),h=Z(r,"session",7),P=Z(r,"workspaceId",7);const I=Bn(P()??"");se(()=>I.set(P()??""));const q=Gf(I),x=Y$();se(()=>{a()});const D=o(()=>{if(!h()||Qy(h()))return null;const W=h().metadata?.specialist||h().agentMetadata?.specialist;return W&&i().find(C=>C.id===W)||null});async function N(W){W?await zl({specialist:W,hash:"specialists"}):await zl({view:"create-specialist"})}let T=me(!1);const O=X$(),V=cS(),ie=o(()=>_w(Z$(i(),c()),l()));let R=me(!1);const k=o(()=>u.chat_regularAgentWelcome_generalDescription_label()),Q=o(()=>e(D)?.name??u.chat_shared_general_fallback()),ge=o(()=>e(D)?.description??u.chat_shared_noSpecializedBehavior_label()),Re=o(()=>e(D)?e(D).defaultBehaviorPrompt||"":e(k));var he={get onSpecialistChange(){return b()},set onSpecialistChange(W){b(W),ee()},get session(){return h()},set session(W){h(W),ee()},get workspaceId(){return P()},set workspaceId(W){P(W),ee()},$set:gn,$on:(W,C)=>pn(r,W,C)},pe=Ux(),qe=S(pe);{var fe=W=>{var C=Fx(),re=S(C);uk(re,{class:"block w-full",align:"start",side:"bottom",contentClass:"w-[min(28rem,calc(100vw-2rem))]",get open(){return e(R)},set open(Y){w(R,Y,!0)},trigger:(Y,X)=>{let Ie=()=>(X?.()).props;{let Ne=o(()=>Wd("group flex h-auto min-h-(--control-height-medium) w-full cursor-pointer items-center gap-3 whitespace-normal rounded-lg border border-border bg-card px-4 py-3 text-left shadow-xs transition-colors","hover:border-input hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"));bt(Y,qi(Ie,{type:"button",variant:"plain",wrapContent:!1,get class(){return e(Ne)},"data-testid":"specialist-picker-trigger",children:(z,Se)=>{var Ce=Lx(),De=ye(Ce),at=S(De);{let Ge=o(()=>e(D)?.id??null),Qe=o(()=>e(D)?.icon??null);dk(at,{agentId:"blank",variant:"emphasized",get specialist(){return e(Ge)},get icon(){return e(Qe)}})}y(De);var Xe=_(De,2),Fe=S(Xe),Pe=de(Fe,!0),G=_(Fe,2),te=de(G,!0);y(Xe);var Oe=_(Xe,2),we=S(Oe);ct(we,{get icon(){return Na},size:10}),y(Oe),L(()=>{j(Pe,e(Q)),j(te,e(ge))}),p(z,Ce)},$$slots:{default:!0}}))}},content:Y=>{var X=Ox(),Ie=S(X),Ne=S(Ie),z=de(Ne,!0),Se=_(Ne,2),Ce=de(Se,!0);y(Ie);var De=_(Ie,2),at=S(De);{let Pe=o(()=>e(D)?.id??null);J_(at,{get specialists(){return e(ie)},get value(){return e(Pe)},onchange:G=>{w(R,!1),b()?.(G)}})}y(De);var Xe=_(De,2),Fe=S(Xe);Et(Fe,()=>Br,(Pe,G)=>{G(Pe,{class:"flex h-auto w-full cursor-pointer items-center gap-3 whitespace-normal rounded-md px-3 py-2 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onSelect:()=>{w(R,!1),N()},children:(te,Oe)=>{var we=Hx(),Ge=ye(we),Qe=S(Ge);ct(Qe,{get icon(){return q$},size:12}),y(Ge);var dt=_(Ge,2),ft=de(dt,!0);L(lt=>j(ft,lt),[()=>u.chat_regularAgentWelcome_createSpecialist_label()]),p(te,we)},$$slots:{default:!0}})}),y(Xe),y(X),L((Pe,G)=>{j(z,Pe),j(Ce,G)},[()=>u.workspace_createAgentSection_specialists_label(),()=>u.workspace_createAgentSection_specialists_description()]),p(Y,X)},$$slots:{trigger:!0,content:!0}}),y(C),p(W,C)};B(qe,W=>{b()&&W(fe)})}var oe=_(qe,2);{var Te=W=>{var C=Wt(),re=ye(C);{let Me=o(()=>u.chat_specialistSelector_prompt_label());Et(re,()=>pk,(H,Y)=>{Y(H,{class:"mb-3",role:"region",get"aria-label"(){return e(Me)},children:(X,Ie)=>{var Ne=Nx(),z=ye(Ne);Et(z,()=>sv,(Ce,De)=>{De(Ce,{children:(at,Xe)=>{var Fe=Wt(),Pe=ye(Fe);Et(Pe,()=>ov,(G,te)=>{te(G,{class:"type-caption font-medium",children:(Oe,we)=>{dn();var Ge=ln();L(Qe=>j(Ge,Qe),[()=>u.chat_specialistSelector_prompt_label()]),p(Oe,Ge)},$$slots:{default:!0}})}),p(at,Fe)},$$slots:{default:!0}})});var Se=_(z,2);Et(Se,()=>gk,(Ce,De)=>{De(Ce,{children:(at,Xe)=>{var Fe=Dx(),Pe=ye(Fe),G=de(Pe,!0),te=_(Pe,2);bt(te,{type:"button",variant:"link",get"aria-expanded"(){return e(T)},onclick:()=>w(T,!e(T)),class:"text-xs text-muted-foreground hover:text-foreground transition-colors mt-2 cursor-pointer",children:(Oe,we)=>{dn();var Ge=ln();L(Qe=>j(Ge,Qe),[()=>e(T)?u.chat_regularAgentWelcome_showLess_label():u.chat_regularAgentWelcome_showMore_label()]),p(Oe,Ge)},$$slots:{default:!0}}),L(()=>{ke(Pe,1,`text-sm text-subtle leading-relaxed whitespace-pre-wrap break-words ${e(T)?"":"line-clamp-6"}`),j(G,e(Re))}),p(at,Fe)},$$slots:{default:!0}})}),p(X,Ne)},$$slots:{default:!0}})})}p(W,C)},J=W=>{var C=Bx(),re=de(C,!0);L(()=>j(re,e(Re))),p(W,C)};B(oe,W=>{e(D)?W(Te):W(J,-1)})}var ae=_(oe,2);{var Ae=W=>{bt(W,{variant:"ghost-light",size:"sm",onclick:()=>N(e(D).id),class:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors cursor-pointer pl-1.5 mr-auto",children:(C,re)=>{var Me=Wx(),H=ye(Me);ct(H,{get icon(){return E$},size:12,class:"opacity-60"});var Y=_(H,2),X=de(Y,!0);L(Ie=>j(X,Ie),[()=>u.chat_regularAgentWelcome_customize_label()]),p(C,Me)},$$slots:{default:!0}})};B(ae,W=>{e(D)&&W(Ae)})}y(pe),p(n,pe);var He=vn(he);return g(),He}var zx=E('<a class="cursor-pointer underline underline-offset-2 hover:opacity-80" data-suggested-prompt-link=""> </a>'),jx=E('<kbd data-suggested-prompt-hint=""> </kbd>'),Gx=E('<span class="type-caption"> </span>'),Vx=E('<div role="presentation" data-typography-role="body" data-suggested-prompt-row=""><span data-suggested-prompt-icon=""><!></span> <span class="min-w-0 flex-1 text-pretty" data-suggested-prompt-label=""><span role="button" tabindex="0" class="focus-visible:outline-none" data-suggested-prompt-text=""> </span><!></span> <!> <!></div>'),Kx=E('<div class="flex flex-col" data-testid="suggested-prompts-surface"><!></div>');function Xd(n,r){if(new.target)return un({component:Xd,...n});fn(r,!0);let a=Z(r,"prompts",7),i=Z(r,"onSelect",7),c=Z(r,"onEdit",7),l=Z(r,"compact",7,!1),f=Z(r,"showShortcutHints",7,!1),g=Z(r,"reserveShortcutHintSpace",7,!1),b=Z(r,"workspaceId",7);const P=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC")?"⌃":"Alt+",I=d$.replace("text-ui","type-caption");function q(k){i()(k)}function x(k,Q){k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),q(Q))}function D(k,Q){k.preventDefault(),k.stopPropagation(),Md(Q,{workspaceId:b(),event:k})}function N(k,Q){(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),k.stopPropagation(),Md(Q,{workspaceId:b(),event:k}))}function T(k){return k<3}var O={get prompts(){return a()},set prompts(k){a(k),ee()},get onSelect(){return i()},set onSelect(k){i(k),ee()},get onEdit(){return c()},set onEdit(k){c(k),ee()},get compact(){return l()},set compact(k=!1){l(k),ee()},get showShortcutHints(){return f()},set showShortcutHints(k=!1){f(k),ee()},get reserveShortcutHintSpace(){return g()},set reserveShortcutHintSpace(k=!1){g(k),ee()},get workspaceId(){return b()},set workspaceId(k){b(k),ee()},$set:gn,$on:(k,Q)=>pn(r,k,Q)},V=Wt(),ie=ye(V);{var R=k=>{var Q=Kx(),ge=S(Q);{const Re=(pe,qe)=>{let fe=()=>(qe?.()).item,oe=()=>(qe?.()).index;const Te=o(()=>ey(fe())),J=o(()=>e(Te)[0]?.type==="text"?e(Te)[0].content:"");var ae=Vx(),Ae=S(ae),He=S(Ae);ct(He,{get icon(){return Bf},size:16,get class(){return ur}}),y(Ae);var W=_(Ae,2),C=S(W),re=de(C,!0),Me=_(C);Dn(Me,17,()=>e(Te).slice(e(J)?1:0),V_,(z,Se)=>{var Ce=Wt(),De=ye(Ce);{var at=Fe=>{const Pe=o(()=>Zb(e(Se).url));var G=zx(),te=de(G,!0);L(()=>{ze(G,"href",e(Pe)),ze(G,"title",e(Pe)),j(te,e(Se).label)}),ps("click",G,Oe=>D(Oe,e(Pe))),ps("keydown",G,Oe=>N(Oe,e(Pe))),p(Fe,G)},Xe=Fe=>{var Pe=ln();L(()=>j(Pe,e(Se).content)),p(Fe,Pe)};B(De,Fe=>{e(Se).type==="link"?Fe(at):Fe(Xe,-1)})}p(z,Ce)}),y(W);var H=_(W,2);{var Y=z=>{var Se=jx();let Ce;var De=de(Se);L(()=>{Ce=ke(Se,1,`${I??""} mt-px inline-flex h-5 items-center self-start border-0 bg-transparent p-0 font-sans font-normal text-muted-foreground! opacity-100`,null,Ce,{invisible:!f()}),ze(Se,"aria-hidden",f()?void 0:"true"),ze(Se,"data-hint-visible",f()),j(De,`${P}${oe()+1}`)}),p(z,Se)},X=o(()=>T(oe())&&(f()||g()));B(H,z=>{e(X)&&z(Y)})}var Ie=_(H,2);{var Ne=z=>{M$(z,{side:"top",delayDuration:300,trigger:De=>{{let at=o(()=>u.chat_suggestedPrompts_editInInput_ariaLabel());bt(De,{type:"button",variant:"ghost-light",size:"icon-xs",iconOnly:!0,class:"absolute right-0.5 top-[calc(var(--operational-leading-half-slot-size)+var(--space-1)*0.5+1px)] shrink-0 -translate-y-1/2 rounded opacity-0 group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",onclick:Xe=>{Xe.stopPropagation(),c()(fe())},get"aria-label"(){return e(at)},children:(Xe,Fe)=>{ct(Xe,{get icon(){return L$},size:"xs"})},$$slots:{default:!0}})}},content:De=>{var at=Gx(),Xe=de(at,!0);L(Fe=>j(Xe,Fe),[()=>u.chat_suggestedPrompts_edit_tooltip()]),p(De,at)},$$slots:{trigger:!0,content:!0}})};B(Ie,z=>{c()&&z(Ne)})}y(ae),L(z=>{ke(ae,1,`${Df} ${c$} group relative flex cursor-pointer items-center gap-[var(--operational-leading-gap)] rounded-sm border border-transparent bg-transparent px-1.5 py-0.5 text-left opacity-100 pr-9 transition-colors hover:text-foreground has-[[data-suggested-prompt-text]:focus-visible]:outline-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-offset-2 has-[[data-suggested-prompt-text]:focus-visible]:outline-ring`),ke(Ae,1,`${Bl??""} mt-px self-start`),ze(C,"aria-label",z),j(re,e(J))},[()=>Xb(fe())]),ps("click",C,z=>{z.stopPropagation(),q(fe())}),ps("keydown",C,z=>x(z,fe())),p(pe,ae)};let he=o(()=>l()?"[&>div>div:last-child]:gap-0":"[&>div>div:last-child]:gap-0.5");P$(ge,{get items(){return a()},virtualize:!1,onActivate:q,get class(){return`overflow-visible! [&>div>div:last-child]:flex [&>div>div:last-child]:flex-col ${e(he)??""}`},"data-testid":"suggested-prompts-list",get"data-compact"(){return l()},row:Re,$$slots:{row:!0}})}y(Q),Nt(1,Q,()=>ma,()=>({tier:"fast",y:0,scale:1})),Nt(2,Q,()=>to,()=>({tier:"fast"})),p(k,Q)};B(ie,k=>{a().length>0&&k(R)})}return p(n,V),vn(O)}Bd(["click","keydown"]);var Qx=E('<section class="pb-6 pt-6"><p class="type-body mb-5 max-w-[36rem] px-1.5 text-pretty text-muted-foreground"> </p> <!></section>');function gv(n,r){if(new.target)return un({component:gv,...n});fn(r,!0);let a=Z(r,"onSelect",7),i=Z(r,"compact",7,!1);const c=o(()=>[{label:u.chat_chiefEmptyState_assignedPrs_label(),prompt:u.chat_chiefEmptyState_assignedPrs_prompt()},{label:u.chat_chiefEmptyState_staleWorkspaces_label(),prompt:u.chat_chiefEmptyState_staleWorkspaces_prompt()},{label:u.chat_chiefEmptyState_agentPerformance_label(),prompt:u.chat_chiefEmptyState_agentPerformance_prompt()},{label:u.chat_chiefEmptyState_morningBrief_label(),prompt:u.chat_chiefEmptyState_morningBrief_prompt()},{label:u.chat_chiefEmptyState_randomTheme_label(),prompt:u.chat_chiefEmptyState_randomTheme_prompt()}]),l=o(()=>e(c).map(q=>q.label));function f(q){const x=e(c).find(D=>D.label===q);x&&a()(x.prompt)}var g={get onSelect(){return a()},set onSelect(q){a(q),ee()},get compact(){return i()},set compact(q=!1){i(q),ee()},$set:gn,$on:(q,x)=>pn(r,q,x)},b=Qx(),h=S(b),P=de(h,!0),I=_(h,2);return Xd(I,{get prompts(){return e(l)},onSelect:f,get compact(){return i()}}),y(b),L(q=>j(P,q),[()=>u.chat_chiefEmptyState_intro_label()]),p(n,b),vn(g)}const Zd=2e3,Jx=4e3,Yx=Jx-Zd-2;function Xx(n,r=Zd){const a=[];let i=0;for(let c=n.length-1;c>=0&&i<r;c-=1){const l=n[c];if(l.role!=="user"&&l.role!=="assistant")continue;const f=(l.contentBlocks??[]).filter(b=>b.type==="text").map(b=>b.text||b.content||"").join(""),g=(l.role==="assistant"?Y_(f).cleanedContent:f).trim();g&&(a.unshift({role:l.role,text:g}),i+=g.length)}return a}function Zx(n,r){const a=n.map(l=>`${l.role==="user"?"User":"Assistant"}: ${l.text}`).join(`
|
|
2
2
|
|
|
3
3
|
`).slice(-Zd),i=r.map(l=>l.trim()).filter(Boolean);if(i.length===0)return a;const c=`Suggested prompts:
|
|
4
4
|
${i.map(l=>`- ${l}`).join(`
|