@@ -1,10 +1,10 @@
const _ _vite _ _mapDeps = ( i , m = _ _vite _ _mapDeps , d = ( m . f || ( m . f = [ "assets/css2.js" , "assets/css.js" , "assets/html.js" , "assets/javascript.js" , "assets/javascript2.js" , "assets/AccountPage.js" , "assets/PageHeader.js" , "assets/createLucideIcon.js" , "assets/Input.js" , "assets/AuthenticationPage.js" , "assets/CredentialBindingsPage.js" , "assets/PlaybooksPage.js" , "assets/AgentProfilesPage.js" , "assets/HarnessPage.js" , "assets/alert.js" , "assets/NotFoundPage.js" ] ) ) ) => i . map ( i => d [ i ] ) ;
import { A as e , B as t , C as n , D as r , E as i , F as a , G as o , H as s , I as c , L as l , M as u , N as d , O as f , P as p , R as m , S as h , T as g , U as _ , V as v , W as y , _ as b , a as x , b as S , c as C , d as w , f as ee , g as te , h as T , i as E , j as D , k as ne , l as re , m as ie , n as O , o as ae , p as oe , r as se , s as ce , t as le , u as ue , v as de , w as fe , x as pe , y as me , z as he } from "./alert.js" ; import { $t as ge , A as k , B as _e , Bt as ve , C as A , Ct as j , D as ye , Dn as be , Dt as xe , En as Se , G as Ce , Gt as M , H as we , It as Te , Jt as Ee , Kt as De , Lt as Oe , M as N , On as ke , Pt as Ae , Q as je , Qt as Me , Rt as Ne , S as P , Sn as Pe , T as Fe , Tt as Ie , U as Le , Vt as Re , Xt as F , Z as ze , _t as I , an as Be , b as L , bn as Ve , cn as He , dn as Ue , dt as We , er as R , gn as Ge , hn as Ke , ht as qe , ir as z , it as Je , jn as B , k as V , kn as Ye , l as H , m as Xe , n as U , nr as Ze , nt as Qe , o as $e , ot as et , p as tt , pn as nt , r as rt , rr as it , rt as W , sn as at , st as ot , t as st , tt as ct , wn as lt , wt as G , x as K , xn as q , y as J , yn as ut , yt as dt } from "./PageHeader.js" ; import { C as ft , D as pt , I as eee , M as Y , N as mt , P as ht , a as gt , at as _t , c as tee , i as vt , it as yt , j as bt , n as xt , nt as St , o as Ct , r as X , rt as wt , s as Tt , t as Et , tt as Dt , z as nee } from "./createLucideIcon.js" ; import { a as Ot , c as ree , d as iee , f as aee , i as oee , l as see , n as kt , o as cee , p as At , r as jt , s as Mt , t as Z , u as Nt } from "./Input.js" ; ( function ( ) { let e = document . createElement ( ` link ` ) . relList ; if ( e && e . supports && e . supports ( ` modulepreload ` ) ) return ; for ( let e of document . querySelectorAll ( ` link[rel="modulepreload"] ` ) ) n ( e ) ; new MutationObserver ( e => { for ( let t of e ) if ( t . type === ` childList ` ) for ( let e of t . addedNodes ) e . tagName === ` LINK ` && e . rel === ` modulepreload ` && n ( e ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function t ( e ) { let t = { } ; return e . integrity && ( t . integrity = e . integrity ) , e . referrerPolicy && ( t . referrerPolicy = e . referrerPolicy ) , t . credentials = e . crossOrigin === ` use-credentials ` ? ` include ` : e . crossOrigin === ` anonymous ` ? ` omit ` : ` same-origin ` , t } function n ( e ) { if ( e . ep ) return ; e . ep = ! 0 ; let n = t ( e ) ; fetch ( e . href , n ) } } ) ( ) ; var Pt = typeof window < ` u ` , Ft , It = e => Ft = e , Lt = Symbol ( ) ; function Rt ( e ) { return e && typeof e == ` object ` && Object . prototype . toString . call ( e ) === ` [object Object] ` && typeof e . toJSON != ` function ` } var zt = typeof window == ` object ` && window . window === window ? window : typeof self == ` object ` && self . self === self ? self : typeof global == ` object ` && global . global === global ? global : typeof globalThis == ` object ` ? globalThis : { HTMLElement : null } ; function lee ( e , { autoBom : t = ! 1 } = { } ) { return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i . test ( e . type ) ? new Blob ( [ ` ` , e ] , { type : e . type } ) : e } function Bt ( e , t , n ) { let r = new XMLHttpRequest ; r . open ( ` GET ` , e ) , r . responseType = ` blob ` , r . onload = function ( ) { uee ( r . response , t , n ) } , r . onerror = function ( ) { console . error ( ` could not download file ` ) } , r . send ( ) } function Vt ( e ) { let t = new XMLHttpRequest ; t . open ( ` HEAD ` , e , ! 1 ) ; try { t . send ( ) } catch { } return t . status >= 200 && t . status <= 299 } function Ht ( e ) { try { e . dispatchEvent ( new MouseEvent ( ` click ` ) ) } catch { let t = new MouseEvent ( ` click ` , { bubbles : ! 0 , cancelable : ! 0 , view : window , detail : 0 , screenX : 80 , screenY : 20 , clientX : 80 , clientY : 20 , ctrlKey : ! 1 , altKey : ! 1 , shiftKey : ! 1 , metaKey : ! 1 , button : 0 , relatedTarget : null } ) ; e . dispatchEvent ( t ) } } var Ut = typeof navigator == ` object ` ? navigator : { userAgent : ` ` } , Wt = /Macintosh/ . test ( Ut . userAgent ) && /AppleWebKit/ . test ( Ut . userAgent ) && ! /Safari/ . test ( Ut . userAgent ) , uee = Pt ? typeof HTMLAnchorElement < ` u ` && ` download ` in HTMLAnchorElement . prototype && ! Wt ? dee : ` msSaveOrOpenBlob ` in Ut ? Gt : Kt : ( ) => { } ; function dee ( e , t = ` download ` , n ) { let r = document . createElement ( ` a ` ) ; r . download = t , r . rel = ` noopener ` , typeof e == ` string ` ? ( r . href = e , r . origin === location . origin ? Ht ( r ) : Vt ( r . href ) ? Bt ( e , t , n ) : ( r . target = ` _blank ` , Ht ( r ) ) ) : ( r . href = URL . createObjectURL ( e ) , setTimeout ( function ( ) { URL . revokeObjectURL ( r . href ) } , 4e4 ) , setTimeout ( function ( ) { Ht ( r ) } , 0 ) ) } function Gt ( e , t = ` download ` , n ) { if ( typeof e == ` string ` ) { if ( Vt ( e ) ) Bt ( e , t , n ) ; else { let t = document . createElement ( ` a ` ) ; t . href = e , t . target = ` _blank ` , setTimeout ( function ( ) { Ht ( t ) } ) } } else navigator . msSaveOrOpenBlob ( lee ( e , n ) , t ) } function Kt ( e , t , n , r ) { if ( r || = open ( ` ` , ` _blank ` ) , r && ( r . document . title = r . document . body . innerText = ` downloading... ` ) , typeof e == ` string ` ) return Bt ( e , t , n ) ; let i = e . type === ` application/octet-stream ` , a = /constructor/i . test ( String ( zt . HTMLElement ) ) || ` safari ` in zt , o = /CriOS\/[\d]+/ . test ( navigator . userAgent ) ; if ( ( o || i && a || Wt ) && typeof FileReader < ` u ` ) { let t = new FileReader ; t . onloadend = function ( ) { let e = t . result ; if ( typeof e != ` string ` ) throw r = null , Error ( ` Wrong reader.result type ` ) ; e = o ? e : e . replace ( /^data:[^;]*;/ , ` data:attachment/file; ` ) , r ? r . location . href = e : location . assign ( e ) , r = null } , t . readAsDataURL ( e ) } else { let t = URL . createObjectURL ( e ) ; r ? r . location . assign ( t ) : location . href = t , r = null , setTimeout ( function ( ) { URL . revokeObjectURL ( t ) } , 4e4 ) } } var { assign : fee } = Object ; function qt ( ) { let e = at ( ! 0 ) , t = e . run ( ( ) => q ( { } ) ) , n = [ ] , r = [ ] , i = Ke ( { install ( e ) { It ( i ) , i . _a = e , e . provide ( Lt , i ) , e . config . globalProperties . $pinia = i , r . forEach ( e => n . push ( e ) ) , r = [ ] } , use ( e ) { return this . _a ? n . push ( e ) : r . push ( e ) , this } , _p : n , _a : null , _e : e , _s : new Map , state : t } ) ; return i } var Jt = ( ) => { } ; function Yt ( e , t , n , r = J Line truncated
import { A as e , B as t , C as n , D as r , E as i , F as a , G as o , H as s , I as c , L as l , M as u , N as d , O as f , P as p , R as m , S as h , T as g , U as _ , V as v , W as y , _ as b , a as x , b as S , c as C , d as w , f as ee , g as T , h as E , i as D , j as O , k as te , l as ne , m as re , n as k , o as ie , p as ae , r as oe , s as se , t as ce , u as le , v as ue , w as de , x as fe , y as pe , z as me } from "./alert.js" ; import { $t as he , A , B as ge , Bt as _e , C as j , Ct as M , D as ve , Dn as ye , Dt as be , En as xe , G as Se , Gt as N , H as Ce , It as we , Jt as Te , Kt as Ee , Lt as De , M as P , On as Oe , Pt as ke , Q as Ae , Qt as je , Rt as Me , S as F , Sn as Ne , T as Pe , Tt as Fe , U as Ie , Vt as Le , Xt as I , Z as Re , _t as L , an as ze , b as R , bn as Be , cn as Ve , dn as He , dt as Ue , er as z , gn as We , hn as Ge , ht as Ke , ir as B , it as qe , jn as V , k as H , kn as Je , l as U , m as Ye , n as W , nr as Xe , nt as Ze , o as Qe , ot as $e , p as et , pn as tt , r as nt , rr as rt , rt as G , sn as it , st as at , t as ot , tt as st , wn as ct , wt as K , x as q , xn as J , y as Y , yn as lt , yt as ut } from "./PageHeader.js" ; import { C as dt , D as ft , I as eee , M as X , N as pt , P as mt , a as ht , at as gt , c as tee , i as _t , it as vt , j as yt , n as bt , nt as xt , o as St , r as Z , rt as Ct , s as wt , t as Tt , tt as Et , z as nee } from "./createLucideIcon.js" ; import { a as Dt , c as ree , d as iee , f as aee , i as oee , l as see , n as Ot , o as cee , p as kt , r as At , s as jt , t as Q , u as Mt } from "./Input.js" ; ( function ( ) { let e = document . createElement ( ` link ` ) . relList ; if ( e && e . supports && e . supports ( ` modulepreload ` ) ) return ; for ( let e of document . querySelectorAll ( ` link[rel="modulepreload"] ` ) ) n ( e ) ; new MutationObserver ( e => { for ( let t of e ) if ( t . type === ` childList ` ) for ( let e of t . addedNodes ) e . tagName === ` LINK ` && e . rel === ` modulepreload ` && n ( e ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function t ( e ) { let t = { } ; return e . integrity && ( t . integrity = e . integrity ) , e . referrerPolicy && ( t . referrerPolicy = e . referrerPolicy ) , t . credentials = e . crossOrigin === ` use-credentials ` ? ` include ` : e . crossOrigin === ` anonymous ` ? ` omit ` : ` same-origin ` , t } function n ( e ) { if ( e . ep ) return ; e . ep = ! 0 ; let n = t ( e ) ; fetch ( e . href , n ) } } ) ( ) ; var Nt = typeof window < ` u ` , Pt , Ft = e => Pt = e , It = Symbol ( ) ; function Lt ( e ) { return e && typeof e == ` object ` && Object . prototype . toString . call ( e ) === ` [object Object] ` && typeof e . toJSON != ` function ` } var Rt = typeof window == ` object ` && window . window === window ? window : typeof self == ` object ` && self . self === self ? self : typeof global == ` object ` && global . global === global ? global : typeof globalThis == ` object ` ? globalThis : { HTMLElement : null } ; function lee ( e , { autoBom : t = ! 1 } = { } ) { return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i . test ( e . type ) ? new Blob ( [ ` ` , e ] , { type : e . type } ) : e } function zt ( e , t , n ) { let r = new XMLHttpRequest ; r . open ( ` GET ` , e ) , r . responseType = ` blob ` , r . onload = function ( ) { uee ( r . response , t , n ) } , r . onerror = function ( ) { console . error ( ` could not download file ` ) } , r . send ( ) } function Bt ( e ) { let t = new XMLHttpRequest ; t . open ( ` HEAD ` , e , ! 1 ) ; try { t . send ( ) } catch { } return t . status >= 200 && t . status <= 299 } function Vt ( e ) { try { e . dispatchEvent ( new MouseEvent ( ` click ` ) ) } catch { let t = new MouseEvent ( ` click ` , { bubbles : ! 0 , cancelable : ! 0 , view : window , detail : 0 , screenX : 80 , screenY : 20 , clientX : 80 , clientY : 20 , ctrlKey : ! 1 , altKey : ! 1 , shiftKey : ! 1 , metaKey : ! 1 , button : 0 , relatedTarget : null } ) ; e . dispatchEvent ( t ) } } var Ht = typeof navigator == ` object ` ? navigator : { userAgent : ` ` } , Ut = /Macintosh/ . test ( Ht . userAgent ) && /AppleWebKit/ . test ( Ht . userAgent ) && ! /Safari/ . test ( Ht . userAgent ) , uee = Nt ? typeof HTMLAnchorElement < ` u ` && ` download ` in HTMLAnchorElement . prototype && ! Ut ? dee : ` msSaveOrOpenBlob ` in Ht ? Wt : Gt : ( ) => { } ; function dee ( e , t = ` download ` , n ) { let r = document . createElement ( ` a ` ) ; r . download = t , r . rel = ` noopener ` , typeof e == ` string ` ? ( r . href = e , r . origin === location . origin ? Vt ( r ) : Bt ( r . href ) ? zt ( e , t , n ) : ( r . target = ` _blank ` , Vt ( r ) ) ) : ( r . href = URL . createObjectURL ( e ) , setTimeout ( function ( ) { URL . revokeObjectURL ( r . href ) } , 4e4 ) , setTimeout ( function ( ) { Vt ( r ) } , 0 ) ) } function Wt ( e , t = ` download ` , n ) { if ( typeof e == ` string ` ) { if ( Bt ( e ) ) zt ( e , t , n ) ; else { let t = document . createElement ( ` a ` ) ; t . href = e , t . target = ` _blank ` , setTimeout ( function ( ) { Vt ( t ) } ) } } else navigator . msSaveOrOpenBlob ( lee ( e , n ) , t ) } function Gt ( e , t , n , r ) { if ( r || = open ( ` ` , ` _blank ` ) , r && ( r . document . title = r . document . body . innerText = ` downloading... ` ) , typeof e == ` string ` ) return zt ( e , t , n ) ; let i = e . type === ` application/octet-stream ` , a = /constructor/i . test ( String ( Rt . HTMLElement ) ) || ` safari ` in Rt , o = /CriOS\/[\d]+/ . test ( navigator . userAgent ) ; if ( ( o || i && a || Ut ) && typeof FileReader < ` u ` ) { let t = new FileReader ; t . onloadend = function ( ) { let e = t . result ; if ( typeof e != ` string ` ) throw r = null , Error ( ` Wrong reader.result type ` ) ; e = o ? e : e . replace ( /^data:[^;]*;/ , ` data:attachment/file; ` ) , r ? r . location . href = e : location . assign ( e ) , r = null } , t . readAsDataURL ( e ) } else { let t = URL . createObjectURL ( e ) ; r ? r . location . assign ( t ) : location . href = t , r = null , setTimeout ( function ( ) { URL . revokeObjectURL ( t ) } , 4e4 ) } } var { assign : fee } = Object ; function Kt ( ) { let e = it ( ! 0 ) , t = e . run ( ( ) => J ( { } ) ) , n = [ ] , r = [ ] , i = Ge ( { install ( e ) { Ft ( i ) , i . _a = e , e . provide ( It , i ) , e . config . globalProperties . $pinia = i , r . forEach ( e => n . push ( e ) ) , r = [ ] } , use ( e ) { return this . _a ? n . push ( e ) : r . push ( e ) , this } , _p : n , _a : null , _e : e , _s : new Map , state : t } ) ; return i } var qt = ( ) => { } ; function Jt ( e , t , n , r = qt ) { e . a Line truncated
` );p=n.pop()|| ` ` ;for(let e of n){let t=e.split( `
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&(Lu.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,Uu.value=Uu.value?{...Uu.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],Uu.value=Uu.value?{...Uu.value,tools:a}:null),n.type=== ` ask ` &&n.ask&&(clearTimeout(l),Uu.value=Uu.value?{...Uu.value,ask:n.ask}:null),n.type=== ` done ` &&(s=!0,o||=n.text|| ` ` ),n.type=== ` error ` )throw Error(n.text)}if(t)break}if(!s)throw Error( ` chat stream ended before completion ` );Ru.value=!i&&n.trim()=== ` / new ` ?[]:[...Ru.value,{from: ` assistant ` ,text:o,tool_calls:a}],Uu.value=null,Bu.value= ` Ready ` ,await $ u()}catch(e){let t=e;o&&(Ru.value=[...Ru.value,{from: ` assistant ` ,text:o,tool_calls:a}],a=[]),t.name=== ` AbortError ` &&!c?(Uu.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},Bu.value= ` Stopped ` ):(Uu.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?Nu(r):void 0,isRetry:i},Bu.value= ` Error . Retry available . ` )}finally{clearTimeout(l),Pu=null,Zu=null,Vu.value=!1,rd.after?.()}}function one(){Bu.value= ` Stopping … ` ,Lu.value&&X.chatCancel(Lu.value).catch(()=>{}),Qu()}function sne(){We(()=>{ $ u().catch(e=>{Bu.value=e.message|| ` Chat unavailable ` })}),qe(()=>{Qu()})}async function ud(e){let t=new Uint8Array(await e.arrayBuffer()),n= ` ` ;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));await ld({textOverride: ` 🎤 Voice message ` ,voice:{data:btoa(n),mime_type:e.type|| ` audio / webm ` }})}var dd={class: ` grid gap - 1 p - 1 ` },fd={key:0,class: ` text - xs text - fg - subtle ` },pd= ` _ _default _ _ ` ,md=N({__name: ` ChatSettings ` ,setup(e){let t=J(()=>Gu.value||pd),n=J(()=>{let e=Wu.value.models_by_provider||{},t=Object.entries(e).filter(([,e])=>e.length);return t.length?t:[[ ` ` ,Wu.value.models||[]]]});return(e,r)=>(I(),A( ` div ` ,dd,[B(Bu)=== ` Ready ` ?P( ` ` ,!0):(I(),A( ` span ` ,fd,z(B(Bu)),1)),k(B(Tu),{"model-value":t.value,"onUpdate:modelValue":r[0]||=e=>B(nd)(e===pd? ` ` :String(e?? ` ` ))},{default:F(()=>[k(B(ku),{size: ` sm ` ,class: ` w - full ` ,"aria-label": ` Model ` },{default:F(()=>[k(B(Au))]),_:1}),k(B(Eu),null,{default:F(()=>[k(B(Ou),{value:pd},{default:F(()=>[...r[1]||=[V( ` Default ` ,-1)]]),_:1}),(I(!0),A(H,null,j(n.value,([e,t])=>(I(),K(B(Du),{key:e},{default:F(()=>[e?(I(),K(B(Bte),{key:0},{default:F(()=>[V(z(e),1)]),_:2},1024)):P( ` ` ,!0),(I(!0),A(H,null,j(t,e=>(I(),K(B(Ou),{key:e,value:e},{default:F(()=>[V(z(e),1)]),_:2},1032,[ ` value ` ]))),128))]),_:2},1024))),128))]),_:1})]),_:1},8,[ ` model - value ` ])]))}}),hd=N({__name: ` ChatSessionActions ` ,setup(e){let t=q(!1);Qte(t);function n(e){t.value=!1,td(e)}function r(e,n){t.value=!1,tne(e,n)}return(e,i)=>(I(),K(B(Su),{open:t.value,"onUpdate:open":i[5]||=e=>t.value=e},{default:F(()=>[k(B(wu),{"as-child": ` ` },{default:F(()=>[k(B(Y),{variant: ` ghost ` ,size: ` icon - sm ` ,class: ` flex - none ` ,"aria-label": ` More ` ,title: ` More ` },{default:F(()=>[k(B(Kl))]),_:1})]),_:1}),k(B(Cu),{align: ` end ` ,class: ` grid w - 64 gap - 0.5 p - 1 ` },{default:F(()=>[B(Lu)?(I(),A(H,{key:0},[k(B(Y),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[0]||=e=>n( ` / retry ` )},{default:F(()=>[k(B(Dte),{"data-icon": ` inline - start ` }),i[6]||=V( ` Retry ` ,-1)]),_:1}),k(B(Y),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[1]||=e=>n( ` / undo ` )},{default:F(()=>[k(B(_u),{"data-icon": ` inline - start ` }),i[7]||=V( ` Undo ` ,-1)]),_:1}),k(B(Y),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[2]||=e=>r( ` / title ` , ` Session title ` )},{default:F(()=>[k(B(su),{"data-icon": ` inline - start ` }),i[8]||=V( ` Rename ` ,-1)]),_:1}),k(B(Y),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[3]||=e=>r( ` / branch ` , ` Branch name ( optional ) ` )},{default:F(()=>[k(B(eu),{"data-icon": ` inline - start ` }),i[9]||=V( ` Branch ` ,-1)]),_:1}),k(B(Y),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[4]||=e=>n( ` / compress -- preview ` )},{default:F(()=>[k(B(Mte),{"data-icon": ` inline - start ` }),i[10]||=V( ` Preview compression ` ,-1)]),_:1}),k(B(Rte),{class: ` my - 1 ` })],64)):P( ` ` ,!0),k(md)]),_:1})]),_:1},8,[ ` open ` ]))}}),gd=new Intl.DateTimeFormat(void 0,{month: ` short ` ,day: ` numeric ` ,hour: ` numeric ` ,minute: ` 2 - digit ` });function _d(e){return e.title||e.branch_name||(e.created_at?gd.format(new Date(e.created_at)): ` New chat ` )}var vd={class: ` min - w - 0 flex - 1 ` },yd=N({__name: ` ChatSessionList ` ,setup(e){return(e,t)=>(I(),A( ` div ` ,vd,[k(B(Tu),{"model-value":B(Lu),disabled:!B(Iu).length,"onUpdate:modelValue":t[0]||=e=>B(ed)(String(e))},{default:F(()=>[k(B(ku),{size: ` sm ` ,class: ` w - full ` ,"aria-label": ` Conversation ` },{default:F(()=>[k(B(Au),{placeholder: ` No conversations yet ` })]),_:1}),k(B(Eu),null,{default:F(()=>[k(B(Du),null,{default:F(()=>[(I(!0),A(H,null,j(B(Iu),e=>(I(),K(B(Ou),{key:e.session_id,value:e.session_id},{default:F(()=>[V(z(B(_d)(e)),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1})]),_:1},8,[ ` model - value ` , ` disabled ` ])]))}}),bd={class: ` flex items - center gap - 1 border - b px - 3 py - 2 ` },xd=N({__name: ` ChatBar ` ,setup(e){return(e,t)=>(I(),A( ` div ` ,bd,[k(yd),k(B(Y),{variant: ` ghost ` ,size: ` icon - sm ` ,class: ` flex - none ` ,title: ` New chat ` ,
Line truncated
` ))],64)):G (n. $ slots, ` default ` ,{},void 0,void 0,1)])],10,Kp))}}),Yp=N ({__name: ` CodeBlockContent ` ,props:{wrap:{type:Boolean,default:!1},lineNumbers:{type:Boolean,default:!1},startLine:{default:1},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=v e();function r(e){let t= ` ` ;for(let n of e)if(n.type!== $ e){if(n.type===X e)t+=n.children;else if(n.type===H &&Array.isArray(n.children)){let e=r(n.children);if(e===null)return null;t+=e}else return null}return t}function i(){if(!t.lineNumbers)return null;let e=r(n.default?.()??[]);return e===null?null:e.replace(/ \n $ /, ` ` ).split( `
` )}return(n,r)=>(I(),K(B(mt),{as: ` pre ` ,"data-slot": ` code - block - content ` ,"data-wrap":e.wrap||void 0,"data-numbered":e.lineNumbers||void 0,dir: ` ltr ` ,tabindex: ` 0 ` ,style:it({counterReset: ` line $ { e . startLine - 1 } ` }),class:R(B(U)( ` px - 3 py - 3 leading - relaxed group - has - data - [ slot = code - block - header ] / code - block : pt - 2 group - has - data - [ slot = code - block - footer ] / code - block : pb - 2 group - data - [ size = sm ] / code - block : px - 2.5 group - data - [ size = sm ] / code - block : py - 2.5 group - data - [ size = sm ] / code - block : group - has - data - [ slot = code - block - header ] / code - block : pt - 1.5 min - h - 0 min - w - 0 scroll - fade - x scrollbar - thin overflow - auto text - start font - mono outline - none data - wrap : scroll - fade - y data - wrap : wrap - break - word data - wrap : whitespace - pre - wrap ` ,t.class))},{default:F(()=>[k(B(mt),{as: ` code ` ,"data-slot": ` code - block - code ` ,class: ` grid min - h - lh min - w - max content - start in - data - numbered : grid - cols - [ auto _1fr ] in - data - wrap : min - w - 0 ` },{default:F(()=>[(I(!0),A(H,null,j([i()],(e,t)=>(I(),A(H,{key:t},[e?(I(!0),A(H,{key:0},j(e,(e,t)=>(I(),K(Jp,{key:t},{default:F(()=>[V(z(e),1)]),_:2},1024))),128)):G(n. $ slots, ` default ` ,{},void 0,void 0,1)],64))),128))]),_:3})]),_:3},8,[ ` data - wrap ` , ` data - numbered ` , ` style ` , ` class ` ]))}}),Xp={"aria-live": ` polite ` ,class: ` sr - only ` },Zp=N({inheritAttrs:!1,__name: ` CodeBlockCopyButton ` ,props:{asChild:{type:Boolean},as:{default: ` button ` },value:{},variant:{default: ` ghost ` },size:{default: ` icon - xs ` },class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,{copy:n,copied:r}=cee({copiedDuring:2e3,legacy:!0});return(i,a)=>(I(),A(H,null,[k(B(Y),W(i. $ attrs,{"data-slot": ` code - block - copy - button ` ,"data-copied":B(r)||void 0,as:e.as,"as-child":e.asChild,variant:e.variant,size:e.size,"aria-label":B(r)? ` Copied ` : ` Copy ` ,class:B(U)( ` ` ,t.class),onClick:a[0]||=e=>B(n)(t.value)}),{default:F(()=>[B(r)?(I(),K(B(Nl),{key:0})):(I(),K(B(Wl),{key:1}))]),_:1},16,[ ` data - copied ` , ` as ` , ` as - child ` , ` variant ` , ` size ` , ` aria - label ` , ` class ` ]),L( ` span ` ,Xp,z(B(r)? ` Copied ` : ` ` ),1)],64))}}),Qp=N({__name: ` CodeBlockToken ` ,props:{token:{}},setup(e){return(t,n)=>(I(),A( ` span ` ,{style:it(e.token.htmlStyle),class: ` text - ( -- shiki - light ) dark : text - ( -- shiki - dark ) ` },z(e.token.content),5))}}), $ p=class extends Error{constructor(e){super(e),this.name= ` ShikiError ` }};function em(e){return tm(e)}function tm(e){return Array.isArray(e)?nm(e):e instanceof RegExp?e:typeof e== ` object ` ?rm(e):e}function nm(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=tm(e[n]);return t}function rm(e){let t={};for(let n in e)t[n]=tm(e[n]);return t}function im(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function am(e){let t=~e.lastIndexOf( ` / ` )||~e.lastIndexOf( ` \ \ ` );return t===0?e:~t===e.length-1?am(e.substring(0,e.length-1)):e.substr(~t+1)}var om=/ \$ ( \d +)| \$ {( \d +): \/ (downcase|upcase)}/g,sm=class{static hasCaptures(e){return e!==null&&(om.lastIndex=0,om.test(e))}static replaceCaptures(e,t,n){return e.replace(om,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]=== ` . ` ;)e=e.substring(1);switch(a){case ` downcase ` :return e.toLowerCase();case ` upcase ` :return e.toUpperCase();default:return e}}else return e})}};function cm(e,t){return e<t?-1:+(e>t)}function lm(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=cm(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function um(e){return!!(/^#[0-9a-f]{6} $ /i.test(e)||/^#[0-9a-f]{8} $ /i.test(e)||/^#[0-9a-f]{3} $ /i.test(e)||/^#[0-9a-f]{4} $ /i.test(e))}function dm(e){return e.replace(/[ \- \\ \{ \} \* \+ \? \| \^ \$ \. \, \[ \] \( \) \# \s ]/g, ` \ \ $ & ` )}var fm=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},pm=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(vm(e),t)}static createFromParsedTheme(e,t){return xm(e,t)}_cachedMatchRoot=new fm(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>hm(e.parent,t.parentScopes));return n?new _m(n.fontStyle,n.foreground,n.background):null}},mm=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join( ` ` )}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function hm(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r=== ` > ` ){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!gm(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function gm
Line truncated
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&(Lu.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,Uu.value=Uu.value?{...Uu.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],Uu.value=Uu.value?{...Uu.value,tools:a}:null),n.type=== ` ask ` &&n.ask&&(clearTimeout(l),Uu.value=Uu.value?{...Uu.value,ask:n.ask}:null),n.type=== ` done ` &&(s=!0,o||=n.text|| ` ` ),n.type=== ` error ` )throw Error(n.text)}if(t)break}if(!s)throw Error( ` chat stream ended before completion ` );Ru.value=!i&&n.trim()=== ` / new ` ?[]:[...Ru.value,{from: ` assistant ` ,text:o,tool_calls:a}],Uu.value=null,Bu.value= ` Ready ` ,await $ u()}catch(e){let t=e;o&&(Ru.value=[...Ru.value,{from: ` assistant ` ,text:o,tool_calls:a}],a=[]),t.name=== ` AbortError ` &&!c?(Uu.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},Bu.value= ` Stopped ` ):(Uu.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?Nu(r):void 0,isRetry:i},Bu.value= ` Error . Retry available . ` )}finally{clearTimeout(l),Pu=null,Zu=null,Vu.value=!1,rd.after?.()}}function ane(){Bu.value= ` Stopping … ` ,Lu.value&&Z.chatCancel(Lu.value).catch(()=>{}),Qu()}function one(){Ue(()=>{ $ u().catch(e=>{Bu.value=e.message|| ` Chat unavailable ` })}),Ke(()=>{Qu()})}async function ud(e){let t=new Uint8Array(await e.arrayBuffer()),n= ` ` ;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));await ld({textOverride: ` 🎤 Voice message ` ,voice:{data:btoa(n),mime_type:e.type|| ` audio / webm ` }})}var dd={class: ` grid gap - 1 p - 1 ` },fd={key:0,class: ` text - xs text - fg - subtle ` },pd= ` _ _default _ _ ` ,md=P({__name: ` ChatSettings ` ,setup(e){let t=Y(()=>Gu.value||pd),n=Y(()=>{let e=Wu.value.models_by_provider||{},t=Object.entries(e).filter(([,e])=>e.length);return t.length?t:[[ ` ` ,Wu.value.models||[]]]});return(e,r)=>(L(),j( ` div ` ,dd,[V(Bu)=== ` Ready ` ?F( ` ` ,!0):(L(),j( ` span ` ,fd,B(V(Bu)),1)),A(V(Tu),{"model-value":t.value,"onUpdate:modelValue":r[0]||=e=>V(nd)(e===pd? ` ` :String(e?? ` ` ))},{default:I(()=>[A(V(ku),{size: ` sm ` ,class: ` w - full ` ,"aria-label": ` Model ` },{default:I(()=>[A(V(Au))]),_:1}),A(V(Eu),null,{default:I(()=>[A(V(Ou),{value:pd},{default:I(()=>[...r[1]||=[H( ` Default ` ,-1)]]),_:1}),(L(!0),j(U,null,M(n.value,([e,t])=>(L(),q(V(Du),{key:e},{default:I(()=>[e?(L(),q(V(zte),{key:0},{default:I(()=>[H(B(e),1)]),_:2},1024)):F( ` ` ,!0),(L(!0),j(U,null,M(t,e=>(L(),q(V(Ou),{key:e,value:e},{default:I(()=>[H(B(e),1)]),_:2},1032,[ ` value ` ]))),128))]),_:2},1024))),128))]),_:1})]),_:1},8,[ ` model - value ` ])]))}}),hd=P({__name: ` ChatSessionActions ` ,setup(e){let t=J(!1);Zte(t);function n(e){t.value=!1,td(e)}function r(e,n){t.value=!1,ene(e,n)}return(e,i)=>(L(),q(V(Su),{open:t.value,"onUpdate:open":i[5]||=e=>t.value=e},{default:I(()=>[A(V(wu),{"as-child": ` ` },{default:I(()=>[A(V(X),{variant: ` ghost ` ,size: ` icon - sm ` ,class: ` flex - none ` ,"aria-label": ` More ` ,title: ` More ` },{default:I(()=>[A(V(Kl))]),_:1})]),_:1}),A(V(Cu),{align: ` end ` ,class: ` grid w - 64 gap - 0.5 p - 1 ` },{default:I(()=>[V(Lu)?(L(),j(U,{key:0},[A(V(X),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[0]||=e=>n( ` / retry ` )},{default:I(()=>[A(V(Ete),{"data-icon": ` inline - start ` }),i[6]||=H( ` Retry ` ,-1)]),_:1}),A(V(X),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[1]||=e=>n( ` / undo ` )},{default:I(()=>[A(V(_u),{"data-icon": ` inline - start ` }),i[7]||=H( ` Undo ` ,-1)]),_:1}),A(V(X),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[2]||=e=>r( ` / title ` , ` Session title ` )},{default:I(()=>[A(V(su),{"data-icon": ` inline - start ` }),i[8]||=H( ` Rename ` ,-1)]),_:1}),A(V(X),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[3]||=e=>r( ` / branch ` , ` Branch name ( optional ) ` )},{default:I(()=>[A(V(eu),{"data-icon": ` inline - start ` }),i[9]||=H( ` Branch ` ,-1)]),_:1}),A(V(X),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start ` ,onClick:i[4]||=e=>n( ` / compress -- preview ` )},{default:I(()=>[A(V(jte),{"data-icon": ` inline - start ` }),i[10]||=H( ` Preview compression ` ,-1)]),_:1}),A(V(Lte),{class: ` my - 1 ` })],64)):F( ` ` ,!0),A(md)]),_:1})]),_:1},8,[ ` open ` ]))}}),gd=new Intl.DateTimeFormat(void 0,{month: ` short ` ,day: ` numeric ` ,hour: ` numeric ` ,minute: ` 2 - digit ` });function _d(e){return e.title||e.branch_name||(e.created_at?gd.format(new Date(e.created_at)): ` New chat ` )}var vd={class: ` min - w - 0 flex - 1 ` },yd=P({__name: ` ChatSessionList ` ,setup(e){return(e,t)=>(L(),j( ` div ` ,vd,[A(V(Tu),{"model-value":V(Lu),disabled:!V(Iu).length,"onUpdate:modelValue":t[0]||=e=>V(ed)(String(e))},{default:I(()=>[A(V(ku),{size: ` sm ` ,class: ` w - full ` ,"aria-label": ` Conversation ` },{default:I(()=>[A(V(Au),{placeholder: ` No conversations yet ` })]),_:1}),A(V(Eu),null,{default:I(()=>[A(V(Du),null,{default:I(()=>[(L(!0),j(U,null,M(V(Iu),e=>(L(),q(V(Ou),{key:e.session_id,value:e.session_id},{default:I(()=>[H(B(V(_d)(e)),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1})]),_:1},8,[ ` model - value ` , ` disabled ` ])]))}}),bd={class: ` flex items - center gap - 1 border - b px - 3 py - 2 ` },xd=P({__name: ` ChatBar ` ,setup(e){return(e,t)=>(L(),j( ` div ` ,bd,[A(yd),A(V(X),{variant: ` ghost ` ,size: ` icon - sm ` ,class: ` flex - none ` ,title: ` New chat ` ,
Line truncated
` ))],64)):K (n. $ slots, ` default ` ,{},void 0,void 0,1)])],10,Kp))}}),Yp=P ({__name: ` CodeBlockContent ` ,props:{wrap:{type:Boolean,default:!1},lineNumbers:{type:Boolean,default:!1},startLine:{default:1},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=_ e();function r(e){let t= ` ` ;for(let n of e)if(n.type!==Q e){if(n.type===Y e)t+=n.children;else if(n.type===U &&Array.isArray(n.children)){let e=r(n.children);if(e===null)return null;t+=e}else return null}return t}function i(){if(!t.lineNumbers)return null;let e=r(n.default?.()??[]);return e===null?null:e.replace(/ \n $ /, ` ` ).split( `
` )}return(n,r)=>(L(),q(V(pt),{as: ` pre ` ,"data-slot": ` code - block - content ` ,"data-wrap":e.wrap||void 0,"data-numbered":e.lineNumbers||void 0,dir: ` ltr ` ,tabindex: ` 0 ` ,style:rt({counterReset: ` line $ { e . startLine - 1 } ` }),class:z(V(W)( ` px - 3 py - 3 leading - relaxed group - has - data - [ slot = code - block - header ] / code - block : pt - 2 group - has - data - [ slot = code - block - footer ] / code - block : pb - 2 group - data - [ size = sm ] / code - block : px - 2.5 group - data - [ size = sm ] / code - block : py - 2.5 group - data - [ size = sm ] / code - block : group - has - data - [ slot = code - block - header ] / code - block : pt - 1.5 min - h - 0 min - w - 0 scroll - fade - x scrollbar - thin overflow - auto text - start font - mono outline - none data - wrap : scroll - fade - y data - wrap : wrap - break - word data - wrap : whitespace - pre - wrap ` ,t.class))},{default:I(()=>[A(V(pt),{as: ` code ` ,"data-slot": ` code - block - code ` ,class: ` grid min - h - lh min - w - max content - start in - data - numbered : grid - cols - [ auto _1fr ] in - data - wrap : min - w - 0 ` },{default:I(()=>[(L(!0),j(U,null,M([i()],(e,t)=>(L(),j(U,{key:t},[e?(L(!0),j(U,{key:0},M(e,(e,t)=>(L(),q(Jp,{key:t},{default:I(()=>[H(B(e),1)]),_:2},1024))),128)):K(n. $ slots, ` default ` ,{},void 0,void 0,1)],64))),128))]),_:3})]),_:3},8,[ ` data - wrap ` , ` data - numbered ` , ` style ` , ` class ` ]))}}),Xp={"aria-live": ` polite ` ,class: ` sr - only ` },Zp=P({inheritAttrs:!1,__name: ` CodeBlockCopyButton ` ,props:{asChild:{type:Boolean},as:{default: ` button ` },value:{},variant:{default: ` ghost ` },size:{default: ` icon - xs ` },class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,{copy:n,copied:r}=cee({copiedDuring:2e3,legacy:!0});return(i,a)=>(L(),j(U,null,[A(V(X),G(i. $ attrs,{"data-slot": ` code - block - copy - button ` ,"data-copied":V(r)||void 0,as:e.as,"as-child":e.asChild,variant:e.variant,size:e.size,"aria-label":V(r)? ` Copied ` : ` Copy ` ,class:V(W)( ` ` ,t.class),onClick:a[0]||=e=>V(n)(t.value)}),{default:I(()=>[V(r)?(L(),q(V(Nl),{key:0})):(L(),q(V(Wl),{key:1}))]),_:1},16,[ ` data - copied ` , ` as ` , ` as - child ` , ` variant ` , ` size ` , ` aria - label ` , ` class ` ]),R( ` span ` ,Xp,B(V(r)? ` Copied ` : ` ` ),1)],64))}}),Qp=P({__name: ` CodeBlockToken ` ,props:{token:{}},setup(e){return(t,n)=>(L(),j( ` span ` ,{style:rt(e.token.htmlStyle),class: ` text - ( -- shiki - light ) dark : text - ( -- shiki - dark ) ` },B(e.token.content),5))}}), $ p=class extends Error{constructor(e){super(e),this.name= ` ShikiError ` }};function em(e){return tm(e)}function tm(e){return Array.isArray(e)?nm(e):e instanceof RegExp?e:typeof e== ` object ` ?rm(e):e}function nm(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=tm(e[n]);return t}function rm(e){let t={};for(let n in e)t[n]=tm(e[n]);return t}function im(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function am(e){let t=~e.lastIndexOf( ` / ` )||~e.lastIndexOf( ` \ \ ` );return t===0?e:~t===e.length-1?am(e.substring(0,e.length-1)):e.substr(~t+1)}var om=/ \$ ( \d +)| \$ {( \d +): \/ (downcase|upcase)}/g,sm=class{static hasCaptures(e){return e!==null&&(om.lastIndex=0,om.test(e))}static replaceCaptures(e,t,n){return e.replace(om,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]=== ` . ` ;)e=e.substring(1);switch(a){case ` downcase ` :return e.toLowerCase();case ` upcase ` :return e.toUpperCase();default:return e}}else return e})}};function cm(e,t){return e<t?-1:+(e>t)}function lm(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=cm(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function um(e){return!!(/^#[0-9a-f]{6} $ /i.test(e)||/^#[0-9a-f]{8} $ /i.test(e)||/^#[0-9a-f]{3} $ /i.test(e)||/^#[0-9a-f]{4} $ /i.test(e))}function dm(e){return e.replace(/[ \- \\ \{ \} \* \+ \? \| \^ \$ \. \, \[ \] \( \) \# \s ]/g, ` \ \ $ & ` )}var fm=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},pm=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(vm(e),t)}static createFromParsedTheme(e,t){return xm(e,t)}_cachedMatchRoot=new fm(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>hm(e.parent,t.parentScopes));return n?new _m(n.fontStyle,n.foreground,n.background):null}},mm=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join( ` ` )}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function hm(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r=== ` > ` ){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!gm(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function gm
Line truncated
` )}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},lh=class{constructor(e,t){this.languageId=e,this.tokenType=t}},uh=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new lh(e,8),this._embeddedLanguagesMatcher=new dh(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new lh(0,0);_getBasicScopeAttributes=new fm(e=>new lh(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case ` comment ` :return 1;case ` string ` :return 2;case ` regex ` :return 3;case ` meta . embedded ` :return 0}throw Error( ` Unexpected match for standard token type ! ` )}static STANDARD_TOKEN_TYPE_REGEXP=/ \b (comment|string|regex|meta \. embedded) \b /},dh=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>dm(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp( ` ^ ( ( $ { t . join ( ` )|( ` ) } ) ) ( $ | \ \ . ) ` , ` ` )}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process< ` u ` &&{}.VSCODE_TEXTMATE_DEBUG;var fh=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function ph(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=mh(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new fh(i,!0);f()}return new fh(i,!1);function f(){let o=hh(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Ym){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),bh(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof rh){let r=o;bh(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof ih){let r=o;bh(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(bh(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function mh(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof ih&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=yh(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Xm){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),bh(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function hh(e,t,n,r,i,a){let o=gh(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=_h(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function gh(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=vh(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function _h(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=vh(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function vh(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function yh(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function bh(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.
Line truncated
` ;let a=this.createOnigString(e),o=a.content.length,s=new jh(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=ph(this,a,i,0,t,s,!0,r);return Mm(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Dh(e,t){return e=em(e),e.repository=e.repository||{},e.repository. $ self={ $ vscodeTextmateLocation:e. $ vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository. $ base=t||e.repository. $ self,e}var Oh=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=mm.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new mm(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new mm(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join( ` ` )}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Em.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf( ` ` )===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},kh=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Oh.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0), ` [ ` +e.join( ` , ` )+ ` ] ` }_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]= ` ( $ { this . ruleId } , $ { this . nameScopesList ? . toString ( ) } , $ { this . contentNameScopesList ? . toString ( ) } ) ` ,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Qm(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Oh.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Zm(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Oh.fromExtension(r,n.contentNameScopesList))}},Ah=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e=== ` * ` ?(this.allowAny=!0,[]):km(e,wh).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>km(e,wh).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},jh=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._l
Line truncated
\ f \ r & / = > ` . s p l i t ( ` ` ) , `
@@ -47,7 +47,7 @@ import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,L as l,M a
| &&
| .
` .replace(/ \s +/g, ` ` ), ` gsu ` );function Ny(e,t={}){let n={flags: ` ` ,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!= ` string ` )throw Error( ` String expected as pattern ` );let r=lb(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(jy.lastIndex=0;s=jy.exec(e);){let t=Py(a,e,s[0],jy.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(jy.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type=== ` GroupOpen ` ).forEach(e=>{e.kind=== ` capturing ` ?e.number=++l:e.raw=== ` ( ` &&c.push(e)}),l||c.forEach((e,t)=>{e.kind= ` capturing ` ,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type=== ` EscapedNumber ` ?db(e,u):e).flat(),flags:r}}function Py(e,t,n,r){let[i,a]=n;if(n=== ` [ ` ||n=== ` [ ^ ` ){let e=Fy(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i=== ` \ \ ` ){if( ` AbBGyYzZ ` .includes(a))return{token:zy(n,n)};if(/^ \\ g[<']/.test(n)){if(!/^ \\ g(?:<[^>]+>|'[^']+') $ /.test(n))throw Error( ` Invalid group name "${n}" ` );return{token: $ y(n)}}if(/^ \\ k[<']/.test(n)){if(!/^ \\ k(?:<[^>]+>|'[^']+') $ /.test(n))throw Error( ` Invalid group name "${n}" ` );return{token:By(n)}}if(a=== ` K ` )return{token:qy( ` keep ` ,n)};if(a=== ` N ` ||a=== ` R ` )return{token:Ky( ` newline ` ,n,{negate:a=== ` N ` })};if(a=== ` O ` )return{token:Ky( ` any ` ,n)};if(a=== ` X ` )return{token:Ky( ` text _segment ` ,n)};let e=Ly(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i=== ` ( ` ){if(a=== ` * ` )return{token:ib(n)};if(n=== ` ( ? { ` )throw Error( ` Unsupported callout "${n}" ` );if(n.startsWith( ` ( ? # ` )){if(t[r]!== ` ) ` )throw Error( ` Unclosed comment group "(?#" ` );return{lastIndex:r+1}}if(/^ \( \? [-imx]+[:)] $ /.test(n))return{token:rb(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n=== ` ( ` &&!e.captureGroup||n=== ` ( ? : ` )return{token:Xy( ` group ` ,n)};if(n=== ` ( ? > ` )return{token:Xy( ` atomic ` ,n)};if(n=== ` ( ? = ` ||n=== ` ( ? ! ` ||n=== ` ( ? <= ` ||n=== ` ( ? < ! ` )return{token:Xy(n[2]=== ` < ` ? ` lookbehind ` : ` lookahead ` ,n,{negate:n.endsWith( ` ! ` )})};if(n=== ` ( ` &&e.captureGroup||n.startsWith( ` ( ? < ` )&&n.endsWith( ` > ` )||n.startsWith( ` ( ? '`)&&n.endsWith(`' ` ))return{token:Xy( ` capturing ` ,n,{...n!== ` ( ` &&{name:n.slice(3,-1)}})};if(n.startsWith( ` ( ? ~ ` )){if(n=== ` ( ? ~ | ` )throw Error( ` Unsupported absence function kind "${n}" ` );return{token:Xy( ` absence _repeater ` ,n)}}throw Error(n=== ` ( ? ( ` ? ` Unsupported conditional "${n}" ` : ` Invalid or unsupported group option "${n}" ` )}if(n=== ` ) ` ){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error( ` Unmatched ")" ` );return{token:Yy(n)}}if(e.getCurrentModX()){if(n=== ` # ` ){let e=t.indexOf( `
` ,r);return{lastIndex:e===-1?t.length:e}}if(/^ \s $ /.test(n)){let e=/ \s +/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n=== ` . ` ?{token:Ky( ` dot ` ,n)}:n=== ` ^ ` ||n=== ` $ ` ?{token:zy(e.singleline?{"^":Ey ` \ A ` , $ :Ey ` \ Z ` }[n]:n,n)}:n=== ` | ` ?{token:Ry(n)}:Ay.test(n)?{tokens:fb(n)}:{token:Vy(Cy(n),n)}}function Fy(e,t,n){let r=[Gy(t[1]=== ` ^ ` ,t)],i=1,a;for(My.lastIndex=n;a=My.exec(e);){let e=a[0];if(e[0]=== ` [ ` &&e[1]!== ` : ` )i++,r.push(Gy(e[1]=== ` ^ ` ,e));else if(e=== ` ] ` ){if(r.at(-1).type=== ` CharacterClassOpen ` )r.push(Vy(93,e));else if(i--,r.push(Hy(e)),!i)break}else{let t=Iy(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:My.lastIndex||e.length}}function Iy(e){if(e[0]=== ` \ \ ` )return Ly(e,{inCharClass:!0});if(e[0]=== ` [ ` ){let t=/ \[ :(?<negate> \^ ?)(?<name>[a-z]+): \] /.exec(e);if(!t||!Ty.has(t.groups.name))throw Error( ` Invalid POSIX class "${e}" ` );return Ky( ` posix ` ,e,{value:t.groups.name,negate:!!t.groups.negate})}return e=== ` - ` ?Uy(e):e=== ` && ` ?Wy(e):Vy(Cy(e),e)}function Ly(e,{inCharClass:t}){let n=e[1];if(n=== ` c ` ||n=== ` C ` )return nb(e);if( ` dDhHsSwW ` .includes(n))return ob(e);if(e.startsWith(Ey ` \ o { ` ))throw Error( ` Incomplete , invalid , or unsupported octal code point "${e}" ` );if(/^ \\ [pP] \{ /.test(e)){if(e.length===3)throw Error( ` Incomplete or invalid Unicode property "${e}" ` );return sb(e)}if(/^ \\ x[89A-Fa-f] \p {AHex}/u.test(e))try{let t=e.split(/ \\ x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder( ` utf - 8 ` ,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=> ` \ \ x$ { e . toString ( 16 ) } ` ).join( ` ` );return Vy(Cy(e),t)})}catch{throw Error( ` Multibyte code "${e}" incomplete or invalid in Oniguruma ` )}if(n=== ` u ` ||n=== ` x ` )return Vy(ub(e),e);if(tb.has(n))return Vy(tb.get(n),e);if(/ \d /.test(n))return Jy(t,e);if(e=== ` \ \ ` )throw Error(Ey ` Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta " $ { e } "`);if([...e].length===2)return Vy(e.codePointAt(1),e);throw Error(`Unexpected escape " $ { e } "`)}function Ry(e){return{type:`Alternator`,raw:e}}function zy(e,t){return{type:`Assertion`,kind:e,raw:t}}function By(e){return{type:`Backreference`,raw:e}}function Vy(e,t){return{type:`Character`,value:e,raw:t}}function Hy(e){return{type:`CharacterClassClose`,raw:e}}function Uy(e){return{type:`CharacterClassHyphen`,raw:e}}function Wy(e){return{type:`CharacterClassIntersector`,raw:e}}function Gy(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function Ky(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function qy(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:Dy(n.flags),raw:t}}function Jy(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function Yy(e){return{type:`GroupClose`,raw:e}}function Xy(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function Zy(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Qy(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function $y(e){return{type:`Subroutine`,raw:e}}var eb=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),tb=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function nb(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character " $ { e } "`);return Vy(Cy(t.toUpperCase())-64,e)}function rb(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=cb(n),o=cb(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),qy(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,Xy(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier " $ { e } "`)}function ib(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout " $ { e } "`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout " $ { e } "`);if(r===``)throw Error(`Named callout tag with empty value not allowed " $ { e } "`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=eb.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed " $ { a } "`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument " $ { a } "`);if(typeof o==`string`)throw Error(`Named callout argument must be a number " $ { o } "`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments " $ { a } "`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number " $ { o } "`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' " $ { s } "`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument " $ { a } " ` )
Line truncated
` ,r);return{lastIndex:e===-1?t.length:e}}if(/^ \s $ /.test(n)){let e=/ \s +/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n=== ` . ` ?{token:Ky( ` dot ` ,n)}:n=== ` ^ ` ||n=== ` $ ` ?{token:zy(e.singleline?{"^":Ey ` \ A ` , $ :Ey ` \ Z ` }[n]:n,n)}:n=== ` | ` ?{token:Ry(n)}:Ay.test(n)?{tokens:fb(n)}:{token:Vy(Cy(n),n)}}function Fy(e,t,n){let r=[Gy(t[1]=== ` ^ ` ,t)],i=1,a;for(My.lastIndex=n;a=My.exec(e);){let e=a[0];if(e[0]=== ` [ ` &&e[1]!== ` : ` )i++,r.push(Gy(e[1]=== ` ^ ` ,e));else if(e=== ` ] ` ){if(r.at(-1).type=== ` CharacterClassOpen ` )r.push(Vy(93,e));else if(i--,r.push(Hy(e)),!i)break}else{let t=Iy(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:My.lastIndex||e.length}}function Iy(e){if(e[0]=== ` \ \ ` )return Ly(e,{inCharClass:!0});if(e[0]=== ` [ ` ){let t=/ \[ :(?<negate> \^ ?)(?<name>[a-z]+): \] /.exec(e);if(!t||!Ty.has(t.groups.name))throw Error( ` Invalid POSIX class "${e}" ` );return Ky( ` posix ` ,e,{value:t.groups.name,negate:!!t.groups.negate})}return e=== ` - ` ?Uy(e):e=== ` && ` ?Wy(e):Vy(Cy(e),e)}function Ly(e,{inCharClass:t}){let n=e[1];if(n=== ` c ` ||n=== ` C ` )return nb(e);if( ` dDhHsSwW ` .includes(n))return ob(e);if(e.startsWith(Ey ` \ o { ` ))throw Error( ` Incomplete , invalid , or unsupported octal code point "${e}" ` );if(/^ \\ [pP] \{ /.test(e)){if(e.length===3)throw Error( ` Incomplete or invalid Unicode property "${e}" ` );return sb(e)}if(/^ \\ x[89A-Fa-f] \p {AHex}/u.test(e))try{let t=e.split(/ \\ x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder( ` utf - 8 ` ,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=> ` \ \ x$ { e . toString ( 16 ) } ` ).join( ` ` );return Vy(Cy(e),t)})}catch{throw Error( ` Multibyte code "${e}" incomplete or invalid in Oniguruma ` )}if(n=== ` u ` ||n=== ` x ` )return Vy(ub(e),e);if(tb.has(n))return Vy(tb.get(n),e);if(/ \d /.test(n))return Jy(t,e);if(e=== ` \ \ ` )throw Error(Ey ` Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta " $ { e } "`);if([...e].length===2)return Vy(e.codePointAt(1),e);throw Error(`Unexpected escape " $ { e } "`)}function Ry(e){return{type:`Alternator`,raw:e}}function zy(e,t){return{type:`Assertion`,kind:e,raw:t}}function By(e){return{type:`Backreference`,raw:e}}function Vy(e,t){return{type:`Character`,value:e,raw:t}}function Hy(e){return{type:`CharacterClassClose`,raw:e}}function Uy(e){return{type:`CharacterClassHyphen`,raw:e}}function Wy(e){return{type:`CharacterClassIntersector`,raw:e}}function Gy(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function Ky(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function qy(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:Dy(n.flags),raw:t}}function Jy(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function Yy(e){return{type:`GroupClose`,raw:e}}function Xy(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function Zy(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Qy(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function $y(e){return{type:`Subroutine`,raw:e}}var eb=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),tb=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function nb(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character " $ { e } "`);return Vy(Cy(t.toUpperCase())-64,e)}function rb(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=cb(n),o=cb(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),qy(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,Xy(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier " $ { e } "`)}function ib(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout " $ { e } "`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout " $ { e } "`);if(r===``)throw Error(`Named callout tag with empty value not allowed " $ { e } "`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=eb.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed " $ { a } "`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument " $ { a } "`);if(typeof o==`string`)throw Error(`Named callout argument must be a number " $ { o } "`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments " $ { a } "`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number " $ { o } "`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' " $ { s } "`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument " $ { a } " ` )
Line truncated
\ \ ( ? : \ d +
| c [ A - Za - z ]
| [ gk ] < [ ^ > ] + >
@@ -60,9 +60,9 @@ import{A as e,B as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,L as l,M a
| [ A - Za - z \ - ] + :
| \ ( DEFINE \ )
) ) ?
| ( ? < qBase > $ { mx } ) ( ? < qMod > [ ? + ] ? ) ( ? < invalidQ > [ ? * + \ { ] ? )
| ( ? < qBase > $ { px } ) ( ? < qMod > [ ? + ] ? ) ( ? < invalidQ > [ ? * + \ { ] ? )
| \ \ ? .
` .replace(/ \s +/g, ` ` ), ` gsu ` );function gx(e){if(!RegExp( ` $ { mx } \ \ + ` ).test(e))return{pattern:e};let t=[],n=null,r=null,i= ` ` ,a=0,o;for(hx.lastIndex=0;o=hx.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s=== ` [ ` )a||(r=c),a++;else if(s=== ` ] ` )a?a--:r=null;else if(!a){if(u=== ` + ` &&i&&!i.startsWith( ` ( ` )){if(d)throw Error( ` Invalid quantifier "${s}" ` );let t=-1;if(/^ \{ \d + \} $ /.test(l))e=ax(e,c+l.length,u, ` ` );else{if(i=== ` ) ` ||i=== ` ] ` ){let t=i=== ` ) ` ?n:r;if(t===null)throw Error( ` Invalid unmatched "${i}" ` );e= ` $ { e . slice ( 0 , t ) } ( ? > $ { e . slice ( t , c ) } $ { l } ) $ { e . slice ( c + s . length ) } ` }else e= ` $ { e . slice ( 0 , c - i . length ) } ( ? > $ { i } $ { l } ) $ { e . slice ( c + s . length ) } ` ;t+=4}hx.lastIndex+=t}else s[0]=== ` ( ` ?t.push(c):s=== ` ) ` &&(n=t.length?t.pop():null)}i=s}return{pattern:e}}var _x=String.raw,vx=_x ` \ ( \ ? R = ( ? < rDepth > [ ^ \ ) ] + ) \ ) | $ { _x ` \\ g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)> ` } ` ,yx=_x ` \ ( \ ? < ( ? ! [ = ! ] ) ( ? < captureName > [ ^ > ] + ) > ` ,bx=_x ` $ { yx } | ( ? < unnamed > \ ( ) ( ? ! \ ? ) ` ,xx=new RegExp(_x ` $ { yx } | $ { vx } | \ ( \ ? | \ \ ? . ` , ` gsu ` ),Sx= ` Cannot use multiple overlapping recursions ` ;function Cx(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode: ` plugin ` ,...t},i=t?.captureTransfers??new Map;if(!new RegExp(vx, ` su ` ).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r=== ` plugin ` &&ux(e,_x ` \ ( \ ? \ ( DEFINE \ ) ` ,ox.DEFAULT))throw Error( ` DEFINE groups cannot be used with recursion ` );let a=[],o=ux(e,_x ` \ \ [ 1 - 9 ] ` ,ox.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(xx.lastIndex=0;f=xx.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t=== ` [ ` )u++;else if(u)t=== ` ] ` &&u--;else{if(m){if(wx(m),l)throw Error(Sx);if(o)throw Error( ` $ { r === ` external ` ? ` Backrefs ` : ` Numbered backrefs ` } cannot be used with global recursion ` );let t=e.slice(0,f.index),s=e.slice(xx.lastIndex);if(ux(s,vx,ox.DEFAULT))throw Error(Sx);let c=m-1;e=Tx(t,s,c,!1,n,a,d),i=Ox(i,t,c,a.length,0,d);break}if(h){wx(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(Sx);break}if(!u)throw Error(_x ` Recursive \ g cannot be used outside the referenced group "${r===`external`?h:_x`\g<${h}&R=${g}>`}" ` );let p=s.get(h),m=dx(e,p);if(o&&ux(m,_x ` $ { yx } | \ ( ( ? ! \ ? ) ` ,ox.DEFAULT))throw Error( ` $ { r === ` external ` ? ` Backrefs ` : ` Numbered backrefs ` } cannot be used with recursion of capturing groups ` );let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=Tx(_,v,b,!0,n,a,d);i=Ox(i,_,b,a.length-y,y,d),e= ` $ { e . slice ( 0 , p ) } $ { x } $ { e . slice ( p + m . length ) } ` ,xx.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),xx.lastIndex),s.set(p,xx.lastIndex),c.push({num:d,name:p});else if(t[0]=== ` ( ` ){let e=t=== ` ( ` ;e&&(d++,s.set(String(d),xx.lastIndex)),c.push(e?{num:d}:{})}else t=== ` ) ` &&c.pop()}}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function wx(e){let t= ` Max depth must be integer between 2 and 100 ; used $ { e } ` ;if(!/^[1-9] \d * $ /.test(e)||(e=+e,e<2||e>100))throw Error(t)}function Tx(e,t,n,r,i,a,o){let s=new Set;r&&cx(e+t,yx,({groups:{captureName:e}})=>{s.add(e)},ox.DEFAULT);let c=[n,r?s:null,i,a,o];return ` $ { e } $ { Ex ( ` (?: ${ e } ` , ` forward ` , ... c ) } ( ? : ) $ { Ex ( ` ${ t } ) ` , ` backward ` , ... c ) } $ { t } ` }function Ex(e,t,n,r,i,a,o){let s=e=>t=== ` forward ` ?e+2:n-e+2-1,c= ` ` ;for(let t=0;t<n;t++){let n=s(t);c+=sx(e,_x ` $ { bx } | \ \ k < ( ? < backref > [ ^ > ] + ) > ` ,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l= ` _$$ { n } ` ;if(s||t){let n=o+a.length+1;return a.push(n),Dx(i,n),s?e: ` ( ? < $ { t } $ { l } > ` }return _x ` \ k < $ { c } $ { l } > ` },ox.DEFAULT)}return c}function Dx(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Ox(e,t,n,r,i,a){if(e.size&&r){let o=0;cx(t,bx,()=>o++,ox.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var kx=String.fromCodePoint,Ax=String.raw,jx={},Mx=globalThis.RegExp;jx.flagGroups=(()=>{try{new Mx( ` ( ? i : ) ` )}catch{return!1}return!0})(),jx.unicodeSets=(()=>{try{new Mx( ` [ [ ] ] ` , ` v ` )}catch{return!1}return!0})(),jx.bugFlagVLiteralHyphenIsRange=jx.unicodeSets?(()=>{try{new Mx(Ax ` [ \ d \ - a ] ` , ` v ` )}catch{return!0}return!1})():!1,jx.bugNestedClassIgnoresNegation=jx.unicodeSets&&new Mx( ` [ [ ^ a ] ] ` , ` v ` ).test( ` a ` );function Nx(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Px(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Fx(e,t){return Lx[e]>=Lx[t]}function Ix(e,t){if(e==null)throw Error(t?? ` Value expected ` );return e}var Lx={ES2025:2025,ES2024:2024,ES2018:2018},Rx={auto: ` auto ` ,ES2025: ` ES2025 ` ,ES2024: ` ES2024 ` ,ES2018: ` ES2018 ` };function zx(e={}){if({}.toString.call(e)!== ` [ object Object ] ` )throw Error( ` Unexpected options ` );if(e.target!==void 0&&!Rx[e.target])throw Error( ` Unexpected target "${e.target}" ` );let t={accuracy: ` default ` ,avoidSubclass:!1,flags: ` ` ,global:!1,hasIndices:!1,lazyCompileLength:1/0,target: ` a Line truncated
` .replace(/ \s +/g, ` ` ), ` gsu ` );function hx(e){if(!RegExp( ` $ { px } \ \ + ` ).test(e))return{pattern:e};let t=[],n=null,r=null,i= ` ` ,a=0,o;for(mx.lastIndex=0;o=mx.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s=== ` [ ` )a||(r=c),a++;else if(s=== ` ] ` )a?a--:r=null;else if(!a){if(u=== ` + ` &&i&&!i.startsWith( ` ( ` )){if(d)throw Error( ` Invalid quantifier "${s}" ` );let t=-1;if(/^ \{ \d + \} $ /.test(l))e=ix(e,c+l.length,u, ` ` );else{if(i=== ` ) ` ||i=== ` ] ` ){let t=i=== ` ) ` ?n:r;if(t===null)throw Error( ` Invalid unmatched "${i}" ` );e= ` $ { e . slice ( 0 , t ) } ( ? > $ { e . slice ( t , c ) } $ { l } ) $ { e . slice ( c + s . length ) } ` }else e= ` $ { e . slice ( 0 , c - i . length ) } ( ? > $ { i } $ { l } ) $ { e . slice ( c + s . length ) } ` ;t+=4}mx.lastIndex+=t}else s[0]=== ` ( ` ?t.push(c):s=== ` ) ` &&(n=t.length?t.pop():null)}i=s}return{pattern:e}}var gx=String.raw,_x=gx ` \ ( \ ? R = ( ? < rDepth > [ ^ \ ) ] + ) \ ) | $ { gx ` \\ g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)> ` } ` ,vx=gx ` \ ( \ ? < ( ? ! [ = ! ] ) ( ? < captureName > [ ^ > ] + ) > ` ,yx=gx ` $ { vx } | ( ? < unnamed > \ ( ) ( ? ! \ ? ) ` ,bx=new RegExp(gx ` $ { vx } | $ { _x } | \ ( \ ? | \ \ ? . ` , ` gsu ` ),xx= ` Cannot use multiple overlapping recursions ` ;function Sx(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode: ` plugin ` ,...t},i=t?.captureTransfers??new Map;if(!new RegExp(_x, ` su ` ).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r=== ` plugin ` &&lx(e,gx ` \ ( \ ? \ ( DEFINE \ ) ` ,ax.DEFAULT))throw Error( ` DEFINE groups cannot be used with recursion ` );let a=[],o=lx(e,gx ` \ \ [ 1 - 9 ] ` ,ax.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(bx.lastIndex=0;f=bx.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t=== ` [ ` )u++;else if(u)t=== ` ] ` &&u--;else{if(m){if(Cx(m),l)throw Error(xx);if(o)throw Error( ` $ { r === ` external ` ? ` Backrefs ` : ` Numbered backrefs ` } cannot be used with global recursion ` );let t=e.slice(0,f.index),s=e.slice(bx.lastIndex);if(lx(s,_x,ax.DEFAULT))throw Error(xx);let c=m-1;e=wx(t,s,c,!1,n,a,d),i=Dx(i,t,c,a.length,0,d);break}if(h){Cx(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(xx);break}if(!u)throw Error(gx ` Recursive \ g cannot be used outside the referenced group "${r===`external`?h:gx`\g<${h}&R=${g}>`}" ` );let p=s.get(h),m=ux(e,p);if(o&&lx(m,gx ` $ { vx } | \ ( ( ? ! \ ? ) ` ,ax.DEFAULT))throw Error( ` $ { r === ` external ` ? ` Backrefs ` : ` Numbered backrefs ` } cannot be used with recursion of capturing groups ` );let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=wx(_,v,b,!0,n,a,d);i=Dx(i,_,b,a.length-y,y,d),e= ` $ { e . slice ( 0 , p ) } $ { x } $ { e . slice ( p + m . length ) } ` ,bx.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),bx.lastIndex),s.set(p,bx.lastIndex),c.push({num:d,name:p});else if(t[0]=== ` ( ` ){let e=t=== ` ( ` ;e&&(d++,s.set(String(d),bx.lastIndex)),c.push(e?{num:d}:{})}else t=== ` ) ` &&c.pop()}}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function Cx(e){let t= ` Max depth must be integer between 2 and 100 ; used $ { e } ` ;if(!/^[1-9] \d * $ /.test(e)||(e=+e,e<2||e>100))throw Error(t)}function wx(e,t,n,r,i,a,o){let s=new Set;r&&sx(e+t,vx,({groups:{captureName:e}})=>{s.add(e)},ax.DEFAULT);let c=[n,r?s:null,i,a,o];return ` $ { e } $ { Tx ( ` (?: ${ e } ` , ` forward ` , ... c ) } ( ? : ) $ { Tx ( ` ${ t } ) ` , ` backward ` , ... c ) } $ { t } ` }function Tx(e,t,n,r,i,a,o){let s=e=>t=== ` forward ` ?e+2:n-e+2-1,c= ` ` ;for(let t=0;t<n;t++){let n=s(t);c+=ox(e,gx ` $ { yx } | \ \ k < ( ? < backref > [ ^ > ] + ) > ` ,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l= ` _$$ { n } ` ;if(s||t){let n=o+a.length+1;return a.push(n),Ex(i,n),s?e: ` ( ? < $ { t } $ { l } > ` }return gx ` \ k < $ { c } $ { l } > ` },ax.DEFAULT)}return c}function Ex(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Dx(e,t,n,r,i,a){if(e.size&&r){let o=0;sx(t,yx,()=>o++,ax.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var Ox=String.fromCodePoint,kx=String.raw,Ax={},jx=globalThis.RegExp;Ax.flagGroups=(()=>{try{new jx( ` ( ? i : ) ` )}catch{return!1}return!0})(),Ax.unicodeSets=(()=>{try{new jx( ` [ [ ] ] ` , ` v ` )}catch{return!1}return!0})(),Ax.bugFlagVLiteralHyphenIsRange=Ax.unicodeSets?(()=>{try{new jx(kx ` [ \ d \ - a ] ` , ` v ` )}catch{return!0}return!1})():!1,Ax.bugNestedClassIgnoresNegation=Ax.unicodeSets&&new jx( ` [ [ ^ a ] ] ` , ` v ` ).test( ` a ` );function Mx(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Nx(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Px(e,t){return Ix[e]>=Ix[t]}function Fx(e,t){if(e==null)throw Error(t?? ` Value expected ` );return e}var Ix={ES2025:2025,ES2024:2024,ES2018:2018},Lx={auto: ` auto ` ,ES2025: ` ES2025 ` ,ES2024: ` ES2024 ` ,ES2018: ` ES2018 ` };function Rx(e={}){if({}.toString.call(e)!== ` [ object Object ] ` )throw Error( ` Unexpected options ` );if(e.target!==void 0&&!Lx[e.target])throw Error( ` Unexpected target "${e.target}" ` );let t={accuracy: ` default ` ,avoidSubclass:!1,flags: ` ` ,global:!1,hasIndices:!1,lazyCompileLength:1/0,target: ` a Line truncated
Cc Control cntrl
Cf Format
Cn Unassigned
@@ -152,87 +152,87 @@ Uppercase Upper
Variation _Selector VS
White _Space space
XID _Continue XIDC
XID _Start XIDS ` .split(/ \s /).map(e=>[Z b(e),e])),G x=new Map([[ ` s ` ,k x(383)],[k x(383), ` s ` ]]),K x=new Map([[k x(223),k x(7838)],[k x(107),k x(8490)],[k x(229),k x(8491)],[k x(969),k x(8486)]]),q x=new Map([X x(453),X x(456),X x(459),X x(498),...Z x(8072,8079),...Z x(8088,8095),...Z x(8104,8111),X x(8124),X x(8140),X x(8188)]),J x=new Map([[ ` alnum ` ,A x ` [ \ p { Alpha } \ p { Nd } ] ` ],[ ` alpha ` ,A x ` \ p { Alpha } ` ],[ ` ascii ` ,A x ` \ p { ASCII } ` ],[ ` blank ` ,A x ` [ \ p { Zs } \ t ] ` ],[ ` cntrl ` ,A x ` \ p { Cc } ` ],[ ` digit ` ,A x ` \ p { Nd } ` ],[ ` graph ` ,A x ` [ \ P { space } && \ P { Cc } && \ P { Cn } && \ P { Cs } ] ` ],[ ` lower ` ,A x ` \ p { Lower } ` ],[ ` print ` ,A x ` [ [ \ P { space } && \ P { Cc } && \ P { Cn } && \ P { Cs } ] \ p { Zs } ] ` ],[ ` punct ` ,A x ` [ \ p { P } \ p { S } ] ` ],[ ` space ` ,A x ` \ p { space } ` ],[ ` upper ` ,A x ` \ p { Upper } ` ],[ ` word ` ,A x ` [ \ p { Alpha } \ p { M } \ p { Nd } \ p { Pc } ] ` ],[ ` xdigit ` ,A x ` \ p { AHex } ` ]]);function Y x(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function X x(e){let t=k x(e);return[t.toLowerCase(),t]}function Z x(e,t){return Y x(e,t).map(e=>X x(e))}var Q x=new Set([ ` Lower ` , ` Lowercase ` , ` Upper ` , ` Uppercase ` , ` Ll ` , ` Lowercase _Letter ` , ` Lt ` , ` Titlecase _Letter ` , ` Lu ` , ` Uppercase _Letter ` ]);function $ x(e,t){let n={accuracy: ` default ` ,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget: ` ES2025 ` ,...t};r S(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:F x(n.bestEffortTarget, ` ES2024 ` ),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};ex(e,eS ,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return ex (e,t S,a),ex (e,n S,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var eS ={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i=== ` repeater ` ){let e=Ib();e.body[0].body.push(Lb({negate:!0,body:r}),Ub( ` Any ` ));let i=Ib();i.body[0].body.push(Bb( ` greedy ` ,0,1/0,e)),n(S S(i,t),{traverse:!0})}else throw Error( ` Unsupported absence function "(?~|" ` )},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind=== ` flags ` );for(let e=n+1;e<t.body.length;e++){let n=t.body[e];P x(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=u S(t.get(e));if(n){let t=Ib({flags:n});t.body[0].body=e.body,e.body=[S S(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c=== ` text _segment _boundary ` )throw Error( ` Unsupported text segment boundary "\\${l?`Y`:`y`}" ` );if(c=== ` line _end ` )o(S S(Lb({body:[Eb({body:[Db( ` string _end ` )]}),Eb({body:[Ab(10)]})]}),t));else if(c=== ` line _start ` )o(S S(y S(A x ` ( ? <= \ A | \ n ( ? ! \ z ) ) ` ,{skipLookbehindValidation:!0}),t));else if(c=== ` search _start ` ){if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&g S(e))o(S S(Lb({negate:!0}),t));else if(d)throw Error(A x ` Uses "\G" in a way that requires a subclass ` );else o(x S(Db( ` string _start ` ),t)),s.strategy= ` clip _search ` }}else if(c!== ` string _end ` &&c!== ` string _start ` ){if(c=== ` string _end _newline ` )o(S S(y S(A x ` ( ? = \ n ? \ z ) ` ),t));else if(c=== ` word _boundary ` ){if(!p&&!u){let e= ` ( ? : ( ? <= $ { Hx } ) ( ? ! $ { Hx } ) | ( ? < ! $ { Hx } ) ( ? = $ { Hx } ) ) ` ,n= ` ( ? : ( ? <= $ { Hx } ) ( ? = $ { Hx } ) | ( ? < ! $ { Hx } ) ( ? ! $ { Hx } ) ) ` ;o(S S(y S(l?n:e),t))}}else throw Error( ` Unexpected assertion kind "${c}" ` )}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n== ` string ` &&!v S(n)&&(n=l S(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!v S(r)&&(r=l S(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind=== ` intersection ` &&n(S S(jb({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c=== ` digit ` ||u=== ` digit ` ))n(x S(Nb( ` digit ` ,{negate:l}),t));else if(o&&(c=== ` space ` ||u=== ` space ` ))n(S S(b S(y S(B x),l),t));else if(s&&(c=== ` word ` ||u=== ` word ` ))n(x S(Nb( ` word ` ,{negate:l}),t));else if(c=== ` any ` )n(x S(Ub( ` Any ` ),t));else if(c=== ` digit ` )n(x S(Ub( ` Nd ` ,{negate:l}),t));else if(c!== ` dot ` ){if(c=== ` text _segment ` ){if(r=== ` strict ` )throw Error(A x ` Use of "\X" requires non - strict accuracy ` );let e= ` \ \ p { Emoji } ( ? : \ \ p { EMod } | \ \uFE0F \ \u20E3 ? | [ \ \ x { E0020 } - \ \ x { E007E } ] + \ \ x { E007F } ) ? ` ,a=A x ` \ p { RI } { 2 } | $ { e } ( ? : \u200D$ { e } ) * ` ;n(S S(y S(A x ` ( ? > \ r \ n | $ { i ? Ax ` \p {RGI_Emoji} ` : a } | \ P { M } \ p { M } * ) ` ,{skipPropertyNameValidation:!0}),t))}else if(c=== ` hex ` )n(x S(Ub( ` AHex ` ,{negate:l}),t));else if(c=== ` newline ` )n(S S(y S(l? ` [ ^
XID _Start XIDS ` .split(/ \s /).map(e=>[X b(e),e])),W x=new Map([[ ` s ` ,O x(383)],[O x(383), ` s ` ]]),G x=new Map([[O x(223),O x(7838)],[O x(107),O x(8490)],[O x(229),O x(8491)],[O x(969),O x(8486)]]),K x=new Map([Y x(453),Y x(456),Y x(459),Y x(498),...X x(8072,8079),...X x(8088,8095),...X x(8104,8111),Y x(8124),Y x(8140),Y x(8188)]),q x=new Map([[ ` alnum ` ,k x ` [ \ p { Alpha } \ p { Nd } ] ` ],[ ` alpha ` ,k x ` \ p { Alpha } ` ],[ ` ascii ` ,k x ` \ p { ASCII } ` ],[ ` blank ` ,k x ` [ \ p { Zs } \ t ] ` ],[ ` cntrl ` ,k x ` \ p { Cc } ` ],[ ` digit ` ,k x ` \ p { Nd } ` ],[ ` graph ` ,k x ` [ \ P { space } && \ P { Cc } && \ P { Cn } && \ P { Cs } ] ` ],[ ` lower ` ,k x ` \ p { Lower } ` ],[ ` print ` ,k x ` [ [ \ P { space } && \ P { Cc } && \ P { Cn } && \ P { Cs } ] \ p { Zs } ] ` ],[ ` punct ` ,k x ` [ \ p { P } \ p { S } ] ` ],[ ` space ` ,k x ` \ p { space } ` ],[ ` upper ` ,k x ` \ p { Upper } ` ],[ ` word ` ,k x ` [ \ p { Alpha } \ p { M } \ p { Nd } \ p { Pc } ] ` ],[ ` xdigit ` ,k x ` \ p { AHex } ` ]]);function J x(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Y x(e){let t=O x(e);return[t.toLowerCase(),t]}function X x(e,t){return J x(e,t).map(e=>Y x(e))}var Z x=new Set([ ` Lower ` , ` Lowercase ` , ` Upper ` , ` Uppercase ` , ` Ll ` , ` Lowercase _Letter ` , ` Lt ` , ` Titlecase _Letter ` , ` Lu ` , ` Uppercase _Letter ` ]);function Q x(e,t){let n={accuracy: ` default ` ,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget: ` ES2025 ` ,...t};n S(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:P x(n.bestEffortTarget, ` ES2024 ` ),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii}; $ b(e, $ x ,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return $ b (e,e S,a),$ b (e,t S,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var $ x ={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===` repeater ` ){let e=Ib();e.body[0].body.push(Lb({negate:!0,body:r}),Ub( ` Any ` ));let i=Ib();i.body[0].body.push(Bb( ` greedy ` ,0,1/0,e)),n(x S(i,t),{traverse:!0})}else throw Error( ` Unsupported absence function "(?~|" ` )},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind=== ` flags ` );for(let e=n+1;e<t.body.length;e++){let n=t.body[e];N x(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=l S(t.get(e));if(n){let t=Ib({flags:n});t.body[0].body=e.body,e.body=[x S(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c=== ` text _segment _boundary ` )throw Error( ` Unsupported text segment boundary "\\${l?`Y`:`y`}" ` );if(c=== ` line _end ` )o(x S(Lb({body:[Eb({body:[Db( ` string _end ` )]}),Eb({body:[Ab(10)]})]}),t));else if(c=== ` line _start ` )o(x S(v S(k x ` ( ? <= \ A | \ n ( ? ! \ z ) ) ` ,{skipLookbehindValidation:!0}),t));else if(c=== ` search _start ` ){if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&h S(e))o(x S(Lb({negate:!0}),t));else if(d)throw Error(k x ` Uses "\G" in a way that requires a subclass ` );else o(b S(Db( ` string _start ` ),t)),s.strategy= ` clip _search ` }}else if(c!== ` string _end ` &&c!== ` string _start ` ){if(c=== ` string _end _newline ` )o(x S(v S(k x ` ( ? = \ n ? \ z ) ` ),t));else if(c=== ` word _boundary ` ){if(!p&&!u){let e= ` ( ? : ( ? <= $ { Vx } ) ( ? ! $ { Vx } ) | ( ? < ! $ { Vx } ) ( ? = $ { Vx } ) ) ` ,n= ` ( ? : ( ? <= $ { Vx } ) ( ? = $ { Vx } ) | ( ? < ! $ { Vx } ) ( ? ! $ { Vx } ) ) ` ;o(x S(v S(l?n:e),t))}}else throw Error( ` Unexpected assertion kind "${c}" ` )}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n== ` string ` &&!_ S(n)&&(n=c S(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!_ S(r)&&(r=c S(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind=== ` intersection ` &&n(x S(jb({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c=== ` digit ` ||u=== ` digit ` ))n(b S(Nb( ` digit ` ,{negate:l}),t));else if(o&&(c=== ` space ` ||u=== ` space ` ))n(x S(y S(v S(z x),l),t));else if(s&&(c=== ` word ` ||u=== ` word ` ))n(b S(Nb( ` word ` ,{negate:l}),t));else if(c=== ` any ` )n(b S(Ub( ` Any ` ),t));else if(c=== ` digit ` )n(b S(Ub( ` Nd ` ,{negate:l}),t));else if(c!== ` dot ` ){if(c=== ` text _segment ` ){if(r=== ` strict ` )throw Error(k x ` Use of "\X" requires non - strict accuracy ` );let e= ` \ \ p { Emoji } ( ? : \ \ p { EMod } | \ \uFE0F \ \u20E3 ? | [ \ \ x { E0020 } - \ \ x { E007E } ] + \ \ x { E007F } ) ? ` ,a=k x ` \ p { RI } { 2 } | $ { e } ( ? : \u200D$ { e } ) * ` ;n(x S(v S(k x ` ( ? > \ r \ n | $ { i ? kx ` \p {RGI_Emoji} ` : a } | \ P { M } \ p { M } * ) ` ,{skipPropertyNameValidation:!0}),t))}else if(c=== ` hex ` )n(b S(Ub( ` AHex ` ,{negate:l}),t));else if(c=== ` newline ` )n(x S(v S(l? ` [ ^
] ` : ` ( ? > \ r
? | [
\ v \ f
\u2028\u2029 ] ) ` ),t));else if(c=== ` posix ` ){if(!i&&(u=== ` graph ` ||u=== ` print ` )){if(r=== ` strict ` )throw Error( ` POSIX class "${u}" requires min target ES2024 or non - strict accuracy ` );let e={graph: ` ! - ~ ` ,print: ` - ~ ` }[u];l&&(e= ` \ 0 - $ { kx ( e . codePointAt ( 0 ) - 1 ) } $ { kx ( e . codePointAt ( 2 ) + 1 ) } - \ u { 10 FFFF } ` ),n(SS(yS( ` [ $ { e } ] ` ),t))}else n(SS(bS(yS(Jx.get(u)),l),t))}else if(c=== ` property ` )Wx.has(Zb(u))||(e.key= ` sc ` );else if(c=== ` space ` )n(xS(Ub( ` space ` ,{negate:l}),t));else if(c=== ` word ` )n(SS(bS(yS(Hx),l),t));else throw Error( ` Unexpected character set kind "${c}" ` )}},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s=== ` flags ` ){if(!c.enable&&!c.disable)r();else{let e=Ib({flags:c});e.body[0].body=o(),i(SS(e,t),{traverse:!0})}}else if(s=== ` keep ` ){let e=n.body[0],r=n.body.length===1&&pb(e,{type: ` Group ` })&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(Ax ` Uses "\K" in a way that ' s unsupported ` );let o=Lb({behind:!0});o.body[0].body=a(),i(SS(o,t))}else throw Error( ` Unexpected directive kind "${s}" ` )},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error( ` Unsupported flag "P" ` );if(e.textSegmentMode=== ` word ` )throw Error( ` Unsupported flag "y{w}" ` );[ ` digitIsAscii ` , ` extended ` , ` posixIsAscii ` , ` spaceIsAscii ` , ` wordIsAscii ` , ` textSegmentMode ` ].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n=== ` lookbehind ` &&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r=== ` fail ` )n(SS(Lb({negate:!0}),t));else throw Error( ` Unsupported named callout "(*${r.toUpperCase()}" ` )},Quantifier({node:e}){if(e.body.type=== ` Quantifier ` ){let t=Ib();t.body[0].body.push(e.body),e.body=SS(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind=== ` search _start ` )t.body.pop();else{let e=pS(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t=== ` strict ` &&n&&r)throw Error(Ax ` Uses "\G" in a way that requires non - strict accuracy ` )}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n== ` string ` &&!vS(n)&&(n=lS(n,t),e.ref=n)}},tS={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=xS(sS(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&Px(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=Px(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Nx(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&(n.type!== ` CapturingGroup ` ||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?sS(0):oS(o,r.groupOriginByCopy,null),l=c;if(!s){let e=uS(cS(o,e=>e.type=== ` Group ` &&!!e.flags)),t=e?Nx(r.globalFlags,e):r.globalFlags;iS(t,r.currentFlags)||(l=Ib({flags:dS(t)}),l.body[0].body.push(c))}n(SS(l,t),{traverse:!s})}},nS={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>aS(t,e));i.length?i.length>1?n(SS(Ib({atomic:!0,body:i.reverse().map(e=>Eb({body:[Ob(e.number)]}))}),t)):e.ref=i[0].number:n(SS(Lb({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=kb();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&e.ref!==0&&(e.ref=t.reffedNodesByR
Line truncated
` ).flatMap(e=>i(e)):i(e);return{lines:a.map(e=>e.map(e=>({content:e.content,htmlStyle:e.htmlStyle}))),state:n.getLastGrammarState(a)}}}}function o C(e,t){let n=l t(null);M (()=>Y e(t),(e,t,r)=>{if(typeof window> ` u ` )return;let i=!1;r(()=>i=!0),n.value=null,a C(e).then(e=>{i||(n.value=e)}).catch(()=>{})},{immediate:!0});let r={highlighter:null,text: ` ` ,lines:[]};return J (()=>{let t=Y e(e),i=t.endsWith( `
\ v \ f
\u2028\u2029 ] ) ` ),t));else if(c=== ` posix ` ){if(!i&&(u=== ` graph ` ||u=== ` print ` )){if(r=== ` strict ` )throw Error( ` POSIX class "${u}" requires min target ES2024 or non - strict accuracy ` );let e={graph: ` ! - ~ ` ,print: ` - ~ ` }[u];l&&(e= ` \ 0 - $ { Ox ( e . codePointAt ( 0 ) - 1 ) } $ { Ox ( e . codePointAt ( 2 ) + 1 ) } - \ u { 10 FFFF } ` ),n(xS(vS( ` [ $ { e } ] ` ),t))}else n(xS(yS(vS(qx.get(u)),l),t))}else if(c=== ` property ` )Ux.has(Xb(u))||(e.key= ` sc ` );else if(c=== ` space ` )n(bS(Ub( ` space ` ,{negate:l}),t));else if(c=== ` word ` )n(xS(yS(vS(Vx),l),t));else throw Error( ` Unexpected character set kind "${c}" ` )}},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s=== ` flags ` ){if(!c.enable&&!c.disable)r();else{let e=Ib({flags:c});e.body[0].body=o(),i(xS(e,t),{traverse:!0})}}else if(s=== ` keep ` ){let e=n.body[0],r=n.body.length===1&&pb(e,{type: ` Group ` })&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(kx ` Uses "\K" in a way that ' s unsupported ` );let o=Lb({behind:!0});o.body[0].body=a(),i(xS(o,t))}else throw Error( ` Unexpected directive kind "${s}" ` )},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error( ` Unsupported flag "P" ` );if(e.textSegmentMode=== ` word ` )throw Error( ` Unsupported flag "y{w}" ` );[ ` digitIsAscii ` , ` extended ` , ` posixIsAscii ` , ` spaceIsAscii ` , ` wordIsAscii ` , ` textSegmentMode ` ].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n=== ` lookbehind ` &&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r=== ` fail ` )n(xS(Lb({negate:!0}),t));else throw Error( ` Unsupported named callout "(*${r.toUpperCase()}" ` )},Quantifier({node:e}){if(e.body.type=== ` Quantifier ` ){let t=Ib();t.body[0].body.push(e.body),e.body=xS(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind=== ` search _start ` )t.body.pop();else{let e=fS(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t=== ` strict ` &&n&&r)throw Error(kx ` Uses "\G" in a way that requires non - strict accuracy ` )}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n== ` string ` &&!_S(n)&&(n=cS(n,t),e.ref=n)}},eS={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=bS(oS(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&Nx(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=Nx(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Mx(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&(n.type!== ` CapturingGroup ` ||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?oS(0):aS(o,r.groupOriginByCopy,null),l=c;if(!s){let e=lS(sS(o,e=>e.type=== ` Group ` &&!!e.flags)),t=e?Mx(r.globalFlags,e):r.globalFlags;rS(t,r.currentFlags)||(l=Ib({flags:uS(t)}),l.body[0].body.push(c))}n(xS(l,t),{traverse:!s})}},tS={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>iS(t,e));i.length?i.length>1?n(xS(Ib({atomic:!0,body:i.reverse().map(e=>Eb({body:[Ob(e.number)]}))}),t)):e.ref=i[0].number:n(xS(Lb({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=kb();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&e.ref!==0&&(e.ref=t.reffedNodesByR
Line truncated
` ).flatMap(e=>i(e)):i(e);return{lines:a.map(e=>e.map(e=>({content:e.content,htmlStyle:e.htmlStyle}))),state:n.getLastGrammarState(a)}}}}function a C(e,t){let n=c t(null);N (()=>J e(t),(e,t,r)=>{if(typeof window> ` u ` )return;let i=!1;r(()=>i=!0),n.value=null,i C(e).then(e=>{i||(n.value=e)}).catch(()=>{})},{immediate:!0});let r={highlighter:null,text: ` ` ,lines:[]};return Y (()=>{let t=J e(e),i=t.endsWith( `
` )?t.slice(0,-1):t,a=n.value;if(!a)return i.split( `
` ).map(e=>e?[{content:e}]:[]);(r.highlighter!==a||!i.startsWith(r.text))&&(r={highlighter:a,text: ` ` ,lines:[]});let o=i.lastIndexOf( `
` )+1;if(o>r.text.length){let e=a.highlight(i.slice(r.text.length,o-1),r.state);r={highlighter:a,text:i.slice(0,o),lines:[...r.lines,...e.lines],state:e.state}}let s=a.highlight(i.slice(o),r.state).lines[0]??[];return[...r.lines,s]})}var sC=rt( ` rounded - lg text - sm data - [ size = sm ] : text - xs has - [ > [ data - slot = code - block - content ] : focus - visible ] : ring - 3 has - [ > [ data - slot = code - block - content ] : focus - visible ] : ring - ring / 50 group / code - block relative flex w - full min - w - 0 flex - col overflow - hidden ` ,{variants:{variant:{default: ` border border - input text - foreground dark : bg - input / 30 has - [ > [ data - slot = code - block - content ] : focus - visible ] : border - ring ` ,destructive: ` border border - destructive / 30 text - destructive dark : border - destructive / 40 ` }},defaultVariants:{variant: ` default ` }}),cC=rt( ` - mx - 3 px - 3 in - data - numbered : gap - x - 3 before : min - w - 6 before : text - end before : text - muted - foreground after : start - 1 after : text - muted - foreground group - data - [ size = sm ] / code - block : - mx - 2.5 group - data - [ size = sm ] / code - block : px - 2.5 relative block min - h - lh after : absolute after : top - 0 after : select - none in - data - numbered : col - span - 2 in - data - numbered : grid in - data - numbered : grid - cols - subgrid in - data - numbered : [ counter - increment : line ] in - data - numbered : before : content - [ counter ( line ) ] in - data - numbered : before : select - none in - data - numbered : supports - [ content : counter ( line ) _ / _ '' ] : before : content - [ counter ( line ) _ / _ '' ] ` ,{variants:{variant:{default: ` ` ,added: ` bg - muted after : content - [ '+' ] ` ,removed: ` bg - destructive / 10 after : text - destructive after : content - [ '− ' ] ` ,highlighted: ` bg - muted ` }},defaultVariants:{variant: ` default ` }}),lC=N({__name: ` Message ` ,props:{class:{type:[Boolean,null,String,Object,Array]},align:{default: ` start ` },asChild:{type:Boolean},as:{default: ` div ` }},setup(e){let t=e;return(n,r)=>(I(),K(B(mt),{"data-slot": ` message ` ,"data-align":e.align,as:e.as,"as-child":e.asChild,class:R(B(U)( ` text - sm gap - 2 group / message relative flex w - full min - w - 0 data - [ align = end ] : flex - row - reverse ` ,t.class))},{default:F(()=>[G(n. $ slots, ` default ` )]),_:3},8,[ ` data - align ` , ` as ` , ` as - child ` , ` class ` ]))}}),uC=N({__name: ` MessageContent ` ,props:{class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default: ` div ` }},setup(e){let t=e;return(n,r)=>(I(),K(B(mt),{"data-slot": ` message - content ` ,as:e.as,"as-child":e.asChild,class:R(B(U)( ` gap - 2.5 group - data - [ align = end ] / message : * : data - slot : self - end flex w - full min - w - 0 flex - col wrap - break - word ` ,t.class))},{default:F(()=>[G(n. $ slots, ` default ` )]),_:3},8,[ ` as ` , ` as - child ` , ` class ` ]))}}),dC=N({__name: ` MessageFooter ` ,props:{class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default: ` div ` }},setup(e){let t=e;return(n,r)=>(I(),K(B(mt),{"data-slot": ` message - footer ` ,as:e.as,"as-child":e.asChild,class:R(B(U)( ` text - xs font - medium text - muted - foreground px - 3 group - has - data - [ variant = ghost ] / message : px - 0 flex max - w - full min - w - 0 items - center group - data - [ align = end ] / message : justify - end ` ,t.class))},{default:F(()=>[G(n. $ slots, ` default ` )]),_:3},8,[ ` as ` , ` as - child ` , ` class ` ]))}});function fC(e){switch(e.type){case ` image ` :return ` [ photo ] ` ;case ` video ` :return ` [ video ] ` ;case ` audio ` :return ` [ audio ] ` ;case ` document ` :return e.file_name? ` [ document : $ { e . file _name } ] ` : ` [ document ] ` ;default:return ` [ $ { e . type || ` attachment ` } ] ` }}function pC(e){let t=[];return e.mime_type&&t.push(e.mime_type),e.file_name&&t.push(e.file_name),e.file_size!==void 0&&t.push( ` $ { e . file _size } bytes ` ),e.width&&e.height&&t.push( ` $ { e . width } × $ { e . height } ` ),e.duration!==void 0&&t.push( ` $ { e . duration } s ` ),t.join( ` · ` )}var mC={class: ` truncate ` },hC=N({__name: ` ChatAttachment ` ,props:{attachment:{}},setup(e){return(t,n)=>(I(),K(xe(e.attachment.url? ` a ` : ` span ` ),{href:e.attachment.url,target:e.attachment.url? ` _blank ` :void 0,rel:e.attachment.url? ` noopener noreferrer ` :void 0,title:B(pC)(e.attachment),class: ` inline - flex max - w - full items - center gap - 1.5 rounded - md border border - border bg - muted px - 2.5 py - 1 text - xs font - medium text - fg - muted ` },{default:F(()=>[k(B(Cte),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),L( ` span ` ,mC,z(B(fC)(e.attachment)),1)]),_:1},8,[ ` href ` , ` target ` , ` rel ` , ` title ` ]))}}),gC=N({__name: ` CodeView ` ,props:{code:{},lang:{},class:{}},setup(e){let t=e,n=oC(()=>t.code,()=>t.lang|| ` text ` );return(r,i)=>(I(),K(B(Wp),{class:R(B(U)( ` bg - muted ` ,t.class))},{default:F(()=>[k(B(Gp),null,{default:F(()=>[k(B(Zp),{value:e.code},null,8,[ ` value ` ])]),_:1}),k(B(Yp),{wrap: ` ` ,class: ` max - h - [ 60 vh ] pe - 10 text - xs ` },{default:F(()=>[(I(!0),A(H,null,j(B(n),(e,t)=>(I(),K(B(Jp),{key:t},{default:F(()=>[(I(!0),A(H,null,j(e,(e,t)=>(I(),K(B(Qp),{key:t,token:e},null,8,[ ` token ` ]))),128))]),_:2},1024))),128))]),_:1})]),_:1},8,[ ` class ` ]))}}),_C=[ ` src ` , ` alt ` ],vC={key:1},yC={key:2},bC={key:3,class: ` rounded bg - foreground / 10 px - 1 py - 0.5 font - mono text - [ 0.9 em ] ` },xC=[ ` href ` ],SC={key:5},CC=N({__name: ` ChatInline ` ,props:{inline:{}},setup(e){return(t,n)=>(I(!0),A(H,null,j(e.inline,(e,t)=>(I(),A(H,{key:t},[e.kind=== ` image ` ?(I(),A( ` img ` ,{key:0,src:e.src,alt:e.alt,loading: ` lazy ` ,class: ` my - 1 block max - h - 96 max - w - full cursor - pointer rounded - md border border - border bg Line truncated
` ),r=[],i=null,a=null,o= ` ` ,s=()=>{r.length&&(t.push({kind: ` p ` ,inline:T C(r.join( ` ` ))}),r=[])},c=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>T C(e))}),null)};for(let e=0;e<n.length;e++){let l=n[e];if(l.startsWith(" ` ` ` " ) ) { s ( ) , c ( ) , a ? ( t . push ( { kind : ` pre ` , code : a . join ( `
` ),lang:o}),a=null):(a=[],o=l.slice(3).trim().split(/ \s /)[0]);continue}if(a){a.push(l);continue}let u=D C(l),d=e+1<n.length?D C(n[e+1]):null;if(u&&d&&O C(d)&&u.length===d.length){s(),c();let r=[];for(e+=2;e<n.length;e++){let t=D C(n[e]);if(!t||t.length!==u.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:u.map(e=>T C(e)),rows:r.map(e=>e.map(e=>T C(e)))});continue}if(!l.trim()){s(),c();continue}let f=l.match(/^(#{1,3}) \s +(.+) $ /);if(f){s(),c(),t.push({kind: ` h$ { f [ 1 ] . length } ` ,inline:T C(f[2])});continue}let p=l.match(/^ \s *[-*] \s +(.+) $ /),m=l.match(/^ \s * \d +[.)] \s +(.+) $ /);if(p||m){s();let e=m? ` ol ` : ` ul ` ;(!i||i.tag!==e)&&(c(),i={tag:e,items:[]}),i.items.push((p||m)[1])}else l.startsWith( ` > ` )?(s(),c(),t.push({kind: ` blockquote ` ,inline:T C(l.replace(/^> \s ?/, ` ` ))})):r.push(l)}return s(),c(),a&&t.push({kind: ` pre ` ,code:a.join( `
` ),lang:o}),t}function D C(e){let t=String(e|| ` ` ).trim();if(!t.includes( ` | ` ))return null;let n=t.replace(/^ \| /, ` ` ).replace(/ \| $ /, ` ` ).split( ` | ` ).map(e=>e.trim());return n.length>1&&n.every(e=>e!== ` ` )?n:null}function O C(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var k C={class: ` [ overflow - wrap : anywhere ] ` },A C={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },j C={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },M C={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },N C={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },P C={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },F C={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },I C={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },L C={key:8,class: ` mb - 2.5 last : mb - 0 ` },R C=N ({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=J (()=>E C(t.text));return(e,t)=>(I (),A ( ` div ` ,k C,[(I (!0),A(H ,null,j (n.value,(e,t)=>(I (),A(H ,{key:t},[e.kind=== ` pre ` ?(I (),K(g C,{key:0,code:e.code,lang:e.lang,class: ` my - 2 ` },null,8,[ ` code ` , ` lang ` ])):e.kind=== ` table ` ?(I (),A ( ` table ` ,A C,[L ( ` thead ` ,null,[L ( ` tr ` ,null,[(I (!0),A(H ,null,j (e.head,(e,t)=>(I (),A ( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[k(C C,{inline:e},null,8,[ ` inline ` ])]))),128))])]),L ( ` tbody ` ,null,[(I (!0),A(H ,null,j (e.rows,(e,t)=>(I (),A ( ` tr ` ,{key:t},[(I (!0),A(H ,null,j (e,(e,t)=>(I (),A ( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[k(C C,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(I (),A ( ` blockquote ` ,j C,[k(C C,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(I (),A ( ` h1 ` ,M C,[k(C C,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(I (),A ( ` h2 ` ,N C,[k(C C,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(I (),A ( ` h3 ` ,P C,[k(C C,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(I (),A ( ` ul ` ,F C,[(I (!0),A(H ,null,j (e.items,(e,t)=>(I (),A ( ` li ` ,{key:t},[k(C C,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(I (),A ( ` ol ` ,I C,[(I (!0),A(H ,null,j (e.items,(e,t)=>(I (),A ( ` li ` ,{key:t},[k(C C,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(I (),A ( ` p ` ,L C,[k(C C,{inline:e.inline},null,8,[ ` inline ` ])])):P ( ` ` ,!0)],64))),128))]))}}),zC ={class: ` truncate ` },c ne=N ({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=I e( ` RouterLink ` );return I (),K (r,{to:e.path,title: ` Go to $ { e . label || e . path } ` ,class: ` inline - flex max - w - full items - center gap - 1.5 rounded - md border border - primary / 45 bg - primary - soft px - 2.5 py - 1 text - xs font - semibold text - link transition - colors hover : border - primary hover : bg - primary / 15 focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary ` },{default:F (()=>[k(B (wl),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),L ( ` span ` ,zC,z (e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),B C=N ({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=J (()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=J (()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=J (()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=J (()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err|| ` ` ),o=J (()=>!a.value&&!i.value&&!!t.streaming),s=J (()=>[r.value&& ` > $ { r . value } ` ,a.value].filter(Boolean).join( `
` )+1;if(o>r.text.length){let e=a.highlight(i.slice(r.text.length,o-1),r.state);r={highlighter:a,text:i.slice(0,o),lines:[...r.lines,...e.lines],state:e.state}}let s=a.highlight(i.slice(o),r.state).lines[0]??[];return[...r.lines,s]})}var oC=nt( ` rounded - lg text - sm data - [ size = sm ] : text - xs has - [ > [ data - slot = code - block - content ] : focus - visible ] : ring - 3 has - [ > [ data - slot = code - block - content ] : focus - visible ] : ring - ring / 50 group / code - block relative flex w - full min - w - 0 flex - col overflow - hidden ` ,{variants:{variant:{default: ` border border - input text - foreground dark : bg - input / 30 has - [ > [ data - slot = code - block - content ] : focus - visible ] : border - ring ` ,destructive: ` border border - destructive / 30 text - destructive dark : border - destructive / 40 ` }},defaultVariants:{variant: ` default ` }}),sC=nt( ` - mx - 3 px - 3 in - data - numbered : gap - x - 3 before : min - w - 6 before : text - end before : text - muted - foreground after : start - 1 after : text - muted - foreground group - data - [ size = sm ] / code - block : - mx - 2.5 group - data - [ size = sm ] / code - block : px - 2.5 relative block min - h - lh after : absolute after : top - 0 after : select - none in - data - numbered : col - span - 2 in - data - numbered : grid in - data - numbered : grid - cols - subgrid in - data - numbered : [ counter - increment : line ] in - data - numbered : before : content - [ counter ( line ) ] in - data - numbered : before : select - none in - data - numbered : supports - [ content : counter ( line ) _ / _ '' ] : before : content - [ counter ( line ) _ / _ '' ] ` ,{variants:{variant:{default: ` ` ,added: ` bg - muted after : content - [ '+' ] ` ,removed: ` bg - destructive / 10 after : text - destructive after : content - [ '− ' ] ` ,highlighted: ` bg - muted ` }},defaultVariants:{variant: ` default ` }}),cC=P({__name: ` Message ` ,props:{class:{type:[Boolean,null,String,Object,Array]},align:{default: ` start ` },asChild:{type:Boolean},as:{default: ` div ` }},setup(e){let t=e;return(n,r)=>(L(),q(V(pt),{"data-slot": ` message ` ,"data-align":e.align,as:e.as,"as-child":e.asChild,class:z(V(W)( ` text - sm gap - 2 group / message relative flex w - full min - w - 0 data - [ align = end ] : flex - row - reverse ` ,t.class))},{default:I(()=>[K(n. $ slots, ` default ` )]),_:3},8,[ ` data - align ` , ` as ` , ` as - child ` , ` class ` ]))}}),lC=P({__name: ` MessageContent ` ,props:{class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default: ` div ` }},setup(e){let t=e;return(n,r)=>(L(),q(V(pt),{"data-slot": ` message - content ` ,as:e.as,"as-child":e.asChild,class:z(V(W)( ` gap - 2.5 group - data - [ align = end ] / message : * : data - slot : self - end flex w - full min - w - 0 flex - col wrap - break - word ` ,t.class))},{default:I(()=>[K(n. $ slots, ` default ` )]),_:3},8,[ ` as ` , ` as - child ` , ` class ` ]))}}),uC=P({__name: ` MessageFooter ` ,props:{class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default: ` div ` }},setup(e){let t=e;return(n,r)=>(L(),q(V(pt),{"data-slot": ` message - footer ` ,as:e.as,"as-child":e.asChild,class:z(V(W)( ` text - xs font - medium text - muted - foreground px - 3 group - has - data - [ variant = ghost ] / message : px - 0 flex max - w - full min - w - 0 items - center group - data - [ align = end ] / message : justify - end ` ,t.class))},{default:I(()=>[K(n. $ slots, ` default ` )]),_:3},8,[ ` as ` , ` as - child ` , ` class ` ]))}});function dC(e){switch(e.type){case ` image ` :return ` [ photo ] ` ;case ` video ` :return ` [ video ] ` ;case ` audio ` :return ` [ audio ] ` ;case ` document ` :return e.file_name? ` [ document : $ { e . file _name } ] ` : ` [ document ] ` ;default:return ` [ $ { e . type || ` attachment ` } ] ` }}function fC(e){let t=[];return e.mime_type&&t.push(e.mime_type),e.file_name&&t.push(e.file_name),e.file_size!==void 0&&t.push( ` $ { e . file _size } bytes ` ),e.width&&e.height&&t.push( ` $ { e . width } × $ { e . height } ` ),e.duration!==void 0&&t.push( ` $ { e . duration } s ` ),t.join( ` · ` )}var pC={class: ` truncate ` },mC=P({__name: ` ChatAttachment ` ,props:{attachment:{}},setup(e){return(t,n)=>(L(),q(be(e.attachment.url? ` a ` : ` span ` ),{href:e.attachment.url,target:e.attachment.url? ` _blank ` :void 0,rel:e.attachment.url? ` noopener noreferrer ` :void 0,title:V(fC)(e.attachment),class: ` inline - flex max - w - full items - center gap - 1.5 rounded - md border border - border bg - muted px - 2.5 py - 1 text - xs font - medium text - fg - muted ` },{default:I(()=>[A(V(Ste),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),R( ` span ` ,pC,B(V(dC)(e.attachment)),1)]),_:1},8,[ ` href ` , ` target ` , ` rel ` , ` title ` ]))}}),hC=P({__name: ` CodeView ` ,props:{code:{},lang:{},class:{}},setup(e){let t=e,n=aC(()=>t.code,()=>t.lang|| ` text ` );return(r,i)=>(L(),q(V(Wp),{class:z(V(W)( ` bg - muted ` ,t.class))},{default:I(()=>[A(V(Gp),null,{default:I(()=>[A(V(Zp),{value:e.code},null,8,[ ` value ` ])]),_:1}),A(V(Yp),{wrap: ` ` ,class: ` max - h - [ 60 vh ] pe - 10 text - xs ` },{default:I(()=>[(L(!0),j(U,null,M(V(n),(e,t)=>(L(),q(V(Jp),{key:t},{default:I(()=>[(L(!0),j(U,null,M(e,(e,t)=>(L(),q(V(Qp),{key:t,token:e},null,8,[ ` token ` ]))),128))]),_:2},1024))),128))]),_:1})]),_:1},8,[ ` class ` ]))}}),gC=[ ` src ` , ` alt ` ],_C={key:1},vC={key:2},yC={key:3,class: ` rounded bg - foreground / 10 px - 1 py - 0.5 font - mono text - [ 0.9 em ] ` },bC=[ ` href ` ],xC={key:5},SC=P({__name: ` ChatInline ` ,props:{inline:{}},setup(e){return(t,n)=>(L(!0),j(U,null,M(e.inline,(e,t)=>(L(),j(U,{key:t},[e.kind=== ` image ` ?(L(),j( ` img ` ,{key:0,src:e.src,alt:e.alt,loading: ` lazy ` ,class: ` my - 1 block max - h - 96 max - w - full cursor - pointer rounded - md border border - border bg Line truncated
` ),r=[],i=null,a=null,o= ` ` ,s=()=>{r.length&&(t.push({kind: ` p ` ,inline:w C(r.join( ` ` ))}),r=[])},c=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>w C(e))}),null)};for(let e=0;e<n.length;e++){let l=n[e];if(l.startsWith(" ` ` ` " ) ) { s ( ) , c ( ) , a ? ( t . push ( { kind : ` pre ` , code : a . join ( `
` ),lang:o}),a=null):(a=[],o=l.slice(3).trim().split(/ \s /)[0]);continue}if(a){a.push(l);continue}let u=E C(l),d=e+1<n.length?E C(n[e+1]):null;if(u&&d&&D C(d)&&u.length===d.length){s(),c();let r=[];for(e+=2;e<n.length;e++){let t=E C(n[e]);if(!t||t.length!==u.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:u.map(e=>w C(e)),rows:r.map(e=>e.map(e=>w C(e)))});continue}if(!l.trim()){s(),c();continue}let f=l.match(/^(#{1,3}) \s +(.+) $ /);if(f){s(),c(),t.push({kind: ` h$ { f [ 1 ] . length } ` ,inline:w C(f[2])});continue}let p=l.match(/^ \s *[-*] \s +(.+) $ /),m=l.match(/^ \s * \d +[.)] \s +(.+) $ /);if(p||m){s();let e=m? ` ol ` : ` ul ` ;(!i||i.tag!==e)&&(c(),i={tag:e,items:[]}),i.items.push((p||m)[1])}else l.startsWith( ` > ` )?(s(),c(),t.push({kind: ` blockquote ` ,inline:w C(l.replace(/^> \s ?/, ` ` ))})):r.push(l)}return s(),c(),a&&t.push({kind: ` pre ` ,code:a.join( `
` ),lang:o}),t}function E C(e){let t=String(e|| ` ` ).trim();if(!t.includes( ` | ` ))return null;let n=t.replace(/^ \| /, ` ` ).replace(/ \| $ /, ` ` ).split( ` | ` ).map(e=>e.trim());return n.length>1&&n.every(e=>e!== ` ` )?n:null}function D C(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var O C={class: ` [ overflow - wrap : anywhere ] ` },k C={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },A C={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },j C={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },M C={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },N C={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },P C={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },F C={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },I C={key:8,class: ` mb - 2.5 last : mb - 0 ` },L C=P ({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=Y (()=>T C(t.text));return(e,t)=>(L (),j ( ` div ` ,O C,[(L (!0),j(U ,null,M (n.value,(e,t)=>(L (),j(U ,{key:t},[e.kind=== ` pre ` ?(L (),q(h C,{key:0,code:e.code,lang:e.lang,class: ` my - 2 ` },null,8,[ ` code ` , ` lang ` ])):e.kind=== ` table ` ?(L (),j ( ` table ` ,k C,[R ( ` thead ` ,null,[R ( ` tr ` ,null,[(L (!0),j(U ,null,M (e.head,(e,t)=>(L (),j ( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[A(S C,{inline:e},null,8,[ ` inline ` ])]))),128))])]),R ( ` tbody ` ,null,[(L (!0),j(U ,null,M (e.rows,(e,t)=>(L (),j ( ` tr ` ,{key:t},[(L (!0),j(U ,null,M (e,(e,t)=>(L (),j ( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[A(S C,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(L (),j ( ` blockquote ` ,A C,[A(S C,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(L (),j ( ` h1 ` ,j C,[A(S C,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(L (),j ( ` h2 ` ,M C,[A(S C,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(L (),j ( ` h3 ` ,N C,[A(S C,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(L (),j ( ` ul ` ,P C,[(L (!0),j(U ,null,M (e.items,(e,t)=>(L (),j ( ` li ` ,{key:t},[A(S C,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(L (),j ( ` ol ` ,F C,[(L (!0),j(U ,null,M (e.items,(e,t)=>(L (),j ( ` li ` ,{key:t},[A(S C,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(L (),j ( ` p ` ,I C,[A(S C,{inline:e.inline},null,8,[ ` inline ` ])])):F ( ` ` ,!0)],64))),128))]))}}),cne ={class: ` truncate ` },l ne=P ({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=F e( ` RouterLink ` );return L (),q (r,{to:e.path,title: ` Go to $ { e . label || e . path } ` ,class: ` inline - flex max - w - full items - center gap - 1.5 rounded - md border border - primary / 45 bg - primary - soft px - 2.5 py - 1 text - xs font - semibold text - link transition - colors hover : border - primary hover : bg - primary / 15 focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary ` },{default:I (()=>[A(V (wl),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),R ( ` span ` ,cne,B (e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),R C=P ({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=Y (()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=Y (()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=Y (()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=Y (()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err|| ` ` ),o=Y (()=>!a.value&&!i.value&&!!t.streaming),s=Y (()=>[r.value&& ` > $ { r . value } ` ,a.value].filter(Boolean).join( `
` ));return(t,r)=>e.tool.path?(I(),K(cne,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):s.value?(I(),K(B(Ip),{key:1,"default-open":i.value},{default:F(()=>[k(B(zp),null,{default:F(()=>[k(B(Vp),{status:i.value? ` error ` :o.value? ` running ` :void 0},{default:F(()=>[k(B(Rp),null,{default:F(()=>[k(B(yu))]),_:1}),k(B(Hp),null,{default:F(()=>[V(z(n.value),1)]),_:1})]),_:1},8,[ ` status ` ])]),_:1}),k(B(Lp),null,{default:F(()=>[k(B(Wp),{size: ` sm ` },{default:F(()=>[k(B(Yp),{wrap: ` ` ,class: ` max - h - 64 ` },{default:F(()=>[V(z(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1},8,[ ` default - open ` ])):(I(),K(B(Vp),{key:2,status:i.value? ` error ` :o.value? ` running ` :void 0},{default:F(()=>[k(B(Rp),null,{default:F(()=>[k(B(yu))]),_:1}),k(B(Hp),null,{default:F(()=>[V(z(n.value),1)]),_:1})]),_:1},8,[ ` status ` ]))}}),lne={class: ` flex flex - col gap - 2 ` },une=N({__name: ` ChatToolGroup ` ,props:{tools:{},streaming:{type:Boolean}},setup(e){let t=e,n=e=>e.name||e.Name||e.tool|| ` tool ` ,r=e=>!!(e.err||e.Err||e.failed),i=J(()=>{let e=new Map;for(let r of t.tools)e.set(n(r),(e.get(n(r))??0)+1);return[...e].map(([e,t])=> ` $ { e } × $ { t } ` ).join( ` , ` )}),a=J(()=>t.tools.some(r));return(t,n)=>(I(),K(B(Ip),{"default-open":a.value},{default:F(()=>[k(B(zp),null,{default:F(()=>[k(B(Vp),{status:a.value? ` error ` :void 0},{default:F(()=>[k(B(Rp),null,{default:F(()=>[k(B(yu))]),_:1}),k(B(Hp),{class: ` truncate ` },{default:F(()=>[V(z(i.value),1)]),_:1})]),_:1},8,[ ` status ` ])]),_:1}),k(B(Lp),null,{default:F(()=>[L( ` div ` ,lne,[(I(!0),A(H,null,j(e.tools,(t,n)=>(I(),K(BC,{key:n,tool:t,streaming:e.streaming&&n===e.tools.length-1},null,8,[ ` tool ` , ` streaming ` ]))),128))])]),_:1})]),_:1},8,[ ` default - open ` ]))}}),dne={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },fne={key:3,class: ` whitespace - pre - wrap ` },pne=N({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){let t=e,n=J(()=>{let e=[],n=!1;for(let r of t.tools)r.path?(e.push([r]),n=!1):n?e[e.length-1].push(r):(e.push([r]),n=!0);return e});return(t,r)=>(I(),K(B(lC),{align:e.assistant? ` start ` : ` end ` },{default:F(()=>[k(B(uC),null,{default:F(()=>[k(B(kp),{variant:e.assistant? ` muted ` : ` tinted ` ,class: ` max - w - [ min ( 78 ch , 92 % ) ] ` },{default:F(()=>[k(B(Ap),{class: ` [ overflow - wrap : anywhere ] ` },{default:F(()=>[e.assistant&&e.tools.length?(I(),K(B(Mp),{key:0,class: ` mb - 2 ` },{default:F(()=>[(I(!0),A(H,null,j(n.value,(t,n)=>(I(),A(H,{key:n},[t.length>1?(I(),K(une,{key:0,tools:t,streaming:e.streaming},null,8,[ ` tools ` , ` streaming ` ])):(I(),K(BC,{key:1,tool:t[0],streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))],64))),128))]),_:1})):P( ` ` ,!0),e.media.length?(I(),A( ` div ` ,dne,[(I(!0),A(H,null,j(e.media,(e,t)=>(I(),K(hC,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):P( ` ` ,!0),e.assistant?(I(),K(RC,{key:2,text:e.text},null,8,[ ` text ` ])):(I(),A( ` div ` ,fne,z(e.text),1)),G(t. $ slots, ` default ` )]),_:3})]),_:3},8,[ ` variant ` ]),e.assistant&&!e.streaming&&e.text?(I(),K(B(dC),{key:0,class: ` px - 0 transition - opacity focus - within : opacity - 100 [ @ media ( hover : hover ) ] : opacity - 0 [ @ media ( hover : hover ) ] : group - hover / message : opacity - 100 ` },{default:F(()=>[k(B(Zp),{value:e.text},null,8,[ ` value ` ])]),_:1})):P( ` ` ,!0)]),_:3})]),_:3},8,[ ` align ` ]))}}),mne={class: ` text - sm ` },hne={key:0,class: ` mt - 1 text - fg - muted ` },gne={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },_ne=N({__name: ` ChatChooseCard ` ,props:{choose:{}},setup(e){let t=J(()=>Wu.value.models??[]);return(e,n)=>(I(),A( ` div ` ,mne,[n[0]||=L( ` p ` ,{class: ` font - medium ` }, ` Choose a model ` ,-1),t.value.length?(I(),A( ` div ` ,gne,[(I(!0),A(H,null,j(t.value,e=>(I(),K(B(Y),{key:e,size: ` sm ` ,variant:e===B(Wu).active_model? ` default ` : ` outline ` ,class: ` font - mono ` ,onClick:t=>void B(nd)(e)},{default:F(()=>[V(z(e),1)]),_:2},1032,[ ` variant ` , ` onClick ` ]))),128))])):(I(),A( ` p ` ,hne, ` None configured . ` ))]))}}),vne={class: ` text - sm ` },yne={key:0},bne={class: ` mt - 1 space - y - 0.5 ` },xne={class: ` font - mono ` },Sne=[ ` href ` ],Cne={key:0,class: ` mt - 3 flex gap - 2 ` },wne={key:1,class: ` mt - 2 text - fg - muted ` },Tne={key:2,class: ` mt - 2 text - fg - muted ` },Ene={key:3,class: ` mt - 2 text - ok ` },Dne={key:4,class: ` mt - 2 text - danger ` },One={key:5,class: ` mt - 2 text - xs text - fg - muted ` },kne=N({__name: ` ChatUpdateCard ` ,props:{update:{}},setup(e){let t=e,n=J(()=>t.update.available??[]),r=q( ` idle ` ),i=q( ` ` );async function a(){r.value= ` installing ` ;try{let e=(await X.updateInstall(t.update.snapshot)).result?.installed;i.value=e?Object.entries(e).map(([e,t])=> ` $ { e } → $ { t } ` ).join( ` , ` )+ ` . Archie restarts to apply it . ` : ` Update finished . ` ,r.value= ` done ` }catch(e){i.value=e.message,r.value= ` failed ` }}async function o(){try{await X.updateDefer(t.update.snapshot),r.value= ` deferred ` }catch(e){i.value=e.message,r.value= ` failed ` }}return(t,s)=>(I(),A( ` div ` ,vne,[n.value.length?(I(),A(H,{key:1},[s[2]||=L( ` p ` ,{class: ` font - medium ` }, ` An update is available ` ,-1),L( ` ul ` ,bne,[(I(!0),A(H,null,j(n.value,e=>(I(),A( ` li ` ,{key:e.ID},[V(z(e.Label||e.ID)+ ` : ` ,1),L( ` span ` ,xne,z(e.Installed|| ` ? ` )+ ` → ` +z(e.Available),1),e.Changelog?(I(),A( ` a ` ,{key:0,href:e.
Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,i=r.length>mT? ` $ { r . slice ( 0 , mT ) . trimEnd ( ) } … ` :r;return{text:i,full:n,truncated:i!==n}}function Pie(e){return String(e|| ` event ` ).replaceAll( ` _ ` , ` ` ).replace(/ \b \w /g,e=>e.toUpperCase())}function gT(e){let t=Number(e);if(!Number.isFinite(t)||t<0)return ` ` ;if(t<1e3)return ` under 1 s ` ;let n=t/1e3;if(n<60)return ` $ { n . toFixed ( + ( n < 10 ) ) } s ` ;let r=Math.round(n),i=Math.floor(r/60),a=r%60;if(i<60)return a===0? ` $ { i } min ` : ` $ { i } min $ { a } s ` ;let o=Math.floor(i/60),s=i-o*60;return s===0? ` $ { o } h ` : ` $ { o } h $ { s } min ` }function _T(e){let t=Number(e);return!Number.isFinite(t)||t<=0? ` ` :t.toLocaleString( ` en - US ` )}function vT(e){return typeof e== ` string ` ?e: ` ` }function yT(e={}){let t=e.data||{},n=e.stage|| ` unknown stage ` ,r=e.workflow? ` $ { e . workflow } workflow ` : ` ` ;if(e.kind=== ` stage _start ` )return{title: ` Started stage : $ { n } ` ,detail:r};if(e.kind=== ` stage _finish ` ){let e=[r,gT(t.duration_ms)].filter(Boolean).join( ` · ` );return{title:t.interrupted? ` Stage interrupted : $ { n } ` :t.skipped? ` Skipped stage : $ { n } ` :t.error? ` Stage failed : $ { n } ` : ` Finished stage : $ { n } ` ,detail:[e,vT(t.error),vT(t.when)].filter(Boolean).join( ` · ` )}}if(e.kind=== ` task _retried ` ){let n=Number(t.retry_count);return{title:Number.isFinite(n)&&n>0? ` Retry $ { n } ` : ` Retry requested ` ,detail:[vT(t.previous_stage)&& ` after $ { vT ( t . previous _stage ) } ` ,vT(t.previous_reason)].filter(Boolean).join( ` : ` )||e.detail|| ` ` }}if(e.kind=== ` agent _finish ` ){let r=_T(t.iterations),i=_T(t.tokens),a=Number(t.cached_tokens)||0,o=_T((Number(t.prompt_tokens)||0)-a),s=_T(t.completion_tokens),c=_T(t.cached_tokens),l=[r&& ` $ { r } iterations ` ,i&& ` $ { i } tokens ` ,o&& ` $ { o } fresh prompt ` ,s&& ` $ { s } completion ` ,c&& ` $ { c } cached ` ,vT(t.model)].filter(Boolean);return{title: ` Agent $ { vT ( t . status ) || ` finished ` } : $ { n } ` ,detail:l.join( ` · ` )||e.detail|| ` ` }}if(e.kind=== ` remediation _round ` ){let e=Number(t.of),n=vT(t.author);return{title: ` Remediation $ { vT ( t . round ) } $ { e > 0 ? ` of ${ e } ` : ` ` } ` ,detail:[n&& ` answers $ { n } ' s review ` ,t.review_id? ` # $ { vT ( t . review _id ) } ` : ` ` ].filter(Boolean).join( ` ` )}}if(e.kind=== ` review _approved ` ){let e=vT(t.pr_number);return{title: ` Pull request approved ` ,detail:[vT(t.author),e&& ` # $ { e } ` ].filter(Boolean).join( ` · ` )}}if(e.kind=== ` step _retried ` )return{title: ` Attempt $ { vT ( t . attempt ) } of $ { vT ( t . of ) } failed : $ { e . stage || ` step ` } ` ,detail:vT(t.error),tone: ` warn ` };if(e.kind=== ` config _captured ` )return{title: ` Configuration captured ` ,detail: ` The effective task - runtime configuration for this run . ` };if(e.kind=== ` binding _started ` ){let e=vT(t.source),n=vT(t.capture_id),r=[{label: ` binding $ { vT ( t . binding _name ) || vT ( t . binding _id ) } ` ,to: ` / events ? tab = bindings ` },...n?[{label: ` captured event ` ,to: ` / events ? tab = inspector & capture = $ { encodeURIComponent ( n ) } ` }]:[]];return t.unsigned===!0?{title: ` Started by an unsigned event ` ,detail:e? ` source $ { e } ` : ` ` ,tone: ` warn ` ,links:r}:{title: ` Started by an event ` ,detail:e? ` source $ { e } ` : ` ` ,links:r}}if(e.kind=== ` changes _captured ` ){let e=t.totals??{},n=Number(e.files);return{title: ` Change capture recorded ` ,detail:[Number.isFinite(n)&&n>0? ` $ { n } file$ { n === 1 ? ` ` : ` s ` } changed ` : ` ` ,t.captured_after? ` captured after $ { vT ( t . captured _after ) } ` : ` ` ].filter(Boolean).join( ` · ` )}}return{title:Pie(e.kind||e.type),detail:e.detail|| ` ` }}var Fie=[ ` title ` ],bT=N({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=pT();n.watchIdentities();let r=e,i=t,a=iT(),o=J(()=>a.taskIDFor(r.event)),s=J(()=>hT(r.event,n.identityName));function c(){o.value>0&&i( ` open ` ,o.value)}let l=J(()=>r.event.at?HC(r.event.at): ` – ` );return(e,t)=>(I(),K(B(lT),{class:R(o.value>0? ` cursor - pointer ` : ` ` ),role:o.value>0? ` link ` :void 0,tabindex:o.value>0?0:void 0,title:o.value>0? ` Open task details ` :void 0,onClick:c,onKeydown:[yt(_t(c,[ ` prevent ` ]),[ ` enter ` ]),yt(_t(c,[ ` prevent ` ]),[ ` space ` ])]},{default:F(()=>[k(B(Q),{class: ` font - medium ` },{default:F(()=>[V(z(B(yT)({...r.event,at:void 0,detail:void 0}).title),1)]),_:1}),k(B(Q),{class: ` font - mono ` },{default:F(()=>[V(z(o.value>0? ` # $ { o . value } ` : ` – ` ),1)]),_:1}),k(B(Q),{class: ` w - [ 55 % ] max - w - 0 ` },{default:F(()=>[L( ` span ` ,{class: ` block truncate ` ,title:s.value.truncated?s.value.full:void 0},z(s.value.text),9,Fie)]),_:1}),k(B(Q),null,{default:F(()=>[V(z(l.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),Iie=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function xT(e){return(Number(e?.task_id)||0)>0}function Lie(e,t){return t=== ` tasks ` ?xT(e):t!== ` system ` ||!xT(e)}function Rie(e,t){return e.filter(e=>Lie(e,t))}function zie(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function Bie(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function Vie(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=Bie(hT(n).text,r),a=t[t.length-1];a&&a.key===i?(a.count+=1,a.events.push(n)):t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var Hie={key:0,class: ` font - normal text - fg - subtle ` },Uie={role: ` region ` ,"aria-label": ` Activity ` ,"aria-live
Line truncated
` ,1)[0]?? ` ` ;return t.length>80? ` $ { t . slice ( 0 , 79 ) } … ` :t}function CE(e){return(e?.merged||0)+(e?.completed||0)}function wE(e){return Object.entries(e?.inputs??{}).map(([e,t])=>({name:e,type:t.type,required:t.required===!0})).sort((e,t)=>e.name.localeCompare(t.name))}function TE(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function EE(e,t){switch(t){case ` number ` :{let t=e.trim();return t!== ` ` &&!Number.isNaN(Number(t))?Number(t):e}case ` bool ` :return e=== ` true ` ||e!== ` false ` &&e;case ` string ` :return e;default:try{return JSON.parse(e)}catch{return e}}}function DE(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!== ` ` &&(n[r.name]=EE(e,r.type))}return n}var OE=[ ` onKeydown ` ],kE={key:0,class: ` text - sm text - danger ` ,role: ` alert ` },AE={key:1,class: ` grid gap - 1.5 ` },jE=[ ` for ` ],ME={key:0,class: ` font - normal text - fg - subtle ` },NE=[ ` id ` ],PE=[ ` value ` ],FE={key:0,class: ` text - xs text - fg - subtle ` },IE={key:2,class: ` grid gap - 1.5 ` },LE=[ ` id ` ],RE={class: ` block truncate text - [ 13 px ] font - medium ` },zE={class: ` block text - xs text - fg - subtle ` },BE={key:0,class: ` text - xs text - fg - subtle ` },VE={key:3,class: ` grid gap - 3 ` },HE=[ ` for ` ],UE={class: ` font - mono ` },WE={key:0,class: ` text - fg - subtle ` },GE={class: ` grid gap - 1.5 ` },KE=[ ` for ` ],qE={class: ` grid gap - 1.5 ` },JE=[ ` for ` ],YE={key:4,class: ` text - sm text - danger ` ,role: ` alert ` },XE={class: ` flex items - center gap - 2 border - t border - border pt - 4 ` },ZE={class: ` mr - auto text - xs text - fg - subtle ` },QE=N({__name: ` NewTaskForm ` ,props:{workflow:{},draft:{},initialWorkflow:{},initialInstructions:{}},emits:[ ` started ` , ` cancel ` ],setup(e,{emit:t}){let n=e,r=t,i=Oe(),a=q([]),o=q([]),s=q([]),c=q( ` ` );We(async()=>{try{let[e,t]=await Promise.all([X.workflows(),X.repositories()]);a.value=(e?.definitions??[]).filter(e=>e.enabled),o.value=e?.workflows??[],s.value=(t??[]).map(e=> ` $ { e . owner } / $ { e . name } ` )}catch(e){c.value=String(e.message||e)}});let l=q( ` ` ),u=q(n.workflow??n.initialWorkflow?? ` ` ),d=q(n.initialInstructions?? ` ` ),f=q(SE(d.value)),p=q({});De(()=>{!u.value&&a.value[0]&&(u.value=a.value[0].id)});let m=J(()=>a.value.find(e=>e.id===u.value)),h=J(()=>wE(m.value)),g=J(()=>TE(h.value,p.value)),_=J(()=>m.value?.repository?? ` required ` ),v=J(()=>_.value!== ` optional ` &&_.value!== ` none ` ),y=e=>o.value.find(t=>t.workflow===e),b=q(!1),x=q( ` ` ),S=J(()=>!(!l.value.trim()&&v.value||!u.value||!f.value.trim())&&g.value.length===0);async function C(){if(S.value&&!b.value){b.value=!0,x.value= ` ` ;try{let e=await X.workRequest({repository:_.value=== ` none ` ? ` ` :l.value.trim(),workflow:u.value,title:f.value.trim(),instructions:d.value,inputs:DE(h.value,p.value),...n.draft?{draft:n.draft}:{}});r( ` started ` ,e.task_id)}catch(e){x.value=String(e.message||e)}finally{b.value=!1}}}return(e,t)=>(I(),A( ` form ` ,{class: ` grid gap - 5 ` ,onSubmit:_t(C,[ ` prevent ` ]),onKeydown:[yt(_t(C,[ ` meta ` , ` prevent ` ]),[ ` enter ` ]),yt(_t(C,[ ` ctrl ` , ` prevent ` ]),[ ` enter ` ])]},[c.value?(I(),A( ` p ` ,kE,z(c.value),1)):P( ` ` ,!0),_.value=== ` none ` ?P( ` ` ,!0):(I(),A( ` div ` ,AE,[L( ` label ` ,{for: ` $ { B ( i ) } - repo ` ,class: ` text - [ 13 px ] font - medium ` },[t[5]||=V( ` Repository ` ,-1),v.value?P( ` ` ,!0):(I(),A( ` span ` ,ME, ` ( optional ) ` ))],8,jE),k(B(Z),{id: ` $ { B ( i ) } - repo ` ,modelValue:l.value,"onUpdate:modelValue":t[0]||=e=>l.value=e,class: ` font - mono ` ,placeholder: ` owner / repository ` ,list: ` $ { B ( i ) } - repos ` ,required:v.value},null,8,[ ` id ` , ` modelValue ` , ` list ` , ` required ` ]),L( ` datalist ` ,{id: ` $ { B ( i ) } - repos ` },[(I(!0),A(H,null,j(s.value,e=>(I(),A( ` option ` ,{key:e,value:e},null,8,PE))),128))],8,NE),s.value.length?(I(),A( ` p ` ,FE,[t[6]||=V( ` Configured : ` ,-1),(I(!0),A(H,null,j(s.value,e=>(I(),K(B(Y),{key:e,type: ` button ` ,variant: ` link ` ,size: ` xs ` ,class: ` h - auto px - 1 font - mono text - fg - subtle ` ,onClick:t=>l.value=e},{default:F(()=>[V(z(e),1)]),_:2},1032,[ ` onClick ` ]))),128))])):P( ` ` ,!0)])),n.workflow?P( ` ` ,!0):(I(),A( ` div ` ,IE,[L( ` span ` ,{id: ` $ { B ( i ) } - wf ` ,class: ` text - [ 13 px ] font - medium ` }, ` Workflow ` ,8,LE),k(B(Ds),{modelValue:u.value,"onUpdate:modelValue":t[1]||=e=>u.value=e,"aria-labelledby": ` $ { B ( i ) } - wf ` ,class: ` grid grid - cols - 1 gap - 2 sm : grid - cols - 3 ` ,loop: ` ` },{default:F(()=>[(I(!0),A(H,null,j(a.value,e=>(I(),K(B(ks),{key:e.id,value:e.id,class: ` rounded - md border border - border bg - card px - 3 py - 2.5 text - left transition - colors hover : bg - secondary focus - visible : outline - 2 focus - visible : outline - ring data - [ state = checked ] : border - primary data - [ state = checked ] : bg - secondary ` },{default:F(()=>[L( ` span ` ,RE,z(e.name||e.id),1),L( ` span ` ,zE,[V(z(y(e.id)?.runs||0)+ ` runs ` ,1),y(e.id)?.runs?(I(),A(H,{key:0},[V( ` · ` +z(Math.round(B(CE)(y(e.id))/(y(e.id)?.runs||1)*100))+ ` % delivered ` ,1)],64)):P( ` ` ,!0)])]),_:2},1032,[ ` value ` ]))),128))]),_:1},8,[ ` modelValue ` , ` aria - labelledby ` ]),!a.value.length&&!c.value?(I(),A( ` p ` ,BE, ` No enabled workflows . ` )):P( ` ` ,!0)])),h.value.length?(I(),A( ` div ` ,VE,[(I(!0),A(H,null,j(h.value,e=>(I(),A( ` div ` ,{key:e.name,class: ` grid gap - 1.5 ` },[L( ` label ` ,{for: ` $ { B ( i ) } - input - $ { e . name } ` ,class: ` text - [ 13 px ] font - medium ` },[L( ` span ` ,UE,z(e.name),1),e.required?(I(),A( ` span ` ,WE, ` · required ` )):P( ` ` ,!0)],8,HE),k(B(Z),{id: ` $ { B ( i ) } - input - $ { e . name } ` ,"model-value":p.value[e.
Line truncated
` )){let e=n.indexOf( ` : ` );if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function mD(e,t){if(!e.event_type)return{label: ` Unidentified ` ,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name: ` Deleted type ` ,identified:!0}}function hD(e,t){if(!e)return ` No event type ` ;let n=t.find(t=>t.id===e);return n? ` $ { n . source } / $ { n . name } ` : ` Deleted type ` }function gD(e){let t=[...(e.headers||[]).map(e=> ` $ { e . name } = $ { e . value } ` ),...(e.payload||[]).map(e=>e.op=== ` present ` ? ` $ { e . path } present ` : ` $ { e . path } = $ { e . value ? ? ` ` } ` )];return t.length?t.join( ` · ` ): ` any event ` }function _D(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!== ` ` ).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!== ` ` ).map(e=>e.op=== ` present ` ?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value?? ` ` })}}var vD=q([]),yD=q([]),bD=q(!0),xD=q(null),SD=q(!0),CD=q(null),wD=q(!1),TD=q(null);async function ED(){try{let e=await X.eventTypes(fD().workspace);bD.value=e.enabled!==!1,vD.value=e.event_types||[],yD.value=e.proposals||[],xD.value=null}catch(e){xD.value=e.message||String(e)}finally{SD.value=!1}}function DD(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function OD(e){TD.value=null,CD.value=e}function kD(e){let t=LD.value.find(t=>String(t.id)===e.sample_id);OD({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:DD(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function AD(e= ` ` ){OD({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function jD(e){OD({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:DD(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function MD(){CD.value=null}async function ND(){let e=CD.value;if(e){wD.value=!0;try{if(e.mode=== ` edit ` &&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:_D(e.rule)});else{let t=e.mode=== ` paste ` ?pD(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:_D(e.rule),example:{headers:t,body:e.body}})}CD.value=null,await ED()}catch(e){TD.value=e.message||String(e)}finally{wD.value=!1}}}var PD=q(null);async function FD(){let e=PD.value;if(PD.value=null,e)try{await X.eventTypeDelete(e.id),await ED()}catch(e){xD.value=e.message||String(e)}}var ID=100,LD=q([]),RD=q(!0),zD=q(null),BD=q(!0),VD=q(null);async function HD(){try{let e=await X.captures(ID);RD.value=e.enabled!==!1,LD.value=e.captures||[],zD.value=null}catch(e){zD.value=e.message||String(e)}finally{BD.value=!1}}function UD(e){let t=LD.value.find(t=>t.id===e);return t&&(VD.value=t),!!t}function WD(){LD.value.length&&(VD.value=LD.value[0])}function GD(){GC( ` captures ` ,()=>{HD(),ED()})}var KD=N({__name: ` Tabs ` ,props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[ ` update : modelValue ` ],setup(e,{emit:t}){let n=e,r=t,i=ft(n, ` class ` ),a=de(i,r);return(e,t)=>(I(),K(B(Sc),W({"data-slot": ` tabs ` ,"data-orientation":B(a).orientation|| ` horizontal ` },B(a),{class:B(U)( ` gap - 2 group / tabs flex data - horizontal : flex - col ` ,n.class)}),{default:F(t=>[G(e. $ slots, ` default ` ,Ze(we(t)))]),_:3},16,[ ` data - orientation ` , ` class ` ]))}}),qD=N({__name: ` TabsContent ` ,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=ft(t, ` class ` );return(e,r)=>(I(),K(B(Tc),W({"data-slot": ` tabs - content ` ,class:B(U)( ` text - sm flex - 1 outline - none ` ,t.class)},B(n)),{default:F(()=>[G(e. $ slots, ` default ` )]),_:3},16,[ ` class ` ]))}}),JD=N({__name: ` TabsList ` ,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{default: ` default ` }},setup(e){let t=e,n=ft(t, ` class ` , ` variant ` );return(r,i)=>(I(),K(B(Ec),W({"data-slot": ` tabs - list ` ,"data-variant":e.variant},B(n),{class:B(U)(B(XD)({variant:e.variant}),t.class)}),{default:F(()=>[G(r. $ slots, ` default ` )]),_:3},16,[ ` data - variant ` , ` class ` ]))}}),YD=N({__name: ` TabsTrigger ` ,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=ft(t, ` class ` ),r=me(n);return(e,n)=>(I(),K(B(Dc),W({"data-slot": ` tabs - trigger ` ,class:B(U)( ` gap - 1.5 rounded - md border border - transparent px - 1.5 py - 0.5 text - sm font - medium group - data - [ variant = default ] / tabs - list : data - active : shadow - sm group - data - [ variant = line ] / tabs - list : data - active : shadow - none [ & _svg : not ( [ class *= size - ] ) ] : size - 4 has - data - [ icon = inline - end ] : pr - 1 has - data - [ icon = inline - start ] : pl - 1 relative inline - flex h - [ calc ( 100 % - 1 px ) ] flex - 1 items - center justify - center whitespace - nowrap text - foreground / 60 transition - all group - data - vertical / tabs : w - full group - data - vertical / tabs : justify - start hover : text - foreground focus - visible : border - ring focus - visible : ring - 3 focus - visible : ring - ring / 50 focus - visible : outline - 1 focus - visible Line truncated
` ));return(t,r)=>e.tool.path?(L(),q(lne,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):s.value?(L(),q(V(Ip),{key:1,"default-open":i.value},{default:I(()=>[A(V(zp),null,{default:I(()=>[A(V(Vp),{status:i.value? ` error ` :o.value? ` running ` :void 0},{default:I(()=>[A(V(Rp),null,{default:I(()=>[A(V(yu))]),_:1}),A(V(Hp),null,{default:I(()=>[H(B(n.value),1)]),_:1})]),_:1},8,[ ` status ` ])]),_:1}),A(V(Lp),null,{default:I(()=>[A(V(Wp),{size: ` sm ` },{default:I(()=>[A(V(Yp),{wrap: ` ` ,class: ` max - h - 64 ` },{default:I(()=>[H(B(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1},8,[ ` default - open ` ])):(L(),q(V(Vp),{key:2,status:i.value? ` error ` :o.value? ` running ` :void 0},{default:I(()=>[A(V(Rp),null,{default:I(()=>[A(V(yu))]),_:1}),A(V(Hp),null,{default:I(()=>[H(B(n.value),1)]),_:1})]),_:1},8,[ ` status ` ]))}}),une={class: ` flex flex - col gap - 2 ` },dne=P({__name: ` ChatToolGroup ` ,props:{tools:{},streaming:{type:Boolean}},setup(e){let t=e,n=e=>e.name||e.Name||e.tool|| ` tool ` ,r=e=>!!(e.err||e.Err||e.failed),i=Y(()=>{let e=new Map;for(let r of t.tools)e.set(n(r),(e.get(n(r))??0)+1);return[...e].map(([e,t])=> ` $ { e } × $ { t } ` ).join( ` , ` )}),a=Y(()=>t.tools.some(r));return(t,n)=>(L(),q(V(Ip),{"default-open":a.value},{default:I(()=>[A(V(zp),null,{default:I(()=>[A(V(Vp),{status:a.value? ` error ` :void 0},{default:I(()=>[A(V(Rp),null,{default:I(()=>[A(V(yu))]),_:1}),A(V(Hp),{class: ` truncate ` },{default:I(()=>[H(B(i.value),1)]),_:1})]),_:1},8,[ ` status ` ])]),_:1}),A(V(Lp),null,{default:I(()=>[R( ` div ` ,une,[(L(!0),j(U,null,M(e.tools,(t,n)=>(L(),q(RC,{key:n,tool:t,streaming:e.streaming&&n===e.tools.length-1},null,8,[ ` tool ` , ` streaming ` ]))),128))])]),_:1})]),_:1},8,[ ` default - open ` ]))}}),fne={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },pne={key:3,class: ` whitespace - pre - wrap ` },mne=P({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){let t=e,n=Y(()=>{let e=[],n=!1;for(let r of t.tools)r.path?(e.push([r]),n=!1):n?e[e.length-1].push(r):(e.push([r]),n=!0);return e});return(t,r)=>(L(),q(V(cC),{align:e.assistant? ` start ` : ` end ` },{default:I(()=>[A(V(lC),null,{default:I(()=>[A(V(kp),{variant:e.assistant? ` muted ` : ` tinted ` ,class: ` max - w - [ min ( 78 ch , 92 % ) ] ` },{default:I(()=>[A(V(Ap),{class: ` [ overflow - wrap : anywhere ] ` },{default:I(()=>[e.assistant&&e.tools.length?(L(),q(V(Mp),{key:0,class: ` mb - 2 ` },{default:I(()=>[(L(!0),j(U,null,M(n.value,(t,n)=>(L(),j(U,{key:n},[t.length>1?(L(),q(dne,{key:0,tools:t,streaming:e.streaming},null,8,[ ` tools ` , ` streaming ` ])):(L(),q(RC,{key:1,tool:t[0],streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))],64))),128))]),_:1})):F( ` ` ,!0),e.media.length?(L(),j( ` div ` ,fne,[(L(!0),j(U,null,M(e.media,(e,t)=>(L(),q(mC,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):F( ` ` ,!0),e.assistant?(L(),q(LC,{key:2,text:e.text},null,8,[ ` text ` ])):(L(),j( ` div ` ,pne,B(e.text),1)),K(t. $ slots, ` default ` )]),_:3})]),_:3},8,[ ` variant ` ]),e.assistant&&!e.streaming&&e.text?(L(),q(V(uC),{key:0,class: ` px - 0 transition - opacity focus - within : opacity - 100 [ @ media ( hover : hover ) ] : opacity - 0 [ @ media ( hover : hover ) ] : group - hover / message : opacity - 100 ` },{default:I(()=>[A(V(Zp),{value:e.text},null,8,[ ` value ` ])]),_:1})):F( ` ` ,!0)]),_:3})]),_:3},8,[ ` align ` ]))}}),hne={class: ` text - sm ` },gne={key:0,class: ` mt - 1 text - fg - muted ` },_ne={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },vne=P({__name: ` ChatChooseCard ` ,props:{choose:{}},setup(e){let t=Y(()=>Wu.value.models??[]);return(e,n)=>(L(),j( ` div ` ,hne,[n[0]||=R( ` p ` ,{class: ` font - medium ` }, ` Choose a model ` ,-1),t.value.length?(L(),j( ` div ` ,_ne,[(L(!0),j(U,null,M(t.value,e=>(L(),q(V(X),{key:e,size: ` sm ` ,variant:e===V(Wu).active_model? ` default ` : ` outline ` ,class: ` font - mono ` ,onClick:t=>void V(nd)(e)},{default:I(()=>[H(B(e),1)]),_:2},1032,[ ` variant ` , ` onClick ` ]))),128))])):(L(),j( ` p ` ,gne, ` None configured . ` ))]))}}),yne={class: ` text - sm ` },bne={key:0},xne={class: ` mt - 1 space - y - 0.5 ` },Sne={class: ` font - mono ` },Cne=[ ` href ` ],wne={key:0,class: ` mt - 3 flex gap - 2 ` },Tne={key:1,class: ` mt - 2 text - fg - muted ` },Ene={key:2,class: ` mt - 2 text - fg - muted ` },Dne={key:3,class: ` mt - 2 text - ok ` },One={key:4,class: ` mt - 2 text - danger ` },kne={key:5,class: ` mt - 2 text - xs text - fg - muted ` },Ane=P({__name: ` ChatUpdateCard ` ,props:{update:{}},setup(e){let t=e,n=Y(()=>t.update.available??[]),r=J( ` idle ` ),i=J( ` ` );async function a(){r.value= ` installing ` ;try{let e=(await Z.updateInstall(t.update.snapshot)).result?.installed;i.value=e?Object.entries(e).map(([e,t])=> ` $ { e } → $ { t } ` ).join( ` , ` )+ ` . Archie restarts to apply it . ` : ` Update finished . ` ,r.value= ` done ` }catch(e){i.value=e.message,r.value= ` failed ` }}async function o(){try{await Z.updateDefer(t.update.snapshot),r.value= ` deferred ` }catch(e){i.value=e.message,r.value= ` failed ` }}return(t,s)=>(L(),j( ` div ` ,yne,[n.value.length?(L(),j(U,{key:1},[s[2]||=R( ` p ` ,{class: ` font - medium ` }, ` An update is available ` ,-1),R( ` ul ` ,xne,[(L(!0),j(U,null,M(n.value,e=>(L(),j( ` li ` ,{key:e.ID},[H(B(e.Label||e.ID)+ ` : ` ,1),R( ` span ` ,Sne,B(e.Installed|| ` ? ` )+ ` → ` +B(e.Available),1),e.Changelog?(L(),j( ` a ` ,{key:0,href:e.
Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,i=r.length>pT? ` $ { r . slice ( 0 , pT ) . trimEnd ( ) } … ` :r;return{text:i,full:n,truncated:i!==n}}function Fie(e){return String(e|| ` event ` ).replaceAll( ` _ ` , ` ` ).replace(/ \b \w /g,e=>e.toUpperCase())}function hT(e){let t=Number(e);if(!Number.isFinite(t)||t<0)return ` ` ;if(t<1e3)return ` under 1 s ` ;let n=t/1e3;if(n<60)return ` $ { n . toFixed ( + ( n < 10 ) ) } s ` ;let r=Math.round(n),i=Math.floor(r/60),a=r%60;if(i<60)return a===0? ` $ { i } min ` : ` $ { i } min $ { a } s ` ;let o=Math.floor(i/60),s=i-o*60;return s===0? ` $ { o } h ` : ` $ { o } h $ { s } min ` }function gT(e){let t=Number(e);return!Number.isFinite(t)||t<=0? ` ` :t.toLocaleString( ` en - US ` )}function _T(e){return typeof e== ` string ` ?e: ` ` }function vT(e={}){let t=e.data||{},n=e.stage|| ` unknown stage ` ,r=e.workflow? ` $ { e . workflow } workflow ` : ` ` ;if(e.kind=== ` stage _start ` )return{title: ` Started stage : $ { n } ` ,detail:r};if(e.kind=== ` stage _finish ` ){let e=[r,hT(t.duration_ms)].filter(Boolean).join( ` · ` );return{title:t.interrupted? ` Stage interrupted : $ { n } ` :t.skipped? ` Skipped stage : $ { n } ` :t.error? ` Stage failed : $ { n } ` : ` Finished stage : $ { n } ` ,detail:[e,_T(t.error),_T(t.when)].filter(Boolean).join( ` · ` )}}if(e.kind=== ` task _retried ` ){let n=Number(t.retry_count);return{title:Number.isFinite(n)&&n>0? ` Retry $ { n } ` : ` Retry requested ` ,detail:[_T(t.previous_stage)&& ` after $ { _T ( t . previous _stage ) } ` ,_T(t.previous_reason)].filter(Boolean).join( ` : ` )||e.detail|| ` ` }}if(e.kind=== ` agent _finish ` ){let r=gT(t.iterations),i=gT(t.tokens),a=Number(t.cached_tokens)||0,o=gT((Number(t.prompt_tokens)||0)-a),s=gT(t.completion_tokens),c=gT(t.cached_tokens),l=[r&& ` $ { r } iterations ` ,i&& ` $ { i } tokens ` ,o&& ` $ { o } fresh prompt ` ,s&& ` $ { s } completion ` ,c&& ` $ { c } cached ` ,_T(t.model)].filter(Boolean);return{title: ` Agent $ { _T ( t . status ) || ` finished ` } : $ { n } ` ,detail:l.join( ` · ` )||e.detail|| ` ` }}if(e.kind=== ` remediation _round ` ){let e=Number(t.of),n=_T(t.author);return{title: ` Remediation $ { _T ( t . round ) } $ { e > 0 ? ` of ${ e } ` : ` ` } ` ,detail:[n&& ` answers $ { n } ' s review ` ,t.review_id? ` # $ { _T ( t . review _id ) } ` : ` ` ].filter(Boolean).join( ` ` )}}if(e.kind=== ` review _approved ` ){let e=_T(t.pr_number);return{title: ` Pull request approved ` ,detail:[_T(t.author),e&& ` # $ { e } ` ].filter(Boolean).join( ` · ` )}}if(e.kind=== ` step _retried ` )return{title: ` Attempt $ { _T ( t . attempt ) } of $ { _T ( t . of ) } failed : $ { e . stage || ` step ` } ` ,detail:_T(t.error),tone: ` warn ` };if(e.kind=== ` config _captured ` )return{title: ` Configuration captured ` ,detail: ` The effective task - runtime configuration for this run . ` };if(e.kind=== ` binding _started ` ){let e=_T(t.source),n=_T(t.capture_id),r=[{label: ` binding $ { _T ( t . binding _name ) || _T ( t . binding _id ) } ` ,to: ` / events ? tab = bindings ` },...n?[{label: ` captured event ` ,to: ` / events ? tab = inspector & capture = $ { encodeURIComponent ( n ) } ` }]:[]];return t.unsigned===!0?{title: ` Started by an unsigned event ` ,detail:e? ` source $ { e } ` : ` ` ,tone: ` warn ` ,links:r}:{title: ` Started by an event ` ,detail:e? ` source $ { e } ` : ` ` ,links:r}}if(e.kind=== ` changes _captured ` ){let e=t.totals??{},n=Number(e.files);return{title: ` Change capture recorded ` ,detail:[Number.isFinite(n)&&n>0? ` $ { n } file$ { n === 1 ? ` ` : ` s ` } changed ` : ` ` ,t.captured_after? ` captured after $ { _T ( t . captured _after ) } ` : ` ` ].filter(Boolean).join( ` · ` )}}return{title:Fie(e.kind||e.type),detail:e.detail|| ` ` }}var Iie=[ ` title ` ],yT=P({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=fT();n.watchIdentities();let r=e,i=t,a=nT(),o=Y(()=>a.taskIDFor(r.event)),s=Y(()=>mT(r.event,n.identityName));function c(){o.value>0&&i( ` open ` ,o.value)}let l=Y(()=>r.event.at?BC(r.event.at): ` – ` );return(e,t)=>(L(),q(V(cT),{class:z(o.value>0? ` cursor - pointer ` : ` ` ),role:o.value>0? ` link ` :void 0,tabindex:o.value>0?0:void 0,title:o.value>0? ` Open task details ` :void 0,onClick:c,onKeydown:[vt(gt(c,[ ` prevent ` ]),[ ` enter ` ]),vt(gt(c,[ ` prevent ` ]),[ ` space ` ])]},{default:I(()=>[A(V(sT),{class: ` font - medium ` },{default:I(()=>[H(B(V(vT)({...r.event,at:void 0,detail:void 0}).title),1)]),_:1}),A(V(sT),{class: ` font - mono ` },{default:I(()=>[H(B(o.value>0? ` # $ { o . value } ` : ` – ` ),1)]),_:1}),A(V(sT),{class: ` w - [ 55 % ] max - w - 0 ` },{default:I(()=>[R( ` span ` ,{class: ` block truncate ` ,title:s.value.truncated?s.value.full:void 0},B(s.value.text),9,Iie)]),_:1}),A(V(sT),null,{default:I(()=>[H(B(l.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),Lie=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function bT(e){return(Number(e?.task_id)||0)>0}function Rie(e,t){return t=== ` tasks ` ?bT(e):t!== ` system ` ||!bT(e)}function zie(e,t){return e.filter(e=>Rie(e,t))}function Bie(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function Vie(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function Hie(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=Vie(mT(n).text,r),a=t[t.length-1];a&&a.key===i?(a.count+=1,a.events.push(n)):t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var Uie={key:0,class: ` font - normal text - fg - subtle ` },Wie={role: ` region ` ,"aria-label": ` Activity ` ,"aria-
Line truncated
` ,1)[0]?? ` ` ;return t.length>80? ` $ { t . slice ( 0 , 79 ) } … ` :t}function SE(e){return(e?.merged||0)+(e?.completed||0)}function CE(e){return Object.entries(e?.inputs??{}).map(([e,t])=>({name:e,type:t.type,required:t.required===!0})).sort((e,t)=>e.name.localeCompare(t.name))}function wE(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function TE(e,t){switch(t){case ` number ` :{let t=e.trim();return t!== ` ` &&!Number.isNaN(Number(t))?Number(t):e}case ` bool ` :return e=== ` true ` ||e!== ` false ` &&e;case ` string ` :return e;default:try{return JSON.parse(e)}catch{return e}}}function EE(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!== ` ` &&(n[r.name]=TE(e,r.type))}return n}var DE=[ ` onKeydown ` ],OE={key:0,class: ` text - sm text - danger ` ,role: ` alert ` },kE={key:1,class: ` grid gap - 1.5 ` },AE=[ ` for ` ],jE={key:0,class: ` font - normal text - fg - subtle ` },ME=[ ` id ` ],NE=[ ` value ` ],PE={key:0,class: ` text - xs text - fg - subtle ` },FE={key:2,class: ` grid gap - 1.5 ` },IE=[ ` id ` ],LE={class: ` block truncate text - label font - medium ` },RE={class: ` block text - xs text - fg - subtle ` },zE={key:0,class: ` text - xs text - fg - subtle ` },BE={key:3,class: ` grid gap - 3 ` },VE=[ ` for ` ],HE={class: ` font - mono ` },UE={key:0,class: ` text - fg - subtle ` },WE={class: ` grid gap - 1.5 ` },GE=[ ` for ` ],KE={class: ` grid gap - 1.5 ` },qE=[ ` for ` ],JE={key:4,class: ` text - sm text - danger ` ,role: ` alert ` },YE={class: ` flex items - center gap - 2 border - t border - border pt - 4 ` },XE={class: ` mr - auto text - xs text - fg - subtle ` },ZE=P({__name: ` NewTaskForm ` ,props:{workflow:{},draft:{},initialWorkflow:{},initialInstructions:{}},emits:[ ` started ` , ` cancel ` ],setup(e,{emit:t}){let n=e,r=t,i=De(),a=J([]),o=J([]),s=J([]),c=J( ` ` );Ue(async()=>{try{let[e,t]=await Promise.all([Z.workflows(),Z.repositories()]);a.value=(e?.definitions??[]).filter(e=>e.enabled),o.value=e?.workflows??[],s.value=(t??[]).map(e=> ` $ { e . owner } / $ { e . name } ` )}catch(e){c.value=String(e.message||e)}});let l=J( ` ` ),u=J(n.workflow??n.initialWorkflow?? ` ` ),d=J(n.initialInstructions?? ` ` ),f=J(xE(d.value)),p=J({});Ee(()=>{!u.value&&a.value[0]&&(u.value=a.value[0].id)});let m=Y(()=>a.value.find(e=>e.id===u.value)),h=Y(()=>CE(m.value)),g=Y(()=>wE(h.value,p.value)),_=Y(()=>m.value?.repository?? ` required ` ),v=Y(()=>_.value!== ` optional ` &&_.value!== ` none ` ),y=e=>o.value.find(t=>t.workflow===e),b=J(!1),x=J( ` ` ),S=Y(()=>!(!l.value.trim()&&v.value||!u.value||!f.value.trim())&&g.value.length===0);async function C(){if(S.value&&!b.value){b.value=!0,x.value= ` ` ;try{let e=await Z.workRequest({repository:_.value=== ` none ` ? ` ` :l.value.trim(),workflow:u.value,title:f.value.trim(),instructions:d.value,inputs:EE(h.value,p.value),...n.draft?{draft:n.draft}:{}});r( ` started ` ,e.task_id)}catch(e){x.value=String(e.message||e)}finally{b.value=!1}}}return(e,t)=>(L(),j( ` form ` ,{class: ` grid gap - 5 ` ,onSubmit:gt(C,[ ` prevent ` ]),onKeydown:[vt(gt(C,[ ` meta ` , ` prevent ` ]),[ ` enter ` ]),vt(gt(C,[ ` ctrl ` , ` prevent ` ]),[ ` enter ` ])]},[c.value?(L(),j( ` p ` ,OE,B(c.value),1)):F( ` ` ,!0),_.value=== ` none ` ?F( ` ` ,!0):(L(),j( ` div ` ,kE,[R( ` label ` ,{for: ` $ { V ( i ) } - repo ` ,class: ` text - label font - medium ` },[t[5]||=H( ` Repository ` ,-1),v.value?F( ` ` ,!0):(L(),j( ` span ` ,jE, ` ( optional ) ` ))],8,AE),A(V(Q),{id: ` $ { V ( i ) } - repo ` ,modelValue:l.value,"onUpdate:modelValue":t[0]||=e=>l.value=e,class: ` font - mono ` ,placeholder: ` owner / repository ` ,list: ` $ { V ( i ) } - repos ` ,required:v.value},null,8,[ ` id ` , ` modelValue ` , ` list ` , ` required ` ]),R( ` datalist ` ,{id: ` $ { V ( i ) } - repos ` },[(L(!0),j(U,null,M(s.value,e=>(L(),j( ` option ` ,{key:e,value:e},null,8,NE))),128))],8,ME),s.value.length?(L(),j( ` p ` ,PE,[t[6]||=H( ` Configured : ` ,-1),(L(!0),j(U,null,M(s.value,e=>(L(),q(V(X),{key:e,type: ` button ` ,variant: ` link ` ,size: ` xs ` ,class: ` h - auto px - 1 font - mono text - fg - subtle ` ,onClick:t=>l.value=e},{default:I(()=>[H(B(e),1)]),_:2},1032,[ ` onClick ` ]))),128))])):F( ` ` ,!0)])),n.workflow?F( ` ` ,!0):(L(),j( ` div ` ,FE,[R( ` span ` ,{id: ` $ { V ( i ) } - wf ` ,class: ` text - label font - medium ` }, ` Workflow ` ,8,IE),A(V(Es),{modelValue:u.value,"onUpdate:modelValue":t[1]||=e=>u.value=e,"aria-labelledby": ` $ { V ( i ) } - wf ` ,class: ` grid grid - cols - 1 gap - 2 sm : grid - cols - 3 ` ,loop: ` ` },{default:I(()=>[(L(!0),j(U,null,M(a.value,e=>(L(),q(V(Os),{key:e.id,value:e.id,class: ` rounded - md border border - border bg - card px - 3 py - 2.5 text - left transition - colors hover : bg - secondary focus - visible : outline - 2 focus - visible : outline - ring data - [ state = checked ] : border - primary data - [ state = checked ] : bg - secondary ` },{default:I(()=>[R( ` span ` ,LE,B(e.name||e.id),1),R( ` span ` ,RE,[H(B(y(e.id)?.runs||0)+ ` runs ` ,1),y(e.id)?.runs?(L(),j(U,{key:0},[H( ` · ` +B(Math.round(V(SE)(y(e.id))/(y(e.id)?.runs||1)*100))+ ` % delivered ` ,1)],64)):F( ` ` ,!0)])]),_:2},1032,[ ` value ` ]))),128))]),_:1},8,[ ` modelValue ` , ` aria - labelledby ` ]),!a.value.length&&!c.value?(L(),j( ` p ` ,zE, ` No enabled workflows . ` )):F( ` ` ,!0)])),h.value.length?(L(),j( ` div ` ,BE,[(L(!0),j(U,null,M(h.value,e=>(L(),j( ` div ` ,{key:e.name,class: ` grid gap - 1.5 ` },[R( ` label ` ,{for: ` $ { V ( i ) } - input - $ { e . name } ` ,class: ` text - label font - medium ` },[R( ` span ` ,HE,B(e.name),1),e.required?(L(),j( ` span ` ,UE, ` · required ` )):F( ` ` ,!0)],8,VE),A(V(Q),{id: ` $ { V ( i ) } - input - $ { e . name } ` ,"model-value":p.value[e.name
Line truncated
` )){let e=n.indexOf( ` : ` );if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function pD(e,t){if(!e.event_type)return{label: ` Unidentified ` ,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name: ` Deleted type ` ,identified:!0}}function mD(e,t){if(!e)return ` No event type ` ;let n=t.find(t=>t.id===e);return n? ` $ { n . source } / $ { n . name } ` : ` Deleted type ` }function hD(e){let t=[...(e.headers||[]).map(e=> ` $ { e . name } = $ { e . value } ` ),...(e.payload||[]).map(e=>e.op=== ` present ` ? ` $ { e . path } present ` : ` $ { e . path } = $ { e . value ? ? ` ` } ` )];return t.length?t.join( ` · ` ): ` any event ` }function gD(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!== ` ` ).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!== ` ` ).map(e=>e.op=== ` present ` ?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value?? ` ` })}}var _D=J([]),vD=J([]),yD=J(!0),bD=J(null),xD=J(!0),SD=J(null),CD=J(!1),wD=J(null);async function TD(){try{let e=await Z.eventTypes(dD().workspace);yD.value=e.enabled!==!1,_D.value=e.event_types||[],vD.value=e.proposals||[],bD.value=null}catch(e){bD.value=e.message||String(e)}finally{xD.value=!1}}function ED(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function DD(e){wD.value=null,SD.value=e}function OD(e){let t=ID.value.find(t=>String(t.id)===e.sample_id);DD({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:ED(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function kD(e= ` ` ){DD({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function AD(e){DD({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:ED(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function jD(){SD.value=null}async function MD(){let e=SD.value;if(e){CD.value=!0;try{if(e.mode=== ` edit ` &&e.id)await Z.eventTypeUpdate(e.id,{name:e.name,rule:gD(e.rule)});else{let t=e.mode=== ` paste ` ?fD(e.headersText):e.exampleHeaders;await Z.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:gD(e.rule),example:{headers:t,body:e.body}})}SD.value=null,await TD()}catch(e){wD.value=e.message||String(e)}finally{CD.value=!1}}}var ND=J(null);async function PD(){let e=ND.value;if(ND.value=null,e)try{await Z.eventTypeDelete(e.id),await TD()}catch(e){bD.value=e.message||String(e)}}var FD=100,ID=J([]),LD=J(!0),RD=J(null),zD=J(!0),BD=J(null);async function VD(){try{let e=await Z.captures(FD);LD.value=e.enabled!==!1,ID.value=e.captures||[],RD.value=null}catch(e){RD.value=e.message||String(e)}finally{zD.value=!1}}function HD(e){let t=ID.value.find(t=>t.id===e);return t&&(BD.value=t),!!t}function UD(){ID.value.length&&(BD.value=ID.value[0])}function WD(){UC( ` captures ` ,()=>{VD(),TD()})}var GD=P({__name: ` Tabs ` ,props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[ ` update : modelValue ` ],setup(e,{emit:t}){let n=e,r=t,i=dt(n, ` class ` ),a=ue(i,r);return(e,t)=>(L(),q(V(xc),G({"data-slot": ` tabs ` ,"data-orientation":V(a).orientation|| ` horizontal ` },V(a),{class:V(W)( ` gap - 2 group / tabs flex data - horizontal : flex - col ` ,n.class)}),{default:I(t=>[K(e. $ slots, ` default ` ,Xe(Ce(t)))]),_:3},16,[ ` data - orientation ` , ` class ` ]))}}),KD=P({__name: ` TabsContent ` ,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=dt(t, ` class ` );return(e,r)=>(L(),q(V(wc),G({"data-slot": ` tabs - content ` ,class:V(W)( ` text - sm flex - 1 outline - none ` ,t.class)},V(n)),{default:I(()=>[K(e. $ slots, ` default ` )]),_:3},16,[ ` class ` ]))}}),qD=P({__name: ` TabsList ` ,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{default: ` default ` }},setup(e){let t=e,n=dt(t, ` class ` , ` variant ` );return(r,i)=>(L(),q(V(Tc),G({"data-slot": ` tabs - list ` ,"data-variant":e.variant},V(n),{class:V(W)(V(YD)({variant:e.variant}),t.class)}),{default:I(()=>[K(r. $ slots, ` default ` )]),_:3},16,[ ` data - variant ` , ` class ` ]))}}),JD=P({__name: ` TabsTrigger ` ,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=dt(t, ` class ` ),r=pe(n);return(e,n)=>(L(),q(V(Ec),G({"data-slot": ` tabs - trigger ` ,class:V(W)( ` gap - 1.5 rounded - md border border - transparent px - 1.5 py - 0.5 text - sm font - medium group - data - [ variant = default ] / tabs - list : data - active : shadow - sm group - data - [ variant = line ] / tabs - list : data - active : shadow - none [ & _svg : not ( [ class *= size - ] ) ] : size - 4 has - data - [ icon = inline - end ] : pr - 1 has - data - [ icon = inline - start ] : pl - 1 relative inline - flex h - [ calc ( 100 % - 1 px ) ] flex - 1 items - center justify - center whitespace - nowrap text - foreground / 60 transition - all group - data - vertical / tabs : w - full group - data - vertical / tabs : justify - start hover : text - foreground focus - visible : border - ring focus - visible : ring - 3 focus - visible : ring - ring / 50 focus - visible : outline - 1 focus - visible Line truncated
WARNING : This link could potentially be dangerous ` )){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn( ` Opening link blocked as opener could not be cleared ` )}}var _ B=r B( ` CharSizeService ` ),v B=r B( ` CoreBrowserService ` ),y B=r B( ` MouseService ` ),b B=r B( ` RenderService ` ),x B=r B( ` SelectionService ` ),S B=r B( ` CharacterJoinerService ` ),C B=r B( ` ThemeService ` ),w B=r B( ` LinkProviderService ` ),T B=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?j B.isErrorNoTelemetry(e)?new j B(e.message+ `
WARNING : This link could potentially be dangerous ` )){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn( ` Opening link blocked as opener could not be cleared ` )}}var w B=u B( ` CharSizeService ` ),T B=u B( ` CoreBrowserService ` ),E B=u B( ` MouseService ` ),D B=u B( ` RenderService ` ),O B=u B( ` SelectionService ` ),k B=u B( ` CharacterJoinerService ` ),A B=u B( ` ThemeService ` ),j B=u B( ` LinkProviderService ` ),M B=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?R B.isErrorNoTelemetry(e)?new R B(e.message+ `
` +e.stack):Error(e.message+ `
` +e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function EB(e){OB(e)||TB.onUnexpectedError(e)}var DB= ` Canceled ` ;function OB(e){return e instanceof kB||e instanceof Error&&e.name===DB&&e.message===DB}var kB=class extends Error{constructor(){super(DB),this.name=this.message}};function AB(e){return Error(e? ` Illegal argument : $ { e } ` : ` Illegal argument ` )}var jB=class e extends Error{constructor(e){super(e),this.name= ` CodeExpectedError ` }static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name=== ` CodeExpectedError ` }},MB=class e extends Error{constructor(t){super(t|| ` An unexpected bug occurred . ` ),Object.setPrototypeOf(this,e.prototype)}};function NB(e,t=0){return e[e.length-(1+t)]}var PB;(e=>{function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(PB||={});var FB=class e{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>!e(n)||(t=n,!1)),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||PB.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};FB.empty=new FB(e=>{});function IB(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var LB;(e=>{function t(e){return e&&typeof e== ` object ` &&typeof e[Symbol.iterator]== ` function ` }e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e||n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){for(let n of e)if(t(n))return n}e.find=d;function*f(e,t){for(let n of e)t(n)&&(yield n)}e.filter=f;function*p(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=p;function*m(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=m;function*h(...e){for(let t of e)yield*t}e.concat=h;function g(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=g;function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t<n;t++)yield e[t]}e.slice=_;function v(t,n=1/0){let r=[];if(n===0)return[r,t];let i=t[Symbol.iterator]();for(let t=0;t<n;t++){let t=i.next();if(t.done)return[r,e.empty()];r.push(t.value)}return[r,{[Symbol.iterator](){return i}}]}e.consume=v;async function y(e){let t=[];for await(let n of e)t.push(n);return Promise.resolve(t)}e.asyncToArray=y})(LB||={});var RB=null;function zB(e){return RB?.trackDisposable(e),e}function BB(e){RB?.markAsDisposed(e)}function VB(e,t){RB?.setParent(e,t)}function HB(e){return RB?.markAsSingleton(e),e}function UB(e){if(LB.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t, ` Encountered errors while disposing of store ` );return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function WB(...e){return GB(()=>UB(e))}function GB(e){let t=zB({dispose:IB(()=>{BB(t),e()})});return t}var KB=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,zB(this)}dispose(){this._isDisposed||(BB(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{UB(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error( ` Cannot register a disposable on itself ! ` );return VB(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error( ` Trying to add a disposable to a DisposableStore that has already been disposed of . The added object will be leaked ! ` ).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error( ` Cannot dispose a disposable on itself ! ` );this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),VB(e,null))}};KB.DISABLE_DISPOSED_WARNING=!1;var qB=KB,JB=class{constructor(){this._store=new qB,zB(this),VB(this._store,this)}dispose(){BB(thi
Line truncated
` +e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function NB(e){FB(e)||MB.onUnexpectedError(e)}var PB= ` Canceled ` ;function FB(e){return e instanceof IB||e instanceof Error&&e.name===PB&&e.message===PB}var IB=class extends Error{constructor(){super(PB),this.name=this.message}};function LB(e){return Error(e? ` Illegal argument : $ { e } ` : ` Illegal argument ` )}var RB=class e extends Error{constructor(e){super(e),this.name= ` CodeExpectedError ` }static fromError(t){if(t instanceof e)return t;let n=new e;return n.message=t.message,n.stack=t.stack,n}static isErrorNoTelemetry(e){return e.name=== ` CodeExpectedError ` }},zB=class e extends Error{constructor(t){super(t|| ` An unexpected bug occurred . ` ),Object.setPrototypeOf(this,e.prototype)}};function BB(e,t=0){return e[e.length-(1+t)]}var VB;(e=>{function t(e){return e<0}e.isLessThan=t;function n(e){return e<=0}e.isLessThanOrEqual=n;function r(e){return e>0}e.isGreaterThan=r;function i(e){return e===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(VB||={});var HB=class e{constructor(e){this.iterate=e}forEach(e){this.iterate(t=>(e(t),!0))}toArray(){let e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(t){return new e(e=>this.iterate(n=>!t(n)||e(n)))}map(t){return new e(e=>this.iterate(n=>e(t(n))))}some(e){let t=!1;return this.iterate(n=>(t=e(n),!t)),t}findFirst(e){let t;return this.iterate(n=>!e(n)||(t=n,!1)),t}findLast(e){let t;return this.iterate(n=>(e(n)&&(t=n),!0)),t}findLastMaxBy(e){let t,n=!0;return this.iterate(r=>((n||VB.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};HB.empty=new HB(e=>{});function UB(e,t){let n=this,r=!1,i;return function(){if(r)return i;if(r=!0,t)try{i=e.apply(n,arguments)}finally{t()}else i=e.apply(n,arguments);return i}}var WB;(e=>{function t(e){return e&&typeof e== ` object ` &&typeof e[Symbol.iterator]== ` function ` }e.is=t;let n=Object.freeze([]);function r(){return n}e.empty=r;function*i(e){yield e}e.single=i;function a(e){return t(e)?e:i(e)}e.wrap=a;function o(e){return e||n}e.from=o;function*s(e){for(let t=e.length-1;t>=0;t--)yield e[t]}e.reverse=s;function c(e){return!e||e[Symbol.iterator]().next().done===!0}e.isEmpty=c;function l(e){return e[Symbol.iterator]().next().value}e.first=l;function u(e,t){let n=0;for(let r of e)if(t(r,n++))return!0;return!1}e.some=u;function d(e,t){for(let n of e)if(t(n))return n}e.find=d;function*f(e,t){for(let n of e)t(n)&&(yield n)}e.filter=f;function*p(e,t){let n=0;for(let r of e)yield t(r,n++)}e.map=p;function*m(e,t){let n=0;for(let r of e)yield*t(r,n++)}e.flatMap=m;function*h(...e){for(let t of e)yield*t}e.concat=h;function g(e,t,n){let r=n;for(let n of e)r=t(r,n);return r}e.reduce=g;function*_(e,t,n=e.length){for(t<0&&(t+=e.length),n<0?n+=e.length:n>e.length&&(n=e.length);t<n;t++)yield e[t]}e.slice=_;function v(t,n=1/0){let r=[];if(n===0)return[r,t];let i=t[Symbol.iterator]();for(let t=0;t<n;t++){let t=i.next();if(t.done)return[r,e.empty()];r.push(t.value)}return[r,{[Symbol.iterator](){return i}}]}e.consume=v;async function y(e){let t=[];for await(let n of e)t.push(n);return Promise.resolve(t)}e.asyncToArray=y})(WB||={});var GB=null;function KB(e){return GB?.trackDisposable(e),e}function qB(e){GB?.markAsDisposed(e)}function JB(e,t){GB?.setParent(e,t)}function YB(e){return GB?.markAsSingleton(e),e}function XB(e){if(WB.is(e)){let t=[];for(let n of e)if(n)try{n.dispose()}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t, ` Encountered errors while disposing of store ` );return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function ZB(...e){return QB(()=>XB(e))}function QB(e){let t=KB({dispose:UB(()=>{qB(t),e()})});return t}var $ B=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,KB(this)}dispose(){this._isDisposed||(qB(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{XB(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error( ` Cannot register a disposable on itself ! ` );return JB(t,this),this._isDisposed?e.DISABLE_DISPOSED_WARNING||console.warn(Error( ` Trying to add a disposable to a DisposableStore that has already been disposed of . The added object will be leaked ! ` ).stack):this._toDispose.add(t),t}delete(e){if(e){if(e===this)throw Error( ` Cannot dispose a disposable on itself ! ` );this._toDispose.delete(e),e.dispose()}}deleteAndLeak(e){e&&this._toDispose.has(e)&&(this._toDispose.delete(e),JB(e,null))}}; $ B.DISABLE_DISPOSED_WARNING=!1;var eV= $ B,tV=class{constructor(){this._store=new eV,KB(this),JB(this._store,this)}dispose(){qB(thi
Line truncated
` ).slice(2).join( `
` ))}},lV=class extends Error{constructor(e,t){super(e),this.name= ` ListenerLeakError ` ,this.stack=t}},uV=class extends Error{constructor(e,t){super(e),this.name= ` ListenerRefusalError ` ,this.stack=t}},dV=0,fV=class{constructor(e){this.value=e,this.id=dV++}},pV=2,mV=class{constructor(e){this._size=0,this._options=e,this._leakageMon=aV>0||this._options?.leakWarningThreshold?new sV(e?.onListenerError??EB,this._options?.leakWarningThreshold??aV):void 0,this._perfMon=this._options?._profName?new iV(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e= ` [ $ { this . _leakageMon . name } ] REFUSES to accept new listeners because it exceeded its threshold by far ( $ { this . _size } vs $ { this . _leakageMon . threshold } ) ` ;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[ ` UNKNOWN stack ` ,-1],n=new uV( ` $ { e } . HINT : Stack shows most frequent listener ( $ { t [ 1 ] } - times ) ` ,t[0]);return(this._options?.onListenerError||EB)(n),JB.None}if(this._disposed)return JB.None;t&&(e=e.bind(t));let r=new fV(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=cV.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof fV?(this._deliveryQueue??=new hV,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=GB(()=>{i?.(),this._removeListener(r)});return n instanceof qB?n.add(a):Array.isArray(n)&&n.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log( ` disposed ? ` ,this._disposed),console.log( ` size ? ` ,this._size),console.log( ` arr ? ` ,JSON.stringify(this._listeners)),Error( ` Attempted to dispose unknown listener ` );this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*pV<=t.length){let e=0;for(let n=0;n<t.length;n++)t[n]?t[e++]=t[n]:r&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=e}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||EB;if(!n)e.value(t);else try{e.value(t)}catch(e){n(e)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners){if(this._listeners instanceof fV)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}}this._perfMon?.stop()}hasListeners(){return this._size>0}},hV=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},gV=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new mV,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new mV,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};gV.INSTANCE=new gV;var _V=gV;function vV(e,t,n){typeof t== ` string ` &&(t=e.matchMedia(t)),t.addEventListener( ` change ` ,n)}_V.INSTANCE.onDidChangeZoomLevel;function yV(e){return _V.INSTANCE.getZoomFactor(e)}_V.INSTANCE.onDidChangeFullscreen;var bV=typeof navigator== ` object ` ?navigator.userAgent: ` ` ,xV=bV.indexOf( ` Firefox ` )>=0,SV=bV.indexOf( ` AppleWebKit ` )>=0,CV=bV.indexOf( ` Chrome ` )>=0,wV=!CV&&bV.indexOf( ` Safari ` )>=0;bV.indexOf( ` Electron / ` ),bV.indexOf( ` Android ` );var TV=!1;if(typeof XB.matchMedia== ` function ` ){let e=XB.matchMedia( ` ( display - mode : standalone ) or ( display - mode : window - controls - overlay ) ` ),t=XB.matchMedia( ` ( display - mode : fullscreen ) ` );TV=e.matches,vV(XB,e,({matches:e})=>{TV&&t.matches||(TV=e)}
Line truncated
` )})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(e=>this._handleScroll(e)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};xU=jz([Mz(2,aB),Mz(3,vB),Mz(4,oB),Mz(5,CB),Mz(6,dB),Mz(7,bB)],xU);var SU=class extends JB{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement( ` div ` ),this._container.classList.add( ` xterm - decoration - container ` ),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(e=>this._removeDecoration(e))),this._register(GB(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement( ` div ` );t.classList.add( ` xterm - decoration ` ),t.classList.toggle( ` xterm - decoration - top - layer ` ,e?.options?.layer=== ` top ` ),t.style.width= ` $ { Math . round ( ( e . options . width || 1 ) * this . _renderService . dimensions . css . cell . width ) } px ` ,t.style.height= ` $ { ( e . options . height || 1 ) * this . _renderService . dimensions . css . cell . height } px ` ,t.style.top= ` $ { ( e . marker . line - this . _bufferService . buffers . active . ydisp ) * this . _renderService . dimensions . css . cell . height } px ` ,t.style.lineHeight= ` $ { this . _renderService . dimensions . css . cell . height } px ` ;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display= ` none ` ),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display= ` none ` ,e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive? ` none ` : ` block ` ,this._altBufferIsActive||(n.style.width= ` $ { Math . round ( ( e . options . width || 1 ) * this . _renderService . dimensions . css . cell . width ) } px ` ,n.style.height= ` $ { ( e . options . height || 1 ) * this . _renderService . dimensions . css . cell . height } px ` ,n.style.top= ` $ { t * this . _render Line truncated
` ,e.VT= ` \ v ` ,e.FF= ` \ f ` ,e.CR= ` \ r ` ,e.SO= ` ` ,e.SI= ` ` ,e.DLE= ` ` ,e.DC1= ` ` ,e.DC2= ` ` ,e.DC3= ` ` ,e.DC4= ` ` ,e.NAK= ` ` ,e.SYN= ` ` ,e.ETB= ` ` ,e.CAN= ` ` ,e.EM= ` ` ,e.SUB= ` ` ,e.ESC= ` \ x1B ` ,e.FS= ` ` ,e.GS= ` ` ,e.RS= ` ` ,e.US= ` ` ,e.SP= ` ` ,e.DEL= ` ` ))( $ ||={});var OU;(e=>(e.PAD= ` ` ,e.HOP= ` ` ,e.BPH= ` ` ,e.NBH= ` ` ,e.IND= ` ` ,e.NEL= `
` ,e.SSA= ` ` ,e.ESA= ` ` ,e.HTS= ` ` ,e.HTJ= ` ` ,e.VTS= ` ` ,e.PLD= ` ` ,e.PLU= ` ` ,e.RI= ` ` ,e.SS2= ` ` ,e.SS3= ` ` ,e.DCS= ` ` ,e.PU1= ` ` ,e.PU2= ` ` ,e.STS= ` ` ,e.CCH= ` ` ,e.MW= ` ` ,e.SPA= ` ` ,e.EPA= ` ` ,e.SOS= ` ` ,e.SGCI= ` ` ,e.SCI= ` ` ,e.CSI= ` ` ,e.ST= ` ` ,e.OSC= ` ` ,e.PM= ` ` ,e.APC= ` ` ))(OU||={});var kU;(e=>e.ST= ` $ { $ . ESC } \ \ ` )(kU||={});var AU=class{constructor(e,t,n,r,i,a){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent= ` ` }get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent= ` ` ,this._dataAlreadySent= ` ` ,this._compositionView.classList.add( ` active ` )}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(e){if(this._compositionView.classList.remove( ` active ` ),this._isComposing=!1,e){let e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let t;e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,this._compositionPosition.start):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;let e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e, ` ` );this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent( ` $ { $ . DEL } ` ,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),t=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=e*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+ ` px ` ,this._compositionView.style.top=n+ ` px ` ,this._compositionView.style.height=t+ ` px ` ,this._compositionView.style.lineHeight=t+ ` px ` ,this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+ ` px ` ;let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+ ` px ` ,this._textarea.style.top=n+ ` px ` ,this._textarea.style.width=Math.max(i.width,1)+ ` px ` ,this._textarea.style.height=Math.max(i.height,1)+ ` px ` ,this._textarea.style.lineHeight=i.height+ ` px ` }e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};AU=jz([Mz(2,aB),Mz(3,dB),Mz(4,sB),Mz(5,bB)],AU);var jU=0,MU=0,NU=0,PU=0,FU={css: ` # 00000000 ` ,rgba:0},IU;(e=>{function t(e,t,n,r){return r===void 0? ` # $ { VU ( e ) } $ { VU ( t ) } $ { VU ( n ) } ` : ` # $ { VU ( e ) } $ { VU ( t ) } $ { VU ( n ) } $ { VU ( r ) } ` }e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(IU||={});var LU;(e=>{function t(e,t){if(PU=(t.rgba&255)/255,PU===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return jU=a+Math.round((n-a)*PU),MU=o+Math.round((r-o)*PU),NU=s+Math.round((i-s)*PU),{css:IU.toCss(jU,MU,NU),rgba:IU.toRgba(jU,MU,NU)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=BU.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return IU.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[jU,MU,NU]=BU.toChannels(t),{css:IU.toCss(jU,MU,NU),rgba:t}}e.opaque=i;function a(e,t){return PU=Math.round(t*255),[jU,MU,NU]=BU.toChannels(e.rgba),{css:IU.toCss(jU,MU,NU,PU),rgba:IU.toRgba(jU,MU,NU,PU)}}e.opacity=a;function o(e,t){return PU=e.rgba&255,a(e,PU*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.r
Line truncated
` ))}},gV=class extends Error{constructor(e,t){super(e),this.name= ` ListenerLeakError ` ,this.stack=t}},_V=class extends Error{constructor(e,t){super(e),this.name= ` ListenerRefusalError ` ,this.stack=t}},vV=0,yV=class{constructor(e){this.value=e,this.id=vV++}},bV=2,xV=class{constructor(e){this._size=0,this._options=e,this._leakageMon=fV>0||this._options?.leakWarningThreshold?new mV(e?.onListenerError??NB,this._options?.leakWarningThreshold??fV):void 0,this._perfMon=this._options?._profName?new dV(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){this._disposed||(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose())}get event(){return this._event??=(e,t,n)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let e= ` [ $ { this . _leakageMon . name } ] REFUSES to accept new listeners because it exceeded its threshold by far ( $ { this . _size } vs $ { this . _leakageMon . threshold } ) ` ;console.warn(e);let t=this._leakageMon.getMostFrequentStack()??[ ` UNKNOWN stack ` ,-1],n=new _V( ` $ { e } . HINT : Stack shows most frequent listener ( $ { t [ 1 ] } - times ) ` ,t[0]);return(this._options?.onListenerError||NB)(n),tV.None}if(this._disposed)return tV.None;t&&(e=e.bind(t));let r=new yV(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=hV.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof yV?(this._deliveryQueue??=new SV,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=QB(()=>{i?.(),this._removeListener(r)});return n instanceof eV?n.add(a):Array.isArray(n)&&n.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,n=t.indexOf(e);if(n===-1)throw console.log( ` disposed ? ` ,this._disposed),console.log( ` size ? ` ,this._size),console.log( ` arr ? ` ,JSON.stringify(this._listeners)),Error( ` Attempted to dispose unknown listener ` );this._size--,t[n]=void 0;let r=this._deliveryQueue.current===this;if(this._size*bV<=t.length){let e=0;for(let n=0;n<t.length;n++)t[n]?t[e++]=t[n]:r&&(this._deliveryQueue.end--,e<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=e}}_deliver(e,t){if(!e)return;let n=this._options?.onListenerError||NB;if(!n)e.value(t);else try{e.value(t)}catch(e){n(e)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners){if(this._listeners instanceof yV)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}}this._perfMon?.stop()}hasListeners(){return this._size>0}},SV=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,n){this.i=0,this.end=n,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},CV=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new xV,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new xV,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};CV.INSTANCE=new CV;var wV=CV;function TV(e,t,n){typeof t== ` string ` &&(t=e.matchMedia(t)),t.addEventListener( ` change ` ,n)}wV.INSTANCE.onDidChangeZoomLevel;function EV(e){return wV.INSTANCE.getZoomFactor(e)}wV.INSTANCE.onDidChangeFullscreen;var DV=typeof navigator== ` object ` ?navigator.userAgent: ` ` ,OV=DV.indexOf( ` Firefox ` )>=0,kV=DV.indexOf( ` AppleWebKit ` )>=0,AV=DV.indexOf( ` Chrome ` )>=0,jV=!AV&&DV.indexOf( ` Safari ` )>=0;DV.indexOf( ` Electron / ` ),DV.indexOf( ` Android ` );var MV=!1;if(typeof rV.matchMedia== ` function ` ){let e=rV.matchMedia( ` ( display - mode : standalone ) or ( display - mode : window - controls - overlay ) ` ),t=rV.matchMedia( ` ( display - mode : fullscreen ) ` );MV=e.matches,TV(rV,e,({matches:e})=>{MV&&t.matches||(MV=e)}
Line truncated
` )})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(e=>this._handleScroll(e)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),n=t-this._bufferService.buffer.ydisp;n!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(n)),this._isHandlingScroll=!1}};OU=Rz([zz(2,fB),zz(3,TB),zz(4,pB),zz(5,AB),zz(6,vB),zz(7,DB)],OU);var kU=class extends tV{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement( ` div ` ),this._container.classList.add( ` xterm - decoration - container ` ),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(e=>this._removeDecoration(e))),this._register(QB(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement( ` div ` );t.classList.add( ` xterm - decoration ` ),t.classList.toggle( ` xterm - decoration - top - layer ` ,e?.options?.layer=== ` top ` ),t.style.width= ` $ { Math . round ( ( e . options . width || 1 ) * this . _renderService . dimensions . css . cell . width ) } px ` ,t.style.height= ` $ { ( e . options . height || 1 ) * this . _renderService . dimensions . css . cell . height } px ` ,t.style.top= ` $ { ( e . marker . line - this . _bufferService . buffers . active . ydisp ) * this . _renderService . dimensions . css . cell . height } px ` ,t.style.lineHeight= ` $ { this . _renderService . dimensions . css . cell . height } px ` ;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display= ` none ` ),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display= ` none ` ,e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose(()=>{this._decorationElements.delete(e),n.remove()})),n.style.display=this._altBufferIsActive? ` none ` : ` block ` ,this._altBufferIsActive||(n.style.width= ` $ { Math . round ( ( e . options . width || 1 ) * this . _renderService . dimensions . css . cell . width ) } px ` ,n.style.height= ` $ { ( e . options . height || 1 ) * this . _renderService . dimensions . css . cell . height } px ` ,n.style.top= ` $ { t * this . _render Line truncated
` ,e.VT= ` \ v ` ,e.FF= ` \ f ` ,e.CR= ` \ r ` ,e.SO= ` ` ,e.SI= ` ` ,e.DLE= ` ` ,e.DC1= ` ` ,e.DC2= ` ` ,e.DC3= ` ` ,e.DC4= ` ` ,e.NAK= ` ` ,e.SYN= ` ` ,e.ETB= ` ` ,e.CAN= ` ` ,e.EM= ` ` ,e.SUB= ` ` ,e.ESC= ` \ x1B ` ,e.FS= ` ` ,e.GS= ` ` ,e.RS= ` ` ,e.US= ` ` ,e.SP= ` ` ,e.DEL= ` ` ))( $ ||={});var FU;(e=>(e.PAD= ` ` ,e.HOP= ` ` ,e.BPH= ` ` ,e.NBH= ` ` ,e.IND= ` ` ,e.NEL= `
` ,e.SSA= ` ` ,e.ESA= ` ` ,e.HTS= ` ` ,e.HTJ= ` ` ,e.VTS= ` ` ,e.PLD= ` ` ,e.PLU= ` ` ,e.RI= ` ` ,e.SS2= ` ` ,e.SS3= ` ` ,e.DCS= ` ` ,e.PU1= ` ` ,e.PU2= ` ` ,e.STS= ` ` ,e.CCH= ` ` ,e.MW= ` ` ,e.SPA= ` ` ,e.EPA= ` ` ,e.SOS= ` ` ,e.SGCI= ` ` ,e.SCI= ` ` ,e.CSI= ` ` ,e.ST= ` ` ,e.OSC= ` ` ,e.PM= ` ` ,e.APC= ` ` ))(FU||={});var IU;(e=>e.ST= ` $ { $ . ESC } \ \ ` )(IU||={});var LU=class{constructor(e,t,n,r,i,a){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent= ` ` }get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent= ` ` ,this._dataAlreadySent= ` ` ,this._compositionView.classList.add( ` active ` )}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(e){if(this._compositionView.classList.remove( ` active ` ),this._isComposing=!1,e){let e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let t;e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,this._compositionPosition.start):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}},0)}else{this._isSendingComposition=!1;let e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e, ` ` );this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent( ` $ { $ . DEL } ` ,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),t=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=e*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+ ` px ` ,this._compositionView.style.top=n+ ` px ` ,this._compositionView.style.height=t+ ` px ` ,this._compositionView.style.lineHeight=t+ ` px ` ,this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+ ` px ` ;let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+ ` px ` ,this._textarea.style.top=n+ ` px ` ,this._textarea.style.width=Math.max(i.width,1)+ ` px ` ,this._textarea.style.height=Math.max(i.height,1)+ ` px ` ,this._textarea.style.lineHeight=i.height+ ` px ` }e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};LU=Rz([zz(2,fB),zz(3,vB),zz(4,mB),zz(5,DB)],LU);var RU=0,zU=0,BU=0,VU=0,HU={css: ` # 00000000 ` ,rgba:0},UU;(e=>{function t(e,t,n,r){return r===void 0? ` # $ { JU ( e ) } $ { JU ( t ) } $ { JU ( n ) } ` : ` # $ { JU ( e ) } $ { JU ( t ) } $ { JU ( n ) } $ { JU ( r ) } ` }e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(UU||={});var WU;(e=>{function t(e,t){if(VU=(t.rgba&255)/255,VU===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return RU=a+Math.round((n-a)*VU),zU=o+Math.round((r-o)*VU),BU=s+Math.round((i-s)*VU),{css:UU.toCss(RU,zU,BU),rgba:UU.toRgba(RU,zU,BU)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=qU.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return UU.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[RU,zU,BU]=qU.toChannels(t),{css:UU.toCss(RU,zU,BU),rgba:t}}e.opaque=i;function a(e,t){return VU=Math.round(t*255),[RU,zU,BU]=qU.toChannels(e.rgba),{css:UU.toCss(RU,zU,BU,VU),rgba:UU.toRgba(RU,zU,BU,VU)}}e.opacity=a;function o(e,t){return VU=e.rgba&255,a(e,VU*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.r
Line truncated
` : `
` )}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh()),MW&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=tG(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=gW(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-nG),nG),t/=nG,t/Math.abs(t)+Math.round(t*(rG-1)))}shouldForceSelection(e){return OW?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener( ` mousemove ` ,this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener( ` mouseup ` ,this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),iG)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener( ` mousemove ` ,this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener( ` mouseup ` ,this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(OW&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._active
Line truncated
` ))),this._register(this._terminal.onA11yTab(e=>this._handleTab(e))),this._register(this._terminal.onKey(e=>this._handleKey(e.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(j H(i, ` selectionchange ` ,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(G B(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar( ` ` )}_handleChar(e){this._liveRegionLineCount<i q+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e=== `
` &&(this._liveRegionLineCount++,this._liveRegionLineCount===iq+1&&(this._liveRegion.textContent+=Iz.get())))}_clearLiveRegion(){this._liveRegion.textContent= ` ` ,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/ \p {Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)|| ` ` ,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent= ` \ xA0 ` ,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute( ` aria - posinset ` ,o),s.setAttribute( ` aria - setsize ` ,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce= ` ` )}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute( ` aria - posinset ` )===(t===0? ` 1 ` : ` $ { this . _terminal . buffer . lines . length } ` )||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener( ` focus ` ,this._topBoundaryFocusListener),a.removeEventListener( ` focus ` ,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement( ` afterbegin ` ,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener( ` focus ` ,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener( ` focus ` ,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error( ` anchorNode and / or focusNode are null ` );return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute( ` aria - posinset ` ),10)-1;if(isNaN(r))return console.warn( ` row is invalid . Race condition ? ` ),null;let i=this._rowColumns.get(n);if(!i)return console.warn( ` columns is null . Race condition ? ` ),null;let a=t<i.length?i[t]:i.slice(-1)[0]+1;return a>=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(a&&o){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error( ` invalid range ` );this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener( ` focus ` ,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener( ` focus ` ,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement( ` div ` );return e.setAttribute( ` role ` , ` listitem ` ),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width: ` $ { this . _renderService . dimensions . css . canvas . width } px ` ,fontSize: ` $ { this . _terminal . options . fontSize } px ` }),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height= ` $ { this . _renderService . dimensions . css . cell . height } px ` }_alignRowWidth(e){e.style.transform= ` ` ;let t=e.getBoundingClientRect().width,n=this._rowColumns.get(e)?.slice(-1)?.[0];if(!n)return;let
Line truncated
` ,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return Pz.get()},set promptLabel(e){Pz.set(e)},get tooMuchOutput(){return Iz.get()},set tooMuchOutput(e){Iz.set(e)}}}_verifyIntegers(...e){for(_q of e)if(_q===1/0||isNaN(_q)||_q%1!=0)throw Error( ` This API only accepts integers ` )}_verifyPositiveIntegers(...e){for(_q of e)if(_q&&(_q===1/0||isNaN(_q)||_q%1!=0||_q<0))throw Error( ` This API only accepts positive integers ` )}},yq=2,bq=1,xq=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue( ` height ` )),i=Math.max(0,parseInt(n.getPropertyValue( ` width ` ))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue( ` padding - top ` )),bottom:parseInt(a.getPropertyValue( ` padding - bottom ` )),right:parseInt(a.getPropertyValue( ` padding - right ` )),left:parseInt(a.getPropertyValue( ` padding - left ` ))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(yq,Math.floor(u/e.css.cell.width)),rows:Math.max(bq,Math.floor(l/e.css.cell.height))}}},Sq={class: ` flex h - [ 32 rem ] min - h - 0 flex - col gap - 2 ` },Cq={key:0,class: ` text - sm text - fg - muted ` ,role: ` status ` },wq=N({__name: ` SandboxView ` ,props:{taskId:{},attempt:{}},setup(e){let t=e,n=q(null),r=q( ` connecting ` ),i=null,a=null,o=null,s=null;function c(){try{o?.fit()}catch{}}return We(()=>{let e=n.value;if(!e)return;i=new vq({convertEol:!0,disableStdin:!0,cursorBlink:!1,fontFamily: ` 'IBM Plex Mono' , ui - monospace , monospace ` ,fontSize:13,theme:{background: ` # 0b0 f14 ` ,foreground: ` # e6edf3 ` }}),o=new xq,i.loadAddon(o),i.open(e),c();let l=window.location.protocol=== ` https : ` ? ` wss : ` : ` ws : ` ,u=new URLSearchParams({attempt:String(t.attempt)}),d=new WebSocket( ` $ { l } //${window.location.host}/api/tasks/${encodeURIComponent(t.taskId)}/sandbox?${u}`);a=d,d.binaryType=`arraybuffer`,d.onopen=()=>{r.value=`open`},d.onmessage=e=>{i&&(typeof e.data==`string`&&(r.value=`failed`),i.write(typeof e.data==`string`?e.data:new Uint8Array(e.data)))},d.onerror=()=>{r.value=`failed`},d.onclose=()=>{r.value!==`failed`&&(r.value=`closed`)},s=new ResizeObserver(c),s.observe(e)}),ot(()=>{s?.disconnect(),s=null,a?.close(),a=null,i?.dispose(),i=null,o=null}),(e,t)=>(I(),A(`div`,Sq,[r.value===`open`?P(``,!0):(I(),A(`p`,Cq,[r.value===`connecting`?(I(),A(H,{key:0},[V(`Connecting…`)],64)):r.value===`closed`?(I(),A(H,{key:1},[V(`The sandbox ended.`)],64)):(I(),A(H,{key:2},[V(`Sandbox unavailable.`)],64))])),L(`div`,{ref_key:`host`,ref:n,class:`min-h-0 flex-1 overflow-hidden rounded-md border border-border bg-[#0b0f14] p-2`},null,512)]))}}),Tq={class:`flex flex-wrap items-center gap-3 border-b border-border pb-3`},Eq={class:`inline-flex items-center gap-2`},Dq={class:`inline-flex items-center gap-2`},Oq=`__all__`,kq=N({__name:`TaskLogFilters`,props:{filters:{},stages:{}},emits:[`filter`],setup(e,{emit:t}){let n=e,r=t,i=J(()=>qj.map(e=>({value:e.value||Oq,label:e.label}))),a=J(()=>n.filters.level||Oq),o=J(()=>n.filters.stage||Oq);function s(e){r(`filter`,{...n.filters,...e})}function c(e){s({level:String(e)===Oq?``:String(e)})}function l(e){s({stage:String(e)===Oq?``:String(e)})}return(t,n)=>(I(),A(`div`,Tq,[L(`div`,Eq,[k(B(Tu),{"model-value":a.value,"onUpdate:modelValue":c},{default:F(()=>[k(B(ku),{size:`sm`,"aria-label":`Filter log entries by level`},{default:F(()=>[k(B(Au))]),_:1}),k(B(Eu),null,{default:F(()=>[k(B(Du),null,{default:F(()=>[(I(!0),A(H,null,j(i.value,e=>(I(),K(B(Ou),{key:e.value,value:e.value},{default:F(()=>[V(z(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])]),L(`div`,Dq,[k(B(Tu),{"model-value":o.value,"onUpdate:modelValue":l},{default:F(()=>[k(B(ku),{size:`sm`,"aria-label":`Filter log entries by stage`},{default:F(()=>[k(B(Au))]),_:1}),k(B(Eu),null,{default:F(()=>[k(B(Du),null,{default:F(()=>[k(B(Ou),{value:Oq},{default:F(()=>[...n[0]||=[V(`All stages`,-1)]]),_:1}),(I(!0),A(H,null,j(e.stages,e=>(I(),K(B(Ou),{key:e,value:e},{default:F(()=>[V(z(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])])]))}}),Aq={class:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`},jq={key:2,class:`flex flex-col items-start gap-2 py-3`},Mq={key:0,class:`mt-2 flex flex-wrap items-cent
Line truncated
` )}};PQ.defaultYaml={explicit:!1,version: ` 1.2 ` },PQ.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function FQ(e){if(/[ \x 00- \x 19 \s ,[ \] {}]/.test(e)){let t= ` Anchor must not contain whitespace or control characters : $ { JSON . stringify ( e ) } ` ;throw Error(t)}return!0}function IQ(e){let t=new Set;return DQ(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function LQ(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function RQ(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=IQ(e);let a=LQ(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(yQ(t.node)||xQ(t.node)))t.node.anchor=t.anchor;else{let t=Error( ` Failed to resolve repeated object ( this should not happen ) ` );throw t.source=e,t}}},sourceObjects:r}}function zQ(e,t,n,r){if(r&&typeof r== ` object ` ){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=zQ(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=zQ(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=zQ(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=zQ(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function BQ(e,t,n){if(Array.isArray(e))return e.map((e,t)=>BQ(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!CQ(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e== ` bigint ` &&!n?.keep?Number(e):e}var VQ=class{constructor(e){Object.defineProperty(this,mQ,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!gQ(e))throw TypeError( ` A document argument is required ` );let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n== ` number ` ?n:100},o=BQ(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?zQ(i,{"":o}, ` ` ,o):o}},HQ=class extends VQ{constructor(e){super(cQ),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error( ` Alias nodes cannot have tags ` )}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError( ` Alias resolution is disabled ` );let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],DQ(e,{Node:(e,t)=>{(hQ(t)||CQ(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(BQ(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError( ` This should not happen : Alias anchor was not resolved ? ` );if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=UQ(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError( ` Excessive alias count indicates a resource exhaustion attack ` )}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e= ` Unresolved alias ( the anchor must be set before the alias ) : $ { this . source } ` ;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r= ` * $ { this . source } ` ;if(e){if(FQ(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e= ` Unresolved alias ( the anchor must be set before the alias ) : $ { this . source } ` ;throw Error(e)}if(e.implicitKey)return ` $ { r } ` }return r}};function UQ(e,t,n){if(hQ(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(xQ(t)){let r=0;for(let i of t.items){let t=UQ(e,i,n);t>r&&(r=t)}return r}if(vQ(t)){let r=UQ(e,t.key,n),i=UQ(e,t.value,n);return Math.max(r,i)}return 1}var WQ=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,GQ=class extends VQ{constructor(e){super(fQ),this.value=e}toJSON(e,t){return t?.keep?this.value:BQ(this.value,e,t)}toString(){return String(this.value)}};GQ.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,GQ.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,GQ.PLAIN= ` PLAIN ` ,GQ.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,GQ.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var KQ= ` tag : yaml . org , 2002 : ` ;function qQ(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error( ` Tag $ { t } not found ` );return r}return n.find(t=>t.identify?.(e)&&!t.format)}function JQ(e,t,n){if(gQ(e)&&(e=e.contents),SQ(e))return e;if(vQ(e)){let t=n.schema[uQ].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt< ` u ` &&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e== ` object ` ){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new HQ(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=KQ+t.slice(2));let l=qQ(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new GQ(e);return c&&(c.node=t),t
Line truncated
` )? $ Q (n,t):n.includes(`
` )}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh()),zW&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r||!t?!1:this._areCoordsInSelection(t,n,r)}isCellInSelection(e,t){let n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!n||!r?!1:this._areCoordsInSelection([e,t],n,r)}_areCoordsInSelection(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let n=this._linkifier.currentLink?.link?.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=cG(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=CW(this._coreBrowserService.window,e,this._screenElement)[1],n=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-lG),lG),t/=lG,t/Math.abs(t)+Math.round(t*(uG-1)))}shouldForceSelection(e){return FW?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener( ` mousemove ` ,this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener( ` mouseup ` ,this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),dG)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener( ` mousemove ` ,this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener( ` mouseup ` ,this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(FW&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._active
Line truncated
` ))),this._register(this._terminal.onA11yTab(e=>this._handleTab(e))),this._register(this._terminal.onKey(e=>this._handleKey(e.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(R H(i, ` selectionchange ` ,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Q B(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar( ` ` )}_handleChar(e){this._liveRegionLineCount<d q+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e=== `
` &&(this._liveRegionLineCount++,this._liveRegionLineCount===dq+1&&(this._liveRegion.textContent+=Uz.get())))}_clearLiveRegion(){this._liveRegion.textContent= ` ` ,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/ \p {Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)|| ` ` ,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.textContent= ` \ xA0 ` ,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute( ` aria - posinset ` ,o),s.setAttribute( ` aria - setsize ` ,r),this._alignRowWidth(s))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce= ` ` )}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute( ` aria - posinset ` )===(t===0? ` 1 ` : ` $ { this . _terminal . buffer . lines . length } ` )||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener( ` focus ` ,this._topBoundaryFocusListener),a.removeEventListener( ` focus ` ,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement( ` afterbegin ` ,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener( ` focus ` ,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener( ` focus ` ,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error( ` anchorNode and / or focusNode are null ` );return}let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute( ` aria - posinset ` ),10)-1;if(isNaN(r))return console.warn( ` row is invalid . Race condition ? ` ),null;let i=this._rowColumns.get(n);if(!i)return console.warn( ` columns is null . Race condition ? ` ),null;let a=t<i.length?i[t]:i.slice(-1)[0]+1;return a>=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(a&&o){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error( ` invalid range ` );this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener( ` focus ` ,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener( ` focus ` ,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement( ` div ` );return e.setAttribute( ` role ` , ` listitem ` ),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width: ` $ { this . _renderService . dimensions . css . canvas . width } px ` ,fontSize: ` $ { this . _terminal . options . fontSize } px ` }),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height= ` $ { this . _renderService . dimensions . css . cell . height } px ` }_alignRowWidth(e){e.style.transform= ` ` ;let t=e.getBoundingClientRect().width,n=this._rowColumns.get(e)?.slice(-1)?.[0];if(!n)return;let
Line truncated
` ,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return Vz.get()},set promptLabel(e){Vz.set(e)},get tooMuchOutput(){return Uz.get()},set tooMuchOutput(e){Uz.set(e)}}}_verifyIntegers(...e){for(wq of e)if(wq===1/0||isNaN(wq)||wq%1!=0)throw Error( ` This API only accepts integers ` )}_verifyPositiveIntegers(...e){for(wq of e)if(wq&&(wq===1/0||isNaN(wq)||wq%1!=0||wq<0))throw Error( ` This API only accepts positive integers ` )}},Eq=2,Dq=1,Oq=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue( ` height ` )),i=Math.max(0,parseInt(n.getPropertyValue( ` width ` ))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue( ` padding - top ` )),bottom:parseInt(a.getPropertyValue( ` padding - bottom ` )),right:parseInt(a.getPropertyValue( ` padding - right ` )),left:parseInt(a.getPropertyValue( ` padding - left ` ))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(Eq,Math.floor(u/e.css.cell.width)),rows:Math.max(Dq,Math.floor(l/e.css.cell.height))}}},kq={class: ` flex h - [ 32 rem ] min - h - 0 flex - col gap - 2 ` },Aq={key:0,class: ` text - sm text - fg - muted ` ,role: ` status ` },jq=P({__name: ` SandboxView ` ,props:{taskId:{},attempt:{}},setup(e){let t=e,n=J(null),r=J( ` connecting ` ),i=null,a=null,o=null,s=null;function c(){try{o?.fit()}catch{}}return Ue(()=>{let e=n.value;if(!e)return;i=new Tq({convertEol:!0,disableStdin:!0,cursorBlink:!1,fontFamily: ` 'IBM Plex Mono' , ui - monospace , monospace ` ,fontSize:13,theme:{background: ` # 0b0 f14 ` ,foreground: ` # e6edf3 ` }}),o=new Oq,i.loadAddon(o),i.open(e),c();let l=window.location.protocol=== ` https : ` ? ` wss : ` : ` ws : ` ,u=new URLSearchParams({attempt:String(t.attempt)}),d=new WebSocket( ` $ { l } //${window.location.host}/api/tasks/${encodeURIComponent(t.taskId)}/sandbox?${u}`);a=d,d.binaryType=`arraybuffer`,d.onopen=()=>{r.value=`open`},d.onmessage=e=>{i&&(typeof e.data==`string`&&(r.value=`failed`),i.write(typeof e.data==`string`?e.data:new Uint8Array(e.data)))},d.onerror=()=>{r.value=`failed`},d.onclose=()=>{r.value!==`failed`&&(r.value=`closed`)},s=new ResizeObserver(c),s.observe(e)}),at(()=>{s?.disconnect(),s=null,a?.close(),a=null,i?.dispose(),i=null,o=null}),(e,t)=>(L(),j(`div`,kq,[r.value===`open`?F(``,!0):(L(),j(`p`,Aq,[r.value===`connecting`?(L(),j(U,{key:0},[H(`Connecting…`)],64)):r.value===`closed`?(L(),j(U,{key:1},[H(`The sandbox ended.`)],64)):(L(),j(U,{key:2},[H(`Sandbox unavailable.`)],64))])),R(`div`,{ref_key:`host`,ref:n,class:`min-h-0 flex-1 overflow-hidden rounded-md border border-border bg-[#0b0f14] p-2`},null,512)]))}}),Mq={class:`flex flex-wrap items-center gap-3 border-b border-border pb-3`},Nq={class:`inline-flex items-center gap-2`},Pq={class:`inline-flex items-center gap-2`},Fq=`__all__`,Iq=P({__name:`TaskLogFilters`,props:{filters:{},stages:{}},emits:[`filter`],setup(e,{emit:t}){let n=e,r=t,i=Y(()=>Kj.map(e=>({value:e.value||Fq,label:e.label}))),a=Y(()=>n.filters.level||Fq),o=Y(()=>n.filters.stage||Fq);function s(e){r(`filter`,{...n.filters,...e})}function c(e){s({level:String(e)===Fq?``:String(e)})}function l(e){s({stage:String(e)===Fq?``:String(e)})}return(t,n)=>(L(),j(`div`,Mq,[R(`div`,Nq,[A(V(Tu),{"model-value":a.value,"onUpdate:modelValue":c},{default:I(()=>[A(V(ku),{size:`sm`,"aria-label":`Filter log entries by level`},{default:I(()=>[A(V(Au))]),_:1}),A(V(Eu),null,{default:I(()=>[A(V(Du),null,{default:I(()=>[(L(!0),j(U,null,M(i.value,e=>(L(),q(V(Ou),{key:e.value,value:e.value},{default:I(()=>[H(B(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])]),R(`div`,Pq,[A(V(Tu),{"model-value":o.value,"onUpdate:modelValue":l},{default:I(()=>[A(V(ku),{size:`sm`,"aria-label":`Filter log entries by stage`},{default:I(()=>[A(V(Au))]),_:1}),A(V(Eu),null,{default:I(()=>[A(V(Du),null,{default:I(()=>[A(V(Ou),{value:Fq},{default:I(()=>[...n[0]||=[H(`All stages`,-1)]]),_:1}),(L(!0),j(U,null,M(e.stages,e=>(L(),q(V(Ou),{key:e,value:e},{default:I(()=>[H(B(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])])]))}}),Lq={class:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`},Rq={key:2,class:`flex flex-col items-start gap-2 py-3`},zq={key:0,class:`mt-2 flex flex-wrap items-cent
Line truncated
` )}};UQ.defaultYaml={explicit:!1,version: ` 1.2 ` },UQ.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function WQ(e){if(/[ \x 00- \x 19 \s ,[ \] {}]/.test(e)){let t= ` Anchor must not contain whitespace or control characters : $ { JSON . stringify ( e ) } ` ;throw Error(t)}return!0}function GQ(e){let t=new Set;return IQ(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function KQ(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function qQ(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=GQ(e);let a=KQ(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(OQ(t.node)||AQ(t.node)))t.node.anchor=t.anchor;else{let t=Error( ` Failed to resolve repeated object ( this should not happen ) ` );throw t.source=e,t}}},sourceObjects:r}}function JQ(e,t,n,r){if(r&&typeof r== ` object ` ){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=JQ(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=JQ(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=JQ(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=JQ(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function YQ(e,t,n){if(Array.isArray(e))return e.map((e,t)=>YQ(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!MQ(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e== ` bigint ` &&!n?.keep?Number(e):e}var XQ=class{constructor(e){Object.defineProperty(this,CQ,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!TQ(e))throw TypeError( ` A document argument is required ` );let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n== ` number ` ?n:100},o=YQ(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?JQ(i,{"":o}, ` ` ,o):o}},ZQ=class extends XQ{constructor(e){super(_Q),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error( ` Alias nodes cannot have tags ` )}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError( ` Alias resolution is disabled ` );let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],IQ(e,{Node:(e,t)=>{(wQ(t)||MQ(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(YQ(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError( ` This should not happen : Alias anchor was not resolved ? ` );if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=QQ(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError( ` Excessive alias count indicates a resource exhaustion attack ` )}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e= ` Unresolved alias ( the anchor must be set before the alias ) : $ { this . source } ` ;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r= ` * $ { this . source } ` ;if(e){if(WQ(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e= ` Unresolved alias ( the anchor must be set before the alias ) : $ { this . source } ` ;throw Error(e)}if(e.implicitKey)return ` $ { r } ` }return r}};function QQ(e,t,n){if(wQ(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(AQ(t)){let r=0;for(let i of t.items){let t=QQ(e,i,n);t>r&&(r=t)}return r}if(DQ(t)){let r=QQ(e,t.key,n),i=QQ(e,t.value,n);return Math.max(r,i)}return 1}var $ Q=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,e $ =class extends XQ{constructor(e){super(xQ),this.value=e}toJSON(e,t){return t?.keep?this.value:YQ(this.value,e,t)}toString(){return String(this.value)}};e $ .BLOCK_FOLDED= ` BLOCK _FOLDED ` ,e $ .BLOCK_LITERAL= ` BLOCK _LITERAL ` ,e $ .PLAIN= ` PLAIN ` ,e $ .QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,e $ .QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var t $ = ` tag : yaml . org , 2002 : ` ;function n $ (e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error( ` Tag $ { t } not found ` );return r}return n.find(t=>t.identify?.(e)&&!t.format)}function r $ (e,t,n){if(TQ(e)&&(e=e.contents),jQ(e))return e;if(DQ(e)){let t=n.schema[yQ].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt< ` u ` &&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e== ` object ` ){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new ZQ(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=t $ +t.slice(2));let l=n $ (e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new e $ (e);return c&&(c.node=t),t
Line truncated
` )?c $ (n,t):n.includes( `
` )? `
` + $ Q (n,t):(e.endsWith(` ` )? ` ` : ` ` )+n,t $ = ` flow ` ,n $ = ` block ` ,r $ = ` quoted ` ;function i $ (e,t,n= ` flow ` ,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r== ` number ` &&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n=== ` block ` &&(h=a $ (e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n=== ` quoted ` &&r=== ` \ \ ` ){switch(g=h,e[h+1]){case ` x ` :h+=3;break;case ` u ` :h+=5;break;case ` U ` :h+=9;break;default:h+=1}_=h}if(r=== `
` )n=== ` block ` &&(h=a $ (e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` +c $ (n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,u $ = ` flow ` ,d $ = ` block ` ,f $ = ` quoted ` ;function p $ (e,t,n= ` flow ` ,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r== ` number ` &&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n=== ` block ` &&(h=m $ (e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n=== ` quoted ` &&r=== ` \ \ ` ){switch(g=h,e[h+1]){case ` x ` :h+=3;break;case ` u ` :h+=5;break;case ` U ` :h+=9;break;default:h+=1}_=h}if(r=== `
` )n=== ` block ` &&(h=m $ (e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` &&p!== ` ` ){let t=e[h+1];t&&t!== ` ` &&t!== `
` &&t!== ` ` &&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n=== ` quoted ` ){for(;p=== ` ` ||p=== ` ` ;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v= ` \ n$ { t } $ { e . slice ( 0 , a ) } ` :(n=== ` quoted ` &&u[i]&&(v+= ` $ { e [ i ] } \ \ ` ),v+= ` \ n$ { t } $ { e . slice ( i + 1 , a ) } ` )}return v}function a $ (e,t,n){let r=t,i=t+1,a=e[i];for(;a=== ` ` ||a=== ` ` ;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!== `
` );r=t,i=t+1,a=e[i]}return r}var o $ =(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),s $ =e=>/^(%|---| \. \. \. )/m.test(e);function c $ (e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]=== `
` ){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function l $ (e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(s $ (e)? ` ` : ` ` ),o= ` ` ,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t=== ` ` &&n[e+1]=== ` \ \ ` &&n[e+2]=== ` n ` &&(o+=n.slice(s,e)+ ` \ \ ` ,e+=1,s=e,t= ` \ \ ` ),t=== ` \ \ ` )switch(n[e+1]){case ` u ` :{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case ` 0000 ` :o+= ` \ \ 0 ` ;break;case ` 0007 ` :o+= ` \ \ a ` ;break;case ` 000 b ` :o+= ` \ \ v ` ;break;case ` 001 b ` :o+= ` \ \ e ` ;break;case ` 0085 ` :o+= ` \ \ N ` ;break;case ` 00 a0 ` :o+= ` \ \ _ ` ;break;case ` 2028 ` :o+= ` \ \ L ` ;break;case ` 2029 ` :o+= ` \ \ P ` ;break;default:t.substr(0,2)=== ` 00 ` ?o+= ` \ \ x ` +t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case ` n ` :if(r||n[e+2]=== ` " ` ||n.length<i)e+=1;else{for(o+=n.slice(s,e)+ `
` &&t!== ` ` &&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n=== ` quoted ` ){for(;p=== ` ` ||p=== ` ` ;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v= ` \ n$ { t } $ { e . slice ( 0 , a ) } ` :(n=== ` quoted ` &&u[i]&&(v+= ` $ { e [ i ] } \ \ ` ),v+= ` \ n$ { t } $ { e . slice ( i + 1 , a ) } ` )}return v}function m $ (e,t,n){let r=t,i=t+1,a=e[i];for(;a=== ` ` ||a=== ` ` ;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!== `
` );r=t,i=t+1,a=e[i]}return r}var h $ =(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),g $ =e=>/^(%|---| \. \. \. )/m.test(e);function _ $ (e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]=== `
` ){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function v $ (e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(g $ (e)? ` ` : ` ` ),o= ` ` ,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t=== ` ` &&n[e+1]=== ` \ \ ` &&n[e+2]=== ` n ` &&(o+=n.slice(s,e)+ ` \ \ ` ,e+=1,s=e,t= ` \ \ ` ),t=== ` \ \ ` )switch(n[e+1]){case ` u ` :{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case ` 0000 ` :o+= ` \ \ 0 ` ;break;case ` 0007 ` :o+= ` \ \ a ` ;break;case ` 000 b ` :o+= ` \ \ v ` ;break;case ` 001 b ` :o+= ` \ \ e ` ;break;case ` 0085 ` :o+= ` \ \ N ` ;break;case ` 00 a0 ` :o+= ` \ \ _ ` ;break;case ` 2028 ` :o+= ` \ \ L ` ;break;case ` 2029 ` :o+= ` \ \ P ` ;break;default:t.substr(0,2)=== ` 00 ` ?o+= ` \ \ x ` +t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case ` n ` :if(r||n[e+2]=== ` " ` ||n.length<i)e+=1;else{for(o+=n.slice(s,e)+ `
` ;n[e+2]=== ` \ \ ` &&n[e+3]=== ` n ` &&n[e+4]!== ` " ` ;)o+= `
` ,e+=2;o+=a,n[e+2]=== ` ` &&(o+= ` \ \ ` ),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:i $ (o,a,r $ ,o $ (t,!1))}function u $ (e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return l $ (e,t);let n=t.indent||(s $ (e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : i $( r , n , t $, o $( t , ! 1 ) ) } function d $( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = l $; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? u $: i && ! t ? l $: n ? u $: l $} return r ( e , t ) } var f $; try { f $= RegExp ( ` (^|(?<!
` ,e+=2;o+=a,n[e+2]=== ` ` &&(o+= ` \ \ ` ),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:p $ (o,a,f $ ,h $ (t,!1))}function y $ (e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return v $ (e,t);let n=t.indent||(g $ (e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : p $( r , n , u $, h $( t , ! 1 ) ) } function b $( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = v $; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? y $: i && ! t ? v $: n ? y $: v $} return r ( e , t ) } var x $; try { x $= RegExp ( ` (^|(?<!
) )
+ ( ? !
| $ ) ` , ` g ` )}catch{f $ =/ \n +(?! \n | $ )/g}function p $ ({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/ \n [ \t ]+ $ /.test(n))return d $ (n,r);let l=r.indent||(r.forceBlockIndent||s $ (n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===GQ .BLOCK_FOLDED?!1:t===GQ .BLOCK_LITERAL||!c $ (n,c,l.length);if(!n)return u? ` |
| $ ) ` , ` g ` )}catch{x $ =/ \n +(?! \n | $ )/g}function S $ ({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/ \n [ \t ]+ $ /.test(n))return b $ (n,r);let l=r.indent||(r.forceBlockIndent||g $ (n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===e $ .BLOCK_FOLDED?!1:t===e $ .BLOCK_LITERAL||!_ $ (n,c,l.length);if(!n)return u? ` |
` : ` >
` ;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!== `
` &&e!== ` ` &&e!== ` ` )break}let p=n.substring(f),m=p.indexOf( `
` );m===-1?d= ` - ` :n===p||m!==p.length-1?(d= ` + ` ,a&&a()):d= ` ` ,p&&=(n=n.slice(0,-p.length),p[p.length-1]=== `
` &&(p=p.slice(0,-1)),p.replace(f $ , ` $ & $ { l } ` ));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e=== ` ` )h=!0;else if(e=== `
` &&(p=p.slice(0,-1)),p.replace(x $ , ` $ & $ { l } ` ));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e=== ` ` )h=!0;else if(e=== `
` )_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/ \n +/g, ` $ & $ { l } ` ));let y=(h?l? ` 2 ` : ` 1 ` : ` ` )+d;if(e&&(y+= ` ` +s(e.replace(/ ?[ \r \n ]+/g, ` ` )),i&&i()),!u){let e=n.replace(/ \n +/g, `
$ & ` ).replace(/(?:^| \n )([ \t ].*)(?:([ \n \t ]*) \n (?![ \n \t ]))?/g, ` $1$2 ` ).replace(/ \n +/g, ` $ & $ { l } ` ),i=!1,a=o $ (r,!0);o!== ` folded ` &&t!==GQ .BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=i $ ( ` $ { v } $ { e } $ { p } ` ,l,n $ ,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function m $ (e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes( `
` )||u&&/[[ \] {},]/.test(a))return d $ (a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?d $ (a,t):p $ (e,t,n,r);if(!s&&!u&&i!==GQ .PLAIN&&a.includes( `
` ))return p $ (e,t,n,r);if(s $ (a)){if(c=== ` ` )return t.forceBlockIndent=!0,p $ (e,t,n,r);if(s&&c===l)return d $ (a,t)}let d=a.replace(/ \n +/g, ` $ & \ n$ { c } ` );if(o){let e=e=>e.default&&e.tag!== ` tag : yaml . org , 2002 : str ` &&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return d $ (a,t)}return s?d:i $ (d,c,t $ ,o $ (t,!1))}function h $ (e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value== ` string ` ?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==GQ .QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=GQ .QUOTE_DOUBLE);let c=e=>{switch(e){case GQ .BLOCK_FOLDED:case GQ .BLOCK_LITERAL:return i||a?d $ (o.value,t):p $ (o,t,n,r);case GQ .QUOTE_DOUBLE:return l $ (o.value,t);case GQ .QUOTE_SINGLE:return u $ (o.value,t);case GQ .PLAIN:return m $ (o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error( ` Unsupported default string type $ { r } ` )}return l}function g $ (e,t){let n=Object.assign({blockQuote:!0,commentString:QQ ,defaultKeyType:null,defaultStringType: ` PLAIN ` ,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr: ` false ` ,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr: ` null ` ,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr: ` true ` ,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case ` block ` :r=!1;break;case ` flow ` :r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding? ` ` : ` ` ,indent: ` ` ,indentStep:typeof n.indent== ` number ` ? ` ` .repeat(n.indent): ` ` ,inFlow:r,options:n}}function _ $ (e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(y Q(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function v $ (e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(y Q(e)||x Q(e))&&e.anchor;a&&F Q(a)&&(n.add(a),i.push( ` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function y $ (e,t,n,r){if(v Q(e))return e.toString(t,n,r);if(h Q(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=S Q(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=_ $ (t.doc.schema.tags,a);let o=v $ (a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify== ` function ` ?i.stringify(a,t,n,r):y Q(a)?h $ (a,t,n,r):a.toString(t,n,r);return o?y Q(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function b $ ({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=S Q(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(x Q(e)||!S Q(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||x Q(e)||(y Q(e)?e.type===GQ .BLOCK_FOLDED||e.type===GQ .BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=y $ (e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error( ` With simple keys , single line scalar must not span more than 1024 characters ` );p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g=== ` ` ? ` ? ` :p? ` ? $ { g } ` :g}else if(a&&!d||t==null&&p)return g= ` ? $ { g } ` ,f&&!m?g+=e $ (g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=e $ (g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=e $ (g,n.indent,l(f))));let _,v,y;S Q(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&y Q(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&b Q(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=y $ (t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { $Q ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
$ & ` ).replace(/(?:^| \n )([ \t ].*)(?:([ \n \t ]*) \n (?![ \n \t ]))?/g, ` $1$2 ` ).replace(/ \n +/g, ` $ & $ { l } ` ),i=!1,a=h $ (r,!0);o!== ` folded ` &&t!==e $ .BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=p $ ( ` $ { v } $ { e } $ { p } ` ,l,d $ ,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function C $ (e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes( `
` )||u&&/[[ \] {},]/.test(a))return b $ (a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?b $ (a,t):S $ (e,t,n,r);if(!s&&!u&&i!==e $ .PLAIN&&a.includes( `
` ))return S $ (e,t,n,r);if(g $ (a)){if(c=== ` ` )return t.forceBlockIndent=!0,S $ (e,t,n,r);if(s&&c===l)return b $ (a,t)}let d=a.replace(/ \n +/g, ` $ & \ n$ { c } ` );if(o){let e=e=>e.default&&e.tag!== ` tag : yaml . org , 2002 : str ` &&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return b $ (a,t)}return s?d:p $ (d,c,u $ ,h $ (t,!1))}function w $ (e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value== ` string ` ?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==e $ .QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=e $ .QUOTE_DOUBLE);let c=e=>{switch(e){case e $ .BLOCK_FOLDED:case e $ .BLOCK_LITERAL:return i||a?b $ (o.value,t):S $ (o,t,n,r);case e $ .QUOTE_DOUBLE:return v $ (o.value,t);case e $ .QUOTE_SINGLE:return y $ (o.value,t);case e $ .PLAIN:return C $ (o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error( ` Unsupported default string type $ { r } ` )}return l}function T $ (e,t){let n=Object.assign({blockQuote:!0,commentString:s $ ,defaultKeyType:null,defaultStringType: ` PLAIN ` ,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr: ` false ` ,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr: ` null ` ,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr: ` true ` ,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case ` block ` :r=!1;break;case ` flow ` :r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding? ` ` : ` ` ,indent: ` ` ,indentStep:typeof n.indent== ` number ` ? ` ` .repeat(n.indent): ` ` ,inFlow:r,options:n}}function E $ (e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(O Q(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function D $ (e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(O Q(e)||A Q(e))&&e.anchor;a&&W Q(a)&&(n.add(a),i.push( ` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function O $ (e,t,n,r){if(D Q(e))return e.toString(t,n,r);if(w Q(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=j Q(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=E $ (t.doc.schema.tags,a);let o=D $ (a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify== ` function ` ?i.stringify(a,t,n,r):O Q(a)?w $ (a,t,n,r):a.toString(t,n,r);return o?O Q(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function k $ ({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=j Q(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(A Q(e)||!j Q(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||A Q(e)||(O Q(e)?e.type===e $ .BLOCK_FOLDED||e.type===e $ .BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=O $ (e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error( ` With simple keys , single line scalar must not span more than 1024 characters ` );p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g=== ` ` ? ` ? ` :p? ` ? $ { g } ` :g}else if(a&&!d||t==null&&p)return g= ` ? $ { g } ` ,f&&!m?g+=l $ (g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=l $ (g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=l $ (g,n.indent,l(f))));let _,v,y;j Q(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&O Q(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&k Q(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=O $ (t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { c $( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
` &&y&&(S= `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&x Q(t)){let e=x[0],r=x.indexOf( `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&A Q(t)){let e=x[0],r=x.indexOf( `
` ),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e=== ` & ` ||e=== ` ! ` )){let n=x.indexOf( ` ` );e=== ` & ` &&n!==-1&&n<r&&x[n+1]=== ` ! ` &&(n=x.indexOf( ` ` ,n+1)),(n===-1||r<n)&&(t=!0)}t||(S= ` \ n$ { n . indent } ` )}}else(x=== ` ` ||x[0]=== `
` )&&(S= ` ` );return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=e $ (g,n.indent,l(y)):h&&i&&i(),g}function x $ (e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var S $ = ` << ` ,C $ ={identify:e=>e===S $ ||typeof e== ` symbol ` &&e.description===S $ ,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new GQ (Symbol(S $ )),{addToJSMap:T $ }),stringify:()=>S $ },w $ =(e,t)=>(C $ .identify(t)||y Q(t)&&(!t.type||t.type===GQ .PLAIN)&&C $ .identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===C $ .tag&&e.default);function T $ (e,t,n){let r=D $ (e,n);if(b Q(r))for(let n of r.items)E $ (e,t,n);else if(Array.isArray(r))for(let n of r)E $ (e,t,n);else E $ (e,t,r)}function E $ (e,t,n){let r=D $ (e,n);if(!_ Q(r))throw Error( ` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function D $ (e,t){return e&&h Q(t)?t.resolve(e.doc,e):t}function O $ (e,t,{key:n,value:r}){if(S Q(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(w $ (e,n))T $ (e,t,r);else{let i=B Q(n, ` ` ,e);if(t instanceof Map)t.set(i,B Q(r,i,e));else if(t instanceof Set)t.add(i);else{let a=k $ (n,i,e),o=B Q(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function k $ (e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(S Q(e)&&n?.doc){let t=g $ (n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+ ` ... " ` ),x $ (n.doc.options.logLevel, ` Keys with collection values will be stringified due to JS Object restrictions : $ { e } . Set mapAsMap : true to use object keys . ` ),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function A $ (e,t,n){return new j $ (JQ (e,void 0,n),JQ (t,void 0,n))}var j $ =class e{constructor(e,t=null){Object.defineProperty(this,m Q,{value:d Q}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return S Q(n)&&(n=n.clone(t)),S Q(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return O $ (t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?b $ (this,e,t,n):JSON.stringify(this)}};function M $ (e,t,n){return(t.inFlow??e.flow?P $ :N $ )(e,t,n)}function N $ ({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(S Q(i))!d&&i.spaceBefore&&f.push( ` ` ),F $ (n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(v Q(i)){let e=S Q(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),F $ (n,f,e.commentBefore,d))}d=!1;let s=y $ (i,u,()=>o=null,()=>d=!0);o&&(s+=e $ (s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t? ` \ n$ { c } $ { t } ` : `
` )&&(S= ` ` );return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=l $ (g,n.indent,l(y)):h&&i&&i(),g}function A $ (e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var j $ = ` << ` ,M $ ={identify:e=>e===j $ ||typeof e== ` symbol ` &&e.description===j $ ,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new e $ (Symbol(j $ )),{addToJSMap:P $ }),stringify:()=>j $ },N $ =(e,t)=>(M $ .identify(t)||O Q(t)&&(!t.type||t.type===e $ .PLAIN)&&M $ .identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===M $ .tag&&e.default);function P $ (e,t,n){let r=I $ (e,n);if(k Q(r))for(let n of r.items)F $ (e,t,n);else if(Array.isArray(r))for(let n of r)F $ (e,t,n);else F $ (e,t,r)}function F $ (e,t,n){let r=I $ (e,n);if(!E Q(r))throw Error( ` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function I $ (e,t){return e&&w Q(t)?t.resolve(e.doc,e):t}function L $ (e,t,{key:n,value:r}){if(j Q(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(N $ (e,n))P $ (e,t,r);else{let i=Y Q(n, ` ` ,e);if(t instanceof Map)t.set(i,Y Q(r,i,e));else if(t instanceof Set)t.add(i);else{let a=R $ (n,i,e),o=Y Q(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function R $ (e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(j Q(e)&&n?.doc){let t=T $ (n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+ ` ... " ` ),A $ (n.doc.options.logLevel, ` Keys with collection values will be stringified due to JS Object restrictions : $ { e } . Set mapAsMap : true to use object keys . ` ),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function z $ (e,t,n){return new B $ (r $ (e,void 0,n),r $ (t,void 0,n))}var B $ =class e{constructor(e,t=null){Object.defineProperty(this,C Q,{value:b Q}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return j Q(n)&&(n=n.clone(t)),j Q(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return L $ (t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?k $ (this,e,t,n):JSON.stringify(this)}};function V $ (e,t,n){return(t.inFlow??e.flow?U $ :H $ )(e,t,n)}function H $ ({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(j Q(i))!d&&i.spaceBefore&&f.push( ` ` ),W $ (n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(D Q(i)){let e=j Q(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),W $ (n,f,e.commentBefore,d))}d=!1;let s=O $ (i,u,()=>o=null,()=>d=!0);o&&(s+=l $ (s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t? ` \ n$ { c } $ { t } ` : `
` }}return e?(p+= `
` + $ Q (l(e),c),s&&s()):d&&o&&o(),p}function P $ ({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(S Q(i))i.spaceBefore&&d.push( ` ` ),F $ (t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(v Q(i)){let e=S Q(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),F $ (t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=S Q(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=y $ (i,c,()=>a=null);l||=d.length>u||o.includes( `
` ),n<e.length-1?o+= ` , ` :t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+= ` , ` )),a&&(o+=e $ (o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t? ` \ n$ { a } $ { i } $ { t } ` : `
` ;return ` $ { e } \ n$ { i } $ { p } ` }return ` $ { f } $ { o } $ { d . join ( ` ` ) } $ { o } $ { p } ` }function F $ ({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i= $ Q(t(r),e);n.push(i.trimStart())}}function I $ (e,t){let n=yQ(t)?t.value:t;for(let r of e)if(vQ(r)&&(r.key===t||r.key===n||yQ(r.key)&&r.key.value===n))return r}var L $ =class extends ZQ{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(uQ,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i== ` function ` )o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(A $ (e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t== ` object ` )for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries== ` function ` &&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=vQ(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new j $ (e,e?.value):new j $ (e.key,e.value);let r=I $ (this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );yQ(r.value)&&WQ(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=I $ (this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=I $ (this.items,e)?.value;return(!t&&yQ(n)?n.value:n)??void 0}has(e){return!!I $ (this.items,e)}set(e,t){this.add(new j $ (e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)O $ (t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!vQ(e))throw Error( ` Map items must all be pairs ; found $ { JSON . stringify ( e ) } instead ` );return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),M $ (this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},R $ ={collection: ` map ` ,default:!0,nodeClass:L $ ,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return _Q(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>L $ .from(e,t,n)},z $ =class extends ZQ{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(pQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=B $ (e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=B $ (e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&yQ(r)?r.value:r}has(e){let t=B $ (e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=B $ (e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];yQ(r)&&WQ(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(BQ(e,String(r++),t));return n}toString(e,t,n){return e?M $ (this,e,{blockItemPrefix: ` - ` ,flowChars:{start: ` [ ` ,end: ` ] ` },itemIndent:(e.indent|| ` ` )+ ` ` ,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r== ` function ` ){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(JQ(a,void 0,n))}}return i}};function B $ (e){let t=yQ(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var V $ ={collection: ` seq ` ,default:!0,nodeClass:z $ ,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return bQ(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>z $ .from(e,t,n)},H $ ={identify:e=>typeof e== ` string ` ,default:!0,tag: ` tag : yaml . org , 2002 : str ` ,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),h $ (e,t,n,r)}},U $ ={identify:e=>e==null,createNode:()=>new GQ(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new GQ(null),stringify:({source:e},t)=>typeof e== ` string ` &&U $ .test.test(e)?e:t.options.nullStr},W $ ={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new GQ(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&W $ .test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function G $ ({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r== ` bigint ` )return String(r);let i=typeof r== ` number ` ?r:Number(r);if(!isFinite(i))return isNaN(i)? ` . nan ` :i<0? ` - . inf ` : ` . inf ` ;let a=Object.is(r,-0)? ` - 0 ` :JSON.stringify(r);if(!e&&t&&(!n||n=== ` tag : yaml . org , 2002 : float ` )&&/^-? \d /.test(a)&&!a.includes( ` e ` )){let e=a.indexOf( ` . ` );e<0&&(e=a.length,a+= ` . ` );let n=t-(a.length-e-1);for(;n-->0;)a+= ` 0 ` }return a}var K $ ={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:G $ },q $ ={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?: \. [0-9]+|[0-9]+(?: \. [0-9]*)?)[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e),string
Line truncated
` : ` ` )}return h $ ({comment:e,type:t,value:s},r,i,a)}};function s1(e,t){if(bQ(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!vQ(r)){if(_Q(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new j $ (new GQ(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore? ` $ { r . commentBefore } \ n$ { e . key . commentBefore } ` :r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment? ` $ { r . comment } \ n$ { t . comment } ` :r.comment}r=e}e.items[n]=vQ(r)?r:new j $ (r)}}else t( ` Expected a sequence for this tag ` );return e}function c1(e,t,n){let{replacer:r}=n,i=new z $ (e);i.tag= ` tag : yaml . org , 2002 : pairs ` ;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r== ` function ` &&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError( ` Expected [ key , value ] tuple : $ { e } ` )}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError( ` Expected tuple with one key , not $ { t . length } keys ` )}else o=e;i.items.push(A $ (o,s,n))}return i}var l1={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:s1,createNode:c1},u1=class e extends z ${ constructor ( ) { super ( ) , this . add = L$ . prototype . add . bind ( this ) , this . delete = L$ . prototype . delete . bind ( this ) , this . get = L$ . prototype . get . bind ( this ) , this . has = L$ . prototype . has . bind ( this ) , this . set = L$ . prototype . set . bind ( this ) , this . tag = e . tag } toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(vQ(e)?(r=BQ(e.key, ` ` ,t),i=BQ(e.value,r,t)):r=BQ(e, ` ` ,t),n.has(r))throw Error( ` Ordered maps must not include duplicate keys ` );n.set(r,i)}return n}static from(e,t,n){let r=c1(e,t,n),i=new this;return i.items=r.items,i}};u1.tag= ` tag : yaml . org , 2002 : omap ` ;var d1={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:u1,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=s1(e,t),r=[];for(let{key:e}of n.items)yQ(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new u1,n)},createNode:(e,t,n)=>u1.from(e,t,n)};function f1({value:e,source:t},n){return t&&(e?p1:m1).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var p1={identify:e=>e===!0,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON) $ /,resolve:()=>new GQ(!0),stringify:f1},m1={identify:e=>e===!1,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF) $ /,resolve:()=>new GQ(!1),stringify:f1},h1={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:G $ },g1={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?:[0-9][0-9_]*)?(?: \. [0-9_]*)?[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e.replace(/_/g, ` ` )),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():G $ (e)}},_1={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^[-+]?(?:[0-9][0-9_]*)? \. [0-9_]* $ /,resolve(e){let t=new GQ(parseFloat(e.replace(/_/g, ` ` ))),n=e.indexOf( ` . ` );if(n!==-1){let r=e.substring(n+1).replace(/_/g, ` ` );r[r.length-1]=== ` 0 ` &&(t.minFractionDigits=r.length)}return t},stringify:G $ },v1=e=>typeof e== ` bigint ` ||Number.isInteger(e);function y1(e,t,n,{intAsBigInt:r}){let i=e[0];if((i=== ` - ` ||i=== ` + ` )&&(t+=1),e=e.substring(t).replace(/_/g, ` ` ),r){switch(n){case 2:e= ` 0 b$ { e } ` ;break;case 8:e= ` 0 o$ { e } ` ;break;case 16:e= ` 0 x$ { e } ` }let t=BigInt(e);return i=== ` - ` ?BigInt(-1)*t:t}let a=parseInt(e,n);return i=== ` - ` ?-1*a:a}function b1(e,t,n){let{value:r}=e;if(v1(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return G $ (e)}var x1={identify:v1,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>y1(e,2,2,n),stringify:e=>b1(e,2, ` 0 b ` )},S1={identify:v1,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>y1(e,1,8,n),stringify:e=>b1(e,8, ` 0 ` )},C1={identify:v1,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>y1(e,0,10,n),stringify:G $ },w1={identify:v1,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>y1(e,2,16,n),stringify:e=>b1(e,16, ` 0 x ` )},T1=class e extends L ${ constructor ( t ) { super ( t ) , this . tag = e . tag } add(e){let t;t=vQ(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new j $ (e.key,null):new j $ (e,null),I $ (this.items,t.key)||this.items.push(t)}get(e,t){let n=I $ (this.items,e);return!t&&vQ(n)?yQ(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!= ` boolean ` )throw Error( ` Expected boolean value for set ( key , value ) in a YAML set , not $ { typeof t } ` );let n=I $ (this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new j $ (e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return s
Line truncated
` )?(n.push( ` ... ` ),n.push( $ Q (t,` ` ))):n.push( ` ... $ { t } ` )}else n.push( ` ... ` )}else{let t=e.comment;t&&o&&(t=t.replace(/^ \n +/, ` ` )),t&&((!o||s)&&n[n.length-1]!== ` ` &&n.push( ` ` ),n.push( $ Q (a(t),` ` )))}return n.join( `
` +c $ (l(e),c),s&&s()):d&&o&&o(),p}function U $ ({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(j Q(i))i.spaceBefore&&d.push( ` ` ),W $ (t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(D Q(i)){let e=j Q(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),W $ (t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=j Q(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=O $ (i,c,()=>a=null);l||=d.length>u||o.includes( `
` ),n<e.length-1?o+= ` , ` :t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+= ` , ` )),a&&(o+=l $ (o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t? ` \ n$ { a } $ { i } $ { t } ` : `
` ;return ` $ { e } \ n$ { i } $ { p } ` }return ` $ { f } $ { o } $ { d . join ( ` ` ) } $ { o } $ { p } ` }function W $ ({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=c $ (t(r),e);n.push(i.trimStart())}}function G $ (e,t){let n=OQ(t)?t.value:t;for(let r of e)if(DQ(r)&&(r.key===t||r.key===n||OQ(r.key)&&r.key.value===n))return r}var K $ =class extends o ${ static get tagName ( ) { return ` tag:yaml.org,2002:map ` } constructor(e){super(yQ,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i== ` function ` )o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(z $ (e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t== ` object ` )for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries== ` function ` &&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=DQ(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new B $ (e,e?.value):new B $ (e.key,e.value);let r=G $ (this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );OQ(r.value)&& $ Q(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=G $ (this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=G $ (this.items,e)?.value;return(!t&&OQ(n)?n.value:n)??void 0}has(e){return!!G $ (this.items,e)}set(e,t){this.add(new B $ (e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)L $ (t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!DQ(e))throw Error( ` Map items must all be pairs ; found $ { JSON . stringify ( e ) } instead ` );return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),V $ (this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},q $ ={collection: ` map ` ,default:!0,nodeClass:K $ ,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return EQ(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>K $ .from(e,t,n)},J $ =class extends o ${ static get tagName ( ) { return ` tag:yaml.org,2002:seq ` } constructor(e){super(SQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Y $ (e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=Y $ (e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&OQ(r)?r.value:r}has(e){let t=Y $ (e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=Y $ (e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];OQ(r)&& $ Q(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(YQ(e,String(r++),t));return n}toString(e,t,n){return e?V $ (this,e,{blockItemPrefix: ` - ` ,flowChars:{start: ` [ ` ,end: ` ] ` },itemIndent:(e.indent|| ` ` )+ ` ` ,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r== ` function ` ){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(r $ (a,void 0,n))}}return i}};function Y $ (e){let t=OQ(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var X $ ={collection: ` seq ` ,default:!0,nodeClass:J $ ,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return kQ(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>J $ .from(e,t,n)},Z $ ={identify:e=>typeof e== ` string ` ,default:!0,tag: ` tag : yaml . org , 2002 : str ` ,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),w $ (e,t,n,r)}},Q $ ={identify:e=>e==null,createNode:()=>new e $ (null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new e $ (null),stringify:({source:e},t)=>typeof e== ` string ` &&Q $ .test.test(e)?e:t.options.nullStr}, $ $ ={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new e $ (e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&& $ $ .test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function e1({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r== ` bigint ` )return String(r);let i=typeof r== ` number ` ?r:Number(r);if(!isFinite(i))return isNaN(i)? ` . nan ` :i<0? ` - . inf ` : ` . inf ` ;let a=Object.is(r,-0)? ` - 0 ` :JSON.stringify(r);if(!e&&t&&(!n||n=== ` tag : yaml . org , 2002 : float ` )&&/^-? \d /.test(a)&&!a.includes( ` e ` )){let e=a.indexOf( ` . ` );e<0&&(e=a.length,a+= ` . ` );let n=t-(a.length-e-1);for(;n-->0;)a+= ` 0 ` }return a}var t1={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:e1},n1={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?: \. [0-9]+|[0-9]+(?: \. [0-9]*)?)[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e),string
Line truncated
` : ` ` )}return w $ ({comment:e,type:t,value:s},r,i,a)}};function g1(e,t){if(kQ(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!DQ(r)){if(EQ(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new B $ (new e $ (null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore? ` $ { r . commentBefore } \ n$ { e . key . commentBefore } ` :r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment? ` $ { r . comment } \ n$ { t . comment } ` :r.comment}r=e}e.items[n]=DQ(r)?r:new B $ (r)}}else t( ` Expected a sequence for this tag ` );return e}function _1(e,t,n){let{replacer:r}=n,i=new J $ (e);i.tag= ` tag : yaml . org , 2002 : pairs ` ;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r== ` function ` &&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError( ` Expected [ key , value ] tuple : $ { e } ` )}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError( ` Expected tuple with one key , not $ { t . length } keys ` )}else o=e;i.items.push(z $ (o,s,n))}return i}var v1={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:g1,createNode:_1},y1=class e extends J ${ constructor ( ) { super ( ) , this . add = K$ . prototype . add . bind ( this ) , this . delete = K$ . prototype . delete . bind ( this ) , this . get = K$ . prototype . get . bind ( this ) , this . has = K$ . prototype . has . bind ( this ) , this . set = K$ . prototype . set . bind ( this ) , this . tag = e . tag } toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(DQ(e)?(r=YQ(e.key, ` ` ,t),i=YQ(e.value,r,t)):r=YQ(e, ` ` ,t),n.has(r))throw Error( ` Ordered maps must not include duplicate keys ` );n.set(r,i)}return n}static from(e,t,n){let r=_1(e,t,n),i=new this;return i.items=r.items,i}};y1.tag= ` tag : yaml . org , 2002 : omap ` ;var b1={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:y1,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=g1(e,t),r=[];for(let{key:e}of n.items)OQ(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new y1,n)},createNode:(e,t,n)=>y1.from(e,t,n)};function x1({value:e,source:t},n){return t&&(e?S1:C1).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var S1={identify:e=>e===!0,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON) $ /,resolve:()=>new e $ (!0),stringify:x1},C1={identify:e=>e===!1,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF) $ /,resolve:()=>new e $ (!1),stringify:x1},w1={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:e1},T1={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?:[0-9][0-9_]*)?(?: \. [0-9_]*)?[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e.replace(/_/g, ` ` )),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():e1(e)}},E1={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^[-+]?(?:[0-9][0-9_]*)? \. [0-9_]* $ /,resolve(e){let t=new e $ (parseFloat(e.replace(/_/g, ` ` ))),n=e.indexOf( ` . ` );if(n!==-1){let r=e.substring(n+1).replace(/_/g, ` ` );r[r.length-1]=== ` 0 ` &&(t.minFractionDigits=r.length)}return t},stringify:e1},D1=e=>typeof e== ` bigint ` ||Number.isInteger(e);function O1(e,t,n,{intAsBigInt:r}){let i=e[0];if((i=== ` - ` ||i=== ` + ` )&&(t+=1),e=e.substring(t).replace(/_/g, ` ` ),r){switch(n){case 2:e= ` 0 b$ { e } ` ;break;case 8:e= ` 0 o$ { e } ` ;break;case 16:e= ` 0 x$ { e } ` }let t=BigInt(e);return i=== ` - ` ?BigInt(-1)*t:t}let a=parseInt(e,n);return i=== ` - ` ?-1*a:a}function k1(e,t,n){let{value:r}=e;if(D1(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return e1(e)}var A1={identify:D1,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>O1(e,2,2,n),stringify:e=>k1(e,2, ` 0 b ` )},j1={identify:D1,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>O1(e,1,8,n),stringify:e=>k1(e,8, ` 0 ` )},M1={identify:D1,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>O1(e,0,10,n),stringify:e1},N1={identify:D1,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>O1(e,2,16,n),stringify:e=>k1(e,16, ` 0 x ` )},P1=class e extends K ${ constructor ( t ) { super ( t ) , this . tag = e . tag } add(e){let t;t=DQ(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new B $ (e.key,null):new B $ (e,null),G $ (this.items,t.key)||this.items.push(t)}get(e,t){let n=G $ (this.items,e);return!t&&DQ(n)?OQ(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!= ` boolean ` )throw Error( ` Expected boolean value for set ( key , value ) in a YAML set , not $ { typeof t } ` );let n=G $ (this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new B $ (e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return s
Line truncated
` )?(n.push( ` ... ` ),n.push(c $ (t, ` ` ))):n.push( ` ... $ { t } ` )}else n.push( ` ... ` )}else{let t=e.comment;t&&o&&(t=t.replace(/^ \n +/, ` ` )),t&&((!o||s)&&n[n.length-1]!== ` ` &&n.push( ` ` ),n.push(c $ (a(t), ` ` )))}return n.join( `
` )+ `
` }var B 1=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,m Q,{value:l Q});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new P Q({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[m Q]:{value:l Q}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=S Q(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){V 1(this.contents)&&this.contents.add(e)}addIn(e,t){V 1(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=I Q(this);e.anchor=!t||n.has(t)?L Q(t|| ` a ` ,n):t}return new H Q(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=R Q(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=JQ (e,l,p);return o&&x Q(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new j $ (this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return V 1(this.contents)?this.contents.delete(e):!1}deleteIn(e){return XQ (e)?this.contents!=null&&(this.contents=null,!0):V 1(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return x Q(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return XQ (e)?!t&&y Q(this.contents)?this.contents.value:this.contents:x Q(this.contents)?this.contents.getIn(e,t):void 0}has(e){return x Q(this.contents)?this.contents.has(e):!1}hasIn(e){return XQ (e)?this.contents!==void 0:x Q(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=YQ (this.schema,[e],t):V 1(this.contents)&&this.contents.set(e,t)}setIn(e,t){XQ (e)?this.contents=t:this.contents==null?this.contents=YQ (this.schema,Array.from(e),t):V 1(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e== ` number ` &&(e=String(e));let n;switch(e){case ` 1.1 ` :this.directives?this.directives.yaml.version= ` 1.1 ` :this.directives=new P Q({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new P Q({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new R 1(Object.assign(n,t));else throw Error( ` With a null YAML version , the { schema : Schema } option is required ` )}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r== ` number ` ?r:100},s=B Q(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?z Q(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return z 1(this,e)}};function V 1(e){if(x Q(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var H 1=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},U 1=class extends H 1{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},W 1=class extends H 1{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},G1 =(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+= ` at line $ { r } , column $ { i } ` ;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[ \n \r ]+ $ /, ` ` );if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o= ` … ` +o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+ ` … ` ),r>1&&/^ * $ /.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+ ` …
` ),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s= ` ` .repeat(a)+ ` ^ ` .repeat(e);n.message+= ` : \ n \ n$ { o } \ n$ { s } \ n ` }};function K1 (e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d= ` ` ,f= ` ` ,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!== ` space ` &&i.type!== ` newline ` &&i.type!== ` comma ` &&a(i.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),!1),h&&=(l&&i.type!== ` comment ` &&i.type!== ` newline ` &&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),null),i.type){case ` space ` :!t&&(n!== ` doc - start ` ||r?.type!== ` flow - collection ` )&&i.source.includes( ` ` )&&(h=i),u=!0;break;case ` comment ` :{u||a(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let e=i.source.substring(1)|| ` ` ;d?d+=f+e:d=e,f= ` ` ,l=!1;break}case ` newline ` :l?d?d+=i.source:(!b||n!== ` seq - item - ind ` )&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case ` anchor ` :g&&a(i, ` MULTIPLE _ANCHORS ` , ` A node can have at most one anchor ` ),i.source.endsWith( ` : ` )&&a(i.offset+i.source.length-1, ` BAD _ALIAS ` , ` Anchor ending in : is ambiguous ` ,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case ` tag ` :_&&a(i, ` MULTIPLE _TAGS ` , ` A node can have at most one tag ` ),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i, ` BAD _PROP _ORDER ` , ` Anchors and tags must be after the $ { i . source } indicator ` ),b&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . source } in $ { t ? ? ` collection ` } ` ),b=i,l=n=== ` seq - item - ind ` ||n=== ` explicit - key - ind ` ,u=!1;break;case ` comma ` :if(t){y&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { t } ` ),y=i,l=!1,u=!1;break}default:a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . type } token ` ),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!== ` space ` &&r.type!== ` newline ` &&r.type!== ` comma ` &&(r.type!== ` scalar ` ||r.source!== ` ` )&&a(r.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),h&&(l&&h.indent<=o||r?.type=== ` block - map ` ||r?.type=== ` block - seq ` )&&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function q1 (e){if(!e)return null;switch(e.type){case ` alias ` :case ` scalar ` :case ` double - quoted - scalar ` :case ` single - quoted - scalar ` :if(e.source.includes( `
` ))return!0;if(e.end){for(let t of e.end)if(t.type=== ` newline ` )return!0}return!1;case ` flow - collection ` :for(let t of e.items){for(let e of t.start)if(e.type=== ` newline ` )return!0;if(t.sep){for(let e of t.sep)if(e.type=== ` newline ` )return!0}if(q1 (t.key)||q1 (t.value))return!0}return!1;default:return!0}}function J1 (e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&q1 (t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function Y1 (e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||y Q(e)&&y Q(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var X1 = ` All mapping items must start at the same column ` ;function Z1 ({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??L $ )(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=K1 (l,{indicator: ` explicit - key - ind ` ,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type=== ` block - seq ` ?i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` A block sequence may not be used as an implicit map key ` ): ` indent ` in u&&u.indent!==r.indent&&i(s, ` BAD _INDENT ` ,X1 )),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||q1 (u))&&i(u??l[l.length-1], ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys need to be on a single line ` )}else p.found?.indent!==r.indent&&i(s, ` BAD _INDENT ` ,X1 );n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&J1 (r.indent,u,i),n.atKey=!1,Y1 (n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=K1 (d??[],{indicator: ` map - value - ind ` ,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type=== ` block - scalar ` });if(s=_.end,_.found){m&&(f?.type=== ` block - map ` &&!_.hasNewline&&i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` Nested mappings are not allowed in compact mappings ` ),n.options.strict&&p.start<_.found.offset-1024&&i(g.range, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit block mapping key ` ));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&J1 (r.indent,f,i),s=c.range[2];let l=new j $ (g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new j $ (g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c, ` IMPOSSIBLE ` , ` Map comment with trailing content ` ),o.range=[r.offset,s,c??s],o}function Q1 ({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??z $ )(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=K1 (a,{indicator: ` seq - item - ind ` ,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type=== ` block - seq ` ?i(u.end, ` BAD _INDENT ` , ` All sequence items must start at the same column ` ):i(s, ` MISSING _CHAR ` , ` Sequence item without - indicator ` );else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&J1 (r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function $ 1 (e,t,n,r){let i=` ` ;if(e){let a=!1,o= ` ` ;for(let s of e){let{source:e,type:c}=s;switch(c){case ` space ` :a=!0;break;case ` comment ` :{n&&!a&&r(s, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let t=e.substring(1)|| ` ` ;i?i+=o+t:i=t,o= ` ` ;break}case ` newline ` :i&&(o+=e),a=!0;break;default:r(s, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { c } at node end ` )}t+=e.length}}return{comment:i,offset:t}}var e 0= ` Block collections are not allowed within flow collections ` ,t 0=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function n 0({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?L $ :z $ ))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=K1 (d,{flow:s,indicator: ` explicit - key - ind ` ,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` ):a<r.items.length-1&&i(h.start, ` UNEXPECTED _TOKEN ` , ` Unexpected empty item in $ { s } ` ),h.comment&&(c.comment?c.comment+= `
` +h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&q1 (f)&&i(f, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` )}if(a===0)h.comma&&i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` );else if(h.comma||i(h.start, ` MISSING _CHAR ` , ` Missing , between $ { s } items ` ),h.comment){let e= ` ` ;loop:for(let t of d)switch(t.type){case ` comma ` :case ` space ` :break;case ` comment ` :e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];v Q(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],t 0(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,e 0)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);t 0(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,e 0),n.atKey=!1;let _=K1 (p??[],{flow:s,indicator: ` map - value - ind ` ,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type=== ` newline ` ){i(e, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` );break}}h.start<_.found.offset-1024&&i(_.found, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit flow sequence key ` )}}else m&&( ` source ` in m&&m.source?.[0]=== ` : ` ?i(m, ` MISSING _CHAR ` , ` Missing space after : in $ { s } ` ):i(_.start, ` MISSING _CHAR ` , ` Missing , or : between $ { s } items ` ));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?t 0(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,e 0):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new j $ (g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;Y1 (n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new L $ (n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o? ` } ` : ` ] ` ,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l? ` $ { e } must end with a $ { d } ` : ` $ { e } in block collection must be sufficiently indented and end with a $ { d } ` ;i(u,l? ` MISSING _CHAR ` : ` BAD _INDENT ` ,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e= $ 1 (p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
` +e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function r 0(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?Z1 (e,t,n,r,a):n.type=== ` block - seq ` ?Q1 (e,t,n,r,a):n 0(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function i 0(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e)):null;if(n.type=== ` block - seq ` ){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n, ` MISSING _CHAR ` , ` Missing newline after block sequence props ` )}let s=n.type=== ` block - map ` ? ` map ` :n.type=== ` block - seq ` ? ` seq ` :n.start.source=== ` { ` ? ` map ` : ` seq ` ;if(!a||!o||o=== ` ! ` ||o===L $ .tagName&&s=== ` map ` ||o===z $ .tagName&&s=== ` seq ` )return r 0(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a, ` BAD _COLLECTION _TYPE ` , ` $ { r . tag } used for $ { s } collection , but expects $ { r . collection ? ? ` scalar ` } ` ,!0):i(a, ` TAG _RESOLVE _FAILED ` , ` Unresolved tag : $ { o } ` ,!0),r 0(e,t,n,i,o)}let l=r 0(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=S Q(u)?u:new GQ (u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function a 0(e,t,n){let r=t.offset,i=o 0(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?GQ .BLOCK_FOLDED:GQ .BLOCK_LITERAL,o=t.source?s 0(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t=== ` ` ||t=== ` \ r ` )s=e;else break}if(s===0){let e=i.chomp=== ` + ` &&o.length>0? `
` }var Y 1=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,C Q,{value:v Q});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new U Q({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[C Q]:{value:v Q}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=j Q(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){X 1(this.contents)&&this.contents.add(e)}addIn(e,t){X 1(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=G Q(this);e.anchor=!t||n.has(t)?K Q(t|| ` a ` ,n):t}return new Z Q(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=q Q(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=r $ (e,l,p);return o&&A Q(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new B $ (this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return X 1(this.contents)?this.contents.delete(e):!1}deleteIn(e){return a $ (e)?this.contents!=null&&(this.contents=null,!0):X 1(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return A Q(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return a $ (e)?!t&&O Q(this.contents)?this.contents.value:this.contents:A Q(this.contents)?this.contents.getIn(e,t):void 0}has(e){return A Q(this.contents)?this.contents.has(e):!1}hasIn(e){return a $ (e)?this.contents!==void 0:A Q(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=i $ (this.schema,[e],t):X 1(this.contents)&&this.contents.set(e,t)}setIn(e,t){a $ (e)?this.contents=t:this.contents==null?this.contents=i $ (this.schema,Array.from(e),t):X 1(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e== ` number ` &&(e=String(e));let n;switch(e){case ` 1.1 ` :this.directives?this.directives.yaml.version= ` 1.1 ` :this.directives=new U Q({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new U Q({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new q 1(Object.assign(n,t));else throw Error( ` With a null YAML version , the { schema : Schema } option is required ` )}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r== ` number ` ?r:100},s=Y Q(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?J Q(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return J 1(this,e)}};function X 1(e){if(A Q(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var Z 1=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},Q 1=class extends Z 1{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}}, $ 1=class extends Z 1{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},e0 =(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+= ` at line $ { r } , column $ { i } ` ;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[ \n \r ]+ $ /, ` ` );if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o= ` … ` +o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+ ` … ` ),r>1&&/^ * $ /.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+ ` …
` ),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s= ` ` .repeat(a)+ ` ^ ` .repeat(e);n.message+= ` : \ n \ n$ { o } \ n$ { s } \ n ` }};function t0 (e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d= ` ` ,f= ` ` ,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!== ` space ` &&i.type!== ` newline ` &&i.type!== ` comma ` &&a(i.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),!1),h&&=(l&&i.type!== ` comment ` &&i.type!== ` newline ` &&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),null),i.type){case ` space ` :!t&&(n!== ` doc - start ` ||r?.type!== ` flow - collection ` )&&i.source.includes( ` ` )&&(h=i),u=!0;break;case ` comment ` :{u||a(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let e=i.source.substring(1)|| ` ` ;d?d+=f+e:d=e,f= ` ` ,l=!1;break}case ` newline ` :l?d?d+=i.source:(!b||n!== ` seq - item - ind ` )&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case ` anchor ` :g&&a(i, ` MULTIPLE _ANCHORS ` , ` A node can have at most one anchor ` ),i.source.endsWith( ` : ` )&&a(i.offset+i.source.length-1, ` BAD _ALIAS ` , ` Anchor ending in : is ambiguous ` ,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case ` tag ` :_&&a(i, ` MULTIPLE _TAGS ` , ` A node can have at most one tag ` ),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i, ` BAD _PROP _ORDER ` , ` Anchors and tags must be after the $ { i . source } indicator ` ),b&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . source } in $ { t ? ? ` collection ` } ` ),b=i,l=n=== ` seq - item - ind ` ||n=== ` explicit - key - ind ` ,u=!1;break;case ` comma ` :if(t){y&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { t } ` ),y=i,l=!1,u=!1;break}default:a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . type } token ` ),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!== ` space ` &&r.type!== ` newline ` &&r.type!== ` comma ` &&(r.type!== ` scalar ` ||r.source!== ` ` )&&a(r.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),h&&(l&&h.indent<=o||r?.type=== ` block - map ` ||r?.type=== ` block - seq ` )&&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function n0 (e){if(!e)return null;switch(e.type){case ` alias ` :case ` scalar ` :case ` double - quoted - scalar ` :case ` single - quoted - scalar ` :if(e.source.includes( `
` ))return!0;if(e.end){for(let t of e.end)if(t.type=== ` newline ` )return!0}return!1;case ` flow - collection ` :for(let t of e.items){for(let e of t.start)if(e.type=== ` newline ` )return!0;if(t.sep){for(let e of t.sep)if(e.type=== ` newline ` )return!0}if(n0 (t.key)||n0 (t.value))return!0}return!1;default:return!0}}function r0 (e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&n0 (t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function i0 (e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||O Q(e)&&O Q(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var a0 = ` All mapping items must start at the same column ` ;function o0 ({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??K $ )(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=t0 (l,{indicator: ` explicit - key - ind ` ,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type=== ` block - seq ` ?i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` A block sequence may not be used as an implicit map key ` ): ` indent ` in u&&u.indent!==r.indent&&i(s, ` BAD _INDENT ` ,a0 )),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||n0 (u))&&i(u??l[l.length-1], ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys need to be on a single line ` )}else p.found?.indent!==r.indent&&i(s, ` BAD _INDENT ` ,a0 );n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&r0 (r.indent,u,i),n.atKey=!1,i0 (n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=t0 (d??[],{indicator: ` map - value - ind ` ,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type=== ` block - scalar ` });if(s=_.end,_.found){m&&(f?.type=== ` block - map ` &&!_.hasNewline&&i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` Nested mappings are not allowed in compact mappings ` ),n.options.strict&&p.start<_.found.offset-1024&&i(g.range, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit block mapping key ` ));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&r0 (r.indent,f,i),s=c.range[2];let l=new B $ (g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new B $ (g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c, ` IMPOSSIBLE ` , ` Map comment with trailing content ` ),o.range=[r.offset,s,c??s],o}function s0 ({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??J $ )(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=t0 (a,{indicator: ` seq - item - ind ` ,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type=== ` block - seq ` ?i(u.end, ` BAD _INDENT ` , ` All sequence items must start at the same column ` ):i(s, ` MISSING _CHAR ` , ` Sequence item without - indicator ` );else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&r0 (r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function c0 (e,t,n,r){let i= ` ` ;if(e){let a=!1,o= ` ` ;for(let s of e){let{source:e,type:c}=s;switch(c){case ` space ` :a=!0;break;case ` comment ` :{n&&!a&&r(s, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let t=e.substring(1)|| ` ` ;i?i+=o+t:i=t,o= ` ` ;break}case ` newline ` :i&&(o+=e),a=!0;break;default:r(s, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { c } at node end ` )}t+=e.length}}return{comment:i,offset:t}}var l 0= ` Block collections are not allowed within flow collections ` ,u 0=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function d 0({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?K $ :J $ ))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=t0 (d,{flow:s,indicator: ` explicit - key - ind ` ,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` ):a<r.items.length-1&&i(h.start, ` UNEXPECTED _TOKEN ` , ` Unexpected empty item in $ { s } ` ),h.comment&&(c.comment?c.comment+= `
` +h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&n0 (f)&&i(f, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` )}if(a===0)h.comma&&i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` );else if(h.comma||i(h.start, ` MISSING _CHAR ` , ` Missing , between $ { s } items ` ),h.comment){let e= ` ` ;loop:for(let t of d)switch(t.type){case ` comma ` :case ` space ` :break;case ` comment ` :e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];D Q(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],u 0(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,l 0)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);u 0(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,l 0),n.atKey=!1;let _=t0 (p??[],{flow:s,indicator: ` map - value - ind ` ,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type=== ` newline ` ){i(e, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` );break}}h.start<_.found.offset-1024&&i(_.found, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit flow sequence key ` )}}else m&&( ` source ` in m&&m.source?.[0]=== ` : ` ?i(m, ` MISSING _CHAR ` , ` Missing space after : in $ { s } ` ):i(_.start, ` MISSING _CHAR ` , ` Missing , or : between $ { s } items ` ));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?u 0(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,l 0):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new B $ (g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;i0 (n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new K $ (n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o? ` } ` : ` ] ` ,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l? ` $ { e } must end with a $ { d } ` : ` $ { e } in block collection must be sufficiently indented and end with a $ { d } ` ;i(u,l? ` MISSING _CHAR ` : ` BAD _INDENT ` ,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=c0 (p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+= `
` +e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function f 0(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?o0 (e,t,n,r,a):n.type=== ` block - seq ` ?s0 (e,t,n,r,a):d 0(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function p 0(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e)):null;if(n.type=== ` block - seq ` ){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n, ` MISSING _CHAR ` , ` Missing newline after block sequence props ` )}let s=n.type=== ` block - map ` ? ` map ` :n.type=== ` block - seq ` ? ` seq ` :n.start.source=== ` { ` ? ` map ` : ` seq ` ;if(!a||!o||o=== ` ! ` ||o===K $ .tagName&&s=== ` map ` ||o===J $ .tagName&&s=== ` seq ` )return f 0(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a, ` BAD _COLLECTION _TYPE ` , ` $ { r . tag } used for $ { s } collection , but expects $ { r . collection ? ? ` scalar ` } ` ,!0):i(a, ` TAG _RESOLVE _FAILED ` , ` Unresolved tag : $ { o } ` ,!0),f 0(e,t,n,i,o)}let l=f 0(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=j Q(u)?u:new e $ (u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function m 0(e,t,n){let r=t.offset,i=h 0(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?e $ .BLOCK_FOLDED:e $ .BLOCK_LITERAL,o=t.source?g 0(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t=== ` ` ||t=== ` \ r ` )s=e;else break}if(s===0){let e=i.chomp=== ` + ` &&o.length>0? `
` .repeat(Math.max(1,o.length-1)): ` ` ,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a=== ` ` ||a=== ` \ r ` )i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length, ` MISSING _CHAR ` , ` Block scalars with more - indented leading empty lines must use an explicit indentation indicator ` ),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l, ` BAD _INDENT ` , ` Block scalar values in collections must be indented ` );break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d= ` ` ,f= ` ` ,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+ `
` ;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]=== ` \ r ` ;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e= ` Block scalar lines must not be less indented than their $ { i . indent ? ` explicit indentation indicator ` : ` first line ` } ` ;n(l-r.length-(s?2:1), ` BAD _INDENT ` ,e),t= ` ` }a===GQ .BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]=== ` \ r ` ;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e= ` Block scalar lines must not be less indented than their $ { i . indent ? ` explicit indentation indicator ` : ` first line ` } ` ;n(l-r.length-(s?2:1), ` BAD _INDENT ` ,e),t= ` ` }a===e $ .BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ):t.length>c||r[0]=== ` ` ?(f=== ` ` ?f= `
` :!p&&f=== `
` &&(f= `
@@ -245,59 +245,59 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
` +o[e][0].slice(c);d[d.length-1]!== `
` &&(d+= `
` );break;default:d+= `
` }let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function o 0({offset:e,props:t},n,r){if(t[0].type!== ` block - scalar - header ` )return r(t[0], ` IMPOSSIBLE ` , ` Block scalar header not found ` ),null;let{source:i}=t[0],a=i[0],o=0,s= ` ` ,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n=== ` - ` ||n=== ` + ` ))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c, ` UNEXPECTED _TOKEN ` , ` Block scalar header includes extra characters : $ { i } ` );let l=!1,u= ` ` ,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case ` space ` :l=!0;case ` newline ` :d+=i.source.length;break;case ` comment ` :n&&!l&&r(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` ),d+=i.source.length,u=i.source.substring(1);break;case ` error ` :r(i, ` UNEXPECTED _TOKEN ` ,i.message),d+=i.source.length;break;default:{r(i, ` UNEXPECTED _TOKEN ` , ` Unexpected token in block scalar header : $ { i . type } ` );let e=i.source;e&&typeof e== ` string ` &&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function s 0(e){let t=e.split(/ \n ( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[ ` ` ,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function c 0(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case ` scalar ` :s=GQ .PLAIN,c=l 0(a,l);break;case ` single - quoted - scalar ` :s=GQ .QUOTE_SINGLE,c=u 0(a,l);break;case ` double - quoted - scalar ` :s=GQ .QUOTE_DOUBLE,c=f 0(a,l);break;default:return n(e, ` UNEXPECTED _TOKEN ` , ` Expected a flow scalar value , but found : $ { i } ` ),{value: ` ` ,type:null,comment: ` ` ,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d= $ 1 (o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function l 0(e,t){let n=` ` ;switch(e[0]){case ` ` :n= ` a tab character ` ;break;case ` , ` :n= ` flow indicator character , ` ;break;case ` % ` :n= ` directive indicator character % ` ;break;case ` | ` :case ` > ` :n= ` block scalar indicator $ { e [ 0 ] } ` ;break;case ` @ ` :case" ` " : n = ` reserved character ${ e [ 0 ] } ` } return n && t ( 0 , ` BAD_SCALAR_START ` , ` Plain value cannot start with ${ n } ` ) , d0 ( e ) } function u0 ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , d0 ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function d0 ( e ) { let t = / ( . * ? ) \ r ? \ n / s y , n = t . e x e c ( e ) ; i f ( ! n ) r e t u r n e ; l e t r , i ; t r y { r = R e g E x p ( ` ( ? < ! [ ] ) [ ] + $ ` ) , i = R e g E x p ( ` ^ [ ] + | ( ? < ! [ ] ) [ ] + $ ` , ` g ` ) } c a t c h { r = / [ \ t ] + $ / , i = / ^ [ \ t ] + | [ \ t ] + $ / g } l e t a = n [ 1 ] . r e p l a c e ( r , ` ` ) , o = ` ` , s = t . l a s t I n d e x ; f o r ( ; n = t . e x e c ( e ) ; ) { l e t e = n [ 1 ] . r e p l a c e ( i , ` ` ) ; e = = = ` ` ? o = = = `
` }let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function h 0({offset:e,props:t},n,r){if(t[0].type!== ` block - scalar - header ` )return r(t[0], ` IMPOSSIBLE ` , ` Block scalar header not found ` ),null;let{source:i}=t[0],a=i[0],o=0,s= ` ` ,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n=== ` - ` ||n=== ` + ` ))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c, ` UNEXPECTED _TOKEN ` , ` Block scalar header includes extra characters : $ { i } ` );let l=!1,u= ` ` ,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case ` space ` :l=!0;case ` newline ` :d+=i.source.length;break;case ` comment ` :n&&!l&&r(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` ),d+=i.source.length,u=i.source.substring(1);break;case ` error ` :r(i, ` UNEXPECTED _TOKEN ` ,i.message),d+=i.source.length;break;default:{r(i, ` UNEXPECTED _TOKEN ` , ` Unexpected token in block scalar header : $ { i . type } ` );let e=i.source;e&&typeof e== ` string ` &&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function g 0(e){let t=e.split(/ \n ( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[ ` ` ,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function _ 0(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case ` scalar ` :s=e $ .PLAIN,c=v 0(a,l);break;case ` single - quoted - scalar ` :s=e $ .QUOTE_SINGLE,c=y 0(a,l);break;case ` double - quoted - scalar ` :s=e $ .QUOTE_DOUBLE,c=x 0(a,l);break;default:return n(e, ` UNEXPECTED _TOKEN ` , ` Expected a flow scalar value , but found : $ { i } ` ),{value: ` ` ,type:null,comment: ` ` ,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=c0 (o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function v 0(e,t){let n= ` ` ;switch(e[0]){case ` ` :n= ` a tab character ` ;break;case ` , ` :n= ` flow indicator character , ` ;break;case ` % ` :n= ` directive indicator character % ` ;break;case ` | ` :case ` > ` :n= ` block scalar indicator $ { e [ 0 ] } ` ;break;case ` @ ` :case" ` " : n = ` reserved character ${ e [ 0 ] } ` } return n && t ( 0 , ` BAD_SCALAR_START ` , ` Plain value cannot start with ${ n } ` ) , b0 ( e ) } function y0 ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , b0 ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function b0 ( e ) { let t = / ( . * ? ) \ r ? \ n / s y , n = t . e x e c ( e ) ; i f ( ! n ) r e t u r n e ; l e t r , i ; t r y { r = R e g E x p ( ` ( ? < ! [ ] ) [ ] + $ ` ) , i = R e g E x p ( ` ^ [ ] + | ( ? < ! [ ] ) [ ] + $ ` , ` g ` ) } c a t c h { r = / [ \ t ] + $ / , i = / ^ [ \ t ] + | [ \ t ] + $ / g } l e t a = n [ 1 ] . r e p l a c e ( r , ` ` ) , o = ` ` , s = t . l a s t I n d e x ; f o r ( ; n = t . e x e c ( e ) ; ) { l e t e = n [ 1 ] . r e p l a c e ( i , ` ` ) ; e = = = ` ` ? o = = = `
` ?a+=o:o= `
` :(a+=o+e,o= ` ` ),s=t.lastIndex}let c=/[ \t ]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]?? ` ` )}function f 0(e,t){let n= ` ` ;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!== ` \ r ` ||e[r+1]!== `
` :(a+=o+e,o= ` ` ),s=t.lastIndex}let c=/[ \t ]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]?? ` ` )}function x 0(e,t){let n= ` ` ;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!== ` \ r ` ||e[r+1]!== `
` ){if(i=== `
` ){let{fold:t,offset:i}=p 0(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=m 0[i];if(a)n+=a;else if(i=== `
` ){let{fold:t,offset:i}=S 0(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=C 0[i];if(a)n+=a;else if(i=== `
` )for(i=e[r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` \ r ` &&e[r+1]=== `
` )for(i=e[++r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` x ` ||i=== ` u ` ||i=== ` U ` ){let a=i=== ` x ` ?2:i=== ` u ` ?4:8;n+=h 0(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1, ` BAD _DQ _ESCAPE ` , ` Invalid escape sequence $ { i } ` ),n+=i}}else if(i=== ` ` ||i=== ` ` ){let t=r,a=e[r+1];for(;a=== ` ` ||a=== ` ` ;)a=e[++r+1];a!== `
` )for(i=e[++r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` x ` ||i=== ` u ` ||i=== ` U ` ){let a=i=== ` x ` ?2:i=== ` u ` ?4:8;n+=w 0(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1, ` BAD _DQ _ESCAPE ` , ` Invalid escape sequence $ { i } ` ),n+=i}}else if(i=== ` ` ||i=== ` ` ){let t=r,a=e[r+1];for(;a=== ` ` ||a=== ` ` ;)a=e[++r+1];a!== `
` &&(a!== ` \ r ` ||e[r+2]!== `
` )&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!== ` "`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing " quote ` ),n}function p 0(e,t){let n= ` ` ,r=e[t+1];for(;(r=== ` ` ||r=== ` ` ||r=== `
` )&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!== ` "`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing " quote ` ),n}function S 0(e,t){let n= ` ` ,r=e[t+1];for(;(r=== ` ` ||r=== ` ` ||r=== `
` ||r=== ` \ r ` )&&(r!== ` \ r ` ||e[t+2]=== `
` );)r=== `
` &&(n+= `
` ),t+=1,r=e[t+1];return n||= ` ` ,{fold:n,offset:t}}var m 0={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function h0 ( e , t , n , r ) { let i = e . substr ( t , n ) , a = i . length === n && /^[0-9a-fA-F]+$/ . test ( i ) ? parseInt ( i , 16 ) : NaN ; try { return String . fromCodePoint ( a ) } catch { let i = e . substr ( t - 2 , n + 2 ) ; return r ( t - 2 , ` BAD_DQ_ESCAPE ` , ` Invalid escape sequence ${ i } ` ) , i } } function g0 ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? a0 ( e , t , r ) : c0 ( t , e . options . strict , r ) , c = n ? e . directives . tagName ( n . source , e => r ( n , ` TAG_RESOLVE_FAILED ` , e ) ) : null , l ; l = e . options . stringKeys && e . atKey ? e . schema [ fQ ] : c ? _0 ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? v0 ( e , i , t , r ) : e . schema [ fQ ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = yQ ( a ) ? a : new GQ ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new GQ ( i ) } return u . range = s , u . source = i , a && ( u . type = a ) , c && ( u . tag = c ) , l . format && ( u . format = l . format ) , o && ( u . comment = o ) , u } function _0 ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ fQ ] ; let a = [ ] ; for ( let t of e . tags ) if ( ! t . collection && t . tag === n ) { if ( t . default && t . test ) a . push ( t ) ; else return t } for ( let e of a ) if ( e . test ? . test ( t ) ) return e ; let o = e . knownTags [ n ] ; return o && ! o . collection ? ( e . tags . push ( Object . assign ( { } , o , { default : ! 1 , test : void 0 } ) ) , o ) : ( i ( r , ` TAG_RESOLVE_FAILED ` , ` Unresolved tag: ${ n } ` , n !== ` tag:yaml.org,2002:str ` ) , e [ fQ ] ) } function v0 ( { atKey : e , directives : t , schema : n } , r , i , a ) { let o = n . tags . find ( t => ( t . default === ! 0 || e && t . default === ` key ` ) && t . test ? . test ( r ) ) || n [ fQ ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ fQ ] ; o . tag !== e . tag && a ( i , ` TAG_RESOLVE_FAILED ` , ` Value may be parsed as either ${ t . tagString ( o . tag ) } or ${ t . tagString ( e . tag ) } ` , ! 0 ) } return o } function y0 ( e , t , n ) { if ( t ) { n ? ? = t . length ; for ( let r = n - 1 ; r >= 0 ; -- r ) { let n = t [ r ] ; switch ( n . type ) { case ` space ` : case ` comment ` : case ` newline ` : e -= n . source . length ; continue } for ( n = t [ ++ r ] ; n ? . type === ` space ` ; ) e += n . source . length , n = t [ ++ r ] ; break } } return e } var b0 = { composeNode : x0 , composeEmptyNode : S0 } ; function x0 ( e , t , n , r ) { let i = e . atKey , { spaceBefore : a , comment : o , anchor : s , tag : c } = n , l , u = ! 0 ; switch ( t . type ) { case ` alias ` : l = C0 ( e , t , r ) , ( s || c ) && r ( t , ` ALIAS_PROPS ` , ` An alias node must not specify any properties ` ) ; break ; case ` scalar ` : case ` single-quoted-scalar ` : case ` double-quoted-scalar ` : case ` block-scalar ` : l = g0 ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = i0 ( b0 , e , t , n , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) } catch ( e ) { r ( t , ` RESOURCE_EXHAUSTION ` , e instanceof Error ? e . message : String ( e ) ) } break ; default : r ( t , ` UNEXPECTED_TOKEN ` , t . type === ` error ` ? t . message : ` Unsupported token (type: ${ t . type } ) ` ) , u = ! 1 } return l ? ? = S0 ( e , t . offset , void 0 , null , n , r ) , s && l . anchor === ` ` && r ( s , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) , i && e . options . stringKeys && ( ! yQ ( l ) || typeof l . value != ` string ` || l . tag && l . tag !== ` tag:yaml.org,2002:str ` ) && r ( c ? ? t , ` NON_STRING_KEY ` , ` With stringKeys, all keys must be strings ` ) , a && ( l . spaceBefore = ! 0 ) , o && ( t . type === ` scalar ` && t . source === ` ` ? l . comment = o : l . commentBefore = o ) , e . options . keepSourceTokens && u && ( l . srcToken = t ) , l } function S0 ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = g0 ( e , { type : ` scalar ` , offset : y0 ( t , n , r ) , indent : - 1 , source : ` ` } , s , l ) ; return o && ( u . anchor = o . source . substring ( 1 ) , u . anchor === ` ` && l ( o , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) ) , i && ( u . spaceBefore = ! 0 ) , a && ( u . comment = a , u . range [ 2 ] = c ) , u } function C0 ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new HQ ( n . substring ( 1 ) ) ; a . source === ` ` && i ( t , ` BAD_ALIAS ` , ` Alias cannot be an empty string ` ) , a . source . endsWith ( ` : ` ) && i ( t + n . length - 1 , ` BAD_ALIAS ` , ` Alias ending in : is ambiguous ` , ! 0 ) ; let o = t + n . length , s = $1 ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function w0 ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new B1 ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = K1 ( r , { indicator : ` doc-start ` , next : i ? ? a ? . [ 0 ] , offset : n , onError : o , parentIndent : 0 , startOnNewline : ! 0 } ) ; l . found && ( s . directives . docStart = ! 0 , i && ( i . type === ` block-map ` || i . type === ` block-seq ` ) && ! l . hasNewline && o ( l . end , ` MISSING_CHAR ` , ` Block collection cannot start on same line with directives-end marker ` ) ) , s . contents = i ? x0 ( c , i , l , o ) : S0 ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = $1 ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function T0 ( e ) { if ( typeof e == ` number ` ) return [ e , e + 1 ] ; if ( Array . isArray ( e ) ) return e . length === 2 ? e : [ e [ 0 ] , e [ 1 ] ] ; let { offset : t , source : n } = e ; return [ t , t + ( typeof n == ` string ` ? n . length : 1 ) ] } function E0 ( e ) { let t = ` ` , n = ! 1 , r = ! 1 ; for ( let i = 0 ; i < e . length ; ++ i ) { let a = e [ i ] ; switch ( a [ 0 ] ) { case ` # ` : t += ( t === ` ` ? ` ` : r ? `
` ),t+=1,r=e[t+1];return n||= ` ` ,{fold:n,offset:t}}var C 0={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function w0 ( e , t , n , r ) { let i = e . substr ( t , n ) , a = i . length === n && /^[0-9a-fA-F]+$/ . test ( i ) ? parseInt ( i , 16 ) : NaN ; try { return String . fromCodePoint ( a ) } catch { let i = e . substr ( t - 2 , n + 2 ) ; return r ( t - 2 , ` BAD_DQ_ESCAPE ` , ` Invalid escape sequence ${ i } ` ) , i } } function T0 ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? m0 ( e , t , r ) : _0 ( t , e . options . strict , r ) , c = n ? e . directives . tagName ( n . source , e => r ( n , ` TAG_RESOLVE_FAILED ` , e ) ) : null , l ; l = e . options . stringKeys && e . atKey ? e . schema [ xQ ] : c ? E0 ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? D0 ( e , i , t , r ) : e . schema [ xQ ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = OQ ( a ) ? a : new e$ ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new e$ ( i ) } return u . range = s , u . source = i , a && ( u . type = a ) , c && ( u . tag = c ) , l . format && ( u . format = l . format ) , o && ( u . comment = o ) , u } function E0 ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ xQ ] ; let a = [ ] ; for ( let t of e . tags ) if ( ! t . collection && t . tag === n ) { if ( t . default && t . test ) a . push ( t ) ; else return t } for ( let e of a ) if ( e . test ? . test ( t ) ) return e ; let o = e . knownTags [ n ] ; return o && ! o . collection ? ( e . tags . push ( Object . assign ( { } , o , { default : ! 1 , test : void 0 } ) ) , o ) : ( i ( r , ` TAG_RESOLVE_FAILED ` , ` Unresolved tag: ${ n } ` , n !== ` tag:yaml.org,2002:str ` ) , e [ xQ ] ) } function D0 ( { atKey : e , directives : t , schema : n } , r , i , a ) { let o = n . tags . find ( t => ( t . default === ! 0 || e && t . default === ` key ` ) && t . test ? . test ( r ) ) || n [ xQ ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ xQ ] ; o . tag !== e . tag && a ( i , ` TAG_RESOLVE_FAILED ` , ` Value may be parsed as either ${ t . tagString ( o . tag ) } or ${ t . tagString ( e . tag ) } ` , ! 0 ) } return o } function O0 ( e , t , n ) { if ( t ) { n ? ? = t . length ; for ( let r = n - 1 ; r >= 0 ; -- r ) { let n = t [ r ] ; switch ( n . type ) { case ` space ` : case ` comment ` : case ` newline ` : e -= n . source . length ; continue } for ( n = t [ ++ r ] ; n ? . type === ` space ` ; ) e += n . source . length , n = t [ ++ r ] ; break } } return e } var k0 = { composeNode : A0 , composeEmptyNode : j0 } ; function A0 ( e , t , n , r ) { let i = e . atKey , { spaceBefore : a , comment : o , anchor : s , tag : c } = n , l , u = ! 0 ; switch ( t . type ) { case ` alias ` : l = M0 ( e , t , r ) , ( s || c ) && r ( t , ` ALIAS_PROPS ` , ` An alias node must not specify any properties ` ) ; break ; case ` scalar ` : case ` single-quoted-scalar ` : case ` double-quoted-scalar ` : case ` block-scalar ` : l = T0 ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = p0 ( k0 , e , t , n , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) } catch ( e ) { r ( t , ` RESOURCE_EXHAUSTION ` , e instanceof Error ? e . message : String ( e ) ) } break ; default : r ( t , ` UNEXPECTED_TOKEN ` , t . type === ` error ` ? t . message : ` Unsupported token (type: ${ t . type } ) ` ) , u = ! 1 } return l ? ? = j0 ( e , t . offset , void 0 , null , n , r ) , s && l . anchor === ` ` && r ( s , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) , i && e . options . stringKeys && ( ! OQ ( l ) || typeof l . value != ` string ` || l . tag && l . tag !== ` tag:yaml.org,2002:str ` ) && r ( c ? ? t , ` NON_STRING_KEY ` , ` With stringKeys, all keys must be strings ` ) , a && ( l . spaceBefore = ! 0 ) , o && ( t . type === ` scalar ` && t . source === ` ` ? l . comment = o : l . commentBefore = o ) , e . options . keepSourceTokens && u && ( l . srcToken = t ) , l } function j0 ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = T0 ( e , { type : ` scalar ` , offset : O0 ( t , n , r ) , indent : - 1 , source : ` ` } , s , l ) ; return o && ( u . anchor = o . source . substring ( 1 ) , u . anchor === ` ` && l ( o , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) ) , i && ( u . spaceBefore = ! 0 ) , a && ( u . comment = a , u . range [ 2 ] = c ) , u } function M0 ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new ZQ ( n . substring ( 1 ) ) ; a . source === ` ` && i ( t , ` BAD_ALIAS ` , ` Alias cannot be an empty string ` ) , a . source . endsWith ( ` : ` ) && i ( t + n . length - 1 , ` BAD_ALIAS ` , ` Alias ending in : is ambiguous ` , ! 0 ) ; let o = t + n . length , s = c0 ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function N0 ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new Y1 ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = t0 ( r , { indicator : ` doc-start ` , next : i ? ? a ? . [ 0 ] , offset : n , onError : o , parentIndent : 0 , startOnNewline : ! 0 } ) ; l . found && ( s . directives . docStart = ! 0 , i && ( i . type === ` block-map ` || i . type === ` block-seq ` ) && ! l . hasNewline && o ( l . end , ` MISSING_CHAR ` , ` Block collection cannot start on same line with directives-end marker ` ) ) , s . contents = i ? A0 ( c , i , l , o ) : j0 ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = c0 ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function P0 ( e ) { if ( typeof e == ` number ` ) return [ e , e + 1 ] ; if ( Array . isArray ( e ) ) return e . length === 2 ? e : [ e [ 0 ] , e [ 1 ] ] ; let { offset : t , source : n } = e ; return [ t , t + ( typeof n == ` string ` ? n . length : 1 ) ] } function F0 ( e ) { let t = ` ` , n = ! 1 , r = ! 1 ; for ( let i = 0 ; i < e . length ; ++ i ) { let a = e [ i ] ; switch ( a [ 0 ] ) { case ` # ` : t += ( t === ` ` ? ` ` : r ? `
` : `
` )+(a.substring(1)|| ` ` ),n=!0,r=!1;break;case ` % ` :e[i+1]?.[0]!== ` # ` &&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var D 0=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=T 0(e);r?this.warnings.push(new W 1(i,t,n)):this.errors.push(new U 1(i,t,n))},this.directives=new P Q({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=E 0(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment? ` $ { e . comment } \ n$ { n } ` :n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(x Q(i)&&!i.flow&&i.items.length>0){let e=i.items[0];v Q(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:E 0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case ` directive ` :this.directives.add(e.source,(t,n,r)=>{let i=T 0(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=w 0(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e, ` MISSING _CHAR ` , ` Missing directives - end / doc - start indicator line ` ),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case ` byte - order - mark ` :case ` space ` :break;case ` comment ` :case ` newline ` :this.prelude.push(e.source);break;case ` error ` :{let t=e.source? ` $ { e . message } : $ { JSON . stringify ( e . source ) } ` :e.message,n=new U 1(T 0(e), ` UNEXPECTED _TOKEN ` ,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case ` doc - end ` :{if(!this.doc){this.errors.push(new U 1(T 0(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t= $ 1 (e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?` $ { e } \ n$ { t . comment } ` :t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new U 1(T 0(e), ` UNEXPECTED _TOKEN ` , ` Unsupported token $ { e . type } ` ))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new B 1(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t, ` MISSING _CHAR ` , ` Missing directives - end indicator line ` ),e.range=[0,t,t],this.decorate(e,!1),yield e}}},O 0=Symbol( ` break visit ` ),k 0=Symbol( ` skip children ` ),A 0=Symbol( ` remove item ` );function j 0(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),M 0(Object.freeze([]),e,t)}j 0.BREAK=O 0,j 0.SKIP=k 0,j 0.REMOVE=A 0,j 0.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&& ` items ` in t)n=t.items[r];else return}return n},j 0.parentCollection=(e,t)=>{let n=j 0.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&& ` items ` in i)return i;throw Error( ` Parent collection not found ` )};function M 0(e,t,n){let r=n(t,e);if(typeof r== ` symbol ` )return r;for(let i of[ ` key ` , ` value ` ]){let a=t[i];if(a&& ` items ` in a){for(let t=0;t<a.items.length;++t){let r=M 0(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===O 0)return O 0;else r===A 0&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function N 0(e){switch(e){case ` ` :return ` byte - order - mark ` ;case ` ` :return ` doc - mode ` ;case ` ` :return ` flow - error - end ` ;case ` ` :return ` scalar ` ;case ` -- - ` :return ` doc - start ` ;case ` ... ` :return ` doc - end ` ;case ` ` :case `
` )+(a.substring(1)|| ` ` ),n=!0,r=!1;break;case ` % ` :e[i+1]?.[0]!== ` # ` &&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var I 0=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=P 0(e);r?this.warnings.push(new $ 1(i,t,n)):this.errors.push(new Q 1(i,t,n))},this.directives=new U Q({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=F 0(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment? ` $ { e . comment } \ n$ { n } ` :n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(A Q(i)&&!i.flow&&i.items.length>0){let e=i.items[0];D Q(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:F 0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case ` directive ` :this.directives.add(e.source,(t,n,r)=>{let i=P 0(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=N 0(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e, ` MISSING _CHAR ` , ` Missing directives - end / doc - start indicator line ` ),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case ` byte - order - mark ` :case ` space ` :break;case ` comment ` :case ` newline ` :this.prelude.push(e.source);break;case ` error ` :{let t=e.source? ` $ { e . message } : $ { JSON . stringify ( e . source ) } ` :e.message,n=new Q 1(P 0(e), ` UNEXPECTED _TOKEN ` ,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case ` doc - end ` :{if(!this.doc){this.errors.push(new Q 1(P 0(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=c0 (e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e? ` $ { e } \ n$ { t . comment } ` :t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Q 1(P 0(e), ` UNEXPECTED _TOKEN ` , ` Unsupported token $ { e . type } ` ))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new Y 1(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t, ` MISSING _CHAR ` , ` Missing directives - end indicator line ` ),e.range=[0,t,t],this.decorate(e,!1),yield e}}},L 0=Symbol( ` break visit ` ),R 0=Symbol( ` skip children ` ),z 0=Symbol( ` remove item ` );function B 0(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),V 0(Object.freeze([]),e,t)}B 0.BREAK=L 0,B 0.SKIP=R 0,B 0.REMOVE=z 0,B 0.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&& ` items ` in t)n=t.items[r];else return}return n},B 0.parentCollection=(e,t)=>{let n=B 0.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&& ` items ` in i)return i;throw Error( ` Parent collection not found ` )};function V 0(e,t,n){let r=n(t,e);if(typeof r== ` symbol ` )return r;for(let i of[ ` key ` , ` value ` ]){let a=t[i];if(a&& ` items ` in a){for(let t=0;t<a.items.length;++t){let r=V 0(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===L 0)return L 0;else r===z 0&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function H 0(e){switch(e){case ` ` :return ` byte - order - mark ` ;case ` ` :return ` doc - mode ` ;case ` ` :return ` flow - error - end ` ;case ` ` :return ` scalar ` ;case ` -- - ` :return ` doc - start ` ;case ` ... ` :return ` doc - end ` ;case ` ` :case `
` :case ` \ r
` :return ` newline ` ;case ` - ` :return ` seq - item - ind ` ;case ` ? ` :return ` explicit - key - ind ` ;case ` : ` :return ` map - value - ind ` ;case ` { ` :return ` flow - map - start ` ;case ` } ` :return ` flow - map - end ` ;case ` [ ` :return ` flow - seq - start ` ;case ` ] ` :return ` flow - seq - end ` ;case ` , ` :return ` comma ` }switch(e[0]){case ` ` :case ` ` :return ` space ` ;case ` # ` :return ` comment ` ;case ` % ` :return ` directive - line ` ;case ` * ` :return ` alias ` ;case ` & ` :return ` anchor ` ;case ` ! ` :return ` tag ` ;case ` ' ` :return ` single - quoted - scalar ` ;case ` " ` :return ` double - quoted - scalar ` ;case ` | ` :case ` > ` :return ` block - scalar - header ` }return null}function P 0(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var F 0=new Set( ` 0123456789 ABCDEFabcdef ` ),I 0=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , L 0 = n e w S e t ( ` , [ ] { } ` ) , R 0 = n e w S e t ( ` , [ ] { }
\ r ` ),z 0=e=>!e||R 0.has(e),B 0=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer= ` ` ,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!= ` string ` )throw TypeError( ` source is not a string ` );this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next?? ` stream ` ;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t=== ` ` ||t=== ` ` ;)t=this.buffer[++e];return!t||t=== ` # ` ||t=== `
` :return ` newline ` ;case ` - ` :return ` seq - item - ind ` ;case ` ? ` :return ` explicit - key - ind ` ;case ` : ` :return ` map - value - ind ` ;case ` { ` :return ` flow - map - start ` ;case ` } ` :return ` flow - map - end ` ;case ` [ ` :return ` flow - seq - start ` ;case ` ] ` :return ` flow - seq - end ` ;case ` , ` :return ` comma ` }switch(e[0]){case ` ` :case ` ` :return ` space ` ;case ` # ` :return ` comment ` ;case ` % ` :return ` directive - line ` ;case ` * ` :return ` alias ` ;case ` & ` :return ` anchor ` ;case ` ! ` :return ` tag ` ;case ` ' ` :return ` single - quoted - scalar ` ;case ` " ` :return ` double - quoted - scalar ` ;case ` | ` :case ` > ` :return ` block - scalar - header ` }return null}function U 0(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var W 0=new Set( ` 0123456789 ABCDEFabcdef ` ),G 0=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , K 0 = n e w S e t ( ` , [ ] { } ` ) , q 0 = n e w S e t ( ` , [ ] { }
\ r ` ),J 0=e=>!e||q 0.has(e),Y 0=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer= ` ` ,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!= ` string ` )throw TypeError( ` source is not a string ` );this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next?? ` stream ` ;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t=== ` ` ||t=== ` ` ;)t=this.buffer[++e];return!t||t=== ` # ` ||t=== `
` ||t=== ` \ r ` &&this.buffer[e+1]=== `
` }charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t=== ` ` ;)t=this.buffer[++n+e];if(t=== ` \ r ` ){let t=this.buffer[n+e+1];if(t=== `
` ||!t&&!this.atEnd)return e+n+1}return t=== `
` ||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t=== ` - ` ||t=== ` . ` ){let t=this.buffer.substr(e,3);if((t=== ` -- - ` ||t=== ` ... ` )&&P 0(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!= ` number ` ||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf( `
` ,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]=== ` \ r ` &&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case ` stream ` :return yield*this.parseStream();case ` line - start ` :return yield*this.parseLineStart();case ` block - start ` :return yield*this.parseBlockStart();case ` doc ` :return yield*this.parseDocument();case ` flow ` :return yield*this.parseFlowCollection();case ` quoted - scalar ` :return yield*this.parseQuotedScalar();case ` block - scalar ` :return yield*this.parseBlockScalar();case ` plain - scalar ` :return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext( ` stream ` );if(e[0]=== ` ` &&(yield*this.pushCount(1),e=e.substring(1)),e[0]=== ` % ` ){let t=e.length,n=e.indexOf( ` # ` );for(;n!==-1;){let r=e[n-1];if(r=== ` ` ||r=== ` ` ){t=n-1;break}n=e.indexOf( ` # ` ,n+1)}for(;;){let n=e[t-1];if(n=== ` ` ||n=== ` ` )--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(), ` stream ` }if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(), ` stream ` }return yield ` ` ,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext( ` line - start ` );if(e=== ` - ` ||e=== ` . ` ){if(!this.atEnd&&!this.hasChars(4))return this.setNext( ` line - start ` );let e=this.peek(3);if((e=== ` -- - ` ||e=== ` ... ` )&&P 0(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e=== ` -- - ` ? ` doc ` : ` stream ` }return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!P 0(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext( ` block - start ` );if((e=== ` - ` ||e=== ` ? ` ||e=== ` : ` )&&P 0(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e, ` block - start ` }return ` doc ` }*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext( ` doc ` );let t=yield*this.pushIndicators();switch(e[t]){case ` # ` :yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case ` { ` :case ` [ ` :return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1, ` flow ` ;case ` } ` :case ` ] ` :return yield*this.pushCount(1), ` doc ` ;case ` * ` :return yield*this.pushUntil(z 0), ` doc ` ;case ` "`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&P 0(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield` `,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(z 0),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||P 0(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`' ` )for(;t!==-1&&this.buffer[t+1]=== ` '`;)t=this.buffer.indexOf(`' ` ,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]=== ` \ \ ` ;)e+=1;if(e%2==0)break;t=this.buffer.indexOf( ` " ` ,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf( `
` ||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t=== ` - ` ||t=== ` . ` ){let t=this.buffer.substr(e,3);if((t=== ` -- - ` ||t=== ` ... ` )&&U 0(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!= ` number ` ||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf( `
` ,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]=== ` \ r ` &&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case ` stream ` :return yield*this.parseStream();case ` line - start ` :return yield*this.parseLineStart();case ` block - start ` :return yield*this.parseBlockStart();case ` doc ` :return yield*this.parseDocument();case ` flow ` :return yield*this.parseFlowCollection();case ` quoted - scalar ` :return yield*this.parseQuotedScalar();case ` block - scalar ` :return yield*this.parseBlockScalar();case ` plain - scalar ` :return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext( ` stream ` );if(e[0]=== ` ` &&(yield*this.pushCount(1),e=e.substring(1)),e[0]=== ` % ` ){let t=e.length,n=e.indexOf( ` # ` );for(;n!==-1;){let r=e[n-1];if(r=== ` ` ||r=== ` ` ){t=n-1;break}n=e.indexOf( ` # ` ,n+1)}for(;;){let n=e[t-1];if(n=== ` ` ||n=== ` ` )--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(), ` stream ` }if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(), ` stream ` }return yield ` ` ,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext( ` line - start ` );if(e=== ` - ` ||e=== ` . ` ){if(!this.atEnd&&!this.hasChars(4))return this.setNext( ` line - start ` );let e=this.peek(3);if((e=== ` -- - ` ||e=== ` ... ` )&&U 0(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e=== ` -- - ` ? ` doc ` : ` stream ` }return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!U 0(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext( ` block - start ` );if((e=== ` - ` ||e=== ` ? ` ||e=== ` : ` )&&U 0(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e, ` block - start ` }return ` doc ` }*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext( ` doc ` );let t=yield*this.pushIndicators();switch(e[t]){case ` # ` :yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case ` { ` :case ` [ ` :return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1, ` flow ` ;case ` } ` :case ` ] ` :return yield*this.pushCount(1), ` doc ` ;case ` * ` :return yield*this.pushUntil(J 0), ` doc ` ;case ` "`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&U 0(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield` `,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(J 0),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||U 0(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`' ` )for(;t!==-1&&this.buffer[t+1]=== ` '`;)t=this.buffer.indexOf(`' ` ,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]=== ` \ \ ` ;)e+=1;if(e%2==0)break;t=this.buffer.indexOf( ` " ` ,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf( `
` ,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf( `
` ,e)}r!==-1&&(t=r-(n[r-1]=== ` \ r ` ?2:1))}if(t===-1){if(!this.atEnd)return this.setNext( ` quoted - scalar ` );t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel? ` flow ` : ` doc ` }*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t=== ` + ` )this.blockScalarKeep=!0;else if(t> ` 0 ` &&t<= ` 9 ` )this.blockScalarIndent=Number(t)-1;else if(t!== ` - ` )break}return yield*this.pushUntil(e=>P 0(e)||e=== ` # ` )}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case ` ` :t+=1;break;case `
` ,e)}r!==-1&&(t=r-(n[r-1]=== ` \ r ` ?2:1))}if(t===-1){if(!this.atEnd)return this.setNext( ` quoted - scalar ` );t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel? ` flow ` : ` doc ` }*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t=== ` + ` )this.blockScalarKeep=!0;else if(t> ` 0 ` &&t<= ` 9 ` )this.blockScalarIndent=Number(t)-1;else if(t!== ` - ` )break}return yield*this.pushUntil(e=>U 0(e)||e=== ` # ` )}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case ` ` :t+=1;break;case `
` :e=r,t=0;break;case ` \ r ` :{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext( ` block - scalar ` );if(e=== `
` )break}default:break loop}if(!n&&!this.atEnd)return this.setNext( ` block - scalar ` );if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf( `
` ,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext( ` block - scalar ` );e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n=== ` ` ;)n=this.buffer[++r];if(n=== ` ` ){for(;n=== ` ` ||n=== ` ` ||n=== ` \ r ` ||n=== `
` ;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r=== ` \ r ` &&(r=this.buffer[--n]);let i=n;for(;r=== ` ` ;)r=this.buffer[--n];if(r=== `
` &&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield ` ` ,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r=== ` : ` ){let r=this.buffer[n+1];if(P 0(r)||e&&L 0.has(r))break;t=n}else if(P 0(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` &&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield ` ` ,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r=== ` : ` ){let r=this.buffer[n+1];if(U 0(r)||e&&K 0.has(r))break;t=n}else if(U 0(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` ?(n+=1,r= `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&L 0.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&L 0.has(r))break;t=n}return!r&&!this.atEnd?this.setNext( ` plain - scalar ` ):(yield ` ` ,yield*this.pushToIndex(t+1,!0),e? ` flow ` : ` doc ` )}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield ` ` ),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case ` ! ` :e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case ` & ` :e+=yield*this.pushUntil(z 0),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(P 0(n)||t&&L 0.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)=== ` < ` ){let e=this.pos+2,t=this.buffer[e];for(;!P 0(t)&&t!== ` > ` ;)t=this.buffer[++e];return yield*this.pushToIndex(t=== ` > ` ?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(I 0.has(t))t=this.buffer[++e];else if(t=== ` % ` &&F 0.has(this.buffer[e+1])&&F 0.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e=== `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&K 0.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&K 0.has(r))break;t=n}return!r&&!this.atEnd?this.setNext( ` plain - scalar ` ):(yield ` ` ,yield*this.pushToIndex(t+1,!0),e? ` flow ` : ` doc ` )}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield ` ` ),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case ` ! ` :e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case ` & ` :e+=yield*this.pushUntil(J 0),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(U 0(n)||t&&K 0.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)=== ` < ` ){let e=this.pos+2,t=this.buffer[e];for(;!U 0(t)&&t!== ` > ` ;)t=this.buffer[++e];return yield*this.pushToIndex(t=== ` > ` ?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(G 0.has(t))t=this.buffer[++e];else if(t=== ` % ` &&W 0.has(this.buffer[e+1])&&W 0.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e=== `
` ?yield*this.pushCount(1):e=== ` \ r ` &&this.charAt(1)=== `
` ?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n=== ` ` ||e&&n=== ` ` );let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},V0=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function H0(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function U0(e){for(let t=0;t<e.length;++t)switch(e[t].type){case ` space ` :case ` comment ` :case ` newline ` :break;default:return t}return-1}function W0(e){switch(e?.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :case ` flow - collection ` :return!0;default:return!1}}function G0(e){switch(e.type){case ` document ` :return e.start;case ` block - map ` :{let t=e.items[e.items.length-1];return t.sep??t.start}case ` block - seq ` :return e.items[e.items.length-1].start;default:return[]}}function K0(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case ` doc - start ` :case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :case ` newline ` :break loop}for(;e[++t]?.type=== ` space ` ;);return e.splice(t,e.length)}function q0(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function J0(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!H0(t.start, ` explicit - key - ind ` )&&!H0(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,W0(t.value)?t.value.end?q0(t.value.end,t.sep):t.value.end=t.sep:q0(t.start,t.sep),delete t.sep)}var Y0=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source= ` ` ,this.type= ` ` ,this.lexer=new B0,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=N0(e);if(!t){let t= ` Not a YAML token : $ { e } ` ;yield*this.pop({type: ` error ` ,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t=== ` scalar ` )this.atNewLine=!1,this.atScalar=!0,this.type= ` scalar ` ;else{switch(this.type=t,yield*this.step(),t){case ` newline ` :this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case ` space ` :this.atNewLine&&e[0]=== ` ` &&(this.indent+=e.length);break;case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :this.atNewLine&&(this.indent+=e.length);break;case ` doc - mode ` :case ` flow - error - end ` :return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type=== ` doc - end ` &&e?.type!== ` doc - end ` ){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type: ` doc - end ` ,offset:this.offset,source:this.source})}else{if(!e)return yield*this.stream();switch(e.type){case ` document ` :return yield*this.document(e);case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return yield*this.scalar(e);case ` block - scalar ` :return yield*this.blockScalar(e);case ` block - map ` :return yield*this.blockMap(e);case ` block - seq ` :return yield*this.blockSequence(e);case ` flow - collection ` :return yield*this.flowCollection(e);case ` doc - end ` :return yield*this.documentEnd(e)}yield*this.pop()}}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type: ` error ` ,offset:this.offset,source: ` ` ,message: ` Tried to pop an empty stack ` };else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type=== ` block - scalar ` ?t.indent= ` indent ` in e?e.indent:0:t.type=== ` flow - collection ` &&e.type=== ` document ` &&(t.indent=0),t.type=== ` flow - collection ` &&J0(t),e.type){case ` document ` :e.value=t;break;case ` block - scalar ` :e.props.push(t);break;case ` block - map ` :{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case ` block - seq ` :{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case ` flow - collection ` :{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type=== ` document ` ||e.type=== ` block - map ` ||e.type=== ` block - seq ` )&&(t.type=== ` block - map ` ||t.type=== ` block - seq ` )){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&U0(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.in
Line truncated
` ?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n=== ` ` ||e&&n=== ` ` );let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},X0=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function Z0(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Q0(e){for(let t=0;t<e.length;++t)switch(e[t].type){case ` space ` :case ` comment ` :case ` newline ` :break;default:return t}return-1}function $ 0(e){switch(e?.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :case ` flow - collection ` :return!0;default:return!1}}function e2(e){switch(e.type){case ` document ` :return e.start;case ` block - map ` :{let t=e.items[e.items.length-1];return t.sep??t.start}case ` block - seq ` :return e.items[e.items.length-1].start;default:return[]}}function t2(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case ` doc - start ` :case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :case ` newline ` :break loop}for(;e[++t]?.type=== ` space ` ;);return e.splice(t,e.length)}function n2(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function r2(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!Z0(t.start, ` explicit - key - ind ` )&&!Z0(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key, $ 0(t.value)?t.value.end?n2(t.value.end,t.sep):t.value.end=t.sep:n2(t.start,t.sep),delete t.sep)}var i2=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source= ` ` ,this.type= ` ` ,this.lexer=new Y0,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=H0(e);if(!t){let t= ` Not a YAML token : $ { e } ` ;yield*this.pop({type: ` error ` ,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t=== ` scalar ` )this.atNewLine=!1,this.atScalar=!0,this.type= ` scalar ` ;else{switch(this.type=t,yield*this.step(),t){case ` newline ` :this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case ` space ` :this.atNewLine&&e[0]=== ` ` &&(this.indent+=e.length);break;case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :this.atNewLine&&(this.indent+=e.length);break;case ` doc - mode ` :case ` flow - error - end ` :return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type=== ` doc - end ` &&e?.type!== ` doc - end ` ){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type: ` doc - end ` ,offset:this.offset,source:this.source})}else{if(!e)return yield*this.stream();switch(e.type){case ` document ` :return yield*this.document(e);case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return yield*this.scalar(e);case ` block - scalar ` :return yield*this.blockScalar(e);case ` block - map ` :return yield*this.blockMap(e);case ` block - seq ` :return yield*this.blockSequence(e);case ` flow - collection ` :return yield*this.flowCollection(e);case ` doc - end ` :return yield*this.documentEnd(e)}yield*this.pop()}}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type: ` error ` ,offset:this.offset,source: ` ` ,message: ` Tried to pop an empty stack ` };else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type=== ` block - scalar ` ?t.indent= ` indent ` in e?e.indent:0:t.type=== ` flow - collection ` &&e.type=== ` document ` &&(t.indent=0),t.type=== ` flow - collection ` &&r2(t),e.type){case ` document ` :e.value=t;break;case ` block - scalar ` :e.props.push(t);break;case ` block - map ` :{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case ` block - seq ` :{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case ` flow - collection ` :{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type=== ` document ` ||e.type=== ` block - map ` ||e.type=== ` block - seq ` )&&(t.type=== ` block - map ` ||t.type=== ` block - seq ` )){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Q0(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.in
Line truncated
` )+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf( `
` ,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(this.onKeyLine=!1,t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){q0(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!== ` seq - item - ind ` ,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case ` newline ` :n.push(r);break;case ` space ` :break;case ` comment ` :i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case ` anchor ` :case ` tag ` :r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` explicit - key - ind ` :!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case ` map - value - ind ` :if(t.explicitKey){if(!t.sep){if(H0(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=K0(t.start);this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(H0(t.sep, ` map - value - ind ` ))this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(W0(t.key)&&!H0(t.sep, ` newline ` )){let e=K0(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):H0(t.sep, ` map - value - ind ` )?this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type=== ` block - seq ` ){if(!t.explicitKey&&t.sep&&!H0(t.sep, ` newline ` )){yield*this.pop({type: ` error ` ,offset:this.offset,message: ` Unexpected block - seq - ind on same line with key ` ,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){q0(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case ` anchor ` :case ` tag ` :if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case ` seq - item - ind ` :if(this.indent!==e.indent)break;t.value||H0(t.start, ` seq - item - ind ` )?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type=== ` flow - error - end ` ){let e;do yield*this.pop(),e=this.peek(1);while(e?.type=== ` flow - collection ` )}else if(e.end.length===0){switch(this.type){case ` comma ` :case ` explicit - key - ind ` :!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case ` map - value - ind ` :!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case ` space ` :case ` comment ` :case ` newline ` :case ` anchor ` :case ` tag ` :!t||t.value?e.ite
Line truncated
` ,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(this.onKeyLine=!1,t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){n2(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!== ` seq - item - ind ` ,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case ` newline ` :n.push(r);break;case ` space ` :break;case ` comment ` :i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case ` anchor ` :case ` tag ` :r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` explicit - key - ind ` :!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case ` map - value - ind ` :if(t.explicitKey){if(!t.sep){if(Z0(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=t2(t.start);this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Z0(t.sep, ` map - value - ind ` ))this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if( $ 0(t.key)&&!Z0(t.sep, ` newline ` )){let e=t2(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Z0(t.sep, ` map - value - ind ` )?this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type=== ` block - seq ` ){if(!t.explicitKey&&t.sep&&!Z0(t.sep, ` newline ` )){yield*this.pop({type: ` error ` ,offset:this.offset,message: ` Unexpected block - seq - ind on same line with key ` ,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){n2(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case ` anchor ` :case ` tag ` :if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case ` seq - item - ind ` :if(this.indent!==e.indent)break;t.value||Z0(t.start, ` seq - item - ind ` )?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type=== ` flow - error - end ` ){let e;do yield*this.pop(),e=this.peek(1);while(e?.type=== ` flow - collection ` )}else if(e.end.length===0){switch(this.type){case ` comma ` :case ` explicit - key - ind ` :!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case ` map - value - ind ` :!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case ` space ` :case ` comment ` :case ` newline ` :case ` anchor ` :case ` tag ` :!t||t.value?e.ite
Line truncated
` )+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf( `
` ,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return this.flowScalar(this.type);case ` block - scalar - header ` :return{type: ` block - scalar ` ,offset:this.offset,indent:this.indent,props:[this.sourceToken],source: ` ` };case ` flow - map - start ` :case ` flow - seq - start ` :return{type: ` flow - collection ` ,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case ` seq - item - ind ` :return{type: ` block - seq ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case ` explicit - key - ind ` :{this.onKeyLine=!0;let t=K0(G0(e));return t.push(this.sourceToken),{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case ` map - value - ind ` :{this.onKeyLine=!0;let t=K0(G0(e));return{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!== ` comment ` ||this.indent<=t?!1:e.every(e=>e.type=== ` newline ` ||e.type=== ` space ` )}*documentEnd(e){this.type!== ` doc - mode ` &&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop()))}*lineEnd(e){switch(this.type){case ` comma ` :case ` doc - start ` :case ` doc - end ` :case ` flow - seq - end ` :case ` flow - map - end ` :case ` map - value - ind ` :yield*this.pop(),yield*this.step();break;case ` newline ` :this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop())}}};function X0(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new V0||null,prettyErrors:t}}function Z0(e,t={}){let{lineCounter:n,prettyErrors:r}=X0(t),i=new Y0(n?.addNewLine),a=new D0(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!== ` silent ` ){o.errors.push(new U1(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(G1(e,n)),o.warnings.forEach(G1(e,n))),o}function Q0(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=Z0(e,n);if(!i)return null;if(i.warnings.forEach(e=>x $ (i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!== ` silent ` )throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function $ 0(e,t,n){let r=null;if(typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n== ` string ` &&(n=n.length),typeof n== ` number ` ){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return gQ(e)&&!r?e.toString(n):new B1(e,r,n).toString(n)}var e2=e=>typeof e== ` object ` &&!!e&&!Array.isArray(e),t2=e=>e2(e)?Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?t:[]]):[];function n2(e){if(e2(e)){if(e2(e.parallel))return{kind: ` parallel ` ,base:[ ` parallel ` ],branches:t2(e.parallel)};if(e2(e.switch))return{kind: ` switch ` ,base:[ ` switch ` , ` cases ` ],on:typeof e.switch.on== ` string ` ?e.switch.on: ` ` ,branches:t2(e.switch.cases)}}}function r2(e){return e.slice(2).includes( ` parallel ` )}function i2(e,t){let n=Z0(e).getIn(t,!0);if(_Q(n))return n.toJSON()}function a2(e,t,n){let r=Z0(e);return r.setIn(t,r.createNode(_2(n))),r.toString()}function o2(e,t,n){let r=Z0(e),i=t.slice(0,-1),a=r2(i);if(a&&![ ` agent . run ` , ` workflow . call ` ].includes(n))throw Error( ` Branches allow only read - only agents and workflow calls . ` );let o=r.getIn(i,!0);if(bQ(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!bQ(o))return{source:e,path:[]};let s=Math.min(Math.max(Number(t.at(-1))+1,0),o.items.length),c=n=== ` parallel ` ?{parallel:{"branch-1":[],"branch-2":[]}}:n=== ` switch ` ?{switch:{on: ` ` ,cases:{true:[],default:[]}}}:{type:n,...a&&n=== ` agent . run ` ?{settings:{read_only:!0}}:{}};return o.items.splice(s,0,r.createNode(c)),{source:r.toString(),path:[...i,s]}}function s2(e,t){if(t=== ` switch ` ){if(!e||e.includes( ` / ` ))throw Error( ` A case is the value it matches , without a slash . ` )}else if(!/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)* $ /.test(e))throw Error( ` Use a lowercase branch name with letters , digits , dots or dashes . ` )}function c2(e,t){let n=e.getIn(t,!0),r=n2(_Q(n)?n.toJSON():void 0),i=r?e.getIn([...t,...r.base],!0):void 0;if(!r||!_Q(i))throw Error( ` This step has no branches . ` );return{kind:r.kind,branches:i}}function l2(e,t,n){let r=Z0(e),{kind:i,branches:a}=c2(r,t);if(s2(n,i),a.has(n))throw Error( ` Branch $ { n } already exists . ` );return a.set(n,r.createNode([])),r.toString()}function u2(e,t,n,r){let i=Z0(e),{kind:a,branches:o}=c2(i,t);if(s2(r,a),n!==r&&o.has(r))throw Error( ` Branch $ { r } already exists . ` );let s=o.items.find(e=>yQ(e.key)&&e.key.value===n);if(!s||!yQ(s.key))throw Error( ` Branch $ { n } does not exist . ` );return s.key.value=r,i.toString()}function d2(e,t,n){let r=Z0(e),{kind:i,branches:a}=c2(r,t);if(i=== ` parallel ` &&a.items.length<=2)throw Error( ` Parallel needs at least two branches . ` );if(a.items.length<=1)throw Error( ` A switch needs at least one case . ` );return
Line truncated
` ).find(e=>e.trim())?.trim()}}function M2(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(O2)].map(e=>e[1]))]}function N2(e){let t=Z0(e).toJS(),n=k2(t)&&Array.isArray(t.steps)?t.steps:[],r=[],i=[],a=new Map,o=[],s=new Set,c= ` start ` ;r.push({id:c,type: ` step ` ,position:{x:0,y:0},data:{kind: ` start ` ,key: ` start ` ,title: ` Starts when ` ,type: ` ` ,detail: ` ` }});let l=[c],u=1,d=new Map,f=e=>{let t=d.get(e)??0;return d.set(e,t+1),t},p=(e,t,n,i,s,c,l,u)=>{let d=k2(e)?e:{},p=n2(d),m=p?.kind??(typeof d.type== ` string ` ?d.type: ` ` ),h=k2(d.settings)?d.settings:{},g=typeof d.id== ` string ` ?d.id: ` ` ,_= ` step - $ { t } ` ,v=s? ` $ { s } / $ { g || m } ` :g||m;r.push({id:_,type: ` step ` ,position:{x:n,y:i},data:{kind: ` step ` ,key:g||t,name:g||void 0,title:g||D2(m),type:m,step:l?.length===2?String(Number(l[1])+1).padStart(2, ` 0 ` ):void 0,detail:p?.on? ` on $ { p . on . replace ( /^steps\./ , ` ` ) } ` :A2(m,h),summary:j2(h),when:typeof d.when== ` string ` ?d.when:void 0,retry:k2(d.retry)&&typeof d.retry.attempts== ` number ` ?d.retry.attempts:void 0,continues:d.on_failure=== ` continue ` ,branch:s,lane:u,path:l,stage:v,occurrence:f(v),...c?{resume:c}:{}}}),g&&a.set(g,_);let y=p?.on? ` { { $ { p . on } } } ` : ` ` ;for(let e of M2([d.settings,y],d.when))o.push({from:e,to:_});return _},m=(e,t,n)=>{e.forEach((r,a)=>i.push({id: ` flow - $ { r } - $ { t } ` ,source:r,target:t,kind: ` flow ` ,...s.has(r)?{otherwise:!0}:{},insertAfter:a===e.length-1?n:void 0}))};for(let[e,t]of n.entries()){let n=n2(t);if(n){let{kind:i,base:a,branches:o}=n,c=p(t,String(e+1),0,u*w2,void 0,void 0,[ ` steps ` ,e]);m(l,c,[ ` steps ` ,e-1]),u++;let d=k2(t)&&typeof t.id== ` string ` ?t.id:i,f=i=== ` switch ` &&!o.some(([e])=>e==="default"),h=o.length+ +!!f,g=[],_=Math.max(1,...o.map(([,e])=>e.length)),v=e=>(e-(h-1)/2)*T2,y=(e,t,n)=>r.push({id:e,type: ` lane ` ,position:{x:t-12,y:u*w2-40},style:{width: ` 264 px ` ,height: ` $ { ( _ + 1 ) * w2 - 24 } px ` },zIndex:-1,data:{kind: ` step ` ,key:n,title:n,type: ` ` ,detail: ` ` ,lane:i}}),b=(u+_)*w2;if(o.forEach(([t,n],o)=>{let s=v(o),l=[c],f=[ ` steps ` ,e,...a,t];n.forEach((n,r)=>{let a=p(n, ` $ { e + 1 } - $ { t } - $ { r + 1 } ` ,s,(u+r)*w2,t,d,[...f,r],i);m(l,a,[...f,r-1]),l=[a]});let h= ` add - $ { e } - $ { t } ` ;r.push({id:h,type: ` add ` ,position:{x:s+104,y:b},data:{kind: ` step ` ,key:h,title: ` ` ,type: ` ` ,detail: ` ` ,branch:t,lane:i,insertAfter:[...f,n.length-1]}}),m(l,h),g.push(h),y( ` lane - $ { e } - $ { t } ` ,s,t)}),f){let t=v(h-1),n= ` pass - $ { e } ` ;r.push({id:n,type: ` add ` ,position:{x:t+104,y:b},data:{kind: ` step ` ,key:n,title: ` ` ,type: ` ` ,detail: ` ` ,lane:i}}),s.add(c),m([c],n),s.delete(c),g.push(n),y( ` pass - lane - $ { e } ` ,t, ` default ` )}l=g,u+=_+1;continue}let i=p(t,String(e+1),0,u*w2,void 0,void 0,[ ` steps ` ,e]);m(l,i,[ ` steps ` ,e-1]),l=[i],u++}r.push({id: ` add - end ` ,type: ` add ` ,position:{x:104,y:u*w2-24},data:{kind: ` step ` ,key: ` add ` ,title: ` ` ,type: ` ` ,detail: ` ` ,insertAfter:[ ` steps ` ,n.length-1]}}),m(l, ` add - end ` );for(let{from:e,to:t}of o){let n=a.get(e);n&&(i.some(e=>e.kind=== ` flow ` &&e.source===n&&e.target===t)||i.push({id: ` data - $ { n } - $ { t } ` ,source:n,target:t,kind: ` data ` ,label:e,offset:24+14*i.filter(e=>e.kind=== ` data ` ).length,sourceHandle: ` data - out ` ,targetHandle: ` data - in ` }))}return{nodes:r,edges:i}}var P2={class: ` truncate ` },F2= ` \ 0 ` ,I2=N({inheritAttrs:!1,__name: ` OptionSelect ` ,props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean},size:{},class:{}},emits:[ ` update : modelValue ` ],setup(e,{emit:t}){let n=t;return(t,r)=>(I(),K(B(Tu),{"model-value":e.modelValue=== ` ` &&e.options.some(e=>e.value=== ` ` )?F2:e.modelValue||void 0,disabled:e.disabled,"onUpdate:modelValue":r[0]||=e=>n( ` update : modelValue ` ,e===F2? ` ` :String(e))},{default:F(()=>[k(B(ku),W({size:e.size?? ` sm ` ,class:t. $ props.class},t. $ attrs),{default:F(()=>[k(B(Au),{placeholder:e.placeholder},null,8,[ ` placeholder ` ])]),_:1},16,[ ` size ` , ` class ` ]),k(B(Eu),{position: ` popper ` ,class: ` max - w - [ min ( var ( -- reka - select - content - available - width ) , 20 rem ) ] ` },{default:F(()=>[(I(!0),A(H,null,j(e.options,e=>(I(),K(B(Ou),{key:e.value,value:e.value=== ` ` ?F2:e.value,disabled:e.disabled,title:e.label,class: ` * : [ span ] : last : min - w - 0 ` },{default:F(()=>[L( ` span ` ,P2,z(e.label),1)]),_:2},1032,[ ` value ` , ` disabled ` , ` title ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` , ` disabled ` ]))}}),L2=[ ` id ` ],R2=[ ` value ` ],z2=N({__name: ` WorkflowPicker ` ,props:{value:{},workflows:{},label:{},class:{},editable:{type:Boolean}},emits:[ ` pick ` ],setup(e,{emit:t}){let n=Oe(),r=t;return(t,i)=>e.editable?(I(),A(H,{key:0},[k(B(Z),{"model-value":e.value,list:B(n),"aria-label":e.label,class:R(t. $ props.class),placeholder: ` Workflow id or { { reference } } ` ,"onUpdate:modelValue":i[0]||=e=>r( ` pick ` ,String(e))},null,8,[ ` model - value ` , ` list ` , ` aria - label ` , ` class ` ]),L( ` datalist ` ,{id:B(n)},[(I(!0),A(H,null,j(e.workflows,e=>(I(),A( ` option ` ,{key:e.id,value:e.id},null,8,R2))),128))],8,L2)],64)):(I(),K(B(Tu),{key:1,"model-value":e.value||void 0,"onUpdate:modelValue":i[1]||=e=>r( ` pick ` ,String(e))},{default:F(()=>[k(B(ku),{"aria-label":e.label,class:R(t. $ props.class)},{default:F(()=>[k(B(Au),{placeholder: ` Choose workflow ` })]),_:1},8,[ ` aria - label ` , ` class ` ]),k(B(Eu),null,{default:F(()=>[e.value&
Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens: $ 2 (e)}))}var Z2 =/^(\s *)(- \s +)?/,Q2 =/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function $ 2 (e){let{code:t,comment:n}=e 4(e),r=t 4(t);return n&&r.push({text:n,kind:` comment ` }),r}function e 4(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t)r===t&&(t= ` ` );else if(r=== ` "`||r===`'`)t=r;else if(r===`#`&&(n===0||/\s/.test(e[n-1]??``)))return{code:e.slice(0,n),comment:e.slice(n)}}return{code:e,comment:``}}function t 4(e){if(!e)return[];let t=[],n=Z2 .exec(e);n?.[1]&&t.push({text:n[1],kind:`plain`}),n?.[2]&&t.push({text:n[2],kind:`punct`});let r=e.slice(n?.[0].length??0);if(!r)return t;let i=Q2 .exec(r);return i?(t.push({text:i[1]??``,kind:`key`}),t.push({text:i[2]??`:`,kind:`punct`}),i[3]&&t.push({text:i[3],kind:`plain`}),[...t,...n 4(i[4]??``)]):[...t,...n 4(r)]}function n 4(e){if(!e)return[];let t=/^(" [ ^ "]*" ? | '[^' ] * ' ? ) ( [ \ s \ S ] * ) $ / . exec ( e ) ; if ( ! t ) return [ { text : e , kind : ` plain ` } ] ; let n = [ { text : t [ 1 ] ? ? ` ` , kind : ` string ` } ] ; return t [ 2 ] && n . push ( { text : t [ 2 ] , kind : ` plain ` } ) , n } function r4 ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function i4(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function a4(e){return typeof e== ` string ` &&e.trim()!== ` ` }var o4={class: ` space - y - 4 px - 3 py - 3 ` },s4={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },c4={key:1,class: ` space - y - 3 ` },l4={key:0,class: ` block space - y - 1.5 ` },u4=[ ` id ` ],d4=[ ` value ` ],f4={class: ` text - xs font - medium text - fg - muted ` },p4={class: ` flex items - center gap - 2 ` },m4={key:1,role: ` alert ` ,class: ` text - xs text - danger ` },h4={key:2,class: ` space - y - 1.5 ` },g4=[ ` title ` ],_4={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },v4={key:0,class: ` divide - y divide - border rounded - md border border - border ` },y4=[ ` title ` ],b4={key:0,class: ` space - y - 3 ` },x4={class: ` text - [ 13 px ] ` },S4={key:0,class: ` text - danger ` },C4={class: ` ml - 2 text - xs text - fg - subtle ` },w4={key:1,class: ` space - y - 3 ` },T4={class: ` text - [ 13 px ] ` },E4={class: ` ml - 2 text - xs text - fg - subtle ` },D4=[ ` title ` ],O4={key:0,class: ` text - xs text - danger ` },k4={class: ` space - y - 1.5 ` },A4={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },j4={class: ` divide - y divide - border rounded - md border border - border ` },M4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },N4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },P4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },F4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },I4=[ ` for ` ],L4=N({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=Oe(),r=e,i=t,a=J(()=>i2(r.yaml,r.path)??{}),o=J(()=>n2(a.value)),s=J(()=>o.value?.kind??(typeof a.value.type== ` string ` ?a.value.type: ` ` )),c=J(()=>o.value?.branches.map(([e])=>e)??[]),l=J(()=>s.value=== ` parallel ` ?2:1);function u(e){i( ` update : yaml ` ,a2(r.yaml,r.path,{...a.value,switch:{...a.value.switch,on:e}}))}let d=q( ` ` ),f=q( ` ` );function p(e,t,n= ` ` ){try{let a=e=== ` add ` ?l2(r.yaml,r.path,t):e=== ` rename ` ?u2(r.yaml,r.path,t,n):d2(r.yaml,r.path,t);i( ` update : yaml ` ,a),d.value= ` ` ,f.value= ` ` }catch(e){f.value=String(e.message)}}let m=J(()=>r.vocabulary.find(e=>e.name===s.value)),h=J(()=>typeof a.value.settings== ` object ` &&a.value.settings!==null?a.value.settings:{}),g=J(()=>g2(r.yaml,r.path)),_=J(()=>K2(a.value)),v=J(()=>m.value?.settings&&a.value.settings?J2(a.value.settings,m.value.settings, ` settings ` ): ` ` ),y=[ ` mission ` , ` workflow ` , ` message ` , ` body ` , ` plan ` , ` then ` , ` status ` , ` detail ` , ` run ` , ` rules ` ],b=/mission|body|detail|plan|rules/;function x(e,t){return[ ` workflow . call ` , ` workflow . handoff ` ].includes(s.value)&&e=== ` workflow ` ||s.value=== ` human . approve ` &&e=== ` then ` ? ` workflow ` :s.value=== ` agent . run ` &&e=== ` model ` ? ` select ` :t.type=== ` string ` ?t.enum? ` select ` :b.test(e)? ` text ` : ` line ` :t.type=== ` boolean ` ? ` boolean ` :t.type=== ` integer ` ||t.type=== ` number ` ? ` number ` :t.type=== ` array ` &&t.items?.type=== ` string ` ? ` lines ` : ` yaml ` }let S=J(()=>{let e=Object.entries(m.value?.settings?.properties??{}).filter(([e])=>s.value!== ` workflow . call ` ||![ ` inputs ` , ` outputs ` ].includes(e)).map(([e,t])=>({key:e,schema:t,kind:x(e,t),options:s.value=== ` agent . run ` &&e=== ` model ` ?r.modelAliases:t.enum??[]})),t=e.filter(e=>y.includes(e.key)&&e.kind!== ` boolean ` ).sort((e,t)=>y.indexOf(e.key)-y.indexOf(t.key))[0],n=e.filter(e=>e!==t);return{lead:t,compact:n.filter(e=>[ ` workflow ` , ` select ` , ` line ` , ` number ` , ` boolean ` ].includes(e.kind)),long:n.filter(e=>[ ` text ` , ` lines ` , ` yaml ` ].includes(e.kind))}}),C=q(!S.value.lead&&!o.value),w=e=>[{value: ` ` ,label: ` Default ` },...e.map(e=>({value:e,label:e}))];function ee(e){let{id:t,type:n,...a}=e;i( ` update : yaml ` ,a2(r.yaml,r.path,{id:t,type:n,...a}))}function te(e,t){ee({...a.value,[e]:t})}function T(e){let t={...a.value.retry,...e};te( ` retry ` ,t.attempts===void 0&&!t.backoff?void 0:{...t,attempts:t.attempts??1})}function E(e,t){let n={...h.value,[e]:t};s.value=== ` workflow . call ` &&e=== ` wait ` &&t!==!0&&delete n.outputs,ee({...a.value,settings:n})}function D(e,t){let n={...h.value,[e]:t};s.value=== ` workflow . call ` &&t!==h.value[e]&&(delete n.inputs,delete n.outputs),ee({...a.value,settings:n})}let ne=J(()=>r.workflows.find(e=>e.id===h.value.workflow)),re=J(()=>Object.entries(v2(ne.value?.yaml?? ` ` , ` inputs ` )??{})),ie=J(()=>Object.entries(v2(ne.value?.yaml?? ` ` , ` outputs ` )??{})),O=J(()=>Object.entries(v2(r.yaml, ` inputs ` )??{})),oe=J(()=>Object.entries(v2(r.yaml, ` outputs ` )??{})),se=J(()=>h.value.inputs??{}),ce=J(()=>h.value.outputs??{}),le=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),ue=e=>[ ` object ` , ` array ` ].includes(e.type?? ` ` ),de=e=>se.value[e]===void 0? ` ` :String(se.value[e]);function fe(e,t,n){E( ` inputs ` ,{...se.value,[e]:t=== ` ` ?void 0:le(t)?t:EE(t,n?? ` string ` )})}let pe=(e,t,n)=>e.filter(([,e])=>e.type===t.type||e.type=== ` any ` ||t.type=== ` any ` ).map(([e])=>({value: ` $ { n } . $ { e } ` ,label:e})),me=q(null);function he(e){let t=me.value??S.value.lead?.key;if(!t)return;let n=typeof h.value[t]== ` string ` ?h.value[t]: ` ` ,r= ` { { steps . $ { e } . summary } } ` ;E(t,n? ` $ { n . trimEnd ( ) } $ { r } ` :r)}let ge=q({});function _e(e,t){try{E(e,t.trim()?Q0(t):void 0),ge.value={...ge.value,[e]: ` ` }}catch(t){ge.value={...ge.value,[e]:String(
Line truncated
` )[0]}}}let ve=e=>e===void 0? ` ` : $ 0(e).trimEnd(),ye=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),be=e=>typeof h.value[e]== ` string ` ?h.value[e]: ` ` ,xe=[{value: ` ` ,label: ` Park the task ` },{value: ` continue ` ,label: ` Continue ` }];return(t,r)=>(I(),A( ` div ` ,o4,[v.value?(I(),A( ` p ` ,s4,z(v.value),1)):P( ` ` ,!0),o.value?(I(),A( ` section ` ,c4,[s.value=== ` switch ` ?(I(),A( ` label ` ,l4,[r[15]||=L( ` span ` ,{class: ` text - xs font - medium text - fg - muted ` ,title: ` The value whose case runs ; a case named default runs when none matches ` }, ` Switch on ` ,-1),k(B(Z),{"model-value":o.value.on,class: ` font - mono ` ,placeholder: ` steps . assess . result . fit ` ,list: ` $ { B ( n ) } - switch - on ` ,onChange:r[0]||=e=>u(e.target.value.trim())},null,8,[ ` model - value ` , ` list ` ]),L( ` datalist ` ,{id: ` $ { B ( n ) } - switch - on ` },[(I(!0),A(H,null,j(g.value,e=>(I(),A( ` option ` ,{key:e,value: ` steps . $ { e } . result . ` },null,8,d4))),128))],8,u4)])):P( ` ` ,!0),L( ` div ` ,f4,z(s.value=== ` switch ` ? ` Cases ` : ` Branches ` ),1),(I(!0),A(H,null,j(c.value,e=>(I(),A( ` div ` ,{key:e,class: ` flex items - center gap - 2 ` },[k(B(Z),{"model-value":e,class:R(s.value=== ` switch ` && ` font - mono ` ),"aria-label": ` $ { s . value === ` switch ` ? ` Case ` : ` Branch ` } $ { e } ` ,onChange:t=>p( ` rename ` ,e,t.target.value.trim())},null,8,[ ` model - value ` , ` class ` , ` aria - label ` , ` onChange ` ]),k(B(Y),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Remove $ { e } ` ,disabled:c.value.length<=l.value,onClick:t=>p( ` delete ` ,e)},{default:F(()=>[k(B(hu))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),L( ` div ` ,p4,[k(B(Z),{modelValue:d.value,"onUpdate:modelValue":r[1]||=e=>d.value=e,"aria-label":s.value=== ` switch ` ? ` New case value ` : ` New branch name ` ,placeholder:s.value=== ` switch ` ? ` Value , or default ` : ` Branch name ` ,onKeydown:r[2]||=yt(_t(e=>p( ` add ` ,d.value.trim()),[ ` prevent ` ]),[ ` enter ` ])},null,8,[ ` modelValue ` , ` aria - label ` , ` placeholder ` ]),k(B(Y),{type: ` button ` ,size: ` icon - sm ` ,variant: ` outline ` ,"aria-label":s.value=== ` switch ` ? ` Add case ` : ` Add branch ` ,disabled:!d.value.trim(),onClick:r[3]||=e=>p( ` add ` ,d.value.trim())},{default:F(()=>[k(B(lu))]),_:1},8,[ ` aria - label ` , ` disabled ` ])]),f.value?(I(),A( ` p ` ,m4,z(f.value),1)):P( ` ` ,!0)])):P( ` ` ,!0),S.value.lead?(I(),A( ` section ` ,h4,[L( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - fg - muted ` ,title:S.value.lead.schema.description},[V(z(ye(S.value.lead.key,S.value.lead.schema))+ ` ` ,1),S.value.lead.schema.description?(I(),K(B(Rl),{key:0,class: ` size - 3 text - fg - subtle ` })):P( ` ` ,!0)],8,g4),S.value.lead.kind=== ` workflow ` ?(I(),K(z2,{key:0,editable:s.value!== ` workflow . call ` ,value:be(S.value.lead.key),workflows:e.workflows,label:ye(S.value.lead.key,S.value.lead.schema),onPick:r[4]||=e=>D(S.value.lead.key,e)},null,8,[ ` editable ` , ` value ` , ` workflows ` , ` label ` ])):S.value.lead.kind=== ` select ` ?(I(),K(I2,{key:1,class: ` w - full ` ,"model-value":be(S.value.lead.key),options:w(S.value.lead.options),"aria-label":ye(S.value.lead.key,S.value.lead.schema),"onUpdate:modelValue":r[5]||=e=>E(S.value.lead.key,e||void 0)},null,8,[ ` model - value ` , ` options ` , ` aria - label ` ])):S.value.lead.kind=== ` text ` ?(I(),K(B(Sd),{key:2,"model-value":be(S.value.lead.key),class: ` min - h - 32 text - [ 13 px ] leading - relaxed ` ,onFocus:r[6]||=e=>me.value=S.value.lead.key,"onUpdate:modelValue":r[7]||=e=>E(S.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(I(),K(B(Z),{key:3,"model-value":be(S.value.lead.key),onFocus:r[8]||=e=>me.value=S.value.lead.key,"onUpdate:modelValue":r[9]||=e=>E(S.value.lead.key,String(e))},null,8,[ ` model - value ` ])),g.value.length&&S.value.lead.kind!== ` select ` ?(I(),A( ` div ` ,_4,[r[16]||=L( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(I(!0),A(H,null,j(g.value,e=>(I(),K(B(Y),{key:e,type: ` button ` ,variant: ` outline ` ,size: ` xs ` ,class: ` font - mono ` ,title: ` { { steps . $ { e } . summary } } ` ,onClick:t=>he(e)},{default:F(()=>[V(z(e),1)]),_:2},1032,[ ` title ` , ` onClick ` ]))),128))])):P( ` ` ,!0)])):P( ` ` ,!0),k(B(Y),{type: ` button ` ,variant: ` ghost ` ,size: ` xs ` ,class: ` - ml - 2 text - fg - muted aria - expanded : bg - transparent ` ,"aria-expanded":C.value,onClick:r[10]||=e=>C.value=!C.value},{default:F(()=>[k(B(ae),{"data-icon": ` inline - start ` ,class:R([ ` transition - transform ` ,!C.value&& ` - rotate - 90 ` ])},null,8,[ ` class ` ]),r[17]||=V( ` More ` ,-1)]),_:1},8,[ ` aria - expanded ` ]),C.value?(I(),A(H,{key:3},[S.value.compact.length?(I(),A( ` section ` ,v4,[(I(!0),A(H,null,j(S.value.compact,t=>(I(),A( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[L( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:t.schema.description},[V(z(ye(t.key,t.schema))+ ` ` ,1),t.schema.description?(I(),K(B(Rl),{key:0,class: ` size - 3 text - fg - subtle ` })):P( ` ` ,!0)],8,y4),t.kind=== ` workflow ` ?(I(),K(z2,{key:0,editable:s.value!== ` workflow . call ` ,class: ` max - w - 48 ` ,value:be(t.key),workflows:e.workflows,label:ye(t.key,t.schema),onPick:e=>D(t.key,e)},null,8,[ ` editable ` , ` value ` , ` workflows ` , ` label ` , ` onPick ` ])):t.kind=== ` boolean ` ?(I(),K(B(Fw),{key:1,"model-value":h.value[t.key]===!0,"onUpdate:modelValue":e=>E(t.key,e||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):t.kind=== ` select ` ?(I(),K(I2,{key:2,class: ` w - 40 ` ,"model-va
Line truncated
` ): ` ` ,class: ` min - h - 16 font - mono text - xs ` ,placeholder: ` One per line ` ,"onUpdate:modelValue":t=>E (e.key,String(t).split( `
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(I(),A(H,{key:2},[k(B(Sd),{"model-value":ve(h.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>_e(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),ge.value[e.key]?(I(),A( ` span ` ,O4,z(ge.value[e.key]),1)):P( ` ` ,!0)],64))]))),128)),L( ` section ` ,k4,[_.value?(I(),A( ` p ` ,A4,z(_.value),1)):P( ` ` ,!0),L( ` div ` ,j4,[L( ` label ` ,M4,[r[20]||=L( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` ,title: ` Empty always runs . A field such as inputs . enabled , ! inputs . skip , or steps . plan . result . ready == true ` }, ` Run only when ` ,-1),k(B(Z),{class: ` h - 8 w - 48 font - mono text - xs ` ,placeholder: ` inputs . enabled ` ,"aria-invalid":_.value&&_.value.startsWith( ` when ` )?!0:void 0,"model-value":a.value.when?? ` ` ,"onUpdate:modelValue":r[11]||=e=>te( ` when ` ,String(e))},null,8,[ ` aria - invalid ` , ` model - value ` ])]),L( ` label ` ,N4,[r[21]||=L( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),k(I2,{class: ` w - 36 ` ,"aria-label": ` If it fails ` ,"model-value":a.value.on_failure?? ` ` ,options:xe,"onUpdate:modelValue":r[12]||=e=>te( ` on _failure ` ,e||void 0)},null,8,[ ` model - value ` ])]),L( ` label ` ,P4,[r[22]||=L( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),k(B(Z),{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 8 w - 20 text - right text - [ 13 px ] ` ,"model-value":a.value.retry?.attempts?? ` ` ,"onUpdate:modelValue":r[13]||=e=>T({attempts:String(e)=== ` ` ?void 0:Number(String(e))})},null,8,[ ` model - value ` ])]),L( ` div ` ,F4,[L( ` label ` ,{for: ` $ { B ( n ) } - backoff ` ,class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,8,I4),k(B(Ow),{id: ` $ { B ( n ) } - backoff ` ,"model-value":a.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":r[14]||=e=>T({backoff:e||void 0})},null,8,[ ` id ` , ` model - value ` ])])])])],64)):P( ` ` ,!0)]))}}),R4={class: ` space - y - 1.5 ` },z4={class: ` flex items - center text - xs font - medium text - fg - muted ` },B4={key:0,class: ` divide - y divide - border rounded - md border border - border ` },V4=N({__name: ` SpecList ` ,props:{yaml:{},field:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=e,r=t,i=[ ` string ` , ` number ` , ` bool ` , ` object ` , ` array ` , ` any ` ].map(e=>({value:e,label:e})),a=J(()=>Object.entries(v2(n.yaml,n.field)??{}));function o(e){r( ` update : yaml ` ,y2(n.yaml,n.field,Object.fromEntries(e.filter(([e])=>e))))}function s(e,t,n){o(a.value.map((r,i)=>i===e?[t,n]:r))}function c(){let e=n.field.slice(0,-1),t=a.value.length+1;for(;a.value.some(([n])=>n=== ` $ { e } _$ { t } ` );)t++;o([...a.value,[ ` $ { e } _$ { t } ` ,{type: ` string ` }]])}return(t,n)=>(I(),A( ` section ` ,R4,[L( ` div ` ,z4,[V(z(e.field=== ` inputs ` ? ` Inputs ` : ` Outputs ` )+ ` ` ,1),k(B(Y),{type: ` button ` ,variant: ` ghost ` ,size: ` xs ` ,class: ` ml - auto ` ,onClick:c},{default:F(()=>[k(B(lu),{"data-icon": ` inline - start ` }),n[0]||=V( ` Add ` ,-1)]),_:1})]),a.value.length?(I(),A( ` div ` ,B4,[(I(!0),A(H,null,j(a.value,([t,n],r)=>(I(),A( ` div ` ,{key:r,class: ` flex items - center gap - 2 px - 2 py - 1.5 ` },[k(B(Z),{"model-value":t,class: ` h - 8 min - w - 0 flex - 1 font - mono text - xs ` ,"aria-label": ` $ { e . field } name ` ,onChange:e=>s(r,e.target.value.trim(),n)},null,8,[ ` model - value ` , ` aria - label ` , ` onChange ` ]),k(I2,{"model-value":n.type?? ` string ` ,options:B(i),class: ` w - 24 ` ,"aria-label": ` $ { t } type ` ,"onUpdate:modelValue":e=>s(r,t,{...n,type:e})},null,8,[ ` model - value ` , ` options ` , ` aria - label ` , ` onUpdate : modelValue ` ]),k(B(Fw),{"model-value":n.required===!0,title:n.required? ` Required ` : ` Optional ` ,"aria-label": ` $ { t } required ` ,"onUpdate:modelValue":e=>s(r,t,{...n,required:e||void 0})},null,8,[ ` model - value ` , ` title ` , ` aria - label ` , ` onUpdate : modelValue ` ]),k(B(Y),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - xs ` ,"aria-label": ` Remove $ { t } ` ,onClick:e=>o(a.value.filter((e,t)=>t!==r))},{default:F(()=>[k(B(hu))]),_:1},8,[ ` aria - label ` , ` onClick ` ])]))),128))])):P( ` ` ,!0)]))}}),H4={class: ` space - y - 4 px - 3 py - 3 ` },U4={class: ` divide - y divide - border rounded - md border border - border ` },W4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },G4={key:0,role: ` alert ` ,class: ` px - 3 py - 2 text - xs text - danger ` },K4={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },q4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },J4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },Y4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },X4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },Z4={class: ` space - y - 1.5 ` },Q4= ` 6 f129e29 - 0e26 - 5246 - 99 bd - 74 cb4496203b ` , $ 4=N({__name: ` WorkflowSettings ` ,props:{yaml:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=e,r=t,i=e=>{let t=v2(n.yaml,e);return typeof t== ` string ` ?t: ` ` };function a(e,t){r( ` update : yaml ` ,y2(n.yaml,e,t))}let o=pT(),s=q([]),c=q(!0),l=q( ` ` );async function u(){c.value=!0,l.value= ` ` ,s.value=[];try{await o.loadOrg();let e=await X.orgAgents(o.homeOrg);s.value=e.agents.filter(e=>e.lifecycle=== ` active ` ),!i( ` identity ` )&&s.value.some(e=>e.id===Q4)&&a( ` identity ` ,Q4)}catch(e){l.value=String(e.message||e)}finally{c.value=!1}}We(u);let d=J(()=>{let e=i( ` identity ` ),t=s.value.map(e=>({value:e.id,label:e.display_name}));return e&&!c.value&&!s.value.some(t=>t.id===e)?[{value:e,label: ` $ { e } ( unknown ) ` ,disabled:!0},...t]:t}),f=ww(),p=J(()=>{let e=Object.keys(f.stateFor( ` agent - pr Line truncated
` ,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return this.flowScalar(this.type);case ` block - scalar - header ` :return{type: ` block - scalar ` ,offset:this.offset,indent:this.indent,props:[this.sourceToken],source: ` ` };case ` flow - map - start ` :case ` flow - seq - start ` :return{type: ` flow - collection ` ,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case ` seq - item - ind ` :return{type: ` block - seq ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case ` explicit - key - ind ` :{this.onKeyLine=!0;let t=t2(e2(e));return t.push(this.sourceToken),{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case ` map - value - ind ` :{this.onKeyLine=!0;let t=t2(e2(e));return{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!== ` comment ` ||this.indent<=t?!1:e.every(e=>e.type=== ` newline ` ||e.type=== ` space ` )}*documentEnd(e){this.type!== ` doc - mode ` &&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop()))}*lineEnd(e){switch(this.type){case ` comma ` :case ` doc - start ` :case ` doc - end ` :case ` flow - seq - end ` :case ` flow - map - end ` :case ` map - value - ind ` :yield*this.pop(),yield*this.step();break;case ` newline ` :this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop())}}};function a2(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new X0||null,prettyErrors:t}}function o2(e,t={}){let{lineCounter:n,prettyErrors:r}=a2(t),i=new i2(n?.addNewLine),a=new I0(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!== ` silent ` ){o.errors.push(new Q1(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(e0(e,n)),o.warnings.forEach(e0(e,n))),o}function s2(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=o2(e,n);if(!i)return null;if(i.warnings.forEach(e=>A $ (i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!== ` silent ` )throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function c2(e,t,n){let r=null;if(typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n== ` string ` &&(n=n.length),typeof n== ` number ` ){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return TQ(e)&&!r?e.toString(n):new Y1(e,r,n).toString(n)}var l2=e=>typeof e== ` object ` &&!!e&&!Array.isArray(e),u2=e=>l2(e)?Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?t:[]]):[];function d2(e){if(l2(e)){if(l2(e.parallel))return{kind: ` parallel ` ,base:[ ` parallel ` ],branches:u2(e.parallel)};if(l2(e.switch))return{kind: ` switch ` ,base:[ ` switch ` , ` cases ` ],on:typeof e.switch.on== ` string ` ?e.switch.on: ` ` ,branches:u2(e.switch.cases)}}}function f2(e){return e.slice(2).includes( ` parallel ` )}function p2(e,t){let n=o2(e).getIn(t,!0);if(EQ(n))return n.toJSON()}function m2(e,t,n){let r=o2(e);return r.setIn(t,r.createNode(E2(n))),r.toString()}function h2(e,t,n){let r=o2(e),i=t.slice(0,-1),a=f2(i);if(a&&![ ` agent . run ` , ` workflow . call ` ].includes(n))throw Error( ` Branches allow only read - only agents and workflow calls . ` );let o=r.getIn(i,!0);if(kQ(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!kQ(o))return{source:e,path:[]};let s=Math.min(Math.max(Number(t.at(-1))+1,0),o.items.length),c=n=== ` parallel ` ?{parallel:{"branch-1":[],"branch-2":[]}}:n=== ` switch ` ?{switch:{on: ` ` ,cases:{true:[],default:[]}}}:{type:n,...a&&n=== ` agent . run ` ?{settings:{read_only:!0}}:{}};return o.items.splice(s,0,r.createNode(c)),{source:r.toString(),path:[...i,s]}}function g2(e,t){if(t=== ` switch ` ){if(!e||e.includes( ` / ` ))throw Error( ` A case is the value it matches , without a slash . ` )}else if(!/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)* $ /.test(e))throw Error( ` Use a lowercase branch name with letters , digits , dots or dashes . ` )}function _2(e,t){let n=e.getIn(t,!0),r=d2(EQ(n)?n.toJSON():void 0),i=r?e.getIn([...t,...r.base],!0):void 0;if(!r||!EQ(i))throw Error( ` This step has no branches . ` );return{kind:r.kind,branches:i}}function v2(e,t,n){let r=o2(e),{kind:i,branches:a}=_2(r,t);if(g2(n,i),a.has(n))throw Error( ` Branch $ { n } already exists . ` );return a.set(n,r.createNode([])),r.toString()}function y2(e,t,n,r){let i=o2(e),{kind:a,branches:o}=_2(i,t);if(g2(r,a),n!==r&&o.has(r))throw Error( ` Branch $ { r } already exists . ` );let s=o.items.find(e=>OQ(e.key)&&e.key.value===n);if(!s||!OQ(s.key))throw Error( ` Branch $ { n } does not exist . ` );return s.key.value=r,i.toString()}function b2(e,t,n){let r=o2(e),{kind:i,branches:a}=_2(r,t);if(i=== ` parallel ` &&a.items.length<=2)throw Error( ` Parallel needs at least two branches . ` );if(a.items.length<=1)throw Error( ` A switch needs at least one case . ` );return
Line truncated
` ).find(e=>e.trim())?.trim()}}function V2(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(L2)].map(e=>e[1]))]}function H2(e){let t=o2(e).toJS(),n=R2(t)&&Array.isArray(t.steps)?t.steps:[],r=[],i=[],a=new Map,o=[],s=new Set,c= ` start ` ;r.push({id:c,type: ` step ` ,position:{x:0,y:0},data:{kind: ` start ` ,key: ` start ` ,title: ` Starts when ` ,type: ` ` ,detail: ` ` }});let l=[c],u=1,d=new Map,f=e=>{let t=d.get(e)??0;return d.set(e,t+1),t},p=(e,t,n,i,s,c,l,u)=>{let d=R2(e)?e:{},p=d2(d),m=p?.kind??(typeof d.type== ` string ` ?d.type: ` ` ),h=R2(d.settings)?d.settings:{},g=typeof d.id== ` string ` ?d.id: ` ` ,_= ` step - $ { t } ` ,v=s? ` $ { s } / $ { g || m } ` :g||m;r.push({id:_,type: ` step ` ,position:{x:n,y:i},data:{kind: ` step ` ,key:g||t,name:g||void 0,title:g||I2(m),type:m,step:l?.length===2?String(Number(l[1])+1).padStart(2, ` 0 ` ):void 0,detail:p?.on? ` on $ { p . on . replace ( /^steps\./ , ` ` ) } ` :z2(m,h),summary:B2(h),when:typeof d.when== ` string ` ?d.when:void 0,retry:R2(d.retry)&&typeof d.retry.attempts== ` number ` ?d.retry.attempts:void 0,continues:d.on_failure=== ` continue ` ,branch:s,lane:u,path:l,stage:v,occurrence:f(v),...c?{resume:c}:{}}}),g&&a.set(g,_);let y=p?.on? ` { { $ { p . on } } } ` : ` ` ;for(let e of V2([d.settings,y],d.when))o.push({from:e,to:_});return _},m=(e,t,n)=>{e.forEach((r,a)=>i.push({id: ` flow - $ { r } - $ { t } ` ,source:r,target:t,kind: ` flow ` ,...s.has(r)?{otherwise:!0}:{},insertAfter:a===e.length-1?n:void 0}))};for(let[e,t]of n.entries()){let n=d2(t);if(n){let{kind:i,base:a,branches:o}=n,c=p(t,String(e+1),0,u*N2,void 0,void 0,[ ` steps ` ,e]);m(l,c,[ ` steps ` ,e-1]),u++;let d=R2(t)&&typeof t.id== ` string ` ?t.id:i,f=i=== ` switch ` &&!o.some(([e])=>e==="default"),h=o.length+ +!!f,g=[],_=Math.max(1,...o.map(([,e])=>e.length)),v=e=>(e-(h-1)/2)*P2,y=(e,t,n)=>r.push({id:e,type: ` lane ` ,position:{x:t-12,y:u*N2-40},style:{width: ` 264 px ` ,height: ` $ { ( _ + 1 ) * N2 - 24 } px ` },zIndex:-1,data:{kind: ` step ` ,key:n,title:n,type: ` ` ,detail: ` ` ,lane:i}}),b=(u+_)*N2;if(o.forEach(([t,n],o)=>{let s=v(o),l=[c],f=[ ` steps ` ,e,...a,t];n.forEach((n,r)=>{let a=p(n, ` $ { e + 1 } - $ { t } - $ { r + 1 } ` ,s,(u+r)*N2,t,d,[...f,r],i);m(l,a,[...f,r-1]),l=[a]});let h= ` add - $ { e } - $ { t } ` ;r.push({id:h,type: ` add ` ,position:{x:s+104,y:b},data:{kind: ` step ` ,key:h,title: ` ` ,type: ` ` ,detail: ` ` ,branch:t,lane:i,insertAfter:[...f,n.length-1]}}),m(l,h),g.push(h),y( ` lane - $ { e } - $ { t } ` ,s,t)}),f){let t=v(h-1),n= ` pass - $ { e } ` ;r.push({id:n,type: ` add ` ,position:{x:t+104,y:b},data:{kind: ` step ` ,key:n,title: ` ` ,type: ` ` ,detail: ` ` ,lane:i}}),s.add(c),m([c],n),s.delete(c),g.push(n),y( ` pass - lane - $ { e } ` ,t, ` default ` )}l=g,u+=_+1;continue}let i=p(t,String(e+1),0,u*N2,void 0,void 0,[ ` steps ` ,e]);m(l,i,[ ` steps ` ,e-1]),l=[i],u++}r.push({id: ` add - end ` ,type: ` add ` ,position:{x:104,y:u*N2-24},data:{kind: ` step ` ,key: ` add ` ,title: ` ` ,type: ` ` ,detail: ` ` ,insertAfter:[ ` steps ` ,n.length-1]}}),m(l, ` add - end ` );for(let{from:e,to:t}of o){let n=a.get(e);n&&(i.some(e=>e.kind=== ` flow ` &&e.source===n&&e.target===t)||i.push({id: ` data - $ { n } - $ { t } ` ,source:n,target:t,kind: ` data ` ,label:e,offset:24+14*i.filter(e=>e.kind=== ` data ` ).length,sourceHandle: ` data - out ` ,targetHandle: ` data - in ` }))}return{nodes:r,edges:i}}var U2={class: ` truncate ` },W2= ` \ 0 ` ,G2=P({inheritAttrs:!1,__name: ` OptionSelect ` ,props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean},size:{},class:{}},emits:[ ` update : modelValue ` ],setup(e,{emit:t}){let n=t;return(t,r)=>(L(),q(V(Tu),{"model-value":e.modelValue=== ` ` &&e.options.some(e=>e.value=== ` ` )?W2:e.modelValue||void 0,disabled:e.disabled,"onUpdate:modelValue":r[0]||=e=>n( ` update : modelValue ` ,e===W2? ` ` :String(e))},{default:I(()=>[A(V(ku),G({size:e.size?? ` sm ` ,class:t. $ props.class},t. $ attrs),{default:I(()=>[A(V(Au),{placeholder:e.placeholder},null,8,[ ` placeholder ` ])]),_:1},16,[ ` size ` , ` class ` ]),A(V(Eu),{position: ` popper ` ,class: ` max - w - [ min ( var ( -- reka - select - content - available - width ) , 20 rem ) ] ` },{default:I(()=>[(L(!0),j(U,null,M(e.options,e=>(L(),q(V(Ou),{key:e.value,value:e.value=== ` ` ?W2:e.value,disabled:e.disabled,title:e.label,class: ` * : [ span ] : last : min - w - 0 ` },{default:I(()=>[R( ` span ` ,U2,B(e.label),1)]),_:2},1032,[ ` value ` , ` disabled ` , ` title ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` , ` disabled ` ]))}}),K2=[ ` id ` ],q2=[ ` value ` ],J2=P({__name: ` WorkflowPicker ` ,props:{value:{},workflows:{},label:{},class:{},editable:{type:Boolean}},emits:[ ` pick ` ],setup(e,{emit:t}){let n=De(),r=t;return(t,i)=>e.editable?(L(),j(U,{key:0},[A(V(Q),{"model-value":e.value,list:V(n),"aria-label":e.label,class:z(t. $ props.class),placeholder: ` Workflow id or { { reference } } ` ,"onUpdate:modelValue":i[0]||=e=>r( ` pick ` ,String(e))},null,8,[ ` model - value ` , ` list ` , ` aria - label ` , ` class ` ]),R( ` datalist ` ,{id:V(n)},[(L(!0),j(U,null,M(e.workflows,e=>(L(),j( ` option ` ,{key:e.id,value:e.id},null,8,q2))),128))],8,K2)],64)):(L(),q(V(Tu),{key:1,"model-value":e.value||void 0,"onUpdate:modelValue":i[1]||=e=>r( ` pick ` ,String(e))},{default:I(()=>[A(V(ku),{"aria-label":e.label,class:z(t. $ props.class)},{default:I(()=>[A(V(Au),{placeholder: ` Choose workflow ` })]),_:1},8,[ ` aria - label ` , ` class ` ]),A(V(Eu),null,{default:I(()=>[e.value&
Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:c4 (e)}))}var o4 =/^( \s *)(- \s +)?/,s4 =/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function c4 (e){let{code:t,comment:n}=l 4(e),r=u 4(t);return n&&r.push({text:n,kind: ` comment ` }),r}function l 4(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t)r===t&&(t= ` ` );else if(r=== ` "`||r===`'`)t=r;else if(r===`#`&&(n===0||/\s/.test(e[n-1]??``)))return{code:e.slice(0,n),comment:e.slice(n)}}return{code:e,comment:``}}function u 4(e){if(!e)return[];let t=[],n=o4 .exec(e);n?.[1]&&t.push({text:n[1],kind:`plain`}),n?.[2]&&t.push({text:n[2],kind:`punct`});let r=e.slice(n?.[0].length??0);if(!r)return t;let i=s4 .exec(r);return i?(t.push({text:i[1]??``,kind:`key`}),t.push({text:i[2]??`:`,kind:`punct`}),i[3]&&t.push({text:i[3],kind:`plain`}),[...t,...d 4(i[4]??``)]):[...t,...d 4(r)]}function d 4(e){if(!e)return[];let t=/^(" [ ^ "]*" ? | '[^' ] * ' ? ) ( [ \ s \ S ] * ) $ / . exec ( e ) ; if ( ! t ) return [ { text : e , kind : ` plain ` } ] ; let n = [ { text : t [ 1 ] ? ? ` ` , kind : ` string ` } ] ; return t [ 2 ] && n . push ( { text : t [ 2 ] , kind : ` plain ` } ) , n } function f4 ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function p4(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function m4(e){return typeof e== ` string ` &&e.trim()!== ` ` }var h4={class: ` space - y - 4 px - 3 py - 3 ` },g4={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },_4={key:1,class: ` space - y - 3 ` },v4={key:0,class: ` block space - y - 1.5 ` },y4=[ ` id ` ],b4=[ ` value ` ],x4={class: ` text - xs font - medium text - fg - muted ` },S4={class: ` flex items - center gap - 2 ` },C4={key:1,role: ` alert ` ,class: ` text - xs text - danger ` },w4={key:2,class: ` space - y - 1.5 ` },T4=[ ` title ` ],E4={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },D4={key:0,class: ` divide - y divide - border rounded - md border border - border ` },O4=[ ` title ` ],k4={key:0,class: ` space - y - 3 ` },A4={class: ` text - label ` },j4={key:0,class: ` text - danger ` },M4={class: ` ml - 2 text - xs text - fg - subtle ` },N4={key:1,class: ` space - y - 3 ` },P4={class: ` text - label ` },F4={class: ` ml - 2 text - xs text - fg - subtle ` },I4=[ ` title ` ],L4={key:0,class: ` text - xs text - danger ` },R4={class: ` space - y - 1.5 ` },z4={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },B4={class: ` divide - y divide - border rounded - md border border - border ` },V4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },H4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },U4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },W4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },G4=[ ` for ` ],K4=P({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=De(),r=e,i=t,a=Y(()=>p2(r.yaml,r.path)??{}),o=Y(()=>d2(a.value)),s=Y(()=>o.value?.kind??(typeof a.value.type== ` string ` ?a.value.type: ` ` )),c=Y(()=>o.value?.branches.map(([e])=>e)??[]),l=Y(()=>s.value=== ` parallel ` ?2:1);function u(e){i( ` update : yaml ` ,m2(r.yaml,r.path,{...a.value,switch:{...a.value.switch,on:e}}))}let d=J( ` ` ),f=J( ` ` );function p(e,t,n= ` ` ){try{let a=e=== ` add ` ?v2(r.yaml,r.path,t):e=== ` rename ` ?y2(r.yaml,r.path,t,n):b2(r.yaml,r.path,t);i( ` update : yaml ` ,a),d.value= ` ` ,f.value= ` ` }catch(e){f.value=String(e.message)}}let m=Y(()=>r.vocabulary.find(e=>e.name===s.value)),h=Y(()=>typeof a.value.settings== ` object ` &&a.value.settings!==null?a.value.settings:{}),g=Y(()=>T2(r.yaml,r.path)),_=Y(()=>t4(a.value)),v=Y(()=>m.value?.settings&&a.value.settings?r4(a.value.settings,m.value.settings, ` settings ` ): ` ` ),y=[ ` mission ` , ` workflow ` , ` message ` , ` body ` , ` plan ` , ` then ` , ` status ` , ` detail ` , ` run ` , ` rules ` ],b=/mission|body|detail|plan|rules/;function x(e,t){return[ ` workflow . call ` , ` workflow . handoff ` ].includes(s.value)&&e=== ` workflow ` ||s.value=== ` human . approve ` &&e=== ` then ` ? ` workflow ` :s.value=== ` agent . run ` &&e=== ` model ` ? ` select ` :t.type=== ` string ` ?t.enum? ` select ` :b.test(e)? ` text ` : ` line ` :t.type=== ` boolean ` ? ` boolean ` :t.type=== ` integer ` ||t.type=== ` number ` ? ` number ` :t.type=== ` array ` &&t.items?.type=== ` string ` ? ` lines ` : ` yaml ` }let S=Y(()=>{let e=Object.entries(m.value?.settings?.properties??{}).filter(([e])=>s.value!== ` workflow . call ` ||![ ` inputs ` , ` outputs ` ].includes(e)).map(([e,t])=>({key:e,schema:t,kind:x(e,t),options:s.value=== ` agent . run ` &&e=== ` model ` ?r.modelAliases:t.enum??[]})),t=e.filter(e=>y.includes(e.key)&&e.kind!== ` boolean ` ).sort((e,t)=>y.indexOf(e.key)-y.indexOf(t.key))[0],n=e.filter(e=>e!==t);return{lead:t,compact:n.filter(e=>[ ` workflow ` , ` select ` , ` line ` , ` number ` , ` boolean ` ].includes(e.kind)),long:n.filter(e=>[ ` text ` , ` lines ` , ` yaml ` ].includes(e.kind))}}),C=J(!S.value.lead&&!o.value),w=e=>[{value: ` ` ,label: ` Default ` },...e.map(e=>({value:e,label:e}))];function ee(e){let{id:t,type:n,...a}=e;i( ` update : yaml ` ,m2(r.yaml,r.path,{id:t,type:n,...a}))}function T(e,t){ee({...a.value,[e]:t})}function E(e){let t={...a.value.retry,...e};T( ` retry ` ,t.attempts===void 0&&!t.backoff?void 0:{...t,attempts:t.attempts??1})}function D(e,t){let n={...h.value,[e]:t};s.value=== ` workflow . call ` &&e=== ` wait ` &&t!==!0&&delete n.outputs,ee({...a.value,settings:n})}function O(e,t){let n={...h.value,[e]:t};s.value=== ` workflow . call ` &&t!==h.value[e]&&(delete n.inputs,delete n.outputs),ee({...a.value,settings:n})}let te=Y(()=>r.workflows.find(e=>e.id===h.value.workflow)),ne=Y(()=>Object.entries(D2(te.value?.yaml?? ` ` , ` inputs ` )??{})),re=Y(()=>Object.entries(D2(te.value?.yaml?? ` ` , ` outputs ` )??{})),k=Y(()=>Object.entries(D2(r.yaml, ` inputs ` )??{})),ae=Y(()=>Object.entries(D2(r.yaml, ` outputs ` )??{})),oe=Y(()=>h.value.inputs??{}),se=Y(()=>h.value.outputs??{}),ce=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),le=e=>[ ` object ` , ` array ` ].includes(e.type?? ` ` ),ue=e=>oe.value[e]===void 0? ` ` :String(oe.value[e]);function de(e,t,n){D( ` inputs ` ,{...oe.value,[e]:t=== ` ` ?void 0:ce(t)?t:TE(t,n?? ` string ` )})}let fe=(e,t,n)=>e.filter(([,e])=>e.type===t.type||e.type=== ` any ` ||t.type=== ` any ` ).map(([e])=>({value: ` $ { n } . $ { e } ` ,label:e})),pe=J(null);function me(e){let t=pe.value??S.value.lead?.key;if(!t)return;let n=typeof h.value[t]== ` string ` ?h.value[t]: ` ` ,r= ` { { steps . $ { e } . summary } } ` ;D(t,n? ` $ { n . trimEnd ( ) } $ { r } ` :r)}let he=J({});function ge(e,t){try{D(e,t.trim()?s2(t):void 0),he.value={...he.value,[e]: ` ` }}catch(t){he.value={...he.value,[e]:String(t.me
Line truncated
` )[0]}}}let _e=e=>e===void 0? ` ` :c2(e).trimEnd(),ve=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),ye=e=>typeof h.value[e]== ` string ` ?h.value[e]: ` ` ,be=[{value: ` ` ,label: ` Park the task ` },{value: ` continue ` ,label: ` Continue ` }];return(t,r)=>(L(),j( ` div ` ,h4,[v.value?(L(),j( ` p ` ,g4,B(v.value),1)):F( ` ` ,!0),o.value?(L(),j( ` section ` ,_4,[s.value=== ` switch ` ?(L(),j( ` label ` ,v4,[r[15]||=R( ` span ` ,{class: ` text - xs font - medium text - fg - muted ` ,title: ` The value whose case runs ; a case named default runs when none matches ` }, ` Switch on ` ,-1),A(V(Q),{"model-value":o.value.on,class: ` font - mono ` ,placeholder: ` steps . assess . result . fit ` ,list: ` $ { V ( n ) } - switch - on ` ,onChange:r[0]||=e=>u(e.target.value.trim())},null,8,[ ` model - value ` , ` list ` ]),R( ` datalist ` ,{id: ` $ { V ( n ) } - switch - on ` },[(L(!0),j(U,null,M(g.value,e=>(L(),j( ` option ` ,{key:e,value: ` steps . $ { e } . result . ` },null,8,b4))),128))],8,y4)])):F( ` ` ,!0),R( ` div ` ,x4,B(s.value=== ` switch ` ? ` Cases ` : ` Branches ` ),1),(L(!0),j(U,null,M(c.value,e=>(L(),j( ` div ` ,{key:e,class: ` flex items - center gap - 2 ` },[A(V(Q),{"model-value":e,class:z(s.value=== ` switch ` && ` font - mono ` ),"aria-label": ` $ { s . value === ` switch ` ? ` Case ` : ` Branch ` } $ { e } ` ,onChange:t=>p( ` rename ` ,e,t.target.value.trim())},null,8,[ ` model - value ` , ` class ` , ` aria - label ` , ` onChange ` ]),A(V(X),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Remove $ { e } ` ,disabled:c.value.length<=l.value,onClick:t=>p( ` delete ` ,e)},{default:I(()=>[A(V(hu))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),R( ` div ` ,S4,[A(V(Q),{modelValue:d.value,"onUpdate:modelValue":r[1]||=e=>d.value=e,"aria-label":s.value=== ` switch ` ? ` New case value ` : ` New branch name ` ,placeholder:s.value=== ` switch ` ? ` Value , or default ` : ` Branch name ` ,onKeydown:r[2]||=vt(gt(e=>p( ` add ` ,d.value.trim()),[ ` prevent ` ]),[ ` enter ` ])},null,8,[ ` modelValue ` , ` aria - label ` , ` placeholder ` ]),A(V(X),{type: ` button ` ,size: ` icon - sm ` ,variant: ` outline ` ,"aria-label":s.value=== ` switch ` ? ` Add case ` : ` Add branch ` ,disabled:!d.value.trim(),onClick:r[3]||=e=>p( ` add ` ,d.value.trim())},{default:I(()=>[A(V(lu))]),_:1},8,[ ` aria - label ` , ` disabled ` ])]),f.value?(L(),j( ` p ` ,C4,B(f.value),1)):F( ` ` ,!0)])):F( ` ` ,!0),S.value.lead?(L(),j( ` section ` ,w4,[R( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - fg - muted ` ,title:S.value.lead.schema.description},[H(B(ve(S.value.lead.key,S.value.lead.schema))+ ` ` ,1),S.value.lead.schema.description?(L(),q(V(Rl),{key:0,class: ` size - 3 text - fg - subtle ` })):F( ` ` ,!0)],8,T4),S.value.lead.kind=== ` workflow ` ?(L(),q(J2,{key:0,editable:s.value!== ` workflow . call ` ,value:ye(S.value.lead.key),workflows:e.workflows,label:ve(S.value.lead.key,S.value.lead.schema),onPick:r[4]||=e=>O(S.value.lead.key,e)},null,8,[ ` editable ` , ` value ` , ` workflows ` , ` label ` ])):S.value.lead.kind=== ` select ` ?(L(),q(G2,{key:1,class: ` w - full ` ,"model-value":ye(S.value.lead.key),options:w(S.value.lead.options),"aria-label":ve(S.value.lead.key,S.value.lead.schema),"onUpdate:modelValue":r[5]||=e=>D(S.value.lead.key,e||void 0)},null,8,[ ` model - value ` , ` options ` , ` aria - label ` ])):S.value.lead.kind=== ` text ` ?(L(),q(V(Sd),{key:2,"model-value":ye(S.value.lead.key),class: ` min - h - 32 text - label leading - relaxed ` ,onFocus:r[6]||=e=>pe.value=S.value.lead.key,"onUpdate:modelValue":r[7]||=e=>D(S.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(L(),q(V(Q),{key:3,"model-value":ye(S.value.lead.key),onFocus:r[8]||=e=>pe.value=S.value.lead.key,"onUpdate:modelValue":r[9]||=e=>D(S.value.lead.key,String(e))},null,8,[ ` model - value ` ])),g.value.length&&S.value.lead.kind!== ` select ` ?(L(),j( ` div ` ,E4,[r[16]||=R( ` span ` ,{class: ` text - caption text - fg - subtle ` }, ` Insert ` ,-1),(L(!0),j(U,null,M(g.value,e=>(L(),q(V(X),{key:e,type: ` button ` ,variant: ` outline ` ,size: ` xs ` ,class: ` font - mono ` ,title: ` { { steps . $ { e } . summary } } ` ,onClick:t=>me(e)},{default:I(()=>[H(B(e),1)]),_:2},1032,[ ` title ` , ` onClick ` ]))),128))])):F( ` ` ,!0)])):F( ` ` ,!0),A(V(X),{type: ` button ` ,variant: ` ghost ` ,size: ` xs ` ,class: ` - ml - 2 text - fg - muted aria - expanded : bg - transparent ` ,"aria-expanded":C.value,onClick:r[10]||=e=>C.value=!C.value},{default:I(()=>[A(V(ie),{"data-icon": ` inline - start ` ,class:z([ ` transition - transform ` ,!C.value&& ` - rotate - 90 ` ])},null,8,[ ` class ` ]),r[17]||=H( ` More ` ,-1)]),_:1},8,[ ` aria - expanded ` ]),C.value?(L(),j(U,{key:3},[S.value.compact.length?(L(),j( ` section ` ,D4,[(L(!0),j(U,null,M(S.value.compact,t=>(L(),j( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[R( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - label ` ,title:t.schema.description},[H(B(ve(t.key,t.schema))+ ` ` ,1),t.schema.description?(L(),q(V(Rl),{key:0,class: ` size - 3 text - fg - subtle ` })):F( ` ` ,!0)],8,O4),t.kind=== ` workflow ` ?(L(),q(J2,{key:0,editable:s.value!== ` workflow . call ` ,class: ` max - w - 48 ` ,value:ye(t.key),workflows:e.workflows,label:ve(t.key,t.schema),onPick:e=>O(t.key,e)},null,8,[ ` editable ` , ` value ` , ` workflows ` , ` label ` , ` onPick ` ])):t.kind=== ` boolean ` ?(L(),q(V(Nw),{key:1,"model-value":h.value[t.key]===!0,"onUpdate:modelValue":e=>D(t.key,e||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):t.kind=== ` select ` ?(L(),q(G2,{key:2,class: ` w - 40 ` ,"model-val
Line truncated
` ): ` ` ,class: ` min - h - 16 font - mono text - xs ` ,placeholder: ` One per line ` ,"onUpdate:modelValue":t=>D (e.key,String(t).split( `
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(L(),j(U,{key:2},[A(V(Sd),{"model-value":_e(h.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>ge(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),he.value[e.key]?(L(),j( ` span ` ,L4,B(he.value[e.key]),1)):F( ` ` ,!0)],64))]))),128)),R( ` section ` ,R4,[_.value?(L(),j( ` p ` ,z4,B(_.value),1)):F( ` ` ,!0),R( ` div ` ,B4,[R( ` label ` ,V4,[r[20]||=R( ` span ` ,{class: ` flex - 1 text - label ` ,title: ` Empty always runs . A field such as inputs . enabled , ! inputs . skip , or steps . plan . result . ready == true ` }, ` Run only when ` ,-1),A(V(Q),{class: ` h - 8 w - 48 font - mono text - xs ` ,placeholder: ` inputs . enabled ` ,"aria-invalid":_.value&&_.value.startsWith( ` when ` )?!0:void 0,"model-value":a.value.when?? ` ` ,"onUpdate:modelValue":r[11]||=e=>T( ` when ` ,String(e))},null,8,[ ` aria - invalid ` , ` model - value ` ])]),R( ` label ` ,H4,[r[21]||=R( ` span ` ,{class: ` flex - 1 text - label ` }, ` If it fails ` ,-1),A(G2,{class: ` w - 36 ` ,"aria-label": ` If it fails ` ,"model-value":a.value.on_failure?? ` ` ,options:be,"onUpdate:modelValue":r[12]||=e=>T( ` on _failure ` ,e||void 0)},null,8,[ ` model - value ` ])]),R( ` label ` ,U4,[r[22]||=R( ` span ` ,{class: ` flex - 1 text - label ` }, ` Attempts ` ,-1),A(V(Q),{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 8 w - 20 text - right text - label ` ,"model-value":a.value.retry?.attempts?? ` ` ,"onUpdate:modelValue":r[13]||=e=>E({attempts:String(e)=== ` ` ?void 0:Number(String(e))})},null,8,[ ` model - value ` ])]),R( ` div ` ,W4,[R( ` label ` ,{for: ` $ { V ( n ) } - backoff ` ,class: ` flex - 1 text - label ` }, ` Retry backoff ` ,8,G4),A(V(Ew),{id: ` $ { V ( n ) } - backoff ` ,"model-value":a.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":r[14]||=e=>E({backoff:e||void 0})},null,8,[ ` id ` , ` model - value ` ])])])])],64)):F( ` ` ,!0)]))}}),q4={class: ` space - y - 1.5 ` },J4={class: ` flex items - center text - xs font - medium text - fg - muted ` },Y4={key:0,class: ` divide - y divide - border rounded - md border border - border ` },X4=P({__name: ` SpecList ` ,props:{yaml:{},field:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=e,r=t,i=[ ` string ` , ` number ` , ` bool ` , ` object ` , ` array ` , ` any ` ].map(e=>({value:e,label:e})),a=Y(()=>Object.entries(D2(n.yaml,n.field)??{}));function o(e){r( ` update : yaml ` ,O2(n.yaml,n.field,Object.fromEntries(e.filter(([e])=>e))))}function s(e,t,n){o(a.value.map((r,i)=>i===e?[t,n]:r))}function c(){let e=n.field.slice(0,-1),t=a.value.length+1;for(;a.value.some(([n])=>n=== ` $ { e } _$ { t } ` );)t++;o([...a.value,[ ` $ { e } _$ { t } ` ,{type: ` string ` }]])}return(t,n)=>(L(),j( ` section ` ,q4,[R( ` div ` ,J4,[H(B(e.field=== ` inputs ` ? ` Inputs ` : ` Outputs ` )+ ` ` ,1),A(V(X),{type: ` button ` ,variant: ` ghost ` ,size: ` xs ` ,class: ` ml - auto ` ,onClick:c},{default:I(()=>[A(V(lu),{"data-icon": ` inline - start ` }),n[0]||=H( ` Add ` ,-1)]),_:1})]),a.value.length?(L(),j( ` div ` ,Y4,[(L(!0),j(U,null,M(a.value,([t,n],r)=>(L(),j( ` div ` ,{key:r,class: ` flex items - center gap - 2 px - 2 py - 1.5 ` },[A(V(Q),{"model-value":t,class: ` h - 8 min - w - 0 flex - 1 font - mono text - xs ` ,"aria-label": ` $ { e . field } name ` ,onChange:e=>s(r,e.target.value.trim(),n)},null,8,[ ` model - value ` , ` aria - label ` , ` onChange ` ]),A(G2,{"model-value":n.type?? ` string ` ,options:V(i),class: ` w - 24 ` ,"aria-label": ` $ { t } type ` ,"onUpdate:modelValue":e=>s(r,t,{...n,type:e})},null,8,[ ` model - value ` , ` options ` , ` aria - label ` , ` onUpdate : modelValue ` ]),A(V(Nw),{"model-value":n.required===!0,title:n.required? ` Required ` : ` Optional ` ,"aria-label": ` $ { t } required ` ,"onUpdate:modelValue":e=>s(r,t,{...n,required:e||void 0})},null,8,[ ` model - value ` , ` title ` , ` aria - label ` , ` onUpdate : modelValue ` ]),A(V(X),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - xs ` ,"aria-label": ` Remove $ { t } ` ,onClick:e=>o(a.value.filter((e,t)=>t!==r))},{default:I(()=>[A(V(hu))]),_:1},8,[ ` aria - label ` , ` onClick ` ])]))),128))])):F( ` ` ,!0)]))}}),Z4={class: ` space - y - 4 px - 3 py - 3 ` },Q4={class: ` divide - y divide - border rounded - md border border - border ` }, $ 4={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },e3={key:0,role: ` alert ` ,class: ` px - 3 py - 2 text - xs text - danger ` },t3={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },n3={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },r3={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },i3={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },a3={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },o3={class: ` space - y - 1.5 ` },s3= ` 6 f129e29 - 0e26 - 5246 - 99 bd - 74 cb4496203b ` ,c3=P({__name: ` WorkflowSettings ` ,props:{yaml:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=e,r=t,i=e=>{let t=D2(n.yaml,e);return typeof t== ` string ` ?t: ` ` };function a(e,t){r( ` update : yaml ` ,O2(n.yaml,e,t))}let o=fT(),s=J([]),c=J(!0),l=J( ` ` );async function u(){c.value=!0,l.value= ` ` ,s.value=[];try{await o.loadOrg();let e=await Z.orgAgents(o.homeOrg);s.value=e.agents.filter(e=>e.lifecycle=== ` active ` ),!i( ` identity ` )&&s.value.some(e=>e.id===s3)&&a( ` identity ` ,s3)}catch(e){l.value=String(e.message||e)}finally{c.value=!1}}Ue(u);let d=Y(()=>{let e=i( ` identity ` ),t=s.value.map(e=>({value:e.id,label:e.display_name}));return e&&!c.value&&!s.value.some(t=>t.id===e)?[{value:e,label: ` $ { e } ( unknown ) ` ,disabled:!0},...t]:t}),f=Sw(),p=Y(()=>{let e=Object.keys(f.stateFor( ` agent - profiles ` Line truncated
` ).replace( `
` , `
+ ` ).split( `
` ).map(e=>e.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());let a=i.every((e,t)=>n.has(e)&&Array.from(n.values())[t]===i[t]);return r&&n.delete(e.toLowerCase()),a}function fle(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=ple(n.code,e);return Array.isArray(e)?e.some(e=>w5(n[r],e,t,n.type=== ` keyup ` )):w5(n[r],e,t,n.type=== ` keyup ` )}}function ple(e,t){return t.includes(e)? ` code ` : ` key ` }function T5(e,t){let n=J(()=>Ye(t?.target)??ule),r=lt(Ye(e)===!0),i=!1,a=new Set,o=c(Ye(e));M(()=>Ye(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),o6([ ` blur ` , ` contextmenu ` ],s),s6((...e)=>o(...e),e=>{let n=Ye(t?.actInsideInputWithModifier)??!0,a=Ye(t?.preventDefault)??!1;if(i=dle(e),(!i||i&&!n)&&C5(e))return;let o=e.composedPath?.call(e)?.[0]||e.target,s=o?.nodeName=== ` BUTTON ` ||o?.nodeName=== ` A ` ;!a&&(i||!s)&&e.preventDefault(),r.value=!0},{eventName: ` keydown ` ,target:n}),s6((...e)=>o(...e),e=>{let n=Ye(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&C5(e))return;i=!1,r.value=!1}},{eventName: ` keyup ` ,target:n});function s(){i=!1,a.clear(),r.value=Ye(e)===!0}function c(e){return e===null?(s(),()=>!1):typeof e== ` boolean ` ?(s(),r.value=e,()=>!1):Array.isArray(e)||typeof e== ` string ` ?fle(e,a):e}return r}var E5= ` vue - flow _ _node - desc ` ,D5= ` vue - flow _ _edge - desc ` ,mle= ` vue - flow _ _aria - live ` ,O5=[ ` Enter ` , ` ` , ` Escape ` ],k5={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function A5(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function j5(e,t){let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function M5(e){return{width:e.offsetWidth,height:e.offsetHeight}}function N5(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function P5(e,t){return{x:N5(e.x,t[0][0],t[1][0]),y:N5(e.y,t[0][1],t[1][1])}}function F5(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function I5(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function L5(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!I5(e)}function R5(e){return L5(e)&& ` computedPosition ` in e}function z5(e){return!Number.isNaN(e)&&Number.isFinite(e)}function hle(e){return z5(e.width)&&z5(e.height)&&z5(e.x)&&z5(e.y)}function gle(e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:Ke({width:0,height:0}),computedPosition:Ke({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:N7(e.data)?e.data:{},events:Ke(N7(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function B5(e,t,n){let r={id:e.id.toString(),type:e.type??t?.type?? ` default ` ,source:e.source.toString(),target:e.target.toString(),sourceHandle:e.sourceHandle?.toString(),targetHandle:e.targetHandle?.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:N7(e.data)?e.data:{},events:Ke(N7(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function V5(e,t,n,r){let i=typeof e== ` string ` ?e:e.id,a=new Set,o=r=== ` source ` ? ` target ` : ` source ` ;for(let e of n)e[o]===i&&a.add(e[r]);return t.filter(e=>a.has(e.id))}function _le(...e){if(e.length===3){let[t,n,r]=e;return V5(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>I5(e)&&e.source===r).map(e=>n.find(t=>L5(t)&&t.id===e.target))}function vle(...e){if(e.length===3){let[t,n,r]=e;return V5(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>I5(e)&&e.target===r).map(e=>n.find(t=>L5(t)&&t.id===e.source))}function H5({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function yle(e,t){return t.some(t=>I5(t)&&t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))}function U5({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function W5({x:e,y:t},{x:n,y:r,zoom:i},a=!1,o=[1,1]){let s={x:(e-n)/i,y:(t-r)/i};return a?C7(s,o):s}function ble(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function G5({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function xle({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function K5(e){let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0};for(let n=0;n<e.length;n++){let r=e[n];t=ble(t,G5({...r.computedPosition,...r.dimensions}))}return xle(t)}function q5(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...W5(t,n),width:t.width/n.zoom,height:t.height/n.zoom},o=[];for(let t of e){let{dimensions:e,selectabl
Line truncated
` ).map(e=>e.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());let a=i.every((e,t)=>n.has(e)&&Array.from(n.values())[t]===i[t]);return r&&n.delete(e.toLowerCase()),a}function Sle(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=Cle(n.code,e);return Array.isArray(e)?e.some(e=>w5(n[r],e,t,n.type=== ` keyup ` )):w5(n[r],e,t,n.type=== ` keyup ` )}}function Cle(e,t){return t.includes(e)? ` code ` : ` key ` }function T5(e,t){let n=Y(()=>Je(t?.target)??ble),r=ct(Je(e)===!0),i=!1,a=new Set,o=c(Je(e));N(()=>Je(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),o6([ ` blur ` , ` contextmenu ` ],s),s6((...e)=>o(...e),e=>{let n=Je(t?.actInsideInputWithModifier)??!0,a=Je(t?.preventDefault)??!1;if(i=xle(e),(!i||i&&!n)&&C5(e))return;let o=e.composedPath?.call(e)?.[0]||e.target,s=o?.nodeName=== ` BUTTON ` ||o?.nodeName=== ` A ` ;!a&&(i||!s)&&e.preventDefault(),r.value=!0},{eventName: ` keydown ` ,target:n}),s6((...e)=>o(...e),e=>{let n=Je(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&C5(e))return;i=!1,r.value=!1}},{eventName: ` keyup ` ,target:n});function s(){i=!1,a.clear(),r.value=Je(e)===!0}function c(e){return e===null?(s(),()=>!1):typeof e== ` boolean ` ?(s(),r.value=e,()=>!1):Array.isArray(e)||typeof e== ` string ` ?Sle(e,a):e}return r}var E5= ` vue - flow _ _node - desc ` ,D5= ` vue - flow _ _edge - desc ` ,wle= ` vue - flow _ _aria - live ` ,O5=[ ` Enter ` , ` ` , ` Escape ` ],k5={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function A5(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function j5(e,t){let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function M5(e){return{width:e.offsetWidth,height:e.offsetHeight}}function N5(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function P5(e,t){return{x:N5(e.x,t[0][0],t[1][0]),y:N5(e.y,t[0][1],t[1][1])}}function F5(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function I5(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function L5(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!I5(e)}function R5(e){return L5(e)&& ` computedPosition ` in e}function z5(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Tle(e){return z5(e.width)&&z5(e.height)&&z5(e.x)&&z5(e.y)}function Ele(e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:Ge({width:0,height:0}),computedPosition:Ge({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:N7(e.data)?e.data:{},events:Ge(N7(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function B5(e,t,n){let r={id:e.id.toString(),type:e.type??t?.type?? ` default ` ,source:e.source.toString(),target:e.target.toString(),sourceHandle:e.sourceHandle?.toString(),targetHandle:e.targetHandle?.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:N7(e.data)?e.data:{},events:Ge(N7(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function V5(e,t,n,r){let i=typeof e== ` string ` ?e:e.id,a=new Set,o=r=== ` source ` ? ` target ` : ` source ` ;for(let e of n)e[o]===i&&a.add(e[r]);return t.filter(e=>a.has(e.id))}function Dle(...e){if(e.length===3){let[t,n,r]=e;return V5(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>I5(e)&&e.source===r).map(e=>n.find(t=>L5(t)&&t.id===e.target))}function Ole(...e){if(e.length===3){let[t,n,r]=e;return V5(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>I5(e)&&e.target===r).map(e=>n.find(t=>L5(t)&&t.id===e.source))}function H5({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function kle(e,t){return t.some(t=>I5(t)&&t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))}function U5({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function W5({x:e,y:t},{x:n,y:r,zoom:i},a=!1,o=[1,1]){let s={x:(e-n)/i,y:(t-r)/i};return a?C7(s,o):s}function Ale(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function G5({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function jle({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function K5(e){let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0};for(let n=0;n<e.length;n++){let r=e[n];t=Ale(t,G5({...r.computedPosition,...r.dimensions}))}return jle(t)}function q5(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...W5(t,n),width:t.width/n.zoom,height:t.height/n.zoom},o=[];for(let t of e){let{dimensions:e,selectabl
Line truncated
Node : $ { e } ` ,NODE_NOT_FOUND:e=> ` Node not found
Node : $ { e } ` ,NODE_MISSING_PARENT:(e,t)=> ` Node is missing a parent
Node : $ { e }
@@ -317,7 +317,7 @@ Edge: ${e}
Source : $ { t }
Target : $ { n } ` ,EDGE_ORPHANED:e=> ` Edge was orphaned ( suddenly missing source or target ) and has been removed
Edge : $ { e } ` ,EDGE_NOT_FOUND:e=> ` Edge not found
Edge : $ { e } ` ,USEVUEFLOW_OPTIONS:()=> ` The options parameter is deprecated and will be removed in the next major version . Please use the id parameter instead ` },y7=class extends Error{constructor(e,...t){super(v7[e]?.call(v7,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function b7(e){return ` clientX ` in e}function jle(e){return ` sourceEvent ` in e}function x7(e,t){let n=b7(e),r,i;return n?(r=e.clientX,i=e.clientY): ` touches ` in e&&e.touches.length>0?(r=e.touches[0].clientX,i=e.touches[0].clientY): ` changedTouches ` in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(r=0,i=0),{x:r-(t?.left??0),y:i-(t?.top??0)}}var S7=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function Mle(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function C7(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var Nle=()=>!0;function w7(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function Ple(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())j5(i,A5(e))>0&&r.push(e);return r}var Fle=250;function Ile(e,t,n,r){let i=[],a=1/0,o=Ple(e,n,t+Fle);for(let n of o){let o=[...n.handleBounds?.source??[],...n.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=h7(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type=== ` source ` ? ` target ` : ` source ` ;return i.find(t=>t.type===e)??i[0]}return i[0]}function T7(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=Nle},u,d,f,p){let m=a=== ` target ` ,h=t?o.querySelector( ` . $ { s } - flow _ _handle [ data - id = "${c}-${t?.nodeId}-${t?.id}-${t?.type}" ] ` ):null,{x:g,y:_}=x7(e),v=o.elementFromPoint(g,_),y=v?.classList.contains( ` $ { s } - flow _ _handle ` )?v:h,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=E7(void 0,y),t=y.getAttribute( ` data - nodeid ` ),a=y.getAttribute( ` data - handleid ` ),o=y.classList.contains( ` connectable ` ),s=y.classList.contains( ` connectableend ` );if(!t||!e)return b;let c={source:m?t:r,sourceHandle:m?a:i,target:m?r:t,targetHandle:m?i:a};b.connection=c,b.isValid=o&&s&&(n===b5.Strict?m&&e=== ` source ` ||!m&&e=== ` target ` :t!==r||a!==i)&&l(c,{nodes:d,edges:u,sourceNode:f(c.source),targetNode:f(c.target)}),b.toHandle=D7(t,e,a,p,n,!0)}return b}function E7(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function Lle(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function Rle(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function D7(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===b5.Strict?o.handleBounds?.[t]:[...o.handleBounds?.source??[],...o.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...h7(o,c,c.position,!0)}:c}var O7={[_5.Left]:_5.Right,[_5.Right]:_5.Left,[_5.Top]:_5.Bottom,[_5.Bottom]:_5.Top},zle=[ ` production ` , ` prod ` ];function k7(e,...t){A7()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function A7(){return!zle.includes( ` production ` )}function j7(e,t,n,r,i){let a=t.querySelectorAll( ` . vue - flow _ _handle . $ { e } ` );return a?.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute( ` data - handleid ` ),type:e,nodeId:i,position:t.getAttribute( ` data - handlepos ` ),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...M5(t)}}):null}function M7(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),Je(()=>{o.blur()})):n([e])}function N7(e){return B(e)!==void 0}function Ble(e,t,n,r){if(!e||!e.source||!e.target)return n(new y7(_7.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=I5(e)?e:{...e,id:H5(e)},i=B5(i,void 0,r),!yle(i,t)&&i}function Vle(e,t,n,r,i){if(!t.source||!t.target)return i(new y7(_7.EDGE_INVALID,e.id)),!1;if(!n)return i(new y7(_7.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?H5(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function P7(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!L5(o)){n(new y7(_7.NODE_INVALID,o?.id));continue}let s=gle(o,t(o.id),o.parentNode);o.parentNode&&(r[o.parentNode]=!0),i[a]=s}for(let e of i){let a=t(e.parentNode)||i.find(t=>t.id===e.parentNode);e.parentNode&&!a&&n(new y7(_7.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||r[e.id])&&(r[e.id]&&(e.isParent=!0),a&&(a.isParent=!0))}return i}function F7(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o= ` $ { i } - $ { e } ` ;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o= ` $ { i } - $ { e } - $ { a } ` ;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function I7(e,t,n){e.clear();for(let t of n){let{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=t,o={edgeId:t.id,source:n,target:r,sourceHandle:i,targetHandle:a},s= ` $ { n } - $ { i } -- $ { r } - $ { a } ` ;F7( ` sourc Line truncated
` )},z(e.data.summary||e.data.detail),9,kde)):P( ` ` ,!0),e.data.when||e.data.retry||e.data.continues?(I(),A( ` div ` ,Ade,[e.data.when?(I(),A( ` span ` ,{key:0,class: ` flex max - w - full min - w - 0 items - center gap - 0.5 rounded bg - secondary px - 1 font - mono ` ,title: ` Runs only when $ { e . data . when } ` },[k(B(Ql),{class: ` size - 3 shrink - 0 ` ,"aria-hidden": ` true ` }),L( ` span ` ,Mde,z(e.data.when),1)],8,jde)):P( ` ` ,!0),e.data.retry?(I(),A( ` span ` ,{key:1,class: ` flex items - center gap - 0.5 rounded bg - secondary px - 1 ` ,title: ` Up to $ { e . data . retry } attempts ` },[k(B(Tte),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),V( ` × ` +z(e.data.retry),1)],8,Nde)):P( ` ` ,!0),e.data.continues?(I(),A( ` span ` ,Pde,[k(B(Nte),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),r[10]||=V( ` continues ` ,-1)])):P( ` ` ,!0)])):P( ` ` ,!0),e.data.run?.error?(I(),A( ` p ` ,{key:4,class: ` mt - 1 line - clamp - 2 text - [ 11 px ] text - danger ` ,title:e.data.run.error},z(e.data.run.error),9,Fde)):P( ` ` ,!0)],64))]),k(eee,{"enter-from-class": ` opacity - 0 - translate - y - 1 ` ,"enter-active-class": ` transition duration - 200 ` ,"leave-to-class": ` opacity - 0 ` ,"leave-active-class": ` transition duration - 100 ` },{default:F(()=>[e.data.expanded?(I(),A( ` div ` ,{key:0,class: ` nodrag nopan nowheel cursor - auto border - t border - border ` ,onClick:r[6]||=_t(()=>{},[ ` stop ` ])},[G(t. $ slots, ` default ` )])):P( ` ` ,!0)]),_:3}),k(B(Q7),{type: ` source ` ,position:B(_5).Bottom},null,8,[ ` position ` ]),k(B(Q7),{id: ` data - out ` ,type: ` source ` ,position:B(_5).Right,class: ` ! opacity - 0 ` },null,8,[ ` position ` ]),e.data.type=== ` switch ` ?(I(),K(B(Q7),{key:1,id: ` otherwise ` ,type: ` source ` ,position:B(_5).Right,class: ` ! opacity - 0 ` },null,8,[ ` position ` ])):P( ` ` ,!0)],2))}}),Lde={class: ` pointer - events - none size - full rounded - xl border border - dashed border - border bg - muted / 30 ` },Rde={class: ` flex items - center gap - 1 px - 2.5 pt - 1.5 text - [ 11 px ] text - fg - subtle ` },zde={key:0},Bde={key:1,class: ` font - mono ` },Vde=N({__name: ` LaneNode ` ,props:{data:{}},setup(e){return(t,n)=>(I(),A( ` div ` ,Lde,[L( ` div ` ,Rde,[e.data.lane=== ` switch ` ?(I(),A(H,{key:0},[k(B(pu),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),e.data.title==="default"?(I(),A( ` span ` ,zde, ` otherwise ` )):(I(),A( ` span ` ,Bde, ` = ` +z(e.data.title),1))],64)):(I(),A(H,{key:1},[k(B(eu),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),V(z(e.data.title),1)],64))])]))}}),Hde={class: ` flex shrink - 0 items - center justify - center gap - 1 border - t border - border bg - card p - 1 ` },S9=240,Ude=416,C9=-140,Wde=72,Gde=.9,w9=N({__name: ` WorkflowCanvas ` ,props:{yaml:{},stages:{},open:{},triggers:{},types:{},readonly:{type:Boolean},restartable:{type:Boolean},marks:{},problems:{},title:{},summary:{}},emits:[ ` toggle ` , ` insert ` , ` duplicate ` , ` move ` , ` remove ` , ` rename ` , ` restart ` ],setup(e,{emit:t}){let n=e,r=t,i=J(()=>!!n.types?.length&&!n.readonly),a=J(()=>[...n.types??[], ` parallel ` , ` switch ` ]),o=J(()=>a.value.filter(e=>[ ` agent . run ` , ` workflow . call ` ].includes(e))),s=e=>e&&r2(e)?o.value:a.value,c=e=>e.kind=== ` step ` ?JSON.stringify(e.path??null):e.kind,l=q(null),u=q(null),d=see( ` ( max - width : 767 px ) ` ),f=J(()=>{let e=S2(N2(n.yaml),n.stages??[]);return n.types?.length?{nodes:[{id: ` workflow ` ,type: ` step ` ,position:{x:0,y:C9},data:{kind: ` workflow ` ,key: ` workflow ` ,title:n.title|| ` Workflow ` ,type: ` ` ,detail:n.summary?? ` ` }},...e.nodes],edges:[{id: ` flow - workflow - start ` ,source: ` workflow ` ,target: ` start ` ,kind: ` flow ` },...e.edges]}:e}),p=J(()=>f.value.nodes.filter(e=>e.data.path?.length===2).length),m=q({}),h=q({}),g=J(()=>f.value.nodes.find(e=>e.type=== ` step ` &&c(e.data)===n.open));function _(e,t){m.value={...m.value,[e]:t},g.value?.id!==e&&(h.value={...h.value,[e]:t})}let v=J(()=>{let e=d.value?void 0:g.value?.id;return e&&m.value[e]?Math.max(0,m.value[e]-(h.value[e]??m.value[e])):0}),y=Nt(),b=aee(v,{duration:J(()=>y.value=== ` reduce ` ?0:200)}),x=J(()=>{let e=new Map;for(let t of f.value.nodes){if(t.type!== ` step ` )continue;let n=(t.id===g.value?.id?h.value[t.id]:void 0)??m.value[t.id];n!==void 0&&e.set(t.position.y,Math.max(e.get(t.position.y)??-72,n-Wde))}return[...e]}),S=e=>x.value.reduce((t,[n,r])=>n<e?t+r:t,0);function C(e){let t=e.data,a=c(t),o=t.path,s={triggers:t.kind=== ` start ` ?n.triggers??[]:t.triggers,expanded:!d.value&&a===n.open,editable:i.value,problem:o?n.problems?.[a]:void 0,onResize:t=>_(e.id,t)};return n.types?.length&&(s.onToggle=()=>r( ` toggle ` ,a)),i.value&&o&&(s.onRename=e=>r( ` rename ` ,o,e),s.onDuplicate=()=>r( ` duplicate ` ,o),s.onRemove=()=>r( ` remove ` ,o)),{...e,data:{...t,...s}}}let w=e=>{let t=g.value;return d.value||!t||!e.style?.width?!1:e.position.x<=t.position.x&&e.position.x+parseFloat(String(e.style.width))>=t.position.x+S9};function ee(e){let t=g.value;if(d.value||!t)return 0;if(e.id===t.id||w(e))return-88;let n=t.position.x+S9/2,r=e.style?.width?parseFloat(String(e.style.width)):e.type=== ` step ` ?S9:32,i=e.position.x+r/2;return Math.abs(i-n)<S9/2?0:i<n?-88:88}let te=J(()=>{let e=g.value;return f.value.nodes.map(t=>{let a=t;t.type=== ` add ` ?t={...t,data:{...t.data,types:s(t.data.insertAfter),editable:i.value,onInsert:e=>r( ` insert ` ,t.data.insertAfter,e)}}:t.type=== ` step ` &&(t=C(t));let o=n.marks?.[t.id];o&&(t={...t,data:{...t.data,mark:o}});let c=t.position
Line truncated
Edge : $ { e } ` ,USEVUEFLOW_OPTIONS:()=> ` The options parameter is deprecated and will be removed in the next major version . Please use the id parameter instead ` },y7=class extends Error{constructor(e,...t){super(v7[e]?.call(v7,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function b7(e){return ` clientX ` in e}function Vle(e){return ` sourceEvent ` in e}function x7(e,t){let n=b7(e),r,i;return n?(r=e.clientX,i=e.clientY): ` touches ` in e&&e.touches.length>0?(r=e.touches[0].clientX,i=e.touches[0].clientY): ` changedTouches ` in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(r=0,i=0),{x:r-(t?.left??0),y:i-(t?.top??0)}}var S7=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function Hle(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function C7(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var Ule=()=>!0;function w7(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function Wle(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())j5(i,A5(e))>0&&r.push(e);return r}var Gle=250;function Kle(e,t,n,r){let i=[],a=1/0,o=Wle(e,n,t+Gle);for(let n of o){let o=[...n.handleBounds?.source??[],...n.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=h7(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type=== ` source ` ? ` target ` : ` source ` ;return i.find(t=>t.type===e)??i[0]}return i[0]}function T7(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=Ule},u,d,f,p){let m=a=== ` target ` ,h=t?o.querySelector( ` . $ { s } - flow _ _handle [ data - id = "${c}-${t?.nodeId}-${t?.id}-${t?.type}" ] ` ):null,{x:g,y:_}=x7(e),v=o.elementFromPoint(g,_),y=v?.classList.contains( ` $ { s } - flow _ _handle ` )?v:h,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=E7(void 0,y),t=y.getAttribute( ` data - nodeid ` ),a=y.getAttribute( ` data - handleid ` ),o=y.classList.contains( ` connectable ` ),s=y.classList.contains( ` connectableend ` );if(!t||!e)return b;let c={source:m?t:r,sourceHandle:m?a:i,target:m?r:t,targetHandle:m?i:a};b.connection=c,b.isValid=o&&s&&(n===b5.Strict?m&&e=== ` source ` ||!m&&e=== ` target ` :t!==r||a!==i)&&l(c,{nodes:d,edges:u,sourceNode:f(c.source),targetNode:f(c.target)}),b.toHandle=D7(t,e,a,p,n,!0)}return b}function E7(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function qle(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function Jle(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function D7(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===b5.Strict?o.handleBounds?.[t]:[...o.handleBounds?.source??[],...o.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...h7(o,c,c.position,!0)}:c}var O7={[_5.Left]:_5.Right,[_5.Right]:_5.Left,[_5.Top]:_5.Bottom,[_5.Bottom]:_5.Top},Yle=[ ` production ` , ` prod ` ];function k7(e,...t){A7()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function A7(){return!Yle.includes( ` production ` )}function j7(e,t,n,r,i){let a=t.querySelectorAll( ` . vue - flow _ _handle . $ { e } ` );return a?.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute( ` data - handleid ` ),type:e,nodeId:i,position:t.getAttribute( ` data - handlepos ` ),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...M5(t)}}):null}function M7(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),qe(()=>{o.blur()})):n([e])}function N7(e){return V(e)!==void 0}function Xle(e,t,n,r){if(!e||!e.source||!e.target)return n(new y7(_7.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=I5(e)?e:{...e,id:H5(e)},i=B5(i,void 0,r),!kle(i,t)&&i}function Zle(e,t,n,r,i){if(!t.source||!t.target)return i(new y7(_7.EDGE_INVALID,e.id)),!1;if(!n)return i(new y7(_7.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?H5(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function P7(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!L5(o)){n(new y7(_7.NODE_INVALID,o?.id));continue}let s=Ele(o,t(o.id),o.parentNode);o.parentNode&&(r[o.parentNode]=!0),i[a]=s}for(let e of i){let a=t(e.parentNode)||i.find(t=>t.id===e.parentNode);e.parentNode&&!a&&n(new y7(_7.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||r[e.id])&&(r[e.id]&&(e.isParent=!0),a&&(a.isParent=!0))}return i}function F7(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o= ` $ { i } - $ { e } ` ;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o= ` $ { i } - $ { e } - $ { a } ` ;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function I7(e,t,n){e.clear();for(let t of n){let{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=t,o={edgeId:t.id,source:n,target:r,sourceHandle:i,targetHandle:a},s= ` $ { n } - $ { i } -- $ { r } - $ { a } ` ;F7( ` sourc Line truncated
` )},B(e.data.summary||e.data.detail),9,zde)):F( ` ` ,!0),e.data.when||e.data.retry||e.data.continues?(L(),j( ` div ` ,Bde,[e.data.when?(L(),j( ` span ` ,{key:0,class: ` flex max - w - full min - w - 0 items - center gap - 0.5 rounded bg - secondary px - 1 font - mono ` ,title: ` Runs only when $ { e . data . when } ` },[A(V(Ql),{class: ` size - 3 shrink - 0 ` ,"aria-hidden": ` true ` }),R( ` span ` ,Hde,B(e.data.when),1)],8,Vde)):F( ` ` ,!0),e.data.retry?(L(),j( ` span ` ,{key:1,class: ` flex items - center gap - 0.5 rounded bg - secondary px - 1 ` ,title: ` Up to $ { e . data . retry } attempts ` },[A(V(wte),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),H( ` × ` +B(e.data.retry),1)],8,Ude)):F( ` ` ,!0),e.data.continues?(L(),j( ` span ` ,Wde,[A(V(Mte),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),r[10]||=H( ` continues ` ,-1)])):F( ` ` ,!0)])):F( ` ` ,!0),e.data.run?.error?(L(),j( ` p ` ,{key:4,class: ` mt - 1 line - clamp - 2 text - caption text - danger ` ,title:e.data.run.error},B(e.data.run.error),9,Gde)):F( ` ` ,!0)],64))]),A(eee,{"enter-from-class": ` opacity - 0 - translate - y - 1 ` ,"enter-active-class": ` transition duration - 200 ` ,"leave-to-class": ` opacity - 0 ` ,"leave-active-class": ` transition duration - 100 ` },{default:I(()=>[e.data.expanded?(L(),j( ` div ` ,{key:0,class: ` nodrag nopan nowheel cursor - auto border - t border - border ` ,onClick:r[6]||=gt(()=>{},[ ` stop ` ])},[K(t. $ slots, ` default ` )])):F( ` ` ,!0)]),_:3}),A(V(Q7),{type: ` source ` ,position:V(_5).Bottom},null,8,[ ` position ` ]),A(V(Q7),{id: ` data - out ` ,type: ` source ` ,position:V(_5).Right,class: ` ! opacity - 0 ` },null,8,[ ` position ` ]),e.data.type=== ` switch ` ?(L(),q(V(Q7),{key:1,id: ` otherwise ` ,type: ` source ` ,position:V(_5).Right,class: ` ! opacity - 0 ` },null,8,[ ` position ` ])):F( ` ` ,!0)],2))}}),qde={class: ` pointer - events - none size - full rounded - xl border border - dashed border - border bg - muted / 30 ` },Jde={class: ` flex items - center gap - 1 px - 2.5 pt - 1.5 text - caption text - fg - subtle ` },Yde={key:0},Xde={key:1,class: ` font - mono ` },Zde=P({__name: ` LaneNode ` ,props:{data:{}},setup(e){return(t,n)=>(L(),j( ` div ` ,qde,[R( ` div ` ,Jde,[e.data.lane=== ` switch ` ?(L(),j(U,{key:0},[A(V(pu),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),e.data.title==="default"?(L(),j( ` span ` ,Yde, ` otherwise ` )):(L(),j( ` span ` ,Xde, ` = ` +B(e.data.title),1))],64)):(L(),j(U,{key:1},[A(V(eu),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),H(B(e.data.title),1)],64))])]))}}),Qde={class: ` flex shrink - 0 items - center justify - center gap - 1 border - t border - border bg - card p - 1 ` },S9=240, $ de=416,C9=-140,efe=72,tfe=.9,w9=P({__name: ` WorkflowCanvas ` ,props:{yaml:{},stages:{},open:{},triggers:{},types:{},readonly:{type:Boolean},restartable:{type:Boolean},marks:{},problems:{},title:{},summary:{}},emits:[ ` toggle ` , ` insert ` , ` duplicate ` , ` move ` , ` remove ` , ` rename ` , ` restart ` ],setup(e,{emit:t}){let n=e,r=t,i=Y(()=>!!n.types?.length&&!n.readonly),a=Y(()=>[...n.types??[], ` parallel ` , ` switch ` ]),o=Y(()=>a.value.filter(e=>[ ` agent . run ` , ` workflow . call ` ].includes(e))),s=e=>e&&f2(e)?o.value:a.value,c=e=>e.kind=== ` step ` ?JSON.stringify(e.path??null):e.kind,l=J(null),u=J(null),d=see( ` ( max - width : 767 px ) ` ),f=Y(()=>{let e=j2(H2(n.yaml),n.stages??[]);return n.types?.length?{nodes:[{id: ` workflow ` ,type: ` step ` ,position:{x:0,y:C9},data:{kind: ` workflow ` ,key: ` workflow ` ,title:n.title|| ` Workflow ` ,type: ` ` ,detail:n.summary?? ` ` }},...e.nodes],edges:[{id: ` flow - workflow - start ` ,source: ` workflow ` ,target: ` start ` ,kind: ` flow ` },...e.edges]}:e}),p=Y(()=>f.value.nodes.filter(e=>e.data.path?.length===2).length),m=J({}),h=J({}),g=Y(()=>f.value.nodes.find(e=>e.type=== ` step ` &&c(e.data)===n.open));function _(e,t){m.value={...m.value,[e]:t},g.value?.id!==e&&(h.value={...h.value,[e]:t})}let v=Y(()=>{let e=d.value?void 0:g.value?.id;return e&&m.value[e]?Math.max(0,m.value[e]-(h.value[e]??m.value[e])):0}),y=Mt(),b=aee(v,{duration:Y(()=>y.value=== ` reduce ` ?0:200)}),x=Y(()=>{let e=new Map;for(let t of f.value.nodes){if(t.type!== ` step ` )continue;let n=(t.id===g.value?.id?h.value[t.id]:void 0)??m.value[t.id];n!==void 0&&e.set(t.position.y,Math.max(e.get(t.position.y)??-72,n-efe))}return[...e]}),S=e=>x.value.reduce((t,[n,r])=>n<e?t+r:t,0);function C(e){let t=e.data,a=c(t),o=t.path,s={triggers:t.kind=== ` start ` ?n.triggers??[]:t.triggers,expanded:!d.value&&a===n.open,editable:i.value,problem:o?n.problems?.[a]:void 0,onResize:t=>_(e.id,t)};return n.types?.length&&(s.onToggle=()=>r( ` toggle ` ,a)),i.value&&o&&(s.onRename=e=>r( ` rename ` ,o,e),s.onDuplicate=()=>r( ` duplicate ` ,o),s.onRemove=()=>r( ` remove ` ,o)),{...e,data:{...t,...s}}}let w=e=>{let t=g.value;return d.value||!t||!e.style?.width?!1:e.position.x<=t.position.x&&e.position.x+parseFloat(String(e.style.width))>=t.position.x+S9};function ee(e){let t=g.value;if(d.value||!t)return 0;if(e.id===t.id||w(e))return-88;let n=t.position.x+S9/2,r=e.style?.width?parseFloat(String(e.style.width)):e.type=== ` step ` ?S9:32,i=e.position.x+r/2;return Math.abs(i-n)<S9/2?0:i<n?-88:88}let T=Y(()=>{let e=g.value;return f.value.nodes.map(t=>{let a=t;t.type=== ` add ` ?t={...t,data:{...t.data,types:s(t.data.insertAfter),editable:i.value,onInsert:e=>r( ` insert ` ,t.data.insertAfter,e)}}:t.type=== ` step ` &&(t=C(t));let o=n.marks?.[t.id];o&&(t={...t,data:{...t.data,mark:o}});let c=t.positio
Line truncated
` ),r=t.split( `
` ),i=Array.from({length:n.length+1},()=>Array(r.length+1).fill(0));for(let e=n.length-1;e>=0;e--)for(let t=r.length-1;t>=0;t--)i[e][t]=n[e]===r[t]?i[e+1][t+1]+1:Math.max(i[e+1][t],i[e][t+1]);let a=[],o=0,s=0;for(;o<n.length&&s<r.length;)n[o]===r[s]?(a.push({kind: ` same ` ,text:n[o++]}),s++):i[o+1][s]>=i[o][s+1]?a.push({kind: ` del ` ,text:n[o++]}):a.push({kind: ` add ` ,text:r[s++]});for(;o<n.length;)a.push({kind: ` del ` ,text:n[o++]});for(;s<r.length;)a.push({kind: ` add ` ,text:r[s++]});return a}function T9(e){let t=Z0(e).toJS(),n=new Map;for(let r of N2(e).nodes){let{kind:e,path:i,stage:a,occurrence:o}=r.data;if(r.type!== ` step ` ||e!== ` step ` ||!i||a===void 0)continue;let s=t;for(let e of i)s=s?.[e];n.set( ` $ { a } # $ { o ? ? 0 } ` ,{node:r.id,signature:JSON.stringify(s??null)})}return n}function E9(e,t,n){let r=T9(e),i=T9(t),a={};for(let[e,t]of r){let r=i.get(e);r?r.signature!==t.signature&&(a[t.node]= ` changed ` ):a[t.node]=n}return a}var Xde={class: ` flex flex - col gap - 3 md : grid md : h - [ calc ( 100 dvh - 17 rem ) ] md : min - h - [ 26 rem ] md : grid - cols - [ 18 rem _1fr ] ` },Zde=[ ` aria - current ` , ` onClick ` ],Qde={class: ` flex items - center gap - 2 text - sm ` }, $ de={class: ` font - mono text - xs text - fg - subtle ` },efe=[ ` title ` ],tfe={key:0,class: ` px - 3 py - 2 text - sm text - fg - muted ` },nfe={key:1,class: ` flex min - h - 0 flex - col gap - 2 ` },rfe={class: ` flex items - center gap - 2 max - md : flex - wrap ` },ife={key:0,class: ` rounded - lg border border - border p - 4 text - sm text - fg - muted ` },afe={key:1,class: ` min - h - 0 flex - 1 overflow - auto rounded - lg border border - border pt - 2 pb - [ calc ( 0.5 rem + var ( -- code - overscroll ) ) ] font - mono text - [ 13 px ] leading - 6 ` },ofe={class: ` inline - block w - 4 select - none text - fg - subtle ` },sfe={key:2,class: ` grid min - h - 0 flex - 1 gap - 3 max - md : flex - none md : grid - cols - 2 ` },cfe={class: ` flex min - h - 0 flex - col gap - 1 ` },lfe={class: ` text - xs font - medium text - fg - muted ` },ufe={class: ` min - h - 0 flex - 1 max - md : h - 72 max - md : flex - none ` },dfe={class: ` flex min - h - 0 flex - col gap - 1 ` },ffe={class: ` min - h - 0 flex - 1 max - md : h - 72 max - md : flex - none ` },pfe=N({__name: ` WorkflowHistory ` ,props:Qe({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default: ` yaml ` },modeModifiers:{}}),emits:Qe([ ` restore ` ],[ ` update : selected ` , ` update : mode ` ]),setup(e,{emit:t}){let n=e,r=t,i=Ne(e, ` selected ` ),a=Ne(e, ` mode ` );M(()=>n.revisions,e=>{e.some(e=>e.version===i.value)||(i.value=(e.find(e=>e.yaml!==n.current)??e[0])?.version??0)},{immediate:!0});let o=J(()=>n.revisions.find(e=>e.version===i.value)),s=J(()=>o.value?.yaml??null),c=J(()=>s.value===null?[]:Yde(s.value,n.current)),l=J(()=>s.value!==null&&s.value===n.current),u=J(()=>s.value===null?{}:E9(s.value,n.current, ` removed ` )),d=J(()=>s.value===null?{}:E9(n.current,s.value, ` added ` )),f={added: ` default ` ,edited: ` secondary ` ,removed: ` destructive ` };return(t,n)=>(I(),A( ` div ` ,Xde,[L( ` ol ` ,{class:R(B(U)( ` min - h - 0 divide - y divide - border overflow - y - auto rounded - lg border border - border ` ,e.revisions.length&& ` max - md : hidden ` )),"aria-label": ` Revisions ` },[(I(!0),A(H,null,j(e.revisions,e=>(I(),A( ` li ` ,{key:e.version},[L( ` button ` ,{type: ` button ` ,class:R([ ` block w - full px - 3 py - 2 text - left hover : bg - secondary ` ,e.version===i.value&& ` bg - secondary ` ]),"aria-current":e.version===i.value,onClick:t=>i.value=e.version},[L( ` span ` ,Qde,[L( ` span ` , $ de, ` v ` +z(e.version),1),k(B(E),{variant:f[e.change]},{default:F(()=>[V(z(e.change),1)]),_:2},1032,[ ` variant ` ])]),L( ` span ` ,{class: ` mt - 0.5 block truncate text - xs text - fg - muted ` ,title:e.at},z(e.actor|| ` unknown ` )+ ` · ` +z(e.source|| ` unknown ` )+ ` · ` +z(B(HC)(e.at)),9,efe)],10,Zde)]))),128)),e.revisions.length?P( ` ` ,!0):(I(),A( ` li ` ,tfe,z(e.error|| ` No recorded changes ` ),1))],2),e.revisions.length?(I(),K(B(Tu),{key:0,"model-value":String(i.value),"onUpdate:modelValue":n[0]||=e=>i.value=Number(e)},{default:F(()=>[k(B(ku),{class: ` w - full md : hidden ` ,"aria-label": ` Revision ` },{default:F(()=>[k(B(Au))]),_:1}),k(B(Eu),null,{default:F(()=>[(I(!0),A(H,null,j(e.revisions,e=>(I(),K(B(Ou),{key:e.version,value:String(e.version)},{default:F(()=>[V( ` v ` +z(e.version)+ ` · ` +z(e.change)+ ` · ` +z(e.actor|| ` unknown ` )+ ` · ` +z(B(HC)(e.at)),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ])):P( ` ` ,!0),o.value?(I(),A( ` div ` ,nfe,[L( ` div ` ,rfe,[k(B(KD),{modelValue:a.value,"onUpdate:modelValue":n[1]||=e=>a.value=e},{default:F(()=>[k(B(JD),null,{default:F(()=>[k(B(YD),{value: ` yaml ` },{default:F(()=>[...n[3]||=[V( ` YAML ` ,-1)]]),_:1}),k(B(YD),{value: ` canvas ` },{default:F(()=>[...n[4]||=[V( ` Canvas ` ,-1)]]),_:1})]),_:1})]),_:1},8,[ ` modelValue ` ]),k(B(Y),{type: ` button ` ,size: ` sm ` ,variant: ` outline ` ,class: ` ml - auto ` ,disabled:s.value===null||l.value,title:s.value===null? ` Workflow removed ` :void 0,onClick:n[2]||=e=>r( ` restore ` ,s.value)},{default:F(()=>[k(B(uu),{"data-icon": ` inline - start ` }),n[5]||=V( ` Restore this version ` ,-1)]),_:1},8,[ ` disabled ` , ` title ` ])]),s.value===null?(I(),A( ` p ` ,ife, ` Workflow removed in this revision . ` )):a.value=== ` yaml ` ?(I(),A( ` pre ` ,afe,[L( ` code ` ,null,[(I(!0),A(H,null,j(c.value,(e,t)=>(I(),A( ` span ` ,{key:t,class:R([ ` block min - h - 6 px - 3 whitespace - pre - wrap ` ,{"bg-ok/10":e.kind=== ` add ` ,"bg-danger/10 text
Line truncated
` ),i=Array.from({length:n.length+1},()=>Array(r.length+1).fill(0));for(let e=n.length-1;e>=0;e--)for(let t=r.length-1;t>=0;t--)i[e][t]=n[e]===r[t]?i[e+1][t+1]+1:Math.max(i[e+1][t],i[e][t+1]);let a=[],o=0,s=0;for(;o<n.length&&s<r.length;)n[o]===r[s]?(a.push({kind: ` same ` ,text:n[o++]}),s++):i[o+1][s]>=i[o][s+1]?a.push({kind: ` del ` ,text:n[o++]}):a.push({kind: ` add ` ,text:r[s++]});for(;o<n.length;)a.push({kind: ` del ` ,text:n[o++]});for(;s<r.length;)a.push({kind: ` add ` ,text:r[s++]});return a}function T9(e){let t=o2(e).toJS(),n=new Map;for(let r of H2(e).nodes){let{kind:e,path:i,stage:a,occurrence:o}=r.data;if(r.type!== ` step ` ||e!== ` step ` ||!i||a===void 0)continue;let s=t;for(let e of i)s=s?.[e];n.set( ` $ { a } # $ { o ? ? 0 } ` ,{node:r.id,signature:JSON.stringify(s??null)})}return n}function E9(e,t,n){let r=T9(e),i=T9(t),a={};for(let[e,t]of r){let r=i.get(e);r?r.signature!==t.signature&&(a[t.node]= ` changed ` ):a[t.node]=n}return a}var ofe={class: ` flex flex - col gap - 3 md : grid md : h - [ calc ( 100 dvh - 17 rem ) ] md : min - h - [ 26 rem ] md : grid - cols - [ 18 rem _1fr ] ` },sfe=[ ` aria - current ` , ` onClick ` ],cfe={class: ` flex items - center gap - 2 text - sm ` },lfe={class: ` font - mono text - xs text - fg - subtle ` },ufe=[ ` title ` ],dfe={key:0,class: ` px - 3 py - 2 text - sm text - fg - muted ` },ffe={key:1,class: ` flex min - h - 0 flex - col gap - 2 ` },pfe={class: ` flex items - center gap - 2 max - md : flex - wrap ` },mfe={key:0,class: ` rounded - lg border border - border p - 4 text - sm text - fg - muted ` },hfe={key:1,class: ` min - h - 0 flex - 1 overflow - auto rounded - lg border border - border pt - 2 pb - [ calc ( 0.5 rem + var ( -- code - overscroll ) ) ] font - mono text - label leading - 6 ` },gfe={class: ` inline - block w - 4 select - none text - fg - subtle ` },_fe={key:2,class: ` grid min - h - 0 flex - 1 gap - 3 max - md : flex - none md : grid - cols - 2 ` },vfe={class: ` flex min - h - 0 flex - col gap - 1 ` },yfe={class: ` text - xs font - medium text - fg - muted ` },bfe={class: ` min - h - 0 flex - 1 max - md : h - 72 max - md : flex - none ` },xfe={class: ` flex min - h - 0 flex - col gap - 1 ` },Sfe={class: ` min - h - 0 flex - 1 max - md : h - 72 max - md : flex - none ` },Cfe=P({__name: ` WorkflowHistory ` ,props:Ze({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default: ` yaml ` },modeModifiers:{}}),emits:Ze([ ` restore ` ],[ ` update : selected ` , ` update : mode ` ]),setup(e,{emit:t}){let n=e,r=t,i=Me(e, ` selected ` ),a=Me(e, ` mode ` );N(()=>n.revisions,e=>{e.some(e=>e.version===i.value)||(i.value=(e.find(e=>e.yaml!==n.current)??e[0])?.version??0)},{immediate:!0});let o=Y(()=>n.revisions.find(e=>e.version===i.value)),s=Y(()=>o.value?.yaml??null),c=Y(()=>s.value===null?[]:afe(s.value,n.current)),l=Y(()=>s.value!==null&&s.value===n.current),u=Y(()=>s.value===null?{}:E9(s.value,n.current, ` removed ` )),d=Y(()=>s.value===null?{}:E9(n.current,s.value, ` added ` )),f={added: ` default ` ,edited: ` secondary ` ,removed: ` destructive ` };return(t,n)=>(L(),j( ` div ` ,ofe,[R( ` ol ` ,{class:z(V(W)( ` min - h - 0 divide - y divide - border overflow - y - auto rounded - lg border border - border ` ,e.revisions.length&& ` max - md : hidden ` )),"aria-label": ` Revisions ` },[(L(!0),j(U,null,M(e.revisions,e=>(L(),j( ` li ` ,{key:e.version},[R( ` button ` ,{type: ` button ` ,class:z([ ` block w - full px - 3 py - 2 text - left hover : bg - secondary ` ,e.version===i.value&& ` bg - secondary ` ]),"aria-current":e.version===i.value,onClick:t=>i.value=e.version},[R( ` span ` ,cfe,[R( ` span ` ,lfe, ` v ` +B(e.version),1),A(V(D),{variant:f[e.change]},{default:I(()=>[H(B(e.change),1)]),_:2},1032,[ ` variant ` ])]),R( ` span ` ,{class: ` mt - 0.5 block truncate text - xs text - fg - muted ` ,title:e.at},B(e.actor|| ` unknown ` )+ ` · ` +B(e.source|| ` unknown ` )+ ` · ` +B(V(BC)(e.at)),9,ufe)],10,sfe)]))),128)),e.revisions.length?F( ` ` ,!0):(L(),j( ` li ` ,dfe,B(e.error|| ` No recorded changes ` ),1))],2),e.revisions.length?(L(),q(V(Tu),{key:0,"model-value":String(i.value),"onUpdate:modelValue":n[0]||=e=>i.value=Number(e)},{default:I(()=>[A(V(ku),{class: ` w - full md : hidden ` ,"aria-label": ` Revision ` },{default:I(()=>[A(V(Au))]),_:1}),A(V(Eu),null,{default:I(()=>[(L(!0),j(U,null,M(e.revisions,e=>(L(),q(V(Ou),{key:e.version,value:String(e.version)},{default:I(()=>[H( ` v ` +B(e.version)+ ` · ` +B(e.change)+ ` · ` +B(e.actor|| ` unknown ` )+ ` · ` +B(V(BC)(e.at)),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ])):F( ` ` ,!0),o.value?(L(),j( ` div ` ,ffe,[R( ` div ` ,pfe,[A(V(GD),{modelValue:a.value,"onUpdate:modelValue":n[1]||=e=>a.value=e},{default:I(()=>[A(V(qD),null,{default:I(()=>[A(V(JD),{value: ` yaml ` },{default:I(()=>[...n[3]||=[H( ` YAML ` ,-1)]]),_:1}),A(V(JD),{value: ` canvas ` },{default:I(()=>[...n[4]||=[H( ` Canvas ` ,-1)]]),_:1})]),_:1})]),_:1},8,[ ` modelValue ` ]),A(V(X),{type: ` button ` ,size: ` sm ` ,variant: ` outline ` ,class: ` ml - auto ` ,disabled:s.value===null||l.value,title:s.value===null? ` Workflow removed ` :void 0,onClick:n[2]||=e=>r( ` restore ` ,s.value)},{default:I(()=>[A(V(uu),{"data-icon": ` inline - start ` }),n[5]||=H( ` Restore this version ` ,-1)]),_:1},8,[ ` disabled ` , ` title ` ])]),s.value===null?(L(),j( ` p ` ,mfe, ` Workflow removed in this revision . ` )):a.value=== ` yaml ` ?(L(),j( ` pre ` ,hfe,[R( ` code ` ,null,[(L(!0),j(U,null,M(c.value,(e,t)=>(L(),j( ` span ` ,{key:t,class:z([ ` block min - h - 6 px - 3 whitespace - pre - wrap ` ,{"bg-ok/10":e.kind=== ` add ` ,"bg-danger/10 text-
Line truncated