@@ -10,59 +10,59 @@ import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J a
Defaulting to \ ` null \` . ` ) , null ) } function $s ( e ) { return Zs ( e ) && ! Number . isNaN ( e ) && e > 0 ? e : ( console . error ( ` Invalid prop \` max \` of value \` ${ e } \` supplied to \` ProgressRoot \` . Only numbers greater than 0 are valid max values. Defaulting to \` ${ Js } \` . ` ) , Js ) } var ec = A ( { _ _name : ` ProgressRoot ` , props : { modelValue : { type : [ Number , null ] , required : ! 1 } , max : { type : Number , required : ! 1 , default : Js } , getValueLabel : { type : Function , required : ! 1 , default : ( e , t ) => Zs ( e ) ? ` ${ Math . round ( e / t * Js ) } % ` : void 0 } , getValueText : { type : Function , required : ! 1 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , emits : [ ` update:modelValue ` , ` update:max ` ] , setup ( e , { emit : t } ) { let n = e , r = t ; p ( ) ; let i = x ( n , ` modelValue ` , r , { passive : n . modelValue === void 0 } ) , a = x ( n , ` max ` , r , { passive : n . max === void 0 } ) ; I ( ( ) => i . value , async e => { let t = Qs ( e , n . max ) ; t !== e && ( await ot ( ) , i . value = t ) } , { immediate : ! 0 } ) , I ( ( ) => n . max , e => { let t = $s ( n . max ) ; t !== e && ( a . value = t ) } , { immediate : ! 0 } ) ; let o = L ( ( ) => ai ( i . value ) ? ` indeterminate ` : i . value === a . value ? ` complete ` : ` loading ` ) ; return Xs ( { modelValue : i , max : a , progressState : o } ) , ( t , n ) => ( z ( ) , J ( B ( Mt ) , { "as-child" : e . asChild , as : e . as , "aria-valuemax" : B ( a ) , "aria-valuemin" : 0 , "aria-valuenow" : Zs ( B ( i ) ) ? B ( i ) : void 0 , "aria-valuetext" : e . getValueText ? . ( B ( i ) , B ( a ) ) , "aria-label" : e . getValueLabel ( B ( i ) , B ( a ) ) , role : ` progressbar ` , "data-state" : o . value , "data-value" : B ( i ) ? ? void 0 , "data-max" : B ( a ) } , { default : M ( ( ) => [ F ( t . $slots , ` default ` , { modelValue : B ( i ) } ) ] ) , _ : 3 } , 8 , [ ` as-child ` , ` as ` , ` aria-valuemax ` , ` aria-valuenow ` , ` aria-valuetext ` , ` aria-label ` , ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , tc = A ( { _ _name : ` ProgressIndicator ` , props : { asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , setup ( e ) { let t = e , n = Ys ( ) ; return p ( ) , ( e , r ) => ( z ( ) , J ( B ( Mt ) , W ( t , { "data-state" : B ( n ) . progressState . value , "data-value" : B ( n ) . modelValue ? . value ? ? void 0 , "data-max" : B ( n ) . max . value } ) , { default : M ( ( ) => [ F ( e . $slots , ` default ` ) ] ) , _ : 3 } , 16 , [ ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , nc = ` radio.select ` ; function rc ( e , t , n ) { _ ( nc , n , { originalEvent : e , value : t } ) } var ic = A ( { inheritAttrs : ! 1 , _ _name : ` Radio ` , props : { id : { type : String , required : ! 1 } , value : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , checked : { type : Boolean , required : ! 1 , default : void 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 , default : ` button ` } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 } } , emits : [ ` update:checked ` , ` select ` ] , setup ( e , { emit : t } ) { let n = e , r = t , i = x ( n , ` checked ` , r , { passive : n . checked === void 0 } ) , { value : a } = Me ( n ) , { forwardRef : o , currentElement : s } = p ( ) , c = hi ( s ) , l = gi ( ) , u = L ( ( ) => n . id && s . value ? document . querySelector ( ` [for=" ${ n . id } "] ` ) ? . innerText : void 0 ) ; function d ( e ) { n . disabled || rc ( e , n . value , e => { r ( ` select ` , e ) , ! e ? . defaultPrevented && ( i . value = ! 0 , c . value && e . stopPropagation ( ) ) } ) } return ( t , n ) => ( z ( ) , K ( U , null , [ N ( B ( Mt ) , W ( { id : e . id , ref : B ( o ) , role : ` radio ` , type : e . as === ` button ` ? ` button ` : void 0 , as : e . as , "aria-checked" : B ( i ) ? ? ! 1 , "aria-label" : u . value , "as-child" : e . asChild , disabled : e . disabled ? ` ` : void 0 , "data-state" : B ( i ) ? ` checked ` : ` unchecked ` , "data-disabled" : e . disabled ? ` ` : void 0 , value : B ( a ) , required : e . required , name : e . name } , { ... B ( l ) , ... t . $attrs } , { onClick : St ( d , [ ` stop ` ] ) } ) , { default : M ( ( ) => [ F ( t . $slots , ` default ` , { checked : B ( i ) } ) ] ) , _ : 3 } , 16 , [ ` id ` , ` type ` , ` as ` , ` aria-checked ` , ` aria-label ` , ` as-child ` , ` disabled ` , ` data-state ` , ` data-disabled ` , ` value ` , ` required ` , ` name ` ] ) , B ( c ) && e . name ? ( z ( ) , J ( B ( La ) , W ( { key : 0 , type : ` radio ` , tabindex : ` -1 ` , value : B ( a ) , checked : ! ! B ( i ) , name : e . name , disabled : e . disabled , required : e . required } , B ( l ) ) , null , 16 , [ ` value ` , ` checked ` , ` name ` , ` disabled ` , ` required ` ] ) ) : R ( ` v-if ` , ! 0 ) ] , 64 ) ) } } ) , [ ac , oc ] = O ( ` RadioGroupRoot ` ) , sc = A ( { _ _name : ` RadioGroupRoot ` , props : { modelValue : { type : null , required : ! 1 } , defaultValue : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , orientation : { type : String , required : ! 1 , default : void 0 } , dir : { type : String , required : ! 1 } , loop : { type : Boolean , required : ! 1 , default : ! 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 , default : ! 1 } } , emits : [ ` update:modelValue ` ] , setup ( e , { emit : t } ) { let n = e , r = t , { forwardRef : i , currentElement : a } = p ( ) , s = x ( n , ` modelValue ` , r , { defaultValue : n . defaultValue , passive : n . modelValue === void 0 } ) , { disabled : c , loop : l , orientation : u , name : d , required : f , dir : m } = Me ( n ) , h = o ( m ) , g = hi ( a ) ; return oc ( { modelValue : s , changeModelValue : e => { s . value = e } , disabled : c , loop : l , orientation : u , name : d ? . value , required : f } ) , ( t , n ) => ( z ( ) , J ( B ( xo ) , { "as-child" : ` ` , orientation : B ( u ) , dir : B ( h ) , loop : B ( l ) } , { default : M ( ( ) => [ N ( B ( Mt ) , { ref : B ( i ) , role : ` radiogroup ` , "data-disabled" : B ( c ) ? ` ` : void 0 , "as-child" : e . asChild , as : e . as , "aria-orientation" : B ( u ) , "aria-required" : B ( f ) , dir : B ( h ) } , { default : M ( ( ) => [ F ( t . $slots , ` default ` , { modelValue : B ( s ) } ) , B ( g ) && B ( d ) ? ( z ( ) , J ( B ( La ) , { key : 0 , required : B ( f ) , disabled : B ( c ) , value : B ( s ) , name : B ( d ) } , null , 8 , [ ` required ` , ` disabled ` , ` value ` , ` name ` ] ) ) : R ( ` v-if ` , ! 0 ) ] ) , _ : 3 } , 8 , [ ` data-disabled ` , ` as-child ` , ` as ` , ` aria-orientation ` , ` aria-required ` , ` dir ` ] ) ] ) , _ : 3 } , 8 , [ ` orientation ` , ` dir ` , ` loop ` ] ) ) } } ) , [ cc , lc ] = O ( ` RadioGroupItem ` ) , uc = A ( { inheritAttrs : ! 1 , _ _name : ` RadioGroupItem ` , props : { id : { type : String , required : ! 1 } , value : { type : null , requir Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:Md(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>Md(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=Pd(c),u=e+1<n.length?Pd(n[e+1]):null;if(l&&u&&Fd(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=Pd(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>Md(e)),rows:r.map(e=>e.map(e=>Md(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:Md(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:Md(c.replace(/^> \s ?/, ` ` ))})):r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function Pd(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 Fd(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var Id={class: ` [ overflow - wrap : anywhere ] ` },Ld={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },Rd={class: ` font - mono text - [ 0.85 em ] ` },zd={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Bd={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Vd={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Hd={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },Ud={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },Wd={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },Gd={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },Kd={key:8,class: ` mb - 2.5 last : mb - 0 ` },qd=A({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=L(()=>Nd(t.text));return(e,t)=>(z(),K( ` div ` ,Id,[(z(!0),K(U,null,q(n.value,(e,t)=>(z(),K(U,{key:t},[e.kind=== ` pre ` ?(z(),K( ` pre ` ,Ld,[G( ` code ` ,Rd,H(e.code),1)])):e.kind=== ` table ` ?(z(),K( ` table ` ,zd,[G( ` thead ` ,null,[G( ` tr ` ,null,[(z(!0),K(U,null,q(e.head,(e,t)=>(z(),K( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[N(Ad,{inline:e},null,8,[ ` inline ` ])]))),128))])]),G( ` tbody ` ,null,[(z(!0),K(U,null,q(e.rows,(e,t)=>(z(),K( ` tr ` ,{key:t},[(z(!0),K(U,null,q(e,(e,t)=>(z(),K( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[N(Ad,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(z(),K( ` blockquote ` ,Bd,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(z(),K( ` h1 ` ,Vd,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(z(),K( ` h2 ` ,Hd,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(z(),K( ` h3 ` ,Ud,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(z(),K( ` ul ` ,Wd,[(z(!0),K(U,null,q(e.items,(e,t)=>(z(),K( ` li ` ,{key:t},[N(Ad,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(z(),K( ` ol ` ,Gd,[(z(!0),K(U,null,q(e.items,(e,t)=>(z(),K( ` li ` ,{key:t},[N(Ad,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(z(),K( ` p ` ,Kd,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):R( ` ` ,!0)],64))),128))]))}}),Jd={class: ` truncate ` },Yd=A({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Ae( ` RouterLink ` );return z(),J(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:M(()=>[N(B(Wt),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),G( ` span ` ,Jd,H(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),Xd={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },Zd={class: ` font - semibold text - foreground ` },Qd={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` }, $ d=A({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=L(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=L(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=L(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=L(()=>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?(z(),J(Yd,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(z(),K( ` div ` ,Xd,[N(B(qn),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),G( ` span ` ,Zd,H(n.value),1),r.value?(z(),K( ` code ` ,Qd,H(r.value),1)):R( ` ` ,!0),G( ` span ` ,{class:P(B(Q)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},H(a.value),3)]))}}),ef={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },tf={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },nf={key:3,class: ` whitespace - pre - wrap ` },rf=A({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(z(),K( ` div ` ,{class:P([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[G( ` div ` ,{class:P(B(Q)( ` max - w - [ min ( 78 ch , 86 % ) ] rounded - [ 0.85 rem ] px - 4 py - 3 leading - normal [ overflow - wrap : anywhere ] ` ,e.assistant? ` bg - muted ` : ` bg - primary / 15 ` ))},[e.assistant&&e.tools.length?(z(),K( ` div ` ,ef,[(z(!0),K(U,null,q(e.tools,(t,n)=>(z(),J( $ d,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):R( ` ` ,!0),e.media.length?(z(),K( ` div ` ,tf,[(z(!0),K(U,null,q(e.media,(e,t)=>(z(),J(Cd,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):R( ` ` ,!0),e.assistant?(z(),J(qd,{key:2,text:e.text},null,8,[ ` text ` ])):(z(),K( ` div ` ,nf,H(e.text),1)),F(t. $ slots, ` default ` )],2)],2))}}),af={class: ` text - sm ` },of={class: ` font - medium ` },sf={key:0,class: ` mt - 1 text - fg - muted ` },cf={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },lf=A({__name: ` ChatChoo Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>K_? ` $ { n . slice ( 0 , K _ ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var J_=[ ` title ` ],Y_=A({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=Jg(),a=L(()=>i.taskIDFor(n.event)),o=L(()=>q_(n.event));function s(){a.value>0&&r( ` open ` ,a.value)}let c=L(()=>n.event.at?Dg(n.event.at): ` — ` );return(e,t)=>(z(),J(B(U_),{class:P(a.value>0? ` cursor - pointer ` : ` ` ),role:a.value>0? ` link ` :void 0,tabindex:a.value>0?0:void 0,title:a.value>0? ` Open task details ` :void 0,onClick:s,onKeydown:[vt(St(s,[ ` prevent ` ]),[ ` enter ` ]),vt(St(s,[ ` prevent ` ]),[ ` space ` ])]},{default:M(()=>[N(B( $ ),{class: ` font - medium ` },{default:M(()=>[j(H(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),N(B( $ ),{class: ` font - mono ` },{default:M(()=>[j(H(a.value>0? ` # $ { a . value } ` : ` — ` ),1)]),_:1}),N(B( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:M(()=>[G( ` span ` ,{class: ` block truncate ` ,title:o.value.truncated?o.value.full:void 0},H(o.value.text),9,J_)]),_:1}),N(B( $ ),null,{default:M(()=>[j(H(c.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),X_=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function Z_(e){return(Number(e?.task_id)||0)>0}function Q_(e,t){return t=== ` tasks ` ?Z_(e):t!== ` system ` ||!Z_(e)}function $ _(e,t){return e.filter(e=>Q_(e,t))}function ev(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function tv(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function nv(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=tv(q_(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 rv={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },iv={class: ` max - h - [ 28 rem ] overflow - y - auto ` },av=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],ov=[ ` title ` ],sv=A({__name: ` LiveActivityCard ` ,setup(e){let t=cp(),{activity:n}=_e(ue()),r=Y( ` all ` ),i=L(()=> $ _(n.value,r.value)),a=L(()=>ev(i.value.length,r.value)),o=Ye(new Set),s=L(()=>nv(i.value));function c(e){o.has(e)?o.delete(e):o.add(e)}function l(e){return o.has(e.key)}function u(e){return q_(e.representative)}function d(e){return e.representative.at?Dg(e.representative.at): ` — ` }function f(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(z(),J(B(bg),null,{default:M(()=>[N(B(Tg),null,{default:M(()=>[N(B(Eg),null,{default:M(()=>[...t[1]||=[j( ` Live activity ` ,-1)]]),_:1}),N(B(xg),{class: ` flex items - center gap - 2 ` },{default:M(()=>[N(B(L_),{type: ` single ` ,variant: ` outline ` ,size: ` sm ` ,"model-value":r.value,"aria-label": ` Filter activity ` ,"onUpdate:modelValue":t[0]||=e=>{e&&(r.value=e)}},{default:M(()=>[(z(!0),K(U,null,q(B(X_),e=>(z(),J(B(z_),{key:e.value,value:e.value},{default:M(()=>[j(H(e.label),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1},8,[ ` model - value ` ])]),_:1})]),_:1}),N(B(Sg),null,{default:M(()=>[G( ` div ` ,rv,[G( ` div ` ,iv,[N(B(V_),null,{default:M(()=>[N(B(G_),{class: ` sticky top - 0 z - 10 bg - card ` },{default:M(()=>[N(B(U_),null,{default:M(()=>[N(B(W_),null,{default:M(()=>[...t[2]||=[j( ` Event ` ,-1)]]),_:1}),N(B(W_),null,{default:M(()=>[...t[3]||=[j( ` Task ` ,-1)]]),_:1}),N(B(W_),null,{default:M(()=>[...t[4]||=[j( ` Detail ` ,-1)]]),_:1}),N(B(W_),null,{default:M(()=>[...t[5]||=[j( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),N(B(H_),null,{default:M(()=>[i.value.length?R( ` ` ,!0):(z(),J(B(U_),{key:0},{default:M(()=>[N(B( $ ),{colspan: ` 4 ` },{default:M(()=>[N(B(dg),null,{default:M(()=>[N(B(mg),null,{default:M(()=>[N(B(_g),null,{default:M(()=>[j(H(a.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),i.value.length?(z(!0),K(U,{key:1},q(s.value,e=>(z(),K(U,{key:e.key},[e.count===1?(z(),J(Y_,{key:0,event:e.representative,onOpen:f},null,8,[ ` event ` ])):(z(),K(U,{key:1},[N(B(U_),{class:P(e.taskID>0? ` cursor - pointer ` : ` ` ),role:e.taskID>0? ` link ` :void 0,tabindex:e.taskID>0?0:void 0,title:e.taskID>0? ` Open task details ` :void 0,onClick:t=>e.taskID>0&&f(e.taskID),onKeydown:[vt(St(t=>e.taskID>0&&f(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),vt(St(t=>e.taskID>0&&f(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:M(()=>[N(B( $ ),{class: ` font - medium ` },{default:M(()=>[G( ` button ` ,{type: ` button ` ,class: ` inline - flex items - center gap - 1 rounded hover : opacity - 80 ` ,"aria-expanded":l(e),"aria-label": ` $ { l ( e ) ? ` Hide ` : ` Show ` } $ { e . count } $ { e . label } events ` ,onClick:St(t=>c(e.key),[ ` stop ` ])},[l(e)?(z(),J(B(Qt),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(z(),J(B( $ t),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),j( ` ` +H(e.label)+ ` ` ,1),N(B(kt),{variant: ` idle ` },{default:M(()=>[j( ` × ` +H(e.count),1)]),_:2},1024)],8,av)]),_:2},1024),N(B( $ ),{class: ` font - mono ` },{default:M(()=>[j(H(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),N(B( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:M(()=>[G( ` span ` ,{class: ` block truncate ` ,title:u(e).truncated?u(e).full:void 0},H(u(e).text),9,ov)]),_:2},1024),N(B( $ ),null,{default:M(()=>[j(H(d(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydow 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 py(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 my(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 hy(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 gy(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 _y=Y([]),vy=Y([]),yy=Y(!0),by=Y(null),xy=Y(null),Sy=Y(!1),Cy=Y(null);async function wy(){try{let e=await Z.eventTypes(dy().workspace);yy.value=e.enabled!==!1,_y.value=e.event_types||[],vy.value=e.proposals||[],by.value=null}catch(e){by.value=e.message||String(e)}}function Ty(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function Ey(e){Cy.value=null,xy.value=e}function Dy(e){let t=Fy.value.find(t=>String(t.id)===e.sample_id);Ey({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:Ty(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function Oy(e= ` ` ){Ey({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function ky(e){Ey({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:Ty(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function Ay(){xy.value=null}async function jy(){let e=xy.value;if(e){Sy.value=!0;try{if(e.mode=== ` edit ` &&e.id)await Z.eventTypeUpdate(e.id,{name:e.name,rule:gy(e.rule)});else{let t=e.mode=== ` paste ` ?fy(e.headersText):e.exampleHeaders;await Z.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:gy(e.rule),example:{headers:t,body:e.body}})}xy.value=null,await wy()}catch(e){Cy.value=e.message||String(e)}finally{Sy.value=!1}}}var My=Y(null);async function Ny(){let e=My.value;if(My.value=null,e)try{await Z.eventTypeDelete(e.id),await wy()}catch(e){by.value=e.message||String(e)}}var Py=100,Fy=Y([]),Iy=Y(!0),Ly=Y(null),Ry=Y(!0),zy=Y(null);async function By(){try{let e=await Z.captures(Py);Iy.value=e.enabled!==!1,Fy.value=e.captures||[],Ly.value=null}catch(e){Ly.value=e.message||String(e)}finally{Ry.value=!1}}function Vy(e){let t=Fy.value.find(t=>t.id===e);return t&&(zy.value=t),!!t}function Hy(){Fy.value.length&&(zy.value=Fy.value[0])}function Uy(){me( ` captures ` ,()=>{By(),wy()})}var Wy=A({__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:n}){let r=e,i=n,a=Dt(r, ` class ` ),o=t(a,i);return(e,t)=>(z(),J(B(el),W({"data-slot": ` tabs ` ,"data-orientation":B(o).orientation|| ` horizontal ` },B(o),{class:B(Q)( ` gap - 2 group / tabs flex data - horizontal : flex - col ` ,r.class)}),{default:M(t=>[F(e. $ slots, ` default ` ,nt(Oe(t)))]),_:3},16,[ ` data - orientation ` , ` class ` ]))}}),Gy=A({__name: ` TabsContent ` ,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Dt(t, ` class ` );return(e,r)=>(z(),J(B(rl),W({"data-slot": ` tabs - content ` ,class:B(Q)( ` text - sm flex - 1 outline - none ` ,t.class)},B(n)),{default:M(()=>[F(e. $ slots, ` default ` )]),_:3},16,[ ` class ` ]))}}),Ky=A({__name: ` TabsList ` ,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{default: ` default ` }},setup(e){let t=e,n=Dt(t, ` class ` , ` variant ` );return(r,i)=>(z(),J(B(il),W({"data-slot": ` tabs - list ` ,"data-variant":e.variant},B(n),{class:B(Q)(B(Jy)({variant:e.variant}),t.class)}),{default:M(()=>[F(r. $ slots, ` default ` )]),_:3},16,[ ` data - variant ` , ` class ` ]))}}),qy=A({__name: ` TabsTrigger ` ,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Dt(t, ` class ` ),r=se(n);return(e,n)=>(z(),J(B(al),W({"data-slot": ` tabs - trigger ` ,class:B(Q)( ` 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 : outline - ring disabled : pointer Line truncated
` )}};PL.defaultYaml={explicit:!1,version: ` 1.2 ` },PL.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function FL(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 IL(e){let t=new Set;return DL(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function LL(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function RL(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=IL(e);let a=LL(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(yL(t.node)||xL(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 zL(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=zL(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=zL(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=zL(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=zL(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function BL(e,t,n){if(Array.isArray(e))return e.map((e,t)=>BL(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!CL(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 VL=class{constructor(e){Object.defineProperty(this,mL,{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(!gL(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=BL(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?zL(i,{"":o}, ` ` ,o):o}},HL=class extends VL{constructor(e){super(cL),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=[],DL(e,{Node:(e,t)=>{(hL(t)||CL(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||=(BL(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=UL(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(FL(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 UL(e,t,n){if(hL(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(xL(t)){let r=0;for(let i of t.items){let t=UL(e,i,n);t>r&&(r=t)}return r}if(vL(t)){let r=UL(e,t.key,n),i=UL(e,t.value,n);return Math.max(r,i)}return 1}var WL=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,GL=class extends VL{constructor(e){super(fL),this.value=e}toJSON(e,t){return t?.keep?this.value:BL(this.value,e,t)}toString(){return String(this.value)}};GL.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,GL.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,GL.PLAIN= ` PLAIN ` ,GL.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,GL.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var KL= ` tag : yaml . org , 2002 : ` ;function qL(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 JL(e,t,n){if(gL(e)&&(e=e.contents),SL(e))return e;if(vL(e)){let t=n.schema[uL].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 HL(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=KL+t.slice(2));let l=qL(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new GL(e);return c&&(c.node=t),t
Line truncated
` )? $ L (n,t):n.includes(`
` )}),t}function Pd(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 Fd(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var Id={class: ` [ overflow - wrap : anywhere ] ` },Ld={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },Rd={class: ` font - mono text - [ 0.85 em ] ` },zd={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Bd={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Vd={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Hd={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },Ud={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },Wd={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },Gd={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },Kd={key:8,class: ` mb - 2.5 last : mb - 0 ` },qd=A({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=L(()=>Nd(t.text));return(e,t)=>(z(),K( ` div ` ,Id,[(z(!0),K(U,null,q(n.value,(e,t)=>(z(),K(U,{key:t},[e.kind=== ` pre ` ?(z(),K( ` pre ` ,Ld,[G( ` code ` ,Rd,H(e.code),1)])):e.kind=== ` table ` ?(z(),K( ` table ` ,zd,[G( ` thead ` ,null,[G( ` tr ` ,null,[(z(!0),K(U,null,q(e.head,(e,t)=>(z(),K( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[N(Ad,{inline:e},null,8,[ ` inline ` ])]))),128))])]),G( ` tbody ` ,null,[(z(!0),K(U,null,q(e.rows,(e,t)=>(z(),K( ` tr ` ,{key:t},[(z(!0),K(U,null,q(e,(e,t)=>(z(),K( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[N(Ad,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(z(),K( ` blockquote ` ,Bd,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(z(),K( ` h1 ` ,Vd,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(z(),K( ` h2 ` ,Hd,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(z(),K( ` h3 ` ,Ud,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(z(),K( ` ul ` ,Wd,[(z(!0),K(U,null,q(e.items,(e,t)=>(z(),K( ` li ` ,{key:t},[N(Ad,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(z(),K( ` ol ` ,Gd,[(z(!0),K(U,null,q(e.items,(e,t)=>(z(),K( ` li ` ,{key:t},[N(Ad,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(z(),K( ` p ` ,Kd,[N(Ad,{inline:e.inline},null,8,[ ` inline ` ])])):R( ` ` ,!0)],64))),128))]))}}),Jd={class: ` truncate ` },Yd=A({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Ae( ` RouterLink ` );return z(),J(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:M(()=>[N(B(Wt),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),G( ` span ` ,Jd,H(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),Xd={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },Zd={class: ` font - semibold text - foreground ` },Qd={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` }, $ d=A({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=L(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=L(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=L(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=L(()=>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?(z(),J(Yd,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(z(),K( ` div ` ,Xd,[N(B(qn),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),G( ` span ` ,Zd,H(n.value),1),r.value?(z(),K( ` code ` ,Qd,H(r.value),1)):R( ` ` ,!0),G( ` span ` ,{class:P(B(Q)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},H(a.value),3)]))}}),ef={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },tf={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },nf={key:3,class: ` whitespace - pre - wrap ` },rf=A({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(z(),K( ` div ` ,{class:P([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[G( ` div ` ,{class:P(B(Q)( ` max - w - [ min ( 78 ch , 86 % ) ] rounded - [ 0.85 rem ] px - 4 py - 3 leading - normal [ overflow - wrap : anywhere ] ` ,e.assistant? ` bg - muted ` : ` bg - primary / 15 ` ))},[e.assistant&&e.tools.length?(z(),K( ` div ` ,ef,[(z(!0),K(U,null,q(e.tools,(t,n)=>(z(),J( $ d,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):R( ` ` ,!0),e.media.length?(z(),K( ` div ` ,tf,[(z(!0),K(U,null,q(e.media,(e,t)=>(z(),J(Cd,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):R( ` ` ,!0),e.assistant?(z(),J(qd,{key:2,text:e.text},null,8,[ ` text ` ])):(z(),K( ` div ` ,nf,H(e.text),1)),F(t. $ slots, ` default ` )],2)],2))}}),af={class: ` text - sm ` },of={class: ` font - medium ` },sf={key:0,class: ` mt - 1 text - fg - muted ` },cf={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },lf=A({__name: ` ChatChoo Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>Q_? ` $ { n . slice ( 0 , Q _ ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}function ev(e){return String(e|| ` event ` ).replaceAll( ` _ ` , ` ` ).replace(/ \b \w /g,e=>e.toUpperCase())}function tv(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 nv(e){let t=Number(e);return!Number.isFinite(t)||t<=0? ` ` :t.toLocaleString( ` en - US ` )}function rv(e){return typeof e== ` string ` ?e: ` ` }function iv(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=tv(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,rv(t.error),rv(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:[rv(t.previous_stage)&& ` after $ { rv ( t . previous _stage ) } ` ,rv(t.previous_reason)].filter(Boolean).join( ` : ` )||e.detail|| ` ` }}if(e.kind=== ` agent _finish ` ){let r=nv(t.iterations),i=nv(t.tokens),a=Number(t.cached_tokens)||0,o=nv((Number(t.prompt_tokens)||0)-a),s=nv(t.completion_tokens),c=nv(t.cached_tokens),l=[r&& ` $ { r } iterations ` ,i&& ` $ { i } tokens ` ,o&& ` $ { o } fresh prompt ` ,s&& ` $ { s } completion ` ,c&& ` $ { c } cached ` ,rv(t.model)].filter(Boolean);return{title: ` Agent $ { rv ( t . status ) || ` finished ` } : $ { n } ` ,detail:l.join( ` · ` )||e.detail|| ` ` }}if(e.kind=== ` remediation _round ` ){let e=Number(t.of),n=rv(t.author);return{title: ` Remediation $ { rv ( t . round ) } $ { e > 0 ? ` of ${ e } ` : ` ` } ` ,detail:[n&& ` answers $ { n } ' s review ` ,t.review_id? ` # $ { rv ( t . review _id ) } ` : ` ` ].filter(Boolean).join( ` ` )}}if(e.kind=== ` review _approved ` ){let e=rv(t.pr_number);return{title: ` Pull request approved ` ,detail:[rv(t.author),e&& ` # $ { e } ` ].filter(Boolean).join( ` · ` )}}if(e.kind=== ` step _retried ` )return{title: ` Attempt $ { rv ( t . attempt ) } of $ { rv ( t . of ) } failed : $ { e . stage || ` step ` } ` ,detail:rv(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=rv(t.source),n=rv(t.capture_id),r=[{label: ` binding $ { rv ( t . binding _name ) || rv ( 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 $ { rv ( t . captured _after ) } ` : ` ` ].filter(Boolean).join( ` · ` )}}return{title:ev(e.kind||e.type),detail:e.detail|| ` ` }}var av=[ ` title ` ],ov=A({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=e_(),a=L(()=>i.taskIDFor(n.event)),o=L(()=> $ _(n.event));function s(){a.value>0&&r( ` open ` ,a.value)}let c=L(()=>n.event.at?Ng(n.event.at): ` — ` );return(e,t)=>(z(),J(B(Y_),{class:P(a.value>0? ` cursor - pointer ` : ` ` ),role:a.value>0? ` link ` :void 0,tabindex:a.value>0?0:void 0,title:a.value>0? ` Open task details ` :void 0,onClick:s,onKeydown:[vt(St(s,[ ` prevent ` ]),[ ` enter ` ]),vt(St(s,[ ` prevent ` ]),[ ` space ` ])]},{default:M(()=>[N(B( $ ),{class: ` font - medium ` },{default:M(()=>[j(H(B(iv)({...n.event,at:void 0,detail:void 0}).title),1)]),_:1}),N(B( $ ),{class: ` font - mono ` },{default:M(()=>[j(H(a.value>0? ` # $ { a . value } ` : ` — ` ),1)]),_:1}),N(B( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:M(()=>[G( ` span ` ,{class: ` block truncate ` ,title:o.value.truncated?o.value.full:void 0},H(o.value.text),9,av)]),_:1}),N(B( $ ),null,{default:M(()=>[j(H(c.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),sv=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function cv(e){return(Number(e?.task_id)||0)>0}function lv(e,t){return t=== ` tasks ` ?cv(e):t!== ` system ` ||!cv(e)}function uv(e,t){return e.filter(e=>lv(e,t))}function dv(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function fv(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function pv(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=fv( $ _(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 mv={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },hv={class: ` max - h - [ 28 rem ] overflow - y - auto ` },gv=[ ` aria - expanded ` , ` aria - 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 wy(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 Ty(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 Ey(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 Dy(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 Oy=Y([]),ky=Y([]),Ay=Y(!0),jy=Y(null),My=Y(null),Ny=Y(!1),Py=Y(null);async function Fy(){try{let e=await Z.eventTypes(Sy().workspace);Ay.value=e.enabled!==!1,Oy.value=e.event_types||[],ky.value=e.proposals||[],jy.value=null}catch(e){jy.value=e.message||String(e)}}function Iy(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function Ly(e){Py.value=null,My.value=e}function Ry(e){let t=Ky.value.find(t=>String(t.id)===e.sample_id);Ly({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:Iy(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function zy(e= ` ` ){Ly({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function By(e){Ly({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:Iy(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function Vy(){My.value=null}async function Hy(){let e=My.value;if(e){Ny.value=!0;try{if(e.mode=== ` edit ` &&e.id)await Z.eventTypeUpdate(e.id,{name:e.name,rule:Dy(e.rule)});else{let t=e.mode=== ` paste ` ?Cy(e.headersText):e.exampleHeaders;await Z.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:Dy(e.rule),example:{headers:t,body:e.body}})}My.value=null,await Fy()}catch(e){Py.value=e.message||String(e)}finally{Ny.value=!1}}}var Uy=Y(null);async function Wy(){let e=Uy.value;if(Uy.value=null,e)try{await Z.eventTypeDelete(e.id),await Fy()}catch(e){jy.value=e.message||String(e)}}var Gy=100,Ky=Y([]),qy=Y(!0),Jy=Y(null),Yy=Y(!0),Xy=Y(null);async function Zy(){try{let e=await Z.captures(Gy);qy.value=e.enabled!==!1,Ky.value=e.captures||[],Jy.value=null}catch(e){Jy.value=e.message||String(e)}finally{Yy.value=!1}}function Qy(e){let t=Ky.value.find(t=>t.id===e);return t&&(Xy.value=t),!!t}function $ y(){Ky.value.length&&(Xy.value=Ky.value[0])}function eb(){me( ` captures ` ,()=>{Zy(),Fy()})}var tb=A({__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:n}){let r=e,i=n,a=Dt(r, ` class ` ),o=t(a,i);return(e,t)=>(z(),J(B(el),W({"data-slot": ` tabs ` ,"data-orientation":B(o).orientation|| ` horizontal ` },B(o),{class:B(Q)( ` gap - 2 group / tabs flex data - horizontal : flex - col ` ,r.class)}),{default:M(t=>[F(e. $ slots, ` default ` ,nt(Oe(t)))]),_:3},16,[ ` data - orientation ` , ` class ` ]))}}),nb=A({__name: ` TabsContent ` ,props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Dt(t, ` class ` );return(e,r)=>(z(),J(B(rl),W({"data-slot": ` tabs - content ` ,class:B(Q)( ` text - sm flex - 1 outline - none ` ,t.class)},B(n)),{default:M(()=>[F(e. $ slots, ` default ` )]),_:3},16,[ ` class ` ]))}}),rb=A({__name: ` TabsList ` ,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]},variant:{default: ` default ` }},setup(e){let t=e,n=Dt(t, ` class ` , ` variant ` );return(r,i)=>(z(),J(B(il),W({"data-slot": ` tabs - list ` ,"data-variant":e.variant},B(n),{class:B(Q)(B(ab)({variant:e.variant}),t.class)}),{default:M(()=>[F(r. $ slots, ` default ` )]),_:3},16,[ ` data - variant ` , ` class ` ]))}}),ib=A({__name: ` TabsTrigger ` ,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e,n=Dt(t, ` class ` ),r=se(n);return(e,n)=>(z(),J(B(al),W({"data-slot": ` tabs - trigger ` ,class:B(Q)( ` 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 : outline - ring disabled : pointer Line truncated
` )}};HL.defaultYaml={explicit:!1,version: ` 1.2 ` },HL.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function UL(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 WL(e){let t=new Set;return FL(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function GL(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function KL(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=WL(e);let a=GL(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(DL(t.node)||kL(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 qL(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=qL(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=qL(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=qL(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=qL(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function JL(e,t,n){if(Array.isArray(e))return e.map((e,t)=>JL(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!jL(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 YL=class{constructor(e){Object.defineProperty(this,SL,{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(!wL(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=JL(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?qL(i,{"":o}, ` ` ,o):o}},XL=class extends YL{constructor(e){super(gL),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=[],FL(e,{Node:(e,t)=>{(CL(t)||jL(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||=(JL(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=ZL(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(UL(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 ZL(e,t,n){if(CL(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(kL(t)){let r=0;for(let i of t.items){let t=ZL(e,i,n);t>r&&(r=t)}return r}if(EL(t)){let r=ZL(e,t.key,n),i=ZL(e,t.value,n);return Math.max(r,i)}return 1}var QL=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` , $ L=class extends YL{constructor(e){super(bL),this.value=e}toJSON(e,t){return t?.keep?this.value:JL(this.value,e,t)}toString(){return String(this.value)}}; $ L.BLOCK_FOLDED= ` BLOCK _FOLDED ` , $ L.BLOCK_LITERAL= ` BLOCK _LITERAL ` , $ L.PLAIN= ` PLAIN ` , $ L.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` , $ L.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var eR= ` tag : yaml . org , 2002 : ` ;function tR(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 nR(e,t,n){if(wL(e)&&(e=e.contents),AL(e))return e;if(EL(e)){let t=n.schema[vL].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 XL(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=eR+t.slice(2));let l=tR(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new $ L(e);return c&&(c.node=t),t
Line truncated
` )?sR (n,t):n.includes( `
` )? `
` + $ L (n,t):(e.endsWith(` ` )? ` ` : ` ` )+n,t R= ` flow ` ,n R= ` block ` ,r R= ` quoted ` ;function i R(e,t,n= ` flow ` ,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r== ` number ` &&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n=== ` block ` &&(h=a R(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n=== ` quoted ` &&r=== ` \ \ ` ){switch(g=h,e[h+1]){case ` x ` :h+=3;break;case ` u ` :h+=5;break;case ` U ` :h+=9;break;default:h+=1}_=h}if(r=== `
` )n=== ` block ` &&(h=a R(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` +sR (n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,l R= ` flow ` ,u R= ` block ` ,d R= ` quoted ` ;function f R(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=p R(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=p R(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` &&p!== ` ` ){let t=e[h+1];t&&t!== ` ` &&t!== `
` &&t!== ` ` &&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n=== ` quoted ` ){for(;p=== ` ` ||p=== ` ` ;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v= ` \ n$ { t } $ { e . slice ( 0 , a ) } ` :(n=== ` quoted ` &&u[i]&&(v+= ` $ { e [ i ] } \ \ ` ),v+= ` \ n$ { t } $ { e . slice ( i + 1 , a ) } ` )}return v}function a R(e,t,n){let r=t,i=t+1,a=e[i];for(;a=== ` ` ||a=== ` ` ;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!== `
` );r=t,i=t+1,a=e[i]}return r}var o R=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),s R=e=>/^(%|---| \. \. \. )/m.test(e);function c R(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]=== `
` ){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function l R(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(s R(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 p R(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 m R=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),h R=e=>/^(%|---| \. \. \. )/m.test(e);function g R(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 _ R(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 R(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 R(o,a,r R,o R(t,!1))}function u R(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return l R(e,t);let n=t.indent||(s R(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : iR ( r , n , tR , oR ( t , ! 1 ) ) } function dR ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = lR ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? uR : i && ! t ? lR : n ? uR : lR } return r ( e , t ) } var fR ; try { fR = 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:f R(o,a,d R,m R(t,!1))}function v R(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return _ R(e,t);let n=t.indent||(h R(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : fR ( r , n , lR , mR ( t , ! 1 ) ) } function yR ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = _R ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? vR : i && ! t ? _R : n ? vR : _R } return r ( e , t ) } var bR ; try { bR = RegExp ( ` (^|(?<!
) )
+ ( ? !
| $ ) ` , ` g ` )}catch{f R=/ \n +(?! \n | $ )/g}function p R({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/ \n [ \t ]+ $ /.test(n))return d R(n,r);let l=r.indent||(r.forceBlockIndent||s R(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===G L.BLOCK_FOLDED?!1:t===G L.BLOCK_LITERAL||!c R(n,c,l.length);if(!n)return u? ` |
| $ ) ` , ` g ` )}catch{b R=/ \n +(?! \n | $ )/g}function x R({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 y R(n,r);let l=r.indent||(r.forceBlockIndent||h R(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t=== $ L.BLOCK_FOLDED?!1:t=== $ L.BLOCK_LITERAL||!g R(n,c,l.length);if(!n)return u? ` |
` : ` >
` ;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!== `
` &&e!== ` ` &&e!== ` ` )break}let p=n.substring(f),m=p.indexOf( `
` );m===-1?d= ` - ` :n===p||m!==p.length-1?(d= ` + ` ,a&&a()):d= ` ` ,p&&=(n=n.slice(0,-p.length),p[p.length-1]=== `
` &&(p=p.slice(0,-1)),p.replace(f R, ` $ & $ { 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(b R, ` $ & $ { l } ` ));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e=== ` ` )h=!0;else if(e=== `
` )_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/ \n +/g, ` $ & $ { l } ` ));let y=(h?l? ` 2 ` : ` 1 ` : ` ` )+d;if(e&&(y+= ` ` +s(e.replace(/ ?[ \r \n ]+/g, ` ` )),i&&i()),!u){let e=n.replace(/ \n +/g, `
$ & ` ).replace(/(?:^| \n )([ \t ].*)(?:([ \n \t ]*) \n (?![ \n \t ]))?/g, ` $1$2 ` ).replace(/ \n +/g, ` $ & $ { l } ` ),i=!1,a=o R(r,!0);o!== ` folded ` &&t!==G L.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=i R( ` $ { v } $ { e } $ { p } ` ,l,n R,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function m R(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes( `
` )||u&&/[[ \] {},]/.test(a))return d R(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?d R(a,t):p R(e,t,n,r);if(!s&&!u&&i!==G L.PLAIN&&a.includes( `
` ))return p R(e,t,n,r);if(s R(a)){if(c=== ` ` )return t.forceBlockIndent=!0,p R(e,t,n,r);if(s&&c===l)return d R(a,t)}let d=a.replace(/ \n +/g, ` $ & \ n$ { c } ` );if(o){let e=e=>e.default&&e.tag!== ` tag : yaml . org , 2002 : str ` &&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return d R(a,t)}return s?d:i R(d,c,t R,o R(t,!1))}function h R(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!==G L.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=G L.QUOTE_DOUBLE);let c=e=>{switch(e){case G L.BLOCK_FOLDED:case G L.BLOCK_LITERAL:return i||a?d R(o.value,t):p R(o,t,n,r);case G L.QUOTE_DOUBLE:return l R(o.value,t);case G L.QUOTE_SINGLE:return u R(o.value,t);case G L.PLAIN:return m R(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error( ` Unsupported default string type $ { r } ` )}return l}function g R(e,t){let n=Object.assign({blockQuote:!0,commentString:QL ,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 _ R(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(y L(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function v R(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(y L(e)||x L(e))&&e.anchor;a&&F L(a)&&(n.add(a),i.push( ` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function y R(e,t,n,r){if(v L(e))return e.toString(t,n,r);if(h L(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=S L(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=_ R(t.doc.schema.tags,a);let o=v R(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify== ` function ` ?i.stringify(a,t,n,r):y L(a)?h R(a,t,n,r):a.toString(t,n,r);return o?y L(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function b R({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=S L(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(x L(e)||!S L(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||x L(e)||(y L(e)?e.type===G L.BLOCK_FOLDED||e.type===G L.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=y R(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error( ` With simple keys , single line scalar must not span more than 1024 characters ` );p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g=== ` ` ? ` ? ` :p? ` ? $ { g } ` :g}else if(a&&!d||t==null&&p)return g= ` ? $ { g } ` ,f&&!m?g+=e R(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=e R(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=e R(g,n.indent,l(f))));let _,v,y;S L(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&y L(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&b L(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=y R(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { $L ( 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=m R(r,!0);o!== ` folded ` &&t!== $ L.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=f R( ` $ { v } $ { e } $ { p } ` ,l,u R,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function S R(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 y R(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?y R(a,t):x R(e,t,n,r);if(!s&&!u&&i!== $ L.PLAIN&&a.includes( `
` ))return x R(e,t,n,r);if(h R(a)){if(c=== ` ` )return t.forceBlockIndent=!0,x R(e,t,n,r);if(s&&c===l)return y R(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 y R(a,t)}return s?d:f R(d,c,l R,m R(t,!1))}function C R(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!== $ L.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s= $ L.QUOTE_DOUBLE);let c=e=>{switch(e){case $ L.BLOCK_FOLDED:case $ L.BLOCK_LITERAL:return i||a?y R(o.value,t):x R(o,t,n,r);case $ L.QUOTE_DOUBLE:return _ R(o.value,t);case $ L.QUOTE_SINGLE:return v R(o.value,t);case $ L.PLAIN:return S R(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 w R(e,t){let n=Object.assign({blockQuote:!0,commentString:oR ,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 T R(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(D L(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 E R(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(D L(e)||k L(e))&&e.anchor;a&&U L(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 D R(e,t,n,r){if(E L(e))return e.toString(t,n,r);if(C L(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=A L(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=T R(t.doc.schema.tags,a);let o=E R(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):D L(a)?C R(a,t,n,r):a.toString(t,n,r);return o?D L(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function O R({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=A L(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(k L(e)||!A L(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||k L(e)||(D L(e)?e.type=== $ L.BLOCK_FOLDED||e.type=== $ L.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=D R(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+=c R(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=c R(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=c R(g,n.indent,l(f))));let _,v,y;A L(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&&D L(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&O L(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=D R(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { sR ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
` &&y&&(S= `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&x L(t)){let e=x[0],r=x.indexOf( `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&k L(t)){let e=x[0],r=x.indexOf( `
` ),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e=== ` & ` ||e=== ` ! ` )){let n=x.indexOf( ` ` );e=== ` & ` &&n!==-1&&n<r&&x[n+1]=== ` ! ` &&(n=x.indexOf( ` ` ,n+1)),(n===-1||r<n)&&(t=!0)}t||(S= ` \ n$ { n . indent } ` )}}else(x=== ` ` ||x[0]=== `
` )&&(S= ` ` );return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=e R(g,n.indent,l(y)):h&&i&&i(),g}function x R(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var S R= ` << ` ,C R={identify:e=>e===S R||typeof e== ` symbol ` &&e.description===S R,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new G L(Symbol(S R)),{addToJSMap:T R}),stringify:()=>S R},w R=(e,t)=>(C R.identify(t)||y L(t)&&(!t.type||t.type===G L.PLAIN)&&C R.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===C R.tag&&e.default);function T R(e,t,n){let r=D R(e,n);if(b L(r))for(let n of r.items)E R(e,t,n);else if(Array.isArray(r))for(let n of r)E R(e,t,n);else E R(e,t,r)}function E R(e,t,n){let r=D R(e,n);if(!_ L(r))throw Error( ` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function D R(e,t){return e&&h L(t)?t.resolve(e.doc,e):t}function O R(e,t,{key:n,value:r}){if(S L(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(w R(e,n))T R(e,t,r);else{let i=B L(n, ` ` ,e);if(t instanceof Map)t.set(i,B L(r,i,e));else if(t instanceof Set)t.add(i);else{let a=k R(n,i,e),o=B L(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function k R(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(S L(e)&&n?.doc){let t=g R(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+ ` ... " ` ),x R(n.doc.options.logLevel, ` Keys with collection values will be stringified due to JS Object restrictions : $ { e } . Set mapAsMap : true to use object keys . ` ),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function A R(e,t,n){return new j R(JL (e,void 0,n),JL (t,void 0,n))}var j R=class e{constructor(e,t=null){Object.defineProperty(this,m L,{value:d L}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return S L(n)&&(n=n.clone(t)),S L(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return O R(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?b R(this,e,t,n):JSON.stringify(this)}};function M R(e,t,n){return(t.inFlow??e.flow?P R:N R)(e,t,n)}function N R({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(S L(i))!d&&i.spaceBefore&&f.push( ` ` ),F R(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(v L(i)){let e=S L(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),F R(n,f,e.commentBefore,d))}d=!1;let s=y R(i,u,()=>o=null,()=>d=!0);o&&(s+=e R(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+=c R(g,n.indent,l(y)):h&&i&&i(),g}function k R(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var A R= ` << ` ,j R={identify:e=>e===A R||typeof e== ` symbol ` &&e.description===A R,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new $ L(Symbol(A R)),{addToJSMap:N R}),stringify:()=>A R},M R=(e,t)=>(j R.identify(t)||D L(t)&&(!t.type||t.type=== $ L.PLAIN)&&j R.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===j R.tag&&e.default);function N R(e,t,n){let r=F R(e,n);if(O L(r))for(let n of r.items)P R(e,t,n);else if(Array.isArray(r))for(let n of r)P R(e,t,n);else P R(e,t,r)}function P R(e,t,n){let r=F R(e,n);if(!T L(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 F R(e,t){return e&&C L(t)?t.resolve(e.doc,e):t}function I R(e,t,{key:n,value:r}){if(A L(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(M R(e,n))N R(e,t,r);else{let i=J L(n, ` ` ,e);if(t instanceof Map)t.set(i,J L(r,i,e));else if(t instanceof Set)t.add(i);else{let a=L R(n,i,e),o=J L(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function L R(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(A L(e)&&n?.doc){let t=w R(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 R(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 R R(e,t,n){return new z R(nR (e,void 0,n),nR (t,void 0,n))}var z R=class e{constructor(e,t=null){Object.defineProperty(this,S L,{value:y L}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return A L(n)&&(n=n.clone(t)),A L(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return I R(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?O R(this,e,t,n):JSON.stringify(this)}};function B R(e,t,n){return(t.inFlow??e.flow?H R:V R)(e,t,n)}function V R({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(A L(i))!d&&i.spaceBefore&&f.push( ` ` ),U R(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(E L(i)){let e=A L(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),U R(n,f,e.commentBefore,d))}d=!1;let s=D R(i,u,()=>o=null,()=>d=!0);o&&(s+=c R(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+= `
` + $ L (l(e),c),s&&s()):d&&o&&o(),p}function P R({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(S L(i))i.spaceBefore&&d.push(` ` ),F R(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(v L(i)){let e=S L(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),F R(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=S L(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=y R(i,c,()=>a=null);l||=d.length>u||o.includes( `
` ),n<e.length-1?o+= ` , ` :t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+= ` , ` )),a&&(o+=e R(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 FR({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i= $ L(t(r),e);n.push(i.trimStart())}}function IR(e,t){let n=yL(t)?t.value:t;for(let r of e)if(vL(r)&&(r.key===t||r.key===n||yL(r.key)&&r.key.value===n))return r}var LR=class extends ZL{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(uL,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(AR(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=vL(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new jR(e,e?.value):new jR(e.key,e.value);let r=IR(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );yL(r.value)&&WL(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=IR(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=IR(this.items,e)?.value;return(!t&&yL(n)?n.value:n)??void 0}has(e){return!!IR(this.items,e)}set(e,t){this.add(new jR(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)OR(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!vL(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})),MR(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},RR={collection: ` map ` ,default:!0,nodeClass:LR,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return _L(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>LR.from(e,t,n)},zR=class extends ZL{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(pL,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=BR(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=BR(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&yL(r)?r.value:r}has(e){let t=BR(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=BR(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];yL(r)&&WL(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(BL(e,String(r++),t));return n}toString(e,t,n){return e?MR(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(JL(a,void 0,n))}}return i}};function BR(e){let t=yL(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var VR={collection: ` seq ` ,default:!0,nodeClass:zR,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return bL(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>zR.from(e,t,n)},HR={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),hR(e,t,n,r)}},UR={identify:e=>e==null,createNode:()=>new GL(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new GL(null),stringify:({source:e},t)=>typeof e== ` string ` &&UR.test.test(e)?e:t.options.nullStr},WR={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new GL(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&WR.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function GR({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 KR={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:GR},qR={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 hR({comment:e,type:t,value:s},r,i,a)}};function sz(e,t){if(bL(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!vL(r)){if(_L(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new jR(new GL(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]=vL(r)?r:new jR(r)}}else t( ` Expected a sequence for this tag ` );return e}function cz(e,t,n){let{replacer:r}=n,i=new zR(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(AR(o,s,n))}return i}var lz={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:sz,createNode:cz},uz=class e extends zR{constructor(){super(),this.add=LR.prototype.add.bind(this),this.delete=LR.prototype.delete.bind(this),this.get=LR.prototype.get.bind(this),this.has=LR.prototype.has.bind(this),this.set=LR.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(vL(e)?(r=BL(e.key, ` ` ,t),i=BL(e.value,r,t)):r=BL(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=cz(e,t,n),i=new this;return i.items=r.items,i}};uz.tag= ` tag : yaml . org , 2002 : omap ` ;var dz={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:uz,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=sz(e,t),r=[];for(let{key:e}of n.items)yL(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new uz,n)},createNode:(e,t,n)=>uz.from(e,t,n)};function fz({value:e,source:t},n){return t&&(e?pz:mz).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var pz={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 GL(!0),stringify:fz},mz={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 GL(!1),stringify:fz},hz={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:GR},gz={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():GR(e)}},_z={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 GL(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:GR},vz=e=>typeof e== ` bigint ` ||Number.isInteger(e);function yz(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 bz(e,t,n){let{value:r}=e;if(vz(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return GR(e)}var xz={identify:vz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>yz(e,2,2,n),stringify:e=>bz(e,2, ` 0 b ` )},Sz={identify:vz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>yz(e,1,8,n),stringify:e=>bz(e,8, ` 0 ` )},Cz={identify:vz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>yz(e,0,10,n),stringify:GR},wz={identify:vz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>yz(e,2,16,n),stringify:e=>bz(e,16, ` 0 x ` )},Tz=class e extends LR{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=vL(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new jR(e.key,null):new jR(e,null),IR(this.items,t.key)||this.items.push(t)}get(e,t){let n=IR(this.items,e);return!t&&vL(n)?yL(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=IR(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new jR(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( $ L (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( $ L (a(t),` ` )))}return n.join( `
` +sR (l(e),c),s&&s()):d&&o&&o(),p}function H R({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(A L(i))i.spaceBefore&&d.push( ` ` ),U R(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(E L(i)){let e=A L(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),U R(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=A L(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=D R(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+=c R(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 UR({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=sR(t(r),e);n.push(i.trimStart())}}function WR(e,t){let n=DL(t)?t.value:t;for(let r of e)if(EL(r)&&(r.key===t||r.key===n||DL(r.key)&&r.key.value===n))return r}var GR=class extends aR{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(vL,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(RR(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=EL(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new zR(e,e?.value):new zR(e.key,e.value);let r=WR(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );DL(r.value)&&QL(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=WR(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=WR(this.items,e)?.value;return(!t&&DL(n)?n.value:n)??void 0}has(e){return!!WR(this.items,e)}set(e,t){this.add(new zR(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)IR(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!EL(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})),BR(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},KR={collection: ` map ` ,default:!0,nodeClass:GR,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return TL(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>GR.from(e,t,n)},qR=class extends aR{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(xL,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=JR(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=JR(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&DL(r)?r.value:r}has(e){let t=JR(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=JR(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];DL(r)&&QL(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(JL(e,String(r++),t));return n}toString(e,t,n){return e?BR(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(nR(a,void 0,n))}}return i}};function JR(e){let t=DL(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var YR={collection: ` seq ` ,default:!0,nodeClass:qR,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return OL(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>qR.from(e,t,n)},XR={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),CR(e,t,n,r)}},ZR={identify:e=>e==null,createNode:()=>new $ L(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new $ L(null),stringify:({source:e},t)=>typeof e== ` string ` &&ZR.test.test(e)?e:t.options.nullStr},QR={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new $ L(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&QR.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function $ R({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 ez={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: $ R},tz={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 CR({comment:e,type:t,value:s},r,i,a)}};function hz(e,t){if(OL(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!EL(r)){if(TL(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new zR(new $ L(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]=EL(r)?r:new zR(r)}}else t( ` Expected a sequence for this tag ` );return e}function gz(e,t,n){let{replacer:r}=n,i=new qR(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(RR(o,s,n))}return i}var _z={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:hz,createNode:gz},vz=class e extends qR{constructor(){super(),this.add=GR.prototype.add.bind(this),this.delete=GR.prototype.delete.bind(this),this.get=GR.prototype.get.bind(this),this.has=GR.prototype.has.bind(this),this.set=GR.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(EL(e)?(r=JL(e.key, ` ` ,t),i=JL(e.value,r,t)):r=JL(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=gz(e,t,n),i=new this;return i.items=r.items,i}};vz.tag= ` tag : yaml . org , 2002 : omap ` ;var yz={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:vz,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=hz(e,t),r=[];for(let{key:e}of n.items)DL(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new vz,n)},createNode:(e,t,n)=>vz.from(e,t,n)};function bz({value:e,source:t},n){return t&&(e?xz:Sz).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var xz={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 $ L(!0),stringify:bz},Sz={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 $ L(!1),stringify:bz},Cz={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: $ R},wz={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(): $ R(e)}},Tz={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 $ L(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: $ R},Ez=e=>typeof e== ` bigint ` ||Number.isInteger(e);function Dz(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 Oz(e,t,n){let{value:r}=e;if(Ez(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return $ R(e)}var kz={identify:Ez,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>Dz(e,2,2,n),stringify:e=>Oz(e,2, ` 0 b ` )},Az={identify:Ez,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>Dz(e,1,8,n),stringify:e=>Oz(e,8, ` 0 ` )},jz={identify:Ez,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>Dz(e,0,10,n),stringify: $ R},Mz={identify:Ez,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>Dz(e,2,16,n),stringify:e=>Oz(e,16, ` 0 x ` )},Nz=class e extends GR{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=EL(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new zR(e.key,null):new zR(e,null),WR(this.items,t.key)||this.items.push(t)}get(e,t){let n=WR(this.items,e);return!t&&EL(n)?DL(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=WR(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new zR(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(sR (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(sR (a(t), ` ` )))}return n.join( `
` )+ `
` }var B z=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,m L,{value:l L});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new P L({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[m L]:{value:l L}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=S L(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){V z(this.contents)&&this.contents.add(e)}addIn(e,t){V z(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=I L(this);e.anchor=!t||n.has(t)?L L(t|| ` a ` ,n):t}return new H L(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=R L(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=JL (e,l,p);return o&&x L(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new j R(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return V z(this.contents)?this.contents.delete(e):!1}deleteIn(e){return XL (e)?this.contents!=null&&(this.contents=null,!0):V z(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return x L(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return XL (e)?!t&&y L(this.contents)?this.contents.value:this.contents:x L(this.contents)?this.contents.getIn(e,t):void 0}has(e){return x L(this.contents)?this.contents.has(e):!1}hasIn(e){return XL (e)?this.contents!==void 0:x L(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=YL (this.schema,[e],t):V z(this.contents)&&this.contents.set(e,t)}setIn(e,t){XL (e)?this.contents=t:this.contents==null?this.contents=YL (this.schema,Array.from(e),t):V z(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e== ` number ` &&(e=String(e));let n;switch(e){case ` 1.1 ` :this.directives?this.directives.yaml.version= ` 1.1 ` :this.directives=new P L({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new P L({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new R z(Object.assign(n,t));else throw Error( ` With a null YAML version , the { schema : Schema } option is required ` )}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r== ` number ` ?r:100},s=B L(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?z L(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return z z(this,e)}};function V z(e){if(x L(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var H z=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},U z=class extends H z{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},W z=class extends H z{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},G z=(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 Kz (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 qz (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(qz (t.key)||qz (t.value))return!0}return!1;default:return!0}}function Jz (e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&qz (t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function Yz (e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||y L(e)&&y L(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var Xz = ` All mapping items must start at the same column ` ;function Zz ({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??L R)(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=Kz (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 ` ,Xz )),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||qz (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 ` ,Xz );n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&Jz (r.indent,u,i),n.atKey=!1,Yz (n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=Kz (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&&Jz (r.indent,f,i),s=c.range[2];let l=new j R(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new j R(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 Qz ({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??z R)(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=Kz (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&&Jz (r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function $ z (e,t,n,r){let i=` ` ;if(e){let a=!1,o= ` ` ;for(let s of e){let{source:e,type:c}=s;switch(c){case ` space ` :a=!0;break;case ` comment ` :{n&&!a&&r(s, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let t=e.substring(1)|| ` ` ;i?i+=o+t:i=t,o= ` ` ;break}case ` newline ` :i&&(o+=e),a=!0;break;default:r(s, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { c } at node end ` )}t+=e.length}}return{comment:i,offset:t}}var e B= ` Block collections are not allowed within flow collections ` ,t B=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function n B({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?L R:z R))(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=Kz (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&&qz (f)&&i(f, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` )}if(a===0)h.comma&&i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` );else if(h.comma||i(h.start, ` MISSING _CHAR ` , ` Missing , between $ { s } items ` ),h.comment){let e= ` ` ;loop:for(let t of d)switch(t.type){case ` comma ` :case ` space ` :break;case ` comment ` :e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];v L(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],t B(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,e B)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);t B(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,e B),n.atKey=!1;let _=Kz (p??[],{flow:s,indicator: ` map - value - ind ` ,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type=== ` newline ` ){i(e, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` );break}}h.start<_.found.offset-1024&&i(_.found, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit flow sequence key ` )}}else m&&( ` source ` in m&&m.source?.[0]=== ` : ` ?i(m, ` MISSING _CHAR ` , ` Missing space after : in $ { s } ` ):i(_.start, ` MISSING _CHAR ` , ` Missing , or : between $ { s } items ` ));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?t B(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,e B):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new j R(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;Yz (n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new L R(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= $ z (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 B(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?Zz (e,t,n,r,a):n.type=== ` block - seq ` ?Qz (e,t,n,r,a):n B(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 B(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e)):null;if(n.type=== ` block - seq ` ){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n, ` MISSING _CHAR ` , ` Missing newline after block sequence props ` )}let s=n.type=== ` block - map ` ? ` map ` :n.type=== ` block - seq ` ? ` seq ` :n.start.source=== ` { ` ? ` map ` : ` seq ` ;if(!a||!o||o=== ` ! ` ||o===L R.tagName&&s=== ` map ` ||o===z R.tagName&&s=== ` seq ` )return r B(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 B(e,t,n,i,o)}let l=r B(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=S L(u)?u:new G L(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function a B(e,t,n){let r=t.offset,i=o B(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?G L.BLOCK_FOLDED:G L.BLOCK_LITERAL,o=t.source?s B(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 J z=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,S L,{value:_ L});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 L({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[S L]:{value:_ L}});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=A L(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){Y z(this.contents)&&this.contents.add(e)}addIn(e,t){Y z(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=W L(this);e.anchor=!t||n.has(t)?G L(t|| ` a ` ,n):t}return new X L(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}=K L(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=nR (e,l,p);return o&&k L(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new z R(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return Y z(this.contents)?this.contents.delete(e):!1}deleteIn(e){return iR (e)?this.contents!=null&&(this.contents=null,!0):Y z(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return k L(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return iR (e)?!t&&D L(this.contents)?this.contents.value:this.contents:k L(this.contents)?this.contents.getIn(e,t):void 0}has(e){return k L(this.contents)?this.contents.has(e):!1}hasIn(e){return iR (e)?this.contents!==void 0:k L(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=rR (this.schema,[e],t):Y z(this.contents)&&this.contents.set(e,t)}setIn(e,t){iR (e)?this.contents=t:this.contents==null?this.contents=rR (this.schema,Array.from(e),t):Y z(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 L({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 L({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 K z(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=J L(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 ` ?q L(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 q z(this,e)}};function Y z(e){if(k L(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var X z=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},Z z=class extends X z{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},Q z=class extends X z{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}}, $ z=(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 eB (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 tB (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(tB (t.key)||tB (t.value))return!0}return!1;default:return!0}}function nB (e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&tB (t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function rB (e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||D L(e)&&D L(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var iB = ` All mapping items must start at the same column ` ;function aB ({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??G R)(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=eB (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 ` ,iB )),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||tB (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 ` ,iB );n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&nB (r.indent,u,i),n.atKey=!1,rB (n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=eB (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&&nB (r.indent,f,i),s=c.range[2];let l=new z R(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 z R(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 oB ({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??q R)(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=eB (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&&nB (r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function sB (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 c B= ` Block collections are not allowed within flow collections ` ,l B=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function u B({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?G R:q R))(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=eB (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&&tB (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];E L(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],l B(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,c B)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);l B(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,c B),n.atKey=!1;let _=eB (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?l B(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,c B):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new z R(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;rB (n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new G R(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=sB (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 d B(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?aB (e,t,n,r,a):n.type=== ` block - seq ` ?oB (e,t,n,r,a):u B(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function f B(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===G R.tagName&&s=== ` map ` ||o===q R.tagName&&s=== ` seq ` )return d B(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),d B(e,t,n,i,o)}let l=d B(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=A L(u)?u:new $ L(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function p B(e,t,n){let r=t.offset,i=m B(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ? $ L.BLOCK_FOLDED: $ L.BLOCK_LITERAL,o=t.source?h B(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===G L.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=== $ L.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ):t.length>c||r[0]=== ` ` ?(f=== ` ` ?f= `
` :!p&&f=== `
` &&(f= `
@@ -75,59 +75,59 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
` +o[e][0].slice(c);d[d.length-1]!== `
` &&(d+= `
` );break;default:d+= `
` }let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function o B({offset:e,props:t},n,r){if(t[0].type!== ` block - scalar - header ` )return r(t[0], ` IMPOSSIBLE ` , ` Block scalar header not found ` ),null;let{source:i}=t[0],a=i[0],o=0,s= ` ` ,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n=== ` - ` ||n=== ` + ` ))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c, ` UNEXPECTED _TOKEN ` , ` Block scalar header includes extra characters : $ { i } ` );let l=!1,u= ` ` ,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case ` space ` :l=!0;case ` newline ` :d+=i.source.length;break;case ` comment ` :n&&!l&&r(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` ),d+=i.source.length,u=i.source.substring(1);break;case ` error ` :r(i, ` UNEXPECTED _TOKEN ` ,i.message),d+=i.source.length;break;default:{r(i, ` UNEXPECTED _TOKEN ` , ` Unexpected token in block scalar header : $ { i . type } ` );let e=i.source;e&&typeof e== ` string ` &&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function s B(e){let t=e.split(/ \n ( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[ ` ` ,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function c B(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=G L.PLAIN,c=l B(a,l);break;case ` single - quoted - scalar ` :s=G L.QUOTE_SINGLE,c=u B(a,l);break;case ` double - quoted - scalar ` :s=G L.QUOTE_DOUBLE,c=f B(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= $ z (o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function l B(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 } ` ) , dB ( e ) } function uB ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , dB ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function dB ( 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 m B({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 B(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 g B(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= $ L.PLAIN,c=_ B(a,l);break;case ` single - quoted - scalar ` :s= $ L.QUOTE_SINGLE,c=v B(a,l);break;case ` double - quoted - scalar ` :s= $ L.QUOTE_DOUBLE,c=b B(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=sB (o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function _ B(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 } ` ) , yB ( e ) } function vB ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , yB ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function yB ( e ) { let t = / ( . * ? ) \ r ? \ n / s y , n = t . e x e c ( e ) ; i f ( ! n ) r e t u r n e ; l e t r , i ; t r y { r = R e g E x p ( ` ( ? < ! [ ] ) [ ] + $ ` ) , i = R e g E x p ( ` ^ [ ] + | ( ? < ! [ ] ) [ ] + $ ` , ` g ` ) } c a t c h { r = / [ \ t ] + $ / , i = / ^ [ \ t ] + | [ \ t ] + $ / g } l e t a = n [ 1 ] . r e p l a c e ( r , ` ` ) , o = ` ` , s = t . l a s t I n d e x ; f o r ( ; n = t . e x e c ( e ) ; ) { l e t e = n [ 1 ] . r e p l a c e ( i , ` ` ) ; e = = = ` ` ? o = = = `
` ?a+=o:o= `
` :(a+=o+e,o= ` ` ),s=t.lastIndex}let c=/[ \t ]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]?? ` ` )}function f B(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 b B(e,t){let n= ` ` ;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!== ` \ r ` ||e[r+1]!== `
` ){if(i=== `
` ){let{fold:t,offset:i}=p B(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=m B[i];if(a)n+=a;else if(i=== `
` ){let{fold:t,offset:i}=x B(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=S B[i];if(a)n+=a;else if(i=== `
` )for(i=e[r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` \ r ` &&e[r+1]=== `
` )for(i=e[++r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` x ` ||i=== ` u ` ||i=== ` U ` ){let a=i=== ` x ` ?2:i=== ` u ` ?4:8;n+=h B(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+=C B(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1, ` BAD _DQ _ESCAPE ` , ` Invalid escape sequence $ { i } ` ),n+=i}}else if(i=== ` ` ||i=== ` ` ){let t=r,a=e[r+1];for(;a=== ` ` ||a=== ` ` ;)a=e[++r+1];a!== `
` &&(a!== ` \ r ` ||e[r+2]!== `
` )&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!== ` "`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing " quote ` ),n}function p B(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 x B(e,t){let n= ` ` ,r=e[t+1];for(;(r=== ` ` ||r=== ` ` ||r=== `
` ||r=== ` \ r ` )&&(r!== ` \ r ` ||e[t+2]=== `
` );)r=== `
` &&(n+= `
` ),t+=1,r=e[t+1];return n||= ` ` ,{fold:n,offset:t}}var m B={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function hB ( 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 gB ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? aB ( e , t , r ) : cB ( 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 [ fL ] : c ? _B ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? vB ( e , i , t , r ) : e . schema [ fL ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = yL ( a ) ? a : new GL ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new GL ( 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 _B ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ fL ] ; 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 [ fL ] ) } function vB ( { 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 [ fL ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ fL ] ; 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 yB ( 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 bB = { composeNode : xB , composeEmptyNode : SB } ; function xB ( 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 = CB ( 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 = gB ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = iB ( bB , 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 ? ? = SB ( 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 && ( ! yL ( 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 SB ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = gB ( e , { type : ` scalar ` , offset : yB ( 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 CB ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new HL ( 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 = $z ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function wB ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new Bz ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = Kz ( 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 ? xB ( c , i , l , o ) : SB ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = $z ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function TB ( 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 EB ( 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 S B={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function CB ( 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 wB ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? pB ( e , t , r ) : gB ( 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 [ bL ] : c ? TB ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? EB ( e , i , t , r ) : e . schema [ bL ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = DL ( a ) ? a : new $L ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new $L ( 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 TB ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ bL ] ; 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 [ bL ] ) } function EB ( { 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 [ bL ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ bL ] ; 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 DB ( 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 OB = { composeNode : kB , composeEmptyNode : AB } ; function kB ( 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 = jB ( 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 = wB ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = fB ( OB , 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 ? ? = AB ( 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 && ( ! DL ( 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 AB ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = wB ( e , { type : ` scalar ` , offset : DB ( 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 jB ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new XL ( 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 = sB ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function MB ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new Jz ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = eB ( 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 ? kB ( c , i , l , o ) : AB ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = sB ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function NB ( 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 PB ( e ) { let t = ` ` , n = ! 1 , r = ! 1 ; for ( let i = 0 ; i < e . length ; ++ i ) { let a = e [ i ] ; switch ( a [ 0 ] ) { case ` # ` : t += ( t === ` ` ? ` ` : r ? `
` : `
` )+(a.substring(1)|| ` ` ),n=!0,r=!1;break;case ` % ` :e[i+1]?.[0]!== ` # ` &&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var D B=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=T B(e);r?this.warnings.push(new W z(i,t,n)):this.errors.push(new U z(i,t,n))},this.directives=new P L({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=E B(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment? ` $ { e . comment } \ n$ { n } ` :n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(x L(i)&&!i.flow&&i.items.length>0){let e=i.items[0];v L(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:E B(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case ` directive ` :this.directives.add(e.source,(t,n,r)=>{let i=T B(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=w B(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e, ` MISSING _CHAR ` , ` Missing directives - end / doc - start indicator line ` ),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case ` byte - order - mark ` :case ` space ` :break;case ` comment ` :case ` newline ` :this.prelude.push(e.source);break;case ` error ` :{let t=e.source? ` $ { e . message } : $ { JSON . stringify ( e . source ) } ` :e.message,n=new U z(T B(e), ` UNEXPECTED _TOKEN ` ,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case ` doc - end ` :{if(!this.doc){this.errors.push(new U z(T B(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t= $ z (e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?` $ { e } \ n$ { t . comment } ` :t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new U z(T B(e), ` UNEXPECTED _TOKEN ` , ` Unsupported token $ { e . type } ` ))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new B z(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 B=Symbol( ` break visit ` ),k B=Symbol( ` skip children ` ),A B=Symbol( ` remove item ` );function j B(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),M B(Object.freeze([]),e,t)}j B.BREAK=O B,j B.SKIP=k B,j B.REMOVE=A B,j B.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&& ` items ` in t)n=t.items[r];else return}return n},j B.parentCollection=(e,t)=>{let n=j B.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&& ` items ` in i)return i;throw Error( ` Parent collection not found ` )};function M B(e,t,n){let r=n(t,e);if(typeof r== ` symbol ` )return r;for(let i of[ ` key ` , ` value ` ]){let a=t[i];if(a&& ` items ` in a){for(let t=0;t<a.items.length;++t){let r=M B(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===O B)return O B;else r===A B&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function N B(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 F B=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=N B(e);r?this.warnings.push(new Q z(i,t,n)):this.errors.push(new Z z(i,t,n))},this.directives=new H L({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=P B(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(k L(i)&&!i.flow&&i.items.length>0){let e=i.items[0];E L(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:P B(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=N B(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=M B(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 Z z(N B(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 Z z(N B(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=sB (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 Z z(N B(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 J z(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}}},I B=Symbol( ` break visit ` ),L B=Symbol( ` skip children ` ),R B=Symbol( ` remove item ` );function z B(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),B B(Object.freeze([]),e,t)}z B.BREAK=I B,z B.SKIP=L B,z B.REMOVE=R B,z B.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},z B.parentCollection=(e,t)=>{let n=z B.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 B B(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=B B(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===I B)return I B;else r===R B&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function V B(e){switch(e){case ` ` :return ` byte - order - mark ` ;case ` ` :return ` doc - mode ` ;case ` ` :return ` flow - error - end ` ;case ` ` :return ` scalar ` ;case ` -- - ` :return ` doc - start ` ;case ` ... ` :return ` doc - end ` ;case ` ` :case `
` :case ` \ r
` :return ` newline ` ;case ` - ` :return ` seq - item - ind ` ;case ` ? ` :return ` explicit - key - ind ` ;case ` : ` :return ` map - value - ind ` ;case ` { ` :return ` flow - map - start ` ;case ` } ` :return ` flow - map - end ` ;case ` [ ` :return ` flow - seq - start ` ;case ` ] ` :return ` flow - seq - end ` ;case ` , ` :return ` comma ` }switch(e[0]){case ` ` :case ` ` :return ` space ` ;case ` # ` :return ` comment ` ;case ` % ` :return ` directive - line ` ;case ` * ` :return ` alias ` ;case ` & ` :return ` anchor ` ;case ` ! ` :return ` tag ` ;case ` ' ` :return ` single - quoted - scalar ` ;case ` " ` :return ` double - quoted - scalar ` ;case ` | ` :case ` > ` :return ` block - scalar - header ` }return null}function P B(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var F B=new Set( ` 0123456789 ABCDEFabcdef ` ),I B=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , L B = n e w S e t ( ` , [ ] { } ` ) , R B = n e w S e t ( ` , [ ] { }
\ r ` ),z B=e=>!e||R B.has(e),B B=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 H B(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var U B=new Set( ` 0123456789 ABCDEFabcdef ` ),W B=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , G B = n e w S e t ( ` , [ ] { } ` ) , K B = n e w S e t ( ` , [ ] { }
\ r ` ),q B=e=>!e||K B.has(e),J B=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer= ` ` ,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!= ` string ` )throw TypeError( ` source is not a string ` );this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next?? ` stream ` ;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t=== ` ` ||t=== ` ` ;)t=this.buffer[++e];return!t||t=== ` # ` ||t=== `
` ||t=== ` \ r ` &&this.buffer[e+1]=== `
` }charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t=== ` ` ;)t=this.buffer[++n+e];if(t=== ` \ r ` ){let t=this.buffer[n+e+1];if(t=== `
` ||!t&&!this.atEnd)return e+n+1}return t=== `
` ||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t=== ` - ` ||t=== ` . ` ){let t=this.buffer.substr(e,3);if((t=== ` -- - ` ||t=== ` ... ` )&&P B(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!= ` number ` ||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf( `
` ,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]=== ` \ r ` &&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case ` stream ` :return yield*this.parseStream();case ` line - start ` :return yield*this.parseLineStart();case ` block - start ` :return yield*this.parseBlockStart();case ` doc ` :return yield*this.parseDocument();case ` flow ` :return yield*this.parseFlowCollection();case ` quoted - scalar ` :return yield*this.parseQuotedScalar();case ` block - scalar ` :return yield*this.parseBlockScalar();case ` plain - scalar ` :return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext( ` stream ` );if(e[0]=== ` ` &&(yield*this.pushCount(1),e=e.substring(1)),e[0]=== ` % ` ){let t=e.length,n=e.indexOf( ` # ` );for(;n!==-1;){let r=e[n-1];if(r=== ` ` ||r=== ` ` ){t=n-1;break}n=e.indexOf( ` # ` ,n+1)}for(;;){let n=e[t-1];if(n=== ` ` ||n=== ` ` )--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(), ` stream ` }if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(), ` stream ` }return yield ` ` ,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext( ` line - start ` );if(e=== ` - ` ||e=== ` . ` ){if(!this.atEnd&&!this.hasChars(4))return this.setNext( ` line - start ` );let e=this.peek(3);if((e=== ` -- - ` ||e=== ` ... ` )&&P B(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e=== ` -- - ` ? ` doc ` : ` stream ` }return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!P B(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext( ` block - start ` );if((e=== ` - ` ||e=== ` ? ` ||e=== ` : ` )&&P B(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e, ` block - start ` }return ` doc ` }*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext( ` doc ` );let t=yield*this.pushIndicators();switch(e[t]){case ` # ` :yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case ` { ` :case ` [ ` :return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1, ` flow ` ;case ` } ` :case ` ] ` :return yield*this.pushCount(1), ` doc ` ;case ` * ` :return yield*this.pushUntil(z B), ` doc ` ;case ` "`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&P B(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield` `,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(z B),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||P B(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=== ` ... ` )&&H B(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=== ` ... ` )&&H B(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&&!H B(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=== ` : ` )&&H B(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(q B), ` 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(`...`))&&H B(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(q B),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||H B(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`' ` )for(;t!==-1&&this.buffer[t+1]=== ` '`;)t=this.buffer.indexOf(`' ` ,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]=== ` \ \ ` ;)e+=1;if(e%2==0)break;t=this.buffer.indexOf( ` " ` ,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf( `
` ,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf( `
` ,e)}r!==-1&&(t=r-(n[r-1]=== ` \ r ` ?2:1))}if(t===-1){if(!this.atEnd)return this.setNext( ` quoted - scalar ` );t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel? ` flow ` : ` doc ` }*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t=== ` + ` )this.blockScalarKeep=!0;else if(t> ` 0 ` &&t<= ` 9 ` )this.blockScalarIndent=Number(t)-1;else if(t!== ` - ` )break}return yield*this.pushUntil(e=>P B(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=>H B(e)||e=== ` # ` )}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case ` ` :t+=1;break;case `
` :e=r,t=0;break;case ` \ r ` :{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext( ` block - scalar ` );if(e=== `
` )break}default:break loop}if(!n&&!this.atEnd)return this.setNext( ` block - scalar ` );if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf( `
` ,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext( ` block - scalar ` );e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n=== ` ` ;)n=this.buffer[++r];if(n=== ` ` ){for(;n=== ` ` ||n=== ` ` ||n=== ` \ r ` ||n=== `
` ;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r=== ` \ r ` &&(r=this.buffer[--n]);let i=n;for(;r=== ` ` ;)r=this.buffer[--n];if(r=== `
` &&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield ` ` ,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r=== ` : ` ){let r=this.buffer[n+1];if(P B(r)||e&&L B.has(r))break;t=n}else if(P B(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(H B(r)||e&&G B.has(r))break;t=n}else if(H B(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` ?(n+=1,r= `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&L B.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&L B.has(r))break;t=n}return!r&&!this.atEnd?this.setNext( ` plain - scalar ` ):(yield ` ` ,yield*this.pushToIndex(t+1,!0),e? ` flow ` : ` doc ` )}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield ` ` ),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case ` ! ` :e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case ` & ` :e+=yield*this.pushUntil(z B),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(P B(n)||t&&L B.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)=== ` < ` ){let e=this.pos+2,t=this.buffer[e];for(;!P B(t)&&t!== ` > ` ;)t=this.buffer[++e];return yield*this.pushToIndex(t=== ` > ` ?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(I B.has(t))t=this.buffer[++e];else if(t=== ` % ` &&F B.has(this.buffer[e+1])&&F B.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&&G B.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&G B.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(q B),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(H B(n)||t&&G B.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(;!H B(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(W B.has(t))t=this.buffer[++e];else if(t=== ` % ` &&U B.has(this.buffer[e+1])&&U B.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)}},VB=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 HB(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function UB(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 WB(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 GB(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 KB(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 qB(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 JB(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!HB(t.start, ` explicit - key - ind ` )&&!HB(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,WB(t.value)?t.value.end?qB(t.value.end,t.sep):t.value.end=t.sep:qB(t.start,t.sep),delete t.sep)}var YB=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 BB,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=NB(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 ` &&JB(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&&UB(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)}},YB=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 XB(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function ZB(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 QB(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 $ B(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 eV(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 tV(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 nV(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!XB(t.start, ` explicit - key - ind ` )&&!XB(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,QB(t.value)?t.value.end?tV(t.value.end,t.sep):t.value.end=t.sep:tV(t.start,t.sep),delete t.sep)}var rV=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 JB,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=VB(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 ` &&nV(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&&ZB(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)){qB(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(HB(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=KB(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(HB(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(WB(t.key)&&!HB(t.sep, ` newline ` )){let e=KB(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]}):HB(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&&!HB(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)){qB(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||HB(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)){tV(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(XB(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=eV(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(XB(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(QB(t.key)&&!XB(t.sep, ` newline ` )){let e=eV(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]}):XB(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&&!XB(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)){tV(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||XB(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=KB(GB(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=KB(GB(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 XB(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new VB||null,prettyErrors:t}}function ZB(e,t={}){let{lineCounter:n,prettyErrors:r}=XB(t),i=new YB(n?.addNewLine),a=new DB(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 Uz(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(Gz(e,n)),o.warnings.forEach(Gz(e,n))),o}function QB(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=ZB(e,n);if(!i)return null;if(i.warnings.forEach(e=>xR(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 $ B(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 gL(e)&&!r?e.toString(n):new Bz(e,r,n).toString(n)}var eV=e=>typeof e== ` object ` &&!!e&&!Array.isArray(e),tV=e=>eV(e)?Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?t:[]]):[];function nV(e){if(eV(e)){if(eV(e.parallel))return{kind: ` parallel ` ,base:[ ` parallel ` ],branches:tV(e.parallel)};if(eV(e.switch))return{kind: ` switch ` ,base:[ ` switch ` , ` cases ` ],on:typeof e.switch.on== ` string ` ?e.switch.on: ` ` ,branches:tV(e.switch.cases)}}}function rV(e){return e.slice(2).includes( ` parallel ` )}function iV(e,t){let n=ZB(e).getIn(t,!0);if(_L(n))return n.toJSON()}function aV(e,t,n){let r=ZB(e);return r.setIn(t,r.createNode(gV(n))),r.toString()}function oV(e,t,n){let r=ZB(e),i=t.slice(0,-1),a=rV(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(bL(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!bL(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 sV(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 cV(e,t){let n=e.getIn(t,!0),r=nV(_L(n)?n.toJSON():void 0),i=r?e.getIn([...t,...r.base],!0):void 0;if(!r||!_L(i))throw Error( ` This step has no branches . ` );return{kind:r.kind,branches:i}}function lV(e,t,n){let r=ZB(e),{kind:i,branches:a}=cV(r,t);if(sV(n,i),a.has(n))throw Error( ` Branch $ { n } already exists . ` );return a.set(n,r.createNode([])),r.toString()}function uV(e,t,n,r){let i=ZB(e),{kind:a,branches:o}=cV(i,t);if(sV(r,a),n!==r&&o.has(r))throw Error( ` Branch $ { r } already exists . ` );let s=o.items.find(e=>yL(e.key)&&e.key.value===n);if(!s||!yL(s.key))throw Error( ` Branch $ { n } does not exist . ` );return s.key.value=r,i.toString()}function dV(e,t,n){let r=ZB(e),{kind:i,branches:a}=cV(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 AV(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(EV)].map(e=>e[1]))]}function jV(e){let t=ZB(e).toJS(),n=DV(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=DV(e)?e:{},p=nV(d),m=p?.kind??(typeof d.type== ` string ` ?d.type: ` ` ),h=DV(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,title:g||TV(m),type:m,role:yV(m),step:l?.length===2?String(Number(l[1])+1).padStart(2, ` 0 ` ):void 0,detail:p?.on? ` on $ { p . on . replace ( /^steps\./ , ` ` ) } ` :OV(m,h),summary:kV(h),when:typeof d.when== ` string ` ?d.when:void 0,retry:DV(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 AV([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=nV(t);if(n){let{kind:i,base:a,branches:o}=n,c=p(t,String(e+1),0,u*SV,void 0,void 0,[ ` steps ` ,e]);m(l,c,[ ` steps ` ,e-1]),u++;let d=DV(t)&&typeof t.id== ` string ` ?t.id:i,f=i=== ` switch ` &&!o.some(([e])=>e==="default"),h=o.length+ +!!f,g=[],_=0;o.forEach(([t,n],o)=>{let s=(o-(h-1)/2)*CV,l=[c],f=[ ` steps ` ,e,...a,t];n.forEach((n,r)=>{let a=p(n, ` $ { e + 1 } - $ { t } - $ { r + 1 } ` ,s,(u+r)*SV,t,d,[...f,r],i);m(l,a,[...f,r-1]),l=[a]}),_=Math.max(_,n.length);let v= ` add - $ { e } - $ { t } ` ;r.push({id:v,type: ` add ` ,position:{x:s+104,y:(u+n.length)*SV},data:{kind: ` step ` ,key:v,title: ` ` ,type: ` ` ,detail: ` ` ,branch:t,lane:i,insertAfter:[...f,n.length-1]}}),m(l,v),g.push(v)});let v=(Math.max(_,1)+1)*SV-24;o.forEach(([t],n)=>{let a=(n-(h-1)/2)*CV;r.push({id: ` lane - $ { e } - $ { t } ` ,type: ` lane ` ,position:{x:a-12,y:u*SV-40},style:{width: ` 264 px ` ,height: ` $ { v } px ` },zIndex:-1,data:{kind: ` step ` ,key:t,title:t,type: ` ` ,detail: ` ` ,lane:i}})}),f&&(g.push(c),s.add(c)),l=g,u+=Math.max(_,1)+1;continue}let i=p(t,String(e+1),0,u*SV,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*SV-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 MV={agent:Jt,command:Rn,repo:fn,gate:Pn,forge:bn,human:Un,review:ln,workflow:Kn},NV={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function PV(e){return e=== ` parallel ` ?fn:e=== ` switch ` ?In:MV[e.split( ` . ` )[0]]??Kn}function FV(e){return Object.keys(NV).map(t=>({title:NV[t],icon:MV[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function IV(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 LV(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function RV(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 zV(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!== ` ` &&(n[r.name]=RV(e,r.type))}return n}var BV=A({__name: ` WorkflowPicker ` ,props:{value:{},workflows:{},label:{}},emits:[ ` pick ` ],setup(e,{emit:t}){let n=t;return(t,r)=>(z(),J(B(Nl),{"model-value":e.value||void 0,"onUpdate:modelValue":r[0]||=e=>n( ` pick ` ,String(e))},{default:M(()=>[N(B(Bl),{"aria-label":e.label},{default:M(()=>[N(B(Vl),{placeholder: ` Choose workflow ` })]),_:1},8,[ ` aria - label ` ]),N(B(Pl),null,{default:M(()=>[e.value&&!e.workflows.some(t=>t.id===e.value)?(z(),J(B(Ll),{key:0,value:e.value,disabled: ` ` },{default:M(()=>[j(H(e.value)+ ` ( unavailable ) ` ,1)]),_:1},8,[ ` value ` ])):R( ` ` ,!0),(z(!0),K(U,null,q(e.workflows,e=>(z(),J(B(Ll),{key:e.id,value:e.id},{default:M(()=>[j(H(e.id),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ]))}});function VV(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function HV(e,t=[]){let n=ZB(e),r=n.errors[0];if(r)return{ok:!1,message:nH(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!rH(i))return{ok:!1,message: ` A workflow is a mapping with an id and steps . ` };let a=typeof i.id== ` st Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:QV (e)}))}var XV =/^( \s *)(- \s +)?/,ZV =/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function QV (e){let{code:t,comment:n}= $ V (e),r=e H(t);return n&&r.push({text:n,kind:` comment ` }),r}function $ V (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 e H(e){if(!e)return[];let t=[],n=XV .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=ZV .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,...t H(i[4]??``)]):[...t,...t H(r)]}function t H(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 nH ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function rH(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function iH(e){return typeof e== ` string ` &&e.trim()!== ` ` }var aH={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },oH={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },sH={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },cH={class: ` min - w - 0 flex - 1 ` },lH={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },uH={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },dH={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },fH={key:1,class: ` space - y - 3 ` },pH={key:0,class: ` block space - y - 1.5 ` },mH={id: ` switch - on ` },hH=[ ` value ` ],gH={class: ` text - xs font - medium text - muted - foreground ` },_H={class: ` flex items - center gap - 2 ` },vH={key:1,role: ` alert ` ,class: ` text - xs text - danger ` },yH={key:2,class: ` space - y - 1.5 ` },bH=[ ` title ` ],xH={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },SH={key:3,class: ` divide - y divide - border rounded - md border border - border ` },CH=[ ` title ` ],wH={key:0,class: ` space - y - 3 ` },TH={class: ` text - [ 13 px ] ` },EH={key:0,class: ` text - danger ` },DH={class: ` ml - 2 text - xs text - fg - subtle ` },OH={key:1,class: ` space - y - 3 ` },kH={class: ` text - [ 13 px ] ` },AH={class: ` ml - 2 text - xs text - fg - subtle ` },jH=[ ` title ` ],MH={key:0,class: ` text - xs text - danger ` },NH={class: ` space - y - 2 ` },PH={class: ` divide - y divide - border rounded - md border border - border ` },FH={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },IH={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },LH={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },RH={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },zH={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },BH=A({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=L(()=>iV(n.yaml,n.path)??{}),a=L(()=>nV(i.value)),o=L(()=>a.value?.kind??(typeof i.value.type== ` string ` ?i.value.type: ` ` )),s=L(()=>a.value?.branches.map(([e])=>e)??[]),c=L(()=>o.value=== ` parallel ` ?2:1);function l(e){r( ` update : yaml ` ,aV(n.yaml,n.path,{...i.value,switch:{...i.value.switch,on:e}}))}let u=Y( ` ` ),d=Y( ` ` );function f(e,t,i= ` ` ){try{let a=e=== ` add ` ?lV(n.yaml,n.path,t):e=== ` rename ` ?uV(n.yaml,n.path,t,i):dV(n.yaml,n.path,t);r( ` update : yaml ` ,a),u.value= ` ` ,d.value= ` ` }catch(e){d.value=String(e.message)}}let p=L(()=>n.vocabulary.find(e=>e.name===o.value)),m=L(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),h=L(()=>hV(n.yaml,n.path)),g=L(()=>p.value?.settings&&i.value.settings?qV(i.value.settings,p.value.settings, ` settings ` ): ` ` ),_=[ ` mission ` , ` workflow ` , ` message ` , ` body ` , ` plan ` , ` then ` , ` status ` , ` detail ` , ` run ` , ` rules ` ],v=/mission|body|detail|plan|rules/;function y(e,t){return[ ` workflow . call ` , ` workflow . handoff ` ].includes(o.value)&&e=== ` workflow ` ||o.value=== ` human . approve ` &&e=== ` then ` ? ` workflow ` :o.value=== ` agent . run ` &&e=== ` model ` ? ` select ` :t.type=== ` string ` ?t.enum? ` select ` :v.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 b=L(()=>{let e=Object.entries(p.value?.settings?.properties??{}).filter(([e])=>o.value!== ` workflow . call ` ||![ ` inputs ` , ` outputs ` ].includes(e)).map(([e,t])=>({key:e,schema:t,kind:y(e,t),options:o.value=== ` agent . run ` &&e=== ` model ` ?n.modelAliases:t.enum??[]})),t=e.filter(e=>_.includes(e.key)&&e.kind!== ` boolean ` ).sort((e,t)=>_.indexOf(e.key)-_.indexOf(t.key))[0],r=e.filter(e=>e!==t);return{lead:t,compact:r.filter(e=>[ ` workflow ` , ` select ` , ` line ` , ` number ` , ` boolean ` ].includes(e.kind)),long:r.filter(e=>[ ` text ` , ` lines ` , ` yaml ` ].includes(e.kind))}});function x(e){let{id:t,type:i,...a}=e;r( ` update : yaml ` ,aV(n.yaml,n.path,{id:t,type:i,...a}))}function S(e,t){x({...i.value,[e]:t})}function C(e){S( ` retry ` ,{...i.value.retry,...e})}function w(e,t){let n={...m.value,[e]:t};o.value=== ` workflow . call ` &&e=== ` wait ` &&t!==!0&&delete n.outputs,x({...i.value,settings:n})}function ee(e,t){let n={...m.value,[e]:t};o.value=== ` workflow . call ` &&t!==m.value[e]&&(delete n.inputs,delete n.outputs),x({...i.value,settings:n})}let T=L(()=>n.workflows.find(e=>e.id===m.value.workflow)),te=L(()=>Object.entries(_V(T.value?.yaml?? ` ` , ` inputs ` )??{})),E=L(()=>Object.entries(_V(T.value?.yaml?? ` ` , ` outputs ` )??{})),ne=L(()=>Object.entries(_V(n.yaml, ` inputs ` )??{})),D=L(()=>Object.entries(_V(n.yaml, ` outputs ` )??{})),re=L(()=>m.value.inputs??{}),O=L(()=>m.value.outputs??{}),ie=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),ae=e=>re.value[e]===void 0? ` ` :String(re.value[e]);function oe(e,t,n){w( ` inputs ` ,{...re.value,[e]:t=== ` ` ?void 0:ie(t)?t:RV(t,n?? ` string ` )})}let se=Y(null);function ce(e,t){let n=se.value??b.value.lead?.key;if(!n)return;let r=typeof m.value[n]== ` string ` ?m.value[n]: ` ` ,i= ` { { steps . $ { e } . $ { t } } } ` ;w(n,r? ` $ { r . trimEnd ( ) } $ { i } ` :i)}let le=Y({});function ue(e,t){try{w(e,t.trim()?QB(t):void 0),le.value={...le.value,[e]: ` ` }}catch(t){le.valu
Line truncated
` )[0]}}}let de=e=>e===void 0? ` ` : $ B(e).trimEnd(),fe=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),pe=e=>typeof m.value[e]== ` string ` ?m.value[e]: ` ` ;return(t,n)=>(z(),K( ` aside ` ,aH,[G( ` header ` ,oH,[G( ` span ` ,sH,[(z(),J(He(B(PV)(o.value)),{class: ` size - 4 ` }))]),G( ` div ` ,cH,[N(B(k),{"model-value":i.value.id?? ` ` ,class: ` h - 7 truncate border - transparent px - 1 font - medium shadow - none hover : border - input dark : bg - transparent ` ,placeholder:B(TV)(o.value),"aria-label": ` Step id ` ,"onUpdate:modelValue":n[0]||=e=>S( ` id ` ,String(e))},null,8,[ ` model - value ` , ` placeholder ` ]),G( ` div ` ,lH,H(o.value),1)]),N(B(X),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:n[1]||=e=>r( ` close ` )},{default:M(()=>[N(B(Jn))]),_:1})]),G( ` div ` ,uH,[g.value?(z(),K( ` p ` ,dH,H(g.value),1)):R( ` ` ,!0),a.value?(z(),K( ` section ` ,fH,[o.value=== ` switch ` ?(z(),K( ` label ` ,pH,[n[18]||=G( ` span ` ,{class: ` text - xs font - medium text - muted - foreground ` ,title: ` The value whose case runs ; a case named default runs when none matches ` }, ` Switch on ` ,-1),N(B(k),{"model-value":a.value.on,class: ` font - mono ` ,placeholder: ` steps . assess . result . fit ` ,list: ` switch - on ` ,onChange:n[2]||=e=>l(e.target.value.trim())},null,8,[ ` model - value ` ]),G( ` datalist ` ,mH,[(z(!0),K(U,null,q(h.value,e=>(z(),K( ` option ` ,{key:e,value: ` steps . $ { e } . result . ` },null,8,hH))),128))])])):R( ` ` ,!0),G( ` div ` ,gH,H(o.value=== ` switch ` ? ` Cases ` : ` Branches ` ),1),(z(!0),K(U,null,q(s.value,e=>(z(),K( ` div ` ,{key:e,class: ` flex items - center gap - 2 ` },[N(B(k),{"model-value":e,class:P(o.value=== ` switch ` && ` font - mono ` ),"aria-label": ` $ { o . value === ` switch ` ? ` Case ` : ` Branch ` } $ { e } ` ,onChange:t=>f( ` rename ` ,e,t.target.value.trim())},null,8,[ ` model - value ` , ` class ` , ` aria - label ` , ` onChange ` ]),N(B(X),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Remove $ { e } ` ,disabled:s.value.length<=c.value,onClick:t=>f( ` delete ` ,e)},{default:M(()=>[N(B(Bn))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),G( ` div ` ,_H,[N(B(k),{modelValue:u.value,"onUpdate:modelValue":n[3]||=e=>u.value=e,"aria-label":o.value=== ` switch ` ? ` New case value ` : ` New branch name ` ,placeholder:o.value=== ` switch ` ? ` Value , or default ` : ` Branch name ` ,onKeydown:n[4]||=vt(St(e=>f( ` add ` ,u.value.trim()),[ ` prevent ` ]),[ ` enter ` ])},null,8,[ ` modelValue ` , ` aria - label ` , ` placeholder ` ]),N(B(X),{type: ` button ` ,size: ` icon - sm ` ,variant: ` outline ` ,"aria-label":o.value=== ` switch ` ? ` Add case ` : ` Add branch ` ,disabled:!u.value.trim(),onClick:n[5]||=e=>f( ` add ` ,u.value.trim())},{default:M(()=>[N(B(Dn))]),_:1},8,[ ` aria - label ` , ` disabled ` ])]),d.value?(z(),K( ` p ` ,vH,H(d.value),1)):R( ` ` ,!0)])):R( ` ` ,!0),b.value.lead?(z(),K( ` section ` ,yH,[G( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:b.value.lead.schema.description},[j(H(fe(b.value.lead.key,b.value.lead.schema))+ ` ` ,1),b.value.lead.schema.description?(z(),J(B(an),{key:0,class: ` size - 3 text - fg - subtle ` })):R( ` ` ,!0)],8,bH),b.value.lead.kind=== ` workflow ` ?(z(),J(BV,{key:0,value:pe(b.value.lead.key),workflows:e.workflows,label:fe(b.value.lead.key,b.value.lead.schema),onPick:n[6]||=e=>ee(b.value.lead.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` ])):b.value.lead.kind=== ` select ` ?(z(),J(B(MI),{key:1,size: ` sm ` ,class: ` w - full ` ,"model-value":pe(b.value.lead.key),"onUpdate:modelValue":n[7]||=e=>w(b.value.lead.key,String(e)||void 0)},{default:M(()=>[N(B(NI),{value: ` ` },{default:M(()=>[...n[19]||=[j( ` Default ` ,-1)]]),_:1}),(z(!0),K(U,null,q(b.value.lead.options,e=>(z(),J(B(NI),{key:e,value:e},{default:M(()=>[j(H(e),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1},8,[ ` model - value ` ])):b.value.lead.kind=== ` text ` ?(z(),J(B(iu),{key:2,"model-value":pe(b.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:n[8]||=e=>se.value=b.value.lead.key,"onUpdate:modelValue":n[9]||=e=>w(b.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(z(),J(B(k),{key:3,"model-value":pe(b.value.lead.key),onFocus:n[10]||=e=>se.value=b.value.lead.key,"onUpdate:modelValue":n[11]||=e=>w(b.value.lead.key,String(e))},null,8,[ ` model - value ` ])),h.value.length&&b.value.lead.kind!== ` select ` ?(z(),K( ` div ` ,xH,[n[20]||=G( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(z(!0),K(U,null,q(h.value,e=>(z(),K(U,{key:e},[N(B(X),{type: ` button ` ,variant: ` outline ` ,size: ` xs ` ,class: ` font - mono ` ,onClick:t=>ce(e, ` summary ` )},{default:M(()=>[j(H(e),1)]),_:2},1032,[ ` onClick ` ]),N(B(X),{type: ` button ` ,variant: ` outline ` ,size: ` xs ` ,class: ` font - mono ` ,onClick:t=>ce(e, ` result ` )},{default:M(()=>[j(H(e)+ ` . result ` ,1)]),_:2},1032,[ ` onClick ` ])],64))),128))])):R( ` ` ,!0)])):R( ` ` ,!0),b.value.compact.length?(z(),K( ` section ` ,SH,[(z(!0),K(U,null,q(b.value.compact,t=>(z(),K( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[G( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:t.schema.description},[j(H(fe(t.key,t.schema))+ ` ` ,1),t.schema.description?(z(),J(B(an),{key:0,class: ` size - 3 text - fg - subtle ` })):R( ` ` ,!0)],8,CH),t.kind=== ` workflow ` ?(z(),J(BV,{key:0,class: ` max - w - 48 ` ,value:pe(t.key),workflows:e.workflows,label:fe(t.key,t.schema),onPick:e=>ee(t.key,e)},null,8,[ ` v 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=eV( $ B(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=eV( $ B(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 iV(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new YB||null,prettyErrors:t}}function aV(e,t={}){let{lineCounter:n,prettyErrors:r}=iV(t),i=new rV(n?.addNewLine),a=new FB(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 Zz(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach( $ z(e,n)),o.warnings.forEach( $ z(e,n))),o}function oV(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=aV(e,n);if(!i)return null;if(i.warnings.forEach(e=>kR(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 sV(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 wL(e)&&!r?e.toString(n):new Jz(e,r,n).toString(n)}var cV=e=>typeof e== ` object ` &&!!e&&!Array.isArray(e),lV=e=>cV(e)?Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?t:[]]):[];function uV(e){if(cV(e)){if(cV(e.parallel))return{kind: ` parallel ` ,base:[ ` parallel ` ],branches:lV(e.parallel)};if(cV(e.switch))return{kind: ` switch ` ,base:[ ` switch ` , ` cases ` ],on:typeof e.switch.on== ` string ` ?e.switch.on: ` ` ,branches:lV(e.switch.cases)}}}function dV(e){return e.slice(2).includes( ` parallel ` )}function fV(e,t){let n=aV(e).getIn(t,!0);if(TL(n))return n.toJSON()}function pV(e,t,n){let r=aV(e);return r.setIn(t,r.createNode(wV(n))),r.toString()}function mV(e,t,n){let r=aV(e),i=t.slice(0,-1),a=dV(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(OL(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!OL(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 hV(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 gV(e,t){let n=e.getIn(t,!0),r=uV(TL(n)?n.toJSON():void 0),i=r?e.getIn([...t,...r.base],!0):void 0;if(!r||!TL(i))throw Error( ` This step has no branches . ` );return{kind:r.kind,branches:i}}function _V(e,t,n){let r=aV(e),{kind:i,branches:a}=gV(r,t);if(hV(n,i),a.has(n))throw Error( ` Branch $ { n } already exists . ` );return a.set(n,r.createNode([])),r.toString()}function vV(e,t,n,r){let i=aV(e),{kind:a,branches:o}=gV(i,t);if(hV(r,a),n!==r&&o.has(r))throw Error( ` Branch $ { r } already exists . ` );let s=o.items.find(e=>DL(e.key)&&e.key.value===n);if(!s||!DL(s.key))throw Error( ` Branch $ { n } does not exist . ` );return s.key.value=r,i.toString()}function yV(e,t,n){let r=aV(e),{kind:i,branches:a}=gV(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 RV(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(PV)].map(e=>e[1]))]}function zV(e){let t=aV(e).toJS(),n=FV(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=FV(e)?e:{},p=uV(d),m=p?.kind??(typeof d.type== ` string ` ?d.type: ` ` ),h=FV(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,title:g||NV(m),type:m,role:DV(m),step:l?.length===2?String(Number(l[1])+1).padStart(2, ` 0 ` ):void 0,detail:p?.on? ` on $ { p . on . replace ( /^steps\./ , ` ` ) } ` :IV(m,h),summary:LV(h),when:typeof d.when== ` string ` ?d.when:void 0,retry:FV(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 RV([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=uV(t);if(n){let{kind:i,base:a,branches:o}=n,c=p(t,String(e+1),0,u*AV,void 0,void 0,[ ` steps ` ,e]);m(l,c,[ ` steps ` ,e-1]),u++;let d=FV(t)&&typeof t.id== ` string ` ?t.id:i,f=i=== ` switch ` &&!o.some(([e])=>e==="default"),h=o.length+ +!!f,g=[],_=0;o.forEach(([t,n],o)=>{let s=(o-(h-1)/2)*jV,l=[c],f=[ ` steps ` ,e,...a,t];n.forEach((n,r)=>{let a=p(n, ` $ { e + 1 } - $ { t } - $ { r + 1 } ` ,s,(u+r)*AV,t,d,[...f,r],i);m(l,a,[...f,r-1]),l=[a]}),_=Math.max(_,n.length);let v= ` add - $ { e } - $ { t } ` ;r.push({id:v,type: ` add ` ,position:{x:s+104,y:(u+n.length)*AV},data:{kind: ` step ` ,key:v,title: ` ` ,type: ` ` ,detail: ` ` ,branch:t,lane:i,insertAfter:[...f,n.length-1]}}),m(l,v),g.push(v)});let v=(Math.max(_,1)+1)*AV-24;o.forEach(([t],n)=>{let a=(n-(h-1)/2)*jV;r.push({id: ` lane - $ { e } - $ { t } ` ,type: ` lane ` ,position:{x:a-12,y:u*AV-40},style:{width: ` 264 px ` ,height: ` $ { v } px ` },zIndex:-1,data:{kind: ` step ` ,key:t,title:t,type: ` ` ,detail: ` ` ,lane:i}})}),f&&(g.push(c),s.add(c)),l=g,u+=Math.max(_,1)+1;continue}let i=p(t,String(e+1),0,u*AV,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*AV-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 BV={agent:Jt,command:Rn,repo:fn,gate:Pn,forge:bn,human:Un,review:ln,workflow:Kn},VV={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function HV(e){return e=== ` parallel ` ?fn:e=== ` switch ` ?In:BV[e.split( ` . ` )[0]]??Kn}function UV(e){return Object.keys(VV).map(t=>({title:VV[t],icon:BV[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function WV(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 GV(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function KV(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 qV(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!== ` ` &&(n[r.name]=KV(e,r.type))}return n}var JV=A({__name: ` WorkflowPicker ` ,props:{value:{},workflows:{},label:{}},emits:[ ` pick ` ],setup(e,{emit:t}){let n=t;return(t,r)=>(z(),J(B(Nl),{"model-value":e.value||void 0,"onUpdate:modelValue":r[0]||=e=>n( ` pick ` ,String(e))},{default:M(()=>[N(B(Bl),{"aria-label":e.label},{default:M(()=>[N(B(Vl),{placeholder: ` Choose workflow ` })]),_:1},8,[ ` aria - label ` ]),N(B(Pl),null,{default:M(()=>[e.value&&!e.workflows.some(t=>t.id===e.value)?(z(),J(B(Ll),{key:0,value:e.value,disabled: ` ` },{default:M(()=>[j(H(e.value)+ ` ( unavailable ) ` ,1)]),_:1},8,[ ` value ` ])):R( ` ` ,!0),(z(!0),K(U,null,q(e.workflows,e=>(z(),J(B(Ll),{key:e.id,value:e.id},{default:M(()=>[j(H(e.id),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ]))}});function YV(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function XV(e,t=[]){let n=aV(e),r=n.errors[0];if(r)return{ok:!1,message:uH(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!dH(i))return{ok:!1,message: ` A workflow is a mapping with an id and steps . ` };let a=typeof i.id== ` st Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:oH (e)}))}var iH =/^( \s *)(- \s +)?/,aH =/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function oH (e){let{code:t,comment:n}=sH (e),r=c H(t);return n&&r.push({text:n,kind: ` comment ` }),r}function sH (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 c H(e){if(!e)return[];let t=[],n=iH .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=aH .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,...l H(i[4]??``)]):[...t,...l H(r)]}function l H(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 uH ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function dH(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function fH(e){return typeof e== ` string ` &&e.trim()!== ` ` }var pH={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },mH={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },hH={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },gH={class: ` min - w - 0 flex - 1 ` },_H={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },vH={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },yH={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },bH={key:1,class: ` space - y - 3 ` },xH={key:0,class: ` block space - y - 1.5 ` },SH={id: ` switch - on ` },CH=[ ` value ` ],wH={class: ` text - xs font - medium text - muted - foreground ` },TH={class: ` flex items - center gap - 2 ` },EH={key:1,role: ` alert ` ,class: ` text - xs text - danger ` },DH={key:2,class: ` space - y - 1.5 ` },OH=[ ` title ` ],kH={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },AH={key:3,class: ` divide - y divide - border rounded - md border border - border ` },jH=[ ` title ` ],MH={key:0,class: ` space - y - 3 ` },NH={class: ` text - [ 13 px ] ` },PH={key:0,class: ` text - danger ` },FH={class: ` ml - 2 text - xs text - fg - subtle ` },IH={key:1,class: ` space - y - 3 ` },LH={class: ` text - [ 13 px ] ` },RH={class: ` ml - 2 text - xs text - fg - subtle ` },zH=[ ` title ` ],BH={key:0,class: ` text - xs text - danger ` },VH={class: ` space - y - 2 ` },HH={class: ` divide - y divide - border rounded - md border border - border ` },UH={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },WH={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },GH={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },KH={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },qH={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },JH=A({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=L(()=>fV(n.yaml,n.path)??{}),a=L(()=>uV(i.value)),o=L(()=>a.value?.kind??(typeof i.value.type== ` string ` ?i.value.type: ` ` )),s=L(()=>a.value?.branches.map(([e])=>e)??[]),c=L(()=>o.value=== ` parallel ` ?2:1);function l(e){r( ` update : yaml ` ,pV(n.yaml,n.path,{...i.value,switch:{...i.value.switch,on:e}}))}let u=Y( ` ` ),d=Y( ` ` );function f(e,t,i= ` ` ){try{let a=e=== ` add ` ?_V(n.yaml,n.path,t):e=== ` rename ` ?vV(n.yaml,n.path,t,i):yV(n.yaml,n.path,t);r( ` update : yaml ` ,a),u.value= ` ` ,d.value= ` ` }catch(e){d.value=String(e.message)}}let p=L(()=>n.vocabulary.find(e=>e.name===o.value)),m=L(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),h=L(()=>CV(n.yaml,n.path)),g=L(()=>p.value?.settings&&i.value.settings?tH(i.value.settings,p.value.settings, ` settings ` ): ` ` ),_=[ ` mission ` , ` workflow ` , ` message ` , ` body ` , ` plan ` , ` then ` , ` status ` , ` detail ` , ` run ` , ` rules ` ],v=/mission|body|detail|plan|rules/;function y(e,t){return[ ` workflow . call ` , ` workflow . handoff ` ].includes(o.value)&&e=== ` workflow ` ||o.value=== ` human . approve ` &&e=== ` then ` ? ` workflow ` :o.value=== ` agent . run ` &&e=== ` model ` ? ` select ` :t.type=== ` string ` ?t.enum? ` select ` :v.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 b=L(()=>{let e=Object.entries(p.value?.settings?.properties??{}).filter(([e])=>o.value!== ` workflow . call ` ||![ ` inputs ` , ` outputs ` ].includes(e)).map(([e,t])=>({key:e,schema:t,kind:y(e,t),options:o.value=== ` agent . run ` &&e=== ` model ` ?n.modelAliases:t.enum??[]})),t=e.filter(e=>_.includes(e.key)&&e.kind!== ` boolean ` ).sort((e,t)=>_.indexOf(e.key)-_.indexOf(t.key))[0],r=e.filter(e=>e!==t);return{lead:t,compact:r.filter(e=>[ ` workflow ` , ` select ` , ` line ` , ` number ` , ` boolean ` ].includes(e.kind)),long:r.filter(e=>[ ` text ` , ` lines ` , ` yaml ` ].includes(e.kind))}});function x(e){let{id:t,type:i,...a}=e;r( ` update : yaml ` ,pV(n.yaml,n.path,{id:t,type:i,...a}))}function S(e,t){x({...i.value,[e]:t})}function C(e){S( ` retry ` ,{...i.value.retry,...e})}function w(e,t){let n={...m.value,[e]:t};o.value=== ` workflow . call ` &&e=== ` wait ` &&t!==!0&&delete n.outputs,x({...i.value,settings:n})}function ee(e,t){let n={...m.value,[e]:t};o.value=== ` workflow . call ` &&t!==m.value[e]&&(delete n.inputs,delete n.outputs),x({...i.value,settings:n})}let T=L(()=>n.workflows.find(e=>e.id===m.value.workflow)),te=L(()=>Object.entries(TV(T.value?.yaml?? ` ` , ` inputs ` )??{})),E=L(()=>Object.entries(TV(T.value?.yaml?? ` ` , ` outputs ` )??{})),ne=L(()=>Object.entries(TV(n.yaml, ` inputs ` )??{})),D=L(()=>Object.entries(TV(n.yaml, ` outputs ` )??{})),re=L(()=>m.value.inputs??{}),O=L(()=>m.value.outputs??{}),ie=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),ae=e=>re.value[e]===void 0? ` ` :String(re.value[e]);function oe(e,t,n){w( ` inputs ` ,{...re.value,[e]:t=== ` ` ?void 0:ie(t)?t:KV(t,n?? ` string ` )})}let se=Y(null);function ce(e,t){let n=se.value??b.value.lead?.key;if(!n)return;let r=typeof m.value[n]== ` string ` ?m.value[n]: ` ` ,i= ` { { steps . $ { e } . $ { t } } } ` ;w(n,r? ` $ { r . trimEnd ( ) } $ { i } ` :i)}let le=Y({});function ue(e,t){try{w(e,t.trim()?oV(t):void 0),le.value={...le.value,[e]: ` ` }}catch(t){le.valu
Line truncated
` )[0]}}}let de=e=>e===void 0? ` ` :sV(e).trimEnd(),fe=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),pe=e=>typeof m.value[e]== ` string ` ?m.value[e]: ` ` ;return(t,n)=>(z(),K( ` aside ` ,pH,[G( ` header ` ,mH,[G( ` span ` ,hH,[(z(),J(He(B(HV)(o.value)),{class: ` size - 4 ` }))]),G( ` div ` ,gH,[N(B(k),{"model-value":i.value.id?? ` ` ,class: ` h - 7 truncate border - transparent px - 1 font - medium shadow - none hover : border - input dark : bg - transparent ` ,placeholder:B(NV)(o.value),"aria-label": ` Step id ` ,"onUpdate:modelValue":n[0]||=e=>S( ` id ` ,String(e))},null,8,[ ` model - value ` , ` placeholder ` ]),G( ` div ` ,_H,H(o.value),1)]),N(B(X),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:n[1]||=e=>r( ` close ` )},{default:M(()=>[N(B(Jn))]),_:1})]),G( ` div ` ,vH,[g.value?(z(),K( ` p ` ,yH,H(g.value),1)):R( ` ` ,!0),a.value?(z(),K( ` section ` ,bH,[o.value=== ` switch ` ?(z(),K( ` label ` ,xH,[n[18]||=G( ` span ` ,{class: ` text - xs font - medium text - muted - foreground ` ,title: ` The value whose case runs ; a case named default runs when none matches ` }, ` Switch on ` ,-1),N(B(k),{"model-value":a.value.on,class: ` font - mono ` ,placeholder: ` steps . assess . result . fit ` ,list: ` switch - on ` ,onChange:n[2]||=e=>l(e.target.value.trim())},null,8,[ ` model - value ` ]),G( ` datalist ` ,SH,[(z(!0),K(U,null,q(h.value,e=>(z(),K( ` option ` ,{key:e,value: ` steps . $ { e } . result . ` },null,8,CH))),128))])])):R( ` ` ,!0),G( ` div ` ,wH,H(o.value=== ` switch ` ? ` Cases ` : ` Branches ` ),1),(z(!0),K(U,null,q(s.value,e=>(z(),K( ` div ` ,{key:e,class: ` flex items - center gap - 2 ` },[N(B(k),{"model-value":e,class:P(o.value=== ` switch ` && ` font - mono ` ),"aria-label": ` $ { o . value === ` switch ` ? ` Case ` : ` Branch ` } $ { e } ` ,onChange:t=>f( ` rename ` ,e,t.target.value.trim())},null,8,[ ` model - value ` , ` class ` , ` aria - label ` , ` onChange ` ]),N(B(X),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Remove $ { e } ` ,disabled:s.value.length<=c.value,onClick:t=>f( ` delete ` ,e)},{default:M(()=>[N(B(Bn))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),G( ` div ` ,TH,[N(B(k),{modelValue:u.value,"onUpdate:modelValue":n[3]||=e=>u.value=e,"aria-label":o.value=== ` switch ` ? ` New case value ` : ` New branch name ` ,placeholder:o.value=== ` switch ` ? ` Value , or default ` : ` Branch name ` ,onKeydown:n[4]||=vt(St(e=>f( ` add ` ,u.value.trim()),[ ` prevent ` ]),[ ` enter ` ])},null,8,[ ` modelValue ` , ` aria - label ` , ` placeholder ` ]),N(B(X),{type: ` button ` ,size: ` icon - sm ` ,variant: ` outline ` ,"aria-label":o.value=== ` switch ` ? ` Add case ` : ` Add branch ` ,disabled:!u.value.trim(),onClick:n[5]||=e=>f( ` add ` ,u.value.trim())},{default:M(()=>[N(B(Dn))]),_:1},8,[ ` aria - label ` , ` disabled ` ])]),d.value?(z(),K( ` p ` ,EH,H(d.value),1)):R( ` ` ,!0)])):R( ` ` ,!0),b.value.lead?(z(),K( ` section ` ,DH,[G( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:b.value.lead.schema.description},[j(H(fe(b.value.lead.key,b.value.lead.schema))+ ` ` ,1),b.value.lead.schema.description?(z(),J(B(an),{key:0,class: ` size - 3 text - fg - subtle ` })):R( ` ` ,!0)],8,OH),b.value.lead.kind=== ` workflow ` ?(z(),J(JV,{key:0,value:pe(b.value.lead.key),workflows:e.workflows,label:fe(b.value.lead.key,b.value.lead.schema),onPick:n[6]||=e=>ee(b.value.lead.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` ])):b.value.lead.kind=== ` select ` ?(z(),J(B(BI),{key:1,size: ` sm ` ,class: ` w - full ` ,"model-value":pe(b.value.lead.key),"onUpdate:modelValue":n[7]||=e=>w(b.value.lead.key,String(e)||void 0)},{default:M(()=>[N(B(VI),{value: ` ` },{default:M(()=>[...n[19]||=[j( ` Default ` ,-1)]]),_:1}),(z(!0),K(U,null,q(b.value.lead.options,e=>(z(),J(B(VI),{key:e,value:e},{default:M(()=>[j(H(e),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1},8,[ ` model - value ` ])):b.value.lead.kind=== ` text ` ?(z(),J(B(iu),{key:2,"model-value":pe(b.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:n[8]||=e=>se.value=b.value.lead.key,"onUpdate:modelValue":n[9]||=e=>w(b.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(z(),J(B(k),{key:3,"model-value":pe(b.value.lead.key),onFocus:n[10]||=e=>se.value=b.value.lead.key,"onUpdate:modelValue":n[11]||=e=>w(b.value.lead.key,String(e))},null,8,[ ` model - value ` ])),h.value.length&&b.value.lead.kind!== ` select ` ?(z(),K( ` div ` ,kH,[n[20]||=G( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(z(!0),K(U,null,q(h.value,e=>(z(),K(U,{key:e},[N(B(X),{type: ` button ` ,variant: ` outline ` ,size: ` xs ` ,class: ` font - mono ` ,onClick:t=>ce(e, ` summary ` )},{default:M(()=>[j(H(e),1)]),_:2},1032,[ ` onClick ` ]),N(B(X),{type: ` button ` ,variant: ` outline ` ,size: ` xs ` ,class: ` font - mono ` ,onClick:t=>ce(e, ` result ` )},{default:M(()=>[j(H(e)+ ` . result ` ,1)]),_:2},1032,[ ` onClick ` ])],64))),128))])):R( ` ` ,!0)])):R( ` ` ,!0),b.value.compact.length?(z(),K( ` section ` ,AH,[(z(!0),K(U,null,q(b.value.compact,t=>(z(),K( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[G( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:t.schema.description},[j(H(fe(t.key,t.schema))+ ` ` ,1),t.schema.description?(z(),J(B(an),{key:0,class: ` size - 3 text - fg - subtle ` })):R( ` ` ,!0)],8,jH),t.kind=== ` workflow ` ?(z(),J(JV,{key:0,class: ` max - w - 48 ` ,value:pe(t.key),workflows:e.workflows,label:fe(t.key,t.schema),onPick:e=>ee(t.key,e)},null,8,[ ` v Line truncated
` ): ` ` ,class: ` min - h - 16 font - mono text - xs ` ,placeholder: ` One per line ` ,"onUpdate:modelValue":t=>w(e.key,String(t).split( `
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(z(),K(U,{key:2},[N(B(iu),{"model-value":de(m.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>ue(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),le.value[e.key]?(z(),K( ` span ` ,MH,H(le.value[e.key]),1)):R( ` ` ,!0)],64))]))),128)),G( ` section ` ,NH,[n[37]||=G( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),G( ` div ` ,PH,[G( ` label ` ,FH,[n[31]||=G( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),N(B(k),{class: ` h - 7 w - 48 font - mono text - xs ` ,placeholder: ` always ` ,"model-value":i.value.when?? ` ` ,"onUpdate:modelValue":n[12]||=e=>S( ` when ` ,String(e))},null,8,[ ` model - value ` ])]),G( ` label ` ,IH,[n[34]||=G( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),N(B(MI),{size: ` sm ` ,"model-value":i.value.on_failure?? ` ` ,"onUpdate:modelValue":n[13]||=e=>S( ` on _failure ` ,String(e)||void 0)},{default:M(()=>[N(B(NI),{value: ` ` },{default:M(()=>[...n[32]||=[j( ` Park the task ` ,-1)]]),_:1}),N(B(NI),{value: ` continue ` },{default:M(()=>[...n[33]||=[j( ` Continue ` ,-1)]]),_:1})]),_:1},8,[ ` model - value ` ])]),G( ` label ` ,LH,[n[35]||=G( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),N(B(k),{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 7 w - 20 text - right text - [ 13 px ] ` ,"model-value":i.value.retry?.attempts?? ` ` ,"onUpdate:modelValue":n[14]||=e=>C({attempts:String(e)=== ` ` ?void 0:Number(String(e))})},null,8,[ ` model - value ` ])]),G( ` label ` ,RH,[n[36]||=G( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),N(B(wh),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":n[15]||=e=>C({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),G( ` footer ` ,zH,[N(B(X),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:n[16]||=e=>r( ` remove ` )},{default:M(()=>[N(B(Bn)),n[38]||=j( ` Delete step ` ,-1)]),_:1}),N(B(X),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:n[17]||=e=>r( ` close ` )},{default:M(()=>[...n[39]||=[j( ` Done ` ,-1)]]),_:1})])]))}}),VH= ` repository _path ` ;function HH(e,t,n){let r=[];for(let[n,i]of e){let e=t[n];e?.from=== ` path ` &&e.path.trim()&&r.push({name:n,path:e.path.trim(),type:i.type?? ` string ` ,required:i.required===!0})}return n.trim()&&r.push({name:VH,path:n.trim(),type: ` string ` ,required:!0}),r}function UH(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function WH(e,t,n){let r=[];for(let[i,a]of e){let e=t[i],o=a.type?? ` string ` ;if(!(e&&(e.from=== ` path ` ?e.path.trim():e.value!== ` ` ))){a.required&&r.push( ` $ { i } is required ` );continue}if(e.from=== ` path ` ){let e=n?.failures?.find(e=>e.field_name===i);e&&r.push( ` $ { i } : $ { e . reason } ` );continue}let s=UH(ob(e.value,o));o!== ` any ` &&s!==o&&r.push( ` $ { i } is $ { o } , but $ { JSON . stringify ( e . value ) } is not ` )}return n?.failures?.some(e=>e.field_name=== ` repository _path ` )&&r.push( ` the repository path does not resolve ` ),r}function GH(e,t){let n={};for(let[r,i]of e){let e=t[r];e?.from=== ` path ` &&e.path.trim()?n[r]={param:r}:e?.from=== ` value ` &&e.value!== ` ` &&(n[r]={value:ob(e.value,i.type?? ` string ` )})}return n}function KH(e,t){let n=e=>t.find(t=>t.name===e)?.path?? ` ` ,r={};for(let[t,i]of Object.entries(e.inputs??{}))r[t]=i.param?{from: ` path ` ,path:n(i.param),value: ` ` }:{from: ` value ` ,path: ` ` ,value:typeof i.value== ` string ` ?i.value:JSON.stringify(i.value)};return{rows:r,repositoryPath:n(e.repo_param)}}function qH(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...qH(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...qH(n,r)]}):[]}function JH(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function YH(e){try{let t=JSON.parse(e.headers?? ` { } ` );return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.join( ` , ` ):String(t)]))}catch{return{}}}function XH(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var ZH={class: ` flex h - full flex - col ` },QH={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` }, $ H={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },eU={key:0,class: ` flex flex - 1 items - center justify - center ` },tU={class: ` space - y - 1.5 ` },nU={key:1,class: ` space - y - 1.5 ` },rU=[ ` title ` ],iU={class: ` space - y - 1.5 ` },aU={id: ` bind - paths ` },oU=[ ` value ` ],sU={class: ` divide - y divide - border rounded - md border border - border ` },cU={class: ` flex items - center gap - 1.5 text - xs ` },lU={class: ` font - mono ` },uU={class: ` text - fg - subtle ` },dU={key:0,class: ` text - danger ` ,title: ` Required ` },fU={key:2,class: ` text - xs text - danger ` },pU=[ ` title ` ],mU={key:0,class: ` space - y - 1 px - 3 py - 2 ` },hU={key:0,class: ` text - xs text - danger ` },gU={key:1,class: ` truncate font - mono text - xs text - success ` },_U={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },vU={class: ` space - y - 2 ` },yU={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },bU={key:1,class: ` text - xs text - fg - subtle ` },xU={class: ` flex gap - 2 ` },SU= ` _ _new _ _ ` ,CU=A({__name: ` BindEvent ` ,props:{yaml:{},binding:{}},emits:[ ` back ` , ` saved ` ],setup(e,{emit:t}){let n=e,r=t,i=
Line truncated
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(z(),K(U,{key:2},[N(B(iu),{"model-value":de(m.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>ue(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),le.value[e.key]?(z(),K( ` span ` ,BH,H(le.value[e.key]),1)):R( ` ` ,!0)],64))]))),128)),G( ` section ` ,VH,[n[37]||=G( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),G( ` div ` ,HH,[G( ` label ` ,UH,[n[31]||=G( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),N(B(k),{class: ` h - 7 w - 48 font - mono text - xs ` ,placeholder: ` always ` ,"model-value":i.value.when?? ` ` ,"onUpdate:modelValue":n[12]||=e=>S( ` when ` ,String(e))},null,8,[ ` model - value ` ])]),G( ` label ` ,WH,[n[34]||=G( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),N(B(BI),{size: ` sm ` ,"model-value":i.value.on_failure?? ` ` ,"onUpdate:modelValue":n[13]||=e=>S( ` on _failure ` ,String(e)||void 0)},{default:M(()=>[N(B(VI),{value: ` ` },{default:M(()=>[...n[32]||=[j( ` Park the task ` ,-1)]]),_:1}),N(B(VI),{value: ` continue ` },{default:M(()=>[...n[33]||=[j( ` Continue ` ,-1)]]),_:1})]),_:1},8,[ ` model - value ` ])]),G( ` label ` ,GH,[n[35]||=G( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),N(B(k),{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 7 w - 20 text - right text - [ 13 px ] ` ,"model-value":i.value.retry?.attempts?? ` ` ,"onUpdate:modelValue":n[14]||=e=>C({attempts:String(e)=== ` ` ?void 0:Number(String(e))})},null,8,[ ` model - value ` ])]),G( ` label ` ,KH,[n[36]||=G( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),N(B(wh),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":n[15]||=e=>C({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),G( ` footer ` ,qH,[N(B(X),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:n[16]||=e=>r( ` remove ` )},{default:M(()=>[N(B(Bn)),n[38]||=j( ` Delete step ` ,-1)]),_:1}),N(B(X),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:n[17]||=e=>r( ` close ` )},{default:M(()=>[...n[39]||=[j( ` Done ` ,-1)]]),_:1})])]))}}),YH= ` repository _path ` ;function XH(e,t,n){let r=[];for(let[n,i]of e){let e=t[n];e?.from=== ` path ` &&e.path.trim()&&r.push({name:n,path:e.path.trim(),type:i.type?? ` string ` ,required:i.required===!0})}return n.trim()&&r.push({name:YH,path:n.trim(),type: ` string ` ,required:!0}),r}function ZH(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function QH(e,t,n){let r=[];for(let[i,a]of e){let e=t[i],o=a.type?? ` string ` ;if(!(e&&(e.from=== ` path ` ?e.path.trim():e.value!== ` ` ))){a.required&&r.push( ` $ { i } is required ` );continue}if(e.from=== ` path ` ){let e=n?.failures?.find(e=>e.field_name===i);e&&r.push( ` $ { i } : $ { e . reason } ` );continue}let s=ZH(_b(e.value,o));o!== ` any ` &&s!==o&&r.push( ` $ { i } is $ { o } , but $ { JSON . stringify ( e . value ) } is not ` )}return n?.failures?.some(e=>e.field_name=== ` repository _path ` )&&r.push( ` the repository path does not resolve ` ),r}function $ H(e,t){let n={};for(let[r,i]of e){let e=t[r];e?.from=== ` path ` &&e.path.trim()?n[r]={param:r}:e?.from=== ` value ` &&e.value!== ` ` &&(n[r]={value:_b(e.value,i.type?? ` string ` )})}return n}function eU(e,t){let n=e=>t.find(t=>t.name===e)?.path?? ` ` ,r={};for(let[t,i]of Object.entries(e.inputs??{}))r[t]=i.param?{from: ` path ` ,path:n(i.param),value: ` ` }:{from: ` value ` ,path: ` ` ,value:typeof i.value== ` string ` ?i.value:JSON.stringify(i.value)};return{rows:r,repositoryPath:n(e.repo_param)}}function tU(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...tU(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...tU(n,r)]}):[]}function nU(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function rU(e){try{let t=JSON.parse(e.headers?? ` { } ` );return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.join( ` , ` ):String(t)]))}catch{return{}}}function iU(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var aU={class: ` flex h - full flex - col ` },oU={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },sU={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },cU={key:0,class: ` flex flex - 1 items - center justify - center ` },lU={class: ` space - y - 1.5 ` },uU={key:1,class: ` space - y - 1.5 ` },dU=[ ` title ` ],fU={class: ` space - y - 1.5 ` },pU={id: ` bind - paths ` },mU=[ ` value ` ],hU={class: ` divide - y divide - border rounded - md border border - border ` },gU={class: ` flex items - center gap - 1.5 text - xs ` },_U={class: ` font - mono ` },vU={class: ` text - fg - subtle ` },yU={key:0,class: ` text - danger ` ,title: ` Required ` },bU={key:2,class: ` text - xs text - danger ` },xU=[ ` title ` ],SU={key:0,class: ` space - y - 1 px - 3 py - 2 ` },CU={key:0,class: ` text - xs text - danger ` },wU={key:1,class: ` truncate font - mono text - xs text - success ` },TU={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },EU={class: ` space - y - 2 ` },DU={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },OU={key:1,class: ` text - xs text - fg - subtle ` },kU={class: ` flex gap - 2 ` },AU= ` _ _new _ _ ` ,jU=A({__name: ` BindEvent ` ,props:{yaml:{},binding:{}},emits:[ ` back ` , ` saved ` ],setup(e,{emit:t}){let n=e,r=t,i=
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 $ X(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=eZ(n.code,e);return Array.isArray(e)?e.some(e=>QX(n[r],e,t,n.type=== ` keyup ` )):QX(n[r],e,t,n.type=== ` keyup ` )}}function eZ(e,t){return t.includes(e)? ` code ` : ` key ` }function tZ(e,t){let n=L(()=>je(t?.target)??YX),r=Be(je(e)===!0),i=!1,a=new Set,o=c(je(e));I(()=>je(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),qW([ ` blur ` , ` contextmenu ` ],s),YW((...e)=>o(...e),e=>{let n=je(t?.actInsideInputWithModifier)??!0,a=je(t?.preventDefault)??!1;if(i=ZX(e),(!i||i&&!n)&&XX(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}),YW((...e)=>o(...e),e=>{let n=je(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&XX(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 ` ? $ X(e,a):e}return r}var nZ= ` vue - flow _ _node - desc ` ,rZ= ` vue - flow _ _edge - desc ` ,iZ= ` vue - flow _ _aria - live ` ,aZ=[ ` Enter ` , ` ` , ` Escape ` ],oZ={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function sZ(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function cZ(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 lZ(e){return{width:e.offsetWidth,height:e.offsetHeight}}function uZ(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function dZ(e,t){return{x:uZ(e.x,t[0][0],t[1][0]),y:uZ(e.y,t[0][1],t[1][1])}}function fZ(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function pZ(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function mZ(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!pZ(e)}function hZ(e){return mZ(e)&& ` computedPosition ` in e}function gZ(e){return!Number.isNaN(e)&&Number.isFinite(e)}function _Z(e){return gZ(e.width)&&gZ(e.height)&&gZ(e.x)&&gZ(e.y)}function vZ(e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:ct({width:0,height:0}),computedPosition:ct({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:FQ(e.data)?e.data:{},events:ct(FQ(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function yZ(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:FQ(e.data)?e.data:{},events:ct(FQ(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function bZ(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 xZ(...e){if(e.length===3){let[t,n,r]=e;return bZ(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>pZ(e)&&e.source===r).map(e=>n.find(t=>mZ(t)&&t.id===e.target))}function SZ(...e){if(e.length===3){let[t,n,r]=e;return bZ(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>pZ(e)&&e.target===r).map(e=>n.find(t=>mZ(t)&&t.id===e.source))}function CZ({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function wZ(e,t){return t.some(t=>pZ(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 TZ({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function EZ({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?vQ(s,o):s}function DZ(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 OZ({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function kZ({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function AZ(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=DZ(t,OZ({...r.computedPosition,...r.dimensions}))}return kZ(t)}function jZ(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...EZ(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 sZ(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=cZ(n.code,e);return Array.isArray(e)?e.some(e=>oZ(n[r],e,t,n.type=== ` keyup ` )):oZ(n[r],e,t,n.type=== ` keyup ` )}}function cZ(e,t){return t.includes(e)? ` code ` : ` key ` }function lZ(e,t){let n=L(()=>je(t?.target)??rZ),r=Be(je(e)===!0),i=!1,a=new Set,o=c(je(e));I(()=>je(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),tG([ ` blur ` , ` contextmenu ` ],s),rG((...e)=>o(...e),e=>{let n=je(t?.actInsideInputWithModifier)??!0,a=je(t?.preventDefault)??!1;if(i=aZ(e),(!i||i&&!n)&&iZ(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}),rG((...e)=>o(...e),e=>{let n=je(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&iZ(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 ` ?sZ(e,a):e}return r}var uZ= ` vue - flow _ _node - desc ` ,dZ= ` vue - flow _ _edge - desc ` ,fZ= ` vue - flow _ _aria - live ` ,pZ=[ ` Enter ` , ` ` , ` Escape ` ],mZ={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function hZ(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function gZ(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 _Z(e){return{width:e.offsetWidth,height:e.offsetHeight}}function vZ(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function yZ(e,t){return{x:vZ(e.x,t[0][0],t[1][0]),y:vZ(e.y,t[0][1],t[1][1])}}function bZ(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function xZ(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function SZ(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!xZ(e)}function CZ(e){return SZ(e)&& ` computedPosition ` in e}function wZ(e){return!Number.isNaN(e)&&Number.isFinite(e)}function TZ(e){return wZ(e.width)&&wZ(e.height)&&wZ(e.x)&&wZ(e.y)}function EZ(e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:ct({width:0,height:0}),computedPosition:ct({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:UQ(e.data)?e.data:{},events:ct(UQ(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function DZ(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:UQ(e.data)?e.data:{},events:ct(UQ(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function OZ(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 kZ(...e){if(e.length===3){let[t,n,r]=e;return OZ(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>xZ(e)&&e.source===r).map(e=>n.find(t=>SZ(t)&&t.id===e.target))}function AZ(...e){if(e.length===3){let[t,n,r]=e;return OZ(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>xZ(e)&&e.target===r).map(e=>n.find(t=>SZ(t)&&t.id===e.source))}function jZ({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function MZ(e,t){return t.some(t=>xZ(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 NZ({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function PZ({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?EQ(s,o):s}function FZ(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 IZ({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function LZ({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function RZ(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=FZ(t,IZ({...r.computedPosition,...r.dimensions}))}return LZ(t)}function zZ(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...PZ(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 }
@@ -147,6 +147,6 @@ 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 ` },fQ=class extends Error{constructor(e,...t){super(dQ[e]?.call(dQ,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function pQ(e){return ` clientX ` in e}function mQ(e){return ` sourceEvent ` in e}function hQ(e,t){let n=pQ(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 gQ=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function _Q(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function vQ(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var yQ=()=>!0;function bQ(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function xQ(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())cZ(i,sZ(e))>0&&r.push(e);return r}var SQ=250;function CQ(e,t,n,r){let i=[],a=1/0,o=xQ(e,n,t+SQ);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}=oQ(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 wQ(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=yQ},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:_}=hQ(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=TQ(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===WX.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=OQ(t,e,a,p,n,!0)}return b}function TQ(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function EQ(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function DQ(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function OQ(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===WX.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,...oQ(o,c,c.position,!0)}:c}var kQ={[VX.Left]:VX.Right,[VX.Right]:VX.Left,[VX.Top]:VX.Bottom,[VX.Bottom]:VX.Top},AQ=[ ` production ` , ` prod ` ];function jQ(e,...t){MQ()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function MQ(){return!AQ.includes( ` production ` )}function NQ(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,...lZ(t)}}):null}function PQ(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),ot(()=>{o.blur()})):n([e])}function FQ(e){return B(e)!==void 0}function IQ(e,t,n,r){if(!e||!e.source||!e.target)return n(new fQ(uQ.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=pZ(e)?e:{...e,id:CZ(e)},i=yZ(i,void 0,r),!wZ(i,t)&&i}function LQ(e,t,n,r,i){if(!t.source||!t.target)return i(new fQ(uQ.EDGE_INVALID,e.id)),!1;if(!n)return i(new fQ(uQ.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?CZ(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function RQ(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!mZ(o)){n(new fQ(uQ.NODE_INVALID,o?.id));continue}let s=vZ(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 fQ(uQ.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 zQ(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 BQ(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 } ` ;zQ( ` source ` ,o, ` $ { r } - $ { a } -- 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 ` },bQ=class extends Error{constructor(e,...t){super(yQ[e]?.call(yQ,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function xQ(e){return ` clientX ` in e}function SQ(e){return ` sourceEvent ` in e}function CQ(e,t){let n=xQ(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 wQ=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function TQ(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function EQ(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var DQ=()=>!0;function OQ(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function kQ(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())gZ(i,hZ(e))>0&&r.push(e);return r}var AQ=250;function jQ(e,t,n,r){let i=[],a=1/0,o=kQ(e,n,t+AQ);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}=mQ(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 MQ(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=DQ},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:_}=CQ(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=NQ(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===QX.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=IQ(t,e,a,p,n,!0)}return b}function NQ(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function PQ(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function FQ(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function IQ(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===QX.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,...mQ(o,c,c.position,!0)}:c}var LQ={[YX.Left]:YX.Right,[YX.Right]:YX.Left,[YX.Top]:YX.Bottom,[YX.Bottom]:YX.Top},RQ=[ ` production ` , ` prod ` ];function zQ(e,...t){BQ()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function BQ(){return!RQ.includes( ` production ` )}function VQ(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,..._Z(t)}}):null}function HQ(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),ot(()=>{o.blur()})):n([e])}function UQ(e){return B(e)!==void 0}function WQ(e,t,n,r){if(!e||!e.source||!e.target)return n(new bQ(vQ.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=xZ(e)?e:{...e,id:jZ(e)},i=DZ(i,void 0,r),!MZ(i,t)&&i}function GQ(e,t,n,r,i){if(!t.source||!t.target)return i(new bQ(vQ.EDGE_INVALID,e.id)),!1;if(!n)return i(new bQ(vQ.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?jZ(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function KQ(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!SZ(o)){n(new bQ(vQ.NODE_INVALID,o?.id));continue}let s=EZ(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 bQ(vQ.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 qQ(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 JQ(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 } ` ;qQ( ` source ` ,o, ` $ { r } - $ { a } -- 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 r2(e){let t=ZB(e).toJS(),n=new Map;for(let r of jV(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 i2(e,t,n){let r=r2(e),i=r2(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 a2={class: ` grid h - [ calc ( 100 dvh - 17 rem ) ] min - h - [ 26 rem ] grid - cols - [ 18 rem _1fr ] gap - 3 ` },o2={class: ` min - h - 0 divide - y divide - border overflow - y - auto rounded - lg border border - border ` ,"aria-label": ` Revisions ` },s2=[ ` aria - current ` , ` onClick ` ],c2={class: ` flex items - center gap - 2 text - sm ` },l2={class: ` font - mono text - xs text - fg - subtle ` },u2=[ ` title ` ],d2={key:0,class: ` px - 3 py - 2 text - sm text - muted - foreground ` },f2={key:0,class: ` flex min - h - 0 flex - col gap - 2 ` },p2={class: ` flex items - center gap - 2 ` },m2={class: ` text - xs text - muted - foreground ` },h2={key:0,class: ` rounded - lg border border - border p - 4 text - sm text - muted - foreground ` },g2={key:1,class: ` min - h - 0 flex - 1 overflow - auto rounded - lg border border - border py - 2 font - mono text - [ 13 px ] leading - 6 ` },_2={class: ` inline - block w - 4 select - none text - fg - subtle ` },v2={key:2,class: ` grid min - h - 0 flex - 1 grid - cols - 2 gap - 3 ` },y2={class: ` flex min - h - 0 flex - col gap - 1 ` },b2={class: ` text - xs font - medium text - muted - foreground ` },x2={class: ` min - h - 0 flex - 1 ` },S2={class: ` flex min - h - 0 flex - col gap - 1 ` },C2={class: ` min - h - 0 flex - 1 ` },w2=A({__name: ` WorkflowHistory ` ,props:rt({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default: ` yaml ` },modeModifiers:{}}),emits:rt([ ` restore ` ],[ ` update : selected ` , ` update : mode ` ]),setup(e,{emit:t}){let n=e,r=t,i=Pe(e, ` selected ` ),a=Pe(e, ` mode ` );I(()=>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=L(()=>n.revisions.find(e=>e.version===i.value)),s=L(()=>o.value?.yaml??null),c=L(()=>s.value===null?[]:n2(s.value,n.current)),l=L(()=>s.value!==null&&s.value===n.current),u=L(()=>s.value===null?{}:i2(s.value,n.current, ` removed ` )),d=L(()=>s.value===null?{}:i2(n.current,s.value, ` added ` )),f={added: ` default ` ,edited: ` secondary ` ,removed: ` destructive ` };return(t,n)=>(z(),K( ` div ` ,a2,[G( ` ol ` ,o2,[(z(!0),K(U,null,q(e.revisions,e=>(z(),K( ` li ` ,{key:e.version},[G( ` button ` ,{type: ` button ` ,class:P([ ` 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},[G( ` span ` ,c2,[G( ` span ` ,l2, ` v ` +H(e.version),1),N(B(kt),{variant:f[e.change]},{default:M(()=>[j(H(e.change),1)]),_:2},1032,[ ` variant ` ])]),G( ` span ` ,{class: ` mt - 0.5 block truncate text - xs text - muted - foreground ` ,title:e.at},H(e.actor|| ` unknown ` )+ ` · ` +H(e.source|| ` unknown ` )+ ` · ` +H(B(Dg)(e.at)),9,u2)],10,s2)]))),128)),e.revisions.length?R( ` ` ,!0):(z(),K( ` li ` ,d2,H(e.error|| ` No recorded changes ` ),1))]),o.value?(z(),K( ` div ` ,f2,[G( ` div ` ,p2,[N(B(Wy),{modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e},{default:M(()=>[N(B(Ky),null,{default:M(()=>[N(B(qy),{value: ` yaml ` },{default:M(()=>[...n[2]||=[j( ` YAML ` ,-1)]]),_:1}),N(B(qy),{value: ` canvas ` },{default:M(()=>[...n[3]||=[j( ` Canvas ` ,-1)]]),_:1})]),_:1})]),_:1},8,[ ` modelValue ` ]),G( ` span ` ,m2,H(l.value? ` Same as the current definition ` : ` Compared with the current definition ` ),1),N(B(X),{type: ` button ` ,size: ` sm ` ,variant: ` outline ` ,class: ` ml - auto ` ,disabled:s.value===null||l.value,title:s.value===null? ` This revision removed the workflow ` :void 0,onClick:n[1]||=e=>r( ` restore ` ,s.value)},{default:M(()=>[N(B(An),{"data-icon": ` inline - start ` }),n[4]||=j( ` Restore this version ` ,-1)]),_:1},8,[ ` disabled ` , ` title ` ])]),s.value===null?(z(),K( ` p ` ,h2, ` This revision removed the workflow . ` )):a.value=== ` yaml ` ?(z(),K( ` pre ` ,g2,[G( ` code ` ,null,[(z(!0),K(U,null,q(c.value,(e,t)=>(z(),K( ` span ` ,{key:t,class:P([ ` block min - h - 6 px - 3 whitespace - pre - wrap ` ,{"bg-ok/10":e.kind=== ` add ` ,"bg-danger/10 text-danger":e.kind=== ` del ` }])},[G( ` span ` ,_2,H(e.kind=== ` add ` ? ` + ` :e.kind=== ` del ` ? ` - ` : ` ` ),1),j(H(e.text),1)],2))),128))])])):(z(),K( ` div ` ,v2,[G( ` div ` ,y2,[G( ` span ` ,b2, ` v ` +H(o.value.version),1),G( ` div ` ,x2,[N(Q0,{yaml:s.value,marks:u.value},null,8,[ ` yaml ` , ` marks ` ])])]),G( ` div ` ,S2,[n[5]||=G( ` span ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Current ` ,-1),G( ` div ` ,C2,[N(Q0,{yaml:e.current,marks:d.value},null,8,[ ` yaml ` , ` marks ` ])])])]))])):R( ` ` ,!0)]))}}),T2= ` workflow - definitions ` ;function E2(e){let t=pe(),n=Y([]),r=Y( ` ` );async function i(){try{n.value=await t.hist
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 d2(e){let t=aV(e).toJS(),n=new Map;for(let r of zV(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 f2(e,t,n){let r=d2(e),i=d2(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 p2={class: ` grid h - [ calc ( 100 dvh - 17 rem ) ] min - h - [ 26 rem ] grid - cols - [ 18 rem _1fr ] gap - 3 ` },m2={class: ` min - h - 0 divide - y divide - border overflow - y - auto rounded - lg border border - border ` ,"aria-label": ` Revisions ` },h2=[ ` aria - current ` , ` onClick ` ],g2={class: ` flex items - center gap - 2 text - sm ` },_2={class: ` font - mono text - xs text - fg - subtle ` },v2=[ ` title ` ],y2={key:0,class: ` px - 3 py - 2 text - sm text - muted - foreground ` },b2={key:0,class: ` flex min - h - 0 flex - col gap - 2 ` },x2={class: ` flex items - center gap - 2 ` },S2={class: ` text - xs text - muted - foreground ` },C2={key:0,class: ` rounded - lg border border - border p - 4 text - sm text - muted - foreground ` },w2={key:1,class: ` min - h - 0 flex - 1 overflow - auto rounded - lg border border - border py - 2 font - mono text - [ 13 px ] leading - 6 ` },T2={class: ` inline - block w - 4 select - none text - fg - subtle ` },E2={key:2,class: ` grid min - h - 0 flex - 1 grid - cols - 2 gap - 3 ` },D2={class: ` flex min - h - 0 flex - col gap - 1 ` },O2={class: ` text - xs font - medium text - muted - foreground ` },k2={class: ` min - h - 0 flex - 1 ` },A2={class: ` flex min - h - 0 flex - col gap - 1 ` },j2={class: ` min - h - 0 flex - 1 ` },M2=A({__name: ` WorkflowHistory ` ,props:rt({revisions:{},current:{},error:{}},{selected:{default:0},selectedModifiers:{},mode:{default: ` yaml ` },modeModifiers:{}}),emits:rt([ ` restore ` ],[ ` update : selected ` , ` update : mode ` ]),setup(e,{emit:t}){let n=e,r=t,i=Pe(e, ` selected ` ),a=Pe(e, ` mode ` );I(()=>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=L(()=>n.revisions.find(e=>e.version===i.value)),s=L(()=>o.value?.yaml??null),c=L(()=>s.value===null?[]:u2(s.value,n.current)),l=L(()=>s.value!==null&&s.value===n.current),u=L(()=>s.value===null?{}:f2(s.value,n.current, ` removed ` )),d=L(()=>s.value===null?{}:f2(n.current,s.value, ` added ` )),f={added: ` default ` ,edited: ` secondary ` ,removed: ` destructive ` };return(t,n)=>(z(),K( ` div ` ,p2,[G( ` ol ` ,m2,[(z(!0),K(U,null,q(e.revisions,e=>(z(),K( ` li ` ,{key:e.version},[G( ` button ` ,{type: ` button ` ,class:P([ ` 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},[G( ` span ` ,g2,[G( ` span ` ,_2, ` v ` +H(e.version),1),N(B(kt),{variant:f[e.change]},{default:M(()=>[j(H(e.change),1)]),_:2},1032,[ ` variant ` ])]),G( ` span ` ,{class: ` mt - 0.5 block truncate text - xs text - muted - foreground ` ,title:e.at},H(e.actor|| ` unknown ` )+ ` · ` +H(e.source|| ` unknown ` )+ ` · ` +H(B(Ng)(e.at)),9,v2)],10,h2)]))),128)),e.revisions.length?R( ` ` ,!0):(z(),K( ` li ` ,y2,H(e.error|| ` No recorded changes ` ),1))]),o.value?(z(),K( ` div ` ,b2,[G( ` div ` ,x2,[N(B(tb),{modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e},{default:M(()=>[N(B(rb),null,{default:M(()=>[N(B(ib),{value: ` yaml ` },{default:M(()=>[...n[2]||=[j( ` YAML ` ,-1)]]),_:1}),N(B(ib),{value: ` canvas ` },{default:M(()=>[...n[3]||=[j( ` Canvas ` ,-1)]]),_:1})]),_:1})]),_:1},8,[ ` modelValue ` ]),G( ` span ` ,S2,H(l.value? ` Same as the current definition ` : ` Compared with the current definition ` ),1),N(B(X),{type: ` button ` ,size: ` sm ` ,variant: ` outline ` ,class: ` ml - auto ` ,disabled:s.value===null||l.value,title:s.value===null? ` This revision removed the workflow ` :void 0,onClick:n[1]||=e=>r( ` restore ` ,s.value)},{default:M(()=>[N(B(An),{"data-icon": ` inline - start ` }),n[4]||=j( ` Restore this version ` ,-1)]),_:1},8,[ ` disabled ` , ` title ` ])]),s.value===null?(z(),K( ` p ` ,C2, ` This revision removed the workflow . ` )):a.value=== ` yaml ` ?(z(),K( ` pre ` ,w2,[G( ` code ` ,null,[(z(!0),K(U,null,q(c.value,(e,t)=>(z(),K( ` span ` ,{key:t,class:P([ ` block min - h - 6 px - 3 whitespace - pre - wrap ` ,{"bg-ok/10":e.kind=== ` add ` ,"bg-danger/10 text-danger":e.kind=== ` del ` }])},[G( ` span ` ,T2,H(e.kind=== ` add ` ? ` + ` :e.kind=== ` del ` ? ` - ` : ` ` ),1),j(H(e.text),1)],2))),128))])])):(z(),K( ` div ` ,E2,[G( ` div ` ,D2,[G( ` span ` ,O2, ` v ` +H(o.value.version),1),G( ` div ` ,k2,[N(o2,{yaml:s.value,marks:u.value},null,8,[ ` yaml ` , ` marks ` ])])]),G( ` div ` ,A2,[n[5]||=G( ` span ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Current ` ,-1),G( ` div ` ,j2,[N(o2,{yaml:e.current,marks:d.value},null,8,[ ` yaml ` , ` marks ` ])])])]))])):R( ` ` ,!0)]))}}),N2= ` workflow - definitions ` ;function P2(e){let t=pe(),n=Y([]),r=Y( ` ` );async function i(){try{n.value=await t.hist
Line truncated