@@ -11,58 +11,58 @@ Defaulting to \`null\`.`),null)}function Ps(e){return Ms(e)&&!Number.isNaN(e)&&e
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:pd(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>pd(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=hd(c),u=e+1<n.length?hd(n[e+1]):null;if(l&&u&&gd(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=hd(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>pd(e)),rows:r.map(e=>e.map(e=>pd(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:pd(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:pd(c.replace(/^> \s ?/, ` ` ))})):r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function hd(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 gd(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var _d={class: ` [ overflow - wrap : anywhere ] ` },vd={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },yd={class: ` font - mono text - [ 0.85 em ] ` },bd={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },xd={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Sd={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Cd={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },wd={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },Td={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },Ed={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },Dd={key:8,class: ` mb - 2.5 last : mb - 0 ` },Od=k({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=I(()=>md(t.text));return(e,t)=>(R(),G( ` div ` ,_d,[(R(!0),G(H,null,K(n.value,(e,t)=>(R(),G(H,{key:t},[e.kind=== ` pre ` ?(R(),G( ` pre ` ,vd,[W( ` code ` ,yd,V(e.code),1)])):e.kind=== ` table ` ?(R(),G( ` table ` ,bd,[W( ` thead ` ,null,[W( ` tr ` ,null,[(R(!0),G(H,null,K(e.head,(e,t)=>(R(),G( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[M(dd,{inline:e},null,8,[ ` inline ` ])]))),128))])]),W( ` tbody ` ,null,[(R(!0),G(H,null,K(e.rows,(e,t)=>(R(),G( ` tr ` ,{key:t},[(R(!0),G(H,null,K(e,(e,t)=>(R(),G( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[M(dd,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(R(),G( ` blockquote ` ,xd,[M(dd,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(R(),G( ` h1 ` ,Sd,[M(dd,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(R(),G( ` h2 ` ,Cd,[M(dd,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(R(),G( ` h3 ` ,wd,[M(dd,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(R(),G( ` ul ` ,Td,[(R(!0),G(H,null,K(e.items,(e,t)=>(R(),G( ` li ` ,{key:t},[M(dd,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(R(),G( ` ol ` ,Ed,[(R(!0),G(H,null,K(e.items,(e,t)=>(R(),G( ` li ` ,{key:t},[M(dd,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(R(),G( ` p ` ,Dd,[M(dd,{inline:e.inline},null,8,[ ` inline ` ])])):L( ` ` ,!0)],64))),128))]))}}),kd={class: ` truncate ` },Ad=k({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Re( ` RouterLink ` );return R(),q(r,{to:e.path,title: ` Go to $ { e . label || e . path } ` ,class: ` inline - flex max - w - full items - center gap - 1.5 rounded - full 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:j(()=>[M(z(Wt),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),W( ` span ` ,kd,V(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),jd={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },Md={class: ` font - semibold text - foreground ` },Nd={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },Pd=k({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=I(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=I(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=I(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=I(()=>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?(R(),q(Ad,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(R(),G( ` div ` ,jd,[M(z(qn),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),W( ` span ` ,Md,V(n.value),1),r.value?(R(),G( ` code ` ,Nd,V(r.value),1)):L( ` ` ,!0),W( ` span ` ,{class:N(z(Y)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},V(a.value),3)]))}}),Fd={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },Id={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },Ld={key:3,class: ` whitespace - pre - wrap ` },Rd=k({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(R(),G( ` div ` ,{class:N([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[W( ` div ` ,{class:N(z(Y)( ` 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?(R(),G( ` div ` ,Fd,[(R(!0),G(H,null,K(e.tools,(t,n)=>(R(),q(Pd,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):L( ` ` ,!0),e.media.length?(R(),G( ` div ` ,Id,[(R(!0),G(H,null,K(e.media,(e,t)=>(R(),q(id,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):L( ` ` ,!0),e.assistant?(R(),q(Od,{key:2,text:e.text},null,8,[ ` text ` ])):(R(),G( ` div ` ,Ld,V(e.text),1)),P(t. $ slots, ` default ` )],2)],2))}}),zd={class: ` text - sm ` },Bd={class: ` font - medium ` },Vd={key:0,class: ` mt - 1 text - fg - muted ` },Hd={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },Ud=k({__name: ` ChatCh Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>Qg? ` $ { n . slice ( 0 , Qg ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var e_=[ ` title ` ],t_=k({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=I(()=>Tg(n.event)),a=I(()=> $ g(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=I(()=>n.event.at?Dh(n.event.at): ` — ` );return(e,t)=>(R(),q(z(Yg),{class:N(i.value>0? ` cursor - pointer ` : ` ` ),role:i.value>0? ` link ` :void 0,tabindex:i.value>0?0:void 0,title:i.value>0? ` Open task details ` :void 0,onClick:o,onKeydown:[Ot(Dt(o,[ ` prevent ` ]),[ ` enter ` ]),Ot(Dt(o,[ ` prevent ` ]),[ ` space ` ])]},{default:j(()=>[M(z( $ ),{class: ` font - medium ` },{default:j(()=>[A(V(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),M(z( $ ),{class: ` font - mono ` },{default:j(()=>[A(V(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),M(z( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:j(()=>[W( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},V(a.value.text),9,e_)]),_:1}),M(z( $ ),null,{default:j(()=>[A(V(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),n_=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function r_(e){return(Number(e?.task_id)||0)>0}function i_(e,t){return t=== ` tasks ` ?r_(e):t!== ` system ` ||!r_(e)}function a_(e,t){return e.filter(e=>i_(e,t))}function o_(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function s_(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function c_(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=s_( $ g(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 l_={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },u_={class: ` max - h - [ 28 rem ] overflow - y - auto ` },d_=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],f_=[ ` title ` ],p_=k({__name: ` LiveActivityCard ` ,setup(e){let t=Af(),{activity:n,streamKind:r,streamState:i}=Ae(ee()),a=J( ` all ` ),o=I(()=>a_(n.value,a.value)),s=I(()=>o_(o.value.length,a.value)),c=tt(new Set),l=I(()=>c_(o.value));function u(e){c.has(e)?c.delete(e):c.add(e)}function d(e){return c.has(e.key)}function f(e){return $ g(e.representative)}function p(e){return e.representative.at?Dh(e.representative.at): ` — ` }function m(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(R(),q(z(bh),null,{default:j(()=>[M(z(Th),null,{default:j(()=>[M(z(Eh),null,{default:j(()=>[...t[1]||=[A( ` Live activity ` ,-1)]]),_:1}),M(z(xh),{class: ` flex items - center gap - 2 ` },{default:j(()=>[M(z(Gg),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:z(n_)},null,8,[ ` modelValue ` , ` options ` ]),M(z(It),{variant:z(r)},{default:j(()=>[A(V(z(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),M(z(Sh),null,{default:j(()=>[W( ` div ` ,l_,[W( ` div ` ,u_,[M(z(qg),null,{default:j(()=>[M(z(Zg),{class: ` sticky top - 0 z - 10 bg - card ` },{default:j(()=>[M(z(Yg),null,{default:j(()=>[M(z(Xg),null,{default:j(()=>[...t[2]||=[A( ` Event ` ,-1)]]),_:1}),M(z(Xg),null,{default:j(()=>[...t[3]||=[A( ` Task ` ,-1)]]),_:1}),M(z(Xg),null,{default:j(()=>[...t[4]||=[A( ` Detail ` ,-1)]]),_:1}),M(z(Xg),null,{default:j(()=>[...t[5]||=[A( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),M(z(Jg),null,{default:j(()=>[o.value.length?L( ` ` ,!0):(R(),q(z(Yg),{key:0},{default:j(()=>[M(z( $ ),{colspan: ` 4 ` },{default:j(()=>[M(z(dh),null,{default:j(()=>[M(z(mh),null,{default:j(()=>[M(z(_h),null,{default:j(()=>[A(V(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(R(!0),G(H,{key:1},K(l.value,e=>(R(),G(H,{key:e.key},[e.count===1?(R(),q(t_,{key:0,event:e.representative,onOpen:m},null,8,[ ` event ` ])):(R(),G(H,{key:1},[M(z(Yg),{class:N(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&&m(e.taskID),onKeydown:[Ot(Dt(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),Ot(Dt(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:j(()=>[M(z( $ ),{class: ` font - medium ` },{default:j(()=>[W( ` button ` ,{type: ` button ` ,class: ` inline - flex items - center gap - 1 rounded hover : opacity - 80 ` ,"aria-expanded":d(e),"aria-label": ` $ { d ( e ) ? ` Hide ` : ` Show ` } $ { e . count } $ { e . label } events ` ,onClick:Dt(t=>u(e.key),[ ` stop ` ])},[d(e)?(R(),q(z(Zt),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(R(),q(z(Qt),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),A( ` ` +V(e.label)+ ` ` ,1),M(z(It),{variant: ` idle ` },{default:j(()=>[A( ` × ` +V(e.count),1)]),_:2},1024)],8,d_)]),_:2},1024),M(z( $ ),{class: ` font - mono ` },{default:j(()=>[A(V(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),M(z( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:j(()=>[W( ` span ` ,{class: ` block truncate ` ,title:f(e).truncated?f(e).full:void 0},V(f(e).text),9,f_)]),_:2},1024),M(z( $ ),null,{default:j(()=>[A(V(p(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),d(e)?(R(!0),G(H,{key:0},K(e.events,(t,n)=>(R(),q(t_,{key: ` $ { e . key } : $ { n } ` ,event:t,onOpen:m},null
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 Nv(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 Pv(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 Fv(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 Iv(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 Lv=J([]),Rv=J([]),zv=J(!0),Bv=J(null),Vv=J(null),Hv=J(!1),Uv=J(null);async function Wv(){try{let e=await X.eventTypes();zv.value=e.enabled!==!1,Lv.value=e.event_types||[],Rv.value=e.proposals||[],Bv.value=null}catch(e){Bv.value=e.message||String(e)}}function Gv(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function Kv(e){Uv.value=null,Vv.value=e}function qv(e){let t=ty.value.find(t=>String(t.id)===e.sample_id);Kv({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:Gv(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function Jv(e= ` ` ){Kv({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function Yv(e){Kv({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:Gv(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function Xv(){Vv.value=null}async function Zv(){let e=Vv.value;if(e){Hv.value=!0;try{if(e.mode=== ` edit ` &&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:Iv(e.rule)});else{let t=e.mode=== ` paste ` ?Mv(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:Iv(e.rule),example:{headers:t,body:e.body}})}Vv.value=null,await Wv()}catch(e){Uv.value=e.message||String(e)}finally{Hv.value=!1}}}var Qv=J(null);async function $ v(){let e=Qv.value;if(Qv.value=null,e)try{await X.eventTypeDelete(e.id),await Wv()}catch(e){Bv.value=e.message||String(e)}}var ey=100,ty=J([]),ny=J(!0),ry=J(null),iy=J(!0),ay=J(null);async function oy(){try{let e=await X.captures(ey);ny.value=e.enabled!==!1,ty.value=e.captures||[],ry.value=null}catch(e){ry.value=e.message||String(e)}finally{iy.value=!1}}function sy(e){let t=ty.value.find(t=>t.id===e);return t&&(ay.value=t),!!t}function cy(){ty.value.length&&(ay.value=ty.value[0])}function ly(){ce( ` captures ` ,()=>{oy(),Wv()})}var uy={key:0,class: ` text - xs text - fg - muted ` },dy={key:1,class: ` flex flex - col gap - 1 text - xs ` },fy={key:1},py={key:2,class: ` text - xs text - fg - muted ` },my=k({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=J([]),r=J(!1);F(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await X.dispatches(t.kind,t.id)}catch{n.value=[],r.value=!0}},{immediate:!0});let i=e=>({path: ` / events ` ,query:{tab: ` inspector ` ,capture:e}});return(e,a)=>{let o=Re( ` RouterLink ` );return r.value?(R(),G( ` p ` ,uy, ` Dispatches unavailable . ` )):n.value.length?(R(),G( ` ul ` ,dy,[(R(!0),G(H,null,K(n.value,e=>(R(),G( ` li ` ,{key:e.binding_id+e.capture_id,class: ` flex flex - wrap items - center gap - x - 2 font - mono text - fg - muted ` },[t.kind=== ` bindings ` ?L( ` ` ,!0):(R(),q(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:j(()=>[A( ` binding ` +V(e.binding_id.slice(0,8))+ ` v ` +V(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?L( ` ` ,!0):(R(),q(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:j(()=>[A( ` capture ` +V(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?L( ` ` ,!0):(R(),G(H,{key:2},[e.task_id?(R(),q(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:j(()=>[A( ` task # ` +V(e.task_id),1)]),_:2},1032,[ ` to ` ])):(R(),G( ` span ` ,fy,V(e.reason|| ` claimed , no task recorded ` ),1))],64)),W( ` span ` ,null,V(z(Dh)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?L( ` ` ,!0):(R(),G( ` p ` ,py, ` No dispatches yet . ` ))}}}),hy=k({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(R(),q(z(pn),{role: ` status ` ,"aria-label": ` Loading ` ,class:N(z(Y)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function gy(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function _y(e){return(e?.repository?? ` required ` )!== ` none ` }function vy(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function yy(e,t){switch(t){case ` string ` :return e;case ` number ` :return e.trim()!== ` ` &&!Number.isNaN(Number(e))?Number(e):e;case ` bool ` :return e=== ` true ` ||e!== ` false ` &&e;default:try{return JSON.parse(e)}catch{return e}}}var by={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },xy={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function Sy(e)
Line truncated
` )}};nR.defaultYaml={explicit:!1,version: ` 1.2 ` },nR.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function rR(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 iR(e){let t=new Set;return YL(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function aR(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function oR(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=iR(e);let a=aR(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(VL(t.node)||UL(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 sR(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=sR(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=sR(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=sR(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=sR(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function cR(e,t,n){if(Array.isArray(e))return e.map((e,t)=>cR(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!GL(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 lR=class{constructor(e){Object.defineProperty(this,IL,{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(!RL(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=cR(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?sR(i,{"":o}, ` ` ,o):o}},uR=class extends lR{constructor(e){super(AL),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=[],YL(e,{Node:(e,t)=>{(LL(t)||GL(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||=(cR(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=dR(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(rR(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 dR(e,t,n){if(LL(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(UL(t)){let r=0;for(let i of t.items){let t=dR(e,i,n);t>r&&(r=t)}return r}if(BL(t)){let r=dR(e,t.key,n),i=dR(e,t.value,n);return Math.max(r,i)}return 1}var fR=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,pR=class extends lR{constructor(e){super(PL),this.value=e}toJSON(e,t){return t?.keep?this.value:cR(this.value,e,t)}toString(){return String(this.value)}};pR.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,pR.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,pR.PLAIN= ` PLAIN ` ,pR.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,pR.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var mR= ` tag : yaml . org , 2002 : ` ;function hR(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 gR(e,t,n){if(RL(e)&&(e=e.contents),WL(e))return e;if(BL(e)){let t=n.schema[ML].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 uR(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=mR+t.slice(2));let l=hR(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new pR(e);return c&&(c.node=t),t
Line truncated
` )?x R(n,t):n.includes( `
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>Qg? ` $ { n . slice ( 0 , Qg ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var e_=[ ` title ` ],t_=k({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=I(()=>Tg(n.event)),a=I(()=> $ g(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=I(()=>n.event.at?Dh(n.event.at): ` — ` );return(e,t)=>(R(),q(z(Yg),{class:N(i.value>0? ` cursor - pointer ` : ` ` ),role:i.value>0? ` link ` :void 0,tabindex:i.value>0?0:void 0,title:i.value>0? ` Open task details ` :void 0,onClick:o,onKeydown:[Ot(Dt(o,[ ` prevent ` ]),[ ` enter ` ]),Ot(Dt(o,[ ` prevent ` ]),[ ` space ` ])]},{default:j(()=>[M(z( $ ),{class: ` font - medium ` },{default:j(()=>[A(V(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),M(z( $ ),{class: ` font - mono ` },{default:j(()=>[A(V(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),M(z( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:j(()=>[W( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},V(a.value.text),9,e_)]),_:1}),M(z( $ ),null,{default:j(()=>[A(V(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),n_=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function r_(e){return(Number(e?.task_id)||0)>0}function i_(e,t){return t=== ` tasks ` ?r_(e):t!== ` system ` ||!r_(e)}function a_(e,t){return e.filter(e=>i_(e,t))}function o_(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function s_(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function c_(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=s_( $ g(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 l_={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },u_={class: ` max - h - [ 28 rem ] overflow - y - auto ` },d_=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],f_=[ ` title ` ],p_=k({__name: ` LiveActivityCard ` ,setup(e){let t=Af(),{activity:n,streamKind:r,streamState:i}=Ae(ee()),a=J( ` all ` ),o=I(()=>a_(n.value,a.value)),s=I(()=>o_(o.value.length,a.value)),c=tt(new Set),l=I(()=>c_(o.value));function u(e){c.has(e)?c.delete(e):c.add(e)}function d(e){return c.has(e.key)}function f(e){return $ g(e.representative)}function p(e){return e.representative.at?Dh(e.representative.at): ` — ` }function m(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(R(),q(z(bh),null,{default:j(()=>[M(z(Th),null,{default:j(()=>[M(z(Eh),null,{default:j(()=>[...t[1]||=[A( ` Live activity ` ,-1)]]),_:1}),M(z(xh),{class: ` flex items - center gap - 2 ` },{default:j(()=>[M(z(Gg),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:z(n_)},null,8,[ ` modelValue ` , ` options ` ]),M(z(It),{variant:z(r)},{default:j(()=>[A(V(z(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),M(z(Sh),null,{default:j(()=>[W( ` div ` ,l_,[W( ` div ` ,u_,[M(z(qg),null,{default:j(()=>[M(z(Zg),{class: ` sticky top - 0 z - 10 bg - card ` },{default:j(()=>[M(z(Yg),null,{default:j(()=>[M(z(Xg),null,{default:j(()=>[...t[2]||=[A( ` Event ` ,-1)]]),_:1}),M(z(Xg),null,{default:j(()=>[...t[3]||=[A( ` Task ` ,-1)]]),_:1}),M(z(Xg),null,{default:j(()=>[...t[4]||=[A( ` Detail ` ,-1)]]),_:1}),M(z(Xg),null,{default:j(()=>[...t[5]||=[A( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),M(z(Jg),null,{default:j(()=>[o.value.length?L( ` ` ,!0):(R(),q(z(Yg),{key:0},{default:j(()=>[M(z( $ ),{colspan: ` 4 ` },{default:j(()=>[M(z(dh),null,{default:j(()=>[M(z(mh),null,{default:j(()=>[M(z(_h),null,{default:j(()=>[A(V(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(R(!0),G(H,{key:1},K(l.value,e=>(R(),G(H,{key:e.key},[e.count===1?(R(),q(t_,{key:0,event:e.representative,onOpen:m},null,8,[ ` event ` ])):(R(),G(H,{key:1},[M(z(Yg),{class:N(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&&m(e.taskID),onKeydown:[Ot(Dt(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),Ot(Dt(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:j(()=>[M(z( $ ),{class: ` font - medium ` },{default:j(()=>[W( ` button ` ,{type: ` button ` ,class: ` inline - flex items - center gap - 1 rounded hover : opacity - 80 ` ,"aria-expanded":d(e),"aria-label": ` $ { d ( e ) ? ` Hide ` : ` Show ` } $ { e . count } $ { e . label } events ` ,onClick:Dt(t=>u(e.key),[ ` stop ` ])},[d(e)?(R(),q(z(Zt),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(R(),q(z(Qt),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),A( ` ` +V(e.label)+ ` ` ,1),M(z(It),{variant: ` idle ` },{default:j(()=>[A( ` × ` +V(e.count),1)]),_:2},1024)],8,d_)]),_:2},1024),M(z( $ ),{class: ` font - mono ` },{default:j(()=>[A(V(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),M(z( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:j(()=>[W( ` span ` ,{class: ` block truncate ` ,title:f(e).truncated?f(e).full:void 0},V(f(e).text),9,f_)]),_:2},1024),M(z( $ ),null,{default:j(()=>[A(V(p(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),d(e)?(R(!0),G(H,{key:0},K(e.events,(t,n)=>(R(),q(t_,{key: ` $ { e . key } : $ { n } ` ,event:t,onOpen:m},null
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 Pv(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 Fv(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 Iv(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 Lv(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 Rv=J([]),zv=J([]),Bv=J(!0),Vv=J(null),Hv=J(null),Uv=J(!1),Wv=J(null);async function Gv(){try{let e=await X.eventTypes(Mv.value);Bv.value=e.enabled!==!1,Rv.value=e.event_types||[],zv.value=e.proposals||[],Vv.value=null}catch(e){Vv.value=e.message||String(e)}}function Kv(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function qv(e){Wv.value=null,Hv.value=e}function Jv(e){let t=ny.value.find(t=>String(t.id)===e.sample_id);qv({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:Kv(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function Yv(e= ` ` ){qv({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function Xv(e){qv({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:Kv(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function Zv(){Hv.value=null}async function Qv(){let e=Hv.value;if(e){Uv.value=!0;try{if(e.mode=== ` edit ` &&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:Lv(e.rule)});else{let t=e.mode=== ` paste ` ?Nv(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:Lv(e.rule),example:{headers:t,body:e.body}})}Hv.value=null,await Gv()}catch(e){Wv.value=e.message||String(e)}finally{Uv.value=!1}}}var $ v=J(null);async function ey(){let e= $ v.value;if( $ v.value=null,e)try{await X.eventTypeDelete(e.id),await Gv()}catch(e){Vv.value=e.message||String(e)}}var ty=100,ny=J([]),ry=J(!0),iy=J(null),ay=J(!0),oy=J(null);async function sy(){try{let e=await X.captures(ty);ry.value=e.enabled!==!1,ny.value=e.captures||[],iy.value=null}catch(e){iy.value=e.message||String(e)}finally{ay.value=!1}}function cy(e){let t=ny.value.find(t=>t.id===e);return t&&(oy.value=t),!!t}function ly(){ny.value.length&&(oy.value=ny.value[0])}function uy(){ce( ` captures ` ,()=>{sy(),Gv()})}var dy=[ ` owner ` , ` admin ` , ` developer ` , ` viewer ` ],fy=J([]),py=J(!1),my=J( ` ` ),hy=J(null),gy=null;function _y(e=!1){return hy.value&&!e?Promise.resolve():gy||(gy=X.orgs().then(e=>{fy.value=e.orgs,py.value=e.instance_admin,my.value=e.current;let t=hy.value?.id??e.current;hy.value=e.orgs.find(e=>e.id===t)??e.orgs[0]??null}).finally(()=>{gy=null}),gy)}function vy(e){hy.value=fy.value.find(t=>t.id===e)??hy.value}var yy=hy,by={key:0,class: ` text - xs text - fg - muted ` },xy={key:1,class: ` flex flex - col gap - 1 text - xs ` },Sy={key:1},Cy={key:2,class: ` text - xs text - fg - muted ` },wy=k({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=J([]),r=J(!1);F(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await X.dispatches(t.kind,t.id)}catch{n.value=[],r.value=!0}},{immediate:!0});let i=e=>({path: ` / events ` ,query:{tab: ` inspector ` ,capture:e}});return(e,a)=>{let o=Re( ` RouterLink ` );return r.value?(R(),G( ` p ` ,by, ` Dispatches unavailable . ` )):n.value.length?(R(),G( ` ul ` ,xy,[(R(!0),G(H,null,K(n.value,e=>(R(),G( ` li ` ,{key:e.binding_id+e.capture_id,class: ` flex flex - wrap items - center gap - x - 2 font - mono text - fg - muted ` },[t.kind=== ` bindings ` ?L( ` ` ,!0):(R(),q(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:j(()=>[A( ` binding ` +V(e.binding_id.slice(0,8))+ ` v ` +V(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?L( ` ` ,!0):(R(),q(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:j(()=>[A( ` capture ` +V(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?L( ` ` ,!0):(R(),G(H,{key:2},[e.task_id?(R(),q(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:j(()=>[A( ` task # ` +V(e.task_id),1)]),_:2},1032,[ ` to ` ])):(R(),G( ` span ` ,Sy,V(e.reason|| ` claimed , no task recorded ` ),1))],64)),W( ` span ` ,null,V(z(Dh)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?L( ` ` ,!0):(R(),G( ` p ` ,Cy, ` No dispatches yet . ` ))}}}),Ty=k({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(R(),q(z(pn),{role: ` status ` ,"aria-label": ` Loading ` ,class:N(z(Y)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function Ey(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function Dy(e){return(e?.repository?? ` required ` )!== ` none ` }function Oy(e,
Line truncated
` )}};iR.defaultYaml={explicit:!1,version: ` 1.2 ` },iR.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function aR(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 oR(e){let t=new Set;return ZL(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function sR(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function cR(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=oR(e);let a=sR(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(UL(t.node)||GL(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 lR(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=lR(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=lR(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=lR(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=lR(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function uR(e,t,n){if(Array.isArray(e))return e.map((e,t)=>uR(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!qL(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 dR=class{constructor(e){Object.defineProperty(this,RL,{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(!BL(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=uR(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?lR(i,{"":o}, ` ` ,o):o}},fR=class extends dR{constructor(e){super(ML),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=[],ZL(e,{Node:(e,t)=>{(zL(t)||qL(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||=(uR(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=pR(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(aR(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 pR(e,t,n){if(zL(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(GL(t)){let r=0;for(let i of t.items){let t=pR(e,i,n);t>r&&(r=t)}return r}if(HL(t)){let r=pR(e,t.key,n),i=pR(e,t.value,n);return Math.max(r,i)}return 1}var mR=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,hR=class extends dR{constructor(e){super(IL),this.value=e}toJSON(e,t){return t?.keep?this.value:uR(this.value,e,t)}toString(){return String(this.value)}};hR.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,hR.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,hR.PLAIN= ` PLAIN ` ,hR.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,hR.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var gR= ` tag : yaml . org , 2002 : ` ;function _R(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 vR(e,t,n){if(BL(e)&&(e=e.contents),KL(e))return e;if(HL(e)){let t=n.schema[PL].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 fR(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=gR+t.slice(2));let l=_R(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new hR(e);return c&&(c.node=t),t
Line truncated
` )?C R(n,t):n.includes( `
` )? `
` +x R(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,C R= ` flow ` ,w R= ` block ` ,T R= ` quoted ` ;function E 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=D 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=D R(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` +C R(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,T R= ` flow ` ,E R= ` block ` ,D R= ` quoted ` ;function O 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=k 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=k 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 D 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}),k R=e=>/^(%|---| \. \. \. )/m.test(e);function A 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 j 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||(k 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 k 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 A R=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),j R=e=>/^(%|---| \. \. \. )/m.test(e);function M 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 N 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||(j 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:E R(o,a,T R,O R(t,!1))}function M R(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return j R(e,t);let n=t.indent||(k R(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : ER ( r , n , CR , OR ( t , ! 1 ) ) } function NR ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = jR ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? MR : i && ! t ? jR : n ? MR : jR } return r ( e , t ) } var PR ; try { PR = 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:O R(o,a,D R,A R(t,!1))}function P R(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return N R(e,t);let n=t.indent||(j R(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : OR ( r , n , TR , AR ( t , ! 1 ) ) } function FR ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = NR ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? PR : i && ! t ? NR : n ? PR : NR } return r ( e , t ) } var IR ; try { IR = RegExp ( ` (^|(?<!
) )
+ ( ? !
| $ ) ` , ` g ` )}catch{P R=/ \n +(?! \n | $ )/g}function F 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 N R(n,r);let l=r.indent||(r.forceBlockIndent||k R(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===p R.BLOCK_FOLDED?!1:t===p R.BLOCK_LITERAL||!A R(n,c,l.length);if(!n)return u? ` |
| $ ) ` , ` g ` )}catch{I R=/ \n +(?! \n | $ )/g}function L 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 F R(n,r);let l=r.indent||(r.forceBlockIndent||j R(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===h R.BLOCK_FOLDED?!1:t===h R.BLOCK_LITERAL||!M 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(P 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(I 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!==p R.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=E R( ` $ { v } $ { e } $ { p } ` ,l,w R,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function I 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 N R(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?N R(a,t):F R(e,t,n,r);if(!s&&!u&&i!==p R.PLAIN&&a.includes( `
` ))return F R(e,t,n,r);if(k R(a)){if(c=== ` ` )return t.forceBlockIndent=!0,F R(e,t,n,r);if(s&&c===l)return N 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 N R(a,t)}return s?d:E R(d,c,C R,O R(t,!1))}function L 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!==p R.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=p R.QUOTE_DOUBLE);let c=e=>{switch(e){case p R.BLOCK_FOLDED:case p R.BLOCK_LITERAL:return i||a?N R(o.value,t):F R(o,t,n,r);case p R.QUOTE_DOUBLE:return j R(o.value,t);case p R.QUOTE_SINGLE:return M R(o.value,t);case p R.PLAIN:return I 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 R R(e,t){let n=Object.assign({blockQuote:!0,commentString:b R,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 z 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(V 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 B R(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(V L(e)||U L(e))&&e.anchor;a&&r R(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 V R(e,t,n,r){if(B L(e))return e.toString(t,n,r);if(L 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=W L(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=z R(t.doc.schema.tags,a);let o=B 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):V L(a)?L R(a,t,n,r):a.toString(t,n,r);return o?V L(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function H 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=W L(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(U L(e)||!W 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||U L(e)||(V L(e)?e.type===p R.BLOCK_FOLDED||e.type===p R.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=V 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+=S R(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=S R(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=S R(g,n.indent,l(f))));let _,v,y;W 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&&V L(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&H L(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=V R(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { xR ( 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=A R(r,!0);o!== ` folded ` &&t!==h R.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=O R( ` $ { v } $ { e } $ { p } ` ,l,E R,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function R 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 F R(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?F R(a,t):L R(e,t,n,r);if(!s&&!u&&i!==h R.PLAIN&&a.includes( `
` ))return L R(e,t,n,r);if(j R(a)){if(c=== ` ` )return t.forceBlockIndent=!0,L R(e,t,n,r);if(s&&c===l)return F 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 F R(a,t)}return s?d:O R(d,c,T R,A R(t,!1))}function z 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!==h R.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=h R.QUOTE_DOUBLE);let c=e=>{switch(e){case h R.BLOCK_FOLDED:case h R.BLOCK_LITERAL:return i||a?F R(o.value,t):L R(o,t,n,r);case h R.QUOTE_DOUBLE:return N R(o.value,t);case h R.QUOTE_SINGLE:return P R(o.value,t);case h R.PLAIN:return R 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 B R(e,t){let n=Object.assign({blockQuote:!0,commentString:S R,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 V 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(U 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 H R(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(U L(e)||G L(e))&&e.anchor;a&&a R(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 U R(e,t,n,r){if(H L(e))return e.toString(t,n,r);if(z 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=K L(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=V R(t.doc.schema.tags,a);let o=H 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):U L(a)?z R(a,t,n,r):a.toString(t,n,r);return o?U L(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function W 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=K L(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(G L(e)||!K 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||G L(e)||(U L(e)?e.type===h R.BLOCK_FOLDED||e.type===h R.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=U 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+=w R(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=w R(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=w R(g,n.indent,l(f))));let _,v,y;K 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&&U L(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&W L(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=U R(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { CR ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
` &&y&&(S= `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&U L(t)){let e=x[0],r=x.indexOf( `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&G 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+=S R(g,n.indent,l(y)):h&&i&&i(),g}function U R(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var W R= ` << ` ,G R={identify:e=>e===W R||typeof e== ` symbol ` &&e.description===W R,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new p R(Symbol(W R)),{addToJSMap:q R}),stringify:()=>W R},K R=(e,t)=>(G R.identify(t)||V L(t)&&(!t.type||t.type===p R.PLAIN)&&G R.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===G R.tag&&e.default);function q R(e,t,n){let r=Y R(e,n);if(H L(r))for(let n of r.items)J R(e,t,n);else if(Array.isArray(r))for(let n of r)J R(e,t,n);else J R(e,t,r)}function J R(e,t,n){let r=Y R(e,n);if(!z 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 Y R(e,t){return e&&L L(t)?t.resolve(e.doc,e):t}function X R(e,t,{key:n,value:r}){if(W L(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(K R(e,n))q R(e,t,r);else{let i=c R(n, ` ` ,e);if(t instanceof Map)t.set(i,c R(r,i,e));else if(t instanceof Set)t.add(i);else{let a=Z R(n,i,e),o=c R(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function Z R(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(W L(e)&&n?.doc){let t=R 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)+ ` ... " ` ),U 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 QR (e,t,n){return new $ R(g R(e,void 0,n),g R(t,void 0,n))}var $ R =class e{constructor(e,t=null){Object.defineProperty(this,I L,{value:N L}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return W L(n)&&(n=n.clone(t)),W L(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return X R(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?H R(this,e,t,n):JSON.stringify(this)}};function e z(e,t,n){return(t.inFlow??e.flow?n z:t z)(e,t,n)}function t z({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(W L(i))!d&&i.spaceBefore&&f.push(` ` ),r z(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(B L(i)){let e=W L(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),r z(n,f,e.commentBefore,d))}d=!1;let s=V R(i,u,()=>o=null,()=>d=!0);o&&(s+=S 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+=w R(g,n.indent,l(y)):h&&i&&i(),g}function G R(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var K R= ` << ` ,q R={identify:e=>e===K R||typeof e== ` symbol ` &&e.description===K R,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new h R(Symbol(K R)),{addToJSMap:Y R}),stringify:()=>K R},J R=(e,t)=>(q R.identify(t)||U L(t)&&(!t.type||t.type===h R.PLAIN)&&q R.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===q R.tag&&e.default);function Y R(e,t,n){let r=Z R(e,n);if(W L(r))for(let n of r.items)X R(e,t,n);else if(Array.isArray(r))for(let n of r)X R(e,t,n);else X R(e,t,r)}function X R(e,t,n){let r=Z R(e,n);if(!V 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 Z R(e,t){return e&&z L(t)?t.resolve(e.doc,e):t}function Q R(e,t,{key:n,value:r}){if(K L(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(J R(e,n))Y R(e,t,r);else{let i=u R(n, ` ` ,e);if(t instanceof Map)t.set(i,u R(r,i,e));else if(t instanceof Set)t.add(i);else{let a= $ R(n,i,e),o=u R(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function $ R(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(K L(e)&&n?.doc){let t=B 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)+ ` ... " ` ),G 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 ez (e,t,n){return new tz(v R(e,void 0,n),v R(t,void 0,n))}var tz =class e{constructor(e,t=null){Object.defineProperty(this,R L,{value:F L}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return K L(n)&&(n=n.clone(t)),K L(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return Q R(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?W R(this,e,t,n):JSON.stringify(this)}};function n z(e,t,n){return(t.inFlow??e.flow?i z:r z)(e,t,n)}function r z({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(K L(i))!d&&i.spaceBefore&&f.push( ` ` ),a z(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(H L(i)){let e=K L(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),a z(n,f,e.commentBefore,d))}d=!1;let s=U R(i,u,()=>o=null,()=>d=!0);o&&(s+=w 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+= `
` +x R(l(e),c),s&&s()):d&&o&&o(),p}function n z({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(W L(i))i.spaceBefore&&d.push( ` ` ),r z(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(B L(i)){let e=W L(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),r z(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=W 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=V 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+=S 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 rz({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=xR(t(r),e);n.push(i.trimStart())}}function iz(e,t){let n=VL(t)?t.value:t;for(let r of e)if(BL(r)&&(r.key===t||r.key===n||VL(r.key)&&r.key.value===n))return r}var az=class extends yR{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(ML,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(QR(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=BL(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new $ R(e,e?.value):new $ R(e.key,e.value);let r=iz(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );VL(r.value)&&fR(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=iz(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=iz(this.items,e)?.value;return(!t&&VL(n)?n.value:n)??void 0}has(e){return!!iz(this.items,e)}set(e,t){this.add(new $ R(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)XR(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!BL(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})),ez(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},oz={collection: ` map ` ,default:!0,nodeClass:az,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return zL(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>az.from(e,t,n)},sz=class extends yR{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(FL,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=cz(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=cz(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&VL(r)?r.value:r}has(e){let t=cz(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=cz(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];VL(r)&&fR(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(cR(e,String(r++),t));return n}toString(e,t,n){return e?ez(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(gR(a,void 0,n))}}return i}};function cz(e){let t=VL(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var lz={collection: ` seq ` ,default:!0,nodeClass:sz,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return HL(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>sz.from(e,t,n)},uz={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),LR(e,t,n,r)}},dz={identify:e=>e==null,createNode:()=>new pR(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new pR(null),stringify:({source:e},t)=>typeof e== ` string ` &&dz.test.test(e)?e:t.options.nullStr},fz={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new pR(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&fz.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function pz({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 mz={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:pz},hz={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 LR({comment:e,type:t,value:s},r,i,a)}};function kz(e,t){if(HL(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!BL(r)){if(zL(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new $ R(new pR(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]=BL(r)?r:new $ R(r)}}else t( ` Expected a sequence for this tag ` );return e}function Az(e,t,n){let{replacer:r}=n,i=new sz(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(QR(o,s,n))}return i}var jz={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:kz,createNode:Az},Mz=class e extends sz{constructor(){super(),this.add=az.prototype.add.bind(this),this.delete=az.prototype.delete.bind(this),this.get=az.prototype.get.bind(this),this.has=az.prototype.has.bind(this),this.set=az.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(BL(e)?(r=cR(e.key, ` ` ,t),i=cR(e.value,r,t)):r=cR(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=Az(e,t,n),i=new this;return i.items=r.items,i}};Mz.tag= ` tag : yaml . org , 2002 : omap ` ;var Nz={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:Mz,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=kz(e,t),r=[];for(let{key:e}of n.items)VL(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new Mz,n)},createNode:(e,t,n)=>Mz.from(e,t,n)};function Pz({value:e,source:t},n){return t&&(e?Fz:Iz).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Fz={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 pR(!0),stringify:Pz},Iz={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 pR(!1),stringify:Pz},Lz={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:pz},Rz={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():pz(e)}},zz={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 pR(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:pz},Bz=e=>typeof e== ` bigint ` ||Number.isInteger(e);function Vz(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 Hz(e,t,n){let{value:r}=e;if(Bz(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return pz(e)}var Uz={identify:Bz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>Vz(e,2,2,n),stringify:e=>Hz(e,2, ` 0 b ` )},Wz={identify:Bz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>Vz(e,1,8,n),stringify:e=>Hz(e,8, ` 0 ` )},Gz={identify:Bz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>Vz(e,0,10,n),stringify:pz},Kz={identify:Bz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>Vz(e,2,16,n),stringify:e=>Hz(e,16, ` 0 x ` )},qz=class e extends az{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=BL(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new $ R(e.key,null):new $ R(e,null),iz(this.items,t.key)||this.items.push(t)}get(e,t){let n=iz(this.items,e);return!t&&BL(n)?VL(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=iz(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new $ R(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(x R(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(x R(a(t), ` ` )))}return n.join( `
` +C R(l(e),c),s&&s()):d&&o&&o(),p}function i z({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(K L(i))i.spaceBefore&&d.push( ` ` ),a z(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(H L(i)){let e=K L(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),a z(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=K 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=U 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+=w 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 az({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=CR(t(r),e);n.push(i.trimStart())}}function oz(e,t){let n=UL(t)?t.value:t;for(let r of e)if(HL(r)&&(r.key===t||r.key===n||UL(r.key)&&r.key.value===n))return r}var sz=class extends xR{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(PL,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(ez(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=HL(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new tz(e,e?.value):new tz(e.key,e.value);let r=oz(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );UL(r.value)&&mR(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=oz(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=oz(this.items,e)?.value;return(!t&&UL(n)?n.value:n)??void 0}has(e){return!!oz(this.items,e)}set(e,t){this.add(new tz(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)QR(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!HL(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})),nz(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},cz={collection: ` map ` ,default:!0,nodeClass:sz,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return VL(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>sz.from(e,t,n)},lz=class extends xR{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(LL,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=uz(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=uz(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&UL(r)?r.value:r}has(e){let t=uz(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=uz(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];UL(r)&&mR(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(uR(e,String(r++),t));return n}toString(e,t,n){return e?nz(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(vR(a,void 0,n))}}return i}};function uz(e){let t=UL(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var dz={collection: ` seq ` ,default:!0,nodeClass:lz,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return WL(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>lz.from(e,t,n)},fz={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),zR(e,t,n,r)}},pz={identify:e=>e==null,createNode:()=>new hR(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new hR(null),stringify:({source:e},t)=>typeof e== ` string ` &&pz.test.test(e)?e:t.options.nullStr},mz={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new hR(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&mz.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function hz({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 gz={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:hz},_z={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 zR({comment:e,type:t,value:s},r,i,a)}};function jz(e,t){if(WL(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!HL(r)){if(VL(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new tz(new hR(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]=HL(r)?r:new tz(r)}}else t( ` Expected a sequence for this tag ` );return e}function Mz(e,t,n){let{replacer:r}=n,i=new lz(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(ez(o,s,n))}return i}var Nz={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:jz,createNode:Mz},Pz=class e extends lz{constructor(){super(),this.add=sz.prototype.add.bind(this),this.delete=sz.prototype.delete.bind(this),this.get=sz.prototype.get.bind(this),this.has=sz.prototype.has.bind(this),this.set=sz.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(HL(e)?(r=uR(e.key, ` ` ,t),i=uR(e.value,r,t)):r=uR(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=Mz(e,t,n),i=new this;return i.items=r.items,i}};Pz.tag= ` tag : yaml . org , 2002 : omap ` ;var Fz={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:Pz,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=jz(e,t),r=[];for(let{key:e}of n.items)UL(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new Pz,n)},createNode:(e,t,n)=>Pz.from(e,t,n)};function Iz({value:e,source:t},n){return t&&(e?Lz:Rz).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var Lz={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 hR(!0),stringify:Iz},Rz={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 hR(!1),stringify:Iz},zz={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:hz},Bz={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():hz(e)}},Vz={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 hR(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:hz},Hz=e=>typeof e== ` bigint ` ||Number.isInteger(e);function Uz(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 Wz(e,t,n){let{value:r}=e;if(Hz(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return hz(e)}var Gz={identify:Hz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>Uz(e,2,2,n),stringify:e=>Wz(e,2, ` 0 b ` )},Kz={identify:Hz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>Uz(e,1,8,n),stringify:e=>Wz(e,8, ` 0 ` )},qz={identify:Hz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>Uz(e,0,10,n),stringify:hz},Jz={identify:Hz,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>Uz(e,2,16,n),stringify:e=>Wz(e,16, ` 0 x ` )},Yz=class e extends sz{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=HL(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new tz(e.key,null):new tz(e,null),oz(this.items,t.key)||this.items.push(t)}get(e,t){let n=oz(this.items,e);return!t&&HL(n)?UL(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=oz(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new tz(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return s
Line truncated
` )?(n.push( ` ... ` ),n.push(C R(t, ` ` ))):n.push( ` ... $ { t } ` )}else n.push( ` ... ` )}else{let t=e.comment;t&&o&&(t=t.replace(/^ \n +/, ` ` )),t&&((!o||s)&&n[n.length-1]!== ` ` &&n.push( ` ` ),n.push(C R(a(t), ` ` )))}return n.join( `
` )+ `
` }var c B=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,I L,{value:j 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 n R({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[I L]:{value:j 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=W L(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){l B(this.contents)&&this.contents.add(e)}addIn(e,t){l B(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=i R(this);e.anchor=!t||n.has(t)?a R(t|| ` a ` ,n):t}return new u R(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}=o R(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=g R(e,l,p);return o&&U L(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new $ R (this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return l B(this.contents)?this.contents.delete(e):!1}deleteIn(e){return v R(e)?this.contents!=null&&(this.contents=null,!0):l B(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return U L(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return v R(e)?!t&&V L(this.contents)?this.contents.value:this.contents:U L(this.contents)?this.contents.getIn(e,t):void 0}has(e){return U L(this.contents)?this.contents.has(e):!1}hasIn(e){return v R(e)?this.contents!==void 0:U L(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=_ R(this.schema,[e],t):l B(this.contents)&&this.contents.set(e,t)}setIn(e,t){v R(e)?this.contents=t:this.contents==null?this.contents=_ R(this.schema,Array.from(e),t):l B(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 n R({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 n R({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 o B(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=c R(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 ` ?s R(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 s B(this,e)}};function l B(e){if(U L(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var u B=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},d B=class extends u B{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},f B=class extends u B{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},p B=(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 m B(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 h B(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(h B(t.key)||h B(t.value))return!0}return!1;default:return!0}}function g B(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&h B(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function _ B(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||V L(e)&&V L(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var v B= ` All mapping items must start at the same column ` ;function y B({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??a z)(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=m B(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 ` ,v B)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||h B(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 ` ,v B);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&g B(r.indent,u,i),n.atKey=!1,_ B(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=m B(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&&g B(r.indent,f,i),s=c.range[2];let l=new $ 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 $ 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 b B({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??s z)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=m B(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&&g B(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function x B(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 S B= ` Block collections are not allowed within flow collections ` ,C B=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function w 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?a z:s z))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=m B(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&&h B(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];B 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],C B(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,S B)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);C B(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,S B),n.atKey=!1;let _=m B(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?C B(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,S B):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new $ R (g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;_ B(n,e.items,g)&&i(a,` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new a z(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=x B(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 T B(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?y B(e,t,n,r,a):n.type=== ` block - seq ` ?b B(e,t,n,r,a):w 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 E 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===a z.tagName&&s=== ` map ` ||o===s z.tagName&&s=== ` seq ` )return T 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),T B(e,t,n,i,o)}let l=T B(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=W L(u)?u:new p R(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function D 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=== ` > ` ?p R.BLOCK_FOLDED:p R.BLOCK_LITERAL,o=t.source?k 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 u B=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,R L,{value:N 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 i R({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[R L]:{value:N 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=K L(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){d B(this.contents)&&this.contents.add(e)}addIn(e,t){d B(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=o R(this);e.anchor=!t||n.has(t)?s R(t|| ` a ` ,n):t}return new f R(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}=c R(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=v R(e,l,p);return o&&G L(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new tz (this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return d B(this.contents)?this.contents.delete(e):!1}deleteIn(e){return b R(e)?this.contents!=null&&(this.contents=null,!0):d B(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return G L(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return b R(e)?!t&&U L(this.contents)?this.contents.value:this.contents:G L(this.contents)?this.contents.getIn(e,t):void 0}has(e){return G L(this.contents)?this.contents.has(e):!1}hasIn(e){return b R(e)?this.contents!==void 0:G L(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=y R(this.schema,[e],t):d B(this.contents)&&this.contents.set(e,t)}setIn(e,t){b R(e)?this.contents=t:this.contents==null?this.contents=y R(this.schema,Array.from(e),t):d B(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 i R({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 i R({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 c B(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=u R(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 ` ?l R(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 l B(this,e)}};function d B(e){if(G L(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var f B=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},p B=class extends f B{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},m B=class extends f B{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},h B=(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 g B(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 _ B(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(_ B(t.key)||_ B(t.value))return!0}return!1;default:return!0}}function v B(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&_ B(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function y B(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||U L(e)&&U L(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var b B= ` All mapping items must start at the same column ` ;function x B({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??s z)(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=g B(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 ` ,b B)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||_ B(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 ` ,b B);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&v B(r.indent,u,i),n.atKey=!1,y B(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=g B(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&&v B(r.indent,f,i),s=c.range[2];let l=new tz (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 tz (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 S B({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??l z)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=g B(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&&v B(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function C B(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 w B= ` Block collections are not allowed within flow collections ` ,T B=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function E 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?s z:l z))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=g B(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&&_ B(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];H 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 ` ,w 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 ` ,w B),n.atKey=!1;let _=g B(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 ` ,w B):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new tz (g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;y B(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new s z(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=C B(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 ` ?x B(e,t,n,r,a):n.type=== ` block - seq ` ?S B(e,t,n,r,a):E 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 O 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===s z.tagName&&s=== ` map ` ||o===l z.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=K L(u)?u:new h R(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function k B(e,t,n){let r=t.offset,i=A B(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?h R.BLOCK_FOLDED:h R.BLOCK_LITERAL,o=t.source?j 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===p R.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===h R.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 k 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 A 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=p R.PLAIN,c=j B(a,l);break;case ` single - quoted - scalar ` :s=p R.QUOTE_SINGLE,c=M B(a,l);break;case ` double - quoted - scalar ` :s=p R.QUOTE_DOUBLE,c=P 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=x B(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function j 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 } ` ) , NB ( e ) } function MB ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , NB ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function NB ( 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 A 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 j 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 M 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=h R.PLAIN,c=N B(a,l);break;case ` single - quoted - scalar ` :s=h R.QUOTE_SINGLE,c=P B(a,l);break;case ` double - quoted - scalar ` :s=h R.QUOTE_DOUBLE,c=I 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=C B(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function N 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 } ` ) , FB ( e ) } function PB ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , FB ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function FB ( 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 P 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 I 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}=F B(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=I B[i];if(a)n+=a;else if(i=== `
` ){let{fold:t,offset:i}=L B(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=R 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+=L 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+=z 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 F 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 L 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 I B={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function LB ( 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 RB ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? DB ( e , t , r ) : AB ( 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 [ PL ] : c ? zB ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? BB ( e , i , t , r ) : e . schema [ PL ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = VL ( a ) ? a : new pR ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new pR ( 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 zB ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ PL ] ; 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 [ PL ] ) } function BB ( { 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 [ PL ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ PL ] ; 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 VB ( 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 HB = { composeNode : UB , composeEmptyNode : WB } ; function UB ( 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 = GB ( 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 = RB ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = EB ( HB , 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 ? ? = WB ( 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 && ( ! VL ( 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 WB ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = RB ( e , { type : ` scalar ` , offset : VB ( 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 GB ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new uR ( 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 = xB ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function KB ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new cB ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = mB ( 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 ? UB ( c , i , l , o ) : WB ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = xB ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function qB ( 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 JB ( 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 R B={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function zB ( 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 BB ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? kB ( e , t , r ) : MB ( 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 [ IL ] : c ? VB ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? HB ( e , i , t , r ) : e . schema [ IL ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = UL ( a ) ? a : new hR ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new hR ( 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 VB ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ IL ] ; 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 [ IL ] ) } function HB ( { 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 [ IL ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ IL ] ; 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 UB ( 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 WB = { composeNode : GB , composeEmptyNode : KB } ; function GB ( 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 = qB ( 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 = BB ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = OB ( WB , 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 ? ? = KB ( 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 && ( ! UL ( 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 KB ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = BB ( e , { type : ` scalar ` , offset : UB ( 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 qB ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new fR ( 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 = CB ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function JB ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new uB ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = gB ( 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 ? GB ( c , i , l , o ) : KB ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = CB ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function YB ( 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 XB ( 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 Y B=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=q B(e);r?this.warnings.push(new f B(i,t,n)):this.errors.push(new d B(i,t,n))},this.directives=new n R({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=J 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(U L(i)&&!i.flow&&i.items.length>0){let e=i.items[0];B 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:J 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=q 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=K 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 d B(q 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 d B(q B(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=x B(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 d B(q 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 c B(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}}},X B=Symbol( ` break visit ` ),Z B=Symbol( ` skip children ` ),QB =Symbol( ` remove item ` );function $ B (e,t){` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),e V(Object.freeze([]),e,t)} $ B .BREAK=X B,$ B .SKIP=ZB, $ B.REMOVE=QB, $ 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}, $ B .parentCollection=(e,t)=>{let n=$ 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 e V(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=e V(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===X B)return X B;else r===QB &&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function t V(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 Z B=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=Y B(e);r?this.warnings.push(new m B(i,t,n)):this.errors.push(new p B(i,t,n))},this.directives=new i R({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=X 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(G L(i)&&!i.flow&&i.items.length>0){let e=i.items[0];H 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:X 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=Y 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=J 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 p B(Y 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 p B(Y B(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=C B(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 p B(Y 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 u B(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}}},Q B=Symbol( ` break visit ` ), $ B=Symbol( ` skip children ` ),eV =Symbol( ` remove item ` );function tV (e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),n V(Object.freeze([]),e,t)}tV .BREAK=Q B,tV .SKIP= $ B,tV .REMOVE=eV,tV .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},tV .parentCollection=(e,t)=>{let n=tV .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 n V(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=n V(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===Q B)return Q B;else r===eV &&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function r V(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 n V(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var r V=new Set( ` 0123456789 ABCDEFabcdef ` ),i V=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , a V = n e w S e t ( ` , [ ] { } ` ) , o V = n e w S e t ( ` , [ ] { }
\ r ` ),s V=e=>!e||o V.has(e),c V=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 i V(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var a V=new Set( ` 0123456789 ABCDEFabcdef ` ),o V=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , s V = n e w S e t ( ` , [ ] { } ` ) , c V = n e w S e t ( ` , [ ] { }
\ r ` ),l V=e=>!e||c V.has(e),u V=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=== ` ... ` )&&n V(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=== ` ... ` )&&n V(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&&!n V(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=== ` : ` )&&n V(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(s V), ` 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(`...`))&&n V(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(s V),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||n V(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=== ` ... ` )&&i V(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=== ` ... ` )&&i V(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&&!i V(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=== ` : ` )&&i V(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(l V), ` 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(`...`))&&i V(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(l V),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||i V(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=>n V(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=>i V(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(n V(r)||e&&a V.has(r))break;t=n}else if(n V(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(i V(r)||e&&s V.has(r))break;t=n}else if(i V(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` ?(n+=1,r= `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&a V.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&a V.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(s V),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(n V(n)||t&&a V.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(;!n V(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 V.has(t))t=this.buffer[++e];else if(t=== ` % ` &&r V.has(this.buffer[e+1])&&r V.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&&s V.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&s V.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(l V),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(i V(n)||t&&s V.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(;!i V(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(o V.has(t))t=this.buffer[++e];else if(t=== ` % ` &&a V.has(this.buffer[e+1])&&a V.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)}},lV=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 uV(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function dV(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 fV(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 pV(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 mV(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 hV(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 gV(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!uV(t.start, ` explicit - key - ind ` )&&!uV(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,fV(t.value)?t.value.end?hV(t.value.end,t.sep):t.value.end=t.sep:hV(t.start,t.sep),delete t.sep)}var _V=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 cV,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=tV(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 ` &&gV(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&&dV(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)}},dV=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 fV(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function pV(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 mV(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 hV(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 gV(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 _V(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 vV(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!fV(t.start, ` explicit - key - ind ` )&&!fV(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,mV(t.value)?t.value.end?_V(t.value.end,t.sep):t.value.end=t.sep:_V(t.start,t.sep),delete t.sep)}var yV=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 uV,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=rV(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 ` &&vV(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&&pV(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)){hV(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(uV(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=mV(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(uV(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(fV(t.key)&&!uV(t.sep, ` newline ` )){let e=mV(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]}):uV(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&&!uV(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)){hV(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||uV(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)){_V(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(fV(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=gV(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(fV(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(mV(t.key)&&!fV(t.sep, ` newline ` )){let e=gV(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]}):fV(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&&!fV(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)){_V(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||fV(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=mV(pV(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=mV(pV(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 vV(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new lV||null,prettyErrors:t}}function yV(e,t={}){let{lineCounter:n,prettyErrors:r}=vV(t),i=new _V(n?.addNewLine),a=new YB(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 dB(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(pB(e,n)),o.warnings.forEach(pB(e,n))),o}function bV(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=yV(e,n);if(!i)return null;if(i.warnings.forEach(e=>UR(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 xV(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 RL(e)&&!r?e.toString(n):new cB(e,r,n).toString(n)}var SV=e=>typeof e== ` object ` &&!!e&&!Array.isArray(e),CV=e=>SV(e)?Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?t:[]]):[];function wV(e){if(SV(e)){if(SV(e.parallel))return{kind: ` parallel ` ,base:[ ` parallel ` ],branches:CV(e.parallel)};if(SV(e.switch))return{kind: ` switch ` ,base:[ ` switch ` , ` cases ` ],on:typeof e.switch.on== ` string ` ?e.switch.on: ` ` ,branches:CV(e.switch.cases)}}}function TV(e){return e.slice(2).includes( ` parallel ` )}function EV(e,t){let n=yV(e).getIn(t,!0);if(zL(n))return n.toJSON()}function DV(e,t,n){let r=yV(e);return r.setIn(t,r.createNode(RV(n))),r.toString()}function OV(e,t,n){let r=yV(e),i=t.slice(0,-1),a=TV(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(HL(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!HL(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 kV(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 AV(e,t){let n=e.getIn(t,!0),r=wV(zL(n)?n.toJSON():void 0),i=r?e.getIn([...t,...r.base],!0):void 0;if(!r||!zL(i))throw Error( ` This step has no branches . ` );return{kind:r.kind,branches:i}}function jV(e,t,n){let r=yV(e),{kind:i,branches:a}=AV(r,t);if(kV(n,i),a.has(n))throw Error( ` Branch $ { n } already exists . ` );return a.set(n,r.createNode([])),r.toString()}function MV(e,t,n,r){let i=yV(e),{kind:a,branches:o}=AV(i,t);if(kV(r,a),n!==r&&o.has(r))throw Error( ` Branch $ { r } already exists . ` );let s=o.items.find(e=>VL(e.key)&&e.key.value===n);if(!s||!VL(s.key))throw Error( ` Branch $ { n } does not exist . ` );return s.key.value=r,i.toString()}function NV(e,t,n){let r=yV(e),{kind:i,branches:a}=AV(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 QV(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(JV)].map(e=>e[1]))]}function $ V(e){let t=yV(e).toJS(),n=YV(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=YV(e)?e:{},p=wV(d),m=p?.kind??(typeof d.type== ` string ` ?d.type: ` ` ),h=YV(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||qV(m),type:m,role:VV(m),step:l?.length===2?String(Number(l[1])+1).padStart(2, ` 0 ` ):void 0,detail:p?.on? ` on $ { p . on . replace ( /^steps\./ , ` ` ) } ` :XV(m,h),summary:ZV(h),when:typeof d.when== ` string ` ?d.when:void 0,retry:YV(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 QV([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=wV(t);if(n){let{kind:i,base:a,branches:o}=n,c=p(t,String(e+1),0,u*WV,void 0,void 0,[ ` steps ` ,e]);m(l,c,[ ` steps ` ,e-1]),u++;let d=YV(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)*GV,l=[c],f=[ ` steps ` ,e,...a,t];n.forEach((n,r)=>{let a=p(n, ` $ { e + 1 } - $ { t } - $ { r + 1 } ` ,s,(u+r)*WV,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)*WV},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)*WV-24;o.forEach(([t],n)=>{let a=(n-(h-1)/2)*GV;r.push({id: ` lane - $ { e } - $ { t } ` ,type: ` lane ` ,position:{x:a-12,y:u*WV-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*WV,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*WV-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 eH={agent:qt,command:In,repo:un,gate:Mn,forge:vn,human:Un,review:cn,workflow:Kn},tH={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function nH(e){return e=== ` parallel ` ?un:e=== ` switch ` ?Pn:eH[e.split( ` . ` )[0]]??Kn}function rH(e){return Object.keys(tH).map(t=>({title:tH[t],icon:eH[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function iH(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 aH(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function oH(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 sH(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!== ` ` &&(n[r.name]=oH(e,r.type))}return n}var cH=k({__name: ` WorkflowPicker ` ,props:{value:{},workflows:{},label:{}},emits:[ ` pick ` ],setup(e,{emit:t}){let n=t;return(t,r)=>(R(),q(z(ml),{"model-value":e.value||void 0,"onUpdate:modelValue":r[0]||=e=>n( ` pick ` ,String(e))},{default:j(()=>[M(z(xl),{"aria-label":e.label},{default:j(()=>[M(z(Sl),{placeholder: ` Choose workflow ` })]),_:1},8,[ ` aria - label ` ]),M(z(hl),null,{default:j(()=>[e.value&&!e.workflows.some(t=>t.id===e.value)?(R(),q(z(vl),{key:0,value:e.value,disabled: ` ` },{default:j(()=>[A(V(e.value)+ ` ( unavailable ) ` ,1)]),_:1},8,[ ` value ` ])):L( ` ` ,!0),(R(!0),G(H,null,K(e.workflows,e=>(R(),q(z(vl),{key:e.id,value:e.id},{default:j(()=>[A(V(e.id),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ]))}});function lH(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function uH(e,t=[]){let n=yV(e),r=n.errors[0];if(r)return{ok:!1,message:wH(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!TH(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:b H(e)}))}var v H=/^( \s *)(- \s +)?/,y H=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function b H(e){let{code:t,comment:n}=x H(e),r=S H(t);return n&&r.push({text:n,kind: ` comment ` }),r}function x H(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 S H(e){if(!e)return[];let t=[],n=v H.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=y H.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,...C H(i[4]??``)]):[...t,...C H(r)]}function C 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 wH ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function TH(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function EH(e){return typeof e== ` string ` &&e.trim()!== ` ` }var DH={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 ` },kH={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },AH={class: ` min - w - 0 flex - 1 ` },jH=[ ` value ` , ` placeholder ` ],MH={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },NH={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },PH={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 ` },IH={key:0,class: ` block space - y - 1.5 ` },LH={id: ` switch - on ` },RH=[ ` value ` ],zH={class: ` text - xs font - medium text - muted - foreground ` },BH={class: ` flex items - center gap - 2 ` },VH={key:1,role: ` alert ` ,class: ` text - xs text - danger ` },HH={key:2,class: ` space - y - 1.5 ` },UH=[ ` title ` ],WH=[ ` value ` ],GH=[ ` value ` ],KH={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },qH=[ ` onClick ` ],JH=[ ` onClick ` ],YH={key:3,class: ` divide - y divide - border rounded - md border border - border ` },XH=[ ` title ` ],ZH=[ ` value ` , ` onChange ` ],QH=[ ` value ` ], $ H=[ ` value ` , ` onInput ` ],eU=[ ` value ` , ` onFocus ` , ` onInput ` ],tU={key:0,class: ` space - y - 3 ` },nU={class: ` text - [ 13 px ] ` },rU={key:0,class: ` text - danger ` },iU={class: ` ml - 2 text - xs text - fg - subtle ` },aU=[ ` aria - label ` , ` value ` , ` onChange ` ],oU={key:0,value: ` value ` },sU=[ ` aria - label ` , ` value ` , ` onChange ` ],cU=[ ` value ` ],lU=[ ` aria - label ` , ` value ` , ` onChange ` ],uU={key:1,class: ` space - y - 3 ` },dU={class: ` text - [ 13 px ] ` },fU={class: ` ml - 2 text - xs text - fg - subtle ` },pU=[ ` aria - label ` , ` disabled ` , ` value ` , ` onChange ` ],mU=[ ` value ` ],hU=[ ` title ` ],gU={key:0,class: ` text - xs text - danger ` },_U={class: ` space - y - 2 ` },vU={class: ` divide - y divide - border rounded - md border border - border ` },yU={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },bU=[ ` value ` ],xU={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },SU=[ ` value ` ],CU={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },wU=[ ` value ` ],TU={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },EU={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },DU=k({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=I(()=>EV(n.yaml,n.path)??{}),a=I(()=>wV(i.value)),o=I(()=>a.value?.kind??(typeof i.value.type== ` string ` ?i.value.type: ` ` )),s=I(()=>a.value?.branches.map(([e])=>e)??[]),c=I(()=>o.value=== ` parallel ` ?2:1);function l(e){r( ` update : yaml ` ,DV(n.yaml,n.path,{...i.value,switch:{...i.value.switch,on:e}}))}let u=J( ` ` ),d=J( ` ` );function f(e,t,i= ` ` ){try{let a=e=== ` add ` ?jV(n.yaml,n.path,t):e=== ` rename ` ?MV(n.yaml,n.path,t,i):NV(n.yaml,n.path,t);r( ` update : yaml ` ,a),u.value= ` ` ,d.value= ` ` }catch(e){d.value=String(e.message)}}let p=I(()=>n.vocabulary.find(e=>e.name===o.value)),m=I(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),h=I(()=>LV(n.yaml,n.path)),g=I(()=>p.value?.settings&&i.value.settings?hH(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=I(()=>{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 ` ,DV(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 T(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 E=I(()=>n.workflows.find(e=>e.id===m.value.workflow)),ee=I(()=>Object.entries(zV(E.value?.yaml?? ` ` , ` inputs ` )??{})),D=I(()=>Object.entries(zV(E.value?.yaml?? ` ` , ` outputs ` )??{})),te=I(()=>Object.entries(zV(n.yaml, ` inputs ` )??{})),ne=I(()=>Object.entries(zV(n.yaml, ` outputs ` )??{})),re=I(()=>m.value.inputs??{}),ie=I(()=>m.value.outputs??{}),ae=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),oe=e
Line truncated
` )[0]}}}let fe=e=>e===void 0? ` ` :xV(e).trimEnd(),pe=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),me=e=>typeof m.value[e]== ` string ` ?m.value[e]: ` ` ;return(t,n)=>(R(),G( ` aside ` ,DH,[W( ` header ` ,OH,[W( ` span ` ,kH,[(R(),q(Ye(z(nH)(o.value)),{class: ` size - 4 ` }))]),W( ` div ` ,AH,[W( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:z(qV)(o.value),"aria-label": ` Step id ` ,onInput:n[0]||=e=>S( ` id ` ,e.target.value)},null,40,jH),W( ` div ` ,MH,V(o.value),1)]),M(z(Z),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:n[1]||=e=>r( ` close ` )},{default:j(()=>[M(z(Jn))]),_:1})]),W( ` div ` ,NH,[g.value?(R(),G( ` p ` ,PH,V(g.value),1)):L( ` ` ,!0),a.value?(R(),G( ` section ` ,FH,[o.value=== ` switch ` ?(R(),G( ` label ` ,IH,[n[18]||=W( ` 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),M(z(O),{"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 ` ]),W( ` datalist ` ,LH,[(R(!0),G(H,null,K(h.value,e=>(R(),G( ` option ` ,{key:e,value: ` steps . $ { e } . result . ` },null,8,RH))),128))])])):L( ` ` ,!0),W( ` div ` ,zH,V(o.value=== ` switch ` ? ` Cases ` : ` Branches ` ),1),(R(!0),G(H,null,K(s.value,e=>(R(),G( ` div ` ,{key:e,class: ` flex items - center gap - 2 ` },[M(z(O),{"model-value":e,class:N(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 ` ]),M(z(Z),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Remove $ { e } ` ,disabled:s.value.length<=c.value,onClick:t=>f( ` delete ` ,e)},{default:j(()=>[M(z(Rn))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),W( ` div ` ,BH,[M(z(O),{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]||=Ot(Dt(e=>f( ` add ` ,u.value.trim()),[ ` prevent ` ]),[ ` enter ` ])},null,8,[ ` modelValue ` , ` aria - label ` , ` placeholder ` ]),M(z(Z),{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:j(()=>[M(z(Tn))]),_:1},8,[ ` aria - label ` , ` disabled ` ])]),d.value?(R(),G( ` p ` ,VH,V(d.value),1)):L( ` ` ,!0)])):L( ` ` ,!0),b.value.lead?(R(),G( ` section ` ,HH,[W( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:b.value.lead.schema.description},[A(V(pe(b.value.lead.key,b.value.lead.schema))+ ` ` ,1),b.value.lead.schema.description?(R(),q(z(rn),{key:0,class: ` size - 3 text - fg - subtle ` })):L( ` ` ,!0)],8,UH),b.value.lead.kind=== ` workflow ` ?(R(),q(cH,{key:0,value:me(b.value.lead.key),workflows:e.workflows,label:pe(b.value.lead.key,b.value.lead.schema),onPick:n[6]||=e=>T(b.value.lead.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` ])):b.value.lead.kind=== ` select ` ?(R(),G( ` select ` ,{key:1,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:me(b.value.lead.key),onChange:n[7]||=e=>w(b.value.lead.key,e.target.value||void 0)},[n[19]||=W( ` option ` ,{value: ` ` }, ` Default ` ,-1),(R(!0),G(H,null,K(b.value.lead.options,e=>(R(),G( ` option ` ,{key:e,value:e},V(e),9,GH))),128))],40,WH)):b.value.lead.kind=== ` text ` ?(R(),q(z(zl),{key:2,"model-value":me(b.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:n[8]||=e=>ce.value=b.value.lead.key,"onUpdate:modelValue":n[9]||=e=>w(b.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(R(),q(z(O),{key:3,"model-value":me(b.value.lead.key),onFocus:n[10]||=e=>ce.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 ` ?(R(),G( ` div ` ,KH,[n[20]||=W( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(R(!0),G(H,null,K(h.value,e=>(R(),G(H,{key:e},[W( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>le(e, ` summary ` )},V(e),9,qH),W( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>le(e, ` result ` )},V(e)+ ` . result ` ,9,JH)],64))),128))])):L( ` ` ,!0)])):L( ` ` ,!0),b.value.compact.length?(R(),G( ` section ` ,YH,[(R(!0),G(H,null,K(b.value.compact,t=>(R(),G( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[W( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:t.schema.description},[A(V(pe(t.key,t.schema))+ ` ` ,1),t.schema.description?(R(),q(z(rn),{key:0,class: ` size - 3 text - fg - subtle ` })):L( ` ` ,!0)],8,XH),t.kind=== ` workflow ` ?(R(),q(cH,{key:0,class: ` max - w - 48 ` ,value:me(t.key),workflows:e.workflows,label:pe(t.key,t.schema),onPick:e=>T(t.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` , ` onPic 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=gV(hV(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=gV(hV(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 bV(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new dV||null,prettyErrors:t}}function xV(e,t={}){let{lineCounter:n,prettyErrors:r}=bV(t),i=new yV(n?.addNewLine),a=new ZB(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 pB(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(hB(e,n)),o.warnings.forEach(hB(e,n))),o}function SV(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=xV(e,n);if(!i)return null;if(i.warnings.forEach(e=>GR(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 CV(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 BL(e)&&!r?e.toString(n):new uB(e,r,n).toString(n)}var wV=e=>typeof e== ` object ` &&!!e&&!Array.isArray(e),TV=e=>wV(e)?Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?t:[]]):[];function EV(e){if(wV(e)){if(wV(e.parallel))return{kind: ` parallel ` ,base:[ ` parallel ` ],branches:TV(e.parallel)};if(wV(e.switch))return{kind: ` switch ` ,base:[ ` switch ` , ` cases ` ],on:typeof e.switch.on== ` string ` ?e.switch.on: ` ` ,branches:TV(e.switch.cases)}}}function DV(e){return e.slice(2).includes( ` parallel ` )}function OV(e,t){let n=xV(e).getIn(t,!0);if(VL(n))return n.toJSON()}function kV(e,t,n){let r=xV(e);return r.setIn(t,r.createNode(BV(n))),r.toString()}function AV(e,t,n){let r=xV(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(WL(o)||(r.setIn(i,r.createNode([])),o=r.getIn(i,!0)),!WL(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 jV(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 MV(e,t){let n=e.getIn(t,!0),r=EV(VL(n)?n.toJSON():void 0),i=r?e.getIn([...t,...r.base],!0):void 0;if(!r||!VL(i))throw Error( ` This step has no branches . ` );return{kind:r.kind,branches:i}}function NV(e,t,n){let r=xV(e),{kind:i,branches:a}=MV(r,t);if(jV(n,i),a.has(n))throw Error( ` Branch $ { n } already exists . ` );return a.set(n,r.createNode([])),r.toString()}function PV(e,t,n,r){let i=xV(e),{kind:a,branches:o}=MV(i,t);if(jV(r,a),n!==r&&o.has(r))throw Error( ` Branch $ { r } already exists . ` );let s=o.items.find(e=>UL(e.key)&&e.key.value===n);if(!s||!UL(s.key))throw Error( ` Branch $ { n } does not exist . ` );return s.key.value=r,i.toString()}function FV(e,t,n){let r=xV(e),{kind:i,branches:a}=MV(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 eH(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(XV)].map(e=>e[1]))]}function tH(e){let t=xV(e).toJS(),n=ZV(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=ZV(e)?e:{},p=EV(d),m=p?.kind??(typeof d.type== ` string ` ?d.type: ` ` ),h=ZV(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||YV(m),type:m,role:UV(m),step:l?.length===2?String(Number(l[1])+1).padStart(2, ` 0 ` ):void 0,detail:p?.on? ` on $ { p . on . replace ( /^steps\./ , ` ` ) } ` :QV(m,h),summary: $ V(h),when:typeof d.when== ` string ` ?d.when:void 0,retry:ZV(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 eH([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=EV(t);if(n){let{kind:i,base:a,branches:o}=n,c=p(t,String(e+1),0,u*KV,void 0,void 0,[ ` steps ` ,e]);m(l,c,[ ` steps ` ,e-1]),u++;let d=ZV(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)*qV,l=[c],f=[ ` steps ` ,e,...a,t];n.forEach((n,r)=>{let a=p(n, ` $ { e + 1 } - $ { t } - $ { r + 1 } ` ,s,(u+r)*KV,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)*KV},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)*KV-24;o.forEach(([t],n)=>{let a=(n-(h-1)/2)*qV;r.push({id: ` lane - $ { e } - $ { t } ` ,type: ` lane ` ,position:{x:a-12,y:u*KV-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*KV,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*KV-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 nH={agent:qt,command:In,repo:un,gate:Mn,forge:vn,human:Un,review:cn,workflow:Kn},rH={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function iH(e){return e=== ` parallel ` ?un:e=== ` switch ` ?Pn:nH[e.split( ` . ` )[0]]??Kn}function aH(e){return Object.keys(rH).map(t=>({title:rH[t],icon:nH[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function oH(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 sH(e,t){return e.filter(e=>e.required&&!(t[e.name]?? ` ` ).trim()).map(e=>e.name)}function cH(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 lH(e,t){let n={};for(let r of e){let e=t[r.name];e!==void 0&&e!== ` ` &&(n[r.name]=cH(e,r.type))}return n}var uH=k({__name: ` WorkflowPicker ` ,props:{value:{},workflows:{},label:{}},emits:[ ` pick ` ],setup(e,{emit:t}){let n=t;return(t,r)=>(R(),q(z(ml),{"model-value":e.value||void 0,"onUpdate:modelValue":r[0]||=e=>n( ` pick ` ,String(e))},{default:j(()=>[M(z(xl),{"aria-label":e.label},{default:j(()=>[M(z(Sl),{placeholder: ` Choose workflow ` })]),_:1},8,[ ` aria - label ` ]),M(z(hl),null,{default:j(()=>[e.value&&!e.workflows.some(t=>t.id===e.value)?(R(),q(z(vl),{key:0,value:e.value,disabled: ` ` },{default:j(()=>[A(V(e.value)+ ` ( unavailable ) ` ,1)]),_:1},8,[ ` value ` ])):L( ` ` ,!0),(R(!0),G(H,null,K(e.workflows,e=>(R(),q(z(vl),{key:e.id,value:e.id},{default:j(()=>[A(V(e.id),1)]),_:2},1032,[ ` value ` ]))),128))]),_:1})]),_:1},8,[ ` model - value ` ]))}});function dH(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function fH(e,t=[]){let n=xV(e),r=n.errors[0];if(r)return{ok:!1,message:EH(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:S H(e)}))}var b H=/^( \s *)(- \s +)?/,x H=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function S H(e){let{code:t,comment:n}=C H(e),r=w H(t);return n&&r.push({text:n,kind: ` comment ` }),r}function C H(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 w H(e){if(!e)return[];let t=[],n=b H.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=x H.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 EH ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function DH(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function OH(e){return typeof e== ` string ` &&e.trim()!== ` ` }var kH={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },AH={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },jH={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },MH={class: ` min - w - 0 flex - 1 ` },NH=[ ` value ` , ` placeholder ` ],PH={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },FH={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },IH={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },LH={key:1,class: ` space - y - 3 ` },RH={key:0,class: ` block space - y - 1.5 ` },zH={id: ` switch - on ` },BH=[ ` value ` ],VH={class: ` text - xs font - medium text - muted - foreground ` },HH={class: ` flex items - center gap - 2 ` },UH={key:1,role: ` alert ` ,class: ` text - xs text - danger ` },WH={key:2,class: ` space - y - 1.5 ` },GH=[ ` title ` ],KH=[ ` value ` ],qH=[ ` value ` ],JH={key:4,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },YH=[ ` onClick ` ],XH=[ ` onClick ` ],ZH={key:3,class: ` divide - y divide - border rounded - md border border - border ` },QH=[ ` title ` ], $ H=[ ` value ` , ` onChange ` ],eU=[ ` value ` ],tU=[ ` value ` , ` onInput ` ],nU=[ ` value ` , ` onFocus ` , ` onInput ` ],rU={key:0,class: ` space - y - 3 ` },iU={class: ` text - [ 13 px ] ` },aU={key:0,class: ` text - danger ` },oU={class: ` ml - 2 text - xs text - fg - subtle ` },sU=[ ` aria - label ` , ` value ` , ` onChange ` ],cU={key:0,value: ` value ` },lU=[ ` aria - label ` , ` value ` , ` onChange ` ],uU=[ ` value ` ],dU=[ ` aria - label ` , ` value ` , ` onChange ` ],fU={key:1,class: ` space - y - 3 ` },pU={class: ` text - [ 13 px ] ` },mU={class: ` ml - 2 text - xs text - fg - subtle ` },hU=[ ` aria - label ` , ` disabled ` , ` value ` , ` onChange ` ],gU=[ ` value ` ],_U=[ ` title ` ],vU={key:0,class: ` text - xs text - danger ` },yU={class: ` space - y - 2 ` },bU={class: ` divide - y divide - border rounded - md border border - border ` },xU={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },SU=[ ` value ` ],CU={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },wU=[ ` value ` ],TU={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },EU=[ ` value ` ],DU={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },OU={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },kU=k({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{},workflows:{},modelAliases:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=I(()=>OV(n.yaml,n.path)??{}),a=I(()=>EV(i.value)),o=I(()=>a.value?.kind??(typeof i.value.type== ` string ` ?i.value.type: ` ` )),s=I(()=>a.value?.branches.map(([e])=>e)??[]),c=I(()=>o.value=== ` parallel ` ?2:1);function l(e){r( ` update : yaml ` ,kV(n.yaml,n.path,{...i.value,switch:{...i.value.switch,on:e}}))}let u=J( ` ` ),d=J( ` ` );function f(e,t,i= ` ` ){try{let a=e=== ` add ` ?NV(n.yaml,n.path,t):e=== ` rename ` ?PV(n.yaml,n.path,t,i):FV(n.yaml,n.path,t);r( ` update : yaml ` ,a),u.value= ` ` ,d.value= ` ` }catch(e){d.value=String(e.message)}}let p=I(()=>n.vocabulary.find(e=>e.name===o.value)),m=I(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),h=I(()=>zV(n.yaml,n.path)),g=I(()=>p.value?.settings&&i.value.settings?_H(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=I(()=>{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 ` ,kV(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 T(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 E=I(()=>n.workflows.find(e=>e.id===m.value.workflow)),ee=I(()=>Object.entries(VV(E.value?.yaml?? ` ` , ` inputs ` )??{})),D=I(()=>Object.entries(VV(E.value?.yaml?? ` ` , ` outputs ` )??{})),te=I(()=>Object.entries(VV(n.yaml, ` inputs ` )??{})),ne=I(()=>Object.entries(VV(n.yaml, ` outputs ` )??{})),re=I(()=>m.value.inputs??{}),ie=I(()=>m.value.outputs??{}),ae=e=>typeof e== ` string ` &&e.startsWith( ` inputs . ` ),oe=e
Line truncated
` )[0]}}}let fe=e=>e===void 0? ` ` :CV(e).trimEnd(),pe=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),me=e=>typeof m.value[e]== ` string ` ?m.value[e]: ` ` ;return(t,n)=>(R(),G( ` aside ` ,kH,[W( ` header ` ,AH,[W( ` span ` ,jH,[(R(),q(Ye(z(iH)(o.value)),{class: ` size - 4 ` }))]),W( ` div ` ,MH,[W( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:z(YV)(o.value),"aria-label": ` Step id ` ,onInput:n[0]||=e=>S( ` id ` ,e.target.value)},null,40,NH),W( ` div ` ,PH,V(o.value),1)]),M(z(Z),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:n[1]||=e=>r( ` close ` )},{default:j(()=>[M(z(Jn))]),_:1})]),W( ` div ` ,FH,[g.value?(R(),G( ` p ` ,IH,V(g.value),1)):L( ` ` ,!0),a.value?(R(),G( ` section ` ,LH,[o.value=== ` switch ` ?(R(),G( ` label ` ,RH,[n[18]||=W( ` 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),M(z(O),{"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 ` ]),W( ` datalist ` ,zH,[(R(!0),G(H,null,K(h.value,e=>(R(),G( ` option ` ,{key:e,value: ` steps . $ { e } . result . ` },null,8,BH))),128))])])):L( ` ` ,!0),W( ` div ` ,VH,V(o.value=== ` switch ` ? ` Cases ` : ` Branches ` ),1),(R(!0),G(H,null,K(s.value,e=>(R(),G( ` div ` ,{key:e,class: ` flex items - center gap - 2 ` },[M(z(O),{"model-value":e,class:N(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 ` ]),M(z(Z),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Remove $ { e } ` ,disabled:s.value.length<=c.value,onClick:t=>f( ` delete ` ,e)},{default:j(()=>[M(z(Rn))]),_:1},8,[ ` aria - label ` , ` disabled ` , ` onClick ` ])]))),128)),W( ` div ` ,HH,[M(z(O),{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]||=Ot(Dt(e=>f( ` add ` ,u.value.trim()),[ ` prevent ` ]),[ ` enter ` ])},null,8,[ ` modelValue ` , ` aria - label ` , ` placeholder ` ]),M(z(Z),{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:j(()=>[M(z(Tn))]),_:1},8,[ ` aria - label ` , ` disabled ` ])]),d.value?(R(),G( ` p ` ,UH,V(d.value),1)):L( ` ` ,!0)])):L( ` ` ,!0),b.value.lead?(R(),G( ` section ` ,WH,[W( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:b.value.lead.schema.description},[A(V(pe(b.value.lead.key,b.value.lead.schema))+ ` ` ,1),b.value.lead.schema.description?(R(),q(z(rn),{key:0,class: ` size - 3 text - fg - subtle ` })):L( ` ` ,!0)],8,GH),b.value.lead.kind=== ` workflow ` ?(R(),q(uH,{key:0,value:me(b.value.lead.key),workflows:e.workflows,label:pe(b.value.lead.key,b.value.lead.schema),onPick:n[6]||=e=>T(b.value.lead.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` ])):b.value.lead.kind=== ` select ` ?(R(),G( ` select ` ,{key:1,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:me(b.value.lead.key),onChange:n[7]||=e=>w(b.value.lead.key,e.target.value||void 0)},[n[19]||=W( ` option ` ,{value: ` ` }, ` Default ` ,-1),(R(!0),G(H,null,K(b.value.lead.options,e=>(R(),G( ` option ` ,{key:e,value:e},V(e),9,qH))),128))],40,KH)):b.value.lead.kind=== ` text ` ?(R(),q(z(zl),{key:2,"model-value":me(b.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:n[8]||=e=>ce.value=b.value.lead.key,"onUpdate:modelValue":n[9]||=e=>w(b.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(R(),q(z(O),{key:3,"model-value":me(b.value.lead.key),onFocus:n[10]||=e=>ce.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 ` ?(R(),G( ` div ` ,JH,[n[20]||=W( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(R(!0),G(H,null,K(h.value,e=>(R(),G(H,{key:e},[W( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>le(e, ` summary ` )},V(e),9,YH),W( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>le(e, ` result ` )},V(e)+ ` . result ` ,9,XH)],64))),128))])):L( ` ` ,!0)])):L( ` ` ,!0),b.value.compact.length?(R(),G( ` section ` ,ZH,[(R(!0),G(H,null,K(b.value.compact,t=>(R(),G( ` div ` ,{key:t.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[W( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:t.schema.description},[A(V(pe(t.key,t.schema))+ ` ` ,1),t.schema.description?(R(),q(z(rn),{key:0,class: ` size - 3 text - fg - subtle ` })):L( ` ` ,!0)],8,QH),t.kind=== ` workflow ` ?(R(),q(uH,{key:0,class: ` max - w - 48 ` ,value:me(t.key),workflows:e.workflows,label:pe(t.key,t.schema),onPick:e=>T(t.key,e)},null,8,[ ` value ` , ` workflows ` , ` label ` , ` onPic 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 ` ])):(R(),G(H,{key:2},[M(z(zl),{"model-value":fe(m.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>de(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),ue.value[e.key]?(R(),G( ` span ` ,gU,V(ue.value[e.key]),1)):L( ` ` ,!0)],64))]))),128)),W( ` section ` ,_U,[n[33]||=W( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),W( ` div ` ,vU,[W( ` label ` ,yU,[n[28]||=W( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),W( ` input ` ,{class: ` h - 7 w - 48 rounded - md border border - input bg - background px - 2 font - mono text - xs ` ,placeholder: ` always ` ,value:i.value.when?? ` ` ,onInput:n[12]||=e=>S( ` when ` ,e.target.value)},null,40,bU)]),W( ` label ` ,xU,[n[30]||=W( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),W( ` select ` ,{class: ` h - 7 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:i.value.on_failure?? ` ` ,onChange:n[13]||=e=>S( ` on _failure ` ,e.target.value||void 0)},[...n[29]||=[W( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),W( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,SU)]),W( ` label ` ,CU,[n[31]||=W( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),W( ` input ` ,{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 7 w - 20 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:i.value.retry?.attempts?? ` ` ,onInput:n[14]||=e=>C({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,wU)]),W( ` label ` ,TU,[n[32]||=W( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),M(z(wm),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":n[15]||=e=>C({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),W( ` footer ` ,EU,[M(z(Z),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:n[16]||=e=>r( ` remove ` )},{default:j(()=>[M(z(Rn)),n[34]||=A( ` Delete step ` ,-1)]),_:1}),M(z(Z),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:n[17]||=e=>r( ` close ` )},{default:j(()=>[...n[35]||=[A( ` Done ` ,-1)]]),_:1})])]))}}),OU= ` repository _path ` ;function kU(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:OU,path:n.trim(),type: ` string ` ,required:!0}),r}function AU(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function jU(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=AU(yy(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 MU(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:yy(e.value,i.type?? ` string ` )})}return n}function NU(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 PU(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...PU(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...PU(n,r)]}):[]}function FU(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function IU(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 LU(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var RU={class: ` flex h - full flex - col ` },zU={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },BU={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },VU={key:0,class: ` flex flex - 1 items - center justify - center ` },HU={class: ` space - y - 1.5 ` },UU=[ ` disabled ` ],WU=[ ` value ` ],GU={key:1,class: ` space - y - 1.5 ` },KU=[ ` value ` ],qU=[ ` title ` ],JU={class: ` space - y - 1.5 ` },YU={id: ` bind - paths ` },XU=[ ` value ` ],ZU={class: ` divide - y divide - border rounded - md border border - border ` },QU={class: ` flex items - center gap - 1.5 text - xs ` }, $ U={class: ` font - mono ` },eW={class: ` text - fg - subtle ` },tW={key:0,class: ` text - danger ` ,title: ` Required ` },nW=[ ` title ` , ` aria - label ` , ` onClick ` ],rW=[ ` onUpdate : modelValue ` , ` aria - label ` ],iW=[ ` onUpdate : modelValue ` , ` aria - label ` ],aW={key:2,class: ` text - xs text - danger ` },oW=[ ` title ` ],sW={key:0,class: ` space - y - 1 px - 3 py - 2 ` },cW={key:0,class: ` text - xs text - danger ` },lW={key:1,class: ` truncate font - mono text - xs text - success ` },uW={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },dW={class: ` space - y - 2 ` },fW={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },pW={key:1,clas
Line truncated
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(R(),G(H,{key:2},[M(z(zl),{"model-value":fe(m.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>de(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),ue.value[e.key]?(R(),G( ` span ` ,vU,V(ue.value[e.key]),1)):L( ` ` ,!0)],64))]))),128)),W( ` section ` ,yU,[n[33]||=W( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),W( ` div ` ,bU,[W( ` label ` ,xU,[n[28]||=W( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),W( ` input ` ,{class: ` h - 7 w - 48 rounded - md border border - input bg - background px - 2 font - mono text - xs ` ,placeholder: ` always ` ,value:i.value.when?? ` ` ,onInput:n[12]||=e=>S( ` when ` ,e.target.value)},null,40,SU)]),W( ` label ` ,CU,[n[30]||=W( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),W( ` select ` ,{class: ` h - 7 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:i.value.on_failure?? ` ` ,onChange:n[13]||=e=>S( ` on _failure ` ,e.target.value||void 0)},[...n[29]||=[W( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),W( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,wU)]),W( ` label ` ,TU,[n[31]||=W( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),W( ` input ` ,{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 7 w - 20 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:i.value.retry?.attempts?? ` ` ,onInput:n[14]||=e=>C({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,EU)]),W( ` label ` ,DU,[n[32]||=W( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),M(z(wm),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":n[15]||=e=>C({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),W( ` footer ` ,OU,[M(z(Z),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:n[16]||=e=>r( ` remove ` )},{default:j(()=>[M(z(Rn)),n[34]||=A( ` Delete step ` ,-1)]),_:1}),M(z(Z),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:n[17]||=e=>r( ` close ` )},{default:j(()=>[...n[35]||=[A( ` Done ` ,-1)]]),_:1})])]))}}),AU= ` repository _path ` ;function jU(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:AU,path:n.trim(),type: ` string ` ,required:!0}),r}function MU(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function NU(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=MU(ky(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 PU(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:ky(e.value,i.type?? ` string ` )})}return n}function FU(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 IU(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...IU(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...IU(n,r)]}):[]}function LU(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 zU(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var BU={class: ` flex h - full flex - col ` },VU={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },HU={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },UU={key:0,class: ` flex flex - 1 items - center justify - center ` },WU={class: ` space - y - 1.5 ` },GU=[ ` disabled ` ],KU=[ ` value ` ],qU={key:1,class: ` space - y - 1.5 ` },JU=[ ` value ` ],YU=[ ` title ` ],XU={class: ` space - y - 1.5 ` },ZU={id: ` bind - paths ` },QU=[ ` value ` ], $ U={class: ` divide - y divide - border rounded - md border border - border ` },eW={class: ` flex items - center gap - 1.5 text - xs ` },tW={class: ` font - mono ` },nW={class: ` text - fg - subtle ` },rW={key:0,class: ` text - danger ` ,title: ` Required ` },iW=[ ` title ` , ` aria - label ` , ` onClick ` ],aW=[ ` onUpdate : modelValue ` , ` aria - label ` ],oW=[ ` onUpdate : modelValue ` , ` aria - label ` ],sW={key:2,class: ` text - xs text - danger ` },cW=[ ` title ` ],lW={key:0,class: ` space - y - 1 px - 3 py - 2 ` },uW={key:0,class: ` text - xs text - danger ` },dW={key:1,class: ` truncate font - mono text - xs text - success ` },fW={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },pW={class: ` space - y - 2 ` },mW={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },hW={key:1,clas
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 iQ(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=aQ(n.code,e);return Array.isArray(e)?e.some(e=>rQ(n[r],e,t,n.type=== ` keyup ` )):rQ(n[r],e,t,n.type=== ` keyup ` )}}function aQ(e,t){return t.includes(e)? ` code ` : ` key ` }function oQ(e,t){let n=I(()=>ze(t?.target)??eQ),r=qe(ze(e)===!0),i=!1,a=new Set,o=c(ze(e));F(()=>ze(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),QG([ ` blur ` , ` contextmenu ` ],s),eK((...e)=>o(...e),e=>{let n=ze(t?.actInsideInputWithModifier)??!0,a=ze(t?.preventDefault)??!1;if(i=nQ(e),(!i||i&&!n)&&tQ(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}),eK((...e)=>o(...e),e=>{let n=ze(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&tQ(e))return;i=!1,r.value=!1}},{eventName: ` keyup ` ,target:n});function s(){i=!1,a.clear(),r.value=ze(e)===!0}function c(e){return e===null?(s(),()=>!1):typeof e== ` boolean ` ?(s(),r.value=e,()=>!1):Array.isArray(e)||typeof e== ` string ` ?iQ(e,a):e}return r}var sQ= ` vue - flow _ _node - desc ` ,cQ= ` vue - flow _ _edge - desc ` ,lQ= ` vue - flow _ _aria - live ` ,uQ=[ ` Enter ` , ` ` , ` Escape ` ],dQ={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function fQ(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function pQ(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 mQ(e){return{width:e.offsetWidth,height:e.offsetHeight}}function hQ(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function gQ(e,t){return{x:hQ(e.x,t[0][0],t[1][0]),y:hQ(e.y,t[0][1],t[1][1])}}function _Q(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function vQ(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function yQ(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!vQ(e)}function bQ(e){return yQ(e)&& ` computedPosition ` in e}function xQ(e){return!Number.isNaN(e)&&Number.isFinite(e)}function SQ(e){return xQ(e.width)&&xQ(e.height)&&xQ(e.x)&&xQ(e.y)}function CQ(e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:mt({width:0,height:0}),computedPosition:mt({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:B $ (e.data)?e.data:{},events:mt(B $ (e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function wQ(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:B $ (e.data)?e.data:{},events:mt(B $ (e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function TQ(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 EQ(...e){if(e.length===3){let[t,n,r]=e;return TQ(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>vQ(e)&&e.source===r).map(e=>n.find(t=>yQ(t)&&t.id===e.target))}function DQ(...e){if(e.length===3){let[t,n,r]=e;return TQ(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>vQ(e)&&e.target===r).map(e=>n.find(t=>yQ(t)&&t.id===e.source))}function OQ({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function kQ(e,t){return t.some(t=>vQ(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 AQ({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function jQ({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?C $ (s,o):s}function MQ(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 NQ({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function PQ({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function FQ(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=MQ(t,NQ({...r.computedPosition,...r.dimensions}))}return PQ(t)}function IQ(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...jQ(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 oQ(e,t){return n=>{if(!n.code&&!n.key)return!1;let r=sQ(n.code,e);return Array.isArray(e)?e.some(e=>aQ(n[r],e,t,n.type=== ` keyup ` )):aQ(n[r],e,t,n.type=== ` keyup ` )}}function sQ(e,t){return t.includes(e)? ` code ` : ` key ` }function cQ(e,t){let n=I(()=>ze(t?.target)??nQ),r=qe(ze(e)===!0),i=!1,a=new Set,o=c(ze(e));F(()=>ze(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),eK([ ` blur ` , ` contextmenu ` ],s),nK((...e)=>o(...e),e=>{let n=ze(t?.actInsideInputWithModifier)??!0,a=ze(t?.preventDefault)??!1;if(i=iQ(e),(!i||i&&!n)&&rQ(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}),nK((...e)=>o(...e),e=>{let n=ze(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&rQ(e))return;i=!1,r.value=!1}},{eventName: ` keyup ` ,target:n});function s(){i=!1,a.clear(),r.value=ze(e)===!0}function c(e){return e===null?(s(),()=>!1):typeof e== ` boolean ` ?(s(),r.value=e,()=>!1):Array.isArray(e)||typeof e== ` string ` ?oQ(e,a):e}return r}var lQ= ` vue - flow _ _node - desc ` ,uQ= ` vue - flow _ _edge - desc ` ,dQ= ` vue - flow _ _aria - live ` ,fQ=[ ` Enter ` , ` ` , ` Escape ` ],pQ={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function mQ(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function hQ(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 gQ(e){return{width:e.offsetWidth,height:e.offsetHeight}}function _Q(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function vQ(e,t){return{x:_Q(e.x,t[0][0],t[1][0]),y:_Q(e.y,t[0][1],t[1][1])}}function yQ(e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function bQ(e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function xQ(e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!bQ(e)}function SQ(e){return xQ(e)&& ` computedPosition ` in e}function CQ(e){return!Number.isNaN(e)&&Number.isFinite(e)}function wQ(e){return CQ(e.width)&&CQ(e.height)&&CQ(e.x)&&CQ(e.y)}function TQ(e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:mt({width:0,height:0}),computedPosition:mt({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:H $ (e.data)?e.data:{},events:mt(H $ (e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function EQ(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:H $ (e.data)?e.data:{},events:mt(H $ (e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function DQ(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 OQ(...e){if(e.length===3){let[t,n,r]=e;return DQ(t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>bQ(e)&&e.source===r).map(e=>n.find(t=>xQ(t)&&t.id===e.target))}function kQ(...e){if(e.length===3){let[t,n,r]=e;return DQ(t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>bQ(e)&&e.target===r).map(e=>n.find(t=>xQ(t)&&t.id===e.source))}function AQ({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function jQ(e,t){return t.some(t=>bQ(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 MQ({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function NQ({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?T $ (s,o):s}function PQ(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 FQ({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function IQ({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function LQ(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=PQ(t,FQ({...r.computedPosition,...r.dimensions}))}return IQ(t)}function RQ(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...NQ(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,4 +147,4 @@ 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 ` },_ $ =class extends Error{constructor(e,...t){super(g $ [e]?.call(g $ ,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function v $ (e){return ` clientX ` in e}function y $ (e){return ` sourceEvent ` in e}function b $ (e,t){let n=v $ (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 x $ =()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function S $ (e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function C $ (e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var w $ =()=>!0;function T $ (e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function E $ (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())pQ(i,fQ(e))>0&&r.push(e);return r}var D $ =250;function O $ (e,t,n,r){let i=[],a=1/0,o=E $ (e,n,t+D $ );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}=d $ (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 k $ (e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=w $ },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:_}=b $ (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=A $ (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===YZ.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=N $ (t,e,a,p,n,!0)}return b}function A $ (e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function j $ (e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function M $ (e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function N $ (e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===YZ.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,...d $ (o,c,c.position,!0)}:c}var P $ ={[KZ.Left]:KZ.Right,[KZ.Right]:KZ.Left,[KZ.Top]:KZ.Bottom,[KZ.Bottom]:KZ.Top},F $ =[ ` production ` , ` prod ` ];function I $ (e,...t){L $ ()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function L $ (){return!F $ .includes( ` production ` )}function R $ (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,...mQ(t)}}):null}function z $ (e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),ft(()=>{o.blur()})):n([e])}function B $ (e){return z(e)!==void 0}function V $ (e,t,n,r){if(!e||!e.source||!e.target)return n(new _ $ (h $ .EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=vQ(e)?e:{...e,id:OQ(e)},i=wQ(i,void 0,r),!kQ(i,t)&&i}function H $ (e,t,n,r,i){if(!t.source||!t.target)return i(new _ $ (h $ .EDGE_INVALID,e.id)),!1;if(!n)return i(new _ $ (h $ .EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?OQ(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function U $ (e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!yQ(o)){n(new _ $ (h $ .NODE_INVALID,o?.id));continue}let s=CQ(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 _ $ (h $ .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 W $ (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 G $ (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 } ` ;W $ ( ` 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 ` },y $ =class extends Error{constructor(e,...t){super(v $ [e]?.call(v $ ,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function b $ (e){return ` clientX ` in e}function x $ (e){return ` sourceEvent ` in e}function S $ (e,t){let n=b $ (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 C $ =()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function w $ (e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function T $ (e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var E $ =()=>!0;function D $ (e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function O $ (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())hQ(i,mQ(e))>0&&r.push(e);return r}var k $ =250;function A $ (e,t,n,r){let i=[],a=1/0,o=O $ (e,n,t+k $ );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}=p $ (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 j $ (e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=E $ },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:_}=S $ (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=M $ (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===ZZ.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=F $ (t,e,a,p,n,!0)}return b}function M $ (e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function N $ (e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function P $ (e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function F $ (e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===ZZ.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,...p $ (o,c,c.position,!0)}:c}var I $ ={[JZ.Left]:JZ.Right,[JZ.Right]:JZ.Left,[JZ.Top]:JZ.Bottom,[JZ.Bottom]:JZ.Top},L $ =[ ` production ` , ` prod ` ];function R $ (e,...t){z $ ()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function z $ (){return!L $ .includes( ` production ` )}function B $ (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,...gQ(t)}}):null}function V $ (e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),ft(()=>{o.blur()})):n([e])}function H $ (e){return z(e)!==void 0}function U $ (e,t,n,r){if(!e||!e.source||!e.target)return n(new y $ (_ $ .EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=bQ(e)?e:{...e,id:AQ(e)},i=EQ(i,void 0,r),!jQ(i,t)&&i}function W $ (e,t,n,r,i){if(!t.source||!t.target)return i(new y $ (_ $ .EDGE_INVALID,e.id)),!1;if(!n)return i(new y $ (_ $ .EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?AQ(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function G $ (e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!xQ(o)){n(new y $ (_ $ .NODE_INVALID,o?.id));continue}let s=TQ(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 y $ (_ $ .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 K $ (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 q $ (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 } ` ;K $ ( ` source ` ,o, ` $ { r } - $ { a } -- Line truncated