@@ -16,59 +16,59 @@ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],en
Defaulting to \ ` null \` . ` ) , null ) } function VS ( e ) { return zS ( e ) && ! Number . isNaN ( e ) && e > 0 ? e : ( console . error ( ` Invalid prop \` max \` of value \` ${ e } \` supplied to \` ProgressRoot \` . Only numbers greater than 0 are valid max values. Defaulting to \` ${ IS } \` . ` ) , IS ) } var HS = M ( { _ _name : ` ProgressRoot ` , props : { modelValue : { type : [ Number , null ] , required : ! 1 } , max : { type : Number , required : ! 1 , default : IS } , getValueLabel : { type : Function , required : ! 1 , default : ( e , t ) => zS ( e ) ? ` ${ Math . round ( e / t * IS ) } % ` : void 0 } , getValueText : { type : Function , required : ! 1 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , emits : [ ` update:modelValue ` , ` update:max ` ] , setup ( e , { emit : t } ) { let n = e , r = t ; J ( ) ; let i = Jh ( n , ` modelValue ` , r , { passive : n . modelValue === void 0 } ) , a = Jh ( n , ` max ` , r , { passive : n . max === void 0 } ) ; j ( ( ) => i . value , async e => { let t = BS ( e , n . max ) ; t !== e && ( await ar ( ) , i . value = t ) } , { immediate : ! 0 } ) , j ( ( ) => n . max , e => { let t = VS ( n . max ) ; t !== e && ( a . value = t ) } , { immediate : ! 0 } ) ; let o = W ( ( ) => lh ( i . value ) ? ` indeterminate ` : i . value === a . value ? ` complete ` : ` loading ` ) ; return RS ( { modelValue : i , max : a , progressState : o } ) , ( e , t ) => ( I ( ) , R ( k ( Y ) , { "as-child" : e . asChild , as : e . as , "aria-valuemax" : k ( a ) , "aria-valuemin" : 0 , "aria-valuenow" : zS ( k ( i ) ) ? k ( i ) : void 0 , "aria-valuetext" : e . getValueText ? . ( k ( i ) , k ( a ) ) , "aria-label" : e . getValueLabel ( k ( i ) , k ( a ) ) , role : ` progressbar ` , "data-state" : o . value , "data-value" : k ( i ) ? ? void 0 , "data-max" : k ( a ) } , { default : A ( ( ) => [ P ( e . $slots , ` default ` , { modelValue : k ( i ) } ) ] ) , _ : 3 } , 8 , [ ` as-child ` , ` as ` , ` aria-valuemax ` , ` aria-valuenow ` , ` aria-valuetext ` , ` aria-label ` , ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , US = M ( { _ _name : ` ProgressIndicator ` , props : { asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , setup ( e ) { let t = e , n = LS ( ) ; return J ( ) , ( e , r ) => ( I ( ) , R ( k ( Y ) , U ( t , { "data-state" : k ( n ) . progressState . value , "data-value" : k ( n ) . modelValue ? . value ? ? void 0 , "data-max" : k ( n ) . max . value } ) , { default : A ( ( ) => [ P ( e . $slots , ` default ` ) ] ) , _ : 3 } , 16 , [ ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , WS = ` radio.select ` ; function GS ( e , t , n ) { ch ( WS , n , { originalEvent : e , value : t } ) } var KS = M ( { inheritAttrs : ! 1 , _ _name : ` Radio ` , props : { id : { type : String , required : ! 1 } , value : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , checked : { type : Boolean , required : ! 1 , default : void 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 , default : ` button ` } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 } } , emits : [ ` update:checked ` , ` select ` ] , setup ( e , { emit : t } ) { let n = e , r = t , i = Jh ( n , ` checked ` , r , { passive : n . checked === void 0 } ) , { value : a } = En ( n ) , { forwardRef : o , currentElement : s } = J ( ) , c = yg ( s ) , l = Sg ( ) , u = W ( ( ) => n . id && s . value ? document . querySelector ( ` [for=" ${ n . id } "] ` ) ? . innerText : void 0 ) ; function d ( e ) { n . disabled || GS ( e , n . value , e => { r ( ` select ` , e ) , ! e ? . defaultPrevented && ( i . value = ! 0 , c . value && e . stopPropagation ( ) ) } ) } return ( e , t ) => ( I ( ) , L ( F , null , [ B ( k ( Y ) , U ( { id : e . id , ref : k ( o ) , role : ` radio ` , type : e . as === ` button ` ? ` button ` : void 0 , as : e . as , "aria-checked" : k ( i ) ? ? ! 1 , "aria-label" : u . value , "as-child" : e . asChild , disabled : e . disabled ? ` ` : void 0 , "data-state" : k ( i ) ? ` checked ` : ` unchecked ` , "data-disabled" : e . disabled ? ` ` : void 0 , value : k ( a ) , required : e . required , name : e . name } , { ... k ( l ) , ... e . $attrs } , { onClick : lu ( d , [ ` stop ` ] ) } ) , { default : A ( ( ) => [ P ( e . $slots , ` default ` , { checked : k ( i ) } ) ] ) , _ : 3 } , 16 , [ ` id ` , ` type ` , ` as ` , ` aria-checked ` , ` aria-label ` , ` as-child ` , ` disabled ` , ` data-state ` , ` data-disabled ` , ` value ` , ` required ` , ` name ` ] ) , k ( c ) && e . name ? ( I ( ) , R ( k ( Ev ) , U ( { key : 0 , type : ` radio ` , tabindex : ` -1 ` , value : k ( a ) , checked : ! ! k ( i ) , name : e . name , disabled : e . disabled , required : e . required } , k ( l ) ) , null , 16 , [ ` value ` , ` checked ` , ` name ` , ` disabled ` , ` required ` ] ) ) : H ( ` v-if ` , ! 0 ) ] , 64 ) ) } } ) , [ qS , JS ] = oh ( ` RadioGroupRoot ` ) , YS = M ( { _ _name : ` RadioGroupRoot ` , props : { modelValue : { type : null , required : ! 1 } , defaultValue : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , orientation : { type : String , required : ! 1 , default : void 0 } , dir : { type : String , required : ! 1 } , loop : { type : Boolean , required : ! 1 , default : ! 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 , default : ! 1 } } , emits : [ ` update:modelValue ` ] , setup ( e , { emit : t } ) { let n = e , r = t , { forwardRef : i , currentElement : a } = J ( ) , o = Jh ( n , ` modelValue ` , r , { defaultValue : n . defaultValue , passive : n . modelValue === void 0 } ) , { disabled : s , loop : c , orientation : l , name : u , required : d , dir : f } = En ( n ) , p = mg ( f ) , m = yg ( a ) ; return JS ( { modelValue : o , changeModelValue : e => { o . value = e } , disabled : s , loop : c , orientation : l , name : u ? . value , required : d } ) , ( e , t ) => ( I ( ) , R ( k ( cx ) , { "as-child" : ` ` , orientation : k ( l ) , dir : k ( p ) , loop : k ( c ) } , { default : A ( ( ) => [ B ( k ( Y ) , { ref : k ( i ) , role : ` radiogroup ` , "data-disabled" : k ( s ) ? ` ` : void 0 , "as-child" : e . asChild , as : e . as , "aria-orientation" : k ( l ) , "aria-required" : k ( d ) , dir : k ( p ) } , { default : A ( ( ) => [ P ( e . $slots , ` default ` , { modelValue : k ( o ) } ) , k ( m ) && k ( u ) ? ( I ( ) , R ( k ( Ev ) , { key : 0 , required : k ( d ) , disabled : k ( s ) , value : k ( o ) , name : k ( u ) } , null , 8 , [ ` required ` , ` disabled ` , ` value ` , ` name ` ] ) ) : H ( ` v-if ` , ! 0 ) ] ) , _ : 3 } , 8 , [ ` data-disabled ` , ` as-child ` , ` as ` , ` aria-orientation ` , ` aria-required ` , ` dir ` ] ) ] ) , _ : 3 } , 8 , [ ` orientation ` , ` dir ` , ` loop ` ] ) ) } } ) , [ XS , ZS ] = oh ( ` RadioGroupItem ` ) , QS = M ( { inheritAttrs : ! 1 , _ _name : ` RadioGroupItem ` , props : { id : { type : String , required : ! 1 } , value : { type : null , re Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:qE(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>qE(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=YE(c),u=e+1<n.length?YE(n[e+1]):null;if(l&&u&&XE(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=YE(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>qE(e)),rows:r.map(e=>e.map(e=>qE(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:qE(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]);continue}if(c.startsWith( ` > ` )){o(),s(),t.push({kind: ` blockquote ` ,inline:qE(c.replace(/^> \s ?/, ` ` ))});continue}r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function YE(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 XE(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var ZE={class: ` [ overflow - wrap : anywhere ] ` },QE={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` }, $ E={class: ` font - mono text - [ 0.85 em ] ` },eD={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },tD={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },nD={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },rD={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },iD={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },aD={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },oD={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },sD={key:8,class: ` mb - 2.5 last : mb - 0 ` },cD=M({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=W(()=>JE(t.text));return(e,t)=>(I(),L( ` div ` ,ZE,[(I(!0),L(F,null,N(n.value,(e,t)=>(I(),L(F,{key:t},[e.kind=== ` pre ` ?(I(),L( ` pre ` ,QE,[z( ` code ` , $ E,D(e.code),1)])):e.kind=== ` table ` ?(I(),L( ` table ` ,eD,[z( ` thead ` ,null,[z( ` tr ` ,null,[(I(!0),L(F,null,N(e.head,(e,t)=>(I(),L( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[B(GE,{inline:e},null,8,[ ` inline ` ])]))),128))])]),z( ` tbody ` ,null,[(I(!0),L(F,null,N(e.rows,(e,t)=>(I(),L( ` tr ` ,{key:t},[(I(!0),L(F,null,N(e,(e,t)=>(I(),L( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[B(GE,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(I(),L( ` blockquote ` ,tD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(I(),L( ` h1 ` ,nD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(I(),L( ` h2 ` ,rD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(I(),L( ` h3 ` ,iD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(I(),L( ` ul ` ,aD,[(I(!0),L(F,null,N(e.items,(e,t)=>(I(),L( ` li ` ,{key:t},[B(GE,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(I(),L( ` ol ` ,oD,[(I(!0),L(F,null,N(e.items,(e,t)=>(I(),L( ` li ` ,{key:t},[B(GE,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(I(),L( ` p ` ,sD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):H( ` ` ,!0)],64))),128))]))}}),lD={class: ` truncate ` },uD=M({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=ma( ` RouterLink ` );return I(),R(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:A(()=>[B(k(bd),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),z( ` span ` ,lD,D(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),dD={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },fD={class: ` font - semibold text - foreground ` },pD={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },mD=M({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=W(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=W(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=W(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=W(()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err||(t.streaming?i.value? ` failed ` : ` running … ` : ` done ` ));return(t,o)=>e.tool.path?(I(),R(uD,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(I(),L( ` div ` ,dD,[B(k(lf),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),z( ` span ` ,fD,D(n.value),1),r.value?(I(),L( ` code ` ,pD,D(r.value),1)):H( ` ` ,!0),z( ` span ` ,{class:E(k(K)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},D(a.value),3)]))}}),hD={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },gD={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },_D={key:3,class: ` whitespace - pre - wrap ` },vD=M({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(I(),L( ` div ` ,{class:E([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[z( ` div ` ,{class:E(k(K)( ` 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?(I(),L( ` div ` ,hD,[(I(!0),L(F,null,N(e.tools,(t,n)=>(I(),R(mD,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):H( ` ` ,!0),e.media.length?(I(),L( ` div ` ,gD,[(I(!0),L(F,null,N(e.media,(e,t)=>(I(),R(RE,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):H( ` ` ,!0),e.assistant?(I(),R(cD,{key:2,text:e.text},null,8,[ ` text ` ])):(I(),L( ` div ` ,_D,D(e.text),1)),P(t. $ slots, ` default ` )],2)],2))}}),yD={class: ` w - full self - center justify - self - center py - 6 text - center ` },bD={class: ` grid gap - 2 ` },xD=[ ` onClick ` ],SD=M({__name: ` ChatEmptyState ` ,emits:[ ` pro Line truncated
` )}),t}function YE(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 XE(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var ZE={class: ` [ overflow - wrap : anywhere ] ` },QE={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` }, $ E={class: ` font - mono text - [ 0.85 em ] ` },eD={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },tD={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },nD={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },rD={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },iD={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },aD={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },oD={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },sD={key:8,class: ` mb - 2.5 last : mb - 0 ` },cD=M({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=W(()=>JE(t.text));return(e,t)=>(I(),L( ` div ` ,ZE,[(I(!0),L(F,null,N(n.value,(e,t)=>(I(),L(F,{key:t},[e.kind=== ` pre ` ?(I(),L( ` pre ` ,QE,[z( ` code ` , $ E,D(e.code),1)])):e.kind=== ` table ` ?(I(),L( ` table ` ,eD,[z( ` thead ` ,null,[z( ` tr ` ,null,[(I(!0),L(F,null,N(e.head,(e,t)=>(I(),L( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[B(GE,{inline:e},null,8,[ ` inline ` ])]))),128))])]),z( ` tbody ` ,null,[(I(!0),L(F,null,N(e.rows,(e,t)=>(I(),L( ` tr ` ,{key:t},[(I(!0),L(F,null,N(e,(e,t)=>(I(),L( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[B(GE,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(I(),L( ` blockquote ` ,tD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(I(),L( ` h1 ` ,nD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(I(),L( ` h2 ` ,rD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(I(),L( ` h3 ` ,iD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(I(),L( ` ul ` ,aD,[(I(!0),L(F,null,N(e.items,(e,t)=>(I(),L( ` li ` ,{key:t},[B(GE,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(I(),L( ` ol ` ,oD,[(I(!0),L(F,null,N(e.items,(e,t)=>(I(),L( ` li ` ,{key:t},[B(GE,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(I(),L( ` p ` ,sD,[B(GE,{inline:e.inline},null,8,[ ` inline ` ])])):H( ` ` ,!0)],64))),128))]))}}),lD={class: ` truncate ` },uD=M({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=ma( ` RouterLink ` );return I(),R(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:A(()=>[B(k(bd),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),z( ` span ` ,lD,D(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),dD={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },fD={class: ` font - semibold text - foreground ` },pD={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },mD=M({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=W(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=W(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=W(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=W(()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err||(t.streaming?i.value? ` failed ` : ` running … ` : ` done ` ));return(t,o)=>e.tool.path?(I(),R(uD,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(I(),L( ` div ` ,dD,[B(k(lf),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),z( ` span ` ,fD,D(n.value),1),r.value?(I(),L( ` code ` ,pD,D(r.value),1)):H( ` ` ,!0),z( ` span ` ,{class:E(k(K)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},D(a.value),3)]))}}),hD={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },gD={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },_D={key:3,class: ` whitespace - pre - wrap ` },vD=M({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(I(),L( ` div ` ,{class:E([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[z( ` div ` ,{class:E(k(K)( ` 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?(I(),L( ` div ` ,hD,[(I(!0),L(F,null,N(e.tools,(t,n)=>(I(),R(mD,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):H( ` ` ,!0),e.media.length?(I(),L( ` div ` ,gD,[(I(!0),L(F,null,N(e.media,(e,t)=>(I(),R(RE,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):H( ` ` ,!0),e.assistant?(I(),R(cD,{key:2,text:e.text},null,8,[ ` text ` ])):(I(),L( ` div ` ,_D,D(e.text),1)),P(t. $ slots, ` default ` )],2)],2))}}),yD={class: ` w - full self - center justify - self - center py - 6 text - center ` },bD={class: ` grid gap - 2 ` },xD=[ ` onClick ` ],SD=M({__name: ` ChatEmptyState ` ,emits:[ ` pro Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>WM? ` $ { n . slice ( 0 , WM ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var KM=[ ` title ` ],qM=M({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=W(()=>vM(n.event)),a=W(()=>GM(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=W(()=>n.event.at?Ej(n.event.at): ` — ` );return(e,t)=>(I(),R(k(VM),{class:E(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:[du(lu(o,[ ` prevent ` ]),[ ` enter ` ]),du(lu(o,[ ` prevent ` ]),[ ` space ` ])]},{default:A(()=>[B(k( $ ),{class: ` font - medium ` },{default:A(()=>[V(D(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),B(k( $ ),{class: ` font - mono ` },{default:A(()=>[V(D(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),B(k( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:A(()=>[z( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},D(a.value.text),9,KM)]),_:1}),B(k( $ ),null,{default:A(()=>[V(D(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),JM=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function YM(e){return(Number(e?.task_id)||0)>0}function XM(e,t){return t=== ` tasks ` ?YM(e):t!== ` system ` ||!YM(e)}function ZM(e,t){return e.filter(e=>XM(e,t))}function QM(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function $ M(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function eN(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i= $ M(GM(n).text,r),a=t[t.length-1];if(a&&a.key===i){a.count+=1,a.events.push(n);continue}t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var tN={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },nN={class: ` max - h - [ 28 rem ] overflow - y - auto ` },rN=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],iN=[ ` title ` ],aN=M({__name: ` LiveActivityCard ` ,setup(e){let t=GD(),{activity:n,streamKind:r,streamState:i}=ad(kA()),a=O( ` all ` ),o=W(()=>ZM(n.value,a.value)),s=W(()=>QM(o.value.length,a.value)),c=nn(new Set),l=W(()=>eN(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 GM(e.representative)}function p(e){return e.representative.at?Ej(e.representative.at): ` — ` }function m(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(I(),R(k(yj),null,{default:A(()=>[B(k(wj),null,{default:A(()=>[B(k(Tj),null,{default:A(()=>[...t[1]||=[V( ` Live activity ` ,-1)]]),_:1}),B(k(bj),{class: ` flex items - center gap - 2 ` },{default:A(()=>[B(k(nA),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:k(JM)},null,8,[ ` modelValue ` , ` options ` ]),B(k(gj),{variant:k(r)},{default:A(()=>[V(D(k(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),B(k(xj),null,{default:A(()=>[z( ` div ` ,tN,[z( ` div ` ,nN,[B(k(zM),null,{default:A(()=>[B(k(UM),{class: ` sticky top - 0 z - 10 bg - card ` },{default:A(()=>[B(k(VM),null,{default:A(()=>[B(k(HM),null,{default:A(()=>[...t[2]||=[V( ` Event ` ,-1)]]),_:1}),B(k(HM),null,{default:A(()=>[...t[3]||=[V( ` Task ` ,-1)]]),_:1}),B(k(HM),null,{default:A(()=>[...t[4]||=[V( ` Detail ` ,-1)]]),_:1}),B(k(HM),null,{default:A(()=>[...t[5]||=[V( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),B(k(BM),null,{default:A(()=>[o.value.length?H( ` ` ,!0):(I(),R(k(VM),{key:0},{default:A(()=>[B(k( $ ),{colspan: ` 4 ` },{default:A(()=>[B(k(cj),null,{default:A(()=>[B(k(dj),null,{default:A(()=>[B(k(mj),null,{default:A(()=>[V(D(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(I(!0),L(F,{key:1},N(l.value,e=>(I(),L(F,{key:e.key},[e.count===1?(I(),R(qM,{key:0,event:e.representative,onOpen:m},null,8,[ ` event ` ])):(I(),L(F,{key:1},[B(k(VM),{class:E(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:[du(lu(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),du(lu(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:A(()=>[B(k( $ ),{class: ` font - medium ` },{default:A(()=>[z( ` 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:lu(t=>u(e.key),[ ` stop ` ])},[d(e)?(I(),R(k(wd),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(I(),R(k(Td),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),V( ` ` +D(e.label)+ ` ` ,1),B(k(gj),{variant: ` idle ` },{default:A(()=>[V( ` × ` +D(e.count),1)]),_:2},1024)],8,rN)]),_:2},1024),B(k( $ ),{class: ` font - mono ` },{default:A(()=>[V(D(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),B(k( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:A(()=>[z( ` span ` ,{class: ` block truncate ` ,title:f(e).truncated?f(e).full:void 0},D(f(e).text),9,iN)]),_:2},1024),B(k( $ ),null,{default:A(()=>[V(D(p(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),d(e)?(I(!0),L(F,{key:0},N(e.events,(t,n)=>(I(),R(qM,{key: ` $ { e . key } : $ { n } ` ,event:t,onO
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 SP(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 CP(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 wP(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 TP(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 EP=O([]),DP=O([]),OP=O(!0),kP=O(null),AP=O(null),jP=O(!1),MP=O(null);async function NP(){try{let e=await q.eventTypes();OP.value=e.enabled!==!1,EP.value=e.event_types||[],DP.value=e.proposals||[],kP.value=null}catch(e){kP.value=e.message||String(e)}}function PP(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function FP(e){MP.value=null,AP.value=e}function IP(e){let t=WP.value.find(t=>String(t.id)===e.sample_id);FP({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:PP(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function LP(e= ` ` ){FP({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function RP(e){FP({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:PP(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function zP(){AP.value=null}async function BP(){let e=AP.value;if(e){jP.value=!0;try{if(e.mode=== ` edit ` &&e.id)await q.eventTypeUpdate(e.id,{name:e.name,rule:TP(e.rule)});else{let t=e.mode=== ` paste ` ?xP(e.headersText):e.exampleHeaders;await q.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:TP(e.rule),example:{headers:t,body:e.body}})}AP.value=null,await NP()}catch(e){MP.value=e.message||String(e)}finally{jP.value=!1}}}var VP=O(null);async function HP(){let e=VP.value;if(VP.value=null,e)try{await q.eventTypeDelete(e.id),await NP()}catch(e){kP.value=e.message||String(e)}}var UP=100,WP=O([]),GP=O(!0),KP=O(null),qP=O(!0),JP=O(null);async function YP(){try{let e=await q.captures(UP);GP.value=e.enabled!==!1,WP.value=e.captures||[],KP.value=null}catch(e){KP.value=e.message||String(e)}finally{qP.value=!1}}function XP(e){let t=WP.value.find(t=>t.id===e);return t&&(JP.value=t),!!t}function ZP(){WP.value.length&&(JP.value=WP.value[0])}function QP(){AA( ` captures ` ,()=>{YP(),NP()})}var $ P= ` archie . theme ` ,eF= ` archie . density ` ,tF= ` archie . motion ` ,nF= ` archie . tooltips ` ;function rF(e,t,n){try{let r=localStorage.getItem(e);return t.includes(r)?r:n}catch{return n}}function iF(e,t){try{localStorage.setItem(e,t)}catch{}}function aF(e){if(e!== ` system ` )return e;try{return matchMedia( ` ( prefers - color - scheme : dark ) ` ).matches? ` dark ` : ` light ` }catch{return ` dark ` }}var oF=id( ` appearance ` ,()=>{let e=O(rF( $ P,[ ` system ` , ` dark ` , ` light ` ], ` dark ` )),t=O(rF(eF,[ ` comfortable ` , ` compact ` ], ` comfortable ` )),n=O(rF(tF,[ ` system ` , ` reduced ` ], ` system ` )),r=O(rF(nF,[ ` on ` , ` off ` ], ` on ` )=== ` on ` ),i=!1;function a(){document.documentElement.dataset.theme=aF(e.value)}function o(t){e.value=t,a(),iF( $ P,t)}function s(e){t.value=e,document.documentElement.dataset.density=e,iF(eF,e)}function c(e){n.value=e,document.documentElement.dataset.motion=e,iF(tF,e)}function l(e){r.value=e,iF(nF,e? ` on ` : ` off ` )}function u(){if(!i){i=!0,a(),document.documentElement.dataset.density=t.value,document.documentElement.dataset.motion=n.value;try{matchMedia( ` ( prefers - color - scheme : dark ) ` ).addEventListener( ` change ` ,()=>{e.value=== ` system ` &&a()})}catch{}}}return{theme:e,density:t,motion:n,tooltipsEnabled:r,initialize:u,setTheme:o,setDensity:s,setMotion:c,setTooltips:l}}),sF=M({__name: ` Tooltip ` ,props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:[ ` update : open ` ],setup(e,{emit:t}){let n=e,r=xg(n,t),{tooltipsEnabled:i}=ad(oF());return(e,t)=>(I(),R(k(hw),U({"data-slot": ` tooltip ` },k(r),{disabled:n.disabled||!k(i)}),{default:A(t=>[P(e. $ slots, ` default ` ,Ce(Ds(t)))]),_:3},16,[ ` disabled ` ]))}}),cF=M({inheritAttrs:!1,__name: ` TooltipContent ` ,props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:0},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[ ` escapeKeyDown ` , ` pointerDownOutside ` ],setup(e,{emit:t}){let n=e,r=t,i=xg(Fw(n, ` class ` ),r);return(e,t)=>(I(),R(k(yw),null,{default:A(
Line truncated
` )}};Gq.defaultYaml={explicit:!1,version: ` 1.2 ` },Gq.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function Kq(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 qq(e){let t=new Set;return Rq(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Jq(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function Yq(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=qq(e);let a=Jq(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(Aq(t.node)||Mq(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 Xq(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=Xq(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=Xq(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=Xq(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=Xq(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function Zq(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Zq(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!Pq(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 Qq=class{constructor(e){Object.defineProperty(this,Tq,{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(!Dq(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=Zq(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?Xq(i,{"":o}, ` ` ,o):o}}, $ q=class extends Qq{constructor(e){super(yq),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=[],Rq(e,{Node:(e,t)=>{(Eq(t)||Pq(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||=(Zq(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=eJ(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(Kq(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 eJ(e,t,n){if(Eq(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Mq(t)){let r=0;for(let i of t.items){let t=eJ(e,i,n);t>r&&(r=t)}return r}if(kq(t)){let r=eJ(e,t.key,n),i=eJ(e,t.value,n);return Math.max(r,i)}return 1}var tJ=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,nJ=class extends Qq{constructor(e){super(Cq),this.value=e}toJSON(e,t){return t?.keep?this.value:Zq(this.value,e,t)}toString(){return String(this.value)}};nJ.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,nJ.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,nJ.PLAIN= ` PLAIN ` ,nJ.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,nJ.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var rJ= ` tag : yaml . org , 2002 : ` ;function iJ(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 aJ(e,t,n){if(Dq(e)&&(e=e.contents),Nq(e))return e;if(kq(e)){let t=n.schema[xq].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 $ q(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=rJ+t.slice(2));let l=iJ(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new nJ(e);return c&&(c.node=t),t
Line truncated
` )?u J(n,t):n.includes( `
` )){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 SP(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 CP(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 wP(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 TP(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 EP=O([]),DP=O([]),OP=O(!0),kP=O(null),AP=O(null),jP=O(!1),MP=O(null);async function NP(){try{let e=await q.eventTypes();OP.value=e.enabled!==!1,EP.value=e.event_types||[],DP.value=e.proposals||[],kP.value=null}catch(e){kP.value=e.message||String(e)}}function PP(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function FP(e){MP.value=null,AP.value=e}function IP(e){let t=WP.value.find(t=>String(t.id)===e.sample_id);FP({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:PP(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function LP(e= ` ` ){FP({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function RP(e){FP({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:PP(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function zP(){AP.value=null}async function BP(){let e=AP.value;if(e){jP.value=!0;try{if(e.mode=== ` edit ` &&e.id)await q.eventTypeUpdate(e.id,{name:e.name,rule:TP(e.rule)});else{let t=e.mode=== ` paste ` ?xP(e.headersText):e.exampleHeaders;await q.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:TP(e.rule),example:{headers:t,body:e.body}})}AP.value=null,await NP()}catch(e){MP.value=e.message||String(e)}finally{jP.value=!1}}}var VP=O(null);async function HP(){let e=VP.value;if(VP.value=null,e)try{await q.eventTypeDelete(e.id),await NP()}catch(e){kP.value=e.message||String(e)}}var UP=100,WP=O([]),GP=O(!0),KP=O(null),qP=O(!0),JP=O(null);async function YP(){try{let e=await q.captures(UP);GP.value=e.enabled!==!1,WP.value=e.captures||[],KP.value=null}catch(e){KP.value=e.message||String(e)}finally{qP.value=!1}}function XP(e){let t=WP.value.find(t=>t.id===e);return t&&(JP.value=t),!!t}function ZP(){WP.value.length&&(JP.value=WP.value[0])}function QP(){AA( ` captures ` ,()=>{YP(),NP()})}var $ P= ` archie . theme ` ,eF= ` archie . density ` ,tF= ` archie . motion ` ,nF= ` archie . tooltips ` ;function rF(e,t,n){try{let r=localStorage.getItem(e);return t.includes(r)?r:n}catch{return n}}function iF(e,t){try{localStorage.setItem(e,t)}catch{}}function aF(e){if(e!== ` system ` )return e;try{return matchMedia( ` ( prefers - color - scheme : dark ) ` ).matches? ` dark ` : ` light ` }catch{return ` dark ` }}var oF=id( ` appearance ` ,()=>{let e=O(rF( $ P,[ ` system ` , ` dark ` , ` light ` ], ` dark ` )),t=O(rF(eF,[ ` comfortable ` , ` compact ` ], ` comfortable ` )),n=O(rF(tF,[ ` system ` , ` reduced ` ], ` system ` )),r=O(rF(nF,[ ` on ` , ` off ` ], ` on ` )=== ` on ` ),i=!1;function a(){document.documentElement.dataset.theme=aF(e.value)}function o(t){e.value=t,a(),iF( $ P,t)}function s(e){t.value=e,document.documentElement.dataset.density=e,iF(eF,e)}function c(e){n.value=e,document.documentElement.dataset.motion=e,iF(tF,e)}function l(e){r.value=e,iF(nF,e? ` on ` : ` off ` )}function u(){if(!i){i=!0,a(),document.documentElement.dataset.density=t.value,document.documentElement.dataset.motion=n.value;try{matchMedia( ` ( prefers - color - scheme : dark ) ` ).addEventListener( ` change ` ,()=>{e.value=== ` system ` &&a()})}catch{}}}return{theme:e,density:t,motion:n,tooltipsEnabled:r,initialize:u,setTheme:o,setDensity:s,setMotion:c,setTooltips:l}}),sF=M({__name: ` Tooltip ` ,props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:[ ` update : open ` ],setup(e,{emit:t}){let n=e,r=xg(n,t),{tooltipsEnabled:i}=ad(oF());return(e,t)=>(I(),R(k(hw),U({"data-slot": ` tooltip ` },k(r),{disabled:n.disabled||!k(i)}),{default:A(t=>[P(e. $ slots, ` default ` ,Ce(Ds(t)))]),_:3},16,[ ` disabled ` ]))}}),cF=M({inheritAttrs:!1,__name: ` TooltipContent ` ,props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:0},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[ ` escapeKeyDown ` , ` pointerDownOutside ` ],setup(e,{emit:t}){let n=e,r=t,i=xg(Fw(n, ` class ` ),r);return(e,t)=>(I(),R(k(yw),null,{default:A(
Line truncated
` )}};Wq.defaultYaml={explicit:!1,version: ` 1.2 ` },Wq.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function Gq(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 Kq(e){let t=new Set;return Lq(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function qq(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function Jq(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Kq(e);let a=qq(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(kq(t.node)||jq(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 Yq(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=Yq(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=Yq(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=Yq(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=Yq(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function Xq(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Xq(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!Nq(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 Zq=class{constructor(e){Object.defineProperty(this,wq,{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(!Eq(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=Xq(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?Yq(i,{"":o}, ` ` ,o):o}},Qq=class extends Zq{constructor(e){super(vq),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=[],Lq(e,{Node:(e,t)=>{(Tq(t)||Nq(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||=(Xq(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= $ q(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(Gq(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 $ q(e,t,n){if(Tq(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(jq(t)){let r=0;for(let i of t.items){let t= $ q(e,i,n);t>r&&(r=t)}return r}if(Oq(t)){let r= $ q(e,t.key,n),i= $ q(e,t.value,n);return Math.max(r,i)}return 1}var eJ=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,tJ=class extends Zq{constructor(e){super(Sq),this.value=e}toJSON(e,t){return t?.keep?this.value:Xq(this.value,e,t)}toString(){return String(this.value)}};tJ.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,tJ.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,tJ.PLAIN= ` PLAIN ` ,tJ.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,tJ.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var nJ= ` tag : yaml . org , 2002 : ` ;function rJ(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 iJ(e,t,n){if(Eq(e)&&(e=e.contents),Mq(e))return e;if(Oq(e)){let t=n.schema[bq].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 Qq(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=nJ+t.slice(2));let l=rJ(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new tJ(e);return c&&(c.node=t),t
Line truncated
` )?l J(n,t):n.includes( `
` )? `
` +u J(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,f J= ` flow ` ,p J= ` block ` ,m J= ` quoted ` ;function h J(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=g J(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=g J(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` +l J(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,d J= ` flow ` ,f J= ` block ` ,p J= ` quoted ` ;function m J(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=h J(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=h J(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 g J(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 _ J=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),v J=e=>/^(%|---| \. \. \. )/m.test(e);function y J(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 b J(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(v J(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 h J(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 g J=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),_ J=e=>/^(%|---| \. \. \. )/m.test(e);function v J(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 y J(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(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:h J(o,a,m J,_ J(t,!1))}function x J(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return b J(e,t);let n=t.indent||(v J(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : hJ ( r , n , fJ , _J ( t , ! 1 ) ) } function SJ ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = bJ ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? xJ : i && ! t ? bJ : n ? xJ : bJ } return r ( e , t ) } var CJ ; try { CJ = 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:m J(o,a,p J,g J(t,!1))}function b J(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return y J(e,t);let n=t.indent||(_ J(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : mJ ( r , n , dJ , gJ ( t , ! 1 ) ) } function xJ ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = yJ ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? bJ : i && ! t ? yJ : n ? bJ : yJ } return r ( e , t ) } var SJ ; try { SJ = RegExp ( ` (^|(?<!
) )
+ ( ? !
| $ ) ` , ` g ` )}catch{C J=/ \n +(?! \n | $ )/g}function w J({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 S J(n,r);let l=r.indent||(r.forceBlockIndent||v J(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===n J.BLOCK_FOLDED?!1:t===n J.BLOCK_LITERAL||!y J(n,c,l.length);if(!n)return u? ` |
| $ ) ` , ` g ` )}catch{S J=/ \n +(?! \n | $ )/g}function C J({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 x J(n,r);let l=r.indent||(r.forceBlockIndent||_ J(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===t J.BLOCK_FOLDED?!1:t===t J.BLOCK_LITERAL||!v J(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(C J, ` $ & $ { 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(S J, ` $ & $ { 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=_ J(r,!0);o!== ` folded ` &&t!==n J.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=h J( ` $ { v } $ { e } $ { p } ` ,l,p J,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function T J(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 S J(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?S J(a,t):w J(e,t,n,r);if(!s&&!u&&i!==n J.PLAIN&&a.includes( `
` ))return w J(e,t,n,r);if(v J(a)){if(c=== ` ` )return t.forceBlockIndent=!0,w J(e,t,n,r);if(s&&c===l)return S J(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 S J(a,t)}return s?d:h J(d,c,f J,_ J(t,!1))}function E J(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!==n J.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=n J.QUOTE_DOUBLE);let c=e=>{switch(e){case n J.BLOCK_FOLDED:case n J.BLOCK_LITERAL:return i||a?S J(o.value,t):w J(o,t,n,r);case n J.QUOTE_DOUBLE:return b J(o.value,t);case n J.QUOTE_SINGLE:return x J(o.value,t);case n J.PLAIN:return T J(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 D J(e,t){let n=Object.assign({blockQuote:!0,commentString:l J,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 O J(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(A q(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function k J(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(A q(e)||M q(e))&&e.anchor;a&&K q(a)&&(n.add(a),i.push( ` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function A J(e,t,n,r){if(k q(e))return e.toString(t,n,r);if(E q(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=N q(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=O J(t.doc.schema.tags,a);let o=k J(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):A q(a)?E J(a,t,n,r):a.toString(t,n,r);return o?A q(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function j J({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=N q(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(M q(e)||!N q(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||M q(e)||(A q(e)?e.type===n J.BLOCK_FOLDED||e.type===n J.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=A J(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+=d J(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=d J(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=d J(g,n.indent,l(f))));let _,v,y;N q(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&A q(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&j q(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=A J(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { uJ ( 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=g J(r,!0);o!== ` folded ` &&t!==t J.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=m J( ` $ { v } $ { e } $ { p } ` ,l,f J,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function w J(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 x J(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?x J(a,t):C J(e,t,n,r);if(!s&&!u&&i!==t J.PLAIN&&a.includes( `
` ))return C J(e,t,n,r);if(_ J(a)){if(c=== ` ` )return t.forceBlockIndent=!0,C J(e,t,n,r);if(s&&c===l)return x J(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 x J(a,t)}return s?d:m J(d,c,d J,g J(t,!1))}function T J(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!==t J.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=t J.QUOTE_DOUBLE);let c=e=>{switch(e){case t J.BLOCK_FOLDED:case t J.BLOCK_LITERAL:return i||a?x J(o.value,t):C J(o,t,n,r);case t J.QUOTE_DOUBLE:return y J(o.value,t);case t J.QUOTE_SINGLE:return b J(o.value,t);case t J.PLAIN:return w J(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 E J(e,t){let n=Object.assign({blockQuote:!0,commentString:c J,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 D J(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(k q(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function O J(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(k q(e)||j q(e))&&e.anchor;a&&G q(a)&&(n.add(a),i.push( ` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function k J(e,t,n,r){if(O q(e))return e.toString(t,n,r);if(T q(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=M q(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=D J(t.doc.schema.tags,a);let o=O J(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):k q(a)?T J(a,t,n,r):a.toString(t,n,r);return o?k q(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function A J({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=M q(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(j q(e)||!M q(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||j q(e)||(k q(e)?e.type===t J.BLOCK_FOLDED||e.type===t J.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=k J(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+=u J(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=u J(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=u J(g,n.indent,l(f))));let _,v,y;M q(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&k q(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&A q(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=k J(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { lJ ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
` &&y&&(S= `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&M q(t)){let e=x[0],r=x.indexOf( `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&j q(t)){let e=x[0],r=x.indexOf( `
` ),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e=== ` & ` ||e=== ` ! ` )){let n=x.indexOf( ` ` );e=== ` & ` &&n!==-1&&n<r&&x[n+1]=== ` ! ` &&(n=x.indexOf( ` ` ,n+1)),(n===-1||r<n)&&(t=!0)}t||(S= ` \ n$ { n . indent } ` )}}else(x=== ` ` ||x[0]=== `
` )&&(S= ` ` );return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=d J(g,n.indent,l(y)):h&&i&&i(),g}function M J(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var N J= ` << ` ,P J={identify:e=>e===N J||typeof e== ` symbol ` &&e.description===N J,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new n J(Symbol(N J)),{addToJSMap:I J}),stringify:()=>N J},F J=(e,t)=>(P J.identify(t)||A q(t)&&(!t.type||t.type===n J.PLAIN)&&P J.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===P J.tag&&e.default);function I J(e,t,n){let r=R J(e,n);if(j q(r))for(let n of r.items)L J(e,t,n);else if(Array.isArray(r))for(let n of r)L J(e,t,n);else L J(e,t,r)}function L J(e,t,n){let r=R J(e,n);if(!O q(r))throw Error( ` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function R J(e,t){return e&&E q(t)?t.resolve(e.doc,e):t}function z J(e,t,{key:n,value:r}){if(N q(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(F J(e,n))I J(e,t,r);else{let i=Z q(n, ` ` ,e);if(t instanceof Map)t.set(i,Z q(r,i,e));else if(t instanceof Set)t.add(i);else{let a=B J(n,i,e),o=Z q(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function B J(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(N q(e)&&n?.doc){let t=D J(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)+ ` ... " ` ),M J(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 V J(e,t,n){return new H J(a J(e,void 0,n),a J(t,void 0,n))}var H J=class e{constructor(e,t=null){Object.defineProperty(this,T q,{value:S q}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return N q(n)&&(n=n.clone(t)),N q(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return z J(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?j J(this,e,t,n):JSON.stringify(this)}};function U J(e,t,n){return(t.inFlow??e.flow?G J:W J)(e,t,n)}function W J({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(N q(i))!d&&i.spaceBefore&&f.push( ` ` ),K J(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(k q(i)){let e=N q(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),K J(n,f,e.commentBefore,d))}d=!1;let s=A J(i,u,()=>o=null,()=>d=!0);o&&(s+=d J(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+=u J(g,n.indent,l(y)):h&&i&&i(),g}function j J(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var M J= ` << ` ,N J={identify:e=>e===M J||typeof e== ` symbol ` &&e.description===M J,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new t J(Symbol(M J)),{addToJSMap:F J}),stringify:()=>M J},P J=(e,t)=>(N J.identify(t)||k q(t)&&(!t.type||t.type===t J.PLAIN)&&N J.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===N J.tag&&e.default);function F J(e,t,n){let r=L J(e,n);if(A q(r))for(let n of r.items)I J(e,t,n);else if(Array.isArray(r))for(let n of r)I J(e,t,n);else I J(e,t,r)}function I J(e,t,n){let r=L J(e,n);if(!D q(r))throw Error( ` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function L J(e,t){return e&&T q(t)?t.resolve(e.doc,e):t}function R J(e,t,{key:n,value:r}){if(M q(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(P J(e,n))F J(e,t,r);else{let i=X q(n, ` ` ,e);if(t instanceof Map)t.set(i,X q(r,i,e));else if(t instanceof Set)t.add(i);else{let a=z J(n,i,e),o=X q(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function z J(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(M q(e)&&n?.doc){let t=E J(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)+ ` ... " ` ),j J(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 B J(e,t,n){return new V J(i J(e,void 0,n),i J(t,void 0,n))}var V J=class e{constructor(e,t=null){Object.defineProperty(this,w q,{value:x q}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return M q(n)&&(n=n.clone(t)),M q(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return R J(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?A J(this,e,t,n):JSON.stringify(this)}};function H J(e,t,n){return(t.inFlow??e.flow?W J:U J)(e,t,n)}function U J({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(M q(i))!d&&i.spaceBefore&&f.push( ` ` ),G J(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(O q(i)){let e=M q(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),G J(n,f,e.commentBefore,d))}d=!1;let s=k J(i,u,()=>o=null,()=>d=!0);o&&(s+=u J(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+= `
` +u J(l(e),c),s&&s()):d&&o&&o(),p}function G J({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(N q(i))i.spaceBefore&&d.push( ` ` ),K J(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(k q(i)){let e=N q(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),K J(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=N q(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=A J(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+=d J(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 KJ({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=uJ(t(r),e);n.push(i.trimStart())}}function qJ(e,t){let n=Aq(t)?t.value:t;for(let r of e)if(kq(r)&&(r.key===t||r.key===n||Aq(r.key)&&r.key.value===n))return r}var JJ=class extends cJ{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(xq,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(VJ(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=kq(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new HJ(e,e?.value):new HJ(e.key,e.value);let r=qJ(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );Aq(r.value)&&tJ(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=qJ(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=qJ(this.items,e)?.value;return(!t&&Aq(n)?n.value:n)??void 0}has(e){return!!qJ(this.items,e)}set(e,t){this.add(new HJ(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)zJ(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!kq(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})),UJ(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},YJ={collection: ` map ` ,default:!0,nodeClass:JJ,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return Oq(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>JJ.from(e,t,n)},XJ=class extends cJ{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(wq,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=ZJ(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=ZJ(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&Aq(r)?r.value:r}has(e){let t=ZJ(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=ZJ(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];Aq(r)&&tJ(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(Zq(e,String(r++),t));return n}toString(e,t,n){return e?UJ(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(aJ(a,void 0,n))}}return i}};function ZJ(e){let t=Aq(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var QJ={collection: ` seq ` ,default:!0,nodeClass:XJ,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return jq(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>XJ.from(e,t,n)}, $ J={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),EJ(e,t,n,r)}},eY={identify:e=>e==null,createNode:()=>new nJ(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new nJ(null),stringify:({source:e},t)=>typeof e== ` string ` &&eY.test.test(e)?e:t.options.nullStr},tY={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new nJ(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&tY.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function nY({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 rY={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:nY},iY={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 EJ({comment:e,type:t,value:s},r,i,a)}};function vY(e,t){if(jq(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!kq(r)){if(Oq(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new HJ(new nJ(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]=kq(r)?r:new HJ(r)}}else t( ` Expected a sequence for this tag ` );return e}function yY(e,t,n){let{replacer:r}=n,i=new XJ(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(VJ(o,s,n))}return i}var bY={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:vY,createNode:yY},xY=class e extends XJ{constructor(){super(),this.add=JJ.prototype.add.bind(this),this.delete=JJ.prototype.delete.bind(this),this.get=JJ.prototype.get.bind(this),this.has=JJ.prototype.has.bind(this),this.set=JJ.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(kq(e)?(r=Zq(e.key, ` ` ,t),i=Zq(e.value,r,t)):r=Zq(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=yY(e,t,n),i=new this;return i.items=r.items,i}};xY.tag= ` tag : yaml . org , 2002 : omap ` ;var SY={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:xY,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=vY(e,t),r=[];for(let{key:e}of n.items)Aq(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new xY,n)},createNode:(e,t,n)=>xY.from(e,t,n)};function CY({value:e,source:t},n){return t&&(e?wY:TY).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var wY={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 nJ(!0),stringify:CY},TY={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 nJ(!1),stringify:CY},EY={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:nY},DY={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():nY(e)}},OY={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 nJ(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:nY},kY=e=>typeof e== ` bigint ` ||Number.isInteger(e);function AY(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 jY(e,t,n){let{value:r}=e;if(kY(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return nY(e)}var MY={identify:kY,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>AY(e,2,2,n),stringify:e=>jY(e,2, ` 0 b ` )},NY={identify:kY,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>AY(e,1,8,n),stringify:e=>jY(e,8, ` 0 ` )},PY={identify:kY,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>AY(e,0,10,n),stringify:nY},FY={identify:kY,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>AY(e,2,16,n),stringify:e=>jY(e,16, ` 0 x ` )},IY=class e extends JJ{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=kq(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new HJ(e.key,null):new HJ(e,null),qJ(this.items,t.key)||this.items.push(t)}get(e,t){let n=qJ(this.items,e);return!t&&kq(n)?Aq(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=qJ(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new HJ(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(u J(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(u J(a(t), ` ` )))}return n.join( `
` +l J(l(e),c),s&&s()):d&&o&&o(),p}function W J({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(M q(i))i.spaceBefore&&d.push( ` ` ),G J(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(O q(i)){let e=M q(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),G J(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=M q(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=k J(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+=u J(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 GJ({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=lJ(t(r),e);n.push(i.trimStart())}}function KJ(e,t){let n=kq(t)?t.value:t;for(let r of e)if(Oq(r)&&(r.key===t||r.key===n||kq(r.key)&&r.key.value===n))return r}var qJ=class extends sJ{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(bq,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(BJ(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=Oq(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new VJ(e,e?.value):new VJ(e.key,e.value);let r=KJ(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );kq(r.value)&&eJ(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=KJ(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=KJ(this.items,e)?.value;return(!t&&kq(n)?n.value:n)??void 0}has(e){return!!KJ(this.items,e)}set(e,t){this.add(new VJ(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)RJ(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Oq(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})),HJ(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},JJ={collection: ` map ` ,default:!0,nodeClass:qJ,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return Dq(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>qJ.from(e,t,n)},YJ=class extends sJ{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(Cq,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=XJ(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=XJ(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&kq(r)?r.value:r}has(e){let t=XJ(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=XJ(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];kq(r)&&eJ(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(Xq(e,String(r++),t));return n}toString(e,t,n){return e?HJ(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(iJ(a,void 0,n))}}return i}};function XJ(e){let t=kq(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var ZJ={collection: ` seq ` ,default:!0,nodeClass:YJ,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return Aq(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>YJ.from(e,t,n)},QJ={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),TJ(e,t,n,r)}}, $ J={identify:e=>e==null,createNode:()=>new tJ(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new tJ(null),stringify:({source:e},t)=>typeof e== ` string ` && $ J.test.test(e)?e:t.options.nullStr},eY={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new tJ(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&eY.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function tY({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 nY={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:tY},rY={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 TJ({comment:e,type:t,value:s},r,i,a)}};function _Y(e,t){if(Aq(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Oq(r)){if(Dq(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new VJ(new tJ(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]=Oq(r)?r:new VJ(r)}}else t( ` Expected a sequence for this tag ` );return e}function vY(e,t,n){let{replacer:r}=n,i=new YJ(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(BJ(o,s,n))}return i}var yY={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:_Y,createNode:vY},bY=class e extends YJ{constructor(){super(),this.add=qJ.prototype.add.bind(this),this.delete=qJ.prototype.delete.bind(this),this.get=qJ.prototype.get.bind(this),this.has=qJ.prototype.has.bind(this),this.set=qJ.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(Oq(e)?(r=Xq(e.key, ` ` ,t),i=Xq(e.value,r,t)):r=Xq(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=vY(e,t,n),i=new this;return i.items=r.items,i}};bY.tag= ` tag : yaml . org , 2002 : omap ` ;var xY={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:bY,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=_Y(e,t),r=[];for(let{key:e}of n.items)kq(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new bY,n)},createNode:(e,t,n)=>bY.from(e,t,n)};function SY({value:e,source:t},n){return t&&(e?CY:wY).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var CY={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 tJ(!0),stringify:SY},wY={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 tJ(!1),stringify:SY},TY={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:tY},EY={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():tY(e)}},DY={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 tJ(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:tY},OY=e=>typeof e== ` bigint ` ||Number.isInteger(e);function kY(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 AY(e,t,n){let{value:r}=e;if(OY(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return tY(e)}var jY={identify:OY,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>kY(e,2,2,n),stringify:e=>AY(e,2, ` 0 b ` )},MY={identify:OY,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>kY(e,1,8,n),stringify:e=>AY(e,8, ` 0 ` )},NY={identify:OY,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>kY(e,0,10,n),stringify:tY},PY={identify:OY,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>kY(e,2,16,n),stringify:e=>AY(e,16, ` 0 x ` )},FY=class e extends qJ{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Oq(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new VJ(e.key,null):new VJ(e,null),KJ(this.items,t.key)||this.items.push(t)}get(e,t){let n=KJ(this.items,e);return!t&&Oq(n)?kq(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=KJ(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new VJ(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return s
Line truncated
` )?(n.push( ` ... ` ),n.push(l J(t, ` ` ))):n.push( ` ... $ { t } ` )}else n.push( ` ... ` )}else{let t=e.comment;t&&o&&(t=t.replace(/^ \n +/, ` ` )),t&&((!o||s)&&n[n.length-1]!== ` ` &&n.push( ` ` ),n.push(l J(a(t), ` ` )))}return n.join( `
` )+ `
` }var Z Y=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,T q,{value:b q});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new G q({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[T q]:{value:b q}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=N q(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){Q Y(this.contents)&&this.contents.add(e)}addIn(e,t){Q Y(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=q q(this);e.anchor=!t||n.has(t)?J q(t|| ` a ` ,n):t}return new $ q(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=Y q(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=a J(e,l,p);return o&&M q(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new H J(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return Q Y(this.contents)?this.contents.delete(e):!1}deleteIn(e){return s J(e)?this.contents!=null&&(this.contents=null,!0):Q Y(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return M q(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return s J(e)?!t&&A q(this.contents)?this.contents.value:this.contents:M q(this.contents)?this.contents.getIn(e,t):void 0}has(e){return M q(this.contents)?this.contents.has(e):!1}hasIn(e){return s J(e)?this.contents!==void 0:M q(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=o J(this.schema,[e],t):Q Y(this.contents)&&this.contents.set(e,t)}setIn(e,t){s J(e)?this.contents=t:this.contents==null?this.contents=o J(this.schema,Array.from(e),t):Q Y(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 G q({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new G q({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new Y Y(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=Z q(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?X q(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return X Y(this,e)}};function Q Y(e){if(M q(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var $ Y=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},eX =class extends $ Y{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},t X=class extends $ Y{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},n X=(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 r X(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 i X(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(i X(t.key)||i X(t.value))return!0}return!1;default:return!0}}function a X(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&i X(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function o X(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||A q(e)&&A q(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var s X= ` All mapping items must start at the same column ` ;function c X({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??J J)(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=r X(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 ` ,s X)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||i X(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 ` ,s X);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&a X(r.indent,u,i),n.atKey=!1,o X(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=r X(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&&a X(r.indent,f,i),s=c.range[2];let l=new H J(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new H J(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c, ` IMPOSSIBLE ` , ` Map comment with trailing content ` ),o.range=[r.offset,s,c??s],o}function l X({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??X J)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=r X(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&&a X(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function u X(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 d X= ` Block collections are not allowed within flow collections ` ,f X=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function p X({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?J J:X J))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=r X(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&&i X(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];k q(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],f X(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,d X)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);f X(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,d X),n.atKey=!1;let _=r X(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?f X(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,d X):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new H J(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;o X(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new J J(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=u X(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 m X(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?c X(e,t,n,r,a):n.type=== ` block - seq ` ?l X(e,t,n,r,a):p X(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function h X(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===J J.tagName&&s=== ` map ` ||o===X J.tagName&&s=== ` seq ` )return m X(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),m X(e,t,n,i,o)}let l=m X(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=N q(u)?u:new n J(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function g X(e,t,n){let r=t.offset,i=_ X(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?n J.BLOCK_FOLDED:n J.BLOCK_LITERAL,o=t.source?v X(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t=== ` ` ||t=== ` \ r ` )s=e;else break}if(s===0){let e=i.chomp=== ` + ` &&o.length>0? `
` }var X Y=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,w q,{value:y q});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new W q({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[w q]:{value:y q}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=M q(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){Z Y(this.contents)&&this.contents.add(e)}addIn(e,t){Z Y(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=K q(this);e.anchor=!t||n.has(t)?q q(t|| ` a ` ,n):t}return new Q q(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=J q(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=i J(e,l,p);return o&&j q(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new V J(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return Z Y(this.contents)?this.contents.delete(e):!1}deleteIn(e){return o J(e)?this.contents!=null&&(this.contents=null,!0):Z Y(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return j q(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return o J(e)?!t&&k q(this.contents)?this.contents.value:this.contents:j q(this.contents)?this.contents.getIn(e,t):void 0}has(e){return j q(this.contents)?this.contents.has(e):!1}hasIn(e){return o J(e)?this.contents!==void 0:j q(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=a J(this.schema,[e],t):Z Y(this.contents)&&this.contents.set(e,t)}setIn(e,t){o J(e)?this.contents=t:this.contents==null?this.contents=a J(this.schema,Array.from(e),t):Z Y(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 W q({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new W q({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new J Y(Object.assign(n,t));else throw Error( ` With a null YAML version , the { schema : Schema } option is required ` )}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r== ` number ` ?r:100},s=X q(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?Y q(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return Y Y(this,e)}};function Z Y(e){if(j q(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var Q Y=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}, $ Y =class extends Q Y{constructor(e,t,n){super(` YAMLParseError ` ,e,t,n)}},e X=class extends Q Y{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},t X=(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 n X(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 r X(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(r X(t.key)||r X(t.value))return!0}return!1;default:return!0}}function i X(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&r X(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function a X(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||k q(e)&&k q(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var o X= ` All mapping items must start at the same column ` ;function s X({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??q J)(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=n X(l,{indicator: ` explicit - key - ind ` ,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type=== ` block - seq ` ?i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` A block sequence may not be used as an implicit map key ` ): ` indent ` in u&&u.indent!==r.indent&&i(s, ` BAD _INDENT ` ,o X)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||r X(u))&&i(u??l[l.length-1], ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys need to be on a single line ` )}else p.found?.indent!==r.indent&&i(s, ` BAD _INDENT ` ,o X);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&i X(r.indent,u,i),n.atKey=!1,a X(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=n X(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&&i X(r.indent,f,i),s=c.range[2];let l=new V J(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new V J(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c, ` IMPOSSIBLE ` , ` Map comment with trailing content ` ),o.range=[r.offset,s,c??s],o}function c X({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??Y J)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=n X(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&&i X(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function l X(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 u X= ` Block collections are not allowed within flow collections ` ,d X=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function f X({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?q J:Y J))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=n X(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&&r X(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];O q(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],d X(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,u X)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);d X(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,u X),n.atKey=!1;let _=n X(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?d X(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,u X):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new V J(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;a X(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new q J(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=l X(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 p X(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?s X(e,t,n,r,a):n.type=== ` block - seq ` ?c X(e,t,n,r,a):f X(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function m X(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===q J.tagName&&s=== ` map ` ||o===Y J.tagName&&s=== ` seq ` )return p X(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),p X(e,t,n,i,o)}let l=p X(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=M q(u)?u:new t J(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function h X(e,t,n){let r=t.offset,i=g X(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?t J.BLOCK_FOLDED:t J.BLOCK_LITERAL,o=t.source?_ X(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===n J.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===t J.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ):t.length>c||r[0]=== ` ` ?(f=== ` ` ?f= `
` :!p&&f=== `
` &&(f= `
@@ -81,47 +81,47 @@ $&`).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 _ X({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 v X(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 y X(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=n J.PLAIN,c=b X(a,l);break;case ` single - quoted - scalar ` :s=n J.QUOTE_SINGLE,c=x X(a,l);break;case ` double - quoted - scalar ` :s=n J.QUOTE_DOUBLE,c=C X(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=u X(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function b X(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 } ` ) , SX ( e ) } function xX ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , SX ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function SX ( 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 g X({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 _ X(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 v X(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=t J.PLAIN,c=y X(a,l);break;case ` single - quoted - scalar ` :s=t J.QUOTE_SINGLE,c=b X(a,l);break;case ` double - quoted - scalar ` :s=t J.QUOTE_DOUBLE,c=S X(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=l X(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function y X(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 } ` ) , xX ( e ) } function bX ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , xX ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function xX ( 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 C X(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 S X(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}=w X(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=T X[i];if(a)n+=a;else if(i=== `
` ){let{fold:t,offset:i}=C X(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=w X[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+=E X(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+=T X(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 w X(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 C X(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 T X={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function EX ( 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 DX ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? gX ( e , t , r ) : yX ( 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 [ Cq ] : c ? OX ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? kX ( e , i , t , r ) : e . schema [ Cq ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = Aq ( a ) ? a : new nJ ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new nJ ( 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 OX ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ Cq ] ; 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 [ Cq ] ) } function kX ( { 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 [ Cq ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ Cq ] ; 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 AX ( 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 jX = { composeNode : MX , composeEmptyNode : NX } ; function MX ( 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 = PX ( 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 = DX ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = hX ( jX , 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 ? ? = NX ( 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 && ( ! Aq ( 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 NX ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = DX ( e , { type : ` scalar ` , offset : AX ( 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 PX ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new $q ( 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 = uX ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function FX ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new ZY ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = rX ( 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 ? MX ( c , i , l , o ) : NX ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = uX ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function IX ( 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 LX ( 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 w X={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function TX ( 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 EX ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? hX ( e , t , r ) : vX ( 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 [ Sq ] : c ? DX ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? OX ( e , i , t , r ) : e . schema [ Sq ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = kq ( a ) ? a : new tJ ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new tJ ( 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 DX ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ Sq ] ; 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 [ Sq ] ) } function OX ( { 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 [ Sq ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ Sq ] ; 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 kX ( 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 AX = { composeNode : jX , composeEmptyNode : MX } ; function jX ( 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 = NX ( 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 = EX ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = mX ( AX , 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 ? ? = MX ( 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 && ( ! kq ( 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 MX ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = EX ( e , { type : ` scalar ` , offset : kX ( 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 NX ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new Qq ( 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 = lX ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function PX ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new XY ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = nX ( 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 ? jX ( c , i , l , o ) : MX ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = lX ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function FX ( 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 IX ( 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 R X=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=I X(e);r?this.warnings.push(new t X(i,t,n)):this.errors.push(new eX (i,t,n))},this.directives=new G q({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=L X(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(M q(i)&&!i.flow&&i.items.length>0){let e=i.items[0];k q(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:L X(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=I X(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=F X(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 eX(I X(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 eX(I X(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=u X(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 eX(I X(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 Z Y(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}}},z X=Symbol( ` break visit ` ),B X=Symbol( ` skip children ` ),V X=Symbol( ` remove item ` );function H X(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),U X(Object.freeze([]),e,t)}H X.BREAK=z X,H X.SKIP=B X,H X.REMOVE=V X,H X.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},H X.parentCollection=(e,t)=>{let n=H X.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&& ` items ` in i)return i;throw Error( ` Parent collection not found ` )};function U X(e,t,n){let r=n(t,e);if(typeof r== ` symbol ` )return r;for(let i of[ ` key ` , ` value ` ]){let a=t[i];if(a&& ` items ` in a){for(let t=0;t<a.items.length;++t){let r=U X(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===z X)return z X;else r===V X&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function W X(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 L X=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=F X(e);r?this.warnings.push(new e X(i,t,n)):this.errors.push(new $ Y (i,t,n))},this.directives=new W q({version:e.version||` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=I X(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(j q(i)&&!i.flow&&i.items.length>0){let e=i.items[0];O q(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:I X(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=F X(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=P X(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 $ Y(F X(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 $ Y(F X(e),` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=l X(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 $ Y(F X(e),` UNEXPECTED _TOKEN ` , ` Unsupported token $ { e . type } ` ))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new X Y(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}}},R X=Symbol( ` break visit ` ),z X=Symbol( ` skip children ` ),B X=Symbol( ` remove item ` );function V X(e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),H X(Object.freeze([]),e,t)}V X.BREAK=R X,V X.SKIP=z X,V X.REMOVE=B X,V X.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},V X.parentCollection=(e,t)=>{let n=V X.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 H X(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=H X(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===R X)return R X;else r===B X&&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function U X(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 G X(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var K X=new Set( ` 0123456789 ABCDEFabcdef ` ),q X=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , J X = n e w S e t ( ` , [ ] { } ` ) , Y X = n e w S e t ( ` , [ ] { }
\ r ` ),X X=e=>!e||Y X.has(e),Z X=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 W X(e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var G X=new Set( ` 0123456789 ABCDEFabcdef ` ),K X=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , q X = n e w S e t ( ` , [ ] { } ` ) , J X = n e w S e t ( ` , [ ] { }
\ r ` ),Y X=e=>!e||J X.has(e),X X=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=== ` ... ` )&&G X(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=== ` ... ` )&&G X(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&&!G X(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=== ` : ` )&&G X(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(X X), ` 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(`...`))&&G X(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(X X),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||G X(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=== ` ... ` )&&W X(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=== ` ... ` )&&W X(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&&!W X(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=== ` : ` )&&W X(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e, ` block - start ` }return ` doc ` }*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext( ` doc ` );let t=yield*this.pushIndicators();switch(e[t]){case ` # ` :yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case ` { ` :case ` [ ` :return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1, ` flow ` ;case ` } ` :case ` ] ` :return yield*this.pushCount(1), ` doc ` ;case ` * ` :return yield*this.pushUntil(Y X), ` 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(`...`))&&W X(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield` `,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(Y X),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||W X(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=>G X(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=>W X(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(G X(r)||e&&J X.has(r))break;t=n}else if(G X(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(W X(r)||e&&q X.has(r))break;t=n}else if(W X(r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` ?(n+=1,r= `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&J X.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&J X.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(X X),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(G X(n)||t&&J X.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(;!G X(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(q X.has(t))t=this.buffer[++e];else if(t=== ` % ` &&K X.has(this.buffer[e+1])&&K X.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&&q X.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&q X.has(r))break;t=n}return!r&&!this.atEnd?this.setNext( ` plain - scalar ` ):(yield ` ` ,yield*this.pushToIndex(t+1,!0),e? ` flow ` : ` doc ` )}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield ` ` ),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case ` ! ` :e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case ` & ` :e+=yield*this.pushUntil(Y X),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(W X(n)||t&&q X.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(;!W X(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(K X.has(t))t=this.buffer[++e];else if(t=== ` % ` &&G X.has(this.buffer[e+1])&&G X.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)}},QX=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 $ X(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function eZ(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 tZ(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 nZ(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 rZ(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 iZ(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 aZ(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&! $ X(t.start, ` explicit - key - ind ` )&&! $ X(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,tZ(t.value)?t.value.end?iZ(t.value.end,t.sep):t.value.end=t.sep:iZ(t.start,t.sep),delete t.sep)}var oZ=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 ZX,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=WX(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});return}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 ` &&aZ(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&&eZ(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.i
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)}},ZX=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 QX(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function $ X(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 eZ(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 tZ(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 nZ(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 rZ(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 iZ(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!QX(t.start, ` explicit - key - ind ` )&&!QX(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,eZ(t.value)?t.value.end?rZ(t.value.end,t.sep):t.value.end=t.sep:rZ(t.start,t.sep),delete t.sep)}var aZ=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 XX,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=UX(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});return}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 ` &&iZ(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&& $ X(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.i
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)){iZ(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( $ X(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=rZ(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( $ X(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(tZ(t.key)&&! $ X(t.sep, ` newline ` )){let e=rZ(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]}): $ X(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&&! $ X(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)){iZ(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|| $ X(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)){rZ(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(QX(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=nZ(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(QX(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(eZ(t.key)&&!QX(t.sep, ` newline ` )){let e=nZ(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]}):QX(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&&!QX(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)){rZ(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||QX(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=r Z(n Z(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=r Z(n Z(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 s Z(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Q X||null,prettyErrors:t}}function c Z(e,t={}){let{lineCounter:n,prettyErrors:r}=s Z(t),i=new o Z(n?.addNewLine),a=new R X(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 eX (t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(n X(e,n)),o.warnings.forEach(n X(e,n))),o}function l Z(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function u Z(e){let t=c Z(e),n=t.errors[0];if(n)return{ok:!1,message:y Z(n.message),line:n.linePos?.[0]?.line};let r=t.toJS();if(!b Z(r))return{ok:!1,message: ` A workflow is a mapping with an id and steps . ` };let i=typeof r.id== ` string ` ?r.id.trim(): ` ` ;if(!i)return{ok:!1,message: ` workflow id is required ` };let a=r.steps;if(a==null||a=== ` ` )return{ok:!1,message: ` workflow $ { i } has no steps ` };if(!Array.isArray(a))return{ok:!1,message: ` workflow $ { i } : steps must be a list ` };if(!a.length)return{ok:!1,message: ` workflow $ { i } has no steps ` };let o=[];for(let[e,t]of a.entries()){if(!b Z(t)||!x Z(t.type))return{ok:!1,message: ` workflow $ { i } step $ { e + 1 } needs a type ` };o.push({index:e+1,type:t.type.trim()})}return{ok:!0,id:i,steps:o}}function d Z(e){switch(e){case ` key ` :return ` text - fg - muted ` ;case ` string ` :return ` text - ok ` ;case ` comment ` :case ` punct ` :return ` text - fg - subtle ` ;default:return ` text - foreground ` }}function f Z(e){return e.split( `
` ).map((e,t)=>({number:t+1,text:e,tokens:h Z(e)}))}var p Z=/^( \s *)(- \s +)?/,m Z=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function h Z(e){let{code:t,comment:n}=g Z(e),r=_ Z(t);return n&&r.push({text:n,kind: ` comment ` }),r}function g Z(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t){r===t&&(t= ` ` );continue}if(r=== ` "`||r===`'`){t=r;continue}if(r===`#`&&(n===0||/\s/.test(e[n-1]??``)))return{code:e.slice(0,n),comment:e.slice(n)}}return{code:e,comment:``}}function _ Z(e){if(!e)return[];let t=[],n=p Z.exec(e);n?.[1]&&t.push({text:n[1],kind:`plain`}),n?.[2]&&t.push({text:n[2],kind:`punct`});let r=e.slice(n?.[0].length??0);if(!r)return t;let i=m Z.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,...v Z(i[4]??``)]):[...t,...v Z(r)]}function v Z(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 yZ ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function bZ(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function xZ(e){return typeof e== ` string ` &&e.trim()!== ` ` }var SZ={class: ` space - y - 1.5 ` },CZ={class: ` space - y - 1.5 ` },wZ={class: ` flex h - 9 flex - nowrap items - center gap - 1.5 overflow - hidden ` ,role: ` list ` ,"aria-label": ` Steps ` },TZ=[ ` title ` ],EZ={key:1,class: ` text - xs text - fg - subtle ` },DZ={class: ` space - y - 1.5 ` },OZ={class: ` flex items - baseline gap - 2 ` },kZ={class: ` relative overflow - hidden rounded - lg border border - input font - mono text - [ 13 px ] leading - 6 focus - within : border - ring focus - within : ring - 3 focus - within : ring - ring / 50 ` },AZ={"aria-hidden": ` true ` ,class: ` pointer - events - none absolute inset - y - 0 left - 0 w - 11 select - none overflow - hidden border - r border - border bg - secondary / 40 py - 3 text - right ` },jZ={"aria-hidden": ` true ` ,class: ` pointer - events - none absolute inset - 0 overflow - hidden py - 3 pr - 3 pl - 14 break - words whitespace - pre - wrap ` },MZ={key:0,class: ` text - sm text - danger ` ,role: ` alert ` },NZ={class: ` flex flex - wrap items - center gap - 2 border - t border - border pt - 4 ` },PZ={key:0,class: ` mr - auto font - mono text - xs text - fg - subtle ` },FZ=M({__name: ` WorkflowEditor ` ,props:{selected:{required:!0},selectedModifiers:{}},emits:[ ` update : selected ` ],setup(e){let t=XA(),n=W(()=>t.stateFor( ` workflow - definitions ` )),r=W(()=>n.value.resource?.value??{definitions:[]}),i=W(()=>t.shippedWorkflows()),a=co(e, ` selected ` ),o=O( ` ` ),s=O( ` ` ),c=O( ` ` ),l=W(()=>i.value.definitions.find(e=>e.id===o.value));function u(e){let t=r.value.definitions.find(t=>t.id===e);o.value=t?.id??e,s.value=t?.yaml?? ` id : $ { e } \ nsteps : \ n - type : ` ,c.value= ` ` }j(a,u,{immediate:!0}),j(r,()=>{s.value||u(a.value)});async function d(e){return c.value= ` ` ,t.replace( ` workflow - definitions ` ,e)}async function f(){let e=o.value.trim();if(!e){c.value= ` Workflow ID is required . ` ;return}let t=a.value,n=r.value;t&&t!==e&&(n=JA(n,t)),await d(qA(n,{id:e,yaml:s.value}))&&(a.value=e)}async function p(){a.value&&await d(JA(r.value,a.value))&&(a.value= ` ` ,o.value= ` ` ,s.value= ` ` )}async function m(){l.value&&await d(qA(r.value,GA(l.value)))}let h=W(()=>uZ(s.value)),g=W(()=>h.value.ok?h.value.steps:[]),_=W(()=>fZ(s.value)),v=O(0);function y(e){v.value=e.target.scrollTop}return(e,t)=>(I(),L( ` form ` ,{class: ` space - y - 4 ` ,onSubmit:lu(f,[ ` prevent ` ])},[z( ` div ` ,SZ,[B(k(_T),{for: ` workflow - id ` },{default:A(()=>[...t[2]||=[V( ` ID ` ,-1)]]),_:1}),B(k(Z),{id: ` workflow - id ` ,modelValue:o.value,"onUpdate:modelValue":t[0]||=e=>o.value=e,name: ` workflow - id ` ,required: ` ` ,autocomplete: ` off ` ,class: ` max - w - sm font - mono ` },null,8,[ ` modelValue ` ])]),z( ` div ` ,CZ,[t[3]||=z( ` span ` ,{class: ` text - sm leading - none font - medium ` }, ` Steps ` ,-1),z( ` div ` ,wZ,[g.value.length?(I(!0),L(F,{key:0},N(g.value,(e,t)=>(I(),L(F,{key:e.index},[z( ` span ` ,{role: ` listitem ` ,class: ` shrink - 0 rounded border border - border bg - secondary px - 2 py - 0.5 font - mono text - xs ` ,title:e.type},D(e.type),9,TZ),t<g.value.length-1?(I(),R(k(yd),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` ,"aria-hidden": ` true ` })):H( ` ` ,!0)],64))),128)):(I(),L( ` span ` ,EZ, ` No steps yet ` ))])]),z( ` div ` ,DZ,[z( ` div ` ,OZ,[B(k(_T),{for: ` workflow - yaml ` },{default:A(()=>[...t[4]||=[V( ` YAML ` ,-1)]]),_:1}),z( ` span ` ,{class:E([ ` ml - auto text - xs ` ,h.value.ok? ` text - ok ` : ` text - danger ` ]),role: ` status ` },D(h.value.ok? ` ✓ ` : ` ✕ ` )+ ` ` +D(k(lZ)(h.value)),3)]),z( ` div ` ,kZ,[z( ` div ` ,AZ,[z( ` div ` ,{style:ve( ` transform : translateY ( $ { - v . value } px ) ` )},[(I(!0),L(F,null,N(_.value,e=>(I(),L( ` div ` ,{key:e.number,class: ` min - h - 6 pr - 2 text - fg - subtle ` },D(e.number),1))),128))],4)]),z( ` div ` ,jZ,[z( ` div ` ,{style:ve( ` transform : translateY ( $ { - v . value } px ) ` )},[(I(!0),L(F,null,N(_.value,e=>(I(),L( ` div ` ,{key:e.number,class: ` min - h - 6 ` },[(I(!0),L(F,null,N(e.tokens,(e,t)=>(I(),L( ` span ` ,{key:t,class:E(k(dZ)(e.kind))},D(e.text),3))),128))]))),128))],4)]),B(k(OT),{id: ` workflow - yaml ` ,modelValue:s.value,"onUpdate:modelValue":t[1]||=e=>s.value=e,name: ` workflow - yaml ` ,required: ` ` ,class: ` relative min - h - 96 resize - y rounded - none border - 0 bg - transparent py - 3 pr - 3 pl - 14 text - [ 13 px ] leading - 6 text - transparent caret - foreground shadow - none md : text - [ 13 px ] focus - visible : ring - 0 ` ,spellcheck: ` false ` ,onScroll:y},null,8,[ ` modelValue ` ])])]),c.value||n.value.error?(I(),L( ` p ` ,MZ,D(c.value||n.value.error),1)):H( ` ` ,!0),z( ` div ` ,NZ,[n.value.resource?(I(),L( ` span ` ,PZ, ` Version ` +D(n.value.resource.version),1)):H( ` ` ,!0),a.value?(I(),R(k(X),{key:1,type: ` button ` ,variant: ` ghost ` ,class: ` text - danger ` ,onClick:p},{default:A(()=>[B(k(rf)),t[5]||=V( ` Remove ` ,-1)]),_:1})):H( ` ` ,!0),l.value?(I(),R(k(X),{key:2,type: ` button ` ,variant: ` outline ` ,onClick:m},{default:A(()=>[B(k(Xd)),t[6]||=V( ` Restore this workflow ` ,-1)]),_:1})):H( ` ` ,!0),B(k(X),{type: ` submit ` ,disabled:n.value.saving||!h.value.ok},{default:A(()=>[n.value.saving?(I(),R(k(SF),{key:0,"data-icon": ` inline - start ` })):H( ` ` ,!0),t[7]||=V( ` Validate & save ` ,-1)]),_:1},8,[ ` disabled ` ])])],32))}});function IZ(e,t){let n=new Map((e||[]).map(e=>[e.workflow,e])),r=[],i=new Set;for(let e of t||[])i.add(e.id),r.push({...e,...n.get(e.id)||{workflow:e.id,runs:0,merged:0,completed:0}});for(let t of e||[])i.has(t.workflow)||r
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=n Z(t Z(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=n Z(t Z(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 o Z(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Z X||null,prettyErrors:t}}function s Z(e,t={}){let{lineCounter:n,prettyErrors:r}=o Z(t),i=new a Z(n?.addNewLine),a=new L X(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 $ Y (t.range.slice(0,2),` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(t X(e,n)),o.warnings.forEach(t X(e,n))),o}function c Z(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function l Z(e){let t=s Z(e),n=t.errors[0];if(n)return{ok:!1,message:v Z(n.message),line:n.linePos?.[0]?.line};let r=t.toJS();if(!y Z(r))return{ok:!1,message: ` A workflow is a mapping with an id and steps . ` };let i=typeof r.id== ` string ` ?r.id.trim(): ` ` ;if(!i)return{ok:!1,message: ` workflow id is required ` };let a=r.steps;if(a==null||a=== ` ` )return{ok:!1,message: ` workflow $ { i } has no steps ` };if(!Array.isArray(a))return{ok:!1,message: ` workflow $ { i } : steps must be a list ` };if(!a.length)return{ok:!1,message: ` workflow $ { i } has no steps ` };let o=[];for(let[e,t]of a.entries()){if(!y Z(t)||!b Z(t.type))return{ok:!1,message: ` workflow $ { i } step $ { e + 1 } needs a type ` };o.push({index:e+1,type:t.type.trim()})}return{ok:!0,id:i,steps:o}}function u Z(e){switch(e){case ` key ` :return ` text - fg - muted ` ;case ` string ` :return ` text - ok ` ;case ` comment ` :case ` punct ` :return ` text - fg - subtle ` ;default:return ` text - foreground ` }}function d Z(e){return e.split( `
` ).map((e,t)=>({number:t+1,text:e,tokens:m Z(e)}))}var f Z=/^( \s *)(- \s +)?/,p Z=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function m Z(e){let{code:t,comment:n}=h Z(e),r=g Z(t);return n&&r.push({text:n,kind: ` comment ` }),r}function h Z(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t){r===t&&(t= ` ` );continue}if(r=== ` "`||r===`'`){t=r;continue}if(r===`#`&&(n===0||/\s/.test(e[n-1]??``)))return{code:e.slice(0,n),comment:e.slice(n)}}return{code:e,comment:``}}function g Z(e){if(!e)return[];let t=[],n=f Z.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=p Z.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,..._ Z(i[4]??``)]):[...t,..._ Z(r)]}function _ Z(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 vZ ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function yZ(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function bZ(e){return typeof e== ` string ` &&e.trim()!== ` ` }var xZ={class: ` space - y - 1.5 ` },SZ={class: ` space - y - 1.5 ` },CZ={class: ` flex h - 9 flex - nowrap items - center gap - 1.5 overflow - hidden ` ,role: ` list ` ,"aria-label": ` Steps ` },wZ=[ ` title ` ],TZ={key:1,class: ` text - xs text - fg - subtle ` },EZ={class: ` space - y - 1.5 ` },DZ={class: ` flex items - baseline gap - 2 ` },OZ={class: ` relative overflow - hidden rounded - lg border border - input font - mono text - [ 13 px ] leading - 6 focus - within : border - ring focus - within : ring - 3 focus - within : ring - ring / 50 ` },kZ={"aria-hidden": ` true ` ,class: ` pointer - events - none absolute inset - y - 0 left - 0 w - 11 select - none overflow - hidden border - r border - border bg - secondary / 40 py - 3 text - right ` },AZ={"aria-hidden": ` true ` ,class: ` pointer - events - none absolute inset - 0 overflow - hidden py - 3 pr - 3 pl - 14 break - words whitespace - pre - wrap ` },jZ={key:0,class: ` text - sm text - danger ` ,role: ` alert ` },MZ={class: ` flex flex - wrap items - center gap - 2 border - t border - border pt - 4 ` },NZ={key:0,class: ` mr - auto font - mono text - xs text - fg - subtle ` },PZ=M({__name: ` WorkflowEditor ` ,props:{selected:{required:!0},selectedModifiers:{}},emits:[ ` update : selected ` ],setup(e){let t=XA(),n=W(()=>t.stateFor( ` workflow - definitions ` )),r=W(()=>n.value.resource?.value??{definitions:[]}),i=W(()=>t.shippedWorkflows()),a=co(e, ` selected ` ),o=O( ` ` ),s=O( ` ` ),c=O( ` ` ),l=W(()=>i.value.definitions.find(e=>e.id===o.value));function u(e){let t=r.value.definitions.find(t=>t.id===e);o.value=t?.id??e,s.value=t?.yaml?? ` id : $ { e } \ nsteps : \ n - type : ` ,c.value= ` ` }j(a,u,{immediate:!0}),j(r,()=>{s.value||u(a.value)});async function d(e){return c.value= ` ` ,t.replace( ` workflow - definitions ` ,e)}async function f(){let e=o.value.trim();if(!e){c.value= ` Workflow ID is required . ` ;return}let t=a.value,n=r.value;t&&t!==e&&(n=JA(n,t)),await d(qA(n,{id:e,yaml:s.value}))&&(a.value=e)}async function p(){a.value&&await d(JA(r.value,a.value))&&(a.value= ` ` ,o.value= ` ` ,s.value= ` ` )}async function m(){l.value&&await d(qA(r.value,GA(l.value)))}let h=W(()=>lZ(s.value)),g=W(()=>h.value.ok?h.value.steps:[]),_=W(()=>dZ(s.value)),v=O(0);function y(e){v.value=e.target.scrollTop}return(e,t)=>(I(),L( ` form ` ,{class: ` space - y - 4 ` ,onSubmit:lu(f,[ ` prevent ` ])},[z( ` div ` ,xZ,[B(k(_T),{for: ` workflow - id ` },{default:A(()=>[...t[2]||=[V( ` ID ` ,-1)]]),_:1}),B(k(Z),{id: ` workflow - id ` ,modelValue:o.value,"onUpdate:modelValue":t[0]||=e=>o.value=e,name: ` workflow - id ` ,required: ` ` ,autocomplete: ` off ` ,class: ` max - w - sm font - mono ` },null,8,[ ` modelValue ` ])]),z( ` div ` ,SZ,[t[3]||=z( ` span ` ,{class: ` text - sm leading - none font - medium ` }, ` Steps ` ,-1),z( ` div ` ,CZ,[g.value.length?(I(!0),L(F,{key:0},N(g.value,(e,t)=>(I(),L(F,{key:e.index},[z( ` span ` ,{role: ` listitem ` ,class: ` shrink - 0 rounded border border - border bg - secondary px - 2 py - 0.5 font - mono text - xs ` ,title:e.type},D(e.type),9,wZ),t<g.value.length-1?(I(),R(k(yd),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` ,"aria-hidden": ` true ` })):H( ` ` ,!0)],64))),128)):(I(),L( ` span ` ,TZ, ` No steps yet ` ))])]),z( ` div ` ,EZ,[z( ` div ` ,DZ,[B(k(_T),{for: ` workflow - yaml ` },{default:A(()=>[...t[4]||=[V( ` YAML ` ,-1)]]),_:1}),z( ` span ` ,{class:E([ ` ml - auto text - xs ` ,h.value.ok? ` text - ok ` : ` text - danger ` ]),role: ` status ` },D(h.value.ok? ` ✓ ` : ` ✕ ` )+ ` ` +D(k(cZ)(h.value)),3)]),z( ` div ` ,OZ,[z( ` div ` ,kZ,[z( ` div ` ,{style:ve( ` transform : translateY ( $ { - v . value } px ) ` )},[(I(!0),L(F,null,N(_.value,e=>(I(),L( ` div ` ,{key:e.number,class: ` min - h - 6 pr - 2 text - fg - subtle ` },D(e.number),1))),128))],4)]),z( ` div ` ,AZ,[z( ` div ` ,{style:ve( ` transform : translateY ( $ { - v . value } px ) ` )},[(I(!0),L(F,null,N(_.value,e=>(I(),L( ` div ` ,{key:e.number,class: ` min - h - 6 ` },[(I(!0),L(F,null,N(e.tokens,(e,t)=>(I(),L( ` span ` ,{key:t,class:E(k(uZ)(e.kind))},D(e.text),3))),128))]))),128))],4)]),B(k(OT),{id: ` workflow - yaml ` ,modelValue:s.value,"onUpdate:modelValue":t[1]||=e=>s.value=e,name: ` workflow - yaml ` ,required: ` ` ,class: ` relative min - h - 96 resize - y rounded - none border - 0 bg - transparent py - 3 pr - 3 pl - 14 text - [ 13 px ] leading - 6 text - transparent caret - foreground shadow - none md : text - [ 13 px ] focus - visible : ring - 0 ` ,spellcheck: ` false ` ,onScroll:y},null,8,[ ` modelValue ` ])])]),c.value||n.value.error?(I(),L( ` p ` ,jZ,D(c.value||n.value.error),1)):H( ` ` ,!0),z( ` div ` ,MZ,[n.value.resource?(I(),L( ` span ` ,NZ, ` Version ` +D(n.value.resource.version),1)):H( ` ` ,!0),a.value?(I(),R(k(X),{key:1,type: ` button ` ,variant: ` ghost ` ,class: ` text - danger ` ,onClick:p},{default:A(()=>[B(k(rf)),t[5]||=V( ` Remove ` ,-1)]),_:1})):H( ` ` ,!0),l.value?(I(),R(k(X),{key:2,type: ` button ` ,variant: ` outline ` ,onClick:m},{default:A(()=>[B(k(Xd)),t[6]||=V( ` Restore this workflow ` ,-1)]),_:1})):H( ` ` ,!0),B(k(X),{type: ` submit ` ,disabled:n.value.saving||!h.value.ok},{default:A(()=>[n.value.saving?(I(),R(k(SF),{key:0,"data-icon": ` inline - start ` })):H( ` ` ,!0),t[7]||=V( ` Validate & save ` ,-1)]),_:1},8,[ ` disabled ` ])])],32))}});function FZ(e,t){let n=new Map((e||[]).map(e=>[e.workflow,e])),r=[],i=new Set;for(let e of t||[])i.add(e.id),r.push({...e,...n.get(e.id)||{workflow:e.id,runs:0,merged:0,completed:0}});for(let t of e||[])i.has(t.workflow)||r
Line truncated