@@ -1,79 +1,79 @@
const _ _vite _ _mapDeps = ( i , m = _ _vite _ _mapDeps , d = ( m . f || ( m . f = [ "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 , H as o , I as s , L as c , M as l , N as u , O as d , P as f , R as p , S as m , T as h , U as g , V as _ , W as v , _ as y , a as b , b as x , c as S , d as C , f as w , g as T , h as ee , i as E , j as D , k as te , l as ne , m as re , n as ie , 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 O , B as _e , Bt as ve , C as k , Ct as A , D as ye , Dn as be , Dt as xe , En as Se , G as Ce , Gt as j , H as we , It as Te , Jt as Ee , Kt as De , Lt as Oe , M , On as ke , Pt as Ae , Q as je , Qt as Me , Rt as Ne , S as N , Sn as Pe , T as Fe , Tt as Ie , U as Le , Vt as Re , Xt as P , Z as ze , _t as F , an as Be , b as I , bn as Ve , cn as He , dn as Ue , dt as L , er as R , gn as We , hn as Ge , ht as Ke , ir as z , it as qe , jn as B , k as V , kn as Je , l as H , n as U , nr as Ye , nt as Xe , ot as Ze , p as Qe , pn as $e , r as et , rr as tt , rt as W , sn as nt , st as rt , t as it , tt as at , wn as ot , wt as G , x as K , xn as q , y as J , yn as st , yt as ct } from "./PageHeader.js" ; import { D as lt , E as ut , J as dt , M as ft , Q as pt , S as mt , T as Y , X as ht , Y as gt , Z as _t , a as vt , c as yt , i as bt , k as xt , n as St , o as Ct , r as X , s as wt , t as Tt , v as Et , w as Dt } from "./createLucideIcon.js" ; import { a as Ot , i as eee , n as kt , o as At , r as jt , s as Mt , t as Z } 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 zt ( 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 ( ) { Gt ( 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 ) , Gt = Nt ? typeof HTMLAnchorElement < ` u ` && ` download ` in HTMLAnchorElement . prototype && ! Wt ? Kt : ` msSaveOrOpenBlob ` in Ut ? qt : Jt : ( ) => { } ; function Kt ( 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 qt ( 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 ( zt ( e , n ) , t ) } function Jt ( 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 ( Rt . HTMLElement ) ) || ` safari ` in Rt , 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 : tee } = Object ; function Yt ( ) { let e = nt ( ! 0 ) , t = e . run ( ( ) => q ( { } ) ) , 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 Xt = ( ) => { } ; function Zt ( e , t , n , r = Xt ) { e . add ( t ) ; let i = ( ) => { e . delete ( t ) && r ( ) } ; return ! n && He ( ) && We ( i ) , i } function Qt ( e , ... t ) { e . forEach ( e Line truncated
import { A as e , B as t , C as n , D as r , E as i , F as a , H as o , I as s , L as c , M as l , N as u , O as d , P as f , R as p , S as m , T as h , U as g , V as _ , W as v , _ as y , a as b , b as x , c as S , d as C , f as w , g as T , h as ee , i as E , j as D , k as te , l as ne , m as re , n as ie , o as ae , p as oe , r as se , s as ce , t as le , u as ue , v as O , w as de , x as fe , y as pe , z as me } from "./alert.js" ; import { $t as he , A as k , B as ge , Bt as _e , C as A , Ct as j , D as ve , Dn as ye , Dt as be , En as xe , G as Se , Gt as M , H as Ce , It as we , Jt as Te , Kt as Ee , Lt as De , M as N , On as Oe , Pt as ke , Q as Ae , Qt as je , Rt as Me , S as P , Sn as Ne , T as Pe , Tt as Fe , U as Ie , Vt as Le , Xt as F , Z as Re , _t as I , an as ze , b as L , bn as Be , cn as Ve , dn as He , dt as Ue , er as R , gn as We , hn as Ge , ht as Ke , ir as z , it as qe , jn as B , k as V , kn as Je , l as H , n as U , nr as Ye , nt as Xe , ot as Ze , p as Qe , pn as $e , r as et , rr as tt , rt as W , sn as nt , st as rt , t as it , tt as at , wn as ot , wt as G , x as K , xn as q , y as J , yn as st , yt as ct } from "./PageHeader.js" ; import { D as lt , E as ut , J as dt , M as ft , Q as pt , S as mt , T as Y , X as ht , Y as gt , Z as _t , a as vt , c as yt , i as bt , k as eee , n as xt , o as St , r as X , s as Ct , t as wt , v as Tt , w as Et } from "./createLucideIcon.js" ; import { a as Dt , c as Ot , i as kt , l as At , n as jt , o as Mt , r as Nt , s as Pt , t as Z } 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 Ft = typeof window < ` u ` , It , Lt = e => It = e , Rt = Symbol ( ) ; function zt ( e ) { return e && typeof e == ` object ` && Object . prototype . toString . call ( e ) === ` [object Object] ` && typeof e . toJSON != ` function ` } var Bt = 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 Vt ( 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 Ht ( e , t , n ) { let r = new XMLHttpRequest ; r . open ( ` GET ` , e ) , r . responseType = ` blob ` , r . onload = function ( ) { qt ( r . response , t , n ) } , r . onerror = function ( ) { console . error ( ` could not download file ` ) } , r . send ( ) } function Ut ( e ) { let t = new XMLHttpRequest ; t . open ( ` HEAD ` , e , ! 1 ) ; try { t . send ( ) } catch { } return t . status >= 200 && t . status <= 299 } function Wt ( 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 Gt = typeof navigator == ` object ` ? navigator : { userAgent : ` ` } , Kt = /Macintosh/ . test ( Gt . userAgent ) && /AppleWebKit/ . test ( Gt . userAgent ) && ! /Safari/ . test ( Gt . userAgent ) , qt = Ft ? typeof HTMLAnchorElement < ` u ` && ` download ` in HTMLAnchorElement . prototype && ! Kt ? Jt : ` msSaveOrOpenBlob ` in Gt ? Yt : Xt : ( ) => { } ; function Jt ( 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 ? Wt ( r ) : Ut ( r . href ) ? Ht ( e , t , n ) : ( r . target = ` _blank ` , Wt ( r ) ) ) : ( r . href = URL . createObjectURL ( e ) , setTimeout ( function ( ) { URL . revokeObjectURL ( r . href ) } , 4e4 ) , setTimeout ( function ( ) { Wt ( r ) } , 0 ) ) } function Yt ( e , t = ` download ` , n ) { if ( typeof e == ` string ` ) { if ( Ut ( e ) ) Ht ( e , t , n ) ; else { let t = document . createElement ( ` a ` ) ; t . href = e , t . target = ` _blank ` , setTimeout ( function ( ) { Wt ( t ) } ) } } else navigator . msSaveOrOpenBlob ( Vt ( e , n ) , t ) } function Xt ( e , t , n , r ) { if ( r || = open ( ` ` , ` _blank ` ) , r && ( r . document . title = r . document . body . innerText = ` downloading... ` ) , typeof e == ` string ` ) return Ht ( e , t , n ) ; let i = e . type === ` application/octet-stream ` , a = /constructor/i . test ( String ( Bt . HTMLElement ) ) || ` safari ` in Bt , o = /CriOS\/[\d]+/ . test ( navigator . userAgent ) ; if ( ( o || i && a || Kt ) && 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 : tee } = Object ; function Zt ( ) { let e = nt ( ! 0 ) , t = e . run ( ( ) => q ( { } ) ) , n = [ ] , r = [ ] , i = Ge ( { install ( e ) { Lt ( i ) , i . _a = e , e . provide ( Rt , 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 $t ( e , t , n , r = Qt ) { e . add ( t ) ; let i = ( ) => { e . delete ( t ) && r ( ) } ; return ! n && Ve ( ) && We ( i ) , i } function e Line truncated
` );d=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&&(Dd.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,Md.value=Md.value?{...Md.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],Md.value=Md.value?{...Md.value,tools:a}:null),n.type=== ` ask ` &&n.ask&&(clearTimeout(l),Md.value=Md.value?{...Md.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 ` );Od.value=[...Od.value,{from: ` assistant ` ,text:o,tool_calls:a}],Md.value=null,Ad.value= ` Ready ` ,await Kd()}catch(e){let t=e;t.name=== ` AbortError ` &&!c?(Md.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},Ad.value= ` Stopped ` ):(Md.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?bd(r):void 0,isRetry:i},Ad.value= ` Error . Retry available . ` )}finally{clearTimeout(l),wd=null,Wd=null,jd.value=!1}}function af(){Ad.value= ` Stopping … ` ,Dd.value&&X.chatCancel(Dd.value).catch(()=>{}),Gd()}function of(){L(()=>{Kd().catch(e=>{Ad.value=e.message|| ` Chat unavailable ` })}),Ke(()=>{Gd()})}async function sf(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 rf({textOverride: ` 🎤 Voice message ` ,voice:{data:btoa(n),mime_type:e.type|| ` audio / webm ` }})}var cf=[ ` aria - label ` , ` title ` , ` aria - expanded ` , ` aria - controls ` ],lf=M({__name: ` ChatFab ` ,props:{open:{type:Boolean}},emits:[ ` toggle ` ],setup(e,{emit:t}){let n=t;function r(e){return U( ` col - start - 1 row - start - 1 grid place - items - center transition - [ opacity , transform ] duration - [ 140 ms ] ` ,e? ` opacity - 100 ` : ` - rotate - 45 scale - [ 0.7 ] opacity - 0 ` )}return(t,i)=>(F(),k( ` button ` ,{type: ` button ` ,class: ` relative z - 10 grid size - 14 cursor - pointer place - items - center rounded - full border border - border - strong bg - secondary text - primary shadow - [ var ( -- shadow - md ) ] transition - transform duration - [ 140 ms ] hover : - translate - y - px focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary active : translate - y - 0 ` ,"aria-label":e.open? ` Close chat ` : ` Chat with Archie ` ,title:e.open? ` Close chat ` : ` Chat with Archie ` ,"aria-expanded":e.open,"aria-controls":B(Sd),onClick:i[0]||=e=>n( ` toggle ` )},[I( ` span ` ,{"aria-hidden": ` true ` ,class:R(r(!e.open))},[O(B(Ou),{size:22})],2),I( ` span ` ,{"aria-hidden": ` true ` ,class:R(r(e.open))},[O(B(ld),{size:22})],2)],8,cf))}}),uf=M({__name: ` Popover ` ,props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:[ ` update : open ` ],setup(e,{emit:t}){let n=de(e,t);return(e,t)=>(F(),K(B(aa),W({"data-slot": ` popover ` },B(n)),{default:P(t=>[G(e. $ slots, ` default ` ,Ye(we(t)))]),_:3},16))}}),df=M({inheritAttrs:!1,__name: ` PopoverContent ` ,props:{forceMount:{type:Boolean},memoDependencies:{},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default: ` center ` },alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},dir:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:[ ` escapeKeyDown ` , ` pointerDownOutside ` , ` focusOutside ` , ` interactOutside ` , ` openAutoFocus ` , ` closeAutoFocus ` ],setup(e,{emit:t}){let n=e,r=t,i=Et(n, ` class ` ),a=de(i,r);return(e,t)=>(F(),K(B(ua),null,{default:P(()=>[O(B(la),W({"data-slot": ` popover - content ` },{...e. $ attrs,...B(a)},{class:B(U)( ` bg - popover text - popover - foreground data - open : animate - in data - closed : animate - out data - closed : fade - out - 0 data - open : fade - in - 0 data - closed : zoom - out - 95 data - open : zoom - in - 95 data - [ side = bottom ] : slide - in - from - top - 2 data - [ side = left ] : slide - in - from - right - 2 data - [ side = right ] : slide - in - from - left - 2 data - [ side = top ] : slide - in - from - bottom - 2 ring - foreground / 10 flex flex - col gap - 2.5 rounded - lg p - 2.5 text - sm shadow - md ring - 1 duration - 100 z - 50 w - 72 max - w - ( -- reka - popover - content - available - width ) origin - ( -- reka - popover - content - transform - origin ) outline - hidden ` ,n.class)}),{default:P(()=>[G(e. $ slots, ` default ` )]),_:3},16,[ ` class ` ])]),_:3}))}}),ff=M({__name: ` PopoverTrigger ` ,props:{asChild:{type:Boolean},as:{}},setup(e){let t=e;return(e,n)=>(F(),K(B(da),W({"data-slot": ` popover - trigger ` },t),{default:P(()=>[G(e. $ slots, ` default ` )]),_:3},16))}}),pf=M({__name: ` ChatSessionActions ` ,setup(e){let t=q(!1);Hd(t);function n(e){t.value=!1,Jd(e)}function r(e,n){t.value=!1,Yd(e,n)}return(e,i)=>(F(),K(B(uf),{open:t.value,"onUpdate:open":i[5]||=e=>t.value=e},{default:P(()=>[O(B(ff),{"as-child": ` ` },{default:P(()=>[O(B(Y),{variant: ` ghost ` ,size: ` icon - sm ` ,class: ` flex - none ` ,"aria-label": ` Session actions ` ,title: ` Session actions ` },{default:P(()=>[O(B(pu))]),_:1})]),_:1}),O(B(df),{align: ` end ` ,class: ` grid w - 48 gap - 0.5 p - 1 ` },{default:P(()=>[O(B(Y),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - star Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:s m(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>s m(e))}),null)};for(let e=0;e<n.length;e++){let c=n[e];if(c.startsWith(" ` ` ` " ) ) { o ( ) , s ( ) , a ? ( t . push ( { kind : ` pre ` , code : a . join ( `
` )}),a=null):a=[];continue}if(a){a.push(c);continue}let l=l m(c),u=e+1<n.length?l m(n[e+1]):null;if(l&&u&&u m(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=l m(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>s m(e)),rows:r.map(e=>e.map(e=>s m(e)))});continue}if(!c.trim()){o(),s();continue}let d=c.match(/^(#{1,3}) \s +(.+) $ /);if(d){o(),s(),t.push({kind: ` h$ { d [ 1 ] . length } ` ,inline:s m(d[2])});continue}let f=c.match(/^ \s *[-*] \s +(.+) $ /),p=c.match(/^ \s * \d +[.)] \s +(.+) $ /);if(f||p){o();let e=p? ` ol ` : ` ul ` ;(!i||i.tag!==e)&&(s(),i={tag:e,items:[]}),i.items.push((f||p)[1])}else c.startsWith( ` > ` )?(o(),s(),t.push({kind: ` blockquote ` ,inline:s m(c.replace(/^> \s ?/, ` ` ))})):r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function lm(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 um(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var dm={class: ` [ overflow - wrap : anywhere ] ` },fm={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },pm={class: ` font - mono text - [ 0.85 em ] ` },mm={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },hm={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },gm={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },_m={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },vm={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },ym={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },bm={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },xm={key:8,class: ` mb - 2.5 last : mb - 0 ` },Sm=M({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=J(()=>cm(t.text));return(e,t)=>(F(),k( ` div ` ,dm,[(F(!0),k(H,null,A(n.value,(e,t)=>(F(),k(H,{key:t},[e.kind=== ` pre ` ?(F(),k( ` pre ` ,fm,[I( ` code ` ,pm,z(e.code),1)])):e.kind=== ` table ` ?(F(),k( ` table ` ,mm,[I( ` thead ` ,null,[I( ` tr ` ,null,[(F(!0),k(H,null,A(e.head,(e,t)=>(F(),k( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[O(am,{inline:e},null,8,[ ` inline ` ])]))),128))])]),I( ` tbody ` ,null,[(F(!0),k(H,null,A(e.rows,(e,t)=>(F(),k( ` tr ` ,{key:t},[(F(!0),k(H,null,A(e,(e,t)=>(F(),k( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[O(am,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(F(),k( ` blockquote ` ,hm,[O(am,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(F(),k( ` h1 ` ,gm,[O(am,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(F(),k( ` h2 ` ,_m,[O(am,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(F(),k( ` h3 ` ,vm,[O(am,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(F(),k( ` ul ` ,ym,[(F(!0),k(H,null,A(e.items,(e,t)=>(F(),k( ` li ` ,{key:t},[O(am,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(F(),k( ` ol ` ,bm,[(F(!0),k(H,null,A(e.items,(e,t)=>(F(),k( ` li ` ,{key:t},[O(am,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(F(),k( ` p ` ,xm,[O(am,{inline:e.inline},null,8,[ ` inline ` ])])):N( ` ` ,!0)],64))),128))]))}}),Cm={class: ` truncate ` },wm=M({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Ie( ` RouterLink ` );return F(),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:P(()=>[O(B( $ l),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),I( ` span ` ,Cm,z(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),Tm={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },Em={class: ` font - semibold text - foreground ` },Dm={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },Om=M({__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||(t.streaming?i.value? ` failed ` : ` running … ` : ` done ` ));return(t,o)=>e.tool.path?(F(),K(wm,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(F(),k( ` div ` ,Tm,[O(B(cd),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),I( ` span ` ,Em,z(n.value),1),r.value?(F(),k( ` code ` ,Dm,z(r.value),1)):N( ` ` ,!0),I( ` span ` ,{class:R(B(U)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},z(a.value),3)]))}}),km={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },Am={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },jm={key:3,class: ` whitespace - pre - wrap ` },Mm=M({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(F(),k( ` div ` ,{class:R([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[I( ` div ` ,{class:R(B(U)( ` max - w - [ min ( 78 ch , 92 % ) ] rounded - [ 0.85 rem ] px - 3.5 py - 2.5 text - sm leading - normal [ overflow - wrap : anywhere ] ` ,e.assistant? ` bg - muted ` : ` bg - primary / 15 ` ))},[e.assistant&&e.tools.length?(F(),k( ` div ` ,km,[(F(!0),k(H,null,A(e.tools,(t,n)=>(F(),K(Om,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):N( ` ` ,!0),e.media.length?(F(),k( ` div ` ,Am,[(F(!0),k(H,null,A(e.media,(e,t)=>(F(),K(Qp,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):N( ` ` ,!0),e.assistant?(F(),K(Sm,{key:2,text:e.text},null,8,[ ` text ` ])):(F(),k( ` div ` ,jm,z(e.text),1)),G(t. $ slots, ` default ` )],2)],2))}}),Nm={class: ` text - sm ` },Pm={key:0,class: ` mt - 1 text - fg - muted ` },Fm={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },Im=M({__name: ` ChatChooseCard ` ,props
Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,i=r.length>Ov? ` $ { r . slice ( 0 , Ov ) . trimEnd ( ) } … ` :r;return{text:i,full:n,truncated:i!==n}}function Av(e){return String(e|| ` event ` ).replaceAll( ` _ ` , ` ` ).replace(/ \b \w /g,e=>e.toUpperCase())}function jv(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 Mv(e){let t=Number(e);return!Number.isFinite(t)||t<=0? ` ` :t.toLocaleString( ` en - US ` )}function Nv(e){return typeof e== ` string ` ?e: ` ` }function Pv(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=jv(t.duration_ms),i=[r,e&& ` ran for $ { e } ` ].filter(Boolean).join( ` · ` );return{title:t.interrupted? ` Stage interrupted : $ { n } ` :t.skipped? ` Skipped stage : $ { n } ` :t.error? ` Stage failed : $ { n } ` : ` Finished stage : $ { n } ` ,detail:[i,Nv(t.error),Nv(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:[Nv(t.previous_stage)&& ` after $ { Nv ( t . previous _stage ) } ` ,Nv(t.previous_reason)].filter(Boolean).join( ` : ` )||e.detail|| ` ` }}if(e.kind=== ` agent _finish ` ){let r=Mv(t.iterations),i=Mv(t.tokens),a=Number(t.cached_tokens)||0,o=Mv((Number(t.prompt_tokens)||0)-a),s=Mv(t.completion_tokens),c=Mv(t.cached_tokens),l=[r&& ` $ { r } iterations ` ,i&& ` $ { i } tokens ` ,o&& ` $ { o } fresh prompt ` ,s&& ` $ { s } completion ` ,c&& ` $ { c } cached ` ,Nv(t.model)].filter(Boolean);return{title: ` Agent $ { Nv ( t . status ) || ` finished ` } : $ { n } ` ,detail:l.join( ` · ` )||e.detail|| ` ` }}if(e.kind=== ` remediation _round ` ){let e=Number(t.of),n=Nv(t.author);return{title: ` Remediation $ { Nv ( t . round ) } $ { e > 0 ? ` of ${ e } ` : ` ` } ` ,detail:[n&& ` answers $ { n } ' s review ` ,t.review_id? ` # $ { Nv ( t . review _id ) } ` : ` ` ].filter(Boolean).join( ` ` )}}if(e.kind=== ` review _approved ` ){let e=Nv(t.pr_number);return{title: ` Pull request approved ` ,detail:[Nv(t.author),e&& ` # $ { e } ` ].filter(Boolean).join( ` · ` )}}if(e.kind=== ` step _retried ` )return{title: ` Attempt $ { Nv ( t . attempt ) } of $ { Nv ( t . of ) } failed : $ { e . stage || ` step ` } ` ,detail:Nv(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=Nv(t.source),n=Nv(t.capture_id),r=[{label: ` binding $ { Nv ( t . binding _name ) || Nv ( 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 $ { Nv ( t . captured _after ) } ` : ` ` ].filter(Boolean).join( ` · ` )}}return{title:Av(e.kind||e.type),detail:e.detail|| ` ` }}var Fv=[ ` title ` ],Iv=M({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=Dv();n.watchIdentities();let r=e,i=t,a=gv(),o=J(()=>a.taskIDFor(r.event)),s=J(()=>kv(r.event,n.identityName));function c(){o.value>0&&i( ` open ` ,o.value)}let l=J(()=>r.event.at?ah(r.event.at): ` – ` );return(e,t)=>(F(),K(B(Cv),{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:[_t(pt(c,[ ` prevent ` ]),[ ` enter ` ]),_t(pt(c,[ ` prevent ` ]),[ ` space ` ])]},{default:P(()=>[O(B(Q),{class: ` font - medium ` },{default:P(()=>[V(z(B(Pv)({...r.event,at:void 0,detail:void 0}).title),1)]),_:1}),O(B(Q),{class: ` font - mono ` },{default:P(()=>[V(z(o.value>0? ` # $ { o . value } ` : ` – ` ),1)]),_:1}),O(B(Q),{class: ` w - [ 55 % ] max - w - 0 ` },{default:P(()=>[I( ` span ` ,{class: ` block truncate ` ,title:s.value.truncated?s.value.full:void 0},z(s.value.text),9,Fv)]),_:1}),O(B(Q),null,{default:P(()=>[V(z(l.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),Lv=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function Rv(e){return(Number(e?.task_id)||0)>0}function zv(e,t){return t=== ` tasks ` ?Rv(e):t!== ` system ` ||!Rv(e)}function Bv(e,t){return e.filter(e=>zv(e,t))}function Vv(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function Hv(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function Uv(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=Hv(kv(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 Wv={key:0,class: ` font - normal text - fg - subtle ` },Gv={role: ` region ` ,"aria-label": ` Activity ` ,"ari
Line truncated
` ,1)[0]?? ` ` ;return t.length>80? ` $ { t . slice ( 0 , 79 ) } … ` :t}function cb(e){return(e?.merged||0)+(e?.completed||0)}function lb(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 ub(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function db(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 fb(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!== ` ` &&(n[r.name]=db(e,r.type))}return n}var pb=[ ` onKeydown ` ],mb={key:0,class: ` text - sm text - danger ` ,role: ` alert ` },hb={key:1,class: ` grid gap - 1.5 ` },gb=[ ` for ` ],_b={key:0,class: ` font - normal text - fg - subtle ` },vb=[ ` id ` ],yb=[ ` value ` ],bb={key:0,class: ` text - xs text - fg - subtle ` },xb={key:2,class: ` grid gap - 1.5 ` },Sb=[ ` id ` ],Cb={class: ` block truncate text - [ 13 px ] font - medium ` },wb={class: ` block text - xs text - fg - subtle ` },Tb={key:0,class: ` text - xs text - fg - subtle ` },Eb={key:3,class: ` grid gap - 3 ` },Db=[ ` for ` ],Ob={class: ` font - mono ` },kb={key:0,class: ` text - fg - subtle ` },Ab={class: ` grid gap - 1.5 ` },jb=[ ` for ` ],Mb={class: ` grid gap - 1.5 ` },Nb=[ ` for ` ],Pb={key:4,class: ` text - sm text - danger ` ,role: ` alert ` },Fb={class: ` flex items - center gap - 2 border - t border - border pt - 4 ` },Ib={class: ` mr - auto text - xs text - fg - subtle ` },Lb=M({__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( ` ` );L(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(sb(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(()=>lb(m.value)),g=J(()=>ub(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:fb(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)=>(F(),k( ` form ` ,{class: ` grid gap - 5 ` ,onSubmit:pt(C,[ ` prevent ` ]),onKeydown:[_t(pt(C,[ ` meta ` , ` prevent ` ]),[ ` enter ` ]),_t(pt(C,[ ` ctrl ` , ` prevent ` ]),[ ` enter ` ])]},[c.value?(F(),k( ` p ` ,mb,z(c.value),1)):N( ` ` ,!0),_.value=== ` none ` ?N( ` ` ,!0):(F(),k( ` div ` ,hb,[I( ` label ` ,{for: ` $ { B ( i ) } - repo ` ,class: ` text - [ 13 px ] font - medium ` },[t[5]||=V( ` Repository ` ,-1),v.value?N( ` ` ,!0):(F(),k( ` span ` ,_b, ` ( optional ) ` ))],8,gb),O(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 ` ]),I( ` datalist ` ,{id: ` $ { B ( i ) } - repos ` },[(F(!0),k(H,null,A(s.value,e=>(F(),k( ` option ` ,{key:e,value:e},null,8,yb))),128))],8,vb),s.value.length?(F(),k( ` p ` ,bb,[t[6]||=V( ` Configured : ` ,-1),(F(!0),k(H,null,A(s.value,e=>(F(),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:P(()=>[V(z(e),1)]),_:2},1032,[ ` onClick ` ]))),128))])):N( ` ` ,!0)])),n.workflow?N( ` ` ,!0):(F(),k( ` div ` ,xb,[I( ` span ` ,{id: ` $ { B ( i ) } - wf ` ,class: ` text - [ 13 px ] font - medium ` }, ` Workflow ` ,8,Sb),O(B(ao),{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:P(()=>[(F(!0),k(H,null,A(a.value,e=>(F(),K(B(so),{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:P(()=>[I( ` span ` ,Cb,z(e.name||e.id),1),I( ` span ` ,wb,[V(z(y(e.id)?.runs||0)+ ` runs ` ,1),y(e.id)?.runs?(F(),k(H,{key:0},[V( ` · ` +z(Math.round(B(cb)(y(e.id))/(y(e.id)?.runs||1)*100))+ ` % delivered ` ,1)],64)):N( ` ` ,!0)])]),_:2},1032,[ ` value ` ]))),128))]),_:1},8,[ ` modelValue ` , ` aria - labelledby ` ]),!a.value.length&&!c.value?(F(),k( ` p ` ,Tb, ` No enabled workflows . ` )):N( ` ` ,!0)])),h.value.length?(F(),k( ` div ` ,Eb,[(F(!0),k(H,null,A(h.value,e=>(F(),k( ` div ` ,{key:e.name,class: ` grid gap - 1.5 ` },[I( ` label ` ,{for: ` $ { B ( i ) } - input - $ { e . name } ` ,class: ` text - [ 13 px ] font - medium ` },[I( ` span ` ,Ob,z(e.name),1),e.required?(F(),k( ` span ` ,kb, ` · required ` )):N( ` ` ,!0)],8,Db),O(B(Z),{id: ` $ { B ( i ) } - input - $ { e . name } ` ,"model-value":p.value[e.n
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 $ b(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 ex(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 tx(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 nx(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 rx=q([]),ix=q([]),ax=q(!0),ox=q(null),sx=q(!0),cx=q(null),lx=q(!1),ux=q(null);async function dx(){try{let e=await X.eventTypes(Zb().workspace);ax.value=e.enabled!==!1,rx.value=e.event_types||[],ix.value=e.proposals||[],ox.value=null}catch(e){ox.value=e.message||String(e)}finally{sx.value=!1}}function fx(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function px(e){ux.value=null,cx.value=e}function mx(e){let t=Sx.value.find(t=>String(t.id)===e.sample_id);px({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:fx(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function hx(e= ` ` ){px({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function gx(e){px({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:fx(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function _x(){cx.value=null}async function vx(){let e=cx.value;if(e){lx.value=!0;try{if(e.mode=== ` edit ` &&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:nx(e.rule)});else{let t=e.mode=== ` paste ` ?Qb(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:nx(e.rule),example:{headers:t,body:e.body}})}cx.value=null,await dx()}catch(e){ux.value=e.message||String(e)}finally{lx.value=!1}}}var yx=q(null);async function bx(){let e=yx.value;if(yx.value=null,e)try{await X.eventTypeDelete(e.id),await dx()}catch(e){ox.value=e.message||String(e)}}var xx=100,Sx=q([]),Cx=q(!0),wx=q(null),Tx=q(!0),Ex=q(null);async function Dx(){try{let e=await X.captures(xx);Cx.value=e.enabled!==!1,Sx.value=e.captures||[],wx.value=null}catch(e){wx.value=e.message||String(e)}finally{Tx.value=!1}}function Ox(e){let t=Sx.value.find(t=>t.id===e);return t&&(Ex.value=t),!!t}function kx(){Sx.value.length&&(Ex.value=Sx.value[0])}function Ax(){fh( ` captures ` ,()=>{Dx(),dx()})}var jx=M({__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=Et(n, ` class ` ),a=de(i,r);return(e,t)=>(F(),K(B(Zo),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:P(t=>[G(e. $ slots, ` default ` ,Ye(we(t)))]),_:3},16,[ ` data - orientation ` , ` class ` ]))}}),Mx=M({__name: ` TabsContent ` ,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Et(t, ` class ` );return(e,r)=>(F(),K(B(es),W({"data-slot": ` tabs - content ` ,class:B(U)( ` text - sm flex - 1 outline - none ` ,t.class)},B(n)),{default:P(()=>[G(e. $ slots, ` default ` )]),_:3},16,[ ` class ` ]))}}),Nx=M({__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=Et(t, ` class ` , ` variant ` );return(r,i)=>(F(),K(B(ts),W({"data-slot": ` tabs - list ` ,"data-variant":e.variant},B(n),{class:B(U)(B(Fx)({variant:e.variant}),t.class)}),{default:P(()=>[G(r. $ slots, ` default ` )]),_:3},16,[ ` data - variant ` , ` class ` ]))}}),Px=M({__name: ` TabsTrigger ` ,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Et(t, ` class ` ),r=me(n);return(e,n)=>(F(),K(B(ns),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
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&(Rd.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,Ud.value=Ud.value?{...Ud.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],Ud.value=Ud.value?{...Ud.value,tools:a}:null),n.type=== ` ask ` &&n.ask&&(clearTimeout(l),Ud.value=Ud.value?{...Ud.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 ` );zd.value=[...zd.value,{from: ` assistant ` ,text:o,tool_calls:a}],Ud.value=null,Vd.value= ` Ready ` ,await rf()}catch(e){let t=e;t.name=== ` AbortError ` &&!c?(Ud.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},Vd.value= ` Stopped ` ):(Ud.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?jd(r):void 0,isRetry:i},Vd.value= ` Error . Retry available . ` )}finally{clearTimeout(l),Fd=null,tf=null,Hd.value=!1}}function gf(){Vd.value= ` Stopping … ` ,Rd.value&&X.chatCancel(Rd.value).catch(()=>{}),nf()}function _f(){Ue(()=>{rf().catch(e=>{Vd.value=e.message|| ` Chat unavailable ` })}),Ke(()=>{nf()})}async function vf(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 hf({textOverride: ` 🎤 Voice message ` ,voice:{data:btoa(n),mime_type:e.type|| ` audio / webm ` }})}var yf=[ ` aria - label ` , ` title ` , ` aria - expanded ` , ` aria - controls ` ],bf=N({__name: ` ChatFab ` ,props:{open:{type:Boolean}},emits:[ ` toggle ` ],setup(e,{emit:t}){let n=t;function r(e){return U( ` col - start - 1 row - start - 1 grid place - items - center transition - [ opacity , transform ] duration - [ 140 ms ] ` ,e? ` opacity - 100 ` : ` - rotate - 45 scale - [ 0.7 ] opacity - 0 ` )}return(t,i)=>(I(),A( ` button ` ,{type: ` button ` ,class: ` relative z - 10 grid size - 14 cursor - pointer place - items - center rounded - full border border - border - strong bg - secondary text - primary shadow - [ var ( -- shadow - md ) ] transition - transform duration - [ 140 ms ] hover : - translate - y - px focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary active : translate - y - 0 ` ,"aria-label":e.open? ` Close chat ` : ` Chat with Archie ` ,title:e.open? ` Close chat ` : ` Chat with Archie ` ,"aria-expanded":e.open,"aria-controls":B(Nd),onClick:i[0]||=e=>n( ` toggle ` )},[L( ` span ` ,{"aria-hidden": ` true ` ,class:R(r(!e.open))},[k(B(zu),{size:22})],2),L( ` span ` ,{"aria-hidden": ` true ` ,class:R(r(e.open))},[k(B(bd),{size:22})],2)],8,yf))}}),xf=N({__name: ` Popover ` ,props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:[ ` update : open ` ],setup(e,{emit:t}){let n=O(e,t);return(e,t)=>(I(),K(B(ls),W({"data-slot": ` popover ` },B(n)),{default:F(t=>[G(e. $ slots, ` default ` ,Ye(Ce(t)))]),_:3},16))}}),Sf=N({inheritAttrs:!1,__name: ` PopoverContent ` ,props:{forceMount:{type:Boolean},memoDependencies:{},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default: ` center ` },alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},dir:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:[ ` escapeKeyDown ` , ` pointerDownOutside ` , ` focusOutside ` , ` interactOutside ` , ` openAutoFocus ` , ` closeAutoFocus ` ],setup(e,{emit:t}){let n=e,r=t,i=Tt(n, ` class ` ),a=O(i,r);return(e,t)=>(I(),K(B(ms),null,{default:F(()=>[k(B(ps),W({"data-slot": ` popover - content ` },{...e. $ attrs,...B(a)},{class:B(U)( ` bg - popover text - popover - foreground data - open : animate - in data - closed : animate - out data - closed : fade - out - 0 data - open : fade - in - 0 data - closed : zoom - out - 95 data - open : zoom - in - 95 data - [ side = bottom ] : slide - in - from - top - 2 data - [ side = left ] : slide - in - from - right - 2 data - [ side = right ] : slide - in - from - left - 2 data - [ side = top ] : slide - in - from - bottom - 2 ring - foreground / 10 flex flex - col gap - 2.5 rounded - lg p - 2.5 text - sm shadow - md ring - 1 duration - 100 z - 50 w - 72 max - w - ( -- reka - popover - content - available - width ) origin - ( -- reka - popover - content - transform - origin ) outline - hidden ` ,n.class)}),{default:F(()=>[G(e. $ slots, ` default ` )]),_:3},16,[ ` class ` ])]),_:3}))}}),Cf=N({__name: ` PopoverTrigger ` ,props:{asChild:{type:Boolean},as:{}},setup(e){let t=e;return(e,n)=>(I(),K(B(hs),W({"data-slot": ` popover - trigger ` },t),{default:F(()=>[G(e. $ slots, ` default ` )]),_:3},16))}}),wf=N({__name: ` ChatSessionActions ` ,setup(e){let t=q(!1); $ d(t);function n(e){t.value=!1,of(e)}function r(e,n){t.value=!1,sf(e,n)}return(e,i)=>(I(),K(B(xf),{open:t.value,"onUpdate:open":i[5]||=e=>t.value=e},{default:F(()=>[k(B(Cf),{"as-child": ` ` },{default:F(()=>[k(B(Y),{variant: ` ghost ` ,size: ` icon - sm ` ,class: ` flex - none ` ,"aria-label": ` Session actions ` ,title: ` Session actions ` },{default:F(()=>[k(B(wu))]),_:1})]),_:1}),k(B(Sf),{align: ` end ` ,class: ` grid w - 48 gap - 0.5 p - 1 ` },{default:F(()=>[k(B(Y),{variant: ` ghost ` ,size: ` sm ` ,class: ` justify - start Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:v m(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>v m(e))}),null)};for(let e=0;e<n.length;e++){let c=n[e];if(c.startsWith(" ` ` ` " ) ) { o ( ) , s ( ) , a ? ( t . push ( { kind : ` pre ` , code : a . join ( `
` )}),a=null):a=[];continue}if(a){a.push(c);continue}let l=b m(c),u=e+1<n.length?b m(n[e+1]):null;if(l&&u&&x m(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=b m(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>v m(e)),rows:r.map(e=>e.map(e=>v m(e)))});continue}if(!c.trim()){o(),s();continue}let d=c.match(/^(#{1,3}) \s +(.+) $ /);if(d){o(),s(),t.push({kind: ` h$ { d [ 1 ] . length } ` ,inline:v m(d[2])});continue}let f=c.match(/^ \s *[-*] \s +(.+) $ /),p=c.match(/^ \s * \d +[.)] \s +(.+) $ /);if(f||p){o();let e=p? ` ol ` : ` ul ` ;(!i||i.tag!==e)&&(s(),i={tag:e,items:[]}),i.items.push((f||p)[1])}else c.startsWith( ` > ` )?(o(),s(),t.push({kind: ` blockquote ` ,inline:v m(c.replace(/^> \s ?/, ` ` ))})):r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function bm(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 xm(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var Sm={class: ` [ overflow - wrap : anywhere ] ` },Cm={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },wm={class: ` font - mono text - [ 0.85 em ] ` },Tm={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Em={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Dm={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Om={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },km={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },Am={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },jm={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },Mm={key:8,class: ` mb - 2.5 last : mb - 0 ` },Nm=N({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=J(()=>ym(t.text));return(e,t)=>(I(),A( ` div ` ,Sm,[(I(!0),A(H,null,j(n.value,(e,t)=>(I(),A(H,{key:t},[e.kind=== ` pre ` ?(I(),A( ` pre ` ,Cm,[L( ` code ` ,wm,z(e.code),1)])):e.kind=== ` table ` ?(I(),A( ` table ` ,Tm,[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(gm,{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(gm,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(I(),A( ` blockquote ` ,Em,[k(gm,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(I(),A( ` h1 ` ,Dm,[k(gm,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(I(),A( ` h2 ` ,Om,[k(gm,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(I(),A( ` h3 ` ,km,[k(gm,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(I(),A( ` ul ` ,Am,[(I(!0),A(H,null,j(e.items,(e,t)=>(I(),A( ` li ` ,{key:t},[k(gm,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(I(),A( ` ol ` ,jm,[(I(!0),A(H,null,j(e.items,(e,t)=>(I(),A( ` li ` ,{key:t},[k(gm,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(I(),A( ` p ` ,Mm,[k(gm,{inline:e.inline},null,8,[ ` inline ` ])])):P( ` ` ,!0)],64))),128))]))}}),Pm={class: ` truncate ` },Fm=N({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Fe( ` 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(iu),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),L( ` span ` ,Pm,z(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),Im={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },Lm={class: ` font - semibold text - foreground ` },Rm={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },zm=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||(t.streaming?i.value? ` failed ` : ` running … ` : ` done ` ));return(t,o)=>e.tool.path?(I(),K(Fm,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(I(),A( ` div ` ,Im,[k(B(yd),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),L( ` span ` ,Lm,z(n.value),1),r.value?(I(),A( ` code ` ,Rm,z(r.value),1)):P( ` ` ,!0),L( ` span ` ,{class:R(B(U)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},z(a.value),3)]))}}),Bm={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },Vm={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },Hm={key:3,class: ` whitespace - pre - wrap ` },Um=N({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(I(),A( ` div ` ,{class:R([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[L( ` div ` ,{class:R(B(U)( ` max - w - [ min ( 78 ch , 92 % ) ] rounded - [ 0.85 rem ] px - 3.5 py - 2.5 text - sm leading - normal [ overflow - wrap : anywhere ] ` ,e.assistant? ` bg - muted ` : ` bg - primary / 15 ` ))},[e.assistant&&e.tools.length?(I(),A( ` div ` ,Bm,[(I(!0),A(H,null,j(e.tools,(t,n)=>(I(),K(zm,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):P( ` ` ,!0),e.media.length?(I(),A( ` div ` ,Vm,[(I(!0),A(H,null,j(e.media,(e,t)=>(I(),K(lm,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):P( ` ` ,!0),e.assistant?(I(),K(Nm,{key:2,text:e.text},null,8,[ ` text ` ])):(I(),A( ` div ` ,Hm,z(e.text),1)),G(t. $ slots, ` default ` )],2)],2))}}),Wm={class: ` text - sm ` },Gm={key:0,class: ` mt - 1 text - fg - muted ` },Km={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },qm=N({__name: ` ChatChooseCard ` ,props
Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,i=r.length>Dv? ` $ { r . slice ( 0 , Dv ) . trimEnd ( ) } … ` :r;return{text:i,full:n,truncated:i!==n}}function kv(e){return String(e|| ` event ` ).replaceAll( ` _ ` , ` ` ).replace(/ \b \w /g,e=>e.toUpperCase())}function Av(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 jv(e){let t=Number(e);return!Number.isFinite(t)||t<=0? ` ` :t.toLocaleString( ` en - US ` )}function Mv(e){return typeof e== ` string ` ?e: ` ` }function Nv(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=Av(t.duration_ms),i=[r,e&& ` ran for $ { e } ` ].filter(Boolean).join( ` · ` );return{title:t.interrupted? ` Stage interrupted : $ { n } ` :t.skipped? ` Skipped stage : $ { n } ` :t.error? ` Stage failed : $ { n } ` : ` Finished stage : $ { n } ` ,detail:[i,Mv(t.error),Mv(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:[Mv(t.previous_stage)&& ` after $ { Mv ( t . previous _stage ) } ` ,Mv(t.previous_reason)].filter(Boolean).join( ` : ` )||e.detail|| ` ` }}if(e.kind=== ` agent _finish ` ){let r=jv(t.iterations),i=jv(t.tokens),a=Number(t.cached_tokens)||0,o=jv((Number(t.prompt_tokens)||0)-a),s=jv(t.completion_tokens),c=jv(t.cached_tokens),l=[r&& ` $ { r } iterations ` ,i&& ` $ { i } tokens ` ,o&& ` $ { o } fresh prompt ` ,s&& ` $ { s } completion ` ,c&& ` $ { c } cached ` ,Mv(t.model)].filter(Boolean);return{title: ` Agent $ { Mv ( t . status ) || ` finished ` } : $ { n } ` ,detail:l.join( ` · ` )||e.detail|| ` ` }}if(e.kind=== ` remediation _round ` ){let e=Number(t.of),n=Mv(t.author);return{title: ` Remediation $ { Mv ( t . round ) } $ { e > 0 ? ` of ${ e } ` : ` ` } ` ,detail:[n&& ` answers $ { n } ' s review ` ,t.review_id? ` # $ { Mv ( t . review _id ) } ` : ` ` ].filter(Boolean).join( ` ` )}}if(e.kind=== ` review _approved ` ){let e=Mv(t.pr_number);return{title: ` Pull request approved ` ,detail:[Mv(t.author),e&& ` # $ { e } ` ].filter(Boolean).join( ` · ` )}}if(e.kind=== ` step _retried ` )return{title: ` Attempt $ { Mv ( t . attempt ) } of $ { Mv ( t . of ) } failed : $ { e . stage || ` step ` } ` ,detail:Mv(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=Mv(t.source),n=Mv(t.capture_id),r=[{label: ` binding $ { Mv ( t . binding _name ) || Mv ( 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 $ { Mv ( t . captured _after ) } ` : ` ` ].filter(Boolean).join( ` · ` )}}return{title:kv(e.kind||e.type),detail:e.detail|| ` ` }}var Pv=[ ` title ` ],Fv=N({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=Ev();n.watchIdentities();let r=e,i=t,a=hv(),o=J(()=>a.taskIDFor(r.event)),s=J(()=>Ov(r.event,n.identityName));function c(){o.value>0&&i( ` open ` ,o.value)}let l=J(()=>r.event.at?gh(r.event.at): ` – ` );return(e,t)=>(I(),K(B(Sv),{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:[_t(pt(c,[ ` prevent ` ]),[ ` enter ` ]),_t(pt(c,[ ` prevent ` ]),[ ` space ` ])]},{default:F(()=>[k(B(Q),{class: ` font - medium ` },{default:F(()=>[V(z(B(Nv)({...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,Pv)]),_:1}),k(B(Q),null,{default:F(()=>[V(z(l.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),Iv=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function Lv(e){return(Number(e?.task_id)||0)>0}function Rv(e,t){return t=== ` tasks ` ?Lv(e):t!== ` system ` ||!Lv(e)}function zv(e,t){return e.filter(e=>Rv(e,t))}function Bv(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function Vv(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function Hv(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=Vv(Ov(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 Uv={key:0,class: ` font - normal text - fg - subtle ` },Wv={role: ` region ` ,"aria-label": ` Activity ` ,"ari
Line truncated
` ,1)[0]?? ` ` ;return t.length>80? ` $ { t . slice ( 0 , 79 ) } … ` :t}function sb(e){return(e?.merged||0)+(e?.completed||0)}function cb(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 lb(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function ub(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 db(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!== ` ` &&(n[r.name]=ub(e,r.type))}return n}var fb=[ ` onKeydown ` ],pb={key:0,class: ` text - sm text - danger ` ,role: ` alert ` },mb={key:1,class: ` grid gap - 1.5 ` },hb=[ ` for ` ],gb={key:0,class: ` font - normal text - fg - subtle ` },_b=[ ` id ` ],vb=[ ` value ` ],yb={key:0,class: ` text - xs text - fg - subtle ` },bb={key:2,class: ` grid gap - 1.5 ` },xb=[ ` id ` ],Sb={class: ` block truncate text - [ 13 px ] font - medium ` },Cb={class: ` block text - xs text - fg - subtle ` },wb={key:0,class: ` text - xs text - fg - subtle ` },Tb={key:3,class: ` grid gap - 3 ` },Eb=[ ` for ` ],Db={class: ` font - mono ` },Ob={key:0,class: ` text - fg - subtle ` },kb={class: ` grid gap - 1.5 ` },Ab=[ ` for ` ],jb={class: ` grid gap - 1.5 ` },Mb=[ ` for ` ],Nb={key:4,class: ` text - sm text - danger ` ,role: ` alert ` },Pb={class: ` flex items - center gap - 2 border - t border - border pt - 4 ` },Fb={class: ` mr - auto text - xs text - fg - subtle ` },Ib=N({__name: ` NewTaskForm ` ,props:{workflow:{},draft:{},initialWorkflow:{},initialInstructions:{}},emits:[ ` started ` , ` cancel ` ],setup(e,{emit:t}){let n=e,r=t,i=De(),a=q([]),o=q([]),s=q([]),c=q( ` ` );Ue(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(ob(d.value)),p=q({});Ee(()=>{!u.value&&a.value[0]&&(u.value=a.value[0].id)});let m=J(()=>a.value.find(e=>e.id===u.value)),h=J(()=>cb(m.value)),g=J(()=>lb(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:db(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:pt(C,[ ` prevent ` ]),onKeydown:[_t(pt(C,[ ` meta ` , ` prevent ` ]),[ ` enter ` ]),_t(pt(C,[ ` ctrl ` , ` prevent ` ]),[ ` enter ` ])]},[c.value?(I(),A( ` p ` ,pb,z(c.value),1)):P( ` ` ,!0),_.value=== ` none ` ?P( ` ` ,!0):(I(),A( ` div ` ,mb,[L( ` label ` ,{for: ` $ { B ( i ) } - repo ` ,class: ` text - [ 13 px ] font - medium ` },[t[5]||=V( ` Repository ` ,-1),v.value?P( ` ` ,!0):(I(),A( ` span ` ,gb, ` ( optional ) ` ))],8,hb),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,vb))),128))],8,_b),s.value.length?(I(),A( ` p ` ,yb,[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 ` ,bb,[L( ` span ` ,{id: ` $ { B ( i ) } - wf ` ,class: ` text - [ 13 px ] font - medium ` }, ` Workflow ` ,8,xb),k(B(lc),{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(dc),{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 ` ,Sb,z(e.name||e.id),1),L( ` span ` ,Cb,[V(z(y(e.id)?.runs||0)+ ` runs ` ,1),y(e.id)?.runs?(I(),A(H,{key:0},[V( ` · ` +z(Math.round(B(sb)(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 ` ,wb, ` No enabled workflows . ` )):P( ` ` ,!0)])),h.value.length?(I(),A( ` div ` ,Tb,[(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 ` ,Db,z(e.name),1),e.required?(I(),A( ` span ` ,Ob, ` · required ` )):P( ` ` ,!0)],8,Eb),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 Qb(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 $ b(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 ex(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 tx(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 nx=q([]),rx=q([]),ix=q(!0),ax=q(null),ox=q(!0),sx=q(null),cx=q(!1),lx=q(null);async function ux(){try{let e=await X.eventTypes(Xb().workspace);ix.value=e.enabled!==!1,nx.value=e.event_types||[],rx.value=e.proposals||[],ax.value=null}catch(e){ax.value=e.message||String(e)}finally{ox.value=!1}}function dx(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function fx(e){lx.value=null,sx.value=e}function px(e){let t=xx.value.find(t=>String(t.id)===e.sample_id);fx({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:dx(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function mx(e= ` ` ){fx({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function hx(e){fx({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:dx(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function gx(){sx.value=null}async function _x(){let e=sx.value;if(e){cx.value=!0;try{if(e.mode=== ` edit ` &&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:tx(e.rule)});else{let t=e.mode=== ` paste ` ?Zb(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:tx(e.rule),example:{headers:t,body:e.body}})}sx.value=null,await ux()}catch(e){lx.value=e.message||String(e)}finally{cx.value=!1}}}var vx=q(null);async function yx(){let e=vx.value;if(vx.value=null,e)try{await X.eventTypeDelete(e.id),await ux()}catch(e){ax.value=e.message||String(e)}}var bx=100,xx=q([]),Sx=q(!0),Cx=q(null),wx=q(!0),Tx=q(null);async function Ex(){try{let e=await X.captures(bx);Sx.value=e.enabled!==!1,xx.value=e.captures||[],Cx.value=null}catch(e){Cx.value=e.message||String(e)}finally{wx.value=!1}}function Dx(e){let t=xx.value.find(t=>t.id===e);return t&&(Tx.value=t),!!t}function Ox(){xx.value.length&&(Tx.value=xx.value[0])}function kx(){Ch( ` captures ` ,()=>{Ex(),ux()})}var Ax=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=Tt(n, ` class ` ),a=O(i,r);return(e,t)=>(I(),K(B(el),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 ` ,Ye(Ce(t)))]),_:3},16,[ ` data - orientation ` , ` class ` ]))}}),jx=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=Tt(t, ` class ` );return(e,r)=>(I(),K(B(rl),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 ` ]))}}),Mx=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=Tt(t, ` class ` , ` variant ` );return(r,i)=>(I(),K(B(il),W({"data-slot": ` tabs - list ` ,"data-variant":e.variant},B(n),{class:B(U)(B(Px)({variant:e.variant}),t.class)}),{default:F(()=>[G(r. $ slots, ` default ` )]),_:3},16,[ ` data - variant ` , ` class ` ]))}}),Nx=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=Tt(t, ` class ` ),r=pe(n);return(e,n)=>(I(),K(B(al),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
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 z N=T N( ` CharSizeService ` ),B N=T N( ` CoreBrowserService ` ),V N=T N( ` MouseService ` ),H N=T N( ` RenderService ` ),U N=T N( ` SelectionService ` ),W N=T N( ` CharacterJoinerService ` ),G N=T N( ` ThemeService ` ),K N=T N( ` LinkProviderService ` ),q N=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack? $ N .isErrorNoTelemetry(e)?new $ N (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 H N=O N( ` CharSizeService ` ),U N=O N( ` CoreBrowserService ` ),W N=O N( ` MouseService ` ),G N=O N( ` RenderService ` ),K N=O N( ` SelectionService ` ),q N=O N( ` CharacterJoinerService ` ),J N=O N( ` ThemeService ` ),Y N=O N( ` LinkProviderService ` ),X N=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?nP .isErrorNoTelemetry(e)?new nP (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 JN(e){XN(e)||qN.onUnexpectedError(e)}var YN= ` Canceled ` ;function XN(e){return e instanceof ZN||e instanceof Error&&e.name===YN&&e.message===YN}var ZN=class extends Error{constructor(){super(YN),this.name=this.message}};function QN(e){return Error(e? ` Illegal argument : $ { e } ` : ` Illegal argument ` )}var $ N=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 ` }},eP=class e extends Error{constructor(t){super(t|| ` An unexpected bug occurred . ` ),Object.setPrototypeOf(this,e.prototype)}};function tP(e,t=0){return e[e.length-(1+t)]}var nP;(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})(nP||={});var rP=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||nP.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};rP.empty=new rP(e=>{});function iP(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 aP;(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})(aP||={});var oP=null;function sP(e){return oP?.trackDisposable(e),e}function cP(e){oP?.markAsDisposed(e)}function lP(e,t){oP?.setParent(e,t)}function uP(e){return oP?.markAsSingleton(e),e}function dP(e){if(aP.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 fP(...e){return pP(()=>dP(e))}function pP(e){let t=sP({dispose:iP(()=>{cP(t),e()})});return t}var mP=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,sP(this)}dispose(){this._isDisposed||(cP(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{dP(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error( ` Cannot register a disposable on itself ! ` );return lP(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),lP(e,null))}};mP.DISABLE_DISPOSED_WARNING=!1;var hP=mP,gP=class{constructor(){this._store=new hP,sP(this),lP(this._store,this)}dispose(){cP(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 ZN(e){ $ N(e)||XN.onUnexpectedError(e)}var QN= ` Canceled ` ;function $ N(e){return e instanceof eP||e instanceof Error&&e.name===QN&&e.message===QN}var eP=class extends Error{constructor(){super(QN),this.name=this.message}};function tP(e){return Error(e? ` Illegal argument : $ { e } ` : ` Illegal argument ` )}var nP=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 ` }},rP=class e extends Error{constructor(t){super(t|| ` An unexpected bug occurred . ` ),Object.setPrototypeOf(this,e.prototype)}};function iP(e,t=0){return e[e.length-(1+t)]}var aP;(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})(aP||={});var oP=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||aP.isGreaterThan(e(r,t)))&&(n=!1,t=r),!0)),t}};oP.empty=new oP(e=>{});function sP(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 cP;(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})(cP||={});var lP=null;function uP(e){return lP?.trackDisposable(e),e}function dP(e){lP?.markAsDisposed(e)}function fP(e,t){lP?.setParent(e,t)}function pP(e){return lP?.markAsSingleton(e),e}function mP(e){if(cP.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 hP(...e){return gP(()=>mP(e))}function gP(e){let t=uP({dispose:sP(()=>{dP(t),e()})});return t}var _P=class e{constructor(){this._toDispose=new Set,this._isDisposed=!1,uP(this)}dispose(){this._isDisposed||(dP(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{mP(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw Error( ` Cannot register a disposable on itself ! ` );return fP(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),fP(e,null))}};_P.DISABLE_DISPOSED_WARNING=!1;var vP=_P,yP=class{constructor(){this._store=new vP,uP(this),fP(this._store,this)}dispose(){dP(thi
Line truncated
` ).slice(2).join( `
` ))}},jP=class extends Error{constructor(e,t){super(e),this.name= ` ListenerLeakError ` ,this.stack=t}},MP=class extends Error{constructor(e,t){super(e),this.name= ` ListenerRefusalError ` ,this.stack=t}},NP=0,PP=class{constructor(e){this.value=e,this.id=NP++}},FP=2,IP=class{constructor(e){this._size=0,this._options=e,this._leakageMon=DP>0||this._options?.leakWarningThreshold?new kP(e?.onListenerError??JN,this._options?.leakWarningThreshold??DP):void 0,this._perfMon=this._options?._profName?new EP(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 MP( ` $ { e } . HINT : Stack shows most frequent listener ( $ { t [ 1 ] } - times ) ` ,t[0]);return(this._options?.onListenerError||JN)(n),gP.None}if(this._disposed)return gP.None;t&&(e=e.bind(t));let r=new PP(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=AP.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof PP?(this._deliveryQueue??=new LP,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=pP(()=>{i?.(),this._removeListener(r)});return n instanceof hP?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*FP<=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||JN;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 PP)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}},LP=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}},RP=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new IP,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new IP,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}};RP.INSTANCE=new RP;var zP=RP;function BP(e,t,n){typeof t== ` string ` &&(t=e.matchMedia(t)),t.addEventListener( ` change ` ,n)}zP.INSTANCE.onDidChangeZoomLevel;function VP(e){return zP.INSTANCE.getZoomFactor(e)}zP.INSTANCE.onDidChangeFullscreen;var HP=typeof navigator== ` object ` ?navigator.userAgent: ` ` ,UP=HP.indexOf( ` Firefox ` )>=0,WP=HP.indexOf( ` AppleWebKit ` )>=0,GP=HP.indexOf( ` Chrome ` )>=0,KP=!GP&&HP.indexOf( ` Safari ` )>=0;HP.indexOf( ` Electron / ` ),HP.indexOf( ` Android ` );var qP=!1;if(typeof vP.matchMedia== ` function ` ){let e=vP.matchMedia( ` ( display - mode : standalone ) or ( display - mode : window - controls - overlay ) ` ),t=vP.matchMedia( ` ( display - mode : fullscreen ) ` );qP=e.matches,BP(vP,e,({matches:e})=>{qP&&t.matches||(qP=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}};UI= $ M([eN(2,DN),eN(3,BN),eN(4,ON),eN(5,GN),eN(6,NN),eN(7,HN)],UI);var WI=class extends gP{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(pP(()=>{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 XI;(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= ` ` ))(XI||={});var ZI;(e=>e.ST= ` $ { $ . ESC } \ \ ` )(ZI||={});var QI=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)}}};QI= $ M([eN(2,DN),eN(3,NN),eN(4,kN),eN(5,HN)],QI);var $ I=0,eL=0,tL=0,nL=0,rL={css: ` # 00000000 ` ,rgba:0},iL;(e=>{function t(e,t,n,r){return r===void 0? ` # $ { lL ( e ) } $ { lL ( t ) } $ { lL ( n ) } ` : ` # $ { lL ( e ) } $ { lL ( t ) } $ { lL ( n ) } $ { lL ( 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})(iL||={});var aL;(e=>{function t(e,t){if(nL=(t.rgba&255)/255,nL===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 $ I=a+Math.round((n-a)*nL),eL=o+Math.round((r-o)*nL),tL=s+Math.round((i-s)*nL),{css:iL.toCss( $ I,eL,tL),rgba:iL.toRgba( $ I,eL,tL)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=cL.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return iL.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[ $ I,eL,tL]=cL.toChannels(t),{css:iL.toCss( $ I,eL,tL),rgba:t}}e.opaque=i;function a(e,t){return nL=Math.round(t*255),[ $ I,eL,tL]=cL.toChannels(e.rgba),{css:iL.toCss( $ I,eL,tL,nL),rgba:iL.toRgba( $ I,eL,tL,nL)}}e.opacity=a;function o(e,t){return nL=e.rgba&255,a(e,nL*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.r
Line truncated
` ))}},PP=class extends Error{constructor(e,t){super(e),this.name= ` ListenerLeakError ` ,this.stack=t}},FP=class extends Error{constructor(e,t){super(e),this.name= ` ListenerRefusalError ` ,this.stack=t}},IP=0,LP=class{constructor(e){this.value=e,this.id=IP++}},RP=2,zP=class{constructor(e){this._size=0,this._options=e,this._leakageMon=AP>0||this._options?.leakWarningThreshold?new MP(e?.onListenerError??ZN,this._options?.leakWarningThreshold??AP):void 0,this._perfMon=this._options?._profName?new kP(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 FP( ` $ { e } . HINT : Stack shows most frequent listener ( $ { t [ 1 ] } - times ) ` ,t[0]);return(this._options?.onListenerError||ZN)(n),yP.None}if(this._disposed)return yP.None;t&&(e=e.bind(t));let r=new LP(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=NP.create(),i=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof LP?(this._deliveryQueue??=new BP,this._listeners=[this._listeners,r]):this._listeners.push(r):(this._options?.onWillAddFirstListener?.(this),this._listeners=r,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=gP(()=>{i?.(),this._removeListener(r)});return n instanceof vP?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*RP<=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||ZN;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 LP)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}},BP=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}},VP=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new zP,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new zP,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}};VP.INSTANCE=new VP;var HP=VP;function UP(e,t,n){typeof t== ` string ` &&(t=e.matchMedia(t)),t.addEventListener( ` change ` ,n)}HP.INSTANCE.onDidChangeZoomLevel;function WP(e){return HP.INSTANCE.getZoomFactor(e)}HP.INSTANCE.onDidChangeFullscreen;var GP=typeof navigator== ` object ` ?navigator.userAgent: ` ` ,KP=GP.indexOf( ` Firefox ` )>=0,qP=GP.indexOf( ` AppleWebKit ` )>=0,JP=GP.indexOf( ` Chrome ` )>=0,YP=!JP&&GP.indexOf( ` Safari ` )>=0;GP.indexOf( ` Electron / ` ),GP.indexOf( ` Android ` );var XP=!1;if(typeof xP.matchMedia== ` function ` ){let e=xP.matchMedia( ` ( display - mode : standalone ) or ( display - mode : window - controls - overlay ) ` ),t=xP.matchMedia( ` ( display - mode : fullscreen ) ` );XP=e.matches,UP(xP,e,({matches:e})=>{XP&&t.matches||(XP=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}};KI=nN([rN(2,AN),rN(3,UN),rN(4,jN),rN(5,JN),rN(6,IN),rN(7,GN)],KI);var qI=class extends yP{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(gP(()=>{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 $ I;(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= ` ` ))( $ I||={});var eL;(e=>e.ST= ` $ { $ . ESC } \ \ ` )(eL||={});var tL=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)}}};tL=nN([rN(2,AN),rN(3,IN),rN(4,MN),rN(5,GN)],tL);var nL=0,rL=0,iL=0,aL=0,oL={css: ` # 00000000 ` ,rgba:0},sL;(e=>{function t(e,t,n,r){return r===void 0? ` # $ { fL ( e ) } $ { fL ( t ) } $ { fL ( n ) } ` : ` # $ { fL ( e ) } $ { fL ( t ) } $ { fL ( n ) } $ { fL ( 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})(sL||={});var cL;(e=>{function t(e,t){if(aL=(t.rgba&255)/255,aL===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 nL=a+Math.round((n-a)*aL),rL=o+Math.round((r-o)*aL),iL=s+Math.round((i-s)*aL),{css:sL.toCss(nL,rL,iL),rgba:sL.toRgba(nL,rL,iL)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=dL.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return sL.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[nL,rL,iL]=dL.toChannels(t),{css:sL.toCss(nL,rL,iL),rgba:t}}e.opaque=i;function a(e,t){return aL=Math.round(t*255),[nL,rL,iL]=dL.toChannels(e.rgba),{css:sL.toCss(nL,rL,iL,aL),rgba:sL.toRgba(nL,rL,iL,aL)}}e.opacity=a;function o(e,t){return aL=e.rgba&255,a(e,aL*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()),eR&&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=CR(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=RL(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,-wR),wR),t/=wR,t/Math.abs(t)+Math.round(t*(TR-1)))}shouldForceSelection(e){return XL?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(),ER)}_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&&!(XL&&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( $ F (i,` selectionchange ` ,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(p P(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar( ` ` )}_handleChar(e){this._liveRegionLineCount<E B+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e=== `
` &&(this._liveRegionLineCount++,this._liveRegionLineCount===EB+1&&(this._liveRegion.textContent+=iN.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 nN.get()},set promptLabel(e){nN.set(e)},get tooMuchOutput(){return iN.get()},set tooMuchOutput(e){iN.set(e)}}}_verifyIntegers(...e){for(zB of e)if(zB===1/0||isNaN(zB)||zB%1!=0)throw Error( ` This API only accepts integers ` )}_verifyPositiveIntegers(...e){for(zB of e)if(zB&&(zB===1/0||isNaN(zB)||zB%1!=0||zB<0))throw Error( ` This API only accepts positive integers ` )}},VB=2,HB=1,UB=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(VB,Math.floor(u/e.css.cell.width)),rows:Math.max(HB,Math.floor(l/e.css.cell.height))}}},WB={class: ` flex h - [ 32 rem ] min - h - 0 flex - col gap - 2 ` },GB={key:0,class: ` text - sm text - fg - muted ` ,role: ` status ` },KB=M({__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 L(()=>{let e=n.value;if(!e)return;i=new BB({convertEol:!0,disableStdin:!0,cursorBlink:!1,fontFamily: ` 'IBM Plex Mono' , ui - monospace , monospace ` ,fontSize:13,theme:{background: ` # 0b0 f14 ` ,foreground: ` # e6edf3 ` }}),o=new UB,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)}),rt(()=>{s?.disconnect(),s=null,a?.close(),a=null,i?.dispose(),i=null,o=null}),(e,t)=>(F(),k(`div`,WB,[r.value===`open`?N(``,!0):(F(),k(`p`,GB,[r.value===`connecting`?(F(),k(H,{key:0},[V(`Connecting…`)],64)):r.value===`closed`?(F(),k(H,{key:1},[V(`The sandbox ended.`)],64)):(F(),k(H,{key:2},[V(`Sandbox unavailable.`)],64))])),I(`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)]))}}),qB={class:`flex flex-wrap items-center gap-3 border-b border-border pb-3`},JB={class:`inline-flex items-center gap-2`},YB={class:`inline-flex items-center gap-2`},XB=`__all__`,ZB=M({__name:`TaskLogFilters`,props:{filters:{},stages:{}},emits:[`filter`],setup(e,{emit:t}){let n=e,r=t,i=J(()=>gT.map(e=>({value:e.value||XB,label:e.label}))),a=J(()=>n.filters.level||XB),o=J(()=>n.filters.stage||XB);function s(e){r(`filter`,{...n.filters,...e})}function c(e){s({level:String(e)===XB?``:String(e)})}function l(e){s({stage:String(e)===XB?``:String(e)})}return(t,n)=>(F(),k(`div`,qB,[I(`div`,JB,[O(B(mf),{"model-value":a.value,"onUpdate:modelValue":c},{default:P(()=>[O(B(xf),{size:`sm`,"aria-label":`Filter log entries by level`},{default:P(()=>[O(B(Sf))]),_:1}),O(B(hf),null,{default:P(()=>[O(B(gf),null,{default:P(()=>[(F(!0),k(H,null,A(i.value,e=>(F(),K(B(vf),{key:e.value,value:e.value},{default:P(()=>[V(z(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])]),I(`div`,YB,[O(B(mf),{"model-value":o.value,"onUpdate:modelValue":l},{default:P(()=>[O(B(xf),{size:`sm`,"aria-label":`Filter log entries by stage`},{default:P(()=>[O(B(Sf))]),_:1}),O(B(hf),null,{default:P(()=>[O(B(gf),null,{default:P(()=>[O(B(vf),{value:XB},{default:P(()=>[...n[0]||=[V(`All stages`,-1)]]),_:1}),(F(!0),k(H,null,A(e.stages,e=>(F(),K(B(vf),{key:e,value:e},{default:P(()=>[V(z(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])])]))}}),QB={class:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`},$B={key:2,class:`flex flex-col items-start gap-2 py-3`},eV={key:0,class:`mt-2 flex flex-wrap items-cente
Line truncated
` )}};fK.defaultYaml={explicit:!1,version: ` 1.2 ` },fK.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function pK(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 mK(e){let t=new Set;return aK(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function hK(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function gK(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=mK(e);let a=hK(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(ZG(t.node)|| $ G(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 _K(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=_K(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=_K(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=_K(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=_K(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function vK(e,t,n){if(Array.isArray(e))return e.map((e,t)=>vK(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!tK(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 yK=class{constructor(e){Object.defineProperty(this,KG,{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(!JG(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=vK(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?_K(i,{"":o}, ` ` ,o):o}},bK=class extends yK{constructor(e){super(BG),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=[],aK(e,{Node:(e,t)=>{(qG(t)||tK(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||=(vK(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=xK(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(pK(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 xK(e,t,n){if(qG(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if( $ G(t)){let r=0;for(let i of t.items){let t=xK(e,i,n);t>r&&(r=t)}return r}if(XG(t)){let r=xK(e,t.key,n),i=xK(e,t.value,n);return Math.max(r,i)}return 1}var SK=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,CK=class extends yK{constructor(e){super(WG),this.value=e}toJSON(e,t){return t?.keep?this.value:vK(this.value,e,t)}toString(){return String(this.value)}};CK.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,CK.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,CK.PLAIN= ` PLAIN ` ,CK.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,CK.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var wK= ` tag : yaml . org , 2002 : ` ;function TK(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 EK(e,t,n){if(JG(e)&&(e=e.contents),eK(e))return e;if(XG(e)){let t=n.schema[HG].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 bK(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=wK+t.slice(2));let l=TK(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new CK(e);return c&&(c.node=t),t
Line truncated
` )?j K(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()),rR&&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=ER(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=VL(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,-DR),DR),t/=DR,t/Math.abs(t)+Math.round(t*(OR-1)))}shouldForceSelection(e){return $ L?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(),kR)}_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&&!( $ L&&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(nI (i, ` selectionchange ` ,()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(g P(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar( ` ` )}_handleChar(e){this._liveRegionLineCount<k B+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e=== `
` &&(this._liveRegionLineCount++,this._liveRegionLineCount===kB+1&&(this._liveRegion.textContent+=sN.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 aN.get()},set promptLabel(e){aN.set(e)},get tooMuchOutput(){return sN.get()},set tooMuchOutput(e){sN.set(e)}}}_verifyIntegers(...e){for(HB of e)if(HB===1/0||isNaN(HB)||HB%1!=0)throw Error( ` This API only accepts integers ` )}_verifyPositiveIntegers(...e){for(HB of e)if(HB&&(HB===1/0||isNaN(HB)||HB%1!=0||HB<0))throw Error( ` This API only accepts positive integers ` )}},WB=2,GB=1,KB=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(WB,Math.floor(u/e.css.cell.width)),rows:Math.max(GB,Math.floor(l/e.css.cell.height))}}},qB={class: ` flex h - [ 32 rem ] min - h - 0 flex - col gap - 2 ` },JB={key:0,class: ` text - sm text - fg - muted ` ,role: ` status ` },YB=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 Ue(()=>{let e=n.value;if(!e)return;i=new UB({convertEol:!0,disableStdin:!0,cursorBlink:!1,fontFamily: ` 'IBM Plex Mono' , ui - monospace , monospace ` ,fontSize:13,theme:{background: ` # 0b0 f14 ` ,foreground: ` # e6edf3 ` }}),o=new KB,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)}),rt(()=>{s?.disconnect(),s=null,a?.close(),a=null,i?.dispose(),i=null,o=null}),(e,t)=>(I(),A(`div`,qB,[r.value===`open`?P(``,!0):(I(),A(`p`,JB,[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)]))}}),XB={class:`flex flex-wrap items-center gap-3 border-b border-border pb-3`},ZB={class:`inline-flex items-center gap-2`},QB={class:`inline-flex items-center gap-2`},$B=`__all__`,eV=N({__name:`TaskLogFilters`,props:{filters:{},stages:{}},emits:[`filter`],setup(e,{emit:t}){let n=e,r=t,i=J(()=>yT.map(e=>({value:e.value||$B,label:e.label}))),a=J(()=>n.filters.level||$B),o=J(()=>n.filters.stage||$B);function s(e){r(`filter`,{...n.filters,...e})}function c(e){s({level:String(e)===$B?``:String(e)})}function l(e){s({stage:String(e)===$B?``:String(e)})}return(t,n)=>(I(),A(`div`,XB,[L(`div`,ZB,[k(B(Tf),{"model-value":a.value,"onUpdate:modelValue":c},{default:F(()=>[k(B(Mf),{size:`sm`,"aria-label":`Filter log entries by level`},{default:F(()=>[k(B(Nf))]),_:1}),k(B(Ef),null,{default:F(()=>[k(B(Df),null,{default:F(()=>[(I(!0),A(H,null,j(i.value,e=>(I(),K(B(kf),{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`,QB,[k(B(Tf),{"model-value":o.value,"onUpdate:modelValue":l},{default:F(()=>[k(B(Mf),{size:`sm`,"aria-label":`Filter log entries by stage`},{default:F(()=>[k(B(Nf))]),_:1}),k(B(Ef),null,{default:F(()=>[k(B(Df),null,{default:F(()=>[k(B(kf),{value:$B},{default:F(()=>[...n[0]||=[V(`All stages`,-1)]]),_:1}),(I(!0),A(H,null,j(e.stages,e=>(I(),K(B(kf),{key:e,value:e},{default:F(()=>[V(z(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1},8,[`model-value`])])]))}}),tV={class:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`},nV={key:2,class:`flex flex-col items-start gap-2 py-3`},rV={key:0,class:`mt-2 flex flex-wrap items-cent
Line truncated
` )}};hK.defaultYaml={explicit:!1,version: ` 1.2 ` },hK.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function gK(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 _K(e){let t=new Set;return cK(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function vK(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function yK(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=_K(e);let a=vK(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(eK(t.node)||nK(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 bK(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=bK(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=bK(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=bK(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=bK(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function xK(e,t,n){if(Array.isArray(e))return e.map((e,t)=>xK(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!iK(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 SK=class{constructor(e){Object.defineProperty(this,YG,{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(!ZG(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=xK(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?bK(i,{"":o}, ` ` ,o):o}},CK=class extends SK{constructor(e){super(UG),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=[],cK(e,{Node:(e,t)=>{(XG(t)||iK(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||=(xK(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=wK(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(gK(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 wK(e,t,n){if(XG(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(nK(t)){let r=0;for(let i of t.items){let t=wK(e,i,n);t>r&&(r=t)}return r}if( $ G(t)){let r=wK(e,t.key,n),i=wK(e,t.value,n);return Math.max(r,i)}return 1}var TK=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,EK=class extends SK{constructor(e){super(qG),this.value=e}toJSON(e,t){return t?.keep?this.value:xK(this.value,e,t)}toString(){return String(this.value)}};EK.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,EK.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,EK.PLAIN= ` PLAIN ` ,EK.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,EK.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var DK= ` tag : yaml . org , 2002 : ` ;function OK(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 kK(e,t,n){if(ZG(e)&&(e=e.contents),rK(e))return e;if( $ G(e)){let t=n.schema[GG].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 CK(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=DK+t.slice(2));let l=OK(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new EK(e);return c&&(c.node=t),t
Line truncated
` )?P K(n,t):n.includes( `
` )? `
` +j K(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,N K= ` flow ` ,P K= ` block ` ,F K= ` quoted ` ;function I K(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=L K(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=L K(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` +P K(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,I K= ` flow ` ,L K= ` block ` ,R K= ` quoted ` ;function z K(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=B K(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=B K(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 L K(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 R K=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),z K=e=>/^(%|---| \. \. \. )/m.test(e);function B K(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 K(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(z K(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 B K(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 V K=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),H K=e=>/^(%|---| \. \. \. )/m.test(e);function U K(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 W K(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(H K(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 K(o,a,F K,R K(t,!1))}function H K(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return V K(e,t);let n=t.indent||(z K(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : IK ( r , n , NK , RK ( t , ! 1 ) ) } function UK ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = VK ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? HK : i && ! t ? VK : n ? HK : VK } return r ( e , t ) } var WK ; try { WK = 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:z K(o,a,R K,V K(t,!1))}function G K(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return W K(e,t);let n=t.indent||(H K(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : zK ( r , n , IK , VK ( t , ! 1 ) ) } function KK ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = WK ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? GK : i && ! t ? WK : n ? GK : WK } return r ( e , t ) } var qK ; try { qK = RegExp ( ` (^|(?<!
) )
+ ( ? !
| $ ) ` , ` g ` )}catch{W K=/ \n +(?! \n | $ )/g}function G K({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 U K(n,r);let l=r.indent||(r.forceBlockIndent||z K(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===C K.BLOCK_FOLDED?!1:t===C K.BLOCK_LITERAL||!B K(n,c,l.length);if(!n)return u? ` |
| $ ) ` , ` g ` )}catch{q K=/ \n +(?! \n | $ )/g}function J K({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 K K(n,r);let l=r.indent||(r.forceBlockIndent||H K(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===E K.BLOCK_FOLDED?!1:t===E K.BLOCK_LITERAL||!U K(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(W K, ` $ & $ { 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(q K, ` $ & $ { 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=R K(r,!0);o!== ` folded ` &&t!==C K.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=I K( ` $ { v } $ { e } $ { p } ` ,l,P K,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function K K(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 U K(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?U K(a,t):G K(e,t,n,r);if(!s&&!u&&i!==C K.PLAIN&&a.includes( `
` ))return G K(e,t,n,r);if(z K(a)){if(c=== ` ` )return t.forceBlockIndent=!0,G K(e,t,n,r);if(s&&c===l)return U K(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 U K(a,t)}return s?d:I K(d,c,N K,R K(t,!1))}function q K(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!==C K.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=C K.QUOTE_DOUBLE);let c=e=>{switch(e){case C K.BLOCK_FOLDED:case C K.BLOCK_LITERAL:return i||a?U K(o.value,t):G K(o,t,n,r);case C K.QUOTE_DOUBLE:return V K(o.value,t);case C K.QUOTE_SINGLE:return H K(o.value,t);case C K.PLAIN:return K K(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 J K(e,t){let n=Object.assign({blockQuote:!0,commentString:A K,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 Y K(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(ZG (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 X K(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(ZG (e)|| $ G (e))&&e.anchor;a&&p K(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 ZK (e,t,n,r){if(X G(e))return e.toString(t,n,r);if(q G(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=e K(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Y K(t.doc.schema.tags,a);let o=X K(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):ZG (a)?q K(a,t,n,r):a.toString(t,n,r);return o?ZG (a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function QK ({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=e K(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if( $ G (e)||!e K(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|| $ G (e)||(ZG (e)?e.type===C K.BLOCK_FOLDED||e.type===C K.BLOCK_LITERAL:typeof e==` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=ZK (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+=M K(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=M K(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=M K(g,n.indent,l(f))));let _,v,y;e K(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&&ZG (t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&QG (t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=ZK (t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { jK ( 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=V K(r,!0);o!== ` folded ` &&t!==E K.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=z K( ` $ { v } $ { e } $ { p } ` ,l,L K,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function Y K(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 K K(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?K K(a,t):J K(e,t,n,r);if(!s&&!u&&i!==E K.PLAIN&&a.includes( `
` ))return J K(e,t,n,r);if(H K(a)){if(c=== ` ` )return t.forceBlockIndent=!0,J K(e,t,n,r);if(s&&c===l)return K K(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 K K(a,t)}return s?d:z K(d,c,I K,V K(t,!1))}function X K(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 K.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=E K.QUOTE_DOUBLE);let c=e=>{switch(e){case E K.BLOCK_FOLDED:case E K.BLOCK_LITERAL:return i||a?K K(o.value,t):J K(o,t,n,r);case E K.QUOTE_DOUBLE:return W K(o.value,t);case E K.QUOTE_SINGLE:return G K(o.value,t);case E K.PLAIN:return Y K(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 Z K(e,t){let n=Object.assign({blockQuote:!0,commentString:N K,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 Q K(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(eK (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 $ K(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(eK (e)||nK (e))&&e.anchor;a&&g K(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 eq (e,t,n,r){if( $ G(e))return e.toString(t,n,r);if(X G(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=r K(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Q K(t.doc.schema.tags,a);let o= $ K(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):eK (a)?X K(a,t,n,r):a.toString(t,n,r);return o?eK (a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function tq ({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=r K(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(nK (e)||!r K(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||nK (e)||(eK (e)?e.type===E K.BLOCK_FOLDED||e.type===E K.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=eq (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+=F K(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=F K(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=F K(g,n.indent,l(f))));let _,v,y;r K(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&&eK (t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&tK (t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=eq (t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { PK ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
` &&y&&(S= `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&& $ G (t)){let e=x[0],r=x.indexOf(`
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&nK (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+=M K(g,n.indent,l(y)):h&&i&&i(),g}function $ K (e,t){(e===` debug ` ||e=== ` warn ` )&&console.warn(t)}var e q= ` << ` ,t q={identify:e=>e===e q||typeof e== ` symbol ` &&e.description===e q,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new C K(Symbol(e q)),{addToJSMap:r q}),stringify:()=>e q},n q=(e,t)=>(t q.identify(t)||ZG (t)&&(!t.type||t.type===C K.PLAIN)&&t q.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===t q.tag&&e.default);function r q(e,t,n){let r=a q(e,n);if(QG (r))for(let n of r.items)i q(e,t,n);else if(Array.isArray(r))for(let n of r)i q(e,t,n);else i q(e,t,r)}function i q(e,t,n){let r=a q(e,n);if(!Y G(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 a q(e,t){return e&&q G(t)?t.resolve(e.doc,e):t}function o q(e,t,{key:n,value:r}){if(e K(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(n q(e,n))r q(e,t,r);else{let i=v K(n, ` ` ,e);if(t instanceof Map)t.set(i,v K(r,i,e));else if(t instanceof Set)t.add(i);else{let a=s q(n,i,e),o=v K(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function s q(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(e K(e)&&n?.doc){let t=J K(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)+ ` ... " ` ), $ K (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 c q(e,t,n){return new l q(E K(e,void 0,n),E K(t,void 0,n))}var l q=class e{constructor(e,t=null){Object.defineProperty(this,K G,{value:U G}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return e K(n)&&(n=n.clone(t)),e K(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return o q(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?QK (this,e,t,n):JSON.stringify(this)}};function u q(e,t,n){return(t.inFlow??e.flow?f q:d q)(e,t,n)}function d q({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(e K(i))!d&&i.spaceBefore&&f.push( ` ` ),p q(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(X G(i)){let e=e K(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),p q(n,f,e.commentBefore,d))}d=!1;let s=ZK (i,u,()=>o=null,()=>d=!0);o&&(s+=M K(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+=F K(g,n.indent,l(y)):h&&i&&i(),g}function nq (e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var r q= ` << ` ,i q={identify:e=>e===r q||typeof e== ` symbol ` &&e.description===r q,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new E K(Symbol(r q)),{addToJSMap:o q}),stringify:()=>r q},a q=(e,t)=>(i q.identify(t)||eK (t)&&(!t.type||t.type===E K.PLAIN)&&i q.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===i q.tag&&e.default);function o q(e,t,n){let r=c q(e,n);if(tK (r))for(let n of r.items)s q(e,t,n);else if(Array.isArray(r))for(let n of r)s q(e,t,n);else s q(e,t,r)}function s q(e,t,n){let r=c q(e,n);if(!Q G(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 c q(e,t){return e&&X G(t)?t.resolve(e.doc,e):t}function l q(e,t,{key:n,value:r}){if(r K(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(a q(e,n))o q(e,t,r);else{let i=x K(n, ` ` ,e);if(t instanceof Map)t.set(i,x K(r,i,e));else if(t instanceof Set)t.add(i);else{let a=u q(n,i,e),o=x K(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function u q(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(r K(e)&&n?.doc){let t=Z K(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)+ ` ... " ` ),nq (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 d q(e,t,n){return new f q(k K(e,void 0,n),k K(t,void 0,n))}var f q=class e{constructor(e,t=null){Object.defineProperty(this,Y G,{value:K G}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return r K(n)&&(n=n.clone(t)),r K(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return l q(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?tq (this,e,t,n):JSON.stringify(this)}};function p q(e,t,n){return(t.inFlow??e.flow?h q:m q)(e,t,n)}function m q({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(r K(i))!d&&i.spaceBefore&&f.push( ` ` ),g q(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if( $ G(i)){let e=r K(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),g q(n,f,e.commentBefore,d))}d=!1;let s=eq (i,u,()=>o=null,()=>d=!0);o&&(s+=F K(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+= `
` +j K(l(e),c),s&&s()):d&&o&&o(),p}function f q({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(e K(i))i.spaceBefore&&d.push( ` ` ),p q(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(X G(i)){let e=e K(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),p q(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=e K(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=ZK (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+=M K(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 pq({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=jK(t(r),e);n.push(i.trimStart())}}function mq(e,t){let n=ZG(t)?t.value:t;for(let r of e)if(XG(r)&&(r.key===t||r.key===n||ZG(r.key)&&r.key.value===n))return r}var hq=class extends kK{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(HG,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(cq(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=XG(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new lq(e,e?.value):new lq(e.key,e.value);let r=mq(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );ZG(r.value)&&SK(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=mq(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=mq(this.items,e)?.value;return(!t&&ZG(n)?n.value:n)??void 0}has(e){return!!mq(this.items,e)}set(e,t){this.add(new lq(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)oq(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!XG(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})),uq(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},gq={collection: ` map ` ,default:!0,nodeClass:hq,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return YG(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>hq.from(e,t,n)},_q=class extends kK{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(GG,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=vq(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=vq(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&ZG(r)?r.value:r}has(e){let t=vq(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=vq(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];ZG(r)&&SK(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(vK(e,String(r++),t));return n}toString(e,t,n){return e?uq(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(EK(a,void 0,n))}}return i}};function vq(e){let t=ZG(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var yq={collection: ` seq ` ,default:!0,nodeClass:_q,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return QG(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>_q.from(e,t,n)},bq={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),qK(e,t,n,r)}},xq={identify:e=>e==null,createNode:()=>new CK(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new CK(null),stringify:({source:e},t)=>typeof e== ` string ` &&xq.test.test(e)?e:t.options.nullStr},Sq={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new CK(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&Sq.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function Cq({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 wq={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:Cq},Tq={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 qK({comment:e,type:t,value:s},r,i,a)}};function zq(e,t){if(QG(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!XG(r)){if(YG(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new lq(new CK(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]=XG(r)?r:new lq(r)}}else t( ` Expected a sequence for this tag ` );return e}function Bq(e,t,n){let{replacer:r}=n,i=new _q(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(cq(o,s,n))}return i}var Vq={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:zq,createNode:Bq},Hq=class e extends _q{constructor(){super(),this.add=hq.prototype.add.bind(this),this.delete=hq.prototype.delete.bind(this),this.get=hq.prototype.get.bind(this),this.has=hq.prototype.has.bind(this),this.set=hq.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(XG(e)?(r=vK(e.key, ` ` ,t),i=vK(e.value,r,t)):r=vK(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=Bq(e,t,n),i=new this;return i.items=r.items,i}};Hq.tag= ` tag : yaml . org , 2002 : omap ` ;var Uq={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:Hq,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=zq(e,t),r=[];for(let{key:e}of n.items)ZG(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new Hq,n)},createNode:(e,t,n)=>Hq.from(e,t,n)};function Wq({value:e,source:t},n){return t&&(e?Gq:Kq).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Gq={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 CK(!0),stringify:Wq},Kq={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 CK(!1),stringify:Wq},qq={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:Cq},Jq={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():Cq(e)}},Yq={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 CK(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:Cq},Xq=e=>typeof e== ` bigint ` ||Number.isInteger(e);function Zq(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 Qq(e,t,n){let{value:r}=e;if(Xq(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return Cq(e)}var $ q={identify:Xq,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>Zq(e,2,2,n),stringify:e=>Qq(e,2, ` 0 b ` )},eJ={identify:Xq,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>Zq(e,1,8,n),stringify:e=>Qq(e,8, ` 0 ` )},tJ={identify:Xq,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>Zq(e,0,10,n),stringify:Cq},nJ={identify:Xq,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>Zq(e,2,16,n),stringify:e=>Qq(e,16, ` 0 x ` )},rJ=class e extends hq{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=XG(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new lq(e.key,null):new lq(e,null),mq(this.items,t.key)||this.items.push(t)}get(e,t){let n=mq(this.items,e);return!t&&XG(n)?ZG(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=mq(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new lq(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(j K(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(j K(a(t), ` ` )))}return n.join( `
` +P K(l(e),c),s&&s()):d&&o&&o(),p}function h q({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(r K(i))i.spaceBefore&&d.push( ` ` ),g q(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if( $ G(i)){let e=r K(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),g q(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=r K(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=eq (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+=F K(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 gq({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=PK(t(r),e);n.push(i.trimStart())}}function _q(e,t){let n=eK(t)?t.value:t;for(let r of e)if( $ G(r)&&(r.key===t||r.key===n||eK(r.key)&&r.key.value===n))return r}var vq=class extends MK{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(GG,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(dq(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= $ G(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new fq(e,e?.value):new fq(e.key,e.value);let r=_q(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );eK(r.value)&&TK(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=_q(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=_q(this.items,e)?.value;return(!t&&eK(n)?n.value:n)??void 0}has(e){return!!_q(this.items,e)}set(e,t){this.add(new fq(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)lq(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(! $ G(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})),pq(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},yq={collection: ` map ` ,default:!0,nodeClass:vq,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return QG(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>vq.from(e,t,n)},bq=class extends MK{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(JG,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=xq(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=xq(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&eK(r)?r.value:r}has(e){let t=xq(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=xq(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];eK(r)&&TK(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(xK(e,String(r++),t));return n}toString(e,t,n){return e?pq(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(kK(a,void 0,n))}}return i}};function xq(e){let t=eK(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var Sq={collection: ` seq ` ,default:!0,nodeClass:bq,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return tK(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>bq.from(e,t,n)},Cq={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),XK(e,t,n,r)}},wq={identify:e=>e==null,createNode:()=>new EK(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new EK(null),stringify:({source:e},t)=>typeof e== ` string ` &&wq.test.test(e)?e:t.options.nullStr},Tq={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new EK(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&Tq.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function Eq({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 Dq={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:Eq},Oq={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 XK({comment:e,type:t,value:s},r,i,a)}};function Hq(e,t){if(tK(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(! $ G(r)){if(QG(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new fq(new EK(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]= $ G(r)?r:new fq(r)}}else t( ` Expected a sequence for this tag ` );return e}function Uq(e,t,n){let{replacer:r}=n,i=new bq(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(dq(o,s,n))}return i}var Wq={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:Hq,createNode:Uq},Gq=class e extends bq{constructor(){super(),this.add=vq.prototype.add.bind(this),this.delete=vq.prototype.delete.bind(this),this.get=vq.prototype.get.bind(this),this.has=vq.prototype.has.bind(this),this.set=vq.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( $ G(e)?(r=xK(e.key, ` ` ,t),i=xK(e.value,r,t)):r=xK(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=Uq(e,t,n),i=new this;return i.items=r.items,i}};Gq.tag= ` tag : yaml . org , 2002 : omap ` ;var Kq={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:Gq,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=Hq(e,t),r=[];for(let{key:e}of n.items)eK(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new Gq,n)},createNode:(e,t,n)=>Gq.from(e,t,n)};function qq({value:e,source:t},n){return t&&(e?Jq:Yq).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Jq={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 EK(!0),stringify:qq},Yq={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 EK(!1),stringify:qq},Xq={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:Eq},Zq={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():Eq(e)}},Qq={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 EK(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:Eq}, $ q=e=>typeof e== ` bigint ` ||Number.isInteger(e);function eJ(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 tJ(e,t,n){let{value:r}=e;if( $ q(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return Eq(e)}var nJ={identify: $ q,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>eJ(e,2,2,n),stringify:e=>tJ(e,2, ` 0 b ` )},rJ={identify: $ q,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>eJ(e,1,8,n),stringify:e=>tJ(e,8, ` 0 ` )},iJ={identify: $ q,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>eJ(e,0,10,n),stringify:Eq},aJ={identify: $ q,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>eJ(e,2,16,n),stringify:e=>tJ(e,16, ` 0 x ` )},oJ=class e extends vq{constructor(t){super(t),this.tag=e.tag}add(e){let t;t= $ G(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new fq(e.key,null):new fq(e,null),_q(this.items,t.key)||this.items.push(t)}get(e,t){let n=_q(this.items,e);return!t&& $ G(n)?eK(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=_q(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new fq(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(P K(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(P K(a(t), ` ` )))}return n.join( `
` )+ `
` }var v J=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,K G,{value:V G});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 f K({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[K G]:{value:V G}});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=e K(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){y J(this.contents)&&this.contents.add(e)}addIn(e,t){y J(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=m K(this);e.anchor=!t||n.has(t)?h K(t|| ` a ` ,n):t}return new b K(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}=g K(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=E K(e,l,p);return o&& $ G (m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new l q(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return y J(this.contents)?this.contents.delete(e):!1}deleteIn(e){return O K(e)?this.contents!=null&&(this.contents=null,!0):y J(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return $ G (this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return O K(e)?!t&&ZG (this.contents)?this.contents.value:this.contents:$ G (this.contents)?this.contents.getIn(e,t):void 0}has(e){return $ G (this.contents)?this.contents.has(e):!1}hasIn(e){return O K(e)?this.contents!==void 0:$ G (this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=D K(this.schema,[e],t):y J(this.contents)&&this.contents.set(e,t)}setIn(e,t){O K(e)?this.contents=t:this.contents==null?this.contents=D K(this.schema,Array.from(e),t):y J(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 f K({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 f K({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 g J(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=v K(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 ` ?_ K(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(this,e)}};function y J(e){if( $ G (e))return!0;throw Error(` Expected a YAML collection as document contents ` )}var b J=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},x J=class extends b J{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},S J=class extends b J{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},C J=(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 w J(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 T J(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(T J(t.key)||T J(t.value))return!0}return!1;default:return!0}}function E J(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&T J(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function D J(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||ZG (e)&&ZG (t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var O J= ` All mapping items must start at the same column ` ;function k J({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??h q)(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=w J(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 ` ,O J)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||T J(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 ` ,O J);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&E J(r.indent,u,i),n.atKey=!1,D J(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=w J(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&&E J(r.indent,f,i),s=c.range[2];let l=new l q(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 l q(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 A J({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??_ q)(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=w J(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&&E J(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function j J(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 M J= ` Block collections are not allowed within flow collections ` ,N J=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function P J({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?h q:_ q))(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=w J(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&&T J(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];X G(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],N J(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,M J)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);N J(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,M J),n.atKey=!1;let _=w J(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?N J(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,M J):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new l q(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;D J(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new h q(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=j J(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 J(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?k J(e,t,n,r,a):n.type=== ` block - seq ` ?A J(e,t,n,r,a):P J(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 J(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===h q.tagName&&s=== ` map ` ||o===_ q.tagName&&s=== ` seq ` )return F J(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 J(e,t,n,i,o)}let l=F J(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=e K(u)?u:new C K(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function L J(e,t,n){let r=t.offset,i=R J(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?C K.BLOCK_FOLDED:C K.BLOCK_LITERAL,o=t.source?z J(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 x J=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Y G,{value:W G});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 h K({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Y G]:{value:W G}});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=r K(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){S J(this.contents)&&this.contents.add(e)}addIn(e,t){S J(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=_ K(this);e.anchor=!t||n.has(t)?v K(t|| ` a ` ,n):t}return new C K(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}=y K(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=k K(e,l,p);return o&&nK (m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new f q(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return S J(this.contents)?this.contents.delete(e):!1}deleteIn(e){return j K(e)?this.contents!=null&&(this.contents=null,!0):S J(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return nK (this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return j K(e)?!t&&eK (this.contents)?this.contents.value:this.contents:nK (this.contents)?this.contents.getIn(e,t):void 0}has(e){return nK (this.contents)?this.contents.has(e):!1}hasIn(e){return j K(e)?this.contents!==void 0:nK (this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=A K(this.schema,[e],t):S J(this.contents)&&this.contents.set(e,t)}setIn(e,t){j K(e)?this.contents=t:this.contents==null?this.contents=A K(this.schema,Array.from(e),t):S J(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 h K({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 h K({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 y J(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=x K(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 ` ?b K(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 b J(this,e)}};function S J(e){if(nK (e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var C J=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},w J=class extends C J{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},T J=class extends C J{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},E J=(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 D J(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 O J(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(O J(t.key)||O J(t.value))return!0}return!1;default:return!0}}function k J(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&O J(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function A J(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||eK (e)&&eK (t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var j J= ` All mapping items must start at the same column ` ;function M J({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??v q)(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=D J(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 ` ,j J)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||O J(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 ` ,j J);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&k J(r.indent,u,i),n.atKey=!1,A J(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=D J(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&&k J(r.indent,f,i),s=c.range[2];let l=new f q(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 f q(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 N J({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??b q)(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=D J(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&&k J(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function P J(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 F J= ` Block collections are not allowed within flow collections ` ,I J=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function L J({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?v q:b q))(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=D J(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&&O J(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]; $ G(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],I J(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,F J)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);I J(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,F J),n.atKey=!1;let _=D J(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?I J(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,F J):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new f q(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;A J(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new v q(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=P J(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 J(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?M J(e,t,n,r,a):n.type=== ` block - seq ` ?N J(e,t,n,r,a):L J(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function z J(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===v q.tagName&&s=== ` map ` ||o===b q.tagName&&s=== ` seq ` )return R J(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 J(e,t,n,i,o)}let l=R J(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=r K(u)?u:new E K(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function B J(e,t,n){let r=t.offset,i=V J(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?E K.BLOCK_FOLDED:E K.BLOCK_LITERAL,o=t.source?H J(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===C K.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 K.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ):t.length>c||r[0]=== ` ` ?(f=== ` ` ?f= `
` :!p&&f=== `
` &&(f= `
@@ -86,59 +86,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 R J({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 z J(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 B J(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=C K.PLAIN,c=V J(a,l);break;case ` single - quoted - scalar ` :s=C K.QUOTE_SINGLE,c=H J(a,l);break;case ` double - quoted - scalar ` :s=C K.QUOTE_DOUBLE,c=W J(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=j J(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function V J(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 } ` ) , UJ ( e ) } function HJ ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , UJ ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function UJ ( 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 V J({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 H J(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 U J(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 K.PLAIN,c=W J(a,l);break;case ` single - quoted - scalar ` :s=E K.QUOTE_SINGLE,c=G J(a,l);break;case ` double - quoted - scalar ` :s=E K.QUOTE_DOUBLE,c=q J(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=P J(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function W J(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 } ` ) , KJ ( e ) } function GJ ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , KJ ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function KJ ( 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 W J(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 q J(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}=G J(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=K J[i];if(a)n+=a;else if(i=== `
` ){let{fold:t,offset:i}=J J(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=Y J[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+=q J(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+=X J(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 G J(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 J J(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 K J={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function qJ ( 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 JJ ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? LJ ( e , t , r ) : BJ ( 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 [ WG ] : c ? YJ ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? XJ ( e , i , t , r ) : e . schema [ WG ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = ZG ( a ) ? a : new CK ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new CK ( 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 YJ ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ WG ] ; 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 [ WG ] ) } function XJ ( { 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 [ WG ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ WG ] ; 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 ZJ ( 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 QJ = { composeNode : $J , composeEmptyNode : eY } ; function $J ( 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 = tY ( 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 = JJ ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = IJ ( QJ , 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 ? ? = eY ( 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 && ( ! ZG ( 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 eY ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = JJ ( e , { type : ` scalar ` , offset : ZJ ( 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 tY ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new bK ( 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 = jJ ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function nY ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new vJ ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = wJ ( 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 ? $J ( c , i , l , o ) : eY ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = jJ ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function rY ( 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 iY ( 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 Y J={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function XJ ( 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 ZJ ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? BJ ( e , t , r ) : UJ ( 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 [ qG ] : c ? QJ ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? $J ( e , i , t , r ) : e . schema [ qG ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = eK ( a ) ? a : new EK ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new EK ( 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 QJ ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ qG ] ; 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 [ qG ] ) } function $J ( { 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 [ qG ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ qG ] ; 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 qee ( 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 eY = { composeNode : tY , composeEmptyNode : nY } ; function tY ( 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 = rY ( 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 = ZJ ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = zJ ( eY , 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 ? ? = nY ( 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 && ( ! eK ( 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 nY ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = ZJ ( e , { type : ` scalar ` , offset : qee ( 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 rY ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new CK ( 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 = PJ ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function iY ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new xJ ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = DJ ( 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 ? tY ( c , i , l , o ) : nY ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = PJ ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function aY ( 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 oY ( 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 a Y=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=r Y(e);r?this.warnings.push(new S J(i,t,n)):this.errors.push(new x J(i,t,n))},this.directives=new f K({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=i Y(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( $ G (i)&&!i.flow&&i.items.length>0){let e=i.items[0];X G(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:i Y(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=r Y(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 Y(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 x J(r Y(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 x J(r Y(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=j J(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 x J(r Y(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 v J(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 Y=Symbol( ` break visit ` ),s Y=Symbol( ` skip children ` ),c Y=Symbol( ` remove item ` );function l Y(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),u Y(Object.freeze([]),e,t)}l Y.BREAK=o Y,l Y.SKIP=s Y,l Y.REMOVE=c Y,l Y.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},l Y.parentCollection=(e,t)=>{let n=l Y.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 u Y(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=u Y(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===o Y)return o Y;else r===c Y&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function d Y(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 s Y=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=a Y(e);r?this.warnings.push(new T J(i,t,n)):this.errors.push(new w J(i,t,n))},this.directives=new h K({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=o Y(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(nK (i)&&!i.flow&&i.items.length>0){let e=i.items[0]; $ G(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:o Y(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=a Y(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=i Y(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 w J(a Y(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 w J(a Y(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=P J(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 w J(a Y(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 x J(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}}},c Y=Symbol( ` break visit ` ),l Y=Symbol( ` skip children ` ),u Y=Symbol( ` remove item ` );function d Y(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),f Y(Object.freeze([]),e,t)}d Y.BREAK=c Y,d Y.SKIP=l Y,d Y.REMOVE=u Y,d Y.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},d Y.parentCollection=(e,t)=>{let n=d Y.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 f Y(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=f Y(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===c Y)return c Y;else r===u Y&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function p Y(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 f Y(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var p Y=new Set( ` 0123456789 ABCDEFabcdef ` ),m Y=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , h Y = n e w S e t ( ` , [ ] { } ` ) , J e e = n e w S e t ( ` , [ ] { }
\ r ` ),g Y=e=>!e||Jee .has(e),_ Y=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 m Y(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var h Y=new Set( ` 0123456789 ABCDEFabcdef ` ),g Y=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , _ Y = n e w S e t ( ` , [ ] { } ` ) , v Y = n e w S e t ( ` , [ ] { }
\ r ` ),y Y=e=>!e||vY .has(e),b Y=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=== ` ... ` )&&f Y(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=== ` ... ` )&&f Y(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&&!f Y(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=== ` : ` )&&f Y(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(g Y), ` 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(`...`))&&f Y(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(g Y),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||f Y(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=== ` ... ` )&&m Y(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=== ` ... ` )&&m Y(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&&!m Y(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=== ` : ` )&&m Y(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(y Y), ` 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(`...`))&&m Y(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(y Y),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||m Y(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=>f Y(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=>m Y(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(f Y(r)||e&&h Y.has(r))break;t=n}else if(f Y(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(m Y(r)||e&&_ Y.has(r))break;t=n}else if(m Y(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` ?(n+=1,r= `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&h Y.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&h Y.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(g Y),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(f Y(n)||t&&h Y.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(;!f Y(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(m Y.has(t))t=this.buffer[++e];else if(t=== ` % ` &&p Y.has(this.buffer[e+1])&&p Y.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&&_ Y.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&_ Y.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(y Y),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(m Y(n)||t&&_ Y.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(;!m Y(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 Y.has(t))t=this.buffer[++e];else if(t=== ` % ` &&h Y.has(this.buffer[e+1])&&h Y.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)}},vY=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 yY(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function bY(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 xY(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 SY(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 CY(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 wY(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 TY(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!yY(t.start, ` explicit - key - ind ` )&&!yY(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,xY(t.value)?t.value.end?wY(t.value.end,t.sep):t.value.end=t.sep:wY(t.start,t.sep),delete t.sep)}var EY=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 _Y,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=dY(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 ` &&TY(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&&bY(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)}},xY=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 SY(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function CY(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 wY(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 TY(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 EY(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 DY(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 OY(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!SY(t.start, ` explicit - key - ind ` )&&!SY(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,wY(t.value)?t.value.end?DY(t.value.end,t.sep):t.value.end=t.sep:DY(t.start,t.sep),delete t.sep)}var kY=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 bY,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=pY(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 ` &&OY(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&&CY(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)){wY(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(yY(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=CY(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(yY(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(xY(t.key)&&!yY(t.sep, ` newline ` )){let e=CY(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]}):yY(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&&!yY(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)){wY(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||yY(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)){DY(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(SY(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=EY(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(SY(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(wY(t.key)&&!SY(t.sep, ` newline ` )){let e=EY(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]}):SY(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&&!SY(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)){DY(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||SY(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=CY(SY(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=CY(SY(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 DY(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new vY||null,prettyErrors:t}}function OY(e,t={}){let{lineCounter:n,prettyErrors:r}=DY(t),i=new EY(n?.addNewLine),a=new aY(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 xJ(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(CJ(e,n)),o.warnings.forEach(CJ(e,n))),o}function kY(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=OY(e,n);if(!i)return null;if(i.warnings.forEach(e=> $ K(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 AY(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 JG(e)&&!r?e.toString(n):new vJ(e,r,n).toString(n)}var jY=e=>typeof e== ` object ` &&!!e&&!Array.isArray(e),MY=e=>jY(e)?Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?t:[]]):[];function NY(e){if(jY(e)){if(jY(e.parallel))return{kind: ` parallel ` ,base:[ ` parallel ` ],branches:MY(e.parallel)};if(jY(e.switch))return{kind: ` switch ` ,base:[ ` switch ` , ` cases ` ],on:typeof e.switch.on== ` string ` ?e.switch.on: ` ` ,branches:MY(e.switch.cases)}}}function PY(e){return e.slice(2).includes( ` parallel ` )}function FY(e,t){let n=OY(e).getIn(t,!0);if(YG(n))return n.toJSON()}function IY(e,t,n){let r=OY(e);return r.setIn(t,r.createNode(qY(n))),r.toString()}function LY(e,t,n){let r=OY(e),i=t.slice(0,-1),a=PY(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(QG(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!QG(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 RY(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 zY(e,t){let n=e.getIn(t,!0),r=NY(YG(n)?n.toJSON():void 0),i=r?e.getIn([...t,...r.base],!0):void 0;if(!r||!YG(i))throw Error( ` This step has no branches . ` );return{kind:r.kind,branches:i}}function BY(e,t,n){let r=OY(e),{kind:i,branches:a}=zY(r,t);if(RY(n,i),a.has(n))throw Error( ` Branch $ { n } already exists . ` );return a.set(n,r.createNode([])),r.toString()}function VY(e,t,n,r){let i=OY(e),{kind:a,branches:o}=zY(i,t);if(RY(r,a),n!==r&&o.has(r))throw Error( ` Branch $ { r } already exists . ` );let s=o.items.find(e=>ZG(e.key)&&e.key.value===n);if(!s||!ZG(s.key))throw Error( ` Branch $ { n } does not exist . ` );return s.key.value=r,i.toString()}function HY(e,t,n){let r=OY(e),{kind:i,branches:a}=zY(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 cX(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(iX)].map(e=>e[1]))]}function lX(e){let t=OY(e).toJS(),n=aX(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=aX(e)?e:{},p=NY(d),m=p?.kind??(typeof d.type== ` string ` ?d.type: ` ` ),h=aX(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||rX(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\./ , ` ` ) } ` :oX(m,h),summary:sX(h),when:typeof d.when== ` string ` ?d.when:void 0,retry:aX(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 cX([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=NY(t);if(n){let{kind:i,base:a,branches:o}=n,c=p(t,String(e+1),0,u*eX,void 0,void 0,[ ` steps ` ,e]);m(l,c,[ ` steps ` ,e-1]),u++;let d=aX(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)*tX,y=(e,t,n)=>r.push({id:e,type: ` lane ` ,position:{x:t-12,y:u*eX-40},style:{width: ` 264 px ` ,height: ` $ { ( _ + 1 ) * eX - 24 } px ` },zIndex:-1,data:{kind: ` step ` ,key:n,title:n,type: ` ` ,detail: ` ` ,lane:i}}),b=(u+_)*eX;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)*eX,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*eX,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*eX-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 uX={class: ` truncate ` },dX= ` \ 0 ` ,fX=M({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)=>(F(),K(B(mf),{"model-value":e.modelValue=== ` ` &&e.options.some(e=>e.value=== ` ` )?dX:e.modelValue||void 0,disabled:e.disabled,"onUpdate:modelValue":r[0]||=e=>n( ` update : modelValue ` ,e===dX? ` ` :String(e))},{default:P(()=>[O(B(xf),W({size:e.size?? ` sm ` ,class:t. $ props.class},t. $ attrs),{default:P(()=>[O(B(Sf),{placeholder:e.placeholder},null,8,[ ` placeholder ` ])]),_:1},16,[ ` size ` , ` class ` ]),O(B(hf),{position: ` popper ` ,class: ` max - w - [ min ( var ( -- reka - select - content - available - width ) , 20 rem ) ] ` },{default:P(()=>[(F(!0),k(H,null,A(e.options,e=>(F(),K(B(vf),{key:e.value,value:e.value=== ` ` ?dX:e.value,disabled:e.disabled,title:e.label,class: ` * : [ span ] : last : min - w - 0 ` },{default:P(()=>[I( ` span ` ,uX,z(e.label),1)]),_:2},1032,[ ` value ` , ` disabled ` , ` title ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` , ` disabled ` ]))}}),pX=M({__name: ` WorkflowPicker ` ,props:{value:{},workflows:{},label:{},class:{}},emits:[ ` pick ` ],setup(e,{emit:t}){let n=t;return(t,r)=>(F(),K(B(mf),{"model-value":e.value||void 0,"onUpdate:modelValue":r[0]||=e=>n( ` pick ` ,String(e))},{default:P(()=>[O(B(xf),{"aria-label":e.label,class:R(t. $ props.class)},{default:P(()=>[O(B(Sf),{placeholder: ` Choose workflow ` })]),_:1},8,[ ` aria - label ` , ` class ` ]),O(B(hf),null,{default:P(()=>[e.value&&!e.workflows.some(t=>t.id===e.value)?(F(),K(B(vf),{key:0,value:e.value,disabled: ` ` },{default:P(()=>[V(z(e.value)+ ` ( unavailable ) ` ,1)]),_:1},8,[ ` value ` ])):N( ` ` ,!0),(F(!0),k(H,null,A(e.workflows,e=>(F(),K(B(vf),{key:e.id,value:e.id},{default:P(()=>[V(z(e.id),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ]))}});function mX(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function hX(e,t=[]){let n=OY(e),r=n.er
Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:D X(e)}))}var T X=/^( \s *)(- \s +)?/,E X=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function D X(e){let{code:t,comment:n}=O X(e),r=k X(t);return n&&r.push({text:n,kind: ` comment ` }),r}function O X(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 k X(e){if(!e)return[];let t=[],n=T X.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=E X.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,...A X(i[4]??``)]):[...t,...A X(r)]}function A X(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 jX ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function MX(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function NX(e){return typeof e== ` string ` &&e.trim()!== ` ` }var PX={class: ` space - y - 4 px - 3 py - 3 ` },FX={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },IX={key:1,class: ` space - y - 3 ` },LX={key:0,class: ` block space - y - 1.5 ` },RX=[ ` id ` ],zX=[ ` value ` ],BX={class: ` text - xs font - medium text - fg - muted ` },VX={class: ` flex items - center gap - 2 ` },HX={key:1,role: ` alert ` ,class: ` text - xs text - danger ` },UX={key:2,class: ` space - y - 1.5 ` },WX=[ ` title ` ],GX={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },KX={key:0,class: ` divide - y divide - border rounded - md border border - border ` },qX=[ ` title ` ],JX={key:0,class: ` space - y - 3 ` },YX={class: ` text - [ 13 px ] ` },XX={key:0,class: ` text - danger ` },ZX={class: ` ml - 2 text - xs text - fg - subtle ` },QX={key:1,class: ` space - y - 3 ` }, $ X={class: ` text - [ 13 px ] ` },eZ={class: ` ml - 2 text - xs text - fg - subtle ` },tZ=[ ` title ` ],nZ={key:0,class: ` text - xs text - danger ` },rZ={class: ` space - y - 1.5 ` },iZ={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },aZ={class: ` divide - y divide - border rounded - md border border - border ` },oZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },sZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },cZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },lZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },uZ=[ ` for ` ],dZ=M({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=Oe(),r=e,i=t,a=J(()=>FY(r.yaml,r.path)??{}),o=J(()=>NY(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 ` ,IY(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 ` ?BY(r.yaml,r.path,t):e=== ` rename ` ?VY(r.yaml,r.path,t,n):HY(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(()=>KY(r.yaml,r.path)),_=J(()=>bX(a.value)),v=J(()=>m.value?.settings&&a.value.settings?SX(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 T(e){let{id:t,type:n,...a}=e;i( ` update : yaml ` ,IY(r.yaml,r.path,{id:t,type:n,...a}))}function ee(e,t){T({...a.value,[e]:t})}function E(e){let t={...a.value.retry,...e};ee( ` 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,T({...a.value,settings:n})}function te(e,t){let n={...h.value,[e]:t};s.value=== ` workflow . call ` &&t!==h.value[e]&&(delete n.inputs,delete n.outputs),T({...a.value,settings:n})}let ne=J(()=>r.workflows.find(e=>e.id===h.value.workflow)),re=J(()=>Object.entries(JY(ne.value?.yaml?? ` ` , ` inputs ` )??{})),ie=J(()=>Object.entries(JY(ne.value?.yaml?? ` ` , ` outputs ` )??{})),oe=J(()=>Object.entries(JY(r.yaml, ` inputs ` )??{})),se=J(()=>Object.entries(JY(r.yaml, ` outputs ` )??{})),ce=J(()=>h.value.inputs??{}),le=J(()=>h.value.outputs??{}),ue=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),de=e=>[ ` object ` , ` array ` ].includes(e.type?? ` ` ),fe=e=>ce.value[e]===void 0? ` ` :String(ce.value[e]);function pe(e,t,n){D( ` inputs ` ,{...ce.value,[e]:t=== ` ` ?void 0:ue(t)?t:db(t,n?? ` string ` )})}let me=(e,t,n)=>e.filter(([,e])=>e.type===t.type||e.type=== ` any ` ||t.type=== ` any ` ).map(([e])=>({value: ` $ { n } . $ { e } ` ,label:e})),he=q(null);function ge(e){let t=he.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 _e=q({});function ve(e,t){try{D(e,t.trim()?kY(t):void 0),_e.value={..._e.value,[e]: ` ` }}catch(t){_e.value={..._e.value,[e]:String(t.
Line truncated
` )[0]}}}let ye=e=>e===void 0? ` ` :AY(e).trimEnd(),be=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),xe=e=>typeof h.value[e]== ` string ` ?h.value[e]: ` ` ,Se=[{value: ` ` ,label: ` Park the task ` },{value: ` continue ` ,label: ` Continue ` }];return(t,r)=>(F(),k( ` div ` ,PX,[v.value?(F(),k( ` p ` ,FX,z(v.value),1)):N( ` ` ,!0),o.value?(F(),k( ` section ` ,IX,[s.value=== ` switch ` ?(F(),k( ` label ` ,LX,[r[15]||=I( ` 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),O(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 ` ]),I( ` datalist ` ,{id: ` $ { B ( n ) } - switch - on ` },[(F(!0),k(H,null,A(g.value,e=>(F(),k( ` option ` ,{key:e,value: ` steps . $ { e } . result . ` },null,8,zX))),128))],8,RX)])):N( ` ` ,!0),I( ` div ` ,BX,z(s.value=== ` switch ` ? ` Cases ` : ` Branches ` ),1),(F(!0),k(H,null,A(c.value,e=>(F(),k( ` div ` ,{key:e,class: ` flex items - center gap - 2 ` },[O(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 ` ]),O(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:P(()=>[O(B(td))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),I( ` div ` ,VX,[O(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]||=_t(pt(e=>p( ` add ` ,d.value.trim()),[ ` prevent ` ]),[ ` enter ` ])},null,8,[ ` modelValue ` , ` aria - label ` , ` placeholder ` ]),O(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:P(()=>[O(B(Iu))]),_:1},8,[ ` aria - label ` , ` disabled ` ])]),f.value?(F(),k( ` p ` ,HX,z(f.value),1)):N( ` ` ,!0)])):N( ` ` ,!0),S.value.lead?(F(),k( ` section ` ,UX,[I( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - fg - muted ` ,title:S.value.lead.schema.description},[V(z(be(S.value.lead.key,S.value.lead.schema))+ ` ` ,1),S.value.lead.schema.description?(F(),K(B(su),{key:0,class: ` size - 3 text - fg - subtle ` })):N( ` ` ,!0)],8,WX),S.value.lead.kind=== ` workflow ` ?(F(),K(pX,{key:0,value:xe(S.value.lead.key),workflows:e.workflows,label:be(S.value.lead.key,S.value.lead.schema),onPick:r[4]||=e=>te(S.value.lead.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` ])):S.value.lead.kind=== ` select ` ?(F(),K(fX,{key:1,class: ` w - full ` ,"model-value":xe(S.value.lead.key),options:w(S.value.lead.options),"aria-label":be(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 ` ?(F(),K(B(Rf),{key:2,"model-value":xe(S.value.lead.key),class: ` min - h - 32 text - [ 13 px ] leading - relaxed ` ,onFocus:r[6]||=e=>he.value=S.value.lead.key,"onUpdate:modelValue":r[7]||=e=>D(S.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(F(),K(B(Z),{key:3,"model-value":xe(S.value.lead.key),onFocus:r[8]||=e=>he.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 ` ?(F(),k( ` div ` ,GX,[r[16]||=I( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(F(!0),k(H,null,A(g.value,e=>(F(),K(B(Y),{key:e,type: ` button ` ,variant: ` outline ` ,size: ` xs ` ,class: ` font - mono ` ,title: ` { { steps . $ { e } . summary } } ` ,onClick:t=>ge(e)},{default:P(()=>[V(z(e),1)]),_:2},1032,[ ` title ` , ` onClick ` ]))),128))])):N( ` ` ,!0)])):N( ` ` ,!0),O(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:P(()=>[O(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?(F(),k(H,{key:3},[S.value.compact.length?(F(),k( ` section ` ,KX,[(F(!0),k(H,null,A(S.value.compact,t=>(F(),k( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[I( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:t.schema.description},[V(z(be(t.key,t.schema))+ ` ` ,1),t.schema.description?(F(),K(B(su),{key:0,class: ` size - 3 text - fg - subtle ` })):N( ` ` ,!0)],8,qX),t.kind=== ` workflow ` ?(F(),K(pX,{key:0,class: ` max - w - 48 ` ,value:xe(t.key),workflows:e.workflows,label:be(t.key,t.schema),onPick:e=>te(t.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` , ` onPick ` ])):t.kind=== ` boolean ` ?(F(),K(B( $ g),{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 ` ?(F(),K(fX,{key:2,class: ` w - 40 ` ,"model-value":xe(t.key),options:w(t.options),"aria-label":be(t.key,t.schema),"onUpdate:modelValue":
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=EY(TY(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=EY(TY(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 AY(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new xY||null,prettyErrors:t}}function jY(e,t={}){let{lineCounter:n,prettyErrors:r}=AY(t),i=new kY(n?.addNewLine),a=new sY(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 wJ(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(EJ(e,n)),o.warnings.forEach(EJ(e,n))),o}function MY(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=jY(e,n);if(!i)return null;if(i.warnings.forEach(e=>nq(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 NY(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 ZG(e)&&!r?e.toString(n):new xJ(e,r,n).toString(n)}var PY=e=>typeof e== ` object ` &&!!e&&!Array.isArray(e),FY=e=>PY(e)?Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?t:[]]):[];function IY(e){if(PY(e)){if(PY(e.parallel))return{kind: ` parallel ` ,base:[ ` parallel ` ],branches:FY(e.parallel)};if(PY(e.switch))return{kind: ` switch ` ,base:[ ` switch ` , ` cases ` ],on:typeof e.switch.on== ` string ` ?e.switch.on: ` ` ,branches:FY(e.switch.cases)}}}function LY(e){return e.slice(2).includes( ` parallel ` )}function RY(e,t){let n=jY(e).getIn(t,!0);if(QG(n))return n.toJSON()}function zY(e,t,n){let r=jY(e);return r.setIn(t,r.createNode(ZY(n))),r.toString()}function BY(e,t,n){let r=jY(e),i=t.slice(0,-1),a=LY(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(tK(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!tK(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 VY(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 HY(e,t){let n=e.getIn(t,!0),r=IY(QG(n)?n.toJSON():void 0),i=r?e.getIn([...t,...r.base],!0):void 0;if(!r||!QG(i))throw Error( ` This step has no branches . ` );return{kind:r.kind,branches:i}}function UY(e,t,n){let r=jY(e),{kind:i,branches:a}=HY(r,t);if(VY(n,i),a.has(n))throw Error( ` Branch $ { n } already exists . ` );return a.set(n,r.createNode([])),r.toString()}function WY(e,t,n,r){let i=jY(e),{kind:a,branches:o}=HY(i,t);if(VY(r,a),n!==r&&o.has(r))throw Error( ` Branch $ { r } already exists . ` );let s=o.items.find(e=>eK(e.key)&&e.key.value===n);if(!s||!eK(s.key))throw Error( ` Branch $ { n } does not exist . ` );return s.key.value=r,i.toString()}function GY(e,t,n){let r=jY(e),{kind:i,branches:a}=HY(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 fX(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(cX)].map(e=>e[1]))]}function pX(e){let t=jY(e).toJS(),n=lX(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=lX(e)?e:{},p=IY(d),m=p?.kind??(typeof d.type== ` string ` ?d.type: ` ` ),h=lX(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||sX(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\./ , ` ` ) } ` :uX(m,h),summary:dX(h),when:typeof d.when== ` string ` ?d.when:void 0,retry:lX(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 fX([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=IY(t);if(n){let{kind:i,base:a,branches:o}=n,c=p(t,String(e+1),0,u*iX,void 0,void 0,[ ` steps ` ,e]);m(l,c,[ ` steps ` ,e-1]),u++;let d=lX(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)*aX,y=(e,t,n)=>r.push({id:e,type: ` lane ` ,position:{x:t-12,y:u*iX-40},style:{width: ` 264 px ` ,height: ` $ { ( _ + 1 ) * iX - 24 } px ` },zIndex:-1,data:{kind: ` step ` ,key:n,title:n,type: ` ` ,detail: ` ` ,lane:i}}),b=(u+_)*iX;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)*iX,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*iX,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*iX-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 mX={class: ` truncate ` },hX= ` \ 0 ` ,gX=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(Tf),{"model-value":e.modelValue=== ` ` &&e.options.some(e=>e.value=== ` ` )?hX:e.modelValue||void 0,disabled:e.disabled,"onUpdate:modelValue":r[0]||=e=>n( ` update : modelValue ` ,e===hX? ` ` :String(e))},{default:F(()=>[k(B(Mf),W({size:e.size?? ` sm ` ,class:t. $ props.class},t. $ attrs),{default:F(()=>[k(B(Nf),{placeholder:e.placeholder},null,8,[ ` placeholder ` ])]),_:1},16,[ ` size ` , ` class ` ]),k(B(Ef),{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(kf),{key:e.value,value:e.value=== ` ` ?hX:e.value,disabled:e.disabled,title:e.label,class: ` * : [ span ] : last : min - w - 0 ` },{default:F(()=>[L( ` span ` ,mX,z(e.label),1)]),_:2},1032,[ ` value ` , ` disabled ` , ` title ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` , ` disabled ` ]))}}),_X=[ ` id ` ],vX=[ ` value ` ],yX=N({__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?(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,vX))),128))],8,_X)],64)):(I(),K(B(Tf),{key:1,"model-value":e.value||void 0,"onUpdate:modelValue":i[1]||=e=>r( ` pick ` ,String(e))},{default:F(()=>[k(B(Mf),{"aria-label":e.label,class:R(t. $ props.class)},{default:F(()=>[k(B(Nf),{placeholder: ` Choose workflow ` })]),_:1},8,[ ` aria - label ` , ` class ` ]),k(B(Ef),null,{default:F(()=>[e.value&
Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:N X(e)}))}var j X=/^( \s *)(- \s +)?/,M X=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function N X(e){let{code:t,comment:n}=P X(e),r=F X(t);return n&&r.push({text:n,kind: ` comment ` }),r}function P X(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 F X(e){if(!e)return[];let t=[],n=j X.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=M X.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,...I X(i[4]??``)]):[...t,...I X(r)]}function I X(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 LX ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function RX(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function zX(e){return typeof e== ` string ` &&e.trim()!== ` ` }var BX={class: ` space - y - 4 px - 3 py - 3 ` },VX={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },HX={key:1,class: ` space - y - 3 ` },UX={key:0,class: ` block space - y - 1.5 ` },WX=[ ` id ` ],GX=[ ` value ` ],KX={class: ` text - xs font - medium text - fg - muted ` },qX={class: ` flex items - center gap - 2 ` },JX={key:1,role: ` alert ` ,class: ` text - xs text - danger ` },YX={key:2,class: ` space - y - 1.5 ` },XX=[ ` title ` ],ZX={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },QX={key:0,class: ` divide - y divide - border rounded - md border border - border ` }, $ X=[ ` title ` ],eZ={key:0,class: ` space - y - 3 ` },tZ={class: ` text - [ 13 px ] ` },nZ={key:0,class: ` text - danger ` },rZ={class: ` ml - 2 text - xs text - fg - subtle ` },iZ={key:1,class: ` space - y - 3 ` },aZ={class: ` text - [ 13 px ] ` },oZ={class: ` ml - 2 text - xs text - fg - subtle ` },sZ=[ ` title ` ],cZ={key:0,class: ` text - xs text - danger ` },lZ={class: ` space - y - 1.5 ` },uZ={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },dZ={class: ` divide - y divide - border rounded - md border border - border ` },fZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },pZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },mZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },hZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },gZ=[ ` for ` ],_Z=N({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=De(),r=e,i=t,a=J(()=>RY(r.yaml,r.path)??{}),o=J(()=>IY(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 ` ,zY(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 ` ?UY(r.yaml,r.path,t):e=== ` rename ` ?WY(r.yaml,r.path,t,n):GY(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(()=>XY(r.yaml,r.path)),_=J(()=>EX(a.value)),v=J(()=>m.value?.settings&&a.value.settings?OX(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 T(e){let{id:t,type:n,...a}=e;i( ` update : yaml ` ,zY(r.yaml,r.path,{id:t,type:n,...a}))}function ee(e,t){T({...a.value,[e]:t})}function E(e){let t={...a.value.retry,...e};ee( ` 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,T({...a.value,settings:n})}function te(e,t){let n={...h.value,[e]:t};s.value=== ` workflow . call ` &&t!==h.value[e]&&(delete n.inputs,delete n.outputs),T({...a.value,settings:n})}let ne=J(()=>r.workflows.find(e=>e.id===h.value.workflow)),re=J(()=>Object.entries(QY(ne.value?.yaml?? ` ` , ` inputs ` )??{})),ie=J(()=>Object.entries(QY(ne.value?.yaml?? ` ` , ` outputs ` )??{})),oe=J(()=>Object.entries(QY(r.yaml, ` inputs ` )??{})),se=J(()=>Object.entries(QY(r.yaml, ` outputs ` )??{})),ce=J(()=>h.value.inputs??{}),le=J(()=>h.value.outputs??{}),ue=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),O=e=>[ ` object ` , ` array ` ].includes(e.type?? ` ` ),de=e=>ce.value[e]===void 0? ` ` :String(ce.value[e]);function fe(e,t,n){D( ` inputs ` ,{...ce.value,[e]:t=== ` ` ?void 0:ue(t)?t:ub(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 } } ` ;D(t,n? ` $ { n . trimEnd ( ) } $ { r } ` :r)}let ge=q({});function _e(e,t){try{D(e,t.trim()?MY(t):void 0),ge.value={...ge.value,[e]: ` ` }}catch(t){ge.value={...ge.value,[e]:String(t.m
Line truncated
` )[0]}}}let ve=e=>e===void 0? ` ` :NY(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 ` ,BX,[v.value?(I(),A( ` p ` ,VX,z(v.value),1)):P( ` ` ,!0),o.value?(I(),A( ` section ` ,HX,[s.value=== ` switch ` ?(I(),A( ` label ` ,UX,[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,GX))),128))],8,WX)])):P( ` ` ,!0),L( ` div ` ,KX,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(fd))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),L( ` div ` ,qX,[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]||=_t(pt(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(qu))]),_:1},8,[ ` aria - label ` , ` disabled ` ])]),f.value?(I(),A( ` p ` ,JX,z(f.value),1)):P( ` ` ,!0)])):P( ` ` ,!0),S.value.lead?(I(),A( ` section ` ,YX,[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(vu),{key:0,class: ` size - 3 text - fg - subtle ` })):P( ` ` ,!0)],8,XX),S.value.lead.kind=== ` workflow ` ?(I(),K(yX,{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=>te(S.value.lead.key,e)},null,8,[ ` editable ` , ` value ` , ` workflows ` , ` label ` ])):S.value.lead.kind=== ` select ` ?(I(),K(gX,{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=>D(S.value.lead.key,e||void 0)},null,8,[ ` model - value ` , ` options ` , ` aria - label ` ])):S.value.lead.kind=== ` text ` ?(I(),K(B(Yf),{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=>D(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=>D(S.value.lead.key,String(e))},null,8,[ ` model - value ` ])),g.value.length&&S.value.lead.kind!== ` select ` ?(I(),A( ` div ` ,ZX,[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 ` ,QX,[(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(vu),{key:0,class: ` size - 3 text - fg - subtle ` })):P( ` ` ,!0)],8, $ X),t.kind=== ` workflow ` ?(I(),K(yX,{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=>te(t.key,e)},null,8,[ ` editable ` , ` value ` , ` workflows ` , ` label ` , ` onPick ` ])):t.kind=== ` boolean ` ?(I(),K(B(o_),{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 ` ?(I(),K(gX,{key:2,class: ` w - 40 ` ,"model-
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 ` ])):(F(),k(H,{key:2},[O(B(Rf),{"model-value":ye(h.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>ve(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),_e.value[e.key]?(F(),k( ` span ` ,nZ,z(_e.value[e.key]),1)):N( ` ` ,!0)],64))]))),128)),I( ` section ` ,rZ,[_.value?(F(),k( ` p ` ,iZ,z(_.value),1)):N( ` ` ,!0),I( ` div ` ,aZ,[I( ` label ` ,oZ,[r[20]||=I( ` 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),O(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=>ee( ` when ` ,String(e))},null,8,[ ` aria - invalid ` , ` model - value ` ])]),I( ` label ` ,sZ,[r[21]||=I( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),O(fX,{class: ` w - 36 ` ,"aria-label": ` If it fails ` ,"model-value":a.value.on_failure?? ` ` ,options:Se,"onUpdate:modelValue":r[12]||=e=>ee( ` on _failure ` ,e||void 0)},null,8,[ ` model - value ` ])]),I( ` label ` ,cZ,[r[22]||=I( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),O(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=>E({attempts:String(e)=== ` ` ?void 0:Number(String(e))})},null,8,[ ` model - value ` ])]),I( ` div ` ,lZ,[I( ` label ` ,{for: ` $ { B ( n ) } - backoff ` ,class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,8,uZ),O(B(Hg),{id: ` $ { B ( 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)):N( ` ` ,!0)]))}}),fZ={class: ` space - y - 1.5 ` },pZ={class: ` flex items - center text - xs font - medium text - fg - muted ` },mZ={key:0,class: ` divide - y divide - border rounded - md border border - border ` },hZ=M({__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(JY(n.yaml,n.field)??{}));function o(e){r( ` update : yaml ` ,YY(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)=>(F(),k( ` section ` ,fZ,[I( ` div ` ,pZ,[V(z(e.field=== ` inputs ` ? ` Inputs ` : ` Outputs ` )+ ` ` ,1),O(B(Y),{type: ` button ` ,variant: ` ghost ` ,size: ` xs ` ,class: ` ml - auto ` ,onClick:c},{default:P(()=>[O(B(Iu),{"data-icon": ` inline - start ` }),n[0]||=V( ` Add ` ,-1)]),_:1})]),a.value.length?(F(),k( ` div ` ,mZ,[(F(!0),k(H,null,A(a.value,([t,n],r)=>(F(),k( ` div ` ,{key:r,class: ` flex items - center gap - 2 px - 2 py - 1.5 ` },[O(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 ` ]),O(fX,{"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 ` ]),O(B( $ g),{"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 ` ]),O(B(Y),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - xs ` ,"aria-label": ` Remove $ { t } ` ,onClick:e=>o(a.value.filter((e,t)=>t!==r))},{default:P(()=>[O(B(td))]),_:1},8,[ ` aria - label ` , ` onClick ` ])]))),128))])):N( ` ` ,!0)]))}}),gZ={class: ` space - y - 4 px - 3 py - 3 ` },_Z={class: ` divide - y divide - border rounded - md border border - border ` },vZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },yZ={key:0,role: ` alert ` ,class: ` px - 3 py - 2 text - xs text - danger ` },bZ={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },xZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },SZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },CZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },wZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },TZ={class: ` space - y - 1.5 ` },EZ= ` 6 f129e29 - 0e26 - 5246 - 99 bd - 74 cb4496203b ` ,DZ=M({__name: ` WorkflowSettings ` ,props:{yaml:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=e,r=t,i=e=>{let t=JY(n.yaml,e);return typeof t== ` string ` ?t: ` ` };function a(e,t){r( ` update : yaml ` ,YY(n.yaml,e,t))}let o=Dv(),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===EZ)&&a( ` identity ` ,EZ)}catch(e){l.value=String(e.message||e)}finally{c.value=!1}}L(u);let d=J(()=>{let e=i( ` identity ` ),t=s.value.map(e=>({value:e.id,label:e.display_name}));return e&&!s.value.some(t=>t.id===e)?[{value:e,label: ` $ { e } ( unknown ) ` ,disabled:!0},...t]:t}),f=Dg(),p=J(()=>{let e=Object.keys(f.stateFor( ` agent - profiles ` ).re
Line truncated
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(I(),A(H,{key:2},[k(B(Yf),{"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 ` ,cZ,z(ge.value[e.key]),1)):P( ` ` ,!0)],64))]))),128)),L( ` section ` ,lZ,[_.value?(I(),A( ` p ` ,uZ,z(_.value),1)):P( ` ` ,!0),L( ` div ` ,dZ,[L( ` label ` ,fZ,[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=>ee( ` when ` ,String(e))},null,8,[ ` aria - invalid ` , ` model - value ` ])]),L( ` label ` ,pZ,[r[21]||=L( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),k(gX,{class: ` w - 36 ` ,"aria-label": ` If it fails ` ,"model-value":a.value.on_failure?? ` ` ,options:xe,"onUpdate:modelValue":r[12]||=e=>ee( ` on _failure ` ,e||void 0)},null,8,[ ` model - value ` ])]),L( ` label ` ,mZ,[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=>E({attempts:String(e)=== ` ` ?void 0:Number(String(e))})},null,8,[ ` model - value ` ])]),L( ` div ` ,hZ,[L( ` label ` ,{for: ` $ { B ( n ) } - backoff ` ,class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,8,gZ),k(B(Yg),{id: ` $ { B ( 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)):P( ` ` ,!0)]))}}),vZ={class: ` space - y - 1.5 ` },yZ={class: ` flex items - center text - xs font - medium text - fg - muted ` },bZ={key:0,class: ` divide - y divide - border rounded - md border border - border ` },xZ=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(QY(n.yaml,n.field)??{}));function o(e){r( ` update : yaml ` , $ Y(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 ` ,vZ,[L( ` div ` ,yZ,[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(qu),{"data-icon": ` inline - start ` }),n[0]||=V( ` Add ` ,-1)]),_:1})]),a.value.length?(I(),A( ` div ` ,bZ,[(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(gX,{"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(o_),{"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(fd))]),_:1},8,[ ` aria - label ` , ` onClick ` ])]))),128))])):P( ` ` ,!0)]))}}),SZ={class: ` space - y - 4 px - 3 py - 3 ` },CZ={class: ` divide - y divide - border rounded - md border border - border ` },wZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },TZ={key:0,role: ` alert ` ,class: ` px - 3 py - 2 text - xs text - danger ` },EZ={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },DZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },OZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },kZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },AZ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },jZ={class: ` space - y - 1.5 ` },MZ= ` 6 f129e29 - 0e26 - 5246 - 99 bd - 74 cb4496203b ` ,NZ=N({__name: ` WorkflowSettings ` ,props:{yaml:{}},emits:[ ` update : yaml ` ],setup(e,{emit:t}){let n=e,r=t,i=e=>{let t=QY(n.yaml,e);return typeof t== ` string ` ?t: ` ` };function a(e,t){r( ` update : yaml ` , $ Y(n.yaml,e,t))}let o=Ev(),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===MZ)&&a( ` identity ` ,MZ)}catch(e){l.value=String(e.message||e)}finally{c.value=!1}}Ue(u);let d=J(()=>{let e=i( ` identity ` ),t=s.value.map(e=>({value:e.id,label:e.display_name}));return e&&!s.value.some(t=>t.id===e)?[{value:e,label: ` $ { e } ( unknown ) ` ,disabled:!0},...t]:t}),f=Pg(),p=J(()=>{let e=Object.keys(f.stateFor( ` agent - profiles ` ).r
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 Z3(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=Q3(n.code,e);return Array.isArray(e)?e.some(e=>X3(n[r],e,t,n.type=== ` keyup ` )):X3(n[r],e,t,n.type=== ` keyup ` )}}function Q3(e,t){return t.includes(e)? ` code ` : ` key ` }function $ 3(e,t){let n=J(()=>Je(t?.target)??q3),r=ot(Je(e)===!0),i=!1,a=new Set,o=c(Je(e));j(()=>Je(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),GQ([ ` blur ` , ` contextmenu ` ],s),qQ((...e)=>o(...e),e=>{let n=Je(t?.actInsideInputWithModifier)??!0,a=Je(t?.preventDefault)??!1;if(i=Y3(e),(!i||i&&!n)&&J3(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}),qQ((...e)=>o(...e),e=>{let n=Je(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&J3(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 ` ?Z3(e,a):e}return r}var e6= ` vue - flow _ _node - desc ` ,t6= ` vue - flow _ _edge - desc ` ,n6= ` vue - flow _ _aria - live ` ,r6=[ ` Enter ` , ` ` , ` Escape ` ],i6={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function a6(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function o6(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 s6(e){return{width:e.offsetWidth,height:e.offsetHeight}}function c6(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function l6(e,t){return{x:c6(e.x,t[0][0],t[1][0]),y:c6(e.y,t[0][1],t[1][1])}}function u6(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function d6(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function f6(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!d6(e)}function p6(e){return f6(e)&& ` computedPosition ` in e}function m6(e){return!Number.isNaN(e)&&Number.isFinite(e)}function h6(e){return m6(e.width)&&m6(e.height)&&m6(e.x)&&m6(e.y)}function g6(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:N8(e.data)?e.data:{},events:Ge(N8(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function _6(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:N8(e.data)?e.data:{},events:Ge(N8(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function v6(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 y6(...e){if(e.length===3){let[t,n,r]=e;return v6(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>d6(e)&&e.source===r).map(e=>n.find(t=>f6(t)&&t.id===e.target))}function b6(...e){if(e.length===3){let[t,n,r]=e;return v6(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>d6(e)&&e.target===r).map(e=>n.find(t=>f6(t)&&t.id===e.source))}function x6({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function S6(e,t){return t.some(t=>d6(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 C6({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function w6({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?g8(s,o):s}function T6(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 E6({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function D6({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function O6(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=T6(t,E6({...r.computedPosition,...r.dimensions}))}return D6(t)}function k6(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...w6(t,n),width:t.width/n.zoom,height:t.height/n.zoom},o=[];for(let t of e){let{dimensions:e,selectable:n=!0,hidden:s=
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 t6(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=n6(n.code,e);return Array.isArray(e)?e.some(e=>e6(n[r],e,t,n.type=== ` keyup ` )):e6(n[r],e,t,n.type=== ` keyup ` )}}function n6(e,t){return t.includes(e)? ` code ` : ` key ` }function r6(e,t){let n=J(()=>Je(t?.target)??Z3),r=ot(Je(e)===!0),i=!1,a=new Set,o=c(Je(e));M(()=>Je(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),XQ([ ` blur ` , ` contextmenu ` ],s),QQ((...e)=>o(...e),e=>{let n=Je(t?.actInsideInputWithModifier)??!0,a=Je(t?.preventDefault)??!1;if(i= $ 3(e),(!i||i&&!n)&&Q3(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}),QQ((...e)=>o(...e),e=>{let n=Je(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&Q3(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 ` ?t6(e,a):e}return r}var i6= ` vue - flow _ _node - desc ` ,a6= ` vue - flow _ _edge - desc ` ,o6= ` vue - flow _ _aria - live ` ,s6=[ ` Enter ` , ` ` , ` Escape ` ],c6={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function l6(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function u6(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 d6(e){return{width:e.offsetWidth,height:e.offsetHeight}}function f6(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function p6(e,t){return{x:f6(e.x,t[0][0],t[1][0]),y:f6(e.y,t[0][1],t[1][1])}}function m6(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function h6(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function g6(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!h6(e)}function _6(e){return g6(e)&& ` computedPosition ` in e}function v6(e){return!Number.isNaN(e)&&Number.isFinite(e)}function y6(e){return v6(e.width)&&v6(e.height)&&v6(e.x)&&v6(e.y)}function b6(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:L8(e.data)?e.data:{},events:Ge(L8(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function x6(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:L8(e.data)?e.data:{},events:Ge(L8(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function S6(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 C6(...e){if(e.length===3){let[t,n,r]=e;return S6(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>h6(e)&&e.source===r).map(e=>n.find(t=>g6(t)&&t.id===e.target))}function w6(...e){if(e.length===3){let[t,n,r]=e;return S6(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>h6(e)&&e.target===r).map(e=>n.find(t=>g6(t)&&t.id===e.source))}function T6({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function E6(e,t){return t.some(t=>h6(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 D6({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function O6({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?b8(s,o):s}function k6(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 A6({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function j6({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function M6(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=k6(t,A6({...r.computedPosition,...r.dimensions}))}return j6(t)}function N6(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...O6(t,n),width:t.width/n.zoom,height:t.height/n.zoom},o=[];for(let t of e){let{dimensions:e,selectable:n=!0,hidden:s=
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 }
@@ -158,10 +158,10 @@ 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 ` },u8=class extends Error{constructor(e,...t){super(l8[e]?.call(l8,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function d8(e){return ` clientX ` in e}function f8(e){return ` sourceEvent ` in e}function p8(e,t){let n=d8(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 m8=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function h8(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function g8(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var _8=()=>!0;function v8(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function y8(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())o6(i,a6(e))>0&&r.push(e);return r}var b8=250;function x8(e,t,n,r){let i=[],a=1/0,o=y8(e,n,t+b8);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}=i8(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 S8(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=_8},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:_}=p8(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=C8(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===H3.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=E8(t,e,a,p,n,!0)}return b}function C8(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function w8(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function T8(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function E8(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===H3.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,...i8(o,c,c.position,!0)}:c}var D8={[z3.Left]:z3.Right,[z3.Right]:z3.Left,[z3.Top]:z3.Bottom,[z3.Bottom]:z3.Top},O8=[ ` production ` , ` prod ` ];function k8(e,...t){A8()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function A8(){return!O8.includes( ` production ` )}function j8(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,...s6(t)}}):null}function M8(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 N8(e){return B(e)!==void 0}function P8(e,t,n,r){if(!e||!e.source||!e.target)return n(new u8(c8.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=d6(e)?e:{...e,id:x6(e)},i=_6(i,void 0,r),!S6(i,t)&&i}function F8(e,t,n,r,i){if(!t.source||!t.target)return i(new u8(c8.EDGE_INVALID,e.id)),!1;if(!n)return i(new u8(c8.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?x6(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function I8(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!f6(o)){n(new u8(c8.NODE_INVALID,o?.id));continue}let s=g6(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 u8(c8.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 L8(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 R8(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 } ` ;L8( ` source ` ,o, ` $ { r } - $ { a } -- Line truncated
` )},z(e.data.summary||e.data.detail),9,dte)):N( ` ` ,!0),e.data.when||e.data.retry||e.data.continues?(F(),k( ` div ` ,fte,[e.data.when?(F(),k( ` 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 } ` },[O(B(hu),{class: ` size - 3 shrink - 0 ` ,"aria-hidden": ` true ` }),I( ` span ` ,mte,z(e.data.when),1)],8,pte)):N( ` ` ,!0),e.data.retry?(F(),k( ` span ` ,{key:1,class: ` flex items - center gap - 0.5 rounded bg - secondary px - 1 ` ,title: ` Up to $ { e . data . retry } attempts ` },[O(B(Ru),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),V( ` × ` +z(e.data.retry),1)],8,hte)):N( ` ` ,!0),e.data.continues?(F(),k( ` span ` ,gte,[O(B(Yu),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),r[10]||=V( ` continues ` ,-1)])):N( ` ` ,!0)])):N( ` ` ,!0),e.data.run?.error?(F(),k( ` 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,_te)):N( ` ` ,!0)],64))]),O(xt,{"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:P(()=>[e.data.expanded?(F(),k( ` div ` ,{key:0,class: ` nodrag nopan nowheel cursor - auto border - t border - border ` ,onClick:r[6]||=pt(()=>{},[ ` stop ` ])},[G(t. $ slots, ` default ` )])):N( ` ` ,!0)]),_:3}),O(B(v5),{type: ` source ` ,position:B(z3).Bottom},null,8,[ ` position ` ]),O(B(v5),{id: ` data - out ` ,type: ` source ` ,position:B(z3).Right,class: ` ! opacity - 0 ` },null,8,[ ` position ` ]),e.data.type=== ` switch ` ?(F(),K(B(v5),{key:1,id: ` otherwise ` ,type: ` source ` ,position:B(z3).Right,class: ` ! opacity - 0 ` },null,8,[ ` position ` ])):N( ` ` ,!0)],2))}}),yte={class: ` pointer - events - none size - full rounded - xl border border - dashed border - border bg - muted / 30 ` },bte={class: ` flex items - center gap - 1 px - 2.5 pt - 1.5 text - [ 11 px ] text - fg - subtle ` },xte={key:0},Ste={key:1,class: ` font - mono ` },Cte=M({__name: ` LaneNode ` ,props:{data:{}},setup(e){return(t,n)=>(F(),k( ` div ` ,yte,[I( ` div ` ,bte,[e.data.lane=== ` switch ` ?(F(),k(H,{key:0},[O(B(Zu),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),e.data.title==="default"?(F(),k( ` span ` ,xte, ` otherwise ` )):(F(),k( ` span ` ,Ste, ` = ` +z(e.data.title),1))],64)):(F(),k(H,{key:1},[O(B(_u),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),V(z(e.data.title),1)],64))])]))}}),S9=240,wte=416,C9=-140,Tte=72,Ete=.9,w9=M({__name: ` WorkflowCanvas ` ,props:{yaml:{},stages:{},open:{},triggers:{},types:{},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),a=J(()=>[...n.types??[], ` parallel ` , ` switch ` ]),o=J(()=>a.value.filter(e=>[ ` agent . run ` , ` workflow . call ` ].includes(e))),s=e=>e&&PY(e)?o.value:a.value,c=e=>e.kind=== ` step ` ?JSON.stringify(e.path??null):e.kind,l=q(null),u=J(()=>{let e=QY(lX(n.yaml),n.stages??[]);return i.value?{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}),d=J(()=>u.value.nodes.filter(e=>e.data.path?.length===2).length),f=q({}),p=q({}),m=J(()=>u.value.nodes.find(e=>e.type=== ` step ` &&c(e.data)===n.open));function h(e,t){f.value={...f.value,[e]:t},m.value?.id!==e&&(p.value={...p.value,[e]:t})}let g=J(()=>{let e=m.value?.id;return e&&f.value[e]?Math.max(0,f.value[e]-(p.value[e]??f.value[e])):0}),_=Ot(),v=At(g,{duration:J(()=>_.value=== ` reduce ` ?0:200)}),y=J(()=>{let e=new Map;for(let t of u.value.nodes){if(t.type!== ` step ` )continue;let n=(t.id===m.value?.id?p.value[t.id]:void 0)??f.value[t.id];n!==void 0&&e.set(t.position.y,Math.max(e.get(t.position.y)??-72,n-Tte))}return[...e]}),b=e=>y.value.reduce((t,[n,r])=>n<e?t+r:t,0);function x(e){let t=e.data,a=c(t),o=t.path,s={triggers:t.kind=== ` start ` ?n.triggers??[]:t.triggers,expanded:a===n.open,editable:i.value,problem:o?n.problems?.[a]:void 0,onResize:t=>h(e.id,t)};return i.value&&(s.onToggle=()=>r( ` toggle ` ,a),o&&(s.onRename=e=>r( ` rename ` ,o,e),s.onDuplicate=()=>r( ` duplicate ` ,o),s.onRemove=()=>r( ` remove ` ,o))),{...e,data:{...t,...s}}}let S=e=>{let t=m.value;return!t||!e.style?.width?!1:e.position.x<=t.position.x&&e.position.x+parseFloat(String(e.style.width))>=t.position.x+S9};function C(e){let t=m.value;if(!t)return 0;if(e.id===t.id||S(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 w=J(()=>{let e=m.value;return u.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=x(t));let o=n.marks?.[t.id];o&&(t={...t,data:{...t.data,mark:o}});let c=t.position.x+C(t),l=t=>e&&t>e.position.y?v.value:0,u=t.position.y+b(t.position.y)+l(t.position.y);if(a===e)return{...t,position:{x:c,y:u},zIndex:10};if(t.type=== ` lane ` &&t.style){let e=t.position.y+parseFloat(t.style.height),n=e+b(e)+l(e)-u,r=parseFloat(Stri
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 ` },m8=class extends Error{constructor(e,...t){super(p8[e]?.call(p8,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function h8(e){return ` clientX ` in e}function g8(e){return ` sourceEvent ` in e}function _8(e,t){let n=h8(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 v8=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function y8(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function b8(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var x8=()=>!0;function S8(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function C8(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())u6(i,l6(e))>0&&r.push(e);return r}var w8=250;function T8(e,t,n,r){let i=[],a=1/0,o=C8(e,n,t+w8);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}=c8(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 E8(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=x8},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:_}=_8(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=D8(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===q3.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=A8(t,e,a,p,n,!0)}return b}function D8(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function O8(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function k8(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function A8(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===q3.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,...c8(o,c,c.position,!0)}:c}var j8={[W3.Left]:W3.Right,[W3.Right]:W3.Left,[W3.Top]:W3.Bottom,[W3.Bottom]:W3.Top},M8=[ ` production ` , ` prod ` ];function N8(e,...t){P8()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function P8(){return!M8.includes( ` production ` )}function F8(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,...d6(t)}}):null}function I8(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 L8(e){return B(e)!==void 0}function R8(e,t,n,r){if(!e||!e.source||!e.target)return n(new m8(f8.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=h6(e)?e:{...e,id:T6(e)},i=x6(i,void 0,r),!E6(i,t)&&i}function z8(e,t,n,r,i){if(!t.source||!t.target)return i(new m8(f8.EDGE_INVALID,e.id)),!1;if(!n)return i(new m8(f8.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?T6(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function B8(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!g6(o)){n(new m8(f8.NODE_INVALID,o?.id));continue}let s=b6(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 m8(f8.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 V8(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 H8(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 } ` ;V8( ` source ` ,o, ` $ { r } - $ { a } -- Line truncated
` )},z(e.data.summary||e.data.detail),9,h9)):P( ` ` ,!0),e.data.when||e.data.retry||e.data.continues?(I(),A( ` div ` ,g9,[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(Eu),{class: ` size - 3 shrink - 0 ` ,"aria-hidden": ` true ` }),L( ` span ` ,v9,z(e.data.when),1)],8,_9)):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(Yu),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),V( ` × ` +z(e.data.retry),1)],8,y9)):P( ` ` ,!0),e.data.continues?(I(),A( ` span ` ,b9,[k(B(od),{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,Jee)):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]||=pt(()=>{},[ ` stop ` ])},[G(t. $ slots, ` default ` )])):P( ` ` ,!0)]),_:3}),k(B(S5),{type: ` source ` ,position:B(W3).Bottom},null,8,[ ` position ` ]),k(B(S5),{id: ` data - out ` ,type: ` source ` ,position:B(W3).Right,class: ` ! opacity - 0 ` },null,8,[ ` position ` ]),e.data.type=== ` switch ` ?(I(),K(B(S5),{key:1,id: ` otherwise ` ,type: ` source ` ,position:B(W3).Right,class: ` ! opacity - 0 ` },null,8,[ ` position ` ])):P( ` ` ,!0)],2))}}),Xee={class: ` pointer - events - none size - full rounded - xl border border - dashed border - border bg - muted / 30 ` },Zee={class: ` flex items - center gap - 1 px - 2.5 pt - 1.5 text - [ 11 px ] text - fg - subtle ` },Qee={key:0}, $ ee={key:1,class: ` font - mono ` },ete=N({__name: ` LaneNode ` ,props:{data:{}},setup(e){return(t,n)=>(I(),A( ` div ` ,Xee,[L( ` div ` ,Zee,[e.data.lane=== ` switch ` ?(I(),A(H,{key:0},[k(B(cd),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),e.data.title==="default"?(I(),A( ` span ` ,Qee, ` otherwise ` )):(I(),A( ` span ` , $ ee, ` = ` +z(e.data.title),1))],64)):(I(),A(H,{key:1},[k(B(Ou),{class: ` size - 3 ` ,"aria-hidden": ` true ` }),V(z(e.data.title),1)],64))])]))}}),tte={class: ` flex shrink - 0 items - center justify - center gap - 1 border - t border - border bg - card p - 1 ` },x9=240,nte=416,S9=-140,rte=72,ite=.9,C9=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&&LY(e)?o.value:a.value,c=e=>e.kind=== ` step ` ?JSON.stringify(e.path??null):e.kind,l=q(null),u=q(null),d=Dt( ` ( max - width : 767 px ) ` ),f=J(()=>{let e=nX(pX(n.yaml),n.stages??[]);return n.types?.length?{nodes:[{id: ` workflow ` ,type: ` step ` ,position:{x:0,y:S9},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=Mt(),b=Ot(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-rte))}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+x9};function T(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+x9/2,r=e.style?.width?parseFloat(String(e.style.width)):e.type=== ` step ` ?x9:32,i=e.position.x+r/2;return Math.abs(i-n)<x9/2?0:i<n?-88:88}let ee=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.x+T(t),l=t
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=OY(e).toJS(),n=new Map;for(let r of lX(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 jte={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 ] ` },Mte=[ ` aria - current ` , ` onClick ` ],Nte={class: ` flex items - center gap - 2 text - sm ` },Pte={class: ` font - mono text - xs text - fg - subtle ` },Fte=[ ` title ` ],Ite={key:0,class: ` px - 3 py - 2 text - sm text - fg - muted ` },Lte={key:1,class: ` flex min - h - 0 flex - col gap - 2 ` },Rte={class: ` flex items - center gap - 2 max - md : flex - wrap ` },zte={key:0,class: ` rounded - lg border border - border p - 4 text - sm text - fg - muted ` },Bte={key:1,class: ` min - h - 0 flex - 1 overflow - auto rounded - lg border border - border py - 2 font - mono text - [ 13 px ] leading - 6 ` },Vte={class: ` inline - block w - 4 select - none text - fg - subtle ` },Hte={key:2,class: ` grid min - h - 0 flex - 1 gap - 3 max - md : flex - none md : grid - cols - 2 ` },Ute={class: ` flex min - h - 0 flex - col gap - 1 ` },Wte={class: ` text - xs font - medium text - fg - muted ` },Gte={class: ` min - h - 0 flex - 1 max - md : h - 72 max - md : flex - none ` },Kte={class: ` flex min - h - 0 flex - col gap - 1 ` },qte={class: ` min - h - 0 flex - 1 max - md : h - 72 max - md : flex - none ` },Jte=M({__name: ` WorkflowHistory ` ,props:Xe({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default: ` yaml ` },modeModifiers:{}}),emits:Xe([ ` restore ` ],[ ` update : selected ` , ` update : mode ` ]),setup(e,{emit:t}){let n=e,r=t,i=Ne(e, ` selected ` ),a=Ne(e, ` mode ` );j(()=>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?[]:Ate(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)=>(F(),k( ` div ` ,jte,[I( ` 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 ` },[(F(!0),k(H,null,A(e.revisions,e=>(F(),k( ` li ` ,{key:e.version},[I( ` 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},[I( ` span ` ,Nte,[I( ` span ` ,Pte, ` v ` +z(e.version),1),O(B(E),{variant:f[e.change]},{default:P(()=>[V(z(e.change),1)]),_:2},1032,[ ` variant ` ])]),I( ` 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(ah)(e.at)),9,Fte)],10,Mte)]))),128)),e.revisions.length?N( ` ` ,!0):(F(),k( ` li ` ,Ite,z(e.error|| ` No recorded changes ` ),1))],2),e.revisions.length?(F(),K(B(mf),{key:0,"model-value":String(i.value),"onUpdate:modelValue":n[0]||=e=>i.value=Number(e)},{default:P(()=>[O(B(xf),{class: ` w - full md : hidden ` ,"aria-label": ` Revision ` },{default:P(()=>[O(B(Sf))]),_:1}),O(B(hf),null,{default:P(()=>[(F(!0),k(H,null,A(e.revisions,e=>(F(),K(B(vf),{key:e.version,value:String(e.version)},{default:P(()=>[V( ` v ` +z(e.version)+ ` · ` +z(e.change)+ ` · ` +z(e.actor|| ` unknown ` )+ ` · ` +z(B(ah)(e.at)),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ])):N( ` ` ,!0),o.value?(F(),k( ` div ` ,Lte,[I( ` div ` ,Rte,[O(B(jx),{modelValue:a.value,"onUpdate:modelValue":n[1]||=e=>a.value=e},{default:P(()=>[O(B(Nx),null,{default:P(()=>[O(B(Px),{value: ` yaml ` },{default:P(()=>[...n[3]||=[V( ` YAML ` ,-1)]]),_:1}),O(B(Px),{value: ` canvas ` },{default:P(()=>[...n[4]||=[V( ` Canvas ` ,-1)]]),_:1})]),_:1})]),_:1},8,[ ` modelValue ` ]),O(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:P(()=>[O(B(Bu),{"data-icon": ` inline - start ` }),n[5]||=V( ` Restore this version ` ,-1)]),_:1},8,[ ` disabled ` , ` title ` ])]),s.value===null?(F(),k( ` p ` ,zte, ` Workflow removed in this revision . ` )):a.value=== ` yaml ` ?(F(),k( ` pre ` ,Bte,[I( ` code ` ,null,[(F(!0),k(H,null,A(c.value,(e,t)=>(F(),k( ` span ` ,{key:t,class:R([ ` block min - h - 6 px - 3 whitespace - pre - wrap ` ,{"bg-ok/10":e.kind=== ` add ` ,"bg-danger/10 text-danger":e.kind=== ` del ` }])},[I( ` span ` ,Vte
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 w9(e){let t=jY(e).toJS(),n=new Map;for(let r of pX(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 T9(e,t,n){let r=w9(e),i=w9(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 lte={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 ] ` },ute=[ ` aria - current ` , ` onClick ` ],dte={class: ` flex items - center gap - 2 text - sm ` },fte={class: ` font - mono text - xs text - fg - subtle ` },pte=[ ` title ` ],mte={key:0,class: ` px - 3 py - 2 text - sm text - fg - muted ` },hte={key:1,class: ` flex min - h - 0 flex - col gap - 2 ` },gte={class: ` flex items - center gap - 2 max - md : flex - wrap ` },_te={key:0,class: ` rounded - lg border border - border p - 4 text - sm text - fg - muted ` },vte={key:1,class: ` min - h - 0 flex - 1 overflow - auto rounded - lg border border - border py - 2 font - mono text - [ 13 px ] leading - 6 ` },yte={class: ` inline - block w - 4 select - none text - fg - subtle ` },bte={key:2,class: ` grid min - h - 0 flex - 1 gap - 3 max - md : flex - none md : grid - cols - 2 ` },xte={class: ` flex min - h - 0 flex - col gap - 1 ` },Ste={class: ` text - xs font - medium text - fg - muted ` },Cte={class: ` min - h - 0 flex - 1 max - md : h - 72 max - md : flex - none ` },wte={class: ` flex min - h - 0 flex - col gap - 1 ` },Tte={class: ` min - h - 0 flex - 1 max - md : h - 72 max - md : flex - none ` },Ete=N({__name: ` WorkflowHistory ` ,props:Xe({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default: ` yaml ` },modeModifiers:{}}),emits:Xe([ ` restore ` ],[ ` update : selected ` , ` update : mode ` ]),setup(e,{emit:t}){let n=e,r=t,i=Me(e, ` selected ` ),a=Me(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?[]:cte(s.value,n.current)),l=J(()=>s.value!==null&&s.value===n.current),u=J(()=>s.value===null?{}:T9(s.value,n.current, ` removed ` )),d=J(()=>s.value===null?{}:T9(n.current,s.value, ` added ` )),f={added: ` default ` ,edited: ` secondary ` ,removed: ` destructive ` };return(t,n)=>(I(),A( ` div ` ,lte,[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 ` ,dte,[L( ` span ` ,fte, ` 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(gh)(e.at)),9,pte)],10,ute)]))),128)),e.revisions.length?P( ` ` ,!0):(I(),A( ` li ` ,mte,z(e.error|| ` No recorded changes ` ),1))],2),e.revisions.length?(I(),K(B(Tf),{key:0,"model-value":String(i.value),"onUpdate:modelValue":n[0]||=e=>i.value=Number(e)},{default:F(()=>[k(B(Mf),{class: ` w - full md : hidden ` ,"aria-label": ` Revision ` },{default:F(()=>[k(B(Nf))]),_:1}),k(B(Ef),null,{default:F(()=>[(I(!0),A(H,null,j(e.revisions,e=>(I(),K(B(kf),{key:e.version,value:String(e.version)},{default:F(()=>[V( ` v ` +z(e.version)+ ` · ` +z(e.change)+ ` · ` +z(e.actor|| ` unknown ` )+ ` · ` +z(B(gh)(e.at)),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ])):P( ` ` ,!0),o.value?(I(),A( ` div ` ,hte,[L( ` div ` ,gte,[k(B(Ax),{modelValue:a.value,"onUpdate:modelValue":n[1]||=e=>a.value=e},{default:F(()=>[k(B(Mx),null,{default:F(()=>[k(B(Nx),{value: ` yaml ` },{default:F(()=>[...n[3]||=[V( ` YAML ` ,-1)]]),_:1}),k(B(Nx),{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(Zu),{"data-icon": ` inline - start ` }),n[5]||=V( ` Restore this version ` ,-1)]),_:1},8,[ ` disabled ` , ` title ` ])]),s.value===null?(I(),A( ` p ` ,_te, ` Workflow removed in this revision . ` )):a.value=== ` yaml ` ?(I(),A( ` pre ` ,vte,[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-danger":e.kind=== ` del ` }])},[L( ` span ` ,yte
Line truncated
` );s=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.type=== ` delta ` &&(a.value+=n.text?? ` ` ),n.type=== ` tool ` &&n.tool&&(o.value=n.tool.replaceAll( ` _ ` , ` ` )),n.type=== ` done ` &&(c=!0,a.value||=n.text?? ` ` ),n.type=== ` error ` )throw Error(n.text)}if(t)break}if(!c)throw Error( ` the turn ended early ` )}catch(e){e.name!== ` AbortError ` &&(s.value=!0,a.value=String(e.message||e))}finally{c.value=!1,o.value= ` ` ,l=void 0,r( ` proposed ` )}}}return(e,t)=>(F(),k( ` div ` ,tne,[a.value?(F(),k( ` p ` ,{key:0,class:R([ ` max - h - 40 overflow - y - auto whitespace - pre - wrap border - b border - border px - 3 py - 2 text - sm ` ,s.value&& ` text - danger ` ]),role:s.value? ` alert ` : ` status ` },z(a.value),11,nne)):N( ` ` ,!0),I( ` form ` ,{class: ` flex items - center gap - 2 px - 3 py - 2 ` ,onSubmit:pt(u,[ ` prevent ` ])},[O(B(Xu),{class: ` size - 4 shrink - 0 text - primary ` ,"aria-hidden": ` true ` }),Me(I( ` input ` ,{"onUpdate:modelValue":t[0]||=e=>i.value=e,class: ` min - w - 0 flex - 1 bg - transparent text - sm outline - none placeholder : text - fg - subtle ` ,placeholder: ` Build with Archie ` ,"aria-label": ` Build with Archie ` ,disabled:c.value},null,8,rne),[[gt,i.value]]),c.value?(F(),k( ` span ` ,ine,[O(B(ob)),V(z(o.value),1)])):N( ` ` ,!0),c.value?(F(),K(B(Y),{key:1,type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Stop ` ,onClick:t[1]||=e=>B(l)?.abort()},{default:P(()=>[O(B(Qu))]),_:1})):(F(),K(B(Y),{key:2,type: ` submit ` ,size: ` icon - sm ` ,"aria-label": ` Send ` ,disabled:!i.value.trim()},{default:P(()=>[O(B(eu))]),_:1},8,[ ` disabled ` ]))],32)]))}}),one=20;function sne(e){let t=q([]),n=q( ` ` ),r=q([]),i=q(0),a=!1,o=q( ` ` ),s=q(!1),c=0;async function l(){let r=e.value,i=++c;s.value=!0;try{let s=r?await X.taskPage({workflow:r,limit:one}):null;if(e.value!==r||i!==c)return;t.value=(s?.tasks??[]).sort((e,t)=>Number(t.id)-Number(e.id)),o.value= ` ` ,(!a||n.value&&!t.value.some(e=>String(e.id)===n.value))&&(n.value=t.value[0]?String(t.value[0].id): ` ` )}catch(t){e.value===r&&i===c&&(o.value=String(t.message||t))}finally{i===c&&(s.value=!1)}}async function u(){if(!n.value){r.value.length&&(r.value=[]),i.value=0;return}let e=n.value,t=await X.taskAttempts(e).catch(()=>null);if(n.value!==e)return;let a=[...t?.attempts??[]].sort((e,t)=>t.attempt-e.attempt)[0],o=a?.stages??[];JSON.stringify(o)!==JSON.stringify(r.value)&&(r.value=o),i.value=a?.attempt??0}function d(e){a=!0,n.value=e}async function f(){await l(),await u()}j(e,()=>{a=!1,t.value=[],n.value= ` ` ,o.value= ` ` ,f()},{immediate:!0}),j(n,()=>{r.value=[],i.value=0,u()}),fh( ` tasks ` ,()=>void f(),300);let p=J(()=>t.value.find(e=>String(e.id)===n.value));async function m(e){a=!0,n.value=String(e),await f()}return{runs:t,error:o,loading:s,watched:n,watchedRun:p,stages:r,attempt:i,pick:d,follow:m,refresh:f}}function k9(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function A9(e){try{return kY(e)}catch{return null}}function cne(e,t){let n=[];for(let[r,i]of Object.entries(t.routes))i===e&&n.push(r==="default"?{kind: ` issue ` ,label: ` Unlabelled issues ` ,detail: ` anything no label routes elsewhere ` }:{kind: ` issue ` ,label: ` Issues labelled $ { r } ` });for(let r of t.bindings)r.workflow===e&&n.push({kind: ` event ` ,label:r.name|| ` Event binding ` ,detail:r.matcher?.source,binding:r});for(let r of t.playbooks){let t=A9(r.yaml);if(!k9(t)||!Array.isArray(t.actions)||!t.actions.some(t=>k9(t)&&t.workflow===e))continue;let i=k9(t.trigger)?t.trigger:{},a=Array.isArray(i.labels)?i.labels.join( ` , ` ): ` ` ;n.push({kind: ` playbook ` ,label:r.id,detail:[i.kind,a].filter(Boolean).join( ` · ` )})}for(let r of t.definitions){if(r.id===e)continue;let t=lne(A9(r.yaml),e);t&&n.push({kind: ` workflow ` ,label:r.id,detail:t})}return n}function lne(e,t){let n=(k9(e)&&Array.isArray(e.steps)?e.steps:[]).flatMap(e=>NY(e)?.branches.flatMap(([,e])=>e)??[e]);for(let e of n){if(!k9(e)||!k9(e.settings))continue;let r=e.settings;switch(e.type){case ` workflow . call ` :if(r.workflow===t)return ` calls it ` ;break;case ` workflow . handoff ` :if(r.workflow===t||une(n,r.workflow).includes(t))return ` hands off to it ` ;break;case ` human . approve ` :if(r.then===t)return ` runs it once approved ` }}return ` ` }function une(e,t){let n=typeof t== ` string ` ?/ \{ \{ \s *steps \. ([ \w -]+) \. result \. ([ \w -]+) \s * \} \} /.exec(t):null;if(!n)return[];let r=e.find(e=>k9(e)&&e.id===n[1]),i=k9(r)&&k9(r.settings)?r.settings.result:void 0,a=k9(i)&&k9(i.properties)?i.properties[n[2]]:void 0;return k9(a)&&Array.isArray(a.enum)?a.enum.map(String):[]}function dne(e){let t=Dg(),n=GA(),r=q([]);async function i(){let e=await X.bindings().catch(()=>null);r.value=e?.bindings??[]}return L(i),{triggers:J(()=>cne(e.value,{routes:n.intakeRoutes,bindings:r.value,playbooks:t.stateFor( ` eda - playbooks ` ).resource?.value?.playbooks??[],definitions:n.collection.definitions})),reload:i}}var fne={class: ` flex items - center gap - 2 ` },pne={class: ` ml - 1 font - mono text - xs text - fg - subtle ` },mne={key:0,class: ` shrink - 0 text - xs font - medium text - fg - muted xl : hidden ` },hne={role: ` group ` ,"aria-label": ` Runs ` ,class: ` ml - auto flex min - w - 0 items - center gap - 1 ` },gne={key:0,class: ` max - sm : hidden ` },_ne={key:1,class: ` flex min - w - 0 items - center gap - 1 ` },vne={r
Line truncated
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.type=== ` delta ` &&(a.value+=n.text?? ` ` ),n.type=== ` tool ` &&n.tool&&(o.value=n.tool.replaceAll( ` _ ` , ` ` )),n.type=== ` done ` &&(c=!0,a.value||=n.text?? ` ` ),n.type=== ` error ` )throw Error(n.text)}if(t)break}if(!c)throw Error( ` the turn ended early ` )}catch(e){e.name!== ` AbortError ` &&(s.value=!0,a.value=String(e.message||e))}finally{c.value=!1,o.value= ` ` ,l=void 0,r( ` proposed ` )}}}return(e,t)=>(I(),A( ` div ` ,Nte,[a.value?(I(),A( ` p ` ,{key:0,class:R([ ` max - h - 40 overflow - y - auto whitespace - pre - wrap border - b border - border px - 3 py - 2 text - sm ` ,s.value&& ` text - danger ` ]),role:s.value? ` alert ` : ` status ` },z(a.value),11,Pte)):P( ` ` ,!0),L( ` form ` ,{class: ` flex items - center gap - 2 px - 3 py - 2 ` ,onSubmit:pt(u,[ ` prevent ` ])},[k(B(sd),{class: ` size - 4 shrink - 0 text - primary ` ,"aria-hidden": ` true ` }),je(L( ` input ` ,{"onUpdate:modelValue":t[0]||=e=>i.value=e,class: ` min - w - 0 flex - 1 bg - transparent text - sm outline - none placeholder : text - fg - subtle ` ,placeholder: ` Build with Archie ` ,"aria-label": ` Build with Archie ` ,disabled:c.value},null,8,Fte),[[gt,i.value]]),c.value?(I(),A( ` span ` ,Ite,[k(B(ab)),V(z(o.value),1)])):P( ` ` ,!0),c.value?(I(),K(B(Y),{key:1,type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Stop ` ,onClick:t[1]||=e=>B(l)?.abort()},{default:F(()=>[k(B(ld))]),_:1})):(I(),K(B(Y),{key:2,type: ` submit ` ,size: ` icon - sm ` ,"aria-label": ` Send ` ,disabled:!i.value.trim()},{default:F(()=>[k(B(au))]),_:1},8,[ ` disabled ` ]))],32)]))}}),Rte=20;function zte(e){let t=q([]),n=q( ` ` ),r=q([]),i=q(0),a=!1,o=q( ` ` ),s=q(!1),c=0;async function l(){let r=e.value,i=++c;s.value=!0;try{let s=r?await X.taskPage({workflow:r,limit:Rte}):null;if(e.value!==r||i!==c)return;t.value=(s?.tasks??[]).sort((e,t)=>Number(t.id)-Number(e.id)),o.value= ` ` ,(!a||n.value&&!t.value.some(e=>String(e.id)===n.value))&&(n.value=t.value[0]?String(t.value[0].id): ` ` )}catch(t){e.value===r&&i===c&&(o.value=String(t.message||t))}finally{i===c&&(s.value=!1)}}async function u(){if(!n.value){r.value.length&&(r.value=[]),i.value=0;return}let e=n.value,t=await X.taskAttempts(e).catch(()=>null);if(n.value!==e)return;let a=[...t?.attempts??[]].sort((e,t)=>t.attempt-e.attempt)[0],o=a?.stages??[];JSON.stringify(o)!==JSON.stringify(r.value)&&(r.value=o),i.value=a?.attempt??0}function d(e){a=!0,n.value=e}async function f(){await l(),await u()}M(e,()=>{a=!1,t.value=[],n.value= ` ` ,o.value= ` ` ,f()},{immediate:!0}),M(n,()=>{r.value=[],i.value=0,u()}),Ch( ` tasks ` ,()=>void f(),300);let p=J(()=>t.value.find(e=>String(e.id)===n.value));async function m(e){a=!0,n.value=String(e),await f()}return{runs:t,error:o,loading:s,watched:n,watchedRun:p,stages:r,attempt:i,pick:d,follow:m,refresh:f}}function O9(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function k9(e){try{return MY(e)}catch{return null}}function Bte(e,t){let n=[];for(let[r,i]of Object.entries(t.routes))i===e&&n.push(r==="default"?{kind: ` issue ` ,label: ` Unlabelled issues ` ,detail: ` anything no label routes elsewhere ` }:{kind: ` issue ` ,label: ` Issues labelled $ { r } ` });for(let r of t.bindings)r.workflow===e&&n.push({kind: ` event ` ,label:r.name|| ` Event binding ` ,detail:r.matcher?.source,binding:r});for(let r of t.playbooks){let t=k9(r.yaml);if(!O9(t)||!Array.isArray(t.actions)||!t.actions.some(t=>O9(t)&&t.workflow===e))continue;let i=O9(t.trigger)?t.trigger:{},a=Array.isArray(i.labels)?i.labels.join( ` , ` ): ` ` ;n.push({kind: ` playbook ` ,label:r.id,detail:[i.kind,a].filter(Boolean).join( ` · ` )})}for(let r of t.definitions){if(r.id===e)continue;let t=Vte(k9(r.yaml),e);t&&n.push({kind: ` workflow ` ,label:r.id,detail:t})}return n}function Vte(e,t){let n=(O9(e)&&Array.isArray(e.steps)?e.steps:[]).flatMap(e=>IY(e)?.branches.flatMap(([,e])=>e)??[e]);for(let e of n){if(!O9(e)||!O9(e.settings))continue;let r=e.settings;switch(e.type){case ` workflow . call ` :if(r.workflow===t)return ` calls it ` ;break;case ` workflow . handoff ` :if(r.workflow===t||Hte(n,r.workflow).includes(t))return ` hands off to it ` ;break;case ` human . approve ` :if(r.then===t)return ` runs it once approved ` }}return ` ` }function Hte(e,t){let n=typeof t== ` string ` ?/ \{ \{ \s *steps \. ([ \w -]+) \. result \. ([ \w -]+) \s * \} \} /.exec(t):null;if(!n)return[];let r=e.find(e=>O9(e)&&e.id===n[1]),i=O9(r)&&O9(r.settings)?r.settings.result:void 0,a=O9(i)&&O9(i.properties)?i.properties[n[2]]:void 0;return O9(a)&&Array.isArray(a.enum)?a.enum.map(String):[]}function Ute(e){let t=Pg(),n=JA(),r=q([]);async function i(){let e=await X.bindings().catch(()=>null);r.value=e?.bindings??[]}return Ue(i),{triggers:J(()=>Bte(e.value,{routes:n.intakeRoutes,bindings:r.value,playbooks:t.stateFor( ` eda - playbooks ` ).resource?.value?.playbooks??[],definitions:n.collection.definitions})),reload:i}}var Wte={class: ` workflow - editor - toolbar flex shrink - 0 items - center gap - 2 max - sm : grid max - sm : grid - cols - [ 1 fr _auto ] ` },Gte={class: ` ml - 1 font - mono text - xs text - fg - subtle ` },Kte={key:0,class: ` shrink - 0 text - xs font - medium text - fg - muted xl : hidden ` },qte={role: ` group ` ,"aria-label": ` Runs ` ,class: ` workflow - run - actions ml - auto flex min - w - 0 items - center gap - 1 Line truncated