@intent-hq/web 2.381.2 → 2.383.1
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/{pGhuLhmB.js → 0PdeE_M-.js} +1 -1
- package/web/app/immutable/chunks/{B1TqZZyd.js → 1WR8MecL.js} +3 -3
- package/web/app/immutable/chunks/{Bw803iNn.js → 469banqV.js} +3 -3
- 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/{CuMJ0LCw.js → 6Bqipt1r.js} +1 -1
- package/web/app/immutable/chunks/{BG_RlrpY.js → 6GlvsI2m.js} +1 -1
- package/web/app/immutable/chunks/{BD4C_b2Z.js → 7GuT70Sz.js} +1 -1
- package/web/app/immutable/chunks/{CyczJyMt.js → 7UPrdiE9.js} +1 -1
- package/web/app/immutable/chunks/A9niI_uA.js +1 -0
- 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/{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/{BZKoidWB.js → B6S6VNu7.js} +1 -1
- package/web/app/immutable/chunks/{Bg4SPgrZ.js → B6STvYyK.js} +1 -1
- package/web/app/immutable/chunks/{BTQKLXYi.js → B6qvxAO7.js} +1 -1
- package/web/app/immutable/chunks/{qE-X6VV1.js → B8-Q1tED.js} +1 -1
- package/web/app/immutable/chunks/{Cy0xJYMG.js → B8VxRkn_.js} +1 -1
- package/web/app/immutable/chunks/{BIIYZtt3.js → B9oKJyXc.js} +1 -1
- package/web/app/immutable/chunks/{BX63FB9x.js → BAKPnd3w.js} +1 -1
- package/web/app/immutable/chunks/{ByhEuqgY.js → BAP-Km9w.js} +1 -1
- package/web/app/immutable/chunks/{CDnYwtBR.js → BAzzHP-D.js} +1 -1
- package/web/app/immutable/chunks/{CN0TD23u.js → BBws4Cyt.js} +1 -1
- package/web/app/immutable/chunks/{CHiOQIO1.js → BCS2G1TZ.js} +1 -1
- package/web/app/immutable/chunks/{D5Rd8qkd.js → BE6Cp7Qp.js} +1 -1
- package/web/app/immutable/chunks/{Bmt71DMB.js → BFEzojY2.js} +1 -1
- package/web/app/immutable/chunks/{CKFaA258.js → BFeEPayU.js} +1 -1
- package/web/app/immutable/chunks/{EfOpqeLT.js → BFgeFHTs.js} +1 -1
- package/web/app/immutable/chunks/{CVuT-llE.js → BGTRTFMR.js} +1 -1
- package/web/app/immutable/chunks/{_Juvw-ie.js → BI0hvS48.js} +3 -3
- package/web/app/immutable/chunks/{9mNi8996.js → BI3a2AWW.js} +2 -2
- package/web/app/immutable/chunks/BIVeXMBl.js +1 -0
- package/web/app/immutable/chunks/{Cgjp6r06.js → BK6a0pzX.js} +1 -1
- package/web/app/immutable/chunks/{DCfPUdw9.js → BLyGObAP.js} +3 -3
- package/web/app/immutable/chunks/{DVHfIJ_U.js → BNkpVy97.js} +1 -1
- package/web/app/immutable/chunks/{B3TTR8D_.js → BP3Sccje.js} +1 -1
- 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/{BKMwkk7g.js → BPzekfWN.js} +1 -1
- package/web/app/immutable/chunks/{DnbNqDYS.js → BSKFIBj2.js} +1 -1
- package/web/app/immutable/chunks/{CkyY-zEo.js → BTrqJIJZ.js} +1 -1
- package/web/app/immutable/chunks/{bT3v1QYj.js → BTw9kxtg.js} +1 -1
- package/web/app/immutable/chunks/{DPCjIvYy.js → BUGeL7WE.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/{jExJ4qw0.js → BXhT5rHA.js} +2 -2
- package/web/app/immutable/chunks/{COWdAscC.js → BY9RbRJy.js} +1 -1
- package/web/app/immutable/chunks/{CEUJ2SOA.js → BYP8ebQS.js} +1 -1
- package/web/app/immutable/chunks/{Bkn9MGZb.js → BYq9VtBF.js} +1 -1
- package/web/app/immutable/chunks/{DQdDAxOz.js → BaujsV9k.js} +1 -1
- package/web/app/immutable/chunks/{7Co-pRoL.js → BbvEB4jz.js} +1 -1
- package/web/app/immutable/chunks/{s7AiPAor.js → BcpfdNy8.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/{IPb2sVOc.js → BjRQQ_jq.js} +4 -4
- package/web/app/immutable/chunks/{J4xkCilS.js → BkITif4J.js} +1 -1
- package/web/app/immutable/chunks/{DJS9lO4g.js → BlRYe00B.js} +1 -1
- package/web/app/immutable/chunks/{BR1_dE35.js → BlVYr5cA.js} +1 -1
- package/web/app/immutable/chunks/{Ah-onPNG.js → BmTMWrby.js} +1 -1
- package/web/app/immutable/chunks/{BzJwOhb5.js → Bq_wOSEp.js} +1 -1
- package/web/app/immutable/chunks/{D5zGpim8.js → Bs9K_x5H.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/{CpxnRRai.js → BtHTHBJp.js} +1 -1
- package/web/app/immutable/chunks/{BWLItowS.js → Bty1UglO.js} +1 -1
- package/web/app/immutable/chunks/{B_TGsMEB.js → BvPbguyx.js} +1 -1
- package/web/app/immutable/chunks/{o9vqVVAE.js → BvbTU4IL.js} +1 -1
- package/web/app/immutable/chunks/{DwzqUxIw.js → Bvi-fRGz.js} +1 -1
- package/web/app/immutable/chunks/{zFOAQ-fV.js → BwhjiNjC.js} +1 -1
- package/web/app/immutable/chunks/{6eBy--fo.js → BwtFad5m.js} +2 -2
- 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/{ko5zX9YA.js → BxVnbYG1.js} +1 -1
- package/web/app/immutable/chunks/{CLbTxOfk.js → ByfS7UIX.js} +1 -1
- package/web/app/immutable/chunks/{BzWnUeNO.js → BypvqIQM.js} +1 -1
- package/web/app/immutable/chunks/{DAY78LgA.js → C-O59F9J.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/{8OEJW7fY.js → C6Qw0raF.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/{BUfNfMkk.js → C8JlOzbF.js} +1 -1
- package/web/app/immutable/chunks/{Da_Z6CgM.js → C8y9EItt.js} +1 -1
- package/web/app/immutable/chunks/{Dxv5pbru.js → C9h2rwKF.js} +1 -1
- package/web/app/immutable/chunks/{BE66F_G_.js → CAvYeStH.js} +1 -1
- package/web/app/immutable/chunks/{B-wL6Wzy.js → CBkpyV7r.js} +1 -1
- package/web/app/immutable/chunks/{Dy2ZTySC.js → CCqqosml.js} +1 -1
- package/web/app/immutable/chunks/{Bxk8XeS_.js → CDAoSo12.js} +1 -1
- package/web/app/immutable/chunks/{DaYz5Oxb.js → CDCEiDxP.js} +3 -3
- package/web/app/immutable/chunks/{KWmquGlL.js → CDK_hSiv.js} +1 -1
- package/web/app/immutable/chunks/{5DxHNwZe.js → CDNvYbvS.js} +1 -1
- package/web/app/immutable/chunks/{CXCeVP0_.js → CDjpuJh0.js} +1 -1
- package/web/app/immutable/chunks/{Yy6hnibL.js → CE7dsja4.js} +1 -1
- package/web/app/immutable/chunks/{Cr-iZ9Tf.js → CEOBX1Pf.js} +1 -1
- package/web/app/immutable/chunks/{RNoFqjp6.js → CFny5dMa.js} +1 -1
- package/web/app/immutable/chunks/{Ckr4n1ss.js → CGIQkN5K.js} +1 -1
- package/web/app/immutable/chunks/{C9K8tC7J.js → CHLX1QZz.js} +1 -1
- package/web/app/immutable/chunks/{CV9F7g3O.js → CHXhxB4Q.js} +1 -1
- package/web/app/immutable/chunks/{CxSmnqpJ.js → CI9sv_EP.js} +1 -1
- package/web/app/immutable/chunks/{Bwqr9iPo.js → CJ4Z96pe.js} +1 -1
- package/web/app/immutable/chunks/CJO6KBmw.js +1 -0
- package/web/app/immutable/chunks/{BROVaoRF.js → CJVoHxzN.js} +1 -1
- package/web/app/immutable/chunks/{Dk_2gwLu.js → CKXQrY3X.js} +1 -1
- package/web/app/immutable/chunks/{rdao0YQj.js → CL-lzPGU.js} +1 -1
- 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/{BQzm8t-k.js → CRZZ_hOy.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/{wQP9H0b5.js → CY4fyoCV.js} +1 -1
- package/web/app/immutable/chunks/C_1hI7HP.js +1 -0
- package/web/app/immutable/chunks/{B2JbncL-.js → C_KuQ05a.js} +1 -1
- package/web/app/immutable/chunks/{CJotcdQg.js → CaNxJFJ1.js} +1 -1
- package/web/app/immutable/chunks/{B_L3BWUb.js → CbO3oDHw.js} +1 -1
- package/web/app/immutable/chunks/{C4Fxj3Dv.js → CbqxWBi7.js} +1 -1
- package/web/app/immutable/chunks/{CgbisBm3.js → CeHXXIxE.js} +1 -1
- package/web/app/immutable/chunks/{C9qmiGPA.js → Cf4fmkfL.js} +1 -1
- package/web/app/immutable/chunks/{P-6iyz0U.js → CiMmbOsB.js} +1 -1
- package/web/app/immutable/chunks/{B_9Y0vrL.js → CiSIqqOJ.js} +1 -1
- package/web/app/immutable/chunks/{CHDBPeiu.js → CjTo2K46.js} +1 -1
- package/web/app/immutable/chunks/{DVIpt_-b.js → CjpxPpfy.js} +1 -1
- package/web/app/immutable/chunks/{BORX4QsI.js → Ck2X3Rvg.js} +1 -1
- package/web/app/immutable/chunks/{76a0x163.js → CkA2ItLw.js} +1 -1
- package/web/app/immutable/chunks/{DYXQ0DvL.js → Ckb6le-m.js} +4 -4
- package/web/app/immutable/chunks/{CL_Wu5hL.js → CkmRZ_MC.js} +1 -1
- package/web/app/immutable/chunks/{hOsZO8to.js → CmrjfWYI.js} +1 -1
- package/web/app/immutable/chunks/{BgdV71H8.js → CnAbYuPp.js} +1 -1
- package/web/app/immutable/chunks/{BtCfKiJI.js → CnqJXAKo.js} +1 -1
- package/web/app/immutable/chunks/{CvmogvXF.js → Co4vj0dC.js} +1 -1
- package/web/app/immutable/chunks/{Cywj8P1v.js → Cofxvpdb.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/{D2ZHHwj-.js → CrFyLBfi.js} +2 -2
- package/web/app/immutable/chunks/{DLncssSx.js → Ctbo6mXV.js} +1 -1
- package/web/app/immutable/chunks/{dnTowHeA.js → CxFOqPFP.js} +3 -3
- package/web/app/immutable/chunks/{lEWu7gpF.js → Cxf6ur9F.js} +1 -1
- package/web/app/immutable/chunks/{BCl5zPXa.js → D-YGlaxj.js} +1 -1
- package/web/app/immutable/chunks/{CVQJ3G9r.js → D-dukRlA.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/{zdyRQTcF.js → D3C3nNLs.js} +1 -1
- package/web/app/immutable/chunks/{BgfkQ05m.js → D3p_bZm7.js} +1 -1
- package/web/app/immutable/chunks/{B6jOBMKj.js → D4FXvK9L.js} +3 -3
- 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/{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/{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/{DsbDY3sD.js → DDJ_XVek.js} +2 -2
- package/web/app/immutable/chunks/{3BCA27_7.js → DEI5RmgA.js} +1 -1
- package/web/app/immutable/chunks/{mg5SY1J3.js → DIKTPgAK.js} +1 -1
- package/web/app/immutable/chunks/{BOzF_1jP.js → DJs4vEjF.js} +1 -1
- package/web/app/immutable/chunks/{CnT7X_Ka.js → DKHY8q_S.js} +1 -1
- package/web/app/immutable/chunks/{C4_TlGj0.js → DLwWVKiF.js} +1 -1
- package/web/app/immutable/chunks/{DkPs4gWX.js → DME_6OFx.js} +1 -1
- package/web/app/immutable/chunks/{SCoe-XeJ.js → DMlkDPxV.js} +1 -1
- package/web/app/immutable/chunks/{CmLRC7-r.js → DN6OUhsP.js} +1 -1
- package/web/app/immutable/chunks/{CPvBbiM1.js → DOUbieNj.js} +1 -1
- package/web/app/immutable/chunks/{CfHaUU8C.js → DOhJfAZG.js} +1 -1
- package/web/app/immutable/chunks/{tFT894m3.js → DPYlDye0.js} +1 -1
- package/web/app/immutable/chunks/{DRdEaij1.js → DPZcepbV.js} +1 -1
- package/web/app/immutable/chunks/{CE-ONoWm.js → DPyomP91.js} +1 -1
- package/web/app/immutable/chunks/{wJF9cAcZ.js → DPzOIlu9.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/{DMhc83bo.js → DSAj_NCN.js} +1 -1
- package/web/app/immutable/chunks/{CrtOf2Rt.js → DTuql3Rj.js} +1 -1
- package/web/app/immutable/chunks/{BdSrsYxv.js → DUhA4bgN.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/{CaBTNP9L.js → D_Xpj-6r.js} +1 -1
- package/web/app/immutable/chunks/{C-931TJ0.js → DaaqgDka.js} +1 -1
- package/web/app/immutable/chunks/{BnV5imkg.js → Ddq8SBEz.js} +1 -1
- package/web/app/immutable/chunks/{CHyLxrMv.js → DduCxuVq.js} +1 -1
- package/web/app/immutable/chunks/{aDC6CW-9.js → Dfg3lB2h.js} +1 -1
- package/web/app/immutable/chunks/{gWn9PDXZ.js → Dhzl8ugO.js} +1 -1
- package/web/app/immutable/chunks/{b16NDDfn.js → Di8eJPr0.js} +2 -2
- package/web/app/immutable/chunks/{3ozr1vad.js → Div5PXT-.js} +2 -2
- package/web/app/immutable/chunks/{CDGdQPZ3.js → DjHhZWUX.js} +1 -1
- package/web/app/immutable/chunks/{Cy1eIaf4.js → Djg1-55Y.js} +1 -1
- package/web/app/immutable/chunks/{DqfOHbUh.js → Djp7mdlG.js} +1 -1
- package/web/app/immutable/chunks/{oxrHj9WB.js → DlEmrQXN.js} +2 -2
- package/web/app/immutable/chunks/{BZRdDiLW.js → Dlk4BhFg.js} +1 -1
- package/web/app/immutable/chunks/{CngHTAnD.js → Dm7KqEFT.js} +13 -13
- package/web/app/immutable/chunks/{oLeo92vY.js → DmXAUF0G.js} +1 -1
- package/web/app/immutable/chunks/DmaEU7hb.js +2 -0
- package/web/app/immutable/chunks/{D6uQnPIb.js → DnJ4jlPB.js} +1 -1
- package/web/app/immutable/chunks/{Cg1tTx8i.js → DpMOdl0E.js} +1 -1
- package/web/app/immutable/chunks/{D2KaVfIR.js → DqMqjmmT.js} +2 -2
- package/web/app/immutable/chunks/{Bf8Z3F34.js → Dr0V5Z_Q.js} +1 -1
- package/web/app/immutable/chunks/{Ue-wYmxq.js → DrHfN5GT.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/{DtV42LL1.js → DsT1iX_Q.js} +6 -6
- package/web/app/immutable/chunks/{BJGbabcl.js → Dsf8OM9-.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/{vnEDE6VU.js → Du_rNq8q.js} +1 -1
- 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/{BiKalUOw.js → DwImHc9s.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/{BkliVAqJ.js → Dzk9iuw9.js} +4 -4
- package/web/app/immutable/chunks/{D81Tox6K.js → EK6zOAHM.js} +1 -1
- package/web/app/immutable/chunks/{gtC5KXEz.js → Fdd73CJo.js} +1 -1
- package/web/app/immutable/chunks/{CESUeVmp.js → FzlZUztb.js} +1 -1
- package/web/app/immutable/chunks/{Bz8C2v0s.js → H9IjxeQk.js} +1 -1
- package/web/app/immutable/chunks/{DgW5R9bn.js → J8_M56d9.js} +1 -1
- package/web/app/immutable/chunks/{EW9Oxsda.js → KH7BHXXb.js} +1 -1
- package/web/app/immutable/chunks/{y7Ugu8WS.js → KHteWVFN.js} +1 -1
- package/web/app/immutable/chunks/{CfC-LCr9.js → KSLBBJRy.js} +1 -1
- package/web/app/immutable/chunks/{CxRJqvXa.js → KYuLFpkq.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/{Bt_5d6KS.js → M-TVgx-R.js} +1 -1
- package/web/app/immutable/chunks/{BQyGe_6f.js → MI7EtNv0.js} +1 -1
- package/web/app/immutable/chunks/{nMcdiCb6.js → MQBseMlG.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/{3Tv2tBbo.js → P-T74LCo.js} +3 -3
- package/web/app/immutable/chunks/{DIQ23RZn.js → PIgqsYsQ.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/{BEGsYnq4.js → Rx5mQeGT.js} +4 -4
- package/web/app/immutable/chunks/{Be5foFms.js → S845NCb3.js} +1 -1
- package/web/app/immutable/chunks/{Dpd18D9E.js → Su2XS_Ru.js} +1 -1
- package/web/app/immutable/chunks/{H_09C3Qv.js → T8d_aLDP.js} +1 -1
- package/web/app/immutable/chunks/{DYltC5LY.js → TiuNiN7j.js} +1 -1
- package/web/app/immutable/chunks/{DQEQvBuM.js → U9jJmfYa.js} +1 -1
- package/web/app/immutable/chunks/{DgQzilAi.js → W7maz5hp.js} +1 -1
- package/web/app/immutable/chunks/{C__OzIly.js → WVvubfLN.js} +2 -2
- package/web/app/immutable/chunks/{DYTNWFlt.js → XCWZeNYo.js} +1 -1
- package/web/app/immutable/chunks/{CoHtEoLb.js → XHPDEELd.js} +1 -1
- package/web/app/immutable/chunks/{xAGiw113.js → Y5Ky10uA.js} +1 -1
- package/web/app/immutable/chunks/{DwlFFy2U.js → Zx9hB63s.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/{CFhJzMqD.js → azpKokvz.js} +1 -1
- package/web/app/immutable/chunks/{CbUxbw3N.js → bF6PpsOD.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/{CYodIWBo.js → chjnSxvZ.js} +1 -1
- package/web/app/immutable/chunks/{Bfi3_8Hc.js → eElW3aeh.js} +1 -1
- 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/{D_2nAvGE.js → h06E2ICA.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/{e9FnhdhA.js → i_QPvq4q.js} +1 -1
- 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/{DZTelE6-.js → nImP7yvb.js} +1 -1
- package/web/app/immutable/chunks/{De9e0mT0.js → nbomrtth.js} +1 -1
- package/web/app/immutable/chunks/{BFqSYY_K.js → oOhxfFIU.js} +1 -1
- package/web/app/immutable/chunks/{C5BT0KwE.js → ozVAo4aX.js} +1 -1
- package/web/app/immutable/chunks/{DlZ4XLhX.js → q6F-1__g.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/{DQGxxGZP.js → wl2qP2wF.js} +1 -1
- package/web/app/immutable/chunks/{E-ElQTlm.js → x63yRqVE.js} +1 -1
- package/web/app/immutable/chunks/{DZldOwzL.js → yFcbscNn.js} +1 -1
- package/web/app/immutable/chunks/{CpCzAUi8.js → yaHL2zPw.js} +1 -1
- package/web/app/immutable/chunks/{DQzjOLwV.js → zHu1d_6X.js} +2 -2
- package/web/app/immutable/entry/app.CgYQGiwi.js +4 -0
- package/web/app/immutable/entry/start.C_kFKw1E.js +1 -0
- package/web/app/immutable/nodes/{0.XjTeJo8S.js → 0.DOOOI3Bo.js} +1 -1
- package/web/app/immutable/nodes/{1.WAn52SGO.js → 1.DCbWOuyY.js} +1 -1
- package/web/app/immutable/nodes/{10.BCt95gGF.js → 10.DkhUAhty.js} +5 -5
- package/web/app/immutable/nodes/{11.D9nZjMrf.js → 11.DDwWhO0Z.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.Dw1bH9Zl.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.BDZr-fpl.js} +2 -2
- package/web/app/immutable/nodes/{2.BhjQOmpc.js → 2.BXcXLNQd.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.DSd1hRZn.js} +1 -1
- package/web/app/immutable/nodes/{4.9E3WAn5x.js → 4.BkWwx_VF.js} +1 -1
- package/web/app/immutable/nodes/5.y9tMc2yb.js +1 -0
- package/web/app/immutable/nodes/{6.DC2CoHu2.js → 6.BosoYTZK.js} +1 -1
- package/web/app/immutable/nodes/{7.ipL23qll.js → 7.BX-dUHAQ.js} +1 -1
- package/web/app/immutable/nodes/{8.H6jtZ1r2.js → 8.DUR07SoM.js} +1 -1
- package/web/app/immutable/nodes/9.Cw56XQ1G.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{D as O,a as V,d as z}from"./CQcEqK4G.js";import{K as G,T as F,_ as J,d as X,f as Q,X as Y,Q as Z,a0 as q,n as P,e as tt,c as et,m as U,h as N,l as E}from"./CplGIhI5.js";import{o as u,b as _,s as r,n as h,l as M,_ as x,c as B,u as nt}from"./CIyUrgF0.js";import{I as it}from"./Bqd7fdCF.js";const at="/app/immutable/assets/PatrickHand-Regular.CyLOmwMC.ttf";let D=null,R=null;const W=O.badgeFontFamily;function K(){return R??W}function L(){return D||(D=(async()=>{let t;try{const i=typeof document<"u"?document.fonts:globalThis.fonts;if(!i||typeof FontFace>"u")throw new Error("font-api-unavailable");const a=await Promise.race([new FontFace("Intent Annotation Hand",`url("${at}")`,{style:"normal",weight:"400",display:"block"}).load(),new Promise((l,o)=>{t=setTimeout(()=>o(new Error("font-load-timeout")),2e3)})]);i.add(a),R=O.fontFamily}catch{R=W}finally{clearTimeout(t)}})(),D)}let k=null;function ot(t){const i=G(t);if(t.kind!=="text"||t.style==="sticky"||(k||(k=typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1).getContext("2d"):typeof document<"u"?document.createElement("canvas").getContext("2d"):null),!k))return i;k.font=`${t.fontSize}px ${K()}`,k.textAlign="left",k.textBaseline="top",k.letterSpacing="0px",k.wordSpacing="0px";let a=1/0,l=1/0,o=-1/0,e=-1/0;const{lines:f,lineHeight:c}=F(t);for(const[s,p]of f.entries()){if(!p.trim())continue;const g=k.measureText(p),b=s*c,m=[-g.actualBoundingBoxLeft,b-g.actualBoundingBoxAscent,g.actualBoundingBoxRight,b+g.actualBoundingBoxDescent];if(!m.every(Number.isFinite))return i;a=Math.min(a,m[0]),l=Math.min(l,m[1]),o=Math.max(o,m[2]),e=Math.max(e,m[3])}if(!(o>a&&e>l))return i;const n=Math.max(1,t.fontSize/24);return{x:t.x+a-n,y:t.y+l-n,w:o-a+2*n,h:e-l+2*n}}const C=16e3;function rt(t,i){const l=t.length*2,o=new ArrayBuffer(44+l),e=new DataView(o),f=(n,s)=>{for(let p=0;p<s.length;p+=1)e.setUint8(n+p,s.charCodeAt(p))};f(0,"RIFF"),e.setUint32(4,36+l,!0),f(8,"WAVE"),f(12,"fmt "),e.setUint32(16,16,!0),e.setUint16(20,1,!0),e.setUint16(22,1,!0),e.setUint32(24,i,!0),e.setUint32(28,i*2,!0),e.setUint16(32,2,!0),e.setUint16(34,16,!0),f(36,"data"),e.setUint32(40,l,!0);let c=44;for(let n=0;n<t.length;n+=1){const s=Math.max(-1,Math.min(1,t[n]));e.setInt16(c,s<0?s*32768:s*32767,!0),c+=2}return o}function st(t){const i=new Float32Array(t.length);for(let a=0;a<t.numberOfChannels;a+=1){const l=t.getChannelData(a);for(let o=0;o<l.length;o+=1)i[o]+=l[o]/t.numberOfChannels}return i}async function gt(t){const i=new AudioContext;try{const a=await i.decodeAudioData(await t.arrayBuffer()),l=Math.max(1,Math.ceil(a.length*C/a.sampleRate)),o=new OfflineAudioContext(1,l,C),e=o.createBufferSource();e.buffer=a,e.connect(o.destination),e.start();const f=await o.startRendering();return rt(st(f),C)}finally{await i.close().catch(()=>{})}}function $(t){const i=new Uint8Array(t),a=32768;let l="";for(let o=0;o<i.length;o+=a)l+=String.fromCharCode(...i.subarray(o,o+a));return btoa(l)}const d={...O,get fontFamily(){return K()},blurRadius:X};function H(t,i,a=0,l){const o=t.crop??{x:0,y:0,w:i.width,h:i.height},e=Math.max(1,Math.max(i.width,i.height)/1440),f=Math.min(d.badgeRadius*e,o.w/2,o.h/2);return Y(t,i).filter(c=>i.kind==="screenshot"||a>=c.mark.atMs&&a<c.visibleUntilMs).flatMap(({n:c,mark:n})=>{const s=i.kind==="recording"?Z(n.geometry,q(i,n),a):n.geometry;if(!s)return[];const p=ot(s),g=z(p,o,e,f);return[...n.id===l&&s.kind==="text"?[]:[{kind:"geometry",geometry:s,unit:e}],...d.showNumbers?[{kind:"badge",...g,radius:f,label:String(c),unit:e}]:[]]})}function j(t,i){t.save(),t.letterSpacing="0px",t.wordSpacing="0px",t.strokeStyle=d.accent,t.fillStyle=d.accent,t.lineCap="round",t.lineJoin="round";for(const a of i){const l=a.unit??1,o=(c,n)=>{t.strokeStyle=d.halo,t.lineWidth=c+d.haloWidth*l,n?t.stroke(n):t.stroke(),t.strokeStyle=d.accent,t.lineWidth=c,n?t.stroke(n):t.stroke()};if(a.kind==="badge"){t.fillStyle=d.paper,t.beginPath(),t.arc(a.x,a.y,a.radius,0,Math.PI*2),t.fill(),t.strokeStyle=d.accent,t.lineWidth=d.badgeOutline*l,t.stroke(),t.fillStyle=d.ink,t.font=`600 ${a.radius*d.badgeTextScale}px ${d.badgeFontFamily}`,t.textAlign="center",t.textBaseline="middle",t.fillText(a.label,a.x,a.y);continue}const e=a.geometry;t.fillStyle=d.accent;const f=(e.kind==="path"?d.pen:d.stroke)*l;if(e.kind==="rect")t.beginPath(),t.rect(e.x,e.y,e.w,e.h),o(f);else if(e.kind==="text"){const c=F(e);t.fillStyle=d.accent,t.textAlign="left",t.textBaseline="top",t.font=`${e.fontSize}px ${d.fontFamily}`,c.lines.forEach((n,s)=>{const p=e.x+c.padding,g=e.y+c.padding+s*c.lineHeight;t.strokeStyle=d.halo,t.lineWidth=d.haloWidth*l;const b=e.style==="sticky"?c.width-2*c.padding:void 0;t.strokeText(n,p,g,b),t.fillText(n,p,g,b)})}else if(e.kind==="point")t.beginPath(),t.arc(e.x,e.y,Q,0,Math.PI*2),o(f);else if(e.kind==="path")o(f,new Path2D(V(e.points)));else{const c=[e.from,e.to];if(t.beginPath(),c.forEach((n,s)=>s?t.lineTo(n.x,n.y):t.moveTo(n.x,n.y)),e.kind==="arrow"){const n=Math.atan2(e.to.y-e.from.y,e.to.x-e.from.x),s=d.arrowHead*l;t.moveTo(e.to.x-s*Math.cos(n-d.arrowSpread),e.to.y-s*Math.sin(n-d.arrowSpread)),t.lineTo(e.to.x,e.to.y),t.lineTo(e.to.x-s*Math.cos(n+d.arrowSpread),e.to.y-s*Math.sin(n+d.arrowSpread))}o(f)}}t.restore()}function v(t,i){const a=new OffscreenCanvas(Math.max(1,Math.round(t)),Math.max(1,Math.round(i))),l=a.getContext("2d");if(!l)throw new Error("capture-render-unavailable");return{image:a,context:l}}async function pt(t,i,a){if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await L();const{image:l,context:o}=v(t.width,t.height);return j(o,H(i,t,a)),$(await(await l.convertToBlob({type:"image/png"})).arrayBuffer())}async function yt(t,i,a,l){const o=J(i,t,null);if(t.kind!=="screenshot"||o.errors.length)throw new Error(o.errors[0]??"not-a-screenshot");if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await L();const e=Uint8Array.from(atob(a.base64),c=>c.charCodeAt(0)),f=await createImageBitmap(new Blob([e],{type:a.mimeType}));try{if(f.width!==t.width||f.height!==t.height)throw new Error("stale-source-pixels");const c=v(t.width,t.height);if(c.context.drawImage(f,0,0),i.blurRegions.length||i.blurStrokes?.length){const g=v(t.width,t.height);g.context.fillStyle="#000000",g.context.fillRect(0,0,t.width,t.height);const b=`blur(${d.blurRadius}px)`;if(g.context.filter=b,g.context.filter!==b)throw new Error("capture-blur-unavailable");g.context.drawImage(f,0,0);const m=v(t.width,t.height);m.context.fillStyle="#ffffff",m.context.strokeStyle="#ffffff",m.context.lineCap="round",m.context.lineJoin="round";for(const y of i.blurRegions)m.context.fillRect(y.x,y.y,y.w,y.h);for(const y of i.blurStrokes??[]){const S=y.points.filter((I,A)=>A===0||I.x!==y.points[A-1].x||I.y!==y.points[A-1].y);if(m.context.beginPath(),S.length===1){const I=S[0];m.context.arc(I.x,I.y,y.radius,0,Math.PI*2),m.context.fill()}else{m.context.lineWidth=y.radius*2,m.context.moveTo(S[0].x,S[0].y);for(const I of S.slice(1))m.context.lineTo(I.x,I.y);m.context.stroke()}}const T=v(t.width,t.height);T.context.drawImage(g.image,0,0),T.context.globalCompositeOperation="destination-in",T.context.drawImage(m.image,0,0),c.context.drawImage(T.image,0,0)}const n=i.crop??{x:0,y:0,w:t.width,h:t.height},s=v(n.w,n.h);s.context.drawImage(c.image,n.x,n.y,n.w,n.h,0,0,s.image.width,s.image.height),s.context.scale(s.image.width/n.w,s.image.height/n.h),s.context.translate(-n.x,-n.y),j(s.context,H(i,t,0,l?.hiddenTextMarkId));const p=await s.image.convertToBlob({type:"image/png"});return{data:$(await p.arrayBuffer()),mimeType:"image/png",width:s.image.width,height:s.image.height}}finally{f.close()}}const kt=u({outputVersion:M(tt),jobId:r().uuid(),media:P,layers:_(u({atMs:h().finite().nonnegative(),endMs:h().finite().nonnegative(),png:r().min(1).max(48*1024*1024)}).strict()).max(1e4)}).strict(),wt=u({jobId:r().uuid(),media:P,locale:r().min(1).max(80).optional()}).strict(),lt=u({sourceId:r().min(1),sourceRevision:h().int().nonnegative(),durationMs:h().finite().positive().max(120001),intervalMs:M(50),peaks:_(h().finite().min(0).max(1)).max(2401)}).strict().refine(t=>t.peaks.length===Math.ceil(t.durationMs/t.intervalMs),"Incomplete waveform");u({jobId:r().uuid(),media:P}).strict();u({sourceId:r().min(1),sourceRevision:h().int().nonnegative(),trackCount:h().int().nonnegative().max(128),populatedTrackCount:h().int().nonnegative().max(128)}).strict().refine(t=>t.populatedTrackCount<=t.trackCount);const xt=it.DOCK_CAPTURE_EDITOR,w=r().min(1).max(200),ct=u({id:w,tool:x(et),atMs:h().finite().min(0).max(1440*60*1e3).nullable(),label:r().max(200).optional()}).strict();u({kind:x(["recording","screenshot"]),workspaceId:w,agentId:w,attachmentId:w,sourceRevision:r().min(1).max(512),attachmentPath:r().min(1).max(1024),title:r().max(200),durationMs:h().finite().min(0).max(1440*60*1e3).optional(),width:h().int().positive().max(32768).optional(),height:h().int().positive().max(32768).optional(),marks:_(ct).max(500),provenance:u({captureApi:r().max(100).optional(),hasMicAudio:B().optional(),visuals:x(["clean","baked-marks"])}).strict(),source:E.optional(),originalSource:E.optional(),saved:N.nullable().optional(),transcript:U.nullable().optional(),holdToken:r().uuid().optional()}).strict().refine(t=>!t.source||t.source.path===t.attachmentPath&&t.source.attachmentId===t.attachmentId&&t.source.kind===t.kind,"Source does not match the attachment").refine(t=>!t.saved||!!t.source&&t.saved.sourceId===t.source.id&&t.saved.sourceRevision===t.source.revision,"Edit does not match the source").refine(t=>!t.originalSource||t.source?.kind==="screenshot"&&t.originalSource.kind==="screenshot"&&t.originalSource.id!==t.source.id,"Original source does not precede this source");u({openId:r().uuid(),intent:M("attach").optional()}).strict();u({openId:r().uuid(),accept:B()}).strict();u({token:r().uuid(),hide:M(!0).optional()}).strict();u({openId:r().uuid(),requestId:r().uuid()}).strict();u({requestId:r().uuid(),result:x(["saved","stale-source","revision-conflict","failed"]),saved:N.optional()}).strict().refine(t=>t.result==="saved"==!!t.saved,"Saved edit missing");u({pair:u({workspaceId:r().min(1).max(200),agentId:r().min(1).max(200)}).strict(),sourceId:r().min(1).max(512),sourceRevision:h().int().nonnegative(),transcript:U}).strict();nt([u({requestId:r().uuid(),ok:M(!0),source:E}).strict(),u({requestId:r().uuid(),ok:M(!1),error:x(["cancelled","permission","failed"])}).strict()]);const dt=2e4;u({openId:r().uuid(),markId:r().min(1).max(512),generation:h().int().nonnegative(),phase:x(["start","stop"])}).strict();u({requestId:r().uuid(),generation:h().int().nonnegative(),text:r().max(dt),final:B(),error:x(["busy","unavailable","failed","permission"]).optional()}).strict().refine(t=>!t.error||t.final,"An error is final");u({pair:u({workspaceId:r().min(1).max(200),agentId:r().min(1).max(200)}).strict(),sourceId:r().min(1).max(512),sourceRevision:h().int().nonnegative(),waveform:lt}).strict();const bt=u({requestId:r().uuid(),openId:w,pair:u({workspaceId:w,agentId:w}).strict(),kind:x(["screenshot","recording"]),attachmentId:w,sourceId:w.optional(),sourceRevision:h().int().nonnegative().optional(),expectedEditRevision:h().int().nonnegative().optional()}).strict();u({requestId:r().uuid(),result:x(["deleted","stale-source","failed"])}).strict();const It=u({endedOpenId:r().uuid()}).strict();export{xt as D,d as a,dt as b,bt as c,It as d,kt as e,wt as f,$ as g,gt as h,ot as i,K as j,L as k,H as l,pt as m,j as p,yt as r};
|
|
1
|
+
import{D as O,a as V,d as z}from"./CQcEqK4G.js";import{K as G,T as F,_ as J,d as X,f as Q,X as Y,Q as Z,a0 as q,n as P,e as tt,c as et,m as U,h as N,l as E}from"./DX-Wrapd.js";import{o as u,b as _,s as r,n as h,l as M,_ as x,c as B,u as nt}from"./CIyUrgF0.js";import{I as it}from"./Bqd7fdCF.js";const at="/app/immutable/assets/PatrickHand-Regular.CyLOmwMC.ttf";let D=null,R=null;const W=O.badgeFontFamily;function K(){return R??W}function L(){return D||(D=(async()=>{let t;try{const i=typeof document<"u"?document.fonts:globalThis.fonts;if(!i||typeof FontFace>"u")throw new Error("font-api-unavailable");const a=await Promise.race([new FontFace("Intent Annotation Hand",`url("${at}")`,{style:"normal",weight:"400",display:"block"}).load(),new Promise((l,o)=>{t=setTimeout(()=>o(new Error("font-load-timeout")),2e3)})]);i.add(a),R=O.fontFamily}catch{R=W}finally{clearTimeout(t)}})(),D)}let k=null;function ot(t){const i=G(t);if(t.kind!=="text"||t.style==="sticky"||(k||(k=typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1).getContext("2d"):typeof document<"u"?document.createElement("canvas").getContext("2d"):null),!k))return i;k.font=`${t.fontSize}px ${K()}`,k.textAlign="left",k.textBaseline="top",k.letterSpacing="0px",k.wordSpacing="0px";let a=1/0,l=1/0,o=-1/0,e=-1/0;const{lines:f,lineHeight:c}=F(t);for(const[s,p]of f.entries()){if(!p.trim())continue;const g=k.measureText(p),b=s*c,m=[-g.actualBoundingBoxLeft,b-g.actualBoundingBoxAscent,g.actualBoundingBoxRight,b+g.actualBoundingBoxDescent];if(!m.every(Number.isFinite))return i;a=Math.min(a,m[0]),l=Math.min(l,m[1]),o=Math.max(o,m[2]),e=Math.max(e,m[3])}if(!(o>a&&e>l))return i;const n=Math.max(1,t.fontSize/24);return{x:t.x+a-n,y:t.y+l-n,w:o-a+2*n,h:e-l+2*n}}const C=16e3;function rt(t,i){const l=t.length*2,o=new ArrayBuffer(44+l),e=new DataView(o),f=(n,s)=>{for(let p=0;p<s.length;p+=1)e.setUint8(n+p,s.charCodeAt(p))};f(0,"RIFF"),e.setUint32(4,36+l,!0),f(8,"WAVE"),f(12,"fmt "),e.setUint32(16,16,!0),e.setUint16(20,1,!0),e.setUint16(22,1,!0),e.setUint32(24,i,!0),e.setUint32(28,i*2,!0),e.setUint16(32,2,!0),e.setUint16(34,16,!0),f(36,"data"),e.setUint32(40,l,!0);let c=44;for(let n=0;n<t.length;n+=1){const s=Math.max(-1,Math.min(1,t[n]));e.setInt16(c,s<0?s*32768:s*32767,!0),c+=2}return o}function st(t){const i=new Float32Array(t.length);for(let a=0;a<t.numberOfChannels;a+=1){const l=t.getChannelData(a);for(let o=0;o<l.length;o+=1)i[o]+=l[o]/t.numberOfChannels}return i}async function gt(t){const i=new AudioContext;try{const a=await i.decodeAudioData(await t.arrayBuffer()),l=Math.max(1,Math.ceil(a.length*C/a.sampleRate)),o=new OfflineAudioContext(1,l,C),e=o.createBufferSource();e.buffer=a,e.connect(o.destination),e.start();const f=await o.startRendering();return rt(st(f),C)}finally{await i.close().catch(()=>{})}}function $(t){const i=new Uint8Array(t),a=32768;let l="";for(let o=0;o<i.length;o+=a)l+=String.fromCharCode(...i.subarray(o,o+a));return btoa(l)}const d={...O,get fontFamily(){return K()},blurRadius:X};function H(t,i,a=0,l){const o=t.crop??{x:0,y:0,w:i.width,h:i.height},e=Math.max(1,Math.max(i.width,i.height)/1440),f=Math.min(d.badgeRadius*e,o.w/2,o.h/2);return Y(t,i).filter(c=>i.kind==="screenshot"||a>=c.mark.atMs&&a<c.visibleUntilMs).flatMap(({n:c,mark:n})=>{const s=i.kind==="recording"?Z(n.geometry,q(i,n),a):n.geometry;if(!s)return[];const p=ot(s),g=z(p,o,e,f);return[...n.id===l&&s.kind==="text"?[]:[{kind:"geometry",geometry:s,unit:e}],...d.showNumbers?[{kind:"badge",...g,radius:f,label:String(c),unit:e}]:[]]})}function j(t,i){t.save(),t.letterSpacing="0px",t.wordSpacing="0px",t.strokeStyle=d.accent,t.fillStyle=d.accent,t.lineCap="round",t.lineJoin="round";for(const a of i){const l=a.unit??1,o=(c,n)=>{t.strokeStyle=d.halo,t.lineWidth=c+d.haloWidth*l,n?t.stroke(n):t.stroke(),t.strokeStyle=d.accent,t.lineWidth=c,n?t.stroke(n):t.stroke()};if(a.kind==="badge"){t.fillStyle=d.paper,t.beginPath(),t.arc(a.x,a.y,a.radius,0,Math.PI*2),t.fill(),t.strokeStyle=d.accent,t.lineWidth=d.badgeOutline*l,t.stroke(),t.fillStyle=d.ink,t.font=`600 ${a.radius*d.badgeTextScale}px ${d.badgeFontFamily}`,t.textAlign="center",t.textBaseline="middle",t.fillText(a.label,a.x,a.y);continue}const e=a.geometry;t.fillStyle=d.accent;const f=(e.kind==="path"?d.pen:d.stroke)*l;if(e.kind==="rect")t.beginPath(),t.rect(e.x,e.y,e.w,e.h),o(f);else if(e.kind==="text"){const c=F(e);t.fillStyle=d.accent,t.textAlign="left",t.textBaseline="top",t.font=`${e.fontSize}px ${d.fontFamily}`,c.lines.forEach((n,s)=>{const p=e.x+c.padding,g=e.y+c.padding+s*c.lineHeight;t.strokeStyle=d.halo,t.lineWidth=d.haloWidth*l;const b=e.style==="sticky"?c.width-2*c.padding:void 0;t.strokeText(n,p,g,b),t.fillText(n,p,g,b)})}else if(e.kind==="point")t.beginPath(),t.arc(e.x,e.y,Q,0,Math.PI*2),o(f);else if(e.kind==="path")o(f,new Path2D(V(e.points)));else{const c=[e.from,e.to];if(t.beginPath(),c.forEach((n,s)=>s?t.lineTo(n.x,n.y):t.moveTo(n.x,n.y)),e.kind==="arrow"){const n=Math.atan2(e.to.y-e.from.y,e.to.x-e.from.x),s=d.arrowHead*l;t.moveTo(e.to.x-s*Math.cos(n-d.arrowSpread),e.to.y-s*Math.sin(n-d.arrowSpread)),t.lineTo(e.to.x,e.to.y),t.lineTo(e.to.x-s*Math.cos(n+d.arrowSpread),e.to.y-s*Math.sin(n+d.arrowSpread))}o(f)}}t.restore()}function v(t,i){const a=new OffscreenCanvas(Math.max(1,Math.round(t)),Math.max(1,Math.round(i))),l=a.getContext("2d");if(!l)throw new Error("capture-render-unavailable");return{image:a,context:l}}async function pt(t,i,a){if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await L();const{image:l,context:o}=v(t.width,t.height);return j(o,H(i,t,a)),$(await(await l.convertToBlob({type:"image/png"})).arrayBuffer())}async function yt(t,i,a,l){const o=J(i,t,null);if(t.kind!=="screenshot"||o.errors.length)throw new Error(o.errors[0]??"not-a-screenshot");if(t.visuals!=="clean")throw new Error("legacy-baked-marks");await L();const e=Uint8Array.from(atob(a.base64),c=>c.charCodeAt(0)),f=await createImageBitmap(new Blob([e],{type:a.mimeType}));try{if(f.width!==t.width||f.height!==t.height)throw new Error("stale-source-pixels");const c=v(t.width,t.height);if(c.context.drawImage(f,0,0),i.blurRegions.length||i.blurStrokes?.length){const g=v(t.width,t.height);g.context.fillStyle="#000000",g.context.fillRect(0,0,t.width,t.height);const b=`blur(${d.blurRadius}px)`;if(g.context.filter=b,g.context.filter!==b)throw new Error("capture-blur-unavailable");g.context.drawImage(f,0,0);const m=v(t.width,t.height);m.context.fillStyle="#ffffff",m.context.strokeStyle="#ffffff",m.context.lineCap="round",m.context.lineJoin="round";for(const y of i.blurRegions)m.context.fillRect(y.x,y.y,y.w,y.h);for(const y of i.blurStrokes??[]){const S=y.points.filter((I,A)=>A===0||I.x!==y.points[A-1].x||I.y!==y.points[A-1].y);if(m.context.beginPath(),S.length===1){const I=S[0];m.context.arc(I.x,I.y,y.radius,0,Math.PI*2),m.context.fill()}else{m.context.lineWidth=y.radius*2,m.context.moveTo(S[0].x,S[0].y);for(const I of S.slice(1))m.context.lineTo(I.x,I.y);m.context.stroke()}}const T=v(t.width,t.height);T.context.drawImage(g.image,0,0),T.context.globalCompositeOperation="destination-in",T.context.drawImage(m.image,0,0),c.context.drawImage(T.image,0,0)}const n=i.crop??{x:0,y:0,w:t.width,h:t.height},s=v(n.w,n.h);s.context.drawImage(c.image,n.x,n.y,n.w,n.h,0,0,s.image.width,s.image.height),s.context.scale(s.image.width/n.w,s.image.height/n.h),s.context.translate(-n.x,-n.y),j(s.context,H(i,t,0,l?.hiddenTextMarkId));const p=await s.image.convertToBlob({type:"image/png"});return{data:$(await p.arrayBuffer()),mimeType:"image/png",width:s.image.width,height:s.image.height}}finally{f.close()}}const kt=u({outputVersion:M(tt),jobId:r().uuid(),media:P,layers:_(u({atMs:h().finite().nonnegative(),endMs:h().finite().nonnegative(),png:r().min(1).max(48*1024*1024)}).strict()).max(1e4)}).strict(),wt=u({jobId:r().uuid(),media:P,locale:r().min(1).max(80).optional()}).strict(),lt=u({sourceId:r().min(1),sourceRevision:h().int().nonnegative(),durationMs:h().finite().positive().max(120001),intervalMs:M(50),peaks:_(h().finite().min(0).max(1)).max(2401)}).strict().refine(t=>t.peaks.length===Math.ceil(t.durationMs/t.intervalMs),"Incomplete waveform");u({jobId:r().uuid(),media:P}).strict();u({sourceId:r().min(1),sourceRevision:h().int().nonnegative(),trackCount:h().int().nonnegative().max(128),populatedTrackCount:h().int().nonnegative().max(128)}).strict().refine(t=>t.populatedTrackCount<=t.trackCount);const xt=it.DOCK_CAPTURE_EDITOR,w=r().min(1).max(200),ct=u({id:w,tool:x(et),atMs:h().finite().min(0).max(1440*60*1e3).nullable(),label:r().max(200).optional()}).strict();u({kind:x(["recording","screenshot"]),workspaceId:w,agentId:w,attachmentId:w,sourceRevision:r().min(1).max(512),attachmentPath:r().min(1).max(1024),title:r().max(200),durationMs:h().finite().min(0).max(1440*60*1e3).optional(),width:h().int().positive().max(32768).optional(),height:h().int().positive().max(32768).optional(),marks:_(ct).max(500),provenance:u({captureApi:r().max(100).optional(),hasMicAudio:B().optional(),visuals:x(["clean","baked-marks"])}).strict(),source:E.optional(),originalSource:E.optional(),saved:N.nullable().optional(),transcript:U.nullable().optional(),holdToken:r().uuid().optional()}).strict().refine(t=>!t.source||t.source.path===t.attachmentPath&&t.source.attachmentId===t.attachmentId&&t.source.kind===t.kind,"Source does not match the attachment").refine(t=>!t.saved||!!t.source&&t.saved.sourceId===t.source.id&&t.saved.sourceRevision===t.source.revision,"Edit does not match the source").refine(t=>!t.originalSource||t.source?.kind==="screenshot"&&t.originalSource.kind==="screenshot"&&t.originalSource.id!==t.source.id,"Original source does not precede this source");u({openId:r().uuid(),intent:M("attach").optional()}).strict();u({openId:r().uuid(),accept:B()}).strict();u({token:r().uuid(),hide:M(!0).optional()}).strict();u({openId:r().uuid(),requestId:r().uuid()}).strict();u({requestId:r().uuid(),result:x(["saved","stale-source","revision-conflict","failed"]),saved:N.optional()}).strict().refine(t=>t.result==="saved"==!!t.saved,"Saved edit missing");u({pair:u({workspaceId:r().min(1).max(200),agentId:r().min(1).max(200)}).strict(),sourceId:r().min(1).max(512),sourceRevision:h().int().nonnegative(),transcript:U}).strict();nt([u({requestId:r().uuid(),ok:M(!0),source:E}).strict(),u({requestId:r().uuid(),ok:M(!1),error:x(["cancelled","permission","failed"])}).strict()]);const dt=2e4;u({openId:r().uuid(),markId:r().min(1).max(512),generation:h().int().nonnegative(),phase:x(["start","stop"])}).strict();u({requestId:r().uuid(),generation:h().int().nonnegative(),text:r().max(dt),final:B(),error:x(["busy","unavailable","failed","permission"]).optional()}).strict().refine(t=>!t.error||t.final,"An error is final");u({pair:u({workspaceId:r().min(1).max(200),agentId:r().min(1).max(200)}).strict(),sourceId:r().min(1).max(512),sourceRevision:h().int().nonnegative(),waveform:lt}).strict();const bt=u({requestId:r().uuid(),openId:w,pair:u({workspaceId:w,agentId:w}).strict(),kind:x(["screenshot","recording"]),attachmentId:w,sourceId:w.optional(),sourceRevision:h().int().nonnegative().optional(),expectedEditRevision:h().int().nonnegative().optional()}).strict();u({requestId:r().uuid(),result:x(["deleted","stale-source","failed"])}).strict();const It=u({endedOpenId:r().uuid()}).strict();export{xt as D,d as a,dt as b,bt as c,It as d,kt as e,wt as f,$ as g,gt as h,ot as i,K as j,L as k,H as l,pt as m,j as p,yt as r};
|
|
@@ -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"./BI0hvS48.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"./Rx5mQeGT.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"./Dzk9iuw9.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"./BI3a2AWW.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"./BtHTHBJp.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"./BAP-Km9w.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"./DEI5RmgA.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"./CbO3oDHw.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"./BFgeFHTs.js";import{d as zl,f as lk,e as ck}from"./CI9sv_EP.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"./BwtFad5m.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"./BwhjiNjC.js";import{i as Wp,a as Pk}from"./Bu13V5mO.js";import{seekConversationToMessage as Up}from"./Bq_wOSEp.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"./zHu1d_6X.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"./Cxf6ur9F.js";import{d as Dk}from"./B0Z-1lwJ.js";import{P as Nk}from"./Ctbo6mXV.js";import{g as Bk}from"./DduCxuVq.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(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./
|
|
1
|
+
import{l as e}from"./1WR8MecL.js";const n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:e.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:e.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:e.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},o={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{n as conf,o as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./
|
|
1
|
+
import{l as e}from"./1WR8MecL.js";const i={comments:{blockComment:["{/*","*/}"]},brackets:[["{","}"]],autoClosingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"“",close:"”"},{open:"‘",close:"’"},{open:"`",close:"`"},{open:"{",close:"}"},{open:"(",close:")"},{open:"_",close:"_"},{open:"**",close:"**"},{open:"<",close:">"}],onEnterRules:[{beforeText:/^\s*- .+/,action:{indentAction:e.IndentAction.None,appendText:"- "}},{beforeText:/^\s*\+ .+/,action:{indentAction:e.IndentAction.None,appendText:"+ "}},{beforeText:/^\s*\* .+/,action:{indentAction:e.IndentAction.None,appendText:"* "}},{beforeText:/^> /,action:{indentAction:e.IndentAction.None,appendText:"> "}},{beforeText:/<\w+/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/\s+>\s*$/,action:{indentAction:e.IndentAction.Indent}},{beforeText:/<\/\w+>/,action:{indentAction:e.IndentAction.Outdent}},...Array.from({length:100},(n,t)=>({beforeText:new RegExp(`^${t}\\. .+`),action:{indentAction:e.IndentAction.None,appendText:`${t+1}. `}}))]},s={defaultToken:"",tokenPostfix:".mdx",control:/[!#()*+.[\\\]_`{}\-]/,escapes:/\\@control/,tokenizer:{root:[[/^---$/,{token:"meta.content",next:"@frontmatter",nextEmbedded:"yaml"}],[/^\s*import/,{token:"keyword",next:"@import",nextEmbedded:"js"}],[/^\s*export/,{token:"keyword",next:"@export",nextEmbedded:"js"}],[/<\w+/,{token:"type.identifier",next:"@jsx"}],[/<\/?\w+>/,"type.identifier"],[/^(\s*)(>*\s*)(#{1,6}\s)/,[{token:"white"},{token:"comment"},{token:"keyword",next:"@header"}]],[/^(\s*)(>*\s*)([*+-])(\s+)/,["white","comment","keyword","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(\d{1,9}\.)(\s+)/,["white","comment","number","white"]],[/^(\s*)(>*\s*)(-{3,}|\*{3,}|_{3,})$/,["white","comment","keyword"]],[/`{3,}(\s.*)?$/,{token:"string",next:"@codeblock_backtick"}],[/~{3,}(\s.*)?$/,{token:"string",next:"@codeblock_tilde"}],[/`{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_backtick",nextEmbedded:"$1"}],[/~{3,}(\S+).*$/,{token:"string",next:"@codeblock_highlight_tilde",nextEmbedded:"$1"}],[/^(\s*)(-{4,})$/,["white","comment"]],[/^(\s*)(>+)/,["white","comment"]],{include:"content"}],content:[[/(\[)(.+)(]\()(.+)(\s+".*")(\))/,["","string.link","","type.identifier","string.link",""]],[/(\[)(.+)(]\()(.+)(\))/,["","type.identifier","","string.link",""]],[/(\[)(.+)(]\[)(.+)(])/,["","type.identifier","","type.identifier",""]],[/(\[)(.+)(]:\s+)(\S*)/,["","type.identifier","","string.link"]],[/(\[)(.+)(])/,["","type.identifier",""]],[/`.*`/,"variable.source"],[/_/,{token:"emphasis",next:"@emphasis_underscore"}],[/\*(?!\*)/,{token:"emphasis",next:"@emphasis_asterisk"}],[/\*\*/,{token:"strong",next:"@strong"}],[/{/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}]],import:[[/'\s*(;|$)/,{token:"string",next:"@pop",nextEmbedded:"@pop"}]],expression:[[/{/,{token:"delimiter.bracket",next:"@expression"}],[/}/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],export:[[/^\s*$/,{token:"delimiter.bracket",next:"@pop",nextEmbedded:"@pop"}]],jsx:[[/\s+/,""],[/(\w+)(=)("(?:[^"\\]|\\.)*")/,["attribute.name","operator","string"]],[/(\w+)(=)('(?:[^'\\]|\\.)*')/,["attribute.name","operator","string"]],[/(\w+(?=\s|>|={|$))/,["attribute.name"]],[/={/,{token:"delimiter.bracket",next:"@expression",nextEmbedded:"js"}],[/>/,{token:"type.identifier",next:"@pop"}]],header:[[/.$/,{token:"keyword",next:"@pop"}],{include:"content"},[/./,{token:"keyword"}]],strong:[[/\*\*/,{token:"strong",next:"@pop"}],{include:"content"},[/./,{token:"strong"}]],emphasis_underscore:[[/_/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],emphasis_asterisk:[[/\*(?!\*)/,{token:"emphasis",next:"@pop"}],{include:"content"},[/./,{token:"emphasis"}]],frontmatter:[[/^---$/,{token:"meta.content",nextEmbedded:"@pop",next:"@pop"}]],codeblock_highlight_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_highlight_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/.*$/,"variable.source"]],codeblock_backtick:[[/\s*`{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblock_tilde:[[/\s*~{3,}\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]]}};export{i as conf,s as language};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as e}from"./
|
|
1
|
+
import{p as e}from"./7UPrdiE9.js";const o=[{id:"dialog-state-matrix",title:"Dialog states",states:["closed","open","entering","exiting","focused","disabled-close","destructive-flow","nested-content","long-content","scrolling","compact","zoom-200","outside-dismiss","escape-dismiss","focus-return","reduced-motion"],themes:["light","dark"],viewport:"both",reducedMotion:!0},{id:"dialog-open-state",title:"Dialog open state",states:["open-on-mount","focused","escape-dismiss","focus-return"],themes:["light","dark"],viewport:"both",reducedMotion:!0}];e({id:"dialog",source:"src/lib/components/ui/dialog/index.ts",publicImport:"$lib/components/ui/dialog",legacyImports:[],exports:["Close","Content","Description","Dialog","DialogClose","DialogContent","DialogDescription","DialogFooter","DialogHeader","DialogOverlay","DialogPortal","DialogTitle","DialogTrigger","Footer","Header","Overlay","Portal","Root","Title","Trigger","escapeBelongsToOpenPopup","useDialogPortalTarget"],usage:`<script lang="ts">
|
|
2
2
|
import * as Dialog from '$lib/components/ui/dialog';
|
|
3
3
|
<\/script>
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./
|
|
1
|
+
import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./Ckb6le-m.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),C.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,`
|
|
2
2
|
`),C.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ie=p(()=>O,"getAccDescription"),ae=Y,ne=P,oe={clear:J,setTitle:Y,getTitle:P,addRule:Q,getRules:Z,getRule:V,setAccTitle:ee,getAccTitle:te,setAccDescription:re,getAccDescription:ie,setDiagramTitle:ae,getDiagramTitle:ne},f={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},le=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,se=/^[\w "',.-]+$/,de=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=p(e=>e?Object.keys(e).every(i=>i==="railroad"||de.has(i)):!1,"isRailroadStyleOptions"),ce=p(e=>e?"railroad"in e&&e.railroad?e.railroad:L(e)?e:{}:{},"extractRailroadOverrides"),me=p(e=>{if(!e||L(e))return{};const{railroad:i,svgId:n,theme:a,look:t,...r}=e;return r},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return le.test(n)?n:i},"sanitizeColorValue"),X=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return se.test(n)?n:i},"sanitizeFontFamilyValue"),F=p((e,i)=>{const n=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:i},"sanitizeNumberValue"),he=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),pe=p(e=>{const i=X(e.fontFamily,f.fontFamily),n=he(e.fontSize)??f.fontSize;return{...f,fontFamily:i,fontSize:n,terminalFill:m(e.secondBkg??e.secondaryColor,f.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,f.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,f.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,f.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,f.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,f.nonTerminalTextColor),lineColor:m(e.lineColor,f.lineColor),markerFill:m(e.lineColor,f.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,f.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,f.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,f.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,f.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,f.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,f.ruleNameColor)}},"buildThemeDefaults"),E=p(e=>{const i=_(),n={...G(),...i.themeVariables??{},...me(e)},a=pe(n),t={...i.railroad??{},...ce(e)};return{compactMode:t.compactMode??a.compactMode,padding:F(t.padding,a.padding),verticalSeparation:F(t.verticalSeparation,a.verticalSeparation),horizontalSeparation:F(t.horizontalSeparation,a.horizontalSeparation),arcRadius:F(t.arcRadius,a.arcRadius),fontSize:F(t.fontSize,a.fontSize),fontFamily:X(t.fontFamily,a.fontFamily),terminalFill:m(t.terminalFill,a.terminalFill),terminalStroke:m(t.terminalStroke,a.terminalStroke),terminalTextColor:m(t.terminalTextColor,a.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,a.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,a.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,a.nonTerminalTextColor),lineColor:m(t.lineColor,a.lineColor),strokeWidth:F(t.strokeWidth,a.strokeWidth),markerFill:m(t.markerFill,a.markerFill),commentFill:m(t.commentFill,a.commentFill),commentStroke:m(t.commentStroke,a.commentStroke),commentTextColor:m(t.commentTextColor,a.commentTextColor),specialFill:m(t.specialFill,a.specialFill),specialStroke:m(t.specialStroke,a.specialStroke),ruleNameColor:m(t.ruleNameColor,a.ruleNameColor),showMarkers:t.showMarkers??a.showMarkers,markerRadius:F(t.markerRadius,a.markerRadius)}},"buildRailroadStyleOptions"),Te=p(e=>{const{fontFamily:i,fontSize:n,terminalFill:a,terminalStroke:t,terminalTextColor:r,nonTerminalFill:o,nonTerminalStroke:g,nonTerminalTextColor:l,lineColor:s,strokeWidth:h,markerFill:u,commentFill:c,commentStroke:w,commentTextColor:d,specialFill:T,specialStroke:z,ruleNameColor:S}=E(e);return`
|
|
3
3
|
.railroad-diagram {
|
|
4
4
|
font-family: ${i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as fe}from"./
|
|
1
|
+
import{g as fe}from"./Dr0V5Z_Q.js";import{b as o,ay as te,X as U,aX as ye,ad as be,ah as me,aL as ke,b3 as Ee,O as K,aV as F,ax as _e,J as Se,an as Ne,au as ce,H as le}from"./Ckb6le-m.js";var $=(function(){var e=o(function(O,s,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=s);return n},"o"),h=[1,4],p=[1,13],i=[1,12],d=[1,15],k=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(s,n,r,a,u,t,M){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:G}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:i,14:14,16:d,17:k,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:G}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(s,n){if(n.recoverable)this.trace(s);else{var r=new Error(s);throw r.hash=n,r}},"parseError"),parse:o(function(s){var n=this,r=[0],a=[],u=[null],t=[],M=this.table,c="",W=0,ie=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(s,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var _,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=ae()),x=M[P]&&M[P][_]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+X.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(_==re?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[_]||_,line:b.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(x[0]){case 1:r.push(_),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),_=null,ie=b.yyleng,c=b.yytext,W=b.yylineno,q=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=u[u.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[c,ie,W,R.yy,x[1],u,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(j.$),t.push(j._$),oe=M[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var n=s.length,r=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as gt}from"./
|
|
1
|
+
import{g as gt}from"./Dr0V5Z_Q.js";import{d as mt,g as lt,f as xt,e as kt}from"./D-dukRlA.js";import{U as _t,aZ as vt,V as bt,a_ as wt,Y as Tt,b0 as St,b as s,X as R,aW as H,B as $t,r as Mt,d as it}from"./Ckb6le-m.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,W;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var X="";W=[];for(N in v[A])this.terminals_[N]&&N>yt&&W.push("'"+this.terminals_[N]+"'");_.showPosition?X="Parse error on line "+(C+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+W.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:W})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as t}from"./
|
|
1
|
+
import{m as t}from"./BmTMWrby.js";import"./3SdAC2_C.js";import{bm as n}from"./C0QTy0Sy.js";import"./7UPrdiE9.js";import"./CrD0jtXE.js";import"./DCRuihKm.js";import"./ChTqQfQN.js";import"./B4SiDSWP.js";import"./tr-2J8Mf.js";function L(e){try{const r=new URL(e).hostname.toLowerCase();return r==="daemon.localhost"||r==="client.localhost"}catch{return!1}}const s="browser:resolve-url";function a(e){return typeof e=="object"&&e!==null&&typeof e.url=="string"&&typeof e.rewritten=="boolean"}async function l(e,r){const o={url:e,rewritten:!1};if(!r)return o;try{const i=await r(s,{url:e});return a(i)?i:o}catch{return o}}async function g(e,r){if(!r)return e;try{const o=await r(s,{url:e,mode:"rewrite-only"});return a(o)?o.url:e}catch{return e}}async function c(e){const r=await l(e,typeof window<"u"?window.electronAPI?.invoke:void 0);return r.error&&r.rewritten?r.forbidden?t.error(n.browser_linkOpen_ownerOnlyForward_error()):t.error(n.browser_embedded_resolveFailed_error(),{description:r.error}):r.warning&&t.warning(n.browser_linkOpen_loopbackAmbiguity_warning(),{description:r.warning}),{url:r.url,...r.rewritten&&r.requestedUrl!==void 0?{requestedUrl:r.requestedUrl}:{}}}const h=Object.freeze(Object.defineProperty({__proto__:null,resolveBrowserLinkForOpen:c},Symbol.toStringTag,{value:"Module"}));export{l as a,h as b,g as c,L as i,c as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ni}from"./
|
|
1
|
+
import{g as Ni}from"./B6qvxAO7.js";import{s as Ci}from"./BxVnbYG1.js";import{U as Zs,aZ as jt,V as Qs,a_ as Gt,Y as bi,b0 as vi,b as h,aU as je,ay as _i,X as en,a1 as xi,aP as Mi,bh as wi,aV as Ui,r as Pi,O as Di,am as Fi,W as Bi,ab as $i,aG as ji,aA as Gi,aW as Wi}from"./Ckb6le-m.js";function Wt(s){console&&console.error&&console.error(`Error: ${s}`)}function tn(s){console&&console.warn&&console.warn(`Warning: ${s}`)}function sn(s){const e=new Date().getTime(),t=s();return{time:new Date().getTime()-e,value:t}}function nn(s){function e(){}e.prototype=s;const t=new e;function n(){return typeof t.bar}return n(),n(),s}function Ki(s){return Vi(s)?s.LABEL:s.name}function Vi(s){return typeof s.LABEL=="string"&&s.LABEL!==""}class te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class K extends te{constructor(e){super([]),this.idx=1,Object.assign(this,ie(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class _e extends te{constructor(e){super(e.definition),this.orgText="",Object.assign(this,ie(e))}}class W extends te{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,ie(e))}}class G extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class se extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class ne extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class M extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class q extends te{constructor(e){super(e.definition),this.idx=1,Object.assign(this,ie(e))}}class Z extends te{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,ie(e))}}class k{constructor(e){this.idx=1,Object.assign(this,ie(e))}accept(e){e.visit(this)}}function zi(s){return s.map(at)}function at(s){function e(t){return t.map(at)}if(s instanceof K){const t={type:"NonTerminal",name:s.nonTerminalName,idx:s.idx};return typeof s.label=="string"&&(t.label=s.label),t}else{if(s instanceof W)return{type:"Alternative",definition:e(s.definition)};if(s instanceof G)return{type:"Option",idx:s.idx,definition:e(s.definition)};if(s instanceof se)return{type:"RepetitionMandatory",idx:s.idx,definition:e(s.definition)};if(s instanceof ne)return{type:"RepetitionMandatoryWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof q)return{type:"RepetitionWithSeparator",idx:s.idx,separator:at(new k({terminalType:s.separator})),definition:e(s.definition)};if(s instanceof M)return{type:"Repetition",idx:s.idx,definition:e(s.definition)};if(s instanceof Z)return{type:"Alternation",idx:s.idx,definition:e(s.definition)};if(s instanceof k){const t={type:"Terminal",name:s.terminalType.name,label:Ki(s.terminalType),idx:s.idx};typeof s.label=="string"&&(t.terminalLabel=s.label);const n=s.terminalType.PATTERN;return s.terminalType.PATTERN&&(t.pattern=n instanceof RegExp?n.source:n),t}else{if(s instanceof _e)return{type:"Rule",name:s.name,orgText:s.orgText,definition:e(s.definition)};throw Error("non exhaustive match")}}}function ie(s){return Object.fromEntries(Object.entries(s).filter(([,e])=>e!==void 0))}class xe{visit(e){const t=e;switch(t.constructor){case K:return this.visitNonTerminal(t);case W:return this.visitAlternative(t);case G:return this.visitOption(t);case se:return this.visitRepetitionMandatory(t);case ne:return this.visitRepetitionMandatoryWithSeparator(t);case q:return this.visitRepetitionWithSeparator(t);case M:return this.visitRepetition(t);case Z:return this.visitAlternation(t);case k:return this.visitTerminal(t);case _e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Hi(s){return s instanceof W||s instanceof G||s instanceof M||s instanceof se||s instanceof ne||s instanceof q||s instanceof k||s instanceof _e}function Tt(s,e=[]){return s instanceof G||s instanceof M||s instanceof q?!0:s instanceof Z?s.definition.some(n=>Tt(n,e)):s instanceof K&&e.includes(s)?!1:s instanceof te?(s instanceof K&&e.push(s),s.definition.every(n=>Tt(n,e))):!1}function Xi(s){return s instanceof Z}function ee(s){if(s instanceof K)return"SUBRULE";if(s instanceof G)return"OPTION";if(s instanceof Z)return"OR";if(s instanceof se)return"AT_LEAST_ONE";if(s instanceof ne)return"AT_LEAST_ONE_SEP";if(s instanceof q)return"MANY_SEP";if(s instanceof M)return"MANY";if(s instanceof k)return"CONSUME";throw Error("non exhaustive match")}class kt{walk(e,t=[]){e.definition.forEach((n,i)=>{const a=e.definition.slice(i+1);if(n instanceof K)this.walkProdRef(n,a,t);else if(n instanceof k)this.walkTerminal(n,a,t);else if(n instanceof W)this.walkFlat(n,a,t);else if(n instanceof G)this.walkOption(n,a,t);else if(n instanceof se)this.walkAtLeastOne(n,a,t);else if(n instanceof ne)this.walkAtLeastOneSep(n,a,t);else if(n instanceof q)this.walkManySep(n,a,t);else if(n instanceof M)this.walkMany(n,a,t);else if(n instanceof Z)this.walkOr(n,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const i=t.concat(n);this.walk(e,i)}walkOption(e,t,n){const i=t.concat(n);this.walk(e,i)}walkAtLeastOne(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkAtLeastOneSep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkMany(e,t,n){const i=[new G({definition:e.definition})].concat(t,n);this.walk(e,i)}walkManySep(e,t,n){const i=ys(e,t,n);this.walk(e,i)}walkOr(e,t,n){const i=t.concat(n);e.definition.forEach(a=>{const r=new W({definition:[a]});this.walk(r,i)})}}function ys(s,e,t){return[new G({definition:[new k({terminalType:s.separator})].concat(s.definition)})].concat(e,t)}function Je(s){if(s instanceof K)return Je(s.referencedRule);if(s instanceof k)return qi(s);if(Hi(s))return Yi(s);if(Xi(s))return Ji(s);throw Error("non exhaustive match")}function Yi(s){let e=[];const t=s.definition;let n=0,i=t.length>n,a,r=!0;for(;i&&r;)a=t[n],r=Tt(a),e=e.concat(Je(a)),n=n+1,i=t.length>n;return[...new Set(e)]}function Ji(s){const e=s.definition.map(t=>Je(t));return[...new Set(e.flat())]}function qi(s){return[s.terminalType]}const an="_~IN~_";class Zi extends kt{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const i=ea(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),r=new W({definition:a}),l=Je(r);this.follows[i]=l}}function Qi(s){const e={};return s.forEach(t=>{const n=new Zi(t).startWalking();Object.assign(e,n)}),e}function ea(s,e){return s.name+e+an}function S(s){return s.charCodeAt(0)}function Pt(s,e){Array.isArray(s)?s.forEach(function(t){e.push(t)}):e.push(s)}function Fe(s,e){if(s[e]===!0)throw"duplicate flag "+e;s[e],s[e]=!0}function Se(s){if(s===void 0)throw Error("Internal Error - Should never get here!");return!0}function ta(){throw Error("Internal Error - Should never get here!")}function Rs(s){return s.type==="Character"}const gt=[];for(let s=S("0");s<=S("9");s++)gt.push(s);const At=[S("_")].concat(gt);for(let s=S("a");s<=S("z");s++)At.push(s);for(let s=S("A");s<=S("Z");s++)At.push(s);const Os=[S(" "),S("\f"),S(`
|
|
2
2
|
`),S("\r"),S(" "),S("\v"),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S(" "),S("\u2028"),S("\u2029"),S(" "),S(" "),S(" "),S("\uFEFF")],sa=/[0-9a-fA-F]/,tt=/[0-9]/,na=/[1-9]/;class ia{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Fe(n,"global");break;case"i":Fe(n,"ignoreCase");break;case"m":Fe(n,"multiLine");break;case"u":Fe(n,"unicode");break;case"y":Fe(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Se(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return ta()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:i,atMost:a}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Se(t);break}if(!(e===!0&&t===void 0)&&Se(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Se(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[S(`
|
|
3
3
|
`),S("\r"),S("\u2028"),S("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=gt;break;case"D":e=gt,t=!0;break;case"s":e=Os;break;case"S":e=Os,t=!0;break;case"w":e=At;break;case"W":e=At,t=!0;break}if(Se(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=S("\f");break;case"n":e=S(`
|
|
4
4
|
`);break;case"r":e=S("\r");break;case"t":e=S(" ");break;case"v":e=S("\v");break}if(Se(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:S("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:S(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|