@intent-hq/web 2.342.4 → 2.342.6
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/chunks/{CYkYJCIe.js → 1XQU3Y04.js} +1 -1
- package/web/app/immutable/chunks/{5KtPZQMj.js → 1cBRNdrT.js} +1 -1
- package/web/app/immutable/chunks/{D4m_3H3b.js → 34EP1V4U.js} +1 -1
- package/web/app/immutable/chunks/{t9E12oJ3.js → 3UFVWcav.js} +1 -1
- package/web/app/immutable/chunks/{NM7qy67Z.js → 5MJ74bom.js} +1 -1
- package/web/app/immutable/chunks/{DIw4K70V.js → 8GRPg7Be.js} +1 -1
- package/web/app/immutable/chunks/{Cth8kMss.js → B8esy8Vu.js} +1 -1
- package/web/app/immutable/chunks/{BGxSDng4.js → B9pffw5f.js} +1 -1
- package/web/app/immutable/chunks/{CTCotWuX.js → BAGnnBCG.js} +1 -1
- package/web/app/immutable/chunks/{jqA28ECO.js → BAKJw_70.js} +1 -1
- package/web/app/immutable/chunks/{ClPZ-dnm.js → BAq1pHdg.js} +1 -1
- package/web/app/immutable/chunks/{DV-obrTk.js → BDaNM4HC.js} +1 -1
- package/web/app/immutable/chunks/{DDm2Bs3C.js → BFEnkdqB.js} +1 -1
- package/web/app/immutable/chunks/{CVKwboeu.js → BJL3vZfi.js} +1 -1
- package/web/app/immutable/chunks/{C8qlJ0Ks.js → BKSBgVEt.js} +1 -1
- package/web/app/immutable/chunks/{CFgR764H.js → BLvT7caV.js} +1 -1
- package/web/app/immutable/chunks/{BmytRNPE.js → BNPwBixc.js} +1 -1
- package/web/app/immutable/chunks/{CICfpKca.js → BP-Q7b0i.js} +1 -1
- package/web/app/immutable/chunks/{CpUxooti.js → BPJT_jmR.js} +1 -1
- package/web/app/immutable/chunks/{Cf4bZipG.js → BPnWvR4U.js} +1 -1
- package/web/app/immutable/chunks/{BI2l6wE6.js → BQPPEUu1.js} +1 -1
- package/web/app/immutable/chunks/{7HuWq_hr.js → BTQOjzCX.js} +1 -1
- package/web/app/immutable/chunks/{C8KtEq0s.js → BVtokOo_.js} +1 -1
- package/web/app/immutable/chunks/{CD69NP_A.js → BY6vo3uD.js} +1 -1
- package/web/app/immutable/chunks/{D0LCHW4n.js → BYcqhPVA.js} +2 -2
- package/web/app/immutable/chunks/{B9Rr6BpD.js → BdINg18V.js} +1 -1
- package/web/app/immutable/chunks/{DgtpjRdr.js → BfRwjOCA.js} +1 -1
- package/web/app/immutable/chunks/{uZlZnPJv.js → BfqGTcOP.js} +1 -1
- package/web/app/immutable/chunks/{BtxzFh2d.js → BiJM57Y-.js} +1 -1
- package/web/app/immutable/chunks/{BGqqSLU-.js → BjxSeDhE.js} +2 -2
- package/web/app/immutable/chunks/{LUvhmWrd.js → Bl3ku6zY.js} +1 -1
- package/web/app/immutable/chunks/{BwfLVMMM.js → BlxdQMTv.js} +1 -1
- package/web/app/immutable/chunks/{Ci8LBOxa.js → BmLaJ9xx.js} +1 -1
- package/web/app/immutable/chunks/{BkT4AaId.js → BmZEWeMm.js} +1 -1
- package/web/app/immutable/chunks/{B2sG3ycV.js → BnOitAd5.js} +3 -3
- package/web/app/immutable/chunks/{Dt0R2Ktk.js → BokY6u4h.js} +1 -1
- package/web/app/immutable/chunks/{DgiTVZJP.js → BpIyu9yy.js} +1 -1
- package/web/app/immutable/chunks/{BS1TtWt_.js → BqJU57xs.js} +1 -1
- package/web/app/immutable/chunks/{CQWXQG41.js → Bxcfvdut.js} +1 -1
- package/web/app/immutable/chunks/{D-CZRaat.js → BywpJ9Jr.js} +1 -1
- package/web/app/immutable/chunks/{D5YUYmA3.js → C44zP9aX.js} +1 -1
- package/web/app/immutable/chunks/{5Cz4WZpZ.js → C4EYhr_S.js} +1 -1
- package/web/app/immutable/chunks/{BVg9yzXR.js → C9QANngy.js} +1 -1
- package/web/app/immutable/chunks/{DumOb8FY.js → CBZtJT-n.js} +1 -1
- package/web/app/immutable/chunks/{_d_cQJ1G.js → CCRKTTsT.js} +1 -1
- package/web/app/immutable/chunks/{CmwgdR7R.js → CH88el2F.js} +1 -1
- package/web/app/immutable/chunks/{D-XhH1EI.js → CJ6UQw63.js} +1 -1
- package/web/app/immutable/chunks/{BFw-QJi_.js → CJXKaPZY.js} +1 -1
- package/web/app/immutable/chunks/{DxzBH9If.js → CO4Qh4-v.js} +1 -1
- package/web/app/immutable/chunks/{C3fOi3VT.js → COFMFdMU.js} +1 -1
- package/web/app/immutable/chunks/{ZvX_fEaP.js → CQ4I_Mdn.js} +1 -1
- package/web/app/immutable/chunks/{DOJHO8tY.js → CQx6ZF60.js} +1 -1
- package/web/app/immutable/chunks/{BAKm0uzb.js → CRsmjbca.js} +1 -1
- package/web/app/immutable/chunks/{D2wzgv1F.js → CTGhMPAl.js} +1 -1
- package/web/app/immutable/chunks/{BuvdM8FN.js → CZfVnA69.js} +2 -2
- package/web/app/immutable/chunks/{DfEfJ41H.js → Cdb-RlPf.js} +1 -1
- package/web/app/immutable/chunks/{CNpCGMBp.js → CgAIgZYS.js} +1 -1
- package/web/app/immutable/chunks/{DRUHoPvO.js → CjN3bu3h.js} +1 -1
- package/web/app/immutable/chunks/{CgO3N0Eh.js → Ck2rWFI2.js} +12 -12
- package/web/app/immutable/chunks/{Os4z29kc.js → Co1GOV8m.js} +1 -1
- package/web/app/immutable/chunks/{BGlD6YLC.js → Coekp85l.js} +1 -1
- package/web/app/immutable/chunks/{Dtat8Jyj.js → CrvrVD-n.js} +1 -1
- package/web/app/immutable/chunks/{DYJF6z7c.js → CvYPF82-.js} +4 -4
- package/web/app/immutable/chunks/{BbmXR-SH.js → CwVL3hLj.js} +1 -1
- package/web/app/immutable/chunks/{CxvlNIyu.js → Cxon-xet.js} +1 -1
- package/web/app/immutable/chunks/{CRgdXK-6.js → D1IC4eoI.js} +1 -1
- package/web/app/immutable/chunks/D3QcPFoL.js +18 -0
- package/web/app/immutable/chunks/{C17WHWXN.js → D4BOXNo3.js} +3 -3
- package/web/app/immutable/chunks/{CqND6pvG.js → D5Ky76z6.js} +1 -1
- package/web/app/immutable/chunks/{CyAWaGyu.js → D6fq3jd3.js} +1 -1
- package/web/app/immutable/chunks/{DMIUJOUV.js → D6mwmUlO.js} +2 -2
- package/web/app/immutable/chunks/{Cqu-aR4t.js → D7Rp1YzU.js} +1 -1
- package/web/app/immutable/chunks/{LPPUEsZT.js → D9piAIpK.js} +1 -1
- package/web/app/immutable/chunks/{mS-9NIEA.js → DA09cdDe.js} +4 -4
- package/web/app/immutable/chunks/{CvZnx98i.js → DBkwUnB3.js} +1 -1
- package/web/app/immutable/chunks/{DQDdpgUG.js → DCdtmpaz.js} +1 -1
- package/web/app/immutable/chunks/{Bb4ph25I.js → DEwhJbS-.js} +1 -1
- package/web/app/immutable/chunks/{C_7QOYdw.js → DGu3KEOd.js} +1 -1
- package/web/app/immutable/chunks/{DRlYzKsv.js → DH9p1XHN.js} +1 -1
- package/web/app/immutable/chunks/{Dvj55vXN.js → DHOmmgcl.js} +2 -2
- package/web/app/immutable/chunks/{DEgM7-3u.js → DI_OiaCT.js} +1 -1
- package/web/app/immutable/chunks/{1KURqqMz.js → DJtGLOxa.js} +1 -1
- package/web/app/immutable/chunks/{COgT-EXe.js → DK7bkBKS.js} +1 -1
- package/web/app/immutable/chunks/{DSnMQfNF.js → DKpqyoHF.js} +1 -1
- package/web/app/immutable/chunks/{ChiWSNHv.js → DQzntlzl.js} +3 -3
- package/web/app/immutable/chunks/{B8XCEZm-.js → DS-PgUc7.js} +1 -1
- package/web/app/immutable/chunks/{CFR39oq5.js → DU6dXL8V.js} +1 -1
- package/web/app/immutable/chunks/{BONdHkQs.js → DVBxlkFp.js} +1 -1
- package/web/app/immutable/chunks/{C_hDvi-s.js → DVjUIntK.js} +1 -1
- package/web/app/immutable/chunks/{DB4b4MsO.js → DbPC6tLA.js} +1 -1
- package/web/app/immutable/chunks/{DuD5Wxpm.js → Dcv7OLYk.js} +1 -1
- package/web/app/immutable/chunks/{BeeSTXCF.js → DdbGGrJT.js} +1 -1
- package/web/app/immutable/chunks/{DxtKR96k.js → DerHBx5w.js} +1 -1
- package/web/app/immutable/chunks/{BRm0glkU.js → Dgglyxba.js} +1 -1
- package/web/app/immutable/chunks/{DKTzyP0R.js → Dng3CYSh.js} +1 -1
- package/web/app/immutable/chunks/DqN3eEdL.js +175 -0
- package/web/app/immutable/chunks/{CBR1HO24.js → Dqm94Bm7.js} +1 -1
- package/web/app/immutable/chunks/{C4jx-XZh.js → DqmXJyxa.js} +4 -4
- package/web/app/immutable/chunks/{Bau8iVXk.js → DsnPbcrG.js} +1 -1
- package/web/app/immutable/chunks/{CkMQV99G.js → DtLFy1HX.js} +1 -1
- package/web/app/immutable/chunks/{DUpM6F7J.js → DuHPqQGE.js} +1 -1
- package/web/app/immutable/chunks/{Bj2crfQp.js → Duzuaj0l.js} +1 -1
- package/web/app/immutable/chunks/{L-ubqpH9.js → DxWaTKL0.js} +3 -3
- package/web/app/immutable/chunks/{B6A6cgF-.js → DzGcLQsv.js} +1 -1
- package/web/app/immutable/chunks/{CkPDW0xR.js → F3N2tbK9.js} +1 -1
- package/web/app/immutable/chunks/{PeAPKDUF.js → F9fxsiNO.js} +1 -1
- package/web/app/immutable/chunks/{bijN4Zym.js → G9eRzhXv.js} +1 -1
- package/web/app/immutable/chunks/{BvQPs1Xx.js → H3AlxZF2.js} +1 -1
- package/web/app/immutable/chunks/{ztS7waxk.js → O5gmiwkz.js} +1 -1
- package/web/app/immutable/chunks/{Dc7eHIw9.js → QFw_XNQ-.js} +1 -1
- package/web/app/immutable/chunks/SYPnLWme.js +1 -0
- package/web/app/immutable/chunks/{C4lA6Qko.js → VlZpY_zn.js} +1 -1
- package/web/app/immutable/chunks/{D0ypGvvA.js → XIVGG58R.js} +1 -1
- package/web/app/immutable/chunks/{DjFKdLks.js → Xd2ADnnE.js} +1 -1
- package/web/app/immutable/chunks/{DXeiIMAg.js → Ye026sG_.js} +1 -1
- package/web/app/immutable/chunks/{BtxvvbW8.js → ZuHjZPjN.js} +1 -1
- package/web/app/immutable/chunks/{BnMYxi1T.js → _MlFNRUP.js} +1 -1
- package/web/app/immutable/chunks/_RTfq0v6.js +4 -0
- package/web/app/immutable/chunks/{VPc0uUzO.js → af2M07Jp.js} +1 -1
- package/web/app/immutable/chunks/{8a4AenV7.js → b31Z8LKe.js} +1 -1
- package/web/app/immutable/chunks/{CRVLrgxJ.js → cf3hShp0.js} +1 -1
- package/web/app/immutable/chunks/{3KbBjGJm.js → dF445d6n.js} +1 -1
- package/web/app/immutable/chunks/{zGggXnza.js → ftrEOorZ.js} +2 -2
- package/web/app/immutable/chunks/{CUfd6v40.js → fwxl4rBI.js} +1 -1
- package/web/app/immutable/chunks/{BAdws6Fu.js → gLnFSVct.js} +2 -2
- package/web/app/immutable/chunks/{DdI6xQc_.js → iSPSrAXS.js} +1 -1
- package/web/app/immutable/chunks/{DTnOOoUt.js → iZrGkeHG.js} +1 -1
- package/web/app/immutable/chunks/{CxMzoxX3.js → jJxI_UAc.js} +1 -1
- package/web/app/immutable/chunks/{CUMVOvj8.js → jpkdFrp6.js} +1 -1
- package/web/app/immutable/chunks/{DEpTpabV.js → k5gd82i4.js} +1 -1
- package/web/app/immutable/chunks/{DkqCzXww.js → mO0YX6Up.js} +1 -1
- package/web/app/immutable/chunks/{DwdKjBer.js → o3OBOoSf.js} +1 -1
- package/web/app/immutable/chunks/{CEhJvA02.js → q8sNwmKq.js} +1 -1
- package/web/app/immutable/chunks/{B1NzFEuO.js → r7GEgyab.js} +2 -2
- package/web/app/immutable/chunks/{B1cObw1z.js → rqpOGBN5.js} +1 -1
- package/web/app/immutable/chunks/{H0MOjDP3.js → u9XHqibz.js} +1 -1
- package/web/app/immutable/chunks/{D78kBZDL.js → wMidnPXT.js} +3 -3
- package/web/app/immutable/chunks/{WIMBPpA0.js → zzo-K1GZ.js} +1 -1
- package/web/app/immutable/entry/{app.4WfHy_Zl.js → app.F7HSlLyZ.js} +2 -2
- package/web/app/immutable/entry/start.CUFDKLDi.js +1 -0
- package/web/app/immutable/nodes/{0.vO0Tybn6.js → 0.Bl0xo6es.js} +1 -1
- package/web/app/immutable/nodes/{1.Bfh_ynUg.js → 1.BIjEngSs.js} +1 -1
- package/web/app/immutable/nodes/{10.CbLOWaiK.js → 10.CxhXAvUx.js} +1 -1
- package/web/app/immutable/nodes/{14.CgOJLuna.js → 14.CgIrR2xa.js} +1 -1
- package/web/app/immutable/nodes/{17.CeWDuaDv.js → 17.B_Cve8Oj.js} +2 -2
- package/web/app/immutable/nodes/{2.BJIFazOq.js → 2.Lo576kSK.js} +4 -4
- package/web/app/immutable/nodes/{3.BfaIoPwI.js → 3.KCA5aN-y.js} +1 -1
- package/web/app/immutable/nodes/{4.CIKjzhEc.js → 4.BA93tNs_.js} +1 -1
- package/web/app/immutable/nodes/{5.D0xlWd9R.js → 5.CK2zLy3y.js} +1 -1
- package/web/app/immutable/nodes/{6.CXDD93jK.js → 6.Cv46jHXT.js} +1 -1
- package/web/app/immutable/nodes/{7.Om4HLRbN.js → 7.Cy3olq8_.js} +1 -1
- package/web/app/immutable/nodes/{8.3MB3X1xo.js → 8.DzgEjwaM.js} +4 -4
- package/web/app/immutable/nodes/{9.CawzZbso.js → 9.Ddzgkod6.js} +4 -4
- package/web/app/version.json +1 -1
- package/web/index.html +9 -9
- package/web/app/immutable/chunks/CAZtHQBF.js +0 -175
- package/web/app/immutable/chunks/CKJ3ApuI.js +0 -1
- package/web/app/immutable/chunks/Cg2SHWhQ.js +0 -18
- package/web/app/immutable/chunks/CpMT4a7n.js +0 -4
- package/web/app/immutable/entry/start.gUgDD-in.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/
|
|
2
|
-
var Ua=Object.defineProperty;var Ba=(a,t,r)=>t in a?Ua(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var dt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bp as C,t as rt,br as y,a_ as re,bz as nt,b as st,bt as Va,bv as Jt,_ as ka}from"./DXyyWeag.js";import{bs as ot,a5 as N,aD as e,bA as T,b_ as X,W,bn as it,c9 as E,aA as x,aB as B,ca as yt,bk as ya,c6 as Ka,cd as Ht,bV as oe,bS as z,ay as Ee,bl as me,bO as be,ai as xa,a7 as xt,c0 as ja,bf as Ot,bH as O,aw as Be,aj as Se,aC as Ga,c3 as ft,bb as St,aF as Ya,br as Za,bj as Ja}from"./DYhIMPy1.js";import{j as Qa,l as Xa,v as Pe,w as pt,u as $,g as tt,n as Ut,p as $a}from"./CjaOLL1c.js";import{aO as er,cY as tr,M as ar,aw as rr,dm as nr,W as sr,dr as Aa,C as or,a0 as ir}from"./Cg2SHWhQ.js";import{t as Bt}from"./4NMrKcis.js";import{a9 as cr,ao as lr,A as dr,n as ur,a5 as Ia,s as Vt,a4 as Kt,aJ as At,b5 as Ma,m as fr,aL as pr,b4 as mr}from"./CAZtHQBF.js";import{l as Qt}from"./C17WHWXN.js";import{bV as gr,bS as vr,bT as Xt,aB as hr}from"./BAKm0uzb.js";import{t as ut,P as br}from"./CX_KiszT.js";import{f as jt,bc as qt}from"./Bfr1QjPr.js";import{t as Ve,v as wr,I as Ct,F as $t,c as ea}from"./BboIV5H5.js";import{ry as Ca,Iy as we,mq as _r,fF as kr,nk as yr,ul as xr,a as Ar,vX as Ir,t0 as Mr,rg as Cr,g as Sr,be as ta,v2 as Rr,sH as Er,v4 as Pr}from"./D5ej8a-y.js";import{c as Tr,l as bt}from"./ChTqQfQN.js";import{o as Fr}from"./DEgM7-3u.js";import{aN as Lr,aO as aa,by as Wr,ax as Nr,bx as Hr,aC as Or,c_ as qr,cO as Dr,F as wt,au as ra,bG as zr,bB as Ur}from"./BTdkHPOB.js";import{l as Br}from"./DHQOuksI.js";import{p as Vr,c_ as _t,cZ as na,ao as Kr,d0 as Sa,a8 as Et,aE as Ra,aV as jr,aw as Gr,a7 as sa,r as Yr,aM as Zr,aR as Jr,F as Qr}from"./CUfd6v40.js";import{s as Rt}from"./Cuqq8bL5.js";import{b as at}from"./BaIAhI85.js";import{s as Xr}from"./BsieX9dN.js";import{c as $r,u as en,s as tn,a as an}from"./DfxQWSVU.js";import{z as oa,x as ia}from"./CpMT4a7n.js";import{g as ca}from"./B5m4HK_m.js";import{n as la}from"./ChkzKl5W.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:qr,className:"text-danger"},needs_attention:{visual:"icon",icon:Or,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Hr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Nr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return C.workspace_statusIcon_failed_label();case"blocked":return C.workspace_statusIcon_blocked_label();case"needs_attention":return C.workspace_statusIcon_needsAttention_label();case"in_progress":return C.workspace_statusIcon_inProgress_label();case"waiting":return C.workspace_taskStatus_waiting_label();case"unread":return C.layout_activeCard_unread_header();case"not_started":return C.workspace_statusIcon_notStarted_label();case"idle":return C.workspace_statusIcon_idle_label();case"complete":return C.workspace_statusIcon_complete_label();case"pr_queued":return C.workspace_statusIcon_prQueued_label();case"pr_ready":return C.workspace_statusIcon_prReady_label();case"pr_open":return C.workspace_statusIcon_prOpen_label();case"pr_merged":return C.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=B('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=B("<span><!></span>");function Pa(a,t){if(new.target)return rt({component:Pa,...a});ot(t,!0);let r=y(t,"status",7),d=y(t,"size",7,14),c=y(t,"decorative",7,!1),u=y(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),x()},get size(){return d()},set size(m=14){d(m),x()},get decorative(){return c()},set decorative(m=!1){c(m),x()},get class(){return u()},set class(m){u(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},v=ln(),_=N(v);{var b=m=>{var w=cn();W(m,w)},A=m=>{wt(m,{get icon(){return e(s).icon},class:"size-full!"})};re(_,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(A,1)})}return T(v),X(m=>{Pe(v,1,m,"svelte-14zk5l0"),pt(v,`width: ${d()??""}px; height: ${d()??""}px;`),$(v,"role",c()?void 0:"img"),$(v,"aria-label",c()?void 0:e(s).accessibleName),$(v,"aria-hidden",c()?"true":void 0),$(v,"title",c()?void 0:e(s).tooltip),$(v,"data-workspace-status",e(s).state),$(v,"data-workspace-status-visual",e(s).visual),$(v,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Qa(Xa("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),W(a,v),it(o)}const Gt=6e4,Yt=60*Gt,Zt=24*Yt,da=30*Zt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),d=r.getTime(),c=t.getTime();if(!Number.isFinite(d)||!Number.isFinite(c))return null;const u=Math.max(0,c-d);let s;u<Gt?s="<1m":u<Yt?s=`${Ve(Math.floor(u/Gt))}m`:u<Zt?s=`${Ve(Math.floor(u/Yt))}h`:u<da?s=`${Ve(Math.floor(u/Zt))}d`:s=`${Ve(Math.floor(u/da))}mo`;const o=d>c?t:r,v=wr(o,{now:t});return v?{compact:s,accessible:v,dateTime:r.toISOString()}:null}var un=B('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=B('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=B('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=B('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=B('<div role="listitem"><!></div>'),gn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=B('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=B('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=B('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=B('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=B('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=B('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=B('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return rt({component:An,...a});ot(t,!0);const r=()=>Jt(F,"$workspaceAgents$",c),d=()=>Jt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=y(t,"workspace",7),v=y(t,"isLoading",7,!1),_=y(t,"activeAgentIds",23,()=>[]),b=y(t,"loadAgentSessions",7,!0),A=y(t,"onkeydown",7),m=y(t,"staticData",7,!1);const w=Ht("");function q(){return m()?Ht([]):er(w)}function V(){return m()?Ht([]):tr(w)}const F=q(),i=V();yt(()=>w.set(o()?.id??""));let p=oe(0);ya(()=>Qt.subscribe(()=>Ka(p)));let k=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?Qt.getStreamingAgentIdsForWorkspace(o().id):[])),U=null,K=new Set;yt(()=>{if(!o()||!b())return;const l=String(o().id);U!==l&&(U=l,K=new Set);for(const M of new Set([...e(k).slice(0,6),..._(),...e(P)]))K.has(M)||(we.dispatch(_r(l,M)),K.add(M))});function ne(l){return[l.name,l.context,l.questionMeta?.accessible,l.updated.accessible].filter(Boolean).join(". ")}function Le(l){return l?l.kind==="attention"?l.attention.reason?.trim()||null:"text"in l&&l.text.trim()||null:null}function le(l){return dn(l.lastActivity||l.updatedAt||l.createdAt)??{compact:"—",accessible:C.workspace_hoverCard_noRecentActivity_label()}}function ie(l){const M=String(l.status).toLowerCase(),L=yr(l),Q=lr(l),ye=Q==="question"?gr(l):null,he=Le(rr.select(we.state,String(l.id)));let xe,Ne,Ae,n,f,H,S=!1;if(Q==="question"){xe="attention",Ne="question",Ae=ye?.questions[0]?.question.trim()||he||C.workspace_hoverCard_question_label(),n="question",f=1;const G=ye?.questions.length??0;G>1&&(H={compact:`${Ve(1)}/${Ve(G)}`,accessible:C.chat_questionWizard_stepCounter_label({current:1,total:G})})}else if(Q==="attention-discussion")xe="attention",Ne="discussion",Ae=L?.reason?.trim()||C.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(Q==="attention-blocker"||M==="blocked")xe="attention",Ne="blocker",Ae=L?.reason?.trim()||C.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(l.hasUnread)xe="attention",Ne="unread",Ae=he||C.chat_newMessagesDivider_label(),S=!!he,n="unread",f=2;else if(l.isStreaming||l.isProcessing||_().includes(String(l.id))||e(P).includes(String(l.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(M))xe="active",Ae=he||C.workspace_devScripts_running_label(),S=!!he,n=l.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(M))xe="waiting",Ae=he||C.workspace_taskStatus_waiting_label(),S=!!he,n="waiting",f=4;else return null;const Y=l.agentMetadata??l.metadata;return{id:String(l.id),name:l.name?.trim()||C.workspace_fileChanges_agent_label(),group:xe,attentionKind:Ne,avatarState:n,specialist:Y?.specialist,context:Ae,questionMeta:H,contextIsPreview:S,updated:le(l),priority:f}}let ge=E(()=>{const l=o()?.agentSummary,M=new Map;if(Array.isArray(l?.agents))for(const L of l.agents)L&&typeof L=="object"&&typeof L.id=="string"&&M.set(L.id,L.parentAgentId);return r().filter(L=>{const Q=M.get(String(L.id));return!(kr(L)!=="topLevel"||typeof Q=="string"&&Q||L.pendingDeleteAt||L.retiredAt||String(L.status).toLowerCase()==="deleted")})}),_e=E(()=>e(ge).map(ie).filter(l=>l!==null).sort((l,M)=>l.priority-M.priority)),Ge=E(()=>e(_e).slice(0,6)),I=E(()=>Math.max(0,e(_e).length-6)),ee=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:C.workspace_hoverCard_localRepository_label()),Re=E(()=>on(o()??{})),ve=E(()=>Ea(e(Re))),ce=E(()=>o()?.statusMessage?.trim()||"");function ke(l){if(!l)return null;const M=l.activePullRequest??l.pullRequests?.[0]??null;return M||(l.prStatus?{id:`legacy-pr-${l.prNumber??"workspace"}`,number:l.prNumber??0,url:l.prUrl??"",title:C.workspace_hoverCard_pullRequest_label(),status:l.prStatus,createdAt:l.updatedAt,updatedAt:l.updatedAt}:null)}let We=E(()=>o()?m()?ke(o()):nr.select(we.state,o().id)??ke(o()):null),de=E(()=>{if(!o()||ar(o()))return[];const l=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(We),monitors:d(),workspaceRepo:l,buildPrUrl:(M,L)=>Vr(M,o().repositoryOwner,o().repositoryName,L),getDisplayTitle:M=>M.title})}),Ze=E(()=>e(de).slice(0,3)),Te=E(()=>Math.max(0,e(de).length-3)),se=E(()=>e(_e).length>0),qe=E(()=>e(de).length>0),h=E(()=>e(se)||e(qe));function g(l){const M=l.resource?.repository.provider==="gitlab"?`${l.repo} !${l.number}`:l.repo?C.workspace_card_prBadge_repoLine_tooltip({repo:l.repo,number:l.number}):C.workspace_card_prBadge_label({number:` #${l.number}`});return[sr(M,l),l.title,l.details].filter(Boolean).join(`
|
|
3
|
-
`)}function J(l,M){if(l.stopPropagation(),!o()||!b())return;const L=o().id;Br.select(we.state)!==L&&Fr(L).catch(Q=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:M,error:Q})}),we.dispatch(xr(L,{agentId:M}))}function D(l,M){if(l.stopPropagation(),!o()||!M.url)return;const L=o().id;ka(async()=>{const{handleLink:Q}=await import("./CpMT4a7n.js").then(ye=>ye.H);return{handleLink:Q}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]),import.meta.url).then(({handleLink:Q})=>Q(M.url,{workspaceId:L,event:l}))}var ae={get workspace(){return o()},set workspace(l){o(l),x()},get isLoading(){return v()},set isLoading(l=!1){v(l),x()},get activeAgentIds(){return _()},set activeAgentIds(l=[]){_(l),x()},get loadAgentSessions(){return b()},set loadAgentSessions(l=!0){b(l),x()},get onkeydown(){return A()},set onkeydown(l){A(l),x()},get staticData(){return m()},set staticData(l=!1){m(l),x()},$set:nt,$on:(l,M)=>st(t,l,M)},ue=xn(),j=N(ue);{var Ie=l=>{var M=un(),L=N(M),Q=N(L),ye=N(Q);ut(ye,{class:"h-7 min-w-0 max-w-64 flex-1"});var he=z(ye,2);ut(he,{class:"h-5 w-20 shrink-0"}),T(Q);var xe=z(Q,2);ut(xe,{class:"h-4 w-40"});var Ne=z(xe,2);ut(Ne,{class:"mt-2 h-10 w-full"}),T(L);var Ae=z(L,4),n=N(Ae),f=N(n);ut(f,{class:"h-10 w-full"}),T(n);var H=z(n,2),S=N(H);ut(S,{class:"h-10 w-full"}),T(H),T(Ae),T(M),W(l,M)},Fe=l=>{var M=yn(),L=Ee(M);let Q;var ye=N(L),he=N(ye),xe=N(he),Ne=me(xe,!0),Ae=z(xe,2),n=N(Ae),f=me(n,!0),H=z(n);Pa(H,{get status(){return e(Re)},size:16,decorative:!0}),T(Ae),T(he);var S=z(he,2),Y=me(S,!0),G=z(S,2);{var te=pe=>{var ze=fn(),It=me(ze,!0);tt(ze,(Mt,Pt)=>Bt?.(Mt,Pt),()=>e(ce)),X(()=>be(It,e(ce))),W(pe,ze)};re(G,pe=>{e(ce)&&pe(te)})}T(ye),T(L);var He=z(L,2);{var fe=pe=>{var ze=kn(),It=z(Ee(ze),2),Mt=N(It);{var Pt=Je=>{var Ke=vn(),Ye=N(Ke);Ut(Ye,21,()=>e(Ge),Z=>Z.id,(Z,R)=>{var Me=ua(),Qe=N(Me);{let Xe=E(()=>ne(e(R)));jt(Qe,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Xe)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return A()},onclick:je=>J(je,e(R).id),children:(je,mt)=>{var Oe=mn(),Ce=Ee(Oe),Ue=N(Ce);{let et=E(()=>e(R).specialist??null);dr(Ue,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(et)}})}T(Ce);var ct=z(Ce),Lt=me(ct,!0),$e=z(ct),Wt=me($e,!0),gt=z($e,2),vt=N(gt),Nt=me(vt,!0);tt(vt,(et,lt)=>Bt?.(et,lt),()=>e(R).context);var Oa=z(vt);{var qa=et=>{var lt=pn(),Da=N(lt),za=me(Da,!0);T(lt),X(()=>{$(lt,"aria-label",e(R).questionMeta.accessible),be(za,e(R).questionMeta.compact)}),W(et,lt)};re(Oa,et=>{e(R).questionMeta&&et(qa)})}T(gt),X(()=>{be(Lt,e(R).name),$($e,"datetime",e(R).updated.dateTime),$($e,"aria-label",e(R).updated.accessible),be(Wt,e(R).updated.compact),$(gt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),be(Nt,e(R).context)}),W(je,Oe)},$$slots:{default:!0}})}T(Me),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=gn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreAgents_label({count:Ve(e(I))})]),W(Z,R)};re(Tt,Z=>{e(I)&&Z(Ft)})}T(Ke),X(Z=>$(Ke,"aria-label",Z),[()=>C.workspace_multiSelectSidebar_agentsTab_label()]),W(Je,Ke)};re(Mt,Je=>{e(se)&&Je(Pt)})}var Na=z(Mt,2);{var Ha=Je=>{var Ke=_n(),Ye=N(Ke);Ut(Ye,21,()=>e(Ze),Z=>Z.identity,(Z,R)=>{var Me=ua();{const mt=Oe=>{var Ce=hn(),Ue=Ee(Ce);wt(Ue,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var ct=z(Ue,2),Lt=me(ct,!0),$e=z(ct,2),Wt=me($e,!0),gt=z($e,2),vt=me(gt,!0);X(Nt=>{be(Lt,Nt),be(Wt,e(R).accessibleStateLabel),be(vt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?C.workspace_hoverCard_mergeRequest_label():C.workspace_hoverCard_pullRequest_label())]),W(Oe,Ce)};var Qe=N(Me);{var Xe=Oe=>{{let Ce=E(()=>g(e(R)));jt(Oe,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Ce)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return A()},onclick:Ue=>D(Ue,e(R)),children:(Ue,ct)=>{mt(Ue)},$$slots:{default:!0}})}},je=Oe=>{var Ce=bn(),Ue=N(Ce);mt(Ue),T(Ce),X(()=>{$(Ce,"data-pr-identity",e(R).identity),$(Ce,"data-pr-status",e(R).status)}),W(Oe,Ce)};re(Qe,Oe=>{e(R).url?Oe(Xe):Oe(je,-1)})}T(Me)}X(mt=>$(Me,"aria-label",mt),[()=>e(R).url?void 0:g(e(R))]),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=wn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreItems_label({count:Ve(e(Te))})]),W(Z,R)};re(Tt,Z=>{e(Te)&&Z(Ft)})}T(Ke),X((Z,R)=>{$(Ke,"aria-label",Z),$(Ye,"aria-label",R)},[()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label(),()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label()]),W(Je,Ke)};re(Na,Je=>{e(qe)&&Je(Ha)})}T(It),W(pe,ze)};re(He,pe=>{e(h)&&pe(fe)})}X(pe=>{Q=Pe(L,1,"min-w-0 px-5 pt-4",null,Q,{"pb-4":!e(h)}),be(Ne,pe),be(f,e(ve).label),be(Y,e(ee))},[()=>o().title||C.workspace_links_untitled_label()]),W(l,M)};re(j,l=>{v()||!o()?l(Ie):l(Fe,-1)})}T(ue),W(a,ue);var De=it(ae);return u(),De}const fa=800,Rs=175,In=300;function Mn(){let a=0,t=null;const r=new Set,d=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(v=>v(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return d.add(o),()=>d.delete(o)},settleDeferredCloses(){const o=[...d];d.clear(),o.forEach(v=>v())},reset(){const o=c()!==fa;s(),a=0,d.clear(),o&&u()}}}const Es=Mn();function Dt(a){const t=Aa.select(we.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Dt(a))return[];const r=vr.select(we.state,a),d=Xt.select(we.state,a),c=hr.select(we.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],v=o&&o!==a?Aa.select(we.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:v?C.workspace_card_assignOccupiedMicroKey_label({number:Ve(s+1),title:v.title}):C.workspace_card_assignMicroKeyNumber_label({number:Ve(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Dt(a)&&we.dispatch(Ir(s,a)),t()}})}return d!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:C.workspace_card_unassignMicroKey_label(),onClick:()=>{Dt(a)&&Xt.select(we.state,a)===d&&we.dispatch(Mr(d)),t()}})),u}function Ps(a,{connected:t,onClose:r}){if(!t)return[];const d=Cn(a,r);if(d.length===0)return[];const c=d.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=d.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:C.workspace_card_assignMicroKey_label(),icon:zr,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=B('<div data-static-position="" role="tooltip"><!></div>'),pa=B('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return rt({component:Rn,...a});ot(t,!0);let r=y(t,"id",7),d=y(t,"anchor",7),c=y(t,"position",7,"right"),u=y(t,"absolute",7,!1),s=y(t,"anchorElement",7,null),o=y(t,"staticPosition",7,!1),v=y(t,"class",7,""),_=y(t,"children",7),b=y(t,"onmouseenter",7),A=y(t,"onmouseleave",7),m=y(t,"onfocusin",7),w=y(t,"onfocusout",7);const q=$r(en()+2);tn(q);const V=an(q),F=8,i=4;let p=oe(null),k=oe(""),P=oe(void 0);const U=E(()=>c()==="bottom-right"||c()==="bottom-left"),K=E(()=>c()==="top"),ne=E(()=>o()?"relative":u()?"absolute":"fixed"),Le=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(K)?{x:0,y:4}:{x:0,y:-4});function le(h,g,J){return Math.max(g,Math.min(J,h))}let ie=null,ge=null;function _e(){return!ie?.isConnected||ge!==d()?!1:ie.style.getPropertyValue("anchor-name").includes(d())||getComputedStyle(ie).getPropertyValue("anchor-name").includes(d())}function Ge(){return s()?s():(_e()||(ie=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(h=>{const g=h.style.getPropertyValue("anchor-name"),J=getComputedStyle(h).getPropertyValue("anchor-name");return g.includes(d())||J.includes(d())})??null,ge=ie?d():null),ie)}function I(){if(o()||u()||!e(p))return;const h=Ge();if(!h)return;const g=h.getBoundingClientRect(),J=e(p).getBoundingClientRect(),D=window.innerWidth||document.documentElement.clientWidth,ae=window.innerHeight||document.documentElement.clientHeight,ue=J.width||e(p).offsetWidth,j=J.height||e(p).offsetHeight,Ie=Math.max(0,g.top-i-F),Fe=Math.max(0,ae-g.bottom-i-F),De=e(K)?!(Ie<j&&Fe>Ie):e(U)&&Fe<j&&Ie>Fe;let l=g.left,M=g.bottom+i,L=De?Ie:Fe;if(c()==="right"){const Q=g.left-i-F,ye=D-g.right-i-F;l=ye>=ue||ye>=Q?g.right+i:g.left-ue-i,M=g.top,L=Math.max(0,ae-F*2)}else c()==="bottom"?(l=g.left-ue-i,M=g.bottom-j):(e(K)||e(U))&&(c()==="bottom-left"?l=g.right-ue:e(K)&&(l=g.left+g.width/2-ue/2),M=De?g.top-Math.min(j,L)-i:g.bottom+i);l=le(l,F,Math.max(F,D-ue-F)),M=le(M,F,Math.max(F,ae-Math.min(j,L)-F)),O(P,`${L}px`),O(k,`left: ${l}px; top: ${M}px;`)}let ee=!1;async function Re(){ee||(ee=!0,await ja(),ee=!1,I())}let ve=null;function ce(){ve||(ve=Xr(()=>{ve=null,I()}))}function ke(h){const g=s()??(_e()?ie:null);g&&h.target instanceof Node&&!h.target.contains(g)||ce()}yt(()=>{const h=e(p),g=s();o()||u()||!h||!g||Re()}),ya(()=>{if(o())return;let h=null;return Re().then(()=>{if(!u()&&typeof ResizeObserver<"u"){h=new ResizeObserver(ce),e(p)&&h.observe(e(p));const g=Ge();g&&h.observe(g)}}),window.addEventListener("resize",ce),window.addEventListener("scroll",ke,!0),()=>{h?.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("scroll",ke,!0),ve?.(),ve=null}});var We={get id(){return r()},set id(h){r(h),x()},get anchor(){return d()},set anchor(h){d(h),x()},get position(){return c()},set position(h="right"){c(h),x()},get absolute(){return u()},set absolute(h=!1){u(h),x()},get anchorElement(){return s()},set anchorElement(h=null){s(h),x()},get staticPosition(){return o()},set staticPosition(h=!1){o(h),x()},get class(){return v()},set class(h=""){v(h),x()},get children(){return _()},set children(h){_(h),x()},get onmouseenter(){return b()},set onmouseenter(h){b(h),x()},get onmouseleave(){return A()},set onmouseleave(h){A(h),x()},get onfocusin(){return m()},set onfocusin(h){m(h),x()},get onfocusout(){return w()},set onfocusout(h){w(h),x()},$set:nt,$on:(h,g)=>st(t,h,g)},de=xt(),Ze=Ee(de);{var Te=h=>{var g=Sn(),J=N(g);Rt(J,()=>_()??Ot),T(g),at(g,D=>O(p,D),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(g,"data-surface-level",q)}),W(h,g)},se=h=>{var g=pa();let J;var D=N(g);Rt(D,()=>_()??Ot),T(g),at(g,ae=>O(p,ae),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${V} `+v()),$(g,"data-surface-level",q),J=pt(g,"",J,{"position-anchor":d(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(U)?"anchor(left)":e(K)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(U)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(K)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(U)?"4px":void 0,"margin-bottom":e(K)?"4px":void 0,translate:e(K)?"-50% 0":void 0})}),Be("mouseenter",g,function(...ae){b()?.apply(this,ae)}),Be("mouseleave",g,function(...ae){A()?.apply(this,ae)}),Se("focusin",g,function(...ae){m()?.apply(this,ae)}),Se("focusout",g,function(...ae){w()?.apply(this,ae)}),Ct(1,g,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,g,()=>ea,()=>({tier:"fast"})),W(h,g)},qe=h=>{br(h,{zIndex:50,children:(g,J)=>{var D=pa();let ae;var ue=N(D);Rt(ue,()=>_()??Ot),T(D),at(D,j=>O(p,j),()=>e(p)),X(()=>{$(D,"id",r()),Pe(D,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(D,"data-surface-level",q),ae=pt(D,e(k),ae,{"max-height":e(P)})}),Be("mouseenter",D,function(...j){b()?.apply(this,j)}),Be("mouseleave",D,function(...j){A()?.apply(this,j)}),Se("focusin",D,function(...j){m()?.apply(this,j)}),Se("focusout",D,function(...j){w()?.apply(this,j)}),Ct(1,D,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,D,()=>ea,()=>({tier:"fast"})),W(g,D)},$$slots:{default:!0}})};re(Ze,h=>{o()?h(Te):u()?h(se,1):h(qe,-1)})}return W(a,de),it(We)}xa(["focusin","focusout"]);function kt(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const d of r.content.querySelectorAll("img, video")){const c=d.getAttribute("src")||d.getAttribute("data-media-src")||"",u=[...d.querySelectorAll("source")];if(!kt(c,!1)||u.some(o=>!kt(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",d.getAttribute("alt")||d.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),d.replaceWith(o);continue}d.removeAttribute("srcset");const s=d.getAttribute("poster");s&&!kt(s,!1)&&d.removeAttribute("poster")}return r.innerHTML}const Pn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Tn(a){return a&&(Pn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=B("<!> <!>",1);function Ta(a,t){if(new.target)return rt({component:Ta,...a});ot(t,!0);let r=y(t,"workspaceId",7),d=y(t,"canUseMedia",7),c=oe(null),u=oe(null),s=oe(!1),o=oe(!1);function v(k){O(c,{url:k.getAttribute("src")||"",name:k.getAttribute("alt")||void 0,opener:k},!0),O(s,!0)}function _(k){const P=na(k.getAttribute("href")||"",r());return P&&d()(P)?(O(c,{url:P,name:k.textContent?.trim()||void 0,opener:k,assetLink:!0},!0),O(s,!0),!0):b(k)}function b(k){const P=_t(k.getAttribute("href")||"",r());return!P||!d()(P.url)?!1:(O(u,{url:P.url,mimeType:P.mimeType,name:k.textContent?.trim()||void 0,opener:k},!0),O(o,!0),!0)}yt(()=>{e(u)&&!_t(e(u).url,r())&&(O(o,!1),O(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(O(s,!1),O(c,null))});var A={openImage:v,openAsset:_,get workspaceId(){return r()},set workspaceId(k){r(k),x()},get canUseMedia(){return d()},set canUseMedia(k){d(k),x()},$set:nt,$on:(k,P)=>st(t,k,P)},m=Fn(),w=Ee(m);{var q=k=>{ur(k,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(P){O(s,P,!0)}})},V=E(()=>e(c)&&d()(e(c).url));re(w,k=>{e(V)&&k(q)})}var F=z(w,2);{var i=k=>{Ia(k,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(P){O(o,P,!0)}})},p=E(()=>e(u)&&_t(e(u).url,r())&&d()(e(u).url));re(F,k=>{e(p)&&k(i)})}return W(a,m),it(A)}var Ln=B('<div class="flex items-center gap-2"><!> <!></div>'),Wn=Ga('<svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg>'),Nn=B('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><!></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span><svg viewBox="0 0 20 20" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Hn=B("<div><!> <!></div>"),On=B('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return rt({component:Fa,...a});ot(t,!0);let r=y(t,"source",7),d=y(t,"name",23,()=>C.chat_videoBlock_fromAgent_label()),c=y(t,"poster",7),u=y(t,"allowFileMedia",7,!0),s=y(t,"canOpenFile",7),o=y(t,"fluid",7,!1),v=y(t,"compact",7,!1),_=y(t,"compactPreview",7),b=oe(!1),A=oe(!1),m=oe(!1),w=oe(null);const q=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function V(I){return kt(I,u()&&s()?.()!==!1)}const F=E(()=>!V(e(q))),i=E(()=>At(e(q))),p=E(()=>{if(!(!c()||!V(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const I=new URL(c());return(I.protocol==="https:"||I.protocol==="workspace-file:")&&!I.username&&!I.password?c():void 0}catch{return}}});function k(){O(A,!0),O(m,!1)}var P={get source(){return r()},set source(I){r(I),x()},get name(){return d()},set name(I=C.chat_videoBlock_fromAgent_label()){d(I),x()},get poster(){return c()},set poster(I){c(I),x()},get allowFileMedia(){return u()},set allowFileMedia(I=!0){u(I),x()},get canOpenFile(){return s()},set canOpenFile(I){s(I),x()},get fluid(){return o()},set fluid(I=!1){o(I),x()},get compact(){return v()},set compact(I=!1){v(I),x()},get compactPreview(){return _()},set compactPreview(I){_(I),x()},$set:nt,$on:(I,ee)=>st(t,I,ee)},U=On(),K=Ee(U);let ne;var Le=N(K);{var le=I=>{Vt(I,{get name(){return d()},reason:"load-failed"})},ie=I=>{var ee=Ln(),Re=N(ee);{let ce=E(()=>e(i)?.path),ke=E(()=>e(i)?.workspaceId);Vt(Re,{get name(){return d()},reason:"load-failed",get path(){return e(ce)},get workspaceId(){return e(ke)}})}var ve=z(Re,2);Kt(ve,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),T(ee),W(I,ee)},ge=I=>{var ee=Hn();let Re;var ve=N(ee);{let We=E(()=>C.chat_videoBlock_play_ariaLabel({name:d()}));jt(ve,{wrapContent:!1,type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(We)},"data-testid":"chat-video-snapshot",onclick:()=>{V(e(q))&&O(b,!0)},get ref(){return e(w)},set ref(de){O(w,de,!0)},children:(de,Ze)=>{var Te=xt(),se=Ee(Te);{var qe=g=>{var J=xt(),D=Ee(J);Rt(D,_),W(g,J)},h=g=>{var J=Nn(),D=Ee(J),ae=N(D);{var ue=l=>{var M=Wn();W(l,M)};re(ae,l=>{o()||l(ue)})}T(D);var j=z(D,2);j.muted=!0;var Ie=z(j,2),Fe=N(Ie),De=me(Fe);T(Ie),X(()=>{$(j,"src",e(q)),$(j,"poster",e(p)),Pe(j,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(p)||e(A)&&!e(m)?"opacity-100":"opacity-0"}`),Pe(Fe,1,`flex ${v()?"size-6":"size-11"} shrink-0 aspect-square items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]`),Pe(De,0,`ml-0.5 ${v()?"size-3":"size-5"}`)}),Be("loadeddata",j,k),Be("error",j,()=>O(m,!0)),W(g,J)};re(se,g=>{_()?g(qe):g(h,-1)})}W(de,Te)},$$slots:{default:!0}})}var ce=z(ve,2);{var ke=We=>{Kt(We,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"})};re(ce,We=>{_()||We(ke)})}T(ee),X(()=>{Pe(ee,1,`group relative aspect-video w-full max-w-2xl ${o()?"max-h-72":"max-h-40"}`),Re=pt(ee,"",Re,{height:_()?"100%":void 0,width:o()?"min(100%, calc(18rem * 16 / 9))":"min(100%, calc(10rem * 16 / 9))"})}),W(I,ee)};re(Le,I=>{e(F)?I(le):e(m)?I(ie,1):I(ge,-1)})}T(K);var _e=z(K,2);{var Ge=I=>{Ia(I,{get videoUrl(){return e(q)},get videoName(){return d()},get poster(){return e(p)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(w)},get open(){return e(b)},set open(ee){O(b,ee,!0)}})};re(_e,I=>{!e(m)&&!e(F)&&I(Ge)})}return X(()=>ne=pt(K,"",ne,{height:_()?"100%":void 0})),W(a,U),it(P)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,Dn=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return _t(a,t);if(a.startsWith("workspace-file://")){const d=At(a);if(!d||d.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function zn(a,t){if(a.startsWith("workspace-file://")){const r=At(a);if(!r||r.workspaceId!==t)return!1;const d=Sa(a);return!!d&&!!Et(d,t)}return!!Et(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function Bn(a,t,r){const d=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===d)})}function Vn(a,t){const r=a.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/_RTfq0v6.js","/app/immutable/chunks/DYhIMPy1.js","/app/immutable/chunks/DXyyWeag.js","/app/immutable/chunks/Cuqq8bL5.js","/app/immutable/chunks/B5m4HK_m.js","/app/immutable/chunks/BboIV5H5.js","/app/immutable/chunks/CjaOLL1c.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/chunks/D5ej8a-y.js","/app/immutable/chunks/WFvSJ9zU.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/ppRpwazH.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/DyvrH0mm.js","/app/immutable/chunks/BaIAhI85.js","/app/immutable/chunks/Bfr1QjPr.js","/app/immutable/chunks/CnVt0JNG.js","/app/immutable/chunks/BybfkKTj.js","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/ChOlbK8y.js","/app/immutable/chunks/Co9PgWQA.js","/app/immutable/chunks/CX_KiszT.js","/app/immutable/chunks/4NMrKcis.js","/app/immutable/chunks/BTdkHPOB.js","/app/immutable/chunks/D6bHtnlF.js","/app/immutable/assets/menu-footer.Ck5GCpgU.css","/app/immutable/chunks/DfxQWSVU.js","/app/immutable/chunks/Dwmx7Nbz.js","/app/immutable/assets/dialog.BtQTVchw.css","/app/immutable/chunks/BsieX9dN.js","/app/immutable/assets/observe-overflow.CbDLK6fN.css","/app/immutable/chunks/BtId34lw.js","/app/immutable/chunks/C5oPUaEZ.js","/app/immutable/chunks/BKnW-cqy.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/confirm.UE5obH5A.css","/app/immutable/chunks/BWYr8u9e.js","/app/immutable/chunks/BeP4UORy.js","/app/immutable/chunks/B0gQeWRk.js","/app/immutable/chunks/DJkHth-B.js","/app/immutable/assets/SettingsPage.D8u26cHZ.css","/app/immutable/chunks/D-hrwg9Y.js","/app/immutable/chunks/2YGlULfT.js","/app/immutable/chunks/CC7to1B5.js","/app/immutable/chunks/DT4bpJWb.js","/app/immutable/assets/notify.BeL_JB6L.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/C44zP9aX.js","/app/immutable/chunks/D3QcPFoL.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/DEYvT_CO.js","/app/immutable/chunks/RD9QY1Yc.js","/app/immutable/chunks/DogedYC1.js","/app/immutable/chunks/CRsmjbca.js","/app/immutable/chunks/DHQOuksI.js","/app/immutable/chunks/DNBv5HWD.js","/app/immutable/chunks/BvFAWM27.js","/app/immutable/chunks/gLnFSVct.js","/app/immutable/chunks/dF445d6n.js","/app/immutable/chunks/D6mwmUlO.js","/app/immutable/chunks/BlxdQMTv.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/DI_OiaCT.js","/app/immutable/assets/directory-picker-service.CzNEA6Ot.css","/app/immutable/chunks/zzo-K1GZ.js","/app/immutable/chunks/CvYPF82-.js","/app/immutable/chunks/fwxl4rBI.js","/app/immutable/chunks/ChkzKl5W.js","/app/immutable/chunks/pKvpKpo4.js","/app/immutable/chunks/DqN3eEdL.js","/app/immutable/chunks/CMiilI_P.js","/app/immutable/chunks/lkH5RFQO.js","/app/immutable/chunks/CshdgsKR.js","/app/immutable/assets/AttachmentPreview.BCSCCZGm.css","/app/immutable/assets/DiagramPresentation.Bfi3xHm0.css","/app/immutable/chunks/D1IC4eoI.js","/app/immutable/assets/StreamingDiagramRenderer.BShsSvPz.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Ua=Object.defineProperty;var Ba=(a,t,r)=>t in a?Ua(a,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[t]=r;var dt=(a,t,r)=>Ba(a,typeof t!="symbol"?t+"":t,r);import{bp as C,t as rt,br as y,a_ as re,bz as nt,b as st,bt as Va,bv as Jt,_ as ka}from"./DXyyWeag.js";import{bs as ot,a5 as N,aD as e,bA as T,b_ as X,W,bn as it,c9 as E,aA as x,aB as B,ca as yt,bk as ya,c6 as Ka,cd as Ht,bV as oe,bS as z,ay as Ee,bl as me,bO as be,ai as xa,a7 as xt,c0 as ja,bf as Ot,bH as O,aw as Be,aj as Se,aC as Ga,c3 as ft,bb as St,aF as Ya,br as Za,bj as Ja}from"./DYhIMPy1.js";import{j as Qa,l as Xa,v as Pe,w as pt,u as $,g as tt,n as Ut,p as $a}from"./CjaOLL1c.js";import{aO as er,cY as tr,M as ar,aw as rr,dm as nr,W as sr,dr as Aa,C as or,a0 as ir}from"./D3QcPFoL.js";import{t as Bt}from"./4NMrKcis.js";import{a9 as cr,ao as lr,A as dr,n as ur,a5 as Ia,s as Vt,a4 as Kt,aJ as At,b5 as Ma,m as fr,aL as pr,b4 as mr}from"./DqN3eEdL.js";import{l as Qt}from"./D4BOXNo3.js";import{bV as gr,bS as vr,bT as Xt,aB as hr}from"./CRsmjbca.js";import{t as ut,P as br}from"./CX_KiszT.js";import{f as jt,bc as qt}from"./Bfr1QjPr.js";import{t as Ve,v as wr,I as Ct,F as $t,c as ea}from"./BboIV5H5.js";import{ry as Ca,Iy as we,mq as _r,fF as kr,nk as yr,ul as xr,a as Ar,vX as Ir,t0 as Mr,rg as Cr,g as Sr,be as ta,v2 as Rr,sH as Er,v4 as Pr}from"./D5ej8a-y.js";import{c as Tr,l as bt}from"./ChTqQfQN.js";import{o as Fr}from"./DI_OiaCT.js";import{aN as Lr,aO as aa,by as Wr,ax as Nr,bx as Hr,aC as Or,c_ as qr,cO as Dr,F as wt,au as ra,bG as zr,bB as Ur}from"./BTdkHPOB.js";import{l as Br}from"./DHQOuksI.js";import{p as Vr,c_ as _t,cZ as na,ao as Kr,d0 as Sa,a8 as Et,aE as Ra,aV as jr,aw as Gr,a7 as sa,r as Yr,aM as Zr,aR as Jr,F as Qr}from"./fwxl4rBI.js";import{s as Rt}from"./Cuqq8bL5.js";import{b as at}from"./BaIAhI85.js";import{s as Xr}from"./BsieX9dN.js";import{c as $r,u as en,s as tn,a as an}from"./DfxQWSVU.js";import{z as oa,x as ia}from"./_RTfq0v6.js";import{g as ca}from"./B5m4HK_m.js";import{n as la}from"./ChkzKl5W.js";const rn=new Set(["failed","blocked","needs_attention","in_progress"]),nn={failed:{visual:"icon",icon:Dr,className:"text-foreground"},blocked:{visual:"icon",icon:qr,className:"text-danger"},needs_attention:{visual:"icon",icon:Or,className:"text-warning-ink"},in_progress:{visual:"dot",icon:null,className:"workspace-status-color-active"},waiting:{visual:"icon",icon:Hr,className:"text-muted-foreground"},unread:{visual:"dot",icon:null,className:"workspace-status-color-unread"},not_started:{visual:"dot",icon:null,className:"text-muted-foreground/35"},idle:{visual:"dot",icon:null,className:"text-muted-foreground/35"},complete:{visual:"icon",icon:Nr,className:"text-success"},pr_queued:{visual:"icon",icon:Wr,className:"text-info"},pr_ready:{visual:"icon",icon:aa,className:"text-success"},pr_open:{visual:"icon",icon:aa,className:"text-info"},pr_merged:{visual:"icon",icon:Lr,className:"text-purple-500"}};function sn(a){switch(a){case"failed":return C.workspace_statusIcon_failed_label();case"blocked":return C.workspace_statusIcon_blocked_label();case"needs_attention":return C.workspace_statusIcon_needsAttention_label();case"in_progress":return C.workspace_statusIcon_inProgress_label();case"waiting":return C.workspace_taskStatus_waiting_label();case"unread":return C.layout_activeCard_unread_header();case"not_started":return C.workspace_statusIcon_notStarted_label();case"idle":return C.workspace_statusIcon_idle_label();case"complete":return C.workspace_statusIcon_complete_label();case"pr_queued":return C.workspace_statusIcon_prQueued_label();case"pr_ready":return C.workspace_statusIcon_prReady_label();case"pr_open":return C.workspace_statusIcon_prOpen_label();case"pr_merged":return C.workspace_statusIcon_prMerged_label()}}function on(a){const t=Ca(a.displayStatus)?a.displayStatus:"not_started";return rn.has(t)?t:a.attention==="unread"?"unread":a.waiting===!0?"waiting":t}function Ea(a){const t=a==="waiting"||a==="unread"||Ca(a)?a:"not_started",r=sn(t);return{state:t,...nn[t],label:r,tooltip:r,accessibleName:r}}var cn=B('<span class="workspace-status-dot svelte-14zk5l0" data-workspace-status-dot=""></span>'),ln=B("<span><!></span>");function Pa(a,t){if(new.target)return rt({component:Pa,...a});ot(t,!0);let r=y(t,"status",7),d=y(t,"size",7,14),c=y(t,"decorative",7,!1),u=y(t,"class",7);const s=E(()=>Ea(r()));var o={get status(){return r()},set status(m){r(m),x()},get size(){return d()},set size(m=14){d(m),x()},get decorative(){return c()},set decorative(m=!1){c(m),x()},get class(){return u()},set class(m){u(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},v=ln(),_=N(v);{var b=m=>{var w=cn();W(m,w)},A=m=>{wt(m,{get icon(){return e(s).icon},class:"size-full!"})};re(_,m=>{e(s).visual==="dot"?m(b):e(s).icon&&m(A,1)})}return T(v),X(m=>{Pe(v,1,m,"svelte-14zk5l0"),pt(v,`width: ${d()??""}px; height: ${d()??""}px;`),$(v,"role",c()?void 0:"img"),$(v,"aria-label",c()?void 0:e(s).accessibleName),$(v,"aria-hidden",c()?"true":void 0),$(v,"title",c()?void 0:e(s).tooltip),$(v,"data-workspace-status",e(s).state),$(v,"data-workspace-status-visual",e(s).visual),$(v,"data-workspace-status-icon",e(s).icon?.iconName)},[()=>Qa(Xa("workspace-status-icon inline-flex shrink-0 items-center justify-center forced-colors:text-[CanvasText]",e(s).className,u()))]),W(a,v),it(o)}const Gt=6e4,Yt=60*Gt,Zt=24*Yt,da=30*Zt;function dn(a,t=new Date){if(a==null)return null;const r=a instanceof Date?a:new Date(a),d=r.getTime(),c=t.getTime();if(!Number.isFinite(d)||!Number.isFinite(c))return null;const u=Math.max(0,c-d);let s;u<Gt?s="<1m":u<Yt?s=`${Ve(Math.floor(u/Gt))}m`:u<Zt?s=`${Ve(Math.floor(u/Yt))}h`:u<da?s=`${Ve(Math.floor(u/Zt))}d`:s=`${Ve(Math.floor(u/da))}mo`;const o=d>c?t:r,v=wr(o,{now:t});return v?{compact:s,accessible:v,dateTime:r.toISOString()}:null}var un=B('<div><div class="grid gap-0.5 px-5 pt-4"><div class="flex min-w-0 items-center justify-between gap-3"><!> <!></div> <!> <!></div> <div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><div class="grid" data-workspace-hover-card-activity=""><!></div> <div class="pull-requests grid" data-workspace-hover-card-pr-column=""><!></div></div></div>'),fn=B('<p class="type-caption mt-1 min-w-0 line-clamp-3 text-muted-foreground" data-workspace-hover-card-summary=""> </p>'),pn=B('<span class="shrink-0 text-muted-foreground" data-workspace-hover-card-question-meta=""><span aria-hidden="true"> </span></span>'),mn=B('<span class="row-span-2 flex h-(--text-caption-line-height) items-center" aria-hidden="true"><!></span><span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-agent-name=""> </span><time class="type-caption whitespace-nowrap text-muted-foreground" data-workspace-hover-card-agent-time=""> </time> <span class="agent-detail type-caption flex min-w-0 items-start gap-1.5 text-muted-foreground svelte-1vax087" data-workspace-hover-card-agent-detail=""><span class="min-w-0 truncate" data-workspace-hover-card-agent-context=""> </span><!></span>',1),ua=B('<div role="listitem"><!></div>'),gn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-overflow=""><span> </span> <!></div>'),vn=B('<section class="activity min-w-0" data-workspace-hover-card-activity="" data-workspace-hover-card-agent-table=""><div class="-mx-2 grid gap-2" role="list"></div> <!></section>'),hn=B('<!> <span class="type-caption min-w-0 truncate text-foreground" data-workspace-hover-card-pr-title=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-status=""> </span> <span class="type-caption shrink-0 text-muted-foreground" data-workspace-hover-card-pr-number=""> </span>',1),bn=B('<div class="grid w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-sm px-2 py-0 text-left" data-workspace-hover-card-pr-row=""><!></div>'),wn=B('<div class="type-caption mt-3 flex items-center justify-between text-muted-foreground" data-workspace-hover-card-pr-overflow=""><span> </span> <!></div>'),_n=B('<section class="pull-requests min-w-0" data-workspace-hover-card-pr-column=""><div class="-mx-2 grid min-w-0 gap-2" role="list" data-workspace-hover-card-pr-list=""></div> <!></section>'),kn=B('<div class="my-3 border-t border-border" data-workspace-hover-card-divider=""></div> <div class="body-grid grid min-w-0 grid-cols-1 items-stretch gap-3 px-5 pb-4" data-workspace-hover-card-columns=""><!> <!></div>',1),yn=B('<header data-workspace-hover-card-header=""><div class="min-w-0" data-workspace-hover-card-identity=""><div class="flex min-w-0 items-center justify-between gap-3"><h2 class="type-body min-w-0 truncate font-medium text-foreground" data-workspace-hover-card-title=""> </h2> <span class="type-caption flex shrink-0 items-center gap-1.5 text-muted-foreground" data-workspace-hover-card-status=""><span class="truncate" data-workspace-hover-card-status-label=""> </span><!></span></div> <div class="type-caption mt-0.5 min-w-0 truncate text-muted-foreground" data-workspace-hover-card-repo=""> </div> <!></div></header> <!>',1),xn=B('<section class="workspace-hover-card shrink-0 overflow-hidden rounded-md bg-background text-left text-foreground shadow-(--elevation-overlay) ring-1 ring-border svelte-1vax087" data-workspace-hover-card="" data-workspace-hover-card-layout="landscape"><!></section>');function An(a,t){if(new.target)return rt({component:An,...a});ot(t,!0);const r=()=>Jt(F,"$workspaceAgents$",c),d=()=>Jt(i,"$prMonitors$",c),[c,u]=Va(),s=Tr("WorkspaceHoverCard");let o=y(t,"workspace",7),v=y(t,"isLoading",7,!1),_=y(t,"activeAgentIds",23,()=>[]),b=y(t,"loadAgentSessions",7,!0),A=y(t,"onkeydown",7),m=y(t,"staticData",7,!1);const w=Ht("");function q(){return m()?Ht([]):er(w)}function V(){return m()?Ht([]):tr(w)}const F=q(),i=V();yt(()=>w.set(o()?.id??""));let p=oe(0);ya(()=>Qt.subscribe(()=>Ka(p)));let k=E(()=>o()?.agentSummary?.agentIds??[]),P=E(()=>(e(p),o()?Qt.getStreamingAgentIdsForWorkspace(o().id):[])),U=null,K=new Set;yt(()=>{if(!o()||!b())return;const l=String(o().id);U!==l&&(U=l,K=new Set);for(const M of new Set([...e(k).slice(0,6),..._(),...e(P)]))K.has(M)||(we.dispatch(_r(l,M)),K.add(M))});function ne(l){return[l.name,l.context,l.questionMeta?.accessible,l.updated.accessible].filter(Boolean).join(". ")}function Le(l){return l?l.kind==="attention"?l.attention.reason?.trim()||null:"text"in l&&l.text.trim()||null:null}function le(l){return dn(l.lastActivity||l.updatedAt||l.createdAt)??{compact:"—",accessible:C.workspace_hoverCard_noRecentActivity_label()}}function ie(l){const M=String(l.status).toLowerCase(),L=yr(l),Q=lr(l),ye=Q==="question"?gr(l):null,he=Le(rr.select(we.state,String(l.id)));let xe,Ne,Ae,n,f,H,S=!1;if(Q==="question"){xe="attention",Ne="question",Ae=ye?.questions[0]?.question.trim()||he||C.workspace_hoverCard_question_label(),n="question",f=1;const G=ye?.questions.length??0;G>1&&(H={compact:`${Ve(1)}/${Ve(G)}`,accessible:C.chat_questionWizard_stepCounter_label({current:1,total:G})})}else if(Q==="attention-discussion")xe="attention",Ne="discussion",Ae=L?.reason?.trim()||C.chat_agentCard_attentionDiscussion_label(),n="attention-discussion",f=1;else if(Q==="attention-blocker"||M==="blocked")xe="attention",Ne="blocker",Ae=L?.reason?.trim()||C.chat_agentCard_attentionBlocker_label(),n="attention-blocker",f=0;else if(l.hasUnread)xe="attention",Ne="unread",Ae=he||C.chat_newMessagesDivider_label(),S=!!he,n="unread",f=2;else if(l.isStreaming||l.isProcessing||_().includes(String(l.id))||e(P).includes(String(l.id))||["active","busy","processing","responding","running","streaming","in_progress"].includes(M))xe="active",Ae=he||C.workspace_devScripts_running_label(),S=!!he,n=l.isProcessing?"responding":"running",f=3;else if(["waiting","pending","queued","starting"].includes(M))xe="waiting",Ae=he||C.workspace_taskStatus_waiting_label(),S=!!he,n="waiting",f=4;else return null;const Y=l.agentMetadata??l.metadata;return{id:String(l.id),name:l.name?.trim()||C.workspace_fileChanges_agent_label(),group:xe,attentionKind:Ne,avatarState:n,specialist:Y?.specialist,context:Ae,questionMeta:H,contextIsPreview:S,updated:le(l),priority:f}}let ge=E(()=>{const l=o()?.agentSummary,M=new Map;if(Array.isArray(l?.agents))for(const L of l.agents)L&&typeof L=="object"&&typeof L.id=="string"&&M.set(L.id,L.parentAgentId);return r().filter(L=>{const Q=M.get(String(L.id));return!(kr(L)!=="topLevel"||typeof Q=="string"&&Q||L.pendingDeleteAt||L.retiredAt||String(L.status).toLowerCase()==="deleted")})}),_e=E(()=>e(ge).map(ie).filter(l=>l!==null).sort((l,M)=>l.priority-M.priority)),Ge=E(()=>e(_e).slice(0,6)),I=E(()=>Math.max(0,e(_e).length-6)),ee=E(()=>o()?.repositoryName?o().repositoryOwner?`${o().repositoryOwner} / ${o().repositoryName}`:o().repositoryName:C.workspace_hoverCard_localRepository_label()),Re=E(()=>on(o()??{})),ve=E(()=>Ea(e(Re))),ce=E(()=>o()?.statusMessage?.trim()||"");function ke(l){if(!l)return null;const M=l.activePullRequest??l.pullRequests?.[0]??null;return M||(l.prStatus?{id:`legacy-pr-${l.prNumber??"workspace"}`,number:l.prNumber??0,url:l.prUrl??"",title:C.workspace_hoverCard_pullRequest_label(),status:l.prStatus,createdAt:l.updatedAt,updatedAt:l.updatedAt}:null)}let We=E(()=>o()?m()?ke(o()):nr.select(we.state,o().id)??ke(o()):null),de=E(()=>{if(!o()||ar(o()))return[];const l=o().repositoryOwner&&o().repositoryName?`${o().repositoryOwner}/${o().repositoryName}`:void 0;return cr({workspacePRs:o().pullRequests,activePR:e(We),monitors:d(),workspaceRepo:l,buildPrUrl:(M,L)=>Vr(M,o().repositoryOwner,o().repositoryName,L),getDisplayTitle:M=>M.title})}),Ze=E(()=>e(de).slice(0,3)),Te=E(()=>Math.max(0,e(de).length-3)),se=E(()=>e(_e).length>0),qe=E(()=>e(de).length>0),h=E(()=>e(se)||e(qe));function g(l){const M=l.resource?.repository.provider==="gitlab"?`${l.repo} !${l.number}`:l.repo?C.workspace_card_prBadge_repoLine_tooltip({repo:l.repo,number:l.number}):C.workspace_card_prBadge_label({number:` #${l.number}`});return[sr(M,l),l.title,l.details].filter(Boolean).join(`
|
|
3
|
+
`)}function J(l,M){if(l.stopPropagation(),!o()||!b())return;const L=o().id;Br.select(we.state)!==L&&Fr(L).catch(Q=>{s.warn("Failed to switch workspace for hover-card agent",{agentId:M,error:Q})}),we.dispatch(xr(L,{agentId:M}))}function D(l,M){if(l.stopPropagation(),!o()||!M.url)return;const L=o().id;ka(async()=>{const{handleLink:Q}=await import("./_RTfq0v6.js").then(ye=>ye.H);return{handleLink:Q}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]),import.meta.url).then(({handleLink:Q})=>Q(M.url,{workspaceId:L,event:l}))}var ae={get workspace(){return o()},set workspace(l){o(l),x()},get isLoading(){return v()},set isLoading(l=!1){v(l),x()},get activeAgentIds(){return _()},set activeAgentIds(l=[]){_(l),x()},get loadAgentSessions(){return b()},set loadAgentSessions(l=!0){b(l),x()},get onkeydown(){return A()},set onkeydown(l){A(l),x()},get staticData(){return m()},set staticData(l=!1){m(l),x()},$set:nt,$on:(l,M)=>st(t,l,M)},ue=xn(),j=N(ue);{var Ie=l=>{var M=un(),L=N(M),Q=N(L),ye=N(Q);ut(ye,{class:"h-7 min-w-0 max-w-64 flex-1"});var he=z(ye,2);ut(he,{class:"h-5 w-20 shrink-0"}),T(Q);var xe=z(Q,2);ut(xe,{class:"h-4 w-40"});var Ne=z(xe,2);ut(Ne,{class:"mt-2 h-10 w-full"}),T(L);var Ae=z(L,4),n=N(Ae),f=N(n);ut(f,{class:"h-10 w-full"}),T(n);var H=z(n,2),S=N(H);ut(S,{class:"h-10 w-full"}),T(H),T(Ae),T(M),W(l,M)},Fe=l=>{var M=yn(),L=Ee(M);let Q;var ye=N(L),he=N(ye),xe=N(he),Ne=me(xe,!0),Ae=z(xe,2),n=N(Ae),f=me(n,!0),H=z(n);Pa(H,{get status(){return e(Re)},size:16,decorative:!0}),T(Ae),T(he);var S=z(he,2),Y=me(S,!0),G=z(S,2);{var te=pe=>{var ze=fn(),It=me(ze,!0);tt(ze,(Mt,Pt)=>Bt?.(Mt,Pt),()=>e(ce)),X(()=>be(It,e(ce))),W(pe,ze)};re(G,pe=>{e(ce)&&pe(te)})}T(ye),T(L);var He=z(L,2);{var fe=pe=>{var ze=kn(),It=z(Ee(ze),2),Mt=N(It);{var Pt=Je=>{var Ke=vn(),Ye=N(Ke);Ut(Ye,21,()=>e(Ge),Z=>Z.id,(Z,R)=>{var Me=ua(),Qe=N(Me);{let Xe=E(()=>ne(e(R)));jt(Qe,{variant:"plain",wrapContent:!1,class:"grid h-auto! min-h-8 w-full min-w-0 cursor-pointer grid-cols-[1rem_minmax(0,1fr)_auto] items-start justify-normal gap-x-2 gap-y-0 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Xe)},"data-workspace-hover-card-agent-row":!0,get"data-agent-group-row"(){return e(R).group},get"data-attention-kind"(){return e(R).attentionKind},get onkeydown(){return A()},onclick:je=>J(je,e(R).id),children:(je,mt)=>{var Oe=mn(),Ce=Ee(Oe),Ue=N(Ce);{let et=E(()=>e(R).specialist??null);dr(Ue,{get agentId(){return e(R).id},variant:"compact",get state(){return e(R).avatarState},get specialist(){return e(et)}})}T(Ce);var ct=z(Ce),Lt=me(ct,!0),$e=z(ct),Wt=me($e,!0),gt=z($e,2),vt=N(gt),Nt=me(vt,!0);tt(vt,(et,lt)=>Bt?.(et,lt),()=>e(R).context);var Oa=z(vt);{var qa=et=>{var lt=pn(),Da=N(lt),za=me(Da,!0);T(lt),X(()=>{$(lt,"aria-label",e(R).questionMeta.accessible),be(za,e(R).questionMeta.compact)}),W(et,lt)};re(Oa,et=>{e(R).questionMeta&&et(qa)})}T(gt),X(()=>{be(Lt,e(R).name),$($e,"datetime",e(R).updated.dateTime),$($e,"aria-label",e(R).updated.accessible),be(Wt,e(R).updated.compact),$(gt,"data-workspace-hover-card-agent-preview",e(R).contextIsPreview||void 0),be(Nt,e(R).context)}),W(je,Oe)},$$slots:{default:!0}})}T(Me),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=gn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreAgents_label({count:Ve(e(I))})]),W(Z,R)};re(Tt,Z=>{e(I)&&Z(Ft)})}T(Ke),X(Z=>$(Ke,"aria-label",Z),[()=>C.workspace_multiSelectSidebar_agentsTab_label()]),W(Je,Ke)};re(Mt,Je=>{e(se)&&Je(Pt)})}var Na=z(Mt,2);{var Ha=Je=>{var Ke=_n(),Ye=N(Ke);Ut(Ye,21,()=>e(Ze),Z=>Z.identity,(Z,R)=>{var Me=ua();{const mt=Oe=>{var Ce=hn(),Ue=Ee(Ce);wt(Ue,{get icon(){return e(R).statusIcon},size:16,get class(){return`shrink-0 justify-self-start ${e(R).foregroundClass??""}`}});var ct=z(Ue,2),Lt=me(ct,!0),$e=z(ct,2),Wt=me($e,!0),gt=z($e,2),vt=me(gt,!0);X(Nt=>{be(Lt,Nt),be(Wt,e(R).accessibleStateLabel),be(vt,e(R).numberLabel??`#${e(R).number}`)},[()=>e(R).title||(e(R).resource?.repository.provider==="gitlab"?C.workspace_hoverCard_mergeRequest_label():C.workspace_hoverCard_pullRequest_label())]),W(Oe,Ce)};var Qe=N(Me);{var Xe=Oe=>{{let Ce=E(()=>g(e(R)));jt(Oe,{variant:"plain",wrapContent:!1,class:"grid h-auto! w-full min-w-0 grid-cols-[1rem_minmax(0,1fr)_auto_auto] items-center justify-normal gap-x-2 whitespace-normal rounded-sm border-0! px-2! py-0! text-left font-normal transition-colors hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",get"aria-label"(){return e(Ce)},"data-workspace-hover-card-pr-row":!0,get"data-pr-identity"(){return e(R).identity},get"data-pr-status"(){return e(R).status},get onkeydown(){return A()},onclick:Ue=>D(Ue,e(R)),children:(Ue,ct)=>{mt(Ue)},$$slots:{default:!0}})}},je=Oe=>{var Ce=bn(),Ue=N(Ce);mt(Ue),T(Ce),X(()=>{$(Ce,"data-pr-identity",e(R).identity),$(Ce,"data-pr-status",e(R).status)}),W(Oe,Ce)};re(Qe,Oe=>{e(R).url?Oe(Xe):Oe(je,-1)})}T(Me)}X(mt=>$(Me,"aria-label",mt),[()=>e(R).url?void 0:g(e(R))]),W(Z,Me)}),T(Ye);var Tt=z(Ye,2);{var Ft=Z=>{var R=wn(),Me=N(R),Qe=me(Me,!0),Xe=z(Me,2);wt(Xe,{get icon(){return ra},size:10}),T(R),X(je=>be(Qe,je),[()=>C.workspace_hoverCard_moreItems_label({count:Ve(e(Te))})]),W(Z,R)};re(Tt,Z=>{e(Te)&&Z(Ft)})}T(Ke),X((Z,R)=>{$(Ke,"aria-label",Z),$(Ye,"aria-label",R)},[()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label(),()=>e(de).every(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_mergeRequests_label():e(de).some(Z=>Z.resource?.repository.provider==="gitlab")?C.workspace_hoverCard_reviews_label():C.workspace_hoverCard_pullRequests_label()]),W(Je,Ke)};re(Na,Je=>{e(qe)&&Je(Ha)})}T(It),W(pe,ze)};re(He,pe=>{e(h)&&pe(fe)})}X(pe=>{Q=Pe(L,1,"min-w-0 px-5 pt-4",null,Q,{"pb-4":!e(h)}),be(Ne,pe),be(f,e(ve).label),be(Y,e(ee))},[()=>o().title||C.workspace_links_untitled_label()]),W(l,M)};re(j,l=>{v()||!o()?l(Ie):l(Fe,-1)})}T(ue),W(a,ue);var De=it(ae);return u(),De}const fa=800,Rs=175,In=300;function Mn(){let a=0,t=null;const r=new Set,d=new Set;function c(){return a>0||t!==null?0:fa}function u(){const o=c();r.forEach(v=>v(o))}function s(){t!==null&&(clearTimeout(t),t=null)}return{get currentOpenDelay(){return c()},subscribe(o){return r.add(o),o(c()),()=>r.delete(o)},notifyOpened(){const o=a===0&&t===null;s(),a+=1,o&&u()},notifyClosed(){a!==0&&(a-=1,!(a>0)&&(s(),t=setTimeout(()=>{t=null,u()},In)))},deferClose(o){return d.add(o),()=>d.delete(o)},settleDeferredCloses(){const o=[...d];d.clear(),o.forEach(v=>v())},reset(){const o=c()!==fa;s(),a=0,d.clear(),o&&u()}}}const Es=Mn();function Dt(a){const t=Aa.select(we.state,a);return t!==void 0&&Cr(t)}function Cn(a,t){if(!Dt(a))return[];const r=vr.select(we.state,a),d=Xt.select(we.state,a),c=hr.select(we.state),u=[];for(let s=0;s<Ar;s+=1){const o=c[s],v=o&&o!==a?Aa.select(we.state,o):void 0;u.push({id:`assign-micro-key-${s+1}`,label:v?C.workspace_card_assignOccupiedMicroKey_label({number:Ve(s+1),title:v.title}):C.workspace_card_assignMicroKeyNumber_label({number:Ve(s+1)}),checked:r===s,closeOnSelect:!0,onClick:()=>{Dt(a)&&we.dispatch(Ir(s,a)),t()}})}return d!==null&&(u.push({type:"separator"}),u.push({id:"unassign-micro-key",label:C.workspace_card_unassignMicroKey_label(),onClick:()=>{Dt(a)&&Xt.select(we.state,a)===d&&we.dispatch(Mr(d)),t()}})),u}function Ps(a,{connected:t,onClose:r}){if(!t)return[];const d=Cn(a,r);if(d.length===0)return[];const c=d.filter(s=>"id"in s&&s.id!=="unassign-micro-key"),u=d.find(s=>"id"in s&&s.id==="unassign-micro-key");return[{id:"assign-micro-key",label:C.workspace_card_assignMicroKey_label(),icon:zr,onClick:()=>{},selection:"single",submenu:c},...u?[u]:[]]}var Sn=B('<div data-static-position="" role="tooltip"><!></div>'),pa=B('<div role="tooltip"><!></div>');function Rn(a,t){if(new.target)return rt({component:Rn,...a});ot(t,!0);let r=y(t,"id",7),d=y(t,"anchor",7),c=y(t,"position",7,"right"),u=y(t,"absolute",7,!1),s=y(t,"anchorElement",7,null),o=y(t,"staticPosition",7,!1),v=y(t,"class",7,""),_=y(t,"children",7),b=y(t,"onmouseenter",7),A=y(t,"onmouseleave",7),m=y(t,"onfocusin",7),w=y(t,"onfocusout",7);const q=$r(en()+2);tn(q);const V=an(q),F=8,i=4;let p=oe(null),k=oe(""),P=oe(void 0);const U=E(()=>c()==="bottom-right"||c()==="bottom-left"),K=E(()=>c()==="top"),ne=E(()=>o()?"relative":u()?"absolute":"fixed"),Le=E(()=>c()==="right"?{x:-4,y:0}:c()==="bottom"?{x:4,y:0}:e(K)?{x:0,y:4}:{x:0,y:-4});function le(h,g,J){return Math.max(g,Math.min(J,h))}let ie=null,ge=null;function _e(){return!ie?.isConnected||ge!==d()?!1:ie.style.getPropertyValue("anchor-name").includes(d())||getComputedStyle(ie).getPropertyValue("anchor-name").includes(d())}function Ge(){return s()?s():(_e()||(ie=Array.from(document.querySelectorAll('[style*="anchor-name"]')).find(h=>{const g=h.style.getPropertyValue("anchor-name"),J=getComputedStyle(h).getPropertyValue("anchor-name");return g.includes(d())||J.includes(d())})??null,ge=ie?d():null),ie)}function I(){if(o()||u()||!e(p))return;const h=Ge();if(!h)return;const g=h.getBoundingClientRect(),J=e(p).getBoundingClientRect(),D=window.innerWidth||document.documentElement.clientWidth,ae=window.innerHeight||document.documentElement.clientHeight,ue=J.width||e(p).offsetWidth,j=J.height||e(p).offsetHeight,Ie=Math.max(0,g.top-i-F),Fe=Math.max(0,ae-g.bottom-i-F),De=e(K)?!(Ie<j&&Fe>Ie):e(U)&&Fe<j&&Ie>Fe;let l=g.left,M=g.bottom+i,L=De?Ie:Fe;if(c()==="right"){const Q=g.left-i-F,ye=D-g.right-i-F;l=ye>=ue||ye>=Q?g.right+i:g.left-ue-i,M=g.top,L=Math.max(0,ae-F*2)}else c()==="bottom"?(l=g.left-ue-i,M=g.bottom-j):(e(K)||e(U))&&(c()==="bottom-left"?l=g.right-ue:e(K)&&(l=g.left+g.width/2-ue/2),M=De?g.top-Math.min(j,L)-i:g.bottom+i);l=le(l,F,Math.max(F,D-ue-F)),M=le(M,F,Math.max(F,ae-Math.min(j,L)-F)),O(P,`${L}px`),O(k,`left: ${l}px; top: ${M}px;`)}let ee=!1;async function Re(){ee||(ee=!0,await ja(),ee=!1,I())}let ve=null;function ce(){ve||(ve=Xr(()=>{ve=null,I()}))}function ke(h){const g=s()??(_e()?ie:null);g&&h.target instanceof Node&&!h.target.contains(g)||ce()}yt(()=>{const h=e(p),g=s();o()||u()||!h||!g||Re()}),ya(()=>{if(o())return;let h=null;return Re().then(()=>{if(!u()&&typeof ResizeObserver<"u"){h=new ResizeObserver(ce),e(p)&&h.observe(e(p));const g=Ge();g&&h.observe(g)}}),window.addEventListener("resize",ce),window.addEventListener("scroll",ke,!0),()=>{h?.disconnect(),window.removeEventListener("resize",ce),window.removeEventListener("scroll",ke,!0),ve?.(),ve=null}});var We={get id(){return r()},set id(h){r(h),x()},get anchor(){return d()},set anchor(h){d(h),x()},get position(){return c()},set position(h="right"){c(h),x()},get absolute(){return u()},set absolute(h=!1){u(h),x()},get anchorElement(){return s()},set anchorElement(h=null){s(h),x()},get staticPosition(){return o()},set staticPosition(h=!1){o(h),x()},get class(){return v()},set class(h=""){v(h),x()},get children(){return _()},set children(h){_(h),x()},get onmouseenter(){return b()},set onmouseenter(h){b(h),x()},get onmouseleave(){return A()},set onmouseleave(h){A(h),x()},get onfocusin(){return m()},set onfocusin(h){m(h),x()},get onfocusout(){return w()},set onfocusout(h){w(h),x()},$set:nt,$on:(h,g)=>st(t,h,g)},de=xt(),Ze=Ee(de);{var Te=h=>{var g=Sn(),J=N(g);Rt(J,()=>_()??Ot),T(g),at(g,D=>O(p,D),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(g,"data-surface-level",q)}),W(h,g)},se=h=>{var g=pa();let J;var D=N(g);Rt(D,()=>_()??Ot),T(g),at(g,ae=>O(p,ae),()=>e(p)),X(()=>{$(g,"id",r()),Pe(g,1,e(ne)+` z-50 w-64 flex flex-col border border-border pointer-events-none ${V} `+v()),$(g,"data-surface-level",q),J=pt(g,"",J,{"position-anchor":d(),right:c()==="bottom"?"anchor(left)":void 0,left:c()==="right"?"anchor(right)":e(U)?"anchor(left)":e(K)?"anchor(center)":void 0,top:c()==="right"?"anchor(top)":e(U)?"anchor(bottom)":void 0,bottom:c()==="bottom"?"anchor(bottom)":e(K)?"anchor(top)":void 0,"margin-right":c()==="bottom"?"8px":void 0,"margin-left":c()==="right"?"8px":void 0,"margin-top":e(U)?"4px":void 0,"margin-bottom":e(K)?"4px":void 0,translate:e(K)?"-50% 0":void 0})}),Be("mouseenter",g,function(...ae){b()?.apply(this,ae)}),Be("mouseleave",g,function(...ae){A()?.apply(this,ae)}),Se("focusin",g,function(...ae){m()?.apply(this,ae)}),Se("focusout",g,function(...ae){w()?.apply(this,ae)}),Ct(1,g,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,g,()=>ea,()=>({tier:"fast"})),W(h,g)},qe=h=>{br(h,{zIndex:50,children:(g,J)=>{var D=pa();let ae;var ue=N(D);Rt(ue,()=>_()??Ot),T(D),at(D,j=>O(p,j),()=>e(p)),X(()=>{$(D,"id",r()),Pe(D,1,e(ne)+` z-50 w-64 flex flex-col overflow-y-auto border border-border pointer-events-auto ${V} `+v()),$(D,"data-surface-level",q),ae=pt(D,e(k),ae,{"max-height":e(P)})}),Be("mouseenter",D,function(...j){b()?.apply(this,j)}),Be("mouseleave",D,function(...j){A()?.apply(this,j)}),Se("focusin",D,function(...j){m()?.apply(this,j)}),Se("focusout",D,function(...j){w()?.apply(this,j)}),Ct(1,D,()=>$t,()=>({tier:"fast",...e(Le),scale:.96})),Ct(2,D,()=>ea,()=>({tier:"fast"})),W(g,D)},$$slots:{default:!0}})};re(Ze,h=>{o()?h(Te):u()?h(se,1):h(qe,-1)})}return W(a,de),it(We)}xa(["focusin","focusout"]);function kt(a,t){return t||/^(?:https?:|data:|blob:|workspace-asset:)/i.test(a.trim())}function En(a,t){if(t||!a)return a;const r=document.createElement("template");r.innerHTML=a;for(const d of r.content.querySelectorAll("img, video")){const c=d.getAttribute("src")||d.getAttribute("data-media-src")||"",u=[...d.querySelectorAll("source")];if(!kt(c,!1)||u.some(o=>!kt(o.getAttribute("src")||"",!1))){const o=document.createElement("img");o.setAttribute("alt",d.getAttribute("alt")||d.getAttribute("data-name")||""),o.setAttribute("data-media-unavailable","node-owned"),d.replaceWith(o);continue}d.removeAttribute("srcset");const s=d.getAttribute("poster");s&&!kt(s,!1)&&d.removeAttribute("poster")}return r.innerHTML}const Pn=[/(^|[^\\])\$(?!\$)(?=\S)(?:\\.|[^\\$\n])+?\$(?!\$)/,/(^|[^\\])\\\((?:\\.|[^\\\n])*?\\\)/,/^(?: {0,3})(?:\$\$|\\\[)/m,/^\s*[-*]\s*\[[ x]\]/m,/```/,/`[^`]+`/,/\|.*\|/,/\[.*\]\(.*\)/,/!\[.*\]\(.*\)/,/<[a-z][\s\S]*>/i,/^#{1,6}\s/m,/^\s*>\s/m,/\*\*[^*]+\*\*/,/\*[^*]+\*/,/_[^_]+_/,/~~[^~]+~~/,/^[-*_]{3,}\s*$/m,/^\s*[-*+]\s/m,/^\s*\d+\.\s/m];function Tn(a){return a&&(Pn.some(t=>t.test(a))||or(a,"markdown"))?"static":"simple"}var Fn=B("<!> <!>",1);function Ta(a,t){if(new.target)return rt({component:Ta,...a});ot(t,!0);let r=y(t,"workspaceId",7),d=y(t,"canUseMedia",7),c=oe(null),u=oe(null),s=oe(!1),o=oe(!1);function v(k){O(c,{url:k.getAttribute("src")||"",name:k.getAttribute("alt")||void 0,opener:k},!0),O(s,!0)}function _(k){const P=na(k.getAttribute("href")||"",r());return P&&d()(P)?(O(c,{url:P,name:k.textContent?.trim()||void 0,opener:k,assetLink:!0},!0),O(s,!0),!0):b(k)}function b(k){const P=_t(k.getAttribute("href")||"",r());return!P||!d()(P.url)?!1:(O(u,{url:P.url,mimeType:P.mimeType,name:k.textContent?.trim()||void 0,opener:k},!0),O(o,!0),!0)}yt(()=>{e(u)&&!_t(e(u).url,r())&&(O(o,!1),O(u,null)),e(c)?.assetLink&&!na(e(c).url,r())&&(O(s,!1),O(c,null))});var A={openImage:v,openAsset:_,get workspaceId(){return r()},set workspaceId(k){r(k),x()},get canUseMedia(){return d()},set canUseMedia(k){d(k),x()},$set:nt,$on:(k,P)=>st(t,k,P)},m=Fn(),w=Ee(m);{var q=k=>{ur(k,{get imageUrl(){return e(c).url},get imageName(){return e(c).name},get openerElement(){return e(c).opener},showActionsMenu:!0,get open(){return e(s)},set open(P){O(s,P,!0)}})},V=E(()=>e(c)&&d()(e(c).url));re(w,k=>{e(V)&&k(q)})}var F=z(w,2);{var i=k=>{Ia(k,{get videoUrl(){return e(u).url},get videoName(){return e(u).name},get mimeType(){return e(u).mimeType},sourceKind:"workspace",get openerElement(){return e(u).opener},get open(){return e(o)},set open(P){O(o,P,!0)}})},p=E(()=>e(u)&&_t(e(u).url,r())&&d()(e(u).url));re(F,k=>{e(p)&&k(i)})}return W(a,m),it(A)}var Ln=B('<div class="flex items-center gap-2"><!> <!></div>'),Wn=Ga('<svg viewBox="0 0 24 24" class="size-10" fill="none"><rect x="3" y="5" width="18" height="14" rx="2" stroke="currentColor"></rect><path d="m10 9 5 3-5 3V9Z" fill="currentColor"></path></svg>'),Nn=B('<div class="absolute inset-0 flex items-center justify-center bg-muted text-muted-foreground" aria-hidden="true"><!></div> <video preload="metadata" playsinline="" tabindex="-1" aria-hidden="true"></video> <span class="absolute inset-0 flex items-center justify-center bg-black/10 transition-colors group-hover:bg-black/20 motion-reduce:transition-none forced-colors:bg-transparent" aria-hidden="true"><span><svg viewBox="0 0 20 20" fill="currentColor"><path d="m7 5 7 5-7 5V5Z"></path></svg></span></span>',3),Hn=B("<div><!> <!></div>"),On=B('<div class="my-2 min-w-0 max-w-2xl" data-chat-video=""><!></div> <!>',1);function Fa(a,t){if(new.target)return rt({component:Fa,...a});ot(t,!0);let r=y(t,"source",7),d=y(t,"name",23,()=>C.chat_videoBlock_fromAgent_label()),c=y(t,"poster",7),u=y(t,"allowFileMedia",7,!0),s=y(t,"canOpenFile",7),o=y(t,"fluid",7,!1),v=y(t,"compact",7,!1),_=y(t,"compactPreview",7),b=oe(!1),A=oe(!1),m=oe(!1),w=oe(null);const q=E(()=>r().kind==="inline"?`data:${r().mimeType};base64,${r().data}`:r().url);function V(I){return kt(I,u()&&s()?.()!==!1)}const F=E(()=>!V(e(q))),i=E(()=>At(e(q))),p=E(()=>{if(!(!c()||!V(c()))){if(/^data:image\/(?:gif|jpeg|png|webp);base64,[a-z0-9+/=]+$/i.test(c()))return c();try{const I=new URL(c());return(I.protocol==="https:"||I.protocol==="workspace-file:")&&!I.username&&!I.password?c():void 0}catch{return}}});function k(){O(A,!0),O(m,!1)}var P={get source(){return r()},set source(I){r(I),x()},get name(){return d()},set name(I=C.chat_videoBlock_fromAgent_label()){d(I),x()},get poster(){return c()},set poster(I){c(I),x()},get allowFileMedia(){return u()},set allowFileMedia(I=!0){u(I),x()},get canOpenFile(){return s()},set canOpenFile(I){s(I),x()},get fluid(){return o()},set fluid(I=!1){o(I),x()},get compact(){return v()},set compact(I=!1){v(I),x()},get compactPreview(){return _()},set compactPreview(I){_(I),x()},$set:nt,$on:(I,ee)=>st(t,I,ee)},U=On(),K=Ee(U);let ne;var Le=N(K);{var le=I=>{Vt(I,{get name(){return d()},reason:"load-failed"})},ie=I=>{var ee=Ln(),Re=N(ee);{let ce=E(()=>e(i)?.path),ke=E(()=>e(i)?.workspaceId);Vt(Re,{get name(){return d()},reason:"load-failed",get path(){return e(ce)},get workspaceId(){return e(ke)}})}var ve=z(Re,2);Kt(ve,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType}}),T(ee),W(I,ee)},ge=I=>{var ee=Hn();let Re;var ve=N(ee);{let We=E(()=>C.chat_videoBlock_play_ariaLabel({name:d()}));jt(ve,{wrapContent:!1,type:"button",variant:"ghost",size:"default",class:"relative block size-full cursor-pointer overflow-hidden rounded-lg border border-border bg-muted/40 p-0 shadow-(--elevation-raised) focus-visible:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 forced-colors:border",get"aria-label"(){return e(We)},"data-testid":"chat-video-snapshot",onclick:()=>{V(e(q))&&O(b,!0)},get ref(){return e(w)},set ref(de){O(w,de,!0)},children:(de,Ze)=>{var Te=xt(),se=Ee(Te);{var qe=g=>{var J=xt(),D=Ee(J);Rt(D,_),W(g,J)},h=g=>{var J=Nn(),D=Ee(J),ae=N(D);{var ue=l=>{var M=Wn();W(l,M)};re(ae,l=>{o()||l(ue)})}T(D);var j=z(D,2);j.muted=!0;var Ie=z(j,2),Fe=N(Ie),De=me(Fe);T(Ie),X(()=>{$(j,"src",e(q)),$(j,"poster",e(p)),Pe(j,1,`pointer-events-none absolute inset-0 size-full object-contain transition-opacity motion-reduce:transition-none ${e(p)||e(A)&&!e(m)?"opacity-100":"opacity-0"}`),Pe(Fe,1,`flex ${v()?"size-6":"size-11"} shrink-0 aspect-square items-center justify-center rounded-full border border-white/70 bg-black/60 text-white shadow-(--elevation-raised) forced-colors:border forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]`),Pe(De,0,`ml-0.5 ${v()?"size-3":"size-5"}`)}),Be("loadeddata",j,k),Be("error",j,()=>O(m,!0)),W(g,J)};re(se,g=>{_()?g(qe):g(h,-1)})}W(de,Te)},$$slots:{default:!0}})}var ce=z(ve,2);{var ke=We=>{Kt(We,{get videoUrl(){return e(q)},get videoName(){return d()},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},triggerClass:"absolute right-1.5 top-1.5 opacity-0 transition-opacity focus-visible:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100"})};re(ce,We=>{_()||We(ke)})}T(ee),X(()=>{Pe(ee,1,`group relative aspect-video w-full max-w-2xl ${o()?"max-h-72":"max-h-40"}`),Re=pt(ee,"",Re,{height:_()?"100%":void 0,width:o()?"min(100%, calc(18rem * 16 / 9))":"min(100%, calc(10rem * 16 / 9))"})}),W(I,ee)};re(Le,I=>{e(F)?I(le):e(m)?I(ie,1):I(ge,-1)})}T(K);var _e=z(K,2);{var Ge=I=>{Ia(I,{get videoUrl(){return e(q)},get videoName(){return d()},get poster(){return e(p)},get sourceKind(){return r().kind},get mimeType(){return r().mimeType},get openerElement(){return e(w)},get open(){return e(b)},set open(ee){O(b,ee,!0)}})};re(_e,I=>{!e(m)&&!e(F)&&I(Ge)})}return X(()=>ne=pt(K,"",ne,{height:_()?"100%":void 0})),W(a,U),it(P)}const qn=/^\s*!\[([^\]\n]*)\]\((?:<)?((?:intent:\/\/local\/|workspace-file:\/\/|workspace-asset:\/\/)[^)\s>]+)(?:>)?\)\s*$/,Dn=/^ {0,3}(`{3,}|~{3,})(.*)$/;function ma(a,t){if(typeof a!="string"||!a||a!==a.trim())return null;if(a.startsWith("workspace-asset://"))return _t(a,t);if(a.startsWith("workspace-file://")){const d=At(a);if(!d||d.workspaceId!==t)return null;const c=Sa(a);return c?la(c,t):null}const r=a.startsWith("intent://")?a:`intent://local/file/${a}`;return la(r,t)}function zn(a,t){if(a.startsWith("workspace-file://")){const r=At(a);if(!r||r.workspaceId!==t)return!1;const d=Sa(a);return!!d&&!!Et(d,t)}return!!Et(a,t,{readOnly:!0})}function Un(a,t){return(t===0||!a[t-1].trim())&&(t===a.length-1||!a[t+1].trim())}function Bn(a,t,r){const d=r[0];return a.findIndex((c,u)=>{if(u<=t)return!1;const s=c.trim();return s.length>=r.length&&s.split("").every(o=>o===d)})}function Vn(a,t){const r=a.split(`
|
|
4
4
|
`),d=[];let c=[];const u=()=>{const s=c.join(`
|
|
5
5
|
`);s.trim()&&d.push({type:"markdown",content:s}),c=[]};for(let s=0;s<r.length;s+=1){const o=r[s].match(Dn);if(o){const w=Bn(r,s,o[1]);if(w>s){const q=r.slice(s,w+1);if(o[2].trim()==="ws-block:video")try{const V=JSON.parse(r.slice(s+1,w).join(`
|
|
6
|
-
`)),F=ma(V?.path,t);if(F){u(),d.push({type:"video",source:F,name:typeof V.path=="string"?V.path:void 0,poster:typeof V.poster=="string"?V.poster:void 0}),s=w;continue}}catch{}c.push(...q),s=w;continue}c.push(...r.slice(s));break}const _=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!_){c.push(r[s]);continue}const[,b,A]=_,m=ma(A,t);m?(u(),d.push({type:"video",source:m,name:b||void 0})):A.startsWith("workspace-asset://")&&!Kr(A)||zn(A,t)?c.push(r[s]):c.push(`[${b}](${A})`)}return u(),d}function ht(a){return Ma(a.getAttribute("src")||"")}function zt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Kn(a,t){const r=a.getBoundingClientRect(),d=t.getBoundingClientRect();return{top:r.top-d.top+6,right:d.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function jn(a,t){const r=a.getAttribute("src")||"",d=At(r)?.path??Ra(r,t)?.path;if(d)return d;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function Gn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Yn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Zn(a,t,r){const d=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),v=Gn(c);v&&o.add(v);for(const _ of[...o]){const b=Et(_,t);if(b&&o.add(b),r!==void 0){const A=jr(_,r);if(A){const m=Et(`intent://local/file/${A.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const _ of o)d.has(_)||d.set(_,s)}return d}function Jn(a,t,r,d){if(!t||!a.includes("<img"))return a;const c=Zn(t,r,d);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Yn(s[1].replace(/&/g,"&")),v=c.get(o);return v?u.replace(/\s*\/?>$/,` width="${v.width}" height="${v.height}" ${La}="">`):u})}function ha(a,t){let r=t,d,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:A,source:m}]of s)ft(A),a.contains(b)&&b.replaceWith(m);s.clear()}function v(){if(!u){for(const[b,{component:A}]of s)a.contains(b)||(ft(A),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const A=[...b.classList].find(F=>F.startsWith("language-"))?.slice(9);let m;if(A==="mermaid")m="mermaid";else if(A==="diagram"||A==="ws-block:diagram")m="diagram";else if(A==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const w=b.parentElement;if(!w)continue;if(!d){c||(c=!0,ka(()=>import("./WIMBPpA0.js"),__vite__mapDeps([66,2,1,67,48,68,50,14,7,9,10,11,12,3,13,15,25,18,6,8,51,17,16,19,20,52,5,49,46,41,28,38,36,47,53,54,55,56,57,58,59,69,70,0,4,21,22,23,24,26,27,29,30,31,32,33,34,35,37,39,40,42,43,44,45,60,61,62,63,64,65,71,72,73,74,75,76,77,78]),import.meta.url).then(F=>{d=F.default,c=!1,v()}).catch(F=>{c=!1,bt.error("Failed to load the Markdown diagram renderer",{error:F})}));return}const q=document.createElement("div");q.dataset.markdownDiagram=m,w.replaceWith(q);const V=St(d,{target:q,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(q,{component:V,source:w})}}}const _=new MutationObserver(v);return _.observe(a,{childList:!0,subtree:!0}),queueMicrotask(v),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,v()},destroy(){u=!0,_.disconnect(),o()}}}var Qn=B('<span class="min-w-0 max-w-full truncate"> </span>'),Xn=B('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return rt({component:Wa,...a});ot(t,!0);let r=y(t,"name",7);var d={get name(){return r()},set name(m){r(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},c=Xn(),u=N(c),s=N(u);wt(s,{get icon(){return Ur},class:"size-3.5"}),T(u);var o=z(u,2),v=N(o),_=me(v,!0),b=z(v,2);{var A=m=>{var w=Qn(),q=me(w,!0);tt(w,(V,F)=>Bt?.(V,F),r),X(()=>be(q,r())),W(m,w)};re(b,m=>{r()&&m(A)})}return T(o),T(c),X(m=>be(_,m),[()=>C.ui_mediaLoadingPlaceholder_title_label()]),W(a,c),it(d)}const ba="markdown-image-frame";function $n(a,t){const r=new Map,d=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=d.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},d.set(i,p)),p}function v(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function _(i,p=!1){if(!v(i))return;const k=o(i),P=sa(k.source);if(!P)return;const U=k.fallbackHost,K=U?.contains(document.activeElement)??!1;if(k.failureHandled=!1,k.fallbackHost=void 0,p&&(k.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),U){const ne=r.get(U);ne&&ft(ne),r.delete(U),U.replaceWith(i),q(),K&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,v(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,_(i)},u[p.retries++]):w(i,"load-failed"))}function A(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),k=Number(i.getAttribute("height"));if(!(p>0&&k>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${k}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${k}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const U=P.appendChild(document.createElement("span"));U.className="markdown-image-frame-placeholder",r.set(U,St(Wa,{target:U,props:{name:jn(i,t.getWorkspaceId())}}));const K=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const ne=r.get(U);ne&&(ft(ne),r.delete(U)),U.remove()};i.complete&&i.naturalWidth>0?K():(c.set(i,K),i.addEventListener("load",K,{once:!0}))}function w(i,p){const k=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=At(k),U=Ra(k,t.getWorkspaceId()),K=P?.path??U?.path,ne=P?.workspaceId??U?.workspaceId,Le=i.getAttribute("data-name")||i.getAttribute("alt")||K?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(A(i)??i).replaceWith(le),t.onMediaRemoved(i);let ie;if(i instanceof HTMLImageElement&&p==="load-failed"){const _e=o(i);_e.fallbackHost=le,v(i)&&(ie=()=>_(i,!0))}const ge=St(Vt,{target:le,props:{name:Le,reason:p,path:K,workspaceId:ne,onRetry:ie}});if(r.set(le,ge),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const _e=le.appendChild(document.createElement("span"));r.set(_e,St(Kt,{target:_e,props:{videoUrl:k,videoName:Le,sourceKind:"workspace",mimeType:_t(k,t.getWorkspaceId())?.mimeType}}))}}function q(){if(!s){for(const i of a.querySelectorAll("img"))ht(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!A(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))w(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))w(i,Gr(i));for(const[i,p]of d)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),d.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ft(p),r.delete(i))}}function V(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):w(p,"load-failed"))}const F=new MutationObserver(q);return F.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",V,!0),queueMicrotask(q),{destroy(){s=!0,F.disconnect();for(const i of d.values())i.timer!==void 0&&clearTimeout(i.timer);d.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",V,!0);for(const i of r.values())ft(i);r.clear()}}}var es=B('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),ts=B("<div></div>"),wa=B('<div role="group"><!> <!></div>'),as=B('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),rs=B("<!> <!>",1);function _a(a,t){if(new.target)return rt({component:_a,...a});ot(t,!0);const r=n=>{var f=xt(),H=Ee(f);{var S=G=>{var te=es(),He=N(te);{let fe=E(()=>e(se).getAttribute("src")||""),pe=E(()=>e(se).getAttribute("alt")||void 0);at(fr(He,{get imageUrl(){return e(fe)},get imageName(){return e(pe)},get open(){return e(h)},set open(ze){O(h,ze,!0)}}),ze=>O(g,ze,!0),()=>e(g))}T(te),at(te,fe=>O(J,fe),()=>e(J)),X(()=>pt(te,`top: ${e(qe).top??""}px; right: ${e(qe).right??""}px;`)),W(G,te)},Y=E(()=>e(se)&&ge(e(se).getAttribute("src")||""));re(H,G=>{e(Y)&&G(S)})}W(n,f)};let d=y(t,"content",7),c=y(t,"isStreaming",7,!1),u=y(t,"className",7,""),s=y(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=y(t,"relativeMediaBase",7),v=y(t,"onCodeBlockAction",7),_=y(t,"onFileClick",7),b=y(t,"canOpenFile",7),A=y(t,"allowFileMedia",7,!0),m=y(t,"taskBlockRenderMode",7,"placeholder"),w=y(t,"chatImageThumbnails",7,!1),q=y(t,"forceExternalLinks",7,!1),V=y(t,"renderRichFencesAsCode",7,!1),F=y(t,"renderDiagrams",7,!1),i=y(t,"allowSanitizedHtml",7,!1),p=y(t,"media",7);const k=Yr(),P=Ya(),U=E(()=>Vn(d(),s())),K=E(()=>e(U).some(n=>n.type==="video")),ne=E(()=>!e(K)&&e(U).length===1&&e(U)[0].type==="markdown"?e(U)[0].content:d()),Le=E(()=>Tn(e(ne)));let le=oe(null),ie=oe("");function ge(n){return kt(n,A()&&b()?.()!==!1)}const _e=E(()=>En(e(ie),A()&&b()?.()!==!1)),Ge=E(()=>pr(e(_e),s(),mr)),I=E(()=>`<div class="markdown-content">${e(Ge)}</div>`);let ee=0;const Re=150;let ve=-1/0,ce=null,ke=null;async function We(n,f,H,S){try{const Y=await Zr(n,{...f,readOnly:!0});if(S!==ee)return;O(ie,Jn(Y,H,f?.workspaceId,f?.relativeMediaBase),!0)}catch(Y){if(S!==ee)return;bt.error("Failed to process markdown:",Y);const G=n.replace(/[&<>"']/g,te=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[te]||te);O(ie,`<p>${G}</p>`)}}function de(){if(!ke)return;const n=Re-(performance.now()-ve);if(n>0){ce=setTimeout(()=>{ce=null,de()},n);return}const f=ke;ke=null,ve=performance.now(),f()}function Ze(){ce!==null&&(clearTimeout(ce),ce=null),ke=null,ve=-1/0}yt(()=>{const n=e(ne),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:V()||F(),processPrimitives:!F(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:k},H=p(),S=++ee,Y=()=>void We(n,f,H,S);c()?(ke=Y,ce===null&&de()):(Ze(),Y())});let Te=oe(void 0),se=oe(null),qe=oe(Za({top:0,right:0})),h=oe(!1),g=oe(void 0),J=oe(null);function D(n){if(n.type==="mouseover"&&ga(e(se),e(J)))return;const f=n.target,H=zt(f);if(H&&ht(H)&&ge(H.getAttribute("src")||"")){if(e(se)===H)return;O(se,H,!0),O(qe,Kn(H,n.currentTarget),!0)}else if(e(se)&&!e(h)){if(f instanceof Node&&e(J)?.contains(f))return;O(se,null)}}function ae(){!e(h)&&!ga(e(se),e(J))&&O(se,null)}function ue(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),D(n),O(h,!0))}function j(n){return $n(n,{getWorkspaceId:()=>s(),canUseMedia:ge,onMediaRemoved:f=>{e(se)===f&&O(se,null)}})}function Ie(n){const f=n.target,H=f.closest("a");if(!H&&f instanceof HTMLImageElement){const Y=f.getAttribute("src")||"";if(Ma(Y)&&ge(Y)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openImage(f);return}}if(H?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openAsset(H))return;const Y=l(n),G=s()?ta(s()):void 0;ia(H.href,{workspaceId:G,canOpenFile:b(),sourcePanelId:Y,event:n,rawHref:H.getAttribute("href")??void 0,...q()?{forceExternal:!0}:{}});return}const S=Jr(f.closest("[data-mention]"));if(S){const{type:Y,meta:G}=S;if(Y==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.filePath;bt.debug("[MarkdownViewer] File mention clicked",{filePath:te,meta:G});const He=l(n),fe=qt({event:n});if(_())_()(te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He});else{const pe=s();pe&&we.dispatch(Rr(pe,te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),we.dispatch(Er(s(),Qr(S.folderPath)))}else if(Y==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.note.id;bt.debug("[MarkdownViewer] Note mention clicked",{noteId:te,meta:G});const He=l(n),fe=qt({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(te,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:He,event:n});return}const pe=s();pe&&we.dispatch(Pr(pe,te,{openInAdjacentPanel:fe,sourcePanelId:He}))}}}function Fe(n){if(De(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&ht(n.target)&&(n.key==="Enter"||n.key===" ")){Ie(n);return}n.key!=="Enter"||!qt({event:n})||Ie(n)}}function De(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||e(g)?.handleCopy(n,f.getAttribute("src")||"")}function l(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Ja(()=>{ee+=1,Ze()});var M={get content(){return d()},set content(n){d(n),x()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),x()},get className(){return u()},set className(n=""){u(n),x()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),x()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),x()},get onCodeBlockAction(){return v()},set onCodeBlockAction(n){v(n),x()},get onFileClick(){return _()},set onFileClick(n){_(n),x()},get canOpenFile(){return b()},set canOpenFile(n){b(n),x()},get allowFileMedia(){return A()},set allowFileMedia(n=!0){A(n),x()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),x()},get chatImageThumbnails(){return w()},set chatImageThumbnails(n=!1){w(n),x()},get forceExternalLinks(){return q()},set forceExternalLinks(n=!1){q(n),x()},get renderRichFencesAsCode(){return V()},set renderRichFencesAsCode(n=!1){V(n),x()},get renderDiagrams(){return F()},set renderDiagrams(n=!1){F(n),x()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),x()},get media(){return p()},set media(n){p(n),x()},$set:nt,$on:(n,f)=>st(t,n,f)},L=rs(),Q=Ee(L);{var ye=n=>{var f=ts();Ut(f,21,()=>e(U),$a,(H,S)=>{var Y=xt(),G=Ee(Y);{var te=fe=>{Fa(fe,{get allowFileMedia(){return A()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},He=fe=>{_a(fe,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return v()},get onFileClick(){return _()},get canOpenFile(){return b()},get allowFileMedia(){return A()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return w()},get forceExternalLinks(){return q()},get renderRichFencesAsCode(){return V()},get renderDiagrams(){return F()},get allowSanitizedHtml(){return i()},get media(){return p()}})};re(G,fe=>{e(S).type==="video"?fe(te):fe(He,-1)})}W(H,Y)}),T(f),X(()=>Pe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),W(n,f)},he=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)},xe=n=>{var f=as(),H=N(f),S=me(H,!0);T(f),X(()=>{Pe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),be(S,e(ne))}),W(n,f)},Ne=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),at(f,G=>O(le,G),()=>e(le)),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)};re(Q,n=>{e(K)?n(ye):c()?n(he,1):e(Le)==="simple"&&!i()?n(xe,2):n(Ne,-1)})}var Ae=z(Q,2);return at(Ta(Ae,{get workspaceId(){return s()},canUseMedia:ge}),n=>O(Te,n,!0),()=>e(Te)),W(a,L),it(M)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ts{constructor(t){dt(this,"container");dt(this,"previousFocus",null);dt(this,"firstFocusable",null);dt(this,"lastFocusable",null);dt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Fs(a,t){const r=_=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(_);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},d=_=>{const[b,A,m]=[_.r,_.g,_.b].map(w=>(w=w/255,w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4)));return .2126*b+.7152*A+.0722*m},c=r(a),u=r(t);if(!c||!u)return bt.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=d(c),o=d(u),v=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:v,passes:{aa:v>=4.5,aaa:v>=7}}}export{Fa as C,Ts as F,Rn as H,_a as M,Rs as W,Wa as a,fa as b,An as c,Pa as d,Fs as e,Cn as f,Ps as g,Ea as h,on as r,Vn as s,Es as w};
|
|
6
|
+
`)),F=ma(V?.path,t);if(F){u(),d.push({type:"video",source:F,name:typeof V.path=="string"?V.path:void 0,poster:typeof V.poster=="string"?V.poster:void 0}),s=w;continue}}catch{}c.push(...q),s=w;continue}c.push(...r.slice(s));break}const _=!/^(?: {4}|\t)/.test(r[s])&&Un(r,s)?r[s].match(qn):null;if(!_){c.push(r[s]);continue}const[,b,A]=_,m=ma(A,t);m?(u(),d.push({type:"video",source:m,name:b||void 0})):A.startsWith("workspace-asset://")&&!Kr(A)||zn(A,t)?c.push(r[s]):c.push(`[${b}](${A})`)}return u(),d}function ht(a){return Ma(a.getAttribute("src")||"")}function zt(a){return a instanceof HTMLImageElement?a:a instanceof HTMLAnchorElement?a.querySelector("img"):null}function Kn(a,t){const r=a.getBoundingClientRect(),d=t.getBoundingClientRect();return{top:r.top-d.top+6,right:d.right-r.right+6}}function ga(a,t){const r=document.activeElement;return!!(r&&(r===a||r===a?.closest("a")||t?.contains(r)))}function jn(a,t){const r=a.getAttribute("src")||"",d=At(r)?.path??Ra(r,t)?.path;if(d)return d;if(r.startsWith("workspace-asset://")){const c=r.split(/[?#]/)[0].split("/").pop();if(c)return c}if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)&&!r.startsWith("//"))try{return decodeURI(r)}catch{return r}return a.getAttribute("alt")||void 0}const La="data-image-sized",va=a=>typeof a=="number"&&Number.isInteger(a)&&a>0;function Gn(a){try{return encodeURI(a).replace(/%25/g,"%")}catch{return null}}function Yn(a){return a.startsWith("workspace-file://")?a.split(/[?#]/)[0]:a}function Zn(a,t,r){const d=new Map;for(const[c,u]of Object.entries(a)){if(!u||!va(u.width)||!va(u.height))continue;const s={width:u.width,height:u.height},o=new Set([c]),v=Gn(c);v&&o.add(v);for(const _ of[...o]){const b=Et(_,t);if(b&&o.add(b),r!==void 0){const A=jr(_,r);if(A){const m=Et(`intent://local/file/${A.split("/").map(encodeURIComponent).join("/")}`,t);m&&o.add(m)}}}for(const _ of o)d.has(_)||d.set(_,s)}return d}function Jn(a,t,r,d){if(!t||!a.includes("<img"))return a;const c=Zn(t,r,d);return c.size===0?a:a.replace(/<img\b(?:[^>"']|"[^"]*"|'[^']*')*>/gi,u=>{if(/\s(?:width|height)="/i.test(u))return u;const s=/\ssrc="([^"]*)"/i.exec(u);if(!s)return u;const o=Yn(s[1].replace(/&/g,"&")),v=c.get(o);return v?u.replace(/\s*\/?>$/,` width="${v.width}" height="${v.height}" ${La}="">`):u})}function ha(a,t){let r=t,d,c=!1,u=!1;const s=new Map;function o(){for(const[b,{component:A,source:m}]of s)ft(A),a.contains(b)&&b.replaceWith(m);s.clear()}function v(){if(!u){for(const[b,{component:A}]of s)a.contains(b)||(ft(A),s.delete(b));if(r.enabled)for(const b of a.querySelectorAll("pre > code")){if(b.closest("[data-markdown-diagram]"))continue;const A=[...b.classList].find(F=>F.startsWith("language-"))?.slice(9);let m;if(A==="mermaid")m="mermaid";else if(A==="diagram"||A==="ws-block:diagram")m="diagram";else if(A==="ws-block")try{if(JSON.parse(b.textContent??"").type!=="diagram")continue;m="diagram"}catch{continue}else continue;const w=b.parentElement;if(!w)continue;if(!d){c||(c=!0,ka(()=>import("./zzo-K1GZ.js"),__vite__mapDeps([66,2,1,67,48,68,50,14,7,9,10,11,12,3,13,15,25,18,6,8,51,17,16,19,20,52,5,49,46,41,28,38,36,47,53,54,55,56,57,58,59,69,70,0,4,21,22,23,24,26,27,29,30,31,32,33,34,35,37,39,40,42,43,44,45,60,61,62,63,64,65,71,72,73,74,75,76,77,78]),import.meta.url).then(F=>{d=F.default,c=!1,v()}).catch(F=>{c=!1,bt.error("Failed to load the Markdown diagram renderer",{error:F})}));return}const q=document.createElement("div");q.dataset.markdownDiagram=m,w.replaceWith(q);const V=St(d,{target:q,context:r.context,props:{kind:m,source:b.textContent??"",workspaceId:r.workspaceId}});s.set(q,{component:V,source:w})}}}const _=new MutationObserver(v);return _.observe(a,{childList:!0,subtree:!0}),queueMicrotask(v),{update(b){(r.enabled!==b.enabled||r.workspaceId!==b.workspaceId)&&o(),r=b,v()},destroy(){u=!0,_.disconnect(),o()}}}var Qn=B('<span class="min-w-0 max-w-full truncate"> </span>'),Xn=B('<span class="type-caption flex min-w-0 max-w-full items-start gap-2 whitespace-normal py-1 text-muted-foreground" role="status" data-testid="media-loading-placeholder"><span class="first-line-icon" aria-hidden="true"><!></span> <span class="flex min-w-0 flex-wrap items-baseline gap-x-1.5"><span> </span> <!></span></span>');function Wa(a,t){if(new.target)return rt({component:Wa,...a});ot(t,!0);let r=y(t,"name",7);var d={get name(){return r()},set name(m){r(m),x()},$set:nt,$on:(m,w)=>st(t,m,w)},c=Xn(),u=N(c),s=N(u);wt(s,{get icon(){return Ur},class:"size-3.5"}),T(u);var o=z(u,2),v=N(o),_=me(v,!0),b=z(v,2);{var A=m=>{var w=Qn(),q=me(w,!0);tt(w,(V,F)=>Bt?.(V,F),r),X(()=>be(q,r())),W(m,w)};re(b,m=>{r()&&m(A)})}return T(o),T(c),X(m=>be(_,m),[()=>C.ui_mediaLoadingPlaceholder_title_label()]),W(a,c),it(d)}const ba="markdown-image-frame";function $n(a,t){const r=new Map,d=new Map,c=new Map,u=[300,1e3];let s=!1;function o(i){let p=d.get(i);return p||(p={source:i.getAttribute("src")||"",workspaceId:t.getWorkspaceId(),retries:0,failureHandled:!1},d.set(i,p)),p}function v(i){const p=o(i);return!s&&a.contains(p.fallbackHost??i)&&p.workspaceId===t.getWorkspaceId()&&t.canUseMedia(p.source)&&!i.hasAttribute("data-media-unavailable")&&!i.hasAttribute("data-media-unsupported")&&sa(p.source)!==null}function _(i,p=!1){if(!v(i))return;const k=o(i),P=sa(k.source);if(!P)return;const U=k.fallbackHost,K=U?.contains(document.activeElement)??!1;if(k.failureHandled=!1,k.fallbackHost=void 0,p&&(k.retries=0),i.removeAttribute("src"),i.setAttribute("src",P),U){const ne=r.get(U);ne&&ft(ne),r.delete(U),U.replaceWith(i),q(),K&&a.contains(i)&&i.focus()}}function b(i){const p=o(i);s||!a.contains(i)||p.failureHandled||(p.failureHandled=!0,v(i)&&p.retries<u.length?p.timer=setTimeout(()=>{p.timer=void 0,_(i)},u[p.retries++]):w(i,"load-failed"))}function A(i){const p=i.parentElement;return p?.classList.contains(ba)?p:null}function m(i){const p=Number(i.getAttribute("width")),k=Number(i.getAttribute("height"));if(!(p>0&&k>0))return;const P=document.createElement("span");P.className=ba,P.style.aspectRatio=`${p} / ${k}`,P.style.setProperty("--image-aspect-ratio",`${p} / ${k}`),P.style.width=`min(${p}px, 100%)`,P.dataset.loaded="false",i.replaceWith(P),P.appendChild(i);const U=P.appendChild(document.createElement("span"));U.className="markdown-image-frame-placeholder",r.set(U,St(Wa,{target:U,props:{name:jn(i,t.getWorkspaceId())}}));const K=()=>{if(c.delete(i),s||!a.contains(P))return;P.dataset.loaded="true";const ne=r.get(U);ne&&(ft(ne),r.delete(U)),U.remove()};i.complete&&i.naturalWidth>0?K():(c.set(i,K),i.addEventListener("load",K,{once:!0}))}function w(i,p){const k=i.getAttribute("src")||i.getAttribute("data-media-src")||"",P=At(k),U=Ra(k,t.getWorkspaceId()),K=P?.path??U?.path,ne=P?.workspaceId??U?.workspaceId,Le=i.getAttribute("data-name")||i.getAttribute("alt")||K?.split("/").pop()||void 0,le=document.createElement(i instanceof HTMLVideoElement?"div":"span");le.className="media-unavailable-host",(A(i)??i).replaceWith(le),t.onMediaRemoved(i);let ie;if(i instanceof HTMLImageElement&&p==="load-failed"){const _e=o(i);_e.fallbackHost=le,v(i)&&(ie=()=>_(i,!0))}const ge=St(Vt,{target:le,props:{name:Le,reason:p,path:K,workspaceId:ne,onRetry:ie}});if(r.set(le,ge),i instanceof HTMLVideoElement){le.classList.add("flex","items-center","gap-2");const _e=le.appendChild(document.createElement("span"));r.set(_e,St(Kt,{target:_e,props:{videoUrl:k,videoName:Le,sourceKind:"workspace",mimeType:_t(k,t.getWorkspaceId())?.mimeType}}))}}function q(){if(!s){for(const i of a.querySelectorAll("img"))ht(i)&&!i.closest("a")&&(i.tabIndex=0,i.setAttribute("role","button")),!(i.hasAttribute("data-media-unsupported")||i.hasAttribute("data-media-unavailable"))&&(o(i),i.hasAttribute(La)&&!A(i)&&m(i),i.getAttribute("src")&&i.complete&&i.naturalWidth===0&&b(i));for(const i of a.querySelectorAll("[data-media-unsupported]"))w(i,"unsupported");for(const i of a.querySelectorAll("[data-media-unavailable]"))w(i,Gr(i));for(const[i,p]of d)a.contains(p.fallbackHost??i)||(p.timer!==void 0&&clearTimeout(p.timer),d.delete(i));for(const[i,p]of c)a.contains(i)||(i.removeEventListener("load",p),c.delete(i));for(const[i,p]of r)a.contains(i)||(ft(p),r.delete(i))}}function V(i){const p=i.target;(p instanceof HTMLImageElement||p instanceof HTMLVideoElement)&&(p instanceof HTMLImageElement?b(p):w(p,"load-failed"))}const F=new MutationObserver(q);return F.observe(a,{childList:!0,subtree:!0}),a.addEventListener("error",V,!0),queueMicrotask(q),{destroy(){s=!0,F.disconnect();for(const i of d.values())i.timer!==void 0&&clearTimeout(i.timer);d.clear();for(const[i,p]of c)i.removeEventListener("load",p);c.clear(),a.removeEventListener("error",V,!0);for(const i of r.values())ft(i);r.clear()}}}var es=B('<div class="image-actions-overlay absolute z-10 svelte-nzvuq5" data-testid="markdown-image-actions-overlay"><!></div>'),ts=B("<div></div>"),wa=B('<div role="group"><!> <!></div>'),as=B('<div><p class="whitespace-pre-wrap svelte-nzvuq5"> </p></div>'),rs=B("<!> <!>",1);function _a(a,t){if(new.target)return rt({component:_a,...a});ot(t,!0);const r=n=>{var f=xt(),H=Ee(f);{var S=G=>{var te=es(),He=N(te);{let fe=E(()=>e(se).getAttribute("src")||""),pe=E(()=>e(se).getAttribute("alt")||void 0);at(fr(He,{get imageUrl(){return e(fe)},get imageName(){return e(pe)},get open(){return e(h)},set open(ze){O(h,ze,!0)}}),ze=>O(g,ze,!0),()=>e(g))}T(te),at(te,fe=>O(J,fe),()=>e(J)),X(()=>pt(te,`top: ${e(qe).top??""}px; right: ${e(qe).right??""}px;`)),W(G,te)},Y=E(()=>e(se)&&ge(e(se).getAttribute("src")||""));re(H,G=>{e(Y)&&G(S)})}W(n,f)};let d=y(t,"content",7),c=y(t,"isStreaming",7,!1),u=y(t,"className",7,""),s=y(t,"workspaceId",23,()=>ca()?.workspaceId??void 0),o=y(t,"relativeMediaBase",7),v=y(t,"onCodeBlockAction",7),_=y(t,"onFileClick",7),b=y(t,"canOpenFile",7),A=y(t,"allowFileMedia",7,!0),m=y(t,"taskBlockRenderMode",7,"placeholder"),w=y(t,"chatImageThumbnails",7,!1),q=y(t,"forceExternalLinks",7,!1),V=y(t,"renderRichFencesAsCode",7,!1),F=y(t,"renderDiagrams",7,!1),i=y(t,"allowSanitizedHtml",7,!1),p=y(t,"media",7);const k=Yr(),P=Ya(),U=E(()=>Vn(d(),s())),K=E(()=>e(U).some(n=>n.type==="video")),ne=E(()=>!e(K)&&e(U).length===1&&e(U)[0].type==="markdown"?e(U)[0].content:d()),Le=E(()=>Tn(e(ne)));let le=oe(null),ie=oe("");function ge(n){return kt(n,A()&&b()?.()!==!1)}const _e=E(()=>En(e(ie),A()&&b()?.()!==!1)),Ge=E(()=>pr(e(_e),s(),mr)),I=E(()=>`<div class="markdown-content">${e(Ge)}</div>`);let ee=0;const Re=150;let ve=-1/0,ce=null,ke=null;async function We(n,f,H,S){try{const Y=await Zr(n,{...f,readOnly:!0});if(S!==ee)return;O(ie,Jn(Y,H,f?.workspaceId,f?.relativeMediaBase),!0)}catch(Y){if(S!==ee)return;bt.error("Failed to process markdown:",Y);const G=n.replace(/[&<>"']/g,te=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[te]||te);O(ie,`<p>${G}</p>`)}}function de(){if(!ke)return;const n=Re-(performance.now()-ve);if(n>0){ce=setTimeout(()=>{ce=null,de()},n);return}const f=ke;ke=null,ve=performance.now(),f()}function Ze(){ce!==null&&(clearTimeout(ce),ce=null),ke=null,ve=-1/0}yt(()=>{const n=e(ne),f={allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!0,taskBlockRenderMode:m(),workspaceId:s(),relativeMediaBase:o()??(s()&&s()!==Sr?"":void 0),renderRichFencesAsCode:V()||F(),processPrimitives:!F(),allowSanitizedHtml:i(),renderMath:!c(),workspaceFileVersion:k},H=p(),S=++ee,Y=()=>void We(n,f,H,S);c()?(ke=Y,ce===null&&de()):(Ze(),Y())});let Te=oe(void 0),se=oe(null),qe=oe(Za({top:0,right:0})),h=oe(!1),g=oe(void 0),J=oe(null);function D(n){if(n.type==="mouseover"&&ga(e(se),e(J)))return;const f=n.target,H=zt(f);if(H&&ht(H)&&ge(H.getAttribute("src")||"")){if(e(se)===H)return;O(se,H,!0),O(qe,Kn(H,n.currentTarget),!0)}else if(e(se)&&!e(h)){if(f instanceof Node&&e(J)?.contains(f))return;O(se,null)}}function ae(){!e(h)&&!ga(e(se),e(J))&&O(se,null)}function ue(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||(n.preventDefault(),n.stopPropagation(),D(n),O(h,!0))}function j(n){return $n(n,{getWorkspaceId:()=>s(),canUseMedia:ge,onMediaRemoved:f=>{e(se)===f&&O(se,null)}})}function Ie(n){const f=n.target,H=f.closest("a");if(!H&&f instanceof HTMLImageElement){const Y=f.getAttribute("src")||"";if(Ma(Y)&&ge(Y)){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openImage(f);return}}if(H?.href){if(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),e(Te)?.openAsset(H))return;const Y=l(n),G=s()?ta(s()):void 0;ia(H.href,{workspaceId:G,canOpenFile:b(),sourcePanelId:Y,event:n,rawHref:H.getAttribute("href")??void 0,...q()?{forceExternal:!0}:{}});return}const S=Jr(f.closest("[data-mention]"));if(S){const{type:Y,meta:G}=S;if(Y==="file"&&S.filePath){if(b()?.()===!1)return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.filePath;bt.debug("[MarkdownViewer] File mention clicked",{filePath:te,meta:G});const He=l(n),fe=qt({event:n});if(_())_()(te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He});else{const pe=s();pe&&we.dispatch(Rr(pe,te,{line:S.line,openInAdjacentPanel:fe,sourcePanelId:He}))}}else if(S.folderPath!==void 0){if(b()?.()===!1||!s())return;n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),we.dispatch(Er(s(),Qr(S.folderPath)))}else if(Y==="note"&&S.note){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation();const te=S.note.id;bt.debug("[MarkdownViewer] Note mention clicked",{noteId:te,meta:G});const He=l(n),fe=qt({event:n});if(S.note.workspaceId&&S.note.workspaceId!==s()){ia(ir(te,S.note.workspaceId),{workspaceId:s()?ta(s()):void 0,sourcePanelId:He,event:n});return}const pe=s();pe&&we.dispatch(Pr(pe,te,{openInAdjacentPanel:fe,sourcePanelId:He}))}}}function Fe(n){if(De(n),!n.defaultPrevented){if(n.target instanceof HTMLImageElement&&ht(n.target)&&(n.key==="Enter"||n.key===" ")){Ie(n);return}n.key!=="Enter"||!qt({event:n})||Ie(n)}}function De(n){const f=zt(n.target);!f||!ht(f)||!ge(f.getAttribute("src")||"")||e(g)?.handleCopy(n,f.getAttribute("src")||"")}function l(n){const f=n.target;if(f instanceof HTMLElement)return f.closest("[data-panel-id]")?.dataset.panelId}Ja(()=>{ee+=1,Ze()});var M={get content(){return d()},set content(n){d(n),x()},get isStreaming(){return c()},set isStreaming(n=!1){c(n),x()},get className(){return u()},set className(n=""){u(n),x()},get workspaceId(){return s()},set workspaceId(n=ca()?.workspaceId??void 0){s(n),x()},get relativeMediaBase(){return o()},set relativeMediaBase(n){o(n),x()},get onCodeBlockAction(){return v()},set onCodeBlockAction(n){v(n),x()},get onFileClick(){return _()},set onFileClick(n){_(n),x()},get canOpenFile(){return b()},set canOpenFile(n){b(n),x()},get allowFileMedia(){return A()},set allowFileMedia(n=!0){A(n),x()},get taskBlockRenderMode(){return m()},set taskBlockRenderMode(n="placeholder"){m(n),x()},get chatImageThumbnails(){return w()},set chatImageThumbnails(n=!1){w(n),x()},get forceExternalLinks(){return q()},set forceExternalLinks(n=!1){q(n),x()},get renderRichFencesAsCode(){return V()},set renderRichFencesAsCode(n=!1){V(n),x()},get renderDiagrams(){return F()},set renderDiagrams(n=!1){F(n),x()},get allowSanitizedHtml(){return i()},set allowSanitizedHtml(n=!1){i(n),x()},get media(){return p()},set media(n){p(n),x()},$set:nt,$on:(n,f)=>st(t,n,f)},L=rs(),Q=Ee(L);{var ye=n=>{var f=ts();Ut(f,21,()=>e(U),$a,(H,S)=>{var Y=xt(),G=Ee(Y);{var te=fe=>{Fa(fe,{get allowFileMedia(){return A()},get canOpenFile(){return b()},get source(){return e(S).source},get name(){return e(S).name},get poster(){return e(S).poster}})},He=fe=>{_a(fe,{get content(){return e(S).content},get isStreaming(){return c()},get workspaceId(){return s()},get relativeMediaBase(){return o()},get onCodeBlockAction(){return v()},get onFileClick(){return _()},get canOpenFile(){return b()},get allowFileMedia(){return A()},get taskBlockRenderMode(){return m()},get chatImageThumbnails(){return w()},get forceExternalLinks(){return q()},get renderRichFencesAsCode(){return V()},get renderDiagrams(){return F()},get allowSanitizedHtml(){return i()},get media(){return p()}})};re(G,fe=>{e(S).type==="video"?fe(te):fe(He,-1)})}W(H,Y)}),T(f),X(()=>Pe(f,1,`markdown-video-segments ${u()??""}`,"svelte-nzvuq5")),W(n,f)},he=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer streaming-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)},xe=n=>{var f=as(),H=N(f),S=me(H,!0);T(f),X(()=>{Pe(f,1,`markdown-viewer simple-content ${u()??""}`,"svelte-nzvuq5"),be(S,e(ne))}),W(n,f)},Ne=n=>{var f=wa();let H;var S=N(f);oa(S,()=>e(I));var Y=z(S,2);r(Y),T(f),at(f,G=>O(le,G),()=>e(le)),tt(f,G=>j?.(G)),tt(f,(G,te)=>ha?.(G,te),()=>({enabled:F(),workspaceId:s(),context:P})),X(()=>H=Pe(f,1,`markdown-viewer static-content ${u()??""}`,"svelte-nzvuq5",H,{"chat-image-thumbnails":w()})),Se("click",f,Ie),Se("keydown",f,Fe),Be("copy",f,De),Se("contextmenu",f,ue),Se("mouseover",f,D),Se("focusin",f,D),Be("mouseleave",f,ae),W(n,f)};re(Q,n=>{e(K)?n(ye):c()?n(he,1):e(Le)==="simple"&&!i()?n(xe,2):n(Ne,-1)})}var Ae=z(Q,2);return at(Ta(Ae,{get workspaceId(){return s()},canUseMedia:ge}),n=>O(Te,n,!0),()=>e(Te)),W(a,L),it(M)}xa(["click","keydown","contextmenu","mouseover","focusin"]);class Ts{constructor(t){dt(this,"container");dt(this,"previousFocus",null);dt(this,"firstFocusable",null);dt(this,"lastFocusable",null);dt(this,"handleKeyDown");this.container=t,this.handleKeyDown=this.onKeyDown.bind(this)}activate(){this.previousFocus=document.activeElement;const t=this.container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])');t.length>0&&(this.firstFocusable=t[0],this.lastFocusable=t[t.length-1],this.firstFocusable.focus()),document.addEventListener("keydown",this.handleKeyDown)}deactivate(){document.removeEventListener("keydown",this.handleKeyDown),this.previousFocus&&this.previousFocus.focus()}onKeyDown(t){t.key==="Tab"&&(!this.firstFocusable||!this.lastFocusable||(t.shiftKey?document.activeElement===this.firstFocusable&&(t.preventDefault(),this.lastFocusable.focus()):document.activeElement===this.lastFocusable&&(t.preventDefault(),this.firstFocusable.focus())))}}function Fs(a,t){const r=_=>{const b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(_);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},d=_=>{const[b,A,m]=[_.r,_.g,_.b].map(w=>(w=w/255,w<=.03928?w/12.92:Math.pow((w+.055)/1.055,2.4)));return .2126*b+.7152*A+.0722*m},c=r(a),u=r(t);if(!c||!u)return bt.warn("Invalid color values for contrast check",{foreground:a,background:t}),{ratio:0,passes:{aa:!1,aaa:!1}};const s=d(c),o=d(u),v=(Math.max(s,o)+.05)/(Math.min(s,o)+.05);return{ratio:v,passes:{aa:v>=4.5,aaa:v>=7}}}export{Fa as C,Ts as F,Rn as H,_a as M,Rs as W,Wa as a,fa as b,An as c,Pa as d,Fs as e,Cn as f,Ps as g,Ea as h,on as r,Vn as s,Es as w};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as pr}from"./DRlYzKsv.js";import{b as f,a$ as Er,X as j,aW as Kt,ay as nt,P as Ue,B as ur,h as fr,z as N,a_ as Ke,aZ as _r,b0 as gr,V as xr,U as yr,Y as Ir,ax as Rr,J as Or,r as Lr,aV as Ft,bh as Q,aa as tt,l as vt,aH as Ge,Z as br,W as zt,a7 as mr,aQ as Xe}from"./DYJF6z7c.js";import{d as Sr,h as le,g as pt,e as Ar,a as he,b as de}from"./DwdKjBer.js";var ne=(function(){var e=f(function(_t,w,C,D){for(C=C||{},D=_t.length;D--;C[_t[D]]=w);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],o=[1,9],s=[1,11],n=[1,12],h=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],L=[1,25],g=[1,26],R=[1,27],T=[1,28],O=[1,29],x=[1,30],m=[1,31],S=[1,32],b=[1,33],P=[1,34],k=[1,35],B=[1,36],V=[1,37],H=[1,38],z=[1,39],X=[1,40],et=[1,42],rt=[1,43],U=[1,44],ot=[1,45],at=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Z=[1,56],Mt=[1,75],A=[1,81],v=[1,82],dt=[1,83],st=[1,84],K=[1,85],mt=[1,86],pe=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],_e=[1,91],ge=[1,92],xe=[1,93],ye=[1,94],Ie=[1,95],Re=[1,96],Oe=[1,97],Le=[1,98],be=[1,99],me=[1,100],Se=[1,101],Ae=[1,102],we=[1,103],Ne=[1,104],Pe=[1,105],ke=[1,106],De=[2,79],ve=[2,78],Pt=[4,5,17,51,53,54],Bt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],$t=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],jt=[5,52],F=[62,70,71,72,73],Be=[62,73],lt=[1,152],te={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(w,C,D,y,G,c,kt){var p=c.length-1;switch(G){case 3:return y.apply(c[p]),c[p];case 4:case 10:this.$=[];break;case 5:case 11:c[p-1].push(c[p]),this.$=c[p-1];break;case 6:case 7:case 12:case 13:this.$=c[p];break;case 8:case 9:case 14:this.$=[];break;case 16:c[p].type="createParticipant",this.$=c[p];break;case 17:c[p-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[p-2])}),c[p-1].push({type:"boxEnd",boxText:c[p-2]}),this.$=c[p-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-2]),sequenceIndexStep:Number(c[p-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-1].actor};break;case 30:y.setDiagramTitle(c[p].substring(6)),this.$=c[p].substring(6);break;case 31:y.setDiagramTitle(c[p].substring(7)),this.$=c[p].substring(7);break;case 32:this.$=c[p].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[p].trim(),y.setAccDescription(this.$);break;case 35:c[p-1].unshift({type:"loopStart",loopText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.LOOP_START}),c[p-1].push({type:"loopEnd",loopText:c[p-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[p-1];break;case 36:c[p-1].unshift({type:"rectStart",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_START}),c[p-1].push({type:"rectEnd",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[p-1];break;case 37:c[p-1].unshift({type:"optStart",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_START}),c[p-1].push({type:"optEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[p-1];break;case 38:c[p-1].unshift({type:"altStart",altText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.ALT_START}),c[p-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[p-1];break;case 39:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 40:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 41:c[p-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.CRITICAL_START}),c[p-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[p-1];break;case 42:c[p-1].unshift({type:"breakStart",breakText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_START}),c[p-1].push({type:"breakEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[p-1];break;case 44:this.$=c[p-3].concat([{type:"option",optionText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[p]]);break;case 46:this.$=c[p-3].concat([{type:"and",parText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.PAR_AND},c[p]]);break;case 48:this.$=c[p-3].concat([{type:"else",altText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.ALT_ELSE},c[p]]);break;case 49:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 50:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 51:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 52:case 57:c[p-1].draw="actor",c[p-1].type="addParticipant",this.$=c[p-1];break;case 53:c[p-1].type="destroyParticipant",this.$=c[p-1];break;case 54:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 55:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 56:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 58:this.$=[c[p-1],{type:"addNote",placement:c[p-2],actor:c[p-1].actor,text:c[p]}];break;case 59:c[p-2]=[].concat(c[p-1],c[p-1]).slice(0,2),c[p-2][0]=c[p-2][0].actor,c[p-2][1]=c[p-2][1].actor,this.$=[c[p-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[p-2].slice(0,2),text:c[p]}];break;case 60:this.$=[c[p-1],{type:"addLinks",actor:c[p-1].actor,text:c[p]}];break;case 61:this.$=[c[p-1],{type:"addALink",actor:c[p-1].actor,text:c[p]}];break;case 62:this.$=[c[p-1],{type:"addProperties",actor:c[p-1].actor,text:c[p]}];break;case 63:this.$=[c[p-1],{type:"addDetails",actor:c[p-1].actor,text:c[p]}];break;case 66:this.$=[c[p-2],c[p]];break;case 67:this.$=c[p];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor}];break;case 71:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-4].actor}];break;case 72:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor}];break;case 73:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-4].actor}];break;case 74:this.$=[c[p-5],c[p-1],{type:"addMessage",from:c[p-5].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-5].actor}];break;case 75:this.$=[c[p-3],c[p-1],{type:"addMessage",from:c[p-3].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p]}];break;case 76:this.$={type:"addParticipant",actor:c[p-1],config:c[p]};break;case 77:this.$=c[p-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:c[p]};break;case 80:this.$=y.LINETYPE.SOLID_OPEN;break;case 81:this.$=y.LINETYPE.DOTTED_OPEN;break;case 82:this.$=y.LINETYPE.SOLID;break;case 83:this.$=y.LINETYPE.SOLID_TOP;break;case 84:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=y.LINETYPE.STICK_TOP;break;case 86:this.$=y.LINETYPE.STICK_BOTTOM;break;case 87:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=y.LINETYPE.DOTTED;break;case 101:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=y.LINETYPE.SOLID_CROSS;break;case 103:this.$=y.LINETYPE.DOTTED_CROSS;break;case 104:this.$=y.LINETYPE.SOLID_POINT;break;case 105:this.$=y.LINETYPE.DOTTED_POINT;break;case 106:this.$=y.parseMessage(c[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,5]),{9:48,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:H,53:z,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:Z,73:W},{23:57,62:Z,73:W},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(M,[2,30]),e(M,[2,31]),{33:[1,63]},{35:[1,64]},e(M,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:Z,73:Mt},{23:76,55:77,62:Z,73:Mt},{23:78,62:Z,73:W},{69:79,72:[1,80],78:A,79:v,80:dt,81:st,82:K,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:Z,73:W},e([72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],De,{23:112,62:Z,73:W}),{23:113,62:Z,73:W},{23:114,62:Z,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ve),e(M,[2,6]),e(M,[2,16]),e(Pt,[2,10],{11:115}),e(M,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(M,[2,22]),{5:[1,119]},e([5,52,66,104],De),{5:[1,120]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Bt,i,{7:121}),e(Bt,i,{7:122}),e(Bt,i,{7:123}),e(Ce,i,{41:124,7:125}),e($t,i,{43:126,7:127}),e($t,i,{7:127,43:128}),e(Me,i,{46:129,7:130}),e(Bt,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(jt,ve,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:Z,70:[1,143],71:[1,144],72:[1,145],73:W},{69:147,78:A,79:v,80:dt,81:st,82:K,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),e(F,[2,105]),{23:148,62:Z,73:W},{23:150,60:149,62:Z,73:W},e(Be,[2,68]),e(Be,[2,69]),{58:151,104:lt},{58:153,104:lt},{58:154,104:lt},{58:155,104:lt},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:H,53:z,54:X},{5:[1,161]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,164],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,165]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,50:[1,166],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,167]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,49:[1,168],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,169]},{17:[1,170]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,48:[1,171],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,172],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{16:[1,173]},e(M,[2,50]),{16:[1,174]},e(M,[2,55]),e(jt,[2,76]),{76:[1,175]},{16:[1,176]},e(M,[2,52]),{16:[1,177]},e(M,[2,57]),e(M,[2,53]),{23:178,62:Z,73:W},{23:179,62:Z,73:W},{23:180,62:Z,73:W},{58:181,104:lt},{23:182,62:Z,72:[1,183],73:W},{58:184,104:lt},{58:185,104:lt},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(Pt,[2,11]),{13:187,51:H,53:z,54:X},e(Pt,[2,13]),e(Pt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,188]},e(M,[2,39]),{16:[1,189]},e(M,[2,40]),e(M,[2,41]),{16:[1,190]},e(M,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:lt},{58:197,104:lt},{58:198,104:lt},{5:[2,75]},{58:199,104:lt},{23:200,62:Z,73:W},{5:[2,58]},{5:[2,59]},{23:201,62:Z,73:W},e(Pt,[2,12]),e(Ce,i,{7:125,41:202}),e($t,i,{7:127,43:203}),e(Me,i,{7:130,46:204}),e(M,[2,49]),e(M,[2,54]),e(jt,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:f(function(w,C){if(C.recoverable)this.trace(w);else{var D=new Error(w);throw D.hash=C,D}},"parseError"),parse:f(function(w){var C=this,D=[0],y=[],G=[null],c=[],kt=this.table,p="",Vt=0,Ye=0,lr=2,Ve=1,hr=c.slice.call(arguments,1),$=Object.create(this.lexer),It={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(It.yy[ee]=this.yy[ee]);$.setInput(w,It.yy),It.yy.lexer=$,It.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var re=$.yylloc;c.push(re);var dr=$.options&&$.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tr(ct){D.length=D.length-2*ct,G.length=G.length-ct,c.length=c.length-ct}f(Tr,"popStack");function We(){var ct;return ct=y.pop()||$.lex()||Ve,typeof ct!="number"&&(ct instanceof Array&&(y=ct,ct=y.pop()),ct=C.symbols_[ct]||ct),ct}f(We,"lex");for(var it,Rt,ht,ae,St={},Wt,Et,He,Ht;;){if(Rt=D[D.length-1],this.defaultActions[Rt]?ht=this.defaultActions[Rt]:((it===null||typeof it>"u")&&(it=We()),ht=kt[Rt]&&kt[Rt][it]),typeof ht>"u"||!ht.length||!ht[0]){var se="";Ht=[];for(Wt in kt[Rt])this.terminals_[Wt]&&Wt>lr&&Ht.push("'"+this.terminals_[Wt]+"'");$.showPosition?se="Parse error on line "+(Vt+1)+`:
|
|
1
|
+
import{I as pr}from"./DH9p1XHN.js";import{b as f,a$ as Er,X as j,aW as Kt,ay as nt,P as Ue,B as ur,h as fr,z as N,a_ as Ke,aZ as _r,b0 as gr,V as xr,U as yr,Y as Ir,ax as Rr,J as Or,r as Lr,aV as Ft,bh as Q,aa as tt,l as vt,aH as Ge,Z as br,W as zt,a7 as mr,aQ as Xe}from"./CvYPF82-.js";import{d as Sr,h as le,g as pt,e as Ar,a as he,b as de}from"./o3OBOoSf.js";var ne=(function(){var e=f(function(_t,w,C,D){for(C=C||{},D=_t.length;D--;C[_t[D]]=w);return C},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],o=[1,9],s=[1,11],n=[1,12],h=[1,14],d=[1,15],E=[1,17],u=[1,18],_=[1,19],L=[1,25],g=[1,26],R=[1,27],T=[1,28],O=[1,29],x=[1,30],m=[1,31],S=[1,32],b=[1,33],P=[1,34],k=[1,35],B=[1,36],V=[1,37],H=[1,38],z=[1,39],X=[1,40],et=[1,42],rt=[1,43],U=[1,44],ot=[1,45],at=[1,46],W=[1,47],M=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Z=[1,56],Mt=[1,75],A=[1,81],v=[1,82],dt=[1,83],st=[1,84],K=[1,85],mt=[1,86],pe=[1,87],Ee=[1,88],ue=[1,89],fe=[1,90],_e=[1,91],ge=[1,92],xe=[1,93],ye=[1,94],Ie=[1,95],Re=[1,96],Oe=[1,97],Le=[1,98],be=[1,99],me=[1,100],Se=[1,101],Ae=[1,102],we=[1,103],Ne=[1,104],Pe=[1,105],ke=[1,106],De=[2,79],ve=[2,78],Pt=[4,5,17,51,53,54],Bt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],$t=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],jt=[5,52],F=[62,70,71,72,73],Be=[62,73],lt=[1,152],te={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:f(function(w,C,D,y,G,c,kt){var p=c.length-1;switch(G){case 3:return y.apply(c[p]),c[p];case 4:case 10:this.$=[];break;case 5:case 11:c[p-1].push(c[p]),this.$=c[p-1];break;case 6:case 7:case 12:case 13:this.$=c[p];break;case 8:case 9:case 14:this.$=[];break;case 16:c[p].type="createParticipant",this.$=c[p];break;case 17:c[p-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[p-2])}),c[p-1].push({type:"boxEnd",boxText:c[p-2]}),this.$=c[p-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-2]),sequenceIndexStep:Number(c[p-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-1].actor};break;case 30:y.setDiagramTitle(c[p].substring(6)),this.$=c[p].substring(6);break;case 31:y.setDiagramTitle(c[p].substring(7)),this.$=c[p].substring(7);break;case 32:this.$=c[p].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[p].trim(),y.setAccDescription(this.$);break;case 35:c[p-1].unshift({type:"loopStart",loopText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.LOOP_START}),c[p-1].push({type:"loopEnd",loopText:c[p-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[p-1];break;case 36:c[p-1].unshift({type:"rectStart",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_START}),c[p-1].push({type:"rectEnd",color:y.parseMessage(c[p-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[p-1];break;case 37:c[p-1].unshift({type:"optStart",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_START}),c[p-1].push({type:"optEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[p-1];break;case 38:c[p-1].unshift({type:"altStart",altText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.ALT_START}),c[p-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[p-1];break;case 39:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 40:c[p-1].unshift({type:"parStart",parText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[p-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[p-1];break;case 41:c[p-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.CRITICAL_START}),c[p-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[p-1];break;case 42:c[p-1].unshift({type:"breakStart",breakText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_START}),c[p-1].push({type:"breakEnd",optText:y.parseMessage(c[p-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[p-1];break;case 44:this.$=c[p-3].concat([{type:"option",optionText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[p]]);break;case 46:this.$=c[p-3].concat([{type:"and",parText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.PAR_AND},c[p]]);break;case 48:this.$=c[p-3].concat([{type:"else",altText:y.parseMessage(c[p-1]),signalType:y.LINETYPE.ALT_ELSE},c[p]]);break;case 49:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 50:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 51:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 52:case 57:c[p-1].draw="actor",c[p-1].type="addParticipant",this.$=c[p-1];break;case 53:c[p-1].type="destroyParticipant",this.$=c[p-1];break;case 54:c[p-3].draw="participant",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 55:c[p-1].draw="participant",c[p-1].type="addParticipant",this.$=c[p-1];break;case 56:c[p-3].draw="actor",c[p-3].type="addParticipant",c[p-3].description=y.parseMessage(c[p-1]),this.$=c[p-3];break;case 58:this.$=[c[p-1],{type:"addNote",placement:c[p-2],actor:c[p-1].actor,text:c[p]}];break;case 59:c[p-2]=[].concat(c[p-1],c[p-1]).slice(0,2),c[p-2][0]=c[p-2][0].actor,c[p-2][1]=c[p-2][1].actor,this.$=[c[p-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[p-2].slice(0,2),text:c[p]}];break;case 60:this.$=[c[p-1],{type:"addLinks",actor:c[p-1].actor,text:c[p]}];break;case 61:this.$=[c[p-1],{type:"addALink",actor:c[p-1].actor,text:c[p]}];break;case 62:this.$=[c[p-1],{type:"addProperties",actor:c[p-1].actor,text:c[p]}];break;case 63:this.$=[c[p-1],{type:"addDetails",actor:c[p-1].actor,text:c[p]}];break;case 66:this.$=[c[p-2],c[p]];break;case 67:this.$=c[p];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[p-1].actor}];break;case 71:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[p-4].actor}];break;case 72:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor}];break;case 73:this.$=[c[p-4],c[p-1],{type:"addMessage",from:c[p-4].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-4].actor}];break;case 74:this.$=[c[p-5],c[p-1],{type:"addMessage",from:c[p-5].actor,to:c[p-1].actor,signalType:c[p-3],msg:c[p],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[p-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[p-5].actor}];break;case 75:this.$=[c[p-3],c[p-1],{type:"addMessage",from:c[p-3].actor,to:c[p-1].actor,signalType:c[p-2],msg:c[p]}];break;case 76:this.$={type:"addParticipant",actor:c[p-1],config:c[p]};break;case 77:this.$=c[p-1].trim();break;case 78:case 79:this.$={type:"addParticipant",actor:c[p]};break;case 80:this.$=y.LINETYPE.SOLID_OPEN;break;case 81:this.$=y.LINETYPE.DOTTED_OPEN;break;case 82:this.$=y.LINETYPE.SOLID;break;case 83:this.$=y.LINETYPE.SOLID_TOP;break;case 84:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 85:this.$=y.LINETYPE.STICK_TOP;break;case 86:this.$=y.LINETYPE.STICK_BOTTOM;break;case 87:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 88:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 90:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 92:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 94:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 99:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 100:this.$=y.LINETYPE.DOTTED;break;case 101:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 102:this.$=y.LINETYPE.SOLID_CROSS;break;case 103:this.$=y.LINETYPE.DOTTED_CROSS;break;case 104:this.$=y.LINETYPE.SOLID_POINT;break;case 105:this.$=y.LINETYPE.DOTTED_POINT;break;case 106:this.$=y.parseMessage(c[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,5]),{9:48,13:13,14:h,15:d,18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},e(M,[2,7]),e(M,[2,8]),e(M,[2,9]),e(M,[2,15]),{13:49,51:H,53:z,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,62:Z,73:W},{23:57,62:Z,73:W},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(M,[2,30]),e(M,[2,31]),{33:[1,63]},{35:[1,64]},e(M,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,55:74,62:Z,73:Mt},{23:76,55:77,62:Z,73:Mt},{23:78,62:Z,73:W},{69:79,72:[1,80],78:A,79:v,80:dt,81:st,82:K,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},{57:107,59:[1,108],67:[1,109],68:[1,110]},{23:111,62:Z,73:W},e([72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],De,{23:112,62:Z,73:W}),{23:113,62:Z,73:W},{23:114,62:Z,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ve),e(M,[2,6]),e(M,[2,16]),e(Pt,[2,10],{11:115}),e(M,[2,18]),{5:[1,117],20:[1,116]},{5:[1,118]},e(M,[2,22]),{5:[1,119]},e([5,52,66,104],De),{5:[1,120]},e(M,[2,25]),e(M,[2,26]),e(M,[2,27]),e(M,[2,28]),e(M,[2,29]),e(M,[2,32]),e(M,[2,33]),e(Bt,i,{7:121}),e(Bt,i,{7:122}),e(Bt,i,{7:123}),e(Ce,i,{41:124,7:125}),e($t,i,{43:126,7:127}),e($t,i,{7:127,43:128}),e(Me,i,{46:129,7:130}),e(Bt,i,{7:131}),{5:[1,133],52:[1,132]},{5:[1,135],52:[1,134]},e(jt,ve,{74:136,75:[1,137]}),{5:[1,139],52:[1,138]},{5:[1,141],52:[1,140]},{5:[1,142]},{23:146,62:Z,70:[1,143],71:[1,144],72:[1,145],73:W},{69:147,78:A,79:v,80:dt,81:st,82:K,83:mt,84:pe,85:Ee,86:ue,87:fe,88:_e,89:ge,90:xe,91:ye,92:Ie,93:Re,94:Oe,95:Le,96:be,97:me,98:Se,99:Ae,100:we,101:Ne,102:Pe,103:ke},e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),e(F,[2,105]),{23:148,62:Z,73:W},{23:150,60:149,62:Z,73:W},e(Be,[2,68]),e(Be,[2,69]),{58:151,104:lt},{58:153,104:lt},{58:154,104:lt},{58:155,104:lt},{4:[1,158],5:[1,160],12:157,13:159,17:[1,156],51:H,53:z,54:X},{5:[1,161]},e(M,[2,20]),e(M,[2,21]),e(M,[2,23]),e(M,[2,24]),{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,162],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,163],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,164],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,165]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,47],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,50:[1,166],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,167]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,45],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,49:[1,168],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{17:[1,169]},{17:[1,170]},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[2,43],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,48:[1,171],51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{4:o,5:s,8:8,9:10,10:n,13:13,14:h,15:d,17:[1,172],18:16,19:E,22:u,23:41,24:_,25:20,26:21,27:22,28:23,29:24,30:L,31:g,32:R,34:T,36:O,37:x,38:m,39:S,40:b,42:P,44:k,45:B,47:V,51:H,53:z,54:X,56:et,61:rt,62:U,63:ot,64:at,73:W},{16:[1,173]},e(M,[2,50]),{16:[1,174]},e(M,[2,55]),e(jt,[2,76]),{76:[1,175]},{16:[1,176]},e(M,[2,52]),{16:[1,177]},e(M,[2,57]),e(M,[2,53]),{23:178,62:Z,73:W},{23:179,62:Z,73:W},{23:180,62:Z,73:W},{58:181,104:lt},{23:182,62:Z,72:[1,183],73:W},{58:184,104:lt},{58:185,104:lt},{66:[1,186],104:[2,67]},{5:[2,60]},{5:[2,106]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(M,[2,17]),e(Pt,[2,11]),{13:187,51:H,53:z,54:X},e(Pt,[2,13]),e(Pt,[2,14]),e(M,[2,19]),e(M,[2,35]),e(M,[2,36]),e(M,[2,37]),e(M,[2,38]),{16:[1,188]},e(M,[2,39]),{16:[1,189]},e(M,[2,40]),e(M,[2,41]),{16:[1,190]},e(M,[2,42]),{5:[1,191]},{5:[1,192]},{77:[1,193]},{5:[1,194]},{5:[1,195]},{58:196,104:lt},{58:197,104:lt},{58:198,104:lt},{5:[2,75]},{58:199,104:lt},{23:200,62:Z,73:W},{5:[2,58]},{5:[2,59]},{23:201,62:Z,73:W},e(Pt,[2,12]),e(Ce,i,{7:125,41:202}),e($t,i,{7:127,43:203}),e(Me,i,{7:130,46:204}),e(M,[2,49]),e(M,[2,54]),e(jt,[2,77]),e(M,[2,51]),e(M,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:205,104:lt},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],151:[2,60],152:[2,106],153:[2,61],154:[2,62],155:[2,63],181:[2,75],184:[2,58],185:[2,59],196:[2,70],197:[2,71],198:[2,72],199:[2,73],201:[2,66],202:[2,48],203:[2,46],204:[2,44],205:[2,74]},parseError:f(function(w,C){if(C.recoverable)this.trace(w);else{var D=new Error(w);throw D.hash=C,D}},"parseError"),parse:f(function(w){var C=this,D=[0],y=[],G=[null],c=[],kt=this.table,p="",Vt=0,Ye=0,lr=2,Ve=1,hr=c.slice.call(arguments,1),$=Object.create(this.lexer),It={yy:{}};for(var ee in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ee)&&(It.yy[ee]=this.yy[ee]);$.setInput(w,It.yy),It.yy.lexer=$,It.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var re=$.yylloc;c.push(re);var dr=$.options&&$.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Tr(ct){D.length=D.length-2*ct,G.length=G.length-ct,c.length=c.length-ct}f(Tr,"popStack");function We(){var ct;return ct=y.pop()||$.lex()||Ve,typeof ct!="number"&&(ct instanceof Array&&(y=ct,ct=y.pop()),ct=C.symbols_[ct]||ct),ct}f(We,"lex");for(var it,Rt,ht,ae,St={},Wt,Et,He,Ht;;){if(Rt=D[D.length-1],this.defaultActions[Rt]?ht=this.defaultActions[Rt]:((it===null||typeof it>"u")&&(it=We()),ht=kt[Rt]&&kt[Rt][it]),typeof ht>"u"||!ht.length||!ht[0]){var se="";Ht=[];for(Wt in kt[Rt])this.terminals_[Wt]&&Wt>lr&&Ht.push("'"+this.terminals_[Wt]+"'");$.showPosition?se="Parse error on line "+(Vt+1)+`:
|
|
2
2
|
`+$.showPosition()+`
|
|
3
3
|
Expecting `+Ht.join(", ")+", got '"+(this.terminals_[it]||it)+"'":se="Parse error on line "+(Vt+1)+": Unexpected "+(it==Ve?"end of input":"'"+(this.terminals_[it]||it)+"'"),this.parseError(se,{text:$.match,token:this.terminals_[it]||it,line:$.yylineno,loc:re,expected:Ht})}if(ht[0]instanceof Array&&ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Rt+", token: "+it);switch(ht[0]){case 1:D.push(it),G.push($.yytext),c.push($.yylloc),D.push(ht[1]),it=null,Ye=$.yyleng,p=$.yytext,Vt=$.yylineno,re=$.yylloc;break;case 2:if(Et=this.productions_[ht[1]][1],St.$=G[G.length-Et],St._$={first_line:c[c.length-(Et||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Et||1)].first_column,last_column:c[c.length-1].last_column},dr&&(St._$.range=[c[c.length-(Et||1)].range[0],c[c.length-1].range[1]]),ae=this.performAction.apply(St,[p,Ye,Vt,It.yy,ht[1],G,c].concat(hr)),typeof ae<"u")return ae;Et&&(D=D.slice(0,-1*Et*2),G=G.slice(0,-1*Et),c=c.slice(0,-1*Et)),D.push(this.productions_[ht[1]][0]),G.push(St.$),c.push(St._$),He=kt[D[D.length-2]][D[D.length-1]],D.push(He);break;case 3:return!0}}return!0},"parse")},cr=(function(){var _t={EOF:1,parseError:f(function(C,D){if(this.yy.parser)this.yy.parser.parseError(C,D);else throw new Error(C)},"parseError"),setInput:f(function(w,C){return this.yy=C||this.yy||{},this._input=w,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:f(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var C=w.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:f(function(w){var C=w.length,D=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;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),D.length-1&&(this.yylineno-=D.length-1);var G=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:D?(D.length===y.length?this.yylloc.first_column:0)+y[y.length-D.length].length-D[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(w){this.unput(this.match.slice(w))},"less"),pastInput:f(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var w=this.pastInput(),C=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as o,X as ot,aH as ut,aX as dt,i as yt,r as ft,z as pt,b0 as it,V as gt,a_ as kt,U as mt,aZ as wt,Y as _t,B as bt}from"./
|
|
1
|
+
import{b as o,X as ot,aH as ut,aX as dt,i as yt,r as ft,z as pt,b0 as it,V as gt,a_ as kt,U as mt,aZ as wt,Y as _t,B as bt}from"./CvYPF82-.js";var J=(function(){var e=o(function(T,t,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],u=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},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,2],[12,1],[12,1],[12,1]],performAction:o(function(t,s,i,c,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(n[w-1].length,n[w].trim());break;case 16:c.addNode(0,n[w].trim());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:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(u,[2,15]),e(k,[2,13],{7:g,11:_}),e(x,[2,11]),e(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],c=[],p=[null],n=[],v=this.table,w="",I=0,$=0,L=2,A=1,V=n.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(S.yy[B]=this.yy[B]);b.setInput(t,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;n.push(R);var U=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(Y,"popStack");function tt(){var P;return P=c.pop()||b.lex()||A,typeof P!="number"&&(P instanceof Array&&(c=P,P=c.pop()),P=s.symbols_[P]||P),P}o(tt,"lex");for(var M,W,N,K,z={},G,C,et,X;;){if(W=i[i.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=tt()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var q="";X=[];for(G in v[W])this.terminals_[G]&&G>L&&X.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+b.showPosition()+`
|
|
3
3
|
Expecting `+X.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:X})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(N[0]){case 1:i.push(M),p.push(b.yytext),n.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(C=this.productions_[N[1]][1],z.$=p[p.length-C],z._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},U&&(z._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(z,[w,$,I,S.yy,N[1],p,n].concat(V)),typeof K<"u")return K;C&&(i=i.slice(0,-1*C*2),p=p.slice(0,-1*C),n=n.slice(0,-1*C)),i.push(this.productions_[N[1]][0]),p.push(z.$),n.push(z._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||this.yy||{},this._input=t,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 t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=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),i.length-1&&(this.yylineno-=i.length-1);var p=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:i?(i.length===c.length?this.yylloc.first_column:0)+c[c.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),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(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aB as v,b as y}from"./
|
|
1
|
+
import{aB as v,b as y}from"./CvYPF82-.js";var w=5,O=1e-5,X=2,Y=.6,R=1e-6;function N(t){const e=[];for(let s=0;s<t.length-1;s++)e.push({a:t[s],b:t[s+1]});return e}y(N,"buildSegmentList");function T(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=a.x-s.x,d=a.y-s.y,u=r*d-o*i;if(u===0)return null;const n=s.x-t.x,c=s.y-t.y,p=(n*d-c*i)/u,f=(n*o-c*r)/u;return p<=R||p>=1-R||f<=R||f>=1-R?null:{point:{x:t.x+p*r,y:t.y+p*o},tA:p,tB:f}}y(T,"segmentIntersection");function P(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}y(P,"isHorizontalSeg");function B(t,e,s){if(t.curve!=="rounded")return!1;const a=t.points,r=a[e],o=a[e+1];if(!r||!o)return!1;const i=Math.hypot(o.x-r.x,o.y-r.y),d=s*i,u=e>0?L(a[e-1],r,o,w):null;if(u&&d<u.cutLen)return!0;const n=e+2<a.length?L(r,o,a[e+2],w):null;return n!==null&&i-d<n.cutLen}y(B,"crossingSitsInRoundedCorner");function C(t){const e=[];for(let s=0;s<t.length;s++){const a=t[s],r=N(a.points);for(let o=s+1;o<t.length;o++){const i=t[o],d=N(i.points);for(const[u,n]of r.entries())for(const[c,p]of d.entries()){const f=T(n.a,n.b,p.a,p.b);if(!f||B(a,u,f.tA)||B(i,c,f.tB))continue;const g=P(n),S=P(p);(g!==S?g:!1)?e.push({jumpEdgeId:a.id,otherEdgeId:i.id,segIndex:u,t:f.tA,point:f.point}):e.push({jumpEdgeId:i.id,otherEdgeId:a.id,segIndex:c,t:f.tB,point:f.point})}}}return e}y(C,"findEdgeIntersections");function M(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}y(M,"fmt");function A(t){return`${M(t.x)},${M(t.y)}`}y(A,"pointToString");function D(t){const e=t.b.x-t.a.x,s=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(s)?e>=0?1:0:s>=0?1:0}y(D,"getArcSweepFlag");function _(t,e){if(t.length<2)return t.map(o=>({...o}));const s=t.map(o=>({...o})),a=e.arrowTypeStart&&v[e.arrowTypeStart];if(a){const o=t[0],i=t[1],d=Math.atan2(i.y-o.y,i.x-o.x);s[0].x=o.x+a*Math.cos(d),s[0].y=o.y+a*Math.sin(d)}const r=e.arrowTypeEnd&&v[e.arrowTypeEnd];if(r){const o=t.length,i=t[o-2],d=t[o-1],u=Math.atan2(d.y-i.y,d.x-i.x);s[o-1].x=d.x-r*Math.cos(u),s[o-1].y=d.y-r*Math.sin(u)}return s}y(_,"applyMarkerOffsets");function k(t,e,s,a,r){const o=t.point.x,i=t.point.y,d={x:o-e*t.r,y:i-s*t.r},u={x:o+e*t.r,y:i+s*t.r},n=[`L${A(d)}`];return r==="arc"?n.push(`A${M(t.r)},${M(t.r)} 0 0 ${a} ${A(u)}`):n.push(`M${A(u)}`),n}y(k,"emitJump");function L(t,e,s,a){const r=e.x-t.x,o=e.y-t.y,i=s.x-e.x,d=s.y-e.y,u=Math.hypot(r,o),n=Math.hypot(i,d);if(u<O||n<O)return null;const c=r/u,p=o/u,f=i/n,g=d/n,S=c*f+p*g,b=Math.max(-1,Math.min(1,S)),m=Math.acos(b);if(m<O||Math.abs(Math.PI-m)<O)return null;const h=Math.min(a/Math.sin(m/2),u/2,n/2);return{startX:e.x-c*h,startY:e.y-p*h,endX:e.x+f*h,endY:e.y+g*h,ctrlX:e.x,ctrlY:e.y,cutLen:h}}y(L,"computeRoundedCorner");function H(t,e,s){const a=t.points;if(a.length<2)return"";const r=_(a,t),o=t.curve==="rounded",i=N(r),d=new Map;for(const n of e){const c=i[n.segIndex];if(!c)continue;const p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=d.get(n.segIndex)??[];f.push({t:n.t,point:n.point,d:n.t*p,r:s.jumpRadius}),d.set(n.segIndex,f)}const u=[`M${A(r[0])}`];for(let n=0;n<i.length;n++){const c=i[n],p=Math.hypot(c.b.x-c.a.x,c.b.y-c.a.y),f=p===0?0:(c.b.x-c.a.x)/p,g=p===0?0:(c.b.y-c.a.y)/p,S=D(c);let b=0;if(o&&n>0){const l=L(r[n-1],r[n],r[n+1]??r[n],w);l&&(b=l.cutLen)}let m=p,h=null;o&&n<i.length-1&&(h=L(r[n],r[n+1],r[n+2]??r[n+1],w),h&&(m=p-h.cutLen));const $=s.jumpRadius*Y,x=[...d.get(n)??[]].sort((l,E)=>l.t-E.t).filter(l=>{const E=Math.min(l.d-b,m-l.d)-X;return l.r=Math.min(l.r,E),l.r>=$});for(let l=0;l<x.length-1;l++){const E=x[l+1].d-x[l].d;if(x[l].r+x[l+1].r>E){const I=E/2;x[l].r=Math.min(x[l].r,I),x[l+1].r=Math.min(x[l+1].r,I)}}for(const l of x)l.r<$||u.push(...k(l,f,g,S,s.jumpStyle));o&&h?(u.push(`L${M(h.startX)},${M(h.startY)}`),u.push(`Q${M(h.ctrlX)},${M(h.ctrlY)} ${M(h.endX)},${M(h.endY)}`)):u.push(`L${A(c.b)}`)}return u.join(" ")}y(H,"rewriteEdgePath");function J(t){return/^[\d\s+,.LMelm-]*$/.test(t)}y(J,"isStraightPath");function U(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}y(U,"curveSupportsLineHops");function j(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),s=JSON.parse(e);if(!Array.isArray(s))return null;const a=[];for(const r of s)r&&typeof r.x=="number"&&typeof r.y=="number"&&a.push({x:r.x,y:r.y});return a.length>=2?a:null}catch{return null}}y(j,"decodeDataPoints");function F(t,e,s){if(!s.enabled)return;const a=t.node();if(!a)return;const r=new Map;for(const n of e)r.set(n.id,n);const o=new Map;for(const n of a.querySelectorAll("path[data-id]")){const c=n.getAttribute("data-id");c!==null&&!o.has(c)&&o.set(c,n)}const i=[];for(const n of e){const c=o.get(n.id);if(!c)continue;const f=j(c.getAttribute("data-points"))??n.points;i.push({...n,points:f})}const d=C(i);if(d.length===0)return;const u=new Map;for(const n of d){const c=u.get(n.jumpEdgeId)??[];c.push(n),u.set(n.jumpEdgeId,c)}for(const n of i){const c=u.get(n.id);if(!c||c.length===0)continue;const f=r.get(n.id)?.curve;if(f!==void 0&&!U(f))continue;const g=o.get(n.id);if(!g)continue;if(f===void 0){const x=g.getAttribute("d")??"";if(!J(x))continue}const S=g.getAttribute("style")??"",b=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(S),m=b?Number.parseFloat(b[1]):null,h=b?Number.parseFloat(b[2]):null,$=H(n,c,s);if(g.setAttribute("d",$),m!==null&&h!==null&&typeof g.getTotalLength=="function"){const x=g.getTotalLength(),l=Math.max(0,x-m-h),E=`0 ${m} ${l} ${h}`,I=S.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${E};`).replace(/;\s*;+/g,";");g.setAttribute("style",I)}}}y(F,"applyLineJumpsToSvg");export{F as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as Yt,br as K,bz as Zt,b as Jt,a_ as P,bv as Y,bt as Ie,bp as i}from"./DXyyWeag.js";import{bs as Nt,ay as yt,be as h,b$ as x,b_ as s,bO as o,W as n,bS as l,bl as B,bn as Qt,aA as V,a7 as Se,aD as t,c9 as g,aB as I,bo as we,bV as kt,br as Ge,ca as Bt,bH as q,bk as Le,a5 as E,bA as O}from"./DYhIMPy1.js";import{n as Ae,p as Pe,v as ze,j as De,I as Ht,u as Mt}from"./CjaOLL1c.js";import{c as Te}from"./CnVt0JNG.js";import{f as z}from"./Bfr1QjPr.js";import"./Dwmx7Nbz.js";import{b as Fe}from"./C5oPUaEZ.js";import"./Co9PgWQA.js";import"./BKnW-cqy.js";import{b as Ue}from"./2YGlULfT.js";import{I as qt}from"./ChOlbK8y.js";import{L as Wt}from"./CX_KiszT.js";import"./Cuqq8bL5.js";import{G as Ee,x as Oe}from"./CpMT4a7n.js";import{Iy as W,fm as Kt,z as Be,ec as Vt,qw as He,tX as Me,Ip as qe,od as We,hA as Ke}from"./D5ej8a-y.js";import{aY as jt,aZ as Rt,a_ as Ve,aT as je,aU as Xt,aV as Re,aW as Xe,b2 as Ye}from"./D5YUYmA3.js";var Ze=I('<!> <p class="type-body"> </p>',1);function Je(it,m){if(new.target)return Yt({component:Je,...it});Nt(m,!0);let D=K(m,"open",15,!1),H=K(m,"static",7,!1),st=K(m,"title",7),_=K(m,"message",7),k=K(m,"buttons",7),b=K(m,"cancelIndex",7,0),Z=K(m,"onSelect",7);function j(r){D(!1),Z()?.(r)}var vt={get open(){return D()},set open(r=!1){D(r),V()},get static(){return H()},set static(r=!1){H(r),V()},get title(){return st()},set title(r){st(r),V()},get message(){return _()},set message(r){_(r),V()},get buttons(){return k()},set buttons(r){k(r),V()},get cancelIndex(){return b()},set cancelIndex(r=0){b(r),V()},get onSelect(){return Z()},set onSelect(r){Z(r),V()},$set:Zt,$on:(r,M)=>Jt(m,r,M)};return Ue(it,{get static(){return H()},role:"alertdialog",get title(){return st()},dismissOnInteractOutside:!1,focusContent:!0,onSubmit:()=>j(k().length-1),onCancel:()=>j(b()),get open(){return D()},set open(M){D(M)},footer:M=>{var T=Se(),w=yt(T);Ae(w,17,k,Pe,(J,N,R)=>{{let Q=g(()=>R===b()?"ghost":R===k().length-1?"primary":"outline");z(J,{get variant(){return t(Q)},onclick:()=>j(R),children:(ct,pt)=>{h();var ut=x();s(()=>o(ut,t(N))),n(ct,ut)},$$slots:{default:!0}})}}),n(M,T)},children:(M,T)=>{var w=Ze(),J=yt(w);Te(J,()=>Fe,(Q,ct)=>{ct(Q,{class:"sr-only",children:(pt,ut)=>{h();var _t=x();s(()=>o(_t,_())),n(pt,_t)},$$slots:{default:!0}})});var N=l(J,2),R=B(N,!0);s(()=>o(R,_())),n(M,w)},$$slots:{footer:!0,default:!0}}),Qt(vt)}var Ne=I('<p class="text-sm text-subtle" role="status" data-testid="gitlab-instance-update-required"> </p>'),Qe=I('<p class="break-all type-caption text-subtle" data-testid="gitlab-connect-instance"> </p>'),ta=I('<div class="max-w-sm space-y-3" data-testid="gitlab-connect-device-flow"><!> <div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!> <!></div></div>'),ea=I('<div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!></div>'),aa=I('<p class="text-xs text-danger" role="alert"> </p>'),na=I('<div class="max-w-sm space-y-1" data-testid="gitlab-connect-token"><!> <!> <p class="text-xs text-subtle"> <!></p></div> <div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>',1),ra=I('<div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>'),sa=I('<div class="max-w-sm space-y-1"><!> <!> <p class="text-xs text-subtle"> </p> <!></div> <!>',1),oa=I('<p class="text-sm text-subtle" role="status"> </p>'),la=I('<div class="space-y-1"><p class="text-sm text-subtle" role="status"> </p> <!></div>'),ia=I('<p class="text-sm text-danger" role="alert"> </p>'),ca=I('<div data-testid="gitlab-connect-form"><!> <!> <!> <!> <!></div>');function ua(it,m){const D=we();if(new.target)return Yt({component:ua,...it});Nt(m,!0);const H=()=>Y(ct,"$storedInstance$",r),st=()=>Y(ee,"$deviceGrantSupported$",r),_=()=>Y(ne,"$instanceSetupSupported$",r),k=()=>Y(pt,"$isAuthenticating$",r),b=()=>Y(ut,"$isCancelling$",r),Z=()=>Y(te,"$deviceFlow$",r),j=()=>Y(_t,"$cancelOutcome$",r),vt=()=>Y(ae,"$error$",r),[r,M]=Ie();let T=K(m,"compact",7,!1),w=K(m,"onCancel",7);const J=`${D}-host`,N=`${D}-host-help`,R=`${D}-host-error`,Q=`${D}-token`,ct=jt(),pt=Rt(),ut=Ve(),_t=je(),te=Xt(),ee=Re(),ae=Xe(),ne=Ye();let bt=kt(Ge(jt.select(W.state))),St=kt(!1),tt=kt(""),ft=kt(!1);const p=g(()=>Me(t(bt))),wt=g(()=>t(ft)||t(p)===H()&&st()===!1),Ct=g(()=>t(p)?We(t(p)):null),re=g(()=>_()&&t(p)!==null&&t(tt).trim().length>0);Bt(()=>{const c=H();t(St)||q(bt,c,!0)}),Bt(()=>{_()||q(tt,"")}),Le(()=>{const c=()=>{const e=W.state;Rt.select(e)&&Xt.select(e)&&W.dispatch(Kt())};return window.addEventListener("focus",c),()=>window.removeEventListener("focus",c)});function Gt(){!_()||!t(p)||t(p)===H()||k()||b()||W.dispatch(He(t(p)))}function se(){q(St,!0),q(tt,"")}function Lt(){!_()||!t(p)||k()||b()||W.dispatch(qe(t(p)))}function At(){const c=t(tt).trim();!_()||!c||!t(p)||k()||b()||(W.dispatch(Ke(t(p),c)),q(tt,""))}function Pt(){!_()||b()||(k()&&W.dispatch(Vt()),q(ft,!0))}function oe(){q(ft,!1)}function le(){b()||W.dispatch(Vt())}function ie(){t(Ct)&&Oe(t(Ct),{})}function ce(c){c.key==="Enter"&&(c.preventDefault(),Gt(),t(wt)?document.getElementById(Q)?.focus():Lt())}function ue(c){c.key==="Enter"&&(c.preventDefault(),At())}const zt=g(()=>T()?"sm":"xl"),gt=g(()=>T()?"sm":"default");var de={get compact(){return T()},set compact(c=!1){T(c),V()},get onCancel(){return w()},set onCancel(c){w(c),V()},$set:Zt,$on:(c,e)=>Jt(m,c,e)},$t=ca();{const c=e=>{z(e,{variant:"ghost",size:"sm",type:"button",class:"text-muted-foreground hover:text-foreground",get disabled(){return b()},onclick:le,children:(a,u)=>{h();var f=x();s(G=>o(f,G),[()=>b()?i.lib_gitlabConnect_cancelling_label():i.lib_gitlabConnect_cancel_label()]),n(a,f)},$$slots:{default:!0}})};var Dt=E($t);{var ve=e=>{var a=Ne(),u=B(a,!0);s(f=>o(u,f),[()=>i.lib_gitlabConnect_updateRequired_description()]),n(e,a)};P(Dt,e=>{_()||e(ve)})}var Tt=l(Dt,2);{var pe=e=>{var a=Qe(),u=B(a,!0);s(()=>o(u,H())),n(e,a)};P(Tt,e=>{(k()||b())&&e(pe)})}var Ft=l(Tt,2);{var _e=e=>{var a=ta(),u=E(a);{let at=g(()=>i.lib_gitlabConnect_openGitlab_label());Ee(u,{get userCode(){return Z().userCode},get verificationUri(){return Z().verificationUri},get openLabel(){return t(at)},get compact(){return T()}})}var f=l(u,2),G=E(f);Ht(G,{size:16,class:"shrink-0"});var S=l(G,2),ot=B(S,!0),et=l(S,2);{let at=g(()=>b()||!_());z(et,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return t(at)},onclick:Pt,children:(It,Et)=>{h();var d=x();s($=>o(d,$),[()=>i.lib_gitlabConnect_useToken_label()]),n(It,d)},$$slots:{default:!0}})}var dt=l(et,2);c(dt),O(f),O(a),s(at=>o(ot,at),[()=>i.lib_gitlabConnect_waitingForAuthorization_label()]),n(e,a)},be=e=>{var a=ea(),u=E(a);Ht(u,{size:16,class:"shrink-0"});var f=l(u,2),G=B(f,!0),S=l(f,2);c(S),O(a),s(ot=>o(G,ot),[()=>i.lib_gitlabConnect_connecting_label()]),n(e,a)},fe=e=>{var a=sa(),u=yt(a),f=E(u);Wt(f,{get for(){return J},children:(d,$)=>{h();var y=x();s(L=>o(y,L),[()=>i.lib_gitlabConnect_host_label()]),n(d,y)},$$slots:{default:!0}});var G=l(f,2);{let d=g(()=>!_()),$=g(()=>!t(p)||void 0),y=g(()=>t(p)?N:`${N} ${R}`);qt(G,{get id(){return J},type:"text",autocomplete:"url",spellcheck:!1,get disabled(){return t(d)},get"aria-invalid"(){return t($)},get"aria-describedby"(){return t(y)},get placeholder(){return Be},oninput:se,onchange:Gt,onkeydown:ce,get value(){return t(bt)},set value(L){q(bt,L,!0)}})}var S=l(G,2),ot=B(S,!0),et=l(S,2);{var dt=d=>{var $=aa(),y=B($,!0);s(L=>{Mt($,"id",R),o(y,L)},[()=>i.lib_gitlabConnect_invalidInstance_error()]),n(d,$)};P(et,d=>{t(p)||d(dt)})}O(u);var at=l(u,2);{var It=d=>{var $=na(),y=yt($),L=E(y);Wt(L,{get for(){return Q},children:(v,U)=>{h();var lt=x();s(C=>o(lt,C),[()=>i.lib_gitlabConnect_token_label()]),n(v,lt)},$$slots:{default:!0}});var mt=l(L,2);{let v=g(()=>!_());qt(mt,{get id(){return Q},type:"password",autocomplete:"off",get disabled(){return t(v)},placeholder:"glpat-...",onkeydown:ue,get value(){return t(tt)},set value(U){q(tt,U,!0)}})}var ht=l(mt,2),F=E(ht),nt=l(F);{var xt=v=>{z(v,{variant:"link",size:"sm",type:"button",class:"h-auto px-0 text-xs",onclick:ie,children:(U,lt)=>{h();var C=x();s(rt=>o(C,rt),[()=>i.lib_gitlabConnect_createToken_label({host:t(p)})]),n(U,C)},$$slots:{default:!0}})};P(nt,v=>{t(Ct)&&t(p)&&v(xt)})}O(ht),O(y);var A=l(y,2),X=E(A);{let v=g(()=>!t(re));z(X,{variant:"primary",get size(){return t(zt)},type:"button",onclick:At,get disabled(){return t(v)},children:(U,lt)=>{h();var C=x();s(rt=>o(C,rt),[()=>i.lib_gitlabConnect_connect_label()]),n(U,C)},$$slots:{default:!0}})}var Ot=l(X,2);{var ke=v=>{z(v,{variant:"ghost",get size(){return t(gt)},type:"button",onclick:oe,children:(U,lt)=>{h();var C=x();s(rt=>o(C,rt),[()=>i.lib_gitlabConnect_useDevice_label()]),n(U,C)},$$slots:{default:!0}})};P(Ot,v=>{t(ft)&&!(t(p)===H()&&st()===!1)&&v(ke)})}var ye=l(Ot,2);{var Ce=v=>{z(v,{variant:"ghost",get size(){return t(gt)},type:"button",get onclick(){return w()},children:(U,lt)=>{h();var C=x();s(rt=>o(C,rt),[()=>i.lib_gitlabConnect_cancel_label()]),n(U,C)},$$slots:{default:!0}})};P(ye,v=>{w()&&v(Ce)})}O(A),s(v=>o(F,`${v??""} `),[()=>i.lib_gitlabConnect_token_description()]),n(d,$)},Et=d=>{var $=ra(),y=E($);{let F=g(()=>!t(p)||!_());z(y,{variant:"primary",get size(){return t(zt)},type:"button",onclick:Lt,get disabled(){return t(F)},children:(nt,xt)=>{h();var A=x();s(X=>o(A,X),[()=>i.lib_gitlabConnect_connect_label()]),n(nt,A)},$$slots:{default:!0}})}var L=l(y,2);{let F=g(()=>!_());z(L,{variant:"ghost",get size(){return t(gt)},type:"button",get disabled(){return t(F)},onclick:Pt,children:(nt,xt)=>{h();var A=x();s(X=>o(A,X),[()=>i.lib_gitlabConnect_useToken_label()]),n(nt,A)},$$slots:{default:!0}})}var mt=l(L,2);{var ht=F=>{z(F,{variant:"ghost",get size(){return t(gt)},type:"button",get onclick(){return w()},children:(nt,xt)=>{h();var A=x();s(X=>o(A,X),[()=>i.lib_gitlabConnect_cancel_label()]),n(nt,A)},$$slots:{default:!0}})};P(mt,F=>{w()&&F(ht)})}O($),n(d,$)};P(at,d=>{t(wt)?d(It):d(Et,-1)})}s(d=>{Mt(S,"id",N),o(ot,d)},[()=>i.lib_gitlabConnect_host_description()]),n(e,a)};P(Ft,e=>{(k()||b())&&Z()?e(_e):k()||b()?e(be,1):e(fe,-1)})}var Ut=l(Ft,2);{var ge=e=>{var a=oa(),u=B(a,!0);s(f=>o(u,f),[()=>i.lib_gitlabConnect_cancelled_label()]),n(e,a)},$e=e=>{var a=la(),u=E(a),f=B(u,!0),G=l(u,2);z(G,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return b()},onclick:()=>W.dispatch(Kt()),children:(S,ot)=>{h();var et=x();s(dt=>o(et,dt),[()=>i.lib_gitlabConnect_checkStatus_label()]),n(S,et)},$$slots:{default:!0}}),O(a),s(S=>o(f,S),[()=>j()==="already-started"?i.lib_gitlabConnect_alreadyStarted_description():i.lib_gitlabConnect_cancelFailed_description()]),n(e,a)};P(Ut,e=>{j()==="cancelled"?e(ge):(j()==="already-started"||j()==="failed")&&e($e,1)})}var me=l(Ut,2);{var he=e=>{var a=ia(),u=B(a,!0);s(()=>o(u,vt())),n(e,a)};P(me,e=>{vt()&&e(he)})}O($t)}s(()=>ze($t,1,De(T()?"space-y-2":"space-y-4"))),n(it,$t);var xe=Qt(de);return M(),xe}export{ua as G,Je as M};
|
|
1
|
+
import{t as Yt,br as K,bz as Zt,b as Jt,a_ as P,bv as Y,bt as Ie,bp as i}from"./DXyyWeag.js";import{bs as Nt,ay as yt,be as h,b$ as x,b_ as s,bO as o,W as n,bS as l,bl as B,bn as Qt,aA as V,a7 as Se,aD as t,c9 as g,aB as I,bo as we,bV as kt,br as Ge,ca as Bt,bH as q,bk as Le,a5 as E,bA as O}from"./DYhIMPy1.js";import{n as Ae,p as Pe,v as ze,j as De,I as Ht,u as Mt}from"./CjaOLL1c.js";import{c as Te}from"./CnVt0JNG.js";import{f as z}from"./Bfr1QjPr.js";import"./Dwmx7Nbz.js";import{b as Fe}from"./C5oPUaEZ.js";import"./Co9PgWQA.js";import"./BKnW-cqy.js";import{b as Ue}from"./2YGlULfT.js";import{I as qt}from"./ChOlbK8y.js";import{L as Wt}from"./CX_KiszT.js";import"./Cuqq8bL5.js";import{G as Ee,x as Oe}from"./_RTfq0v6.js";import{Iy as W,fm as Kt,z as Be,ec as Vt,qw as He,tX as Me,Ip as qe,od as We,hA as Ke}from"./D5ej8a-y.js";import{aY as jt,aZ as Rt,a_ as Ve,aT as je,aU as Xt,aV as Re,aW as Xe,b2 as Ye}from"./C44zP9aX.js";var Ze=I('<!> <p class="type-body"> </p>',1);function Je(it,m){if(new.target)return Yt({component:Je,...it});Nt(m,!0);let D=K(m,"open",15,!1),H=K(m,"static",7,!1),st=K(m,"title",7),_=K(m,"message",7),k=K(m,"buttons",7),b=K(m,"cancelIndex",7,0),Z=K(m,"onSelect",7);function j(r){D(!1),Z()?.(r)}var vt={get open(){return D()},set open(r=!1){D(r),V()},get static(){return H()},set static(r=!1){H(r),V()},get title(){return st()},set title(r){st(r),V()},get message(){return _()},set message(r){_(r),V()},get buttons(){return k()},set buttons(r){k(r),V()},get cancelIndex(){return b()},set cancelIndex(r=0){b(r),V()},get onSelect(){return Z()},set onSelect(r){Z(r),V()},$set:Zt,$on:(r,M)=>Jt(m,r,M)};return Ue(it,{get static(){return H()},role:"alertdialog",get title(){return st()},dismissOnInteractOutside:!1,focusContent:!0,onSubmit:()=>j(k().length-1),onCancel:()=>j(b()),get open(){return D()},set open(M){D(M)},footer:M=>{var T=Se(),w=yt(T);Ae(w,17,k,Pe,(J,N,R)=>{{let Q=g(()=>R===b()?"ghost":R===k().length-1?"primary":"outline");z(J,{get variant(){return t(Q)},onclick:()=>j(R),children:(ct,pt)=>{h();var ut=x();s(()=>o(ut,t(N))),n(ct,ut)},$$slots:{default:!0}})}}),n(M,T)},children:(M,T)=>{var w=Ze(),J=yt(w);Te(J,()=>Fe,(Q,ct)=>{ct(Q,{class:"sr-only",children:(pt,ut)=>{h();var _t=x();s(()=>o(_t,_())),n(pt,_t)},$$slots:{default:!0}})});var N=l(J,2),R=B(N,!0);s(()=>o(R,_())),n(M,w)},$$slots:{footer:!0,default:!0}}),Qt(vt)}var Ne=I('<p class="text-sm text-subtle" role="status" data-testid="gitlab-instance-update-required"> </p>'),Qe=I('<p class="break-all type-caption text-subtle" data-testid="gitlab-connect-instance"> </p>'),ta=I('<div class="max-w-sm space-y-3" data-testid="gitlab-connect-device-flow"><!> <div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!> <!></div></div>'),ea=I('<div class="flex flex-wrap items-center gap-2 text-subtle text-sm"><!> <span> </span> <!></div>'),aa=I('<p class="text-xs text-danger" role="alert"> </p>'),na=I('<div class="max-w-sm space-y-1" data-testid="gitlab-connect-token"><!> <!> <p class="text-xs text-subtle"> <!></p></div> <div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>',1),ra=I('<div class="flex flex-wrap items-center gap-2"><!> <!> <!></div>'),sa=I('<div class="max-w-sm space-y-1"><!> <!> <p class="text-xs text-subtle"> </p> <!></div> <!>',1),oa=I('<p class="text-sm text-subtle" role="status"> </p>'),la=I('<div class="space-y-1"><p class="text-sm text-subtle" role="status"> </p> <!></div>'),ia=I('<p class="text-sm text-danger" role="alert"> </p>'),ca=I('<div data-testid="gitlab-connect-form"><!> <!> <!> <!> <!></div>');function ua(it,m){const D=we();if(new.target)return Yt({component:ua,...it});Nt(m,!0);const H=()=>Y(ct,"$storedInstance$",r),st=()=>Y(ee,"$deviceGrantSupported$",r),_=()=>Y(ne,"$instanceSetupSupported$",r),k=()=>Y(pt,"$isAuthenticating$",r),b=()=>Y(ut,"$isCancelling$",r),Z=()=>Y(te,"$deviceFlow$",r),j=()=>Y(_t,"$cancelOutcome$",r),vt=()=>Y(ae,"$error$",r),[r,M]=Ie();let T=K(m,"compact",7,!1),w=K(m,"onCancel",7);const J=`${D}-host`,N=`${D}-host-help`,R=`${D}-host-error`,Q=`${D}-token`,ct=jt(),pt=Rt(),ut=Ve(),_t=je(),te=Xt(),ee=Re(),ae=Xe(),ne=Ye();let bt=kt(Ge(jt.select(W.state))),St=kt(!1),tt=kt(""),ft=kt(!1);const p=g(()=>Me(t(bt))),wt=g(()=>t(ft)||t(p)===H()&&st()===!1),Ct=g(()=>t(p)?We(t(p)):null),re=g(()=>_()&&t(p)!==null&&t(tt).trim().length>0);Bt(()=>{const c=H();t(St)||q(bt,c,!0)}),Bt(()=>{_()||q(tt,"")}),Le(()=>{const c=()=>{const e=W.state;Rt.select(e)&&Xt.select(e)&&W.dispatch(Kt())};return window.addEventListener("focus",c),()=>window.removeEventListener("focus",c)});function Gt(){!_()||!t(p)||t(p)===H()||k()||b()||W.dispatch(He(t(p)))}function se(){q(St,!0),q(tt,"")}function Lt(){!_()||!t(p)||k()||b()||W.dispatch(qe(t(p)))}function At(){const c=t(tt).trim();!_()||!c||!t(p)||k()||b()||(W.dispatch(Ke(t(p),c)),q(tt,""))}function Pt(){!_()||b()||(k()&&W.dispatch(Vt()),q(ft,!0))}function oe(){q(ft,!1)}function le(){b()||W.dispatch(Vt())}function ie(){t(Ct)&&Oe(t(Ct),{})}function ce(c){c.key==="Enter"&&(c.preventDefault(),Gt(),t(wt)?document.getElementById(Q)?.focus():Lt())}function ue(c){c.key==="Enter"&&(c.preventDefault(),At())}const zt=g(()=>T()?"sm":"xl"),gt=g(()=>T()?"sm":"default");var de={get compact(){return T()},set compact(c=!1){T(c),V()},get onCancel(){return w()},set onCancel(c){w(c),V()},$set:Zt,$on:(c,e)=>Jt(m,c,e)},$t=ca();{const c=e=>{z(e,{variant:"ghost",size:"sm",type:"button",class:"text-muted-foreground hover:text-foreground",get disabled(){return b()},onclick:le,children:(a,u)=>{h();var f=x();s(G=>o(f,G),[()=>b()?i.lib_gitlabConnect_cancelling_label():i.lib_gitlabConnect_cancel_label()]),n(a,f)},$$slots:{default:!0}})};var Dt=E($t);{var ve=e=>{var a=Ne(),u=B(a,!0);s(f=>o(u,f),[()=>i.lib_gitlabConnect_updateRequired_description()]),n(e,a)};P(Dt,e=>{_()||e(ve)})}var Tt=l(Dt,2);{var pe=e=>{var a=Qe(),u=B(a,!0);s(()=>o(u,H())),n(e,a)};P(Tt,e=>{(k()||b())&&e(pe)})}var Ft=l(Tt,2);{var _e=e=>{var a=ta(),u=E(a);{let at=g(()=>i.lib_gitlabConnect_openGitlab_label());Ee(u,{get userCode(){return Z().userCode},get verificationUri(){return Z().verificationUri},get openLabel(){return t(at)},get compact(){return T()}})}var f=l(u,2),G=E(f);Ht(G,{size:16,class:"shrink-0"});var S=l(G,2),ot=B(S,!0),et=l(S,2);{let at=g(()=>b()||!_());z(et,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return t(at)},onclick:Pt,children:(It,Et)=>{h();var d=x();s($=>o(d,$),[()=>i.lib_gitlabConnect_useToken_label()]),n(It,d)},$$slots:{default:!0}})}var dt=l(et,2);c(dt),O(f),O(a),s(at=>o(ot,at),[()=>i.lib_gitlabConnect_waitingForAuthorization_label()]),n(e,a)},be=e=>{var a=ea(),u=E(a);Ht(u,{size:16,class:"shrink-0"});var f=l(u,2),G=B(f,!0),S=l(f,2);c(S),O(a),s(ot=>o(G,ot),[()=>i.lib_gitlabConnect_connecting_label()]),n(e,a)},fe=e=>{var a=sa(),u=yt(a),f=E(u);Wt(f,{get for(){return J},children:(d,$)=>{h();var y=x();s(L=>o(y,L),[()=>i.lib_gitlabConnect_host_label()]),n(d,y)},$$slots:{default:!0}});var G=l(f,2);{let d=g(()=>!_()),$=g(()=>!t(p)||void 0),y=g(()=>t(p)?N:`${N} ${R}`);qt(G,{get id(){return J},type:"text",autocomplete:"url",spellcheck:!1,get disabled(){return t(d)},get"aria-invalid"(){return t($)},get"aria-describedby"(){return t(y)},get placeholder(){return Be},oninput:se,onchange:Gt,onkeydown:ce,get value(){return t(bt)},set value(L){q(bt,L,!0)}})}var S=l(G,2),ot=B(S,!0),et=l(S,2);{var dt=d=>{var $=aa(),y=B($,!0);s(L=>{Mt($,"id",R),o(y,L)},[()=>i.lib_gitlabConnect_invalidInstance_error()]),n(d,$)};P(et,d=>{t(p)||d(dt)})}O(u);var at=l(u,2);{var It=d=>{var $=na(),y=yt($),L=E(y);Wt(L,{get for(){return Q},children:(v,U)=>{h();var lt=x();s(C=>o(lt,C),[()=>i.lib_gitlabConnect_token_label()]),n(v,lt)},$$slots:{default:!0}});var mt=l(L,2);{let v=g(()=>!_());qt(mt,{get id(){return Q},type:"password",autocomplete:"off",get disabled(){return t(v)},placeholder:"glpat-...",onkeydown:ue,get value(){return t(tt)},set value(U){q(tt,U,!0)}})}var ht=l(mt,2),F=E(ht),nt=l(F);{var xt=v=>{z(v,{variant:"link",size:"sm",type:"button",class:"h-auto px-0 text-xs",onclick:ie,children:(U,lt)=>{h();var C=x();s(rt=>o(C,rt),[()=>i.lib_gitlabConnect_createToken_label({host:t(p)})]),n(U,C)},$$slots:{default:!0}})};P(nt,v=>{t(Ct)&&t(p)&&v(xt)})}O(ht),O(y);var A=l(y,2),X=E(A);{let v=g(()=>!t(re));z(X,{variant:"primary",get size(){return t(zt)},type:"button",onclick:At,get disabled(){return t(v)},children:(U,lt)=>{h();var C=x();s(rt=>o(C,rt),[()=>i.lib_gitlabConnect_connect_label()]),n(U,C)},$$slots:{default:!0}})}var Ot=l(X,2);{var ke=v=>{z(v,{variant:"ghost",get size(){return t(gt)},type:"button",onclick:oe,children:(U,lt)=>{h();var C=x();s(rt=>o(C,rt),[()=>i.lib_gitlabConnect_useDevice_label()]),n(U,C)},$$slots:{default:!0}})};P(Ot,v=>{t(ft)&&!(t(p)===H()&&st()===!1)&&v(ke)})}var ye=l(Ot,2);{var Ce=v=>{z(v,{variant:"ghost",get size(){return t(gt)},type:"button",get onclick(){return w()},children:(U,lt)=>{h();var C=x();s(rt=>o(C,rt),[()=>i.lib_gitlabConnect_cancel_label()]),n(U,C)},$$slots:{default:!0}})};P(ye,v=>{w()&&v(Ce)})}O(A),s(v=>o(F,`${v??""} `),[()=>i.lib_gitlabConnect_token_description()]),n(d,$)},Et=d=>{var $=ra(),y=E($);{let F=g(()=>!t(p)||!_());z(y,{variant:"primary",get size(){return t(zt)},type:"button",onclick:Lt,get disabled(){return t(F)},children:(nt,xt)=>{h();var A=x();s(X=>o(A,X),[()=>i.lib_gitlabConnect_connect_label()]),n(nt,A)},$$slots:{default:!0}})}var L=l(y,2);{let F=g(()=>!_());z(L,{variant:"ghost",get size(){return t(gt)},type:"button",get disabled(){return t(F)},onclick:Pt,children:(nt,xt)=>{h();var A=x();s(X=>o(A,X),[()=>i.lib_gitlabConnect_useToken_label()]),n(nt,A)},$$slots:{default:!0}})}var mt=l(L,2);{var ht=F=>{z(F,{variant:"ghost",get size(){return t(gt)},type:"button",get onclick(){return w()},children:(nt,xt)=>{h();var A=x();s(X=>o(A,X),[()=>i.lib_gitlabConnect_cancel_label()]),n(nt,A)},$$slots:{default:!0}})};P(mt,F=>{w()&&F(ht)})}O($),n(d,$)};P(at,d=>{t(wt)?d(It):d(Et,-1)})}s(d=>{Mt(S,"id",N),o(ot,d)},[()=>i.lib_gitlabConnect_host_description()]),n(e,a)};P(Ft,e=>{(k()||b())&&Z()?e(_e):k()||b()?e(be,1):e(fe,-1)})}var Ut=l(Ft,2);{var ge=e=>{var a=oa(),u=B(a,!0);s(f=>o(u,f),[()=>i.lib_gitlabConnect_cancelled_label()]),n(e,a)},$e=e=>{var a=la(),u=E(a),f=B(u,!0),G=l(u,2);z(G,{variant:"link",size:"sm",type:"button",class:"px-0",get disabled(){return b()},onclick:()=>W.dispatch(Kt()),children:(S,ot)=>{h();var et=x();s(dt=>o(et,dt),[()=>i.lib_gitlabConnect_checkStatus_label()]),n(S,et)},$$slots:{default:!0}}),O(a),s(S=>o(f,S),[()=>j()==="already-started"?i.lib_gitlabConnect_alreadyStarted_description():i.lib_gitlabConnect_cancelFailed_description()]),n(e,a)};P(Ut,e=>{j()==="cancelled"?e(ge):(j()==="already-started"||j()==="failed")&&e($e,1)})}var me=l(Ut,2);{var he=e=>{var a=ia(),u=B(a,!0);s(()=>o(u,vt())),n(e,a)};P(me,e=>{vt()&&e(he)})}O($t)}s(()=>ze($t,1,De(T()?"space-y-2":"space-y-4"))),n(it,$t);var xe=Qt(de);return M(),xe}export{ua as G,Je as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as s}from"./
|
|
1
|
+
import{b as s}from"./CvYPF82-.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I};
|