@swifty.js/swifty 0.0.2-alpha → 0.0.3-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __swiftyCreateRequire } from "node:module";
3
+ const require = __swiftyCreateRequire(import.meta.url);
4
+ function $n(T){return T&&T.__esModule&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T}var P={},Ie={},Z={},un;function ae(){if(un)return Z;un=1;function T(a){return typeof a>"u"||a===null}function _(a){return typeof a=="object"&&a!==null}function I(a){return Array.isArray(a)?a:T(a)?[]:[a]}function L(a,s){if(s){let S=Object.keys(s);for(let l=0,c=S.length;l<c;l+=1){let C=S[l];a[C]=s[C]}}return a}function d(a,s){let S="";for(let l=0;l<s;l+=1)S+=a;return S}function y(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return Z.isNothing=T,Z.isObject=_,Z.toArray=I,Z.repeat=d,Z.isNegativeZero=y,Z.extend=L,Z}var Ye,fn;function he(){if(fn)return Ye;fn=1;function T(I,L){let d="",y=I.reason||"(unknown reason)";return I.mark?(I.mark.name&&(d+='in "'+I.mark.name+'" '),d+="("+(I.mark.line+1)+":"+(I.mark.column+1)+")",!L&&I.mark.snippet&&(d+=`
5
+
6
+ `+I.mark.snippet),y+" "+d):y}function _(I,L){Error.call(this),this.name="YAMLException",this.reason=I,this.mark=L,this.message=T(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return _.prototype=Object.create(Error.prototype),_.prototype.constructor=_,_.prototype.toString=function(L){return this.name+": "+T(this,L)},Ye=_,Ye}var Pe,pn;function Jn(){if(pn)return Pe;pn=1;let T=ae();function _(d,y,a,s,S){let l="",c="",C=Math.floor(S/2)-1;return s-y>C&&(l=" ... ",y=s-C+l.length),a-s>C&&(c=" ...",a=s+C-c.length),{str:l+d.slice(y,a).replace(/\t/g,"\u2192")+c,pos:s-y+l.length}}function I(d,y){return T.repeat(" ",y-d.length)+d}function L(d,y){if(y=Object.create(y||null),!d.buffer)return null;y.maxLength||(y.maxLength=79),typeof y.indent!="number"&&(y.indent=1),typeof y.linesBefore!="number"&&(y.linesBefore=3),typeof y.linesAfter!="number"&&(y.linesAfter=2);let a=/\r?\n|\r|\0/g,s=[0],S=[],l,c=-1;for(;l=a.exec(d.buffer);)S.push(l.index),s.push(l.index+l[0].length),d.position<=l.index&&c<0&&(c=s.length-2);c<0&&(c=s.length-1);let C="",k=Math.min(d.line+y.linesAfter,S.length).toString().length,R=y.maxLength-(y.indent+k+3);for(let M=1;M<=y.linesBefore&&!(c-M<0);M++){let U=_(d.buffer,s[c-M],S[c-M],d.position-(s[c]-s[c-M]),R);C=T.repeat(" ",y.indent)+I((d.line-M+1).toString(),k)+" | "+U.str+`
7
+ `+C}let X=_(d.buffer,s[c],S[c],d.position,R);C+=T.repeat(" ",y.indent)+I((d.line+1).toString(),k)+" | "+X.str+`
8
+ `,C+=T.repeat("-",y.indent+k+3+X.pos)+`^
9
+ `;for(let M=1;M<=y.linesAfter&&!(c+M>=S.length);M++){let U=_(d.buffer,s[c+M],S[c+M],d.position-(s[c]-s[c+M]),R);C+=T.repeat(" ",y.indent)+I((d.line+M+1).toString(),k)+" | "+U.str+`
10
+ `}return C.replace(/\n$/,"")}return Pe=L,Pe}var De,sn;function D(){if(sn)return De;sn=1;let T=he(),_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],I=["scalar","sequence","mapping"];function L(y){let a={};return y!==null&&Object.keys(y).forEach(function(s){y[s].forEach(function(S){a[String(S)]=s})}),a}function d(y,a){if(a=a||{},Object.keys(a).forEach(function(s){if(_.indexOf(s)===-1)throw new T('Unknown option "'+s+'" is met in definition of "'+y+'" YAML type.')}),this.options=a,this.tag=y,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(s){return s},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=L(a.styleAliases||null),I.indexOf(this.kind)===-1)throw new T('Unknown kind "'+this.kind+'" is specified for "'+y+'" YAML type.')}return De=d,De}var He,an;function vn(){if(an)return He;an=1;let T=he(),_=D();function I(y,a){let s=[];return y[a].forEach(function(S){let l=s.length;s.forEach(function(c,C){c.tag===S.tag&&c.kind===S.kind&&c.multi===S.multi&&(l=C)}),s[l]=S}),s}function L(){let y={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(s){s.multi?(y.multi[s.kind].push(s),y.multi.fallback.push(s)):y[s.kind][s.tag]=y.fallback[s.tag]=s}for(let s=0,S=arguments.length;s<S;s+=1)arguments[s].forEach(a);return y}function d(y){return this.extend(y)}return d.prototype.extend=function(a){let s=[],S=[];if(a instanceof _)S.push(a);else if(Array.isArray(a))S=S.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(s=s.concat(a.implicit)),a.explicit&&(S=S.concat(a.explicit));else throw new T("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");s.forEach(function(c){if(!(c instanceof _))throw new T("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&c.loadKind!=="scalar")throw new T("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new T("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),S.forEach(function(c){if(!(c instanceof _))throw new T("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(d.prototype);return l.implicit=(this.implicit||[]).concat(s),l.explicit=(this.explicit||[]).concat(S),l.compiledImplicit=I(l,"implicit"),l.compiledExplicit=I(l,"explicit"),l.compiledTypeMap=L(l.compiledImplicit,l.compiledExplicit),l},He=d,He}var je,hn;function Mn(){if(hn)return je;hn=1;let T=D();return je=new T("tag:yaml.org,2002:str",{kind:"scalar",construct:function(_){return _!==null?_:""}}),je}var Be,dn;function Fn(){if(dn)return Be;dn=1;let T=D();return Be=new T("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(_){return _!==null?_:[]}}),Be}var Ue,mn;function qn(){if(mn)return Ue;mn=1;let T=D();return Ue=new T("tag:yaml.org,2002:map",{kind:"mapping",construct:function(_){return _!==null?_:{}}}),Ue}var Ke,gn;function Yn(){if(gn)return Ke;gn=1;let T=vn();return Ke=new T({explicit:[Mn(),Fn(),qn()]}),Ke}var Ge,An;function Pn(){if(An)return Ge;An=1;let T=D();function _(d){if(d===null)return!0;let y=d.length;return y===1&&d==="~"||y===4&&(d==="null"||d==="Null"||d==="NULL")}function I(){return null}function L(d){return d===null}return Ge=new T("tag:yaml.org,2002:null",{kind:"scalar",resolve:_,construct:I,predicate:L,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),Ge}var We,yn;function Dn(){if(yn)return We;yn=1;let T=D();function _(d){if(d===null)return!1;let y=d.length;return y===4&&(d==="true"||d==="True"||d==="TRUE")||y===5&&(d==="false"||d==="False"||d==="FALSE")}function I(d){return d==="true"||d==="True"||d==="TRUE"}function L(d){return Object.prototype.toString.call(d)==="[object Boolean]"}return We=new T("tag:yaml.org,2002:bool",{kind:"scalar",resolve:_,construct:I,predicate:L,represent:{lowercase:function(d){return d?"true":"false"},uppercase:function(d){return d?"TRUE":"FALSE"},camelcase:function(d){return d?"True":"False"}},defaultStyle:"lowercase"}),We}var Qe,Cn;function Hn(){if(Cn)return Qe;Cn=1;let T=ae(),_=D();function I(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function L(l){return l>=48&&l<=55}function d(l){return l>=48&&l<=57}function y(l){if(l===null)return!1;let c=l.length,C=0,k=!1;if(!c)return!1;let R=l[C];if((R==="-"||R==="+")&&(R=l[++C]),R==="0"){if(C+1===c)return!0;if(R=l[++C],R==="b"){for(C++;C<c;C++){if(R=l[C],R!=="0"&&R!=="1")return!1;k=!0}return k&&isFinite(a(l))}if(R==="x"){for(C++;C<c;C++){if(!I(l.charCodeAt(C)))return!1;k=!0}return k&&isFinite(a(l))}if(R==="o"){for(C++;C<c;C++){if(!L(l.charCodeAt(C)))return!1;k=!0}return k&&isFinite(a(l))}}for(;C<c;C++){if(!d(l.charCodeAt(C)))return!1;k=!0}return k?isFinite(a(l)):!1}function a(l){let c=l,C=1,k=c[0];if((k==="-"||k==="+")&&(k==="-"&&(C=-1),c=c.slice(1),k=c[0]),c==="0")return 0;if(k==="0"){if(c[1]==="b")return C*parseInt(c.slice(2),2);if(c[1]==="x")return C*parseInt(c.slice(2),16);if(c[1]==="o")return C*parseInt(c.slice(2),8)}return C*parseInt(c,10)}function s(l){return a(l)}function S(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!T.isNegativeZero(l)}return Qe=new _("tag:yaml.org,2002:int",{kind:"scalar",resolve:y,construct:s,predicate:S,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Qe}var Ve,Sn;function jn(){if(Sn)return Ve;Sn=1;let T=ae(),_=D(),I=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),L=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function d(l){return l===null||!I.test(l)?!1:isFinite(parseFloat(l,10))?!0:L.test(l)}function y(l){let c=l.toLowerCase(),C=c[0]==="-"?-1:1;return"+-".indexOf(c[0])>=0&&(c=c.slice(1)),c===".inf"?C===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:c===".nan"?NaN:C*parseFloat(c,10)}let a=/^[-+]?[0-9]+e/;function s(l,c){if(isNaN(l))switch(c){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(c){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(c){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(T.isNegativeZero(l))return"-0.0";let C=l.toString(10);return a.test(C)?C.replace("e",".e"):C}function S(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||T.isNegativeZero(l))}return Ve=new _("tag:yaml.org,2002:float",{kind:"scalar",resolve:d,construct:y,predicate:S,represent:s,defaultStyle:"lowercase"}),Ve}var Xe,Tn;function Bn(){return Tn||(Tn=1,Xe=Yn().extend({implicit:[Pn(),Dn(),Hn(),jn()]})),Xe}var $e,wn;function Un(){return wn||(wn=1,$e=Bn()),$e}var Je,xn;function Kn(){if(xn)return Je;xn=1;let T=D(),_=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),I=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function L(a){return a===null?!1:_.exec(a)!==null||I.exec(a)!==null}function d(a){let s=0,S=null,l=_.exec(a);if(l===null&&(l=I.exec(a)),l===null)throw new Error("Date resolve error");let c=+l[1],C=+l[2]-1,k=+l[3];if(!l[4])return new Date(Date.UTC(c,C,k));let R=+l[4],X=+l[5],M=+l[6];if(l[7]){for(s=l[7].slice(0,3);s.length<3;)s+="0";s=+s}if(l[9]){let z=+l[10],H=+(l[11]||0);S=(z*60+H)*6e4,l[9]==="-"&&(S=-S)}let U=new Date(Date.UTC(c,C,k,R,X,M,s));return S&&U.setTime(U.getTime()-S),U}function y(a){return a.toISOString()}return Je=new T("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:L,construct:d,instanceOf:Date,represent:y}),Je}var Ze,bn;function Gn(){if(bn)return Ze;bn=1;let T=D();function _(I){return I==="<<"||I===null}return Ze=new T("tag:yaml.org,2002:merge",{kind:"scalar",resolve:_}),Ze}var ze,_n;function Wn(){if(_n)return ze;_n=1;let T=D(),_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
11
+ \r`;function I(a){if(a===null)return!1;let s=0,S=a.length,l=_;for(let c=0;c<S;c++){let C=l.indexOf(a.charAt(c));if(!(C>64)){if(C<0)return!1;s+=6}}return s%8===0}function L(a){let s=a.replace(/[\r\n=]/g,""),S=s.length,l=_,c=0,C=[];for(let R=0;R<S;R++)R%4===0&&R&&(C.push(c>>16&255),C.push(c>>8&255),C.push(c&255)),c=c<<6|l.indexOf(s.charAt(R));let k=S%4*6;return k===0?(C.push(c>>16&255),C.push(c>>8&255),C.push(c&255)):k===18?(C.push(c>>10&255),C.push(c>>2&255)):k===12&&C.push(c>>4&255),new Uint8Array(C)}function d(a){let s="",S=0,l=a.length,c=_;for(let k=0;k<l;k++)k%3===0&&k&&(s+=c[S>>18&63],s+=c[S>>12&63],s+=c[S>>6&63],s+=c[S&63]),S=(S<<8)+a[k];let C=l%3;return C===0?(s+=c[S>>18&63],s+=c[S>>12&63],s+=c[S>>6&63],s+=c[S&63]):C===2?(s+=c[S>>10&63],s+=c[S>>4&63],s+=c[S<<2&63],s+=c[64]):C===1&&(s+=c[S>>2&63],s+=c[S<<4&63],s+=c[64],s+=c[64]),s}function y(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return ze=new T("tag:yaml.org,2002:binary",{kind:"scalar",resolve:I,construct:L,predicate:y,represent:d}),ze}var en,En;function Qn(){if(En)return en;En=1;let T=D(),_=Object.prototype.hasOwnProperty,I=Object.prototype.toString;function L(y){if(y===null)return!0;let a=[],s=y;for(let S=0,l=s.length;S<l;S+=1){let c=s[S],C=!1;if(I.call(c)!=="[object Object]")return!1;let k;for(k in c)if(_.call(c,k))if(!C)C=!0;else return!1;if(!C)return!1;if(a.indexOf(k)===-1)a.push(k);else return!1}return!0}function d(y){return y!==null?y:[]}return en=new T("tag:yaml.org,2002:omap",{kind:"sequence",resolve:L,construct:d}),en}var nn,In;function Vn(){if(In)return nn;In=1;let T=D(),_=Object.prototype.toString;function I(d){if(d===null)return!0;let y=d,a=new Array(y.length);for(let s=0,S=y.length;s<S;s+=1){let l=y[s];if(_.call(l)!=="[object Object]")return!1;let c=Object.keys(l);if(c.length!==1)return!1;a[s]=[c[0],l[c[0]]]}return!0}function L(d){if(d===null)return[];let y=d,a=new Array(y.length);for(let s=0,S=y.length;s<S;s+=1){let l=y[s],c=Object.keys(l);a[s]=[c[0],l[c[0]]]}return a}return nn=new T("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:I,construct:L}),nn}var rn,On;function Xn(){if(On)return rn;On=1;let T=D(),_=Object.prototype.hasOwnProperty;function I(d){if(d===null)return!0;let y=d;for(let a in y)if(_.call(y,a)&&y[a]!==null)return!1;return!0}function L(d){return d!==null?d:{}}return rn=new T("tag:yaml.org,2002:set",{kind:"mapping",resolve:I,construct:L}),rn}var ln,kn;function tn(){return kn||(kn=1,ln=Un().extend({implicit:[Kn(),Gn()],explicit:[Wn(),Qn(),Vn(),Xn()]})),ln}var Ln;function Zn(){if(Ln)return Ie;Ln=1;let T=ae(),_=he(),I=Jn(),L=tn(),d=Object.prototype.hasOwnProperty,y=1,a=2,s=3,S=4,l=1,c=2,C=3,k=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,R=/[\x85\u2028\u2029]/,X=/[,\[\]{}]/,M=/^(?:!|!!|![0-9A-Za-z-]+!)$/,U=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function z(e){return Object.prototype.toString.call(e)}function H(e){return e===10||e===13}function j(e){return e===9||e===32}function Y(e){return e===9||e===32||e===10||e===13}function $(e){return e===44||e===91||e===93||e===123||e===125}function Oe(e){if(e>=48&&e<=57)return e-48;let i=e|32;return i>=97&&i<=102?i-97+10:-1}function ke(e){return e===120?2:e===117?4:e===85?8:0}function de(e){return e>=48&&e<=57?e-48:-1}function oe(e){switch(e){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
12
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function Le(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function te(e,i,t){i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:t}):e[i]=t}let me=new Array(256),ce=new Array(256);for(let e=0;e<256;e++)me[e]=oe(e)?1:0,ce[e]=oe(e);function q(e,i){this.input=e,this.filename=i.filename||null,this.schema=i.schema||L,this.onWarning=i.onWarning||null,this.legacy=i.legacy||!1,this.json=i.json||!1,this.listener=i.listener||null,this.maxDepth=typeof i.maxDepth=="number"?i.maxDepth:100,this.maxTotalMergeKeys=typeof i.maxTotalMergeKeys=="number"?i.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function ge(e,i){let t={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return t.snippet=I(t),new _(i,t)}function b(e,i){throw ge(e,i)}function ne(e,i){e.onWarning&&e.onWarning.call(null,ge(e,i))}function K(e,i,t){let p=e.anchorMapTransactions;if(p.length!==0){let o=p[p.length-1];d.call(o,i)||(o[i]={existed:d.call(e.anchorMap,i),value:e.anchorMap[i]})}e.anchorMap[i]=t}function Ne(e){e.anchorMapTransactions.push(Object.create(null))}function ee(e){let i=e.anchorMapTransactions.pop(),t=e.anchorMapTransactions;if(t.length===0)return;let p=t[t.length-1],o=Object.keys(i);for(let A=0,n=o.length;A<n;A+=1){let r=o[A];d.call(p,r)||(p[r]=i[r])}}function Re(e){let i=e.anchorMapTransactions.pop(),t=Object.keys(i);for(let p=t.length-1;p>=0;p-=1){let o=i[t[p]];o.existed?e.anchorMap[t[p]]=o.value:delete e.anchorMap[t[p]]}}function ue(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}function ie(e,i){e.position=i.position,e.line=i.line,e.lineStart=i.lineStart,e.lineIndent=i.lineIndent,e.firstTabInLine=i.firstTabInLine,e.tag=i.tag,e.anchor=i.anchor,e.kind=i.kind,e.result=i.result}let Ae={YAML:function(i,t,p){i.version!==null&&b(i,"duplication of %YAML directive"),p.length!==1&&b(i,"YAML directive accepts exactly one argument");let o=/^([0-9]+)\.([0-9]+)$/.exec(p[0]);o===null&&b(i,"ill-formed argument of the YAML directive");let A=parseInt(o[1],10),n=parseInt(o[2],10);A!==1&&b(i,"unacceptable YAML version of the document"),i.version=p[0],i.checkLineBreaks=n<2,n!==1&&n!==2&&ne(i,"unsupported YAML version of the document")},TAG:function(i,t,p){let o;p.length!==2&&b(i,"TAG directive accepts exactly two arguments");let A=p[0];o=p[1],M.test(A)||b(i,"ill-formed tag handle (first argument) of the TAG directive"),d.call(i.tagMap,A)&&b(i,'there is a previously declared suffix for "'+A+'" tag handle'),U.test(o)||b(i,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{b(i,"tag prefix is malformed: "+o)}i.tagMap[A]=o}};function B(e,i,t,p){if(i<t){let o=e.input.slice(i,t);if(p)for(let A=0,n=o.length;A<n;A+=1){let r=o.charCodeAt(A);r===9||r>=32&&r<=1114111||b(e,"expected valid JSON character")}else k.test(o)&&b(e,"the stream contains non-printable characters");e.result+=o}}function J(e,i,t,p){T.isObject(t)||b(e,"cannot merge mappings; the provided source object is unacceptable");let o=Object.keys(t);for(let A=0,n=o.length;A<n;A+=1){let r=o[A];e.maxTotalMergeKeys!==-1&&++e.totalMergeKeys>e.maxTotalMergeKeys&&b(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),d.call(i,r)||(te(i,r,t[r]),p[r]=!0)}}function G(e,i,t,p,o,A,n,r,m){if(Array.isArray(o)){o=Array.prototype.slice.call(o);for(let u=0,f=o.length;u<f;u+=1)Array.isArray(o[u])&&b(e,"nested arrays are not supported inside keys"),typeof o=="object"&&z(o[u])==="[object Object]"&&(o[u]="[object Object]")}if(typeof o=="object"&&z(o)==="[object Object]"&&(o="[object Object]"),o=String(o),i===null&&(i={}),p==="tag:yaml.org,2002:merge")if(Array.isArray(A))for(let u=0,f=A.length;u<f;u+=1)J(e,i,A[u],t);else J(e,i,A,t);else!e.json&&!d.call(t,o)&&d.call(i,o)&&(e.line=n||e.line,e.lineStart=r||e.lineStart,e.position=m||e.position,b(e,"duplicated mapping key")),te(i,o,A),delete t[o];return i}function re(e){let i=e.input.charCodeAt(e.position);i===10?e.position++:i===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):b(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function F(e,i,t){let p=0,o=e.input.charCodeAt(e.position);for(;o!==0;){for(;j(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(i&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(H(o))for(re(e),o=e.input.charCodeAt(e.position),p++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return t!==-1&&p!==0&&e.lineIndent<t&&ne(e,"deficient indentation"),p}function le(e){let i=e.position,t=e.input.charCodeAt(i);return!!((t===45||t===46)&&t===e.input.charCodeAt(i+1)&&t===e.input.charCodeAt(i+2)&&(i+=3,t=e.input.charCodeAt(i),t===0||Y(t)))}function W(e,i){i===1?e.result+=" ":i>1&&(e.result+=T.repeat(`
13
+ `,i-1))}function ye(e,i,t){let p,o,A,n,r,m,u=e.kind,f=e.result,g=e.input.charCodeAt(e.position);if(Y(g)||$(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96)return!1;if(g===63||g===45){let h=e.input.charCodeAt(e.position+1);if(Y(h)||t&&$(h))return!1}for(e.kind="scalar",e.result="",p=o=e.position,A=!1;g!==0;){if(g===58){let h=e.input.charCodeAt(e.position+1);if(Y(h)||t&&$(h))break}else if(g===35){let h=e.input.charCodeAt(e.position-1);if(Y(h))break}else{if(e.position===e.lineStart&&le(e)||t&&$(g))break;if(H(g))if(n=e.line,r=e.lineStart,m=e.lineIndent,F(e,!1,-1),e.lineIndent>=i){A=!0,g=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=n,e.lineStart=r,e.lineIndent=m;break}}A&&(B(e,p,o,!1),W(e,e.line-n),p=o=e.position,A=!1),j(g)||(o=e.position+1),g=e.input.charCodeAt(++e.position)}return B(e,p,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}function Ce(e,i){let t,p,o=e.input.charCodeAt(e.position);if(o!==39)return!1;for(e.kind="scalar",e.result="",e.position++,t=p=e.position;(o=e.input.charCodeAt(e.position))!==0;)if(o===39)if(B(e,t,e.position,!0),o=e.input.charCodeAt(++e.position),o===39)t=e.position,e.position++,p=e.position;else return!0;else H(o)?(B(e,t,p,!0),W(e,F(e,!1,i)),t=p=e.position):e.position===e.lineStart&&le(e)?b(e,"unexpected end of the document within a single quoted scalar"):(e.position++,j(o)||(p=e.position));b(e,"unexpected end of the stream within a single quoted scalar")}function fe(e,i){let t,p,o,A=e.input.charCodeAt(e.position);if(A!==34)return!1;for(e.kind="scalar",e.result="",e.position++,t=p=e.position;(A=e.input.charCodeAt(e.position))!==0;){if(A===34)return B(e,t,e.position,!0),e.position++,!0;if(A===92){if(B(e,t,e.position,!0),A=e.input.charCodeAt(++e.position),H(A))F(e,!1,i);else if(A<256&&me[A])e.result+=ce[A],e.position++;else if((o=ke(A))>0){let n=o,r=0;for(;n>0;n--)A=e.input.charCodeAt(++e.position),(o=Oe(A))>=0?r=(r<<4)+o:b(e,"expected hexadecimal character");e.result+=Le(r),e.position++}else b(e,"unknown escape sequence");t=p=e.position}else H(A)?(B(e,t,p,!0),W(e,F(e,!1,i)),t=p=e.position):e.position===e.lineStart&&le(e)?b(e,"unexpected end of the document within a double quoted scalar"):(e.position++,j(A)||(p=e.position))}b(e,"unexpected end of the stream within a double quoted scalar")}function Se(e,i){let t=!0,p,o,A,n=e.tag,r,m=e.anchor,u,f,g,h,x=Object.create(null),w,E,O,N=e.input.charCodeAt(e.position);if(N===91)u=93,h=!1,r=[];else if(N===123)u=125,h=!0,r={};else return!1;for(e.anchor!==null&&K(e,e.anchor,r),N=e.input.charCodeAt(++e.position);N!==0;){if(F(e,!0,i),N=e.input.charCodeAt(e.position),N===u)return e.position++,e.tag=n,e.anchor=m,e.kind=h?"mapping":"sequence",e.result=r,!0;if(t?N===44&&b(e,"expected the node content, but found ','"):b(e,"missed comma between flow collection entries"),E=w=O=null,f=g=!1,N===63){let v=e.input.charCodeAt(e.position+1);Y(v)&&(f=g=!0,e.position++,F(e,!0,i))}p=e.line,o=e.lineStart,A=e.position,V(e,i,y,!1,!0),E=e.tag,w=e.result,F(e,!0,i),N=e.input.charCodeAt(e.position),(g||e.line===p)&&N===58&&(f=!0,N=e.input.charCodeAt(++e.position),F(e,!0,i),V(e,i,y,!1,!0),O=e.result),h?G(e,r,x,E,w,O,p,o,A):f?r.push(G(e,null,x,E,w,O,p,o,A)):r.push(w),F(e,!0,i),N=e.input.charCodeAt(e.position),N===44?(t=!0,N=e.input.charCodeAt(++e.position)):t=!1}b(e,"unexpected end of the stream within a flow collection")}function Te(e,i){let t,p=l,o=!1,A=!1,n=i,r=0,m=!1,u,f=e.input.charCodeAt(e.position);if(f===124)t=!1;else if(f===62)t=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)l===p?p=f===43?C:c:b(e,"repeat of a chomping mode identifier");else if((u=de(f))>=0)u===0?b(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):A?b(e,"repeat of an indentation width identifier"):(n=i+u-1,A=!0);else break;if(j(f)){do f=e.input.charCodeAt(++e.position);while(j(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!H(f)&&f!==0)}for(;f!==0;){for(re(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!A||e.lineIndent<n)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!A&&e.lineIndent>n&&(n=e.lineIndent),H(f)){r++;continue}if(!A&&n===0&&b(e,"missing indentation for block scalar"),e.lineIndent<n){p===C?e.result+=T.repeat(`
14
+ `,o?1+r:r):p===l&&o&&(e.result+=`
15
+ `);break}t?j(f)?(m=!0,e.result+=T.repeat(`
16
+ `,o?1+r:r)):m?(m=!1,e.result+=T.repeat(`
17
+ `,r+1)):r===0?o&&(e.result+=" "):e.result+=T.repeat(`
18
+ `,r):e.result+=T.repeat(`
19
+ `,o?1+r:r),o=!0,A=!0,r=0;let g=e.position;for(;!H(f)&&f!==0;)f=e.input.charCodeAt(++e.position);B(e,g,e.position,!1)}return!0}function Q(e,i){let t=e.tag,p=e.anchor,o=[],A=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&K(e,e.anchor,o);let n=e.input.charCodeAt(e.position);for(;n!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,b(e,"tab characters must not be used in indentation")),n===45);){let r=e.input.charCodeAt(e.position+1);if(!Y(r))break;if(A=!0,e.position++,F(e,!0,-1)&&e.lineIndent<=i){o.push(null),n=e.input.charCodeAt(e.position);continue}let m=e.line;if(V(e,i,s,!1,!0),o.push(e.result),F(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===m||e.lineIndent>i)&&n!==0)b(e,"bad indentation of a sequence entry");else if(e.lineIndent<i)break}return A?(e.tag=t,e.anchor=p,e.kind="sequence",e.result=o,!0):!1}function we(e,i,t){let p,o,A,n,r=e.tag,m=e.anchor,u={},f=Object.create(null),g=null,h=null,x=null,w=!1,E=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&K(e,e.anchor,u);let O=e.input.charCodeAt(e.position);for(;O!==0;){!w&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,b(e,"tab characters must not be used in indentation"));let N=e.input.charCodeAt(e.position+1),v=e.line;if((O===63||O===58)&&Y(N))O===63?(w&&(G(e,u,f,g,h,null,o,A,n),g=h=x=null),E=!0,w=!0,p=!0):w?(w=!1,p=!0):b(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,O=N;else{if(o=e.line,A=e.lineStart,n=e.position,!V(e,t,a,!1,!0))break;if(e.line===v){for(O=e.input.charCodeAt(e.position);j(O);)O=e.input.charCodeAt(++e.position);if(O===58)O=e.input.charCodeAt(++e.position),Y(O)||b(e,"a whitespace character is expected after the key-value separator within a block mapping"),w&&(G(e,u,f,g,h,null,o,A,n),g=h=x=null),E=!0,w=!1,p=!1,g=e.tag,h=e.result;else if(E)b(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=r,e.anchor=m,!0}else if(E)b(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=r,e.anchor=m,!0}if((e.line===v||e.lineIndent>i)&&(w&&(o=e.line,A=e.lineStart,n=e.position),V(e,i,S,!0,p)&&(w?h=e.result:x=e.result),w||(G(e,u,f,g,h,x,o,A,n),g=h=x=null),F(e,!0,-1),O=e.input.charCodeAt(e.position)),(e.line===v||e.lineIndent>i)&&O!==0)b(e,"bad indentation of a mapping entry");else if(e.lineIndent<i)break}return w&&G(e,u,f,g,h,null,o,A,n),E&&(e.tag=r,e.anchor=m,e.kind="mapping",e.result=u),E}function ve(e){let i=!1,t=!1,p,o,A=e.input.charCodeAt(e.position);if(A!==33)return!1;e.tag!==null&&b(e,"duplication of a tag property"),A=e.input.charCodeAt(++e.position),A===60?(i=!0,A=e.input.charCodeAt(++e.position)):A===33?(t=!0,p="!!",A=e.input.charCodeAt(++e.position)):p="!";let n=e.position;if(i){do A=e.input.charCodeAt(++e.position);while(A!==0&&A!==62);e.position<e.length?(o=e.input.slice(n,e.position),A=e.input.charCodeAt(++e.position)):b(e,"unexpected end of the stream within a verbatim tag")}else{for(;A!==0&&!Y(A);)A===33&&(t?b(e,"tag suffix cannot contain exclamation marks"):(p=e.input.slice(n-1,e.position+1),M.test(p)||b(e,"named tag handle cannot contain such characters"),t=!0,n=e.position+1)),A=e.input.charCodeAt(++e.position);o=e.input.slice(n,e.position),X.test(o)&&b(e,"tag suffix cannot contain flow indicator characters")}o&&!U.test(o)&&b(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{b(e,"tag name is malformed: "+o)}return i?e.tag=o:d.call(e.tagMap,p)?e.tag=e.tagMap[p]+o:p==="!"?e.tag="!"+o:p==="!!"?e.tag="tag:yaml.org,2002:"+o:b(e,'undeclared tag handle "'+p+'"'),!0}function xe(e){let i=e.input.charCodeAt(e.position);if(i!==38)return!1;e.anchor!==null&&b(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position);let t=e.position;for(;i!==0&&!Y(i)&&!$(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&b(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function be(e){let i=e.input.charCodeAt(e.position);if(i!==42)return!1;i=e.input.charCodeAt(++e.position);let t=e.position;for(;i!==0&&!Y(i)&&!$(i);)i=e.input.charCodeAt(++e.position);e.position===t&&b(e,"name of an alias node must contain at least one character");let p=e.input.slice(t,e.position);return d.call(e.anchorMap,p)||b(e,'unidentified alias "'+p+'"'),e.result=e.anchorMap[p],F(e,!0,-1),!0}function Me(e,i,t,p){let o=ue(e);return Ne(e),ie(e,i),e.tag=null,e.anchor=null,e.kind=null,e.result=null,we(e,t,p)&&e.kind==="mapping"?(ee(e),!0):(Re(e),ie(e,o),!1)}function V(e,i,t,p,o){let A,n,r=1,m=!1,u=!1,f=null,g,h,x;e.depth>=e.maxDepth&&b(e,"nesting exceeded maxDepth ("+e.maxDepth+")"),e.depth+=1,e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let w=A=n=S===t||s===t;if(p&&F(e,!0,-1)&&(m=!0,e.lineIndent>i?r=1:e.lineIndent===i?r=0:e.lineIndent<i&&(r=-1)),r===1)for(;;){let E=e.input.charCodeAt(e.position),O=ue(e);if(m&&(E===33&&e.tag!==null||E===38&&e.anchor!==null)||!ve(e)&&!xe(e))break;f===null&&(f=O),F(e,!0,-1)?(m=!0,n=w,e.lineIndent>i?r=1:e.lineIndent===i?r=0:e.lineIndent<i&&(r=-1)):n=!1}if(n&&(n=m||o),r===1||S===t)if(y===t||a===t?h=i:h=i+1,x=e.position-e.lineStart,r===1)if(n&&(Q(e,x)||we(e,x,h))||Se(e,h))u=!0;else{let E=e.input.charCodeAt(e.position);f!==null&&w&&!n&&E!==124&&E!==62&&Me(e,f,f.position-f.lineStart,h)||A&&Te(e,h)||Ce(e,h)||fe(e,h)?u=!0:be(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&b(e,"alias node should not have any properties")):ye(e,h,y===t)&&(u=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&K(e,e.anchor,e.result)}else r===0&&(u=n&&Q(e,x));if(e.tag===null)e.anchor!==null&&K(e,e.anchor,e.result);else if(e.tag==="?"){e.result!==null&&e.kind!=="scalar"&&b(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"');for(let E=0,O=e.implicitTypes.length;E<O;E+=1)if(g=e.implicitTypes[E],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&K(e,e.anchor,e.result);break}}else if(e.tag!=="!"){if(d.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else{g=null;let E=e.typeMap.multi[e.kind||"fallback"];for(let O=0,N=E.length;O<N;O+=1)if(e.tag.slice(0,E[O].tag.length)===E[O].tag){g=E[O];break}}g||b(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&b(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&K(e,e.anchor,e.result)):b(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.depth-=1,e.tag!==null||e.anchor!==null||u}function Fe(e){let i=e.position,t=!1,p;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(p=e.input.charCodeAt(e.position))!==0&&(F(e,!0,-1),p=e.input.charCodeAt(e.position),!(e.lineIndent>0||p!==37));){t=!0,p=e.input.charCodeAt(++e.position);let o=e.position;for(;p!==0&&!Y(p);)p=e.input.charCodeAt(++e.position);let A=e.input.slice(o,e.position),n=[];for(A.length<1&&b(e,"directive name must not be less than one character in length");p!==0;){for(;j(p);)p=e.input.charCodeAt(++e.position);if(p===35){do p=e.input.charCodeAt(++e.position);while(p!==0&&!H(p));break}if(H(p))break;for(o=e.position;p!==0&&!Y(p);)p=e.input.charCodeAt(++e.position);n.push(e.input.slice(o,e.position))}p!==0&&re(e),d.call(Ae,A)?Ae[A](e,A,n):ne(e,'unknown document directive "'+A+'"')}if(F(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,F(e,!0,-1)):t&&b(e,"directives end mark is expected"),V(e,e.lineIndent-1,S,!1,!0),F(e,!0,-1),e.checkLineBreaks&&R.test(e.input.slice(i,e.position))&&ne(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&le(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,F(e,!0,-1));return}e.position<e.length-1&&b(e,"end of the stream or a document separator is expected")}function _e(e,i){e=String(e),i=i||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
20
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));let t=new q(e,i),p=e.indexOf("\0");for(p!==-1&&(t.position=p,b(t,"null byte is not allowed in input")),t.input+="\0";t.input.charCodeAt(t.position)===32;)t.lineIndent+=1,t.position+=1;for(;t.position<t.length-1;)Fe(t);return t.documents}function Ee(e,i,t){i!==null&&typeof i=="object"&&typeof t>"u"&&(t=i,i=null);let p=_e(e,t);if(typeof i!="function")return p;for(let o=0,A=p.length;o<A;o+=1)i(p[o])}function qe(e,i){let t=_e(e,i);if(t.length!==0){if(t.length===1)return t[0];throw new _("expected a single document in the stream, but found more")}}return Ie.loadAll=Ee,Ie.load=qe,Ie}var on={},Nn;function zn(){if(Nn)return on;Nn=1;let T=ae(),_=he(),I=tn(),L=Object.prototype.toString,d=Object.prototype.hasOwnProperty,y=65279,a=9,s=10,S=13,l=32,c=33,C=34,k=35,R=37,X=38,M=39,U=42,z=44,H=45,j=58,Y=61,$=62,Oe=63,ke=64,de=91,oe=93,Le=96,te=123,me=124,ce=125,q={};q[0]="\\0",q[7]="\\a",q[8]="\\b",q[9]="\\t",q[10]="\\n",q[11]="\\v",q[12]="\\f",q[13]="\\r",q[27]="\\e",q[34]='\\"',q[92]="\\\\",q[133]="\\N",q[160]="\\_",q[8232]="\\L",q[8233]="\\P";let ge=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],b=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ne(n,r){if(r===null)return{};let m={},u=Object.keys(r);for(let f=0,g=u.length;f<g;f+=1){let h=u[f],x=String(r[h]);h.slice(0,2)==="!!"&&(h="tag:yaml.org,2002:"+h.slice(2));let w=n.compiledTypeMap.fallback[h];w&&d.call(w.styleAliases,x)&&(x=w.styleAliases[x]),m[h]=x}return m}function K(n){let r,m,u=n.toString(16).toUpperCase();if(n<=255)r="x",m=2;else if(n<=65535)r="u",m=4;else if(n<=4294967295)r="U",m=8;else throw new _("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+T.repeat("0",m-u.length)+u}let Ne=1,ee=2;function Re(n){this.schema=n.schema||I,this.indent=Math.max(1,n.indent||2),this.noArrayIndent=n.noArrayIndent||!1,this.skipInvalid=n.skipInvalid||!1,this.flowLevel=T.isNothing(n.flowLevel)?-1:n.flowLevel,this.styleMap=ne(this.schema,n.styles||null),this.sortKeys=n.sortKeys||!1,this.lineWidth=n.lineWidth||80,this.noRefs=n.noRefs||!1,this.noCompatMode=n.noCompatMode||!1,this.condenseFlow=n.condenseFlow||!1,this.quotingType=n.quotingType==='"'?ee:Ne,this.forceQuotes=n.forceQuotes||!1,this.replacer=typeof n.replacer=="function"?n.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ue(n,r){let m=T.repeat(" ",r),u=0,f="",g=n.length;for(;u<g;){let h,x=n.indexOf(`
21
+ `,u);x===-1?(h=n.slice(u),u=g):(h=n.slice(u,x+1),u=x+1),h.length&&h!==`
22
+ `&&(f+=m),f+=h}return f}function ie(n,r){return`
23
+ `+T.repeat(" ",n.indent*r)}function Ae(n,r){for(let m=0,u=n.implicitTypes.length;m<u;m+=1)if(n.implicitTypes[m].resolve(r))return!0;return!1}function B(n){return n===l||n===a}function J(n){return n>=32&&n<=126||n>=161&&n<=55295&&n!==8232&&n!==8233||n>=57344&&n<=65533&&n!==y||n>=65536&&n<=1114111}function G(n){return J(n)&&n!==y&&n!==S&&n!==s}function re(n,r,m){let u=G(n),f=u&&!B(n);return(m?u:u&&n!==z&&n!==de&&n!==oe&&n!==te&&n!==ce)&&n!==k&&!(r===j&&!f)||G(r)&&!B(r)&&n===k||r===j&&f}function F(n){return J(n)&&n!==y&&!B(n)&&n!==H&&n!==Oe&&n!==j&&n!==z&&n!==de&&n!==oe&&n!==te&&n!==ce&&n!==k&&n!==X&&n!==U&&n!==c&&n!==me&&n!==Y&&n!==$&&n!==M&&n!==C&&n!==R&&n!==ke&&n!==Le}function le(n){return!B(n)&&n!==j}function W(n,r){let m=n.charCodeAt(r),u;return m>=55296&&m<=56319&&r+1<n.length&&(u=n.charCodeAt(r+1),u>=56320&&u<=57343)?(m-55296)*1024+u-56320+65536:m}function ye(n){return/^\n* /.test(n)}let Ce=1,fe=2,Se=3,Te=4,Q=5;function we(n,r,m,u,f,g,h,x){let w,E=0,O=null,N=!1,v=!1,cn=u!==-1,pe=-1,se=F(W(n,0))&&le(W(n,n.length-1));if(r||h)for(w=0;w<n.length;E>=65536?w+=2:w++){if(E=W(n,w),!J(E))return Q;se=se&&re(E,O,x),O=E}else{for(w=0;w<n.length;E>=65536?w+=2:w++){if(E=W(n,w),E===s)N=!0,cn&&(v=v||w-pe-1>u&&n[pe+1]!==" ",pe=w);else if(!J(E))return Q;se=se&&re(E,O,x),O=E}v=v||cn&&w-pe-1>u&&n[pe+1]!==" "}return!N&&!v?se&&!h&&!f(n)?Ce:g===ee?Q:fe:m>9&&ye(n)?Q:h?g===ee?Q:fe:v?Te:Se}function ve(n,r,m,u,f){n.dump=(function(){if(r.length===0)return n.quotingType===ee?'""':"''";if(!n.noCompatMode&&(ge.indexOf(r)!==-1||b.test(r)))return n.quotingType===ee?'"'+r+'"':"'"+r+"'";let g=n.indent*Math.max(1,m),h=n.lineWidth===-1?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-g),x=u||n.flowLevel>-1&&m>=n.flowLevel;function w(E){return Ae(n,E)}switch(we(r,x,n.indent,h,w,n.quotingType,n.forceQuotes&&!u,f)){case Ce:return r;case fe:return"'"+r.replace(/'/g,"''")+"'";case Se:return"|"+xe(r,n.indent)+be(ue(r,g));case Te:return">"+xe(r,n.indent)+be(ue(Me(r,h),g));case Q:return'"'+Fe(r)+'"';default:throw new _("impossible error: invalid scalar style")}})()}function xe(n,r){let m=ye(n)?String(r):"",u=n[n.length-1]===`
24
+ `,g=u&&(n[n.length-2]===`
25
+ `||n===`
26
+ `)?"+":u?"":"-";return m+g+`
27
+ `}function be(n){return n[n.length-1]===`
28
+ `?n.slice(0,-1):n}function Me(n,r){let m=/(\n+)([^\n]*)/g,u=(function(){let x=n.indexOf(`
29
+ `);return x=x!==-1?x:n.length,m.lastIndex=x,V(n.slice(0,x),r)})(),f=n[0]===`
30
+ `||n[0]===" ",g,h;for(;h=m.exec(n);){let x=h[1],w=h[2];g=w[0]===" ",u+=x+(!f&&!g&&w!==""?`
31
+ `:"")+V(w,r),f=g}return u}function V(n,r){if(n===""||n[0]===" ")return n;let m=/ [^ ]/g,u,f=0,g,h=0,x=0,w="";for(;u=m.exec(n);)x=u.index,x-f>r&&(g=h>f?h:x,w+=`
32
+ `+n.slice(f,g),f=g+1),h=x;return w+=`
33
+ `,n.length-f>r&&h>f?w+=n.slice(f,h)+`
34
+ `+n.slice(h+1):w+=n.slice(f),w.slice(1)}function Fe(n){let r="",m=0;for(let u=0;u<n.length;m>=65536?u+=2:u++){m=W(n,u);let f=q[m];!f&&J(m)?(r+=n[u],m>=65536&&(r+=n[u+1])):r+=f||K(m)}return r}function _e(n,r,m){let u="",f=n.tag;for(let g=0,h=m.length;g<h;g+=1){let x=m[g];n.replacer&&(x=n.replacer.call(m,String(g),x)),(t(n,r,x,!1,!1)||typeof x>"u"&&t(n,r,null,!1,!1))&&(u!==""&&(u+=","+(n.condenseFlow?"":" ")),u+=n.dump)}n.tag=f,n.dump="["+u+"]"}function Ee(n,r,m,u){let f="",g=n.tag;for(let h=0,x=m.length;h<x;h+=1){let w=m[h];n.replacer&&(w=n.replacer.call(m,String(h),w)),(t(n,r+1,w,!0,!0,!1,!0)||typeof w>"u"&&t(n,r+1,null,!0,!0,!1,!0))&&((!u||f!=="")&&(f+=ie(n,r)),n.dump&&s===n.dump.charCodeAt(0)?f+="-":f+="- ",f+=n.dump)}n.tag=g,n.dump=f||"[]"}function qe(n,r,m){let u="",f=n.tag,g=Object.keys(m);for(let h=0,x=g.length;h<x;h+=1){let w="";u!==""&&(w+=", "),n.condenseFlow&&(w+='"');let E=g[h],O=m[E];n.replacer&&(O=n.replacer.call(m,E,O)),t(n,r,E,!1,!1)&&(n.dump.length>1024&&(w+="? "),w+=n.dump+(n.condenseFlow?'"':"")+":"+(n.condenseFlow?"":" "),t(n,r,O,!1,!1)&&(w+=n.dump,u+=w))}n.tag=f,n.dump="{"+u+"}"}function e(n,r,m,u){let f="",g=n.tag,h=Object.keys(m);if(n.sortKeys===!0)h.sort();else if(typeof n.sortKeys=="function")h.sort(n.sortKeys);else if(n.sortKeys)throw new _("sortKeys must be a boolean or a function");for(let x=0,w=h.length;x<w;x+=1){let E="";(!u||f!=="")&&(E+=ie(n,r));let O=h[x],N=m[O];if(n.replacer&&(N=n.replacer.call(m,O,N)),!t(n,r+1,O,!0,!0,!0))continue;let v=n.tag!==null&&n.tag!=="?"||n.dump&&n.dump.length>1024;v&&(n.dump&&s===n.dump.charCodeAt(0)?E+="?":E+="? "),E+=n.dump,v&&(E+=ie(n,r)),t(n,r+1,N,!0,v)&&(n.dump&&s===n.dump.charCodeAt(0)?E+=":":E+=": ",E+=n.dump,f+=E)}n.tag=g,n.dump=f||"{}"}function i(n,r,m){let u=m?n.explicitTypes:n.implicitTypes;for(let f=0,g=u.length;f<g;f+=1){let h=u[f];if((h.instanceOf||h.predicate)&&(!h.instanceOf||typeof r=="object"&&r instanceof h.instanceOf)&&(!h.predicate||h.predicate(r))){if(m?h.multi&&h.representName?n.tag=h.representName(r):n.tag=h.tag:n.tag="?",h.represent){let x=n.styleMap[h.tag]||h.defaultStyle,w;if(L.call(h.represent)==="[object Function]")w=h.represent(r,x);else if(d.call(h.represent,x))w=h.represent[x](r,x);else throw new _("!<"+h.tag+'> tag resolver accepts not "'+x+'" style');n.dump=w}return!0}}return!1}function t(n,r,m,u,f,g,h){n.tag=null,n.dump=m,i(n,m,!1)||i(n,m,!0);let x=L.call(n.dump),w=u;u&&(u=n.flowLevel<0||n.flowLevel>r);let E=x==="[object Object]"||x==="[object Array]",O,N;if(E&&(O=n.duplicates.indexOf(m),N=O!==-1),(n.tag!==null&&n.tag!=="?"||N||n.indent!==2&&r>0)&&(f=!1),N&&n.usedDuplicates[O])n.dump="*ref_"+O;else{if(E&&N&&!n.usedDuplicates[O]&&(n.usedDuplicates[O]=!0),x==="[object Object]")u&&Object.keys(n.dump).length!==0?(e(n,r,n.dump,f),N&&(n.dump="&ref_"+O+n.dump)):(qe(n,r,n.dump),N&&(n.dump="&ref_"+O+" "+n.dump));else if(x==="[object Array]")u&&n.dump.length!==0?(n.noArrayIndent&&!h&&r>0?Ee(n,r-1,n.dump,f):Ee(n,r,n.dump,f),N&&(n.dump="&ref_"+O+n.dump)):(_e(n,r,n.dump),N&&(n.dump="&ref_"+O+" "+n.dump));else if(x==="[object String]")n.tag!=="?"&&ve(n,n.dump,r,g,w);else{if(x==="[object Undefined]")return!1;if(n.skipInvalid)return!1;throw new _("unacceptable kind of an object to dump "+x)}if(n.tag!==null&&n.tag!=="?"){let v=encodeURI(n.tag[0]==="!"?n.tag.slice(1):n.tag).replace(/!/g,"%21");n.tag[0]==="!"?v="!"+v:v.slice(0,18)==="tag:yaml.org,2002:"?v="!!"+v.slice(18):v="!<"+v+">",n.dump=v+" "+n.dump}}return!0}function p(n,r){let m=[],u=[];o(n,m,u);let f=u.length;for(let g=0;g<f;g+=1)r.duplicates.push(m[u[g]]);r.usedDuplicates=new Array(f)}function o(n,r,m){if(n!==null&&typeof n=="object"){let u=r.indexOf(n);if(u!==-1)m.indexOf(u)===-1&&m.push(u);else if(r.push(n),Array.isArray(n))for(let f=0,g=n.length;f<g;f+=1)o(n[f],r,m);else{let f=Object.keys(n);for(let g=0,h=f.length;g<h;g+=1)o(n[f[g]],r,m)}}}function A(n,r){r=r||{};let m=new Re(r);m.noRefs||p(n,m);let u=n;return m.replacer&&(u=m.replacer.call({"":u},"",u)),t(m,0,u,!0,!0)?m.dump+`
35
+ `:""}return on.dump=A,on}var Rn;function ei(){if(Rn)return P;Rn=1;let T=Zn(),_=zn();function I(L,d){return function(){throw new Error("Function yaml."+L+" is removed in js-yaml 4. Use yaml."+d+" instead, which is now safe by default.")}}return P.Type=D(),P.Schema=vn(),P.FAILSAFE_SCHEMA=Yn(),P.JSON_SCHEMA=Bn(),P.CORE_SCHEMA=Un(),P.DEFAULT_SCHEMA=tn(),P.load=T.load,P.loadAll=T.loadAll,P.dump=_.dump,P.YAMLException=he(),P.types={binary:Wn(),float:jn(),map:qn(),null:Pn(),pairs:Vn(),set:Xn(),timestamp:Kn(),bool:Dn(),int:Hn(),merge:Gn(),omap:Qn(),seq:Fn(),str:Mn()},P.safeLoad=I("safeLoad","load"),P.safeLoadAll=I("safeLoadAll","loadAll"),P.safeDump=I("safeDump","dump"),P}var ni=ei(),ii=$n(ni),{Type:ri,Schema:li,FAILSAFE_SCHEMA:oi,JSON_SCHEMA:ti,CORE_SCHEMA:ci,DEFAULT_SCHEMA:ui,load:fi,loadAll:pi,dump:si,YAMLException:ai,types:hi,safeLoad:di,safeLoadAll:mi,safeDump:gi}=ii;export{ii as a};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __swiftyCreateRequire } from "node:module";
3
+ const require = __swiftyCreateRequire(import.meta.url);
4
+ var g="Tool execution was interrupted. The tool may or may not have completed; verify before relying on its effects.",p="The user rejected this tool use. Nothing was changed (for file edits, the new content was NOT written).";function x(o){let t=new Set,l=new Set;for(let e of o){for(let s of e.toolResults??[])t.add(s.toolUseId);for(let s of e.toolUses??[])l.add(s.toolUseId)}let c=[];for(let e of o){let s=e;if((e.toolResults?.length??0)>0){let n=(e.toolResults??[]).filter(h=>l.has(h.toolUseId));if(n.length===0&&!e.content&&!(e.toolUses?.length??0))continue;s={...e,toolResults:n}}c.push(s);let i=[];for(let n of e.toolUses??[])t.has(n.toolUseId)||(i.push({toolUseId:n.toolUseId,content:g,isError:!0}),t.add(n.toolUseId));i.length>0&&c.push({role:"user",content:"",toolResults:i})}return c}var r=class extends Error{constructor(t){super(t),this.name="LLMError"}},u=class extends r{constructor(t){super(t),this.name="AuthenticationError"}},a=class extends r{retryAfter;constructor(t,l){super(t),this.name="RateLimitError",this.retryAfter=l}},d=class extends r{constructor(t){super(t),this.name="NetworkError"}},f=class extends r{constructor(t){super(t),this.name="ContextTooLongError"}};export{p as a,x as b,r as c,u as d,a as e,d as f,f as g};